blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | 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 777
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 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e73aff3599ba2371422b1ab8a30e84e8a98a2ad1 | 74649c1220c68ad0af79e420d572e3769fcd7a53 | /_unittests/ut_cli/test_cli_validate_bench_doc.py | 4a3937dc7771228ee5b515f55a9fc32778a4db1d | [
"MIT"
] | permissive | sdpython/mlprodict | e62edcb428700cb2c4527e54e96431c1d2b36118 | 27d6da4ecdd76e18292f265fde61d19b66937a5c | refs/heads/master | 2023-05-08T10:44:30.418658 | 2023-03-08T22:48:56 | 2023-03-08T22:48:56 | 112,469,804 | 60 | 13 | MIT | 2023-04-19T01:21:38 | 2017-11-29T11:57:10 | Python | UTF-8 | Python | false | false | 1,157 | py | """
@brief test tree node (time=42s)
"""
import os
import unittest
from pyquickhelper.loghelper import BufferedPrint
from pyquickhelper.pycode import (
ExtTestCase, get_temp_folder, ignore_warnings)
from mlprodict.__main__ import main
class TestCliValidateBenchDoc(ExtTestCase):
@ignore_warnings(UserWarn... | [
"[email protected]"
] | |
f7d764ba88db6e3901e87715853fe26847484a39 | 6d71de4e88dcb7d04f6d3a18736d393e12f8d087 | /scripts/packages/database.py | f5c11749b5a1d8cec4d2441e01d576df5e077dc6 | [
"MIT"
] | permissive | wyolum/Alex | 71075c30691229e8eb28afa06a6ab44c450b14d4 | 03f1d8ae0107454d18964e33777ffc4c0c1a1951 | refs/heads/main | 2023-07-02T16:11:57.088323 | 2021-08-05T17:59:04 | 2021-08-05T17:59:04 | 338,686,528 | 10 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,870 | py | import sqlite3
class Struct:
def __init__(self, **kwargs):
self.attrs = kwargs
self.__dict__.update(kwargs)
def keys(self):
return self.attrs.keys()
def __getitem__(self, key):
return self.attrs[key]
def __repr__(self):
return f'Struct(**{self.attrs})'
class Tabl... | [
"[email protected]"
] | |
45ebacc913f5ce9cdf2fa3cc8fe300130f9e2f9b | b233a9abbf0c88ae0dcb1bb1d22d28403414c813 | /jira/venv/bin/pbr | b9c8d7f5ac5ddea76e71a9355ae5fd7137de0757 | [] | no_license | suntwin/pythonProjects1 | 238a8a4f6585ecac656349a06f02a763518e9cd5 | f0e34e4bced916fea7dc6520f14f0883c6d8b961 | refs/heads/master | 2022-12-11T08:28:53.032191 | 2020-01-01T09:13:57 | 2020-01-01T09:13:57 | 231,194,980 | 1 | 1 | null | 2022-12-08T07:02:00 | 2020-01-01T09:03:34 | Jupyter Notebook | UTF-8 | Python | false | false | 262 | #!/Users/niteshchawla/Ownstuff/pythonProjects/jira/venv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pbr.cmd.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"[email protected]"
] | ||
d5cef35ef32da1b2f8e8ae9cb2ab5ab3391634ea | cea45a2355c8b243a79c4c179c98a04e90e98ff7 | /astropy/table/tests/conftest.py | 65143fd816accb2c0754b2e8130f6ba656cf8cbe | [] | no_license | shanmbic/astropy | 408cfa45511cac9c64dade6350d6ba9adeb567ad | e8a6546dd210ade743eb663dd1c276ca2fd054b4 | refs/heads/master | 2021-01-15T17:20:47.626581 | 2014-04-03T16:17:03 | 2014-04-03T16:17:03 | 17,769,433 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,111 | py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
All of the py.test fixtures used by astropy.table are defined here.
The fixtures can not be defined in the modules that use them, because
those modules are imported twice: once with `from __future__ import
unicode_literals` and once without. py.test... | [
"[email protected]"
] | |
724cc2812ef2925248a2d0403762eb7599764b22 | 0a3e24df172a206a751217e5f85b334f39983101 | /python_etc_3/abstract.py | e0ea5f6e6873c182904d30b94f58820697f27011 | [] | no_license | yeboahd24/python202 | 1f399426a1f46d72da041ab3d138c582c695462d | d785a038183e52941e0cee8eb4f6cedd3c6a35ed | refs/heads/main | 2023-05-06T04:14:19.336839 | 2021-02-10T02:53:19 | 2021-02-10T02:53:19 | 309,841,303 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 685 | py | #!usr/bin/evn/python3
import abc
class Tombola(abc.ABC):
@abc.abstractmethod
def load(self, iterable):
"""Add items from an iterable."""
@abc.abstractmethod
def pick(self):
"""Remove item at random, returning it.
This method should raise `LookupError` when the instance is empty."""
def lo... | [
"[email protected]"
] | |
e87bb97c7df0a4427908d7f0aaf88841526d6ba8 | 31a0b0749c30ff37c3a72592387f9d8195de4bd6 | /rllib/agents/ars/tests/test_ars.py | 86ccab7f45a7af95c28c303d749585d3ca419ddc | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | longshotsyndicate/ray | 15100bad514b602a3fa39bfe205288e7bec75d90 | 3341fae573868338b665bcea8a1c4ee86b702751 | refs/heads/master | 2023-01-28T15:16:00.401509 | 2022-02-18T05:35:47 | 2022-02-18T05:35:47 | 163,961,795 | 1 | 1 | Apache-2.0 | 2023-01-14T08:01:02 | 2019-01-03T11:03:35 | Python | UTF-8 | Python | false | false | 1,353 | py | import unittest
import ray
import ray.rllib.agents.ars as ars
from ray.rllib.utils.test_utils import framework_iterator, check_compute_single_action
class TestARS(unittest.TestCase):
@classmethod
def setUpClass(cls):
ray.init(num_cpus=3)
@classmethod
def tearDownClass(cls):
ray.shutd... | [
"[email protected]"
] | |
81c2d118d20c8e99ca595f9a35b345a98b2fe6f0 | ef5f98cdaca58bc9c1ba1a94a1ccf7bebc3f1260 | /is_analyse_cbn.py | 03e5d482bfbc35d4dd74e9ddc63f7ad70a85fab2 | [
"MIT"
] | permissive | tonygalmiche/is_plastigray | 512ad911b3118c6aa2aab49f64ad7871fb80f195 | 774feea510fc0854776016dbbbc7472ebd1248c5 | refs/heads/master | 2023-07-25T21:49:56.284434 | 2023-07-18T13:15:28 | 2023-07-18T13:15:28 | 24,811,999 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 52,678 | py | # -*- coding: utf-8 -*-
from openerp import models,fields,api
import time
import datetime
from collections import OrderedDict
import tempfile
class product_product(models.Model):
_inherit = "product.product"
@api.model
def analyse_cbn(self,filter=False):
cr, uid, context = self.env... | [
"[email protected]"
] | |
a88a1a1ab247a5f750af8f9e792c8ecee63957ab | 52a61caff0aeb434c32e5657e38762643e9f57dd | /Basics/TwoDimensionalLists(arrays)/is_matrix_symmetric.py | 98436819ed551b845d293a2907ee30e2f2c3f3d4 | [] | no_license | AndrewErmakov/PythonTrainingBasics | 1480a6378d1ec59884760e2b3014ccc3d28f058f | 639e15bbfc54da762cb9e366497754cfece30691 | refs/heads/master | 2021-06-10T15:57:58.682335 | 2021-03-25T13:37:30 | 2021-03-25T13:37:30 | 153,678,760 | 0 | 0 | null | 2018-10-30T13:52:51 | 2018-10-18T19:45:47 | Python | UTF-8 | Python | false | false | 288 | py | size_list = int(input())
numbers_list = [[int(j) for j in input().split()] for i in range(size_list)]
answer = "yes"
for i in range(size_list):
for j in range(size_list):
if numbers_list[i][j] != numbers_list[j][i]:
answer = "no"
break
print(answer)
| [
"[email protected]"
] | |
6d482b7fc6f41fd53b8ad4099680500cf4ef92cc | 0da9d2a15305421e224795cdf078838bd97eccc8 | /Algorithms/Strings/SeparateTheNumbers.py | 3ca2f20969d9e354e5da69e9dfad840c9e4c0624 | [] | no_license | LysanderGG/HackerRank | ac1300eea2f4e00f7d4e5084b5d570aa6fae0cfb | 039ec4414612cff84a941a7e7538fb36e10d427f | refs/heads/master | 2021-01-21T16:09:59.174131 | 2017-07-09T12:33:32 | 2017-07-09T12:33:32 | 91,877,258 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 468 | py | #!/bin/python3
import sys
# Build a string of length at least n starting with i
def build_str(i, n):
res = ""
while len(res) < n:
res += str(i)
i += 1
return res
def solve(s):
for i in range(1, len(s) // 2 + 1):
first = int(s[:i])
if build_str(first, len(s)) == s:
... | [
"[email protected]"
] | |
8ed9f49a0b93692d31d34f2bb953214484a2f5ff | 3bfa43cd86d1fb3780f594c181debc65708af2b8 | /cs61a/project/scheme/scheme.py.ref | b0c4bb4b736f02ade237131c0c93cc13cd381858 | [] | no_license | ninjaboynaru/my-python-demo | 2fdb6e75c88e07519d91ee8b0e650fed4a2f9a1d | d679a06a72e6dc18aed95c7e79e25de87e9c18c2 | refs/heads/master | 2022-11-06T14:05:14.848259 | 2020-06-21T20:10:05 | 2020-06-21T20:10:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24,024 | ref | """A Scheme interpreter and its read-eval-print loop."""
from scheme_primitives import *
from scheme_reader import *
from ucb import main, trace
##############
# Eval/Apply #
##############
def scheme_eval(expr, env, tail=False): # Optional third argument is ignored
"""Evaluate Scheme expression EXPR in environm... | [
"[email protected]"
] | |
f8e180729c3092f31dd14b405f694eda6ea55dd0 | 549270020f6c8724e2ef1b12e38d11b025579f8d | /recipes/msgpack-c/all/conanfile.py | eac066163d08578e6216ffddb784ee899746d0ca | [
"MIT"
] | permissive | conan-io/conan-center-index | 1bcec065ccd65aa38b1fed93fbd94d9d5fe6bc43 | 3b17e69bb4e5601a850b6e006e44775e690bac33 | refs/heads/master | 2023-08-31T11:34:45.403978 | 2023-08-31T11:13:23 | 2023-08-31T11:13:23 | 204,671,232 | 844 | 1,820 | MIT | 2023-09-14T21:22:42 | 2019-08-27T09:43:58 | Python | UTF-8 | Python | false | false | 3,964 | py | from conan import ConanFile
from conan.tools.files import get, copy, rmdir, save
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.scm import Version
import os
import textwrap
required_conan_version = ">=1.53.0"
class MsgpackCConan(ConanFile):
name = "msgpack-c"
description = ... | [
"[email protected]"
] | |
9cbfa772353ca6774d58a800b97ac7adc0d3df4c | 3326ed6fa75623aca9f94242c06ba736af1fe1e4 | /src/qutip_symbolic/commutators.py | 0743e0d0810341df1aae9f59bfd53b74d568e58a | [
"BSD-3-Clause"
] | permissive | ZeroInfinite/qutip-symbolic | d443193981ea223c0ea0f9675288593f8371fc5e | bbc5d1e9f7928cd88e568140a6ff49bb060ce20d | refs/heads/master | 2023-05-01T12:52:52.037165 | 2021-05-19T14:34:47 | 2021-05-19T14:34:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 372 | py |
from .compat.commutator import Commutator
def recursive_commutator(a, b, n=1):
"""
Generate a recursive commutator of order n:
[a, b]_1 = [a, b]
[a, b]_2 = [a, [a, b]]
[a, b]_3 = [a, [a, b]_2] = [a, [a, [a, b]]]
...
"""
if n == 1:
return Commutator(a, b)
else:
re... | [
"[email protected]"
] | |
e458a806a907109ff03c60bc02d49f659e96156e | 431dadb72b70ab4d604d6f7722e1554e151fda83 | /examples/predict_demo_by_seq.py | fe13d90be2ae34c639eaac6850b563f74b2408ea | [
"Apache-2.0"
] | permissive | smilelight/nymph | fe3c04fb9145bb16993d81791ac7d3fe0f0b7587 | c8da2211f7a8f58d1c6d327b243e419ed9e64ead | refs/heads/master | 2022-12-08T16:59:24.823290 | 2020-09-01T08:48:03 | 2020-09-01T08:48:03 | 286,218,355 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 971 | py | # -*- coding: utf-8 -*-
import os
import pandas as pd
from nymph.data import SeqDataset, split_dataset
from nymph.modules import SeqClassifier
project_path = os.path.abspath(os.path.join(__file__, '../../'))
data_path = os.path.join(project_path, r'data\test.csv')
save_path = 'demo_saves_seq'
def split_fn(dataset: ... | [
"[email protected]"
] | |
c271d3cf73452571a1c93a1185eb93f88ff3c1bf | 694c187c8a00bee8c670c1690170099bad9b16b3 | /palindrome.py | 220c4d3ad21d12c2a38242879e2e212ed2181a00 | [] | no_license | ajayvenkat10/Competitive | 301f220b6d296f7e34328f192c43c4d7ef208cb1 | 14f2ecebe10eb19f72cc412dd0c414b3b1de9b4d | refs/heads/master | 2022-11-20T14:31:33.590099 | 2020-07-23T15:39:14 | 2020-07-23T15:39:14 | 281,599,951 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | n=int(raw_input(""))
count=0
A=[]
a=raw_input("")
a=a.split()
for i in range(n):
b=int(a[i])
A.append(b)
while(len(A)>0):
count = count + pali(A)
print count
| [
"[email protected]"
] | |
96faca6dc627aa0ad4cd2cb5e017015d35a80cb7 | 1feae7286c5d61981b40520e2c1e1028b86bb8cc | /blog_newsapi/asgi.py | 05c058cfe761a8558228cfd03981b89811503c23 | [] | no_license | mukeshrakesh123/newsapp-blog | b97adb486f2d463e11fc054243833a2db6944865 | 596eac8981792fc368d2abfc4e19650332347f08 | refs/heads/main | 2023-06-16T11:44:10.665862 | 2021-07-10T16:34:50 | 2021-07-10T16:34:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 401 | py | """
ASGI config for blog_newsapi project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_... | [
"[email protected]"
] | |
909e293fb34797f5f75d7502c620042158498e08 | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /sesv2_write_f/bulk-email_send.py | a349241910bf4f467effed81bbf205506059170e | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 388 | py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import write_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-instances.html
if __name__ == '__main__... | [
"[email protected]"
] | |
b8bc971de51c0b9c9209b3f1c24ac435f7161b4c | c1d9dc8351241a3bd519a6f8ebc4531bfed2de6f | /backup/Python/152.py | 3c06c1daf0f1af89b7d26c587e3d1a7fae8027fa | [] | no_license | yichenluan/LeetCodeSolution | 3cf4b31e36f32c6b689b7b724c5cf57c3efb70bc | 26af13bbac60d656415bbba0c3bc7acbaa5a7d63 | refs/heads/master | 2021-05-23T06:05:07.183561 | 2020-10-20T09:11:41 | 2020-10-20T09:11:41 | 52,205,706 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 548 | py | class Solution(object):
def maxProduct(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
maxSoFar = nums[0]
maxEndingHere = nums[0]
minEndingHere = nums[0]
for i in xrange(1, len(nums)):
maxTemp = maxEndingHere
maxEndingHer... | [
"[email protected]"
] | |
89d77e01921b73651991e522906f13a394d8776d | a81d84fdb57e1b90812fc5b5b523685ba5b663c0 | /python/2021_08/Question1480.py | 2e09e851c818b1ea3b6986e1b3573c1a418ae62b | [] | no_license | KujouNozom/LeetCode | 1919081001126924daa7549493a0823702631a37 | 4de1e601274de1336d669e41f732a8cb056880b9 | refs/heads/master | 2023-07-17T12:17:45.156451 | 2021-09-04T11:57:40 | 2021-09-04T11:57:40 | 268,075,373 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 283 | py | # 1480. 一维数组的动态和 [前缀和]
from typing import List
class Solution:
def runningSum(self, nums: List[int]) -> List[int]:
ans = []
pre_sum = 0
for num in nums:
pre_sum += num
ans.append(pre_sum)
return ans
| [
"[email protected]"
] | |
85bd66f0c2cbda22e5141aa476470c6e2f8467c8 | 226b1c73a706f4734834196d18305d4d2c873589 | /synlib/llbin/synlibMsg.py | dd8afb0eb47864fd086bc66601a0086bcb225c2f | [] | no_license | ocakgun/vlsistuff | 43b4b07ae186b8d2360d11c57cd10b861e96bcbe | 776c07f5d0c40fe7d410b5c85e7381017d4dab64 | refs/heads/master | 2022-06-13T14:40:22.641310 | 2020-05-08T11:09:00 | 2020-05-08T11:09:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,131 | py | #! /usr/bin/python
import os,sys,string,pickle
import traceback,logs
import msgsim2c
Cells = {}
Types = {}
class cellClass:
def __init__(self,Name):
self.Name=Name
self.pins={}
self.busses={}
self.pairs={}
self.ff=0
self.latch=0
self.statetable=0
s... | [
"[email protected]"
] | |
baf5f510f103558e54208fd4851c7324a7084c61 | 2f219acf03442e2aa502cd8fffce02f3c1118298 | /Py2D/Py2D_projectBuilder.py | cce1aec2b30db8faf14bf3a0ec396d22613990c0 | [] | no_license | AFlyingCar/Py2D | 27a5ec03c015de16533978315d654c338d9fa4f7 | c06d95ac0f716598a7be2af0d7cfaaeebd189bbc | refs/heads/master | 2020-12-24T06:04:24.821244 | 2016-07-05T04:00:18 | 2016-07-05T04:00:18 | 30,786,712 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,335 | py | #########################
# AFlyingCar #
# 2/19/15 #
# Py2D Project Builder #
#########################
import shutil,errno,os
PY2D_INSTALLATION_PATH = "C:\\Program Files\\Py2D"
# PY2D_INSTALLATION_PATH = ".\\Py2D" # Use to build with lastet build rather than the recommended one
def copyFiles(source... | [
"[email protected]"
] | |
f7b3500ae91f51a525d53781d284efa1a7bfc990 | 72e11a80587342b3f278d4df18406cd4ce7531e8 | /dulwich/porcelain.py | c0646f2a1aeeb047e6eaace836bf41384d626691 | [] | no_license | EnjoyLifeFund/Debian_py36_packages | 740666f290cef73a4f634558ccf3fd4926addeda | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | refs/heads/master | 2021-08-24T02:17:24.349195 | 2017-12-06T06:18:35 | 2017-12-06T06:18:35 | 113,167,612 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 38,916 | py | # porcelain.py -- Porcelain-like layer on top of Dulwich
# Copyright (C) 2013 Jelmer Vernooij <[email protected]>
#
# Dulwich is dual-licensed under the Apache License, Version 2.0 and the GNU
# General Public License as public by the Free Software Foundation; version 2.0
# or (at your option) any later version. You can... | [
"[email protected]"
] | |
ec2ee291e8a5d13b909ff667fa3c265d94191d2a | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_265/ch59_2020_09_06_16_20_08_424667.py | 85dfd925cd472b6628093ea4f0c3327fe9db1126 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 93 | py | def asteriscos (n):
y=n*int('*')
return y
n= int
teste= asteriscos(n)
print (teste) | [
"[email protected]"
] | |
c042d866799b19a4c0a033cdd67920cd11b294f2 | 31698241ee3485d8b053da0d0da203c215a958f9 | /test.py | b087fd7b04be98ca7891c6e9c241bc700c1fa8db | [] | no_license | martin-martin/save-udacity-forum-posts | 06f588d875477e7579c8fafe50b07e2fd16820a2 | 7abcede5c288cfe430b8b47fc1d7e1736bebe774 | refs/heads/master | 2021-06-10T06:39:10.868435 | 2020-03-03T09:00:38 | 2020-03-03T09:00:38 | 146,982,630 | 0 | 0 | null | 2021-06-01T22:35:47 | 2018-09-01T08:45:11 | Python | UTF-8 | Python | false | false | 640 | py | # getting out the thread name to be used as file name
# testing on how to deal with the fact that there are thread *replies*
# that have a different URL structure to *original posts*
li = [
"https://discussions.udacity.com/t/logic-improvisation-needed/191902/2",
"https://discussions.udacity.com/t/so-you-want-t... | [
"[email protected]"
] | |
3c40e6e237efe724302daafbcb9ecb8d7168cf24 | dc93174785fb64ca91264fa8dee50c0b0ce616c8 | /DeepFried2/criteria/__init__.py | 5316b9014cc0a8dfc8d9251a659b7883978485fe | [
"MIT"
] | permissive | elPistolero/DeepFried2 | 789ee2362f47a65efe6d4f64cf81657777ee12b3 | 56efebede5469de706071a5ba645b2b74b3adf3e | refs/heads/master | 2020-12-25T16:35:39.932731 | 2015-09-18T06:48:14 | 2015-09-18T06:48:14 | 40,975,386 | 0 | 0 | null | 2015-08-18T14:02:46 | 2015-08-18T14:02:45 | null | UTF-8 | Python | false | false | 143 | py | from .ClassNLLCriterion import ClassNLLCriterion
from .BCECriterion import BCECriterion
from .RMSECriterion import RMSECriterion, MSECriterion
| [
"[email protected]"
] | |
ce7496e15e265dd8728a7ca0b81b7d914ea7bd5f | e78f1c5347069cec56c42149a1d4de3103936ee7 | /quantum_gates/find_resonant_interactions.py | 3af82839e1fa720a4e958cb7590b7cd4a0762e8b | [] | no_license | twobackfromtheend/CircularStates | 8882627923bdfce42f72d0a9401206acd7043f47 | ab0471362b444620d48a902ac237caead3b18a8f | refs/heads/master | 2023-08-04T13:20:48.494564 | 2021-09-16T19:23:29 | 2021-09-16T19:23:29 | 323,437,296 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 497 | py | import numpy as np
from arc import StarkMapResonances, Rubidium
n = 51
n = 70
n = 90
n = 30
s = 0.5
calculation = StarkMapResonances(
Rubidium(),
[n, n - 1, n - 1 + s, n - 1 + s],
Rubidium(),
[n, n - 1, n - 1 + s, n - 1 + s],
)
n_buffer = 10
calculation.findResonances(
nMin=n - n_buffer, nMax=n + n... | [
"[email protected]"
] | |
2131a1ba50f8f1a9a88ef10152942581cf16b5fa | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_configuration.py | 92106ddf94ce39971ca1d644c17886ebe2376f08 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 3,143 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"[email protected]"
] | |
418464640708b824c506f3e90e4f9b8c4ff03368 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p2DJ/New/program/qiskit/QC/startQiskit_QC67.py | a9d853e26832f658881463c5f7c58a05494423ab | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,013 | py | # qubit number=2
# total number=7
import cirq
import qiskit
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy as... | [
"[email protected]"
] | |
09fc949aa59fee950e73b5334a4796b8c4013da1 | 23fddc940a266c2d1d0e0b1687c36cdbcc9d54d9 | /gtwisted/test/twisted_test.py | 75f2164247362286e2d7ba3653753983433f88b7 | [] | no_license | Cuick/traversing | 210fcfb1c780037de59343fffeb4fa4d3f2eae32 | c78982580af7f63c8bff4dcb37005b7f7c682b5b | refs/heads/master | 2021-01-10T17:38:37.899460 | 2016-11-18T06:06:55 | 2016-11-18T06:06:55 | 55,397,540 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 968 | py | #coding:utf8
'''
Created on 2014年2月21日
@author: lan (www.9miao.com)
'''
# from twisted.core.greactor import GeventReactor
from twisted.internet import reactor
from twisted.internet.protocol import ServerFactory,Protocol
reactor = reactor
class MyProtocol(Protocol):
def connectionMade(self):
pass
# ... | [
"[email protected]"
] | |
2ae927007cd3599a2365302b8d151333af023a05 | 9c81c170f03ba925bf3d0682526245c202e384a7 | /tests/unit_tests/databases/dao/dao_tests.py | b792a65336a4e7a5f0df807fae1292ac4bf9de25 | [
"Apache-2.0",
"OFL-1.1"
] | permissive | zcong1993/incubator-superset | 2a08177641eff178dee9db852887ad2d19d70d54 | 269c99293f42089958dc98b5d6e5899509fc3111 | refs/heads/master | 2023-08-17T12:24:59.438120 | 2023-08-17T10:50:24 | 2023-08-17T10:50:24 | 209,522,299 | 0 | 0 | Apache-2.0 | 2023-03-06T08:10:31 | 2019-09-19T10:09:21 | TypeScript | UTF-8 | Python | false | false | 2,188 | 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 u... | [
"[email protected]"
] | |
80c36a7e86e77966f54c631cb257fd0ebc75cc31 | 8edd63a42469bf09fcad1c1070995ceda6e49646 | /env/lib/python2.7/site-packages/observations/r/codling.py | 86cc11b0e65757702630c0d2a4ac144e458b4164 | [] | no_license | silky/bell-ppls | fa0b5418f40dab59de48b7220ff30caba5945b56 | 369e7602c810b694a70ac1e875017480c8910ac8 | refs/heads/master | 2020-04-06T08:40:28.588492 | 2018-11-01T06:51:33 | 2018-11-01T06:51:33 | 157,312,221 | 1 | 0 | null | 2018-11-13T03:04:18 | 2018-11-13T03:04:18 | null | UTF-8 | Python | false | false | 2,203 | py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def codling(path):
"""Dose-mortality data, for fumigation of codling moth... | [
"[email protected]"
] | |
95b356426471b1afe72a949f674a499ccac4cfc9 | 849e95a72f4f380d6b31573a0a13e9eccd288838 | /data-tool/flows/common/affiliation_queries.py | a8e6b91b8895cf4e643efd69cb521b2eb8a4ba11 | [
"Apache-2.0"
] | permissive | bcgov/lear | d9b27e2b44ba607ca13878357a62a0623d54ddee | d90f11a7b14411b02c07fe97d2c1fc31cd4a9b32 | refs/heads/main | 2023-09-01T11:26:11.058427 | 2023-08-31T20:25:24 | 2023-08-31T20:25:24 | 168,396,249 | 13 | 117 | Apache-2.0 | 2023-09-14T20:52:02 | 2019-01-30T18:49:09 | Python | UTF-8 | Python | false | false | 567 | py | def get_unaffiliated_firms_query(data_load_env: str):
query = f"""
select ap.account_id, ap.corp_num, ap.contact_email, c.admin_email
from affiliation_processing ap
join corporation c on ap.corp_num = c.corp_num
where environment = '{data_load_env}'
... | [
"[email protected]"
] | |
37ba9ed4370eaf0e92f4bec9ffa8a8614598bd76 | 9247c6081930c215a1543e95a2567cfa60214c5a | /mlsegment/shape.py | fbec3ac1046ffc61ef8dbf4294a320694d26f67d | [] | no_license | luispedro/mlsegment | 5cec535dbb2476f860ae0ab629b62383e0850143 | 13bf1f2b19aa22f82c9bc07fdf7e44d0fefe79af | refs/heads/master | 2020-04-01T21:12:48.459146 | 2010-12-01T19:46:57 | 2010-12-01T20:39:34 | 1,127,228 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 815 | py | # Copyright (C) 2010, Luis Pedro Coelho <[email protected]>
# vim: set ts=4 sts=4 sw=4 expandtab smartindent:
# License: MIT
from __future__ import division
import numpy as np
from pyslic.features.hullfeatures import hullfeatures
def shape_features(binimg):
size = binimg.sum()
return np.concatenate(([size], hullfea... | [
"[email protected]"
] | |
c4f319cc552d88af43f227b1f826513811c0f29f | 8da91c26d423bacbeee1163ac7e969904c7e4338 | /pyvisdk/do/virtual_usb_remote_client_backing_info.py | 14e557038cd02b58c8e04e8e355118e8cb07b301 | [] | no_license | pexip/os-python-infi-pyvisdk | 5d8f3a3858cdd61fb76485574e74ae525cdc7e25 | 1aadea0afbc306d09f6ecb9af0e683dbbf961d20 | refs/heads/master | 2023-08-28T02:40:28.789786 | 2020-07-16T04:00:53 | 2020-07-16T04:00:53 | 10,032,240 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,060 | py |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def VirtualUSBRemoteClientBackingInfo(vim, *args, **kwargs):
'''The virtual remote client... | [
"[email protected]"
] | |
f435aa2b121f93f5780e2858c25946185360188a | 09bd584a3eb73ec77693343d135ed664d96b3258 | /server/tests/test_vanilla.py | d874e5410f6400c9d80e978e3f1294ab2a2c35ae | [] | no_license | cameronmaske/pytest-django | ba83c84e74312f47d98f7787f1fb01dda81af825 | 09942d46277bfa6e7a2c71bdafe100a455cf9f2f | refs/heads/master | 2023-03-20T10:17:55.658522 | 2014-06-12T10:39:29 | 2014-06-12T10:39:29 | 20,763,872 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 683 | py | from django.test import TestCase
from base.models import Person, Dog, Tag, SimpleDog
class ModelTestCase(TestCase):
def test_person(self):
person = Person()
print "Vanilla - test_person. Person Count", Person.objects.all()
def test_dog(self):
dog = Dog()
print "Vanilla - test_... | [
"[email protected]"
] | |
d0b58a0f9cdd16d4048b28b51ba3708e95714a3a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03035/s850980087.py | 9e645bcde5e5ae67ff5e7d0b5ccaf14af566a570 | [] | 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 | 99 | py | a,b=map(int,input().split())
if a>12:
print(b)
elif 12>=a>5:
print(b//2)
else:
print(0) | [
"[email protected]"
] | |
90f50bfebc84cd823817012a773583c73aaa9b9b | 6364bb727b623f06f6998941299c49e7fcb1d437 | /msgraph-cli-extensions/src/groupsonenote/azext_groupsonenote/vendored_sdks/groupsonenote/operations/_group_onenote_page_parent_notebook_section_operations.py | 4a5e423d8719d4d682d4b07cf3fd2220cb6a3db6 | [
"MIT"
] | permissive | kanakanaidu/msgraph-cli | 1d6cd640f4e10f4bdf476d44d12a7c48987b1a97 | b3b87f40148fb691a4c331f523ca91f8a5cc9224 | refs/heads/main | 2022-12-25T08:08:26.716914 | 2020-09-23T14:29:13 | 2020-09-23T14:29:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 40,398 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"[email protected]"
] | |
9da35b41038706ad71614404f62e1afe9af8e375 | c7a6f8ed434c86b4cdae9c6144b9dd557e594f78 | /ECE364/.PyCharm40/system/python_stubs/348993582/PyQt4/QtGui/QHideEvent.py | cfd848238474f2b4a649fb575cb2b6a102c3dc84 | [] | no_license | ArbalestV/Purdue-Coursework | 75d979bbe72106975812b1d46b7d854e16e8e15e | ee7f86145edb41c17aefcd442fa42353a9e1b5d1 | refs/heads/master | 2020-08-29T05:27:52.342264 | 2018-04-03T17:59:01 | 2018-04-03T17:59:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | # encoding: utf-8
# module PyQt4.QtGui
# from /usr/lib64/python2.6/site-packages/PyQt4/QtGui.so
# by generator 1.136
# no doc
# imports
import PyQt4.QtCore as __PyQt4_QtCore
class QHideEvent(__PyQt4_QtCore.QEvent):
# no doc
def __init__(self, *args, **kwargs): # real signature unknown
pass
| [
"[email protected]"
] | |
3fa2ec3f7e947fa2481b0da91125eff20d196d3b | b05761d771bb5a85d39d370c649567c1ff3eb089 | /venv/lib/python3.10/site-packages/google/protobuf/internal/symbol_database_test.py | b4fa37fe40064f9e02c9b48bf3a1a5f9a22aae14 | [] | no_license | JawshyJ/Coding_Practice | 88c49cab955eab04609ec1003b6b8c20f103fc06 | eb6b229d41aa49b1545af2120e6bee8e982adb41 | refs/heads/master | 2023-02-19T10:18:04.818542 | 2023-02-06T21:22:58 | 2023-02-06T21:22:58 | 247,788,631 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 96 | py | /home/runner/.cache/pip/pool/fb/52/e7/708e3742aa691c784a82b3c4285c6477288dd5d5aa400d2d7b47c88990 | [
"[email protected]"
] | |
ac64b34973362b7ba0bb20f19fa422398239fe6d | 8613ec7f381a6683ae24b54fb2fb2ac24556ad0b | /boot/hard/divrem.py | c7180bf7bddacb57c97c3650dba1a60803a2326d | [] | no_license | Forest-Y/AtCoder | 787aa3c7dc4d999a71661465349428ba60eb2f16 | f97209da3743026920fb4a89fc0e4d42b3d5e277 | refs/heads/master | 2023-08-25T13:31:46.062197 | 2021-10-29T12:54:24 | 2021-10-29T12:54:24 | 301,642,072 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 243 | py | n = int(input())
ans = 0
def calc(x):
x -= 1
if x <= 0:
return 0
elif n // x == n % x:
return x
return 0
for i in range(1, int(n ** 0.5) + 1):
if n % i == 0:
ans += calc(n // i) + calc(i)
print(ans) | [
"[email protected]"
] | |
6f906b95dab3f59bdaf57c7c66e43031b13bd885 | b909406a1f838b2bb9e8eca90fd1bdf412e67286 | /13.微信投票机器人/VoteRobot-master/VoteRobot.py | 6f6fee18970cba741315d9928fbbc95582572440 | [] | no_license | kaishuibaicai/mini-Python-Projects | 2f12a5349e389c73080443443fcd293aae04a521 | e18d8bbecb8baaa345720011e67789b123523457 | refs/heads/master | 2021-09-13T02:55:12.429216 | 2018-04-24T04:44:33 | 2018-04-24T04:44:33 | 104,319,805 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,383 | py | #encoding=utf-8
import sys
import time
import random
import string
import httplib
import urllib
# 生成指定位数的随机字符串,字符为字母或数字
def getRandomString(id_length):
charSeq = string.ascii_letters + string.digits
randString = 'owzeBj'
for i in range(id_length):
randString += random.choice(charSeq)
return ... | [
"[email protected]"
] | |
f5da0d359a2950a5309e2631ef994614b76aaeec | 24f75f7ab2c38a028e99466a26b0957ab3a5424b | /pyscf/hessian/rks.py | 93f37e9c6200c821a8f075b97cb93a9274a7ac4b | [
"BSD-2-Clause"
] | permissive | wwjCMP/pyscf | 2a0e5d13ef42b537939e3fd3d63cb3b9cbd1ef28 | 3526cda9537ae2a4d90adee12c707a02dd66d445 | refs/heads/master | 2021-08-28T12:36:07.882737 | 2017-12-12T08:53:37 | 2017-12-12T08:53:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 31,433 | py | #!/usr/bin/env python
#
# Author: Qiming Sun <[email protected]>
#
'''
Non-relativistic RKS analytical Hessian
'''
import time
import copy
import tempfile
import numpy
import h5py
from pyscf import lib
from pyscf.lib import logger
from pyscf.scf import _vhf
from pyscf.hessian import rhf
from pyscf.dft import numin... | [
"[email protected]"
] | |
bacb1da7545cd9eba476314710d4b271f50af7c7 | 600283415a6a403b0a12ee8b5b4a3ff5d6aa757a | /templates-demo/venv/bin/pip3 | 50b5431b3c65b767022c0bb2a67f39c43c6248ba | [] | no_license | pixb/flask-demo | 0f2ef9a8bc6315c92e0aec6cac0acfdcf7bc8f03 | a40686eb25df0ca6379bc409ba34ef0425a863f8 | refs/heads/master | 2023-07-25T06:35:08.364038 | 2023-07-11T16:09:49 | 2023-07-11T16:09:49 | 336,691,847 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 423 | #!/home/pix/dev/code/python/python-web-demo/templates-demo/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '',... | [
"[email protected]"
] | ||
ae47ebf4bd9e9ee2b5a327015ca46141aaec74fd | 609444f644b60898e1ae9f8f52679a83b65a5df6 | /afrl/cmasi/__init__.py | 933720cead057b724c263f88da292372fd9ef63b | [] | no_license | sahabi/Shield_exp | 7bdef30f11edc34bf0811445aaa667cb4814f0e1 | 09d601fa1a346e0f780d5a438b6c5fbd3d4b6deb | refs/heads/master | 2021-01-12T05:41:57.468997 | 2016-12-22T20:16:07 | 2016-12-22T20:16:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,557 | py | __all__ = [ "SeriesEnum", "AbstractGeometry", "KeyValuePair", "Location3D", "PayloadAction", "PayloadConfiguration", "PayloadState", "VehicleAction", "Task", "SearchTask", "AbstractZone", "EntityConfiguration", "FlightProfile", "AirVehicleConfiguration", "EntityState", "AirVehicleState", "Wedge", "AreaSearchTask", "Cam... | [
"[email protected]"
] | |
4090b855d38ff1df15e8df2efe8df61b15a3b630 | cd5746f8cc7aee1f20606a65b4fae0d5e8ee78dc | /Python Books/Mastering-Machine-Learning-scikit-learn/NumPy-Cookbook/NumPy Cookbook 2nd Edition_CodeBundle/Final Code/0945OS_05_Final Code/ch5code/memmap.py | cfb0133647aece53a7a0d204bfbeaf4a3dd9f4dd | [] | no_license | theGreenJedi/Path | df24fca355590efef0c6cb5c52e7216c6b5d2464 | b5ed2805dbb046480929e49e550bfd8af5bb4d6f | refs/heads/master | 2023-07-27T14:23:37.694546 | 2021-07-16T01:38:55 | 2021-07-16T01:38:55 | 87,686,563 | 8 | 2 | null | 2023-07-11T22:49:03 | 2017-04-09T05:57:30 | Jupyter Notebook | UTF-8 | Python | false | false | 891 | py | import numpy as np
import matplotlib.pyplot as plt
N = 512
NSQUARES = 30
# Initialize
img = np.zeros((N, N), np.uint8)
centers = np.random.random_integers(0, N, size=(NSQUARES, 2))
radii = np.random.randint(0, N/9, size=NSQUARES)
colors = np.random.randint(100, 255, size=NSQUARES)
# Generate squares
for i in xrange(... | [
"[email protected]"
] | |
8eda126b9ddc871d2c35c095ecc5b5f9c3159fc9 | a2d36e471988e0fae32e9a9d559204ebb065ab7f | /huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/show_instance_request.py | 5da7cd5b7264aaf5c265c40ff95920dd44048ea5 | [
"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 | 3,006 | py | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ShowInstanceRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The ke... | [
"[email protected]"
] | |
1f55ed528984aa255668b43fc89c149e90036a34 | 51a37b7108f2f69a1377d98f714711af3c32d0df | /src/leetcode/P657.py | f83e958ab590ac9a78e88d3a6b8e2222b20faa3e | [] | no_license | stupidchen/leetcode | 1dd2683ba4b1c0382e9263547d6c623e4979a806 | 72d172ea25777980a49439042dbc39448fcad73d | refs/heads/master | 2022-03-14T21:15:47.263954 | 2022-02-27T15:33:15 | 2022-02-27T15:33:15 | 55,680,865 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | class Solution:
def judgeCircle(self, moves: str) -> bool:
x = y = 0
for move in moves:
if move == 'U':
x -= 1
if move == 'D':
x += 1
if move == 'L':
y -= 1
if move == 'R':
y += 1
... | [
"[email protected]"
] | |
850b481185c8eb69502f7934a5f7e97ad8d38921 | db03d88ddb75cc9b044a193f5d5f7ac438d64e59 | /tests/test_checksum_generator.py | 9f92f8d7e15fb47ad05e573674e171e01d127ac5 | [
"MIT"
] | permissive | edeposit/edeposit.amqp.ltp | e461d00bf74fd54c797d670abdaa3bdccc84e5ce | df9ac7ec6cbdbeaaeed438ca66df75ea967b6d8e | refs/heads/master | 2021-01-17T11:30:24.223324 | 2016-03-03T11:10:38 | 2016-03-03T11:10:38 | 21,615,588 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,029 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Interpreter version: python 2.7
#
# Imports =====================================================================
import os
import shutil
import pytest
import tempfile
from ltp import checksum_generator as cg
# Variables =============================================... | [
"[email protected]"
] | |
b2a188f7f610cf761151ec7b3382ab71ee475b77 | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_5/byrtre001/question1.py | 6de3673699da383ae564bde3010d5be128888984 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,204 | py | """program to simulate a simple BBS with one stored message and 2 fixed file
Trevor Byaruhanga
15 april 2014"""
# stored message.
a=('Welcome to UCT BBS'+'\n'+
'MENU'+'\n'+
'(E)nter a message'+'\n'+
'(V)iew message'+'\n'+
'(L)ist files'+'\n'+
'(D)isplay file'+'\n'+
'e(X)it')
print(a)
# input question pr... | [
"[email protected]"
] | |
cbc1a1a06bf7ee83de0cbc07b4f9b4f47f119827 | 9f4b3edaf1095ed58f5ff2d38d79d27b7e230e92 | /doc/source/python_as_glue.py | 81aaf1b30b0f672c46f77cb95265a1e0cfc8bcee | [
"BSD-3-Clause-LBNL"
] | permissive | zhishang72/TECA | dbd954ec48f5d9ad0643d26f5fbb6daf8dfd9842 | b8bed845e868133e4fbe01f4da40edd4c34cd775 | refs/heads/master | 2020-04-21T04:54:35.853007 | 2019-01-26T18:13:18 | 2019-01-26T18:13:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,695 | py | # initialize MPI
from mpi4py import MPI
# bring in TECA
from teca_py_io import *
from teca_py_alg import *
# start the pipeline with the NetCDF CF-2.0 reader
cfr = teca_cf_reader.New()
cfr.set_files_regex('cam5_1_amip_run2\.cam2\.h2\.*')
cfr.set_x_axis_variable('lon')
cfr.set_y_axis_variable('lat')
cfr.set_t_axis_vari... | [
"[email protected]"
] | |
db1ad97f218bbfe8114e47d1210c1a9a1bfafd4d | c099611e42319053888a747ea78468224e45a725 | /Polar-slepian/V_20/polarchannelsim_FERvsR_rateless_Det_Iter_delta_300_T8.py | 646a54ffe87882062f4e7a8a464441bd074fcbe9 | [] | no_license | sbsoumya/PolarProject-Code_Res | 118f54593716520c71cdc0e479236ffdc1a94f89 | 12a3b6fb24cf8160a519c74b064fd845066cbe0b | refs/heads/master | 2021-06-27T21:04:41.057937 | 2019-03-22T20:56:44 | 2019-03-22T20:56:44 | 129,615,052 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,799 | py | #-------------------------------------------------------------------------------
# Name: polarchannelsim_FERvsR_rateless_det_Iterretro.py
# Purpose: FER VS R simulation for given msg_length and varying channel
#
# Author: soumya
#
# Created: 19/08/2017
#----------------------------------------
import... | [
"[email protected]"
] | |
40c74d123eff6051b5952100a45abef935eac8db | 62e58c051128baef9452e7e0eb0b5a83367add26 | /x12/4030/894004030.py | 124523df12c7828177f53169e08f00b209133396 | [] | no_license | dougvanhorn/bots-grammars | 2eb6c0a6b5231c14a6faf194b932aa614809076c | 09db18d9d9bd9d92cefbf00f1c0de1c590fe3d0d | refs/heads/master | 2021-05-16T12:55:58.022904 | 2019-05-17T15:22:23 | 2019-05-17T15:22:23 | 105,274,633 | 0 | 0 | null | 2017-09-29T13:21:21 | 2017-09-29T13:21:21 | null | UTF-8 | Python | false | false | 809 | py | from bots.botsconfig import *
from records004030 import recorddefs
syntax = {
'version' : '00403', #version of ISA to send
'functionalgroup' : 'DX',
}
structure = [
{ID: 'ST', MIN: 1, MAX: 1, LEVEL: [
{ID: 'G82', MIN: 1, MAX: 1},
{ID: 'N9', MIN: 0, MAX: 99999},
... | [
"[email protected]"
] | |
5779bcdba227fa41b598888395ca6c6cb372d7fd | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02614/s337550371.py | e941783ee59fd288f4e96377d81f254481c236d0 | [] | 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 | 347 | py | h, w, k = map(int, input().split())
c = []
for _ in range(h):
c.append([c for c in input()])
ans = 0
for i in range(1 << h):
for j in range(1 << w):
cnt = 0
for n in range(h):
for m in range(w):
if i >> n & 1:
continue
if j >> m & 1:
continue
if c[n][m] == '#':
cnt += 1
if cnt =... | [
"[email protected]"
] | |
8513012fbdbf8d8b052ea5fdb992e028c5dec60c | d7016f69993570a1c55974582cda899ff70907ec | /sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_azure_digital_twins_management_client.py | 7be0cc594bb1102a3a5a1b3abda1105fdbb3df76 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | kurtzeborn/azure-sdk-for-python | 51ca636ad26ca51bc0c9e6865332781787e6f882 | b23e71b289c71f179b9cf9b8c75b1922833a542a | refs/heads/main | 2023-03-21T14:19:50.299852 | 2023-02-15T13:30:47 | 2023-02-15T13:30:47 | 157,927,277 | 0 | 0 | MIT | 2022-07-19T08:05:23 | 2018-11-16T22:15:30 | Python | UTF-8 | Python | false | false | 4,798 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"[email protected]"
] | |
2136f5f5f2747cea092dd86d56384971f885788c | 69c33fcad69a2e61cc60209401215530d033e712 | /Python/Python Basics/80.exercise.py | edec7ae40f434231bf7bad65c48644f653a77183 | [] | no_license | KULDEEPMALIKM41/Practices | 7659b895ea959c7df2cdbc79c0b982b36f2bde63 | 193abe262ff281a384aac7895bb66dc39ee6e88d | refs/heads/master | 2023-08-17T11:01:11.694282 | 2021-09-30T08:12:41 | 2021-09-30T08:12:41 | 289,527,102 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 440 | py | #addition list element
l=[5,8,9,10,12,44,12]
print('list is : ',l)
d=0
for element in l:
d+=element
print('list addtion is : ',d)
print()
#print list element
l=[5,8,9,10,12,44,12]
print('list is : ',l)
e=1
for element in l:
print('element no',e, 'is : ',element)
e+=1
print()
#count number of elements in list
l=... | [
"[email protected]"
] | |
fc67686c7d358fe86c73044273f69669abee17fa | b22b0760b29d24cff24eda9d1c114094fd1a588f | /Python/Easy/1. Two Sum.py | 04d0f39a36f83c43424be8c7e9ed2cf68bb3927e | [] | no_license | MridulGangwar/Leetcode-Solutions | bbbaa06058a7b3e7621fc54050e344c06a256080 | d41b1bbd762030733fa271316f19724d43072cd7 | refs/heads/master | 2022-03-07T12:20:33.485573 | 2022-02-21T07:22:38 | 2022-02-21T07:22:38 | 231,700,258 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 358 | py | class Solution(object):
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
dic ={}
for i,num in enumerate(nums):
if target-num in dic:
return[dic[target-num],i]
... | [
"[email protected]"
] | |
926a132b2cac32d3d310cfd5c8940261302a4f1b | 602a4e86499841fbae43d84fc92908c533106aea | /core/actions/photoline.py | c9b5f8cb9eb9948ac8e096ec9914ec904d5370bc | [] | no_license | vden/TsoguNG | b187ccf1bef387417ec73467c51458d6f1443239 | f8d5e7ab9d85559aa163c232c9f28a24a2b7c2a4 | refs/heads/master | 2021-01-02T08:52:03.914218 | 2011-04-26T07:01:57 | 2011-04-26T07:01:57 | 1,663,546 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 863 | py | # -*- coding: utf-8 -*-
from core.portal.register import portalaction
from core.portal.render import render_to_portal
from core.views import get_object_by_url
from core.models import BaseObject
import random
@portalaction(verbose_name=u'Фотокалейдоскоп')
@render_to_portal(template='actions/photogallery.html')
def pho... | [
"[email protected]"
] | |
3b8e9fcc40666e3db7dbe7e7babc3807bb05661f | 8da9c672aeb0a006344a452a817163b9e46c2a1c | /code/components/classifier/wrapper.py | e61f65058e9fda5579c5bec1bd27c308fdf525d0 | [] | no_license | tuandnvn/ttk | 2d200218645dc84df8aebb236381191da1177a8d | 72b57f34f194bbb3049a6f3c879580b8a5755c7f | refs/heads/master | 2021-04-07T07:25:04.780157 | 2018-03-15T00:39:14 | 2018-03-15T00:39:14 | 125,291,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,362 | py | """
Python wrapper around the MaxEnt Classifier
CLASSES
ClassifierWrapper
"""
import os
from ttk_path import TTK_ROOT
from library.tarsqi_constants import CLASSIFIER
from library.timeMLspec import TLINK, EIID, TID
from library.timeMLspec import RELTYPE, EVENT_INSTANCE_ID, TIME_ID
from library.timeMLspec... | [
"[email protected]"
] | |
9edf40ecb62eac81cd943cb16e8c1f28793c615e | f95db72e9a6f0c89f77582eb589e6de625de76c7 | /tools/perf/core/results_processor/processor_unittest.py | 2659fce99be675fd600510596c5e1886e0fa2649 | [
"BSD-3-Clause",
"Zlib",
"LGPL-2.0-or-later",
"MIT",
"LGPL-2.1-only",
"APSL-2.0",
"Apache-2.0",
"LGPL-2.0-only",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Seshpenguin/chromium | ca814257d998676850dd69c86c2dc2892b06aa87 | c2e0382538708b7801254f7a06c6bbe61b9aa65c | refs/heads/master | 2023-03-11T10:50:20.627435 | 2019-11-07T21:06:41 | 2019-11-07T21:06:41 | 220,328,767 | 0 | 0 | BSD-3-Clause | 2019-11-07T21:05:20 | 2019-11-07T21:05:19 | null | UTF-8 | Python | false | false | 5,495 | py | # Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for results_processor methods."""
import datetime
import os
import unittest
import mock
from core.results_processor import processor
from co... | [
"[email protected]"
] | |
624ed4f23273f22a3d0728f4428603fd1d9342bb | 12a72da6848ae461b995ec2fc6c4e1827be82803 | /coin_db/okex_kline_history.py | 97744aeb24e43f8578bebdea12ec2dde40a5950b | [] | no_license | lim1942/coin_helper | f3ed40c07a049a00f052dfa3e59cee7eefe969cf | d34ce363371fd964d8c46d5dd04ca7c5eb7d35b4 | refs/heads/main | 2023-04-30T10:46:03.231440 | 2021-05-25T12:15:49 | 2021-05-25T12:15:49 | 366,247,314 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,314 | py | from coin_db.base import InstrumentIdMysql
from coin_helper.settings import TZ_HOUR
class OkexKlineHistoryMysql(InstrumentIdMysql):
# 插入
insert_fields = ('open','high','low','close','volume','time')
insert_sql = f"""INSERT IGNORE INTO table_name({','.join(insert_fields)}) VALUES({','.join(('%s' for _ in i... | [
"[email protected]"
] | |
676fc4fbab4931a3870271f4f287804749359ed0 | fe33bdb20436a379a17d56b83816d7064cb75d90 | /src/rocon_multimaster/rocon_hub/src/rocon_hub/main.py | f1ce15a41be27d10d3bb1d6af1477ff7a91e47bd | [] | no_license | uml-robotics/catkin_tester | 764744614782acaff46f66f25dbd1650d0fcd5e8 | dfc8bb2026c06d0f97696a726a6773ff8b99496e | refs/heads/master | 2022-10-31T11:48:27.207535 | 2017-11-27T18:09:38 | 2017-11-27T18:09:38 | 111,495,779 | 0 | 1 | null | 2022-10-19T14:49:44 | 2017-11-21T03:45:59 | C | UTF-8 | Python | false | false | 3,280 | py | #!/usr/bin/env python
#
# License: BSD
# https://raw.github.com/robotics-in-concert/rocon_multimaster/license/LICENSE
#
##############################################################################
# Imports
##############################################################################
import sys
# Ros imports
imp... | [
"[email protected]"
] | |
3328d3db51d6fb8039493a5e75180371fc20c187 | b0e93e504bc1e45a4e08b0cbc30a9ada3601b9d2 | /service/routes.py | 94b4842fb7126c21b04b680857e789cd44f302a2 | [
"Apache-2.0"
] | permissive | jarty13/lab-flask-tdd | e54f3212d3804ecb60f5f0227f6fc9c6cb70e2a8 | d943e84a6c2dab6660d55428be56e767fd90bc0f | refs/heads/master | 2023-03-19T07:17:29.934253 | 2021-03-16T01:53:22 | 2021-03-16T01:53:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,059 | py | # Copyright 2016, 2017 John J. Rofrano. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | [
"[email protected]"
] | |
8fcd83d53bbb5a8a442dbd154cdedd48fa015b1d | 4c577d9ddf21d8aba5626343f91a4986266f01e2 | /eric6/.eric6/eric6plugins/vcsGit/Ui_GitRemoteRepositoriesDialog.py | 3dbff99898c2a2d8c6ac8a5b9b713e8915b761c2 | [] | no_license | metamarcdw/.dotfiles | 362199d415ebd7d09247ee0efbda03243aa22faa | 3df0c805225a8d4f2709565d7eda4e07a050c986 | refs/heads/master | 2020-12-30T15:29:25.769345 | 2017-12-22T05:44:01 | 2017-12-22T05:44:01 | 91,143,917 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,412 | py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/cypher/.eric6/eric6plugins/vcsGit/GitRemoteRepositoriesDialog.ui'
#
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_GitRemoteRepos... | [
"[email protected]"
] | |
be0001f3b09da183ee40c5855d5794198269d7db | 7a59728868fc8bc81396f192a78e4dd184fb0201 | /simulation/simulate_ring.py | 65e3f6327a12593e872c4374b92ee1f61030cc9b | [] | no_license | chuan137/upiv-analysis | 1272d3515759bc6792c73fca9a2a13f074177381 | ed1a022a9e5069108fba49bcfd2ec736356a64ee | refs/heads/master | 2021-01-10T13:08:41.838545 | 2016-02-25T11:17:04 | 2016-02-25T11:17:04 | 52,277,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,777 | py | #!/usr/bin/env python
import sys, os
sys.path.insert(0, os.path.realpath('../python'))
import cv
import getopt
import matplotlib.pyplot as plt
import numpy as np
import numpy.random as rand
import tifffile.tifffile as tif
from helper import stats
# {{{ Helper Functions
def snr_ind(snr):
return 20 * np.log(snr) /... | [
"[email protected]"
] | |
8073c023a7861491a0cbcee033584d6d5578e89b | 5618d8b7d6fc2190f070e6fa5e3b423c0480a70d | /03-数组问题/0026-删除排序数组中的重复项.py | 3b2d07ba4456367779ffc8f7b64484a1b1780b7a | [] | no_license | ybm1/LeetCode-Solution-Python | 01d455e8d9305b789646b395e57e1ec50ea7b1b7 | 9b76e7d3d0cebbaa977769f5c41ac1813e3f9f4e | refs/heads/master | 2020-06-19T12:42:55.405557 | 2019-07-13T00:57:28 | 2019-07-13T00:57:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 453 | py | class Solution:
def removeDuplicates(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
size = len(nums)
# 只要有重复的元素覆盖就可以了
if size == 0:
return 0
# 接下来要赋值的那个元素
j = 0
for i in range(1, size):
if nums[i] != nums... | [
"[email protected]"
] | |
fe4307ec8c7c404c7126633d04a8523bb4070eef | d806b109e5b196fe67b07ff88bfa61401a6a7e36 | /wdreconcile/engine.py | 34839d4c3fa19523ec143487c183514802c28cf2 | [
"MIT"
] | permissive | msaby/openrefine-wikidata | 6021ea140770b1e1f8a5ae4013ad34aeddd5bdaf | ee6fad6ebc76e34f1a1113cedcabbf145551afa7 | refs/heads/master | 2021-06-29T23:12:40.466189 | 2017-09-19T09:21:38 | 2017-09-19T09:21:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,501 | py | from config import *
import requests
import itertools
import re
import json
from collections import defaultdict
from .itemstore import ItemStore
from .typematcher import TypeMatcher
from .utils import to_q
from .language import language_fallback
from .propertypath import PropertyFactory
from .wikidatavalue import Item... | [
"[email protected]"
] | |
69e9b2bd7bbdfc17ad9f50426744716f1198ec52 | de6e03e5385a8c502f144283d7cd1d85037ffee7 | /manage.py | 7beea34a6b0c6717b17e118914685d8c90e10485 | [] | no_license | WersonLu/OnlineCourse | 2c90b239be66643fa190294b0c0075d8e481f0c8 | 73b83b01962470db7ca029ce197f6451f51385f4 | refs/heads/master | 2020-03-07T18:21:11.104522 | 2018-04-01T14:20:36 | 2018-04-01T14:20:57 | 127,635,613 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 810 | py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "OnLineCourse.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that... | [
"[email protected]"
] | |
3ae6f30fa3fe13c41d94fe3ebd8e028f058ef13e | 0734fe314483192e630272bb212aa7817d627628 | /parsl/executors/swift_t.py | 752a5a139692958dc61318bba9ffc75fc4691beb | [
"Apache-2.0"
] | permissive | djf604/parsl | 9798f1043a2196d3b538c8683de6d34d57d8f279 | 118af3a52be1811a3355c79a7adadda5ea66afde | refs/heads/master | 2020-12-02T16:27:10.252111 | 2017-06-29T01:47:09 | 2017-06-29T01:47:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,882 | py | ''' Sample Executor for integration with SwiftT.
This follows the model used by `EMEWS <http://www.mcs.anl.gov/~wozniak/papers/Cancer2_2016.pdf>`_
to some extent.
'''
from concurrent.futures import Future
import logging
import uuid
import threading
import queue
import multiprocessing as mp
from ipyparallel.serialize... | [
"[email protected]"
] | |
12361ffd64b16f79d033ac9d96479d6e32771b0f | b4da2201d2df789e28472aeded28720d5269ade5 | /Komodo-Edit-7/lib/mozilla/components/koRubyLanguage.py | 90f5bcb46614b184106069d22e6ae27ba04bb507 | [] | no_license | AeonSaber/first_app | 5ad89d4fb05d7662e2a39ce68176f43f1e618bf0 | 522fdfa6d33419fd49e431766fff85b40d21e78e | refs/heads/master | 2020-06-12T17:22:09.786142 | 2013-09-09T23:57:51 | 2013-09-09T23:57:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 60,669 | py | # ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (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.mozilla.org/MPL/
#
# Soft... | [
"[email protected]"
] | |
f50d4463bf0b30fc4676896b773f4ee663cfafde | e5eec1428da1d24d3e9b86f5723c51cd2ca636cd | /implement/백준/로봇 시뮬레이션.py | 9be5407197c46650cd9bb30b77ca890fafa6f60f | [] | no_license | jamwomsoo/Algorithm_prac | 3c36c381f59277721517d331a8f1640399d80c1d | 8393f3cc2f950214c47f3cf0b2c1271791f115d0 | refs/heads/master | 2023-06-09T06:49:14.739255 | 2021-06-18T06:41:01 | 2021-06-18T06:41:01 | 325,227,295 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,593 | py | import sys
def find_location(num):
global a,b
#print(num)
for y in range(b):
for x in range(a):
# print(board[y][x])
if board[y][x]:
if board[y][x][0] == num:
return y,x
return None
direction = [(0,-1),(1,0),(0,1),(-1,0)]
a,b = map(int,... | [
"[email protected]"
] | |
41f3e4504258bf7eb315ccb9fa76996f1a5dafeb | f42608d292c5784f59d554337e2826d398d8391f | /base_structure/app.py | 6bb1662cfab3f3de20a53e3d3d4606af506412d7 | [
"Unlicense"
] | permissive | thinkAmi-sandbox/werkzeug-sample | e4e0000b0b1ee0c72acc36113b125765b185ce39 | fbf778ba8a83d5c91de1a5baa619087b0ab46199 | refs/heads/master | 2020-03-29T19:45:47.006365 | 2018-10-15T13:41:54 | 2018-10-15T13:41:54 | 150,279,886 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,492 | py | import pathlib
from werkzeug._compat import text_type
from werkzeug.exceptions import abort, InternalServerError
from werkzeug.utils import redirect
from werkzeug.wrappers import Request, Response
from werkzeug.wsgi import SharedDataMiddleware
class MyInternalServerError(InternalServerError):
def get_body(self, ... | [
"[email protected]"
] | |
03da8fde9a8aff510e7b931f33942b88ea3adc4d | 1105414add7c27eb201a0941e5bc86eb2f09378f | /journey5/cputype.py | 1cd845d82e52ffb0bf5afda36aa8b46e72d2220a | [
"MIT"
] | permissive | parrisma/AI-Intuition | d083204267c351bc85c796a79ce43b8ff9d58022 | 3b081696b1d226815e029cbb536fac5e4d3de9a7 | refs/heads/master | 2021-07-25T21:07:11.455443 | 2020-06-06T20:44:17 | 2020-06-06T20:44:17 | 193,102,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 674 | py | from typing import List
from enum import Enum, unique
from copy import deepcopy
@unique
class CPUType(Enum):
GPU = 'GPU'
GENERAL = 'CPU'
BATCH = 'BAT'
def __str__(self):
return self.value
def __add__(self, other):
if isinstance(other, self.__class__):
return self.valu... | [
"[email protected]"
] | |
ec2a61260d952cbdbaf2e4abdfc61955db8ec40e | d138deda43e36f6c79c5e3a9ef1cc62c6a92e881 | /python/paddle/distributed/fleet/data_generator/data_generator.py | 669d2ea24a0c788bbe1c0cff38a843bd96e29016 | [
"Apache-2.0"
] | permissive | seiriosPlus/Paddle | 51afd6f5c85c3ce41dd72953ee659d1539c19f90 | 9602a182b2a4979247c09df1ec283fc39cb4a981 | refs/heads/develop | 2021-08-16T16:05:10.848535 | 2020-12-27T15:15:19 | 2020-12-27T15:15:19 | 123,257,829 | 2 | 0 | Apache-2.0 | 2019-12-10T08:22:01 | 2018-02-28T08:57:42 | C++ | UTF-8 | Python | false | false | 14,586 | py | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
"[email protected]"
] | |
2a68a5ba29718b61fc2e53486891a3f1d861179d | 3a39e879fb2901207afcfc238b169ddefa104055 | /Chapter05/Docs/headercontract/headercontract/settings.py | 88caffbe94df2a4de120cbbaece0608c79c3236a | [] | no_license | Synapses/Web_Scraping_with_Python | cb32ddd468250b9f11ad16d3576d0920693e708c | 3bb8cd47d0e1e182bb8ee800d32e24f45bf13ab0 | refs/heads/master | 2023-03-15T09:19:02.754593 | 2020-06-16T02:17:11 | 2020-06-16T02:17:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,160 | py | # -*- coding: utf-8 -*-
# Scrapy settings for headercontract project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/lates... | [
"[email protected]"
] | |
fd48e51c8eab549b95ed79cc075a60d840f595ef | 65dd982b7791b11b4f6e02b8c46300098d9b5bb3 | /neutron-2014.2.2-gcloud/neutron/db/portqos_db.py | 91e3edb81874a111692dc538727c9926b83a4b00 | [
"Apache-2.0"
] | permissive | xiongmeng1108/openstack_gcloud | 83f58b97e333d86d141493b262d3c2261fd823ac | d5d3e4f8d113a626f3da811b8e48742d35550413 | refs/heads/master | 2021-01-10T01:21:13.911165 | 2016-03-25T08:21:14 | 2016-03-25T08:21:14 | 54,700,934 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,058 | py | __author__ = 'luoyb'
import sqlalchemy as sa
from sqlalchemy import orm
from neutron.api.v2 import attributes
from neutron.db import db_base_plugin_v2
from neutron.db import model_base
from neutron.db import models_v2
from neutron.openstack.common import log as logging
from neutron.extensions import gcloud_qos
LOG =... | [
"[email protected]"
] | |
10445f9a71f13523fca7627d75cae341995b9c9f | 786027545626c24486753351d6e19093b261cd7d | /ghidra9.2.1_pyi/ghidra/feature/vt/gui/util/AbstractVTMatchTableModel.pyi | 9bb8b66ed7016dae1a867a3badabf5b66a85a76a | [
"MIT"
] | permissive | kohnakagawa/ghidra_scripts | 51cede1874ef2b1fed901b802316449b4bf25661 | 5afed1234a7266c0624ec445133280993077c376 | refs/heads/main | 2023-03-25T08:25:16.842142 | 2021-03-18T13:31:40 | 2021-03-18T13:31:40 | 338,577,905 | 14 | 1 | null | null | null | null | UTF-8 | Python | false | false | 60,357 | pyi | from typing import List
import docking.widgets.table
import docking.widgets.table.threaded
import ghidra.docking.settings
import ghidra.feature.vt.api.main
import ghidra.feature.vt.gui.filters
import ghidra.feature.vt.gui.provider.markuptable
import ghidra.feature.vt.gui.provider.matchtable
import ghidra.feature.vt.gui... | [
"[email protected]"
] | |
6bc465b047b317b874564567d86dd750b92a8daf | b1255aedc430b128582d42cabfe675ac3a3321f1 | /src/promnesia/sources/browser.py | 176c05d8a1770d0487733568cf822e8e0b0c8c00 | [
"MIT"
] | permissive | alexriabtsev/promnesia | 855e3b54d3f17b3c9bf7ce985360e8d4f259c5da | 5055198170bdf57135679181d87450a979a05a2b | refs/heads/master | 2022-11-13T04:58:00.565517 | 2020-07-11T19:46:23 | 2020-07-11T19:46:23 | 278,930,706 | 0 | 0 | MIT | 2020-07-11T19:44:18 | 2020-07-11T19:44:17 | null | UTF-8 | Python | false | false | 2,714 | py | import csv
import sqlite3
from datetime import datetime
from subprocess import check_output
from typing import Dict, Iterator, List, NamedTuple, Optional, Set
from urllib.parse import unquote
import pytz
from sqlalchemy import Column, MetaData, Table, create_engine # type: ignore
from ..common import Loc, PathIsh, Vi... | [
"[email protected]"
] | |
26e8ab9c4c3bad31527986883deb13a25f8efdd7 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/216/usersdata/267/113208/submittedfiles/av2_p3_civil.py | ade1f16d5c34a108d034f19287aa5130054916e2 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 747 | py | # -*- coding: utf-8 -*-
import numpy as np
n=int(input('Dimensão do tabuleiro: '))
print()
a=np.zeros((n,n))
x=int(input('Número da linha em que a torre se encontra: '))
if x>n:
while x>n:
x=int(input('VALOR INVÁLIDO. Número da linha em que a torre se encontra: '))
print()
y=int(input('Número da coluna em q... | [
"[email protected]"
] | |
7e1fa4523b5fdefe795f17c9d34f9c193eec062f | 12967293f285decb1568bd56af38b1df4e5c533d | /.eggs/botocore-1.10.9-py2.7.egg/botocore/__init__.py | 71839036f4abf9dc262ff861a79879d59ff94b71 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | martbhell/git-bigstore | 36cd16276379833fbade252a77c73cf3644aa30f | 960e9ea64d4d5646af3ce411adf46f3236b64d7e | refs/heads/master | 2020-05-16T17:51:52.011171 | 2019-03-12T20:54:42 | 2019-03-12T20:54:42 | 183,206,409 | 0 | 0 | Apache-2.0 | 2019-04-24T10:29:48 | 2019-04-24T10:29:47 | null | UTF-8 | Python | false | false | 3,884 | py | # Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/
# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http... | [
"[email protected]"
] | |
b1761ebb3d2a30a0f0fc45062e83e5c7d20d0f93 | f35254b599e251249b460b8edf4303e7009024d4 | /rl/bc_utils/init_tensor.py | b404e044c7d8ad18c4310e3469abb6aa1c58fdc7 | [
"MIT"
] | permissive | bcrafton/icsrl-deep-learning | 7e3a3f970bb8a3331d709d1a841f83bf15e6a39e | e3616982d1dda5f978d61d6591c91cb0da76ab02 | refs/heads/master | 2020-09-14T00:35:47.543984 | 2019-11-22T22:04:33 | 2019-11-22T22:04:33 | 222,955,022 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,101 | py |
import numpy as np
#######################################
def init_matrix(size, init, std=None):
input_size, output_size = size
if init == 'zero':
weights = np.zeros(shape=(input_size, output_size))
elif init == 'sqrt_fan_in':
sqrt_fan_in = np.sqrt(input_size)
weights ... | [
"[email protected]"
] | |
d18d566858011ece3ccc89dce925a0a7d1b87b83 | 4f394592f56b38e3fb1b971b2a10391ca86f4533 | /scripts/Migrate.py | a7f3ffd1af3a6292283a6c710d2c4480f3316f22 | [] | no_license | JKOK005/analytics-ilmuone | aa605868af3d5d9c5dc2b412a88093406ad7a806 | 96c541d68246a38ac7ee1678b6b162fadb727141 | refs/heads/master | 2021-06-25T19:42:33.547603 | 2017-08-18T08:09:23 | 2017-08-18T08:09:23 | 100,269,121 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,091 | py | import os
from Excel import Excel
from ParseExcel import ExcelParser
from GenEnvironDb import DbConnector
if __name__ == "__main__":
parser = ExcelParser(os.path.join("..", "data"))
with DbConnector("environ", "ilumone", "ilumone") as db:
# Migrate countries data
try:
excel = Excel().setFileName("environ.... | [
"[email protected]"
] | |
9d077b206add1d0b332089d9e49a0b4944b8dd09 | e05f8d36c70336a8714cc260c02fe85ecee2e62e | /subject/api/glare/versions.py | fe4ada2edb37be074931d0afc9cbe7347e0b0dee | [
"Apache-2.0"
] | permissive | laoyigrace/subject | eafa442b5d9ebf83c78a01ce3bb5d088d08d620d | e6ed989fdc250917a19788112b22322b73b3550f | refs/heads/master | 2021-01-11T00:06:54.790751 | 2016-10-24T02:13:32 | 2016-10-24T02:13:32 | 70,754,470 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,125 | py | # Copyright 2012 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | [
"[email protected]"
] | |
7cb340dcc964a7393ee90ccb58547d832899668f | c9eddcc8ae129d52ac08e59039a349827d78ac39 | /doc/examples/icatexport.py | fe77037fe58aaba97f51505fed77bc2ca9f69d5a | [
"Apache-2.0"
] | permissive | ahmad-tarbeya/python-icat | 48335cedc256992e811f903616a593aadb45f194 | a54f76551c74eacddffe19f8f217e81cf221d551 | refs/heads/master | 2021-01-20T06:43:09.083208 | 2017-04-25T13:42:46 | 2017-04-25T13:43:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,017 | py | #! /usr/bin/python
#
# Export the content of the ICAT to a file or to stdout.
#
# Use the export feature from ICAT server: make the appropriate call
# to the ICAT RESTful interface to get the ICAT content and store the
# result to a file. Try to keep the command line interface as close
# as possible to the one from ic... | [
"[email protected]"
] | |
fc55aa9acf06aba5562b4ef3ac124136d7ad9207 | 8c07b4bbffac461f3dbdca5102736dded30b073a | /Problem Solving/Algorithms/Implementation/66_matrix_layer_rotation.py | 1987ae2895a6b57663a705210ed810d0ea9a92e4 | [] | no_license | yang4978/Hackerrank_for_Python | c3c36c4d68daadbf694a387abb6f32b7172604a1 | 86db5b6b59d090fccccbe51389c5282217549569 | refs/heads/master | 2020-05-09T20:06:45.181158 | 2019-08-11T15:15:51 | 2019-08-11T15:15:51 | 181,394,625 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,407 | py | #https://www.hackerrank.com/challenges/matrix-rotation-algo/problem
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the matrixRotation function below.
def matrixRotation(matrix, r):
#dict_matrix = {}
rows = len(matrix)
columns = len(matrix[0])
for layer in range(min... | [
"[email protected]"
] | |
9e608dacc9d3ebb72707e372da7d75d249da71d7 | 6ac0bba8c1851e71529269c0d9d89a7c8fa507f2 | /Hard/757.py | 918d72e4e0133cbd93a4a645050b10ebca46e45d | [] | no_license | Hellofafar/Leetcode | e81dc85689cd6f9e6e9756beba070cb11e7b192e | 7a459e9742958e63be8886874904e5ab2489411a | refs/heads/master | 2021-05-16T07:07:19.823953 | 2020-02-17T03:00:09 | 2020-02-17T03:00:09 | 103,690,780 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,856 | py | # ------------------------------
# 757. Set Intersection Size At Least Two
#
# Description:
# An integer interval [a, b] (for integers a < b) is a set of all consecutive integers from a to
# b, including a and b.
#
# Find the minimum size of a set S such that for every integer interval A in intervals, the
# interse... | [
"[email protected]"
] | |
14a0100b2dbcbb01a41c4f7c91fe949ea56cfe56 | 00af09f4ac6f98203910d86c3791c152184ace9a | /Lib/lib2to3/tests/data/fixers/myfixes/fix_last.py | 593b3de7a7c597e50552cc3a14520a059d1b5f8b | [] | no_license | orf53975/CarnosOS | 621d641df02d742a2452fde2f28a28c74b32695a | d06849064e4e9f30ef901ad8cf90960e1bec0805 | refs/heads/master | 2023-03-24T08:06:48.274566 | 2017-01-05T16:41:01 | 2017-01-05T16:41:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 515 | py | <<<<<<< HEAD
<<<<<<< HEAD
from lib2to3.fixer_base import BaseFix
class FixLast(BaseFix):
run_order = 10
def match(self, node): return False
=======
from lib2to3.fixer_base import BaseFix
class FixLast(BaseFix):
run_order = 10
def match(self, node): return False
>>>>>>> b875702c9c06ab5012e52ff43374... | [
"[email protected]"
] | |
8494b13a4ef36e2d314b32d5727effc37baba5a6 | 60d2c390736f5dce1cd0c9d4249a0ab95bdae802 | /worker/domainiq/setup.py | 5bd72d37039fcdf8af6567236e686aac55c84727 | [
"Apache-2.0"
] | permissive | tsmolka/stoq-plugins-public | d996b0be051ce0bac453af7380e7cbfecc03ff93 | a8d3351fe55fc72891c395d6767188746bf381cf | refs/heads/master | 2020-12-28T22:22:15.077514 | 2016-07-13T17:57:43 | 2016-07-13T17:57:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | from setuptools import setup, find_packages
setup(
name="domainiq",
version="0.1",
author="Marcus LaFerrera (@mlaferrera)",
url="https://github.com/PUNCH-Cyber/stoq-plugins-public",
license="Apache License 2.0",
description="Interact with DomainIQ API",
packages=find_packages(),
include... | [
"[email protected]"
] | |
99ee5ca0b9aa7e4965915ebe6fce53773a76ff5f | ddd35c693194aefb9c009fe6b88c52de7fa7c444 | /Live 10.1.18/VCM600/TrackEQComponent.py | 30a2e48aa972041bdf55f9e3dcde94e17de86be0 | [] | no_license | notelba/midi-remote-scripts | 819372d9c22573877c7912091bd8359fdd42585d | e3ec6846470eed7da8a4d4f78562ed49dc00727b | refs/heads/main | 2022-07-30T00:18:33.296376 | 2020-10-04T00:00:12 | 2020-10-04T00:00:12 | 301,003,961 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,076 | py | # uncompyle6 version 3.7.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.8.5 (default, Aug 12 2020, 00:00:00)
# [GCC 10.2.1 20200723 (Red Hat 10.2.1-1)]
# Embedded file name: c:\Jenkins\live\output\Live\win_64_static\Release\python-bundle\MIDI Remote Scripts\VCM600\TrackEQComponent.py
# Compiled at: 2020-0... | [
"[email protected]"
] | |
af36d815d08d1bd4a25f5fd2f1d12947a91bafcb | f2a2f41641eb56a17009294ff100dc9b39cb774b | /current_session/python/423.py | 146f5f4023ad3adead1328140cd197f0a7827274 | [] | no_license | YJL33/LeetCode | 0e837a419d11d44239d1a692140a1468f6a7d9bf | b4da922c4e8406c486760639b71e3ec50283ca43 | refs/heads/master | 2022-08-13T01:46:14.976758 | 2022-07-24T03:59:52 | 2022-07-24T04:11:32 | 52,939,733 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 40,037 | py | import collections
class Solution:
def originalDigits(self, s: str) -> str:
# clarification:
# time/space restrictions?
# is the given string valid?
# upper/lower bound of s?
# idea:
# by observation, some words has unique characters, leverage that
# ... | [
"[email protected]"
] | |
bd32f3a3edb66736241c626c86d60844c4a1a252 | e8ecb520c73c335c9c163e8ce59fa25d3f8b1f1c | /automlToolkit/components/fe_optimizers/fe_optimizer_builder.py | 236f2edc5f8da0b39c76c59c4c83f9324a2d9e75 | [
"MIT"
] | permissive | zwt233/automl-toolkit | d3200a2fd5b01311f33a0e61a7cd6dc7dccbaacc | 67d057f5e0c74bec5b3cbde1440ec014696737ef | refs/heads/master | 2021-05-26T01:18:09.699592 | 2020-04-25T10:48:40 | 2020-04-25T10:48:40 | 253,997,217 | 0 | 0 | MIT | 2020-05-09T10:15:08 | 2020-04-08T05:49:48 | null | UTF-8 | Python | false | false | 1,173 | py | from automlToolkit.components.fe_optimizers.evaluation_based_optimizer import EvaluationBasedOptimizer
from automlToolkit.components.fe_optimizers.multithread_evaluation_based_optimizer import \
MultiThreadEvaluationBasedOptimizer
from automlToolkit.components.fe_optimizers.hyperband_evaluation_based_optimizer impo... | [
"[email protected]"
] | |
a3bca85b9b9b07bbeb59a725e6fa0cb897347e06 | b79837918de72f26558f484a59639bfc8ae3fc1b | /dialogue-engine/src/programy/config/brain/binaries.py | 820afa307915f4ca5836ebee1e096254f040d54f | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | jaygeet/cotoba-agent-oss | d0efcfb3f22271afa32d0ffde04cf9808bbc1368 | 26de67dbda401be5f1d50ae2165e4e1d820882f5 | refs/heads/master | 2022-04-20T14:32:04.790471 | 2020-04-07T02:41:33 | 2020-04-07T02:41:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,135 | py | """
Copyright (c) 2020 COTOBA DESIGN, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distri... | [
"[email protected]"
] | |
e0d5b1aa2a2b2fbd72ecb9606db9c9e16fe10b04 | 0ba671270ae1582b5b0833a2f9a92ad7560e8b07 | /src/atomate2/vasp/jobs/elastic.py | 0258ff16dc053dbaaf2b9466c8849a9690f77746 | [
"LicenseRef-scancode-hdf5",
"BSD-2-Clause",
"LicenseRef-scancode-generic-cla"
] | permissive | JosephMontoya-TRI/atomate2 | b6cb7f816882dbc63c7f451f7ab500b1551eab4a | 02787e213806abcb99601b1046effb02681ed7b4 | refs/heads/main | 2023-06-03T14:58:45.391371 | 2021-06-21T14:34:38 | 2021-06-21T14:34:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,381 | py | """Jobs used in the calculation of elastic tensors."""
from __future__ import annotations
import logging
from dataclasses import dataclass
from pathlib import Path
from typing import List, Optional, Tuple, Union
import numpy as np
from jobflow import Flow, Response, job
from pymatgen.analysis.elasticity import Defor... | [
"[email protected]"
] | |
6145cd5e87a549a0d9c20a7fc5b8a4552157ce2c | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/sieve-big-5513.py | a600187ac21cb207ac946ca0a65c2d0966855a06 | [] | no_license | Virtlink/ccbench-chocopy | c3f7f6af6349aff6503196f727ef89f210a1eac8 | c7efae43bf32696ee2b2ee781bdfe4f7730dec3f | refs/heads/main | 2023-04-07T15:07:12.464038 | 2022-02-03T15:42:39 | 2022-02-03T15:42:39 | 451,969,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 31,756 | py | # A resizable list of integers
class Vector(object):
items: [int] = None
size: int = 0
def __init__(self:"Vector"):
self.items = [0]
# Returns current capacity
def capacity(self:"Vector") -> int:
return len(self.items)
# Increases capacity of vector by one element
def incr... | [
"[email protected]"
] | |
7df101ba9e9e9e6e90edf37196a59fcb939490a1 | 898be346f3fd476f625489ec6e85f97240e32ae5 | /LeetCode1000/LeetCode1446ConsecutiveCharacters.py | e11f5608019bf1f0e9621062e45f4788c7988dee | [] | no_license | lonely7yk/LeetCode_py | e3a0c47f274db8ef3e4540d4d570a874e198dfcd | 67054f724c6c0e1699118248788522cec624b831 | refs/heads/master | 2023-01-10T19:10:13.772069 | 2022-12-29T17:32:50 | 2022-12-29T17:32:50 | 228,568,331 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,045 | py | """
Given a string s, the power of the string is the maximum length of a non-empty substring that
contains only one unique character.
Return the power of the string.
Example 1:
Input: s = "leetcode"
Output: 2
Explanation: The substring "ee" is of length 2 with the character 'e' only.
Example 2:
Input: s = "abbccc... | [
"[email protected]"
] | |
1be8a4e8591cd4ae0bc34100c5c35bc9ccea66d2 | b2bf90c852b6f5258b036dda26edf9b6aa35c4cf | /backend/lizz_2_4_5_dev_19037/urls.py | 4b20ea1f8945360ca166a62d4783ceb901cdce88 | [] | no_license | crowdbotics-apps/lizz-2-4-5-dev-19037 | 1079d95d8ae10b9dd2ff4a4eed0335ce2ca2a9a2 | ae27dc2926763f2c9fd10f9d7a9a3c0426168b84 | refs/heads/master | 2023-02-25T04:54:59.626240 | 2021-02-05T01:32:08 | 2021-02-05T01:32:08 | 336,130,493 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,983 | py | """lizz_2_4_5_dev_19037 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home'... | [
"[email protected]"
] | |
7d4f9fdb9ab6f6463cca8a9564179547b0de0d51 | 83180906386bcb3d0a3062cc575f974c3dc1e0d8 | /tutorials/ACT-R Unit Tutorials/u5_grouped.py | 0bcf370790406f89606c85ddb21c96d0e93a2dbf | [] | no_license | MatthewAKelly/ccmsuite | 8c810ada908e7a957706ca8ebcde9c708f63c0e5 | b1249fcd85fedceb07f67209c368f18c47501cc8 | refs/heads/master | 2020-12-28T21:40:01.070200 | 2018-01-17T22:50:59 | 2018-01-17T22:50:59 | 17,306,060 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,726 | py | import ccm
log=ccm.log()
from ccm.lib.actr import *
class Env(ccm.Model):
result=[]
def say(self,x):
self.result.append(x)
log.x=x
class Grouped(ACTR):
focus=Buffer()
retrieval=Buffer()
memory=Memory(retrieval,threshold=-0.5,latency=1)
noise=DMNoise(memory,0.15)
partial=Partial(... | [
"[email protected]"
] | |
bfba49e38303e77949de411ed0088ac40098eabf | 205f41ac0a04d14c8d7995ee66c1e5043f255a2d | /imagebot/pysix.py | 676861e86b76e1ec92598ccd3284e37ac2742e30 | [
"MIT"
] | permissive | piyushd26/imagebot | c4f6a2ac112ec84c268ce2ffa395648935ecf40e | 113ea3344b54502e11c028c1c4c391f60abe5dfe | refs/heads/master | 2022-12-25T07:02:56.151281 | 2020-10-01T14:13:19 | 2020-10-01T14:13:19 | 300,303,316 | 0 | 0 | MIT | 2020-10-01T14:12:00 | 2020-10-01T14:11:59 | null | UTF-8 | Python | false | false | 370 | py | import logging
import sys
ver = sys.version_info[0]
if ver < 3:
_logLevelNames = logging._levelNames
else:
_logLevelNames = {}
for (k, v) in logging._levelToName.items():
_logLevelNames[v] = k
def err_msg(e):
if ver < 3:
return e.message
else:
return e.msg
if ver < 3:
... | [
"[email protected]"
] | |
d263b08f7c598cd58f9fde23de084f6c4c2f8e7c | 3ca7f62630204be88d2280b9e60b5fecafdd4344 | /Test_task/Task_win.py | 114f518e88c58a9ecbe9231e474cf2110b407184 | [] | no_license | joinmm/Pycharm_python35 | bcee04adfa79da362df5478ac561ad616a1bb828 | eb66901d7936203f70ed2b1811fcd186c690b71f | refs/heads/master | 2022-01-22T05:49:27.725192 | 2018-10-31T06:01:34 | 2018-10-31T06:01:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,544 | py | # -*- coding: utf-8 -*-
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
import sys
import os
import time
import Task
import analysis_cfg_fox
import analysis_cfg_china
#import QDesktopServices
import k_mapping
from CommonUtil import RBCommon as CLASS_COMMON_UTIL
class k_Taskwindow(Ta... | [
"[email protected]"
] | |
20485de31fef16693a9db32635516cddb05a8c2c | 6b6f68f507746e3e39b0e8789af5d044e27d6b0a | /Math/0172_FactorialTrailingZeroes_E.py | 147075d83adb6181237a370b650f93912329e869 | [] | no_license | PFZ86/LeetcodePractice | bb0012d8b3120451dda1745875836278d3362e45 | 6db9db1934bc0a8142124d8b56bf6c07bdf43d79 | refs/heads/master | 2021-08-28T08:43:27.343395 | 2021-08-17T20:38:32 | 2021-08-17T20:38:32 | 230,925,656 | 1 | 1 | null | 2021-08-17T20:38:32 | 2019-12-30T14:01:27 | Python | UTF-8 | Python | false | false | 315 | py | # https://leetcode.com/problems/factorial-trailing-zeroes/
# Solution 1:
class Solution(object):
def trailingZeroes(self, n):
"""
:type n: int
:rtype: int
"""
result = 0
while n:
n /= 5
result += n
return result
| [
"[email protected]"
] | |
e4a95cd7e79a23db19fd4e93a195f3590509cd82 | 7f8f49e77c3d71531688c41e5147c75257a661f6 | /scripts/mpl_stylesheet.py | 83c9301c5800b94fbc18c7a6f8a4e2ab988f1ced | [] | no_license | francosimonetti/trans-eqtl-pipeline | 4ef83e007ee9d4e5aeb8650b30e4684b4150d6e8 | 877b835d832649056cd80cbb7feeedcebebcfb69 | refs/heads/master | 2023-06-19T18:40:55.354166 | 2021-03-02T20:34:29 | 2021-03-02T20:34:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,144 | py | import matplotlib
from matplotlib import cycler
## Resources from:
## https://matplotlib.org/users/customizing.html
## How to change color and plot styles?
## https://matplotlib.org/users/dflt_style_changes.html
## matplotlib.rcParams[] =
def banskt_presentation(black = '#333333', linewidth = 2, ticksize = 8, fonts... | [
"[email protected]"
] | |
dfc4f1546e396f096141ac3c4bee2450af2b669a | acb8e84e3b9c987fcab341f799f41d5a5ec4d587 | /langs/3/g8a.py | 11499735584b852d0a13bce338767c285daba558 | [] | no_license | G4te-Keep3r/HowdyHackers | 46bfad63eafe5ac515da363e1c75fa6f4b9bca32 | fb6d391aaecb60ab5c4650d4ae2ddd599fd85db2 | refs/heads/master | 2020-08-01T12:08:10.782018 | 2016-11-13T20:45:50 | 2016-11-13T20:45:50 | 73,624,224 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 486 | py | import sys
def printFunction(lineRemaining):
if lineRemaining[0] == '"' and lineRemaining[-1] == '"':
if len(lineRemaining) > 2:
#data to print
lineRemaining = lineRemaining[1:-1]
print ' '.join(lineRemaining)
else:
print
def main(fileName):
with open(fileName) as f:
for line in f:
... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.