blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
288
content_id
stringlengths
40
40
detected_licenses
listlengths
0
112
license_type
stringclasses
2 values
repo_name
stringlengths
5
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
684 values
visit_date
timestamp[us]date
2015-08-06 10:31:46
2023-09-06 10:44:38
revision_date
timestamp[us]date
1970-01-01 02:38:32
2037-05-03 13:00:00
committer_date
timestamp[us]date
1970-01-01 02:38:32
2023-09-06 01:08:06
github_id
int64
4.92k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]date
2012-06-04 01:52:49
2023-09-14 21:59:50
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-21 12:35:19
gha_language
stringclasses
147 values
src_encoding
stringclasses
25 values
language
stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
128
12.7k
extension
stringclasses
142 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
132
bd74a3ab41b48ffe8069d7327a2c0494179fcbfe
fcde32709c62b8ee86da459bb7c8eee52c848118
/code/day03/r4.py
37ad4deb38ed39591d4c123e94a810e47614be79
[]
no_license
klaus2015/py_base
6b92d362c3d7dc0e09205a037f4d580381dac94d
ec32c731c1c2f6a0dab87f1d167397e4fa86b8de
refs/heads/master
2022-07-28T15:49:30.383648
2020-05-11T15:31:43
2020-05-11T15:31:43
261,777,278
0
0
null
null
null
null
UTF-8
Python
false
false
716
py
# state = None # number = int(input("请输入一个整数: ")) # if number % 2 : # state = "奇数" # else: # state = "偶数" # print(state) # state = "奇数" if int(input("请输入整数: ")) % 2 else "偶数" # print(state) year = int(input("请输入年份:")) result = year % 4 == 0 and year % 100 != 0 or year % 400 == 0 if result: day = 29 else: ...
a4b9d93d338391843fa18a38fd30a88d04acb569
e0ede722874d222a789411070f76b50026bbe3d8
/practice/solution/0894_all_possible_full_binary_trees.py
2727423a40a633641a8545b0f9ac6da90888a70d
[]
no_license
kesarb/leetcode-summary-python
cd67456cb57bdff7ee227dab3930aaf9c2a6ad00
dc45210cb2cc50bfefd8c21c865e6ee2163a022a
refs/heads/master
2023-05-26T06:07:25.943854
2021-06-06T20:02:13
2021-06-06T20:02:13
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,031
py
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution(object): def allPossibleFBT(self, N): """ :type N: int :rtype: List[TreeNode...
b67726927a44da27cddb100768d5532598314c80
038af1bfd275530413a7b4e28bf0e40eddf632c6
/parsifal/apps/accounts/tests/test_update_emails_view.py
6e3b2e07623eb93ac58bb135d2b97b941ee0e58f
[ "MIT" ]
permissive
vitorfs/parsifal
5c5345ff75b48c5596977c8e0a9c4c537ed4726c
68c3ce3623a210a9c649a27f9d21ae6130541ea9
refs/heads/dev
2023-05-24T16:34:31.899776
2022-08-14T16:30:06
2022-08-14T16:30:06
11,648,402
410
223
MIT
2023-05-22T10:47:20
2013-07-25T00:27:21
Python
UTF-8
Python
false
false
2,130
py
from django.test.testcases import TestCase from django.urls import reverse from parsifal.apps.authentication.tests.factories import UserFactory from parsifal.utils.test import login_redirect_url class TestUpdateEmailsViewView(TestCase): @classmethod def setUpTestData(cls): cls.user = UserFactory(emai...
b9fd420ff9cb37198ef9d9d480d07225dc750a1b
839d8d7ccfa54d046e22e31a2c6e86a520ee0fb5
/icore/base/list/dict_test.py
b6745b165a751dc40e63e211eac910f10f6e658e
[]
no_license
Erich6917/python_corepython
7b584dda737ef914780decca5dd401aa33328af5
0176c9be2684b838cf9613db40a45af213fa20d1
refs/heads/master
2023-02-11T12:46:31.789212
2021-01-05T06:21:24
2021-01-05T06:21:24
102,881,831
0
0
null
null
null
null
UTF-8
Python
false
false
222
py
# -*- coding: utf-8 -*- # @Time : 2017/12/26 # @Author : LIYUAN134 # @File : dict_test.py # @Commment: # import dict as dict def test1(): # dict.dict_mulkeys() dict.dict_cal() test1()
387a2c4e876cb2a1a446a27a40b003870afa741b
09e57dd1374713f06b70d7b37a580130d9bbab0d
/data/cirq_new/cirq_program/startCirq_noisy175.py
cc4f8f2ea5639c20ee3b44f313ca868e0ad2a42c
[ "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
1,957
py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=14 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode def make_circuit(n: int, input_qubit): c = cirq.Ci...
2f53b3f8271b60d22df54f72752eded981080e61
b697f5d8e441328c2deee1bb5853d80710ae9873
/617.合并二叉树.py
5d35a8098ff5d6b1d6488a23bbd84ef8e3088d55
[]
no_license
happy-luck/LeetCode-python
d06b0f6cf7bad4754e96e6a160e3a8fc495c0f95
63fc5a1f6e903a901ba799e77a2ee9df2b05543a
refs/heads/master
2021-03-22T16:12:52.097329
2020-07-15T13:48:37
2020-07-15T13:48:37
247,381,313
0
0
null
2020-03-15T01:47:42
2020-03-15T01:28:38
null
UTF-8
Python
false
false
2,281
py
方法一:递归 我们可以对这两棵树同时进行前序遍历,并将对应的节点进行合并。在遍历时,如果两棵树的当前节点均不为空,我们就将它们的值进行相加,并对它们的左孩子和右孩子进行递归合并;如果其中有一棵树为空,那么我们返回另一颗树作为结果;如果两棵树均为空,此时返回任意一棵树均可(因为都是空)。 class Solution: def mergeTrees(self, t1: TreeNode, t2: TreeNode) -> TreeNode: if t2==None: return t1 if t1==None: return t2 ...
d90dcbcb06450d0cec154190b117b2ccce514085
bce41eff7da75522f58d831251e1ed95d8809585
/services/web/project/apps/event/subscriptions/eventUpdateSubscription.py
88e5ae15e2e558fd56fb9935803408b5065f7dcb
[]
no_license
javillarreal/eventuality
be9728a19caef8c19d3d40e6dd5b90e57b5b63a1
5a543a9e6b5a3f014b670297e22f52a9884af4bb
refs/heads/master
2021-07-03T18:55:33.037863
2021-06-24T03:24:38
2021-06-24T03:24:38
204,239,198
1
0
null
2020-11-27T02:39:19
2019-08-25T03:05:17
Python
UTF-8
Python
false
false
696
py
import random import graphene from rx import Observable class RandomType(graphene.ObjectType): seconds = graphene.Int() random_int = graphene.Int() class Subscription(graphene.ObjectType): count_seconds = graphene.Int(up_to=graphene.Int()) random_int = graphene.Field(RandomType) ...
c87f6abacd4d1526c188c591e69870c485175606
f67e9154c3e077eaad349f85439d88820098a6fc
/Search/017_LetterCombOfPhoneNum.py
73ba53f513b92e34b6a16b00c4aef98076aeab44
[]
no_license
pondjames007/CodingPractice
0c159ae528d1e595df0f0a901ee1ab4dd8925a14
fb53fea229ac5a4d5ebce23216afaf7dc7214014
refs/heads/master
2020-06-08T02:31:04.569375
2020-01-15T20:41:34
2020-01-15T20:41:34
193,142,129
0
0
null
null
null
null
UTF-8
Python
false
false
873
py
# TIPS: # make a dictionary to map digit and char # go through all digits and find out all combinations class Solution: def letterCombinations(self, digits: str) -> List[str]: if not digits: return [] n_to_c = {} char = [*string.ascii_lowercase] start = 0 end = 0 ...
abe0955e886d8fbc9de7f3e7ad550af81be6cedb
5a07828016e8bafbea5dac8f83c8bfd5d0bfd603
/py_290w290/140304_srw_output.py
94f032f09c22370f14899c0b9c40b25777fbe84a
[]
no_license
JJHopkins/rajter_compare
db5b88d2c6c1efc0fead9b6ed40fb3cce36bedb4
2ba52f4f16cf2aca350a82ea58d0aa8f8866c47c
refs/heads/master
2020-06-04T23:53:57.089329
2014-04-08T18:02:30
2014-04-08T18:02:30
null
0
0
null
null
null
null
UTF-8
Python
false
false
7,695
py
#$ {\bf Free energy between two skewed cylinders (CG-10 in water). Full retarded result, function of separation $\ell$ and angle $\theta$} \\ #$ Equation 12: $G(\ell,\theta) = - \frac{ (\pi R_1^{2})(\pi R_2^{2}) }{2 \pi~\ell^{4} \sin{\theta}} \left( {\cal A}^{(0)}(\ell) + {\cal A}^{(2)}(\ell) \cos 2\theta \right)$ \\ #...
37694eb9518f87e68f56b733a3fbd604c4eddd79
11ad104b0309a2bffd7537d05e2ab3eaf4aed0ca
/homeassistant/components/rachio/device.py
9d7c30579394412becf75ff8253ffd54c62cc51b
[ "Apache-2.0" ]
permissive
koying/home-assistant
15e5d01a45fd4373b3d286e1b2ca5aba1311786d
9fc92ab04e0d1933cc23e89b4095714aee725f8b
refs/heads/dev
2023-06-24T01:15:12.150720
2020-11-01T12:27:33
2020-11-01T12:27:33
189,232,923
2
1
Apache-2.0
2023-01-13T06:04:15
2019-05-29T13:39:02
Python
UTF-8
Python
false
false
6,956
py
"""Adapter to wrap the rachiopy api for home assistant.""" import logging from typing import Optional from homeassistant.const import EVENT_HOMEASSISTANT_STOP, HTTP_OK from .const import ( KEY_DEVICES, KEY_ENABLED, KEY_EXTERNAL_ID, KEY_FLEX_SCHEDULES, KEY_ID, KEY_MAC_ADDRESS, KEY_MODEL, ...
5d2200a128aabb70c081dea75e660bd7b9a29f3e
b93c90054ede72fb706567e2b60a5e4bba5485d3
/cru/__init__.py
3f204900689b0e4ad473586a2413b190d0343060
[]
no_license
guziy/ShortPythonScripts
2568b92124003fa4b0c673c3ce872df623dff76c
17b1ed47231aa566c8af04e19cced49a795b37d8
refs/heads/master
2016-09-06T01:30:30.365172
2014-07-18T15:52:25
2014-07-18T15:52:25
null
0
0
null
null
null
null
UTF-8
Python
false
false
149
py
__author__ = 'huziy' import numpy as np def main(): #TODO: implement pass if __name__ == "__main__": main() print "Hello world"
b1067dbd1da869a3839d1527813c511360fafa32
17a7e1941d1f0e9e2747ce177344cf081aeb1aa0
/examples/sbm_arxiv_paper.py
21987364c3ea82ea603bf54540f87aceb88df3be
[]
no_license
abdcelikkanat/rangraphgen
413871bd757992c8c87f520c7fecbd18bc004eed
491a94ddd0d8682ae3e6a30921e9de73327acea8
refs/heads/master
2020-03-21T08:09:34.540550
2018-07-23T16:13:55
2018-07-23T16:13:55
138,324,601
0
0
null
null
null
null
UTF-8
Python
false
false
1,086
py
from sbm.sbm import SBM """ model = {} model['sbm_N'] = 100 # the number of nodes model['sbm_P'] = [[0.6, 0.2], [0.2, 0.8]] # edge probability matrix between nodes belonging different communities model['sbm_block_sizes'] = [40, 60] output_file = "../outputs/synthetic_" output_file += "n{}_p{}_sizes{}.gml".format(m...
39cc3029c96a86e815190984cebf90bce285fb25
7450483dd16f7dea4bef09a5166a67c7527b7ca2
/hw_8_stub.py
faed32fa97ff75a4f1b0a0c90f450a885d815fca
[]
no_license
rmvook/HW8_CMSC389R
604ec50cc225926e53692fc0ebcf366dc4914a98
03fad8af81e2e985d121d9fbdb2d0ed939534a81
refs/heads/master
2020-03-09T15:45:17.796936
2018-04-16T15:11:50
2018-04-16T15:11:50
128,867,479
0
0
null
null
null
null
UTF-8
Python
false
false
2,824
py
# do `curl http://starship.python.net/~gherman/programs/md5py/md5py.py > md5.py` # if you do not have it from the git repo import md5py, socket, hashlib, string, sys, os, time f = open("output.txt", "w") host = "159.89.236.106" # IP address or URL port = 5678 # port s = socket.socket(socket.AF_INET, socket.SOCK_ST...
bd3d8511ec40499ea66fcc1e2c71b26b17f8565d
cd79b7919fd0984c12e8acde8abda4290fd65b0f
/draftcast/settings.py
dbaf6a6cc14ebfb87a7c0db296138f30760cc41a
[]
no_license
rallen0150/nfl_draftcast
7d5d84352986349f0646a9199d3aa3b29bfac4a2
3f5f9980902ee73fbca3c5b3db4545179ff5208a
refs/heads/master
2021-01-20T04:43:00.356120
2017-04-29T14:45:16
2017-04-29T14:45:16
89,718,535
0
0
null
null
null
null
UTF-8
Python
false
false
3,349
py
""" Django settings for draftcast project. Generated by 'django-admin startproject' using Django 1.11. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os...
fed1af0912a71ebae30785c3e9dcaec26f4337f6
d29c1c1901b8f5aac07ea67c969f4e96e3642376
/venv/Scripts/pip-script.py
670e74ae05294d33a619274f5839d91a361a2800
[]
no_license
aljaserm/pdf
10f0f97572fb2021604e70aeb3ed2f8920668a12
4648703819260380ebc942bba31817e47821f23f
refs/heads/master
2020-08-29T20:41:32.846815
2019-12-12T00:03:21
2019-12-12T00:03:21
218,169,283
0
0
null
null
null
null
UTF-8
Python
false
false
429
py
#!C:\Users\aljas\OneDrive\Documents\Development\Python\pdf\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip' __requires__ = 'pip==10.0.1' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?...
aa6145e09b71b6311ef725f088a53c2d8f67c1e5
9743d5fd24822f79c156ad112229e25adb9ed6f6
/xai/brain/wordbase/otherforms/_hacking.py
5138e808004dfe243f61edf4bc4bd5dbb450c3c0
[ "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
218
py
#calss header class _HACKING(): def __init__(self,): self.name = "HACKING" self.definitions = hack self.parents = [] self.childen = [] self.properties = [] self.jsondata = {} self.basic = ['hack']
f378db34785d00813c8dcfbbeaac5e36f4951d2b
ec0b8bfe19b03e9c3bb13d9cfa9bd328fb9ca3f1
/res/packages/scripts/scripts/client/gui/prb_control/entities/battle_session/__init__.py
a41701b1d0acaedce8b7e47eb63a44121abed16e
[]
no_license
webiumsk/WOT-0.9.20.0
de3d7441c5d442f085c47a89fa58a83f1cd783f2
811cb4e1bca271372a1d837a268b6e0e915368bc
refs/heads/master
2021-01-20T22:11:45.505844
2017-08-29T20:11:38
2017-08-29T20:11:38
101,803,045
0
1
null
null
null
null
WINDOWS-1250
Python
false
false
401
py
# 2017.08.29 21:45:30 Střední Evropa (letní čas) # Embedded file name: scripts/client/gui/prb_control/entities/battle_session/__init__.py pass # okay decompyling c:\Users\PC\wotmods\files\originals\res\packages\scripts\scripts\client\gui\prb_control\entities\battle_session\__init__.pyc # decompiled 1 files: 1 okay, 0 ...
5c7e781861cf2f6c726c08b123b74dd794c2056e
5fa91971a552de35422698ad3e371392fd5eb48a
/docs/webflask/todo/todo_z4.py
7b5d27384609f0e5dd9f8849bc294038bdc06384
[ "MIT", "CC-BY-SA-4.0" ]
permissive
koduj-z-klasa/python101
64b0bf24da6c7fc29c0d3c5a74ce7975d648b760
accfca2a8a0f2b9eba884bffe31be6d1e73fb615
refs/heads/master
2022-06-06T09:29:01.688553
2022-05-22T19:50:09
2022-05-22T19:50:09
23,770,911
45
182
MIT
2022-03-31T10:40:13
2014-09-07T21:01:09
Python
UTF-8
Python
false
false
1,835
py
# -*- coding: utf-8 -*- # todo/todo.py from flask import Flask, g from flask import render_template import os import sqlite3 from datetime import datetime from flask import flash, redirect, url_for, request app = Flask(__name__) app.config.update(dict( SECRET_KEY='bardzosekretnawartosc', DATABASE=os.path.jo...
74305ab38ac0340b375cb8afb1b90ea07fd23e36
bf24b73282ae80b7ff813f2d794bdace9421b017
/carapace/carapace/doctype/rejection_gate_entry_items/rejection_gate_entry_items.py
b3a21751d4d81fda563dfdc4c1c7c58850e5338e
[ "MIT" ]
permissive
hrgadeha/carapace
8d78cc8d45c1de0293204dfbd47802e1eebf87ee
3c001422c6b05644a52f6250c55526b23cbd4320
refs/heads/master
2022-01-20T11:37:26.765923
2022-01-09T09:38:57
2022-01-09T09:38:57
163,376,460
0
1
null
null
null
null
UTF-8
Python
false
false
266
py
# -*- coding: utf-8 -*- # Copyright (c) 2019, frappe and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class RejectionGateEntryitems(Document): pass
8cbc7c2bbd2aaea3b6bd0378c72ca37769c8035d
955b968d46b4c436be55daf8aa1b8fc8fe402610
/ch04/baidu_screenshot.py
c3aca7449f0e884890aadc2bfc8ba7f2977f6243
[]
no_license
han-huang/python_selenium
1c8159fd1421b1f0e87cb0df20ae4fe82450f879
56f9f5e5687cf533c678a1c12e1ecaa4c50a7795
refs/heads/master
2020-03-09T02:24:48.882279
2018-04-07T15:06:18
2018-04-07T15:06:18
128,535,917
0
0
null
null
null
null
UTF-8
Python
false
false
1,010
py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from time import sleep, ctime from selenium import webdriver import os driver = webdriver.Firefox() # driver = webdriver.Chrome() driver.get("http://www.baidu.com") # http://selenium-python.readthedocs.io/api.html?highlight=get_screenshot_as_file#selenium.webdriver.remote....
[ "vagrant@LaravelDemoSite" ]
vagrant@LaravelDemoSite
ca84176dcc4543867190893bc2a6e3aca04b239d
107941a50c3adc621563fe0254fd407ea38d752e
/spider_01.py
32d42c2a2ca6ef3b58162d8cb4c81ff8efba1721
[]
no_license
zhangliang852469/spider_
758a4820f8bd25ef6ad0edbd5a4efbaaa410ae08
718208c4d8e6752bbe8d66a209e6d7446c81d139
refs/heads/master
2020-04-05T07:12:03.790358
2018-11-08T07:17:22
2018-11-08T07:17:22
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,409
py
#!/usr/bin/env python3 # -*- coding:utf-8 -*- """ 查找节点 例:淘宝""" """ find_element_by_id find_element_by_name find_element_by_xpath find_element_by_link_text find_element_by_partial_link_text find_element_by_tag_name find_element_by_class_name find_element_by_css_selector """ from selenium import webdriver # 首先初始化启动浏览器 ...
2eff427266939ed01872e9d20210444fb49759ed
7966fa31437cc8a539621a5a0642ce24c1c9de50
/PycharmProjects/segmentTree/sgrTree.py
29d3a3b49750c8b91cbbe7e14c980ac9783aa1fe
[]
no_license
crystal30/DataStructure
4f938508f4c60af9c5f8ec5520d5acedbe2dc90e
c55b0cfd2967a2221c27ed738e8de15034775945
refs/heads/master
2021-06-25T17:49:03.048853
2021-01-22T00:37:04
2021-01-22T00:37:04
192,374,326
0
0
null
null
null
null
UTF-8
Python
false
false
2,804
py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- class SegTree(): def __init__(self, data): self.__data = data self.__tree = [None]*len(data)*4 def getSize(self): return len(self.__data) def getIndex(self, index): return self.getIndex(index) # 左孩子节点 def __leftChild...
f16a59cbded9413a22d9a9d7d5816f14d3b4749e
f445450ac693b466ca20b42f1ac82071d32dd991
/generated_tempdir_2019_09_15_163300/generated_part005112.py
f6ccb551e9b49171345708249fe74b4524d23c9a
[]
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
2,369
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....
07684dae8331e4090c1d7c0b30f6d7355bdf19e3
0a3627e849caf21a0385079dea5bf81d4a281b72
/ret2win32/pwngetshell.py
b3855cdd460b10fec5f32763e9e33a89877fc403
[]
no_license
surajsinghbisht054/ROP-Emporium-walkthrough-collection
7e0b3e4aadb4bf4a901c3788fe9fe8a56d047f0d
4e9ac3f732c6af5ae5fd65e6ca7e3964fc8a3790
refs/heads/master
2020-04-14T13:45:04.356322
2019-01-02T19:01:39
2019-01-02T19:01:39
163,877,814
0
0
null
null
null
null
UTF-8
Python
false
false
2,283
py
#!/usr/bin/python from struct import pack import pwn # ================================================== # Usages: (python exp.py; cat) | ./binaryName # ================================================= #+ ------------------------------------------------------------------ + #= +-------------------------------------...
c6a7fbd32d85a9e5f274cc76bf525b7c4eb7bf77
33febf8b617ef66d7086765f1c0bf6523667a959
/probpy/distributions/uniform.py
3b06514b722dc180d8f041489b3cc970add316b3
[]
no_license
JonasRSV/probpy
857201c7f122461463b75d63e5c688e011615292
5203063db612b2b2bc0434a7f2a02c9d2e27ed6a
refs/heads/master
2022-07-07T06:17:44.504570
2020-04-15T14:52:20
2020-04-15T14:52:20
245,820,195
1
0
null
null
null
null
UTF-8
Python
false
false
5,578
py
import numpy as np import numba from typing import Tuple from probpy.core import Distribution, RandomVariable, Parameter class Uniform(Distribution): """Uniform Distribution""" a = "a" b = "b" @classmethod def med(cls, a: np.float = None, b: np.float = None) -> RandomVariable: """ ...
7918ac56d5849d5397eee17e699ba9a45cf94e5f
b2c896ca9f2acb81115708ce6cf8d01396e71a18
/capybara/tests/session/element/test_matches_selector.py
ff60142d44cd19b211832859a9ff8d2200284aea
[ "MIT" ]
permissive
elliterate/capybara.py
b846f3cb1a712a120361849b378d437775c2c6db
eafd9ac50d02e8b57ef90d767493c8fa2be0739a
refs/heads/master
2023-08-16T13:56:51.506840
2022-01-16T18:04:22
2022-01-16T18:04:22
64,620,050
63
22
MIT
2022-01-16T18:04:23
2016-07-31T23:02:18
Python
UTF-8
Python
false
false
3,002
py
import pytest import capybara class MatchesSelectorTestCase: @pytest.fixture(autouse=True) def setup_session(self, session): session.visit("/with_html") @pytest.fixture def element(self, session): return session.find("//span", text="42") class TestMatchesSelector(MatchesSelectorTes...
e7d128e1500aba2f7670ba59a46061cdec915f47
069d2985895eefe33454e57ff2d85b9fa8aa7fa0
/run.py
df4f5781aa2fc97d2b52b3f42b8ed9f9d8363f45
[]
no_license
KIRA009/formbuilder
8a6dd2949b42560f3b7cbad4b2c00e32e09ff55f
880fdbe211d80c31870dd8da84e376de9598b738
refs/heads/master
2023-02-05T16:42:08.806984
2019-07-02T18:34:05
2019-07-02T18:34:05
194,048,846
1
1
null
2023-02-02T06:32:31
2019-06-27T07:52:40
JavaScript
UTF-8
Python
false
false
253
py
from app_builder import build_app import os ROOT_DIR = os.getcwd() app, db, migrate, login_manager = build_app(app_name=__name__, env_path=ROOT_DIR + '\.env', config_env='SETTINGS') from myapp.views import * if __name__ == '__main__': app.run()
413ca2abc71b33a69400411278b07e243fbf15a8
e4910c4b436223859d91f3569cadafa69a3c777b
/src/racecar/scripts/keyboard.py
c8c26dd85a147588db69800067b55328e93f0960
[ "BSD-3-Clause" ]
permissive
pmusau17/F1TenthHardware
81ae6870e15c1fe39a1f386b8bcfaa653bf2675c
3ae3ab1cedd89e56db2fbabe24f1c6a79d3553d9
refs/heads/master
2023-04-01T09:02:12.635614
2021-04-07T16:34:17
2021-04-07T16:34:17
298,356,593
3
0
null
null
null
null
UTF-8
Python
false
false
2,059
py
#!/usr/bin/env python import rospy from racecar.msg import drive_param from ackermann_msgs.msg import AckermannDriveStamped import sys, select, termios, tty keyBindings = { 'w':(1,0), 'd':(1,-1), 'a':(1,1), 's':(-1,0), } def getKey(): tty.setraw(sys.stdin.fileno()) select.select([sys.stdin], [], [],...
06c5cd504516c90e7f07c7a903062d100667cc1e
600df3590cce1fe49b9a96e9ca5b5242884a2a70
/third_party/catapult/third_party/py_vulcanize/py_vulcanize/parse_html_deps.py
6fbe31daac48d0626acb4efdd44a3050c975ead4
[ "LGPL-2.0-or-later", "GPL-1.0-or-later", "MIT", "Apache-2.0", "BSD-3-Clause" ]
permissive
metux/chromium-suckless
efd087ba4f4070a6caac5bfbfb0f7a4e2f3c438a
72a05af97787001756bae2511b7985e61498c965
refs/heads/orig
2022-12-04T23:53:58.681218
2017-04-30T10:59:06
2017-04-30T23:35:58
89,884,931
5
3
BSD-3-Clause
2022-11-23T20:52:53
2017-05-01T00:09:08
null
UTF-8
Python
false
false
5,738
py
# Copyright (c) 2013 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. import os import sys from py_vulcanize import module from py_vulcanize import strip_js_comments from py_vulcanize import html_generation_controller de...
1132547772e06d6b2ee93fee62cd3605b759ec0c
60a831fb3c92a9d2a2b52ff7f5a0f665d4692a24
/IronPythonStubs/release/stubs.min/Autodesk/Revit/DB/__init___parts/BindingMap.py
686d18be3c7071d131cd785f06980c6c9a4a0c07
[ "MIT" ]
permissive
shnlmn/Rhino-Grasshopper-Scripts
a9411098c5d1bbc55feb782def565d535b27b709
0e43c3c1d09fb12cdbd86a3c4e2ba49982e0f823
refs/heads/master
2020-04-10T18:59:43.518140
2020-04-08T02:49:07
2020-04-08T02:49:07
161,219,695
11
2
null
null
null
null
UTF-8
Python
false
false
4,051
py
class BindingMap(DefinitionBindingMap,IDisposable,IEnumerable): """ The parameters BindingMap contains all the parameter bindings that exist in the Autodesk Revit project. """ def Clear(self): """ Clear(self: BindingMap) This method is used to remove all the items in the map. """ pass def Contains(se...
45ae02db652e3be0161f27e1c06dc8c4cd2cc2e5
11398875e4f5cbcadc1747e73049dc99bca26908
/06-time/time-01.py
7f952d5930c3c2ef4b13a8eec60178b112e90857
[]
no_license
asvkarthick/LearnPython
37910faab5c4a18d6e08eb304ca1da9649e5b18f
258e8c567ca3c8802d5e56f20b34317eba4c75f3
refs/heads/master
2021-06-23T06:30:46.681369
2021-06-11T19:35:40
2021-06-11T19:35:40
149,719,196
0
0
null
null
null
null
UTF-8
Python
false
false
143
py
#!/usr/bin/python # Author: Karthick Kumaran <[email protected]> import time print('Sleeping for 2 seconds') time.sleep(2) print('Done')
83774ee8ba86d36addb91c1a11753509b4785fd5
16a2ac198a36d7633c62d41f4604356cd0ae732e
/Au-public-master/iron/utilities/rename_to_pacbio.py
7b73810b42d4d374c9af78099e87739af78271c2
[ "Apache-2.0" ]
permissive
Dingjie-Wang/Manual-for-running-IDP-pipeline
f433ba5b0dbd44da5a9d8836b3e29a27e12a48c4
6c2756e10184f0b8f0e5872a358378e90f1729b0
refs/heads/master
2021-06-29T04:02:56.741203
2020-12-07T17:39:05
2020-12-07T17:39:05
201,325,604
1
7
null
null
null
null
UTF-8
Python
false
false
1,878
py
#!/usr/bin/python import sys,argparse from SequenceBasics import FastaHandleReader, FastqHandleReader def main(): parser = argparse.ArgumentParser() parser.add_argument('input',help="Use - for STDIN") group = parser.add_mutually_exclusive_group(required=True) group.add_argument('--fasta',action='store_true') ...
fdc482ebab30deb95941025999cd0e9ef8238969
b6cf41b1eadb6571e30998712da651ec62db07ad
/Gui/TextEdit.py
ceb67896e0bb84b333873a5b082f3dbedb16f3f7
[]
no_license
fdanesse/CoralEditor
8d1949ff86af61d44d573d544a3b76dbc182b5d4
e42239f75ee921c99d13e60758b32ca5862c303f
refs/heads/master
2021-08-14T07:14:19.203753
2017-11-15T00:06:11
2017-11-15T00:06:11
107,883,737
0
0
null
null
null
null
UTF-8
Python
false
false
6,380
py
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os from PyQt5.QtCore import Qt from PyQt5.QtCore import QEvent from PyQt5.QtWidgets import QPlainTextEdit from PyQt5.QtWidgets import QApplication from PyQt5.QtGui import QPalette from PyQt5.QtGui import QColor from PyQt5.QtGui import QFont from PyQt5.QtGui import Q...
2cbcad6a307bd6d1b5101f9e5781d7caaa236d91
09e57dd1374713f06b70d7b37a580130d9bbab0d
/benchmark/startQiskit_QC1087.py
70d9c4bc57bcaa206e68809763018b4b54d22d38
[ "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
4,454
py
# qubit number=5 # total number=50 import cirq import qiskit from qiskit import IBMQ from qiskit.providers.ibmq import least_busy from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from ma...
7620c16b70a5011be660188673a3d70cf943f517
f305f84ea6f721c2391300f0a60e21d2ce14f2a5
/4_set/6265. 统计相似字符串对的数目-frozenset.py
a37db3b54e7eb3a906c7279c7abccaff4e9548a7
[]
no_license
981377660LMT/algorithm-study
f2ada3e6959338ae1bc21934a84f7314a8ecff82
7e79e26bb8f641868561b186e34c1127ed63c9e0
refs/heads/master
2023-09-01T18:26:16.525579
2023-09-01T12:21:58
2023-09-01T12:21:58
385,861,235
225
24
null
null
null
null
UTF-8
Python
false
false
786
py
from typing import List from collections import Counter # 给你一个下标从 0 开始的字符串数组 words 。 # 如果两个字符串由相同的字符组成,则认为这两个字符串 相似 。 # 例如,"abca" 和 "cba" 相似,因为它们都由字符 'a'、'b'、'c' 组成。 # 然而,"abacba" 和 "bcfd" 不相似,因为它们不是相同字符组成的。 # 请你找出满足字符串 words[i] 和 words[j] 相似的下标对 (i, j) ,并返回下标对的数目,其中 0 <= i < j <= word.length - 1 。 c...
8ba8ac218525fe114aef069e508dbd337d9c8b19
eeeba145ae4b6df7b5d95cc70d476a01dba6c5fe
/PythonStudy/func_test/lambda_test.py
52286c0eb1edd88d86870e484d66ce35fd90a1e7
[]
no_license
liujinguang/pystudy
0ceb58652777f99d4cfe3e143ff11ea44c7e3a74
d2e4366cfd5e74197fc9ec560eb50dbd508cbcc2
refs/heads/master
2020-12-23T13:11:42.556255
2017-06-28T13:03:26
2017-06-28T13:03:26
92,559,516
0
0
null
null
null
null
UTF-8
Python
false
false
356
py
#/usr/bin/python # -*- coding: UTF-8 -*- ''' Created on 2017年5月31日 @author: bob ''' def multipliers(): return [lambda x : i * x for i in range(4)] print [m(2) for m in multipliers()] def multipliers_v1(): for i in range(4): yield lambda x: i * x print [m(2) for m in multipliers_v1()] if __...
d31988b13f42acd2ad1577ce07a0b7e8506e7ce8
925dc0d981391e4538401a7af88fcac25921ccab
/emission/net/api/metrics.py
20e6b0f9fd1e9cee84bd6847b0c0a85cce6b0ff9
[ "BSD-3-Clause" ]
permissive
gtfierro/e-mission-server
0e75742301b3de8d8dd71e6bc3a6e7c0bfe48ee7
b10c5da080b741b28eccf8cb7413ace3063eaaac
refs/heads/master
2021-01-19T11:58:24.441986
2016-09-30T09:00:54
2016-09-30T09:00:54
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,203
py
import logging import emission.analysis.result.metrics.time_grouping as earmt import emission.analysis.result.metrics.simple_metrics as earms def summarize_by_timestamp(user_id, start_ts, end_ts, freq, metric_name): return _call_group_fn(earmt.group_by_timestamp, user_id, start_ts, end_ts, ...
9c263e0f31066de90cfb7168e44d3f1faaff0d99
a3d6556180e74af7b555f8d47d3fea55b94bcbda
/ios/chrome/browser/flags/DEPS
458d0f02f4f533615b90bc6bce32a1ece69f84f1
[ "BSD-3-Clause" ]
permissive
chromium/chromium
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
refs/heads/main
2023-08-24T00:35:12.585945
2023-08-23T22:01:11
2023-08-23T22:01:11
120,360,765
17,408
7,102
BSD-3-Clause
2023-09-10T23:44:27
2018-02-05T20:55:32
null
UTF-8
Python
false
false
405
specific_include_rules = { # Flag list can depends on everything. "^about_flags.mm": [ "+ios/chrome/browser", ], "^ios_chrome_field_trials.mm": [ "+ios/chrome/browser/variations", "+ios/chrome/browser/ui/content_suggestions", "+ios/chrome/browser/ui/first_run", "+ios/chrome/browser/ui/ntp", ...
865e42f9823db183fe0a661b7ee6ecce678f9a25
ae411ea0e0c373d18681d707800995264379be25
/mic.py
df6a5aaf7b2e2a2e146caccea681f70963c889f7
[]
no_license
Symfomany/tensor
22ad4b0710d705d1ec47e3512431c2ca74ca3948
2b8471f7aab6a7a234bd89942118bbadf4058352
refs/heads/master
2022-12-21T14:53:03.349221
2019-02-21T10:39:31
2019-02-21T10:39:31
171,100,643
0
0
null
2022-12-09T13:17:30
2019-02-17T08:51:46
Jupyter Notebook
UTF-8
Python
false
false
4,912
py
#!/usr/bin/env python import pyaudio import struct import math import time,sys import threading INITIAL_TAP_THRESHOLD = 0.010 FORMAT = pyaudio.paInt16 SHORT_NORMALIZE = (1.0/32768.0) CHANNELS = 1 RATE = 16000 INPUT_BLOCK_TIME = 0.05 INPUT_FRAMES_PER_BLOCK = int(RATE*INPUT_BLOCK_TIME) OVERSENSITIVE = 15.0/INPUT_B...
b956a071a1cd830747a03be5cfbe515c771eb205
5eba0ee342adf574664ef2c5b2a9787f28ad9e4a
/core/utils/auth.py
35059117c9a7332bc93e926280bf0e24a81a7e90
[]
no_license
nagibator95/ejudge-front
2775875bd8d8367674b3c5c372b5fafa77167aac
ca355f473702561047da030b7d4a12af06539395
refs/heads/master
2020-04-10T06:59:53.873278
2018-12-20T20:15:36
2018-12-20T20:15:36
160,870,700
0
0
null
null
null
null
UTF-8
Python
false
false
568
py
from flask import request from werkzeug.exceptions import Forbidden def get_api_key_checker(key) -> callable: """ Function which returns function which checks request api key Basic usage: app = Flask() app.before_request(get_api_key_checker(<my-secret-string>)) Raises ------ ...
9ac19c4aea106efafa3ec76b9113214d59ee531f
d20d7d0887e044cb369687629eee04d03bc6ac15
/grano/logic/projects.py
cc54f580a84a76c3afff8ddffdeb95bdd13d3aa3
[ "MIT" ]
permissive
nimblemachine/grano
947812bdd2a861e7d62bd081423df2723891989a
ffbd3f974867334d396d536bd000a20a314f9fc6
refs/heads/master
2021-01-18T11:24:51.750426
2014-03-24T10:39:35
2014-03-24T10:39:35
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,796
py
import colander from datetime import datetime from grano.core import app, db, url_for from grano.lib.exc import NotImplemented from grano.logic.validation import database_name from grano.logic.references import AccountRef from grano.logic import accounts from grano.model import Project def validate(data, project): ...
2a7f70925be3844266a29d8d9c3d9824794a0c0f
dfab6798ece135946aebb08f93f162c37dd51791
/core/luban/controller/Actor.py
8452c92ace1f56996ae2ccc29b60f307a6a30f4f
[]
no_license
yxqd/luban
405f5f7dcf09015d214079fe7e23d644332be069
00f699d15c572c8bf160516d582fa37f84ac2023
refs/heads/master
2020-03-20T23:08:45.153471
2012-05-18T14:52:43
2012-05-18T14:52:43
137,831,650
0
0
null
null
null
null
UTF-8
Python
false
false
1,679
py
# -*- Python -*- # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Jiao Lin # California Institute of Technology # (C) 2006-2011 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
5bcff8ae4c42c2bafb1c80881769ed67f44ea8e9
f2889a13368b59d8b82f7def1a31a6277b6518b7
/256.py
d94465af0b09e0a288eb3073779e9c08ea3bc589
[]
no_license
htl1126/leetcode
dacde03de5c9c967e527c4c3b29a4547154e11b3
c33559dc5e0bf6879bb3462ab65a9446a66d19f6
refs/heads/master
2023-09-01T14:57:57.302544
2023-08-25T15:50:56
2023-08-25T15:50:56
29,514,867
7
1
null
null
null
null
UTF-8
Python
false
false
452
py
# ref: https://discuss.leetcode.com/topic/21337/1-lines-ruby-python class Solution(object): def minCost(self, costs): """ :type costs: List[List[int]] :rtype: int """ prev = [0] * 3 for now in costs: prev = [now[i] + min(prev[:i] + prev[i + 1:]) for i in...
0df69e3db7af12577fa662d3a36c94d62a749ea6
303bac96502e5b1666c05afd6c2e85cf33f19d8c
/solutions/python3/257.py
de9a0c8a3c1cbc818b3466259db95a34a7020459
[ "MIT" ]
permissive
jxhangithub/leetcode
5e82f4aeee1bf201e93e889e5c4ded2fcda90437
0de1af607557d95856f0e4c2a12a56c8c57d731d
refs/heads/master
2022-05-22T12:57:54.251281
2022-03-09T22:36:20
2022-03-09T22:36:20
370,508,127
1
0
MIT
2022-03-09T22:36:20
2021-05-24T23:16:10
null
UTF-8
Python
false
false
678
py
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def binaryTreePaths(self, root: TreeNode) -> List[str]: def dfs(node, arr): if not node.right and not node.left: ...
d22cf8a285c59ddf0e21693168cc10d8de3a8edf
0729155365ebd2e8761068bda78060f0c2d6e6a7
/Class And Object Programs/3__Calculate the Area and Perimeter of Circle Using The Class.py
412cc99095898ee61f62e70e3823075e3ba7c024
[]
no_license
mukeshrock7897/Class-And-Object-Programs
a0ce41b19ebdd87bb037ca742069f98c59c21847
a6cf378ab4c5a3d95a46867b5414b44955838782
refs/heads/master
2020-04-24T05:04:53.234277
2019-02-20T18:10:25
2019-02-20T18:10:25
171,724,815
2
0
null
null
null
null
UTF-8
Python
false
false
378
py
import math class Circle: def __init__(self,radius): self.radius=radius def area(self): return math.pi*(self.radius**2) def perimeter(self): return 2*math.pi*self.radius radius=int(input("Enter The Radius Of Circle::")) obj=Circle(radius) print("Area Of Circle::",round(obj.area(),2)...
e0004b0b6df60bd3030ff004ed0bbefc869e38b4
10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94
/Python/minimum-string-length-after-removing-substrings.py
48bab73ecbf57ba9c36b9cfb91378585932a9056
[ "MIT" ]
permissive
kamyu104/LeetCode-Solutions
f54822059405ef4df737d2e9898b024f051fd525
4dc4e6642dc92f1983c13564cc0fd99917cab358
refs/heads/master
2023-09-02T13:48:26.830566
2023-08-28T10:11:12
2023-08-28T10:11:12
152,631,182
4,549
1,651
MIT
2023-05-31T06:10:33
2018-10-11T17:38:35
C++
UTF-8
Python
false
false
381
py
# Time: O(n) # Space: O(n) # stack class Solution(object): def minLength(self, s): """ :type s: str :rtype: int """ stk = [] for c in s: if stk and ((stk[-1] == 'A' and c == 'B') or (stk[-1] == 'C' and c == 'D')): stk.pop() ...
606477f67edd3313746f9af6bd76d0bcc0b0f20d
9743d5fd24822f79c156ad112229e25adb9ed6f6
/xai/brain/wordbase/otherforms/_salaams.py
1de6f8529dce67507995a11f6402f5e970de1ab1
[ "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
222
py
#calss header class _SALAAMS(): def __init__(self,): self.name = "SALAAMS" self.definitions = salaam self.parents = [] self.childen = [] self.properties = [] self.jsondata = {} self.basic = ['salaam']
e0a001fca791b06a772558c84bf3d8c100a2c4dd
ba3a705ecb3628641793854292aa9a3ff8fc1221
/10_API/FlaskIntroduction/app.py
0a23ab3144d2a8d92dd00599475768d8da80d806
[]
no_license
mortenhaahr/NGK
d98ada8d63a07ea6447768ab6a23ad1346634b56
a9e89afb452dd7953cba4403b4e8bc2c0ff2ba1e
refs/heads/master
2022-07-01T20:39:02.063251
2020-05-11T15:40:26
2020-05-11T15:40:26
242,725,171
0
0
null
null
null
null
UTF-8
Python
false
false
2,516
py
from flask import Flask, render_template, url_for, request, redirect from flask_sqlalchemy import SQLAlchemy from datetime import datetime app = Flask(__name__) #__name__ = filename app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db' # 3 forward slashes for relative path db = SQLAlchemy(app) # Pass in app to d...
393267ba2fca5a36bba7334d69ab49829c14bc68
84d84096b413e84f502468a2985780a3005457a1
/api/orders/views.py
1daaf6e39ac7835363150b9c1afaa1afd0c60dcf
[ "MIT" ]
permissive
joeltio/np-train
0fd28fe45bdc9c29aee99819ca07798392e13fd1
dc852321b674be3ddc1d1c0dd4eff694825d02fa
refs/heads/master
2020-04-14T18:56:57.714933
2019-01-10T01:58:09
2019-01-10T01:58:09
164,039,036
0
0
null
null
null
null
UTF-8
Python
false
false
4,984
py
import json from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from orders.models import Order import base.helpers as base_helpers @csrf_exempt @require_POST def uncompleted_order(request): # Get the latest uncompleted order order = Order.objects.filte...
3dcadaa240a921e97bab29a8008a1b83bac8c93d
f3081f31875dc539529d1ef24a6ddedbb1cd5ad3
/website_sale/tests/test_website_sale_cart_recovery.py
ac597616882ce66ce7ca4ffa447974a46ef75571
[]
no_license
babarlhr/human_website_13
5ef144c65c8eb268b40c144e0073d8d2084014ed
e9d68d29959a7df3f56eadebe413556b11957ace
refs/heads/master
2022-11-06T09:02:17.301645
2020-06-21T10:32:16
2020-06-21T10:32:16
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,475
py
# -*- coding: utf-8 -*- # Part of Eagle. See LICENSE file for full copyright and licensing details. from eagle.tests import tagged from eagle.tests.common import HttpCase, TransactionCase @tagged('post_install', '-at_install') class TestWebsiteSaleCartRecovery(HttpCase): def test_01_info_cart_recovery_tour(self...
51a07e0d65cb1b371d2bd13a78da51bcdb23a186
e2e08d7c97398a42e6554f913ee27340226994d9
/pyautoTest-master(ICF-7.5.0)/test_case/scg/scg_OSPF/test_c140943.py
12482ba174a604d783884977f16e6d32bb34b597
[]
no_license
lizhuoya1111/Automated_testing_practice
88e7be512e831d279324ad710946232377fb4c01
b3a532d33ddeb8d01fff315bcd59b451befdef23
refs/heads/master
2022-12-04T08:19:29.806445
2020-08-14T03:51:20
2020-08-14T03:51:20
287,426,498
0
0
null
null
null
null
UTF-8
Python
false
false
1,490
py
import pytest import time import sys from os.path import dirname, abspath sys.path.insert(0, dirname(dirname(abspath(__file__)))) from page_obj.scg.scg_def_ospf import * from page_obj.scg.scg_def_vlan_interface import * from page_obj.scg.scg_def_bridge import * from page_obj.common.rail import * from page_ob...
5d635a8b03cfb360411bed2715e152f9905483f0
399dae0b5ad9ca27cde175d25b5435958674eb50
/Script Monitors/Generates Alert if Windows Update is not Downloaded for 60 Days/generates-alert-if-windows-update-is-not-downloaded-for-60-days.py
1cf0fac3bd8feb56d27fbdf8ec5719d79ccc253a
[]
no_license
kannanch/pythonscripts
61e3ea9e8ebf6a6b0ec2a4a829664e4507b803ba
843a522236f9c2cc2aadc68d504c71bb72600bd9
refs/heads/master
2020-06-12T11:18:00.404673
2019-06-28T11:24:37
2019-06-28T11:24:37
194,282,297
1
0
null
2019-06-28T13:55:56
2019-06-28T13:55:56
null
UTF-8
Python
false
false
2,778
py
# The script is a template to check UAC status on device. import os import sys import _winreg def alert(arg): sys.stderr.write("%d%d%d" % (arg, arg, arg)) vbs=r''' Set objSession = CreateObject("Microsoft.Update.Session") Set objSearcher = objSession.CreateUpdateSearcher Set colHistory = objSear...
c2321c30432183d23b15ae143923eaf6ad07ae89
7cdb18e0a7ef01a34ec602bb31aa915c482fcd24
/hujian_api/API_service/Course/c_class.py
3025bce96eba7f43eb8eea3acbd91dd212fd1b56
[]
no_license
wangdan377/Python_API
6adac56974f9c6af238895a3101db0e3f0667ba1
38b31d4d02740d359a7e47fb3a3975045f00288e
refs/heads/master
2023-02-18T14:39:03.009815
2021-01-20T12:59:52
2021-01-20T12:59:52
311,855,608
0
1
null
null
null
null
UTF-8
Python
false
false
2,712
py
import pytest import allure import requests import json import time import random from Common import Post from Common import Get from Common import Assert from Common import Consts class Editor_filter: #登录 def filter_00(self): sessionX = requests.session() post_req = Post.Post() ass = Ass...
72a060428592795437ae3329b7ec56762c28a05b
7275f7454ce7c3ce519aba81b3c99994d81a56d3
/Programming-Collective-Intelligence/ch07/main.py
cea965bec22a5c20cdc4081bc9c0948547ffe229
[]
no_license
chengqiangaoci/back
b4c964b17fb4b9e97ab7bf0e607bdc13e2724f06
a26da4e4f088afb57c4122eedb0cd42bb3052b16
refs/heads/master
2020-03-22T08:36:48.360430
2018-08-10T03:53:55
2018-08-10T03:53:55
139,777,994
0
1
null
null
null
null
UTF-8
Python
false
false
1,135
py
import treepredict # main function # print('<----DivideSet---->') # for item in treepredict.divideset(treepredict.my_data, 2, 'yes'): # print(item) # print('\n<----Build and Display the Tree---->') tree = treepredict.buildtree(treepredict.my_data) treepredict.printtree(tree) # # print('\n<----Graphical Display----...
ada9eb0e3ce075ebc01f1203fd530aaf833dafc4
4bdb8e324a833c10380bb7b1f436d1e9629c873c
/Ekeopara_Praise/Phase 1/Python Basic 1/Day2 Tasks/Task 5.py
1d1d5cde955ffa3a4b7be09d0ba0fa45cd7803f2
[ "MIT" ]
permissive
dreamchild7/python-challenge-solutions
e3831a57447f6132dd098be8b941cc27db92ace2
29e2ca780e86fc8a3e9d4def897c26bfa6d6493d
refs/heads/master
2022-11-08T17:23:57.763110
2020-06-19T08:38:20
2020-06-19T08:38:20
263,923,130
0
0
MIT
2020-05-14T13:29:33
2020-05-14T13:29:32
null
UTF-8
Python
false
false
253
py
#5. Write a Python program which accepts the user's first and last name and print them in reverse order with a space between them. f_name = str(input("Enter your first name: ")) l_name = str(input("Enter your last name: ")) print(f"{l_name} {f_name}")
186c553da83db53ac91681c5d1650c41cc85b315
c4702d1a06640555829b367852138cc93ba4a161
/dym_work_order/report/dym_work_order_wip_report.py
5f8b0c3e31094e8bc280dd6611091fac61612f93
[]
no_license
Rizalimami/dym
0ecadf9c049b22ebfebf92e4eab6eaad17dd3e26
af1bcf7b77a3212bc8a8a0e41e6042a134587ed4
refs/heads/master
2020-04-08T10:56:43.605698
2018-11-27T06:44:08
2018-11-27T06:44:08
159,287,876
0
2
null
null
null
null
UTF-8
Python
false
false
2,475
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...
753ad43022f7a3191bb72fa131af59d5a1d65fe8
b92fb53a2bebb8fd534258666b5ac9b9703af44b
/backend/home/migrations/0002_load_initial_data.py
64a22060ef08f587e02ba57b0fdf868eb35edced
[]
no_license
crowdbotics-apps/my-books-17969
7d017780d7c51210820d153dcab35e1196cb9652
3f4f66c998bce11289b1fd2bdd74d2cf769cc2f0
refs/heads/master
2022-10-07T11:09:54.346439
2020-06-09T18:14:21
2020-06-09T18:14:21
271,076,921
0
0
null
null
null
null
UTF-8
Python
false
false
1,286
py
from django.db import migrations def create_customtext(apps, schema_editor): CustomText = apps.get_model("home", "CustomText") customtext_title = "My Books" CustomText.objects.create(title=customtext_title) def create_homepage(apps, schema_editor): HomePage = apps.get_model("home", "HomePage") ...
dc757c59fdf8ee93aa9bf252e1823c13c8c21ba9
9bd82e484b3d32c4059ef57dec70e64bced8dde7
/OTB/OTB/pipelines.py
693eeb3a38760be718dbda4b5478b7a5cebc9419
[ "MIT" ]
permissive
houzw/knowledge-base-data
8a4df88558edcc5fcc25bac82788c6eb96119854
60771e8bf300227e1a26c9e77f56b09d23acd64a
refs/heads/master
2021-06-02T02:28:09.624790
2020-10-21T07:02:26
2020-10-21T07:02:26
148,170,033
0
1
null
null
null
null
UTF-8
Python
false
false
284
py
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html class OtbPipeline(object): def process_item(self, item, spider): return item
e16b8c9808ebc38687cf672a338a6f901cd42936
9f1039075cc611198a988034429afed6ec6d7408
/tensorflow-stubs/contrib/framework/python/framework/checkpoint_utils.pyi
e6e501dad7d3fcdf5bcb59bd42acdb9afc2b5d9c
[]
no_license
matangover/tensorflow-stubs
9422fbb1cb3a3638958d621461291c315f9c6ec2
664bd995ef24f05ba2b3867d979d23ee845cb652
refs/heads/master
2020-05-23T12:03:40.996675
2019-05-15T06:21:43
2019-05-15T06:21:43
186,748,093
0
0
null
null
null
null
UTF-8
Python
false
false
650
pyi
# Stubs for tensorflow.contrib.framework.python.framework.checkpoint_utils (Python 3) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from tensorflow.python.ops import io_ops as io_ops, state_ops as state_ops, variables as variables from tensorflow.python.platform import gfile as gfile fr...
22a0ca8e1e08f8516eb0a7d34b276c7390c35474
c15a28ae62eb94dbf3ed13e2065195e572a9988e
/Cook book/src/8/lazily_computed_attributes/example1.py
a872f26e188323bd9e96e4b786016ffff9d9d6d8
[]
no_license
xuyuchends1/python
10798c92840a1a59d50f5dc5738b2881e65f7865
545d950a3d2fee799902658e8133e3692939496b
refs/heads/master
2021-01-25T07:07:04.812140
2020-02-28T09:25:15
2020-02-28T09:25:15
93,647,064
0
0
null
null
null
null
UTF-8
Python
false
false
704
py
class lazyproperty: def __init__(self, func): self.func = func def __get__(self, instance, cls): if instance is None: return self else: value = self.func(instance) setattr(instance, self.func.__name__, value) return value if __name__ == ...
82303825a36ae127081f7c965f2fa948b36e6fcc
d7ae8db44b31de83eabaf0e286b1452d4ada24ff
/IoT_Domain_Analyst_ECE_3502/Lab_3/Linear_Regression.py
524229a56949837e42e249dd6a58236604882ea0
[ "CC0-1.0" ]
permissive
eshan5/VIT-Labs
ae4c6719b86fb5e2f30e0f5a023171597cf33d42
5a20b9571a10b4550b886d588969592e595dac1d
refs/heads/main
2023-08-24T06:50:23.888426
2021-10-09T10:18:32
2021-10-09T10:18:32
null
0
0
null
null
null
null
UTF-8
Python
false
false
798
py
import numpy as np from sklearn.linear_model import LinearRegression x = np.array([5, 15, 25, 35, 45, 55]).reshape((-1, 1)) y = np.array([5, 20, 14, 32, 22, 38]) print(x) print(y) model = LinearRegression().fit(x, y) r_sq = model.score(x, y) print('coefficient of determination:', r_sq) print('intercept:', model.inter...
1882e6bd42af8f728c9d7796b25c44164b46c8a0
d2915ef6ee9c1ea01f47d3468bba8e320a8f5914
/design_patterns/behavioural/template_method.py
b4d81ca7739be92fcbe5d17b1a54a35d7cf159d6
[]
no_license
asing177/python_basics
a269adbaf166fb760d2692874601528ef230bbbd
48ce7d5d6356edbd9bc21f8ebb55ec95787d4340
refs/heads/main
2023-01-11T12:11:44.155102
2020-11-13T07:24:54
2020-11-13T07:24:54
300,806,395
0
0
null
null
null
null
UTF-8
Python
false
false
3,123
py
from test_abc import ABC, abstractmethod class AbstractClass(ABC): """ The Abstract Class defines a template method that contains a skeleton of some algorithm, composed of calls to (usually) abstract primitive operations. Concrete subclasses should implement these operations, but leave the te...
1d4a7962f047e1507edd5b010afde2fc751120b8
e400d4a141f35bc4240293253048535f1e737d4e
/src/03_IPhreeqcPy/02_phreeqc_mixing_CSH.py
0ef9294bb86ad1f2be65ad009b6c572debf6e331
[]
no_license
annavarzina/carbonation
94416935f92cdfb1874c61407c8d1909178bd6c9
030b222f000d79538e9890fb9047d57ced7bad2d
refs/heads/master
2021-06-23T07:33:20.147869
2021-03-02T13:29:34
2021-03-02T13:29:34
193,922,887
0
1
null
null
null
null
UTF-8
Python
false
false
3,356
py
import numpy as np import matplotlib.pylab as plt from mixing import PhreeqcMixing from kinetics import PhreeqcKinetics class PhreeqcMixingCSH(PhreeqcMixing): def __init__(self, n, fraction, csh, database): self.phase = csh['name'] self.csh = csh self.steps = n self.fraction = frac...
913e406199d7adf3fcacb33850752f52a57881fa
69e5f24fa12346f892b1c907e802286045b3641f
/train.py
c17b2ccaaaaae82b11f58306d9b719d7f6098609
[]
no_license
hope-yao/failed_adversarial_training
0cf9d05333767756134db1eb8ea2424ace8449c9
be87e05b59aaeecec9001c1d6ae69afcf9382c1d
refs/heads/master
2020-04-01T19:04:32.433080
2018-10-17T22:39:48
2018-10-17T22:39:48
153,532,414
0
0
null
null
null
null
UTF-8
Python
false
false
5,181
py
"""Trains a model, saving checkpoints and tensorboard summaries along the way.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from datetime import datetime import json import os import shutil from timeit import default_timer as timer import tensorflo...
03fa270be63af49d803b50f06e2f566610bf1159
1c962341f3b580f2be0529a2d5804d49804470f6
/judge_2152.py
a4cdbad8d0c1c0d6e41d3a7a54609469d3035777
[]
no_license
andersonmarquees/-uri_python
7bc14b50198bd238f9594b37a86553ecfb277f76
379518cd17433725d6a859526de356162b26aa40
refs/heads/master
2020-05-05T09:08:51.483638
2019-04-14T16:42:24
2019-04-14T16:42:24
179,892,376
0
0
null
null
null
null
UTF-8
Python
false
false
1,090
py
n = int(input()) while n > 0: number = list(map(int, input().split())) if number[2] == 0 and number[0] >= 10 and number[1] >= 10: print("{}:{} - A porta fechou!".format(number[0], number[1])) elif number[2] == 1 and number[0] >= 10 and number[1] >= 10: print("{}:{} - A porta abriu!".format(...
284deb502b460d18389044ea5103890c7f6686d0
01a8c5ecea9cb4d40d3e26a1ca08cb1ccc17e98a
/common/prep_terrain_data.py
a35188d77e0eab7d0ba710f5dbfa6d1addca21c6
[]
no_license
pelinbalci/intro_to_ml
fe570cfe5a556cdd55fccabd1f7096b42124a7a7
450ba3cff7d3f2009d94a526527ed76fee6e1fdf
refs/heads/master
2022-11-15T04:22:29.372686
2020-07-12T10:13:05
2020-07-12T10:13:05
277,359,558
1
0
null
null
null
null
UTF-8
Python
false
false
1,825
py
#!/usr/bin/python import random def makeTerrainData(n_points=1000): """make the toy dataset """ random.seed(42) grade = [random.random() for i in range(0, n_points)] #[0.63, 0.025, 0.275, 0.223, 0.736, 0.676, 0.89, 0.085, 0.42, 0.029] bumpy = [random.random() for i in range(0, n_points)] #[0.218, 0.5...
c39cc5dda80f909656f9411ff1e0ff395f66ea2f
9da0798b6f309d2274c65077efa81c3766b78051
/SearchQuery.py
398bb743fac51257f35f8c955e13f286be2efd41
[]
no_license
theriley106/RandomSearchQuery
09b37c23c3798b873c45db529158b326410d759e
e084a1a63279994fe06ef8dd594d2bc8e1d7b445
refs/heads/master
2021-01-13T04:57:56.583001
2017-02-07T05:04:07
2017-02-07T05:04:07
81,155,360
0
0
null
null
null
null
UTF-8
Python
false
false
254
py
import random import csv QueryList = open('QueryList.csv', 'r') QueryList = csv.reader(QueryList) QueryList = [row for row in QueryList] QueryList = [l[0] for l in QueryList] def Random(): return random.choice(QueryList) def Multi(): return QueryList
4a13e69ae72231f2bbbeccfef203a95165134ed0
98fd3275aa34c90c26d1f43d70983ae762c69064
/floor_division.py
1f092bde43f669fac26bc9d825a9243c8393537d
[]
no_license
hasnatosman/problem_solving
62b5eaf6a418ae7f75d187b2c8e1e4b0ab4750fd
1f33acc6289d322a9e950b6e39185a505159b7e2
refs/heads/main
2023-06-17T05:34:33.908078
2021-07-15T06:36:45
2021-07-15T06:36:45
383,810,211
0
0
null
null
null
null
UTF-8
Python
false
false
572
py
""" PROBLEM 4: Find the floor division of two numbers. HINTS: Just use two // instead of one. """ num1 = int(input('Enter the first number: ')) num2 = int(input('Enter the second number: ')) result = num1 // num2 print("Result is: ", result) """ Explanation: When you divide one number by another you g...
c52b322c1c1fb0464674ec1211c34b90dcd6b4b1
24fe1f54fee3a3df952ca26cce839cc18124357a
/servicegraph/lib/python2.7/site-packages/acimodel-4.0_3d-py2.7.egg/cobra/modelimpl/eqptdiag/entity.py
86ae5c47a213aa5ec2540a9fb905cafd8a5403b0
[]
no_license
aperiyed/servicegraph-cloudcenter
4b8dc9e776f6814cf07fe966fbd4a3481d0f45ff
9eb7975f2f6835e1c0528563a771526896306392
refs/heads/master
2023-05-10T17:27:18.022381
2020-01-20T09:18:28
2020-01-20T09:18:28
235,065,676
0
0
null
2023-05-01T21:19:14
2020-01-20T09:36:37
Python
UTF-8
Python
false
false
6,254
py
# coding=UTF-8 # ********************************************************************** # Copyright (c) 2013-2019 Cisco Systems, Inc. All rights reserved # written by zen warriors, do not modify! # ********************************************************************** from cobra.mit.meta import ClassMeta from cobra.m...
7f78ff3bbfee0ec659df2d2fe6639af9fe66f59b
72b00923d4aa11891f4a3038324c8952572cc4b2
/python/datastruct/dd_oob/pgm06_13.txt
68d0a171c8d350cdcfdc58f5ebe0b45790150e1e
[]
no_license
taowuwen/codec
3698110a09a770407e8fb631e21d86ba5a885cd5
d92933b07f21dae950160a91bb361fa187e26cd2
refs/heads/master
2022-03-17T07:43:55.574505
2022-03-10T05:20:44
2022-03-10T05:20:44
87,379,261
0
0
null
2019-03-25T15:40:27
2017-04-06T02:50:54
C
UTF-8
Python
false
false
1,058
txt
# # This file contains the Python code from Program 6.13 of # "Data Structures and Algorithms # with Object-Oriented Design Patterns in Python" # by Bruno R. Preiss. # # Copyright (c) 2003 by Bruno R. Preiss, P.Eng. All rights reserved. # # http://www.brpreiss.com/books/opus7/programs/pgm06_13.txt # class QueueAsArray...
1ddbfb75321c4a6c9628325701f965d26cc4ace3
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03254/s765346849.py
33081586b65e211540fb56775a50c4be338f79f8
[]
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
198
py
n, x = map(int, input().split()) a = list(map(int, input().split())) a.sort() ans = 0 for i in range(n-1): if x >= a[i]: x -= a[i] ans += 1 if x == a[-1]: ans += 1 print(ans)
4219a4b68fda829e5ffe9f53e3fc479e6f4e4f2f
26f6313772161851b3b28b32a4f8d255499b3974
/Python/PseudoPalindromicPathsinaBinaryTree.py
f55438ead603aea16a74885f9461cc385a4c486d
[]
no_license
here0009/LeetCode
693e634a3096d929e5c842c5c5b989fa388e0fcd
f96a2273c6831a8035e1adacfa452f73c599ae16
refs/heads/master
2023-06-30T19:07:23.645941
2021-07-31T03:38:51
2021-07-31T03:38:51
266,287,834
1
0
null
null
null
null
UTF-8
Python
false
false
2,315
py
""" Given a binary tree where node values are digits from 1 to 9. A path in the binary tree is said to be pseudo-palindromic if at least one permutation of the node values in the path is a palindrome. Return the number of pseudo-palindromic paths going from the root node to leaf nodes. Example 1: Input: root = ...
1b43082d768a96c889d523cd9c34162a613e63b8
5c883c87f337be7ffd52f49f0a4e6c72bbd58932
/apps/almacenes/migrations/0026_auto_20170322_1009.py
6bc93dfdfc7667e77ff7d1173f2e6f96fe4acf6f
[]
no_license
DARKDEYMON/Tesis-2-Vidaurre-J.C.
f1b0d8e8a593a9d4a585bdd14b21d4809d55ce9f
4299cea2e990ee798b02724849d747bfd558b97d
refs/heads/master
2021-06-20T09:25:53.273225
2017-05-25T22:20:31
2017-05-25T22:20:31
65,408,196
0
0
null
null
null
null
UTF-8
Python
false
false
1,348
py
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-22 14:09 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('almacenes', '0025_auto_20161029_1535'), ] operations = [ migrations.AlterFi...
a7a10c869e455f85d0277f3c8391df0683381241
742f8aa424b5ef4d9865dee98bebbd5f741a3831
/tests/test_pregel.py
8c876136c50ef8db82da2cb79530357b615bc4f3
[ "MIT" ]
permissive
TZubiri/python-arango
a8be86f2cf9190c2d74d99eb2ef8f5f48b9f45c6
232c2d09c7bf9b5e0b71b7ab16fbce6682db383d
refs/heads/master
2020-04-04T22:24:03.898075
2018-11-06T03:59:54
2018-11-06T03:59:54
156,322,851
0
0
null
2018-11-06T03:51:04
2018-11-06T03:51:03
null
UTF-8
Python
false
false
1,823
py
from __future__ import absolute_import, unicode_literals from six import string_types from arango.exceptions import ( PregelJobCreateError, PregelJobGetError, PregelJobDeleteError ) from tests.helpers import ( assert_raises, generate_string ) def test_pregel_attributes(db, username): assert ...
6244ec064900b8dd809f7c79a459e071ac1fbc06
cfa26ab2d83f25f88c61b040e385a8e2b80fad49
/cmsplugin_cascade/cms_plugins.py
8f455e4e6ff33669d4cff5e3df130c47f22dc72d
[ "MIT" ]
permissive
jrief/djangocms-cascade
e952ed65c5f8ec14a2d81b424b0797bc5a87413d
6e4d5ec7d5cbcc076aa1ea9e16b7c55c07f0ef25
refs/heads/master
2023-07-07T07:40:20.368478
2022-09-13T14:52:53
2022-09-13T14:52:53
12,973,900
143
95
MIT
2022-05-11T08:16:45
2013-09-20T13:20:48
Python
UTF-8
Python
false
false
1,088
py
import sys from importlib import import_module from django.core.exceptions import ImproperlyConfigured from . import app_settings for module in app_settings.CASCADE_PLUGINS: try: # if a module was specified, load all plugins in module settings module_settings = import_module('{}.settings'.format(m...
7ec4112133d33b3aff667aac27a9a4b8451f92f9
fbb53a3366a0f10a7eb8070620cacec5101459fb
/company/m-solutions2019/c.py
16ee9cebc54f31595a786fb0932d2b433b17b306
[]
no_license
penicillin0/atcoder
272bf0b9f211907c9f7f2491335f0d34f2dcd43b
827d5cdc03531d48a44e021bd702f80b305f64d6
refs/heads/master
2023-08-05T09:43:50.114694
2021-09-20T09:21:07
2021-09-20T09:21:07
256,395,305
0
0
null
null
null
null
UTF-8
Python
false
false
1,161
py
N = int(input()) par = [-1] * N # 親だった場合は-(その集合のサイズ) if N == 1: print(0) # xがどのグループに属しているか調べる def find(x): if par[x] < 0: return x else: par[x] = find(par[x]) return find(par[x]) # 自分のいるグループの数 def size(x): return -par[find(x)] # xとyの属する集合を併合 def unite(x, y): # 根を探す ...
f151e8badd6b1cb50965d9bd65e92835c2ea1db8
e5abf2028b9e0b39a5bf905f14c401d3645bdb9a
/display.py
2bcbbfdf5758468c37a0db038d2334e6b808bfba
[ "MIT" ]
permissive
vieirafrancisco/car-adventure
2d2723e44fcb216f2ea37c1b35a1ec5f6f6fba8a
79a86d830699f131fd4e4aa2031969aa7eae1a50
refs/heads/master
2020-03-30T00:01:11.845899
2018-09-28T22:27:57
2018-09-28T22:27:57
150,501,069
0
0
null
null
null
null
UTF-8
Python
false
false
407
py
import pygame class DisplaySurface: def __init__(self, width, height): self.width = width self.height = height self._size = (self.width, self.height) self._display_surface = pygame.display.set_mode(self._size, pygame.HWSURFACE | pygame.DOUBLEBUF) def get_display_surface(self): ...
6f310f436ac9574a69159a506b99a3faa814ef2b
f9b6c56cec99eb2147777c4448b4b8ad757ff074
/longest_harmounious_subsequence.py
1f2b1f59cd7bdf90c4e192bd21e008bf7b4f26d3
[]
no_license
zhrmrz/longest_harmounious_subsequence
268676d4c1d7f76cddb10fcaa42fb8718689f3c6
71ddac4edd4d3948d462aae430ba7154f4aa921f
refs/heads/master
2020-08-29T03:39:23.468859
2019-10-27T20:34:52
2019-10-27T20:34:52
217,913,179
0
0
null
null
null
null
UTF-8
Python
false
false
273
py
from collections import Counter class Sol: def longest_harmounious_subsequence(self,nums): max_subarr=0 freq=Counter(nums) for num,count in freq.items(): if num+1 in freq: max_subarr=max(max_subarr,count+freq[num+1])
81ca32d7661a077e47039a5f78868c9fc5d381a8
66fda6586a902f8043b1f5e9532699babc7b591a
/lib_openshift/models/v1_build_config_status.py
fd78c8cbca2d5966a2f4258b5b0d00f8861062a6
[ "Apache-2.0" ]
permissive
chouseknecht/lib_openshift
86eff74b4659f05dfbab1f07d2d7f42b21e2252d
02b0e4348631e088e72a982a55c214b30a4ab9d9
refs/heads/master
2020-12-11T05:23:17.081794
2016-07-28T20:15:39
2016-07-28T20:15:39
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,610
py
# coding: utf-8 """ OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git 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 ...
d080a80308e02553e9baac9420d73834f92a2979
c026581b6c3855c75e7c9f9c6397acadc7833fb7
/idm_core/name/urls.py
5778785362e85f4443b71c0f79b76a31eb6f7cbe
[]
no_license
mans0954/idm-core
5734fd08a3c8c5deaec62167c9470336f0c6c6ef
2a3cf326e0bb3db469e2b318b122033a7dd92b83
refs/heads/master
2021-07-24T04:13:47.021951
2017-11-02T22:09:25
2017-11-02T22:09:25
109,317,967
1
0
null
2017-11-02T20:56:01
2017-11-02T20:55:58
null
UTF-8
Python
false
false
745
py
from django.conf.urls import url from . import views uuid_re = '[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}' urlpatterns = [ url(r'^name/$', views.NameListView.as_view(), name='name-list-self'), url(r'^(?P<identity_type>[a-z-]+)/(?P<identity_id>' + uuid_re + ')/name/$', ...
5ad0428c695af2b019eeb2f0663b66e863d03a50
c11c27b07086e97c633a833d37787474724bd2d2
/src/ResNeXt/concateFeature.py
6d8f98b7b69a10e8dff467812e4cacb8108ba6ef
[ "MIT" ]
permissive
willyspinner/High-Performance-Face-Recognition
d1826a73653dede6b43799439e4fb692f119c70b
c5caad61be97fd20f9c47a727278ff938dc5cc8f
refs/heads/master
2020-06-22T16:36:29.663302
2019-07-19T09:41:47
2019-07-19T09:41:47
197,746,624
0
0
MIT
2019-07-19T09:42:00
2019-07-19T09:41:59
null
UTF-8
Python
false
false
1,953
py
import scipy.io as sio import pickle import numpy as np import os import numpy as np from sklearn.decomposition import PCA from sklearn.preprocessing import StandardScaler from scipy import spatial from sklearn.externals import joblib import time reducedDim = 2048 pca = PCA(n_components = reducedDim, whiten = True) p...
5762741a29ba36f2c36980cbe7c87cd3d2f89121
a01e7f87a0088965e2e0a02476d2df12a49a1a18
/package/tfi_helper/dhcp/hapack/dhcpparser.py
dea3a1526ea3c35f8b80c04e697d0a60a841bed7
[]
no_license
gsrr/IFT_jerry
0456a8a1fb98f84ad5c26dc36bdf32e2d85c750c
4c2f6900dfd7ae7f6b3cc2150b1c1be236b4c95c
refs/heads/master
2020-04-04T05:30:10.544252
2019-08-22T09:12:03
2019-08-22T09:12:03
48,145,836
0
0
null
null
null
null
UTF-8
Python
false
false
686
py
import argparse class DHCPParser: def __init__(self): self.cmds = ['dhcp_test'] self.parser_dhcp = argparse.ArgumentParser(prog="dhcp", add_help=False) self.parser_dhcp_test = argparse.ArgumentParser(prog="dhcp_test", add_help=False) self.parser_dhcp_test.add_argument("-z", nargs="?...
9d82a9d1425b1deae0c45fc833fe73e80449e0b6
2b7c7e9b00ed9b2dbbac943ee4b79865a96d10de
/Figure_script/Figure_1.py
7caa0f0d7080d155e2572b49ddd294af94fa11d9
[]
no_license
YaojieLu/Plant_traits_inversion
ad973e60bb32717d9d718f774c2ec77433c38ced
ec83642ae2a2e6ef96502e58f8074bffdadfefe8
refs/heads/master
2021-06-21T15:22:00.225498
2020-12-13T22:12:21
2020-12-13T22:12:21
140,017,309
1
1
null
null
null
null
UTF-8
Python
false
false
1,680
py
import pickle import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib.lines import Line2D from scipy import stats # load traces ts = pickle.load(open("../Data/45.pickle", "rb")) params = ['alpha', 'c', 'g1', 'kxmax', 'p50', 'L'] true_values = [0.02, 16, 50, 7, -4.5, 2] # figure labels =...
[ "=" ]
=
8f28ab12e6205691d69253b9b16c31e06f857774
b5cc6d7b5f7ccea36fce4eab961979404414f8b0
/kent-report/py/beam_distances.py
2cc89895ad6d3fed6c27470bb32f1dfd505d8989
[]
no_license
MiroK/cutFEM-beam
adf0c925dbe64b370dab48e82335617450675f5d
2fb3686804e836d4031fbf231a36a0f9ac8a3012
refs/heads/master
2021-01-21T23:54:32.868307
2015-02-14T13:14:59
2015-02-14T13:14:59
25,625,143
0
0
null
null
null
null
UTF-8
Python
false
false
3,537
py
from __future__ import division from sympy import sin, cos, pi, sqrt, symbols, lambdify from sympy.mpmath import quad import numpy as np x, y, s = symbols('x, y, s') def eigen_basis(n): ''' Return first n eigenfunctions of Laplacian over biunit interval with homog. Dirichlet bcs. at endpoints -1, 1. Funct...
a728bf9ae2c46a9eeba638b54da02ebb8ac8ddca
a35b24c8c3c5bdf861f3cda9396f2fa6795ec929
/abc/abc037/a/main.py
bb4c99a18af37578e976b0d53202738d5e7c3592
[]
no_license
Msksgm/atcoder_msksgm_practice
92a19e2d6c034d95e1cfaf963aff5739edb4ab6e
3ae2dcb7d235a480cdfdfcd6a079e183936979b4
refs/heads/master
2021-08-18T16:08:08.551718
2020-09-24T07:01:11
2020-09-24T07:01:11
224,743,360
0
0
null
null
null
null
UTF-8
Python
false
false
226
py
def main(): a, b, c = map(int, input().split()) min_price = min(a, b) max_price = max(a, b) ans = (c // min_price) ans += (c % min_price) // max_price print(ans) if __name__ == "__main__": main()
13590eb83cedf7e78563f292ee34f03b3d739622
a0a288a9563ed4519cfe9f9c24ecc41237753dbc
/thechronic/strange.py
417876af3a2960256bd2b445292b60da0c62abbd
[ "MIT" ]
permissive
iluxonchik/the-chronic
99b236456efb9c32dfb9e3978f9e2cc28910a03c
4dd41ea1a96e4c5cb1741de02d55cf09b2e78979
refs/heads/master
2021-04-28T22:40:51.993595
2018-04-02T13:38:04
2018-04-02T13:38:04
77,719,263
0
0
null
null
null
null
UTF-8
Python
false
false
696
py
class Strange(object): """ Wrapper arround the built-in range() function, which returns str instead of int on iteration. Just like a range object, an instance of Srange can be iterated over multiple times. """ def __init__(self, start, stop=None, step=1): if stop is None: ...
4baf087e4e4c72d03eb1f4f5b7f52fbbaa305d56
b71e91d4eb55b6826dbe378180aa7b2b8a717bdf
/Capitulo1/exerc4_3_v5.py
1058a9e307d85293890de1402b022dd0572ac930
[]
no_license
gustavopierre/think_python
49a9ceb50f760b41f6fbac54a07f6b394aa8d637
a3ad6e660db4e6ce2aa105f5084e585f95936867
refs/heads/main
2023-03-24T23:48:29.415573
2021-03-15T22:15:30
2021-03-15T22:15:30
348,137,048
0
0
null
null
null
null
UTF-8
Python
false
false
336
py
import turtle import math def arc(t, r, angle): n = int(2*math.pi*r/10) x = int(n*angle/360) for count in range(x): t.fd(10) t.lt(360/n) print(f'r = {r}') print(f'angle = {angle}') print(f'n = {n}') print(f'x = {x}') bob = turtle.Turtle() print(bob) arc(bob, 100, 270) tu...
6e02a4cd2c2891c084f93dad75871c179905debf
b54097ce251925a82e591a08ae625fa884500b9c
/tests/test_github.py
e942b6bfaabe6db425870e1377356785c841cac2
[ "BSD-3-Clause" ]
permissive
johnnoone/aiovault
b45b576cfb30570b1bbe9ab018a3247156dbefea
03e1bfb6f0404dcf97ce87a98c539027c4e78a37
refs/heads/master
2021-01-10T19:56:50.715283
2015-07-10T21:15:21
2015-07-10T21:15:21
35,452,083
1
0
null
null
null
null
UTF-8
Python
false
false
2,199
py
from aiovault import Vault, LoginError from conftest import async_test import pytest @async_test def test_github_raw_loading(dev_server): client = Vault(dev_server.addr, token=dev_server.root_token) response = yield from client.read('/sys/auth/github/login', params={"hel...
d36a0fd44877c71c01b65bf4986938b78a9d64dc
781e2692049e87a4256320c76e82a19be257a05d
/all_data/exercism_data/remove_invalid_submissions.py
bea3c87a9227a23ef93473ae7d1cd253ca981bc3
[]
no_license
itsolutionscorp/AutoStyle-Clustering
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
refs/heads/master
2020-12-11T07:27:19.291038
2016-03-16T03:18:00
2016-03-16T03:18:42
59,454,921
4
0
null
2016-05-23T05:40:56
2016-05-23T05:40:56
null
UTF-8
Python
false
false
2,261
py
import os from collections import Counter import shutil import sys import argparse import tempfile # for example call this script on hamming from exercism_data directory like: python remove_invalid_submissions.py "ruby/hamming/" "filtered-submissions/" "compute" parser = argparse.ArgumentParser(description='Filter an...
b80cff1f63fc85e2e367363d8d4217c52f1bcb9c
3e3741d9ea06f1dcd560e27145256bd3177bed14
/01_py基础/第2周/day01/test05.py
0b0877d5b07aa6ba958a21bc84e6b7a6d5a0890e
[]
no_license
Lousm/Python
778bc730db09ab135bf53c7b62af29df2407199a
d3f19600012b3576cd5d58df510c17590fcaec14
refs/heads/master
2020-03-26T16:40:01.188306
2018-11-06T03:56:20
2018-11-06T03:56:20
145,116,187
0
0
null
null
null
null
UTF-8
Python
false
false
185
py
a = [i*10 for i in range(1, 13)] b = [i*2 for i in range(1, 13)] def sy(a, b): c = [] for i in range(len(a)): c.append(a[i]+b[i]) return c c = sy(a, b) print(c)
1b6b591a2a8ad31a5c1bd110be072f800865522b
e838ea567fe5216bd83b72d5cc549363a666ac3d
/community/migrations/0001_initial.py
756f713d6f763cc2a681b7383369ae2c3dc63f28
[]
no_license
iuriramos/swim-registry
f7ffee9a57b92021e7066820249092d1558a944d
7c71d294b5aa7cb40e01ed559e2fcb81d2e1f43a
refs/heads/master
2021-09-13T20:22:29.624535
2018-05-03T21:30:26
2018-05-03T21:30:26
85,312,675
0
0
null
null
null
null
UTF-8
Python
false
false
4,544
py
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-05-18 18:20 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
e67dd18e17853bde0845ae57c5ee63c25d10828b
a657283ae5208611351606f35b05f46f63581d5c
/website/routes.py
83404e7b3b86c06c28d0c50b12f5eb7115140b6e
[]
no_license
rrkas/handwriting-generation-flask
e17c71f0335231a6157c728c78ce4c30d7d6df61
049091b1a3d341af0ce50e07d484c1bbf98fd3d8
refs/heads/master
2023-07-14T22:12:56.482115
2021-08-29T10:14:56
2021-08-29T10:14:56
391,993,520
0
0
null
null
null
null
UTF-8
Python
false
false
2,975
py
import io import os import uuid import pywhatkit as kit from flask import * from werkzeug.datastructures import FileStorage from website import app output_dir = os.path.join('website', 'static', 'output') if not os.path.exists(output_dir): os.mkdir(output_dir) allowed_file_ext = ['txt'] def allowed_file(filen...
611500bc11e4bf0093b270c1e76a4ec33c642061
e61e664d95af3b93150cda5b92695be6551d2a7c
/vega/security/load_pickle.py
206511004faf87ad32800052b332f62e12f296b8
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
huawei-noah/vega
44aaf8bb28b45f707ed6cd4e871ba70fc0c04846
12e37a1991eb6771a2999fe0a46ddda920c47948
refs/heads/master
2023-09-01T20:16:28.746745
2023-02-15T09:36:59
2023-02-15T09:36:59
273,667,533
850
184
NOASSERTION
2023-02-15T09:37:01
2020-06-20T08:20:06
Python
UTF-8
Python
false
false
1,812
py
# Copyright (C) 2020. Huawei Technologies Co., Ltd. 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...
486752af90a81014c8a2c8b798d2c1b5fc1c35eb
9dbe507104b03275b1ed5dc91a4aaa2ae6af4f51
/hearthbreaker/cards/minions/shaman.py
800985cec4d413a7eaac702479486e1dcdcc24bf
[ "MIT" ]
permissive
bussiere/hearthbreaker
55fc7c77d8ffb37cda2b5d9afb7ccd44c250702c
074e20de3498d078877e77b3603580b511e8522b
refs/heads/master
2021-01-16T22:13:32.110626
2014-12-17T13:37:32
2014-12-17T13:37:32
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,946
py
from hearthbreaker.tags.action import ChangeAttack, Draw, ChangeHealth, Damage, Give, Windfury from hearthbreaker.tags.base import Aura, Effect, Battlecry from hearthbreaker.tags.condition import Adjacent, HasOverload from hearthbreaker.tags.event import TurnEnded, CardPlayed from hearthbreaker.tags.selector import Min...
8277d4f471be2dee3c2676a6bf9cbd30cf236a64
c0ad282ab743a315e2f252a627933cb168434c1d
/models/agreement/type_prior.py
bde43251219d85d73f078c3d0ba4fad4980ae25c
[ "MIT" ]
permissive
AlexKuhnle/ShapeWorld
6d1e16adc94e860abae99ade869f72575f573bc4
e720bf46e57fc01326d04d639fa6133d9c12158f
refs/heads/master
2021-07-09T00:02:33.808969
2021-04-19T11:10:52
2021-04-19T11:10:52
80,815,972
58
28
MIT
2021-04-19T11:10:53
2017-02-03T09:40:19
Python
UTF-8
Python
false
false
2,722
py
from models.TFMacros.tf_macros import * def model(model, inputs, dataset_parameters): caption = Input(name='caption_rpn', shape=dataset_parameters['caption_rpn_shape'], dtype='int', tensor=inputs.get('caption_rpn'))() caption_length = Input(name='caption_rpn_length', shape=(), dtype='int', tensor=inputs.get(...
952ecae4e414db6b616a055126571c0e7b129cdf
8b427d0a012d7dbd3b49eb32c279588f9ebd4e6e
/05 排序和搜索/binary_search.py
33fe499fccf320c9b9bcc7589236e441fdbcd076
[]
no_license
chenyang929/Problem-Solving-with-Algorithms-and-Data-Structures-using-Python-Notes
e9f1b324d86963333edaf855fdb9e126e59e8542
aed976e020147fe30a8e0bb708dfbe4bab4c15f7
refs/heads/master
2020-03-18T02:46:12.385967
2018-07-24T08:24:41
2018-07-24T08:24:41
134,206,437
0
0
null
null
null
null
UTF-8
Python
false
false
1,023
py
# binary_search.py # 循环版 def binary_search(lst, item): low = 0 high = len(lst) - 1 while low <= high: mid = (low + high) // 2 guess = lst[mid] if item == guess: return mid elif item > guess: low += 1 else: high -= 1 return -1 ...
1c18a6ddc3944da8e2ba5f5ef396825ac6423869
6e13f7fdae0144dd0397031c59397b0372f0872a
/horch/layers/_se.py
43f7469184fbc7b507af7080e15eb8071fc1c974
[]
no_license
sbl1996/horch
02e9996f764748c62648464d58318ceff92c87ed
50d4f4da241a5727e3924a36fbc730dc61284904
refs/heads/master
2020-03-20T05:00:43.444092
2018-07-27T00:14:45
2018-07-27T00:14:45
137,201,939
0
0
null
null
null
null
UTF-8
Python
false
false
671
py
import horch as H from ._linear import Linear from ._module import Module class SE(Module): """Squeeze and Excitation Module """ def __init__(self, channels, reduction_ratio=16): super().__init__() self.channels = channels self.reduction_ratio = reduction_ratio reduced_channels =...
ffd7b753f12a8fff9b52468226a6155d9a60a7c9
7bd9be7f25be80791f9220b62025f06170273293
/end-plugins/pycerebro/examples/excel_export.py
7ccaaa79c69f3f70111f28d64cfa01c407d3180a
[]
no_license
cerebrohq/cerebro-plugins
ab46b4844adcb12c51d14e21f2c0d8b758b0bb57
e2e0f97b548ef22957e13d614200027ba89215e0
refs/heads/master
2021-11-12T16:25:48.228521
2021-10-22T11:25:58
2021-10-22T11:25:58
143,178,631
5
3
null
null
null
null
UTF-8
Python
false
false
7,156
py
# -*- coding: utf-8 -*- """ Пример экспорта задачи(проекта) со всеми вложенными задачами в Excel. Этот пример демонстрирует экспорт свойств задачи в Excel. Для записи в формат Excel используется сторонний пакет xlsxwriter (https://xlsxwriter.readthedocs.org/) Для преобразования текста в формате html используется сто...
c478c0d6aed9b07eae4b4ea4776e7c073d3b4ace
e6a5fce33aad4fcba37842e135a51ba441b06f48
/Python/Errors and Exceptions/Exceptions.py
5f5278b64b8e82541685d00cec1a244dd307ddce
[ "MIT" ]
permissive
pavstar619/HackerRank
6710ddd450b06fbb69da5abad9f570e5e26bbbc0
697ee46b6e621ad884a064047461d7707b1413cd
refs/heads/master
2020-06-18T18:53:53.421685
2020-02-18T09:35:48
2020-02-18T09:35:48
196,408,726
0
0
MIT
2019-07-11T14:18:16
2019-07-11T14:18:16
null
UTF-8
Python
false
false
438
py
class Main: def __init__(self): self.t = int(input()) for i in range(0, self.t): try: self.n, self.m = map(int, input().split()) print(self.n // self.m) except ZeroDivisionError as e: print("Error Code:", e) except V...
7c9e8b7bfead44bee572fa7070396b90066e9a6e
746a9c1f65674cd5bcdce6dbd1971b6a16345f9d
/account/forms.py
e907a732e6e142794a14079dcb07a70bcd7fc718
[]
no_license
mazulo/bookmarks
4dc25dc09772663c65698d3cc9f5b653fd409ba9
5c2ce3c3ad811466c63f7b0f3a21bf33a6a28f5e
refs/heads/master
2021-01-10T07:23:37.185414
2016-03-23T06:40:53
2016-03-23T05:40:53
54,158,063
0
0
null
null
null
null
UTF-8
Python
false
false
1,002
py
from django import forms from django.contrib.auth.models import User from .models import Profile class LoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput) class UserRegistrationForm(forms.ModelForm): password = forms.CharField(label='Password', w...