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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72d95d9d79cef5cbeca6ee583d2ebc7314606d6e | 54d2887e3c910f68366bd0aab3c692d54245e22a | /arc/arc025/a.py | bbcdf5f5008d4ea5e2a27ebd6595406ba81f4c0e | [] | no_license | Kevinrobot34/atcoder | 7aec367fd2c6b589e9d583dae7b3c7520ce9fa12 | 482ea508f098f81e4f19522fe518dd22c781aca9 | refs/heads/master | 2022-07-10T23:44:45.290022 | 2022-06-29T11:30:26 | 2022-06-29T11:30:26 | 158,081,477 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 181 | py | d = list(map(int, input().split()))
j = list(map(int, input().split()))
ans = 0
for i in range(7):
if d[i] > j[i]:
ans += d[i]
else:
ans += j[i]
print(ans)
| [
"[email protected]"
] | |
eb5616cfb71f50d5ece42954779cc6d30ab2fd09 | 19ce218477449ece043c0e40fb47ba55c4bfd38e | /network/tagged_delegate.py | 2d321c1ae60e772d8f2caa140fde192c45bd4de7 | [] | no_license | vickylunna/PyAuthServer | 7aef8b86f3a748bdd1b50a8c10872cfa39d6cdef | 9b6be1a805938f48292a231bad3f9006c667e06b | refs/heads/master | 2021-01-18T04:50:15.790653 | 2014-12-01T18:27:02 | 2014-12-01T18:27:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,284 | py | from .decorators import get_tag, has_tag
from .metaclasses.register import TypeRegister
from .world_info import WorldInfo
__all__ = ['DelegateByNetmode', 'DelegateByTag', 'FindByTag']
class FindByTag(metaclass=TypeRegister):
"""Provides an interface to select a subclass by a tag value"""
@classmethod
de... | [
"[email protected]"
] | |
1775764213fa055a85117b3e4513753453f10093 | 45fc3ca374b15e63fee49a78c54d1a7d5949ebd6 | /vega/core/evaluator/gpu_evaluator.py | 00caec4c26234cd3c8f389fc5f8fbe1b036e6a3b | [
"MIT"
] | permissive | 1ziyanW1/vega | d0849d09ba9dea85f1e135f515202e90533972aa | 9640a32d3cbb22e39593e2786b825b946aa6b281 | refs/heads/master | 2022-11-25T20:30:50.517879 | 2020-08-04T08:17:28 | 2020-08-04T08:17:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,892 | py | # -*- coding: utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the... | [
"[email protected]"
] | |
0731c42c5febe59fc7aa48a0d10201bb653fca1c | 42dce5a3a1ace43022968ec059df1b17f94776ba | /tat_aws_creator_auto_tag/tests/__init__.py | a989bb3d56e264743ade2655c449c9e32a1eec94 | [
"MIT"
] | permissive | techantllc/aws-creator-auto-tagger | 647db1c5cbed275608c0cb1f28622ef3d11c92bb | 413c9f6c91cfaa088bbc45bed0f6c9f09e02f48a | refs/heads/master | 2020-08-22T13:40:05.495905 | 2019-10-30T18:27:52 | 2019-10-30T18:27:52 | 216,407,093 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 188 | py | # -*- coding: utf-8 -*-
import boto3
aws_profile = "tat_sanhe"
boto_ses = boto3.Session(profile_name=aws_profile)
iam_client = boto_ses.client("iam")
s3_client = boto_ses.client("s3")
| [
"[email protected]"
] | |
a0a756527c4bea878ec4ec9a51f27f2aa7b0e709 | 0c9ec5d4bafca45505f77cbd3961f4aff5c10238 | /openapi-python-client/openapi_client/models/multi_form_variable_binary_dto.py | 5b444e02f29acbb121a3784c4daa78f23cced18b | [
"Apache-2.0"
] | permissive | yanavasileva/camunda-bpm-examples | 98cd2930f5c8df11a56bf04845a8ada5b3bb542d | 051f8f28c62845e68ce4059ab64264c5a0bdc009 | refs/heads/master | 2022-10-19T20:07:21.278160 | 2020-05-27T15:28:27 | 2020-05-27T15:28:27 | 267,320,400 | 0 | 0 | Apache-2.0 | 2020-05-27T14:35:22 | 2020-05-27T13:00:01 | null | UTF-8 | Python | false | false | 5,035 | py | # coding: utf-8
"""
Camunda BPM REST API
OpenApi Spec for Camunda BPM REST API. # noqa: E501
The version of the OpenAPI document: 7.13.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from openapi_client.configuration import Configuration
clas... | [
"[email protected]"
] | |
66ec8c7f71b6759f16016e52cff49cb461b2a215 | 78518b65b6823ac42b20515ae7716ada4b59db3d | /手写代码/第2章 数据处理与可视化/Pex2_12.py | b0c9c2b22908f384e5fe922680d7a77078d6e2a7 | [] | no_license | YunHao-Von/Mathematical-Modeling | 70d6ad8f2f543751883afdc85aa19b1c80a106a0 | 4fe153453cccb4b474166c104e08d13ed72bc5ac | refs/heads/master | 2023-03-02T23:16:40.839865 | 2021-02-15T09:52:24 | 2021-02-15T09:52:24 | 339,029,227 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 174 | py | import numpy as np
a=np.arange(4).reshape(2,2)
b=np.arange(4,8).reshape(2,2)
c1=np.vstack([a,b])
c2=np.r_[a,b]
d1=np.hstack([a,b])
d2=np.c_[a,b]
print(c1)
print(c2)
print(d1) | [
"[email protected]"
] | |
d6ae188b2c356f7e8c7b1e9f6b73323adeed445a | a8b37bd399dd0bad27d3abd386ace85a6b70ef28 | /airbyte-integrations/connectors/source-google-analytics-data-api/setup.py | d93d394a43545a29e58da42374364ee3ea361f13 | [
"MIT",
"LicenseRef-scancode-free-unknown",
"Elastic-2.0"
] | permissive | thomas-vl/airbyte | 5da2ba9d189ba0b202feb952cadfb550c5050871 | 258a8eb683634a9f9b7821c9a92d1b70c5389a10 | refs/heads/master | 2023-09-01T17:49:23.761569 | 2023-08-25T13:13:11 | 2023-08-25T13:13:11 | 327,604,451 | 1 | 0 | MIT | 2021-01-07T12:24:20 | 2021-01-07T12:24:19 | null | UTF-8 | Python | false | false | 679 | py | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from setuptools import find_packages, setup
MAIN_REQUIREMENTS = ["airbyte-cdk", "PyJWT==2.4.0", "cryptography==37.0.4", "requests"]
TEST_REQUIREMENTS = [
"freezegun",
"pytest~=6.1",
"pytest-mock~=3.6.1",
"requests-mock",
]
setup(
name... | [
"[email protected]"
] | |
f5d44c1fcfada39187884766cab499aa2b45c3d8 | 1b36425f798f484eda964b10a5ad72b37b4da916 | /ee/clickhouse/materialized_columns/test/test_query.py | c78623a831c3ed5c5ef9a4c39315d40ea239b639 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | dorucioclea/posthog | 0408baa2a7ae98e5bea352c516f741ddc17c0a3e | 8848981baf237117fb22d28af0770a0165881423 | refs/heads/master | 2023-01-23T11:01:57.942146 | 2023-01-13T09:03:00 | 2023-01-13T09:03:00 | 241,222,000 | 0 | 0 | MIT | 2020-02-17T22:34:37 | 2020-02-17T22:34:36 | null | UTF-8 | Python | false | false | 945 | py | from posthog.test.base import APIBaseTest, ClickhouseTestMixin
class TestQuery(ClickhouseTestMixin, APIBaseTest):
def test_get_queries_detects(self):
# some random
with self.capture_select_queries() as queries:
self.client.post(
f"/api/projects/{self.team.id}/insights/... | [
"[email protected]"
] | |
a1bffc2fe20ca4257e795c2a592f63257efca427 | 76d27bfccbd24c86c8a528d634e8c53a884bd331 | /blinking_image.py | bb94efc930b23102ec429ef8a70f687c4f2d0028 | [] | no_license | nickdelgrosso/SSVEP-CardGui | 07bb2d539ffe0bd46e4a80959466422c7e79e63b | edbccaccbe93f088019a545111b2fbf0f2af54bd | refs/heads/master | 2023-06-24T22:47:31.656748 | 2021-07-22T21:15:21 | 2021-07-22T21:15:21 | 388,243,533 | 0 | 1 | null | 2021-07-21T22:38:39 | 2021-07-21T20:55:53 | Jupyter Notebook | UTF-8 | Python | false | false | 764 | py | from psychopy import visual, core
class BlinkingImage:
def __init__(self, win, blink_frequency = 10., **kwargs):
self.win = win
self.image = visual.ImageStim(win=win, **kwargs)
self.clock = core.CountdownTimer(1. / blink_frequency)
self.blink_frequency = blink_frequency
@p... | [
"[email protected]"
] | |
6a47ec21f205e0e2961b22fcd6f376cc90061d1b | 8c730ccb9ec23fd9cbcb5903abecda86bf50e6ab | /config/memory_network_adeb.py | a9d6fef7a06170bbbae130786c8052f74d71095d | [] | no_license | JimStearns206/taxi | 93278b49e485bbe2feaa08a3e11f0f79e884bd0d | b6566c010be7c871a5b6c199feaf1dfda0910ade | refs/heads/master | 2021-01-21T07:07:59.274279 | 2015-07-16T22:59:50 | 2015-07-16T22:59:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,486 | py | from blocks.initialization import IsotropicGaussian, Constant
from blocks.algorithms import AdaDelta, CompositeRule, GradientDescent, RemoveNotFinite, StepRule, Momentum
import data
from model.memory_network import Model, Stream
n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known ... | [
"[email protected]"
] | |
053626d020f792d2a77cd4ec679ef747ea630e2d | f7139e3979fc32d96de0082d6402d94be64f0f2e | /Exercise-3/sensor_stick/scripts/segmentation.py | 6c7fc70194ee0bd5fa128ec4b7da45cd26ff2b2e | [
"MIT"
] | permissive | jaycode/RoboND-Perception-Exercises | 9eb652b15ad5eccd171b4894035fbcbaa185b4a1 | 8918730423fa4e788dc01352872644c065d58b4c | refs/heads/master | 2021-01-16T20:04:15.198564 | 2018-02-14T06:30:44 | 2018-02-14T06:30:44 | 100,196,660 | 0 | 1 | null | 2017-08-13T18:30:43 | 2017-08-13T18:30:43 | null | UTF-8 | Python | false | false | 3,791 | py | #!/usr/bin/env python
# Import modules
from pcl_helper import *
# TODO: Define functions as required
# Callback function for your Point Cloud Subscriber
def pcl_callback(pcl_msg):
# TODO: Convert ROS msg to PCL data
pcl_data = ros_to_pcl(pcl_msg)
# TODO: Voxel Grid Downsampling
vox = pcl_data.make_... | [
"[email protected]"
] | |
9d38d3cb8de2e003c85e45d93eff2ac7cf72a2b1 | 9e780f17eb49171d1f234944563225ca22b3c286 | /postgresqleu/membership/migrations/0008_membermail.py | 1d9ae5505932c90b5884e9723a0702bec6d8cd49 | [
"MIT"
] | permissive | pgeu/pgeu-system | e5216d5e90eec6c72770b88a5af4b3fd565cda59 | 885cfdcdadd4a721f72b699a39f26c94d1f636e0 | refs/heads/master | 2023-08-06T13:03:55.606562 | 2023-08-03T12:47:37 | 2023-08-03T12:47:37 | 161,434,221 | 15 | 27 | MIT | 2023-05-30T11:21:24 | 2018-12-12T04:48:14 | Python | UTF-8 | Python | false | false | 812 | py | # Generated by Django 3.2.11 on 2022-02-07 12:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('membership', '0007_meeting_reminders'),
]
operations = [
migrations.CreateModel(
name='MemberMail',
fields=[
... | [
"[email protected]"
] | |
53ea2685d2b68240d10424f11046e839be8682ef | b72d0900bec98fcee6c725cef035c02ca29bbf1b | /Python/VirtualEnvironment/portfolio/.history/portfolio/views_20201119102645.py | b701bf886f4d03f578254db395f0d10035583ba1 | [
"MIT"
] | permissive | sugamkarki/NAMI-Year-II-TERM-I-Group_Project | 68b8808c8607858a313e8b4d601d8d12c6edda2b | f0a9a5f219ccbec024eb5316361db3fca46e171c | refs/heads/master | 2023-06-28T19:07:19.330236 | 2021-07-24T03:05:42 | 2021-07-24T03:05:42 | 312,819,148 | 0 | 0 | MIT | 2021-07-24T12:45:06 | 2020-11-14T13:08:08 | Python | UTF-8 | Python | false | false | 183 | py | from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world. You're at the polls index.")
def cat():
| [
"[email protected]"
] | |
49defc368cb5599babac9b0973cbb3f3da2485e8 | acad69f0abe162eea0cb13cbe15bfd88f6da08b4 | /down-stream-tasks/mmdetection/tests/test_models/test_dense_heads/test_tood_head.py | 9d8c79c47fd1d441b368e1d7246d27775dd50d7e | [
"Apache-2.0"
] | permissive | zhangzjn/EMO | 69afcac53800d8b9a390f1214e178e2ca4da3b24 | 141afbdbce04683790f0699f256327ec420be442 | refs/heads/main | 2023-08-27T19:04:23.313676 | 2023-08-15T04:09:55 | 2023-08-15T04:09:55 | 584,987,542 | 139 | 9 | null | null | null | null | UTF-8 | Python | false | false | 5,070 | py | # Copyright (c) OpenMMLab. All rights reserved.
import mmcv
import torch
from mmdet.models.dense_heads import TOODHead
def test_tood_head_loss():
"""Tests paa head loss when truth is empty and non-empty."""
s = 256
img_metas = [{
'img_shape': (s, s, 3),
'scale_factor': 1,
... | [
"[email protected]"
] | |
5b115168345a1652c56f759de440862388473ee0 | 5da988c176252fca1b558190eff74ef3b89afc9f | /instrumentation/opentelemetry-instrumentation-falcon/tests/test_falcon.py | fe33a2f2dd1cca06c37f6d6179aa05655d9378c6 | [
"Apache-2.0"
] | permissive | kinvolk/opentelemetry-python | 3801376ee6bdb46d85d8876a97713e698e1241ce | 47483865854c7adae7455f8441dab7f814f4ce2a | refs/heads/master | 2023-05-25T19:36:05.130267 | 2020-11-02T17:29:59 | 2020-11-02T17:29:59 | 201,488,070 | 1 | 2 | Apache-2.0 | 2023-05-16T18:48:46 | 2019-08-09T14:56:28 | Python | UTF-8 | Python | false | false | 7,123 | py | # Copyright The OpenTelemetry Authors
#
# 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 ... | [
"[email protected]"
] | |
c41b811032ac7e36dd9d4ab116a69cd029889b32 | ec726dac5bcd01ea807a3b24c9e25f9951f6e910 | /scripts/Lock.py | 42e6bcceb8660339fc43fc88988d5086f2b9182d | [] | no_license | cms-sw/int-build | 06d7fd680b0fcc06cce58869b928f2547b4731b1 | c0f2ca0ef96cdd46d9588ef908d11e9a9cab6618 | refs/heads/master | 2021-01-01T18:02:04.757560 | 2015-10-26T08:28:17 | 2015-10-26T08:28:17 | 11,394,116 | 0 | 3 | null | 2015-10-16T15:02:19 | 2013-07-13T21:00:45 | Python | UTF-8 | Python | false | false | 2,432 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from os import getpid, makedirs, kill
from os.path import join, getmtime
from commands import getstatusoutput
from time import sleep, time
def isProcessRunning(pid):
running = False
try:
kill(pid, 0)
running = True
except:
pass
return r... | [
"[email protected]"
] | |
6912fbc6262eef219acef4bb0f46fcdca0cde550 | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/pg_1544+107/sdB_PG_1544+107_coadd.py | d34ff0b3147d3f6d2c4257e6a18c9c3868d100a4 | [] | 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 | 430 | py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[236.659375,10.503742], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_PG_1544+107/sdB_PG_1544+107_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdB/sdB... | [
"[email protected]"
] | |
55e9e54940ecf7d642f3da6d4a45d111c723a725 | 0a091d537701f93cbab5c7f76c7bf8d117c93887 | /alembic/versions/138007156428_fix_komm_fylke_mapping.py | d97348a0a5fe9f5cdfe87180d6ed2538ad1ffdc7 | [
"MIT"
] | permissive | atlefren/beerdatabase | 61ecfc8b9de6e6b202c50b501ccded87387de289 | d3acf2b02966e058d3840cd167c1c787c0cb88ce | refs/heads/master | 2021-05-04T11:01:47.117527 | 2016-09-14T22:00:34 | 2016-09-14T22:00:34 | 45,804,354 | 10 | 3 | null | 2016-01-25T20:45:08 | 2015-11-08T23:38:31 | JavaScript | UTF-8 | Python | false | false | 1,164 | py | """fix komm fylke mapping
Revision ID: 138007156428
Revises: 13603cc8e9a7
Create Date: 2015-12-06 23:12:25.241712
"""
# revision identifiers, used by Alembic.
revision = '138007156428'
down_revision = '13603cc8e9a7'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade(... | [
"[email protected]"
] | |
e9f551acfb12c47aa1548d24eee4b522ceb8073b | 8cd15fba24b6dfa431f3764932101969f5fb524f | /JAMediaImagenes/gtk2/Interfaz/ToolbarPrincipal.py | 01fb926646a3946f16ca0652c42039c7313e706a | [] | no_license | srevinsaju/JAMediaSuite | c872b4781657bf1bcf63908f71abeca799b8c666 | 1813d1205cf31f89be3c4512eb495baed427494f | refs/heads/master | 2020-12-04T12:14:53.794749 | 2019-01-05T12:52:13 | 2019-01-05T12:52:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,462 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import gtk
import gobject
import commands
class ToolbarPrincipal(gtk.Toolbar):
__gsignals__ = {
"accion": (gobject.SIGNAL_RUN_LAST,
gobject.TYPE_NONE, (gobject.TYPE_STRING,))}
def __init__(self):
gtk.Toolbar.__init__(self)
... | [
"[email protected]"
] | |
5cf5686aab6d2c0ad688cea8069de3ca8a68b512 | 2df47589ca457d16fbffd4e1bccf5133174a0b97 | /highcharts/core/tests/test_product_json_view.py | b51a7fddda42ab847b32c19939890f918833a368 | [] | no_license | bguerbas/highcharts | a805419cb8d5a00bc3f82b5c4df285598f7685d8 | 571fba58465136c5040266b3d4ba2d65a5cc740c | refs/heads/master | 2022-02-12T19:33:12.244474 | 2016-06-04T05:00:24 | 2016-06-04T05:00:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 856 | py | from django.test import TestCase
from highcharts.core.models import Category, Product
class TestGet(TestCase):
def setUp(self):
category = Category.objects.create(category='Papelaria')
Product.objects.create(
product='A4',
price=4.2,
category=category
)... | [
"[email protected]"
] | |
92bca2bb4a0d14e571d6c8140331872c810d61c0 | de066f2aaf7810a9377020a2d25d674a52547a15 | /Cap05_GUI_Tkinter/extras/03_Barron_Stone/Chap05_Advanced_Widgets/06_configuring_widgets_styles.py | 08de715b89e479ed091ff2a6fa3d1a6052b49cc0 | [] | no_license | frclasso/2nd_Step_Python_Fabio_Classo | 91092b24c442cced4f7c5c145e1e9e8e5f7483d9 | ad6eefaeb4e6283c461562e7fddcb0aa81f2d90e | refs/heads/master | 2022-12-10T09:42:52.724283 | 2019-07-27T20:28:17 | 2019-07-27T20:28:17 | 146,759,779 | 1 | 0 | null | 2022-12-08T05:55:53 | 2018-08-30T14:13:49 | Python | UTF-8 | Python | false | false | 2,311 | py | #!/usr/bin/env python3
# Configurando o estilo dos widgetes
# styles descreve como o widget vai ser exibido de acordo com com o estado em que se
# econtra
# active, disabled, focus, pressed, selected, background, readonly, alternate, invalid, hover
# Vamos trabalhar com temas, que são uma coleção de estilos para wid... | [
"[email protected]"
] | |
88f772fda60dad89eacffbe396367d9c5fd3de8f | fd67592b2338105e0cd0b3503552d188b814ad95 | /egoi_api/apis/paths/__init__.py | d0fcf2e17c920e939c549a52c875cecfa03fb1db | [] | no_license | E-goi/sdk-python | 175575fcd50bd5ad426b33c78bdeb08d979485b7 | 5cba50a46e1d288b5038d18be12af119211e5b9f | refs/heads/master | 2023-04-29T20:36:02.314712 | 2023-04-18T07:42:46 | 2023-04-18T07:42:46 | 232,095,340 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 235 | py | # do not import all endpoints into this module because that uses a lot of memory and stack frames
# if you need the ability to import all endpoints from this module, import them with
# from egoi_api.apis.path_to_api import path_to_api
| [
"[email protected]"
] | |
1efc75fd3a62326bea8b5dfc1ee2e3d82520b1cc | 18887a0808c0a06a69be3e66c6337295bfc7d99e | /menus/models.py | b9443c0e078dc25a3ecb36e23f2231136700b1d8 | [] | no_license | teedee22/tobyd | 78adf69d7a02cce42dc5a94e0e58007b8e6be196 | 5c54a817608a3911dd44840be82d2bbea44f35c3 | refs/heads/master | 2022-12-14T08:29:12.952292 | 2019-09-25T20:13:31 | 2019-09-25T20:13:31 | 205,281,622 | 0 | 0 | null | 2022-12-08T06:35:44 | 2019-08-30T01:33:39 | Python | UTF-8 | Python | false | false | 1,776 | py | from django.db import models
from django_extensions.db.fields import AutoSlugField
from modelcluster.fields import ParentalKey
from modelcluster.models import ClusterableModel
from wagtail.admin.edit_handlers import (
MultiFieldPanel,
InlinePanel,
FieldPanel,
PageChooserPanel,
)
from wagtail.core.model... | [
"[email protected]"
] | |
d21cd8904bb3eea88d7fd3e5c4a93fff99003a16 | 26dd0732426322eb7c411b7f53d72ec3dddd63fe | /ABC_169/B.py | 42659b9159cc54e9ceb89999a6cf9a30bc723e12 | [] | no_license | Jinmin-Goh/AtCoder | 417290531bf92f79e1285052eb82d9a8a3c7b138 | 68d3f7840748814123beebabf478c9316268f166 | refs/heads/master | 2022-12-10T21:31:41.411567 | 2020-08-29T15:02:18 | 2020-08-29T15:02:18 | 262,826,100 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 472 | py | # Contest No.: ABC169
# Problem No.: B
# Solver: JEMINI
# Date: 20200531
import sys
import heapq
def main():
n = int(input())
nums = list(map(int, sys.stdin.readline().split()))
ans = 1
for i in nums:
if i == 0:
ans = 0
break
if ans > 10 ** 18:
... | [
"[email protected]"
] | |
ca05b371020a184e2d08e3162cf7c33c53f0a712 | 1fa2ad5ad57f08f805b9175ab2a961a24d621101 | /src/test_net.py | 6808c27a0db116df6527ec8343064fde04b06359 | [] | no_license | ZQPei/Lenet_cifar10_pytorch | e61626bdcadd1abec4389b5f1e40edd665db68fd | 911fd66e41d4ad7c03f13b603df8bc7c187acb38 | refs/heads/master | 2020-03-16T17:36:24.723685 | 2018-05-10T02:55:00 | 2018-05-10T02:55:00 | 132,839,844 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,571 | py | import torch
import torch.nn as nn
import torchvision
import numpy as np
import matplotlib.pyplot as plt
from Net import Net
# load net
mynet = torch.load('model/net.pth')
print(mynet)
#import ipdb; ipdb.set_trace()
# show me the weight
weight_conv1 = list(mynet.parameters())[0]
weight_conv1 = (weight_conv1-weight... | [
"[email protected]"
] | |
7921cac556470b0a4ac9583697ede3ba8d7170d3 | 2d58c1351ab970eb55f4832b09582592e96468d5 | /p74.py | 7dbccc89adfe89703af596f378511832a3be92eb | [] | no_license | 0x0400/LeetCode | 832bc971c2cae9eecb55f5b14e8c34eaec0d9e26 | 94bb9fedc908490cc52d87def317c057fadaeceb | refs/heads/master | 2023-02-24T20:13:11.345873 | 2023-02-10T16:46:31 | 2023-02-10T16:46:31 | 84,653,745 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 659 | py | # https://leetcode.com/problems/search-a-2d-matrix/
from typing import List
class Solution:
def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:
rowLen = len(matrix)
colLen = len(matrix[0])
for rowIdx in range(0, rowLen):
if matrix[rowIdx][colLen-1] < target:
... | [
"[email protected]"
] | |
f0890b75c3c25dfcbb281f0881f8e215f9a72c1e | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_23844.py | c65bb53c5f20a6b1517566f9d2447106889237be | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 138 | py | # Python create tuples using function returning multiple values
new_list = [(name, value) + extra_info(name) for name, value in old_list]
| [
"[email protected]"
] | |
43082e96c8ebbd7f7616eece51e9a54b4937c2c7 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/clouds_20200703155604.py | 15b31a2ea014762a7c9ddce1050ddf21dfc44820 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 344 | py | def jumpingClouds(c):
i = 0
jumps = 0
while i < len(c)-2:
if c[i] == 0 and c[i+2] == 0:
print('here')
print('c---->',c[i],'i-->')
jumps +=1
elif c[i] == 0 and c[i+1] == 0:
jumps +=1
i +=1
print(jumps)
jumpingClo... | [
"[email protected]"
] | |
071413884073143eac16e6b991abd4fee106fc0e | 9bcb5032d27ca321f489c035f7d46019ffdf4b85 | /numericalFunctions/ptwXY/Python/Test/UnitTesting/thicken/thicken.py | e40b151f77d3bf9074457d4b03816df30afbfdc4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | LLNL/gidiplus | 128ef4d4acbcb264e31794a535cd95e8c77d8a96 | e1c6f0e4de51bc4d7616c5c4676b9818c4b9817c | refs/heads/master | 2023-08-31T06:21:14.519577 | 2023-02-13T18:35:20 | 2023-02-13T18:35:20 | 187,251,526 | 10 | 3 | NOASSERTION | 2021-12-23T00:28:07 | 2019-05-17T16:48:24 | C++ | UTF-8 | Python | false | false | 2,306 | py | # <<BEGIN-copyright>>
# Copyright 2019, Lawrence Livermore National Security, LLC.
# See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: MIT
# <<END-copyright>>
import os
from numericalFunctions import pointwiseXY_C
if( 'CHECKOPTIONS' in os.environ ) :
options = os.environ['CHECKOPTIONS']... | [
"[email protected]"
] | |
686f9dae605c6b38e4db127878cb0fbcd0360617 | b665374878dd4a0b565afb3be8f41c97515b9d33 | /elifecrossref/preprint.py | 71cc91577a502fd31e407296fa7b1751fd1ebd91 | [
"MIT"
] | permissive | elifesciences/elife-crossref-xml-generation | e5ab62fec56653fee32ba7b9a2751df37b691b66 | 56440ebc20d4a652201011c9511ed64dfcc80c3d | refs/heads/develop | 2023-08-21T16:34:24.019886 | 2023-08-12T00:50:17 | 2023-08-12T00:50:17 | 95,716,515 | 5 | 4 | MIT | 2023-09-07T19:45:58 | 2017-06-28T22:21:40 | Python | UTF-8 | Python | false | false | 753 | py | from xml.etree.ElementTree import Element, SubElement
from elifearticle import utils as eautils
from elifecrossref import related
def set_preprint(parent, preprint):
"""
add rel:inter_work_relation tag for a preprint
"""
related_item_tag = SubElement(parent, "rel:related_item")
related_item_type =... | [
"[email protected]"
] | |
38916d27a6cbfea28a51061f2baec16d7065fd62 | 3056736f013b25d1e70adb355082c578e5091314 | /ml_quality/datasets/shit/snake_board_test.py | 92a2badc6ac91075e56ab0ca18e1394e5e96ab35 | [] | no_license | flerchy/codestyle-core | dcad1385b76678e4473f0804d2ecfaa03866d124 | a009bcd2f17dadd440ea5ff24bd3167e38948bff | refs/heads/master | 2021-01-20T03:21:16.694322 | 2017-06-05T05:52:35 | 2017-06-05T05:52:35 | 89,524,181 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,825 | py | import pygame, sys, random
from pygame.locals import *
from basics import snake,point,board, food
from basics.direction import Direction
def encrypt_snake(snake):
"""Returns encrpted Body list to send over netowrk."""
enc_data = "%%body%%"
for point in snake.get_body_points():
enc_data += str(point.get_x()) + "%... | [
"[email protected]"
] | |
99e2f8abf29c8d3a63efa35b197921747f42b243 | d3cdceb672f3ffa9d0f7cddfb03062d48a118427 | /hoods/admin.py | cde1e05c3f36d0a160cd75f271913491702fc12e | [] | no_license | sethmuriuki/Nights-Watch | e6e4020276ab87801f964e59da3f29f47b4e5c88 | 57a5bd3444b88442cb5ea988fc0ea5d64f44df2f | refs/heads/master | 2021-05-02T02:28:23.335867 | 2018-03-22T05:49:46 | 2018-03-22T05:49:46 | 120,884,306 | 0 | 1 | null | 2018-06-19T09:30:41 | 2018-02-09T09:18:05 | Python | UTF-8 | Python | false | false | 198 | py | from django.contrib import admin
from . import models
# Register your models here.
class GroupMemberInline(admin.TabularInline):
model = models.GroupMember
admin.site.register(models.Group) | [
"[email protected]"
] | |
35bb586667a937f6c2d36795e7b13b063fa3de4d | 0466559817d3a1be9409da2c83db99c4db3bacfe | /hubcheck/pageobjects/widgets/members_profile_website.py | 7aae462a94a557e4bcab95a0af413cd84964ba13 | [
"MIT"
] | permissive | ken2190/hubcheck | 955cf9b75a1ee77e28256dfd3a780cfbc17de961 | 2ff506eb56ba00f035300862f8848e4168452a17 | refs/heads/master | 2023-03-20T15:17:12.949715 | 2015-09-29T16:11:18 | 2015-09-29T16:11:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,080 | py | from hubcheck.pageobjects.basepageelement import Select
from hubcheck.pageobjects.basepageelement import Text
from hubcheck.pageobjects.widgets.members_profile_element import MembersProfileElement
class MembersProfileWebsite(MembersProfileElement):
def __init__(self, owner, locatordict={}):
super(MembersPr... | [
"[email protected]"
] | |
f6aab59774f510e241f1046f6ec4b42798bd38b4 | 8633ec7985ffd7f849210b93bc20e632f8ae8707 | /tree/CMSSW_4_2_8_patch7/src/Validation/RecoTrack/test/borisTests/MTV.py | 4f90e6fb5980d818f54e52ed358645a99d9d285f | [] | no_license | liis/el_track | 2ed5b3b7a64d57473328df0e5faf28808bab6166 | cd7978e5fa95d653bab5825b940911b465172c1a | refs/heads/master | 2016-09-10T20:09:07.882261 | 2015-01-08T14:41:59 | 2015-01-08T14:41:59 | 14,494,773 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,494 | py | import FWCore.ParameterSet.Config as cms
process = cms.Process("MULTITRACKVALIDATOR")
# message logger
process.MessageLogger = cms.Service("MessageLogger",
default = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
)
# source
readFiles = cms.untracked.vstring()
secFiles = cms.untracked.vstring()
source = ... | [
"[email protected]"
] | |
0c167adf308cbd963e674e936b502ec49de9948c | 8010b4640a79c5c1fb58dd9b011723b744b3dd47 | /src/unv/web/helpers.py | 3399a083be504cc40f7d81610d2c57ed2b2bf153 | [
"MIT"
] | permissive | c137digital/unv_web | 277578e2a128e193b12e88465fe7c93a4a2019f1 | 52bea090c630b4e2a393c70907d35c9558d259fa | refs/heads/master | 2020-04-15T07:39:27.027454 | 2019-08-29T20:50:53 | 2019-08-29T20:50:53 | 164,498,575 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,494 | py | import urllib
from aiohttp import web
from unv.utils.files import calc_crc32_for_file
from .deploy import SETTINGS as DEPLOY_SETTINGS
async def render_template(
request, template_name, context=None, status=web.HTTPOk.status_code):
template = request.app['jinja2'].get_template(template_name)
return ... | [
"[email protected]"
] | |
b945ff417f597ac2d5502e5f5d09f0d02334f7d4 | d44d11bb5e8a3245a8f2db39f9e460eae2b50c82 | /HKDataBase/tests.py | ec3068a14f0c6b395c56965e5930bdedf44af2db | [] | no_license | banziha104/HKServerA1 | 636f50de907ed5a8764b678b434acbc37bb7ee65 | 14a20432fdf3bcb6574e249f95b8c3662a30ee26 | refs/heads/master | 2021-08-10T12:42:49.889987 | 2017-11-12T11:55:46 | 2017-11-12T11:55:46 | 110,443,875 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 366 | py | from django.test import TestCase
import os
# Create your tests here.
from os.path import abspath, dirname, join
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = dirname(dirname(dirname(abspath(__file__))))
print(os.path.join(BASE_DIR, 'db.sqlite3'))
print(os.environ.setdefault("DJANGO... | [
"[email protected]"
] | |
2f392a90b98f1dbc100c0fdd1c399ce2843eddef | 700f9f9e319ebd26d2557d64ea3827808dfad2f5 | /tests/fixtures/test_appendices_json/content_02_expected.py | 23c6bae8a17b15b59da7860417ea52c7ae82ffa6 | [
"MIT"
] | permissive | elifesciences/elife-tools | 1b44e660e916a82ef8ff64dd5a6ee5506e517359 | bc16e7dd5d6245077e39f8561b99c9acd510ddf7 | refs/heads/develop | 2023-03-06T08:37:47.424282 | 2023-02-20T20:40:49 | 2023-02-20T20:40:49 | 30,274,058 | 13 | 11 | MIT | 2023-02-20T20:40:50 | 2015-02-04T01:14:41 | Python | UTF-8 | Python | false | false | 3,392 | py | from collections import OrderedDict
expected = [
OrderedDict(
[
("id", u"app1"),
(
"title",
u"Appendix 1: Details of the automated linear stability analysis",
),
(
"content",
[
... | [
"[email protected]"
] | |
702e48c2aa3d8d52708984ce1249139d83d40039 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /FJk4mJwRk2TYZhkeQ_11.py | f8eebc3f73f01afb69527a31188520efad9b25d1 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 550 | py | """
Create a function that takes a string and returns a new string with each new
character accumulating by +1. Separate each set with a dash.
### Examples
accum("abcd") ➞ "A-Bb-Ccc-Dddd"
accum("RqaEzty") ➞ "R-Qq-Aaa-Eeee-Zzzzz-Tttttt-Yyyyyyy"
accum("cwAt") ➞ "C-Ww-Aaa-Tttt"
### Notes
* Ca... | [
"[email protected]"
] | |
f5c64a21035dbbdf79fe9300cdf1ba736915177c | 29afbde1e2d5497f5ab023a99ea37b0c59e6bb09 | /password.py | d86fbaee471a50c76295435c6499e1e6078e8bdb | [
"MIT"
] | permissive | kahenya-anita/Password-Manager | 5358fc048ba90d0827e4ff8c7f54919107c5aa95 | b3e7683e61e55574b846dfe49bf5d4016085261c | refs/heads/master | 2022-12-15T08:04:08.350058 | 2020-09-08T19:42:48 | 2020-09-08T19:42:48 | 293,597,852 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,196 | py | import string
import random
class Password:
"""
Class that generates system given passwords.
"""
password_letters=list(string.ascii_letters)
password_nums=list(string.digits)
password_symbols=["#","@","&","$","%"]
password_chars=[]
password_chars.extend(password_letters)
password... | [
"[email protected]"
] | |
ee28a8aa66f3d6fec24591cae31c80251e0b6f07 | 4bf5f83a8e5cd4c3ee700569e4a6f07a87dd209c | /students/11th/jiwonko/project/User/migrations/0003_auto_20200812_1307.py | 88bb82d97b9338ddd0609dc2118a3630dbab1049 | [] | no_license | gledong12/westagram-backend | 6e066f4c741aa19df13224ba530b0d9f43a405f7 | 1842f065c599885ad5dcb9ec5fb267eaf3295872 | refs/heads/master | 2023-03-11T20:32:47.055525 | 2021-03-04T01:04:31 | 2021-03-04T01:04:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | # Generated by Django 3.0.8 on 2020-08-12 13:07
import User.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('User', '0002_auto_20200805_1106'),
]
operations = [
migrations.AlterField(
model_name='user',
... | [
"[email protected]"
] | |
598fa7f17dd1d125cc395d7e717deb6f7a89dab0 | 685fa2cb16ff8bce96b603dee8117ed3e9a1adcb | /dlib-find-min-global/parse_xml.py | 6a073916c47463b9d891a91cdabd8ad99ff0a563 | [] | no_license | albertofernandezvillan/pyimagesearch | 352ec1ec678cb628524c476fdcc86c22238a1a2f | 8c87e6c5d218e42a8864778c032c0fd20261bcdd | refs/heads/master | 2023-02-27T22:02:25.581660 | 2021-02-08T15:15:15 | 2021-02-08T15:15:15 | 338,087,397 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,366 | py | # ------------------------
# USAGE
# ------------------------
# python parse_xml.py --input ibug_300W_large_face_landmark_dataset/labels_ibug_300W_train.xml
# --output ibug_300W_large_face_landmark_dataset/labels_ibug_300W_train_eyes.xml
# python parse_xml.py --input ibug_300W_large_face_landmark_dataset/labels_ibug_... | [
"[email protected]"
] | |
9a24020666e786dd930310c84812123cc468ef3a | c5758c1f4c880f4530df1a5ffb4c30ee2da445ee | /pytracking/vot_ep/sk3x3_meanmax_adaptive/vot_wrapper_sk3x3_meanmax_adaptive_ep0020.py | 68408effc2c17172004adef9bfbecef3d34e37ef | [] | no_license | bfjei2825401/d3s | 6d662fc301181a0e3ad831b0db6111e3cf8f4097 | 32140a3c67252f0e98cbfbf6ad6d2a79267c221b | refs/heads/master | 2023-02-27T09:57:25.692878 | 2021-01-27T14:20:57 | 2021-01-27T14:20:57 | 297,217,521 | 0 | 0 | null | 2020-09-21T03:23:09 | 2020-09-21T03:23:09 | null | UTF-8 | Python | false | false | 2,523 | py | import pytracking.vot as vot
import sys
import cv2
import os
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
from pytracking.tracker.segm_sk3x3_meanmax_adaptive import SegmSK3x3MeanMaxAdaptive
from pytracking.parameter.segm_sk3x3_meanmax_adaptive import default_params_ep as vot_... | [
"[email protected]"
] | |
c2e007ef13501c87c7fc8e93c7490f29a01b9e1d | 8d06729522dbdf7c6391ffcd608d1f1bba3f3ae0 | /bricks/utils/__init__.py | 2a8d9c7b0e42ccc4c9d85c6758134e58f7b0da08 | [] | no_license | seler/django-bricks | 14d9b1de356b698cd0c17574a8f0304e682febb0 | fe1713971d0c881c0f0352217a69b196553f11aa | refs/heads/master | 2021-04-05T04:26:47.311914 | 2013-01-21T05:45:52 | 2013-01-21T05:45:52 | 248,519,671 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 404 | py |
def inheritors(klass):
"""
Returns all inheritors of `klass`.
source: `http://stackoverflow.com/a/5883218/708764`
"""
subclasses = set()
work = [klass]
while work:
parent = work.pop()
for child in parent.__subclasses__():
if child not in subclasses:
... | [
"[email protected]"
] | |
1890a6e4eb9ea623fd1b3048b6bdd2df43af873f | a7058080e41af37eb77c146fc09a5e4db57f7ec6 | /Solved/10817/10817.py | b367bcb33c195c11704251209f5f52883256727a | [] | no_license | Jinmin-Goh/BOJ_PS | bec0922c01fbf6e440589cc684d0cd736e775066 | 09a285bd1369bd0d73f86386b343d271dc08a67d | refs/heads/master | 2022-09-24T02:24:50.823834 | 2022-09-21T02:16:22 | 2022-09-21T02:16:22 | 223,768,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 202 | py | # Problem No.: 10817
# Solver: Jinmin Goh
# Date: 191120
# URL: https://www.acmicpc.net/problem/10817
a = input()
a = a.split()
for i in range(3):
a[i] = int(a[i])
a.sort()
print(a[1]) | [
"[email protected]"
] | |
9cdaa82fda89ad9951a6b8d5c94f1ebd93c88177 | 2f963d7989749037a3ec27aaa39b31416b33cbb2 | /ib_action/views/user_action_counts/tests/test_case_01.py | afa4eddc49ff53e95a58568a880e84464e0d4139 | [] | no_license | migsantos121/phd3-backend | 3cd014908856c995de3c4473d82059bc9c1b5794 | 9d1d2bd6f55dc89719ce5a1916c5db3d573aec1e | refs/heads/master | 2022-12-12T17:25:59.334509 | 2020-03-09T09:24:08 | 2020-03-09T09:24:08 | 245,991,086 | 0 | 0 | null | 2022-06-28T14:45:50 | 2020-03-09T09:17:18 | Python | UTF-8 | Python | false | false | 1,559 | py | from . import APP_NAME, OPERATION_NAME, REQUEST_METHOD, URL_SUFFIX
from django_swagger_utils.drf_server.utils.server_gen.custom_api_test_case import CustomAPITestCase
request_body = """
{
"action_types": [
"RATE",
"RATE"
],
"source": "string",
"action_values": [
"string",
... | [
"[email protected]"
] | |
69975169bb1b1827b925e00ea4eae20831cca216 | 7950c4faf15ec1dc217391d839ddc21efd174ede | /problems/0342.0_Power_of_Four.py | a0a5a32e27c28c00543bc71d410f6523723b5a68 | [] | no_license | lixiang2017/leetcode | f462ecd269c7157aa4f5854f8c1da97ca5375e39 | f93380721b8383817fe2b0d728deca1321c9ef45 | refs/heads/master | 2023-08-25T02:56:58.918792 | 2023-08-22T16:43:36 | 2023-08-22T16:43:36 | 153,090,613 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 772 | py | '''
Success
Details
Runtime: 16 ms, faster than 83.07% of Python online submissions for Power of Four.
Memory Usage: 11.9 MB, less than 11.11% of Python online submissions for Power of Four.
'''
class Solution(object):
def isPowerOfFour(self, num):
"""
:type num: int
:rtype: bool
"... | [
"[email protected]"
] | |
005ac079befb88d6eec83627239178a0d305530e | fd513d0ef02231526fc8225dfdb1bf84752b3541 | /jaraco/packaging/depends.py | ebeddfe0fef449ba636d347cc3a54377cd87d3f4 | [
"MIT"
] | permissive | artynet/jaraco.packaging | 810bfb83238a9075de6001deec9eaaca56db64a9 | d68128b9c8c12334364128aec05b038102515159 | refs/heads/master | 2022-11-15T10:50:18.224592 | 2020-02-16T15:56:37 | 2020-02-16T15:56:37 | 277,494,378 | 0 | 0 | null | 2020-07-06T09:08:05 | 2020-07-06T09:08:04 | null | UTF-8 | Python | false | false | 3,245 | py | """
This module should only import modules from stdlib and setuptools
"""
from __future__ import print_function, unicode_literals
import os
import re
import argparse
import subprocess
import setuptools
import pkg_resources
text_type = getattr(__builtins__, 'unicode', str)
req_help = "A setuptools requirement spec ... | [
"[email protected]"
] | |
1a44630bcc49abc465f08b79db51861073294d16 | 321b4ed83b6874eeb512027eaa0b17b0daf3c289 | /284/284.peeking-iterator.233519966.Accepted.leetcode.py | 363695e26d3e5481086fc95101ac8197fd2fcef5 | [] | no_license | huangyingw/submissions | 7a610613bdb03f1223cdec5f6ccc4391149ca618 | bfac1238ecef8b03e54842b852f6fec111abedfa | refs/heads/master | 2023-07-25T09:56:46.814504 | 2023-07-16T07:38:36 | 2023-07-16T07:38:36 | 143,352,065 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 454 | py | class PeekingIterator(object):
def __init__(self, iterator):
self.front = None
self.it = iterator
if self.it.hasNext():
self.front = self.it.next()
def peek(self):
return self.front
def next(self):
temp = self.front
self.front = None
if s... | [
"[email protected]"
] | |
13ad90a72e1503b0419dd453068d2ddfbf4c2ed3 | 71e5ce7abbf5f9e8887c16e7a89219a98a5827cf | /Python-for-everyone/01_For_Everyone/05_Loop_Iterations/06_count.py | 1882c6ed7cd3efc4bb7006b59f6552575a63ad71 | [] | no_license | Python-Repository-Hub/Learn-Online-Learning | f62c9965b34c050abcc4b2ef9a4d09600a0e52ec | 2845a0d66b1f7fa416182b99cef25cda871b3360 | refs/heads/master | 2023-07-27T17:00:44.498987 | 2021-09-14T06:10:37 | 2021-09-14T06:10:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 307 | py | zork = 0
print('Before', zork)
numbers = [9, 41, 12, 3, 74, 15] # 강의와는 달리 numbers라는 int를 원소로 가지는 list를 선언하였습니다.
for thing in numbers :
zork = zork + 1
print(zork, thing)
print('After', zork)
# Before 0
# 1 9
# 2 41
# 3 12
# 4 3
# 5 74
# 6 15
# After 6
| [
"[email protected]"
] | |
d7e643eac7eefa815456f66073d2a633d5e65bc2 | 8fc2707bc30c8e56a607e0fd97122d3509ce6dbd | /Pithon/pithon-game/core/Player.py | 89d02f6bf8ba37de6cc6a14df1ee70ebc16438f7 | [] | no_license | pithon/pithon | 8c0239f527866ce05b327b436350dcc0e7fab4cb | 9a183be17464a810c0c047fbc29b52451d39f641 | refs/heads/master | 2021-01-18T14:10:18.606353 | 2013-02-23T04:41:38 | 2013-02-23T04:41:38 | 7,985,688 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 970 | py | import pygame, constants
from Tail import Tail
class Player(object):
def __init__(self, color):
self.tail=[]
head=Tail(pygame.color.Color(255,255,255), self, 116,100, constants.RIGHT)
self.tail.append(head)
self.color=color
self.direction=constants.RIGHT
se... | [
"[email protected]"
] | |
8229bbf974f9c0d3d5cfb6455f6d0e95c0bc8258 | d6617514df849a77b491159c4cc8a3bfc6599d83 | /hw2/DecryptDES.py | 7f2088a9af6d0c0cc5ae44fca4c41c088699bebb | [] | no_license | LJP-TW/Information_Security_Class | 409cc852480c611d89b60139705bc9de4374670d | d195b99c62e653ec551ce50077c6d29b23668b8c | refs/heads/master | 2020-08-01T19:26:54.886014 | 2019-12-22T14:10:04 | 2019-12-22T14:10:04 | 211,090,532 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,145 | py | #!/usr/bin/python3
import sys
import numpy as np
key = bin(int(sys.argv[1], 16))[2:]
text = bin(int(sys.argv[2], 16))[2:]
key = '0' * (64 - len(key)) + key
text = '0' * (64 - len(text)) + text
##### table
IP = [int(x)-1 for x in ('58 50 42 34 26 18 10 2 60 52 44 36 28 20 12 4 62 54 46 38 30 22 14 6 64 56 48 40 32 ... | [
"[email protected]"
] | |
d493b4b047bfc276bb5effed4193ae083b59c65b | e44c83395d2ddd1e1b7c1e521d360f2ef8d585d0 | /gitlab-new/tt/bus8684/items.py | 4c8f025a4aa785fb80e448fde15776b7fd3226b0 | [] | no_license | zhoujx4/Crawls | 63ebcac5b4c0bbccdde56e6a2f5efbc4091d03e0 | 94b3ac88d7e49cb4a03e7b211a9437709d1c371c | refs/heads/master | 2020-12-23T15:25:48.041965 | 2020-01-30T10:35:19 | 2020-01-30T10:35:19 | 237,189,197 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 432 | py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
from scrapy.item import Item, Field
class Bus8684Item(scrapy.Item):
# define the fields for your item here like:
content = Field()
page_type = Field(... | [
"[email protected]"
] | |
499d2b9e316af87f449192a3c3de07b8cf55b4f0 | 03de685efae7d8f6de0e98c3008cb89f87825fb4 | /test/compare/compare.py | c11c4504dcda17b5e254ee24b4672cc0d22cea78 | [] | no_license | gedeschaines/robotics-toolbox-python | 161f7af8be91c51e1902021ba9f9dc3f6fc5b766 | 22eb2394172e60b1dbca03d4be9bb0ecaf49b183 | refs/heads/master | 2021-06-14T00:42:24.468518 | 2021-02-17T22:20:36 | 2021-02-17T22:20:36 | 140,235,483 | 13 | 3 | null | 2019-01-06T13:30:23 | 2018-07-09T05:29:19 | Python | UTF-8 | Python | false | false | 1,522 | py | """
Compare the RNE implementations of Matlab and Python.
We take the Matlab results as the gold standard since they were cross-checked
against a Maple and other implementations a long time ago.
The process:
1. genpath.m creates random q, qd and qdd data and saves to path.dat. Random values
in the q, qd and qdd st... | [
"[email protected]"
] | |
a330d906dd0cdf05fc80449ad1547096442e3b8f | c5be188cf1231d62f7ad69c98ee71b4bc181f6f2 | /image_resize.py | b94f3f35d8941b74d58a8b394552b06f0b5a1b6d | [] | no_license | ashish1sasmal/OPENCV-Python | e2d81e4472413ba79c5cdd4fcaad534225a5d394 | 589accc3c16eb4bf515ba85ee46ae6fdc2347bc6 | refs/heads/master | 2021-07-17T17:56:30.438576 | 2020-10-16T17:12:09 | 2020-10-16T17:12:09 | 217,500,976 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 557 | py | import cv2
l=[]
def click_event(event,x,y,flags,param):
global l
# print(l)
if event == cv2.EVENT_LBUTTONDOWN:
l.append([x,y])
if len(l) == 3:
print(l,l[2][0]+l[1][0]-l[0][0],l[2][1]+l[1][1]-l[0][1])
img[l[2][1]:l[2][1]+l[1][1]-l[0][1], l[2][0]:l[2][0]+l[1][0]-l[0][... | [
"[email protected]"
] | |
fa69246e9b983af79f51aa0df615d294d267d396 | 0ba2c3776618b5b8b76f4a23f21e9c6ad3f6e2e1 | /part2/04.py | 278a036d3564d1aaba49d2e49151f5a96d565b99 | [] | no_license | WangDongDong1234/python_code | 6dc5ce8210b1dcad7d57320c9e1946fd4b3fe302 | 6a785306a92d328a0d1427446ca773a9803d4cc0 | refs/heads/master | 2020-04-15T12:35:03.427589 | 2019-09-16T15:38:25 | 2019-09-16T15:38:25 | 164,681,323 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 760 | py | class GameRole:
def __init__(self,name,ad,hp):
self.name=name
self.ad=ad
self.hp=hp
def attack(self,p):
p.hp=p.hp-self.ad
print("%s 攻击了%s,%s掉了%s,还剩%s" %(self.name,p.name,p.name,self.ad,p.hp))
def equip_weapon(self,wea):
self.wea=wea
self.ad=self.ad+w... | [
"[email protected]"
] | |
1bdffd60464eb5d1d0a4aa03bd1f51e6778e9f08 | 47eccd2a6b844bce32012017e2ad3eb62221763c | /producers/models/line.py | dc48f215d8734108a64ee764d036d040425954c1 | [] | no_license | zxy-zxy/udacity_data_streaming_traffic_optimization | 953b95536e62a18e9bdd9fd8244fbef2966789fb | 3bb8d0e6f5e4b78b0c0a9e0b3e85a3f8788f3c65 | refs/heads/master | 2023-03-07T07:42:20.397271 | 2021-02-20T07:57:41 | 2021-02-20T07:57:41 | 340,464,004 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,097 | py | """Defines functionality relating to train lines"""
from enum import IntEnum
import logging
from producers.models.station import Station
from producers.models.train import Train
logger = logging.getLogger(__name__)
class Line:
"""Contains Chicago Transit Authority (CTA) Elevated Loop Train ("L") Station Data"""... | [
"[email protected]"
] | |
1321ca6e8b06bce640ef7a93d92acd4a9d7814d7 | 9f0f5816b9d810c9ce01c56588024e1c804809fe | /study/day9/9-1.py | 1061d19b08630454e68f6d7886f13dbd06d09571 | [] | no_license | parkwisdom/Python-Study-step1 | bf8cc8c5f89bfb9ccbb395a3827e23d4f0d6ae9a | bae2f5653c5a0d1eac1d4b89476ece7e0802d33b | refs/heads/master | 2020-04-03T13:49:58.990930 | 2018-10-30T00:37:29 | 2018-10-30T00:37:29 | 155,300,210 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 479 | py | # x=dict(zip(range(1,11),[2**i for i in range(1,11)]))
# print(x)
# print(len(x))
#
# test={'gildong':{'w':70,'h':170,'b':'a'},'donggil':{'w':75,'h':160,'b':'ab'},'gildo':{'w':72,'h':150,'b':'o'}}
# print(test)
# print(test['gildong'])
# print(test['gildong']['h'])
#
# test['gildong']['h']+=10
# print(test['gildong'])
... | [
"[email protected]"
] | |
d4f12ad333b598e5780635248dd3309ec65023be | 8f48d12b88048e424ebb0d72ca6dfab5cf12ae0f | /0001_0599/238.py | 15a9a2eef432e94fcbe8a8a74aab146a918dbe24 | [] | no_license | renjieliu/leetcode | e1caf13c18a8107ed9252588b339fb76bcb1b246 | 4668b64fcb9320b6c316d8608fc61911ce43b6c7 | refs/heads/master | 2023-03-18T18:16:06.187741 | 2023-03-14T20:31:59 | 2023-03-14T20:31:59 | 128,823,819 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,217 | py | class Solution:
def productExceptSelf(self, nums: 'List[int]') -> 'List[int]':
zeroloc = -1 # record the location of 0.
total = 1
for i, n in enumerate(nums):
if n == 0:
if zeroloc == -1:
zeroloc = i
else:
r... | [
"[email protected]"
] | |
7d3d9f6ca55f346b1a58b8b0bed7311a7c5743e0 | 98590747113ca3022c67c8bc6332b2bf48d7073e | /maximum_depth_of_binary_tree.py | 7ce50d022a3ba784b2b41b94dbb425e71483882f | [] | no_license | buxizhizhoum/leetcode | a54291519a23fe82e9f9620e5a2266833696f005 | cf4235170db3629b65790fd0855a8a72ac5886f7 | refs/heads/master | 2022-06-04T02:54:26.381077 | 2022-04-01T06:58:19 | 2022-04-01T06:58:19 | 116,791,542 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,030 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
Note: A leaf is a node with no children.
Example:
Given binary tree [3,9,20,null,null,15,7],
3
/ \
9... | [
"[email protected]"
] | |
461d2c40bb4f8a3b5ab23a90655470e60eda5a32 | f663f7baa042c6d5e71ceb22ce3d304d5bcbfd15 | /archived_lectures/Fall_2019/old_lectures/2018/Week_5/test_util.py | cbd0d779dd67ed6a702944cc723c2e001dbf44e6 | [
"MIT"
] | permissive | ModelEngineering/advancing-biomedical-models | 2dcf0fb35629a4cce2b30b5c18490c9837875b64 | 7469576d484d894febb161c3cb48b723dfbcaf1b | refs/heads/master | 2022-11-12T10:24:23.407006 | 2022-10-19T08:33:29 | 2022-10-19T08:33:29 | 132,825,741 | 2 | 9 | null | null | null | null | UTF-8 | Python | false | false | 1,974 | py | """
Tests for simulation utility functions.
To run: python test_util.py
"""
import util
import lmfit
import numpy as np
import unittest
ka = 0.4
v0 = 10
kb = 0.32
kc = 0.4
PARAMETERS = lmfit.Parameters()
NAMES = ["ka", "v0", "kb", "kc"]
for name in NAMES:
if name[0] == "v":
maxval = 20
else:
maxval = 2
... | [
"[email protected]"
] | |
0856a12681340f456cc6cc7d768fd51a3f9de6b1 | 0d76ba0da5446f20e500b7e31f53821b14cb49d8 | /Rosalind/python/revc.py | 5f9a8f42871395c24b14702d4eb8085fa05e2fe5 | [] | no_license | filwaitman/playground | 948aa687be06d456c86b65ee3ab5fb9792149459 | dfdfab9002bff3a04f37e0c161363a864cd30f3e | refs/heads/master | 2021-01-12T12:59:49.057832 | 2020-01-26T18:51:02 | 2020-01-26T18:51:02 | 68,865,259 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | # -*- coding: utf-8 -*-
# http://rosalind.info/problems/revc/
import sys
def reverse_complement(string):
reversed_ = string[::-1]
reversed_ = reversed_.replace('A', 'X').replace('T', 'A').replace('X', 'T')
reversed_ = reversed_.replace('C', 'X').replace('G', 'C').replace('X', 'G')
return reversed_
i... | [
"[email protected]"
] | |
acacce0291355a9534ff0563af6514333051fb77 | b6aa9768dbac327943e0220df1c56ce38adc6de1 | /91_decode-ways.py | 039d1992172f104ffa65150443dd06340ea20d3c | [] | no_license | Khrystynka/LeetCodeProblems | f86e4c1e46f70f874924de137ec5efb2f2518766 | 917bd000c2a055dfa2633440a61ca4ae2b665fe3 | refs/heads/master | 2021-03-17T00:51:10.102494 | 2020-09-28T06:31:03 | 2020-09-28T06:31:03 | 246,954,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 639 | py | # Problem Title: Decode Ways
class Solution(object):
def numDecodings(self, s):
"""
:type s: str
:rtype: int
"""
lst = map(int, s)
p_1 = 1
res = 1
for i in range(len(lst)):
p_2 = p_1
p_1 = res
if lst[i] == 0:
... | [
"[email protected]"
] | |
523230368fdadb0448796ee631c05daf2fe86381 | 8d0be6bdb480caa895b6cea1884b40c51cf25156 | /experiment/python/convert-json-and-yaml.py | ed765819326d33d274bdfd85e90245538e9aa335 | [
"MIT"
] | permissive | atb00ker/scripts-lab | 8642138574ac3403278c004b2c67f0200b29a83d | 71a5cc9c7f301c274798686db4a227e84b65926a | refs/heads/master | 2021-09-09T22:15:36.133142 | 2021-09-04T18:30:31 | 2021-09-04T18:30:54 | 163,108,084 | 2 | 0 | MIT | 2019-10-08T19:44:00 | 2018-12-25T19:54:54 | Python | UTF-8 | Python | false | false | 318 | py | import json
import yaml
with open('input.json') as js:
data = json.load(js)
with open('output.yaml', 'w') as yml:
yaml.dump(data, yml, default_flow_style=False, allow_unicode=True)
with open('input.yml') as yml:
data = yaml.load(yml)
with open('output.json', 'w') as js:
js.write(json.dumps(data))
| [
"[email protected]"
] | |
d33a22fa1084f81223eba1e0e845c919e416ab5f | 713f9168a7ba68740bb9b4ea6994e853a56d2d5c | /2022-05-30-python/day1/save_wikipedia.py | 3e83f5e8c22cdae5d35f0f32144e67b89203c3cc | [] | no_license | marko-knoebl/courses-code | ba7723c9a61861b037422670b98276fed41060e2 | faeaa31c9a156a02e4e9169bc16f229cdaee085d | refs/heads/master | 2022-12-29T02:13:12.653745 | 2022-12-16T09:21:18 | 2022-12-16T09:21:18 | 142,756,698 | 16 | 10 | null | 2022-03-08T22:30:11 | 2018-07-29T11:51:04 | Jupyter Notebook | UTF-8 | Python | false | false | 270 | py | from urllib.request import urlopen
# make a HTTP request
req = urlopen("https://en.wikipedia.org")
# read content as utf-8 string
content = req.read().decode("utf-8")
# save to file
file = open("wikipedia.html", "w", encoding="utf-8")
file.write(content)
file.close()
| [
"[email protected]"
] | |
17e90b8c30eaba457e03faf76fca9908aaf1b8b0 | 32cf9c3099c36a46804e393dd1491a8954f50263 | /2019.04.11 - 프로필, 인스타 생성/PROJECT05_10/PROJECT05/boards/migrations/0001_initial.py | 871a328c5df4bde811a7395a602cfaa923694ed8 | [] | no_license | ash92kr/s_code | ce3bda6a403600892750e181dca5ed8c4caebcb1 | 92eace551d132b91ee91db6c0afd38b93f9b647b | refs/heads/master | 2020-04-12T00:27:07.043091 | 2019-05-21T08:17:39 | 2019-05-21T08:17:39 | 162,200,447 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 676 | py | # Generated by Django 2.1.7 on 2019-03-21 11:37
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Board',
fields=[
('id', models.AutoField(au... | [
"[email protected]"
] | |
9150360bc6801d8550fa7251315721013196303e | 34d8cbc0471be7e051466fbd14a0fc7730bff133 | /peer_recieve.py | e8884c30547531ab674cc7f82cbb8b65bbe95427 | [] | no_license | jk-programs/basiccoin | 59e35c1fb547add8d2fe1156fbc7fc348a1d8f0f | 6fd285525febd82733b7e7ef604428c3a8fe3ff4 | refs/heads/master | 2021-01-18T18:45:19.900004 | 2014-09-04T21:01:31 | 2014-09-04T21:01:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,762 | py | """When a peer talks to us, this is how we generate a response. This is the external API.
"""
import networking, custom, tools, blockchain, time
def security_check(dic):
if 'version' not in dic or dic['version'] != custom.version:
return {'bool': False, 'error': 'version'}
else:
#we could add se... | [
"[email protected]"
] | |
7dfa2ddf781a50a0947412c4c7840743bc9f8eff | e3c6087ce7178c0608b1501e14c8f905fd14c3d2 | /src/app/push/user/user_manager.py | d23e38bdf3b2d4b20ea7c0717b71d2bff3d2b60d | [] | no_license | campanulamediuml/iot_server | 314fcef9b6bec2f1354390ecad2d0acb18dcf06e | 6657ad9895445fb668f027affc6346eeeda58e67 | refs/heads/master | 2022-12-14T02:53:05.007754 | 2020-02-01T08:12:02 | 2020-02-01T08:12:02 | 237,582,696 | 1 | 0 | null | 2022-12-08T07:03:48 | 2020-02-01T08:04:25 | Python | UTF-8 | Python | false | false | 2,820 | py | from app.push.user.user import User
from app.push.relay import Relay
from data.server import Data
import time
class UserManager(object):
def __init__(self):
self._user_dict = {}
self._user_handler_dict = {}
self._admin_dict = {}
def update(self):
# print('kill')
del_lis... | [
"[email protected]"
] | |
64114d8d6de771147d00d1ce7e7e5513c4b883ea | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_photostats.py | b655b753c702e900bf321ce1a12133ccbdddb3c3 | [
"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 | 234 | py |
#calss header
class _PHOTOSTATS():
def __init__(self,):
self.name = "PHOTOSTATS"
self.definitions = photostat
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['photostat']
| [
"[email protected]"
] | |
0199c7123b0f48afe8371149ef949d0f1f1808d2 | f662aa3ce7896ca0283cae38df8ef824c1b80c9a | /library/tests/test_setup.py | 9579313b7b5b97b052f09122ff03f5decae81e69 | [
"MIT"
] | permissive | pimoroni/plasma | bd7ddebbc60ae7cc9c2561408b52fc46bf810672 | 7857c44255285aac061a9064dd033fd63bbbda29 | refs/heads/master | 2023-02-10T13:27:17.565867 | 2023-01-30T17:27:28 | 2023-01-30T17:27:28 | 155,544,928 | 12 | 9 | MIT | 2021-11-06T04:14:19 | 2018-10-31T11:17:40 | Python | UTF-8 | Python | false | false | 369 | py | """Test Plasma basic initialisation."""
import mock
def test_legacy_setup(GPIO):
"""Test init succeeds and GPIO pins are setup."""
from plasma import legacy as plasma
plasma.show()
GPIO.setmode.assert_called_once_with(GPIO.BCM)
GPIO.setup.assert_has_calls([
mock.call(plasma.DAT, GPIO.OUT)... | [
"[email protected]"
] | |
ce67b4c7a1213011dedbd40bb03a735ddee6c245 | 93a7db386dfa0ac0dc369cc7f4b974224c801d8d | /deploy/ngram-all/scripts/ngram-30.py | 4575b6d9056180b9f17d03dcdbc9ea32e3fb42f8 | [] | no_license | lingxiao/good-great-combo | e051f20c89b7317a14ca5cee357bda7b095ce174 | 4d2691866bc21e2c542354ad3aae6f369eb86c87 | refs/heads/master | 2021-01-19T19:30:43.391759 | 2017-04-09T12:35:15 | 2017-04-09T12:35:15 | 83,699,772 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,420 | py | ############################################################
# Module : A series of measures on the graph for experiments
# Date : April 2nd, 2017
# Author : Xiao Ling
############################################################
import os
import re
import networkx as nx
from utils import *
from scripts import ... | [
"[email protected]"
] | |
7418fe42514906ca3b54fe3292c0e73322f20b47 | a2d36e471988e0fae32e9a9d559204ebb065ab7f | /huaweicloud-sdk-cdn/huaweicloudsdkcdn/v1/model/referer_rsp.py | 5e464eeb471ed9c49f7aa9e96766d4e22f3f2f69 | [
"Apache-2.0"
] | permissive | zhouxy666/huaweicloud-sdk-python-v3 | 4d878a90b8e003875fc803a61414788e5e4c2c34 | cc6f10a53205be4cb111d3ecfef8135ea804fa15 | refs/heads/master | 2023-09-02T07:41:12.605394 | 2021-11-12T03:20:11 | 2021-11-12T03:20:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,440 | py | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class RefererRsp:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attr... | [
"[email protected]"
] | |
53cfa943c71da187b76615b9e210acd591c177fb | e616ea35ead674ebb4e67cae54768aaaeb7d89c9 | /project/alma/groups/migrations/0001_initial.py | ea300a72ba26028fa8b8e7cb76ef846668025ebd | [] | no_license | VWApplications/VWAlmaAPI | 12bb1888533cf987739b0e069737afa6337141e1 | 3a8009b17518384c269dfee3c8fe44cbe2567cc0 | refs/heads/master | 2022-04-02T10:26:49.832202 | 2020-02-12T04:46:31 | 2020-02-12T04:46:31 | 161,098,215 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,648 | py | # Generated by Django 2.1.4 on 2019-10-20 03:18
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('disc... | [
"[email protected]"
] | |
14aeae04e3c6f6a5a94f8f36cffad0f269855994 | 68f757e7be32235c73e316888ee65a41c48ecd4e | /백준_python/2000/2500_2599/2501.py | c49d55d4f683ab54758e774c9f7bb12d31669f5c | [] | no_license | leejongcheal/algorithm_python | b346fcdbe9b1fdee33f689477f983a63cf1557dc | f5d9bc468cab8de07b9853c97c3db983e6965d8f | refs/heads/master | 2022-03-05T20:16:21.437936 | 2022-03-03T01:28:36 | 2022-03-03T01:28:36 | 246,039,901 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 192 | py | def f(N):
for i in range(1, N//2+1):
if N % i == 0:
yield i
yield N
N, K = map(int, input().split())
L = list(f(N))
try:
print(L[K - 1])
except:
print(0)
| [
"[email protected]"
] | |
bb3964e9c470d43dd2e31774435b4096a7129340 | 37ba62db61fc4ec62634638763a984cbfbe40fe3 | /day09/02 作业讲解.py | 5caee326901bbae6f5a9b2598f304b118ebe05ef | [] | no_license | lt910702lt/python | ca2768aee91882c893a9bc6c1bdd1b455ebd511f | c6f13a1a9461b18df17205fccdc28f89854f316c | refs/heads/master | 2020-05-09T22:54:22.587206 | 2019-09-17T09:02:53 | 2019-09-17T09:02:53 | 181,485,866 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,316 | py | ###第一题: 有如下文件,里面的内容如下,分别完成以下功能:
'''
老男孩是一个培训机构
为学生服务,
为学生未来,
都是骗人的,哈哈
'''
## 1.1. 将原文件全部读出来并打印
# f = open("oldboy", mode="r", encoding="utf-8")
# s = f.read()
# f.flush()
# f.close()
# print(s)
# 1.2. 在原文件后面追加一行内容:信不信由你,反正我信了
# f = open("oldboy", mode="a", encoding="utf-8")
# f.write("\n信不信由你.反正我信了")
# f.flush()
# f.c... | [
"[email protected]"
] | |
8552b00e5269659b7760cfaf3cb055f996f35ec2 | ff853d7b3773db8de783fd26a76bd92742f85384 | /0x05-python-exceptions/4-list_division.py | ed4e25621fd48459d5909c213142dd2a0c614a32 | [] | no_license | stuartses/holbertonschool-higher_level_programming | 1b3315f624f9c2dc0c63ee3481021c5ed093a81d | 40497b632bf71c3b877cb61fce79b9d82b4519da | refs/heads/master | 2020-09-29T00:51:57.791491 | 2020-05-14T16:51:44 | 2020-05-14T16:51:44 | 226,905,912 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 513 | py | #!/usr/bin/python3
def list_division(my_list_1, my_list_2, list_length):
div = 0
div_list = []
for i in range(list_length):
try:
div = my_list_1[i] / my_list_2[i]
except ZeroDivisionError:
print("division by 0")
div = 0
except TypeError:
... | [
"[email protected]"
] | |
2dae655d7f22efba5c7f9cf43a1aba9ceec09a15 | 48eb84be45129c5904447e36a66170e739a8f8a0 | /Gconnect/housename/migrations/0005_auto_20180925_1333.py | adbd8659975c5a028fa555fbcdeceab9df929f0d | [] | no_license | anjuz1/project | efd806e8fff976168d70711eda36fcf42e3e9dbc | 295ed8efcfff622a64e9072bd2607fe8c147a957 | refs/heads/master | 2020-04-07T00:15:41.259953 | 2018-11-16T16:52:37 | 2018-11-16T16:52:37 | 157,896,677 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,283 | py | # Generated by Django 2.0.7 on 2018-09-25 08:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('housename', '0004_housename_house_mail'),
]
operations = [
migrations.AlterField(
model_name='housename',
name='hous... | [
"[email protected]"
] | |
6f9382fca59ef7eb65bcb7683c81b7757f35b90d | f65163f0670b04ed3d68632b2d020186947cf2d7 | /bundology/urls.py | 69855c319f387c9c03135ffd03a1dd629ac94df2 | [
"MIT"
] | permissive | ImmaculateObsession/bundology | 92fb23527b642c70393e710ed042c3e661d014b7 | cbf3859fc51f4fcf7f0da608af37aeb55671aed4 | refs/heads/master | 2021-01-01T06:50:43.114328 | 2013-09-29T18:43:32 | 2013-09-29T18:43:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 589 | 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()
from bundles.views import HomeView
urlpatterns = patterns('',
# Examples:
url(r'^$', HomeView.as_view(), name='home'),
# url(r'^bundology/', includ... | [
"[email protected]"
] | |
2384c8e026b668140c8d5cad60d9811e0246ad3a | e6f144ff524a5e28bb9a3effe55f0e8b3d3f9d72 | /less14/chat_v2/chat/chatApp/validators.py | 321bd980636d9847dab114791bd09061c52d777d | [] | no_license | an4p/python_oop | 614382989914513b60b87d10e78c21a34debe162 | 5cff48072f30460df6e7300fa85038e18e986d4b | refs/heads/master | 2021-01-23T03:27:09.496370 | 2017-06-08T12:14:24 | 2017-06-08T12:14:24 | 86,077,237 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 397 | py | from django.core.exceptions import ValidationError
import re
def not_null(data):
if data == None:
raise ValidationError("This field cannot be null")
def email_validation(data):
pattern = re.compile(r'\w{1,}')
isemail = pattern.match(data)
#print("isemail"+str(isemail.group(0)))
... | [
"[email protected]"
] | |
9acbf3882c7fd6e2cdd0af5022f6f471245c0b6e | c0032b63a0220bfd0fe8592b8f6d8382b808417c | /0x06-python-classes/3-square.py | e6a1ab3e3e526c71a4ae6b5ce0d8dd39fac0f71f | [] | no_license | Arkadington/alx-higher_level_programming | 2104d200aa3b8ff5026476d975fc7dfabe9db660 | 36d4aa2f25416b94cf2fca5598717bcec98d6211 | refs/heads/master | 2023-05-23T11:24:42.750209 | 2021-05-26T07:19:26 | 2021-05-26T07:19:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 505 | py | #!/usr/bin/python3
"""defining a square based on 2-square.py"""
class Square:
"""defines a square by size"""
def __init__(self, size=0):
"""initializing size argument"""
self.__size = size
if not isinstance(size, int):
raise TypeError('size must be an integer')
if ... | [
"[email protected]"
] | |
61c5a2c0cbafcf79a81a70720540685f9d224f30 | 82573b51d1188f653b673e1261e02fc9e4e12e66 | /etc/beam_search.py | 6feed3d5cdd861462535b44d844fc11b60a17694 | [] | no_license | JeeYz/git_from_the_hell | 94a55b1c922c993383927d5aaa7cad066d645ddb | 0826ab6b1fd760c145ac5dcab6a8aaa9e9af9e02 | refs/heads/master | 2022-09-25T02:17:55.636721 | 2022-09-17T18:03:26 | 2022-09-17T18:03:26 | 152,916,026 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,084 | py |
import random
import copy
input_data = list()
for i in range(10):
temp_val = random.random()
input_data.append(temp_val)
print(input_data)
beam_search_size = 3
def gen_beam_list(input_data):
arrange_list = copy.deepcopy(input_data)
global beam_search_size
idx_num = 0
flag_num = 0
... | [
"[email protected]"
] | |
d66e5f3155ea380201b01e010d93e3f7459d1d9b | 0de4549263e75a7614e7c430dac68822b18b0876 | /med1_med12_example/before_redefine/group.py | 8753e406ce81b7829d66cb354ff2fe1a00e8d5ae | [] | no_license | oaxiom/redefine_peaks | 7213630f021c69de5520300fe2121074159aa788 | c62abfc2702bca5172f58563ff7c478035c697f6 | refs/heads/master | 2020-07-30T14:10:11.671975 | 2019-09-26T02:17:22 | 2019-09-26T02:17:22 | 210,259,020 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 893 | py |
import glob
from glbase3 import *
config.draw_mode = ["png", 'pdf']
filenames = [os.path.split(f)[1] for f in glob.glob("../clus/*.bed")]
trks = [
flat_track(filename='../flats/esc_med1.flat'),
flat_track(filename='../flats/esc_med12.flat'),
]
peaks = [
genelist(filename="../peaks/esc_med1.rp1_summ... | [
"[email protected]"
] | |
e7c60a0ec63f5654ae032c35925d7ffd99117de3 | a00ed711e3e08b50ad6e91cc07a2cddc4a1de5ea | /tests/system/providers/apache/druid/example_druid_dag.py | 0552e10588950e78a6fc57488119b0e9bdf65845 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | ishiis/airflow | 4305794e36b611d01f49e3f2401be3dc49782670 | 292440d54f4db84aaf0c5a98cf5fcf34303f2fa8 | refs/heads/master | 2022-07-30T00:51:28.806940 | 2022-07-14T12:07:11 | 2022-07-14T12:07:11 | 209,801,072 | 1 | 0 | Apache-2.0 | 2019-09-20T13:47:26 | 2019-09-20T13:47:26 | null | UTF-8 | Python | false | false | 1,992 | py | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | [
"[email protected]"
] | |
046821a28fcd0f8c07500a8e1002b4d2c26a518c | c7f43c4cc0ee84a5fe246b67f51e30b8d726ebd5 | /Competition/vision1/0203_8_private3.py | 5739dd3f67dbb144f198fea38d30aec58e244ef2 | [] | no_license | 89Mansions/AI_STUDY | d9f8bdf206f14ba41845a082e731ea844d3d9007 | d87c93355c949c462f96e85e8d0e186b0ce49c76 | refs/heads/master | 2023-07-21T19:11:23.539693 | 2021-08-30T08:18:59 | 2021-08-30T08:18:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,056 | py | # private 3등 코드
# train / test / validation (0.95) 분리
# batch_size = 16
# loss 줄었음, score 동일
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from keras.preprocessing.image import ImageDataGenerator
from numpy import expand_dims
from sklearn.model_selection import StratifiedKFold, cross_validate,... | [
"[email protected]"
] | |
ac7aa470914c9dcd181660f70288c52307f34e56 | 17889c693624186593a64bb2220035760316980b | /setup.py | bbc213031ca0fa6fb214a151fa3d269b11f6787b | [] | no_license | vahtras/pdpack | f0b50931ce7c987c8f6a151b8529f2175f6de990 | 5fe9c377ebadaff82e5db0650db60709a8065720 | refs/heads/master | 2021-01-10T02:08:53.424347 | 2016-04-08T08:54:34 | 2016-04-08T08:54:34 | 55,702,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 376 | py | try:
import numpy
except ImportError:
import subprocess
subprocess.call("pip install numpy", shell=True)
from numpy.distutils.core import setup, Extension
ext = Extension(
name='linextra',
sources=['pdpack/linextra.F', 'pdpack/linpack.F'],
include_dirs=['pdpack/include'],
libraries=['blas']... | [
"[email protected]"
] | |
69be95888037623078a6dcbdfe8f36e773a65944 | d3e31f6b8da5c1a7310b543bbf2adc76091b5571 | /Day24/vd1/app.py | 563c66af2f3efd4d2c19b03b41765d7162a81322 | [] | no_license | pytutorial/py2103 | 224a5a7133dbe03fc4f798408694bf664be10613 | adbd9eb5a32eb1d28b747dcfbe90ab8a3470e5de | refs/heads/main | 2023-07-14T06:31:18.918778 | 2021-08-12T14:29:16 | 2021-08-12T14:29:16 | 355,163,185 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 183 | py | #pip install flask
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html') #'Hello'
app.run(debug=True) | [
"[email protected]"
] | |
d7ef042d180c534b37eea101e0c194f1a9ff0e20 | 5d2bc0efb0e457cfd55a90d9754d5ced9c009cae | /venv/lib/python2.7/site-packages/tests/test_024_ForeignKeys.py | d1e1d2981a54530173a85a1af5462ba6c56c0d9f | [] | no_license | michaelp1212/paxton | dafe08eca55557d036189d5242e47e89ec15bf2d | 0bd1da471c3a594c0765a4bc5cd1288404791caf | refs/heads/master | 2021-03-25T07:17:06.523340 | 2020-03-19T01:38:24 | 2020-03-19T01:38:24 | 247,598,121 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,878 | py | #
# Licensed Materials - Property of IBM
#
# (c) Copyright IBM Corp. 2007-2008
#
# NOTE: IDS requires that you pass the schema name (cannot pass None)
from __future__ import print_function
import sys
import unittest
import ibm_db
import config
from testfunctions import IbmDbTestFunctions
class IbmDbTe... | [
"[email protected]"
] | |
eb4b3921a93a20d061cc44081c98fc02a0a9321e | 3bc4b502fdb5ffecdbecc9239a0c25746dc31022 | /Ch03/p69.py | c164e5529ca7a074b8d57aedb66553a6e4e56930 | [] | no_license | pkc-3/python | 68da873bbe7ad9a3e0db4e22ddaa412a9377720f | d8410d897c3784c6017f7edc215ce8763e557518 | refs/heads/master | 2023-05-31T06:40:30.279748 | 2021-06-10T09:00:09 | 2021-06-10T09:00:09 | 361,634,592 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 137 | py | # break, continue 예
i = 0
while i < 10:
i += 1
if i == 3:
continue
if i == 6:
break
print(i, end=' ') | [
"[email protected]"
] | |
712fdaba5b3b039c11c0a907327177ff5bd9909d | 255e19ddc1bcde0d3d4fe70e01cec9bb724979c9 | /all-gists/1219692/snippet.py | 72feef967aeb0d54cf1d96dad510906647484037 | [
"MIT"
] | permissive | gistable/gistable | 26c1e909928ec463026811f69b61619b62f14721 | 665d39a2bd82543d5196555f0801ef8fd4a3ee48 | refs/heads/master | 2023-02-17T21:33:55.558398 | 2023-02-11T18:20:10 | 2023-02-11T18:20:10 | 119,861,038 | 76 | 19 | null | 2020-07-26T03:14:55 | 2018-02-01T16:19:24 | Python | UTF-8 | Python | false | false | 1,383 | py | #!/usr/bin/env python
"""
This script looks up how many followers two different Twitter accounts do have in common.
Usage:
twitter_follower_intersect.py username username
You'll need Python and the Python Twitter Tools to get this running.
http://pypi.python.org/pypi/twitter/
Also you will have to create a... | [
"[email protected]"
] | |
529b9a96885880408cf9b4499a0d6e5912c55327 | 87e88e72991cc83eff200fb87cc3985d383e3292 | /FPV_ANN/utils/resBlock.py | d64ec3238350a96644f8811f0ab578ff8330b10e | [
"MIT"
] | permissive | ppbreda/combustionML | c04f3418d891a91af07c4522c507fef186743f1e | b441907276c39f127b8914b78656581b0bcde359 | refs/heads/master | 2020-04-29T18:05:47.425570 | 2019-03-15T08:40:36 | 2019-03-15T08:40:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,400 | py | from keras.models import Model
from keras.layers import Dense, Activation, Input, BatchNormalization, Dropout, concatenate
from keras import layers
from keras.callbacks import ModelCheckpoint
def res_block_org(input_tensor, n_neuron, stage, block, bn=False):
conv_name_base = 'res' + str(stage) + block + '_branch... | [
"[email protected]"
] | |
90e6ad0aa33ddfa5468bf5f1af143002cab456a2 | cc1d44cf04e5b2b15bb296a434aad4ae4bcfc4be | /python3/euc_dist.py | e6536e74111caf0ec86e96ef6f4469cb1453d3bf | [] | no_license | ericosur/ericosur-snippet | dda2200546b13fb9b84632d115a0f4ca5e3d5c47 | 0309eeb614612f9a35843e2f45f4080ae03eaa81 | refs/heads/main | 2023-08-08T04:54:05.907435 | 2023-07-25T06:04:01 | 2023-07-25T06:04:01 | 23,057,196 | 2 | 1 | null | 2022-08-31T09:55:19 | 2014-08-18T03:18:52 | Perl | UTF-8 | Python | false | false | 217 | py | #!/usr/bin/python3
# coding: utf-8
''' euclidean distance '''
import numpy as np
def main():
''' main '''
m = np.array([3, 4])
d = np.linalg.norm(m)
print(d)
if __name__ == '__main__':
main()
| [
"[email protected]"
] | |
b714c4900618c7eaaade3b45b921035c9bc2929a | 222dbb2f43dccbd4538ef76798a26457edffe07c | /MFVI/distributions.py | 805669cb27a08efcecf3874559184aaabb9b9751 | [] | no_license | MJHutchinson/PytorchBayes | 9699351822416deeb61e95a34653580fdfbbb5ae | e95a9bd308c595b9603bdfb799288a0ed50cc7c6 | refs/heads/master | 2020-04-09T18:39:57.643468 | 2019-01-15T16:06:05 | 2019-01-15T16:06:05 | 160,519,698 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,433 | py | import torch
import numpy as np
log_2pi = np.log(2*np.pi)
class Distribution(object):
def pdf(self, x):
raise NotImplementedError
def logpdf(self, x):
raise NotImplementedError
def cdf(self, x):
raise NotImplementedError
def logcdf(self, x):
raise NotImplementedErro... | [
"[email protected]"
] | |
8ec1b7d766ec47742ccc9d987470864ab0da2c88 | 33338ccfe04112e7b7ea09aea240187cee5bab3f | /examples/motion.py | 35867e74d44317195e2ecb4b470fc58a09d5d516 | [
"MIT"
] | permissive | levkovigor/pmw3901-python-pimoroni | b944e7e3f1b4b43fcd0259cbdd4d6548148fbacb | bf798f6d58a1527563822d152d2650cc72e06e09 | refs/heads/master | 2023-08-02T22:53:24.578868 | 2021-09-16T15:05:11 | 2021-09-16T15:05:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,366 | py | #!/usr/bin/env python
import time
import argparse
from pmw3901 import PMW3901, PAA5100, BG_CS_FRONT_BCM, BG_CS_BACK_BCM
print("""motion.py - Detect flow/motion in front of the PMW3901 sensor.
Press Ctrl+C to exit!
""")
parser = argparse.ArgumentParser()
parser.add_argument('--board', type=str,
ch... | [
"[email protected]"
] | |
664688d7026deca7dfe13f826be489819a058db9 | f188379dc9c1e5b63e432d434c782a4d6997872b | /7_Dictionaries/Exercises and More Exercises/11. Ranking.py | c8393f218b168b6acce06f6453a3b75ba56c95c2 | [] | no_license | GalyaBorislavova/SoftUni_Python_Fundamentals_January_2021 | 39d7eb8c28f60ff3c293855b074c49ac622a6036 | 7d479fd6c8e4136fb07b765458cc00088e09767a | refs/heads/main | 2023-06-15T04:16:17.084825 | 2021-06-30T18:05:42 | 2021-06-30T18:05:42 | 381,785,764 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,479 | py | data = input()
contest_with_pass = {}
while not data == "end of contests":
contest, password = data.split(":")
contest_with_pass[contest] = password
data = input()
data = input()
submissions = {}
while not data == "end of submissions":
contest, password, username, points = data.split("=>")
points... | [
"[email protected]"
] | |
60be12b528080a1558cd6e0f9d842020db02dc29 | 5a1a695829a2d1dbf4daa0736f0fbd6feffc7e63 | /0830/palindrome2.py | 0042014807add9a1a311863e8d36a88cf927c9d9 | [] | no_license | juyi212/Algorithm_study | f5d263c5329c994a457bbe897e5e1405d2b1d67a | f225cc593a50b74686111f654f7133707a1d1310 | refs/heads/master | 2023-03-21T20:02:36.138688 | 2021-03-16T14:16:40 | 2021-03-16T14:16:40 | 325,008,034 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 648 | py | import sys
sys.stdin=open("pal_input.txt","r")
def check(m):
global zwords
for i in range(100):
for j in range(100-m+1):
temp=words[i][j:j+m]
c_temp=zwords[i][j:j+m]
if temp==temp[::-1] or c_temp==c_temp[::-1]:
return True
return False
for tc in ra... | [
"[email protected]"
] | |
4a7aae79d4dfa0b6ec639291564a1c9cc372c6c2 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/abc005/C/4909327.py | 2ce013dfa84bbabf437e5d6940c4493bb010db06 | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Python | false | false | 483 | py | t = int(input())
n = int(input())
a_list = sorted(list(map(int, input().split())))
m = int(input())
b_list = sorted(list(map(int, input().split())))
if n < m:
print('no')
else:
count = 0
for b in b_list:
for a in range(len(a_list)):
if b-a_list[a] <= t and b-a_list[a] >= 0:
... | [
"[email protected]"
] | |
644a771174d5da427ab20d060a04b6064d28e480 | 7aec5d22b50ce8d4a18572396a4ab28d45dfcbef | /examples/coreir-tutorial/shift_register.py | 668484a02603c8bb433e6a21b40527233274e552 | [
"MIT"
] | permissive | phanrahan/magmathon | db4ad04bd37034d5cee9ee0b507ec64ca9d0f204 | 68c9be1df0569a9d5d076b1bd986ed5ee3562d54 | refs/heads/master | 2020-09-15T08:16:36.985371 | 2020-03-04T17:50:27 | 2020-03-04T17:50:27 | 66,949,165 | 13 | 3 | MIT | 2020-03-02T18:14:35 | 2016-08-30T14:39:43 | Jupyter Notebook | UTF-8 | Python | false | false | 1,654 | py |
# coding: utf-8
# In[1]:
import magma as m
m.set_mantle_target("coreir")
import mantle
def DefineShiftRegister(n, init=0, has_ce=False, has_reset=False):
class _ShiftRegister(m.Circuit):
name = 'ShiftRegister_{}_{}_{}_{}'.format(n, init, has_ce, has_reset)
IO = ['I', m.In(m.Bit), 'O', m.Out(m.B... | [
"[email protected]"
] | |
8c3071706a8894ff8207c463c10c2281dd7b7f1c | 1139841f6451c0e9e2a53a808966139dbde60f54 | /nlp_tools/nlp_postprocessor/postprocessing_rule.py | 43a30de044312219c39aedddaf33a6d6edb89b2b | [] | no_license | abchapman93/nlp_tools | 6728d158aa3bb06e2d5e6fa58d8924315e42ce09 | 876aac6203d596569983ca9920fde888f34cc3f3 | refs/heads/master | 2022-10-23T18:05:02.267427 | 2020-06-16T16:17:43 | 2020-06-16T16:17:43 | 251,348,604 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,407 | py | class PostprocessingRule:
def __init__(self, patterns, action, name=None, description=None, action_args=None):
"""A PostprocessingRule checks conditions of a spaCy Span entity
and executes some action if all patterns are met.
patterns (list): A list of PostprocessingPatterns,
e... | [
"[email protected]"
] | |
411947a1984c31f8fbdb8e6f9394716a8adaf64c | 14956dbed8ae4fba1d65b9829d9405fcf43ac698 | /Cyber Security/Capture the Flag Competitions/2020/DSTA CDDC 2020/Warp Gate 4/(UNDONE) What Time Is It [1]/solve.py | 9ba0fc4d6cf73be6d252a5672169fe10759bb934 | [] | no_license | Hackin7/Programming-Crappy-Solutions | ae8bbddad92a48cf70976cec91bf66234c9b4d39 | ffa3b3c26a6a06446cc49c8ac4f35b6d30b1ee0f | refs/heads/master | 2023-03-21T01:21:00.764957 | 2022-12-28T14:22:33 | 2022-12-28T14:22:33 | 201,292,128 | 12 | 7 | null | 2023-03-05T16:05:34 | 2019-08-08T16:00:21 | Roff | UTF-8 | Python | false | false | 718 | py | datesString = '''\
2005.10.06 05:23:15
2020.10.05 22:39:46
2020.08.29 05:16:57
2020.08.12 10:05:39
2020.09.29 06:36:38
2020.09.27 00:41:56
2020.09.30 18:43:24
2020.08.10 03:54:13
2020.09.24 00:09:37
2020.09.16 09:20:23
2020.08.10 22:06:44
2020.08.10 23:19:09
2020.08.13 22:08:52
1987.04.11 00:43:13\
'''
... | [
"[email protected]"
] | |
bf984644b822f43a0a3dabb801c8a47cc73ebe50 | 225bc8ac617a721ae79e8287ca0df47439740c6b | /strip_tags.py | 62fa10f4d5cf0c2ed91f72923096389502b6475f | [
"Artistic-2.0"
] | permissive | rec/strip-tags | 558228d1e24679822a6c3ec9130d9d1867657251 | 4f6568fa26089275d77c82d4c55c6a0f05bbebd1 | refs/heads/master | 2020-04-14T21:28:04.464951 | 2014-05-17T18:51:22 | 2014-05-17T18:51:22 | 19,893,626 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 330 | py | #!/usr/bin/env python
from BeautifulSoup import BeautifulSoup
def strip_all_tags(html):
return html and ''.join(BeautifulSoup(html).findAll(text=True))
def join_inputs():
results = []
while True:
try:
results.append(raw_input())
except EOFError:
return ''.join(results)
print(strip_all_ta... | [
"[email protected]"
] | |
4f9db7146b298561b8def897b45f7e3ecbd7e31a | 28f3e82c99fe3628f3d0b361f627408a2fdacfc2 | /driver/migrations/0003_auto_20190316_2209.py | 5fd2ff7c7dc5ae639e7af43cb2f363d6084df126 | [] | no_license | aballah-chamakh/Delivery_Tracker | 09957eae173f30406eb285256bfb07b119ddce22 | ffb07027e81aeb0fab90fc41963544625dd84fea | refs/heads/master | 2020-04-27T22:31:49.854344 | 2019-04-09T18:11:05 | 2019-04-09T18:11:05 | 174,740,268 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | # Generated by Django 2.0 on 2019-03-16 21:09
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('driver', '0002_driver_image'),
]
operations = [
migrations.AlterField(
model_name='driver',
... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.