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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e24fee962e40c8c9be31958f3143fd07c0455dec | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/galex_j21035+3035/sdB_galex_j21035+3035_coadd.py | 670e8fc2640ff7b49cdbdfa30fc8fddd8ae129f9 | [] | 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 | 452 | py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[315.8855,30.594236], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_galex_j21035+3035/sdB_galex_j21035+3035_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURV... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
5676be65b221f44fc705b2d4c28c68c72e9f99b6 | 014aeee1dbc0cd4a73dacc03a3ab816830381048 | /InvenTree/part/test_api.py | b0859e5c1e329331140b124706ff5ba0e20ca25f | [
"MIT"
] | permissive | snelld2001/InvenTree | 122085d8ab2c8a16cf895fcc46ef2ea0202104ea | 3447123196e15afc663982229d3e3892507993ef | refs/heads/master | 2020-07-06T06:59:12.524417 | 2019-08-15T12:02:11 | 2019-08-15T12:02:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,900 | py | from rest_framework.test import APITestCase
from rest_framework import status
from django.urls import reverse
from django.contrib.auth import get_user_model
class PartAPITest(APITestCase):
"""
Series of tests for the Part DRF API
- Tests for Part API
- Tests for PartCategory API
"""
fixtures ... | [
"oliver.henry.walters@gmail.com"
] | oliver.henry.walters@gmail.com |
0ccf12054ba041d39dfa231f1cef582411f03c5e | 01f411e03517f150877895cfc238eace8c63b6b8 | /treinamento.py | 00e55b83405046c0436a9b303e63a0e7c8e6d5d0 | [] | no_license | fapers/reconhecimento-facial-opencv | ed93681963a46ea3e250ef1318228dd3ed640c6c | 3d9cd3063e2b92516bef2964210777c8810c61d9 | refs/heads/main | 2023-07-15T19:10:11.200133 | 2021-09-02T15:12:46 | 2021-09-02T15:12:46 | 402,235,803 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,021 | py | import cv2
import os
import numpy as np
eigenface = cv2.face.EigenFaceRecognizer_create()
fisherface = cv2.face.FisherFaceRecognizer_create()
lbph = cv2.face.LBPHFaceRecognizer_create()
def getImagemComId():
caminhos = [os.path.join('fotos', f) for f in os.listdir('fotos')]
# print(caminhos)
faces = []
... | [
"fpsmoc@yahoo.com.br"
] | fpsmoc@yahoo.com.br |
c4626710c994b9baf80cd3ac3b1c28e95d075ad2 | 368c66467b78adf62da04cb0b8cedd2ef37bb127 | /SW expert/python/2071_평균값구하기.py | e317773fcd3978663c71a638f1812c5dc1477f02 | [] | no_license | DJHyun/Algorithm | c8786ddcd8b5693fc9b3b4721fdf1eeda21611c5 | fd6ae800886dac4ec5ff6cf2618bc2c839a76e7a | refs/heads/master | 2020-07-30T16:32:49.344329 | 2020-02-25T07:59:34 | 2020-02-25T07:59:34 | 210,289,983 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | import sys
sys.stdin = open("2071_평균값구하기.txt","r")
T = int(input())
for test_case in range(1, T + 1):
numbers = list(map(int,input().split()))
print(f'#{test_case} {round(sum(numbers)/10)}') | [
"djestiny4444@naver.com"
] | djestiny4444@naver.com |
57ec493751a4ac4b3f73c5439fff84abad0ed929 | e82857fbd8fd81fc50466bc9113bece882c7aeec | /backend/healthcare/migrations/0001_initial.py | 102e7c2ec80ad60182061aaf4f6242d42c623a84 | [] | no_license | crowdbotics-apps/direb-18041 | a1e82f9c27b1af30b098dd61c7c6982bfe099a17 | 84396e9c7a9fe692aa441756b75b78518e7d834f | refs/heads/master | 2022-10-22T10:40:52.101083 | 2020-06-12T09:46:45 | 2020-06-12T09:46:45 | 271,763,244 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,689 | py | # Generated by Django 2.2.13 on 2020-06-12 09:46
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Step',
fields=[
... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
e79ae35eff947d3af75e0a08141e90841a27e1ce | ba7134468cb18014fe2e3e1513382fa52aafd4eb | /01_Python_basic_grammar_supplement/005_Python常用内置函数/009_lambda表达式_匿名函数.py | 4bf782fe62e83aeaba32dc3a3e66f391c26d48a0 | [] | no_license | FelixZFB/Python_advanced_learning | 4e44616b390e1c6e7da37229c7ad48c069cee71b | a71a6d733ed2134a79f02a6488807862b23438b8 | refs/heads/master | 2021-06-27T11:15:07.754719 | 2020-11-20T02:41:25 | 2020-11-20T02:41:25 | 183,116,714 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 319 | py | # lambda表达式可以定义一个匿名函数,一般用于定义一个小型函数
# lambda一般都是单一的参数表达式,内部没有类似def函数的语句
# 下面就是一个lambda匿名函数,传入参数,返回值就是表达式的计算结果
func = lambda x: x * x - x
res = func(3)
print(res) | [
"18200116656@qq.com"
] | 18200116656@qq.com |
06582a1de1e0da0ac3c1b6a286eb1feb728794b1 | 455362ade609dc98da1aa51298fa3ce8c3eda2eb | /DayDayFresh/apps/goods/admin.py | 5893bec44db6e06dfc089b426bbe84e519dae53c | [] | no_license | Jack-liyuanjie/django-daydayfresh | f67e319796c0b97d88b97f385cd440a998ba9dbb | 3f62ced194e15c798245f33642d95c00a6e17b70 | refs/heads/master | 2023-07-03T15:39:31.293324 | 2021-08-13T04:48:09 | 2021-08-13T04:48:09 | 395,517,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,823 | py | from django.contrib import admin
from django.core.cache import caches
from goods.models import GoodsType, IndexPromotionBanner, IndexTypeGoodsBanner, IndexGoodsBanner, GoodsImage, GoodsSKU, \
Goods
# Register your models here.
class BaseModelAdmin(admin.ModelAdmin):
def save_model(self, request, obj, form, ... | [
"2311485953@qq.com"
] | 2311485953@qq.com |
f23394829a64c5c7a3d357bb6b98e1b0500cb819 | 9814de94bcdf2e7d30127667bd533d9434b352b2 | /app/main/views/search_movies.py | 4674c6fa68ed78b402aeaff8668d443b46c6d377 | [] | no_license | duda-joann/mediafinder | ca8f34918e8b75560e5226cf77b45959a59d24cd | 3008bc575b6d1e66fce3b438ce31d9a3fc425124 | refs/heads/master | 2023-03-24T03:23:56.465872 | 2021-03-16T21:06:18 | 2021-03-16T21:06:18 | 273,577,952 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,513 | py | import os
from django import http
from django.shortcuts import render
from main.api import call_api
from main.forms import FormSearch
from main.models import Search
from main.exceptions import CallApiError
def search_movies(request: http.HttpRequest) -> http.HttpResponse:
"""
Get video ID from APi number one ... | [
"duda.joann@gmail.com"
] | duda.joann@gmail.com |
30646878439546244f6e58d10df4f4c25717c26a | f13a5dbc73c0344a18d7644bfb65a1dc8dcebd94 | /passfinder/python/passfinder | d39c74802bee63681b72e7f1a0c12454fb95f386 | [] | no_license | imrehg/coderloop | c692de2d2490445b33e86f07830522943a03a88c | fd22b908188e391d681d72e44143abe8ea18ad23 | refs/heads/master | 2021-01-25T10:21:55.543489 | 2011-01-20T04:10:15 | 2011-01-20T04:10:15 | 1,067,730 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,104 | #!/usr/bin/python
"""
Submission for coderloop/passfinder
"""
import sys
# Depreciated in newer Pythons
from string import split
def hexcode(code):
"""
Turn string into hex-formatted chars as explained at the problem setting page
"""
result = []
for i in xrange(len(code)):
result += [hex(... | [
"imrehg@gmail.com"
] | imrehg@gmail.com | |
fdabee0255be74e7271c77c0115ee949d5dd44f0 | e411ea78ff3d93ca03633d2d8ed0d163d9327333 | /examples/rpc_udp/tests.py | e931ecd33c0a31498158d18fad4fd0f42e899de5 | [
"MIT"
] | permissive | yunstanford/aiomisc | 560cc87c4923d912e0ce80da59997d73cc6eeb87 | fd1b819bd294b4634999640cf96dfabadf10964e | refs/heads/master | 2023-01-06T21:20:17.253205 | 2020-11-10T16:05:14 | 2020-11-10T16:05:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,732 | py | import asyncio
import operator
from functools import partial, reduce
import pytest
from .client import RPCClientUDPProtocol
from .server import RPCServer
@pytest.fixture
def server_port(aiomisc_unused_port):
return aiomisc_unused_port
@pytest.fixture
def handlers():
return {
"foo": lambda: "bar",
... | [
"me@mosquito.su"
] | me@mosquito.su |
173f739b7fe6cfa15cae7fbaba634c479879c487 | 112e792b80f0ba5f0989a297156d1554e18034d9 | /tests/test_server_errors.py | f71d0570b58d5759db2d046efd0cfebec51a7e95 | [] | no_license | VNG-Realisatie/vng-api-common | ba4537c230f47f0b0ba305eccc289eef09be56f2 | 609c931b3f8b640aa6dff6d02cfb799745f25eb5 | refs/heads/master | 2023-06-26T22:52:50.419762 | 2023-06-20T11:20:53 | 2023-06-20T11:20:53 | 136,349,326 | 4 | 14 | null | 2023-09-01T14:26:58 | 2018-06-06T15:31:27 | Python | UTF-8 | Python | false | false | 915 | py | """
Test that server errors generate the appropriate JSON response.
"""
from django.utils.translation import gettext as _
from rest_framework import status
from rest_framework.test import APIRequestFactory
from rest_framework.views import APIView
class View(APIView):
def get(self, *args, **kwargs):
raise... | [
"sergei@maykinmedia.nl"
] | sergei@maykinmedia.nl |
7d1f7764912179e6a52a10d802fd0df76619921c | dfaf6f7ac83185c361c81e2e1efc09081bd9c891 | /k8sdeployment/k8sstat/python/kubernetes/test/test_v1_scale_spec.py | b118005d122a1069fecb76cb8ac84f4e636e8fed | [
"MIT",
"Apache-2.0"
] | permissive | JeffYFHuang/gpuaccounting | d754efac2dffe108b591ea8722c831d979b68cda | 2c63a63c571240561725847daf1a7f23f67e2088 | refs/heads/master | 2022-08-09T03:10:28.185083 | 2022-07-20T00:50:06 | 2022-07-20T00:50:06 | 245,053,008 | 0 | 0 | MIT | 2021-03-25T23:44:50 | 2020-03-05T02:44:15 | JavaScript | UTF-8 | Python | false | false | 904 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.15.6
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import kube... | [
"JeffYFHuang@github.com"
] | JeffYFHuang@github.com |
d5ce3dcae9aab295557432f691634791e28c0380 | d3efc82dfa61fb82e47c82d52c838b38b076084c | /Autocase_Result/FJZJJMM/YW_FJZJJMM_SZSJ_174.py | e644e7a53d5d80c3a7f12ea49bf149f95457c099 | [] | no_license | nantongzyg/xtp_test | 58ce9f328f62a3ea5904e6ed907a169ef2df9258 | ca9ab5cee03d7a2f457a95fb0f4762013caa5f9f | refs/heads/master | 2022-11-30T08:57:45.345460 | 2020-07-30T01:43:30 | 2020-07-30T01:43:30 | 280,388,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,080 | py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import sys
sys.path.append("/home/yhl2/workspace/xtp_test/xtp/api")
from xtp_test_case import *
sys.path.append("/home/yhl2/workspace/xtp_test/service")
from ServiceConfig import *
from mainService import *
from QueryStkPriceQty import *
from log import *
sys.path.append("/h... | [
"418033945@qq.com"
] | 418033945@qq.com |
bad14c736e64e3b22f778c6294a7705e690b46f3 | 745e2421cd2d110c37ec91315567678f50a7647f | /High_Order_Functions3.py | 406299a79ee5ba607db3ede197f25e1b323e7bca | [] | no_license | TetianaSob/Python-Projects | 3a5760b21029db2de1123d4aa23a614c3ba41c33 | c37528db7e8d65e903357e2cdb7fa64e46537f15 | refs/heads/main | 2023-03-19T15:30:58.800231 | 2021-03-02T16:51:56 | 2021-03-02T16:51:56 | 310,383,298 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 576 | py | # High_Order_Functions3.py
from random import choice
def make_laugh_func():
def get_laugh():
l = choice(('HAHAHAH', 'lol', 'tehehe'))
return l
return get_laugh
laugh = make_laugh_func()
print(laugh())
# tehehe
# lol
# tehehe
print("\n")
#########
def make_laugh_at_fu... | [
"noreply@github.com"
] | TetianaSob.noreply@github.com |
b7fa1ba1c4b2a4981a3d971bfc48ed75feeaee82 | 8ca19f1a31070738b376c0370c4bebf6b7efcb43 | /office365/onenote/pages/links.py | e721b71b1dd74db9d29032fc01afdbb49378c149 | [
"MIT"
] | permissive | vgrem/Office365-REST-Python-Client | 2ef153d737c6ed5445ba1e446aeaec39c4ef4ed3 | cbd245d1af8d69e013c469cfc2a9851f51c91417 | refs/heads/master | 2023-09-02T14:20:40.109462 | 2023-08-31T19:14:05 | 2023-08-31T19:14:05 | 51,305,798 | 1,006 | 326 | MIT | 2023-08-28T05:38:02 | 2016-02-08T15:24:51 | Python | UTF-8 | Python | false | false | 642 | py | from office365.onenote.pages.external_link import ExternalLink
from office365.runtime.client_value import ClientValue
class PageLinks(ClientValue):
"""Links for opening a OneNote page."""
def __init__(self, onenote_client_url=ExternalLink(), onenote_web_url=ExternalLink()):
"""
:param Externa... | [
"vvgrem@gmail.com"
] | vvgrem@gmail.com |
47f5c13b78912913326de96dea91bcfaf8aa14c7 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/request/AntMerchantExpandIndirectOnlineModifyRequest.py | 4d6ba6daca366f662fe3c16f2cb792004eb4a179 | [
"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 | 4,022 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AntMerchantExpandIndirectOnlineModifyModel import AntMerchantExpandIndirectOnlineModifyModel
class AntMerchantExpandIndirectOnlineMo... | [
"liuqun.lq@alibaba-inc.com"
] | liuqun.lq@alibaba-inc.com |
e9162a7b67ef18ecbc8896454451a71ae1de9d3f | 4a8bfa3407aa98a04ede3162f85467b1b5012fe7 | /tests/test_api/test_methods/test_send_game.py | 7726becc5cb6462f1e5f13c61d279635b486b73f | [] | no_license | aiogram/tg-codegen | 07ec80814eec46f464d2490fd27b7b6b27257f1b | ba3c2f893591d45dda418dd16e0646e260afdf14 | refs/heads/master | 2022-12-09T10:44:10.781570 | 2021-11-07T23:33:25 | 2021-11-07T23:33:25 | 218,523,371 | 24 | 5 | null | 2022-12-08T08:47:43 | 2019-10-30T12:33:21 | Python | UTF-8 | Python | false | false | 1,003 | py | import pytest
from aiogram.api.methods import Request, SendGame
from tests.mocked_bot import MockedBot
@pytest.mark.skip
class TestSendGame:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(SendGame, ok=True, result=None)
response: Message ... | [
"jroot.junior@gmail.com"
] | jroot.junior@gmail.com |
476ed789c68ffe781ad1f8df2ea986c0373b54e5 | 6e2487477765a38604cc94ca96af4774dbd88f58 | /hc/lib/tests/test_jsonschema.py | b83b95b6b05c7e7ca09c2bf8d796689e9868db73 | [
"BSD-3-Clause"
] | permissive | herbertUG/healthchecks | e247428012ef8e0c79fe3fe44567b6f9eaf9b298 | 1cdb6e6d1d1a5bed7026132ed316213e60cb6be1 | refs/heads/master | 2020-09-28T08:56:17.415441 | 2019-12-06T06:58:32 | 2019-12-06T06:58:32 | 226,740,247 | 4 | 0 | BSD-3-Clause | 2019-12-08T22:20:23 | 2019-12-08T22:20:21 | null | UTF-8 | Python | false | false | 3,026 | py | from django.test import TestCase
from hc.lib.jsonschema import ValidationError, validate
class JsonSchemaTestCase(TestCase):
def test_it_validates_strings(self):
validate("foo", {"type": "string"})
def test_it_checks_string_type(self):
with self.assertRaises(ValidationError):
val... | [
"cuu508@gmail.com"
] | cuu508@gmail.com |
ed59e2c5ac0c220670ce07cae3d6116face3c48f | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02595/s971825030.py | 0a4d8742b7d455f0e6f0c30a32ac6e368b154028 | [] | 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 | 165 | py | n, d = map(int, input().split())
d2 = d ** 2
res = 0
for _ in range(n):
x, y = map(int, input().split())
if d2 >= x**2 + y**2:
res += 1
print(res)
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
18184916d3eb4083456eeb6d38273b299c78131f | 4131625553ff59b4c730ae7148dd5d603d8cb87d | /codingBat/python/warmup2/altPairs.py | 2adca7bf6247e7b509568e9871dad20e9433534d | [
"MIT",
"Apache-2.0"
] | permissive | odonnmi/learnNPractice | 29034304303aab3827e6b3334b1d7d9d65b93e54 | eb1c775e4d6e35cebb7b109b46b91f9aecb2d9ec | refs/heads/master | 2020-12-04T14:52:00.520219 | 2019-09-03T06:30:03 | 2019-09-03T06:30:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 776 | py | #######################################################################################################################
#
# altPairs
#
# Given a string, return a string made of the chars at indexes 0,1, 4,5, 8,9 ...
# so "kittens" yields "kien".
#
###############################################################... | [
"sagarnikam123@gmail.com"
] | sagarnikam123@gmail.com |
92f038d02083a9d9b06f8c21d45e2c970a75541a | 70f1c694bea6178c98b134b9c44952ef6693be9f | /analysis/Ping_Pong_deletion_derivative/pacbio_NB/fastq/WGS/Rice3k_CAAS/Rice3k_Ping_Coverage_ID_info.py | 20e367dfd419f197b33efe172b2cc8baa2cc10c9 | [] | no_license | JinfengChen/Rice_pop | 5c19c5837805e51ddb3b2ffba4baffdc59c9bfd3 | ef272bf4825b29610c94de55eb53f231fb5febc6 | refs/heads/master | 2020-04-07T04:55:36.606594 | 2018-03-02T16:52:53 | 2018-03-02T16:52:53 | 33,501,941 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,254 | py | #!/opt/Python/2.7.3/bin/python
import sys
from collections import defaultdict
import numpy as np
import re
import os
import argparse
import glob
from Bio import SeqIO
sys.path.append('/rhome/cjinfeng/BigData/software/ProgramPython/lib')
from utility import gff_parser, createdir
def usage():
test="name"
message... | [
"jinfeng7chen@gmail.com"
] | jinfeng7chen@gmail.com |
57fd54680f1949d19bbfa50a806611c3e9cf21c9 | 4298b75fc5ea27770a327e4d71fcb87511c03f5e | /散點圖/obs.py | 69065f5eb53d4c5a8aede017506228fbe3e497b6 | [] | no_license | cycle13/python_backup | 01e6cc058e4e90c55bbd289d1917e242c5916a79 | 0ce2253aa45c01ff353ed11dad1aaf623ac22804 | refs/heads/master | 2022-04-10T09:22:14.686760 | 2020-03-18T09:41:24 | 2020-03-18T09:41:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,194 | py | import datetime
import time
import numpy as np
import pandas as pd
import csv
from openpyxl import load_workbook
from openpyxl import Workbook
import matplotlib.pyplot as plt
obs = pd.read_excel("g19.xlsx")
# N = len(obs['時間'][168:265])
x = obs['時間'][0:144] # 包含10个均匀分布的随机值的横坐标数组,大小[0, 1]
y = obs['WD'][0:144] # 包含1... | [
"bokai830124@gmail.com"
] | bokai830124@gmail.com |
c510879a9ca2c0f07728eb1ec197f89286904579 | e4ffbd02a32ad3b25932e2a73e6e12a92bad370a | /src/chip_test_ec/backend/serdes/trace.py | d22dd8d5c48f2b78b3f7b3e8e0f0820cffa27c43 | [] | no_license | ucb-art/chip_test_ec | 157f5a6041c7241a0b1fad4770aaf15bcfeea9e5 | 0b46a389fd4e40950c57f8d8d643f57155a1e938 | refs/heads/master | 2021-09-05T15:27:25.880254 | 2018-01-29T07:44:11 | 2018-01-29T07:44:11 | 113,082,595 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,513 | py | # -*- coding: utf-8 -*-
from typing import Dict, Any, List
import abc
import time
import bisect
from itertools import islice
import numpy as np
from ...gui.base.threads import WorkerThread
from ..core import Controller
class StopException(Exception):
def __init__(self):
Exception.__init__(self, 'Stop ... | [
"pkerichang@gmail.com"
] | pkerichang@gmail.com |
b6e8400affd7e861ccf10a6e40981dc14dd0e790 | 8e23cbf08a8c5d966f642ef89a25309392acdb36 | /sbd_mask-master/demo_baidu.py | 715a2a33596d1eeb1007ae0f98ef8c9556b11fbf | [] | no_license | gyhd/python_study | ba94eca3aa391c56cdb34a48bcb6cd32581703e0 | 3b8c99179903d9c81b70d65c8df3023449394f57 | refs/heads/master | 2022-11-27T18:00:20.259082 | 2020-07-11T09:49:10 | 2020-07-11T09:49:10 | 248,500,662 | 3 | 1 | null | 2022-11-22T05:08:17 | 2020-03-19T12:44:35 | Jupyter Notebook | UTF-8 | Python | false | false | 2,550 | py | import time
import cv2
import paddlehub as hub
module = hub.Module(name="pyramidbox_lite_mobile_mask")
# 将模型保存在test_program文件夹之中
module.processor.save_inference_model(dirname="test_program")
def detect_img():
img_data = cv2.imread(r"test_program/6e1c74e85298b5120f9f884ad348c243.jpg")
input_dict = {"data"... | [
"2578278753@qq.com"
] | 2578278753@qq.com |
ed4dbdb337040407462dc8b1aeb8e47a84140233 | a7927f0fee7bc19e1c67a57d72952717bd17ffb2 | /src/product/tasks.py | 53a78bb221991115069d02e8d0f3bfbbeb333e90 | [] | no_license | chutchais/stockeve | b6b29c8095ba60f063d6132e8cd325a59ed02fd8 | 53c6516766b45143247d0ddf9b6df181e988e2d2 | refs/heads/master | 2023-02-25T09:48:10.504726 | 2021-02-01T02:26:48 | 2021-02-01T02:26:48 | 296,989,271 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,073 | py | from django.core.mail import send_mail
from django_q.tasks import async_task
def update_min_stock(product):
print('Update Product Min Stock')
from django.db.models import Sum
if product.childs.count() > 0 :
print(f'{product} has childs')
# Has Child
product.lower_stock = product.min_stock > product.total_qty... | [
"chutchai.s@gmail.com"
] | chutchai.s@gmail.com |
c92b8f5d3b414a8da732bfeef2dad6150034a229 | 7bededcada9271d92f34da6dae7088f3faf61c02 | /pypureclient/flashblade/FB_2_10/models/file_system_get_response.py | 7ea470abbcceadb767e366951a09dc70f19f9c60 | [
"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,452 | 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... | [
"azaman@purestorage.com"
] | azaman@purestorage.com |
f1ccc8340a7bb407bff33b9ce8650260cdcedbda | d3efc82dfa61fb82e47c82d52c838b38b076084c | /Autocase_Result/ETFMM_K/YW_ETFMM_SZXJ_081_K.py | b2320aecd963f7e51b5c9532b924f90d40843b1d | [] | no_license | nantongzyg/xtp_test | 58ce9f328f62a3ea5904e6ed907a169ef2df9258 | ca9ab5cee03d7a2f457a95fb0f4762013caa5f9f | refs/heads/master | 2022-11-30T08:57:45.345460 | 2020-07-30T01:43:30 | 2020-07-30T01:43:30 | 280,388,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,066 | py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import sys
sys.path.append("/home/yhl2/workspace/xtp_test/xtp/api")
from xtp_test_case import *
sys.path.append("/home/yhl2/workspace/xtp_test/service")
from ServiceConfig import *
from mainService import *
from QueryStkPriceQty import *
from log import *
sys.path.append("/h... | [
"418033945@qq.com"
] | 418033945@qq.com |
5d5c8c464d1d9bae12bed1a976baed633dd8a4cd | 141f806dc5a716f412892e59dcfec365fa92575a | /Python/python_dsa-master/graphs/adjacency_list.py | 8b6b515d3eb78fa5c10757c71d4749838bfc8cb8 | [
"MIT"
] | permissive | leocjj/0123 | 0fb2472915e67816be68e6e03c604ed2a95be3b0 | cbf3daf65407cad8a817b3ce79ab10d15c665cce | refs/heads/master | 2023-07-26T00:28:08.171573 | 2023-07-14T03:36:13 | 2023-07-14T03:36:13 | 213,641,442 | 33 | 3 | null | null | null | null | UTF-8 | Python | false | false | 503 | py | #!/usr/bin/python3
# Implement adjacency list
from graphs import Vertex, Graph
if __name__ == '__main__':
g = Graph()
for i in range(6):
g.add_vertex(i)
g.add_edge(0, 1, 5)
g.add_edge(0, 5, 2)
g.add_edge(1, 2, 4)
g.add_edge(2, 3, 9)
g.add_edge(3, 4, 7)
g.add_edge(3, 5, 3)
g... | [
"leocj@hotmail.com"
] | leocj@hotmail.com |
aeed1c40eca9e3d0b499df150f3de2407bdf2d77 | da50dec980964cdfb5143eb42e0078445813a8b7 | /er_shoufang/haidian.py | 6bed2ab53b3d1472397178fb7ed532159a53afde | [] | no_license | kidword/spider | cc842bee57f61fc87eefe63a339bff39d2428e93 | 51613e98dc8229c9b414ed99a69c961007548125 | refs/heads/master | 2020-04-12T08:32:45.116909 | 2020-01-13T03:04:18 | 2020-01-13T03:04:18 | 162,388,100 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,633 | py | from selenium import webdriver
from selenium.webdriver.common.by import By
import time
import pymysql
import pandas as pd
connent = pymysql.connect(host='localhost', user='root', passwd='hh226752', db='flightradar24', charset='utf8')
cursor = connent.cursor()
browser=webdriver.PhantomJS()
n = 0
ll = []
url = 'https:/... | [
"xie@123"
] | xie@123 |
6fb3eef20b726929a765700e46b0be747ff37a27 | 694d57c3e512ce916269411b51adef23532420cd | /leetcode/312burst_balloons.py | 3adae140ced6ad758f9deed995367d7e1e80dae8 | [] | no_license | clovery410/mycode | 5541c3a99962d7949832a0859f18819f118edfba | e12025e754547d18d5bb50a9dbe5e725fd03fd9c | refs/heads/master | 2021-05-16T02:46:47.996748 | 2017-05-10T23:43:50 | 2017-05-10T23:43:50 | 39,235,141 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,153 | py | class Solution(object):
#Solution1, bottom up recursive of dp solution
def maxCoins(self, nums):
nums = [1] + [i for i in nums if i > 0] + [1]
dp = [[0 for x in xrange(len(nums))] for x in xrange(len(nums))]
def helper(left, right):
if dp[left][right]:
return... | [
"seasoul410@gmail.com"
] | seasoul410@gmail.com |
977cdbe11f72bd092094ddf85d8ec8192201e318 | bb7d5f000de07cc2c458a64fd275f3b14701dea2 | /examples/TestMinimumSpanningTree.py | a5dd5a8b2a2249f7b1a430bd571b1c4c1d98a69e | [
"MIT"
] | permissive | timmy61109/Introduction-to-Programming-Using-Python | 201d532a5c041ed045939c10909de0426a6e8be7 | bcbfd8d66173f5adfa1553103a692c02500e7896 | refs/heads/master | 2022-12-12T22:07:56.647918 | 2022-11-23T19:13:48 | 2022-11-23T19:18:46 | 210,872,428 | 0 | 6 | MIT | 2021-11-21T12:58:47 | 2019-09-25T14:58:14 | Python | UTF-8 | Python | false | false | 1,672 | py | from WeightedGraph import WeightedGraph
# Create vertices
vertices = ["Seattle", "San Francisco", "Los Angeles",
"Denver", "Kansas City", "Chicago", "Boston", "New York",
"Atlanta", "Miami", "Dallas", "Houston"]
# Create edges
edges = [
[0, 1, 807], [0, 3, 1331], [0, 5, 2097],
[1, 0, 807], [1... | [
"38396747+timmy61109@users.noreply.github.com"
] | 38396747+timmy61109@users.noreply.github.com |
383a6f3680316e1729aac9fedec0a5de482148fd | e81576012330e6a6024d14f3e241f88ca34b73cd | /python_code/vnev/Lib/site-packages/jdcloud_sdk/services/lb/apis/CreateListenerRequest.py | e3242ee19a8675fe35f25d068ffd8c6fbf32a2e9 | [
"MIT"
] | permissive | Ureimu/weather-robot | eba6a84147755aa83c941a306bac1a7c4e95e23e | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | refs/heads/master | 2021-01-15T07:23:42.274413 | 2020-03-23T02:30:19 | 2020-03-23T02:30:19 | 242,912,896 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,389 | py | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | [
"a1090693441@163.com"
] | a1090693441@163.com |
25e95465510356e98b001a52b261284ca568aa3e | ac8fb3f07482cb07605f83a3828ae20135fd3466 | /md/management/commands/passwd2.py | ab2e9ddd63d10d34a54bb26695679ad8bce950d3 | [] | no_license | maiduo/maiduo_web | d62719eca86c768afbbc0025861bc9616f520233 | cdb2009b7802545f254213c5a5378a5c5eb6ee7f | refs/heads/master | 2020-04-04T01:53:15.688541 | 2013-09-05T05:17:00 | 2013-09-05T05:17:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,192 | py | #! -*- encoding:utf-8 -*-
from django.core.management.base import BaseCommand, CommandError, AppCommand
from django.contrib.auth.models import User
from pdb import set_trace as bp
from optparse import make_option
class Command(BaseCommand):
option_list = AppCommand.option_list + (\
make_option('--passwor... | [
"weicongju@gmail.com"
] | weicongju@gmail.com |
55f046769bb1d680a4f42fd59f2d2a9d3456c419 | 6fcfb638fa725b6d21083ec54e3609fc1b287d9e | /python/pytorch_pytorch/pytorch-master/torch/nn/modules/__init__.py | e8b319deb913b3ffe1b416c86de3fca0c3ca1b58 | [] | no_license | LiuFang816/SALSTM_py_data | 6db258e51858aeff14af38898fef715b46980ac1 | d494b3041069d377d6a7a9c296a14334f2fa5acc | refs/heads/master | 2022-12-25T06:39:52.222097 | 2019-12-12T08:49:07 | 2019-12-12T08:49:07 | 227,546,525 | 10 | 7 | null | 2022-12-19T02:53:01 | 2019-12-12T07:29:39 | Python | UTF-8 | Python | false | false | 1,310 | py | from .module import Module
from .linear import Linear
from .conv import Conv1d, Conv2d, Conv3d, \
ConvTranspose1d, ConvTranspose2d, ConvTranspose3d
from .activation import Threshold, ReLU, Hardtanh, ReLU6, Sigmoid, Tanh, \
Softmax, Softmax2d, LogSoftmax, ELU, Hardshrink, LeakyReLU, LogSigmoid, \
Softplus, S... | [
"659338505@qq.com"
] | 659338505@qq.com |
62dbba6b3e210b43d08a66ae349ebc63fe36f46b | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/bob/e3628978b74d4bada84b47fab3b6f71d.py | d96e235a295dee5480c5b950246c97c977bda439 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 245 | py | def hey(s):
ans = None
if s.isspace() or not s:
ans = 'Fine. Be that way!'
elif s.isupper():
ans = 'Whoa, chill out!'
elif s.endswith('?'):
ans = 'Sure.'
else:
ans = 'Whatever.'
return ans
| [
"rrc@berkeley.edu"
] | rrc@berkeley.edu |
afef7b2992a9a567240e9c6d8854163ac34eb31d | 60c4255fb0cf7ed817ff09d8113bf404cde8e12b | /env/lib/python2.7/site-packages/django/contrib/localflavor/tr/forms.py | 0e0718eadfa5be67d3b012c946bc6f4391897662 | [] | no_license | adamjberg/finna-be-octo-ninja | 83aba13f619d4fbfb5308e48336917f0ada0459d | cf16bfcb3d7bb4e878ba0b99ad701b5cda8be34c | refs/heads/master | 2021-01-10T20:19:20.849476 | 2014-01-11T05:42:23 | 2014-01-11T05:42:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,621 | py | """
TR-specific Form helpers
"""
from __future__ import absolute_import, unicode_literals
import re
from django.contrib.localflavor.tr.tr_provinces import PROVINCE_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexF... | [
"ilikecattle@gmail.com"
] | ilikecattle@gmail.com |
9596ecbef6eae8f2be1e1d0db96534fcb45113c5 | 3cef51c71fdb19d326bea2a76bce03b6e04a69cb | /2016/01 No Time for Taxicab/solution.py | 66918c5ad8081f522b81a79ad46e1517c241c892 | [] | no_license | janezd/advent-of-code | fe2819c667a2f9309fe3c50e5c234a98855f26b8 | 700b09894eb6b8de4324304e99be17ca664a7c5b | refs/heads/master | 2021-01-10T08:53:31.721953 | 2017-12-26T10:33:11 | 2017-12-26T10:33:11 | 48,594,325 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 751 | py | dirs = [1j, 1, -1j, -1]
rots = {"R": 1, "L": -1}
dir = 0
coords = 0
directions = open("input1.txt").read().replace(" ", "").split(",")
for where in directions:
dir = (dir + rots[where[0]]) % 4
coords += dirs[dir] * int(where[1:])
print(coords)
print(abs(coords.real) + abs(coords.imag))
visited = {0}
coord... | [
"janez.demsar@fri.uni-lj.si"
] | janez.demsar@fri.uni-lj.si |
75d635190010f93701f02f3e25b474b4750532de | c55615a3638317e71f966cbde3a81c61ca7beee1 | /Kyrylo_Yeremenko/1/task6.py | d9c7dd4bf48332dc896118f53a257184b7fe00a5 | [] | no_license | SmischenkoB/campus_2018_python | 8b139f4ad2b7f8476f31ee1bb96fbbce0040ec8c | 291592e97b6d8fe9f9e6627dc0023875918d3463 | refs/heads/master | 2020-05-01T05:13:59.107471 | 2018-12-14T13:18:55 | 2018-12-14T13:18:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 258 | py | """
This script solves task 6 from Coding Campus 2018 Python course
(Validate PIN code)
"""
userString = input("Input string: ")
isPin = False
if len(userString) == 4 or len(userString) == 6:
if userString.isdigit():
isPin = True
print(isPin)
| [
"oleksandr.medviediev@ubisoft.com"
] | oleksandr.medviediev@ubisoft.com |
00af03ad0a0d46ccb3d69ac655aa65c6d514af59 | 8c32da273146cbd2e218e42590bf2c67e3de9d07 | /bin/link-to-md | 37f656ba145058582fb1c9d7a191f652743e327a | [] | no_license | Bubujka/bu.bin | 52fc7c07167a4c9fa94829984d66ab136007b550 | c5a4066c8e1b5b403e4292c0b230abde8bc77020 | refs/heads/master | 2023-08-22T09:55:20.801189 | 2023-08-07T07:40:33 | 2023-08-07T07:40:33 | 10,511,367 | 4 | 1 | null | 2020-05-02T09:16:12 | 2013-06-05T19:48:36 | Python | UTF-8 | Python | false | false | 227 | #!/usr/bin/env python3
"""Превратить stdin в markdown ссылки"""
import sys
import urllib.parse
for line in sys.stdin:
t = urllib.parse.urlparse(line)
print("[{}]({})".format(t.netloc, line.strip()))
| [
"zendzirou@gmail.com"
] | zendzirou@gmail.com | |
26795417bb8fd412a54241f34f3a6d5d4ad56197 | a18b1f0e459738b9060b9fd2b80db3bc9c3f38a2 | /src/setup.py | bda38f77e2e0d2a4768462acd0dd93e92a55e3e0 | [] | no_license | cscardoso/kedro-mlflow-tutorial | c566aeb7f2c3a6a80ea4b559bf02cdfe80fbeeac | 785bf3d7177e3f05c1bd3c5c71aabb6207e6695e | refs/heads/main | 2023-03-24T00:11:05.378965 | 2021-03-23T12:16:45 | 2021-03-23T12:16:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,628 | py | # Copyright 2020 QuantumBlack Visual Analytics Limited
#
# 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
#
# THE SOFTWARE IS PROVIDED "AS IS",... | [
"you@example.com"
] | you@example.com |
145c894a8cc17ae882cd6045f92ec472c3aa63d8 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_infantries.py | 334c2e19553c1603f2fcf2e9dba3dbe3d4d7c8d0 | [
"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 | 254 | py |
from xai.brain.wordbase.nouns._infantry import _INFANTRY
#calss header
class _INFANTRIES(_INFANTRY, ):
def __init__(self,):
_INFANTRY.__init__(self)
self.name = "INFANTRIES"
self.specie = 'nouns'
self.basic = "infantry"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
d0547d59d6e983b150ef5b75a4eed948d525b702 | 9c4850697d66c6119e1d0b1f6347c1ea1d5d1ebb | /devilry/devilry_qualifiesforexam/rest/plugins.py | 827c4c55484b15027fc09aa581858ac840d21e25 | [] | no_license | evestera/devilry-django | 7952e0d65f23af6c4dc2fd22fb97462e4231deac | 760a4ca1c40a7ac0d60f7675efa6919ffae585da | refs/heads/master | 2020-12-25T20:09:00.756243 | 2015-05-21T16:33:47 | 2015-05-21T16:33:47 | 36,460,383 | 0 | 0 | null | 2015-05-28T19:14:10 | 2015-05-28T19:14:09 | null | UTF-8 | Python | false | false | 796 | py | from devilry.thirdpartylibs.djangorestframework.views import View
from devilry.thirdpartylibs.djangorestframework.permissions import IsAuthenticated
from devilry.devilry_qualifiesforexam.registry import qualifiesforexam_plugins
class Plugins(View):
"""
List all qualifiesforexam plugins.
# Parameters
... | [
"post@espenak.net"
] | post@espenak.net |
7019d9011b294e28b0c5930ba18147d57a875f26 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02820/s575673922.py | f16a32d8657587e45ffe242d254b6a7cde797db8 | [] | 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 | 466 | py | N, K = map(int, input().split())
scores = list(map(int, input().split()))
tables = {'s': 0, 'p': 1, 'r': 2}
patterns = input()
answer = 0
losers = [0 for _ in range(N)]
for i in range(N):
if i - K < 0:
answer += scores[tables[patterns[i]]]
else:
if patterns[i] == patterns[i-K]:
if losers[i-K] == 0:
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
8448b1805447976f1e7c5eec4852ea05db318a57 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03720/s542303275.py | 717edd71407e6178580ae24d28168b386801125d | [] | 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 | 214 | py | n,m =map(int, input().split())
l = []
for _ in range(m):
for i in map(int, input().split()):
l.append(i)
ans = []
for i in range(1,n+1):
ans.append(l.count(i))
for i in ans:
print(i) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
b02c44867bebd2fd7be2e444475ad7328ee30749 | d65b40055f18b9a2e5d0910cd107d7a38eaf0c1e | /vminspect/__init__.py | 46f2c990972cc688783a3d10f1c4a1405600e982 | [
"BSD-3-Clause"
] | permissive | gitcollect/vminspect | a5717c7887ad137551e7036b3300c0637f45e70c | 9d3b20302bd9fb467470db98d2db800257b62bda | refs/heads/master | 2021-06-08T12:13:49.244317 | 2016-08-10T14:33:18 | 2016-08-10T14:33:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,064 | py | # Copyright (c) 2016, Matteo Cafasso
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the f... | [
"noxdafox@gmail.com"
] | noxdafox@gmail.com |
539eca89f863ee392859815bbf80563223ba181a | c03ac514c1ba380d03c933ba08635f6e7ede33e1 | /params_refine_local_0.py | 467c2e035499249a76d2659e7dd93bd95e28282d | [] | no_license | ysong07/LSTM_tracking_joint | 010b05daf42829db3033f20c5311ac4b90e5d5aa | 8b68ab94ef34d350b89ed82da0e00ba64f3f0aec | refs/heads/master | 2021-05-11T07:12:36.393357 | 2018-01-18T17:08:42 | 2018-01-18T17:08:42 | 118,013,068 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,636 | py | import tensorflow as tf
FLAGS = tf.app.flags.FLAGS
tf.app.flags.DEFINE_string('train_dir', './checkpoints_4/test_refine_total_0',
"""dir to store trained net""")
tf.app.flags.DEFINE_string('train_file_dir','/scratch/ys1297/LSTM_tracking/data_origin/train_list_0.txt', """dir to read trainlis... | [
"song3681@126.com"
] | song3681@126.com |
d203d4d2552180685617cc8640b0acae4a2b6b39 | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /eXe/rev2735-2877/left-trunk-2877/exe/engine/genericidevice.py | f8f195f3ce9978abdddfb87394198e272ea75b67 | [] | no_license | joliebig/featurehouse_fstmerge_examples | af1b963537839d13e834f829cf51f8ad5e6ffe76 | 1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad | refs/heads/master | 2016-09-05T10:24:50.974902 | 2013-03-28T16:28:47 | 2013-03-28T16:28:47 | 9,080,611 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,851 | py | """
An iDevice built up from simple fields.
"""
from exe.engine.idevice import Idevice
from exe.engine.field import Field, TextField, TextAreaField, FeedbackField
from exe.engine.field import ImageField, AttachmentField
import logging
log = logging.getLogger(__name__)
class GenericIdevice(Idevice):
"""
A g... | [
"joliebig@fim.uni-passau.de"
] | joliebig@fim.uni-passau.de |
809fbaee258f02ab014fc14094ab0f5f575d65a3 | 1b6da7eae135f8e79df9ba6de490abc199066e9b | /0002/randomCodeMysql.py | c06e90cadfefef8e67e978f2dc0810e8bfa524ac | [] | no_license | sunqb/show-me-the-code | 11d511b0dd0a81ed893463af69d46465102e3d0c | d7994c70783c5a2e77b90547576ba04bccd47553 | refs/heads/master | 2022-05-15T09:51:04.507605 | 2022-03-10T06:28:27 | 2022-03-10T06:28:27 | 58,374,635 | 0 | 0 | null | 2016-05-09T12:26:27 | 2016-05-09T12:26:27 | null | UTF-8 | Python | false | false | 1,298 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'将 0001 题生成的 200 个激活码(或者优惠券)保存到 MySQL 关系型数据库中。'
__author__ = 'sunqb'
import sys
import random, string
import mysql.connector
import time
reload(sys)
sys.setdefaultencoding('utf-8')
#mysql数据库连接
conn = mysql.connector.connect(host='localhost', port='3306', user='root', p... | [
"1196239739@qq.com"
] | 1196239739@qq.com |
4776f6fa0f15068ac6533f19e762619251b49367 | 25b40f007fab960636bbdb491662aacd40149bb9 | /allinone/allinone/spiders/mydump/mytrigger5.py | c077c971532c789877f0f92af173268d8c93039f | [] | no_license | GucciXXX4/flipkar_parse | e17ccc7f203b0b6f8c2fcf90cfad4f32ebc32d8e | 55edb08618057195c0454dfde6e004ebed1ee28a | refs/heads/master | 2022-03-07T06:33:54.098444 | 2014-04-12T08:19:59 | 2014-04-12T08:19:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,010 | py | from multiprocessing import Process, Queue
import code7_allinone5
import subprocess
num_fetch_threads = 20
enclosure_queue = Queue()
def main2(i, q):
while True:
pth_list2 = q.get()
code7_allinone5.main(pth_list2)
def main():
#f = open("availdirthree")
#dirthree = f.read().strip()
... | [
"jp213@ymail.com"
] | jp213@ymail.com |
d8aa7a84b91ae3ae70d4ef6ae313b7a8536f3f11 | 8e1be167066e30eff91c26c0757211cf3cf8b016 | /python/python_oop/bank_account.py | ee1c09d57a997a5f53fc014588eed7da87ddeec1 | [] | no_license | dojo-solutions/online-ft-python | 074d0ba968f5a77eaec1bca0904232f2aa29051a | b4f6941d0bba376d121a40a6429b815d5b03c32f | refs/heads/master | 2020-04-21T11:52:31.390772 | 2019-03-02T01:27:54 | 2019-03-02T01:27:54 | 169,542,448 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 878 | py | class BankAccount:
def __init__(self, interest_rate, balance=0):
self.interest_rate = interest_rate
self.balance = balance
def deposit(self, amount):
self.balance += amount
return self
def withdraw(self, amount):
if self.balance > amount:
self.balance -= amount
else:
print("I... | [
"wes@tao.team"
] | wes@tao.team |
56244657e95b5254c33be876b65bc26e4b057aa1 | dd0d2a4da64200a7bea42d23122384189b900850 | /Sample_Exam/Sample_Exam_Questions/question_4.py | c9f364bca68fc787d5e150097d82ebb46e4e28dc | [] | no_license | gakkistyle/comp9021 | 06ad00b47b7b0135013b014464b5f13530cad49d | 4d0d4a2d719745528bf84ed0dfb88a43f858be7e | refs/heads/master | 2022-09-24T13:10:29.609277 | 2020-06-06T16:54:42 | 2020-06-06T16:54:42 | 270,043,710 | 14 | 7 | null | null | null | null | UTF-8 | Python | false | false | 1,503 | py | # COMP9021 19T3 - Rachid Hamadi
# Sample Exam Question 4
'''
Will be tested with a at equal equal to 2 and b at most equal to 10_000_000.
'''
import sys
from math import sqrt,ceil
def isprime(n):
if n == 2:
return True
for i in range(2,ceil(sqrt(n))+1):
if n % i == 0:
return... | [
"1824150996@qq.com"
] | 1824150996@qq.com |
5aac43968205a0b5b6480d58f360db113c2aa7c3 | 3d19e1a316de4d6d96471c64332fff7acfaf1308 | /Users/1/1019786/listsortpy.py | d9e3ef2f9616eecaae5051b53c3057b6760eb1ef | [] | no_license | BerilBBJ/scraperwiki-scraper-vault | 4e98837ac3b1cc3a3edb01b8954ed00f341c8fcc | 65ea6a943cc348a9caf3782b900b36446f7e137d | refs/heads/master | 2021-12-02T23:55:58.481210 | 2013-09-30T17:02:59 | 2013-09-30T17:02:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,914 | py | ###############################################################################
# START HERE: Tutorial 1: Getting used to the ScraperWiki editing interface.
# Follow the actions listed with -- BLOCK CAPITALS below.
###############################################################################
# ----------------------... | [
"pallih@kaninka.net"
] | pallih@kaninka.net |
70ebddf34226b2ff1f065cf457b5e14bbf452e17 | 9f26975c02f7a10ce23c5f6217fc1f4a80c5134c | /function_4.py | 01d6b0c7472d40f85c243d31f2e41df6419b0e2b | [] | no_license | ravi4all/PythonReg2_30_2020 | d0ae837da4c19f1bff9a938e5a91c561c9288f36 | ccb85325e0efce60c771697f8d07dc5e63cfaa5b | refs/heads/master | 2020-12-18T04:16:27.399221 | 2020-03-20T15:05:30 | 2020-03-20T15:05:30 | 235,315,428 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 250 | py | # Parameters/arguments in function
# Positional + Default arguments
def emp(name,sal,dept="IT"):
print("Details of {} are : ".format(name))
print("Salary is", sal)
print("Dept is", dept)
emp("Ram",34500)
emp("Shyam",45000,"HR") | [
"noreply@github.com"
] | ravi4all.noreply@github.com |
d6ed560ffe86223da0714b40d15b394f79e1015a | fb9c24e1e27c930881f54a0d609683983c726cec | /orders/views.py | eaa5e2622e7c84ba3c320a3e02b905f90f791574 | [] | no_license | Safintim/flower-shop | 6ba28f3f82912bcedd8c7d1e259557cda729410e | 92c0b7488b5370fc5512d6ce85f0e76a2a55bdbd | refs/heads/master | 2023-04-08T18:48:43.866959 | 2021-04-14T10:18:06 | 2021-04-14T10:18:06 | 254,976,051 | 0 | 0 | null | 2020-06-06T08:55:36 | 2020-04-11T23:50:58 | Python | UTF-8 | Python | false | false | 1,300 | py | from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import redirect
from django.views import generic
from cart.models import Cart
from orders.forms import OrderForm, OrderCheckStatusForm
from orders.models import Order
class OrderCreateView(LoginRequiredMixin, generic.CreateView):
mod... | [
"timurtlt96@mail.ru"
] | timurtlt96@mail.ru |
7a3d87164fce8ea3a0a97418268d1f1eb1d1d625 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /xzB3QsE8nRnxhBLce_2.py | c9c4cf8c98654ad84548d0351fc2beeae22e7c97 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 262 | py |
import math
def sine(x, y):
num = (math.sin(math.radians(y))* x)
return round(num,2)
def cosine(x, y):
num = (math.cos(math.radians(y))* x)
return round(num,2)
def tangent(x, y):
num = (math.tan(math.radians(y))* x)
return round(num,2)
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
ed87e559d9d2584dcd611876e03cffa7cab564aa | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/advantage_air/sensor.py | 4af028e6db054a9bacd1a1bda246968750321f10 | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 6,657 | py | """Sensor platform for Advantage Air integration."""
from __future__ import annotations
from decimal import Decimal
from typing import Any
import voluptuous as vol
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorStateClass,
)
from homeassistant.config_entries import C... | [
"noreply@github.com"
] | home-assistant.noreply@github.com |
154cc5e60aeb469cef102e92c798668fa874e49d | 3ca67d69abd4e74b7145b340cdda65532f90053b | /programmers/난이도별/level03.블록_이동하기/sangmandu.py | 597c351ed152a1d93df2054eb51b4cd618804572 | [] | no_license | DKU-STUDY/Algorithm | 19549516984b52a1c5cd73e1ed1e58f774d6d30e | 6f78efdbefd8eedab24e43d74c7dae7f95c2893b | refs/heads/master | 2023-02-18T06:48:39.309641 | 2023-02-09T07:16:14 | 2023-02-09T07:16:14 | 258,455,710 | 175 | 49 | null | 2023-02-09T07:16:16 | 2020-04-24T08:42:27 | Python | UTF-8 | Python | false | false | 2,020 | py | '''
https://programmers.co.kr/learn/courses/30/lessons/60063
블록 이동하기
stack, save를 이용한 BFS
visited를 두 좌표에 적용해서 동시에 방문했을 경우 reject
같은 좌표축에 있을 경우는 회전이 불가
'''
from collections import deque
def solution(board):
move = [(0, 1), (0, -1), (1, 0), (-1, 0)]
size = len(board)
visited = set()
stack = deque()
... | [
"45033215+sangmandu@users.noreply.github.com"
] | 45033215+sangmandu@users.noreply.github.com |
5e577b9488c3f2a14179fdf1f4f1635281d9f7bb | 169e75df163bb311198562d286d37aad14677101 | /tensorflow/tensorflow/contrib/periodic_resample/python/kernel_tests/periodic_resample_op_test.py | 31a6fe1d94b8a972087e00cf7c676105b0f1129b | [
"Apache-2.0"
] | permissive | zylo117/tensorflow-gpu-macosx | e553d17b769c67dfda0440df8ac1314405e4a10a | 181bc2b37aa8a3eeb11a942d8f330b04abc804b3 | refs/heads/master | 2022-10-19T21:35:18.148271 | 2020-10-15T02:33:20 | 2020-10-15T02:33:20 | 134,240,831 | 116 | 26 | Apache-2.0 | 2022-10-04T23:36:22 | 2018-05-21T08:29:12 | C++ | UTF-8 | Python | false | false | 5,684 | py | # =============================================================================
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#... | [
"thomas.warfel@pnnl.gov"
] | thomas.warfel@pnnl.gov |
a2ee00c7d2d6a16b1d69df67b977e12701d6bf7e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02536/s784381739.py | 046bae1be7fe7fbdfdb239e63fa89577d8be5c8e | [] | 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 | 1,087 | py | n, m = map(int, input().split())
class UnionFind:
def __init__(self, n):
self.n = n
self.parent = [i for i in range(n)]
self.rank = [1]*n
self.size = [1]*n
def find(self, x):
if self.parent[x] == x:
return x
else:
self.parent[x] = self.find... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
a294e917ff0bead8b842def190dad62ab364e613 | 4ad0dddd7a6e29b31d5780bf6dec6ebad776cf73 | /RecoLocalCalo/HGCalRecProducers/python/HGCalLocalRecoSequence_cff.py | 1013320a0bbc7c95d3b3c6d745c5fe4baf167d9d | [
"Apache-2.0"
] | permissive | llechner/cmssw | 95dcd6ae0ced5546853778c6ebdf0dd224030215 | 419d33be023f9f2a4c56ef4b851552d2d228600a | refs/heads/master | 2020-08-26T20:20:28.940065 | 2018-10-18T09:24:51 | 2018-10-18T09:24:51 | 131,112,577 | 0 | 0 | Apache-2.0 | 2019-10-23T17:59:17 | 2018-04-26T06:51:19 | C++ | UTF-8 | Python | false | false | 354 | py | import FWCore.ParameterSet.Config as cms
#HGCAL reconstruction
from RecoLocalCalo.HGCalRecProducers.HGCalUncalibRecHit_cfi import *
from RecoLocalCalo.HGCalRecProducers.HGCalRecHit_cfi import *
from RecoLocalCalo.HGCalRecProducers.hgcalLayerClusters_cfi import *
HGCalLocalRecoSequence = cms.Sequence(HGCalUncalibRecHi... | [
"lindsey.gray@gmail.com"
] | lindsey.gray@gmail.com |
95e3872899b14a024477ff8e8f9566ccc1a1ce26 | 21e7753732296bfdfb6dd9a9b58c7c6b8d90a1e5 | /DynamicProgramming/makeChange/makeChange.py | e703d614b74531e93d3a0e807a5d6236552415f2 | [] | no_license | rongfeng-china/python-algorithms-and-data-structures | eb8514b44d7ff97dd7c4deda2d8ea888a5aa8d04 | a69241bb7b684bc7d00acdd46c2fc214f7b61887 | refs/heads/master | 2020-03-13T09:08:13.375870 | 2015-12-11T07:37:30 | 2015-12-11T07:37:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 870 | py | # Given an infinte number of quarters (25 cents), dimes (10 cents),
# nickles (5 cents), and pennies (1 cent), write code to calculate the
# number of ways of representing n cents.
# let map[i][j] denote the number of ways to have amount i using only
# denominations 1,2,...,j where j goes from 1 through 4 (4 denominat... | [
"prathamt@outlook.com"
] | prathamt@outlook.com |
10eac79acd569f47b4e7afdf6ac7017d96fe5836 | f2fec0f8599c0e7a8e02e6d25977c292b75e6940 | /akvo/iati/exports/elements/sector.py | a05bd2f16f9f61f10fa5fe8f76475fc960bb8d46 | [] | no_license | supermari0/akvo-rsr | 0238e2b01882ab3ba8f459db2bb94473404832a8 | 8c2163320d4381e815524dc322c76602bea212c7 | refs/heads/develop | 2021-01-18T15:07:29.221585 | 2015-12-03T14:59:31 | 2015-12-03T14:59:31 | 47,639,034 | 0 | 0 | null | 2015-12-09T20:14:33 | 2015-12-08T17:49:25 | Python | UTF-8 | Python | false | false | 1,104 | py | # -*- coding: utf-8 -*-
# Akvo RSR is covered by the GNU Affero General Public License.
# See more details in the license.txt file located at the root folder of the Akvo RSR module.
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.
from lxml import etree
def sector(pr... | [
"kasperbrandt87@gmail.com"
] | kasperbrandt87@gmail.com |
a640fa31958110740fa646c147c8ca25e33fc3fb | 51c33304feee6ef68f31cfd72ff15073c0b7eca6 | /gdb/migrations/0012_locality_sub_age.py | 566b1eb48086f6b414a19c878eb7552fef501e31 | [
"MIT"
] | permissive | paleocore/paleocore110 | 44a5238b0ef7c8740497a80f47f9a7b7f51adbf1 | 808022a11e6b70020b0b6f448567b96d21341974 | refs/heads/master | 2022-07-22T06:06:36.326993 | 2021-12-13T20:12:30 | 2021-12-13T20:12:30 | 92,423,385 | 0 | 0 | MIT | 2022-07-06T19:46:56 | 2017-05-25T16:36:37 | Python | UTF-8 | Python | false | false | 741 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2018-08-22 00:26
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gdb', '0011_auto_20180822_0024'),
]
operations = [
migrations.AddField(
... | [
"denne.reed@gmail.com"
] | denne.reed@gmail.com |
b968d20f57f43eba75348f6126680b8c77c93977 | 4a36849188747a1e3cc4b052eb6bc3a21e3e53bb | /LeetCode/Problems/894. All Possible Full Binary Trees/python.py | 442faf85e1cd6cd23a08badd90ee280727ac01b4 | [] | no_license | koking0/Algorithm | 88f69a26f424d1b60a8440c09dd51c8563a86309 | 2828811ae2f905865b4f391672693375c124c185 | refs/heads/master | 2022-07-06T17:10:07.440930 | 2022-06-24T14:59:40 | 2022-06-24T14:59:40 | 216,952,717 | 35 | 48 | null | 2020-07-21T02:46:26 | 2019-10-23T02:41:09 | Java | UTF-8 | Python | false | false | 637 | py | # -*- coding: utf-8 -*-
# @Time : 2022/2/21 12:57
# @File : python.py
# @Description : None
# ----------------------------------------------
# ☆ ☆ ☆ ☆ ☆ ☆ ☆
# >>> Author : Alex
# >>> Mail : liu_zhao_feng_alex@163.com
# >>> Github : https://github.com/koking0
# >>> Blog : https://alex007.b... | [
"alex18812649207@gmail.com"
] | alex18812649207@gmail.com |
946729ffb1377681b4b5a6f05502a6264a5495f7 | 306cb663a84dbf174c60ec0268d004fbb6fafba2 | /manage.py | 9f96d9b236df22ed086870709d9a2ab78b4f7f4a | [] | no_license | aiunit/govein | 0e626c201abe55fc513bc3ff22d63f13531ff502 | 150ccfe27566d4a9568e3e53504baf19cb2f4857 | refs/heads/master | 2021-01-12T14:10:42.687171 | 2016-10-08T01:42:13 | 2016-10-08T01:42:13 | 69,924,271 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 249 | py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "govein.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
"57082212@qq.com"
] | 57082212@qq.com |
63031a2c5beab86b9dd4e9da80e05848d9e6dc5d | 2e02ecd606e6e9d62781aef2af50afc2fa253c6d | /tests/test_error_router.py | 042ecd4b9177666144e7c31956a158d76640d484 | [
"MIT"
] | permissive | mrkrynmdsco/cyclotron-py | 649dbc807a00be514ed43436aa52223e1d83bd48 | e570b6ec1a1b0a85c964322ac2391e95f4bedaec | refs/heads/master | 2023-08-24T05:47:52.325834 | 2021-10-19T15:41:34 | 2021-10-19T15:41:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 877 | py | from unittest import TestCase
import rx
import rx.operators as ops
from rx.scheduler import CurrentThreadScheduler
from cyclotron.router import make_error_router
class ErrorRouterTestCase(TestCase):
def test_route_error(self):
actual_sequence = []
def on_chain_item(i):
nonlocal actua... | [
"romain.picard@oakbits.com"
] | romain.picard@oakbits.com |
125c3d1f5ea795f91b8334fa9792e41d2dfe9fb0 | 3d62a14eb69baea0737f8c093336cbf6380b30a7 | /dingtalk/api/rest/OapiFinanceLoanNotifyLendRequest.py | 4efab79d5a1e8ff208ec250f4de8654140b9530d | [] | no_license | KangSpace/message_plus_server | 50cbc55c296d5e835a0c6f99f45cf699f6806add | 300954993f44648db3a2124d587533656d970d6c | refs/heads/main | 2023-05-01T15:08:18.195400 | 2021-05-27T04:41:56 | 2021-05-27T04:41:56 | 361,338,925 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,593 | py | '''
Created by auto_sdk on 2021.02.25
'''
from dingtalk.api.base import RestApi
class OapiFinanceLoanNotifyLendRequest(RestApi):
def __init__(self,url=None):
RestApi.__init__(self,url)
self.amount_update_time = None
self.available_limit = None
self.bank_name = None
self.bankcard_no = None
self.b... | [
"kango2gler@gmail.com"
] | kango2gler@gmail.com |
0920ee19670b0e2c7ff310fe7f88dd2792890004 | 75dff087b6bec301193b2c145579d38b28249d22 | /Python/graph/graph.py | 6fbeb523fa15d225d8846ce3f0707e99eca0bae2 | [] | no_license | ChihYunPai/Data-Structure-and-Algorithms | 2d3d930d8374b62287f7cc8c3741a1d7b3d227b6 | 27a85e20605393a5eca3f8bd7d42c389612493d5 | refs/heads/master | 2023-06-07T04:04:57.186920 | 2021-07-03T03:28:29 | 2021-07-03T03:28:29 | 119,465,269 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,940 | py | """
Python Implementation of Graph
"""
"""
to be continued:
1. change graph to {Node_X : {(Node_Y: value, edge_weight), (Node_Z: value, edge_weight)...}, ... }
2. methods:
get_edge_value
set_edge_value
find_all_paths
find_shortest_paths
"""
from collections import defaultdict
class Node():
def __init__(self, key... | [
"tonypaiwhite@gmail.com"
] | tonypaiwhite@gmail.com |
e4b0c2fa2a204194ac1129ee977c7c774db241b6 | 95644af9cd3325e2ba2280184b6491203d52b549 | /source/scripts/python/classname/source/classname.py | b8279c79aa2680dd86497876009dc12259a0b194 | [
"Apache-2.0",
"Python-2.0",
"GPL-2.0-or-later",
"MPL-1.1",
"NCSA",
"LicenseRef-scancode-proprietary-license",
"GPL-1.0-or-later",
"BSD-3-Clause",
"MPL-2.0",
"Ruby",
"BSD-2-Clause",
"MIT"
] | permissive | gatarelib/core | ef031ff87eeefbbfa2dd91565bc08460ec43d6a6 | ac83a433282d10350eab83da69dcc0e5094bbc30 | refs/heads/develop | 2020-06-17T16:49:36.208335 | 2019-07-03T20:46:19 | 2019-07-03T20:46:19 | 195,981,931 | 0 | 0 | Apache-2.0 | 2020-02-14T00:07:32 | 2019-07-09T09:55:55 | C | UTF-8 | Python | false | false | 319 | py | #!/usr/bin/python3.5
class MyClass:
"This is a class"
a = 10;
def func(self):
print('Hello World');
return 3;
def my_function(a: MyClass):
return a.func();
def other_function(b: my_function):
a = MyClass();
return my_function(a);
def object_function(obj: object):
return 3;
| [
"vic798@gmail.com"
] | vic798@gmail.com |
47b019adbc5d4ec11da7fbb8dd620b44823dcf50 | ef013d1b9f21da984d1847fea4f11d7ffa1361d5 | /django_rest_model_hyperlink_serializers/django_rest_model_hyperlink_serializers/urls.py | 10ad40225b3403bc2e52580a06e1d9c240e06dc7 | [] | no_license | fredkingham/django_rest_model_hyperlink_serializers_project | ed7a1e13d4a6cf771bc52131b9097a8d764620e3 | 22152664f9998f5e4c7b8269bcf05c9fa4449d00 | refs/heads/master | 2021-01-23T18:50:41.309481 | 2013-08-28T21:00:40 | 2013-08-28T21:00:40 | 12,306,247 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 645 | py | from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'', include('example.urls')),
# Examples:
# url(r'^$', 'django_rest_model_hyperlink_serializers.views.home', name='h... | [
"fredkingham@gmail.com"
] | fredkingham@gmail.com |
7f8d51b9cdbaf749a543a390669a40e3c91c4887 | c7a1470d2f6a15265e1f884c86439dc6d98b4484 | /LeetCode/0589_N-ary_Tree_Preorder_Traversal.py | 8a34f53e48e00a44697d895fb9ef62f295d3fb71 | [] | no_license | GuanYangCLU/AlgoTestForPython | 5239774fb6c840f3d65c4e4290ce8125fe8c94d3 | dddbc8115f69dec636c62c755f02905c469155e0 | refs/heads/master | 2022-01-19T15:03:54.835403 | 2021-12-30T02:19:37 | 2021-12-30T02:19:37 | 122,312,195 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 546 | py | """
# Definition for a Node.
class Node:
def __init__(self, val=None, children=None):
self.val = val
self.children = children
"""
class Solution:
def preorder(self, root: 'Node') -> List[int]:
if not root:
return []
res = []
def helper(parent, valArr):
... | [
"noreply@github.com"
] | GuanYangCLU.noreply@github.com |
86f5220458fdf40fa6f53be155da9924abb4a338 | c0578b14ebaef889ffc75551ebcc7e5c80b6069e | /src/863_All_node_distance_k_in_binaryTree.py | 61c3754ac635cbc95567289faff62e84ea42f7f2 | [] | no_license | BrianQcq/LeetCode | 88ee122aa2b358c61d6980c159008e8ccac6cc8c | 127ca7d82fa15214da8d5e9fbc461831cdb6b60b | refs/heads/master | 2020-06-10T04:20:33.798787 | 2019-11-12T07:56:58 | 2019-11-12T07:56:58 | 193,580,067 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 791 | py | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
from collections import deque
class Solution(object):
def distanceK(self, root, target, k):
def dfs(node):
if not node:
return
if node... | [
"qiuchuanqin@gmail.com"
] | qiuchuanqin@gmail.com |
7b54eb275c029803fb54ee0c231de316722db5bd | 1d96db84225301d972f07cad95c2a13f4fbafa84 | /PyROOT/BaBar/TomosAutoReader/autoread.py | de16c33dccb58e7d2abdc3da98936e2da817eb54 | [] | no_license | mattbellis/matts-work-environment | 9eb9b25040dd8fb4a444819b01a80c2d5342b150 | 41988f3c310f497223445f16e2537e8d1a3f71bc | refs/heads/master | 2023-08-23T09:02:37.193619 | 2023-08-09T05:36:32 | 2023-08-09T05:36:32 | 32,194,439 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,499 | py | #!/usr/bin/env python
import os
from ROOT import *
class ntuplereader:
def __init__(self,files,branch,varsToUse):
self.ntupleFiles = files #["sp1228_ddv3NoNNCut.root"]
tmpClassName = "___tmpClass"
self.varsToActivate = varsToUse
if os.path.exists(tmpClassName+".C"):
os... | [
"matthew.bellis@gmail.com"
] | matthew.bellis@gmail.com |
42fc756bc84beb1645bf54f5b0423d17ab3d67ba | 4edd4b1622d89cc16fda1b62ee7141ab5775ef95 | /tests/test_sample.py | 15cd843070ace0e20f20b627c806edf4d2e1e60d | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | antocuni/pytest-benchmark | 9e4bf0dec43c97475f0b4a54f8f1147bc95734a2 | 22c26142a5df9cf11ee389716ee7051597430b31 | refs/heads/master | 2020-12-14T07:28:29.280270 | 2016-12-08T23:59:43 | 2016-12-08T23:59:43 | 46,940,289 | 1 | 1 | null | 2015-11-27T11:17:17 | 2015-11-26T17:47:59 | Python | UTF-8 | Python | false | false | 1,614 | py | from functools import partial
import pytest
empty = object()
class cached_property(object):
def __init__(self, func):
self.func = func
def __get__(self, obj, cls):
value = obj.__dict__[self.func.__name__] = self.func(obj)
return value
class SimpleProxy(object):
def __init__(s... | [
"contact@ionelmc.ro"
] | contact@ionelmc.ro |
8637cca2b18a0f6debdec1d6d7588b629991cf57 | 940d7b93fb27e8eead9b6e52bc5c7444666744dd | /python/src/Lib/test/test_startfile.py | c4d12d708e8af223642f8b0116c5ade167ae3f49 | [
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"Python-2.0",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-python-cwi",
"Apache-2.0"
] | permissive | pilotx45/sl4a | d446531d310cc17d93f24aab7271a0813e8f628d | 150e3e46b5103a9b9a391034ef3fbc5bd5160d0f | refs/heads/master | 2022-03-24T19:48:30.340479 | 2022-03-08T16:23:58 | 2022-03-08T16:23:58 | 277,016,574 | 1 | 0 | Apache-2.0 | 2022-03-08T16:23:59 | 2020-07-04T01:25:36 | null | UTF-8 | Python | false | false | 1,201 | py | # Ridiculously simple test of the os.startfile function for Windows.
#
# empty.vbs is an empty file (except for a comment), which does
# nothing when run with cscript or wscript.
#
# A possible improvement would be to have empty.vbs do something that
# we can detect here, to make sure that not only the os.startfile()
#... | [
"damonkohler@gmail.com"
] | damonkohler@gmail.com |
0a25577152f01ca4c5adb84ce7d8ae5d8fad8474 | c50e914875153570965ff009b609573fab6e3025 | /main.py | e8597bf4aa855f0be5619044102ad05ab847eb14 | [
"MIT"
] | permissive | Hylan129/WEB_TRANSFER_DOCUMENTS | 0005f88f3c31875c8f420145ac17988af44625c9 | cab01607a8d502d87bb9efa217baacb259e10684 | refs/heads/master | 2022-12-29T20:09:47.283512 | 2020-10-15T09:35:09 | 2020-10-15T09:35:09 | 304,271,572 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,773 | py | # -*- coding: utf8 -*-
from bottle import run, route, static_file,request,template,default_app,response,redirect
import random,Email_Custom
from collections import defaultdict
import csv,datetime,bottle,traceback
user_information = {}
paths = {}
with open('data/data_sources.csv','r') as f:
content = csv.reader(f)
... | [
"jyzyg129@163.com"
] | jyzyg129@163.com |
8554051b74c3451f83fc74737b0fbdaeac755796 | b43cee0973a455a58b74233d4e02d522587f93ae | /skillbox/basic/module16/hwork16.py | 49e1475b463d20a49a62ad62d0abf3a3a10cb105 | [] | no_license | ivadimn/py-input | 5861cc92758378f44433bd6b1af7ba78da04d1c0 | bbfdd74c4dffe66440490d79082de2c0318e5027 | refs/heads/master | 2023-08-15T03:34:01.916026 | 2023-07-24T14:48:08 | 2023-07-24T14:48:08 | 202,401,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,249 | py | """
def remove_elems(l : list, e):
while e in l:
l.remove(e)
return l
a = [1, 5, 3]
b = [1, 5, 1, 5]
c = [1, 3, 1, 5, 3, 3]
a.extend(b)
print("Кол-во цифр 5 при первом объединении:", a.count(5))
a = remove_elems(a, 5)
a.extend(c)
print("Кол-во цифр 3 при втором объединении:", a.count(3))
print("Итогов... | [
"ivadimn@mail.ru"
] | ivadimn@mail.ru |
0e9e5efd4965543d569b60cf441e7c4cc611750c | 444a9480bce2035565332d4d4654244c0b5cd47b | /research/cv/wdsr/src/utils.py | b96d2be51109b61f6019cfa1187fc414402ae89e | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license"
] | permissive | mindspore-ai/models | 7ede9c6454e77e995e674628204e1c6e76bd7b27 | eab643f51336dbf7d711f02d27e6516e5affee59 | refs/heads/master | 2023-07-20T01:49:34.614616 | 2023-07-17T11:43:18 | 2023-07-17T11:43:18 | 417,393,380 | 301 | 92 | Apache-2.0 | 2023-05-17T11:22:28 | 2021-10-15T06:38:37 | Python | UTF-8 | Python | false | false | 3,812 | 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 to... | [
"chenhaozhe1@huawei.com"
] | chenhaozhe1@huawei.com |
9e7928c0721f78c52393a2993c4eb1fc63f4ed96 | c7b17516c37dde4083c3a3be314a24bdda1f684f | /src/Utils/InfoExtractor.py | ab788dda4d4c9b9ee95c084b5704f83c01afb5de | [
"BSD-3-Clause",
"MIT"
] | permissive | cloudtracer/codex-backend | 9b5945993373ede6ac805bc6234426a3a3c528b1 | 3e372a6970ba989e08d485cbafd08024c420f3d3 | refs/heads/master | 2021-01-13T04:46:51.222671 | 2017-01-11T18:02:11 | 2017-01-11T18:02:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,245 | py | # Copyright (C) 2016 Deloitte Argentina.
# This file is part of CodexGigas - https://github.com/codexgigassys/
# See the file 'LICENSE' for copying permission.
import hashlib
import magic
import ssdeep
def MIME_TYPE(data,mime=True):
try:
return magic.from_buffer(data,mime=mime)
except magic.MagicExcept... | [
"javierbassi@gmail.com"
] | javierbassi@gmail.com |
865ef3983f2ee07769339c37d9c2bddac00cbfcb | 7f43264f32a57599d87fe8be8e0d748d89abecab | /api_v0/TransFactorQuery.py | ead2fe6210558c041883de2845c35b9a628af2fb | [] | no_license | chair300/rsss_api | e13215439be1bfaa536ea7be5bfe4cc657bb0663 | 03866b0f5052dc81b61cab3b1c2a451d8e2ec449 | refs/heads/master | 2023-03-19T02:38:09.963553 | 2018-01-17T00:41:18 | 2018-01-17T00:41:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 926 | py | #Some of these imports may not be needed
from rest_framework.response import Response
from rest_framework import status
from ElasticsearchQuery import ElasticsearchAtsnpQuery
class TransFactorQuery(ElasticsearchAtsnpQuery):
def prepare_json_for_query(self):
#use a try/catch here.
return self.query... | [
"rebeccakathrynhudson@gmail.com"
] | rebeccakathrynhudson@gmail.com |
fa5eabd80b0871102db7422ad5f696af3e52398f | 2ac7b97e702a40bd256d8788309f312951130514 | /chapter07/bm_match.py | 1179fb70176728ff0001fe9347705ca88212b590 | [] | no_license | ZeroMin-K/Doit_Algorithm | 62991700d70649e8fe72f0fccc50699092526826 | 51d9738fcc1a9452625fc25daec0f0ca5274cde2 | refs/heads/main | 2023-03-28T13:50:46.582142 | 2021-03-29T12:45:13 | 2021-03-29T12:45:13 | 328,176,294 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 974 | py | # 보이어 무어법으로 문자열 검색하기(문자열 길이는 0~255개)
def bm_match(txt: str, pat: str) -> int:
# 보이어 무어법으로 문자열 검색
skip = [None] * 256 # 건너뛰기 표
# 건너뛰기 표 만들기
for pt in range(256):
skip[pt] = len(pat)
for pt in range(len(pat)):
skip[ord(pat[pt])] = len(pat) - pt - 1
# 검색하기
whi... | [
"noreply@github.com"
] | ZeroMin-K.noreply@github.com |
9dace3b527d25ab9d8df63dddc40e57a2aa21795 | fcdce57c1bd0cc4f52679fd0f3f82532550083fa | /262/test_gc_content.py | aefbbba0e1868947ce4817b6ae13ff7621229b3b | [] | no_license | nishanthegde/bitesofpy | a16a8b5fb99ab18dc1566e606170464a4df3ace0 | c28aa88e1366ab65f031695959d7cd0b3d08be6b | refs/heads/master | 2023-08-08T16:53:17.107905 | 2023-07-22T19:07:51 | 2023-07-22T19:07:51 | 183,959,400 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,254 | py | """
Tests for gc_content.py
Uses various DNA sequences retrieved from NCBI as input
Compares user function with calculated GC content
Inputs are modified to check how the function deals with unknown characters
"""
import pytest
from gc_content import calculate_gc_content
DNA_SEQUENCES = [
(
( ... | [
"nhegde@netflix.com"
] | nhegde@netflix.com |
f6bf1d3bb0684b20e7b1b5e24ce03e554d89dc99 | 207cb61be2ae337f9588846610dc6c320b481f98 | /tests/tools_test/faiss_test.py | 688e4f428b8b52b9bf3c11d5fee96da28d8d44e6 | [] | no_license | 425776024/TextMatch | 8cb9d00a01a7d16166883fd871da494f93006d9a | 5dc1acaea3ed61d7a9ac4092c91a0401bffe6c4b | refs/heads/master | 2022-12-14T07:14:32.844971 | 2020-08-01T14:13:25 | 2020-08-01T14:13:25 | 288,750,742 | 1 | 1 | null | 2020-08-19T14:15:01 | 2020-08-19T14:15:01 | null | UTF-8 | Python | false | false | 4,864 | py | # -*- coding:utf-8 -*-
'''
-------------------------------------------------
Description : faiss 测试
Author : machinelp
Date : 2020-06-15
-------------------------------------------------
'''
import sys
import json
import time
import faiss
import numpy as np
from faiss import normalize_L2
from ... | [
"MachineLP@163.com"
] | MachineLP@163.com |
077119157709b4932cd744a873f230f166e929de | 473035074bd546694d5e3dbe6decb900ba79e034 | /traffic fluid simulator/backend/env_11_3/model/Memory.py | e0d4a59e55d42239bf3c968188690451fd0166fa | [] | no_license | johny1614/magazyn | 35424203036191fb255c410412c195c8f41f0ba5 | a170fea3aceb20f59716a7b5088ccdcb6eea472f | refs/heads/master | 2022-03-26T01:10:04.472374 | 2019-09-19T16:34:22 | 2019-09-19T16:34:22 | 171,033,407 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 311 | py | import attr
from model.Action import ActionInt
from model.LearningState import LearningState
@attr.s(auto_attribs=True)
class Memory:
state: LearningState
action: ActionInt
reward: any # float, ale to psuje obliczenia
new_state: LearningState
times: any
reshapedReward: bool = False
| [
"johny1614@gmail.com"
] | johny1614@gmail.com |
7475065e74332e8d006195930396de2952182615 | 26d9e55db3a43065dbb14cbbfe277600c92b5c80 | /controllers/security.py | 362fd7a4d78de7cdbc279622c5296e65eb86c25a | [
"MIT"
] | permissive | Mahuan06/blockpy-server | 2dc2e53f0706724fd649f056447247bf5cc270ba | c1f64ffb9846162488abeafeffde46017a5b2d61 | refs/heads/master | 2023-02-13T12:38:35.463901 | 2020-12-31T20:54:06 | 2020-12-31T20:54:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,659 | py | import re
from models.models import db
from models.user import User
from models.role import Role
from main import app
from flask_security import SQLAlchemyUserDatastore, Security
from flask_security.forms import ConfirmRegisterForm
from wtforms import StringField, validators, PasswordField
"""
TODO: Convert these t... | [
"acbart@vt.edu"
] | acbart@vt.edu |
baf83af8128e8b6f528b40c69890e61f9471727f | 4936c1d20aef7a93ad2ded2f5731b102631ad8b2 | /Tablas/tablas/Ruido5/consenso/EF/menu_3.py | 90eeed68626e114e874735b685f2e4b8b6cb0ee0 | [
"LicenseRef-scancode-other-permissive"
] | permissive | jcarlosorte/pyMIL-BNF | 530f60081607deecfee7c72264000c0ba34984fe | 36e282e35242815bf57310db98707da70d69b183 | refs/heads/master | 2022-11-12T20:58:49.058513 | 2020-07-06T15:35:01 | 2020-07-06T15:35:01 | 182,646,512 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,216 | py | # -*- coding: utf-8 -*-
"""
Created on Fri May 10 10:11:00 2019
@author: Usuario
"""
import sys,os,warnings
os.chdir('../../../../MILpy')
sys.path.append(os.path.realpath('..'))
warnings.filterwarnings('ignore')
#from funciones import fvc
from filters import EF
from filters import CVCF
from filters import IPF
folds... | [
"jcarlosorte@ugr.es"
] | jcarlosorte@ugr.es |
a34dc6046a742edf250a75d8b9b3daf1b2b81d0e | aca749bf3fa693e3d4121edf8d3601df3516c74a | /src/imio/urban/dataimport/AIHM/interfaces.py | 6e5886a8af419a287caf0c59817696c935e5c89e | [] | no_license | IMIO/imio.urban.dataimport | 1504bf8ef5270b5abc5ee3cf41cd715ec9ed2088 | 205b3a9fcbd2a70e96b94c40d3423fe702bae4cd | refs/heads/master | 2021-04-06T14:59:15.670813 | 2020-11-16T12:51:57 | 2020-11-16T12:51:57 | 124,391,083 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 184 | py | # -*- coding: utf-8 -*-
from imio.urban.dataimport.access.interfaces import IAccessImporter
class IAIHMDataImporter(IAccessImporter):
""" marker interface for AIHM importer """
| [
"delcourt.simon@gmail.com"
] | delcourt.simon@gmail.com |
9f01275bdad298648d66ed6007fdcb4a66dbfc76 | 455a501b6e7579a8d150d40645311433bf22d3c4 | /Fall 2021 Week 3/archery.py | 37e0b6886d298769ceecc65383c3104976112b22 | [] | no_license | Infinidrix/competitive-programming | e77e442b73590b9bf42a40832323d87f57bbbdf4 | 6cf7a9de7d076405990d497871bb2ccfe04fc6f3 | refs/heads/master | 2023-02-09T04:02:31.389806 | 2023-02-02T11:10:10 | 2023-02-02T11:10:10 | 222,917,959 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 185 | py | a, b, c, d = list(map(int, input().split()))
factor = (1 - a/b) * (c/d)
miss = (1 - a/b) * (1 - c/d)
probs = [(miss ** (i - 1)) * factor for i in range(1, 10000)]
print(1 - sum(probs)) | [
"biruksolomon11@gmail.com"
] | biruksolomon11@gmail.com |
5dbd42737be321c1edcf6e2c749c28b51ed92c69 | 3b4f985759e44dc169134ae7dcee8e92747c4b01 | /tests/tests_fabric/conftest.py | 1f32b51c40563233a9dc5e0596331f499716cfd0 | [
"Apache-2.0"
] | permissive | SkafteNicki/pytorch-lightning | 4b09863bf222241ca7128d13df94ff60b71e50aa | 7df627b43746a85aa87671bec3e6dada0d98b556 | refs/heads/master | 2023-07-15T21:20:02.468216 | 2023-05-04T08:12:33 | 2023-05-04T08:12:33 | 248,216,299 | 3 | 1 | Apache-2.0 | 2023-07-10T02:40:24 | 2020-03-18T11:44:20 | Python | UTF-8 | Python | false | false | 7,341 | py | # Copyright The Lightning AI team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | [
"noreply@github.com"
] | SkafteNicki.noreply@github.com |
d8307430773cc117550e591579d6307cdfe7a949 | fa35db633b6b9c70e593b789fc7d649926ca795a | /Livros_Cursos/Udemy/Turtle/fractal04.py | 26c08d6033cbfef11353c388359363588a858b90 | [] | no_license | Evaldo-comp/Python_Teoria-e-Pratica | 0700035db45d8a2800c2830fb3d9faa140654350 | d909782ecd1bb25d88c6c84897503743c5e9f401 | refs/heads/master | 2023-03-22T10:40:19.056375 | 2021-03-05T18:56:22 | 2021-03-05T18:56:22 | 264,572,161 | 0 | 1 | null | 2020-11-06T21:22:10 | 2020-05-17T03:00:35 | Python | UTF-8 | Python | false | false | 795 | py | # Python program to user input pattern
# using Turtle Programming
import turtle #Outside_In
import turtle
import time
import random
print ("This program draws shapes based on the number you enter in a uniform pattern.")
num_str = input("Enter the side number of the shape you want to draw: ")
if num_str.isdigit():
squ... | [
"evaldocomp@gmail.com"
] | evaldocomp@gmail.com |
bd3c3004b7ebefa5f0b1d9a86480e5ee4be0318e | 07622a0fb38e843ab0eef4f69bb8fb25d107c06d | /pretrained_mol_sim/Theano-master/theano/gof/sched.py | 3a091d78a043c547eb8fe52550b5629a3d7ee22f | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | andreeadeac22/graph_coattention | fa59d77252625e4bee1cb9670e4a0fd0fec98135 | 23781fedaa942ca5614054f965cb7b6543e533fa | refs/heads/master | 2023-08-08T01:51:51.368457 | 2020-02-19T04:56:59 | 2020-02-19T04:56:59 | 207,414,336 | 15 | 4 | MIT | 2023-07-22T15:47:39 | 2019-09-09T22:13:34 | Python | UTF-8 | Python | false | false | 7,867 | py | from __future__ import absolute_import, print_function, division
from collections import defaultdict
from six import iteritems
from theano.gof.graph import list_of_nodes
from theano.compat import cmp
# {{{ http://code.activestate.com/recipes/578231/ (r1)
# Copyright (c) Oren Tirosh 2012
#
# Permission is hereby grante... | [
"andreeadeac22@gmail.com"
] | andreeadeac22@gmail.com |
db275cf792690d988eef70dcac8687d7f84f7587 | 39b0ca87590e8c05668dd6371bbcdeb405eaeaec | /src/ch1/1.4/calculating_pi.py | 7b1f8ed2b32bc083c5aa297a65f3276395500864 | [] | no_license | antikytheraton/classic-computer-science-problems-in-python | d524ae9dee119c700eb8747760e29dbb3611c93f | b614f99b85a50cc858d41f91a1d075aff2991689 | refs/heads/master | 2020-05-27T10:23:25.410419 | 2019-05-26T20:29:28 | 2019-05-26T20:29:28 | 188,582,178 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 429 | py | '''
Leibniz formula
PI = 4/1 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11...
'''
def calculate_pi(n_terms: int) -> float:
numerator: float = 4.0
denominator: float = 1.0
operation: float = 1.0
pi: float = 0.0
for _ in range(n_terms):
pi += operation * (numerator / denominator)
denominator... | [
"debi_1223@hotmail.com"
] | debi_1223@hotmail.com |
acc39287e5f18f0b89cd8a5eb97b945ac5730b5a | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_stencilling.py | 79c1319931781c7c6d33144f5805bec06993e911 | [
"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 | 251 | py |
from xai.brain.wordbase.verbs._stencil import _STENCIL
#calss header
class _STENCILLING(_STENCIL, ):
def __init__(self,):
_STENCIL.__init__(self)
self.name = "STENCILLING"
self.specie = 'verbs'
self.basic = "stencil"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
09b88acc2d83a1c58af5f6ff5906a924a014eefd | 679f13def7630c439462eeca5f50c9141f5ea865 | /solutions/s067.py | 339d8daf4240cbd58f81b77ee06c9ae996296bea | [] | no_license | SinghTejveer/stepic_python_in_action_eng | dbd69fa2e15cff7a98714a4377c2bb52ce87ff2d | fe3a23c56af06ab19142143e47e85ea11adbbe99 | refs/heads/master | 2020-07-01T02:38:09.813335 | 2017-04-26T20:48:18 | 2017-04-26T20:48:18 | 135,005,834 | 0 | 1 | null | 2018-05-27T01:11:55 | 2018-05-27T01:11:54 | null | UTF-8 | Python | false | false | 700 | py | """
Given a line, containing spaces. Find how many words are there (the word is a
sequence of non-space characters, words are separated by a single space, the
first and last character of the string is not a space).
Input data
Several lines as input.
Output data
You should output the number of words in the first ent... | [
"karateev.pavel@ya.ru"
] | karateev.pavel@ya.ru |
14916e2df621af82c74f5438bbe0c4f046958fc1 | 5686d1a31b87a47a4774270c00cd141c221cf065 | /axonius_api_client/cli/grp_certs/cmd_gui_reset.py | f36abf1f862f32cc96684ae5f22b31ca131d751c | [
"MIT"
] | permissive | Axonius/axonius_api_client | e7eec0845eee9e1b314446121551c584655c2631 | be49566e590834df1b46494c8588651fa029b8c5 | refs/heads/master | 2023-08-19T04:43:13.717989 | 2023-08-10T18:49:40 | 2023-08-10T18:49:40 | 194,601,817 | 17 | 22 | MIT | 2023-08-30T18:45:15 | 2019-07-01T04:52:21 | Python | UTF-8 | Python | false | false | 1,431 | py | # -*- coding: utf-8 -*-
"""Command line interface for Axonius API Client."""
from ..context import CONTEXT_SETTINGS, click
from ..options import AUTH, add_options
from .grp_common import (
OPT_EXPORT_FILE_PEM,
OPT_PROMPT,
OPT_UPDATE_ENV,
confirm_cert_replace,
handle_export,
handle_update_env,
... | [
"jim@axonius.com"
] | jim@axonius.com |
b5ee83c546961657b19baac9fcdb560796ef3ce6 | e94c7bd97d8b8b3b2945d357521bd346e66d5d75 | /test/lmp/util/validate/test_raise_if_empty_str.py | 596c68c017b0e6c2870dc3ba1a3717e517d2b573 | [
"Beerware"
] | permissive | ProFatXuanAll/language-model-playground | 4d34eacdc9536c57746d6325d71ebad0d329080e | ec4442a0cee988a4412fb90b757c87749b70282b | refs/heads/main | 2023-02-19T16:21:06.926421 | 2022-09-25T13:35:01 | 2022-09-25T13:35:01 | 202,471,099 | 11 | 26 | NOASSERTION | 2023-02-16T06:39:40 | 2019-08-15T03:57:23 | Python | UTF-8 | Python | false | false | 586 | py | """Test raise exception.
Test target:
- :py:meth:`lmp.util.validate.raise_if_empty_str`.
"""
import pytest
from lmp.util.validate import raise_if_empty_str
def test_not_raise() -> None:
"""Must not raise when ``val`` is not empty :py:class:`str`."""
raise_if_empty_str(val='test', val_name='test')
def test_ra... | [
"ProFatXuanAll@gmail.com"
] | ProFatXuanAll@gmail.com |
c37fabc50e7c6418c53aa7ce59a0d4d3229fb56b | 0f83273b5cef30aadcd58af02d6b3a1193940237 | /nails/parsers/re_parser.py | fcdedc76d53e6e30aabddf749411eb26e4411274 | [
"MIT"
] | permissive | anderscui/nails | adce81602942b29e8e0d09f15bda0387af2892fa | b465c896e1dd10e1c7b104c7eda1c3ccb10005f0 | refs/heads/master | 2020-01-23T21:41:27.801214 | 2018-08-15T17:02:53 | 2018-08-15T17:02:53 | 74,688,823 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | # coding=utf-8
def parse_by_regex_with_span(regex, text):
return [(m.group(0), (m.span())) for m in regex.finditer(text)]
| [
"anderscui@gmail.com"
] | anderscui@gmail.com |
7e8d8cd51d43454bab938881f305b4fe6369440a | 1815b64a60fa9d0ccd3270d53cd176536558153f | /chrome/browser/signin/ui/android/DEPS | 0535ff62001916373f8a08604629fc926b0a9450 | [
"BSD-3-Clause"
] | permissive | violetForeden/chromium | ae8c65739de96dd141136e6523b4a2c5978491d9 | 43f3ea874caca29eead4dc4dfb1c8ce6f11fa5da | refs/heads/main | 2023-06-29T09:43:21.454580 | 2021-09-12T08:27:01 | 2021-09-12T08:27:01 | 405,598,541 | 1 | 0 | BSD-3-Clause | 2021-09-12T09:22:55 | 2021-09-12T09:22:55 | null | UTF-8 | Python | false | false | 421 | include_rules = [
"+components/browser_ui/bottomsheet/android",
"+components/browser_ui/test/android",
]
specific_include_rules = {
"AccountPickerDelegateImpl.*\.java"
: [
"+content/public/android/java/src/org/chromium/content_public/browser/LoadUrlParams.java"
],
"SigninCheckerTest.java": [
"+componen... | [
"chromium-scoped@luci-project-accounts.iam.gserviceaccount.com"
] | chromium-scoped@luci-project-accounts.iam.gserviceaccount.com | |
ac7f1700f0890fe773a37320a734e4c32ff82ca7 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2367/60592/293756.py | c7b5a76183db7cd4b797ed35c9d5a3a2168afeb3 | [] | 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 | 242 | py | n = int(input())
if n%2 == 0:
print(-1)
else:
strr = '1'
for i in range(0,100):
num = int(strr)
if num%n==0:
print(len(strr))
break
strr+='1'
if len(strr)==101:
print(-1) | [
"1069583789@qq.com"
] | 1069583789@qq.com |
2ecbb48b976c85c80415efc618cfe414748f459a | 999f970daf4538eef6a4f6db06b9de937466d18c | /aries_cloudagent/indy/sdk/profile.py | addd3ddb5a82298469eb5c74a60010bbcf15163c | [
"LicenseRef-scancode-dco-1.1",
"Apache-2.0"
] | permissive | MarvinEhaus/aries-cloudagent-python | 2fc828d945184d07817856860b3cc0f78bed256f | eba6c4ae9f573c3e0b4edd46f6b1e283baf0a907 | refs/heads/master | 2023-01-24T04:51:38.445543 | 2020-12-08T19:39:37 | 2020-12-08T19:39:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,681 | py | """Manage Indy-SDK profile interaction."""
import logging
from typing import Any, Mapping
from weakref import ref
from ...cache.base import BaseCache
from ...config.injection_context import InjectionContext
from ...config.provider import ClassProvider
from ...core.profile import Profile, ProfileManager, ProfileSessi... | [
"cywolf@gmail.com"
] | cywolf@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.