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
49cb886da44e5f69540404a1bf318b3cd969d6fa
4,854
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible 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 # (at your option) any later version. # # Ansible is d...
42.578947
133
0.709312
b209bdc996da3d726a39d399cdde02419b6e8e19
434
py
Python
algorithms/ar-expsq/python2/exponentiation_by_squaring.py
NuclearCactus/FOSSALGO
eb66f3bdcd6c42c66e8fc7110a32ac021596ca66
[ "MIT" ]
59
2018-09-11T17:40:25.000Z
2022-03-03T14:40:39.000Z
algorithms/ar-expsq/python2/exponentiation_by_squaring.py
RitvikDayal/FOSSALGO
ae225a5fffbd78d0dff83fd7b178ba47bfd7a769
[ "MIT" ]
468
2018-08-28T17:04:29.000Z
2021-12-03T15:16:34.000Z
algorithms/ar-expsq/python2/exponentiation_by_squaring.py
RitvikDayal/FOSSALGO
ae225a5fffbd78d0dff83fd7b178ba47bfd7a769
[ "MIT" ]
253
2018-08-28T17:08:51.000Z
2021-11-01T12:30:39.000Z
def exponentiationSquaring(base, power): result = 1 while(power > 0): if power % 2 != 0: # if power is ODD multiply result by base result = (result * base) base = base * base # squaring base power /= 2 # half the power return result def main(): power = 3 ba...
19.727273
69
0.578341
b7a1ac3b49060e9c0b9bb8917d6099a934f3ab4f
724
py
Python
official/cv/deeplabv3plus/src/learning_rates.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/deeplabv3plus/src/learning_rates.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/deeplabv3plus/src/learning_rates.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
import numpy as np def cosine_lr(base_lr, decay_steps, total_steps): for i in range(total_steps): step_ = min(i, decay_steps) yield base_lr * 0.5 * (1 + np.cos(np.pi * step_ / decay_steps)) def poly_lr(base_lr, decay_steps, total_steps, end_lr=0.0001, power=0.9): for i in range(total_steps):...
31.478261
83
0.635359
b7de548496bf8b97a2dff60ddda40b76584f8b8e
205
py
Python
abbas-ibrahim-026/image resize.py
cornelia247/cil-internship-cohort-01
b8184337056d378eab16d26b40b26ed58cd177bb
[ "MIT" ]
null
null
null
abbas-ibrahim-026/image resize.py
cornelia247/cil-internship-cohort-01
b8184337056d378eab16d26b40b26ed58cd177bb
[ "MIT" ]
null
null
null
abbas-ibrahim-026/image resize.py
cornelia247/cil-internship-cohort-01
b8184337056d378eab16d26b40b26ed58cd177bb
[ "MIT" ]
null
null
null
from PIL import Image def imageResize(): {img} = Image.open('WA0006.jpg') # WIDTH and HEIGHT are integers resized_img = img.resize((600, 500)) resized_img.save("pictures/resized_image.jpg") imageResize()
22.777778
46
0.75122
4d5ccb8feca0d8729e125aa6c8b13d076c742fb8
1,420
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/framework/detectors/base.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
5
2022-01-30T07:35:58.000Z
2022-02-08T05:45:20.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/framework/detectors/base.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-14T02:33:28.000Z
2022-01-14T02:33:28.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/framework/detectors/base.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-03-07T10:51:21.000Z
2022-03-07T10:51:21.000Z
from abc import abstractmethod from ... import builder import paddle.nn as nn from ...registry import DETECTORS @DETECTORS.register() class BaseDetector(nn.Layer): """Base class for detectors. """ def __init__(self, backbone=None, head=None): super().__init__() def init_weights(self): ""...
27.307692
52
0.609859
4d8dea23fdc8b0e4c1193c406b18a9809fe456c6
15,754
py
Python
Assignments/2019_Fall/pa2/private_autograder/pa2autograder.py
USMC1941/CS211_Rutgers
dfcac8b9c719edc04d3e79fee3f95bf3aa40a4e8
[ "MIT" ]
24
2018-12-30T18:05:26.000Z
2022-01-18T08:36:59.000Z
Assignments/2019_Fall/pa2/private_autograder/pa2autograder.py
USMC1941/CS211_Rutgers
dfcac8b9c719edc04d3e79fee3f95bf3aa40a4e8
[ "MIT" ]
null
null
null
Assignments/2019_Fall/pa2/private_autograder/pa2autograder.py
USMC1941/CS211_Rutgers
dfcac8b9c719edc04d3e79fee3f95bf3aa40a4e8
[ "MIT" ]
12
2018-02-16T20:25:23.000Z
2021-06-29T22:39:46.000Z
#! /usr/bin/python import os import sys import glob import time import subprocess import signal import popen2 import time dict_train = {"testA.txt": "trainA.txt", "testB.txt": "trainB.txt", "testC.txt": "trainC.txt", "testD.txt": "trainD.txt", "testE.txt": "trainE.txt", "testF.txt": "trainF.txt", "testG...
32.820833
174
0.558271
4df674196b59df6a87e7fed29636a99f27869714
5,353
py
Python
0-notes/job-search/SamplesDSAlgos/sort/sort_merge_recursive.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/SamplesDSAlgos/sort/sort_merge_recursive.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/SamplesDSAlgos/sort/sort_merge_recursive.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# MERGE SORT (RECURSIVE): # divide in half until you have sub-arrays of single elements # then merge sorted lists together # very useful, easier to understand than others, recursive # effective and stable # use if you have equivalent elements; it will keep their # original order in array ...
30.414773
137
0.577994
42a8f89d90b67e2bd9bf5fa14575ee093b7a84da
3,875
py
Python
StudentAverage/students.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
StudentAverage/students.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
StudentAverage/students.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
from collections import KeysView from csv2db import Database class Student(object): def __init__(self, id, name, num_classes, average): # type: (int, str, int, float) -> None self.id = id self.name = name self.num_classes = num_classes self.average = average ...
32.563025
98
0.564387
35eab63cc1d0799d420b80e0d6928d2da6ba193b
2,854
py
Python
stiefo/stiefo_curves_interactive.py
effjot/stiefogen
da149f22912fa3b31fc2660ff01e4e0ca08d5efe
[ "MIT" ]
14
2015-04-30T08:50:53.000Z
2021-08-23T13:58:12.000Z
stiefo/stiefo_curves_interactive.py
effjot/stiefogen
da149f22912fa3b31fc2660ff01e4e0ca08d5efe
[ "MIT" ]
4
2020-08-28T20:45:47.000Z
2021-04-06T21:56:25.000Z
stiefo/stiefo_curves_interactive.py
effjot/stiefogen
da149f22912fa3b31fc2660ff01e4e0ca08d5efe
[ "MIT" ]
5
2015-05-01T06:40:40.000Z
2019-12-12T22:17:29.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'stiefo_curves_interactive.ui' # # Created by: PyQt5 UI code generator 5.11.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_stiefo_curves(object): def setupUi(self, stiefo_c...
49.206897
108
0.747372
c469f08659e4ba8e036d2131631940e88c7194a5
1,833
py
Python
src/bo4e/com/preisgarantie.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/com/preisgarantie.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/com/preisgarantie.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains Preisgarantie class and corresponding marshmallow schema for de-/serialization """ from typing import Optional import attr from marshmallow import fields from marshmallow_enum import EnumField # type:ignore[import] from bo4e.com.com import COM, COMSchema from bo4e.com.zeitraum import Zeitraum, Zeitraum...
33.944444
181
0.761593
c0486967e8d2bfb8c38fb69ecc8f134270d648a8
195
py
Python
scanner.py
argifood/Be2
df190bc784d0e1de18d38f370bc5be590d2421e2
[ "Apache-2.0" ]
null
null
null
scanner.py
argifood/Be2
df190bc784d0e1de18d38f370bc5be590d2421e2
[ "Apache-2.0" ]
null
null
null
scanner.py
argifood/Be2
df190bc784d0e1de18d38f370bc5be590d2421e2
[ "Apache-2.0" ]
null
null
null
from PIL import Image import PIL.Image from pytesseract import image_to_string import pytesseract output = pytesseract.image_to_string(PIL.Image.open('apodixi2.png'), lang='ell') print(output)
21.666667
80
0.810256
3f2ba91f12b8f27db5a9b792bed7e1358f1c5c75
1,633
py
Python
src/test/tests/databases/Chombo.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/test/tests/databases/Chombo.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/test/tests/databases/Chombo.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: Chombo.py # # Tests: mesh - 2D AMR # plots - Pseudocolor # # Programmer: Brad Whitlock # Date: Mon Sep 25 14:17:58 PST 2006 # # Modifications: # Mark C. Miller, Wed...
24.742424
78
0.567055
18b5b8cdc6c238a8a65039d7712b471ebe05c5ad
303
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v9_2/set_item_name_in_production_order.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v9_2/set_item_name_in_production_order.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v9_2/set_item_name_in_production_order.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
import frappe def execute(): frappe.db.sql(""" update `tabBOM Item` bom, `tabWork Order Item` po_item set po_item.item_name = bom.item_name, po_item.description = bom.description where po_item.item_code = bom.item_code and (po_item.item_name is null or po_item.description is null) """)
25.25
65
0.732673
e14a3f059158b31669b39188c86d0c435998fb2c
2,745
py
Python
rawio/lens/lens.py
hdkai/Raw-IO
f0fa928d7ef59a363c6f4c876d642af6dede6ae4
[ "Apache-2.0" ]
null
null
null
rawio/lens/lens.py
hdkai/Raw-IO
f0fa928d7ef59a363c6f4c876d642af6dede6ae4
[ "Apache-2.0" ]
null
null
null
rawio/lens/lens.py
hdkai/Raw-IO
f0fa928d7ef59a363c6f4c876d642af6dede6ae4
[ "Apache-2.0" ]
null
null
null
# # RawIO # Copyright (c) 2021 Yusuf Olokoba. # from lensfunpy import Database, Modifier from PIL import Image from torch import from_numpy, Tensor from torch.nn.functional import grid_sample def lens_grid (metadata: dict, width: int, height: int) -> Tensor: """ Compute lens correction sample grid. ...
36.6
105
0.680146
36606bbba8af85c1f58004c5617e4707b67503d7
3,166
py
Python
Packs/FeedCyrenThreatInDepth/Scripts/CyrenThreatInDepthRandomHunt/CyrenThreatInDepthRandomHunt.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FeedCyrenThreatInDepth/Scripts/CyrenThreatInDepthRandomHunt/CyrenThreatInDepthRandomHunt.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FeedCyrenThreatInDepth/Scripts/CyrenThreatInDepthRandomHunt/CyrenThreatInDepthRandomHunt.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 enum import Enum from random import randrange import yaml class FeedName(str, Enum): IP_REPUTATION = "ip_reputation" PHISHING_URLS = "phishing_urls" MALWARE_URLS = "malware_urls" MALWARE_FILES = ...
32.979167
95
0.665824
182b2bf0defceefc8ca18ace5c8be3aac4a0d88b
520
py
Python
exercises/python/functionals/reduce-fractions.py
rogeriosantosf/hacker-rank-profile
d4b9c131524d138c415e5c5de4e38c6b8c35dd77
[ "MIT" ]
null
null
null
exercises/python/functionals/reduce-fractions.py
rogeriosantosf/hacker-rank-profile
d4b9c131524d138c415e5c5de4e38c6b8c35dd77
[ "MIT" ]
null
null
null
exercises/python/functionals/reduce-fractions.py
rogeriosantosf/hacker-rank-profile
d4b9c131524d138c415e5c5de4e38c6b8c35dd77
[ "MIT" ]
null
null
null
# Given a list of rational numbers, # find their product and print it in it's simplest form. # Sample input # 3 # 1 2 # 3 4 # 10 6 # Sample output # 5 8 from fractions import Fraction from functools import reduce def product(fracs): t = reduce(lambda acc, fraction: acc * fraction, fracs) return t.numerato...
18.571429
59
0.661538
182d6a8824758950424c17482f0b3956efa1a799
3,898
py
Python
BCACTF/2021/crypto/FNES_3/fnes3.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
BCACTF/2021/crypto/FNES_3/fnes3.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
BCACTF/2021/crypto/FNES_3/fnes3.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import random import math import time import binascii p = 2**135 + 2**75 + 1 a = 313370 b = 12409401451673702436179381616844751057480 # discriminant is zero g = (313379, 9762458732130899649993884045943131856797, False) def negp(P): x,y,z = P return (-x,y,z) def dubp(P): x,y,z = P ...
30.936508
110
0.544638
a15300682c539445fd943bf86466480b6824cead
4,464
py
Python
as-wechsel/alte_vau_instanz.py
bergerst/api-ePA
9a1b239c43d752837fcdfbf08b6c3f369f3063de
[ "Apache-2.0" ]
1
2021-09-09T21:34:59.000Z
2021-09-09T21:34:59.000Z
as-wechsel/alte_vau_instanz.py
gematik/ref-ePA-HealthRecordMigration
12fa995b4f790c1f7d7dc8ed49b9cf81713c2aaa
[ "Apache-2.0" ]
null
null
null
as-wechsel/alte_vau_instanz.py
gematik/ref-ePA-HealthRecordMigration
12fa995b4f790c1f7d7dc8ed49b9cf81713c2aaa
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: UTF-8 -*- """ Das ist die Referenzimplementierung für die Verschlüsselung und Signatur beim Export der Akte für den AS-Wechsel. Die alte VAU-Instanz stellt das Export-Paket zunächst als ZIP-File zusammen. Und dann wird es mit dem Kontextschlüssel der Akte via AES/GCM verschlüssel...
45.55102
82
0.72491
b8cbbf1e4d8283731af0bbf52f3a1241d41cee7f
13
py
Python
src/arena.py
python-upskill/levelup
89655a560b83956e4d696914907158177ce47c1e
[ "BSD-3-Clause" ]
1
2020-04-24T05:47:20.000Z
2020-04-24T05:47:20.000Z
src/arena.py
radowit/levelup
89655a560b83956e4d696914907158177ce47c1e
[ "BSD-3-Clause" ]
7
2020-04-27T16:16:05.000Z
2020-04-28T13:46:21.000Z
src/arena.py
radowit/levelup
89655a560b83956e4d696914907158177ce47c1e
[ "BSD-3-Clause" ]
null
null
null
WORKS = True
6.5
12
0.692308
65c17beb55097971ccc0e19e01b7b4ffdca7bd27
1,964
py
Python
src/python3_learn_video/BIF_about_object_class.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/python3_learn_video/BIF_about_object_class.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/python3_learn_video/BIF_about_object_class.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
""" 与类和对象相关的一些BIF: 1.一个类被认为是其自身的子类 issubclass(class,classinfo) 2.classinfo可以是类对象组成的元组,只要class与其中任何一个候选类的子类,则返回True issubclass(class,classinfo) """ class A: pass class B(A): pass print('--------------------------------------------') print(issubclass(B, A)) print('-------------------------------------...
14.992366
53
0.483198
b27849d0a3dd4a9e28398731288f061fda867c94
324
py
Python
Assignments/Assignment 6/leap_year.py
ryan-gonfiantini/CMPT-120L-902-21S
e5807251e26ce422ce0c70f99ac62661b5881c18
[ "MIT" ]
null
null
null
Assignments/Assignment 6/leap_year.py
ryan-gonfiantini/CMPT-120L-902-21S
e5807251e26ce422ce0c70f99ac62661b5881c18
[ "MIT" ]
null
null
null
Assignments/Assignment 6/leap_year.py
ryan-gonfiantini/CMPT-120L-902-21S
e5807251e26ce422ce0c70f99ac62661b5881c18
[ "MIT" ]
null
null
null
def leap_year(n): for i in range(2,n): if (n % 4) == 0: if (n % 400) == 0: return True return False years=[2000, 1994, 1912, 3002, 1700, 1400] for i in years: if leap_year(i): print(i, "is a leap year") else: print(i, "is not a leap year") ...
17.052632
43
0.469136
a2720e0ebf7f6795b5f610b009e4972427524823
392
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v4_0/remove_module_home_pages.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/patches/v4_0/remove_module_home_pages.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v4_0/remove_module_home_pages.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 # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): for page in ("accounts-home", "website-home", "support-home", "stock-home", "selling-home", "projects-home", "manufactu...
39.2
109
0.734694
a7bd3c0669b1c04952e021c2c6f60e46f545400c
8,097
py
Python
utils/time_util.py
zhouhongf/bank_hr
a42e5e18f3ec36b1ec65931415fe476c9690e0a0
[ "MIT" ]
2
2021-11-27T06:40:47.000Z
2022-01-06T03:12:46.000Z
utils/time_util.py
zhouhongf/bank_hr
a42e5e18f3ec36b1ec65931415fe476c9690e0a0
[ "MIT" ]
null
null
null
utils/time_util.py
zhouhongf/bank_hr
a42e5e18f3ec36b1ec65931415fe476c9690e0a0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import time from datetime import datetime, date, timedelta from numpy import long import locale import re def timestamp_to_strtime(timestamp): """将 13 位整数的毫秒时间戳转化成本地普通时间 (字符串格式) :param timestamp: 13 位整数的毫秒时间戳 (1456402864242) :return: 返回字符串格式 {str}'2016-02-25 20:21:04.242000' ""...
28.212544
110
0.59133
ce1d4b89e4062a2904f4abae689655b788f0d7b0
1,917
py
Python
tssb/process.py
sharadmv/tssb
9385ea9ab199070034a36f92b6520152f801823a
[ "MIT" ]
null
null
null
tssb/process.py
sharadmv/tssb
9385ea9ab199070034a36f92b6520152f801823a
[ "MIT" ]
null
null
null
tssb/process.py
sharadmv/tssb
9385ea9ab199070034a36f92b6520152f801823a
[ "MIT" ]
null
null
null
import scipy.stats as stats import numpy as np class RandomProcess(object): def __init__(self, next, ndtype=np.longdouble): self.next = next self.ndtype = ndtype self.items = [] self.cur_index = -1 class IndependentRandomProcess(RandomProcess): def __getitem__(self, key): ...
30.428571
83
0.604591
ce4446101a80b034c50f22574724d5d740457903
133
py
Python
pythonProj/FZPython/pyquant/models/stock_index.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
null
null
null
pythonProj/FZPython/pyquant/models/stock_index.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
null
null
null
pythonProj/FZPython/pyquant/models/stock_index.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
2
2019-04-10T10:05:00.000Z
2021-11-24T17:17:23.000Z
#!/usr/bin/env python # coding: utf8 from enum import Enum class StockIndex(Enum): """ 大盘指数 """ SH = 2408 #上证
8.866667
23
0.556391
f025517210c7a70a46d3bf586f40b8509212f76e
1,148
py
Python
project/views/image.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
1
2021-06-01T14:49:18.000Z
2021-06-01T14:49:18.000Z
project/views/image.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
286
2020-12-04T14:13:00.000Z
2022-03-09T19:05:16.000Z
project/views/image.py
DanielGrams/gsevpt
a92f71694388e227e65ed1b24446246ee688d00e
[ "MIT" ]
null
null
null
import os from io import BytesIO import PIL from flask import request, send_file from sqlalchemy.orm import load_only from project import app, img_path from project.models import Image from project.utils import make_dir @app.route("/image/<int:id>") @app.route("/image/<int:id>/<hash>") def image(id, hash=None): ...
25.511111
88
0.680314
6535573ff6068d40c4762be7542c1412e5e90db7
2,527
py
Python
GroupMonitorForFF/recorder.py
TitusWongCN/WeChatRelativeTools
9307bae8c15e47b5bbf169a95a50be0d107a5bb1
[ "MIT" ]
null
null
null
GroupMonitorForFF/recorder.py
TitusWongCN/WeChatRelativeTools
9307bae8c15e47b5bbf169a95a50be0d107a5bb1
[ "MIT" ]
null
null
null
GroupMonitorForFF/recorder.py
TitusWongCN/WeChatRelativeTools
9307bae8c15e47b5bbf169a95a50be0d107a5bb1
[ "MIT" ]
null
null
null
# -*- coding=utf-8 -*- # python35 from utils import * from itchat.content import * import itchat import os config_file = './config.ini' # isGroupChat=True表示为群聊消息 @itchat.msg_register([TEXT, MAP, CARD, NOTE, SHARING], isGroupChat=True) def group_reply(msg): is_target = False group_name = msg['User']['NickName'...
36.623188
111
0.616937
33720e01cb79d70af5dce434ab26edef59901d67
2,280
py
Python
research/cv/MaskedFaceRecognition/test_dataset.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/MaskedFaceRecognition/test_dataset.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/MaskedFaceRecognition/test_dataset.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...
34.545455
87
0.698684
d79e802453abab9ec5687fbad2db8cf30f8380b7
93
py
Python
rad/__init__.py
dlegor/rad
7a34bf55ce21adc860ff28a2c9d66943acd6ae6a
[ "BSD-3-Clause" ]
10
2020-10-08T21:57:23.000Z
2022-02-18T04:30:46.000Z
rad/__init__.py
dlegor/rad
7a34bf55ce21adc860ff28a2c9d66943acd6ae6a
[ "BSD-3-Clause" ]
1
2020-07-07T17:27:27.000Z
2020-07-09T12:20:43.000Z
rad/__init__.py
dlegor/rad
7a34bf55ce21adc860ff28a2c9d66943acd6ae6a
[ "BSD-3-Clause" ]
1
2021-01-18T15:46:29.000Z
2021-01-18T15:46:29.000Z
from rad._anomaly_detection import AnomalyDetection_RPCA __all__=['AnomalyDetection_RPCA']
18.6
56
0.860215
ac993b5d8fd716c1b8a2f297514f20b14b37b1cc
1,126
py
Python
Computerorietierte_Mathematik/U2/run_2_3.py
qiaw99/Data-Structure
3b1cdce96d4f35329ccfec29c03de57378ef0552
[ "MIT" ]
1
2019-10-29T08:21:41.000Z
2019-10-29T08:21:41.000Z
Computerorietierte_Mathematik/U2/run_2_3.py
qiaw99/Data-Structure
3b1cdce96d4f35329ccfec29c03de57378ef0552
[ "MIT" ]
null
null
null
Computerorietierte_Mathematik/U2/run_2_3.py
qiaw99/Data-Structure
3b1cdce96d4f35329ccfec29c03de57378ef0552
[ "MIT" ]
null
null
null
__author__ = "Qianli und Nazar" __copyright__ = "Copyright (c) 2019 qiaw99" # https://github.com/qiaw99/WS2019-20/blob/master/LICENSE from plotErrors import * from U2_A3 import * # Aufgabe 3d) def fill_src_arr (X): for i in range (1 ,100001): #first value is 0.001, goes till (upper bound - 1) X.append(i...
26.809524
84
0.657194
c5a3ca9edb0b4d53fd202ac57718da3717616600
8,595
py
Python
Integrations/python/deephaven/lang/analyzer.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
55
2021-05-11T16:01:59.000Z
2022-03-30T14:30:33.000Z
Integrations/python/deephaven/lang/analyzer.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
943
2021-05-10T14:00:02.000Z
2022-03-31T21:28:15.000Z
Integrations/python/deephaven/lang/analyzer.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
29
2021-05-10T11:33:16.000Z
2022-03-30T21:01:54.000Z
""" The analyzer is used for inspecting the user's source, detecting column and variable references as well as inferring return types using numba's internal infrastructure. **The contents of this module are intended only for internal Deephaven use and may change at any time.** """ import numba import numpy from _ast ...
53.055556
121
0.651658
c5cc4c38e91ab4876714e6d3dbc35b72535c5dc9
1,784
py
Python
check/check_plz_against_database.py
cyber-perikarp/auskunftsbegehren_at_adressen_parser
bc3ba4b7d3fc1da29fa5e505131cc1c7e90fd9b9
[ "MIT" ]
null
null
null
check/check_plz_against_database.py
cyber-perikarp/auskunftsbegehren_at_adressen_parser
bc3ba4b7d3fc1da29fa5e505131cc1c7e90fd9b9
[ "MIT" ]
null
null
null
check/check_plz_against_database.py
cyber-perikarp/auskunftsbegehren_at_adressen_parser
bc3ba4b7d3fc1da29fa5e505131cc1c7e90fd9b9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ################################################ # Prüft die Datensätze gegen die PLZ Datenbank # ################################################ import csv import os import argparse # workDir is the parent folder workDir = os.path.abspath(os.path.join(os.path.dirname(...
38.782609
135
0.630045
767b85a15235bf4418e787aeb9516dd8f04b6433
2,037
py
Python
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/InstancesCheck_FailedCategories/InstancesCheck_FailedCategories.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/InstancesCheck_FailedCategories/InstancesCheck_FailedCategories.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/InstancesCheck_FailedCategories/InstancesCheck_FailedCategories.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import collections import random from typing import Counter import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 def parse_data(instances_category): instances_category_data = [] instances_collections: Counter = collections.Counter(instances_category) top_instances =...
25.78481
101
0.482572
7690bfc63a282d1ef57d0fbb17b2388d911ed633
653
py
Python
retro/testing/verify_changes.py
MatPoliquin/retro
c70c174a9818d1e97bc36e61abb4694d28fc68e1
[ "MIT-0", "MIT" ]
2,706
2018-04-05T18:28:50.000Z
2022-03-29T16:56:59.000Z
retro/testing/verify_changes.py
MatPoliquin/retro
c70c174a9818d1e97bc36e61abb4694d28fc68e1
[ "MIT-0", "MIT" ]
242
2018-04-05T22:30:42.000Z
2022-03-19T01:55:11.000Z
retro/testing/verify_changes.py
MatPoliquin/retro
c70c174a9818d1e97bc36e61abb4694d28fc68e1
[ "MIT-0", "MIT" ]
464
2018-04-05T19:10:34.000Z
2022-03-28T13:33:32.000Z
#!/usr/bin/env python import pytest import retro.testing as testdata import subprocess import sys if len(sys.argv) == 2: branches = [sys.argv[1]] elif len(sys.argv) == 3: branches = [sys.argv[1], sys.argv[2]] else: branches = ['master'] check = testdata.branch_new(*branches) if check: args = ['-q', '-...
27.208333
76
0.618683
4f530849dffac63939c667b44e60c3912cc11ee5
7,006
py
Python
web/controllers/stat/Stat.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
1
2020-03-24T04:26:34.000Z
2020-03-24T04:26:34.000Z
web/controllers/stat/Stat.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
web/controllers/stat/Stat.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from flask import Blueprint,request from common.libs.Helper import ops_render from application import app from common.libs.Helper import get_format_date,i_pagination,get_dict_filter_field,select_filter_obj from common.models.stat.StatDailySite import StatDailySite from common.models.stat.StatDa...
38.076087
106
0.643877
4f7a494512b2ebfecd58e965e5cf77cc2c7b7df7
359
py
Python
Marlin/src/HAL/DUE/upload_extra_script.py
tom-2273/Tronxy_SKR_mini_E3_V20
bc4a8dc2c6c627e4bd7aa423794246f5b051448d
[ "CC0-1.0" ]
null
null
null
Marlin/src/HAL/DUE/upload_extra_script.py
tom-2273/Tronxy_SKR_mini_E3_V20
bc4a8dc2c6c627e4bd7aa423794246f5b051448d
[ "CC0-1.0" ]
null
null
null
Marlin/src/HAL/DUE/upload_extra_script.py
tom-2273/Tronxy_SKR_mini_E3_V20
bc4a8dc2c6c627e4bd7aa423794246f5b051448d
[ "CC0-1.0" ]
null
null
null
# # Set upload_command # # Windows: bossac.exe # Other: leave unchanged # import pioutil if pioutil.is_pio_build(): import platform current_OS = platform.system() if current_OS == 'Windows': Import("env") # Use bossac.exe on Windows env.Replace( UPLOADCMD="bossac --info --unlock --write --verify --rese...
17.95
94
0.682451
96f6c9aed475cd6a469759d1a8ee1540000e1926
2,083
py
Python
library/core/buttons.py
ptphp/PtServer
d590360f853a64e989ba52591548b8a67390f27c
[ "BSD-3-Clause" ]
1
2017-08-09T23:15:15.000Z
2017-08-09T23:15:15.000Z
library/core/buttons.py
ptphp/PtServer
d590360f853a64e989ba52591548b8a67390f27c
[ "BSD-3-Clause" ]
null
null
null
library/core/buttons.py
ptphp/PtServer
d590360f853a64e989ba52591548b8a67390f27c
[ "BSD-3-Clause" ]
null
null
null
from PySide.QtCore import * from utils import debug class BaseButtons(QObject): def set_buttons(self): self.nginx_reload_btn.setEnabled(False) self.php_restart_btn.setDisabled(True) self.nginx_start_btn.clicked.connect(self._on_nginx_start) self.nginx_reload_btn.clicked.connect(self...
36.54386
68
0.663466
8ccf028d687018f89e47def8694ac2ced16ab0c2
947
py
Python
python/simstb_konfig.py
MarkusBreuer1964/SimSTB
d9a530a5457b4296961e09b955e99900a6ea9047
[ "MIT" ]
null
null
null
python/simstb_konfig.py
MarkusBreuer1964/SimSTB
d9a530a5457b4296961e09b955e99900a6ea9047
[ "MIT" ]
null
null
null
python/simstb_konfig.py
MarkusBreuer1964/SimSTB
d9a530a5457b4296961e09b955e99900a6ea9047
[ "MIT" ]
1
2020-11-26T09:42:53.000Z
2020-11-26T09:42:53.000Z
""" SimSTB - Konfigurationsdaten SimSTB - Simulation digitaler und analoger Ein- und Ausgaben Das Modul Konfiguration stellt zentrale Konfigurationsdaten, wie z.B. Längen, Dateinamen inkl. Pfad oder Signalformen zur Verfügung. Name: Markus Breuer Organisaion: STB Erstell...
36.423077
105
0.644139
0fba514757ab1a126e82d4c25ebc4f5e97b6c297
15,886
py
Python
transonic/backends/base.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
transonic/backends/base.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
transonic/backends/base.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
"""Base class for the Transonic backends ======================================== Internal API ------------ .. autoclass:: Backend :members: :private-members: """ from pathlib import Path from textwrap import indent from typing import Iterable, Optional # from pprint import pprint import transonic from tra...
31.457426
82
0.598263
ad832e25cb95757831144dd1a96c03318ed92705
810
py
Python
quant/observers/t_lq_bch.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
7
2017-10-22T15:00:09.000Z
2019-09-19T11:45:43.000Z
quant/observers/t_lq_bch.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
1
2018-01-19T16:19:40.000Z
2018-01-19T16:19:40.000Z
quant/observers/t_lq_bch.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 from .t_lq import T_Lq class T_Lq_BCH(T_Lq): """ bch: python -m quant.cli -mBitfinex_BCH_USD,Liqui_BCC_BTC,Bitfinex_BTC_USD -o=T_Lq_BCH -f=liqui_bch -v 目前的限制: """ def __init__(self): base_pair = "Bitfinex_...
24.545455
101
0.561728
d168c1d3221851398d32f916dd88bfe15bc7ee92
2,880
py
Python
Modell/CSV/diagramm_mc_zeit.py
NoahEmbedded/EmbeddedKWD
2380d56b0b75bae4fedeb60885358332766f7319
[ "MIT" ]
null
null
null
Modell/CSV/diagramm_mc_zeit.py
NoahEmbedded/EmbeddedKWD
2380d56b0b75bae4fedeb60885358332766f7319
[ "MIT" ]
null
null
null
Modell/CSV/diagramm_mc_zeit.py
NoahEmbedded/EmbeddedKWD
2380d56b0b75bae4fedeb60885358332766f7319
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np #Daten aus Messung vorverarbeitungsdauer = np.array([317,317,318,318,317,318,319,321,317,320,319,321,321,319,320,321,319,319,320,321,318,321,319,321,321,321,321,321,320,319,320,319,319,318,318,318,320,321,321,320,321,321,320,320,321,320,321,321,321,321,321,319,317,321...
55.384615
527
0.746875
0f6519c1941662a854dc1230acb13bc00e14f53d
13,424
py
Python
MAIN/STM32F405_C/NORMAL/history/V29/register.py
ozturkahmetcevdet/VSenst
07c068fefcbd66ae4d8ec0480b4da10d6b5c7410
[ "MIT" ]
null
null
null
MAIN/STM32F405_C/NORMAL/history/V29/register.py
ozturkahmetcevdet/VSenst
07c068fefcbd66ae4d8ec0480b4da10d6b5c7410
[ "MIT" ]
null
null
null
MAIN/STM32F405_C/NORMAL/history/V29/register.py
ozturkahmetcevdet/VSenst
07c068fefcbd66ae4d8ec0480b4da10d6b5c7410
[ "MIT" ]
null
null
null
import gc from micropython import const from SX1239 import RF_COMING_DATA_SIZE from PXSensor import PxHub import os import peripheral import binascii import json CONSOLE_DEBUG_TOOL = True OPEN_SCENE_SHOW_TIME = const(1000) CLOSING_TIME = const(10000) CLOSE_SCENE_SHOW_TIME = const(1000) MAX_SEAT_N...
53.059289
371
0.496871
7eaf232b258042a1133b7eb69e94cca6386c86ee
9,171
py
Python
Tests/Marketplace/zip_packs.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Tests/Marketplace/zip_packs.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Tests/Marketplace/zip_packs.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import argparse import json import os import shutil import sys import logging from zipfile import ZipFile from Tests.Marketplace.marketplace_constants import IGNORED_FILES, PACKS_FULL_PATH from Tests.scripts.utils.log_util import install_logging from demisto_sdk.commands.common.tools import LooseVersion, str2bool, get_...
39.701299
117
0.647585
ada55f1a2d268c6ea244c3804197c844484e5569
5,708
py
Python
a/v1_interpreter.py
nd9600/NotAL
41a1b92f8fdf7a734876fd0a003c262a6489ddfd
[ "MIT" ]
null
null
null
a/v1_interpreter.py
nd9600/NotAL
41a1b92f8fdf7a734876fd0a003c262a6489ddfd
[ "MIT" ]
null
null
null
a/v1_interpreter.py
nd9600/NotAL
41a1b92f8fdf7a734876fd0a003c262a6489ddfd
[ "MIT" ]
null
null
null
#!/usr/bin/python # subleq a, b, c ; Mem[b] = Mem[b] - Mem[a] # ; if (Mem[b] = 0) goto c # . at start means it's not an instruction # . a:b defines a label a to be b # . a: defines a label for a position # z always = 0 # ? ; jump to next line # a ; same as a a ? # a b ; same as a b ? ...
32.617143
100
0.487737
bc1df608628e432171faa2414d89b833cc22b5ae
3,622
py
Python
backend/fakebox/client.py
teodorvoicencu/FakeBox
f14ca83643894d9d0761294cfce511a52401de68
[ "MIT" ]
null
null
null
backend/fakebox/client.py
teodorvoicencu/FakeBox
f14ca83643894d9d0761294cfce511a52401de68
[ "MIT" ]
null
null
null
backend/fakebox/client.py
teodorvoicencu/FakeBox
f14ca83643894d9d0761294cfce511a52401de68
[ "MIT" ]
null
null
null
import json import logging from dataclasses import dataclass from typing import Callable import asyncio import websockets from common.actions import Actions from common.handling_exception import HandlingException logging.basicConfig(level=logging.INFO) STATE = {} URI = "ws://localhost:8765" def set_id(uuid: int):...
27.439394
107
0.622584
cb37ab42d3ce73e6a86b49500fb7b2e22a4d9bc6
32,441
py
Python
scripts/rebuild_docs.py
sparks-baird/matbench
4424609454286e32fff2bcc724379b2a316c5a76
[ "MIT" ]
15
2021-11-01T09:02:19.000Z
2022-03-19T10:59:41.000Z
scripts/rebuild_docs.py
sparks-baird/matbench
4424609454286e32fff2bcc724379b2a316c5a76
[ "MIT" ]
62
2021-09-20T14:09:59.000Z
2022-03-30T19:03:22.000Z
scripts/rebuild_docs.py
sparks-baird/matbench
4424609454286e32fff2bcc724379b2a316c5a76
[ "MIT" ]
3
2021-11-26T10:13:48.000Z
2022-01-08T06:56:03.000Z
import json import os import glob import logging import pprint from operator import gt, lt import tqdm from monty.serialization import loadfn import pandas as pd import plotly.express as px import plotly.graph_objs as go import numpy as np from matbench.task import MatbenchTask from matbench.bench import MatbenchBenc...
39.465937
167
0.567584
cba5d7b1b673b9f8f402bed7cde850f1b827aabe
1,673
py
Python
Packs/NetCalc/Scripts/IPCalcReturnAddressIANAAllocation/IPCalcReturnAddressIANAAllocation.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/NetCalc/Scripts/IPCalcReturnAddressIANAAllocation/IPCalcReturnAddressIANAAllocation.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/NetCalc/Scripts/IPCalcReturnAddressIANAAllocation/IPCalcReturnAddressIANAAllocation.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 * import ipaddress import traceback ''' COMMAND FUNCTION ''' def return_address_info_command(args: Dict[str, Any]) -> CommandResults: ip_address = args.get('ip_address', None) address_info = 'unspecified' ...
25.738462
93
0.698745
2acfd35f48e7180c25e92319225ba83e627e3d9a
3,915
py
Python
SBTK_League_Helper/src/tools/serializers.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
SBTK_League_Helper/src/tools/serializers.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
SBTK_League_Helper/src/tools/serializers.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractmethod from .misc import id_function from .dictionaries import subdict # MAIN OBJECT class Serializer(object, metaclass = ABCMeta): # pseudo abstract class def __init__(self, object_type, parser, unparser): # parser and unparser must do the transformations between ...
32.090164
174
0.571648
2d7448b4870a9824e22e54b174b903fc07e1858b
4,536
py
Python
RDS/circle1_adapters_and_ports/port_zenodo/src/api/project/project.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
10
2020-06-24T08:22:24.000Z
2022-01-13T16:17:36.000Z
RDS/circle1_adapters_and_ports/port_zenodo/src/api/project/project.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
78
2020-01-23T14:32:06.000Z
2022-03-07T14:11:16.000Z
RDS/circle1_adapters_and_ports/port_zenodo/src/api/project/project.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
1
2020-06-24T08:33:48.000Z
2020-06-24T08:33:48.000Z
import json from RDS import ROParser import logging import os from lib.upload_zenodo import Zenodo from flask import jsonify, request, g, current_app from werkzeug.exceptions import abort from lib.Util import require_api_key, to_jsonld, from_jsonld logger = logging.getLogger() @require_api_key def index(): req =...
25.2
78
0.609788
577e2e740feda47f0de853d6a2538c5dce0c1c54
2,216
py
Python
src/lecture3/svm_expi.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
1
2020-08-17T07:09:09.000Z
2020-08-17T07:09:09.000Z
src/lecture3/svm_expi.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
null
null
null
src/lecture3/svm_expi.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
2
2020-07-26T07:27:57.000Z
2020-08-17T07:09:15.000Z
#here from python.svmutil import * from My_Explorer import * from hog.hog import hog import numpy as np # here from ROC_plot.draw_plot import draw_roc_plot from sklearn.metrics import roc_curve # here dataset = MyExplorer(ipath,lpath) train_x,train_y,valid_x,valid_y = dataset.split_single() def get_hog(x): X = []...
38.877193
159
0.616426
57d8792354069843cb4fb5dd89dbd533f084a7f9
13,567
py
Python
Packs/XSOARLabUpdates/Scripts/BuildSlackBlocksFromIndex/BuildSlackBlocksFromIndex.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/XSOARLabUpdates/Scripts/BuildSlackBlocksFromIndex/BuildSlackBlocksFromIndex.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/XSOARLabUpdates/Scripts/BuildSlackBlocksFromIndex/BuildSlackBlocksFromIndex.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 import json import os import re import pytz from dateparser import parse from tempfile import mkdtemp from zipfile import ZipFile from datetime import datetime from typing import List, Union DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' MP...
33.832918
120
0.596374
5e2e8a0153f2ec47f0f37918d796de5dfb42393b
1,489
py
Python
dataoper.py
two-doges/tpf
a98f68fba40b3f07ce0ef14f6ca982e915ee3e07
[ "MIT" ]
2
2018-03-04T13:36:22.000Z
2018-03-04T13:36:33.000Z
dataoper.py
two-doges/tpf
a98f68fba40b3f07ce0ef14f6ca982e915ee3e07
[ "MIT" ]
null
null
null
dataoper.py
two-doges/tpf
a98f68fba40b3f07ce0ef14f6ca982e915ee3e07
[ "MIT" ]
null
null
null
import sqlite3 as sq import os import sys sys.path.append("..") import randtext import devdata def make_table(pat=""): con = sq.connect(pat) cu = con.cursor() cu.execute("create table tpf_data(idd varchar(20) UNIQUE,key varchar(52))") con.commit() con.close() print("make table success") def ...
23.265625
79
0.607119
eaeef74a9a1ebad5bf3e09608ef8cbfc586d1437
1,499
py
Python
encoder.py
gluttony2016/RNN
8991f020abdb5b28d9f73062dbfcd88d30d760a8
[ "MIT" ]
null
null
null
encoder.py
gluttony2016/RNN
8991f020abdb5b28d9f73062dbfcd88d30d760a8
[ "MIT" ]
null
null
null
encoder.py
gluttony2016/RNN
8991f020abdb5b28d9f73062dbfcd88d30d760a8
[ "MIT" ]
null
null
null
import tensorflow as tf from config.configurable import Configurable from collections import namedtuple from pydoc import locate EncoderOutput = namedtuple( "EncoderOutput", "outputs final_state attention_values attention_values_length") class Encoder(Configurable): def __init__(self): super(Encod...
37.475
101
0.667111
f49c342085296d0f1986e82198266bacc1cecdd9
6,562
py
Python
web/MicroservicesAsAservice/src/app/app.py
NoXLaw/RaRCTF2021-Challenges-Public
1a1b094359b88f8ebbc83a6b26d27ffb2602458f
[ "MIT" ]
null
null
null
web/MicroservicesAsAservice/src/app/app.py
NoXLaw/RaRCTF2021-Challenges-Public
1a1b094359b88f8ebbc83a6b26d27ffb2602458f
[ "MIT" ]
null
null
null
web/MicroservicesAsAservice/src/app/app.py
NoXLaw/RaRCTF2021-Challenges-Public
1a1b094359b88f8ebbc83a6b26d27ffb2602458f
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request, session, redirect, jsonify import requests import jsonschema import os import json import sys app = Flask(__name__) ERR_MISSING = "Missing required parameters" @app.route('/') def index(): html = """<html><head><title>MAAS</title></head> <body><a href=/calcula...
32.646766
93
0.55349
7605958f57a5f693f5792b6e6606420c3deab6c5
4,269
py
Python
roboraptorz/sim/simulator/Robot.py
icebear8/roboRinth
c0789a9faf978f31b0ed020d26fee2b04fb298ee
[ "MIT" ]
null
null
null
roboraptorz/sim/simulator/Robot.py
icebear8/roboRinth
c0789a9faf978f31b0ed020d26fee2b04fb298ee
[ "MIT" ]
null
null
null
roboraptorz/sim/simulator/Robot.py
icebear8/roboRinth
c0789a9faf978f31b0ed020d26fee2b04fb298ee
[ "MIT" ]
1
2019-10-22T07:47:51.000Z
2019-10-22T07:47:51.000Z
import logging import threading from matrix import Matrix logger = logging.getLogger(__name__) class Robot(object): INIT_TIME_S = 2 MOVING_TIME_S = 0.5 DISCOVER_TIME_S = 0.5 def __init__(self, map, globalPosition, rotLocToGlob, rotGlobToLoc): self.map = map self.globalPosition = glob...
32.838462
110
0.605762
87767de66994fcb387a3b78c495f980f1a70e98e
1,538
py
Python
Algorithms/Implementation/Grading_School.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Algorithms/Implementation/Grading_School.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Algorithms/Implementation/Grading_School.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
import math # https://www.hackerrank.com/challenges/grading/problem?h_r=internal-search def gradingStudents(g, c): # Write your code here # rounded to 5 r = [] # final output re = [] # for loop integration for i in g: if i < 37: r.append(i) pass else:...
17.088889
75
0.462939
5ebe22b231171b36f1ae869fd8e5fb53ece1bda1
2,136
py
Python
cogs/hilfe.py
DestinyofYeet/antonstechbot
b01372431a3a2b51fb83180cf8caa1a168e294ad
[ "MIT" ]
1
2021-04-21T09:01:26.000Z
2021-04-21T09:01:26.000Z
cogs/hilfe.py
DestinyofYeet/antonstechbot
b01372431a3a2b51fb83180cf8caa1a168e294ad
[ "MIT" ]
null
null
null
cogs/hilfe.py
DestinyofYeet/antonstechbot
b01372431a3a2b51fb83180cf8caa1a168e294ad
[ "MIT" ]
null
null
null
from discord.ext import commands import discord from botlibrary import constants import json class Hilfe(commands.Cog): def __init__(self, client): self.client = client async def send(self, ctx, command_name, description, usage, example): embed = discord.Embed(title=command_name, ...
41.076923
141
0.61985
df29e4c30efcfb5a2e3438c5816c811aedac389c
4,109
py
Python
sample/train_predictor.py
katsugeneration/schuss
30e2303aa0646f0a4424cbc4b5422acc58a06218
[ "Apache-2.0" ]
6
2018-12-20T06:50:52.000Z
2021-12-16T13:08:38.000Z
sample/train_predictor.py
katsugeneration/schuss
30e2303aa0646f0a4424cbc4b5422acc58a06218
[ "Apache-2.0" ]
1
2020-06-29T07:00:51.000Z
2020-06-29T07:00:51.000Z
sample/train_predictor.py
katsugeneration/schuss
30e2303aa0646f0a4424cbc4b5422acc58a06218
[ "Apache-2.0" ]
1
2022-03-04T07:29:55.000Z
2022-03-04T07:29:55.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import argparse import os import sys import time import json dir_path = os.path.dirname(os.path.abspath(__file__)) module_path = os.path.join(dir_path, "../src") if m...
37.354545
109
0.67559
df8dad6056e64be2200335835888e7873f421402
526
py
Python
exercises/de/exc_03_10_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/de/exc_03_10_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/de/exc_03_10_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
from spacy.lang.de import German from spacy.tokens import Doc nlp = German() # Definiere die Getter-Funktion def get_has_number(doc): # Gebe zurück, ob einer der Tokens im Doc True für token.like_num zurückgibt return any(____ for token in doc) # Registriere die Doc-Erweiterung "has_number" mit Getter-Funkt...
29.222222
81
0.768061
1d52f3f407adf888baf43a32446108fcac29e67a
1,594
py
Python
backend/apps/accounts/email_utils.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
2
2020-03-28T13:56:39.000Z
2020-03-29T10:16:12.000Z
backend/apps/accounts/email_utils.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
76
2020-03-27T21:53:04.000Z
2020-03-30T20:27:43.000Z
backend/apps/accounts/email_utils.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
null
null
null
import logging from django.conf import settings import sendgrid logger = logging.getLogger(__name__) def send_mass_mail_sendgrid( recipient_list, subject, html_body, from_mail=settings.NOREPLY_MAIL, use_sandbox_mode=False, ): if len(recipient_list) > 950: raise ValueError( "Cannot send a...
31.88
96
0.626098
891e2fb0c869e2066d0246894de274be8e5a237f
928
py
Python
misc/disjointsubsetpairs.py
Floozutter/coursework
244548f415553f058098cae84ccdd4ce3f58c245
[ "Unlicense" ]
null
null
null
misc/disjointsubsetpairs.py
Floozutter/coursework
244548f415553f058098cae84ccdd4ce3f58c245
[ "Unlicense" ]
null
null
null
misc/disjointsubsetpairs.py
Floozutter/coursework
244548f415553f058098cae84ccdd4ce3f58c245
[ "Unlicense" ]
null
null
null
""" A program to count the possible pairs of disjoint subsets, for Christian. "Let n be a positive integer and define [n] to be the set of the first n positive integers. That is, [n] = {1, 2, 3, ... , n}. We want to select two disjoint, possibly empty subsets A, B of [n]. In how many ways can we do this?" """ from it...
26.514286
75
0.673491
7f5dbbfa6c4e9499596498dba20c3d32a7fd9219
12,267
py
Python
Packs/FeedDHS/Integrations/DHS_Feed/DHS_Feed_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FeedDHS/Integrations/DHS_Feed/DHS_Feed_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FeedDHS/Integrations/DHS_Feed/DHS_Feed_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import pytest from DHS_Feed import * def compare(object_a, object_b): if isinstance(object_a, List): return compare_list(object_a, object_b) elif isinstance(object_a, Dict): return compare_dict(object_a, object_b) else: return object_a == object_b def compare_list(list_a, list_b)...
39.317308
176
0.660064
f688a5f543964418f32ff203c22a2b0edb782379
391
py
Python
follow_the_currents/follow_the_currents.py
skyeto/actf2021
f5f4e280ac459f8d01943f87512cf2b466588f50
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
angstrom/2021/crypto/Follow_the_Currents/source.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
angstrom/2021/crypto/Follow_the_Currents/source.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
import os import zlib def keystream(): key = os.urandom(2) index = 0 while 1: index+=1 if index >= len(key): key += zlib.crc32(key).to_bytes(4,'big') yield key[index] ciphertext = [] with open("plain","rb") as f: plain = f.read() assert b"actf{" in plain k = keystream() for i in plain: ciphertext.appe...
20.578947
43
0.639386
10046b2ee1f0acbe8876a9b52f1ba94c703a8d46
533
py
Python
crypto/baby-meadows/src/baby-meadows.py
b01lers/circle-city-ctf-2021
5d6c341f8d9647487dc69df84a4bea5e61d7ca43
[ "MIT" ]
9
2021-06-13T19:33:53.000Z
2021-10-04T13:17:26.000Z
CircleCityCon/2021/crypto/Baby_Meadows/baby-meadows.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-06-13T23:20:05.000Z
2021-06-13T23:20:05.000Z
CircleCityCon/2021/crypto/Baby_Meadows/baby-meadows.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-06-14T02:09:46.000Z
2021-06-14T02:09:46.000Z
from Crypto.Util.number import getStrongPrime import sys, random; random.seed(0x1337) def generate_key(): p = getStrongPrime(2048) q = (p - 1) // 2 for g in range(2, p - 1): if pow(g, 2, p) != 1 and pow(g, q, p) != 1: return g, p def encrypt(msg): g, p = generate_key() yield (...
23.173913
61
0.545966
c3d45a1c88d214afacac90f2b875e6b011c77f56
732
gyp
Python
source/pkgsrc/inputmethod/mozc-server/patches/patch-unix_ibus_ibus.gyp
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/inputmethod/mozc-server/patches/patch-unix_ibus_ibus.gyp
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/inputmethod/mozc-server/patches/patch-unix_ibus_ibus.gyp
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-unix_ibus_ibus.gyp,v 1.2 2017/12/17 14:15:43 tsutsui Exp $ * use ${PREFIX} paths --- unix/ibus/ibus.gyp.orig 2017-11-02 13:32:47.000000000 +0000 +++ unix/ibus/ibus.gyp @@ -31,8 +31,8 @@ 'variables': { 'relative_dir': 'unix/ibus', 'gen_out_dir': '<(SHARED_INTERMEDIATE_DIR)/<(relative_dir)',...
40.666667
78
0.687158
c3fcaf125cedd8f310add2df65b95adaa882ef25
657
py
Python
8_text/text.py
Coding-for-the-Arts/drawbot-samples
e37994f3497aca252312431100b53548b4573f15
[ "CC0-1.0" ]
null
null
null
8_text/text.py
Coding-for-the-Arts/drawbot-samples
e37994f3497aca252312431100b53548b4573f15
[ "CC0-1.0" ]
null
null
null
8_text/text.py
Coding-for-the-Arts/drawbot-samples
e37994f3497aca252312431100b53548b4573f15
[ "CC0-1.0" ]
null
null
null
""" Text """ newPage("A4") font("Hobeaux-Bold") # OT-Features des gewählten Fonts auflisten print(listOpenTypeFeatures(fontNameOrPath=None)) fontSize(100) openTypeFeatures(ss02=True) # alternatives y text("Python FTW", (40, 400)) """ - Wahrscheinlich hast du die «Hobeaux Bold» nicht. Ersetze sie mit einem Font, de...
27.375
63
0.773212
61bba849ef3270cf16e30d88b8802d512a2a81d9
728
py
Python
mail/plugins/password/helpers/chpass-wrapper.py
chrisbastian/tinza
060c5d7c3a9a508da16dc6d07d0b3d52aed2df54
[ "BSD-3-Clause" ]
14
2021-02-08T16:02:36.000Z
2022-03-18T10:38:29.000Z
mail/plugins/password/helpers/chpass-wrapper.py
chrisbastian/tinza
060c5d7c3a9a508da16dc6d07d0b3d52aed2df54
[ "BSD-3-Clause" ]
4
2020-12-03T21:56:56.000Z
2021-11-22T04:07:58.000Z
mail/plugins/password/helpers/chpass-wrapper.py
chrisbastian/tinza
060c5d7c3a9a508da16dc6d07d0b3d52aed2df54
[ "BSD-3-Clause" ]
8
2020-01-22T05:28:47.000Z
2020-08-12T20:09:25.000Z
#!/usr/bin/env python import sys import pwd import subprocess BLACKLIST = ( # add blacklisted users here #'user1', ) try: username, password = sys.stdin.readline().split(':', 1) except ValueError, e: sys.exit('Malformed input') try: user = pwd.getpwnam(username) except KeyError, e: sys.exit(...
22.060606
78
0.682692
f6446e30a30abca9203a97ea40be33e62af02774
1,448
py
Python
tests/api/test_recycling_event.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
tests/api/test_recycling_event.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
35
2022-01-24T22:15:59.000Z
2022-03-31T15:01:35.000Z
tests/api/test_recycling_event.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
from tests.seeder import Seeder from tests.utils import UtilActions def test_list(client, seeder: Seeder, utils: UtilActions): recycling_street_id = seeder.create_recycling_street() seeder.create_recycling_event(recycling_street_id) url = utils.get_url( "api_recycling_street_event_list", street_i...
33.674419
83
0.723066
f67e7bbd231cbb9c2c16551d8bdf4208ce4435b7
3,840
py
Python
pyramid-creator/app/worker.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-11-04T17:06:07.000Z
2021-11-04T17:06:07.000Z
pyramid-creator/app/worker.py
JamesNeumann/learning-by-annotations
c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad
[ "MIT" ]
21
2021-11-01T10:13:56.000Z
2021-12-02T10:02:13.000Z
pyramid-creator/app/worker.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-12-16T18:20:55.000Z
2021-12-16T18:20:55.000Z
import os import shutil from celery import Celery from celery.utils.log import get_task_logger from app.config import Config from app.crud import crud_slide from app.db.deps import get_slide_collection from app.persistance.custom_minio_client import MinioClient from app.persistance.minio_wrapper import Mini...
32.820513
86
0.625521
14366e76f4897367c81234eb63601eb216b4a08f
3,378
py
Python
src/onegov/winterthur/forms/mission_report.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/winterthur/forms/mission_report.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/winterthur/forms/mission_report.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import sedate from datetime import datetime from onegov.file.utils import IMAGE_MIME_TYPES_AND_SVG from onegov.form import Form from onegov.form.fields import UploadFileWithORMSupport from onegov.form.validators import FileSizeLimit from onegov.form.validators import WhitelistedMimeType from onegov.winterthur import _...
27.463415
70
0.642096
1ad26ba7dce4aa0e948eda4aa40a4434a53d88ef
7,589
py
Python
coarsen/contract.py
yashpatel5400/anonychain
921804832839f3639477cfc441f138bc2f5ad685
[ "MIT" ]
1
2018-08-31T07:16:40.000Z
2018-08-31T07:16:40.000Z
coarsen/contract.py
yashpatel5400/anonychain
921804832839f3639477cfc441f138bc2f5ad685
[ "MIT" ]
null
null
null
coarsen/contract.py
yashpatel5400/anonychain
921804832839f3639477cfc441f138bc2f5ad685
[ "MIT" ]
1
2018-07-01T18:03:01.000Z
2018-07-01T18:03:01.000Z
""" __author__ = Yash Patel __name__ = contract.py __description__ = Contraction script used for testing the effectiveness of uniformly at random edge contractions in retaining clustering accuracy """ import numpy as np import networkx as nx import matplotlib import random matplotlib.use('Agg') import m...
41.244565
96
0.661352
212d03a3d96ddbcb80ffd325cf903f230298d8e3
431
py
Python
PINp/2015/DENISENKO_A_N/task_3_27.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2015/DENISENKO_A_N/task_3_27.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2015/DENISENKO_A_N/task_3_27.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 3. Вариант 27. # Напишите программу, которая выводит имя "Михаил Евграфович Салтыков", и #запрашивает его псевдоним. Программа должна сцеплять две эти строки и #выводить полученную строку, разделяя имя и псевдоним с помощью тире. # Denisenko A. N. # 02.06.2016 name = "Михаил Евграфович Салтыков" print(name)...
30.785714
73
0.74942
dcfb13cb5d62c4cab3a8f88681cc97f0e8aa5e46
196
py
Python
house-robber/house-robber.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
house-robber/house-robber.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
house-robber/house-robber.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def rob(self, nums: List[int]) -> int: dp=[0, 0, nums[0]] for num in nums[1:]: dp.append(num+max(dp[-2], dp[-3])) return max(dp[-1], dp[-2])
32.666667
46
0.479592
37072b0de150df291f3123166e436d739a995b6e
978
py
Python
Course_1/Week_02/1_Inversions.py
KnightZhang625/Stanford_Algorithm
7dacbbfa50e7b0e8380cf500df24af60cb9f42df
[ "Apache-2.0" ]
null
null
null
Course_1/Week_02/1_Inversions.py
KnightZhang625/Stanford_Algorithm
7dacbbfa50e7b0e8380cf500df24af60cb9f42df
[ "Apache-2.0" ]
1
2020-07-16T08:03:22.000Z
2020-07-16T08:09:34.000Z
Course_1/Week_02/1_Inversions.py
KnightZhang625/Stanford_Algorithm
7dacbbfa50e7b0e8380cf500df24af60cb9f42df
[ "Apache-2.0" ]
null
null
null
import sys def count_sort(array_a, array_b): array_c = [] len_a = len(array_a) len_b = len(array_b) len_c = len_a + len_b a_i = 0 b_j = 0 count = 0 for c_i in range(len_c): if array_a[a_i] < array_b[b_j]: array_c.append(array_a[a_i]) a_i += 1 if a_i == len_a: break elif array_a[a_i] > array_b...
20.808511
51
0.655419
d306091fadfea8011ea327393dc6517110dc3531
92
py
Python
2014/08/mortgage-rates-fico/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2014/08/mortgage-rates-fico/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2014/08/mortgage-rates-fico/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 = '11m_KWmhjdw9-0J-XpARiSb4qTcsUQTp0sr6zu19fx5U'
23
68
0.826087
d35ad63293a143064b755d93c0c6da78a10aefda
2,415
py
Python
Sprint-Challenge--Intro-Python/src/comp/comp.py
tobias-fyi/01_intro_python
c56645291b8bce94d8511c3277fefba1fe8add89
[ "MIT" ]
null
null
null
Sprint-Challenge--Intro-Python/src/comp/comp.py
tobias-fyi/01_intro_python
c56645291b8bce94d8511c3277fefba1fe8add89
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/01_intro_python/Sprint-Challenge--Intro-Python/src/comp/comp.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
# The following list comprehension exercises will make use of the # defined Human class. class Human: def __init__(self, name, age): self.name = name self.age = age def __repr__(self): return f"<Human: {self.name}, {self.age}>" humans = [ Human("Alice", 29), Human("Bob", 32)...
30.56962
83
0.663354
d3827ae5ff341ad7f11949ef9f3eec3e425d56f4
1,363
py
Python
fanpy/run_formind.py
melioristic/FANPY
2d68d222de4f1e6d6d802268253ce446cd924914
[ "MIT" ]
1
2021-04-23T19:47:51.000Z
2021-04-23T19:47:51.000Z
fanpy/run_formind.py
melioristic/FANPY
2d68d222de4f1e6d6d802268253ce446cd924914
[ "MIT" ]
null
null
null
fanpy/run_formind.py
melioristic/FANPY
2d68d222de4f1e6d6d802268253ce446cd924914
[ "MIT" ]
null
null
null
# # Created on Tue Nov 24 2020 # # Copyright (c) 2020 Mohit Anand # # For any details contact itsmohitanand@gmail.com ###################### # This script is used to run multiple simulations for FORMIND model with different seeds and output names. import os from shutil import copyfile import numpy as np from tqdm im...
34.075
106
0.747616
e265db98dcb390796aba4b67e36e9316a7ed0c97
181
py
Python
src/main/python/cluster/dcluster/__init__.py
gwdgithubnom/ox-patient
cddf4fe381cb4506db8e0d62803dd2044cf7ad92
[ "MIT" ]
null
null
null
src/main/python/cluster/dcluster/__init__.py
gwdgithubnom/ox-patient
cddf4fe381cb4506db8e0d62803dd2044cf7ad92
[ "MIT" ]
null
null
null
src/main/python/cluster/dcluster/__init__.py
gwdgithubnom/ox-patient
cddf4fe381cb4506db8e0d62803dd2044cf7ad92
[ "MIT" ]
1
2021-04-14T00:45:38.000Z
2021-04-14T00:45:38.000Z
#!/usr/bin/env python '''dcluster ''' from .run import run from .mds import mds from .readfile import readfile from .rhodelta import rhodelta from .DCplot import DCplot
16.454545
31
0.712707
1a969919675dd426b3664f731b596fba8cf26d23
12,696
py
Python
python/title_preprocessing.py
sma-h/openapc-de
0ec2d42d525219d801f71538f5b30ca6fecd9d3a
[ "Cube" ]
89
2015-02-13T13:46:06.000Z
2022-03-13T16:42:44.000Z
python/title_preprocessing.py
sma-h/openapc-de
0ec2d42d525219d801f71538f5b30ca6fecd9d3a
[ "Cube" ]
91
2015-03-12T13:31:36.000Z
2022-01-14T07:37:37.000Z
python/title_preprocessing.py
sma-h/openapc-de
0ec2d42d525219d801f71538f5b30ca6fecd9d3a
[ "Cube" ]
138
2015-03-04T15:23:43.000Z
2022-03-09T15:11:52.000Z
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import argparse import csv import json from math import inf import random import sys from time import sleep from urllib.error import HTTPError from urllib.parse import quote_plus, urlencode from urllib.request import urlopen, Request from Levenshtein import ratio, matchi...
48.090909
317
0.620825
b3adcfd8500ef071e018e4091b891bdde169b660
1,043
py
Python
models/test_fft.py
zaqwes8811/voicegen
938e26d9e83c8be9df830698aa5b65cb904dd2eb
[ "Apache-2.0" ]
null
null
null
models/test_fft.py
zaqwes8811/voicegen
938e26d9e83c8be9df830698aa5b65cb904dd2eb
[ "Apache-2.0" ]
null
null
null
models/test_fft.py
zaqwes8811/voicegen
938e26d9e83c8be9df830698aa5b65cb904dd2eb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import sys sys.path.append( ".." ) # fixme: bad! from matlab_ext import * import numpy as np def main(): #FFT Fs = 1000 #% Sampling frequency T = 1./Fs #% Sampling period L = 1000 #% Length of signal t = colon(0, L-1)*T #% Time ve...
25.439024
127
0.623202
b3eb87ab645275e452f494a0c03e1de86bf3e967
3,170
py
Python
RedirectedLoginSession/util/default_template_context.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
RedirectedLoginSession/util/default_template_context.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
RedirectedLoginSession/util/default_template_context.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
def if_else(first, a, b): # type: (bool, any, any) -> any """ Functional equivalent of conditional expression. :param first: True or False :param a: to be returned if first is True :param b: to be returned if first is False :return: a if first else b """ return a if first else b d...
24.765625
75
0.608833
3747588fdb14e070c993b026c290e4fc0e715b31
5,219
py
Python
apps/register/tests.py
OpenAdaptronik/Rattler
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
2
2018-05-18T08:38:29.000Z
2018-05-22T08:26:09.000Z
apps/register/tests.py
IT-PM-OpenAdaptronik/Webapp
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
118
2017-10-31T13:45:09.000Z
2018-02-24T20:51:42.000Z
apps/register/tests.py
OpenAdaptronik/Rattler
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
null
null
null
""" License MIT License Copyright (c) 2017 OpenAdaptronik 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 without limitation the rights to use, copy, modify, merge,...
37.546763
94
0.702433
3750387b2689ab2399b3af441b30e734dde88cee
305
py
Python
temp_over_modbus/test_modbus_write.py
wichmann/RaspPI
168609cb237e59a4c895eae798c0dab052aab38b
[ "MIT" ]
null
null
null
temp_over_modbus/test_modbus_write.py
wichmann/RaspPI
168609cb237e59a4c895eae798c0dab052aab38b
[ "MIT" ]
null
null
null
temp_over_modbus/test_modbus_write.py
wichmann/RaspPI
168609cb237e59a4c895eae798c0dab052aab38b
[ "MIT" ]
null
null
null
from pymodbus.client.sync import ModbusTcpClient as ModbusClient client = ModbusClient('192.168.24.40', port=502) #client = ModbusClient(method='ascii', port='/dev/pts/2', timeout=1) #client = ModbusClient(method='rtu', port='/dev/pts/2', timeout=1) client.connect() rr = client.write_register(0, 42)
27.727273
68
0.734426
80e142257a7ea73ebe85f08d49fb503719d6b60c
2,103
py
Python
sdd-db/sdd-db initialization/db_upload_locations.py
socialdistancingdashboard/virushack
6ef69d26c5719d0bf257f4594ed2488dd73cdc40
[ "Apache-2.0" ]
29
2020-03-21T00:47:51.000Z
2021-07-17T15:50:33.000Z
sdd-db/sdd-db initialization/db_upload_locations.py
socialdistancingdashboard/virushack
6ef69d26c5719d0bf257f4594ed2488dd73cdc40
[ "Apache-2.0" ]
7
2020-03-21T14:04:26.000Z
2022-03-02T08:05:40.000Z
sdd-db/sdd-db initialization/db_upload_locations.py
socialdistancingdashboard/virushack
6ef69d26c5719d0bf257f4594ed2488dd73cdc40
[ "Apache-2.0" ]
13
2020-03-21T01:08:08.000Z
2020-04-08T17:21:11.000Z
""" This scripts uploads location database to sdd-db """ import os import re import pandas as pd from datetime import datetime # compatibility with ipython try: __IPYTHON__ os.chdir(os.path.dirname(__file__)) except: pass import json import boto3 from pathlib import Path from shapely.geometry import Point import...
23.366667
85
0.643842
03bba273729b4cb4fd4a3a337286fb56bff2ad31
285
py
Python
pacman-termux/test/pacman/tests/epoch010.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/epoch010.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/epoch010.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "usbutils case study: force in new package" sp = pmpkg("usbutils", "1:001-1") self.addpkg2db("sync", sp) lp = pmpkg("usbutils", "0.91-4") self.addpkg2db("local", lp) self.args = "-Su" self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_VERSION=usbutils|1:001-1")
21.923077
62
0.694737
03f72df2af656954234b567a09d973727beaab14
2,205
py
Python
tests/test_geschaeftsobjekt.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
tests/test_geschaeftsobjekt.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
tests/test_geschaeftsobjekt.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
from typing import List, Optional import pytest # type:ignore[import] from bo4e.bo.geschaeftsobjekt import Geschaeftsobjekt, GeschaeftsobjektSchema from bo4e.com.externereferenz import ExterneReferenz from bo4e.enum.botyp import BoTyp class TestGeschaeftsobjet: @pytest.mark.parametrize( "bo_typ, versio...
33.923077
104
0.634921
455779bbb2543d21eb05129d92aa45708393334b
978
py
Python
DataStructures/LinkedLists/insert_node_nth.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
DataStructures/LinkedLists/insert_node_nth.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
DataStructures/LinkedLists/insert_node_nth.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys class Node(object): def __init__(self, data=None, next_node=None): self.data = data self.next = next_node def InsertNth(head, data, position): if head is None: head = Node(data=data) elif position == 0: tmp = head head = Node(data...
19.959184
62
0.52863
920774a58c7145a60f4b4a25e92abf29e755ebd5
459
py
Python
SEsimulation/CalEst.py
ThoEngel/rentenplanung
879c9a678ba1ff951a1f92b0c42673a7943a18e6
[ "MIT" ]
3
2022-01-01T18:24:46.000Z
2022-01-08T15:28:46.000Z
SEsimulation/CalEst.py
ThoEngel/Finanzen-Simuliert
879c9a678ba1ff951a1f92b0c42673a7943a18e6
[ "MIT" ]
null
null
null
SEsimulation/CalEst.py
ThoEngel/Finanzen-Simuliert
879c9a678ba1ff951a1f92b0c42673a7943a18e6
[ "MIT" ]
null
null
null
from math import floor def CalEst(zvE): # 2020 x = floor(zvE) y = max((x - 9408) / 10000, 0) z = max((x - 14532) / 10000, 0) if zvE <= 9408: ESt = 0 elif zvE <= 14532: ESt = (972.87 * y + 1400) * y elif zvE <= 57051: ESt = ((212.02 * z + 2397) * z + 972.79) e...
17
48
0.455338
752e24b4659a8e9b2da86e161dbf7d1de152f047
5,043
py
Python
Packs/AutoFocus/Integrations/FeedAutofocusDaily/FeedAutofocusDaily_test.py
PAM360/content
928aac9c586c6e593b2a452c402a37cb5df28dac
[ "MIT" ]
2
2021-12-06T21:38:24.000Z
2022-01-13T08:23:36.000Z
Packs/AutoFocus/Integrations/FeedAutofocusDaily/FeedAutofocusDaily_test.py
PAM360/content
928aac9c586c6e593b2a452c402a37cb5df28dac
[ "MIT" ]
87
2022-02-23T12:10:53.000Z
2022-03-31T11:29:05.000Z
Packs/AutoFocus/Integrations/FeedAutofocusDaily/FeedAutofocusDaily_test.py
PAM360/content
928aac9c586c6e593b2a452c402a37cb5df28dac
[ "MIT" ]
2
2022-01-05T15:27:01.000Z
2022-02-01T19:27:43.000Z
import pytest from FeedAutofocusDaily import Client, fetch_indicators_command, get_indicators_command from CommonServerPython import * INDICATORS = [ "d4da1b2d5554587136f2bcbdf0a6a1e29ab83f1d64a4b2049f9787479ad02fad", "19.117.63.253", "19.117.63.253:8080", "domaintools.com", "flake8.pycqa.org/en/...
28.491525
118
0.673607
f3842616ed4221b025219e0ee75179c44c67b5d7
575
py
Python
leetcode/038-Count-and-Say/CountnSay_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
leetcode/038-Count-and-Say/CountnSay_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/038-Count-and-Say/CountnSay_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution: # @param {integer} n # @return {string} def built_from_prev(self, s): nums = [s[0]] counts = [1] for i in range(1, len(s)): if s[i] == nums[-1]: counts[-1] += 1 else: nums.append(s[i]) counts.appe...
25
43
0.427826
340a0e074cf9743e202f1c21c29b51979c5b399c
624
py
Python
myspiders/ruia/plugins/ua_random.py
zhouhongf/bank_hr
a42e5e18f3ec36b1ec65931415fe476c9690e0a0
[ "MIT" ]
2
2021-11-27T06:40:47.000Z
2022-01-06T03:12:46.000Z
myspiders/ruia/plugins/ua_random.py
zhouhongf/bank_hr
a42e5e18f3ec36b1ec65931415fe476c9690e0a0
[ "MIT" ]
null
null
null
myspiders/ruia/plugins/ua_random.py
zhouhongf/bank_hr
a42e5e18f3ec36b1ec65931415fe476c9690e0a0
[ "MIT" ]
null
null
null
from myspiders.tools.tools_request import get_random_user_agent from myspiders.ruia.middleware import Middleware middleware = Middleware() @middleware.request async def add_random_ua(spider_ins, request): ua = await get_random_user_agent() if request.headers: request.headers.update({'User-Agent': ua...
28.363636
94
0.737179
cad8784b197d7f42a7f8d4a3a7220aa802035d54
890
py
Python
quant/observers/t_bithumb_eth.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
7
2017-10-22T15:00:09.000Z
2019-09-19T11:45:43.000Z
quant/observers/t_bithumb_eth.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
1
2018-01-19T16:19:40.000Z
2018-01-19T16:19:40.000Z
quant/observers/t_bithumb_eth.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 from .t_bithumb import T_Bithumb class T_Bithumb_ETH(T_Bithumb): """ bch: ./venv/bin/python -m quant.cli -mBithumb_ETH_KRW,Bitfinex_ETH_BTC,Bithumb_BTC_KRW -o=T_Bithumb_ETH -f=bithumb_eth -v 目前的限制: """ def __init_...
26.176471
120
0.575281
9476cfc04601fb43b449e8d54c8707b58f2dc17a
334
pyde
Python
sketches/maze02/maze02.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/maze02/maze02.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/maze02/maze02.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
from maze import Maze num_rows = 20 num_cols = 20 grid_size = 32 maze = Maze(num_rows, num_cols, grid_size) def setup(): size(650, 650) maze.connect_grid_default() # maze.print_me() noLoop() def draw(): background(255, 255, 255) stroke(0, 0, 0) strokeWeight(1) translate(5, 5) maz...
15.181818
42
0.625749
ca25194e5d4d468e438300e60cbdeea879f7a0de
470
py
Python
source/pkgsrc/devel/py-readline/files/setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/devel/py-readline/files/setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/devel/py-readline/files/setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
# $NetBSD: setup.py,v 1.1 2002/03/14 17:58:50 wiz Exp $ import distutils from distutils.core import setup, Extension rlprefix = '@RLPREFIX@' rlincl = rlprefix + '/include' rllib = rlprefix + '/lib' rlrtprefix = '@RLRTPREFIX@' rlrtlib = rlrtprefix + '/lib' setup( ext_modules = [ Extension( 'readline', ['Modu...
19.583333
55
0.67234
04bc4fb5001d47b2ac60b43e7fcb88c6d6baf759
352
py
Python
books/PythonCleanCode/ch8_unittest/mutate_testing_1.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch8_unittest/mutate_testing_1.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch8_unittest/mutate_testing_1.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""Clean Code in Python - Chapter 8: Unit Testing & Refactoring > Mutation Testing """ from mrstatus import MergeRequestStatus as Status def evaluate_merge_request(upvote_count, downvote_count): if downvote_count > 0: return Status.REJECTED if upvote_count >= 2: return Status.APPRO...
25.142857
64
0.704545
b651a5a0cf7c04f8f0da46b1de3b9a1d93d88564
7,219
py
Python
src/bo4e/com/aufabschlagregional.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/com/aufabschlagregional.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/com/aufabschlagregional.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains AufAbschlagRegional and corresponding marshmallow schema for de-/serialization """ from typing import List, Optional import attr from marshmallow import fields from marshmallow_enum import EnumField # type:ignore[import] from bo4e.com.aufabschlagproort import AufAbschlagProOrt, AufAbschlagProOrtSchema ...
49.786207
193
0.755645
1ea92518758df8f26967ada18ce5da4c1bb57438
2,233
py
Python
research/cv/FaceQualityAssessment/modelarts/start.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/FaceQualityAssessment/modelarts/start.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/FaceQualityAssessment/modelarts/start.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...
37.216667
92
0.704433
44aa8dbac84072233ea06dc16db7f5943cbd83e5
4,240
py
Python
server/parse_xmi.py
Moult/IFC4.3.x-development
5dfacdc91f04b446f9d7386b950099fc14e6587e
[ "FSFAP" ]
1
2021-08-31T16:12:09.000Z
2021-08-31T16:12:09.000Z
server/parse_xmi.py
Moult/IFC4.3.x-development
5dfacdc91f04b446f9d7386b950099fc14e6587e
[ "FSFAP" ]
null
null
null
server/parse_xmi.py
Moult/IFC4.3.x-development
5dfacdc91f04b446f9d7386b950099fc14e6587e
[ "FSFAP" ]
null
null
null
import os import sys import json from collections import defaultdict sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'scripts')) from xmi_document import xmi_document fn = os.path.join(os.path.dirname(__file__), '..', 'schemas', 'IFC.xml') xmi_doc = xmi_document(fn) entity_to_package = {} hierarchy =...
38.899083
83
0.655896
78cc3a2c2e94c5d0984756afd7ba6cb8ab6f881b
470
py
Python
log_server_user.py
BigBoss1964/discord-rules
02257a84450388ceffbad5b6bb9e28175734403f
[ "MIT" ]
null
null
null
log_server_user.py
BigBoss1964/discord-rules
02257a84450388ceffbad5b6bb9e28175734403f
[ "MIT" ]
null
null
null
log_server_user.py
BigBoss1964/discord-rules
02257a84450388ceffbad5b6bb9e28175734403f
[ "MIT" ]
null
null
null
import discord import KEYS class MyClient(discord.Client): async def on_ready(self): file = open("server.txt", "w") cg = 0 for guild in client.guilds: file.write("%s - %s User \n" % (guild.name, len(guild.members))) cg = cg + 1 file.write("=========...
27.647059
77
0.519149
01d06e4dec5b2d0a43b28f36ad3c56b29012b2df
246
pyde
Python
sketches/shaunsim1/shaunsim1.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/shaunsim1/shaunsim1.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/shaunsim1/shaunsim1.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
from shaun import Sheep, Settings shaun = Sheep(300, 200) s = Settings() def setup(): size(s.WIDTH, s.HEIGHT) this.surface.setTitle("Shaun das Schaf (1)") frameRate(s.FPS) def draw(): background(s.GREEN) shaun.update()
17.571429
48
0.642276