hexsha
stringlengths
40
40
size
int64
6
782k
ext
stringclasses
7 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
237
max_stars_repo_name
stringlengths
6
72
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
list
max_stars_count
int64
1
53k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
184
max_issues_repo_name
stringlengths
6
72
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
list
max_issues_count
int64
1
27.1k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
184
max_forks_repo_name
stringlengths
6
72
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
list
max_forks_count
int64
1
12.2k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
6
782k
avg_line_length
float64
2.75
664k
max_line_length
int64
5
782k
alphanum_fraction
float64
0
1
596a73d874c9507c224dc7e444e6170e4300daf1
1,122
py
Python
python_gui_tkinter/Tkinter/TkinterCourse/18_entry_wid_2.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python_gui_tkinter/Tkinter/TkinterCourse/18_entry_wid_2.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python_gui_tkinter/Tkinter/TkinterCourse/18_entry_wid_2.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
''' Okay, we have created Entry fields, so that the user of our program can put in some data. But how can our program access this data? How do we read the content of an Entry? To put it in a nutshell: The get() method is what we are looking for. We extend our little script by two buttons "Quit" and "Show". We bind the...
37.4
388
0.71836
55a9bf7b18622ff60f7bce902ab2b4835720ef7a
2,764
py
Python
quant/markets/market_origin.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
7
2017-10-22T15:00:09.000Z
2019-09-19T11:45:43.000Z
quant/markets/market_origin.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
1
2018-01-19T16:19:40.000Z
2018-01-19T16:19:40.000Z
quant/markets/market_origin.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
5
2017-12-11T15:10:29.000Z
2018-12-21T17:40:58.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- import logging import time import requests from quant import config class Market(object): def __init__(self, base_currency, market_currency, pair_code, fee_rate): self._name = None self.base_currency = base_currency self.market_currency = ma...
29.72043
98
0.568017
757f1d7ece944e70d2ab8ce4b5ae6e3d872e2683
197
py
Python
official_examples/Reinforcement_Learning_GameSolution_Examples/coin/env_config.py
RuichunWang/ModelArts-Lab
cfa9a853e3a76a21eac2818f055b36978ac2bb69
[ "Apache-2.0" ]
1,045
2019-05-09T02:50:43.000Z
2022-03-31T06:22:11.000Z
official_examples/Reinforcement_Learning_GameSolution_Examples/coin/env_config.py
RuichunWang/ModelArts-Lab
cfa9a853e3a76a21eac2818f055b36978ac2bb69
[ "Apache-2.0" ]
1,468
2019-05-16T00:48:18.000Z
2022-03-08T04:12:44.000Z
official_examples/Reinforcement_Learning_GameSolution_Examples/coin/env_config.py
RuichunWang/ModelArts-Lab
cfa9a853e3a76a21eac2818f055b36978ac2bb69
[ "Apache-2.0" ]
1,077
2019-05-09T02:50:53.000Z
2022-03-27T11:05:32.000Z
from gym.spaces import Discrete, Tuple, MultiBinary action_space = { 0: Discrete(2), 1: Discrete(3)} observation_space = { 0: Discrete(4), 1: Tuple((Discrete(4), MultiBinary(3)))}
21.888889
51
0.654822
551c06f1744dabd15f9e37a40a555c94a5037452
666
py
Python
algorithms/sorting/bigger_is_greater.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
algorithms/sorting/bigger_is_greater.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
algorithms/sorting/bigger_is_greater.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
def next_perm(s): # Find the longest non-increasing suffix i = len(s) - 1 while i > 0 and s[i - 1] >= s[i]: i -= 1 if i <= 0: return None # Find successor pivot j = len(s) - 1 while (s[j] <= s[i - 1]): j -= 1 s[i - 1], s[j] = s[j], s[i - 1] # Reverse the s...
15.488372
44
0.468468
b5bcc4fd4367cedf2a22ed3252c6161b2022fc30
2,335
py
Python
Kaggle-Competitions/Santander-Customer-Satisfaction/scripts/blending.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-05-10T09:16:23.000Z
2019-05-10T09:16:23.000Z
Kaggle-Competitions/Santander-Customer-Satisfaction/scripts/blending.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
null
null
null
Kaggle-Competitions/Santander-Customer-Satisfaction/scripts/blending.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-10-14T07:30:18.000Z
2019-10-14T07:30:18.000Z
# -*- coding: utf-8 -*- """ Created on Mon Apr 4 08:38:24 2016 @author: abhishek """ from __future__ import division from sklearn.cross_validation import train_test_split, StratifiedKFold from sklearn.metrics import roc_auc_score from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import Lo...
32.430556
128
0.728051
1ff01c6b33e4f6c418c90d76f57072056b9e3c76
61
py
Python
cs/lambda_cs/07_computer_architecture/notes/672/inst_len_beej.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
cs/lambda_cs/07_computer_architecture/notes/672/inst_len_beej.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/07_computer_architecture/notes/672/inst_len_beej.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
inst_len = ((ir & 0b11000000) >> 6) + 1 # 3 pc += inst_len
20.333333
45
0.540984
2f2f3c911b168324b878aee37092c415bad87f9a
664
py
Python
leetcode/populating-next-right-pointers-in-each-node/rightptr.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
leetcode/populating-next-right-pointers-in-each-node/rightptr.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
leetcode/populating-next-right-pointers-in-each-node/rightptr.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
# Definition for binary tree with next pointer. # class TreeLinkNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # self.next = None class Solution: def connect(self, root): if root is None: return level = [root] ...
27.666667
62
0.503012
85e7aa8a8238a3f8c329ddde35d5fd46f19fd853
726
py
Python
elements/python/6/21/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
elements/python/6/21/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
elements/python/6/21/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
def verify_sudoku(S): rows = [0]*9 cols = [0]*9 blocks = [0]*9 for y, row in enumerate(S): for x, digit in enumerate(row): flag = 1 << digit rows[y] |= flag cols[x] |= flag block_idx = (x//3) + 3*(y//3) blocks[block_idx] |= flag r...
19.621622
76
0.53168
9eab02c462a762afc0a3641e37958d5a7de946ed
2,982
py
Python
scripts/bittle_driver.py
AIWintermuteAI/bittle_ROS
f4baffba737c0ccdb1a52c221094372167e084ac
[ "MIT" ]
28
2020-11-09T21:21:11.000Z
2022-01-16T13:52:43.000Z
scripts/bittle_driver.py
AIWintermuteAI/bittle_ROS
f4baffba737c0ccdb1a52c221094372167e084ac
[ "MIT" ]
null
null
null
scripts/bittle_driver.py
AIWintermuteAI/bittle_ROS
f4baffba737c0ccdb1a52c221094372167e084ac
[ "MIT" ]
5
2020-11-09T05:28:47.000Z
2021-12-14T11:39:40.000Z
#!/usr/bin/env python3 import rospy import serial import struct import sys import time import math from std_msgs.msg import String from geometry_msgs.msg import Twist dir_dict = {1:'kwk', -1:'kbk', 2:'kcrR', 3:'kcrL', 0:'kbalance'} class Driver: def __init__(self, port='/dev/ttyS0'): self.dir = 0 ...
32.413043
103
0.523139
c8af0333cb1cd97a063c95aa5a1113da5ad65156
948
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v7_1/update_bom_base_currency.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_1/update_bom_base_currency.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_1/update_bom_base_currency.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
import frappe from erpnext import get_default_currency def execute(): frappe.reload_doc("manufacturing", "doctype", "bom") frappe.reload_doc("manufacturing", "doctype", "bom_item") frappe.reload_doc("manufacturing", "doctype", "bom_explosion_item") frappe.reload_doc("manufacturing", "doctype", "bom_operation") fr...
47.4
99
0.743671
cda44eccb14e65cd6b6c8d948553bc02cffffe05
810
py
Python
DataStructures/LinkedList/GetNode.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
DataStructures/LinkedList/GetNode.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
DataStructures/LinkedList/GetNode.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
#coding:utf-8 #stupid def GetNode(head, position): prev = None node = head while node: temp = node.next node.next = prev prev = node node = temp cur = node while position: cur = cur.next position -= 1 return cur.data def GetNode_smart(head, ...
18.837209
44
0.539506
b59a85e0679ef5e789c65a32dbb7ea8739c59404
1,221
py
Python
Tutorials/Statistics/Binomial_Distribution2.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Tutorials/Statistics/Binomial_Distribution2.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Tutorials/Statistics/Binomial_Distribution2.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
#https://www.geeksforgeeks.org/python-binomial-distribution/ #https://www.hackerrank.com/challenges/s10-binomial-distribution-1/tutorial import sys import scipy.stats import matplotlib.pyplot as plt def fact(x,memo={}): # factorial of x! = x * (x-1) * (x-2) * ..... 2 * 1 if x in memo: return memo[x] ...
20.694915
75
0.619165
a977be85bab7a9e18dcb547d3fcb7133143fe1b7
13,784
py
Python
code/logic/iDog_sm.py
dieterpl/iDogstra
62ee246763e107335b9caf0a4f96239fa0953234
[ "MIT" ]
null
null
null
code/logic/iDog_sm.py
dieterpl/iDogstra
62ee246763e107335b9caf0a4f96239fa0953234
[ "MIT" ]
null
null
null
code/logic/iDog_sm.py
dieterpl/iDogstra
62ee246763e107335b9caf0a4f96239fa0953234
[ "MIT" ]
null
null
null
from logic.statemachine import * from utils.functions import current_time_millis from sensors.bluetooth import bluetooth, bluetooth_pipelines from sensors import pipeline from sensors.camera import camera, camera_pipelines from sensors.ultrasonic import ultrasonic_pipelines, ultrasonic from sensors.infrared import infr...
38.719101
126
0.622896
279a587bbfa9bde545b575017b785db494f2642d
117
py
Python
main.py
Sourabh-Kishore-Sharma/Megahack-DualSpecs
1b51f141bbab2e99e85eb8e4eb343518c16e57ea
[ "MIT" ]
null
null
null
main.py
Sourabh-Kishore-Sharma/Megahack-DualSpecs
1b51f141bbab2e99e85eb8e4eb343518c16e57ea
[ "MIT" ]
null
null
null
main.py
Sourabh-Kishore-Sharma/Megahack-DualSpecs
1b51f141bbab2e99e85eb8e4eb343518c16e57ea
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os os.system("./extract.py") os.system("./transform.py") os.system("./visualize.py")
14.625
27
0.675214
fd8f2fdc448396f3d1132e896279d792fd790bf9
2,281
py
Python
lib/dataset/voc.py
tamasino52/FCN
f904791cf2d3720fbd2e12e1345639fc9af9fc54
[ "MIT" ]
null
null
null
lib/dataset/voc.py
tamasino52/FCN
f904791cf2d3720fbd2e12e1345639fc9af9fc54
[ "MIT" ]
null
null
null
lib/dataset/voc.py
tamasino52/FCN
f904791cf2d3720fbd2e12e1345639fc9af9fc54
[ "MIT" ]
null
null
null
import torch.utils.data.dataset import torchvision from torchvision.transforms import transforms import torchvision.transforms.functional as TF from tensorboardX import SummaryWriter import argparse import os import pprint import logging import json import _init_paths import dataset from tqdm import tqdm import numpy a...
21.932692
84
0.591846
fde69d85e013d403e3c31904341db9f8acfdc9c6
2,506
py
Python
test/test_npu/test_network_ops/test_repeat.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_network_ops/test_repeat.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_network_ops/test_repeat.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, Huawei Technologies.All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law...
40.419355
74
0.565044
d045614e2c17d1561b1e1a831d16ee1968c89893
359
py
Python
DataStructures/LinkedList/TailInsert.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
DataStructures/LinkedList/TailInsert.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
DataStructures/LinkedList/TailInsert.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
#coding:utf-8 #stupid def Insert(head, data): if head: node = head while node.next: node = node.next node.next = Node(data) else: head = Node(data) return head #smart def Insert(head, data): node = head while node.next: node = node.next node....
16.318182
30
0.543175
d0a14e2cf234ee3e63c43ce6db0df997aec26cc4
2,680
py
Python
base/weixin.py
francisar/wechat
8932feb4aacc6df27a472e3278780fcdd41bc47c
[ "MIT" ]
null
null
null
base/weixin.py
francisar/wechat
8932feb4aacc6df27a472e3278780fcdd41bc47c
[ "MIT" ]
null
null
null
base/weixin.py
francisar/wechat
8932feb4aacc6df27a472e3278780fcdd41bc47c
[ "MIT" ]
null
null
null
#coding=utf-8 import hashlib from django.http import HttpResponse from django.views.generic import View from django.core.exceptions import PermissionDenied from django.views.decorators.csrf import csrf_protect,csrf_exempt from bs4 import BeautifulSoup from wechat.settings import WX_TOKEN,WX_EncodingAESKey,WX_messageCr...
40
120
0.658582
d0a6e7f469e95cb17a63d0e1bc0201859c6d3521
3,087
py
Python
Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/ocslock.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/ocslock.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/ocslock.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
# Copyright (C) Microsoft Corporation. All rights reserved. # This program is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. import ocs...
27.810811
85
0.589569
ef8fe8ef79b93e95de904a03595f7675d1d24189
10,604
py
Python
python/en/archive/dropbox/setting_fonts/matplotlib-setting_korean_font.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/setting_fonts/matplotlib-setting_korean_font.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/setting_fonts/matplotlib-setting_korean_font.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ matplotlib-setting_korean_font.py matplotlib 한글폰트 사용하기 http://corazzon.github.io/matplotlib_font_setting """ import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.font_manager as fm import os import numpy as np # Generate a random data data = np...
46.305677
113
0.705488
deaf053f85c9f35a2ff38d108356c9de2da3b548
5,088
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/assign/inputs.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
4
2020-11-13T02:35:56.000Z
2021-03-29T20:15:54.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/assign/inputs.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
9
2020-12-09T02:12:39.000Z
2021-02-18T00:15:28.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/assign/inputs.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2007-2020 German Aerospace Center (DLR) and others. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at # https://www.eclipse.org/legal/epl-2....
39.75
107
0.578027
5f305b87a9bc943f44bb3ad914453b31c282295a
3,117
py
Python
NeuralNet/Alex/dataloader/loader.py
alex-ta/Fontinator
7ca9effe3b61ded032176557520127e1d4b7a5ef
[ "Apache-2.0" ]
6
2017-04-12T14:05:19.000Z
2021-01-29T11:23:50.000Z
NeuralNet/Alex/dataloader/loader.py
alex-ta/Fontinator
7ca9effe3b61ded032176557520127e1d4b7a5ef
[ "Apache-2.0" ]
null
null
null
NeuralNet/Alex/dataloader/loader.py
alex-ta/Fontinator
7ca9effe3b61ded032176557520127e1d4b7a5ef
[ "Apache-2.0" ]
null
null
null
# load dataset from file from os import listdir from os.path import isfile, join, basename import numpy as np import cv2 # data class class Data: def __init__(self): self.data = [] def set_name(self, val): self.name = val def set_label(self, val): self.label = val def set_data(...
28.081081
82
0.598011
f84817263c0bc8b1fb40aae3a117cefb65e7e658
5,321
py
Python
Shmup_04.py
rogiko2670/Shmup_04
12fb6236145e91324dd1aa96a05a7daf5898d8bc
[ "CC0-1.0" ]
null
null
null
Shmup_04.py
rogiko2670/Shmup_04
12fb6236145e91324dd1aa96a05a7daf5898d8bc
[ "CC0-1.0" ]
null
null
null
Shmup_04.py
rogiko2670/Shmup_04
12fb6236145e91324dd1aa96a05a7daf5898d8bc
[ "CC0-1.0" ]
null
null
null
###################################### # # ***SHMUP_03*** # # 01 player sprite and controles # 02 enemy sprites # 03 colision (and bullits) # 04 adding graphics # ##################################### import pygame import random from os import path # path to images img_dir = path.join(p...
29.726257
96
0.554783
e46071b1d37a0715065931084812f43ec7c0f278
3,039
py
Python
app.py
isLXa/db
e2d111b81a9bf276d6cf53a7ccdaf3752217a404
[ "Apache-2.0" ]
null
null
null
app.py
isLXa/db
e2d111b81a9bf276d6cf53a7ccdaf3752217a404
[ "Apache-2.0" ]
null
null
null
app.py
isLXa/db
e2d111b81a9bf276d6cf53a7ccdaf3752217a404
[ "Apache-2.0" ]
null
null
null
from datetime import datetime from flask import Flask from flask import Response from flask import request from flask import render_template import pymysql import json import datetime app = Flask(__name__) conn = pymysql.connect("127.0.0.1", "root", "123456", "board") cursor = conn.cursor() @app.route('/') def hel...
31.65625
115
0.664034
5fcbc1d3815acedfe5e41e767211c3f4fe04e223
2,731
py
Python
IdeaProjects/crap/tuchong.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
1
2018-12-30T14:07:42.000Z
2018-12-30T14:07:42.000Z
IdeaProjects/crap/tuchong.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
IdeaProjects/crap/tuchong.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
#-*- encoding: utf-8 -*- ''''' Created on 2015-7-30 @author: Miko ''' import urllib.request import urllib,re,sys,os,time import uuid #获取二级页面url def findUrl2(html): # https://aisimu.tuchong.com/15583275/?rqt_id= print(html) #re1 = r'https://aisimu.tuchong.com/\d+/\?rqt_id=' re1 = 'https://aisimu.tuchong....
33.716049
128
0.586964
ffcb189d30960fdb402d4e4f963c402bdf407c10
9,157
py
Python
research/cv/FaceAttribute/infer/sdk/python_faceattribute/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/FaceAttribute/infer/sdk/python_faceattribute/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/FaceAttribute/infer/sdk/python_faceattribute/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
""" Copyright 2021 Huawei Technologies Co., Ltd 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 in writing...
39.640693
104
0.592989
ffe4ef548d579693b795d88bf214acba7a095483
342
py
Python
BigData_exp/exp2/0203/0203.py
DolorHunter/hfut-exp-archived
c67e26c1f4fba550c8974eaba10dfa302b928868
[ "BSD-2-Clause" ]
12
2020-12-07T05:49:05.000Z
2022-03-25T09:09:36.000Z
BigData_exp/exp2/0203/0203.py
DolorHunter/hfut-exp
c67e26c1f4fba550c8974eaba10dfa302b928868
[ "BSD-2-Clause" ]
null
null
null
BigData_exp/exp2/0203/0203.py
DolorHunter/hfut-exp
c67e26c1f4fba550c8974eaba10dfa302b928868
[ "BSD-2-Clause" ]
1
2021-01-08T08:53:53.000Z
2021-01-08T08:53:53.000Z
''' FileName: 0203.py Auther: Wang Zixiang Date: 04.20.2019 Function: draw a func ''' import matplotlib.pyplot as plt import numpy as np def draw(): x = np.linspace(-5, 5, 1000) y = [np.arcsin(i)/np.tan(x) for i in x] plt.plot(x, y) plt.show() def main(): draw() if __name__ == ...
13.68
43
0.578947
084d96fb5e68ee0e345afb6e0e5f5a380d1291a8
2,150
py
Python
cli.py
kelayamatoz/BiDAF-TBA
82a425c10f08d65814696955cf072da21c329f90
[ "BSD-2-Clause" ]
null
null
null
cli.py
kelayamatoz/BiDAF-TBA
82a425c10f08d65814696955cf072da21c329f90
[ "BSD-2-Clause" ]
null
null
null
cli.py
kelayamatoz/BiDAF-TBA
82a425c10f08d65814696955cf072da21c329f90
[ "BSD-2-Clause" ]
null
null
null
import os from argparse import ArgumentParser from train import train def get_args(): parser = ArgumentParser(description='PyTorch BIDAF model') # directories and data parser.add_argument('--save_path', type=str, default='results') parser.add_argument('--data_cache', type=str, default=os.path.join(os.g...
44.791667
120
0.700465
f2c96810704e1ecbfc25ac1bb4ccf1c3b434e2aa
10,124
py
Python
python/tests/test_sbml2sbtab.py
derHahn/SBtab
da998eacc49f7f29d8168be366eb0c211c3adb5f
[ "MIT" ]
4
2015-02-20T09:20:10.000Z
2018-02-05T10:54:10.000Z
python/tests/test_sbml2sbtab.py
tlubitz/SBtab
da998eacc49f7f29d8168be366eb0c211c3adb5f
[ "MIT" ]
80
2018-04-13T13:46:24.000Z
2022-02-16T16:01:46.000Z
python/tests/test_sbml2sbtab.py
tlubitz/SBtab
da998eacc49f7f29d8168be366eb0c211c3adb5f
[ "MIT" ]
6
2018-06-06T19:55:32.000Z
2021-09-30T15:16:40.000Z
#!/usr/bin/env python import unittest import sys import os import copy import libsbml sys.path.insert(0,os.path.join(os.path.dirname(__file__), '..')) import SBtab import sbml2sbtab class TestSBMLConversion(unittest.TestCase): def setUp(self): ''' setup SBtabTable class with files from test dire...
51.917949
115
0.546227
4bb47658d3244f27e1f1de1b2985c4f2fb9d279b
515
py
Python
Curso_Python/Secao2-Python-Basico-Logica-Programacao/29_indices_fatimaneto_strings/29_indices_fatimaneto_strings.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/29_indices_fatimaneto_strings/29_indices_fatimaneto_strings.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/29_indices_fatimaneto_strings/29_indices_fatimaneto_strings.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
""" Manipulando strings - aula 30 * String indices * Fatiamento de strings [inicio:fim:passo] * Funções buit-in len, abs, type, print, etc... essas funçoes pode ser usadas diretamente em cada tipo. """ # positivos [12345678] texto = 'Python s2' # negativos -[98765432] print(texto[5]) #acessa apenas esse inde...
34.333333
86
0.708738
d9ad11bb1309cc7d47195aebdbb3b3be25a6197b
341
py
Python
Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/09-Relationships/main.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/09-Relationships/main.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/09-Relationships/main.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
from fastapi import FastAPI from . import models from .database import engine from .routers import post, user, auth models.Base.metadata.create_all(bind=engine) app = FastAPI() app.include_router(post.router) app.include_router(user.router) app.include_router(auth.router) @app.get("/") def root(): return {"de...
17.947368
44
0.750733
8aaae68c1af2b0f7ae10c33d57223d8e4d6f3176
27,200
py
Python
huTools/_jsonlib.py
gadventures/huTools
8bc58d63491bcd3cfc3e78d219be703d943ffeb5
[ "BSD-3-Clause" ]
null
null
null
huTools/_jsonlib.py
gadventures/huTools
8bc58d63491bcd3cfc3e78d219be703d943ffeb5
[ "BSD-3-Clause" ]
null
null
null
huTools/_jsonlib.py
gadventures/huTools
8bc58d63491bcd3cfc3e78d219be703d943ffeb5
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2008-2009 John Millikin <jmillikin@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # any later version. # # This program is distr...
31.775701
85
0.572316
6a818f5582e99023c4f58f8d48a341fc7fc65c41
15,378
py
Python
myems-normalization/offlinemeter.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
82
2021-02-19T10:24:31.000Z
2022-03-28T06:30:18.000Z
myems-normalization/offlinemeter.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
188
2021-02-22T07:08:30.000Z
2022-03-02T04:11:03.000Z
myems-normalization/offlinemeter.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
54
2021-02-19T08:48:46.000Z
2022-03-30T06:21:34.000Z
import time from datetime import datetime, timedelta import mysql.connector from openpyxl import load_workbook from decimal import Decimal import config ################################################################################################################ # PROCEDURES: # STEP 1: get all 'new' offline meter f...
48.819048
120
0.414618
6ab9f4da39b4ce79c0f1c8f8305ad17d8320ee00
1,316
py
Python
AP_SS16/402/python/old/calculations.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
3
2016-04-27T17:07:00.000Z
2022-02-02T15:43:15.000Z
AP_SS16/402/python/old/calculations.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
5
2016-04-27T17:10:03.000Z
2017-06-20T14:54:20.000Z
AP_SS16/402/python/old/calculations.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
null
null
null
import numpy as np def Z(omega, L, C): """Berechnet Wellenwiderstand für homogene Kette""" return np.sqrt(L / C) * 1 / np.sqrt(1 - 1 / 4 * omega**2 * L * C) def Z_C1C2(L, C1, C2): """Berechnet Wellenwiderstand für Kette mit wechselnden C1 - C2 - Gliedern für Omega=0""" return np.sqrt(2 * L / (C1 + C...
21.57377
93
0.572948
7c3699de027eadc32a1094426d86e06a3b5135a2
4,180
py
Python
Packs/AzureLogAnalytics/Integrations/AzureLogAnalytics/AzureLogAnalytics_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/AzureLogAnalytics/Integrations/AzureLogAnalytics/AzureLogAnalytics_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/AzureLogAnalytics/Integrations/AzureLogAnalytics/AzureLogAnalytics_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from AzureLogAnalytics import Client, execute_query_command, list_saved_searches_command, tags_arg_to_request_format MOCKED_SAVED_SEARCHES_OUTPUT = { 'value': [ { 'id': 'mocked_id/mocked_saved_search', 'etag': 'mocked_etag', 'properties': { 'displayName':...
29.857143
116
0.564593
8100285b7de73c38c99ecdf496152cb38e0939e9
19
py
Python
Licence 2/I33/TP 2/ex_8.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 2/I33/TP 2/ex_8.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 2/I33/TP 2/ex_8.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
def ord(a,n): pass
9.5
13
0.631579
8140cfcc63ba1cc71656743a66c8a712d3da7e27
78
py
Python
pelican/plugins/myst/signals.py
noirbizarre/pelican-myst
c2c7b44803ebc33e70d915c35b692df14597469b
[ "MIT" ]
null
null
null
pelican/plugins/myst/signals.py
noirbizarre/pelican-myst
c2c7b44803ebc33e70d915c35b692df14597469b
[ "MIT" ]
21
2021-12-21T16:47:35.000Z
2022-03-29T04:34:59.000Z
pelican/plugins/myst/signals.py
noirbizarre/pelican-myst
c2c7b44803ebc33e70d915c35b692df14597469b
[ "MIT" ]
null
null
null
from blinker import signal myst_yaml_register = signal("myst_yaml_register")
19.5
49
0.833333
d4979e21dc2950c71742bb89f6674cad27317fae
729
py
Python
AdvancePython-master/chapter05/list_gen.py
xuyifeiCoco/python
83af27b3baf1caf157b330c580f356a94095e44d
[ "MIT" ]
26
2019-09-17T12:48:36.000Z
2022-02-24T12:27:01.000Z
AdvancePython-master/chapter05/list_gen.py
xuyifeiCoco/python
83af27b3baf1caf157b330c580f356a94095e44d
[ "MIT" ]
2
2021-03-25T22:00:07.000Z
2022-01-20T15:51:48.000Z
coding-200/chapter05/list_gen.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
20
2019-05-31T14:21:00.000Z
2021-07-27T15:58:25.000Z
#用简介的方式去遍历可迭代对象生成需要格式的列表 int_list = [1,2,3,4,5] qu_list = [item * item for item in int_list] print (type(qu_list)) int_list = [1,2,-3,4,5] qu_list = [item if item > 0 else abs(item) for item in int_list] #笛卡尔积 int_list1 = [1,2] int_list2 = [3,4] qu_list = [(first, second) for first in int_list1 for second in int_li...
19.184211
74
0.663923
d4c2fcb4003f234e23845d0c22fe7109d0442b96
2,670
py
Python
pyind/crossover.py
chankane/pyind
742bc671d3552d778024662867b64e32ae9bca9d
[ "MIT" ]
null
null
null
pyind/crossover.py
chankane/pyind
742bc671d3552d778024662867b64e32ae9bca9d
[ "MIT" ]
null
null
null
pyind/crossover.py
chankane/pyind
742bc671d3552d778024662867b64e32ae9bca9d
[ "MIT" ]
null
null
null
import numpy as np def p2(ind0, ind1): """ Two-point crossover Parameters ---------- ind0 : ndarray Father ind1 : ndarray Mother Returns ------- chil : ndarray Child """ sta, end = _cre_sta_end(len(ind0)) return ( np.concatenate((ind0[...
20.859375
65
0.511236
d4cfb4912f770d5961316a22559e49f5926173ed
3,110
py
Python
PlaidCTF/2020/misc/BonziScheme/app/bonzi/acsutil.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
PlaidCTF/2020/misc/BonziScheme/app/bonzi/acsutil.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
PlaidCTF/2020/misc/BonziScheme/app/bonzi/acsutil.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
from bonzi.acsparse import * import struct def create_acs_string(s): acs_string = struct.pack("<I", len(s)) if len(s) != 0: acs_string += s.encode('utf-16le') + b"\x00\x00" return acs_string def replace_locator(old_acs, old_loc, data_offset, shift_size): # Data is inserted after wh...
39.367089
137
0.718006
ed27b4b5741c268aac1d9109c0b47fa891a35469
650
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/solutions/ex01_contains.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/solutions/ex01_contains.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/solutions/ex01_contains.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden def contains_all(values, search_for): for current in search_for: if not current in values: return False return True def contains_all_v2(values, search_for): return all(elem in values for elem in s...
23.214286
67
0.598462
9c21e153ea47afdaa6d0a12b8c9953bbd24ab58a
2,204
py
Python
frappe-bench/env/lib/python2.7/site-packages/stdnum/hr/oib.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/stdnum/hr/oib.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/stdnum/hr/oib.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# cnp.py - functions for handling Croatian OIB numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 o...
32.895522
76
0.725953
9c68855d62a5a54ba542728b57292f32cad1c3a2
4,304
py
Python
tests/unit/samplers/test_voxelgrid_samplers.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
1,142
2016-10-10T08:55:30.000Z
2022-03-30T04:46:16.000Z
tests/unit/samplers/test_voxelgrid_samplers.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
195
2016-10-10T08:30:37.000Z
2022-02-17T12:51:17.000Z
tests/unit/samplers/test_voxelgrid_samplers.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
215
2017-02-28T00:50:29.000Z
2022-03-22T17:01:31.000Z
import pytest from pyntcloud.samplers import ( VoxelgridCentersSampler, VoxelgridCentroidsSampler, VoxelgridNearestSampler, VoxelgridHighestSampler ) from pyntcloud.utils.array import point_in_array_2D @pytest.mark.parametrize("n_x, n_y, n_z,expected_n,expected_point", [ ( 2, 2, 2, ...
26.9
120
0.647305
13d27224bcd7c29e95ed6347f4fd0f98ec826875
15,147
py
Python
AP4/sst_segmenter.py
TensorVision/MediSeg
222fcab98d82f48f09304eda3cfbfe4d6ac825b7
[ "MIT" ]
6
2016-08-15T17:57:45.000Z
2019-03-19T05:08:29.000Z
AP4/sst_segmenter.py
TensorVision/MediSeg
222fcab98d82f48f09304eda3cfbfe4d6ac825b7
[ "MIT" ]
10
2016-04-11T10:20:34.000Z
2016-08-09T21:47:48.000Z
AP4/sst_segmenter.py
TensorVision/MediSeg
222fcab98d82f48f09304eda3cfbfe4d6ac825b7
[ "MIT" ]
7
2016-06-21T04:08:58.000Z
2018-09-01T14:02:40.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Get patches of the raw image as input.""" import json import os import numpy as np import logging import sys import time logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO, stream=sys.stdout) ...
35.978622
83
0.511983
13e66e49334f0444f0e07e5da040c9f73306be96
4,824
py
Python
solutions/graph_based_recommend/webserver/src/pinsage/builder.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
2
2020-08-08T02:58:14.000Z
2020-08-08T04:57:35.000Z
solutions/graph_based_recommend/webserver/src/pinsage/builder.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
solutions/graph_based_recommend/webserver/src/pinsage/builder.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
1
2021-03-09T12:42:46.000Z
2021-03-09T12:42:46.000Z
"""Graph builder from pandas dataframes""" from collections import namedtuple from pandas.api.types import is_numeric_dtype, is_categorical_dtype, is_categorical import dgl __all__ = ['PandasGraphBuilder'] def _series_to_tensor(series): if is_categorical(series): return torch.LongTensor(series.cat.codes.v...
40.537815
89
0.575871
b94a5ef511bc611709ce561e3821a8e6985c5cf6
7,693
py
Python
StoryTellingGame/app.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
StoryTellingGame/app.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
StoryTellingGame/app.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function from sys import stderr __authors__ = ['Khyber Sen', 'Caleb Smith-Salzburg', 'Michael Ruvinshteyn', 'Terry Guan'] __date__ = '2017-10-30' from typing import Callable import os from flask import \ Flask, \ render_template, \ request, \ flash, \ ...
27.377224
91
0.620174
e03e4234528ad73e52993d5a5c6dab99dd7683b4
3,590
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/source_control/gitlab/test_gitlab_project.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/source_control/gitlab/test_gitlab_project.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/source_control/gitlab/test_gitlab_project.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import import pytest from ansible_collections.community.general.plugins.modules.source_control.gitlab.git...
34.519231
136
0.716435
1608db79b81cee1b0f02c56ad2bf15b2b15011a0
412
py
Python
IVTp/2014/TITOV_S_G/task_2_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTp/2014/TITOV_S_G/task_2_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTp/2014/TITOV_S_G/task_2_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 2. Вариант 22. # Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Демокрит. Не забудьте о том, что автор должен быть упомянут на отдельной строке. # Titov S.G. # 14.03.2016 print ("Свободным я считаю того, кто ни на что не надеется и ничег...
37.454545
201
0.747573
169f4d8513bb429a6414c31960c1fc0b703a915d
1,632
py
Python
spark_streaming_wordcounts/spark_streaming_workgenerator.py
xiaolifeipiao/xiaolifeipiao-spark-integrated-curriculum
f9b502ac4a7bd8663005f1bfd2c8ebec5bce9e74
[ "Apache-2.0" ]
6
2021-11-11T01:06:08.000Z
2021-11-18T02:45:25.000Z
spark_streaming_wordcounts/spark_streaming_workgenerator.py
xiaolifeipiao/xiaolifeipiao-spark-integrated-curriculum
f9b502ac4a7bd8663005f1bfd2c8ebec5bce9e74
[ "Apache-2.0" ]
null
null
null
spark_streaming_wordcounts/spark_streaming_workgenerator.py
xiaolifeipiao/xiaolifeipiao-spark-integrated-curriculum
f9b502ac4a7bd8663005f1bfd2c8ebec5bce9e74
[ "Apache-2.0" ]
null
null
null
import random import time import shutil import os from pyspark import SparkContext sc = SparkContext('local','spark_streaming_wordcounts') def my_mkdir(dir_path): if os.path.exists(dir_path): return dir_path else: try: os.mkdir(dir_path) except: print(dir_path, ...
26.322581
57
0.597426
4c31871f9cfe2cab72ba18f2cc5b5ae488672f88
586
py
Python
official/nlp/lstm/infer/sdk/utils/__init__.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/nlp/lstm/infer/sdk/utils/__init__.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/nlp/lstm/infer/sdk/utils/__init__.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# coding = utf-8 """ Copyright 2021 Huawei Technologies Co., Ltd Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://opensource.org/licenses/BSD-3-Clause Unless required by applicable law or agreed ...
34.470588
72
0.784983
fc7214dd240b397f29c753a930f38d862dd6f5a7
237
py
Python
Algorithms/Bit_Manipulation/lonely_integer.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Bit_Manipulation/lonely_integer.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Bit_Manipulation/lonely_integer.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from collections import Counter n = int(input()) c = list(map(int, input().strip().split())) cnt = Counter() for n in c: cnt[n] += 1 for k, v in cnt.items(): if v == 1: print(k) continue
15.8
43
0.565401
5d30d7d16d9507bb56c1268d6cb6216a3c110b04
4,223
py
Python
rasa/nlu/extractors/entity_synonyms.py
isaac-philip/rasa
923db75e03921921a6f1f3489a2c5574138ee685
[ "Apache-2.0" ]
5
2020-08-28T06:44:31.000Z
2021-03-14T18:46:01.000Z
rasa/nlu/extractors/entity_synonyms.py
alfredfrancis/rasa
d8d226408f20cc2563c3aefbccef3e364a447666
[ "Apache-2.0" ]
71
2020-08-25T02:46:08.000Z
2022-03-01T13:23:38.000Z
rasa/nlu/extractors/entity_synonyms.py
alfredfrancis/rasa
d8d226408f20cc2563c3aefbccef3e364a447666
[ "Apache-2.0" ]
3
2019-02-27T10:13:16.000Z
2019-07-26T08:33:45.000Z
import os from typing import Any, Dict, Optional, Text from rasa.constants import DOCS_URL_TRAINING_DATA_NLU from rasa.nlu.constants import ENTITIES from rasa.nlu.config import RasaNLUModelConfig from rasa.nlu.extractors.extractor import EntityExtractor from rasa.nlu.model import Metadata from rasa.nlu.training_data i...
37.371681
88
0.607151
537a4dcefcb5461b11ef0e31030c8f2fc90646a6
4,799
py
Python
python_experiments/paper_figures/vldbj/draw_query_time.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
8
2020-04-14T23:17:00.000Z
2021-06-21T12:34:04.000Z
python_experiments/paper_figures/vldbj/draw_query_time.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
null
null
null
python_experiments/paper_figures/vldbj/draw_query_time.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
1
2021-01-17T16:26:50.000Z
2021-01-17T16:26:50.000Z
from data_analysis.vldbj_data_parsing.probesim_querying_time_statistics import probesim_tag from paper_figures.vldbj.draw_indexing_time_size import * from data_analysis.vldbj_data_parsing.querying_time_accuracy_statistics import * from data_analysis.vldbj_data_parsing.generate_speedup_over_sling_markdown import get_cpu...
41.37069
117
0.625755
54e278d1203b45ef7a7cf18fd3c341779380e7e2
11,151
py
Python
graphs/graphs/DIP/DIPgaussVAE_graph.py
kkahloots/Generative-Models-03
5399fb8a504543b0a4196a81b182ead79ee247df
[ "MIT" ]
null
null
null
graphs/graphs/DIP/DIPgaussVAE_graph.py
kkahloots/Generative-Models-03
5399fb8a504543b0a4196a81b182ead79ee247df
[ "MIT" ]
null
null
null
graphs/graphs/DIP/DIPgaussVAE_graph.py
kkahloots/Generative-Models-03
5399fb8a504543b0a4196a81b182ead79ee247df
[ "MIT" ]
null
null
null
""" DIPgaussVAE_graph.py: Tensorflow Graph for the DIP Gaussian Variational Autoencoder """ __author__ = "Khalid M. Kahloot" __copyright__ = "Copyright 2019, Only for professionals" __paper__ = "https://openreview.net/pdf?id=H1kG7GZAW" import tensorflow as tf import bases.losses as losses from bases...
54.395122
161
0.555914
54f4c90b83cd5587ec7d719d1475c7ee942b7002
265
py
Python
zencad/examples/2.Operations/unify.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
5
2018-04-11T14:11:40.000Z
2018-09-12T19:03:36.000Z
zencad/examples/2.Operations/unify.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
zencad/examples/2.Operations/unify.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 from zencad import * m = circle(10) + square(17, center=True) m0 = m m1 = unify(m) m2 = m.extrude(10) m3 = unify(m).extrude(10) display(m0) display(m1.right(30)) display(m2.forw(30)) display(m3.right(30).forw(30)) show()
13.947368
40
0.660377
dbda3afdf11e6becbcff7e6a7ef571ca1d5f4590
2,307
py
Python
src/using_tips/python_program_design.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/using_tips/python_program_design.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/using_tips/python_program_design.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ 1.在模块的层次结构图中,箭头表示——信息流 2.自顶向下设计主要由下列哪个实现——函数 3.类方法中定义了四个参数,这种情况下实际上有多少参数——不确定 4.下列哪条表达式可以创建一条从点(2,3)到(4,5)的线段—— Line(Point(2,3), Point(4,5)) 5.color_rgb(0,255,255)表示的是什么颜色——青色 6.对于字典dic={‘abc’:123, ‘def’:456, ’ghi’:789}, len(dic) 的结果为——3 7.选出对下列语句不符合语法要求的表达式: for var...
16.246479
243
0.723017
91994780a85b157b165276e6600c2340e5e27fe9
1,362
py
Python
coco2yolov5-converter/tests/converter/test_convert_util.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
coco2yolov5-converter/tests/converter/test_convert_util.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
coco2yolov5-converter/tests/converter/test_convert_util.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
# disabling PyLint docstring, no self using # pylint: disable=C0115,C0116,R0201 from src.converter.convert_util import convertRelCoco2Yolo, fix_coordinate_system class TestConvert: def test_convert_rel_coco_2_yolo_accepts_float(self): """ check """ result = convertRelCoco2Yolo(0.0, 0.0, 0.0, 0.0)...
41.272727
130
0.602056
72a4fedd86d81500253f22ba8342157129774fb9
560
py
Python
lat/lightcurve.py
Omaam/lat
bb72c43fc870a36e26a32b05000d091871e07ad5
[ "MIT" ]
null
null
null
lat/lightcurve.py
Omaam/lat
bb72c43fc870a36e26a32b05000d091871e07ad5
[ "MIT" ]
null
null
null
lat/lightcurve.py
Omaam/lat
bb72c43fc870a36e26a32b05000d091871e07ad5
[ "MIT" ]
null
null
null
"""FitsLightCurve class. """ from absl import logging from astropy.table import Table class FitsLightCurve: """ This class could calculate some fundamental calcuration """ def __init__(self, lcname_fits, energy_range=None, dt=None): self.table = Table.read(lcname_fits, format="fits") ...
20.740741
64
0.658929
beace98180a50242f49424347b9855e1e1a1f5fc
1,834
py
Python
utils.py
isadrtdinov/StarGAN
bdb33310817854802ebc6356b28303616f23060a
[ "MIT" ]
null
null
null
utils.py
isadrtdinov/StarGAN
bdb33310817854802ebc6356b28303616f23060a
[ "MIT" ]
null
null
null
utils.py
isadrtdinov/StarGAN
bdb33310817854802ebc6356b28303616f23060a
[ "MIT" ]
null
null
null
import random import numpy as np import torch from torchvision.utils import make_grid def set_random_seed(seed): torch.backends.cudnn.deterministic = True torch.manual_seed(seed) torch.cuda.manual_seed(seed) random.seed(seed) np.random.seed(seed) def permute_labels(src_labels): rand_perm = t...
32.75
79
0.678844
beb9c76f87674587f48640ae891ea4a39c831acc
190
py
Python
ZbjDjChannels/chatsolo/urls.py
zbjlala/ZbjDjChannels
c4da2339574e2e398bd452eef4d026eab309752c
[ "MIT" ]
null
null
null
ZbjDjChannels/chatsolo/urls.py
zbjlala/ZbjDjChannels
c4da2339574e2e398bd452eef4d026eab309752c
[ "MIT" ]
null
null
null
ZbjDjChannels/chatsolo/urls.py
zbjlala/ZbjDjChannels
c4da2339574e2e398bd452eef4d026eab309752c
[ "MIT" ]
null
null
null
from django.conf.urls import url from chatsolo import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^(?P<user_id>[^/]+)/$', views.soloroom, name='soloroom'), ]
23.75
67
0.636842
fe2914494a41d7260683334346fcfce4052bb2d7
492
py
Python
util.py
marwanad/music_bot
c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf
[ "MIT" ]
1
2020-12-07T13:30:59.000Z
2020-12-07T13:30:59.000Z
util.py
marwanad/music_bot
c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf
[ "MIT" ]
null
null
null
util.py
marwanad/music_bot
c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf
[ "MIT" ]
null
null
null
import string import re from fuzzywuzzy import fuzz def guess_matches_answer(guess, answer): regex = re.compile('[%s]' % re.escape(string.punctuation)) guess_no_punc = regex.sub('', guess).strip().lower() answer_no_punc = regex.sub('', answer).strip().lower() answer_no_dash = answer_no_punc.split('-')[...
32.8
62
0.70122
fe1cfc0c370e71d7c7f6e2adb53671013010bfeb
2,280
py
Python
app.py
nelsonrds/job_finder
6a31f8c96ce6a417f14dc02b73ff977c2f150410
[ "MIT" ]
null
null
null
app.py
nelsonrds/job_finder
6a31f8c96ce6a417f14dc02b73ff977c2f150410
[ "MIT" ]
null
null
null
app.py
nelsonrds/job_finder
6a31f8c96ce6a417f14dc02b73ff977c2f150410
[ "MIT" ]
null
null
null
import requests from flask import Flask, render_template, request, redirect app = Flask(__name__) url = "https://jobs.github.com/positions.json?description=python&location=new+york" req = requests.get(url) json_form = req.json() class Job: def __init__(self, job_id, job_type, job_url, created_at, company, com...
29.61039
127
0.603947
431fd74e2a36acf7ed289d8b9f3b07eda25ab183
3,082
py
Python
autologin/ht_clienttrader.py
pchaos/wanggejiaoyi
60242d465bf10d4be46ee6eafc99557affc2a52e
[ "MIT" ]
15
2018-05-16T02:39:01.000Z
2021-05-22T13:12:55.000Z
autologin/ht_clienttrader.py
pchaos/wanggejiaoyi
60242d465bf10d4be46ee6eafc99557affc2a52e
[ "MIT" ]
null
null
null
autologin/ht_clienttrader.py
pchaos/wanggejiaoyi
60242d465bf10d4be46ee6eafc99557affc2a52e
[ "MIT" ]
9
2018-05-16T00:47:34.000Z
2021-11-26T05:39:48.000Z
# -*- coding: utf-8 -*- """ ------------------------------------------------- @File : ht_clienttrader.py.py Description : @Author : pchaos date: 18-4-16 ------------------------------------------------- Change Activity: 18-4-16: @Contact : p19992003#gmail.com -----------------------...
29.92233
77
0.536989
4a6a2a042eb9ff5a6b4abf47925632916d3a9060
1,488
py
Python
tests/test_metrics.py
Matheus158257/projects
26a6148046533476e625a872a2950c383aa975a8
[ "Apache-2.0" ]
null
null
null
tests/test_metrics.py
Matheus158257/projects
26a6148046533476e625a872a2950c383aa975a8
[ "Apache-2.0" ]
null
null
null
tests/test_metrics.py
Matheus158257/projects
26a6148046533476e625a872a2950c383aa975a8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from io import BytesIO from json import dumps from unittest import TestCase from minio.error import BucketAlreadyOwnedByYou from projects.api.main import app from projects.controllers.utils import uuid_alpha from projects.object_storage import BUCKET_NAME, MINIO_CLIENT PROJECT_ID = str(uuid_a...
33.818182
109
0.679435
60f63706d0a669a9016e08a48eb9f8c151fdfb3d
150
py
Python
webinterface/admin.py
monoclecat/Cleaning-Schedule-generator
b12fa8a6f834a89b805bf062a0df45279a7a8796
[ "MIT" ]
2
2021-11-28T23:04:00.000Z
2022-01-13T19:47:45.000Z
webinterface/admin.py
monoclecat/Cleaning-Schedule-generator
b12fa8a6f834a89b805bf062a0df45279a7a8796
[ "MIT" ]
25
2020-03-29T14:40:46.000Z
2021-09-22T17:37:15.000Z
webinterface/admin.py
monoclecat/cleaning-schedule-management-system
b12fa8a6f834a89b805bf062a0df45279a7a8796
[ "MIT" ]
1
2020-07-04T11:42:17.000Z
2020-07-04T11:42:17.000Z
from django.contrib import admin from .models import * admin.site.register(Cleaner) admin.site.register(Schedule) admin.site.register(ScheduleGroup)
21.428571
34
0.82
e8015df81023a8de49001c039ff464cc11555bbb
4,552
py
Python
test/inverted_minor_glitches/TestInvertedDarkWorld.py
Berserker66/ALttPEntranceRandomizer
9c681cc65d7281ccded03484b050e8f80ea65dc6
[ "MIT" ]
null
null
null
test/inverted_minor_glitches/TestInvertedDarkWorld.py
Berserker66/ALttPEntranceRandomizer
9c681cc65d7281ccded03484b050e8f80ea65dc6
[ "MIT" ]
5
2020-01-18T21:10:46.000Z
2020-01-25T20:58:19.000Z
test/inverted_minor_glitches/TestInvertedDarkWorld.py
Berserker66/ALttPEntranceRandomizer
9c681cc65d7281ccded03484b050e8f80ea65dc6
[ "MIT" ]
2
2020-01-18T17:36:50.000Z
2020-01-22T16:52:08.000Z
from test.inverted_minor_glitches.TestInvertedMinor import TestInvertedMinor class TestInvertedDarkWorld(TestInvertedMinor): def testNorthWest(self): self.run_location_tests([ ["Brewery", True, []], ["C-Shaped House", True, []], ["Chest Game", True, []], ...
47.416667
144
0.516476
98bae1e6f2f7a76d8f24e1d208ca73ac7e417aab
118
py
Python
code/sensors/bluetooth/__init__.py
dieterpl/iDogstra
62ee246763e107335b9caf0a4f96239fa0953234
[ "MIT" ]
null
null
null
code/sensors/bluetooth/__init__.py
dieterpl/iDogstra
62ee246763e107335b9caf0a4f96239fa0953234
[ "MIT" ]
null
null
null
code/sensors/bluetooth/__init__.py
dieterpl/iDogstra
62ee246763e107335b9caf0a4f96239fa0953234
[ "MIT" ]
null
null
null
__all__ = ["SnapshotBTDataPipeline", "RecommendedSpeedPipeline", "UserDistanceEstimationPipeline", "ConstantPipeline"]
118
118
0.838983
c777e6a05eef418ba32a4a85a83494e25b4ea88f
3,606
py
Python
src/onegov/org/theme/org_theme.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/theme/org_theme.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/theme/org_theme.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import os from collections import OrderedDict from onegov.foundation import BaseTheme from onegov.core.utils import module_path HELVETICA = '"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif !default;' ARIAL = 'Arial, sans-serif !default;' VERDANA = 'Verdana, Geneva, sans-serif !default;' COURIER_NEW = '"Courier...
27.738462
78
0.551858
c7899b1ebf70d375ea1ce6d673919a68fc0b042d
179
py
Python
data_tests/saved__backend__/numba/default_params.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
data_tests/saved__backend__py3.9/numba/default_params.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
data_tests/saved__backend__py3.9/numba/default_params.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
# __protected__ from numba import njit # __protected__ @njit(cache=True, fastmath=True) def func(a=1, b=None, c=1.0): print(b) return a + c __transonic__ = ("0.4.7",)
16.272727
48
0.653631
c7b3cd3f1d223f17500f40e8b1a908944aa5130c
2,168
py
Python
src/augment_mask.py
tuanminh3395/gr-bone-age
248c929d75e9d88dc9fa102ea11f4eae1e0f3157
[ "MIT" ]
null
null
null
src/augment_mask.py
tuanminh3395/gr-bone-age
248c929d75e9d88dc9fa102ea11f4eae1e0f3157
[ "MIT" ]
null
null
null
src/augment_mask.py
tuanminh3395/gr-bone-age
248c929d75e9d88dc9fa102ea11f4eae1e0f3157
[ "MIT" ]
null
null
null
from data_mask import load_train_data from constants import augmented_train_path, unet_train_path, unet_mask_path, augmented_sample_amount, desired_size from unetdatagen import ImageDataGenerator from train_unet import batch_size import os import shutil import numpy as np from skimage.transform import resize def prepr...
33.875
149
0.684502
406dc4e051baddc7a326782dd0ebb430f91b35c4
7,341
py
Python
python/oneflow/compatible/single_client/test/ops/test_expand_op.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
3,285
2020-07-31T05:51:22.000Z
2022-03-31T15:20:16.000Z
python/oneflow/compatible/single_client/test/ops/test_expand_op.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
2,417
2020-07-31T06:28:58.000Z
2022-03-31T23:04:14.000Z
python/oneflow/compatible/single_client/test/ops/test_expand_op.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
520
2020-07-31T05:52:42.000Z
2022-03-29T02:38:11.000Z
""" Copyright 2020 The OneFlow 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 applicable law or agr...
38.636842
87
0.616673
908bc491057e5bc6a1de09edbc09df970a808a4e
676
py
Python
python/en/archive/dropbox/programmers/04-2_fibonacci_number-recursion.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/programmers/04-2_fibonacci_number-recursion.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/programmers/04-2_fibonacci_number-recursion.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
# 04-1_fibonacci_number-iterative.py # -*- coding: utf-8 -*- # (04) 피보나치 순열 # 문제 설명 # 인자로 0 또는 양의 정수인 x 가 주어질 때, Fibonacci 순열의 해당 값을 구하여 반환하는 함수 solution() 을 완성하세요. # Fibonacci 순열은 아래와 같이 정의됩니다. # F0 = 0 # F1 = 1 # Fn = Fn - 1 + Fn - 2, n >= 2 # 재귀함수 작성 연습을 의도한 것이므로, 재귀적 방법으로도 프로그래밍해 보고, 반복적 방법으로도 프로그래밍해 보시기 바랍니다. d...
20.484848
80
0.510355
90924ffa8c5c8d226db6477ccf4e3694056a7c51
569
py
Python
test_pyparsing_2.py
luluci/gui_env
9c2ffe331c2dc8a7e128474ce9590498082de569
[ "MIT" ]
null
null
null
test_pyparsing_2.py
luluci/gui_env
9c2ffe331c2dc8a7e128474ce9590498082de569
[ "MIT" ]
null
null
null
test_pyparsing_2.py
luluci/gui_env
9c2ffe331c2dc8a7e128474ce9590498082de569
[ "MIT" ]
null
null
null
import pyparsing as pp def pa_keyword(match): print("Keyword: " + str(match)) def pa_identifier(match): print("identifier: " + str(match)) pp_rule1 = pp.Keyword("int").setParseAction(pa_keyword) pp_identifier = pp.Word(pp.alphas+"_", pp.alphanums+"_").setParseAction(pa_identifier) pp_type_decl = ( pp.Optional(pp...
16.257143
86
0.664323
909675a0d51e34e506d13f0566b0bbe18245dcc4
284
py
Python
frappe-bench/apps/erpnext/erpnext/support/doctype/warranty_claim/test_warranty_claim.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
frappe-bench/apps/erpnext/erpnext/support/doctype/warranty_claim/test_warranty_claim.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/support/doctype/warranty_claim/test_warranty_claim.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest test_records = frappe.get_test_records('Warranty Claim') class TestWarrantyClaim(unittest.TestCase): pass
23.666667
85
0.816901
290fd05671492215612b35126cdbcdc327e6e8f1
211
py
Python
hello/hello_memcache.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2017-10-23T14:58:47.000Z
2017-10-23T14:58:47.000Z
hello/hello_memcache.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
null
null
null
hello/hello_memcache.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2018-04-06T07:49:18.000Z
2018-04-06T07:49:18.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from pymemcache.client.base import Client client = Client(('localhost', 11211)) client.set('some_key', 'some_value') result = client.get('some_key') print(result)
21.1
41
0.701422
4691dcbc7ee297a0da8b41a3f7e9c23505c62fc8
11,340
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Red Hat Inc. # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
37.302632
112
0.596825
46b72cdd9a5712084fee0547aba182f3d4e103f2
302
py
Python
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/12.Type-of-Variable-in-Class.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/12.Type-of-Variable-in-Class.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/12.Type-of-Variable-in-Class.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
# Two type of Variable in Python # 1. Instance variable # 2. Class(Static) variable class Car: wheels = 4 def __init__(self): self.mil = 10 self.com = "BMW" c1 = Car() c2 = Car() c1.mil = 8 Car.wheels = 5 print(c1.mil, c1.com, c1.wheels) print(c2.mil, c1.com, c2.wheels)
13.727273
32
0.60596
9ed5374e360241ab5213818fa9e2efe269e60849
22,041
py
Python
quant/observers/t_bfx_btc_usd.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
7
2017-10-22T15:00:09.000Z
2019-09-19T11:45:43.000Z
quant/observers/t_bfx_btc_usd.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
1
2018-01-19T16:19:40.000Z
2018-01-19T16:19:40.000Z
quant/observers/t_bfx_btc_usd.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
5
2017-12-11T15:10:29.000Z
2018-12-21T17:40:58.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- from __future__ import division import logging import time from quant import config from quant.brokers import broker_factory from .basicbot import BasicBot class Arbitrage(BasicBot): """ btc和bt1 bt2的合成与分解套利 btc > bt1 + bt2: 卖btc 买bt1 bt2 btc < bt1 + bt2...
48.335526
119
0.556599
6f46fafc853dabe984188e27f3a6098d4034452c
162
py
Python
PMIa/2015/KRAVCHENKO_A_A/Zadacha_2.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2015/KRAVCHENKO_A_A/Zadacha_2.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2015/KRAVCHENKO_A_A/Zadacha_2.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
print ('Ум - это не сосуд, который надо заполнить, а факел, который необходимо зажечь.') print ('\n\t\t\t\t\t\t\t\t\tПлутарх') input ('Для выхода нажмите enter')
40.5
88
0.703704
6f54cbbc119c285b1f7e42d1fce38954ca1aae6e
1,529
py
Python
sample/create_test_data.py
katsugeneration/schuss
30e2303aa0646f0a4424cbc4b5422acc58a06218
[ "Apache-2.0" ]
6
2018-12-20T06:50:52.000Z
2021-12-16T13:08:38.000Z
sample/create_test_data.py
katsugeneration/schuss
30e2303aa0646f0a4424cbc4b5422acc58a06218
[ "Apache-2.0" ]
1
2020-06-29T07:00:51.000Z
2020-06-29T07:00:51.000Z
sample/create_test_data.py
katsugeneration/schuss
30e2303aa0646f0a4424cbc4b5422acc58a06218
[ "Apache-2.0" ]
1
2022-03-04T07:29:55.000Z
2022-03-04T07:29:55.000Z
import random import argparse j_candidate = (list(range(0x3000, 0x301C)) + list(range(0x3041, 0x3093)) + list(range(0x30A1, 0x30F6))) def create_miss_data(line): pos = random.randint(0, len(line)) line = line[:pos] + chr(random.choice(j_candidate)) + line[pos+1:] return lin...
26.824561
70
0.533682
488fc399cf49b35b4e3bad0074f307433d8fb069
2,427
py
Python
SleekSecurity/layers/plugins/attacks/lfi.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
SleekSecurity/layers/plugins/attacks/lfi.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
SleekSecurity/layers/plugins/attacks/lfi.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- # # @name: Wascan - Web Application Scanner # @repo: https://github.com/m4ll0k/Wascan # @author: Momo Outaadi (M4ll0k) # @license: See the file 'LICENSE.txt' from os import path from json import loads from re import search,I from lib.utils.params import * from lib....
26.966667
83
0.624227
824e77dcd0cf42867b972743715b6343b8eb9a54
2,545
py
Python
python_gui_tkinter/Kivy/fbo_canvas.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python_gui_tkinter/Kivy/fbo_canvas.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python_gui_tkinter/Kivy/fbo_canvas.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
''' FBO Canvas ========== This demonstrates a layout using an FBO (Frame Buffer Off-screen) instead of a plain canvas. You should see a black canvas with a button labelled 'FBO' in the bottom left corner. Clicking it animates the button moving right to left. ''' __all__ = ('FboFloatLayout', ) from kivy.graphics impo...
27.365591
76
0.640079
81cb705b5bcba5947790c713f2868dd0cc3b9464
300
py
Python
exercises/zh/test_01_03_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/zh/test_01_03_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/zh/test_01_03_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
def test(): assert ( doc.text == "我喜欢老虎和狮子。" ), "你确定你正确处理了文本吗?" assert first_token == doc[0], "你确定你选择了第一个词符吗?" assert "print(first_token.text)" in __solution__, "你打印了词符的文本吗?" assert 'spacy.blank("zh")' in __solution__, '你将spacy.blank设置为正确的语言了吗?' __msg__.good("干得漂亮!")
33.333333
74
0.643333
6f8b6c7079517fa9482584e9fd02b49bae5673f1
1,281
py
Python
Packs/DeveloperTools/Scripts/GetInstanceName/GetInstanceName.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/DeveloperTools/Scripts/GetInstanceName/GetInstanceName.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/DeveloperTools/Scripts/GetInstanceName/GetInstanceName.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * from typing import Dict, Any, Tuple import traceback def instance_check(instances, integration_name: str) -> Tuple[bool, Any]: for instance_name, details in instances.items(): if details.get('brand') == int...
28.466667
82
0.689305
fb416a7943a8c1b08d1e4c3c7cca322a1eeab081
441
py
Python
setup.py
f1nan/kocha
9b99c0add1fe1c85b11d68dd04d56e90112835ec
[ "MIT" ]
null
null
null
setup.py
f1nan/kocha
9b99c0add1fe1c85b11d68dd04d56e90112835ec
[ "MIT" ]
null
null
null
setup.py
f1nan/kocha
9b99c0add1fe1c85b11d68dd04d56e90112835ec
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup with open("README.md") as f: readme = f.read() with open("LICENSE") as f: license = f.read() setup( name="kocha", version="v1.0.0", description="Chat application for the terminal.", long_description=readme, long_description_content_type="text/ma...
22.05
53
0.675737
83949ec14cd52e9d65ef1453eed70bb1ac38037f
2,813
py
Python
packages/watchmen-data-kernel/src/watchmen_data_kernel/service/topic_structure_helper.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-data-kernel/src/watchmen_data_kernel/service/topic_structure_helper.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-data-kernel/src/watchmen_data_kernel/service/topic_structure_helper.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from typing import Optional from watchmen_auth import PrincipalService from watchmen_data_kernel.common import ask_replace_topic_to_storage, ask_sync_topic_to_storage, ask_trino_enabled from watchmen_model.admin import Topic from watchmen_utilities import is_blank from .storage_helper import ask_topic_storage def be...
34.304878
114
0.812656
5434032dd298e17479fe9ba4ef06c3d7502a83a7
8,088
py
Python
code/4/ga/magoff2.py
pwang13/AutomatedSE_Coursework
b416672d9756fcc60367143b989d29b0c905cfc3
[ "Unlicense" ]
null
null
null
code/4/ga/magoff2.py
pwang13/AutomatedSE_Coursework
b416672d9756fcc60367143b989d29b0c905cfc3
[ "Unlicense" ]
null
null
null
code/4/ga/magoff2.py
pwang13/AutomatedSE_Coursework
b416672d9756fcc60367143b989d29b0c905cfc3
[ "Unlicense" ]
null
null
null
#%matplotlib inline # All the imports from __future__ import print_function, division from math import * import random import sys import matplotlib.pyplot as plt # TODO 1: Enter your unity ID here __author__ = "magoff2" class O: """ Basic Class which - Helps dynamic updates - Pretty Prints ...
28.680851
89
0.610534
546671771f0a213ce5cfa4b24feffd61335f6e26
312
py
Python
tests/test_basic_func.py
joomogmbh/GrillMeister
b1b4935d4e7f27dc895d6b16462d5568fb708ff3
[ "MIT" ]
1
2019-04-22T13:52:01.000Z
2019-04-22T13:52:01.000Z
tests/test_basic_func.py
joomogmbh/GrillMeister
b1b4935d4e7f27dc895d6b16462d5568fb708ff3
[ "MIT" ]
null
null
null
tests/test_basic_func.py
joomogmbh/GrillMeister
b1b4935d4e7f27dc895d6b16462d5568fb708ff3
[ "MIT" ]
null
null
null
from selenium import webdriver import time options = webdriver.ChromeOptions() options.add_argument('--ignore-certificate-errors') options.add_argument("--test-type") options.binary_location = "/usr/bin/chromium-browser" driver = webdriver.Chrome(chrome_options=options) driver.get('http://127.0.0.1/grillen')
31.2
53
0.788462
b71f76047b594b1cf3dda6a28e816d7f99547827
305
py
Python
backend/app/schemas/hint_image.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2022-02-20T12:45:04.000Z
2022-02-20T12:45:04.000Z
backend/app/schemas/hint_image.py
JamesNeumann/learning-by-annotations
c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad
[ "MIT" ]
21
2021-11-01T10:13:56.000Z
2021-12-02T10:02:13.000Z
backend/app/schemas/hint_image.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-12-16T18:20:55.000Z
2021-12-16T18:20:55.000Z
from pydantic import BaseModel class HintImageBase(BaseModel): image_name: str class Config: orm_mode = True class HintImage(HintImageBase): id: int class HintImageCreate(HintImageBase): task_hint_id: int class HintImageUpdate(HintImageBase): pass
14.52381
38
0.678689
3fb27c2ccc12cc5e6f2132984f9e818d2d7ea93f
579
py
Python
leetcode/074-Search-a-2D-Matrix/Searcha2DMatrix_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
leetcode/074-Search-a-2D-Matrix/Searcha2DMatrix_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/074-Search-a-2D-Matrix/Searcha2DMatrix_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution: # @param {integer[][]} matrix # @param {integer} target # @return {boolean} def searchMatrix(self, matrix, target): if len(matrix) == 0 or len(matrix[0]) == 0: return False m, n = len(matrix), len(matrix[0]) l, r = 0, m * n - 1 while l <= r: ...
25.173913
51
0.417962
3ffce4869a98168950e48cb1ec10eb3f474cd953
1,409
py
Python
Problems/Dynamic Programming/Hard/BestTimeBuySellStockIV/best_time_buy_sell_stock_iv.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Dynamic Programming/Hard/BestTimeBuySellStockIV/best_time_buy_sell_stock_iv.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Dynamic Programming/Hard/BestTimeBuySellStockIV/best_time_buy_sell_stock_iv.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from functools import lru_cache from typing import List # Top-Down (Memoization) # TC: O(N * K * 2) = O(N * K); SC: O(N * K * 2) = O(N * K) def maxProfit(self, k: int, prices: List[int]) -> int: @lru_cache(None) def dp(i: int, trans_left: int, hold: int) -> int: if trans_left == 0 or i == len(prices):...
38.081081
100
0.466288
b21005fd2ee1bf87a2a6992b64d6d3cac6d05f5f
505
py
Python
Chess-And-Rice-Grain.py
RootKimi/Hallo-World
975751a1b1f27e5f0917da320ac0d3ecd63f0e9b
[ "CC0-1.0" ]
null
null
null
Chess-And-Rice-Grain.py
RootKimi/Hallo-World
975751a1b1f27e5f0917da320ac0d3ecd63f0e9b
[ "CC0-1.0" ]
null
null
null
Chess-And-Rice-Grain.py
RootKimi/Hallo-World
975751a1b1f27e5f0917da320ac0d3ecd63f0e9b
[ "CC0-1.0" ]
null
null
null
print ("Schachfeld Nummer 1:") print ("1 Reiskorn") print ("Die Summe an Reiskörnern ist: 1") feldnummer = 2 reiskorn = 1 summe = reiskorn while feldnummer < 65: reiskorn = reiskorn * 2 summe = reiskorn + summe print (f"Schachfeld Nummer {feldnummer}:") print ("Reiskörner auf dem Feld:") prin...
24.047619
59
0.661386
4d5b0c28fd36cda0d8eb1dc452dab390413563f6
3,039
py
Python
criterion/__init__.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
2
2020-12-22T08:40:05.000Z
2021-03-30T08:09:44.000Z
criterion/__init__.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
criterion/__init__.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @description: @author: LiuXin @contact: xinliu1996@163.com @Created on: 2020/11/27 上午11:18 """ import torch import torch.nn as nn from criterion.WCELoss import WCELoss from criterion.FocalLoss import FocalLoss from criterion.DiceLoss import DiceLoss from criterion.IouLoss import IouLoss fr...
27.627273
78
0.620928
128a07902d994976e40349091769b8ddd5dcd2d4
1,930
py
Python
utils/model_scaffolding/src/local_adapter.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
utils/model_scaffolding/src/local_adapter.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
utils/model_scaffolding/src/local_adapter.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
31.129032
78
0.661658
421fcce4e4a293330892a94e2a99aef2218462fb
5,542
py
Python
test/test_npu/test_conv_transposed1d.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_conv_transposed1d.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_conv_transposed1d.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, Huawei Technologies.All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law...
61.577778
148
0.601227
677e5b7afe3920e484e46953381a86dea3e5956f
2,309
py
Python
TG-Bridger-master/config.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
TG-Bridger-master/config.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
TG-Bridger-master/config.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
from telethon.sync import TelegramClient from telethon.tl.functions.messages import GetDialogsRequest from telethon.errors import SessionPasswordNeededError from telethon.tl.types import InputPeerEmpty, InputPeerChannel, InputPeerUser import getpass import sys import os import json from dotenv import load_dotenv load...
27.164706
77
0.619316
67c5da8d000188a935be7d9b00839873e839e040
2,099
py
Python
python/en/archive/dropbox/ec2-oregon/utils.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/ec2-oregon/utils.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/ec2-oregon/utils.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # _*_ coding: utf-8 _*_ import os import numpy as np from time import gmtime from time import strftime from scipy.io import wavfile from python_speech_features import mfcc # make a directory under dir_ if no directory exists for device_id_ # The created directory is dir_/device_i...
36.824561
130
0.705574
221e320bd8d805de20e35a15a2af1ea11669fa6e
3,973
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/solutions/ex03_lcs.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/solutions/ex03_lcs.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/solutions/ex03_lcs.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden def lcs(str1, str2): return __lcs_helper(str1, str2, len(str1) - 1, len(str2) - 1) def __lcs_helper(str1, str2, pos1, pos2): # rekursiver Abbruch if pos1 < 0 or pos2 < 0: return "" # Sind die Zeichen glei...
30.328244
77
0.616411
3f5e7e19c1518fc9169e3bd7130377433ab512db
110,577
py
Python
frds/data/wrds/comp/fundq.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
31
2020-06-17T13:19:12.000Z
2022-03-27T08:56:38.000Z
frds/data/wrds/comp/fundq.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
null
null
null
frds/data/wrds/comp/fundq.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
8
2020-06-14T15:21:51.000Z
2021-09-29T06:28:53.000Z
from dataclasses import dataclass import numpy as np import pandas as pd from frds.data.wrds import WRDSDataset @dataclass class Fundq(WRDSDataset): """Fundamentals Quarterly""" data: pd.DataFrame library = "comp" table = "fundq" index_col = ["gvkey", "datadate"] date_cols = ["datadate"] ...
32.275832
118
0.59629
36914cafa86db3aa3b3837046740697a22eb0ced
1,932
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/solutions/ex07_spiral_traversal.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/solutions/ex07_spiral_traversal.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/solutions/ex07_spiral_traversal.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden from enum import Enum from ch06_arrays.intro.intro import get_dimension class Direction(Enum): RIGHT = (0, 1) DOWN = (1, 0) LEFT = (0, -1) UP = (-1, 0) def spiral_traversal(values2dim): pos_x = 0 pos_y ...
20.125
50
0.445652