hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
515cab618ed79aaba5d009928d26db2168402cb0 | 6,387 | py | Python | tests/test_271.py | pedromtorres/TigerShark | 2790a7c03905a094b126b48387c7919c09cce238 | [
"BSD-3-Clause"
] | 24 | 2015-03-18T10:15:20.000Z | 2022-03-18T13:38:34.000Z | tests/test_271.py | tspannhw/TigerShark | 5081641f1b189a43e9eab4813256598cc0a79f6f | [
"BSD-3-Clause"
] | 6 | 2015-03-27T12:36:57.000Z | 2021-04-13T15:01:24.000Z | tests/test_271.py | tspannhw/TigerShark | 5081641f1b189a43e9eab4813256598cc0a79f6f | [
"BSD-3-Clause"
] | 21 | 2015-11-21T09:19:47.000Z | 2020-09-17T16:52:50.000Z | import unittest
import logging
import sys
import datetime
from tigershark.facade import f271
from tigershark.parsers import M271_4010_X092_A1
class TestParsed271(unittest.TestCase):
def setUp(self):
m = M271_4010_X092_A1.parsed_271
with open('tests/271-example.txt') as f:
parsed = m.u... | 41.206452 | 78 | 0.608736 | 6,106 | 0.956004 | 0 | 0 | 0 | 0 | 0 | 0 | 930 | 0.145608 |
515d5f82ce87af195121b8847cb3e553f85bb1c4 | 194 | py | Python | src/Lexer/run.py | PetukhovVictor/compiler2 | 0bf87393ce9ecdd421393165fc14cb7f03f5e3b8 | [
"MIT"
] | 3 | 2017-09-08T21:35:31.000Z | 2019-04-24T11:48:59.000Z | src/Lexer/run.py | PetukhovVictor/compiler2 | 0bf87393ce9ecdd421393165fc14cb7f03f5e3b8 | [
"MIT"
] | 1 | 2018-11-19T15:34:00.000Z | 2018-11-19T15:35:52.000Z | src/Lexer/run.py | PetukhovVictor/compiler2 | 0bf87393ce9ecdd421393165fc14cb7f03f5e3b8 | [
"MIT"
] | 4 | 2017-03-13T06:16:48.000Z | 2019-04-24T11:49:00.000Z | from .rules import token_expressions
from .lex import lex
def run(code):
""" Wrapper to run the Lexer (with the token expressions listed here). """
return lex(code, token_expressions)
| 24.25 | 78 | 0.726804 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.381443 |
515e110e923bd04c8ebed32a1acaa5cd9ac55ba1 | 943 | py | Python | 2016b/main.py | xdr940/iKaggle | cc0210e089e5f1af228f02bf67bb9a4459336722 | [
"MIT"
] | null | null | null | 2016b/main.py | xdr940/iKaggle | cc0210e089e5f1af228f02bf67bb9a4459336722 | [
"MIT"
] | null | null | null | 2016b/main.py | xdr940/iKaggle | cc0210e089e5f1af228f02bf67bb9a4459336722 | [
"MIT"
] | null | null | null | import pandas as pd
import pandas_profiling
from path import Path
import numpy as np
from scipy.stats import chi2_contingency
from collections import Counter
root = Path('/home/roit/datasets/kaggle/2016b')
dump_path = root/'dump'
ge_info = root/'gene_info'
exitnpy = False
if exitnpy==False:
genes_dic = []
g... | 21.431818 | 65 | 0.622481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 129 | 0.135933 |
515e89e12ec857736349c37b4aecc618592abe73 | 77 | py | Python | const.py | tfyoung/wattsonhass | eece56779561277fa9f2928230ac39bd43329344 | [
"Apache-2.0"
] | 1 | 2021-02-28T12:07:20.000Z | 2021-02-28T12:07:20.000Z | const.py | tfyoung/wattsonhass | eece56779561277fa9f2928230ac39bd43329344 | [
"Apache-2.0"
] | null | null | null | const.py | tfyoung/wattsonhass | eece56779561277fa9f2928230ac39bd43329344 | [
"Apache-2.0"
] | null | null | null | """Constants for the Wattson power meter integration."""
DOMAIN = "wattson"
| 19.25 | 56 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.844156 |
515f0a6a29381f3507258c4ec4a21b66fa8b9463 | 2,808 | py | Python | RL/test_depths.py | RECON-Labs-Inc/svox2 | 2946c1573fc4c8c8f378bf8154c29ba8d62af927 | [
"BSD-2-Clause"
] | null | null | null | RL/test_depths.py | RECON-Labs-Inc/svox2 | 2946c1573fc4c8c8f378bf8154c29ba8d62af927 | [
"BSD-2-Clause"
] | null | null | null | RL/test_depths.py | RECON-Labs-Inc/svox2 | 2946c1573fc4c8c8f378bf8154c29ba8d62af927 | [
"BSD-2-Clause"
] | null | null | null | import sys
from pathlib import Path
from datetime import datetime
import argparse
import json
import torch
from torchvision.utils import save_image
import torchvision
import numpy as np
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
from sklearn.metrics import pairwise_distances_argmin
from sklea... | 26.490566 | 74 | 0.654915 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 558 | 0.198718 |
515f21eaa0b5ed2cf1b0e5658806e586107dfcd7 | 1,376 | py | Python | examples/mxnet/dis_kvstore/client.py | tqchen/dgl | d57ff78da11193fbbee7f37a69fcfe1c14da2ae4 | [
"Apache-2.0"
] | 2 | 2020-05-10T14:06:12.000Z | 2021-01-01T02:57:20.000Z | examples/mxnet/dis_kvstore/client.py | tqchen/dgl | d57ff78da11193fbbee7f37a69fcfe1c14da2ae4 | [
"Apache-2.0"
] | null | null | null | examples/mxnet/dis_kvstore/client.py | tqchen/dgl | d57ff78da11193fbbee7f37a69fcfe1c14da2ae4 | [
"Apache-2.0"
] | null | null | null | # This is a simple MXNet server demo shows how to use DGL distributed kvstore.
import dgl
import argparse
import mxnet as mx
ID = []
ID.append(mx.nd.array([0,1], dtype='int64'))
ID.append(mx.nd.array([2,3], dtype='int64'))
ID.append(mx.nd.array([4,5], dtype='int64'))
ID.append(mx.nd.array([6,7], dtype='int64'))
edata... | 32.761905 | 110 | 0.631541 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 201 | 0.146076 |
515f518715b6288fc69c17ec11ceead08e8d514f | 9,535 | py | Python | qtgui.py | izaletel/NeuroMorpho-Access-Tool | 3441785edbddaf4b357377e9c7897dbbad42dc87 | [
"MIT"
] | null | null | null | qtgui.py | izaletel/NeuroMorpho-Access-Tool | 3441785edbddaf4b357377e9c7897dbbad42dc87 | [
"MIT"
] | null | null | null | qtgui.py | izaletel/NeuroMorpho-Access-Tool | 3441785edbddaf4b357377e9c7897dbbad42dc87 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'qtgui.ui'
##
## Created by: Qt User Interface Compiler version 6.2.3
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
#####################... | 60.732484 | 140 | 0.724698 | 8,619 | 0.903933 | 0 | 0 | 0 | 0 | 0 | 0 | 1,574 | 0.165076 |
515fe6ec967d9adf1eabbb5dad94f9dd79c8c9e6 | 90 | py | Python | tests/test_wb2k.py | reillysiemens/wb2k | 54edaa1afe4904a78746356555468d7c04685b28 | [
"ISC"
] | 6 | 2016-06-09T04:06:29.000Z | 2019-12-22T15:29:54.000Z | tests/test_wb2k.py | reillysiemens/wb2k | 54edaa1afe4904a78746356555468d7c04685b28 | [
"ISC"
] | 19 | 2016-06-03T22:00:13.000Z | 2019-09-25T09:03:16.000Z | tests/test_wb2k.py | reillysiemens/wb2k | 54edaa1afe4904a78746356555468d7c04685b28 | [
"ISC"
] | 4 | 2016-10-06T20:45:44.000Z | 2017-10-28T22:01:20.000Z | # TODO: Write actual tests. This just makes pytest-cov pick up on the module.
import wb2k
| 30 | 77 | 0.766667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.855556 |
516143d6f8476fa2b9d91fe746b6871aa05baca3 | 4,690 | py | Python | plugins/modules/tag_member.py | robertcsapo/dnacenter-ansible | 33f776f8c0bc7113da73191c301dd1807e6b4a43 | [
"MIT"
] | null | null | null | plugins/modules/tag_member.py | robertcsapo/dnacenter-ansible | 33f776f8c0bc7113da73191c301dd1807e6b4a43 | [
"MIT"
] | null | null | null | plugins/modules/tag_member.py | robertcsapo/dnacenter-ansible | 33f776f8c0bc7113da73191c301dd1807e6b4a43 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2021, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
DOCUMENTATION = r"""
---
module: tag_member
short_description: Manage TagMember objects of Tag
description:
- Returns tag members specified by id.... | 29.3125 | 117 | 0.715991 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,647 | 0.989987 |
51617330e9ebead5bbb61a5ae564be20889db321 | 893 | py | Python | unittest_reinvent/scoring_tests/scoring_components/test_tanimoto_similarity.py | MolecularAI/reinvent-scoring | f7e052ceeffd29e17e1672c33607189873c82a45 | [
"MIT"
] | null | null | null | unittest_reinvent/scoring_tests/scoring_components/test_tanimoto_similarity.py | MolecularAI/reinvent-scoring | f7e052ceeffd29e17e1672c33607189873c82a45 | [
"MIT"
] | 2 | 2021-11-01T23:19:42.000Z | 2021-11-22T23:41:39.000Z | unittest_reinvent/scoring_tests/scoring_components/test_tanimoto_similarity.py | MolecularAI/reinvent-scoring | f7e052ceeffd29e17e1672c33607189873c82a45 | [
"MIT"
] | 2 | 2021-11-18T13:14:22.000Z | 2022-03-16T07:52:57.000Z | import unittest
import numpy.testing as npt
from unittest_reinvent.fixtures.test_data import CELECOXIB, CELECOXIB_C, BUTANE
from unittest_reinvent.scoring_tests.scoring_components.fixtures import score_single, score, instantiate_component
class TestTanimotoSimilarity(unittest.TestCase):
@classmethod
def se... | 31.892857 | 114 | 0.753639 | 649 | 0.726764 | 0 | 0 | 85 | 0.095185 | 0 | 0 | 0 | 0 |
516282162e672e92cb14c5b353f7f1dcb8f0e66a | 2,318 | py | Python | python-project/methods/KDE.py | ferjorosa/bayesian-latent-forests | 3d9e19f1d0be1e4cca0b390866589061a670cc20 | [
"Apache-2.0"
] | null | null | null | python-project/methods/KDE.py | ferjorosa/bayesian-latent-forests | 3d9e19f1d0be1e4cca0b390866589061a670cc20 | [
"Apache-2.0"
] | null | null | null | python-project/methods/KDE.py | ferjorosa/bayesian-latent-forests | 3d9e19f1d0be1e4cca0b390866589061a670cc20 | [
"Apache-2.0"
] | null | null | null | import statsmodels.api as sm
import numpy as np
import os
import time
import json
def apply(train_datasets, var_types_string, test_datasets, n_folds, result_path, filename, foldLog):
print("\n========================")
print("KDE")
print("========================")
results = {}
folds = {}
av... | 36.793651 | 126 | 0.595772 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 555 | 0.239431 |
5162cae16f1582e2cd15f8c44ff6385eae028502 | 3,471 | py | Python | pay-api/tests/unit/services/test_auth.py | stevenc987/sbc-pay | 04f02f362f88a30c082b0643583b8d0ebff6063f | [
"Apache-2.0"
] | null | null | null | pay-api/tests/unit/services/test_auth.py | stevenc987/sbc-pay | 04f02f362f88a30c082b0643583b8d0ebff6063f | [
"Apache-2.0"
] | null | null | null | pay-api/tests/unit/services/test_auth.py | stevenc987/sbc-pay | 04f02f362f88a30c082b0643583b8d0ebff6063f | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# 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 agr... | 35.060606 | 91 | 0.682224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,880 | 0.541475 |
5163521d44aed6af36c7ee8ac7cba90723cfbc26 | 49 | py | Python | api/common.py | ewangplay/wallet-sdk-py | 9f55ffa6bb7968192fd88e2b2dddf04c997874ab | [
"Apache-2.0"
] | 13 | 2018-03-06T10:04:26.000Z | 2021-08-12T11:25:29.000Z | api/common.py | ewangplay/wallet-sdk-py | 9f55ffa6bb7968192fd88e2b2dddf04c997874ab | [
"Apache-2.0"
] | 42 | 2018-02-08T04:32:56.000Z | 2018-09-06T07:30:58.000Z | api/common.py | ewangplay/wallet-sdk-py | 9f55ffa6bb7968192fd88e2b2dddf04c997874ab | [
"Apache-2.0"
] | 15 | 2018-02-11T09:29:31.000Z | 2021-07-04T07:33:22.000Z | from cryption.crypto import sign
VERSION = "v1"
| 12.25 | 32 | 0.755102 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0.081633 |
5163aaae4b007b773986e024d8629d4d1f39a0b9 | 589 | py | Python | tests/unit/test_subscription.py | eldarion/braintree_python | 8be3f69fb9a4171c5e9be049c8440fcc4f79fb40 | [
"MIT"
] | 3 | 2015-11-05T08:57:12.000Z | 2016-07-17T18:10:55.000Z | tests/unit/test_subscription.py | eldarion/braintree_python | 8be3f69fb9a4171c5e9be049c8440fcc4f79fb40 | [
"MIT"
] | null | null | null | tests/unit/test_subscription.py | eldarion/braintree_python | 8be3f69fb9a4171c5e9be049c8440fcc4f79fb40 | [
"MIT"
] | null | null | null | from tests.test_helper import *
class TestSubscription(unittest.TestCase):
def test_create_raises_exception_with_bad_keys(self):
try:
Subscription.create({"bad_key": "value"})
self.assertTrue(False)
except KeyError, e:
self.assertEquals("'Invalid keys: bad_key'",... | 34.647059 | 64 | 0.633277 | 555 | 0.942275 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.14601 |
5164ffb41b1068e6e8353350ba4bc5a194d1426f | 2,848 | py | Python | testNim.py | PauloHSNeto/Ciencia-de-Computa-o-CourseEra | 230281ba7227348ed2d27bb20039aed223244d94 | [
"bzip2-1.0.6"
] | null | null | null | testNim.py | PauloHSNeto/Ciencia-de-Computa-o-CourseEra | 230281ba7227348ed2d27bb20039aed223244d94 | [
"bzip2-1.0.6"
] | null | null | null | testNim.py | PauloHSNeto/Ciencia-de-Computa-o-CourseEra | 230281ba7227348ed2d27bb20039aed223244d94 | [
"bzip2-1.0.6"
] | null | null | null | computador = 0
usuario = 0
rodada = 0
def computador_escolhe_jogada(n, m):
global computador
n = n - m
if (n == 1):
print(" ")
print("O computador tirou %s peça." % n)
print("Agora restam %s peças no tabuleiro." % n)
print(" ")
if (n == 0):
print ("Fim do... | 29.061224 | 79 | 0.466643 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 796 | 0.27803 |
516516f68aa7cecc66414e1c2f63b93bd749ec5c | 59 | py | Python | example_snippets/multimenus_snippets/NewSnippets/SymPy/Manipulating expressions/Miscellaneous/Simplify Bessel functions.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | null | null | null | example_snippets/multimenus_snippets/NewSnippets/SymPy/Manipulating expressions/Miscellaneous/Simplify Bessel functions.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | null | null | null | example_snippets/multimenus_snippets/NewSnippets/SymPy/Manipulating expressions/Miscellaneous/Simplify Bessel functions.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | 1 | 2021-02-04T04:51:48.000Z | 2021-02-04T04:51:48.000Z | expr = besselj(x, z*polar_lift(-1))
expr = besselsimp(expr) | 29.5 | 35 | 0.711864 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
516615c0dc774d664f76be40cc3b724ef7f05aa9 | 15,206 | py | Python | mbuild/formats/hoomd_simulation.py | dcardenasv/mbuild | 20c13f6bb66c6b023b07d7a2b2e4ad0a5073d727 | [
"MIT"
] | null | null | null | mbuild/formats/hoomd_simulation.py | dcardenasv/mbuild | 20c13f6bb66c6b023b07d7a2b2e4ad0a5073d727 | [
"MIT"
] | null | null | null | mbuild/formats/hoomd_simulation.py | dcardenasv/mbuild | 20c13f6bb66c6b023b07d7a2b2e4ad0a5073d727 | [
"MIT"
] | null | null | null | import warnings
import itertools
import numpy as np
import operator
from collections import namedtuple
import parmed as pmd
import mbuild as mb
from mbuild.utils.sorting import natural_sort
from mbuild.utils.io import import_
from mbuild.utils.conversion import RB_to_OPLS
from .hoomd_snapshot import to_hoomdsnapshot
... | 40.657754 | 85 | 0.636262 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,260 | 0.280153 |
516648ad34a16a2a40620bcd9fd2d7782735d4c0 | 274 | py | Python | Utility.py | YiFanChen99/PyQtComponent | fdf83d6e3f8a448acce866db85ce418ce0df121e | [
"MIT"
] | null | null | null | Utility.py | YiFanChen99/PyQtComponent | fdf83d6e3f8a448acce866db85ce418ce0df121e | [
"MIT"
] | null | null | null | Utility.py | YiFanChen99/PyQtComponent | fdf83d6e3f8a448acce866db85ce418ce0df121e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from PyQt5.QtWidgets import *
def launch_application(creator):
def wrapper():
import sys
app = QApplication(sys.argv)
widget = creator()
widget.show()
app.exec_()
return wrapper
| 19.571429 | 36 | 0.591241 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.160584 |
51666c4b9d618cca914f038ac201e94c03f87f6e | 34,907 | py | Python | post_optimization_studies/mad_analyses/four_cuts_eff_flow_chart/Output/Histos/MadAnalysis5job_0/selection_4.py | sheride/axion_pheno | 7d3fc08f5ae5b17a3500eba19a2e43f87f076ce5 | [
"MIT"
] | null | null | null | post_optimization_studies/mad_analyses/four_cuts_eff_flow_chart/Output/Histos/MadAnalysis5job_0/selection_4.py | sheride/axion_pheno | 7d3fc08f5ae5b17a3500eba19a2e43f87f076ce5 | [
"MIT"
] | null | null | null | post_optimization_studies/mad_analyses/four_cuts_eff_flow_chart/Output/Histos/MadAnalysis5job_0/selection_4.py | sheride/axion_pheno | 7d3fc08f5ae5b17a3500eba19a2e43f87f076ce5 | [
"MIT"
] | null | null | null | def selection_4():
# Library import
import numpy
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
# Library version
matplotlib_version = matplotlib.__version__
numpy_version = numpy.__version__
# Histo binning
xBinning = numpy.lin... | 179.93299 | 1,742 | 0.742373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,609 | 0.074741 |
51668e773b785fc937e32ac3a240021ec3f1a368 | 595 | py | Python | homework/jenya_s/homework12.py | aodarc/LIST-010 | 4579a047ca1ae0266f368349ea4536c6eb367f97 | [
"MIT"
] | null | null | null | homework/jenya_s/homework12.py | aodarc/LIST-010 | 4579a047ca1ae0266f368349ea4536c6eb367f97 | [
"MIT"
] | 4 | 2018-12-19T13:41:12.000Z | 2019-01-14T15:11:11.000Z | homework/jenya_s/homework12.py | aodarc/LIST-010 | 4579a047ca1ae0266f368349ea4536c6eb367f97 | [
"MIT"
] | null | null | null | import os
class Cpypl:
def __init__(self, directory):
self.directory = directory
self.extension_dict = {"c": (".c", ".h"),
"py": (".py", ".pyc"),
"pl": (".pl", ".pm"),
}
def ... | 29.75 | 88 | 0.480672 | 504 | 0.847059 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.129412 |
5166a904988e89265b852c411614fc81169a4bf3 | 68 | py | Python | GCC-paddle/gcc/models/__init__.py | S-HuaBomb/Contrib | 10596814bb98c9e2499e4240e56207dc3b547959 | [
"Apache-2.0"
] | 243 | 2020-06-16T08:06:57.000Z | 2022-03-31T10:09:37.000Z | GCC-paddle/gcc/models/__init__.py | S-HuaBomb/Contrib | 10596814bb98c9e2499e4240e56207dc3b547959 | [
"Apache-2.0"
] | 34 | 2020-02-20T11:04:58.000Z | 2022-03-12T00:54:26.000Z | GCC-paddle/gcc/models/__init__.py | S-HuaBomb/Contrib | 10596814bb98c9e2499e4240e56207dc3b547959 | [
"Apache-2.0"
] | 49 | 2020-06-28T02:37:17.000Z | 2022-03-29T08:07:35.000Z | from .graph_encoder import GraphEncoder
__all__ = ["GraphEncoder"]
| 17 | 39 | 0.794118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.205882 |
516815174595feb3cdc84a37dc37e334c26007d4 | 941 | py | Python | sme_material_apps/core/migrations/0005_material_categoria.py | luizhpriotto/piloto_apresentacao | c968025db819633ee4cd75df5357ab6a4ab7d9af | [
"MIT"
] | null | null | null | sme_material_apps/core/migrations/0005_material_categoria.py | luizhpriotto/piloto_apresentacao | c968025db819633ee4cd75df5357ab6a4ab7d9af | [
"MIT"
] | null | null | null | sme_material_apps/core/migrations/0005_material_categoria.py | luizhpriotto/piloto_apresentacao | c968025db819633ee4cd75df5357ab6a4ab7d9af | [
"MIT"
] | null | null | null | # Generated by Django 2.2.9 on 2020-07-20 19:50
from django.db import migrations
import multiselectfield.db.fields
class Migration(migrations.Migration):
dependencies = [
('core', '0004_auto_20200717_1159'),
]
operations = [
migrations.AddField(
model_name='material',
... | 47.05 | 579 | 0.676939 | 833 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 550 | 0.577731 |
516a41921de7bc6d406a64cbe02684f2db6fb80f | 833 | py | Python | RT_Group/main/models.py | DiForzza/site_one | 440efe197e1ecaab3416460f1827738d160e48b6 | [
"Apache-2.0"
] | null | null | null | RT_Group/main/models.py | DiForzza/site_one | 440efe197e1ecaab3416460f1827738d160e48b6 | [
"Apache-2.0"
] | null | null | null | RT_Group/main/models.py | DiForzza/site_one | 440efe197e1ecaab3416460f1827738d160e48b6 | [
"Apache-2.0"
] | null | null | null | from django.db import models
import datetime
class Task(models.Model):
title = models.CharField("Название", max_length=50)
task = models.TextField("Описание")
date = models.DateTimeField(u'Дата и время', default=datetime.datetime.now())
def __str__(self):
return self.title
class Meta:
... | 25.242424 | 81 | 0.681873 | 861 | 0.943045 | 0 | 0 | 0 | 0 | 0 | 0 | 191 | 0.2092 |
516aa9e7ed14b4702820fbf786e6257801f2f755 | 364 | py | Python | emapp/auth.py | azrle/flask-restful-emapp-demo | 4be19725538a5e961afb77a1495d6c57ae0be89a | [
"MIT"
] | null | null | null | emapp/auth.py | azrle/flask-restful-emapp-demo | 4be19725538a5e961afb77a1495d6c57ae0be89a | [
"MIT"
] | null | null | null | emapp/auth.py | azrle/flask-restful-emapp-demo | 4be19725538a5e961afb77a1495d6c57ae0be89a | [
"MIT"
] | null | null | null | from functools import wraps
from flask import current_app, request
from flask_restful import abort
def auth_simple_token(func):
@wraps(func)
def wrapper(*args, **kwargs):
token = request.headers.get('x-simple-auth')
if current_app.config['API_KEY'] == token:
return func(*args, **kw... | 26 | 52 | 0.667582 | 0 | 0 | 0 | 0 | 210 | 0.576923 | 0 | 0 | 24 | 0.065934 |
5a8c5dccd774b45cfea010980c9e6fb6227679df | 3,307 | py | Python | Python/data/preprocess.py | SCAN-NRAD/BrainRegressorCNN | 7917c6a6c4e3728db17ec762c63f8253392e6c04 | [
"BSD-3-Clause"
] | 1 | 2022-02-11T18:49:34.000Z | 2022-02-11T18:49:34.000Z | Python/data/preprocess.py | SCAN-NRAD/BrainRegressorCNN | 7917c6a6c4e3728db17ec762c63f8253392e6c04 | [
"BSD-3-Clause"
] | null | null | null | Python/data/preprocess.py | SCAN-NRAD/BrainRegressorCNN | 7917c6a6c4e3728db17ec762c63f8253392e6c04 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import scipy.ndimage.measurements as scipy_measurements
import miapy.data.transformation as miapy_tfm
class ClipNegativeTransform(miapy_tfm.Transform):
def __init__(self, entries=('images',)) -> None:
super().__init__()
self.entries = entries
def __call__(self, sample: dic... | 30.063636 | 89 | 0.558512 | 2,746 | 0.83036 | 0 | 0 | 0 | 0 | 0 | 0 | 353 | 0.106743 |
5a8e3a68bba6328be4a0daef3330c63f8527f035 | 1,828 | py | Python | conversion_service/config/settings/worker.py | das-g/osmaxx-postgis-conversion | c41aba1cb0fd112de12c8c0540584b7caa651150 | [
"MIT"
] | null | null | null | conversion_service/config/settings/worker.py | das-g/osmaxx-postgis-conversion | c41aba1cb0fd112de12c8c0540584b7caa651150 | [
"MIT"
] | null | null | null | conversion_service/config/settings/worker.py | das-g/osmaxx-postgis-conversion | c41aba1cb0fd112de12c8c0540584b7caa651150 | [
"MIT"
] | null | null | null | # pylint: skip-file
import random
import string
from .common import * # noqa
# we don't use user sessions, so it doesn't matter if we recreate the secret key on each startup
SECRET_KEY = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(30))
# disable databases for the worker
DATABASES =... | 26.114286 | 96 | 0.461707 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 784 | 0.428884 |
5a9109ad68997c62118ea1f04a5cdac8b71bc9b1 | 2,289 | py | Python | categorias.py | OrlandoBitencourt/proway_python_exercicio1 | 4fe2aa48aab350cd5e949d95feefe37d1b2af387 | [
"MIT"
] | null | null | null | categorias.py | OrlandoBitencourt/proway_python_exercicio1 | 4fe2aa48aab350cd5e949d95feefe37d1b2af387 | [
"MIT"
] | null | null | null | categorias.py | OrlandoBitencourt/proway_python_exercicio1 | 4fe2aa48aab350cd5e949d95feefe37d1b2af387 | [
"MIT"
] | null | null | null | import main
def cadastrar_categoria(nome: str):
with open("categorias.txt", "a") as file:
dados = f"{nome}\n"
file.write(dados)
print("Categoria cadastrada com sucesso! \n")
def listar_categorias():
main.categorias_list.clear()
print(f"Lista de categorias: \n")
with open("cate... | 31.791667 | 103 | 0.553954 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 411 | 0.179476 |
5a9137e47101ff21c41e130f1251b26b67a1b350 | 708 | py | Python | test/espnet2/layers/test_log_mel.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 5,053 | 2017-12-13T06:21:41.000Z | 2022-03-31T13:38:29.000Z | test/espnet2/layers/test_log_mel.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 3,666 | 2017-12-14T05:58:50.000Z | 2022-03-31T22:11:49.000Z | test/espnet2/layers/test_log_mel.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 1,709 | 2017-12-13T01:02:42.000Z | 2022-03-31T11:57:45.000Z | import torch
from espnet2.layers.log_mel import LogMel
def test_repr():
print(LogMel())
def test_forward():
layer = LogMel(n_fft=16, n_mels=2)
x = torch.randn(2, 4, 9)
y, _ = layer(x)
assert y.shape == (2, 4, 2)
y, ylen = layer(x, torch.tensor([4, 2], dtype=torch.long))
assert (ylen == ... | 22.125 | 65 | 0.610169 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5a91d9da8ada11831ecc164dcca33401ae0379e5 | 6,347 | py | Python | test/database/test_raw_scraping_data.py | AMHesch/aws-allowlister | b15309cc581b3cfba97733806df4ba2afa73fbee | [
"MIT"
] | 180 | 2021-02-02T21:31:56.000Z | 2022-03-19T19:52:08.000Z | test/database/test_raw_scraping_data.py | AMHesch/aws-allowlister | b15309cc581b3cfba97733806df4ba2afa73fbee | [
"MIT"
] | 36 | 2021-02-05T19:19:26.000Z | 2022-01-27T05:01:08.000Z | test/database/test_raw_scraping_data.py | AMHesch/aws-allowlister | b15309cc581b3cfba97733806df4ba2afa73fbee | [
"MIT"
] | 28 | 2021-02-04T19:19:43.000Z | 2022-03-18T21:27:41.000Z | import unittest
import json
from aws_allowlister.database.database import connect_db
from aws_allowlister.database.raw_scraping_data import RawScrapingData
db_session = connect_db()
raw_scraping_data = RawScrapingData()
class RawScrapingDataTestCase(unittest.TestCase):
def test_standards(self):
"""databa... | 144.25 | 4,496 | 0.722073 | 6,122 | 0.96455 | 0 | 0 | 0 | 0 | 0 | 0 | 4,541 | 0.715456 |
5a9713280ba850f01b042a95ba2fef86e7e5c38e | 5,533 | py | Python | GenPasswd/genpasswd.py | Gowthaman1401/GenPass | dd6450d80e99648f1d23cb0e034189b5fe56bbd1 | [
"MIT"
] | null | null | null | GenPasswd/genpasswd.py | Gowthaman1401/GenPass | dd6450d80e99648f1d23cb0e034189b5fe56bbd1 | [
"MIT"
] | null | null | null | GenPasswd/genpasswd.py | Gowthaman1401/GenPass | dd6450d80e99648f1d23cb0e034189b5fe56bbd1 | [
"MIT"
] | null | null | null | import random
from . import constants
from . import exceptions
class PasswordGenerator:
def __init__(self, length=False, ignore=False, only=False, include=False, repeat=False, separator=False,
separator_length=False, separation=False):
self.__password = None
self.__avai... | 44.98374 | 165 | 0.590638 | 5,459 | 0.986626 | 0 | 0 | 0 | 0 | 0 | 0 | 146 | 0.026387 |
5a97b4378066662b1ab8308caa3ca06c47283ec7 | 43,014 | py | Python | AESDataV3.py | JHerrmann01/AESDataManipulator | 836ee74326ee0c35435b5fe0bb9875d392b2cc7c | [
"Apache-2.0"
] | null | null | null | AESDataV3.py | JHerrmann01/AESDataManipulator | 836ee74326ee0c35435b5fe0bb9875d392b2cc7c | [
"Apache-2.0"
] | null | null | null | AESDataV3.py | JHerrmann01/AESDataManipulator | 836ee74326ee0c35435b5fe0bb9875d392b2cc7c | [
"Apache-2.0"
] | null | null | null | ###American Environmental Solutions Data Manipulation###
## Created by Jeremy Herrmann ##
##Import Libraries##
from __future__ import print_function
from os.path import join, dirname, abspath
import xlrd
from xlrd.sheet import ctype_text
import xlsxwriter
####################
def loadSpreadsh... | 46.907306 | 241 | 0.632561 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,795 | 0.064979 |
5a9823ed404374fd6e8abf22e09c47cf13d68464 | 6,282 | py | Python | lhrhost/robot/robot.py | ethanjli/liquid-handling-robotics | 999ab03c225b4c5382ab9fcac6a4988d0c232c67 | [
"BSD-3-Clause"
] | null | null | null | lhrhost/robot/robot.py | ethanjli/liquid-handling-robotics | 999ab03c225b4c5382ab9fcac6a4988d0c232c67 | [
"BSD-3-Clause"
] | null | null | null | lhrhost/robot/robot.py | ethanjli/liquid-handling-robotics | 999ab03c225b4c5382ab9fcac6a4988d0c232c67 | [
"BSD-3-Clause"
] | 1 | 2018-08-03T17:17:31.000Z | 2018-08-03T17:17:31.000Z | """Abstractions for a liquid-handling robot."""
# Standard imports
import asyncio
import logging
# Local package imports
from lhrhost.robot.p_axis import Axis as PAxis
from lhrhost.robot.x_axis import Axis as XAxis
from lhrhost.robot.y_axis import Axis as YAxis
from lhrhost.robot.z_axis import Axis as ZAxis
from lhrh... | 37.616766 | 81 | 0.650748 | 5,843 | 0.930118 | 0 | 0 | 0 | 0 | 4,940 | 0.786374 | 1,573 | 0.250398 |
5a98fddec1d3cbb33837e1f1d6a6a5b060873682 | 12,100 | py | Python | python/tinkoff/cloud/longrunning/v1/longrunning_pb2_grpc.py | qwertBR/voicekit-examples | 273a63e4cf11841339108cdcdf8b485b7c96298a | [
"Apache-2.0"
] | 3 | 2022-02-11T04:34:18.000Z | 2022-03-29T19:35:57.000Z | python/tinkoff/cloud/longrunning/v1/longrunning_pb2_grpc.py | qwertBR/voicekit-examples | 273a63e4cf11841339108cdcdf8b485b7c96298a | [
"Apache-2.0"
] | 3 | 2022-01-27T15:40:38.000Z | 2022-03-31T10:03:35.000Z | python/tinkoff/cloud/longrunning/v1/longrunning_pb2_grpc.py | qwertBR/voicekit-examples | 273a63e4cf11841339108cdcdf8b485b7c96298a | [
"Apache-2.0"
] | 5 | 2022-01-27T15:15:06.000Z | 2022-03-24T22:06:18.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from tinkoff.cloud.longrunning.v1 import longrunning_pb2 as tinkoff_dot_cloud_dot_lon... | 50.416667 | 144 | 0.705702 | 9,068 | 0.749421 | 0 | 0 | 4,580 | 0.378512 | 0 | 0 | 1,846 | 0.152562 |
5a9ae867d70612f2ffe19fc29174270aa28f529d | 602 | py | Python | src/astro/utils/schema_util.py | malthe/astro | 61036ab08b2826136f64fdbfc6ca21b61643a8a0 | [
"Apache-2.0"
] | null | null | null | src/astro/utils/schema_util.py | malthe/astro | 61036ab08b2826136f64fdbfc6ca21b61643a8a0 | [
"Apache-2.0"
] | null | null | null | src/astro/utils/schema_util.py | malthe/astro | 61036ab08b2826136f64fdbfc6ca21b61643a8a0 | [
"Apache-2.0"
] | null | null | null | import os
from airflow.providers.postgres.hooks.postgres import PostgresHook
from psycopg2 import sql
def set_schema_query(conn_type, hook, schema_id, user):
if conn_type == "postgres":
return (
sql.SQL("CREATE SCHEMA IF NOT EXISTS {schema} AUTHORIZATION {user}")
.format(schema=s... | 28.666667 | 80 | 0.682724 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.267442 |
5a9d0c2e4e731186b891bcd4f534edfa2b33e353 | 1,599 | py | Python | references/stm32_parsing_sim/stm32parser.py | koson/OTA_update_STM32_using_ESP32 | 7fe7ae64d5290c0a453c29d787b5fe9456910e96 | [
"MIT"
] | 155 | 2020-02-15T06:54:15.000Z | 2021-09-16T07:19:19.000Z | references/stm32_parsing_sim/stm32parser.py | ksmola/OTA_update_STM32_using_ESP32 | dd616a1212da8f874e4826d63cfbd4c3b9ad2df2 | [
"MIT"
] | 8 | 2020-10-09T08:56:52.000Z | 2021-09-01T03:42:49.000Z | references/stm32_parsing_sim/stm32parser.py | ksmola/OTA_update_STM32_using_ESP32 | dd616a1212da8f874e4826d63cfbd4c3b9ad2df2 | [
"MIT"
] | 25 | 2020-03-16T04:41:12.000Z | 2021-08-19T11:49:40.000Z |
import time
import math as m
start = time.time()
def checksum(block):
data_chk = []
xor = '0'
for line in block:
for x in range(0, len(line) - 1, 2):
xor = hex(int(xor, 16) ^ int(line[x], 16) ^ int(line[x + 1], 16))
data_chk.append(xor)
xor = '0'
return data_chk
... | 20.766234 | 77 | 0.499062 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 198 | 0.123827 |
5a9d5971fc9f0f68b3b0383f6727b85c4065e172 | 3,034 | py | Python | sw/device/silicon_creator/lib/crypto/tests/testvectors/wycheproof/rsa_3072_verify_parse_testvectors.py | matutem/opentitan | a41c0a57568f1dc8263a4ecc3913f190750959f5 | [
"Apache-2.0"
] | null | null | null | sw/device/silicon_creator/lib/crypto/tests/testvectors/wycheproof/rsa_3072_verify_parse_testvectors.py | matutem/opentitan | a41c0a57568f1dc8263a4ecc3913f190750959f5 | [
"Apache-2.0"
] | null | null | null | sw/device/silicon_creator/lib/crypto/tests/testvectors/wycheproof/rsa_3072_verify_parse_testvectors.py | matutem/opentitan | a41c0a57568f1dc8263a4ecc3913f190750959f5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import argparse
import json
import math
import sys
import hjson
def parse_hex_int(hex_str):
# int() throws an error message for empty string
... | 28.622642 | 85 | 0.586684 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,104 | 0.363876 |
5a9e608dad9679e93ef744bc1105dbf95d043cce | 2,479 | py | Python | Tools/boot_now.py | wms124/PX4_1.4.1_Back-up | 9d6d903a8f46346281ae11104c47f1904da05e37 | [
"BSD-3-Clause"
] | 4,224 | 2015-01-02T11:51:02.000Z | 2020-10-27T23:42:28.000Z | Tools/boot_now.py | wms124/PX4_1.4.1_Back-up | 9d6d903a8f46346281ae11104c47f1904da05e37 | [
"BSD-3-Clause"
] | 11,736 | 2015-01-01T11:59:16.000Z | 2020-10-28T17:13:38.000Z | Tools/boot_now.py | wms124/PX4_1.4.1_Back-up | 9d6d903a8f46346281ae11104c47f1904da05e37 | [
"BSD-3-Clause"
] | 11,850 | 2015-01-02T14:54:47.000Z | 2020-10-28T16:42:47.000Z | #!/usr/bin/env python
############################################################################
#
# Copyright (C) 2012-2015 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are me... | 41.316667 | 108 | 0.702299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,946 | 0.784994 |
5aa27bded824f5d2ed1668d9730e5fcc75bdeb84 | 550 | py | Python | cc_server/commons/database.py | curious-containers/cc-server | 3d4f0e39d2a974ee239a455b238ac8a3bfcddb73 | [
"Apache-2.0"
] | 4 | 2016-09-05T15:01:01.000Z | 2016-11-17T12:36:41.000Z | cc_server/commons/database.py | curious-containers/cc-server | 3d4f0e39d2a974ee239a455b238ac8a3bfcddb73 | [
"Apache-2.0"
] | null | null | null | cc_server/commons/database.py | curious-containers/cc-server | 3d4f0e39d2a974ee239a455b238ac8a3bfcddb73 | [
"Apache-2.0"
] | null | null | null | import pymongo
class Mongo:
def __init__(self, config):
self._config = config
self.client = pymongo.MongoClient('mongodb://{}:{}@{}:{}/{}'.format(
self._config.mongo['username'],
self._config.mongo['password'],
self._config.mongo['host'],
self._confi... | 28.947368 | 76 | 0.558182 | 532 | 0.967273 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.12 |
5aa3314ea9abea60e379f77782cb7a74e3c4aa9a | 543 | py | Python | coord2vec/evaluation/visualizations/tests/test_bokeh_pr_curve.py | jonzarecki/coord2vec | 4f267fdd87af7b3d3558ca834b88e9ab7c309c18 | [
"Apache-2.0"
] | null | null | null | coord2vec/evaluation/visualizations/tests/test_bokeh_pr_curve.py | jonzarecki/coord2vec | 4f267fdd87af7b3d3558ca834b88e9ab7c309c18 | [
"Apache-2.0"
] | null | null | null | coord2vec/evaluation/visualizations/tests/test_bokeh_pr_curve.py | jonzarecki/coord2vec | 4f267fdd87af7b3d3558ca834b88e9ab7c309c18 | [
"Apache-2.0"
] | 1 | 2021-01-25T09:21:17.000Z | 2021-01-25T09:21:17.000Z | from unittest import TestCase
import numpy as np
from bokeh.models import LayoutDOM
from coord2vec.evaluation.visualizations.bokeh_plots import bokeh_pr_curve_from_y_proba
class TestBokeh_pr_curve(TestCase):
@classmethod
def setUpClass(cls):
cls.y_pred = np.random.choice((0, 1), size=10)
cls... | 30.166667 | 96 | 0.740331 | 367 | 0.675875 | 0 | 0 | 147 | 0.270718 | 0 | 0 | 20 | 0.036832 |
5aa44f0e70c5feb1742576c75322458cf3b62dfc | 5,267 | py | Python | scripts/pyBusPirateLite/shtxx.py | bopopescu/Bus-Pirate-1 | 62a449f4aa6edb2160e00537f06024b2e1ce6c48 | [
"CC0-1.0"
] | null | null | null | scripts/pyBusPirateLite/shtxx.py | bopopescu/Bus-Pirate-1 | 62a449f4aa6edb2160e00537f06024b2e1ce6c48 | [
"CC0-1.0"
] | null | null | null | scripts/pyBusPirateLite/shtxx.py | bopopescu/Bus-Pirate-1 | 62a449f4aa6edb2160e00537f06024b2e1ce6c48 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
#based on Microwire.py and hackaday buspirate/sht tutorial
import sys,time
from optparse import OptionParser
from pyBusPirateLite.RAW_WIRE import *
def sht_command(rw, data):
##clear shtxx interface
rw.data_high()
for i in range(9):
rw.clk_tick()
#start... | 30.445087 | 181 | 0.63034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,719 | 0.32631 |
5aa4c977dc126a0fbb76c33235561df665c5a977 | 10,248 | py | Python | pyalp/stimulus/film.py | BaptisteLefebvre/pyalp | 05cb8ff9e66f95ed9c70a8ab8a91c78794f7350a | [
"MIT"
] | 1 | 2020-11-09T09:23:11.000Z | 2020-11-09T09:23:11.000Z | pyalp/stimulus/film.py | BaptisteLefebvre/pyalp | 05cb8ff9e66f95ed9c70a8ab8a91c78794f7350a | [
"MIT"
] | null | null | null | pyalp/stimulus/film.py | BaptisteLefebvre/pyalp | 05cb8ff9e66f95ed9c70a8ab8a91c78794f7350a | [
"MIT"
] | 1 | 2020-11-09T09:23:19.000Z | 2020-11-09T09:23:19.000Z | import gc
import os
import pyalp.io
import pyalp.sequence
import pyalp.utils
from .base import Stimulus
class Film(Stimulus):
"""Film stimulus
Parameters
----------
bin_pathname: none | string, optional
Path name to the .bin file.
vec_pathname: none | string, optional
Path name ... | 37.265455 | 119 | 0.58509 | 10,139 | 0.989364 | 0 | 0 | 0 | 0 | 0 | 0 | 2,855 | 0.278591 |
5aa5b513bf2a9038fbb780c73e2c734ede5749d9 | 1,328 | py | Python | python/example_code/s3/s3-python-example-download-file.py | AkhmadRiswanda/aws-doc-sdk-examples | 46dbd6e1002f4d5c056df3eb478c318501782a17 | [
"Apache-2.0"
] | null | null | null | python/example_code/s3/s3-python-example-download-file.py | AkhmadRiswanda/aws-doc-sdk-examples | 46dbd6e1002f4d5c056df3eb478c318501782a17 | [
"Apache-2.0"
] | null | null | null | python/example_code/s3/s3-python-example-download-file.py | AkhmadRiswanda/aws-doc-sdk-examples | 46dbd6e1002f4d5c056df3eb478c318501782a17 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# This file is licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License. A copy of the
# License is located at
#
# http://aws.amazon.com/apache2.0/
#
# This f... | 32.390244 | 88 | 0.718373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,041 | 0.783886 |
5aa5bff8e0546b4cefb038da047c7522a33ff849 | 788 | py | Python | screenpy/questions/text_of_the_alert.py | perrygoy/screenpy | 862c0d7e5ff9f1265e520ab383c04ddbd4d060eb | [
"MIT"
] | 39 | 2019-03-22T15:18:23.000Z | 2022-02-23T17:32:03.000Z | screenpy/questions/text_of_the_alert.py | perrygoy/screenpy | 862c0d7e5ff9f1265e520ab383c04ddbd4d060eb | [
"MIT"
] | 63 | 2019-07-17T06:25:19.000Z | 2022-01-13T07:03:53.000Z | screenpy/questions/text_of_the_alert.py | bandophahita/screenpy | db0f3ef91a891b9d095016d83fa4b589620808ce | [
"MIT"
] | 15 | 2019-07-09T11:02:56.000Z | 2021-12-24T07:43:56.000Z | """
Investigate the text of an alert.
"""
from screenpy.abilities import BrowseTheWeb
from screenpy.actor import Actor
from screenpy.pacing import beat
class TextOfTheAlert:
"""Ask what text appears in the alert.
Abilities Required:
|BrowseTheWeb|
Examples::
the_actor.should(
... | 24.625 | 77 | 0.648477 | 632 | 0.80203 | 0 | 0 | 265 | 0.336294 | 0 | 0 | 406 | 0.515228 |
5aa673e34f00e357af0fafa959cade5423c31460 | 418 | py | Python | 4_parallel_execution/purethreads.py | TihonV/pygoexamples | ca9604862d08145057aefc60cd0f9b77c9f5346a | [
"MIT"
] | 18 | 2020-01-23T21:20:47.000Z | 2022-02-20T19:10:02.000Z | 4_parallel_execution/purethreads.py | TihonV/pygoexamples | ca9604862d08145057aefc60cd0f9b77c9f5346a | [
"MIT"
] | null | null | null | 4_parallel_execution/purethreads.py | TihonV/pygoexamples | ca9604862d08145057aefc60cd0f9b77c9f5346a | [
"MIT"
] | 4 | 2019-08-03T12:59:53.000Z | 2022-02-07T23:43:35.000Z | import time
from threading import Thread
COUNT = 50000000
def countdown(n):
while n > 0:
n -= 1
print ('Done! My final value is {0}'.format(n))
half_count = int(COUNT/2)
t1 = Thread(target=countdown, args=(half_count,))
t2 = Thread(target=countdown, args=(half_count,))
start = time.time()
t1.start()... | 17.416667 | 51 | 0.657895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.129187 |
5aab652c059c797506557e8a980477db680cb80f | 6,829 | py | Python | DPythonS89/test.py | Synchronicity89/Lean | 564af47ea980cf0524874643c7190da82236bcfb | [
"Apache-2.0"
] | null | null | null | DPythonS89/test.py | Synchronicity89/Lean | 564af47ea980cf0524874643c7190da82236bcfb | [
"Apache-2.0"
] | 1 | 2020-08-25T03:02:47.000Z | 2020-08-25T03:02:47.000Z | DPythonS89/test.py | Synchronicity89/Lean | 564af47ea980cf0524874643c7190da82236bcfb | [
"Apache-2.0"
] | null | null | null | from clr import AddReference
import pandas
AddReference("System")
AddReference("QuantConnect.Research")
AddReference("QuantConnect.Common")
AddReference("QuantConnect.Logging")
#AddReference("QuantConnect.Data")
from System import *
from QuantConnect import *
from QuantConnect.Logging import *
#from Data import *
#fro... | 36.518717 | 147 | 0.661737 | 4,810 | 0.704349 | 0 | 0 | 0 | 0 | 0 | 0 | 1,818 | 0.266218 |
5aad234b18b05002548a9589e1100a906a36ebac | 2,765 | py | Python | edm_web1/app/task/forms.py | zhouli121018/nodejsgm | 0ccbc8acf61badc812f684dd39253d55c99f08eb | [
"MIT"
] | null | null | null | edm_web1/app/task/forms.py | zhouli121018/nodejsgm | 0ccbc8acf61badc812f684dd39253d55c99f08eb | [
"MIT"
] | 18 | 2020-06-05T18:17:40.000Z | 2022-03-11T23:25:21.000Z | edm_web1/app/task/forms.py | zhouli121018/nodejsgm | 0ccbc8acf61badc812f684dd39253d55c99f08eb | [
"MIT"
] | null | null | null | # coding=utf-8
from django import forms
from app.task.models import SendTask
from app.template.models import SendTemplate
from app.address.models import MailList
from django.utils.translation import ugettext_lazy as _
from django.core.cache import cache
class SendTaskForm(forms.ModelForm):
user = forms.CharField(l... | 42.538462 | 131 | 0.644485 | 2,724 | 0.911952 | 0 | 0 | 0 | 0 | 0 | 0 | 1,310 | 0.438567 |
5aae6a12dc22ce122aa713fc2aeac3ad090fe5d0 | 2,827 | py | Python | map_swcf.py | torimcd/Goldblatt_etal_2020 | 0793b16ef2535db3482c31d84587d80b3578dd3b | [
"BSD-3-Clause"
] | 1 | 2021-12-03T15:11:31.000Z | 2021-12-03T15:11:31.000Z | map_swcf.py | torimcd/Goldblatt_etal_2021 | 0793b16ef2535db3482c31d84587d80b3578dd3b | [
"BSD-3-Clause"
] | null | null | null | map_swcf.py | torimcd/Goldblatt_etal_2021 | 0793b16ef2535db3482c31d84587d80b3578dd3b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
Author: Victoria McDonald
email: vmcd@atmos.washington.edu
website: http://torimcd.github.com
license: BSD
"""
import matplotlib as mpl
mpl.use("Agg")
import os
import sys
import numpy as np
import netCDF4
import operator
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Base... | 28.27 | 129 | 0.700389 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,144 | 0.404669 |
5ab017c82dd41b9fd3710bcfd371dbf19774599d | 6,706 | py | Python | src/mbic/mbic_full_model.py | davidanastasiu/antibiofilm | f50945d52bcfd97538a31d7627af6b3089fdd2cf | [
"MIT"
] | null | null | null | src/mbic/mbic_full_model.py | davidanastasiu/antibiofilm | f50945d52bcfd97538a31d7627af6b3089fdd2cf | [
"MIT"
] | null | null | null | src/mbic/mbic_full_model.py | davidanastasiu/antibiofilm | f50945d52bcfd97538a31d7627af6b3089fdd2cf | [
"MIT"
] | null | null | null | # AntiBiofilm Peptide Research
# Department of Computer Science and Engineering, Santa Clara University
# Author: Taylor Downey
# A python script that uses the optimized hyperparameters found for both
# the SVM and the SVR to create a prediction model
# Script prints the average RMSE of the full model when run with c... | 35.294737 | 81 | 0.596779 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,880 | 0.280346 |
5ab37c9f2cc9d5f92cea84f7411a66b98892ba55 | 334 | py | Python | pygoogletranslation/urls.py | sha-cmd/Translator | 8f01b04c90782feb474204c738cd1b9dbe8fe853 | [
"MIT",
"Unlicense"
] | null | null | null | pygoogletranslation/urls.py | sha-cmd/Translator | 8f01b04c90782feb474204c738cd1b9dbe8fe853 | [
"MIT",
"Unlicense"
] | null | null | null | pygoogletranslation/urls.py | sha-cmd/Translator | 8f01b04c90782feb474204c738cd1b9dbe8fe853 | [
"MIT",
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Predefined URLs used to make google translate requests.
"""
BASE = 'https://translate.google.com'
TOKEN = 'https://translate.google.com/translate_a/element.js'
TRANSLATE = 'https://translate.googleapis.com/translate_a/'
TRANSLATEURL = 'https://translate.google.com/_/TranslateWebserverUi/data... | 41.75 | 86 | 0.751497 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 287 | 0.859281 |
5ab39146e42528e662c0c49db178a51f75c5037e | 1,901 | py | Python | app/stac_api/migrations/0006_auto_20210419_1409.py | Niclnx/service-stac | ad9129a7130d09b2bed387d8e82575eb86fdfa7b | [
"BSD-3-Clause"
] | 9 | 2020-08-17T11:01:48.000Z | 2022-01-17T22:24:13.000Z | app/stac_api/migrations/0006_auto_20210419_1409.py | Niclnx/service-stac | ad9129a7130d09b2bed387d8e82575eb86fdfa7b | [
"BSD-3-Clause"
] | 100 | 2020-08-14T05:56:40.000Z | 2022-03-01T22:39:58.000Z | app/stac_api/migrations/0006_auto_20210419_1409.py | Niclnx/service-stac | ad9129a7130d09b2bed387d8e82575eb86fdfa7b | [
"BSD-3-Clause"
] | 3 | 2020-09-02T14:01:07.000Z | 2021-07-27T06:30:26.000Z | # Generated by Django 3.1.7 on 2021-04-19 14:09
import django.db.models.deletion
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
('stac_api', '0005_auto_20210408_0821'),
]
operations = [
migrations.AlterField(
... | 73.115385 | 1,327 | 0.538664 | 1,754 | 0.922672 | 0 | 0 | 0 | 0 | 0 | 0 | 1,431 | 0.752762 |
5ab4e1cb0b8290fb37e3f50f7412275885208296 | 4,463 | py | Python | geocoder/opencage.py | guess3233qa/geocoder1 | 31de0344e698fb209b709c5bb11181e845279a59 | [
"MIT"
] | 1 | 2021-02-08T13:30:00.000Z | 2021-02-08T13:30:00.000Z | geocoder/opencage.py | star-is-here/geocoder | 31b5ccdf54f199d7640995a787c84909687ee03c | [
"MIT"
] | null | null | null | geocoder/opencage.py | star-is-here/geocoder | 31b5ccdf54f199d7640995a787c84909687ee03c | [
"MIT"
] | null | null | null | #!/usr/bin/python
# coding: utf8
from __future__ import absolute_import
from geocoder.base import Base
from geocoder.keys import opencage_key
class OpenCage(Base):
"""
OpenCage Geocoding Services
===========================
OpenCage Geocoder simple, easy, and open geocoding for the entire world
O... | 26.724551 | 93 | 0.60363 | 4,218 | 0.945104 | 0 | 0 | 2,567 | 0.575174 | 0 | 0 | 1,287 | 0.288371 |
5ab5bd66bce6d4c9eceac8e62755a4fcbe075a48 | 108 | py | Python | Python/type_casting.py | thebiebs/python-practise-exercises | 28db498f35ec6f9bdd437f54c91990027f4b9436 | [
"MIT"
] | null | null | null | Python/type_casting.py | thebiebs/python-practise-exercises | 28db498f35ec6f9bdd437f54c91990027f4b9436 | [
"MIT"
] | null | null | null | Python/type_casting.py | thebiebs/python-practise-exercises | 28db498f35ec6f9bdd437f54c91990027f4b9436 | [
"MIT"
] | null | null | null | a = "3434"
a = int(a)
print(type(a))
b = 32
b = str(b)
print(type(b))
| 4.695652 | 15 | 0.351852 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.055556 |
5ab8816bb76e60e81fc3c314b0b1f78ca16670ca | 64 | py | Python | models/__init__.py | vrdelc/deepmask-pytorch | 4432aa06ef43fe845230fd539dcbad27177c37d4 | [
"MIT"
] | 233 | 2019-02-20T16:40:02.000Z | 2022-01-24T07:08:28.000Z | models/__init__.py | vrdelc/deepmask-pytorch | 4432aa06ef43fe845230fd539dcbad27177c37d4 | [
"MIT"
] | 10 | 2019-03-19T06:33:00.000Z | 2021-02-11T02:49:07.000Z | models/__init__.py | vrdelc/deepmask-pytorch | 4432aa06ef43fe845230fd539dcbad27177c37d4 | [
"MIT"
] | 62 | 2019-02-21T02:27:56.000Z | 2021-11-16T02:37:41.000Z | from .DeepMask import DeepMask
from .SharpMask import SharpMask
| 21.333333 | 32 | 0.84375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5ab8ac9f9305d1dcc1a98fb23d25074ad1e3b140 | 37 | py | Python | homeassistant/components/systemmonitor/__init__.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/systemmonitor/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | homeassistant/components/systemmonitor/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """The systemmonitor integration."""
| 18.5 | 36 | 0.72973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.972973 |
5abb45490eb0d080f875383d0f61e11894705270 | 396 | py | Python | setup.py | ajagnic/stromCLI | f36b3a97a28cb4f6bf644fdfd6660307b19a6fab | [
"MIT"
] | null | null | null | setup.py | ajagnic/stromCLI | f36b3a97a28cb4f6bf644fdfd6660307b19a6fab | [
"MIT"
] | null | null | null | setup.py | ajagnic/stromCLI | f36b3a97a28cb4f6bf644fdfd6660307b19a6fab | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='strom-cli',
author='Adrian Agnic',
author_email='adrian@tura.io',
version='0.0.1',
description='CLI tool for use with Strom',
packages=find_packages(),
include_package_data=True,
install_requires=['click', 'requests'],
entry_p... | 23.294118 | 46 | 0.669192 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.40404 |
5abba2ed2df006c8126b41c355cba49e34d89853 | 776 | py | Python | backend/post/migrations/0005_auto_20190424_1912.py | aurma97/to52_ok | c5f940416938e1bb0d3110dfafa43cb7197df984 | [
"MIT"
] | null | null | null | backend/post/migrations/0005_auto_20190424_1912.py | aurma97/to52_ok | c5f940416938e1bb0d3110dfafa43cb7197df984 | [
"MIT"
] | 4 | 2021-04-08T22:09:42.000Z | 2021-06-10T20:38:06.000Z | backend/post/migrations/0005_auto_20190424_1912.py | aurma97/to52_ok | c5f940416938e1bb0d3110dfafa43cb7197df984 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.3 on 2019-04-24 19:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('post', '0004_post_an_type'),
]
operations = [
migrations.CreateModel(
name='PostType',
... | 28.740741 | 115 | 0.595361 | 650 | 0.837629 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.173969 |
5abbfe4f3603e53b2ca44eaf8727990f742d0172 | 1,006 | py | Python | aspen/__main__.py | Acidburn0zzz/aspen-python | 3b25a3ca041bd0bf4d313f7fc3a15cf092903de7 | [
"MIT"
] | null | null | null | aspen/__main__.py | Acidburn0zzz/aspen-python | 3b25a3ca041bd0bf4d313f7fc3a15cf092903de7 | [
"MIT"
] | null | null | null | aspen/__main__.py | Acidburn0zzz/aspen-python | 3b25a3ca041bd0bf4d313f7fc3a15cf092903de7 | [
"MIT"
] | null | null | null | """
python -m aspen
===============
Aspen ships with a server (wsgiref.simple_server) that is
suitable for development and testing. It can be invoked via:
python -m aspen
though even for development you'll likely want to specify a
project root, so a more likely incantation is:
ASPEN_PROJECT_ROOT=/path/to/w... | 27.944444 | 71 | 0.754473 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 559 | 0.555666 |
5abddcac686664ae3a44fc39af000fbbf1daafbd | 874 | py | Python | ax/benchmark2/__init__.py | lyhyl/Ax | 44384a0cb1a622c9e395c95f683cfee25c7b61f6 | [
"MIT"
] | null | null | null | ax/benchmark2/__init__.py | lyhyl/Ax | 44384a0cb1a622c9e395c95f683cfee25c7b61f6 | [
"MIT"
] | null | null | null | ax/benchmark2/__init__.py | lyhyl/Ax | 44384a0cb1a622c9e395c95f683cfee25c7b61f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from ax.benchmark2.benchmark import (
benchmark_full_run,
benchmark_replication,
benchmark_test,
)
from a... | 28.193548 | 85 | 0.772311 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 400 | 0.457666 |
5abe5b6784894f2e606b06d1d7978dc1a255825c | 724 | py | Python | setup.py | nvaytet/metatoenv | 6d0b5f1093f4042d63f8acad435f0953633f6821 | [
"BSD-3-Clause"
] | null | null | null | setup.py | nvaytet/metatoenv | 6d0b5f1093f4042d63f8acad435f0953633f6821 | [
"BSD-3-Clause"
] | null | null | null | setup.py | nvaytet/metatoenv | 6d0b5f1093f4042d63f8acad435f0953633f6821 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, Command
from distutils.command.build_py import build_py
with open('README.md') as infile:
long_description = infile.read()
from psrecord import __version__
setup(
name='metatoenv',
version=__version__,
description=
'Generate a conda environment file from a conda met... | 25.857143 | 70 | 0.685083 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.379834 |
5abf1554e4e83fbb167495e7bf4f154fc338e021 | 28,931 | py | Python | git_timestamp/timestamp.py | zeitgitter/git-timestamp | 44d68c13036ba706d1b2d1d25773427b474fa39e | [
"MIT"
] | 16 | 2020-02-16T03:21:22.000Z | 2021-12-17T19:22:56.000Z | git_timestamp/timestamp.py | zeitgitter/git-timestamp | 44d68c13036ba706d1b2d1d25773427b474fa39e | [
"MIT"
] | 1 | 2021-11-02T10:07:18.000Z | 2021-11-02T10:07:18.000Z | git_timestamp/timestamp.py | zeitgitter/git-timestamp | 44d68c13036ba706d1b2d1d25773427b474fa39e | [
"MIT"
] | 2 | 2020-02-16T03:21:26.000Z | 2021-04-05T17:19:05.000Z | #!/usr/bin/python3 -tt
# -*- coding: utf-8 -*-
# (keep hashbang line for `make install`)
#
# git timestamp — Zeitgitter GIT Timestamping client
#
# Copyright (C) 2019-2021 Marcel Waldvogel
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Lic... | 41.868307 | 103 | 0.587432 | 3,271 | 0.113039 | 0 | 0 | 102 | 0.003525 | 0 | 0 | 12,879 | 0.44507 |
5ac1bdcd4d5d7d445d4e50d14f8bb0137e1a3a22 | 7,335 | py | Python | src/environments/finite_diff_wave.py | jaberkow/Insight_Project | 5c24e39fa5ab949e5a99231758ac77d21f566905 | [
"MIT"
] | 6 | 2019-07-10T09:33:44.000Z | 2019-08-28T11:28:15.000Z | src/environments/finite_diff_wave.py | jaberkow/WaveRL | 5c24e39fa5ab949e5a99231758ac77d21f566905 | [
"MIT"
] | 4 | 2019-06-18T00:13:25.000Z | 2019-08-05T11:48:03.000Z | src/environments/finite_diff_wave.py | jaberkow/Insight_Project | 5c24e39fa5ab949e5a99231758ac77d21f566905 | [
"MIT"
] | 3 | 2019-08-15T06:43:31.000Z | 2020-09-03T05:05:17.000Z | """
Some elements of the finite difference routines were adapted from HP Langtangen's wonderful book on the FD method for python:
https://hplgit.github.io/fdm-book/doc/pub/book/html/._fdm-book-solarized001.html
"""
import numpy as np
from scipy.integrate import simps
class Wave1D:
"""
A utility class for sim... | 38.809524 | 125 | 0.625767 | 7,063 | 0.962918 | 0 | 0 | 0 | 0 | 0 | 0 | 3,940 | 0.537151 |
5ac23e6adffbb28a348a5b76f4d9393d8fb8087e | 1,977 | py | Python | ejercicios/ahorcado/ahorcado_01.py | carlosviveros/Soluciones | 115f4fa929c7854ca497e4c994352adc64565456 | [
"MIT"
] | 1 | 2022-02-02T04:44:56.000Z | 2022-02-02T04:44:56.000Z | ejercicios/ahorcado/ahorcado_01.py | leugimkm/Soluciones | d71601c8d9b5e86e926f48d9e49462af8a956b6d | [
"MIT"
] | null | null | null | ejercicios/ahorcado/ahorcado_01.py | leugimkm/Soluciones | d71601c8d9b5e86e926f48d9e49462af8a956b6d | [
"MIT"
] | null | null | null | """AyudaEnPython: https://www.facebook.com/groups/ayudapython
Contributor: Carolina Morán
Source:
https://github.com/CarolinaMoran03/Juego-de-ahorcado-con-frase/blob/main/Juego%20de%20ahorcado%20con%20frase
"""
participante=input("Ingrese nombre del participante: ")
print(participante.upper())
def run():
frases =... | 29.507463 | 175 | 0.571067 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 791 | 0.399899 |
5ac34357cfbf72b629548e23a5587b2da7dd9eb3 | 946 | py | Python | core/model/encoder/encoder_base.py | baophuc27/answer-generation | 36ab9f84f8d4df90abd2bd0255a5229afbd65892 | [
"MIT"
] | 3 | 2021-03-25T12:29:49.000Z | 2021-06-14T13:15:49.000Z | core/model/encoder/encoder_base.py | baophuc27/answer-generation | 36ab9f84f8d4df90abd2bd0255a5229afbd65892 | [
"MIT"
] | null | null | null | core/model/encoder/encoder_base.py | baophuc27/answer-generation | 36ab9f84f8d4df90abd2bd0255a5229afbd65892 | [
"MIT"
] | null | null | null | import torch.nn as nn
from abc import ABC,abstractmethod
class EncoderBase(nn.Module):
@abstractmethod
def __init__(self,pretrained_emb,__C):
"""Constructor of encoder module should take pretrained embedding as
an argument because of later comparison of different types of embeddings.
... | 30.516129 | 81 | 0.650106 | 887 | 0.937632 | 0 | 0 | 842 | 0.890063 | 0 | 0 | 567 | 0.599366 |
5ac3496c6293aef55801f31bfe043059c6610afa | 467 | py | Python | pmaf/biome/survey/_metakit.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | 1 | 2021-07-02T06:24:17.000Z | 2021-07-02T06:24:17.000Z | pmaf/biome/survey/_metakit.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T12:02:46.000Z | 2021-06-28T12:02:46.000Z | pmaf/biome/survey/_metakit.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | null | null | null | from abc import abstractmethod
from pmaf.biome._metakit import BiomeFeatureMetabase, BiomeSampleMetabase
class BiomeSurveyBackboneMetabase(BiomeFeatureMetabase, BiomeSampleMetabase):
@abstractmethod
def to_assembly(self):
pass
@property
@abstractmethod
def essentials(self):
pass
... | 19.458333 | 77 | 0.704497 | 359 | 0.768737 | 0 | 0 | 259 | 0.554604 | 0 | 0 | 0 | 0 |
5ac34cb506d949289482e24d712032fea0a5bf81 | 5,912 | py | Python | python/pynamics/frame.py | zmpatel19/Foldable-Robotics | 97590ec7d173cc1936cc8ff0379b16ad63bcda23 | [
"MIT"
] | 2 | 2018-08-20T22:01:18.000Z | 2021-04-19T00:50:56.000Z | python/pynamics/frame.py | zmpatel19/Foldable-Robotics | 97590ec7d173cc1936cc8ff0379b16ad63bcda23 | [
"MIT"
] | 3 | 2017-10-24T03:10:17.000Z | 2017-10-24T03:15:27.000Z | python/pynamics/frame.py | zmpatel19/Foldable-Robotics | 97590ec7d173cc1936cc8ff0379b16ad63bcda23 | [
"MIT"
] | 2 | 2017-03-03T23:04:17.000Z | 2021-03-20T20:33:53.000Z | # -*- coding: utf-8 -*-
"""
Written by Daniel M. Aukes
Email: danaukes<at>gmail.com
Please see LICENSE for full license.
"""
import pynamics
from pynamics.tree_node import TreeNode
from pynamics.vector import Vector
from pynamics.rotation import Rotation, RotationalVelocity
from pynamics.name_generator import NameGen... | 36.493827 | 156 | 0.625169 | 5,516 | 0.933018 | 0 | 0 | 77 | 0.013024 | 0 | 0 | 271 | 0.045839 |
5ac3d5779a8d78c93d249f8739858eed7b56674a | 6,828 | py | Python | couchbase_core/mapper.py | couchbase/couchbase-python-client | 99ec055835f5aef0cd07905497b3ab4bb3cbbc32 | [
"Apache-2.0"
] | 189 | 2015-01-07T18:34:31.000Z | 2022-03-21T17:41:56.000Z | couchbase_core/mapper.py | couchbase/couchbase-python-client | 99ec055835f5aef0cd07905497b3ab4bb3cbbc32 | [
"Apache-2.0"
] | 24 | 2015-05-19T14:00:16.000Z | 2022-03-16T22:01:30.000Z | couchbase_core/mapper.py | couchbase/couchbase-python-client | 99ec055835f5aef0cd07905497b3ab4bb3cbbc32 | [
"Apache-2.0"
] | 60 | 2015-03-10T22:12:50.000Z | 2022-03-07T21:57:40.000Z | from typing import *
import enum
import datetime
import warnings
from couchbase.exceptions import InvalidArgumentException
Src = TypeVar('Src')
Dest = TypeVar('Dest')
Functor = TypeVar('Functor', bound=Callable[[Src], Dest])
SrcToDest = TypeVar('SrcToDest', bound=Callable[[Src], Dest])
DestToSrc = TypeVar('DestToSr... | 30.756757 | 113 | 0.605448 | 5,908 | 0.865261 | 0 | 0 | 603 | 0.088313 | 0 | 0 | 1,632 | 0.239016 |
5ac41b3cce04df264e1419de46ced2afc4ce1d2c | 2,836 | py | Python | thedoorman/run.py | FocusedSupport/thedoorman | 4f53a921e1bd97d9ff193482e790fa5757f54e7d | [
"MIT"
] | null | null | null | thedoorman/run.py | FocusedSupport/thedoorman | 4f53a921e1bd97d9ff193482e790fa5757f54e7d | [
"MIT"
] | 29 | 2017-03-03T16:21:59.000Z | 2019-03-11T19:20:24.000Z | thedoorman/run.py | FocusedSupport/thedoorman | 4f53a921e1bd97d9ff193482e790fa5757f54e7d | [
"MIT"
] | null | null | null | import threading
import sys
import os
import signal
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "components/slack")))
from slackbot.bot import Bot
from pydispatch import dispatcher
from components.dispatcher.signals import Signals, Senders
import components.devices.doorbell_monitor as dm
... | 28.646465 | 93 | 0.744358 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 581 | 0.204866 |
5ac4b51a79d3af0cebbea2eb96498b7f916e244a | 605 | py | Python | python/utils/random-sample-with-probabilities.py | leakycup/misc | 5cce8cbd7057bf2598c8076ffc257606edb7141e | [
"Apache-2.0"
] | null | null | null | python/utils/random-sample-with-probabilities.py | leakycup/misc | 5cce8cbd7057bf2598c8076ffc257606edb7141e | [
"Apache-2.0"
] | null | null | null | python/utils/random-sample-with-probabilities.py | leakycup/misc | 5cce8cbd7057bf2598c8076ffc257606edb7141e | [
"Apache-2.0"
] | null | null | null | import sys
import codecs
import numpy as np
#UTF8Writer = codecs.getwriter('utf8')
#sys.stdout = UTF8Writer(sys.stdout)
input_file = sys.argv[1]
probabilities_file = sys.argv[2]
sample_size = int(sys.argv[3])
input_list = []
probabilities_list = []
with codecs.open(input_file, 'r', 'utf-8') as f:
for line in f... | 24.2 | 96 | 0.710744 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.155372 |
5ac695ccecbc9a0acac17b74afec8f55e9ba28d1 | 1,286 | py | Python | ivy/functional/backends/mxnet/old/linear_algebra.py | Neel-Renavikar/ivy | 644ab189a3a3fc52b1f3f86563226106e549eea3 | [
"Apache-2.0"
] | null | null | null | ivy/functional/backends/mxnet/old/linear_algebra.py | Neel-Renavikar/ivy | 644ab189a3a3fc52b1f3f86563226106e549eea3 | [
"Apache-2.0"
] | null | null | null | ivy/functional/backends/mxnet/old/linear_algebra.py | Neel-Renavikar/ivy | 644ab189a3a3fc52b1f3f86563226106e549eea3 | [
"Apache-2.0"
] | null | null | null | """
Collection of MXNet linear algebra functions, wrapped to fit Ivy syntax and signature.
"""
# global
import mxnet as _mx
import numpy as _np
# local
import ivy as _ivy
from typing import Union, Tuple
def matrix_norm(x, p=2, axes=None, keepdims=False):
axes = (-2, -1) if axes is None else axes
if isinst... | 27.361702 | 86 | 0.620529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 251 | 0.195179 |
5ac936989b55dd5518ef35edf3a26894eace0277 | 157 | py | Python | NRPG-DataManager.py | oliverfaustino/NRPG-DataManager | 71064cb79be304f712aabcceebd6647121d2cb6c | [
"MIT"
] | null | null | null | NRPG-DataManager.py | oliverfaustino/NRPG-DataManager | 71064cb79be304f712aabcceebd6647121d2cb6c | [
"MIT"
] | null | null | null | NRPG-DataManager.py | oliverfaustino/NRPG-DataManager | 71064cb79be304f712aabcceebd6647121d2cb6c | [
"MIT"
] | null | null | null | from modulos.query import *
from modulos.splash_screen import *
if __name__ == '__main__':
splash_screen(segundos = 2)
while True:
query()
| 17.444444 | 35 | 0.675159 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.063694 |
5ac93a900f8dd76c156f7ea7f46e47f6ba5ffc11 | 759 | py | Python | 01-introduction to python for data science/04-numpy/baseball-players-bmi.py | thelc127/Data-Scientist-Career-Track-Datacamp | 56d0ec0ece7fa9127e72b0da598c89f15f31b6b3 | [
"MIT"
] | 2 | 2021-05-21T04:59:19.000Z | 2021-05-21T08:32:41.000Z | 01-introduction to python for data science/04-numpy/baseball-players-bmi.py | thelc127/Data-Scientist-Career-Track-Datacamp | 56d0ec0ece7fa9127e72b0da598c89f15f31b6b3 | [
"MIT"
] | null | null | null | 01-introduction to python for data science/04-numpy/baseball-players-bmi.py | thelc127/Data-Scientist-Career-Track-Datacamp | 56d0ec0ece7fa9127e72b0da598c89f15f31b6b3 | [
"MIT"
] | null | null | null | # Create a numpy array from the weight_lb list with the correct units. Multiply by 0.453592 to go from pounds to kilograms.
# Store the resulting numpy array as np_weight_kg.
# Use np_height_m and np_weight_kg to calculate the BMI of each player.
# Use the following equation:
# BMI = weight(kg) / height (m3)
# save the... | 31.625 | 123 | 0.764163 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 584 | 0.769433 |
5acaacc2a5d0c1b378c239243152d8b863342a4f | 2,072 | py | Python | python/waf-alb-ec2-glue-athena-s3/app.py | gsy0911/aws-cdk-small-examples | e4b4be076d22f5d35f640e59a6ca346988baa1af | [
"Apache-2.0"
] | 2 | 2021-01-19T18:15:22.000Z | 2021-02-09T22:18:09.000Z | python/waf-alb-ec2-glue-athena-s3/app.py | gsy0911/aws-cdk-small-examples | e4b4be076d22f5d35f640e59a6ca346988baa1af | [
"Apache-2.0"
] | 14 | 2020-11-20T01:54:27.000Z | 2021-01-12T08:15:39.000Z | python/waf-alb-ec2-glue-athena-s3/app.py | gsy0911/aws-cdk-small-examples | e4b4be076d22f5d35f640e59a6ca346988baa1af | [
"Apache-2.0"
] | null | null | null | from aws_cdk import (
aws_autoscaling as autoscaling,
aws_ec2 as ec2,
aws_elasticloadbalancingv2 as elbv2,
aws_wafv2 as wafv2,
core,
)
class LoadBalancerStack(core.Stack):
def __init__(self, app: core.App, id: str) -> None:
super().__init__(app, id)
vpc = ec2.Vpc(self, "VPC")
... | 29.6 | 105 | 0.599903 | 1,775 | 0.85666 | 0 | 0 | 0 | 0 | 0 | 0 | 299 | 0.144305 |
5acb201e61977d9de73500bb4e5a0c3ac26a488a | 575 | py | Python | src/twitter_utils/browser_session.py | namuan/twitter-tools | b8fad3c668f7bd65c74a0449b450bde957326ce4 | [
"MIT"
] | 1 | 2020-07-10T23:35:23.000Z | 2020-07-10T23:35:23.000Z | src/twitter_utils/browser_session.py | namuan/twitter-tools | b8fad3c668f7bd65c74a0449b450bde957326ce4 | [
"MIT"
] | 1 | 2020-10-02T01:51:51.000Z | 2020-10-02T01:51:51.000Z | src/twitter_utils/browser_session.py | namuan/twitter-tools | b8fad3c668f7bd65c74a0449b450bde957326ce4 | [
"MIT"
] | 2 | 2020-05-24T07:03:43.000Z | 2020-06-24T01:36:43.000Z | from typing import Any
from selenium import webdriver # type: ignore
class BrowserSession: # pragma: no cover
def __init__(self, given_browser: Any) -> None:
self.browser = given_browser
self.session = webdriver.Firefox("fireprofile")
def start(self) -> None:
if self.browser == "sa... | 26.136364 | 55 | 0.622609 | 501 | 0.871304 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.106087 |
5acb9e1e62ddcd1f2667eff52694832dd21f1914 | 411 | py | Python | editor/templatetags/stamp.py | andersshenholm/editor | 052844de68101c5cdc6d9343e3e095ba816cd34c | [
"Apache-2.0"
] | 51 | 2015-04-19T23:27:04.000Z | 2022-03-25T01:43:43.000Z | editor/templatetags/stamp.py | andersshenholm/editor | 052844de68101c5cdc6d9343e3e095ba816cd34c | [
"Apache-2.0"
] | 428 | 2015-01-05T10:56:32.000Z | 2022-03-29T14:33:23.000Z | editor/templatetags/stamp.py | andersshenholm/editor | 052844de68101c5cdc6d9343e3e095ba816cd34c | [
"Apache-2.0"
] | 71 | 2015-01-28T20:06:15.000Z | 2022-03-25T02:35:40.000Z | from django.template import Library
from editor.models import STAMP_STATUS_CHOICES
register = Library()
@register.inclusion_tag('stamp.html')
def stamp(status):
label = ''
if status=='draft':
return {'status': 'draft', 'label': 'Draft'}
for s_status, s_label in STAMP_STATUS_CHOICES:
if sta... | 27.4 | 52 | 0.664234 | 0 | 0 | 0 | 0 | 304 | 0.739659 | 0 | 0 | 65 | 0.158151 |
5acc8629a6ec5a5ef8fb0a2628a406996eb759d6 | 864 | py | Python | ubxlib/ubx_cfg_nmea.py | monocilindro/ubxlib | 378e86b7766f670b9a8966ee038275a2155bac54 | [
"MIT"
] | 3 | 2020-05-03T17:12:21.000Z | 2021-01-16T13:45:07.000Z | ubxlib/ubx_cfg_nmea.py | monocilindro/ubxlib | 378e86b7766f670b9a8966ee038275a2155bac54 | [
"MIT"
] | 35 | 2020-08-29T09:35:15.000Z | 2022-03-18T19:42:34.000Z | ubxlib/ubx_cfg_nmea.py | monocilindro/ubxlib | 378e86b7766f670b9a8966ee038275a2155bac54 | [
"MIT"
] | 4 | 2020-04-24T03:29:07.000Z | 2021-01-13T15:52:53.000Z | from .cid import UbxCID
from .frame import UbxFrame
from .types import CH, U1, X1, X4, Padding
class UbxCfgNmea_(UbxFrame):
CID = UbxCID(UbxCID.CLASS_CFG, 0x17)
NAME = 'UBX-CFG-NMEA'
class UbxCfgNmeaPoll(UbxCfgNmea_):
NAME = UbxCfgNmea_.NAME + '-POLL'
def __init__(self):
super().__init__()
... | 24 | 42 | 0.603009 | 760 | 0.87963 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.159722 |
5ace70d75fc497eeb5ae372bf715cbea09eaaf13 | 390 | py | Python | Lesson_2/up.py | idel28102001/lessons | f88f5034d8c275175dacf66ba5d0342622c1aa50 | [
"Apache-2.0"
] | null | null | null | Lesson_2/up.py | idel28102001/lessons | f88f5034d8c275175dacf66ba5d0342622c1aa50 | [
"Apache-2.0"
] | null | null | null | Lesson_2/up.py | idel28102001/lessons | f88f5034d8c275175dacf66ba5d0342622c1aa50 | [
"Apache-2.0"
] | null | null | null | print('Загадайте число')
num = 'да'
l = 4
while num == 'да':
l -= 1
num = input(f'Количество цифр вашего числа меньше {l}? : ') ## да или нет
num_2 = 'да'
dig = ''
while l > 0:
number = 10
while num_2 == 'да':
number -= 1
num_2 = input(f'Ваша {l}-e цифра меньше {number}? :') # да или н... | 21.666667 | 78 | 0.525641 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.491597 |
5acf6a6ed2a18dd015b90e514e7a54da35d4ea24 | 34,367 | py | Python | agoora-profiler-service/quality_inspection/tests/quality_inspector_test.py | spoud/agoora-agents | 918602d428b6cd9918d1ade682fa54e85a9a2df3 | [
"MIT"
] | 8 | 2021-03-25T13:49:31.000Z | 2021-08-19T04:09:14.000Z | agoora-profiler-service/quality_inspection/tests/quality_inspector_test.py | spoud/agoora-agents | 918602d428b6cd9918d1ade682fa54e85a9a2df3 | [
"MIT"
] | 18 | 2021-03-31T11:38:45.000Z | 2022-02-16T05:00:09.000Z | agoora-profiler-service/quality_inspection/tests/quality_inspector_test.py | spoud/agoora-agents | 918602d428b6cd9918d1ade682fa54e85a9a2df3 | [
"MIT"
] | null | null | null | import unittest
from quality_inspection.quality_inspector import QualityInspector
from quality_inspection.schema_definition import SchemaDefinition
from quality_inspection.tests.data_loader import DataLoader
class QualityInspectorTest(unittest.TestCase):
def setUp(self) -> None:
self.inspector = QualityI... | 35.724532 | 118 | 0.575407 | 34,155 | 0.993831 | 0 | 0 | 0 | 0 | 0 | 0 | 10,397 | 0.302529 |
5acfa73951bf5dd915adc32a7981cab8b5aacd86 | 4,247 | py | Python | twrap/metrics.py | itsnarsi/twrap | cc3128428e37fe0a363e5b18fd7fa0039a963365 | [
"MIT"
] | null | null | null | twrap/metrics.py | itsnarsi/twrap | cc3128428e37fe0a363e5b18fd7fa0039a963365 | [
"MIT"
] | null | null | null | twrap/metrics.py | itsnarsi/twrap | cc3128428e37fe0a363e5b18fd7fa0039a963365 | [
"MIT"
] | null | null | null | # @Author: Narsi Reddy <cibitaw1>
# @Date: 2018-09-22T17:38:05-05:00
# @Email: sainarsireddy@outlook.com
# @Last modified by: narsi
# @Last modified time: 2019-02-13T22:46:56-06:00
import torch
torch.manual_seed(29)
from torch import nn
import numpy as np
np.random.seed(29)
import torch.nn.functional as F
from tor... | 31.932331 | 104 | 0.645632 | 1,167 | 0.274782 | 0 | 0 | 0 | 0 | 0 | 0 | 408 | 0.096068 |
5acfefc74de42e7336d5b91fd88fe5402716e7ad | 4,428 | py | Python | configs/resnet/contrast_r18_config.py | alecpeltekian/ImgClassification | cf4eca33027ca423623ff965fac354dcfce396d3 | [
"Apache-2.0"
] | null | null | null | configs/resnet/contrast_r18_config.py | alecpeltekian/ImgClassification | cf4eca33027ca423623ff965fac354dcfce396d3 | [
"Apache-2.0"
] | null | null | null | configs/resnet/contrast_r18_config.py | alecpeltekian/ImgClassification | cf4eca33027ca423623ff965fac354dcfce396d3 | [
"Apache-2.0"
] | null | null | null | # ### ===============================================================
# ### ===============================================================
# ### Modify the dataset loading settings
# dataset settings
dataset_type = 'ContrastDataset'
data_root = '/mnt/cadlabnas/datasets/'
img_norm_cfg = dict(
mean=[123.675, 116.28... | 30.965035 | 137 | 0.539747 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,379 | 0.537263 |
5ad437188ad82881b1a7663301a30cca6f73df88 | 2,745 | py | Python | modules/2.79/bpy/ops/uv.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | modules/2.79/bpy/ops/uv.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | modules/2.79/bpy/ops/uv.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | def align(axis='ALIGN_AUTO'):
pass
def average_islands_scale():
pass
def circle_select(x=0, y=0, radius=1, gesture_mode=0):
pass
def cube_project(cube_size=1.0, correct_aspect=True, clip_to_bounds=False, scale_to_bounds=False):
pass
def cursor_set(location=(0.0, 0.0)):
pass
def cylinder_pr... | 17.941176 | 175 | 0.726047 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.055738 |
5ad4e2861aebece133d34e92b30760d0b61fc3a9 | 662 | py | Python | roots/FinalModifiedBisection.py | Seek/LaTechNumeric | dabef2040e84bf25cabab07fe20a6434ce52197b | [
"MIT"
] | null | null | null | roots/FinalModifiedBisection.py | Seek/LaTechNumeric | dabef2040e84bf25cabab07fe20a6434ce52197b | [
"MIT"
] | null | null | null | roots/FinalModifiedBisection.py | Seek/LaTechNumeric | dabef2040e84bf25cabab07fe20a6434ce52197b | [
"MIT"
] | null | null | null | import sys
EPS = sys.float_info.epsilon
#Define the function
def f(x):
return (x+1)**2 - 1
def bisect(f, x1, x2, eps, maxn):
assert f(x1)*f(x2) < 0, \
"We cannot find a root if the function does not change signs"
xl = x1
xu = x2
xr = 0
fl = f(xl)
err = 1000
for i in range(maxn):
r = (xl + xu)/2
print(r... | 16.146341 | 62 | 0.539275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.199396 |
5ad51d488ab3d8dfcae8a309205c863eaacc63bd | 717 | py | Python | main.py | jostimian/Python-To-Facebook | b52f2fb4db01263dc279241c24ad6e9515ba5f45 | [
"MIT"
] | null | null | null | main.py | jostimian/Python-To-Facebook | b52f2fb4db01263dc279241c24ad6e9515ba5f45 | [
"MIT"
] | null | null | null | main.py | jostimian/Python-To-Facebook | b52f2fb4db01263dc279241c24ad6e9515ba5f45 | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
email = input("Enter Your Email: ")
password = input("Enter Your Password: ")
def login():
browser = webdriver.Chrome()
browser.get("https://www.facebook.com")
emailid = browser.find_element_by_id("email")
passid =... | 24.724138 | 55 | 0.677824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 146 | 0.203626 |
5ad61d1f671afea82e39013fc63a8845b6a3671b | 3,606 | py | Python | monique_worker_py/worker.py | biocad/monique-worker-py | 56b0ab2e218b80e3a83d7987cd8dd8993a3d66a7 | [
"BSD-3-Clause"
] | null | null | null | monique_worker_py/worker.py | biocad/monique-worker-py | 56b0ab2e218b80e3a83d7987cd8dd8993a3d66a7 | [
"BSD-3-Clause"
] | null | null | null | monique_worker_py/worker.py | biocad/monique-worker-py | 56b0ab2e218b80e3a83d7987cd8dd8993a3d66a7 | [
"BSD-3-Clause"
] | null | null | null | import zmq
import logging
import argparse
from monique_worker_py.config import read_worker_config
from monique_worker_py.qmessage import qmessage_from_json, create_qmessage
class Worker:
def __init__(self, worker_name, algo):
self.worker_name = worker_name
self.algo = algo
parser = argpar... | 37.5625 | 118 | 0.598724 | 3,427 | 0.950361 | 0 | 0 | 0 | 0 | 0 | 0 | 972 | 0.269551 |
5ad6cbcddff8d2b547541b05fb14cdfa5518b9b3 | 1,081 | py | Python | helpers/sendSMS.py | cheikhmbackeseck37/insuris | 3362ca445d489e23d57a76bbd6d263f3a5f0b519 | [
"MIT"
] | 12 | 2019-08-02T07:58:16.000Z | 2022-01-31T23:45:08.000Z | helpers/sendSMS.py | domambia/csdigital-gs1kenya-internal-erp | 6736d0e9a3a51653689f8ae921cf811f378d9d8e | [
"MIT"
] | 8 | 2019-08-02T08:06:18.000Z | 2022-03-11T23:45:17.000Z | helpers/sendSMS.py | cheikhmbackeseck37/insuris | 3362ca445d489e23d57a76bbd6d263f3a5f0b519 | [
"MIT"
] | 11 | 2019-07-31T16:23:36.000Z | 2022-01-29T08:30:07.000Z | # works with both python 2 and 3
from __future__ import print_function
from datetime import datetime
import africastalking
class SMS:
def __init__(self):
self.username = "gs1kenya"
self.api_key = "0902d36a02514da9fa33a11586683f8d76e5207ea544363e7d41149e6c9a6718"
africastalking.initialize(se... | 38.607143 | 89 | 0.518964 | 956 | 0.884366 | 0 | 0 | 0 | 0 | 0 | 0 | 578 | 0.53469 |
5ad80dcae0e4a2b3ab268f2939266c44cfa02c66 | 52 | py | Python | tests/test_placeholder.py | yhay81/socialname | 1907947014d3ba8e518be1374f24c44b89854e29 | [
"MIT"
] | null | null | null | tests/test_placeholder.py | yhay81/socialname | 1907947014d3ba8e518be1374f24c44b89854e29 | [
"MIT"
] | 7 | 2021-01-23T11:18:00.000Z | 2022-03-12T21:43:13.000Z | tests/test_placeholder.py | yhay81/socialname | 1907947014d3ba8e518be1374f24c44b89854e29 | [
"MIT"
] | null | null | null | def test_sample() -> None:
assert True # nosec
| 17.333333 | 26 | 0.634615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.134615 |
5ad86ff306f582b52295bb807123e900f16d76f5 | 818 | py | Python | rss_skill/models.py | frybin/Alexa-Python-Skill | b729d303524a7e7b72c9becb7b7044afea6597fc | [
"MIT"
] | null | null | null | rss_skill/models.py | frybin/Alexa-Python-Skill | b729d303524a7e7b72c9becb7b7044afea6597fc | [
"MIT"
] | null | null | null | rss_skill/models.py | frybin/Alexa-Python-Skill | b729d303524a7e7b72c9becb7b7044afea6597fc | [
"MIT"
] | null | null | null | ####################################
# File name: models.py #
# Author: Fred Rybin #
####################################
from rss_skill import db
class Feed(db.Model):
__tablename__ = 'feed'
rss_i = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.... | 31.461538 | 71 | 0.572127 | 643 | 0.786064 | 0 | 0 | 0 | 0 | 0 | 0 | 185 | 0.226161 |
5adaa94654c12d575666ad0a6b6cf47ac7a0cb0e | 1,120 | py | Python | examples/cartpole_example/test/cartpole_plot_model_NN_cloop.py | marcosfelt/sysid-neural-structures-fitting | 80eda427251e8cce1d2a565b5cbca533252315e4 | [
"MIT"
] | 17 | 2019-11-15T06:27:05.000Z | 2021-10-02T14:24:25.000Z | examples/cartpole_example/test/cartpole_plot_model_NN_cloop.py | marcosfelt/sysid-neural-structures-fitting | 80eda427251e8cce1d2a565b5cbca533252315e4 | [
"MIT"
] | null | null | null | examples/cartpole_example/test/cartpole_plot_model_NN_cloop.py | marcosfelt/sysid-neural-structures-fitting | 80eda427251e8cce1d2a565b5cbca533252315e4 | [
"MIT"
] | 4 | 2020-09-03T17:01:34.000Z | 2021-11-05T04:09:24.000Z | import os
import pandas as pd
import matplotlib.pyplot as plt
from examples.cartpole_example.cartpole_dynamics import RAD_TO_DEG, DEG_TO_RAD
if __name__ == '__main__':
#df_model = pd.read_csv(os.path.join("data", "pendulum_data_PID.csv"))
#df_nn = pd.read_csv(os.path.join("data", "pendulum_data_PID_NN_model.c... | 35 | 91 | 0.655357 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 373 | 0.333036 |
5ae07991afc23cb7d9a2fd6ee5c2c60cb7e50a1b | 2,560 | py | Python | unit_tests/test_extract_initial_rules.py | fensta/bracid2019 | ad9bf0b4e44c19f66c1597e857ef6cf70f56a646 | [
"MIT"
] | null | null | null | unit_tests/test_extract_initial_rules.py | fensta/bracid2019 | ad9bf0b4e44c19f66c1597e857ef6cf70f56a646 | [
"MIT"
] | null | null | null | unit_tests/test_extract_initial_rules.py | fensta/bracid2019 | ad9bf0b4e44c19f66c1597e857ef6cf70f56a646 | [
"MIT"
] | null | null | null | from unittest import TestCase
import pandas as pd
from scripts.utils import extract_initial_rules
class TestExtractInitialRules(TestCase):
"""Tests test_extract_initial_rules() from utils"""
def test_extract_initial_rules_numeric(self):
"""Test that rules are extracted correctly with a single numer... | 49.230769 | 115 | 0.551563 | 2,457 | 0.959766 | 0 | 0 | 0 | 0 | 0 | 0 | 691 | 0.269922 |
5ae084aea517a9f9539f0a2bcb3c98aac39ffea6 | 2,801 | py | Python | utils/ICMPMaker.py | lanfis/Spider | c66f1d134733318a8714c544050ca42e08b9fe0e | [
"MIT"
] | null | null | null | utils/ICMPMaker.py | lanfis/Spider | c66f1d134733318a8714c544050ca42e08b9fe0e | [
"MIT"
] | null | null | null | utils/ICMPMaker.py | lanfis/Spider | c66f1d134733318a8714c544050ca42e08b9fe0e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# license removed for brevity
from scapy.all import *
import sys
class ICMPMaker:
TYPE = 8
CODE = 0
CHKSUM = None
ID = 0
SEQ = 0
TIMESTAMP_ORI = 60025165
TIMESTAMP_RX = 60025165
TIMESTAMP_TX = 60025165
GATEWAY = '0.0.0.0'
PTR = 0
RESER... | 27.732673 | 43 | 0.49875 | 2,704 | 0.96537 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.031417 |
5ae239fa618e4a3a7c9f061bc545037094e16454 | 4,462 | py | Python | src/5 - rmn-master-original-adapt/viz.py | barbarasilveiraf/rmn-id-post | 894cd50a65902275bea3553cbe4f1acd8c2b709b | [
"MIT"
] | 99 | 2016-04-12T06:19:35.000Z | 2021-07-23T16:19:10.000Z | src/5 - rmn-master-original-adapt/viz.py | barbarasilveiraf/rmn-id-post | 894cd50a65902275bea3553cbe4f1acd8c2b709b | [
"MIT"
] | 3 | 2018-02-22T21:35:00.000Z | 2019-03-17T09:10:59.000Z | src/5 - rmn-master-original-adapt/viz.py | barbarasilveiraf/rmn-id-post | 894cd50a65902275bea3553cbe4f1acd8c2b709b | [
"MIT"
] | 20 | 2016-04-21T22:23:42.000Z | 2021-04-27T11:49:50.000Z | import csv, cPickle
from numpy import *
import matplotlib.pyplot as plt
import matplotlib
from cycler import cycler
# parse learned descriptors into a dict
def read_descriptors(desc_file):
desc_map = {}
f = open(desc_file, 'r')
for i, line in enumerate(f):
line = line.split()
desc_map[i] = ... | 33.298507 | 86 | 0.536755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 711 | 0.159346 |
5ae33aa8d62f63600348c0e8b3870cf2f541e67e | 224 | py | Python | translate.py | vipul-khatana/Hinglish-Sentiment-Analysis | 27b0d0aca736194b8f06b8cccb3e68537d91709f | [
"MIT"
] | 19 | 2017-12-03T14:17:13.000Z | 2022-02-23T19:06:07.000Z | translate.py | vipul-khatana/Hinglish-Sentiment-Analysis | 27b0d0aca736194b8f06b8cccb3e68537d91709f | [
"MIT"
] | 2 | 2018-12-14T12:43:47.000Z | 2020-03-31T15:27:31.000Z | translate.py | vipul-khatana/Hinglish-Sentiment-Analysis | 27b0d0aca736194b8f06b8cccb3e68537d91709f | [
"MIT"
] | 23 | 2018-12-14T04:37:47.000Z | 2022-03-25T09:58:26.000Z | # -*- coding: utf-8 -*-
import numpy as np
from googletrans import Translator
translator = Translator(service_urls=['translate.google.co.in'])
def translate(word):
return translator.translate(word,src='hi' , dest='en')
| 22.4 | 64 | 0.727679 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.245536 |
5ae33bc829b96d32b0f8a98265306f77e0baf4b1 | 3,327 | py | Python | tests/test_views.py | localmed/django-assetfiles | 34089780126989f49e6b890b85a90047704fde37 | [
"MIT"
] | null | null | null | tests/test_views.py | localmed/django-assetfiles | 34089780126989f49e6b890b85a90047704fde37 | [
"MIT"
] | 2 | 2017-02-11T20:10:46.000Z | 2017-02-11T20:10:56.000Z | tests/test_views.py | localmed/django-assetfiles | 34089780126989f49e6b890b85a90047704fde37 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django_nose.tools import *
from tests.base import AssetfilesTestCase
class TestServe(AssetfilesTestCase):
def test_returns_not_found_without_an_asset(self):
response = self.client.get('/static/non/existent/file.css')
assert_eq... | 44.36 | 79 | 0.643823 | 3,188 | 0.95707 | 0 | 0 | 0 | 0 | 0 | 0 | 1,289 | 0.386971 |
5ae4b5cc0aeea03900ca797b02f8cd9bb0c7e4f9 | 8,083 | py | Python | CHT/cht_data.py | aryam7/WASP | 39f3ac2e8ad3b97124b52cc17e97902e3ec1fbc9 | [
"Apache-2.0"
] | 72 | 2015-03-01T20:59:06.000Z | 2022-03-28T08:48:39.000Z | CHT/cht_data.py | bmvdgeijn/WASP | d3b8447fd7719fffa00b856fd1f27c845554693e | [
"Apache-2.0"
] | 93 | 2015-01-14T23:49:12.000Z | 2022-03-26T16:31:52.000Z | CHT/cht_data.py | aryam7/WASP | 39f3ac2e8ad3b97124b52cc17e97902e3ec1fbc9 | [
"Apache-2.0"
] | 51 | 2015-02-19T23:49:17.000Z | 2021-12-16T01:40:37.000Z | import sys
import gzip
import os
import numpy as np
import util
class TestSNP:
def __init__(self, name, geno_hap1, geno_hap2, AS_target_ref, AS_target_alt,
hetps, totals, counts):
self.name = name
self.geno_hap1 = geno_hap1
self.geno_hap2 = geno_hap2
self.AS_targe... | 35.143478 | 107 | 0.584189 | 859 | 0.106272 | 0 | 0 | 0 | 0 | 0 | 0 | 2,025 | 0.250526 |
5ae519116b2d3198ee0c6685afe6a91a67c62aa2 | 1,023 | py | Python | restaurant/admin.backup.py | syahnur197/restaurant-backend | a0f320b69f3fed293555634f6ac094eaa0574c45 | [
"MIT"
] | null | null | null | restaurant/admin.backup.py | syahnur197/restaurant-backend | a0f320b69f3fed293555634f6ac094eaa0574c45 | [
"MIT"
] | null | null | null | restaurant/admin.backup.py | syahnur197/restaurant-backend | a0f320b69f3fed293555634f6ac094eaa0574c45 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.contenttypes.admin import GenericStackedInline
from .models import Image, Product
"""
To register generics
"""
class ImageInline(GenericStackedInline):
model = Image
@admin.register(Image)
class ImageAdmin(admin.ModelAdmin):
list_display = (
'id... | 19.673077 | 66 | 0.57087 | 801 | 0.782991 | 0 | 0 | 791 | 0.773216 | 0 | 0 | 307 | 0.300098 |
5ae5219951f2f425f340756b442acd6b639dbefb | 1,025 | py | Python | test/twistedutils/test_deferred_deque.py | Wizmann/STUP-Protocol | e06a3442082e5061d2be32be3ffd681675e7ffb5 | [
"MIT"
] | 14 | 2017-05-06T10:14:32.000Z | 2018-07-17T02:58:00.000Z | test/twistedutils/test_deferred_deque.py | Wizmann/STUP-Protocol | e06a3442082e5061d2be32be3ffd681675e7ffb5 | [
"MIT"
] | 2 | 2017-06-13T05:40:18.000Z | 2017-06-13T16:23:01.000Z | test/twistedutils/test_deferred_deque.py | Wizmann/STUP-Protocol | e06a3442082e5061d2be32be3ffd681675e7ffb5 | [
"MIT"
] | 4 | 2017-06-09T20:20:54.000Z | 2018-07-17T02:58:10.000Z | #coding=utf-8
from __future__ import absolute_import
import pytest
import twisted
from twisted.trial import unittest
from twisted.internet.defer import Deferred
from twisted.python import log
from stup.twistedutils.deferred_deque import *
class DeferredDequeueTest(unittest.TestCase):
def __init__(self, *args, **... | 27.702703 | 67 | 0.656585 | 780 | 0.760976 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.050732 |
5ae7e92c23080d64d3b2328bffafe05bd7e29760 | 1,845 | py | Python | quickspy/net/netengine.py | kirte2849/Quickspy | 767d0fb8ded283aa0d8122d77e15dc411f553994 | [
"MIT"
] | 1 | 2020-07-11T13:41:40.000Z | 2020-07-11T13:41:40.000Z | quickspy/net/netengine.py | kirte2849/Quickspy | 767d0fb8ded283aa0d8122d77e15dc411f553994 | [
"MIT"
] | null | null | null | quickspy/net/netengine.py | kirte2849/Quickspy | 767d0fb8ded283aa0d8122d77e15dc411f553994 | [
"MIT"
] | null | null | null | from lxml import etree
import socket
import re
import aiohttp
from quickspy.color import *
class Response:
def __init__(self, byte, encoding='utf-8'):
global ENCODING
ENCODING = encoding
self.url = None
self.html = None
self.byte = byte
self.HTML = None
s... | 24.932432 | 77 | 0.58374 | 1,757 | 0.94717 | 0 | 0 | 0 | 0 | 523 | 0.281941 | 161 | 0.086792 |
5ae91679bd447b62dfc5e7a20c1d3f70d03392e4 | 1,577 | py | Python | yamlapi/demo/tool/read_write_json.py | Ironkubi/yamlapi | efd80cf15a182b0dde03e923f6b3d86c43e5a355 | [
"MIT"
] | 19 | 2020-05-29T09:28:42.000Z | 2022-02-21T06:09:42.000Z | yamlapi/demo/tool/read_write_json.py | Ironkubi/yamlapi | efd80cf15a182b0dde03e923f6b3d86c43e5a355 | [
"MIT"
] | 1 | 2020-03-05T05:45:19.000Z | 2020-07-12T03:08:40.000Z | yamlapi/demo/tool/read_write_json.py | Ironkubi/yamlapi | efd80cf15a182b0dde03e923f6b3d86c43e5a355 | [
"MIT"
] | 7 | 2020-10-21T02:24:44.000Z | 2022-02-21T06:09:22.000Z | import demjson
from setting.project_config import *
def read_json(json_absolute_path):
"""
读取json文件
:param json_absolute_path: 参数为需要读取的json文件的绝对路径
:return:
"""
with open(json_absolute_path, "r", encoding="utf-8") as f:
data_list = demjson.decode(f.read(), encoding="utf-8")
return... | 23.537313 | 77 | 0.590996 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 808 | 0.421492 |
5aea87607e71c1fa54637d37748174be3086f680 | 174 | py | Python | core.py | guillaumevincent/keepass-less | 03e041b2b49595b421a7b6ca8a0a4e7ae51d7fdc | [
"MIT"
] | 1 | 2015-12-01T21:47:34.000Z | 2015-12-01T21:47:34.000Z | core.py | guillaumevincent/keepass-less | 03e041b2b49595b421a7b6ca8a0a4e7ae51d7fdc | [
"MIT"
] | null | null | null | core.py | guillaumevincent/keepass-less | 03e041b2b49595b421a7b6ca8a0a4e7ae51d7fdc | [
"MIT"
] | null | null | null | def split_entry(entry):
entries = entry.split(':')
if len(entries) == 3:
return entries[0], entries[1], int(entries[2])
return entries[0], entries[1], 10
| 29 | 54 | 0.609195 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.017241 |
5aeb5490b47cc2c338ecc2ddb29c186d556812da | 834 | py | Python | instascrape/commands/whoami.py | tnychn/instascrape | 7aaf3c1a1786bbe80059ed6e0d93442a19a6f475 | [
"MIT"
] | 80 | 2020-05-28T17:22:14.000Z | 2022-03-25T07:15:51.000Z | instascrape/commands/whoami.py | AlphaXenon/InstaScrape | 7aaf3c1a1786bbe80059ed6e0d93442a19a6f475 | [
"MIT"
] | 23 | 2020-05-25T12:45:40.000Z | 2022-03-06T05:44:41.000Z | instascrape/commands/whoami.py | AlphaXenon/InstaScrape | 7aaf3c1a1786bbe80059ed6e0d93442a19a6f475 | [
"MIT"
] | 14 | 2020-06-28T05:52:28.000Z | 2022-03-28T04:27:50.000Z | from instascrape.commands import pretty_print, load_obj
from colorama import Fore, Style
def whoami_handler(**_):
insta = load_obj()
if insta is None:
name = "NOBODY"
print(Fore.BLUE + "Authenticated:", Fore.RED + "False")
else:
name = insta.my_username
data = insta.me().a... | 37.909091 | 110 | 0.651079 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 227 | 0.270883 |
5aeccbb2cf767b475bd8dc50612ec4c125139aee | 20,131 | py | Python | tests/test_attack_log.py | Thorsten-Sick/PurpleDome | 297d746ef2e17a4207f8274b7fccbe2ce43c4a5f | [
"MIT"
] | 7 | 2021-11-30T19:54:29.000Z | 2022-03-05T23:15:23.000Z | tests/test_attack_log.py | Thorsten-Sick/PurpleDome | 297d746ef2e17a4207f8274b7fccbe2ce43c4a5f | [
"MIT"
] | null | null | null | tests/test_attack_log.py | Thorsten-Sick/PurpleDome | 297d746ef2e17a4207f8274b7fccbe2ce43c4a5f | [
"MIT"
] | 2 | 2021-11-30T11:16:27.000Z | 2022-02-02T13:36:01.000Z | #!/usr/bin/env python3
# Testing the attack log class
import unittest
from app.attack_log import AttackLog
import app.attack_log
# from unittest.mock import patch, call
# from app.exceptions import ConfigurationError
# https://docs.python.org/3/library/unittest.html
class TestMachineConfig(unittest.TestCase):
... | 45.035794 | 136 | 0.581442 | 19,858 | 0.986439 | 0 | 0 | 0 | 0 | 0 | 0 | 5,824 | 0.289305 |