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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0d93842ad2b9ac62adc555b2ee2d299216b6633c | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_5/gdljam001/mymath.py | 16fc26c21b16d5f866005d3e2ae831c8a1999015 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | #get Integer
#James Godlonton
#12 April 2014
def get_integer(choice):
ans=input("Enter "+choice+":\n")
while not ans.isdigit():
ans=input("Enter "+choice+":\n")
return eval(ans)
def calc_factorial(x):
retVal=1
for i in range(1,x+1):
retVal=retVal*i
return retVal... | [
"[email protected]"
] | |
7f8d9c571f666fc5e9028d7c61e5a706929ef742 | ab5392cc0fc17cdc3feca3eb7b32e79b6be60ef7 | /hrp/internal/scaffold/templates/testcases/demo_ref_testcase_test.py | 714030cdab14a9b2a13fba8363f41bb01715bb3d | [
"Apache-2.0"
] | permissive | Jason-Fu/HttpRunner | 3ad5def3e5aa49f073d8cef75e75a4654ac3ec38 | 69495c9eb3e19eaf6f7af438b6a0437050f32315 | refs/heads/master | 2022-06-04T07:28:47.570096 | 2022-05-05T13:52:01 | 2022-05-05T13:52:01 | 195,747,138 | 0 | 0 | null | 2019-07-08T06:06:36 | 2019-07-08T06:06:36 | null | UTF-8 | Python | false | false | 1,678 | py | # NOTE: Generated By HttpRunner v4.0.0
# FROM: testcases/demo_ref_testcase.yml
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.parent))
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from testcases.demo_requests_test import TestCaseDemoRequests as DemoReq... | [
"[email protected]"
] | |
a3422ab27af13b221285949eb7b8f385e80b3318 | 7cc0e0ae806a4f580100a1ae0d120cab37ccddff | /Atividades1/At1Q45.py | a7ef1b6a4c6ab72526f6383ee1548fc08c44860c | [] | no_license | osmarsalesjr/AtividadesProfFabioGomesEmPython3 | 2ac10cebb7887798a39d9029fe205619f3fd481a | a8f2536e34ed8897011536135a1937689d6c3144 | refs/heads/master | 2021-01-01T06:43:21.301461 | 2017-07-17T16:22:09 | 2017-07-17T16:22:09 | 97,496,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,108 | py |
def main():
valor = float(input("Qual o Valor a Sacar em R$? "))
conta_notas(valor)
def conta_notas(valor):
notas_cem, notas_cinquenta, notas_vinte, notas_dez = 0, 0, 0, 0
notas_cinco, notas_dois, notas_um = 0, 0, 0
while valor >= 100:
valor = valor - 100
notas_cem = notas_cem + 1... | [
"[email protected]"
] | |
bccdece2cd099fc2dc4805d24691218c61918883 | 55a2a89fe752dc72ca353c091a47628c830e4117 | /classification/tests/test_classifier.py | 3a92278b2c73de077df8f2a1e59980057667a367 | [
"Apache-2.0"
] | permissive | hercules261188/serverless-transformers-on-aws-lambda | 28df74886154906494f7315298d534000f784b41 | d48caab0e07ae8326d4b37ab730faf2cffd02f7d | refs/heads/master | 2023-07-09T01:37:49.042169 | 2021-08-20T08:39:46 | 2021-08-20T08:39:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 145 | py | from src.classifier import Classifier
pipeline = Classifier()
def test_response(requests, response):
assert response == pipeline(requests)
| [
"[email protected]"
] | |
2d0d1a621fa5ff4224c806a23ae0828c5a4408ae | 999f3f3da1cb70cb5872f99a09d65d7c4df71cf7 | /src/data/1061.py | 51dbb3f209cfabf9eaecdccf40b8420c755a3ff3 | [
"MIT"
] | permissive | NULLCT/LOMC | 0f0d1f01cce1d5633e239d411565ac7f0c687955 | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | refs/heads/main | 2023-07-27T17:03:46.703022 | 2021-09-04T08:58:45 | 2021-09-04T08:58:45 | 396,290,713 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,168 | py | import sys
input = sys.stdin.readline
from collections import defaultdict, deque
def II():
return int(input())
def IS():
return input().rstrip()
def MI():
return map(int, input().split())
def LI():
return list(map(int, input().split()))
def MS():
return input().rstrip().split()
def LS()... | [
"[email protected]"
] | |
429d79300bcd0ab017f398e7e54a70ad643630b9 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_2_neat/16_0_2_jimmy17_B.py | 02e02091c0d5cf8bb9357e91027a4f4de051b7df | [] | 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 | 556 | py | tests = int(raw_input())
for i in range(tests):
result = 0
pancakes = raw_input()
state = pancakes[0]
has_changed = False
plus_exists = False
for ch in pancakes:
if ch != state:
has_changed = True
if state == '+':
plus_exists = True
... | [
"[[email protected]]"
] | |
feaa101319f2ec0937022c8f51000b88ddd84e02 | 78ca13fcd5a7556227136814703d2536880591b7 | /list_iteration/py/py3_list_iter_02.py | dace7dcba9da6b3a7164190c1d1bebfe56b02e4a | [] | no_license | dheerajs0346/PYPL | 24a7658607eb905e012d49f86a66216b37398918 | ebfadd75d44ef17e78e4cf1daf8f9e2f66c5ee30 | refs/heads/master | 2023-03-10T04:56:37.056033 | 2021-02-17T18:50:14 | 2021-02-17T18:50:14 | 375,725,102 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 370 | py | ## list iteration methods in Py
## author: Vladimir Kulyukin
lst = [1, 2, 3, 4]
## use lazy range from 0 upto the length of lst - 1.
## index into a specific spot in lst.
for i in range(0, len(lst)):
print(lst[i])
print('i=', i) # i is bound to its last value in for-loop
## the above for-loop and print produce ... | [
"[email protected]"
] | |
57a1603b2f96aa4b651f5e650ca820a55bba227b | 7bdca6fb5f972586efcfb379cded7a5e3891d27c | /pymaster/tests/test_masking_flat.py | f056e2a287de98f84cf497b0d467039f9c08d1e2 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | LSSTDESC/NaMaster | 0c31705a5ca5d57d0ad8e7af80dc071811cdfc81 | b45317f840320855b7e38799fa411782e2886289 | refs/heads/master | 2023-08-11T11:57:13.177268 | 2023-08-01T12:11:21 | 2023-08-01T12:11:21 | 142,736,704 | 47 | 25 | BSD-3-Clause | 2023-08-01T12:11:23 | 2018-07-29T06:29:34 | C | UTF-8 | Python | false | false | 2,280 | py | import pytest
import numpy as np
import pymaster as nmt
class MaskingTesterFlat(object):
def __init__(self):
self.nx = self.ny = 200
self.lx = self.ly = np.radians(10.)
self.msk = np.zeros([self.ny, self.nx])
self.msk[:self.ny//2, :] = 1.
self.aposize = 1.
self.inv_... | [
"[email protected]"
] | |
e84af738a00cae662826ffe2c63e25e47325c97c | e854337c828f355a1c916c3adffcff56b069e4c2 | /flights/migrations/0003_passenger.py | 175a8cd40a837cff8c71430748aedc3938a81ab1 | [] | no_license | viralsir/djangoProject_evening | a6c90e4e4a1d689de53f46d53366db0a7fc410f5 | 1fb05e66df1373c8bf23e7344f388f9ace1ea7cf | refs/heads/master | 2023-04-24T11:54:41.338160 | 2021-05-21T12:15:52 | 2021-05-21T12:15:52 | 361,741,575 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 687 | py | # Generated by Django 3.2 on 2021-05-10 12:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('flights', '0002_auto_20210510_1715'),
]
operations = [
migrations.CreateModel(
name='passenger',
fields=[
... | [
"[email protected]"
] | |
23153ae789f6cb8f400fa348bf266dffb1b07264 | c56ddcc2807151a5c44d3a1d65a1984bc8fd9b84 | /4 кю/Strip Comments.py | ac850d313c2f546cb6f74af406e94c9aa4b26948 | [] | no_license | kelpasa/Code_Wars_Python | 2cd18dd404603a6535887e8e6ed2d08da19562ba | 939ec1dd08ffc7939bb9a139bf42901d6f24fbdd | refs/heads/master | 2022-12-17T02:00:28.319351 | 2020-09-23T09:11:20 | 2020-09-23T09:11:20 | 246,642,898 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 265 | py | import re
def solution(s, markers):
if not markers:
return s.strip()
pattern = re.compile(
' *[{}].*\n'
.format(''.join([m if m not in '-^' else '\\' + m for m in markers]))
)
return re.sub(pattern, '\n', s + '\n')[:-1]
| [
"[email protected]"
] | |
5b76f8005aa35ad3b95eaf1d9c01c4b33046a647 | ef198b8a5625626773351ca8de3da6bd7969be25 | /0x0F-python-object_relational_mapping/1-filter_states.py | d90b3afd9dde3c46e9169e77c1a160d564a5f998 | [] | no_license | fdetun/holbertonschool-higher_level_programming | efde2762a55066f9c571a3f6ea4b724af96be6a8 | 3733fc52fddab9df3bc51e6ea2905dad0eefe9ae | refs/heads/master | 2022-12-26T10:28:15.381013 | 2020-09-26T02:12:48 | 2020-09-26T02:12:48 | 259,254,129 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 609 | py | #!/usr/bin/python3
"""
upper N
"""
import MySQLdb as mdb
import sys
def byfoued():
"""
function by foued
"""
fdb = mdb.connect(host='localhost',
port=3306,
user=sys.argv[1],
passwd=sys.argv[2],
db=sys.argv[3]
... | [
"[email protected]"
] | |
3203eda17fc7fab819b461afd5e033a342bf2850 | eb215d9387a8aa006fbb3c1339cf34bdba82ec32 | /app/controllers/Favorites.py | 064bbdbc6dc74d744312d9c547e1e99eb9cd98b8 | [] | no_license | elliotsyoung/crime-dodger | ba7d98e593e650c3937565bd47a95fdca7129203 | 268fa82250c98ab1765eed547a515d08c581911a | refs/heads/master | 2021-01-22T05:27:45.296838 | 2016-09-01T22:30:43 | 2016-09-01T22:30:43 | 67,058,461 | 0 | 0 | null | 2016-08-31T17:22:26 | 2016-08-31T17:22:26 | null | UTF-8 | Python | false | false | 431 | py | from system.core.controller import *
class Favorites(Controller):
def __init__(self, action):
super(Favorites, self).__init__(action)
self.load_model('Crime')
self.load_model('Favorite')
self.load_model('User')
self.db = self._app.db
def edit(self,id):
favorite=se... | [
"[email protected]"
] | |
be4a55087db33754f407e24b68ea1708c532ea30 | 89b45e528f3d495f1dd6f5bcdd1a38ff96870e25 | /pyneng/exercises/09_functions/task_9_1.py | f3fea8eb574faa2713a4238fc517d66e031c07fd | [] | no_license | imatyukin/python | 2ec6e712d4d988335fc815c7f8da049968cc1161 | 58e72e43c835fa96fb2e8e800fe1a370c7328a39 | refs/heads/master | 2023-07-21T13:00:31.433336 | 2022-08-24T13:34:32 | 2022-08-24T13:34:32 | 98,356,174 | 2 | 0 | null | 2023-07-16T02:31:48 | 2017-07-25T22:45:29 | Python | UTF-8 | Python | false | false | 3,458 | py | # -*- coding: utf-8 -*-
"""
Задание 9.1
Создать функцию generate_access_config, которая генерирует конфигурацию
для access-портов.
Функция ожидает такие аргументы:
- словарь с соответствием интерфейс-VLAN такого вида:
{'FastEthernet0/12': 10,
'FastEthernet0/14': 11,
'FastEthernet0/16': 17}
- шаблон кон... | [
"[email protected]"
] | |
17e86708d5b2a0476756c63ab8d0cd12a77eba92 | 610ac1da64200c109b9ac48d162058fdd85801aa | /initmethd1.py | 0611c42bbb6351ad0642f65bd482c172afe1023f | [] | no_license | rajdharmkar/Python2.7 | 3d88e7c76c92bbba7481bce7a224ccc8670b3abb | 9c6010e8afd756c16e426bf8c3a40ae2cefdadfe | refs/heads/master | 2021-05-03T18:56:36.249812 | 2019-10-08T00:17:46 | 2019-10-08T00:17:46 | 120,418,397 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,676 | py | class Human:
# def __init__(self): pass # init method initializing instance variables
#
# def __str__(): pass # ??
#
# def __del__(self): pass # ??...these three def statements commented out using code>> comment with line comment..toggles
def __init__(self, name, age, gender): # self m... | [
"[email protected]"
] | |
f40e095dd0a9ac20f890db612881d524f776ab90 | 6316ad09411bca6d9bdee7d1a2fa1046e753d0d5 | /celery_app/__init__.py | 5fc1dcf7e6cb6533ac7b33198d647e22abdf0ece | [] | no_license | huazhz/food_master | a6da09adb75d303e95733069dec486a3ca7792df | f5a444da3fd98d4a17948265cfe863f1ea1f4746 | refs/heads/master | 2020-04-08T02:34:56.423886 | 2018-04-02T13:36:43 | 2018-04-02T13:36:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 311 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import redis
from celery import Celery
# from celery_app.celeryconfig import broker, backend
app = Celery('tasks')
app.config_from_object('celery_app.celeryconfig')
pool = redis.ConnectionPool(host='127.0.0.1', port=6379)
r = redis.Redis(connection_pool=pool)
| [
"[email protected]"
] | |
96c00338f7ff5b13c7eeac22e83d169897ab16aa | 853d4cec42071b76a80be38c58ffe0fbf9b9dc34 | /venv/Lib/site-packages/nltk/corpus/reader/crubadan.py | 70c2e82bdc0cedc69f1d70c5343d24457ed96867 | [] | no_license | msainTesting/TwitterAnalysis | 5e1646dbf40badf887a86e125ef30a9edaa622a4 | b1204346508ba3e3922a52380ead5a8f7079726b | refs/heads/main | 2023-08-28T08:29:28.924620 | 2021-11-04T12:36:30 | 2021-11-04T12:36:30 | 424,242,582 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,622 | py | # Natural Language Toolkit: An Crubadan N-grams Reader
#
# Copyright (C) 2001-2021 NLTK Project
# Author: Avital Pekker <[email protected]>
#
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
An NLTK interface for the n-gram statistics gathered from
the corpora for each languag... | [
"[email protected]"
] | |
04e2128404e809a729d91ded71472deff19e7274 | 533f86815dcded10183f623b6ddd552fadd9e38c | /Lesson_08/hw8/DmitryBirulin_DZ_magic_v2.py | 3dd1343f0e280ffb969253a832174f2d555acaae | [] | no_license | DoctorSad/_Course | 8ab81db218cd9a0bfefb118094912c53b11256d4 | da5ba4d6904910be033241e3b68c846e883a24fa | refs/heads/main | 2023-04-15T10:26:27.294706 | 2021-05-06T08:59:38 | 2021-05-06T08:59:38 | 351,796,720 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,506 | py | """
Реализуйте игру Magic (hw3/magic.py) с некоторыми дополнениями.
1. При запуске, программа спрашивает имя игрока.
2. В словаре player_data хранить данные игрока и актуализировать их после
каждой сыгранной игры. Оперировать такими данными:
name - имя игрока
games - общее количество с... | [
"[email protected]"
] | |
d10f037bb1bef97f1a9452fcdb59b25bcd316a5b | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_35/344.py | 223d826084a19fea614cdec9902fde6de1a8a235 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,314 | py | #vim: fileencoding=utf-8 :
import sys, string
sinks=[]
alpha, map, matrix=None, None, None
MAX_LATTITUDE=20000
def read_n():
return [int(n) for n in sys.stdin.readline().split()]
def read_map():
h,w=read_n()
map=[]
for j in range(h):
map.append(read_n())
assert len(map)==h
return h,w... | [
"[email protected]"
] | |
25e5950f6d51c06a9351d4a52d1452dd0ff8a617 | 056adbbdfb968486ecc330f913f0de6f51deee33 | /200-number-of-islands/number-of-islands.py | 3137ef84af9b6aa64b412c25fb441d919cf4a809 | [] | no_license | privateHmmmm/leetcode | b84453a1a951cdece2dd629c127da59a4715e078 | cb303e610949e953b689fbed499f5bb0b79c4aea | refs/heads/master | 2021-05-12T06:21:07.727332 | 2018-01-12T08:54:52 | 2018-01-12T08:54:52 | 117,215,642 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,358 | py | # -*- coding:utf-8 -*-
# Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.
#
# Example 1:
# 11110110101100000... | [
"[email protected]"
] | |
0e789989d27f3d2625ed474126c16466417e6a8b | 91781e25054b55850fe982add76da1dd709e1218 | /manage.py | 961816f726429a4d7a1c0b618036c142a2d92248 | [] | no_license | bloogrox/ssp-cabinet | 5b026bb3f392aec60c6a70bf2cb3d4d162a4b237 | 7de03ed35fc603305d07446b8ecd97811c1d9bb2 | refs/heads/master | 2021-01-01T06:41:00.628110 | 2017-12-14T13:59:41 | 2017-12-14T13:59:41 | 97,483,236 | 1 | 2 | null | 2018-12-18T20:40:25 | 2017-07-17T14:05:01 | Python | UTF-8 | Python | false | false | 813 | py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cabinet.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
... | [
"[email protected]"
] | |
5ea470a7c5f0251219964dad00a091892d220849 | 7b6930e5bf5af256cc6ddff3d5a6656e3dddce84 | /generate_data.py | d3c386ccde85e652c23b76502d7cd33ee7867a7f | [] | no_license | isabella232/de_tech_test_pyspark | 40a9800a781195fcad36d771f304f39fdac8be7f | 6a00b38584453f5f933bb18ddc7eaf521d923235 | refs/heads/main | 2023-06-26T03:31:29.939619 | 2021-07-08T14:27:28 | 2021-07-08T14:27:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,436 | py | import random
from functools import partial
import csv
from itertools import product
import string
import csv
from datetime import datetime
import os
def generate_data(size=1000000):
"""
Generates csvs in root directory. The csvs are:
main/test_data.csv
- field1, field2, field3, field4 are ... | [
"[email protected]"
] | |
43ff85cc266c6409377138647e481859ad1febf5 | fd40d6375ddae5c8613004a411341f0c984e80d5 | /examples/websites.py | f23bd681715e78801378f8fd3435768abb9d6654 | [
"LicenseRef-scancode-public-domain",
"MIT"
] | permissive | ieaves/tenzing | 93c3353e62621c90adefc5a174a2dcde9aacbc46 | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | refs/heads/master | 2020-04-25T07:14:31.388737 | 2020-01-07T02:51:13 | 2020-01-07T02:51:13 | 172,608,080 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 747 | py | import pandas as pd
from visions.core.implementations import visions_complete_set
from visions.core.functional import type_cast, type_inference
from visions.core.summaries.summary import CompleteSummary
# Load dataset
df = pd.read_csv(
"https://raw.githubusercontent.com/berkmancenter/url-lists/master/lists/et.cs... | [
"[email protected]"
] | |
1667b6219a909476a37dc1d9dc14e719e3cd0678 | 5a7f0462e4b37fffa42840024d5b185bd22d8358 | /entry_point_inspector/group.py | 11ff9ecf0593f4b83b2df8739c87a17c5c3f253e | [
"Apache-2.0"
] | permissive | dhellmann/entry_point_inspector | a9884406e5f50277172a3c67154bfc5170714f33 | 77dc43a76feef9fffe6a2edbc1970593d2afc5ae | refs/heads/master | 2021-06-12T18:36:30.693175 | 2021-04-12T20:30:46 | 2021-04-12T20:30:46 | 11,693,466 | 19 | 9 | Apache-2.0 | 2021-04-12T20:24:08 | 2013-07-26T19:43:35 | Python | UTF-8 | Python | false | false | 1,527 | py | import logging
from cliff import lister
import pkg_resources
LOG = logging.getLogger(__name__)
class GroupList(lister.Lister):
"""Shows the groups for which plugins are available.
"""
def take_action(self, parsed_args):
names = set()
for dist in pkg_resources.working_set:
L... | [
"[email protected]"
] | |
d8c3cc3d8f58fa5679b00e83bfc4695e814c6d89 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2928/60717/271819.py | 69abec6b11d324214d2dc8fd5938d954d5d43f48 | [] | 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 | 648 | py | v=int(input())
list1=input().split()
for i in range(0,9):
list1[i]=int(list1[i])
if min(list1)>v:
print(-1)
else:
n=int(v/min(list1))
tmp=min(list1)
index=list1.index(tmp)
list2=[index+1 for i in range(0,n)]
index+=1
while index<9:
summ=0
for i in range(0,len(list2)):
... | [
"[email protected]"
] | |
4bcfb0710a767c789b9a4f612cf464628ec5fe42 | 26e4bea46942b9afa5a00b9cde9a84f2cc58e3c9 | /thinkpython/ex4_md5sum.py | 741e74eb3f7cbcf1f3796406663c928922b3ff7e | [] | no_license | MeetLuck/works | 46da692138cb9741a913d84eff6822f107510dc7 | ab61175bb7e2ed5c5113bf150e0541ae18eb04c4 | refs/heads/master | 2020-04-12T05:40:25.143075 | 2017-08-21T17:01:06 | 2017-08-21T17:01:06 | 62,373,576 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,046 | py | ''' Exercise 4 '''
# 1. Write a program that searches a directory and all of its subdirectories,
# recursively, and returns a list of complete paths for all files with a given suffix(like mp3)
# 2. To recognize duplicates, you can use md5sum to compute a 'checksum' for each files.
# If two files have the same che... | [
"[email protected]"
] | |
a751ae94d464f1373dde689a9c0e8df70e5cfa1c | d7261ed9957df0bb1f832778201f39edc3dffc49 | /bot_redis/storeges.py | a5d9e6aeb7b8d5b7fc32b84cacd2f1d968f4df3c | [] | no_license | unitorzero/SearchBot | 915bcd50803029a2322ed33593079dc93bf379ff | 396163468b3223894c862d83f46165fd9e26477f | refs/heads/master | 2022-12-11T06:24:33.944342 | 2019-11-26T11:50:01 | 2019-11-26T11:50:01 | 224,178,376 | 0 | 0 | null | 2022-06-21T23:34:32 | 2019-11-26T11:40:33 | Python | UTF-8 | Python | false | false | 2,102 | py | from db.bot_orm.tables.user import User
import logging
class Users:
log = logging
def __init__(self):
self.UserTable = User
self.users = []
self.user_ids = []
self.user_telegram_ids = []
self.admins = []
self.admin_ids = []
self.admin_telegram_ids = []
... | [
"[email protected]"
] | |
4dd14a31dbec97cf808271e1bfbf5baa9c2bb497 | 62154efb438d7d799cc98eba1f150679bf79f7b9 | /mbm/string.py | d4ae1901fb00f49d05fab8643a4b6232b81e1e45 | [] | no_license | asmark/mafia-by-mail | 5e4b30572741a8bae49d99bd5f1cd88c413969bb | 2beff28a402336723e44a7ca8f31e6711747350b | refs/heads/master | 2020-12-25T11:21:49.665920 | 2016-02-03T21:28:46 | 2016-02-03T21:28:46 | 51,032,830 | 0 | 0 | null | 2016-02-03T21:44:48 | 2016-02-03T21:44:48 | null | UTF-8 | Python | false | false | 713 | py | import re
import string
class Template(string.Template):
def __init__(self, template):
super().__init__(template)
self.vars = tuple(self._extract_vars())
def _extract_vars(self):
for match in self.pattern.finditer(self.template):
if match.group('invalid') is not None:
... | [
"[email protected]"
] | |
feccae051f13771d4f3877c8a034cd5bfe92c450 | 7ee11bb1adc0f58fc4a8362be86487258e4c149a | /example/Schema.py | 0968d1abc4a98ace09b1aaac38f4e33f3500e96d | [] | no_license | eddiedb6/schema | 416b41532e7c3726b88a8fb15197c1a61622c1bb | 72627caa15bdc097b9f80118ffcf9965f5ff5955 | refs/heads/master | 2020-05-21T04:33:54.705016 | 2019-02-14T09:11:43 | 2019-02-14T09:11:43 | 65,799,164 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,963 | py | {
SchemaConfigRoot: {
SchemaType: SchemaTypeDict,
SchemaRule: [
HasKey(Const.UI, Const.Action)
]
},
Const.UI: {
SchemaType: SchemaTypeDict,
SchemaRule: [
HasKey(Const.Name, Const.Type),
CheckAsTypeFromKey(Const.Type)
]
}... | [
"[email protected]"
] | |
2034adf0328604846a83fc1c284cfefbb7834f5b | 4f9de774a4a67ea6419bab6fbe3333028ab84fa0 | /logic/components/velocity.py | a131a706cd464efba6168992a99af551707df99e | [] | no_license | Zireael07/Flask-roguelike | 871c7584c4df424af0ce71ad2e548539c54721ae | 44ed1aafd3e2ff4fdf442d1b31b11cf35cf6f5d0 | refs/heads/master | 2020-09-27T13:12:23.227546 | 2020-01-03T14:45:39 | 2020-01-03T14:45:39 | 226,524,533 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 215 | py | class Velocity():
def __init__(self, dx=0, dy=0):
self.dx = dx
self.dy = dy
# readable representation
def __str__(self):
return 'Vel(dx='+str(self.dx)+', dy='+str(self.dy)+ ')'
| [
"[email protected]"
] | |
d73758a6e4a7b56359dd8ab165025a812fdfe00e | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/429/usersdata/309/98523/submittedfiles/jogoDaVelha_BIB.py | 077f0b29e7ef4040f1afea9f7eb009446dd540c9 | [] | 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 | 1,530 | py | # -*- coding: utf-8 -*-
from datetime import datetime
# autenticação do simbolo para a jogada humano
def solicitaSimboloDoHumano():
# nome=input('Qual seu nome(ou apelido)? ')
simbH= input("Qual o simbolo que você deseja utilizar no jogo? ")
while simbH!="X" and simbH!="x" and simbH!="O" and simbH!="o" :... | [
"[email protected]"
] | |
e71adbb986cb66140b07800f36e7086d3e5523cd | ac5e52a3fc52dde58d208746cddabef2e378119e | /exps-gsn-edf/gsn-edf_ut=3.5_rd=0.5_rw=0.04_rn=4_u=0.075-0.35_p=harmonic-2/sched=RUN_trial=4/params.py | 8a3f119b2e020763ecccd1a111e1a000b2370760 | [] | no_license | ricardobtxr/experiment-scripts | 1e2abfcd94fb0ef5a56c5d7dffddfe814752eef1 | 7bcebff7ac2f2822423f211f1162cd017a18babb | refs/heads/master | 2023-04-09T02:37:41.466794 | 2021-04-25T03:27:16 | 2021-04-25T03:27:16 | 358,926,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 253 | py | {'cpus': 4,
'duration': 30,
'final_util': '3.524833',
'max_util': '3.5',
'periods': 'harmonic-2',
'release_master': False,
'res_distr': '0.5',
'res_nmb': '4',
'res_weight': '0.04',
'scheduler': 'GSN-EDF',
'trial': 4,
'utils': 'uni-medium-3'}
| [
"[email protected]"
] | |
b2454946299a8748c66ae48602950df7191e9989 | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/pg_1323+042/sdB_pg_1323+042_coadd.py | b826cd815baf19301b82379a8ff8b83c57ce8070 | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 429 | py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[201.583167,3.965192], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_pg_1323+042/sdB_pg_1323+042_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdB/sdB_... | [
"[email protected]"
] | |
3b6c319dc0422c1182842c6d3eb219ef9dfa8e9d | c2566840fea739e40e8b93ba692fb861c885a82d | /setup.py | 4c2f5008c1cbc9fda6636dcbe78d1f951c9d7b7a | [
"MIT"
] | permissive | deeso/fiery-snap | e462fa35a2710ff5a356cef8d1bcabb398541f87 | c95cf4cd6089ea5b15a49440c684c687e8b417e6 | refs/heads/master | 2021-05-05T15:09:41.071803 | 2018-03-30T13:44:51 | 2018-03-30T13:44:51 | 117,293,928 | 14 | 6 | null | null | null | null | UTF-8 | Python | false | false | 666 | py | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
data_files = [(d, [os.path.join(d, f) for f in files])
for d, folders, files in os.walk(os.path.join('src', 'config'))]
setup(name='fiery-snap',
version='1.0',
description='connect together data flows',
author... | [
"[email protected]"
] | |
119dcbef5caee3c2e569f4eeecf04414e5af7500 | ea82f29e5e0c1a1aeac1edf4e9297a4d7d1003c1 | /backup/Ignorância Zero-backup/Ignorância Zero/059Exercício1.py | 76d6e417e4daacc77581efb126bfdc6490d9acb1 | [] | no_license | G-itch/Projetos | b66a4c41d8a073bf13dc993e71f5cddfba047f3a | 69a503a9c62cc887c0785a8d205c653eff402826 | refs/heads/master | 2023-04-20T08:26:59.181315 | 2021-05-05T15:33:40 | 2021-05-05T15:33:40 | 341,940,302 | 0 | 0 | null | 2021-05-05T15:33:40 | 2021-02-24T15:13:43 | Jupyter Notebook | UTF-8 | Python | false | false | 421 | py | class Quadrado(object):
def __init__(self,l):
self.lado = l
def mudar_valor(self,lado):
self.lado = lado
return self.lado
def retornar_lado(self):
return f"O lado do quadrado é igual a {self.lado}"
def área(self):
return f"A área do quadrado é igual a {self.lado*... | [
"[email protected]"
] | |
4c76c2ebcd10489a9dd46341289ea3e1e1a33e99 | 5b93930ce8280b3cbc7d6b955df0bfc5504ee99c | /nodes/VanderPlas17Python/C_Chapter2/I_StructuredData/D_Onto/index.py | 949fef6f3a6ef9e0fa59ab4d610d0ca3fdb9e857 | [] | no_license | nimra/module_gen | 8749c8d29beb700cac57132232861eba4eb82331 | 2e0a4452548af4fefd4cb30ab9d08d7662122cf4 | refs/heads/master | 2022-03-04T09:35:12.443651 | 2019-10-26T04:40:49 | 2019-10-26T04:40:49 | 213,980,247 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,201 | py | # Lawrence McAfee
# ~~~~~~~~ import ~~~~~~~~
from modules.node.HierNode import HierNode
from modules.node.LeafNode import LeafNode
from modules.node.Stage import Stage
from modules.node.block.CodeBlock import CodeBlock as cbk
from modules.node.block.HierBlock import HierBlock as hbk
from modules.node.block.ImageBlock ... | [
"[email protected]"
] | |
586d70d29746fed538966ba9258cfa7d67de7905 | 7bededcada9271d92f34da6dae7088f3faf61c02 | /pypureclient/flashblade/FB_2_7/models/array_connection_key_get_response.py | 6960a362ef6721c2cf3a867826a91bffea1cb82f | [
"BSD-2-Clause"
] | permissive | PureStorage-OpenConnect/py-pure-client | a5348c6a153f8c809d6e3cf734d95d6946c5f659 | 7e3c3ec1d639fb004627e94d3d63a6fdc141ae1e | refs/heads/master | 2023-09-04T10:59:03.009972 | 2023-08-25T07:40:41 | 2023-08-25T07:40:41 | 160,391,444 | 18 | 29 | BSD-2-Clause | 2023-09-08T09:08:30 | 2018-12-04T17:02:51 | Python | UTF-8 | Python | false | false | 4,277 | py | # coding: utf-8
"""
FlashBlade REST API
A lightweight client for FlashBlade REST API 2.7, developed by Pure Storage, Inc. (http://www.purestorage.com/).
OpenAPI spec version: 2.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typ... | [
"[email protected]"
] | |
6bd956775f12f250875477f676345e6b0e234bf8 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/adjectives/_legion.py | 5090b650106bfa138215037cce9864eaddf0603c | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 380 | py |
#calss header
class _LEGION():
def __init__(self,):
self.name = "LEGION"
self.definitions = [u'very large in number: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'adjectives'
def run(self, obj1, obj2):
self.jsondata[obj2] = {}
self.jsondata[obj... | [
"[email protected]"
] | |
1c07af723bbd25d1d1d976b25d84c6a4956b4734 | 84c9a6fb5e18741f14a55d0d737e2a556383770d | /venv/Lib/site-packages/w3af/plugins/audit/phishing_vector.py | 4b0519748eb2af2346eb67a13bcaf81251014def | [] | no_license | AravindChan96/Vulcan | 638a1db2f84df08bc50dd76c7f142014d529fbec | 5548a6f36f04108ac1a6ed8e707930f9821f0bd9 | refs/heads/master | 2022-11-05T15:05:54.224578 | 2020-06-19T20:44:14 | 2020-06-19T20:44:14 | 273,396,348 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,808 | py | """
phishing_vector.py
Copyright 2006 Andres Riancho
This file is part of w3af, http://w3af.org/ .
w3af 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 version 2 of the License.
w3af is distributed in the hope ... | [
"[email protected]"
] | |
f60c1eb3c8a6cb9f4f440d9385e77ee379db0e27 | f594560136416be39c32d5ad24dc976aa2cf3674 | /mmdet/models/utils/__init__.py | e74ba89e8c2101360d921a5f8437da48d0250e9a | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ShiqiYu/libfacedetection.train | bd9eb472c2599cbcb2f028fe7b51294e76868432 | dce01651d44d2880bcbf4e296ad5ef383a5a611e | refs/heads/master | 2023-07-14T02:37:02.517740 | 2023-06-12T07:42:00 | 2023-06-12T07:42:00 | 245,094,849 | 732 | 206 | Apache-2.0 | 2023-06-12T07:42:01 | 2020-03-05T07:19:23 | Python | UTF-8 | Python | false | false | 1,809 | py | # Copyright (c) OpenMMLab. All rights reserved.
from .brick_wrappers import AdaptiveAvgPool2d, adaptive_avg_pool2d
from .builder import build_linear_layer, build_transformer
from .ckpt_convert import pvt_convert
from .conv_upsample import ConvUpsample
from .csp_layer import CSPLayer
from .gaussian_target import gaussia... | [
"[email protected]"
] | |
52c36b71575238f0e602221a8231091745c3f7e7 | 63e2bed7329c79bf67279f9071194c9cba88a82c | /SevOneApi/python-client/test/test_flow_device_mapping_dto.py | f5a0fb8a90151ec40ab8e9ae1adadd21f084d03a | [] | no_license | jsthomason/LearningPython | 12422b969dbef89578ed326852dd65f65ab77496 | 2f71223250b6a198f2736bcb1b8681c51aa12c03 | refs/heads/master | 2021-01-21T01:05:46.208994 | 2019-06-27T13:40:37 | 2019-06-27T13:40:37 | 63,447,703 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 955 | py | # coding: utf-8
"""
SevOne API Documentation
Supported endpoints by the new RESTful API # noqa: E501
OpenAPI spec version: 2.1.18, Hash: db562e6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
... | [
"[email protected]"
] | |
04bf6220e402915f8d1332a869e2c2ba6796980f | 1dd7fecaa182c1d7a29460dc5385066b68bcf676 | /Inheritance - example 1/inheritance_ex_1.py | c18d95665de1909c9d64948bc046485bd709560e | [] | no_license | mainka1f/PythonUtilities | f081df31e6ea4311d4973ef7ba6bc0ff6be75fb1 | f310d088a7a7a5f2c95c27cba3a7985207568d62 | refs/heads/master | 2021-12-02T19:21:11.915510 | 2012-05-01T21:43:57 | 2012-05-01T21:43:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,670 | py | # Can a class talk to another class?
#
# DWB 052808
def func1(value):
print " From func1, value is ", value
class Class1():
class1Data=5
print " This is Class1(), class1Data = ", class1Data
def testPrint1(self):
print " 888888 This is def testPrint1"
# call_2_from_1=Class2()
cla... | [
"[email protected]"
] | |
2d9fa1e779bb18f4c5a6cdc8952046e41c32841e | cabe35a027a4c26a6360f60b00b176235d79c98b | /others/13.py | 89cefbd8b028eab64906e16e7c34a8e66aab9aae | [] | no_license | rishikant42/Python-TheHardWay | e3ac9c903be5065277095827a7e31662a1d56cbf | 5c1c7ff6c376627bc6b1abf1fc7a8d7f3ef40176 | refs/heads/master | 2022-07-23T15:12:32.572778 | 2022-06-25T10:29:52 | 2022-06-25T10:29:52 | 70,502,885 | 0 | 1 | null | 2017-02-26T12:51:23 | 2016-10-10T15:42:42 | Python | UTF-8 | Python | false | false | 282 | py | # recursive approach
def fact1(n):
if n == 1:
return 1
else:
return n * fact1(n-1)
# iterative approach
def fact2(n):
res = 1
for i in range(1,n+1):
res *= i
return res
print fact1(6)
print fact2(6)
import math
print math.factorial(6)
| [
"[email protected]"
] | |
9ec48f0b256ba4be2a48b69990488c3634b4b7d3 | 5b1ff6054c4f60e4ae7315db9f20a334bc0b7634 | /APC20/consts.py | a80a1506e7a792c468d852b8ff12a2d980fc556d | [] | no_license | maratbakirov/AbletonLive9_RemoteScripts | 2869122174634c75405a965401aa97a2dae924a1 | 4a1517c206353409542e8276ebab7f36f9bbd4ef | refs/heads/master | 2021-06-05T14:38:27.959025 | 2021-05-09T11:42:10 | 2021-05-09T11:42:10 | 13,348,327 | 3 | 4 | null | 2016-10-16T13:51:11 | 2013-10-05T16:27:04 | Python | UTF-8 | Python | false | false | 184 | py | #Embedded file name: /Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/APC20/consts.py
MANUFACTURER_ID = 71
ABLETON_MODE = 65
NOTE_MODE = 67 | [
"[email protected]"
] | |
66d338740fdb20e03fa286110358ce655f6f26da | e7031386a884ae8ed568d8c219b4e5ef1bb06331 | /ram/serializers.py | b87c62ef863a93dcee31c43b9f95f7700fede589 | [] | no_license | ikbolpm/ultrashop-backend | a59c54b8c4d31e009704c3bf0e963085477092cf | 290fa0ecdad40ec817867a019bff2ce82f08d6fe | refs/heads/dev | 2022-11-30T21:49:17.965273 | 2020-09-24T10:16:12 | 2020-09-24T10:16:12 | 147,561,738 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 225 | py | from rest_framework import serializers
from .models import Ram
class RamSerializer(serializers.ModelSerializer):
class Meta:
model = Ram
fields = [
'id',
'generation',
]
| [
"[email protected]"
] | |
9a55141c5b1f4d7d1780699da7390a14e77ea789 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-1/23833417cfe83723f088bea08e63844cae6f1121-<convert_dense_weights_data_format>-fix.py | 69a055d556bb6f7f95b4123fc14c444fa5fbfd70 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,728 | py |
def convert_dense_weights_data_format(dense, previous_feature_map_shape, target_data_format='channels_first'):
'Utility useful when changing a convnet\'s `data_format`.\n\n When porting the weights of a convnet from one data format to the other,\n if the convnet includes a `Flatten` layer\n (applied to t... | [
"[email protected]"
] | |
c382de0265f1f1ec89213eb1b3fdfd2e350d1205 | eeb469954b768095f2b8ad2376f1a114a3adb3fa | /399.py | 5b8d40d1b0b9c2f4aa9770d6b7d9621200cdd1c4 | [
"MIT"
] | permissive | RafaelHuang87/Leet-Code-Practice | ef18dda633932e3cce479f7d5411552d43da0259 | 7754dcee38ffda18a5759113ef06d7becf4fe728 | refs/heads/master | 2020-07-18T20:09:10.311141 | 2020-02-11T09:56:39 | 2020-02-11T09:56:39 | 206,305,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 798 | py | class Solution:
def calcEquation(self, equations: List[List[str]], values: List[float], queries: List[List[str]]) -> List[float]:
import collections
def dfs(x, y, graph, visited):
if x not in graph or y not in graph:
return -1
if x == y: return 1
... | [
"[email protected]"
] | |
05bf8a2b61905ec7be7a20f74f1fac33bed20718 | 6a3af6fe669b2e17db1fa7d0751cbc4e04948079 | /fn_utilities/fn_utilities/components/utilities_xml_transformation.py | 4045c55e0ea7cf1fa36decd6a8d1b5931e341ba4 | [
"MIT"
] | permissive | jjfallete/resilient-community-apps | 5f0a728fe0be958acc44d982bf0289959f84aa20 | 2e3c4b6102555517bad22bf87fa4a06341714166 | refs/heads/master | 2022-04-17T13:20:36.961976 | 2020-04-13T07:03:54 | 2020-04-13T07:03:54 | 169,295,943 | 1 | 0 | MIT | 2020-04-13T07:03:56 | 2019-02-05T19:06:57 | Python | UTF-8 | Python | false | false | 3,313 | py | # -*- coding: utf-8 -*-
# pragma pylint: disable=unused-argument, no-self-use
"""Function implementation"""
import logging
from lxml import etree
import os
from resilient_circuits import ResilientComponent, function, handler, StatusMessage, FunctionResult, FunctionError
class FunctionComponent(ResilientComponent):
... | [
"[email protected]"
] | |
2f50e3dff496deca069c7a1bdc2f9db071839fe6 | fc29ccdcf9983a54ae2bbcba3c994a77282ae52e | /Leetcode_By_Topic/backtrack-037.py | 86ec511949455de352be7b227edc243671f39727 | [] | no_license | linnndachen/coding-practice | d0267b197d9789ab4bcfc9eec5fb09b14c24f882 | 5e77c3d7a0632882d16dd064f0aad2667237ef37 | refs/heads/master | 2023-09-03T19:26:25.545006 | 2021-10-16T16:29:50 | 2021-10-16T16:29:50 | 299,794,608 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,559 | py | from typing import List
class Solution:
def solveSudoku(self, board: List[List[str]]) -> None:
"""
Do not return anything, modify board in-place instead.
"""
self.backtrack(board, 0, 0)
def backtrack(self, board, r, c):
# Go to next empty sp... | [
"[email protected]"
] | |
bc91f06774edb26b8793277101e26cf610a1def6 | d29293cbaef904a8b1cae69b94ff215fe5e52af3 | /website-sosokan/sosokan/migrations/0056_auto_20161217_1903.py | e15639273abd6aff023c399eb51617ef08a2d02c | [] | no_license | Sosoking328/BeautyContest | e00e22a8b8539846e5f39802fab927804bf81e3e | 5689640be30d92a81a9f4d50e348fec26705a149 | refs/heads/master | 2022-12-11T22:53:31.419871 | 2017-07-21T20:56:39 | 2017-07-21T20:56:39 | 97,427,120 | 1 | 0 | null | 2022-12-07T23:57:43 | 2017-07-17T02:29:38 | Python | UTF-8 | Python | false | false | 1,514 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-12-18 00:03
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sosokan', '0055_auto_20161215_2006'),
]
operations = [
migra... | [
"[email protected]"
] | |
96b40d4b78c509377f89326c15ed85475f2edc54 | 87fdda531054e0bbbaa0c88fc8bb21426d8466c4 | /blog/views.py | 7e0f8857efdcd090ed7284d8c281e5d3206bdb87 | [] | no_license | fanyang668/mysite | ef771586f4ed192844875ff050047960bf63c9cd | 1d8e02997f90d4f0f4b46590a398d9f12083a210 | refs/heads/master | 2021-08-30T00:47:02.019599 | 2017-12-15T12:17:31 | 2017-12-15T12:17:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 516 | py | from django.shortcuts import render, get_object_or_404
from .models import BlogArticles
# Create your views here.
def blog_title(request):
blogs = BlogArticles.objects.all()
return render(request, 'blog/titles.html', {'blogs': blogs})
def article_title(request, article_id):
# article = BlogArticles.obj... | [
"[email protected]"
] | |
78e0b151b1426fb3a47c554d33ae1df1193ee67f | 7f771a20879dab8bb48309d98ffe6f1125204abb | /users/views.py | bcb4b9ec473582737beabc6e0e500e6d409a4b23 | [] | no_license | sergiy-chumachenko/all-auth | 34269aadada2d8d7dbc32c64ec5435ba9c68bbae | 79ec735c702f535360f8b547b71e9e14d5be6e0c | refs/heads/master | 2022-12-12T00:38:02.378627 | 2020-07-12T09:05:21 | 2020-07-12T09:05:21 | 193,956,902 | 1 | 0 | null | 2022-04-22T21:53:14 | 2019-06-26T18:21:24 | Python | UTF-8 | Python | false | false | 270 | py | from django.views.generic import CreateView
from django.urls import reverse_lazy
from .forms import CustomUserCreationForm
class SignUpView(CreateView):
template_name = 'signup.html'
form_class = CustomUserCreationForm
success_url = reverse_lazy('login')
| [
"[email protected]"
] | |
484e7b413bbeb560929b680ac097f71c1dd5e2d9 | 26fc334777ce27d241c67d97adc1761e9d23bdba | /tests/django_tests/tests/staticfiles_tests/cases.py | 918ec4f99e43c2544f29a71013c544dcea1e3953 | [
"BSD-3-Clause"
] | permissive | alihoseiny/djongo | 1434c9e78c77025d7e0b3330c3a40e9ea0029877 | e2edf099e398573faa90e5b28a32c3d7f1c5f1e9 | refs/heads/master | 2020-03-27T23:27:02.530397 | 2018-08-30T14:44:37 | 2018-08-30T14:44:37 | 147,317,771 | 2 | 1 | BSD-3-Clause | 2018-09-04T09:00:53 | 2018-09-04T09:00:53 | null | UTF-8 | Python | false | false | 4,385 | py | import codecs
import os
import shutil
import tempfile
from django.conf import settings
from django.core.management import call_command
from django.template import Context, Template
from django.test import SimpleTestCase, override_settings
from .settings import TEST_SETTINGS
class BaseStaticFilesMixin:
"""
T... | [
"[email protected]"
] | |
a47718f6027b7994870b738ed4ba9c3887c47f3b | 993ff3e6eb510b5083db5f15f2c0299c05a2c0f6 | /hr_leave_calculation/models/hr_payslip_leave.py | 249a42b9c4bfe8dcaf554da7e24cc2ec02be2c22 | [] | no_license | Raghupathy15/Sigma | 36b24e76e81bad4ae5435508018f1c960878901d | 42eed3b211a7be8d8c9b70dc359a432c02be07f1 | refs/heads/main | 2023-01-31T18:25:09.712666 | 2020-12-09T09:22:17 | 2020-12-09T09:22:17 | 319,904,130 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,200 | py | import base64
import logging
from odoo import api, fields, models
from odoo import tools, _
from odoo.exceptions import ValidationError, AccessError
from odoo.modules.module import get_module_resource
from datetime import datetime
class HrPayslipLeave(models.Model):
_name='hr.payslip.leave'
#establishing the one2m... | [
"[email protected]"
] | |
650dd79043efc6560641569792262a2d69200509 | cbc5e26bb47ae69e80a3649c90275becf25ce404 | /xlsxwriter/test/styles/test_write_cell_xfs.py | 3dc4700ec4158cc5e3987704539c462907e5ea23 | [
"BSD-2-Clause-Views",
"BSD-3-Clause",
"MIT"
] | permissive | mst-solar-car/kicad-bom-generator | c3549409c3139f787ad28391372b5cb03791694a | 2aae905056d06f3d25343a8d784049c141d05640 | refs/heads/master | 2021-09-07T14:00:40.759486 | 2018-02-23T23:21:13 | 2018-02-23T23:21:13 | 107,868,801 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 970 | py | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2017, John McNamara, [email protected]
#
import unittest
from ...compatibility import StringIO
from ...styles import Styles
from ...format import Format
class TestWriteCellXfs(unittest.T... | [
"[email protected]"
] | |
3ff9e02698530cd2acb3ebe154d35b9db080f78c | 2fed297f777ac6a01f21870d74e4259ed0c17dfd | /examples/distributions/continuous/comparisons.py | f3741b9fc6332da0e64e6626ef4e8762716053cb | [
"MIT"
] | permissive | vahndi/probability | 1bf4e5e7835d5dc57b5a5a43d76ded2b23975ec5 | ff3f5434d3da0d46b127b02cf733699e5a43c904 | refs/heads/master | 2023-05-24T17:04:00.430326 | 2023-05-22T13:53:41 | 2023-05-22T13:53:41 | 231,456,036 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,214 | py | import matplotlib.pyplot as plt
from math import sqrt
from numpy import arange
from examples.colors import ML_APP_DARK_BLUE
from probability.distributions import Normal, Laplace
from probability.distributions.continuous.students_t import StudentsT
x = arange(-4, 4.01, 0.05)
def plot_normal_students_t_laplace():
... | [
"[email protected]"
] | |
9f52785f1e128273a432d4fd107afdce23cc2482 | 4142b8c513d87361da196631f7edd82f11465abb | /python/globalround17/1610A.py | 43f737746b3709c50f36fc2d47e6019e07c30e65 | [] | no_license | npkhanhh/codeforces | b52b66780426682ea1a3d72c66aedbe6dc71d7fe | 107acd623b0e99ef0a635dfce3e87041347e36df | refs/heads/master | 2022-02-08T17:01:01.731524 | 2022-02-07T10:29:52 | 2022-02-07T10:29:52 | 228,027,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | from sys import stdin
for _ in range(int(stdin.readline())):
a, b = list(map(int, stdin.readline().split()))
if a == 1 and b == 1:
print(0)
else:
print(min([a, b, 2]))
| [
"[email protected]"
] | |
6f61be457dacf2ea995176cc6b5ab19159a4408c | 0d87906ca32b68965c3aa5b4cb829383276b13c8 | /tests/extension/thread_/axi_dma_long_wide/thread_axi_dma_long_wide.py | b470e2299c027001f75aea514eca00311c865250 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | tanbour/veriloggen | 301beea3d9419c2d63d1d1159a2ec52ed316ef20 | 858fbc872be78964cfc7e5a23e1491b2c3d5cf52 | refs/heads/master | 2020-03-18T20:38:24.653119 | 2018-05-19T04:49:01 | 2018-05-19T04:49:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,275 | py | from __future__ import absolute_import
from __future__ import print_function
import sys
import os
# the next line can be removed after installation
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))))
from veriloggen import *
import ve... | [
"[email protected]"
] | |
b179a283949bcad747cb9b49e48b4d422e022aaa | 4b68243d9db908945ee500174a8a12be27d150f9 | /pogoprotos/networking/requests/messages/use_item_move_reroll_message_pb2.py | 273b1820e6a4533e1e3bde4d1ba0975d24b6c332 | [] | no_license | ykram/pogoprotos-py | 7285c86498f57dcbbec8e6c947597e82b2518d80 | a045b0140740625d9a19ded53ece385a16c4ad4a | refs/heads/master | 2020-04-20T10:19:51.628964 | 2019-02-02T02:58:03 | 2019-02-02T02:58:03 | 168,787,721 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | true | 3,705 | py | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/networking/requests/messages/use_item_move_reroll_message.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message... | [
"[email protected]"
] | |
e9cb1df974800fca9dbdcdd57dfd6d44af0d781e | a74cabbe1b11fc8ef575ea86f2543cd95db78ec9 | /python_program/q813_Largest_Sum_of_Averages.py | ba6895f075efa57a8d1917bfbb87dbf17a1b3760 | [] | no_license | tszandy/leetcode | 87e3ccf291b2879637d2d8238935a455b401a78a | f1f4361541dcffbb291285663c8820d7ffb37d2f | refs/heads/master | 2023-04-06T15:34:04.847875 | 2023-03-26T12:22:42 | 2023-03-26T12:22:42 | 204,069,234 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,358 | py | from typing import List
from collections import Counter,defaultdict,deque
from math import *
from functools import reduce,lru_cache,total_ordering
import numpy as np
from heapq import *
from bisect import bisect_left,bisect_right
from itertools import count,zip_longest
import queue
class Solution:
def largestSumOf... | [
"[email protected]"
] | |
675804bc3995971da75d7f7dc54fd7b0cfca0c94 | 9ac35a2327ca9fddcf55077be58a1babffd23bdd | /cadence/replay_interceptor.py | 7a511b6fc7c5bd8161e0861eb3de409232798476 | [
"MIT"
] | permissive | meetchandan/cadence-python | f1eb987c135f620607a62495096a89494216d847 | cfd7a48e6da7c289c9ae0c29c94d12d2b05986e4 | refs/heads/master | 2022-12-14T12:46:32.364375 | 2020-09-16T15:50:55 | 2020-09-16T15:50:55 | 260,763,097 | 1 | 0 | MIT | 2020-09-16T15:48:14 | 2020-05-02T19:47:56 | Python | UTF-8 | Python | false | false | 719 | py | import inspect
from typing import Callable
def get_replay_aware_interceptor(fn: Callable):
def interceptor(*args, **kwargs):
from cadence.decision_loop import ITask
task: ITask = ITask.current()
if not task.decider.decision_context.is_replaying():
return fn(*args, **kwargs)
... | [
"[email protected]"
] | |
8ed2c23107f1e3c65b51da65f817da0e32039f3b | 6b37deabac3116e65bc869035cf8cfa50f22590c | /past/past3/c_geometric_progression/main.py | 5f19e1e8cdefd25049f0dda8767837bd2e333831 | [] | no_license | hiromichinomata/atcoder | 92122a2a2a8b9327f4c8dc0e40889e8dc0321079 | 82216622d9040e95239b4a21e973cb12e59d7f6e | refs/heads/master | 2022-10-05T04:00:44.509719 | 2022-08-14T04:46:49 | 2022-08-14T04:46:49 | 176,891,471 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 261 | py | #!/bin/python3
# pypy3
import sys
input = sys.stdin.readline
def main():
a, r, n = list(map(int, input().strip().split()))
v = a
LIMIT = 10**9
for _ in range(n-1):
v *= r
if v > LIMIT:
print('large')
sys.exit()
print(v)
main()
| [
"[email protected]"
] | |
b7ef3750a7d4fe8089d84c6855b84748143367c2 | 5fda498ef0bfc06962ad9b864d229193c45ccb4a | /Project1_Analyzing_the_NYC_Subway_Dataset/problem_sets2to5/problem_set2_wrangling_subway_data/2_9_get_hourly_exits.py | f4774640992d40f8fab48a745798f5a75ac894b5 | [] | no_license | prabhurgit/Data_Aanlyst_Nanodegree_projects | 7934869b63cae57cb2851e22a5023c6cbe3d18ba | a7a13d93c632cd1840ba3a00fff80a60a131b7f3 | refs/heads/master | 2021-05-31T18:47:48.669414 | 2016-03-30T04:08:39 | 2016-03-30T04:08:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,406 | py | import pandas
def get_hourly_exits(df):
'''
The data in the MTA Subway Turnstile data reports on the cumulative
number of entries and exits per row. Assume that you have a dataframe
called df that contains only the rows for a particular turnstile machine
(i.e., unique SCP, C/A, and UNIT). This fu... | [
"[email protected]"
] | |
d0c266d3816a85e94982006addc47834bed26724 | beae392dcd51001613e5d3e226587d646d854c1f | /ML_Finance/NumpySumRowsColumns.py | 1aa0c502cc9ad2908e0d0a1bdc501c332b60bb86 | [] | no_license | ShubraChowdhury/ML | 2c7a0a51ca657dda47ceb8a19cecbcafa6cd16b0 | 1e631f2ab86bfd35e2c8790501a7effb4e0d106a | refs/heads/master | 2021-05-15T14:44:28.753164 | 2018-11-18T14:06:48 | 2018-11-18T14:06:48 | 106,418,011 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 782 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 26 08:39:38 2016
@author: DevAdmin
"""
import numpy as np
def test_run():
print("Random seed initializing the pseudo-random number generator.\n",
"Each time you run the random variable generator you will \n",
"get the same value... | [
"[email protected]"
] | |
fa38ee2c202a55385c5053c08d36f4cf040a5090 | 7725cafb8259f94cd9b3e2240182eb90d0e5246f | /src/scripts/icu_transliterate.py | e83fb9ba9c8e6b66c954df8aa0eac69e56227635 | [] | no_license | rasoolims/zero-shot-mt | c95cee19b583b428941932cd93e45025a919f1d8 | 33830dc7e48fa4a06641590cfaa0f4eb52c2e314 | refs/heads/master | 2023-08-22T07:07:54.093714 | 2021-10-08T22:36:39 | 2021-10-08T22:36:39 | 364,627,830 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | import os
import sys
import icu
tl = icu.Transliterator.createInstance('Any-Latin; Latin-ASCII')
with open(os.path.abspath(sys.argv[1]), "r") as r, open(os.path.abspath(sys.argv[2]), "w") as w:
for i, line in enumerate(r):
transliteration = tl.transliterate(line.strip())
w.write(transliteration)
... | [
"[email protected]"
] | |
ae148a59eca9f309030041953e95838ba788030e | 6b9b032a5516c8d7dbb26deeb1b189022f8f9411 | /LeetCode/arrary/easy/118.杨辉三角.py | 33fb9a2306f182e155161f1caca7c305cd6bc9c0 | [] | no_license | mrmenand/Py_transaction | 84db99a0010ae90f43fba6b737d7035e48af55fb | 7e82422c84ad699805cc12568b8d3d969f66a419 | refs/heads/master | 2021-07-13T21:15:03.714689 | 2020-06-21T11:49:31 | 2020-06-21T11:49:31 | 176,281,954 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,290 | py | # 118.杨辉三角
class Solution:
def generate(self, numRows):
ret = [[1] * i for i in range(1,numRows+1)]
for i in range(2,numRows):
for j in range(1,i):
ret[i][j] = ret[i-1][j] + ret[i-1][j-1]
return ret
# class Solution:
# def generate(self, numRows):
# ... | [
"[email protected]"
] | |
44c406f18354a8c9152bbfa3c76ca89805199ac9 | 11dbb589aa305a1f33525f6ead538330aa1ae677 | /modelling/devices/convertors.py | 309fd9568f5b7d1b962a7f030d7a8c798b74a0fd | [
"MIT"
] | permissive | riahtu/EnergyManagementSystem | e70f48d70dc59a3cf6089149ec17b4dac054439e | 2a48ba3b9bf7ff3003c197ee43ea9efbfbe42baa | refs/heads/master | 2021-09-09T14:27:20.170163 | 2018-03-17T01:51:03 | 2018-03-17T01:51:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,293 | py | """
Convertor models for universal energy management system
The models include the following types of convertors.
1) AC 2 DC convertors
2) DC 2 DC convertors
"""
import configuration.configuration_convertors as default_parameters
BIC = \
{
"ID": default_parameters.BIC["AREA"], # Static information
"SMAX": default... | [
"[email protected]"
] | |
3f61d5add3da668acc3f4a002df63ca6c9826407 | 57cb9fef5efac78758f5d151b959ca2216c94083 | /edx/app/analytics_api/venvs/analytics_api/bin/cwutil | d16864d59606f61bb57c2e230c1973db1db7d249 | [] | no_license | JosiahKennedy/openedx-branded | 9751d5362088276a87b2e0edca0913568eeb1ac4 | d16a25b035b2e810b8ab2b0a2ac032b216562e26 | refs/heads/master | 2022-12-21T02:39:17.133147 | 2020-03-25T06:03:23 | 2020-03-25T06:03:23 | 249,895,218 | 0 | 1 | null | 2022-12-08T01:23:48 | 2020-03-25T05:33:05 | null | UTF-8 | Python | false | false | 5,083 | #!/edx/app/analytics_api/venvs/analytics_api/bin/python2.7
# Author: Chris Moyer <[email protected]>
# Description: CloudWatch Utility
# For listing stats, creating alarms, and managing
# other CloudWatch aspects
import boto
cw = boto.connect_cloudwatch()
from datetime import datetime, timedelta
def _parse_time(ti... | [
"[email protected]"
] | ||
3365f9a3741b09624b9cb9f33dbbe0772f11f3f0 | c71d332dd845036c21c9fd8f4f571f9209bf2672 | /Remove K Digits.py | d0debe9c725fa1a85abe458b44127cde95a061cc | [] | no_license | diksha12p/DSA_Practice_Problems | 2884fd9e77094d9662cb8747744dd2ef563e25e4 | d56e3d07620d51871199f61ae82cff2bd75b4744 | refs/heads/master | 2023-01-20T15:31:37.824918 | 2020-11-29T21:37:12 | 2020-11-29T21:37:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,449 | py | """
Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the
smallest possible.
Note:
The length of num is less than 10002 and will be ≥ k.
The given num does not contain any leading zero.
Example 1:
Input: num = "1432219", k = 3
Output: "1219"
Explanatio... | [
"[email protected]"
] | |
a3ea6474e50b140da2329e05fcf499abc667ef99 | ea1af1a564f96fb36974aa094192877598b0c6bf | /Chapter5/Exercises/ex5_6.py | 1f18d6252d311a11cea4128fa003c09bcec92874 | [] | no_license | GSantos23/Crash_Course | 63eecd13a60141e520b5ca4351341c21c4782801 | 4a5fc0cb9ce987948a728d43c4f266d34ba49a87 | refs/heads/master | 2020-03-20T23:20:43.201255 | 2018-08-21T01:13:06 | 2018-08-21T01:13:06 | 137,841,877 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,062 | py | # Exercise 5.6
"""
Stages of Life: Write an if - elif - else chain that determines a person’s
stage of life. Set a value for the variable age , and then:
• If the person is less than 2 years old, print a message that the person
is a baby.
• If the person is at least 2 years old but less than 4, print a message
that... | [
"[email protected]"
] | |
9d84e3bc55c3151f848a83afe7ea6ccc17c78ccf | 1450bb467a73b80a3e3f649fd9423679482a235a | /test/printEgammaUserData.py | 5c558ea0fee2f17400d678aad9111dd962eecf89 | [] | no_license | cms-egamma/EgammaPostRecoTools | 430d57decd747f16904d06ccb8f61a0556ef2bb2 | 209673a77cd91b36f1fe3f09579b7f7fc4552089 | refs/heads/master | 2021-09-25T09:38:01.836119 | 2021-09-17T14:19:49 | 2021-09-17T14:19:49 | 223,762,349 | 0 | 4 | null | 2021-04-04T16:59:18 | 2019-11-24T15:03:11 | Python | UTF-8 | Python | false | false | 2,846 | py | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from DataFormats.FWLite import Events, Handle
import ROOT
import argparse
def convert_to_str(vec_str):
output = ""
for entry in vec_str:
if output != "": output+="\n "... | [
"[email protected]"
] | |
32d5735e30c382c4e7768e9ca3cfbc44ac537e6d | 55c250525bd7198ac905b1f2f86d16a44f73e03a | /Python/Projects/twilio/tests/integration/numbers/v2/regulatory_compliance/test_supporting_document.py | c6d7aab5bb0875c1e174a0bdd4fc75c4d84b9225 | [
"LicenseRef-scancode-other-permissive"
] | permissive | NateWeiler/Resources | 213d18ba86f7cc9d845741b8571b9e2c2c6be916 | bd4a8a82a3e83a381c97d19e5df42cbababfc66c | refs/heads/master | 2023-09-03T17:50:31.937137 | 2023-08-28T23:50:57 | 2023-08-28T23:50:57 | 267,368,545 | 2 | 1 | null | 2022-09-08T15:20:18 | 2020-05-27T16:18:17 | null | UTF-8 | Python | false | false | 129 | py | version https://git-lfs.github.com/spec/v1
oid sha256:b7f19e719e96de6cf10ec0f84fda59ffe9a97e89340d069975676ef4fca5b46d
size 8793
| [
"[email protected]"
] | |
531654703bc4607c33e930eb411f8c3da0423548 | 072f8bffbfef6e149ad1934ea9183a79864c1acd | /venv/Lib/site-packages/ironic_inspector_client/test/test_common_http.py | b7a15d5a131c23653b35f8a98bf9f8c3300b7dca | [] | no_license | numvc/LuxoftBot | 77d9bf8f5f63aee63350f1ec82f4b940afe203d2 | 29d7ca8868ab86bc076509d103f7596039333417 | refs/heads/master | 2020-09-21T21:37:12.527546 | 2019-12-04T23:24:35 | 2019-12-04T23:24:35 | 224,939,956 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,174 | py | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | [
"[email protected]"
] | |
4ad05ebbeca5160b6ac94c8e898cfc8f3c38295f | 22b348a0d10519cb1f1da5e886fdf2d3c167cf5a | /myweb/api/controllers/v1/schemas/user.py | 407d624aefe8d1983e695e6d585c34ae1be6d667 | [] | no_license | liuluyang/openstack_mogan_study | dab0a8f918ffd17e0a747715998e81304672b75b | 8624f765da7f5aa0c210f0fa945fc50cf8a67b9e | refs/heads/master | 2021-01-19T17:03:15.370323 | 2018-04-12T09:50:38 | 2018-04-12T09:50:38 | 101,040,396 | 1 | 1 | null | 2017-11-01T02:17:31 | 2017-08-22T08:30:22 | Python | UTF-8 | Python | false | false | 505 | py | from myweb.api.validation import parameter_types
metadata = {
'type': 'object',
'patternProperties': {
'^[a-zA-Z0-9-_:. ]{1,255}$': {
'type': 'string', 'maxLength': 255, 'minLength':1
}
},
'additionalProperties': False
}
user_add = {
'type': 'object',
'properties': ... | [
"[email protected]"
] | |
6aede4f0a10c3494cb90fe869bdc6fdb62075c3c | 8520c991dc543f5f4e1efe59ab401824173bb985 | /565-array-nesting/solution.py | 078594952952ef661f9c1760257fa4f6bfdf44c3 | [] | no_license | katryo/leetcode | d44f70f2853c4f5ea9a462d022feb0f5436c2236 | 0da45559271d3dba687858b8945b3e361ecc813c | refs/heads/master | 2020-03-24T12:04:53.859047 | 2020-02-18T04:27:55 | 2020-02-18T04:27:55 | 142,703,107 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 897 | py | class Solution(object):
def arrayNesting(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
moves_to_end = [-1] * len(nums)
for i in range(len(nums)):
if moves_to_end[i] != -1:
continue
visited = set()
path = [... | [
"[email protected]"
] | |
6ef83d142494ed6bb3e2514a5a63d600fac7ecdf | c4afc78e2e8ffbcc430b8799e3e1073dac8e972d | /src/themester/views.py | b862f20737f533596cc82d36a9688be279b8cedd | [
"MIT"
] | permissive | pauleveritt/themester-pre-hypermodern | 5c04197c7d4589b29709c736b3bcd02312e40a61 | 219595956f8ca1886d0c30b33efd86234aaf57ec | refs/heads/master | 2023-08-27T18:53:52.693340 | 2020-11-22T15:04:25 | 2020-11-22T15:04:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,482 | py | """
Like a component, but with for_=View only.
"""
from typing import Callable, Optional, Type
from venusian import Scanner, attach
from wired import ServiceContainer, ServiceRegistry
from wired_injector.injector import Injector
from themester.protocols import View
def register_view(
registry: ServiceRegis... | [
"[email protected]"
] | |
222d709d64de1813eca0d9d49af5111d7c124b88 | 0e91030c47071029d978dbfb9e7a30ae6826afe5 | /venv/Scripts/easy_install-script.py | a0923dd8d08599e350611459fd8c7d659ba84dc3 | [] | no_license | liqi629/python_lemon | 095983fadda3639b058043b399180d19f899284b | bc5e6e6c92561ba9cec2798b7735505b377e9cd6 | refs/heads/master | 2023-02-04T00:57:09.447008 | 2020-12-27T14:46:31 | 2020-12-27T14:46:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 464 | py | #!C:\Users\lipan\PycharmProjects\lemon_python_learning\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install'
__requires__ = 'setuptools==40.8.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-s... | [
"[email protected]"
] | |
c0d46bae7bb41fb5836e0cddab066566832ec3b3 | c6759b857e55991fea3ef0b465dbcee53fa38714 | /tools/nntool/nntool/quantization/verify_quantization.py | 70b3ea3146bfa1c5422a82a807a5c2ebef945dbe | [
"AGPL-3.0-or-later",
"AGPL-3.0-only",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"Apache-2.0"
] | permissive | GreenWaves-Technologies/gap_sdk | 1b343bba97b7a5ce62a24162bd72eef5cc67e269 | 3fea306d52ee33f923f2423c5a75d9eb1c07e904 | refs/heads/master | 2023-09-01T14:38:34.270427 | 2023-08-10T09:04:44 | 2023-08-10T09:04:44 | 133,324,605 | 145 | 96 | Apache-2.0 | 2023-08-27T19:03:52 | 2018-05-14T07:50:29 | C | UTF-8 | Python | false | false | 3,015 | py | # Copyright (C) 2020, 2021 GreenWaves Technologies, SAS
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This... | [
"[email protected]"
] | |
1706a5f900e84feda55426b1a048153a06e8fd8c | 6d05f11c55ea277a08fc375b1c5af5ecc076000b | /python/paddle/fluid/tests/unittests/test_fleet_nocvm_1.py | 2959043482c9a587feffe35476ba2e6f4102938e | [
"Apache-2.0"
] | permissive | sfraczek/Paddle | 8602df1b11937400f93ac5861a366226208a6f05 | d1e2c61b22b9675adc3c4a52227d2220babaa001 | refs/heads/develop | 2023-04-04T22:52:42.629243 | 2023-03-16T12:06:10 | 2023-03-16T12:06:10 | 140,574,617 | 0 | 0 | Apache-2.0 | 2019-03-26T15:54:00 | 2018-07-11T12:51:20 | C++ | UTF-8 | Python | false | false | 4,102 | py | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | [
"[email protected]"
] | |
418990d7fc131fafa72d7cf2a4e781b2938d3a2f | 71327347c4ffe832b656edd40bdcdaf13f123e16 | /pywolf/migrations/0018_auto_20180722_2259.py | 8633d5ea8314a6bddcc80c7ee880e3b9c12ae265 | [
"BSD-3-Clause"
] | permissive | tevawolf/pywolf | 8b58570deac4a33643c323c1ff9754e0ce2b33ed | 94e3c26d8c3b279990624f23658e22ab00eead46 | refs/heads/master | 2020-04-02T12:17:12.680330 | 2018-11-19T07:34:42 | 2018-11-19T07:34:42 | 154,426,897 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,844 | py | # Generated by Django 2.0.6 on 2018-07-22 13:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pywolf', '0017_villageparticipantvoice_voice_order'),
]
operations = [
migrations.AddField(
model_name='mvoicesetting',
... | [
"[email protected]"
] | |
edd042f5b2d0fa90c43f9451ea0b8549a7e1d32b | 7bededcada9271d92f34da6dae7088f3faf61c02 | /pypureclient/flashblade/FB_2_10/models/object_store_access_policy_action_response.py | 2a0764dd2f2a1eec8de689c8e0f360a56fadcca5 | [
"BSD-2-Clause"
] | permissive | PureStorage-OpenConnect/py-pure-client | a5348c6a153f8c809d6e3cf734d95d6946c5f659 | 7e3c3ec1d639fb004627e94d3d63a6fdc141ae1e | refs/heads/master | 2023-09-04T10:59:03.009972 | 2023-08-25T07:40:41 | 2023-08-25T07:40:41 | 160,391,444 | 18 | 29 | BSD-2-Clause | 2023-09-08T09:08:30 | 2018-12-04T17:02:51 | Python | UTF-8 | Python | false | false | 3,268 | py | # coding: utf-8
"""
FlashBlade REST API
A lightweight client for FlashBlade REST API 2.10, developed by Pure Storage, Inc. (http://www.purestorage.com/).
OpenAPI spec version: 2.10
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import t... | [
"[email protected]"
] | |
08bfeae2350ed1c651b3c15cf39558ddead399b8 | f810836bea801f2fa85418ac7f5f5ffb0f3e0bda | /abc/abc237/D - LR insertion.py | b87e8c318a6bc75b348e71e58c1c21e407f300c6 | [] | no_license | cocoinit23/atcoder | 0afac334233e5f8c75d447f6adf0ddf3942c3b2c | 39f6f6f4cc893e794d99c514f2e5adc9009ee8ca | refs/heads/master | 2022-08-29T06:01:22.443764 | 2022-07-29T07:20:05 | 2022-07-29T07:20:05 | 226,030,199 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 384 | py | """
from collections import deque
n = int(input())
s = input()
ans = deque([n])
for i in range(n - 1, -1, -1):
if s[i] == 'R':
ans.appendleft(i)
else:
ans.append(i)
print(*ans)
"""
n = int(input())
s = input()
l = []
r = []
for i, c in enumerate(s):
if c == 'L':
r.append(i)
... | [
"[email protected]"
] | |
5c7375b81cad282b805c1d33d481cec56fd46b9d | 4f83471a669772731a7b1781d46be6c4eba7ef33 | /脚本化爬虫/购物类/Frys/get_Frys_info.py | a162ac5428aa36b14676fd4ff1170924dfb7a137 | [] | no_license | odtu945/LiuFan_Spider | 19a5eb08ebafc5865931bdf96aea2b9dd436a614 | 848b3aff4754c102491b201684858c3f116ff90b | refs/heads/master | 2022-01-05T10:12:32.085245 | 2019-03-24T02:30:38 | 2019-03-24T02:30:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,779 | py | import codecs
import re
from Tools import get_html
import time
import pytz
import random
from datetime import datetime,timedelta
from multiprocessing import Pool,Lock
# #把list洗乱
# def shuffle_list(list_name):
#
# from random import shuffle
# shuffle(list_name)
# # 返回随机排序后的序列
# return list_name
#
# #传入商... | [
"[email protected]"
] | |
9bde53a4965ad421599d521020416e1db9e0916f | c50e7eb190802d7849c0d0cea02fb4d2f0021777 | /src/amg/azext_amg/vendored_sdks/_dashboard_management_client.py | 673cde0f190c519ac78730831c000fed3d99e2f4 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Azure/azure-cli-extensions | c1615b19930bba7166c282918f166cd40ff6609c | b8c2cf97e991adf0c0a207d810316b8f4686dc29 | refs/heads/main | 2023-08-24T12:40:15.528432 | 2023-08-24T09:17:25 | 2023-08-24T09:17:25 | 106,580,024 | 336 | 1,226 | MIT | 2023-09-14T10:48:57 | 2017-10-11T16:27:31 | Python | UTF-8 | Python | false | false | 5,405 | 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 ... | [
"[email protected]"
] | |
6b3b6c712d369e9de58b67fd7edfeb5615cd37e1 | a5e6ce10ff98539a94a5f29abbc053de9b957cc6 | /competition/20181125/d.py | da13b71ffe3d2ec5a7d23f0f506885ff52d138b9 | [] | no_license | shimaw28/atcoder_practice | 5097a8ec636a9c2e9d6c417dda5c6a515f1abd9c | 808cdc0f2c1519036908118c418c8a6da7ae513e | refs/heads/master | 2020-07-26T10:59:51.927217 | 2020-06-13T11:53:19 | 2020-06-13T11:53:19 | 208,622,939 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py | s = input()
#%%
# s = "codethanksfes"
#%%
a = s[0]
ans = 0
for l in s:
if l<=a:
a = l
ans += 1
print(ans)
#%%
| [
"[email protected]"
] | |
f7584add9a4108166a191f7f63b755d5aec39a5a | a2ff77ac12c8c8313ebb9d82b0afe0229ac065c6 | /packages/desktop/gnome/addon/gitg/actions.py | a4af4b04586a3f92f2c96f7a1bee230ec0e17431 | [] | no_license | ademirel/COMAK | 80966cffc1833c0d41dbe36514ef2480f4b87ead | 311d8d572c0ed5fe429bb4b2748e509dab7a6785 | refs/heads/master | 2020-12-25T17:23:27.553490 | 2012-09-11T08:58:30 | 2012-09-11T08:58:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 675 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get
... | [
"[email protected]"
] | |
d77c2989f52c9c5aa6a273abb52368e4bac985f3 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/contrib/cv/detection/FSAF_for_Pytorch/mmdetection/configs/faster_rcnn/faster_rcnn_r50_caffe_c4_1x_coco.py | c686bcec7c76d3324cacaf69abb51bd7dc5b59f5 | [
"GPL-1.0-or-later",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | 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 | 1,981 | py | # Copyright 2021 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 agreed ... | [
"[email protected]"
] | |
0f99ffc01cdb6537622d04736cfb2054589fd8e2 | 306baa2ad596e3962e427d587e7b0d4175a1e48e | /configs/eftnet/R2_ttf53_whh_beta01_1lr_log_2x.py | 74a897aa9dbdab0f29a9de33d0dedb6950f47d88 | [
"Apache-2.0"
] | permissive | mrsempress/mmdetection | 9c7ed7ed0c9f1d6200f79a2ab14fc0c8fe32c18a | cb650560c97a2fe56a9b369a1abc8ec17e06583a | refs/heads/master | 2022-04-24T04:34:30.959082 | 2020-04-26T07:52:23 | 2020-04-26T07:52:23 | 258,957,856 | 0 | 0 | Apache-2.0 | 2020-04-26T06:33:32 | 2020-04-26T06:33:32 | null | UTF-8 | Python | false | false | 3,060 | py | # model settings
model = dict(
type='CenterNet',
pretrained='./pretrain/darknet53.pth',
backbone=dict(
type='DarknetV3',
layers=[1, 2, 8, 8, 4],
inplanes=[3, 32, 64, 128, 256, 512],
planes=[32, 64, 128, 256, 512, 1024],
norm_cfg=dict(type='BN'),
out_indices=(1... | [
"[email protected]"
] | |
c5fbfda6f64d0654fdb0f07855f20d2db1e8bb6a | a86287b997aceb02b836a951a188fff5c98cdca8 | /train_cnn_multilabel/ckpt_pb.py | 06334157fbd692e76b7ced2ca00fbe72a9410251 | [] | no_license | wonqiao/train_arch | fbdd9ee59ed67ad2a71e638fbcdaadafedc68759 | f78aabffdfb65dd1d40ede40dde81de3b04f2144 | refs/heads/master | 2023-01-29T20:21:24.977626 | 2020-12-09T03:54:00 | 2020-12-09T03:54:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,402 | py | # coding = utf-8
"""
Created on 2017 10.17
@author: liupeng
wechat: lp9628
blog: http://blog.csdn.net/u014365862/article/details/78422372
"""
import tensorflow as tf
from tensorflow.python.framework import graph_util
from lib.utils.multi_label_utils import get_next_batch_from_path, shuffle_train_data
from l... | [
"[email protected]"
] | |
1545b59188024f52bdd1c764d1b8ef97983fa250 | 3365e4d4fc67bbefe4e8c755af289c535437c6f4 | /.history/src/core/dialogs/waterfall_dialog_20170814145942.py | 6513d4211f297e41a9975f46c661f2308b482d5c | [] | no_license | kiranhegde/OncoPlotter | f3ab9cdf193e87c7be78b16501ad295ac8f7d2f1 | b79ac6aa9c6c2ca8173bc8992ba3230aa3880636 | refs/heads/master | 2021-05-21T16:23:45.087035 | 2017-09-07T01:13:16 | 2017-09-07T01:13:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,976 | py | '''
Refs:
Embedding plot: https://sukhbinder.wordpress.com/2013/12/16/simple-pyqt-and-matplotlib-example-with-zoompan/
'''
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
import matplotlib.pyplot a... | [
"[email protected]"
] | |
6deefd1f16785bce2090866dab195b0c52bb9f78 | e649eaa158a0fb311ac69f8df466097b69f29d8a | /tapioca_toggl/tapioca_toggl.py | 0d8116f1937344e5376c39b6db74915601d32816 | [
"Python-2.0",
"MIT"
] | permissive | pgniewosz/tapioca-toggl | 862f1d454e34139e75bcb1596f92387c94a004f5 | 0b789934d18cbbfe1bdcbe6b0905bf653fb9c68f | refs/heads/master | 2020-12-31T02:00:52.044366 | 2015-12-09T21:24:17 | 2015-12-09T21:24:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,167 | py | # -*- coding: utf-8 -*-
from tapioca import (
JSONAdapterMixin,
TapiocaAdapter,
generate_wrapper_from_adapter,
)
from requests.auth import HTTPBasicAuth
from .resource_mapping import RESOURCE_MAPPING
class TogglClientAdapter(JSONAdapterMixin, TapiocaAdapter):
api_root = 'https://www.toggl.com/api/v... | [
"[email protected]"
] | |
91417fed22a522075bbf7a6fe7c62e14eb481945 | edbf37a80849468145cdcfca2012d205cdba9b50 | /csv_to_hdf5.py | a1fdc67f0ebeb87b9e3b822575a7a3e38dc3bb06 | [] | no_license | hsiaoyi0504/cheminfo-final | f0f19d67c697b91195aff7fd52044e2f7a9fd434 | 7dbfb9729a443060d45562123768398513d11085 | refs/heads/master | 2021-01-12T09:32:26.927273 | 2017-02-14T17:21:26 | 2017-02-14T17:21:26 | 76,188,236 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,469 | py | import sys
import os
from itertools import islice
import h5py
import numpy as np
from sklearn.model_selection import train_test_split
sys.path.append(os.path.abspath("./keras-molecules"))
from molecules.utils import load_dataset, one_hot_array, one_hot_index
import pandas as pd
data, charset = load_dataset('./keras... | [
"[email protected]"
] | |
395ae2d504cb4be15aacfe24989028ced7cd5bb6 | 9ecd7568b6e4f0f55af7fc865451ac40038be3c4 | /tianlikai/shandong/qingdao.py | 2a7b9ffffeabdc15e72299245459613fca9782da | [] | no_license | jasonTLK/scrapy | f5ac6e575e902c077a07dc0eb9d228506f1a173f | 2de8245fbc8731cfd868bbd91168e26271045300 | refs/heads/master | 2021-01-20T04:22:23.080864 | 2017-04-28T07:46:29 | 2017-04-28T07:46:29 | 89,681,374 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,444 | py | # -*- coding: utf-8 -*-
from items.biding import biding_gov
from utils.toDB import *
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
import datetime
# 山东青岛招投标网站
# 其他信息
class LianjiaSpider(CrawlSpider):
name = "qingdao.py"
allowed_domains = ["ggzy.qingdao.gov.cn"]
... | [
"[email protected]"
] | |
1c4c926d1547bee952cd3b18817763f0a75c1a1d | 55123cea6831600a7f94b29df86aa12c9ccd82e4 | /test/test_gpu_programming.py | 26bcc6aa254f5b802e5a5dbb514fe0ccd3266ec9 | [
"MIT"
] | permissive | yngtodd/gpu_programming | 34915f76d2c39d3a3dfe633d0dd40fee1c077579 | 84ce7cb4280690bfb46cb36fb7ef47863d97a529 | refs/heads/master | 2020-04-10T10:50:54.522162 | 2018-12-08T22:54:24 | 2018-12-08T22:54:24 | 160,977,394 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 300 | py | """
Tests for `gpu_programming` module.
"""
import pytest
from gpu_programming import gpu_programming
class TestGpu_programming(object):
@classmethod
def setup_class(cls):
pass
def test_something(self):
pass
@classmethod
def teardown_class(cls):
pass
| [
"[email protected]"
] | |
48f1a194c93c3f79e47c8abb291e2846c3dc4d3c | 24b2f3f5f49ed19cf7fd3dcd433d6b72806e08cf | /python/sorting_and_searching/0658_Find_K_Closest_Elements.py | 05baab2d171b85dcb87d49d361a97f8f74117f59 | [] | no_license | lizzzcai/leetcode | 97089e4ca8c3c53b5a4a50de899591be415bac37 | 551cd3b4616c16a6562eb7c577ce671b419f0616 | refs/heads/master | 2021-06-23T05:59:56.928042 | 2020-12-07T03:07:58 | 2020-12-07T03:07:58 | 162,840,861 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,752 | py | '''
08/04/2020
658. Find K Closest Elements - Medium
Tag: Binary Search
Given a sorted array, two integers k and x, find the k closest elements to x in the array. The result should also be sorted in ascending order. If there is a tie, the smaller elements are always preferred.
Example 1:
Input: [1,2,3,4,5], k=4, x=... | [
"[email protected]"
] | |
033a22f493ad32f11f1b533014f8c78daae54fa2 | 29597b67f10d456bdcc90a693ac93f571635ae34 | /structure/recursion/keypad.py | b9565dcadcb6cdd6cf9c359c88e82b56b566a7ad | [] | no_license | sh-tatsuno/python-algorithm | 67d50f24604550c115f957ed74e81483566c560d | 2800050077562eef50b6f0bd8ba6733068469c4c | refs/heads/master | 2020-05-17T09:46:05.714449 | 2019-07-25T15:43:20 | 2019-07-25T15:43:20 | 183,641,527 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,577 | py | def get_characters(num):
if num == 2:
return "abc"
elif num == 3:
return "def"
elif num == 4:
return "ghi"
elif num == 5:
return "jkl"
elif num == 6:
return "mno"
elif num == 7:
return "pqrs"
elif num == 8:
return "tuv"
elif num == ... | [
"[email protected]"
] | |
89ab0709a97719352d3faf225b1ef3224e177f24 | 30c820b171447ab772e58f04ac0dc55c4d5ffbdf | /transax/setup.py | fca863366f71e276dc836f489d4594540c33f89a | [] | no_license | TransactiveSCC/TRANSAX | 3b58cff757fb646a825872dc243e04eea3d0b712 | 13c45a1254cb14607d1bfa86267dbde9e61fd538 | refs/heads/main | 2023-05-13T10:50:20.868093 | 2021-05-15T02:45:53 | 2021-05-15T02:45:53 | 316,015,185 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | from setuptools import setup
setup(
name='transax',
version='1.0',
description='',
author='Scott Eisele',
author_email='[email protected]',
packages=['transax'], #same as name
install_requires=['scipy','pycurl'], #external packages as dependencies
) | [
"[email protected]"
] | |
6d7534730773802df64b5660a516a95e01c824f8 | 3953a4cf5dee0667c08e1fe1250a3067090e3f24 | /mural/config/settings/base.py | 4b847aae2bbfb7548c7bdbde55ea49cc1d1314f1 | [] | no_license | DigitalGizmo/msm_mural_project | 41960242c84050ee578da90afabcb7f9bc1923df | 5566a2b6f7445dc53d8aaf96cf7d24236fd5ed96 | refs/heads/master | 2020-03-07T11:04:49.633149 | 2019-02-13T18:10:44 | 2019-02-13T18:10:44 | 127,447,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,677 | py | """
Django settings for mural project.
Generated by 'django-admin startproject' using Django 2.0.3.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
# import os
#... | [
"[email protected]"
] | |
8f1c32b9228c8eae48071a9322737aa0ae75e2ee | 306afd5282d9c24d58297478a1728a006c29e57e | /python3/905_Sort_Array_By_Parity.py | 3a705fc16ba5f96d63db2ec53acf28e955804135 | [] | no_license | ytatus94/Leetcode | d2c1fe3995c7a065139f772569485dc6184295a9 | 01ee75be4ec9bbb080f170cb747f3fc443eb4d55 | refs/heads/master | 2023-06-08T17:32:34.439601 | 2023-05-29T04:33:19 | 2023-05-29T04:33:19 | 171,921,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | class Solution:
def sortArrayByParity(self, A):
"""
:type A: List[int]
:rtype: List[int]
"""
even =[]
odd = []
for i in A:
if i % 2 == 0:
even.append(i)
else:
odd.append(i)
return even + odd
... | [
"[email protected]"
] | |
c559b7dcb34495138c12b520236775a346862bd8 | 9d30dcfcedc98306e60779d25cad83345b4f032c | /src/pip/_internal/models/target_python.py | 7ad5786c4354cb0e520e8f9493c72619c29ebf82 | [
"MIT"
] | permissive | loke5555/pip | 1cb04e69eecb9969cf663a2a1bf5095b84cdff55 | a8510bc5e6b7c4849a0351deab3c1d41fd9a63d1 | refs/heads/master | 2020-06-14T08:22:50.373830 | 2019-07-02T09:00:02 | 2019-07-02T09:00:02 | 194,958,398 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,734 | py | import sys
from pip._internal.pep425tags import get_supported, version_info_to_nodot
from pip._internal.utils.misc import normalize_version_info
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
if MYPY_CHECK_RUNNING:
from typing import List, Optional, Tuple
from pip._internal.pep425tags import Pep425... | [
"[email protected]"
] | |
3fcfcef8fa826d5b89ab602739c53b107e8c0050 | 14f223f1855215f6cbeaba533bcfe26532161918 | /basics and advanced/armstrong_pract.py | 0e16e80f5392370354718a9842eda8c0614e3e04 | [] | no_license | iiibsceprana/pranavsai | 1026519a44eac429db8c4a6e3664277839d5dd52 | ffd8c937c50814676b0ee1eabdfd461087d52b96 | refs/heads/master | 2020-03-09T23:36:23.258180 | 2018-04-11T08:53:55 | 2018-04-11T08:53:55 | 129,061,808 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 296 | py | inp=int(input("Enter an Integer:"))
num=inp
print("num:",num)
sum=0
while inp>0:
n=inp%10
print("n:",n)
sum+=n*n*n
print("sum:",sum)
inp=inp//10
print("inp:",inp)
if num==sum:
print("Given number is Armtrong")
else:
print("Given number is not Armstrong")
| [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.