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
bb9b72d22626e0d25fcc15eb9591c80556396118
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p02699/s167779272.py
5ae2267cef04e2bb394c6351bcb67a32ba3d4e70
[]
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
149
py
def main(): S, W = list(map(int, input().split())) print("unsafe" if S <= W else "safe") pass if __name__ == '__main__': main()
6154ea85af213859285844a8e9cbf8f6b018ff55
d37f798101bc6cc795b3ff7e5f9444ff30b4cd83
/kubernetes/client/models/v1alpha1_parent_reference.py
18f7447520f6057f4d3b3f73bc21bd1645ac457f
[ "Apache-2.0" ]
permissive
MorningSong/python
bdd8b9d60b7c2185457fc1bbbc64d098f9682981
ae7b5ddd219fe09b6ed0be715dcca3377a029584
refs/heads/master
2023-08-30T14:41:41.582335
2023-08-23T16:15:28
2023-08-23T16:15:28
139,396,247
0
0
Apache-2.0
2023-09-14T00:11:24
2018-07-02T05:47:43
Python
UTF-8
Python
false
false
6,766
py
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.27 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
eafd3efda8542b0d4645d3e90c82145723998525
2fb738f3bdabebf32296150405486377dba7812b
/nuitka/freezer/DependsExe.py
18433052e9e87ad3cdd5729630829cc4c783b534
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
goslion/Nuitka
31f62c9083a1eaec104d64eeebc0b9fb50560812
4a30a987b1586271c31822f574ca2584d1107212
refs/heads/master
2023-03-03T08:06:13.420278
2021-02-07T22:06:13
2021-02-07T22:06:13
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,923
py
# Copyright 2021, Kay Hayen, mailto:[email protected] # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
6e90ef1077bbefd52a47c39eaf3d32fe9090c6d7
99c4d4a6592fded0e8e59652484ab226ac0bd38c
/code/batch-2/vse-naloge-brez-testov/DN13-Z-077.py
bcccc875f9d0ca0da1cc8bf82548e3362986f142
[]
no_license
benquick123/code-profiling
23e9aa5aecb91753e2f1fecdc3f6d62049a990d5
0d496d649247776d121683d10019ec2a7cba574c
refs/heads/master
2021-10-08T02:53:50.107036
2018-12-06T22:56:38
2018-12-06T22:56:38
126,011,752
0
0
null
null
null
null
UTF-8
Python
false
false
1,260
py
import itertools class Minobot: def __init__(self): self.x = 0 self.y = 0 self.smer = "desno" def naprej(self, premik): if (self.smer == "desno"): self.x += premik elif (self.smer == "levo"): self.x -= premik elif (self.s...
80737f45f33bac9e5445d7f37314f4c3515006f4
9e41cd05ee3d36d09e2dfb49af8212c3aee3cd61
/kisházik/classification_EMP2B5.py
c2e3885645ae26b3c237756509ab3bd62b09723f
[]
no_license
matech96/ADA
2cf60eeacb0cdf95ce8486169ddd9e4e1bb2311f
b15c8e339291014af13e03cd3a099e1914198ff9
refs/heads/master
2020-09-14T18:02:05.271191
2020-01-28T16:04:29
2020-01-28T16:04:29
223,208,311
0
0
null
null
null
null
UTF-8
Python
false
false
2,269
py
#!/usr/bin/env python # coding: utf-8 # In[1]: from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, roc_auc_score, precision_score, recall_score import pandas as pd from sklearn.linear_model import LinearRegression # In[2]: df = pd.read_csv('../data/DataSet_Hitelbiral...
1d912dceae386ef74247aae0ce3c3d92d2ee8ed8
e3c8f786d09e311d6ea1cab50edde040bf1ea988
/Incident-Response/Tools/grr/grr/server/grr_response_server/gui/api_plugins/reflection_test.py
bbc604dfacc9a8f3d4e2f1ef5f8c6585f034152e
[ "MIT", "Apache-2.0" ]
permissive
foss2cyber/Incident-Playbook
d1add8aec6e28a19e515754c6ce2e524d67f368e
a379a134c0c5af14df4ed2afa066c1626506b754
refs/heads/main
2023-06-07T09:16:27.876561
2021-07-07T03:48:54
2021-07-07T03:48:54
384,988,036
1
0
MIT
2021-07-11T15:45:31
2021-07-11T15:45:31
null
UTF-8
Python
false
false
3,974
py
#!/usr/bin/env python """This module contains tests for reflection API handlers.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from absl import app from grr_response_server.gui import api_call_router from grr_response_server.gui import api_test_lib ...
73d467d6ab8185e9e67e75cb05f4ebc9019517a1
1dacbf90eeb384455ab84a8cf63d16e2c9680a90
/lib/python2.7/site-packages/openopt/__init__.py
76070a202bb544deddb6eb445f4f4fae6c2a6b53
[ "Python-2.0", "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-unknown" ]
permissive
wangyum/Anaconda
ac7229b21815dd92b0bd1c8b7ec4e85c013b8994
2c9002f16bb5c265e0d14f4a2314c86eeaa35cb6
refs/heads/master
2022-10-21T15:14:23.464126
2022-10-05T12:10:31
2022-10-05T12:10:31
76,526,728
11
10
Apache-2.0
2022-10-05T12:10:32
2016-12-15T05:26:12
Python
UTF-8
Python
false
false
1,119
py
#! /usr/bin/env python #from .ooVersionNumber import __version__ import os, sys curr_dir = ''.join([elem + os.sep for elem in __file__.split(os.sep)[:-1]]) sys.path += [curr_dir, curr_dir + 'kernel'] from ooVersionNumber import __version__ from oo import * #from kernel.GUI import manage #from kernel.oologfcn import...
ccf7ef2d3e547fc5865b9d05d078122acb39a3a0
9aaa39f200ee6a14d7d432ef6a3ee9795163ebed
/Algorithm/Python/624. Maximum Distance in Arrays.py
a024e9db5b888db8f0029cd55f4da18dc8085909
[]
no_license
WuLC/LeetCode
47e1c351852d86c64595a083e7818ecde4131cb3
ee79d3437cf47b26a4bca0ec798dc54d7b623453
refs/heads/master
2023-07-07T18:29:29.110931
2023-07-02T04:31:00
2023-07-02T04:31:00
54,354,616
29
16
null
null
null
null
UTF-8
Python
false
false
799
py
# -*- coding: utf-8 -*- # @Author: LC # @Date: 2017-06-18 16:34:58 # @Last modified by: LC # @Last Modified time: 2017-06-18 16:38:28 # @Email: [email protected] # O(n) time # traverse the arrays, # keep the min number and max number among the traversed numbers so far and compare them with the current numbe...
ebb8c77391a9e3bd64b8b627a3638e7999db0425
c698fb03aa2bf034904a0310931b473b6da66fdc
/com/study/algorithm/daily/73. Set Matrix Zeroes.py
72c686e73159edddb22b711340fc520e9b884642
[]
no_license
pi408637535/Algorithm
e46df1d07a519ab110e4f97755f461a1b2b7c308
75f4056ec6da01f7466a272871a7f7db579166b4
refs/heads/master
2021-08-29T19:19:53.368953
2021-08-22T16:30:32
2021-08-22T16:30:32
213,289,503
1
0
null
null
null
null
UTF-8
Python
false
false
2,815
py
from typing import List from typing import List class Solution: def setZeroes(self, matrix: List[List[int]]) -> None: """ Do not return anything, modify matrix in-place instead. """ if not matrix or not matrix: return m, n = len(matrix), len(matrix[0]) ...
ea22858c3a3da17f4d8b8806cde34a8f102b33f5
f4b60f5e49baf60976987946c20a8ebca4880602
/lib/python2.7/site-packages/acimodel-1.3_2j-py2.7.egg/cobra/modelimpl/fvns/addrinst.py
45a74f921e5aabecaaba2f160e60df1783f16095
[]
no_license
cqbomb/qytang_aci
12e508d54d9f774b537c33563762e694783d6ba8
a7fab9d6cda7fadcc995672e55c0ef7e7187696e
refs/heads/master
2022-12-21T13:30:05.240231
2018-12-04T01:46:53
2018-12-04T01:46:53
159,911,666
0
0
null
2022-12-07T23:53:02
2018-12-01T05:17:50
Python
UTF-8
Python
false
false
6,765
py
# coding=UTF-8 # ********************************************************************** # Copyright (c) 2013-2016 Cisco Systems, Inc. All rights reserved # written by zen warriors, do not modify! # ********************************************************************** from cobra.mit.meta import ClassMeta from cobra.m...
3f518d1941b93c0126a47ddb4ac3959257e6c413
a830f67a97103b750ed2ced5997285532762f25d
/test_dot_env/test_dot_env/tests.py
448aa445bfd50deca27632fa9e4bcd5b268942e8
[]
no_license
Durant21/test_dot_env
308d29ebbdafa24306cd89e02079d0adbb017fd7
40f6894ff7adc91c9870c96bbd44d62410e1eeb0
refs/heads/master
2022-12-21T00:04:56.754078
2019-10-02T18:59:38
2019-10-02T18:59:38
212,382,378
0
1
null
null
null
null
UTF-8
Python
false
false
717
py
import unittest from pyramid import testing class ViewTests(unittest.TestCase): def setUp(self): self.config = testing.setUp() def tearDown(self): testing.tearDown() def test_my_view(self): from .views.default import my_view request = testing.DummyRequest() info ...
8b5bea4bf2920bf639d60e870173c108a9782dd6
0c78c4356f9df3a5c28adc2bdab7bad750b49d35
/setup.py
37220f5e42a00c2a7f2a4252bd8d8fed9ffad6a0
[ "MIT" ]
permissive
julianblue/agoro-field-boundary-detector
b985513475f4f32973b88d965ed5586d74ecbb01
9dd911df096ce865471ed0330174044f4172cc66
refs/heads/master
2023-06-06T16:58:46.177772
2021-06-22T16:13:27
2021-06-22T16:13:27
null
0
0
null
null
null
null
UTF-8
Python
false
false
986
py
"""Setup module for this Python package.""" import pathlib from setuptools import find_packages, setup # The directory containing this file HERE = pathlib.Path(__file__).parent # The text of the README file README = (HERE / "README.md").read_text() INSTALL_REQUIRES = [ "tqdm", "torch~=1.8.1", "torchvisi...
68f0f8c2e5a4740c22cfcd37baf82be5fea82e65
30e1dc84fe8c54d26ef4a1aff000a83af6f612be
/deps/src/libxml2-2.9.1/python/tests/validDTD.py
ee35c067b3a24970df32163eaa39c77880183bb3
[ "BSD-3-Clause", "MIT" ]
permissive
Sitispeaks/turicreate
0bda7c21ee97f5ae7dc09502f6a72abcb729536d
d42280b16cb466a608e7e723d8edfbe5977253b6
refs/heads/main
2023-05-19T17:55:21.938724
2021-06-14T17:53:17
2021-06-14T17:53:17
385,034,849
1
0
BSD-3-Clause
2021-07-11T19:23:21
2021-07-11T19:23:20
null
UTF-8
Python
false
false
1,224
py
#!/usr/bin/python -u import libxml2 import sys ARG = 'test string' class ErrorHandler: def __init__(self): self.errors = [] def handler(self, msg, data): if data != ARG: raise Exception("Error handler did not receive correct argument") self.errors.append(msg) # Memory d...
e55d95c481ad73ca8bf90ae9a403979a13a469b0
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03821/s969389449.py
aee420fedd1c2214ea27397c8853912146d541c1
[]
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
156
py
N, *AB = [map(int, s.split()) for s in open(0)] AB = list(AB)[::-1] bias = 0 for A, B in AB: bias += (bias + A + B - 1) // B * B - A - bias print(bias)
f58cc5da39483f3d604be5366b4693ca0e122b4c
b38fb62950582664158327a2abf29c84cc59178b
/0x02-python-import_modules/2-args.py
34615c54c5ce8850ce044cc4761e27557383568d
[]
no_license
MiguelCF06/holbertonschool-higher_level_programming
a39129cf355abe15e2caeb41cdef385ace53cfda
0bc44343cb20c97221d3886bafda6db7235bc13a
refs/heads/master
2022-12-18T00:12:52.498624
2020-09-24T17:00:24
2020-09-24T17:00:24
259,323,305
1
2
null
null
null
null
UTF-8
Python
false
false
444
py
#!/usr/bin/python3 if __name__ == "__main__": from sys import argv if (len(argv)-1 == 0): print("0 arguments.") elif (len(argv)-1 == 1): print("{} argument:".format(len(argv) - 1)) print("{}: {}".format(len(argv)-1, argv[1])) else: j = 1 print("{} arguments:".fo...
e21afb3557c986e0856f76cc979a03e2b8372c33
d1aa6e7d5631d7806531660febbd1f856eaeece7
/python/paddle/utils/op_version.py
575e5f40772eb08ea2c79d4ac73d7d04c5f9cfbf
[ "Apache-2.0" ]
permissive
gongweibao/Paddle
510cd4bc0ef89bc6ccee7b6b8eca52c00e014b77
60f9c60cd8196c66c391d79c35d341e9072f8838
refs/heads/develop
2023-03-13T17:43:35.675875
2022-09-20T08:46:15
2022-09-20T08:46:15
82,279,237
3
2
Apache-2.0
2021-05-26T06:17:43
2017-02-17T09:16:16
Python
UTF-8
Python
false
false
2,306
py
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
fd4c49e440c3a33e97213c80f5a63d98a62df18e
6e800b3513537622df14bb598abe9c051116106c
/jianzhioffer/21Exchange.py
dc6f729dfe73659af2d56f13c6281d19f196046d
[]
no_license
Huxhh/LeetCodePy
fd72f03193d1f0b58c44bffc46a9a59ba9714215
6a99e84c5742ca68012b14da362f6c3255e10b21
refs/heads/master
2023-06-09T09:23:54.209025
2023-05-31T16:29:03
2023-05-31T16:29:03
148,866,001
0
0
null
null
null
null
UTF-8
Python
false
false
627
py
# coding=utf-8 # author huxh # time 2020/3/24 10:44 AM def exchange(nums): if not nums: return [] l = 0 r = len(nums) - 1 while l < r: while l < r and nums[l] & 1: l += 1 while l < r and not nums[r] & 1: r -= 1 nums[l], nums[r] = nums[r], nums[...
d6851302274970ef6f014533abcffa0f53972792
9c35adeaa3c73f4d49af6cbe64a63cce1957475a
/views/room.py
96e8f91783de065c5bf97729497c81bd417f7e95
[]
no_license
longfeilove7/ClusterManager
a6e275cee8e5381019d539baef184cdb5ac4f078
d2f8a973c2ddcd75395916974d733f6cfd5346a9
refs/heads/master
2020-03-16T22:58:50.085678
2019-01-03T01:17:47
2019-01-03T01:17:47
133,060,028
2
0
null
null
null
null
UTF-8
Python
false
false
6,903
py
""" 命名规范:module_name, package_name, ClassName, method_name, ExceptionName, function_name, GLOBAL_VAR_NAME, instance_var_name, function_parameter_name, local_var_name. """ from rest_framework_swagger.views import get_swagger_view from django.db.models import Count, Max, Avg, Min, Sum, F, Q, FloatField from django.db imp...
9f6df0b9d667e48f2a477fe0fe0a8f9e65ad8660
4e382ae46cf997ea2dbdfcfa463a57d3e0e9ad97
/sols/alien_dictionary.py
5055b53bd8f24e5405e99010a8f3c21326e00665
[]
no_license
hayeonk/leetcode
5136824838eb17ed2e4b7004301ba5bb1037082f
6485f8f9b5aa198e96fbb800b058d9283a28e4e2
refs/heads/master
2020-04-28T03:37:16.800519
2019-06-01T14:34:45
2019-06-01T14:34:45
174,943,756
0
1
null
null
null
null
UTF-8
Python
false
false
1,456
py
from collections import defaultdict class Solution(object): def alienOrder(self, words): def buildGraph(w1, w2): i = j =0 while i < len(w1) and j < len(w2): if w1[i] != w2[j]: graph[w1[i]].append(w2[i]) break el...
90e2690474c76dfd0c66852f7808dfb0f2d8a6c3
93dd86c8d0eceaee8276a5cafe8c0bfee2a315d3
/python/paddle/fluid/tests/unittests/test_imperative_layer_apply.py
f61d1ab888a51b2ebe4d1205b30fb84dfa4e7aeb
[ "Apache-2.0" ]
permissive
hutuxian/Paddle
f8b7693bccc6d56887164c1de0b6f6e91cffaae8
a1b640bc66a5cc9583de503e7406aeba67565e8d
refs/heads/develop
2023-08-29T19:36:45.382455
2020-09-09T09:19:07
2020-09-09T09:19:07
164,977,763
8
27
Apache-2.0
2023-06-16T09:47:39
2019-01-10T02:50:31
Python
UTF-8
Python
false
false
2,996
py
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
b3c3968421eca0da3d4b2b7b48389e1ed8c6ac29
c8efab9c9f5cc7d6a16d319f839e14b6e5d40c34
/source/Clarification/DFS_BFS/127.单词接龙.py
3fa9f475399d5187665f9e3f4d03a439ad1aaffc
[ "MIT" ]
permissive
zhangwang0537/LeetCode-Notebook
73e4a4f2c90738dea4a8b77883b6f2c59e02e9c1
1dbd18114ed688ddeaa3ee83181d373dcc1429e5
refs/heads/master
2022-11-13T21:08:20.343562
2020-04-09T03:11:51
2020-04-09T03:11:51
277,572,643
0
0
MIT
2020-07-06T14:59:57
2020-07-06T14:59:56
null
UTF-8
Python
false
false
3,824
py
# 给定两个单词(beginWord 和 endWord)和一个字典,找到从 beginWord 到 endWord 的最短转换序列的长度。转换需遵循如下规则: # # 每次转换只能改变一个字母。 # 转换过程中的中间单词必须是字典中的单词。 # 说明: # # 如果不存在这样的转换序列,返回 0。 # 所有单词具有相同的长度。 # 所有单词只由小写字母组成。 # 字典中不存在重复的单词。 # 你可以假设 beginWord 和 endWord 是非空的,且二者不相同。 # 示例 1: # # 输入: # beginWord = "hit", # endWord = "cog", # wordList...
3b64861964aacf042ab29afae8f2a3f49608ae1b
f7d0f201f9e4730e334ccd1c0050831af46110c7
/problem001.py
89efcbea327cf84c98d78a3d2311ab572552843c
[]
no_license
1UnboundedSentience/projecteuler
4f0d0b1a7d289e344543caa7f5695743e122dd53
1fd4184a3de9aea07bffa827404a3fdc07178edf
refs/heads/master
2021-01-15T23:36:04.303115
2012-01-13T00:43:20
2012-01-13T00:43:20
null
0
0
null
null
null
null
UTF-8
Python
false
false
434
py
""" If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. From http://projecteuler.net/index.php?section=problems&id=1 """ def problem001(max): return sum([i for i in range(max) if ...
057df236c8787cde17bb88efa4a7e8f67e6a7230
e781b0dfd0a193fa229c81dd816f8977529e9c47
/plenum/test/checkpoints/test_checkpoint_stable_while_unstashing.py
6eba14a195d8dbca6d3981a7a6b9bfae4d7f566b
[ "Apache-2.0" ]
permissive
ddntechssi/indy-plenum
b8a2ac597b8249994fa0b9e0aa3bb7965c02a693
16868467e1340a5557f7d610370dce5a59c6097b
refs/heads/master
2020-04-30T04:35:54.054594
2019-03-19T18:41:28
2019-03-19T18:41:28
176,614,246
1
0
Apache-2.0
2019-03-19T23:27:13
2019-03-19T23:27:13
null
UTF-8
Python
false
false
3,072
py
from plenum.test.checkpoints.helper import chkChkpoints, check_stashed_chekpoints from plenum.test.delayers import ppDelay, msg_rep_delay from plenum.test.helper import sdk_send_random_and_check, assertExp from plenum.test.node_catchup.helper import waitNodeDataEquality from plenum.test.stasher import delay_rules from ...
68fe1cc9388b76c4e397bfc4c36a42288ee36988
d375819f9de5760acc860af433b87ed52cfe64e8
/wyggles/sprite/engine.py
38a1ea5fb4473586c9053657ed5d1c1649fb3d6b
[]
no_license
kfields/wyggles-old
a6bfc568cd470447da2aaae1a6ad7ca4ca901858
cb9f7ea9ef47e4b951c8a498952d904f28030317
refs/heads/master
2022-04-22T21:11:34.153235
2020-03-15T23:08:52
2020-03-15T23:08:52
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,228
py
import math import os #import random from random import random import sys from .layer import Layer from wyggles.mathutils import * from .collision import Collision worldMinX = 0 worldMinY = 0 worldMaxX = 640 worldMaxY = 480 def without( source, element): temp = source[:] try: ...
8e747d7a1899319d6f0f55134ae42cec7a6a1c63
017d82f3e3040fbce485a0135c062061648f91f0
/013/013.py
c4839965ceb730023dc41e005ff02f424be4d096
[]
no_license
bashwork/project-euler
404b7e2bdd99888cdb2dfae6b2272ed3730a5aa0
84cc18968a618a17584c4455f94e2e57f9def2cb
refs/heads/master
2016-09-05T21:17:04.754346
2015-02-06T19:49:03
2015-02-06T19:49:03
379,188
3
0
null
null
null
null
UTF-8
Python
false
false
5,641
py
vector = [ 37107287533902102798797998220837590246510135740250, 46376937677490009712648124896970078050417018260538, 74324986199524741059474233309513058123726617309629, 91942213363574161572522430563301811072406154908250, 23067588207539346171171980310421047513778063246676, 8926167069662363382013637...
244bb265da9da87390906151f61c5aa088940dec
fd65851c7977176cfa69056ea5d63ca529e74271
/components/google-cloud/google_cloud_pipeline_components/container/experimental/gcp_launcher/utils/json_util.py
cdc9e256749386fb21acd07efaa92ce44cf45fc0
[ "Apache-2.0", "BSD-3-Clause", "MIT", "BSD-2-Clause" ]
permissive
NikeNano/pipelines
dad9f45267a7f4c495a30880dd6fe1570f26fa64
73804f8928ce671839d34800627b6d3ea9f820a7
refs/heads/master
2022-01-29T21:24:43.693120
2021-11-20T18:18:35
2021-11-20T18:18:35
221,051,451
1
1
Apache-2.0
2021-04-23T20:07:11
2019-11-11T19:11:29
Python
UTF-8
Python
false
false
1,565
py
# Copyright 2021 The Kubeflow 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 applicabl...
12357a3852565d74b4832a5ccb00cc3298eb2a2f
fac68cda1a9e79d8f040ca632f0353ccb8d20c8c
/backtesting using zipline/zip2.py
5269a754a5da563c9b213a17606482a38b07ac13
[]
no_license
fagan2888/Algo-trading-strategy
11a9b5f70f53492d5b407ac8593af6921a6d44c1
4450f5a28f069e0e695843b0f69197519fa5c1da
refs/heads/master
2022-01-11T19:07:05.983331
2019-05-28T05:15:11
2019-05-28T05:15:11
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,671
py
import pytz from datetime import datetime from zipline.api import order, symbol, record, order_target from zipline.algorithm import TradingAlgorithm from zipline.data.loader import load_bars_from_yahoo import pyexcel # Load data manually from Yahoo! finance start = datetime(2011, 1, 1, 0, 0, 0, 0, pytz.utc)....
3b31b8b5fde1d17b8fc786ed38466bf518c1d6ff
2251d71bc3ecb589ce1a8b274a08370c3240bf51
/0238 Product of Array Except Self.py
b83c04107ed1d7745bf70b11871df718760b6139
[]
no_license
YuanyuanQiu/LeetCode
3495a3878edc2028f134bddb5b9ec963069562cb
6f5d0ef6a353713c0b41fa7ec0fb8c43a7e8dc55
refs/heads/master
2022-12-11T04:04:01.686226
2022-12-06T18:42:14
2022-12-06T18:42:14
231,168,173
0
0
null
null
null
null
UTF-8
Python
false
false
1,251
py
#def productExceptSelf(self, nums: List[int]) -> List[int]: # n = len(nums) # zeros = nums.count(0) # # if zeros > 1: # return [0] * n # # product = 1 # for num in nums: # if num != 0: # product *= num # # if zeros == 1: # res = [0] * n # idx = nu...
a2fdbe7e8a4cdb9897e6296c6966bbe1bde3e053
8fd695abd0b8b2523e42786d6b90fa99058545c5
/horsempdc/art.py
8f87fadafbf7aee0db1a70e2bd9a45a6e8ca83ec
[]
no_license
jbremer/horsempdc
109eb7ad9fd04124707fbb2955152996d845f3bb
4ec1fdc6926c3f83face5bcbee16c53a761fc6bf
refs/heads/master
2016-09-10T02:10:23.101176
2015-12-17T14:39:32
2015-12-17T14:39:32
23,502,118
0
1
null
2015-12-16T13:57:33
2014-08-30T22:45:35
Python
UTF-8
Python
false
false
4,491
py
# Copyright (C) 2014 Jurriaan Bremer. # This file is part of HorseMPDC - http://www.horsempdc.org/. # See the file 'docs/LICENSE.txt' for copying permission. # Thanks to http://www.asciiworld.com/-Horses-.html _doge_horse = r""" |\ /| ___| \,,/_/ ...
dc2c2119263a0157cb7a145f69ea778a8e49e51b
ec84619271eac42481231218c9ee653dec99adad
/7. Set- Dictionary- Divide - Conquer/469. Same Tree.py
1cdd5a38d7f4a9d56672c1707ca8e0adaf4f8772
[]
no_license
LingHsiLiu/Algorithm0
19a968fffb5466022f9856c36af0364da6472434
f438e828dc9dd6196ee5809eb8fac21ccb688bf2
refs/heads/master
2020-04-04T17:55:48.182172
2019-01-02T19:06:57
2019-01-02T19:06:57
156,142,530
0
0
null
null
null
null
UTF-8
Python
false
false
811
py
# 469. Same Tree # Check if two binary trees are identical. Identical means the two binary trees have the same structure and every identical position has the same value. # Example # 1 1 # / \ / \ # 2 2 and 2 2 # / / # 4 4 # are identical. # 1 ...
a3e5cbc9a8bec44766a705ec15e5e27f2d0c37de
9a0e2312236b628007a67c07164ea7b97207e47c
/col/apps/syslog_collector/tests/acceptance_tests/test_syslog_collector.py
330a9acb484bb4b76dbd0bf8fc1ddfe348b58f57
[]
no_license
laxmi518/network_project
d88b9fe73522deaa90c1dbfd22c6861020a6c7be
2e998338f3d1142a8098d3dfd35f4c8ad0e4ba00
refs/heads/master
2020-05-21T15:48:07.830107
2018-05-09T18:58:37
2018-05-09T18:58:37
84,631,818
0
0
null
null
null
null
UTF-8
Python
false
false
3,195
py
import os import time import unittest import socket import ssl from subprocess import Popen import re import gevent from pylib.wiring import gevent_zmq as zmq from nose.tools import eq_ from pylib import wiring, disk, conf, inet class test_syslog_collector(unittest.TestCase): os.environ["TZ"] = "UTC" zmq_co...
f58ebecf367af70681cae87983a4b286dcad25da
9cfaffd2e3fe06467d0e4f7e671e459b04d123ea
/extras/management/commands/updates.py
34dffa7918245bab780b244d8bb583ed6bc223f4
[]
no_license
montenegrop/djangotravelportal
80b72b9e3da517885b6d596fad34049545a598a5
8a15fc387d20b12d16c171c2d8928a9b9d4ba5e1
refs/heads/main
2023-01-29T22:12:58.633181
2020-12-05T15:44:39
2020-12-05T15:44:39
318,826,064
0
0
null
null
null
null
UTF-8
Python
false
false
4,405
py
from django.core.management.base import BaseCommand, CommandError from django.conf import settings from operators.models import QuoteRequest, TourOperator, Itinerary, ItineraryType from users.models import UserProfile import MySQLdb from django.db.models import Count from django.contrib.auth.models import User from pla...
f0e094eec95b0e2ba7dc77239adfc658f8b0f713
060e99a3935b08f3344f01d3af9a1bf322783b99
/OOP/encapsulation.py
0e99667c6a2accaffee794f206cc93fbe9c61a7b
[]
no_license
Lemmah/pyWorkSpace
a2119a6cd2d2695eeb18a1d41400b7fe97a41c70
ba176a9029f108c39d53970ff5127be7007555ee
refs/heads/master
2021-01-22T11:10:57.205835
2017-09-05T07:57:28
2017-09-05T07:57:28
92,673,469
0
0
null
null
null
null
UTF-8
Python
false
false
670
py
# Encapsulation: data hiding. Encapsulated variables cannot be accessed directly. class BankAccount: ''' This is a bank account class ''' def __init__(self, accountName="Current Account", balance=200): ''' Constructor with encapsulated attributes ''' self.__accountName = accountName sel...
bf9f50f49f5bbb9df18f6cfac06a5ea8d787c98f
143eb3ced0ff1f9cad745c620fcb572f72d66048
/Assignment4/atom3/Kernel/Qoca/runUnitTests.py
2c224b32ce916eeab7312760d919486bacf2576d
[]
no_license
pombreda/comp304
2c283c60ffd7810a1d50b69cab1d5c338563376d
d900f58f0ddc1891831b298d9b37fbe98193719d
refs/heads/master
2020-12-11T07:26:19.594752
2014-11-07T12:29:28
2014-11-07T12:29:28
35,264,549
1
1
null
2015-05-08T07:18:18
2015-05-08T07:18:18
null
UTF-8
Python
false
false
714
py
def runUnitTests(): import unittest suite = unittest.TestSuite() print 'NOTE: if import fails, try running it from a higher-level directory' print 'IE: ..\\atom3\\Kernel> python Qoca\\runUnitTests.py\n' from unittests.QocaBasicConstraints import QocaBasicConstraints s...
d588825332a0ef69aeb97056aeff210c8bf6353d
ae7d5d11351af9201ce6181c48b8c60363c7ed00
/lib/galaxy/workflow/reports/generators/__init__.py
0fa46d4fb295ed41b79d33adcfbf98752944b597
[ "CC-BY-2.5", "AFL-2.1", "AFL-3.0", "CC-BY-3.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
natefoo/galaxy
818037d03f39ccfb3714c7e784fd64d7ad8f4d2e
64150c5bd803e75ed032e9f15acd003bae92b5ef
refs/heads/master
2023-08-17T02:57:02.580487
2020-03-26T13:33:01
2020-03-26T13:33:01
31,212,836
2
1
NOASSERTION
2019-04-25T12:30:28
2015-02-23T15:01:46
Python
UTF-8
Python
false
false
2,374
py
"""Module containing Galaxy workflow report generator plugins. """ from abc import ( ABCMeta, abstractmethod ) import six from galaxy.managers.markdown_util import ( internal_galaxy_markdown_to_pdf, ready_galaxy_markdown_for_export, resolve_invocation_markdown, ) @six.add_metaclass(ABCMeta) clas...
39336a1943b085ae0cdf21000d0b5ee2771f5e12
8c036299de04b1dd8edeabdd7b265beb4c16f64d
/WebMirror/management/rss_parser_funcs/feed_parse_extractGooseberrytlWordpressCom.py
69935050ff6657b86bdd6192cf29a7637182ef62
[ "BSD-3-Clause" ]
permissive
collegroup/ReadableWebProxy
f2dcc4ce4f32c461388f40890a2997d61b49b28a
bec24610dd52fde5311dfc9b9cb2b388e23727ec
refs/heads/master
2023-01-11T20:27:38.598545
2020-11-16T06:03:57
2020-11-16T06:03:57
null
0
0
null
null
null
null
UTF-8
Python
false
false
642
py
def extractGooseberrytlWordpressCom(item): ''' Parser for 'gooseberrytl.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('tsats', 'The Star Around The Sun', ...
7f419201fc23a0742c1ddb00244df3d888d47e0e
7eaeb56a2ed19a30559dac8673a979fc64d76e8a
/tests/parsers/c_parser/stmts/if_stmt_tests.py
9ac34d7e32ec9b86aab0bdf3fcd755d5c1d2639d
[ "MIT" ]
permissive
avast/retdec-regression-tests-framework
95935b6a66bee66f58a9f2ea1296f747536aeaae
f8f43c0870df638d114f685a30f8abf8b51d6d1e
refs/heads/master
2023-05-30T18:52:37.332065
2022-12-05T14:37:40
2022-12-05T14:37:40
113,967,405
8
5
MIT
2020-04-07T12:28:40
2017-12-12T09:01:52
Python
UTF-8
Python
false
false
3,520
py
""" Tests for the :module`regression_tests.parsers.c_parser.stmts.if_stmt` module. """ from tests.parsers.c_parser import WithModuleTests from regression_tests.parsers.c_parser.stmts.if_stmt import IfStmt class IfStmtTests(WithModuleTests): """Tests for `IfStmt`.""" def get_if_stmt(self, code, func_nam...
a922c484299fcb82e4c30019d0fbefc8983bd0d4
1527d341ec0910426ffede6207232f885b3176a0
/source/HwSendEmail.py
8f481d74c8c323f21344e6c81f02ade8d73cdf80
[]
no_license
eddiewang-wgq/HwUnittestFrameworkPy2
47f55c56c3e2c61aa153beb9180fa8247164fdcc
dada7db244f66830ca5a06087822f0b6db6ee512
refs/heads/master
2023-03-28T14:55:54.086200
2021-03-30T08:34:25
2021-03-30T08:34:25
352,928,215
0
0
null
null
null
null
GB18030
Python
false
false
4,032
py
#!/usr/bin/env python # coding:gbk # Created by zhaohongwei on 2016-06-20 # Blog: http://blog.csdn.net/z_johnny from email.mime.multipart import MIMEMultipart from email.mime.application import MIMEApplication from email.utils import COMMASPACE from email.mime.text import MIMEText from email.mime.image import MIMEIma...
4ed17d17fad5aa10e9004e2cd3e4b71e0b4eaa7f
e10c8dbd03117dcf71ae4c5e59863b9268cda514
/store/migrations/0015_auto_20200617_2230.py
cab6aa810e8b6c38461a407bd24f100c01c4f615
[]
no_license
linker10/pharmacy
c305eb8304057498ea06008f43715db682e88554
8cd30ca6f94f636f45400899f4a9f1c150af3bbf
refs/heads/master
2022-12-10T01:04:45.154055
2020-08-12T18:32:06
2020-08-12T18:32:06
276,040,272
0
0
null
null
null
null
UTF-8
Python
false
false
552
py
# Generated by Django 3.0.6 on 2020-06-17 17:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0014_auto_20200617_2227'), ] operations = [ migrations.AlterField( model_name='item', name='old_price', ...
b42a88f8b03d74ac056c53e343c01339be04c77e
692f77a160798b586f3ef1240c1bdf2bb114c9a0
/aiopening/__init__.py
1bd330e0d468a5d48aabf994e80d57f1a099b472
[ "MIT" ]
permissive
ducandu/aiopening
5e16f8240a527da37d622b5445b68083d4fba1e4
214d8d6dfc928ab4f8db634018092dc43eaf0e3c
refs/heads/master
2022-12-30T14:58:45.669350
2017-09-06T09:47:57
2017-09-06T09:47:57
93,327,068
0
0
null
null
null
null
UTF-8
Python
false
false
677
py
""" --------------------------------------------------------------------------------- shine - [s]erver [h]osted [i]ntelligent [n]eural-net [e]nvironment :) --------------------------------------------------------------------------------- by Code Sourcerer (c) 2017 ducandu GmbH """ # "global" classes (that should...
ec9155714dc595fe99a631eee20e6a23e915fb67
ef821468b081ef2a0b81bf08596a2c81e1c1ef1a
/Python OOP/Decorators-LAB/Vowel_Filter.py
02cd267e9c2e4dadb5ddf5db5dd6fce9504be66b
[]
no_license
Ivaylo-Atanasov93/The-Learning-Process
71db22cd79f6d961b9852f140f4285ef7820dd80
354844e2c686335345f6a54b3af86b78541ed3f3
refs/heads/master
2023-03-30T20:59:34.304207
2021-03-29T15:23:05
2021-03-29T15:23:05
294,181,544
0
0
null
null
null
null
UTF-8
Python
false
false
324
py
def vowel_filter(function): def wrapper(): vowels = ['a', 'o', 'u', 'e', 'i', 'y'] result = function() result = [letter for letter in result if letter in vowels] return result return wrapper @vowel_filter def get_letters(): return ["a", "b", "c", "d", "e"] print(get_letters...
a0f94082909743fec98edbe78c3ed3b4b1dcec26
37fe0d74375527f4aaf86857e17b96b675837205
/aid1805/MongoDB/grid.py
9f413334eb1c346fa4c34264e5f642ac4adafd87
[]
no_license
wangleiliugang/data
af8255eb76affa55424979c809c6168a7f3995ea
375a58b454be38ffa156876a7770f8d6f4345aba
refs/heads/master
2023-06-05T13:21:43.630854
2021-06-21T09:04:39
2021-06-21T09:04:39
378,862,494
0
0
null
null
null
null
UTF-8
Python
false
false
831
py
# 获取数据库中gridfs文件 from pymongo import MongoClient # 和pymongo模块是绑定在一起的 import gridfs # 1.创建mongo的连接对象 conn = MongoClient('localhost', 27017) # 2.数据库mygrid不存在则自动创建 db = conn.mygrid # 3.获取gridfs对象 fs = gridfs.GridFS(db) # 4.得到迭代对象 files = fs.find() # print(files) # print(files.count()) # files为可迭代对象,每个迭代值代表一个存入文件的对象,通过...
ac4e06fa4a67e9af197caba2daa92a5f5e08fb37
5edd3d54b9fb7ef685d7760e03391307374dee73
/web_flask/100-hbnb.py
de39873740c50d7b60a5c758d756af7a171a7bcf
[]
no_license
PierreBeaujuge/AirBnB_clone_v2
3df331aea025f8b216a705bd66bd5203a3b34ec9
910d04c08a5f833cd71754a62e74e3b81c601ba2
refs/heads/master
2020-11-23T21:30:55.362761
2020-10-08T07:37:22
2020-10-08T07:37:22
227,829,165
0
3
null
2019-12-20T09:10:49
2019-12-13T11:52:51
Python
UTF-8
Python
false
false
767
py
#!/usr/bin/python3 """ Script that starts a Flask web application """ from flask import Flask from flask import render_template from models import storage app = Flask(__name__) @app.route('/hbnb', strict_slashes=False) def hbnb(): """view function that displays [...]""" all_states = storage.all("State").valu...
0d0195538784ac551b4ef042046c3d82a141aaf8
2775a8306052e727b9a602c7906e64ee44cb4d80
/dictionaria/scripts/initializedb.py
6c46022df940c053822222cf7ed1fffad039bcb9
[ "Apache-2.0" ]
permissive
pombredanne/dictionaria
f40b45adb93b0733d1c047c338e15e834a2aa6b3
9668129e9b856fc5e8e78e15dacb1037621cbeb6
refs/heads/master
2021-01-14T14:16:39.221190
2015-11-25T22:22:06
2015-11-25T22:22:06
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,846
py
from __future__ import unicode_literals from datetime import date import transaction from nameparser import HumanName from sqlalchemy.orm import joinedload_all, joinedload from clldutils.misc import slug from clld.util import LGR_ABBRS from clld.scripts.util import Data, initializedb from clld.db.meta import DBSession...
cb325b725cf13cd0684e1a897ad69aa6f2113cf7
f84624d2f04c730e411e265e0a2fd97b6cfe6107
/anomaly_detection/CIFAR/run_cifar_dec.py
01915d1b0e3b643c119627d251a7659982825755
[ "Apache-2.0" ]
permissive
thu-spmi/Inclusive-NRF
1326cac36140f71bc05f4f71cd35a6024a97b394
e4e6ae6edca8f8d11a51f649609a8f7675d22f99
refs/heads/main
2023-01-20T01:22:34.444134
2020-11-21T13:03:02
2020-11-21T13:03:02
314,812,840
3
0
null
null
null
null
UTF-8
Python
false
false
2,386
py
import argparse parser = argparse.ArgumentParser() parser.add_argument('--batch_size', type=int, default=64) parser.add_argument('--lrd', type=float, default=1e-3) parser.add_argument('--lrg', type=float, default=1e-3) parser.add_argument('--loss', type=str, default='hinge') parser.add_argument('--gpu', default='0' ,t...
093dc3c5b815c2667c195e70c4bc2fd0a494f163
fb909b0716f62ae118afa7d505cbcbd28f62bc63
/main/migrations/0077_auto_20201010_0437.py
8b774df3242d4e5b429aa27ceafc4c8b4dc7bc60
[]
no_license
dkalola/JustAsk-Final
a5b951462cd3c88eb84320bb8fcf10c32f959090
c2e7c2ffae4d3c2d870d5ba5348a6bae62db5319
refs/heads/main
2023-05-24T16:02:17.425251
2021-06-16T19:33:52
2021-06-16T19:33:52
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,885
py
# Generated by Django 3.1.1 on 2020-10-10 04:37 import datetime from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('main', '0076_auto_20201010_0435'), ] ...
b29b703f1530373509e91bc7c4ff79b5dd754d1a
71e43068e82c91acbb3849169d1723f1375ac27f
/talon_one/models/feature_flag.py
a4e731d55e6fae5e31d2af2b4a4e26d311e5dfcb
[ "MIT" ]
permissive
talon-one/talon_one.py
aa08a1dbddd8ea324846ae022e43d441c57028f6
917dffb010e3d3e2f841be9cccba5bba1ea6c5c3
refs/heads/master
2023-05-11T18:50:00.041890
2023-05-03T20:17:39
2023-05-03T20:17:39
79,575,913
1
7
MIT
2023-05-03T15:10:14
2017-01-20T16:29:46
Python
UTF-8
Python
false
false
6,527
py
# coding: utf-8 """ Talon.One API Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-...
278e1903f4c212e40feb622879c936eec4220cdb
6ee1a53f2da154008a79df40a5a2cb9f77d36409
/study/threading_learn.py
8f168445e1d388a3755b4c721ff677314e04f653
[]
no_license
zuoguagua/demo
939f219c29cf0eae6c08c96cd578f1e566819243
504a551a5153848a9a173d9925132caea9806c25
refs/heads/master
2021-01-18T15:06:13.667246
2016-01-18T09:09:41
2016-01-18T09:09:41
44,574,876
0
0
null
null
null
null
UTF-8
Python
false
false
1,393
py
#!/usr/bin/env python import logging import Queue import threading def func_a(a,b): return a+b def func_b(): pass def func_c(a,b,c): return a,b,c _task_queue = Queue.Queue() def async_call(function,callback,*args,**kwargs): _task_queue.put({ 'function':function, ...
c558f48d172a81752e398f010623632a3e38e65e
3bdcb60b0bffeeb6ff7b0ddca4792b682158bb12
/4.2.9-AnidamientoDeEstructuras.py
8a1e89b2e21ae68af8c778aa5476bdd7cc891382
[]
no_license
FrankCasanova/Python
03c811801ec8ecd5ace66914f984a94f12befe06
03f15100991724a49437df3ce704837812173fc5
refs/heads/master
2023-05-23T01:37:12.632204
2021-06-10T15:20:38
2021-06-10T15:20:38
278,167,039
0
0
null
null
null
null
UTF-8
Python
false
false
273
py
# ejemplo limit = int(input('Dame un número: ')) for num in range(2, limit): primo = True for divisor in range(2, num): if num % divisor == 0: primo = False break if primo: print('el número {0} es primo'.format(num))
c7dcaec059d5297db4608373da3174aaf6d96ac2
7343194126b632ff5ac76fa3291de9ecf5b53e38
/lib/carbon/tests/benchmark_routers.py
cc29ac29d0e725f8de9bab5434a58880bc3a0df7
[ "Apache-2.0" ]
permissive
zillow/carbon
a885f226347d66cebe8dda33573a1efbc44e3078
07244f98e8ddf305a0b2cc2da1bcc1a86b613ce6
refs/heads/master
2020-12-26T00:46:14.220907
2019-10-09T02:23:40
2019-10-09T02:23:40
46,576,478
0
0
Apache-2.0
2019-10-09T02:23:41
2015-11-20T17:24:21
Python
UTF-8
Python
false
false
2,476
py
import os import timeit from carbon.routers import DatapointRouter from test_routers import createSettings REPLICATION_FACTORS = [1, 4] DIVERSE_REPLICAS = [True, False] N_DESTINATIONS = [1, 16, 32, 48] def print_stats(r, t): usec = t * 1e6 msec = usec / 1000 text = " %s %s datapoints: %d" % (r.plugin_n...
fbf9692e45b4994a8d39f8cbc34f41bf1bb692ae
d94b6845aeeb412aac6850b70e22628bc84d1d6d
/active_selective_prediction/sampling_methods/__init__.py
f6665d3dc1794f678e706514bb12be34006dff71
[ "CC-BY-4.0", "Apache-2.0" ]
permissive
ishine/google-research
541aea114a68ced68736340e037fc0f8257d1ea2
c1ae273841592fce4c993bf35cdd0a6424e73da4
refs/heads/master
2023-06-08T23:02:25.502203
2023-05-31T01:00:56
2023-05-31T01:06:45
242,478,569
0
0
Apache-2.0
2020-06-23T01:55:11
2020-02-23T07:59:42
Jupyter Notebook
UTF-8
Python
false
false
1,496
py
# coding=utf-8 # Copyright 2023 The Google Research 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 applicab...
7c33a2cb3128b036c61416554cb4d258e4f256dd
740b88ae1307d159fb7f39c455a295155c94d58f
/main.py
a03d136942c1668a9b1e67eeb4a5d60b8dcd520b
[]
no_license
hosmanadam/quote-scraping-game
4ed578320d3c6872711dadc9f312b7acc6e071c0
5d4ecd5f3e2137127190971cfc4da6447f71ffc6
refs/heads/master
2020-04-03T10:05:27.242294
2019-05-14T11:08:47
2019-05-14T11:08:47
155,183,546
0
0
null
2018-10-31T23:48:51
2018-10-29T09:16:20
Python
UTF-8
Python
false
false
5,892
py
import os import unicodedata from csv import DictReader, DictWriter from random import choice from time import sleep import regex from pyfiglet import figlet_format from termcolor import colored import scraper import ui from classes.BadQuoteError import BadQuoteError PRINT_DELAY = 1 CRAWL_DELAY = 1 def essentiali...
c6a432ee79a97806ef61dc314d50de52ccaa5959
61004e474b7b2ad0071c16766f0f7874f04f9466
/examples/dataflow-production-ready/python/ml_preproc/pipeline/beam_classes/clean_records.py
455ff7e92e93510847b84dce6bfda5dffe4fa050
[ "Apache-2.0" ]
permissive
GoogleCloudPlatform/professional-services
eb79751efae765a8c691a745e520f44f51bd715c
0f51121b945bd74c7f667e74e8861fceda87565c
refs/heads/main
2023-09-05T02:57:33.328973
2023-08-30T14:40:30
2023-08-30T14:40:30
91,730,359
2,626
1,381
Apache-2.0
2023-09-14T20:13:42
2017-05-18T19:29:27
Python
UTF-8
Python
false
false
2,265
py
# Copyright 2021 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 or agreed to i...
0ddbb08c6b7a062673f7f83b9e2f349c32c73b77
8ebf6311c3c1db40c7bb56051cf4e37e1b85a4f9
/rm-server/templatemanager/templatemanager/mongodb.py
949427035f6d0032ee8be250602351099a125713
[]
no_license
sq591442679/requirements-manager
e8b074afb7fd2a83632f2546d392dab4c35aeeeb
6d664ce338b455150dcc9a86145967e8dd67a9dd
refs/heads/master
2023-07-08T04:38:20.064019
2021-08-11T03:41:13
2021-08-11T03:41:13
392,877,568
0
0
null
null
null
null
UTF-8
Python
false
false
234
py
import pymongo from templatemanager.config import MONGODB_URL client = pymongo.MongoClient(MONGODB_URL) database = client['RequirementsManager'] template_collection = database['Template'] document_collection = database['Document']
729fe63a21b3433191f4134946686e280a343e23
cb5b76716ac04f9bd2eefc2020d9dea7ae9f2123
/04判断年月日天数.py
d1e246e9be03df255643a395408e58acdd93f423
[]
no_license
chengong825/python-test
6c788e47c2ee71457b77d190759d73954489d1fb
e8ac085386eadb562a125cc4428cad9f7b312c3c
refs/heads/master
2020-03-29T13:17:50.411249
2018-10-26T04:40:42
2018-10-26T04:40:42
149,950,556
0
0
null
null
null
null
UTF-8
Python
false
false
1,295
py
y=int(input("输入年份")) m=int(input("输入月份")) d=int(input("输入日号")) def jug(y): if (y%4==0 and y%100 !=0)or(y%400==0): return 1 else: return 0 if jug(y)==1: if m==1: i=d elif m==2: i=31+d elif m==3: i=31+29+d elif m==4: i=31+29+31+d elif m==5: ...
294cb258fe310c29e43889691c9291e31eea57cb
b2db386a35e167dd67d6de90d95c06d5c2ed91cd
/657_judgeCircle.py
de842edbcdbca60309bbad6d4b2c427565ed7dc1
[]
no_license
rohitmungre/leetcode
9edb1b8b0cd714eb1a5e1fa847f2e17c455fd624
d49836b2b46a980f073bb9a6f2e47c4a903e48ac
refs/heads/master
2020-08-07T16:55:38.699188
2020-03-12T11:00:13
2020-03-12T11:00:13
213,531,119
1
0
null
null
null
null
UTF-8
Python
false
false
504
py
class Solution(object): def judgeCircle(self, moves): """ :type moves: str :rtype: bool """ y = 0 x = 0 for item in moves: if item == 'U': y = y +1 elif item == 'D': y = y -1 elif it...
fb25374076a68ad89abab966d09eacb305fd5bdf
a56252fda5c9e42eff04792c6e16e413ad51ba1a
/resources/usr/local/lib/python2.7/dist-packages/scipy/linalg/_solvers.py
a6de2d946676fb45fe7951ef9d4115fd340500bd
[ "Apache-2.0" ]
permissive
edawson/parliament2
4231e692565dbecf99d09148e75c00750e6797c4
2632aa3484ef64c9539c4885026b705b737f6d1e
refs/heads/master
2021-06-21T23:13:29.482239
2020-12-07T21:10:08
2020-12-07T21:10:08
150,246,745
0
0
Apache-2.0
2019-09-11T03:22:55
2018-09-25T10:21:03
Python
UTF-8
Python
false
false
7,241
py
"""Matrix equation solver routines""" # Author: Jeffrey Armstrong <[email protected]> # February 24, 2012 from __future__ import division, print_function, absolute_import import numpy as np from numpy.linalg import inv, LinAlgError from .basic import solve from .lapack import get_lapack_funcs from .decomp_schu...
a6102dc1cb29b2ad159b1a763872388f8957f2df
47ca35636ad56f7e3878777fbb85eac9aef32bf7
/initdjango/new_project/mysite/blog/feeds.py
862ba8077866af2a1677f8b26f12c7e869d11657
[]
no_license
vihndsm/Python
0f6bd7ab7583ff8d078d4abc4fd9053a5f65e5cf
72291e76fecca0b1a9176f77bd5f042806ec9b27
refs/heads/master
2022-12-30T00:43:12.439684
2020-10-14T06:35:16
2020-10-14T06:35:16
287,447,563
0
0
null
null
null
null
UTF-8
Python
false
false
447
py
from django.contrib.syndication.views import Feed from django.template.defaultfilters import truncatewords from .models import Post class LatestPostsFeed(Feed): title = 'My blog' link = '/blog/' description = 'New posts of my blog.' def items(self): return Post.published.all()[:5] def item_...
b13ada7f5333de200a2517f5096c67508645daba
879ac03dd910d152170d6d1e3ff4d5e522b14d79
/Algorithms/02. Implementation/014. Migratory Birds.py
d67d433a6fd67112bbc60824b76df05b4f1d4592
[]
no_license
dispe1/Hackerrank-Solutions
ae47920d7761546fd2ef753c1b4f9ae087aaed2a
67b792dc2cb2933eb1f1565100ea13b0c9783fba
refs/heads/master
2020-07-11T21:25:39.824667
2019-12-10T12:00:12
2019-12-10T12:00:12
204,646,756
4
3
null
null
null
null
UTF-8
Python
false
false
602
py
# Problem: https://www.hackerrank.com/challenges/migratory-birds/problem # Difficulty : Easy # Score : 10 import os import collections from functools import reduce def migratoryBirds(arr): count = collections.Counter(arr) ar = list(count.items()) ar.sort() result = reduce(lambda a,b: a if a[1] >= b[1]...
02cb07a36132dd7d9cf6132a4a9203d970779e44
b6cdef81a572e02c0cbd795a8fb6bbc74f99d627
/crypto/urls.py
ac8334a98e1eb790961dc66f3a4ca4105fcf3141
[ "MIT" ]
permissive
sodatta/Stocks-Screener
4afbdd68c1e80dafece50e3e0b967af35dd83c07
0b8da91da40b715beaf3a79163b1bdf6ea3be3b9
refs/heads/master
2023-07-27T13:14:47.798403
2021-05-03T20:04:51
2021-05-03T20:04:51
null
0
0
null
null
null
null
UTF-8
Python
false
false
264
py
from django.urls import path from crypto.views import list_crypto_currencies, view_crypto_currency app_name = 'crypto' urlpatterns = [ path('', list_crypto_currencies, name="home"), path('<int:pk>', view_crypto_currency, name='view_crypto_currency'), ]
c8be4c5e699d6d7172c3c72da43067f3395f3401
de24f83a5e3768a2638ebcf13cbe717e75740168
/moodledata/vpl_data/303/usersdata/304/85170/submittedfiles/minha_bib.py
d3fce95fc32ffe08c69a6451d3e38b683df07624
[]
no_license
rafaelperazzo/programacao-web
95643423a35c44613b0f64bed05bd34780fe2436
170dd5440afb9ee68a973f3de13a99aa4c735d79
refs/heads/master
2021-01-12T14:06:25.773146
2017-12-22T16:05:45
2017-12-22T16:05:45
69,566,344
0
0
null
null
null
null
UTF-8
Python
false
false
640
py
# -*- coding: utf-8 -*- import time #COMECE AQUI ABAIXO def hello_world() : print('Olá mundo') return def hello_world2() : texto = 'Olá mundo' return texto def media(n1,n2) : m = (n1 + n2)/2.0 return m def multiplicacao(x,y) : m = (x*y) return m def media(n1,...
770c415c4e2aed55dfbfce8f6afa2f28a83f3cb2
726d8518a8c7a38b0db6ba9d4326cec172a6dde6
/0657. Robot Return to Origin/Solution.py
81f8ee2aef608a5a9f1aedd420095492bda26e3c
[]
no_license
faterazer/LeetCode
ed01ef62edbcfba60f5e88aad401bd00a48b4489
d7ba416d22becfa8f2a2ae4eee04c86617cd9332
refs/heads/master
2023-08-25T19:14:03.494255
2023-08-25T03:34:44
2023-08-25T03:34:44
128,856,315
4
0
null
null
null
null
UTF-8
Python
false
false
486
py
class Solution: def judgeCircle_MK1(self, moves: str) -> bool: x = y = 0 for move in moves: if move == 'U': x += 1 elif move == 'D': x -= 1 elif move == 'R': y += 1 else: y -= 1 re...
d500eac11046f0eebdbfcef856acfda872d27fab
83048ab1abb6941ed0b19fb5e5ff4a9d14b48e8c
/fractional_knapsack.py
1bcfcaa88935e415750cbac10ba752d5fb2affe1
[]
no_license
harshitalpha/Algorithms
ebad07cc77516ab5c35ae414462d10a38d5ef97e
2f7dcf4c3bb4390267231c7c96f7e76399c0166e
refs/heads/master
2021-07-14T17:34:02.546583
2020-06-25T06:38:39
2020-06-25T06:38:39
178,813,562
2
0
null
null
null
null
UTF-8
Python
false
false
1,976
py
''' KNAPSACK PROBLEM PARADIGM - GREEDY Date : 12-Feb-2020 Name - Harshit Singhal ''' def knapsack(profit, weights, max_weight): ''' The idea to implement is that take two list of profit and weights we make list of index = [0,1,2,...] then we calculate the profit and weight ratio and store in list named ratio ...
1373c132d750faa29f5c0215c25e9f3c8ae56242
330a8979441a9cae2c7af07e6a03080482cfb944
/src/lib/commands/catch.py
1a96b88c2fdd44b05f0a3b2c8ebe156ce3df1cb5
[]
no_license
singlerider/lorenzotherobot
025770732c3de299437a9d49a4669bcb1b2b7f32
d0cac10afd19335aad4145c99ffec5413b97a22a
refs/heads/master
2020-12-26T03:43:35.423157
2018-07-21T04:53:57
2018-07-21T04:53:57
28,792,870
26
19
null
2016-04-17T02:06:14
2015-01-05T01:52:04
Python
UTF-8
Python
false
false
1,246
py
import globals from src.lib.queries.points_queries import * from src.lib.queries.pokemon_queries import * def catch(**kwargs): channel = kwargs.get("channel", "testchannel").lstrip("#") if globals.CHANNEL_INFO[channel]['caught'] is False: pokemon_trainer = kwargs.get("username", "testuser") # ...
093d87a094d7b4d8250c0340cb4a4b8ade5abff5
4c49fdc4608a49dfacea02fba364deb295ef78dc
/backend/texty_friends_22060/urls.py
8b36763e08c9a1ef7bbc0699bd7e2bbbad8553a9
[]
no_license
crowdbotics-apps/texty-friends-22060
4b9db76082d0b536c24321d4faf6a65c04799b2b
7cb9bbc9f788844d1fd08172906cac66397f104d
refs/heads/master
2023-01-08T21:21:17.337089
2020-10-28T15:55:31
2020-10-28T15:55:31
308,067,651
0
0
null
null
null
null
UTF-8
Python
false
false
1,949
py
"""texty_friends_22060 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home')...
d8ca05184091d8e0b194f3a2b89226c67244e6b8
f0d713996eb095bcdc701f3fab0a8110b8541cbb
/nugyAtjRNQPTHLJNR_15.py
1fcf64ccafcc2df3b1ed06c5d4dbeb404587d3cc
[]
no_license
daniel-reich/turbo-robot
feda6c0523bb83ab8954b6d06302bfec5b16ebdf
a7a25c63097674c0a81675eed7e6b763785f1c41
refs/heads/main
2023-03-26T01:55:14.210264
2021-03-23T16:08:01
2021-03-23T16:08:01
350,773,815
0
0
null
null
null
null
UTF-8
Python
false
false
779
py
""" Suppose that you add all of the page numbers in a book. If the total is 21, the book could only have 6 pages because 1 + 2 + 3 + 4 + 5 + 6 = 21. If the total were 25, that would be impossible because the next number in the series is 28 (21 + 7). Create a function that, given the `total` number of pages as an ar...
9c91579e1fcf5ada284b7da45dea1444dc10b0e7
44bfafa7a3de51e089a470afaa7d37e4e1176777
/seqspy/Evap_UVMOT_MultiPulse_Image_ZEROCROSSING.py
9ca09d37b9f68c9699029d2eccfc1c2b090d3609
[]
no_license
drlightx/apparatus3-seq
b9bc4bd5d9b3a95f8610afff28ee7baea951b641
4505a2f484ecea2390482fb4ddf16ac9ca63b02d
refs/heads/master
2021-01-18T06:41:38.874121
2012-03-04T23:03:59
2012-03-04T23:03:59
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,256
py
"""Make sure the report file given by (L:/data/app3/Savedir)report(L:/data/app3/RunNumber).INI exists otherwise this code won't compile. """ __author__ = "Pedro M Duarte" import time t0=time.time() print "\n----- Evap_UVMOT_Image_ZEROCROSSING.py -----\n" import sys, math sys.path.append('L:/soft...
3a6764ab34cea0fccf1ae594504c307f26b60961
60e50b82636a7652c0c9d5e4a5fec50d49ac49ae
/src/scraping/models.py
a57819eb7ff44378535b96505f38ccac9cce5fa7
[]
no_license
SnottyJACK/scraping_service
5289922529dd8f832c8ecacfc32b66b56276d24d
de887b6b2b9c43e657c56a76038484c53a35afbd
refs/heads/master
2022-11-08T15:47:18.348350
2020-08-10T18:45:04
2020-08-10T18:45:04
285,887,020
0
0
null
null
null
null
UTF-8
Python
false
false
2,113
py
from django.db import models from scraping.utils import from_cyrillic_to_eng # Create your models here. class City(models.Model): name = models.CharField(max_length=250, verbose_name="Название города", unique=True) slug = models.CharField(max_length=250,...
542dec1aa09ea22906b5ff9b37e525552243c9d1
ba2a05f20454bda428f140634bc602699f164fc4
/00.SSAFY/1.first-semester/01_basic/get_data/project2.py
a55a6a9741d9670b02ec835a95d9dc587d8db3f3
[]
no_license
snowink1137/TIL
734da402e99afa52f1af4ef996a6b274b1bcce0b
9e9c78eb0c892affc88e2d46e143cef98af743fb
refs/heads/master
2023-01-08T18:26:34.311579
2021-11-14T11:04:22
2021-11-14T11:04:22
162,255,934
0
0
null
2023-01-07T11:09:09
2018-12-18T08:32:44
Jupyter Notebook
UTF-8
Python
false
false
3,098
py
import requests import datetime import copy import csv import os KOBIS_KEY = os.getenv('KOBIS_KEY') # csv 데이터 읽고 영화 code 리스트 만들기 boxoffice = open('boxoffice.csv', 'r', encoding='utf-8') reader = csv.reader(boxoffice) movie_code_list = [] for line in reader: movie_code_list.append(line[0]) del movie_code_list[...
1bb0502f3504e1ee2481c92a2c7b19b89e50a5d0
7fbf91c595f3adb67e29ab879a0b215581d260bf
/scrapy爬虫/京东-m/JDSpider/items.py
c4dd966451147a80e44f3bfaf4b1609f9b3c996d
[]
no_license
Randyedu/python
69947b3836e62d0081d92591ae2acd9a54eadb9a
5f9e7bec295ae05eadde0f661e7039c2bd08f725
refs/heads/master
2021-04-26T22:20:22.555128
2018-03-02T07:01:27
2018-03-02T07:01:27
124,074,741
1
0
null
2018-03-06T12:23:42
2018-03-06T12:23:42
null
UTF-8
Python
false
false
3,741
py
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html from scrapy import Item, Field class CategoriesItem(Item): name = Field() #分类名称 url = Field() #分类url _id = Field() #分类id index = Field() #分类的index...
6829ee431be6466d0b34b15755cf9dcbdc3bf445
552d470963e23741762f2c18143557596f9f433f
/catalog/admin.py
cbee91a1712e5fd628da2d19eeac1e506ec0f707
[]
no_license
WilliamPerezBeltran/django_practice1
ccab7dac5593b34cebd09b1b6a9576cc9030c228
e5735e1009faad448c49f61c42afb2fc0db9e48e
refs/heads/master
2020-04-08T13:57:22.004619
2018-11-28T00:30:58
2018-11-28T00:30:58
159,415,584
0
0
null
null
null
null
UTF-8
Python
false
false
1,331
py
from django.contrib import admin from catalog.models import Author, Genre, Book, BookInstance # admin.site.register(Book) #admin.site.register(Author) admin.site.register(Genre) # admin.site.register(BookInstance) # Define the admin class class AuthorAdmin(admin.ModelAdmin): list_display = ('last_name', 'first_n...
a14bdfeb905147643da75e344e16bda463ba04de
09c39de5aad7b283cfac2f09a2b93e43086846d2
/Unit 10 Advanced Topics in Python/02 Introduction to Bitwise Operators/The Bitwise Operators/6-Slide to the Left! Slide to the Right!.py
4be1e2a75a05f98a77cf829b748bf1d8d2ca9dd2
[ "MIT" ]
permissive
lpython2006e/python-samples
b4e84080259faf75b41fb2fd4fb9d2fbc9f857aa
b94ba67ce0d7798ecf796dadae206aa75da58301
refs/heads/master
2023-01-21T13:16:13.295163
2020-11-29T11:01:50
2020-11-29T11:01:50
278,653,779
1
0
null
null
null
null
UTF-8
Python
false
false
164
py
shift_right = 0b1100 shift_left = 0b1 # Your code here! shift_right = shift_right >> 2 shift_left = shift_left << 2 print(bin(shift_right)) print(bin(shift_left))
1e28fd5b3d89457860ba8f712835fb26b59c0ce9
fb4e41a40d82427e3948549653cdf0405e6dba2b
/app/main/routes.py
275d16634e7603b9970b08849ae8afe2c331cd8a
[]
no_license
Axeh99/Axeh99s-Website
5afeef75943722a7c3e67554da57daeb01c70f7a
7704fbaae7aa26bb1c208fbc18bb6679ea9e3215
refs/heads/master
2022-12-10T21:37:16.296575
2020-09-01T16:12:27
2020-09-01T16:12:27
283,016,745
1
0
null
2021-03-04T20:03:07
2020-07-27T21:07:14
HTML
UTF-8
Python
false
false
455
py
from flask import Blueprint, render_template, request from app.models import Post main = Blueprint("main", __name__) @main.route("/") @main.route("/home") def home(): page = request.args.get("page", 1, type=int) posts = Post.query.order_by(Post.date_posted.desc()).paginate(page=page, per_page=5) return ...
07b01473d13eb88ada3a05a4badbc11557620cc4
b0a274023658af5202b34772836a17876e2429c4
/ballet/eng/ts.py
901571acacbded4a2a29188533e0c7399998ae6d
[ "MIT" ]
permissive
pvk-developer/ballet
a785a89c5fabf4eac74a732dd81c600b5a4a3761
1b720790aff072d1b004c7df0f70860bf4947204
refs/heads/master
2021-02-12T17:04:00.317030
2020-03-02T05:20:30
2020-03-02T05:20:30
null
0
0
null
null
null
null
UTF-8
Python
false
false
978
py
from sklearn.pipeline import FeatureUnion from ballet.eng.base import GroupedFunctionTransformer __all__ = ['SingleLagger', 'make_multi_lagger'] class SingleLagger(GroupedFunctionTransformer): """Transformer that applies a lag operator to each group Args: lag (int): lag to apply groupby_kwa...
3850bc892d13df29ec269ea05acd45528302e442
a14dd601cde67f67d0ba38dfd1362f7c0109cef1
/recursion/leetcode/word-break/count.py
56dba130f8e99755805eb6a3116f554bd9cee700
[]
no_license
Meaha7/dsa
d5ea1615f05dae32671af1f1c112f0c759056473
fa80219ff8a6f4429fcf104310f4169d007af712
refs/heads/main
2023-09-03T18:52:41.950294
2021-11-05T09:14:42
2021-11-05T09:14:42
null
0
0
null
null
null
null
UTF-8
Python
false
false
892
py
# T=n²+2ⁿ+w,S=2ⁿnw def x(s, words): def dfs(s): if not s: return 1 count = 0 for word in words: if s.startswith(word): count += dfs(s[len(word):]) return count return dfs(s) # T=n²+2ⁿ+w,S=2ⁿnw def y(s, words): words = set(words) ...
30bdce0bca57d062eace71dc5e23763d2ce913df
de3413c3af4ac0a76d817a7e624d8d2e08379003
/svm/svm_author_id.py
4581a12bca152e5b98a1c9173154dcebc7ef9243
[]
no_license
victorlifan/ud120-projects_mechine_learning_ex
8aded0e48955e1970ab501567317e660fdce97e9
39834cf8607dd448db332937953bf0a8a7303832
refs/heads/master
2022-07-10T15:03:04.212606
2020-04-14T02:02:22
2020-04-14T02:02:22
250,891,814
0
0
null
2022-06-22T01:35:58
2020-03-28T20:56:13
Jupyter Notebook
UTF-8
Python
false
false
1,319
py
#!/usr/bin/python """ This is the code to accompany the Lesson 2 (SVM) mini-project. Use a SVM to identify emails from the Enron corpus by their authors: Sara has label 0 Chris has label 1 """ import sys from time import time sys.path.append("../tools/") from email_preprocess import preprocess ### ...
a3dca879c750c6f8833c50913a50f39b7afd6b2c
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p02873/s049606753.py
6b59a11dc7ecdf3b53103e6b4936eef9860697ed
[]
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
557
py
s=input() sl=len(s) a=[] count=1 for i in range(sl-1): if s[i+1]==s[i]: count+=1 else: a.append(count) count=1 a.append(count) ans=0 al=len(a) if s[0]=="<": for i in range(0,al-1,2): m,n=max(a[i],a[i+1]),min(a[i],a[i+1]) ans+=(m*(m+1)+n*(n-1))/2 if al%2==1: ...
f7f7789d0731133f29e78799dc2f7183155bde34
8881a4927d893e1e755c0488f76ba7941b379f26
/emp_mgmt_sys/poll/migrations/0002_choice.py
f4b08e4cb314699a645b68f87618ecbf13704cf9
[]
no_license
SatishNitk/Django
6bb839fcf2bc7d70413e3d56ac98124a7a96a5de
d9260c032322a34410d783c39a8f13e8f63b8be4
refs/heads/master
2020-05-24T23:01:35.767388
2019-07-06T13:56:50
2019-07-06T13:56:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
740
py
# Generated by Django 2.0.1 on 2019-05-26 13:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('poll', '0001_initial'), ] operations = [ migrations.CreateModel( name='Choice', fields=[ ('id', mode...
439a7935a465973070be43a439890fa28f94e6da
42b9bafc3c757543328d93fb60269ad4255aae17
/env/lib/python3.7/site-packages/thefuck/rules/git_stash_pop.py
0e143ffd813b34c0326ae221f2e00e2d36363417
[ "MIT" ]
permissive
mejeng/kasir
4fe66d1828e72b64d770426d71185cdd3c54127e
cc6f9158b61c0cb45078ddf798af9588c8771311
refs/heads/master
2020-09-25T03:36:10.144439
2019-11-30T07:59:23
2019-11-30T07:59:23
225,908,795
2
0
MIT
2019-12-04T16:21:15
2019-12-04T16:21:15
null
UTF-8
Python
false
false
485
py
from thefuck.shells import shell from thefuck.specific.git import git_support @git_support def match(command): return ('stash' in command.script and 'pop' in command.script and 'Your local changes to the following files would be overwritten by merge' in command.output) @git_support def g...
c0ad9538c01db6eed246cc86917332e8c4e02e0d
ad59fb12042bfd3f5c43eca057d0f747f9e148cf
/Se2iP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/tsiplayer/addons/resources/hosters/vk.py
3edd8b9d6e4cf32052f7ca686c076546d5635d52
[]
no_license
lexlong2007/eePlugins
d62b787100a7069ad5713a47c5688008063b45ec
167b262fe36901a2d3a2fae6d0f85e2307b3eff7
refs/heads/master
2022-03-09T05:37:37.567937
2022-02-27T01:44:25
2022-02-27T01:44:25
253,012,126
0
0
null
2020-04-04T14:03:29
2020-04-04T14:03:29
null
UTF-8
Python
false
false
3,404
py
#-*- coding: utf-8 -*- # https://github.com/Kodi-vStream/venom-xbmc-addons from Plugins.Extensions.IPTVPlayer.tsiplayer.addons.resources.lib.handler.requestHandler import cRequestHandler from Plugins.Extensions.IPTVPlayer.tsiplayer.addons.resources.lib.parser import cParser from Plugins.Extensions.IPTVPlayer.tsipla...
1b1c9a876ce91e05fab954a1120d2c8366fe8202
ec291572e354d0718a42929b84f831363cdbeb4b
/djlib/cron_utils.py
995ed62361da660010f623b0385101d5e64505b0
[]
no_license
Ishayahu/Mizva-CMS
4aaffe01093ca807a5cf2fdec45a3e5213938940
574cd5363132ea19772221c4a4b27415dbf17814
refs/heads/master
2021-01-10T20:26:13.876744
2013-11-26T10:47:02
2013-11-26T10:47:02
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,970
py
# -*- coding:utf-8 -*- # coding=<utf8> def decronize(fstring): minute,hour,day,month,wday = fstring.split('\t') def get_interval(fstr,min,max): # max - предел интервала: # минута # * или 0-59 # час # * или 0-23 # число # * или 1-31 # месяц ...
594ef675881837a25b2f2cde141c227cf3093caf
25f47c750a150727826cbf873a0ac50eb9e97305
/tests/client/osio_rest_client_test.py
2a50e09091210e18a41090adf8b1b4493f71d266
[ "MIT" ]
permissive
tonywaite/scs_host_rpi
7d06a41c525202663f73133fbfaada4384e97693
5bd09bb9b4410cb47782e2bfab0dd2bbab365b3a
refs/heads/master
2022-12-05T02:51:23.882694
2020-08-19T14:26:53
2020-08-19T14:26:53
null
0
0
null
null
null
null
UTF-8
Python
false
false
702
py
#!/usr/bin/env python3 """ Created on 9 Nov 2016 @author: Bruno Beloff ([email protected]) """ from scs_core.client.http_client import HTTPClient from scs_core.osio.client.rest_client import RESTClient # ---------------------------------------------------------------------------------------------...
71ac26b37b14e37540c8c6747bb6ed2674c72de1
be0f3dfbaa2fa3d8bbe59229aef3212d032e7dd1
/Gauss_v45r8/Gen/DecFiles/options/12103121.py
aff6fabbfe181ee752fdebddb4817168e9cada39
[]
no_license
Sally27/backup_cmtuser_full
34782102ed23c6335c48650a6eaa901137355d00
8924bebb935b96d438ce85b384cfc132d9af90f6
refs/heads/master
2020-05-21T09:27:04.370765
2018-12-12T14:41:07
2018-12-12T14:41:07
185,989,173
0
0
null
null
null
null
UTF-8
Python
false
false
1,753
py
# file /home/hep/ss4314/cmtuser/Gauss_v45r8/Gen/DecFiles/options/12103121.py generated: Fri, 27 Mar 2015 15:48:08 # # Event Type: 12103121 # # ASCII decay Descriptor: [B+ -> K+ (KS0 -> pi+ pi-)]cc # from Configurables import Generation Generation().EventType = 12103121 Generation().SampleGenerationTool = "SignalRepeate...
0f0384d38e52d268984da24a31de51dd057df061
98c6ea9c884152e8340605a706efefbea6170be5
/examples/data/Assignment_4/crvcam001/boxes.py
48a26b479879bf751284a115ee42601517ff5ba7
[]
no_license
MrHamdulay/csc3-capstone
479d659e1dcd28040e83ebd9e3374d0ccc0c6817
6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2
refs/heads/master
2021-03-12T21:55:57.781339
2014-09-22T02:22:22
2014-09-22T02:22:22
22,372,174
0
0
null
null
null
null
UTF-8
Python
false
false
653
py
def print_square(): print('*' * 5) for i in range(3): print('*' , " "*3 , '*' , sep="") print('*' * 5) def print_rectangle(width, height): print('*' * width) gap = " " for i in range(height -2): print('*' , gap * (width-2) , '*', sep="") print('*' * width) def get...
a8e5ad6c2627b4a7e10d03f0efbd7d90534a7b5a
445e58746e9ca9b61a2d1a6ede82b7badec059ee
/scripts/download.py
361335c8c1356c0c4c1d4354c59ba3909be583a7
[ "MIT" ]
permissive
agrc/electrofishing-query
cdbc18eec74d4af1c478309a518f898a4db51e92
21934ef11622139ba55f26c30dee17c1d5ac6688
refs/heads/main
2023-08-19T04:51:21.612552
2023-07-04T16:43:02
2023-07-04T21:35:15
181,779,317
0
0
MIT
2023-09-01T02:45:33
2019-04-16T22:55:17
JavaScript
UTF-8
Python
false
false
7,795
py
#!/usr/bin/env python # * coding: utf8 * ''' download.py A script that downloads CSVs of electrofishing data for a given set of sampling event ids. ''' import csv import sys from glob import glob from os import sep, walk from os.path import basename, dirname, join, normpath, realpath from zipfile import ZIP_DEFLATED, ...
7c04bf56b1d4694c250bc1011dd80707d168fa04
632099ac0d895943cbbeb9048a2cdfcd21102411
/Novation_Impulse/__init__.py
6f5f46ce2ef01ae52ac870a2cfd2e9d926eaf2c6
[]
no_license
Toniigor/AbletonLive9_RemoteScripts
7f4bbf759a79629584413f6d1797005e8cd7f2ff
fed1e5ee61ea12ea6360107a65a6e666364353ff
refs/heads/master
2021-01-16T21:19:25.330221
2014-06-06T12:33:03
2014-06-06T12:33:03
null
0
0
null
null
null
null
UTF-8
Python
false
false
554
py
#Embedded file name: /Users/versonator/Jenkins/live/Projects/AppLive/Resources/MIDI Remote Scripts/Novation_Impulse/__init__.py from Novation_Impulse import Novation_Impulse def create_instance(c_instance): return Novation_Impulse(c_instance) from _Framework.Capabilities import * def get_capabilities(): ret...
669639ec4990e3d78768775b8b7faa030a35400e
f96937b4f6ee9865413978fb85fa2e99e2f842ff
/curriculumBuilder/__init__.py
e3d673e4e7cff389c9d9ed185f26e56dd2ca56d5
[]
no_license
mrjoshida/curriculumbuilder
8adf22d91eae2f3205b177e18dbd8a0909fb2d58
3b700d6a6fea6d1d7d7ed18d5612d6e0853449c3
refs/heads/master
2021-01-17T02:28:11.094855
2019-10-17T22:47:46
2019-10-17T22:47:46
36,847,693
6
3
null
null
null
null
UTF-8
Python
false
false
268
py
from __future__ import absolute_import # import curriculumBuilder.receivers # This will make sure the app is always imported when # Django starts so that shared_task will use this app. # from .celery import app as celery_app import curriculumBuilder.numbering_patch
8d92d5c580a5678636e059c2ef71d1e061dd7ee0
056754778e09aa5c412bbeadd77f20667b013648
/markov.py
2f7dfc8804d428b00d5fa056c84ec36f167f9234
[]
no_license
sridevich/markov_chains
22518a4cdcb2be71cd95dd8ef3d3be32912af8d0
b799430373d0ca1bfe5ffc0596a22d4dcea026fc
refs/heads/master
2021-01-11T23:23:00.780606
2017-01-12T02:05:43
2017-01-12T02:05:43
78,574,198
0
0
null
null
null
null
UTF-8
Python
false
false
5,471
py
from random import choice import twitter import os import sys api = twitter.Api( consumer_key=os.environ['TWITTER_CONSUMER_KEY'], consumer_secret=os.environ['TWITTER_CONSUMER_SECRET'], access_token_key=os.environ['TWITTER_ACCESS_TOKEN_KEY'], access_token_secret=os.environ['TWITTER_ACCESS_TOKEN_SECRET'...
1e2f8bbd44e82b0308ddca0516aaa3686749ac5e
b7a753180264aaba666da8aaad1bb03ccc0159da
/board/views.py
3eabda8d5d16d2813e82265dd3898bc61943f2b5
[]
no_license
boyl/lighteddjango
ec3630985a8e45bc4313f4a6bfe4d46912a58f72
cf437743d23157b6e888468ac8d2e9cc5bc24bcc
refs/heads/master
2022-12-19T08:39:18.018477
2020-06-30T03:47:42
2020-06-30T03:47:42
173,584,375
0
0
null
2022-12-08T04:51:46
2019-03-03T14:19:12
JavaScript
UTF-8
Python
false
false
5,434
py
import hashlib import requests from django.conf import settings from django.core.signing import TimestampSigner from django.contrib.auth import get_user_model from rest_framework import viewsets, authentication, permissions, filters from rest_framework.renderers import JSONRenderer from rest_framework.pagination impo...
ee726d7533579f7a9c1d89fddd7d1581375a412a
b55f70755712b26688b80a8ba3806a4124fbcd11
/LinkedList/remove_duplicate_from_sorted_linkedlist.py
ec55034979d77103ec2b1c458b9b307dd7dbf44a
[]
no_license
Shanshan-IC/Algorithm_Python
a44703a0f33370c47e3e55af70aadeae08d5a1a5
ace23976d2f1f51141498c4c4ea6bca0039b233f
refs/heads/master
2021-09-08T07:16:59.576674
2018-03-08T09:24:01
2018-03-08T09:24:01
114,254,497
0
0
null
null
null
null
UTF-8
Python
false
false
557
py
""" http://www.lintcode.com/zh-cn/problem/remove-duplicates-from-sorted-list/ Definition of ListNode class ListNode(object): def __init__(self, val, next=None): self.val = val self.next = next """ class Solution: """ @param: head: head is the head of the linked list @return: head of li...
9551014bbb31c958619230f90f70227bf926855c
ad0cbe6e2f3862490ec378319ed14072735da628
/airflow_ml_dags/images/airflow-preprocess/preprocess.py
05baaf7e9e5e09e3529a1dc5307f6adc36f4482e
[]
no_license
made-ml-in-prod-2021/dronovartem
4365c05e67d6dd7bc5d798ad3b814b4687b51171
37711ea51e326f6468303daaa9852d9f1e92e9bf
refs/heads/main
2023-06-04T12:40:39.017311
2021-06-24T18:28:15
2021-06-24T18:28:15
353,791,508
0
1
null
2021-06-24T18:28:16
2021-04-01T18:28:51
Jupyter Notebook
UTF-8
Python
false
false
599
py
import os import pandas as pd import click @click.command("predict") @click.option("--input-dir") @click.option("--output-dir") def preprocess(input_dir: str, output_dir): """ Implement dummy dataset preprocessing. """ data = pd.read_csv(os.path.join(input_dir, "data.csv")) target = p...
eabfb42337373790ebbbc5379ef69a5441583b28
2436f9f911149926af8fd7c1cd5c4e0d604987a0
/puente_quintanavides/pretensa_viga_xci.py
ae3ea59819381584f381dd1432ad80297966424e
[]
no_license
cryptopulgo/XCmodels
d185b93d01f69d52d88d8a5f965c35dc1742da22
bad6e553d919909086ab9045884594b7d8aafc06
refs/heads/master
2022-12-08T21:24:39.152883
2020-08-19T13:25:25
2020-08-19T13:25:25
null
0
0
null
null
null
null
UTF-8
Python
false
false
319
py
# -*- coding: utf-8 def trataResultsPret(nmbComb): mdlr(dom(calculate_nodal_reactions(1)\listaReaccionesNodos(nmbComb,tagsNodosCoartados,"%7.2f","reacc","cabecera","tit"))) \nuevo_archivo_salida["salidaG0"]{"reacciones_G0.tex"} \resuelveCombEstatLin("G0") \trataResultsPret("G0") cierra_archivo_salida("salidaG0")
3109ce5a426b3c7a9bbb884949883026d046ef93
781e2692049e87a4256320c76e82a19be257a05d
/all_data/exercism_data/python/grade-school/07ecb8fb9316422683afbe71e7b89cda.py
282651815e49817683861a8da2d0e1bacaaac438
[]
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
456
py
from collections import defaultdict class School: def __init__(self, name): self.name = name self.db = defaultdict(set) def add(self, student, grade): self.db[grade].add(student) def grade(self, grade_number): return self.db[grade_number] def sort(self): regi...
859496717de268dc9117c928a2adaa60d197eb67
35fdd5b42b47a1dbe6a25f6fc1865f4e48b842a5
/evalml/tuners/tuner_exceptions.py
a1fecf7101695ca8c098a63dd3fa2cdf08aa4bf7
[ "BSD-3-Clause" ]
permissive
skvorekn/evalml
41e5426f9f7d5ad625c21b74336009894c79c7de
2cbfa344ec3fdc0fb0f4a0f1093811135b9b97d8
refs/heads/main
2023-03-27T01:42:07.691406
2021-03-19T18:53:43
2021-03-19T18:53:43
349,555,689
0
0
BSD-3-Clause
2021-03-21T14:57:01
2021-03-19T21:08:12
null
UTF-8
Python
false
false
274
py
class NoParamsException(Exception): """Raised when a tuner exhausts its search space and runs out of parameters to propose.""" pass class ParameterError(Exception): """Raised when a tuner encounters an error with the parameters being used with it.""" pass
37f7b34d2d10f3ffdc8b99dc71379799894ec17a
ef6229d281edecbea3faad37830cb1d452d03e5b
/ucsmsdk/mometa/fabric/FabricFcSan.py
31582e89aeb3a2412f8e11f8d85e697845f18cf1
[ "Apache-2.0" ]
permissive
anoop1984/python_sdk
0809be78de32350acc40701d6207631322851010
c4a226bad5e10ad233eda62bc8f6d66a5a82b651
refs/heads/master
2020-12-31T00:18:57.415950
2016-04-26T17:39:38
2016-04-26T17:39:38
57,148,449
0
0
null
null
null
null
UTF-8
Python
false
false
4,240
py
"""This module contains the general information for FabricFcSan ManagedObject.""" import sys, os from ...ucsmo import ManagedObject from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class FabricFcSanConsts(): ID_A = "A" ID_B = "B" ID_NONE = "NONE" UPLINK...
79fe8745abbd0602a0437bb480fabb4ab786264d
682319f56c17e949bab0d6e418838d33977dd760
/Assignment_5/pattern1.py
5c0520857bd5b8c307f2c17dfda35cc732667f4a
[]
no_license
DilipBDabahde/PythonExample
8eb70773a783b1f4b6cf6d7fbd2dc1302af8aa1b
669762a8d9ee81ce79416d74a4b6af1e2fb63865
refs/heads/master
2020-08-23T01:05:44.788080
2020-07-25T21:59:52
2020-07-25T21:59:52
216,511,985
1
1
null
null
null
null
UTF-8
Python
false
false
314
py
''' 2. Write a recursive program which display below pattern. Input : 5 Output : 1 2 3 4 5 ''' i = 1; def pattern(iNo): global i; if i <= iNo: print(i,end= " "); i += 1; pattern(iNo); def main(): val = int(input("Enter a val:")); pattern(val); print(); if __name__ == '__main__': main();
98fd0ff9ef892db47051df84ce0c6dab4a5c6f62
7d1fd87e1aaf7e6b2ea72ab086a128d03ab059f1
/Python_Flask/Flask1/flask_2.py
3204f2d47e2bdba0604fdd8a5c532a2880633b24
[]
no_license
efren1990/codepy
05fb34fb608d9921cd5b1c257a9869f2d42eafae
1bd957e7a7285d459ba76e99c4bccb8dbabf8da4
refs/heads/main
2023-06-30T06:31:51.154519
2021-08-13T01:30:57
2021-08-13T01:30:57
395,486,511
0
0
null
null
null
null
UTF-8
Python
false
false
964
py
""" QUE ES FLASK---> Flask es un microframework para Python basado en Werkzeug, Jinja 2 y buenas intenciones. Y antes de preguntar: ¡es con licencia BSD! --------------METODO RUN-------------------------------------------------------------- """ # Llamado de la libreria flask la clas Flask from flask import Flask """P...
008dd71fd10f5620479b636d318ed0204bec3d29
cb3119cbe128fc9adcf286d257126d03b0de7a10
/tests/test_net.py
d5498289586178f08151b9c08a1eee33656809fe
[ "MIT" ]
permissive
CBJamo/skidl
a66d14598ec851eb80c1d1fd38df3513aff0acdc
c0e46aa2e75f3be8aefd585c8cbdcbd33a59d542
refs/heads/master
2020-03-09T06:30:26.759951
2018-04-08T12:54:08
2018-04-08T12:54:08
128,640,952
0
0
null
2018-04-08T12:52:59
2018-04-08T12:52:58
null
UTF-8
Python
false
false
412
py
import pytest from skidl import * from .setup_teardown import * def test_nets_1(): gnd = Net('GND') a = Net('A') b = Net('B') c = Net() p = Pin() assert len(default_circuit.get_nets()) == 0 assert len(a) == 0 assert len(b) == 0 assert len(c) == 0 a += p assert len(default_ci...
20f5f50e20a6e339fe8174eaf494840bb10d8f6b
a312bf5148945a19bb6d30c1f0e97d3edc021af2
/RestFrameWork/api/serializer.py
d9ff420cf6e881549e5c71899e923275d6171933
[]
no_license
Shikhar0907/Create-API
252cdb632765f5d5b7a03213b942bfc9c5b979de
c8f13f309d0aa668091d615946b52bea66316d36
refs/heads/master
2020-04-03T00:51:57.367335
2018-10-27T01:16:00
2018-10-27T01:16:00
154,911,231
0
0
null
null
null
null
UTF-8
Python
false
false
635
py
from rest_framework import serializers from RestFrameWork.models import Status class StatusSerializer(serializers.ModelSerializer): class Meta: model = Status fields = [ 'id', 'user', 'content', 'image' ] read_only_fields = ['user'] ...
e2fb33449cb17a9b98a90fba8046aa3d8eddddcf
2324d8e4544a9b813153ce0ed0f858972ea7f909
/66-加一.py
35964e18d54db38d2430e97ff639ad548ef65d3c
[]
no_license
Terry-Ma/Leetcode
af8a4ad8059975f8d12b0351610336f1f5f01097
cc7f41e2fb3ed5734c2a5af97e49a5bc17afbceb
refs/heads/master
2021-08-10T16:40:20.482851
2021-07-03T08:35:56
2021-07-03T08:35:56
225,814,239
0
1
null
null
null
null
UTF-8
Python
false
false
451
py
class Solution: def plusOne(self, digits: List[int]) -> List[int]: result = 0 flag = 1 for i in range(len(digits) - 1, -1, -1): if flag == 1: if digits[i] == 9: digits[i] = 0 else: digits[i] = digits[i] + 1 ...