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
d047f9056296195ca1f09735ef7bda60311c80bc
1,048
py
Python
tsheets/error.py
eturpin/api_python
fac15d06ef2510972ed3c812bb16a675d4e30e3c
[ "MIT" ]
6
2018-12-16T19:53:57.000Z
2020-11-22T12:36:57.000Z
tsheets/error.py
eturpin/api_python
fac15d06ef2510972ed3c812bb16a675d4e30e3c
[ "MIT" ]
6
2019-02-01T13:51:59.000Z
2020-11-23T22:42:57.000Z
tsheets/error.py
eturpin/api_python
fac15d06ef2510972ed3c812bb16a675d4e30e3c
[ "MIT" ]
8
2018-12-16T19:53:48.000Z
2021-11-24T17:08:04.000Z
class TSheetsError(Exception): """Exception Class to handle the failure of the request.""" def __init__(self, base_exception=None): self.base_exception = base_exception def __str__(self): if self.base_exception: return str(self.base_exception) return "An unknown error occurred." class FilterInvalidValueError(TSheetsError): pass class MethodNotAvailableError(TSheetsError): pass class TSheetsExpectedError(Exception): def __init__(self, base_exception=None, response=None): self.base_exception = base_exception self.response = response def __str__(self): error_msg = "" if self.base_exception: error_msg = str(self.base_exception) if self.response.status_code == 417: try: r = self.response.json() error = r.get("error", {}) msg = error.get("message", None) error_msg = msg except: pass return str(error_msg)
26.2
63
0.610687
111
1,048
5.486486
0.324324
0.213465
0.223317
0.049261
0.197044
0.197044
0
0
0
0
0
0.004104
0.302481
1,048
40
64
26.2
0.829001
0.050573
0
0.321429
0
0
0.038423
0
0
0
0
0
0
1
0.142857
false
0.107143
0
0
0.392857
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
0
1
0
0
0
0
0
3
d0490aa4c9010ab9a0f7062a8ea3ebc78b374cec
131
py
Python
reg/compat.py
nandoflorestan/reg
04779923d5f9dcf71cbc7f61f17d3994575476f7
[ "BSD-3-Clause" ]
null
null
null
reg/compat.py
nandoflorestan/reg
04779923d5f9dcf71cbc7f61f17d3994575476f7
[ "BSD-3-Clause" ]
null
null
null
reg/compat.py
nandoflorestan/reg
04779923d5f9dcf71cbc7f61f17d3994575476f7
[ "BSD-3-Clause" ]
null
null
null
"""Compatibility support for Python 2 and 3.""" try: string_types = (basestring,) except NameError: string_types = (str,)
18.714286
47
0.679389
16
131
5.4375
0.875
0.252874
0
0
0
0
0
0
0
0
0
0.018868
0.19084
131
6
48
21.833333
0.801887
0.312977
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
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
0
0
0
0
0
3
d06bdeeb309d0a1d9ddf41fcf20fb62fee1e63c2
12,477
py
Python
utils/metrics.py
lindsey98/dml_cross_entropy
4312cb295e972abda7b0e2bdadecf1965c5d7ed5
[ "BSD-3-Clause" ]
null
null
null
utils/metrics.py
lindsey98/dml_cross_entropy
4312cb295e972abda7b0e2bdadecf1965c5d7ed5
[ "BSD-3-Clause" ]
null
null
null
utils/metrics.py
lindsey98/dml_cross_entropy
4312cb295e972abda7b0e2bdadecf1965c5d7ed5
[ "BSD-3-Clause" ]
null
null
null
from typing import Dict, List, Optional import faiss import numpy as np import torch import torch.nn.functional as F import sklearn.cluster import sklearn.metrics.cluster from utils.map import * class AverageMeter: """Computes and stores the average and current value on device""" def __init__(self, device, length): self.device = device self.length = length self.reset() def reset(self): self.values = torch.zeros(self.length, device=self.device, dtype=torch.float) self.counter = 0 self.last_counter = 0 def append(self, val): self.values[self.counter] = val.detach() self.counter += 1 self.last_counter += 1 @property def val(self): return self.values[self.counter - 1] @property def avg(self): return self.values[:self.counter].mean() @property def values_list(self): return self.values[:self.counter].cpu().tolist() @property def last_avg(self): if self.last_counter == 0: return self.latest_avg else: self.latest_avg = self.values[self.counter - self.last_counter:self.counter].mean() self.last_counter = 0 return self.latest_avg def cluster_by_kmeans(X, nb_clusters): """ xs : embeddings with shape [nb_samples, nb_features] nb_clusters : in this case, must be equal to number of classes """ # return sklearn.cluster.MiniBatchKMeans(nb_clusters, batch_size=32).fit(X).labels_ X = X.detach().cpu().numpy() kmeans = faiss.Kmeans(d=X.shape[1], k=nb_clusters) kmeans.train(X.astype(np.float32)) labels = kmeans.index.search(X.astype(np.float32), 1)[1] return np.squeeze(labels, 1) def calc_normalized_mutual_information(ys, xs_clustered): return sklearn.metrics.cluster.normalized_mutual_info_score(xs_clustered, ys, average_method='geometric') def calc_nmi(X, T, nb_classes): # calculate NMI with kmeans clustering nmi = calc_normalized_mutual_information( T, cluster_by_kmeans( X, nb_classes ) ) print(nmi) return nmi def mapr(X, T): # MAP@R label_counts = get_label_match_counts(T, T) # get R # num_k = determine_k(num_reference_embeddings=len(T), embeddings_come_from_same_source=True) # equal to num_reference-1 (deduct itself) # num_k = determine_k( # num_reference_embeddings=len(T), embeddings_come_from_same_source=True # ) # equal to num_reference-1 (deduct itself) num_k = max([count[1] for count in label_counts]) knn_indices = get_knn( X, X, num_k, True ) knn_labels = T[knn_indices] # get KNN indicies map_R = mean_average_precision_at_r(knn_labels=knn_labels, gt_labels=T[:, None], embeddings_come_from_same_source=True, label_counts=label_counts, avg_of_avgs=False, label_comparison_fn=torch.eq) logging.info("MAP@R:{:.3f}".format(map_R * 100)) return map_R def mapr_inshop(X_query, T_query, X_gallery, T_gallery): # MAP@R label_counts = get_label_match_counts(T_query, T_gallery) # get R # num_k = determine_k( # num_reference_embeddings=len(T_gallery), embeddings_come_from_same_source=False # ) # equal to num_reference num_k = max([count[1] for count in label_counts]) knn_indices = get_knn( X_gallery, X_query, num_k, True ) knn_labels = T_gallery[knn_indices] # get KNN indicies map_R = mean_average_precision_at_r(knn_labels=knn_labels, gt_labels=T_query[:, None], embeddings_come_from_same_source=False, label_counts=label_counts, avg_of_avgs=False, label_comparison_fn=torch.eq) logging.info("MAP@R:{:.3f}".format(map_R * 100)) return map_R @torch.no_grad() def recall_at_ks(query_features: torch.Tensor, query_labels: torch.LongTensor, ks: List[int], gallery_features: Optional[torch.Tensor] = None, gallery_labels: Optional[torch.Tensor] = None, cosine: bool = True) -> Dict[int, float]: """ Compute the recall between samples at each k. This function uses about 8GB of memory. Parameters ---------- query_features : torch.Tensor Features for each query sample. shape: (num_queries, num_features) query_labels : torch.LongTensor Labels corresponding to the query features. shape: (num_queries,) ks : List[int] Values at which to compute the recall. gallery_features : torch.Tensor Features for each gallery sample. shape: (num_queries, num_features) gallery_labels : torch.LongTensor Labels corresponding to the gallery features. shape: (num_queries,) cosine : bool Use cosine distance between samples instead of euclidean distance. Returns ------- recalls : Dict[int, float] Values of the recall at each k. """ offset = 0 if gallery_features is None and gallery_labels is None: offset = 1 gallery_features = query_features gallery_labels = query_labels elif gallery_features is None or gallery_labels is None: raise ValueError('gallery_features and gallery_labels needs to be both None or both Tensors.') if cosine: query_features = F.normalize(query_features, p=2, dim=1) gallery_features = F.normalize(gallery_features, p=2, dim=1) to_cpu_numpy = lambda x: x.cpu().numpy() q_f, q_l, g_f, g_l = map(to_cpu_numpy, [query_features, query_labels, gallery_features, gallery_labels]) if hasattr(faiss, 'StandardGpuResources'): res = faiss.StandardGpuResources() flat_config = faiss.GpuIndexFlatConfig() flat_config.device = 0 max_k = max(ks) index_function = faiss.GpuIndexFlatIP if cosine else faiss.GpuIndexFlatL2 index = index_function(res, g_f.shape[1], flat_config) else: max_k = max(ks) index_function = faiss.IndexFlatIP if cosine else faiss.IndexFlatL2 index = index_function(g_f.shape[1]) index.add(g_f) closest_indices = index.search(q_f, max_k + offset)[1] recalls = {} for k in ks: indices = closest_indices[:, offset:k + offset] recalls[k] = (q_l[:, None] == g_l[indices]).any(1).mean() print(recalls) return {k: round(v * 100, 2) for k, v in recalls.items()} @torch.no_grad() def recall_at_ks_full(query_features: torch.Tensor, query_labels: torch.LongTensor, ks: List[int], gallery_features: Optional[torch.Tensor] = None, gallery_labels: Optional[torch.Tensor] = None, cosine: bool = False, threshold: Optional[float] = None) -> Dict[int, float]: """ Compute the full recall, precision list between samples at each k. Parameters ---------- query_features : torch.Tensor Features for each query sample. shape: (num_queries, num_features) query_labels : torch.LongTensor Labels corresponding to the query features. shape: (num_queries,) ks : List[int] Values at which to compute the recall. gallery_features : torch.Tensor Features for each gallery sample. shape: (num_queries, num_features) gallery_labels : torch.LongTensor Labels corresponding to the gallery features. shape: (num_queries,) cosine : bool Use cosine distance between samples instead of euclidean distance. threshold: float Use to thresholding on the matched similarity, only consider cosine distance thresholding for now Returns ------- recalls : Dict[List[bool]] List of recalls for all query data at each k. List of precisions for all query data at each k. """ offset = 0 if gallery_features is None and gallery_labels is None: offset = 1 gallery_features = query_features gallery_labels = query_labels elif gallery_features is None or gallery_labels is None: raise ValueError('gallery_features and gallery_labels needs to be both None or both Tensors.') if cosine: query_features = F.normalize(query_features, p=2, dim=1) gallery_features = F.normalize(gallery_features, p=2, dim=1) to_cpu_numpy = lambda x: x.cpu().numpy() q_f, q_l, g_f, g_l = map(to_cpu_numpy, [query_features, query_labels, gallery_features, gallery_labels]) res = faiss.StandardGpuResources() flat_config = faiss.GpuIndexFlatConfig() flat_config.device = 0 max_k = max(ks) index_function = faiss.GpuIndexFlatIP if cosine else faiss.GpuIndexFlatL2 index = index_function(res, g_f.shape[1], flat_config) index.add(g_f) distances, closest_indices = index.search(q_f, max_k + offset) recalls = {} precisions = {} for k in ks: indices = closest_indices[:, offset:k + offset] # Recall @ k recalls[k] = ((q_l[:, None] == g_l[indices]) * (distances[:, offset:k + offset] >= threshold)).any(1) precisions[k] = ((q_l[:, None] == g_l[indices]) * (distances[:, offset:k + offset] >= threshold)).sum(1) / \ ((distances[:, offset:k + offset] >= threshold).sum(1) + 1e-4) return recalls, precisions @torch.no_grad() def fp_fn_eval(query_features: torch.Tensor, query_labels: torch.LongTensor, ks: List[int], gallery_features: Optional[torch.Tensor] = None, gallery_labels: Optional[torch.Tensor] = None, cosine: bool = False, threshold: Optional[float] = None) -> Dict[int, float]: """ Get FPs and FNs from query data Parameters ---------- query_features : torch.Tensor Features for each query sample. shape: (num_queries, num_features) query_labels : torch.LongTensor Labels corresponding to the query features. shape: (num_queries,) ks : List[int] Values at which to compute the recall. gallery_features : torch.Tensor Features for each gallery sample. shape: (num_queries, num_features) gallery_labels : torch.LongTensor Labels corresponding to the gallery features. shape: (num_queries,) cosine : bool Use cosine distance between samples instead of euclidean distance. threshold: float Use to thresholding on the matched similarity, only consider cosine distance thresholding for now Returns ------- recalls : Dict[List[bool]] List of fns: true indicates a FN List of fps: true indicates a FP """ offset = 0 if gallery_features is None and gallery_labels is None: offset = 1 gallery_features = query_features gallery_labels = query_labels elif gallery_features is None or gallery_labels is None: raise ValueError('gallery_features and gallery_labels needs to be both None or both Tensors.') if cosine: query_features = F.normalize(query_features, p=2, dim=1) gallery_features = F.normalize(gallery_features, p=2, dim=1) to_cpu_numpy = lambda x: x.cpu().numpy() q_f, q_l, g_f, g_l = map(to_cpu_numpy, [query_features, query_labels, gallery_features, gallery_labels]) res = faiss.StandardGpuResources() flat_config = faiss.GpuIndexFlatConfig() flat_config.device = 0 max_k = 1 # only look at the 1st neighbor to decide whether it is FP or FN index_function = faiss.GpuIndexFlatIP if cosine else faiss.GpuIndexFlatL2 index = index_function(res, g_f.shape[1], flat_config) index.add(g_f) distances, closest_indices = index.search(q_f, max_k + offset) indices = closest_indices[:, offset:max_k + offset] # fns fns = ((distances[:, offset:max_k + offset] < threshold)).any(1) # 1st neighbor is far --> FN fps = ((q_l[:, None] != g_l[indices]) * (distances[:, offset:max_k + offset] >= threshold)).any(1) # 1st neighbor is close but not having the same class label return fns, fps
37.581325
162
0.639817
1,625
12,477
4.713846
0.145231
0.058747
0.023499
0.018799
0.751958
0.737076
0.706397
0.686684
0.671671
0.657702
0
0.008307
0.266731
12,477
331
163
37.694864
0.828943
0.281558
0
0.575916
0
0
0.031877
0
0
0
0
0
0
1
0.078534
false
0
0.041885
0.020942
0.193717
0.010471
0
0
0
null
0
0
0
0
1
1
0
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
3
d0814f9456630ab516efd82248ecd4c4ebd9c627
999
py
Python
q2_decontam/tests/test_decontam.py
HSapers/q2-decontam
240cfb8dd493e9460b51841ec2d4a142c7be452e
[ "Apache-2.0" ]
2
2021-09-22T04:01:12.000Z
2021-09-22T19:30:48.000Z
q2_decontam/tests/test_decontam.py
HSapers/q2-decontam
240cfb8dd493e9460b51841ec2d4a142c7be452e
[ "Apache-2.0" ]
3
2021-10-20T00:38:58.000Z
2021-12-14T01:19:32.000Z
q2_decontam/tests/test_decontam.py
HSapers/q2-decontam
240cfb8dd493e9460b51841ec2d4a142c7be452e
[ "Apache-2.0" ]
1
2021-09-21T23:22:09.000Z
2021-09-21T23:22:09.000Z
# Copyright 2021 Haley Sapers # # 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. import unittest #testing functionality for a single function #unit test - every line of code or logical branch works a test that looks at the if case and a test that #look at the else case class TestPrepareControlBatches(unittest.TestCase): def test_sample_type_col_in_control_cols(self): self.assertTrue(False) #write a failing test first, know test is running and failing when it should
43.434783
107
0.758759
155
999
4.851613
0.664516
0.079787
0.034574
0.042553
0
0
0
0
0
0
0
0.009864
0.188188
999
23
107
43.434783
0.917386
0.80981
0
0
0
0
0
0
0
0
0
0
0.25
1
0.25
false
0
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
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
d0c57424da49064ef17c77c9a01367762290009d
1,495
py
Python
python_parikshith21/Day36.py
01coders/50-Days-Of-Code
98928cf0e186ee295bc90a4da0aa9554e2918659
[ "MIT" ]
null
null
null
python_parikshith21/Day36.py
01coders/50-Days-Of-Code
98928cf0e186ee295bc90a4da0aa9554e2918659
[ "MIT" ]
null
null
null
python_parikshith21/Day36.py
01coders/50-Days-Of-Code
98928cf0e186ee295bc90a4da0aa9554e2918659
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Jun 14 20:08:32 2019 @author: Parikshith.H """ class Date: def __init__(self,day,month,year): self.__day=day self.__month=month self.__year=year def get_day(self): return self.__day def get_month(self): return self.__month def get_year(self): return self.__year def set_day(self,value): self.__day=value def set_month(self,value): self.__month=value def set_year(self,value): self.__year=value class customer: def __init__(self,name,num,dob): self.__name=name self.__num=num self.__dob=dob def get_name(self): return self.__name def get_num(self): return self.__num def get_dob(self): return self.__dob def set_name(self,value): self.__name=value def set_num(self,value): self.__num=value def set_dob(self,value): self.__dob=value d=Date(13,11,1998) c1=customer("Manoj",7204444566,d) print(c1.get_name(),c1.get_num(),c1.get_dob().get_day()) #Manoj 7203344566 13 temp=c1.get_dob() print(temp.get_day()) #13 temp.set_year(1999) print(temp.get_day(),temp.get_month(),temp.get_year()) #13 11 1999 c1.get_dob().set_year(2000) # ============================================================================= # #output: # Manoj 7204444566 13 # 13 # 13 11 1999 # =============================================================================
24.916667
79
0.563211
204
1,495
3.794118
0.215686
0.046512
0.108527
0.03876
0
0
0
0
0
0
0
0.075939
0.216054
1,495
59
80
25.338983
0.584471
0.207358
0
0
0
0
0.004284
0
0
0
0
0
0
1
0.333333
false
0
0
0.142857
0.52381
0.071429
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
0
0
1
1
0
0
3
d0c8e9eb24e781c0757e2fb808695f57a0f16520
154
py
Python
tests/test_load.py
DigitalSlideArchive/DSA-WSI-DeID
aef0067690a7708092ee7d1d3fb1246c9c37cd5b
[ "Apache-2.0" ]
3
2020-10-19T16:37:47.000Z
2021-09-23T15:21:40.000Z
tests/test_load.py
DigitalSlideArchive/DSA-WSI-DeID
aef0067690a7708092ee7d1d3fb1246c9c37cd5b
[ "Apache-2.0" ]
71
2020-09-17T14:48:06.000Z
2022-02-10T21:08:12.000Z
tests/test_load.py
DigitalSlideArchive/NCI-SEER-Pediatric-WSI-Pilot
c4413e6022f2db45166a8633d9aa03b41331fca9
[ "Apache-2.0" ]
3
2021-07-01T21:45:54.000Z
2021-09-03T14:48:58.000Z
import pytest from girder.plugin import loadedPlugins @pytest.mark.plugin('wsi_deid') def test_import(server): assert 'wsi_deid' in loadedPlugins()
19.25
40
0.779221
21
154
5.571429
0.666667
0.119658
0
0
0
0
0
0
0
0
0
0
0.123377
154
7
41
22
0.866667
0
0
0
0
0
0.103896
0
0
0
0
0
0.2
1
0.2
false
0
0.6
0
0.8
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
0
0
0
3
d0cdca44e3942d5b819bce0b21f482af1565d9ec
23
py
Python
config.example.py
NCPlayz/TeleDanny
aef41b876c65d4f71814a3ad1251d19b949b67fd
[ "MIT" ]
2
2020-07-08T23:20:47.000Z
2020-07-09T14:57:35.000Z
config.example.py
NCPlayz/rapptzcord-telegram-bot
aef41b876c65d4f71814a3ad1251d19b949b67fd
[ "MIT" ]
null
null
null
config.example.py
NCPlayz/rapptzcord-telegram-bot
aef41b876c65d4f71814a3ad1251d19b949b67fd
[ "MIT" ]
1
2021-05-23T10:01:40.000Z
2021-05-23T10:01:40.000Z
token = "" owners = []
7.666667
11
0.478261
2
23
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.26087
23
2
12
11.5
0.647059
0
0
0
0
0
0
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
d0da97391e0ee2ecd8701065e5d52b106ff0fefc
188
py
Python
helpers/__init__.py
addisonhuddy/gatech-teamfin
7e35cbee997cef3e1bea8834811a0585f5ce33b1
[ "Apache-2.0" ]
null
null
null
helpers/__init__.py
addisonhuddy/gatech-teamfin
7e35cbee997cef3e1bea8834811a0585f5ce33b1
[ "Apache-2.0" ]
null
null
null
helpers/__init__.py
addisonhuddy/gatech-teamfin
7e35cbee997cef3e1bea8834811a0585f5ce33b1
[ "Apache-2.0" ]
null
null
null
import os import glob from FHIR import FHIR modules = glob.glob(os.path.dirname(__file__) + "/*.py") __all__ = [os.path.basename(fname)[:-3] for fname in modules if os.path.isfile(fname)]
31.333333
86
0.728723
31
188
4.16129
0.580645
0.139535
0
0
0
0
0
0
0
0
0
0.006024
0.117021
188
5
87
37.6
0.771084
0
0
0
0
0
0.026596
0
0
0
0
0
0
1
0
false
0
0.6
0
0.6
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
0
1
0
0
3
d0fb7538cb4b0b2afd469f56cc2e9ccca085b323
1,116
py
Python
cadence/tests/test_register_signal.py
simkimsia/temporal-python-sdk
6b35da3eb0d3da87d61c1ce0ff8b33f08e8c3263
[ "MIT" ]
141
2019-05-01T00:19:22.000Z
2022-03-29T13:30:31.000Z
cadence/tests/test_register_signal.py
simkimsia/temporal-python-sdk
6b35da3eb0d3da87d61c1ce0ff8b33f08e8c3263
[ "MIT" ]
19
2019-08-10T08:19:30.000Z
2021-05-26T01:38:39.000Z
cadence/tests/test_register_signal.py
simkimsia/temporal-python-sdk
6b35da3eb0d3da87d61c1ce0ff8b33f08e8c3263
[ "MIT" ]
29
2019-05-15T03:44:09.000Z
2022-03-29T21:36:17.000Z
import pytest from cadence.worker import Worker from cadence.workflow import signal_method class TestWorkflow: @signal_method() def the_signal_method(self): pass @pytest.fixture def worker(): return Worker() def test_register_init_signal_methods(worker): worker.register_workflow_implementation_type(TestWorkflow) assert TestWorkflow._signal_methods def test_register_mappings(worker): worker.register_workflow_implementation_type(TestWorkflow) assert TestWorkflow._signal_methods["TestWorkflow::the_signal_method"] == TestWorkflow.the_signal_method def test_camel_case(worker): worker.register_workflow_implementation_type(TestWorkflow) assert TestWorkflow._signal_methods["TestWorkflow::theSignalMethod"] == TestWorkflow.the_signal_method def test_custom_mapping(worker): class CustomNameWorkflow: @signal_method(name="blah") def the_signal_method(self): pass worker.register_workflow_implementation_type(CustomNameWorkflow) assert CustomNameWorkflow._signal_methods["blah"] == CustomNameWorkflow.the_signal_method
26.571429
108
0.793011
122
1,116
6.885246
0.262295
0.128571
0.107143
0.171429
0.536905
0.489286
0.346429
0.346429
0.346429
0.346429
0
0
0.136201
1,116
41
109
27.219512
0.871369
0
0
0.269231
0
0
0.060932
0.053763
0
0
0
0
0.153846
1
0.269231
false
0.076923
0.115385
0.038462
0.5
0
0
0
0
null
0
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
1
0
0
0
0
0
3
d0fe2f0af0f0dbfd1f686f7738fc178b608c3dd5
309
py
Python
kubernetes_typed/client/models/v1_persistent_volume_status.py
nikhiljha/kubernetes-typed
4f4b969aa400c88306f92560e56bda6d19b2a895
[ "Apache-2.0" ]
22
2020-12-10T13:06:02.000Z
2022-02-13T21:58:15.000Z
kubernetes_typed/client/models/v1_persistent_volume_status.py
nikhiljha/kubernetes-typed
4f4b969aa400c88306f92560e56bda6d19b2a895
[ "Apache-2.0" ]
4
2021-03-08T07:06:12.000Z
2022-03-29T23:41:45.000Z
kubernetes_typed/client/models/v1_persistent_volume_status.py
nikhiljha/kubernetes-typed
4f4b969aa400c88306f92560e56bda6d19b2a895
[ "Apache-2.0" ]
2
2021-09-05T19:18:28.000Z
2022-03-14T02:56:17.000Z
# Code generated by `typeddictgen`. DO NOT EDIT. """V1PersistentVolumeStatusDict generated type.""" from typing import TypedDict V1PersistentVolumeStatusDict = TypedDict( "V1PersistentVolumeStatusDict", { "message": str, "phase": str, "reason": str, }, total=False, )
22.071429
50
0.660194
25
309
8.16
0.76
0.362745
0
0
0
0
0
0
0
0
0
0.012552
0.226537
309
13
51
23.769231
0.841004
0.297735
0
0
1
0
0.218009
0.132701
0
0
0
0
0
1
0
false
0
0.1
0
0.1
0
1
0
0
null
1
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
0
0
0
0
0
0
0
0
3
ef7b50ee65610a38bd7bbe34677e51453a8bcab4
523
py
Python
admin-portal/clients/models.py
oakbani/ksdp-portal
8f44b3cb0081a7f31b9c8121883dd51945a05520
[ "MIT" ]
null
null
null
admin-portal/clients/models.py
oakbani/ksdp-portal
8f44b3cb0081a7f31b9c8121883dd51945a05520
[ "MIT" ]
null
null
null
admin-portal/clients/models.py
oakbani/ksdp-portal
8f44b3cb0081a7f31b9c8121883dd51945a05520
[ "MIT" ]
1
2021-09-19T10:58:17.000Z
2021-09-19T10:58:17.000Z
from django.db import models class Client(models.Model): name = models.CharField(max_length=30) father_name = models.CharField(max_length=30) date_of_birth = models.DateField() address = models.CharField(blank=True, max_length=100) cnic = models.CharField(blank=True, max_length=15) contact = models.CharField(max_length=15) status = models.IntegerField( choices=((1, "Ineligible"), (2, "Enrolled"), (3, "UnEnrolled")), default=3 ) def __str__(self): return self.name
30.764706
82
0.686424
67
523
5.179104
0.58209
0.216138
0.15562
0.207493
0.363112
0.363112
0
0
0
0
0
0.035129
0.183556
523
16
83
32.6875
0.777518
0
0
0
0
0
0.053537
0
0
0
0
0
0
1
0.076923
false
0
0.076923
0.076923
0.846154
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
0
0
0
0
0
1
0
0
3
ef7c81824c27fe988158b5992e3a2ca1916e9054
364
py
Python
test_merge_intervals.py
jaebradley/leetcode.py
64634cc7d0e975ddd163f35acb18cc92960b8eb5
[ "MIT" ]
null
null
null
test_merge_intervals.py
jaebradley/leetcode.py
64634cc7d0e975ddd163f35acb18cc92960b8eb5
[ "MIT" ]
2
2019-11-13T19:55:49.000Z
2019-11-13T19:55:57.000Z
test_merge_intervals.py
jaebradley/leetcode.py
64634cc7d0e975ddd163f35acb18cc92960b8eb5
[ "MIT" ]
null
null
null
from unittest import TestCase from merge_intervals import Solution class TestMergeIntervals(TestCase): def test_two_overlapping_intervals(self): self.assertEqual(Solution().merge([[1, 3], [2, 6]]), [[1, 6]]) def test_two_overlapping_intervals_that_share_an_endpoint(self): self.assertEqual(Solution().merge([[1, 4], [4, 5]]), [[1, 5]])
30.333333
70
0.700549
48
364
5.083333
0.520833
0.057377
0.081967
0.172131
0.516393
0.270492
0
0
0
0
0
0.03871
0.148352
364
11
71
33.090909
0.748387
0
0
0
0
0
0
0
0
0
0
0
0.285714
1
0.285714
false
0
0.285714
0
0.714286
0
0
0
0
null
0
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
3
efa34f1d9c69a60888cfafd9413ed3c52269a776
19
py
Python
src/config.py
calsf/codex-prime
c651d4c2f34581babc8078d01fe84dc95f3b7c36
[ "MIT" ]
null
null
null
src/config.py
calsf/codex-prime
c651d4c2f34581babc8078d01fe84dc95f3b7c36
[ "MIT" ]
null
null
null
src/config.py
calsf/codex-prime
c651d4c2f34581babc8078d01fe84dc95f3b7c36
[ "MIT" ]
null
null
null
DISCORD_TOKEN = ''
9.5
18
0.684211
2
19
6
1
0
0
0
0
0
0
0
0
0
0
0
0.157895
19
1
19
19
0.75
0
0
0
0
0
0
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
efd296d58a8ae7cf8519df40b0ea7a17e3bb4477
1,789
py
Python
sift-odk-importer/api/models.py
readevalprint/sift
3015a2f704816a687a7c0f1974b873d7cda43444
[ "Apache-2.0" ]
1
2020-02-04T04:28:09.000Z
2020-02-04T04:28:09.000Z
sift-odk-importer/api/models.py
readevalprint/sift
3015a2f704816a687a7c0f1974b873d7cda43444
[ "Apache-2.0" ]
3
2020-06-05T17:34:59.000Z
2021-06-10T22:45:45.000Z
sift-odk-importer/api/models.py
readevalprint/sift
3015a2f704816a687a7c0f1974b873d7cda43444
[ "Apache-2.0" ]
null
null
null
from hashlib import md5 from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.utils import timezone from django.core.exceptions import ValidationError import xmltodict def validate_xmldict(value): try: xmltodict.parse(value) assert ['h:html']['h:head']['h:title'], 'missing "title" in xlsform or XForm' except Exception as e: raise ValidationError(e) class XForm(models.Model): """ database representation of an XForm The data is stored in XML format and converted to the other supported formats when it is needed """ title = models.CharField(default='', max_length=64, editable=False, unique=True) xml_data = models.TextField(blank=True, validators=[validate_xmldict]) description = models.TextField(default=u'', null=True) created_at = models.DateTimeField(default=timezone.now) sift_core_survey_id = models.IntegerField() @property def gather_core_url(self): return settings.GATHER_CORE_URL + '/surveys/{survey_id}/responses/'.format(survey_id=self.gather_core_survey_id) @property def hash(self): return u'%s' % md5(self.xml_data.encode('utf8')).hexdigest() @property def id_string(self): return str(self.pk) @property def url(self): return reverse("download_xform", kwargs={"pk": self.pk}) def save(self, *args, **kwargs): try: d = xmltodict.parse(self.xml_data) self.title = d['h:html']['h:head']['h:title'] # TODO: make this more robust self.form_id = d['h:html']['h:head']['model']['instance']['None']['@id'] except Exception as e: print(e) return super(XForm, self).save(*args, **kwargs)
30.322034
120
0.666294
237
1,789
4.936709
0.472574
0.042735
0.015385
0.025641
0.037607
0.02735
0
0
0
0
0
0.003531
0.208496
1,789
58
121
30.844828
0.82274
0.089435
0
0.205128
0
0
0.098442
0.019315
0
0
0
0.017241
0.025641
1
0.153846
false
0
0.179487
0.102564
0.615385
0.025641
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
0
0
0
0
1
1
0
0
3
4bdd1936de55064551d58a8b410ce591fa2b657a
573
py
Python
test/test_arithmetictest.py
octoandzl/test_package
d959b5388ac57dc49d1ceca63caca8e1d369f08c
[ "MIT" ]
null
null
null
test/test_arithmetictest.py
octoandzl/test_package
d959b5388ac57dc49d1ceca63caca8e1d369f08c
[ "MIT" ]
null
null
null
test/test_arithmetictest.py
octoandzl/test_package
d959b5388ac57dc49d1ceca63caca8e1d369f08c
[ "MIT" ]
null
null
null
from pytest import fixture @fixture def add(): from arithmetictest import add return add @fixture def substract(): from arithmetictest import subtract return subtract @fixture def multiply(): from arithmetictest import multiply return multiply @fixture def division(): from arithmetictest import division return division def test_add(add): assert add(1,2) == 3 def test_substract(substract): assert substract(2,1) == 1 def test_multiply(multiply): assert multiply(2,1) == 2 def test_division(division): assert division(2,1) == 2
16.852941
39
0.727749
76
573
5.434211
0.223684
0.096852
0.232446
0
0
0
0
0
0
0
0
0.025806
0.188482
573
33
40
17.363636
0.862366
0
0
0.16
0
0
0
0
0
0
0
0
0.16
1
0.32
false
0
0.2
0
0.68
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
0
1
0
0
3
ef00acf8142a46e04f0ee41def959a2e65acf632
5,091
py
Python
environment/connect_five/envs/connect_five_env.py
amichelmore/ConnectFive
0b782bbe6a78e35cd82dff19db6a8d41bf19f17c
[ "MIT" ]
null
null
null
environment/connect_five/envs/connect_five_env.py
amichelmore/ConnectFive
0b782bbe6a78e35cd82dff19db6a8d41bf19f17c
[ "MIT" ]
null
null
null
environment/connect_five/envs/connect_five_env.py
amichelmore/ConnectFive
0b782bbe6a78e35cd82dff19db6a8d41bf19f17c
[ "MIT" ]
null
null
null
import gym from gym import error, spaces, utils from gym.utils import seeding class FooEnv(gym.Env): metadata = {'render.modes': ['human']} def __init__(self): self.state = [] for i in range(19): self.state += [[]] for j in range(19): self.state[i] += [0] self.counter = 0 self.done = 0 self.first = 1 self.turn = self.first self.score = [0, 0] self.reward = 0 def check(self): if(self.counter<9): return 0 for i in range(2,17): for j in range(2,17): if self.state[i,j] != 0: if self.state[i,j] == self.state[i-2,j] and self.state[i,j] == self.state[i-1,j] and self.state[i,j] == self.state[i+1,j] and self.state[i,j] == self.state[i+2,j]: return self.state[i,j] elif self.state[i,j] == self.state[i,j-2] and self.state[i,j] == self.state[i,j-1] and self.state[i,j] == self.state[i,j+1] and self.state[i,j] == self.state[i,j+2]: return self.state[i,j] elif self.state[i,j] == self.state[i-2,j-2] and self.state[i,j] == self.state[i-1,j-1] and self.state[i,j] == self.state[i+1,j+1] and self.state[i,j] == self.state[i+2,j+2]: return self.state[i,j] elif self.state[i,j] == self.state[i-2,j+2] and self.state[i,j] == self.state[i-1,j+1] and self.state[i,j] == self.state[i+1,j-1] and self.state[i,j] == self.state[i+2,j-2]: return self.state[i,j] for i in range(0,2): for j in range(2,17): if self.state[i,j] != 0: if self.state[i,j] == self.state[i,j-2] and self.state[i,j] == self.state[i,j-1] and self.state[i,j] == self.state[i,j+1] and self.state[i,j] == self.state[i,j+2]: return self.state[i,j] for i in range(2,17): for j in range(0,2): if self.state[i,j] != 0: if self.state[i,j] == self.state[i-2,j] and self.state[i,j] == self.state[i-1,j] and self.state[i,j] == self.state[i+1,j] and self.state[i,j] == self.state[i+2,j]: return self.state[i,j] return[0] def step(self, action): i = int(action/19) j = action%19 if self.done == 1: print("Game Over") return [self.state, self.reward, self.done, self.add] elif self.state[i, j] != 0: print("Invalid Step") return [self.state, self.reward, self.done, self.add] else: self.state[i,j] = self.turn self.counter += 1 if(self.counter == 361): self.done = 1 if self.turn == 1: self.turn = -1 else: self.turn = 1 self.render() win = self.check() if(win != 0): self.done = 1 print(win, " wins!", sep = "", end = "\n") if win == 1: self.score[0] += 1 else: self.score[1] += 1 if win == -1: self.reward = 1 else: self.reward = -1 #work on this return [self.state, self.reward, self.done, self.add] def reset(self): #printing the board in a somewhat pretty way for i in range(19): for j in range(19): self.state[i][j] = 0 self.counter = 0 self.done = 0 if self.first == 1: self.first = -1 self.turn = self.first else: self.first = 1 self.turn = self.first self.reward = 0 return self.state def render(self, mode='human', close=False): #printing the board in a somewhat pretty way print('\n') print(self.turn, ' to move.') print(' ', end=' ') print(' ', end=' ') for i in range(19): if i < 10: print(i, end=' ') else: print(i, end=' ') print('') print(' ', end=' ') print(' ', end=' ') for i in range(19): print('_', end=' ') print('') for i in range(19): if i < 10: print(i, end=' ') else: print(i, end=' ') print('|', end=' ') for j in range(19): # printing value at each point if(self.state == 1): out = '\u25CB' elif(self.state == -1): out = '\u25CF' else: out = ' ' print(out, end=' ') print('|') print(' ', end=' ') print(' ', end=' ') for i in range(19): print('_', end=' ') print('\n')
36.364286
194
0.426832
698
5,091
3.104585
0.113181
0.286571
0.281495
0.22335
0.693586
0.656668
0.656668
0.623904
0.54084
0.47808
0
0.040568
0.418975
5,091
140
195
36.364286
0.692022
0.024946
0
0.532258
0
0
0.023439
0
0
0
0
0
0
1
0.040323
false
0
0.024194
0
0.169355
0.185484
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
0
0
3
ef22a74efb47ada4dc3a623769ddf1b6d82b21c1
1,001
py
Python
src/Task 2.1 - Authentication Service/src/GPG_Functions.py
Darker97/Virtual-Shop
7682feb8257856f2c2960bfb5773a8603432c8c6
[ "MIT" ]
null
null
null
src/Task 2.1 - Authentication Service/src/GPG_Functions.py
Darker97/Virtual-Shop
7682feb8257856f2c2960bfb5773a8603432c8c6
[ "MIT" ]
1
2020-01-14T14:08:55.000Z
2020-01-14T14:08:55.000Z
src/Task 2.1 - Authentication Service/src/GPG_Functions.py
Darker97/Virtual-Shop
7682feb8257856f2c2960bfb5773a8603432c8c6
[ "MIT" ]
1
2022-02-27T15:13:59.000Z
2022-02-27T15:13:59.000Z
from Crypto import Random from Crypto.PublicKey import RSA import base64 class GPG_Functions: # Generates the keys we need def createKeys(): # RSA modulus length must be a multiple of 256 and >= 1024 modulus_length = 256*4 # use larger value in production privatekey = RSA.generate(modulus_length, Random.new().read) publickey = privatekey.publickey() return privatekey, publickey # ------------------------------------------ def Encryptor(key, data): encrypted_msg = key.encrypt(data, 32)[0] message = base64.b64encode(encrypted_msg) # base64 encoded strings are database friendly return message def Decryptor(key, data): message = base64.b64decode(data) message = key.decrypt(message) return message def sign(key, data): signed_data = gpg.sign(data, key) return str(signed_data) def verify(key, data): verified = gpg.verify(data, key) return verified
32.290323
96
0.633367
118
1,001
5.313559
0.516949
0.044657
0.051037
0
0
0
0
0
0
0
0
0.034621
0.24975
1,001
31
97
32.290323
0.800266
0.201798
0
0.086957
1
0
0
0
0
0
0
0
0
1
0.217391
false
0
0.130435
0
0.608696
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
0
0
0
1
0
0
3
ef2cba57040fddadb1392f44ca521fc27df1376d
127
py
Python
src/test/python/antidotedb_test/__init__.py
AntidoteDB/antidote-python-client
b30f66131a729ee175c53bd2babcc5b15197904a
[ "Apache-2.0" ]
2
2019-01-26T00:38:08.000Z
2020-06-17T13:21:04.000Z
src/test/python/antidotedb_test/__init__.py
AntidoteDB/antidote-python-client
b30f66131a729ee175c53bd2babcc5b15197904a
[ "Apache-2.0" ]
1
2022-01-29T21:34:40.000Z
2022-01-30T14:59:36.000Z
src/test/python/antidotedb_test/__init__.py
AntidoteDB/antidote-python-client
b30f66131a729ee175c53bd2babcc5b15197904a
[ "Apache-2.0" ]
6
2019-02-25T18:08:05.000Z
2020-03-21T18:32:31.000Z
import sys from os.path import dirname sys.path.append(f"{dirname(__file__)}/../../../main/python/") name = "antidotedb_test"
21.166667
61
0.708661
18
127
4.722222
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.086614
127
5
62
25.4
0.732759
0
0
0
0
0
0.440945
0.322835
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
3
ef419006329535abf7d72c5d6105315da912686b
146
py
Python
grassseed.py
Edelio-Taboada/edelio-taboada-kattis-solutions
612a663b59cfd1ce9409e1960769f31c0485df2b
[ "Unlicense" ]
null
null
null
grassseed.py
Edelio-Taboada/edelio-taboada-kattis-solutions
612a663b59cfd1ce9409e1960769f31c0485df2b
[ "Unlicense" ]
null
null
null
grassseed.py
Edelio-Taboada/edelio-taboada-kattis-solutions
612a663b59cfd1ce9409e1960769f31c0485df2b
[ "Unlicense" ]
null
null
null
c = float(input()) n = int(input()) t=0 for each in range(n): h,w = list(map(float, input().split())) t+= h*w*c print("{:.8f}".format(t))
18.25
43
0.541096
28
146
2.821429
0.678571
0.253165
0
0
0
0
0
0
0
0
0
0.016667
0.178082
146
7
44
20.857143
0.641667
0
0
0
0
0
0.041096
0
0
0
0
0
0
1
0
false
0
0
0
0
0.142857
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
0
0
3
ef461c3cf44c356824c584cf2037c69c2257fa17
127
py
Python
nextcode/services/phenotype/exceptions.py
Haffi/nextcode-python-sdk
b70baa848cb6326fb0e7ee0e4167c41dcc45e085
[ "MIT" ]
7
2019-10-23T17:22:50.000Z
2021-04-17T21:44:28.000Z
nextcode/services/phenotype/exceptions.py
Haffi/nextcode-python-sdk
b70baa848cb6326fb0e7ee0e4167c41dcc45e085
[ "MIT" ]
8
2019-11-07T16:41:01.000Z
2021-09-13T14:33:28.000Z
nextcode/services/phenotype/exceptions.py
Haffi/nextcode-python-sdk
b70baa848cb6326fb0e7ee0e4167c41dcc45e085
[ "MIT" ]
4
2019-11-08T13:59:55.000Z
2021-11-07T13:49:21.000Z
""" Exceptions ~~~~~~~~~~ Custom exceptions raised by the phenotype service. """ class PhenotypeError(Exception): pass
10.583333
50
0.669291
12
127
7.083333
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.173228
127
11
51
11.545455
0.809524
0.574803
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
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
3
ef468ff9d05a7919d157862e618ac71a2920faed
1,216
py
Python
pymoo/model/termination.py
temaurer/pymoo
1a2f3e0944ef7094df7518623e3ce23f94a39a39
[ "Apache-2.0" ]
null
null
null
pymoo/model/termination.py
temaurer/pymoo
1a2f3e0944ef7094df7518623e3ce23f94a39a39
[ "Apache-2.0" ]
null
null
null
pymoo/model/termination.py
temaurer/pymoo
1a2f3e0944ef7094df7518623e3ce23f94a39a39
[ "Apache-2.0" ]
null
null
null
from pymoo.indicators.igd import IGD class Termination: def __init__(self) -> None: super().__init__() self.flag = True def do_continue(self, D): return self.flag and self._do_continue(D) def has_finished(self, D): return not self.do_continue(D) class MaximumFunctionCallTermination(Termination): def __init__(self, n_max_evals) -> None: super().__init__() self.n_max_evals = n_max_evals def _do_continue(self, algorithm): return algorithm.evaluator.n_eval < self.n_max_evals class MaximumGenerationTermination(Termination): def __init__(self, n_max_gen) -> None: super().__init__() self.n_max_gen = n_max_gen def _do_continue(self, algorithm): return algorithm.n_gen < self.n_max_gen class IGDTermination(Termination): def __init__(self, min_igd, pf) -> None: super().__init__() if pf is None: raise Exception("You can only use IGD termination criteria if the pareto front is known!") self.obj = IGD(pf) self.igd = min_igd def _do_continue(self, algorithm): F = algorithm.pop.get("F") return self.obj.calc(F) > self.igd
23.843137
102
0.652961
162
1,216
4.512346
0.320988
0.043776
0.065663
0.120383
0.298222
0.240766
0.112175
0
0
0
0
0
0.247533
1,216
50
103
24.32
0.798907
0
0
0.225806
0
0
0.059259
0
0
0
0
0
0
1
0.290323
false
0
0.032258
0.129032
0.612903
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
0
0
1
1
0
0
3
ef5e8106892ddae27b9e2a25dc7833835b565130
77
py
Python
bo/testing.py
stjordanis/JTVAE
b53071841815ea47817b8f837ca789ac9f624df0
[ "MIT" ]
1
2020-10-15T12:40:39.000Z
2020-10-15T12:40:39.000Z
bo/testing.py
stjordanis/JTVAE
b53071841815ea47817b8f837ca789ac9f624df0
[ "MIT" ]
null
null
null
bo/testing.py
stjordanis/JTVAE
b53071841815ea47817b8f837ca789ac9f624df0
[ "MIT" ]
null
null
null
from inference import inference a=inference('./cancer_drugs_1.txt') print(a)
19.25
35
0.792208
12
77
4.916667
0.75
0
0
0
0
0
0
0
0
0
0
0.014085
0.077922
77
3
36
25.666667
0.816901
0
0
0
0
0
0.25974
0
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
3
ef5f39f94e9305ca95998d7d3a23a3254a841dbb
1,142
py
Python
load.py
parinithshekar/traffic-prediction
685dbf81a8edd55b302d778d4fb305e215384b15
[ "Apache-2.0" ]
2
2020-07-07T05:06:50.000Z
2020-11-19T19:41:22.000Z
load.py
parinithshekar/traffic-prediction
685dbf81a8edd55b302d778d4fb305e215384b15
[ "Apache-2.0" ]
null
null
null
load.py
parinithshekar/traffic-prediction
685dbf81a8edd55b302d778d4fb305e215384b15
[ "Apache-2.0" ]
null
null
null
from keras import backend as K from keras.models import load_model from models.keras_ssd300 import ssd_300 from keras_loss_function.keras_ssd_loss import SSDLoss from keras_layers.keras_layer_AnchorBoxes import AnchorBoxes from keras_layers.keras_layer_DecodeDetections import DecodeDetections from keras_layers.keras_layer_DecodeDetectionsFast import DecodeDetectionsFast from keras_layers.keras_layer_L2Normalization import L2Normalization def traffic_model(): # TODO: Set the path to the `.h5` file of the model to be loaded. model_path = 'traffic_model_ssd300.h5' # We need to create an SSDLoss object in order to pass that to the model loader. ssd_loss = SSDLoss(neg_pos_ratio=3, n_neg_min=0, alpha=1.0) K.clear_session() # Clear previous models from memory. model = load_model(model_path, custom_objects={'AnchorBoxes': AnchorBoxes, 'L2Normalization': L2Normalization, 'DecodeDetections': DecodeDetections, 'compute_loss': ssd_loss.compute_loss}) return model
47.583333
87
0.710158
142
1,142
5.464789
0.422535
0.081186
0.07732
0.103093
0.128866
0
0
0
0
0
0
0.021839
0.238179
1,142
24
88
47.583333
0.870115
0.154991
0
0
0
0
0.080042
0.023909
0
0
0
0.041667
0
1
0.058824
false
0
0.470588
0
0.588235
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
0
0
0
1
0
1
0
0
3
ef66fc20874ae9f2fd347b8c5fc476f91d973448
154
py
Python
gtm_manager/utils.py
trakken/gtm_manager
4825cc87daf36bf2feeae8c463243b128008e36f
[ "MIT" ]
7
2018-12-14T11:05:44.000Z
2021-12-03T18:33:17.000Z
gtm_manager/utils.py
trakken/gtm_manager
4825cc87daf36bf2feeae8c463243b128008e36f
[ "MIT" ]
2
2019-07-16T09:40:47.000Z
2019-08-22T20:57:04.000Z
gtm_manager/utils.py
trakken/gtm_manager
4825cc87daf36bf2feeae8c463243b128008e36f
[ "MIT" ]
3
2021-07-21T07:55:50.000Z
2022-01-14T12:54:02.000Z
"""utils.py""" def param_dict(param_list): """param_dict""" dct = {} for param in param_list: dct[param.key] = param return dct
15.4
30
0.571429
21
154
4
0.52381
0.214286
0
0
0
0
0
0
0
0
0
0
0.272727
154
9
31
17.111111
0.75
0.123377
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0
0.4
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
0
0
0
0
0
3
324d14bf9b43336993cb14be1a7ebcb782e05bb9
637
py
Python
python/challenges/datastructures/trees-height.py
KoderDojo/hackerrank
fc5ef49cd3e2c7af3f8ff864217f6ad0550760f3
[ "MIT" ]
1
2018-03-14T09:56:08.000Z
2018-03-14T09:56:08.000Z
python/challenges/datastructures/trees-height.py
KoderDojo/hackerrank
fc5ef49cd3e2c7af3f8ff864217f6ad0550760f3
[ "MIT" ]
null
null
null
python/challenges/datastructures/trees-height.py
KoderDojo/hackerrank
fc5ef49cd3e2c7af3f8ff864217f6ad0550760f3
[ "MIT" ]
null
null
null
""" Get Height of Binary Tree """ class Node: def __init__(self, data, left=None, right=None): self.data = data self.left = left self.right = right def get_height(root): """ >>> assert(get_height(None) == -1) >>> root = Node(1) >>> assert(get_height(root) == 0) >>> root = Node(1, Node(2)) >>> assert(get_height(root) == 1) >>> root = Node(1, Node(2, Node(3))) >>> assert(get_height(root) == 2) """ if root is None: return -1 height_left = get_height(root.left) height_right = get_height(root.right) return 1 + max(height_left, height_right)
20.548387
52
0.563579
88
637
3.909091
0.272727
0.209302
0.226744
0.165698
0.081395
0
0
0
0
0
0
0.025696
0.266876
637
30
53
21.233333
0.710921
0.386185
0
0
0
0
0
0
0
0
0
0
0
1
0.181818
false
0
0
0
0.454545
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
0
0
0
3
3257cd2b6d91adb5631a4cba72139b4b7b84f857
596
py
Python
okl4_kernel/okl4_2.1.1-patch.9/tools/magpie/magpie/targets/magpie/generic_target.py
CyberQueenMara/baseband-research
e1605537e10c37e161fff1a3416b908c9894f204
[ "MIT" ]
77
2018-12-31T22:12:09.000Z
2021-12-31T22:56:13.000Z
okl4_kernel/okl4_2.1.1-patch.9/tools/magpie/magpie/targets/magpie/generic_target.py
CyberQueenMara/baseband-research
e1605537e10c37e161fff1a3416b908c9894f204
[ "MIT" ]
null
null
null
okl4_kernel/okl4_2.1.1-patch.9/tools/magpie/magpie/targets/magpie/generic_target.py
CyberQueenMara/baseband-research
e1605537e10c37e161fff1a3416b908c9894f204
[ "MIT" ]
24
2019-01-20T15:51:52.000Z
2021-12-25T18:29:13.000Z
# Magpie generic mode # FIXME: This should go! from generator.v4generator import V4Generator from targets import base from targets.idl4 import generic_biguuid_l4v4_target as v4big import targets.idl4.generic_l4v4_target as generic Generator = V4Generator class Templates(base.Templates, v4big.SharedTemplates, v4big.ClientTemplates, generic.ConstantTemplates, generic.Types): """ Keep the "client" templates, redefine the "service" templates (for now) """ MAPPING = 'CORBA C' # Required for client templates. service = 'v4_magpie/main_service.template.c' public = ['client', 'service']
31.368421
120
0.786913
75
596
6.16
0.533333
0.08658
0.051948
0
0
0
0
0
0
0
0
0.024904
0.124161
596
18
121
33.111111
0.860153
0.244966
0
0
0
0
0.121005
0.075342
0
0
0
0.055556
0
1
0
false
0
0.444444
0
0.888889
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
0
0
0
1
0
1
0
0
3
326b79c0309101ba3f234122052dd8b143ce0f36
925
py
Python
ipgen/rtl_converter/interfaces.py
PyHDI/ipgen
811bdcfae61c6003dfc5f9b90ba7660a6f74a109
[ "Apache-2.0" ]
20
2015-11-13T02:01:18.000Z
2021-11-22T01:50:37.000Z
ipgen/rtl_converter/interfaces.py
PyHDI/ipgen
811bdcfae61c6003dfc5f9b90ba7660a6f74a109
[ "Apache-2.0" ]
1
2018-11-01T15:14:18.000Z
2018-11-01T15:14:18.000Z
ipgen/rtl_converter/interfaces.py
PyHDI/ipgen
811bdcfae61c6003dfc5f9b90ba7660a6f74a109
[ "Apache-2.0" ]
5
2017-04-11T04:33:57.000Z
2019-02-07T06:41:31.000Z
class Interface(object): def __init__(self, name, idx, addrwidth, datawidth, lite=False): self.name = name self.idx = idx self.datawidth = datawidth self.addrwidth = addrwidth self.lite = lite def __repr__(self): ret = [] ret.append('(') ret.append(self.__class__.__name__) ret.append(' ') ret.append('NAME:') ret.append(str(self.name)) ret.append(' ') ret.append('ID:') ret.append(str(self.idx)) ret.append(' ') ret.append('ADDR_WIDTH:') ret.append(str(self.addrwidth)) ret.append(' ') ret.append('DATA_WIDTH:') ret.append(str(self.datawidth)) ret.append(' ') ret.append('LITE:') ret.append(str(self.lite)) ret.append(')') return ''.join(ret) class MasterMemory(Interface): pass class SlaveMemory(Interface): pass
28.030303
68
0.555676
103
925
4.815534
0.242718
0.326613
0.145161
0.217742
0.173387
0
0
0
0
0
0
0
0.291892
925
32
69
28.90625
0.757252
0
0
0.166667
0
0
0.045405
0
0
0
0
0
0
1
0.066667
false
0.066667
0
0
0.2
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
0
0
1
0
0
0
0
0
3
32950399c6bbfd9e057eb2128a5de1d58972242b
243
py
Python
Chapter12/Exercise12.01/bookr/reviews/api_views.py
PacktPublishing/Web-Development-Projects-with-Django
531bc4d58d614888cc81b7fd6f8ec859f5a65217
[ "MIT" ]
97
2021-03-01T12:54:30.000Z
2022-03-28T02:57:26.000Z
Chapter12/Exercise12.01/bookr/reviews/api_views.py
PacktPublishing/Web-Development-Projects-with-Django
531bc4d58d614888cc81b7fd6f8ec859f5a65217
[ "MIT" ]
81
2020-08-27T04:56:04.000Z
2022-03-12T00:53:40.000Z
Chapter12/Exercise12.01/bookr/reviews/api_views.py
PacktPublishing/Web-Development-Projects-with-Django
531bc4d58d614888cc81b7fd6f8ec859f5a65217
[ "MIT" ]
163
2020-12-25T14:38:38.000Z
2022-03-30T10:31:40.000Z
from rest_framework.decorators import api_view from rest_framework.response import Response from .models import Book @api_view() def first_api_view(request): num_books = Book.objects.count() return Response({"num_books": num_books})
24.3
46
0.786008
35
243
5.2
0.514286
0.115385
0.186813
0
0
0
0
0
0
0
0
0
0.127572
243
9
47
27
0.858491
0
0
0
0
0
0.037037
0
0
0
0
0
0
1
0.142857
false
0
0.428571
0
0.714286
0
0
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
3
329dcc16e6958f02d157c9e7f037db4b1571e295
21
py
Python
crawlers/management/__init__.py
utsavnarayan/open2study
8ebee0040e478b6192d8d4bfcbe5ea47d6007053
[ "MIT" ]
null
null
null
crawlers/management/__init__.py
utsavnarayan/open2study
8ebee0040e478b6192d8d4bfcbe5ea47d6007053
[ "MIT" ]
null
null
null
crawlers/management/__init__.py
utsavnarayan/open2study
8ebee0040e478b6192d8d4bfcbe5ea47d6007053
[ "MIT" ]
null
null
null
__author__ = 'utsav'
10.5
20
0.714286
2
21
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
21
1
21
21
0.611111
0
0
0
0
0
0.238095
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
329fee97ae847636b2317adc17c35edb8fdd1abe
58
py
Python
ramda/split.py
zydmayday/pamda
6740d0294f3bedbeeef3bbc3042a43dceb3239b2
[ "MIT" ]
1
2022-03-14T07:35:13.000Z
2022-03-14T07:35:13.000Z
ramda/split.py
zydmayday/pamda
6740d0294f3bedbeeef3bbc3042a43dceb3239b2
[ "MIT" ]
3
2022-03-24T02:30:18.000Z
2022-03-31T07:46:04.000Z
ramda/split.py
zydmayday/pamda
6740d0294f3bedbeeef3bbc3042a43dceb3239b2
[ "MIT" ]
null
null
null
from .invoker import invoker split = invoker(1, 'split')
14.5
28
0.724138
8
58
5.25
0.625
0
0
0
0
0
0
0
0
0
0
0.020408
0.155172
58
3
29
19.333333
0.836735
0
0
0
0
0
0.086207
0
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
3
086e3777191cf2bbbe0e9877bd3d4477635a8d11
56
py
Python
examples/ada.py
designer-edu/designer
9c5d004e934300a30fb6d3148f4db313b69057df
[ "MIT" ]
3
2022-01-21T00:08:02.000Z
2022-03-09T19:00:26.000Z
examples/ada.py
krishols/designer
8f80b3309802d16d8577280274e0c9fa02db306b
[ "MIT" ]
24
2021-08-13T17:09:15.000Z
2022-01-05T16:12:09.000Z
examples/ada.py
designer-edu/designer
9c5d004e934300a30fb6d3148f4db313b69057df
[ "MIT" ]
null
null
null
from designer import * ada = image('ada.png') draw(ada)
14
22
0.696429
9
56
4.333333
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.142857
56
4
23
14
0.8125
0
0
0
0
0
0.122807
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
0
0
0
3
087c64ea2da8fb0bdfe29065603490c664252e33
875
py
Python
align/users/views.py
Robbie1977/AlignmentPipe
f7979cbf67a40619fd36ae1873c460439d7ecd64
[ "MIT" ]
null
null
null
align/users/views.py
Robbie1977/AlignmentPipe
f7979cbf67a40619fd36ae1873c460439d7ecd64
[ "MIT" ]
18
2015-03-03T15:55:37.000Z
2016-07-15T13:53:52.000Z
align/users/views.py
Robbie1977/AlignmentPipe
f7979cbf67a40619fd36ae1873c460439d7ecd64
[ "MIT" ]
null
null
null
from django.shortcuts import render_to_response from django.template.context import RequestContext from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseRedirect def home(request): return HttpResponseRedirect('/admin') # if not request.user == '': # try: # fn = User.objects.filter(username=request.user).values('first_name', 'last_name')[0] # except: # fn = {'first_name':'Unknown','last_name':'User'} # context = RequestContext(request, # {'request': request, # 'user': request.user}.update(fn)) # else: # context = RequestContext(request, # {'request': request, # 'user': request.user}) # return render_to_response('home.html', # context_instance=context)
39.772727
92
0.598857
86
875
5.988372
0.465116
0.128155
0.062136
0.135922
0.221359
0.221359
0.221359
0.221359
0
0
0
0.001582
0.277714
875
21
93
41.666667
0.813291
0.635429
0
0
0
0
0.019737
0
0
0
0
0
0
1
0.166667
false
0
0.666667
0.166667
1
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
0
0
1
1
1
0
0
3
0886a10438c3c56244fcf1940d315fc9a7549803
827
py
Python
Decision/RandomMovement.py
EdwardAlchikha/Capstone
2e6736d81b82e91f650029873fe10979f8e2ec95
[ "MIT" ]
null
null
null
Decision/RandomMovement.py
EdwardAlchikha/Capstone
2e6736d81b82e91f650029873fe10979f8e2ec95
[ "MIT" ]
null
null
null
Decision/RandomMovement.py
EdwardAlchikha/Capstone
2e6736d81b82e91f650029873fe10979f8e2ec95
[ "MIT" ]
null
null
null
from random import random from Actuation.IVehicleActuator import IVehicleActuator from Decision.IDecisionMaker import IDecisionMaker from Vision.ICamera import ICamera class RandomMovement(IDecisionMaker): def __init__(self, vehicle_actuator: IVehicleActuator, camera: ICamera): self._vehicle_actuator = vehicle_actuator self._camera = camera def start(self): self._vehicle_actuator.speed = random() * 0.5 self._vehicle_actuator.turning_speed = random() * 15 print(str(self._vehicle_actuator.speed) + " " + str(self._vehicle_actuator.turning_speed) + "\n") def stop(self): self._vehicle_actuator.speed = 0 self._vehicle_actuator.turning_speed = 0 print(str(self._vehicle_actuator.speed) + " " + str(self._vehicle_actuator.turning_speed) + "\n")
35.956522
105
0.726723
95
827
6.021053
0.284211
0.288462
0.332168
0.167832
0.440559
0.234266
0.234266
0.234266
0.234266
0.234266
0
0.008837
0.17896
827
22
106
37.590909
0.833579
0
0
0.125
0
0
0.007255
0
0
0
0
0
0
1
0.1875
false
0
0.25
0
0.5
0.125
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
0
0
3
0889df47644309244cea9009cfe1e90041bc37c5
432
py
Python
idp_schedule_provider/config.py
opusonesolutions/idp-schedule-provider
3755aade72e58daa487e181079008bfecf8c9685
[ "MIT" ]
null
null
null
idp_schedule_provider/config.py
opusonesolutions/idp-schedule-provider
3755aade72e58daa487e181079008bfecf8c9685
[ "MIT" ]
null
null
null
idp_schedule_provider/config.py
opusonesolutions/idp-schedule-provider
3755aade72e58daa487e181079008bfecf8c9685
[ "MIT" ]
null
null
null
import json import os from functools import lru_cache from typing import Dict from pydantic import BaseSettings class Settings(BaseSettings): jwt_algorithm: str = os.getenv("JWT_ALG", "HS256") jwt_secret_key: str = os.getenv("JWT_SECRET_KEY", "INSECURE_SECRET_KEY") jwt_clients: Dict[str, str] = json.loads(os.getenv("JWT_CLIENTS", '{"gridos": "gridos_pw"}')) @lru_cache() def get_settings(): return Settings()
24
97
0.733796
61
432
4.967213
0.47541
0.079208
0.108911
0.092409
0
0
0
0
0
0
0
0.008086
0.141204
432
17
98
25.411765
0.808625
0
0
0
0
0
0.18287
0
0
0
0
0
0
1
0.083333
true
0
0.416667
0.083333
0.916667
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
0
1
0
1
0
0
3
0897064eef80c6f492f0e205413871b11855949a
890
py
Python
python/test/graph/test_bfs.py
CianLR/AlgorithmImplementations
8921437de7b673da737999c1f670975d7fea978e
[ "MIT" ]
1
2018-05-29T22:40:47.000Z
2018-05-29T22:40:47.000Z
python/test/graph/test_bfs.py
CianLR/AlgorithmImplementations
8921437de7b673da737999c1f670975d7fea978e
[ "MIT" ]
null
null
null
python/test/graph/test_bfs.py
CianLR/AlgorithmImplementations
8921437de7b673da737999c1f670975d7fea978e
[ "MIT" ]
1
2021-10-21T13:54:13.000Z
2021-10-21T13:54:13.000Z
import unittest from graph.bfs import Node, BFS class TestBFS(unittest.TestCase): def test_single_node(self): n = Node(0) self.assertIs(BFS(n, 1), None) self.assertIs(BFS(n, 0), n) def test_multi_node(self): graph = [Node(i) for i in xrange(10, 50, 10)] graph[0].add_adj(graph[1]) graph[0].add_adj(graph[2]) graph[1].add_adj(graph[3]) graph[2].add_adj(graph[3]) # Start at 0 and traverse normally. self.assertIs(BFS(graph[0], 40), graph[3]) self.assertIs(BFS(graph[0], 30), graph[2]) # Start at 1, node 3 is reachable byt 2 isn't self.assertIs(BFS(graph[1], 40), graph[3]) self.assertIs(BFS(graph[1], 30), None) # Start at 3, nowhere reachable except itself. self.assertIs(BFS(graph[3], 40), graph[3]) self.assertIs(BFS(graph[3], 30), None)
31.785714
54
0.591011
141
890
3.673759
0.312057
0.185328
0.23166
0.23166
0.355212
0.162162
0.162162
0
0
0
0
0.066465
0.25618
890
27
55
32.962963
0.716012
0.137079
0
0
0
0
0
0
0
0
0
0
0.421053
1
0.105263
false
0
0.105263
0
0.263158
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
0
0
0
0
0
0
0
0
0
3
0898e05169b1c48ceb56778d5f1a1e4d8592ae74
174
py
Python
04_exploration/solutions/08_solution.py
glemaitre/x_exed_03_2020
b7c9a8553460d8e5173e5af01cfe87e9c06870fa
[ "CC0-1.0" ]
null
null
null
04_exploration/solutions/08_solution.py
glemaitre/x_exed_03_2020
b7c9a8553460d8e5173e5af01cfe87e9c06870fa
[ "CC0-1.0" ]
4
2019-02-22T21:37:20.000Z
2019-03-12T13:20:29.000Z
04_exploration/solutions/08_solution.py
glemaitre/x_exed_03_2019
fd776a6b6768aaad896dd51dd9442f7b8786b7a7
[ "CC0-1.0" ]
1
2020-04-17T10:42:49.000Z
2020-04-17T10:42:49.000Z
(data.groupby('title').aggregate(['mean', 'count'])[['rating']] .sort_values(by=[('rating', 'count')], ascending=False) .head(1))
43.5
77
0.477011
16
174
5.125
0.875
0
0
0
0
0
0
0
0
0
0
0.008065
0.287356
174
3
78
58
0.653226
0
0
0
0
0
0.178161
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
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
089926c36350ae3b0b70848114a074f819294545
181
py
Python
Iniciante/1005_media1.py
tiagodemacedo/exercicios-uri-online-judge
bd25ca96881807fcc2de148b8e4428a24a808a6f
[ "MIT" ]
null
null
null
Iniciante/1005_media1.py
tiagodemacedo/exercicios-uri-online-judge
bd25ca96881807fcc2de148b8e4428a24a808a6f
[ "MIT" ]
null
null
null
Iniciante/1005_media1.py
tiagodemacedo/exercicios-uri-online-judge
bd25ca96881807fcc2de148b8e4428a24a808a6f
[ "MIT" ]
null
null
null
a = float(input()) b = float(input()) peso_nota_a = 3.5 peso_nota_b = 7.5 media = (a * peso_nota_a + b * peso_nota_b) / (peso_nota_a + peso_nota_b) print(f"MEDIA = {media:.5f}")
18.1
73
0.646409
36
181
2.916667
0.361111
0.457143
0.257143
0
0
0
0
0
0
0
0
0.033333
0.171271
181
9
74
20.111111
0.666667
0
0
0
0
0
0.104972
0
0
0
0
0
0
1
0
false
0
0
0
0
0.166667
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
0
0
0
0
0
0
0
3
08a80ce12bec86a985ace8484d721bb6d8998181
1,388
py
Python
problems/341.flatten-nested-list-iterator/solution.py
mys1024/leetcode
e36976dec26cce7cffabc975eb08b41a657f90a0
[ "MIT" ]
null
null
null
problems/341.flatten-nested-list-iterator/solution.py
mys1024/leetcode
e36976dec26cce7cffabc975eb08b41a657f90a0
[ "MIT" ]
null
null
null
problems/341.flatten-nested-list-iterator/solution.py
mys1024/leetcode
e36976dec26cce7cffabc975eb08b41a657f90a0
[ "MIT" ]
null
null
null
# 341. 扁平化嵌套列表迭代器 # URL:https://leetcode-cn.com/problems/flatten-nested-list-iterator/ # 难度:中等 # 关键词:递归、扁平化、迭代器 # 执行用时:56 ms, 在所有 Python3 提交中击败了 87.02% 的用户 # 内存消耗:18.6 MB, 在所有 Python3 提交中击败了 5.44% 的用户 from __future__ import annotations from typing import List class NestedInteger: ''' 题目中 NestedInteger 接口的一个实现。 仅用于测试题解及提供类型提示,不是包含答案的一部分。 ''' def __init__(self, val: int | List[NestedInteger]) -> None: self.val = val def isInteger(self) -> bool: return not isinstance(self.val, list) def getInteger(self) -> int: return None if isinstance(self.val, list) else self.val def getList(self) -> List[NestedInteger]: return self.val if isinstance(self.val, list) else None def spread(nestedList: List[NestedInteger]): result: List[int] = [] for i in nestedList: if i.isInteger(): result.append(i.getInteger()) else: result += spread(i.getList()) return result class NestedIterator: def __init__(self, nestedList: List[NestedInteger]): self.list = spread(nestedList) self.length = len(self.list) self.index = 0 def next(self) -> int: value = self.list[self.index] self.index += 1 return value def hasNext(self) -> bool: return self.index != self.length # testCase = [NestedInteger(5), NestedInteger(6), NestedInteger([])] # it = NestedIterator(testCase) # while it.hasNext(): # print(it.next())
27.76
68
0.685159
186
1,388
5.048387
0.424731
0.052183
0.054313
0.067093
0.057508
0.057508
0
0
0
0
0
0.01847
0.180836
1,388
49
69
28.326531
0.807388
0.273055
0
0
0
0
0
0
0
0
0
0
0
1
0.266667
false
0
0.066667
0.133333
0.6
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
0
0
1
1
0
0
3
08aff72d1e94f664c3de38795ac6ddc9f8792a5a
223
py
Python
ex026.py
pepev123/PythonEx
8f39751bf87a9099d7b733aa829988595dab2344
[ "MIT" ]
null
null
null
ex026.py
pepev123/PythonEx
8f39751bf87a9099d7b733aa829988595dab2344
[ "MIT" ]
null
null
null
ex026.py
pepev123/PythonEx
8f39751bf87a9099d7b733aa829988595dab2344
[ "MIT" ]
null
null
null
f=str(input('Digite uma frase: ')).strip().upper() print('Tem {} A na frase.'.format(f.count('A'))) print('O primeiro A esta em {} letra.'.format(f.find('A')+1)) print('O ultimo A esta em {} letra.'.format(f.rfind('A')+1))
44.6
61
0.623318
41
223
3.390244
0.560976
0.151079
0.100719
0.172662
0.273381
0.273381
0
0
0
0
0
0.01
0.103139
223
4
62
55.75
0.685
0
0
0
0
0
0.434978
0
0
0
0
0
0
1
0
false
0
0
0
0
0.75
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
0
0
0
1
0
3
08dfb977d72bd09ef5e0e6a4a173d2610824f590
214
py
Python
printy/__main__.py
Tams-Tams/printy
19d8bce4901edac06778bf9adbbfdf2c049f275a
[ "MIT" ]
null
null
null
printy/__main__.py
Tams-Tams/printy
19d8bce4901edac06778bf9adbbfdf2c049f275a
[ "MIT" ]
null
null
null
printy/__main__.py
Tams-Tams/printy
19d8bce4901edac06778bf9adbbfdf2c049f275a
[ "MIT" ]
null
null
null
""" renders the helper text that shows some of the available functions by running python -m printy """ from printy import printy if __name__ == '__main__': from printy.helpme import helpme printy(helpme)
19.454545
66
0.738318
30
214
5
0.7
0.133333
0
0
0
0
0
0
0
0
0
0
0.191589
214
10
67
21.4
0.867052
0.439252
0
0
0
0
0.071429
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.75
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
0
1
0
0
1
0
3
3e96c22c5ce3a397ab9b67cef469f13d107f0755
176
py
Python
docs/FBON_integer_ranges.py
prollings/ttauri
51aa748eb52b72a06038ffa12952523cf3d4f9b6
[ "BSL-1.0" ]
null
null
null
docs/FBON_integer_ranges.py
prollings/ttauri
51aa748eb52b72a06038ffa12952523cf3d4f9b6
[ "BSL-1.0" ]
null
null
null
docs/FBON_integer_ranges.py
prollings/ttauri
51aa748eb52b72a06038ffa12952523cf3d4f9b6
[ "BSL-1.0" ]
null
null
null
bit_list = [19, 17, 16, 18, 26, 24, 22, 21, 23, 25] value = 5808 for bit in bit_list: new_value = value + 2 ** bit print(value, new_value-1) value = new_value
14.666667
51
0.596591
32
176
3.125
0.625
0.24
0.26
0
0
0
0
0
0
0
0
0.203125
0.272727
176
11
52
16
0.578125
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.166667
0
0
0
null
1
1
0
0
0
0
0
0
0
0
1
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
3
3eb8eb26385d8344dceaa3fe08a1e2e2a29b2b48
220
py
Python
ACM-Solution/Lpthwex11.py
wasi0013/Python-CodeBase
4a7a36395162f68f84ded9085fa34cc7c9b19233
[ "MIT" ]
2
2016-04-26T15:40:40.000Z
2018-07-18T10:16:42.000Z
ACM-Solution/Lpthwex11.py
wasi0013/Python-CodeBase
4a7a36395162f68f84ded9085fa34cc7c9b19233
[ "MIT" ]
1
2016-04-26T15:44:15.000Z
2016-04-29T14:44:40.000Z
LPTHWEX/Lpthwex11.py
wasi0013/Python-CodeBase
4a7a36395162f68f84ded9085fa34cc7c9b19233
[ "MIT" ]
1
2018-10-02T16:12:19.000Z
2018-10-02T16:12:19.000Z
print ("How old are you?"), age = input() print ("How tall are you?"), height = input() print ("How much do you weigh?"), weight = input() print ("So you are %r old, %r tall and %r heavy!"%(age,weight,height) )
24.444444
72
0.604545
36
220
3.694444
0.472222
0.180451
0.195489
0
0
0
0
0
0
0
0
0
0.209091
220
8
73
27.5
0.764368
0
0
0
0
0
0.448113
0
0
0
0
0
0
1
0
false
0
0
0
0
0.571429
0
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
0
1
0
3
3ec1422449dbbfc923b1bba7904e2ee34b68bfc7
136
py
Python
csvgb/coercions.py
bmccary/csvgb
dfe8c870291f50993fb12bf117725372dcdad123
[ "MIT" ]
null
null
null
csvgb/coercions.py
bmccary/csvgb
dfe8c870291f50993fb12bf117725372dcdad123
[ "MIT" ]
null
null
null
csvgb/coercions.py
bmccary/csvgb
dfe8c870291f50993fb12bf117725372dcdad123
[ "MIT" ]
null
null
null
from functools import partial from csvgb import tonnfloat, toint, all_g, equal0, isna for k in all_g(): globals()[k] = tonnfloat
17
55
0.720588
21
136
4.571429
0.714286
0.083333
0
0
0
0
0
0
0
0
0
0.009091
0.191176
136
7
56
19.428571
0.863636
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
3
3eeab0abc9d58d98651b216d8726b6e98ec2c2d6
218
py
Python
fieldbook/urls.py
bsab/django-fieldbook
70238a06c0a72ece18ec00e88019f4f8e00c27cd
[ "MIT" ]
6
2017-06-01T21:13:48.000Z
2017-09-25T09:44:13.000Z
fieldbook/urls.py
bsab/django-fieldbook
70238a06c0a72ece18ec00e88019f4f8e00c27cd
[ "MIT" ]
1
2017-06-04T11:03:54.000Z
2017-06-04T11:03:54.000Z
fieldbook/urls.py
bsab/django-fieldbook
70238a06c0a72ece18ec00e88019f4f8e00c27cd
[ "MIT" ]
null
null
null
from django.conf.urls import url, include from fieldbook.views.user import FieldBookUserRegistration urlpatterns = [ url(r'^user-register/$', FieldBookUserRegistration.as_view(), name="fieldbook_registration"), ]
31.142857
97
0.788991
24
218
7.083333
0.75
0
0
0
0
0
0
0
0
0
0
0
0.09633
218
7
98
31.142857
0.862944
0
0
0
0
0
0.173516
0.100457
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
3
3ef40f15a0c84e728a0ca0bcd0296b0abc9869af
510
py
Python
chamber/config.py
jsilhan/django-chamber
c9115e3cd907cf5cfca73d9b08d31ae697fb52a6
[ "BSD-3-Clause" ]
null
null
null
chamber/config.py
jsilhan/django-chamber
c9115e3cd907cf5cfca73d9b08d31ae697fb52a6
[ "BSD-3-Clause" ]
null
null
null
chamber/config.py
jsilhan/django-chamber
c9115e3cd907cf5cfca73d9b08d31ae697fb52a6
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings CHAMBER_MAX_FILE_UPLOAD_SIZE = getattr(settings, 'CHAMBER_MAX_FILE_UPLOAD_SIZE', 20) CHAMBER_MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME = getattr(settings, 'CHAMBER_MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME', None) CHAMBER_DEFAULT_IMAGE_ALLOWED_CONTENT_TYPES = getattr(settings, 'CHAMBER_DEFAULT_IMAGE_ALLOWED_CONTENT_TYPES', {'image/jpeg', 'image/png', 'image/gif'})
56.666667
118
0.666667
53
510
5.886792
0.490566
0.192308
0.211538
0.141026
0.717949
0.717949
0
0
0
0
0
0.005333
0.264706
510
8
119
63.75
0.826667
0
0
0
0
0
0.286275
0.231373
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0
0
0
0
null
0
1
0
0
1
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
3
4110e60044d2d66a82372edba14e4367c62c1b12
557
py
Python
Visualizing Data/line_graphs.py
python-sonchau/python-visualization
eb139aaabbff858663a96f8e19e30f1418e4330c
[ "MIT" ]
null
null
null
Visualizing Data/line_graphs.py
python-sonchau/python-visualization
eb139aaabbff858663a96f8e19e30f1418e4330c
[ "MIT" ]
null
null
null
Visualizing Data/line_graphs.py
python-sonchau/python-visualization
eb139aaabbff858663a96f8e19e30f1418e4330c
[ "MIT" ]
null
null
null
import seaborn as sns # importing seaborn functionality import pandas as pd import matplotlib.pyplot as plt ''' The first parameter is the list or array of x-values and the second parameter is the array of y-values. ''' flights_long=sns.load_dataset("flights") # importing dataset print(flights_long) # filtering the dataset to obtain the January records for all years flights_long=flights_long[flights_long.month == 'Jan'] print(flights_long) #plotting a line graph plot=sns.lineplot(flights_long.year, flights_long.passengers) plt.show()
37.133333
103
0.777379
85
557
4.988235
0.564706
0.207547
0.066038
0.103774
0
0
0
0
0
0
0
0
0.147217
557
14
104
39.785714
0.892632
0.251347
0
0.222222
0
0
0.033223
0
0
0
0
0
0
1
0
false
0.111111
0.333333
0
0.333333
0.222222
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
0
0
1
1
0
0
0
0
3
f5afc03027ac136ae3cea8a516276dd895f8e991
816
py
Python
chapter_03/07_color_mixer.py
SergeHall/Tony-Gaddis-Python-4th
24e7c70fbd196ff531a5e4e7f6f5021c4b4177ba
[ "MIT" ]
2
2021-04-07T03:26:37.000Z
2021-07-26T07:38:49.000Z
chapter_03/07_color_mixer.py
SergeHall/Tony-Gaddis-Python-4th
24e7c70fbd196ff531a5e4e7f6f5021c4b4177ba
[ "MIT" ]
null
null
null
chapter_03/07_color_mixer.py
SergeHall/Tony-Gaddis-Python-4th
24e7c70fbd196ff531a5e4e7f6f5021c4b4177ba
[ "MIT" ]
null
null
null
# color mixer print("Red, blue, and yellow are primary colors.") print() # ask user to choose two primary colors to mix color1 = input("Enter the primary color 1 (red,blue, or yellow): ") color2 = input("Enter the primary color 2 (red,blue, or yellow): ") if color1 == "red" and color2 == "blue": print("The secondary color is purple.") elif color1 == "blue" and color2 == "red": print("The secondary color is purple.") elif color1 == "red" and color2 == "yellow": print("The secondary color is orange.") elif color1 == "red" and color2 == "yellow": print("The secondary color is orange.") elif color1 == "blue" and color2 == "yellow": print("The secondary color is green.") elif color1 == "yellow" and color2 == "blue": print("The secondary color is green.") else: print("ERROR")
29.142857
67
0.659314
117
816
4.598291
0.282051
0.100372
0.189591
0.245353
0.672862
0.548327
0.52974
0.52974
0.234201
0.234201
0
0.024316
0.193627
816
27
68
30.222222
0.793313
0.068627
0
0.444444
0
0
0.494055
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
0
0
0
0
0
0
1
0
3
f5d580592331d3d4be913e881861b5f57eb69559
85
py
Python
django_base/outer/apps.py
Windsooon/youtube-channels
83ee3215cc5dff3dfd01979a7b5440d701029456
[ "MIT" ]
10
2017-11-12T19:14:36.000Z
2019-08-05T08:07:55.000Z
django_base/outer/apps.py
Windsooon/youtube-channels
83ee3215cc5dff3dfd01979a7b5440d701029456
[ "MIT" ]
3
2020-02-11T22:03:33.000Z
2021-06-10T19:56:27.000Z
django_base/outer/apps.py
Windsooon/youtube-channels
83ee3215cc5dff3dfd01979a7b5440d701029456
[ "MIT" ]
1
2019-12-26T19:30:21.000Z
2019-12-26T19:30:21.000Z
from django.apps import AppConfig class OuterConfig(AppConfig): name = 'outer'
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
0
0
0
3
f5db984a0738b40f89b2930eba0c7b3b026fd338
1,545
py
Python
2019_08_29_ufrj/python/dojo_test.py
samisafatli/dojo
3751f8413e70da84e928e037193e8cb03f6b3e65
[ "MIT" ]
114
2015-03-10T22:17:42.000Z
2022-03-09T17:49:48.000Z
2019_08_29_ufrj/python/dojo_test.py
samisafatli/dojo
3751f8413e70da84e928e037193e8cb03f6b3e65
[ "MIT" ]
9
2018-09-04T12:49:59.000Z
2019-11-17T21:29:51.000Z
2019_08_29_ufrj/python/dojo_test.py
samisafatli/dojo
3751f8413e70da84e928e037193e8cb03f6b3e65
[ "MIT" ]
39
2015-01-29T01:20:56.000Z
2022-02-17T16:26:25.000Z
import unittest from dojo import getProtocol from dojo import getDomain from dojo import getSubD from dojo import parserUrl class DojoTest(unittest.TestCase): def test_true(self): self.assertEqual(getProtocol("http://globo.com"), "http") def test_true2(self): self.assertEqual(getProtocol("https://globo.com"), "https") def test_true3(self): self.assertEqual(getProtocol("ftp://globo.com"), "ftp") def test_true4(self): self.assertEqual(getDomain("http://globo.com"), "globo.com") def test_true5(self): self.assertEqual(getDomain("http://globo.com/algumacoisa"), "globo.com") def test_true6(self): self.assertEqual(getDomain("http://globo.com.br/algumacoisa"), "globo.com.br") def test_true7(self): self.assertEqual(getSubD("http://g1.globo.com/algumacoisa"), "g1") def test_true8(self): self.assertEqual(getSubD("http://globo.com/algumacoisa"), None) def test_true9(self): self.assertEqual(getSubD("http://globo.com.br/algumacoisa"), None) def test_true10(self): self.assertEqual(getSubD("http://g1.globo.com.br/algumacoisa"), "g1") def test_true11(self): self.assertEqual(getDomain("https://g1.globo.com/e"), "globo.com") def test_true12(self): self.assertEqual(parserUrl("https://g1.globo.com/etc")["protocol"], "https") def test_true13(self): self.assertEqual(parserUrl("https://g1.globo.com/etc")["domain"], "globo.com") if __name__ == "__main__": unittest.main()
30.294118
86
0.667961
195
1,545
5.184615
0.225641
0.142433
0.244313
0.110781
0.389713
0.363996
0.363996
0.170129
0.090999
0
0
0.017802
0.163754
1,545
50
87
30.9
0.764706
0
0
0
0
0
0.264078
0
0
0
0
0
0.382353
1
0.382353
false
0
0.147059
0
0.558824
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
0
1
0
0
3
f5e92798ccc88366068c9058b384b8ce28956e91
128
py
Python
src/auto_version/tests/example.py
alf239/autoversion
a8db19e3e11691f3e38d06977ad2d8157dc0c0d2
[ "Apache-2.0" ]
2
2018-10-25T19:40:44.000Z
2019-11-20T06:17:49.000Z
src/auto_version/tests/example.py
alf239/autoversion
a8db19e3e11691f3e38d06977ad2d8157dc0c0d2
[ "Apache-2.0" ]
38
2018-11-15T10:48:09.000Z
2022-03-18T00:10:51.000Z
src/auto_version/tests/example.py
alf239/autoversion
a8db19e3e11691f3e38d06977ad2d8157dc0c0d2
[ "Apache-2.0" ]
5
2019-02-03T12:10:26.000Z
2021-06-24T20:42:04.000Z
LOCK = False RELEASE = True VERSION = "19.99.0" VERSION_AGAIN = "19.99.0" STRICT_VERSION = "19.99.0" UNRELATED_STRING = "apple"
18.285714
26
0.703125
21
128
4.142857
0.619048
0.137931
0.172414
0.275862
0
0
0
0
0
0
0
0.136364
0.140625
128
6
27
21.333333
0.654545
0
0
0
0
0
0.203125
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
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
0
0
0
0
0
3
eb094b6339f70fa0d45793133e3768afa3c7ad96
2,103
py
Python
agent/policies.py
RevanMacQueen/DRQN
7b8a743935679f65817ad4f41d28c2c155e7a62a
[ "MIT" ]
null
null
null
agent/policies.py
RevanMacQueen/DRQN
7b8a743935679f65817ad4f41d28c2c155e7a62a
[ "MIT" ]
null
null
null
agent/policies.py
RevanMacQueen/DRQN
7b8a743935679f65817ad4f41d28c2c155e7a62a
[ "MIT" ]
1
2021-03-14T23:31:53.000Z
2021-03-14T23:31:53.000Z
import numpy as np from scipy.special import softmax def random_argmax(a): ''' like np.argmax, but returns a random index in the case of ties parameters: a : (np.Array) ''' return np.random.choice(np.flatnonzero(a == a.max())) class EGreedyPolicy(object): def __init__(self, epsilon=0.1): self.epsilon = epsilon def get_p(self, q): ''' Return probability distribution p over actions representing a stochastic policy parameters: q : (np.Array) values for each action for a fixed state returns: p : (np.Array) probability of each action ''' q = q.flatten() num_actions = q.shape[0] p = np.ones(q.shape) * (self.epsilon/num_actions) argmax_a = random_argmax(q) p[argmax_a] += (1 - self.epsilon) return p def get_action(self, q): ''' Select action accoring to policy parameters: q : (np.Array) values for each action for a fixed state returns: a : (int) the selected action ''' p = self.get_p(q) num_actions = q.shape[0] a = np.random.choice(num_actions, p=p) return a class SoftmaxPolicy(object): def __init__(self, eta=1): self.eta = eta def get_p(self, q): ''' Return probability distribution p over actions representing a stochastic policy parameters: q : (np.Array) values for each action for a fixed state returns: p : (np.Array) probability of each action ''' q = q.flatten() p = softmax(self.eta*q) # probability of choosing each action return p def get_action(self, q): ''' Select action accoring to policy parameters: q : (np.Array) values for each action for a fixed state returns: a : (int) the selected action ''' p = self.get_p(q) num_actions = q.shape[0] a = np.random.choice(num_actions, p=p) return a
22.858696
87
0.562054
273
2,103
4.241758
0.230769
0.042314
0.058722
0.06563
0.657168
0.642487
0.642487
0.642487
0.642487
0.642487
0
0.005076
0.34427
2,103
91
88
23.10989
0.834663
0.404185
0
0.548387
0
0
0
0
0
0
0
0
0
1
0.225806
false
0
0.064516
0
0.516129
0
0
0
0
null
0
0
0
0
0
0
0
0
1
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
3
eb124909fb11b0deb8b1bd01debb78d8e9c2a2ba
389
py
Python
pytest/models/aws_cloud/e2_resource.py
Annapooraniqxf2/codacy
baaa9c165039ab0e16388d969bdc6c9b2a4ae3f5
[ "MIT" ]
null
null
null
pytest/models/aws_cloud/e2_resource.py
Annapooraniqxf2/codacy
baaa9c165039ab0e16388d969bdc6c9b2a4ae3f5
[ "MIT" ]
null
null
null
pytest/models/aws_cloud/e2_resource.py
Annapooraniqxf2/codacy
baaa9c165039ab0e16388d969bdc6c9b2a4ae3f5
[ "MIT" ]
null
null
null
""" This python file helps to read the ec2 instance information from AWS using boto3 """ import boto3 from abc import ABC, abstractmethod class Ec2(ABC): """This class is used to fetch details of ec2 instance using boto3""" def __init__(self) -> None: self.ec2_service = boto3.client('ec2') @abstractmethod def fetch_instance_info(): pass
19.45
80
0.66581
52
389
4.846154
0.596154
0.087302
0
0
0
0
0
0
0
0
0
0.030928
0.251928
389
20
81
19.45
0.835052
0.37018
0
0
0
0
0.012931
0
0
0
0
0
0
1
0.25
false
0.125
0.25
0
0.625
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
0
1
0
0
3
eb16bf62de2809b2062a0c28d16bafef01402e3e
143
py
Python
taskqueue/venv_tq/bin/unit2.py
matthappens/taskqueue
548979587326b95bf41851eb135052de782e74fc
[ "MIT" ]
1
2017-11-18T18:23:22.000Z
2017-11-18T18:23:22.000Z
taskqueue/venv_tq/bin/unit2.py
matthappens/taskqueue
548979587326b95bf41851eb135052de782e74fc
[ "MIT" ]
null
null
null
taskqueue/venv_tq/bin/unit2.py
matthappens/taskqueue
548979587326b95bf41851eb135052de782e74fc
[ "MIT" ]
null
null
null
#!/Users/matthewdavis/Desktop/Projects/scarecrowtq/scarecrowtq/venv_tq/bin/python __unittest = True from unittest2.main import main_ main_()
20.428571
81
0.818182
18
143
6.222222
0.833333
0
0
0
0
0
0
0
0
0
0
0.007576
0.076923
143
7
82
20.428571
0.840909
0.559441
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
0
0
0
3
eb2bc0e0e259e75fb1bd6b8cf34b3100b5405695
403
py
Python
library/tests/conftest.py
BillyTPilgrim/inkydev-python
c9bce44c6a97ab1ddb9b3584a177db2026bf6111
[ "MIT" ]
null
null
null
library/tests/conftest.py
BillyTPilgrim/inkydev-python
c9bce44c6a97ab1ddb9b3584a177db2026bf6111
[ "MIT" ]
3
2022-02-22T10:14:07.000Z
2022-03-01T11:55:35.000Z
library/tests/conftest.py
BillyTPilgrim/inkydev-python
c9bce44c6a97ab1ddb9b3584a177db2026bf6111
[ "MIT" ]
1
2022-02-22T10:38:15.000Z
2022-02-22T10:38:15.000Z
import sys import mock import pytest @pytest.fixture(scope='function', autouse=False) def smbus2(): """Mock smbus module.""" sys.modules['smbus2'] = mock.MagicMock() yield sys.modules['smbus2'] del sys.modules['smbus2'] @pytest.fixture(scope='function', autouse=False) def inkydev(): """Import scd4x module.""" import inkydev yield inkydev del sys.modules['inkydev']
20.15
48
0.674938
49
403
5.55102
0.387755
0.147059
0.176471
0.191176
0.301471
0.301471
0.301471
0
0
0
0
0.01497
0.171216
403
19
49
21.210526
0.799401
0.096774
0
0.153846
0
0
0.116147
0
0
0
0
0
0
1
0.153846
true
0
0.307692
0
0.461538
0
0
0
0
null
0
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
0
1
0
1
0
0
0
0
3
eb2d646db2d765f4263a7d0d83e06fc6bf7adefb
521
py
Python
fluid/config/slurm.py
PaulDodd/signac-flow-project-helpers
208c7c8da52c4b0108c3989c77423cc5ff86ba59
[ "MIT" ]
1
2017-05-30T14:22:59.000Z
2017-05-30T14:22:59.000Z
fluid/config/slurm.py
PaulDodd/signac-flow-project-helpers
208c7c8da52c4b0108c3989c77423cc5ff86ba59
[ "MIT" ]
null
null
null
fluid/config/slurm.py
PaulDodd/signac-flow-project-helpers
208c7c8da52c4b0108c3989c77423cc5ff86ba59
[ "MIT" ]
null
null
null
# Copyright (c) 2017 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. import platform import logging import re import argparse import datetime from .config import SubmitConfig logger = logging.getLogger("flow.{}".format(__name__)); class SLURMConfig(SubmitConfig): alias='slurm'; def __init__(self): pass def _parse_args(self, args): raise NotImplementedError("SLURMConfig._parse_args is not implemented yet!");
23.681818
85
0.744722
66
521
5.69697
0.742424
0.047872
0
0
0
0
0
0
0
0
0
0.011601
0.172745
521
21
86
24.809524
0.860789
0.266795
0
0
0
0
0.156085
0.060847
0
0
0
0
0
1
0.153846
false
0.076923
0.461538
0
0.769231
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
0
1
1
0
1
0
0
3
eb32afec01ea7ed96080d671efdf7b9fd5613803
593
py
Python
string-to-integer-atoi/test_string_to_integer_atoi.py
joaojunior/hackerrank
a5ee0449e791535930b8659dfb7dddcf9e1237de
[ "MIT" ]
null
null
null
string-to-integer-atoi/test_string_to_integer_atoi.py
joaojunior/hackerrank
a5ee0449e791535930b8659dfb7dddcf9e1237de
[ "MIT" ]
null
null
null
string-to-integer-atoi/test_string_to_integer_atoi.py
joaojunior/hackerrank
a5ee0449e791535930b8659dfb7dddcf9e1237de
[ "MIT" ]
1
2019-06-19T00:51:02.000Z
2019-06-19T00:51:02.000Z
from string_to_integer_atoi import Solution def test_example_1(): s = '42' expected = 42 assert expected == Solution().my_atoi(s) def test_example_2(): s = ' -42' expected = -42 assert expected == Solution().my_atoi(s) def test_example_3(): s = '4193 with words' expected = 4193 assert expected == Solution().my_atoi(s) def test_example_4(): s = 'words and 987' expected = 0 assert expected == Solution().my_atoi(s) def test_example_5(): s = '-91283472332' expected = -2147483648 assert expected == Solution().my_atoi(s)
18.53125
44
0.637437
81
593
4.444444
0.345679
0.097222
0.194444
0.333333
0.630556
0.630556
0.55
0.55
0.55
0.311111
0
0.10177
0.237774
593
31
45
19.129032
0.69469
0
0
0.238095
0
0
0.080944
0
0
0
0
0
0.238095
1
0.238095
false
0
0.047619
0
0.285714
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
0
0
0
3
de1a063fce925653a23490f0d76ec361d10d3776
7,176
py
Python
tests/_display/test_rotation_around_point_interface.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
16
2021-04-16T02:01:29.000Z
2022-01-01T08:53:49.000Z
tests/_display/test_rotation_around_point_interface.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
613
2021-03-24T03:37:38.000Z
2022-03-26T10:58:37.000Z
tests/_display/test_rotation_around_point_interface.py
simon-ritchie/apyscript
c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279
[ "MIT" ]
2
2021-06-20T07:32:58.000Z
2021-12-26T08:22:11.000Z
import re from random import randint from typing import List from typing import Match from typing import Optional from retrying import retry import apysc as ap from apysc._display import rotation_interface_helper from apysc._display.rotation_around_point_interface import \ RotationAroundPointInterface from apysc._expression import expression_data_util from apysc._expression import var_names from apysc._type.expression_string import ExpressionString class _TestInterface(RotationAroundPointInterface): def __init__(self) -> None: """ The class for the testing. """ self.variable_name = 'test_rotation_around_point_interface' class TestRotationAroundPointInterface: @retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000)) def test__initialize_rotation_around_point_if_not_initialized( self) -> None: interface: _TestInterface = _TestInterface() interface._initialize_rotation_around_point_if_not_initialized() assert interface._rotation_around_point == {} interface._rotation_around_point['a'] = ap.Int(10) interface._initialize_rotation_around_point_if_not_initialized() assert interface._rotation_around_point == {'a': ap.Int(10)} @retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000)) def test_get_rotation_around_point(self) -> None: interface: _TestInterface = _TestInterface() x: ap.Int = ap.Int(100) y: ap.Int = ap.Int(200) rotation: ap.Int = interface.get_rotation_around_point(x=x, y=y) assert rotation == 0 key_exp_str: ExpressionString = rotation_interface_helper.\ get_coordinates_key_for_expression(x=100, y=200) interface._rotation_around_point[key_exp_str.value] = ap.Int(50) rotation = interface.get_rotation_around_point(x=x, y=y) assert rotation == 50 @retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000)) def test_set_rotation_around_point(self) -> None: interface: _TestInterface = _TestInterface() rotation: ap.Int = ap.Int(50) x: ap.Int = ap.Int(100) y: ap.Int = ap.Int(200) interface.set_rotation_around_point(rotation=rotation, x=x, y=y) rotation = interface.get_rotation_around_point(x=x, y=y) assert rotation == 50 @retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000)) def test__append_rotation_around_point_update_expression(self) -> None: expression_data_util.empty_expression() interface: _TestInterface = _TestInterface() rotation: ap.Int = ap.Int(50) x: ap.Int = ap.Int(100) y: ap.Int = ap.Int(200) interface.set_rotation_around_point(rotation=rotation, x=x, y=y) expression: str = expression_data_util.get_current_expression() assert '.rotate(' in expression @retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000)) def test__make_snapshot(self) -> None: interface: _TestInterface = _TestInterface() x: ap.Int = ap.Int(50) y: ap.Int = ap.Int(100) rotation: ap.Int = ap.Int(90) interface.set_rotation_around_point( rotation=rotation, x=x, y=y) snapshot_name: str = interface._get_next_snapshot_name() interface._run_all_make_snapshot_methods(snapshot_name=snapshot_name) key_exp_str: ExpressionString = rotation_interface_helper.\ get_coordinates_key_for_expression( x=int(x._value), y=int(y._value)) assert interface._rotation_around_point_snapshots == { snapshot_name: {key_exp_str.value: rotation}} interface.set_rotation_around_point( rotation=ap.Int(120), x=x, y=y) interface._run_all_make_snapshot_methods(snapshot_name=snapshot_name) assert interface._rotation_around_point_snapshots == { snapshot_name: {key_exp_str.value: rotation}} @retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000)) def test__revert(self) -> None: interface: _TestInterface = _TestInterface() x: ap.Int = ap.Int(50) y: ap.Int = ap.Int(100) interface.set_rotation_around_point( rotation=ap.Int(90), x=x, y=y) snapshot_name: str = interface._get_next_snapshot_name() interface._run_all_make_snapshot_methods(snapshot_name=snapshot_name) interface.set_rotation_around_point( rotation=ap.Int(120), x=x, y=y) interface._run_all_revert_methods(snapshot_name=snapshot_name) key_exp_str: ExpressionString = rotation_interface_helper.\ get_coordinates_key_for_expression( x=int(x._value), y=int(y._value)) assert interface._rotation_around_point[key_exp_str.value] == 90 interface.set_rotation_around_point( rotation=ap.Int(120), x=x, y=y) interface._run_all_revert_methods(snapshot_name=snapshot_name) assert interface._rotation_around_point[key_exp_str.value] == 120 @retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000)) def test__get_rotation_around_point_updating_expression( self) -> None: expression_data_util.empty_expression() interface: _TestInterface = _TestInterface() rotation: ap.Int = ap.Int(50) x: ap.Int = ap.Int(100) y: ap.Int = ap.Int(200) key_exp_str: ExpressionString = rotation_interface_helper.\ get_coordinates_key_for_expression(x=x, y=y) key_exp_value: str = key_exp_str.value key_exp_value = key_exp_value.replace('(', '\\(') key_exp_value = key_exp_value.replace(')', '\\)') key_exp_value = key_exp_value.replace('+', '\\+') expression: str = \ interface._get_rotation_around_point_updating_expression( rotation=rotation, x=x, y=y) patterns: List[str] = [ rf'if \({key_exp_value} in ' rf'{interface._rotation_around_point.variable_name}\) {{', rf'\n var {var_names.INT}_.+? = ' rf'{interface._rotation_around_point.variable_name}\[' rf'{key_exp_value}\];', r'\n}else {' rf'\n {var_names.INT}_.+? = 0;', r'\n}', rf'\n{interface.variable_name}\.rotate\(' rf'-{var_names.INT}_.+?, {x.variable_name}, {y.variable_name}\);', rf'\n{interface.variable_name}\.rotate\(' rf'{rotation.variable_name}, {x.variable_name}, ' rf'{y.variable_name}\);', rf'\n{interface._rotation_around_point.variable_name}\[' rf'{key_exp_value}\] = {rotation.variable_name};' ] for i, pattern in enumerate(patterns): match: Optional[Match] = re.search( pattern=pattern, string=expression, flags=re.MULTILINE | re.DOTALL) assert match is not None, \ f'index: {i}, \n{expression}\n\n{pattern}'
44.571429
79
0.652453
884
7,176
4.927602
0.117647
0.045914
0.135216
0.036731
0.756428
0.740358
0.71809
0.692149
0.645546
0.639118
0
0.024305
0.243172
7,176
160
80
44.85
0.777757
0.003623
0
0.521739
0
0
0.087425
0.05168
0
0
0
0
0.07971
1
0.057971
false
0
0.086957
0
0.15942
0
0
0
0
null
0
0
0
0
1
1
0
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
3
de6f332002f2d33e86b1cb2d5ffa9c9d8fad6a13
98
py
Python
Software/C&C/modules/makedir.py
4n6strider/Spacenet
44e7acfc3d76a38623643ad4057403ad364cf253
[ "MIT" ]
1
2019-10-08T12:14:27.000Z
2019-10-08T12:14:27.000Z
Software/C&C/modules/makedir.py
evil5hadow/Spacenet
44e7acfc3d76a38623643ad4057403ad364cf253
[ "MIT" ]
null
null
null
Software/C&C/modules/makedir.py
evil5hadow/Spacenet
44e7acfc3d76a38623643ad4057403ad364cf253
[ "MIT" ]
2
2020-04-18T06:19:42.000Z
2021-03-26T02:11:25.000Z
import os # Function to create dir. def run(dst): if not os.path.exists(dst): os.makedirs(dst)
16.333333
28
0.704082
18
98
3.833333
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.163265
98
6
29
16.333333
0.841463
0.234694
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
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
0
0
0
0
0
0
3
de8cafe5e597c9c9b89ee13455089c18bdfc96cc
222
py
Python
3d_cnn/src/constants/h5_internal_paths.py
mrmattuschka/DeePiCt
ef3e81ea25705076f340175d97ccff98f8d11799
[ "Apache-2.0" ]
null
null
null
3d_cnn/src/constants/h5_internal_paths.py
mrmattuschka/DeePiCt
ef3e81ea25705076f340175d97ccff98f8d11799
[ "Apache-2.0" ]
2
2022-03-08T09:22:23.000Z
2022-03-20T21:13:07.000Z
3d_cnn/src/constants/h5_internal_paths.py
ZauggGroup/DeePiCt
0bdf1cd845cc306e66e30face1010c12ca3a38d0
[ "Apache-2.0" ]
null
null
null
RAW_SUBTOMOGRAMS = "volumes/raw" LABELED_SUBTOMOGRAMS = "volumes/labels/" PREDICTED_SEGMENTATION_SUBTOMOGRAMS = "volumes/predictions/" CLUSTERING_LABELS = "volumes/cluster_labels/" HDF_INTERNAL_PATH = "MDF/images/0/image"
37
60
0.81982
25
222
6.96
0.68
0.327586
0
0
0
0
0
0
0
0
0
0.004831
0.067568
222
5
61
44.4
0.835749
0
0
0
0
0
0.391892
0.103604
0
0
0
0
0
1
0
false
0
0
0
0
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
0
0
0
0
0
3
721a429124d0e4a5d2ea5d1dc3a03d12b3d5e875
1,674
py
Python
levelpy/serializer.py
rch/levelpy
59e546854b3d478f3467bd573eb5f6b4da62d239
[ "MIT" ]
4
2015-11-06T22:50:22.000Z
2020-05-31T14:49:58.000Z
levelpy/serializer.py
rch/levelpy
59e546854b3d478f3467bd573eb5f6b4da62d239
[ "MIT" ]
null
null
null
levelpy/serializer.py
rch/levelpy
59e546854b3d478f3467bd573eb5f6b4da62d239
[ "MIT" ]
3
2017-01-25T22:26:40.000Z
2021-03-24T07:49:33.000Z
# # levelpy/serializer.py # import json def json_encode(obj): return json.dumps(obj).encode() def json_decode(byte_str): return json.loads(byte_str.decode()) def utf8_encode(obj): if isinstance(obj, bytes): return obj elif isinstance(obj, bytearray): return bytes(obj) else: return str(obj).encode('utf8') def utf8_decode(byte_str): return byte_str.decode('utf8') def binary_encode(byte_str): return byte_str def binary_decode(byte_str): return byte_str class MsgPackSerializer: def __init__(self): self.pack, self.unpack = self.encode, self.decode @staticmethod def encode(obj): import msgpack return msgpack.packb(obj, use_bin_type=True) @staticmethod def decode(byte_str): import msgpack return msgpack.unpackb(byte_str, encoding='utf-8') class Serializer: transform_dict = { 'json': (json_encode, json_decode), 'utf8': (utf8_encode, utf8_decode), 'utf-8': (utf8_encode, utf8_decode), 'bin': (binary_encode, binary_decode), 'binary': (binary_encode, binary_decode), 'none': (binary_encode, binary_decode), 'msgpack': (MsgPackSerializer.encode, MsgPackSerializer.decode) } encode = {k: v[0] for k, v in transform_dict.items()} decode = {k: v[1] for k, v in transform_dict.items()} def __init__(self, method='utf-8'): self.pack, self.unpack = self.transform_dict[method] @classmethod def update(cls): cls.encode = {k: v[0] for k, v in cls.transform_dict.items()} cls.decode = {k: v[1] for k, v in cls.transform_dict.items()}
22.32
71
0.644564
222
1,674
4.662162
0.238739
0.067633
0.050242
0.027053
0.249275
0.18744
0.137198
0.102415
0
0
0
0.012432
0.231183
1,674
74
72
22.621622
0.791764
0.012545
0
0.12766
0
0
0.030928
0
0
0
0
0
0
1
0.234043
false
0
0.06383
0.106383
0.617021
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
0
0
1
1
0
0
3
722fa95ac9fff41c6dbe2c04c5693d50742bae30
83
py
Python
Week2/iterpower.py
Sid2697/MIT-6.00.1x
70514740701890d008e42af2b8662c57f762760b
[ "MIT" ]
3
2018-02-12T11:24:13.000Z
2021-01-27T07:15:16.000Z
Week2/iterpower.py
Sid2697/MIT-6.00.1x
70514740701890d008e42af2b8662c57f762760b
[ "MIT" ]
null
null
null
Week2/iterpower.py
Sid2697/MIT-6.00.1x
70514740701890d008e42af2b8662c57f762760b
[ "MIT" ]
null
null
null
def iterPower(base,exp): ans=1 while exp>0: ans=ans*base exp-=1 return ans
10.375
24
0.662651
16
83
3.4375
0.5625
0.254545
0
0
0
0
0
0
0
0
0
0.045455
0.204819
83
7
25
11.857143
0.787879
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0
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
0
0
0
0
0
3
72445031c5b70a0c62d667991a920674dc74af0c
6,938
py
Python
tests/test_rpc.py
blueshed/liteblue
9c2fd09cc1449631c86cf6cdda745f884dc90dbd
[ "MIT" ]
null
null
null
tests/test_rpc.py
blueshed/liteblue
9c2fd09cc1449631c86cf6cdda745f884dc90dbd
[ "MIT" ]
null
null
null
tests/test_rpc.py
blueshed/liteblue
9c2fd09cc1449631c86cf6cdda745f884dc90dbd
[ "MIT" ]
null
null
null
""" Test rpc handler """ import asyncio import json import logging import pytest import urllib.parse from tornado.httpclient import HTTPRequest, HTTPClientError from tornado.websocket import websocket_connect, WebSocketClosedError from liteblue import handlers async def test_register(http_server_client): """ register user used in all subsrquent tests """ body = urllib.parse.urlencode( {"email": "rpc@ws.com", "password": "12345", "submit": "register"} ) headers = { "Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain", } try: await http_server_client.fetch( "/login", headers=headers, method="POST", body=body, follow_redirects=False, ) except HTTPClientError as ex: assert ex.code == 302 @pytest.fixture async def cookie(http_server_client): response = await http_server_client.fetch( "/login", headers={ "Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain", }, method="POST", body=urllib.parse.urlencode( {"email": "rpc@ws.com", "password": "12345", "submit": "login"} ), follow_redirects=False, raise_error=False, ) return response.headers["Set-Cookie"] @pytest.fixture async def ws_client(http_server_port, cookie): request = HTTPRequest( f"ws://localhost:{http_server_port[1]}/ws", headers={"Cookie": await cookie}, ) result = await websocket_connect(request) return result async def test_login_fail(http_server_client, http_server_port, io_loop, caplog): handlers.BroadcastMixin.io_loop = io_loop with caplog.at_level(logging.DEBUG): ws_url = f"ws://localhost:{http_server_port[1]}/ws" client = await websocket_connect(ws_url) try: message = { "jsonrpc": "2.0", "id": "1a", "method": "add", "params": [2, 2], } await client.write_message(json.dumps(message)) except WebSocketClosedError: # we're not logged in pass client.close() await asyncio.sleep(0.01) async def test_add(ws_client, caplog): """ test add function via websocket """ client = await ws_client with caplog.at_level(logging.DEBUG): message = { "jsonrpc": "2.0", "id": "1a", "method": "add", "params": [2, 2], } await client.write_message(json.dumps(message)) response = await client.read_message() print(response) assert json.loads(response)["result"] == 4 client.close() await asyncio.sleep(0.01) async def test_a_add(ws_client): """ test add function via websocket """ client = await ws_client message = { "jsonrpc": "2.0", "id": "1a", "method": "a_add", "params": {"a": 2, "b": 2}, } await client.write_message(json.dumps(message)) response = await client.read_message() print(response) assert json.loads(response)["result"] == 4 client.close() await asyncio.sleep(0.01) async def test_no_such_func(ws_client): """ test add function via websocket """ client = await ws_client message = { "jsonrpc": "2.0", "id": "1a", "method": "b_add", "params": {"a": 2, "b": 2}, } await client.write_message(json.dumps(message)) response = await client.read_message() print(response) assert json.loads(response)["error"]["message"] == "no such method: b_add" client.close() await asyncio.sleep(0.01) async def test_private_func(ws_client): """ test add function via websocket """ client = await ws_client message = { "jsonrpc": "2.0", "id": "1a", "method": "_add", "params": {"a": 2, "b": 2}, } await client.write_message(json.dumps(message)) response = await client.read_message() print(response) assert json.loads(response)["error"]["message"] == "method private" client.close() await asyncio.sleep(0.01) async def test_method_missing(ws_client): """ test add function via websocket """ client = await ws_client message = {"jsonrpc": "2.0", "id": "1a", "params": {"a": 2, "b": 2}} await client.write_message(json.dumps(message)) response = await client.read_message() print(response) assert json.loads(response)["error"]["message"] == "no method" client.close() await asyncio.sleep(0.01) async def test_wrong_protocol(ws_client): """ test add function via websocket """ client = await ws_client try: message = { "jsonrpc": "1.0", "id": "1a", "method": "add", "params": [2, 2], } await client.write_message(json.dumps(message)) response = await client.read_message() print(response) assert json.loads(response)["error"]["message"] == "protocol not supported" finally: client.close() await asyncio.sleep(0.01) async def test_wrong_params(ws_client): """ test add function via websocket """ client = await ws_client message = {"jsonrpc": "2.0", "id": "1a", "method": "add", "params": 2} await client.write_message(json.dumps(message)) response = await client.read_message() print(response) assert json.loads(response)["error"]["message"] == "Params neither list or dict" client.close() await asyncio.sleep(0.01) async def test_broadcast(ws_client): """ test add function via websocket """ client = await ws_client message = {"jsonrpc": "2.0", "method": "say", "params": ["hi there"]} await client.write_message(json.dumps(message)) response = await client.read_message() print(response) assert json.loads(response) == { "action": "said", "message": "rpc says: 'hi there'", } client.close() await asyncio.sleep(0.01) async def test_exceptional(ws_client): """ test add function via websocket """ client = await ws_client message = { "jsonrpc": "2.0", "id": "1a", "method": "exceptional", "params": ["hi there"], } await client.write_message(json.dumps(message)) response = await client.read_message() print(response) assert json.loads(response)["error"] == { "code": -32000, "message": "hi there", } client.close() await asyncio.sleep(0.01) async def test_keep_alive(ws_client, caplog): """ test add function via websocket """ client = await ws_client with caplog.at_level(logging.DEBUG): handlers.BroadcastMixin.keep_alive() await asyncio.sleep(0.1) client.close() await asyncio.sleep(0.1)
26.380228
84
0.595705
813
6,938
4.9631
0.170972
0.043618
0.035688
0.053532
0.725403
0.720446
0.706072
0.688972
0.674597
0.674597
0
0.019566
0.263332
6,938
262
85
26.480916
0.769908
0.005477
0
0.587629
0
0
0.132806
0.022315
0
0
0
0
0.051546
1
0
false
0.015464
0.041237
0
0.051546
0.046392
0
0
0
null
0
0
0
0
1
1
0
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
3
a0c61ab2da01da55d4839eacab93b4cda1609b3a
191
py
Python
Restful_Api/api/request_wtih_token.py
ehtishammubarik/Restful_Api
aa0a84e07274e043f40f8e0473d856ee43764bdc
[ "MIT" ]
null
null
null
Restful_Api/api/request_wtih_token.py
ehtishammubarik/Restful_Api
aa0a84e07274e043f40f8e0473d856ee43764bdc
[ "MIT" ]
null
null
null
Restful_Api/api/request_wtih_token.py
ehtishammubarik/Restful_Api
aa0a84e07274e043f40f8e0473d856ee43764bdc
[ "MIT" ]
1
2021-02-23T07:13:20.000Z
2021-02-23T07:13:20.000Z
import requests url = 'http://127.0.0.1:8000/book-list/' headers = {'Authorization': 'Token b89d32509444214e563a7868e2e8de69cafe825f'} r = requests.get(url, headers=headers) print(r.json())
27.285714
77
0.748691
24
191
5.958333
0.75
0
0
0
0
0
0
0
0
0
0
0.211429
0.08377
191
6
78
31.833333
0.605714
0
0
0
0
0
0.47644
0.209424
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
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
3
a0d08a1759510ba01ce180c7ed442ff1f0ef8c04
2,180
py
Python
etils/array_types/__init__.py
google/etils
ff4c222cd6ce2f416d66a3cd64b39125f5ad25de
[ "Apache-2.0" ]
13
2021-12-14T19:18:53.000Z
2022-03-30T17:09:20.000Z
etils/array_types/__init__.py
google/etils
ff4c222cd6ce2f416d66a3cd64b39125f5ad25de
[ "Apache-2.0" ]
2
2022-01-07T01:34:33.000Z
2022-01-12T01:35:33.000Z
etils/array_types/__init__.py
google/etils
ff4c222cd6ce2f416d66a3cd64b39125f5ad25de
[ "Apache-2.0" ]
1
2022-01-04T14:34:30.000Z
2022-01-04T14:34:30.000Z
# Copyright 2022 The etils Authors. # # 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. """Typing utils.""" from etils.array_types import dtypes from etils.array_types.typing import ArrayAliasMeta from etils.array_types.typing import ArrayLike import numpy as np Array = ArrayAliasMeta(shape=None, dtype=dtypes.AnyDType()) FloatArray = ArrayAliasMeta(shape=None, dtype=dtypes.AnyFloat()) IntArray = ArrayAliasMeta(shape=None, dtype=dtypes.AnyInt()) BoolArray = ArrayAliasMeta(shape=None, dtype=np.bool_) StrArray = ArrayAliasMeta(shape=None, dtype=np.dtype('O')) ui8 = ArrayAliasMeta(shape=None, dtype=np.uint8) ui16 = ArrayAliasMeta(shape=None, dtype=np.uint16) ui32 = ArrayAliasMeta(shape=None, dtype=np.uint32) ui64 = ArrayAliasMeta(shape=None, dtype=np.uint64) i8 = ArrayAliasMeta(shape=None, dtype=np.int8) i16 = ArrayAliasMeta(shape=None, dtype=np.int16) i32 = ArrayAliasMeta(shape=None, dtype=np.int32) i64 = ArrayAliasMeta(shape=None, dtype=np.int64) f16 = ArrayAliasMeta(shape=None, dtype=np.float16) f32 = ArrayAliasMeta(shape=None, dtype=np.float32) f64 = ArrayAliasMeta(shape=None, dtype=np.float64) complex64 = ArrayAliasMeta(shape=None, dtype=np.complex64) complex128 = ArrayAliasMeta(shape=None, dtype=np.complex128) bool_ = ArrayAliasMeta(shape=None, dtype=np.bool_) # Random number generator jax key PRNGKey = ui32[2] # Keep API clean del np __all__ = [ 'ArrayAliasMeta', 'ArrayLike', 'Array', 'FloatArray', 'IntArray', 'BoolArray', 'StrArray', 'bool_', 'ui8', 'ui16', 'ui32', 'ui64', 'i8', 'i16', 'i32', 'i64', 'f16', 'f32', 'f64', 'complex64', 'complex128', 'PRNGKey', ]
29.459459
74
0.725688
287
2,180
5.473868
0.421603
0.22979
0.278167
0.338638
0.415022
0.08275
0
0
0
0
0
0.046512
0.151835
2,180
73
75
29.863014
0.803137
0.283028
0
0
0
0
0.084251
0
0
0
0
0
0
1
0
false
0
0.081633
0
0.081633
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
0
0
0
3
a0eb41bc0d863dfea3ae4fa16d305536bd333453
116
py
Python
notebooks/_solutions/case2_observations_analysis22.py
jonasvdd/DS-python-data-analysis
835226f562ee0b0631d70e48a17c4526ff58a538
[ "BSD-3-Clause" ]
65
2017-03-21T09:15:40.000Z
2022-02-01T23:43:08.000Z
notebooks/_solutions/case2_observations_analysis22.py
jonasvdd/DS-python-data-analysis
835226f562ee0b0631d70e48a17c4526ff58a538
[ "BSD-3-Clause" ]
100
2016-12-15T03:44:06.000Z
2022-03-07T08:14:07.000Z
notebooks/_solutions/case2_observations_analysis22.py
jorisvandenbossche/ICES-python-data
63864947657f37cb26cb4e2dcd67ff106dffe9cd
[ "BSD-3-Clause" ]
52
2016-12-19T07:48:52.000Z
2022-02-19T17:53:48.000Z
n_plot_sex = survey_data.groupby(["sex", "verbatimLocality"]).size().rename("count").reset_index() n_plot_sex.head()
58
98
0.75
17
116
4.764706
0.764706
0.123457
0.197531
0
0
0
0
0
0
0
0
0
0.034483
116
2
99
58
0.723214
0
0
0
0
0
0.205128
0
0
0
0
0
0
1
0
false
0
0
0
0
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
0
0
0
3
a0ebfb2f4a33a12f9fccfe7c4fa2bac3de2924ca
307
py
Python
arboretum/__init__.py
davidthaler/arboretum
01f8713fe78f952904894e143a0dc215f37fc8c5
[ "MIT" ]
1
2022-01-20T19:12:50.000Z
2022-01-20T19:12:50.000Z
arboretum/__init__.py
davidthaler/arboretum
01f8713fe78f952904894e143a0dc215f37fc8c5
[ "MIT" ]
null
null
null
arboretum/__init__.py
davidthaler/arboretum
01f8713fe78f952904894e143a0dc215f37fc8c5
[ "MIT" ]
null
null
null
''' Bring module functions and classes up to package namespace. ''' from .tree import Tree, RegressionTree, ClassificationTree from .forest import Forest, RFClassifier, RFRegressor from .gbm import GBRegressor, GBClassifier from .smooth_tree import SmoothTree, SmoothClassificationTree, SmoothRegressionTree
43.857143
83
0.833876
33
307
7.727273
0.727273
0.078431
0
0
0
0
0
0
0
0
0
0
0.107492
307
7
83
43.857143
0.930657
0.192182
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
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
0
1
0
1
0
0
0
0
3
a0fe0a7e6581545296237e4a25a16e7054be947c
321
py
Python
characterInput.py
dedeogluhu/python-beginner-projects
612c0e9fa983d1915bebc1fbc0152aee0976d692
[ "MIT" ]
null
null
null
characterInput.py
dedeogluhu/python-beginner-projects
612c0e9fa983d1915bebc1fbc0152aee0976d692
[ "MIT" ]
1
2020-09-27T10:12:39.000Z
2020-09-27T10:12:39.000Z
characterInput.py
dedeogluhu/python-beginner-projects
612c0e9fa983d1915bebc1fbc0152aee0976d692
[ "MIT" ]
null
null
null
name = input("Please enter your name:") age = int(input("Please enter your age:")) if type(name) == str: if type(age) == int: print(f"{name} you are {age} years old and you will be 100 after {100 - age} years") else: print("Please enter a valid number") else: print("please enter your name")
29.181818
92
0.623053
51
321
3.921569
0.490196
0.22
0.225
0.2
0
0
0
0
0
0
0
0.02449
0.23676
321
10
93
32.1
0.791837
0
0
0.222222
0
0.111111
0.523364
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
0
0
3
9d018b8d9676a4c3aee139a6c7e5ba176153206b
339
py
Python
src/onegov/gis/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/gis/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/gis/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import logging log = logging.getLogger('onegov.gis') # noqa log.addHandler(logging.NullHandler()) # noqa from onegov.gis.forms import CoordinatesField from onegov.gis.integration import MapboxApp from onegov.gis.models import Coordinates, CoordinatesMixin __all__ = ['Coordinates', 'CoordinatesMixin', 'CoordinatesField', 'MapboxApp']
33.9
78
0.79646
37
339
7.189189
0.486486
0.135338
0.146617
0
0
0
0
0
0
0
0
0
0.097345
339
9
79
37.666667
0.869281
0.026549
0
0
0
0
0.189602
0
0
0
0
0
0
1
0
false
0
0.571429
0
0.571429
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
0
1
0
0
3
9d3a3f55f81c0ac4d2605bb4b8bad6c8de5ef25b
313
py
Python
python/string/0087_scramble_string.py
linshaoyong/leetcode
ea052fad68a2fe0cbfa5469398508ec2b776654f
[ "MIT" ]
6
2019-07-15T13:23:57.000Z
2020-01-22T03:12:01.000Z
python/string/0087_scramble_string.py
linshaoyong/leetcode
ea052fad68a2fe0cbfa5469398508ec2b776654f
[ "MIT" ]
null
null
null
python/string/0087_scramble_string.py
linshaoyong/leetcode
ea052fad68a2fe0cbfa5469398508ec2b776654f
[ "MIT" ]
1
2019-07-24T02:15:31.000Z
2019-07-24T02:15:31.000Z
class Solution(object): def isScramble(self, s1, s2): """ :type s1: str :type s2: str :rtype: bool """ return True def test_is_scramble(): s = Solution() assert s.isScramble("great", "rgeat") is True assert s.isScramble("abcde", "caebd") is False
20.866667
50
0.549521
38
313
4.473684
0.631579
0.082353
0.2
0
0
0
0
0
0
0
0
0.018692
0.316294
313
14
51
22.357143
0.775701
0.127796
0
0
0
0
0.085837
0
0
0
0
0
0.285714
1
0.285714
false
0
0
0
0.571429
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
0
1
0
0
3
9d3df32e050dbc41a085a276361ffadf294d73ab
567
py
Python
mlkernels/kernels/zero.py
darsh8200/mlkernels
cad223c422a32bc10375358fda076645efca62f1
[ "MIT" ]
null
null
null
mlkernels/kernels/zero.py
darsh8200/mlkernels
cad223c422a32bc10375358fda076645efca62f1
[ "MIT" ]
1
2021-07-09T06:58:46.000Z
2021-07-09T06:58:46.000Z
mlkernels/kernels/zero.py
darsh8200/mlkernels
cad223c422a32bc10375358fda076645efca62f1
[ "MIT" ]
null
null
null
import lab as B from algebra import ZeroFunction from matrix import Zero from . import _dispatch from .. import Kernel from ..util import num_elements __all__ = ["ZeroKernel"] class ZeroKernel(Kernel, ZeroFunction): """Constant kernel of `0`.""" @property def _stationary(self): return True @_dispatch def pairwise(k: ZeroKernel, x: B.Numeric, y: B.Numeric): return Zero(B.dtype(x), num_elements(x), num_elements(y)) @_dispatch def elwise(k: ZeroKernel, x: B.Numeric, y: B.Numeric): return B.zeros(B.dtype(x), num_elements(x), 1)
20.25
61
0.700176
82
567
4.695122
0.426829
0.114286
0.093506
0.067532
0.280519
0.280519
0.181818
0.181818
0.181818
0
0
0.004283
0.176367
567
27
62
21
0.820128
0.040564
0
0.117647
0
0
0.018587
0
0
0
0
0
0
1
0.176471
false
0
0.352941
0.176471
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
0
0
0
0
0
0
1
1
1
0
0
3
9d474c298e1ce53d2a0d545367a876082d9741b6
95
py
Python
processing_pipeline/constants.py
sagivharel/anyway-backend
6250edd75ff7592b6916f8924a5ee99c617df6b5
[ "MIT" ]
null
null
null
processing_pipeline/constants.py
sagivharel/anyway-backend
6250edd75ff7592b6916f8924a5ee99c617df6b5
[ "MIT" ]
24
2019-11-18T18:32:29.000Z
2021-03-31T19:22:12.000Z
processing_pipeline/constants.py
sagivharel/anyway-backend
6250edd75ff7592b6916f8924a5ee99c617df6b5
[ "MIT" ]
17
2019-11-01T11:49:49.000Z
2020-09-26T15:49:02.000Z
TASK = "task" TASK_INSTANCE = "task_instance" X = "X" Y = "Y" MAHOZ = "MAHOZ" XY = f"{X}/{Y}"
11.875
31
0.557895
16
95
3.1875
0.4375
0.313725
0
0
0
0
0
0
0
0
0
0
0.2
95
7
32
13.571429
0.671053
0
0
0
0
0
0.326316
0
0
0
0
0
0
1
0
false
0
0
0
0
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
0
0
0
0
0
3
9d50fd2f1933a9788b7601f6bd4c2f0cb8cb817f
2,871
py
Python
test/dvc/test_commands.py
giganticode/bohr-framework
fd364a1f036123985ac96e9076e5dce3bbc2ca2c
[ "MIT" ]
null
null
null
test/dvc/test_commands.py
giganticode/bohr-framework
fd364a1f036123985ac96e9076e5dce3bbc2ca2c
[ "MIT" ]
54
2021-02-17T13:36:51.000Z
2021-08-25T05:06:57.000Z
test/dvc/test_commands.py
giganticode/bohr-framework
fd364a1f036123985ac96e9076e5dce3bbc2ca2c
[ "MIT" ]
null
null
null
from pathlib import Path from unittest import mock import pytest from bohr.config.pathconfig import PathConfig from bohr.dvc.commands import add, pull, repro, status @mock.patch("bohr.dvc.commands.subprocess", autospec=True) def test_status(subprocess_mock): status(PathConfig(Path("/project_root"), Path("/software-root"))) subprocess_mock.check_output.assert_called_with( ["dvc", "status"], cwd=Path("/project_root"), encoding="utf8" ) @mock.patch("bohr.dvc.commands.subprocess", autospec=True) def test_add(subprocess_mock): add(Path("path/to/dataset.csv"), Path("/project_root")) subprocess_mock.check_output.assert_called_with( ["dvc", "add", "dataset.csv"], cwd=Path("/project_root/path/to"), encoding="utf8", ) @mock.patch("bohr.dvc.commands.subprocess", autospec=True) def test_pull_paths_not_iterable(subprocess_mock): with pytest.raises(ValueError): pull( Path("path/to/dataset.csv"), PathConfig(Path("/project_root"), Path("/software-path")), ) @mock.patch("bohr.dvc.commands.subprocess", autospec=True) def test_pull(subprocess_mock): pull( ["path/to/dataset1.csv", "path/to/dataset2.csv"], PathConfig(Path("/project_root"), Path("/software-path")), ) subprocess_mock.check_output.assert_called_with( ["dvc", "pull", "path/to/dataset1.csv", "path/to/dataset2.csv"], cwd=Path("/project_root"), encoding="utf8", ) @mock.patch("bohr.dvc.commands.subprocess", autospec=True) def test_repro(subprocess_mock): repro(path_config=PathConfig(Path("/project_root"), Path("/software-path"))) subprocess_mock.check_output.assert_called_with( ["dvc", "repro"], cwd=Path("/project_root"), encoding="utf8" ) @mock.patch("bohr.dvc.commands.subprocess", autospec=True) def test_repro_with_stages(subprocess_mock): repro( ["stage1", "stage2"], path_config=PathConfig(Path("/project_root"), Path("/software-path")), ) subprocess_mock.check_output.assert_called_with( ["dvc", "repro", "stage1", "stage2"], cwd=Path("/project_root"), encoding="utf8" ) @mock.patch("bohr.dvc.commands.subprocess", autospec=True) def test_repro_pull(subprocess_mock): repro( pull=True, path_config=PathConfig(Path("/project_root"), Path("/software-path")) ) subprocess_mock.check_output.assert_called_with( ["dvc", "repro", "--pull"], cwd=Path("/project_root"), encoding="utf8" ) @mock.patch("bohr.dvc.commands.subprocess", autospec=True) def test_repro_force(subprocess_mock): repro( force=True, path_config=PathConfig(Path("/project_root"), Path("/software-path")), ) subprocess_mock.check_output.assert_called_with( ["dvc", "repro", "--force"], cwd=Path("/project_root"), encoding="utf8" )
32.625
88
0.677813
353
2,871
5.314448
0.133144
0.11194
0.119936
0.06823
0.771855
0.740938
0.705224
0.705224
0.68177
0.590085
0
0.006178
0.154302
2,871
87
89
33
0.766474
0
0
0.376812
0
0
0.269244
0.085336
0
0
0
0
0.101449
1
0.115942
false
0
0.072464
0
0.188406
0
0
0
0
null
0
0
0
0
1
1
1
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
3
9d5eec514942adb02b3852a8a8a873590576d9c2
1,704
py
Python
testsuite/gateways/gateways.py
mijaros/3scale-tests
6cb25b4da6e444bd309ff8bd7ee8d3b4a6f2f64f
[ "Apache-2.0" ]
null
null
null
testsuite/gateways/gateways.py
mijaros/3scale-tests
6cb25b4da6e444bd309ff8bd7ee8d3b4a6f2f64f
[ "Apache-2.0" ]
null
null
null
testsuite/gateways/gateways.py
mijaros/3scale-tests
6cb25b4da6e444bd309ff8bd7ee8d3b4a6f2f64f
[ "Apache-2.0" ]
null
null
null
"""Module containing all basic gateways""" from abc import ABC, abstractmethod from datetime import datetime from typing import List, TYPE_CHECKING, Optional from testsuite.capabilities import Capability from testsuite.lifecycle_hook import LifecycleHook from testsuite.openshift.env import Environ from testsuite.requirements import OpenshiftRequirement if TYPE_CHECKING: from testsuite.openshift.client import OpenShiftClient class GatewayRequirements(OpenshiftRequirement, ABC): """Requirements for running gateways""" @property @abstractmethod def staging(self) -> bool: """Returns if the current gateway is staging or production""" @property @abstractmethod def current_openshift(self) -> "OpenShiftClient": """Returns currently configured openshift""" class AbstractGateway(LifecycleHook, ABC): """Basic gateway for use with Apicast""" CAPABILITIES: List[Capability] = [] @property def environ(self) -> Environ: """Returns environ object for given gateway""" raise NotImplementedError() @abstractmethod def create(self): """Starts this gateway""" @abstractmethod def destroy(self): """Destroys gateway""" class AbstractApicast(AbstractGateway, ABC): """Interface defining basic functionality of an Apicast gateway""" CAPABILITIES = [Capability.APICAST] @abstractmethod def reload(self): """Reloads gateway""" @abstractmethod def get_logs(self, since_time: Optional[datetime] = None) -> str: """Gets the logs of the active Apicast pod from specific time""" def create(self): pass def destroy(self): pass
25.818182
72
0.704812
176
1,704
6.789773
0.448864
0.085356
0.03682
0
0
0
0
0
0
0
0
0
0.205986
1,704
65
73
26.215385
0.883222
0.242958
0
0.428571
0
0
0.012156
0
0
0
0
0
0
1
0.257143
false
0.057143
0.228571
0
0.628571
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
0
1
0
0
3
19ca4fa2f52022fb084396ff3a93578178b58c7c
244
py
Python
seekrApi/render.py
santiagoMeloMedina/Seekr
4ef1d1b70b7e8e76b10d26c89bcd951f0bb09f30
[ "MIT" ]
null
null
null
seekrApi/render.py
santiagoMeloMedina/Seekr
4ef1d1b70b7e8e76b10d26c89bcd951f0bb09f30
[ "MIT" ]
null
null
null
seekrApi/render.py
santiagoMeloMedina/Seekr
4ef1d1b70b7e8e76b10d26c89bcd951f0bb09f30
[ "MIT" ]
null
null
null
from flask import render_template class RenderService: def __init__(self, info): self.__name = info['name'] return def render(self, data): return render_template("index.html", data=data, app_name=self.__name)
22.181818
77
0.672131
31
244
4.935484
0.548387
0.183007
0
0
0
0
0
0
0
0
0
0
0.22541
244
10
78
24.4
0.809524
0
0
0
0
0
0.057613
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.857143
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
0
0
1
1
0
0
3
19dd8af28897f297c5b7997610b21b7e7c04e757
372
py
Python
Cartwheel/lib/Python26/Lib/site-packages/OpenGL/GL/EXT/packed_pixels.py
MontyThibault/centre-of-mass-awareness
58778f148e65749e1dfc443043e9fc054ca3ff4d
[ "MIT" ]
null
null
null
Cartwheel/lib/Python26/Lib/site-packages/OpenGL/GL/EXT/packed_pixels.py
MontyThibault/centre-of-mass-awareness
58778f148e65749e1dfc443043e9fc054ca3ff4d
[ "MIT" ]
null
null
null
Cartwheel/lib/Python26/Lib/site-packages/OpenGL/GL/EXT/packed_pixels.py
MontyThibault/centre-of-mass-awareness
58778f148e65749e1dfc443043e9fc054ca3ff4d
[ "MIT" ]
null
null
null
'''OpenGL extension EXT.packed_pixels This module customises the behaviour of the OpenGL.raw.GL.EXT.packed_pixels to provide a more Python-friendly API ''' from OpenGL import platform, constants, constant, arrays from OpenGL import extensions, wrapper from OpenGL.GL import glget import ctypes from OpenGL.raw.GL.EXT.packed_pixels import * ### END AUTOGENERATED SECTION
31
56
0.80914
55
372
5.418182
0.6
0.134228
0.151007
0.09396
0.174497
0.174497
0
0
0
0
0
0
0.123656
372
12
57
31
0.91411
0.478495
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
0
1
0
1
0
0
3
c20bf29d0b75e314c0f1926047f005294eca6130
215
py
Python
generate_secret_key.py
svelle/Lagerregal
d0340d2fa5bbb8dfc090c23a772f46f769064ea1
[ "BSD-3-Clause" ]
null
null
null
generate_secret_key.py
svelle/Lagerregal
d0340d2fa5bbb8dfc090c23a772f46f769064ea1
[ "BSD-3-Clause" ]
null
null
null
generate_secret_key.py
svelle/Lagerregal
d0340d2fa5bbb8dfc090c23a772f46f769064ea1
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals from django.utils.crypto import get_random_string chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*(-_=+)' print(get_random_string(50, chars))
30.714286
86
0.823256
21
215
7.952381
0.714286
0.107784
0.179641
0
0
0
0
0
0
0
0
0.06
0.069767
215
6
87
35.833333
0.775
0
0
0
0
0
0.353488
0.353488
0
0
0
0
0
1
0
false
0
0.5
0
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
0
0
0
1
0
0
0
0
3
c233495653c70a92364989062236b00a4da1e34b
2,628
py
Python
pbt/cars/Sign.py
jtyr/python_bullet_train
44867278dd5645b2889909a016dbb59f9b495ec6
[ "MIT" ]
1
2018-05-08T16:04:58.000Z
2018-05-08T16:04:58.000Z
pbt/cars/Sign.py
jtyr/python_bullet_train
44867278dd5645b2889909a016dbb59f9b495ec6
[ "MIT" ]
null
null
null
pbt/cars/Sign.py
jtyr/python_bullet_train
44867278dd5645b2889909a016dbb59f9b495ec6
[ "MIT" ]
2
2018-08-02T10:49:08.000Z
2020-11-21T15:13:29.000Z
# -*- coding: utf-8 -*- from os import getenv, getuid from pbt.core import Car class SignCar(Car): default_root_bg = getenv('PBT_CAR_BG', 'default') default_root_fg = getenv('PBT_CAR_FG', 'default') default_root_fm = getenv('PBT_CAR_FM', 'none') default_symbol_bg = default_root_bg default_symbol_fg = default_root_fg default_symbol_fm = 'bold' default_user_bg = default_root_bg default_user_fm = default_symbol_fm default_admin_bg = default_root_bg default_admin_fm = default_symbol_fm model = { 'root': { 'bg': getenv('PBT_CAR_SIGN_BG', default_root_bg), 'fg': getenv('PBT_CAR_SIGN_FG', default_root_fg), 'fm': getenv('PBT_CAR_SIGN_FM', default_root_fm), 'text': getenv('PBT_CAR_SIGN_FORMAT', ' {{ Symbol }} '), }, 'Symbol': { 'bg': getenv( 'PBT_CAR_SIGN_SYMBOL_BG', getenv( 'PBT_CAR_SIGN_BG', default_symbol_bg)), 'fg': getenv( 'PBT_CAR_SIGN_SYMBOL_FG', getenv( 'PBT_CAR_SIGN_FG', default_symbol_fg)), 'fm': getenv( 'PBT_CAR_SIGN_SYMBOL_FM', getenv( 'PBT_CAR_SIGN_FM', default_symbol_fm)), 'text': getenv( 'PBT_CAR_SIGN_SYMBOL_FORMAT', '{{ %s }}' % ('Admin' if getuid() == 0 else 'User')), }, 'User': { 'bg': getenv( 'PBT_CAR_SIGN_USER_BG', getenv( 'PBT_CAR_SIGN_SYMBOL_BG', getenv( 'PBT_CAR_SIGN_BG', default_user_bg))), 'fg': getenv('PBT_CAR_SIGN_USER_FG', 'light_green'), 'fm': getenv( 'PBT_CAR_SIGN_USER_FM', getenv( 'PBT_CAR_SIGN_SYMBOL_FM', getenv( 'PBT_CAR_SIGN_FM', default_user_fm))), 'text': getenv('PBT_CAR_SIGN_USER_TEXT', '$'), }, 'Admin': { 'bg': getenv( 'PBT_CAR_SIGN_ADMIN_BG', getenv( 'PBT_CAR_SIGN_SYMBOL_BG', getenv( 'PBT_CAR_SIGN_BG', default_user_bg))), 'fg': getenv('PBT_CAR_SIGN_ADMIN_FG', 'red'), 'fm': getenv( 'PBT_CAR_SIGN_ADMIN_FM', getenv( 'PBT_CAR_SIGN_SYMBOL_FM', getenv( 'PBT_CAR_SIGN_FM', default_admin_fm))), 'text': getenv('PBT_CAR_SIGN_ADMIN_TEXT', '#'), }, } display = getenv('PBT_CAR_SIGN_DISPLAY', True) wrap = getenv('PBT_CAR_SIGN_WRAP', False) sep = getenv('PBT_CAR_SIGN_SEP', None)
37.542857
69
0.544901
314
2,628
4.035032
0.124204
0.234412
0.312549
0.378848
0.630624
0.501973
0.364641
0.2794
0.2794
0.2794
0
0.001138
0.331431
2,628
69
70
38.086957
0.719977
0.007991
0
0.225806
0
0
0.279463
0.110557
0
0
0
0
0
1
0
false
0
0.032258
0
0.274194
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
0
0
0
3
dfa1339c58d11d8b56e7cc2c52dafdae0cc5c1ed
57
py
Python
pawan/lib/python3.6/rlcompleter.py
pawannn29/projectdjango
a2c269b99676109a9a28f1ff3bc26b3d7779056c
[ "bzip2-1.0.6" ]
null
null
null
pawan/lib/python3.6/rlcompleter.py
pawannn29/projectdjango
a2c269b99676109a9a28f1ff3bc26b3d7779056c
[ "bzip2-1.0.6" ]
null
null
null
pawan/lib/python3.6/rlcompleter.py
pawannn29/projectdjango
a2c269b99676109a9a28f1ff3bc26b3d7779056c
[ "bzip2-1.0.6" ]
null
null
null
/Users/NikhilArora/anaconda3/lib/python3.6/rlcompleter.py
57
57
0.859649
8
57
6.125
1
0
0
0
0
0
0
0
0
0
0
0.052632
0
57
1
57
57
0.807018
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
3
dfa1f4f4dd9bef3a94f16675f7820ebbde42714c
2,774
py
Python
data/synthetic_data/full_dsets/single_dim.py
HySynth/HySynth
b33b34ff5db138b5d007d0dcd32d53c9f8964b62
[ "MIT" ]
4
2021-03-05T11:18:35.000Z
2021-12-09T18:51:32.000Z
data/synthetic_data/full_dsets/single_dim.py
HySynth/HySynth
b33b34ff5db138b5d007d0dcd32d53c9f8964b62
[ "MIT" ]
null
null
null
data/synthetic_data/full_dsets/single_dim.py
HySynth/HySynth
b33b34ff5db138b5d007d0dcd32d53c9f8964b62
[ "MIT" ]
null
null
null
""" This module is a library of synthetic example datasets """ from data.synthetic_data.generator import construct_signal_from_run, sloped_line_df, straight_line_df from data.synthetic_data.visualisation import plot_data, plot_1D sloped_lines_dict = { "a": sloped_line_df(1, num_points=5), "b": sloped_line_df(-1, start=5, num_points=5), "c": straight_line_df(0, num_points=5), "d": straight_line_df(5, num_points=5) } @plot_data(plot_1D) def peak(): run_list = ["a", "b"] return construct_signal_from_run(sloped_lines_dict, run_list) @plot_data(plot_1D) def valey(): run_list = ["b", "a"] return construct_signal_from_run(sloped_lines_dict, run_list) @plot_data(plot_1D) def ramp_on(): run_list = ["b", "d"] return construct_signal_from_run(sloped_lines_dict, run_list) @plot_data(plot_1D) def ramp_off(): run_list = ["b", "c"] return construct_signal_from_run(sloped_lines_dict, run_list) @plot_data(plot_1D) def rise(): run_list = ["c", "a"] return construct_signal_from_run(sloped_lines_dict, run_list) @plot_data(plot_1D) def drop(): run_list = ["b", "d"] return construct_signal_from_run(sloped_lines_dict, run_list) @plot_data(plot_1D) def wedge(): run_list = ["a", "d", "b"] return construct_signal_from_run(sloped_lines_dict, run_list) @plot_data(plot_1D) def chanel(): run_list = ["b", "c", "a"] return construct_signal_from_run(sloped_lines_dict, run_list) @plot_data(plot_1D) def peak_last(): run_list = ["c", "a", "b"] return construct_signal_from_run(sloped_lines_dict, run_list) @plot_data(plot_1D) def peak_first(): run_list = ["a", "b", "c"] return construct_signal_from_run(sloped_lines_dict, run_list) @plot_data(plot_1D) def zig_zag(): run_list = ["a", "b", "a", "b"] return construct_signal_from_run(sloped_lines_dict, run_list) @plot_data(plot_1D) def zig_zag_down(): run_list = ["c", "a", "b", "a"] return construct_signal_from_run(sloped_lines_dict, run_list) @plot_data(plot_1D) def zig_zag_up(): run_list = ["a", "b", "a", "d"] return construct_signal_from_run(sloped_lines_dict, run_list) def single_time_series_dataset_1(): return [zig_zag()] def single_time_series_dataset_2(): return [peak_first()] def single_time_series_dataset_3(): return [wedge()] def dataset_of_two_1(): ts1 = zig_zag() ts2 = peak() return [ts1, ts2] def dataset_of_three_same_1(): ts1 = zig_zag() return [ts1, ts1, ts1] def dataset_of_three_1(): ts1 = zig_zag() ts2 = chanel() ts3 = valey() return [ts1, ts2, ts3] def dataset_of_three_rev_1(): ts1 = zig_zag() ts2 = chanel() ts3 = valey() return [ts3, ts2, ts1]
17.3375
101
0.684211
436
2,774
3.933486
0.149083
0.106122
0.155102
0.179592
0.68105
0.590671
0.578426
0.578426
0.578426
0.539942
0
0.021988
0.180245
2,774
159
102
17.446541
0.73219
0.019466
0
0.433735
0
0
0.014755
0
0
0
0
0
0
1
0.240964
false
0
0.024096
0.036145
0.506024
0
0
0
0
null
0
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
3
dfa2e0f2fe09ae1b326648bd138cfa7486127a8b
3,567
py
Python
clusterdata/schema.py
burgerdev/googleclusterdata
f1c443b72754082f41c927e83160627e79f5c74e
[ "MIT" ]
null
null
null
clusterdata/schema.py
burgerdev/googleclusterdata
f1c443b72754082f41c927e83160627e79f5c74e
[ "MIT" ]
null
null
null
clusterdata/schema.py
burgerdev/googleclusterdata
f1c443b72754082f41c927e83160627e79f5c74e
[ "MIT" ]
null
null
null
import os import csv from collections import defaultdict from config import config _basedir = config.get("clusterdata", "root") with open(os.path.join(_basedir, "schema.csv"), 'r') as _schemafile: _reader = csv.reader(_schemafile) _reader.next() _content = list(_reader) _grouped = defaultdict(list) for item in _content: key = item[0].split('/')[0] _grouped[key].append(item) _table_names = _grouped.keys() def get_table_names(): return _table_names def get_valid_tables(): return filter(lambda t: t.valid, map(Table, _table_names)) class Table(object): """ TODO doc """ @property def name(self): return self._name @property def valid(self): return all(map(lambda c: c.valid, self._cols)) def __init__(self, table_name): assert table_name in _table_names,\ "unknown table {}".format(table_name) self._name = table_name self._cols = map(Column, _grouped[table_name]) def get_columns(self): return self._cols def get_glob(self): assert len(self._cols) > 0,\ "this table does not hold any columns" g = self._cols[0].get_glob() return os.path.join(_basedir, self._name, g) def prepare(self, row): """ @param row iterable of strings @return iterable of the correct types for each column """ out = [c.prepare(v) for c, v in zip(self._cols, row)] return out def __len__(self): return len(self._cols) def __getitem__(self, i): return self._cols[i] def __iter__(self): for c in self._cols: yield c class Column(object): """ TODO doc """ @property def valid(self): try: self._extract_type(self._row) except ValueError: return False else: return True def __init__(self, row): self._row = row def describe(self): return self._describe_single_col(self._row) def get_glob(self): return self._row[0].split('/')[1] def prepare(self, v): if len(v) == 0: return None t = self._extract_type(self._row) if t == "BIGINT": return int(v) if t == "FLOAT": return float(v) if t == "BOOLEAN": return bool(v) return v @staticmethod def _type_map(t): if t == "STRING_HASH": return "VARCHAR(512)" if t == "STRING_HASH_OR_INTEGER": raise ValueError("Don't know how to interpret that") if t == "INTEGER": # some values in the cluster data are bigger than 2*32 return "BIGINT" return t @staticmethod def _extract_index(row): return int(row[1]) @staticmethod def _extract_type(row): return Column._type_map(row[3]) @staticmethod def _extract_mandatory(row): return row[4] == "YES" @staticmethod def _extract_col_name(row): repl = [(' ', '_'), ("user", "username"), ("/", "")] s = row[2] for a, b in repl: s = s.replace(a, b) return s @staticmethod def _describe_single_col(row): d = dict() d["name"] = Column._extract_col_name(row) d["type"] = Column._extract_type(row) d["extras"] = "" if Column._extract_mandatory(row): d["extras"] += " NOT NULL" return "{name} {type}{extras}".format(**d)
22.29375
68
0.560976
445
3,567
4.25618
0.316854
0.038015
0.029567
0.017951
0.048574
0
0
0
0
0
0
0.007005
0.319596
3,567
159
69
22.433962
0.773383
0.043734
0
0.119266
0
0
0.076464
0.006571
0
0
0
0.012579
0.018349
1
0.201835
false
0
0.036697
0.110092
0.495413
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
0
0
0
3
dfdb93907bbb37d0f41c4f4b4a5211ca2bc952fa
465
py
Python
pymanopt/autodiff/backends/__init__.py
navigator8972/pymanopt
b9f53fa2d187c22ae75f65c71aeeb2bfa8b9c37f
[ "BSD-3-Clause" ]
null
null
null
pymanopt/autodiff/backends/__init__.py
navigator8972/pymanopt
b9f53fa2d187c22ae75f65c71aeeb2bfa8b9c37f
[ "BSD-3-Clause" ]
null
null
null
pymanopt/autodiff/backends/__init__.py
navigator8972/pymanopt
b9f53fa2d187c22ae75f65c71aeeb2bfa8b9c37f
[ "BSD-3-Clause" ]
null
null
null
__all__ = ["autograd", "numpy", "pytorch", "tensorflow"] from .. import backend_decorator_factory from ._autograd import AutogradBackend from ._numpy import NumPyBackend from ._pytorch import PyTorchBackend from ._tensorflow import TensorFlowBackend autograd = backend_decorator_factory(AutogradBackend) numpy = backend_decorator_factory(NumPyBackend) pytorch = backend_decorator_factory(PyTorchBackend) tensorflow = backend_decorator_factory(TensorFlowBackend)
33.214286
57
0.843011
46
465
8.130435
0.304348
0.213904
0.307487
0
0
0
0
0
0
0
0
0
0.088172
465
13
58
35.769231
0.882075
0
0
0
0
0
0.064516
0
0
0
0
0
0
1
0
false
0
0.5
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
0
0
1
0
0
0
0
3
dfddaee3c0d6b71b7adda2d025118f8929cfffe2
1,765
py
Python
src/pydybm/arraymath/dycupy/random.py
ibm-research-tokyo/dybm
a6d308c896c2f66680ee9c5d05a3d7826cc27c64
[ "Apache-2.0" ]
126
2017-09-04T11:53:26.000Z
2022-02-22T12:47:56.000Z
src/pydybm/arraymath/dycupy/random.py
IBM-DSE/dybm
3484e337954c017f0a20166403a6ddba4ce274c0
[ "Apache-2.0" ]
8
2017-10-14T03:26:16.000Z
2020-12-22T22:22:42.000Z
src/pydybm/arraymath/dycupy/random.py
IBM-DSE/dybm
3484e337954c017f0a20166403a6ddba4ce274c0
[ "Apache-2.0" ]
41
2017-09-04T13:40:23.000Z
2022-03-02T14:02:53.000Z
# (C) Copyright IBM Corp. 2016 # # 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. """``cupy``-based implementation of the random module """ __author__ = "Taro Sekiyama" import numpy.random as r import cupy as cp def _to_gpu(a): arr = cp.empty_like(a) arr.set(a) return arr class RandomState: def __init__(self, seed): self._random = r.RandomState(seed) def uniform(self, low=0.0, high=1.0, size=None): return _to_gpu(self._random.uniform(low=low, high=high, size=size)) def normal(self, loc=0.0, scale=1.0, size=None): return _to_gpu(self._random.normal(loc=loc, scale=scale, size=size)) def get_state(self): return self._random.get_state() def set_state(self, *args): return self._random.set_state(*args) def rand(self, *args): return _to_gpu(self._random.rand(*args)) seed = r.seed def normal(loc=0.0, scale=1.0, size=None): return _to_gpu(r.normal(loc=loc, scale=scale, size=size)) def uniform(low=0.0, high=1.0, size=None): return _to_gpu(r.uniform(low=low, high=high, size=size)) def rand(*args): return _to_gpu(r.rand(*args)) def randn(*args): return _to_gpu(r.randn(*args)) def random(size=None): return _to_gpu(r.random(size=size))
24.513889
76
0.689518
286
1,765
4.125874
0.356643
0.038136
0.074576
0.067797
0.294068
0.249153
0.232203
0.232203
0.120339
0.10339
0
0.016701
0.185836
1,765
71
77
24.859155
0.804454
0.341643
0
0
0
0
0.011374
0
0
0
0
0
0
1
0.387097
false
0
0.064516
0.322581
0.83871
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
0
0
1
1
0
0
3
dfea265646db1d93e04912f398cf29d1c32f5913
41
py
Python
config.py
soybean217/opencv_python_cam_windows_demo
aab0a4cebc34760c437b32fb43c5e794fa181081
[ "MIT" ]
null
null
null
config.py
soybean217/opencv_python_cam_windows_demo
aab0a4cebc34760c437b32fb43c5e794fa181081
[ "MIT" ]
null
null
null
config.py
soybean217/opencv_python_cam_windows_demo
aab0a4cebc34760c437b32fb43c5e794fa181081
[ "MIT" ]
null
null
null
GLOBAL_SETTINGS = { "port": 11111, }
10.25
19
0.585366
4
41
5.75
1
0
0
0
0
0
0
0
0
0
0
0.16129
0.243902
41
3
20
13.666667
0.580645
0
0
0
0
0
0.097561
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
dfeb3afb186d0b9174c8a9c74a8b218826a889ce
531
py
Python
engage/templatetags/engage_tags.py
Praseetha-KR/django-engage
215888ae76237029cc54a58bc7020f163d078a46
[ "MIT" ]
1
2016-02-24T15:02:15.000Z
2016-02-24T15:02:15.000Z
engage/templatetags/engage_tags.py
djangothon/django-engage
215888ae76237029cc54a58bc7020f163d078a46
[ "MIT" ]
null
null
null
engage/templatetags/engage_tags.py
djangothon/django-engage
215888ae76237029cc54a58bc7020f163d078a46
[ "MIT" ]
null
null
null
from django import template from django.contrib.auth import get_user_model register = template.Library() @register.inclusion_tag("chatboxclient.html", takes_context=True) def engage(context): return context @register.inclusion_tag("chatboxadmin.html", takes_context=True) def engageadmin(context): return context @register.inclusion_tag("admin/engage_list_result.html") def result_list_custom(cl): """ Displays the headers and data list together """ return {'users': get_user_model().objects.all()}
22.125
65
0.758945
68
531
5.735294
0.544118
0.130769
0.153846
0.102564
0.323077
0.205128
0
0
0
0
0
0
0.131827
531
23
66
23.086957
0.845987
0.080979
0
0.166667
0
0
0.146186
0.061441
0
0
0
0
0
1
0.25
false
0
0.166667
0.166667
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
1
0
0
0
1
1
0
0
3
5f2e2dccb6b1e9ba00fd3fc8a631b4526ed149fc
229
py
Python
networkit/coarsening.py
mlooz/networkit-general-polylog
5de2844e6b06258084ddf423c054a90954f6f59c
[ "MIT" ]
3
2018-02-24T08:17:03.000Z
2020-05-11T13:08:33.000Z
networkit/coarsening.py
kit-parco/networkit-hyperbolic-kd
8eb786b8f72e0507a75e68184f444a19cf47ef58
[ "MIT" ]
1
2019-11-29T08:57:52.000Z
2019-11-29T08:57:52.000Z
networkit/coarsening.py
kit-parco/networkit-hyperbolic-kd
8eb786b8f72e0507a75e68184f444a19cf47ef58
[ "MIT" ]
2
2020-11-18T09:17:04.000Z
2020-12-10T12:07:21.000Z
""" This module contains components for coarsening and uncoarsening graphs, used in multilevel methods""" __author__ = "Christian Staudt" from _NetworKit import GraphCoarsening, ParallelPartitionCoarsening, MatchingCoarsening
32.714286
105
0.829694
22
229
8.409091
1
0
0
0
0
0
0
0
0
0
0
0
0.117904
229
6
106
38.166667
0.915842
0.427948
0
0
0
0
0.129032
0
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
3
5f349dc2ec6b142763120dc45b21c1a262954826
208
py
Python
frigate/api/serializers.py
Yanoben/parking_reservation
5d9427494071eea18bda78a4f78e05c83dc0101d
[ "MIT" ]
null
null
null
frigate/api/serializers.py
Yanoben/parking_reservation
5d9427494071eea18bda78a4f78e05c83dc0101d
[ "MIT" ]
null
null
null
frigate/api/serializers.py
Yanoben/parking_reservation
5d9427494071eea18bda78a4f78e05c83dc0101d
[ "MIT" ]
null
null
null
from users.models import Parking_place from rest_framework import serializers class BookingsSerializer(serializers.ModelSerializer): class Meta: fields = '__all__' model = Parking_place
23.111111
54
0.759615
22
208
6.863636
0.727273
0.15894
0
0
0
0
0
0
0
0
0
0
0.192308
208
8
55
26
0.89881
0
0
0
0
0
0.033654
0
0
0
0
0
0
1
0
false
0
0.333333
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
0
0
0
3
a027b87e6e224944a804f682a6621b4c1e4a40c8
1,253
py
Python
src/eepythontools/network_tools/tcp_pubsub.py
ciresnave/eetools
0752a2dec8f19c647e3b3e4dfd33982101cabc34
[ "MIT" ]
null
null
null
src/eepythontools/network_tools/tcp_pubsub.py
ciresnave/eetools
0752a2dec8f19c647e3b3e4dfd33982101cabc34
[ "MIT" ]
null
null
null
src/eepythontools/network_tools/tcp_pubsub.py
ciresnave/eetools
0752a2dec8f19c647e3b3e4dfd33982101cabc34
[ "MIT" ]
null
null
null
""" TCP/IP Pub/Sub Implementation """ from typing import Dict, Deque, Any, List from eepythontools.network_tools.generic_pubsub import Publisher from socketserver import TCPServer, UDPServer class TCP_Publisher(Publisher, TCPServer): def __init__( self, *args: Any, subscribers: Dict[str, Dict[str, Deque[Dict[str, Any]]]], public_subscriptions: List[str], exception_on_buffer_full: bool, **kwargs: Any ) -> None: super(TCP_Publisher, self).__init__( *args, subscribers=subscribers, public_subscriptions=public_subscriptions, exception_on_buffer_full=exception_on_buffer_full, **kwargs ) class UDP_Publisher(Publisher, UDPServer): def __init__( self, *args: Any, subscribers: Dict[str, Dict[str, Deque[Dict[str, Any]]]], public_subscriptions: List[str], exception_on_buffer_full: bool, **kwargs: Any ) -> None: super(UDP_Publisher, self).__init__( *args, subscribers=subscribers, public_subscriptions=public_subscriptions, exception_on_buffer_full=exception_on_buffer_full, **kwargs )
30.560976
65
0.628891
129
1,253
5.751938
0.302326
0.056604
0.137466
0.169811
0.690027
0.690027
0.690027
0.690027
0.690027
0.690027
0
0
0.278532
1,253
40
66
31.325
0.820796
0.023144
0
0.742857
0
0
0
0
0
0
0
0
0
1
0.057143
false
0
0.085714
0
0.2
0
0
0
0
null
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
a029c5987dfadc0fb6690c5448f37d739cb1049f
67,294
py
Python
tests/data_constants.py
rigdenlab/MrParse
4dd5286434d96dfb889b7398147922c9041d6628
[ "BSD-3-Clause" ]
null
null
null
tests/data_constants.py
rigdenlab/MrParse
4dd5286434d96dfb889b7398147922c9041d6628
[ "BSD-3-Clause" ]
8
2019-06-13T16:29:27.000Z
2021-11-19T14:11:55.000Z
tests/data_constants.py
rigdenlab/MrParse
4dd5286434d96dfb889b7398147922c9041d6628
[ "BSD-3-Clause" ]
null
null
null
TWOUVO_SEQ = 'ERCGEQGSNMECPNNLCCSQYGYCGMGGDYCGKGCQNGACWTSKRCGSQAGGATCTNNQCCSQYGYCGFGAEYCGAGCQGGPCRADIKCGSQAGGKLCPNNLCCSQWGFCGLGSEFCGGGCQSGACSTDKPCGKDAGGRVCTNNYCCSKWGSCGIGPGYCGAGCQSGGCDG' FIVEHXG_SEQ = 'MRYFFMAEPIRAMEGDLLGVEIITHFASSPARPLHPEFVISSWDNSQKRRFLLDLLRTIAAKHGWFLRHGLFCIVNIDRGMAQLVLQDKDIRALLHAMLFVELQVAEHFSCQDNVLVDPLIHALHKQPNPLWLGDLGVGNATAAPLVCGCFSGVKLDRSFFVSQIEKMTFPLLVKHIRHYCDKIVVGGQENARYLPALKTAGIWATQGTLFPSVALEEIETLLLGSRMNTLRESNMGTMHTSELLKHIYDINLSYLLLAQRLIVQDKASAMFRLGINEEMANTLGALSLPQMVKLAETNQLVCHFRFDDHQTITRLTQDSRVDDLQQIHTGIMLSTRLLNEVDDTARKKRA' PHMMER_LOG_TXT = """# phmmer :: search a protein sequence against a protein database # HMMER 3.1b1 (May 2013); http://hmmer.org/ # Copyright (C) 2013 Howard Hughes Medical Institute. # Freely distributed under the GNU General Public License (GPLv3). # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # query sequence file: ../data/2uvoA.fasta # target sequence database: /opt/ccp4/ccp4-7.0/share/mrbump/data/pdb95.txt # MSA of hits saved to file: phmmerAlignment.log # per-seq hits tabular output: phmmerTblout.log # per-dom hits tabular output: phmmerDomTblout.log # max ASCII text line length: unlimited # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Query: 2UVO:A|PDBID|CHAIN|SEQUENCE [L=171] Scores for complete sequences (score includes all domains): --- full sequence --- --- best 1 domain --- -#dom- E-value score bias E-value score bias exp N Sequence Description ------- ------ ----- ------- ------ ----- ---- -- -------- ----------- 6.8e-105 351.3 93.4 7.6e-105 351.2 93.4 1.0 1 2x3t_C 2.1e-26 94.8 53.8 5.2e-26 93.5 53.8 1.5 1 1ulk_B 1.2e-18 69.4 33.2 1.3e-18 69.3 33.2 1.0 1 1ulm_B 7.1e-12 47.3 10.8 7.1e-12 47.3 10.8 1.0 1 4wp4_A 1.3e-11 46.4 37.0 1.5e-11 46.2 37.0 1.1 1 1eis_A 5.6e-11 44.4 36.1 6.3e-11 44.2 36.1 1.1 1 1iqb_B 7e-09 37.5 16.2 7.4e-09 37.4 16.2 1.0 1 4mpi_A 4.9e-08 34.7 13.5 5e-08 34.7 13.5 1.0 1 5wuz_A 1.1e-07 33.6 17.2 1.1e-07 33.6 17.2 1.0 1 5xdi_A 1.8e-06 29.7 20.9 1.8e-06 29.6 20.9 1.0 1 2lb7_A 6.5e-06 27.8 7.2 6.5e-06 27.8 7.2 1.0 1 1zuv_A 2.3e-05 26.0 8.1 2.3e-05 26.0 8.1 1.0 1 1mmc_A 0.0022 19.5 12.6 0.003 19.1 12.6 1.3 1 2kus_A 0.0039 18.7 11.7 0.0039 18.7 11.7 1.1 1 2n1s_A ------ inclusion threshold ------ 0.023 16.2 18.7 0.023 16.2 18.7 1.1 1 1p9z_A Domain annotation for each sequence (and alignments): >> 2x3t_C # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 351.2 93.4 2.4e-108 7.6e-105 2 170 .. 1 166 [] 1 166 [] 1.00 Alignments for each domain: == domain 1 score: 351.2 bits; conditional E-value: 2.4e-108 2UVO:A|PDBID|CHAIN|SEQUENCE 2 rcgeqgsnmecpnnlccsqygycgmggdycgkgcqngacwtskrcgsqaggatctnnqccsqygycgfgaeycgagcqggpcradikcgsqaggklcpnnlccsqwgfcglgsefcgggcqsgacstdkpcgkdaggrvctnnyccskwgscgigpgycgagcqsggcd 170 rcgeqgsnmecpnnlccsqygycgmggdycgkgcqngacwtskrcgsqaggatctnnqccsqygycgfgaeycgagcqggpcradikcgsqaggklcpnnlccsqwgfcglgsefcgggcqsgacstdkpcgkdaggrvctnnyccskwgscgigpgyc cqsggcd 2x3t_C 1 RCGEQGSNMECPNNLCCSQYGYCGMGGDYCGKGCQNGACWTSKRCGSQAGGATCTNNQCCSQYGYCGFGAEYCGAGCQGGPCRADIKCGSQAGGKLCPNNLCCSQWGFCGLGSEFCGGGCQSGACSTDKPCGKDAGGRVCTNNYCCSKWGSCGIGPGYC---CQSGGCD 166 8**************************************************************************************************************************************************************...******9 PP >> 1ulk_B # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 93.5 53.8 1.6e-29 5.2e-26 46 166 .. 4 120 .. 1 124 [. 0.54 Alignments for each domain: == domain 1 score: 93.5 bits; conditional E-value: 1.6e-29 2UVO:A|PDBID|CHAIN|SEQUENCE 46 cgsqaggatctnnqccsqygycgfgaeycgagcqggpcradikcgsqaggklcpnnlccsqwgfcglgsefcgggcqsgacstdkpcgkdaggrvctnnyccskwgscgigpgycgagcqs 166 cg +a+g c + ccsq+gycg eycg gcq+ c + +cg + ggk c + lccsq+g+cg + cg gcqs cs cgkd ggr+ct + ccs++g cg+ +c gcqs 1ulk_B 4 CGVRASGRVCPDGYCCSQWGYCGTTEEYCGKGCQS-QCDYN-RCGKEFGGKECHDELCCSQYGWCGNSDGHCGEGCQS-QCSYW-RCGKDFGGRLCTEDMCCSQYGWCGLTDDHCEDGCQS 120 55556666666666666666666666666666654.34432.566666666666666666666666555566666655.35443.366666666666666666666666666666666655 PP >> 1ulm_B # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 69.3 33.2 4.1e-22 1.3e-18 88 169 .. 3 81 .. 1 82 [] 0.88 Alignments for each domain: == domain 1 score: 69.3 bits; conditional E-value: 4.1e-22 2UVO:A|PDBID|CHAIN|SEQUENCE 88 kcgsqaggklcpnnlccsqwgfcglgsefcgggcqsgacstdkpcgkdaggrvctnnyccskwgscgigpgycgagcqsggc 169 +cg +a+gk cpn ccsqwg+cg +cg gcqs c cg+d ggr+c + ccsk+g cg + +c gcqs c 1ulm_B 3 ECGERASGKRCPNGKCCSQWGYCGTTDNYCGQGCQSQ-CDY-WRCGRDFGGRLCEEDMCCSKYGWCGYSDDHCEDGCQSQ-C 81 6999999999999999999999999999999999985.765.46999999999999999999999999999999999984.5 PP >> 4wp4_A # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 47.3 10.8 2.2e-15 7.1e-12 88 124 .. 2 40 .. 1 43 [] 0.87 Alignments for each domain: == domain 1 score: 47.3 bits; conditional E-value: 2.2e-15 2UVO:A|PDBID|CHAIN|SEQUENCE 88 kcgsqaggklcpnnlccsqwgfcglgsefcgg..gcqsg 124 +cg qaggklcpnnlccsqwg+cg e+c+ +cqs+ 4wp4_A 2 QCGRQAGGKLCPNNLCCSQWGWCGSTDEYCSPdhNCQSN 40 6*****************************852268875 PP >> 1eis_A # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 46.2 37.0 4.7e-15 1.5e-11 2 79 .. 1 82 [. 1 85 [] 0.76 Alignments for each domain: == domain 1 score: 46.2 bits; conditional E-value: 4.7e-15 2UVO:A|PDBID|CHAIN|SEQUENCE 2 rcgeqgsnmecpnnlccsqygycgmggdycgkgcqngacwtsk....rcgsqaggatctnnqccsqygycgfgaeycgag.cq 79 rcg qg cp ccs +g+cg + ycg+ c+n cw+ + rcg+ g+ c ++ccs +g+cg g +yc+ g cq 1eis_A 1 RCGSQGGGSTCPGLRCCSIWGWCGDSEPYCGRTCEN-KCWSGErsdhRCGAAVGNPPCGQDRCCSVHGWCGGGNDYCSGGnCQ 82 788888888888888888888888888888888887.5887542223688888888888888888888888888888554255 PP >> 1iqb_B # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 44.2 36.1 2e-14 6.3e-11 2 79 .. 1 82 [. 1 88 [] 0.82 Alignments for each domain: == domain 1 score: 44.2 bits; conditional E-value: 2e-14 2UVO:A|PDBID|CHAIN|SEQUENCE 2 rcgeqgsnmecpnnlccsqygycgmggdycgkgcqngacwtsk....rcgsqaggatctnnqccsqygycgfgaeyc.gagcq 79 rcg qg cp ccs +g+cg + ycg+ c+n cw+ + rcg+ g+ c ++ccs +g+cg g +yc g+ cq 1iqb_B 1 RCGSQGGGGTCPALWCCSIWGWCGDSEPYCGRTCEN-KCWSGErsdhRCGAAVGNPPCGQDRCCSVHGWCGGGNDYCsGSKCQ 82 899999999999999999999999999999999998.6997652223799999999999999999999999999999445566 PP >> 4mpi_A # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 37.4 16.2 2.3e-12 7.4e-09 88 124 .. 3 39 .. 1 43 [. 0.79 Alignments for each domain: == domain 1 score: 37.4 bits; conditional E-value: 2.3e-12 2UVO:A|PDBID|CHAIN|SEQUENCE 88 kcgsqaggklcpnnlccsqwgfcglgsefcgggcqsg 124 +cg qagg lcp lccsq+g+c+ e+cg+gcqs 4mpi_A 3 QCGRQAGGALCPGGLCCSQYGWCANTPEYCGSGCQSQ 39 5888888888888888888888888888888888874 PP >> 5wuz_A # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 34.7 13.5 1.6e-11 5e-08 88 124 .. 2 40 .. 1 43 [] 0.70 Alignments for each domain: == domain 1 score: 34.7 bits; conditional E-value: 1.6e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 88 kcgsqaggklcpnnlccsqwgfcglgsefcg..ggcqsg 124 cg qag++ c n lccsq+gfcg se+c+ +gcqs+ 5wuz_A 2 NCGRQAGNRACANQLCCSQYGFCGSTSEYCSraNGCQSN 40 478888888888888888888888888888533577775 PP >> 5xdi_A # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 33.6 17.2 3.5e-11 1.1e-07 45 79 .. 2 37 .. 1 40 [] 0.88 Alignments for each domain: == domain 1 score: 33.6 bits; conditional E-value: 3.5e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 45 rcgsqaggatctnnqccsqygycgfgaeycgag.cq 79 +cg qagga c+n ccsq+gycg ycgag cq 5xdi_A 2 QCGRQAGGARCSNGLCCSQFGYCGSTPPYCGAGqCQ 37 69*****************************99555 PP >> 2lb7_A # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 29.6 20.9 5.6e-10 1.8e-06 44 84 .. 2 42 .. 1 44 [] 0.64 Alignments for each domain: == domain 1 score: 29.6 bits; conditional E-value: 5.6e-10 2UVO:A|PDBID|CHAIN|SEQUENCE 44 krcgsqaggatctnnqccsqygycgfgaeycgagcqggpcr 84 +rcg qa ga c n cc +yg+cg g ycgag + cr 2lb7_A 2 QRCGDQARGAKCPNCLCCGKYGFCGSGDAYCGAGSCQSQCR 42 56777777777777777777777777777777765445565 PP >> 1zuv_A # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 27.8 7.2 2.1e-09 6.5e-06 97 118 .. 8 29 .. 1 30 [] 0.60 Alignments for each domain: == domain 1 score: 27.8 bits; conditional E-value: 2.1e-09 2UVO:A|PDBID|CHAIN|SEQUENCE 97 lcpnnlccsqwgfcglgsefcg 118 cp+ +ccsqwg+cg g ++cg 1zuv_A 8 RCPSGMCCSQWGYCGKGPKYCG 29 3666666666666666666665 PP >> 1mmc_A # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 26.0 8.1 7.3e-09 2.3e-05 11 33 .. 8 30 .] 2 30 .] 0.85 Alignments for each domain: == domain 1 score: 26.0 bits; conditional E-value: 7.3e-09 2UVO:A|PDBID|CHAIN|SEQUENCE 11 ecpnnlccsqygycgmggdycgk 33 cp+ +ccsq+gycg g ycg+ 1mmc_A 8 RCPSGMCCSQFGYCGKGPKYCGR 30 69999999999999999999996 PP >> 2kus_A # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 19.1 12.6 9.4e-07 0.003 45 75 .. 6 34 .. 2 35 .] 0.70 Alignments for each domain: == domain 1 score: 19.1 bits; conditional E-value: 9.4e-07 2UVO:A|PDBID|CHAIN|SEQUENCE 45 rcgsqaggatctnnqccsqygycgfgaeycg 75 +cg gg c ccsqygycg g +yc+ 2kus_A 6 QCGPGWGG--CRGGLCCSQYGYCGSGPKYCA 34 56654444..778888888888888888884 PP >> 2n1s_A # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 18.7 11.7 1.2e-06 0.0039 11 32 .. 9 30 .] 1 30 [] 0.50 Alignments for each domain: == domain 1 score: 18.7 bits; conditional E-value: 1.2e-06 2UVO:A|PDBID|CHAIN|SEQUENCE 11 ecpnnlccsqygycgmggdycg 32 c lccs+ygycg g ycg 2n1s_A 9 RCSGGLCCSKYGYCGSGPAYCG 30 3555555555555555555554 PP >> 1p9z_A # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ? 16.2 18.7 7.1e-06 0.023 53 84 .. 8 39 .. 1 40 [] 0.74 Alignments for each domain: == domain 1 score: 16.2 bits; conditional E-value: 7.1e-06 2UVO:A|PDBID|CHAIN|SEQUENCE 53 atctnnqccsqygycgfgaeycgagcqggpcr 84 c ccs ygycg ga ycgag cr 1p9z_A 8 RPCNAGLCCSIYGYCGSGAAYCGAGNCRCQCR 39 46888999999999999999999985555555 PP Internal pipeline statistics summary: ------------------------------------- Query model(s): 1 (171 nodes) Target sequences: 47841 (11034331 residues searched) Passed MSV filter: 1970 (0.0411781); expected 956.8 (0.02) Passed bias filter: 641 (0.0133985); expected 956.8 (0.02) Passed Vit filter: 51 (0.00106603); expected 47.8 (0.001) Passed Fwd filter: 15 (0.000313539); expected 0.5 (1e-05) Initial search space (Z): 47841 [actual number of targets] Domain search space (domZ): 15 [number of targets reported over threshold] # CPU time: 0.33u 0.02s 00:00:00.35 Elapsed: 00:00:00.14 # Mc/sec: 13477.65 // # Alignment of 14 hits satisfying inclusion thresholds saved to: phmmerAlignment.log [ok] """ PHMMER_AF_LOG_TXT = """# phmmer :: search a protein sequence against a protein database # HMMER 3.2 (June 2018); http://hmmer.org/ # Copyright (C) 2018 Howard Hughes Medical Institute. # Freely distributed under the BSD open source license. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # query sequence file: /Users/adamsimpkin/dev/mrparse_fresh/data/2uvoA.fasta # target sequence database: /Users/adamsimpkin/opt/clean/ccp4-7.1/share/mrbump/data/seqAFDB.fasta # MSA of hits saved to file: phmmerAlignment_af2.log # per-seq hits tabular output: phmmerTblout_af2.log # per-dom hits tabular output: phmmerDomTblout_af2.log # max ASCII text line length: unlimited # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Query: 2UVO:A|PDBID|CHAIN|SEQUENCE [L=171] Scores for complete sequences (score includes all domains): --- full sequence --- --- best 1 domain --- -#dom- E-value score bias E-value score bias exp N Sequence Description ------- ------ ----- ------- ------ ----- ---- -- -------- ----------- 5.5e-74 253.2 98.2 7.1e-74 252.8 98.2 1.1 1 AF-Q0JF21-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 18552 : 87298 ] wmpLDDT: 85.88 2.8e-11 48.2 10.0 2.8e-11 48.2 10.0 2.2 2 AF-Q7Y1Z1-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 31625 : 87298 ] wmpLDDT: 85.53 3.9e-10 44.5 16.7 3.9e-10 44.5 16.7 2.8 1 AF-A0A1D6LMS5-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 6798 : 78598 ] wmpLDDT: 86.46 1.1e-09 43.0 15.2 1.1e-09 43.0 15.2 2.4 2 AF-Q7DNA1-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 5638 : 87298 ] wmpLDDT: 89.91 3.5e-09 41.4 10.5 3.5e-09 41.4 10.5 3.0 3 AF-Q9SDY6-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 27683 : 111598 ] wmpLDDT: 90.55 1.1e-08 39.8 8.0 1.1e-08 39.8 8.0 1.7 2 AF-C6T7J9-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 21501 : 111598 ] wmpLDDT: 88.34 2e-08 38.9 10.9 2e-08 38.9 10.9 2.7 2 AF-I1MMY2-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 14149 : 111598 ] wmpLDDT: 90.21 3.1e-08 38.3 8.5 3.1e-08 38.3 8.5 2.3 2 AF-Q6K8R2-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 2537 : 87298 ] wmpLDDT: 90.96 1.3e-07 36.3 15.4 1.3e-07 36.3 15.4 1.9 1 AF-B6TR38-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 271 : 78598 ] wmpLDDT: 90.07 1.5e-07 36.0 10.1 1.5e-07 36.0 10.1 2.2 2 AF-B6TT00-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 9220 : 78598 ] wmpLDDT: 91.82 1.7e-07 35.9 22.6 1.7e-07 35.9 22.6 2.7 2 AF-Q42993-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 13417 : 87298 ] wmpLDDT: 90.79 2e-07 35.7 21.9 2e-07 35.7 21.9 2.8 1 AF-P25765-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 27511 : 87298 ] wmpLDDT: 89.12 2.8e-07 35.2 9.6 2.8e-07 35.2 9.6 2.6 3 AF-O24603-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 20429 : 54868 ] wmpLDDT: 89.88 3e-07 35.1 14.9 3e-07 35.1 14.9 2.0 2 AF-P43082-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 17725 : 54868 ] wmpLDDT: 84.90 4.6e-07 34.5 19.1 4.6e-07 34.5 19.1 2.5 1 AF-A0A1D6LMS1-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 11432 : 78598 ] wmpLDDT: 90.27 4.9e-07 34.4 17.6 4.9e-07 34.4 17.6 2.4 2 AF-A0A1D6GWN3-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 28572 : 78598 ] wmpLDDT: 80.40 5.1e-07 34.3 12.1 5.1e-07 34.3 12.1 2.0 2 AF-O24598-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 5613 : 54868 ] wmpLDDT: 90.40 5.4e-07 34.2 8.6 5.4e-07 34.2 8.6 1.9 2 AF-Q9M2U5-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 20516 : 54868 ] wmpLDDT: 90.20 6.9e-07 33.9 11.4 6.9e-07 33.9 11.4 1.9 2 AF-I1M587-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 50466 : 111598 ] wmpLDDT: 89.46 2e-06 32.4 10.9 2e-06 32.4 10.9 2.0 2 AF-O22841-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 17814 : 54868 ] wmpLDDT: 89.08 2.3e-06 32.2 13.0 2.3e-06 32.2 13.0 1.9 1 AF-O22842-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 23646 : 54868 ] wmpLDDT: 88.79 3.6e-06 31.5 11.0 3.6e-06 31.5 11.0 2.4 2 AF-A0A1D6GWN1-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 38497 : 78598 ] wmpLDDT: 88.44 5e-06 31.1 27.6 5e-06 31.1 27.6 2.7 1 AF-P24626-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 23336 : 87298 ] wmpLDDT: 90.83 6.3e-06 30.8 14.1 6.3e-06 30.8 14.1 2.9 3 AF-O24658-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 3457 : 54868 ] wmpLDDT: 89.68 7.8e-06 30.4 17.6 9.7e-06 30.1 17.6 1.2 1 AF-Q0JC38-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 10185 : 87298 ] wmpLDDT: 71.85 8.1e-06 30.4 12.2 8.1e-06 30.4 12.2 2.6 2 AF-P19171-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 1685 : 54868 ] wmpLDDT: 89.30 1.1e-05 29.9 21.2 2.5e-05 28.8 21.2 1.5 1 AF-A0A1X7YIJ7-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 27631 : 78598 ] wmpLDDT: 86.49 1.7e-05 29.4 15.2 1.7e-05 29.4 15.2 2.3 2 AF-O04138-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 3513 : 87298 ] wmpLDDT: 86.78 5.8e-05 27.6 25.6 5.8e-05 27.6 25.6 2.1 2 AF-P29023-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 9277 : 78598 ] wmpLDDT: 88.81 0.00012 26.5 24.9 0.00012 26.5 24.9 2.2 3 AF-C0P451-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 32177 : 78598 ] wmpLDDT: 88.36 0.00036 25.0 27.8 0.00036 25.0 27.8 1.9 2 AF-I1NCA0-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 3766 : 111598 ] wmpLDDT: 85.61 0.0013 23.2 0.3 0.0013 23.2 0.3 1.0 1 AF-A0A0P0Y930-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 31777 : 87298 ] wmpLDDT: 74.91 0.0014 23.0 7.4 0.0014 23.0 7.4 2.1 2 AF-O24654-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 3955 : 54868 ] wmpLDDT: 89.85 0.0015 23.0 6.8 0.0015 23.0 6.8 2.2 2 AF-A0A1P8AME8-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 18391 : 54868 ] wmpLDDT: 84.04 0.0023 22.4 33.5 0.0023 22.4 33.5 2.5 2 AF-Q688M5-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 37002 : 87298 ] wmpLDDT: 88.47 0.0023 22.4 25.4 0.0023 22.4 25.4 1.9 2 AF-I1NCA1-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 26281 : 111598 ] wmpLDDT: 88.99 Domain annotation for each sequence (and alignments): >> AF-Q0JF21-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 18552 : 87298 ] wmpLDDT: 85.88 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 252.8 98.2 7e-78 7.1e-74 2 169 .. 30 197 .. 29 201 .. 0.99 Alignments for each domain: == domain 1 score: 252.8 bits; conditional E-value: 7e-78 2UVO:A|PDBID|CHAIN|SEQUENCE 2 rcgeqgsnmecpnnlccsqygycgmggdycgkgcqngacwtskrcgsqaggatctnnqccsqygycgfgaeycgagcqggpcradikcgsqaggklcpnnlccsqwgfcglgsefcgggcqsgacstdkpcgkdaggrvctnnyccskwgscgigpgycgagcqsggc 169 cg+q+ m cp+nlccsq+gycg+g dycg gcq+gac +s+rcgsq ggatc+nnqccsqygycgfg+eycg+gcq+gpcradikcg a+g+lcpnn+ccsqwg+cglgsefcg+gcqsgac +k cgk agg c nn+ccs g cg+g +ycg+gcqsggc AF-Q0JF21-F1-model_v1 30 TCGKQNDGMICPHNLCCSQFGYCGLGRDYCGTGCQSGACCSSQRCGSQGGGATCSNNQCCSQYGYCGFGSEYCGSGCQNGPCRADIKCGRNANGELCPNNMCCSQWGYCGLGSEFCGNGCQSGACCPEKRCGKQAGGDKCPNNFCCSAGGYCGLGGNYCGSGCQSGGC 197 6*********************************************************************************************************************************************************************** PP >> AF-Q7Y1Z1-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 31625 : 87298 ] wmpLDDT: 85.53 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 48.2 10.0 2.8e-15 2.8e-11 83 136 .. 30 81 .. 20 97 .. 0.86 2 ? -2.2 1.0 7.6 7.7e+04 34 53 .. 179 198 .. 159 230 .. 0.48 Alignments for each domain: == domain 1 score: 48.2 bits; conditional E-value: 2.8e-15 2UVO:A|PDBID|CHAIN|SEQUENCE 83 cradikcgsqaggklcpnnlccsqwgfcglgsefcgggcqsgacstdkpcgkda 136 +ra+ +cg qagg cpn lccs+wg+cgl ++c ggcqs c + g d AF-Q7Y1Z1-F1-model_v1 30 ARAE-QCGRQAGGARCPNRLCCSRWGWCGLTDDYCKGGCQS-QCRVSRDGGDDD 81 5555.8**********************************8.588888777764 PP == domain 2 score: -2.2 bits; conditional E-value: 7.6 2UVO:A|PDBID|CHAIN|SEQUENCE 34 gcqngacwtskrcgsqagga 53 g+ + c + r g a AF-Q7Y1Z1-F1-model_v1 179 GATSDFCVPNARWPCAPGKA 198 33333333333333333333 PP >> AF-A0A1D6LMS5-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 6798 : 78598 ] wmpLDDT: 86.46 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 44.5 16.7 3.9e-14 3.9e-10 82 127 .. 20 67 .. 12 82 .. 0.80 Alignments for each domain: == domain 1 score: 44.5 bits; conditional E-value: 3.9e-14 2UVO:A|PDBID|CHAIN|SEQUENCE 82 pcradikcgsqaggklcpnnlccsqwgfcglgsefcgggcqs...gacs 127 p+ra+ +cgsqagg lcpn lccsq+g+cg s++cg+gcqs g+c AF-A0A1D6LMS5-F1-model_v1 20 PARAE-QCGSQAGGALCPNCLCCSQFGWCGSTSDYCGSGCQSqcsGSCG 67 88887.8**********************************72225553 PP >> AF-Q7DNA1-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 5638 : 87298 ] wmpLDDT: 89.91 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 43.0 15.2 1.1e-13 1.1e-09 84 128 .. 31 73 .. 20 91 .. 0.85 2 ? -1.4 1.3 4.1 4.2e+04 52 78 .. 288 314 .. 269 331 .. 0.66 Alignments for each domain: == domain 1 score: 43.0 bits; conditional E-value: 1.1e-13 2UVO:A|PDBID|CHAIN|SEQUENCE 84 radikcgsqaggklcpnnlccsqwgfcglgsefcgggcqsgacst 128 ra+ +cg+qagg cpn lccs+wg+cg s+fcg gcqs cs AF-Q7DNA1-F1-model_v1 31 RAE-QCGAQAGGARCPNCLCCSRWGWCGTTSDFCGDGCQSQ-CSG 73 555.8**********************************85.543 PP == domain 2 score: -1.4 bits; conditional E-value: 4.1 2UVO:A|PDBID|CHAIN|SEQUENCE 52 gatctnnqccsqygycgfgaeycgagc 78 g c + + gf ycga AF-Q7DNA1-F1-model_v1 288 GLECGHGPDDRVANRIGFYQRYCGAFG 314 444544444444555667777777643 PP >> AF-Q9SDY6-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 27683 : 111598 ] wmpLDDT: 90.55 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 41.4 10.5 3.4e-13 3.5e-09 88 129 .. 25 65 .. 19 87 .. 0.75 2 ? -2.2 5.4 7.3 7.4e+04 49 86 .. 159 185 .. 121 211 .. 0.61 3 ? -2.3 0.2 8.2 8.3e+04 51 58 .. 277 284 .. 251 315 .. 0.61 Alignments for each domain: == domain 1 score: 41.4 bits; conditional E-value: 3.4e-13 2UVO:A|PDBID|CHAIN|SEQUENCE 88 kcgsqaggklcpnnlccsqwgfcglgsefcgggcqsgacstd 129 +cg+qagg lcpn lccs++g+cg +cg gcqs s AF-Q9SDY6-F1-model_v1 25 QCGTQAGGALCPNRLCCSKFGWCGDTDSYCGEGCQSQCKS-A 65 7999999999999999999999999999999999985322.2 PP == domain 2 score: -2.2 bits; conditional E-value: 7.3 2UVO:A|PDBID|CHAIN|SEQUENCE 49 qaggatctnnqccsqygycgfgaeycgagcqgg..pcrad 86 a +gyc ++ + + c gg pc a AF-Q9SDY6-F1-model_v1 159 YA-------------WGYCFINEQNQATYCDGGnwPCAAG 185 33.............3444444444444444433334333 PP == domain 3 score: -2.3 bits; conditional E-value: 8.2 2UVO:A|PDBID|CHAIN|SEQUENCE 51 ggatctnn 58 gg c + AF-Q9SDY6-F1-model_v1 277 GGLECGHG 284 33333333 PP >> AF-C6T7J9-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 21501 : 111598 ] wmpLDDT: 88.34 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 39.8 8.0 1.1e-12 1.1e-08 7 44 .. 34 71 .. 29 88 .. 0.87 2 ? -2.0 0.3 6.3 6.4e+04 29 42 .. 159 172 .. 146 194 .. 0.59 Alignments for each domain: == domain 1 score: 39.8 bits; conditional E-value: 1.1e-12 2UVO:A|PDBID|CHAIN|SEQUENCE 7 gsnmecpnnlccsqygycgmggdycgkgcqngacwtsk 44 + n c lccs+ygycg g dycgkgc+ g c+ + AF-C6T7J9-F1-model_v1 34 AQNCGCEAELCCSKYGYCGSGDDYCGKGCKEGPCYGTA 71 57899*****************************9764 PP == domain 2 score: -2.0 bits; conditional E-value: 6.3 2UVO:A|PDBID|CHAIN|SEQUENCE 29 dycgkgcqngacwt 42 dyc k ++ c AF-C6T7J9-F1-model_v1 159 DYCDKTNRHYPCAH 172 44444333333322 PP >> AF-I1MMY2-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 14149 : 111598 ] wmpLDDT: 90.21 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 38.9 10.9 2e-12 2e-08 87 138 .. 24 75 .. 18 89 .. 0.76 2 ? 0.7 1.0 0.94 9.5e+03 107 127 .. 158 178 .. 117 204 .. 0.67 Alignments for each domain: == domain 1 score: 38.9 bits; conditional E-value: 2e-12 2UVO:A|PDBID|CHAIN|SEQUENCE 87 ikcgsqaggklcpnnlccsqwgfcglgsefcgggcqsgacstdkpcgkdagg 138 cg+q gg +cpn lccsq+g+cg cg gcqs p +g AF-I1MMY2-F1-model_v1 24 QNCGTQVGGVICPNGLCCSQYGWCGNTEAHCGRGCQSQCTPGSTPTPTTPSG 75 47************************999*******9866555555443333 PP == domain 2 score: 0.7 bits; conditional E-value: 0.94 2UVO:A|PDBID|CHAIN|SEQUENCE 107 wgfcglgsefcgggcqsgacs 127 wg+c ++ + c sg AF-I1MMY2-F1-model_v1 158 WGYCFINERNQADYCTSGTRW 178 555555555444555544322 PP >> AF-Q6K8R2-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 2537 : 87298 ] wmpLDDT: 90.96 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 38.3 8.5 3e-12 3.1e-08 51 85 .. 26 60 .. 15 78 .. 0.73 2 ? -0.0 0.5 1.6 1.6e+04 144 163 .. 148 169 .. 140 194 .. 0.73 Alignments for each domain: == domain 1 score: 38.3 bits; conditional E-value: 3e-12 2UVO:A|PDBID|CHAIN|SEQUENCE 51 ggatctnnqccsqygycgfgaeycgagcqggpcra 85 + c ++qccs++g+cg g++ycg gcq+gpc AF-Q6K8R2-F1-model_v1 26 QSCGCASDQCCSKWGFCGTGSDYCGTGCQAGPCDV 60 34557888888888888888888888888888854 PP == domain 2 score: -0.0 bits; conditional E-value: 1.6 2UVO:A|PDBID|CHAIN|SEQUENCE 144 nyc..cskwgscgigpgycgag 163 nyc s c g gy g g AF-Q6K8R2-F1-model_v1 148 NYCdeTSTQWPCMAGKGYYGRG 169 6663322333577788887776 PP >> AF-B6TR38-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 271 : 78598 ] wmpLDDT: 90.07 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 36.3 15.4 1.2e-11 1.3e-07 43 84 .. 31 71 .. 23 89 .. 0.80 Alignments for each domain: == domain 1 score: 36.3 bits; conditional E-value: 1.2e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 43 skrcgsqaggatctnnqccsqygycgfgaeycgagcqggpcr 84 ++cg qaggatc + ccs++g+cg +eycgagcq+ c AF-B6TR38-F1-model_v1 31 GQQCGQQAGGATCRDCLCCSRFGFCGDTSEYCGAGCQS-QCT 71 57899999999999999999999999999999999996.343 PP >> AF-B6TT00-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 9220 : 78598 ] wmpLDDT: 91.82 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 36.0 10.1 1.5e-11 1.5e-07 51 84 .. 26 59 .. 19 74 .. 0.64 2 ? 0.3 0.3 1.3 1.3e+04 143 163 .. 147 169 .. 99 192 .. 0.81 Alignments for each domain: == domain 1 score: 36.0 bits; conditional E-value: 1.5e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 51 ggatctnnqccsqygycgfgaeycgagcqggpcr 84 + c + ccs++gycg g +ycgagcq+gpc AF-B6TT00-F1-model_v1 26 QNCGCASGLCCSRFGYCGTGEDYCGAGCQSGPCD 59 3445666666666666666666666666666664 PP == domain 2 score: 0.3 bits; conditional E-value: 1.3 2UVO:A|PDBID|CHAIN|SEQUENCE 143 nnycc...skwgscgigpgycgag 163 nyc ++w c g gy g g AF-B6TT00-F1-model_v1 147 KNYCDrnnTQW-PCQAGKGYYGRG 169 45554211344.577777777766 PP >> AF-Q42993-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 13417 : 87298 ] wmpLDDT: 90.79 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 35.9 22.6 1.7e-11 1.7e-07 88 138 .. 22 75 .. 16 83 .. 0.82 2 ? 0.8 1.3 0.88 9e+03 143 158 .. 173 189 .. 142 221 .. 0.57 Alignments for each domain: == domain 1 score: 35.9 bits; conditional E-value: 1.7e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 88 kcgsqaggklcpnnlccsqwgfcglgsefcgggcqs...gacstdkpcgkdagg 138 +cgsqagg lcpn lccsq+g+cg s +cg+gcqs g+c p gg AF-Q42993-F1-model_v1 22 QCGSQAGGALCPNCLCCSQYGWCGSTSAYCGSGCQSqcsGSCGGGGPTPPSGGG 75 7*********************************96333777777666655555 PP == domain 2 score: 0.8 bits; conditional E-value: 0.88 2UVO:A|PDBID|CHAIN|SEQUENCE 143 nnycc..skwgscgigpg 158 ++yc s+w c+ g AF-Q42993-F1-model_v1 173 SDYCVqsSQW-PCAAGKK 189 2222111112.2223333 PP >> AF-P25765-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 27511 : 87298 ] wmpLDDT: 89.12 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 35.7 21.9 2e-11 2e-07 88 133 .. 23 66 .. 15 82 .. 0.59 Alignments for each domain: == domain 1 score: 35.7 bits; conditional E-value: 2e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 88 kcgsqaggklcpnnlccsqwgfcglgsefcgggcqsgacstdkpcg 133 +cgsqagg +cpn lccsq+g+cg s++cg+gcqs cs cg AF-P25765-F1-model_v1 23 QCGSQAGGAVCPNCLCCSQFGWCGSTSDYCGAGCQSQ-CSA-AGCG 66 4666666666666666666666666666666666653.333.1233 PP >> AF-O24603-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 20429 : 54868 ] wmpLDDT: 89.88 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 35.2 9.6 2.7e-11 2.8e-07 47 91 .. 30 72 .. 23 112 .. 0.78 2 ? -0.1 1.0 1.7 1.7e+04 143 164 .. 155 178 .. 137 196 .. 0.60 3 ? -2.1 0.1 6.9 7e+04 145 145 .. 259 259 .. 227 273 .. 0.50 Alignments for each domain: == domain 1 score: 35.2 bits; conditional E-value: 2.7e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 47 gsqaggatctnnqccsqygycgfgaeycgagcqggpcradikcgs 91 +sq c ++ ccs+ygycg e+cg gcq+gpcr+ g AF-O24603-F1-model_v1 30 ASQN--CGCASDFCCSKYGYCGTTDEFCGEGCQAGPCRSSGGGGD 72 5554..458999999999999999999999999999998765554 PP == domain 2 score: -0.1 bits; conditional E-value: 1.7 2UVO:A|PDBID|CHAIN|SEQUENCE 143 nnyccskw..gscgigpgycgagc 164 yc ++ c+ g gy g g+ AF-O24603-F1-model_v1 155 GEYCDTEKpeFPCAQGKGYYGRGA 178 444433320123555555555543 PP == domain 3 score: -2.1 bits; conditional E-value: 6.9 2UVO:A|PDBID|CHAIN|SEQUENCE 145 y 145 y AF-O24603-F1-model_v1 259 Y 259 1 PP >> AF-P43082-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 17725 : 54868 ] wmpLDDT: 84.90 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 35.1 14.9 2.9e-11 3e-07 2 48 .. 23 70 .. 22 88 .. 0.80 2 ? -2.5 2.7 9.2 9.4e+04 23 51 .. 120 146 .. 105 207 .. 0.61 Alignments for each domain: == domain 1 score: 35.1 bits; conditional E-value: 2.9e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 2 rcgeqgsnmecpnnlccsqygycgmggdycg..kgcqngacwtskrcgs 48 +cg qg cp n+ccsqygycg +dyc+ +cq+ cw s g AF-P43082-F1-model_v1 23 QCGRQGGGRTCPGNICCSQYGYCGTTADYCSptNNCQS-NCWGSGPSGP 70 8*****************************83357987.59*9876654 PP == domain 2 score: -2.5 bits; conditional E-value: 9.2 2UVO:A|PDBID|CHAIN|SEQUENCE 23 ycgmggdycgkgcqngacwtskrcgsqag 51 +cg +g +c g c k+ + a+ AF-P43082-F1-model_v1 120 FCGPAGPRGQASC--GKCLRVKNTRTNAA 146 2333333222222..45555555444444 PP >> AF-A0A1D6LMS1-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 11432 : 78598 ] wmpLDDT: 90.27 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 34.5 19.1 4.5e-11 4.6e-07 88 135 .. 27 72 .. 20 81 .. 0.83 Alignments for each domain: == domain 1 score: 34.5 bits; conditional E-value: 4.5e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 88 kcgsqaggklcpnnlccsqwgfcglgsefcgggcqsgacstdkpcgkd 135 +cg+qagg lcp+ lccsqwg+cg ++c gcqs cg AF-A0A1D6LMS1-F1-model_v1 27 QCGTQAGGALCPDCLCCSQWGYCGSTPDYCTDGCQSQCFG--SGCGGG 72 7**********************************97544..457754 PP >> AF-A0A1D6GWN3-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 28572 : 78598 ] wmpLDDT: 80.40 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 34.4 17.6 4.8e-11 4.9e-07 87 124 .. 22 59 .. 12 69 .. 0.88 2 ? -0.8 1.5 2.8 2.9e+04 22 37 .. 171 186 .. 136 199 .. 0.57 Alignments for each domain: == domain 1 score: 34.4 bits; conditional E-value: 4.8e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 87 ikcgsqaggklcpnnlccsqwgfcglgsefcgggcqsg 124 +cg a gklcp+ lccs+wg+cg s++cg gcqs AF-A0A1D6GWN3-F1-model_v1 22 AQCGDGADGKLCPDCLCCSKWGYCGSTSDYCGDGCQSQ 59 58**********************************95 PP == domain 2 score: -0.8 bits; conditional E-value: 2.8 2UVO:A|PDBID|CHAIN|SEQUENCE 22 gycgmggdycgkgcqn 37 yc m g+y+ c AF-A0A1D6GWN3-F1-model_v1 171 DYCDMTGEYAQWPCVA 186 3444444444333333 PP >> AF-O24598-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 5613 : 54868 ] wmpLDDT: 90.40 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 34.3 12.1 5e-11 5.1e-07 9 90 .. 26 61 .. 20 98 .. 0.53 2 ? -1.8 0.2 5.6 5.7e+04 25 33 .. 246 254 .. 225 264 .. 0.51 Alignments for each domain: == domain 1 score: 34.3 bits; conditional E-value: 5e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 9 nmecpnnlccsqygycgmggdycgkgcqngacwtskrcgsqaggatctnnqccsqygycgfgaeycgagcqggpcradikcg 90 n + c n ccsq+gycg a+ycg+ cq+gpcr g AF-O24598-F1-model_v1 26 NCD-------------------------------------------CAPNLCCSQFGYCGTTADYCGSTCQSGPCRVG---G 61 444...........................................55555555555555555555555555555542...2 PP == domain 2 score: -1.8 bits; conditional E-value: 5.6 2UVO:A|PDBID|CHAIN|SEQUENCE 25 gmggdycgk 33 g dycg+ AF-O24598-F1-model_v1 246 GYYRDYCGQ 254 333344443 PP >> AF-Q9M2U5-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 20516 : 54868 ] wmpLDDT: 90.20 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 34.2 8.6 5.3e-11 5.4e-07 8 43 .. 29 64 .. 24 103 .. 0.70 2 ? -1.7 0.4 5.4 5.5e+04 34 83 .. 157 163 .. 137 193 .. 0.59 Alignments for each domain: == domain 1 score: 34.2 bits; conditional E-value: 5.3e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 8 snmecpnnlccsqygycgmggdycgkgcqngacwts 43 n c + lccsq+g+cg +dycg gcq g c+ AF-Q9M2U5-F1-model_v1 29 QNCGCSSELCCSQFGFCGNTSDYCGVGCQQGPCFAP 64 455666666666666666666666666666666654 PP == domain 2 score: -1.7 bits; conditional E-value: 5.4 2UVO:A|PDBID|CHAIN|SEQUENCE 34 gcqngacwtskrcgsqaggatctnnqccsqygycgfgaeycgagcqggpc 83 ++ pc AF-Q9M2U5-F1-model_v1 157 NA-------------------------------------------TQYPC 163 22...........................................22222 PP >> AF-I1M587-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 50466 : 111598 ] wmpLDDT: 89.46 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 33.9 11.4 6.8e-11 6.9e-07 8 46 .. 28 66 .. 23 94 .. 0.77 2 ? -1.4 0.3 4.3 4.4e+04 57 70 .. 161 174 .. 137 195 .. 0.67 Alignments for each domain: == domain 1 score: 33.9 bits; conditional E-value: 6.8e-11 2UVO:A|PDBID|CHAIN|SEQUENCE 8 snmecpnnlccsqygycgmggdycgkgcqngacwtskrc 46 n c lccsq+gycg g +ycg gc+ g c++s AF-I1M587-F1-model_v1 28 QNCGCAEGLCCSQHGYCGNGEEYCGTGCKQGPCYSSTPS 66 577788888888888888888888888888888887655 PP == domain 2 score: -1.4 bits; conditional E-value: 4.3 2UVO:A|PDBID|CHAIN|SEQUENCE 57 nnqccsqygycgfg 70 c s gy g g AF-I1M587-F1-model_v1 161 QYPCLSNRGYYGRG 174 33444445554444 PP >> AF-O22841-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 17814 : 54868 ] wmpLDDT: 89.08 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 32.4 10.9 2e-10 2e-06 48 86 .. 29 67 .. 21 86 .. 0.76 2 ? -2.0 0.8 6.4 6.5e+04 20 34 .. 169 184 .. 152 198 .. 0.66 Alignments for each domain: == domain 1 score: 32.4 bits; conditional E-value: 2e-10 2UVO:A|PDBID|CHAIN|SEQUENCE 48 sqaggatctnnqccsqygycgfgaeycgagcqggpcrad 86 q g c n ccs+ygycg ycg gc++gpc + AF-O22841-F1-model_v1 29 QQCGTTGCAANLCCSRYGYCGTTDAYCGTGCRSGPCSSS 67 345556688888888888888888888888888888754 PP == domain 2 score: -2.0 bits; conditional E-value: 6.4 2UVO:A|PDBID|CHAIN|SEQUENCE 20 qygy.cgmggdycgkg 34 +y c g dy g+g AF-O22841-F1-model_v1 169 STAYpCTPGKDYYGRG 184 3333366666777666 PP >> AF-O22842-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 23646 : 54868 ] wmpLDDT: 88.79 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 32.2 13.0 2.3e-10 2.3e-06 93 128 .. 31 66 .. 21 90 .. 0.59 Alignments for each domain: == domain 1 score: 32.2 bits; conditional E-value: 2.3e-10 2UVO:A|PDBID|CHAIN|SEQUENCE 93 aggklcpnnlccsqwgfcglgsefcgggcqsgacst 128 g c n+ccs+wg+cg +cg gcqsg c++ AF-O22842-F1-model_v1 31 CGTNGCKGNMCCSRWGYCGTTKAYCGTGCQSGPCNS 66 333445555555555555555555555555555543 PP >> AF-A0A1D6GWN1-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 38497 : 78598 ] wmpLDDT: 88.44 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 31.5 11.0 3.6e-10 3.6e-06 87 124 .. 27 64 .. 15 74 .. 0.87 2 ? -1.1 0.3 3.4 3.4e+04 129 168 .. 225 236 .. 202 271 .. 0.69 Alignments for each domain: == domain 1 score: 31.5 bits; conditional E-value: 3.6e-10 2UVO:A|PDBID|CHAIN|SEQUENCE 87 ikcgsqaggklcpnnlccsqwgfcglgsefcgggcqsg 124 +cg+ + lcp lccs+wgfcg +cg+gcqs AF-A0A1D6GWN1-F1-model_v1 27 PQCGANSTTALCPYCLCCSKWGFCGSTEAYCGNGCQSQ 64 47**********************************95 PP == domain 2 score: -1.1 bits; conditional E-value: 3.4 2UVO:A|PDBID|CHAIN|SEQUENCE 129 dkpcgkdaggrvctnnyccskwgscgigpgycgagcqsgg 168 d c g g +gg AF-A0A1D6GWN1-F1-model_v1 225 DAEC----------------------------GRGPDAGG 236 3333............................22222222 PP >> AF-P24626-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 23336 : 87298 ] wmpLDDT: 90.83 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 31.1 27.6 5e-10 5e-06 88 127 .. 20 62 .. 14 81 .. 0.74 Alignments for each domain: == domain 1 score: 31.1 bits; conditional E-value: 5e-10 2UVO:A|PDBID|CHAIN|SEQUENCE 88 kcgsqaggklcpnnlccsqwgfcglgsefcgggcqs...gacs 127 +cgsqagg lcpn lccsq+g+cg s++cg+gcqs g c AF-P24626-F1-model_v1 20 QCGSQAGGALCPNCLCCSQYGWCGSTSDYCGAGCQSqcsGGCG 62 6999999999999999999999999999999999862224443 PP >> AF-O24658-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 3457 : 54868 ] wmpLDDT: 89.68 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 30.8 14.1 6.2e-10 6.3e-06 53 97 .. 27 68 .. 17 97 .. 0.67 2 ? 0.5 1.6 1.1 1.1e+04 141 163 .. 141 165 .. 135 183 .. 0.73 3 ? -1.0 0.6 3.1 3.1e+04 54 76 .. 231 253 .. 223 263 .. 0.52 Alignments for each domain: == domain 1 score: 30.8 bits; conditional E-value: 6.2e-10 2UVO:A|PDBID|CHAIN|SEQUENCE 53 atctnnqccsqygycgfgaeycgagcqggpcradikcgsqaggkl 97 c n ccsq+gycg ycg gc++gpcr g+ gg + AF-O24658-F1-model_v1 27 CGCAPNLCCSQFGYCGTDDAYCGVGCRSGPCRGS---GTPTGGSV 68 4577888888888888888888888888888864...44444443 PP == domain 2 score: 0.5 bits; conditional E-value: 1.1 2UVO:A|PDBID|CHAIN|SEQUENCE 141 ctnnyccsk..wgscgigpgycgag 163 +t nyc s c+ g gy g g AF-O24658-F1-model_v1 141 ATRNYCQSSntQYPCAPGKGYFGRG 165 5778887651134688888888876 PP == domain 3 score: -1.0 bits; conditional E-value: 3.1 2UVO:A|PDBID|CHAIN|SEQUENCE 54 tctnnqccsqygycgfgaeycga 76 c + + g+ +ycg AF-O24658-F1-model_v1 231 ECNGGNSGAVNARIGYYRDYCGQ 253 44444444444445555555553 PP >> AF-Q0JC38-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 10185 : 87298 ] wmpLDDT: 71.85 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 30.1 17.6 9.6e-10 9.7e-06 8 47 .. 28 65 .. 22 82 .. 0.80 Alignments for each domain: == domain 1 score: 30.1 bits; conditional E-value: 9.6e-10 2UVO:A|PDBID|CHAIN|SEQUENCE 8 snmecpnnlccsqygycgmggdycgkgcqngacwtskrcg 47 n c + ccsq+gycg ycg+gcq+g cw s g AF-Q0JC38-F1-model_v1 28 QNCGCQDGYCCSQWGYCGTTEAYCGQGCQSGPCWGSG--G 65 6888999999999999999999999999999999874..2 PP >> AF-P19171-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 1685 : 54868 ] wmpLDDT: 89.30 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 30.4 12.2 8e-10 8.1e-06 88 133 .. 35 81 .. 30 96 .. 0.80 2 ? -2.6 0.7 9.6 9.7e+04 130 142 .. 286 298 .. 268 321 .. 0.58 Alignments for each domain: == domain 1 score: 30.4 bits; conditional E-value: 8e-10 2UVO:A|PDBID|CHAIN|SEQUENCE 88 kcgsqaggklcpnnlccsqwgfcglgsefcg.ggcqsgacstdkpcg 133 +cg qagg lcpn lccs++g+cg +c gcqs p g AF-P19171-F1-model_v1 35 QCGRQAGGALCPNGLCCSEFGWCGNTEPYCKqPGCQSQCTPGGTPPG 81 7*****************************6369*997666666665 PP == domain 2 score: -2.6 bits; conditional E-value: 9.6 2UVO:A|PDBID|CHAIN|SEQUENCE 130 kpcgkdaggrvct 142 cg+ grv+ AF-P19171-F1-model_v1 286 LECGRGQDGRVAD 298 3444444444443 PP >> AF-A0A1X7YIJ7-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 27631 : 78598 ] wmpLDDT: 86.49 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 28.8 21.2 2.4e-09 2.5e-05 10 80 .. 34 99 .. 28 104 .. 0.76 Alignments for each domain: == domain 1 score: 28.8 bits; conditional E-value: 2.4e-09 2UVO:A|PDBID|CHAIN|SEQUENCE 10 mecpnnlccsqygycgmggdycgkgcqngacwtskrcgsqaggatctnnqccsqygycgfgaeycgagcqg 80 c +ccs+ygycg + ycg+gc++g cw s cg gga+ ++ + g+ ++g+ c+g AF-A0A1X7YIJ7-F1-model_v1 34 CGCQPGFCCSKYGYCGKTSAYCGEGCKSGPCWGSAGCGG--GGASVARV--VTKSFFNGIK-SHAGSWCEG 99 568899*******************************95..77776543..3333344443.456666665 PP >> AF-O04138-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 3513 : 87298 ] wmpLDDT: 86.78 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 29.4 15.2 1.6e-09 1.7e-05 8 44 .. 28 64 .. 22 88 .. 0.82 2 ? -0.6 0.4 2.4 2.5e+04 25 45 .. 160 180 .. 146 200 .. 0.70 Alignments for each domain: == domain 1 score: 29.4 bits; conditional E-value: 1.6e-09 2UVO:A|PDBID|CHAIN|SEQUENCE 8 snmecpnnlccsqygycgmggdycgkgcqngacwtsk 44 n c + ccsq+gycg ycg+gcq+g cw s AF-O04138-F1-model_v1 28 QNCGCQDGYCCSQWGYCGTTEAYCGQGCQSGPCWGSG 64 6888999999999999999999999999999999874 PP == domain 2 score: -0.6 bits; conditional E-value: 2.4 2UVO:A|PDBID|CHAIN|SEQUENCE 25 gmggdycgkgcqngacwtskr 45 g + dyc k+ + c k+ AF-O04138-F1-model_v1 160 GANMDYCDKSNKQWPCQPGKK 180 555567776666666665554 PP >> AF-P29023-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 9277 : 78598 ] wmpLDDT: 88.81 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 27.6 25.6 5.7e-09 5.8e-05 9 123 .. 22 91 .. 12 99 .. 0.50 2 ? -2.1 0.3 6.8 6.9e+04 153 163 .. 159 169 .. 143 193 .. 0.59 Alignments for each domain: == domain 1 score: 27.6 bits; conditional E-value: 5.7e-09 2UVO:A|PDBID|CHAIN|SEQUENCE 9 nmecpnnlccsqygycgmggdycgkgcqngacwtskrcgsqaggatctnnqccsqygycgfgaeycgagcqggpcradikcgsqaggklcpnnlccsqwgfcglgsefcgggcqs 123 n c n+ccs++gycg +ycg gcq+g c r+ g gg ++ s + f g+ ++ +g+gc+ AF-P29023-F1-model_v1 22 NCGCQPNVCCSKFGYCGTTDEYCGDGCQSGPC-------------------------------------------RSGRGGGGSGGGGANVASVVTSSF-FNGIKNQ-AGSGCEG 91 44455555555555555555555555555555...........................................555444444444444334433332.4444433.3444443 PP == domain 2 score: -2.1 bits; conditional E-value: 6.8 2UVO:A|PDBID|CHAIN|SEQUENCE 153 cgigpgycgag 163 c+ g y g g AF-P29023-F1-model_v1 159 CAAGQKYYGRG 169 33333333322 PP >> AF-C0P451-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 32177 : 78598 ] wmpLDDT: 88.36 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 26.5 24.9 1.2e-08 0.00012 51 123 .. 34 103 .. 23 111 .. 0.59 2 ? -2.3 0.4 8.2 8.3e+04 153 163 .. 171 181 .. 156 204 .. 0.59 3 ? -2.4 0.3 8.8 8.9e+04 51 75 .. 245 269 .. 238 278 .. 0.64 Alignments for each domain: == domain 1 score: 26.5 bits; conditional E-value: 1.2e-08 2UVO:A|PDBID|CHAIN|SEQUENCE 51 ggatctnnqccsqygycgfgaeycgagcqggpcradikcgsqaggklcpnnlccsqwgfcglgsefcgggcqs 123 + c n ccs++gycg eycg gcq+gpcr+ gs gg ++ f g+ s+ +g+gc+ AF-C0P451-F1-model_v1 34 QNCGCQPNVCCSKFGYCGTTDEYCGDGCQSGPCRSGG-GGSSGGGGANVASVVTGS-FFNGIKSQ-AGSGCEG 103 3445677777777777777777777777777777654.344444443333333332.35566555.5666654 PP == domain 2 score: -2.3 bits; conditional E-value: 8.2 2UVO:A|PDBID|CHAIN|SEQUENCE 153 cgigpgycgag 163 c+ g y g g AF-C0P451-F1-model_v1 171 CAAGQKYYGRG 181 33333333322 PP == domain 3 score: -2.4 bits; conditional E-value: 8.8 2UVO:A|PDBID|CHAIN|SEQUENCE 51 ggatctnnqccsqygycgfgaeycg 75 g+ c n + + g+ +yc AF-C0P451-F1-model_v1 245 GALECGGNNPAQMNARVGYYRQYCR 269 4456777777777777777777774 PP >> AF-I1NCA0-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 3766 : 111598 ] wmpLDDT: 85.61 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 25.0 27.8 3.6e-08 0.00036 1 62 [. 21 83 .. 21 103 .. 0.81 2 ? -1.8 0.7 5.6 5.7e+04 27 40 .. 131 138 .. 113 163 .. 0.48 Alignments for each domain: == domain 1 score: 25.0 bits; conditional E-value: 3.6e-08 2UVO:A|PDBID|CHAIN|SEQUENCE 1 ercgeqgsnmecpnnlccsqygycgmggdycg..kgcqngacwtskrcgsqaggatctnnqccs 62 e+cg q+ + cpnnlccsqyg+cg +yc+ k+cq++ cw g gg +n ++ AF-I1NCA0-F1-model_v1 21 EQCGRQAGGQTCPNNLCCSQYGWCGNTEEYCSpsKNCQSN-CWGGGGGGGGGGGGESASNVRAT 83 78*****************************544899975.99998888877777666664443 PP == domain 2 score: -1.8 bits; conditional E-value: 5.6 2UVO:A|PDBID|CHAIN|SEQUENCE 27 ggdycgkgcqngac 40 g d c g c AF-I1NCA0-F1-model_v1 131 GRDSC------GKC 138 22222......333 PP >> AF-A0A0P0Y930-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 31777 : 87298 ] wmpLDDT: 74.91 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 23.2 0.3 1.3e-07 0.0013 65 85 .. 8 28 .. 2 45 .. 0.74 Alignments for each domain: == domain 1 score: 23.2 bits; conditional E-value: 1.3e-07 2UVO:A|PDBID|CHAIN|SEQUENCE 65 gycgfgaeycgagcqggpcra 85 ++cg g++y g gcq+gpc AF-A0A0P0Y930-F1-model_v1 8 AFCGTGSDYYGTGCQAGPCDV 28 678888888888888888854 PP >> AF-O24654-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 3955 : 54868 ] wmpLDDT: 89.85 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 23.0 7.4 1.4e-07 0.0014 98 128 .. 30 61 .. 20 77 .. 0.76 2 ? 1.0 0.4 0.77 7.8e+03 14 42 .. 152 182 .. 145 196 .. 0.67 Alignments for each domain: == domain 1 score: 23.0 bits; conditional E-value: 1.4e-07 2UVO:A|PDBID|CHAIN|SEQUENCE 98 cpn.nlccsqwgfcglgsefcgggcqsgacst 128 cp ccs+wgfcg e+cg c sg c+ AF-O24654-F1-model_v1 30 CPGlKECCSRWGFCGTKDEYCGFFCFSGPCNI 61 66534699999999999999999999999975 PP == domain 2 score: 1.0 bits; conditional E-value: 0.77 2UVO:A|PDBID|CHAIN|SEQUENCE 14 nnlccsq.ygy.cgmggdycgkgcqngacwt 42 n cs+ y c g +y g+g + w AF-O24654-F1-model_v1 152 NERYCSKsKKYpCEPGKNYYGRGLLQSITWN 182 4444443123338888888888888888886 PP >> AF-A0A1P8AME8-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 18391 : 54868 ] wmpLDDT: 84.04 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 23.0 6.8 1.5e-07 0.0015 57 86 .. 62 91 .. 47 101 .. 0.79 2 ? -0.1 0.7 1.7 1.7e+04 16 37 .. 182 204 .. 168 217 .. 0.57 Alignments for each domain: == domain 1 score: 23.0 bits; conditional E-value: 1.5e-07 2UVO:A|PDBID|CHAIN|SEQUENCE 57 nnqccsqygycgfgaeycgagcqggpcrad 86 n+ccs gycg + e+cg c +gpc+ AF-A0A1P8AME8-F1-model_v1 62 INECCSHTGYCGTNVEHCGFWCLSGPCQLS 91 489999999999999999999999999865 PP == domain 2 score: -0.1 bits; conditional E-value: 1.7 2UVO:A|PDBID|CHAIN|SEQUENCE 16 lccsqygy.cgmggdycgkgcqn 37 c s y c g y g+g AF-A0A1P8AME8-F1-model_v1 182 YCSSSKTYpCQSGKKYYGRGLLQ 204 23333333244444555555444 PP >> AF-Q688M5-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 37002 : 87298 ] wmpLDDT: 88.47 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 22.4 33.5 2.2e-07 0.0023 88 138 .. 25 71 .. 12 85 .. 0.79 2 ? -0.9 0.4 3 3.1e+04 64 86 .. 166 192 .. 142 208 .. 0.56 Alignments for each domain: == domain 1 score: 22.4 bits; conditional E-value: 2.2e-07 2UVO:A|PDBID|CHAIN|SEQUENCE 88 kcgsqaggklcpnnlccsqwgfcglgsefcgggcqsgacstdkpcgkdagg 138 +cgsqagg lcpn lccs +g+cg s++cg gcqs c cg gg AF-Q688M5-F1-model_v1 25 QCGSQAGGALCPNCLCCSSYGWCGSTSDYCGDGCQSQ-CD---GCGGGGGG 71 7999999999999999999999999999999999985.43...24443333 PP == domain 2 score: -0.9 bits; conditional E-value: 3 2UVO:A|PDBID|CHAIN|SEQUENCE 64 ygyc.....gfgaeycgagcqggpcrad 86 +gyc g a yc +++ pc d AF-Q688M5-F1-model_v1 166 WGYCfkeeiGATASYCVPSAE-WPCAPD 192 333322222333444443333.344444 PP >> AF-I1NCA1-F1-model_v1 resolution: 1.00 experiment: AFDB release_date: 01-JUL-21 [ 26281 : 111598 ] wmpLDDT: 88.99 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- --------- ------- ------- ------- ------- ------- ------- ---- 1 ! 22.4 25.4 2.3e-07 0.0023 2 63 .. 23 82 .. 22 109 .. 0.76 2 ? -1.6 1.1 4.8 4.9e+04 124 139 .. 120 135 .. 85 145 .. 0.59 Alignments for each domain: == domain 1 score: 22.4 bits; conditional E-value: 2.3e-07 2UVO:A|PDBID|CHAIN|SEQUENCE 2 rcgeqgsnmecpnnlccsqygycgmggdycg..kgcqngacwtskrcgsqaggatctnnqccsq 63 +cg q+ + c nnlccsqyg+cg + d+c+ k+cq+ cw s gg +++n ++ AF-I1NCA1-F1-model_v1 23 NCGRQAGGQTCGNNLCCSQYGWCGNSEDHCSpsKNCQS-TCWGSGG--GGGGGESASN-VRATY 82 7*****************************64489996.8**9853..3345555444.33334 PP == domain 2 score: -1.6 bits; conditional E-value: 4.8 2UVO:A|PDBID|CHAIN|SEQUENCE 124 gacstdkpcgkdaggr 139 + c p g+da g+ AF-I1NCA1-F1-model_v1 120 AFCGPVGPRGRDACGK 135 3455555555555554 PP Internal pipeline statistics summary: ------------------------------------- Query model(s): 1 (171 nodes) Target sequences: 365198 (160235650 residues searched) Passed MSV filter: 21203 (0.0580589); expected 7304.0 (0.02) Passed bias filter: 5935 (0.0162515); expected 7304.0 (0.02) Passed Vit filter: 554 (0.00151699); expected 365.2 (0.001) Passed Fwd filter: 38 (0.000104053); expected 3.7 (1e-05) Initial search space (Z): 365198 [actual number of targets] Domain search space (domZ): 36 [number of targets reported over threshold] # CPU time: 2.06u 0.10s 00:00:02.16 Elapsed: 00:00:00.79 # Mc/sec: 34293.84 // # Alignment of 36 hits satisfying inclusion thresholds saved to: phmmerAlignment_af2.log [ok] """
70.391213
367
0.519422
8,499
67,294
4.081304
0.111778
0.027849
0.035806
0.035892
0.595093
0.520512
0.450053
0.386917
0.360856
0.324848
0
0.217905
0.323773
67,294
956
368
70.391213
0.544346
0
0
0.240148
0
0.229064
0.998722
0.234282
0
0
0
0
0
1
0
false
0.009852
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
a02b8b9686d9666e4bdeb7f575f0b08be5430a68
158
py
Python
mymoney/apps/banktransactions/apps.py
ychab/mymoney
9ee665d40648fd0b95f6e90d82ccf2bfc791e8af
[ "BSD-3-Clause" ]
67
2015-12-22T10:27:34.000Z
2022-03-10T21:33:18.000Z
mymoney/apps/banktransactions/apps.py
clebercarmo/mymoney
9ee665d40648fd0b95f6e90d82ccf2bfc791e8af
[ "BSD-3-Clause" ]
null
null
null
mymoney/apps/banktransactions/apps.py
clebercarmo/mymoney
9ee665d40648fd0b95f6e90d82ccf2bfc791e8af
[ "BSD-3-Clause" ]
35
2016-08-07T11:43:51.000Z
2022-02-21T21:20:06.000Z
from django.apps import AppConfig class BankTransactionConfig(AppConfig): name = 'mymoney.apps.banktransactions' verbose_name = "Bank transactions"
22.571429
42
0.778481
16
158
7.625
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.14557
158
6
43
26.333333
0.903704
0
0
0
0
0
0.291139
0.183544
0
0
0
0
0
1
0
false
0
0.25
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
0
0
1
0
0
3
a032ba60827246c9e0df53798b7634b1e632fff9
74
py
Python
codigo.py
MsCruz018/demo-de-clase-2018-01
6605ae3aa474bda9fd3bf17e58cc2495738f46aa
[ "MIT" ]
null
null
null
codigo.py
MsCruz018/demo-de-clase-2018-01
6605ae3aa474bda9fd3bf17e58cc2495738f46aa
[ "MIT" ]
1
2018-02-24T12:53:56.000Z
2018-02-24T12:53:56.000Z
codigo.py
MsCruz018/demo-de-clase-2018-01
6605ae3aa474bda9fd3bf17e58cc2495738f46aa
[ "MIT" ]
null
null
null
# Codigo de ejemplor para merger for i in 10 x = x + 1
14.8
33
0.5
12
74
3.083333
0.916667
0
0
0
0
0
0
0
0
0
0
0.075
0.459459
74
4
34
18.5
0.85
0.405405
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
3
a03c3227f3b5c85aa309ffb0aa898204d712151c
321
py
Python
courses/admin.py
Dynamicist-handa/EscuelaLingua
198abfcc14204d8ecd2706f2de2650293219662e
[ "Apache-2.0" ]
null
null
null
courses/admin.py
Dynamicist-handa/EscuelaLingua
198abfcc14204d8ecd2706f2de2650293219662e
[ "Apache-2.0" ]
null
null
null
courses/admin.py
Dynamicist-handa/EscuelaLingua
198abfcc14204d8ecd2706f2de2650293219662e
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import Course, Content, Test, User, Homework, HomeworkSubmission admin.site.register(Course) admin.site.register(Content) admin.site.register(Test) admin.site.register(User) admin.site.register(Homework) admin.site.register(HomeworkSubmission)
26.75
77
0.816199
42
321
6.238095
0.380952
0.206107
0.389313
0
0
0
0
0
0
0
0
0
0.080997
321
11
78
29.181818
0.888136
0.080997
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
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
0
0
0
0
0
0
3
a0415be3a2194a9e9c1c91543f5d76db93b57716
2,594
py
Python
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/texture_compression.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/texture_compression.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/texture_compression.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p, constants as _cs, arrays from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_ARB_texture_compression' def _f( function ): return _p.createFunction( function,_p.GL,'GL_ARB_texture_compression',False) _p.unpack_constants( """GL_COMPRESSED_ALPHA_ARB 0x84E9 GL_COMPRESSED_LUMINANCE_ARB 0x84EA GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB GL_COMPRESSED_INTENSITY_ARB 0x84EC GL_COMPRESSED_RGB_ARB 0x84ED GL_COMPRESSED_RGBA_ARB 0x84EE GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 GL_TEXTURE_COMPRESSED_ARB 0x86A1 GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3""", globals()) glget.addGLGetConstant( GL_TEXTURE_COMPRESSION_HINT_ARB, (1,) ) glget.addGLGetConstant( GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB, (1,) ) glget.addGLGetConstant( GL_COMPRESSED_TEXTURE_FORMATS_ARB, (1,) ) @_f @_p.types(None,_cs.GLenum,_cs.GLint,_cs.GLenum,_cs.GLsizei,_cs.GLsizei,_cs.GLsizei,_cs.GLint,_cs.GLsizei,ctypes.c_void_p) def glCompressedTexImage3DARB( target,level,internalformat,width,height,depth,border,imageSize,data ):pass @_f @_p.types(None,_cs.GLenum,_cs.GLint,_cs.GLenum,_cs.GLsizei,_cs.GLsizei,_cs.GLint,_cs.GLsizei,ctypes.c_void_p) def glCompressedTexImage2DARB( target,level,internalformat,width,height,border,imageSize,data ):pass @_f @_p.types(None,_cs.GLenum,_cs.GLint,_cs.GLenum,_cs.GLsizei,_cs.GLint,_cs.GLsizei,ctypes.c_void_p) def glCompressedTexImage1DARB( target,level,internalformat,width,border,imageSize,data ):pass @_f @_p.types(None,_cs.GLenum,_cs.GLint,_cs.GLint,_cs.GLint,_cs.GLint,_cs.GLsizei,_cs.GLsizei,_cs.GLsizei,_cs.GLenum,_cs.GLsizei,ctypes.c_void_p) def glCompressedTexSubImage3DARB( target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data ):pass @_f @_p.types(None,_cs.GLenum,_cs.GLint,_cs.GLint,_cs.GLint,_cs.GLsizei,_cs.GLsizei,_cs.GLenum,_cs.GLsizei,ctypes.c_void_p) def glCompressedTexSubImage2DARB( target,level,xoffset,yoffset,width,height,format,imageSize,data ):pass @_f @_p.types(None,_cs.GLenum,_cs.GLint,_cs.GLint,_cs.GLsizei,_cs.GLenum,_cs.GLsizei,ctypes.c_void_p) def glCompressedTexSubImage1DARB( target,level,xoffset,width,format,imageSize,data ):pass @_f @_p.types(None,_cs.GLenum,_cs.GLint,ctypes.c_void_p) def glGetCompressedTexImageARB( target,level,img ):pass def glInitTextureCompressionARB(): '''Return boolean indicating whether this extension is available''' from OpenGL import extensions return extensions.hasGLExtension( EXTENSION_NAME )
52.938776
141
0.834618
381
2,594
5.301837
0.246719
0.080198
0.066832
0.038119
0.490594
0.369802
0.338119
0.338119
0.338119
0.338119
0
0.019207
0.056669
2,594
48
142
54.041667
0.806293
0.045104
0
0.159091
1
0
0.184104
0.148824
0
0
0.026764
0
0
1
0.204545
false
0.159091
0.090909
0.022727
0.340909
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
0
0
0
3
a051e2385bbcc5d7049f49320807be67f85907c8
343
py
Python
canvasapi/content_export.py
eriktews/canvasapi
132146395ecf55227cae69dc4d5f6d94545172b9
[ "MIT" ]
null
null
null
canvasapi/content_export.py
eriktews/canvasapi
132146395ecf55227cae69dc4d5f6d94545172b9
[ "MIT" ]
null
null
null
canvasapi/content_export.py
eriktews/canvasapi
132146395ecf55227cae69dc4d5f6d94545172b9
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals from six import python_2_unicode_compatible from canvasapi.canvas_object import CanvasObject @python_2_unicode_compatible class ContentExport(CanvasObject): def __str__(self): return "{} {} ({})".format(self.export_type, self.user_id, self.id)
28.583333
82
0.793003
43
343
5.860465
0.651163
0.055556
0.111111
0.190476
0
0
0
0
0
0
0
0.006645
0.122449
343
11
83
31.181818
0.830565
0
0
0
0
0
0.029155
0
0
0
0
0
0
1
0.142857
false
0
0.428571
0.142857
0.857143
0.142857
0
0
0
null
0
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
0
0
0
1
1
0
0
0
3
a076d2e11e99695f10dcee27f27fd25325c72189
4,474
py
Python
tests/types/test_user_events_types.py
deleteduser0206/vkwave
8e641bcdd9bec5c30818c82f34662fbd14053e88
[ "MIT" ]
null
null
null
tests/types/test_user_events_types.py
deleteduser0206/vkwave
8e641bcdd9bec5c30818c82f34662fbd14053e88
[ "MIT" ]
null
null
null
tests/types/test_user_events_types.py
deleteduser0206/vkwave
8e641bcdd9bec5c30818c82f34662fbd14053e88
[ "MIT" ]
null
null
null
from ctypes.wintypes import DWORD import json from vkwave.types.user_events import ( ChangedChatSettingsType, PlatformEnum, TimeoutUserEnum, get_event_object, MessageFlag, ) def test_deleted_message_event(): event = get_event_object( [2, 666, 131200, 2000000005, ] ) assert event.object.message_id == 666 assert event.object.peer_id == 2000000005 assert event.object.flags == [MessageFlag.DELETED, MessageFlag.DELETED_ALL, 131200] def test_message_new_event(): event = get_event_object( [4, 174167, 2629633, 2000000005, 1582466146, "Всем привет я тест", {"from": "253866502", "mentions": [431631325], "marked_users": [[1, [431631325]]], }, {"reply": '{"conversation_message_id":93222}', "fwd": "0_0"}, 0, ], ) assert event.object.text == "Всем привет я тест" assert event.object.peer_id == 2000000005 assert event.object.message_data.mentions[0] == 431631325 assert json.loads(event.object.extra_message_data["reply"])["conversation_message_id"] == 93222 assert event.object.message_id == 174167 def test_friend_online(): event = get_event_object([8, 132583811, 4, 1637776094, 2274003, 0, 0]) assert event.object.user_id == 132583811 assert event.object.platform == PlatformEnum.ANDROID assert event.object.timestamp == 1637776094 assert event.object.app_id == 2274003 assert event.object.is_mobile == 0 def test_read_outgoing_messages(): event = get_event_object([7, 349964901, 173672, 0]) assert event.object.message_id == 173672 assert event.object.peer_id == 349964901 assert event.object.count == 0 def test_friend_offline(): event = get_event_object([9, -448252266, 0, 1582464656, 2274003, 0, 0]) assert event.object.is_timeout == TimeoutUserEnum.LEAVED_FROM_SITE assert event.object.timestamp == 1582464656 def test_chat_flags_reset(): event = get_event_object([10, 2000000222, 131200]) assert event.object.peer_id == 2000000222 assert event.object.flags == [MessageFlag.DELETED, MessageFlag.DELETED_ALL, 131200] def test_change_chat_setting(): event = get_event_object([52, 3, 2000000222, 132583811]) assert event.object.type == ChangedChatSettingsType.NEW_ADMINISTRATOR assert event.object.peer_id == 2000000222 assert event.object.extra == 132583811 def test_message_with_keyboard(): event = get_event_object( [4, 188794, 490832562, -191949777, 1582730565, "123", { "title": " ... ", "keyboard": { "one_time": False, "buttons": [[{ "action": {"type": "text", "payload": "", "label": "helloworld", }, "color": "default", }]], }, }, {}, 0, ], ) assert event.object.message_id == 188794 assert event.object.event_id == 4 assert event.object.flags == [MessageFlag.OUTBOX, MessageFlag.FROM_CHAT, MessageFlag.FROM_FRIEND, MessageFlag.DELETED, MessageFlag.ATTACHMENT, MessageFlag.CANCEL_SPAM, MessageFlag.HIDDEN, 490832562 # sum ] assert event.object.text == "123" assert not event.object.message_data.keyboard.one_time assert event.object.message_data.keyboard.buttons[0][0].action.label == "helloworld" assert event.object.message_data.keyboard.buttons[0][0].action.type.value == "text" def test_changed_unread_count(): event = get_event_object([80, 10, 0, 0, 0, 0, 0]) assert event.object.unread_count == 10 assert event.object.unread_unmuted_count == 0 assert event.object.show_only_muted is False assert event.object.business_notify_unread_count == 0 assert event.object.header_unread_count == 0 assert event.object.header_unread_unmuted_count == 0 def test_reset_flag_event(): event = get_event_object([3, 3281383, 8, 2000000148]) assert event.object.message_id == 3281383 assert event.object.flags == [MessageFlag.IMPORTANT, 8] assert event.object.peer_id == 2000000148 def test_edit_message_event(): event = get_event_object( [5, 3281388, 8211, 2000000222, 1637748433, 'test edit', {'from': '132583811'}, {}, 1401012148, 4629, 1637748440] ) assert event.object.message_id == 3281388 assert event.object.flags == [MessageFlag.UNREAD, MessageFlag.OUTBOX, MessageFlag.FROM_CHAT, MessageFlag.FROM_CHAT2, 8211] assert event.object.peer_id == 2000000222 assert event.object.text == "test edit" assert event.object.message_data.from_id == "132583811"
38.904348
120
0.699821
551
4,474
5.477314
0.252269
0.204109
0.236581
0.069251
0.43837
0.282306
0.213386
0.179589
0.154407
0.082836
0
0.150856
0.177693
4,474
114
121
39.245614
0.669475
0.000671
0
0.125
0
0
0.063101
0.012531
0
0
0
0
0.5
1
0.125
false
0
0.045455
0
0.170455
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
0
0
0
0
0
0
0
3
a08c90e066996974ce194dcd0bbf7bb87cd03122
239
py
Python
docs/report/cloudmesh-openapi/example/doc.py
rickotten/cybertraining-dsc.github.io
c8ea59be4f09fd543040ba0908af118df5820a70
[ "Apache-2.0" ]
7
2020-02-29T14:53:19.000Z
2021-01-17T17:08:44.000Z
example/doc.py
imishra1/cloudmesh-openapi
89fdc74aae459aba4ebb959f8564bb3ddd967cbb
[ "Apache-2.0" ]
27
2020-02-29T13:38:11.000Z
2020-09-02T20:24:59.000Z
example/doc.py
imishra1/cloudmesh-openapi
89fdc74aae459aba4ebb959f8564bb3ddd967cbb
[ "Apache-2.0" ]
6
2020-03-02T17:09:14.000Z
2020-10-30T22:48:01.000Z
def sample(a: int, b: float, c: str) -> str: """ This is a sample :param a: this is a with two lines :param b: this is b :param c: this is c :return: this is a string conatining that """ pass
19.916667
45
0.531381
39
239
3.25641
0.487179
0.23622
0.165354
0
0
0
0
0
0
0
0
0
0.368201
239
11
46
21.727273
0.84106
0.60251
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
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
0
0
0
3
a09dd9fd3b02a8e981580048b87b4e687081aa7f
26,358
py
Python
src/ralph_scrooge/tests/rest_api/public/test_team_time_division.py
ar4s/ralph_pricing
40127e9450edc91ba0be725d63bf691dde16a137
[ "Apache-2.0" ]
4
2016-05-06T19:28:53.000Z
2018-01-26T21:13:40.000Z
src/ralph_scrooge/tests/rest_api/public/test_team_time_division.py
ar4s/ralph_pricing
40127e9450edc91ba0be725d63bf691dde16a137
[ "Apache-2.0" ]
283
2015-01-07T15:06:34.000Z
2019-08-08T10:43:47.000Z
src/ralph_scrooge/tests/rest_api/public/test_team_time_division.py
ar4s/ralph_pricing
40127e9450edc91ba0be725d63bf691dde16a137
[ "Apache-2.0" ]
16
2015-01-27T10:33:20.000Z
2020-06-25T07:04:21.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import datetime import json from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from rest_framework.test import APIClient from ralph_scrooge.tests import ScroogeTestCase from ralph_scrooge.models import ( Environment, Service, ServiceEnvironment, ) from ralph_scrooge.models import ( Team, TeamManager, TeamServiceEnvironmentPercent, ) from ralph_scrooge.tests.utils.factory import ( ServiceEnvironmentFactory, TeamFactory, ) class TestTeamTimeDivision(ScroogeTestCase): def setUp(self): superuser = get_user_model().objects.create_superuser( 'test', 'test@test.test', 'test' ) self.client = APIClient() self.client.force_authenticate(superuser) self.date = datetime.date(2016, 9, 8) self.service_environment1 = ServiceEnvironmentFactory() self.service_environment2 = ServiceEnvironmentFactory() self.service_environment3 = ServiceEnvironmentFactory() self.service1_uid = self.service_environment1.service.ci_uid self.service2_uid = self.service_environment2.service.ci_uid self.service3_uid = self.service_environment3.service.ci_uid self.service1_env_name = self.service_environment1.environment.name self.service2_env_name = self.service_environment2.environment.name self.service3_env_name = self.service_environment3.environment.name self.team = TeamFactory() def test_if_uploaded_division_is_the_same_when_fetched_with_get(self): division = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 20.0, }, { "service_uid": self.service3_uid, "environment": self.service3_env_name, "percent": 20.0, } ] } resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division), content_type='application/json', ) self.assertEquals(resp.status_code, 201) resp = self.client.get( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ) ) self.assertEquals(resp.status_code, 200) received_response = json.loads(resp.content) expected_response = division # The order of returned objects depends on DB backend, so we have to # manually sort them here before we compare them. received_response['division'].sort(key=lambda d: d['service_uid']) for i in range(len(expected_response['division'])): self.assertEquals( received_response['division'][i]['service_uid'], expected_response['division'][i]['service_uid'] ) self.assertEquals( received_response['division'][i]['environment'], expected_response['division'][i]['environment'] ) self.assertEquals( received_response['division'][i]['percent'], expected_response['division'][i]['percent'] ) def test_for_error_when_service_env_does_not_exist(self): self.assertEquals( ServiceEnvironment.objects.filter( service__ci_uid=self.service2_uid, environment__name=self.service1_env_name, ).count(), 0 ) division = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { # Non-existing service environment (although such service # and env exist). "service_uid": self.service2_uid, "environment": self.service1_env_name, "percent": 40.0, } ] } resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division), content_type='application/json', ) self.assertEquals(resp.status_code, 400) self.assertIn('Service environment', resp.content) self.assertIn('does not exist', resp.content) self.assertIn(self.service2_uid, resp.content) self.assertIn(self.service1_env_name, resp.content) def test_for_error_when_percents_doesnt_sum_up_to_100(self): # We are testing here *both* validation of `percent` field, and the # correctness of saved values. division_over_100 = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 30.0, }, { "service_uid": self.service3_uid, "environment": self.service3_env_name, "percent": 20.0, } ] } self.assertEquals(TeamServiceEnvironmentPercent.objects.count(), 0) resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division_over_100), content_type='application/json', ) self.assertEquals(resp.status_code, 400) self.assertEquals(TeamServiceEnvironmentPercent.objects.count(), 0) self.assertIn("Percents should sum to 100", resp.content) self.assertIn(str(110.0), resp.content) division_less_than_100 = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 30.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 30.0, }, { "service_uid": self.service3_uid, "environment": self.service3_env_name, "percent": 20.0, } ] } self.assertEquals(TeamServiceEnvironmentPercent.objects.count(), 0) resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division_less_than_100), content_type='application/json', ) self.assertEquals(resp.status_code, 400) self.assertEquals(TeamServiceEnvironmentPercent.objects.count(), 0) self.assertIn("Percents should sum to 100", resp.content) self.assertIn(str(80.0), resp.content) def test_for_success_when_percents_sum_up_to_100(self): division = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 20.0, }, { "service_uid": self.service3_uid, "environment": self.service3_env_name, "percent": 20.0, } ] } self.assertEquals(TeamServiceEnvironmentPercent.objects.count(), 0) resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division), content_type='application/json', ) self.assertEquals(resp.status_code, 201) self.assertEquals(TeamServiceEnvironmentPercent.objects.count(), 3) percent_total = 0 for tsep in TeamServiceEnvironmentPercent.objects.all(): percent_total += tsep.percent self.assertEquals(percent_total, 100) def test_for_error_when_team_does_not_exist(self): division = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 20.0, }, { "service_uid": self.service3_uid, "environment": self.service3_env_name, "percent": 20.0, } ] } non_existing_team_id = 9999 self.assertFalse( Team.objects.filter(id=non_existing_team_id).exists() ) resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': non_existing_team_id, }, ), json.dumps(division), content_type='application/json', ) self.assertEquals(resp.status_code, 404) self.assertIn(str(non_existing_team_id), resp.content) self.assertIn("does not exist", resp.content) def test_if_only_team_manager_can_upload_divisions(self): regular_user = get_user_model().objects.create_user( 'test2', 'test2@test.test', 'test2' ) self.client.force_authenticate(regular_user) division = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 20.0, }, { "service_uid": self.service3_uid, "environment": self.service3_env_name, "percent": 20.0, } ] } url = reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ) payload = json.dumps(division) resp = self.client.post(url, payload, content_type='application/json') self.assertEquals(resp.status_code, 403) self.assertEquals(TeamServiceEnvironmentPercent.objects.count(), 0) # Let's promote regular_user to Owner and then to TeamManager (we # silently assume that all team managers are also owners - but not # the other way around). TeamManager.objects.create(team=self.team, manager=regular_user) resp = self.client.post(url, payload, content_type='application/json') self.assertEquals(resp.status_code, 201) self.assertEquals(TeamServiceEnvironmentPercent.objects.count(), 3) def test_if_only_team_manager_can_fetch_divisions(self): division = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 20.0, }, { "service_uid": self.service3_uid, "environment": self.service3_env_name, "percent": 20.0, } ] } url = reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ) # Let's upload initial data as a superuser. resp = self.client.post( url, json.dumps(division), content_type='application/json' ) self.assertEquals(resp.status_code, 201) self.assertEquals(TeamServiceEnvironmentPercent.objects.count(), 3) # Then try to fetch this data as a regular user. regular_user = get_user_model().objects.create_user( 'test2', 'test2@test.test', 'test2' ) self.client.force_authenticate(regular_user) resp = self.client.get(url) self.assertEquals(resp.status_code, 403) # Try again with regular_user promoted to TeamManager. TeamManager.objects.create(team=self.team, manager=regular_user) resp = self.client.get(url) self.assertEquals(resp.status_code, 200) def test_if_uploaded_division_overwrites_previous_one_for_same_team_and_date(self): # noqa self.assertEquals(TeamServiceEnvironmentPercent.objects.count(), 0) division1 = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 40.0, } ] } resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division1), content_type='application/json', ) self.assertEquals(resp.status_code, 201) self.assertEquals(TeamServiceEnvironmentPercent.objects.count(), 2) service_uids = set() env_names = set() percents = set() for tsep in TeamServiceEnvironmentPercent.objects.all(): service_uids.add(tsep.service_environment.service.ci_uid) env_names.add(tsep.service_environment.environment.name) percents.add(tsep.percent) self.assertEquals(service_uids, {self.service1_uid, self.service2_uid}) self.assertEquals( env_names, {self.service1_env_name, self.service2_env_name} ) self.assertEquals(percents, {60, 40}) division2 = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 70.0, }, { "service_uid": self.service3_uid, "environment": self.service3_env_name, "percent": 30.0, } ] } resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division2), content_type='application/json', ) self.assertEquals(resp.status_code, 201) self.assertEquals(TeamServiceEnvironmentPercent.objects.count(), 2) service_uids = set() env_names = set() percents = set() for tsep in TeamServiceEnvironmentPercent.objects.all(): service_uids.add(tsep.service_environment.service.ci_uid) env_names.add(tsep.service_environment.environment.name) percents.add(tsep.percent) self.assertEquals(service_uids, {self.service1_uid, self.service3_uid}) self.assertEquals( env_names, {self.service1_env_name, self.service3_env_name} ) self.assertEquals(percents, {70, 30}) def test_for_error_when_service_does_not_exist(self): non_existing_service_uid = 'fake_uid' self.assertEquals( Service.objects.filter(ci_uid=non_existing_service_uid).count(), 0 ) division = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { "service_uid": non_existing_service_uid, "environment": self.service2_env_name, "percent": 40.0, } ] } resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division), content_type='application/json', ) self.assertEquals(resp.status_code, 400) # Scrooge checks for the existence of a given service # indirectly, i.e. by checking if service env exists - hence # assertion below. self.assertIn("Service environment", resp.content) self.assertIn("does not exist", resp.content) self.assertIn(non_existing_service_uid, resp.content) def test_for_error_when_service_uid_is_missing(self): division = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 20.0, }, { "environment": self.service3_env_name, "percent": 20.0, } ] } resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division), content_type='application/json', ) self.assertEquals(resp.status_code, 400) self.assertIn("service_uid", resp.content) self.assertIn("field is required", resp.content) def test_for_error_when_environment_is_missing(self): division = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 20.0, }, { "service_uid": self.service3_uid, "percent": 20.0, } ] } resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division), content_type='application/json', ) self.assertEquals(resp.status_code, 400) self.assertIn("environment", resp.content) self.assertIn("field is required", resp.content) def test_for_error_when_environment_does_not_exist(self): non_existing_env_name = 'fake_uid' self.assertEquals( Environment.objects.filter(name=non_existing_env_name).count(), 0 ) division = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { "service_uid": self.service2_uid, "environment": non_existing_env_name, "percent": 40.0, } ] } resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division), content_type='application/json', ) self.assertEquals(resp.status_code, 400) # Scrooge checks for the existence of a given environment # indirectly, i.e. by checking if service env exists - hence # assertion below. self.assertIn("Service environment", resp.content) self.assertIn("does not exist", resp.content) self.assertIn(non_existing_env_name, resp.content) def test_for_error_when_percent_is_missing(self): division = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 60.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 20.0, }, { "service_uid": self.service3_uid, "environment": self.service3_env_name, } ] } resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division), content_type='application/json', ) self.assertEquals(resp.status_code, 400) self.assertIn("percent", resp.content) self.assertIn("field is required", resp.content) def test_for_error_when_division_is_empty_list_or_none(self): for d in [{'division': []}, {'division': None}]: resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(d), content_type='application/json', ) self.assertEquals(resp.status_code, 400) self.assertIn("division", resp.content) self.assertIn("may not be null", resp.content) def test_for_error_when_service_uid_and_env_pairs_are_repeated(self): division = { "division": [ { "service_uid": self.service1_uid, "environment": self.service1_env_name, "percent": 70.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 20.0, }, { "service_uid": self.service2_uid, "environment": self.service2_env_name, "percent": 10.0, } ] } offending_pair = "{}/{}".format( self.service2_uid, self.service2_env_name ) resp = self.client.post( reverse( 'team_time_division', kwargs={ 'year': self.date.year, 'month': self.date.month, 'team_id': self.team.id, }, ), json.dumps(division), content_type='application/json', ) self.assertEquals(resp.status_code, 400) self.assertIn("Repeated service_uid/environment", resp.content) self.assertIn(offending_pair, resp.content)
35.8125
95
0.49742
2,347
26,358
5.348956
0.101832
0.031225
0.046838
0.028676
0.790505
0.748686
0.702406
0.694281
0.694121
0.67819
0
0.024129
0.40409
26,358
735
96
35.861224
0.775132
0.032704
0
0.573723
0
0
0.109441
0.000903
0
0
0
0
0.106569
1
0.023358
false
0
0.018978
0
0.043796
0.00146
0
0
0
null
0
0
0
0
1
1
0
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
3
a09f9f520443c5b890b905dc8fa24c4e9a0cc9b5
2,527
py
Python
thesis/reader.py
Clockers/CTGAN
c98bc2e4aa786c33f6b17819c64912a15f0b41cf
[ "MIT" ]
1
2021-07-07T16:48:55.000Z
2021-07-07T16:48:55.000Z
thesis/reader.py
Clockers/CTGAN
c98bc2e4aa786c33f6b17819c64912a15f0b41cf
[ "MIT" ]
null
null
null
thesis/reader.py
Clockers/CTGAN
c98bc2e4aa786c33f6b17819c64912a15f0b41cf
[ "MIT" ]
null
null
null
import os import pandas path_original = './datasets/original/' path_generated = './datasets/generated/' def read_csv(name): data = pandas.read_csv(path_original + name) data = remove_columns(data, name) print(data.dtypes) print(data.select_dtypes('object').columns) #data["Source Port"] = data["Source Port"].astype(int) #print(data.dtypes) #print(data.select_dtypes('object').columns) return data def write_csv(sample, name, early_stop): sample.to_csv(path_generated + 'early_stop' + str(early_stop) + '/' + name, index=False) return 0 def get_datasets(): return list(filter(lambda file: file.endswith('.csv'), os.listdir(path_original))) def remove_columns(data, name): # print(data.isnull().values.any()) if name == 'ADFANet_Shuffled.csv': data.drop('Time1', inplace=True, axis=1) data.drop('Time2', inplace=True, axis=1) elif name == 'AndMal_Shuffled.csv': data.drop('Timestamp', inplace=True, axis=1) data.drop('Flow ID', inplace=True, axis=1) data.drop('Source IP', inplace=True, axis=1) data.drop('Destination IP', inplace=True, axis=1) elif name == 'CICIDS17_Shuffled_Reduced.csv': data.drop('Flow_ID', inplace=True, axis=1) data.drop('Source_IP', inplace=True, axis=1) data.drop('Destination_IP', inplace=True, axis=1) data.drop('Timestamp', inplace=True, axis=1) elif name == 'CIDDS_Shuffled.csv': data.drop('Date_first_seen', inplace=True, axis=1) data.drop('Src_IP_Addr', inplace=True, axis=1) data.drop('Dst_IP_Addr', inplace=True, axis=1) elif name == 'CTU_Shuffled.csv': data.drop('Details', inplace=True, axis=1) data.drop('Dir', inplace=True, axis=1) data.drop('StartTime', inplace=True, axis=1) data.drop('SrcAddr', inplace=True, axis=1) data.drop('DstAddr', inplace=True, axis=1) elif name == 'ISCX_Shuffled.csv': data.drop('source', inplace=True, axis=1) data.drop('destination', inplace=True, axis=1) data.drop('startDateTime', inplace=True, axis=1) data.drop('stopDateTime', inplace=True, axis=1) elif name == 'NGDIS_Shuffled.csv': data.drop('Date', inplace=True, axis=1) data.drop('Time', inplace=True, axis=1) elif name == 'UGR_Shuffled.csv': data.drop('Timestamp', inplace=True, axis=1) data.drop('IP_S', inplace=True, axis=1) data.drop('IP_D', inplace=True, axis=1) return data
31.5875
92
0.640681
349
2,527
4.532951
0.234957
0.136536
0.256005
0.273072
0.615044
0.585967
0.30847
0.247788
0.247788
0.185841
0
0.015795
0.198259
2,527
79
93
31.987342
0.765054
0.058567
0
0.096154
1
0
0.185263
0.021053
0
0
0
0
0
1
0.076923
false
0
0.038462
0.019231
0.192308
0.038462
0
0
0
null
0
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
3
a0a3e78072d1bd1ebf47112a9bd42428690299a7
85
py
Python
bvb/main.py
njohn1970/bvb
acdc7c816ea7861d8a20f5513204e6b1d99cfb06
[ "MIT" ]
null
null
null
bvb/main.py
njohn1970/bvb
acdc7c816ea7861d8a20f5513204e6b1d99cfb06
[ "MIT" ]
null
null
null
bvb/main.py
njohn1970/bvb
acdc7c816ea7861d8a20f5513204e6b1d99cfb06
[ "MIT" ]
null
null
null
''' Created on 20 Jul 2015 @author: njohn ''' if __name__ == '__main__': pass
8.5
26
0.6
11
85
3.909091
1
0
0
0
0
0
0
0
0
0
0
0.09375
0.247059
85
10
27
8.5
0.578125
0.447059
0
0
0
0
0.2
0
0
0
0
0
0
1
0
true
0.5
0
0
0
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
0
0
0
0
0
3
a0ad72d553794fbbd69d1fcda7fedbc55c1da225
4,456
py
Python
tests/plugins/qualification_management/test_qualification_change_manager.py
ephios-dev/ephios
c8d30576238a189ccef1929661f547ee3fe6e5d7
[ "MIT" ]
14
2021-01-13T12:15:03.000Z
2022-03-20T10:02:11.000Z
tests/plugins/qualification_management/test_qualification_change_manager.py
ephios-dev/ephios
c8d30576238a189ccef1929661f547ee3fe6e5d7
[ "MIT" ]
570
2020-09-19T13:37:27.000Z
2022-03-31T09:14:37.000Z
tests/plugins/qualification_management/test_qualification_change_manager.py
ephios-dev/ephios
c8d30576238a189ccef1929661f547ee3fe6e5d7
[ "MIT" ]
5
2021-01-08T16:52:31.000Z
2022-03-20T10:02:25.000Z
import uuid from ephios.core.models import Qualification, QualificationCategory from ephios.plugins.qualification_management.importing import QualificationChangeManager def test_plain_import(deserialized_qualifications): assert not QualificationCategory.objects.exists() QualificationChangeManager().add_deserialized_qualifications_to_db( *deserialized_qualifications ).commit() assert QualificationCategory.objects.count() == 1 assert set(Qualification.objects.all().values_list("uuid", flat=True)) == { uuid.UUID(q.object.uuid) for q in deserialized_qualifications } # assert inclusion assert Qualification.includes.through.objects.count() == 2 assert Qualification.collect_all_included_qualifications( [Qualification.objects.get(uuid=deserialized_qualifications[2].object.uuid)] ) == set(Qualification.objects.all()) def test_importing_cycle_does_not_raise(deserialized_qualifications): b, s, g = deserialized_qualifications b.m2m_data["includes"].append(g.object.uuid) QualificationChangeManager().add_deserialized_qualifications_to_db( *deserialized_qualifications ).commit() assert Qualification.includes.through.objects.count() == 3 for q in deserialized_qualifications: assert Qualification.collect_all_included_qualifications( [Qualification.objects.get(uuid=q.object.uuid)] ) == set(Qualification.objects.all()) def test_removing_from_cycle_does_not_raise(deserialized_qualifications): b, s, g = deserialized_qualifications b.m2m_data["includes"].append(g.object.uuid) QualificationChangeManager().add_deserialized_qualifications_to_db( *deserialized_qualifications ).commit() QualificationChangeManager().remove_qualifications_from_db_fixing_inclusion( Qualification.objects.get(uuid=b.object.uuid) ).commit() assert Qualification.includes.through.objects.count() == 2 QualificationChangeManager().remove_qualifications_from_db_fixing_inclusion( Qualification.objects.get(uuid=s.object.uuid) ).commit() assert Qualification.includes.through.objects.count() == 1 QualificationChangeManager().remove_qualifications_from_db_fixing_inclusion( Qualification.objects.get() ).commit() def test_import_with_inclusion_support_creates_inclusion(deserialized_qualifications): b, s, g = deserialized_qualifications QualificationChangeManager().add_deserialized_qualifications_to_db( b, g ).add_inclusions_of_deserialized_qualifications(s).commit() assert Qualification.objects.count() == 2 assert set(Qualification.objects.get(uuid=g.object.uuid).includes.all()) == { Qualification.objects.get(uuid=b.object.uuid) } def test_removing_qualification_keeps_inclusion(saved_deserialized_qualifications): b, s, g = saved_deserialized_qualifications QualificationChangeManager().remove_qualifications_from_db_fixing_inclusion( Qualification.objects.get(uuid=s.object.uuid) ).commit() assert Qualification.objects.count() == 2 assert set(Qualification.objects.get(uuid=g.object.uuid).includes.all()) == { Qualification.objects.get(uuid=b.object.uuid) } def test_reimporting_clears_existing_wrong_inclusions(saved_deserialized_qualifications): b, s, g = saved_deserialized_qualifications Qualification.objects.get(uuid=g.object.uuid).includes.add( Qualification.objects.get(uuid=b.object.uuid) ) assert Qualification.includes.through.objects.count() == 3 QualificationChangeManager().add_deserialized_qualifications_to_db( *saved_deserialized_qualifications ).commit() assert Qualification.includes.through.objects.count() == 2 assert Qualification.collect_all_included_qualifications( [Qualification.objects.get(uuid=g.object.uuid)] ) == set(Qualification.objects.all()) def test_reimporting_doesnt_change_category(saved_deserialized_qualifications): other_category = QualificationCategory.objects.create( title="other", uuid="3d6696b0-1b49-4065-9d3e-c648ec2b6239" ) qualification = Qualification.objects.first() qualification.category = other_category qualification.save() QualificationChangeManager().add_deserialized_qualifications_to_db( *saved_deserialized_qualifications ).commit() assert Qualification.objects.first().category == other_category
41.259259
89
0.768178
465
4,456
7.096774
0.174194
0.212727
0.090606
0.098182
0.74
0.74
0.700909
0.657879
0.604242
0.525758
0
0.009081
0.135099
4,456
107
90
41.64486
0.847172
0.003591
0
0.604651
0
0
0.013745
0.008112
0
0
0
0
0.197674
1
0.081395
false
0
0.093023
0
0.174419
0
0
0
0
null
1
0
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
3
39fe848dd8890790bab4d9b255b4aa959289c466
281
py
Python
language/python/python/class/meta_class.py
bigfoolliu/liu_aistuff
aa661d37c05c257ee293285dd0868fb7e8227628
[ "MIT" ]
1
2019-11-25T07:23:42.000Z
2019-11-25T07:23:42.000Z
language/python/python/class/meta_class.py
bigfoolliu/liu_aistuff
aa661d37c05c257ee293285dd0868fb7e8227628
[ "MIT" ]
13
2020-01-07T16:09:47.000Z
2022-03-02T12:51:44.000Z
language/python/python/class/meta_class.py
bigfoolliu/liu_aistuff
aa661d37c05c257ee293285dd0868fb7e8227628
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # author: bigfoolliu """ 元类介绍 - https://www.cnblogs.com/ellisonzhang/p/10513238.html - 元类就是创建类这种对象的东西,type就是Python的内建元类,当然了,你也可以创建自己的元类 - 元类的主要目的就是为了当创建类时能够自动地改变类 """ def main(): pass if __name__ == "__main__": main()
12.217391
54
0.679715
30
281
6.1
0.933333
0
0
0
0
0
0
0
0
0
0
0.042017
0.153025
281
22
55
12.772727
0.726891
0.711744
0
0
0
0
0.114286
0
0
0
0
0
0
1
0.25
true
0.25
0
0
0.25
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
1
1
0
0
0
0
0
3