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
caedcb717831f3959e5cb1d6e58f728a5038387b
702ad30ea1de11f109a5207919bddb5381bd206e
/toy_data.py
c3921fdb841e6d73e0f8bc8a2f4009eb6fbe2202
[]
no_license
glouppe/flowing-with-jax
84e2dfc1a81073328518ca95806f031fefe30287
f58b1772d08e235e71f10d4b28e2a39b771b17cf
refs/heads/master
2023-02-09T00:52:32.157418
2020-12-28T22:30:41
2020-12-28T22:30:41
323,332,121
17
1
null
null
null
null
UTF-8
Python
false
false
4,601
py
# Source: https://raw.githubusercontent.com/rtqichen/ffjord/master/lib/toy_data.py import numpy as np import sklearn import sklearn.datasets from sklearn.utils import shuffle as util_shuffle # Dataset iterator def inf_train_gen(data, rng=None, batch_size=200): if rng is None: rng = np.random.RandomState(...
379c1fa52e66c607912bbf3aec01ca28e4d2b81b
377dc973a58d30154cf485de141223d7ca5424dd
/havok_classes/hclStorageSetupMeshSectionSectionEdgeSelectionChannel.py
2a0b1f269d753d07efa1c18f0755cf5070e00a60
[ "MIT" ]
permissive
sawich/havok-reflection
d6a5552f2881bb4070ad824fb7180ad296edf4c4
1d5b768fb533b3eb36fc9e42793088abeffbad59
refs/heads/master
2021-10-11T12:56:44.506674
2019-01-25T22:37:31
2019-01-25T22:37:31
null
0
0
null
null
null
null
UTF-8
Python
false
false
530
py
from .hkReferencedObject import hkReferencedObject from typing import List from .common import get_array class hclStorageSetupMeshSectionSectionEdgeSelectionChannel(hkReferencedObject): edgeIndices: List[int] def __init__(self, infile): self.edgeIndices = get_array(infile, int, 4) # TYPE_ARRAY:TYPE_...
eff804ac1d48782d19505cda1ee199107169edf8
354b26a5d854bd044286047d4aef1a0aa54961f1
/lock.py
1bddd56489c297a1cedc7b6e3ede027691018df2
[ "MIT" ]
permissive
liondani/pytshares
3796ca8705de409825ef8631604f49319887b510
45458a026a23c53ad2bacd56abb9e930e8268bb4
refs/heads/master
2020-12-31T01:36:56.896329
2014-12-14T00:08:22
2014-12-14T00:08:22
null
0
0
null
null
null
null
UTF-8
Python
false
false
193
py
#!/usr/bin/python from btsrpcapi import * import config if __name__ == "__main__": rpc = btsrpcapi(config.url, config.user, config.passwd) print rpc.walletopen("delegate") print rpc.lock()
67a21a65d9789ec1615b82c1d99d08c87c6c9089
da1f49aa0ee3cbbd0b7add4a8ee4210c50fc81b7
/demo/funs/passing_by_value_ref.py
37a1dea123297fec3d8947fe4dabb9f97c94cefb
[]
no_license
srikanthpragada/PYTHON_30_AUG_2021
a1cde290072e152440dcd07dce377154a9e3052e
f84f272718b483fbf67ca8f950e6e4f933307e63
refs/heads/master
2023-08-25T14:11:12.826321
2021-10-11T14:14:36
2021-10-11T14:14:36
402,412,522
1
0
null
null
null
null
UTF-8
Python
false
false
252
py
# Pass an immutable object by reference def increment(v): print(id(v)) v += 1 print(id(v)) print(v) def prepend(lst, value): lst.insert(0, value) a = 100 print(id(a)) increment(a) print(a) l = [1, 2, 3] prepend(l, 10) print(l)
63af416133ae408431705293a3634711f5cf8416
7bcc7f36743694a2b0a8aa1b496ceca1371b130e
/rltools/rltools/distributions.py
8759f25a04a5caad0764865ddf21a86f17d5cb22
[]
no_license
parachutel/MADRL
7cfa32ab0e9a6bee2b6e31434a8e2835b9e9265d
f03b8009ede6d3324f6e2091dcfa3911b5968fe0
refs/heads/master
2020-04-25T07:23:21.004116
2019-10-09T21:21:16
2019-10-09T21:21:16
172,612,159
0
1
null
2019-02-26T01:10:00
2019-02-26T01:10:00
null
UTF-8
Python
false
false
5,032
py
import numpy as np import tensorflow as tf from rltools import tfutil from rltools import util TINY = 1e-10 class Distribution(object): @property def dim(self): raise NotImplementedError() def kl(self, old, new): raise NotImplementedError() def log_density(self, dist_params, x): ...
be1820b5330c658d7e0361946656285991cd853c
7a4f61d55378fec4df952bd574cb1db57e795084
/analyze/simulation/Trader.py
273c29a7e0b47bf9d142acc039fb3a9db5d5fd64
[]
no_license
569593913/enoch
9da83638b99aa6e6a649914e01bef3abdc236895
8c8c7ff5a527a5287894b6522fe4e87974cc5e01
refs/heads/master
2021-05-05T15:48:45.931858
2019-03-03T12:07:47
2019-03-03T12:07:47
117,324,651
0
0
null
null
null
null
UTF-8
Python
false
false
5,497
py
# -*- coding: utf-8 -*- from .HoldStock import * from .TradeRecord import * import threading from datetime import * class Trader: """ 模拟交易者 attribute: original 初始资金 cash 当前资金 own 当前拥有的股票,map类,key为股票代码,value为HoldStock list record 交易记录 t...
f957d70afd2e84447f77b11cfb6357e00c3b3251
09cd370cdae12eb45090033a00e9aae45ee26638
/BOJ/[S1]2110 공유기 설치.py
f30a43696c21b9a44ec824111b7989ae7af87ed9
[]
no_license
KWONILCHEOL/Python
ee340f6328945651eb29d2b23c425a92c84a4adb
1ea5f5f74894a5929e0e894c5c12f049b8eb9fb4
refs/heads/main
2023-04-11T09:36:54.874638
2021-04-24T04:29:12
2021-04-24T04:29:12
328,658,511
0
0
null
null
null
null
UTF-8
Python
false
false
666
py
# [S1]2110 공유기 설치 # https://www.acmicpc.net/problem/2110 # 파라메트릭 서치, 이진탐색 def check(k): value = arr[0] cnt = 1 for i in range(1,n): if arr[i] >= value + k: value = arr[i] cnt += 1 if cnt == c: return True return False import sys input = sys.stdin.readline n,c = list(map(int, inp...
bf376078d8387fe06b0ee8b09d2774dda4c6d84a
78c4f0d5cfcdcec678ff78e259b64550692120fa
/ormar/models/__init__.py
eb6bdd7c5c5224e69246a5b734a225109dc2cd42
[ "MIT" ]
permissive
dudil/ormar
3c31d592f6a23cacff2ac0e3a6163f4778ab286f
7c0f8e976a651c40dbc669f1caba1361f0af2ead
refs/heads/master
2023-07-07T22:26:20.165473
2021-03-05T11:37:28
2021-03-05T11:37:28
344,250,603
0
0
MIT
2021-09-07T03:44:08
2021-03-03T20:08:35
Python
UTF-8
Python
false
false
555
py
""" Definition of Model, it's parents NewBaseModel and mixins used by models. Also defines a Metaclass that handles all constructions and relations registration, ass well as vast number of helper functions for pydantic, sqlalchemy and relations. """ from ormar.models.newbasemodel import NewBaseModel # noqa I100 from ...
f459e40a8809ff26b3ca6c6860a1ad7d2bc37866
eb2ebaf1c53cfeb5a1abbc05e6423c5fdc27ca8a
/.history/game_functions_20200129213418.py
3fdbdaa6f774bd7226f7e217a22bd777294d0e99
[]
no_license
HeperW/VSCO
8120bde36c73601e5b956955c0b68b599c9a663d
4c3ee4aa45424313e335ff05934fbb6df7950304
refs/heads/master
2022-05-08T00:51:44.618385
2022-03-16T03:18:34
2022-03-16T03:18:34
233,367,724
0
0
null
null
null
null
UTF-8
Python
false
false
429
py
import sys import pygame def check_events(): """响应按键与鼠标事件""" for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() def update_screen(ai_settings,screen,ship): """更新屏幕上的图像,并切换到新屏幕""" #每次循环时都重绘屏幕 screen.fill(ai_settings,bg_color) ship.blitme() #让最近绘制的...
3d5b02ff98f9c65ed8a040f582968c14c0bc5442
53fa34a5ecfbeea84c960afc3ba088c3a7a41587
/subunit2sql/migrations/versions/10a2b6d4b06e_add_even_more_indexes.py
76c52efc0511d66674a0a73f6f3796157a16d32f
[ "Apache-2.0" ]
permissive
mguiney/subunit2sql
dd7259110363416c7892fdab63e2391884a5179b
6f95e43478ba91027e07af0d9c7e1305f0829c2e
refs/heads/master
2021-09-06T23:09:21.095681
2018-02-07T19:42:46
2018-02-07T19:42:46
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,503
py
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # 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 applica...
61ef95b1f797f2f0ce56bf7014743057452773e3
6e601105760f09d3c9f5306e18e4cf085f0bb4a2
/10000-99999/10875.py
2f6f2663592474c300ad791f26143b1e12197241
[]
no_license
WSJI0/BOJ
6412f69fddd46c4bcc96377e2b6e013f3bb1b524
160d8c13f72d7da835d938686f433e7b245be682
refs/heads/master
2023-07-06T15:35:50.815021
2023-07-04T01:39:48
2023-07-04T01:39:48
199,650,520
2
0
null
2020-04-20T09:03:03
2019-07-30T12:48:37
Python
UTF-8
Python
false
false
633
py
''' 10875번 뱀 미완성 ''' import sys input=sys.stdin.readline l=int(input()) n=int(input()) a=[] for _ in range(n): a.append(list(input().rstrip().split())) visited=[] now=[0, 0] d='r' change={ 'r':['u', 'd'], 'd':['r', 'l'], 'l':['d', 'u'], 'u':['l', 'r'] } ans=0 for i in range(n): if d=='r': ...
de60657dc3cdcffb3495e5a43f9c653e3ec535ad
81d7c62c357c086a8990105d4179c9a2cda0f89c
/Requests_module_old_project_cDVR_reference/aurora_cdvr_sanity_tests/scripts/sanity_scripts/sanity_dataplane_MOSrecorder.py
b8be0ae710863f822af8a34ae23dcbfa6aa0c8e1
[]
no_license
JAGASABARIVEL/Python_reference
57f49a3f8d894f02f8003657a914395f4b55d844
f2438289f189fc364dbe9dff0421c3df9be366b2
refs/heads/master
2020-04-08T19:23:23.406783
2018-11-29T12:25:43
2018-11-29T12:25:43
159,653,055
0
1
null
2020-01-25T19:07:42
2018-11-29T11:06:42
Python
UTF-8
Python
false
false
3,606
py
#!/usr/bin/python import os import sys import time import requests import json import ast import mypaths from readYamlConfig import readYAMLConfigs from L1commonFunctions import * from L2commonFunctions import * ########################################################################## # Get MOS recorder ##########...
907c9f9d2b9bd1d9a072348f7dbe58b4a396c314
877bd6d9f9f38320a82f46d6c581d6099f77597b
/dev/installers/windows/substitute_version.py
b93fc7dafa563a3d23215c2ebe705f6cdd978140
[ "BSD-3-Clause", "CC-BY-3.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
caltechlibrary/holdit
04b7563722e6883ffe135398401e35da35b0af73
474165764e3514303dfd118d1beb0b6570fb6e13
refs/heads/main
2021-06-01T17:06:24.569179
2020-12-04T20:39:45
2020-12-04T20:39:45
141,499,163
2
0
NOASSERTION
2020-07-28T00:18:25
2018-07-18T23:13:58
Python
UTF-8
Python
false
false
1,097
py
# ============================================================================= # @file substitute_version.py # @brief Replace version string in holdit_innosetup_script.iss.in # @author Michael Hucka <[email protected]> # @license Please see the file named LICENSE in the project directory # @website https://gith...
532e42534f668fbcfe7009eba86ba479f485e7fc
54937a50e74ad209f648f69b4a4509113d90b016
/unsubscribe/views.py
d96d3bcc0ba01c063caa2d37ec5e26c29e6f0e08
[ "MIT" ]
permissive
MHM5000/mechanical-mooc
0a728ab45659075f6cf28bd3cafb72ac9abff259
a0faa6d06f4cb157e4b92cc35d6d148e53096a41
refs/heads/master
2021-01-17T15:16:37.531668
2013-11-15T19:56:41
2013-11-15T19:56:41
null
0
0
null
null
null
null
UTF-8
Python
false
false
789
py
from django import http from django.views.decorators.csrf import csrf_exempt from mailgun import utils import models as unsubscribe_model import logging log = logging.getLogger(__name__) @csrf_exempt def unsubscribe_webhook(request): verified = utils.verify_webhook( request.POST.get('token'), re...
e145bb17d89f0c7fbcba3dcc46cf5bdd6350a7af
3fcd2c184abaa9bef5f4a916fbf0e9587da06346
/ByTags/Two_pointers/N_Sum/Two_Sum.py
5e3fdf31bf183199ab56e2d7f281fb29c83cf6ef
[]
no_license
chinitacode/Python_Learning
865ff42722e256776ae91d744b779fa476e23f45
49aa02367e3097aca107b70dab43b5f60a67ef9f
refs/heads/master
2020-06-29T01:05:39.331297
2020-03-21T14:29:51
2020-03-21T14:29:51
200,393,997
0
0
null
null
null
null
UTF-8
Python
false
false
2,263
py
''' 1. 两数之和 [简单] 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数, 并返回他们的数组下标。 你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。 示例: 给定 nums = [2, 7, 11, 15], target = 9 因为 nums[0] + nums[1] = 2 + 7 = 9 所以返回 [0, 1] [Method 1] 字典(空间换时间) [Time]: O(N) [Space]: O(N) ''' class Solution: def twoSum(self, nums: List[int], tar...
f8b6383e310a57cf9e66e15cab84cf3a09b22109
2071cf1aec8e9762a70b8c932943d8769da7f37a
/python_source/gui/tkinter/tkcascade.py
e795b56bd5793825da24ee9c77edbe452742da7b
[]
no_license
rinkeigun/linux_module
70581a793d1f170ad1a776fd1acf4cda1abecd52
94450fb2c6af0fc56f451ae9bf74f7aca248d0a6
refs/heads/master
2020-05-21T17:49:15.608902
2018-09-18T22:57:40
2018-09-18T22:57:40
60,572,658
0
0
null
null
null
null
UTF-8
Python
false
false
1,149
py
from tkinter import * import tkinter.messagebox as tkmsg root = Tk() root.option_add('*font', ('FixedSys', 14)) var = StringVar() var.set('normal') def dummy(): pass # 状態の変更 def change_state(): m1.entryconfigure('Menu1', state = var.get()) m1.entryconfigure('Menu2', state = var.get()) m1.entryconf...
0087bc89d3f65b6eb2c771479968d35395ed9bca
e7b7d22571fba04f333422a4d39cc24a9b6ccc18
/btre/accounts/models.py
5037b67096f7019f1fa95cf54cdf9d9aa17fa811
[]
no_license
fayblash/RealEstateSite
21ca7ef15d3e10d44e95e6d1028943f230166d64
49c94ccef58fd1a6bc0b022a8221f04d4163c2d6
refs/heads/main
2023-05-09T20:36:38.472318
2021-06-07T19:39:39
2021-06-07T19:39:39
374,766,507
0
0
null
null
null
null
UTF-8
Python
false
false
185
py
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver # Create your models here.
86204860d504da65e8bee2af93e4a12db6e22975
0f79fd61dc47fcafe22f83151c4cf5f2f013a992
/BOJ/20061.py
513d669ff1856e5b91e001f0bd0c2ed3df46b2e8
[]
no_license
sangm1n/problem-solving
670e119f28b0f0e293dbc98fc8a1aea74ea465ab
bc03f8ea9a6a4af5d58f8c45c41e9f6923f55c62
refs/heads/master
2023-04-22T17:56:21.967766
2021-05-05T12:34:01
2021-05-05T12:34:01
282,863,638
0
0
null
null
null
null
UTF-8
Python
false
false
4,676
py
""" 모노미노도미노는 아래와 같이 생긴 보드에서 진행되는 게임이다. 보드는 빨간색 보드, 파란색 보드, 초록색 보드가 그림과 같이 붙어있는 형태이다. 게임에서 사용하는 좌표 (x, y)에서 x는 행, y는 열을 의미한다. 빨간색, 파란색, 초록색 보드가 사용하는 좌표는 그 색으로 그림에 적혀있다. 이 게임에서 사용하는 블록은 타일 하나 또는 두 개가 가로 또는 세로로 붙어있는 형태이다. 아래와 같이 세 종류가 있으며, 왼쪽부터 순서대로 크기가 1×1, 1×2, 2×1 이다. 행이나 열이 타일로 가득찬 경우와 연한 칸에 블록이 있는 경우가 동시에 발생할 수 있다....
520f12149113622abf4fab89bc8f557df8cb8448
9743d5fd24822f79c156ad112229e25adb9ed6f6
/xai/brain/wordbase/nouns/_stopcocks.py
68ca2f6991ffbd35b964e278c28a3a6940bfce02
[ "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
252
py
from xai.brain.wordbase.nouns._stopcock import _STOPCOCK #calss header class _STOPCOCKS(_STOPCOCK, ): def __init__(self,): _STOPCOCK.__init__(self) self.name = "STOPCOCKS" self.specie = 'nouns' self.basic = "stopcock" self.jsondata = {}
0a9a17d46c80539a638273628970b034d16c45ab
cbf9f600374d7510988632d7dba145c8ff0cd1f0
/AISing/c.py
1bced9d46211c10b0d06d2db890caae23670859b
[]
no_license
sakakazu2468/AtCoder_py
d0945d03ad562474e40e413abcec39ded61e6855
34bdf39ee9647e7aee17e48c928ce5288a1bfaa5
refs/heads/master
2022-04-27T18:32:28.825004
2022-04-21T07:27:00
2022-04-21T07:27:00
225,844,364
0
0
null
null
null
null
UTF-8
Python
false
false
404
py
n = int(input()) xyz = [[[0 for i in range(101)] for j in range(101)] for k in range(101)] ans = [0 for i in range(n+1)] def gen_n(x, y, z): return x**2 + y**2 + z**2 + x*y + y*z + z*x for i in range(1, 101): for j in range(1, 101): for k in range(1, 101): num = gen_n(i, j, k) i...
d392365edbf57883fa52e225c5ec1c543754e39e
cccf0b4c6b08502dea94ac1febb49fc0f8561cc2
/src/bind.py
e9823644dd74973261df64057956374e5c7b9592
[]
no_license
rpm-io/rpm.io
55e13a4795f421a2514f45d707820c4fe605dbf2
80cd5f0703c550628d62a7f45e213e9434a64e8d
refs/heads/master
2022-12-15T21:54:14.040117
2019-08-25T16:44:28
2019-08-25T16:44:28
187,483,128
1
0
null
2022-12-10T15:03:44
2019-05-19T13:53:28
JavaScript
UTF-8
Python
false
false
3,020
py
import sys import uuid import json from importlib import import_module import os sys.path.append(os.getcwd()) class Bind: __VARIABLES__ = { "END": "END" } def __init__(self): self.module = import_module(sys.argv[1]) self.ok = True def declare(self, value): name = str...
ae21549b8b1f5138084eb96159f1b2b83e5bc6a6
fc772efe3eccb65e4e4a8da7f2b2897586b6a0e8
/Controller/glance/common/location_strategy/store_type.py
75f8c239670b96c2e5855ca2b5e1b7de69bda730
[]
no_license
iphonestack/Openstack_Kilo
9ae12505cf201839631a68c9ab4c041f737c1c19
b0ac29ddcf24ea258ee893daf22879cff4d03c1f
refs/heads/master
2021-06-10T23:16:48.372132
2016-04-18T07:25:40
2016-04-18T07:25:40
56,471,076
0
2
null
2020-07-24T02:17:46
2016-04-18T02:32:43
Python
UTF-8
Python
false
false
4,238
py
# Copyright 2014 IBM Corp. # 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...
d54bbda96683cdd763c1b279aba965e3873a5a09
34599596e145555fde0d4264a1d222f951f49051
/pcat2py/class/21ede120-5cc5-11e4-af55-00155d01fe08.py
517fcbf9e1895c3f103154e3d831715a37a09a75
[ "MIT" ]
permissive
phnomcobra/PCAT2PY
dc2fcbee142ce442e53da08476bfe4e68619346d
937c3b365cdc5ac69b78f59070be0a21bdb53db0
refs/heads/master
2021-01-11T02:23:30.669168
2018-02-13T17:04:03
2018-02-13T17:04:03
70,970,520
0
0
null
null
null
null
UTF-8
Python
false
false
1,497
py
#!/usr/bin/python ################################################################################ # 21ede120-5cc5-11e4-af55-00155d01fe08 # # Justin Dierking # [email protected] # [email protected] # # 10/24/2014 Original Construction ################################################################...
bc1680235109bc4da1b863579b5bf349298ae9fe
2ae59d7f70f083fc255c29669ada5dcacbd3411f
/encasa/utils/models/common_regex.py
7b41e0009066740932b74d66f52a278a95a23019
[]
no_license
gonza56d/django_docker_template
aeccfec357aa9732abf869f8baf0c0b9f11f7200
f739c71dcb01819caf4520a2169264ea1abcf4b0
refs/heads/master
2023-03-14T04:09:01.200633
2021-03-07T21:08:28
2021-03-07T21:08:28
345,263,273
0
0
null
null
null
null
UTF-8
Python
false
false
606
py
# Django from django.core.validators import RegexValidator class CommonRegex: """Common validation regular expressions.""" LOWERCASE_AND_NUMBERS = RegexValidator( regex='[a0-z9]', message='Only lowercase letters and numbers allowed.' ) LETTERS_AND_NUMBERS = RegexValidator( reg...
4bd1566537db005bd9d5471cb5b042372ba16b80
7ba4e38e0835cd009a078ce39a480b5bacaba21f
/sample_code/chap8/8.4.5.rectify.py
0b0fab1f3600418d5bf6050b41150c51447f663e
[]
no_license
moguranran/computer_vision_test
fe0641987905755c733e4ab16f48c3b76d01b3f4
4c5b5572d01e13a42eefb2423e66e34675c305cb
refs/heads/master
2022-04-20T17:53:37.668609
2020-03-31T00:13:02
2020-03-31T00:13:02
249,196,701
0
0
null
null
null
null
UTF-8
Python
false
false
806
py
#!/usr/bin/python # -*- coding: utf-8 -*- from PIL import Image from pylab import * from scipy import ndimage import homography imname = 'sudoku_images/sudokus/sudoku8.JPG' im = array(Image.open(imname).convert('L')) # 4隅を入力する figure() imshow(im) gray() x = ginput(4) # 左上、右上、右下、左下 fp = array([array([p[1],p[0],1]) ...
15006b6d8c7f8ae7ecca9c43b3bfa34aa5e18d1c
62ea331d8da218e65a4aee517f4473110f80c03c
/matches/migrations/0011_auto_20180601_2337.py
5afbf4770bf95e23ffe57a987598cffa7867b8b4
[]
no_license
maddrum/world_cup_results
11f47a1b0f9a68a0761c7d83d25cc1efb57c2240
282d8f55344ba718ea371a22f34454673f23a615
refs/heads/master
2020-03-20T05:40:44.173185
2018-07-16T13:12:15
2018-07-16T13:12:15
136,724,186
0
0
null
null
null
null
UTF-8
Python
false
false
1,612
py
# Generated by Django 2.0.2 on 2018-06-01 20:37 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('matches', '0010_auto_201...
f68dedf0d4f41d08e278bea9df10e7841f8c749b
46c76c7ca1d9d030606f2e3e95a2a9e6bbad2789
/workspace201406/ClassExamples/accounts.py
77f58e4bc1ffee16226f5db5e4c1ad21430917fc
[]
no_license
KayMutale/pythoncourse
be9ff713cffc73c1b9b3c1dd2bdd6d293637ce1e
985a747ff17133aa533b7a049f83b37fc0fed80e
refs/heads/master
2023-04-13T07:58:00.993724
2021-04-16T14:19:41
2021-04-16T14:19:41
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,401
py
''' Created on 10 Jun 2014 @author: mark ''' class Account(object): ''' classdocs ''' last_accno = 0 types = ("ASSET","LIABILITY","EQUITY","INCOME","EXPENCE") _perm_accounts = types[:3] _credit_accounts = types[1:4] _debit_accounts = types[0] +types[4] def __init__(self,balanc...
f4630ba76d4e6069dec7ef7512e88ed698af23d2
5f61724fc5cad3f82094a681c853cc9f0337f050
/test/test_xmlpart.py
9f1f8a02e7773b2d4bbc9354889b40ace6f30d36
[ "Apache-2.0" ]
permissive
barseghyanartur/odfdo
2cecbbbb33f23d5ed0ba80cb9208a8e7857b93a0
e628a9e9daa40319a777d216ec7ebca4057b3344
refs/heads/master
2022-11-17T15:43:15.662484
2020-06-27T00:41:38
2020-06-28T22:53:07
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,598
py
#!/usr/bin/env python # Copyright 2018 Jérôme Dumonteil # Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend. # # 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.apach...
dee86a91a321348c1a9ea17593f58fb0fab6248f
a39f7413dcd87bb26319fe032d59cf12d7c69d54
/backbones/decoder.py
67afba19646e66388f3d87d8fefe214f1dc4ee88
[]
no_license
liangyuandg/cross_modality_ibsr
8ad937b5475bd5e6b00ad50351706304a962f975
bb5cefd890f5fa0e15eae6e54d9559f5e8eb94ed
refs/heads/master
2023-06-24T02:58:25.318170
2021-07-27T08:29:27
2021-07-27T08:29:27
389,904,637
0
1
null
null
null
null
UTF-8
Python
false
false
2,455
py
import torch.nn as nn import torch def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): """3x3 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=dilation, groups=groups, bias=False, dilation=dilation) class ResNet_De...
9a3d85f621d23e6aedf6d0d238f468b8abd4befc
1f94b6ff9477e380084bf00c591d92b0b2985e69
/PythonEshow/apis/AUsers.py
1b2e67a5504df084d2dec10fb70253366de4ad1d
[]
no_license
guofengma/Eshow
dff32fa1da152f30d776b7e8fdc2d5ffc1ef4c40
4b13cb4c328d7832bea3393000635106dd683b28
refs/heads/master
2020-04-24T07:22:46.757263
2018-05-03T00:59:31
2018-05-03T00:59:31
null
0
0
null
null
null
null
UTF-8
Python
false
false
669
py
# *- coding:utf8 *- import sys import os sys.path.append(os.path.dirname(os.getcwd())) from flask_restful import Resource from config.requests import apis_wrong, param_miss class AUsers(Resource): def __init__(self): from control.CUsers import CUsers self.cusers = CUsers() def post(self, users...
e5dbd30c0c8cca38c4563b3f180af1302597c50f
6c48ad953031fd6be870e8bd8775538b9ac7033e
/python/demo08_module/demo12_file_copy_2.py
d6dbda50aec8cdfa170dae8235f52b3bb86b0ea9
[]
no_license
yeswhos/Code-Practice
b080c9484f510d02c2d78e388fc03eedc397aa7b
0fd8263a5c87dbd0e8b1dd5a38f32a188870308b
refs/heads/master
2023-04-08T13:11:06.105039
2023-03-16T11:34:03
2023-03-16T11:34:03
247,809,031
1
0
null
null
null
null
UTF-8
Python
false
false
233
py
file_read = open("D:\GitR\Code-Practice\README.md") file_write = open("D:\python_a.md", "w") while True: text = file_read.readline() if not text: break file_write.write(text) file_read.close() file_write.close()
50da484a10d8c1763aa27665fa7bb665fd69438e
2aace9bb170363e181eb7520e93def25f38dbe5c
/build/idea-sandbox/system/python_stubs/cache/bdf774aa44376518b55fa0857c4aa1e281ab006abf9d2169b8b93383f1e63a63/cython_runtime.py
2f39ea21b21c76ab3e8b7b67c14f4bc7f0faba86
[]
no_license
qkpqkp/PlagCheck
13cb66fd2b2caa2451690bb72a2634bdaa07f1e6
d229904674a5a6e46738179c7494488ca930045e
refs/heads/master
2023-05-28T15:06:08.723143
2021-06-09T05:36:34
2021-06-09T05:36:34
375,235,940
1
0
null
null
null
null
UTF-8
Python
false
false
277
py
# encoding: utf-8 # module cython_runtime # from C:\Users\Doly\Anaconda3\lib\site-packages\scipy\interpolate\interpnd.cp37-win_amd64.pyd # by generator 1.147 # no doc # no imports # Variables with simple values __loader__ = None __spec__ = None # no functions # no classes
354a96afb879b8c3ef70574d8789f264ecd2c01f
51f887286aa3bd2c3dbe4c616ad306ce08976441
/pybind/nos/v6_0_2f/interface/fortygigabitethernet/snmp/__init__.py
548b4c7ea3ff0beb53b6146afc568278cdfc288f
[ "Apache-2.0" ]
permissive
b2220333/pybind
a8c06460fd66a97a78c243bf144488eb88d7732a
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
refs/heads/master
2020-03-18T09:09:29.574226
2018-04-03T20:09:50
2018-04-03T20:09:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
6,251
py
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
c4b8c299ef806ae544a61f97faf8c7b11cc72052
7bc54bae28eec4b735c05ac7bc40b1a8711bb381
/src/tf_util/show_record.py
8ed8b6ce8bda4b761875613a73799b90c7385020
[]
no_license
clover3/Chair
755efd4abbd5f3f2fb59e9b1bc6e7bc070b8d05e
a2102ebf826a58efbc479181f1ebb5de21d1e49f
refs/heads/master
2023-07-20T17:29:42.414170
2023-07-18T21:12:46
2023-07-18T21:12:46
157,024,916
0
0
null
2023-02-16T05:20:37
2018-11-10T21:55:29
Python
UTF-8
Python
false
false
708
py
import sys import tensorflow as tf def file_show(fn): cnt = 0 n_display = 5 for record in tf.compat.v1.python_io.tf_record_iterator(fn): example = tf.train.Example() example.ParseFromString(record) feature = example.features.feature keys = feature.keys() print("--...
d81d54bc1bb25218cba01ca8702d7129ffa2acb9
bd498cbbb28e33370298a84b693f93a3058d3138
/Google/benchmarks/transformer/implementations/transformer-research-TF-tpu-v4-128/lingvo/tasks/mt/params/params.py
a2907a7f5d715856f2ba60d1e0f68757bd1f29b4
[ "Apache-2.0" ]
permissive
piyushghai/training_results_v0.7
afb303446e75e3e9789b0f6c40ce330b6b83a70c
e017c9359f66e2d814c6990d1ffa56654a73f5b0
refs/heads/master
2022-12-19T16:50:17.372320
2020-09-24T01:02:00
2020-09-24T18:01:01
298,127,245
0
1
Apache-2.0
2020-09-24T00:27:21
2020-09-24T00:27:21
null
UTF-8
Python
false
false
1,198
py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
b063bd197215f270b9d6e66e2f4be27ffb58d140
3777658387aa9e78d7c04202d7fd47d59b9e1271
/MachineLearning/FeatureEngineering/target_encoding.py
f69b809d8d766c93e3a1d6807f5f2eb76abfff60
[]
no_license
jocoder22/PythonDataScience
709363ada65b6db61ee73c27d8be60587a74f072
c5a9af42e41a52a7484db0732ac93b5945ade8bb
refs/heads/master
2022-11-08T17:21:08.548942
2022-10-27T03:21:53
2022-10-27T03:21:53
148,178,242
4
0
null
null
null
null
UTF-8
Python
false
false
2,099
py
#!/usr/bin/env python import os import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.model_selection import KFold from contextlib import contextmanager from sklearn.tree import DecisionTreeRegressor from sklearn.metrics import mean_squared_error from sklearn.ensemble import RandomForestR...
f9d1d9cf9b8c99744ce68c3ed06d3bf7eefe6d21
648fbac90569e520540a14ad7be6714dc3aa303d
/scripts/cell/card_10000220.py
d05d6fc2bb0421c57d41269da5248ce6095fe30e
[]
no_license
zhlhmjz/kbe_lscs
e573c1eac74c12005cb6c50288a952b2874e231b
6dc4eae5ab7fee66e929204abc80125f4f6be8f6
refs/heads/master
2021-08-24T13:43:42.208183
2017-11-21T08:39:14
2017-11-21T08:39:14
111,522,225
0
0
null
null
null
null
UTF-8
Python
false
false
719
py
# -*- coding: utf-8 -*- import KBEngine from KBEDebug import * from interfaces.GameObj import GameObj class card_10000220(GameObj): #卡牌名称:尘魔 #卡牌描述:<b>风怒</b>,<b>过载:</b>2 def __init__(self): GameObj.__init__(self) #-------------------------------------------------------------------------------------------- # ...
1a421e4b7a56288ef0f491e649e419218ddae590
b3ac12dfbb8fa74500b406a0907337011d4aac72
/tests/simulation/test_simulation.py
4d360e7d047c84c5a25402b92a5ff5871f45f7c9
[ "Apache-2.0" ]
permissive
chia-os/goldcoin-blockchain
ab62add5396b7734c11d3c37c41776994489d5e7
5c294688dbbe995ae1d4422803f6fcf3e1cc6077
refs/heads/main
2023-08-11T23:58:53.617051
2021-09-12T15:33:26
2021-09-12T15:33:26
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,165
py
import pytest from goldcoin.types.peer_info import PeerInfo from tests.block_tools import BlockTools from goldcoin.util.ints import uint16 from tests.core.node_height import node_height_at_least from tests.setup_nodes import self_hostname, setup_full_node, setup_full_system, test_constants from tests.time_out_assert i...
25964edc220c95004ffd24b272ac7962457a8fe4
0baac2c4aa84f65896054043486577b6e08ba9ef
/python/257-binaryTree.py
055403a0ce48d1fc8161d52f26eb968b284befbe
[]
no_license
hy299792458/LeetCode
c302983b81151acddffe3a71b03b4aceb20b4fa4
bb24717283a6b3ddd463b68cba34f70df75ddfed
refs/heads/master
2021-01-21T17:01:58.082623
2017-09-12T16:49:44
2017-09-12T16:49:44
91,924,578
3
0
null
null
null
null
UTF-8
Python
false
false
672
py
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def binaryTreePaths(self, root): self.re = [] def DFS(root,path): if root.left == root.right ...
e3b9d889f720be23cad9a69d505cfc0d1ee141aa
edfb435ee89eec4875d6405e2de7afac3b2bc648
/tags/selenium-2.0-beta-3/py/test/selenium/webdriver/common/children_finding_tests.py
f0ff588cab08890a162d720fadf174538ba0f18c
[ "Apache-2.0" ]
permissive
Escobita/selenium
6c1c78fcf0fb71604e7b07a3259517048e584037
f4173df37a79ab6dd6ae3f1489ae0cd6cc7db6f1
refs/heads/master
2021-01-23T21:01:17.948880
2012-12-06T22:47:50
2012-12-06T22:47:50
8,271,631
1
0
null
null
null
null
UTF-8
Python
false
false
6,205
py
#!/usr/bin/python # Copyright 2008-2010 WebDriver committers # Copyright 2008-2010 Google Inc. # # 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-...
[ "simon.m.stewart@07704840-8298-11de-bf8c-fd130f914ac9" ]
simon.m.stewart@07704840-8298-11de-bf8c-fd130f914ac9
35b8fad1bb1071613fe56f28618735be9dffbce5
6b9084d234c87d7597f97ec95808e13f599bf9a1
/models/TransT/variants/pvt_variant/network.py
94f771b0903e048e8623af1830ee9828453853d2
[]
no_license
LitingLin/ubiquitous-happiness
4b46234ce0cb29c4d27b00ec5a60d3eeb52c26fc
aae2d764e136ca4a36c054212b361dd7e8b22cba
refs/heads/main
2023-07-13T19:51:32.227633
2021-08-03T16:02:03
2021-08-03T16:02:03
316,664,903
1
0
null
null
null
null
UTF-8
Python
false
false
2,472
py
import torch import torch.nn as nn def _get_single_scale(feat): if isinstance(feat, (list, tuple)): assert len(feat) == 1 feat = feat[0] return feat class PVTFeatureFusionNetwork(nn.Module): def __init__(self, backbone, transformer, head, transformer_hidden_dim, enable_i...
6f0e28490cd886a03f99cc71aa0351c98825ad0a
a6e4a6f0a73d24a6ba957277899adbd9b84bd594
/sdk/python/pulumi_azure_native/management/v20171101preview/get_management_group.py
c098e353012344ab7443b776bd5a168f08338890
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
MisinformedDNA/pulumi-azure-native
9cbd75306e9c8f92abc25be3f73c113cb93865e9
de974fd984f7e98649951dbe80b4fc0603d03356
refs/heads/master
2023-03-24T22:02:03.842935
2021-03-08T21:16:19
2021-03-08T21:16:19
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,338
py
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
106f06f8c9ccb5d0b6bbaf7b92803d75acdbb60c
422faa17d37d453fc5a9b5a05854f144c90c0477
/tests/test_general.py
9a6e97a00ee7a608bac542ac8f21b69817781f2f
[ "MIT" ]
permissive
ArtellaPipe/artellapipe-tools-playblastmanager
71ae722425c33040770de00be295ecc9b1674765
05f1647b6b3b367c9ba9d5e8978cf32b5823f819
refs/heads/master
2020-08-03T01:14:20.291644
2020-05-04T02:00:53
2020-05-04T02:00:53
211,578,868
2
0
null
null
null
null
UTF-8
Python
false
false
264
py
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Module that contains general tests for artellapipe-tools-playblastmanager """ import pytest from artellapipe.tools.playblastmanager import __version__ def test_version(): assert __version__.get_version()
11074d328013b09d059a18ca498387b2322d0959
acaa1e54cf7963560b1ffe2c84136767f266d928
/luxPlugin/Lux/LuxNodes/ShaderNodes/arealightShader.py
23577a4a29e604d7a5d9fc8dd4d6c0d85e069563
[]
no_license
LuxRender/LuxMaya
c019deba3c284d691f75dfbf2caed3b2418828b9
3891e40c3c4c3a054e5ff1ff16d051d4e690cc4a
refs/heads/master
2021-01-01T02:25:32.792668
2014-04-09T12:06:04
2014-04-09T12:06:04
239,139,345
0
0
null
null
null
null
UTF-8
Python
false
false
1,526
py
# ------------------------------------------------------------------------------ # Lux material shader node for Maya # # by Doug Hammond 05/2008 # # This file is licensed under the GPL # http://www.gnu.org/licenses/gpl-3.0.txt # # $Id$ # # ------------------------------------------------------------------------------ #...
[ "devnull@localhost" ]
devnull@localhost
1a3467126afd0d06ecc949e651ef026e823f9635
55d560fe6678a3edc9232ef14de8fafd7b7ece12
/libs/python/test/wrapper_held_type.py
5beb657e5fe8805cc00c6e996467e1a764b6ae9b
[ "BSL-1.0" ]
permissive
stardog-union/boost
ec3abeeef1b45389228df031bf25b470d3d123c5
caa4a540db892caa92e5346e0094c63dea51cbfb
refs/heads/stardog/develop
2021-06-25T02:15:10.697006
2020-11-17T19:50:35
2020-11-17T19:50:35
148,681,713
0
0
BSL-1.0
2020-11-17T19:50:36
2018-09-13T18:38:54
C++
UTF-8
Python
false
false
740
py
# Copyright David Abrahams 2005. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ''' >>> from wrapper_held_type_ext import * >>> d = data() >>> print(d.id()) 42 >>> do_nothing( d ) >>> print(d.id()) 42 >>> ...
369057547a5b566698c0b19db73582f98621b00b
010215c1421f5275a846e7154189b22cdd3c89bc
/Misc/Data Structures/Tree/InOrderSucessor.py
c94e331a5097ff35d1f5ae308ec5f29381d89ff6
[]
no_license
bsextion/CodingPractice_Py
ab54d5715298645a8fd7ab6945bf3b22d4e6a874
da2847a04705394c32a6fe1b5f6c6b64c24647a3
refs/heads/master
2023-08-16T17:14:47.643989
2021-09-28T19:23:40
2021-09-28T19:23:40
383,658,966
0
0
null
null
null
null
UTF-8
Python
false
false
356
py
class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right def inorder_successor_bst(root, d): list = inorder_successor_bst(root.left) list.append(root.val) list = inorder_successor_bst(root.right) ret...
8c3da2993bf4a417d5a34fbbd066b1711d95ab47
c4249ce9e7cb26ae006bc9951ea676ae2250777b
/gamslib/nemhaus/nemhaus-scalar.py
e2fafab032c25e83f003bf558a9659f2b3d2ede0
[]
no_license
vaidasj/alg-mod-rev
79de3ef1e110f4bd07cbdef6951de2e4216f47f1
a3ec6b5c21700a2f28ac6bf7db6aa22540748c6e
refs/heads/master
2021-06-27T14:06:39.997411
2020-10-19T15:47:54
2020-10-19T15:47:54
180,074,989
3
0
null
null
null
null
UTF-8
Python
false
false
6,629
py
# MIP written by GAMS Convert at 12/13/18 10:32:18 # # Equation counts # Total E G L N X C B # 42 6 36 0 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
abf75a6d88c345fc7b3aee14aaf48dc58804f6d2
d1c427249d1161c1f4f848e1de23d95c03ae40a3
/28_Paymentprofile_id_staging.py
6cb31265aecbbf31def67f0641571b8a566b21d4
[]
no_license
Sangee2610/pythonscripts_march1
94b80ab3b037793022d114d7cd3604d69ba82147
2fb224fc0753beb3d65d873f658cdae247425cf1
refs/heads/master
2020-04-26T05:03:00.998024
2019-03-01T15:07:46
2019-03-01T15:07:46
173,321,199
0
0
null
null
null
null
UTF-8
Python
false
false
674
py
import psycopg2 import config as cfg conn = cfg.DATABASE_CONNECT cur = conn.cursor() import csv import pandas as pd import numpy as np cur.execute(""" DROP TABLE IF EXISTS prd_Staging_Paymentprofile_Id; CREATE TABLE prd_Staging_Paymentprofile_Id as SELECT (CASE WHEN directdebitkey = '' then NULL else cast(CAST(direct...
7f9c4842c03b353925d9c9584a7d99ea198f1fd7
004ed43634f98ada91ce6f19ccfa26146bcac9f3
/137.py
3c803cd9ba6e6e62023064f539b951045f07b176
[]
no_license
tusonggao/leetcode
490120028ccd1c33759fae5f7c2bc4cf820fab99
86be81f3df0d93bd676265211ccd1b29251c2824
refs/heads/master
2020-03-27T05:23:04.634426
2018-11-22T14:36:50
2018-11-22T14:36:50
146,014,483
0
0
null
null
null
null
UTF-8
Python
false
false
965
py
#使用O(n)空间的解法1 class Solution(object): def singleNumber(self, nums): """ :type nums: List[int] :rtype: int """ s = sum(set(nums)) * 3 ans = (s - sum(nums))//2 return ans #使用O(n)空间的解法2 class Solution(object): def singleNumber(self, nums): """ ...
059c47aad0c952917bc35d44b45e7a956c3726f0
eb93a40dd29f8f6b72d2e7bbc375c226e6dc78c7
/02_Arrays_in_Numpy/5.3_Indizierung.py
8b576d3b57eecb304312633160e4ad5b8e27b079
[ "MIT" ]
permissive
felixdittrich92/numerisches_python
ac789a4b19da1b6566ef149c52ffbcb97e60db25
0f895ee19b4fa3cf7ad38cd3dfe3cd7020ee34a7
refs/heads/master
2020-12-01T18:41:30.269530
2020-01-13T15:45:44
2020-01-13T15:45:44
230,732,215
0
0
null
null
null
null
UTF-8
Python
false
false
1,975
py
import numpy as np print("--------------------------------------") print("eindimensionale Arrays indizieren") print("--------------------------------------") F = np.array([1, 1, 2, 3, 5, 8, 13, 21]) # Ausgabe erstes Element print(F[0]) # Ausgabe letzes Element print(F[-1]) S = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]...
cd2cf9f275c063541c25fbac765f7c8469b29af8
163bbb4e0920dedd5941e3edfb2d8706ba75627d
/Code/CodeRecords/2922/61020/315606.py
36b9d2abe54aaeb1adafe1950c49c73cccc9b584
[]
no_license
AdamZhouSE/pythonHomework
a25c120b03a158d60aaa9fdc5fb203b1bb377a19
ffc5606817a666aa6241cfab27364326f5c066ff
refs/heads/master
2022-11-24T08:05:22.122011
2020-07-28T16:21:24
2020-07-28T16:21:24
259,576,640
2
1
null
null
null
null
UTF-8
Python
false
false
206
py
n=int(input()) a=[int(x) for x in input().split()] a=list(set(a)) a.sort() if len(a)>3: print("NO") else: if len(a)==3 and 2*a[1]!=a[0]+a[2]: print("NO") else: print("YES")
fc3d484eaf43c149b9bc4c394e98539e429435ff
81b20a9c51779c21b779ac0b1c5bf669359521ef
/py_object_detection/tf_api/object_detection/builders/box_coder_builder.py
a68bc0bba4d9538894ee1ba887e14d4f72a804dc
[]
no_license
thekindler/py-object-detection
bae1401f025458605c9244f9a763e17a0138d2ec
a8d13c496bab392ef5c8ad91a20fbfa9af1899bb
refs/heads/master
2023-06-23T02:42:08.180311
2021-07-17T18:40:46
2021-07-17T18:40:46
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,897
py
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
3c42c9c5c4d05db796df9b1dbcd44d792c7c20c4
0faf042dafd21547e00a872f636298217f03ae7a
/setup.py
fa19c6ca95866fbd2ef029f241fa04d712d2ce6f
[ "MIT" ]
permissive
thonra/acb.py
46a82ef4fa5ac4dfddb4b0e7870d99c0901fd54f
07b541b7febe2723d2479b53e9a138537ac039ce
refs/heads/master
2023-03-05T14:41:02.043840
2021-02-11T02:11:12
2021-02-11T02:11:12
null
0
0
null
null
null
null
UTF-8
Python
false
false
300
py
import sys from setuptools import setup, Extension def main(): args = dict( ext_modules=[ Extension( "_acb_speedup", sources=["fast_sub/module.c"], py_limited_api=True ) ], ) setup(**args) if __name__ == "__main__": main()
f96f04496e819e172c6148e5e68b01f4b46af114
51ecea4fc3409cc2c2c9b2547ebefb3cae42ef87
/backend/chat/models.py
d83f538a9407b5e5d2ae0591fa29b4ced7d18cb4
[]
no_license
crowdbotics-apps/binge-watch-28251
e2b8e7f711258afa3f04530c4a376e14fb71ad9b
a747c11de008eac81032e1aafa65b73914588eb7
refs/heads/master
2023-05-31T11:38:46.201806
2021-06-27T07:30:19
2021-06-27T07:30:19
380,675,252
0
0
null
null
null
null
UTF-8
Python
false
false
3,152
py
from django.conf import settings from django.db import models class Thread(models.Model): "Generated Model" name = models.CharField( max_length=255, ) thread_photo = models.URLField() timestamp_created = models.DateTimeField( auto_now_add=True, ) class ThreadMember(models.Mod...
51223964a1071ee1dbf12ed363ebed058c2eb870
6a302928aad4cbb5d86c8bbcabded1f03a157adc
/Ensemble_Methods/bagging_classification.py
17d3a54b90d23066b4e3bea1dbb0d1f8cfdf2402
[]
no_license
IvanRado/AI
c905a2c1d566777869405f371611c1bd9690d7e4
9c9d5cee02b18778e9a417de3e9ad07c0a1fd6c4
refs/heads/master
2020-12-08T06:51:45.766263
2020-06-20T23:41:16
2020-06-20T23:41:16
232,917,389
0
0
null
null
null
null
UTF-8
Python
false
false
2,143
py
import numpy as np import matplotlib.pyplot as plt from sklearn.tree import DecisionTreeClassifier from sklearn.utils import shuffle def plot_decision_boundary(X, model): h = .02 # step size in the mesh # create a mesh to plot in x_min, x_max = X[:, 0].min() - 1, X[:, 0].max() + 1 y_min, y_max = X[:, 1].min()...
fc178c151c60fb7c502343b672b87caf93bd859b
9c0cae2af1111529cde36f57021751d576537f9f
/edxmarketo/urls.py
66f451fa9e36f2eda7fa65363c1eebc0d157fda0
[]
no_license
ISCLC/edxmarketo
425ccc3aeafac3d3d319bda96ddab6973cefdeda
7d3223b9dad6b93863eed515c8b2e45b1133d6db
refs/heads/master
2021-01-21T06:02:19.749558
2016-04-06T00:12:53
2016-04-06T00:12:53
43,975,976
1
0
null
null
null
null
UTF-8
Python
false
false
297
py
from django.conf.urls import url from django.conf import settings urlpatterns = [ url(r'^marketo_course_access$', 'edxmarketo.views.set_marketo_course_access_date'), ] if settings.DEBUG: urlpatterns += [ url(r'^marketo_test$', 'edxmarketo.views.test_marketo_connection'), ]
f9c216d9e36499b2c663d881bad98abae74f7b89
2bb90b620f86d0d49f19f01593e1a4cc3c2e7ba8
/pardus/playground/ebayer/zabbix/comar/package.py
783303a21ba22b9377dc757238ebed5c1cbe27df
[]
no_license
aligulle1/kuller
bda0d59ce8400aa3c7ba9c7e19589f27313492f7
7f98de19be27d7a517fe19a37c814748f7e18ba6
refs/heads/master
2021-01-20T02:22:09.451356
2013-07-23T17:57:58
2013-07-23T17:57:58
null
0
0
null
null
null
null
UTF-8
Python
false
false
241
py
#!/usr/bin/python # -*- coding: utf-8 -*- import os def postInstall(fromVersion, fromRelease, toVersion, toRelease): os.system("/bin/chown -R zabbix.zabbix /var/log/zabbix") os.system("/bin/chown -R zabbix.zabbix /var/run/zabbix")
d9b5608829804232254ebd2360dcae1406ed96ba
9c4ceb78678a8755c6ac7e54a47e8054b6e79c2c
/mozdns/create_zone/tests.py
256894622faca6aae8a54b697031acdf6bc21d4a
[]
no_license
caseybecking/inventory
068ca06a9b2c28a4baaea1c71491fa029552ab1b
aa74ed891f665a0eed6899b631e08b2227e42887
refs/heads/master
2021-01-23T01:41:28.443608
2014-03-17T15:32:49
2014-03-17T15:32:49
null
0
0
null
null
null
null
UTF-8
Python
false
false
7,506
py
from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from mozdns.domain.models import Domain from mozdns.nameserver.models import Nameserver from mozdns.soa.models import SOA from mozdns.tests.utils import random_label, random_byte from mozdns.view.models ...
91923f2d70578815bd5c42388cd28f696541cc8a
7ba4e38e0835cd009a078ce39a480b5bacaba21f
/sample_code/chap5/5.1.1.merton2d.py
4d23bc23a0147325378c2537d556466d3e55833f
[]
no_license
moguranran/computer_vision_test
fe0641987905755c733e4ab16f48c3b76d01b3f4
4c5b5572d01e13a42eefb2423e66e34675c305cb
refs/heads/master
2022-04-20T17:53:37.668609
2020-03-31T00:13:02
2020-03-31T00:13:02
249,196,701
0
0
null
null
null
null
UTF-8
Python
false
false
404
py
#!/usr/bin/python # -*- coding: utf-8 -*- from PIL import Image from pylab import * execfile('load_vggdata.py') # 3D点を同次座標にして射影する X = vstack( (points3D,ones(points3D.shape[1])) ) x = P[0].project(X) # 画像1の上に点を描画する figure() imshow(im1) plot(points2D[0][0],points2D[0][1],'*') axis('off') figure() imshow(im1) plot(...
073f60314ce1438ff3d603dd52a52964ccd838c4
521580589177e7eb44ef809d7be2ae0f74d1d2ce
/tests/utils.py
1d25782e40bb0dac7ea8339f7197e5e84187cbd0
[ "BSD-3-Clause" ]
permissive
isabella232/typeseam
3e2455ad27ae6234868a4b17ade25b9867500c69
3e9d090ec84f2110ae69051364bb0905feb2f02c
refs/heads/master
2023-04-01T16:12:57.666686
2016-08-18T01:56:14
2016-08-18T01:56:14
358,551,773
0
0
BSD-3-Clause
2021-04-16T09:52:11
2021-04-16T09:49:54
null
UTF-8
Python
false
false
213
py
import re from bs4 import BeautifulSoup def get_value_for_name(name, unicode_text): soup = BeautifulSoup(unicode_text, 'html.parser') t = soup.find(attrs={'name': name}) return t.attrs.get('value')
47b493a00ab878d569dab455ac4af3ca7a951d1c
f8ad6963bfc851657ea50c6a036cfad29cdd7f60
/Books/DeepLearningLearningFromTheFounderOfKeras/chapter6/sub6_3_2.py
e226b633774a2b310e3e59774ec825790fb6fef2
[]
no_license
foru120/PythonRepository
e1ab0265c0f50ef2e9acdf7447237c913560692b
db6b6be0f9fb91b0a81a3b6a2ec5631daab10f98
refs/heads/master
2021-01-01T06:53:11.728109
2019-04-25T13:52:50
2019-04-25T13:52:50
97,541,222
4
0
null
null
null
null
UTF-8
Python
false
false
7,583
py
#todo p.282 ~ p.299 #todo code 6-32 ~ code 6-44 #todo 6.3.2 데이터 준비 import os import numpy as np data_dir = 'G:/04.dataset/09.jena_climate' fname = os.path.join(data_dir, 'jena_climate_2009_2016.csv') f = open(fname) data = f.read() f.close() lines = data.split('\n') header = lines[0].split(',') lines = lines[1:] f...
bb7df9eaa48f87436b6a91a78aade6d51d87c59b
bd275d991b6c87609c2d1c7a00e42d09d6f8284c
/zhrtvc/tools/run_local.py
aa1a5284c94eefbd1142c55e0c608ac20a4068c4
[ "MIT" ]
permissive
wulol/zhrtvc
01dcfe9e5a087dbdca8f2ba773a8a9e46cabc483
99e594621643d1f6a8197b2c1f616c1d4a89c79b
refs/heads/master
2023-01-18T23:29:56.108717
2020-12-05T10:02:43
2020-12-05T10:02:43
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,034
py
#!usr/bin/env python # -*- coding: utf-8 -*- # author: kuangdd # date: 2020/2/20 """ """ from pathlib import Path from functools import partial from multiprocessing.pool import Pool from matplotlib import pyplot as plt from tqdm import tqdm import collections as clt import os import re import json import numpy as np im...
abf6d188268e5a9aa36725a70f24302522e07c35
1a0d5e2e9da4be4babbb55fa0edfb4e708044567
/P0-Sudoku/solution.py
0191cc77c0671765cfe6a4b1185fc8cb0c0781ff
[]
no_license
andy1li/udacity-aind
45adc280b8880aa1e5592f9b40ea76133eac10c8
ecf1d9466578557e1ed991ffa925d620fd0f87ed
refs/heads/master
2021-05-15T07:50:37.877110
2018-04-04T02:18:11
2018-04-04T02:18:11
109,645,801
1
0
null
null
null
null
UTF-8
Python
false
false
5,562
py
from utils import * from collections import Counter row_units = [cross(r, cols) for r in rows] column_units = [cross(rows, c) for c in cols] square_units = [cross(rs, cs) for rs in ('ABC','DEF','GHI') for cs in ('123','456','789')] diag_units = [[r+c for r, c in zip(rows, cols)], ...
b4a29825c5aa72eb08388b9b95ccd734c2c97f45
1a9696b7f30c7164e4b7c57933b7b2d8df83ab2c
/Camera_Functions.py
ac8225bbbdba87107de0a732272afe2616447dc5
[ "MIT" ]
permissive
SBCV/PythonBlenderUtility
5bc6d20bd4298097b6893b2739a6879e29b0e084
4f91c5a356fede103bcb8c2a9ba1d4d0b01aadc3
refs/heads/master
2020-04-02T02:06:52.888904
2020-02-17T13:04:02
2020-02-17T13:04:02
153,892,269
1
0
null
null
null
null
UTF-8
Python
false
false
1,888
py
import bpy import numpy as np from Utility.Types.Camera import Camera from Utility.Math.Conversion.Conversion_Collection import convert_opengl_to_computer_vision_camera from Utility.Logging_Extension import logger def get_calibration_mat(blender_camera): #logger.info('get_calibration_mat: ...') scene = bpy.co...
eddd22a4f755d6844fc83b4621b94e1687021fd6
e65d16ea1e8d412bac75a809be6d390126bdf528
/homeassistant/components/google_assistant_sdk/__init__.py
e2791f6000f3ebf95250338fe0b609d7c1df0863
[ "Apache-2.0" ]
permissive
syssi/home-assistant
6347d57866cb16ab9d4499ad38e2be6f0399077f
fd43687833741b21221769d46b4d1ecef8a94711
refs/heads/dev
2023-08-17T09:31:52.680518
2023-06-11T14:22:12
2023-06-11T14:22:12
97,874,495
6
16
Apache-2.0
2023-09-13T06:31:21
2017-07-20T20:12:37
Python
UTF-8
Python
false
false
6,693
py
"""Support for Google Assistant SDK.""" from __future__ import annotations import aiohttp from gassist_text import TextAssistant from google.oauth2.credentials import Credentials import voluptuous as vol from homeassistant.components import conversation from homeassistant.config_entries import ConfigEntry, ConfigEntr...
5d38c3be05c32a6e2c9c7214932c4650eef0e83d
01776becc70eafe6dcbad140eb40a862bc623341
/LeetCode/Easy/989.Add to Array-Form of Integer.py
d22f06f8e69782b38fd59c1bb2f89bad9b11807f
[]
no_license
AnthonyTsui/AlgoPractice
8eae4d197080c0a94b0127ed5a95198f5d2f3269
59fcb2826fb95a304cf7b4b9a77c2ae710fb5c9a
refs/heads/master
2022-12-02T18:20:58.104356
2020-08-29T23:58:17
2020-08-29T23:58:17
250,649,377
0
0
null
null
null
null
UTF-8
Python
false
false
1,138
py
# For a non-negative integer X, the array-form of X is an array of its digits in left to right order. For example, if X = 1231, then the array form is [1,2,3,1]. # Given the array-form A of a non-negative integer X, return the array-form of the integer X+K. # Example 1: # Input: A = [1,2,0,0], K = 34 # Output: [...
0fea981dccef636eea89d4210cf00364ba2d1897
46caeb8f8a896036b5a1d054416c7c5530076381
/tests/test_app.py
76a63be24e856031dfeed6d51195aeef37a16987
[ "MIT" ]
permissive
c137digital/unv_template
dce0a65eacf18faa3ca6cdf08202fe11d45c943a
2c356478408a27eb68eaaf38a74b32a6633a11d0
refs/heads/master
2020-04-14T06:41:16.725736
2019-11-02T13:19:27
2019-11-02T13:19:27
163,693,073
0
0
null
null
null
null
UTF-8
Python
false
false
293
py
import pytest from package.app import SomeExampleApp @pytest.fixture def instance(): return SomeExampleApp('test') def test_calls_count(instance): assert instance.ncalls == 0 assert instance.name == 'test' assert instance.power(2, 3) == 8 assert instance.ncalls == 1
175a78136f62e7e999d0cc195755ace57255346f
93bda31263d66cc557cb084d08c26388cf3d6bd5
/fluid/image_classification/caffe2fluid/kaffe/custom_layers/__init__.py
703c6a0a8091df79c73465be8c52248af518f3ca
[ "Apache-2.0" ]
permissive
denglelaibh/models
323982b172e6aced9b6e99ecdbfe00d98c23be8f
f93838a4258c2a197cfa9e14c244b4da7a042a88
refs/heads/develop
2020-03-19T13:53:17.619489
2018-06-08T04:43:04
2018-06-08T04:43:04
126,789,492
0
0
Apache-2.0
2018-05-16T03:17:38
2018-03-26T07:21:18
Python
UTF-8
Python
false
false
2,781
py
""" """ from .register import get_registered_layers #custom layer import begins import axpy import flatten import argmax import reshape #custom layer import ends custom_layers = get_registered_layers() def set_args(f, params, node=None): """ set args for function 'f' using the parameters in node.layer.paramet...
13e7e0e3254aa8534f9f9b8c72d17e9b62aca991
1dac4a650f5061bed9574a84cef4bdb87fdc3ebf
/tests/contrib/test_tone_convert.py
f25f8dc1434179aa9d3c1b2f9af4eb1bc7134c1d
[ "MIT" ]
permissive
rontian/python-pinyin
29cf191ac1812de30a147ffdbd90a74b52ef2c2d
a421a83127ee55cba09ecabbf63d0c1bfb3a3aea
refs/heads/master
2023-09-04T18:01:13.417107
2021-11-14T03:42:51
2021-11-14T03:42:51
null
0
0
null
null
null
null
UTF-8
Python
false
false
6,342
py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from pytest import mark from pypinyin.contrib.tone_convert import ( tone_to_normal, tone_to_tone2, tone2_to_tone, tone_to_tone3, tone3_to_tone, tone2_to_normal, tone2_to_tone3, tone3_to_tone2, tone3_to_normal, to_no...
2713cbac7261c36dc7f85e151ef0d25eb08925bf
60d737103373825b858e67292865bda8c6f2094f
/active/theses-riogrande.py
0781b43ee13bfe2d8da1cbb43eb58928f2b60efa
[]
no_license
fschwenn/ejlmod
fbf4692b857f9f056f9105a7f616a256725f03b6
ef17512c2e44baa0164fdc6abc997c70ed3d2a74
refs/heads/master
2023-01-24T18:56:35.581517
2023-01-20T11:18:16
2023-01-20T11:18:16
91,459,496
1
1
null
2021-10-04T11:58:15
2017-05-16T13:06:57
Python
UTF-8
Python
false
false
6,015
py
# -*- coding: utf-8 -*- #harvest theses from Rio Grande do Sul U. #FS: 2020-10-08 import getopt import sys import os import urllib2 import urlparse from bs4 import BeautifulSoup import re import ejlmod2 import codecs import datetime import time import json xmldir = '/afs/desy.de/user/l/library/inspire/ejl'#+'/special'...
990eee06dfeaf47b24859f2490bc130d5f365b43
a3c68eafdb433c981f2b90e86f895e4f121c69fb
/笔试/腾讯/安排任务.py
7774742e90b1ce6c0ce1f601472364aa5efae663
[]
no_license
Cassiexyq/Program-Exercise
ccc236ea76ca99ddc6fe0c4c47edebc3d557cfad
e962cc3add047d61df275dd3e22a091018fd964a
refs/heads/master
2020-04-25T20:27:33.561226
2019-09-22T15:29:35
2019-09-22T15:29:35
173,050,531
0
0
null
null
null
null
UTF-8
Python
false
false
913
py
# -*- coding: utf-8 -*- # @Author: xyq n,m = [int(i) for i in input().strip().split()] machine,task = [],[] for i in range(n): hours, level = [int(i) for i in input().strip().split()] machine.append([hours, level]) for i in range(m): hours,level = [int(i) for i in input().strip().split()] task.append(...
ad88264e1c80fd051137abcd95d7cc5ca5c19016
4ca7480c27ed98fd9c49ac11911f6c1229e53631
/main.py
e3a55d8bf6eb0bdc2a30bedbaf60580310a6ed74
[]
no_license
shawwn/tfimg
33ba7b2fc7fa60fb41ba1bd4c76065170c40c3f8
0d464f56f1092996d90870f765d6a1d875f09b4f
refs/heads/master
2023-03-05T09:47:53.394086
2023-02-18T13:58:48
2023-02-18T13:58:48
274,115,458
2
0
null
null
null
null
UTF-8
Python
false
false
7,821
py
import tensorflow as tf import functools def op_scope(fn, name=None): if name is None: name = fn.__name__ @functools.wraps(fn) def _fn(*args, **kwargs): with tf.name_scope(fn.__name__): return fn(*args, **kwargs) return _fn @op_scope def clamp(v, min=0., max=1.): if anu...
e21782c742d83cd1fd0c8e9c99a1ccce363fc50a
d14be9a07437f395c36c73aebfd1c5434ff4300e
/vmware_static_dhcp/hosts_file.py
ea682e177a5b8fc9e3ef5432174408c596cf3e8a
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
zcutlip/vmware-static-dhcp
f6122cdb7ca0fcd895c536d3a23e2469bfceaedc
4f7747703bca8f440c56407c5e1437cfe9ff8cba
refs/heads/master
2020-09-08T11:13:41.192702
2019-11-12T03:11:03
2019-11-12T03:11:03
221,117,693
0
0
null
null
null
null
UTF-8
Python
false
false
3,573
py
class MalformedHostsEntryException(Exception): pass class MalformedHostsFileException(Exception): pass class HostsEntry: ADDR_COLUMN_WIDTH = 24 FOUR_SPACES = " " def __init__(self, addr, hostname, comment): self._sanity_check(addr, hostname) self.address = addr self.h...
975c2da1189e6e45391dd92d380c8e1342d46cca
abf31091690614f7949c1ddc50ef36d4a46658f8
/Old Sspider/Gomine_DOC_utf/zhuan_weiyi_run.py
ee3258e8cd083db50a9d680df0af86d3f3e605bd
[]
no_license
SuperShen9/work_by_sh
7132196b0b40ab88c4baaac6bb4813babc2f3dcb
60a3693eb040b2f86165bfa439f3a718f38bae44
refs/heads/master
2021-01-20T01:50:34.795903
2018-06-19T06:14:11
2018-06-19T06:14:11
89,328,784
0
0
null
null
null
null
UTF-8
Python
false
false
2,154
py
# -*- coding: utf-8 -*- # author:Super import sys reload(sys) sys.setdefaultencoding('utf-8') import pandas as pd import time,os,shutil import codecs pd.set_option('expand_frame_repr',False) os.chdir('C:\\Users\Administrator\Desktop') # #openpyxl模块 # wb = openpyxl.load_workbook('sheet1.xlsx') # sheet = wb.g...
ddcdbe45016ee01b23f44ed1f9d03021eae00fb4
dc30b6ecea0a1ad2342244871817a5882f506fda
/Tentamen/Opdracht1.py
5247492fd3260ea011617607a84e6974c049e3cd
[]
no_license
CasperHagenaars/WISB256
26e4b272a80d687b22ce7fd48a6040e45e152b85
d0871a2221f71fe64d7aba4efcd3a1e276c22f34
refs/heads/master
2020-05-20T17:03:27.182900
2015-06-18T12:43:33
2015-06-18T12:43:33
34,313,132
0
0
null
null
null
null
UTF-8
Python
false
false
295
py
import math import time tekst = input() lijn = "Ug" try: if(int(tekst) > 1): for i in range(1,int(tekst)): lijn += " ug" lijn += "!" lijn = str(lijn) else: lijn = "Ug!" except: lengte = (len(tekst) / 3) lijn = int(lengte) print(lijn)
732064d7c77be799ca1907b7c19d461d4303dbf1
543fc91aa311e39b3119a509b8151c31c1bfdb27
/code/BalancedBinaryTree.py
ea7ddfe29074ce64631957588924d753eee6795d
[]
no_license
shinrain/leetcode-python
399879ea8ebffdc73575c897228e33d7a62825de
5497f496fb6b87b387f0d2eb316d152446dfc8cc
refs/heads/master
2021-01-01T06:00:23.517122
2015-01-03T07:15:26
2015-01-03T07:15:26
26,843,970
0
0
null
null
null
null
UTF-8
Python
false
false
472
py
# Definition for a binary tree node # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: # @param root, a tree node # @return a boolean def isBalanced(self, root): return helper(root)!=-1 def helper(root): if root is None: ...
22c37ae2c3ab66a66b668cd84fcf3b548b17736a
bf94a22b20a81d0557488357bc1ceaebb9742d50
/bc/utils/dask_grenoble.py
a1cc516402f4df15c1e25d5cfebb650b3645782f
[ "MIT" ]
permissive
ikalevatykh/rlbc
ccbcb73034d0f9b638b26abbe6d97479b3494903
feb31bf5e8442335ce4b4a06a7171b1f64afe9b5
refs/heads/master
2022-03-05T04:03:36.053834
2019-11-05T10:04:05
2019-11-05T10:04:05
261,451,513
2
0
MIT
2020-05-05T11:58:14
2020-05-05T11:58:13
null
UTF-8
Python
false
false
2,318
py
import os import datetime from dask_jobqueue import OARCluster class AlpesCluster(OARCluster): def __init__( self, cores, name, processes=1, mem_req=4000, walltime='72:00:00', venv=None, to_source='~/.bashrc', ...
241ef0bf4ffd075de96f0a553cfb8c7cb1005833
78c3b9ca4d10b84ea9ec853da39324ba38ad224e
/commentonx/__init__.py
ebff6b27414a0c3e8e9c9028f145047909b976d3
[ "MIT" ]
permissive
trickeydan/commentonx
2a892c47b1a535b23bc8ef044e14b4ef58839135
b7dbfd6af0f58503acba576033a43be3aabbb0e9
refs/heads/master
2022-12-10T06:34:16.528489
2018-09-29T23:20:57
2018-09-29T23:20:57
150,874,538
0
1
MIT
2021-03-20T00:10:25
2018-09-29T14:56:32
HTML
UTF-8
Python
false
false
441
py
from flask import Flask from flask_scss import Scss from commentonx.config import config app = Flask(__name__) app.config.update(config) if 'VIEW_CONFIG' in app.config: # Allow view config access in templates app.jinja_env.globals['VIEW_CONFIG'] = app.config['VIEW_CONFIG'] else: app.jinja_env.globals['V...
1531be40d6bc6d91bd6b92fa06158a74798f9ea7
4f75ac595ef58c8e42b2a711180bbb1832b30aad
/articles/data_python_c/listings_py/mod_immut_parameter.py
bf5a3b308c0b2ebfc75a520857e06e99d15589ed
[]
no_license
amitsaha/notes
4548554a164a4a423795c3103f3462f3fea9b28b
6fffe2529d390418616eff71d9b44afb40474278
refs/heads/master
2021-05-04T10:56:05.266501
2018-01-26T07:11:59
2018-01-26T07:11:59
8,493,168
1
0
null
null
null
null
UTF-8
Python
false
false
863
py
#!/usr/bin/env python """ Passing immutable data objects and returning a modified version. """ from __future__ import print_function def func(astr): print('In func() before modification') print('{0} : {1}'.format(astr,id(astr))) print() astr = astr.replace('a','b') print('In func() after modi...
f0be020b789a57fa3ec5391f4ac6e442fe06921d
26d37aa0560ecc5725b17e965e16d528bce161ff
/schedule/migrations/0016_course_course_active.py
ab457d8c32e3d849dc5154823ba04405c584b5c8
[]
no_license
dmic23/hga
25dfaa177f788b309eeb84a77d3ac126d092bac1
aea67fdb8e5baad1206ecca93aadbea427b7af28
refs/heads/master
2021-01-21T14:23:16.402218
2017-10-23T18:07:10
2017-10-23T18:07:10
57,150,174
0
0
null
null
null
null
UTF-8
Python
false
false
458
py
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-07-01 07:26 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('schedule', '0015_auto_20160630_0333'), ] operations = [ migrations.AddField(...
882fd9151d05de09700e7726253804eba88370c1
4c424214344a3d8cc6fe0978f462410597619e71
/archer_apps/accounts/serializers.py
156d880a23db7748bbae53fdcc9297944bcc0f08
[]
no_license
SergeZazik/Archer-Test
65e903b7859c4f9a852d0a88c31a2222f0aebd43
6c858f401b95f52551fbf8096cdb17507da399cf
refs/heads/master
2020-04-08T12:17:49.941503
2018-11-27T15:33:09
2018-11-27T15:33:09
159,340,326
0
0
null
null
null
null
UTF-8
Python
false
false
1,308
py
from .models import CustomUser from django.contrib.auth import authenticate from rest_framework import serializers from rest_framework_jwt.serializers import JSONWebTokenSerializer class CustomJSONWebTokenSerializer(JSONWebTokenSerializer): def validate(self, attrs): credentials = { self.usern...
9d35cc4ff98d0ade4747b6614d96798f75ee21ff
a2d36e471988e0fae32e9a9d559204ebb065ab7f
/huaweicloud-sdk-drs/huaweicloudsdkdrs/v3/model/user_role_vo.py
b2e30bea30f52f1267a762acaee3d4e2c5cb897b
[ "Apache-2.0" ]
permissive
zhouxy666/huaweicloud-sdk-python-v3
4d878a90b8e003875fc803a61414788e5e4c2c34
cc6f10a53205be4cb111d3ecfef8135ea804fa15
refs/heads/master
2023-09-02T07:41:12.605394
2021-11-12T03:20:11
2021-11-12T03:20:11
null
0
0
null
null
null
null
UTF-8
Python
false
false
6,203
py
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class UserRoleVO: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attr...
c780bb18ed86e9e63411028da9535cea55bfe611
0607fa7255fa47608407b3cfd819e83d55ba9eab
/InvenTree/part/test_part.py
84d9900aff2a8c4914aec16079bbfd4198715ff4
[ "MIT" ]
permissive
IsThisNameGoodEnough/InvenTree
f7d71aa8c33f69654b2bb4d3827d4a60290df8ad
fa789036e0ae7d56ced3c9e1f2d2ff596983a365
refs/heads/master
2020-07-26T02:31:34.316571
2019-09-13T14:14:45
2019-09-13T14:14:45
208,505,299
0
0
MIT
2019-09-14T21:20:24
2019-09-14T21:20:24
null
UTF-8
Python
false
false
2,536
py
# Tests for the Part model # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase import os from .models import Part from .models import rename_part_image, match_part_names from .templatetags import inventree_extras class TemplateTagTest(TestCase): """ Tests for the c...
f304df27684fea353834a729f98e0123e8e0d1a3
1f8812be38ff5dfc2bf8488e757077ebae1791be
/apps/askfm/migrations/0002_question_time.py
c67c1931e178fe5fd55e4d4a8669cc226355fdf9
[ "MIT" ]
permissive
Morsa11/AskFmClone
d51e28a2568a2678af488fcbda63c2b1a23943e3
50ded5126926989627b7aa0fb445da5a8a4a5d68
refs/heads/master
2020-04-25T21:46:03.899930
2016-12-13T07:51:57
2016-12-13T07:51:57
null
0
0
null
null
null
null
UTF-8
Python
false
false
557
py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.utils.timezone import utc import datetime class Migration(migrations.Migration): dependencies = [ ('askfm', '0001_initial'), ] operations = [ migrations.AddField( ...
61e6312cb372d66857c1f7cfdaa20a156aaf971c
82e18cc7b20e98b90b739618d6517b384f1f0cf5
/tests/test_defaults.py
85f5a74c223c24d2a6a2aa0c8b5d9e7364408c41
[ "MIT" ]
permissive
atng/draftjs_exporter
9480600f04843bce700dce73080d5527c896a78e
df5e24a69301e6c78fae74ec62615d6444773980
refs/heads/master
2020-12-28T11:24:01.953669
2020-02-04T22:56:45
2020-02-04T22:56:45
238,312,334
0
0
MIT
2020-02-04T21:38:33
2020-02-04T21:38:33
null
UTF-8
Python
false
false
615
py
import unittest from draftjs_exporter.defaults import BLOCK_MAP, STYLE_MAP, code_block, render_children from draftjs_exporter.dom import DOM class TestDefaults(unittest.TestCase): def test_default_block_map(self): self.assertIsInstance(BLOCK_MAP, object) def test_default_style_map(self): sel...
1caefba7b7e4fdb55fbe74db57fc8e404ddd15a7
e1e08ca2df1caadc30b5b62263fa1e769d4904d8
/cps/modules/usercp.py
c42b820652056203e9e39da4353a725554cbf8b9
[]
no_license
tiench189/ClassbookStore
509cedad5cc4109b8fb126ad59e25b922dfae6be
4fff9bc6119d9ec922861cbecf23a3f676551485
refs/heads/master
2020-12-02T07:48:26.575023
2017-07-10T02:45:09
2017-07-10T02:45:09
96,728,874
0
0
null
null
null
null
UTF-8
Python
false
false
2,411
py
# -*- coding: utf-8 -*- __author__ = 'tanbm' from datetime import datetime def addzero(num): if num < 10: return "0" + str(num) else: return str(num) def user_get_id_cp(member_id, db): info = user_get_info(member_id, db) try: return info['user_cp_info']['cp_id'] except: ...
a262ab878556b9c9c939d132c8e39567a05531ab
fc80698bcbae0b94907697fc4df023101bd19887
/xptracker/settings/base.py
1dbb792983757d847a3bab19d103e031d550cf0c
[ "Apache-2.0" ]
permissive
Django-Lessons/xptracker
1ee982440ab71110f1d228479cd016ccb167db01
c152de874872857c8896787eeea35744e1f3e02f
refs/heads/master
2023-08-13T17:34:09.180379
2020-06-25T07:04:44
2020-06-25T07:04:44
270,729,777
2
1
NOASSERTION
2021-09-22T19:10:54
2020-06-08T15:55:14
Python
UTF-8
Python
false
false
2,961
py
import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ # SECURITY WARNING: keep the...
107043c3897bddc4c62e4fe077338a1d50b32d6f
43470b9aab53ae3d0f5e63402bb5727981619ddb
/Python/image/migrations/0002_auto_20200906_1916.py
4f60badb4789e3f1ea5ad3246a0dd927499d48e4
[]
no_license
nnocturnnn/Pixelizator
04baa2cda666a581c6c24ca6b2d74f5999a07785
1386235f6e7bc01fced684e3922ef51b3f64bd59
refs/heads/master
2023-03-06T11:27:03.241013
2021-02-17T13:19:49
2021-02-17T13:19:49
315,136,923
0
0
null
null
null
null
UTF-8
Python
false
false
377
py
# Generated by Django 3.1.1 on 2020-09-06 19:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('image', '0001_initial'), ] operations = [ migrations.AlterField( model_name='image', name='file', field=...
18eac29dd0f67198041e3f6ea97457ba2bcd9a1d
b82057c77dd4d00ff9bca9a979a1a3075f0528c4
/Exicom_gateway/checks/rectifierindiv_recline1_input_voltage
a2a1215661ecd5575e47a479f335c922630d5c47
[]
no_license
subhash-007/photography-blog
7ee0c4f930fee29d76106c45b09e6b76cb19cf56
b1ae66794b48bfe3862cb6e727a3a15a6ef79024
refs/heads/master
2020-03-31T04:33:00.276628
2019-07-12T06:00:39
2019-07-12T06:00:39
151,910,256
0
0
null
null
null
null
UTF-8
Python
false
false
2,497
#!/usr/bin/python import binascii """ vlan Poller script. This is part of device application. Poller script determines the vlan. poller script takes the snmp value of OID .1.3.6.1.4.1.161.19.3.2.1.55.0 from snmp agent of device at specific interval. all ports status are sent to device application """ # #############...
1b8ea813e6adfcf05a77b0fcdb6d9cb30cc95657
21bbc3fbeb7a1616dbd6993b66dc44d9b30df3e7
/python_training/samp_proj1/day_011118/plotting1.py
803db5cf4412574052bef093c3c79f673bf6c82a
[]
no_license
PoornimaDevii/python_training
6124640608d8bf14289ae61b2b28e0db3b473b6f
42b535590a6a244a91bd48b4451b74a29c1aaa80
refs/heads/master
2020-04-05T19:55:49.723114
2018-12-04T11:49:59
2018-12-04T11:49:59
157,157,063
0
0
null
null
null
null
UTF-8
Python
false
false
1,420
py
import matplotlib.pyplot as plt import numpy as np X = np.linspace(-np.pi, np.pi, 256) Y1 = np.sin(X) Y2 = np.cos(X) Y3 = np.tan(X) Y4 = np.sqrt(1 - X*X) plt.figure(figsize=(6,4), dpi=80) # 6 for x axis and 4 for y axis, dpi decides how large the plot will be, # figsize is proportional x and y values plt.plot(X,Y1,...
f104f06f86d3958325c83c0ba9b5beffdb89c3ec
4b7e282fe480415f5d52c0fc0429f144156190fe
/google/ads/googleads/v8/services/types/campaign_simulation_service.py
9c4efef727ac0a515e6de9bbdcf66a4dcaca2149
[ "Apache-2.0" ]
permissive
Z2Xsoft/google-ads-python
c4750357bb19da91bb3b6bf2fa84bef9d2df36d3
1779d52a0446c8afb2437b0a9e103dcb849f5590
refs/heads/main
2023-08-18T15:22:17.840364
2021-09-26T04:08:53
2021-09-26T04:08:53
410,444,398
0
0
Apache-2.0
2021-09-26T04:08:53
2021-09-26T03:55:38
null
UTF-8
Python
false
false
1,265
py
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
fd09d4b9e667639b7e0480f72e689ede4c098f7a
b5ea580240b372297b2b61922decff1aa15375e8
/dico/emailer.py
33f71525ae927efc7cddcd4ecb99ce01f0714e55
[]
no_license
michaelcrubenstein/IDoDeclare
ca7e1c1ef8c89a330e0cb97e961a757039f68f66
1b8f4a4ca8d2bd953389d47786144502c9347921
refs/heads/master
2021-01-18T01:42:00.889655
2015-07-28T14:15:06
2015-07-28T14:15:06
31,086,954
0
0
null
null
null
null
UTF-8
Python
false
false
1,014
py
from django.core.mail import send_mail class Emailer(): # Sends a reset password message to the specified email recipient. def sendResetPasswordEmail(recipientEMail, resetURL): htmlMessage = """\ <p>There has been a request to reset your password for I Do Declare.</p> <p>Click <a href="%s">here</a> to ...
3ee38094628c51ffb37b52ecd815c4075878c2a5
eacff46eda2c6b509449979a16002b96d4645d8e
/Collections-a-installer/community-general-2.4.0/tests/unit/plugins/module_utils/xenserver/conftest.py
52f654bcc6ab90e4315772942e04f9f690466651
[ "MIT", "GPL-3.0-only", "GPL-3.0-or-later" ]
permissive
d-amien-b/simple-getwordpress
5e6d4d15d5f87124ab591e46b63fec552998fdc3
da90d515a0aa837b633d50db4d91d22b031c04a2
refs/heads/master
2023-04-08T22:13:37.347545
2021-04-06T09:25:51
2021-04-06T09:25:51
351,698,069
0
0
MIT
2021-03-31T16:16:45
2021-03-26T07:30:00
HTML
UTF-8
Python
false
false
3,744
py
# -*- coding: utf-8 -*- # # Copyright: (c) 2019, Bojan Vitnik <[email protected]> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import sys import importlib import os import json ...
f2fe8040e6b6e400ff5b3e70fd88c10f94a82945
75f0580af1734b9edb9e06bfadfe48f45b057872
/2019/8/sol.py
6052c056bbeb201b13ed23d24370c34a7c3d6a11
[]
no_license
penteract/adventofcode
5bb317f8093f60c1d776d0983016a5288d059603
7b7344708ef1d58caa339a32a13f3390556b664c
refs/heads/master
2023-01-29T16:08:13.541190
2023-01-16T20:21:02
2023-01-16T20:21:02
160,901,373
5
0
null
null
null
null
UTF-8
Python
false
false
1,104
py
from functools import * from itertools import * from collections import defaultdict print ("hi") f = open("input") l = list(f) print(len(l)) print(len(l[0])) dat = l[0][:-1] x=0 lays=[] while x<len(dat): lays.append(dat[x:x+25*6]) x+=25*6 print(x) print("here") print(min([(l.count("0"),l.count("1")*l.c...
25ebe5fafa9fe727571d9b95d86bb183de99cf83
b76615ff745c6d66803506251c3d4109faf50802
/pyobjc-framework-ApplicationServices/PyObjCTest/test_axactionconstants.py
0fd99b65a921cc20e9aef2f2d09a1649d4f9ee0a
[ "MIT" ]
permissive
danchr/pyobjc-git
6ef17e472f54251e283a0801ce29e9eff9c20ac0
62b787fddeb381184043c7ff136f1c480755ab69
refs/heads/master
2021-01-04T12:24:31.581750
2020-02-02T20:43:02
2020-02-02T20:43:02
240,537,392
0
0
null
null
null
null
UTF-8
Python
false
false
858
py
import HIServices from PyObjCTools.TestSupport import * class TestAXActionConstants(TestCase): def testConstants(self): self.assertEqual(HIServices.kAXPressAction, "AXPress") self.assertEqual(HIServices.kAXIncrementAction, "AXIncrement") self.assertEqual(HIServices.kAXDecrementAction, "AXD...
a7d3c422b559f44ac3e3715060cf05f7dd47073a
f879a7bc37da3fa998fc6925b8cede788cde6a70
/lunch/migrations/0001_initial.py
81c83ebf338d11f881cf9a075d340bfbfeee507b
[ "MIT" ]
permissive
pythondev0101/eats_easy_ordering_system
65672c90d6937cdf3173b0e3445dc2967b296fe4
f65a88b4a46e056be35909799a01784f741cdfac
refs/heads/master
2021-08-22T22:32:39.358470
2019-05-08T15:50:56
2019-05-08T15:50:56
168,003,924
0
0
MIT
2021-06-10T21:18:36
2019-01-28T17:22:58
Python
UTF-8
Python
false
false
1,703
py
# Generated by Django 2.1.5 on 2019-03-28 22:30 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('core', '0001_initial'), migrations.swappable_dependency(setting...
74008430a1be80fcb8c52208585fda0fb87e88c3
9716798c8ede92793d5dece271f7d2d2cb8f718e
/django-backend/grants/migrations/0003_auto_20160622_2128.py
c562bd57d5e9e1ab867f5406efa6b9c716039607
[]
no_license
experiment/experiment-grant-scapie-mcscrapeface
020066f42be1503dcaecb43a9e90b1091bf67d87
43388d3a621df1fcaf5ae57656b7537a384b4ed0
refs/heads/master
2021-01-18T04:51:31.871971
2016-06-26T20:41:54
2016-06-26T20:41:54
null
0
0
null
null
null
null
UTF-8
Python
false
false
956
py
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-06-22 21:28 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('grants', '0002_auto_20160615_1928'), ] operations =...
8980dbace4b9b52b7f3d2df6afa42b4cb87ba0e1
de4da7c45581f72adaf8e328a89cb3d57fe3613f
/fundamentos/slides/marcoandre/pyMordida0-fontes/py33.py
12654acc12581c53d9458751e59ef50bb3a132ab
[]
no_license
ramalho/propython
2469be7492554762d05f9b0ce5c0dc3a51bd3a18
76c2b52755e08d49929cdc2a523db72735240e72
refs/heads/master
2022-06-01T22:51:07.659074
2022-05-22T18:22:21
2022-05-22T18:22:21
140,458
39
13
null
null
null
null
UTF-8
Python
false
false
207
py
#!/usr/bin/env python #-*- coding:utf-8 -*- from random import shuffle palavra = 'python' print palavra l = list(palavra) print l shuffle(l) print l palavraEmbaralhada = ''.join(l) print palavraEmbaralhada
6a183eba351a084f4cfb4b32477ae15de49b2df7
b2a3328ec0caeb4231528094ec374f8168b08e91
/Scence/Scence/authrouter.py
5fb3b54537fa43dd3338f9df122cb9becc294916
[]
no_license
sugerStill/ScenceWeb
1185d10b300d57af22cc72cbc6b50e1840bdc127
b189ea27d9ca383528d095ab3d81c79c87fbaea2
refs/heads/master
2020-06-05T19:37:50.446509
2019-06-18T11:47:12
2019-06-18T11:47:12
192,527,209
1
0
null
2019-06-18T11:31:28
2019-06-18T11:31:28
null
UTF-8
Python
false
false
1,642
py
from django.conf import settings DATABASE_MAPPING = settings.DATABASE_APPS_MAPPING class AuthRouter: def db_for_read(self, model, **hints): if model._meta.app_label == 'TrafficView': return 'trafficdatabase' if model._meta.app_label == "ScenceView": return "webdata" ...
9766fca774c3ffe621b37970eadc241e084e6d66
7a4da5ec2196bf975a9e6115846244788b36b952
/3.7.0/lldb-3.7.0.src/test/expression_command/call-function/TestCallStdStringFunction.py
c36577a54133afe6418d68e03c4acf03aee2a13d
[ "NCSA", "MIT" ]
permissive
androm3da/clang_sles
ca4ada2ec85d625c65818ca9b60dcf1bc27f0756
2ba6d0711546ad681883c42dfb8661b842806695
refs/heads/master
2021-01-10T13:50:25.353394
2016-03-31T21:38:29
2016-03-31T21:38:29
44,787,977
3
0
null
null
null
null
UTF-8
Python
false
false
2,117
py
""" Test calling std::String member functions. """ import unittest2 import lldb import lldbutil from lldbtest import * class ExprCommandCallFunctionTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the li...