hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
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
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71df2573cd5a2a55288807df292984fea16b131
4,046
py
Python
lib/python2.7/site-packages/wrapt/arguments.py
nishaero/wifi-userseg-ryu
1132f2c813b79eff755bdd1a9e73e7ad3980af7c
[ "Apache-2.0" ]
99
2015-02-27T02:21:41.000Z
2021-02-09T15:13:25.000Z
lib/python2.7/site-packages/wrapt/arguments.py
nishaero/wifi-userseg-ryu
1132f2c813b79eff755bdd1a9e73e7ad3980af7c
[ "Apache-2.0" ]
114
2015-01-16T15:06:49.000Z
2018-04-13T20:29:18.000Z
lib/python2.7/site-packages/wrapt/arguments.py
nishaero/wifi-userseg-ryu
1132f2c813b79eff755bdd1a9e73e7ad3980af7c
[ "Apache-2.0" ]
88
2016-11-27T02:16:11.000Z
2020-02-28T05:10:26.000Z
# This is a copy of the inspect.getcallargs() function from Python 2.7 # so we can provide it for use under Python 2.6. As the code in this # file derives from the Python distribution, it falls under the version # of the PSF license used for Python 2.7. from inspect import getargspec, ismethod def getcallargs(func, *...
42.145833
80
0.578843
from inspect import getargspec, ismethod def getcallargs(func, *positional, **named): args, varargs, varkw, defaults = getargspec(func) f_name = func.__name__ arg2value = {} assigned_tuple_params = [] def assign(arg, value): if isinstance(arg, str): arg2value[arg] = v...
true
true
f71df272eade1b9d37dd1ad57e3ad4edcedf453e
4,349
py
Python
tensorflow/examples/learn/text_classification_cnn.py
toptaldev92/tensorflow
1fd1f65d1b0896149e44a1f105267c27994010d9
[ "Apache-2.0" ]
null
null
null
tensorflow/examples/learn/text_classification_cnn.py
toptaldev92/tensorflow
1fd1f65d1b0896149e44a1f105267c27994010d9
[ "Apache-2.0" ]
null
null
null
tensorflow/examples/learn/text_classification_cnn.py
toptaldev92/tensorflow
1fd1f65d1b0896149e44a1f105267c27994010d9
[ "Apache-2.0" ]
1
2021-04-22T09:17:52.000Z
2021-04-22T09:17:52.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # 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 appl...
36.241667
80
0.727983
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import sys import numpy as np import pandas from sklearn import metrics import tensorflow as tf from tensorflow.contrib import learn FLAGS = None MAX_DOCUMENT_LENGTH = 100 EMBE...
true
true
f71df295ebee6a0945c2a0d4147b9909a35dfeca
3,622
py
Python
trainer.py
filipesouzacit/RL-with-MCTS
cca1a8a79e5973a30b423c45a090e2473975c189
[ "MIT" ]
1
2021-01-13T00:24:16.000Z
2021-01-13T00:24:16.000Z
trainer.py
filipesouzacit/RL-with-MCTS
cca1a8a79e5973a30b423c45a090e2473975c189
[ "MIT" ]
null
null
null
trainer.py
filipesouzacit/RL-with-MCTS
cca1a8a79e5973a30b423c45a090e2473975c189
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thus Jan 07 15:54:13 2021 @author: Filipe Souza Based on Josh Varty (https://github.com/JoshVarty/AlphaZeroSimple) """ import numpy as np from random import shuffle import keras from gym_go import gogame from monte_carlo_tree_search import MCTS class Trai...
36.959184
139
0.57841
import numpy as np from random import shuffle import keras from gym_go import gogame from monte_carlo_tree_search import MCTS class Trainer: def __init__(self, game, model, args): self.game = game self.model = model self.args = args self.mcts = MCTS(self.game, self.model, self.a...
true
true
f71df2c133cd5cfc48196609f04f3fb72dd5de7f
1,297
py
Python
phrase_guess/genetic.py
chauhanjatin10/Genetic_alogs
1d2a7cd4b2f14e0d79eaaa2eefee48a2fab608bd
[ "MIT" ]
null
null
null
phrase_guess/genetic.py
chauhanjatin10/Genetic_alogs
1d2a7cd4b2f14e0d79eaaa2eefee48a2fab608bd
[ "MIT" ]
null
null
null
phrase_guess/genetic.py
chauhanjatin10/Genetic_alogs
1d2a7cd4b2f14e0d79eaaa2eefee48a2fab608bd
[ "MIT" ]
null
null
null
import random import statistics import time def _generate_gene(length,geneset): genes = [] while len(genes) < length: sample = min(length - len(genes), len(geneset)) genes.extend(random.sample(geneset,sample)) return ''.join(genes) def _mutate(parent,geneset): childgene = list(parent) index = random.randran...
25.431373
78
0.737086
import random import statistics import time def _generate_gene(length,geneset): genes = [] while len(genes) < length: sample = min(length - len(genes), len(geneset)) genes.extend(random.sample(geneset,sample)) return ''.join(genes) def _mutate(parent,geneset): childgene = list(parent) index = random.randran...
true
true
f71df387bcaccd4339c5f6848567d11bb20038fe
179
py
Python
sim/config/color_palette.py
sebamenabar/oc-fewshot-public
2dad8c9f24cb1bfe72d8b13b33d28f6788d86ca8
[ "MIT" ]
18
2020-07-12T11:07:27.000Z
2022-02-06T04:17:23.000Z
sim/config/color_palette.py
renmengye/oc-fewshot
eb12bd5b426518fd8353304f0760f5c24f1b3c12
[ "MIT" ]
2
2021-10-14T17:38:50.000Z
2021-11-10T14:07:04.000Z
sim/config/color_palette.py
renmengye/oc-fewshot
eb12bd5b426518fd8353304f0760f5c24f1b3c12
[ "MIT" ]
6
2020-11-11T19:18:28.000Z
2021-06-04T14:20:03.000Z
colors = { "blue" : "#256EFF", "violet" : "#46237A", "green" : "#3DDC97", "white" : "#FCFCFC", "red" : "#FF495C", "gray" : "#E8E8E8" #"#8D99AE" }
22.375
35
0.418994
colors = { "blue" : "#256EFF", "violet" : "#46237A", "green" : "#3DDC97", "white" : "#FCFCFC", "red" : "#FF495C", "gray" : "#E8E8E8" }
true
true
f71df3a6fa58f8584dfdc62f31e6a1ab73062b3a
6,754
py
Python
tf3d/object_detection/preprocessor_test.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-13T21:48:52.000Z
2022-03-13T21:48:52.000Z
tf3d/object_detection/preprocessor_test.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
tf3d/object_detection/preprocessor_test.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
40.933333
80
0.656352
import tensorflow as tf from tf3d import standard_fields from tf3d.object_detection import preprocessor class ObjectDetectionPreprocessorTest(tf.test.TestCase): def _image_correspondence_fn(self, inputs): return { 'view_images': { 'rgb_view': tf.cast( ...
true
true
f71df3f459ff6917944a00897a64d96a40e9755e
23,397
py
Python
misc/config_tools/library/launch_cfg_lib.py
jackwhich/acrn-hypervisor-1
2ff11c2ef04a2668979b3e363e25f13cf48376ac
[ "BSD-3-Clause" ]
null
null
null
misc/config_tools/library/launch_cfg_lib.py
jackwhich/acrn-hypervisor-1
2ff11c2ef04a2668979b3e363e25f13cf48376ac
[ "BSD-3-Clause" ]
null
null
null
misc/config_tools/library/launch_cfg_lib.py
jackwhich/acrn-hypervisor-1
2ff11c2ef04a2668979b3e363e25f13cf48376ac
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2019 Intel Corporation. # # SPDX-License-Identifier: BSD-3-Clause # import os import getopt import re import common import board_cfg_lib import scenario_cfg_lib import lxml import lxml.etree ERR_LIST = {} BOOT_TYPE = ['no', 'ovmf'] RTOS_TYPE = ['no', 'Soft RT', 'Hard RT'] DM_VUART0 = ['Disable', 'Ena...
34.306452
147
0.622986
import os import getopt import re import common import board_cfg_lib import scenario_cfg_lib import lxml import lxml.etree ERR_LIST = {} BOOT_TYPE = ['no', 'ovmf'] RTOS_TYPE = ['no', 'Soft RT', 'Hard RT'] DM_VUART0 = ['Disable', 'Enable'] y_n = ['y', 'n'] USER_VM_TYPES = ['CLEARLINUX', 'ANDROID', 'ALIOS', 'PREEM...
true
true
f71df485d3408330f790929d7b0da668a541e0f4
11,467
py
Python
doc/conf.py
kvdblom/AutoFolio
60a38a485e832b4e9bd2d06cbe7e1aecc994bb32
[ "BSD-2-Clause" ]
24
2017-05-17T15:51:44.000Z
2021-05-14T20:24:44.000Z
doc/conf.py
kvdblom/AutoFolio
60a38a485e832b4e9bd2d06cbe7e1aecc994bb32
[ "BSD-2-Clause" ]
10
2017-02-21T13:36:25.000Z
2021-04-10T01:35:35.000Z
doc/conf.py
kvdblom/AutoFolio
60a38a485e832b4e9bd2d06cbe7e1aecc994bb32
[ "BSD-2-Clause" ]
12
2016-07-21T08:59:36.000Z
2021-01-28T13:51:16.000Z
# -*- coding: utf-8 -*- # # AutoFolio documentation build configuration file, created by # sphinx-quickstart on Mon Sep 14 12:36:21 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # #...
32.210674
89
0.703148
import datetime import sys import os import shlex import sphinx_bootstrap_theme sys.path.insert(0, '..') import autofolio extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', ] templates_path = ...
true
true
f71df493deda24849909a1ce67f6f55f0aa47381
1,385
py
Python
Numercial_Examples/Examples_China.py
Lemon-Nation/PyLMDI
54d15ec44b84bd84b960003b1fd6690057240565
[ "Apache-2.0" ]
3
2021-12-23T12:19:18.000Z
2022-01-14T03:49:51.000Z
Numercial_Examples/Examples_China.py
Lemon-Nation/PyLMDI
54d15ec44b84bd84b960003b1fd6690057240565
[ "Apache-2.0" ]
null
null
null
Numercial_Examples/Examples_China.py
Lemon-Nation/PyLMDI
54d15ec44b84bd84b960003b1fd6690057240565
[ "Apache-2.0" ]
3
2021-12-23T11:57:35.000Z
2022-02-28T13:43:55.000Z
# ============================================================================= # Step1: Input # ============================================================================= import numpy as np from PyLMDI import PyLMDI if __name__=='__main__': #--- Step1: Input Ct = 794.6119504871361 # Carbon emi...
26.132075
104
0.488809
import numpy as np from PyLMDI import PyLMDI if __name__=='__main__': Ct = 794.6119504871361 C0 = 761.984276581356 # Carbon emission from China's commercial buildings in 2017 Pt = 1395.38 P0 = 1390.08 gt = 64.52073987 g0 = 59.04367375 ...
true
true
f71df509d4fc284e6d1ded8236536c35e1a10c7b
4,573
py
Python
arcsight/utils/arcsight_ssl.py
mayurdhamecha-crest/ta_cloud_exchange_plugins
8d64c92909f28bcb2067587ec3361499de5d5723
[ "BSD-3-Clause" ]
null
null
null
arcsight/utils/arcsight_ssl.py
mayurdhamecha-crest/ta_cloud_exchange_plugins
8d64c92909f28bcb2067587ec3361499de5d5723
[ "BSD-3-Clause" ]
null
null
null
arcsight/utils/arcsight_ssl.py
mayurdhamecha-crest/ta_cloud_exchange_plugins
8d64c92909f28bcb2067587ec3361499de5d5723
[ "BSD-3-Clause" ]
null
null
null
"""ArcSight Plugin SSL Log Handler.""" import os import codecs import logging import logging.handlers import ssl import socket from tempfile import NamedTemporaryFile class SSLArcSightHandler(logging.handlers.SysLogHandler): """SSL ArcSightHandler Class.""" # We need to paste all this in because __init__ co...
30.898649
72
0.597201
import os import codecs import logging import logging.handlers import ssl import socket from tempfile import NamedTemporaryFile class SSLArcSightHandler(logging.handlers.SysLogHandler): LOG_EMERG = 0 LOG_ALERT = 1 LOG_CRIT = 2 LOG_ERR = 3 LOG_WARNING = 4 LOG_NOTICE = 5 ...
true
true
f71df5e138f560490f9f1eee06cf96b17622e978
270
py
Python
DiscordShopBot/utils.py
chanchan69/shopper
dc7a9bba325d753c2454640d201514647628c01e
[ "Apache-2.0" ]
1
2021-12-21T21:29:15.000Z
2021-12-21T21:29:15.000Z
DiscordShopBot/utils.py
chanchan69/shopper
dc7a9bba325d753c2454640d201514647628c01e
[ "Apache-2.0" ]
null
null
null
DiscordShopBot/utils.py
chanchan69/shopper
dc7a9bba325d753c2454640d201514647628c01e
[ "Apache-2.0" ]
1
2021-12-21T12:52:53.000Z
2021-12-21T12:52:53.000Z
from tkinter import filedialog, Tk from os import getcwd def epic_file_dialog(title: str) -> str: root = Tk() root.attributes('-topmost',True) root.withdraw() path = filedialog.askopenfilename(title=title, initialdir=getcwd()) return path
27
73
0.685185
from tkinter import filedialog, Tk from os import getcwd def epic_file_dialog(title: str) -> str: root = Tk() root.attributes('-topmost',True) root.withdraw() path = filedialog.askopenfilename(title=title, initialdir=getcwd()) return path
true
true
f71df5fc0f6719789acb2f43aed9c9cb11f18ee5
1,508
py
Python
dags/exercise6.py
tisako/airflow-training-skeleton
5bebe784d69f115df352ad5185320653eaa78eee
[ "Apache-2.0" ]
null
null
null
dags/exercise6.py
tisako/airflow-training-skeleton
5bebe784d69f115df352ad5185320653eaa78eee
[ "Apache-2.0" ]
null
null
null
dags/exercise6.py
tisako/airflow-training-skeleton
5bebe784d69f115df352ad5185320653eaa78eee
[ "Apache-2.0" ]
null
null
null
from datetime import timedelta, datetime # noinspection PyPackageRequirements import airflow # noinspection PyPackageRequirements from airflow import DAG # noinspection PyPackageRequirements from airflow.operators.dummy_operator import DummyOperator # noinspection PyPackageRequirements from airflow.operators.python_op...
23.2
82
0.720159
from datetime import timedelta, datetime import airflow from airflow import DAG from airflow.operators.dummy_operator import DummyOperator from airflow.operators.python_operator import PythonOperator, BranchPythonOperator from airflow.utils.trigger_rule import TriggerRule args = { 'owner': 'Airflow', 's...
true
true
f71df6209d55d9883c908aef33562038a34b55fc
357
py
Python
lib/rm_comments.py
guilyx/rm-comments-cmakelists
c5a957a34258f7fca55dd67d1955f107fd94f8fe
[ "MIT" ]
null
null
null
lib/rm_comments.py
guilyx/rm-comments-cmakelists
c5a957a34258f7fca55dd67d1955f107fd94f8fe
[ "MIT" ]
null
null
null
lib/rm_comments.py
guilyx/rm-comments-cmakelists
c5a957a34258f7fca55dd67d1955f107fd94f8fe
[ "MIT" ]
null
null
null
import os def removeComments(filename): savedFile = filename.replace('.txt', 'Copy.txt') os.rename(filename, savedFile) with open(filename, 'w') as new_file: with open(savedFile) as old_file: for line in old_file: if '#' not in line and line != '\n': ...
32.454545
52
0.585434
import os def removeComments(filename): savedFile = filename.replace('.txt', 'Copy.txt') os.rename(filename, savedFile) with open(filename, 'w') as new_file: with open(savedFile) as old_file: for line in old_file: if '#' not in line and line != '\n': ...
true
true
f71df73df05965520b9d035dfb93c6e1edbf198b
18,641
py
Python
utils.py
HuangHaoyu1997/NRI
e0cd1ef5e168db19cd904eabfd369a65238b5d07
[ "MIT" ]
null
null
null
utils.py
HuangHaoyu1997/NRI
e0cd1ef5e168db19cd904eabfd369a65238b5d07
[ "MIT" ]
null
null
null
utils.py
HuangHaoyu1997/NRI
e0cd1ef5e168db19cd904eabfd369a65238b5d07
[ "MIT" ]
null
null
null
import numpy as np import torch from torch.utils.data.dataset import TensorDataset from torch.utils.data import DataLoader import torch.nn.functional as F from torch.autograd import Variable def my_softmax(input, axis=1): trans_input = input.transpose(axis, 0).contiguous() soft_max_1d = F.softmax(trans_input)...
38.674274
166
0.680006
import numpy as np import torch from torch.utils.data.dataset import TensorDataset from torch.utils.data import DataLoader import torch.nn.functional as F from torch.autograd import Variable def my_softmax(input, axis=1): trans_input = input.transpose(axis, 0).contiguous() soft_max_1d = F.softmax(trans_input)...
true
true
f71df7c676dc8d0d33a3040c13da04d04f4cf920
3,150
py
Python
app/users/forms.py
Naomi-sigu/Job-Search
71170bd444e666d590c856de5913aea22ae9874e
[ "MIT" ]
1
2019-09-28T07:07:47.000Z
2019-09-28T07:07:47.000Z
app/users/forms.py
Naomi-sigu/Job-Search
71170bd444e666d590c856de5913aea22ae9874e
[ "MIT" ]
3
2021-06-08T20:25:15.000Z
2022-03-12T00:00:03.000Z
app/users/forms.py
Naomi-sigu/Job-Search
71170bd444e666d590c856de5913aea22ae9874e
[ "MIT" ]
3
2019-09-27T05:28:26.000Z
2019-09-27T05:47:02.000Z
from flask_wtf import FlaskForm from flask_wtf.file import FileField, FileAllowed from wtforms import StringField, PasswordField, SubmitField, BooleanField, TextAreaField from wtforms.validators import DataRequired, Length, Email, EqualTo, ValidationError, Optional, URL from flask_login import current_user from app.mod...
47.727273
106
0.691746
from flask_wtf import FlaskForm from flask_wtf.file import FileField, FileAllowed from wtforms import StringField, PasswordField, SubmitField, BooleanField, TextAreaField from wtforms.validators import DataRequired, Length, Email, EqualTo, ValidationError, Optional, URL from flask_login import current_user from app.mod...
true
true
f71df83dc8a96664ad6db8eee0fc2a0388ad93d9
3,614
py
Python
pdbdy.py
IMULMUL/shadow
910af255030274e65fae16ca164f5eb4c0103a8c
[ "BSD-3-Clause" ]
430
2015-06-15T16:22:45.000Z
2022-02-23T09:54:56.000Z
pdbdy.py
IMULMUL/shadow
910af255030274e65fae16ca164f5eb4c0103a8c
[ "BSD-3-Clause" ]
18
2016-11-26T21:49:20.000Z
2021-11-12T03:06:11.000Z
pdbdy.py
IMULMUL/shadow
910af255030274e65fae16ca164f5eb4c0103a8c
[ "BSD-3-Clause" ]
79
2015-06-24T19:42:13.000Z
2021-08-07T17:15:58.000Z
# shadow - De Mysteriis Dom jemalloc import os import sys import argparse import pickle import comtypes import comtypes.client import symbol # this has to be before the import that follows msdia = comtypes.client.GetModule('msdia\\msdia90.dll') from comtypes.gen.Dia2Lib import * # https://msdn.microsoft.com/en-us/...
28.234375
101
0.641671
import os import sys import argparse import pickle import comtypes import comtypes.client import symbol msdia = comtypes.client.GetModule('msdia\\msdia90.dll') from comtypes.gen.Dia2Lib import * udtEnumToStr = ('struct', 'class', 'union', 'interface') def getDIAObj(): global msdia try: dia = ...
false
true
f71df863772cbaeea64ea15afb3a451be08330d9
6,151
py
Python
tensorflow/python/compat/compat.py
craymichael/tensorflow
b5de565c9c57fa7ca02d42bcfe6f470ecf117ba5
[ "Apache-2.0" ]
1
2016-10-05T18:58:20.000Z
2016-10-05T18:58:20.000Z
tensorflow/python/compat/compat.py
craymichael/tensorflow
b5de565c9c57fa7ca02d42bcfe6f470ecf117ba5
[ "Apache-2.0" ]
null
null
null
tensorflow/python/compat/compat.py
craymichael/tensorflow
b5de565c9c57fa7ca02d42bcfe6f470ecf117ba5
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
35.554913
82
0.745895
from __future__ import absolute_import from __future__ import division from __future__ import print_function import datetime import os from tensorflow.python.platform import tf_logging as logging from tensorflow.python.util import tf_contextlib from tensorflow.python.util.tf_export import tf_export ...
true
true
f71dfacd1da249a951dc3ac3e95f73b12974cef7
806
py
Python
algorithms/897. Increasing Order Search Tree.py
woozway/py3-leetcode
e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf
[ "MIT" ]
1
2020-12-02T13:54:30.000Z
2020-12-02T13:54:30.000Z
algorithms/897. Increasing Order Search Tree.py
woozway/py3-leetcode
e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf
[ "MIT" ]
null
null
null
algorithms/897. Increasing Order Search Tree.py
woozway/py3-leetcode
e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf
[ "MIT" ]
null
null
null
""" 1. Clarification 2. Possible solutions - In-Order Traversal 3. Coding 4. Tests """ # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right # T=O(n), S=O(n) class Solution: ...
23.028571
56
0.565757
class Solution: def increasingBST(self, root: TreeNode) -> TreeNode: if not root: return None self.ans, self.cur = None, None self.dfs(root) return self.ans def dfs(self, node): if not node: return self.dfs(node.left) if not self.cur: ...
true
true
f71dfb1af77b347178a2e8e81e8a59a5a5eb3591
5,296
py
Python
pegaflow/service/server.py
polyactis/pegaflow
d30d0bbb501ccfbe0ead6c950946a14d4b6c4708
[ "Apache-2.0" ]
null
null
null
pegaflow/service/server.py
polyactis/pegaflow
d30d0bbb501ccfbe0ead6c950946a14d4b6c4708
[ "Apache-2.0" ]
null
null
null
pegaflow/service/server.py
polyactis/pegaflow
d30d0bbb501ccfbe0ead6c950946a14d4b6c4708
[ "Apache-2.0" ]
null
null
null
import logging import os import random import click import flask from OpenSSL import crypto from pegaflow.service import cache from pegaflow.service._encoder import PegasusJsonEncoder from pegaflow.service.base import BooleanConverter from pegaflow.service.filters import register_jinja2_filters from pegaflow.service....
25.708738
84
0.679569
import logging import os import random import click import flask from OpenSSL import crypto from pegaflow.service import cache from pegaflow.service._encoder import PegasusJsonEncoder from pegaflow.service.base import BooleanConverter from pegaflow.service.filters import register_jinja2_filters from pegaflow.service....
true
true
f71dfbaeac1fbc882ae16f2bdf6a603281da54bd
498
py
Python
Florence/Base/FlorenceExceptions.py
jdlaubrie/florence
830dca4a34be00d6e53cbec3007c10d438b27f57
[ "MIT" ]
65
2017-08-04T10:21:13.000Z
2022-02-21T21:45:09.000Z
Florence/Base/FlorenceExceptions.py
jdlaubrie/florence
830dca4a34be00d6e53cbec3007c10d438b27f57
[ "MIT" ]
6
2018-06-03T02:29:20.000Z
2022-01-18T02:30:22.000Z
Florence/Base/FlorenceExceptions.py
jdlaubrie/florence
830dca4a34be00d6e53cbec3007c10d438b27f57
[ "MIT" ]
10
2018-05-30T09:44:10.000Z
2021-05-18T08:06:51.000Z
class JacobianError(ArithmeticError): def __init__(self,value=None): self.value = value def __str__(self): if self.value is None: self.value = 'Jacobian of mapping is close to zero' return repr(self.value) class IllConditionedError(ArithmeticError): def __init__(self,...
29.294118
63
0.638554
class JacobianError(ArithmeticError): def __init__(self,value=None): self.value = value def __str__(self): if self.value is None: self.value = 'Jacobian of mapping is close to zero' return repr(self.value) class IllConditionedError(ArithmeticError): def __init__(self,...
true
true
f71dfbd89edc1b8d4a1b4250915832240e109b26
308
py
Python
dian/account/urls.py
deggs7/dian-server
7157831b50cb246a36fc7cd971e346e21747aafc
[ "MIT" ]
null
null
null
dian/account/urls.py
deggs7/dian-server
7157831b50cb246a36fc7cd971e346e21747aafc
[ "MIT" ]
3
2016-10-04T09:57:44.000Z
2016-10-04T09:58:22.000Z
dian/account/urls.py
diankuai/dian-server
7157831b50cb246a36fc7cd971e346e21747aafc
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import patterns, url from account import views urlpatterns = patterns( 'account.views', url(r'^my-account/$', 'get_my_account'), url(r'^password/$', 'change_passwd'), url(r'^create-seed-user/$', 'create_seed_user'), )
18.117647
52
0.646104
from django.conf.urls import patterns, url from account import views urlpatterns = patterns( 'account.views', url(r'^my-account/$', 'get_my_account'), url(r'^password/$', 'change_passwd'), url(r'^create-seed-user/$', 'create_seed_user'), )
true
true
f71dfc096f23a3013d8dd1da61ec8cc371c0943e
509
py
Python
wsgi.py
zackmdavis/Finetooth
2bccd96454da3e968620a5f00704352b0bafc423
[ "MIT" ]
null
null
null
wsgi.py
zackmdavis/Finetooth
2bccd96454da3e968620a5f00704352b0bafc423
[ "MIT" ]
29
2015-02-21T17:58:31.000Z
2021-06-10T17:26:52.000Z
wsgi.py
zackmdavis/Finetooth
2bccd96454da3e968620a5f00704352b0bafc423
[ "MIT" ]
null
null
null
""" WSGI config for Finetooth project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.wsgi imp...
25.45
78
0.768173
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.wsgi import get_wsgi_application if os.path.exists(".development"): application = get_wsgi_application() else: from dj_static import Cling application = Cling(get_wsgi_application())
true
true
f71dfc4303c4b86898c4c47fba2c4bb6f72c3a23
98
py
Python
som_keras/__init__.py
dmg99/som_keras
f6a1e60025976969100f041392b2c015dee49867
[ "MIT" ]
2
2020-11-04T16:33:40.000Z
2022-01-21T16:37:25.000Z
som_keras/__init__.py
dmg99/som_keras
f6a1e60025976969100f041392b2c015dee49867
[ "MIT" ]
null
null
null
som_keras/__init__.py
dmg99/som_keras
f6a1e60025976969100f041392b2c015dee49867
[ "MIT" ]
null
null
null
from . import SOM from . import classification from . import visualizations from . import metrics
19.6
28
0.795918
from . import SOM from . import classification from . import visualizations from . import metrics
true
true
f71dfde9813a6fb70d9eab236e2ed86bc5c3ea30
850
py
Python
04_lists/18_sorting.py
r7asmu7s/art_of_doing_python
62a03bcca084046c319976fc308bf3de3a2d412d
[ "Unlicense" ]
null
null
null
04_lists/18_sorting.py
r7asmu7s/art_of_doing_python
62a03bcca084046c319976fc308bf3de3a2d412d
[ "Unlicense" ]
null
null
null
04_lists/18_sorting.py
r7asmu7s/art_of_doing_python
62a03bcca084046c319976fc308bf3de3a2d412d
[ "Unlicense" ]
null
null
null
sports = ['baseball', 'golf', 'soccer', 'football'] print(sports) # sorted() function does only make changes temporarily print(sorted(sports)) print(sports) print(sorted(sports, reverse=True)) print(sports) grades = [88, 74, 95, 100, 92] print(grades) print(sorted(grades)) print(sorted(grades, reverse=True)) print(gr...
20.731707
81
0.749412
sports = ['baseball', 'golf', 'soccer', 'football'] print(sports) print(sorted(sports)) print(sports) print(sorted(sports, reverse=True)) print(sports) grades = [88, 74, 95, 100, 92] print(grades) print(sorted(grades)) print(sorted(grades, reverse=True)) print(grades) grade_length = len(grades) print(grade_lengt...
true
true
f71dff6822d33fc781ff7e65fb3b058730088c2a
1,444
py
Python
modules/quiz/forms.py
Maurilearn/learnings
0af03e5646c9053b3cfc27465983ce466ad2f3cb
[ "MIT" ]
null
null
null
modules/quiz/forms.py
Maurilearn/learnings
0af03e5646c9053b3cfc27465983ce466ad2f3cb
[ "MIT" ]
null
null
null
modules/quiz/forms.py
Maurilearn/learnings
0af03e5646c9053b3cfc27465983ce466ad2f3cb
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField from wtforms import TextField from wtforms.fields.html5 import EmailField from wtforms import SubmitField from wtforms import PasswordField from wtforms.validators import DataRequired from wtforms.validators import Length from wtforms.validators import Ema...
29.469388
67
0.639197
from flask_wtf import FlaskForm from wtforms import StringField from wtforms import TextField from wtforms.fields.html5 import EmailField from wtforms import SubmitField from wtforms import PasswordField from wtforms.validators import DataRequired from wtforms.validators import Length from wtforms.validators import Ema...
true
true
f71dffa6529171c4e2470ba732c219ee2f6670fd
35,903
py
Python
tests/checkpoint/test_simple_checkpoint.py
cbonilla20/great_expectations
e4f8c70ce1b137133e19eb73589fb1b1f422a380
[ "Apache-2.0" ]
6,451
2017-09-11T16:32:53.000Z
2022-03-31T23:27:49.000Z
tests/checkpoint/test_simple_checkpoint.py
chsigjan/great_expectations
c5a587a3b1bc5d72d433950aaceb4d09f199690a
[ "Apache-2.0" ]
3,892
2017-09-08T18:57:50.000Z
2022-03-31T23:15:20.000Z
tests/checkpoint/test_simple_checkpoint.py
chsigjan/great_expectations
c5a587a3b1bc5d72d433950aaceb4d09f199690a
[ "Apache-2.0" ]
1,023
2017-09-08T15:22:05.000Z
2022-03-31T21:17:08.000Z
from unittest.mock import patch import pytest import great_expectations.exceptions as ge_exceptions from great_expectations import DataContext from great_expectations.checkpoint import SimpleCheckpointConfigurator from great_expectations.checkpoint.checkpoint import ( Checkpoint, CheckpointResult, SimpleC...
36.785861
141
0.682088
from unittest.mock import patch import pytest import great_expectations.exceptions as ge_exceptions from great_expectations import DataContext from great_expectations.checkpoint import SimpleCheckpointConfigurator from great_expectations.checkpoint.checkpoint import ( Checkpoint, CheckpointResult, SimpleC...
true
true
f71dffb01da5be689dd5a395fa5f3d98ff914e8b
536
py
Python
leetCode/algorithms/medium/print_foobar_alternately.py
ferhatelmas/algo
a7149c7a605708bc01a5cd30bf5455644cefd04d
[ "WTFPL" ]
25
2015-01-21T16:39:18.000Z
2021-05-24T07:01:24.000Z
leetCode/algorithms/medium/print_foobar_alternately.py
gauravsingh58/algo
397859a53429e7a585e5f6964ad24146c6261326
[ "WTFPL" ]
2
2020-09-30T19:39:36.000Z
2020-10-01T17:15:16.000Z
leetCode/algorithms/medium/print_foobar_alternately.py
ferhatelmas/algo
a7149c7a605708bc01a5cd30bf5455644cefd04d
[ "WTFPL" ]
15
2015-01-21T16:39:27.000Z
2020-10-01T17:00:22.000Z
from threading import Lock class FooBar: def __init__(self, n): self.n = n self.lock1 = Lock() self.lock2 = Lock() self.lock2.acquire() def foo(self, printFoo: "Callable[[], None]") -> None: for _ in range(self.n): self.lock1.acquire() printFoo(...
24.363636
58
0.518657
from threading import Lock class FooBar: def __init__(self, n): self.n = n self.lock1 = Lock() self.lock2 = Lock() self.lock2.acquire() def foo(self, printFoo: "Callable[[], None]") -> None: for _ in range(self.n): self.lock1.acquire() printFoo(...
true
true
f71dffe042d519807bb94e8a66e0077a2ed3f78f
2,415
py
Python
GraphDegeneracy.py
skytreader/pads
3b5011b6725810ff73ad376b1589d7510c156b1c
[ "MIT" ]
3
2021-09-14T02:05:28.000Z
2021-11-14T17:05:44.000Z
GraphDegeneracy.py
skytreader/pads
3b5011b6725810ff73ad376b1589d7510c156b1c
[ "MIT" ]
null
null
null
GraphDegeneracy.py
skytreader/pads
3b5011b6725810ff73ad376b1589d7510c156b1c
[ "MIT" ]
null
null
null
"""GraphDegeneracy.py Compute the degeneracy of graphs, and degeneracy orderings of graphs. D. Eppstein, July 2016. """ import unittest from Graphs import isUndirected from BucketQueue import BucketQueue def degeneracySequence(G): """Generate pairs (vertex,number of later neighbors) in degeneracy order.""" ...
31.776316
80
0.578882
import unittest from Graphs import isUndirected from BucketQueue import BucketQueue def degeneracySequence(G): if not isUndirected(G): raise TypeError("Graph must be undirected") Q = BucketQueue() for v in G: Q[v] = len(G[v]) for v,d in Q.items(): yield v,d ...
true
true
f71e00f3db6a72d74385d12d183fbf8fd6b0a6d2
816
py
Python
spark_auto_mapper_fhir/value_sets/v2_0178.py
imranq2/SparkAutoMapper.FHIR
dd23b218fb0097d1edc2f3e688e8d6d4d7278bd2
[ "Apache-2.0" ]
1
2020-10-31T23:25:07.000Z
2020-10-31T23:25:07.000Z
spark_auto_mapper_fhir/value_sets/v2_0178.py
icanbwell/SparkAutoMapper.FHIR
98f368e781b46523142c7cb513c670d659a93c9b
[ "Apache-2.0" ]
null
null
null
spark_auto_mapper_fhir/value_sets/v2_0178.py
icanbwell/SparkAutoMapper.FHIR
98f368e781b46523142c7cb513c670d659a93c9b
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations from spark_auto_mapper_fhir.fhir_types.uri import FhirUri from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType # This file is auto-generated by generate_classes so do not edi...
31.384615
86
0.756127
from __future__ import annotations from spark_auto_mapper_fhir.fhir_types.uri import FhirUri from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType class V2_0178(GenericTypeCode): def __init__(self, value...
true
true
f71e010012f044722955c0170d63a67b154875fd
4,401
py
Python
hummingbot/client/config/config_validators.py
withshubh/hummingbot
8af7b6b6a4d482c8418f293f1ebd4d0d6a86eff5
[ "Apache-2.0" ]
37
2020-07-08T03:44:26.000Z
2022-01-16T12:35:26.000Z
hummingbot/client/config/config_validators.py
svamol/hummingbot
03c6ab488cca620f622c432a5a09a40cd854e475
[ "Apache-2.0" ]
3
2021-04-13T10:40:05.000Z
2021-05-09T16:15:42.000Z
hummingbot/client/config/config_validators.py
svamol/hummingbot
03c6ab488cca620f622c432a5a09a40cd854e475
[ "Apache-2.0" ]
17
2021-04-07T21:29:46.000Z
2022-02-03T02:01:04.000Z
from decimal import Decimal from typing import Optional # Validators def validate_exchange(value: str) -> Optional[str]: from hummingbot.client.settings import EXCHANGES if value not in EXCHANGES: return f"Invalid exchange, please choose value from {EXCHANGES}" def validate_derivative(value: str) ->...
47.322581
120
0.684163
from decimal import Decimal from typing import Optional def validate_exchange(value: str) -> Optional[str]: from hummingbot.client.settings import EXCHANGES if value not in EXCHANGES: return f"Invalid exchange, please choose value from {EXCHANGES}" def validate_derivative(value: str) -> Optional[st...
true
true
f71e014b970b1ad7cd48e6ece7ed389083c5749d
1,568
py
Python
crypt0/base/hash.py
Crypto0/Crypt0Lib-V1
9ea367cd4467222542a88c45c0a92be78158cceb
[ "MIT" ]
2
2018-10-09T18:10:23.000Z
2018-10-09T18:56:21.000Z
crypt0/base/hash.py
Crypto0/Crypt0Lib-V1
9ea367cd4467222542a88c45c0a92be78158cceb
[ "MIT" ]
null
null
null
crypt0/base/hash.py
Crypto0/Crypt0Lib-V1
9ea367cd4467222542a88c45c0a92be78158cceb
[ "MIT" ]
null
null
null
import hashlib,time,sys def hash(hashType,userHash,wordlist): if hashType == "md5" or hashType == "MD5": h = hashlib.md5 elif hashType == "sha1" or hashType == "SHA1": h = hashlib.sha1 elif hashType == "sha224" or hashType == "SHA224": h = hashlib.sha224 ...
42.378378
112
0.49426
import hashlib,time,sys def hash(hashType,userHash,wordlist): if hashType == "md5" or hashType == "MD5": h = hashlib.md5 elif hashType == "sha1" or hashType == "SHA1": h = hashlib.sha1 elif hashType == "sha224" or hashType == "SHA224": h = hashlib.sha224 ...
true
true
f71e0156583dd0c3994a0e97c1ded6e7fadec7e7
6,964
py
Python
anytask/courses/pythontask.py
hariton27sy/anytask
b734985ad7e8e884edbea3fab1a5cf5c86210b68
[ "MIT" ]
null
null
null
anytask/courses/pythontask.py
hariton27sy/anytask
b734985ad7e8e884edbea3fab1a5cf5c86210b68
[ "MIT" ]
null
null
null
anytask/courses/pythontask.py
hariton27sy/anytask
b734985ad7e8e884edbea3fab1a5cf5c86210b68
[ "MIT" ]
1
2020-05-07T15:51:21.000Z
2020-05-07T15:51:21.000Z
from tasks.models import Task, TaskTaken from issues.models import Issue from django.conf import settings from django.db.models import Q from django.db import transaction from django.shortcuts import render_to_response, get_object_or_404, redirect from django.contrib.auth.decorators import login_required from django.t...
34.994975
115
0.652068
from tasks.models import Task, TaskTaken from issues.models import Issue from django.conf import settings from django.db.models import Q from django.db import transaction from django.shortcuts import render_to_response, get_object_or_404, redirect from django.contrib.auth.decorators import login_required from django.t...
true
true
f71e028eb65130eb4b7081cc53d9c71b60ee649c
1,342
py
Python
app/core/tests/test_models.py
adelvanL/recipe-app-api
3977f961786a4b677259bdf90bbb37281cbc43c0
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
adelvanL/recipe-app-api
3977f961786a4b677259bdf90bbb37281cbc43c0
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
adelvanL/recipe-app-api
3977f961786a4b677259bdf90bbb37281cbc43c0
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTests(TestCase): def test_create_user_with_email_successful(self): """Test creating a new user with an email is sucessful""" email = "test@respposta.com" password = "Test@123" user = get_us...
30.5
70
0.64456
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTests(TestCase): def test_create_user_with_email_successful(self): email = "test@respposta.com" password = "Test@123" user = get_user_model().objects.create_user( email=email, ...
true
true
f71e032f516a353dced53594bb69eb1b3b7aaa53
8,685
py
Python
chemdataextractor/scrape/clean.py
materialsintelligence/deprecated-cde-selfcontained-nodawg
f899d64c7e09be1b56cd1d90ba34b86b4270e78a
[ "MIT" ]
199
2016-10-07T06:55:23.000Z
2022-03-29T09:50:03.000Z
chemdataextractor/scrape/clean.py
qingtong00/ChemDataExtractor
349a3bea965f2073141d62043b89319222e46af1
[ "MIT" ]
29
2016-10-04T08:56:05.000Z
2022-03-06T19:36:55.000Z
chemdataextractor/scrape/clean.py
qingtong00/ChemDataExtractor
349a3bea965f2073141d62043b89319222e46af1
[ "MIT" ]
95
2016-10-10T14:24:27.000Z
2022-03-16T18:30:00.000Z
# -*- coding: utf-8 -*- """ chemdataextractor.scrape.clean ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tools for cleaning up XML/HTML by removing tags entirely or replacing with their contents. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import ...
41.956522
120
0.591019
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import copy import logging import re from lxml.etree import fromstring, tostring from lxml.html import fromstring as html_fromstring import six from . import BLOCK_ELEM...
true
true
f71e041b4adf8e3e90f5927ee502d16b93e75667
2,197
py
Python
private/scripts/extras/parallel.py
earora97/stopstalk-deployment
777c3e622bf1efdc1ba3b4b43f70008d48ec71aa
[ "MIT" ]
342
2016-01-05T21:22:15.000Z
2022-03-28T20:05:45.000Z
private/scripts/extras/parallel.py
earora97/stopstalk-deployment
777c3e622bf1efdc1ba3b4b43f70008d48ec71aa
[ "MIT" ]
374
2015-12-25T05:38:28.000Z
2022-03-03T05:03:36.000Z
private/scripts/extras/parallel.py
earora97/stopstalk-deployment
777c3e622bf1efdc1ba3b4b43f70008d48ec71aa
[ "MIT" ]
131
2016-03-30T09:13:35.000Z
2022-01-24T10:30:18.000Z
""" Copyright (c) 2015-2020 Raj Patel(raj454raj@gmail.com), StopStalk Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
34.873016
163
0.695949
""" Copyright (c) 2015-2020 Raj Patel(raj454raj@gmail.com), StopStalk Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
false
true
f71e045da49e0516e6f92e87647ff790d1d8f98a
4,525
py
Python
tasks/tests/test_views.py
kanz84/issue-manager
d31233b63a4d7acedef43619a71d78053ff93156
[ "MIT" ]
null
null
null
tasks/tests/test_views.py
kanz84/issue-manager
d31233b63a4d7acedef43619a71d78053ff93156
[ "MIT" ]
null
null
null
tasks/tests/test_views.py
kanz84/issue-manager
d31233b63a4d7acedef43619a71d78053ff93156
[ "MIT" ]
null
null
null
from django.urls import reverse from rest_framework import status from rest_framework.test import APITestCase from tasks.enums import TaskStatusEnum from tasks.models import Task from tasks.tests.factories import UserFactory, TaskFactory class TaskViewSetTestCase(APITestCase): @classmethod def setUpTestData(...
41.136364
107
0.673591
from django.urls import reverse from rest_framework import status from rest_framework.test import APITestCase from tasks.enums import TaskStatusEnum from tasks.models import Task from tasks.tests.factories import UserFactory, TaskFactory class TaskViewSetTestCase(APITestCase): @classmethod def setUpTestData(...
true
true
f71e053c757c7e039e6b515037e8138a52eb19ad
887
py
Python
utils/device.py
atranitell/TensorGate
855ae0c69a706c179c26ba4a75a8067a514285fe
[ "Apache-2.0" ]
null
null
null
utils/device.py
atranitell/TensorGate
855ae0c69a706c179c26ba4a75a8067a514285fe
[ "Apache-2.0" ]
null
null
null
utils/device.py
atranitell/TensorGate
855ae0c69a706c179c26ba4a75a8067a514285fe
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The KaiJIN Authors. All Rights Reserved. # # 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 ...
36.958333
80
0.689966
from tensorflow.python.client import device_lib def showing_avaliable_device(): for x in device_lib.list_local_devices(): print(x)
true
true
f71e06acfa22e39e7bfe97135b5bd5714a6b2302
2,324
py
Python
networkx/algorithms/tests/test_bridges.py
jmmcd/networkx
207ff7d1e9bfaff013ac77c8d6bb79619892c994
[ "BSD-3-Clause" ]
1
2020-08-08T21:52:34.000Z
2020-08-08T21:52:34.000Z
networkx/algorithms/tests/test_bridges.py
jmmcd/networkx
207ff7d1e9bfaff013ac77c8d6bb79619892c994
[ "BSD-3-Clause" ]
2
2019-11-13T03:48:53.000Z
2021-02-15T16:52:09.000Z
networkx/algorithms/tests/test_bridges.py
jmmcd/networkx
207ff7d1e9bfaff013ac77c8d6bb79619892c994
[ "BSD-3-Clause" ]
null
null
null
# test_bridges.py - unit tests for bridge-finding algorithms # # Copyright 2004-2019 NetworkX developers. # # This file is part of NetworkX. # # NetworkX is distributed under a BSD license; see LICENSE.txt for more # information. """Unit tests for bridge-finding algorithms.""" import networkx as nx class TestBridges...
32.277778
87
0.575731
import networkx as nx class TestBridges: def test_single_bridge(self): edges = [ (1, 2), (2, 3), (3, 4), (3, 5), (5, 6), (6, 7), (7, 8), (5, 9), (9, 10), (1, 3), (1, 4), (2, 5), (5, 10), (6, 8) ] G = nx.Graph(edges) ...
true
true
f71e075eaaed40df7b85f6e5a476d987e2992291
99,049
py
Python
src/transformers/__init__.py
reichang182/Transformer
301536b15f1e757c51411800c25876617e9f1191
[ "Apache-2.0" ]
1
2021-08-02T14:22:01.000Z
2021-08-02T14:22:01.000Z
src/transformers/__init__.py
slavetothebiologicalforce/transformers
6f90c29eaaba898919b7689ab7e2cfce1604cdb8
[ "Apache-2.0" ]
null
null
null
src/transformers/__init__.py
slavetothebiologicalforce/transformers
6f90c29eaaba898919b7689ab7e2cfce1604cdb8
[ "Apache-2.0" ]
null
null
null
# flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all. # Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
38.540467
119
0.66243
# module, but to preserve other warnings. So, don't check this module at all. __version__ = "4.6.0.dev0" # default Python logging output behavior when present. # see: https://github.com/abseil/abseil-py/issues/99 # and: https://github.com/tensorflow/tensorflow/issues/26691#issuecomment-50036949...
true
true
f71e07df46a6343270e73af46c0fd66d91b2a5c8
11,601
py
Python
smartsheet/sights.py
bromic007/smartsheet-python-sdk
ef256b7421a65a56a7138dc2b3eb5d69a1a06590
[ "Apache-2.0" ]
106
2015-02-21T14:26:32.000Z
2022-03-31T05:56:53.000Z
smartsheet/sights.py
bromic007/smartsheet-python-sdk
ef256b7421a65a56a7138dc2b3eb5d69a1a06590
[ "Apache-2.0" ]
94
2015-02-09T13:16:00.000Z
2022-03-16T06:37:41.000Z
smartsheet/sights.py
bromic007/smartsheet-python-sdk
ef256b7421a65a56a7138dc2b3eb5d69a1a06590
[ "Apache-2.0" ]
85
2015-02-06T22:05:25.000Z
2022-03-16T06:22:59.000Z
# pylint: disable=C0111,R0902,R0913 # Smartsheet Python SDK. # # Copyright 2017 Smartsheet.com, Inc. # # 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/LICE...
31.870879
79
0.594259
import logging from . import fresh_operation from datetime import datetime class Sights(object): def __init__(self, smartsheet_obj): self._base = smartsheet_obj self._log = logging.getLogger(__name__) def list_sights(self, page_size=None, page=None, incl...
true
true
f71e084c0beb0fbe683824c90590846603386172
4,113
py
Python
alipay/aop/api/request/AlipayMarketingCashlessvoucherTemplateModifyRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayMarketingCashlessvoucherTemplateModifyRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayMarketingCashlessvoucherTemplateModifyRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayMarketingCashlessvoucherTemplateModifyModel import AlipayMarketingCashlessvoucherTemplateModifyModel class Alipa...
28.365517
166
0.654996
import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayMarketingCashlessvoucherTemplateModifyModel import AlipayMarketingCashlessvoucherTemplateModifyModel class AlipayMarketingCashlessvoucherTemplateModifyReque...
true
true
f71e08a94e9f047dfa54cd7ce41c674a5cd1f8bd
15,999
py
Python
game.py
theDrinkMD/twibbage
c0aba60bd2df50f0a5688db4a01048ea1efd1a45
[ "MIT" ]
null
null
null
game.py
theDrinkMD/twibbage
c0aba60bd2df50f0a5688db4a01048ea1efd1a45
[ "MIT" ]
null
null
null
game.py
theDrinkMD/twibbage
c0aba60bd2df50f0a5688db4a01048ea1efd1a45
[ "MIT" ]
null
null
null
from flask import Flask, request from twilio.twiml.messaging_response import MessagingResponse from gameIdGenerator import createNewGameId from models import Game, Player, Player_Answers, Question from flask_sqlalchemy import SQLAlchemy from datetime import datetime import dbManager import logging import gameManager im...
59.475836
198
0.586349
from flask import Flask, request from twilio.twiml.messaging_response import MessagingResponse from gameIdGenerator import createNewGameId from models import Game, Player, Player_Answers, Question from flask_sqlalchemy import SQLAlchemy from datetime import datetime import dbManager import logging import gameManager im...
true
true
f71e08b870a9f5ce84946e6c88096ad74de04bfa
478
py
Python
lectures/07-python-dictionaries/examples/dna9.py
mattmiller899/biosys-analytics
ab24a4c7206ed9a865e896daa57cee3c4e62df1f
[ "MIT" ]
4
2019-01-10T17:12:37.000Z
2019-03-01T18:25:07.000Z
lectures/07-python-dictionaries/examples/dna9.py
mattmiller899/biosys-analytics
ab24a4c7206ed9a865e896daa57cee3c4e62df1f
[ "MIT" ]
null
null
null
lectures/07-python-dictionaries/examples/dna9.py
mattmiller899/biosys-analytics
ab24a4c7206ed9a865e896daa57cee3c4e62df1f
[ "MIT" ]
33
2019-01-05T17:03:47.000Z
2019-11-11T20:48:24.000Z
#!/usr/bin/env python3 """Tetra-nucleotide counter""" import sys import os from collections import defaultdict args = sys.argv[1:] if len(args) != 1: print('Usage: {} DNA'.format(os.path.basename(sys.argv[0]))) sys.exit(1) arg = args[0] dna = '' if os.path.isfile(arg): dna = ''.join(open(arg).read().spl...
18.384615
64
0.631799
import sys import os from collections import defaultdict args = sys.argv[1:] if len(args) != 1: print('Usage: {} DNA'.format(os.path.basename(sys.argv[0]))) sys.exit(1) arg = args[0] dna = '' if os.path.isfile(arg): dna = ''.join(open(arg).read().splitlines()) else: dna = arg count = defaultdict(i...
true
true
f71e096d2762faf84d33b6662ba06af6325fa085
27,311
py
Python
manim/mobject/opengl_geometry.py
aburousan/manim
c11b649e9aed34976844e6a131fb12e2a30c7bc8
[ "MIT" ]
null
null
null
manim/mobject/opengl_geometry.py
aburousan/manim
c11b649e9aed34976844e6a131fb12e2a30c7bc8
[ "MIT" ]
null
null
null
manim/mobject/opengl_geometry.py
aburousan/manim
c11b649e9aed34976844e6a131fb12e2a30c7bc8
[ "MIT" ]
null
null
null
import numpy as np from .. import logger from ..constants import * from ..mobject.mobject import Mobject from ..mobject.types.opengl_vectorized_mobject import ( OpenGLDashedVMobject, OpenGLVGroup, OpenGLVMobject, ) from ..utils.color import * from ..utils.deprecation import deprecated_params from ..utils.i...
31.500577
86
0.605763
import numpy as np from .. import logger from ..constants import * from ..mobject.mobject import Mobject from ..mobject.types.opengl_vectorized_mobject import ( OpenGLDashedVMobject, OpenGLVGroup, OpenGLVMobject, ) from ..utils.color import * from ..utils.deprecation import deprecated_params from ..utils.i...
true
true
f71e0a0f2fef42ba94ade2220af369468d3d68cb
2,781
py
Python
source/sagemaker/data-preparation/data_prep.py
awslabs/sagemaker-graph-entity-resolution
74bfb3f782843623c5bcbec833e9deec448c3a51
[ "Apache-2.0" ]
8
2020-12-08T22:52:45.000Z
2022-02-21T19:36:56.000Z
source/sagemaker/data-preparation/data_prep.py
awslabs/sagemaker-graph-entity-resolution
74bfb3f782843623c5bcbec833e9deec448c3a51
[ "Apache-2.0" ]
null
null
null
source/sagemaker/data-preparation/data_prep.py
awslabs/sagemaker-graph-entity-resolution
74bfb3f782843623c5bcbec833e9deec448c3a51
[ "Apache-2.0" ]
2
2021-09-19T20:46:32.000Z
2022-02-21T19:37:11.000Z
import argparse import logging import os import json import pandas as pd def get_logger(name): logger = logging.getLogger(name) log_format = '%(asctime)s %(levelname)s %(name)s: %(message)s' logging.basicConfig(format=log_format, level=logging.INFO) logger.setLevel(logging.INFO) return logger de...
47.948276
118
0.699029
import argparse import logging import os import json import pandas as pd def get_logger(name): logger = logging.getLogger(name) log_format = '%(asctime)s %(levelname)s %(name)s: %(message)s' logging.basicConfig(format=log_format, level=logging.INFO) logger.setLevel(logging.INFO) return logger de...
true
true
f71e0b1a4419edda57e214d8e61d25ce51473ba2
3,780
py
Python
gym_extensions/continuous/mujoco/reacher_contextual.py
vBarbaros/gym-extensions
f17058459b36756cd9bb0877689ab29a729e9dd0
[ "MIT" ]
1
2018-06-06T21:30:49.000Z
2018-06-06T21:30:49.000Z
gym_extensions/continuous/mujoco/reacher_contextual.py
vBarbaros/gym-extensions
f17058459b36756cd9bb0877689ab29a729e9dd0
[ "MIT" ]
null
null
null
gym_extensions/continuous/mujoco/reacher_contextual.py
vBarbaros/gym-extensions
f17058459b36756cd9bb0877689ab29a729e9dd0
[ "MIT" ]
1
2019-01-27T12:09:43.000Z
2019-01-27T12:09:43.000Z
PYTHONPATH = '~/Documents/gym-extensions/' import sys sys.path.append(PYTHONPATH) import numpy as np from gym import utils from gym.envs.mujoco import mujoco_env import os.path as osp from gym.envs.mujoco.reacher import ReacherEnv try: import mujoco_py from mujoco_py.mjlib import mjlib except ImportError as e:...
39.789474
178
0.646032
PYTHONPATH = '~/Documents/gym-extensions/' import sys sys.path.append(PYTHONPATH) import numpy as np from gym import utils from gym.envs.mujoco import mujoco_env import os.path as osp from gym.envs.mujoco.reacher import ReacherEnv try: import mujoco_py from mujoco_py.mjlib import mjlib except ImportError as e:...
false
true
f71e0cc0b2ded5e59f8e1dc4fc028c52b0ccfc1f
9,369
py
Python
tests/test_code_climate_formatting.py
yuriisk/clang-tidy-reformatter
2be23785e1f47b366320dd5375d3a24393a0661e
[ "MIT" ]
2
2021-11-12T09:40:19.000Z
2022-02-12T18:02:14.000Z
tests/test_code_climate_formatting.py
yuriisk/clang-tidy-reformatter
2be23785e1f47b366320dd5375d3a24393a0661e
[ "MIT" ]
null
null
null
tests/test_code_climate_formatting.py
yuriisk/clang-tidy-reformatter
2be23785e1f47b366320dd5375d3a24393a0661e
[ "MIT" ]
1
2021-10-04T11:51:40.000Z
2021-10-04T11:51:40.000Z
#!/usr/bin/env python3 import unittest import unittest.mock import json from clang_tidy_converter import CodeClimateFormatter, ClangMessage class CodeClimateFormatterTest(unittest.TestCase): def test_format(self): child1 = ClangMessage('/some/file/path1.cpp', 8, 10, ClangMessage.Level.NOTE, 'Allocated her...
39.868085
157
0.641904
import unittest import unittest.mock import json from clang_tidy_converter import CodeClimateFormatter, ClangMessage class CodeClimateFormatterTest(unittest.TestCase): def test_format(self): child1 = ClangMessage('/some/file/path1.cpp', 8, 10, ClangMessage.Level.NOTE, 'Allocated here', '', ['return new A...
true
true
f71e0d8e12f4533b0d8ccc6cecdc0f4b5899c521
18,554
py
Python
tests/formats/dataclass/parsers/nodes/test_element.py
pashashocky/xsdata
1cd681598d2235626d0e21716fc9fb885d26e351
[ "MIT" ]
null
null
null
tests/formats/dataclass/parsers/nodes/test_element.py
pashashocky/xsdata
1cd681598d2235626d0e21716fc9fb885d26e351
[ "MIT" ]
null
null
null
tests/formats/dataclass/parsers/nodes/test_element.py
pashashocky/xsdata
1cd681598d2235626d0e21716fc9fb885d26e351
[ "MIT" ]
null
null
null
import copy from dataclasses import make_dataclass from unittest import mock from tests.fixtures.books import Books from tests.fixtures.models import AttrsType from tests.fixtures.models import ExtendedListType from tests.fixtures.models import ExtendedType from tests.fixtures.models import FixedType from tests.fixtur...
37.182365
87
0.617926
import copy from dataclasses import make_dataclass from unittest import mock from tests.fixtures.books import Books from tests.fixtures.models import AttrsType from tests.fixtures.models import ExtendedListType from tests.fixtures.models import ExtendedType from tests.fixtures.models import FixedType from tests.fixtur...
true
true
f71e0df35e63fc94299cae74adce175b14ce46d5
1,249
py
Python
azure/mgmt/network/v2017_11_01/models/virtual_network_usage_name.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2017_11_01/models/virtual_network_usage_name.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2017_11_01/models/virtual_network_usage_name.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # C...
31.225
77
0.567654
from msrest.serialization import Model class VirtualNetworkUsageName(Model): _validation = { 'localized_value': {'readonly': True}, 'value': {'readonly': True}, } _attribute_map = { 'localized_value': {'key': 'localizedValue', 'type': 'str'}, 'valu...
true
true
f71e0e8918e2a9d56b2c7d803883124189453ab6
3,835
py
Python
demo-and-experimental-scripts/demo_predict_presynch_eT.py
ddarmon/transCSSR
8ed057eee70d2d50d14bc719c7850ac46a00e4d4
[ "Naumen", "Condor-1.1", "MS-PL" ]
12
2018-03-10T08:22:27.000Z
2022-02-19T19:56:31.000Z
demo-and-experimental-scripts/demo_predict_presynch_eT.py
ddarmon/transCSSR
8ed057eee70d2d50d14bc719c7850ac46a00e4d4
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2017-05-12T12:37:09.000Z
2017-05-20T19:04:47.000Z
demo-and-experimental-scripts/demo_predict_presynch_eT.py
ddarmon/transCSSR
8ed057eee70d2d50d14bc719c7850ac46a00e4d4
[ "Naumen", "Condor-1.1", "MS-PL" ]
10
2018-04-04T19:53:52.000Z
2022-02-19T19:56:25.000Z
import numpy import scipy.stats import itertools import copy import string import os from collections import Counter, defaultdict from filter_data_methods import * from igraph import * from transCSSR import * data_prefix = '' #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # # The various test transducers. Xt i...
29.960938
253
0.645893
import numpy import scipy.stats import itertools import copy import string import os from collections import Counter, defaultdict from filter_data_methods import * from igraph import * from transCSSR import * data_prefix = '' Xt_name = 'barnettX' Yt_name = 'barnettY' stringY = open('data/{}{}.da...
true
true
f71e0eafa25a709e07c82815a3949bc5f6c67b04
5,390
py
Python
vunit/simulator_factory.py
AdamSteenkamer/vunit
60b710619c3c7270e62a25ddb3f53091291217d2
[ "Artistic-2.0" ]
1
2018-10-08T18:01:41.000Z
2018-10-08T18:01:41.000Z
vunit/simulator_factory.py
AdamSteenkamer/vunit
60b710619c3c7270e62a25ddb3f53091291217d2
[ "Artistic-2.0" ]
null
null
null
vunit/simulator_factory.py
AdamSteenkamer/vunit
60b710619c3c7270e62a25ddb3f53091291217d2
[ "Artistic-2.0" ]
null
null
null
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (c) 2014-2018, Lars Asplund lars.anders.asplund@gmail.com """ Create simulator instances """ import os fr...
34.774194
113
0.605195
import os from vunit.modelsim_interface import ModelSimInterface from vunit.activehdl_interface import ActiveHDLInterface from vunit.rivierapro_interface import RivieraProInterface from vunit.ghdl_interface import GHDLInterface from vunit.incisive_interface import IncisiveInterface from vunit.simulator_interface...
true
true
f71e0faf9b628abe054c0f4ac9d1468f103bcb5f
410
py
Python
homework/pages/main_page.py
viaviare/MyFirstRepository
dab8530d16ab9746471b61b61e006d9febfed195
[ "Unlicense" ]
null
null
null
homework/pages/main_page.py
viaviare/MyFirstRepository
dab8530d16ab9746471b61b61e006d9febfed195
[ "Unlicense" ]
null
null
null
homework/pages/main_page.py
viaviare/MyFirstRepository
dab8530d16ab9746471b61b61e006d9febfed195
[ "Unlicense" ]
null
null
null
from selenium.webdriver.support.wait import WebDriverWait class MainPage: def __init__(self, driver): self.driver = driver self.wait = WebDriverWait(driver, 10) def open(self): self.driver.get("http://localhost/litecart") return self @property def choose_item_on_main...
25.625
77
0.690244
from selenium.webdriver.support.wait import WebDriverWait class MainPage: def __init__(self, driver): self.driver = driver self.wait = WebDriverWait(driver, 10) def open(self): self.driver.get("http://localhost/litecart") return self @property def choose_item_on_main...
true
true
f71e1171ccdc837a4c6947b4b28a96f186752e0f
3,396
py
Python
src/models/build_model.py
ds-praveenkumar/m5-accuracy-prediction
20255adc95c3e0fe6c6acec9fd16ac88c6e95908
[ "MIT" ]
null
null
null
src/models/build_model.py
ds-praveenkumar/m5-accuracy-prediction
20255adc95c3e0fe6c6acec9fd16ac88c6e95908
[ "MIT" ]
null
null
null
src/models/build_model.py
ds-praveenkumar/m5-accuracy-prediction
20255adc95c3e0fe6c6acec9fd16ac88c6e95908
[ "MIT" ]
null
null
null
# github link: https://github.com/ds-praveenkumar/kaggle # Author: ds-praveenkumar # file: forcasting/build_model.py/ # Created by ds-praveenkumar at 13-06-2020 02 09 # feature: import os import psutil from fbprophet import Prophet from pathlib import Path import pandas as pd import numpy as np import pickle from src....
35.747368
118
0.645465
import os import psutil from fbprophet import Prophet from pathlib import Path import pandas as pd import numpy as np import pickle from src.utility.timeit import timeit ROOT_DIR = Path(__file__).parent.parent.parent print('ROOT_DIR:', ROOT_DIR) @timeit def us_public_holidays(): ny = pd.DataFrame({'holiday'...
true
true
f71e12dce904f62ef30ba9880c80ecf12faae214
2,440
py
Python
nnexpy/network_generator.py
Spiilgriim/nnexpy
f8e419598ef94bebb532eb32ccaeeb48a3edfb5e
[ "MIT" ]
1
2021-09-17T12:18:51.000Z
2021-09-17T12:18:51.000Z
nnexpy/network_generator.py
Spiilgriim/nn-expressiveness
f8e419598ef94bebb532eb32ccaeeb48a3edfb5e
[ "MIT" ]
null
null
null
nnexpy/network_generator.py
Spiilgriim/nn-expressiveness
f8e419598ef94bebb532eb32ccaeeb48a3edfb5e
[ "MIT" ]
null
null
null
class NetworkGenerator(object): def build_model(self, *args, **kwargs): import tensorflow as tf depth = kwargs.get('depth', 1) input_shape = kwargs.get('input_shape', (2,)) width = kwargs.get('width', 8) activation = kwargs.get('activation', 'relu') model = tf.keras....
42.807018
112
0.617213
class NetworkGenerator(object): def build_model(self, *args, **kwargs): import tensorflow as tf depth = kwargs.get('depth', 1) input_shape = kwargs.get('input_shape', (2,)) width = kwargs.get('width', 8) activation = kwargs.get('activation', 'relu') model = tf.keras....
true
true
f71e1310bcce4fa74977649ebed5e88e8882ded8
26,238
py
Python
src/signalalign/tests/test_bwaWrapper.py
UCSC-nanopore-cgl/signalAlign
90041772403fe9f7142abc8a9103a7696e70f445
[ "MIT" ]
5
2019-08-03T14:43:49.000Z
2021-12-20T00:39:05.000Z
src/signalalign/tests/test_bwaWrapper.py
UCSC-nanopore-cgl/signalAlign
90041772403fe9f7142abc8a9103a7696e70f445
[ "MIT" ]
8
2018-06-13T00:32:34.000Z
2021-12-20T01:06:13.000Z
src/signalalign/tests/test_bwaWrapper.py
UCSC-nanopore-cgl/signalAlign
90041772403fe9f7142abc8a9103a7696e70f445
[ "MIT" ]
5
2017-07-24T20:29:41.000Z
2020-01-03T17:16:29.000Z
#!/usr/bin/env python """Tests for bwaWrapper.py""" ######################################################################## # File: test_bwaWrapper.py # executable: test_bwaWrapper.py # # Author: Andrew Bailey # History: Created 08/14/18 ######################################################################## import...
437.3
17,851
0.848578
3 D 1 M 19 I 3 M 24 D 1 M 3 D 4 M 15 D 1 M 5 D 1 M 4 D 1 M 6 D 1 M 19 I 1 M 28 D 1 M 29 D 1 M 1 D 1 M 1 D 1 M 7 D 1 M 26 D 1 M 37 D 1 M 13 I 3 M 40 D 1 M 1 D 3 M 36 D 3 M 16 D 1 M 21 D 1 M 5 D 1 M 8 D 1 M 5 D 1 M 4 D 1 M 19 D 2 M 2 D 1 M 16 D 1 M 9 D 2 M 8 D 2 M 16 I 2 M 26 D 1 M 7 D 1 M 54 D 1 M 38 D 1 M 24 D 1 M 19 ...
true
true
f71e13789cc4145d2f9206efb237dec6960ee37f
172
py
Python
tests/test.py
f-stop-lang/f-stop-rply
6b058200a4e1045749edd8f4b9ac40637d3ede5b
[ "MIT" ]
7
2021-06-12T15:02:25.000Z
2021-06-25T18:42:57.000Z
tests/test.py
f-stop-lang/f-stop-rply
6b058200a4e1045749edd8f4b9ac40637d3ede5b
[ "MIT" ]
2
2021-06-14T16:59:20.000Z
2021-06-28T14:42:49.000Z
tests/test.py
f-stop-lang/f-stop-rply
6b058200a4e1045749edd8f4b9ac40637d3ede5b
[ "MIT" ]
3
2021-06-25T17:52:05.000Z
2021-07-13T15:24:20.000Z
from fstop import Runner if __name__ == '__main__': with open("tests/test.fstop") as ft: string = ft.read() run = Runner() print(run.execute(string))
19.111111
40
0.622093
from fstop import Runner if __name__ == '__main__': with open("tests/test.fstop") as ft: string = ft.read() run = Runner() print(run.execute(string))
true
true
f71e13a9cb20186b85b883192d55616ea28d6f17
60
py
Python
dekorateur.py
krautware/python
d0f0b2f8812e2053cee9def2ba08d7cf4b443eb7
[ "MIT" ]
null
null
null
dekorateur.py
krautware/python
d0f0b2f8812e2053cee9def2ba08d7cf4b443eb7
[ "MIT" ]
null
null
null
dekorateur.py
krautware/python
d0f0b2f8812e2053cee9def2ba08d7cf4b443eb7
[ "MIT" ]
null
null
null
def is_prime(n): return all(n % i for i in range(2,n))
15
41
0.6
def is_prime(n): return all(n % i for i in range(2,n))
true
true
f71e13ae465530be69ec19e17957f4de88433aba
1,412
py
Python
test.py
MananSoni42/fantasy-predictions
f511c46b5f5896fa3ba709d5de517116ab8a30ce
[ "MIT" ]
null
null
null
test.py
MananSoni42/fantasy-predictions
f511c46b5f5896fa3ba709d5de517116ab8a30ce
[ "MIT" ]
null
null
null
test.py
MananSoni42/fantasy-predictions
f511c46b5f5896fa3ba709d5de517116ab8a30ce
[ "MIT" ]
null
null
null
import csv import json import time import re import requests from pprint import pprint from bs4 import BeautifulSoup clean = lambda x: x.lower().replace(' ','').replace('\n','') def averages_100(avg_url): r = requests.get(avg_url) soup = BeautifulSoup(r.content, 'lxml') avg={ 'stats':[], } ...
28.24
153
0.588527
import csv import json import time import re import requests from pprint import pprint from bs4 import BeautifulSoup clean = lambda x: x.lower().replace(' ','').replace('\n','') def averages_100(avg_url): r = requests.get(avg_url) soup = BeautifulSoup(r.content, 'lxml') avg={ 'stats':[], } ...
true
true
f71e13bdfe32a4ad3f1a533ca707312e71907da0
227,723
py
Python
pysnmp-with-texts/VMWARE-NSX-MANAGER-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/VMWARE-NSX-MANAGER-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/VMWARE-NSX-MANAGER-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module VMWARE-NSX-MANAGER-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/VMWARE-NSX-MANAGER-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:34:54 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (d...
266.031542
14,186
0.793095
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuild...
true
true
f71e13e08442f6f8defa5a1eed69962294a1fe9c
397
py
Python
run_sample.py
nkmrtty/TwitterStreamingAPI
2f2d6c1021a6f4c5ccbb85d65a9c5088af1deced
[ "MIT" ]
null
null
null
run_sample.py
nkmrtty/TwitterStreamingAPI
2f2d6c1021a6f4c5ccbb85d65a9c5088af1deced
[ "MIT" ]
null
null
null
run_sample.py
nkmrtty/TwitterStreamingAPI
2f2d6c1021a6f4c5ccbb85d65a9c5088af1deced
[ "MIT" ]
null
null
null
# coding: utf-8 from streaming_api import sample # Replace keys with your own keys APIKEYS = dict( CONSUMER='consumer key', CONSUMER_SECRET='consumer secret key', ACCESS_TOKEN='access token key', ACCESS_TOKEN_SECRET='access token secret key') # NOTICE: this script shows delimited output in your termin...
26.466667
61
0.753149
from streaming_api import sample APIKEYS = dict( CONSUMER='consumer key', CONSUMER_SECRET='consumer secret key', ACCESS_TOKEN='access token key', ACCESS_TOKEN_SECRET='access token secret key') res = sample(APIKEYS) for tweet_json_str in res: print tweet_json_str
false
true
f71e13eb6df77b4cc29006b4eca37e31f7423877
648
py
Python
exatomic/core/tests/test_atom.py
tjduigna/exatomic
3e27233084588bc6a58b63fc81aaf5a6b67a968d
[ "Apache-2.0" ]
null
null
null
exatomic/core/tests/test_atom.py
tjduigna/exatomic
3e27233084588bc6a58b63fc81aaf5a6b67a968d
[ "Apache-2.0" ]
1
2017-05-25T21:05:40.000Z
2017-05-25T23:54:15.000Z
exatomic/core/tests/test_atom.py
tjduigna/exatomic
3e27233084588bc6a58b63fc81aaf5a6b67a968d
[ "Apache-2.0" ]
1
2017-05-25T20:48:33.000Z
2017-05-25T20:48:33.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2015-2018, Exa Analytics Development Team ## Distributed under the terms of the Apache License 2.0 #""" #Tests for the Atom DataFrame ############################## #The tests here use some contrived examples. #""" #import numpy as np #from unittest import TestCase #from exa impo...
29.454545
68
0.658951
####### #The tests here use some contrived examples. #"""
true
true
f71e141a890b58c304a9199c3f22429af1489824
8,642
py
Python
contrib/manhole/piped_manhole/providers.py
alexbrasetvik/Piped
0312c14d6c4c293df378c915cc9787bcc7faed36
[ "MIT" ]
null
null
null
contrib/manhole/piped_manhole/providers.py
alexbrasetvik/Piped
0312c14d6c4c293df378c915cc9787bcc7faed36
[ "MIT" ]
null
null
null
contrib/manhole/piped_manhole/providers.py
alexbrasetvik/Piped
0312c14d6c4c293df378c915cc9787bcc7faed36
[ "MIT" ]
null
null
null
# Copyright (c) 2011, Found IT A/S and Piped Project Contributors. # See LICENSE for details. from twisted.application import internet, service, strports from twisted.conch import manhole, manhole_ssh, error as conch_error from twisted.conch.insults import insults from twisted.conch.ssh import keys from twisted.cred im...
40.383178
115
0.672298
from twisted.application import internet, service, strports from twisted.conch import manhole, manhole_ssh, error as conch_error from twisted.conch.insults import insults from twisted.conch.ssh import keys from twisted.cred import error, portal from twisted.internet import defer from twisted.python import reflect fro...
true
true
f71e166d754b8f4a25fb6851144de58b5e70a5e4
196
py
Python
app/__init__.py
devchild/flask_rest_knockout_example
e44074b0a3080180a24bb23d6f27ef6dcbbc3829
[ "MIT" ]
null
null
null
app/__init__.py
devchild/flask_rest_knockout_example
e44074b0a3080180a24bb23d6f27ef6dcbbc3829
[ "MIT" ]
null
null
null
app/__init__.py
devchild/flask_rest_knockout_example
e44074b0a3080180a24bb23d6f27ef6dcbbc3829
[ "MIT" ]
null
null
null
from flask import Flask from flask.ext.httpauth import HTTPBasicAuth auth = HTTPBasicAuth() app = Flask(__name__) app.config.from_object('config') from app import views from app.api import v1_0
19.6
44
0.795918
from flask import Flask from flask.ext.httpauth import HTTPBasicAuth auth = HTTPBasicAuth() app = Flask(__name__) app.config.from_object('config') from app import views from app.api import v1_0
true
true
f71e16b81129ca73af9944cd7c4cc7f6f2d538f2
3,823
py
Python
akshare/index/index_cflp.py
J-Z-Z/akshare
0a9ca71b381a272e2f56211e455ff2493dfed17a
[ "MIT" ]
721
2021-09-21T12:10:33.000Z
2022-03-31T09:47:01.000Z
akshare/index/index_cflp.py
J-Z-Z/akshare
0a9ca71b381a272e2f56211e455ff2493dfed17a
[ "MIT" ]
135
2021-09-21T12:07:54.000Z
2022-03-31T14:15:36.000Z
akshare/index/index_cflp.py
J-Z-Z/akshare
0a9ca71b381a272e2f56211e455ff2493dfed17a
[ "MIT" ]
234
2021-09-21T12:16:27.000Z
2022-03-31T09:47:04.000Z
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Date: 2021/12/27 15:47 Desc: 中国公路物流运价、运量指数 http://index.0256.cn/expx.htm """ import pandas as pd import requests def index_cflp_price(symbol: str = "周指数") -> pd.DataFrame: """ 中国公路物流运价指数 http://index.0256.cn/expx.htm :param symbol: choice of {"周指数", "月指...
29.407692
140
0.578342
import pandas as pd import requests def index_cflp_price(symbol: str = "周指数") -> pd.DataFrame: symbol_map = { "周指数": "2", "月指数": "3", "季度指数": "4", "年度指数": "5", } url = "http://index.0256.cn/expcenter_trend.action" params = { "marketId": "1", "attribute...
true
true
f71e17377f920505ee763cba0e21f3a428218bb3
1,814
py
Python
refex/python/test_python_pattern.py
ssbr/refex
221d343b8584362900fb93a07ff96a4b9d9d4ece
[ "Apache-2.0" ]
11
2020-08-28T03:54:49.000Z
2022-01-06T05:55:21.000Z
refex/python/test_python_pattern.py
ssbr/refex
221d343b8584362900fb93a07ff96a4b9d9d4ece
[ "Apache-2.0" ]
5
2020-08-25T16:19:05.000Z
2021-06-07T21:31:03.000Z
refex/python/test_python_pattern.py
ssbr/refex
221d343b8584362900fb93a07ff96a4b9d9d4ece
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 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 applicable law or agreed to in writing, ...
35.568627
80
0.732084
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tokenize from absl.testing import absltest from absl.testing import parameterized from refex.python import python_pattern class PythonPatternTest(parameterized.TestCase): @parameteri...
true
true
f71e17f2e51f05e1bc7f152554674fa888f9cca1
463
py
Python
python_arrays.py
egriswol/astr-119-hw-1
e290355de8f48b9def3fdacf4779ac4a3c51a003
[ "MIT" ]
null
null
null
python_arrays.py
egriswol/astr-119-hw-1
e290355de8f48b9def3fdacf4779ac4a3c51a003
[ "MIT" ]
1
2018-10-18T17:49:41.000Z
2018-10-18T17:49:41.000Z
python_arrays.py
egriswol/astr-119-hw-1
e290355de8f48b9def3fdacf4779ac4a3c51a003
[ "MIT" ]
1
2018-10-18T01:31:32.000Z
2018-10-18T01:31:32.000Z
x = [0.0, 3.0, 5.0, 2.5, 3.7] #define array print(type(x)) #remove third element x.pop(2) print(x) #will print without third element #remove 2.5 x.remove(2.5) print(x) #add an element to the end x.append(1.2) print(x) #copy y = x.copy() print(y) #how many elements are 0.0 print (y.count(0.0)) #print the index wit...
12.513514
43
0.667387
x = [0.0, 3.0, 5.0, 2.5, 3.7] print(type(x)) x.pop(2) print(x) x.remove(2.5) print(x) x.append(1.2) print(x) y = x.copy() print(y) print (y.count(0.0)) print(y.index(3.7)) y.sort() print(y) y.reverse() print(y) y.clear() print(y)
true
true
f71e180e422103be66c72b48961b969337bef914
1,453
py
Python
jocular/stretch.py
MartinCooke/jocular
635816d4ef6aa6ea75187137e25386dad2d551e9
[ "MIT" ]
6
2021-03-21T16:46:44.000Z
2021-11-27T14:07:06.000Z
jocular/stretch.py
MartinCooke/jocular
635816d4ef6aa6ea75187137e25386dad2d551e9
[ "MIT" ]
null
null
null
jocular/stretch.py
MartinCooke/jocular
635816d4ef6aa6ea75187137e25386dad2d551e9
[ "MIT" ]
null
null
null
''' Various stretch functions. Easy to add more. Room for refinement, methinks. ''' import numpy as np def stretch(x, method='linear', param=None, NR=0, background=None): # if no noise reduction just use stretch alone if (NR <= 0) or (background is None): return stretch_main(x, method=method, par...
26.907407
69
0.494838
import numpy as np def stretch(x, method='linear', param=None, NR=0, background=None): if (NR <= 0) or (background is None): return stretch_main(x, method=method, param=param) else: y = stretch_main(x, method=method, param=param) hyper_param = 1 - .1 * (NR / 100) ...
true
true
f71e19a3303bab6b818caaa27d08b643c1e25ed5
60
py
Python
modules/documentarchive/__init__.py
Medisur/journalmanagement
bc356e8d3354529a14a5e04bec3d80c03ed1c0ec
[ "MIT" ]
1
2019-04-16T08:53:16.000Z
2019-04-16T08:53:16.000Z
modules/documentarchive/__init__.py
Medisur/journalmanagement
bc356e8d3354529a14a5e04bec3d80c03ed1c0ec
[ "MIT" ]
null
null
null
modules/documentarchive/__init__.py
Medisur/journalmanagement
bc356e8d3354529a14a5e04bec3d80c03ed1c0ec
[ "MIT" ]
null
null
null
from .archive import Archive from .resource import Resource
20
30
0.833333
from .archive import Archive from .resource import Resource
true
true
f71e1a4d75fec1c60082e0cb4c6a760f8637f5c3
9,493
py
Python
doc/conf.py
janhaviagrawal/ApplicationInsights-Python
49a58cd688a866c71c952019b6c9ee71772443c3
[ "MIT" ]
null
null
null
doc/conf.py
janhaviagrawal/ApplicationInsights-Python
49a58cd688a866c71c952019b6c9ee71772443c3
[ "MIT" ]
null
null
null
doc/conf.py
janhaviagrawal/ApplicationInsights-Python
49a58cd688a866c71c952019b6c9ee71772443c3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Application Insights SDK for Python documentation build configuration file, created by # sphinx-quickstart on Mon Dec 22 23:32:45 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration val...
32.961806
127
0.721163
import sys import os extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', ] templates_path = [ 'templates' ] source_suffix = '.rst' master_doc = 'index' proje...
true
true
f71e1a784d2b6bd92da4b28d2d1773a3db8e5216
1,048
py
Python
dist-packages/samba/tests/auth.py
Jianwei-Wang/python2.7_lib
911b8e81512e5ac5f13e669ab46f7693ed897378
[ "PSF-2.0" ]
480
2015-02-03T11:59:43.000Z
2022-03-21T13:23:29.000Z
lib/python2.7/site-packages/samba/tests/auth.py
brianwrf/pth-toolkit
3641cdc76c0f52275315c9b18bf08b22521bd4d7
[ "BSD-2-Clause" ]
6
2015-02-03T14:06:12.000Z
2021-05-11T12:07:02.000Z
lib/python2.7/site-packages/samba/tests/auth.py
brianwrf/pth-toolkit
3641cdc76c0f52275315c9b18bf08b22521bd4d7
[ "BSD-2-Clause" ]
137
2015-02-05T13:31:57.000Z
2022-02-23T09:44:18.000Z
# Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) a...
32.75
71
0.757634
from samba import auth import samba.tests class AuthTests(samba.tests.TestCase): def test_system_session(self): auth.system_session()
true
true
f71e1c6aa999072506fb58ee77bb770ae4345ad1
1,262
py
Python
assignments/03_solfege/solfege.py
ABennett97/be434-fall-2021
68762dc3588751a33519203dcf8b638f79501c15
[ "MIT" ]
null
null
null
assignments/03_solfege/solfege.py
ABennett97/be434-fall-2021
68762dc3588751a33519203dcf8b638f79501c15
[ "MIT" ]
null
null
null
assignments/03_solfege/solfege.py
ABennett97/be434-fall-2021
68762dc3588751a33519203dcf8b638f79501c15
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Author : abennett1 <abennett1@localhost> Date : 2021-09-20 Purpose: Rock the Casbah """ import argparse # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description='Do Re Mi solfege',...
27.434783
88
0.473059
import argparse def get_args(): parser = argparse.ArgumentParser( description='Do Re Mi solfege', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('text', metavar='str', nargs='+', help='Sol...
true
true
f71e1ddbb26c4a4945e9fa2cf486485926f6161d
588
py
Python
examples/compass-display.py
pimoroni/micropython-scrollbit
4b9b51830430984e27006aa9ae785ea68c7f397c
[ "MIT" ]
6
2018-12-24T15:17:24.000Z
2021-05-02T22:33:36.000Z
examples/compass-display.py
pimoroni/micropython-scrollbit
4b9b51830430984e27006aa9ae785ea68c7f397c
[ "MIT" ]
5
2018-05-18T08:51:51.000Z
2020-07-31T10:37:34.000Z
examples/compass-display.py
pimoroni/micropython-scrollbit
4b9b51830430984e27006aa9ae785ea68c7f397c
[ "MIT" ]
7
2018-05-17T16:43:38.000Z
2020-07-29T23:58:08.000Z
# Shows the compass heading on your scroll:bit # You will need to calibrate the compass by tilting the micro:bit # when your program starts. # Flash a blank file to your micro:bit, # then save this as main.py and transfer it to your micro:bit using the Files menu # you will also need to copy over scrollbit.py, see RE...
28
96
0.753401
import scrollbit import microbit import time microbit.compass.calibrate() while True: scrollbit.clear() scrollbit.write(str(microbit.compass.heading()), offset_col=1, offset_row=1, brightness=100) scrollbit.show() time.sleep(1)
true
true
f71e1faa52ac268ed1a984e551256e4760ebee06
9,327
py
Python
cardano/storage.py
safeada/python-cardano
dc1c4203602b562ae5c42bf2f0e9dfa87dc12450
[ "MIT" ]
32
2018-08-02T02:02:38.000Z
2021-12-13T17:18:27.000Z
cardano/storage.py
yihuang/cardano-utils
dc1c4203602b562ae5c42bf2f0e9dfa87dc12450
[ "MIT" ]
5
2018-11-16T10:31:47.000Z
2021-05-24T03:30:34.000Z
cardano/storage.py
yihuang/cardano-utils
dc1c4203602b562ae5c42bf2f0e9dfa87dc12450
[ "MIT" ]
15
2018-08-01T09:48:01.000Z
2021-08-11T13:05:36.000Z
''' * Use rocksdb as cardano-sl did. * Store each epoch in seperate db. 'b/' + hash -> block data 'u/' + hash -> undo data g -> hash of genesis block of epoch. * Main database: * 'c/tip' -> hash * 'b/' + hash -> BlockHeader * 'e/fl/' + hash -> hash of next block. * 'ut/t/' + txIn -> TxOut * 's/' +...
30.986711
83
0.566956
import os import cbor import rocksdb from .block import DecodedBlock, DecodedBlockHeader from . import config def iter_prefix(db, prefix): it = db.iteritems() it.seek(prefix) for k, v in it: if not k.startswith(prefix): break yield k, v def remove_prefix(db, prefix): ba...
true
true
f71e1ff0549a51eb610d1ac07e95017b95706ac7
56,186
py
Python
mathchem/mathchem.py
juvilius/mathchem-package
ca56cb03e6ccdb47b3dfc382ca36b0a00d3e28b9
[ "MIT" ]
null
null
null
mathchem/mathchem.py
juvilius/mathchem-package
ca56cb03e6ccdb47b3dfc382ca36b0a00d3e28b9
[ "MIT" ]
null
null
null
mathchem/mathchem.py
juvilius/mathchem-package
ca56cb03e6ccdb47b3dfc382ca36b0a00d3e28b9
[ "MIT" ]
null
null
null
import numpy as np class Mol(): r""" Molecule. """ __g6_string = '' # Adjacency matrix __A = [] # Incidence matrix __B = [] # Laplacian matrix __L = [] # Normalized laplacian matrix __NL = [] # Signless laplacian matrix __Q = [] # Distance matrix __D = [...
32.742424
121
0.549923
import numpy as np class Mol(): __g6_string = '' __A = [] __B = [] __L = [] __NL = [] __Q = [] __D = [] __RD = [] __Order = 0 __Edges = [] __Sage_graph = None __NX_graph = None __Degrees = [] __Spectrum = [] __Laplacian...
true
true
f71e212b8f5aad5d329910a235290ceae995a466
677
py
Python
lightbike/tests/test_map.py
ethancharles02/cse210-project
280b67ae69e84a334b807232c208a4ca4d27c37b
[ "MIT" ]
null
null
null
lightbike/tests/test_map.py
ethancharles02/cse210-project
280b67ae69e84a334b807232c208a4ca4d27c37b
[ "MIT" ]
null
null
null
lightbike/tests/test_map.py
ethancharles02/cse210-project
280b67ae69e84a334b807232c208a4ca4d27c37b
[ "MIT" ]
null
null
null
import pytest from data.map import Map from data import constants def test_set_get_map(): map = Map() map.set_map( [ [(0, 0), constants.DEFAULT_WALL, 0], [(0, 1), constants.DEFAULT_WALL, 90], [(0, 2), constants.DEFAULT_WALL, 180] ] ) assert map....
21.83871
49
0.549483
import pytest from data.map import Map from data import constants def test_set_get_map(): map = Map() map.set_map( [ [(0, 0), constants.DEFAULT_WALL, 0], [(0, 1), constants.DEFAULT_WALL, 90], [(0, 2), constants.DEFAULT_WALL, 180] ] ) assert map....
true
true
f71e21ff4de761faf4767fffe958f0936712b461
5,271
py
Python
synapse/python_dependencies.py
Benjamin-L/synapse
35442efb758960d72927d8bd698be657eb0e3037
[ "Apache-2.0" ]
1
2019-03-20T12:41:08.000Z
2019-03-20T12:41:08.000Z
synapse/python_dependencies.py
Benjamin-L/synapse
35442efb758960d72927d8bd698be657eb0e3037
[ "Apache-2.0" ]
null
null
null
synapse/python_dependencies.py
Benjamin-L/synapse
35442efb758960d72927d8bd698be657eb0e3037
[ "Apache-2.0" ]
null
null
null
# Copyright 2015, 2016 OpenMarket Ltd # Copyright 2017 Vector Creations Ltd # Copyright 2018 New Vector Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licen...
31.375
84
0.633276
import logging from pkg_resources import DistributionNotFound, VersionConflict, get_distribution logger = logging.getLogger(__name__) jsonschema>=2.5.1", "frozendict>=1", "unpaddedbase64>=1.1.0", "canonicaljson>=1.1.3", "signedjson>=1.0.0", "pynacl>=1.2.1", "service_...
true
true
f71e22c1d8dcf03031ef0b71b819aee1ccccc455
1,325
py
Python
covid_world_scraper/nga.py
biglocalnews/covid-world-scraper
385f792b32d58dbf67a524c36e60d21f76e463ef
[ "0BSD" ]
null
null
null
covid_world_scraper/nga.py
biglocalnews/covid-world-scraper
385f792b32d58dbf67a524c36e60d21f76e463ef
[ "0BSD" ]
11
2020-07-14T02:16:32.000Z
2022-01-31T18:06:49.000Z
covid_world_scraper/nga.py
biglocalnews/covid-world-scraper
385f792b32d58dbf67a524c36e60d21f76e463ef
[ "0BSD" ]
null
null
null
""" Official page for Nigeria COVID figures: https://covid19.ncdc.gov.ng/ """ import logging import os import re from bs4 import BeautifulSoup import requests from .country_scraper import CountryScraper logger = logging.getLogger(__name__) class Nga(CountryScraper): def fetch(self): url = 'https...
25.980392
71
0.593962
import logging import os import re from bs4 import BeautifulSoup import requests from .country_scraper import CountryScraper logger = logging.getLogger(__name__) class Nga(CountryScraper): def fetch(self): url = 'https://covid19.ncdc.gov.ng/' response = requests.get(url) saved_file = s...
true
true
f71e22c3be82a7358ce15874fced843315675c8b
164
py
Python
manti_by/apps/shortener/apps.py
manti-by/manti.by
233882fc5e5758ff92f0b7940316f15e4d30af07
[ "BSD-3-Clause" ]
1
2021-12-11T11:34:04.000Z
2021-12-11T11:34:04.000Z
manti_by/apps/shortener/apps.py
manti-by/manti.by
233882fc5e5758ff92f0b7940316f15e4d30af07
[ "BSD-3-Clause" ]
11
2021-03-23T13:59:39.000Z
2022-02-02T10:16:58.000Z
manti_by/apps/shortener/apps.py
manti-by/manti.by
233882fc5e5758ff92f0b7940316f15e4d30af07
[ "BSD-3-Clause" ]
null
null
null
from django.apps import AppConfig class ShortenerConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "manti_by.apps.shortener"
23.428571
56
0.77439
from django.apps import AppConfig class ShortenerConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "manti_by.apps.shortener"
true
true
f71e2402789d811aef5d0e4eab5187008fe4414f
103
py
Python
realtimenet/feature_extractors/__init__.py
floriandotpy/20bn-realtimenet
6cf6359606ccb3cb205fb65dd102402bc84255e2
[ "MIT" ]
2
2021-03-03T09:36:49.000Z
2022-03-18T06:36:54.000Z
realtimenet/feature_extractors/__init__.py
mc261670164/20bn-realtimenet
6d1e21c3ccd3ff7d15af2927a31f1012ae9853e9
[ "MIT" ]
1
2021-03-10T08:38:03.000Z
2021-03-10T10:48:13.000Z
realtimenet/feature_extractors/__init__.py
floriandotpy/20bn-realtimenet
6cf6359606ccb3cb205fb65dd102402bc84255e2
[ "MIT" ]
1
2022-01-26T02:45:18.000Z
2022-01-26T02:45:18.000Z
from .mobilenet import StridedInflatedMobileNetV2 from .efficientnet import StridedInflatedEfficientNet
51.5
53
0.912621
from .mobilenet import StridedInflatedMobileNetV2 from .efficientnet import StridedInflatedEfficientNet
true
true
f71e24272a78f0373f2f2c943c051e634aa62ac6
1,276
py
Python
library_backend/settings/development.py
darth-dodo/library-backend
93bd419269b2fedecedd68dd76c45f5060a46493
[ "MIT" ]
null
null
null
library_backend/settings/development.py
darth-dodo/library-backend
93bd419269b2fedecedd68dd76c45f5060a46493
[ "MIT" ]
3
2020-02-12T01:07:19.000Z
2021-06-10T21:50:49.000Z
library_backend/settings/development.py
darth-dodo/library-backend
93bd419269b2fedecedd68dd76c45f5060a46493
[ "MIT" ]
null
null
null
from .base import * DEBUG = get_env_variable('DEBUG_MODE') DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': get_env_variable('DATABASE_NAME'), 'USER': get_env_variable('DATABASE_USER'), 'PASSWORD': get_env_variable('DATABASE_PASSWORD'), ...
23.2
86
0.60815
from .base import * DEBUG = get_env_variable('DEBUG_MODE') DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': get_env_variable('DATABASE_NAME'), 'USER': get_env_variable('DATABASE_USER'), 'PASSWORD': get_env_variable('DATABASE_PASSWORD'), ...
true
true
f71e242ca8e030bb1802a445ec67be8186aabf3a
709
py
Python
loader/__init__.py
YaoChengTang/DecNet
b623ac8d0505ec68eb930ad7a21fe9d84dd07543
[ "MIT" ]
18
2021-04-16T02:24:06.000Z
2021-12-13T10:55:27.000Z
loader/__init__.py
YaoChengTang/DecNet
b623ac8d0505ec68eb930ad7a21fe9d84dd07543
[ "MIT" ]
3
2021-04-29T09:05:53.000Z
2021-09-06T08:35:55.000Z
loader/__init__.py
YaoChengTang/DecNet
b623ac8d0505ec68eb930ad7a21fe9d84dd07543
[ "MIT" ]
2
2021-08-07T08:00:34.000Z
2021-09-13T06:14:52.000Z
import json from loader.KITTI15Mask import KITTI15Mask from loader.SceneflowMask import SceneflowMask from loader.DrivingStereoMask import DrivingStereoMask from loader.MiddleburyMask import MiddleburyMask def get_loader(name): """get_loader :param name: """ print(name.lower()) return { '...
23.633333
54
0.695346
import json from loader.KITTI15Mask import KITTI15Mask from loader.SceneflowMask import SceneflowMask from loader.DrivingStereoMask import DrivingStereoMask from loader.MiddleburyMask import MiddleburyMask def get_loader(name): print(name.lower()) return { 'kitti15mask': KITTI15Mask, 'sceneflo...
true
true
f71e24c9faaf4bedde9723ddbf104ab813acfc67
1,706
py
Python
profiles_api/migrations/0001_initial.py
pantegra/profiles-rest-api
b9dc03273b50b0e04f11d74781f2659d82b4d271
[ "MIT" ]
null
null
null
profiles_api/migrations/0001_initial.py
pantegra/profiles-rest-api
b9dc03273b50b0e04f11d74781f2659d82b4d271
[ "MIT" ]
null
null
null
profiles_api/migrations/0001_initial.py
pantegra/profiles-rest-api
b9dc03273b50b0e04f11d74781f2659d82b4d271
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2021-03-23 12:07 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserProfile', ...
50.176471
266
0.638921
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserProfile', fields=[ ('id', models.Au...
true
true
f71e2582319771768abac221ac3650e185cfa10e
3,198
py
Python
patterns.py
teddy-dubal/WhatsApp-Analyzer
1cae2f3be03843741e2b8f5e321ed7a307f3b1f1
[ "MIT" ]
null
null
null
patterns.py
teddy-dubal/WhatsApp-Analyzer
1cae2f3be03843741e2b8f5e321ed7a307f3b1f1
[ "MIT" ]
null
null
null
patterns.py
teddy-dubal/WhatsApp-Analyzer
1cae2f3be03843741e2b8f5e321ed7a307f3b1f1
[ "MIT" ]
null
null
null
BAD_CHARS = [ u"\u202a", u"\u200e", u"\u202c", u"\xa0", ] IS_STARTING_LINE = r""" (\[?) #Zero or one open square bracket '[' (((\d{1,2}) #1 to 2 digit date (/|-) #'/' or '-' separator (\d{1,2}) #1 to 2 digit month (/|-) #'/' or '-' separator (\d{2,4})) #2...
36.758621
194
0.551907
BAD_CHARS = [ u"\u202a", u"\u200e", u"\u202c", u"\xa0", ] IS_STARTING_LINE = r""" (\[?) #Zero or one open square bracket '[' (((\d{1,2}) #1 to 2 digit date (/|-) #'/' or '-' separator (\d{1,2}) #1 to 2 digit month (/|-) #'/' or '-' separator (\d{2,4})) #2...
true
true
f71e272f3182e9115d5ba90240accd4ee5011de3
27,886
py
Python
sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations/_indexers_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations/_indexers_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
2
2021-11-03T06:10:36.000Z
2021-12-01T06:29:39.000Z
sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations/_indexers_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
1
2021-05-19T02:55:10.000Z
2021-05-19T02:55:10.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
47.344652
138
0.664957
from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impo...
true
true
f71e27f8193a9613f9f3d5d8bad3b7ec30aa51dc
3,787
py
Python
sentry_sdk/consts.py
bartolootrit/sentry-python
4e346acbabb1fd5592663bf9acd580835236fcf0
[ "BSD-2-Clause" ]
1
2021-04-04T09:46:28.000Z
2021-04-04T09:46:28.000Z
sentry_sdk/consts.py
maltalk/sentry-python
4e346acbabb1fd5592663bf9acd580835236fcf0
[ "BSD-2-Clause" ]
40
2021-07-13T06:16:51.000Z
2022-03-28T15:10:33.000Z
sentry_sdk/consts.py
maltalk/sentry-python
4e346acbabb1fd5592663bf9acd580835236fcf0
[ "BSD-2-Clause" ]
null
null
null
from sentry_sdk._types import MYPY if MYPY: import sentry_sdk from typing import Optional from typing import Callable from typing import Union from typing import List from typing import Type from typing import Dict from typing import Any from typing import Sequence from typing_...
34.427273
143
0.651439
from sentry_sdk._types import MYPY if MYPY: import sentry_sdk from typing import Optional from typing import Callable from typing import Union from typing import List from typing import Type from typing import Dict from typing import Any from typing import Sequence from typing_...
true
true
f71e28052636c0f424f1a7e1fcc7329cd9859dbb
2,007
py
Python
accounts/api/serializers.py
astaqc/django-job-portal
59e83fb0a99c947f426378d78c16b829604a747b
[ "MIT" ]
348
2019-04-11T06:25:21.000Z
2022-03-29T21:27:54.000Z
accounts/api/serializers.py
gibmax/django-job-portal
c85a6dd3dd958474980b2cac187305e08745b241
[ "MIT" ]
33
2019-04-18T18:51:18.000Z
2022-03-12T00:53:02.000Z
accounts/api/serializers.py
gibmax/django-job-portal
c85a6dd3dd958474980b2cac187305e08745b241
[ "MIT" ]
145
2019-04-11T05:15:18.000Z
2022-03-13T15:10:25.000Z
from rest_framework import serializers from ..models import * class UserSerializer(serializers.ModelSerializer): def __init__(self, *args, **kwargs): kwargs["partial"] = True super(UserSerializer, self).__init__(*args, **kwargs) class Meta: model = User # fields = "__all__" ...
31.857143
114
0.617339
from rest_framework import serializers from ..models import * class UserSerializer(serializers.ModelSerializer): def __init__(self, *args, **kwargs): kwargs["partial"] = True super(UserSerializer, self).__init__(*args, **kwargs) class Meta: model = User exclude = ( ...
true
true
f71e28b46cb7cd347ea1092293af4977215d2ea3
2,323
py
Python
flask_app/app/controller.py
presthatdynamic/Fast-Food-Fast-v1
2b8331273cc41cf35cdda1262c1d1e062196bbc4
[ "MIT" ]
1
2018-09-17T14:56:01.000Z
2018-09-17T14:56:01.000Z
flask_app/app/controller.py
presthatdynamic/Fast-Food-Fast-v1
2b8331273cc41cf35cdda1262c1d1e062196bbc4
[ "MIT" ]
1
2018-09-17T20:45:12.000Z
2018-09-18T06:53:48.000Z
flask_app/app/controller.py
presthatdynamic/Fast-Food-Fast-v1
2b8331273cc41cf35cdda1262c1d1e062196bbc4
[ "MIT" ]
null
null
null
""" This module holds functionality that connects the models to the views """ from flask import session from app.models import db from app import utilities def process_form_data(dict_form_data, *args): """ After casting form data to dict, the values become lists. Transform the lists to non-iterables ...
29.0375
87
0.610418
from flask import session from app.models import db from app import utilities def process_form_data(dict_form_data, *args): new_dict = {} try: for key in dict_form_data.keys(): new_dict[key] = dict_form_data[key][0] except AttributeError: raise AttributeError('The input should b...
true
true
f71e291050a727f1202cf508a3fdd2e01df1214a
2,253
py
Python
TeteRousse/Step1/Makegeo.py
ElmerCSC/ElmerIceCourses
6ff1011f3a1311d84699a30da9f8fc56cb984a08
[ "CC0-1.0" ]
null
null
null
TeteRousse/Step1/Makegeo.py
ElmerCSC/ElmerIceCourses
6ff1011f3a1311d84699a30da9f8fc56cb984a08
[ "CC0-1.0" ]
null
null
null
TeteRousse/Step1/Makegeo.py
ElmerCSC/ElmerIceCourses
6ff1011f3a1311d84699a30da9f8fc56cb984a08
[ "CC0-1.0" ]
2
2022-01-30T16:26:25.000Z
2022-03-26T14:04:56.000Z
# -*- coding: utf-8 -*- # Create a geo (gmsh input file) file from a contour file # the contour file contains the (x,y) coordinates of the ordered # points defining the contour of the domain # import numpy as np import matplotlib.pyplot as plt # Test these options # edge size of the elements el_size = 18.0 ...
31.732394
104
0.560142
import numpy as np import matplotlib.pyplot as plt el_size = 18.0 spline = True Contour = np.loadtxt('./../Data/Contour_TR_glacier.dat') x = Contour[:,0] y = Contour[:,1] if x[0]==x[-1] and y[0]==y[-1]: print('Same first and last points in contour file') Npt = len(x)-1 else: Npt = le...
true
true
f71e29bc5af8517918504a9bb99932a80d7a5328
6,053
py
Python
benchmarks/f3_wrong_hints_permutations/scaling_nonlinear_software/4-19_17.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints_permutations/scaling_nonlinear_software/4-19_17.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints_permutations/scaling_nonlinear_software/4-19_17.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import FrozenSet, Tuple import pysmt.typing as types from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
34.005618
78
0.508178
from typing import FrozenSet, Tuple import pysmt.typing as types from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
true
true
f71e2a0eadfa12605a87df1a68e086508ced255b
1,813
py
Python
people/models.py
morion4000/ophion
016310ec0f702cb7f5d6b4e72e11817ef8bcdfae
[ "MIT" ]
null
null
null
people/models.py
morion4000/ophion
016310ec0f702cb7f5d6b4e72e11817ef8bcdfae
[ "MIT" ]
3
2020-02-12T03:26:52.000Z
2021-06-10T22:29:27.000Z
people/models.py
morion4000/ophion
016310ec0f702cb7f5d6b4e72e11817ef8bcdfae
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User from django.dispatch import receiver from django.db.models.signals import post_save from lists.models import List class Person(models.Model): user = models.OneToOneField(User) bio = models.TextField() dob = models.DateField() lo...
25.9
81
0.607281
from django.db import models from django.contrib.auth.models import User from django.dispatch import receiver from django.db.models.signals import post_save from lists.models import List class Person(models.Model): user = models.OneToOneField(User) bio = models.TextField() dob = models.DateField() lo...
true
true
f71e2b1b304f0ba0229a525aef1d124b4077c13c
8,985
py
Python
demo.py
SpikeKing/UGATIT-new
4efbdc4e6d8046f5dd452616975d88c01fcbab72
[ "MIT" ]
1
2020-08-06T02:19:13.000Z
2020-08-06T02:19:13.000Z
demo.py
SpikeKing/UGATIT-new
4efbdc4e6d8046f5dd452616975d88c01fcbab72
[ "MIT" ]
null
null
null
demo.py
SpikeKing/UGATIT-new
4efbdc4e6d8046f5dd452616975d88c01fcbab72
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -- coding: utf-8 -- """ Copyright (c) 2019. All rights reserved. Created by C. L. Wang on 2020/1/2 """ import math from UGATIT import UGATIT from main import parse_args from root_dir import DATA_DIR from utils.project_utils import traverse_dir_files, mkdir_if_not_exist from utils.ugatit_utils im...
30.35473
109
0.648191
import math from UGATIT import UGATIT from main import parse_args from root_dir import DATA_DIR from utils.project_utils import traverse_dir_files, mkdir_if_not_exist from utils.ugatit_utils import * class ImgPredictor(object): def __init__(self, gan_type='lsgan', adv_weight=1, cycle_weight=10, identity_weight...
true
true
f71e2b1de028bb07a72e5add71ffb3879b603bc4
6,718
py
Python
store/serializers.py
nettaku2/django_learn
ce07c97c8b2dd4828cae1d1b176674c843e66b35
[ "MIT" ]
null
null
null
store/serializers.py
nettaku2/django_learn
ce07c97c8b2dd4828cae1d1b176674c843e66b35
[ "MIT" ]
null
null
null
store/serializers.py
nettaku2/django_learn
ce07c97c8b2dd4828cae1d1b176674c843e66b35
[ "MIT" ]
null
null
null
from django.db.models import fields from rest_framework import serializers from decimal import Decimal from .models import Cart, CartItem, Product, Collection, Customer, Order, OrderItem, Review from uuid import uuid4 class ReviewSerializer(serializers.ModelSerializer): class Meta: model = Review ...
33.929293
97
0.67401
from django.db.models import fields from rest_framework import serializers from decimal import Decimal from .models import Cart, CartItem, Product, Collection, Customer, Order, OrderItem, Review from uuid import uuid4 class ReviewSerializer(serializers.ModelSerializer): class Meta: model = Review ...
true
true
f71e2ba69c70290aca4d5103ca3a8346e15ea63b
6,154
py
Python
app/routes.py
vedala/microblog_cli
b48b21c1395e6ba0c1f851990d0e370cb6d09fee
[ "MIT" ]
null
null
null
app/routes.py
vedala/microblog_cli
b48b21c1395e6ba0c1f851990d0e370cb6d09fee
[ "MIT" ]
null
null
null
app/routes.py
vedala/microblog_cli
b48b21c1395e6ba0c1f851990d0e370cb6d09fee
[ "MIT" ]
null
null
null
from datetime import datetime from flask import render_template, flash, redirect, url_for, request from flask_login import login_user, logout_user, current_user, login_required from werkzeug.urls import url_parse from app import app, db from app.forms import LoginForm, RegistrationForm, EditProfileForm, \ EmptyForm...
37.29697
77
0.656321
from datetime import datetime from flask import render_template, flash, redirect, url_for, request from flask_login import login_user, logout_user, current_user, login_required from werkzeug.urls import url_parse from app import app, db from app.forms import LoginForm, RegistrationForm, EditProfileForm, \ EmptyForm...
true
true
f71e2c2c054051139eb8224bb194121ba49209d1
27,272
py
Python
src/transformers/configuration_utils.py
gaodong2/transformers
83984a61c657023a69e78951b338e378a0f866c2
[ "Apache-2.0" ]
77
2020-11-12T18:40:25.000Z
2022-03-27T06:41:30.000Z
src/transformers/configuration_utils.py
gaodong2/transformers
83984a61c657023a69e78951b338e378a0f866c2
[ "Apache-2.0" ]
7
2021-03-11T14:00:58.000Z
2022-01-18T05:51:22.000Z
src/transformers/configuration_utils.py
gaodong2/transformers
83984a61c657023a69e78951b338e378a0f866c2
[ "Apache-2.0" ]
23
2020-12-08T12:42:24.000Z
2022-02-11T13:55:24.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # 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 cop...
53.058366
281
0.635707
import copy import json import logging import os from typing import Any, Dict, Tuple from .file_utils import CONFIG_NAME, cached_path, hf_bucket_url, is_remote_url logger = logging.getLogger(__name__) class PretrainedConfig(object): model_type: str = "" def __init__(self, **kwargs): ...
true
true
f71e2c81e27ecbc20c0d52809f200f13303188d9
42,451
py
Python
tests/python/unittest/test_optimizer.py
qingyuanxingsi/incubator-mxnet
bbffdaf29459e15a703055e449a477a9862de8c6
[ "Apache-2.0" ]
1
2019-11-14T06:43:46.000Z
2019-11-14T06:43:46.000Z
tests/python/unittest/test_optimizer.py
greenpea0104/incubator-mxnet
fc9e70bf2d349ad4c6cb65ff3f0958e23a7410bf
[ "Apache-2.0" ]
null
null
null
tests/python/unittest/test_optimizer.py
greenpea0104/incubator-mxnet
fc9e70bf2d349ad4c6cb65ff3f0958e23a7410bf
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
40.896917
143
0.562649
import numpy as np import mxnet as mx import mxnet.lr_scheduler as lr_scheduler from mxnet import gluon import unittest from nose.tools import raises import math from mxnet.test_utils import * from common import setup_module, with_seed @with_seed() def test_learning_rate(): o1 = mx.optimizer.Optim...
true
true
f71e2c9e8f1cbeecfc7e957981439d2f7a58f3a4
648
py
Python
Task1D.py
cued-ia-computing/flood-jdv24-ahw41
b8d62b33281dfb01aec569998b88769ca6d06556
[ "MIT" ]
null
null
null
Task1D.py
cued-ia-computing/flood-jdv24-ahw41
b8d62b33281dfb01aec569998b88769ca6d06556
[ "MIT" ]
null
null
null
Task1D.py
cued-ia-computing/flood-jdv24-ahw41
b8d62b33281dfb01aec569998b88769ca6d06556
[ "MIT" ]
null
null
null
from floodsystem.stationdata import build_station_list from floodsystem.geo import rivers_with_station from floodsystem.geo import stations_by_river def run(): stations = build_station_list() riversWithStation = rivers_with_station(stations) print(len(riversWithStation), "stations. First 10 -", sorted(riv...
30.857143
89
0.697531
from floodsystem.stationdata import build_station_list from floodsystem.geo import rivers_with_station from floodsystem.geo import stations_by_river def run(): stations = build_station_list() riversWithStation = rivers_with_station(stations) print(len(riversWithStation), "stations. First 10 -", sorted(riv...
true
true
f71e2d970e1e3446eab8718d6147913ef60c7888
6,098
py
Python
test/mount_efs_test/test_describe_availability_zone.py
Git0ffS3c/efs-utils
e5e7252f88992d0ef2cf0bdac56c1d41644f4c44
[ "MIT" ]
null
null
null
test/mount_efs_test/test_describe_availability_zone.py
Git0ffS3c/efs-utils
e5e7252f88992d0ef2cf0bdac56c1d41644f4c44
[ "MIT" ]
null
null
null
test/mount_efs_test/test_describe_availability_zone.py
Git0ffS3c/efs-utils
e5e7252f88992d0ef2cf0bdac56c1d41644f4c44
[ "MIT" ]
null
null
null
# Copyright 2017-2018 Amazon.com, Inc. and its affiliates. All Rights Reserved. # # Licensed under the MIT License. See the LICENSE accompanying this file # for the specific language governing permissions and limitations under # the License. import mount_efs import pytest from botocore.exceptions import ClientError, E...
30.954315
88
0.699738
import mount_efs import pytest from botocore.exceptions import ClientError, EndpointConnectionError, NoCredentialsError from .. import utils MOCK_EC2_AGENT = "fake-client" AZ_NAME = "us-east-2b" AZ_ID = "use2-az2" OPERATION_NAME = "DescribeAvailabilityZones" def _test_describe_availability_zones_response( ...
true
true
f71e2e288d694a122eadc4d1b3f2262116c447ab
7,293
py
Python
rest_framework/tests/hyperlinkedserializers.py
asfaltboy/django-rest-framework
6d3bb67aa654d5f4c555746655a312000422d474
[ "Unlicense" ]
null
null
null
rest_framework/tests/hyperlinkedserializers.py
asfaltboy/django-rest-framework
6d3bb67aa654d5f4c555746655a312000422d474
[ "Unlicense" ]
null
null
null
rest_framework/tests/hyperlinkedserializers.py
asfaltboy/django-rest-framework
6d3bb67aa654d5f4c555746655a312000422d474
[ "Unlicense" ]
null
null
null
from django.conf.urls.defaults import patterns, url from django.test import TestCase from django.test.client import RequestFactory from rest_framework import generics, status, serializers from rest_framework.tests.models import Anchor, BasicModel, ManyToManyModel, BlogPost, BlogPostComment, Album, Photo factory = Requ...
34.079439
167
0.669135
from django.conf.urls.defaults import patterns, url from django.test import TestCase from django.test.client import RequestFactory from rest_framework import generics, status, serializers from rest_framework.tests.models import Anchor, BasicModel, ManyToManyModel, BlogPost, BlogPostComment, Album, Photo factory = Requ...
true
true
f71e2e36831ac465a1adbb26b80e5430c3a328c4
1,827
py
Python
pymcxray/FileFormat/Results/test_Dump.py
drix00/pymcxray
bf650aa0f31c635040a6cb79fe1cb7ecf27b8990
[ "Apache-2.0" ]
1
2020-07-23T12:13:30.000Z
2020-07-23T12:13:30.000Z
pymcxray/FileFormat/Results/test_Dump.py
drix00/pymcxray
bf650aa0f31c635040a6cb79fe1cb7ecf27b8990
[ "Apache-2.0" ]
3
2017-03-05T16:09:30.000Z
2017-03-05T16:11:41.000Z
pymcxray/FileFormat/Results/test_Dump.py
drix00/pymcxray
bf650aa0f31c635040a6cb79fe1cb7ecf27b8990
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ .. py:currentmodule:: FileFormat.Results.test_Dump .. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca> Tests for module `Dump` """ # Script information for the file. __author__ = "Hendrix Demers (hendrix.demers@mail.mcgill.ca)" __version__ = "" __date__ = "" __copyright__ = "Cop...
23.126582
106
0.654625
__author__ = "Hendrix Demers (hendrix.demers@mail.mcgill.ca)" __version__ = "" __date__ = "" __copyright__ = "Copyright (c) 2012 Hendrix Demers" __license__ = "" __svnRevision__ = "$Revision$" __svnDate__ = "$Date$" __svnId__ = "$Id$" import unittest import logging import os import pymcxray.FileFormat.Resu...
true
true
f71e2f73e8bfacab772375103ad09d6f547eb6cf
2,226
py
Python
eplaunch/interface/welcome_dialog.py
wta12/EP-Launch
ac62691cfbb595153f658b8757ce1e089861d456
[ "BSD-3-Clause" ]
7
2018-11-06T12:45:57.000Z
2021-07-06T07:56:02.000Z
eplaunch/interface/welcome_dialog.py
wta12/EP-Launch
ac62691cfbb595153f658b8757ce1e089861d456
[ "BSD-3-Clause" ]
128
2018-07-16T16:09:40.000Z
2021-12-16T17:13:42.000Z
eplaunch/interface/welcome_dialog.py
wta12/EP-Launch
ac62691cfbb595153f658b8757ce1e089861d456
[ "BSD-3-Clause" ]
3
2020-02-07T21:01:34.000Z
2022-01-06T05:00:17.000Z
import webbrowser import wx from eplaunch import DOCS_URL, VERSION # wx callbacks need an event argument even though we usually don't use it, so the next line disables that check # noinspection PyUnusedLocal class WelcomeDialog(wx.Dialog): CLOSE_SIGNAL_OK = 0 def __init__(self, *args, **kwargs): su...
43.647059
113
0.721923
import webbrowser import wx from eplaunch import DOCS_URL, VERSION # noinspection PyUnusedLocal class WelcomeDialog(wx.Dialog): CLOSE_SIGNAL_OK = 0 def __init__(self, *args, **kwargs): super(WelcomeDialog, self).__init__(*args, **kwargs) self.SetTitle("EP-Launch") this_border = 12 ...
true
true