hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
796f13a88fef4348f5bbc832d4f7dcb25f1fae78 | 1,122 | py | Python | Clients/PythonCatalyst/Testing/CatalystScriptCustomCallbackVerifier.py | a17r/ParaView | 6c6a5b8928c2e7a2289fbe8c543685e1d8843575 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-12-10T09:22:18.000Z | 2020-12-10T09:22:18.000Z | Clients/PythonCatalyst/Testing/CatalystScriptCustomCallbackVerifier.py | a17r/ParaView | 6c6a5b8928c2e7a2289fbe8c543685e1d8843575 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | Clients/PythonCatalyst/Testing/CatalystScriptCustomCallbackVerifier.py | a17r/ParaView | 6c6a5b8928c2e7a2289fbe8c543685e1d8843575 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # script-version: 2.0
r"""A test to ensure all custom functions supported by Catalyst
Scripts V2 are called appropriately"""
counters = {}
def update_counter(f):
def wrapper(*args, **kwargs):
global counters
count = counters.get(f.__name__, 0)
counters[f.__name__] = count + 1
retu... | 26.093023 | 70 | 0.700535 |
796f14064a9492ca2e8da8ca02d47b20e0a563c5 | 22,213 | py | Python | src/pnlf/analyse.py | fschmnn/pymuse | 91e97d03a3eb1ccc02131f4e731e6bb5df66772c | [
"MIT"
] | 2 | 2020-05-09T21:24:29.000Z | 2020-05-27T15:11:31.000Z | src/pnlf/analyse.py | fschmnn/pymuse | 91e97d03a3eb1ccc02131f4e731e6bb5df66772c | [
"MIT"
] | null | null | null | src/pnlf/analyse.py | fschmnn/pymuse | 91e97d03a3eb1ccc02131f4e731e6bb5df66772c | [
"MIT"
] | null | null | null | import logging # use instead of print for more control
from pathlib import Path # filesystem related stuff
import numpy as np # numerical computations
from matplotlib.pyplot import subplots, figure, savefig
import matplotlib.pyplot as plt
from astropy.stats import sigma_clipped_stats # calcua... | 40.608775 | 258 | 0.630081 |
796f1452fccabcb12285182f4482294963e45e59 | 51,562 | py | Python | tests/full_node/test_full_node.py | altendky/chia-blockchain | f745601d810a27e7c3887216199a6637a0261573 | [
"Apache-2.0"
] | null | null | null | tests/full_node/test_full_node.py | altendky/chia-blockchain | f745601d810a27e7c3887216199a6637a0261573 | [
"Apache-2.0"
] | 1 | 2020-11-01T15:24:50.000Z | 2020-11-01T15:24:50.000Z | tests/full_node/test_full_node.py | altendky/chia-blockchain | f745601d810a27e7c3887216199a6637a0261573 | [
"Apache-2.0"
] | null | null | null | import asyncio
import pytest
import random
import time
from typing import Dict
from secrets import token_bytes
from src.protocols import (
full_node_protocol as fnp,
timelord_protocol,
wallet_protocol,
)
from src.server.outbound_message import NodeType
from src.types.peer_info import TimestampedPeerInfo, P... | 37.041667 | 107 | 0.602556 |
796f14b06c69d13bb76f5269eab82122cd5503d5 | 9,517 | py | Python | gui.py | pkumath/datastructure | 0b440b59af73ed73c575df5cd1c67946aa510dba | [
"MIT"
] | 4 | 2020-05-19T05:38:37.000Z | 2020-05-27T04:14:17.000Z | gui.py | pkumath/datastructure | 0b440b59af73ed73c575df5cd1c67946aa510dba | [
"MIT"
] | null | null | null | gui.py | pkumath/datastructure | 0b440b59af73ed73c575df5cd1c67946aa510dba | [
"MIT"
] | 1 | 2020-05-19T05:41:53.000Z | 2020-05-19T05:41:53.000Z | import tkinter as tk
from tkinter import filedialog as tkfiledialog
from tkinter import messagebox as tkmessagebox
from pathlib import Path
import sys
import pyperclip
from multiprocessing import Process
import threading
import webbrowser
import os
from appdirs import *
import logging as log
import inkscape_control
f... | 35.913208 | 222 | 0.645056 |
796f15245efc2ab7adb37a4a9ade6882104a024e | 4,123 | py | Python | lyron-vis.py | sergiogcharles/Quant-Noisier | 3efbe4276999f973a7182c15daa06a5018e751a6 | [
"MIT"
] | null | null | null | lyron-vis.py | sergiogcharles/Quant-Noisier | 3efbe4276999f973a7182c15daa06a5018e751a6 | [
"MIT"
] | null | null | null | lyron-vis.py | sergiogcharles/Quant-Noisier | 3efbe4276999f973a7182c15daa06a5018e751a6 | [
"MIT"
] | null | null | null | import argparse
from fairseq.models.roberta import RobertaModel
import plotly
import numpy as np
import plotly.graph_objs as go
from sklearn.decomposition import PCA
from tqdm import tqdm
def main():
roberta_unquantized = RobertaModel.from_pretrained("checkpoints/roberta/rte-no-quant-noise", "checkpoint_best.pt... | 39.266667 | 151 | 0.663594 |
796f16b6b5ed3316352631c8c38caf5bfe841b13 | 1,198 | py | Python | Mundo 2/ex044.py | Alef-Martins/Exercicios_python_mundo-2 | 5d2b27448666c18c9307e1775811c46759a993c3 | [
"MIT"
] | null | null | null | Mundo 2/ex044.py | Alef-Martins/Exercicios_python_mundo-2 | 5d2b27448666c18c9307e1775811c46759a993c3 | [
"MIT"
] | null | null | null | Mundo 2/ex044.py | Alef-Martins/Exercicios_python_mundo-2 | 5d2b27448666c18c9307e1775811c46759a993c3 | [
"MIT"
] | null | null | null | #'''Escreva um programa que calcule o valor a ser pago por um produto, considerando o seu preço normal e condição de págamento:
# [1] a vista em dinheiro: 10% de desconto
# [2] A vista no cartão: 5% de desconto
# [3] Em atŕ 2x no cartão: Preço normal
# [4] 3x ou mais: 20% de juros'''
preço = float(input('Valor da compr... | 39.933333 | 127 | 0.660267 |
796f174bb7b0a1bb023b893f4fdaf378d86fc73a | 15,534 | py | Python | king_phisher/server/database/manager.py | padfoot999/king-phisher | d09ca94900c32bc5b292685e0ec84b9ad093301f | [
"BSD-3-Clause"
] | 1 | 2016-10-20T14:58:09.000Z | 2016-10-20T14:58:09.000Z | king_phisher/server/database/manager.py | padfoot999/king-phisher | d09ca94900c32bc5b292685e0ec84b9ad093301f | [
"BSD-3-Clause"
] | null | null | null | king_phisher/server/database/manager.py | padfoot999/king-phisher | d09ca94900c32bc5b292685e0ec84b9ad093301f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# king_phisher/server/database/manager.py
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# ... | 42.211957 | 196 | 0.771855 |
796f1753fde9dd655309fd605c0b65f7dc66c8ae | 8,125 | py | Python | Tester/MNIST_exploration.py | MartinHex/master-thesis | b5077d9acce60fd42467f73df6e39c61fd3e19b2 | [
"MIT"
] | null | null | null | Tester/MNIST_exploration.py | MartinHex/master-thesis | b5077d9acce60fd42467f73df6e39c61fd3e19b2 | [
"MIT"
] | 2 | 2022-02-22T11:48:21.000Z | 2022-02-28T15:49:47.000Z | Tester/MNIST_exploration.py | MartinHex/master-thesis | b5077d9acce60fd42467f73df6e39c61fd3e19b2 | [
"MIT"
] | null | null | null | from Models.MNIST_Model import MNIST_Model as Model
from Dataloaders.Mnist import Mnist as Dataloader
from Clients.SGDClient import SGDClient as Client
from Servers.FedKpServer import FedKpServer
from Servers.FedAvgServer import FedAvgServer
from Algorithms.FedAvg import FedAvg as Alg
import matplotlib.pyplot as plt
fr... | 37.270642 | 103 | 0.623015 |
796f1893606a273e898dcfb248171a079b15191a | 18,797 | py | Python | telfhash/telfhash.py | pombredanne/telfhash | 65ce3874b999bc209c8f597a507a4c7edf723ced | [
"Apache-2.0"
] | 61 | 2020-04-20T15:01:42.000Z | 2022-03-15T07:31:17.000Z | telfhash/telfhash.py | pombredanne/telfhash | 65ce3874b999bc209c8f597a507a4c7edf723ced | [
"Apache-2.0"
] | 16 | 2020-11-25T15:07:33.000Z | 2022-03-08T21:51:32.000Z | telfhash/telfhash.py | pombredanne/telfhash | 65ce3874b999bc209c8f597a507a4c7edf723ced | [
"Apache-2.0"
] | 13 | 2020-04-23T00:34:03.000Z | 2022-01-22T14:59:14.000Z | #!/usr/bin/env python
"""
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")... | 30.814754 | 174 | 0.630633 |
796f194c2cdddd67100d67a22af371855c3cadfe | 3,792 | py | Python | inventoryanalytics/forecasting/sma.py | vishalbelsare/inventoryanalytics | 85feff8f1abaf2c29414e066eed096ac3a74973b | [
"MIT"
] | null | null | null | inventoryanalytics/forecasting/sma.py | vishalbelsare/inventoryanalytics | 85feff8f1abaf2c29414e066eed096ac3a74973b | [
"MIT"
] | null | null | null | inventoryanalytics/forecasting/sma.py | vishalbelsare/inventoryanalytics | 85feff8f1abaf2c29414e066eed096ac3a74973b | [
"MIT"
] | null | null | null | '''
inventoryanalytics: a Python library for Inventory Analytics
Author: Roberto Rossi
MIT License
Copyright (c) 2018 Roberto Rossi
'''
# Importing everything from above
#from sklearn.metrics import r2_score, median_absolute_error, mean_absolute_error
#from sklearn.metrics import median_absolute_error, mean_squa... | 33.857143 | 96 | 0.718354 |
796f1a33a69cabb400f2bbecc24a281062800a30 | 1,185 | py | Python | var/spack/repos/builtin/packages/ambari/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/ambari/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/ambari/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Ambari(PythonPackage):
"""Apache Ambari is a tool for provisioning, managing, and monitori... | 45.576923 | 95 | 0.748523 |
796f1abbd63664fa6b43e772f9cff875628fa395 | 2,712 | py | Python | main.py | lemariva/uPython-Geo | 1df8071b794d2ade157f939e939a344a0e7d495d | [
"Apache-2.0"
] | 6 | 2017-12-31T16:19:16.000Z | 2021-04-26T02:03:30.000Z | main.py | lemariva/uPython-Geo | 1df8071b794d2ade157f939e939a344a0e7d495d | [
"Apache-2.0"
] | null | null | null | main.py | lemariva/uPython-Geo | 1df8071b794d2ade157f939e939a344a0e7d495d | [
"Apache-2.0"
] | null | null | null | #Copyright [2017] [Mauro Riva <lemariva@mail.com> <lemariva.com>]
#
#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 l... | 31.172414 | 90 | 0.659661 |
796f1b46ed2865080fcf4a9102b68c201f1575cb | 526 | py | Python | backpack/core/derivatives/sigmoid.py | paulkogni/backpack | 3122de062d5bbcdcba8f8e02d24adb1bd2cdada6 | [
"MIT"
] | null | null | null | backpack/core/derivatives/sigmoid.py | paulkogni/backpack | 3122de062d5bbcdcba8f8e02d24adb1bd2cdada6 | [
"MIT"
] | null | null | null | backpack/core/derivatives/sigmoid.py | paulkogni/backpack | 3122de062d5bbcdcba8f8e02d24adb1bd2cdada6 | [
"MIT"
] | null | null | null | from torch.nn import Sigmoid
from backpack.core.derivatives.elementwise import ElementwiseDerivatives
class SigmoidDerivatives(ElementwiseDerivatives):
def get_module(self):
return Sigmoid
def hessian_is_zero(self):
return False
def hessian_is_diagonal(self):
return True
de... | 25.047619 | 76 | 0.688213 |
796f1b5f029051a4dd96253feed07d2b21e3310d | 7,644 | py | Python | src/learners/coma_learner.py | benellis3/pymarl2 | 0875995a0e0b9692ea64484478b369c7f6c0cf44 | [
"Apache-2.0"
] | 401 | 2021-02-23T02:42:42.000Z | 2022-03-21T08:22:37.000Z | src/learners/coma_learner.py | benellis3/pymarl2 | 0875995a0e0b9692ea64484478b369c7f6c0cf44 | [
"Apache-2.0"
] | 21 | 2021-04-10T10:05:07.000Z | 2022-03-29T10:09:03.000Z | src/learners/coma_learner.py | benellis3/pymarl2 | 0875995a0e0b9692ea64484478b369c7f6c0cf44 | [
"Apache-2.0"
] | 90 | 2021-02-15T08:37:04.000Z | 2022-03-21T06:37:15.000Z | import copy
from components.episode_buffer import EpisodeBatch
from modules.critics.coma import COMACritic
from utils.rl_utils import build_td_lambda_targets
from torch.distributions import Categorical
import torch as th
from torch.optim import Adam
class COMALearner:
def __init__(self, mac, scheme, logger, args)... | 42.94382 | 136 | 0.628205 |
796f1be7021e024b565b188262b2740ace5f7b1a | 1,764 | py | Python | testmypy/build_config.py | MagedMohamedTurk/Python-Test-Function | d7ad4f8044e0780407621070a7229e4ebfca0331 | [
"CNRI-Python"
] | 1 | 2021-11-17T11:04:40.000Z | 2021-11-17T11:04:40.000Z | testmypy/build_config.py | MagedMohamedTurk/Python-Test-Function | d7ad4f8044e0780407621070a7229e4ebfca0331 | [
"CNRI-Python"
] | null | null | null | testmypy/build_config.py | MagedMohamedTurk/Python-Test-Function | d7ad4f8044e0780407621070a7229e4ebfca0331 | [
"CNRI-Python"
] | null | null | null | import ruamel.yaml
import os
# get the path of the current directory
path = os.getcwd()
# Check if file exists
while os.path.exists('config.yaml'):
warning = input('Warning!! file already exists. Do you want to Overwrite?(Y-n)')
if warning.lower() in ['n', 'no']:
exit()
elif warning.lower() in ['y',... | 29.4 | 84 | 0.566327 |
796f1cc956c7be65129fd4318205434dd4d39952 | 1,812 | py | Python | src/trees/binary_tree.py | mlatifi/Python-and-Algorithms-and-Data-Structures | 47fed555093b0797a5d8043573a3278028b26a2b | [
"MIT"
] | 5 | 2017-08-03T06:33:49.000Z | 2021-08-06T13:20:57.000Z | src/trees/binary_tree.py | ritahu/Python-and-Algorithms-and-Data-Structures | d2c082d261a68b06f533703867ae8a90ac7f4df1 | [
"MIT"
] | null | null | null | src/trees/binary_tree.py | ritahu/Python-and-Algorithms-and-Data-Structures | d2c082d261a68b06f533703867ae8a90ac7f4df1 | [
"MIT"
] | 6 | 2017-04-27T13:30:49.000Z | 2020-11-01T20:28:55.000Z | #!/usr/bin/python
__author__ = "bt3"
class Node(object):
def __init__(self, item=None,):
self.item = item
self.left = None
self.right = None
def __repr__(self):
return '{}'.format(self.item)
def _add(self, value):
new_node = Node(value)
if not self.ite... | 18.680412 | 55 | 0.541391 |
796f1eb7e98658009457b4ee9fbb32d58b4d609e | 4,202 | py | Python | tests_unit/parsing/test_query_grammar.py | albertteoh/libddog | 9018bd07a2c42a6cbd344995a22b8b3ae450a1f8 | [
"MIT"
] | 5 | 2021-07-30T02:09:46.000Z | 2021-12-23T02:45:07.000Z | tests_unit/parsing/test_query_grammar.py | albertteoh/libddog | 9018bd07a2c42a6cbd344995a22b8b3ae450a1f8 | [
"MIT"
] | 28 | 2021-07-27T22:53:27.000Z | 2021-11-18T22:03:31.000Z | tests_unit/parsing/test_query_grammar.py | albertteoh/libddog | 9018bd07a2c42a6cbd344995a22b8b3ae450a1f8 | [
"MIT"
] | 1 | 2022-03-18T04:29:28.000Z | 2022-03-18T04:29:28.000Z | import sys
from parsimonious.exceptions import IncompleteParseError, ParseError
from libddog.parsing.query_parser import QueryParser
def test_grammar() -> None:
single_query_cases = [
("minimal query", "avg:svcname"),
("suspect: no aggregation", "svcname"),
# multipart name
("mul... | 46.688889 | 88 | 0.570205 |
796f1ec36ebdb70abdef98e6b4aa8b602d185dd3 | 320 | py | Python | tests/test_utils.py | sohinik/workspace-tools | 3cc8aac5b7a0df9221dcf9359d94cc5074579020 | [
"MIT"
] | 3 | 2018-08-22T20:52:32.000Z | 2020-12-01T21:22:46.000Z | tests/test_utils.py | sohinik/workspace-tools | 3cc8aac5b7a0df9221dcf9359d94cc5074579020 | [
"MIT"
] | 3 | 2019-04-10T02:30:39.000Z | 2020-06-02T01:58:26.000Z | tests/test_utils.py | sohinik/workspace-tools | 3cc8aac5b7a0df9221dcf9359d94cc5074579020 | [
"MIT"
] | 4 | 2019-04-08T20:00:22.000Z | 2020-06-01T18:25:49.000Z | from workspace.utils import shortest_id
def test_shortest_id():
assert shortest_id('apple', ['orange', 'banana']) == 'a'
assert shortest_id('apple', ['apricot', 'banana']) == 'app'
assert shortest_id('apple', ['apple seed', 'banana']) == 'apple'
assert shortest_id('apple', ['apple', 'banana']) == 'a'
| 35.555556 | 68 | 0.634375 |
796f205f6ccd2c9b7755a4bfaa4f30f9f0cb6421 | 724 | py | Python | tests/paradrop/core/auth/test_user.py | lhartung/paradrop-test | 22a491bf3198bf61bcabaedfaecde5b9be97e76f | [
"Apache-2.0"
] | 76 | 2015-08-24T18:15:20.000Z | 2021-12-06T20:03:19.000Z | tests/paradrop/core/auth/test_user.py | leilei1881/Paradrop | 546464e075f8a226b9eb4fe444390dc5c8527ad9 | [
"Apache-2.0"
] | 35 | 2015-07-07T22:27:49.000Z | 2022-03-01T17:13:40.000Z | tests/paradrop/core/auth/test_user.py | lhartung/paradrop-test | 22a491bf3198bf61bcabaedfaecde5b9be97e76f | [
"Apache-2.0"
] | 27 | 2016-02-03T22:00:09.000Z | 2021-09-26T16:59:38.000Z | from paradrop.core.auth import user
def test_User():
user1 = user.User("user1", "localhost")
user1_copy = user.User("user1", "localhost")
# Test equality
assert user1 == user1_copy
assert user1_copy == user1
assert user1 != user2
assert user2 != user1
# Test internal user
intern... | 24.965517 | 57 | 0.656077 |
796f20bb13ee4e92009e642da85a8777ab8ca545 | 9,103 | py | Python | kcwidrp/primitives/ReadAtlas.py | MNBrod/KCWI_DRP | 9331a545879f647ed83ceb9c7d925770b254a8eb | [
"BSD-3-Clause"
] | 5 | 2020-04-09T20:05:52.000Z | 2021-08-04T18:04:28.000Z | kcwidrp/primitives/ReadAtlas.py | MNBrod/KCWI_DRP | 9331a545879f647ed83ceb9c7d925770b254a8eb | [
"BSD-3-Clause"
] | 80 | 2020-03-19T00:35:27.000Z | 2022-03-07T20:08:23.000Z | kcwidrp/primitives/ReadAtlas.py | MNBrod/KCWI_DRP | 9331a545879f647ed83ceb9c7d925770b254a8eb | [
"BSD-3-Clause"
] | 9 | 2021-01-22T02:00:32.000Z | 2022-02-08T19:43:16.000Z | from keckdrpframework.primitives.base_primitive import BasePrimitive
from kcwidrp.core.bokeh_plotting import bokeh_plot
from bokeh.plotting import figure
from bokeh.models import Range1d
import pkg_resources
import os
from astropy.io import fits as pf
import numpy as np
from scipy.ndimage import gaussian_filter1d
from... | 45.743719 | 80 | 0.537076 |
796f20d5d52c4c1d42792b7e5861f4062baf6e5c | 543 | py | Python | SALARY_PREDICTOR.py | yashtailor/SALARY_PREDICTOR | d0fa384400ee3d319d3cbfda8f714d6cd2ca7b69 | [
"MIT"
] | null | null | null | SALARY_PREDICTOR.py | yashtailor/SALARY_PREDICTOR | d0fa384400ee3d319d3cbfda8f714d6cd2ca7b69 | [
"MIT"
] | null | null | null | SALARY_PREDICTOR.py | yashtailor/SALARY_PREDICTOR | d0fa384400ee3d319d3cbfda8f714d6cd2ca7b69 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 21 14:23:40 2019
@author: yash
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
dataset = pd.read_csv('Salary_Data.csv')
x = dataset.iloc[:,:-1].values
y = dataset.iloc[:,1].values
from sklearn.cross_validation import train_test_split
x_train,... | 23.608696 | 82 | 0.764273 |
796f20eca7c4d9fdd5f77485b97dba7f95b0c8ee | 6,363 | py | Python | tf2_ros_py/test/test_buffer.py | grishalipenko/geometry2 | 2e8defe64e25b501c27f8b864d9094ab15952630 | [
"BSD-3-Clause"
] | null | null | null | tf2_ros_py/test/test_buffer.py | grishalipenko/geometry2 | 2e8defe64e25b501c27f8b864d9094ab15952630 | [
"BSD-3-Clause"
] | null | null | null | tf2_ros_py/test/test_buffer.py | grishalipenko/geometry2 | 2e8defe64e25b501c27f8b864d9094ab15952630 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019 Open Source Robotics Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this lis... | 41.318182 | 94 | 0.703599 |
796f221d173f30292d3eb22a3446a76c1c112648 | 237 | py | Python | Github Data Structures and Algos/Number Theory/Prime factorization.py | Saadkhalid913/DataStructuresAndAlgorithms- | 7dedf0be867c8a277716812ba3acd9b5db0106b1 | [
"MIT"
] | null | null | null | Github Data Structures and Algos/Number Theory/Prime factorization.py | Saadkhalid913/DataStructuresAndAlgorithms- | 7dedf0be867c8a277716812ba3acd9b5db0106b1 | [
"MIT"
] | null | null | null | Github Data Structures and Algos/Number Theory/Prime factorization.py | Saadkhalid913/DataStructuresAndAlgorithms- | 7dedf0be867c8a277716812ba3acd9b5db0106b1 | [
"MIT"
] | null | null | null | def primes(n):
prime = []
i = 2
while i < n:
if n % i > 0:
i += 1
elif n % i == 0:
n //= i
prime += [i]
if n == i:
prime += [i]
return prime
| 15.8 | 25 | 0.2827 |
796f22834911fbdb63874a7a8d97d7334afbabb6 | 927 | py | Python | issue_tests/test_issue5/issue5.py | alexgorji/music_score | b4176da52295361f3436826903485c5cb8054c5e | [
"MIT"
] | 2 | 2020-06-22T13:33:28.000Z | 2020-12-30T15:09:00.000Z | issue_tests/test_issue5/issue5.py | alexgorji/music_score | b4176da52295361f3436826903485c5cb8054c5e | [
"MIT"
] | 37 | 2020-02-18T12:15:00.000Z | 2021-12-13T20:01:14.000Z | issue_tests/test_issue5/issue5.py | alexgorji/music_score | b4176da52295361f3436826903485c5cb8054c5e | [
"MIT"
] | null | null | null | import os
from unittest import TestCase
from musicscore.musicstream.streamvoice import SimpleFormat
from musicscore.musictree.treescoretimewise import TreeScoreTimewise
path = str(os.path.abspath(__file__).split('.')[0])
class Test(TestCase):
def setUp(self) -> None:
self.simple_format = SimpleFormat(qu... | 30.9 | 68 | 0.673139 |
796f24c57d047af46f1737c07b6c5c33eb39ff04 | 174,790 | py | Python | tofu/data/_core.py | WinstonLHS/tofu | c95b2eb6aedcf4bac5676752b9635b78f31af6ca | [
"MIT"
] | 6 | 2016-09-15T17:01:19.000Z | 2017-03-06T22:53:10.000Z | tofu/data/_core.py | WinstonLHS/tofu | c95b2eb6aedcf4bac5676752b9635b78f31af6ca | [
"MIT"
] | 9 | 2016-09-14T17:23:52.000Z | 2017-04-13T07:30:07.000Z | tofu/data/_core.py | Didou09/tofu | 4a4e1f058bab8e7556ed9d518f90807cec605476 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Built-in
import sys
import os
import itertools as itt
import copy
import warnings
from abc import ABCMeta, abstractmethod
import inspect
# Common
import numpy as np
import scipy.interpolate as scpinterp
import matplotlib.pyplot as plt
from matplotlib.tri import Triangulation as mplTri
# to... | 39.688919 | 90 | 0.47235 |
796f25a2a1bff72742be9c31f1f1dfea76cdc619 | 12,046 | py | Python | imagetyperz/client.py | theY4Kman/imagetyperz-async | bfad9b3c9d6a762dec7183dbd7f2e5c7d9b4bd97 | [
"MIT"
] | 2 | 2020-10-05T13:34:49.000Z | 2021-07-29T08:01:25.000Z | imagetyperz/client.py | theY4Kman/imagetyperz-async | bfad9b3c9d6a762dec7183dbd7f2e5c7d9b4bd97 | [
"MIT"
] | null | null | null | imagetyperz/client.py | theY4Kman/imagetyperz-async | bfad9b3c9d6a762dec7183dbd7f2e5c7d9b4bd97 | [
"MIT"
] | null | null | null | """
Async client for the imagetyperz API
Implementation details from: https://github.com/imagetyperz-api/imagetyperz-api-python3
API Docs: https://www.imagetyperz.com/Forms/api/api.html
Additional docs: https://github.com/imagetyperz-api/API-docs
"""
import asyncio
from base64 import b64encode
from datetime import dat... | 34.221591 | 100 | 0.603022 |
796f25d762bd7da8701eee776dc7f0616b75a9cd | 9,755 | py | Python | uf/application/gpt2.py | onlyrico/unif | 2732e5e4944b38ba39a9b5a14297cc91681fc4b2 | [
"Apache-2.0"
] | 93 | 2020-10-08T10:20:22.000Z | 2022-03-09T02:37:17.000Z | uf/application/gpt2.py | onlyrico/unif | 2732e5e4944b38ba39a9b5a14297cc91681fc4b2 | [
"Apache-2.0"
] | 9 | 2020-10-20T03:16:10.000Z | 2022-02-21T02:33:28.000Z | uf/application/gpt2.py | onlyrico/unif | 2732e5e4944b38ba39a9b5a14297cc91681fc4b2 | [
"Apache-2.0"
] | 23 | 2020-10-13T01:10:16.000Z | 2022-03-01T01:45:45.000Z | # coding:=utf-8
# Copyright 2021 Tencent. 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 applic... | 34.348592 | 77 | 0.597437 |
796f263c83242e7bd4405c9d1de080441db3a173 | 24,840 | py | Python | scripts/performance/blas/alltime.py | TorreZuk/rocBLAS | 925015654da36d26a8afbcbfbbd8866280b7de32 | [
"MIT"
] | null | null | null | scripts/performance/blas/alltime.py | TorreZuk/rocBLAS | 925015654da36d26a8afbcbfbbd8866280b7de32 | [
"MIT"
] | 1 | 2020-04-02T22:42:48.000Z | 2020-04-02T22:42:48.000Z | scripts/performance/blas/alltime.py | leekillough/rocBLAS | d5a737d873a787359f468448fd56356e25505970 | [
"MIT"
] | 1 | 2019-11-29T22:28:02.000Z | 2019-11-29T22:28:02.000Z | #!/usr/bin/python3
import sys, getopt
sys.path.append('../../../clients/common/')
import numpy as np
from math import *
import subprocess
import os
import re # regexp package
import shutil
import tempfile
import rocblas_gentest as gt
import getspecs
usage = '''A timing script for rocBLAS the generates plots
Usage:
... | 30.857143 | 200 | 0.540177 |
796f264444753a20970f6aa7ffa36b7e5a7b8981 | 4,684 | py | Python | vendor/github.com/google/go-jsonnet/cpp-jsonnet/case_studies/micromanage/validate.py | rich-jowett/kubeless | ab6f0c47e4dbcbc8226eb7e73f4897ff4e675a5f | [
"Apache-2.0"
] | 36 | 2019-05-22T08:36:40.000Z | 2020-12-04T09:27:21.000Z | vendor/github.com/google/go-jsonnet/cpp-jsonnet/case_studies/micromanage/validate.py | rich-jowett/kubeless | ab6f0c47e4dbcbc8226eb7e73f4897ff4e675a5f | [
"Apache-2.0"
] | 8 | 2021-03-02T01:46:37.000Z | 2022-03-03T23:24:24.000Z | vendor/github.com/google/go-jsonnet/cpp-jsonnet/case_studies/micromanage/validate.py | rich-jowett/kubeless | ab6f0c47e4dbcbc8226eb7e73f4897ff4e675a5f | [
"Apache-2.0"
] | 3 | 2019-09-02T04:05:06.000Z | 2020-03-11T06:18:36.000Z | # Copyright 2015 Google Inc. 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 law or ag... | 28.047904 | 97 | 0.633219 |
796f268f430c7fc5418df503ec0e5d521618535d | 12,175 | py | Python | yt_dlp/extractor/mixcloud.py | nxtreaming/yt-dlp | 385ffb467b2285e85a2a5495b90314ba1f8e0700 | [
"Unlicense"
] | 11 | 2022-01-06T22:09:50.000Z | 2022-03-12T22:26:22.000Z | yt_dlp/extractor/mixcloud.py | nxtreaming/yt-dlp | 385ffb467b2285e85a2a5495b90314ba1f8e0700 | [
"Unlicense"
] | 4 | 2022-02-25T08:20:18.000Z | 2022-03-17T16:16:20.000Z | yt_dlp/extractor/mixcloud.py | nxtreaming/yt-dlp | 385ffb467b2285e85a2a5495b90314ba1f8e0700 | [
"Unlicense"
] | 3 | 2022-02-19T08:59:13.000Z | 2022-03-06T16:11:21.000Z | import itertools
from .common import InfoExtractor
from ..compat import (
compat_b64decode,
compat_chr,
compat_ord,
compat_str,
compat_urllib_parse_unquote,
)
from ..utils import (
ExtractorError,
int_or_none,
parse_iso8601,
strip_or_none,
try_get,
)
class MixcloudBaseIE(InfoE... | 33.174387 | 150 | 0.551951 |
796f278e56df9000894426e1585c014d6d6183a4 | 547 | py | Python | fe_cipher/models/areas/line.py | uakihir0/fecipher | dd5c2a0d47d2701570b43f4906bdec993f4d571c | [
"MIT"
] | 3 | 2020-01-16T10:53:26.000Z | 2020-01-16T10:53:40.000Z | fe_cipher/models/areas/line.py | uakihir0/fecipher | dd5c2a0d47d2701570b43f4906bdec993f4d571c | [
"MIT"
] | null | null | null | fe_cipher/models/areas/line.py | uakihir0/fecipher | dd5c2a0d47d2701570b43f4906bdec993f4d571c | [
"MIT"
] | 1 | 2020-01-16T11:08:15.000Z | 2020-01-16T11:08:15.000Z | # -*- coding: utf-8 -*-
from fe_cipher.models.unit import Unit
# 戦線
class Line:
is_front = False # 前
is_back = False # 後
# ユニット (0 が一番左)
units: [Unit] = []
def __init__(self, is_front: bool):
self.is_front = is_front
self.is_back = not is_front
# ユニットを追加
def add_unit(s... | 20.259259 | 46 | 0.57404 |
796f296a441150d78e9a86e917514d6195aea1e5 | 5,488 | py | Python | emlp/nn/flax.py | researchworking/ScalarEMLP | 675f451953f58653104374aa50ccb764af5d84b1 | [
"MIT"
] | 12 | 2021-11-01T15:18:23.000Z | 2022-03-24T10:50:23.000Z | emlp/nn/flax.py | researchworking/ScalarEMLP | 675f451953f58653104374aa50ccb764af5d84b1 | [
"MIT"
] | null | null | null | emlp/nn/flax.py | researchworking/ScalarEMLP | 675f451953f58653104374aa50ccb764af5d84b1 | [
"MIT"
] | 5 | 2021-12-02T05:43:39.000Z | 2022-03-29T02:06:57.000Z | import jax
import jax.numpy as jnp
import numpy as np
from emlp.reps import T,Rep,Scalar
from emlp.reps import bilinear_weights
#from emlp.reps import LinearOperator # why does this not work?
from emlp.reps.linear_operator_base import LinearOperator
from emlp.reps.product_sum_reps import SumRep
from emlp.groups import ... | 35.406452 | 105 | 0.680211 |
796f29e55c5f2841b5890fbe91b011621167599a | 3,085 | py | Python | app/core/speedbot.py | JonathanArrance/speedbot | 33cadaae157ccfb35688147c4662eaa7383e3f02 | [
"MIT"
] | null | null | null | app/core/speedbot.py | JonathanArrance/speedbot | 33cadaae157ccfb35688147c4662eaa7383e3f02 | [
"MIT"
] | null | null | null | app/core/speedbot.py | JonathanArrance/speedbot | 33cadaae157ccfb35688147c4662eaa7383e3f02 | [
"MIT"
] | 1 | 2020-10-30T21:14:25.000Z | 2020-10-30T21:14:25.000Z | #!/usr/bin/env python
#import schedule
import settings
import time
import logging
from speedbot_lib import speedbot
from prom_lib import prometheus as prom
from lcd_lib import LCD as LCD16
from lcd_lib_2004 import LCD as LCD24
def turn_off_lcd():
pass
def main():
"""
DESC: Main method
INPUT: None
... | 30.245098 | 111 | 0.553971 |
796f2a23178eec6b030537f43873b4cfc46dbd3a | 583 | py | Python | lib/galaxy/model/migrate/versions/0160_hda_set_deleted_if_purged_again.py | rikeshi/galaxy | c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a | [
"CC-BY-3.0"
] | 4 | 2015-05-12T20:36:41.000Z | 2017-06-26T15:34:02.000Z | lib/galaxy/model/migrate/versions/0160_hda_set_deleted_if_purged_again.py | rikeshi/galaxy | c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a | [
"CC-BY-3.0"
] | 72 | 2019-06-06T18:52:41.000Z | 2022-02-17T02:53:18.000Z | lib/galaxy/model/migrate/versions/0160_hda_set_deleted_if_purged_again.py | rikeshi/galaxy | c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a | [
"CC-BY-3.0"
] | 1 | 2016-03-21T12:54:06.000Z | 2016-03-21T12:54:06.000Z | """
Migration script to set the 'deleted' column of the
'history_dataset_association' table to True if 'purged' is True.
"""
import logging
from galaxy.model.migrate.versions.util import engine_true
log = logging.getLogger(__name__)
def upgrade(migrate_engine):
print(__doc__)
cmd = 'UPDATE history_dataset_... | 24.291667 | 121 | 0.740995 |
796f2d644836dcccd228451d68f5078ecdd0f62d | 1,025 | py | Python | modules/ckanext-ytp_drupal/setup.py | eetumans/opendata | 061f58550bcb820016a764cca4763ed0a5f627fe | [
"MIT"
] | 16 | 2018-07-12T14:26:02.000Z | 2022-02-24T12:10:00.000Z | modules/ckanext-ytp_drupal/setup.py | eetumans/opendata | 061f58550bcb820016a764cca4763ed0a5f627fe | [
"MIT"
] | 751 | 2017-09-28T07:47:50.000Z | 2022-03-31T12:08:25.000Z | modules/ckanext-ytp_drupal/setup.py | vrk-kpa/opendata-ckan | 8936e2d9e700b9e5534fe2a51eedc2d1ede8c10b | [
"MIT"
] | 6 | 2017-10-31T07:47:07.000Z | 2021-10-06T07:09:07.000Z | from setuptools import setup, find_packages
version = '0.1'
setup(name='ckanext-ytp_drupal',
version=version,
description="Fetch data from Drupal database",
long_description=""" """,
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
... | 30.147059 | 96 | 0.594146 |
796f2fc28c8bafede06fc88d4168610697acb3dd | 295 | py | Python | BAB 8/kuiz/no2.py | Myusuft/Alpro-part5 | 24ba5c25feb7ee381acdfcfe62a0982ae8ed259c | [
"MIT"
] | null | null | null | BAB 8/kuiz/no2.py | Myusuft/Alpro-part5 | 24ba5c25feb7ee381acdfcfe62a0982ae8ed259c | [
"MIT"
] | null | null | null | BAB 8/kuiz/no2.py | Myusuft/Alpro-part5 | 24ba5c25feb7ee381acdfcfe62a0982ae8ed259c | [
"MIT"
] | null | null | null | def segitiga(x):
string = ""
nilai = 1
while nilai <= x:
jml = nilai
while jml > 0:
string = string +"*"
jml = jml - 1
string = string + "\n"
nilai = nilai + 1
print(string)
segitiga(int(input()))
| 14.75 | 33 | 0.413559 |
796f32abcd4b7d3036eeb112e803d9f3d125f543 | 1,414 | py | Python | utils/Criterion.py | cordercorder/NMT | cbc5ad010ce04da7a82f05ad1a3b6c16f8467266 | [
"MIT"
] | 6 | 2020-08-17T16:11:18.000Z | 2020-10-10T12:26:03.000Z | utils/Criterion.py | cordercorder/NMT | cbc5ad010ce04da7a82f05ad1a3b6c16f8467266 | [
"MIT"
] | 1 | 2020-07-11T16:42:55.000Z | 2020-07-12T12:58:18.000Z | utils/Criterion.py | cordercorder/NMT | cbc5ad010ce04da7a82f05ad1a3b6c16f8467266 | [
"MIT"
] | 2 | 2020-10-10T12:22:46.000Z | 2021-11-12T15:39:27.000Z | import torch
import torch.nn as nn
class LabelSmoothingLoss(nn.Module):
def __init__(self, eps: float, ignore_index: int, reduction: str = "mean" or "sum"):
assert 0.0 < eps <= 1.0
assert reduction == "mean" or reduction == "sum"
super(LabelSmoothingLoss, self).__init__()
self.e... | 30.73913 | 88 | 0.606082 |
796f32bcf4bc5af378e45ad7dfe335efe3364dd4 | 5,268 | py | Python | src/iiw_book_service/settings.py | WadeBarnes/iiwbook | 9d33f1fd52010fd004d32f52b7a3bbf7047c349c | [
"Apache-2.0"
] | null | null | null | src/iiw_book_service/settings.py | WadeBarnes/iiwbook | 9d33f1fd52010fd004d32f52b7a3bbf7047c349c | [
"Apache-2.0"
] | null | null | null | src/iiw_book_service/settings.py | WadeBarnes/iiwbook | 9d33f1fd52010fd004d32f52b7a3bbf7047c349c | [
"Apache-2.0"
] | null | null | null | """
Django settings for iiw_book_service project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
impor... | 28.475676 | 95 | 0.651101 |
796f3426c9634c8624176c436f90c136e5be7e1e | 5,860 | py | Python | adamacs/ingest/behavior.py | datajoint-company/adamacs | 95b1d3bd928f321ad63d6e25ac4b16a0a0771c6b | [
"MIT"
] | 1 | 2021-11-09T12:15:52.000Z | 2021-11-09T12:15:52.000Z | adamacs/ingest/behavior.py | datajoint-company/adamacs | 95b1d3bd928f321ad63d6e25ac4b16a0a0771c6b | [
"MIT"
] | 14 | 2021-10-06T10:07:04.000Z | 2022-03-07T15:42:10.000Z | adamacs/ingest/behavior.py | datajoint-company/adamacs | 95b1d3bd928f321ad63d6e25ac4b16a0a0771c6b | [
"MIT"
] | 1 | 2022-02-08T23:01:59.000Z | 2022-02-08T23:01:59.000Z | """Ingest behavioral events from aux and bpod files.
The aux file is the only .h5 file in a scan directory.
The bpod file contains StimArenaMaster and is a .mat file."""
import numpy as np
import h5py
import matplotlib.pyplot as plt
from pywavesurfer import ws
from ..paths import get_imaging_root_data_dir
from element... | 40.694444 | 164 | 0.673891 |
796f3500a3124f7df1b8dfcad48c73c0368f72b9 | 987 | py | Python | django_blockstack_auth/migrations/0001_initial.py | DotPodcast/django-blockstack-auth | 0210b6935ad9d7aa76a537a107a36733dda5bada | [
"MIT"
] | 4 | 2018-03-07T10:53:42.000Z | 2019-10-26T20:15:12.000Z | django_blockstack_auth/migrations/0001_initial.py | DotPodcast/django-blockstack-auth | 0210b6935ad9d7aa76a537a107a36733dda5bada | [
"MIT"
] | 1 | 2018-12-28T18:35:34.000Z | 2018-12-28T18:35:34.000Z | django_blockstack_auth/migrations/0001_initial.py | DotPodcast/django-blockstack-auth | 0210b6935ad9d7aa76a537a107a36733dda5bada | [
"MIT"
] | 1 | 2019-09-04T19:01:03.000Z | 2019-09-04T19:01:03.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-12-08 15:49
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations... | 30.84375 | 146 | 0.637285 |
796f35ac1514e4d6a8a9714cfbff350859d232f5 | 48 | py | Python | torchwisdom/vision/data/__init__.py | nunenuh/modelzoo.pytorch | 0a0e5dda84d59243a084b053d98f2eabd76474f5 | [
"MIT"
] | 8 | 2019-03-23T17:53:52.000Z | 2021-06-15T17:38:00.000Z | torchwisdom/vision/data/__init__.py | nunenuh/modelzoo.pytorch | 0a0e5dda84d59243a084b053d98f2eabd76474f5 | [
"MIT"
] | 39 | 2019-03-26T08:22:40.000Z | 2019-05-22T05:18:31.000Z | torchwisdom/vision/data/__init__.py | nunenuh/modelzoo.pytorch | 0a0e5dda84d59243a084b053d98f2eabd76474f5 | [
"MIT"
] | 4 | 2019-04-05T06:32:09.000Z | 2019-05-09T14:53:51.000Z | from .datasets import *
from .collector import * | 24 | 24 | 0.770833 |
796f35e0ed94714504338ff633980d9b0d62777c | 993 | py | Python | lineflow/__init__.py | awesome-archive/lineflow | 1b753a1c2d5d3c7b369c6dd7f20e836c90d43407 | [
"MIT"
] | 1 | 2020-01-07T05:26:56.000Z | 2020-01-07T05:26:56.000Z | lineflow/__init__.py | arita37/lineflow | 1b753a1c2d5d3c7b369c6dd7f20e836c90d43407 | [
"MIT"
] | null | null | null | lineflow/__init__.py | arita37/lineflow | 1b753a1c2d5d3c7b369c6dd7f20e836c90d43407 | [
"MIT"
] | null | null | null | from lineflow.core import Dataset # NOQA
from lineflow.text import TextDataset # NOQA
from lineflow.text import CsvDataset # NOQA
from lineflow.core import lineflow_concat as concat # NOQA
from lineflow.core import lineflow_zip as zip # NOQA
from lineflow.core import lineflow_filter as filter # NOQA
from lineflo... | 47.285714 | 82 | 0.830816 |
796f36627ec06bc4395025ce53fc0b9c96a87036 | 13,574 | py | Python | yawlib/glosswordnet/gwnmodels.py | letuananh/yawlib | 01cac5ec1eda82d131f00431391594dd52ba1a98 | [
"MIT"
] | 1 | 2018-10-18T15:42:02.000Z | 2018-10-18T15:42:02.000Z | yawlib/glosswordnet/gwnmodels.py | letuananh/yawlib | 01cac5ec1eda82d131f00431391594dd52ba1a98 | [
"MIT"
] | 3 | 2017-01-10T03:39:14.000Z | 2021-07-05T07:41:40.000Z | yawlib/glosswordnet/gwnmodels.py | letuananh/yawlib | 01cac5ec1eda82d131f00431391594dd52ba1a98 | [
"MIT"
] | 1 | 2017-07-16T08:30:45.000Z | 2017-07-16T08:30:45.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Gloss WordNet Data Transfer Object
"""
# This code is a part of yawlib library: https://github.com/letuananh/yawlib
# :copyright: (c) 2014 Le Tuan Anh <tuananh.ke@gmail.com>
# :license: MIT, see LICENSE for more details.
import logging
import re
from collections imp... | 34.191436 | 132 | 0.531457 |
796f36fd225ee1724ba20855e2e445e78e62b003 | 11,767 | py | Python | scipy/linalg/decomp_cholesky.py | Ennosigaeon/scipy | 2d872f7cf2098031b9be863ec25e366a550b229c | [
"BSD-3-Clause"
] | 11 | 2020-06-28T04:30:26.000Z | 2022-03-26T08:40:47.000Z | scipy/linalg/decomp_cholesky.py | Ennosigaeon/scipy | 2d872f7cf2098031b9be863ec25e366a550b229c | [
"BSD-3-Clause"
] | 44 | 2019-06-27T15:56:14.000Z | 2022-03-15T22:21:10.000Z | scipy/linalg/decomp_cholesky.py | Ennosigaeon/scipy | 2d872f7cf2098031b9be863ec25e366a550b229c | [
"BSD-3-Clause"
] | 20 | 2021-11-07T13:55:56.000Z | 2021-12-02T10:54:01.000Z | """Cholesky decomposition functions."""
from numpy import asarray_chkfinite, asarray, atleast_2d
# Local imports
from .misc import LinAlgError, _datacopied
from .lapack import get_lapack_funcs
__all__ = ['cholesky', 'cho_factor', 'cho_solve', 'cholesky_banded',
'cho_solve_banded']
def _cholesky(a, lower... | 33.334278 | 85 | 0.58987 |
796f379c42e708bf669b6a4e459c5d26d116080e | 1,078 | py | Python | chapter_2/CalculateHypotenuse.py | salimsuprayogi/learn_to_program_with_python_3 | 1590871f0475c00ad29b21178f3c781742191f6f | [
"MIT"
] | null | null | null | chapter_2/CalculateHypotenuse.py | salimsuprayogi/learn_to_program_with_python_3 | 1590871f0475c00ad29b21178f3c781742191f6f | [
"MIT"
] | null | null | null | chapter_2/CalculateHypotenuse.py | salimsuprayogi/learn_to_program_with_python_3 | 1590871f0475c00ad29b21178f3c781742191f6f | [
"MIT"
] | null | null | null | # I say thank you Irv Kalb
# Allow me to learn to use your source code
# Source Code : https://github.com/Apress/learn-to-prog-w-python-3
# By : Source code for 'Learn to Program with Python 3' by Irv Kalb
# Author : Salim Suprayogi
# Rewrite the code to learn and understand the code
# Menulis ula... | 29.944444 | 91 | 0.726345 |
796f385314268ef151cd21e853d2e96e4656d947 | 877 | py | Python | app/notifications/migrations/0002_auto_20190924_1811.py | contestcrew/2019SeoulContest-Backend | 2e99cc6ec6a712911da3b79412ae84a9d35453e1 | [
"MIT"
] | null | null | null | app/notifications/migrations/0002_auto_20190924_1811.py | contestcrew/2019SeoulContest-Backend | 2e99cc6ec6a712911da3b79412ae84a9d35453e1 | [
"MIT"
] | 32 | 2019-08-30T13:09:28.000Z | 2021-06-10T19:07:56.000Z | app/notifications/migrations/0002_auto_20190924_1811.py | contestcrew/2019SeoulContest-Backend | 2e99cc6ec6a712911da3b79412ae84a9d35453e1 | [
"MIT"
] | 3 | 2019-09-19T10:12:50.000Z | 2019-09-30T15:59:13.000Z | # Generated by Django 2.2.5 on 2019-09-24 09:11
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('noti... | 30.241379 | 140 | 0.670468 |
796f3a33141bcc50743ac87541d713b7518069bc | 29,826 | py | Python | awx/main/south_migrations/0004_v12b2_changes.py | alexander-bauer/awx | d1319b739406dad988f97c41cb92093f180ba822 | [
"Apache-2.0"
] | 1 | 2021-06-11T20:01:06.000Z | 2021-06-11T20:01:06.000Z | awx/main/south_migrations/0004_v12b2_changes.py | alexander-bauer/awx | d1319b739406dad988f97c41cb92093f180ba822 | [
"Apache-2.0"
] | 4 | 2020-04-29T23:03:16.000Z | 2022-03-01T23:56:09.000Z | awx/main/south_migrations/0004_v12b2_changes.py | alexander-bauer/awx | d1319b739406dad988f97c41cb92093f180ba822 | [
"Apache-2.0"
] | 1 | 2018-06-06T08:47:22.000Z | 2018-06-06T08:47:22.000Z | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
'''
Schema migration for AWX 1.2-b2 release.
- Remove variable_data field on Host and Group models.
- Remove VariableData model.
- Rem... | 86.703488 | 259 | 0.583887 |
796f3ace6ab14cbcaeb74a74b4645d21648c15cf | 11,521 | py | Python | kalliope/core/MainController.py | Z3RO1/KalliopeZERO | 4a9d4660e561f43387e8de4616f530ecf36cbbae | [
"MIT"
] | 1 | 2017-10-09T18:02:32.000Z | 2017-10-09T18:02:32.000Z | kalliope/core/MainController.py | ngoales/kalliope | b1e58f2d1e949f572d48026603159992c0ce20ca | [
"MIT"
] | null | null | null | kalliope/core/MainController.py | ngoales/kalliope | b1e58f2d1e949f572d48026603159992c0ce20ca | [
"MIT"
] | 1 | 2021-11-21T19:08:15.000Z | 2021-11-21T19:08:15.000Z | import logging
import random
from time import sleep
from transitions import Machine
from kalliope.core import Utils
from kalliope.core.ConfigurationManager import SettingLoader
from kalliope.core.OrderListener import OrderListener
# API
from flask import Flask
from kalliope.core.RestAPI.FlaskAPI import FlaskAPI
# La... | 43.806084 | 118 | 0.670341 |
796f3b8cc350b2cca2185632d4bf601457d87f2b | 13,173 | py | Python | ucf101/ucf101_train_one_shot_vid_8frame_lian.py | Azureli/CompareNetwork_BIT | ecea87890cc5b8316bead1d291c00a0a52d248e5 | [
"MIT"
] | null | null | null | ucf101/ucf101_train_one_shot_vid_8frame_lian.py | Azureli/CompareNetwork_BIT | ecea87890cc5b8316bead1d291c00a0a52d248e5 | [
"MIT"
] | null | null | null | ucf101/ucf101_train_one_shot_vid_8frame_lian.py | Azureli/CompareNetwork_BIT | ecea87890cc5b8316bead1d291c00a0a52d248e5 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from torch.optim.lr_scheduler import StepLR
import numpy as np
import task_generator_vid_8lian as tg
import os
import math
import argparse
import scipy as sp
import scipy.stats
import datetime
parser = argparse.Argu... | 45.113014 | 177 | 0.61664 |
796f3d00957b4485ac48e2ec135f6ad85626e981 | 3,440 | py | Python | Vector.py | deanearlwright/chippy | 19f891b607cbec8076aa9b0e9cd5ffde28e70714 | [
"MIT"
] | null | null | null | Vector.py | deanearlwright/chippy | 19f891b607cbec8076aa9b0e9cd5ffde28e70714 | [
"MIT"
] | null | null | null | Vector.py | deanearlwright/chippy | 19f891b607cbec8076aa9b0e9cd5ffde28e70714 | [
"MIT"
] | null | null | null | # ==============================================================
# V e c t o r . p y
# ==============================================================
# Author: Dean Earl Wright III
# Created: 25 August 2011
# Purpose: Reimplementation of the Q-learning perturbation
# testbed for ... | 35.102041 | 65 | 0.325872 |
796f3d657a568db9516bb759e989c0359c41d35b | 23,943 | py | Python | factory/base.py | last-partizan/factory_boy | af00c7e775bbd4f126b0a3f4c95532fd87bfc540 | [
"MIT"
] | null | null | null | factory/base.py | last-partizan/factory_boy | af00c7e775bbd4f126b0a3f4c95532fd87bfc540 | [
"MIT"
] | null | null | null | factory/base.py | last-partizan/factory_boy | af00c7e775bbd4f126b0a3f4c95532fd87bfc540 | [
"MIT"
] | null | null | null | # Copyright: See the LICENSE file.
import collections
import logging
import warnings
from typing import Generic, List, TypeVar
from . import builder, declarations, enums, errors, utils
logger = logging.getLogger('factory.generate')
T = TypeVar('T')
# Factory metaclasses
def get_factory_bases(bases):
"""Retr... | 32.664393 | 108 | 0.62252 |
796f3dfdd16516af198002b1147ba3e5d2b085df | 9,406 | py | Python | idem_azurerm/states/azurerm/keyvault/key.py | johnoneill98/idem-azurerm | 37e0743fd236f758b093f5898cc99e95ffde9889 | [
"Apache-2.0"
] | null | null | null | idem_azurerm/states/azurerm/keyvault/key.py | johnoneill98/idem-azurerm | 37e0743fd236f758b093f5898cc99e95ffde9889 | [
"Apache-2.0"
] | null | null | null | idem_azurerm/states/azurerm/keyvault/key.py | johnoneill98/idem-azurerm | 37e0743fd236f758b093f5898cc99e95ffde9889 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Azure Resource Manager (ARM) Key State Module
.. versionadded:: 2.0.0
:maintainer: <devops@eitr.tech>
:configuration: This module requires Azure Resource Manager credentials to be passed via acct. Note that the
authentication parameters are case sensitive.
Required provider parame... | 30.839344 | 126 | 0.572188 |
796f3e6b1afdefef4542ae085c7f6d6e29326486 | 8,695 | py | Python | pybind/nos/v7_1_0/interface/port_channel/qos/random_detect/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/interface/port_channel/qos/random_detect/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/interface/port_channel/qos/random_detect/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 70.120968 | 1,149 | 0.727315 |
796f3e867d171f738aaed74f12ff0830583194f6 | 4,439 | py | Python | experiments/mbcd_run.py | Valerio-Colombo/mbcd | 8bb8adce78d303e991d8afdb3fbc045970297f83 | [
"MIT"
] | null | null | null | experiments/mbcd_run.py | Valerio-Colombo/mbcd | 8bb8adce78d303e991d8afdb3fbc045970297f83 | [
"MIT"
] | null | null | null | experiments/mbcd_run.py | Valerio-Colombo/mbcd | 8bb8adce78d303e991d8afdb3fbc045970297f83 | [
"MIT"
] | null | null | null | import os
import gym
import numpy as np
import pandas as pd
import random
import argparse
import tensorflow as tf
from stable_baselines.common.policies import MlpPolicy
#from stable_baselines.common.vec_env import DummyVecEnv
#from stable_baselines.common.vec_env import VecNormalize
#from stable_baselines.common.poli... | 35.512 | 122 | 0.633701 |
796f3ece25f91c0003013bd4e481ca2c54cd4214 | 253 | py | Python | consts.py | CodeJjang/web_dev_course_project | b2e8e3678e4e1316364dd81b96beff478cb32291 | [
"MIT"
] | null | null | null | consts.py | CodeJjang/web_dev_course_project | b2e8e3678e4e1316364dd81b96beff478cb32291 | [
"MIT"
] | null | null | null | consts.py | CodeJjang/web_dev_course_project | b2e8e3678e4e1316364dd81b96beff478cb32291 | [
"MIT"
] | null | null | null |
INVALID_OP_STRING = "Invalid operation, reset"
OPERATOR_DICT = {
'+': lambda a, b: a + b,
'-': lambda a, b: a - b,
'*': lambda a, b: a * b,
'/': lambda a, b: a / b if b != 0 else exec('raise(Exception(\'can not divide by zero\'))')
} | 23 | 95 | 0.533597 |
796f3f22bacc31444156d1c381ae9d97a173135c | 117 | py | Python | pystac/models/geojson_type.py | geobeyond/py-stac | f15f3511737c35fca27da21b38a98960e21f4293 | [
"Apache-2.0"
] | null | null | null | pystac/models/geojson_type.py | geobeyond/py-stac | f15f3511737c35fca27da21b38a98960e21f4293 | [
"Apache-2.0"
] | null | null | null | pystac/models/geojson_type.py | geobeyond/py-stac | f15f3511737c35fca27da21b38a98960e21f4293 | [
"Apache-2.0"
] | null | null | null | from enum import Enum
class GeojsonType(Enum):
Feature = "Feature"
FeatureCollection = "FeatureCollection"
| 16.714286 | 43 | 0.735043 |
796f3f3b85c04d2cfd570e9d51475a384f024457 | 7,210 | py | Python | influxdb/uci/power/main_power_v1_5_4.py | XiaoguTech/rta-simulator | 243285f8365b01b1e0670e174fd20a7947ca11a8 | [
"MIT"
] | 2 | 2019-05-12T20:14:38.000Z | 2020-09-14T07:50:57.000Z | influxdb/uci/power/main_power_v1_5_4.py | XiaoguTech/rta-simulator | 243285f8365b01b1e0670e174fd20a7947ca11a8 | [
"MIT"
] | 1 | 2018-07-18T08:16:21.000Z | 2021-10-09T05:32:46.000Z | influxdb/uci/power/main_power_v1_5_4.py | XiaoguTech/rta-simulator | 243285f8365b01b1e0670e174fd20a7947ca11a8 | [
"MIT"
] | null | null | null | import os
import argparse
import sys
import time
import requests
import time
from functools import reduce
log = sys.stdout.write
error = sys.stderr.write
class Config:
def __init__(self):
self.download_url = get_env('RTA_URL', 'http://archive.ics.uci.edu/ml/machine-learning-databases/00235/househo... | 48.716216 | 275 | 0.598336 |
796f3fbc37fb00ede676bfdc453d981738757a42 | 3,882 | py | Python | biblepy/bible.py | bvo773/PythonFun | 7f460fb9397406dd2593acd425b48a4c28e292ef | [
"MIT"
] | null | null | null | biblepy/bible.py | bvo773/PythonFun | 7f460fb9397406dd2593acd425b48a4c28e292ef | [
"MIT"
] | null | null | null | biblepy/bible.py | bvo773/PythonFun | 7f460fb9397406dd2593acd425b48a4c28e292ef | [
"MIT"
] | null | null | null | import requests
import json
'''
BOOK PREFIX VALUE
genesis - gen, exodus - ex, leviticus - lev, numbers - num, deuteronomy - deu, joshua - joashua,
judges - judges, 1 sammuel - 1sam, 2 samuel - 2sam
'''
def get_book_prefix(book):
prefix =""
if (book == "genesis"): prefix = "gen"
elif (book == "exodus"): pre... | 27.338028 | 97 | 0.621072 |
796f3ffb0b2c88fbafa92beca70c06dc47803758 | 933 | py | Python | kubernetes/test/test_v1beta1_token_review_status.py | jraby/kubernetes-client-python | e6e7b710d0b15fbde686bc9dccf00da5951bef84 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1beta1_token_review_status.py | jraby/kubernetes-client-python | e6e7b710d0b15fbde686bc9dccf00da5951bef84 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1beta1_token_review_status.py | jraby/kubernetes-client-python | e6e7b710d0b15fbde686bc9dccf00da5951bef84 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.7.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... | 21.697674 | 105 | 0.732047 |
796f3ffb631aee1dcac811e78d2e063675fda0af | 2,463 | py | Python | db/scripts/script_insert_update_delete/update_buddies.py | LeandroLFE/capmon | 9d1200301628ea4fec0e8ed09d5e9b67a426d923 | [
"MIT"
] | null | null | null | db/scripts/script_insert_update_delete/update_buddies.py | LeandroLFE/capmon | 9d1200301628ea4fec0e8ed09d5e9b67a426d923 | [
"MIT"
] | null | null | null | db/scripts/script_insert_update_delete/update_buddies.py | LeandroLFE/capmon | 9d1200301628ea4fec0e8ed09d5e9b67a426d923 | [
"MIT"
] | null | null | null | '''
Requer: {
"canal_id" : str,
"novo_id":int,
"id_criatura": int,
"aventureiro_id" : str
}
'''
update_buddy_evolui = lambda dados : f"""
UPDATE capturados_{dados["canal_id"]}
SET id_criatura = :novo_id
WHERE aventureiro_id = :aventureiro_id
AND ID_criatura = :id_criatura
"""
'''
Requ... | 27.674157 | 93 | 0.672757 |
796f410e9c4d109605ff71030b67ed5a45f3d786 | 580 | py | Python | setup.py | datalayer-contrib/jupyter-pizzabutton | 3f393ccfbb5d8a43cefbe8a1eb7cd41297c69376 | [
"MIT"
] | null | null | null | setup.py | datalayer-contrib/jupyter-pizzabutton | 3f393ccfbb5d8a43cefbe8a1eb7cd41297c69376 | [
"MIT"
] | null | null | null | setup.py | datalayer-contrib/jupyter-pizzabutton | 3f393ccfbb5d8a43cefbe8a1eb7cd41297c69376 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
try:
long_desc = open('README.md').read()
except:
long_desc = ''
setup(
name="pizzabutton",
url="https://github.com/peterskipper/pizzabutton",
author="Peter Skipper",
author_email="peter.skipper@gmail.com",
version="0.0.5",
packages=find_pack... | 23.2 | 58 | 0.634483 |
796f41d47f01570fc67278e34b4306ce6568b08f | 10,611 | py | Python | openstack_dashboard/test/unit/api/rest/test_swift.py | NunoEdgarGFlowHub/horizon | 73a0bbd43ea78ac5337f7d00977ec5f32452067e | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/test/unit/api/rest/test_swift.py | NunoEdgarGFlowHub/horizon | 73a0bbd43ea78ac5337f7d00977ec5f32452067e | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/test/unit/api/rest/test_swift.py | NunoEdgarGFlowHub/horizon | 73a0bbd43ea78ac5337f7d00977ec5f32452067e | [
"Apache-2.0"
] | null | null | null | # Copyright 2016, Rackspace, US, 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/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 41.940711 | 79 | 0.615211 |
796f432849d9d68ddf03ffb3b5f9f4e0516fd50f | 11,065 | py | Python | display.py | lemehmet/gunes-saat | f75b5c1e2979266f2330bed7bc00f6431b54a7fd | [
"CECILL-B"
] | null | null | null | display.py | lemehmet/gunes-saat | f75b5c1e2979266f2330bed7bc00f6431b54a7fd | [
"CECILL-B"
] | null | null | null | display.py | lemehmet/gunes-saat | f75b5c1e2979266f2330bed7bc00f6431b54a7fd | [
"CECILL-B"
] | null | null | null | import sched
import threading
import time
import config
from PIL import Image, ImageDraw
from atomic_value import AtomicValue
from common import log_paint, log_fw
from views import Manager
display_instance = None
USE_MICRO = True
if config.USE_EMU:
import pyglet
from pyglet.gl import *
from pyglet impo... | 35.693548 | 224 | 0.590691 |
796f43a9d16ce5ce310a47436bafb3fb0b8a835a | 3,919 | py | Python | src/uaos/tests/test_dependency_resolver.py | stefanhoelzl/alarm-clock | efba84e71fcade26bef020dc7eaa10181ea9f96c | [
"MIT"
] | 1 | 2019-07-31T12:39:53.000Z | 2019-07-31T12:39:53.000Z | src/uaos/tests/test_dependency_resolver.py | stefanhoelzl/alarm-clock | efba84e71fcade26bef020dc7eaa10181ea9f96c | [
"MIT"
] | null | null | null | src/uaos/tests/test_dependency_resolver.py | stefanhoelzl/alarm-clock | efba84e71fcade26bef020dc7eaa10181ea9f96c | [
"MIT"
] | 1 | 2019-10-04T04:32:20.000Z | 2019-10-04T04:32:20.000Z | import pytest
from uaos.app import App
from uaos.dependency_resolver import resolve_dependencies
class AppMock:
def __init__(self, requires=(), optional=()):
self.requires = list(requires)
self.optional = list(optional)
def MakeApp(name, **kwargs):
cls = type(name, (App,), kwargs)
return... | 37.682692 | 78 | 0.52641 |
796f43c3f6f7582a4158a0636ed1f5b860f5d7f2 | 3,584 | py | Python | tests/integration/test_unit.py | hpidcock/python-libjuju | 79212d5bbcb3e68ba1aae68aa75fcf5b0a2d4305 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_unit.py | hpidcock/python-libjuju | 79212d5bbcb3e68ba1aae68aa75fcf5b0a2d4305 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_unit.py | hpidcock/python-libjuju | 79212d5bbcb3e68ba1aae68aa75fcf5b0a2d4305 | [
"Apache-2.0"
] | null | null | null | import asyncio
from tempfile import NamedTemporaryFile
import pytest
from .. import base
@base.bootstrapped
@pytest.mark.asyncio
async def test_run(event_loop):
from juju.action import Action
async with base.CleanModel() as model:
app = await model.deploy(
'ubuntu-0',
applic... | 30.372881 | 83 | 0.590402 |
796f43cd6f525fbae0a0d5499b6c978268d42ce9 | 6,544 | py | Python | pyalgotrade/cn/CTP/barfeed.py | koktf23/pyalgotrade-cn | 57a53db9f3f85a94cf99878c1b648cc9a5dc4069 | [
"Apache-2.0"
] | 1 | 2017-11-20T17:22:04.000Z | 2017-11-20T17:22:04.000Z | pyalgotrade/cn/CTP/barfeed.py | koktf23/pyalgotrade-cn | 57a53db9f3f85a94cf99878c1b648cc9a5dc4069 | [
"Apache-2.0"
] | null | null | null | pyalgotrade/cn/CTP/barfeed.py | koktf23/pyalgotrade-cn | 57a53db9f3f85a94cf99878c1b648cc9a5dc4069 | [
"Apache-2.0"
] | 1 | 2019-07-22T08:07:02.000Z | 2019-07-22T08:07:02.000Z | # Copyright 2011-2016 ZackZK
# coding:utf-8
#
# 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 ... | 32.72 | 115 | 0.586491 |
796f4457eb53db864e7d836e3bd233ae50d2399f | 2,017 | py | Python | automation/plugins/s3_logging_plugin.py | zahed3795/Super-Automation | a207d39910943256ad2117b1a84ebcaaaf7aa43e | [
"MIT"
] | 2 | 2020-11-12T14:01:49.000Z | 2020-11-12T14:01:52.000Z | automation/plugins/s3_logging_plugin.py | zahed3795/Super-Automation | a207d39910943256ad2117b1a84ebcaaaf7aa43e | [
"MIT"
] | null | null | null | automation/plugins/s3_logging_plugin.py | zahed3795/Super-Automation | a207d39910943256ad2117b1a84ebcaaaf7aa43e | [
"MIT"
] | null | null | null | """
The S3 Logging Plugin to upload all logs to the S3 bucket specifed.
"""
import uuid
import logging
import os
from automation.core.s3_manager import S3LoggingBucket
from nose.plugins import Plugin
class S3Logging(Plugin):
"""
The plugin for uploading test logs to the S3 bucket specified.
"""
name ... | 38.788462 | 78 | 0.600397 |
796f45c2173e1782edb844246a55d430f4ab3460 | 5,477 | py | Python | chatbot_function.py | laisbsc/ada_chatbot | d470299eff9247f9648338bfebcd4151514e47d8 | [
"MIT"
] | 1 | 2021-05-03T04:46:57.000Z | 2021-05-03T04:46:57.000Z | chatbot_function.py | laisbsc/ada_chatbot | d470299eff9247f9648338bfebcd4151514e47d8 | [
"MIT"
] | null | null | null | chatbot_function.py | laisbsc/ada_chatbot | d470299eff9247f9648338bfebcd4151514e47d8 | [
"MIT"
] | 2 | 2021-05-04T16:39:38.000Z | 2021-05-06T10:28:59.000Z | '''
@author: Lauro Ribeiro
date: april | 2021
'''
import nltk
from nltk.stem import WordNetLemmatizer
from nltk.tokenize import word_tokenize
import re
import keras
import pickle
import numpy as np
import pandas as pd
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence ... | 28.087179 | 89 | 0.620047 |
796f462bc3bf89a0081cf587aa6c9a769940ae53 | 3,231 | py | Python | torchmetrics/functional/classification/kldivergence.py | GiannisVagionakis/metrics | 12d0746e0e9ef9eeeca11cef1e118a156c1518ec | [
"Apache-2.0"
] | null | null | null | torchmetrics/functional/classification/kldivergence.py | GiannisVagionakis/metrics | 12d0746e0e9ef9eeeca11cef1e118a156c1518ec | [
"Apache-2.0"
] | null | null | null | torchmetrics/functional/classification/kldivergence.py | GiannisVagionakis/metrics | 12d0746e0e9ef9eeeca11cef1e118a156c1518ec | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# 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 i... | 38.927711 | 117 | 0.65243 |
796f465ea1ee4c2ca6b50531a820def6da70f7a3 | 882 | py | Python | tests/conftest.py | vladkol/dvc | f4349aa09b839687fbb24913ee222b815f875567 | [
"Apache-2.0"
] | 1 | 2020-08-01T08:31:18.000Z | 2020-08-01T08:31:18.000Z | tests/conftest.py | vladkol/dvc | f4349aa09b839687fbb24913ee222b815f875567 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | vladkol/dvc | f4349aa09b839687fbb24913ee222b815f875567 | [
"Apache-2.0"
] | 1 | 2020-11-28T11:47:48.000Z | 2020-11-28T11:47:48.000Z | import os
import pytest
from .dir_helpers import * # noqa, pylint: disable=wildcard-import
from .remotes import * # noqa, pylint: disable=wildcard-import
# Prevent updater and analytics from running their processes
os.environ["DVC_TEST"] = "true"
# Ensure progress output even when not outputting to raw sys.stderr ... | 25.941176 | 75 | 0.70068 |
796f477e95380edfb933f35af8969d026f1a7429 | 2,670 | py | Python | serveradmin/powerdns/tests.py | YannikSc/serveradmin | 996480fedae773576ae11948790fa3018a774edb | [
"MIT"
] | null | null | null | serveradmin/powerdns/tests.py | YannikSc/serveradmin | 996480fedae773576ae11948790fa3018a774edb | [
"MIT"
] | null | null | null | serveradmin/powerdns/tests.py | YannikSc/serveradmin | 996480fedae773576ae11948790fa3018a774edb | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django.test import TransactionTestCase
from serveradmin.dataset import Query
from serveradmin.powerdns.models import Domain
from serveradmin.powerdns.signals import (
create_domains,
delete_domains,
update_domains,
)
def _create_serveradmin_domain():
s... | 29.021739 | 71 | 0.670412 |
796f47a804b5536083dfeca896959cd447a135a7 | 1,848 | py | Python | examples/paged_output.py | jedie/cmd2 | 8f981f37eddcccc919329245b85fd44d5975a6a7 | [
"MIT"
] | null | null | null | examples/paged_output.py | jedie/cmd2 | 8f981f37eddcccc919329245b85fd44d5975a6a7 | [
"MIT"
] | null | null | null | examples/paged_output.py | jedie/cmd2 | 8f981f37eddcccc919329245b85fd44d5975a6a7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
"""A simple example demonstrating the using paged output via the ppaged() method.
"""
import os
from typing import (
List,
)
import cmd2
class PagedOutput(cmd2.Cmd):
""" Example cmd2 application which shows how to display output using a pager."""
def __init__(self):
... | 29.333333 | 106 | 0.632576 |
796f487b46032413c7f399dcd3fa721d590a14ba | 828 | py | Python | Mundo 2/ex068a.py | adonaifariasdev/cursoemvideo-python3 | 1fd35e45b24c52013fa3bc98e723971db8e6b7d1 | [
"MIT"
] | null | null | null | Mundo 2/ex068a.py | adonaifariasdev/cursoemvideo-python3 | 1fd35e45b24c52013fa3bc98e723971db8e6b7d1 | [
"MIT"
] | null | null | null | Mundo 2/ex068a.py | adonaifariasdev/cursoemvideo-python3 | 1fd35e45b24c52013fa3bc98e723971db8e6b7d1 | [
"MIT"
] | null | null | null | from random import randint
v = 0
while True:
jogador = int(input('Diga um valor: '))
computador = randint(0, 11)
total = jogador + computador
tipo = ' '
while tipo not in 'PI':
tipo = str(input('Par ou Ímpar? [P/I] ')).upper().strip()[0]
print(f'Você jogou {jogador} e o computador {compu... | 29.571429 | 89 | 0.504831 |
796f48cf640846cba76ebb228807be645ede8ddb | 4,116 | py | Python | src/jetbot_ros/jetbot_ros/lidar_control_img.py | ijhan21/RAPA_ROS_PRJ | ab73956bb8c0678ed53cfdd453a30ddc3a7fdece | [
"Apache-2.0"
] | null | null | null | src/jetbot_ros/jetbot_ros/lidar_control_img.py | ijhan21/RAPA_ROS_PRJ | ab73956bb8c0678ed53cfdd453a30ddc3a7fdece | [
"Apache-2.0"
] | null | null | null | src/jetbot_ros/jetbot_ros/lidar_control_img.py | ijhan21/RAPA_ROS_PRJ | ab73956bb8c0678ed53cfdd453a30ddc3a7fdece | [
"Apache-2.0"
] | null | null | null | from cv2 import threshold
import rclpy
from rclpy.node import Node
from rclpy.qos import qos_profile_sensor_data
from sensor_msgs.msg import LaserScan
import cv2
import numpy as np
MEAN_UNIT = 30
TH_RANGE=50
class BasicSubscriber(Node):
def __init__(self):
super().__init__('lidar_sensor')
... | 36.75 | 128 | 0.525024 |
796f48fd70a9bc12bb9866d058418c72a2687251 | 1,478 | py | Python | Packs/CommonScripts/Scripts/ExtractFQDNFromUrlAndEmail/ExtractFQDNFromUrlAndEmail_test.py | mchasepan/content | 177c7fe86c4872141107f48075c6578daffc4bd4 | [
"MIT"
] | 2 | 2020-07-27T10:35:41.000Z | 2020-12-14T15:44:18.000Z | Packs/CommonScripts/Scripts/ExtractFQDNFromUrlAndEmail/ExtractFQDNFromUrlAndEmail_test.py | mchasepan/content | 177c7fe86c4872141107f48075c6578daffc4bd4 | [
"MIT"
] | 48 | 2022-03-08T13:45:00.000Z | 2022-03-31T14:32:05.000Z | Packs/CommonScripts/Scripts/ExtractFQDNFromUrlAndEmail/ExtractFQDNFromUrlAndEmail_test.py | mchasepan/content | 177c7fe86c4872141107f48075c6578daffc4bd4 | [
"MIT"
] | 2 | 2020-12-10T12:02:45.000Z | 2020-12-15T09:20:01.000Z | # -*- coding: utf-8 -*-
from ExtractFQDNFromUrlAndEmail import extract_fqdn
import pytest
@pytest.mark.parametrize(
"input,fqdn",
[ # noqa: E501 disable-secrets-detection
("http://this.is.test.com", "this.is.test.com"),
("https://caseapi.phishlabs.com", "caseapi.phishlabs.com"),
# out... | 47.677419 | 121 | 0.679296 |
796f4a10fe33b9be347540748a757fcdcc6934ff | 227 | py | Python | modules/tests/test_request.py | anamayagarodia/JARVIS-on-Messenger | d7198db0afe99cf3c0f7aacd5d5a16641deba809 | [
"MIT"
] | 6 | 2017-05-17T23:46:16.000Z | 2017-05-18T19:50:15.000Z | modules/tests/test_request.py | anamayagarodia/JARVIS-on-Messenger | d7198db0afe99cf3c0f7aacd5d5a16641deba809 | [
"MIT"
] | null | null | null | modules/tests/test_request.py | anamayagarodia/JARVIS-on-Messenger | d7198db0afe99cf3c0f7aacd5d5a16641deba809 | [
"MIT"
] | 2 | 2018-08-06T06:03:58.000Z | 2020-01-08T07:57:37.000Z | import modules
def test_request():
assert('request' == modules.process_query('request')[0])
assert('request' == modules.process_query('report')[0])
assert('request' != modules.process_query('something random')[0])
| 32.428571 | 69 | 0.696035 |
796f4a135e2a10bab0391eceaf2dea221dde81d2 | 2,007 | py | Python | single_tech_samples/databricks/sample4_ci_cd/notebook_jobs/tests/main_notebook_a_test.py | swbabberz/modern-data-warehouse-dataops | 9ea71cfcc1e6df9b6c850c115169817105c6242e | [
"MIT"
] | null | null | null | single_tech_samples/databricks/sample4_ci_cd/notebook_jobs/tests/main_notebook_a_test.py | swbabberz/modern-data-warehouse-dataops | 9ea71cfcc1e6df9b6c850c115169817105c6242e | [
"MIT"
] | null | null | null | single_tech_samples/databricks/sample4_ci_cd/notebook_jobs/tests/main_notebook_a_test.py | swbabberz/modern-data-warehouse-dataops | 9ea71cfcc1e6df9b6c850c115169817105c6242e | [
"MIT"
] | null | null | null | # Databricks notebook source
# MAGIC %md
# MAGIC # Tests
# COMMAND ----------
# MAGIC %pip install -U nutter
# COMMAND ----------
# MAGIC %run ../main_notebook_a
# COMMAND ----------
df = spark.createDataFrame([('Fiji Apple', 'Red', 3.5),
('Banana', 'Yellow', 1.0),
... | 31.359375 | 106 | 0.501246 |
796f4b458410e5b4b8540b72dd663711c4ad9f46 | 865 | py | Python | ppcls/data/dataloader/__init__.py | PaddlePaddle/PaddleCLS | 22531707527fb01f0e7f628509ed4b3d2b860316 | [
"Apache-2.0"
] | 1 | 2020-04-08T02:45:06.000Z | 2020-04-08T02:45:06.000Z | ppcls/data/dataloader/__init__.py | PaddlePaddle/PaddleCLS | 22531707527fb01f0e7f628509ed4b3d2b860316 | [
"Apache-2.0"
] | null | null | null | ppcls/data/dataloader/__init__.py | PaddlePaddle/PaddleCLS | 22531707527fb01f0e7f628509ed4b3d2b860316 | [
"Apache-2.0"
] | 1 | 2020-04-07T17:03:24.000Z | 2020-04-07T17:03:24.000Z | from ppcls.data.dataloader.imagenet_dataset import ImageNetDataset
from ppcls.data.dataloader.multilabel_dataset import MultiLabelDataset
from ppcls.data.dataloader.common_dataset import create_operators
from ppcls.data.dataloader.vehicle_dataset import CompCars, VeriWild
from ppcls.data.dataloader.logo_dataset import ... | 61.785714 | 84 | 0.887861 |
796f4c33026d06ceb22e693c556a0652b8b5c8b8 | 15,669 | py | Python | src/genie/libs/parser/iosxe/show_mldp.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/show_mldp.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/show_mldp.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | """show_mldp.py
IOSXE parsers for the following show commands:
* show mpls mldp count
* show mpls mldp root
* show mpls mldp neighbors
* show mpls mldp database
"""
# Python
import re
# Metaparser
from genie.metaparser import MetaParser
from genie.metaparser.util.schemaengine import S... | 35.938073 | 188 | 0.421916 |
796f4d8df958e5cb2aff0cf2de6c9784dd7123c1 | 5,203 | py | Python | tensorflow_datasets/text/squad.py | abhinavsp0730/datasets | 3c69b42456fb947a7af7086a3310b972bd1ae3fb | [
"Apache-2.0"
] | 2 | 2019-09-27T10:28:27.000Z | 2020-12-25T17:20:14.000Z | tensorflow_datasets/text/squad.py | abhinavsp0730/datasets | 3c69b42456fb947a7af7086a3310b972bd1ae3fb | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/text/squad.py | abhinavsp0730/datasets | 3c69b42456fb947a7af7086a3310b972bd1ae3fb | [
"Apache-2.0"
] | 3 | 2019-12-06T01:05:46.000Z | 2019-12-07T16:53:21.000Z | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets 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 appl... | 33.352564 | 80 | 0.612531 |
796f4e0cf3261c180d493c257e193ff5ee849c14 | 4,959 | py | Python | bigbench/benchmark_tasks/parse_author_emails.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | bigbench/benchmark_tasks/parse_author_emails.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | bigbench/benchmark_tasks/parse_author_emails.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 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, ... | 38.742188 | 94 | 0.502521 |
796f4ec2bf60092023c094226c175d8b417bd7bb | 30,890 | py | Python | samples/fpga/gemm_systolic_vectorized.py | jnice-81/dace | 5211794a2d17b7189037ac485ab0b292fb02aa0d | [
"BSD-3-Clause"
] | null | null | null | samples/fpga/gemm_systolic_vectorized.py | jnice-81/dace | 5211794a2d17b7189037ac485ab0b292fb02aa0d | [
"BSD-3-Clause"
] | null | null | null | samples/fpga/gemm_systolic_vectorized.py | jnice-81/dace | 5211794a2d17b7189037ac485ab0b292fb02aa0d | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
"""
Computes C = A @ B + C.
This implementation is based on the HLS implementation from:
https://github.com/spcl/gemm_hls
It uses the compute and I/O optimal strategy described in the FPGA'20 paper:
"Flexible Communication Avoiding Mat... | 37.216867 | 94 | 0.533409 |
796f4eccdffd599bc155d64492d88cd4d5ed66c5 | 37,725 | py | Python | instances/passenger_demand/pas-20210421-2109-int12e/12.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int12e/12.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int12e/12.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 2736
passenger_arriving = (
(4, 8, 1, 3, 3, 0, 4, 9, 5, 2, 1, 0), # 0
(1, 9, 12, 2, 1, 0, 5, 5, 6, 4, 2, 0), # 1
(3, 6, 7, 3, 4, 0, 2, 7, 5, 2, 2, 0), # 2
(4, 7, 4, 0, 0, 0, 5, 6, 4, 5, 2, 0), # 3
(5, 10, 5, 2, 1, 0, 3, 6, 4, 3, 2, 0), # 4
(0, 10, 3, 4, 2, 0, 5, 10, 5, 4... | 112.61194 | 213 | 0.727926 |
796f4f09d4f081039c2fd01e252f2e0b457467c9 | 2,637 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/commands/release/trello/tester_selector/tester_selector_team.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/release/trello/tester_selector/tester_selector_team.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/release/trello/tester_selector/tester_selector_team.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import random
from typing import Dict, List, Optional, Set
from .....github import Github
class TesterSelectorTeam:
"""
Select a teammmate for QAing a trello card from a github PR author.
... | 36.123288 | 88 | 0.63595 |
796f5004fd99479f2f4c0e74c333c00200db3cdb | 1,267 | py | Python | api/tasks.py | future-job/job | e06c3ca5f9fcc309464e6d59456343e5bb8b79fb | [
"MIT"
] | null | null | null | api/tasks.py | future-job/job | e06c3ca5f9fcc309464e6d59456343e5bb8b79fb | [
"MIT"
] | 8 | 2020-02-11T23:37:09.000Z | 2022-03-11T23:16:46.000Z | api/tasks.py | future-job/job | e06c3ca5f9fcc309464e6d59456343e5bb8b79fb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
# BASE_URL = getattr(settings, 'BASE_URL')
import requests
import json
from djcelery import celery
def send_email(title, msg, to):
"""
:param title: 메일 제목
:param msg: 메일 메시지
:param to: 수신자 = ['mail_1', ...]
:return: x
"""
# ... | 25.857143 | 71 | 0.584846 |
796f50b2a6a9c3a9aa7e1a19051a3848e2491f3f | 3,665 | py | Python | src/utils.py | gebner/CQ-editor | e39868dc4df8a7b68f1bc4d356d9040b5f15df10 | [
"Apache-2.0"
] | null | null | null | src/utils.py | gebner/CQ-editor | e39868dc4df8a7b68f1bc4d356d9040b5f15df10 | [
"Apache-2.0"
] | null | null | null | src/utils.py | gebner/CQ-editor | e39868dc4df8a7b68f1bc4d356d9040b5f15df10 | [
"Apache-2.0"
] | null | null | null | import requests
from pkg_resources import parse_version
from PyQt5 import QtCore, QtWidgets
from PyQt5.QtGui import QDesktopServices
from PyQt5.QtCore import QUrl
from PyQt5.QtWidgets import QFileDialog
DOCK_POSITIONS = {'right' : QtCore.Qt.RightDockWidgetArea,
'left' : QtCore.Qt.LeftDockWidge... | 27.148148 | 81 | 0.610641 |
796f50f13eb9cc186c20ffc5b38e41f02dd90a2b | 1,154 | py | Python | web_chat/forms.py | renmarin/Web-Chat | 343424eaa20e16bd41077b525dbeb1d60cf86d7b | [
"MIT"
] | null | null | null | web_chat/forms.py | renmarin/Web-Chat | 343424eaa20e16bd41077b525dbeb1d60cf86d7b | [
"MIT"
] | null | null | null | web_chat/forms.py | renmarin/Web-Chat | 343424eaa20e16bd41077b525dbeb1d60cf86d7b | [
"MIT"
] | null | null | null | from django import forms
class SignUpIn(forms.Form):
username = forms.CharField(label="Username", max_length=25,
widget=forms.TextInput(attrs={'placeholder': 'Username'}))
password = forms.CharField(label="Password", max_length=100,
widget=forms.Te... | 48.083333 | 110 | 0.629983 |
796f52069f33473bc3e36514f397f1bea6b86ffa | 4,446 | py | Python | cljs_loader/loader.py | GugenKoubou/django-cljs-loader | 56fb2f51c89e3c0efa205d622068c8bc910544e9 | [
"MIT"
] | null | null | null | cljs_loader/loader.py | GugenKoubou/django-cljs-loader | 56fb2f51c89e3c0efa205d622068c8bc910544e9 | [
"MIT"
] | null | null | null | cljs_loader/loader.py | GugenKoubou/django-cljs-loader | 56fb2f51c89e3c0efa205d622068c8bc910544e9 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
import edn_format
from edn_format.edn_lex import Keyword
from functools import partial
import re
class CljsBuildSettings():
"""
A wrapper for the cljsbuild section of a Leiningen project file.
Responsible for parsing... | 31.531915 | 99 | 0.600315 |
796f526504fbc8909065bae215fcc4fca70eb0c0 | 2,442 | py | Python | app.py | roh-kan/summarize-wordpress-blog | a5c738725cb03ca753f3aa45a727fd6b0644b979 | [
"MIT"
] | null | null | null | app.py | roh-kan/summarize-wordpress-blog | a5c738725cb03ca753f3aa45a727fd6b0644b979 | [
"MIT"
] | null | null | null | app.py | roh-kan/summarize-wordpress-blog | a5c738725cb03ca753f3aa45a727fd6b0644b979 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, flash, request
from flask_bootstrap import Bootstrap
from flask_wtf import FlaskForm
from wtforms import SubmitField
from wtforms.fields.html5 import URLField, IntegerField
from wtforms.validators import DataRequired, Optional
from wtforms.widgets import html5 as h5widgets
from... | 38.15625 | 126 | 0.675266 |
796f5284079aea5ce0122b024c2ad5044157a1bd | 104 | py | Python | 2235-add-two-integers/2235-add-two-integers.py | Satyam-bajpai007/LeetCode_Solutions | 9c7c209d2133bd55d824759db0b6f3dd1c0d4c17 | [
"MIT"
] | null | null | null | 2235-add-two-integers/2235-add-two-integers.py | Satyam-bajpai007/LeetCode_Solutions | 9c7c209d2133bd55d824759db0b6f3dd1c0d4c17 | [
"MIT"
] | null | null | null | 2235-add-two-integers/2235-add-two-integers.py | Satyam-bajpai007/LeetCode_Solutions | 9c7c209d2133bd55d824759db0b6f3dd1c0d4c17 | [
"MIT"
] | null | null | null | class Solution:
def sum(self, num1: int, num2: int) -> int:
res=num1+num2
return res | 26 | 47 | 0.576923 |
796f54506910550d12d41d2122ae38bad776103c | 441,777 | py | Python | SquidNet2/SquidNet2.py | Egida/Ethical-Hacking-Scripts | 0f96cbd4ae1a22124800e4149b95a64ae19e009f | [
"MIT"
] | null | null | null | SquidNet2/SquidNet2.py | Egida/Ethical-Hacking-Scripts | 0f96cbd4ae1a22124800e4149b95a64ae19e009f | [
"MIT"
] | null | null | null | SquidNet2/SquidNet2.py | Egida/Ethical-Hacking-Scripts | 0f96cbd4ae1a22124800e4149b95a64ae19e009f | [
"MIT"
] | 1 | 2022-02-01T04:39:53.000Z | 2022-02-01T04:39:53.000Z | import socket, threading, hashlib, os, datetime, time, sqlite3, shutil, urllib.request, json, sys
class BotNet:
"""Main Class for the BotNet. Every single line of server code, payload code is inside of this class.
There are many functions inside of the class, where they have many different uses. They vary ... | 94.61919 | 748 | 0.562571 |
796f55c989c58ef24277d95f491730f777f73f44 | 268 | py | Python | ch09/test_includes/DiameterizableInterface.py | ejosafat/poodrpython3 | 0dbfaacd00871fd1bff0366c3c116d6b68ec678d | [
"MIT"
] | null | null | null | ch09/test_includes/DiameterizableInterface.py | ejosafat/poodrpython3 | 0dbfaacd00871fd1bff0366c3c116d6b68ec678d | [
"MIT"
] | null | null | null | ch09/test_includes/DiameterizableInterface.py | ejosafat/poodrpython3 | 0dbfaacd00871fd1bff0366c3c116d6b68ec678d | [
"MIT"
] | 1 | 2020-11-13T02:22:38.000Z | 2020-11-13T02:22:38.000Z | from abc import ABC, abstractproperty
class DiameterizableInterfaceTest(ABC):
@abstractproperty
def object_tested(self):
pass
def test_implements_the_diameterizable_interface(self):
self.assertTrue('diameter' in dir(self.object_tested))
| 24.363636 | 62 | 0.753731 |
796f56c9643a4843f07ec9efd29c181ca9b0e7f4 | 6,493 | py | Python | main_pretrain_ori.py | yunyikristy/CM-ACC | 894b3c6874c7759d6e05418e1221f34ff5221f4a | [
"MIT"
] | 7 | 2021-03-31T19:29:16.000Z | 2021-12-02T09:11:24.000Z | main_pretrain_ori.py | yunyikristy/CM-ACC | 894b3c6874c7759d6e05418e1221f34ff5221f4a | [
"MIT"
] | 1 | 2021-09-23T12:35:55.000Z | 2021-09-29T07:04:02.000Z | main_pretrain_ori.py | yunyikristy/CM-ACC | 894b3c6874c7759d6e05418e1221f34ff5221f4a | [
"MIT"
] | 4 | 2021-05-14T04:41:37.000Z | 2021-09-28T12:45:39.000Z | import os
import sys
import json
import numpy as np
import torch
from torch import nn
from torch import optim
from torch.optim import lr_scheduler
from opts import parse_opts
from model import generate_model
from mean import get_mean, get_std
from spatial_transforms import (
Compose, Normalize, Scale, CenterCrop, ... | 38.194118 | 95 | 0.638996 |
796f5b236d4fca5005f3a776318fbc263f59995b | 3,191 | py | Python | SRT/cli/reserve.py | ruzun88/SRT | 053f8c9100fcd9a5d8adadb2b55c5d801bcc7955 | [
"MIT"
] | null | null | null | SRT/cli/reserve.py | ruzun88/SRT | 053f8c9100fcd9a5d8adadb2b55c5d801bcc7955 | [
"MIT"
] | null | null | null | SRT/cli/reserve.py | ruzun88/SRT | 053f8c9100fcd9a5d8adadb2b55c5d801bcc7955 | [
"MIT"
] | null | null | null | import os
from datetime import datetime, timedelta
from SRT import SRT, passenger
from PyInquirer import prompt
VERBOSE = os.environ.get("DEBUG") is not None
SRT_STATIONS = (
"수서",
"동탄",
"지제",
"천안아산",
"오송",
"대전",
"공주",
"익산",
"정읍",
"광주송정",
"나주",
"목포",
"김천구미",
"동... | 19.222892 | 88 | 0.448762 |
796f5bdeb56ba9b42e0b12f1b43c47f50492aec2 | 623 | py | Python | demo/urls.py | agiliq/django-pubsub | 3f0166c8f7561e072f70718009e9d54a5a0fde05 | [
"MIT"
] | 17 | 2015-04-08T03:41:46.000Z | 2020-10-29T01:23:27.000Z | demo/urls.py | agiliq/django-pubsub | 3f0166c8f7561e072f70718009e9d54a5a0fde05 | [
"MIT"
] | null | null | null | demo/urls.py | agiliq/django-pubsub | 3f0166c8f7561e072f70718009e9d54a5a0fde05 | [
"MIT"
] | 4 | 2015-02-13T02:33:33.000Z | 2021-03-08T00:34:23.000Z | from django.conf import settings
from django.conf.urls.defaults import *
from demo.models import Status
from demo.forms import StatusForm
import time
urlpatterns = patterns('',
url(r'^status/new$', 'django.views.generic.create_update.create_object', {
'model': Status,
'post_save_redirect': '/pubsu... | 32.789474 | 85 | 0.656501 |
796f5be87e2cc5d6b60f83b974a2321f97b641d8 | 374 | py | Python | test/test/mark.py | cathiele/plantumlcli | c969c38795538245ab06f4c52a230ed9ebca30c0 | [
"Apache-2.0"
] | 11 | 2020-11-29T15:08:35.000Z | 2021-11-19T16:40:15.000Z | test/test/mark.py | cathiele/plantumlcli | c969c38795538245ab06f4c52a230ed9ebca30c0 | [
"Apache-2.0"
] | 5 | 2020-11-30T06:18:07.000Z | 2021-11-20T12:32:56.000Z | test/test/mark.py | cathiele/plantumlcli | c969c38795538245ab06f4c52a230ed9ebca30c0 | [
"Apache-2.0"
] | 1 | 2021-11-19T16:40:19.000Z | 2021-11-19T16:40:19.000Z | from typing import Callable
import pytest
from _pytest.mark.structures import MarkDecorator
unittest = pytest.mark.unittest
benchmark = pytest.mark.benchmark
ignore = pytest.mark.ignore
def mark_select(condition: Callable[[], bool], ok: MarkDecorator = unittest,
failed: MarkDecorator = ignore) -> Ma... | 26.714286 | 76 | 0.751337 |
796f5c21e5ec5d70c86d7c4e718a9aede8fbd432 | 580 | py | Python | src/lesson_runtime_features/os_kill_example.py | jasonwee/asus-rt-n14uhp-mrtg | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | [
"Apache-2.0"
] | 3 | 2018-08-14T09:33:52.000Z | 2022-03-21T12:31:58.000Z | src/lesson_runtime_features/os_kill_example.py | jasonwee/asus-rt-n14uhp-mrtg | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | [
"Apache-2.0"
] | null | null | null | src/lesson_runtime_features/os_kill_example.py | jasonwee/asus-rt-n14uhp-mrtg | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | [
"Apache-2.0"
] | null | null | null | import os
import signal
import time
def signal_usr1(signum, frame):
"Callback invoked when a signal is received"
pid = os.getpid()
print('Received USR1 in process {}'.format(pid))
print('Forking...')
child_pid = os.fork()
if child_pid:
print('PARENT: Pausing before sending signal...')
time.sleep... | 23.2 | 53 | 0.687931 |
796f5c642f8e3788f2cacbd0b9646d5da6f74e4c | 523 | py | Python | quadruped/pyrosim/material.py | LloydTao/ecmm409-quadruped | 765c2fe0646ec6869ef73f1a2168ba5aeb104e95 | [
"MIT"
] | null | null | null | quadruped/pyrosim/material.py | LloydTao/ecmm409-quadruped | 765c2fe0646ec6869ef73f1a2168ba5aeb104e95 | [
"MIT"
] | null | null | null | quadruped/pyrosim/material.py | LloydTao/ecmm409-quadruped | 765c2fe0646ec6869ef73f1a2168ba5aeb104e95 | [
"MIT"
] | null | null | null | from pyrosim.commonFunctions import Save_Whitespace
class MATERIAL:
def __init__(self):
self.depth = 3
self.string1 = '<material name="Cyan">'
self.string2 = ' <color rgba="0 1.0 1.0 1.0"/>'
self.string3 = "</material>"
def Save(self, f):
Save_Whitespace(self.d... | 18.678571 | 58 | 0.571702 |
796f5d177bd3e5d31e4c7971f290ee5c87d387d5 | 6,507 | py | Python | sequana/scripts/vcf_filter.py | vladsaveliev/sequana | f6ee7fa7fb47ec179ceedf24684ba861a244656d | [
"BSD-3-Clause"
] | null | null | null | sequana/scripts/vcf_filter.py | vladsaveliev/sequana | f6ee7fa7fb47ec179ceedf24684ba861a244656d | [
"BSD-3-Clause"
] | null | null | null | sequana/scripts/vcf_filter.py | vladsaveliev/sequana | f6ee7fa7fb47ec179ceedf24684ba861a244656d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of Sequana software
#
# Copyright (c) 2016 - Sequana Development Team
#
# File author(s):
# Thomas Cokelaer <thomas.cokelaer@pasteur.fr>
#
# Distributed under the terms of the 3-clause BSD license.
# The full license is in the LICENSE file, distributed with this s... | 30.265116 | 87 | 0.606424 |
796f5d84f8dddebd181d7e74bfdb0e23f5372330 | 1,905 | py | Python | test/functional/feature_help.py | HunterCanimun/surgeofficial-surge-coin | 663dc25517e9045a65a9b1e0993bbaa06d564284 | [
"MIT"
] | null | null | null | test/functional/feature_help.py | HunterCanimun/surgeofficial-surge-coin | 663dc25517e9045a65a9b1e0993bbaa06d564284 | [
"MIT"
] | null | null | null | test/functional/feature_help.py | HunterCanimun/surgeofficial-surge-coin | 663dc25517e9045a65a9b1e0993bbaa06d564284 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Verify that starting surge with -h works as expected."""
import subprocess
from test_framework.test_framewo... | 40.531915 | 100 | 0.672441 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.