hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
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
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
a57fff444e34ab3085f258b8aa57323a8f86efde
1,683
py
Python
Exercicios/Exercicio070.py
RicardoMart922/estudo_Python
cb595c2a5e5aee568b6afa71b3ed9dd9cb7eef72
[ "MIT" ]
null
null
null
Exercicios/Exercicio070.py
RicardoMart922/estudo_Python
cb595c2a5e5aee568b6afa71b3ed9dd9cb7eef72
[ "MIT" ]
null
null
null
Exercicios/Exercicio070.py
RicardoMart922/estudo_Python
cb595c2a5e5aee568b6afa71b3ed9dd9cb7eef72
[ "MIT" ]
null
null
null
# Crie um programa que leia a idade e o sexo de várias pessoas. A cada pessoa cadastrada, o programa deverá perguntar se o usuário quer ou não continuar. No final, mostre: # A) Quantas pessoas tem mais de 18 anos. # B) Quantos homens foram cadastrados. # C) Quantas mulheres tem menos de 20 anos. maisdezoito = 0 qtdmul...
35.0625
172
0.62448
0
0
0
0
0
0
0
0
893
0.529342
a583106bd0bb53ab734f77ad352678e3fedf5e53
3,050
py
Python
tests/test_entry.py
anaulin/tasks.py
aa05b4194ff6b01061e6842520752da515e625d6
[ "MIT" ]
null
null
null
tests/test_entry.py
anaulin/tasks.py
aa05b4194ff6b01061e6842520752da515e625d6
[ "MIT" ]
2
2020-06-30T20:05:59.000Z
2020-08-01T03:42:20.000Z
tests/test_entry.py
anaulin/tasks.py
aa05b4194ff6b01061e6842520752da515e625d6
[ "MIT" ]
null
null
null
import filecmp import shutil import tempfile import os from .context import entry TEST_ENTRY = os.path.join(os.path.dirname(__file__), "test_entry.md") TEST_ENTRY_CONTENT = """ Some content. ## A section in the content Content that looks like frontmatter: ``` +++ but this is not really frontmatter +++ ``` More c...
30.19802
92
0.635082
0
0
0
0
0
0
0
0
1,040
0.340984
a583ce21b151702ce7c45ced989d01eb53545764
1,833
py
Python
plotapp/controllers/window_controller.py
maldata/matplotlib_qtquick_playground
f7da94093315d8f540124d5037406d004574dede
[ "MIT" ]
null
null
null
plotapp/controllers/window_controller.py
maldata/matplotlib_qtquick_playground
f7da94093315d8f540124d5037406d004574dede
[ "MIT" ]
null
null
null
plotapp/controllers/window_controller.py
maldata/matplotlib_qtquick_playground
f7da94093315d8f540124d5037406d004574dede
[ "MIT" ]
null
null
null
import random from PyQt5.QtCore import pyqtSignal, pyqtProperty, pyqtSlot, QObject class WindowController(QObject): label_changed = pyqtSignal() def __init__(self, app): super().__init__() self._app = app self._qml_engine = None self._label = 'whatever' self._figure =...
25.816901
99
0.569013
1,747
0.953082
0
0
928
0.506274
0
0
216
0.11784
a5852febf93eb6f982e8fd189b72f16bda399d56
337
py
Python
training/train.py
gert-janwille/Eleonora
a979dcd9b41231ea3abc9a57d842c680314ac9ca
[ "MIT" ]
1
2017-11-19T10:57:38.000Z
2017-11-19T10:57:38.000Z
training/train.py
gert-janwille/Eleonora
a979dcd9b41231ea3abc9a57d842c680314ac9ca
[ "MIT" ]
6
2017-11-15T16:04:09.000Z
2018-01-18T17:12:18.000Z
training/train.py
gert-janwille/Eleonora
a979dcd9b41231ea3abc9a57d842c680314ac9ca
[ "MIT" ]
null
null
null
from training.emotional_training import emotional_training from training.facial_training import facial_training def train(): print('\n0: Emotional Training') print('1: Facial Training\n') choose = int(input("Type Number > ")) if choose == 0: emotional_training() if choose == 1: f...
22.466667
58
0.682493
0
0
0
0
0
0
0
0
63
0.186944
a585ab12f199b6ce2a2bd25bb26ea5865e4f682d
9,190
py
Python
nnaps/mesa/compress_mesa.py
vosjo/nnaps
bc4aac715b511c5df897ef24fb953ad7265927ea
[ "MIT" ]
4
2020-09-24T12:55:58.000Z
2021-05-19T14:46:10.000Z
nnaps/mesa/compress_mesa.py
vosjo/nnaps
bc4aac715b511c5df897ef24fb953ad7265927ea
[ "MIT" ]
4
2021-06-02T09:28:35.000Z
2021-06-04T08:32:24.000Z
nnaps/mesa/compress_mesa.py
vosjo/nnaps
bc4aac715b511c5df897ef24fb953ad7265927ea
[ "MIT" ]
3
2020-10-05T13:18:27.000Z
2021-06-02T09:29:11.000Z
import os from pathlib import Path import numpy as np # repack_fields is necessary since np 1.16 as selecting columns from a recarray returns an array with padding # that is difficult to work with afterwards. from numpy.lib import recfunctions as rf from nnaps.mesa import fileio from nnaps import __version__ def re...
38.291667
120
0.586507
0
0
0
0
0
0
0
0
2,538
0.27617
a5880384a51a2b5216de1db68e0632fb623a8bfc
1,022
py
Python
src/_deblaze.py
MenkeTechnologies/zsh-more-completions
c0d4716b695ea9bf3d0e870bc2ced5354db3c031
[ "MIT" ]
25
2018-07-29T01:49:23.000Z
2022-01-19T19:21:23.000Z
src/_deblaze.py
MenkeTechnologies/zsh-more-completions
c0d4716b695ea9bf3d0e870bc2ced5354db3c031
[ "MIT" ]
null
null
null
src/_deblaze.py
MenkeTechnologies/zsh-more-completions
c0d4716b695ea9bf3d0e870bc2ced5354db3c031
[ "MIT" ]
null
null
null
#compdef deblaze.py local arguments arguments=( '--version[show programs version number and exit]' '(- * :)'{-h,--help}'[show this help message and exit]' {-u,--url}'[URL for AMF Gateway]' {-s,--service}'[remote service to call]' {-m,--method}'[method to call]' {-p,--params}'[parameters to send pipe seper...
36.5
74
0.662427
0
0
0
0
0
0
0
0
685
0.670254
a58a9d34b89b4bc4bc0e0b2929228a0dbbb74a83
1,379
py
Python
jakso_ml/training_data/white_balancer.py
JaksoSoftware/jakso-ml
5720ea557ca2fcf9ae16e329c198acd8e31258c4
[ "MIT" ]
null
null
null
jakso_ml/training_data/white_balancer.py
JaksoSoftware/jakso-ml
5720ea557ca2fcf9ae16e329c198acd8e31258c4
[ "MIT" ]
3
2020-09-25T18:40:52.000Z
2021-08-25T14:44:30.000Z
jakso_ml/training_data/white_balancer.py
JaksoSoftware/jakso-ml
5720ea557ca2fcf9ae16e329c198acd8e31258c4
[ "MIT" ]
null
null
null
import random, copy import cv2 as cv import numpy as np from scipy import interpolate from .augmenter import Augmenter class WhiteBalancer(Augmenter): ''' Augmenter that randomly changes the white balance of the SampleImages. ''' def __init__( self, min_red_rand, max_red_rand, min_blue_rand, ...
25.072727
81
0.658448
1,258
0.912255
0
0
0
0
0
0
82
0.059463
a58ab462ad7e52132f563d3dc36462f69902b7de
824
py
Python
app/set_game/deck.py
mmurch/set-game
8fd1303ab2a4d628547fd7ebca572cf04087cbdb
[ "MIT" ]
null
null
null
app/set_game/deck.py
mmurch/set-game
8fd1303ab2a4d628547fd7ebca572cf04087cbdb
[ "MIT" ]
5
2021-03-10T04:32:22.000Z
2022-02-26T22:25:52.000Z
app/set_game/deck.py
mmurch/set-game
8fd1303ab2a4d628547fd7ebca572cf04087cbdb
[ "MIT" ]
null
null
null
from .card import Card from .features import Number, Color, Shape, Style from math import floor class Deck(): def __init__(self): return @staticmethod def get_card_by_id(self, id): if id < 1 or id > 81: raise ValueError return Card( self.get_number(id), ...
20.6
49
0.54733
725
0.879854
0
0
642
0.779126
0
0
0
0
a58be826db80a8cc6c893e8f64d3265192b6d0a2
27,777
py
Python
tests/test_utils.py
grantsrb/langpractice
59cf8f53b85fa8b4d639ffc6e175ec22c0d2362c
[ "MIT" ]
null
null
null
tests/test_utils.py
grantsrb/langpractice
59cf8f53b85fa8b4d639ffc6e175ec22c0d2362c
[ "MIT" ]
null
null
null
tests/test_utils.py
grantsrb/langpractice
59cf8f53b85fa8b4d639ffc6e175ec22c0d2362c
[ "MIT" ]
null
null
null
from langpractice.utils.utils import * import unittest import torch.nn.functional as F class TestUtils(unittest.TestCase): def test_zipfian1(self): n_loops = 5000 low = 1 high = 10 order = 1 counts = {i:0 for i in range(low, high+1)} tot = 0 for i in range(n_...
31.89093
86
0.464161
27,637
0.99496
0
0
0
0
0
0
972
0.034993
a58e0065829efa585d05c036b442a368f95ae6a9
1,626
py
Python
src/entities/git_repo.py
wnjustdoit/devops-py
54dd722a577c4b3ecda45aa85c067130fd292ab9
[ "Apache-2.0" ]
null
null
null
src/entities/git_repo.py
wnjustdoit/devops-py
54dd722a577c4b3ecda45aa85c067130fd292ab9
[ "Apache-2.0" ]
6
2021-04-08T20:46:56.000Z
2022-01-13T01:52:06.000Z
src/entities/git_repo.py
wnjustdoit/devops-py
54dd722a577c4b3ecda45aa85c067130fd292ab9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from .entity import Entity, EntitySchema, Base from sqlalchemy import Column, Integer, String, Sequence from marshmallow import Schema, fields, post_load class GitRepo(Entity, Base): __tablename__ = 'git_repo' id = Column(Integer, Sequence('git_repo_id_seq'), primary_key=True) des...
37.813953
134
0.710947
1,442
0.886839
0
0
86
0.052891
0
0
49
0.030135
a590274916afd797594033b1e72a778f82d65211
4,415
py
Python
src/algorithms/tcn_utils/tcn_model.py
pengkangzaia/mvts-ano-eval
976ffa2f151c8f91ce007e9a455bb4f97f89f2c9
[ "MIT" ]
24
2021-09-04T08:51:55.000Z
2022-03-30T16:45:54.000Z
src/algorithms/tcn_utils/tcn_model.py
pengkangzaia/mvts-ano-eval
976ffa2f151c8f91ce007e9a455bb4f97f89f2c9
[ "MIT" ]
3
2021-10-12T02:34:34.000Z
2022-03-18T10:37:35.000Z
src/algorithms/tcn_utils/tcn_model.py
pengkangzaia/mvts-ano-eval
976ffa2f151c8f91ce007e9a455bb4f97f89f2c9
[ "MIT" ]
15
2021-09-18T03:41:02.000Z
2022-03-21T09:03:01.000Z
import torch import torch.nn as nn from torch.nn.utils import weight_norm """TCN adapted from https://github.com/locuslab/TCN""" class Chomp1d(nn.Module): def __init__(self, chomp_size): super(Chomp1d, self).__init__() self.chomp_size = chomp_size def forward(self, x): return x[:, :, ...
39.070796
110
0.59479
4,271
0.967384
0
0
0
0
0
0
54
0.012231
a591a1103146cfd95f29ba55d7e7f556a915a79a
1,868
py
Python
static/file/2021-04-10/index.py
yuguo97/nest-node
a3d6cb99005403691779c44a488e3b22f5479538
[ "MIT" ]
null
null
null
static/file/2021-04-10/index.py
yuguo97/nest-node
a3d6cb99005403691779c44a488e3b22f5479538
[ "MIT" ]
null
null
null
static/file/2021-04-10/index.py
yuguo97/nest-node
a3d6cb99005403691779c44a488e3b22f5479538
[ "MIT" ]
null
null
null
''' Author: your name Date: 2021-04-08 17:14:41 LastEditTime: 2021-04-09 09:13:28 LastEditors: Please set LastEditors Description: In User Settings Edit FilePath: \github\test\index.py ''' #!user/bin/env python3 # -*- coding: utf-8 -*- import psutil cpu_info = {'user': 0, 'system': 0, 'idle': 0, 'percent': 0} memo...
26.685714
75
0.646681
0
0
0
0
0
0
0
0
517
0.276767
a5924218bd91ec5cd3a910146334e0e5acd39d37
1,592
py
Python
SS/p202.py
MTandHJ/leetcode
f3832ed255d259cb881666ec8bd3de090d34e883
[ "MIT" ]
null
null
null
SS/p202.py
MTandHJ/leetcode
f3832ed255d259cb881666ec8bd3de090d34e883
[ "MIT" ]
null
null
null
SS/p202.py
MTandHJ/leetcode
f3832ed255d259cb881666ec8bd3de090d34e883
[ "MIT" ]
null
null
null
""" 编写一个算法来判断一个数 n 是不是快乐数。 「快乐数」定义为: 对于一个正整数,每一次将该数替换为它每个位置上的数字的平方和。 然后重复这个过程直到这个数变为 1,也可能是 无限循环 但始终变不到 1。 如果 可以变为  1,那么这个数就是快乐数。 如果 n 是快乐数就返回 true ;不是,则返回 false 。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/happy-number 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 """ from typing import List class Solution: de...
21.808219
53
0.523241
1,364
0.6437
0
0
0
0
0
0
955
0.450684
a5964514746ca9cd43f5272151dd592b02ad5040
2,309
py
Python
UI/UIObject.py
R2D2Hud/CharlieOSX
37c4edb0b31eda8082acd8e31afc3dc85fd75abe
[ "MIT" ]
12
2020-04-11T13:10:14.000Z
2022-03-24T09:12:54.000Z
UI/UIObject.py
R2D2Hud/CharlieOSX
37c4edb0b31eda8082acd8e31afc3dc85fd75abe
[ "MIT" ]
14
2020-01-24T14:07:45.000Z
2020-12-20T19:14:04.000Z
UI/UIObject.py
R2D2Hud/CharlieOSX
37c4edb0b31eda8082acd8e31afc3dc85fd75abe
[ "MIT" ]
11
2020-06-19T20:12:43.000Z
2021-04-25T05:02:20.000Z
from profileHelper import ProfileHelper from pybricks.parameters import Button, Color from pybricks.media.ev3dev import Image, ImageFile, Font, SoundFile # from UI.tools import Box class UIObject: def __init__(self, name: str, brick: EV3Brick, bounds: Box, contentType, content, padding=(0, 0, False), font=Font(f...
37.241935
159
0.603725
2,124
0.919879
0
0
0
0
0
0
78
0.033781
a59648f6d46920ef327bbe7ce9659f9fe533785d
9,558
py
Python
factory.py
rosinality/vision-transformers-pytorch
b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f
[ "MIT" ]
77
2021-04-03T06:44:19.000Z
2021-07-07T07:05:01.000Z
factory.py
rosinality/vision-transformers-pytorch
b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f
[ "MIT" ]
1
2021-04-08T06:59:41.000Z
2021-04-08T11:20:32.000Z
factory.py
rosinality/vision-transformers-pytorch
b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f
[ "MIT" ]
6
2021-04-15T13:36:37.000Z
2022-02-03T12:32:20.000Z
import os from types import SimpleNamespace import torch from torch.utils.data import DataLoader from torchvision import transforms from PIL import Image import numpy as np from tensorfn import distributed as dist, nsml, get_logger try: from nvidia.dali.pipeline import Pipeline from nvidia.dali im...
29.319018
89
0.643022
1,028
0.107554
168
0.017577
0
0
0
0
716
0.074911
a5965f266f95ad0e2605b8928b40d8635af8fdc1
2,990
py
Python
scripts/binarize-phrase-table.py
grgau/GroundHog
35fac1b80bdcc6b7516cb82fe2ecd19dbcfa248a
[ "BSD-3-Clause" ]
null
null
null
scripts/binarize-phrase-table.py
grgau/GroundHog
35fac1b80bdcc6b7516cb82fe2ecd19dbcfa248a
[ "BSD-3-Clause" ]
null
null
null
scripts/binarize-phrase-table.py
grgau/GroundHog
35fac1b80bdcc6b7516cb82fe2ecd19dbcfa248a
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Converts moses phrase table file to HDF5 files # Written by Bart van Merrienboer (University of Montreal) import argparse import cPickle import gzip import sys import tables import numpy parser = argparse.ArgumentParser() parser.add_argument("input", type=argparse.FileTy...
30.510204
97
0.614716
95
0.031773
0
0
0
0
0
0
596
0.199331
a596a50f47d0ab9d4cfb1eb2e63d7c4e56340474
1,137
py
Python
Easy/1207.UniqueNumberofOccurrences.py
YuriSpiridonov/LeetCode
2dfcc9c71466ffa2ebc1c89e461ddfca92e2e781
[ "MIT" ]
39
2020-07-04T11:15:13.000Z
2022-02-04T22:33:42.000Z
Easy/1207.UniqueNumberofOccurrences.py
YuriSpiridonov/LeetCode
2dfcc9c71466ffa2ebc1c89e461ddfca92e2e781
[ "MIT" ]
1
2020-07-15T11:53:37.000Z
2020-07-15T11:53:37.000Z
Easy/1207.UniqueNumberofOccurrences.py
YuriSpiridonov/LeetCode
2dfcc9c71466ffa2ebc1c89e461ddfca92e2e781
[ "MIT" ]
20
2020-07-14T19:12:53.000Z
2022-03-02T06:28:17.000Z
""" Given an array of integers arr, write a function that returns true if and only if the number of occurrences of each value in the array is unique. Example: Input: arr = [1,2,2,1,1,3] Output: true Explanation: The value 1 has 3 occurrences, 2 has 2 and 3 has 1. No two value...
29.153846
104
0.60774
266
0.233949
0
0
0
0
0
0
861
0.757256
a598b26fe309d9bc4db6c62f8d0ba413c791f7b0
9,360
py
Python
Playground3/src/playground/network/devices/pnms/PNMSDevice.py
kandarpck/networksecurity2018
dafe2ee8d39bd9596b1ce3fbc8b50ca645bcd626
[ "MIT" ]
3
2018-10-25T16:03:53.000Z
2019-06-13T15:24:41.000Z
Playground3/src/playground/network/devices/pnms/PNMSDevice.py
kandarpck/networksecurity2018
dafe2ee8d39bd9596b1ce3fbc8b50ca645bcd626
[ "MIT" ]
null
null
null
Playground3/src/playground/network/devices/pnms/PNMSDevice.py
kandarpck/networksecurity2018
dafe2ee8d39bd9596b1ce3fbc8b50ca645bcd626
[ "MIT" ]
null
null
null
from playground.common.os import isPidAlive from playground.common import CustomConstant as Constant from .NetworkManager import NetworkManager, ConnectionDeviceAPI, RoutesDeviceAPI import os, signal, time class PNMSDeviceLoader(type): """ This metaclass for PNMS device types auto loads concrete devic...
39.327731
119
0.583761
9,130
0.975427
0
0
957
0.102244
0
0
1,319
0.140919
a5991177aa084d283fe154f4a7a56db6da664557
162
py
Python
testing/tests/constants_enums/constants_enums.py
gigabackup/gigantum-client
70fe6b39b87b1c56351f2b4c551b6f1693813e4f
[ "MIT" ]
60
2018-09-26T15:46:00.000Z
2021-10-10T02:37:14.000Z
testing/tests/constants_enums/constants_enums.py
gigabackup/gigantum-client
70fe6b39b87b1c56351f2b4c551b6f1693813e4f
[ "MIT" ]
1,706
2018-09-26T16:11:22.000Z
2021-08-20T13:37:59.000Z
testing/tests/constants_enums/constants_enums.py
griffinmilsap/gigantum-client
70fe6b39b87b1c56351f2b4c551b6f1693813e4f
[ "MIT" ]
11
2019-03-14T13:23:51.000Z
2022-01-25T01:29:16.000Z
import enum """Declare all enumerations used in test.""" class ProjectConstants(enum.Enum): """All constants for project test.""" SUCCESS = 'success'
16.2
44
0.685185
100
0.617284
0
0
0
0
0
0
90
0.555556
a59a37e3de5885e67c006743f177528505c3b6da
3,315
py
Python
core/eval.py
lmkoch/subgroup-shift-detection
31971704dc4a768db5e082e6e37a504f4e245224
[ "MIT" ]
null
null
null
core/eval.py
lmkoch/subgroup-shift-detection
31971704dc4a768db5e082e6e37a504f4e245224
[ "MIT" ]
null
null
null
core/eval.py
lmkoch/subgroup-shift-detection
31971704dc4a768db5e082e6e37a504f4e245224
[ "MIT" ]
1
2022-01-26T09:54:41.000Z
2022-01-26T09:54:41.000Z
import os import pandas as pd import numpy as np from core.dataset import dataset_fn from core.model import model_fn, get_classification_model from core.mmdd import trainer_object_fn from core.muks import muks def stderr_proportion(p, n): return np.sqrt(p * (1-p) / n) def eval(exp_dir, exp_name, param...
41.4375
112
0.574962
0
0
0
0
0
0
0
0
1,095
0.330317
a59a527b87a6e3d50b3ac6e6acea7185a59af36b
1,423
py
Python
handlers/product_handlers.py
group-project-carbon-accounting/server
93155868a0988c04fe79d30ef565c652d2c8f5de
[ "MIT" ]
null
null
null
handlers/product_handlers.py
group-project-carbon-accounting/server
93155868a0988c04fe79d30ef565c652d2c8f5de
[ "MIT" ]
null
null
null
handlers/product_handlers.py
group-project-carbon-accounting/server
93155868a0988c04fe79d30ef565c652d2c8f5de
[ "MIT" ]
null
null
null
import tornado.web import json from handlers.async_fetch import async_fetch, GET, POST class ProductAddHandler(tornado.web.RequestHandler): async def post(self): request_data = json.loads(self.request.body) data = { 'prod_id': request_data['product_id'], 'comp_id': request_d...
43.121212
102
0.645819
1,329
0.933942
0
0
0
0
1,155
0.811665
302
0.212228
a59ac366b9f4a35b896bc07199abf2aebd42714c
3,144
py
Python
Python/lab8 [2, 5, 7, 12, 17]/tz17.py
da-foxbite/KSU121
133637abb4f465aeecb845e6735ba383a2fdd689
[ "MIT" ]
3
2019-09-23T06:06:30.000Z
2020-02-24T10:22:26.000Z
Python/lab8 [2, 5, 7, 12, 17]/tz17.py
da-foxbite/KSU141
133637abb4f465aeecb845e6735ba383a2fdd689
[ "MIT" ]
null
null
null
Python/lab8 [2, 5, 7, 12, 17]/tz17.py
da-foxbite/KSU141
133637abb4f465aeecb845e6735ba383a2fdd689
[ "MIT" ]
1
2020-10-26T11:00:22.000Z
2020-10-26T11:00:22.000Z
# 141, Суптеля Владислав # 【Дата】:「09.04.20」 # 17. Клас Покупець: Прізвище, Ім'я, По батькові, Адреса, Номер кредитної картки, Номер банківського рахунку; конструктор; # Методи: установка значень атрибутів, отримання значень атрибутів, висновок інформації. Створити масив об'єктів даного класу. # Вивести список покупців...
33.094737
130
0.682252
1,608
0.441758
0
0
0
0
0
0
1,360
0.373626
a59c22cef1a85002b71aba681bd1b6e2ffee762e
7,344
py
Python
absolv/tests/test_models.py
SimonBoothroyd/absolv
dedb2b6eb567ec1b627dbe50f36f68e0c32931c4
[ "MIT" ]
null
null
null
absolv/tests/test_models.py
SimonBoothroyd/absolv
dedb2b6eb567ec1b627dbe50f36f68e0c32931c4
[ "MIT" ]
30
2021-11-02T12:47:24.000Z
2022-03-01T22:00:39.000Z
absolv/tests/test_models.py
SimonBoothroyd/absolv
dedb2b6eb567ec1b627dbe50f36f68e0c32931c4
[ "MIT" ]
null
null
null
import numpy import pytest from openmm import unit from pydantic import ValidationError from absolv.models import ( DeltaG, EquilibriumProtocol, MinimizationProtocol, SimulationProtocol, State, SwitchingProtocol, System, TransferFreeEnergyResult, ) from absolv.tests import is_close cl...
30.473029
90
0.631672
7,008
0.953729
0
0
1,490
0.202776
0
0
474
0.064507
a59f046e4edcd4dce70590e6b4351f5262990e72
868
py
Python
archiv/tables.py
acdh-oeaw/gtrans
6f56b1d09de0cad503273bf8a01cd81e25220524
[ "MIT" ]
1
2020-03-15T16:14:02.000Z
2020-03-15T16:14:02.000Z
archiv/tables.py
acdh-oeaw/gtrans
6f56b1d09de0cad503273bf8a01cd81e25220524
[ "MIT" ]
14
2018-11-09T08:34:23.000Z
2022-02-10T08:15:53.000Z
archiv/tables.py
acdh-oeaw/gtrans
6f56b1d09de0cad503273bf8a01cd81e25220524
[ "MIT" ]
null
null
null
import django_tables2 as tables from django_tables2.utils import A from entities.models import * from archiv.models import * class ArchResourceTable(tables.Table): id = tables.LinkColumn( 'archiv:archresource_detail', args=[A('pk')], verbose_name='ID' ) title = tables.LinkColumn( '...
31
63
0.687788
740
0.852535
0
0
0
0
0
0
129
0.148618
a5a01c24d79e75ecbeea7e8b127b09c3ad1d05e0
376
py
Python
accounts/migrations/0005_auto_20200227_0418.py
inclusive-design/coop-map-directory-index
b215ea95677dc90fafe60eaa494a4fd6af0431fb
[ "BSD-3-Clause" ]
1
2020-01-28T16:16:49.000Z
2020-01-28T16:16:49.000Z
accounts/migrations/0005_auto_20200227_0418.py
inclusive-design/coop-map-directory-index
b215ea95677dc90fafe60eaa494a4fd6af0431fb
[ "BSD-3-Clause" ]
114
2020-02-12T20:22:07.000Z
2021-09-22T18:29:50.000Z
accounts/migrations/0005_auto_20200227_0418.py
inclusive-design/coop-map-directory-index
b215ea95677dc90fafe60eaa494a4fd6af0431fb
[ "BSD-3-Clause" ]
4
2020-04-21T21:09:25.000Z
2021-01-08T14:18:58.000Z
# Generated by Django 3.0.3 on 2020-02-27 04:18 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0004_auto_20200226_2329'), ] operations = [ migrations.AlterModelOptions( name='usersocialnetwork', options={'ve...
20.888889
62
0.619681
291
0.773936
0
0
0
0
0
0
138
0.367021
a5a08838db67fdc32c63308d4dd034cb11ff2a45
3,745
py
Python
src/FSG/WordEmbedding.py
handsomebrothers/Callback2Vec
370adbcfcc229d385ba9c8c581489b703a39ca85
[ "MIT" ]
null
null
null
src/FSG/WordEmbedding.py
handsomebrothers/Callback2Vec
370adbcfcc229d385ba9c8c581489b703a39ca85
[ "MIT" ]
null
null
null
src/FSG/WordEmbedding.py
handsomebrothers/Callback2Vec
370adbcfcc229d385ba9c8c581489b703a39ca85
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import multiprocessing from gensim.models import Word2Vec import csv def embedding_sentences(sentences, embedding_size = 64, window = 3, min_count = 0, file_to_load = None, file_to_save = None): ''' embeding_size Word Embedding Dimension window : Context window min_count : Word f...
40.706522
149
0.687316
0
0
0
0
0
0
0
0
1,108
0.294916
a5a1b481c21e6820b7064b6612f4c7a3b1370fc4
10,914
py
Python
hearthstone/player.py
dianarvp/stone_ground_hearth_battles
450e70eaef21b543be579a6d696676fb148a99b0
[ "Apache-2.0" ]
null
null
null
hearthstone/player.py
dianarvp/stone_ground_hearth_battles
450e70eaef21b543be579a6d696676fb148a99b0
[ "Apache-2.0" ]
null
null
null
hearthstone/player.py
dianarvp/stone_ground_hearth_battles
450e70eaef21b543be579a6d696676fb148a99b0
[ "Apache-2.0" ]
null
null
null
import itertools import typing from collections import defaultdict from typing import Optional, List, Callable, Type from hearthstone.cards import MonsterCard, CardEvent, Card from hearthstone.events import BuyPhaseContext, EVENTS from hearthstone.hero import EmptyHero from hearthstone.monster_types import MONSTER_TYP...
38.702128
133
0.660711
10,229
0.937237
0
0
502
0.045996
0
0
647
0.059282
a5a2a13b3d7e2462a415df9e5bf700f91ae466fd
12,743
py
Python
PyStationB/libraries/ABEX/abex/optimizers/zoom_optimizer.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
6
2021-09-29T15:46:55.000Z
2021-12-14T18:39:51.000Z
PyStationB/libraries/ABEX/abex/optimizers/zoom_optimizer.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
null
null
null
PyStationB/libraries/ABEX/abex/optimizers/zoom_optimizer.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
3
2021-09-27T10:35:20.000Z
2021-10-02T17:53:07.000Z
# ------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # ----------------------------------------------------------------------...
41.106452
120
0.697167
1,815
0.142431
0
0
0
0
0
0
7,464
0.585733
a5a44f9a6a387924ac0536e279f50da03dd8ba3f
1,146
py
Python
Labs/lab4/l4e3.py
felixchiasson/ITI1520
4208904bf7576433313524ebd1c1bdb9f49277f2
[ "MIT" ]
null
null
null
Labs/lab4/l4e3.py
felixchiasson/ITI1520
4208904bf7576433313524ebd1c1bdb9f49277f2
[ "MIT" ]
null
null
null
Labs/lab4/l4e3.py
felixchiasson/ITI1520
4208904bf7576433313524ebd1c1bdb9f49277f2
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 ############################################################################### # File Name : l4e3.py # Created By : Félix Chiasson (7138723) # Creation Date : [2015-10-06 11:43] # Last Modified : [2015-10-06 11:56] # Description...
35.8125
79
0.447644
0
0
0
0
0
0
0
0
638
0.555265
a5a4a070bcfd5efb385e2904922ea624312e4682
2,984
py
Python
python/datamongo/text/dmo/text_query_windower.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
python/datamongo/text/dmo/text_query_windower.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
python/datamongo/text/dmo/text_query_windower.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- import string import pandas as pd from pandas import DataFrame from base import BaseObject class TextQueryWindower(BaseObject): """ Window Text Query Results """ __exclude = set(string.punctuation) def __init__(self, query_results: d...
25.947826
103
0.499665
2,840
0.951743
0
0
0
0
0
0
703
0.23559
a5a5088a8ab15596ca84187c9c0e0627828850f9
683
py
Python
CondTools/L1Trigger/python/L1ConfigTSCKeys_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
CondTools/L1Trigger/python/L1ConfigTSCKeys_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
CondTools/L1Trigger/python/L1ConfigTSCKeys_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
from L1TriggerConfig.CSCTFConfigProducers.CSCTFObjectKeysOnline_cfi import * from L1TriggerConfig.DTTrackFinder.L1DTTFTSCObjectKeysOnline_cfi import * from L1TriggerConfig.RPCTriggerConfig.L1RPCObjectKeysOnline_cfi import * from L1TriggerConfig.GMTConfigProducers.L1MuGMTParametersKeysOnlineProd_cfi import * from L1Trig...
68.3
84
0.90776
0
0
0
0
0
0
0
0
11
0.016105
a5a553d43dc2a036ccb015ad21d1dcf2af2ae50c
640
py
Python
hackerrank/interview_prep/making_anagrams.py
luojxxx/CodingPractice
bac357aaddbda8e6e73a49c36f2eefd4304b336d
[ "MIT" ]
null
null
null
hackerrank/interview_prep/making_anagrams.py
luojxxx/CodingPractice
bac357aaddbda8e6e73a49c36f2eefd4304b336d
[ "MIT" ]
null
null
null
hackerrank/interview_prep/making_anagrams.py
luojxxx/CodingPractice
bac357aaddbda8e6e73a49c36f2eefd4304b336d
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/ctci-making-anagrams from collections import Counter def number_needed(a, b): aCounts = Counter(a) bCounts = Counter(b) aSet = set(aCounts) bSet = set(bCounts) similar = aSet.intersection(bSet) differences = aSet.symmetric_difference(bSet) matchingK...
29.090909
83
0.678125
0
0
0
0
0
0
0
0
60
0.09375
a5a5adab4d37dc9f239bb54f261403d5485bdb40
803
py
Python
DongbinNa/19/pt4.py
wonnerky/coteMaster
360e491e6342c1ee42ff49750b838a2ead865613
[ "Apache-2.0" ]
null
null
null
DongbinNa/19/pt4.py
wonnerky/coteMaster
360e491e6342c1ee42ff49750b838a2ead865613
[ "Apache-2.0" ]
null
null
null
DongbinNa/19/pt4.py
wonnerky/coteMaster
360e491e6342c1ee42ff49750b838a2ead865613
[ "Apache-2.0" ]
null
null
null
n = int(input()) numbers = list(map(int, input().split())) add, sub, mul, div = map(int, input().split()) def dfs(now, i): global max_num, min_num, add, sub, mul, div if i == n: max_num = max(max_num, now) min_num = min(min_num, now) else: if add > 0: add -= 1...
22.305556
48
0.414695
0
0
0
0
0
0
0
0
0
0
a5a7f71a8d3d53892df66d8802c0d53865e70be7
497
py
Python
app/store/migrations/0003_auto_20201127_1957.py
Yuehan-Wang/Marvas
d868a152865b9e8308db8d98642016a67b78f31d
[ "MIT" ]
null
null
null
app/store/migrations/0003_auto_20201127_1957.py
Yuehan-Wang/Marvas
d868a152865b9e8308db8d98642016a67b78f31d
[ "MIT" ]
null
null
null
app/store/migrations/0003_auto_20201127_1957.py
Yuehan-Wang/Marvas
d868a152865b9e8308db8d98642016a67b78f31d
[ "MIT" ]
3
2022-01-22T16:14:13.000Z
2022-01-23T18:25:06.000Z
# Generated by Django 2.2 on 2020-11-27 13:57 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('store', '0002_auto_20201127_1945'), ] operations = [ migrations.AlterModelOptions( name='category', options={'verbose_name_plu...
21.608696
58
0.573441
414
0.832998
0
0
0
0
0
0
145
0.291751
a5a81b703f6ebb1da895acb3224ef4edc9e40b99
19,141
py
Python
Graded/G3/slam/EKFSLAM.py
chrstrom/TTK4250
f453c3a59597d3fe6cff7d35b790689919798b94
[ "Unlicense" ]
null
null
null
Graded/G3/slam/EKFSLAM.py
chrstrom/TTK4250
f453c3a59597d3fe6cff7d35b790689919798b94
[ "Unlicense" ]
null
null
null
Graded/G3/slam/EKFSLAM.py
chrstrom/TTK4250
f453c3a59597d3fe6cff7d35b790689919798b94
[ "Unlicense" ]
null
null
null
from typing import Tuple import numpy as np from numpy import ndarray from dataclasses import dataclass, field from scipy.linalg import block_diag import scipy.linalg as la from utils import rotmat2d from JCBB import JCBB import utils import solution @dataclass class EKFSLAM: Q: ndarray R: ndarray do_asso...
35.77757
141
0.539575
18,876
0.986155
0
0
18,887
0.98673
0
0
9,389
0.490518
a5a924ddb3332cd660e8de578d9b220740f27184
3,185
py
Python
pykob/audio.py
Greg-R/PyKOB
fd3c7ca352f900bd14bb10dc71d567221a8af8cf
[ "MIT" ]
3
2020-06-29T19:59:39.000Z
2021-02-08T19:56:32.000Z
pykob/audio.py
Greg-R/PyKOB
fd3c7ca352f900bd14bb10dc71d567221a8af8cf
[ "MIT" ]
197
2020-04-30T08:08:52.000Z
2021-03-22T19:10:20.000Z
pykob/audio.py
MorseKOB/pykob-4
bf86917e4e06ce9590f414ace0eacbde08416137
[ "MIT" ]
2
2021-04-17T01:05:24.000Z
2021-11-03T16:43:53.000Z
""" MIT License Copyright (c) 2020 PyKOB - MorseKOB in Python 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, me...
32.5
82
0.706122
0
0
0
0
0
0
0
0
1,354
0.425118
a5a96f07f26b02ec492974bd34c7406e72ba2e22
3,333
py
Python
main.py
DaKidReturns/WikipediaScrapper
288b0bc3e882ff4ccb45dbdc021eabbc25cc19d0
[ "MIT" ]
null
null
null
main.py
DaKidReturns/WikipediaScrapper
288b0bc3e882ff4ccb45dbdc021eabbc25cc19d0
[ "MIT" ]
null
null
null
main.py
DaKidReturns/WikipediaScrapper
288b0bc3e882ff4ccb45dbdc021eabbc25cc19d0
[ "MIT" ]
null
null
null
import requests from bs4 import BeautifulSoup as bs4 from docx import Document as doc from docx.shared import Cm import sys if len(sys.argv) != 3: print("The format should be \n./main.py <url> <output_file_name>") else: url = sys.argv[1] doc_name = sys.argv[2] document = doc() page = requests...
42.189873
96
0.370237
0
0
0
0
0
0
0
0
685
0.205521
a5a9f77ca2671875a0d1fe9de7b77aefb68618a3
583
py
Python
math/count_digits.py
ethyl2/code_challenges
3c9ccca1782f92728e60a515a7ca797f6d470e81
[ "MIT" ]
null
null
null
math/count_digits.py
ethyl2/code_challenges
3c9ccca1782f92728e60a515a7ca797f6d470e81
[ "MIT" ]
null
null
null
math/count_digits.py
ethyl2/code_challenges
3c9ccca1782f92728e60a515a7ca797f6d470e81
[ "MIT" ]
null
null
null
""" https://www.codewars.com/kata/566fc12495810954b1000030/train/python Given an pos int n, and a digit that is < 10, d. Square all ints from 0 - n, and return the number times d is used in the squared results. """ def nb_dig(n, d): ''' results = '' for i in range(n+1): results += str(i * i) ...
23.32
89
0.61578
0
0
0
0
0
0
0
0
362
0.620926
a5ac9cd651f965f113812d5a35b9a777736d390b
3,492
py
Python
{{ cookiecutter.project_slug }}/{{ cookiecutter.package_name }}/strategies/resource.py
EMMC-ASBL/oteapi-plugin-template
31a772a4fb9be6eafabfa206fe6e7a23516bf188
[ "MIT" ]
null
null
null
{{ cookiecutter.project_slug }}/{{ cookiecutter.package_name }}/strategies/resource.py
EMMC-ASBL/oteapi-plugin-template
31a772a4fb9be6eafabfa206fe6e7a23516bf188
[ "MIT" ]
35
2022-01-17T10:23:01.000Z
2022-03-11T19:41:36.000Z
{{ cookiecutter.project_slug }}/{{ cookiecutter.package_name }}/strategies/resource.py
EMMC-ASBL/oteapi-plugin-template
31a772a4fb9be6eafabfa206fe6e7a23516bf188
[ "MIT" ]
2
2022-01-20T06:45:27.000Z
2022-02-09T15:59:21.000Z
"""Demo resource strategy class.""" # pylint: disable=no-self-use,unused-argument from typing import TYPE_CHECKING, Optional from oteapi.models import AttrDict, DataCacheConfig, ResourceConfig, SessionUpdate from oteapi.plugins import create_strategy from pydantic import Field from pydantic.dataclasses import dataclas...
29.846154
86
0.665521
3,075
0.880584
0
0
1,909
0.546678
0
0
1,679
0.480813
a5ad0bf99db5282a28fe82ac56a8026546459cf4
1,480
py
Python
unittests/TestSets.py
vtbassmatt/Scrython
49fd9bd112e0f552a4310ac81fdb3f2b9e2a3976
[ "MIT" ]
null
null
null
unittests/TestSets.py
vtbassmatt/Scrython
49fd9bd112e0f552a4310ac81fdb3f2b9e2a3976
[ "MIT" ]
null
null
null
unittests/TestSets.py
vtbassmatt/Scrython
49fd9bd112e0f552a4310ac81fdb3f2b9e2a3976
[ "MIT" ]
null
null
null
# This workaround makes sure that we can import from the parent dir import sys sys.path.append('..') from scrython.sets import Code import unittest import time promo_khans = Code('PKTK') khans = Code('KTK') class TestSets(unittest.TestCase): def test_object(self): self.assertIsInstance(khans.object(),...
25.084746
67
0.691892
1,220
0.824324
0
0
0
0
0
0
92
0.062162
a5ad538fb112ec421c158be3cf3243f38640e710
194
py
Python
GUI/check_email.py
BrendanCheong/BT2102-OSHES-Group16
2b62772e6c654b8d4e76f09df6473ac88912df28
[ "MIT" ]
5
2021-09-11T15:07:34.000Z
2021-09-11T15:16:04.000Z
GUI/check_email.py
BrendanCheong/Online-Smart-Home-Ecommerce-System
2b62772e6c654b8d4e76f09df6473ac88912df28
[ "MIT" ]
1
2021-09-18T10:33:00.000Z
2021-09-18T10:34:01.000Z
GUI/check_email.py
BrendanCheong/BT2102-OSHES-Group16
2b62772e6c654b8d4e76f09df6473ac88912df28
[ "MIT" ]
null
null
null
import re def check(email): regex = r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b' if (re.fullmatch(regex, email)): return True else: return False
19.4
67
0.489691
0
0
0
0
0
0
0
0
54
0.278351
a5aea13c60563cdbc4bc77d66b48baaf6efb6ec5
1,587
py
Python
SimpleEmailer.py
dschoonwinkel/InverterMQTT
75f13900f584d9905a02488eff7bd1dd3e53e73a
[ "Apache-2.0" ]
null
null
null
SimpleEmailer.py
dschoonwinkel/InverterMQTT
75f13900f584d9905a02488eff7bd1dd3e53e73a
[ "Apache-2.0" ]
null
null
null
SimpleEmailer.py
dschoonwinkel/InverterMQTT
75f13900f584d9905a02488eff7bd1dd3e53e73a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import smtplib import time import configparser config = configparser.ConfigParser() config.read('/home/pi/Development/Python/InverterMQTT/emailcredentials.conf') email = config['credentials']['email'] password = config['credentials']['password'] to_email = config['credentials']['to_email'] # ...
29.943396
99
0.674228
682
0.429742
0
0
0
0
0
0
649
0.408948
a5b066bc7defe004716762bdcddd92dae0d3fd15
876
py
Python
BaseKnowledge/file/file.py
Kose-i/python_test
d7b031aa33d699aeb9fe196fe0a6d216aa006f0d
[ "Unlicense" ]
null
null
null
BaseKnowledge/file/file.py
Kose-i/python_test
d7b031aa33d699aeb9fe196fe0a6d216aa006f0d
[ "Unlicense" ]
null
null
null
BaseKnowledge/file/file.py
Kose-i/python_test
d7b031aa33d699aeb9fe196fe0a6d216aa006f0d
[ "Unlicense" ]
null
null
null
#! /usr/bin/env python3 def func1(): f = open("test.txt", 'w') f.write("This is test") f.close() def func2(): with open("test.txt", 'r') as f: print(f.read()) import codecs def func3(): f = codecs.open("test.txt", 'w', 'utf-8', 'ignore') f.write("test func3") f.close() import os.path def func4(): ...
16.528302
53
0.592466
0
0
0
0
0
0
0
0
241
0.275114
a5b2bd395585d35f2949dc453f6442697664d6bf
202
py
Python
types/msg.py
UltiRequiem/professional-phython-platzi
0bf8f97b172d0799d6906193090ef69beb1c8b4b
[ "MIT" ]
4
2021-08-02T21:34:46.000Z
2021-09-24T03:26:35.000Z
types/msg.py
UltiRequiem/professional-phython-platzi
0bf8f97b172d0799d6906193090ef69beb1c8b4b
[ "MIT" ]
null
null
null
types/msg.py
UltiRequiem/professional-phython-platzi
0bf8f97b172d0799d6906193090ef69beb1c8b4b
[ "MIT" ]
4
2021-08-02T21:34:47.000Z
2021-08-11T03:21:37.000Z
def run(msg: str) -> None: """ Print the message received parameters. """ print(msg) if __name__ == "__main__": message: str = "Zero commands Python to be typed!" run(message)
18.363636
54
0.60396
0
0
0
0
0
0
0
0
99
0.490099
a5b4efb9c597491e24e7c42cb5dac380b74e6e91
702
py
Python
apps/billing/tasks.py
banyanbbt/banyan_data
4ce87dc1c49920d587a472b70842fcf5b3d9a3d2
[ "MIT" ]
2
2018-09-08T05:16:39.000Z
2018-09-10T02:50:31.000Z
apps/billing/tasks.py
banyanbbt/banyan_data
4ce87dc1c49920d587a472b70842fcf5b3d9a3d2
[ "MIT" ]
null
null
null
apps/billing/tasks.py
banyanbbt/banyan_data
4ce87dc1c49920d587a472b70842fcf5b3d9a3d2
[ "MIT" ]
null
null
null
import logging from config.celery_configs import app from lib.sms import client as sms_client from lib.blockchain.pandora import Pandora from apps.user.models import UserProfile logger = logging.getLogger(__name__) @app.task def sync_monthly_billing(): logger.info("start sync_monthly_billing") accounts = Use...
23.4
45
0.763533
0
0
0
0
476
0.678063
0
0
106
0.150997
a5b6d5ce0ce97c7ff9249912738d183eb9ca560c
449
py
Python
LBP51.py
Anandgowda18/LogicBasedPrograms
25baa9fbf19cd45229c87e099877e97281b0e76b
[ "MIT" ]
null
null
null
LBP51.py
Anandgowda18/LogicBasedPrograms
25baa9fbf19cd45229c87e099877e97281b0e76b
[ "MIT" ]
null
null
null
LBP51.py
Anandgowda18/LogicBasedPrograms
25baa9fbf19cd45229c87e099877e97281b0e76b
[ "MIT" ]
null
null
null
'''Given a valid IP address, return a defanged version of that IP address. A defanged IP address replaces every period '.' with "[.]". Input Format A string Constraints non-empty String Output Format replacement String Sample Input 0 1.1.1.1 Sample Output 0 1[.]1[.]1[.]1 Sample Input 1 255.100.50.0 Sample Out...
12.472222
134
0.67706
0
0
0
0
0
0
0
0
420
0.935412
a5b824b421e3455471988b500baaf9d0bcd0357a
4,981
py
Python
website/urls.py
pomo-mondreganto/CTForces-old
86758192f800108ff109f07fe155d5a98b4a3e14
[ "MIT" ]
null
null
null
website/urls.py
pomo-mondreganto/CTForces-old
86758192f800108ff109f07fe155d5a98b4a3e14
[ "MIT" ]
6
2021-10-01T14:18:34.000Z
2021-10-01T14:19:17.000Z
website/urls.py
pomo-mondreganto/CTForces-old
86758192f800108ff109f07fe155d5a98b4a3e14
[ "MIT" ]
null
null
null
from django.conf import settings from django.urls import path, re_path from django.views.static import serve from .views import * urlpatterns = [ re_path('^$', MainView.as_view(), name='main_view'), path('page/<int:page>/', MainView.as_view(), name='main_view_with_page'), re_path('^signup/$', UserRegistr...
54.736264
116
0.718932
0
0
0
0
0
0
0
0
2,352
0.472194
a5b8284d0679076f983319f40b4e3ceca65a28c5
1,372
py
Python
part2.py
Tiziana-I/project-covid-mask-classifier
e1619172656f8de92e8faae5dcb7437686f7ca5e
[ "MIT" ]
null
null
null
part2.py
Tiziana-I/project-covid-mask-classifier
e1619172656f8de92e8faae5dcb7437686f7ca5e
[ "MIT" ]
null
null
null
part2.py
Tiziana-I/project-covid-mask-classifier
e1619172656f8de92e8faae5dcb7437686f7ca5e
[ "MIT" ]
null
null
null
import numpy as np import cv2 import os cap = cv2.VideoCapture(0) #model=cv2.CascadeClassifier(os.path.join("haar-cascade-files","haarcascade_frontalface_default.xml")) smile=cv2.CascadeClassifier(os.path.join("haar-cascade-files","haarcascade_smile.xml")) #eye=cv2.CascadeClassifier(os.path.join("haar-cascade-files",...
38.111111
133
0.707726
0
0
0
0
0
0
0
0
696
0.507289
a5b83e7cc19ace3ba764ad74920296c856b01e5f
375
py
Python
spikes/function_signatures.py
insequor/webapp
73990bd74afd6d0f794c447e1bcc5d557ee2ed31
[ "MIT" ]
1
2020-08-07T12:16:49.000Z
2020-08-07T12:16:49.000Z
spikes/function_signatures.py
insequor/webapp
73990bd74afd6d0f794c447e1bcc5d557ee2ed31
[ "MIT" ]
1
2021-10-30T10:21:34.000Z
2021-10-30T10:21:34.000Z
spikes/function_signatures.py
insequor/webapp
73990bd74afd6d0f794c447e1bcc5d557ee2ed31
[ "MIT" ]
null
null
null
from inspect import signature def testFunction(a, b=None): pass class TestClass: def testMethod(me): pass if __name__ == '__main__': #sig = signature(testFunction) sig = signature(TestClass.testMethod) for key in sig.parameters: param = sig.parameters[key] print(key, p...
20.833333
41
0.624
53
0.141333
0
0
0
0
0
0
45
0.12
a5b8565cb66fcfd69f346054d3bf2453f6824c71
1,371
py
Python
docs/commands.py
immersionroom/vee
2c6f781dc96e9028f2446777b906ca37dc2f4299
[ "BSD-3-Clause" ]
6
2017-11-05T02:44:10.000Z
2021-07-14T19:10:56.000Z
docs/commands.py
immersionroom/vee
2c6f781dc96e9028f2446777b906ca37dc2f4299
[ "BSD-3-Clause" ]
null
null
null
docs/commands.py
immersionroom/vee
2c6f781dc96e9028f2446777b906ca37dc2f4299
[ "BSD-3-Clause" ]
1
2017-01-31T23:10:09.000Z
2017-01-31T23:10:09.000Z
import os import sys from argparse import _SubParsersAction sys.path.append(os.path.abspath(os.path.join(__file__, '..', '..'))) from vee.commands.main import get_parser def get_sub_action(parser): for action in parser._actions: if isinstance(action, _SubParsersAction): return action pa...
18.527027
68
0.56674
0
0
0
0
0
0
0
0
152
0.110868
a5b88dea17e5a8c345a0188b0209c92393ef06ec
551
py
Python
main.py
SciFiTy10/talkLikeSnoop
1a3408dfa244669a0d723737c62da93feb7d9ba8
[ "MIT" ]
1
2022-01-07T10:27:14.000Z
2022-01-07T10:27:14.000Z
main.py
SciFiTy10/talkLikeSnoop
1a3408dfa244669a0d723737c62da93feb7d9ba8
[ "MIT" ]
null
null
null
main.py
SciFiTy10/talkLikeSnoop
1a3408dfa244669a0d723737c62da93feb7d9ba8
[ "MIT" ]
null
null
null
#imports from routing_methods import on_launch, intent_router ############################## # Program Entry ############################## #lambda_handler (this is like main()) def lambda_handler(event, context): #event is a python dictionary #LaunchRequest is an object that means the user made a request to ...
34.4375
108
0.638838
0
0
0
0
0
0
0
0
313
0.568058
a5bc2b0b89e7e05fdfc86ac8ee4661e2d1a71f8f
13,303
py
Python
thrift/clients.py
fabiobatalha/processing
f3ad99e161de2befc7908168bfd7843f988c379d
[ "BSD-2-Clause" ]
null
null
null
thrift/clients.py
fabiobatalha/processing
f3ad99e161de2befc7908168bfd7843f988c379d
[ "BSD-2-Clause" ]
null
null
null
thrift/clients.py
fabiobatalha/processing
f3ad99e161de2befc7908168bfd7843f988c379d
[ "BSD-2-Clause" ]
null
null
null
# coding: utf-8 import os import thriftpy import json import logging from thriftpy.rpc import make_client from xylose.scielodocument import Article, Journal LIMIT = 1000 logger = logging.getLogger(__name__) ratchet_thrift = thriftpy.load( os.path.join(os.path.dirname(__file__))+'/ratchet.thrift') articlemeta_t...
29.496674
123
0.42622
12,563
0.944373
1,470
0.110501
940
0.070661
0
0
1,751
0.131624
a5be28a44a12bd589d156a3a7d0bbad6c6678d9a
6,705
py
Python
src/pypsr.py
wagglefoot/TVAE
74f8c5413d3c0d8607af50ddb0d96c4c2d477261
[ "MIT" ]
22
2015-03-14T04:23:00.000Z
2022-03-24T03:29:22.000Z
src/pypsr.py
wagglefoot/TVAE
74f8c5413d3c0d8607af50ddb0d96c4c2d477261
[ "MIT" ]
null
null
null
src/pypsr.py
wagglefoot/TVAE
74f8c5413d3c0d8607af50ddb0d96c4c2d477261
[ "MIT" ]
15
2015-02-04T13:09:27.000Z
2022-03-24T03:29:24.000Z
from operator import sub import numpy as np from sklearn import metrics from sklearn.neighbors import NearestNeighbors from toolz import curry def global_false_nearest_neighbors(x, lag, min_dims=1, max_dims=10, **cutoffs): """ Across a range of embedding dimensions $d$, embeds $x(t)$ with lag $\tau$, finds a...
31.186047
113
0.631022
0
0
360
0.053691
363
0.054139
0
0
4,197
0.625951
a5bef664ecd325ec7c754416c8cb289908db04d1
2,026
py
Python
tests/test_fetching_info_from_websites.py
antoniodimariano/websites_metrics_collector
5113a680612b126005ac7f9f52ed35d26b806ea0
[ "Apache-2.0" ]
null
null
null
tests/test_fetching_info_from_websites.py
antoniodimariano/websites_metrics_collector
5113a680612b126005ac7f9f52ed35d26b806ea0
[ "Apache-2.0" ]
null
null
null
tests/test_fetching_info_from_websites.py
antoniodimariano/websites_metrics_collector
5113a680612b126005ac7f9f52ed35d26b806ea0
[ "Apache-2.0" ]
null
null
null
import unittest from unittest import IsolatedAsyncioTestCase from websites_metrics_collector.communication import webpages_fetcher class Test(IsolatedAsyncioTestCase): """ This Class tests the fetch_list_of_urls() async method used to fetch URLs """ async def test_a_fetch_with_valid_list_of_url(self): ...
44.043478
117
0.695953
1,892
0.93386
0
0
602
0.297137
1,725
0.851431
354
0.174729
a5bef6fa512a2ff46684cc9ce0bb82ae7685d3ba
773
py
Python
planegeometry/structures/tests/random_segments.py
ufkapano/planegeometry
fa9309a4e867acedd635665f32d7f59a8eeaf2e3
[ "BSD-3-Clause" ]
null
null
null
planegeometry/structures/tests/random_segments.py
ufkapano/planegeometry
fa9309a4e867acedd635665f32d7f59a8eeaf2e3
[ "BSD-3-Clause" ]
null
null
null
planegeometry/structures/tests/random_segments.py
ufkapano/planegeometry
fa9309a4e867acedd635665f32d7f59a8eeaf2e3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python import random import Gnuplot # Python 2 only from planegeometry.structures.points import Point from planegeometry.structures.segments import Segment gnu = Gnuplot.Gnuplot (persist = 1) visible = True for i in range(10): segment = Segment(random.random(), random.random(), random.random...
23.424242
55
0.684347
0
0
0
0
0
0
0
0
324
0.419146
3c0172a4b6c39d5c3838a7e6ee2dd86d14d618b0
77
py
Python
proxy/admin.py
jokajak/infinity_tracker
21f83925d9899dc25bc58b198426f329a549b0e0
[ "Apache-2.0" ]
1
2021-01-21T08:44:21.000Z
2021-01-21T08:44:21.000Z
proxy/admin.py
jokajak/infinity_tracker
21f83925d9899dc25bc58b198426f329a549b0e0
[ "Apache-2.0" ]
126
2020-08-03T22:07:38.000Z
2022-03-28T22:25:59.000Z
proxy/admin.py
jokajak/infinity_tracker
21f83925d9899dc25bc58b198426f329a549b0e0
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin # NOQA: F401 # Register your models here.
19.25
46
0.753247
0
0
0
0
0
0
0
0
40
0.519481
3c01c3ac689a157ca3b1ed4911d58fd47e935434
1,050
py
Python
local/make_fbank.py
coolEphemeroptera/AESRC2020
b64cdeeaaf74e8c1a741930b3a47dc8dcadca8de
[ "Apache-2.0" ]
35
2020-09-26T13:40:16.000Z
2022-03-22T19:42:20.000Z
local/make_fbank.py
coolEphemeroptera/ARNet
b64cdeeaaf74e8c1a741930b3a47dc8dcadca8de
[ "Apache-2.0" ]
4
2021-04-10T13:05:52.000Z
2022-03-14T03:22:32.000Z
local/make_fbank.py
coolEphemeroptera/ARNet
b64cdeeaaf74e8c1a741930b3a47dc8dcadca8de
[ "Apache-2.0" ]
7
2020-09-26T15:52:45.000Z
2021-06-11T05:05:23.000Z
import python_speech_features as psf import soundfile as sf # import scipy.io.wavfile as wav import pickle as pkl import sys import os import re # linux to windows 路径转换 def path_lin2win(path): pattern = "/[a-z]/" position = re.findall(pattern,path)[0][1].upper() return re.sub(pattern,"%s:/"%pos...
23.863636
97
0.631429
0
0
0
0
0
0
0
0
251
0.23546
3c0299abc0c111e544b5842dcd9b42f82f6088c5
1,344
py
Python
tests/__init__.py
jun-kai-xin/douban
989a797de467f5a9a8b77a05fa8242bebf657a51
[ "MIT" ]
null
null
null
tests/__init__.py
jun-kai-xin/douban
989a797de467f5a9a8b77a05fa8242bebf657a51
[ "MIT" ]
null
null
null
tests/__init__.py
jun-kai-xin/douban
989a797de467f5a9a8b77a05fa8242bebf657a51
[ "MIT" ]
null
null
null
def fake_response_from_file(file_name, url=None, meta=None): import os import codecs from scrapy.http import HtmlResponse, Request if not url: url = 'http://www.example.com' _meta = {'mid': 1291844, 'login': False} # 必要的信息,随便弄一个就行了 if meta: meta.update(_meta) else: ...
28.595745
78
0.590774
0
0
0
0
0
0
0
0
163
0.116429
3c02f34d8d7c7f266cdc6308a85575de226c48f6
2,703
py
Python
src/tests/test_pyning/test_combinationdict.py
essennell/pyning
c28d8fae99ab6cb4394960b72565a4915aee7adc
[ "MIT" ]
null
null
null
src/tests/test_pyning/test_combinationdict.py
essennell/pyning
c28d8fae99ab6cb4394960b72565a4915aee7adc
[ "MIT" ]
3
2020-03-24T16:25:58.000Z
2021-06-01T22:57:53.000Z
src/tests/test_pyning/test_combinationdict.py
essennell/pyning
c28d8fae99ab6cb4394960b72565a4915aee7adc
[ "MIT" ]
null
null
null
from pyning.combinationdict import CombinationDict import pytest def test_key_at_root_is_located(): items = CombinationDict( '/', { 'a': 10 } ) assert items[ 'a' ] == 10 def test_key_nested_1_level_is_located(): items = CombinationDict( '/', { 'a': { 'b': 10 } } ) assert items[ 'a/b' ] == 10 def ...
27.865979
70
0.574547
0
0
0
0
0
0
0
0
324
0.119867
3c045b5de4e55fe90b3f8563b224a0193ac2dff7
6,917
py
Python
stockBOT/Discord/fc_info.py
Chenct-jonathan/LokiHub
7193589151e88f4e66aee6457926e565d0023fa1
[ "MIT" ]
17
2020-11-25T07:40:18.000Z
2022-03-07T03:29:18.000Z
stockBOT/Discord/fc_info.py
Chenct-jonathan/LokiHub
7193589151e88f4e66aee6457926e565d0023fa1
[ "MIT" ]
8
2020-12-18T13:23:59.000Z
2021-10-03T21:41:50.000Z
stockBOT/Discord/fc_info.py
Chenct-jonathan/LokiHub
7193589151e88f4e66aee6457926e565d0023fa1
[ "MIT" ]
43
2020-12-02T09:03:57.000Z
2021-12-23T03:30:25.000Z
#!/usr/bin/env python3 # -*- coding:utf-8 -*- from bs4 import BeautifulSoup import requests from requests import post from requests import codes def information(symbol): URL = "https://goodinfo.tw/StockInfo/StockDetail.asp?STOCK_ID="+ symbol headers = {'user-agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit...
32.474178
134
0.675293
0
0
0
0
0
0
0
0
1,357
0.196183
3c062192bd225720274ca7e3b61333f806b3a7b1
6,781
py
Python
tests/constants.py
phihos/Python-OpenVPN-LDAP-Auth
87dd986f49555d0fb50ad8d991cf02092a9d55dc
[ "MIT" ]
1
2021-12-17T14:54:36.000Z
2021-12-17T14:54:36.000Z
tests/constants.py
phihos/python-openvpn-ldap-auth
87dd986f49555d0fb50ad8d991cf02092a9d55dc
[ "MIT" ]
null
null
null
tests/constants.py
phihos/python-openvpn-ldap-auth
87dd986f49555d0fb50ad8d991cf02092a9d55dc
[ "MIT" ]
null
null
null
import os import shutil from datetime import datetime # INPUT PARAMS LDAP_URL = os.environ['TEST_LDAP_URL'] LDAP_BASE_DN = os.environ['TEST_LDAP_BASE_DN'] LDAP_ADMIN_DN = os.environ['TEST_LDAP_ADMIN_DN'] LDAP_ADMIN_PASSWORD = os.environ['TEST_LDAP_ADMIN_PASSWORD'] LDAP_BIND_TIMEOUT = os.environ.get('TEST_LDAP_BIND_TIM...
46.765517
118
0.668191
0
0
0
0
0
0
0
0
2,612
0.385194
3c06dc2f7a1273c76e68bacba57d4a3e26a88d66
1,377
py
Python
http_utils/recs/top_popular_recommendation_handler.py
drayvs/grouple-recsys-production
5141bacd5dc64e023059292faff5bfdefefd9f23
[ "MIT" ]
null
null
null
http_utils/recs/top_popular_recommendation_handler.py
drayvs/grouple-recsys-production
5141bacd5dc64e023059292faff5bfdefefd9f23
[ "MIT" ]
null
null
null
http_utils/recs/top_popular_recommendation_handler.py
drayvs/grouple-recsys-production
5141bacd5dc64e023059292faff5bfdefefd9f23
[ "MIT" ]
null
null
null
from concurrent.futures import ThreadPoolExecutor from tornado.concurrent import run_on_executor from webargs import fields from webargs.tornadoparser import use_args from loguru import logger from http_utils.base import BaseHandler, MAX_THREADS class TopPopularRecommendationHandler(BaseHandler): executor = Threa...
37.216216
102
0.658678
1,128
0.819172
0
0
833
0.604938
0
0
216
0.156863
3c07a5241ac429798f7ed558bc1d6c02e0ff5253
662
py
Python
NucleicAcids/dssrBlock3.py
MooersLab/jupyterlabpymolpysnipsplus
b886750d63372434df53d4d6d7cdad6cb02ae4e7
[ "MIT" ]
null
null
null
NucleicAcids/dssrBlock3.py
MooersLab/jupyterlabpymolpysnipsplus
b886750d63372434df53d4d6d7cdad6cb02ae4e7
[ "MIT" ]
null
null
null
NucleicAcids/dssrBlock3.py
MooersLab/jupyterlabpymolpysnipsplus
b886750d63372434df53d4d6d7cdad6cb02ae4e7
[ "MIT" ]
null
null
null
# Description: DSSR block representation for a multi-state example after loading the dssr_block.py script by Thomas Holder. The x3dna-dssr executable needs to be in the PATH. Edit the path to Thomas Holder's block script. # Source: Generated while helping Miranda Adams at U of Saint Louis. """ cmd.do('reinitialize;'...
38.941176
222
0.712991
0
0
0
0
0
0
0
0
612
0.924471
3c091171ce7d459ab7bdf55ac4292ac21cd0a68c
12,007
py
Python
custom_components/climate/gree.py
ardeus-ua/gree-python-api
ecfbdef34ff99fc0822f70be17cdeb6c625fd276
[ "MIT" ]
1
2018-12-10T17:32:48.000Z
2018-12-10T17:32:48.000Z
custom_components/climate/gree.py
ardeus-ua/gree-python-api
ecfbdef34ff99fc0822f70be17cdeb6c625fd276
[ "MIT" ]
null
null
null
custom_components/climate/gree.py
ardeus-ua/gree-python-api
ecfbdef34ff99fc0822f70be17cdeb6c625fd276
[ "MIT" ]
1
2020-08-11T14:51:04.000Z
2020-08-11T14:51:04.000Z
import asyncio import logging import binascii import socket import os.path import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.climate import (DOMAIN, ClimateDevice, PLATFORM_SCHEMA, STATE_IDLE, STATE_HEAT, STATE_COOL, STATE_AUTO, STATE_DRY, SUPPORT_OPERATION_MOD...
34.404011
228
0.68077
7,080
0.589656
678
0.056467
4,686
0.390272
0
0
1,653
0.13767
3c09d1eafa4175a7dae038754ad5b4a09e871bc9
6,492
py
Python
overhang/dnastorage_utils/system/header.py
dna-storage/DINOS
65f4142e80d646d7eefa3fc16d747d21ec43fbbe
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
overhang/dnastorage_utils/system/header.py
dna-storage/DINOS
65f4142e80d646d7eefa3fc16d747d21ec43fbbe
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
overhang/dnastorage_utils/system/header.py
dna-storage/DINOS
65f4142e80d646d7eefa3fc16d747d21ec43fbbe
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
from dnastorage.codec.base_conversion import convertIntToBytes,convertBytesToInt from dnastorage.arch.builder import * import editdistance as ed #from dnastorage.primer.primer_util import edit_distance from io import BytesIO from dnastorage.util.packetizedfile import * import math import struct from dnastorage.system.f...
31.211538
109
0.608595
0
0
0
0
0
0
0
0
1,397
0.215188
3c0c8d1fb6b9a95e3b3506596eae5b34be7226ac
2,386
py
Python
numba/containers/typedtuple.py
liuzhenhai/numba
855a2b262ae3d82bd6ac1c3e1c0acb36ee2e2acf
[ "BSD-2-Clause" ]
1
2015-01-29T06:52:36.000Z
2015-01-29T06:52:36.000Z
numba/containers/typedtuple.py
shiquanwang/numba
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
[ "BSD-2-Clause" ]
null
null
null
numba/containers/typedtuple.py
shiquanwang/numba
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import from functools import partial import numba as nb from numba.containers import orderedcontainer import numpy as np INITIAL_BUFSIZE = 5 def notimplemented(msg): raise NotImplementedError("'%s' method of type 'typedtuple'" % ...
26.808989
75
0.544007
858
0.359598
0
0
882
0.369656
0
0
768
0.321878
3c0cdb9dded53f14973b9af474148c0b7d6c7d6f
1,353
py
Python
pythondata_cpu_minerva/__init__.py
litex-hub/litex-data-cpu-minerva
3896ce15f5d6420f7797b1f95249f948533bf542
[ "BSD-2-Clause" ]
null
null
null
pythondata_cpu_minerva/__init__.py
litex-hub/litex-data-cpu-minerva
3896ce15f5d6420f7797b1f95249f948533bf542
[ "BSD-2-Clause" ]
null
null
null
pythondata_cpu_minerva/__init__.py
litex-hub/litex-data-cpu-minerva
3896ce15f5d6420f7797b1f95249f948533bf542
[ "BSD-2-Clause" ]
null
null
null
import os.path __dir__ = os.path.split(os.path.abspath(os.path.realpath(__file__)))[0] data_location = os.path.join(__dir__, "sources") src = "https://github.com/lambdaconcept/minerva" # Module version version_str = "0.0.post260" version_tuple = (0, 0, 260) try: from packaging.version import Version as V pvers...
26.529412
83
0.719882
0
0
0
0
0
0
0
0
528
0.389956
3c0d77712915106228bf8f6e63542f7a42d1d3f1
1,602
py
Python
config.py
jasonyanglu/fedavgpy
cefbe5854f02d3df1197d849872286439c86e949
[ "MIT" ]
1
2022-03-18T15:27:29.000Z
2022-03-18T15:27:29.000Z
config.py
jasonyanglu/fedavgpy
cefbe5854f02d3df1197d849872286439c86e949
[ "MIT" ]
null
null
null
config.py
jasonyanglu/fedavgpy
cefbe5854f02d3df1197d849872286439c86e949
[ "MIT" ]
null
null
null
# GLOBAL PARAMETERS DATASETS = ['sent140', 'nist', 'shakespeare', 'mnist', 'synthetic', 'cifar10'] TRAINERS = {'fedavg': 'FedAvgTrainer', 'fedavg4': 'FedAvg4Trainer', 'fedavg5': 'FedAvg5Trainer', 'fedavg9': 'FedAvg9Trainer', 'fedavg_imba': 'FedAvgTrainerImba',...
38.142857
103
0.529963
1,217
0.759675
0
0
0
0
0
0
568
0.354557
3c0dac01937088c28952c4c1e01fa4a3c19fcaa9
3,266
py
Python
Gan/gan.py
caiyueliang/CarClassification
a8d8051085c4e66ed3ed67e56360a515c9762cd5
[ "Apache-2.0" ]
null
null
null
Gan/gan.py
caiyueliang/CarClassification
a8d8051085c4e66ed3ed67e56360a515c9762cd5
[ "Apache-2.0" ]
null
null
null
Gan/gan.py
caiyueliang/CarClassification
a8d8051085c4e66ed3ed67e56360a515c9762cd5
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 from argparse import ArgumentParser import os import model_train from torchvision import models def parse_argvs(): parser = ArgumentParser(description='GAN') parser.add_argument('--data_path', type=str, help='data_path', default='./data') parser.add_argument('--num_workers', type=int, help...
48.029412
111
0.709124
0
0
0
0
0
0
0
0
1,400
0.410076
3c1079153ceb5f7b4146c5df6cbab9e874e7d7f4
854
py
Python
Modulo 2/ex068.py
Werberty/Curso-em-Video-Python3
24c0299edd635fb9c2db2ecbaf8532d292f92d49
[ "MIT" ]
1
2022-03-06T11:37:47.000Z
2022-03-06T11:37:47.000Z
Modulo 2/ex068.py
Werberty/Curso-em-Video-Python3
24c0299edd635fb9c2db2ecbaf8532d292f92d49
[ "MIT" ]
null
null
null
Modulo 2/ex068.py
Werberty/Curso-em-Video-Python3
24c0299edd635fb9c2db2ecbaf8532d292f92d49
[ "MIT" ]
null
null
null
from random import randint print('-=-'*10) print('JOGO DO PAR OU IMPAR') cont = 0 while True: print('-=-' * 10) n = int(input('Digite um valor: ')) op = str(input('Par ou impar? [P/I] ')).upper().strip()[0] ia = randint(0, 10) res = n + ia print('-'*30) print(f'Você jogou {n} e o computador ...
25.878788
73
0.480094
0
0
0
0
0
0
0
0
305
0.355064
3c10cbd008220b779ffa61252edc4ab7bdc901a1
5,506
py
Python
server/inbox/views.py
amy-xiang/CMPUT404_PROJECT
cbcea0cd164d6377ede397e934f960505e8f347a
[ "W3C-20150513" ]
1
2021-04-06T22:35:53.000Z
2021-04-06T22:35:53.000Z
server/inbox/views.py
amy-xiang/CMPUT404_PROJECT
cbcea0cd164d6377ede397e934f960505e8f347a
[ "W3C-20150513" ]
null
null
null
server/inbox/views.py
amy-xiang/CMPUT404_PROJECT
cbcea0cd164d6377ede397e934f960505e8f347a
[ "W3C-20150513" ]
null
null
null
from django.core.exceptions import ValidationError from django.shortcuts import render, get_object_or_404 from django.db import IntegrityError from rest_framework import authentication, generics, permissions, status from rest_framework.exceptions import PermissionDenied from rest_framework.response import Response fr...
44.403226
116
0.606793
4,780
0.868144
0
0
0
0
0
0
1,064
0.193244
3c119513513dbce82555731b084d2de00dc48dc8
1,873
py
Python
black_list_all.py
philipempl/mail_watch
802df3146c462aeb670a4a973e428976d90abf06
[ "Apache-2.0" ]
null
null
null
black_list_all.py
philipempl/mail_watch
802df3146c462aeb670a4a973e428976d90abf06
[ "Apache-2.0" ]
1
2019-12-11T08:49:51.000Z
2019-12-11T08:49:51.000Z
black_list_all.py
philipempl/mail_watch
802df3146c462aeb670a4a973e428976d90abf06
[ "Apache-2.0" ]
null
null
null
import imaplib, base64, os, email, re, configparser import tkinter as tk from tkinter import messagebox from datetime import datetime from email import generator from dateutil.parser import parse def init(): mail = imaplib.IMAP4_SSL(config['SERVER']['Host'],config['SERVER']['Port']) pwd = str(input("PWD: ")) ...
28.378788
99
0.620929
0
0
0
0
0
0
0
0
317
0.169247
3c11fb38e2dcb32d635011cf74ded4f173fac7e7
539
py
Python
chpt6/Pentagonal_numbers.py
GDG-Buea/learn-python
9dfe8caa4b57489cf4249bf7e64856062a0b93c2
[ "Apache-2.0" ]
null
null
null
chpt6/Pentagonal_numbers.py
GDG-Buea/learn-python
9dfe8caa4b57489cf4249bf7e64856062a0b93c2
[ "Apache-2.0" ]
2
2018-05-21T09:39:00.000Z
2018-05-27T15:59:15.000Z
chpt6/Pentagonal_numbers.py
GDG-Buea/learn-python
9dfe8caa4b57489cf4249bf7e64856062a0b93c2
[ "Apache-2.0" ]
2
2018-05-19T14:59:56.000Z
2018-05-19T15:25:48.000Z
# # This program is a function that displays the first 100 pentagonal numbers with 10 numbers on each line. # A pentagonal number is defined as n(3n - 1)/2 for n = 1, 2, c , and so on. # So, the first few numbers are 1, 5, 12, 22, .... def get_pentagonal_number(n): pentagonal_number = round(n * (3 * n - 1) / 2)...
23.434783
105
0.595547
0
0
0
0
0
0
0
0
241
0.447124
3c129d467e7a619b95bbc8aa752a9a6e384e5ae6
4,075
py
Python
iraclis/_1databases.py
nespinoza/Iraclis
3b5dd8d6bc073f6d2c24ad14341020694255bf65
[ "CC-BY-4.0" ]
null
null
null
iraclis/_1databases.py
nespinoza/Iraclis
3b5dd8d6bc073f6d2c24ad14341020694255bf65
[ "CC-BY-4.0" ]
null
null
null
iraclis/_1databases.py
nespinoza/Iraclis
3b5dd8d6bc073f6d2c24ad14341020694255bf65
[ "CC-BY-4.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from ._0errors import * from ._0imports import * class Database: def __init__(self, database_name, vital=False, date_to_update='daily', force_update=False, ask_size=None): package_name = 'iracli...
38.084112
114
0.553374
3,884
0.953129
0
0
0
0
0
0
496
0.121718
3c134e04d61928fa6fcc6871ade77a7efb97baf0
1,029
py
Python
Level2/Ex_5.py
zac11/Python_Excerices
775739e2639be1f82cc3690c854b9ea0ece05042
[ "Apache-2.0" ]
2
2019-03-09T20:31:06.000Z
2020-06-19T12:15:13.000Z
Level2/Ex_5.py
zac11/Python_Excerices
775739e2639be1f82cc3690c854b9ea0ece05042
[ "Apache-2.0" ]
null
null
null
Level2/Ex_5.py
zac11/Python_Excerices
775739e2639be1f82cc3690c854b9ea0ece05042
[ "Apache-2.0" ]
1
2018-08-11T18:36:49.000Z
2018-08-11T18:36:49.000Z
""" Write a program that accepts a sequence of whitespace separated words as input and prints the words after removing all duplicate words and sorting them alphanumerically. Suppose the following input is supplied to the program: hello world and practice makes perfect and hello world again Then, the output should be: ...
19.415094
118
0.74344
0
0
0
0
0
0
0
0
914
0.888241
3c1675a2a9274be019b322c8830f740dbd48fb14
6,063
py
Python
alfworld/agents/utils/traj_process.py
roy860328/VSGM
3ec19f9cf1401cecf45527687936b8fe4167f672
[ "MIT" ]
6
2021-05-22T15:33:42.000Z
2022-01-12T03:34:39.000Z
alfworld/agents/utils/traj_process.py
roy860328/VSGM
3ec19f9cf1401cecf45527687936b8fe4167f672
[ "MIT" ]
1
2021-06-19T10:04:13.000Z
2021-06-20T03:37:23.000Z
alfworld/agents/utils/traj_process.py
roy860328/VSGM
3ec19f9cf1401cecf45527687936b8fe4167f672
[ "MIT" ]
null
null
null
import os import cv2 import json import numpy as np import h5py from PIL import Image TASK_TYPES = {1: "pick_and_place_simple", 2: "look_at_obj_in_light", 3: "pick_clean_then_place_in_recep", 4: "pick_heat_then_place_in_recep", 5: "pick_cool_then_place_in_recep", ...
41.527397
102
0.628072
0
0
0
0
0
0
0
0
1,274
0.210127
3c17265b394405d74fda0b7ba580609c53a824f6
846
py
Python
log.py
bsha3l173/NetDiagBot
c76d00a34ae4587942010b2370dd0ac35a83bcdd
[ "Unlicense" ]
null
null
null
log.py
bsha3l173/NetDiagBot
c76d00a34ae4587942010b2370dd0ac35a83bcdd
[ "Unlicense" ]
null
null
null
log.py
bsha3l173/NetDiagBot
c76d00a34ae4587942010b2370dd0ac35a83bcdd
[ "Unlicense" ]
null
null
null
__author__ = 'bsha3l173' import logging import datetime from conf import LOG_FILENAME class Log(): logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) def log_d(self, message, text): last_name = '' first_name = '' user_name = '' if not message.from_u...
33.84
108
0.611111
748
0.884161
0
0
0
0
0
0
60
0.070922
3c1927e4c80951e764d207f99cb77de8d5e6eb00
1,850
py
Python
selenium-browser.py
steflayanto/international-google-search
05cc773b158fe11202fdf39fb515b398a08b7e3c
[ "MIT" ]
null
null
null
selenium-browser.py
steflayanto/international-google-search
05cc773b158fe11202fdf39fb515b398a08b7e3c
[ "MIT" ]
null
null
null
selenium-browser.py
steflayanto/international-google-search
05cc773b158fe11202fdf39fb515b398a08b7e3c
[ "MIT" ]
null
null
null
import os, time, pyautogui import selenium from selenium import webdriver from location_reference import country_map # STATIC SETTINGS DPI = 125 # Scaling factor of texts and apps in display settings screen_dims = [x / (DPI/100) for x in pyautogui.size()] code_map = country_map() print("International Google Searc...
28.90625
120
0.702162
0
0
0
0
0
0
0
0
814
0.44
3c1ce045f39d2d470a259001626bc914b8162303
29
py
Python
homeassistant/components/thomson/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/thomson/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/thomson/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""The thomson component."""
14.5
28
0.655172
0
0
0
0
0
0
0
0
28
0.965517
3c1d0a50a97a1bf750da3e79140c45303971c672
2,027
py
Python
registration/admin.py
allenallen/interedregistration
d6b93bfc33d7bb9bfbabdcdb27b685f3a6be3ea9
[ "MIT" ]
null
null
null
registration/admin.py
allenallen/interedregistration
d6b93bfc33d7bb9bfbabdcdb27b685f3a6be3ea9
[ "MIT" ]
6
2020-02-11T23:05:13.000Z
2021-06-10T20:43:51.000Z
registration/admin.py
allenallen/interedregistration
d6b93bfc33d7bb9bfbabdcdb27b685f3a6be3ea9
[ "MIT" ]
null
null
null
import csv from django.contrib import admin from django.http import HttpResponse from .models import Student, SchoolList, Event, ShsTrack, SchoolOfficial class ExportCsvMixin: def export_as_csv(self, request, queryset): meta = self.model._meta field_names = [field.name for field in meta.fields] ...
30.712121
117
0.665022
1,715
0.846078
0
0
1,222
0.602861
0
0
630
0.310804
3c1e8f234365a8d2c0de799db1420fb70afb127b
1,251
py
Python
python/src/aoc/year2016/day5.py
ocirne/adventofcode
ea9b5f1b48a04284521e85c96b420ed54adf55f0
[ "Unlicense" ]
1
2021-02-16T21:30:04.000Z
2021-02-16T21:30:04.000Z
python/src/aoc/year2016/day5.py
ocirne/adventofcode
ea9b5f1b48a04284521e85c96b420ed54adf55f0
[ "Unlicense" ]
null
null
null
python/src/aoc/year2016/day5.py
ocirne/adventofcode
ea9b5f1b48a04284521e85c96b420ed54adf55f0
[ "Unlicense" ]
null
null
null
import hashlib from itertools import islice from aoc.util import load_input def search(door_id, is_part1=False, is_part2=False): i = 0 while True: md5_hash = hashlib.md5((door_id + str(i)).encode()).hexdigest() if md5_hash.startswith("00000"): if is_part1: yield md...
24.529412
71
0.529976
0
0
439
0.350919
0
0
0
0
137
0.109512
3c1f8c82eeba6453a646f8492c4afe649539ab25
2,324
py
Python
arraycircles.py
BastiHz/arraycircles
cf2e8ac48b099570d6b351ae84dc060263ee4e3d
[ "MIT" ]
null
null
null
arraycircles.py
BastiHz/arraycircles
cf2e8ac48b099570d6b351ae84dc060263ee4e3d
[ "MIT" ]
null
null
null
arraycircles.py
BastiHz/arraycircles
cf2e8ac48b099570d6b351ae84dc060263ee4e3d
[ "MIT" ]
null
null
null
import math import random import os os.environ["PYGAME_HIDE_SUPPORT_PROMPT"] = "1" import numpy as np import pygame as pg WINDOW_SIZE = (800, 600) FPS = 60 pg.init() window = pg.display.set_mode(WINDOW_SIZE) clock = pg.time.Clock() font = pg.font.SysFont("monospace", 20) def make_circle_array(diameter, hue): ...
27.023256
84
0.623924
0
0
0
0
0
0
0
0
395
0.169966
3c1fbd1f77839d16929ae16aa95f7765710bb079
1,268
py
Python
choosy/star.py
creiht/choosy
08c18f1480e542ee122b86a0b47a30c8e5b4017e
[ "BSD-3-Clause" ]
null
null
null
choosy/star.py
creiht/choosy
08c18f1480e542ee122b86a0b47a30c8e5b4017e
[ "BSD-3-Clause" ]
null
null
null
choosy/star.py
creiht/choosy
08c18f1480e542ee122b86a0b47a30c8e5b4017e
[ "BSD-3-Clause" ]
null
null
null
from flask import ( abort, Blueprint, current_app, flash, g, redirect, render_template, request, url_for ) import giphy_client from werkzeug.exceptions import abort from choosy.auth import login_required from choosy import db bp = Blueprint("star", __name__) @bp.route("/stars") @login_required def index(): ...
26.978723
80
0.605678
0
0
0
0
997
0.786278
0
0
187
0.147476
3c1ff1fa706a7ee54f33c5565b4c5b7b1c4bf065
7,700
py
Python
src/1-3_autocorrect.py
BernhardSchiffer/1-dynamic-programming
81d89e6d579a329058a40b0e6c85b45c97db083a
[ "MIT" ]
null
null
null
src/1-3_autocorrect.py
BernhardSchiffer/1-dynamic-programming
81d89e6d579a329058a40b0e6c85b45c97db083a
[ "MIT" ]
null
null
null
src/1-3_autocorrect.py
BernhardSchiffer/1-dynamic-programming
81d89e6d579a329058a40b0e6c85b45c97db083a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # %% # Assignment Pt. 1: Edit Distances import numpy as np from bs4 import BeautifulSoup import math vocabulary_file = open('../res/count_1w.txt', 'r') lines = vocabulary_file.readlines() vocabulary = dict() word_count = 0 # Strips the newline character for line in lines: line = line.strip...
32.352941
138
0.587662
0
0
0
0
0
0
0
0
2,377
0.308301
3c212a108eea23aed5b72646850bf521126d934b
251
py
Python
krb5ticket/errors.py
degagne/python-krb5ticket
1113e0b51e8eac36f6c85cce10e86e2c82ca4828
[ "MIT" ]
2
2021-12-09T05:41:34.000Z
2022-03-18T18:23:24.000Z
krb5ticket/errors.py
degagne/python-krb5ticket
1113e0b51e8eac36f6c85cce10e86e2c82ca4828
[ "MIT" ]
null
null
null
krb5ticket/errors.py
degagne/python-krb5ticket
1113e0b51e8eac36f6c85cce10e86e2c82ca4828
[ "MIT" ]
null
null
null
class KeytabFileNotExists(RuntimeError): """ Raised when a Kerberos keytab file doesn't exist. """ pass class KtutilCommandNotFound(RuntimeError): """ Raised when ``ktutil`` command-line interface not found. """ pass
19.307692
60
0.661355
247
0.984064
0
0
0
0
0
0
137
0.545817
3c21c614e14a12fda17173ca64af48d998a556ab
2,451
py
Python
recipes/Python/577691_Validate_ACNs_AustraliCompany/recipe-577691.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/577691_Validate_ACNs_AustraliCompany/recipe-577691.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/577691_Validate_ACNs_AustraliCompany/recipe-577691.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
def isacn(obj): """isacn(string or int) -> True|False Validate an ACN (Australian Company Number). http://www.asic.gov.au/asic/asic.nsf/byheadline/Australian+Company+Number+(ACN)+Check+Digit Accepts an int, or a string of digits including any leading zeroes. Digits may be optionally separated with...
38.904762
95
0.565075
0
0
0
0
0
0
0
0
1,533
0.625459
3c2312e967df908333d00837244d79e34fe4f564
2,845
py
Python
scripts/code_standards/code_standards.py
dolphingarlic/sketch-frontend
e646b7d51405e8a693f45472aa3cc6991a6f38af
[ "X11" ]
1
2020-12-06T03:40:53.000Z
2020-12-06T03:40:53.000Z
scripts/code_standards/code_standards.py
dolphingarlic/sketch-frontend
e646b7d51405e8a693f45472aa3cc6991a6f38af
[ "X11" ]
null
null
null
scripts/code_standards/code_standards.py
dolphingarlic/sketch-frontend
e646b7d51405e8a693f45472aa3cc6991a6f38af
[ "X11" ]
null
null
null
#!/usr/bin/env python2.6 # -*- coding: utf-8 -*- from __future__ import print_function import optparse import path_resolv from path_resolv import Path def check_file(f, show_info, override_ignores): text = f.read() if ("@code standards ignore file" in text) and (not override_ignores): return if "...
34.695122
86
0.59754
0
0
0
0
0
0
0
0
968
0.340246
3c25269f1d545577e247a812c7d95d25ce72bbfe
2,368
py
Python
grease/scanner.py
JorgeRubio96/grease-lang
94a7cf9f01339ae2aac2c1fa1fefb623c32fffc9
[ "MIT" ]
null
null
null
grease/scanner.py
JorgeRubio96/grease-lang
94a7cf9f01339ae2aac2c1fa1fefb623c32fffc9
[ "MIT" ]
null
null
null
grease/scanner.py
JorgeRubio96/grease-lang
94a7cf9f01339ae2aac2c1fa1fefb623c32fffc9
[ "MIT" ]
1
2018-10-09T22:57:34.000Z
2018-10-09T22:57:34.000Z
import ply.lex as lex from grease.core.indents import Indents reserved = { 'var': 'VAR', 'if': 'IF', 'else': 'ELSE', 'scan': 'SCAN', 'print': 'PRINT', 'and': 'AND', 'or': 'OR', 'Bool': 'BOOL', 'Int': 'INT', 'Float': 'FLOAT', 'Char': 'CHAR', 'fn': 'FN', 'interface': '...
19.89916
85
0.505912
0
0
0
0
0
0
0
0
796
0.336149
3c2804fa00492d199e8c3aefe6c666e804514568
768
py
Python
patan/utils.py
tttlh/patan
d3e5cfec085e21f963204b5c07a85cf1f029560c
[ "MIT" ]
null
null
null
patan/utils.py
tttlh/patan
d3e5cfec085e21f963204b5c07a85cf1f029560c
[ "MIT" ]
null
null
null
patan/utils.py
tttlh/patan
d3e5cfec085e21f963204b5c07a85cf1f029560c
[ "MIT" ]
1
2021-03-01T08:35:34.000Z
2021-03-01T08:35:34.000Z
# _*_ coding: utf-8 _*_ from importlib import import_module def is_iterable(var): return hasattr(var, '__iter__') def to_iterable(var): if var is None: return [] elif is_iterable(var): return var else: return [var] def load_class_by_name(qualified_name): last_dot = qua...
22.588235
75
0.653646
0
0
0
0
0
0
0
0
71
0.092448
3c2968143388eec54e35192431494447d2c82d24
3,673
py
Python
tests/test_assert_immediate.py
makaimann/fault
8c805415f398e64971d18fbd3014bc0b59fb38b8
[ "BSD-3-Clause" ]
null
null
null
tests/test_assert_immediate.py
makaimann/fault
8c805415f398e64971d18fbd3014bc0b59fb38b8
[ "BSD-3-Clause" ]
null
null
null
tests/test_assert_immediate.py
makaimann/fault
8c805415f398e64971d18fbd3014bc0b59fb38b8
[ "BSD-3-Clause" ]
null
null
null
import tempfile import pytest import fault as f import magma as m from fault.verilator_utils import verilator_version @pytest.mark.parametrize('success_msg', [None, "OK"]) @pytest.mark.parametrize('failure_msg', [None, "FAILED"]) @pytest.mark.parametrize('severity', ["error", "fatal", "warning"]) @pytest.mark.parame...
34.980952
78
0.54288
680
0.185135
0
0
2,605
0.70923
0
0
682
0.185679
3c2af43cd6a571a35fff3b7b22af4c58d6015098
3,098
py
Python
cs673backend/api/authentication.py
MicobyteMichael/CS673ProjectBackend
87b28c62f29630059e1906c8bf7383d814880bd0
[ "Apache-2.0" ]
null
null
null
cs673backend/api/authentication.py
MicobyteMichael/CS673ProjectBackend
87b28c62f29630059e1906c8bf7383d814880bd0
[ "Apache-2.0" ]
null
null
null
cs673backend/api/authentication.py
MicobyteMichael/CS673ProjectBackend
87b28c62f29630059e1906c8bf7383d814880bd0
[ "Apache-2.0" ]
null
null
null
from flask import session from flask_restful import Resource from flask_restful.reqparse import RequestParser from bcrypt import gensalt, hashpw from hashlib import sha256 from hmac import new as hash_mac from os import environ PEPPER = environ["PEPPER"].encode("utf-8") def hash(password, salt): return ...
34.422222
117
0.65042
2,467
0.79632
0
0
0
0
0
0
351
0.113299
3c2d0e8fef55c7fd0b954db4e7dcf85c4711c86c
4,606
py
Python
sunpy/sun/tests/test_sun.py
PritishC/sunpy
76a7b5994566674d85eada7dcec54bf0f120269a
[ "BSD-2-Clause" ]
null
null
null
sunpy/sun/tests/test_sun.py
PritishC/sunpy
76a7b5994566674d85eada7dcec54bf0f120269a
[ "BSD-2-Clause" ]
null
null
null
sunpy/sun/tests/test_sun.py
PritishC/sunpy
76a7b5994566674d85eada7dcec54bf0f120269a
[ "BSD-2-Clause" ]
null
null
null
from astropy.coordinates import Angle from astropy.time import Time import astropy.units as u from astropy.tests.helper import assert_quantity_allclose from sunpy.sun import sun def test_true_longitude(): # Validate against a published value from the Astronomical Almanac (1992) t = Time('1992-10-13', scale='...
41.495495
124
0.721884
0
0
0
0
0
0
0
0
1,108
0.240556
3c2db6513413d924898e189ce93d55aaff3a377a
1,031
py
Python
components/collector/src/source_collectors/file_source_collectors/pyupio_safety.py
Gamer1120/quality-time
f3a0d6f75cd6055d78995d37feae72bc3e837e4b
[ "Apache-2.0" ]
1
2021-02-22T07:53:36.000Z
2021-02-22T07:53:36.000Z
components/collector/src/source_collectors/file_source_collectors/pyupio_safety.py
Gamer1120/quality-time
f3a0d6f75cd6055d78995d37feae72bc3e837e4b
[ "Apache-2.0" ]
338
2020-10-29T04:28:09.000Z
2022-02-22T04:09:33.000Z
components/collector/src/source_collectors/file_source_collectors/pyupio_safety.py
dicksnel/quality-time
4c04f8852aa97175f2bca2b5c5391b3e09b657af
[ "Apache-2.0" ]
1
2022-01-06T04:07:03.000Z
2022-01-06T04:07:03.000Z
"""Pyup.io Safety metrics collector.""" from typing import Final from base_collectors import JSONFileSourceCollector from source_model import Entity, SourceMeasurement, SourceResponses class PyupioSafetySecurityWarnings(JSONFileSourceCollector): """Pyup.io Safety collector for security warnings.""" PACKAGE...
36.821429
108
0.682832
841
0.815713
0
0
0
0
571
0.553831
124
0.120272
3c312cb7c5567e3a8e860f6d1634192c56119a38
2,580
py
Python
jaf/main.py
milano-slesarik/jaf
97c0a579f4ece70dbfb583d72aa35380f7a82f8d
[ "MIT" ]
null
null
null
jaf/main.py
milano-slesarik/jaf
97c0a579f4ece70dbfb583d72aa35380f7a82f8d
[ "MIT" ]
null
null
null
jaf/main.py
milano-slesarik/jaf
97c0a579f4ece70dbfb583d72aa35380f7a82f8d
[ "MIT" ]
null
null
null
import json import os import typing from io import IOBase from jaf.encoders import JAFJSONEncoder class JsonArrayFileWriterNotOpenError(Exception): pass class JsonArrayFileWriter: MODE__APPEND_OR_CREATE = 'ac' MODE__REWRITE_OR_CREATE = 'rc' def __init__(self, filepath: str, mode=MODE__REWRITE_OR_C...
31.084337
170
0.601163
2,287
0.886434
0
0
0
0
0
0
301
0.116667
3c325c2ee5bdb7ac85221911bcf0265edefa9de5
91
py
Python
8_kyu/Removing_Elements.py
UlrichBerntien/Codewars-Katas
bbd025e67aa352d313564d3862db19fffa39f552
[ "MIT" ]
null
null
null
8_kyu/Removing_Elements.py
UlrichBerntien/Codewars-Katas
bbd025e67aa352d313564d3862db19fffa39f552
[ "MIT" ]
null
null
null
8_kyu/Removing_Elements.py
UlrichBerntien/Codewars-Katas
bbd025e67aa352d313564d3862db19fffa39f552
[ "MIT" ]
null
null
null
def remove_every_other(my_list): return [my_list[it] for it in range(0,len(my_list),2)]
45.5
58
0.736264
0
0
0
0
0
0
0
0
0
0
3c3406ddfc224f8162dd8e58c6d1818f19d5fb3c
812
py
Python
BluePlug/fork.py
liufeng3486/BluePlug
c7c5c769ed35c71ebc542d34848d6bf309abd051
[ "MIT" ]
1
2019-01-27T04:08:05.000Z
2019-01-27T04:08:05.000Z
BluePlug/fork.py
liufeng3486/BluePlug
c7c5c769ed35c71ebc542d34848d6bf309abd051
[ "MIT" ]
5
2021-03-18T21:35:20.000Z
2022-01-13T00:58:18.000Z
BluePlug/fork.py
liufeng3486/BluePlug
c7c5c769ed35c71ebc542d34848d6bf309abd051
[ "MIT" ]
null
null
null
from aip import AipOcr BAIDU_APP_ID='14490756' BAIDU_API_KEY = 'Z7ZhXtleolXMRYYGZ59CGvRl' BAIDU_SECRET_KEY = 'zbHgDUGmRnBfn6XOBmpS5fnr9yKer8C6' client= AipOcr(BAIDU_APP_ID, BAIDU_API_KEY, BAIDU_SECRET_KEY) options = {} options["recognize_granularity"] = "big" options["language_type"] = "CHN_ENG" options["detect_dire...
24.606061
62
0.69335
0
0
0
0
0
0
0
0
267
0.328818
3c34f86c770e6ffff7025e5fd4715854fbee0f6d
1,233
py
Python
test/test_model.py
karlsimsBBC/feed-me
e2bc87aef4740c2899b332f1b4036c169b108b79
[ "MIT" ]
null
null
null
test/test_model.py
karlsimsBBC/feed-me
e2bc87aef4740c2899b332f1b4036c169b108b79
[ "MIT" ]
2
2020-02-28T16:52:05.000Z
2020-02-28T16:52:11.000Z
test/test_model.py
karlsimsBBC/feed-me
e2bc87aef4740c2899b332f1b4036c169b108b79
[ "MIT" ]
null
null
null
import unittest from unittest.mock import Mock from unittest.mock import mock_open from contextlib import contextmanager class TestDocumentDB(unittest.TestCase): def test_reads_articles(self): db = DocumentDB() expected = [ {'article_idx': 0}, {'article_idx': 1} ] ...
27.4
56
0.596918
895
0.725872
122
0.098946
138
0.111922
0
0
212
0.171938
3c36a55c48b2843a0df149d905928f2eb9279e29
4,596
py
Python
GuessGame.py
VedantKhairnar/Guess-Game
a959d03cbfea539a63e451e5c65f7cd9790d1b7f
[ "MIT" ]
null
null
null
GuessGame.py
VedantKhairnar/Guess-Game
a959d03cbfea539a63e451e5c65f7cd9790d1b7f
[ "MIT" ]
null
null
null
GuessGame.py
VedantKhairnar/Guess-Game
a959d03cbfea539a63e451e5c65f7cd9790d1b7f
[ "MIT" ]
1
2020-06-05T12:42:39.000Z
2020-06-05T12:42:39.000Z
from tkinter import * import random from tkinter import messagebox class GuessGame: def protocolhandler(self): if messagebox.askyesno("Exit", "Really Wanna stop Guessing?"): if messagebox.askyesno("Exit", "Are you sure?"): self.root.destroy() def result(self): ...
42.555556
210
0.570061
4,501
0.97933
0
0
0
0
0
0
1,370
0.298085
3c39dc3a117517ba44438eb56f648a0feefd8459
2,051
py
Python
kanban.py
vtashlikovich/jira-task-analysis
34690406243fe0b4c5f1400c5bca872923856571
[ "MIT" ]
null
null
null
kanban.py
vtashlikovich/jira-task-analysis
34690406243fe0b4c5f1400c5bca872923856571
[ "MIT" ]
null
null
null
kanban.py
vtashlikovich/jira-task-analysis
34690406243fe0b4c5f1400c5bca872923856571
[ "MIT" ]
null
null
null
import configparser import sys from jiraparser import JiraJSONParser, TokenAuth import requests from requests.auth import AuthBase """ Getting a list of issues connected to a board id (defined by configuration) and printing analysis information """ # read config config = configparser.ConfigParser() config.read("confi...
31.075758
117
0.694783
0
0
0
0
0
0
0
0
728
0.354949
3c3a5c531bfcc3cf9b1021a5ea94cb71ba7d11b0
1,268
py
Python
duckling/test/test_api.py
handsomezebra/zoo
db9ef7f9daffd34ca859d5a4d76d947e00a768b8
[ "MIT" ]
1
2020-03-08T07:46:14.000Z
2020-03-08T07:46:14.000Z
duckling/test/test_api.py
handsomezebra/zoo
db9ef7f9daffd34ca859d5a4d76d947e00a768b8
[ "MIT" ]
null
null
null
duckling/test/test_api.py
handsomezebra/zoo
db9ef7f9daffd34ca859d5a4d76d947e00a768b8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json import requests import logging import csv url = "http://localhost:10000/parse" def get_result(text, lang, dims, latent=None, reftime=None, tz=None): data = { "text": text, "lang": lang, "dims": json.dumps(dims) } if reftime is not None: ...
23.924528
96
0.621451
0
0
0
0
0
0
0
0
321
0.253155