hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
009e8776cfa85887a7c94901dc021527afa5ca46
11,509
py
Python
tests/data23/recipe-577507.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-06-05T08:53:26.000Z
2020-06-05T08:53:26.000Z
tests/data23/recipe-577507.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-06-04T13:47:19.000Z
2020-06-04T13:47:57.000Z
tests/data23/recipe-577507.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-11-07T17:02:46.000Z
2020-11-07T17:02:46.000Z
## # This module provides a powerful 'switch'-like dispatcher system. # Values for switch cases can be anything comparable via '==', a string # for use on the left-hand side of the 'in' operator, or a regular expression. # Iterables of these types can also be used. __author__ = 'Mike Kent' import re class SwitchErro...
41.103571
80
0.588583
7,496
0.651316
0
0
1,513
0.131462
0
0
5,657
0.491528
009eb040adfa94c81028b6d03f34a0e3a951ff0a
1,221
py
Python
three_play/v3/models/requests.py
rnag/three-play
694a9f96ff5edf5f72c04827004b644c0a51365a
[ "MIT" ]
null
null
null
three_play/v3/models/requests.py
rnag/three-play
694a9f96ff5edf5f72c04827004b644c0a51365a
[ "MIT" ]
2
2021-06-12T22:37:35.000Z
2021-06-12T22:38:41.000Z
three_play/v3/models/requests.py
rnag/three-play
694a9f96ff5edf5f72c04827004b644c0a51365a
[ "MIT" ]
null
null
null
from typing import Optional, List from requests import Session from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry from ...config.requests import ( DEFAULT_MAX_RETRIES, DEFAULT_BACKOFF_FACTOR, DEFAULT_STATUS_FORCE_LIST) class SessionWithRetry(Session): def __ini...
32.131579
90
0.669124
947
0.775594
0
0
0
0
0
0
124
0.101556
00a019cbccdf847c336f738afaee1f639509b8fa
2,397
py
Python
linkedlist/Reference_code/q10.py
pengfei-chen/algorithm_qa
c2ccdcb77004e88279d61e4e433ee49527fc34d6
[ "MIT" ]
79
2018-03-27T12:37:49.000Z
2022-01-21T10:18:17.000Z
linkedlist/Reference_code/q10.py
pengfei-chen/algorithm_qa
c2ccdcb77004e88279d61e4e433ee49527fc34d6
[ "MIT" ]
null
null
null
linkedlist/Reference_code/q10.py
pengfei-chen/algorithm_qa
c2ccdcb77004e88279d61e4e433ee49527fc34d6
[ "MIT" ]
27
2018-04-08T03:07:06.000Z
2021-10-30T00:01:50.000Z
""" 问题描述:假设链表中每个节点的值都在[0,9]之间,那么链表整体就可以代表一个整数, 例如:9->3->7,可以代表整数937.给定两个这种链表的头结点head1和head2,请生 成代表两个整数相加值的结果链表。例如:链表1为9->3->7,链表2为6->3,最后生成 新的结果链表为1->0->0->0. 思路: 1)如果将链表先转化为整数相加,再转成链表,可能会出现溢出 2)可以使用逆序栈将链表节点压入栈,再进行操作 3)利用链表的逆序求解,这样不会占用额外空间复杂度 """ from linkedlist.toolcls import Node, PrintMixin class ListAddTool(Pr...
26.340659
71
0.546099
1,909
0.694434
0
0
1,868
0.67952
0
0
609
0.221535
00a0af81b21a72f468dace443b20c2e72d9f2027
6,530
py
Python
xen/xen-4.2.2/tools/python/xen/xm/setpolicy.py
zhiming-shen/Xen-Blanket-NG
47e59d9bb92e8fdc60942df526790ddb983a5496
[ "Apache-2.0" ]
1
2018-02-02T00:15:26.000Z
2018-02-02T00:15:26.000Z
xen/xen-4.2.2/tools/python/xen/xm/setpolicy.py
zhiming-shen/Xen-Blanket-NG
47e59d9bb92e8fdc60942df526790ddb983a5496
[ "Apache-2.0" ]
null
null
null
xen/xen-4.2.2/tools/python/xen/xm/setpolicy.py
zhiming-shen/Xen-Blanket-NG
47e59d9bb92e8fdc60942df526790ddb983a5496
[ "Apache-2.0" ]
1
2019-05-27T09:47:18.000Z
2019-05-27T09:47:18.000Z
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
35.879121
77
0.56294
0
0
0
0
0
0
0
0
2,183
0.334303
00a1fb82dbb69af4873042c32811b5e206348686
21
py
Python
models/notes/constants.py
choeminjun/src_server_1.2
82e564e694e4f3011faf02c6de026d8a3b137680
[ "Apache-2.0" ]
null
null
null
models/notes/constants.py
choeminjun/src_server_1.2
82e564e694e4f3011faf02c6de026d8a3b137680
[ "Apache-2.0" ]
null
null
null
models/notes/constants.py
choeminjun/src_server_1.2
82e564e694e4f3011faf02c6de026d8a3b137680
[ "Apache-2.0" ]
null
null
null
COLLECTION = "notes"
10.5
20
0.714286
0
0
0
0
0
0
0
0
7
0.333333
00a6a2f92810e78323611c3932598a5778ba1e13
1,310
py
Python
src/cnn_cifar10/mixup.py
chrismolli/redes_neuronales_semester_project
3309d102b809b395af39f7b570927e23d10db5ea
[ "MIT" ]
null
null
null
src/cnn_cifar10/mixup.py
chrismolli/redes_neuronales_semester_project
3309d102b809b395af39f7b570927e23d10db5ea
[ "MIT" ]
null
null
null
src/cnn_cifar10/mixup.py
chrismolli/redes_neuronales_semester_project
3309d102b809b395af39f7b570927e23d10db5ea
[ "MIT" ]
null
null
null
import numpy as np def mixup_extend_data(x,y,n): """ MIXUP_EXTEND_DATA will use the mixup technique to append n inter-class representations to the given data. y must be in a one hot representation. """ # copy data x_extend = [] y_extend = [] # create new data for i in range...
31.190476
73
0.600763
0
0
0
0
0
0
0
0
393
0.3
00a6ba612c79d98cfdae3a445d8e46b386ab0def
5,014
py
Python
mlc_tools/module_php/writer.py
mlc-tools/mlc-tools
1ee8e82e438cda2cc1efd334d69773d1a29a0e0c
[ "MIT" ]
1
2018-05-07T09:32:57.000Z
2018-05-07T09:32:57.000Z
mlc_tools/module_php/writer.py
mlc-tools/mlc-tools
1ee8e82e438cda2cc1efd334d69773d1a29a0e0c
[ "MIT" ]
4
2019-09-27T09:33:34.000Z
2020-04-13T13:48:02.000Z
mlc_tools/module_php/writer.py
mlc-tools/mlc-tools
1ee8e82e438cda2cc1efd334d69773d1a29a0e0c
[ "MIT" ]
1
2018-02-23T01:04:44.000Z
2018-02-23T01:04:44.000Z
from ..base import WriterBase from ..core.object import AccessSpecifier from .serializer import Serializer class Writer(WriterBase): def __init__(self, out_directory): WriterBase.__init__(self, out_directory) def write_class(self, cls): self.set_initial_values(cls) declaration_list ...
34.342466
104
0.534503
4,560
0.909454
0
0
0
0
0
0
759
0.151376
00a723f498f71a64d605273ee1d3b575ef1bfb52
823
py
Python
logistic_regression.py
Nikilnick97/Natural-Language-Processing
5d2118b8ee9517b8313ed6204061ddefa07d31c0
[ "MIT" ]
null
null
null
logistic_regression.py
Nikilnick97/Natural-Language-Processing
5d2118b8ee9517b8313ed6204061ddefa07d31c0
[ "MIT" ]
null
null
null
logistic_regression.py
Nikilnick97/Natural-Language-Processing
5d2118b8ee9517b8313ed6204061ddefa07d31c0
[ "MIT" ]
null
null
null
from sklearn.linear_model import LogisticRegression from sklearn.metrics import accuracy_score from local_time import LocalTime class Logistic_Regression: @staticmethod def get_best_hyperparameter(X_train, y_train, y_val, X_val): # This gets the best hyperparameter for Regularisation best_accur...
39.190476
86
0.63548
694
0.843256
0
0
663
0.805589
0
0
126
0.153098
00a753995530ed233571990c7c8b39d19248bee2
140
py
Python
src/inheritance_polimorfism/persona.py
Edilberto-Vazquez/OOP-Python
f49f2c1acfd9fdb3a81ab32c390daa637cabf648
[ "MIT" ]
null
null
null
src/inheritance_polimorfism/persona.py
Edilberto-Vazquez/OOP-Python
f49f2c1acfd9fdb3a81ab32c390daa637cabf648
[ "MIT" ]
null
null
null
src/inheritance_polimorfism/persona.py
Edilberto-Vazquez/OOP-Python
f49f2c1acfd9fdb3a81ab32c390daa637cabf648
[ "MIT" ]
null
null
null
class Persona: def __init__(self, nombre) -> None: self.nombre = nombre def avanza(self): print('Ando caminando')
17.5
39
0.6
139
0.992857
0
0
0
0
0
0
16
0.114286
00a7637a92f956e02ad596c11a1c04c9cf79ecf8
1,269
py
Python
class_exercises/loop_split.py
klp/cuny_gc_python_class_sp2022
5614d5a1c790bac211f1221b7c727b59e9e05ca1
[ "BSD-2-Clause" ]
null
null
null
class_exercises/loop_split.py
klp/cuny_gc_python_class_sp2022
5614d5a1c790bac211f1221b7c727b59e9e05ca1
[ "BSD-2-Clause" ]
null
null
null
class_exercises/loop_split.py
klp/cuny_gc_python_class_sp2022
5614d5a1c790bac211f1221b7c727b59e9e05ca1
[ "BSD-2-Clause" ]
null
null
null
from os import nice random_string = """Vermont is famous for its verdant summer landscapes and postcard-worthy fall colors. But it’s the Green Mountain State’s winter landscape that truly sparks my photographic eye. New snow transforms the dull shades of stick season into a fresh palette of photographic possibilit...
31.725
80
0.751773
0
0
0
0
0
0
0
0
1,053
0.82718
00a7adc5bde4b52916307d4762109f6e53b951fb
682
py
Python
tflib/deep_learning/metrics.py
AlexBlack2202/EigenGAN-Tensorflow
9668738852abdcd7161b64b7e6a074c7ebfea055
[ "MIT" ]
581
2018-05-06T05:15:05.000Z
2022-03-29T08:13:54.000Z
tflib/metrics/metrics.py
yaojia1/darknet_my
92906e6b32cdcabaa841461c6d2efe06a54057d1
[ "MIT" ]
52
2018-05-11T09:33:30.000Z
2022-03-24T04:27:07.000Z
tflib/metrics/metrics.py
yaojia1/darknet_my
92906e6b32cdcabaa841461c6d2efe06a54057d1
[ "MIT" ]
137
2018-05-08T14:30:03.000Z
2022-02-24T01:50:37.000Z
import tensorflow as tf def resettable_metric(metric_fn, metric_params, scope=None): with tf.variable_scope(scope, 'resettable_metric') as sc: metric_returns = metric_fn(**metric_params) reset_op = tf.variables_initializer(tf.local_variables(sc.name)) return metric_returns + (reset_op,) def ...
37.888889
76
0.719941
0
0
0
0
0
0
0
0
38
0.055718
00a855c635dc5c650f9f0a5260b347e1a3e75402
1,224
py
Python
medium/simplefyPath.py
jayzane/leetcodePy
27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5
[ "Apache-2.0" ]
null
null
null
medium/simplefyPath.py
jayzane/leetcodePy
27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5
[ "Apache-2.0" ]
null
null
null
medium/simplefyPath.py
jayzane/leetcodePy
27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5
[ "Apache-2.0" ]
null
null
null
class Solution: def simplifyPath(self, path: str) -> str: markMap = {'/': '/', '.': '.'} stack = [] for s in path: if s in markMap: topEle = stack.pop() if stack else None if topEle != markMap[s]: if topEle: ...
27.2
55
0.392974
1,116
0.911765
0
0
0
0
0
0
131
0.107026
00aa5172246ad3368cb7cb431fad007e1000af85
844
py
Python
pt2/modules/residual_encoder.py
ishine/Parallel-Tacotron-2
138c29e6211d417464cb3386eb6740b1afe7f3b8
[ "MIT" ]
null
null
null
pt2/modules/residual_encoder.py
ishine/Parallel-Tacotron-2
138c29e6211d417464cb3386eb6740b1afe7f3b8
[ "MIT" ]
null
null
null
pt2/modules/residual_encoder.py
ishine/Parallel-Tacotron-2
138c29e6211d417464cb3386eb6740b1afe7f3b8
[ "MIT" ]
null
null
null
import torch from .lconv import LConvBlock class ResidualEncoder(torch.nn.Module): def __init__(self, dim): super().__init__() self.stack1 = torch.nn.Sequential( LConvBlock(dim, 17, 0.1), LConvBlock(dim, 17, 0.1), LConvBlock(dim, 17, 0.1), torch.nn....
29.103448
62
0.547393
797
0.944313
0
0
0
0
0
0
0
0
00acc1b4537dd37e9aabfa6f56d35705dc7f3a8e
3,017
py
Python
core/app/alarm/tests/test_save_motion.py
mxmaxime/mx-tech-house
f6b66b8390b348e48d4c6ea0da51e409f3845fd6
[ "MIT" ]
2
2021-04-29T19:28:59.000Z
2021-04-29T21:20:32.000Z
core/app/alarm/tests/test_save_motion.py
mxmaxime/mx-tech-house
f6b66b8390b348e48d4c6ea0da51e409f3845fd6
[ "MIT" ]
101
2020-06-26T19:51:24.000Z
2021-03-28T09:35:55.000Z
core/app/alarm/tests/test_save_motion.py
mxmaxime/mx-tech-house
f6b66b8390b348e48d4c6ea0da51e409f3845fd6
[ "MIT" ]
null
null
null
import dataclasses from alarm.use_cases.data import Detection import uuid from decimal import Decimal from django.forms import model_to_dict from django.test import TestCase from django.utils import timezone from freezegun import freeze_time from alarm.business.in_motion import save_motion from alarm.factories import...
39.181818
102
0.694398
2,429
0.805104
0
0
0
0
0
0
84
0.027842
00ad6aa94b11109ec3cb9247063643c7576d5364
2,015
py
Python
compare.py
fralomba/Forensics-Analysis-Of-Audio-Files
35d87aeb8a9511a361f75a35d1588cc3da4d353b
[ "MIT" ]
2
2019-07-02T12:04:25.000Z
2021-02-24T21:49:19.000Z
compare.py
fralomba/Forensics-Analysis-Of-Audio-Files
35d87aeb8a9511a361f75a35d1588cc3da4d353b
[ "MIT" ]
null
null
null
compare.py
fralomba/Forensics-Analysis-Of-Audio-Files
35d87aeb8a9511a361f75a35d1588cc3da4d353b
[ "MIT" ]
null
null
null
#http://pymysql.readthedocs.io/en/latest/user/examples.html import sys import utils def perpareToJSON(dic1, dic2, blackList, ignoredList): string = '[\n' for key in dic1: if key not in ignoredList: if key in dic2: string += "{ 'label':'" + str(key).replace("'",'"') + "', 'alert':'" + str((key in blackLis...
34.152542
241
0.633747
0
0
0
0
0
0
0
0
501
0.248635
00ad9bd4f7342edae60739235bd9aaa111ee0531
16,881
py
Python
whisper/app.py
jphacks/SD_1809
e7f354cf9c66f46d3e60a9a55f810d007f8b885e
[ "MIT" ]
null
null
null
whisper/app.py
jphacks/SD_1809
e7f354cf9c66f46d3e60a9a55f810d007f8b885e
[ "MIT" ]
null
null
null
whisper/app.py
jphacks/SD_1809
e7f354cf9c66f46d3e60a9a55f810d007f8b885e
[ "MIT" ]
2
2018-10-21T02:31:58.000Z
2020-11-06T12:45:37.000Z
from __future__ import unicode_literals import errno import os import sys import tempfile import concurrent.futures as futures import json import re from argparse import ArgumentParser from flask import Flask, request, abort from linebot import ( LineBotApi, WebhookHandler ) from linebot.exceptions import ( ...
32.842412
107
0.647237
0
0
0
0
7,191
0.383336
0
0
6,833
0.364252
00ae834c9dc4befc6140c5f9a714686060eba6c7
815
py
Python
list_and_dict.py
MauVal96/python-intermediate
ff9a4263b10b48feb07abc3e6ae471f77fa2e089
[ "MIT" ]
null
null
null
list_and_dict.py
MauVal96/python-intermediate
ff9a4263b10b48feb07abc3e6ae471f77fa2e089
[ "MIT" ]
null
null
null
list_and_dict.py
MauVal96/python-intermediate
ff9a4263b10b48feb07abc3e6ae471f77fa2e089
[ "MIT" ]
null
null
null
# Nested Lists and Dictionaries def run(): my_list = [1, "Hello", True, 4.5] my_dict = { "firstname": "Mauricio", "lastname": "Valadez" } super_list = [ {"firstname": "Mauricio", "lastname": "Valadez"}, {"firstname": "Carlos", "lastname": "García"}, {"firstname":...
27.166667
60
0.521472
0
0
0
0
0
0
0
0
351
0.429095
00af5e0ffc302574cdfb6f82132240cba4c78b5d
460
py
Python
batman.py
Elry/py-basics
7e1003ee5a0124291b5d3afe6ec074d93883fb19
[ "MIT" ]
null
null
null
batman.py
Elry/py-basics
7e1003ee5a0124291b5d3afe6ec074d93883fb19
[ "MIT" ]
null
null
null
batman.py
Elry/py-basics
7e1003ee5a0124291b5d3afe6ec074d93883fb19
[ "MIT" ]
null
null
null
from bat import Bat from ubermesch import Ubermesch class Batman(Bat, Ubermesch): def __init__(self, *args, **kwargs): Ubermesch.__init__(self, 'anonymous', movie=True, superpowers=['Wealthy'], *args, **kwargs) Bat.__init__(self, *args, can_fly=False, **kwargs) self.name = "neo" def sing(self): ...
25.555556
95
0.686957
292
0.634783
0
0
0
0
0
0
53
0.115217
00afcb16830c0c578437b292e2d8f2163e751822
9,400
py
Python
application.py
Lambda-School-Labs/Job-Funnl-ds-2
3603964839a8946363f9238b091aba9abace7d0d
[ "MIT" ]
null
null
null
application.py
Lambda-School-Labs/Job-Funnl-ds-2
3603964839a8946363f9238b091aba9abace7d0d
[ "MIT" ]
2
2020-05-02T00:16:16.000Z
2021-08-23T20:41:52.000Z
application.py
Lambda-School-Labs/Job-Funnl-ds-2
3603964839a8946363f9238b091aba9abace7d0d
[ "MIT" ]
5
2020-03-05T17:19:15.000Z
2020-03-26T13:44:15.000Z
import os import subprocess import sys import logging import time from os.path import join, dirname from flask import Flask, jsonify, request, send_file from flask.logging import default_handler from datafunctions.log.log import startLog, getLogFile, tailLogFile SCRAPER_NAME = './run_scrapers.py' SCRAPER_NAME_PS = ...
26.934097
113
0.67266
0
0
0
0
7,583
0.806702
0
0
4,530
0.481915
00b06694be371e9a46f14a04d71474d24287deb3
1,757
py
Python
badbaby/static/expyfun/ids_expyfun.py
ktavabi/bad-baby
241fbafd3ca9e23f25aae4eb3bbc90e666c76e8f
[ "MIT" ]
1
2020-12-08T05:29:02.000Z
2020-12-08T05:29:02.000Z
badbaby/static/expyfun/ids_expyfun.py
ktavabi/bad-baby
241fbafd3ca9e23f25aae4eb3bbc90e666c76e8f
[ "MIT" ]
15
2020-03-13T20:46:50.000Z
2021-09-01T21:31:43.000Z
badbaby/static/expyfun/ids_expyfun.py
ktavabi/bad-baby
241fbafd3ca9e23f25aae4eb3bbc90e666c76e8f
[ "MIT" ]
3
2020-09-21T18:30:42.000Z
2020-12-14T19:15:27.000Z
# -*- coding: utf-8 -*- # Authors: Kambiz Tavabi <ktavabi@gmail.com> # # simplified bsd-3 license """Script for infant basic auditory testing using infant directed speech (IDS)""" import numpy as np from os import path as op from expyfun import ExperimentController from expyfun.stimuli import read_wav from ...
38.195652
85
0.6642
0
0
0
0
0
0
0
0
628
0.357427
00b16f07c262f23c71a57d135003bb5d4c284846
2,851
py
Python
CodeForces/EducationalRound73/B.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
1
2018-11-25T04:15:45.000Z
2018-11-25T04:15:45.000Z
CodeForces/EducationalRound73/B.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
null
null
null
CodeForces/EducationalRound73/B.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
2
2018-08-08T13:01:14.000Z
2018-11-25T12:38:36.000Z
N = int(input()) grid = [["*"] * N for _ in range(N)] grid[0][0] = "W" for i in range(N): for j in range(N): if grid[i][j] == "*": if j == 0: if grid[i - 1][j] == "W": grid[i][j] = "B" else: grid[i][j] = "W" e...
38.527027
49
0.244476
0
0
0
0
0
0
0
0
128
0.044897
00b22e77ecc8a89b1345ee8da020bb63be57db18
2,419
py
Python
tests/cp2/test_cp2_ccall_fast.py
capt-hb/cheritest
d3b3637a81a0005ee7272eca0f33a9f9911fdb32
[ "Apache-2.0" ]
null
null
null
tests/cp2/test_cp2_ccall_fast.py
capt-hb/cheritest
d3b3637a81a0005ee7272eca0f33a9f9911fdb32
[ "Apache-2.0" ]
2
2020-06-02T13:44:55.000Z
2020-06-02T14:06:29.000Z
tests/cp2/test_cp2_ccall_fast.py
capt-hb/cheritest
d3b3637a81a0005ee7272eca0f33a9f9911fdb32
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2016 Alexandre Joannou # Copyright (c) 2013 Michael Roe # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @BERI_LIC...
40.316667
77
0.725506
1,151
0.475816
0
0
1,173
0.484911
0
0
1,713
0.708144
00b2d316baa5beed5667ff4eb88780b74052fb8e
602
py
Python
py_abac/policy/conditions/attribute/equals.py
sarthakgupta072/py-abac
7afcec37adc361a8c177c98044481aa5d2696303
[ "Apache-2.0" ]
47
2019-10-17T03:23:01.000Z
2022-02-26T03:27:03.000Z
py_abac/policy/conditions/attribute/equals.py
sarthakgupta072/py-abac
7afcec37adc361a8c177c98044481aa5d2696303
[ "Apache-2.0" ]
17
2020-02-24T02:17:34.000Z
2022-02-15T20:11:19.000Z
py_abac/policy/conditions/attribute/equals.py
ketgo/pyabac
8a44107a00f712bbb9c6cd3ecad155ef696cf035
[ "Apache-2.0" ]
10
2019-12-24T04:13:21.000Z
2021-08-01T08:21:41.000Z
""" Equals attribute condition """ from marshmallow import post_load from .base import AttributeCondition, AttributeConditionSchema class EqualsAttribute(AttributeCondition): """ Condition for attribute value equals that of another """ def _is_satisfied(self, what) -> bool: return w...
22.296296
84
0.697674
458
0.760797
0
0
134
0.222591
0
0
219
0.363787
00b5e451e5aaad2a4c60d85866a433f916c39652
5,760
py
Python
run_test.py
drstmane/whatismyschema
bb93df49d513cb5ebafb275b83ec3dc1f6eea5bb
[ "BSD-3-Clause" ]
8
2018-10-30T15:30:29.000Z
2021-05-17T06:17:56.000Z
run_test.py
drstmane/whatismyschema
bb93df49d513cb5ebafb275b83ec3dc1f6eea5bb
[ "BSD-3-Clause" ]
10
2019-07-13T12:17:07.000Z
2019-08-27T18:23:53.000Z
run_test.py
drstmane/whatismyschema
bb93df49d513cb5ebafb275b83ec3dc1f6eea5bb
[ "BSD-3-Clause" ]
2
2019-08-11T20:55:49.000Z
2019-09-25T13:24:33.000Z
#!/bin/env python # coding: utf8 # # WhatIsMySchema # # Copyright (c) 2018 Tim Gubner # # import unittest from whatismyschema import * class WhatIsMySchemaTestCase(unittest.TestCase): def fix_type(self, t): return t.lower().replace(" ", "").replace("\n", "") def check_type(self, col, expect): types = col.deter...
24
98
0.661285
5,570
0.967014
0
0
0
0
0
0
1,152
0.2
00b7bd96ba6d79608c698351436afa9e3e25d037
266
py
Python
scrapper/urls.py
walaazidane/final-project-
eb52353b95078b19696df0f8cca1ea5fd88f0983
[ "MIT" ]
31
2017-07-25T13:22:57.000Z
2021-01-18T10:05:54.000Z
scrapper/urls.py
shashank-sharma/mythical-learning
f1105fceee8196cda275d9c72398c4e3a99b3f3c
[ "MIT" ]
34
2017-05-14T06:40:24.000Z
2019-07-15T14:37:16.000Z
scrapper/urls.py
walaazidane/final-project-
eb52353b95078b19696df0f8cca1ea5fd88f0983
[ "MIT" ]
4
2017-07-29T08:18:48.000Z
2019-09-17T15:37:08.000Z
from django.conf.urls import url from . import views urlpatterns = [ url(r'^problem/', views.problem, name = 'problem'), url(r'^blog/', views.blog, name = 'blog'), url(r'cpp/', views.cpp, name = 'cpp'), url(r'^$', views.temple, name = 'temple'), ]
24.181818
55
0.597744
0
0
0
0
0
0
0
0
61
0.229323
00b81a87969d737a3477ea34c5a1bf0ec74eb40b
614
py
Python
tests/test_audio/conftest.py
gregorybchris/semigenre
62dd1bf22359c66009c5564417033ce5efc15870
[ "Apache-2.0" ]
null
null
null
tests/test_audio/conftest.py
gregorybchris/semigenre
62dd1bf22359c66009c5564417033ce5efc15870
[ "Apache-2.0" ]
null
null
null
tests/test_audio/conftest.py
gregorybchris/semigenre
62dd1bf22359c66009c5564417033ce5efc15870
[ "Apache-2.0" ]
null
null
null
"""Test configuration for semigenre.audio tests.""" import os import pytest from unittest.mock import MagicMock from semigenre.audio.library import Library @pytest.fixture(scope='session') def small_library(): """Test fixture for a Library object.""" # TODO: Make this path work from any directory filena...
25.583333
77
0.714984
0
0
0
0
450
0.732899
0
0
246
0.400651
00b81ef6f7ced40946716530efb6216a3a20e7ee
1,782
py
Python
pickles/migrations/0001_initial.py
horatius83/thepicklebook
caf02e1c560bfd1ef7077d85d055d9dfdd6e9073
[ "MIT" ]
null
null
null
pickles/migrations/0001_initial.py
horatius83/thepicklebook
caf02e1c560bfd1ef7077d85d055d9dfdd6e9073
[ "MIT" ]
null
null
null
pickles/migrations/0001_initial.py
horatius83/thepicklebook
caf02e1c560bfd1ef7077d85d055d9dfdd6e9073
[ "MIT" ]
null
null
null
# Generated by Django 4.0.3 on 2022-03-20 02:34 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Pickle', fields=[ ...
37.125
117
0.570707
1,656
0.929293
0
0
0
0
0
0
230
0.129068
00b863ca4baba5322bd85d3764d5e6d8375946cf
1,018
py
Python
publica_admin/admin/views_admin.py
publica-io/django-publica-admin
27b36172048773cb697548494c843a376527d324
[ "BSD-3-Clause" ]
null
null
null
publica_admin/admin/views_admin.py
publica-io/django-publica-admin
27b36172048773cb697548494c843a376527d324
[ "BSD-3-Clause" ]
null
null
null
publica_admin/admin/views_admin.py
publica-io/django-publica-admin
27b36172048773cb697548494c843a376527d324
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin try: from views.models import * except ImportError: pass else: from images_admin import ImageInline from ..mixins import * class ViewLinkageInline(admin.StackedInline): fields = ( 'order', 'content_type', 'object_id', ...
19.960784
83
0.509823
786
0.772102
0
0
0
0
0
0
139
0.136542
00b9b121653ccb416fff5c294fbe6e27a119a9be
377
py
Python
setup.py
truenas/py-fenced
31f63df842134349952be9b17e40723a3b76b98c
[ "BSD-3-Clause" ]
1
2021-04-02T20:01:15.000Z
2021-04-02T20:01:15.000Z
setup.py
truenas/py-fenced
31f63df842134349952be9b17e40723a3b76b98c
[ "BSD-3-Clause" ]
1
2022-02-21T12:20:15.000Z
2022-02-21T12:55:11.000Z
setup.py
truenas/py-fenced
31f63df842134349952be9b17e40723a3b76b98c
[ "BSD-3-Clause" ]
null
null
null
from setuptools import find_packages, setup setup( name='fenced', version='0.0.1', description='TrueNAS SCALE Fencing Daemon', packages=find_packages(), classifiers=[ 'Programming Language :: Python :: 3', ], install_requires=[], entry_points={ 'console_scripts': [ ...
19.842105
47
0.583554
0
0
0
0
0
0
0
0
126
0.334218
00b9bdc2fc25f447d02c74734b9528389a1c8e25
5,068
py
Python
functional/tests/identity/v3/test_user.py
ankur-gupta91/osc-ip-cap
9a64bbc31fcc0872f52ad2d92c550945eea5cc97
[ "Apache-2.0" ]
null
null
null
functional/tests/identity/v3/test_user.py
ankur-gupta91/osc-ip-cap
9a64bbc31fcc0872f52ad2d92c550945eea5cc97
[ "Apache-2.0" ]
null
null
null
functional/tests/identity/v3/test_user.py
ankur-gupta91/osc-ip-cap
9a64bbc31fcc0872f52ad2d92c550945eea5cc97
[ "Apache-2.0" ]
null
null
null
# 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 # d...
49.686275
78
0.500592
4,388
0.865825
0
0
0
0
0
0
1,372
0.270718
00ba9c94000c21d53effafeefc5ec42d4ed5165f
1,825
py
Python
src/main.py
gltchitm/encpad
faab373f0f224c8a8dbd6d09a5fad5c14d02d03a
[ "MIT" ]
null
null
null
src/main.py
gltchitm/encpad
faab373f0f224c8a8dbd6d09a5fad5c14d02d03a
[ "MIT" ]
null
null
null
src/main.py
gltchitm/encpad
faab373f0f224c8a8dbd6d09a5fad5c14d02d03a
[ "MIT" ]
null
null
null
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk from store import store from create_new_notepad import CreateNewNotepad from notepad_editor import NotepadEditor from unlock_notepad import UnlockNotepad from welcome import Welcome store['FORMAT_VERSION'] = '2' store['APPLICATION_VERSION'] = ...
28.968254
94
0.650959
1,362
0.746301
0
0
0
0
0
0
288
0.157808
00bab63c362727001a4c6ce7f81b111d198c544f
904
py
Python
src/request_executors.py
adelbertkuhl/simple-data-pipeline
e99d9015e862745f34b7e32c24399a780463ec4a
[ "MIT" ]
null
null
null
src/request_executors.py
adelbertkuhl/simple-data-pipeline
e99d9015e862745f34b7e32c24399a780463ec4a
[ "MIT" ]
null
null
null
src/request_executors.py
adelbertkuhl/simple-data-pipeline
e99d9015e862745f34b7e32c24399a780463ec4a
[ "MIT" ]
null
null
null
from apis import IEXAPI class RequestExecutor: message = """{ticker},{epoch_timestamp},{price}""" tickers = ['BTCUSDT'] def _reformat_response(self, deserialized_response): tickers = next(item for item in deserialized_response) quotes = list(deserialized_response.values()) prices...
33.481481
81
0.667035
877
0.970133
0
0
0
0
0
0
90
0.099558
00babb53ff1072afcca974e8051db281df6bfdf9
492
py
Python
jit_compiling/test.py
ChambinLee/norm_cuda
627573a16dc50c517254057225c31cb7193017fc
[ "MIT" ]
3
2021-11-13T07:35:45.000Z
2022-03-13T13:00:09.000Z
jit_compiling/test.py
ChambinLee/norm_cuda
627573a16dc50c517254057225c31cb7193017fc
[ "MIT" ]
null
null
null
jit_compiling/test.py
ChambinLee/norm_cuda
627573a16dc50c517254057225c31cb7193017fc
[ "MIT" ]
1
2022-02-28T12:26:05.000Z
2022-02-28T12:26:05.000Z
import torch from torch.utils.cpp_extension import load norm = load(name="two_norm", sources=["two_norm/two_norm_bind.cpp", "two_norm/two_norm_kernel.cu"], verbose=True) n,m = 8,3 a = torch.randn(n,m) b = torch.randn(n,m) c = torch.zeros(1) print("a:\n",a) print("\nb:\n",b) a =...
18.222222
89
0.621951
0
0
0
0
0
0
0
0
129
0.262195
00bae0f0aa8493c91230dc6537df0e5893832ac3
52
py
Python
pyno/nodes/identity.py
cgarjun/Pyno
fa2a5d57fb926564f5acc0e6c7310de255bab531
[ "MIT" ]
163
2015-12-29T02:28:04.000Z
2022-02-02T02:18:28.000Z
pyno/nodes/identity.py
cgarjun/Pyno
fa2a5d57fb926564f5acc0e6c7310de255bab531
[ "MIT" ]
42
2017-12-19T15:31:54.000Z
2019-09-21T20:14:06.000Z
pyno/nodes/identity.py
cgarjun/Pyno
fa2a5d57fb926564f5acc0e6c7310de255bab531
[ "MIT" ]
34
2017-09-23T09:08:56.000Z
2021-09-16T23:49:24.000Z
def identity(x=None): return x call = identity
10.4
21
0.673077
0
0
0
0
0
0
0
0
0
0
00bbfd85cea4d78f9b99f65415abd3a203fb0784
49
py
Python
img_url_replace/__init__.py
ggqshr/replace_img_md
bdb5ace24eb243454785aac924b9dd51827065a3
[ "BSD-3-Clause" ]
1
2020-12-30T09:31:08.000Z
2020-12-30T09:31:08.000Z
img_url_replace/__init__.py
ggqshr/replace_img_md
bdb5ace24eb243454785aac924b9dd51827065a3
[ "BSD-3-Clause" ]
null
null
null
img_url_replace/__init__.py
ggqshr/replace_img_md
bdb5ace24eb243454785aac924b9dd51827065a3
[ "BSD-3-Clause" ]
null
null
null
from .img_upload import * from .parse_md import *
24.5
25
0.77551
0
0
0
0
0
0
0
0
0
0
00bc63dc8e3839f301fef7682c2c63e16590ce48
510
py
Python
Monte-Carlo-Pythonista.py
Steftet/Monte-Carlo
b24aa10728b0b5e5556ce337fe1461a052f74d4e
[ "MIT" ]
null
null
null
Monte-Carlo-Pythonista.py
Steftet/Monte-Carlo
b24aa10728b0b5e5556ce337fe1461a052f74d4e
[ "MIT" ]
null
null
null
Monte-Carlo-Pythonista.py
Steftet/Monte-Carlo
b24aa10728b0b5e5556ce337fe1461a052f74d4e
[ "MIT" ]
null
null
null
import math import random import canvas f = 200 h = 0 canvas.set_size(f, f) canvas.set_fill_color(1, 1, 1) canvas.fill_rect(0,0,f,f) k = int(input('Number of dots: ')) for i in range(0,k): x = (random.randint(0,f)/f) y = (random.randint(0,f)/f) if math.sqrt(math.pow(x,2)+math.pow(y,2))<=1: h+=1 ...
18.214286
49
0.603922
0
0
0
0
0
0
0
0
18
0.035294
00bd3c651188f07e87054fbd345e246fcb4dcb27
3,931
py
Python
tint/protocols/msgpackp.py
bmuller/tint
e74a3e4c46f71dfcb2574920467ad791d29de6fe
[ "MIT" ]
1
2015-02-18T18:33:44.000Z
2015-02-18T18:33:44.000Z
tint/protocols/msgpackp.py
8468/tint
e74a3e4c46f71dfcb2574920467ad791d29de6fe
[ "MIT" ]
null
null
null
tint/protocols/msgpackp.py
8468/tint
e74a3e4c46f71dfcb2574920467ad791d29de6fe
[ "MIT" ]
null
null
null
from collections import deque from twisted.protocols.policies import TimeoutMixin from twisted.internet.protocol import Protocol from twisted.internet.defer import Deferred, TimeoutError, maybeDeferred import umsgpack from tint.log import Logger class NoSuchCommand(Exception): """ Exception raised when a n...
30.710938
77
0.618418
3,673
0.934368
0
0
123
0.03129
0
0
255
0.064869
00be5d7cca91ea09fe8f701d0fc9b5adbb1c6967
1,435
py
Python
discoin/utils.py
Discoin/discoin.py
4a3459dfaab6695fe88d05290465a1b7842b3606
[ "MIT" ]
2
2020-07-26T11:29:47.000Z
2021-09-08T22:38:35.000Z
discoin/utils.py
Discoin/discoin.py
4a3459dfaab6695fe88d05290465a1b7842b3606
[ "MIT" ]
8
2020-02-11T14:23:38.000Z
2021-04-16T21:38:15.000Z
discoin/utils.py
Discoin/discoin.py
4a3459dfaab6695fe88d05290465a1b7842b3606
[ "MIT" ]
null
null
null
from .config import DOMAIN from .errors import InternalServerError, BadRequest, InvalidMethod, WebTimeoutError from aiohttp import ClientSession from asyncio import TimeoutError async def api_request(session: ClientSession, method: str, url_path: str, headers: dict=None, json: dict=None): ''' *`session` = the ...
42.205882
111
0.672474
0
0
0
0
0
0
1,256
0.875261
491
0.34216
00be6dee6ec68c04a3e8052f7079928fd3eb4b84
325
py
Python
301-400/361-370/365-waterAndJugProblem/waterAndJugProblem.py
xuychen/Leetcode
c8bf33af30569177c5276ffcd72a8d93ba4c402a
[ "MIT" ]
null
null
null
301-400/361-370/365-waterAndJugProblem/waterAndJugProblem.py
xuychen/Leetcode
c8bf33af30569177c5276ffcd72a8d93ba4c402a
[ "MIT" ]
null
null
null
301-400/361-370/365-waterAndJugProblem/waterAndJugProblem.py
xuychen/Leetcode
c8bf33af30569177c5276ffcd72a8d93ba4c402a
[ "MIT" ]
null
null
null
class Solution(object): def gcd(self, x, y): while y: x, y = y, x % y return x def canMeasureWater(self, x, y, z): """ :type x: int :type y: int :type z: int :rtype: bool """ return not z or (x + y >= z and not z % self.gcd(x...
20.3125
63
0.424615
325
1
0
0
0
0
0
0
99
0.304615
00be7b3c81233764127a44082d1d7982d1b01666
896
py
Python
sprinkl_async/const.py
ptorsten/sprinkl-async
1f62b1799f19bc604e13f65cbde1f705caefcd78
[ "Apache-2.0" ]
5
2020-03-15T21:24:56.000Z
2020-07-17T02:14:29.000Z
sprinkl_async/const.py
ptorsten/sprinkl-async
1f62b1799f19bc604e13f65cbde1f705caefcd78
[ "Apache-2.0" ]
null
null
null
sprinkl_async/const.py
ptorsten/sprinkl-async
1f62b1799f19bc604e13f65cbde1f705caefcd78
[ "Apache-2.0" ]
2
2019-08-12T00:40:29.000Z
2020-06-21T22:35:17.000Z
"""Declare package constants.""" # # Copyright 2019 Google LLC # # 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 appli...
33.185185
74
0.767857
0
0
0
0
0
0
0
0
654
0.729911
00be7f4d50bc2df415f28d4e095c788f4191d555
10,338
py
Python
mmdet/core/anchor/orient_anchor_target.py
qinr/MRDet
44b608ec6007db204dcb6b82eff9e356fc7b56d0
[ "Apache-2.0" ]
8
2021-05-25T10:49:00.000Z
2021-11-28T04:01:02.000Z
mmdet/core/anchor/orient_anchor_target.py
qinr/MRDet
44b608ec6007db204dcb6b82eff9e356fc7b56d0
[ "Apache-2.0" ]
null
null
null
mmdet/core/anchor/orient_anchor_target.py
qinr/MRDet
44b608ec6007db204dcb6b82eff9e356fc7b56d0
[ "Apache-2.0" ]
2
2021-07-22T12:53:37.000Z
2021-12-17T12:53:51.000Z
import torch from ..bbox import (PseudoSampler, assign_and_sample, bbox2delta, build_assigner, delta2hbboxrec5, hbbox2rbboxRec_v2, rbboxPoly2Rectangle, rec2target) from ..utils import multi_apply def orient_anchor_target(bbox_pred_list, anchor...
42.896266
87
0.600019
0
0
0
0
0
0
0
0
1,882
0.176217
00be8ae8187812f5646537143480e2c61ecd6d1a
728
py
Python
Algorithms/distinct_prime_factors.py
StokicDusan/Python-misc
c12f1603ef4dc7bf9ff55994cdbd6cf1dafcfee1
[ "MIT" ]
null
null
null
Algorithms/distinct_prime_factors.py
StokicDusan/Python-misc
c12f1603ef4dc7bf9ff55994cdbd6cf1dafcfee1
[ "MIT" ]
12
2021-04-15T21:22:26.000Z
2022-02-18T15:09:56.000Z
Algorithms/distinct_prime_factors.py
StokicDusan/Python-misc
c12f1603ef4dc7bf9ff55994cdbd6cf1dafcfee1
[ "MIT" ]
null
null
null
def distinct_prime_factors(x: int) -> list: factors = [] """ Returns a list of distinct prime factors of the number x """ loop = 2 while loop <= x: if x % loop == 0: while x//loop == x/loop: x //= loop factors.append(loop) else: ...
19.675676
43
0.532967
0
0
0
0
0
0
0
0
326
0.447802
00c004e3df93f878ec9ce6f08213502410bf4836
12,588
py
Python
eufySecurityApi/api.py
Rihan9/uefiSecurityApi
27ef9446b1cab55244f2b90bafee33bcfcfe53b5
[ "MIT" ]
1
2021-02-17T22:32:48.000Z
2021-02-17T22:32:48.000Z
eufySecurityApi/api.py
Rihan9/uefiSecurityApi
27ef9446b1cab55244f2b90bafee33bcfcfe53b5
[ "MIT" ]
null
null
null
eufySecurityApi/api.py
Rihan9/uefiSecurityApi
27ef9446b1cab55244f2b90bafee33bcfcfe53b5
[ "MIT" ]
null
null
null
from eufySecurityApi.const import ( TWO_FACTOR_AUTH_METHODS, API_BASE_URL, API_HEADERS, RESPONSE_ERROR_CODE, ENDPOINT_LOGIN,ENDPOINT_DEVICE_LIST, DEVICE_TYPE, ENDPOINT_STATION_LIST, ENDPOINT_REQUEST_VERIFY_CODE, ENDPOINT_TRUST_DEVICE_LIST, ENDPOINT_TRUST_DEVICE_ADD ) import logging, json, copy, functools,...
48.045802
158
0.622418
12,090
0.960439
0
0
460
0.036543
10,579
0.840404
2,361
0.18756
00c203f198873d9000f664434964603c2fa22d2f
4,595
py
Python
test/test_accuracy.py
darebrawley/doppelganger-asa
6d01e56b8ee8218f047724fdb4a5b1a2bf104c5f
[ "Apache-2.0" ]
25
2019-05-30T21:13:58.000Z
2022-01-25T09:52:55.000Z
test/test_accuracy.py
darebrawley/doppelganger-asa
6d01e56b8ee8218f047724fdb4a5b1a2bf104c5f
[ "Apache-2.0" ]
2
2020-01-30T20:32:15.000Z
2020-02-21T20:20:57.000Z
test/test_accuracy.py
darebrawley/doppelganger-asa
6d01e56b8ee8218f047724fdb4a5b1a2bf104c5f
[ "Apache-2.0" ]
11
2019-05-15T17:10:01.000Z
2021-02-10T18:07:54.000Z
# Copyright 2017 Sidewalk Labs | https://www.apache.org/licenses/LICENSE-2.0 from __future__ import ( absolute_import, division, print_function, unicode_literals ) import mock from mock import Mock import unittest import pandas as pd import numpy as np from doppelganger import Accuracy from doppelganger.accuracy...
37.357724
100
0.515996
4,254
0.925789
0
0
2,825
0.614799
0
0
807
0.175626
00c22c75141de861b8fbd50f7ca02d4edecc1385
5,578
py
Python
Competitive Programming/Design Patterns/Behavioural/Visitor.py
shreejitverma/GeeksforGeeks
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
2
2022-02-18T05:14:28.000Z
2022-03-08T07:00:08.000Z
Competitive Programming/Design Patterns/Behavioural/Visitor.py
shivaniverma1/Competitive-Programming-1
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
6
2022-01-13T04:31:04.000Z
2022-03-12T01:06:16.000Z
Competitive Programming/Design Patterns/Behavioural/Visitor.py
shivaniverma1/Competitive-Programming-1
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
2
2022-02-14T19:53:53.000Z
2022-02-18T05:14:30.000Z
""" Visitor Method is a Behavioral Design Pattern which allows us to separate the algorithm from an object structure on which it operates. It helps us to add new features to an existing class hierarchy dynamically without changing it. All the behavioral patterns proved as the best methods to handle the communication be...
40.715328
437
0.778415
640
0.11396
0
0
0
0
0
0
4,748
0.845442
00c2bdd91433b93ef86d3b37bbd4f2a3a9658c1c
8,683
py
Python
orgpy/core.py
cwatson/orgpy
017b4ad98d125781803ce97a49d6900eae1a4846
[ "Apache-2.0" ]
null
null
null
orgpy/core.py
cwatson/orgpy
017b4ad98d125781803ce97a49d6900eae1a4846
[ "Apache-2.0" ]
null
null
null
orgpy/core.py
cwatson/orgpy
017b4ad98d125781803ce97a49d6900eae1a4846
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import re, os, copy from datetime import datetime from . import const from . import utils __all__ = ['Orgfile', 'orgFromFile'] #=============================================================================== # Main class definition for entire org file #==========================...
38.93722
109
0.528158
6,533
0.75239
0
0
0
0
0
0
3,292
0.379132
00c5eb269fea4254ff8e08f38dc39aedd8dfb3e9
1,868
py
Python
tools/embeds.py
OneFoggyScreen/Amicable-Bot
9900877cc6e0cf1d2a512366264b278a156f0c78
[ "MIT" ]
1
2021-02-12T02:42:15.000Z
2021-02-12T02:42:15.000Z
tools/embeds.py
OneFoggyScreen/Amicable-Bot
9900877cc6e0cf1d2a512366264b278a156f0c78
[ "MIT" ]
null
null
null
tools/embeds.py
OneFoggyScreen/Amicable-Bot
9900877cc6e0cf1d2a512366264b278a156f0c78
[ "MIT" ]
null
null
null
#Makes embeds easy to use and with none of the clutter. #--------- Libaries ---------# import discord, sys sys.path.append("../") from settings import * #--------- Code ---------# def baseEmbed(Title, ImageURL, EmbedColor=Default_Color, FooterText=Name, FooterIconURL=BotImage): """ A basic embed that has a nam...
53.371429
153
0.722698
0
0
0
0
0
0
0
0
498
0.266595
00c6e13170e64460aa3e7594fd35d9a9f26fb186
11,195
py
Python
tests/library/test_ceph_ec_profile.py
u-kosmonaft-u/ceph-ansible
14c472707c165f77def05826b22885480af3e8f9
[ "Apache-2.0" ]
1,570
2015-01-03T08:38:22.000Z
2022-03-31T09:24:37.000Z
tests/library/test_ceph_ec_profile.py
u-kosmonaft-u/ceph-ansible
14c472707c165f77def05826b22885480af3e8f9
[ "Apache-2.0" ]
4,964
2015-01-05T10:41:44.000Z
2022-03-31T07:59:49.000Z
tests/library/test_ceph_ec_profile.py
u-kosmonaft-u/ceph-ansible
14c472707c165f77def05826b22885480af3e8f9
[ "Apache-2.0" ]
1,231
2015-01-04T11:48:16.000Z
2022-03-31T12:15:28.000Z
from mock.mock import MagicMock, patch import ca_test_common import ceph_ec_profile import pytest class TestCephEcProfile(object): def setup_method(self): self.fake_params = [] self.fake_binary = 'ceph' self.fake_cluster = 'ceph' self.fake_name = 'foo' self.fake_k = 2 ...
48.04721
264
0.496472
11,094
0.990978
0
0
9,767
0.872443
0
0
3,136
0.280125
00c77972f828a4eaba5156777d6d5f0bfdf8f57c
8,038
py
Python
metaspace/engine/scripts/update_diagnostics.py
METASPACE2020/METASPACE
e1acd9a409f84a78eed7ca9713258c09b0e137ca
[ "Apache-2.0" ]
null
null
null
metaspace/engine/scripts/update_diagnostics.py
METASPACE2020/METASPACE
e1acd9a409f84a78eed7ca9713258c09b0e137ca
[ "Apache-2.0" ]
null
null
null
metaspace/engine/scripts/update_diagnostics.py
METASPACE2020/METASPACE
e1acd9a409f84a78eed7ca9713258c09b0e137ca
[ "Apache-2.0" ]
null
null
null
import argparse import logging import warnings from concurrent.futures import ThreadPoolExecutor import numpy as np from lithops import Storage from lithops.storage.utils import CloudObject from sm.engine.annotation.diagnostics import ( DiagnosticType, extract_dataset_diagnostics, add_diagnostics, del...
39.596059
99
0.652152
0
0
0
0
0
0
0
0
2,011
0.250187
00c926c130f69bc16bafa916d0ec7a727b57af9c
3,279
py
Python
agentpycell/__init__.py
kjph/py-agentmdl
3ea4dc483ccc689f172de408de9de55f723349a3
[ "MIT" ]
null
null
null
agentpycell/__init__.py
kjph/py-agentmdl
3ea4dc483ccc689f172de408de9de55f723349a3
[ "MIT" ]
null
null
null
agentpycell/__init__.py
kjph/py-agentmdl
3ea4dc483ccc689f172de408de9de55f723349a3
[ "MIT" ]
null
null
null
""" ABM: Agent Based Modelling The base class Cell provides one method update() that will be called on every tick. Ticks are generated by Grids - a collection of Cell object """ import abc import copy from . import utils class SimpleCell(abc.ABC): """ The simple cell only exposes an .update method which sh...
30.64486
80
0.593169
3,050
0.930162
0
0
424
0.129308
0
0
1,080
0.329369
00c951149e26bfb25258146a4daa0d6d4a19ac04
207
py
Python
parser/team23/instruccion/expresion_validacion.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
parser/team23/instruccion/expresion_validacion.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
parser/team23/instruccion/expresion_validacion.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
from abstract.instruccion import * from tools.tabla_tipos import * class expresion_validacion(instruccion): def __init__(self,comando,dato, line, column, num_nodo): super().__init__(line,column)
34.5
60
0.763285
139
0.671498
0
0
0
0
0
0
0
0
00ca1e7787a82b32835a968f49e6305b0b5f4e86
2,688
py
Python
aioconsul/client/client.py
johnnoone/aioconsul
02f7a529d7dc2e49bed942111067aa5faf320e90
[ "BSD-3-Clause" ]
7
2015-03-17T18:29:14.000Z
2020-01-03T06:45:43.000Z
aioconsul/client/client.py
johnnoone/aioconsul
02f7a529d7dc2e49bed942111067aa5faf320e90
[ "BSD-3-Clause" ]
1
2015-06-04T03:06:46.000Z
2015-06-04T03:06:46.000Z
aioconsul/client/client.py
johnnoone/aioconsul
02f7a529d7dc2e49bed942111067aa5faf320e90
[ "BSD-3-Clause" ]
2
2015-06-03T16:53:11.000Z
2021-12-16T13:38:23.000Z
from aioconsul.api import API from aioconsul.common import cached_property from .acl_endpoint import ACLEndpoint from .agent_endpoint import AgentEndpoint from .catalog_endpoint import CatalogEndpoint from .checks_endpoint import ChecksEndpoint from .coordinate_endpoint import CoordinateEndpoint from .event_endpoint im...
23.787611
76
0.683408
1,970
0.732887
0
0
1,424
0.529762
0
0
18
0.006696
00ca91da745c632cc521c76e550462f23371dbf5
733
py
Python
cli/progress.py
merwane/shield
067d4ed9c84946479c200c0f7bcf47f7bfce3b80
[ "MIT" ]
null
null
null
cli/progress.py
merwane/shield
067d4ed9c84946479c200c0f7bcf47f7bfce3b80
[ "MIT" ]
null
null
null
cli/progress.py
merwane/shield
067d4ed9c84946479c200c0f7bcf47f7bfce3b80
[ "MIT" ]
null
null
null
import colorama colorama.init() def print_static_progress_bar(title, percentage, text, color="white"): empty_bar = "—" * 50 if color == 'red': color = colorama.Fore.RED elif color == 'green': color = colorama.Fore.GREEN elif color == 'blue': color = colorama.Fore.BLUE ...
26.178571
79
0.608458
0
0
0
0
0
0
0
0
86
0.116689
00cb7f50c7dd6da029e4eff65652d1030d53d5ce
5,227
py
Python
commandServer.py
caiorss/vboxcontrol
02fb84effb9e07ee66499a768622e495b79e90a9
[ "Unlicense" ]
null
null
null
commandServer.py
caiorss/vboxcontrol
02fb84effb9e07ee66499a768622e495b79e90a9
[ "Unlicense" ]
null
null
null
commandServer.py
caiorss/vboxcontrol
02fb84effb9e07ee66499a768622e495b79e90a9
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ """ from subprocess import PIPE, Popen import platform import os import sys import re import zlib from socket import socket from socket import AF_INET, SOCK_STREAM, SHUT_RDWR from socket import SOL_SOCKET, SO_REUSEADDR localhost = '127.0.0.1' allhosts = '0.0.0.0' ...
24.890476
94
0.515783
3,180
0.60838
0
0
0
0
0
0
1,830
0.350105
00cbf5b142a833fac446bd82a1109ad6d28c184a
888
py
Python
maga/run_server.py
minkefusiji/TimeSeriesAnalysisPlugin
85baac82cece9bac7cabb053673df7cc20efa50d
[ "MIT" ]
null
null
null
maga/run_server.py
minkefusiji/TimeSeriesAnalysisPlugin
85baac82cece9bac7cabb053673df7cc20efa50d
[ "MIT" ]
null
null
null
maga/run_server.py
minkefusiji/TimeSeriesAnalysisPlugin
85baac82cece9bac7cabb053673df7cc20efa50d
[ "MIT" ]
null
null
null
from os import environ from maga.maga_plugin_service import MagaPluginService from common.plugin_model_api import api, PluginModelAPI, PluginModelListAPI, PluginModelTrainAPI, \ PluginModelInferenceAPI, app, PluginModelParameterAPI multivarite = MagaPluginService() api.add_resource(PluginModelListAPI(multivarite...
49.333333
101
0.801802
0
0
0
0
0
0
0
0
211
0.237613
00cbfa16839c500b9eb995200206a0b3bc8f7b5b
5,766
py
Python
src/jf/config.py
diseaz-joom/dsaflow
3d5cc8caa5ff0b0db3b7590cd27d9421ade88f6c
[ "MIT" ]
null
null
null
src/jf/config.py
diseaz-joom/dsaflow
3d5cc8caa5ff0b0db3b7590cd27d9421ade88f6c
[ "MIT" ]
6
2022-03-25T13:24:04.000Z
2022-03-29T13:24:36.000Z
src/jf/config.py
diseaz-joom/dsaflow
3d5cc8caa5ff0b0db3b7590cd27d9421ade88f6c
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- mode: python; coding: utf-8 -*- from typing import List, Dict, Optional, Generator, Tuple import collections from jf import command from jf import git from jf import schema class Error(Exception): '''Base for errors in the module.''' SEPARATOR = schema.SEPARATOR class JfTemplateCfg...
34.321429
80
0.653833
5,507
0.955082
198
0.034339
513
0.08897
0
0
1,258
0.218176
00ccc3e05c2f8c10d5fcb5b0ce3e5aab48ee4131
3,005
py
Python
60/60_2.py
bobismijnnaam/bobe-euler
111abdf37256d19c4a8c4e1a071db52929acf9d9
[ "MIT" ]
null
null
null
60/60_2.py
bobismijnnaam/bobe-euler
111abdf37256d19c4a8c4e1a071db52929acf9d9
[ "MIT" ]
null
null
null
60/60_2.py
bobismijnnaam/bobe-euler
111abdf37256d19c4a8c4e1a071db52929acf9d9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from Utils import * def isOkay(ps, p1, p2): newP1 = int(str(p1) + str(p2)) newP2 = int(str(p2) + str(p1)) return (newP1 in ps or isPrime(newP1)) and (newP2 in ps or isPrime(newP2)) def isCombination(indices): return len(indices) == len(set(indices)) def isFinished(indices, ind...
29.752475
86
0.541764
0
0
0
0
0
0
0
0
435
0.144759
00cd418f08de7688755bad4855003598dfd95f01
404
py
Python
evaluator_package/exceptions.py
MONICA-Project/GOST-tools
08f0b5bc47e5ab683c6dffe90e8cfdff4305eab4
[ "BSD-2-Clause" ]
null
null
null
evaluator_package/exceptions.py
MONICA-Project/GOST-tools
08f0b5bc47e5ab683c6dffe90e8cfdff4305eab4
[ "BSD-2-Clause" ]
null
null
null
evaluator_package/exceptions.py
MONICA-Project/GOST-tools
08f0b5bc47e5ab683c6dffe90e8cfdff4305eab4
[ "BSD-2-Clause" ]
null
null
null
class PassEnvironmentException(Exception): """A custom exception which passes the current environment and the current mode""" def __init__(self, environment=None, exit_interactive_mode=False, exit_single_command_mode=False): self.passed_environment = environment self.exit_interactive_mode = exi...
50.5
102
0.789604
403
0.997525
0
0
0
0
0
0
82
0.20297
00ce017e64b311a8af155a0d7cd8fdd51f298861
1,954
py
Python
update_npm_deps.py
wikimedia/integration-dashboard
7e9614efbb59a50b00fdad11a6785d2a9e1ab8b2
[ "CC0-1.0" ]
null
null
null
update_npm_deps.py
wikimedia/integration-dashboard
7e9614efbb59a50b00fdad11a6785d2a9e1ab8b2
[ "CC0-1.0" ]
null
null
null
update_npm_deps.py
wikimedia/integration-dashboard
7e9614efbb59a50b00fdad11a6785d2a9e1ab8b2
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 from collections import OrderedDict import glob import json import os import os.path import subprocess import lib argv = lib.cli_config() if len(argv) > 1: extension = argv[1] else: extension = None def update(package_json): os.chdir(os.path.dirname(package_json)) print(packa...
31.015873
76
0.614637
0
0
0
0
0
0
0
0
385
0.19683
00cf0d4b8c3b5d362e932a9c1aef4cf5350b79f9
4,821
py
Python
tests/integration/put_cars_call_test.py
ikostan/REST_API_AUTOMATION
cdb4d30fbc7457b2a403b4dad6fe1efa2e754681
[ "Unlicense" ]
8
2020-03-17T09:15:28.000Z
2022-01-29T19:50:45.000Z
tests/integration/put_cars_call_test.py
ikostan/REST_API_AUTOMATION
cdb4d30fbc7457b2a403b4dad6fe1efa2e754681
[ "Unlicense" ]
1
2021-06-02T00:26:58.000Z
2021-06-02T00:26:58.000Z
tests/integration/put_cars_call_test.py
ikostan/REST_API_AUTOMATION
cdb4d30fbc7457b2a403b4dad6fe1efa2e754681
[ "Unlicense" ]
1
2021-11-22T16:10:27.000Z
2021-11-22T16:10:27.000Z
#!/path/to/interpreter """ PUT Call Integration Test """ # Created by Egor Kostan. # GitHub: https://github.com/ikostan # LinkedIn: https://www.linkedin.com/in/egor-kostan/ import base64 import allure import unittest from flask import json from api.cars_app import app @allure.epic('Simple Flask App') @allure.pa...
31.717105
77
0.607758
4,357
0.90338
0
0
4,545
0.94236
0
0
2,293
0.47543
00cf8aae92b1dc888c5056333687fc326d0907ae
356
py
Python
tests/test_robots.py
knaik/TikTok
7a29be575e7ab2be7d725cc4d8c81ce7df349db7
[ "MIT" ]
37
2020-04-08T01:06:30.000Z
2022-03-29T02:04:10.000Z
tests/test_robots.py
knaik/TikTok
7a29be575e7ab2be7d725cc4d8c81ce7df349db7
[ "MIT" ]
5
2020-06-12T03:38:06.000Z
2022-03-15T08:54:09.000Z
tests/test_robots.py
knaik/TikTok
7a29be575e7ab2be7d725cc4d8c81ce7df349db7
[ "MIT" ]
22
2020-04-21T22:20:33.000Z
2022-03-22T08:55:20.000Z
import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from robots import getAllowedAgents def test_uas(): # valid as of 2020/05/25 uas = getAllowedAgents() assert set(uas) == {'Googlebot', 'Applebot', 'Bingbot', 'DuckDuckBot', 'Naverbot', 'Twitterbot', 'Yandex'} if __...
32.363636
110
0.69382
0
0
0
0
0
0
0
0
107
0.300562
00cfe0d27bc976505ef7a9527b8a821fce771c1d
150
py
Python
lib/JumpScale/baselib/watchdog/manager/__init__.py
Jumpscale/jumpscale6_core
0502ddc1abab3c37ed982c142d21ea3955d471d3
[ "BSD-2-Clause" ]
1
2015-10-26T10:38:13.000Z
2015-10-26T10:38:13.000Z
lib/JumpScale/baselib/watchdog/manager/__init__.py
Jumpscale/jumpscale6_core
0502ddc1abab3c37ed982c142d21ea3955d471d3
[ "BSD-2-Clause" ]
null
null
null
lib/JumpScale/baselib/watchdog/manager/__init__.py
Jumpscale/jumpscale6_core
0502ddc1abab3c37ed982c142d21ea3955d471d3
[ "BSD-2-Clause" ]
null
null
null
from JumpScale import j from .WatchdogFactory import * j.base.loader.makeAvailable(j, 'tools.watchdog') j.tools.watchdog.manager=WatchdogFactory()
18.75
48
0.793333
0
0
0
0
0
0
0
0
16
0.106667
00d0550f561d4fd3f38265b53b44c4789f7b9141
4,411
py
Python
tests/test_api.py
agounaris/lehmanbrothers
c82ce0c9ed1abc51170915153e15e5240726c607
[ "MIT" ]
null
null
null
tests/test_api.py
agounaris/lehmanbrothers
c82ce0c9ed1abc51170915153e15e5240726c607
[ "MIT" ]
1
2021-11-15T17:46:29.000Z
2021-11-15T17:46:29.000Z
tests/test_api.py
agounaris/warren
c82ce0c9ed1abc51170915153e15e5240726c607
[ "MIT" ]
null
null
null
from warren.api.statements import BalanceSheet from warren.api.statements import IncomeStatement from warren.api.statements import CashFlow from warren.api.statements import FinancialPerformance data = { 'ebit': 100, 'total_assets': 100, 'net_income': 100, 'total_stockholder_equity': 100, 'gross_p...
32.674074
75
0.579914
3,839
0.870324
0
0
0
0
0
0
228
0.051689
00d097b5b235d9dd4d146287f7356c8fd7da08c0
2,718
py
Python
tests/instance_properties/test_core.py
sad2project/descriptor-tools
ebeaba07e8519dbda25ddaa34ce9a9c49891e2bb
[ "CC0-1.0" ]
10
2015-12-15T02:17:49.000Z
2021-08-15T12:25:06.000Z
tests/instance_properties/test_core.py
sad2project/descriptor-tools
ebeaba07e8519dbda25ddaa34ce9a9c49891e2bb
[ "CC0-1.0" ]
1
2016-06-26T22:21:08.000Z
2016-06-27T05:29:53.000Z
tests/instance_properties/test_core.py
sad2project/descriptor-tools
ebeaba07e8519dbda25ddaa34ce9a9c49891e2bb
[ "CC0-1.0" ]
3
2017-11-19T01:16:30.000Z
2019-10-08T23:22:29.000Z
# coding=utf-8 from unittest import TestCase from descriptor_tools.instance_properties import ( InstanceProperty) class MockDelegatedProperty: def __init__(self, value): self.value = value self.get_called = False self.set_called = False def set...
28.610526
103
0.676968
2,557
0.940765
0
0
0
0
0
0
52
0.019132
00d37eaf2e152000bf2c3d503f3ab04f61ff6ea3
36
py
Python
frappe/patches/v4_0/remove_index_sitemap.py
pawaranand/phr_frappe
d997ae7d6fbade4b2c4a2491603d988876dfd67e
[ "MIT" ]
1
2022-03-05T16:02:39.000Z
2022-03-05T16:02:39.000Z
frappe/patches/v4_0/remove_index_sitemap.py
pawaranand/phr_frappe
d997ae7d6fbade4b2c4a2491603d988876dfd67e
[ "MIT" ]
1
2015-07-11T20:52:38.000Z
2019-12-06T15:00:58.000Z
frappe/patches/v4_0/remove_index_sitemap.py
pawaranand/phr_frappe
d997ae7d6fbade4b2c4a2491603d988876dfd67e
[ "MIT" ]
2
2015-09-05T05:30:23.000Z
2018-03-21T19:45:10.000Z
import frappe def execute(): pass
7.2
14
0.722222
0
0
0
0
0
0
0
0
0
0
00d3ce7a80766d039b044013c2ae2d16aa1b7e3d
5,252
py
Python
lm_training/utils/train_lm.py
jagadeesh6jaga/indicAsr--inference
569f867ed2d72cbd225f83d9b004666cf5c76c35
[ "MIT" ]
8
2021-12-11T12:26:20.000Z
2022-03-22T13:38:42.000Z
lm_training/utils/train_lm.py
jagadeesh6jaga/indicAsr--inference
569f867ed2d72cbd225f83d9b004666cf5c76c35
[ "MIT" ]
15
2022-01-08T11:59:49.000Z
2022-03-26T15:52:36.000Z
lm_training/utils/train_lm.py
jagadeesh6jaga/indicAsr--inference
569f867ed2d72cbd225f83d9b004666cf5c76c35
[ "MIT" ]
2
2022-01-27T22:58:04.000Z
2022-02-22T09:53:50.000Z
#This code has been taken from https://github.com/mozilla/DeepSpeech/blob/master/data/lm/generate_lm.py import argparse import os import subprocess from tqdm import tqdm import shutil def convert_and_filter_topk(args): """ Convert to lowercase, count word occurrences and save top-k words to a file """ lexico...
30.183908
142
0.582254
0
0
0
0
0
0
0
0
1,792
0.341203
00d442d399c62daee46ef62ed81ee028a91e9d40
10,712
py
Python
metalprot/basic/filter.py
lonelu/Metalprot
e51bee472c975aa171bdb6ee426a07ca69f110ee
[ "MIT" ]
null
null
null
metalprot/basic/filter.py
lonelu/Metalprot
e51bee472c975aa171bdb6ee426a07ca69f110ee
[ "MIT" ]
null
null
null
metalprot/basic/filter.py
lonelu/Metalprot
e51bee472c975aa171bdb6ee426a07ca69f110ee
[ "MIT" ]
null
null
null
import numpy as np import prody as pr from prody.measure.transform import calcRMSD from scipy.spatial.distance import cdist import itertools from sklearn.neighbors import NearestNeighbors from .vdmer import pair_wise_geometry_matrix class Search_filter: def __init__(self, filter_abple = False, filter_phipsi = True...
43.193548
147
0.629854
10,473
0.977689
0
0
6,759
0.630975
0
0
1,478
0.137976
00d68ed3e96b3394d7d99bd2cd2947cd940a0e2a
29,199
py
Python
ucsl/ucsl_classifier.py
neurospin-projects/2021_rlouiset_ucsl
7e98a58d9940164c23f748fa9c974cf556fa28b0
[ "BSD-3-Clause" ]
2
2021-07-19T12:42:58.000Z
2021-12-21T09:56:32.000Z
ucsl/ucsl_classifier.py
neurospin-projects/2021_rlouiset_ucsl
7e98a58d9940164c23f748fa9c974cf556fa28b0
[ "BSD-3-Clause" ]
null
null
null
ucsl/ucsl_classifier.py
neurospin-projects/2021_rlouiset_ucsl
7e98a58d9940164c23f748fa9c974cf556fa28b0
[ "BSD-3-Clause" ]
null
null
null
import copy import logging from sklearn.base import ClassifierMixin from sklearn.metrics import adjusted_rand_score as ARI from sklearn.mixture import GaussianMixture from ucsl.base import * from ucsl.utils import * class UCSL_C(BaseEM, ClassifierMixin): """ucsl classifier. Implementation of Mike Tipping"s ...
48.183168
128
0.637385
28,978
0.992431
0
0
0
0
0
0
12,380
0.423987
00d842aa29ccd09a11bbcd8359c46b6c0494b69e
400
py
Python
doubi_sdust/0005.py
saurabh896/python-1
f8d3aedf4c0fe6e24dfa3269ea7e642c9f7dd9b7
[ "MIT" ]
3,976
2015-01-01T15:49:39.000Z
2022-03-31T03:47:56.000Z
doubi_sdust/0005.py
dwh65416396/python
1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a
[ "MIT" ]
97
2015-01-11T02:59:46.000Z
2022-03-16T14:01:56.000Z
doubi_sdust/0005.py
dwh65416396/python
1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a
[ "MIT" ]
3,533
2015-01-01T06:19:30.000Z
2022-03-28T13:14:54.000Z
''' 第 0005 题: 你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小。 ''' from PIL import Image import os.path def Size(dirPath, size_x, size_y): f_list = os.listdir(dirPath) for i in f_list: if os.path.splitext(i)[1] == '.jpg': img = Image.open(i) img.thumbnail((size_x,size_y)) ...
26.666667
52
0.595
0
0
0
0
0
0
0
0
168
0.355932
00d92d1664a279f5e2296cfecc6155261207c717
672
py
Python
src/trials/trial_input.py
BattleManCWT/Job-Hunter-Search-Engine-with-crawled-Job-Dataset
a132783148832c284c0fdb385039cfa14c17b937
[ "MIT" ]
null
null
null
src/trials/trial_input.py
BattleManCWT/Job-Hunter-Search-Engine-with-crawled-Job-Dataset
a132783148832c284c0fdb385039cfa14c17b937
[ "MIT" ]
null
null
null
src/trials/trial_input.py
BattleManCWT/Job-Hunter-Search-Engine-with-crawled-Job-Dataset
a132783148832c284c0fdb385039cfa14c17b937
[ "MIT" ]
2
2020-12-14T02:35:40.000Z
2021-03-19T06:29:31.000Z
import tkinter as tk windows = tk.Tk() windows.title("输入框、文本框") windows.geometry("500x300") #界面大小 #设置输入框,对象是在windows上,show参数--->显示文本框输入时显示方式None:文字不加密,show="*"加密 e = tk.Entry(windows,show=None) e.pack() def insert_point(): var = e.get() #获取输入的信息 t.insert("insert",var) #参数1:插入方式,参数2:插入的数据 def in...
22.4
83
0.666667
0
0
0
0
0
0
0
0
366
0.433649
00d9574f47a9a5235f879d1a411b52f1046891ac
1,399
py
Python
lexical/process_lexical.py
xmeng17/Malicious-URL-Detection
f286aeb50570455486b470cbc2db9aa0fae99b8f
[ "MIT" ]
null
null
null
lexical/process_lexical.py
xmeng17/Malicious-URL-Detection
f286aeb50570455486b470cbc2db9aa0fae99b8f
[ "MIT" ]
null
null
null
lexical/process_lexical.py
xmeng17/Malicious-URL-Detection
f286aeb50570455486b470cbc2db9aa0fae99b8f
[ "MIT" ]
null
null
null
import lexical as lx import codecs from random import shuffle l=lx.lexical() result='tld,dot_num,avg_host,max_host,avg_path,max_path,class\n' result_arr1=[] with codecs.open('../parse/good.csv',encoding='utf-8') as f: string=f.read() arr=string.split('\n') del(arr[0]) del(arr[-1]) for line in arr: comp=line....
30.413043
124
0.68263
0
0
0
0
0
0
0
0
342
0.24446
00dae78e3cc4d02f68755469ad0f3ad8e487b9f7
477
py
Python
manage.py
isi-metaphor/mokujin
8283bcb79892833b54279052f671b54d846c932b
[ "Apache-2.0" ]
null
null
null
manage.py
isi-metaphor/mokujin
8283bcb79892833b54279052f671b54d846c932b
[ "Apache-2.0" ]
null
null
null
manage.py
isi-metaphor/mokujin
8283bcb79892833b54279052f671b54d846c932b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # Copyright (C) USC Information Sciences Institute # Author: Vladimir M. Zaytsev <zaytsev@usc.edu> # URL: <http://nlg.isi.edu/> # For more information, see README.md # For license information, see LICENSE import os import sys if __name__ == "__main__": os.environ.setdefault(...
25.105263
75
0.750524
0
0
0
0
0
0
0
0
292
0.612159
00db9ea31d36e006618e7ee363274309f264c275
1,321
py
Python
fabulous/services/google.py
rusrushal13/fabulous
61979213c5f1381e686e8a516606d9963e91f8b1
[ "BSD-3-Clause" ]
null
null
null
fabulous/services/google.py
rusrushal13/fabulous
61979213c5f1381e686e8a516606d9963e91f8b1
[ "BSD-3-Clause" ]
null
null
null
fabulous/services/google.py
rusrushal13/fabulous
61979213c5f1381e686e8a516606d9963e91f8b1
[ "BSD-3-Clause" ]
null
null
null
"""~google <search term> will return three results from the google search for <search term>""" import re import requests from random import shuffle from googleapiclient.discovery import build import logging my_api_key = "Your API Key(Link: https://console.developers.google.com/apis/dashboard)" my_cse_id = "Your Custo...
30.72093
94
0.677517
0
0
0
0
0
0
0
0
419
0.317184
00dddb8657c3b8c3b329fb18c769f7bd6e7f90ef
2,255
py
Python
codebase/models/extra_layers.py
abdussamettrkr/dirt-t
a605d0c31a4bec9e60eb533704cd5e423601c060
[ "MIT" ]
null
null
null
codebase/models/extra_layers.py
abdussamettrkr/dirt-t
a605d0c31a4bec9e60eb533704cd5e423601c060
[ "MIT" ]
null
null
null
codebase/models/extra_layers.py
abdussamettrkr/dirt-t
a605d0c31a4bec9e60eb533704cd5e423601c060
[ "MIT" ]
null
null
null
import tensorflow as tf import tensorbayes as tb import numpy as np from codebase.args import args from tensorbayes.tfutils import softmax_cross_entropy_with_two_logits as softmax_xent_two from tensorflow.contrib.framework import add_arg_scope @add_arg_scope def normalize_perturbation(d, scope=None): with tf.name_...
33.656716
89
0.686475
0
0
0
0
1,997
0.885588
0
0
242
0.107317
00de70ef58eee9f1f78b0b92159d53c4e743910d
1,366
py
Python
Projects/Online Workouts/w3resource/String/program-72.py
ivenpoker/Python-Projects
2975e1bd687ec8dbcc7a4842c13466cb86292679
[ "MIT" ]
1
2019-09-23T15:51:45.000Z
2019-09-23T15:51:45.000Z
Projects/Online Workouts/w3resource/String/program-72.py
ivenpoker/Python-Projects
2975e1bd687ec8dbcc7a4842c13466cb86292679
[ "MIT" ]
5
2021-02-08T20:47:19.000Z
2022-03-12T00:35:44.000Z
Projects/Online Workouts/w3resource/String/program-72.py
ivenpoker/Python-Projects
2975e1bd687ec8dbcc7a4842c13466cb86292679
[ "MIT" ]
null
null
null
#!/usr/bin/env python 3 ############################################################################################ # # # Program purpose: Removes all consecutive duplicates from a given string. # # Program...
44.064516
92
0.428258
0
0
0
0
0
0
0
0
813
0.595168
00df3b2db24d8dfe2a752be5d3c2ea7f1bbee333
223
py
Python
backend/Ehaat/details/admin.py
shuttlesworthNEO/HackIIITD-fSociety
5d3e50322162f4cfd655290cdcd298533987996b
[ "MIT" ]
null
null
null
backend/Ehaat/details/admin.py
shuttlesworthNEO/HackIIITD-fSociety
5d3e50322162f4cfd655290cdcd298533987996b
[ "MIT" ]
null
null
null
backend/Ehaat/details/admin.py
shuttlesworthNEO/HackIIITD-fSociety
5d3e50322162f4cfd655290cdcd298533987996b
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Haat, Stall, Rating, Product # Register your models here. admin.site.register(Haat) admin.site.register(Stall) admin.site.register(Rating) admin.site.register(Product)
22.3
48
0.798206
0
0
0
0
0
0
0
0
28
0.125561
00dfce7e1992e7c1b676d1670007946bf45fd716
13,235
py
Python
ukb/transforms/__init__.py
wi905252/ukb-cardiac-mri
3177dde898a65b1d7f385b78e4f134de3852bea5
[ "Apache-2.0" ]
19
2018-05-30T22:13:17.000Z
2022-01-18T14:04:40.000Z
ukb/transforms/__init__.py
wi905252/ukb-cardiac-mri
3177dde898a65b1d7f385b78e4f134de3852bea5
[ "Apache-2.0" ]
1
2019-08-07T07:29:07.000Z
2019-08-07T08:54:10.000Z
ukb/transforms/__init__.py
wi905252/ukb-cardiac-mri
3177dde898a65b1d7f385b78e4f134de3852bea5
[ "Apache-2.0" ]
8
2019-07-03T23:19:43.000Z
2021-11-15T17:09:24.000Z
from .ukbb import * from .augmentations import * from .multi_series import * from torchvision.transforms import Compose class RandomTransforms(object): """Base class for a list of transformations with randomness Args: transforms (list or tuple): list of transformations """ def __init__(self,...
32.280488
106
0.552172
1,916
0.144768
0
0
0
0
0
0
5,954
0.449868
00e0fa8917594d6c0c8aa901c5548f92fa1fe7c9
424
py
Python
python/py-sets/py-check-strict-superset.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
41
2018-05-11T07:54:34.000Z
2022-03-29T19:02:32.000Z
python/py-sets/py-check-strict-superset.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
2
2021-09-13T10:03:26.000Z
2021-10-04T10:21:05.000Z
python/py-sets/py-check-strict-superset.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
21
2019-01-23T19:06:59.000Z
2021-12-23T16:03:47.000Z
# Python > Sets > Check Strict Superset # Check if A is a strict superset of the other given sets. # # https://www.hackerrank.com/challenges/py-check-strict-superset/problem # a = set(map(int, input().split())) strict_superset = True for _ in range(int(input())): x = set(map(int, input().split())) if not ((len...
28.266667
72
0.648585
0
0
0
0
0
0
0
0
171
0.403302
00e12d4d2f525ec2940b6bf94f093ede3873009b
2,985
py
Python
src/clm/views/admin_cm/iso_image.py
cc1-cloud/cc1
8113673fa13b6fe195cea99dedab9616aeca3ae8
[ "Apache-2.0" ]
11
2015-05-06T14:16:54.000Z
2022-02-08T23:21:31.000Z
src/clm/views/admin_cm/iso_image.py
fortress-shell/cc1
8113673fa13b6fe195cea99dedab9616aeca3ae8
[ "Apache-2.0" ]
1
2015-10-30T21:08:11.000Z
2015-10-30T21:08:11.000Z
src/clm/views/admin_cm/iso_image.py
fortress-shell/cc1
8113673fa13b6fe195cea99dedab9616aeca3ae8
[ "Apache-2.0" ]
5
2016-02-12T22:01:38.000Z
2021-12-06T16:56:54.000Z
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland # # 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.apac...
25.084034
111
0.688777
0
0
0
0
1,995
0.668342
0
0
1,529
0.512228
00e222ae0c3c60f984161de1c02f4b88fd98c046
3,424
py
Python
follow_getters.py
gameoverfran/seguridad_informatica
59ca7d749e9378f19d2d82580d1ddf3f3762ce15
[ "MIT" ]
null
null
null
follow_getters.py
gameoverfran/seguridad_informatica
59ca7d749e9378f19d2d82580d1ddf3f3762ce15
[ "MIT" ]
null
null
null
follow_getters.py
gameoverfran/seguridad_informatica
59ca7d749e9378f19d2d82580d1ddf3f3762ce15
[ "MIT" ]
null
null
null
import json import os from datetime import datetime from time import sleep import requests from getters_maker import get_request_hash, get_insta_query, get_cookies def __get_follow_requests(variables, res_json, personal_path, json_piece): # json_formatted_str = json.dumps(res_json, indent=1) # p...
40.761905
120
0.618283
0
0
0
0
0
0
0
0
687
0.200643
00e25504336e5532acd0e82c245ee8d575ad44d6
289
py
Python
CLIP/bin/calc_reads_per_bin.py
asclab/pub-ews-clip
a6722a711c658bf8c6797558e9afe89d1a1b2dab
[ "BSD-3-Clause" ]
null
null
null
CLIP/bin/calc_reads_per_bin.py
asclab/pub-ews-clip
a6722a711c658bf8c6797558e9afe89d1a1b2dab
[ "BSD-3-Clause" ]
null
null
null
CLIP/bin/calc_reads_per_bin.py
asclab/pub-ews-clip
a6722a711c658bf8c6797558e9afe89d1a1b2dab
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # Input file: EWS.enriched.bins.txt import sys counter = {} for line in sys.stdin: if line[0] == '#': continue cols = line.strip().split('\t') if 'count' in cols[4]: continue # just print EWS1 + EWS2 print int(cols[4]) + int(cols[5])
20.642857
37
0.574394
0
0
0
0
0
0
0
0
90
0.311419
00e2c2a5ff0187278d94fe3397052c65091ac840
4,895
py
Python
IS31FL3741_DisplayIO/sports_glasses/code.py
albinger/Adafruit_Learning_System_Guides
4fe2da261fe5d1ca282b86bd3b93ee1466346fa7
[ "MIT" ]
null
null
null
IS31FL3741_DisplayIO/sports_glasses/code.py
albinger/Adafruit_Learning_System_Guides
4fe2da261fe5d1ca282b86bd3b93ee1466346fa7
[ "MIT" ]
null
null
null
IS31FL3741_DisplayIO/sports_glasses/code.py
albinger/Adafruit_Learning_System_Guides
4fe2da261fe5d1ca282b86bd3b93ee1466346fa7
[ "MIT" ]
null
null
null
# SPDX-FileCopyrightText: 2022 Mark Komus # # SPDX-License-Identifier: MIT import random import time import board import busio import digitalio import displayio import framebufferio import is31fl3741 from adafruit_is31fl3741.is31fl3741_PixelBuf import IS31FL3741_PixelBuf from adafruit_is31fl3741.led_glasses_map import...
31.178344
98
0.712972
0
0
0
0
0
0
0
0
1,809
0.369561
00e3f141945c6b600fe68b26e38b8881cab5f607
1,014
py
Python
counter.py
Ruthenic/word-predictor
d8ba87e4a0e055f7d4fe529d038a87254b7b234a
[ "Unlicense" ]
4
2021-01-14T20:41:46.000Z
2021-11-21T16:50:17.000Z
counter.py
Ruthenic/word-predictor
d8ba87e4a0e055f7d4fe529d038a87254b7b234a
[ "Unlicense" ]
null
null
null
counter.py
Ruthenic/word-predictor
d8ba87e4a0e055f7d4fe529d038a87254b7b234a
[ "Unlicense" ]
null
null
null
counts = [] arrin = {} printed=0 with open('model.txt') as f: for line in f: doesContainAlready = False line = line.replace('\n', '') pre = line.split(';')[0] post = line.split(';')[1] n=0 #for i in counts: # if i.startswith(line): # doesCont...
28.166667
78
0.467456
0
0
0
0
0
0
0
0
182
0.179487
00ed19520d1c449e39b8934c5dbc29a5d479a3f8
5,763
py
Python
scripts/agents/metrics.py
bhillmann/hexalys
c6c102b90e2684f1c85992eaae6325b8be0c8aa6
[ "MIT" ]
null
null
null
scripts/agents/metrics.py
bhillmann/hexalys
c6c102b90e2684f1c85992eaae6325b8be0c8aa6
[ "MIT" ]
null
null
null
scripts/agents/metrics.py
bhillmann/hexalys
c6c102b90e2684f1c85992eaae6325b8be0c8aa6
[ "MIT" ]
null
null
null
# By Nick Erickson # Contains functions related to metrics import sys import numpy as np from utils import graph_helper from utils.data_utils import save_class class Metrics: # TODO: Save this to a pickle file? def __init__(self, metric_type='a3c'): self.type = metric_type # self.survival_time...
37.422078
321
0.575221
5,588
0.969634
0
0
0
0
0
0
1,640
0.284574
00edf6e571545af5f6320b841e38389297b22abd
680
py
Python
Utils/Submission/Submission.py
MaurizioFD/recsys-challenge-2020-twitter
95dc024fb4f8777aa62e1304536daece640428de
[ "Apache-2.0" ]
44
2020-07-09T11:31:17.000Z
2022-03-04T05:50:48.000Z
Utils/Submission/Submission.py
kiminh/recsys-challenge-2020-twitter
567f0db40be7db3d21c360f2ca6cdf2addc7c698
[ "Apache-2.0" ]
3
2020-10-02T18:55:21.000Z
2020-10-13T22:13:58.000Z
Utils/Submission/Submission.py
kiminh/recsys-challenge-2020-twitter
567f0db40be7db3d21c360f2ca6cdf2addc7c698
[ "Apache-2.0" ]
9
2020-08-08T14:55:59.000Z
2021-09-06T09:17:03.000Z
import RootPath def create_submission_file(tweets, users, predictions, output_file): # Preliminary checks assert len(tweets) == len(users), f"length are different tweets -> {len(tweets)}, and users -> {len(users)} " assert len(users) == len(predictions), f"length are different users -> {len(users)}, and...
40
131
0.670588
0
0
0
0
0
0
0
0
324
0.476471
00efe3d9f291632450df7c20dcbcc38a81759c0a
1,388
py
Python
stats/db_utils.py
twist3dimages/nba-sql
980416440f296c2cd4e8afb49c95ba77a55daae5
[ "Apache-2.0" ]
null
null
null
stats/db_utils.py
twist3dimages/nba-sql
980416440f296c2cd4e8afb49c95ba77a55daae5
[ "Apache-2.0" ]
null
null
null
stats/db_utils.py
twist3dimages/nba-sql
980416440f296c2cd4e8afb49c95ba77a55daae5
[ "Apache-2.0" ]
null
null
null
from utils import chunk_list """ Database utilities (future middleware layer if we decide to use DuckDB by default.) """ def insert_many(settings, table, rows): """ Entry function on insert_many. """ if settings.db_type == 'sqlite': __insert_many_sqlite(settings, table, rows) else: ...
27.215686
83
0.670029
0
0
0
0
0
0
0
0
405
0.291787
00f08386ad2af26c1e6b09fd6ddb6558568930d8
4,327
py
Python
Software/Child Drone/Control/picamapriltag.py
sangminoh715/SKARS-Capstone-Project
87cfadd1a650d2f492b38f87ab42c41641a06dd0
[ "MIT" ]
null
null
null
Software/Child Drone/Control/picamapriltag.py
sangminoh715/SKARS-Capstone-Project
87cfadd1a650d2f492b38f87ab42c41641a06dd0
[ "MIT" ]
null
null
null
Software/Child Drone/Control/picamapriltag.py
sangminoh715/SKARS-Capstone-Project
87cfadd1a650d2f492b38f87ab42c41641a06dd0
[ "MIT" ]
null
null
null
import time import picamera import apriltag import cv2 import numpy as np import math import threading from parameters import Parameters # Create a pool of image processors done = False lock = threading.Lock() pool = [] np.set_printoptions(suppress=True) ###############################################################...
30.048611
111
0.502196
3,835
0.886295
456
0.105385
0
0
0
0
474
0.109545
00f0d88feb828efc6d566faea34795c42d5f74d4
9,913
py
Python
Listing.py
l1mc/consulting_project-Shui_On_Land
60522160607d940d4e566fcb922d7c49bbf6a83c
[ "MIT" ]
2
2020-09-25T02:35:28.000Z
2020-10-25T13:11:38.000Z
Listing.py
l1mc/Consulting-Service-for-Shui-On-Land
60522160607d940d4e566fcb922d7c49bbf6a83c
[ "MIT" ]
null
null
null
Listing.py
l1mc/Consulting-Service-for-Shui-On-Land
60522160607d940d4e566fcb922d7c49bbf6a83c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Aug 17 14:28:27 2020 @author: Mingcong Li """ import difflib # 计算两个字符串相似度的 import pandas as pd import numpy as np import matplotlib.pyplot as plt import copy #用来深度复制 import matplotlib.ticker as mtick # 用来改变坐标抽格式 plt.rcParams['font.sans-serif'] = ['FangSong'] # 指定默认字体 plt.r...
39.181818
346
0.71381
0
0
0
0
0
0
0
0
7,543
0.542077
00f3bbc97594d25a8b1ca1dd47690402eccbf5d5
1,846
py
Python
api/serializers.py
SergioLeguizamon/prueba_tecnica_quick
1d09afa6ba4ed60221a88f7f2bd0811482860733
[ "MIT" ]
null
null
null
api/serializers.py
SergioLeguizamon/prueba_tecnica_quick
1d09afa6ba4ed60221a88f7f2bd0811482860733
[ "MIT" ]
null
null
null
api/serializers.py
SergioLeguizamon/prueba_tecnica_quick
1d09afa6ba4ed60221a88f7f2bd0811482860733
[ "MIT" ]
null
null
null
from rest_framework import serializers from django.db.models import fields from django.contrib.auth.models import User from .models import Clients, Products, Bills, BillsProducts class UserSerializer(serializers.Serializer): id = serializers.ReadOnlyField() first_name = serializers.CharField() last_name =...
34.185185
98
0.678765
1,653
0.89545
0
0
0
0
0
0
313
0.169556
00f51b27af02d7780983835d377f6e4f85ccb09f
904
py
Python
Algorithms/Mergesort/python/mergesort.py
Ritik7042/Data-Structures-Algorithms-Hacktoberfest-2K19
47550ec865e215aa7f577a4de40aac431af0d52d
[ "MIT" ]
51
2019-09-30T18:49:55.000Z
2020-11-26T10:23:15.000Z
Algorithms/Mergesort/python/mergesort.py
rvk7895/Data-Structures-Algorithms-Hacktoberfest-2K19
52beb5da65263bdea0d27070aa690e0ed5966139
[ "MIT" ]
208
2019-09-30T17:44:05.000Z
2019-12-13T13:02:38.000Z
Algorithms/Mergesort/python/mergesort.py
rvk7895/Data-Structures-Algorithms-Hacktoberfest-2K19
52beb5da65263bdea0d27070aa690e0ed5966139
[ "MIT" ]
299
2019-09-30T14:49:35.000Z
2021-10-02T17:06:56.000Z
#!/usr/bin/env python3 def mergesort(unsorted_list): n = len(unsorted_list) if n > 1: m = n // 2 left = unsorted_list[:m] right = unsorted_list[m:] mergesort(left) mergesort(right) merge(unsorted_list, left, right) def merge(original, left, right): i = j = k...
23.179487
61
0.495575
0
0
0
0
0
0
0
0
32
0.035398
da949dce61a4080b2cdaf17c3d09ee56ed83cdfc
3,538
py
Python
coef.py
jooohhn/venezuelan-economic-analysis
b61559c385677f7023240655ae636a732b0d21dd
[ "MIT" ]
2
2019-05-11T06:02:01.000Z
2019-05-14T10:09:22.000Z
coef.py
jooohhn/venezuelan-economic-analysis
b61559c385677f7023240655ae636a732b0d21dd
[ "MIT" ]
null
null
null
coef.py
jooohhn/venezuelan-economic-analysis
b61559c385677f7023240655ae636a732b0d21dd
[ "MIT" ]
null
null
null
import csv import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # Correlation coef for oil prices to GDP per capita dfOil = pd.read_excel('./data/Oil Prices.xls', dtype={'Date': int, 'Value': float}) dfOil = dfOil.rename(columns={'Date': 'Year', 'Value': 'Oil Price per Barrel (USD)'}) dfGdp = pd....
49.138889
106
0.639344
0
0
0
0
0
0
0
0
1,692
0.478236
da95cab06fd694279584ccd6c329d758cd79a0c0
362
py
Python
tips/str_bytes.py
maesbrisa/pythonessie
88484458ee3e13fb3bad714e49e8b34297fda5a9
[ "MIT" ]
null
null
null
tips/str_bytes.py
maesbrisa/pythonessie
88484458ee3e13fb3bad714e49e8b34297fda5a9
[ "MIT" ]
6
2020-07-29T11:44:11.000Z
2020-08-18T15:52:58.000Z
tips/str_bytes.py
maesbrisa/pythonessie
88484458ee3e13fb3bad714e49e8b34297fda5a9
[ "MIT" ]
null
null
null
def to_string(bytes_or_string): if isinstance(bytes_or_string, bytes): string = bytes_or_string.decode('utf-8') else: string = bytes_or_string return string def to_bytes(bytes_or_string): if isinstance(bytes_or_string,str): byte = bytes_or_string.encode('utf-8') else: ...
24.133333
48
0.676796
0
0
0
0
0
0
0
0
14
0.038674
da96c8d0b5790f26e29860edfaab83ca4c76b04c
274
py
Python
sample.py
tmy310/aws_util
d3f49099706f239c1039b7ededd41b4de63bfb73
[ "MIT" ]
null
null
null
sample.py
tmy310/aws_util
d3f49099706f239c1039b7ededd41b4de63bfb73
[ "MIT" ]
1
2020-03-29T06:23:20.000Z
2020-03-29T06:23:20.000Z
sample.py
tmy310/aws_util
d3f49099706f239c1039b7ededd41b4de63bfb73
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from libs.cloud_formation_stack_resource_checker import CloudFormationStackResourceChecker cloud_formation_stack_resource_checker = CloudFormationStackResourceChecker() print(cloud_formation_stack_resource_checker.get_stack_and_resource_count())
34.25
91
0.872263
0
0
0
0
0
0
0
0
23
0.083942
da97e76fb81b60192f3404927df48c6a16e6c0cb
5,351
py
Python
SDKs/CryCode/3.7.0/GameDll/uberfiles/genuber.py
amrhead/FireNET
34d439aa0157b0c895b20b2b664fddf4f9b84af1
[ "BSD-2-Clause" ]
4
2017-12-18T20:10:16.000Z
2021-02-07T21:21:24.000Z
SDKs/CryCode/3.7.0/GameDll/uberfiles/genuber.py
amrhead/FireNET
34d439aa0157b0c895b20b2b664fddf4f9b84af1
[ "BSD-2-Clause" ]
null
null
null
SDKs/CryCode/3.7.0/GameDll/uberfiles/genuber.py
amrhead/FireNET
34d439aa0157b0c895b20b2b664fddf4f9b84af1
[ "BSD-2-Clause" ]
3
2019-03-11T21:36:15.000Z
2021-02-07T21:21:26.000Z
#!/bin/python import re import sys import os class Config: def __init__(self): options = self.__parseOptions() self.projectFileName = options.project self.sourcesPerFile = options.number self.mkFileName = options.makefile self.mkProjectFileName = options.mkproject self.destinationFolder = os.path.basen...
33.030864
177
0.724164
5,090
0.951224
0
0
0
0
0
0
920
0.17193
da98edb50b64c4ae9596fe0d3c027f34ac473584
2,275
py
Python
2022/04/challenge04.py
mharty3/preppin-data
9fad9b4fdd2ef9a12f7a32b03930179faa2284ea
[ "MIT" ]
null
null
null
2022/04/challenge04.py
mharty3/preppin-data
9fad9b4fdd2ef9a12f7a32b03930179faa2284ea
[ "MIT" ]
null
null
null
2022/04/challenge04.py
mharty3/preppin-data
9fad9b4fdd2ef9a12f7a32b03930179faa2284ea
[ "MIT" ]
null
null
null
#%% # https://preppindata.blogspot.com/2022/01/2022-week-4-prep-school-travel-plans.html # 2022-01-26 import pandas as pd RAW = pd.read_csv('2022/04/inputs/travel_plans.csv') MISTAKES = { 'Scoter': 'Scooter', 'Walkk': 'Walk', 'Carr': 'Car', 'Bycycle': 'Bicycle', 'Scootr': 'Scooter', 'Wallk': ...
32.042254
91
0.52
0
0
0
0
0
0
0
0
1,050
0.461538
da998cae86d173be7166b8bbd15b244a3cd77208
2,864
py
Python
plugins/pg_invalid_indexes.py
xinferum/mamonsu-plugins
9ddce580a1b030e67b1d6334c631cc76770bee9a
[ "MIT" ]
null
null
null
plugins/pg_invalid_indexes.py
xinferum/mamonsu-plugins
9ddce580a1b030e67b1d6334c631cc76770bee9a
[ "MIT" ]
null
null
null
plugins/pg_invalid_indexes.py
xinferum/mamonsu-plugins
9ddce580a1b030e67b1d6334c631cc76770bee9a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin from mamonsu.plugins.pgsql.pool import Pooler class PgInvalidIndexes(Plugin): Interval = 60 DEFAULT_CONFIG = { 'Interval': str(60), # Default interval (1 hour = 3600 sec) } zbx_key = "invalid_indexes_c...
40.914286
153
0.574721
2,728
0.952514
0
0
0
0
0
0
1,213
0.423534
da9b63878204a63022e41fc407896dede115d369
863
py
Python
phasespace/fromdecay/__init__.py
eduardo-rodrigues/phasespace
d6bfca58862cbbb8a9bdfd4ab8af659991ea0da6
[ "BSD-3-Clause" ]
null
null
null
phasespace/fromdecay/__init__.py
eduardo-rodrigues/phasespace
d6bfca58862cbbb8a9bdfd4ab8af659991ea0da6
[ "BSD-3-Clause" ]
null
null
null
phasespace/fromdecay/__init__.py
eduardo-rodrigues/phasespace
d6bfca58862cbbb8a9bdfd4ab8af659991ea0da6
[ "BSD-3-Clause" ]
null
null
null
"""This submodule makes it possible for `phasespace` and `DecayLanguage` to work together. More generally, the `GenMultiDecay` object can also be used as a high-level interface for simulating particles that can decay in multiple different ways. """ import sys from typing import Tuple from .genmultidecay impor...
30.821429
111
0.707995
0
0
0
0
0
0
0
0
468
0.542294
da9c410d602b9ec28b6c717a86a0c174065fc8dc
36
py
Python
reporter/__init__.py
eaingaran/TimeMachine
f6199827ffc358dd32f26edd8d68e2dbf7c63a90
[ "MIT" ]
null
null
null
reporter/__init__.py
eaingaran/TimeMachine
f6199827ffc358dd32f26edd8d68e2dbf7c63a90
[ "MIT" ]
null
null
null
reporter/__init__.py
eaingaran/TimeMachine
f6199827ffc358dd32f26edd8d68e2dbf7c63a90
[ "MIT" ]
null
null
null
from reporter import GenerateReport
18
35
0.888889
0
0
0
0
0
0
0
0
0
0
da9d63b81e0afe17146282e05fee0b0892122bb6
457
py
Python
covidframe/ml/imagenet.py
covid-frame/covid-frame
32d50cafa3ba3388cd44cdb49136727b870def62
[ "Apache-2.0" ]
null
null
null
covidframe/ml/imagenet.py
covid-frame/covid-frame
32d50cafa3ba3388cd44cdb49136727b870def62
[ "Apache-2.0" ]
null
null
null
covidframe/ml/imagenet.py
covid-frame/covid-frame
32d50cafa3ba3388cd44cdb49136727b870def62
[ "Apache-2.0" ]
null
null
null
from keras.applications import VGG16 def create_model(img_width, img_height): conv_base = VGG16(weights='imagenet', include_top=False, input_shape=( img_width, img_height, 3)) # 3 = number of channels in RGB pictures return conv_base def compile_model(model): model.compile(optimizer=optimizer...
21.761905
76
0.665208
0
0
0
0
0
0
0
0
76
0.166302
daa047340a12357e898e0edbb403a1a9c7111301
1,324
py
Python
src/options/timer_options.py
anglixjtu/MeshCNN_
83826e66d8989ed4967047c2ed6d099568c5781c
[ "MIT" ]
2
2021-08-02T05:39:43.000Z
2021-08-04T04:15:02.000Z
src/options/timer_options.py
anglixjtu/MeshCNN_
83826e66d8989ed4967047c2ed6d099568c5781c
[ "MIT" ]
null
null
null
src/options/timer_options.py
anglixjtu/MeshCNN_
83826e66d8989ed4967047c2ed6d099568c5781c
[ "MIT" ]
null
null
null
from .base_options import BaseOptions class TimerOptions(BaseOptions): def initialize(self): BaseOptions.initialize(self) self.parser.add_argument('--results_dir', type=str, default='./results/', help='saves results here.') self.parser.add_argument('--feature_dir', type=str, default='./fea...
77.882353
147
0.699396
1,284
0.969789
0
0
0
0
0
0
521
0.393505