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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6e1a7e069e83c9928bd2e21f0c69debfb3a517a8 | 723 | py | Python | Python/Tipos e comandos/ArvoreDireita.py | gianvstheworld/POO | f6b9d3d351d703d974a6ca031ee636aea7119367 | [
"MIT"
] | null | null | null | Python/Tipos e comandos/ArvoreDireita.py | gianvstheworld/POO | f6b9d3d351d703d974a6ca031ee636aea7119367 | [
"MIT"
] | null | null | null | Python/Tipos e comandos/ArvoreDireita.py | gianvstheworld/POO | f6b9d3d351d703d974a6ca031ee636aea7119367 | [
"MIT"
] | null | null | null | '''
-- Nome: Gianluca Capezzuto Sardinha
-- NUSP: 11876933
-- Exercício 4
'''
def main():
x = leu()
spaceL = 0
while x > 0:
i = 0
for _ in range(0, spaceL):
print(" ", end = "")
while i < x:
print("*", end = "")
i += 1
print("\n")
... | 14.176471 | 65 | 0.426003 |
95367666ad755f362da22f6c63c235c545a9fe06 | 5,160 | py | Python | bewerte/gesamt.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | bewerte/gesamt.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | bewerte/gesamt.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | """
Gehe alle Schüler durch und erstelle eine Zusammenstellung der mündlichen Noten
"""
import configparser
import csv
import os
from statistics import mean
from note import endnote
class Klasse:
"""
Jeder Schueler ist ein dictionary mit dem Namen als key und einem array als value
"""
def __init__(sel... | 40.629921 | 100 | 0.518798 |
95d5821944725b948bccf5c92d5f34e676396e78 | 296 | py | Python | test_generate.py | corganhejijun/FaceFill | 6914f3ee680b41161817fe5eafc09b82e59d9113 | [
"MIT"
] | null | null | null | test_generate.py | corganhejijun/FaceFill | 6914f3ee680b41161817fe5eafc09b82e59d9113 | [
"MIT"
] | null | null | null | test_generate.py | corganhejijun/FaceFill | 6914f3ee680b41161817fe5eafc09b82e59d9113 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from src.util import headFromDir
IN_DIR = 'datasets/George_W_Bush'
OUT_DIR = 'datasets/George_W_Bush_test'
SHAPE_MODEL = "models/shape_predictor_68_face_landmarks.dat"
IMG_SIZE = 128
FACE_SIZE = 64
headFromDir(IN_DIR, OUT_DIR, SHAPE_MODEL, IMG_SIZE, FACE_SIZE, 10, 30) | 26.909091 | 70 | 0.773649 |
c2c50e4a90db3ea286d864d2c80ee6139386b8ac | 498 | py | Python | 01_Einfuehrung/while_loop.py | Hananja/DQI19-Python | 63749c49910b5be57d09bb98a5fe728c8fdd5280 | [
"Unlicense"
] | null | null | null | 01_Einfuehrung/while_loop.py | Hananja/DQI19-Python | 63749c49910b5be57d09bb98a5fe728c8fdd5280 | [
"Unlicense"
] | null | null | null | 01_Einfuehrung/while_loop.py | Hananja/DQI19-Python | 63749c49910b5be57d09bb98a5fe728c8fdd5280 | [
"Unlicense"
] | null | null | null | #
# Berechnung des Maximums natuerlicher Zahlen
#
print("Bitte positive ganze Zahlen eingeben (negativ beendet): ")
user_input = 0 # minimalste positive Zahl
max_value = 0 # dito
while user_input >= 0: # negative Zahl beendet
user_input_text = input("Bitte Zahl eingeben: ")
user_input = int(user_input_text... | 31.125 | 65 | 0.708835 |
6659dd1eff26b77b402cadc1607acc42eec700a8 | 221 | py | Python | comp/microsoft/010_min_steps_to_make_piles_equal_height.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | comp/microsoft/010_min_steps_to_make_piles_equal_height.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | comp/microsoft/010_min_steps_to_make_piles_equal_height.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
def min_steps(self, piles):
piles.sort(reverse=True)
res = 0
for i in range(1, len(piles)):
if piles[i] != piles[i - 1]:
res += i
return res
| 24.555556 | 40 | 0.479638 |
66934240b0dfef02d2cf125a05388d6e7ff951f6 | 739 | py | Python | python_gui_tkinter/Tkinter/TkinterCourse/3_tk_label.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/Tkinter/TkinterCourse/3_tk_label.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/Tkinter/TkinterCourse/3_tk_label.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | # You want the text drawn on top of the image? No problem! We need just one label and use the image and the text option at the same time. By default, if an image is given, it is drawn instead of the text. To get the text as well, you have to use the compound option. If you set the compound option to CENTER the text wil... | 36.95 | 352 | 0.705007 |
66c4b626973f1bd493567b55ac19a4287c5592c8 | 123 | py | Python | dataloader/transforms_utils/__init__.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | 2 | 2020-12-22T08:40:05.000Z | 2021-03-30T08:09:44.000Z | dataloader/transforms_utils/__init__.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | dataloader/transforms_utils/__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/20 上午11:41
""" | 15.375 | 31 | 0.642276 |
b01bf5b3d0867b3b59503282b377d9d8dd0217c1 | 633 | py | Python | chillow/service/data_writer.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 3 | 2021-01-17T23:32:07.000Z | 2022-01-30T14:49:16.000Z | chillow/service/data_writer.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-01-17T13:37:56.000Z | 2021-04-14T12:28:49.000Z | chillow/service/data_writer.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-04-02T14:53:38.000Z | 2021-04-20T11:10:17.000Z | import json
from abc import ABCMeta, abstractmethod
from chillow.model.action import Action
class DataWriter(metaclass=ABCMeta):
"""Converts an object to a string."""
@abstractmethod
def write(self, action: Action) -> str:
"""Converts an action to a string.
Args:
action: The... | 21.827586 | 50 | 0.614534 |
a52aa8026b2f0058d3f2f597bfaa5f1a740a9ecf | 972 | py | Python | deprecated/benchmark/reader/reader_visreader.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/benchmark/reader/reader_visreader.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/benchmark/reader/reader_visreader.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | """
Reader using visreader.
"""
from __future__ import division
from __future__ import print_function
from visreader.reader_builder import ReaderBuilder
from visreader.reader_builder import ReaderSetting
THREAD = 8
def _parse_kv(r):
"""
parse kv data from sequence file for imagenet dataset.
"""
impor... | 24.923077 | 69 | 0.682099 |
3c5ad137248656d098c911417ce8a217b92134f6 | 416 | py | Python | src/onegov/election_day/formats/vote/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/formats/vote/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/formats/vote/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.election_day.formats.vote.default import import_vote_default
from onegov.election_day.formats.vote.internal import import_vote_internal
from onegov.election_day.formats.vote.wabsti import import_vote_wabsti
from onegov.election_day.formats.vote.wabstic import import_vote_wabstic
__all__ = [
'import_vo... | 32 | 74 | 0.824519 |
59a7333ce7c2c1042e484f8481e6c8a5a8278bda | 61 | py | Python | BlackJack/run.py | jvpersuhn/hb | 5487abf4fc5b742cf21086ca5b823b915132445d | [
"MIT"
] | null | null | null | BlackJack/run.py | jvpersuhn/hb | 5487abf4fc5b742cf21086ca5b823b915132445d | [
"MIT"
] | null | null | null | BlackJack/run.py | jvpersuhn/hb | 5487abf4fc5b742cf21086ca5b823b915132445d | [
"MIT"
] | null | null | null | from blackJack import BlackJack
b = BlackJack()
b.jogar()
| 8.714286 | 31 | 0.721311 |
59b8489895e215a7a18aa38c4da5a21b9715b1b9 | 1,005 | py | Python | functions/rgb2wb/rgb2wb/handler.py | Reyes-fred/SmartCity | eee87c70d38ef4168fbdfc4ed0ee531090f283e6 | [
"Apache-2.0"
] | null | null | null | functions/rgb2wb/rgb2wb/handler.py | Reyes-fred/SmartCity | eee87c70d38ef4168fbdfc4ed0ee531090f283e6 | [
"Apache-2.0"
] | null | null | null | functions/rgb2wb/rgb2wb/handler.py | Reyes-fred/SmartCity | eee87c70d38ef4168fbdfc4ed0ee531090f283e6 | [
"Apache-2.0"
] | null | null | null | # NOTE: Below the required modules to work with PIL
# python module.
#
#from PIL import Image
#import io
#import sys
#import os
#
import numpy as np
import cv2
import sys
def handle(image_data):
"""handle a request to the function
Args:
req (str): request body
"""
# image is a numpy array
n... | 25.125 | 67 | 0.662687 |
75d63b790f3271ac34f640557dcf004092d63c94 | 2,354 | py | Python | Project Euler Qusetions 11 - 20/Project Euler Question 18.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | 1 | 2020-02-11T02:03:02.000Z | 2020-02-11T02:03:02.000Z | Project Euler Qusetions 11 - 20/Project Euler Question 18.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | Project Euler Qusetions 11 - 20/Project Euler Question 18.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | #Project Euler Question 18
#By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23.
#3
#7 4
#2 4 6
#8 5 9 3
#That is, 3 + 7 + 4 + 9 = 23.
#Find the maximum total from top to bottom of the triangle below:
grid = """75
95 64
17 47 82
1... | 24.020408 | 138 | 0.581988 |
75ec1f6ead4540bc1bcce7c1c9fe037146ef7bae | 2,151 | py | Python | python/en/archive/topics/temp/audio/audiosp/pcm2wav/src/audiosp.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/topics/temp/audio/audiosp/pcm2wav/src/audiosp.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/topics/temp/audio/audiosp/pcm2wav/src/audiosp.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Audio signal processing, https://en.wikipedia.org/wiki/Audio_signal_processing
Last updated: 2019-06-27 (Thu)
First written: 2019-06-11 (Tue)
Written by Tae-Hyung "T" Kim, Ph.D.
pcm2wav: Linux, Shell Scripting, Python을 써서 .pcm을 .wav로 파일 포맷 변환 (In Korean)
https://... | 40.584906 | 123 | 0.654114 |
f956e22c976e12c7a70be3eacc25d3ac81423c4d | 11,863 | py | Python | Transformer/Transformer.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | Transformer/Transformer.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | Transformer/Transformer.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | """
Transformer 实现
Author: Bao Wenjie
Date: 2021/3/7
"""
import math
from numpy.core.numeric import outer
import torch
import torch.nn as NN
from torch.autograd import Variable
import torch.nn.functional as F
from torch.nn.modules.dropout import Dropout
class TransformerGenerate(NN.Module):
""" Transformer """
... | 29.14742 | 140 | 0.569586 |
9b2833c40162cf572a5fa199c3205e2012dd0082 | 762 | py | Python | Hackerrank_problems/Find Merge Point of Two Lists/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | Hackerrank_problems/Find Merge Point of Two Lists/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | Hackerrank_problems/Find Merge Point of Two Lists/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | #
# For your reference:
#
# SinglyLinkedListNode:
# int data
# SinglyLinkedListNode next
#
def findMergeNode(head1, head2):
"""
Go forward the lists every time till the end, and
then jumps to the beginning of the opposite list, and
so on. Advance each of the pointers by 1 every time,
until t... | 26.275862 | 63 | 0.606299 |
fd4cfd5eecac1a59569a106e426a6dc5e3fdb0a8 | 713 | py | Python | pages/themes/beginners/sequenceDataTypes/Tasks_and_HW/task6_solution.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | pages/themes/beginners/sequenceDataTypes/Tasks_and_HW/task6_solution.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | pages/themes/beginners/sequenceDataTypes/Tasks_and_HW/task6_solution.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | distances_from_sofia = [
('Bansko', 97),
('Brussels', 1701),
('Alexandria', 1403),
('Nice', 1307),
('Szeged', 469),
('Dublin', 2479),
('Palermo', 987),
('Oslo', 2098),
('Moscow', 1779),
('Madrid', 2259),
('London', 2019)
]
# variable to store the filtered list of distance tu... | 25.464286 | 58 | 0.625526 |
95298f98063454f33325f9c970621df487f01c4a | 2,832 | py | Python | test/test_npu/test_network_ops/test_chunk_copy_contiguous.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_chunk_copy_contiguous.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_chunk_copy_contiguous.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# 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/lice... | 39.887324 | 95 | 0.653249 |
2f90fef02ffae3623e3cd46907cb9ff0e1f4b072 | 149 | py | Python | UCEF-main/setup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 6 | 2021-08-23T04:54:21.000Z | 2021-12-06T09:45:20.000Z | UCEF-main/setup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | UCEF-main/setup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-08-19T04:11:08.000Z | 2021-12-13T12:06:35.000Z | import os
for i in ["requests","bs4","html5lib","colorama","tqdm","cloudscraper"]:
print("installing",i)
os.system(f"pip3 install {i} -U") | 37.25 | 73 | 0.637584 |
c83c6a77a92db084f0d2352d15bb41b2909dab5e | 19 | py | Python | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 93/subdirs/level12/level121/6.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 93/subdirs/level12/level121/6.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 93/subdirs/level12/level121/6.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | print("Hello User") | 19 | 19 | 0.736842 |
f1cf51694dc0c19b80a7cf7a9b662e3273942fe6 | 1,007 | py | Python | python/product_sum_jit.py | Sultanow/aberkane-sultanow-cnts | 5230c6ef25231f74b305a9210b9ffd47519cc460 | [
"CC-BY-4.0"
] | null | null | null | python/product_sum_jit.py | Sultanow/aberkane-sultanow-cnts | 5230c6ef25231f74b305a9210b9ffd47519cc460 | [
"CC-BY-4.0"
] | null | null | null | python/product_sum_jit.py | Sultanow/aberkane-sultanow-cnts | 5230c6ef25231f74b305a9210b9ffd47519cc460 | [
"CC-BY-4.0"
] | 1 | 2022-01-24T19:04:08.000Z | 2022-01-24T19:04:08.000Z | from numba.cuda import target
import numpy as np
import pandas as pd
from numba import jit
from gmpy2 import mpz
import sys
@jit('void(uint64,uint64)')
def prod_sum(x: np.uint64, n: np.uint64) -> int:
sum=0
for l in range(1,(n-2)//x+1):
prod=1
for k in range(1,l+1):
prod*=(n-x*k)//... | 23.418605 | 55 | 0.596822 |
7b0fae6e80c7fffd47fc6f1b61484267f1763285 | 465 | py | Python | tradingbot/core/algorithm.py | stefaniuk/trading-bot | 403abd2b53caf686a6d2456e7eab124c670e7340 | [
"MIT"
] | 3 | 2018-05-10T13:51:42.000Z | 2020-07-05T16:43:45.000Z | tradingbot/core/algorithm.py | stefaniuk/trading-bot | 403abd2b53caf686a6d2456e7eab124c670e7340 | [
"MIT"
] | null | null | null | tradingbot/core/algorithm.py | stefaniuk/trading-bot | 403abd2b53caf686a6d2456e7eab124c670e7340 | [
"MIT"
] | 1 | 2020-04-22T09:06:17.000Z | 2020-04-22T09:06:17.000Z | import asyncio
from .grapher import Grapher
class Pivot(object):
def __init__(self, api, conf):
self.api = api
self.conf = conf
self.graph = Grapher(self.conf)
self.graph.update = asyncio.gather(self.graph.updatePrice(),
self.graph.candles... | 23.25 | 74 | 0.591398 |
9e5ed5cf715144501a2fef216a270f98cbfb8b47 | 1,607 | py | Python | docker/api/api/createCron.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 2 | 2021-03-23T20:32:38.000Z | 2021-04-21T11:20:12.000Z | docker/api/api/createCron.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 4 | 2021-04-19T11:00:55.000Z | 2021-04-20T08:21:48.000Z | docker/api/api/createCron.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | null | null | null | # Include utilities
import json
# Include db connection
from main import db
import os
# Include models
from models.cron import cron, CreateCron
from models.districts import addCron
#Erzeugung von Cron-Jobs
f = open("cron_jobs.json", "r")
cron_jobs = json.loads(f.read())
f.close()
for job in cron_jobs:
if "com... | 32.795918 | 92 | 0.576229 |
9ebe2ae451d9feff8bb62f79efffac4a1b3b205e | 184 | py | Python | 2-resources/_PYTHON/code-examples-master/elasticsearch/python/es_show_info_no_auth.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_PYTHON/code-examples-master/elasticsearch/python/es_show_info_no_auth.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_PYTHON/code-examples-master/elasticsearch/python/es_show_info_no_auth.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | from elasticsearch import Elasticsearch
es = Elasticsearch(
hosts = [{'host': 'es.id.eu-west-1.es.amazonaws.com', 'port': 443}],
use_ssl=True, verify_certs=True
)
es.info()
| 20.444444 | 73 | 0.679348 |
7b888387bcbf10e9b7130a7a426b48baefe52ee7 | 1,050 | py | Python | source/pkgsrc/lang/python27/patches/patch-Lib_distutils_command_build__ext.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/python27/patches/patch-Lib_distutils_command_build__ext.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/python27/patches/patch-Lib_distutils_command_build__ext.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-Lib_distutils_command_build__ext.py,v 1.1 2018/06/17 19:21:21 adam Exp $
--- Lib/distutils/command/build_ext.py.orig 2014-12-10 15:59:34.000000000 +0000
+++ Lib/distutils/command/build_ext.py
@@ -511,8 +511,19 @@ class build_ext (Command):
# that go into the mix.
if ext.extra_objects:
... | 42 | 87 | 0.658095 |
b55fd4ba7404ff3b241639b293c369a27b44649f | 408 | py | Python | BugTracker-main/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 | BugTracker-main/config.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | BugTracker-main/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 flask import Flask
app = Flask(__name__)
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
# Change these
app.secret_key = 'really secret key'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///database.db'
app.config['SMTP_EMAIL'] = 'EMAIL'
app.config['SMTP_PASSWORD'] = 'Password'
app.config['SMTP_HOST'] = '... | 29.142857 | 63 | 0.740196 |
a93057f7a9c4ce3bbf5a0c58b6d64b8a05011a0a | 8,562 | py | Python | Packs/PerimeterX/Integrations/BotDefender/BotDefender_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/PerimeterX/Integrations/BotDefender/BotDefender_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/PerimeterX/Integrations/BotDefender/BotDefender_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from BotDefender import Client, ip, perimeterx_get_investigate_details
from CommonServerPython import Common
HEADERS = {
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
}
MOCK_BASE_URL = "https://api.perimeterx.com/v1/bot-defender/"
def _get_mock_url():
return f'{MOCK_BASE_URL}/invest... | 41.765854 | 118 | 0.588414 |
8d92628631632918a66823c3cd739b43d5e8f3b5 | 1,118 | py | Python | scripts/fabsp/rime.py | swoiow/dsc | 5860e6bfaa70b700e025533c406a6bc52d4ab74b | [
"MIT"
] | null | null | null | scripts/fabsp/rime.py | swoiow/dsc | 5860e6bfaa70b700e025533c406a6bc52d4ab74b | [
"MIT"
] | null | null | null | scripts/fabsp/rime.py | swoiow/dsc | 5860e6bfaa70b700e025533c406a6bc52d4ab74b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from fabric.api import sudo
def depend_redhat():
"""
yum install -y gcc gcc-c++ boost boost-devel cmake make
yum install glog glog-devel kyotocabinet kyotocabinet-devel marisa-devel yaml-cpp yaml-cpp-devel gtest gtest-devel libnotify zlib zlib-devel gflags gf... | 28.666667 | 213 | 0.66458 |
9e01de145aae803dc6cd2de519ba30f9dfb50726 | 4,661 | py | Python | experiment.py | christopherL91/KexExperiment | 04822a4258c1faab6eada5079885a3947fa7f24a | [
"MIT"
] | null | null | null | experiment.py | christopherL91/KexExperiment | 04822a4258c1faab6eada5079885a3947fa7f24a | [
"MIT"
] | 1 | 2021-08-17T19:29:02.000Z | 2021-08-17T19:29:02.000Z | experiment.py | christopherL91/KexExperiment | 04822a4258c1faab6eada5079885a3947fa7f24a | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# The MIT License (MIT)
# Copyright (c) 2016 Samuel Philipson, Christopher Lillthors
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including wi... | 41.616071 | 112 | 0.56018 |
9e1e340ce03aa5ef5ee5b6c8faf16522066b017c | 5,271 | py | Python | util/weibo_data_hashtag.py | xinlwa/HashTag | 44d86b2d83db42990dfc0246e99d0c90bf461b0c | [
"Apache-2.0"
] | 1 | 2017-12-22T07:42:09.000Z | 2017-12-22T07:42:09.000Z | util/weibo_data_hashtag.py | xinlwa/HashTag | 44d86b2d83db42990dfc0246e99d0c90bf461b0c | [
"Apache-2.0"
] | null | null | null | util/weibo_data_hashtag.py | xinlwa/HashTag | 44d86b2d83db42990dfc0246e99d0c90bf461b0c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import config
import re
def hashtag_re(cont):
return re.findall(r'#[^#]+#',cont)
def name_re(cont):
return re.findall(r'@([^\s:]+)',cont)
def weibo_hashtag_index(weibo_data,hashtag_index):
weibo = open(weibo_data,'rb')
hashtag = open(hashtag_index,'wb')
hashtag_dic... | 32.94375 | 132 | 0.690761 |
19183bf4865e457fe5be79a84041196aede2a958 | 2,147 | py | Python | files/meas/Experiment_12/pickle_data_compression_patrice.py | mimeiners/ans | 382e000e687d5ec0c80a84223087e60ed656a1dd | [
"MIT"
] | null | null | null | files/meas/Experiment_12/pickle_data_compression_patrice.py | mimeiners/ans | 382e000e687d5ec0c80a84223087e60ed656a1dd | [
"MIT"
] | null | null | null | files/meas/Experiment_12/pickle_data_compression_patrice.py | mimeiners/ans | 382e000e687d5ec0c80a84223087e60ed656a1dd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Patrice Bönig
"""
import pandas as pd
import os
# ------------------------
def compression(file_type, seperator, path):
r'''
Parameters
----------
file_type : string
Enthält den zu komprimierenden Dateitypen
path : string
... | 28.626667 | 100 | 0.516535 |
198697e8eae31a59e532ce82b75a39c6394f3c7b | 756 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/screed-0.7.1-py2.7.egg/screed/tests/test_nodb.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/screed-0.7.1-py2.7.egg/screed/tests/test_nodb.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/screed-0.7.1-py2.7.egg/screed/tests/test_nodb.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | import screed
import os
from screed.DBConstants import fileExtension
def test_nodb():
"""
Tests if screed throws an appropriate exception if it is
asked to open a non-existant screed database
"""
try:
db = screed.ScreedDB('foo')
assert 1 == 0 # Previous line should throw an error
... | 23.625 | 60 | 0.607143 |
27b0adcd81abeb1d4e3805b947a58c5e058bd937 | 1,589 | py | Python | python/python_backup/PRAC_PYTHON/ab17.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/ab17.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/ab17.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | #array touple
first=(1,2,3);
second=(2,3,4);
print first
print second
print"Maximum of first touple:", max(first);
print"Miniimum of second touple:", min(second);
print "Touple in 3 times:",first*3;
print "check the value 1 present in first touple:", 1 in first;
print "check the value 4 present in second toupl... | 29.425926 | 76 | 0.678414 |
8b81d6d4a530adb5913c5f8ae7c3293863e59cba | 121 | py | Python | Curso_Python/Secao2-Python-Basico-Logica-Programacao/25_pass_ellipsis/25_pass_ellipsis.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao2-Python-Basico-Logica-Programacao/25_pass_ellipsis/25_pass_ellipsis.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao2-Python-Basico-Logica-Programacao/25_pass_ellipsis/25_pass_ellipsis.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | valor = False
if valor:
pass # para escrever alguma coisa depois
... #Tbm é a msm coisa
else:
print('Tchau') | 20.166667 | 45 | 0.636364 |
9a5f16cf95ea629c202c9321fbadbf715ebe7ea4 | 2,452 | py | Python | Objekte/lighting.py | fdienesch/Solar-System | 617096bcb525a19ee94ff86948b53bd8a65e4386 | [
"MIT"
] | null | null | null | Objekte/lighting.py | fdienesch/Solar-System | 617096bcb525a19ee94ff86948b53bd8a65e4386 | [
"MIT"
] | null | null | null | Objekte/lighting.py | fdienesch/Solar-System | 617096bcb525a19ee94ff86948b53bd8a65e4386 | [
"MIT"
] | null | null | null | # pylint: disable=wildcard-import, unused-wildcard-import, invalid-name, import-error, too-many-instance-attributes, too-few-public-methods, undefined-variable, missing-docstring
__author__ = 'floriandienesch'
from OpenGL.GL import *
class Lighting(object):
"""
This class sets the light of the scene
"""
... | 27.550562 | 178 | 0.589315 |
560148da63e9c3794cccdc2a118830f3df08b3f1 | 215 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-003/ph-3.11-arithmetic-with-int-f.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-003/ph-3.11-arithmetic-with-int-f.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-003/ph-3.11-arithmetic-with-int-f.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | number1 = input("Please enter a number and press enter: ")
number2 = input("Please enter another nunber and press enter ")
number1 = int(number1)
number2 = int(number2)
print("number1 + number2 =", number1+number2)
| 35.833333 | 63 | 0.739535 |
ef54ea6d9db2c0043ba2936fd8b009d8e746c082 | 659 | py | Python | simple-text-editor.py | kautuk-desai/HackerRank | 6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf | [
"MIT"
] | null | null | null | simple-text-editor.py | kautuk-desai/HackerRank | 6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf | [
"MIT"
] | null | null | null | simple-text-editor.py | kautuk-desai/HackerRank | 6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf | [
"MIT"
] | null | null | null | num_queries = int(input())
def executeQuery(num_queries):
stack = list()
string = ""
k = 0
for i in range(num_queries):
q = input().split()
if(q[0] == '4'):
string = stack.pop()
elif(q[0] == '1'):
stack.append(string)
string += q[1]
el... | 25.346154 | 46 | 0.420334 |
32c1a8f139ac3dbd40c063cf25154c1997a6e6cc | 2,814 | py | Python | Prototype/main prototype/TabData.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | 4 | 2019-12-03T16:13:09.000Z | 2019-12-11T23:22:58.000Z | Prototype/main prototype/TabData.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | 65 | 2019-12-08T17:43:59.000Z | 2020-08-14T15:26:21.000Z | Prototype/main prototype/TabData.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | null | null | null | import Calculation
from LayerData import LayerData
class TabData:
def __init__(self, mode, name, layers=None, rright=None, rleft=None, rsum=None, rt=None, tright=None, tleft=None, u=None, currentFileLocation=None):
#some trickery because default values in the constructor call kind of destroy the the possib... | 43.96875 | 278 | 0.636816 |
f5c9b4413911f01ede2138fa69aaf59f213c00e0 | 200 | py | Python | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .monitor_log_invoker import create_monitor_log_pipeline_invoker
from .pipeline_invoker import try_to_invoke_pipelines, try_to_invoke_pipelines_async
from .pipeline_trigger import PipelineTrigger
| 50 | 84 | 0.915 |
c221eb4db0d383cf52accc786ceef53b9de40731 | 176 | py | Python | Global.py | TechLabCommunity/SaintPeterTalent | eb80237de4d73f3a99e82e02edb714f5057bd559 | [
"MIT"
] | 1 | 2019-01-03T12:59:19.000Z | 2019-01-03T12:59:19.000Z | Global.py | TechLabCommunity/SaintPeterTalent | eb80237de4d73f3a99e82e02edb714f5057bd559 | [
"MIT"
] | null | null | null | Global.py | TechLabCommunity/SaintPeterTalent | eb80237de4d73f3a99e82e02edb714f5057bd559 | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
PATH_CONFIG = './config.xml'
def get_value_config(fromroot, key):
return ET.parse(PATH_CONFIG).getroot().find(fromroot).find(key).text
| 25.142857 | 72 | 0.755682 |
a0432c180af6562b2b7d31520d78264dcb9327df | 307 | py | Python | code/Functions.py | ju1-eu/pyAnfaenger | 59440e99d69582ee2c7a022c8b819e7c78f41ac0 | [
"MIT"
] | null | null | null | code/Functions.py | ju1-eu/pyAnfaenger | 59440e99d69582ee2c7a022c8b819e7c78f41ac0 | [
"MIT"
] | null | null | null | code/Functions.py | ju1-eu/pyAnfaenger | 59440e99d69582ee2c7a022c8b819e7c78f41ac0 | [
"MIT"
] | null | null | null | # Funktion: max
def list_max(my_list):
result = my_list[0]
for i in range(1, len(my_list)):
wert = my_list[i]
if wert > result:
result = wert
return result
# Liste
l1 = [-2, 1, -10]
l2 = [-20, 123, 22]
# Funktionsaufruf
l1_max = list_max(l1)
l2_max = list_max(l2)
| 17.055556 | 36 | 0.579805 |
266217a40cb8a8617ee2cc7e27fd77cfcdfed940 | 3,719 | py | Python | forge/lib/helpers.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 31 | 2015-07-13T15:36:50.000Z | 2022-02-07T21:37:51.000Z | forge/lib/helpers.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 109 | 2015-04-24T10:03:24.000Z | 2019-04-12T13:34:01.000Z | forge/lib/helpers.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 16 | 2015-10-03T06:03:22.000Z | 2022-03-31T08:24:37.000Z | # -*- coding: utf-8 -*-
from osgeo import osr, ogr
import requests
import os
import gzip
import sys
import time
import datetime
import cStringIO
from pyproj import Proj, transform
def createBBox(center, length):
offset = length / 2
xmin = center[0] - offset
ymin = center[1] - offset
xmax = center[0] ... | 25.29932 | 81 | 0.622748 |
3e42f5995876bbf7359739a5c0aea921346ce092 | 2,833 | py | Python | deprecated/examples/dam/utils.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/examples/dam/utils.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/examples/dam/utils.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 35.4125 | 86 | 0.639252 |
e41a536b196c60e344b8645d1cde5dd755e28f59 | 11,975 | py | Python | src/onegov/feriennet/boardlets.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/boardlets.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/boardlets.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from cached_property import cached_property
from onegov.activity import Activity, Attendee, Booking, Occasion
from onegov.feriennet import _
from onegov.feriennet import FeriennetApp
from onegov.feriennet.collections import BillingCollection, MatchCollection
from onegov.feriennet.exports.unlucky import UnluckyExport
fr... | 27.784223 | 77 | 0.517077 |
e422291f7998d85026e91171364808697735a94e | 9,137 | py | Python | Packs/TrendMicroCAS/Integrations/TrendMicroCAS/TrendMicroCAS_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/TrendMicroCAS/Integrations/TrendMicroCAS/TrendMicroCAS_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/TrendMicroCAS/Integrations/TrendMicroCAS/TrendMicroCAS_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
from TrendMicroCAS import Client, security_events_list_command, email_sweep_command, parse_date_to_isoformat,\
user_take_action_command, email_take_action_command, user_action_result_command, blocked_lists_get_command,\
blocked_lists_update_command
import datetime
import test_data.commands_raw_res... | 37.600823 | 115 | 0.704279 |
5fa88a1356fdd019f1a580a03ac1bb65e8ab75bd | 1,240 | py | Python | leetcode/068-Text-Justification/TextJustification.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/068-Text-Justification/TextJustification.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/068-Text-Justification/TextJustification.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def fullJustify(self, words, maxWidth):
"""
:type words: List[str]
:type maxWidth: int
:rtype: List[str]
"""
def format(wds, L):
wdslen = len(''.join(wds))
l = len(wds) - 1
res = ''
step = (L - w... | 31 | 74 | 0.397581 |
f2bfaa4612587f85837ea1e68cefb329f915d656 | 299 | py | Python | Uebung1/Uebung1_Aufgabe3_2.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | 1 | 2018-04-18T19:10:06.000Z | 2018-04-18T19:10:06.000Z | Uebung1/Uebung1_Aufgabe3_2.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | null | null | null | Uebung1/Uebung1_Aufgabe3_2.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | 1 | 2018-04-29T08:48:00.000Z | 2018-04-29T08:48:00.000Z | #K0 = Startkapital
#p = Zins
#n = Perioden
#K = Endkapital
K0 = float(input("Wieviel Startkapital hast du?"))
p = float(input("Wie hoch ist der Zins?"))
n = float(input("wieviele Perioden legst du an?"))
#berechnung K
K = (K0*(1+p)**n)
print("Das Endkapital nach ", n, " Perioden beträgt: ",K)
| 18.6875 | 57 | 0.655518 |
d9b7d56be59460373b39b95f460c79e143e8a7eb | 4,508 | py | Python | rbac/app/config.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | rbac/app/config.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | rbac/app/config.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 72 | 2018-04-13T18:29:12.000Z | 2020-05-29T06:00:33.000Z | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# 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 ... | 37.566667 | 86 | 0.696318 |
8a5e5fc6336968f25a2c53c1c84be61f1fb99a45 | 694 | py | Python | ___Python/RomanS/untitled/p13_parameter/m01_parameter.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/RomanS/untitled/p13_parameter/m01_parameter.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/RomanS/untitled/p13_parameter/m01_parameter.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | def ausgabe(liste, ende="\n", erstezeile=""):
print(erstezeile)
for element in liste:
print(element, end=ende)
def ausgabe2(liste, **kwargs):
ende = "\n" if "ende" not in kwargs else kwargs["ende"]
erstezeile = "" if "erstezeile" not in kwargs else kwargs["erstezeile"]
print(ers... | 24.785714 | 76 | 0.651297 |
6a71456d5badc95c19468cfee76390b8e11776c4 | 18,187 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/integrate.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/integrate.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/integrate.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | #!/usr/bin/env python
# Author : Pierre Schnizer
"""
This modules defines routines for performing numerical integration
(quadrature) of a function in one dimension. There are routines for adaptive
and non-adaptive integration of general functions, with specialised routines
for specific cases. These inc... | 40.778027 | 95 | 0.657173 |
6a7a06262773f9d48a06c212cf06889f3dcecbd2 | 368 | py | Python | Source/11_XML_RPC_MultiCall/server.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | 1 | 2022-02-28T09:49:35.000Z | 2022-02-28T09:49:35.000Z | Source/11_XML_RPC_MultiCall/server.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | null | null | null | Source/11_XML_RPC_MultiCall/server.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | null | null | null | from xmlrpc.server import SimpleXMLRPCServer
def multiply(x, y):
return x * y
def add(x, y):
return x + y
server = SimpleXMLRPCServer(("localhost", 50000))
server.register_multicall_functions()
server.register_function(add, "add")
server.register_function(multiply, "multiply")
print("Server is On ... | 14.153846 | 49 | 0.714674 |
6a887ea2793ebc873e98725ccbbeb24387450433 | 7,164 | py | Python | tests/nlu/featurizers/test_regex_featurizer.py | techBeck03/rasa | 72fef6e7742f5ccb8614c75b6410dff68f137554 | [
"Apache-2.0"
] | 2 | 2020-02-27T16:41:52.000Z | 2020-02-27T16:41:57.000Z | tests/nlu/featurizers/test_regex_featurizer.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 56 | 2020-06-09T00:16:14.000Z | 2020-11-16T00:25:20.000Z | tests/nlu/featurizers/test_regex_featurizer.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 3 | 2019-02-27T10:13:16.000Z | 2019-07-26T08:33:45.000Z | import numpy as np
import pytest
from rasa.nlu.training_data import TrainingData
from rasa.nlu.config import RasaNLUModelConfig
from rasa.nlu.tokenizers.whitespace_tokenizer import WhitespaceTokenizer
from rasa.nlu.featurizers.sparse_featurizer.regex_featurizer import RegexFeaturizer
from rasa.nlu.constants import (
... | 31.699115 | 87 | 0.538247 |
6ac8fe2008ba4846dbe85df2ed6f332542dc9e75 | 308 | py | Python | pacman-arch/test/pacman/tests/sync052.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/sync052.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/sync052.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "sysupgrade with a disabled repo"
sp = pmpkg("dummy", "1.0-2")
self.addpkg2db("sync", sp)
lp = pmpkg("dummy", "1.0-1")
self.addpkg2db("local", lp)
self.args = "-Syu"
self.db['sync'].option['Usage'] = ['Search']
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1.0-1")
| 20.533333 | 52 | 0.665584 |
0af27bd5b742c8a1d0f8d3c9aa703a138da5977f | 7,782 | py | Python | alzheimer_model.py | bsolano/Alzheimer-Resnets | b7b4f0d240f932513ef3427924894358b87dd68f | [
"MIT"
] | 3 | 2020-04-01T08:13:31.000Z | 2020-10-30T01:01:41.000Z | alzheimer_model.py | bsolano/Alzheimer-Resnets | b7b4f0d240f932513ef3427924894358b87dd68f | [
"MIT"
] | null | null | null | alzheimer_model.py | bsolano/Alzheimer-Resnets | b7b4f0d240f932513ef3427924894358b87dd68f | [
"MIT"
] | 1 | 2021-01-27T11:46:49.000Z | 2021-01-27T11:46:49.000Z | # encoding: utf-8
"""
The main implementation.
"""
from transforms import ToTensor
from adni_dataset import ADNI_Dataset
from adni_dataset import NumpyADNI_Dataset
from adni_dataset import NumpyADNI_FolderDataset
from lib.functions import get_class_distribution
from lib.functions import get_test_predicted
from lib.fu... | 40.53125 | 242 | 0.683629 |
7caed9bc46a74a77cfdd9c3d472d4709acb8940d | 5,547 | py | Python | frappe-bench/apps/erpnext/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, msgprint
from frappe.utils import flt
from erpnext.accounts.utils import get_fiscal_year
from erpnext.controllers.tr... | 35.107595 | 97 | 0.715702 |
86b2abc5900563b4ad2d923bafe2810c972b11f7 | 631 | py | Python | Curso-Em-Video-Python/2Exercicios/069_Analise_de_dados_do_grupo.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/069_Analise_de_dados_do_grupo.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/069_Analise_de_dados_do_grupo.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | n = sexo = 'M'
maioridade = mulheres = homens = 0
print('=-' * 20)
print('ANALISE DE DADOS')
print('=-' * 20)
while True:
idade = int(input('Digite sua idade: '))
sexo = str(input('Qual o seu sexo: [M/F] ')).upper().split()[0]
if idade >= 18:
maioridade += 1
if sexo == 'M':
homens += 1
... | 31.55 | 134 | 0.570523 |
8113e6ff89cfce1beeb2f06943807c659cbefbfb | 4,626 | py | Python | setup.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | null | null | null | setup.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 5 | 2020-01-18T21:10:46.000Z | 2020-01-25T20:58:19.000Z | setup.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 2 | 2020-01-18T17:36:50.000Z | 2020-01-22T16:52:08.000Z | import os
import shutil
import sys
import sysconfig
from pathlib import Path
import cx_Freeze
is_64bits = sys.maxsize > 2 ** 32
folder = "exe.{platform}-{version}".format(platform=sysconfig.get_platform(),
version=sysconfig.get_python_version())
buildfolder = Path("build", f... | 31.256757 | 121 | 0.653048 |
81327fba936b3e85222aba4acdae01031e2e1c0d | 7,081 | py | Python | deprecated/benchmark/ps/distribute_word2vec/paddle/model.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/benchmark/ps/distribute_word2vec/paddle/model.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/benchmark/ps/distribute_word2vec/paddle/model.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | #!/usr/bin/python
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | 43.709877 | 99 | 0.605141 |
d4a0458ef2f240d7ecbf2cc0b357ac1f5919ad42 | 7,289 | py | Python | xiaobu/xiaobu.py | hanyanze/FS_AILPB | 7756551cf926aa6296ec851dd696c97d56e06bca | [
"Apache-2.0"
] | null | null | null | xiaobu/xiaobu.py | hanyanze/FS_AILPB | 7756551cf926aa6296ec851dd696c97d56e06bca | [
"Apache-2.0"
] | null | null | null | xiaobu/xiaobu.py | hanyanze/FS_AILPB | 7756551cf926aa6296ec851dd696c97d56e06bca | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8-*-
# 开源项目地址:https://github.com/wzpan/wukong-robot.git
from snowboy import snowboydecoder
from robot import config, utils, constants, logging, Player
from robot.sdk import LED
from robot.ConfigMonitor import ConfigMonitor
from robot.Conversation import Conversation
from watchdo... | 35.043269 | 110 | 0.571135 |
be19981a801625771806a4e2ca98816cd8104174 | 3,794 | py | Python | Metadataextraction/getGeoPackageInfo.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | null | null | null | Metadataextraction/getGeoPackageInfo.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | 47 | 2018-11-13T13:55:01.000Z | 2019-09-16T13:38:11.000Z | Metadataextraction/getGeoPackageInfo.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | 4 | 2018-11-27T12:36:51.000Z | 2020-10-14T18:07:04.000Z | import click # used to print something
import extractTool # used for the the transformation and prints
import sqlite3 # used to access the geopackage database, :see: https://docs.python.org/2/library/sqlite3.html
from scipy.spatial import ConvexHull # used to calculate the convex hull
"""
Function for e... | 33.875 | 152 | 0.689246 |
07eb3d8e0ceff85151df4363da58499e8f6e90cb | 374 | py | Python | PINp/2014/Gryadin_V_D/task_2_46.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Gryadin_V_D/task_2_46.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Gryadin_V_D/task_2_46.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 2. Вариант 46
#Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание,
#автором которого является Абу-ль-Фарадж бин Харун.
#Не забудьте о том, что автор должен быть упомянут на отдельной строке.
#Gryadin V. D.
print("Пьянство-мать всех пороков.")
print("\n Абу-ль-Фарадж ... | 34 | 93 | 0.772727 |
ed2c48d8b47fc26987d8f6412e7188290fb6d13f | 1,240 | py | Python | crypto/Random Guess/script.py | killua4564/2019-AIS3-preexam | b13b5c9d3a2ec8beef7cca781154655bb51605e3 | [
"MIT"
] | 1 | 2019-06-15T11:45:41.000Z | 2019-06-15T11:45:41.000Z | crypto/Random Guess/script.py | killua4564/2019-AIS3-preexam | b13b5c9d3a2ec8beef7cca781154655bb51605e3 | [
"MIT"
] | null | null | null | crypto/Random Guess/script.py | killua4564/2019-AIS3-preexam | b13b5c9d3a2ec8beef7cca781154655bb51605e3 | [
"MIT"
] | null | null | null | from pwn import *
from sympy import invert, gcd
conn = remote("pre-exam-chals.ais3.org", 10200)
conn.recvuntil(":\n")
conn.recvuntil(" \n")
n = list(map(int, str(conn.recvuntil("\n").strip(b"\n").strip(b"N = "), 'utf-8').split(', ')))
conn.recvuntil("+\n")
'''
N1 = a * N0 + b % c
N2 = a * N1 + b % c
N3 = a * N2 + b... | 22.962963 | 94 | 0.445161 |
9c7e54b5ddb0fab0a567468ece64f19ec1347ebf | 5,976 | py | Python | Packs/Gmail/Integrations/Gmail/Gmail_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Gmail/Integrations/Gmail/Gmail_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Gmail/Integrations/Gmail/Gmail_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | MOCK_MAIL_NO_LABELS = {
u'internalDate': u'1572251535000',
u'historyId': u'249781',
u'payload': {
u'mimeType': u'multipart/mixed',
u'body': {u'size': 0},
u'partId': u'',
u'filename': u'',
u'headers': [
{
u'name': u'Received',
... | 33.385475 | 120 | 0.483601 |
92d17d988d3f0a827fc2777d4baab9f04dfc4510 | 564 | py | Python | backend/alembic/versions/943cf797c278_task_hint_types_are_ints.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2022-02-20T12:45:04.000Z | 2022-02-20T12:45:04.000Z | backend/alembic/versions/943cf797c278_task_hint_types_are_ints.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | backend/alembic/versions/943cf797c278_task_hint_types_are_ints.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | """task hint types are ints
Revision ID: 943cf797c278
Revises: 8e8247e7893c
Create Date: 2021-09-23 21:56:07.338197
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "943cf797c278"
down_revision = "8e8247e7893c"
branch_labels = None
depends_on = None
def upgrad... | 19.448276 | 65 | 0.687943 |
130a7f97e27414a4e81f3ba48080e5033b44681e | 1,433 | py | Python | documentation_src/doc_examples/parse_json_ebnf.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | documentation_src/doc_examples/parse_json_ebnf.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | documentation_src/doc_examples/parse_json_ebnf.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""JSON-parser-example from the DHParser-manual"""
from DHParser.dsl import create_parser
json_grammar = r"""
@literalws = right
@drop = whitespace, strings
@disposable = /_\w+/
json = ~ _element _EOF
_element = object | array | string | number | _bool | nu... | 28.098039 | 65 | 0.466853 |
133d06d5d5059c3c417aad2c955a5541e035e628 | 3,214 | py | Python | app/t1health_app/static/fusioncharts-suite-xt/integrations/django/samples/fusioncharts/samples/chart_annotation.py | siyaochen/Tier1Health | 536591a7534bbb3fb27fe889bfed9de152ec1864 | [
"MIT"
] | 14 | 2016-11-03T19:06:21.000Z | 2021-11-24T09:05:09.000Z | app/t1health_app/static/fusioncharts-suite-xt/integrations/django/samples/fusioncharts/samples/chart_annotation.py | siyaochen/Tier1Health | 536591a7534bbb3fb27fe889bfed9de152ec1864 | [
"MIT"
] | 10 | 2022-02-16T07:17:49.000Z | 2022-03-08T12:43:51.000Z | asset/integrations/django/samples/fusioncharts/samples/chart_annotation.py | Piusshungu/catherine-junior-school | 5356f4ff5a5c8383849d32e22a60d638c35b1a48 | [
"MIT"
] | 17 | 2016-05-19T13:16:34.000Z | 2021-04-30T14:38:42.000Z | from django.shortcuts import render
from django.http import HttpResponse
# Include the `fusioncharts.py` file which has required functions to embed the charts in html page
from ..fusioncharts import FusionCharts
# Loading Data from a Static JSON String
# It is a example to show a spline chart where data is passed as ... | 37.372093 | 102 | 0.350965 |
136ea55f2085e62d10c0882933f10aea80a27d1b | 570 | py | Python | TUMAGA/obline.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | TUMAGA/obline.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | TUMAGA/obline.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | "oblique line"
__author__ = 'wittr'
from amazon import Boa
from keysclass import Keys
import configparser
import turtle
def samesideofline(pos, dest, line):
"check if pos and dest is on same side of line, list of two Vec2D(x, y)"
pass
player = Boa()
player.appendline(-100,0, 0, 100)
# player.appendline(0... | 18.387097 | 76 | 0.736842 |
b99d763cfda44760d44b7ebe9c8bab63fd89721c | 795 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/intro/intro_quicksort.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/intro/intro_quicksort.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/intro/intro_quicksort.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
def quick_sort(values):
# rekursiver Abbruch
if len(values) <= 1:
return values
# Aufsammeln kleiner gleich / größer als Pivot
pivot = values[0]
below_or_equals = [value for value in values[1:] if valu... | 22.714286 | 71 | 0.656604 |
6a3f5959c19e9835afa387b7c06e60975ccc551f | 18,035 | py | Python | src/torch/npu/memory.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | src/torch/npu/memory.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | src/torch/npu/memory.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# 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/lice... | 37.109053 | 106 | 0.662101 |
16a16c78f2a73e0eaf01f6c01c7a38ed82616ca4 | 610 | py | Python | turngen/ai_dummy.py | amrohendawi/AlphaZero-implementation | 42103e63308ba256208b6dd6ddcbef2e797e9932 | [
"MIT"
] | null | null | null | turngen/ai_dummy.py | amrohendawi/AlphaZero-implementation | 42103e63308ba256208b6dd6ddcbef2e797e9932 | [
"MIT"
] | null | null | null | turngen/ai_dummy.py | amrohendawi/AlphaZero-implementation | 42103e63308ba256208b6dd6ddcbef2e797e9932 | [
"MIT"
] | null | null | null |
from ai_base import ai_base
import game as g
import state as s
from random import randint
from turn import Turn
class ai_dummy(ai_base):
def __init__(self, player):
super().__init__(player)
self.player = player
self.game = g.Game()
def calculateTurn(self, board):
state = s.State(board, self.player)
turn... | 24.4 | 45 | 0.662295 |
bca4fe9a837381cd95de03c97bbf51e73ac55223 | 293 | py | Python | exercises/pt/exc_02_09.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/exc_02_09.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/exc_02_09.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
# Carregue o fluxo de processamento en_core_web_md
# para fazer o download do fluxo: python -m spacy download pt_core_news_md
nlp = ____
# Processe um texto
doc = nlp("Duas bananas de pijamas")
# Imprima o vetor para "bananas"
bananas_vector = ____.____
print(bananas_vector)
| 22.538462 | 74 | 0.774744 |
d5f4b4eb4d3705cd3ee7c20a6970990b576c902e | 12,039 | py | Python | src/tools/data/vdb_check/vdb_check.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/tools/data/vdb_check/vdb_check.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/tools/data/vdb_check/vdb_check.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | #
# This is vdbck, like fsck for a VisIt Database
#
# This tool is designed to iterate over all the objects in a database
# and validate that VisIt can process them by doing plots involving
# the objects. It reports cases that fail. This is intended to be a
# way for users to sanity check that they are creating a datab... | 27.486301 | 105 | 0.592076 |
fc39bdccddda8ae1a90457f913c51b0f861ec67a | 7,921 | py | Python | Treball/simulator.py | jmigual/OiS | b5eb0dc9db8d8c655ea3b941a5ada5c764b7aa0d | [
"MIT"
] | null | null | null | Treball/simulator.py | jmigual/OiS | b5eb0dc9db8d8c655ea3b941a5ada5c764b7aa0d | [
"MIT"
] | null | null | null | Treball/simulator.py | jmigual/OiS | b5eb0dc9db8d8c655ea3b941a5ada5c764b7aa0d | [
"MIT"
] | null | null | null | import csv
import random
import abc
import numpy
import os
from logger import *
class ComptadorEstadistic:
def __init__(self, nom_arxiu):
self.llista_espera = []
self.nom_arxiu = nom_arxiu
directori, arxiu = os.path.split(nom_arxiu)
csvfile = open(os.path.join(directori, "resultats... | 38.2657 | 98 | 0.652695 |
fca1c7cf8beca479553355ac23daddc572c4fcfa | 92 | py | Python | 2014/09/aircraft-over-time/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/09/aircraft-over-time/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/09/aircraft-over-time/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '0AqjLQISCZzBkdDF6dTlNdC00Q2NPMVEtQ3FYeUh1amc'
| 23 | 68 | 0.847826 |
db3da0335edae7392d3d3f936675177dd93e08ae | 1,219 | py | Python | diversos/Producto.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | 1 | 2021-12-18T15:29:24.000Z | 2021-12-18T15:29:24.000Z | diversos/Producto.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | null | null | null | diversos/Producto.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | 3 | 2021-08-23T22:45:20.000Z | 2022-02-17T13:17:09.000Z | ## https://www.youtube.com/watch?v=PGXwNophTOQ
class Produto:
def __init__(self, nome, preco):
self.nome = nome
self.preco = preco
def desconto (self, percentual):
self.preco = self.preco - (self.preco * (percentual / 100 ))
# Getters note que o nome do metodo Getter é o mesmo da v... | 25.395833 | 72 | 0.533224 |
9187c429759359a97057ea9d6f095a4b71c7013a | 213 | py | Python | listings/chapter05/use_ds.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | listings/chapter05/use_ds.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | listings/chapter05/use_ds.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | from data_structures import Stack, Queue
s = Stack()
s.push(1)
s.push(2)
s.push(3)
while s.empty == False:
print(s.pop())
q = Queue()
q.push(1)
q.push(2)
q.push(3)
while q.empty == False:
print(q.pop())
| 13.3125 | 40 | 0.624413 |
91ec256082d027ce6c9078e4e10073734cb2ca74 | 860 | py | Python | abstract_pre_deal2.py | pku601/LDA | a4bcd3e40ed2920dc29bf0270eab05b245ea003e | [
"Apache-2.0"
] | null | null | null | abstract_pre_deal2.py | pku601/LDA | a4bcd3e40ed2920dc29bf0270eab05b245ea003e | [
"Apache-2.0"
] | null | null | null | abstract_pre_deal2.py | pku601/LDA | a4bcd3e40ed2920dc29bf0270eab05b245ea003e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import codecs
import sys
import re
reload(sys)
sys.setdefaultencoding('utf8')
fin = codecs.open('abstract_temp.txt', 'r', 'utf-8')
fout = codecs.open('abstracts_clean.txt', 'w', "utf-8")
lines = fin.readlines()
line_num = 0
for line in lines:
if len(line.strip()) == 0:
continue
... | 20 | 83 | 0.536047 |
72d0dd11dcde4646caff5be71a53e1195110b8e1 | 1,204 | py | Python | sort/heap_sort.py | imttx/awesome-algorithm | d72277cc278131ae670bea74db4283b02f362758 | [
"MIT"
] | null | null | null | sort/heap_sort.py | imttx/awesome-algorithm | d72277cc278131ae670bea74db4283b02f362758 | [
"MIT"
] | null | null | null | sort/heap_sort.py | imttx/awesome-algorithm | d72277cc278131ae670bea74db4283b02f362758 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2018-12-22 11:16:42
#
# 堆排序 纯粹练手
class HeapSort(object):
def __init__(self, data):
self.data = data
def sort(self):
# 建立最大堆
for i in range(len(self.data)//2-1, -1, -1):
# 从第一个非叶子结点从下至上,从右至左调整结构
self.sin... | 21.5 | 64 | 0.45598 |
43203a5da8df11c98e0f707b614cdf1166c3657b | 1,025 | py | Python | 02_transcription/test_google/transcribe_file.py | Verena-Lemberger/masterarbeit | 2819f222b75b31bd2a44b45ee3417998c385eeab | [
"MIT"
] | null | null | null | 02_transcription/test_google/transcribe_file.py | Verena-Lemberger/masterarbeit | 2819f222b75b31bd2a44b45ee3417998c385eeab | [
"MIT"
] | 14 | 2021-06-21T19:41:33.000Z | 2021-06-21T19:41:35.000Z | 02_transcription/test_google/transcribe_file.py | Verena-Lemberger/masterarbeit | 2819f222b75b31bd2a44b45ee3417998c385eeab | [
"MIT"
] | null | null | null |
from google.cloud import speech_v1 as speech
def speech_to_text(config, audio):
client = speech.SpeechClient()
response = client.recognize(config=config, audio=audio)
print_sentences(response)
def print_sentences(response):
for result in response.results:
best_alternative = result.alternative... | 33.064516 | 71 | 0.696585 |
432f034bda863b543bde3741605ea699b7959e06 | 775 | py | Python | event_detector/add_test_event_detection_task.py | MahdiFarnaghi/gtm | adbec372786262607291f901a444a0ebe9e98b48 | [
"Apache-2.0"
] | null | null | null | event_detector/add_test_event_detection_task.py | MahdiFarnaghi/gtm | adbec372786262607291f901a444a0ebe9e98b48 | [
"Apache-2.0"
] | null | null | null | event_detector/add_test_event_detection_task.py | MahdiFarnaghi/gtm | adbec372786262607291f901a444a0ebe9e98b48 | [
"Apache-2.0"
] | null | null | null | import sys
import os
from time import sleep
from gttm.ts.task_scheduler import TaskScheduler
from gttm.db import PostgresHandler_EventDetection
from dotenv import load_dotenv
load_dotenv()
postgres = PostgresHandler_EventDetection(
os.getenv('DB_HOSTNAME'),
os.getenv('DB_PORT'),
os.getenv('DB_DATABASE')... | 29.807692 | 106 | 0.713548 |
60b55f5e8ad9e652b1cbcf018bee8025ca4fe33d | 12,763 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/nios_nsgroup.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/nios_nsgroup.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/nios_nsgroup.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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',
'status': ['preview'],
... | 36.361823 | 127 | 0.643893 |
e8330226b5b0d7a16ec946fa0dc198b61deafad6 | 9,017 | py | Python | tests/cli/test_rasa_export.py | isaac-philip/rasa | 923db75e03921921a6f1f3489a2c5574138ee685 | [
"Apache-2.0"
] | 5 | 2020-08-28T06:44:31.000Z | 2021-03-14T18:46:01.000Z | tests/cli/test_rasa_export.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 71 | 2020-08-25T02:46:08.000Z | 2022-03-01T13:23:38.000Z | tests/cli/test_rasa_export.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 3 | 2019-02-27T10:13:16.000Z | 2019-07-26T08:33:45.000Z | import argparse
from pathlib import Path
from typing import Callable, Optional, Dict, Text, List, Tuple, Any
from unittest.mock import Mock
import pytest
from _pytest.monkeypatch import MonkeyPatch
from _pytest.pytester import RunResult
import rasa.core.utils as rasa_core_utils
from rasa.cli import export
from rasa.c... | 34.155303 | 88 | 0.708883 |
1c8e6fbb40d918349d304cff48d846ee8d49faa7 | 109 | py | Python | Shivani/positive.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/positive.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/positive.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | x = int(input("enter first number\n"))
if(x>=0):
print(x,"is positive")
else:
print(x,"is negative")
| 18.166667 | 38 | 0.605505 |
98dea6c71ea2216bb74348aa1c6b68e3146f385a | 9,797 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/imgadm.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/imgadm.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/imgadm.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, 2017 Jasper Lievisse Adriaanse <j@jasper.la>
# 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'... | 31.705502 | 129 | 0.578136 |
c763616e2fc0bdf8ccaa39f1b90078bbf160a658 | 345 | py | Python | leetcode/168-Excel-Sheet-Column-Title/ExcelSheetColTitle_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/168-Excel-Sheet-Column-Title/ExcelSheetColTitle_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/168-Excel-Sheet-Column-Title/ExcelSheetColTitle_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def convertToTitle(self, n):
"""
:type n: int
:rtype: str
"""
res = ''
base = ord('A') - 1
while n > 0:
rem = n % 26
rem = 26 if rem == 0 else rem
res = chr(rem + base) + res
n = (n - rem)... | 23 | 41 | 0.382609 |
c78c29fb4fdf9cc522c333a830f015267925b299 | 1,091 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/meta/key_store_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/meta/key_store_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/meta/key_store_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Optional
from watchmen_auth import PrincipalService
from watchmen_data_kernel.cache import CacheService
from watchmen_meta.common import ask_meta_storage
from watchmen_meta.system import KeyStoreService as KeyStoreStorageService
from watchmen_model.common import TenantId
from watchmen_model.system i... | 33.060606 | 82 | 0.817599 |
c7b580fef3ec6f11d26161930a22476480050a46 | 547 | pyde | Python | sketches/runningorc01/runningorc01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/runningorc01/runningorc01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/runningorc01/runningorc01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | # Running Orc 01
from orc2 import Orc
orc = Orc(160, -32)
def setup():
global bg
bg = loadImage("field.png")
frameRate(30)
size(320, 320)
orc.loadPics()
orc.dx = 2
orc.dy = 2
def draw():
background(bg)
orc.move()
orc.display()
def keyPressed():
if keyPressed and... | 17.645161 | 35 | 0.50457 |
c7cdcf5204c8539c198cba755d64a43f3fc1025b | 28,319 | py | Python | src/tools/data/DataManualExamples/Simulations/contrib/SimBase/simbase.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/tools/data/DataManualExamples/Simulations/contrib/SimBase/simbase.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/tools/data/DataManualExamples/Simulations/contrib/SimBase/simbase.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | """Simulation Base Class
Handles the basics of setting up a simulation. Actual simulations
will want to subclass this with a class which defines actual
data and metadata, and also with something that will run
algorithm epochs.
Concepts are taken from, and occasionally idioms borrowed from,
the updateplots.py sample.... | 44.667192 | 120 | 0.595819 |
90c82c43c3eca00a6743d066b39cf0ab21f176e8 | 9,598 | py | Python | frappe-bench/apps/erpnext/erpnext/stock/stock_balance.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/stock_balance.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/stock_balance.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import print_function, unicode_literals
import frappe
from frappe.utils import flt, cstr, nowdate, nowtime
from erpnext.stock.utils import update_bin
from erpnext.stock.stock_... | 35.813433 | 101 | 0.713378 |
90d58f4c414733ef33c952dc928329366227325a | 9,605 | py | Python | scripts/unification/move_zn_element.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/unification/move_zn_element.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/unification/move_zn_element.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.7
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import fileinput
import json
import os
import re
import subprocess
import sys
SCRIPT_DIR = os.path.dirname(os.path.... | 37.228682 | 122 | 0.571577 |
291238740b1ddde712947dbcc3e247759c297d46 | 1,075 | py | Python | benwaonline/entities/post.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | benwaonline/entities/post.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | 16 | 2017-09-13T10:21:40.000Z | 2020-06-01T04:32:22.000Z | benwaonline/entities/post.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | from benwaonline.entities import Entity
from benwaonline.gateways import PostGateway
class Post(Entity):
'''Represents a Post resource object, related to the Post model in the database
Attributes:
type_: 'post'
'''
_schema = 'PostSchema'
type_ = 'post'
attrs = {
'comment': 'co... | 26.875 | 136 | 0.608372 |
c30f9a3df3f183b4956e4a5a4e267897b0221b6e | 6,425 | py | Python | robot/douyin/by_id.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | robot/douyin/by_id.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | robot/douyin/by_id.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 -*-
import random
import sys
from urllib.parse import urlparse
from urllib.parse import quote
import requests
from bs4 import BeautifulSoup
import json
import os
import re
from contextlib import closing
import time
import certifi
import urllib3
class DouYin(object):
... | 43.412162 | 542 | 0.639844 |
5ee7c02af2cd134c9eecb84b905a9eff61a384fa | 445 | py | Python | Algorithms/Greedy/mark_and_toys.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Greedy/mark_and_toys.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Greedy/mark_and_toys.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
def maximumToys(prices, k):
sorted_prices = sorted(prices)
cnt, total = 0, 0
for p in sorted_prices:
total += p
if total > k:
break
cnt += 1
return cnt
if __name__ == "__main__":
n, k = input().strip().split(' ')
n, k = [i... | 20.227273 | 55 | 0.546067 |
6f223658076763446efab805b400748268619a31 | 521 | py | Python | Implementierung/ResearchEnvironment/AuthorizationManagement/migrations/0010_auto_20180128_2345.py | Sashks/PSE | ae2d8133a85563c33583f15b9ba76a3a2bf0c762 | [
"MIT"
] | null | null | null | Implementierung/ResearchEnvironment/AuthorizationManagement/migrations/0010_auto_20180128_2345.py | Sashks/PSE | ae2d8133a85563c33583f15b9ba76a3a2bf0c762 | [
"MIT"
] | null | null | null | Implementierung/ResearchEnvironment/AuthorizationManagement/migrations/0010_auto_20180128_2345.py | Sashks/PSE | ae2d8133a85563c33583f15b9ba76a3a2bf0c762 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.1 on 2018-01-28 22:45
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('AuthorizationManagement', '0009_auto_20180128_2344'),
]
operations = [
migrations.AlterUniqueTogether(
name='accessrequest',
... | 23.681818 | 63 | 0.604607 |
6f48652640ed18d33a58e2f3644d6363a0c1efec | 2,173 | py | Python | examples/restaurantbot/policy.py | n01deas/rasa | 79f0feeb02919142eb06b8c52da5632f1c25c251 | [
"Apache-2.0"
] | 5 | 2019-06-06T08:59:15.000Z | 2020-01-19T10:56:45.000Z | examples/restaurantbot/policy.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 56 | 2020-06-09T00:16:14.000Z | 2020-11-16T00:25:20.000Z | examples/restaurantbot/policy.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 4 | 2019-05-19T21:19:32.000Z | 2021-01-06T14:26:37.000Z | import logging
from rasa.core.policies.keras_policy import KerasPolicy
logger = logging.getLogger(__name__)
class RestaurantPolicy(KerasPolicy):
def model_architecture(self, input_shape, output_shape):
"""Build a Keras model and return a compiled model."""
from tensorflow.keras.models import Seq... | 35.622951 | 83 | 0.59549 |
6f5f4601b067d0d197cced5f9e122fe3bfd25484 | 544 | py | Python | packages/watchmen-rest-dqc/src/watchmen_rest_dqc/main.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-dqc/src/watchmen_rest_dqc/main.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-dqc/src/watchmen_rest_dqc/main.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from watchmen_rest.system import health_router
from watchmen_utilities import ArrayHelper
from .admin import catalog_router, monitor_rules_router
from .dqc import dqc
from .monitor import topic_monitor_router
from .topic_profile import topic_profile_router
app = dqc.construct()
@app.on_event("startup")
def startup()... | 24.727273 | 57 | 0.823529 |
48b3290beda2ddedd9922cb55936e61f37a36a47 | 1,412 | py | Python | modeling/head/res_unet.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | 2 | 2020-12-22T08:40:05.000Z | 2021-03-30T08:09:44.000Z | modeling/head/res_unet.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | modeling/head/res_unet.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | """ Full assembly of the parts to form the complete network """
from __future__ import division
import torch
import torch.nn as nn
from torch.nn.functional import upsample
from modeling.model_utils.unet_parts import *
import torch.nn.functional as F
class ResUNet(nn.Module):
def __init__(self, backbone,BatchNorm... | 30.695652 | 87 | 0.588527 |
d2ee7840d3278f80013902d0277dfb6830384d56 | 2,289 | py | Python | data/opendf.py | Lyceoth/DataEngineeringProject | bc3c230a23eb5f3e8d7dd5322e3b22995801dc29 | [
"Apache-2.0"
] | null | null | null | data/opendf.py | Lyceoth/DataEngineeringProject | bc3c230a23eb5f3e8d7dd5322e3b22995801dc29 | [
"Apache-2.0"
] | null | null | null | data/opendf.py | Lyceoth/DataEngineeringProject | bc3c230a23eb5f3e8d7dd5322e3b22995801dc29 | [
"Apache-2.0"
] | null | null | null | #!/bin/bash
"true" '''\' #allow running from vs code, cf. http://rosettacode.org/wiki/Multiline_shebang#Python
CUR_DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
CUR_FILE=`basename "$0"`
CMD="docker run -it --rm -v \"$PWD/data:/data\" -v \"$CUR_DIR:/src\" --name=pyspark jupyter/pyspark-notebook spark-submit \... | 38.15 | 200 | 0.709917 |
81ca2829f17c850b910e2541a76769dd5b0969b5 | 360 | py | Python | site/public/courses/SPD-2.31/archive/lab/refactoring/replace_temp_with_query_fowler.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/SPD-2.31/archive/lab/refactoring/replace_temp_with_query_fowler.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/SPD-2.31/archive/lab/refactoring/replace_temp_with_query_fowler.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | # Adapted from a Java code in the "Refactoring" book by Martin Fowler.
# Replace temp with query
# Code snippet. Not runnable.
def get_price():
base_price = quantity * item_price
discount_factor = 0
if base_price > 1000:
discount_factor = 0.95
else:
discount_factor = 0.98
... | 27.692308 | 71 | 0.663889 |
f2245790ea764346cc7aacc2262fdb63440b2f40 | 108 | py | Python | tos/nano.py | Bodia2cat/ToS | 1b8c19fd4ab5f8458f5dc1832b764430ac6e02d9 | [
"Unlicense"
] | null | null | null | tos/nano.py | Bodia2cat/ToS | 1b8c19fd4ab5f8458f5dc1832b764430ac6e02d9 | [
"Unlicense"
] | null | null | null | tos/nano.py | Bodia2cat/ToS | 1b8c19fd4ab5f8458f5dc1832b764430ac6e02d9 | [
"Unlicense"
] | null | null | null | import os
import subprocess
subprocess.call("clear")
file = input("File name: ")
os.system("nano " + file)
| 15.428571 | 27 | 0.703704 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.