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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
916770e0875df4e7da900aeb509ad5902babdd8b | 3222a9f99dc04eae93442f27a49259f2c74320a9 | /uninas/model/heads/darts.py | bfc37c2e68c8752756436216fae2b2833ea125a8 | [
"MIT"
] | permissive | Light-Reflection/uninas | 55a754c997b6d7a48aa6ee93fc4f1211c9a35740 | b5727308b48b2fe399cc9b5d5732f3f5fd913b35 | refs/heads/main | 2023-02-20T11:48:06.815664 | 2021-01-25T09:42:43 | 2021-01-25T09:42:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,486 | py | import torch
from uninas.model.heads.abstract import AbstractHead
from uninas.model.modules.abstract import AbstractModule
from uninas.utils.shape import Shape
from uninas.register import Register
import torch.nn as nn
class BasicDartsAuxHeadModule(nn.Module):
def __init__(self, c: int, num_classes: int, init_poo... | [
"kevin.laube@uni-tuebingen.de"
] | kevin.laube@uni-tuebingen.de |
6f39418b10650d551820ea2a5e3c5c1f12f7d297 | ffbf33d8486a49c77152d814a2217620643f8ce1 | /example.py | 540b76aba22b847f4c3298421bec5b03ea063225 | [] | no_license | codesharedot/dentacoin-price-gnome-ticket | fad8c6ea24a152467bc518e5d466c1684dc6183e | 869eb92c9b3871f3bc79b3a0c5c792f52792b4a7 | refs/heads/master | 2020-08-21T07:44:30.869487 | 2019-10-18T21:55:26 | 2019-10-18T21:55:26 | 216,112,391 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 720 | py | #!/usr/bin/env python
# rename to dentacoin.1r.60s.py and put in ~.config/argos
import re
from gi.repository import Gio
from datetime import datetime
import time
import json
import requests
def coin():
data = requests.get("https://api.coinmarketcap.com/v1/ticker/dentacoin/")
price = data.json()[0]["price_usd"... | [
"codeto@sent.com"
] | codeto@sent.com |
d0fe769b3f739e25981e583fdbcb874d4c996e23 | 446d9c9e98bac9bb7d6ba9d6f2639fd1ab0e68af | /pythonBook/chapter08/exercise8-45.py | 8a6d1acb304c0904f22d4d0c98285dad19176d3d | [] | no_license | thiagofb84jp/python-exercises | 062d85f4f95332549acd42bf98de2b20afda5239 | 88ad7365a0f051021034ac6f0683b3df2de57cdb | refs/heads/main | 2023-07-19T21:15:08.689041 | 2021-08-17T10:59:09 | 2021-08-17T10:59:09 | 308,311,723 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 383 | py | # 8.45. Imprimindo os elementos de uma lista
ESPACOS_POR_NIVEL = 4
def imprimeElementos(l, nivel=0):
espacos = ' ' * ESPACOS_POR_NIVEL * nivel
if type(l) == list:
print(espacos, "[")
for e in l:
imprimeElementos(e, nivel + 1)
print(espacos, "]")
else:
print(es... | [
"thiagofb84jp@gmail.com"
] | thiagofb84jp@gmail.com |
56820791ef6465af1280c99946f90aa563aa1085 | bd55c7d73a95caed5f47b0031264ec05fd6ff60a | /apps/core/migrations/0028_auto_20180609_1122.py | 3cfe08f42b6976a4f54d3b2fbf6d1522a5943236 | [] | no_license | phonehtetpaing/ebdjango | 3c8610e2d96318aff3b1db89480b2f298ad91b57 | 1b77d7662ec2bce9a6377690082a656c8e46608c | refs/heads/main | 2023-06-26T13:14:55.319687 | 2021-07-21T06:04:58 | 2021-07-21T06:04:58 | 381,564,118 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,855 | py | # Generated by Django 2.0.5 on 2018-06-09 02:22
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0027_auto_20180609_1100'),
]
operations = [
migrations.AddField(
model_name='vendorbran... | [
"phonehtetpaing1221@gmail.com"
] | phonehtetpaing1221@gmail.com |
35d8138d7d2c4d5933446c2113970509bc84e41c | 5abb52c3ee859ee5876601025479e9d3214f829f | /meiduo/meiduo/utils/models.py | bf7a320e05ea579c837b00f9a19d711fe9043645 | [] | no_license | RapperDream/meiduo-18 | 05ca46628f5575b31d6a0b2115786dd3f0e57f5a | d7f5aad879f0e420ac16e577d107236bdec816ee | refs/heads/master | 2020-04-22T02:39:01.099998 | 2019-02-23T14:53:39 | 2019-02-23T14:53:39 | 170,057,826 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 400 | py | from django.db import models
class BaseModel(models.Model):
"""
为模型类补充字段
"""
create_time = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")
update_time = models.DateTimeField(auto_now=True, verbose_name="更新时间")
class Meta:
abstract = True # 说明是抽象模型类,只能继承使用,数据库迁移时不会创建
| [
"xwp_fullstack@163.com"
] | xwp_fullstack@163.com |
d5a3ec9ce37ad51f512af4b6d0789ab415b5ba1a | 975b2d421d3661e6770b601929d5f11d981d8985 | /msgraph/generated/models/simulation_automation_status.py | 92c255d18fe113a1bab8d5c3c7fd789f10db03ca | [
"MIT"
] | permissive | microsoftgraph/msgraph-sdk-python | a7c551b85daadeebf76ec4ae12668664ea639b42 | 27de7ccbe688d7614b2f6bde0fdbcda4bc5cc949 | refs/heads/main | 2023-09-03T21:45:27.989672 | 2023-08-31T06:22:18 | 2023-08-31T06:22:18 | 534,665,999 | 135 | 18 | MIT | 2023-09-14T11:04:11 | 2022-09-09T14:00:17 | Python | UTF-8 | Python | false | false | 247 | py | from enum import Enum
class SimulationAutomationStatus(str, Enum):
Unknown = "unknown",
Draft = "draft",
NotRunning = "notRunning",
Running = "running",
Completed = "completed",
UnknownFutureValue = "unknownFutureValue",
| [
"GraphTooling@service.microsoft.com"
] | GraphTooling@service.microsoft.com |
d8721c5cbeafc2e9c1c1252860e2f8b37f17a391 | c2b0ee4ef8fb8e933966c7219a6cac6484ce03fb | /lib/python3.7/site-packages/storages/backends/apache_libcloud.py | ccbab93fa76a916cf01260f9bb1f3a9b98d4e080 | [
"MIT"
] | permissive | dukuaris/Django | 0b40e79d9e461c28064a83cc42d7710b49b43a19 | d34f3e3f09028511e96b99cae7faa1b46458eed1 | refs/heads/master | 2022-12-09T04:05:09.329256 | 2020-03-21T02:17:20 | 2020-03-21T02:17:20 | 236,935,131 | 0 | 0 | MIT | 2022-12-08T01:51:39 | 2020-01-29T08:24:36 | Python | UTF-8 | Python | false | false | 7,203 | py | # Django storage using libcloud providers
# Aymeric Barantal (mric at chamal.fr) 2011
#
import io
import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.files.base import File
from django.core.files.storage import Storage
from django.utils.deconstruct import... | [
"dukuaris@gmail.com"
] | dukuaris@gmail.com |
f0a4547e6a232f3f11bd3512475eab4acf560898 | 4c3e2557044884be630d3c6c47c3e446f951c681 | /Contest/ABC213/D.py | c9d5a6af81fab8ec26f50fef91b0b88fb51d270e | [] | no_license | monda00/AtCoder | 01bdf89338c22f1792fde7f85728e01d97e5fd34 | abf947f2cdfe87486ad8935ba078918d4809573a | refs/heads/master | 2021-11-10T00:54:01.144582 | 2021-11-07T13:24:03 | 2021-11-07T13:24:03 | 186,128,070 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 398 | py | import sys
sys.setrecursionlimit(300000)
n = int(input())
G = [[] for _ in range(n+1)]
for _ in range(n-1):
a, b = map(int, input().split())
G[a].append(b)
G[b].append(a)
for i in range(n+1):
G[i].sort()
ans = []
def dfs(crr, pre):
ans.append(crr)
for nxt in G[crr]:
if nxt != pre:
... | [
"monda0524@gmail.com"
] | monda0524@gmail.com |
bedd5181a1ba501bba3b0ec97635bac44371d927 | e23a4f57ce5474d468258e5e63b9e23fb6011188 | /070_oop/007_exceptions/_exercises/templates/GoCongr/019_Trapping Constraints but Not Errors.py | c7877049499a055c7aded2725d5c48260e4f679e | [] | no_license | syurskyi/Python_Topics | 52851ecce000cb751a3b986408efe32f0b4c0835 | be331826b490b73f0a176e6abed86ef68ff2dd2b | refs/heads/master | 2023-06-08T19:29:16.214395 | 2023-05-29T17:09:11 | 2023-05-29T17:09:11 | 220,583,118 | 3 | 2 | null | 2023-02-16T03:08:10 | 2019-11-09T02:58:47 | Python | UTF-8 | Python | false | false | 261 | py | # # Trapping Constraints but Not Errors
# ___ f x
# a.. x < 0, 'x must be negative'
# r___ x ** 2
#
# f(1) # error
#
# ___ reciprocal x
# a.. x != 0 # A useless assert!
# r_ 1 / x # Python checks for zero automatically | [
"sergejyurskyj@yahoo.com"
] | sergejyurskyj@yahoo.com |
1eb144c9a4e3a9f82739a3589ab27584f365abd5 | fa9ede7ec36f30bb7c84a1006cbfaa4339b7b457 | /version1.py | de3d222e841437c0bf7e2b2f3040df482a2dc276 | [] | no_license | pushkargodbole/FlightGearPlotter | b004ce0eef1ac999d9f14eea0fa443e176834f73 | ab99ec50aa307d90fe05d9a2ea680d66dbaf2aee | refs/heads/master | 2021-01-17T14:50:56.509786 | 2013-05-01T00:55:31 | 2013-05-01T00:55:31 | 44,732,098 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,418 | py | #This file uses socket communication to interface with FG and plot the data using pylab plot
from threading import Thread
from pylab import *
from string import strip, split
from time import *
from socket import *
import csv
class storedata(Thread):
def run(self):
host = "localhost"
port = 5500
... | [
"none@none"
] | none@none |
ba46f4574a9026aa0e2c436c325cf9a5acddfd9a | 167c6226bc77c5daaedab007dfdad4377f588ef4 | /python/ql/test/library-tests/PointsTo/new/code/d_globals.py | 72a063b2a75f67e3bb19f2bda666bb531a728045 | [
"MIT",
"LicenseRef-scancode-python-cwi",
"LicenseRef-scancode-other-copyleft",
"GPL-1.0-or-later",
"LicenseRef-scancode-free-unknown",
"Python-2.0"
] | permissive | github/codeql | 1eebb449a34f774db9e881b52cb8f7a1b1a53612 | d109637e2d7ab3b819812eb960c05cb31d9d2168 | refs/heads/main | 2023-08-20T11:32:39.162059 | 2023-08-18T14:33:32 | 2023-08-18T14:33:32 | 143,040,428 | 5,987 | 1,363 | MIT | 2023-09-14T19:36:50 | 2018-07-31T16:35:51 | CodeQL | UTF-8 | Python | false | false | 1,419 | py |
def j():
return tuple, dict
dict
dict = 7
dict
tuple = tuple
tuple
#Global assignment in local scope
g1 = None
def assign_global():
global g1
g1 = 101
return g1 # Cannot be None
#Assignment in local scope, but called from module level
g2 = None
def init():
global g2
g2 = 102
init()
g2 ... | [
"mark@hotpy.org"
] | mark@hotpy.org |
6005b8869165ad3d3159ea1c6b46b400f44fdd8c | 7d8cceea2d82e5069dd1f5f99ae487b07e977a2a | /mqtt_to_redis/app.py | eaf30d272cb8dbf21d238acc4bcab72fa7c56b0f | [] | no_license | thingsroot/user_apps_example | af8e34d6741e4def0327adcc3963880ee5425dfc | 708bdea217f274f27000e50c753bf14d3839c674 | refs/heads/master | 2020-03-29T08:51:11.565486 | 2019-10-18T02:31:55 | 2019-10-18T02:31:55 | 149,729,562 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,149 | py |
from __future__ import unicode_literals
import re
import os
import sys
import json
import redis
import logging
from configparser import ConfigParser
import paho.mqtt.client as mqtt
console_out = logging.StreamHandler(sys.stdout)
console_out.setLevel(logging.DEBUG)
console_err = logging.StreamHandler(sys.stderr)
cons... | [
"dirk@kooiot.com"
] | dirk@kooiot.com |
538eb464d379367267c75e13537743772642c15e | 2509936d814fb6cdd283c2549c518c8dfad9450c | /api/cases/migrations/0027_auto_20200522_0945.py | df345fb09bb3bc3809080ce3634bdf014159b5ae | [
"MIT"
] | permissive | uktrade/lite-api | 19f829119fa96de3f4862eb233845508b0fef7eb | b35792fc981220285ed9a7b3659aba460f1b207a | refs/heads/dev | 2023-08-25T10:11:17.594001 | 2023-08-24T14:24:43 | 2023-08-24T14:24:43 | 172,914,199 | 4 | 3 | MIT | 2023-09-14T17:36:47 | 2019-02-27T12:46:22 | Python | UTF-8 | Python | false | false | 1,350 | py | # Generated by Django 2.2.12 on 2020-05-22 09:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("cases", "0026_case_submitted_by"),
]
operations = [
migrations.AlterField(
model_name="casetype",
name="reference",... | [
"noreply@github.com"
] | uktrade.noreply@github.com |
8e56ea5dfa85279b41b4265d552d820cf2397392 | c1f60f28cbd74a639dc89b22518ae33765267af4 | /foundationsync/setup.py | 8d05fc1483b487c168c522c41a87df11c461aad3 | [
"MIT"
] | permissive | DalavanCloud/indico-plugins-cern | b0a97dbbd7fb4dc272977b121ec92931ee316ad7 | bb67d2fb9e3d24faeeff2b78a5e9bcff52ac5f26 | refs/heads/master | 2020-04-22T08:58:17.025951 | 2019-01-21T14:25:08 | 2019-01-21T14:25:54 | 170,255,750 | 1 | 0 | null | 2019-02-12T05:08:40 | 2019-02-12T05:08:40 | null | UTF-8 | Python | false | false | 998 | py | # This file is part of the CERN Indico plugins.
# Copyright (C) 2014 - 2018 CERN
#
# The CERN Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License; see
# the LICENSE file for more details.
from __future__ import unicode_literals
from setuptools import set... | [
"adrian.moennich@cern.ch"
] | adrian.moennich@cern.ch |
b166dad158b8822a8e6bdf7c8971568c9aa3df98 | f566dfc5ce189d30696b9bf8b7e8bf9b1ef45614 | /Example/TDDDPGExample/StabilizerTwoD/TDDDPG_StabilizerTwoDContinuous.py | 916d38cf04314dd7c1c33c06e6750203b8a36eb7 | [] | no_license | yangyutu/DeepReinforcementLearning-PyTorch | 3dac4ad67fa3a6301d65ca5c63532f2a278e21d7 | 7af59cb883e24429d42a228584cfc96c42f6d35b | refs/heads/master | 2022-08-16T13:46:30.748383 | 2022-07-30T05:47:47 | 2022-07-30T05:47:47 | 169,829,723 | 12 | 6 | null | null | null | null | UTF-8 | Python | false | false | 5,453 | py | from Agents.TDDDPG.TDDDPG import TDDDPGAgent
from Env.CustomEnv.StablizerTwoD import StablizerTwoDContinuous
from utils.netInit import xavier_init
import json
from torch import optim
from copy import deepcopy
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import matplotlib.pyplot as plt
impor... | [
"yangyutu123@gmail.com"
] | yangyutu123@gmail.com |
cbd6b19a6bbb07e66bd88b1d00cc2d3c6b529b71 | 03e3138f99f275d15d41a5c5bfb212f85d64d02e | /source/res/scripts/client/gui/miniclient/contacts.py | f9c766ea0ee384ce251a4bb8eb9d6dff9264828d | [] | no_license | TrenSeP/WorldOfTanks-Decompiled | e428728e7901146d0b599d02c930d70532232a97 | 1faa748acec1b7e435b657fd054ecba23dd72778 | refs/heads/1.4.1 | 2020-04-27T08:07:49.813023 | 2019-03-05T17:37:06 | 2019-03-05T17:37:06 | 174,159,837 | 1 | 0 | null | 2019-03-06T14:33:33 | 2019-03-06T14:24:36 | Python | UTF-8 | Python | false | false | 676 | py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/miniclient/contacts.py
from gui.Scaleform.daapi.settings.views import VIEW_ALIAS
from gui.shared import events, g_eventBus, EVENT_BUS_SCOPE
from helpers import aop
class _CreateSquadAspect(aop.Aspect):
def atCall(self, cd)... | [
"StranikS_Scan@mail.ru"
] | StranikS_Scan@mail.ru |
6e6d6cf4a65dc5d1d8f8ef1da4591bc0514da057 | f69a4729de938512da8016f79e4bc58aff192417 | /test6.py | 0daaf4e724b4f14856107c2a3b94a9b3592d8840 | [] | no_license | FreeFlyXiaoMa/personal_project | 98811995568f76bbef7d9b0d0f05bec94805f3f0 | ad15c417d656e12bfcac084eec476e7e76d78fa2 | refs/heads/master | 2023-02-11T05:11:56.310548 | 2021-01-07T14:15:33 | 2021-01-07T14:15:33 | 322,598,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 462 | py | #!/usr/bin/env python # -*- coding: utf-8 -*-
# @Author : Ma
# @Time : 2021/1/5 17:58
# @File : test6.py
class Apple():
def __repr__(self):
return "苹果"
class Banana():
def __repr__(self):
return "香蕉"
class SimpleFactory():
@staticmethod
def get_gruit(name):
if name... | [
"2429825530@qq.com"
] | 2429825530@qq.com |
83f7ea25ae04b9c66d3b24b1bc84f2e02c1bff5c | 92e3a6424326bf0b83e4823c3abc2c9d1190cf5e | /scripts/icehouse/opt/stack/tempest/tempest/api/compute/admin/test_security_groups.py | 40ae236920705c20a3a73d65de2f31ea11e1dc63 | [
"Apache-2.0"
] | permissive | AnthonyEzeigbo/OpenStackInAction | d6c21cf972ce2b1f58a93a29973534ded965d1ea | ff28cc4ee3c1a8d3bbe477d9d6104d2c6e71bf2e | refs/heads/master | 2023-07-28T05:38:06.120723 | 2020-07-25T15:19:21 | 2020-07-25T15:19:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,134 | py | # Copyright 2013 NTT Data
# 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 appl... | [
"cody@uky.edu"
] | cody@uky.edu |
3275b01b0757bc868e44091fbe6a3bc2654e7d97 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/AlipayOpenSearchboxDowngradePreconsultResponse.py | 01716209b4c570450aa7417705ea343616a00453 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 2,786 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.AccessCheckInfo import AccessCheckInfo
from alipay.aop.api.domain.BrandCertInfo import BrandCertInfo
from alipay.aop.api.domain.SearchBoxAppInfo import SearchBoxAppInfo... | [
"jishupei.jsp@alibaba-inc.com"
] | jishupei.jsp@alibaba-inc.com |
8c1cde682e17c15befb669b1f03ab4f799f0ca35 | 00cb3a46cd318463d2e1d91af56e1d01afc6b983 | /reclab/metrics/setup.py | 9fddacf9eb9f33fca7cc09f0d32bee1c265a55fa | [
"MIT"
] | permissive | tgsmith61591/reclab | 5f5527d9d78a0ed9646011a2a1da5e42a3ad731e | 423c9b5dd6e00def548b5cc29d3eca4dcc8c4a88 | refs/heads/master | 2020-03-30T18:05:36.897435 | 2018-11-08T00:37:10 | 2018-11-08T00:37:10 | 151,483,108 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,083 | py | # -*- coding: utf-8 -*-
import os
import numpy
from numpy.distutils.misc_util import Configuration
from reclab._build_utils import get_blas_info
def configuration(parent_package="", top_path=None):
cblas_libs, blas_info = get_blas_info()
# Use this rather than cblas_libs so we don't fail on Windows
li... | [
"tgsmith61591@gmail.com"
] | tgsmith61591@gmail.com |
5c05020997aad86744f67798e0dc8daf37327b6d | 0794f4cf49de3b72fdff399b1911230a776ca75a | /tests/backends/conftest.py | 613f7b81a3e8bacaa6ff0f54f983c704d0585230 | [
"MIT"
] | permissive | newtonproject/newchain-lib-keys-py | f2240a4c14dfbc41716b2660935be51f6170ac7d | f4bd79b1022a047333cd791143544333aff85cf5 | refs/heads/master | 2022-09-24T05:28:28.030264 | 2022-09-18T14:29:11 | 2022-09-18T14:29:11 | 174,458,539 | 0 | 1 | MIT | 2022-09-18T14:29:12 | 2019-03-08T02:56:44 | Python | UTF-8 | Python | false | false | 3,842 | py | import pytest
from eth_utils import (
decode_hex,
keccak,
)
MSG = b'message'
MSGHASH = keccak(MSG)
# This is a sample of signatures generated with a known-good implementation of the ECDSA
# algorithm, which we use to test our ECC backends. If necessary, it can be generated from scratch
# with the following... | [
"pipermerriam@gmail.com"
] | pipermerriam@gmail.com |
51303d9fe9a121fe0c3a0c7c1cea24cbde19d03f | cca3f6a0accb18760bb134558fea98bb87a74806 | /abc170/A/main.py | 24bdf5522f64ecbc21cfe988cd81c6b5c5b857cd | [] | no_license | Hashizu/atcoder_work | 5ec48cc1147535f8b9d0f0455fd110536d9f27ea | cda1d9ac0fcd56697ee5db93d26602dd8ccee9df | refs/heads/master | 2023-07-15T02:22:31.995451 | 2021-09-03T12:10:57 | 2021-09-03T12:10:57 | 382,987,918 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 619 | py | #!/usr/bin/env python3
import sys
def solve(x: "List[int]"):
for i in range(len(x)):
if x[i] == 0:
print(i+1)
return
return
# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your c... | [
"athenenoctus@gmail.com"
] | athenenoctus@gmail.com |
c888e004adcc49fd95d80b8acd22bdc3453d154d | b0ed67c452f79da72120b185960bf06711695fdd | /for_loop/clever_Lily.py | e74892cb560057dbd786a3aa86f11a5bb257b476 | [] | no_license | NikiDimov/SoftUni-Python-Basics | c0e1ae37867c1cfa264f8a19fdfba68b349df5d3 | f02045578930d03edbbd073995867eabfb171bbc | refs/heads/main | 2023-07-11T01:10:25.612754 | 2021-08-19T10:26:12 | 2021-08-19T10:26:12 | 345,221,145 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 616 | py | age = int(input())
washing_machine_price = float(input())
toy_price = int(input())
def safe_money(age, toy_price):
money = 0
counter = 0
for birthday in range(1, age + 1):
if birthday % 2 == 0:
counter += 1
money += 10*counter-1
else:
money += toy_price
... | [
"niki.dimov86@gmail.com"
] | niki.dimov86@gmail.com |
f3a4069409b3db8256545974736d20c43b9938ef | ad0857eaba945c75e705594a53c40dbdd40467fe | /baekjoon/python/grade.py | f40701442fb4c7e58ba77ac14c5da99841f35bff | [
"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 | 290 | py | # Grade
# https://www.acmicpc.net/problem/9498
score = int(input())
result = ''
if score < 60:
result = 'F'
elif 60 <= score < 70:
result = 'D'
elif 70 <= score < 80:
result = 'C'
elif 80 <= score < 90:
result = 'B'
else:
result = 'A'
print(result)
| [
"yongsung.kang@gmail.com"
] | yongsung.kang@gmail.com |
6814364d59dcaf12920348c9cbd566cb3f9268ed | 4e958672a47409ebafd41704a30de781450f60e5 | /NtForm5/enroll/models.py | f2f516e23579dba98e555a63879ff7721059ab94 | [] | no_license | Nitesh-Singh-5/Understanding-Django-from-scratch | 7f704a2c0101d1e4a535c61a447a4e3775539b52 | b941151bdc2bee555b590f90e4a4c17e2a83db96 | refs/heads/master | 2022-12-28T20:23:03.042537 | 2020-10-13T15:10:55 | 2020-10-13T15:10:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | from django.db import models
# Create your models here.
class User(models.Model):
name=models.CharField(max_length=50)
password=models.CharField( max_length=50)
email=models.EmailField(max_length=254) | [
"67116285+nitesh5801@users.noreply.github.com"
] | 67116285+nitesh5801@users.noreply.github.com |
7babd85454a8e2bec58fc5926ec2482505fb44fb | ec61b57a99d7683a668f4910c9fad4b1c9335525 | /finished/53-maximumSubarray.py | e78beb987e0265416cb1db0da125c666ff430f35 | [] | no_license | savadev/leetcode-2 | 906f467e793b9636965ab340c7753d9fc15bc70a | 20f37130236cc68224082ef056dacd6accb374e3 | refs/heads/master | 2020-12-28T12:54:08.355317 | 2018-08-06T00:44:24 | 2018-08-06T00:44:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 876 | py | class Solution(object):
def maxSubArray(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
if all([x < 0 for x in nums]):
return max(nums)
l = len(nums)
b = [0] * l
for i in range(l):
val = nums[i]
... | [
"nmaswood@cs.uchicago.edu"
] | nmaswood@cs.uchicago.edu |
aa601f15398d031e2284e689bdb89ab4ad82d09d | a99a44aee5cfc5e080f6d83d2bcc1c3d273a3426 | /scripts/qc/check_afos_sources.py | 521ec97bc54d4c2cc9aea5845e64ed0946fccb1c | [
"MIT"
] | permissive | ragesah/iem | 1513929c8bc7f254048271d61b4c4cf27a5731d7 | 8ed970d426bddeaa3e7ded593665d22f0f9f6e87 | refs/heads/main | 2023-08-20T20:01:15.480833 | 2021-10-12T15:44:52 | 2021-10-12T15:44:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,890 | py | """
Look at the sources saved to the AFOS database and then whine about
sources we do not understand!
"""
import sys
import datetime
import pytz
from pyiem.network import Table as NetworkTable
from pyiem.util import get_dbconn, utc, logger
LOG = logger()
pgconn = get_dbconn("afos")
cursor = pgconn.cursor()
cursor2 ... | [
"akrherz@iastate.edu"
] | akrherz@iastate.edu |
ca35abf6daa26f72594d90c4d13e76b76739ac1f | f6703b2afca284bf75e0dbf8f61d77e5251f905c | /euler445.py | 0e3f9ec0bbd0c78fee38e6915e183da0d10c8d7c | [] | no_license | rwieckowski/project-euler-python | 2a7aa73670b4684f076ad819bfc464aa0778f96c | be9a455058b20adfd32c814effd8753cc9d39890 | refs/heads/master | 2021-01-10T21:10:44.875335 | 2015-06-23T13:29:58 | 2015-06-23T13:29:58 | 37,920,684 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 827 | py | """
<P>For every integer ngt1 the family of functions f<sub>nab</sub> is
defined by f<sub>nab</sub><var>x</var>equiva<var>x</var>b mod n for ab
<var>x</var> integer and 0ltaltn 0lebltn 0le<var>x</var>ltn<BR />We
will call f<sub>nab</sub> a <i>retraction</i> if f<sub>nab</sub>f<sub>
nab</sub><var>x</var>equivf<sub>n... | [
"rwieckowski@ivmx.pl"
] | rwieckowski@ivmx.pl |
5048abd346979c31fa2bad6f1ed859ca05094696 | 1cc8604dff9713d3879599f1876a6ea313ebe1fb | /pysc2/lib/memoize.py | 91894b0ec613e49bd815ba54d02e3192b38d5258 | [
"Apache-2.0"
] | permissive | SoyGema/pysc2 | c363ec768ebf94e7b0fa08e136b36b7432ae1b44 | e5de62023ec45ac212016b5404dd73272109d9d4 | refs/heads/master | 2022-02-08T21:41:46.530129 | 2022-01-29T13:11:15 | 2022-01-29T13:11:15 | 143,897,552 | 1 | 0 | Apache-2.0 | 2018-08-07T16:06:23 | 2018-08-07T16:06:22 | null | UTF-8 | Python | false | false | 1,095 | py | # Copyright 2018 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 ... | [
"tewalds@google.com"
] | tewalds@google.com |
a5fb2a518a351640365f63b92e44e08cceae715b | 22a68f6efd44bb8b366669f73b0657a232296665 | /cfme/tests/control/test_bugs.py | fcd7c30ee233a2ef11e15ec79cdf77bf97142ae9 | [] | no_license | richardfontana/cfme_tests | e33261a809d229b515aac2c9ee730a88da9b2510 | 73b3e1b0717b5cb0449157dc5d85e89820b62c57 | refs/heads/master | 2021-01-15T19:24:11.424107 | 2015-09-14T19:00:11 | 2015-09-14T19:00:11 | 42,489,462 | 0 | 0 | null | 2015-09-15T02:16:33 | 2015-09-15T02:16:33 | null | UTF-8 | Python | false | false | 6,226 | py | # -*- coding: utf-8 -*-
import fauxfactory
import pytest
from cfme.control.explorer import PolicyProfile, VMCompliancePolicy, Action, VMControlPolicy
from cfme.infrastructure.virtual_machines import (assign_policy_profiles, get_first_vm_title,
unassign_policy_profiles, Vm)
from utils.log import logger
from utils.p... | [
"mfalesni@redhat.com"
] | mfalesni@redhat.com |
a86582827ffca20f3f6c23a1a6becdb5c8793c40 | 5a6e91490dafa97f0c52a63eff5a39dd16b7122e | /pythontut13.py | 1e38abf421057b0a64475618d4bcd4b572867d4c | [] | no_license | suvimanikandan/PYTHON_PROGRAMS | 968884292ceef502b3f3b6acdea79ce192e933f8 | f4be986232bf1adef05837d67249840965fa50fc | refs/heads/main | 2023-07-15T19:15:06.567198 | 2021-08-24T14:30:08 | 2021-08-24T14:30:08 | 399,495,616 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,499 | py | # VIDEO 13 : Dictionaries
# While lists organize data based on sequential indexes Dictionaries instead use key / value pairs
# A key / value pair could be fName : "Derek" where fName is the key and "Derek" is the value
# Here is some code to help this make sense
# Create a Dictionary about me
swe_dict = {"f_na... | [
"noreply@github.com"
] | suvimanikandan.noreply@github.com |
c92e9dd202a1022d5f5b9724a6a5acc6762c5135 | cb583e6d4b79eca522cd6365f1ef60d2828a941c | /ambry/cli/source_run/zero_deps.py | 794ec38b19ea01ddf05db24b0f6ee6f9851b1f26 | [
"BSD-2-Clause"
] | permissive | mihailignatenko/ambry | c93e8f8d933e700b75530a32f584267cb1e937fa | faea74eee1449896e64d1945f3e814936fe9c276 | refs/heads/master | 2021-01-21T15:58:15.791663 | 2015-05-03T04:53:58 | 2015-05-03T04:53:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 287 | py | """Script for source run to print the umber of dependencies that a source
bundle has."""
def run(args, bundle_dir, bundle):
import sys
# if bundle.is_built:
# return
deps = bundle.metadata.dependencies
if len(deps) == 0:
print bundle.identity.fqname
| [
"eric@clarinova.com"
] | eric@clarinova.com |
e431c4385feb041bc34a7352ac22ced4868b80a1 | aced407b41f6669f69e9eb8bd599260d50c0bd3f | /server/libs/top/api/rest/UmpToolUpdateRequest.py | 715305dddaa4f6beac8ea342190c26bf28a50f2c | [] | no_license | alswl/music_sofa | 42f7d15431f11b97bf67b604cfde0a0e9e3860cc | c4e5425ef6c80c3e57c91ba568f7cbfe63faa378 | refs/heads/master | 2016-09-12T18:37:34.357510 | 2016-05-20T11:49:52 | 2016-05-20T11:49:52 | 58,946,171 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 317 | py | '''
Created by auto_sdk on 2013-11-07 12:53:22
'''
from top.api.base import RestApi
class UmpToolUpdateRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.content = None
self.tool_id = None
def getapiname(self):
return 'taobao.ump.tool.update'
| [
"alswlx@gmail.com"
] | alswlx@gmail.com |
b950977a9d69e7c25f6b702fb9b06ce423d9a44f | 5ede2fe8a1e2b9d468a2151180b39e0d0f1b0e4e | /PyML/.venv/py3/bin/jupyter-migrate | 056bf6e95f435c37e0c606da7053813cf6d5012b | [] | no_license | rupeshsm/PyCode | a4b1b19f1fce1ac8354a7dd31c23cc44416010e8 | 67b47e71802bbe109a65cc373ae01f662c32d228 | refs/heads/master | 2021-01-23T22:06:29.601993 | 2017-02-17T18:19:01 | 2017-02-17T18:19:01 | 83,118,069 | 1 | 0 | null | 2017-02-25T08:29:11 | 2017-02-25T08:29:11 | null | UTF-8 | Python | false | false | 259 | #!/home/achilles/dev/PyCode/PyML/.venv/py3/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from jupyter_core.migrate import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"achillesrasquinha@gmail.com"
] | achillesrasquinha@gmail.com | |
5ddc90304d10e80c46e9195d779dd4bc9411340d | 69930e647aca06cf865f958e952941a410cad46b | /usuario/models.py | 1615cf667ccf7cf125b43604b57749e83a952bae | [] | no_license | GustavoGarciaPereira/trabalho_babrica_de_moveis | 9ce32a76eb4c9c5fed8f1482aa8ce6814b350a96 | d61b6f3ea09b1b2f0c3781cbc67e8e4ed11f7949 | refs/heads/master | 2023-08-14T03:50:48.738174 | 2020-07-03T11:42:21 | 2020-07-03T11:42:21 | 276,883,600 | 0 | 0 | null | 2021-09-22T19:22:24 | 2020-07-03T11:27:51 | Python | UTF-8 | Python | false | false | 1,637 | py | from django.db import models
from django.urls import reverse
# Create your models here.
class Pessoa(models.Model):
nome = models.CharField(name="nome",max_length=30)
tipo = models.CharField(name="tipo",max_length=30)
email = models.EmailField()
senha = models.CharField(name="senha",max_length=30)
... | [
"gusgurtavo@gmail.com"
] | gusgurtavo@gmail.com |
a5daedad2cfef500c84634a501ae8d22bba63646 | 5af97bffa345fee6a0a26cc8e24756b41f83c66c | /actors/world_related/connectors/__init__.py | 1b9293028b76db28cfa5761a24ab2b1825cb8692 | [] | no_license | Myshj/tdoa_multisensor_model | 26620bb687503c6b40ad886a0d666c10a34025d8 | eb2dedd9e3c3918c17177ce9d63355e10d4649dd | refs/heads/master | 2020-07-30T15:39:32.162225 | 2017-03-08T12:01:04 | 2017-03-08T12:01:04 | 73,627,161 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 209 | py | from .Base import Base
from .SensorSupervisorToTDOAGroupSupervisorConnector import SensorSupervisorToTDOAGroupSupervisorConnector
from .SoundSourceToPropagatorConnector import SoundSourceToPropagatorConnector
| [
"donmarin@mail.ru"
] | donmarin@mail.ru |
c1ec71577f4a90958a796d2a31c5c7c8a20ff20d | e18a48bab6bba2bcc7d8b7846f5921f76e2eed85 | /51. N-Queens.py | f0d2fa5aa2eef63a990cbc7f1de8bc8817fd8d0c | [] | no_license | shivasupraj/LeetCode | 384a2c5a857b1ccb952f8410675c5500e630a766 | 834de770fb2a60dea468238611fca9389e3a1e96 | refs/heads/master | 2021-06-27T11:49:16.452450 | 2019-06-05T03:32:44 | 2019-06-05T03:32:44 | 113,106,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,398 | py | class Solution(object):
def solveNQueens(self, n):
"""
:type n: int
:rtype: List[List[str]]
"""
def solveNQueensHelper(matrix, index):
#print(matrix, index)
if index == -1:
strs = getStrsFromMatrix(matrix)
res.append(str... | [
"noreply@github.com"
] | shivasupraj.noreply@github.com |
c77f17c90c2e269b76573233eba64697c0f2bdea | bf62bdb3f2991ee000c056246bf08e5797154561 | /docs/conf.py | 2750230ed2fed90e8ddce80a431b159a834b42ea | [
"MIT"
] | permissive | wlc123456/fsmlite | ec0e9f5c800a4301fb5e23c35885b67064295190 | d785362578a9cb28eda50f664d7ea866b29c8606 | refs/heads/master | 2023-06-21T06:32:46.883165 | 2021-08-02T20:07:44 | 2021-08-02T20:07:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,631 | py | import os
def get_version(filename):
from re import findall
with open(filename) as f:
versions = dict(findall(r'AC_INIT\(\[(.*?)\],\s*\[(.*?)\].*\)', f.read()))
return versions['fsmlite']
# https://github.com/rtfd/readthedocs.org/issues/388
if os.environ.get('READTHEDOCS', None) == 'True':
from... | [
"tkemmer@computer.org"
] | tkemmer@computer.org |
4c6488ab6aa55d852b4537853720c95c261c80b6 | 9f2445e9a00cc34eebcf3d3f60124d0388dcb613 | /2019-08-19-GHKinMOOSE/somasimp_MOOSE_ghk.py | c0f301e8c05d263532c28fee43c2de51ded85a5e | [] | no_license | analkumar2/Thesis-work | 7ee916d71f04a60afbd117325df588908518b7d2 | 75905427c2a78a101b4eed2c27a955867c04465c | refs/heads/master | 2022-01-02T02:33:35.864896 | 2021-12-18T03:34:04 | 2021-12-18T03:34:04 | 201,130,673 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | # exec(open('somasimp_MOOSE_ghk.py').read())
import moose
import numpy as np
import matplotlib.pyplot as plt
import rdesigneur as rd
try:
# [moose.delete(x) for x in ['/model', '/library']]
[moose.delete(x) for x in ['/model']]
except:
pass
ChP = 'simplechan_ghk'
F = 96485.3329
sm_diam = 500e-6
sm_len =... | [
"analkumar2@gmail.com"
] | analkumar2@gmail.com |
53ec99187d84b613f4bf21c21ebb1ab6f074405a | 1fe0b680ce53bb3bb9078356ea2b25e572d9cfdc | /venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_webfilter_ips_urlfilter_setting.py | d05b42141aabf1983b8f58f7b7a06b67fc4c0d44 | [
"MIT"
] | permissive | otus-devops-2019-02/devopscourses_infra | 1929c4a9eace3fdb0eb118bf216f3385fc0cdb1c | e42e5deafce395af869084ede245fc6cff6d0b2c | refs/heads/master | 2020-04-29T02:41:49.985889 | 2019-05-21T06:35:19 | 2019-05-21T06:35:19 | 175,780,457 | 0 | 1 | MIT | 2019-05-21T06:35:20 | 2019-03-15T08:35:54 | HCL | UTF-8 | Python | false | false | 7,628 | py | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2018 Fortinet, Inc.
#
# 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 3 of the Lic... | [
"skydevapp@gmail.com"
] | skydevapp@gmail.com |
f331c316f8a15c4b36891d58db96e4389d96c074 | daaf7e8ff13844ab31ce774029377d1cbfe21e26 | /Month 02/Week 01/Day 05/c.py | eecfb554f86114eafbd5c3875d304aafb081b5ba | [
"MIT"
] | permissive | KevinKnott/Coding-Review | 7ae370937879179b0daec3ebd91525dc89c498e9 | 6a83cb798cc317d1e4357ac6b2b1fbf76fa034fb | refs/heads/main | 2023-07-18T09:07:53.100342 | 2021-09-03T23:26:55 | 2021-09-03T23:26:55 | 373,020,791 | 0 | 0 | MIT | 2021-09-03T23:26:56 | 2021-06-02T02:51:12 | Python | UTF-8 | Python | false | false | 3,044 | py | # First Missing Positive: https://leetcode.com/problems/first-missing-positive/
# Given an unsorted integer array nums, find the smallest missing positive integer.
# You must implement an algorithm that runs in O(n) time and uses constant extra space.
# The brute force of this is to look through all of nums for each... | [
"KKnoTT93@gmail.com"
] | KKnoTT93@gmail.com |
89034088048e3eb1ec1128d148ff89ec503144b2 | ab397ff967a4ea0c0bf3b1ab286556071115b197 | /Analysis/checker_files.py | 0eebcdc0b01247c60b8074c9d3125d02d14fec68 | [] | no_license | GihanMora/Accelerometer_podiatry_gihan | 404d9db9da618259de1c484f6783e8b4c7bf8f23 | e2164574593159a89465e8d23c838fd9c7ed758a | refs/heads/master | 2023-01-29T02:22:56.692869 | 2020-12-08T05:25:49 | 2020-12-08T05:25:49 | 317,770,532 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 739 | py | import os
root_folder = 'E:/Data/Accelerometer_Dataset_Rashmika/Podiatry Data/'
pred_root = 'E:/Data/Accelerometer_Dataset_Rashmika/Podiatry Data/Predictions/'
data_dict = {}
for i in range(1,24):
if(i==4):continue
f_path = os.path.join(root_folder,str(i))
file_list = os.listdir(f_path)
d_file_path = ... | [
"gihangamage.15@cse.mrt.ac.lk"
] | gihangamage.15@cse.mrt.ac.lk |
1c332b2db8cfb4a7bffc0f933f0c234f05ffc3ac | 99bfa15723593ea351191d82fac80e36ab25aab1 | /CP/Stack/Stock_Span.py | c2e5316c58512b0747c2d1f1b6bc799e57488071 | [] | no_license | Kartavya-verma/Python-Projects | f23739ef29eab67a8e25569e3f7bf110e42576cb | 02ffe926a7ed82bc783e4c4034a2fa53d4d1a870 | refs/heads/master | 2023-06-22T07:59:39.595084 | 2021-07-18T15:51:55 | 2021-07-18T15:51:55 | 387,139,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 530 | py | l = [100, 80, 60, 70, 60, 75, 85]
# op = [1, 1, 1, 2, 1, 4, 6]
st = []
res = []
for i in range(len(l)):
if len(st) == 0:
res.append(-1)
elif len(st) > 0 and st[-1][0] > l[i]:
res.append(st[-1][1])
elif len(st) > 0 and st[-1][0] <= l[i]:
while len(st) > 0 and st[-1][0] <= l[i]:
... | [
"vermakartavya2000@gmail.com"
] | vermakartavya2000@gmail.com |
a0dcbf8c261c18e893a3f65fd7dc1ee8185ade11 | db09f9fc5729eec823ee859fd9bac7461cce60f5 | /src/conf/urls.py | 6a3f40afd62d8a5d11e124316170f6c28da813d4 | [] | no_license | cephey/rent | 9323ca42ea3a8d34bf1ea4b6ffaf0386782d19a3 | 7eabae2f0df8756a05553df3b8e3b072459dcb51 | refs/heads/master | 2016-09-10T10:16:19.420888 | 2014-10-12T20:02:34 | 2014-10-12T20:02:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 625 | py | #coding:utf-8
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.conf import settings
urlpatterns = patterns(
'',
url(r'^api/', include('api.urls')),
url(r'', include('pages.urls', namespace='pages')),
url(r'^us... | [
"andrey.ptitsyn86@gmail.com"
] | andrey.ptitsyn86@gmail.com |
af3df78cdc812556d8b6fdf80fefcf41787f4be5 | 6cdab6432f37471f1c7ce74f461568accf04aa85 | /dev/a_import.py | 1d8cbb6f3b631ea3b1a2a93d0a340d0734922eaa | [
"Apache-2.0"
] | permissive | exaxorg/Kaggle-CORD19-data-parser | 71709d549f2be108b0737d252547ad94f9b3dcb4 | bf78daee155645aa3dd7f58dc9dcc2f55cdc0092 | refs/heads/master | 2022-04-25T04:09:27.114630 | 2020-03-30T19:17:48 | 2020-04-29T20:29:15 | 258,124,864 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,346 | py | from json import loads
from glob import glob
from os.path import join
options = dict(directory='')
datasets = ('previous',)
def parse(data):
# "data" is a dict corresponding to each file's json-data.
sha = data['paper_id']
title = data['metadata']['title']
abstract = data.get('abstract', ())
if abstract:
# ... | [
"anders@berkeman.org"
] | anders@berkeman.org |
e3b79ede83977fda5769cf4b0b28fd40d04f1465 | bf0d0b123c1a42a1db5b174ceac9d10d8f63d923 | /10.py | a4de318300bcee1d2f23e0175e39ed32623e8043 | [] | no_license | 1751660300/lanqiaobei | 30fd047a788288b85499f4ee754d60333cb5bb51 | 4f83f2cb5a15e0af3c220aae62a821b7fbfd2e1f | refs/heads/master | 2022-12-31T13:41:41.637481 | 2020-10-16T13:30:38 | 2020-10-16T13:30:38 | 304,635,783 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,661 | py | # -*- coding:utf-8 -*-
# 问题描述
# 小明和朋友们一起去郊外植树,他们带了一些在自己实验室精心研究出的小树苗。
# 小明和朋友们一共有 n 个人,他们经过精心挑选,在一块空地上每个人挑选了一个适合植树的位置,总共 n 个。他们准备把自己带的树苗都植下去。
# 然而,他们遇到了一个困难:有的树苗比较大,而有的位置挨太近,导致两棵树植下去后会撞在一起。
# 他们将树看成一个圆,圆心在他们找的位置上。如果两棵树对应的圆相交,这两棵树就不适合同时植下(相切不受影响),称为两棵树冲突。
# 小明和朋友们决定先合计合计,只将其中的一部分树植下去,保证没有互相冲突的树。他们同时希望这些树所能覆盖的面积... | [
"1751660300@qq.com"
] | 1751660300@qq.com |
d77f4e135813dcb4ab39913514dd69377bc0b9ec | c1bed5203d73a077ff83b96cc6fe71a3fce734e7 | /python/pe817.py | f824512558711e81ca12042c4c1cd4502f4a4be2 | [] | no_license | arknave/project-euler | 41006e571e24d8aa077247bdb806be3ba8818c40 | 647783721d4d019c41ec844500069baeab6d8a44 | refs/heads/master | 2022-12-23T06:36:14.647022 | 2022-12-14T23:20:49 | 2022-12-14T23:20:49 | 19,319,963 | 0 | 1 | null | 2015-05-21T06:42:41 | 2014-04-30T16:28:50 | Python | UTF-8 | Python | false | false | 1,479 | py | from math import isqrt
def digits(x, b):
while x > 0:
yield x % b
x //= b
def solve(b, d):
# find a small x such that x^2 has d as a digit in base b
# units digit: solve x^2 = d (mod b)
# every other digit: solve floor(x^2 / b^i) = aM + d for increasing a, i
# Theory: only have to... | [
"arnavsastry@gmail.com"
] | arnavsastry@gmail.com |
4742ec7b9ab060fc24f0884102ef783e8649474f | 65dce36be9eb2078def7434455bdb41e4fc37394 | /Topological Sorting.py | 921b932601ff357adecdcf18529150d2675a7752 | [] | 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,357 | py | '''
Given an directed graph, a topological order of the graph nodes is defined as follow:
For each directed edge A -> B in graph, A must before B in the order list.
The first node in the order can be any node in the graph with no nodes direct to it.
Find any topological order for the given graph.
'''
# Definition for... | [
"yiyun.tan@uconn.edu"
] | yiyun.tan@uconn.edu |
9990ac14503554e7dfba877b9302e17cb6a15d18 | aa480d8b09dd7ad92c37c816ebcace24a35eb34c | /5/305.岛屿数量-ii.py | 69c314ac62e7c60b139ff01357ff1cb290dbbee6 | [] | no_license | SR2k/leetcode | 7e701a0e99f9f05b21216f36d2f5ac07a079b97f | de131226159865dcb7b67e49a58d2ddc3f0a82c7 | refs/heads/master | 2023-03-18T03:37:02.916453 | 2022-09-16T01:28:13 | 2022-09-16T01:28:13 | 182,083,445 | 0 | 0 | null | 2023-03-08T05:44:26 | 2019-04-18T12:27:12 | Python | UTF-8 | Python | false | false | 3,363 | py | #
# @lc app=leetcode.cn id=305 lang=python3
#
# [305] 岛屿数量 II
#
# https://leetcode.cn/problems/number-of-islands-ii/description/
#
# algorithms
# Hard (40.90%)
# Likes: 129
# Dislikes: 0
# Total Accepted: 6.4K
# Total Submissions: 15.6K
# Testcase Example: '3\n3\n[[0,0],[0,1],[1,2],[2,1]]'
#
# 给你一个大小为 m x n 的二进制... | [
"luozhou.csy@alibaba-inc.com"
] | luozhou.csy@alibaba-inc.com |
1623d3fbdd87faa2a862b7d957d42eaf13032d77 | 464338d9556cf9892a4647ab1b94dd9d2879274d | /ohealth/ohealth_hospital_unit/ohealth_hospital_unit.py | 4ef944070d5a58afd98081ca967b21ab42611a0e | [] | no_license | linzheyuan/O-health | 5199637de8343508c5fe2d8e611a394cf39d1673 | eab3fc74ee7b878dbcc8234597de053de9d9e608 | refs/heads/master | 2021-01-24T21:36:14.068894 | 2013-07-07T12:34:28 | 2013-07-07T12:34:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,583 | py | # -*- coding: utf-8 -*-
#/#############################################################################
#
# HITSF
#
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | [
"rizabisnis@gmail.com"
] | rizabisnis@gmail.com |
ad89fbcf188dc5000de65e2e77c87eac31f4c8e9 | 814a896307bc2b99ec20d0800cb106280fb1b303 | /venv/lib/python3.6/site-packages/pyquickhelper/__init__.py | b38ca337518389f3a4cc1084900555517420ce55 | [] | no_license | mahagala/HecHms | ae0d4bedfcba33bc7e70eeefadcbd5361a00bd73 | 47521f9cd8dc0f2a51bb6e2660f67a81b3634b16 | refs/heads/master | 2021-09-20T04:16:23.691577 | 2018-08-03T12:46:38 | 2018-08-03T12:46:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,802 | py | # -*- coding: utf-8 -*-
"""
@file
@brief Module *pyquickhelper*.
Helpers to produce documentation, test notebooks, walk through files,
sphinx extension, jenkins helpers...
"""
__version__ = "1.8"
__author__ = "Xavier Dupré"
__github__ = "https://github.com/sdpython/pyquickhelper"
__url__ = "http://www.xavie... | [
"hasithadkr7@gmail.com"
] | hasithadkr7@gmail.com |
94f892fb826285f19d4096ae7534ca287cd81c34 | 26d6c34df00a229dc85ad7326de6cb5672be7acc | /msgraph-cli-extensions/beta/usersfunctions_beta/azext_usersfunctions_beta/vendored_sdks/usersfunctions/aio/operations/_users_mail_folders_child_folders_operations.py | 3c57de2889bfbd96a7a2045bf0eee4a11d50f55d | [
"MIT"
] | permissive | BrianTJackett/msgraph-cli | 87f92471f68f85e44872939d876b9ff5f0ae6b2c | 78a4b1c73a23b85c070fed2fbca93758733f620e | refs/heads/main | 2023-06-23T21:31:53.306655 | 2021-07-09T07:58:56 | 2021-07-09T07:58:56 | 386,993,555 | 0 | 0 | NOASSERTION | 2021-07-17T16:56:05 | 2021-07-17T16:56:05 | null | UTF-8 | Python | false | false | 4,332 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"japhethobalak@gmail.com"
] | japhethobalak@gmail.com |
e6b0f5c7362a6bbaded744a6dfcf4a06283bb1a3 | 4c5ba474931fdb0a010229538cc92c121f5d01fa | /etc_graph/topology_sort.py | 2c5529a16f82577d25f544274d36b47fd8b81289 | [] | no_license | jeeHwon/Algorithm | f3d1569ec8e2c68810dee7915e9b50f4ebfb7f03 | 2ac3696b8cb5a987bbfbf5ad92433de94b172b25 | refs/heads/master | 2023-03-21T10:33:08.599024 | 2021-03-06T12:05:03 | 2021-03-06T12:05:03 | 335,676,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,099 | py | # 위상정렬(Topology Sort)
# 사이클이 없는 방향 그래프(DAG)의 모든 노드를 방향성에 거스르지 않도록 순서대로 나열 의미
# 집입차수(Indegree) : 특정한 노드로 들어오는 간선의 개수
# 진출차수(Outdegree) : 특정한 노드에서 나가는 간선의 개수
# 큐를 이용하여 구현 가능 (스택도 가능)
# 예시) 선수과목을 고려한 학습 순서 설정
# 여러가지 답 존재 가능, 모든 원소 방문 전 큐가 빈다면 사이크 존재한다고 판단가능
# 위상 정렬 위해 차례로 모든 노드를 확인하고, 각 노드에서 나가는 간선을 차례로 제거
# 따라서 시간 복잡도 =>... | [
"jeehwon01@gmail.com"
] | jeehwon01@gmail.com |
2c53ed866dd566ad80cb5b2273903ac2a2e579ec | e2f507e0b434120e7f5d4f717540e5df2b1816da | /083-echo-try.py | dae2f22e522765dc20e3b59235b6cc283d637ab3 | [] | no_license | ash/amazing_python3 | 70984bd32ae325380382b1fe692c4b359ef23395 | 64c98940f8a8da18a8bf56f65cc8c8e09bd00e0c | refs/heads/master | 2021-06-23T14:59:37.005280 | 2021-01-21T06:56:33 | 2021-01-21T06:56:33 | 182,626,874 | 76 | 25 | null | null | null | null | UTF-8 | Python | false | false | 208 | py | # A simple "echo"
# program
while True:
try:
s = input()
print(s)
except:
break
# Now the program will
# simply stop after
# the end of input
| [
"andy@shitov.ru"
] | andy@shitov.ru |
21d43124852a540b2762bea05fac82cfa6f4f1dc | b5a6f10c886fba6584d2ac7b4a29c69975826dbb | /clients/python/test/test_constant_offer_filter_constant.py | 42b5144b273f936acdaf83f591d17f4b9965139d | [] | no_license | Patagona/pricemonitor-clients | 8c4f842ca3d4e459c77ac329ad488cb3e4c858bf | cf2d689bf9ed6ddea9501324cada918c3a88b4f8 | refs/heads/master | 2023-08-31T20:12:58.844253 | 2023-08-31T15:26:25 | 2023-08-31T15:26:25 | 279,618,794 | 1 | 1 | null | 2023-07-03T13:55:28 | 2020-07-14T15:09:38 | Python | UTF-8 | Python | false | false | 1,601 | py | # coding: utf-8
"""
Pricemonitor API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 0.0.6561
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import... | [
"jenkins@patagona.de"
] | jenkins@patagona.de |
cc48d3eb0c09c41a15f8a80ca313c4422069c678 | d98883fe1007111b8795ac5661e56758eca3b62e | /google-cloud-sdk/lib/surface/bigtable/app_profiles/update.py | 53b1e31c063dde9b7875f2512491bd5026cbb0c8 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | pyDeb/KindnessCafe | 7303464e3c0693b0586a4a32740d8b9b19299caf | 6ff8dfe338aefd986edf67c382aff1a2920945d1 | refs/heads/master | 2022-12-29T16:16:35.796387 | 2021-04-19T00:03:14 | 2021-04-19T00:03:14 | 243,533,146 | 3 | 4 | null | 2022-12-08T09:48:09 | 2020-02-27T14:01:16 | Python | UTF-8 | Python | false | false | 2,595 | py | # -*- coding: utf-8 -*- #
# Copyright 2018 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | [
"zeus@localhost.localdomain"
] | zeus@localhost.localdomain |
516b7c00610a5542350c77943a7641dc3dd1fd04 | ea99544eef7572b194c2d3607fa7121cb1e45872 | /apps/report/migrations/0007_auto_20190408_0925.py | 117f656259e0e66f51eb509aad072678f43a5625 | [] | no_license | ash018/FFTracker | 4ab55d504a9d8ba9e541a8b682bc821f112a0866 | 11be165f85cda0ffe7a237d011de562d3dc64135 | refs/heads/master | 2022-12-02T15:04:58.543382 | 2019-10-05T12:54:27 | 2019-10-05T12:54:27 | 212,999,035 | 0 | 0 | null | 2022-11-22T03:58:29 | 2019-10-05T12:53:26 | Python | UTF-8 | Python | false | false | 770 | py | # Generated by Django 2.2 on 2019-04-08 09:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('report', '0006_auto_20190408_0646'),
]
operations = [
migrations.AlterField(
model_name='attendanceindividual',
name='... | [
"sadatakash018@gmail.com"
] | sadatakash018@gmail.com |
450246d63f312e11688d6d87ed06ce3a267602e8 | 3fdc6c7e280f31629a2bbf5f1e850786415e480c | /browser.py | fbc04bf55445e646429b701590988a4939afbb03 | [] | no_license | jmg/simple-web-browser | 970470957138922eb52d1cde2819f175f5d90eb3 | a3c8c55701cf7822149ceb7d6c5b686c9f8627fb | refs/heads/master | 2021-01-10T18:57:48.433231 | 2011-11-22T02:07:07 | 2011-11-22T02:07:07 | 2,399,458 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,299 | py | from PyQt4 import QtCore, QtWebKit
from baseBrowser import BaseBrowser, BaseBrowserTab
from config import DEFAULTS
class Browser(BaseBrowser):
"""
A Browser representation
This class overrides all the methods of the
base class.
"""
def __init__(self):
self.default_url = DE... | [
"jmg.utn@gmail.com"
] | jmg.utn@gmail.com |
343405fb1a09d6270a46f3f31a045a175b213b87 | d57b51ec207002e333b8655a8f5832ed143aa28c | /.history/1/test_20200606190302.py | 6ac7d1e8d3f7dff5414a65aed718dfe59f0e1101 | [] | no_license | yevheniir/python_course_2020 | b42766c4278a08b8b79fec77e036a1b987accf51 | a152d400ab4f45d9d98d8ad8b2560d6f0b408c0b | refs/heads/master | 2022-11-15T07:13:24.193173 | 2020-07-11T15:43:26 | 2020-07-11T15:43:26 | 278,890,802 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 795 | py | import os
import json
people = ['rfdfdf']
with open(os.path.dirname(os.path.realpath(__file__)) + "/save.json", 'r') as file:
people = json.load(file)
while True:
msg = input().encode('ascii')
if msg == "stop":
break
elif msg == "show all":
print(people)
else:
name = ... | [
"yevheniira@intelink-ua.com"
] | yevheniira@intelink-ua.com |
1f97ec440ba6c6a279915b778e547ad93602ac7e | 2b3bbfc742ad6a2529f2906193c3c5263ebd5fac | /tools/crc/crc_init.py | 35cab0578bc55530478de02b4d2b2470886733f6 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | permissive | foxBMS/foxbms-2 | 35502ef8441dfc7374fd6c0839e7f5328a5bda8f | 9eb6d1c44e63e43e62bbf6983b2e618fb6ad02cc | refs/heads/master | 2023-05-22T05:30:25.862475 | 2023-02-23T15:03:35 | 2023-02-24T15:04:15 | 353,751,476 | 151 | 80 | NOASSERTION | 2023-09-01T09:59:30 | 2021-04-01T15:52:24 | C | UTF-8 | Python | false | false | 5,199 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010 - 2023, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provid... | [
"info@foxbms.org"
] | info@foxbms.org |
ff7aa44906bb0f492c773e8be7365b2fd77bfd3b | 7136e5242793b620fa12e9bd15bf4d8aeb0bfe7a | /examples/adspygoogle/dfp/v201103/update_custom_targeting_values.py | d97cfc120d9432381cb5eec1c4073a5401b8ac01 | [
"Apache-2.0"
] | permissive | hockeyprincess/google-api-dfp-python | 534519695ffd26341204eedda7a8b50648f12ea9 | efa82a8d85cbdc90f030db9d168790c55bd8b12a | refs/heads/master | 2021-01-10T10:01:09.445419 | 2011-04-14T18:25:38 | 2011-04-14T18:25:38 | 52,676,942 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,585 | py | #!/usr/bin/python
#
# Copyright 2011 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... | [
"api.sgrinberg@7990c6e4-1bfd-11df-85e6-9b4bd7dd5138"
] | api.sgrinberg@7990c6e4-1bfd-11df-85e6-9b4bd7dd5138 |
55684fdb0228754c5b0c83f161cec75a2780a7c8 | d569476dd95496339c34b231621ff1f5dfd7fe49 | /PyTest/SteamSender/tests/PageObject/SteamActions.py | ef758dc5bfc9407871b3bb268f525393268eeabf | [] | no_license | monteua/Tests | 10f21f9bae027ce1763c73e2ea7edaf436140eae | 553e5f644466683046ea180422727ccb37967b98 | refs/heads/master | 2021-01-23T10:28:49.654273 | 2018-05-09T09:11:30 | 2018-05-09T09:11:30 | 93,061,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,207 | py | from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
class SteamHome(object):
def __init__(self, driver):
self.driver = driver
def open_browser(self):
self.driver.g... | [
"arximed.monte@gmail.com"
] | arximed.monte@gmail.com |
8e31ff5084ea5f8bf5777a184c508e97ccd22cac | 2da6133f3cd5c5fc19355292d60253b8c0dbcd49 | /.history/antz/models_20200403232602.py | e82e48acaad35fce9f5ead09f86c2ffb0b256759 | [] | no_license | mirfarzam/python-advance-jadi-maktabkhooneh | b24f5c03ab88e3b12c166a439b925af92f50de49 | d9bcecae73fd992f1290c6fd76761683bb512825 | refs/heads/master | 2021-05-25T21:33:37.782734 | 2020-04-07T22:39:28 | 2020-04-07T22:39:28 | 253,927,960 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 484 | py | from django.db import models
class CardBrand(models.Model):
name = models.charField(max_length=128)
class CarModel(models.Model):
name = models.charField(max_length=128)
brand = models.ForeignKey(CarBrand, on_delete = models.CASCADE)
class Car(models.Model):
name = models.charField(max_length=255... | [
"farzam.mirmoeini@gmail.com"
] | farzam.mirmoeini@gmail.com |
4105ca931275e881465db1fab1190e4b1ed38288 | 3e5150447a2c90c26354500f1df9660ef35c990b | /filesystem/delete.py | 9dc80d9ebca76b9e647f7e8d1bf7799d70ed8c7c | [] | no_license | kilirobbs/python-fiddle | 8d6417ebff9d6530e713b6724f8416da86c24c65 | 9c2f320bd2391433288cd4971c2993f1dd5ff464 | refs/heads/master | 2016-09-11T03:56:39.808358 | 2013-03-19T19:26:19 | 2013-03-19T19:26:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 136 | py | from os import remove
from shutil import rmtree
#remove(filename)
folder="/Users/nordmenss/git/GISTS/4050474/.git/hooks"
rmtree(folder) | [
"cancerhermit@gmail.com"
] | cancerhermit@gmail.com |
82e3ddab0c74beb14332a162cfc09b3f38772cca | d5c6af12520a0f125c3f12b5f4da8a47492b7dc0 | /mathematics/find_the_point.py | e028c70e5952ce5807f60ee56c50267d9cd9b977 | [] | no_license | LubosKolouch/hackerrank | 4e0a2a5ff1309152c6515732f408ee1434712bff | 21de03b0638277108c250c2971fbd3e5b69cf454 | refs/heads/master | 2022-12-24T06:42:13.411394 | 2020-10-04T14:52:04 | 2020-10-04T14:52:04 | 266,756,024 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 160 | py | """ https://www.hackerrank.com/challenges/find-point/ """
def findPoint(px, py, qx, qy):
#
# Write your code here.
#
return 2*qx-px, 2*qy-py
| [
"lubos@kolouch.net"
] | lubos@kolouch.net |
6fcd455d0ae546f2a8441ff6cdb63c295ed32199 | 399dae0b5ad9ca27cde175d25b5435958674eb50 | /System/Run PowerShell Script/run-powershell-script.py | 276874c0fa446e1832bd4e3f0f779886e8c565e6 | [] | no_license | kannanch/pythonscripts | 61e3ea9e8ebf6a6b0ec2a4a829664e4507b803ba | 843a522236f9c2cc2aadc68d504c71bb72600bd9 | refs/heads/master | 2020-06-12T11:18:00.404673 | 2019-06-28T11:24:37 | 2019-06-28T11:24:37 | 194,282,297 | 1 | 0 | null | 2019-06-28T13:55:56 | 2019-06-28T13:55:56 | null | UTF-8 | Python | false | false | 1,655 | py | ps_content=r'''
function Get-Uptime {
Param(
$ComputerName = $env:COMPUTERNAME)
if ($lastBootUpTime = (Get-WmiObject win32_operatingsystem -ComputerName $ComputerName| select @{LABEL='LastBootUpTime';EXPRESSION={$_.ConverttoDateTime($_.lastbootuptime)}}).LastBootUpTime) {
(Get-Date) - $lastBootUpTime
} else {
... | [
"noreply@github.com"
] | kannanch.noreply@github.com |
0964e9a5dbb4533d4abfd265dd6d8ba7144e2691 | 48323c491536a1190f6287161f61230eb0232dfe | /Leetcode/NextPermutation.py | abb8d7755bb53bab4b5faa5ac26972801f8ed397 | [] | no_license | cgxabc/Online-Judge-Programming-Exercise | d8249846eaf1a7f6f228aeae5adcee6d90dfcce6 | 724f514e7dc7774f2df5eecf90ef2a678b233a29 | refs/heads/master | 2021-04-28T13:27:42.239709 | 2018-02-19T18:51:05 | 2018-02-19T18:51:05 | 122,104,657 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,380 | py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Sun Dec 17 15:05:43 2017
@author: apple
"""
"""
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.
If such arrangement is not possible, it must rearrange it as the lowest possible order (ie... | [
"noreply@github.com"
] | cgxabc.noreply@github.com |
f585be332ad48617e79e279f22f8d8d6ec1fe263 | 6f05f7d5a67b6bb87956a22b988067ec772ba966 | /data/train/python/90ec77532048b6bf469559849d5ca80cd4e54f69action_controller.py | 7d45544d8058f62ec577713a798563d315ed7df2 | [
"MIT"
] | permissive | harshp8l/deep-learning-lang-detection | 93b6d24a38081597c610ecf9b1f3b92c7d669be5 | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | refs/heads/master | 2020-04-07T18:07:00.697994 | 2018-11-29T23:21:23 | 2018-11-29T23:21:23 | 158,597,498 | 0 | 0 | MIT | 2018-11-21T19:36:42 | 2018-11-21T19:36:41 | null | UTF-8 | Python | false | false | 2,067 | py | from Menu.menu import Menu
from Menu.text_menu_entry import TextMenuEntry
from Screen.Console.Menu.ActionMenu.action_menu_screen import ActionMenuScreen
from Screen.Console.Menu.ActionMenu.AttackMenu.attack_controller import AttackController
from Screen.Console.Menu.ActionMenu.SwitchMenu.switch_controller import Switch... | [
"aliostad+github@gmail.com"
] | aliostad+github@gmail.com |
02893c861cf938bbf3afe51a1e5d61e2b8f327bd | 6ae8717002f8fce4457cceb3375a114ddcb837df | /1-100/18. Four Sum.py | ce1a72a2e443da34b890db6074991804027e0403 | [] | no_license | SunnyMarkLiu/LeetCode | 31aea2954d5a84d11a1c4435f760c1d03c6c1243 | 852fad258f5070c7b93c35252f7404e85e709ea6 | refs/heads/master | 2020-05-30T07:17:33.992197 | 2018-03-29T03:57:51 | 2018-03-29T03:57:51 | 104,643,862 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,484 | py | #!/home/sunnymarkliu/software/miniconda2/bin/python
# _*_ coding: utf-8 _*_
"""
4 sum 问题转化为 3 sum 问题
同时注意时间复杂度而进行的边界检查
@author: MarkLiu
@time : 17-10-31 下午8:05
"""
class Solution(object):
def fourSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[L... | [
"SunnyMarkLiu101@gmail.com"
] | SunnyMarkLiu101@gmail.com |
c4b24cf35d4b377de870d3648ce56e6d70ebe71b | 79ad16a56df93085651886375920306e63121690 | /docs_src/tutorial/fastapi/limit_and_offset/tutorial001.py | 9bdf60446a6f961ddc89296af3342889726b0341 | [
"MIT"
] | permissive | macrosfirst/sqlmodel | 4286f72144afbf1476368e3fd0ca895852799046 | bda2e2818a3e7c2a18be4adf55bfea9bad83bfcc | refs/heads/main | 2023-08-14T02:09:27.072625 | 2021-09-29T13:31:54 | 2021-09-29T13:31:54 | 403,592,064 | 0 | 0 | MIT | 2021-09-29T13:31:55 | 2021-09-06T11:11:59 | Python | UTF-8 | Python | false | false | 1,599 | py | from typing import List, Optional
from fastapi import FastAPI, HTTPException, Query
from sqlmodel import Field, Session, SQLModel, create_engine, select
class HeroBase(SQLModel):
name: str
secret_name: str
age: Optional[int] = None
class Hero(HeroBase, table=True):
id: Optional[int] = Field(default... | [
"tiangolo@gmail.com"
] | tiangolo@gmail.com |
0396719e3079adfc788b7ebb764fa5b83d5d56c3 | b2ab2caae8d6a24dfb6e43852ed5fd416d912dad | /flask/day02flask没有api/utils/ch_login.py | ec62393c203afbf7310991b009cf93b18b05e567 | [] | no_license | cheyunping77/learingnote | 781d55eb2e951049840e58ee41af3de8490fd37e | edba6c247eefe33829ba549068d67dcb288ea28b | refs/heads/master | 2023-08-18T12:57:45.624973 | 2023-07-24T06:47:11 | 2023-07-24T06:47:11 | 256,951,310 | 0 | 0 | null | 2020-04-19T08:35:17 | 2020-04-19T08:35:16 | null | UTF-8 | Python | false | false | 271 | py | from flask import url_for,redirect,session
def is_login(func):
def check_login():
user_session = session.get('user_id')
if user_session:
return func
else:
return redirect(url_for('user.login'))
return check_login | [
"380604322@qq.com"
] | 380604322@qq.com |
26fe6bcdf3b7a3144632734a6041c873371cfccb | c1db68ab2abc9c03a733e8de00eca134fe987a67 | /req2.py | 2fee3dd944dd30b7e0d8e08b7533c7b499cbfcb6 | [] | no_license | pooja-pichad/request | f64560c33d6b3f131ab25274f4c7ebc0c88c866e | bf9613b5b23f3df0a15e3367d3f100840ccef23f | refs/heads/main | 2023-08-21T09:35:50.905226 | 2021-10-14T09:06:28 | 2021-10-14T09:06:28 | 387,688,989 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,339 | py | import requests
import json
# calling a saral api
def saral():
saral_api = " http://saral.navgurukul.org/api/courses" #This link is a API and url
saral_url = requests.get(saral_api) #request is a server
# convert into a json
data = saral_url.json()
with open ("meraki_... | [
"noreply@github.com"
] | pooja-pichad.noreply@github.com |
ccbc96dcb76deb5429a028de11d8bc19bc885cb9 | d9fb6c246965cbf290186268298859ddb913ee6e | /190930/test.py | 520808d2c39e67f84e60d7b5df8b7b7ab4bd31bd | [] | no_license | 91hongppie/algorithm | 1ca6d54de6eab252c708bf83835ace8a109d73fc | 4c2fa8178e0ef7afbf0b736387f05cbada72f95d | refs/heads/master | 2020-07-20T22:17:40.700366 | 2020-06-29T00:06:11 | 2020-06-29T00:06:11 | 206,717,677 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 639 | py | import sys
sys.stdin = open('test.txt', 'r')
# def test(c, rc):
# global result, nums
# if rc not in result:
# result.append(rc)
# if c == nums:
# return
# test(c+1, rc+scores[c])
# test(c+1, rc)
N = int(input())
for tc in range(1, N+1):
nums = int(input())
scores = list(map... | [
"91hongppie@gmail.com"
] | 91hongppie@gmail.com |
20245bfb78d653c8237477beb7e295e82abc8728 | cc1d44cf04e5b2b15bb296a434aad4ae4bcfc4be | /python3/sql/getloc.py | e7364928c50915bd728d4d97890c8e206995c6dd | [] | no_license | ericosur/ericosur-snippet | dda2200546b13fb9b84632d115a0f4ca5e3d5c47 | 0309eeb614612f9a35843e2f45f4080ae03eaa81 | refs/heads/main | 2023-08-08T04:54:05.907435 | 2023-07-25T06:04:01 | 2023-07-25T06:04:01 | 23,057,196 | 2 | 1 | null | 2022-08-31T09:55:19 | 2014-08-18T03:18:52 | Perl | UTF-8 | Python | false | false | 1,216 | py | #!/usr/bin/python3
# coding: utf-8
'''
query players.db to find location coordinates
'''
import sqlite3
import sys
try:
from hexdump import hexdump
except ImportError:
print("need install module: hexdump")
sys.exit(1)
class Solution():
''' sqlite and query '''
def __init__(self):
self.db... | [
"ericosur@gmail.com"
] | ericosur@gmail.com |
f67179075a44b0e73699d2357779d53d1c60decb | 868ac4e558cf5fe945e8b557564f34f79b3ad01e | /purity_fb/purity_fb_1dot10/models/directory_service_response.py | 2fc1bc7144e633dfc9badfed480f1a506388d3ff | [
"Apache-2.0"
] | permissive | mabdelhafez/purity_fb_python_client | f4253ce8497fb3cff648e0a0cd1e567f48129fa7 | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | refs/heads/master | 2022-04-20T09:24:22.031408 | 2020-04-20T22:11:32 | 2020-04-20T22:15:44 | 257,372,596 | 0 | 0 | NOASSERTION | 2020-04-20T18:40:24 | 2020-04-20T18:40:23 | null | UTF-8 | Python | false | false | 4,297 | py | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.10 Python SDK
Pure Storage FlashBlade REST 1.10 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.10
Contact... | [
"mabdelhafez@purestorage.com"
] | mabdelhafez@purestorage.com |
0d2788ab9aafd86f7d209b60a0b3697107636ab2 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/102/usersdata/212/49943/submittedfiles/av1_2.py | a70d5686bf818087b807f4b0822fd2efe3e0d999 | [] | 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 | 317 | py | # -*- coding: utf-8 -*-
import math
n1=int(input('digite o primeiro valor da sequência:'))
n2=int(input('digite o segundo valor da sequência:'))
n3=int(input('digite o terceiro valor da sequência:'))
n4=int(input('digite o quarto valor da sequência:'))
if (n1==n3) or (n2==n4):
print('V')
else:
print('N') | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
7f8d73f6f3bba6793aeb102ca4f67544ac169569 | ec6cb8542c8ed962d24ca32fc1f060ef63fdfea7 | /第一阶段/课上实例练习/13继承_重构_repr_/epidemic_information_system_v1.py | a8e759adedeb2f5fb91ff3d0795a5b9b4f5debde | [] | no_license | singerdo/songers | 27859a4ff704318d149b2aa6613add407d88bb5d | 9c5dcd80c6772272c933b06c156b33058cbd3ce4 | refs/heads/master | 2022-04-16T11:00:11.002138 | 2020-04-18T07:15:16 | 2020-04-18T07:15:16 | 256,686,903 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,688 | py | """
疫情信息系统
需求:
输入1,循环获取疫情信息.
练习1:
需求:
输入2,显示所有疫情信息.
步骤:
在View中判断是否输入"2"
在Controller中定义__list_epidemics的只读属性
在View中显示信息
"""
class EpidemicInformationModel:
"""
疫情信息模型
"""
def __init__(self, region="", confirmed=0, ... | [
"569593546@qq.com"
] | 569593546@qq.com |
962ecb9cd49d0303277c9be28f8389ecfc558290 | 9f0a4262c4402201df1cdd5674a679543f4a50b5 | /studio_maya/resources/__init__.py | b007269247729602677317a32043f9797e916de2 | [] | no_license | subing85/subins-toolkits | 611b6b3b3012ccb023096f6e21d18d2bda5a534b | d02af1289ec3ee5bce6fa3d78c134a8847113aa6 | refs/heads/master | 2022-07-12T17:19:57.411454 | 2022-07-01T20:37:16 | 2022-07-01T20:37:16 | 168,826,548 | 11 | 2 | null | 2022-07-02T01:03:34 | 2019-02-02T11:51:25 | Mathematica | UTF-8 | Python | false | false | 2,342 | py | import os
import tempfile
import platform
CURRENT_PATH = os.path.dirname(__file__)
def getToolKit():
return "Studio Maya Interpreter", "smi", "0.0.1"
def getModuleName():
return "studio_maya"
def getIconPath():
return os.path.join(CURRENT_PATH, "icons")
def getLogo():
return os.path.join(CURREN... | [
"subing85@gmail.com"
] | subing85@gmail.com |
eeab448cdc59c08d59f662483396beaf151639e5 | 9268f5f8ccbc91322eb12c5cc0be53e7678aeff7 | /docs/source/pgf2img.py | 0501d4a6cda356d0178a518747924bd1e7c344d8 | [
"BSD-3-Clause"
] | permissive | JupiterEthan/ted.python | 7f5e462a064b351d0520d73a3972be151979be23 | 1698a7f792db23123003ae4e2d39b4c18f25f347 | refs/heads/master | 2020-05-29T09:14:55.478502 | 2015-12-06T15:30:01 | 2015-12-06T15:30:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,884 | py | #!/usr/bin/env python
"""
Convert PGF files to an image file using pdflatex, pdfcrop, (from
texlive) and convert (from ImageMagick).
"""
import os
import sys
import tempfile
import time
import subprocess
def __find_exec(executable):
'''Try to find an executable in the system path.'''
if os.path.isfile(execu... | [
"lev@columbia.edu"
] | lev@columbia.edu |
d0a8cb4d9fa41a0759b2ffea4039c1e1f5186a15 | 19603633d723d3b824ca9bce2994ce7e63dd1fc9 | /tests/integration/test_copy.py | 8073bc43754023f14388f1e5890dd8f5cb9091fb | [
"Apache-2.0"
] | permissive | TingDaoK/s3transfer | 710d761cc7406ff477291b45a21105f870f68813 | 95f34d02275d716addb6fe2f8aa5327ceff98e3d | refs/heads/develop | 2023-04-20T14:18:25.590390 | 2020-12-18T22:12:01 | 2020-12-18T22:12:01 | 319,548,025 | 0 | 1 | Apache-2.0 | 2021-05-31T23:10:42 | 2020-12-08T06:32:04 | Python | UTF-8 | Python | false | false | 2,986 | py | # Copyright 2016 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | [
"kyleknap@amazon.com"
] | kyleknap@amazon.com |
e7bc57d1a028c2d6796b49ebe2c1b947e021eb85 | 1ed536ef1527e6655217e731f622d643ece49c2b | /scripts/gpipe/pairs2gene_structure.py | 1b0134cfab7ba4d9bd647eed809068b2b6b31891 | [] | no_license | siping/cgat | de0f7af124eb38c72d7dece78fff83ff92ddbf96 | aa4cc85ffdc53998ea1a5ac5516df2d16c254d2e | refs/heads/master | 2021-01-22T13:03:18.060139 | 2013-10-07T15:53:55 | 2013-10-07T15:53:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,934 | py | ################################################################################
#
# MRC FGU Computational Genomics Group
#
# $Id$
#
# Copyright (C) 2009 Andreas Heger
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as publish... | [
"andreas.heger@gmail.com"
] | andreas.heger@gmail.com |
bb1f91a8e88acabf8432b01b997fbc03d8e0aa9a | 7b065a6b01905a2da6ad2d00b6398aad150dc6c3 | /基础知识/4.文件操作/4.write()方法.py | 03c9d3080ae416f6c9431364f8d419f445021f9e | [] | no_license | ylwctyt/python3-1 | f4b0d8d6d0a7947170186b27bf51bc2f6e291ac7 | ca92e2dc9abc61265e48b7809cb12c3e572b5b6f | refs/heads/master | 2021-04-18T18:56:46.047193 | 2018-03-25T04:35:11 | 2018-03-25T04:35:11 | 126,699,773 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 539 | py | import json
# f = open("test_write.txt","w",encoding="utf-8")
# f.write("HelloWorld\n")
# f.write("HelloWorld\n")
# f.close()
f = open("test_write.txt", "w", encoding="utf-8")
lines = ["1", "2", "3", "4", "5"]
# lines = [line+'\n' for line in lines]
f.writelines(lines) # 写入一个列表
f.close()
# json 写入到文件
dict = {"key1"... | [
"359405466@qq.com"
] | 359405466@qq.com |
fc541b4fe07329e28fb81c87bf310cfde8ff531f | 8988a329c571cb04a5d97c691d0cd8bc4caf81d4 | /benchmarks/variables.py | 414b9a4cb3dafad00e29172ae8b4aee904f332d4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | dwavesystems/dimod | 85329cbee86bdf5a73de05fa25884c877ea53002 | 8433f221a1e79101e1db0d80968ab5a2f59b865d | refs/heads/main | 2023-08-29T08:37:24.565927 | 2023-08-17T17:14:58 | 2023-08-17T17:14:58 | 100,658,303 | 118 | 93 | Apache-2.0 | 2023-09-13T18:15:37 | 2017-08-18T01:02:17 | Python | UTF-8 | Python | false | false | 1,568 | py | # Copyright 2022 D-Wave Systems Inc.
#
# 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... | [
"arcondello@gmail.com"
] | arcondello@gmail.com |
778faa010de5bb8612053f55b33329ac19019012 | cce8469586694aeea759a577c77bbac0652bec6f | /detectron2/config/config.py | c8270fd7ee447cd10497dc6253627ab0660c67c5 | [
"Apache-2.0"
] | permissive | veraposeidon/detectron2 | 9a4553289111bf6a83ecd3361eab836fb5ea076b | df2f2ab213e5c089ebc65b84786f766ba2b2b5d5 | refs/heads/master | 2020-09-26T09:05:06.044612 | 2019-12-30T09:38:29 | 2019-12-30T09:38:29 | 226,223,447 | 3 | 0 | Apache-2.0 | 2019-12-22T13:16:50 | 2019-12-06T01:47:30 | Jupyter Notebook | UTF-8 | Python | false | false | 3,560 | py | # -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import logging
from fvcore.common.config import CfgNode as _CfgNode
class CfgNode(_CfgNode):
"""
The same as `fvcore.common.config.CfgNode`, but different in:
1. Use unsafe yaml loading by default.
... | [
"veraposeidon@gmail.com"
] | veraposeidon@gmail.com |
7da94cb8e28b840f977542ad552b721f062f4c0f | e5ea9950d5f64b1e5ab7dad5ef63f5b443ca52ed | /API_Engine/models/fields.py | a904ded47eb68374eb66d8535c6abad620feb90d | [] | no_license | MediKnot/MediKnot-AI | f2e5c55d09a036580706470e6c1d8f6d7dc9635b | 97528506c25d3b31d404f2e181a39a887dbe2bb4 | refs/heads/main | 2023-06-03T13:33:46.483665 | 2021-06-24T14:15:21 | 2021-06-24T14:15:21 | 376,215,473 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,449 | py | """MODELS - FIELDS
Definition of Fields used on model classes attributes.
We define them separately because the PersonUpdate and PersonCreate models need to re-define their attributes,
as they change from Optional to required.
Address could define its fields on the model itself, but we define them here for convenience
... | [
"ajinkyataranekar@gmail.com"
] | ajinkyataranekar@gmail.com |
a706d366c2b89cc2de1fa44bab761e41a23254c9 | 5f4f3ab6ece4eda1066bda2f80b9cf89a898f409 | /0x0B-python-input_output/10-class_to_json.py | 7e9784dda2a105257bb1f5945467692817f849a3 | [] | no_license | s0m35h1t/holbertonschool-higher_level_programming | 8af7f3bc54159efa05859f81ca3b9fb1739190e8 | f3b7ddeabf41b5cbc8460841c429b4b3bf254fea | refs/heads/master | 2020-09-28T20:32:23.955579 | 2020-05-14T20:22:50 | 2020-05-14T20:22:50 | 226,859,068 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 357 | py | #!/usr/bin/python3
"""
get __dict__ class description
"""
def class_to_json(obj):
"""returns the dictionary description with simple data
structure (list, dictionary, string, integer and boolean)
for JSON serialization of an object
Args:
obj (Object): file name
Returns:
(Object) : ... | [
"adib.grouz@gmail.com"
] | adib.grouz@gmail.com |
b669fc22e51ea7d2d9e31e0ef07ecec2abbde3ba | 931c17844683a4fbbefcf2bb2d5468d08cce7dbd | /03.Data_Science/Test.py | 2ff749cabbb0693acb9c49bb983bc82a8e8e96eb | [] | no_license | sungwooman91/python_code | d7c8046089bf492b70d21f4ee5a8676377e70592 | fdf20690d761b533efef2f247719f598c14f50c8 | refs/heads/master | 2020-03-26T05:14:27.104725 | 2018-08-13T07:46:11 | 2018-08-13T07:46:13 | 144,545,758 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 710 | py | import csv # 외부모듈 사용!!!
with open("Demographic_Statistics_By_Zip_Code.csv", newline="") as infile:
data = list(csv.reader(infile)) # 파일을 'data'라는 리스트로 출력
#
# ## get_csv_rowInstance(row_index)
# ## COUNT FEMALE
# def get_csv_rowInstance(row_name): # data를
# find_row = data[0].index(row_name)
# row_instance ... | [
"tjddn636@naver.com"
] | tjddn636@naver.com |
576c3dddbc0a2fb79bb514302124bcd8b6350115 | 7624e7fca387651e278e1e9911b37c675e3a599c | /面试题&剑指 Offer/面试题 08.08. 有重复字符串的排列组合.py | 0ec11ab8a9ef9a2062647d0c9544c4c35ca5027c | [] | no_license | homezzm/leetcode | 53269f1c94c040a41b03e4342d4c241e3f1102b5 | 63ac5a0921835b1e9d65f71e1346bbb7d66dad9b | refs/heads/master | 2023-03-03T09:28:16.974397 | 2021-02-15T03:21:17 | 2021-02-15T03:21:17 | 330,537,897 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,326 | py | class Solution(object):
def permutation(self, S):
"""
https://leetcode-cn.com/problems/permutation-ii-lcci/
:type S: str
:rtype: List[str]
有重复字符串的排列组合。编写一种方法,计算某字符串的所有排列组合。
示例1:输入:S = "qqe" 输出:["eqq","qeq","qqe"]
"""
if not S or len(S) <= 1: return... | [
"homezzm@126.com"
] | homezzm@126.com |
5b9c41ad7bd7f537b5ec26e1e565ce2aa685a1a2 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_1/manjeetacrocs2/a.py | 430d5f4ef1493a5eda7c5d37ab4445304677ec9b | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 352 | py | t=int(input()); j=1;
for _ in range(t):
str1=input()
if int(str1)==0:
print("Case #{}: INSOMNIA".format(j))
j+=1
continue
s=set(); s|=set(list(str1))
sum1=int(str1);count=0
while len(s)!=10:
sum1+=int(str1); l3=list(str(sum1)); s|=set(l3)
print("Case #{... | [
"[dhuo@tcd.ie]"
] | [dhuo@tcd.ie] |
7a0f902f4fd2b98ce87a8b8ed1548b76623a4291 | 23514a0e2baf6da053690dd511f1eef75a573e6b | /log-mining/com/haodou/log-mining/CollectionUtil.py | 4ebb82ebf1ce316a6ec6163875d3288a73b45c03 | [] | no_license | rainly/scripts-1 | b5f31880a1a917df23e4c110bb7661685851eff5 | 3ef01a58162b94fb36cdd38581c899d8a118eda0 | refs/heads/master | 2020-07-12T01:41:31.491344 | 2019-08-27T08:50:10 | 2019-08-27T08:50:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py |
def cut(rs,N):
return sorted(rs.items(), key=lambda d: d[1],reverse=True)[0:N]
import random
def test():
N=5
rs={}
for i in range(N*2):
rs[i]=int(3*random.random())
print rs
cut(rs,N)
print rs
if __name__=="__main__":
test()
def halfCut(ts,min=0,max=100):
n=len(ts)/2
if n < min:
n=min
if n > max:
... | [
"zhaoweiguo@vxiaoke360.com"
] | zhaoweiguo@vxiaoke360.com |
ad582a3d28ae7f94a8654318676c5e54db2755de | 17dca703eed28a859bba4984eba5b039b900e3d7 | /operaciones/views.py | dc3dc8fde486273a340e37d206351d0718decdb2 | [] | no_license | alexogch1/SistemaOperaciones | 1a34872daf0e151672edd202a5089ee754805203 | ac72f6e3284061e240aebec6a3300ff463a3544c | refs/heads/master | 2021-01-03T15:32:45.470642 | 2020-03-03T07:47:27 | 2020-03-03T07:47:27 | 240,133,319 | 0 | 1 | null | 2020-02-28T05:21:57 | 2020-02-12T23:02:36 | Python | UTF-8 | Python | false | false | 6,699 | py | from django.shortcuts import render
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views .generic.base import TemplateView
from django.http.response import HttpResponse
from openpyxl import Workbook
from openpyxl.styles import Alignment, Border,Font,PatternFill,Side
from django.views import gen... | [
"alexogch@hotmail.com"
] | alexogch@hotmail.com |
bbff0812d21cbd950f8dcd096fa53a300491a14b | 8a73f252c333d9be87ad3827f6880fb47b43625f | /tutorials/W1_ModelTypes/solutions/W1_Tutorial2_Solution_8a33b742.py | dc15afaa0b608af6694a1387b75654336eac098b | [] | no_license | tifainfaith/professional-workshop-3 | 640948d23c8207f891ff0257a38e4653af5b452b | 851077030cbb5a2f53520dbccb80e4459ae8bfc7 | refs/heads/master | 2023-08-20T00:50:11.303677 | 2021-10-27T00:46:34 | 2021-10-27T00:46:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 643 | py | def lif_neuron(n_steps=1000, alpha=0.01, rate=10):
""" Simulate a linear integrate-and-fire neuron.
Args:
n_steps (int): The number of time steps to simulate the neuron's activity.
alpha (float): The input scaling factor
rate (int): The mean rate of incoming spikes
"""
# precompute Poisson samples ... | [
"action@github.com"
] | action@github.com |
9b70171b34c9d395fbcb8b2bcd8eae663ee97237 | ca17bd80ac1d02c711423ac4093330172002a513 | /decorator/decorator.py | 786734854a22973c775aedfcfa7e0b0d85d65adb | [] | no_license | Omega094/lc_practice | 64046dea8bbdaee99d767b70002a2b5b56313112 | e61776bcfd5d93c663b247d71e00f1b298683714 | refs/heads/master | 2020-03-12T13:45:13.988645 | 2018-04-23T06:28:32 | 2018-04-23T06:28:32 | 130,649,699 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | def f1(arg):
print "f1"
rl = arg()
print rl, "This si rl"
return rl + "f1"
@f1
def f2(arg = ""):
print "f2"
return arg + "f2r"
print "start"
print f2
| [
"zhao_j1@denison.edu"
] | zhao_j1@denison.edu |
bb7f3095c4b812063e8c77e887d8afde9d682874 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02995/s824603391.py | 91c9d13ffd6406e8745ba0c78a8d2e5ef263052b | [] | 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 | 644 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Created: Jul, 13, 2020 04:11:55 by Nobody
# $Author$
# $Date$
# $URL$
__giturl__ = "$URL$"
import math
from sys import stdin
input = stdin.readline
def main():
A, B, C, D = list(map(int, input().split()))
# divisible by C
dc = B//C - (A-1)//C
# divisible ... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
4252361cdb8d77952bfe9c73b5a3ef21eb5f86fc | a1b1e14dcaecbeee7a9ef7d0f3199f72e436dec9 | /migrations/0046_auto_20200731_1926.py | 3c15798c43e52f3aed7985402fd8d5f3be047b52 | [] | no_license | erllan/my-first-blog | ee99c3faad2de4039340b683143ada4c29310b31 | 0a1f37d9c95d70daaef945fbd950412281eb2cc4 | refs/heads/master | 2022-12-20T02:32:33.683460 | 2020-10-21T14:55:23 | 2020-10-21T14:55:23 | 262,575,739 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 746 | py | # Generated by Django 3.0.2 on 2020-07-31 13:26
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('my_vk', '0045_auto_20200731_1855'),
]
operations = [
migrations.AlterField(
model_name='message... | [
"erlan.kubanychbekov.000@gmail.com"
] | erlan.kubanychbekov.000@gmail.com |
fe6ca773d2c95c079f2abc0a0ea3f814374940ee | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2737/60734/246210.py | 03d3b05e18516224525a5ee93bd214fb817c7686 | [] | 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 | 547 | py | import re
lst = re.findall(r'\d+',input())
lst = list(map(int,lst))
#最多只能有两个众数
m,n = 0,0
cm,cn = 0,0
for a in lst:
if a == m:
cm+=1
elif a == n:
cn+=1
elif cm == 0:
m = a
cm = 1
elif cn == 0:
n = a
cn = 1
else:#两个计数器都要减一
cm-=1
cn-=1
#... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
359fb0d94df61ec37a617dd620a2c50191bc432f | f14bf0274762591940a9f0382b6c9b99a42aedca | /WINDOW_openMDAO/src/api.py | 0684a81dd22f447d1d87f7e0deb1c424556f962e | [] | no_license | chunyuli/WINDOW_openMDAO | 5b610bcdac42fe45a69e2afcae74b92b3f27f092 | c9e39da2079d1a0b604fa9f4b9952dc663466871 | refs/heads/master | 2020-03-20T08:52:19.910162 | 2018-05-29T11:51:48 | 2018-05-29T11:51:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,146 | py | from AbsWakeModel.wake_linear_solver import WakeModel
from AbsWakeModel.AbstractWakeModel import DetermineIfInWake, WakeDeficit
from AbsAEP.farmpower_workflow import AEPWorkflow
from AbsTurbulence.abstract_wake_TI import AbstractWakeAddedTurbulence, DeficitMatrix, CtMatrix
from AbsWakeModel.AbsWakeMerge.abstract_wa... | [
"s.sanchezperezmoreno@tudelft.nl"
] | s.sanchezperezmoreno@tudelft.nl |
136cc322199fffd4ac050c4614a69dd646546c5a | 1dae87abcaf49f1d995d03c0ce49fbb3b983d74a | /programs/test_uw_field_lock.prg.py | 36106b8820eb6a53475dbabb1e58b66c89dc35fc | [] | no_license | BEC-Trento/BEC1-data | 651cd8e5f15a7d9848f9921b352e0830c08f27dd | f849086891bc68ecf7447f62962f791496d01858 | refs/heads/master | 2023-03-10T19:19:54.833567 | 2023-03-03T22:59:01 | 2023-03-03T22:59:01 | 132,161,998 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,397 | py | prg_comment = ""
prg_version = "0.7"
def program(prg, cmd):
prg.add(10000, "Initialize 0 TTL and Synchronize.sub")
prg.add(50000, "DarkSpotMOT_19.sub")
prg.add(209000000, "Synchronize.sub", enable=False)
prg.add(209943111, "MOT lights Off TTL.sub")
prg.add(209947301, "Config Field OFF.sub")
prg.... | [
"carmelo.mordini@unitn.it"
] | carmelo.mordini@unitn.it |
51904ecbfe9cffd3ebd5c76f9e8576698bc9b7cd | fcecddb522cd6b775074ecd950aaddda9010ae57 | /Serenity/core/view_generators.py | 83e32ebfe5661f107d29a155e62250e9dfc250ea | [] | no_license | Firefly-Automation/Serenity | fa7fbe7800feed60a96a454e6fb520afa4c2030c | e343b31238af27255468a0773598130fd65d9793 | refs/heads/master | 2021-06-12T03:30:47.139101 | 2017-01-06T04:26:33 | 2017-01-06T04:26:33 | 66,432,533 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 435 | py | # -*- coding: utf-8 -*-
# @Author: zpriddy
# @Date: 2016-08-23 22:07:06
# @Last Modified by: zpriddy
# @Last Modified time: 2016-08-23 22:20:07
## build array of all templates minified
## devices can have 'custom_view:true' and then 'custom_html:' as part of the device view
## proccess the data that comes in and ... | [
"me@zpriddy.com"
] | me@zpriddy.com |
4fd8f9a4b477f960834b1c2278051375e53aa7f4 | 23d8a521f1f2c15ec745d8a68f405be5c8ad58ba | /acme/tf/networks/legal_actions.py | 93b53ee3888e1df13c347028b542892cd543de54 | [
"Apache-2.0"
] | permissive | Idate96/acme | 108766d67d1c123f4f90045b3ad459e9f25a9cf1 | 722c33a3b8c779647314444531cb2282fab9246a | refs/heads/master | 2023-04-20T18:54:43.100914 | 2021-05-22T14:08:43 | 2021-05-22T14:08:43 | 368,240,977 | 0 | 0 | Apache-2.0 | 2021-05-17T15:48:11 | 2021-05-17T15:48:10 | null | UTF-8 | Python | false | false | 4,759 | py | # python3
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.