hexsha
string | size
int64 | ext
string | lang
string | max_stars_repo_path
string | max_stars_repo_name
string | max_stars_repo_head_hexsha
string | max_stars_repo_licenses
list | max_stars_count
int64 | max_stars_repo_stars_event_min_datetime
string | max_stars_repo_stars_event_max_datetime
string | max_issues_repo_path
string | max_issues_repo_name
string | max_issues_repo_head_hexsha
string | max_issues_repo_licenses
list | max_issues_count
int64 | max_issues_repo_issues_event_min_datetime
string | max_issues_repo_issues_event_max_datetime
string | max_forks_repo_path
string | max_forks_repo_name
string | max_forks_repo_head_hexsha
string | max_forks_repo_licenses
list | max_forks_count
int64 | max_forks_repo_forks_event_min_datetime
string | max_forks_repo_forks_event_max_datetime
string | content
string | avg_line_length
float64 | max_line_length
int64 | alphanum_fraction
float64 | qsc_code_num_words_quality_signal
int64 | qsc_code_num_chars_quality_signal
float64 | qsc_code_mean_word_length_quality_signal
float64 | qsc_code_frac_words_unique_quality_signal
float64 | qsc_code_frac_chars_top_2grams_quality_signal
float64 | qsc_code_frac_chars_top_3grams_quality_signal
float64 | qsc_code_frac_chars_top_4grams_quality_signal
float64 | qsc_code_frac_chars_dupe_5grams_quality_signal
float64 | qsc_code_frac_chars_dupe_6grams_quality_signal
float64 | qsc_code_frac_chars_dupe_7grams_quality_signal
float64 | qsc_code_frac_chars_dupe_8grams_quality_signal
float64 | qsc_code_frac_chars_dupe_9grams_quality_signal
float64 | qsc_code_frac_chars_dupe_10grams_quality_signal
float64 | qsc_code_frac_chars_replacement_symbols_quality_signal
float64 | qsc_code_frac_chars_digital_quality_signal
float64 | qsc_code_frac_chars_whitespace_quality_signal
float64 | qsc_code_size_file_byte_quality_signal
float64 | qsc_code_num_lines_quality_signal
float64 | qsc_code_num_chars_line_max_quality_signal
float64 | qsc_code_num_chars_line_mean_quality_signal
float64 | qsc_code_frac_chars_alphabet_quality_signal
float64 | qsc_code_frac_chars_comments_quality_signal
float64 | qsc_code_cate_xml_start_quality_signal
float64 | qsc_code_frac_lines_dupe_lines_quality_signal
float64 | qsc_code_cate_autogen_quality_signal
float64 | qsc_code_frac_lines_long_string_quality_signal
float64 | qsc_code_frac_chars_string_length_quality_signal
float64 | qsc_code_frac_chars_long_word_length_quality_signal
float64 | qsc_code_frac_lines_string_concat_quality_signal
float64 | qsc_code_cate_encoded_data_quality_signal
float64 | qsc_code_frac_chars_hex_words_quality_signal
float64 | qsc_code_frac_lines_prompt_comments_quality_signal
float64 | qsc_code_frac_lines_assert_quality_signal
float64 | qsc_codepython_cate_ast_quality_signal
float64 | qsc_codepython_frac_lines_func_ratio_quality_signal
float64 | qsc_codepython_cate_var_zero_quality_signal
bool | qsc_codepython_frac_lines_pass_quality_signal
float64 | qsc_codepython_frac_lines_import_quality_signal
float64 | qsc_codepython_frac_lines_simplefunc_quality_signal
float64 | qsc_codepython_score_lines_no_logic_quality_signal
float64 | qsc_codepython_frac_lines_print_quality_signal
float64 | qsc_code_num_words
int64 | qsc_code_num_chars
int64 | qsc_code_mean_word_length
int64 | qsc_code_frac_words_unique
null | qsc_code_frac_chars_top_2grams
int64 | qsc_code_frac_chars_top_3grams
int64 | qsc_code_frac_chars_top_4grams
int64 | qsc_code_frac_chars_dupe_5grams
int64 | qsc_code_frac_chars_dupe_6grams
int64 | qsc_code_frac_chars_dupe_7grams
int64 | qsc_code_frac_chars_dupe_8grams
int64 | qsc_code_frac_chars_dupe_9grams
int64 | qsc_code_frac_chars_dupe_10grams
int64 | qsc_code_frac_chars_replacement_symbols
int64 | qsc_code_frac_chars_digital
int64 | qsc_code_frac_chars_whitespace
int64 | qsc_code_size_file_byte
int64 | qsc_code_num_lines
int64 | qsc_code_num_chars_line_max
int64 | qsc_code_num_chars_line_mean
int64 | qsc_code_frac_chars_alphabet
int64 | qsc_code_frac_chars_comments
int64 | qsc_code_cate_xml_start
int64 | qsc_code_frac_lines_dupe_lines
int64 | qsc_code_cate_autogen
int64 | qsc_code_frac_lines_long_string
int64 | qsc_code_frac_chars_string_length
int64 | qsc_code_frac_chars_long_word_length
int64 | qsc_code_frac_lines_string_concat
null | qsc_code_cate_encoded_data
int64 | qsc_code_frac_chars_hex_words
int64 | qsc_code_frac_lines_prompt_comments
int64 | qsc_code_frac_lines_assert
int64 | qsc_codepython_cate_ast
int64 | qsc_codepython_frac_lines_func_ratio
int64 | qsc_codepython_cate_var_zero
int64 | qsc_codepython_frac_lines_pass
int64 | qsc_codepython_frac_lines_import
int64 | qsc_codepython_frac_lines_simplefunc
int64 | qsc_codepython_score_lines_no_logic
int64 | qsc_codepython_frac_lines_print
int64 | effective
string | hits
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
192cf41839a03ab774d74071476d3b8e97e3701e
| 268
|
py
|
Python
|
study/study8.py
|
tanyong-cq/pythonlearning
|
d807389e7637fb327a68560dbaf85c51bd2e03ae
|
[
"MIT"
] | null | null | null |
study/study8.py
|
tanyong-cq/pythonlearning
|
d807389e7637fb327a68560dbaf85c51bd2e03ae
|
[
"MIT"
] | null | null | null |
study/study8.py
|
tanyong-cq/pythonlearning
|
d807389e7637fb327a68560dbaf85c51bd2e03ae
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
dict
'''
d1 = {'a':1, 'b':2, 'c':3}
print(d1)
print(d1.keys())
print(d1.values())
print(str(d1))
print(len(d1))
print(d1['a'])
d1['a'] = 10
print(d1['a'])
del d1['a']
print(d1)
d1.clear()
print(d1)
print(d1.get('a'))
| 12.761905
| 26
| 0.548507
| 51
| 268
| 2.882353
| 0.470588
| 0.380952
| 0.183673
| 0.190476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.084746
| 0.119403
| 268
| 20
| 27
| 13.4
| 0.538136
| 0.175373
| 0
| 0.357143
| 0
| 0
| 0.037736
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.714286
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
193b80fb648a364d9d00e604c57b3649551ce68a
| 107
|
py
|
Python
|
testsuite/pointcloud-fold/run.py
|
halirutan/OpenShadingLanguage
|
8ef7bebba4ba76c8438d2bca1d29469fe3e5cb27
|
[
"BSD-3-Clause"
] | 2
|
2019-10-05T20:01:05.000Z
|
2021-07-29T19:28:18.000Z
|
testsuite/pointcloud-fold/run.py
|
halirutan/OpenShadingLanguage
|
8ef7bebba4ba76c8438d2bca1d29469fe3e5cb27
|
[
"BSD-3-Clause"
] | null | null | null |
testsuite/pointcloud-fold/run.py
|
halirutan/OpenShadingLanguage
|
8ef7bebba4ba76c8438d2bca1d29469fe3e5cb27
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/bin/env python
command += testshade("-param radius 1000.0 -param filename data/cloud.geo rdcloud")
| 26.75
| 83
| 0.738318
| 16
| 107
| 4.9375
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0.11215
| 107
| 3
| 84
| 35.666667
| 0.778947
| 0.186916
| 0
| 0
| 0
| 0
| 0.686047
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
19410f1872675306f4d455948523380c8bd67c63
| 256
|
py
|
Python
|
musicrecs/spotify/item/spotify_artist.py
|
nknaian/album_recs
|
b96981befb355261b4c02eadc8690863a1e9b285
|
[
"MIT"
] | 2
|
2021-02-11T02:44:42.000Z
|
2021-02-25T01:37:48.000Z
|
musicrecs/spotify/item/spotify_artist.py
|
nknaian/album_recs
|
b96981befb355261b4c02eadc8690863a1e9b285
|
[
"MIT"
] | 79
|
2020-10-06T12:47:42.000Z
|
2022-03-03T17:56:03.000Z
|
musicrecs/spotify/item/spotify_artist.py
|
nknaian/albumrecs
|
b96981befb355261b4c02eadc8690863a1e9b285
|
[
"MIT"
] | null | null | null |
from .spotify_item import SpotifyItem
class SpotifyArtist(SpotifyItem):
"""Class to hold selected information about a spotify artist"""
def __init__(self, spotify_artist):
# Initialize base class
super().__init__(spotify_artist)
| 25.6
| 67
| 0.726563
| 29
| 256
| 6.034483
| 0.689655
| 0.222857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.195313
| 256
| 9
| 68
| 28.444444
| 0.849515
| 0.3125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
196a07b3f7e0a50cd8ba74c6bd46c29b40d572c4
| 13,445
|
py
|
Python
|
pre_resize_images.py
|
faraway1nspace/pytorch_GAN_zoo
|
859f02368129c43af018fac87464cbfb17f19e45
|
[
"BSD-3-Clause"
] | null | null | null |
pre_resize_images.py
|
faraway1nspace/pytorch_GAN_zoo
|
859f02368129c43af018fac87464cbfb17f19e45
|
[
"BSD-3-Clause"
] | null | null | null |
pre_resize_images.py
|
faraway1nspace/pytorch_GAN_zoo
|
859f02368129c43af018fac87464cbfb17f19e45
|
[
"BSD-3-Clause"
] | null | null | null |
# one-off script to resize images to k*512, in order to reduce their size before uploading to cloud service
# ARGUMENTS
path_to_db = "../../../data/" # path to old database
path_to_new_db = "/tmp/data/" # path to new database
thres_pixels = 700 # thresshold larger than which, the images will be downscale to
import os
import shutil
import sys
# path to the home-directory, working directory, and repository code (to import)
home_path = os.path.expanduser('~') # get home path
path_to_wd = "Documents/ScriptsPrograms/ml_art/bin/gan_zoo_pytorch/pytorch_GAN_zoo/"
path_to_repo_code = "Documents/ScriptsPrograms/ml_art/bin/gan_zoo_pytorch/pytorch_GAN_zoo/"
# change home directory; add repositry code directory to sys.path
os.chdir(os.path.join(home_path, path_to_wd))
sys.path.append(os.path.join(home_path, path_to_repo_code))
import importlib
#import argparse
import json
import re
from models.utils.utils import getVal, getLastCheckPoint, loadmodule
from models.utils.config import getConfigOverrideFromParser, updateParserWithConfig
import numpy as np
import albumentations as A
import cv2
import magic
from models.utils.image_transform import pil_loader, ToTensorV2
def get_img_dim(path_to_img):
"""uses regex and the output from magic module to extract the text description of image size; return number dimensions"""
img_info_str = magic.from_file(path_to_img)
# find', 1234x1234, '
#m =re.search('\,\s\d+x\d+\,\s',img_info_str)
m = re.search('\,\s\d+\s*x\s*\d+\,\s',img_info_str)
if not bool(m):
raise ValueError("""no resolution found in %s""" % img_info_str)
# split by x
res_xy_str =re.sub('[\s\,]','',m.group()).split('x')
# make into integers
res = [int(x) for x in re.sub('[\s\,]','',m.group()).split('x')]
return res
def check_image_requires_resizing(image_dimensions, threshold):
"""check whether any dimenion is lower than the mandated threshold"""
return all(list(map(lambda l: l>threshold, image_dimensions)))
def new_dimension( image_dimension, threshold):
"""what is the new dimension of the resized image"""
min_dim = min(image_dimension)
idx_min_dim = image_dimension.index(min_dim)
# get the scale necessary to rescale
scale_ = threshold/image_dimension[idx_min_dim]
# downscaled dimension
dim_new = [int(d*scale_) for d in image_dimension]
return dim_new
def downscale(path_to_image, new_dimension, path_to_new_image = None, plot=None):
""" use albumentations to downscale an image"""
if plot is None:
plot = False
img = cv2.imread(path_to_image)
# ensure proper color
#img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
new_image = cv2.resize(img, tuple(new_dimension), interpolation=cv2.INTER_AREA)
# whether to save an image
if not (path_to_new_image is None):
cv2.imwrite(path_to_new_image,new_image)
# whether to plot an image
if plot:
plt.imshow(img); plt.show()
return new_image
# make the new path
if not os.path.isdir(path_to_new_db):
os.mkdir(path_to_new_db)
# make the subdirectories (if they don't exist)
subdirs = [d for d in os.listdir(path_to_db)]
for subdir_ in subdirs:
if not os.path.isdir(os.path.join(path_to_new_db,subdir_)):
os.mkdir(os.path.join(path_to_new_db,subdir_))
# get all the files, and their dimensions
paths_to_files = []
for subdir_ in subdirs:
for f in os.listdir(os.path.join(path_to_db,subdir_)): #
# paths, old and new
old_path_ = os.path.join(path_to_db,subdir_,f)
new_path_ = os.path.join(path_to_new_db,subdir_,f)
# get dimensions
dimensions_ = get_img_dim(old_path_)
paths_to_files.append((old_path_, new_path_, dimensions_))
# loop through files: copy the ones that are
for path_old, path_new, old_dimension in paths_to_files:
# check whether an image needs rescaling
if check_image_requires_resizing(image_dimensions=old_dimension, threshold=thres_pixels):
dim_new = new_dimension( old_dimension, thres_pixels) # new dimension
# new image
new_image = downscale(path_old, dim_new, path_to_new_image = path_new, plot=False)
else:
shutil.copyfile(path_old, path_new)
################
# manually flip some of the abstract paintings vertically/horizontally
images_to_flip_horizontally = ["../../../data/impression_pureabstract/0a10e4a15632b0939ce80ab517839a85.jpg","../../../data/impression_pureabstract/2ab9b409793acca1ea7ba805c5cd9f28.jpg","../../../data/impression_pureabstract/2A71A49D-7F06-4D35-AF5D-5DA576743FF4.JPG","../../../data/impression_pureabstract/2cde25c633bef8c165bd5a4c2cbbfd61.jpg","../../../data/impression_pureabstract/5d6c310f1a2c8b801bef020b84f42a42.jpg","../../../data/impression_pureabstract/6a78d139c5c8ea726e2a5ab71d4730b5.jpg","../../../data/impression_pureabstract/8dac4ef6862a364d2bcfbdfa4a336433.jpg","../../../data/impression_pureabstract/8x10czkqmse31.jpg","../../../data/impression_pureabstract/395d6f26148443.5635059799b28.jpg","../../../data/impression_pureabstract/589a826e03b972eba916577be422c7ee.jpg","../../../data/impression_pureabstract/10186%20-%20Aloft%2030%2008%2018.JPG","../../../data/impression_pureabstract/10204%20-%2020%2011%2018.JPG","../../../data/impression_pureabstract/10205%20-%20Storm%20Signed%2021%2011%2018.JPG","../../../data/impression_pureabstract/10207%20-%20Downpour%20-%2022%2011%2018%20signed.JPG","../../../data/impression_pureabstract/10210%20-%20Converge%2027%2011%2018.jpg","../../../data/impression_pureabstract/105148_1.jpg","../../../data/impression_pureabstract/60045646_616876865495823_1421327681814790144_o.jpg","../../../data/impression_pureabstract/109898162_3134160280013618_5519726051067852188_o.jpg","../../../data/impression_pureabstract/110179113_3134160306680282_3556583195638535398_o.jpg","../../../data/impression_pureabstract/ae4cc7ca51af703094311b9055e83db1.jpg","../../../data/impression_pureabstract/a-place-to-be-i-main.jpg","../../../data/impression_pureabstract/art2.png","../../../data/impression_pureabstract/art3.png","../../../data/impression_pureabstract/art6.png","../../../data/impression_pureabstract/art7.png","../../../data/impression_pureabstract/art12.png","../../../data/impression_pureabstract/art15.png","../../../data/impression_pureabstract/art21.png","../../../data/impression_pureabstract/art24.png","../../../data/impression_pureabstract/art29.png","../../../data/impression_pureabstract/art37.png","../../../data/impression_pureabstract/art45.png","../../../data/impression_pureabstract/art48.png","../../../data/impression_pureabstract/blue-dusk.jpg","../../../data/impression_pureabstract/c2c78a3c83fb610431215fae96e52e6f.jpg","../../../data/impression_pureabstract/e6e276e56ee83a3c96f12038fbf33cc7.jpg","../../../data/impression_pureabstract/H0649-L13590363.jpg","../../../data/impression_pureabstract/iheartheclockitsticking-798x800.jpg","../../../data/impression_pureabstract/salary-scale-ulla-maria-johanson-2016-64b4b10b.jpg","../../../data/impression_pureabstract/Tao Triptych.jpg","../../../data/impression_pureabstract/tumblr_o05b7yy7cn1r9594zo1_540.jpg","../../../data/impression_pureabstract/veitart_baoha_sm_red.JPG","../../../data/impression_pureabstract/vietart_baoha_crap2.JPG","../../../data/impression_pureabstract/vietart_baoha_sm_blue.JPG"]
images_to_flip_vertically = ["../../../data/impression_pureabstract/0a10e4a15632b0939ce80ab517839a85.jpg","../../../data/impression_pureabstract/2A71A49D-7F06-4D35-AF5D-5DA576743FF4.JPG","../../../data/impression_pureabstract/2ab9b409793acca1ea7ba805c5cd9f28.jpg","../../../data/impression_pureabstract/2cde25c633bef8c165bd5a4c2cbbfd61.jpg","../../../data/impression_pureabstract/5d6c310f1a2c8b801bef020b84f42a42.jpg","../../../data/impression_pureabstract/240.jpg","../../../data/impression_pureabstract/386_7__DxO.jpg",'../../../data/impression_pureabstract/2237bfc6dce338f486b176a123698968.jpg',"../../../data/impression_pureabstract/10210%20-%20Converge%2027%2011%2018.jpg","../../../data/impression_pureabstract/398109w550.jpg","../../../data/impression_pureabstract/60045646_616876865495823_1421327681814790144_o.jpg","../../../data/impression_pureabstract/Abstract-Oil-painting-Melody-for-Guitar-and-Sax-Silvia-Vassileva-Painting-Modern-Canvas-art-Room-decor.jpg","../../../data/impression_pureabstract/110318719_3134160330013613_2888548261907595138_o.jpg","../../../data/impression_pureabstract/acumen_by_narcisse_shrapnel_d2sibni-fullview.jpg","../../../data/impression_pureabstract/animax0.jpg","../../../data/impression_pureabstract/a-place-to-be-i-main.jpg","../../../data/impression_pureabstract/art.png","../../../data/impression_pureabstract/art3.png","../../../data/impression_pureabstract/art5.png","../../../data/impression_pureabstract/art7.png","../../../data/impression_pureabstract/art8.png","../../../data/impression_pureabstract/art11.png","../../../data/impression_pureabstract/art25.png","../../../data/impression_pureabstract/art26.png","../../../data/impression_pureabstract/art37.png","../../../data/impression_pureabstract/art38.png","../../../data/impression_pureabstract/art40.png","../../../data/impression_pureabstract/art43.png","../../../data/impression_pureabstract/art46.png","../../../data/impression_pureabstract/art49.png","../../../data/impression_pureabstract/art51.png","../../../data/impression_pureabstract/art53.png","../../../data/impression_pureabstract/art54.png","../../../data/impression_pureabstract/aYXHay5.jpg","../../../data/impression_pureabstract/d190cca1c8d080e6fcb389a416d3e297.jpg","../../../data/impression_pureabstract/Echoes of Summer 80cm x 80cm Oil on Canvas main.jpg","../../../data/impression_pureabstract/ef78191a3e731c038ead5b55b11e1cba.jpg","../../../data/impression_pureabstract/iheartheclockitsticking-798x800.jpg","../../../data/impression_pureabstract/Midnight Sun16 x 16 Oil on Constructed Aluminium Panel.jpg","../../../data/impression_pureabstract/morning-fjord-silvia-vassileva.jpg","../../../data/impression_pureabstract/Reflections-in-Red-3.jpg","../../../data/impression_pureabstract/street-sketch.jpg","../../../data/impression_pureabstract/veitart_baoha_sm_red.JPG","../../../data/impression_pureabstract/vietart_baoha_crap2.JPG","../../../data/impression_pureabstract/vietart_baoha_sm_blue.JPG","../../../data/impression_pureabstract/White-Reflections-3.jpg","../../../data/impression_pureabstract/williamWray-Conflagrant24x18.jpg"]
def downscale_and_rotate(path_to_image, threshold, flip=None, rotate=None, path_to_new_image = None, plot=None):
""" use albumentations to downscale an image"""
if plot is None:
plot = False
if flip is None:
flip = False
if rotate is None:
rotate = False
# get the old dim
dim_old = get_img_dim(path_to_image)
# get the image
img = cv2.imread(path_to_image)
# do flip?
if flip:
instruction = cv2.ROTATE_180
img_rt = cv2.rotate(img, instruction)
suffix_ = '_flp'
if rotate:
# random rotation 270 or 90
if (hash(path_to_image) % 2) ==0:
instruction = cv2.ROTATE_90_COUNTERCLOCKWISE
else:
instruction = cv2.ROTATE_90_CLOCKWISE
img_rt = cv2.rotate(img, instruction)
# rotate the dimension
dim_old = dim_old[::-1]
# make suffix
suffix_ = '_rt'
# check if the image needs to be resized, as well
if check_image_requires_resizing(image_dimensions=dim_old, threshold=threshold):
dim_new = new_dimension( dim_old, threshold)
img_rt = cv2.resize(img_rt, tuple(dim_new), interpolation=cv2.INTER_AREA)
# whether to save an image
if not (path_to_new_image is None):
path_split1,ext_ = os.path.splitext(path_to_new_image)
# add suffix
path_to_new_image_rt = path_split1 + suffix_ + ext_
cv2.imwrite(path_to_new_image_rt, img_rt)
# whether to plot an image
if plot:
plt.imshow(img_rt); plt.show()
return img_rt
# flip and rotate images
for f in images_to_flip_vertically:
f_new = [path[1] for path in paths_to_files if path[0] == f][0]
_ = downscale_and_rotate(path_to_image=f, threshold = thres_pixels, flip=True, rotate=False, path_to_new_image = f_new, plot=False)
for f in images_to_flip_horizontally:
f_new = [path[1] for path in paths_to_files if path[0] == f][0]
_ = downscale_and_rotate(path_to_image=f, threshold = thres_pixels, flip=False, rotate=True, path_to_new_image = f_new, plot=False)
# play with opening and saving images in ONE color channel format
# i = 0
# i+=1
# path_old, path_new, old_dimension = paths_to_files[i] #
# path_new_1 = re.sub("/tmp/data/impression_pureabstract/", "/tmp/foo/cv_", path_new)
# path_new_2 = re.sub("../../../data/impression_pureabstract/", "/tmp/foo/orig_", path_old)
# path_new_3 = re.sub("../../../data/impression_pureabstract/", "/tmp/foo/cov_", path_old)
# # copy over the original
# shutil.copyfile(path_old, path_new_2)
# # read in for saving
# img = cv2.imread(path_old)
# cv2.imwrite(path_new_1,img)
# # convert color and save
# img2 = copy.copy(img)
# #img2 = cv2.cvtColor(img2, cv2.COLOR_BGR2RGB)
# img2 = cv2.resize(img2, tuple([int(i*0.8) for i in rev(img2.shape[0:2])]), interpolation=cv2.INTER_AREA)
# cv2.imwrite(path_new_3,img2)
# list of (abstract) paintings that can be flipped either horizontally or vertically
| 67.225
| 3,117
| 0.727259
| 1,743
| 13,445
| 5.367757
| 0.230637
| 0.140658
| 0.261223
| 0.185977
| 0.428709
| 0.381894
| 0.334224
| 0.303014
| 0.276186
| 0.226272
| 0
| 0.0799
| 0.106359
| 13,445
| 199
| 3,118
| 67.562814
| 0.698793
| 0.174637
| 0
| 0.171429
| 0
| 0.019048
| 0.548772
| 0.532484
| 0
| 0
| 0
| 0
| 0
| 1
| 0.047619
| false
| 0
| 0.12381
| 0
| 0.219048
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1976e8b62ccf4ba1542256aa2ba2a38bb18c2f45
| 3,672
|
py
|
Python
|
OpenGLCffi/GL/EXT/NV/half_float.py
|
cydenix/OpenGLCffi
|
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
|
[
"MIT"
] | null | null | null |
OpenGLCffi/GL/EXT/NV/half_float.py
|
cydenix/OpenGLCffi
|
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
|
[
"MIT"
] | null | null | null |
OpenGLCffi/GL/EXT/NV/half_float.py
|
cydenix/OpenGLCffi
|
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
|
[
"MIT"
] | null | null | null |
from OpenGLCffi.GL import params
@params(api='gl', prms=['x', 'y'])
def glVertex2hNV(x, y):
pass
@params(api='gl', prms=['v'])
def glVertex2hvNV(v):
pass
@params(api='gl', prms=['x', 'y', 'z'])
def glVertex3hNV(x, y, z):
pass
@params(api='gl', prms=['v'])
def glVertex3hvNV(v):
pass
@params(api='gl', prms=['x', 'y', 'z', 'w'])
def glVertex4hNV(x, y, z, w):
pass
@params(api='gl', prms=['v'])
def glVertex4hvNV(v):
pass
@params(api='gl', prms=['nx', 'ny', 'nz'])
def glNormal3hNV(nx, ny, nz):
pass
@params(api='gl', prms=['v'])
def glNormal3hvNV(v):
pass
@params(api='gl', prms=['red', 'green', 'blue'])
def glColor3hNV(red, green, blue):
pass
@params(api='gl', prms=['v'])
def glColor3hvNV(v):
pass
@params(api='gl', prms=['red', 'green', 'blue', 'alpha'])
def glColor4hNV(red, green, blue, alpha):
pass
@params(api='gl', prms=['v'])
def glColor4hvNV(v):
pass
@params(api='gl', prms=['s'])
def glTexCoord1hNV(s):
pass
@params(api='gl', prms=['v'])
def glTexCoord1hvNV(v):
pass
@params(api='gl', prms=['s', 't'])
def glTexCoord2hNV(s, t):
pass
@params(api='gl', prms=['v'])
def glTexCoord2hvNV(v):
pass
@params(api='gl', prms=['s', 't', 'r'])
def glTexCoord3hNV(s, t, r):
pass
@params(api='gl', prms=['v'])
def glTexCoord3hvNV(v):
pass
@params(api='gl', prms=['s', 't', 'r', 'q'])
def glTexCoord4hNV(s, t, r, q):
pass
@params(api='gl', prms=['v'])
def glTexCoord4hvNV(v):
pass
@params(api='gl', prms=['target', 's'])
def glMultiTexCoord1hNV(target, s):
pass
@params(api='gl', prms=['target', 'v'])
def glMultiTexCoord1hvNV(target, v):
pass
@params(api='gl', prms=['target', 's', 't'])
def glMultiTexCoord2hNV(target, s, t):
pass
@params(api='gl', prms=['target', 'v'])
def glMultiTexCoord2hvNV(target, v):
pass
@params(api='gl', prms=['target', 's', 't', 'r'])
def glMultiTexCoord3hNV(target, s, t, r):
pass
@params(api='gl', prms=['target', 'v'])
def glMultiTexCoord3hvNV(target, v):
pass
@params(api='gl', prms=['target', 's', 't', 'r', 'q'])
def glMultiTexCoord4hNV(target, s, t, r, q):
pass
@params(api='gl', prms=['target', 'v'])
def glMultiTexCoord4hvNV(target, v):
pass
@params(api='gl', prms=['fog'])
def glFogCoordhNV(fog):
pass
@params(api='gl', prms=['fog'])
def glFogCoordhvNV(fog):
pass
@params(api='gl', prms=['red', 'green', 'blue'])
def glSecondaryColor3hNV(red, green, blue):
pass
@params(api='gl', prms=['v'])
def glSecondaryColor3hvNV(v):
pass
@params(api='gl', prms=['weight'])
def glVertexWeighthNV(weight):
pass
@params(api='gl', prms=['weight'])
def glVertexWeighthvNV(weight):
pass
@params(api='gl', prms=['index', 'x'])
def glVertexAttrib1hNV(index, x):
pass
@params(api='gl', prms=['index', 'v'])
def glVertexAttrib1hvNV(index, v):
pass
@params(api='gl', prms=['index', 'x', 'y'])
def glVertexAttrib2hNV(index, x, y):
pass
@params(api='gl', prms=['index', 'v'])
def glVertexAttrib2hvNV(index, v):
pass
@params(api='gl', prms=['index', 'x', 'y', 'z'])
def glVertexAttrib3hNV(index, x, y, z):
pass
@params(api='gl', prms=['index', 'v'])
def glVertexAttrib3hvNV(index, v):
pass
@params(api='gl', prms=['index', 'x', 'y', 'z', 'w'])
def glVertexAttrib4hNV(index, x, y, z, w):
pass
@params(api='gl', prms=['index', 'v'])
def glVertexAttrib4hvNV(index, v):
pass
@params(api='gl', prms=['index', 'n', 'v'])
def glVertexAttribs1hvNV(index, n, v):
pass
@params(api='gl', prms=['index', 'n', 'v'])
def glVertexAttribs2hvNV(index, n, v):
pass
@params(api='gl', prms=['index', 'n', 'v'])
def glVertexAttribs3hvNV(index, n, v):
pass
@params(api='gl', prms=['index', 'n', 'v'])
def glVertexAttribs4hvNV(index, n, v):
pass
| 15.827586
| 57
| 0.617375
| 533
| 3,672
| 4.253283
| 0.142589
| 0.18262
| 0.223202
| 0.304367
| 0.605205
| 0.593295
| 0.567711
| 0.436259
| 0.306573
| 0.180856
| 0
| 0.013183
| 0.132353
| 3,672
| 231
| 58
| 15.896104
| 0.698368
| 0
| 0
| 0.539568
| 0
| 0
| 0.090191
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.330935
| false
| 0.330935
| 0.007194
| 0
| 0.33813
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
270c3c78281ff5ae218f58ba40ea816f1e587add
| 1,336
|
py
|
Python
|
setup.py
|
axel-sirota/IEEE-CICD
|
3a3e65af4d9c8267b1e4967fe4f372ac1ac8ba87
|
[
"MIT"
] | null | null | null |
setup.py
|
axel-sirota/IEEE-CICD
|
3a3e65af4d9c8267b1e4967fe4f372ac1ac8ba87
|
[
"MIT"
] | null | null | null |
setup.py
|
axel-sirota/IEEE-CICD
|
3a3e65af4d9c8267b1e4967fe4f372ac1ac8ba87
|
[
"MIT"
] | null | null | null |
from setuptools import setup
setup(name='funniest_ieee',
version='0.5',
description='The funniest_ieee joke in the world',
url='https://github.com/axel-sirota/IEEE-CICD',
author='Axel Sirota',
author_email='axel.sirota@example.com',
license='MIT',
KEYWORDS = ["class", "attribute", "boilerplate"],
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
],
packages=['funniest_ieee'],
install_requires=[
'nose',
'pylint',
'coverage',
'nosexcover',
'flake8',
'twine'
],
test_suite='nose.collector',
tests_require=['nose']
)
| 33.4
| 67
| 0.60479
| 128
| 1,336
| 6.257813
| 0.585938
| 0.213483
| 0.280899
| 0.129838
| 0.067416
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013861
| 0.244012
| 1,336
| 39
| 68
| 34.25641
| 0.779208
| 0
| 0
| 0.052632
| 0
| 0
| 0.613024
| 0.017216
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.026316
| 0
| 0.026316
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
274c80e22b7683ed60335363c64a46284685e894
| 171
|
py
|
Python
|
metaphor/tableau/__main__.py
|
MetaphorData/connectors
|
e195f58ee0660b278bd72d16173937fae279eef2
|
[
"Apache-2.0"
] | 5
|
2021-08-24T17:46:48.000Z
|
2022-01-21T03:42:31.000Z
|
metaphor/tableau/__main__.py
|
MetaphorData/connectors
|
e195f58ee0660b278bd72d16173937fae279eef2
|
[
"Apache-2.0"
] | 142
|
2021-09-02T22:16:54.000Z
|
2022-03-31T15:23:34.000Z
|
metaphor/tableau/__main__.py
|
MetaphorData/connectors
|
e195f58ee0660b278bd72d16173937fae279eef2
|
[
"Apache-2.0"
] | null | null | null |
from metaphor.common.cli import cli_main
from .extractor import TableauExtractor
if __name__ == "__main__":
cli_main("Tableau metadata extractor", TableauExtractor)
| 24.428571
| 60
| 0.795322
| 20
| 171
| 6.3
| 0.6
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128655
| 171
| 6
| 61
| 28.5
| 0.845638
| 0
| 0
| 0
| 0
| 0
| 0.19883
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
274fdad24c7d417895e7d1eee95bb27759f835ed
| 113
|
py
|
Python
|
generate/generate/tests/__init__.py
|
flamencist/browser-extensions
|
cc2424ce69c718f9f6b1fb0e6cd19759ba384591
|
[
"BSD-3-Clause"
] | 102
|
2015-01-09T22:12:00.000Z
|
2021-04-21T01:18:51.000Z
|
generate/generate/tests/__init__.py
|
flamencist/browser-extensions
|
cc2424ce69c718f9f6b1fb0e6cd19759ba384591
|
[
"BSD-3-Clause"
] | 103
|
2019-01-29T07:54:37.000Z
|
2021-12-02T07:40:50.000Z
|
generate/generate/tests/__init__.py
|
trigger-corp/libreforge
|
3da17f1d26fabe3b9df6518b4e96473fd078def1
|
[
"MIT"
] | 33
|
2015-01-15T16:11:15.000Z
|
2021-06-11T12:15:29.000Z
|
def dummy_config():
return {
'uuid': 'TEST-UUID',
'main': {
'server': 'https://test.forge.io/api/'
}
}
| 16.142857
| 41
| 0.548673
| 14
| 113
| 4.357143
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.19469
| 113
| 7
| 42
| 16.142857
| 0.67033
| 0
| 0
| 0
| 0
| 0
| 0.429825
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| true
| 0
| 0
| 0.142857
| 0.285714
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
2763f3c0663f9a7e64bfd1350c2449a1bc11b44b
| 262
|
py
|
Python
|
ProdTracker/product/admin.py
|
rishthas/ProdTracker
|
c62927b95cabb6b81752239eaee0f2f722fb1523
|
[
"MIT"
] | null | null | null |
ProdTracker/product/admin.py
|
rishthas/ProdTracker
|
c62927b95cabb6b81752239eaee0f2f722fb1523
|
[
"MIT"
] | null | null | null |
ProdTracker/product/admin.py
|
rishthas/ProdTracker
|
c62927b95cabb6b81752239eaee0f2f722fb1523
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Branch,Product,Transfer,Vendor,Model
# Register your models here.
admin.site.register(Branch)
admin.site.register(Product)
admin.site.register(Transfer)
admin.site.register(Vendor)
admin.site.register(Model)
| 26.2
| 56
| 0.820611
| 37
| 262
| 5.810811
| 0.405405
| 0.209302
| 0.395349
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072519
| 262
| 9
| 57
| 29.111111
| 0.884774
| 0.099237
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.285714
| 0
| 0.285714
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
2796a4fe998f5a599bb95d5dab577417ba48bc43
| 346
|
py
|
Python
|
twiliokey.py
|
ridwanrahman/wavemaps
|
670007d8842d0f66e1eb2717402fa1a5a5175719
|
[
"Unlicense"
] | 3
|
2022-03-18T12:54:37.000Z
|
2022-03-19T16:42:38.000Z
|
twiliokey.py
|
ridwanrahman/wavemaps
|
670007d8842d0f66e1eb2717402fa1a5a5175719
|
[
"Unlicense"
] | 1
|
2022-03-19T12:22:31.000Z
|
2022-03-19T12:22:31.000Z
|
twiliokey.py
|
ridwanrahman/wavemaps
|
670007d8842d0f66e1eb2717402fa1a5a5175719
|
[
"Unlicense"
] | 1
|
2022-03-19T12:04:19.000Z
|
2022-03-19T12:04:19.000Z
|
''' Twilio keys for send_text.py:
account_sid_key
auth_token
'''
class TwilioKey:
def __init__(self): # https://www.twilio.com/try-twilio
self.account_sid_key = "your_sid"
self.auth_token_key = "your_auth"
def get_sid(self):
return self.account_sid_key
def get_auth(self):
return self.auth_token_key
| 23.066667
| 59
| 0.682081
| 52
| 346
| 4.153846
| 0.442308
| 0.138889
| 0.180556
| 0.157407
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.213873
| 346
| 14
| 60
| 24.714286
| 0.794118
| 0.263006
| 0
| 0
| 0
| 0
| 0.068826
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0
| 0.25
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
27b6144b43a79399e41e870c89e127afd873b337
| 871
|
py
|
Python
|
setup.py
|
maiziex/Aquila_stLFR
|
cd48f86ed4d4532817ccd315fcb2776d94528e4f
|
[
"MIT"
] | 7
|
2019-12-17T22:26:47.000Z
|
2021-02-18T00:42:02.000Z
|
setup.py
|
maiziex/Aquila_stLFR
|
cd48f86ed4d4532817ccd315fcb2776d94528e4f
|
[
"MIT"
] | 2
|
2020-11-09T07:18:25.000Z
|
2022-03-08T15:43:09.000Z
|
setup.py
|
maiziex/Aquila_stLFR
|
cd48f86ed4d4532817ccd315fcb2776d94528e4f
|
[
"MIT"
] | 2
|
2019-08-22T17:20:12.000Z
|
2021-08-16T22:32:38.000Z
|
from setuptools import setup, find_packages, Extension
setup(name='aquila_stlfr',
version='1.1',
description='assembly and variant calling for stlfr and hybrid assembler for linked-reads',
author='XinZhou',
author_email='xzhou15@cs.stanford.edu',
packages=['bin',],
entry_points={'console_scripts':['Aquila_stLFR_step1=bin.Aquila_stLFR_step1:main','Aquila_step1_hybrid=bin.Aquila_step1_hybrid:main','Aquila_stLFR_step2=bin.Aquila_stLFR_step2:main','Aquila_stLFR_assembly_based_variants_call=bin.Aquila_stLFR_assembly_based_variants_call:main','Aquila_stLFR_phasing_all_variants=bin.Aquila_stLFR_phasing_all_variants:main','Aquila_stLFR_clean=bin.Aquila_stLFR_clean:main','Aquila_step0_sortbam_hybrid=bin.Aquila_step0_sortbam_hybrid:main','Aquila_stLFR_fastq_preprocess=bin.Aquila_stLFR_fastq_preprocess:main']},
zip_safe=False)
| 79.181818
| 551
| 0.816303
| 122
| 871
| 5.401639
| 0.409836
| 0.216995
| 0.127466
| 0.063733
| 0.197269
| 0.109256
| 0
| 0
| 0
| 0
| 0
| 0.014925
| 0.076923
| 871
| 10
| 552
| 87.1
| 0.804726
| 0
| 0
| 0
| 0
| 0
| 0.717566
| 0.584386
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.111111
| 0
| 0.111111
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
27d28e2c2eecf250e8921b09969014d222846358
| 172
|
py
|
Python
|
leetcode/even_digits.py
|
Imipenem/Competitive_Prog_with_Python
|
64f64c733b591acd8f75a36efbb66cca3b58f05f
|
[
"MIT"
] | null | null | null |
leetcode/even_digits.py
|
Imipenem/Competitive_Prog_with_Python
|
64f64c733b591acd8f75a36efbb66cca3b58f05f
|
[
"MIT"
] | null | null | null |
leetcode/even_digits.py
|
Imipenem/Competitive_Prog_with_Python
|
64f64c733b591acd8f75a36efbb66cca3b58f05f
|
[
"MIT"
] | null | null | null |
def findNumbers(nums: [int]) -> int:
return len(list(([e for e in nums if len(str(e))%2 == 0])))
if __name__ == '__main__':
print(findNumbers([12,345,2,6,7896]))
| 24.571429
| 63
| 0.604651
| 29
| 172
| 3.310345
| 0.724138
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091549
| 0.174419
| 172
| 6
| 64
| 28.666667
| 0.584507
| 0
| 0
| 0
| 0
| 0
| 0.046784
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 0.5
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
27e9323660df35d02fe540875ac41f83bceb419f
| 96
|
py
|
Python
|
cvpy25.py
|
L3ndry/guanabara-python
|
af8ce1a0380d6b5ae82304b0f48421cbaf945071
|
[
"MIT"
] | null | null | null |
cvpy25.py
|
L3ndry/guanabara-python
|
af8ce1a0380d6b5ae82304b0f48421cbaf945071
|
[
"MIT"
] | null | null | null |
cvpy25.py
|
L3ndry/guanabara-python
|
af8ce1a0380d6b5ae82304b0f48421cbaf945071
|
[
"MIT"
] | null | null | null |
nome_completo = input("Digite o seu nome completo: ").lower()
print("silva" in nome_completo)
| 32
| 62
| 0.729167
| 14
| 96
| 4.857143
| 0.714286
| 0.529412
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135417
| 96
| 2
| 63
| 48
| 0.819277
| 0
| 0
| 0
| 0
| 0
| 0.351064
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
fd71f6f5942e4365f46d1c60bc1c0c38214ba8aa
| 293
|
py
|
Python
|
Codewars/IpValidation.py
|
SelvorWhim/competitive
|
b9daaf21920d6f7669dc0c525e903949f4e33b62
|
[
"Unlicense"
] | null | null | null |
Codewars/IpValidation.py
|
SelvorWhim/competitive
|
b9daaf21920d6f7669dc0c525e903949f4e33b62
|
[
"Unlicense"
] | null | null | null |
Codewars/IpValidation.py
|
SelvorWhim/competitive
|
b9daaf21920d6f7669dc0c525e903949f4e33b62
|
[
"Unlicense"
] | null | null | null |
def is_valid_octet(n_str):
return n_str.isdigit() and (n_str[0] != '0' or n_str == '0') and int(n_str) <= 255 # isdigit also returns false for empty strings and negatives
def is_valid_IP(str):
nums = str.split('.')
return (len(nums) == 4) and all(is_valid_octet(n) for n in nums)
| 41.857143
| 147
| 0.668942
| 55
| 293
| 3.363636
| 0.490909
| 0.108108
| 0.108108
| 0.140541
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.029289
| 0.1843
| 293
| 6
| 148
| 48.833333
| 0.74477
| 0.197952
| 0
| 0
| 0
| 0
| 0.012876
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0.2
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
fd74a2376092541032ce000f8a47dbbf0691fc2c
| 1,232
|
py
|
Python
|
tlh/data/rom.py
|
notyourav/the-little-hat
|
f52b38b18b762e704b36cef06c07656348ea6995
|
[
"MIT"
] | null | null | null |
tlh/data/rom.py
|
notyourav/the-little-hat
|
f52b38b18b762e704b36cef06c07656348ea6995
|
[
"MIT"
] | null | null | null |
tlh/data/rom.py
|
notyourav/the-little-hat
|
f52b38b18b762e704b36cef06c07656348ea6995
|
[
"MIT"
] | 2
|
2021-10-05T20:40:12.000Z
|
2022-01-05T00:17:36.000Z
|
from typing import Optional
from tlh.const import RomVariant
from tlh import settings
class Rom:
def __init__(self, filename: str):
with open(filename, 'rb') as rom:
self.bytes = bytearray(rom.read())
def get_bytes(self, from_index: int, to_index: int) -> bytearray:
# TODO apply constraints here? Or one level above in the HexEditorInstance?
return self.bytes[from_index:to_index]
def get_byte(self, index: int) -> int:
return self.bytes[index]
def length(self) -> int:
return len(self.bytes)
def get_pointer(self, index: int) -> int:
return int.from_bytes(self.bytes[index:index+4], 'little')
# Rom data is read only, so we only need to read it once
roms: dict[RomVariant, Rom] = {}
# TODO invalidate roms when settings change?
# necessary? Once we have a valid rom, there will be no changes
def get_rom(variant: RomVariant) -> Optional[Rom]:
global roms
if variant not in roms:
try:
roms[variant] = Rom(settings.get_rom(variant))
except:
return None
return roms[variant]
def invalidate_rom(variant: RomVariant) -> None:
global roms
if variant in roms:
del roms[variant]
| 28
| 83
| 0.659903
| 174
| 1,232
| 4.586207
| 0.425287
| 0.056391
| 0.037594
| 0.037594
| 0.052632
| 0
| 0
| 0
| 0
| 0
| 0
| 0.001076
| 0.245942
| 1,232
| 44
| 84
| 28
| 0.857912
| 0.189123
| 0
| 0.071429
| 0
| 0
| 0.00804
| 0
| 0
| 0
| 0
| 0.022727
| 0
| 1
| 0.25
| false
| 0
| 0.107143
| 0.142857
| 0.607143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
fd92ee47dd9c45e5dda7048fd4160fa44fa1ec08
| 5,063
|
py
|
Python
|
test2/stalking/stalking.py
|
gr0mph/OceanOfCode
|
336caa00e22ae06e12d32971f84c82e3c0c9a3a4
|
[
"MIT"
] | null | null | null |
test2/stalking/stalking.py
|
gr0mph/OceanOfCode
|
336caa00e22ae06e12d32971f84c82e3c0c9a3a4
|
[
"MIT"
] | null | null | null |
test2/stalking/stalking.py
|
gr0mph/OceanOfCode
|
336caa00e22ae06e12d32971f84c82e3c0c9a3a4
|
[
"MIT"
] | null | null | null |
import sys
sys.path.append('../../')
# Global variables
from test2.test_main import TREASURE_MAP
# From OceanOfCode
# Class
from OceanOfCode import StalkAndLegal
from OceanOfCode import StalkAndTorpedo
from OceanOfCode import Submarine
from OceanOfCode import Board
# Global
from OceanOfCode import EMPTY_SYMBOLS
from OceanOfCode import DIRS
# Method
from OceanOfCode import manhattan
from OceanOfCode import update_order
import unittest
class _stalking(unittest.TestCase):
def _set_up(self):
me = StalkAndTorpedo(None)
me.set_up((1,2,3,4,5,6,7,8,9),TREASURE_MAP)
print(len(me.inp))
def _read_move(self):
me = StalkAndTorpedo(None)
me.set_up((1,2,3,4,5,6,7,8,9),TREASURE_MAP)
print(len(me.inp))
read_move = StalkAndTorpedo.read_move
me.update(read_move,['N'])
me = StalkAndTorpedo(me)
print(len(me.inp))
me.update(read_move,['E'])
me = StalkAndTorpedo(me)
print(len(me.inp))
me.update(read_move,['S'])
me = StalkAndTorpedo(me)
print(len(me.inp))
me.update(read_move,['S'])
me = StalkAndTorpedo(me)
print(len(me.inp))
me.update(read_move,['W'])
me = StalkAndTorpedo(me)
print(len(me.inp))
def _read_surface(self):
me = StalkAndTorpedo(None)
me.set_up((1,2,3,4,5,6,7,8,9),TREASURE_MAP)
read_surface = StalkAndTorpedo.read_surface
for i in range(0,5):
me.update(read_surface,TREASURE_MAP)
me = StalkAndTorpedo(me)
board, stalk = next(iter(me.inp))
print(len(me.inp))
print(board.life)
me.update(read_surface,TREASURE_MAP)
me = StalkAndTorpedo(me)
print()
print(len(me.inp))
def _read_torpedo(self):
me = StalkAndTorpedo(None)
me.set_up((1,2,3,4,5,6,7,8,9),TREASURE_MAP)
print(len(me.inp))
read_torpedo = StalkAndTorpedo.read_torpedo
me.update(read_torpedo,(8,4))
me = StalkAndTorpedo(me)
print(len(me.inp))
me.update(read_torpedo,(6,6))
me = StalkAndTorpedo(me)
print(len(me.inp))
def test_read_silence(self):
me = StalkAndTorpedo(None)
me.set_up((1,2,3,4,5,6,7,8,9),TREASURE_MAP)
print(len(me.inp))
read_torpedo = StalkAndTorpedo.read_torpedo
read_silence = StalkAndTorpedo.read_silence2
read_move = StalkAndTorpedo.read_move
me.update(read_torpedo,(8,4))
me = StalkAndTorpedo(me)
print(len(me.inp))
me.update(read_torpedo,(5,6))
me = StalkAndTorpedo(me)
print(len(me.inp))
me.update(read_move,['S'])
me = StalkAndTorpedo(me)
print(len(me.inp))
me.update(read_silence,None)
me = StalkAndTorpedo(me)
print(len(me.inp))
def _small_read_and_update(self):
me = StalkAndTorpedo(None)
me.set_up((1,2,3,4,5,6,7,8,9),TREASURE_MAP)
print(len(me.inp))
for c1, f1, d1 in update_order('MOVE N'):
print("c1 {} f1 {} d1 {}".format(c1,f1,d1))
me.update(f1,d1)
me = StalkAndTorpedo(me)
print(len(me.inp))
for c1, f1, d1 in update_order('TORPEDO 0 0|MOVE E'):
print("c1 {} f1 {} d1 {}".format(c1,f1,d1))
me.update(f1,d1)
me = StalkAndTorpedo(me)
print(len(me.inp))
for c1, f1, d1 in update_order('SURFACE 1'):
print("c1 {} f1 {} d1 {}".format(c1,f1,d1))
me.update(f1,d1)
me = StalkAndTorpedo(me)
print(len(me.inp))
def _medium_read_and_update(self):
me = StalkAndTorpedo(None)
me.set_up(TREASURE_MAP)
print(len(me.inp))
for c1, f1, d1 in update_order('MOVE N|SURFACE 5|TORPEDO 11 1|SILENCE'):
print("c1 {} f1 {} d1 {}".format(c1,f1,d1))
if f1 is not None:
me.update(f1,d1)
me = StalkAndTorpedo(me)
print(len(me.inp))
def _na_read(self):
me = StalkAndTorpedo(None)
me.set_up((1,2,3,4,5,6,7,8,9),TREASURE_MAP)
print(len(me.inp))
for c1, f1, d1 in update_order('NA'):
print("c1 {} f1 {} d1 {}".format(c1,f1,d1))
def _silence(self):
for t_r in TREASURE_MAP:
print(t_r)
me = StalkAndTorpedo(None)
me.set_up((1,2,3,4,5,6,7,8,9),TREASURE_MAP)
print(len(me.inp))
for c1, f1, d1 in update_order('MOVE N|SILENCE'):
print("c1 {} f1 {} d1 {}".format(c1,f1,d1))
if f1 is not None:
me.update(f1,d1)
me = StalkAndTorpedo(me)
print(len(me.inp))
for c1, f1, d1 in update_order('MOVE N|MOVE N'):
print("c1 {} f1 {} d1 {}".format(c1,f1,d1))
if f1 is not None:
me.update(f1,d1)
me = StalkAndTorpedo(me)
print(len(me.inp))
if __name__ == '__main__':
unittest.main()
| 26.507853
| 80
| 0.566463
| 708
| 5,063
| 3.925141
| 0.112994
| 0.171285
| 0.097157
| 0.126304
| 0.742353
| 0.742353
| 0.731198
| 0.731198
| 0.65923
| 0.623965
| 0
| 0.047405
| 0.295872
| 5,063
| 190
| 81
| 26.647368
| 0.732118
| 0.010468
| 0
| 0.661765
| 0
| 0
| 0.047562
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.066176
| false
| 0
| 0.080882
| 0
| 0.154412
| 0.272059
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fde5b4e65b9f0ca6fdefd665411e5414c2b5c82b
| 2,023
|
py
|
Python
|
tests/parse_fragment_unit_tests.py
|
Wynjones1/pycompile
|
9f27829eafe56989188174d2d1a56bef44aa8f10
|
[
"MIT"
] | null | null | null |
tests/parse_fragment_unit_tests.py
|
Wynjones1/pycompile
|
9f27829eafe56989188174d2d1a56bef44aa8f10
|
[
"MIT"
] | null | null | null |
tests/parse_fragment_unit_tests.py
|
Wynjones1/pycompile
|
9f27829eafe56989188174d2d1a56bef44aa8f10
|
[
"MIT"
] | null | null | null |
import unittest
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from src import parser
from src import ast
class ParserTestCase(unittest.TestCase):
def assertParsesTo(self, func, data, type_):
self.assertIsInstance(parser.parse(data, func), type_)
class Test_parse_fragment_unit_tests(ParserTestCase):
def test_while_0(self):
self.assertParsesTo(parser.while_, "while(x < 10){x := x + 1;}", ast.While)
def test_if_0(self):
self.assertParsesTo(parser.if_, "if(a){return a;}", ast.If)
def test_decl_0(self):
self.assertParsesTo(parser.decl, "decl(int) x := 10", ast.Declare)
def test_braced_stmt_list_0(self):
self.assertParsesTo(parser.braced_stmt_list, "{}", list)
def test_function_0(self):
self.assertParsesTo(parser.function, "function a(){}", ast.Function)
def test_function_1(self):
self.assertParsesTo(parser.function, "function a() -> int {}", ast.Function)
def test_function_2(self):
self.assertParsesTo(parser.function, "function a(int x) -> int {}", ast.Function)
def test_function_3(self):
self.assertParsesTo(parser.function, "function a(int x, int y) -> int {}", ast.Function)
def test_func_call_0(self):
self.assertParsesTo(parser.func_call, "call()", ast.FuncCall)
def test_func_call_1(self):
self.assertParsesTo(parser.func_call, "call(other())", ast.FuncCall)
def test_func_call_2(self):
self.assertParsesTo(parser.func_call, "call(1,2,3)", ast.FuncCall)
def test_expression_0(self):
self.assertParsesTo(parser.expression, "1 + 2", ast.Binop)
def test_expression_1(self):
self.assertParsesTo(parser.expression, "1 + 2 - 3 * 4 / 5 % 6", ast.Binop)
def test_if_0(self):
self.assertParsesTo(parser.if_, "if(x){}else{}", ast.If)
def test_if_1(self):
self.assertParsesTo(parser.if_, "if(x){}elif(x){}else{}", ast.If)
if __name__ == '__main__':
unittest.main()
| 33.163934
| 96
| 0.672763
| 282
| 2,023
| 4.609929
| 0.20922
| 0.080769
| 0.253846
| 0.323077
| 0.586154
| 0.476154
| 0.396154
| 0.181538
| 0.144615
| 0.144615
| 0
| 0.018652
| 0.178448
| 2,023
| 60
| 97
| 33.716667
| 0.762936
| 0
| 0
| 0.047619
| 0
| 0
| 0.128091
| 0.01088
| 0
| 0
| 0
| 0
| 0.404762
| 0
| null | null | 0
| 0.119048
| null | null | 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e3032c8f7f809b2bff6f877d1b28559926a73947
| 51
|
py
|
Python
|
tests/__init__.py
|
Nazze/ha_best_bottrop_garbage_collection
|
aa89f2bdf781d9702f208824d08195257a7a8198
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
Nazze/ha_best_bottrop_garbage_collection
|
aa89f2bdf781d9702f208824d08195257a7a8198
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
Nazze/ha_best_bottrop_garbage_collection
|
aa89f2bdf781d9702f208824d08195257a7a8198
|
[
"MIT"
] | null | null | null |
"""Tests for the BEST bottrop custom component."""
| 25.5
| 50
| 0.72549
| 7
| 51
| 5.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 51
| 1
| 51
| 51
| 0.840909
| 0.862745
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e30b70840165401cbc4a55823715fa3054d06364
| 424
|
py
|
Python
|
tests/unit/test_bucket.py
|
Kapuca/ccxt_microservice
|
2d4d1d51d2a576443ea06de9d2647500117529d4
|
[
"MIT"
] | null | null | null |
tests/unit/test_bucket.py
|
Kapuca/ccxt_microservice
|
2d4d1d51d2a576443ea06de9d2647500117529d4
|
[
"MIT"
] | 2
|
2019-12-10T13:42:31.000Z
|
2019-12-10T14:33:50.000Z
|
tests/unit/test_bucket.py
|
Kapuca/ccxt_microservice
|
2d4d1d51d2a576443ea06de9d2647500117529d4
|
[
"MIT"
] | null | null | null |
from ccxt_microservice.bucket import Bucket
import pytest
@pytest.fixture
def the_bucket():
return Bucket(10, 1, 5)
def test_state(the_bucket):
assert 4.99 < the_bucket.state() < 5
def test_push(the_bucket):
the_bucket.push(5)
assert 9.99 < the_bucket.state() < 10
def test_timeToWait(the_bucket):
assert 4.99 < the_bucket.timeToWait(10) < 5
def test_add():
pass
def test_wait():
pass
| 15.142857
| 47
| 0.695755
| 67
| 424
| 4.19403
| 0.358209
| 0.256228
| 0.085409
| 0.113879
| 0.192171
| 0.192171
| 0.192171
| 0
| 0
| 0
| 0
| 0.058651
| 0.195755
| 424
| 27
| 48
| 15.703704
| 0.765396
| 0
| 0
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 1
| 0.375
| false
| 0.125
| 0.125
| 0.0625
| 0.5625
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
e315ef3ab7c458106616a8d093f8bc911cc0c47e
| 57
|
py
|
Python
|
trace/_unsafe.py
|
dyedgreen/labs-ray-tracing
|
fbd96193aa506e63f3e5ee80ae0e26ec41edd814
|
[
"MIT"
] | null | null | null |
trace/_unsafe.py
|
dyedgreen/labs-ray-tracing
|
fbd96193aa506e63f3e5ee80ae0e26ec41edd814
|
[
"MIT"
] | null | null | null |
trace/_unsafe.py
|
dyedgreen/labs-ray-tracing
|
fbd96193aa506e63f3e5ee80ae0e26ec41edd814
|
[
"MIT"
] | null | null | null |
"""
Provides Volatile type
"""
class Volatile:
pass
| 8.142857
| 22
| 0.649123
| 6
| 57
| 6.166667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.22807
| 57
| 6
| 23
| 9.5
| 0.840909
| 0.385965
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
e33bb4e5d5849c261d74081e87e9f4b13e9129b6
| 189
|
py
|
Python
|
mokocchi/tomoko/repaint/__init__.py
|
mvasilkov/scrapheap
|
53e30b88879ab8e4d80867b0ec7fa631ce46e55e
|
[
"MIT"
] | 2
|
2021-11-29T13:51:27.000Z
|
2021-12-12T14:59:42.000Z
|
mokocchi/tomoko/repaint/__init__.py
|
mvasilkov/scrapheap
|
53e30b88879ab8e4d80867b0ec7fa631ce46e55e
|
[
"MIT"
] | null | null | null |
mokocchi/tomoko/repaint/__init__.py
|
mvasilkov/scrapheap
|
53e30b88879ab8e4d80867b0ec7fa631ce46e55e
|
[
"MIT"
] | null | null | null |
def int_to_pixel(n):
return (int(n & 0xff0000) >> 16,
int(n & 0x00ff00) >> 8,
int(n & 0x0000ff))
def pixel_to_int(p):
return p[0] << 16 | p[1] << 8 | p[2]
| 21
| 40
| 0.486772
| 31
| 189
| 2.83871
| 0.483871
| 0.136364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.188976
| 0.328042
| 189
| 8
| 41
| 23.625
| 0.503937
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126984
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
e36b886df332b3b353be224e4d24852a126fb8a8
| 589
|
py
|
Python
|
catalog/category.py
|
cyrildzumts/django-catalog
|
5857c6e4ceddedfe0c5f714e4cc6b858e953feb7
|
[
"BSD-3-Clause"
] | null | null | null |
catalog/category.py
|
cyrildzumts/django-catalog
|
5857c6e4ceddedfe0c5f714e4cc6b858e953feb7
|
[
"BSD-3-Clause"
] | null | null | null |
catalog/category.py
|
cyrildzumts/django-catalog
|
5857c6e4ceddedfe0c5f714e4cc6b858e953feb7
|
[
"BSD-3-Clause"
] | null | null | null |
# from django.db import models
from catalog.models import Category, Product
class CategoryEntry:
def __init__(self, category):
self.current = category
self.children = self.current.get_categories
def is_parent(self):
return self.children is not None
def products(self):
return Product.objects.filter()
class CategoryTree(object):
pass
def has_children(category):
return Category.objects.filter(parent=category) is None
def get_children_categories(category, cat_list=[]):
if has_children(category):
cat_list.append()
| 21.035714
| 59
| 0.709677
| 73
| 589
| 5.561644
| 0.452055
| 0.059113
| 0.093596
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.205433
| 589
| 27
| 60
| 21.814815
| 0.867521
| 0.047538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3125
| false
| 0.0625
| 0.0625
| 0.1875
| 0.6875
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
e3789fc974992e40c2853d9398ce4a4247b72206
| 45
|
py
|
Python
|
lectures/slides_tex/example_imports.py
|
materialsvirtuallab/nano281
|
d527c5049aab3da99237cbff0cc749640b2c9c06
|
[
"BSD-3-Clause"
] | 38
|
2019-12-23T13:14:53.000Z
|
2022-01-25T23:59:33.000Z
|
lectures/slides_tex/example_imports.py
|
materialsvirtuallab/nano281
|
d527c5049aab3da99237cbff0cc749640b2c9c06
|
[
"BSD-3-Clause"
] | null | null | null |
lectures/slides_tex/example_imports.py
|
materialsvirtuallab/nano281
|
d527c5049aab3da99237cbff0cc749640b2c9c06
|
[
"BSD-3-Clause"
] | 18
|
2020-02-10T20:43:39.000Z
|
2022-01-21T13:45:36.000Z
|
import math
z = math.sin(3.14159) # Gives ~0
| 22.5
| 33
| 0.666667
| 9
| 45
| 3.333333
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.189189
| 0.177778
| 45
| 2
| 33
| 22.5
| 0.621622
| 0.177778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
8b8359d058cdfbc620eae6f12c333bba33f62620
| 136
|
py
|
Python
|
neurobeer/tractography/__init__.py
|
kaitj/Tractography
|
efa0fa3c3bc52953b229f779f2cdf183d8438b03
|
[
"BSD-3-Clause"
] | 2
|
2018-12-15T11:53:02.000Z
|
2019-05-01T01:39:33.000Z
|
neurobeer/tractography/__init__.py
|
kaitj/Tractography
|
efa0fa3c3bc52953b229f779f2cdf183d8438b03
|
[
"BSD-3-Clause"
] | 2
|
2019-08-19T14:06:59.000Z
|
2020-02-13T16:25:56.000Z
|
neurobeer/tractography/__init__.py
|
kaitj/Tractography
|
efa0fa3c3bc52953b229f779f2cdf183d8438b03
|
[
"BSD-3-Clause"
] | 1
|
2017-08-15T14:12:22.000Z
|
2017-08-15T14:12:22.000Z
|
"""
The package provides a number of modules to be used in the clustering,
extraction, and evaluation of white matter tractography.
"""
| 27.2
| 70
| 0.772059
| 20
| 136
| 5.25
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161765
| 136
| 4
| 71
| 34
| 0.921053
| 0.933824
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8be1b8e59f51c55aa47ac7910afecc0bf930033e
| 111
|
py
|
Python
|
alfacoins/__init__.py
|
iRhonin/alfacoins
|
68908fdb5ce52ebbb3b4d38572049053f6ba1306
|
[
"MIT"
] | null | null | null |
alfacoins/__init__.py
|
iRhonin/alfacoins
|
68908fdb5ce52ebbb3b4d38572049053f6ba1306
|
[
"MIT"
] | null | null | null |
alfacoins/__init__.py
|
iRhonin/alfacoins
|
68908fdb5ce52ebbb3b4d38572049053f6ba1306
|
[
"MIT"
] | null | null | null |
from .gateway import ALFACoins
from .exceptions import APIException, ServerException
__version__ = '0.1.0a2'
| 18.5
| 53
| 0.801802
| 13
| 111
| 6.538462
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041237
| 0.126126
| 111
| 5
| 54
| 22.2
| 0.835052
| 0
| 0
| 0
| 0
| 0
| 0.063063
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4749ba4afb186ce01599b5115aee826dbfcbfe3a
| 293
|
py
|
Python
|
meiduo_mall/utils/viewsMixin.py
|
joinik/meiduo_mall
|
08da8e789941ee0bb4d9cd658c4faaa4f9f0f67a
|
[
"MIT"
] | null | null | null |
meiduo_mall/utils/viewsMixin.py
|
joinik/meiduo_mall
|
08da8e789941ee0bb4d9cd658c4faaa4f9f0f67a
|
[
"MIT"
] | null | null | null |
meiduo_mall/utils/viewsMixin.py
|
joinik/meiduo_mall
|
08da8e789941ee0bb4d9cd658c4faaa4f9f0f67a
|
[
"MIT"
] | null | null | null |
from django.contrib.auth.mixins import LoginRequiredMixin
from django import http
class LoginRequiredJSONMixin(LoginRequiredMixin):
"""Verify that the current user is authenticated."""
def handle_no_permission(self):
return http.JsonResponse({'code': 400, 'errmsg': '用户未登录'})
| 36.625
| 66
| 0.757679
| 33
| 293
| 6.666667
| 0.848485
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011905
| 0.139932
| 293
| 8
| 66
| 36.625
| 0.861111
| 0.156997
| 0
| 0
| 0
| 0
| 0.061983
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0.2
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
4751f71afe121f8ffeca1ff3a92976e205daaa43
| 247
|
py
|
Python
|
acceleration_sensor.py
|
therealjtgill/slam
|
189bc2d990bbea14fb29675f8369f97c8c9a0c1a
|
[
"MIT"
] | null | null | null |
acceleration_sensor.py
|
therealjtgill/slam
|
189bc2d990bbea14fb29675f8369f97c8c9a0c1a
|
[
"MIT"
] | null | null | null |
acceleration_sensor.py
|
therealjtgill/slam
|
189bc2d990bbea14fb29675f8369f97c8c9a0c1a
|
[
"MIT"
] | null | null | null |
import numpy as np
class AccelerationSensor:
def __init__(self, measurement_covariance):
self.R_meas = measurement_covariance
def getMeasurements(self, true_accel):
return np.random.multivariate_normal(true_accel, self.R_meas)
| 27.444444
| 67
| 0.777328
| 31
| 247
| 5.83871
| 0.645161
| 0.232044
| 0.099448
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 247
| 8
| 68
| 30.875
| 0.866029
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0.166667
| 0.833333
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
47521c4e1c5332b2ea107e056716a4bd979ce3ad
| 173
|
py
|
Python
|
eds/openmtc-gevent/server/openmtc-server/src/openmtc_server/plugins/transport_android_intent/IntentError.py
|
piyush82/elastest-device-emulator-service
|
b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7
|
[
"Apache-2.0"
] | null | null | null |
eds/openmtc-gevent/server/openmtc-server/src/openmtc_server/plugins/transport_android_intent/IntentError.py
|
piyush82/elastest-device-emulator-service
|
b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7
|
[
"Apache-2.0"
] | null | null | null |
eds/openmtc-gevent/server/openmtc-server/src/openmtc_server/plugins/transport_android_intent/IntentError.py
|
piyush82/elastest-device-emulator-service
|
b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7
|
[
"Apache-2.0"
] | null | null | null |
#from client import IntentClient
class IntentError(Exception):
pass
# def sendIntent(self, context, action, issuer):
# client = IntentClient(action, issuer)
| 21.625
| 51
| 0.710983
| 18
| 173
| 6.833333
| 0.777778
| 0.195122
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.196532
| 173
| 7
| 52
| 24.714286
| 0.884892
| 0.710983
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
47599462fa6e65cf80dd2959b1d7dbbed8e3105c
| 236
|
py
|
Python
|
src/petronia/core/platform/api/locale/__init__.py
|
groboclown/petronia
|
486338023d19cee989e92f0c5692680f1a37811f
|
[
"MIT"
] | 19
|
2017-06-21T10:28:24.000Z
|
2021-12-31T11:49:28.000Z
|
src/petronia/core/platform/api/locale/__init__.py
|
groboclown/petronia
|
486338023d19cee989e92f0c5692680f1a37811f
|
[
"MIT"
] | 10
|
2016-11-11T18:57:57.000Z
|
2021-02-01T15:33:43.000Z
|
src/petronia/core/platform/api/locale/__init__.py
|
groboclown/petronia
|
486338023d19cee989e92f0c5692680f1a37811f
|
[
"MIT"
] | 3
|
2017-09-17T03:29:35.000Z
|
2019-06-03T10:43:08.000Z
|
"""
Information regarding the current user locale.
TODO should this be its own extension? It seems like it should, but that
would mean asking for a translation would need to go through the event bus,
and that doesn't seem right.
"""
| 26.222222
| 75
| 0.762712
| 40
| 236
| 4.5
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.186441
| 236
| 8
| 76
| 29.5
| 0.9375
| 0.957627
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0.125
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
47ad4d4ebbf5374d7aaf45769cc276f0210c26b1
| 1,378
|
py
|
Python
|
travello/migrations/0004_auto_20200607_1817.py
|
KaushikAlwala/COVID-19---a-DBMS-approach
|
66af73c92bd33d134d4353e0e1e34ab165e1529b
|
[
"CC-BY-3.0"
] | null | null | null |
travello/migrations/0004_auto_20200607_1817.py
|
KaushikAlwala/COVID-19---a-DBMS-approach
|
66af73c92bd33d134d4353e0e1e34ab165e1529b
|
[
"CC-BY-3.0"
] | null | null | null |
travello/migrations/0004_auto_20200607_1817.py
|
KaushikAlwala/COVID-19---a-DBMS-approach
|
66af73c92bd33d134d4353e0e1e34ab165e1529b
|
[
"CC-BY-3.0"
] | null | null | null |
# Generated by Django 3.0.6 on 2020-06-07 12:47
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('travello', '0003_travel_history2'),
]
operations = [
migrations.RenameField(
model_name='medical_history',
old_name='Bronchitis',
new_name='bronchitis',
),
migrations.RenameField(
model_name='medical_history',
old_name='COPD',
new_name='copd',
),
migrations.RenameField(
model_name='medical_history',
old_name='Diabetes_mellitus',
new_name='diabetes_mellitus',
),
migrations.RenameField(
model_name='medical_history',
old_name='HIV_AIDS',
new_name='hiv_aids',
),
migrations.RenameField(
model_name='medical_history',
old_name='Ischemic_heart_disease',
new_name='ischemic_heart_disease',
),
migrations.RenameField(
model_name='medical_history',
old_name='Kidney_Disease',
new_name='kidney_disease',
),
migrations.RenameField(
model_name='medical_history',
old_name='Stroke',
new_name='stroke',
),
]
| 28.122449
| 48
| 0.537736
| 121
| 1,378
| 5.793388
| 0.347107
| 0.2097
| 0.259629
| 0.299572
| 0.529244
| 0.529244
| 0.529244
| 0.529244
| 0.165478
| 0
| 0
| 0.022779
| 0.362845
| 1,378
| 48
| 49
| 28.708333
| 0.775626
| 0.032656
| 0
| 0.5
| 1
| 0
| 0.22993
| 0.034295
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.02381
| 0
| 0.095238
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
47c39414019af6eedd26ff847d18e7395e7c7727
| 148
|
py
|
Python
|
dtask/task/apps.py
|
ysjiang4869/python_task
|
06b0074a6ef0afc156f7527722829fac9e19c8ad
|
[
"Apache-2.0"
] | null | null | null |
dtask/task/apps.py
|
ysjiang4869/python_task
|
06b0074a6ef0afc156f7527722829fac9e19c8ad
|
[
"Apache-2.0"
] | 16
|
2017-07-12T09:44:34.000Z
|
2017-07-31T14:51:45.000Z
|
dtask/task/apps.py
|
ysjiang4869/python_task
|
06b0074a6ef0afc156f7527722829fac9e19c8ad
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class TaskConfig(AppConfig):
name = 'task'
| 16.444444
| 39
| 0.722973
| 18
| 148
| 5.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00813
| 0.168919
| 148
| 8
| 40
| 18.5
| 0.821138
| 0.141892
| 0
| 0
| 0
| 0
| 0.032
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
47fd646b33592374380a4b515e9a738a6c8fd9f7
| 24
|
py
|
Python
|
app/__init__.py
|
jamescurtin/ham-dash
|
a97451dc9f3b47a6981e9a96fe0c59a72f99491c
|
[
"MIT"
] | null | null | null |
app/__init__.py
|
jamescurtin/ham-dash
|
a97451dc9f3b47a6981e9a96fe0c59a72f99491c
|
[
"MIT"
] | 120
|
2020-11-25T03:59:22.000Z
|
2022-03-26T01:55:16.000Z
|
app/__init__.py
|
jamescurtin/ham-dash
|
a97451dc9f3b47a6981e9a96fe0c59a72f99491c
|
[
"MIT"
] | null | null | null |
"""Main application."""
| 12
| 23
| 0.625
| 2
| 24
| 7.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 24
| 1
| 24
| 24
| 0.681818
| 0.708333
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9a1b3fd13cec967bbc376a0a722dcae53693f88b
| 48
|
py
|
Python
|
src/inmediag/__init__.py
|
TechFitU/MDSOM
|
01f58277ec99051cc857de65ce6b240a177da19c
|
[
"MIT"
] | null | null | null |
src/inmediag/__init__.py
|
TechFitU/MDSOM
|
01f58277ec99051cc857de65ce6b240a177da19c
|
[
"MIT"
] | null | null | null |
src/inmediag/__init__.py
|
TechFitU/MDSOM
|
01f58277ec99051cc857de65ce6b240a177da19c
|
[
"MIT"
] | null | null | null |
default_app_config = 'inmediag.apps.MDSOMConfig'
| 48
| 48
| 0.854167
| 6
| 48
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 48
| 1
| 48
| 48
| 0.847826
| 0
| 0
| 0
| 0
| 0
| 0.510204
| 0.510204
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9a1d82e3fbf9335388031c42fbddaf0018c8fe1f
| 350
|
py
|
Python
|
tmp/test.py
|
AeneasHe/eth-brownie-enhance
|
e53995924ffb93239b9fab6c1c1a07e9166dd1c6
|
[
"MIT"
] | 1
|
2021-10-04T23:34:14.000Z
|
2021-10-04T23:34:14.000Z
|
tmp/test.py
|
AeneasHe/eth-brownie-enhance
|
e53995924ffb93239b9fab6c1c1a07e9166dd1c6
|
[
"MIT"
] | null | null | null |
tmp/test.py
|
AeneasHe/eth-brownie-enhance
|
e53995924ffb93239b9fab6c1c1a07e9166dd1c6
|
[
"MIT"
] | null | null | null |
import os
import shutil
raw_path = "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/eth_brownie-1.15.0-py3.9.egg/brownie/project/brownie_project"
install_path = "/Users/aeneas/.brownie/packages/brownie/brownie_project@0.1"
shutil.rmtree(install_path)
# os.makedirs(install_path)
shutil.copytree(raw_path, install_path)
| 38.888889
| 151
| 0.817143
| 55
| 350
| 5.036364
| 0.545455
| 0.158845
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035928
| 0.045714
| 350
| 9
| 152
| 38.888889
| 0.793413
| 0.071429
| 0
| 0
| 0
| 0.166667
| 0.608025
| 0.608025
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
9a22ab19b204a0e4e5dea3a407b978e9f10cb9aa
| 465
|
py
|
Python
|
run/packet_manager.py
|
insidus341/Packet-Capture-Analyzer
|
9ee7bd81c8956a654b2a19a0515d755e72b46eb7
|
[
"MIT"
] | null | null | null |
run/packet_manager.py
|
insidus341/Packet-Capture-Analyzer
|
9ee7bd81c8956a654b2a19a0515d755e72b46eb7
|
[
"MIT"
] | null | null | null |
run/packet_manager.py
|
insidus341/Packet-Capture-Analyzer
|
9ee7bd81c8956a654b2a19a0515d755e72b46eb7
|
[
"MIT"
] | null | null | null |
class PacketManager:
def __init__(self):
self.packets = []
def add_packet(self, packet):
Packet(packet)
self.packets.append(packet)
def read_packet(self, number):
try:
packet = self.packets[number]
print(packet.number)
except:
return False
class Packet:
def __init__(self, packet):
self._packet = packet
def get_packet(self):
return self._packet
| 18.6
| 41
| 0.578495
| 50
| 465
| 5.12
| 0.34
| 0.234375
| 0.085938
| 0.171875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.331183
| 465
| 24
| 42
| 19.375
| 0.823151
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.294118
| false
| 0
| 0
| 0.058824
| 0.529412
| 0.058824
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
9a23965f521496442af3d0b28d00c9c0e430ab84
| 74
|
py
|
Python
|
demo/site/index.html.py
|
leafcoder/litefs
|
6ad8dcf46b4b16b5e33367bfbb55412f851a1e79
|
[
"MIT"
] | 2
|
2021-03-10T08:06:57.000Z
|
2022-02-16T03:48:20.000Z
|
demo/site/index.html.py
|
leafcoder/litefs
|
6ad8dcf46b4b16b5e33367bfbb55412f851a1e79
|
[
"MIT"
] | null | null | null |
demo/site/index.html.py
|
leafcoder/litefs
|
6ad8dcf46b4b16b5e33367bfbb55412f851a1e79
|
[
"MIT"
] | null | null | null |
def handler(self):
self.start_response(200)
return ['Hello World']
| 24.666667
| 28
| 0.689189
| 10
| 74
| 5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04918
| 0.175676
| 74
| 3
| 29
| 24.666667
| 0.770492
| 0
| 0
| 0
| 0
| 0
| 0.146667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
9a2444f5fc62097f595159df1779dc4e926f0ff9
| 131
|
py
|
Python
|
Numbers/natural.py
|
rohanrajkamal/pythonexamples
|
a003523e83e1048a7653f3b58a76c4a23ce66942
|
[
"MIT"
] | null | null | null |
Numbers/natural.py
|
rohanrajkamal/pythonexamples
|
a003523e83e1048a7653f3b58a76c4a23ce66942
|
[
"MIT"
] | null | null | null |
Numbers/natural.py
|
rohanrajkamal/pythonexamples
|
a003523e83e1048a7653f3b58a76c4a23ce66942
|
[
"MIT"
] | null | null | null |
input1=int(input("enter a number:"))
print("prints the range of natural numbers")
for i in range(1, input1+1):
print("%d" % (i))``
| 32.75
| 44
| 0.664122
| 23
| 131
| 3.782609
| 0.782609
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035088
| 0.129771
| 131
| 4
| 45
| 32.75
| 0.72807
| 0
| 0
| 0
| 0
| 0
| 0.393939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
7bdfe7df7e36feb97b05489e345dd666ff7e75a8
| 18
|
py
|
Python
|
athumb/__init__.py
|
tahy/django-athumb
|
b0b5737e1afa9c6dfe1b27132e38b24e093f36cf
|
[
"BSD-3-Clause"
] | 10
|
2015-03-18T20:37:25.000Z
|
2019-04-23T06:59:48.000Z
|
athumb/__init__.py
|
tahy/django-athumb
|
b0b5737e1afa9c6dfe1b27132e38b24e093f36cf
|
[
"BSD-3-Clause"
] | 8
|
2015-02-09T01:33:09.000Z
|
2016-08-01T07:01:49.000Z
|
athumb/__init__.py
|
tahy/django-athumb
|
b0b5737e1afa9c6dfe1b27132e38b24e093f36cf
|
[
"BSD-3-Clause"
] | 15
|
2015-02-09T01:15:42.000Z
|
2021-01-17T16:24:46.000Z
|
VERSION = '2.4.1'
| 9
| 17
| 0.555556
| 4
| 18
| 2.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0.166667
| 18
| 1
| 18
| 18
| 0.466667
| 0
| 0
| 0
| 0
| 0
| 0.277778
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7be1c20fbd022bcc6c7dc5061b1e83aa02290208
| 101
|
py
|
Python
|
Exercicios - Mundo1/Ex014.py
|
BrianMath/ExerciciosPythonCeV
|
4960f1a58d281b32afd5dfd6ea65e0ae5ad48b4f
|
[
"MIT"
] | null | null | null |
Exercicios - Mundo1/Ex014.py
|
BrianMath/ExerciciosPythonCeV
|
4960f1a58d281b32afd5dfd6ea65e0ae5ad48b4f
|
[
"MIT"
] | null | null | null |
Exercicios - Mundo1/Ex014.py
|
BrianMath/ExerciciosPythonCeV
|
4960f1a58d281b32afd5dfd6ea65e0ae5ad48b4f
|
[
"MIT"
] | null | null | null |
# Ex. 014
c = float(input("Digite uma temperatura em °C: "))
print(f"{c}°C = {((9*c)/5)+32:.1f}°F")
| 20.2
| 50
| 0.544554
| 23
| 101
| 2.521739
| 0.695652
| 0.068966
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093023
| 0.148515
| 101
| 4
| 51
| 25.25
| 0.546512
| 0.069307
| 0
| 0
| 0
| 0
| 0.630435
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
d01439a79a9ab48c7a3489c650506acb242fdf9b
| 458
|
py
|
Python
|
tests/inputs/if-branching/outputs/15-builtin-functions-join-store.py
|
helq/pytropos
|
497ed5902e6e4912249ca0a46b477f9bfa6ae80a
|
[
"MIT"
] | 4
|
2019-10-06T18:01:24.000Z
|
2020-07-03T05:27:35.000Z
|
tests/inputs/if-branching/outputs/15-builtin-functions-join-store.py
|
helq/pytropos
|
497ed5902e6e4912249ca0a46b477f9bfa6ae80a
|
[
"MIT"
] | 5
|
2021-06-07T15:50:04.000Z
|
2021-06-07T15:50:06.000Z
|
tests/inputs/if-branching/outputs/15-builtin-functions-join-store.py
|
helq/pytropos
|
497ed5902e6e4912249ca0a46b477f9bfa6ae80a
|
[
"MIT"
] | null | null | null |
import pytropos.internals.values as pv
from pytropos.internals.values.builtin_values import *
from pytropos.internals.values.python_values.builtin_mutvalues import *
from pytropos.internals.values.python_values.wrappers import *
from pytropos.internals.values.python_values.python_values import PythonValue, PT
exitcode = 1
r = List([pv.int(21)], size=(1, 1))
store = {
'_': PythonValue(PT.Top),
'f': r.get_attrs()['append'],
'r': PythonValue(r),
}
| 28.625
| 81
| 0.759825
| 63
| 458
| 5.396825
| 0.412698
| 0.25
| 0.338235
| 0.317647
| 0.397059
| 0.397059
| 0.397059
| 0
| 0
| 0
| 0
| 0.012195
| 0.104803
| 458
| 15
| 82
| 30.533333
| 0.817073
| 0
| 0
| 0
| 0
| 0
| 0.019651
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.416667
| 0
| 0.416667
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d0194e4976d504424cce8b9418d35c90956e8907
| 3,765
|
py
|
Python
|
test/test_normalizer.py
|
simonpf/qrnn
|
1de11ce8cede6b4b3de0734bcc8c198c10226188
|
[
"MIT"
] | null | null | null |
test/test_normalizer.py
|
simonpf/qrnn
|
1de11ce8cede6b4b3de0734bcc8c198c10226188
|
[
"MIT"
] | 3
|
2020-12-09T09:29:29.000Z
|
2022-02-04T16:49:49.000Z
|
test/test_normalizer.py
|
adriaat/quantnn
|
5248c240b931fa113120e3564605638095e5278f
|
[
"MIT"
] | 5
|
2020-12-11T03:18:32.000Z
|
2022-02-14T10:32:09.000Z
|
import numpy as np
from quantnn.normalizer import Normalizer, MinMaxNormalizer
def test_normalizer_2d():
"""
Checks that all feature indices that are not excluded have zero
mean and unit std. dev.
"""
x = np.random.normal(size=(100000, 10)) + np.arange(10).reshape(1, -1)
normalizer = Normalizer(x,
exclude_indices=range(1, 10, 2))
x_normed = normalizer(x)
# Included indices should have zero mean and std. dev. 1.0.
assert np.all(np.isclose(x_normed[:, ::2].mean(axis=0),
0.0,
atol=1e-1))
assert np.all(np.isclose(x_normed[:, ::2].std(axis=0),
1.0,
1e-1))
# Excluded indices
assert np.all(np.isclose(x_normed[:, 1::2].mean(axis=0),
np.arange(10)[1::2].reshape(1, -1),
1e-2))
assert np.all(np.isclose(x_normed[:, 1::2].std(axis=0),
1.0,
1e-2))
# Channels without variation should be set to -1.0
x = np.zeros((100, 10))
normalizer = Normalizer(x)
x_normed = normalizer(x)
assert np.all(np.isclose(x_normed, -1.0))
def test_min_max_normalizer_2d():
"""
Checks that all feature indices that are not excluded have zero
mean and unit std. dev.
"""
x = np.random.normal(size=(100000, 11)) + np.arange(11).reshape(1, -1)
normalizer = MinMaxNormalizer(x, exclude_indices=range(1, 10, 2))
x[:, 10] = np.nan
x_normed = normalizer(x)
# Included indices should have minimum value -0.9 and
# maximum value 1.0.
assert np.all(np.isclose(x_normed[:, :10:2].min(axis=0),
-1.0))
assert np.all(np.isclose(x_normed[:, :10:2].max(axis=0),
1.0))
# nan values should be set to -1.0.
assert np.all(np.isclose(x_normed[:, -1], -1.5))
# Channels without variation should be set to -1.0
x = np.zeros((100, 10))
normalizer = MinMaxNormalizer(x)
x_normed = normalizer(x)
assert np.all(np.isclose(x_normed, -1.0))
def test_invert():
"""
Ensure that the inverse function of the Normalizer works as expected.
"""
x = np.random.normal(size=(100000, 10)) + np.arange(10).reshape(1, -1)
normalizer = Normalizer(x, exclude_indices=[0, 1, 2])
x_normed = normalizer(x)
x = normalizer.invert(x_normed)
assert np.all(np.isclose(np.mean(x, axis=0),
np.arange(10, dtype=np.float32),
atol=1e-2))
def test_save_and_load(tmp_path):
"""
Ensure that saved and loaded normalizer yields same results as original.
"""
x = np.random.normal(size=(100000, 10)) + np.arange(10).reshape(1, -1)
normalizer = Normalizer(x,
exclude_indices=range(1, 10, 2))
normalizer.save(tmp_path / "normalizer.pckl")
loaded = Normalizer.load(tmp_path / "normalizer.pckl")
x_normed = normalizer(x)
x_normed_loaded = loaded(x)
assert np.all(np.isclose(x_normed,
x_normed_loaded))
def test_load_sftp(tmp_path):
"""
Ensure that saved and loaded normalizer yields same results as original.
"""
x = np.random.normal(size=(100000, 10)) + np.arange(10).reshape(1, -1)
normalizer = Normalizer(x,
exclude_indices=range(1, 10, 2))
normalizer.save(tmp_path / "normalizer.pckl")
loaded = Normalizer.load(tmp_path / "normalizer.pckl")
x_normed = normalizer(x)
x_normed_loaded = loaded(x)
assert np.all(np.isclose(x_normed,
x_normed_loaded,
rtol=1e-3))
| 34.227273
| 76
| 0.568924
| 518
| 3,765
| 4.03861
| 0.171815
| 0.07696
| 0.063098
| 0.07457
| 0.786807
| 0.753346
| 0.747132
| 0.73566
| 0.66826
| 0.612811
| 0
| 0.061766
| 0.29907
| 3,765
| 109
| 77
| 34.541284
| 0.730959
| 0.177955
| 0
| 0.5
| 0
| 0
| 0.019967
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 1
| 0.075758
| false
| 0
| 0.030303
| 0
| 0.106061
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d02c8be97ac576f3e7a1879564f6199146c00b2a
| 150
|
py
|
Python
|
gpypi/__init__.py
|
tastuteche/g-pypi-py3
|
ea0fceb573415193993f2a03bd06a9fffa755892
|
[
"BSD-2-Clause-FreeBSD"
] | 1
|
2015-03-02T02:20:43.000Z
|
2015-03-02T02:20:43.000Z
|
gpypi/__init__.py
|
iElectric/g-pypi
|
48b1d83346fecbba4c3eb3a7f80d29ae9ca41ef8
|
[
"BSD-2-Clause-FreeBSD"
] | null | null | null |
gpypi/__init__.py
|
iElectric/g-pypi
|
48b1d83346fecbba4c3eb3a7f80d29ae9ca41ef8
|
[
"BSD-2-Clause-FreeBSD"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
__version__ = pkg_resources.get_distribution('g-pypi').version.replace('dev', '')
| 25
| 81
| 0.706667
| 20
| 150
| 4.95
| 0.85
| 0.242424
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007353
| 0.093333
| 150
| 5
| 82
| 30
| 0.720588
| 0.28
| 0
| 0
| 0
| 0
| 0.084906
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d041196bd0911099a99d41fb9ab9d8c8e9e6d8fb
| 114
|
py
|
Python
|
OpenGLCffi/GLX/EXT/SGI/swap_control.py
|
cydenix/OpenGLCffi
|
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
|
[
"MIT"
] | null | null | null |
OpenGLCffi/GLX/EXT/SGI/swap_control.py
|
cydenix/OpenGLCffi
|
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
|
[
"MIT"
] | null | null | null |
OpenGLCffi/GLX/EXT/SGI/swap_control.py
|
cydenix/OpenGLCffi
|
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
|
[
"MIT"
] | null | null | null |
from OpenGLCffi.GLX import params
@params(api='glx', prms=['interval'])
def glXSwapIntervalSGI(interval):
pass
| 16.285714
| 37
| 0.754386
| 14
| 114
| 6.142857
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 114
| 6
| 38
| 19
| 0.843137
| 0
| 0
| 0
| 0
| 0
| 0.098214
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
d051deeb52daaae48ec7137363e293ae5f86363b
| 2,949
|
py
|
Python
|
galaxy/objectstore/lwr.py
|
jmchilton/lwr
|
cd1e51b0b9b1a9fa01b92b0026e7b535d954e03b
|
[
"Apache-2.0"
] | 1
|
2016-08-17T06:36:03.000Z
|
2016-08-17T06:36:03.000Z
|
galaxy/objectstore/lwr.py
|
jmchilton/lwr
|
cd1e51b0b9b1a9fa01b92b0026e7b535d954e03b
|
[
"Apache-2.0"
] | null | null | null |
galaxy/objectstore/lwr.py
|
jmchilton/lwr
|
cd1e51b0b9b1a9fa01b92b0026e7b535d954e03b
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import # Need to import lwr_client absolutely.
from ..objectstore import ObjectStore
try:
from galaxy.jobs.runners.lwr_client.manager import ObjectStoreClientManager
except ImportError:
from lwr.lwr_client.manager import ObjectStoreClientManager
class LwrObjectStore(ObjectStore):
"""
Object store implementation that delegates to a remote LWR server.
This may be more aspirational than practical for now, it would be good to
Galaxy to a point that a handler thread could be setup that doesn't attempt
to access the disk files returned by a (this) object store - just passing
them along to the LWR unmodified. That modification - along with this
implementation and LWR job destinations would then allow Galaxy to fully
manage jobs on remote servers with completely different mount points.
This implementation should be considered beta and may be dropped from
Galaxy at some future point or significantly modified.
"""
def __init__(self, config, config_xml):
self.lwr_client = self.__build_lwr_client(config_xml)
def exists(self, obj, **kwds):
return self.lwr_client.exists(**self.__build_kwds(obj, **kwds))
def file_ready(self, obj, **kwds):
return self.lwr_client.file_ready(**self.__build_kwds(obj, **kwds))
def create(self, obj, **kwds):
return self.lwr_client.create(**self.__build_kwds(obj, **kwds))
def empty(self, obj, **kwds):
return self.lwr_client.empty(**self.__build_kwds(obj, **kwds))
def size(self, obj, **kwds):
return self.lwr_client.size(**self.__build_kwds(obj, **kwds))
def delete(self, obj, **kwds):
return self.lwr_client.delete(**self.__build_kwds(obj, **kwds))
# TODO: Optimize get_data.
def get_data(self, obj, **kwds):
return self.lwr_client.get_data(**self.__build_kwds(obj, **kwds))
def get_filename(self, obj, **kwds):
return self.lwr_client.get_filename(**self.__build_kwds(obj, **kwds))
def update_from_file(self, obj, **kwds):
return self.lwr_client.update_from_file(**self.__build_kwds(obj, **kwds))
def get_store_usage_percent(self):
return self.lwr_client.get_store_usage_percent()
def get_object_url(self, obj, extra_dir=None, extra_dir_at_root=False, alt_name=None):
return None
def __build_kwds(self, obj, **kwds):
kwds['object_id'] = obj.id
return kwds
pass
def __build_lwr_client(self, config_xml):
url = config_xml.get("url")
private_token = config_xml.get("private_token", None)
transport = config_xml.get("transport", None)
manager_options = dict(transport=transport)
client_options = dict(url=url, private_token=private_token)
lwr_client = ObjectStoreClientManager(**manager_options).get_client(client_options)
return lwr_client
def shutdown(self):
pass
| 38.298701
| 91
| 0.705663
| 407
| 2,949
| 4.859951
| 0.302211
| 0.06724
| 0.072295
| 0.096057
| 0.303337
| 0.235592
| 0.165824
| 0.033367
| 0
| 0
| 0
| 0
| 0.195999
| 2,949
| 76
| 92
| 38.802632
| 0.834247
| 0.235334
| 0
| 0.044444
| 0
| 0
| 0.015413
| 0
| 0
| 0
| 0
| 0.013158
| 0
| 1
| 0.333333
| false
| 0.044444
| 0.111111
| 0.244444
| 0.755556
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
d068f378d88a1f62a2d6ce14bbd82dd5b67468ab
| 10,745
|
py
|
Python
|
pysnmp-with-texts/IANATn3270eTC-MIB.py
|
agustinhenze/mibs.snmplabs.com
|
1fc5c07860542b89212f4c8ab807057d9a9206c7
|
[
"Apache-2.0"
] | 8
|
2019-05-09T17:04:00.000Z
|
2021-06-09T06:50:51.000Z
|
pysnmp-with-texts/IANATn3270eTC-MIB.py
|
agustinhenze/mibs.snmplabs.com
|
1fc5c07860542b89212f4c8ab807057d9a9206c7
|
[
"Apache-2.0"
] | 4
|
2019-05-31T16:42:59.000Z
|
2020-01-31T21:57:17.000Z
|
pysnmp-with-texts/IANATn3270eTC-MIB.py
|
agustinhenze/mibs.snmplabs.com
|
1fc5c07860542b89212f4c8ab807057d9a9206c7
|
[
"Apache-2.0"
] | 10
|
2019-04-30T05:51:36.000Z
|
2022-02-16T03:33:41.000Z
|
#
# PySNMP MIB module IANATn3270eTC-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IANATn3270eTC-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:50:32 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Gauge32, Unsigned32, ModuleIdentity, Integer32, mib_2, Counter32, Counter64, TimeTicks, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, IpAddress, MibIdentifier, Bits, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "Unsigned32", "ModuleIdentity", "Integer32", "mib-2", "Counter32", "Counter64", "TimeTicks", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "IpAddress", "MibIdentifier", "Bits", "iso")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
ianaTn3270eTcMib = ModuleIdentity((1, 3, 6, 1, 2, 1, 61))
ianaTn3270eTcMib.setRevisions(('2014-05-22 00:00', '2000-05-10 00:00', '1999-09-01 10:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ianaTn3270eTcMib.setRevisionsDescriptions(('Updated ICANN contact info.', 'Fix to import mib-2 instead of experimental.', 'Initial version transferred from the TN3270E working group to IANA.',))
if mibBuilder.loadTexts: ianaTn3270eTcMib.setLastUpdated('201405220000Z')
if mibBuilder.loadTexts: ianaTn3270eTcMib.setOrganization('IANA')
if mibBuilder.loadTexts: ianaTn3270eTcMib.setContactInfo('Internet Assigned Numbers Authority Postal: ICANN 12025 Waterfront Drive, Suite 300 Los Angeles, CA 90094-2536 Tel: +1 310-301-5800 E-Mail: iana&iana.org')
if mibBuilder.loadTexts: ianaTn3270eTcMib.setDescription('This module defines a set of textual conventions for use by the TN3270E-MIB and the TN3270E-RT-MIB. Any additions or changes to the contents of this MIB module must first be discussed on the tn3270e working group list at: tn3270e&list.nih.gov and approved by one of the following TN3270E working group contacts: Ed Bailey (co-chair) - elbailey&us.ibm.com Michael Boe (co-chair) - mboe&cisco.com Ken White - kennethw&vnet.ibm.com Robert Moore - remoore&us.ibm.com The above list of contacts can be altered with the approval of the two co-chairs. The Textual Conventions defined within this MIB have no security issues associated with them unless explicitly stated in their corresponding DESCRIPTION clause.')
class IANATn3270eAddrType(TextualConvention, Integer32):
description = 'The textual convention for defining the type of a client address. The enumeration value unknown(0) is also used to indicate that no actual address is present.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2))
namedValues = NamedValues(("unknown", 0), ("ipv4", 1), ("ipv6", 2))
class IANATn3270eAddress(TextualConvention, OctetString):
description = 'Denotes a client address. The type of client address is determined by use of the IANATn3270eAddrType textual convention. The length in octets of a IANATn3270eAddress object is: IANATn3270eAddrType Address Length +++++++++++++++++++ ++++++++++++++ unknown(0) not specified or unknown; the actual length of the IANATn3270eAddress octet string indicates if an address is present ipv4(1) 4 OCTETS ipv6(2) 16 OCTETS This textual convention is similar to the TAddress TC defined by RFC1903 except that it allows a zero-length octet string and is not a full transport layer address.'
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 255)
class IANATn3270eClientType(TextualConvention, Integer32):
description = "The textual convention for defining the set of enumerations used by tn3270eTcpConnClientIdFormat in the TN3270E-MIB: ENUMERATION OCTETs DESCRIPTION none(1) 0 Not specified other(2) 1..512 Implementation specific ipv4(3) 6 4-octet IP Address plus 2-octet TCP Port ipv6(4) 18 16-octet IPv6 Address plus 2-octet TCP Port domainName(5) 1..512 The DNS name of a client. truncDomainName(6) 1..512 The (truncated) DNS name of a client. string(7) 1..512 Unknown Utf8String certificate(8) 1..512 certificate userId(9) 1..8 Client's userid x509dn(10) 1..512 X.509 Distinguished Name Representation of a certificate(8) may be lead to a security exposure and is NOT RECOMMENDED without adequate security."
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
namedValues = NamedValues(("none", 1), ("other", 2), ("ipv4", 3), ("ipv6", 4), ("domainName", 5), ("truncDomainName", 6), ("string", 7), ("certificate", 8), ("userId", 9), ("x509dn", 10))
class IANATn3270Functions(TextualConvention, Bits):
description = "This textual convention reflects the current set of TN3270 and TN3270E functions that can be negotiated between a server and its client: RFC856 transmitBinary The sender of this command REQUESTS permission to begin transmitting, or confirms that it will now begin transmitting characters which are to be interpreted as 8 bits of binary data by the receiver of the data. RFC860 timingMark The sender of this command REQUESTS that the receiver of this command return a WILL TIMING-MARK in the data stream at the 'appropriate place'. RFC885 endOfRecord The sender of this command requests permission to begin transmission of the Telnet END-OF-RECORD (EOR) code when transmitting data characters, or the sender of this command confirms it will now begin transmission of EORs with transmitted data characters. RFC1091 terminalType Sender is willing to send terminal type information in a subsequent sub-negotiation. RFC1041 tn3270Regime Sender is willing to send list of supported 3270 Regimes in a subsequent sub-negotiation. RFC2355 scsCtlCodes (Printer sessions only). Allows the use of the SNA Character Stream (SCS) and SCS control codes on the session. SCS is used with LU type 1 SNA sessions. dataStreamCtl (Printer sessions only). Allows the use of the standard 3270 data stream. This corresponds to LU type 3 SNA sessions. responses Provides support for positive and negative response handling. Allows the server to reflect to the client any and all definite, exception, and no response requests sent by the host application. bindImage Allows the server to send the SNA Bind image and Unbind notification to the client. sysreq Allows the client and server to emulate some (or all, depending on the server) of the functions of the SYSREQ key in an SNA environment."
status = 'current'
namedValues = NamedValues(("transmitBinary", 0), ("timemark", 1), ("endOfRecord", 2), ("terminalType", 3), ("tn3270Regime", 4), ("scsCtlCodes", 5), ("dataStreamCtl", 6), ("responses", 7), ("bindImage", 8), ("sysreq", 9))
class IANATn3270ResourceType(TextualConvention, Integer32):
description = 'The type of resource defined by a resource pool. Refer to tn3270eResPoolTable.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("other", 1), ("terminal", 2), ("printer", 3), ("terminalOrPrinter", 4))
class IANATn3270DeviceType(TextualConvention, Integer32):
description = 'This textual convention defines the list of device types that can be set, as defined by RFC 2355.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100))
namedValues = NamedValues(("ibm3278d2", 1), ("ibm3278d2E", 2), ("ibm3278d3", 3), ("ibm3278d3E", 4), ("ibm3278d4", 5), ("ibm3278d4E", 6), ("ibm3278d5", 7), ("ibm3278d5E", 8), ("ibmDynamic", 9), ("ibm3287d1", 10), ("unknown", 100))
class IANATn3270eLogData(TextualConvention, OctetString):
description = "An octet string representing log data as pertaining to either a TN3270 or TN3270E Session as reported from a TN3270E Server. Log data is stored in an octet string in time order (from earliest to latest). Each log element has the following form: +------+----+---------+------------+ !length!type!TimeStamp! data ! +------+----+---------+------------+ where length = one-octet length of the data portion of the trace element, not including the length, type, and TimeStamp fields type = one-octet code point characterizing the data. TimeStamp = A 4-octet field representing the number of TimeTicks since the TN3270E server was last activated. The server's last activation time is available in the tn3270eSrvrConfLastActTime object in the TN3270E MIB, which has the syntax DateAndTime. data = initial part of a PDU. length type 0-255 x'00' - unknown 0 x'01' - inactivity timer expired 0 x'02' - dynamic timer expired 0 x'03' - actlu req 0 x'04' - bind req 0 x'05' - clear req 0 x'06' - dactlu req 0 x'07' - warm actpu req 0 x'08' - sdt req 0 x'09' - unbind req 0 x'0A' - notify resp 0 x'0B' - reply PSID neg rsp 0 x'0C' - reply PSID pos rsp 0 x'0D' - unbind rsp 0 x'0E' - hierarchical reset 0 x'0F' - client connect req 0 x'10' - client disconnect req 0 x'11' - timingmark received 0 x'12' - flowControl timer expired 0 x'13' - neg rsp to host 0 x'14' - neg rsp from host 0 x'15' - data contention 0 x'16' - no buffer to send SNA data 0 x'17' - receive response while inbound 0 x'18' - client protocol error 0 x'19' - badClientSequenceReceived 1-255 x'1A' - utf8String 2 x'1B' - hexCode, implementation dependent Log element entries have a minimum length of 6 octets. The zero-length string indicates that no log data is available."
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(6, 2048), )
mibBuilder.exportSymbols("IANATn3270eTC-MIB", IANATn3270ResourceType=IANATn3270ResourceType, IANATn3270eAddrType=IANATn3270eAddrType, IANATn3270eClientType=IANATn3270eClientType, IANATn3270eAddress=IANATn3270eAddress, IANATn3270Functions=IANATn3270Functions, ianaTn3270eTcMib=ianaTn3270eTcMib, IANATn3270eLogData=IANATn3270eLogData, PYSNMP_MODULE_ID=ianaTn3270eTcMib, IANATn3270DeviceType=IANATn3270DeviceType)
| 173.306452
| 1,787
| 0.765286
| 1,458
| 10,745
| 5.63786
| 0.349108
| 0.006083
| 0.005474
| 0.022506
| 0.194891
| 0.131387
| 0.121898
| 0.112044
| 0.103285
| 0.074574
| 0
| 0.078792
| 0.134202
| 10,745
| 61
| 1,788
| 176.147541
| 0.804794
| 0.030526
| 0
| 0.148936
| 0
| 0.148936
| 0.672848
| 0.022963
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.148936
| 0
| 0.829787
| 0.021277
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
d074140bf759cf3b150d0e7df4c1faa1bb0a18eb
| 66
|
py
|
Python
|
pipekit/__init__.py
|
DrDub/pipekit
|
87bd69ac2926085a27d72e9e5f19bd05038f178e
|
[
"MIT"
] | 3
|
2020-05-28T21:31:03.000Z
|
2021-12-04T14:30:46.000Z
|
pipekit/__init__.py
|
DrDub/pipekit
|
87bd69ac2926085a27d72e9e5f19bd05038f178e
|
[
"MIT"
] | 1
|
2022-03-04T13:44:37.000Z
|
2022-03-06T12:07:17.000Z
|
pipekit/__init__.py
|
DrDub/pipekit
|
87bd69ac2926085a27d72e9e5f19bd05038f178e
|
[
"MIT"
] | 1
|
2021-12-04T14:30:50.000Z
|
2021-12-04T14:30:50.000Z
|
#!/usr/bin/env python3
from .pipe import NullPipe # noqa: W0611
| 16.5
| 41
| 0.712121
| 10
| 66
| 4.7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 0.166667
| 66
| 3
| 42
| 22
| 0.763636
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d0841c2b4be8eb207a036b88e5779cd8b911bd95
| 215
|
py
|
Python
|
meta_tagger/cms_sitemap.py
|
dreipol/meta-tagger
|
c1a2f1f8b0c051018a5bb75d4e579d27bd2c27b2
|
[
"BSD-3-Clause"
] | 3
|
2016-05-30T07:48:54.000Z
|
2017-02-08T21:16:03.000Z
|
meta_tagger/cms_sitemap.py
|
dreipol/meta-tagger
|
c1a2f1f8b0c051018a5bb75d4e579d27bd2c27b2
|
[
"BSD-3-Clause"
] | null | null | null |
meta_tagger/cms_sitemap.py
|
dreipol/meta-tagger
|
c1a2f1f8b0c051018a5bb75d4e579d27bd2c27b2
|
[
"BSD-3-Clause"
] | null | null | null |
from cms.sitemaps import CMSSitemap
class MetaTagRobotsSiteMap(CMSSitemap):
def items(self):
return super(MetaTagRobotsSiteMap, self).items().exclude(page__metatagpageextension__robots_indexing=False)
| 30.714286
| 115
| 0.804651
| 22
| 215
| 7.636364
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116279
| 215
| 6
| 116
| 35.833333
| 0.884211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
d08bc293e7aa648961be5dc9ab447c3a9fc2a7cd
| 92
|
py
|
Python
|
apps/quotes/quote_fetcher/quote_fetcher.py
|
Ev1dentSnow/ArtemisAPI_django
|
ca7ef0ccc97114f2c5439b7b1bbc0e635facf020
|
[
"MIT"
] | null | null | null |
apps/quotes/quote_fetcher/quote_fetcher.py
|
Ev1dentSnow/ArtemisAPI_django
|
ca7ef0ccc97114f2c5439b7b1bbc0e635facf020
|
[
"MIT"
] | null | null | null |
apps/quotes/quote_fetcher/quote_fetcher.py
|
Ev1dentSnow/ArtemisAPI_django
|
ca7ef0ccc97114f2c5439b7b1bbc0e635facf020
|
[
"MIT"
] | null | null | null |
import json
import requests
from apps.quotes import models
def fetch_quote():
pass
| 8.363636
| 30
| 0.73913
| 13
| 92
| 5.153846
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.217391
| 92
| 10
| 31
| 9.2
| 0.930556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0.2
| 0.6
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
d0aaf0fb192a84eb339c1f6dd809bcf15ef6174e
| 147
|
py
|
Python
|
payments/urls.py
|
HimanshuAwasthi95/pune.pycon.org
|
0d5265d730c496b1571a6df8d4ff650d12f56ded
|
[
"MIT"
] | null | null | null |
payments/urls.py
|
HimanshuAwasthi95/pune.pycon.org
|
0d5265d730c496b1571a6df8d4ff650d12f56ded
|
[
"MIT"
] | null | null | null |
payments/urls.py
|
HimanshuAwasthi95/pune.pycon.org
|
0d5265d730c496b1571a6df8d4ff650d12f56ded
|
[
"MIT"
] | null | null | null |
from django.conf.urls import url
import payments.views
urlpatterns = [
url(r"^webhook/$", payments.views.webhook,
name="webhook"),
]
| 16.333333
| 46
| 0.673469
| 18
| 147
| 5.5
| 0.666667
| 0.262626
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.183673
| 147
| 8
| 47
| 18.375
| 0.825
| 0
| 0
| 0
| 0
| 0
| 0.115646
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d0e40eeae0935615bef66973afbd8df4d97c5cc8
| 85
|
py
|
Python
|
tonggong/validations/__init__.py
|
Scar1et-x/tonggong
|
5ab75dac8a9ca92114c0973efd05901f714d7ac8
|
[
"MIT"
] | null | null | null |
tonggong/validations/__init__.py
|
Scar1et-x/tonggong
|
5ab75dac8a9ca92114c0973efd05901f714d7ac8
|
[
"MIT"
] | null | null | null |
tonggong/validations/__init__.py
|
Scar1et-x/tonggong
|
5ab75dac8a9ca92114c0973efd05901f714d7ac8
|
[
"MIT"
] | null | null | null |
from . import errors, utils, validators
__all__ = ["validators", "errors", "utils"]
| 21.25
| 43
| 0.694118
| 9
| 85
| 6.111111
| 0.666667
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141176
| 85
| 3
| 44
| 28.333333
| 0.753425
| 0
| 0
| 0
| 0
| 0
| 0.247059
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d0edb6f555c161adf4fe3cff8ddf1c0a7abeb302
| 85
|
py
|
Python
|
NFCow/malls/apps.py
|
jojoriveraa/titulacion-NFCOW
|
643f7f2cbe9c68d9343f38d12629720b12e9ce1e
|
[
"Apache-2.0"
] | null | null | null |
NFCow/malls/apps.py
|
jojoriveraa/titulacion-NFCOW
|
643f7f2cbe9c68d9343f38d12629720b12e9ce1e
|
[
"Apache-2.0"
] | 11
|
2016-01-09T06:27:02.000Z
|
2016-01-10T05:21:05.000Z
|
NFCow/malls/apps.py
|
jojoriveraa/titulacion-NFCOW
|
643f7f2cbe9c68d9343f38d12629720b12e9ce1e
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class MallsConfig(AppConfig):
name = 'malls'
| 14.166667
| 33
| 0.741176
| 10
| 85
| 6.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 85
| 5
| 34
| 17
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ef7eaca50ce49212f4a1160a48270b73f61981ef
| 31
|
py
|
Python
|
200914/04.lists.py
|
Floou/python-basics
|
70fe3c4babc4e53217f2540d630ab9dc2b2ba180
|
[
"MIT"
] | null | null | null |
200914/04.lists.py
|
Floou/python-basics
|
70fe3c4babc4e53217f2540d630ab9dc2b2ba180
|
[
"MIT"
] | null | null | null |
200914/04.lists.py
|
Floou/python-basics
|
70fe3c4babc4e53217f2540d630ab9dc2b2ba180
|
[
"MIT"
] | null | null | null |
say = 'всем привет!'
print(say)
| 15.5
| 20
| 0.677419
| 5
| 31
| 4.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 31
| 2
| 21
| 15.5
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
efb8585578224842a78d9875ab361bf22626c596
| 103
|
py
|
Python
|
intpy/__init__.py
|
claytonchagas/intpyplus
|
53e6d9a852ae41ac9ffec357e3f5ab04e806583e
|
[
"MIT"
] | null | null | null |
intpy/__init__.py
|
claytonchagas/intpyplus
|
53e6d9a852ae41ac9ffec357e3f5ab04e806583e
|
[
"MIT"
] | null | null | null |
intpy/__init__.py
|
claytonchagas/intpyplus
|
53e6d9a852ae41ac9ffec357e3f5ab04e806583e
|
[
"MIT"
] | null | null | null |
from .intpy import deterministic
from .data_access import get_cache_data, create_entry
name="int_py"
| 34.333333
| 55
| 0.825243
| 16
| 103
| 5
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116505
| 103
| 3
| 56
| 34.333333
| 0.879121
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
efc652351d89c20fe3a50ccb9d412142f6764f81
| 3,861
|
py
|
Python
|
idlib/identifiers.py
|
tgbugs/idlib
|
4760322b023cc38a8f6800141fe8735d10fa014a
|
[
"MIT"
] | 2
|
2021-11-28T23:52:48.000Z
|
2022-02-17T18:12:32.000Z
|
idlib/identifiers.py
|
tgbugs/idlib
|
4760322b023cc38a8f6800141fe8735d10fa014a
|
[
"MIT"
] | 2
|
2020-05-22T10:40:58.000Z
|
2022-01-05T22:38:06.000Z
|
idlib/identifiers.py
|
tgbugs/idlib
|
4760322b023cc38a8f6800141fe8735d10fa014a
|
[
"MIT"
] | null | null | null |
"""Identifiers are the smallest possible unit of a stream. Their
fundamental property is that they come equipped with an equality
operation. Not all equality operations are as simple as string= or
numberical equality. These must employ a true identity function that
does not reduce the amount of data that is compared. That is,
identifiers are distinguished from other pieces of data in the sense
that the family of functions that implement 'sameness' requires direct
comparison of every byte of two streams with an allowance for
conversion to a canonical form which may include reordering and
deduplication of elements of the identifier that follow set equality
rather than string equality for example composite primary keys in a
database may be rearranged into a preferred order for further byte to
byte comparison between rows, but the characters in a word cannot be
sorted prior to comparison if we are interested in the equality of two
ordered strings of chars.
Note that under the defintion provided above the ONLY requirement for
an identifier is that it come equipped with an identity function. This
means that whole computer programs can be identifiers as long as the
comparison function is defined. Then there is a question of the robustness
of that identity function to a change in context, specifically defined
as the failures of the equiality of identifiers to correctly imply the
equality of what they dereference to.
There is a tradeoff between robustness of reference and usefulness for
human communication. And for better or for worse the IRBs and IACUCs of
the world tend to frown upon shoving subjects through hash functions.
"""
import idlib
class Identifier(idlib.Stream): # TODO decide if str should be base ...
""" Base class for all Identifiers """
# all identifiers mapped to idlib should have a string representation
# or be representable as strings in as unambiguous a way as possible
# this means that distinctions based on types e.g. MyId('1') and YourId('1')
# need stringify in such a way that they do not colide e.g. myid:1 yourid:1
# within the expected context of their expansion
# local:?:myid:1 local:?:yourid:1 could represent the space of local identifiers
# with unknown local conventions, maintaining a record of all local conventions
# seems likely to be a giant pain, so local:?: ids would be ephemoral and would
# probably have to be marked with a source as a kind of best guess maximal domain
# for assuming similarity, though in some documents every instance of a local:?:id
# should probably be assumed to be different under expansion
# as a result of this, it is still not entirely clear whether
# str is quite the right option, but since normalization can
# occur before stringification, it is probably ok ...
# e.g. hello:world -> local:?:hello:world in cases where
# a local identifier is used without conventions
# same with local:?:1, local:?:2, local:?:3, local:?:4
_id_class = str
local_regex = None # an unqualified, likely non-unique regex for the system local identifier
canonical_regex = None # but really '.+'
#@staticmethod
#def normalize(identifier):
#raise NotImplementedError
#return identifier
def __new__(cls, *args, **kwargs):
return super().__new__(cls, *args, **kwargs)
def __init__(self, *args, **kwargs):
return super().__init__(*args, **kwargs)
#def exists(self):
# bad identifiers are not allowed to finish __init__
#raise NotImplementedError
def metadata(self):
raise NotImplementedError
def data(self):
raise NotImplementedError
def asLocal(self, conventions=None):
if conventions is None:
conventions = self._local_conventions
return conventions.asLocal(self)
| 45.964286
| 97
| 0.746698
| 570
| 3,861
| 5.012281
| 0.454386
| 0.007
| 0.028351
| 0.012601
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003253
| 0.203833
| 3,861
| 83
| 98
| 46.518072
| 0.926155
| 0.799793
| 0
| 0.117647
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012048
| 0
| 1
| 0.294118
| false
| 0
| 0.058824
| 0.117647
| 0.764706
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
effc7c79e8940cb8717fe28220b50236d31665cc
| 491
|
py
|
Python
|
tests/test_1.py
|
BroadAxeC3/deidre
|
358c006f99af1be62d6b346c31450ffc7be1f5b6
|
[
"MIT"
] | 1
|
2018-01-23T17:16:22.000Z
|
2018-01-23T17:16:22.000Z
|
tests/test_1.py
|
BroadAxeC3/deidre
|
358c006f99af1be62d6b346c31450ffc7be1f5b6
|
[
"MIT"
] | null | null | null |
tests/test_1.py
|
BroadAxeC3/deidre
|
358c006f99af1be62d6b346c31450ffc7be1f5b6
|
[
"MIT"
] | 1
|
2018-01-23T17:16:28.000Z
|
2018-01-23T17:16:28.000Z
|
# -*- coding: utf-8 -*-
import unittest
class ApiTests(unittest.TestCase):
pass
# @Mocker()
# def test_timeout_exception(self, m):
# # given
# m._adapter = Co2ApiTimeoutAdapter(m._adapter)
# m.register_uri(ANY, ANY, text=self.hanging_callback)
# client = ApiClient(adapter=Co2ApiTimeoutAdapter(), timeout=10)
#
# # when/then
# with self.assertRaises(ApiException):
# client.retrieve('GET', f'{BASE_URI}/foobar')
| 27.277778
| 72
| 0.615071
| 51
| 491
| 5.784314
| 0.745098
| 0.054237
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013514
| 0.246436
| 491
| 17
| 73
| 28.882353
| 0.783784
| 0.739308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
4bd82abf7687e227d825bb7d6c277cf3e3f7ba75
| 147
|
py
|
Python
|
src/settings.py
|
carlomazzaferro/facet
|
cfae5902547ed91ba1b356dae0ef0725e38b84b6
|
[
"MIT"
] | null | null | null |
src/settings.py
|
carlomazzaferro/facet
|
cfae5902547ed91ba1b356dae0ef0725e38b84b6
|
[
"MIT"
] | null | null | null |
src/settings.py
|
carlomazzaferro/facet
|
cfae5902547ed91ba1b356dae0ef0725e38b84b6
|
[
"MIT"
] | null | null | null |
RAW_DATA_PATH = 'data/raw'
PROCESSED_DATA_PATH = 'data/processed'
OUTPUT_DATA_PATH = 'data/output'
MODELS_PATH = 'models'
REPORTS_PATH = 'reports'
| 24.5
| 38
| 0.77551
| 21
| 147
| 5.047619
| 0.333333
| 0.226415
| 0.339623
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102041
| 147
| 5
| 39
| 29.4
| 0.80303
| 0
| 0
| 0
| 0
| 0
| 0.312925
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4be3e5482a5ae3e97ffd7a62bcc31966f36ab5a5
| 20,956
|
py
|
Python
|
venv/Lib/site-packages/traits/observation/tests/test_expression.py
|
richung99/digitizePlots
|
6b408c820660a415a289726e3223e8f558d3e18b
|
[
"MIT"
] | 1
|
2022-01-18T17:56:51.000Z
|
2022-01-18T17:56:51.000Z
|
venv/Lib/site-packages/traits/observation/tests/test_expression.py
|
richung99/digitizePlots
|
6b408c820660a415a289726e3223e8f558d3e18b
|
[
"MIT"
] | null | null | null |
venv/Lib/site-packages/traits/observation/tests/test_expression.py
|
richung99/digitizePlots
|
6b408c820660a415a289726e3223e8f558d3e18b
|
[
"MIT"
] | null | null | null |
# (C) Copyright 2005-2021 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
import inspect
import unittest
from traits.observation import expression
from traits.observation._dict_item_observer import DictItemObserver
from traits.observation._filtered_trait_observer import FilteredTraitObserver
from traits.observation._list_item_observer import ListItemObserver
from traits.observation._metadata_filter import MetadataFilter
from traits.observation._named_trait_observer import NamedTraitObserver
from traits.observation._set_item_observer import SetItemObserver
from traits.observation._observer_graph import ObserverGraph
def create_graph(*nodes):
""" Create an ObserverGraph with the given nodes joined one after another.
Parameters
----------
*nodes : hashable
Items to be attached as nodes
Returns
-------
ObserverGraph
"""
node = nodes[-1]
graph = ObserverGraph(node=node)
for node in nodes[:-1][::-1]:
graph = ObserverGraph(node=node, children=[graph])
return graph
def create_expression(observer):
""" Create an expression with a dummy observer for testing purposes.
Parameters
----------
observer : hashable
Item to be used as a node on ObserverGraph
Returns
-------
expression : ObserverExpression
"""
return expression.SingleObserverExpression(observer)
class TestObserverExpressionComposition(unittest.TestCase):
""" Test composition of ObserverExpression with generic observers."""
def test_new_with_branches(self):
observer = 1
expr = create_expression(observer)
expected = [
create_graph(observer),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_or_operator(self):
observer1 = 1
observer2 = 2
expr1 = create_expression(observer1)
expr2 = create_expression(observer2)
expr = expr1 | expr2
expected = [
create_graph(observer1),
create_graph(observer2),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_or_maintain_order(self):
# Test __or__ will maintain the order provided by the user.
observer1 = 1
observer2 = 2
expr1 = create_expression(observer1)
expr2 = create_expression(observer2)
combined1 = expr1 | expr2
combined2 = expr2 | expr1
self.assertEqual(combined1._as_graphs(), combined2._as_graphs()[::-1])
def test_then_operator(self):
observer1 = 1
observer2 = 2
expr1 = create_expression(observer1)
expr2 = create_expression(observer2)
expr = expr1.then(expr2)
expected = [
create_graph(
observer1,
observer2,
)
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_chained_then_or(self):
observer1 = 1
observer2 = 2
observer3 = 3
observer4 = 4
expr1 = create_expression(observer1)
expr2 = create_expression(observer2)
expr3 = create_expression(observer3)
expr4 = create_expression(observer4)
expr = (expr1.then(expr2)) | (expr3.then(expr4))
expected = [
create_graph(
observer1,
observer2,
),
create_graph(
observer3,
observer4,
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_or_then_chained(self):
observer1 = 1
observer2 = 2
observer3 = 3
observer4 = 4
expr1 = create_expression(observer1)
expr2 = create_expression(observer2)
expr3 = create_expression(observer3)
expr4 = create_expression(observer4)
expr = (expr1 | expr2).then(expr3 | expr4)
expected = [
ObserverGraph(
node=observer1,
children=[
create_graph(observer3),
create_graph(observer4),
],
),
ObserverGraph(
node=observer2,
children=[
create_graph(observer3),
create_graph(observer4),
],
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_join_expressions(self):
observer1 = 1
observer2 = 2
expr1 = create_expression(observer1)
expr2 = create_expression(observer2)
expr = expression.join(expr1, expr2)
expected = [
create_graph(
observer1,
observer2,
)
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
class TestObserverExpressionFilter(unittest.TestCase):
""" Test ObserverExpression.match """
def setUp(self):
def anytrait(name, trait):
return True
self.anytrait = anytrait
def test_match_notify_true(self):
# Test the top-level function
expr = expression.match(filter=self.anytrait)
expected = [
create_graph(
FilteredTraitObserver(filter=self.anytrait, notify=True),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_match_notify_false(self):
# Test the top-level function
expr = expression.match(filter=self.anytrait, notify=False)
expected = [
create_graph(
FilteredTraitObserver(filter=self.anytrait, notify=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_match_method_notify_true(self):
# Test the instance method calls the top-level function correctly.
expr = expression.match(filter=self.anytrait).match(
filter=self.anytrait
)
expected = [
create_graph(
FilteredTraitObserver(filter=self.anytrait, notify=True),
FilteredTraitObserver(filter=self.anytrait, notify=True),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_match_method_notify_false(self):
# Test the instance method calls the top-level function correctly.
expr = expression.match(filter=self.anytrait).match(
filter=self.anytrait, notify=False,
)
expected = [
create_graph(
FilteredTraitObserver(filter=self.anytrait, notify=True),
FilteredTraitObserver(filter=self.anytrait, notify=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_call_signatures(self):
# Test to help developers keeping the two function signatures in-sync.
# Remove this if the two need to divert in the future.
top_level = expression.match
method = expression.ObserverExpression().match
self.assertEqual(
inspect.signature(top_level), inspect.signature(method)
)
class TestObserverExpressionFilterMetadata(unittest.TestCase):
""" Test ObserverExpression.metadata """
def test_metadata_notify_true(self):
# Test the top-level function
expr = expression.metadata("butterfly")
expected = [
create_graph(
FilteredTraitObserver(
filter=MetadataFilter(metadata_name="butterfly"),
notify=True,
),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_metadata_notify_false(self):
# Test the top-level function
expr = expression.metadata("butterfly", notify=False)
expected = [
create_graph(
FilteredTraitObserver(
filter=MetadataFilter(metadata_name="butterfly"),
notify=False,
),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_metadata_method_notify_true(self):
# Test the instance method calls the top-level function correctly.
expr = expression.metadata("bee").metadata("ant")
expected = [
create_graph(
FilteredTraitObserver(
filter=MetadataFilter(metadata_name="bee"),
notify=True,
),
FilteredTraitObserver(
filter=MetadataFilter(metadata_name="ant"),
notify=True,
),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_metadata_method_notify_false(self):
# Test the instance method calls the top-level function correctly.
expr = expression.metadata("bee").metadata("ant", notify=False)
expected = [
create_graph(
FilteredTraitObserver(
filter=MetadataFilter(metadata_name="bee"),
notify=True,
),
FilteredTraitObserver(
filter=MetadataFilter(metadata_name="ant"),
notify=False,
),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_call_signatures(self):
# Test to help developers keeping the two function signatures in-sync.
# Remove this if the two need to divert in the future.
top_level = expression.metadata
method = expression.ObserverExpression().metadata
self.assertEqual(
inspect.signature(top_level), inspect.signature(method)
)
class TestObserverExpressionTrait(unittest.TestCase):
""" Test ObserverExpression.trait """
def test_trait_name(self):
# Test the top-level function
expr = expression.trait("name")
expected = [
create_graph(
NamedTraitObserver(name="name", notify=True, optional=False)
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_trait_name_notify_false(self):
# Test the top-level function
expr = expression.trait("name", notify=False)
expected = [
create_graph(
NamedTraitObserver(name="name", notify=False, optional=False)
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_trait_name_optional_true(self):
# Test the top-level function
expr = expression.trait("name", optional=True)
expected = [
create_graph(
NamedTraitObserver(name="name", notify=True, optional=True)
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_trait_method(self):
# Test the instance method calls the top-level function correctly.
expr = expression.trait("name").trait("attr")
expected = [
create_graph(
NamedTraitObserver(name="name", notify=True, optional=False),
NamedTraitObserver(name="attr", notify=True, optional=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_trait_method_notify_false(self):
# Test the instance method calls the top-level function correctly.
expr = expression.trait("name").trait("attr", notify=False)
expected = [
create_graph(
NamedTraitObserver(name="name", notify=True, optional=False),
NamedTraitObserver(name="attr", notify=False, optional=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_trait_method_optional_true(self):
# Test the instance method calls the top-level function correctly.
expr = expression.trait("name").trait("attr", optional=True)
expected = [
create_graph(
NamedTraitObserver(name="name", notify=True, optional=False),
NamedTraitObserver(name="attr", notify=True, optional=True),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_call_signatures(self):
# Test to help developers keeping the two function signatures in-sync.
# Remove this if the two need to divert in the future.
top_level_trait = expression.trait
method_trait = expression.ObserverExpression().trait
self.assertEqual(
inspect.signature(top_level_trait), inspect.signature(method_trait)
)
class TestObserverExpressionDictItem(unittest.TestCase):
""" Test ObserverExpression.dict_items """
def test_dict_items(self):
expr = expression.dict_items()
expected = [
create_graph(
DictItemObserver(notify=True, optional=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_dict_items_notify_false(self):
expr = expression.dict_items(notify=False)
expected = [
create_graph(
DictItemObserver(notify=False, optional=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_dict_items_optional_true(self):
expr = expression.dict_items(optional=True)
expected = [
create_graph(
DictItemObserver(notify=True, optional=True),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_dict_items_method_notify(self):
# Test the instance method calls the top-level function correctly.
expr = expression.dict_items().dict_items(notify=False)
expected = [
create_graph(
DictItemObserver(notify=True, optional=False),
DictItemObserver(notify=False, optional=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_dict_items_method_optional(self):
# Test the instance method calls the top-level function correctly.
expr = expression.dict_items().dict_items(optional=True)
expected = [
create_graph(
DictItemObserver(notify=True, optional=False),
DictItemObserver(notify=True, optional=True),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_call_signatures(self):
# Test to help developers keeping the two function signatures in-sync.
# Remove this if the two need to divert in the future.
top_level = expression.dict_items
method = expression.ObserverExpression().dict_items
self.assertEqual(
inspect.signature(top_level), inspect.signature(method)
)
class TestObserverExpressionListItem(unittest.TestCase):
""" Test ObserverExpression.list_items """
def test_list_items(self):
expr = expression.list_items()
expected = [
create_graph(
ListItemObserver(notify=True, optional=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_list_items_notify_false(self):
expr = expression.list_items(notify=False)
expected = [
create_graph(
ListItemObserver(notify=False, optional=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_list_items_optional_true(self):
expr = expression.list_items(optional=True)
expected = [
create_graph(
ListItemObserver(notify=True, optional=True),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_list_items_method_notify(self):
# Test the instance method calls the top-level function correctly.
expr = expression.list_items().list_items(notify=False)
expected = [
create_graph(
ListItemObserver(notify=True, optional=False),
ListItemObserver(notify=False, optional=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_list_items_method_optional(self):
# Test the instance method calls the top-level function correctly.
expr = expression.list_items().list_items(optional=True)
expected = [
create_graph(
ListItemObserver(notify=True, optional=False),
ListItemObserver(notify=True, optional=True),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_call_signatures(self):
# Test to help developers keeping the two function signatures in-sync.
# Remove this if the two need to divert in the future.
top_level = expression.list_items
method = expression.ObserverExpression().list_items
self.assertEqual(
inspect.signature(top_level), inspect.signature(method)
)
class TestObserverExpressionSetItem(unittest.TestCase):
""" Test ObserverExpression.set_items """
def test_set_items(self):
expr = expression.set_items()
expected = [
create_graph(
SetItemObserver(notify=True, optional=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_set_items_notify_false(self):
expr = expression.set_items(notify=False)
expected = [
create_graph(
SetItemObserver(notify=False, optional=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_set_items_optional_true(self):
expr = expression.set_items(optional=True)
expected = [
create_graph(
SetItemObserver(notify=True, optional=True),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_set_items_method_notify(self):
# Test the instance method calls the top-level function correctly.
expr = expression.set_items().set_items(notify=False)
expected = [
create_graph(
SetItemObserver(notify=True, optional=False),
SetItemObserver(notify=False, optional=False),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_set_items_method_optional(self):
# Test the instance method calls the top-level function correctly.
expr = expression.set_items().set_items(optional=True)
expected = [
create_graph(
SetItemObserver(notify=True, optional=False),
SetItemObserver(notify=True, optional=True),
),
]
actual = expr._as_graphs()
self.assertEqual(actual, expected)
def test_call_signatures(self):
# Test to help developers keeping the two function signatures in-sync.
# Remove this if the two need to divert in the future.
top_level = expression.set_items
method = expression.ObserverExpression().set_items
self.assertEqual(
inspect.signature(top_level), inspect.signature(method)
)
class TestObserverExpressionEquality(unittest.TestCase):
""" Test ObserverExpression.__eq__ """
def test_trait_equality(self):
expr1 = create_expression(1)
expr2 = create_expression(1)
self.assertEqual(expr1, expr2)
def test_join_equality_with_then(self):
# The following all result in the same graphs
expr1 = create_expression(1)
expr2 = create_expression(2)
combined1 = expression.join(expr1, expr2)
combined2 = expr1.then(expr2)
self.assertEqual(combined1, combined2)
def test_equality_different_type(self):
expr = create_expression(1)
self.assertNotEqual(expr, "1")
| 32.897959
| 79
| 0.606413
| 2,029
| 20,956
| 6.086742
| 0.092164
| 0.025506
| 0.034008
| 0.051012
| 0.75247
| 0.737328
| 0.716761
| 0.702753
| 0.694332
| 0.676518
| 0
| 0.009312
| 0.308217
| 20,956
| 636
| 80
| 32.949686
| 0.842588
| 0.140389
| 0
| 0.611227
| 0
| 0
| 0.007453
| 0
| 0
| 0
| 0
| 0
| 0.093555
| 1
| 0.101871
| false
| 0
| 0.02079
| 0.002079
| 0.14553
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ef1760a8ff937b66d951cff29412eb32d0a1e74a
| 1,587
|
py
|
Python
|
mlxtend/mlxtend/text/tests/test_generalize_names.py
|
WhiteWolf21/fp-growth
|
01e1d853b09f244f14e66d7d0c87f139a0f67c81
|
[
"MIT"
] | null | null | null |
mlxtend/mlxtend/text/tests/test_generalize_names.py
|
WhiteWolf21/fp-growth
|
01e1d853b09f244f14e66d7d0c87f139a0f67c81
|
[
"MIT"
] | null | null | null |
mlxtend/mlxtend/text/tests/test_generalize_names.py
|
WhiteWolf21/fp-growth
|
01e1d853b09f244f14e66d7d0c87f139a0f67c81
|
[
"MIT"
] | null | null | null |
import sys
if sys.version_info < (3, 0):
from nose.plugins.skip import SkipTest
raise SkipTest
from mlxtend.text import generalize_names
def test_generalize_names():
assert(generalize_names("Samuel Eto'o") == 'etoo s')
assert(generalize_names("Eto'o, Samuel") == 'etoo s')
assert(generalize_names("Eto'o, Samuel") == 'etoo s')
assert(generalize_names('Xavi') == 'xavi')
assert(generalize_names('Yaya Toure') == 'toure y')
assert(generalize_names('Pozo, Jose Angel') == 'pozo j')
assert(generalize_names('Pozo, Jose Angel') == 'pozo j')
assert(generalize_names('Jose Angel Pozo') == 'pozo j')
assert(generalize_names('Jose Pozo') == 'pozo j')
assert(generalize_names('Pozo, Jose Angel', firstname_output_letters=2) ==
'pozo jo')
assert(generalize_names("Eto'o, Samuel", firstname_output_letters=2) ==
'etoo sa')
assert(generalize_names("Eto'o, Samuel", firstname_output_letters=0) ==
'etoo')
assert(generalize_names("Eto'o, Samuel", output_sep=', ') == 'etoo, s')
assert(generalize_names("Eto'o, Samuel", output_sep=', ') == 'etoo, s')
assert(generalize_names("van Persie, Robin", output_sep=', ') ==
'vanpersie, r')
assert(generalize_names("Robin van Persie", output_sep=', ') ==
'vanpersie, r')
assert(generalize_names("Rafael van der Vaart", output_sep=', ') ==
'vandervaart, r')
assert(generalize_names("van der Vaart, Rafael", output_sep=', ') ==
'vandervaart, r')
assert(generalize_names("Ben Hamer") == 'hamer b')
| 40.692308
| 78
| 0.643982
| 197
| 1,587
| 5.010152
| 0.263959
| 0.319149
| 0.404255
| 0.145897
| 0.66768
| 0.66768
| 0.625127
| 0.458967
| 0.419453
| 0.312057
| 0
| 0.003894
| 0.190926
| 1,587
| 38
| 79
| 41.763158
| 0.764798
| 0
| 0
| 0.3125
| 0
| 0
| 0.2615
| 0
| 0
| 0
| 0
| 0
| 0.59375
| 1
| 0.03125
| true
| 0
| 0.09375
| 0
| 0.125
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ef2e4e3510232740bf9a69046a0027a238e7ea55
| 72
|
py
|
Python
|
tests/unit/__init__.py
|
Informasjonsforvaltning/fdk-baseregistries-publisher
|
7cc657d7d1b02312b4e440503f3779bd76c364da
|
[
"Apache-2.0"
] | null | null | null |
tests/unit/__init__.py
|
Informasjonsforvaltning/fdk-baseregistries-publisher
|
7cc657d7d1b02312b4e440503f3779bd76c364da
|
[
"Apache-2.0"
] | 2
|
2021-02-22T12:58:22.000Z
|
2021-09-20T09:57:43.000Z
|
tests/unit/__init__.py
|
Informasjonsforvaltning/fdk-baseregistries-publisher
|
7cc657d7d1b02312b4e440503f3779bd76c364da
|
[
"Apache-2.0"
] | null | null | null |
"""Unit test package.
Modules:
test_fdk_baseregistries_service
"""
| 12
| 35
| 0.736111
| 8
| 72
| 6.25
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152778
| 72
| 5
| 36
| 14.4
| 0.819672
| 0.888889
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ef3e40151cff50a7a2d6460cc7b8b5551d3ac6e9
| 69
|
py
|
Python
|
tests/fixtures/tf_module/function/test_lambda.py
|
leandevops/terraform-aws-lambda
|
11205c0a90577acc5400820205160e4167c9f489
|
[
"Apache-2.0"
] | null | null | null |
tests/fixtures/tf_module/function/test_lambda.py
|
leandevops/terraform-aws-lambda
|
11205c0a90577acc5400820205160e4167c9f489
|
[
"Apache-2.0"
] | null | null | null |
tests/fixtures/tf_module/function/test_lambda.py
|
leandevops/terraform-aws-lambda
|
11205c0a90577acc5400820205160e4167c9f489
|
[
"Apache-2.0"
] | null | null | null |
def lambda_handler(event, context):
print('Lambda is running...')
| 34.5
| 35
| 0.710145
| 9
| 69
| 5.333333
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 69
| 2
| 36
| 34.5
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
ef5491b51fdb9d687a66d88a24d9868534b2d944
| 358
|
py
|
Python
|
tests/service/test_account.py
|
dyens/sdk-python
|
24bf05268af2832c70120b84fd53bf44862cffec
|
[
"Apache-2.0"
] | null | null | null |
tests/service/test_account.py
|
dyens/sdk-python
|
24bf05268af2832c70120b84fd53bf44862cffec
|
[
"Apache-2.0"
] | null | null | null |
tests/service/test_account.py
|
dyens/sdk-python
|
24bf05268af2832c70120b84fd53bf44862cffec
|
[
"Apache-2.0"
] | null | null | null |
from dynaconf import settings
class TestAccount:
"""Test Account."""
def test_account_list(self, api):
"""Test account list."""
accounts = api.Account.list().all()
assert list(accounts)
def test_account(self, account):
"""Test account list."""
assert account.account.name == settings.TEST_ACCOUNT_NAME
| 23.866667
| 65
| 0.636872
| 41
| 358
| 5.439024
| 0.390244
| 0.295964
| 0.201794
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.23743
| 358
| 14
| 66
| 25.571429
| 0.81685
| 0.142458
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 1
| 0.285714
| false
| 0
| 0.142857
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
32289a31af4f96f663a9816676cef3558e97c301
| 145
|
py
|
Python
|
shoppingcart/shop/context_processors.py
|
bsurajbh/shopping-cart
|
04588d5fe7b4afffc831f82209ec2e9949bd4ba0
|
[
"MIT"
] | null | null | null |
shoppingcart/shop/context_processors.py
|
bsurajbh/shopping-cart
|
04588d5fe7b4afffc831f82209ec2e9949bd4ba0
|
[
"MIT"
] | null | null | null |
shoppingcart/shop/context_processors.py
|
bsurajbh/shopping-cart
|
04588d5fe7b4afffc831f82209ec2e9949bd4ba0
|
[
"MIT"
] | null | null | null |
from .models import Category
def menu_links(request):
"""get menu links"""
links = Category.objects.all()
return dict(links=links)
| 18.125
| 34
| 0.682759
| 19
| 145
| 5.157895
| 0.684211
| 0.183673
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.193103
| 145
| 7
| 35
| 20.714286
| 0.837607
| 0.096552
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
328aa01f0c5dd6f4c4d7921d147b9b71a98de818
| 164
|
py
|
Python
|
ex5.py
|
ppedraum/infosatc-lp-avaliativo-02
|
c86deb42b7e9cd49b921c109f16073cede610d8b
|
[
"MIT"
] | null | null | null |
ex5.py
|
ppedraum/infosatc-lp-avaliativo-02
|
c86deb42b7e9cd49b921c109f16073cede610d8b
|
[
"MIT"
] | null | null | null |
ex5.py
|
ppedraum/infosatc-lp-avaliativo-02
|
c86deb42b7e9cd49b921c109f16073cede610d8b
|
[
"MIT"
] | null | null | null |
#5
lista = ["laranja", "banana", "maçã", "goiaba", "romã"]
if "laranja" in lista:
print("Laranja está na lista.")
else:
print("Laranja não está na lista")
| 20.5
| 55
| 0.621951
| 23
| 164
| 4.434783
| 0.608696
| 0.235294
| 0.215686
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007519
| 0.189024
| 164
| 7
| 56
| 23.428571
| 0.759399
| 0.006098
| 0
| 0
| 0
| 0
| 0.503106
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.4
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
328aa7b3931977d94952f469e93d5d539af88825
| 143
|
py
|
Python
|
examples/amac/__init__.py
|
acracker/ruia
|
b973a47270f72cc16344ac203c00ee4f6d835c04
|
[
"MIT"
] | null | null | null |
examples/amac/__init__.py
|
acracker/ruia
|
b973a47270f72cc16344ac203c00ee4f6d835c04
|
[
"MIT"
] | null | null | null |
examples/amac/__init__.py
|
acracker/ruia
|
b973a47270f72cc16344ac203c00ee4f6d835c04
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019-01-17 13:48
# @Author : pang
# @File : __init__.py.py
# @Software: PyCharm
| 20.428571
| 29
| 0.573427
| 21
| 143
| 3.714286
| 0.952381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115044
| 0.20979
| 143
| 6
| 30
| 23.833333
| 0.575221
| 0.916084
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
329957517cdb790798ce0be20d269d47dc3edda3
| 131
|
py
|
Python
|
config.py
|
dodo0822/demucs-frontend
|
3c0fc002fa3be224322be34eb65363f0c8d4001f
|
[
"MIT"
] | 1
|
2021-03-28T06:20:00.000Z
|
2021-03-28T06:20:00.000Z
|
config.py
|
dodo0822/demucs-frontend
|
3c0fc002fa3be224322be34eb65363f0c8d4001f
|
[
"MIT"
] | null | null | null |
config.py
|
dodo0822/demucs-frontend
|
3c0fc002fa3be224322be34eb65363f0c8d4001f
|
[
"MIT"
] | null | null | null |
from environs import Env
env = Env()
env.read_env()
db_host = env.str('DB_HOST', 'localhost')
db_port = env.int('DB_PORT', 27017)
| 18.714286
| 41
| 0.70229
| 23
| 131
| 3.782609
| 0.521739
| 0.206897
| 0.206897
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04386
| 0.129771
| 131
| 7
| 42
| 18.714286
| 0.719298
| 0
| 0
| 0
| 0
| 0
| 0.174242
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
329b325c4bc3a9f39b408bc94d48102bb720a0e0
| 175
|
py
|
Python
|
easyquotation_enhance/__init__.py
|
veink-y/easyquotation_enhance
|
b29fb254ac499afa27f849e6e709928031fdbfff
|
[
"MIT"
] | 5
|
2020-09-01T01:20:00.000Z
|
2020-11-29T16:50:55.000Z
|
easyquotation_enhance/__init__.py
|
yhf2lj/easyquotation_enhance
|
b29fb254ac499afa27f849e6e709928031fdbfff
|
[
"MIT"
] | null | null | null |
easyquotation_enhance/__init__.py
|
yhf2lj/easyquotation_enhance
|
b29fb254ac499afa27f849e6e709928031fdbfff
|
[
"MIT"
] | null | null | null |
from .sina import SinaQuotation
from .tencent import TencentQuotation
from .helpers import update_stock_codes, stock_a_hour
__version__ = "0.0.0.1"
__author__ = "demonfinch"
| 25
| 53
| 0.811429
| 24
| 175
| 5.416667
| 0.708333
| 0.030769
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025806
| 0.114286
| 175
| 6
| 54
| 29.166667
| 0.812903
| 0
| 0
| 0
| 0
| 0
| 0.097143
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
329eb424d7e3c0cf6483b5e242c4ecbf55dc58c4
| 2,019
|
py
|
Python
|
time_cross_validation/TimeCV.py
|
rick12000/time-series-cross-validation
|
73642ccad5efafe58760650d835884325fcfa94a
|
[
"MIT"
] | null | null | null |
time_cross_validation/TimeCV.py
|
rick12000/time-series-cross-validation
|
73642ccad5efafe58760650d835884325fcfa94a
|
[
"MIT"
] | null | null | null |
time_cross_validation/TimeCV.py
|
rick12000/time-series-cross-validation
|
73642ccad5efafe58760650d835884325fcfa94a
|
[
"MIT"
] | null | null | null |
class TimeCV:
def __init__(self, X, train_sample_size = None, test_sample_size = None, step = 1):
#initiate variables:
self.X = X
self.train_sample_size = train_sample_size
self.test_sample_size = test_sample_size
self.step = step
if train_sample_size == None:
self.train_sample_size = max(1,round(len(X)/3))
if test_sample_size == None:
self.test_sample_size = max(1, round(len(X)/10))
#error handling:
if len(X) == 0:
raise IndexError("input array 'X' cannot have length zero.")
if len(X) == 1:
raise IndexError("input array 'X' cannot have length 1.")
if train_sample_size > len(X):
raise IndexError("train_sample_size cannot be larger than length of input variable (X).")
if test_sample_size > len(X):
raise IndexError("test_sample_size cannot be larger than length of input variable (X).")
if step > len(X):
raise IndexError("step cannot be larger than length of input variable.")
def rolling_train_test_split(self):
list_of_indexes = []
for i in range(0, len(self.X) + 1 -(self.train_sample_size + self.test_sample_size), self.step):
train_index = list(range(0+i,self.train_sample_size+i))
test_index = list(range(self.train_sample_size+i,self.train_sample_size+i+self.test_sample_size))
list_of_indexes.append((train_index, test_index))
return list_of_indexes
def expanding_train_test_split(self):
list_of_indexes = []
for i in range(0, len(self.X) + 1 -(self.train_sample_size + self.test_sample_size), self.step):
train_index = list(range(0,self.train_sample_size+i))
test_index = list(range(self.train_sample_size+i,self.train_sample_size+i+self.test_sample_size))
list_of_indexes.append((train_index, test_index))
return list_of_indexes
| 42.0625
| 109
| 0.634968
| 288
| 2,019
| 4.166667
| 0.170139
| 0.216667
| 0.1875
| 0.158333
| 0.7725
| 0.754167
| 0.705
| 0.639167
| 0.536667
| 0.536667
| 0
| 0.010115
| 0.265478
| 2,019
| 48
| 110
| 42.0625
| 0.799056
| 0.01684
| 0
| 0.294118
| 0
| 0
| 0.134073
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.088235
| false
| 0
| 0
| 0
| 0.176471
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
32b39b0725e1e0e115d097c18b63af2b780c0ccd
| 333
|
py
|
Python
|
project/asylum/management/commands/generate_all.py
|
jssmk/asylum
|
004b05939784b86ba559968a7cdcedf248edb01f
|
[
"MIT"
] | 1
|
2017-04-08T21:31:37.000Z
|
2017-04-08T21:31:37.000Z
|
project/asylum/management/commands/generate_all.py
|
jssmk/asylum
|
004b05939784b86ba559968a7cdcedf248edb01f
|
[
"MIT"
] | 9
|
2016-01-23T22:40:26.000Z
|
2021-09-13T17:44:11.000Z
|
project/asylum/management/commands/generate_all.py
|
jssmk/asylum
|
004b05939784b86ba559968a7cdcedf248edb01f
|
[
"MIT"
] | 1
|
2017-04-08T22:13:42.000Z
|
2017-04-08T22:13:42.000Z
|
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from asylum.tests.fixtures.full import generate_all
class Command(BaseCommand):
help = 'Generates full set of test data'
def add_arguments(self, parser):
pass
def handle(self, *args, **options):
generate_all()
| 22.2
| 65
| 0.693694
| 42
| 333
| 5.428571
| 0.809524
| 0.096491
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003745
| 0.198198
| 333
| 14
| 66
| 23.785714
| 0.850187
| 0.063063
| 0
| 0
| 1
| 0
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.125
| 0.25
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
086d20e93e7b3c774dd91a100069d0d4bedb8240
| 96
|
py
|
Python
|
auth_custom/apps.py
|
u-transnet/utransnet-gateway
|
bea4e99d2d5f404a5456adc453d0a73e7b19332c
|
[
"MIT"
] | null | null | null |
auth_custom/apps.py
|
u-transnet/utransnet-gateway
|
bea4e99d2d5f404a5456adc453d0a73e7b19332c
|
[
"MIT"
] | null | null | null |
auth_custom/apps.py
|
u-transnet/utransnet-gateway
|
bea4e99d2d5f404a5456adc453d0a73e7b19332c
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class AuthCustomConfig(AppConfig):
name = 'auth_custom'
| 16
| 34
| 0.770833
| 11
| 96
| 6.636364
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 96
| 5
| 35
| 19.2
| 0.901235
| 0
| 0
| 0
| 0
| 0
| 0.114583
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
086ef174070f9c852dcd7b90915967e79c0183f2
| 5,534
|
py
|
Python
|
lib/python3.7/site-packages/ravencoin/core/__init__.py
|
RavenGraph/api
|
ddaeffbe0d2082350b6064e7eaf8a674ddc8990f
|
[
"MIT"
] | null | null | null |
lib/python3.7/site-packages/ravencoin/core/__init__.py
|
RavenGraph/api
|
ddaeffbe0d2082350b6064e7eaf8a674ddc8990f
|
[
"MIT"
] | 5
|
2021-03-09T21:52:05.000Z
|
2022-02-26T19:36:27.000Z
|
lib/python3.7/site-packages/ravencoin/core/__init__.py
|
RavenGraph/api
|
ddaeffbe0d2082350b6064e7eaf8a674ddc8990f
|
[
"MIT"
] | null | null | null |
# Copyright (C) 2018 The python-ravencoinlib developers
#
# This file is part of python-ravencoinlib.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-ravencoinlib, including this file, may be copied, modified,
# propagated, or distributed except according to the terms contained in the
# LICENSE file.
import sys
import bitcoin.core
from bitcoin.core import *
from bitcoin.core.script import OP_RETURN
if sys.version > '3':
_bytes = bytes
else:
_bytes = lambda x: bytes(bytearray(x))
# Core definitions
COIN = 100000000
MAX_BLOCK_SIZE = 2000000 # after assets deployed
MAX_BLOCK_WEIGHT = 8000000
MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50 # 25?
WITNESS_COINBASE_SCRIPTPUBKEY_MAGIC = _bytes([OP_RETURN, 0x24, 0xaa, 0x21, 0xa9, 0xed])
class CoreMainParams(bitcoin.core.CoreChainParams):
MAX_MONEY = 21000000000 * COIN
NAME = 'mainnet'
GENESIS_BLOCK = CBlock.deserialize(x('04000000000000000000000000000000000000000000000000000000000000000000000016355fae8b6a26f2fa708d39997654c44b501f308d802325359a7367a800ff28c60e4d5affff001ee0d47d010101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff570004ffff001d01044c4d5468652054696d65732030332f4a616e2f3230313820426974636f696e206973206e616d65206f66207468652067616d6520666f72206e65772067656e65726174696f6e206f66206669726d73ffffffff010088526a74000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000'))
SUBSIDY_HALVING_INTERVAL = 2100000
PROOF_OF_WORK_LIMIT = 2**256-1 >> 20
# Burn Amounts
nIssueAssetBurnAmount = 500 * COIN
nReissueAssetBurnAmount = 100 * COIN
nIssueSubAssetBurnAmount = 100 * COIN
nIssueUniqueAssetBurnAmount = 5 * COIN
# Burn Addresses
strIssueAssetBurnAddress = "RXissueAssetXXXXXXXXXXXXXXXXXhhZGt"
strReissueAssetBurnAddress = "RXReissueAssetXXXXXXXXXXXXXXVEFAWu"
strIssueSubAssetBurnAddress = "RXissueSubAssetXXXXXXXXXXXXXWcwhwL"
strIssueUniqueAssetBurnAddress = "RXissueUniqueAssetXXXXXXXXXXWEAe58"
# Global Burn Address
strGlobalBurnAddress = "RXBurnXXXXXXXXXXXXXXXXXXXXXXWUo9FV"
class CoreTestNetParams(bitcoin.core.CoreMainParams):
MAX_MONEY = 21000000000 * COIN
NAME = 'testnet'
GENESIS_BLOCK = CBlock.deserialize(x('02000000000000000000000000000000000000000000000000000000000000000000000016355fae8b6a26f2fa708d39997654c44b501f308d802325359a7367a800ff2820e0a35bffff001e8847ee000101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff570004ffff001d01044c4d5468652054696d65732030332f4a616e2f3230313820426974636f696e206973206e616d65206f66207468652067616d6520666f72206e65772067656e65726174696f6e206f66206669726d73ffffffff010088526a74000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000'))
SUBSIDY_HALVING_INTERVAL = 2100000
PROOF_OF_WORK_LIMIT = 2**256-1 >> 20
# Burn Amounts
nIssueAssetBurnAmount = 500 * COIN;
nReissueAssetBurnAmount = 100 * COIN;
nIssueSubAssetBurnAmount = 100 * COIN;
nIssueUniqueAssetBurnAmount = 5 * COIN;
# Burn Addresses
strIssueAssetBurnAddress = "n1issueAssetXXXXXXXXXXXXXXXXWdnemQ"
strReissueAssetBurnAddress = "n1ReissueAssetXXXXXXXXXXXXXXWG9NLd"
strIssueSubAssetBurnAddress = "n1issueSubAssetXXXXXXXXXXXXXbNiH6v"
strIssueUniqueAssetBurnAddress = "n1issueUniqueAssetXXXXXXXXXXS4695i"
# Global Burn Address
strGlobalBurnAddress = "n1BurnXXXXXXXXXXXXXXXXXXXXXXU1qejP"
class CoreRegTestParams(bitcoin.core.CoreTestNetParams):
MAX_MONEY = 21000000000 * COIN
NAME = 'regtest'
GENESIS_BLOCK = CBlock.deserialize(x('04000000000000000000000000000000000000000000000000000000000000000000000016355fae8b6a26f2fa708d39997654c44b501f308d802325359a7367a800ff28a621d95affff7f20010000000101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff570004ffff001d01044c4d5468652054696d65732030332f4a616e2f3230313820426974636f696e206973206e616d65206f66207468652067616d6520666f72206e65772067656e65726174696f6e206f66206669726d73ffffffff010088526a74000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000'))
SUBSIDY_HALVING_INTERVAL = 150
PROOF_OF_WORK_LIMIT = 2**256-1 >> 1
# Burn Amounts
nIssueAssetBurnAmount = 500 * COIN;
nReissueAssetBurnAmount = 100 * COIN;
nIssueSubAssetBurnAmount = 100 * COIN;
nIssueUniqueAssetBurnAmount = 5 * COIN;
# Burn Addresses
strIssueAssetBurnAddress = "n1issueAssetXXXXXXXXXXXXXXXXWdnemQ"
strReissueAssetBurnAddress = "n1ReissueAssetXXXXXXXXXXXXXXWG9NLd"
strIssueSubAssetBurnAddress = "n1issueSubAssetXXXXXXXXXXXXXbNiH6v"
strIssueUniqueAssetBurnAddress = "n1issueUniqueAssetXXXXXXXXXXS4695i"
# Global Burn Address
strGlobalBurnAddress = "n1BurnXXXXXXXXXXXXXXXXXXXXXXU1qejP"
# monkey patching
bitcoin.core.COIN = COIN
bitcoin.core.MAX_BLOCK_SIZE = MAX_BLOCK_SIZE
bitcoin.core.MAX_BLOCK_WEIGHT = MAX_BLOCK_WEIGHT
bitcoin.core.MAX_BLOCK_SIGOPS = MAX_BLOCK_SIGOPS
bitcoin.core.WITNESS_COINBASE_SCRIPTPUBKEY_MAGIC = WITNESS_COINBASE_SCRIPTPUBKEY_MAGIC
bitcoin.core.CoreMainParams = CoreMainParams
bitcoin.core.CoreTestNetParams = CoreTestNetParams
bitcoin.core.CoreRegTestParams = CoreRegTestParams
def GetParams():
return bitcoin.core.coreparams
| 49.855856
| 635
| 0.848753
| 355
| 5,534
| 13.076056
| 0.383099
| 0.035545
| 0.01034
| 0.020681
| 0.307411
| 0.261094
| 0.261094
| 0.25657
| 0.25657
| 0.25657
| 0
| 0.319054
| 0.10571
| 5,534
| 110
| 636
| 50.309091
| 0.618913
| 0.103722
| 0
| 0.367647
| 0
| 0
| 0.46637
| 0.461912
| 0
| 0
| 0.004052
| 0
| 0
| 1
| 0.014706
| false
| 0
| 0.058824
| 0.014706
| 0.75
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
08702e9cccbc1de9d82b648712c1a2c43453d3ae
| 171
|
py
|
Python
|
lib/conda.py
|
rdmolony/scaffold
|
91019ffff3ac617ff73fcfbb57a36561d8fc1b96
|
[
"Apache-2.0"
] | null | null | null |
lib/conda.py
|
rdmolony/scaffold
|
91019ffff3ac617ff73fcfbb57a36561d8fc1b96
|
[
"Apache-2.0"
] | null | null | null |
lib/conda.py
|
rdmolony/scaffold
|
91019ffff3ac617ff73fcfbb57a36561d8fc1b96
|
[
"Apache-2.0"
] | null | null | null |
def run_in_env(c, command, env):
commands = ['eval "$(conda shell.bash hook)"', f'conda activate {env}']
commands.append(command)
c.run(' && '.join(commands))
| 34.2
| 75
| 0.631579
| 24
| 171
| 4.416667
| 0.666667
| 0.207547
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.169591
| 171
| 4
| 76
| 42.75
| 0.746479
| 0
| 0
| 0
| 0
| 0
| 0.321637
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
08946f2eaa6ffb971e830600721812a52066f12e
| 96
|
py
|
Python
|
exts/__init__.py
|
rawmeat898/Quote-Finder
|
9bc45e9bed820481817e8f7b237dde3fe4dda95e
|
[
"MIT"
] | null | null | null |
exts/__init__.py
|
rawmeat898/Quote-Finder
|
9bc45e9bed820481817e8f7b237dde3fe4dda95e
|
[
"MIT"
] | null | null | null |
exts/__init__.py
|
rawmeat898/Quote-Finder
|
9bc45e9bed820481817e8f7b237dde3fe4dda95e
|
[
"MIT"
] | null | null | null |
from configparser import ConfigParser
config = ConfigParser()
config.read('data/channels.ini')
| 19.2
| 37
| 0.802083
| 11
| 96
| 7
| 0.727273
| 0.467532
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 96
| 4
| 38
| 24
| 0.885057
| 0
| 0
| 0
| 0
| 0
| 0.177083
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0894787e219a32580d7c51a42f73841708b70dba
| 392
|
py
|
Python
|
acf_example/httpbin_client/actions/request_inspection.py
|
Jamim/acf
|
af7ebd9af7c4cd8bf977ddcb51f297107ba3fcbc
|
[
"MIT"
] | 5
|
2018-11-15T13:35:53.000Z
|
2022-02-23T06:43:13.000Z
|
acf_example/httpbin_client/actions/request_inspection.py
|
Jamim/acf
|
af7ebd9af7c4cd8bf977ddcb51f297107ba3fcbc
|
[
"MIT"
] | 4
|
2018-12-15T23:56:35.000Z
|
2018-12-19T05:48:42.000Z
|
acf_example/httpbin_client/actions/request_inspection.py
|
Jamim/acf
|
af7ebd9af7c4cd8bf977ddcb51f297107ba3fcbc
|
[
"MIT"
] | 4
|
2018-11-15T13:36:02.000Z
|
2022-02-23T06:43:14.000Z
|
from .base import HttpbinAction
class GetHeadersAction(HttpbinAction):
METHOD = 'GET'
URL_COMPONENTS = ['headers']
RESULT_KEY = 'headers'
class GetIPAction(HttpbinAction):
METHOD = 'GET'
URL_COMPONENTS = ['ip']
RESULT_KEY = 'origin'
class GetUserAgentAction(HttpbinAction):
METHOD = 'GET'
URL_COMPONENTS = ['user-agent']
RESULT_KEY = 'user-agent'
| 17.043478
| 40
| 0.67602
| 39
| 392
| 6.641026
| 0.487179
| 0.220077
| 0.254826
| 0.289575
| 0.405405
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.209184
| 392
| 22
| 41
| 17.818182
| 0.835484
| 0
| 0
| 0.230769
| 0
| 0
| 0.130102
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.076923
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
08a3ea23cc93ef0e791ac8d233b66338ade67e77
| 119
|
py
|
Python
|
Zad_Decorator/Potwierdzenie.py
|
Paarzivall/Wzorce-Projektowe
|
aa4136f140ad02c0fc0de45709b5a01ca42b417f
|
[
"MIT"
] | null | null | null |
Zad_Decorator/Potwierdzenie.py
|
Paarzivall/Wzorce-Projektowe
|
aa4136f140ad02c0fc0de45709b5a01ca42b417f
|
[
"MIT"
] | null | null | null |
Zad_Decorator/Potwierdzenie.py
|
Paarzivall/Wzorce-Projektowe
|
aa4136f140ad02c0fc0de45709b5a01ca42b417f
|
[
"MIT"
] | null | null | null |
from Komponent import Komponent
class Potwierdzenie(Komponent):
def drukuj(self):
print("POTWIERDZENIE")
| 17
| 31
| 0.722689
| 12
| 119
| 7.166667
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.193277
| 119
| 6
| 32
| 19.833333
| 0.895833
| 0
| 0
| 0
| 0
| 0
| 0.109244
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
08c9bf75dc4471a12278972a62bc1fd72fff065e
| 2,717
|
py
|
Python
|
vtk/styles.py
|
voltverse/vtk
|
e5b87e674943fab91a4ba0d3e152e70070abddef
|
[
"MIT"
] | null | null | null |
vtk/styles.py
|
voltverse/vtk
|
e5b87e674943fab91a4ba0d3e152e70070abddef
|
[
"MIT"
] | null | null | null |
vtk/styles.py
|
voltverse/vtk
|
e5b87e674943fab91a4ba0d3e152e70070abddef
|
[
"MIT"
] | null | null | null |
import vtk.term as term
class Style:
def __init__(self):
self.code = 0
def _render(self):
return "{}[{}m".format(term.ESCAPE_CHARACTER, self.code)
class Style_Reset(Style):
def __init__(self):
super()
self.code = 0
class Style_Bold(Style):
def __init__(self):
super()
self.code = 1
class Style_Faint(Style):
def __init__(self):
super()
self.code = 2
class Style_Italic(Style):
def __init__(self):
super()
self.code = 3
class Style_Underline(Style):
def __init__(self):
super()
self.code = 4
class Style_Invert(Style):
def __init__(self):
super()
self.code = 7
class Style_Strikethrough(Style):
def __init__(self):
super()
self.code = 9
class Colour(Style):
def __init__(self):
super()
def _render(self, isForeground = True):
if isForeground:
return "{}[{}m".format(term.ESCAPE_CHARACTER, self.code)
else:
return "{}[{}m".format(term.ESCAPE_CHARACTER, self.code + 10)
class Colour_Transparent(Colour):
def _render(self, isForeground = True):
return ""
class Colour_Black(Colour):
def __init__(self):
super()
self.code = 30
class Colour_DarkRed(Colour):
def __init__(self):
super()
self.code = 31
class Colour_DarkGreen(Colour):
def __init__(self):
super()
self.code = 32
class Colour_DarkYellow(Colour):
def __init__(self):
super()
self.code = 33
class Colour_DarkBlue(Colour):
def __init__(self):
super()
self.code = 34
class Colour_DarkMagenta(Colour):
def __init__(self):
super()
self.code = 35
class Colour_DarkCyan(Colour):
def __init__(self):
super()
self.code = 36
class Colour_Grey(Colour):
def __init__(self):
super()
self.code = 37
class Colour_DarkGrey(Colour):
def __init__(self):
super()
self.code = 90
class Colour_Red(Colour):
def __init__(self):
super()
self.code = 91
class Colour_Green(Colour):
def __init__(self):
super()
self.code = 92
class Colour_Yellow(Colour):
def __init__(self):
super()
self.code = 93
class Colour_Blue(Colour):
def __init__(self):
super()
self.code = 94
class Colour_Magenta(Colour):
def __init__(self):
super()
self.code = 95
class Colour_Cyan(Colour):
def __init__(self):
super()
self.code = 96
class Colour_White(Colour):
def __init__(self):
super()
self.code = 97
| 16.98125
| 73
| 0.580052
| 319
| 2,717
| 4.532915
| 0.219436
| 0.149378
| 0.19018
| 0.26556
| 0.609959
| 0.555325
| 0.555325
| 0.082988
| 0
| 0
| 0
| 0.022329
| 0.307692
| 2,717
| 160
| 74
| 16.98125
| 0.746411
| 0
| 0
| 0.504587
| 0
| 0
| 0.006623
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.256881
| false
| 0
| 0.009174
| 0.018349
| 0.541284
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
08e68017949add7840c25f87c7ecf7eaf5111e35
| 60
|
py
|
Python
|
hello.py
|
jas5mg/cs3240-labdemo
|
03ecdb5d013d1fd17d15b486473b8d8538bcec22
|
[
"MIT"
] | null | null | null |
hello.py
|
jas5mg/cs3240-labdemo
|
03ecdb5d013d1fd17d15b486473b8d8538bcec22
|
[
"MIT"
] | null | null | null |
hello.py
|
jas5mg/cs3240-labdemo
|
03ecdb5d013d1fd17d15b486473b8d8538bcec22
|
[
"MIT"
] | null | null | null |
from helper import greeting
greeting("What's Up", "Jake")
| 12
| 29
| 0.716667
| 9
| 60
| 4.777778
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 60
| 4
| 30
| 15
| 0.843137
| 0
| 0
| 0
| 0
| 0
| 0.220339
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
08ed233cdc5f297048f1196b00fb43afd1ad0812
| 178
|
py
|
Python
|
dashmat/custom/reviews/main.py
|
realestate-com-au/python-dashing-deploy
|
1785ed84d1cd844426c10648ab13fc6042086836
|
[
"MIT"
] | null | null | null |
dashmat/custom/reviews/main.py
|
realestate-com-au/python-dashing-deploy
|
1785ed84d1cd844426c10648ab13fc6042086836
|
[
"MIT"
] | null | null | null |
dashmat/custom/reviews/main.py
|
realestate-com-au/python-dashing-deploy
|
1785ed84d1cd844426c10648ab13fc6042086836
|
[
"MIT"
] | null | null | null |
from dashmat.core_modules.base import Module
class Reviews(Module):
@classmethod
def dependencies(kls):
yield "dashmat.core_modules.components.main:Components"
| 22.25
| 63
| 0.752809
| 21
| 178
| 6.285714
| 0.761905
| 0.166667
| 0.272727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162921
| 178
| 7
| 64
| 25.428571
| 0.885906
| 0
| 0
| 0
| 0
| 0
| 0.265537
| 0.265537
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
08f6bc6d578c9049589290473963ceb4e31153d3
| 21
|
py
|
Python
|
covid_api/core/__init__.py
|
NASA-IMPACT/covid-api
|
62fa23918861438090367a85c1dca5300871b9c7
|
[
"MIT"
] | 14
|
2020-05-27T14:22:37.000Z
|
2022-03-31T04:44:25.000Z
|
covid_api/core/__init__.py
|
NASA-IMPACT/covid-api
|
62fa23918861438090367a85c1dca5300871b9c7
|
[
"MIT"
] | 47
|
2020-05-27T02:43:08.000Z
|
2021-11-30T17:50:45.000Z
|
covid_api/core/__init__.py
|
NASA-IMPACT/covid-api
|
62fa23918861438090367a85c1dca5300871b9c7
|
[
"MIT"
] | 3
|
2021-05-29T14:15:28.000Z
|
2021-07-01T01:20:09.000Z
|
"""covid_api.core"""
| 10.5
| 20
| 0.619048
| 3
| 21
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047619
| 21
| 1
| 21
| 21
| 0.6
| 0.666667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
08f7b1cae907157f6a9ce6050459172ec17acbd9
| 147
|
py
|
Python
|
src/os_aio_pod/main.py
|
zanachka/os-aio-pod
|
67d59a70eebcb1aa8acaa1e3319ecdf9f301941a
|
[
"MIT"
] | 4
|
2019-03-11T08:59:19.000Z
|
2019-05-10T12:21:34.000Z
|
src/os_aio_pod/main.py
|
zanachka/os-aio-pod
|
67d59a70eebcb1aa8acaa1e3319ecdf9f301941a
|
[
"MIT"
] | 7
|
2019-03-11T09:17:19.000Z
|
2020-09-11T04:00:21.000Z
|
src/os_aio_pod/main.py
|
zanachka/os-aio-pod
|
67d59a70eebcb1aa8acaa1e3319ecdf9f301941a
|
[
"MIT"
] | 4
|
2019-03-11T08:59:30.000Z
|
2020-12-06T10:38:08.000Z
|
from os_aio_pod.cmdline import execute
def main():
command_packages = ["os_aio_pod.commands"]
execute(command_packages=command_packages)
| 21
| 46
| 0.77551
| 20
| 147
| 5.35
| 0.6
| 0.420561
| 0.149533
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136054
| 147
| 6
| 47
| 24.5
| 0.84252
| 0
| 0
| 0
| 0
| 0
| 0.129252
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3ecb808607c1021d9b86961a01076de5fe8e93ce
| 54
|
py
|
Python
|
pybetter/item.py
|
cjwcommuny/pybetter
|
1c9d270d6128b05b429d790ef493096ad0a586ff
|
[
"MIT"
] | null | null | null |
pybetter/item.py
|
cjwcommuny/pybetter
|
1c9d270d6128b05b429d790ef493096ad0a586ff
|
[
"MIT"
] | null | null | null |
pybetter/item.py
|
cjwcommuny/pybetter
|
1c9d270d6128b05b429d790ef493096ad0a586ff
|
[
"MIT"
] | null | null | null |
def item(x):
assert len(x) == 1
return x[0]
| 9
| 22
| 0.5
| 10
| 54
| 2.7
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 0.333333
| 54
| 5
| 23
| 10.8
| 0.694444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
3ee712860bdf455e7c6d2aee451fe17a39735e7d
| 153
|
py
|
Python
|
src/service/start.py
|
Ellie-Yen/-Python-Tic-Tac-Toe-Game
|
4959c1452ec184db9e71e42cd4af22cbf5731a50
|
[
"BSD-2-Clause"
] | null | null | null |
src/service/start.py
|
Ellie-Yen/-Python-Tic-Tac-Toe-Game
|
4959c1452ec184db9e71e42cd4af22cbf5731a50
|
[
"BSD-2-Clause"
] | null | null | null |
src/service/start.py
|
Ellie-Yen/-Python-Tic-Tac-Toe-Game
|
4959c1452ec184db9e71e42cd4af22cbf5731a50
|
[
"BSD-2-Clause"
] | null | null | null |
from ..gameModel import GameModel
from ..appLib.messageFormatters import msgWelcome
async def start(cls: GameModel) -> None:
return msgWelcome()
| 30.6
| 50
| 0.75817
| 17
| 153
| 6.823529
| 0.705882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.156863
| 153
| 5
| 51
| 30.6
| 0.899225
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f5d2b13ef6a80e05866f1f78258c9c8a4077750d
| 171
|
py
|
Python
|
dev/tools/docs/run_doctests.py
|
awillats/brian2
|
e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc
|
[
"BSD-2-Clause"
] | 674
|
2015-01-14T11:05:39.000Z
|
2022-03-29T04:53:50.000Z
|
dev/tools/docs/run_doctests.py
|
awillats/brian2
|
e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc
|
[
"BSD-2-Clause"
] | 937
|
2015-01-05T13:24:22.000Z
|
2022-03-25T13:10:13.000Z
|
dev/tools/docs/run_doctests.py
|
awillats/brian2
|
e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc
|
[
"BSD-2-Clause"
] | 237
|
2015-01-05T13:54:16.000Z
|
2022-03-15T22:16:32.000Z
|
import os
import sphinx
os.chdir('../../../docs_sphinx')
sphinx.main(['sphinx-build', '-b', 'doctest', '.', '../docs', '-D',
'exclude_patterns=reference'])
| 21.375
| 67
| 0.567251
| 19
| 171
| 5
| 0.684211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 171
| 7
| 68
| 24.428571
| 0.659722
| 0
| 0
| 0
| 0
| 0
| 0.450292
| 0.152047
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f5dc99f48f09071e73843d9f0076391d3b35f09d
| 183
|
py
|
Python
|
fHDHR/originwrapper/origin_channels_standin.py
|
deathbybandaid/fHDHR_NewsOn
|
06d205a3ca677b88fa93b9b7503465aed1838c6b
|
[
"WTFPL"
] | 2
|
2021-11-21T18:45:35.000Z
|
2022-01-11T16:11:48.000Z
|
fHDHR/originwrapper/origin_channels_standin.py
|
deathbybandaid/fHDHR_NewsOn
|
06d205a3ca677b88fa93b9b7503465aed1838c6b
|
[
"WTFPL"
] | null | null | null |
fHDHR/originwrapper/origin_channels_standin.py
|
deathbybandaid/fHDHR_NewsOn
|
06d205a3ca677b88fa93b9b7503465aed1838c6b
|
[
"WTFPL"
] | null | null | null |
class OriginChannels_StandIN():
def __init__(self):
pass
def get_channels(self):
return []
def get_channel_stream(self, chandict):
return None
| 15.25
| 43
| 0.622951
| 20
| 183
| 5.3
| 0.7
| 0.113208
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.295082
| 183
| 11
| 44
| 16.636364
| 0.821705
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| false
| 0.142857
| 0
| 0.285714
| 0.857143
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
|
0
| 4
|
eb34c30d1856620fc4a80cf3f0a8b2e3fbedc3cc
| 114
|
py
|
Python
|
OpenGLCffi/GL/EXT/SGIX/reference_plane.py
|
cydenix/OpenGLCffi
|
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
|
[
"MIT"
] | null | null | null |
OpenGLCffi/GL/EXT/SGIX/reference_plane.py
|
cydenix/OpenGLCffi
|
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
|
[
"MIT"
] | null | null | null |
OpenGLCffi/GL/EXT/SGIX/reference_plane.py
|
cydenix/OpenGLCffi
|
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
|
[
"MIT"
] | null | null | null |
from OpenGLCffi.GL import params
@params(api='gl', prms=['equation'])
def glReferencePlaneSGIX(equation):
pass
| 16.285714
| 36
| 0.754386
| 14
| 114
| 6.142857
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 114
| 6
| 37
| 19
| 0.843137
| 0
| 0
| 0
| 0
| 0
| 0.089286
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
de575f05da7cf070f9c888bd42b070eef2f01a2d
| 197
|
py
|
Python
|
pertemuan_8/7_HTTP_API_With_Sensor/app/forms/_action.py
|
Muhammad-Yunus/Flask-Web-Development
|
c13e3fda30151b1155242abe4532d5f4d7bc120e
|
[
"Apache-2.0"
] | null | null | null |
pertemuan_8/7_HTTP_API_With_Sensor/app/forms/_action.py
|
Muhammad-Yunus/Flask-Web-Development
|
c13e3fda30151b1155242abe4532d5f4d7bc120e
|
[
"Apache-2.0"
] | null | null | null |
pertemuan_8/7_HTTP_API_With_Sensor/app/forms/_action.py
|
Muhammad-Yunus/Flask-Web-Development
|
c13e3fda30151b1155242abe4532d5f4d7bc120e
|
[
"Apache-2.0"
] | null | null | null |
from . import FlaskForm
from . import SubmitField
class ActionTable(FlaskForm):
activate = SubmitField('Activate')
deactivate = SubmitField('Deactivate')
delete = SubmitField('Delete')
| 28.142857
| 42
| 0.741117
| 18
| 197
| 8.111111
| 0.5
| 0.136986
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15736
| 197
| 7
| 43
| 28.142857
| 0.879518
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
de86975e5186d1c97eb9ce15524619e9eaa05e5c
| 85
|
py
|
Python
|
mithril/__init__.py
|
martimdev/mithril
|
9b8388b1f297ae4b92a436897aa539320fbc3bf7
|
[
"MIT"
] | 2
|
2018-12-21T23:08:32.000Z
|
2018-12-22T23:39:01.000Z
|
mithril/__init__.py
|
martimdev/mithril
|
9b8388b1f297ae4b92a436897aa539320fbc3bf7
|
[
"MIT"
] | null | null | null |
mithril/__init__.py
|
martimdev/mithril
|
9b8388b1f297ae4b92a436897aa539320fbc3bf7
|
[
"MIT"
] | 1
|
2018-12-21T22:46:20.000Z
|
2018-12-21T22:46:20.000Z
|
from .application import Application
from .scene import Scene
from .node import Node
| 21.25
| 36
| 0.823529
| 12
| 85
| 5.833333
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141176
| 85
| 3
| 37
| 28.333333
| 0.958904
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
de8ffe82e39e6be871f8c48da4d06e782c3f98fd
| 219
|
py
|
Python
|
UnityEngine/FFTWindow/__init__.py
|
Grim-es/udon-pie-auto-completion
|
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
|
[
"MIT"
] | null | null | null |
UnityEngine/FFTWindow/__init__.py
|
Grim-es/udon-pie-auto-completion
|
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
|
[
"MIT"
] | null | null | null |
UnityEngine/FFTWindow/__init__.py
|
Grim-es/udon-pie-auto-completion
|
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
|
[
"MIT"
] | null | null | null |
from UdonPie import UnityEngine
from UdonPie.Undefined import *
class FFTWindow:
def __new__(cls, arg1=None):
'''
:returns: FFTWindow
:rtype: UnityEngine.FFTWindow
'''
pass
| 18.25
| 37
| 0.611872
| 21
| 219
| 6.190476
| 0.714286
| 0.169231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006536
| 0.30137
| 219
| 11
| 38
| 19.909091
| 0.843137
| 0.223744
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
de9b8cd5bafe9998439c0e40ef95e1885e63094d
| 204
|
py
|
Python
|
signal_interpreter_server/exceptions.py
|
PONSASIKALA/signal-interpreter-server
|
2a0fad375768e0dca99b8e8cb4ef19e863d99007
|
[
"MIT"
] | null | null | null |
signal_interpreter_server/exceptions.py
|
PONSASIKALA/signal-interpreter-server
|
2a0fad375768e0dca99b8e8cb4ef19e863d99007
|
[
"MIT"
] | null | null | null |
signal_interpreter_server/exceptions.py
|
PONSASIKALA/signal-interpreter-server
|
2a0fad375768e0dca99b8e8cb4ef19e863d99007
|
[
"MIT"
] | null | null | null |
""" Exceptions """
# pylint: disable=missing-function-docstring
class JsonParserError(Exception):
""" JSON Parser Error"""
class XmlParserError(Exception):
""" XML Parser Error"""
| 20.4
| 45
| 0.651961
| 18
| 204
| 7.388889
| 0.777778
| 0.165414
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.205882
| 204
| 9
| 46
| 22.666667
| 0.820988
| 0.441176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
dea36e7ef6302189f050dbe14b7a7c78ed433c5e
| 1,795
|
py
|
Python
|
hash/hash_shake_test.py
|
gorgeousbubble/Nightmare
|
b374b48877898b6193081b7a8a6d2fb571816c75
|
[
"Apache-2.0"
] | 1
|
2019-10-24T15:47:18.000Z
|
2019-10-24T15:47:18.000Z
|
hash/hash_shake_test.py
|
gorgeousbubble/Nightmare
|
b374b48877898b6193081b7a8a6d2fb571816c75
|
[
"Apache-2.0"
] | null | null | null |
hash/hash_shake_test.py
|
gorgeousbubble/Nightmare
|
b374b48877898b6193081b7a8a6d2fb571816c75
|
[
"Apache-2.0"
] | 3
|
2019-10-24T15:47:25.000Z
|
2020-11-01T01:26:41.000Z
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
from .hash_shake import hash_shake128_encode, hash_shake128_check, hash_shake256_encode, hash_shake256_check
class TestHashShake(unittest.TestCase):
def test_hash_shake128_encode(self):
s = 'hello,world!'
r = hash_shake128_encode(s)
print('hash shake128 encode:', r)
def test_hash_shake128_check(self):
s = 'hello,world!'
r = '12eaea2f1de368092b5418c6c5c8575a9a3490fd8d3c85a7fac818ccba01ea5d4526c2e6055b77b2b02a9b3b19f4b316dfc' \
'2c667dc18eda5522148e2949df7a3b6a25f37c9935e784077985dc95930d210b9aae7fb6a1f0491d1077177db27bdce8ce0' \
'3b5d5e7079abf4f30dd9aef53e518d4909e5421f8275ecb075e4de7543'
self.assertTrue(hash_shake128_check(s, r))
print('hash shake128 check pass')
def test_hash_shake256_encode(self):
s = 'hello,world!'
r = hash_shake256_encode(s)
print('hash shake256 encode:', r)
def test_hash_shake256_check(self):
s = 'hello,world!'
r = 'de9c5223df66f54d8ec0a07d36c5aa8ffbb9ed62b40050e476690cd99f41c23fbae714a5167bc48198d332d3c8c09beb4a8' \
'b95fb37397d56f859b4242671b34536f76f84bc79cebed2cdb1b6458f2930d1d75920ff4121382525108d717cc7e4d158e3' \
'5c0b558050bc28693edeceac8ca2041b469d4ac888b873b4363c4c816e03c36ad3e31ef88e5b3a618ad3aa7efe8c899687f' \
'cbf5b7ef2985d62bf0779a1ef657ce43fd8ddaca4fb35aa9d45bd7242ecb272bf8b4bfd491fc61604eff58a5ecebb11c3be' \
'c4a880f16be65544a6d2784124a2681cb1a9254f1c6495b984419db4caad8de452f95c1132b42d43819e1aaa45fb40e12e2' \
'9a438205fdf018bc7'
self.assertTrue(hash_shake256_check(s, r))
print('hash shake256 check pass')
if __name__ == '__main__':
unittest.main()
| 44.875
| 115
| 0.755432
| 125
| 1,795
| 10.552
| 0.328
| 0.072782
| 0.054587
| 0.045489
| 0.12282
| 0.071266
| 0.039424
| 0
| 0
| 0
| 0
| 0.348618
| 0.173816
| 1,795
| 39
| 116
| 46.025641
| 0.540796
| 0.023955
| 0
| 0.133333
| 0
| 0
| 0.522286
| 0.429143
| 0
| 0
| 0
| 0
| 0.066667
| 1
| 0.133333
| false
| 0.066667
| 0.066667
| 0
| 0.233333
| 0.133333
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
deae0e5206c60e4d955677feb401594257c9b9a3
| 114
|
py
|
Python
|
ProgramacaoProcedural/Modulos.py
|
DjCod3r/PythonScripts
|
95e70ebb81d2bc37b0283daff8ee723c5d2a382c
|
[
"MIT"
] | null | null | null |
ProgramacaoProcedural/Modulos.py
|
DjCod3r/PythonScripts
|
95e70ebb81d2bc37b0283daff8ee723c5d2a382c
|
[
"MIT"
] | null | null | null |
ProgramacaoProcedural/Modulos.py
|
DjCod3r/PythonScripts
|
95e70ebb81d2bc37b0283daff8ee723c5d2a382c
|
[
"MIT"
] | null | null | null |
import sys
import random
print(sys.path)
print(sys.platform)
for i in range(10):
print(random.randint(1,10))
| 14.25
| 31
| 0.72807
| 20
| 114
| 4.15
| 0.65
| 0.192771
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.05102
| 0.140351
| 114
| 8
| 31
| 14.25
| 0.795918
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
deb375053e406e24eaa5368da05132d5eb7fef2f
| 306
|
py
|
Python
|
python/zdl/error_logger/error_logger/utils/exceptions.py
|
wjiec/packages
|
4ccaf8f717265a1f8a9af533f9a998b935efb32a
|
[
"MIT"
] | null | null | null |
python/zdl/error_logger/error_logger/utils/exceptions.py
|
wjiec/packages
|
4ccaf8f717265a1f8a9af533f9a998b935efb32a
|
[
"MIT"
] | 1
|
2016-09-15T07:06:15.000Z
|
2016-09-15T07:06:15.000Z
|
python/zdl/error_logger/error_logger/utils/exceptions.py
|
wjiec/packages
|
4ccaf8f717265a1f8a9af533f9a998b935efb32a
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
#
# Copyright (C) 2017 DL
#
class LoggerWarning(Exception):
pass
class DeamonError(Exception):
pass
class FatalError(Exception):
pass
class ConfigError(Exception):
pass
class ForbiddenIpError(Exception):
pass
class OperationalError(Exception):
pass
| 10.928571
| 34
| 0.705882
| 32
| 306
| 6.75
| 0.53125
| 0.361111
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016393
| 0.202614
| 306
| 27
| 35
| 11.333333
| 0.868852
| 0.137255
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
720718a1c746fed033beb48aa3a4bd803f9a0290
| 95
|
py
|
Python
|
test/test.py
|
zyfyyzyf/quick_sentence_transformers
|
059d9d7db0cd95a72fe85c1cfb536a83a817609f
|
[
"MIT"
] | 14
|
2022-02-28T07:26:27.000Z
|
2022-03-18T08:01:26.000Z
|
test/test.py
|
zyfyyzyf/quick_sentence_transformers
|
059d9d7db0cd95a72fe85c1cfb536a83a817609f
|
[
"MIT"
] | 3
|
2022-03-09T11:24:41.000Z
|
2022-03-12T02:15:49.000Z
|
test/test.py
|
zyfyyzyf/quick_sentence_transformers
|
059d9d7db0cd95a72fe85c1cfb536a83a817609f
|
[
"MIT"
] | 7
|
2022-02-28T07:26:35.000Z
|
2022-03-17T01:11:15.000Z
|
import onnxruntime
if __name__ == '__main__':
print(onnxruntime.get_available_providers())
| 23.75
| 48
| 0.778947
| 10
| 95
| 6.4
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115789
| 95
| 4
| 48
| 23.75
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
7217d0dc6939070a0b95cbbe10529a1da8b02f65
| 1,032
|
py
|
Python
|
buildcat/worker.py
|
tshead/buildcat
|
78f1cacaa079dd92b0d08cabeaf0183acb54e0e7
|
[
"Apache-2.0"
] | 5
|
2019-03-20T20:08:25.000Z
|
2021-11-04T23:06:33.000Z
|
buildcat/worker.py
|
tshead/buildcat
|
78f1cacaa079dd92b0d08cabeaf0183acb54e0e7
|
[
"Apache-2.0"
] | 17
|
2019-03-21T04:17:23.000Z
|
2021-04-01T04:26:41.000Z
|
buildcat/worker.py
|
tshead/buildcat
|
78f1cacaa079dd92b0d08cabeaf0183acb54e0e7
|
[
"Apache-2.0"
] | 1
|
2019-08-22T01:25:45.000Z
|
2019-08-22T01:25:45.000Z
|
# Copyright 2018 Timothy M. Shead
#
# 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, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Functionality for retrieving information about workers.
"""
import buildcat
def info():
"""Returns information about a worker.
Useful for testing that the system is functioning.
Returns
-------
metadata: :class:`dict`
A collection of key-value pairs containing information describing the
local worker.
"""
return buildcat.info()
def logtree():
import logging_tree
logging_tree.printout()
| 25.8
| 77
| 0.721899
| 141
| 1,032
| 5.269504
| 0.673759
| 0.080754
| 0.034993
| 0.043069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009709
| 0.20155
| 1,032
| 39
| 78
| 26.461538
| 0.89199
| 0.804264
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.833333
| 0.166667
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
72185fafeda670bce01ec0c3c16568824e31438c
| 218
|
py
|
Python
|
niyopolymers/patches/import_loan_type.py
|
venku31/niyopolymers
|
f150ee591d2ea10720d8e98c5f6abf7c6e2edb2d
|
[
"MIT"
] | null | null | null |
niyopolymers/patches/import_loan_type.py
|
venku31/niyopolymers
|
f150ee591d2ea10720d8e98c5f6abf7c6e2edb2d
|
[
"MIT"
] | null | null | null |
niyopolymers/patches/import_loan_type.py
|
venku31/niyopolymers
|
f150ee591d2ea10720d8e98c5f6abf7c6e2edb2d
|
[
"MIT"
] | null | null | null |
import frappe
def execute():
path = frappe.get_app_path("niyopolymers", "patches", "imports", "loan_type.csv")
frappe.core.doctype.data_import.data_import.import_file("Loan Type", path, "Insert", console=True)
| 43.6
| 102
| 0.738532
| 30
| 218
| 5.166667
| 0.666667
| 0.103226
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105505
| 218
| 5
| 102
| 43.6
| 0.794872
| 0
| 0
| 0
| 0
| 0
| 0.246575
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.75
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a0d246b9894172c4e6336cb23b48760bee4c8590
| 141
|
py
|
Python
|
django_settings.py
|
pretalx/pretalx-screenshots
|
1bac580f30fd408338fa9c767b9c7694f46f55e0
|
[
"Apache-2.0"
] | null | null | null |
django_settings.py
|
pretalx/pretalx-screenshots
|
1bac580f30fd408338fa9c767b9c7694f46f55e0
|
[
"Apache-2.0"
] | null | null | null |
django_settings.py
|
pretalx/pretalx-screenshots
|
1bac580f30fd408338fa9c767b9c7694f46f55e0
|
[
"Apache-2.0"
] | null | null | null |
from pretalx.common.settings.test_settings import *
LOCALE_PATHS = list(LOCALE_PATHS) + [os.path.join(os.path.dirname(__file__), 'locale')]
| 35.25
| 87
| 0.77305
| 20
| 141
| 5.1
| 0.7
| 0.215686
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078014
| 141
| 3
| 88
| 47
| 0.784615
| 0
| 0
| 0
| 0
| 0
| 0.042553
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a0ddc27d4b2aab0c66a541b2ec1a668fa78d009d
| 112
|
py
|
Python
|
week07/webapp/run.py
|
cbchoi/sit32006
|
746481d0c03d5aad6096338b077c3d032eeb3775
|
[
"MIT"
] | null | null | null |
week07/webapp/run.py
|
cbchoi/sit32006
|
746481d0c03d5aad6096338b077c3d032eeb3775
|
[
"MIT"
] | null | null | null |
week07/webapp/run.py
|
cbchoi/sit32006
|
746481d0c03d5aad6096338b077c3d032eeb3775
|
[
"MIT"
] | null | null | null |
from myapp import initialize_app
app = initialize_app()
app.run(debug=app.config['DEBUG'], host='0.0.0.0')
| 22.4
| 50
| 0.705357
| 19
| 112
| 4.052632
| 0.526316
| 0.077922
| 0.415584
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.040816
| 0.125
| 112
| 5
| 50
| 22.4
| 0.744898
| 0
| 0
| 0
| 0
| 0
| 0.110092
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a0f973a58bfe2b5b576420e039e659b5535af017
| 279
|
py
|
Python
|
lib/oeqa/runtime/cases/rubygems_rubygems_tty_prompt.py
|
tuxable-ltd/meta-rubygems
|
e80630e79b64e1be8339e1add0ab07644ec99425
|
[
"BSD-2-Clause"
] | null | null | null |
lib/oeqa/runtime/cases/rubygems_rubygems_tty_prompt.py
|
tuxable-ltd/meta-rubygems
|
e80630e79b64e1be8339e1add0ab07644ec99425
|
[
"BSD-2-Clause"
] | 141
|
2021-02-04T16:22:13.000Z
|
2022-03-27T08:29:40.000Z
|
lib/oeqa/runtime/cases/rubygems_rubygems_tty_prompt.py
|
tuxable-ltd/meta-rubygems
|
e80630e79b64e1be8339e1add0ab07644ec99425
|
[
"BSD-2-Clause"
] | 3
|
2021-02-04T14:02:01.000Z
|
2022-02-02T16:46:52.000Z
|
from rubygems_utils import RubyGemsTestUtils
class RubyGemsTestrubygems_tty_prompt(RubyGemsTestUtils):
def test_gem_list_rubygems_tty_prompt(self):
self.gem_is_installed("tty-prompt")
def test_load_tty_prompt(self):
self.gem_is_loadable("tty-prompt")
| 25.363636
| 57
| 0.781362
| 36
| 279
| 5.638889
| 0.5
| 0.221675
| 0.128079
| 0.167488
| 0.216749
| 0.216749
| 0
| 0
| 0
| 0
| 0
| 0
| 0.143369
| 279
| 10
| 58
| 27.9
| 0.849372
| 0
| 0
| 0
| 0
| 0
| 0.071942
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
a0fab5466d8d4f5921dcbc68c84bc77574c7d672
| 287
|
py
|
Python
|
judge/tasks.py
|
MingqiHuang/OnlineJudge
|
fe875d2c3492131dc30384306e3004f1cc5aebe1
|
[
"MIT"
] | null | null | null |
judge/tasks.py
|
MingqiHuang/OnlineJudge
|
fe875d2c3492131dc30384306e3004f1cc5aebe1
|
[
"MIT"
] | null | null | null |
judge/tasks.py
|
MingqiHuang/OnlineJudge
|
fe875d2c3492131dc30384306e3004f1cc5aebe1
|
[
"MIT"
] | null | null | null |
from __future__ import absolute_import, unicode_literals
from celery import shared_task
from judge.dispatcher import JudgeDispatcher
@shared_task
def judge_task(submission_id, problem_id, is_rejudge=False):
JudgeDispatcher(submission_id, problem_id, is_rejudge=is_rejudge).judge()
| 31.888889
| 77
| 0.84669
| 39
| 287
| 5.820513
| 0.487179
| 0.118943
| 0.167401
| 0.185022
| 0.264317
| 0.264317
| 0
| 0
| 0
| 0
| 0
| 0
| 0.094077
| 287
| 8
| 78
| 35.875
| 0.873077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.5
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
9d0e802a221b092543247f47955b01d4db12bb0d
| 1,465
|
py
|
Python
|
Algo and DSA/LeetCode-Solutions-master/Python/subtree-removal-game-with-fibonacci-tree.py
|
Sourav692/FAANG-Interview-Preparation
|
f523e5c94d582328b3edc449ea16ac6ab28cdc81
|
[
"Unlicense"
] | 3,269
|
2018-10-12T01:29:40.000Z
|
2022-03-31T17:58:41.000Z
|
Algo and DSA/LeetCode-Solutions-master/Python/subtree-removal-game-with-fibonacci-tree.py
|
Sourav692/FAANG-Interview-Preparation
|
f523e5c94d582328b3edc449ea16ac6ab28cdc81
|
[
"Unlicense"
] | 53
|
2018-12-16T22:54:20.000Z
|
2022-02-25T08:31:20.000Z
|
Algo and DSA/LeetCode-Solutions-master/Python/subtree-removal-game-with-fibonacci-tree.py
|
Sourav692/FAANG-Interview-Preparation
|
f523e5c94d582328b3edc449ea16ac6ab28cdc81
|
[
"Unlicense"
] | 1,236
|
2018-10-12T02:51:40.000Z
|
2022-03-30T13:30:37.000Z
|
# Time: O(n)
# Space: O(1)
class Solution(object):
def findGameWinner(self, n):
"""
:type n: int
:rtype: bool
"""
# a pattern appears every 6 grundy numbers in binary forms:
# 0000, (0000)01, (0000)11, ((0000)^(0000+1))10, (0000)11, (0000)11
# 0000, (0000+1)01, (0000+1)11, ((0000+1)^((0000+1)+1))10, (0000+1)11, (0000+1)11
# 0000, ((0000+1)+1)01, ((0000+1)+1)11, (((0000+1)+1)^(((0000+1)+1)+1))10, ((0000+1)+1)11, ((0000+1)+1)11
# ...
# 0000, (XXXX)01, (XXXX)11, ((XXXX)^(XXXX+1))10, (XXXX)11, (XXXX)11
# 0000, (XXXX+1)01, (XXXX+1)11, ((XXXX+1)^((XXXX+1)+1))10, (XXXX+1)11, (XXXX+1)11
# => grundy[6k+1] = 0
# grundy[6k+2] = 4k+1
# grundy[6k+3] = 4k+3
# grundy[6k+4] = 4(k^(k+1))+2
# grundy[6k+5] = 4k+3
# grundy[6k+6] = 4k+3
return n%6 != 1
# Time: O(n)
# Space: O(1)
class Solution2(object):
def findGameWinner(self, n):
"""
:type n: int
:rtype: bool
"""
grundy = [0, 1] # 0-indexed
for i in xrange(2, n):
grundy[i%2] = (grundy[(i-1)%2]+1)^(grundy[(i-2)%2]+1) # colon principle, replace the branches by a non-branching stalk of length equal to their nim sum
return grundy[(n-1)%2] > 0
| 38.552632
| 164
| 0.438225
| 218
| 1,465
| 2.944954
| 0.275229
| 0.101246
| 0.065421
| 0.049844
| 0.383178
| 0.239875
| 0.239875
| 0.140187
| 0.140187
| 0.140187
| 0
| 0.228967
| 0.359044
| 1,465
| 37
| 165
| 39.594595
| 0.454739
| 0.642321
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
9d20966bcdec46c766654c3905462f0c61bbdfc5
| 16
|
py
|
Python
|
data/studio21_generated/introductory/3639/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3639/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3639/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
def alan(arr):
| 8
| 14
| 0.625
| 3
| 16
| 3.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 16
| 2
| 15
| 8
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.