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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ab6333b26ca5c5e92c98730f02f2f883ba820907 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_frizzing.py | 1ed7c522d5ae15fc66c9c2b646ba67fb89ea4cfa | [
"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 | 235 | py |
from xai.brain.wordbase.verbs._frizz import _FRIZZ
#calss header
class _FRIZZING(_FRIZZ, ):
def __init__(self,):
_FRIZZ.__init__(self)
self.name = "FRIZZING"
self.specie = 'verbs'
self.basic = "frizz"
self.jsondata = {}
| [
"[email protected]"
] | |
b6f490deab8b0d16a1adff8b3c97ecf942ab4482 | 9908dc07233b4025425dc212b5e4acb3b087971e | /Medium/findRedundantConnection.py | c3fd9af33cb44dbda9d4c81e96ae23b61cd0a8ad | [] | no_license | Abdelhamid-bouzid/problem-Sovling- | 15769da71d19186947607574860462ad81f34e40 | fa0eecab8a94d1ad20b5aa129973f59eddd5678d | refs/heads/main | 2023-08-27T21:49:32.337979 | 2021-10-23T21:57:55 | 2021-10-23T21:57:55 | 317,097,388 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 646 | py | class Solution:
def findRedundantConnection(self, edges: List[List[int]]) -> List[int]:
self.g = collections.defaultdict(list)
for u,v in edges:
self.g[u].append(v)
self.g[v].append(u)
for u,v in edges[::-1]:
self.vis=set()
self.dfs(1,... | [
"[email protected]"
] | |
a9fa1f05a49145676d8d384b3c7e7cc8f4b16897 | 33836016ea99776d31f7ad8f2140c39f7b43b5fe | /fip_collab/2016_09_26_polycrystal_FIP_allpoint/plot_evd.py | d523d88b853904fc3267a94e0c6fc19be735c236 | [] | no_license | earthexploration/MKS-Experimentation | 92a2aea83e041bfe741048d662d28ff593077551 | 9b9ff3b468767b235e7c4884b0ed56c127328a5f | refs/heads/master | 2023-03-17T23:11:11.313693 | 2017-04-24T19:24:35 | 2017-04-24T19:24:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,689 | py | # -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from constants import const
import h5py
import sys
def pltevd(H):
C = const()
"""define the colors of interest"""
n_col = len(C['sid'])
colormat = cm.rainbow(np.linspace(0, 1, n_col))
f_reg = h... | [
"[email protected]"
] | |
168a1a3ba4c092e59778ca8c0e121f8af2cbdb0f | b6af5ed67f758dace85c9cec2091c36d769e5668 | /build/handsnet_time/catkin_generated/installspace/tactile_image_publisher_5.py | 34897b9675238a073264ba477e450f23797c3517 | [
"MIT"
] | permissive | robertokcanale/ros_workspace_handsnet | 897920d6ef30554556449085816d2e8ffb096721 | 09672bf2b4c54d0064f339005dc5eb3ac4f9d80d | refs/heads/main | 2023-04-10T06:50:12.652997 | 2021-04-12T12:08:41 | 2021-04-12T12:08:41 | 353,714,029 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,782 | py | #!/usr/bin/env python3
import rospy
#import tensorflow as tf
from PIL import Image
from sensor_msgs.msg import Image as TactileImage
from handsnet_time.msg import Image_array
import numpy as np
#I can make a message of this type
#sensor_msgs/Image[] data
if __name__ == '__main__':
pub = rospy.Publisher('tactile_... | [
"[email protected]"
] | |
e6ff765e39660197728176631c129a6e521196c7 | ce4f7f8e9336b8bbf9cbfe147d922e37034ab6c3 | /old/past1_E.py | e538f70ef5be64f085af47fec1d7b8236ac36a41 | [] | no_license | kussy-tessy/atcoder | 5604919747242ee9740b9131bb6e168e96af0151 | ee917fa5a5218d4a9e72f710d0d844e7c203f13b | refs/heads/master | 2023-07-21T09:25:15.464881 | 2021-09-04T14:06:02 | 2021-09-04T14:06:02 | 311,221,203 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 960 | py | # print('input >>')
N, Q = map(int,(input().split()))
follows = [[0] * N for _ in range(N)]
logs = []
for _ in range(Q):
logs.append(input())
for log in logs:
log_info = log.split()
person = int(log_info[1])-1
if log_info[0] == '1':
follows[person][int(log_info[2])-1] = 1
... | [
"[email protected]"
] | |
080b3808ad65aeadf62c0f3a420f7f9a286b309d | 7a4da5ec2196bf975a9e6115846244788b36b952 | /3.7.0/lldb-3.7.0.src/test/python_api/frame/inlines/TestInlinedFrame.py | 217b87e892696f5a9f974f714461cd306ed5a293 | [
"NCSA",
"MIT"
] | permissive | androm3da/clang_sles | ca4ada2ec85d625c65818ca9b60dcf1bc27f0756 | 2ba6d0711546ad681883c42dfb8661b842806695 | refs/heads/master | 2021-01-10T13:50:25.353394 | 2016-03-31T21:38:29 | 2016-03-31T21:38:29 | 44,787,977 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,812 | py | """
Testlldb Python SBFrame APIs IsInlined() and GetFunctionName().
"""
import os, time
import re
import unittest2
import lldb, lldbutil
from lldbtest import *
class InlinedFrameAPITestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipUnlessDarwin
@python_api_test
@dsym_test
def test... | [
"[email protected]"
] | |
b83962f8d926061997321482969175d3eafd8d1a | 4e5d3c743db5318c9a5e30823adedd1066b52350 | /payntera/version.py | abadaefae0c99b255acfb15361bd5d30f4c32405 | [] | no_license | saalfeldlab/payntera | 2c68d24da46f45d3261cb2f9451bdfcb6c7866e6 | d7111f318c1b1db8c8f9d4bb3e2fb8919cc9048e | refs/heads/master | 2020-03-23T00:55:42.380542 | 2019-10-02T20:07:12 | 2019-10-02T20:07:15 | 140,892,566 | 1 | 1 | null | 2018-11-13T13:54:05 | 2018-07-13T21:00:17 | Python | UTF-8 | Python | false | false | 23 | py | __version__ = '0.20.1'
| [
"[email protected]"
] | |
6fc9e4a1b64d40596d776205e98565fd67ee4d27 | acb8e84e3b9c987fcab341f799f41d5a5ec4d587 | /langs/6/nOU.py | 6c27926aad7723e383583892ecc75bdfa6a62613 | [] | 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]"
] | |
e489b80b813521f9e69b3f3c43c39d02cdba43cf | c526d2f3e457b1b25d5f2cb5bda914236e6c265b | /candidates/urls.py | 5c8fb469cc8b566cb76f30f605fdaab774b81d78 | [
"CC0-1.0"
] | permissive | yhsiang/twly-voter-guide | 99e2269da57a21b5779ec3defd9c7e23c7668f64 | ae87c9f9b9f053f79a12f04afe0d60f227dc68c1 | refs/heads/master | 2020-12-31T02:42:01.568168 | 2015-03-21T13:24:55 | 2015-03-21T13:24:55 | 33,117,399 | 0 | 0 | null | 2015-03-30T10:42:56 | 2015-03-30T10:42:56 | null | UTF-8 | Python | false | false | 536 | py | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from candidates import views
urlpatterns = patterns('',
url(r'^$', views.counties, {"ad": 8}),
url(r'^(?P<ad>\d+)/(?P<county>\S+)/(?P<constituency>\d+)/$', views.district, name='district'),
url(r'^(?P<ad>\d+)/(?P<county>\S+)/$', views.distr... | [
"[email protected]"
] | |
58e9f9212ed8b1ac0ced1beb80a3a50936a3d03e | eb3683f9127befb9ef96d8eb801206cf7b84d6a7 | /stypy/sgmc/sgmc_cache/site_packages/numpy/fft/info.py | 98e7d88d37cdf14381335db9fead5f63b6dd4bbf | [] | no_license | ComputationalReflection/stypy | 61ec27333a12f76ac055d13f8969d3e0de172f88 | be66ae846c82ac40ba7b48f9880d6e3990681a5b | refs/heads/master | 2021-05-13T18:24:29.005894 | 2018-06-14T15:42:50 | 2018-06-14T15:42:50 | 116,855,812 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,813 | py |
# -*- coding: utf-8 -*-
"""
ORIGINAL PROGRAM SOURCE CODE:
1: '''
2: Discrete Fourier Transform (:mod:`numpy.fft`)
3: =============================================
4:
5: .. currentmodule:: numpy.fft
6:
7: Standard FFTs
8: -------------
9:
10: .. autosummary::
11: :toctree: generated/
12:
13: fft Discre... | [
"[email protected]"
] | |
c76e0a8da89cff2174d9900d2b2d795ccf522914 | be50b4dd0b5b8c3813b8c3158332b1154fe8fe62 | /Math/Python/SortedPermutationRank.py | 28c0906d6624cf1570338c7b46d6235b336d4950 | [] | no_license | Zimmermann25/InterviewBit | a8d89e090068d9644e28085625963c8ce75d3dff | 6d2138e740bd5ba8eab992d9bf090977e077bfc5 | refs/heads/main | 2023-03-24T18:12:48.244950 | 2021-03-24T14:36:48 | 2021-03-24T14:36:48 | 350,835,917 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,274 | py | class Solution:
import math
# @param A : string
# @return an integer
def findRank(self, A):
if len(A) < 1:return 0
if len(A) ==1:return 1
counter = 0
# False oznacza,ze ta litera nie zostala jeszcze wykorzystana
charArr = [[A[i], False] for i in... | [
"[email protected]"
] | |
45c93dfe5019d6bc09fc9cd7499e5990d2691491 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02821/s486815367.py | c6e104ff5932a2b1ed2561cc6e8d0125a064d8c4 | [] | 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 | 983 | py | import sys
from bisect import bisect_left,bisect_right
sys.setrecursionlimit(10**9)
INF=10**18
def input():
return sys.stdin.readline().rstrip()
def main():
N,M=map(int,input().split())
A=sorted(list(map(int,input().split())))
S=[0]*(N+1)
for i in range(N):
S[i+1]=S[i]+A[i]
def nibutan(... | [
"[email protected]"
] | |
0d07714134ac6449e78e4d248375b431f66f16e0 | 16047f965a69893a8cd2c8d18fbd7b9c86a07eb3 | /src/kubernetes/client/models/v1_quobyte_volume_source.py | 52fef80de7b4ac6de368f6c4785f8c2a3414d71f | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | guctum/aws-kube-codesuite | 9ce2cc02fe5fa15c2e175fb697138014fb162f1e | 5d62beaadc13bec745ac7d2fc18f07805e91cef3 | refs/heads/master | 2021-05-24T10:08:00.651840 | 2020-04-23T20:21:46 | 2020-04-23T20:21:46 | 253,511,083 | 0 | 0 | Apache-2.0 | 2020-04-06T13:48:14 | 2020-04-06T13:48:13 | null | UTF-8 | Python | false | false | 6,587 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.7.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | [
"[email protected]"
] | |
a7f5239914d25e60fde6bf4ad74825ca1a302698 | 360ae1188ad79e71ccc72da0b9ae709bda678f91 | /ryu/lib/xflow/netflow.py | f41a9f57341ddbaf6c3a1e32928888653be34be0 | [
"Apache-2.0"
] | permissive | faucetsdn/ryu | 47b3523e7ccb381f3bdf2877a3f9f01cb1876054 | d6cda4f427ff8de82b94c58aa826824a106014c2 | refs/heads/master | 2023-09-05T06:37:21.991029 | 2022-06-09T23:09:40 | 2022-06-09T23:09:40 | 2,945,007 | 385 | 215 | Apache-2.0 | 2022-11-13T10:50:25 | 2011-12-09T03:43:50 | Python | UTF-8 | Python | false | false | 4,009 | py | # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
#
# 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]"
] | |
acfaee88fd5930d05e23e2b881fb591112e14a8a | abaa004b41f63aa489be12a6e4be8f92ef2ef6d3 | /mcred/mcred/wsgi.py | 26961adf6a84faf2e27608df4342bc50a52c5ba2 | [] | no_license | vshaladhav97/django_practise_projects | 30dcc8dd909626c1d624d9c5895fc90ad55c79d0 | 83455c50e2ee910f03db47fbe1420d1cbd7eb292 | refs/heads/master | 2023-03-28T14:08:08.244694 | 2021-03-26T03:56:56 | 2021-03-26T03:56:56 | 351,655,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | """
WSGI config for mcred project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTING... | [
"[email protected]"
] | |
22c15be1586d632b333fa96826a4638948b75d8e | 8a102033a266d39128e4b64aa0780cf67055e196 | /15552.py | 0bfab577f1d44f67f2be860eabace0e46000ab0d | [] | no_license | yuseungwoo/baekjoon | 4dec0798b8689b9378121b9d178713c9cf14a53f | 099031e2c4401e27edcdc05bd6c9e6a558b09bb9 | refs/heads/master | 2020-09-03T15:25:40.764723 | 2018-10-08T02:35:27 | 2018-10-08T02:35:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 269 | py | # coding-utf-8
import sys
count = sys.stdin.readline().rstrip()
count = int(count)
for _ in range(count):
numbers = sys.stdin.readline().rstrip().split()
number = sum(list(map(int, numbers)))
number = str(number) + '\n'
sys.stdout.write(number)
| [
"[email protected]"
] | |
92f1518267d637703c7a7e2205d182907358658a | a35d07b11f013a26901942f730d4b720f4e27355 | /warmup1/near_hundred.py | 5cb06a22dcabd67a5cd1a9ba4cf2f360c62fd633 | [] | no_license | PMiskew/codingbat_solutions_python | 7cbbf293fb6b230e274a8cee373a2222a5a27e8d | 6e62fd0080c2a9bcd59fd4f803cc7966a2cb88d1 | refs/heads/master | 2022-11-13T13:24:53.078833 | 2020-07-14T18:38:06 | 2020-07-14T18:38:06 | 255,197,455 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 839 | py | '''
QUESTION:
Given an int n, return True if it is within 10 of 100 or 200. Note: abs(num) computes the absolute value of a number.
near_hundred(93) → True
near_hundred(90) → True
near_hundred(89) → False
'''
def near_hundred(n):
#Approach 1:
'''
if (n < 100):
if 100 - n <= 10:
return True
... | [
"[email protected]"
] | |
37cb5f11bdcd8f63dd000d2f706336c3c37ee0ec | 64bf39b96a014b5d3f69b3311430185c64a7ff0e | /intro-ansible/venv3/lib/python3.8/site-packages/ansible_collections/sensu/sensu_go/tests/unit/modules/test_role_binding_info.py | 6dc780d18f9e93a04704512448a963a692889b1f | [
"GPL-3.0-only",
"MIT"
] | permissive | SimonFangCisco/dne-dna-code | 7072eba7da0389e37507b7a2aa5f7d0c0735a220 | 2ea7d4f00212f502bc684ac257371ada73da1ca9 | refs/heads/master | 2023-03-10T23:10:31.392558 | 2021-02-25T15:04:36 | 2021-02-25T15:04:36 | 342,274,373 | 0 | 0 | MIT | 2021-02-25T14:39:22 | 2021-02-25T14:39:22 | null | UTF-8 | Python | false | false | 1,977 | py | from __future__ import absolute_import, division, print_function
__metaclass__ = type
import pytest
from ansible_collections.sensu.sensu_go.plugins.module_utils import (
errors, utils,
)
from ansible_collections.sensu.sensu_go.plugins.modules import role_binding_info
from .common.utils import (
AnsibleExitJs... | [
"[email protected]"
] | |
8c0b7a66053ff8a78c350d3e918291d75673b78a | b11d97bf5731bf6faeef14814292d1aff6866e3a | /seq2annotation/server/tensorflow_inference.py | 9d6ce6042c4c74192440f99d7b707623aee40e82 | [
"Apache-2.0"
] | permissive | tyc1922/seq2annotation | 2e2193aff1281242c2b66da8cbe27571e2c7f3fc | c161099570be544881c14105f4392d764d6d8247 | refs/heads/master | 2022-04-21T19:14:03.117606 | 2020-04-25T09:24:02 | 2020-04-25T09:24:02 | 259,069,353 | 1 | 0 | Apache-2.0 | 2020-04-26T15:46:48 | 2020-04-26T15:46:48 | null | UTF-8 | Python | false | false | 2,370 | py | from typing import List
import keras
from tokenizer_tools.tagset.NER.BILUO import BILUOSequenceEncoderDecoder
from tokenizer_tools.tagset.offset.sequence import Sequence
from tensorflow.contrib import predictor
from tokenizer_tools.tagset.exceptions import TagSetDecodeError
decoder = BILUOSequenceEncoderDecoder()
... | [
"[email protected]"
] | |
90060297c37f8438877900ed28743d74da252c12 | 70e77b4e49fa1be07a89aa9370aa8069f4dd17cc | /imb_manager/asgi.py | d88f76b423017178dd9fba08e2652cdcf0103e46 | [] | no_license | rosoba/imb_manager | 7a542da0fb032839dcabd3a7d9073f69616cfaeb | 13f277cb5170ef17deebb2e4305c99f73421e2a2 | refs/heads/master | 2023-01-31T04:16:56.526477 | 2020-12-12T14:52:03 | 2020-12-12T14:52:03 | 320,850,276 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | """
ASGI config for imb_manager 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_S... | [
"[email protected]"
] | |
b1ad6df8c1fd9c67554b4f8f8f19ab2cc90e7283 | 5dd190725aaaeb7287d935b3c99c20480b208816 | /official/vision/keras_cv/metrics/iou.py | b6391a61c7d3cbf38407a26b17b068ba77b3fb66 | [
"Apache-2.0",
"MIT"
] | permissive | DemonDamon/mask-detection-based-on-tf2odapi | 32d947164fb54395b9e45368c0d4bcf3a6ea1c28 | 192ae544169c1230c21141c033800aa1bd94e9b6 | refs/heads/main | 2023-05-13T05:05:44.534885 | 2021-06-08T05:56:09 | 2021-06-08T05:56:09 | 369,463,131 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,723 | py | # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | [
"[email protected]"
] | |
3262a9aae0eca54f26f482a58a5c1b4c27d466ef | f39439548beba34b26f2e0cb40d9bcdfc5c85c71 | /runtag/bootcamp.py | ee077f8e2a9e0ac5ddee6ac10f77e65dfb76a5a6 | [] | no_license | willook/ape-x2 | 0a7b813c59efc572b3a5b0c3b63d738bbec2a8e1 | b299e75d20746f4d83ee7227fad9d8d3ef21a192 | refs/heads/master | 2023-02-21T15:41:27.241782 | 2021-01-21T06:37:01 | 2021-01-21T06:37:01 | 331,537,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 404 | py | from .entities import Commander, Subordinate, Squad
class Bootcamp:
def __init__(self, grid):
self.grid = grid
def recruit(self, name, number_of_subordinates=1):
squad = Squad(self.grid, name)
squad.assign(Commander(self.grid))
for index in range(number_of_subordinates):
... | [
"[email protected]"
] | |
045edd1c218f527ab6ff454da5507798a547fdd8 | 32cb84dd41e4be24c065bb205f226f9b121a6db2 | /cconf/migrations/0001_initial.py | f89cbce98d36e32d7722b4cebcb2e3294a10711b | [] | no_license | InformatykaNaStart/staszic-sio2 | b38fda84bd8908472edb2097774838ceed08fcfa | 60a127e687ef8216d2ba53f9f03cfaa201c59e26 | refs/heads/master | 2022-06-29T11:09:28.765166 | 2022-06-13T21:56:19 | 2022-06-13T21:56:19 | 115,637,960 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,221 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2019-10-05 08:58
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('contests', '0005_submission_auto_rejudg... | [
"[email protected]"
] | |
de0b0b059a80c07749a16ea129918524290a5f28 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_3/David.Liu/q3.py | a26e4881ffe0696d7c67a6a0d0631ed73764fc4d | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 866 | py | import math
n=32
x=500
outf=open("q3large.out","w")
def factor(num):
r=500
for i in range(2, r):
if num%i==0:
return i
return -1
def makelist(n):
lst=[]
l=len(n)
for i in range(2, 11):
num=0
for j in range(0, l):
num+=int(n[j]... | [
"[[email protected]]"
] | |
4a1758e7ca32cd345aa0c5b376f92a5dc0a0b52f | 7996d7fefe2d3e5b4d53df4376d6fd8908407a1a | /authentication/urls.py | 139def747c67ed7664c5e93050e1419ada49d7e8 | [] | no_license | Imraj423/twitterclone | 2aa1446ef6e5dec6548f26c6254d478a696970ec | 0c3dfab5436de9095248305d3994dc77549e0b1e | refs/heads/master | 2021-01-15T02:07:06.684002 | 2020-04-04T23:47:39 | 2020-04-04T23:47:39 | 242,843,822 | 0 | 0 | null | 2020-03-07T04:02:21 | 2020-02-24T21:08:23 | Python | UTF-8 | Python | false | false | 229 | py | from django.urls import path
from . import views
urlpatterns = [
path('signup/', views.signup, name='signup'),
path('login/', views.login_view, name='login'),
path('logout/', views.logoutUser, name='logout'),
]
| [
"[email protected]"
] | |
5ed6ab127cba5918dd12490bf579baafac9dc250 | 1fa262359f91768f1b98c45944fd4a63645f4567 | /variable_examples.py | 03bd0c75fcb7f7afb46ffb09f440a337d5d26ae4 | [] | no_license | feleHaile/20190225KAPL | d1a95dd6632ba83b6cd3380d92e2a2a18a5a4942 | 3957c1d738cc3e42d5dac0fb4a6f6071a1bb391a | refs/heads/master | 2020-05-15T22:31:51.881632 | 2019-02-28T20:11:29 | 2019-02-28T20:11:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 278 | py | #!/usr/bin/env python
x = 5
print(x)
y = x
things = [1, 2, 3]
t = things
print(t)
t.append(42)
print(things)
print(t is things)
print(id(t), id(things))
print(type(x), type(t), type(type), type('spam'))
t = 42
print(type(t))
t = "amazon"
print(type(t))
m = None
print(m)
| [
"[email protected]"
] | |
a8cfde36a731a0cfeb460159e2cc73d43db7c46e | 101d866f8e2f84dc8f76181341180c13b38e0ecf | /case/Demo/test_global_init.py | 96c3320be20e782b490bbf14bbb0cf12cef8b2c5 | [] | no_license | cming091/autotest | 1d9a6f5f750c04b043a6bc45efa423f2e730b3aa | 0f6fe31a27de9bcf0697c28574b97555fe36d1e1 | refs/heads/master | 2023-06-02T18:22:24.971786 | 2021-06-21T08:52:47 | 2021-06-21T08:52:47 | 378,858,969 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 659 | py | # coding=utf-8
import pytest
import allure
from case.base import TestBase
@allure.feature('测试初始化全局数据')
@allure.link(url="https://pages/viewpage.action?pageId=84191585", name="测试用例")
@pytest.mark.usefixtures("init_module_data")
@pytest.mark.usefixtures("init_global_data")
class TestGlobalDataInit(TestBase):
"""te... | [
"[email protected]"
] | |
54439c245d7fae5f35ec6680b74a2d298e21bec7 | 38422c3edeb269926502fed31a0761aff8dd3d3b | /Zeiss_spectrometer/Zeiss_spectrometer_Python3_v191002/Calib_Zeiss_spectrometer_GUI_v5.py | a35fdd8d0e04f888df7c292ff847d4857b865b8a | [] | no_license | vfurtula/Alle-projekter | 2dab3ccbf7ddb6be3ee09f9f5e87085f354dd84a | da3d7c9611088043e2aea5d844f1ae6056215e04 | refs/heads/master | 2022-06-07T05:17:35.327228 | 2020-04-30T10:28:48 | 2020-04-30T10:28:48 | 260,180,957 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 47,654 | py | import os, sys, imp, serial, time, numpy
import scipy.interpolate
#from numpy.polynomial import polynomial as P
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui
import pyqtgraph.exporters
#from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import QThread, QTimer, SIGNAL
import config_zeiss, ZaberXmcb_ascii
... | [
"[email protected]"
] | |
eb5b33dc0fc012d521bf71c982068b71534887b6 | a6e4a6f0a73d24a6ba957277899adbd9b84bd594 | /sdk/python/pulumi_azure_native/sql/get_database_vulnerability_assessment.py | a6aa84ede40a8f73706d9941a81575ccf9b1a66e | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | MisinformedDNA/pulumi-azure-native | 9cbd75306e9c8f92abc25be3f73c113cb93865e9 | de974fd984f7e98649951dbe80b4fc0603d03356 | refs/heads/master | 2023-03-24T22:02:03.842935 | 2021-03-08T21:16:19 | 2021-03-08T21:16:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,722 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from ... | [
"[email protected]"
] | |
79db5f1c36777c88d7fa3bc39575c57b377af1e3 | 81d2815060bdf51e59f40366df72954ad28b2398 | /4th_hw/fourth_homework/settings.py | fd3cb961f456cae77e2fd2c6099a1d6763910875 | [] | no_license | ningpop/LikeLion_7th_HW | 6016604427e335250f2e3daeec27f17731612b47 | b2c65a0b7a9a928a45cf07b67cd9ed18fb86d799 | refs/heads/master | 2020-06-30T18:08:54.024617 | 2019-12-30T16:17:03 | 2019-12-30T16:17:03 | 200,902,655 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,613 | py | """
Django settings for fourth_homework project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import... | [
"[email protected]"
] | |
048c333f5f321f508763e1bc3d96c4ec5a465231 | 3bddb2814881bb5e4679de3d31ac0bde57b86148 | /trax/data/tokenizer.py | 64081f4da0735026efb1c20851a2a900e708ad02 | [
"Apache-2.0"
] | permissive | google/trax | 7a2b1a83eb8848136a5f5e07988efcef2f0b704f | 1bb3b89427f669f2f0ec84633952e21b68964a23 | refs/heads/master | 2023-08-30T22:36:09.651644 | 2023-03-29T01:14:20 | 2023-03-29T01:15:47 | 213,020,264 | 8,180 | 917 | Apache-2.0 | 2023-08-29T14:30:03 | 2019-10-05T15:09:14 | Python | UTF-8 | Python | false | false | 5,810 | py | # coding=utf-8
# Copyright 2022 The Trax 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 a... | [
"[email protected]"
] | |
b64ec8ccaf0a47dd9f85266b92faf3122e5e57ff | 6896fce8ee082f9730c056436e49ef0d16a6ea03 | /exception/exceptions.py | cbec08fae3c703e147a7daef31cd584579c057d3 | [] | no_license | Sugeei/python-practice | 5022ae7c34bc04972edebc15936248cb9869ec54 | 048df40500a059e4380f3ecc2581de96c9a1fc9b | refs/heads/master | 2022-12-07T06:34:40.740379 | 2022-11-13T11:48:29 | 2022-11-13T11:48:29 | 121,074,877 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 854 | py | from bs4 import BeautifulSoup
ERROR_MAP = {
"200000": "invalid input parameter",
"500000": "load data error",
"600000": "dump data error",
"700000": "data verify error",
"800000": "algorithm error"
}
class UranusError(Exception):
def __init__(self, error_code=None, message=''):
Except... | [
"[email protected]"
] | |
b6ecbef1faf3aab95571a56f1eaf1dece622f4c0 | 5ec06dab1409d790496ce082dacb321392b32fe9 | /clients/python/generated/test/test_org_apache_sling_distribution_monitor_distribution_queue_health_check_properties.py | 78c34d346fd02e2be860bd78e70e6726077ba3fc | [
"Apache-2.0"
] | permissive | shinesolutions/swagger-aem-osgi | e9d2385f44bee70e5bbdc0d577e99a9f2525266f | c2f6e076971d2592c1cbd3f70695c679e807396b | refs/heads/master | 2022-10-29T13:07:40.422092 | 2021-04-09T07:46:03 | 2021-04-09T07:46:03 | 190,217,155 | 3 | 3 | Apache-2.0 | 2022-10-05T03:26:20 | 2019-06-04T14:23:28 | null | UTF-8 | Python | false | false | 1,475 | py | # coding: utf-8
"""
Adobe Experience Manager OSGI config (AEM) API
Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API # noqa: E501
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-... | [
"[email protected]"
] | |
57145b59e685e5f01020f461aa0f8d6d30d4aaa9 | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/coverage-big-2414.py | 3053991009fd4d98c0485cb6eb9c680b4184c3a6 | [] | 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 | 13,337 | py | count:int = 0
count2:int = 0
count3:int = 0
count4:int = 0
count5:int = 0
def foo(s: str) -> int:
return len(s)
def foo2(s: str, s2: str) -> int:
return len(s)
def foo3(s: str, s2: str, s3: str) -> int:
return len(s)
def foo4(s: str, s2: str, s3: str, s4: str) -> int:
return len(s)
def foo5(s: str,... | [
"[email protected]"
] | |
7b4ea0f4ff1d23cb5acb9a1696155e58d41a06ed | deb3c16ef887b6c496b8c920809d79b9f73aa2fe | /libs/telewizjaonline.py | 3ff44fd184c1e68bbc06dccfa2babf9394c94358 | [] | no_license | Yaser7440/cmdline_iptvplayer | 1ea35f4fd36c708176a43d402a49342c4cf723a5 | 4e287021d86cab8d6525262b647d144c6141d6b1 | refs/heads/master | 2021-01-24T10:49:29.278730 | 2016-09-21T09:24:26 | 2016-09-21T09:24:26 | null | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 4,018 | py | # -*- coding: utf-8 -*-
###################################################
# LOCAL import
###################################################
from Plugins.Extensions.IPTVPlayer.dToolsSet.iptvplayerinit import TranslateTXT as _
from Plugins.Extensions.IPTVPlayer.dToolsSet.iptvtools import printDBG, printExc, GetCookieD... | [
"[email protected]"
] | |
85276507b54d3f216c070a9c8873c8ff120d8120 | 72a8181e5502128fec62b132fbe19cd9d50dab4c | /rules/plot.smk | 28df3be0b7d220ab200f373be5f95348d4b02f2c | [] | no_license | EthanHolleman/DRIP-AGS-ENCODE | 1fd3b7065ec7f47e783674df14955a7b655edc08 | e3bb63b6d1cae82ddc6fe8857a1e66e2f41b2781 | refs/heads/main | 2023-04-03T21:07:34.651467 | 2021-04-23T02:42:18 | 2021-04-23T02:42:18 | 360,375,206 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 324 | smk |
rule make_feature_intersection_plot:
conda:
'../envs/R.yml'
input:
'output/intersect/all_samples_concat.intersection.bed'
output:
'output/plots/feature_intersection_plot.png'
shell:'''
mkdir -p output/plots
Rscript scripts/plot_encode_intersections.R {input} {output}
... | [
"[email protected]"
] | |
0b2bc07bfe47ebc246deec181f61d7fa55a65b8f | e8d5471bd4a47794d66162060343f740e0febca4 | /server/src/uds/auths/RegexLdap/__init__.py | 4065f8086cf40c30d7e64bfeaa397d4232fd9e6e | [] | no_license | git38438/openuds | ef939c2196d6877e00e92416609335d57dd1bd55 | 7d66d92f85f01ad1ffd549304672dd31008ecc12 | refs/heads/master | 2020-06-22T14:07:33.227703 | 2019-07-18T11:03:56 | 2019-07-18T11:03:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,687 | py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2012 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
#... | [
"[email protected]"
] | |
1af643695b4192619ffcd424991f063d051f610c | 6cac02f4df495f1acec3fde64335aa4881230cba | /tutorials/foo-tutorial/foo/foo.py | c828d610c07b3232e3f034ebfbced761d19fd565 | [] | no_license | ivannz/pkg_deploy_repo_renamed | 96610728c097f0bb77a047b09681bb1d5fe6ffc3 | 9ce24ffcc5db6235dd3946f8a63123c3955ea957 | refs/heads/master | 2020-07-16T17:28:59.668633 | 2019-09-03T07:08:29 | 2019-09-03T07:08:29 | 205,832,544 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | def this():
from this import s
d = {}
for c in (65, 97):
for i in range(26):
d[chr(i + c)] = chr((i + 13) % 26 + c)
return "".join(d.get(c, c) for c in s)
| [
"[email protected]"
] | |
2a21ac1ec7913bc31720e0eb686e858987acfe58 | 75117becf9f75122e60cd806599ae24c16065689 | /python_models8/neuron/builds/IF_curr_exp_i.py | 307db7fb5aee6fefae5f3e8176e659b1466f3901 | [] | no_license | chanokin/sPyNNaker8NewModelTemplate | d911443fa650a4016828341fd252ddb2d7bad313 | 2d64f34ed5a8f5312a3176792bee57339785c5ea | refs/heads/master | 2020-11-27T01:10:50.593741 | 2020-01-07T15:56:54 | 2020-01-07T15:56:54 | 229,252,692 | 0 | 0 | null | 2019-12-20T11:28:48 | 2019-12-20T11:28:48 | null | UTF-8 | Python | false | false | 2,945 | py | # A PyNN Model for standard neurons built from components
from spynnaker.pyNN.models.neuron import AbstractPyNNNeuronModelStandard
# Components from main tools
from spynnaker.pyNN.models.neuron.input_types import InputTypeCurrent
from spynnaker.pyNN.models.neuron.synapse_types import SynapseTypeExponential
from spynnak... | [
"[email protected]"
] | |
5f69045f7aa47cdf638b20fe0213be9eee7ea9cf | 37c38b97d0a4b8098ec3c35b7122afb1fbb9eac9 | /newke/py36/py36/class_biao.py | ffce719d491f697100ed5daab2206f4b953fd2aa | [] | no_license | lionheartStark/sword_towards_offer | 8c2f9015a427317375d53eee982d630ffd4fa9c0 | cb3587242195bb3f2626231af2da13b90945a4d5 | refs/heads/master | 2022-12-02T20:50:18.789828 | 2020-08-23T02:00:48 | 2020-08-23T02:00:48 | 266,257,109 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,076 | py | from typing import List
from collections import defaultdict,deque
class Solution:
def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -> bool:
need_map = defaultdict(set)
for i in prerequisites:
need, be_need = i
need_map[need].add(be_need)
a_soluti... | [
"[email protected]"
] | |
5a520bbe602829e4a1a651efc846844f07970208 | bcfa02c21a73798872bbb28303233d1f0039cf00 | /server/www/teleport/webroot/app/controller/dashboard.py | 65a5f2eea63c35642406ac5a3c52e530667224cb | [
"Apache-2.0"
] | permissive | zhoulhb/teleport | 6301cd50c951bcbac21cbe24017eb8421ff57adc | 54da194697898ef77537cfe7032d774555dc1335 | refs/heads/master | 2021-11-10T17:10:59.661130 | 2021-11-09T11:16:19 | 2021-11-09T11:16:19 | 192,643,069 | 0 | 0 | Apache-2.0 | 2019-06-19T02:20:53 | 2019-06-19T02:20:52 | null | UTF-8 | Python | false | false | 361 | py | # -*- coding: utf-8 -*-
from app.const import *
from app.base.controller import TPBaseHandler, TPBaseJsonHandler
from app.model import stats
class IndexHandler(TPBaseHandler):
def get(self):
ret = self.check_privilege(TP_PRIVILEGE_LOGIN_WEB)
if ret != TPE_OK:
return
... | [
"[email protected]"
] | |
0f2ac223d96f5a6d71a7a54cad6006c3bc48733c | b6f8b2f023004fc0ea185b5e1ef2cbccce9ef513 | /misc/figures_thesis.py | 05bcf26cc2a72e5051b3bd7f7406d3d6a1d50359 | [
"BSD-3-Clause"
] | permissive | tenglongcong/petibm-examples | a73a6cdba864269fe9402d0a8b44582f2bcbcd9f | 3817d50b0b26df5901701c0cfe82a2d57c964e89 | refs/heads/master | 2020-11-27T17:12:28.335357 | 2019-12-04T23:51:54 | 2019-12-04T23:51:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 979 | py | """Gather figures (to be included in thesis)."""
import os
import pathlib
import shutil
rootdir = pathlib.Path(__file__).absolute().parents[1]
n_parts = len(rootdir.parts)
# Create the output directory.
figdir = rootdir / 'figures_thesis'
figdir.mkdir(parents=True, exist_ok=True)
# Load paths of figures to gather.... | [
"[email protected]"
] | |
862e1582b1eea05a10d17fec0afe45b0ba83391c | 17e08f795273d6f4233ab440c2706130f6520b58 | /fannypack/utils/_deprecation.py | 9174fd10a6bbb73f059b87105a1183e6c2716f63 | [
"MIT"
] | permissive | HaoWen470/fannypack | db5e6bb670004e470254e1e632899aeec38ee041 | 7e2c949de0e0cac69a95a5a777f8a4b1fa0fc17a | refs/heads/master | 2023-01-03T20:35:35.248848 | 2020-10-31T09:01:01 | 2020-10-31T09:01:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,373 | py | import warnings
from typing import Callable
def deprecation_wrapper(message: str, function_or_class: Callable) -> Callable:
"""Creates a wrapper for a deprecated function or class. Prints a warning
the first time a function or class is called.
Args:
message (str): Warning message.
functio... | [
"[email protected]"
] | |
91e61e3f950f46f177a4001f65690a53add7f6f1 | 1765ebc1c393ab4720c5fc5f9397516f5d66cfce | /setup.py | de4fc91885a05f03e2c2bf89d2af47d2323230c1 | [
"MIT"
] | permissive | Lukasa/rproxy | d1db08aa99470c3649258254ead291c6dbd2d202 | c15f9f56608a53db19d4f3737f05dfd02d66bc60 | refs/heads/master | 2020-12-28T22:46:48.225095 | 2016-06-30T08:27:23 | 2016-06-30T08:27:23 | 67,593,070 | 0 | 0 | null | 2016-09-07T09:35:22 | 2016-09-07T09:35:22 | null | UTF-8 | Python | false | false | 502 | py | from setuptools import setup
setup(
name='rproxy',
description='A super simple reverse proxy.',
long_description=open("README.rst").read(),
author='Amber Brown',
author_email='[email protected]',
packages=['rproxy', 'twisted.plugins'],
package_dir={"": "src"},
install_requires=[... | [
"[email protected]"
] | |
3040eece0cb8864c9e7d39ddab4a66343a0f3988 | 2112e4cfd9568128573098f8e209962002f66a23 | /app.py | 23284a6ccf1befdf6ba398a9fa834d9e7048b7e3 | [] | no_license | amazingguni/stock-trader | 0bd39cce6f6462c9648e3c8b2893b3e8379e37ca | 252c9230885200cfde845f2a03677140564cfc62 | refs/heads/main | 2023-05-05T18:26:04.124690 | 2021-05-30T13:12:58 | 2021-05-30T13:12:58 | 362,616,293 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,296 | py | from flask import Flask, Response
from flask_login import LoginManager
from flask_cors import CORS
from config import get_config_by_env
from container import Container
from web.admin import admin
from mongodb import db
login_manager = LoginManager()
def create_app():
app = Flask(__name__, template_folder='./w... | [
"[email protected]"
] | |
7493629d6e1853839179716db93c9a7fcec7dbf8 | 42c48f3178a48b4a2a0aded547770027bf976350 | /google/ads/google_ads/v5/proto/resources/customer_negative_criterion_pb2.py | a77e1ccec1e3bee71b3e49346e6e67070a3c1c2b | [
"Apache-2.0"
] | permissive | fiboknacky/google-ads-python | e989464a85f28baca1f28d133994c73759e8b4d6 | a5b6cede64f4d9912ae6ad26927a54e40448c9fe | refs/heads/master | 2021-08-07T20:18:48.618563 | 2020-12-11T09:21:29 | 2020-12-11T09:21:29 | 229,712,514 | 0 | 0 | Apache-2.0 | 2019-12-23T08:44:49 | 2019-12-23T08:44:49 | null | UTF-8 | Python | false | true | 14,503 | py | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v5/proto/resources/customer_negative_criterion.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflect... | [
"[email protected]"
] | |
60c586549370e3fbb1ebd8bbe3f0cd9caba71e15 | 3f29503e6d776ef0914217b1c922f4bc78af4fdd | /13.HASH MAP/1338_Reduce Array Size to The Half_MED/solution.py | 8a43eec458a5c93f42b5aa20c4251801a04035a9 | [] | no_license | kimmyoo/python_leetcode | cd4ff3c4f6d190840bbf5fb9acdca2b92554a6fa | 813235789ce422a3bab198317aafc46fbc61625e | refs/heads/master | 2023-08-16T07:36:38.688871 | 2023-08-15T22:38:00 | 2023-08-15T22:38:00 | 132,544,297 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 498 | py | class Solution(object):
def minSetSize(self, arr):
"""
:type arr: List[int]
:rtype: int
"""
half = len(arr)/2
d = collections.Counter(arr)
c = d.values()
c.sort(reverse=True)
if max(c) >= half:
return 1
begin, end = 0, 1
... | [
"[email protected]"
] | |
a2bd66f70a6a7d7e1b9e8f3c16a7f2d37623a9d3 | 7ed4a49fd0906ed156c1846c9c9fc1dd94c47303 | /torch/ao/quantization/_pt2e/quantizer/qnnpack_quantizer.py | 10880f20705bdbe4aa55d8602e9370acf9c72230 | [
"BSD-2-Clause",
"LicenseRef-scancode-secret-labs-2011",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0"
] | permissive | XinYao1994/pytorch | e052f2f44acf623da9d5ebc6b46f68311e73d66a | 351c2ea2fbb09add93980e2942435f31b114047c | refs/heads/master | 2023-05-27T17:20:51.876780 | 2023-05-21T06:31:53 | 2023-05-21T06:31:53 | 153,064,994 | 1 | 0 | null | 2018-10-15T06:42:28 | 2018-10-15T06:42:28 | null | UTF-8 | Python | false | false | 25,134 | py | from __future__ import annotations
import copy
import functools
import operator
from typing import Callable, Dict, List, Optional, Set
import torch
import torch._dynamo as torchdynamo
import torch.nn.functional as F
from torch.ao.quantization._pt2e.quantizer.utils import (
get_act_obs_or_fq_ctr,
get_bias_obs... | [
"[email protected]"
] | |
3dcb6a3fba7b2c2c8998314caf270f7dc4b3d69c | 824f19d20cdfa26c607db1ff3cdc91f69509e590 | /TopInterviewQuestions/LinkedList/01-Delete-Node.py | e8cc4b8ff1bfc6f65dfa58aa9f76058738818e2a | [] | no_license | almamuncsit/LeetCode | 01d7e32300eebf92ab54c983de6e183242b3c985 | 17aa340649574c37067ec170ceea8d9326be2d6a | refs/heads/master | 2021-07-07T09:48:18.069020 | 2021-03-28T11:26:47 | 2021-03-28T11:26:47 | 230,956,634 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 346 | py | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def deleteNode(self, node):
while node.next.next:
node.val = node.next.val
node = node.next
node.val = node.next.val... | [
"[email protected]"
] | |
dfca92b9a02a0b34ddb02223c46fc05f0ac34303 | e35fd52fe4367320024a26f2ee357755b5d5f4bd | /leetcode/problems/434.number-of-segments-in-a-string.py | 229c119643f381afef999ff54714d595c048b7dc | [] | no_license | liseyko/CtCI | a451967b0a0ce108c491d30b81e88d20ad84d2cd | c27f19fac14b4acef8c631ad5569e1a5c29e9e1f | refs/heads/master | 2020-03-21T14:28:47.621481 | 2019-11-12T22:59:07 | 2019-11-12T22:59:07 | 138,658,372 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 642 | py | #
# @lc app=leetcode id=434 lang=python3
#
# [434] Number of Segments in a String
#
# https://leetcode.com/problems/number-of-segments-in-a-string/description/
#
# algorithms
# Easy (37.34%)
# Total Accepted: 64.1K
# Total Submissions: 171.8K
# Testcase Example: '"Hello, my name is John"'
#
# Count the number of se... | [
"[email protected]"
] | |
1ac603767f5fde5c05e1576e3f1e35df16a53af1 | 63e0bc889563192a602463e662121058a4da30b5 | /Smart.py | 4c26367cb520a58c7477ccfe077c736086992b6b | [] | no_license | adaptiveUK/rhinopythonscripts | 11accd3048caad7b69024db55e5847acb3c7feb6 | bdd260e7f7257de54a4fac25a465dcdafff3b68c | refs/heads/master | 2021-01-17T08:38:26.863981 | 2011-07-25T19:07:29 | 2011-07-25T19:07:29 | 3,888,627 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,736 | py | '''A module for wrapping geometry with UserString and Attribute Dictionaries'''
import Rhino
class SmartFeature(object):
def __init__(self, rhinoObjectOrTuple):
self._parseConstructor(rhinoObjectOrTuple)
def _parseConstructor(self, rhinoObjectOrTuple):
# determine if it is a tuple
kin... | [
"[email protected]"
] | |
c8aa00a8afba3954be9744854afed97a99745d3f | 75dcb56e318688499bdab789262839e7f58bd4f6 | /_algorithms_challenges/codewar/_Codewars-Solu-Python-master/src/kyu7_Linked_Lists-Move_Node.py | 4367bf1aeaa9de6050ecb664223c5ff2f974bf3a | [] | no_license | syurskyi/Algorithms_and_Data_Structure | 9a1f358577e51e89c862d0f93f373b7f20ddd261 | 929dde1723fb2f54870c8a9badc80fc23e8400d3 | refs/heads/master | 2023-02-22T17:55:55.453535 | 2022-12-23T03:15:00 | 2022-12-23T03:15:00 | 226,243,987 | 4 | 1 | null | 2023-02-07T21:01:45 | 2019-12-06T04:14:10 | Jupyter Notebook | UTF-8 | Python | false | false | 2,573 | py | class Node(object):
def __init__(self, data):
self.data = data
self.next = None
class Context(object):
def __init__(self, source, dest):
self.source = source
self.dest = dest
class Solution():
"""
https://www.codewars.com/kata/linked-lists-move-node
Linked Lists ... | [
"[email protected]"
] | |
c3e539c4bf3ff081920dd8d7384b3aab42f9f2aa | c65d512975feed7dfe74f1117cdd1337293d9d60 | /python/my_py_notes_万物皆对象/db_and_数据持久化/Mysql/mysql与python交互/py_mySQL.py | 457399daaab72146341157a493068ef91fee16ba | [] | no_license | Rockyzsu/StudyRepo | e5c6420e325917c2df7dc51d606be5fa3c2ee1b8 | 385785c09bebb56df156fd149a088043f38d0aab | refs/heads/master | 2022-12-09T13:45:38.332899 | 2020-09-15T09:56:09 | 2020-09-15T09:56:09 | 295,388,871 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 799 | py | # -*- coding:utf-8 -*-
# file: PyMySQL.py
#
import MySQLdb # 导入MySQLdb模块
db = MySQLdb.connect(host='localhost', # 连接到数据库,服务器为本机
user='root', # 用户为root
passwd='root654321', # 密码为root654321
db='python') # 数据库名为python
cur = db.cursor() # 获得数据库游标
cur.execute('insert i... | [
"[email protected]"
] | |
43fddc8268d67792feed4cbae6473c1f9b58a178 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_210/72.py | 8b87687f01a56f0ea2dfa277b816f22c349a561c | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,170 | py | #!/usr/bin/env python
import sys
import numpy as np
T = int(raw_input())
for t in xrange(T):
# solve the input
Ac, Aj = raw_input().strip().split()
Ac = int(Ac)
Aj = int(Aj)
activities = [] # start, end, duration, who
ctotal = 0
jtotal = 0
C = np.zeros(Ac)
D = np.zeros(Ac)
for c in xrange(Ac)... | [
"[email protected]"
] | |
d335c1953908c703540fee6892011ac539fd127d | 7b12eb45c1ea76ad9c186b858b5dfebf2c5b862a | /.history/DEBER_20210831114343.py | 1bb3ad9fa1d068428284e79f3e43f05e552a0685 | [
"MIT"
] | permissive | Alopezm5/PROYECTO-PARTE-1 | a1dce04009b24852c1c60e69bdf602ad3af0574b | bd7a8594edf08d41c6ca544cf6bac01ea4fcb684 | refs/heads/main | 2023-07-25T11:22:17.994770 | 2021-09-07T03:27:34 | 2021-09-07T03:27:34 | 403,670,226 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,536 | py | class Nomina:
def __init__(self,nom="",ruc=0,dire="",tele=0,ciud="",tipEmpr="",email="",estado="",profe="",dep=""):#3
self.nombre=nom
self.ruc=ruc
self.direccion=dire
self.telefono=tele
self.ciudad=ciud
self.tipoEmpresa=tipEmpr
self.correo=email
self.... | [
"[email protected]"
] | |
2af5c8223fc344d1baaffd129038607c4fdce3a2 | 9d4c84a3ddee3c53bfb85b7e576be97f727caca0 | /iso_two_param/optimization_blue_cv04.py | a998f3794d796a338806c045f2957cc9bb25c077 | [
"MIT"
] | permissive | cjekel/inv_bubble_opt | 386cca2c009bf1c97007c14bcbf9cd5df482afe3 | 3ecd57ee91ee09ac38319d151adbd8e9c3b9a1bb | refs/heads/master | 2023-08-15T04:26:09.702395 | 2021-08-14T01:10:49 | 2021-08-14T01:10:49 | 166,838,347 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,325 | py | # MIT License
# Copyright (c) 2019 Charles Jekel
# 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, ... | [
"[email protected]"
] | |
fee00f670adab1b0c03e332059c2a4409748e8a6 | 9b483d42da47237d28a9f80c378aba412b89f5b1 | /special/cookie.py | 59a4301e436c65e01d0d8954723bc8de92163246 | [] | no_license | smartree/Tentacle | b0c83b671c1abe26338125d672d77b277abd2b28 | a53e046f3434bf1ac4b606ba7dfe951d9b7f5464 | refs/heads/master | 2020-05-23T01:25:57.576494 | 2019-05-09T15:33:00 | 2019-05-09T15:33:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,776 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
'''
Check header' cookies secure, e.g. httponly, secure and so on.
'''
from re import findall
from re import search
from re import I
def info(data=None):
info = {
"name": "cookie",
"info": "cookie",
"level": "low",
"type": "info"
}... | [
"[email protected]"
] | |
f53cbfea41a1a703382d2eccb5c4074a2795e9e5 | 1635e722e7ede72f4877671f36bbbc4199abae81 | /ecosoft-addons/advance_and_additional_discount/sale.py | 227a9eaf76f4874a626c54c5534aae8deb8f788e | [] | no_license | ecosoft-odoo/sqp | 7c09617048091ac6de4b25a33ad88127d36de452 | 7a7fc6b88087d98d536dd4ec39f9fb572918090e | refs/heads/master | 2023-08-08T00:07:48.405000 | 2023-08-04T15:47:43 | 2023-08-04T15:47:43 | 40,047,976 | 3 | 9 | null | 2023-08-02T08:38:53 | 2015-08-01T13:48:54 | Python | UTF-8 | Python | false | false | 10,548 | py | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | [
"[email protected]"
] | |
48c70164518cd8c13035be54a8fd4613798d6f4b | 574a23f57daec3d462967e30ff808779127dc839 | /herle_inventarios/inventarios/serializers.py | 42469033e71751845727f0149bc8dc594c449395 | [] | no_license | RedGranatum/herleBackEnd | 18d3aecf75eb0d349470747f3fca4dbfd1581e80 | 8f21a7f7d0c2d3fdf3ae52eab6b31cbea7d3da97 | refs/heads/master | 2023-01-07T07:32:17.725947 | 2020-12-15T00:23:38 | 2020-12-15T00:23:38 | 57,180,381 | 0 | 0 | null | 2022-12-26T20:22:35 | 2016-04-27T03:25:14 | Python | UTF-8 | Python | false | false | 618 | py | from rest_framework import serializers
from .models import Inventario
class InventarioSerializer(serializers.ModelSerializer):
class Meta:
model = Inventario
fields = ("id","compra_detalle","invoice_compra","material","calibre","ancho","largo",
"codigo_producto","num_rollo","peso_kg","peso_lb","trans... | [
"[email protected]"
] | |
59ac6c1ca8c6b389889458634600394990b5dc69 | 1f62195fb1960c6bddb38343adbe41c0497e40bc | /torchrl/utils/gym_wrappers/atari_wrappers.py | 14d18b1a90860b41d033edaf180e5bd29d3c4bef | [
"MIT"
] | permissive | alyssonmazoni/torchrl | 800ec186893607adac14c38c39c1d36f3488d3d8 | 75e82f073b7234432b491a21e5083bc55e3e985a | refs/heads/master | 2020-03-16T06:12:43.733257 | 2018-05-05T02:37:50 | 2018-05-05T02:37:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,291 | py | '''
Copied from:
https://github.com/openai/baselines/blob/master/baselines/common/atari_wrappers.py
'''
import numpy as np
import gym
from gym import spaces
import cv2
def atari_wrap(env, frame_skip=4, noop_max=30):
assert 'NoFrameskip' in env.spec.id
env = EpisodicLifeEnv(env)
env = NoopResetEnv(env, noo... | [
"[email protected]"
] | |
b5935e769053443d0cf189014e51f82faab401ff | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02785/s130693103.py | ccbb8dc59483b523e40685ea0fb13bcd61a7bf65 | [] | 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 | 234 | py | import heapq
(N,K) = map(int,input().split())
h = [int(x)*-1 for x in input().split()]
ans = 0
heapq.heapify(h)
if K <= N:
for i in range(K):
heapq.heappop(h)
while h != []:
ans -= heapq.heappop(h)
print(ans) | [
"[email protected]"
] | |
275a965beacc898d34762e7483c622411e29df6e | 008c0a630ffa5bc412571acef2b7462e22fce196 | /tests/test_console.py | 3ec9d656f2396736bf0840eec5723aff6aeb2a8d | [
"BSD-2-Clause",
"Python-2.0",
"BSD-2-Clause-Views"
] | permissive | Jacktwist/python-tcod | dea56c330f5c27d85e71a2c44074b0b2c4536675 | d271cc9892a6bdcd931f7a9984fffc754170b36f | refs/heads/master | 2020-04-28T12:57:01.653126 | 2019-03-11T01:39:52 | 2019-03-11T01:39:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,786 | py | import pickle
import numpy as np
from numpy import array
import pytest
import tcod
@pytest.mark.filterwarnings("ignore:Directly access a consoles")
def test_array_read_write():
console = tcod.console.Console(width=12, height=10)
FG = (255, 254, 253)
BG = (1, 2, 3)
CH = ord('&')
tcod.console_put_... | [
"[email protected]"
] | |
be4111fbce90624d076a4b5716314151ab4cc46e | d4e38b8a1438c0509f3f160a2ceb9aa166ac3ed1 | /quizzes/quiz1/server.py | 1f8c6d93d9cce2d4febe28260c52823c3b82da31 | [] | no_license | yulu9206/cmpe273-spring2018 | e7ffa36818cb87596de351b36d5dc33ec387bf1b | 8e0eaa0ce951b718dae195753dca0d9fc07b5a97 | refs/heads/master | 2021-04-06T11:17:44.918483 | 2018-03-15T20:26:35 | 2018-03-15T20:26:35 | 125,421,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 734 | py | import time
import grpc
import ping_pb2
import ping_pb2_grpc
from concurrent import futures
class PingServer(ping_pb2_grpc.PingPongServicer):
def ping(self, request, context):
return ping_pb2.Response(data='Pong')
def run(host, port):
server = grpc.server(futures.ThreadPoolExecutor(max_workers=1))
... | [
"[email protected]"
] | |
f787f4e893e031beb971965ab9fcd5ad7fea6217 | 15e5b2e39d8f1c08b34b36783cc5504638e3e434 | /TODO-PROJECT/todo-back/todos/migrations/0001_initial.py | 318ee532b77426a5c00753188598859bd9f21d93 | [] | no_license | ghdus4185/Vue_intro | 62e0ded5b4a23ef34869d8e0bb7b337a7e9c934f | b999f19a4140b2456614625f8063ff919b8cdfed | refs/heads/master | 2023-01-13T09:42:15.804784 | 2019-11-21T00:01:38 | 2019-11-21T00:01:38 | 219,454,656 | 0 | 0 | null | 2023-01-07T21:19:32 | 2019-11-04T08:41:36 | HTML | UTF-8 | Python | false | false | 3,393 | py | # Generated by Django 2.2.6 on 2019-11-18 06:18
from django.conf import settings
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
... | [
"[email protected]"
] | |
8b07c0d19f6538fff2340e3c06e09aba7bac2636 | 0ca210752cd5b926201f3fb40ee4aadc6da4f537 | /code/test_hd22879.py | bdca611a496161a373724a5b3bd0c099afc339a0 | [
"MIT"
] | permissive | andycasey/precise-objective-differential-spectroscopy | f45f93dfdaeb78d138d7792c439cf7b6065882c5 | 658b0d226300330375570dd2450bb284f1cf167a | refs/heads/master | 2021-01-19T20:24:48.539975 | 2014-07-09T13:41:32 | 2014-07-09T13:41:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,015 | py | import cPickle as pickle
from stellar_parameters import Star
from channel import SpectralChannel
class spectrum(object):
pass
import sick
spec = sick.specutils.Spectrum.load("spectra/hermes-sun.fits")
spec = sick.specutils.Spectrum.load("spectra/uvessun1.txt")
blue_channel = spectrum()
blue_channel.dispersi... | [
"[email protected]"
] | |
a443bc1ff37c65ac9a675e1b051f9c343c668fe0 | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/nnprimev.py | b38df65ef76b7a4749b5371f10fce62d9dcee3fb | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 727 | py | ii = [('BentJDO2.py', 1), ('LyelCPG2.py', 1), ('RogePAV2.py', 2), ('GodwWSL2.py', 1), ('RogePAV.py', 4), ('SadlMLP.py', 2), ('WilkJMC3.py', 1), ('PettTHE.py', 1), ('PeckJNG.py', 1), ('ChalTPW2.py', 2), ('AdamWEP.py', 1), ('CarlTFR.py', 3), ('RoscTTI3.py', 1), ('BailJD1.py', 1), ('BuckWGM.py', 17), ('LyelCPG.py', 11), (... | [
"[email protected]"
] | |
7bfb340afa9df5a5df6c0f09a08cba7269997bbb | ecd0cffe45c6fee6ce02b70fb5721caac66a7b37 | /Data_Structures/Graphs/DijkstraAlgorithm.py | d16d8b75f887ff9deefb3181f6df5ca25839d837 | [] | no_license | johngaitho05/Interview-Questions | 75925ba5e3326857a13cfe6e1add27be3d1aa83e | 979f6960bc44186208c629403fa4ed73f72673b0 | refs/heads/master | 2021-05-21T13:39:48.290629 | 2020-06-18T05:51:30 | 2020-06-18T05:51:30 | 252,669,485 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,447 | py | import sys
import heapq
def cmp(x, y):
"""
Replacement for built-in function cmp that was removed in Python 3
Compare the two objects x and y and return an integer according to
the outcome. The return value is negative if x < y, zero if x == y
and strictly positive if x > y.
... | [
"[email protected]"
] | |
163ef3f305c3772d2d7644c28856b2fc13b47f3b | 55a2e62805cca90f46f3ac9c9501aa3386ab3109 | /games/urls.py | f8a56294778ab42f63bedfc70f5c669ad53da1b9 | [] | no_license | profmcdan/games-service | 2bf5d533b797d46e6a27ae63eac9c367cf144497 | 24049d08cfc645bd750839bcd0eba16fa7d7ee2d | refs/heads/master | 2022-12-16T01:19:09.859633 | 2019-08-06T15:11:54 | 2019-08-06T15:11:54 | 200,827,749 | 0 | 0 | null | 2022-12-08T01:48:16 | 2019-08-06T10:14:54 | Python | UTF-8 | Python | false | false | 984 | py | # from django.conf.urls import url
from django.urls import path
# from .views import game_collection, game_detail
from . import views
urlpatterns = [
path('esrb-ratings/', views.EsrbRatingList.as_view(),
name=views.EsrbRatingList.name),
path('esrb-ratings/<int:pk>/', views.EsrbRatingDetail.as_view(),
... | [
"[email protected]"
] | |
f5b439565e4463e6269798259de653eacdfd482e | 03195a6f98396fd27aedc3c06d81f1553fb1d16b | /pandas/_libs/properties.pyi | b2ba55aefb8a57e9a884c9c07d3882b1e3014f78 | [
"BSD-3-Clause"
] | permissive | huaxz1986/pandas | a08d80d27726fe141d449835b9a09265bca5b5e0 | ba2473834fedcf571d3f8245b4b24796873f2736 | refs/heads/master | 2023-06-11T02:20:14.544220 | 2022-01-12T04:40:06 | 2022-01-12T04:40:06 | 131,370,494 | 3 | 4 | BSD-3-Clause | 2018-04-28T03:51:05 | 2018-04-28T03:51:05 | null | UTF-8 | Python | false | false | 330 | pyi | # pyright: reportIncompleteStub = false
from typing import Any
# note: this is a lie to make type checkers happy (they special
# case property). cache_readonly uses attribute names similar to
# property (fget) but it does not provide fset and fdel.
cache_readonly = property
def __getattr__(name: str) -> Any: ... # i... | [
"[email protected]"
] | |
3340ab19cd6e27d561259c17962122f7ca5afbb5 | baed2c2da1f776c0968d3cacd2fa45bdbe5482d6 | /ZOS_API_scripts/LAT_analysis/focal_plane_strehl_ratios_CD.py | 4531fc83e94b0eca7735eed469b8422d1bd1be10 | [] | no_license | patogallardo/zemax_tools | 5ae2fe9a1e8b032684b8cf57457ee4f3239d9141 | 90d309c2f96c94469963eb905844d76fa2137bf9 | refs/heads/master | 2023-01-08T22:52:16.865852 | 2022-12-20T21:36:28 | 2022-12-20T21:36:28 | 234,634,525 | 7 | 3 | null | null | null | null | UTF-8 | Python | false | false | 10,881 | py | import pandas as pd
import numpy as np
import glob
import matplotlib.pyplot as plt
import scipy.interpolate as interp
from scipy import stats
import os
from mpl_toolkits.axes_grid1 import make_axes_locatable
import sys
assert len(sys.argv) == 2
plt.rcParams.update({'font.size': 14})
s = pd.read_hdf('ray_db.hdf', 'sys... | [
"[email protected]"
] | |
f9106238b4ff20bec1e7b0835e8bd33b0db2acf4 | 8e69eee9b474587925e22413717eb82e4b024360 | /v1.0.0.test/toontown/uberdog/DistributedDataStoreManagerUD.py | a96c02427ed6514633f660973bad639449564c3f | [
"MIT"
] | permissive | TTOFFLINE-LEAK/ttoffline | afaef613c36dc3b70514ccee7030ba73c3b5045b | bb0e91704a755d34983e94288d50288e46b68380 | refs/heads/master | 2020-06-12T15:41:59.411795 | 2020-04-17T08:22:55 | 2020-04-17T08:22:55 | 194,348,185 | 5 | 4 | null | null | null | null | UTF-8 | Python | false | false | 523 | py | from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectUD import DistributedObjectUD
class DistributedDataStoreManagerUD(DistributedObjectUD):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDataStoreManagerUD')
def startStore(self, todo0):
pass
... | [
"[email protected]"
] | |
73a145d26a657841c35d7ea4b5ab7b210955a4ee | b3879bc761ac38dab903da57c4061ad79fd70c6d | /курсы пайтон модуль 8/задание 9.py | 6957678c459752ce7e24854b4f53dc592a0069d7 | [] | no_license | Ruslan5252/all-of-my-projects-byPyCharm | 4df70cc3a31c4a5d97560fa858a706edcc856299 | 817d5f711408590ea141590ae52c6d888dfa2015 | refs/heads/master | 2023-05-03T01:06:30.156731 | 2021-05-29T13:51:16 | 2021-05-29T13:51:16 | 371,970,160 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,957 | py | class Car():
def __init__(self,name,model,maxSpeed,year,volume):
self.name=name
self.model=model
self.maxSpeed=maxSpeed
self.year=year
self.volume=volume
def ride(self):
print(f"машина названием ",{self.name},"моделью ",{self.model},"с максимальной скоростью ",{se... | [
"[email protected]"
] | |
f73c69327f9a0808a5342429f537d9f3327594c9 | cec7315a6e86aece2b1fbc5c471aafca3288bfc2 | /backend/manage.py | d8e871a95646132dff05fabdcd33238d8bf93a36 | [] | no_license | crowdbotics-apps/broken-art-29088 | c783b82a52483e5bec52893bdae01c1849095e44 | b240934504f1aba03821ff07b336298fb98e6ca6 | refs/heads/master | 2023-06-25T17:31:47.595217 | 2021-07-23T21:38:46 | 2021-07-23T21:38:46 | 388,932,591 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 636 | py | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'broken_art_29088.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
rai... | [
"[email protected]"
] | |
8fca49fbe0da62e740f590084e3aea24dc479f4e | fcd29745ed7a66b46f5039c2ad07f2fa5cb457a2 | /6_files/files_project/app.py | 758c311e0fb3ecf125e133b27a725f2b0261621f | [
"MIT"
] | permissive | PacktPublishing/The-Complete-Python-Course | 17489ec6939b5c6c20b92d5bb2d15a71a6444f8e | b880ef9c0e281316f4080531d3690435a686e9c0 | refs/heads/master | 2023-02-19T04:22:33.451524 | 2023-02-02T06:04:40 | 2023-02-02T06:04:40 | 204,631,924 | 56 | 72 | MIT | 2023-02-15T23:21:39 | 2019-08-27T06:09:32 | Python | UTF-8 | Python | false | false | 239 | py | my_file = open('data.txt', 'r')
file_content = my_file.read()
my_file.close()
print(file_content)
user_name = input('Enter your name: ')
my_file_writing = open('data.txt', 'w')
my_file_writing.write(user_name)
my_file_writing.close()
| [
"[email protected]"
] | |
2bc2d9a96d32d718cd7212819c018fb6c1d25567 | 5cc4a73d6fb144d72e74b07a10b60fc36bfe50ec | /shops/migrations/0002_auto_20190330_1916.py | df99c08c2f3e516d78ab25dd75133d1b5afcbeba | [] | no_license | pedrofolch/digitalsoil | 79d9497dcbb54df3c7df64f9da35d71d592fe580 | 7b6d1ffd34e991cf87c91342e5336a97fa1cf59b | refs/heads/master | 2022-12-11T00:47:01.728729 | 2019-04-11T03:34:12 | 2019-04-11T03:34:12 | 120,937,159 | 0 | 0 | null | 2022-12-08T04:58:09 | 2018-02-09T17:49:10 | CSS | UTF-8 | Python | false | false | 659 | py | # Generated by Django 2.1.5 on 2019-03-31 02:16
import django.contrib.gis.db.models.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('shops', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='elevation',
... | [
"[email protected]"
] | |
e4f668c29f8509034aa848c7bc5ab56a68eb64c4 | ca0e761b2948b2bd93d46e5bab610901f4a9936c | /data/convert_to_json_file.py | 6e7ef5a2f0f1f046e2029916e023b0653ab42ed7 | [
"MIT"
] | permissive | dojinkimm/go-krx | 7f122321f69a119594de1ee184be57eeb4f148f7 | b565696a7c13427f3320c6c43a529638ea06682e | refs/heads/main | 2023-03-11T22:06:00.291164 | 2021-02-28T13:29:51 | 2021-02-28T13:29:51 | 300,895,170 | 7 | 2 | null | 2021-02-23T12:34:18 | 2020-10-03T14:09:40 | Go | UTF-8 | Python | false | false | 1,695 | py | import json
import pandas as pd
dfstockcode = pd.read_html(
"http://kind.krx.co.kr/corpgeneral/corpList.do?method=download", header=0
)[0]
stock_information = list()
for (
i,
(
name,
symbol,
sector,
industry,
listing_date,
settlement_month,
represen... | [
"[email protected]"
] | |
a27ffb478d2e67e0421e6bd0ec93873bf9393a62 | 36957a9ce540846d08f151b6a2c2d582cff1df47 | /VR/Python/Python36/Lib/lib2to3/tests/data/crlf.py | ae969da2ed9f77889127906baddd4a6ef5472fd3 | [] | no_license | aqp1234/gitVR | 60fc952307ef413e396d31e0d136faffe087ed2b | e70bd82c451943c2966b8ad1bee620a0ee1080d2 | refs/heads/master | 2022-12-29T15:30:12.540947 | 2020-10-07T15:26:32 | 2020-10-07T15:26:32 | 290,163,043 | 0 | 1 | null | 2020-08-25T09:15:40 | 2020-08-25T08:47:36 | C# | UTF-8 | Python | false | false | 127 | py | version https://git-lfs.github.com/spec/v1
oid sha256:d910ad886333abf3664a4fb4290d3b81307a16c6d9ca14356b3644a9aae6e714
size 50
| [
"[email protected]"
] | |
7c691685311f964776bd731d24ea73ab2268ea4a | a6719f4815ff41d3a1f09e9a63a64c4582d03702 | /file_handling/read_file_demo.py | b131427b8bc801751761bb301ff7f1a6d3fecacc | [
"MIT"
] | permissive | thanh-vt/python-basic-programming | 8136007b8435dae6339ae33015fe536e21b19d1d | 5fe817986fbef2649b4b03955f07b59d2a2035d8 | refs/heads/main | 2023-01-30T12:57:36.819687 | 2020-12-13T17:27:05 | 2020-12-13T17:27:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | f = open('demo_file.txt', 'r')
print(f.read())
# read only part of a file (first 5 characters)
f = open('demo_file.txt', 'r')
print(f.read(5))
| [
"[email protected]"
] | |
686006acd784aeb64f48aa38eeb51d5c566319c7 | 1d11ff770c5530de4c18e83d9474d4c09c4376d2 | /igor/std-plugins/philips/scripts/philips.py | 0a6d1b43a4de640d5a4642c054379da4b21d6527 | [
"MIT"
] | permissive | bobandrey37/igor | 6660508639d90e7f44ea85146581685513b99ca2 | 41e163c8fa3da8ef13a337e1fe4268cf6fd7d07a | refs/heads/master | 2020-05-01T06:27:36.954089 | 2019-03-04T14:45:26 | 2019-03-04T14:45:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,929 | py | #!/usr/bin/python
from __future__ import print_function
from __future__ import unicode_literals
from future import standard_library
standard_library.install_aliases()
from builtins import object
import socket
import struct
import select
import json
import urllib.request, urllib.parse, urllib.error
import sys
DEBUG=Fal... | [
"[email protected]"
] | |
dd289bbe11d653c04e5f33bf697ff022530a0ef8 | b7eb8279ebe2f525d27849d6ca24cc7270d30433 | /processing/b2_demultiplex_stats.py | c941dc97629b4495d6d94f77ebdff996cd4bb1a9 | [] | no_license | maxwshen/prime-peptide | d0da277521537c6e09dfeca4afbe3297893ed61b | d72244e85683583c812d3bd106b6874da0a17b80 | refs/heads/main | 2023-04-07T19:07:03.371146 | 2021-04-09T20:36:07 | 2021-04-09T20:36:07 | 356,391,769 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,136 | py | #
from __future__ import division
import _config
import sys, os, fnmatch, datetime, subprocess
sys.path.append('/home/unix/maxwshen/')
import numpy as np
from collections import defaultdict
from mylib import util
import pandas as pd
# Default params
inp_dir = _config.OUT_PLACE + 'b_demultiplex/'
NAME = ut... | [
"[email protected]"
] | |
6f6bbd7824afebb390fcad7b60006d07593eaeb0 | f445450ac693b466ca20b42f1ac82071d32dd991 | /generated_tempdir_2019_09_15_163300/generated_part005963.py | 536d9214289d3cb10209ba7b567a2e1a915c7dca | [] | no_license | Upabjojr/rubi_generated | 76e43cbafe70b4e1516fb761cabd9e5257691374 | cd35e9e51722b04fb159ada3d5811d62a423e429 | refs/heads/master | 2020-07-25T17:26:19.227918 | 2019-09-15T15:41:48 | 2019-09-15T15:41:48 | 208,357,412 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,302 | py | from sympy.abc import *
from matchpy.matching.many_to_one import CommutativeMatcher
from matchpy import *
from matchpy.utils import VariableWithCount
from collections import deque
from multiset import Multiset
from sympy.integrals.rubi.constraints import *
from sympy.integrals.rubi.utility_function import *
from sympy.... | [
"[email protected]"
] | |
bf4938d9e73a26fe0757893e1a32b04c141a9cdb | d1845a132213f2239fb0fea3502982dcfbdaca08 | /youtube-favourites-export.py | 965eff77359c96636c638fe0f16b20fabf00c131 | [
"MIT"
] | permissive | dw/scratch | 361e9dac7693061b66ccd064633f4ed09875e1b2 | c22c84d4d2d0347283e70192458ea50e08efcadb | refs/heads/master | 2021-01-17T12:21:52.423557 | 2019-06-11T00:09:30 | 2019-06-11T00:09:30 | 3,239,854 | 30 | 10 | null | null | null | null | UTF-8 | Python | false | false | 982 | py |
import gdata.youtube.client
client = gdata.youtube.client.YouTubeClient()
client.client_login('[email protected]', 'password', 'exporter')
entries = []
uri = 'https://gdata.youtube.com/feeds/api/users/default/favorites'
while True:
print 'Fetch', uri
feed = client.get_videos(uri=uri, **{'max-results': 50})
... | [
"[email protected]"
] | |
676b57edf2543587624cb7fb53630425c91c775f | 7c1892d60f07848756cefe0dea0cce7292c7c572 | /database/add.py | a4e5e1046441fc9f119b92398f0c094ccabc923e | [] | no_license | cherryMonth/BWC | 31d92a583b0ff35a18368a2c2ccfdb8d549dd7e1 | 187430bbc9e81d1cbc8721fd423f9b0488e0e78d | refs/heads/master | 2021-01-01T17:29:17.655717 | 2017-07-28T04:40:20 | 2017-07-28T04:40:20 | 98,082,540 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,605 | py | # coding=utf-8
import csv
import os
import collections
class Add(object):
@staticmethod
def add(filename, key_list=None):
if not os.path.exists(filename):
index = 1
else:
index = 0
try:
with open(filename, 'ab') as csv_file:
... | [
"[email protected]"
] | |
fcb0ac9a2e90fb3003f163171bdf3f9429306a81 | e43ff8f429a6938a4f16edc4b2c94976acbff157 | /ABC/HELLO SPACE/c.py | 7e33c484056d96fed727123096a19a47f8c58635 | [] | no_license | Soule50431/AtCoder | 4fcd6ab6b771d55c90dc62aedd75eb81fd067466 | 118ac5d03630ce143fb50153402eee38e988ae0c | refs/heads/master | 2023-06-18T13:07:13.843361 | 2021-07-14T01:56:20 | 2021-07-14T01:56:20 | 357,827,698 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 496 | py | n = int(input())
team = [tuple(map(int, input().split())) for i in range(n)]
def check(x):
comb = set()
for member in team:
comb.add(sum(1 << i for i in range(5) if member[i] >= x))
for x in comb:
for y in comb:
for z in comb:
if x | y | z == 31:
... | [
"[email protected]"
] | |
9f7513aceb03d3a629148eb93790f2bd922608ca | 6c2ecefb12be6b04f597e3fb887d9389050aa7e1 | /DjangoCourse/第三周/djangologin/djangologin/settings.py | ca207ee45368d5f381d99a9266ac9e571e9357b6 | [] | no_license | GmyLsh/learngit | 99d3c75843d2b0b873f26e098025832985c635b3 | 3e7993c7119b79216fea24e5e35035336e4f5f5b | refs/heads/master | 2020-04-12T09:11:55.068312 | 2018-12-19T07:19:42 | 2018-12-19T07:19:42 | 162,395,001 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,616 | py | """
Django settings for djangologin project.
Generated by 'django-admin startproject' using Django 2.1.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import o... | [
"[email protected]"
] | |
b7ea7c196a657c03362e5a72b8dc3b5a15f15f9c | eb9c3dac0dca0ecd184df14b1fda62e61cc8c7d7 | /google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/services/services/ad_group_criterion_simulation_service/transports/base.py | ecc835952d95a794ce1333feaca5eb673c52f842 | [
"Apache-2.0"
] | permissive | Tryweirder/googleapis-gen | 2e5daf46574c3af3d448f1177eaebe809100c346 | 45d8e9377379f9d1d4e166e80415a8c1737f284d | refs/heads/master | 2023-04-05T06:30:04.726589 | 2021-04-13T23:35:20 | 2021-04-13T23:35:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,855 | py | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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 o... | [
"bazel-bot-development[bot]@users.noreply.github.com"
] | bazel-bot-development[bot]@users.noreply.github.com |
49c05d2676b8eed51218f2ef3306bf504397a1b1 | 0f0a7adfae45e07a896c5cd5648ae081d4ef7790 | /python数据结构/python黑马数据结构/排序于搜索/桶排序2.py | 081bee496e92f52adc6aa7b5f6d0b08d0687b4c3 | [] | no_license | renlei-great/git_window- | e2c578544c7a8bdd97a7a9da7be0464d6955186f | 8bff20a18d7bbeeaf714aa49bf15ab706153cc28 | refs/heads/master | 2021-07-19T13:09:01.075494 | 2020-06-13T06:14:37 | 2020-06-13T06:14:37 | 227,722,554 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 630 | py | lista = [12, 4, 5, 6, 22, 3, 3, 3, 3, 43, 654, 765, 7, 234]
def pail_sort(alist):
"""桶排序"""
n = len(alist)
cur = 0
while cur < n-1:
if alist[cur] > alist[cur+1]:
max_num = alist[cur]
cur += 1
max_li = [0] * (max_num +1)
for i in alist:
max_li[i] += 1
... | [
"[email protected]"
] | |
b12de6c619935508db19c3f39260210233e6a4ab | a0801d0e7325b31f0383fc68517e208680bb36d6 | /Kattis/rijeci.py | 7d0bdadf29031e7404c2c5a61ad6cc2e938add57 | [] | no_license | conormccauley1999/CompetitiveProgramming | bd649bf04438817c7fa4755df2c2c7727273b073 | a7e188767364be40f625612af3d16182f2d8d4de | refs/heads/master | 2023-05-14T13:19:32.678134 | 2023-05-11T16:07:33 | 2023-05-11T16:07:33 | 179,089,010 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | K = int(raw_input())
if K == 1:
print 0, 1
else:
x = [0, 1]
y = [1, 1]
for i in range(0, K - 1):
t = [y[0]+x[0], y[1]+x[1]]
x = y
y = t
print x[0], y[0] | [
"[email protected]"
] | |
e1c3075f706667755ba59b0caaaedb0ba5b258d1 | 039c28f0903a2b87ef1439a991e7c2e1d898ab48 | /pyneqsys/_release.py | a9edcd4240cbd989149d9c51908621ebb04cd636 | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | andim/pyneqsys | f6ddae44ef0f0fdc41725b1cc6007834b790a4fa | f22fb840692a174826bd4d0a03a52e41e63d062f | refs/heads/master | 2021-05-05T19:22:59.256424 | 2018-01-08T23:23:33 | 2018-01-08T23:23:33 | 117,774,582 | 0 | 0 | null | 2018-01-17T02:53:21 | 2018-01-17T02:53:21 | null | UTF-8 | Python | false | false | 26 | py | __version__ = '0.6.0.git'
| [
"[email protected]"
] | |
50f5477a0bbb10e0d356fbe8aa777cae29d9dffa | 6ec91b363b077bffd33f15300a0935124e9fb915 | /Cracking_the_Code_Interview/Leetcode/14.DP/120.Triangle.py | a7e2879f610fe04793e1b1f2c35318dc4b3ff0fc | [] | no_license | lzxyzq/Cracking_the_Coding_Interview | 03232515ae8eb50394d46322d36b230d1a626fcf | 79dee7dab41830c4ff9e38858dad229815c719a0 | refs/heads/master | 2023-06-05T19:52:15.595289 | 2021-06-23T22:46:02 | 2021-06-23T22:46:02 | 238,068,000 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 805 | py | '''
@Author: your name
@Date: 2020-06-30 18:43:37
@LastEditTime: 2020-06-30 19:39:19
@LastEditors: Please set LastEditors
@Description: In User Settings Edit
@FilePath: /Cracking_the_Code_Interview/Leetcode/14.DP/120.Triangle.py
'''
# Given a triangle, find the minimum path sum from top to bottom. Each step you may mov... | [
"[email protected]"
] | |
6c965678baa7cebf2a03764ddb7523795f47ebf2 | 1885e952aa4a89f8b417b4c2e70b91bf1df887ff | /ABC096/A.py | cc0a107e3cc810c92a52750a636bff76ae2ca381 | [] | no_license | takumiw/AtCoder | 01ed45b4d537a42e1120b1769fe4eff86a8e4406 | 23b9c89f07db8dd5b5345d7b40a4bae6762b2119 | refs/heads/master | 2021-07-10T12:01:32.401438 | 2020-06-27T14:07:17 | 2020-06-27T14:07:17 | 158,206,535 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 77 | py | a, b = map(int, input().split())
if b >= a:
print(a)
else:
print(a-1) | [
"[email protected]"
] | |
13f4acd3b7b06c62449a3ff575618e203428cc3d | c7066d3b72a54665d81de1d77d7bdcfd0ece7b42 | /python/ccxt/ascendex.py | c2951759419e5046421f16fd8bd991a4af0f59cb | [
"MIT"
] | permissive | blair/ccxt | cf09b7a604586c230e8cea2b6e4dbf6c3c3497ea | 3a6bd4efb78d01391f9a4ea43ec228b75ca24695 | refs/heads/master | 2023-09-03T21:09:44.447194 | 2023-08-26T19:01:14 | 2023-08-26T19:01:14 | 126,121,401 | 0 | 2 | MIT | 2018-03-21T04:02:57 | 2018-03-21T04:02:56 | null | UTF-8 | Python | false | false | 132,974 | py | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
from ccxt.abstract.ascendex import ImplicitAPI
import hashlib
from ccxt.base.types import OrderSide... | [
"[email protected]"
] | |
bf73bd5eda0d1303716e539c0d40f57d6ab13de8 | 22fe6ed51715486ebbc09e404504ed4d7a28c37d | /python-katas/57_CountHi.py | 6ef69b2da8a4251f4d619f0a62ab8c3d5042d32a | [] | no_license | Jethet/Practice-more | 1dd3ff19dcb3342a543ea1553a1a6fb0264b9c38 | 8488a679730e3406329ef30b4f438d41dd3167d6 | refs/heads/master | 2023-01-28T14:51:39.283741 | 2023-01-06T10:14:41 | 2023-01-06T10:14:41 | 160,946,017 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 378 | py | # Return the number of times the string 'hi' appears in a given string.
def count_hi(str):
return str.count('hi')
# CodingBat solution:
def count_hi(str):
sum = 0
for i in range(len(str)-1):
if str[i:i+2] == 'hi':
sum += 1 #or: sum = sum + 1
return sum
print(count_hi('abc hi ... | [
"[email protected]"
] | |
13ab0721b3a33f3abbaaf46d0378e8b4649ba27f | d1f15554df2d5c0f74ddbcba6e870359841f682b | /wagtail/migrations/0057_page_locale_fields_notnull.py | 8f18589b5c9f794cba254c26312dd2d73645c5f1 | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license"
] | permissive | wagtail/wagtail | bd405f89b86e0c625fef0685fd6bfba41cf5cbfc | 06a7bc6124bf62675c09fbe0a4ed9bbac183e025 | refs/heads/main | 2023-09-04T06:22:51.601208 | 2023-09-01T15:22:00 | 2023-09-01T15:22:00 | 16,479,108 | 12,974 | 3,580 | BSD-3-Clause | 2023-09-14T10:45:04 | 2014-02-03T12:41:59 | Python | UTF-8 | Python | false | false | 793 | py | # Generated by Django 2.2.10 on 2020-07-13 10:17
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
("wagtailcore", "0056_page_locale_fields_populate"),
]
operations = [
migrations.AlterField(
... | [
"[email protected]"
] | |
83852e477286aff2176a0246871748edca6bcef8 | c733e6b433914a8faba256c7853f5cf2cd39c62a | /Python/Leetcode Daily Practice/Heap/692. Top K Frequent Words.py | db9a25d3ab733cd3cdd4dd640983c8602e54fffe | [] | no_license | YaqianQi/Algorithm-and-Data-Structure | 3016bebcc1f1356b6e5f3c3e588f3d46c276a805 | 2e1751263f484709102f7f2caf18776a004c8230 | refs/heads/master | 2021-10-27T16:29:18.409235 | 2021-10-14T13:57:36 | 2021-10-14T13:57:36 | 178,946,803 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 385 | py | class Solution(object):
def topKFrequent(self, words, k):
from collections import Counter
import heapq
cnt = Counter(words) # o(n)
h = [(-freq, key) for key, freq in cnt.items()] # o(n)
return [heapq.heappop(h)[1] for i in range(k)] # o (k * logn)
print(Solution().topKFrequen... | [
"[email protected]"
] | |
55b52764902ce153ec4c19dc6da9439dee543669 | 9a0eb3e292d57b59198c7c66a994372ced9cfa5b | /nodes/1.x/python/String.ReplaceIllegalFilenameCharacters.py | a922b676f1485306810fd884001c9016638051ed | [
"MIT"
] | permissive | andydandy74/ClockworkForDynamo | 544ddf0893f5c0072fca7934f4e128001771f767 | 528400c667c4c3f2b51814af84e85c8fab8a8059 | refs/heads/master | 2023-08-19T03:07:33.489926 | 2023-08-13T04:31:17 | 2023-08-13T04:31:17 | 15,043,988 | 184 | 100 | MIT | 2023-09-04T18:47:40 | 2013-12-09T10:11:01 | Python | UTF-8 | Python | false | false | 430 | py | strings = IN[0]
replace = IN[1]
strlist = []
for str in strings:
str = str.replace('/', replace)
str = str.replace('?', replace)
str = str.replace('<', replace)
str = str.replace('>', replace)
str = str.replace('\\', replace)
str = str.replace(':', replace)
str = str.replace('*', replace)
str = str.replace('|',... | [
"[email protected]"
] | |
bdbe6ea6340e8f88e7e25d5b64882ed8bd313b28 | 488825f206180a276a4dbf61ed85227d6eb791cf | /src/config/asgi.py | 0b57e107471310680a0c77fa63612bdaeef0f579 | [
"Unlicense"
] | permissive | MTES-MCT/trackdechets-cockpit | 53acf96e79bcdb2a834f2c28114bbb1866a766e6 | 3624caf22882bd499dc7b22900e297adc6ca62d3 | refs/heads/main | 2023-08-04T10:15:17.613615 | 2022-01-03T22:16:07 | 2022-01-03T22:16:07 | 441,255,835 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | """
ASGI config for cockpit 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/4.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTI... | [
"[email protected]"
] | |
48b15be505f68c01bcbe37105ce08e8d80a90959 | 93b704572dd4f36ae488f931fbe8372a215b13ad | /clean_solutions/day3.py | d56d9cf4949958790cfde7211c768208ff456079 | [] | no_license | Goldenlion5648/AdventOfCode2020Live | 7cfdf6804402fdf42d10c70742579522c487f501 | e3f5908e8747991b50bdde339ad9ecba527b1168 | refs/heads/master | 2023-04-04T12:48:21.318124 | 2021-04-08T16:42:13 | 2021-04-08T16:42:13 | 317,414,264 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 736 | py |
'''
Right 1, down 1.
Right 3, down 1. (This is the slope you already checked.)
Right 5, down 1.
Right 7, down 1.
Right 1, down 2.
'''
from collections import *
with open("input3.txt") as f:
# a = list(map(int,f.read().strip().split("\n")))
board = f.read().strip().split("\n")
def slide(xChange, yChange):
... | [
"[email protected]"
] | |
eabc327817af3553828fe0ffc5f9a44d5e5d1951 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/mushroomPicker_20200729130815.py | f6b760f3a1112376d639f98641c3cd38b7ba4176 | [] | 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 | 1,178 | py | '''
You are given a non-empty, zero-indexed array A of n (1 � n � 100 000) integers
a0, a1, . . . , an−1 (0 � ai � 1 000). This array represents number of mushrooms growing on the
consecutive spots along a road. You are also given integers k and m (0 � k, m < n).
A mushroom picker is at spot number k on the road and sh... | [
"[email protected]"
] | |
ad5d5361d58d186ea6682f1b01c9158b0e151206 | 1255b4c76aa2def0d8ca07ff75ef264383de36e3 | /main.py | 8b482da2a9acf7567e56eec60c0e4c881703abac | [] | no_license | thepixelboy/flask-auth | bcbe2ce182e54743acfa70860f975b059952c65c | e49903b65c9451891b61138e1b5453ea29f733d1 | refs/heads/main | 2023-07-10T00:41:46.442728 | 2021-08-23T16:56:39 | 2021-08-23T16:56:39 | 399,182,979 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,337 | py | from os import name
from flask import Flask, render_template, request, url_for, redirect, flash, send_from_directory
from werkzeug.security import generate_password_hash, check_password_hash
from flask_sqlalchemy import SQLAlchemy
from flask_login import UserMixin, login_user, LoginManager, login_required, current_user... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.