hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72b3507469d3268751b2af14a56a3c99059f5d73 | 1,307 | py | Python | deck_of_cards/core.py | ucsky/deck_of_cards | 81422a35857645f434e231e42c78bd5f44f7e0e1 | [
"Apache-2.0"
] | null | null | null | deck_of_cards/core.py | ucsky/deck_of_cards | 81422a35857645f434e231e42c78bd5f44f7e0e1 | [
"Apache-2.0"
] | null | null | null | deck_of_cards/core.py | ucsky/deck_of_cards | 81422a35857645f434e231e42c78bd5f44f7e0e1 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: 00_core.ipynb (unless otherwise specified).
from __future__ import print_function, division
__all__ = ['Card']
# Cell
#nbdev_comment from __future__ import print_function, division
import random
class Card:
"""Represents a standard playing card.
Attributes:
... | 25.627451 | 87 | 0.58684 |
114c7c24830f29f02cf0b618677a8c2bd20a28a2 | 11,452 | py | Python | examples/pytorch/sampling/gcn_cv_sc.py | sufeidechabei/dgl-1 | 23f78c0539bdda55722d425be90ac460fa9a6983 | [
"Apache-2.0"
] | null | null | null | examples/pytorch/sampling/gcn_cv_sc.py | sufeidechabei/dgl-1 | 23f78c0539bdda55722d425be90ac460fa9a6983 | [
"Apache-2.0"
] | null | null | null | examples/pytorch/sampling/gcn_cv_sc.py | sufeidechabei/dgl-1 | 23f78c0539bdda55722d425be90ac460fa9a6983 | [
"Apache-2.0"
] | null | null | null | import argparse, time, math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import dgl
import dgl.function as fn
from dgl import DGLGraph
from dgl.data import register_data_args, load_data
class NodeUpdate(nn.Module):
def __init__(self, layer_id, in_feats, out_feats, dropout,... | 35.345679 | 115 | 0.541303 |
037e685fe70b3653c2c5f34ef28259bf1a3421d1 | 6,473 | py | Python | lib/modules/persistence/powerbreach/deaduser.py | dascannibal/Empire | 293f06437520f4747e82e4486938b1a9074d3d51 | [
"BSD-3-Clause"
] | 10 | 2016-01-26T19:58:49.000Z | 2021-06-20T17:57:43.000Z | lib/modules/persistence/powerbreach/deaduser.py | dascannibal/Empire | 293f06437520f4747e82e4486938b1a9074d3d51 | [
"BSD-3-Clause"
] | null | null | null | lib/modules/persistence/powerbreach/deaduser.py | dascannibal/Empire | 293f06437520f4747e82e4486938b1a9074d3d51 | [
"BSD-3-Clause"
] | 5 | 2017-10-17T08:16:13.000Z | 2021-04-30T02:41:02.000Z | import os
from lib.common import helpers
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Invoke-DeadUserBackdoor',
'Author': ['@sixdub'],
'Description': ('Backup backdoor for a backdoor user.'),
'Background' : False,
... | 33.194872 | 168 | 0.48262 |
9d822d9c2b3fe9614729c55d6d1d0045041fb1cb | 100 | py | Python | punto_4.py | mbeltra89001/algoritmos | fef4ec9a2bd9fc6fb1cbd554287136c30445637e | [
"MIT"
] | null | null | null | punto_4.py | mbeltra89001/algoritmos | fef4ec9a2bd9fc6fb1cbd554287136c30445637e | [
"MIT"
] | null | null | null | punto_4.py | mbeltra89001/algoritmos | fef4ec9a2bd9fc6fb1cbd554287136c30445637e | [
"MIT"
] | null | null | null | lista=[]
for i in range (1,13):
t=5*i+1
lista.append(t)
print(lista)
suma=sum(lista)
print(suma) | 14.285714 | 22 | 0.66 |
a2bb2a391751fcf5e7006ac7c504a833b1260fb8 | 30,047 | py | Python | UI/ui.py | PedroKBarros/LE3B | be9740be96871b24ca40ed82109469cdd7204115 | [
"MIT"
] | null | null | null | UI/ui.py | PedroKBarros/LE3B | be9740be96871b24ca40ed82109469cdd7204115 | [
"MIT"
] | 3 | 2021-08-23T20:56:29.000Z | 2021-08-25T16:27:04.000Z | UI/ui.py | PedroKBarros/LE3B | be9740be96871b24ca40ed82109469cdd7204115 | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter.filedialog import askopenfilename
from tkinter import messagebox
from PIL import Image, ImageTk
import UI.ui_constants as ui_consts
import main as main
import os.path
from os import path
from collections import deque
from random import randint
root = None
currentCommentsUIRow = 0
com... | 43.233094 | 179 | 0.734183 |
968bd7e966b21df41fe968cc089315cad32e78d9 | 1,936 | py | Python | transforms.py | hmdliu/Deep-Learning-S22 | c7753f543b64d3a7773d6ee3b64ea6018e141c4d | [
"MIT"
] | null | null | null | transforms.py | hmdliu/Deep-Learning-S22 | c7753f543b64d3a7773d6ee3b64ea6018e141c4d | [
"MIT"
] | null | null | null | transforms.py | hmdliu/Deep-Learning-S22 | c7753f543b64d3a7773d6ee3b64ea6018e141c4d | [
"MIT"
] | null | null | null |
# Mainly adopted from competition start code
import random
import torch
from torchvision.transforms import ColorJitter
from torchvision.transforms import functional as F
def _flip_coco_person_keypoints(kps, width):
flip_inds = [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]
flipped_data = kps[:,... | 29.333333 | 74 | 0.583161 |
9bbac4fa999498bf023dd8f9737e459dd888a8b5 | 92 | py | Python | auth_public.py | Marsovc1/Projektna-naloga-OPB | 61fba488fe7520f7db64482ca82b5226e11a44d9 | [
"MIT"
] | null | null | null | auth_public.py | Marsovc1/Projektna-naloga-OPB | 61fba488fe7520f7db64482ca82b5226e11a44d9 | [
"MIT"
] | 3 | 2020-08-04T08:53:08.000Z | 2020-08-18T19:33:49.000Z | auth_public.py | Marsovc1/Projektna-naloga-OPB | 61fba488fe7520f7db64482ca82b5226e11a44d9 | [
"MIT"
] | 1 | 2020-05-02T08:11:42.000Z | 2020-05-02T08:11:42.000Z | db = 'sem2020_nikolajc'
host = 'baza.fmf.uni-lj.si'
user = 'javnost'
password = 'javnogeslo' | 23 | 27 | 0.706522 |
8ad7c1528151e216b4616edef4577f055fbde958 | 2,399 | py | Python | appengine/trooper_o_matic/appengine_module/trooper_o_matic/test/controller_test.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | appengine/trooper_o_matic/appengine_module/trooper_o_matic/test/controller_test.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | appengine/trooper_o_matic/appengine_module/trooper_o_matic/test/controller_test.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import datetime
import json
import unittest
import webapp2
import webtest
import endpoints
from protorpc import protojson
from appengine_module.trooper... | 29.256098 | 78 | 0.699041 |
9fbe833cd1e2f69b8d8ec85bfec62e01a343bede | 1,486 | py | Python | examples/async/exchange_client/accounts_rpc/7_OrderStates.py | CtheSky/sdk-python | c1b1ae931f4970832466a004eb193027bdc1dea5 | [
"Apache-2.0"
] | null | null | null | examples/async/exchange_client/accounts_rpc/7_OrderStates.py | CtheSky/sdk-python | c1b1ae931f4970832466a004eb193027bdc1dea5 | [
"Apache-2.0"
] | null | null | null | examples/async/exchange_client/accounts_rpc/7_OrderStates.py | CtheSky/sdk-python | c1b1ae931f4970832466a004eb193027bdc1dea5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Injective Labs
#
# 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 writin... | 43.705882 | 170 | 0.800808 |
799fc7f9f8a171e94ff1d5be1f16a6b39cea077d | 3,139 | py | Python | envinorma/io/parse_html.py | Envinorma/envinorma-data | 85c00abc1af9a3b14912229b0789a0d1d5ae7b69 | [
"MIT"
] | 4 | 2020-12-11T09:40:12.000Z | 2022-03-08T13:43:35.000Z | envinorma/io/parse_html.py | Envinorma/envinorma-data | 85c00abc1af9a3b14912229b0789a0d1d5ae7b69 | [
"MIT"
] | 104 | 2020-12-10T15:20:13.000Z | 2021-09-30T13:05:00.000Z | envinorma/io/parse_html.py | Envinorma/envinorma-data | 85c00abc1af9a3b14912229b0789a0d1d5ae7b69 | [
"MIT"
] | null | null | null | from typing import Any, List, Union
from bs4 import BeautifulSoup
from bs4.element import Tag
from envinorma.models.text_elements import Cell, EnrichedString, Linebreak, Row, Table, TextElement, Title
def _ensure_str(element: TextElement) -> str:
if not isinstance(element, str):
raise ValueError(f'Expec... | 34.494505 | 120 | 0.661994 |
ebf2bdc400a4675510a3da4654449b803248896a | 1,341 | py | Python | touclick/chaojiying.py | silianpan/seal-spider-demo | 23bf013d08f9edaf23823bc3787f579bccd0ec3a | [
"Apache-2.0"
] | null | null | null | touclick/chaojiying.py | silianpan/seal-spider-demo | 23bf013d08f9edaf23823bc3787f579bccd0ec3a | [
"Apache-2.0"
] | 3 | 2021-09-08T01:11:16.000Z | 2022-03-02T15:14:03.000Z | touclick/chaojiying.py | silianpan/seal-spider-demo | 23bf013d08f9edaf23823bc3787f579bccd0ec3a | [
"Apache-2.0"
] | 1 | 2019-08-04T09:57:29.000Z | 2019-08-04T09:57:29.000Z | import requests
from hashlib import md5
class Chaojiying(object):
def __init__(self, username, password, soft_id):
self.username = username
self.password = md5(password.encode('utf-8')).hexdigest()
self.soft_id = soft_id
self.base_params = {
'user': self.username,
... | 27.9375 | 127 | 0.55481 |
70b1bf1a1546b9da660ed09b25af041982d80fe7 | 5,234 | py | Python | tbgclient/TBGSession.py | tbgers/tbgclient | bd0d4484086b1f966a32fc009806e28798287cad | [
"MIT"
] | 1 | 2022-02-27T01:34:11.000Z | 2022-02-27T01:34:11.000Z | tbgclient/TBGSession.py | tbgers/tbgclient | bd0d4484086b1f966a32fc009806e28798287cad | [
"MIT"
] | 2 | 2021-10-21T20:29:38.000Z | 2022-01-15T01:08:51.000Z | tbgclient/TBGSession.py | tbgers/tbgclient | bd0d4484086b1f966a32fc009806e28798287cad | [
"MIT"
] | null | null | null | """An implementation of a TBG session."""
import re
import requests
from . import api
from .Flags import Flags
from .Post import Post
from .TBGException import *
from .Topic import Topic
from .Forum import Forum
from .User import User
from .ChatConnection import ChatConnection
from . import parsers
... | 34.893333 | 113 | 0.588651 |
f6481be500ce0da1a534a178ffff372c5b1a1aa3 | 106,790 | py | Python | saleor/graphql/translations/tests/test_translations.py | eanknd/saleor | 08aa724176be00d7aaf654f14e9ae99dd4327f97 | [
"CC-BY-4.0"
] | 1,392 | 2021-10-06T15:54:28.000Z | 2022-03-31T20:50:55.000Z | saleor/graphql/translations/tests/test_translations.py | eanknd/saleor | 08aa724176be00d7aaf654f14e9ae99dd4327f97 | [
"CC-BY-4.0"
] | 888 | 2021-10-06T10:48:54.000Z | 2022-03-31T11:00:30.000Z | saleor/graphql/translations/tests/test_translations.py | eanknd/saleor | 08aa724176be00d7aaf654f14e9ae99dd4327f97 | [
"CC-BY-4.0"
] | 538 | 2021-10-07T16:21:27.000Z | 2022-03-31T22:58:57.000Z | import json
from unittest.mock import patch
import graphene
import pytest
from django.contrib.auth.models import Permission
from django.utils.functional import SimpleLazyObject
from freezegun import freeze_time
from ....tests.utils import dummy_editorjs
from ....webhook.event_types import WebhookEventAsyncType
from .... | 32.627559 | 88 | 0.646596 |
3ba86633bd3a0dd66fca80cd0d8353322c960d3b | 2,436 | py | Python | benchmark/startPyquil1752.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil1752.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil1752.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=60
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=3
pr... | 25.642105 | 64 | 0.539819 |
54f104c59f65d8f93a0d0b1bdbc169f3ead79c9a | 5,841 | py | Python | orator/orm/relations/relation.py | HeathLee/sorator | 271668865bf0d039908643e3df9b98c966b9d956 | [
"MIT"
] | null | null | null | orator/orm/relations/relation.py | HeathLee/sorator | 271668865bf0d039908643e3df9b98c966b9d956 | [
"MIT"
] | null | null | null | orator/orm/relations/relation.py | HeathLee/sorator | 271668865bf0d039908643e3df9b98c966b9d956 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from contextlib import contextmanager
from ...query.expression import QueryExpression
from ..builder import Builder
class Relation:
_constraints = True
def __init__(self, query, parent):
"""
:param query: A Builder instance
:type query: orm.orator.Builder
... | 23.938525 | 77 | 0.578497 |
a237f9ae9d2bbe3d179366ec39e9c1e570b8d068 | 4,983 | py | Python | PyMathTools.py | iblacksand/PyMathTools | b558ec2dbcd901be2614fa768cc3894da18f9b7d | [
"BSD-3-Clause"
] | null | null | null | PyMathTools.py | iblacksand/PyMathTools | b558ec2dbcd901be2614fa768cc3894da18f9b7d | [
"BSD-3-Clause"
] | null | null | null | PyMathTools.py | iblacksand/PyMathTools | b558ec2dbcd901be2614fa768cc3894da18f9b7d | [
"BSD-3-Clause"
] | null | null | null | # PyMathTools by John Elizarraras
# This is free and please make any changes you want no need for credit
from math import gcd
__all__ = ['binary_search', 'mod', 'to_ints', 'read_file', 'latex_gen_graph', 'elliptic_card', 'is_prime']
def binary_search(array, target):
""" Does a binary search on to find the index ... | 32.357143 | 245 | 0.575356 |
199ec010875f322a39dbe0156e762257625b09ce | 13,288 | py | Python | zairachem/tools/mollib/virtual_libraries/experiments/do_data_processing.py | ersilia-os/ersilia-automl-chem | fabb1f05d17cff11ec0e084495eed4c0152f2f63 | [
"MIT"
] | 44 | 2019-11-08T09:45:34.000Z | 2022-03-14T12:14:23.000Z | zairachem/tools/mollib/virtual_libraries/experiments/do_data_processing.py | ersilia-os/ersilia-automl-chem | fabb1f05d17cff11ec0e084495eed4c0152f2f63 | [
"MIT"
] | 2 | 2020-06-08T04:49:12.000Z | 2021-04-16T08:17:53.000Z | zairachem/tools/mollib/virtual_libraries/experiments/do_data_processing.py | ersilia-os/ersilia-automl-chem | fabb1f05d17cff11ec0e084495eed4c0152f2f63 | [
"MIT"
] | 22 | 2019-11-08T18:53:01.000Z | 2022-02-19T11:00:36.000Z | # Copyright (c) 2019 ETH Zurich
import os, sys
import argparse
import configparser
import time
import re
import numpy as np
import random
import collections
from random import shuffle
from rdkit import Chem
from rdkit.Chem import Draw
sys.path.append('../src/')
from python import helper as hp
from python import helpe... | 37.75 | 105 | 0.633128 |
1763812f94632dfd9c931c11db77193963eb7c5b | 84 | py | Python | tests/Unit_Tests/decorator.py | Yayg/ripe | 8bb090ecb84bf45d3fc5bc008683ee84a74888ab | [
"MIT"
] | null | null | null | tests/Unit_Tests/decorator.py | Yayg/ripe | 8bb090ecb84bf45d3fc5bc008683ee84a74888ab | [
"MIT"
] | 1 | 2019-09-27T11:41:42.000Z | 2019-09-27T11:41:42.000Z | tests/Unit_Tests/decorator.py | Yayg/rift | 8bb090ecb84bf45d3fc5bc008683ee84a74888ab | [
"MIT"
] | null | null | null | import rift
@rift.Test
def test_decorator():
print("Passed")
rift.run_tests()
| 10.5 | 21 | 0.702381 |
4f326a25217703035c82058d8a84e9f550088334 | 3,451 | py | Python | rombuster/deps/lzs_decompress.py | EntySec/RomBuster | 01b053eb33fbf1aef5d68922803219af58bfa10f | [
"MIT"
] | 175 | 2021-05-18T19:56:42.000Z | 2022-03-30T04:35:21.000Z | rombuster/deps/lzs_decompress.py | lollipop31/RomBuster | c858279b59d3345375e9944dbf760a0d9d7b0796 | [
"MIT"
] | 1 | 2021-07-07T07:11:08.000Z | 2021-07-07T09:25:02.000Z | rombuster/deps/lzs_decompress.py | lollipop31/RomBuster | c858279b59d3345375e9944dbf760a0d9d7b0796 | [
"MIT"
] | 35 | 2021-05-19T19:08:02.000Z | 2022-03-25T17:33:28.000Z | #!/usr/bin/env python3
##############################################################
# Lempel-Ziv-Stac decompression
# BitReader and RingList classes
#
# Copyright (C) 2011 Filippo Valsorda - FiloSottile
# filosottile.wiki gmail.com - www.pytux.it
#
# This program is free software: you can redistribute it and/or mod... | 27.830645 | 77 | 0.534628 |
98a239e69ad267e9fa5826e6fbe08ca91ebf7a01 | 15,510 | py | Python | swift/common/request_helpers.py | tsg-/swift-ec | d5cc4d274696b587e820050774db4ca2c3d9c85c | [
"Apache-2.0"
] | null | null | null | swift/common/request_helpers.py | tsg-/swift-ec | d5cc4d274696b587e820050774db4ca2c3d9c85c | [
"Apache-2.0"
] | null | null | null | swift/common/request_helpers.py | tsg-/swift-ec | d5cc4d274696b587e820050774db4ca2c3d9c85c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-2013 OpenStack Foundation
#
# 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 agree... | 40.285714 | 79 | 0.616054 |
7d64e9ec9259adac6d3b5ff021579b52164a7aff | 3,569 | py | Python | Python_TPM20_GUI/shell_util.py | RaymWong/optiga-tpm-explorer | 9a05849205784c4540f22d757f521092c86f2135 | [
"MIT"
] | 1 | 2022-02-09T20:46:05.000Z | 2022-02-09T20:46:05.000Z | Python_TPM20_GUI/shell_util.py | RaymWong/optiga-tpm-explorer | 9a05849205784c4540f22d757f521092c86f2135 | [
"MIT"
] | null | null | null | Python_TPM20_GUI/shell_util.py | RaymWong/optiga-tpm-explorer | 9a05849205784c4540f22d757f521092c86f2135 | [
"MIT"
] | 1 | 2022-02-15T02:36:28.000Z | 2022-02-15T02:36:28.000Z | import subprocess
import os
from subprocess import PIPE
# Variables to hold the 3 authorisation values
ownerAuth = "owner123"
nvAuth = "nv123"
endorseAuth = "endorsement123"
lockoutAuth = "lockout123"
openssl_cnf=("openssl_conf = openssl_init\n"
"[openssl_init]\n"
"engines = engine_section\n"
... | 29.495868 | 121 | 0.616419 |
6fc5217341a4c28d1668a1beb07116bc2c540356 | 7,664 | py | Python | python/mujincontrollerclient/realtimeitlplanningclient.py | mqcmd196/mujincontrollerclientpy | 6f26143d7c64407c913561edafd3f459a2909900 | [
"Apache-2.0"
] | null | null | null | python/mujincontrollerclient/realtimeitlplanningclient.py | mqcmd196/mujincontrollerclientpy | 6f26143d7c64407c913561edafd3f459a2909900 | [
"Apache-2.0"
] | null | null | null | python/mujincontrollerclient/realtimeitlplanningclient.py | mqcmd196/mujincontrollerclientpy | 6f26143d7c64407c913561edafd3f459a2909900 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2013-2015 MUJIN Inc.
# Mujin controller client for bin picking task
# mujin imports
from . import realtimerobotclient
# logging
import logging
log = logging.getLogger(__name__)
class RealtimeITLPlanningControllerClient(realtimerobotclient.RealtimeRobotControllerClient):
"... | 53.594406 | 238 | 0.705506 |
bd9f8e1eb82fad69d71aa10f6ec871428fd3a70c | 5,919 | py | Python | wildcard/dashboards/project/queues/tests.py | kickstandproject/wildcard | 0ef2a15d8ac6b1d37db964d0baa7e40f9f771bc9 | [
"Apache-2.0"
] | 2 | 2015-03-04T18:55:24.000Z | 2021-04-20T23:27:19.000Z | wildcard/dashboards/project/queues/tests.py | kickstandproject/wildcard | 0ef2a15d8ac6b1d37db964d0baa7e40f9f771bc9 | [
"Apache-2.0"
] | null | null | null | wildcard/dashboards/project/queues/tests.py | kickstandproject/wildcard | 0ef2a15d8ac6b1d37db964d0baa7e40f9f771bc9 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 NEC Corporation
#
# 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
... | 30.353846 | 78 | 0.585065 |
5a6b78dac2bf2c1fd9385940027aa4b8ff721891 | 17,719 | py | Python | selfdrive/thermald/thermald.py | tobylinjs/openpilot | 6c525691e9943cb88096b1d94c1c29cc4b22369f | [
"MIT"
] | 1 | 2020-09-04T00:41:47.000Z | 2020-09-04T00:41:47.000Z | selfdrive/thermald/thermald.py | tobylinjs/openpilot | 6c525691e9943cb88096b1d94c1c29cc4b22369f | [
"MIT"
] | null | null | null | selfdrive/thermald/thermald.py | tobylinjs/openpilot | 6c525691e9943cb88096b1d94c1c29cc4b22369f | [
"MIT"
] | 2 | 2020-11-30T23:10:07.000Z | 2020-12-01T15:53:03.000Z | #!/usr/bin/env python3
import datetime
import os
import time
from collections import namedtuple
import psutil
from smbus2 import SMBus
import cereal.messaging as messaging
from cereal import log
from common.filter_simple import FirstOrderFilter
from common.hardware import EON, HARDWARE, TICI
from common.numpy_fast im... | 38.352814 | 149 | 0.706925 |
e36a45ad1cdcd939f1297508c9bf9d67ed438dd7 | 1,799 | py | Python | python/src/nnabla/backward_function/sink.py | sdonatti/nnabla | ac4a42e62dd358f16bd79c08a9a9f3d83c0100c9 | [
"Apache-2.0"
] | 1 | 2020-08-03T12:49:19.000Z | 2020-08-03T12:49:19.000Z | python/src/nnabla/backward_function/sink.py | sdonatti/nnabla | ac4a42e62dd358f16bd79c08a9a9f3d83c0100c9 | [
"Apache-2.0"
] | 1 | 2020-11-09T07:33:29.000Z | 2020-11-09T07:33:29.000Z | python/src/nnabla/backward_function/sink.py | sdonatti/nnabla | ac4a42e62dd358f16bd79c08a9a9f3d83c0100c9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 Sony Corporation. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 36.714286 | 76 | 0.673152 |
4c9f88d00244732bb4cd7fca0243fb3cea38ba14 | 27 | py | Python | python/hpctl/hpctl/version.py | domyounglee/baseline | 2261abfb7e770cc6f3d63a7f6e0015238d0e11f8 | [
"Apache-2.0"
] | 24 | 2018-08-06T07:31:48.000Z | 2021-04-13T07:49:43.000Z | python/hpctl/hpctl/version.py | domyounglee/baseline | 2261abfb7e770cc6f3d63a7f6e0015238d0e11f8 | [
"Apache-2.0"
] | 3 | 2019-04-20T14:08:57.000Z | 2020-03-30T08:27:17.000Z | python/hpctl/hpctl/version.py | domyounglee/baseline | 2261abfb7e770cc6f3d63a7f6e0015238d0e11f8 | [
"Apache-2.0"
] | 3 | 2019-04-20T14:11:27.000Z | 2020-12-17T10:45:19.000Z | __version__ = '0.2.0.dev0'
| 13.5 | 26 | 0.666667 |
127b9ba8d75c8425aa1a218318c86ebb10f44606 | 185 | py | Python | tests/conftest.py | tdcoa/usage | 408091f77360fe29e14186b60746fd7d60713e42 | [
"MIT"
] | null | null | null | tests/conftest.py | tdcoa/usage | 408091f77360fe29e14186b60746fd7d60713e42 | [
"MIT"
] | 4 | 2020-07-21T18:42:22.000Z | 2020-10-14T00:50:45.000Z | tests/conftest.py | tdcoa/usage | 408091f77360fe29e14186b60746fd7d60713e42 | [
"MIT"
] | 1 | 2020-08-05T20:09:41.000Z | 2020-08-05T20:09:41.000Z | "global setup including fixtures"
from pathlib import Path
import pytest
@pytest.fixture(scope="session")
def testdir(request) -> Path:
return Path(request.config.rootdir) / "tests"
| 20.555556 | 46 | 0.767568 |
c72d1c2694be4a98e46359aac7b3cf28adb43f86 | 23,314 | py | Python | tests/python/pants_test/engine/test_rules.py | pall-valmundsson/pants | 434533ad83d6b3e88723829a28b9b42f80f1cc09 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/engine/test_rules.py | pall-valmundsson/pants | 434533ad83d6b3e88723829a28b9b42f80f1cc09 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/engine/test_rules.py | pall-valmundsson/pants | 434533ad83d6b3e88723829a28b9b42f80f1cc09 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import re
import sys
import unittest
from builtins import object, str
from textwrap impor... | 31.67663 | 131 | 0.528009 |
b8e66f6142ce1de30236a731a290cab9c8e87a69 | 7,102 | py | Python | model/builder.py | hjonnala/deeplab2 | 1868757c4333ec5287cc0bf0a6bbf38fbbe34c2e | [
"Apache-2.0"
] | null | null | null | model/builder.py | hjonnala/deeplab2 | 1868757c4333ec5287cc0bf0a6bbf38fbbe34c2e | [
"Apache-2.0"
] | null | null | null | model/builder.py | hjonnala/deeplab2 | 1868757c4333ec5287cc0bf0a6bbf38fbbe34c2e | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 The Deeplab2 Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 40.124294 | 80 | 0.754999 |
2e26529cddd4fc9eea0ccd073ff698ddbb7c9e7f | 5,698 | py | Python | trainer/rascv2_trainer.py | zhou3968322/dl-lab | f6f028df2bd3f68146b3285800938afe71eba442 | [
"MIT"
] | null | null | null | trainer/rascv2_trainer.py | zhou3968322/dl-lab | f6f028df2bd3f68146b3285800938afe71eba442 | [
"MIT"
] | null | null | null | trainer/rascv2_trainer.py | zhou3968322/dl-lab | f6f028df2bd3f68146b3285800938afe71eba442 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# email:bingchengzhou@foxmail.com
# create: 2021/1/12
from utils.common_util import get_model_name
import models, datasets
from utils.log import logger
import time, torchvision
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter
class DbwrTrainer(object):
... | 52.759259 | 117 | 0.571955 |
13fc9c9cacee8e96a311b3cfcfbfef0a9f8c9e6f | 550 | py | Python | backend_rest/tracking/migrations/0010_auto_20200622_2123.py | ezrankayamba/twiga_distribution | ac4fd3d4f6b111e734a932398be564c863582be2 | [
"MIT"
] | null | null | null | backend_rest/tracking/migrations/0010_auto_20200622_2123.py | ezrankayamba/twiga_distribution | ac4fd3d4f6b111e734a932398be564c863582be2 | [
"MIT"
] | 16 | 2020-03-23T13:24:11.000Z | 2022-03-12T00:17:58.000Z | backend_rest/tracking/migrations/0010_auto_20200622_2123.py | ezrankayamba/twiga_distribution | ac4fd3d4f6b111e734a932398be564c863582be2 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.2 on 2020-06-22 18:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('setups', '0005_auto_20200616_1848'),
('tracking', '0009_auto_20200620_1812'),
]
operations = [
migr... | 26.190476 | 129 | 0.649091 |
012fbb7751e89639e178965b4386786f1214e430 | 2,563 | py | Python | setup.py | pytorch-duo/torchmm | 0e44f8599d26a29c345e7cc85e2885813346dc0b | [
"MIT"
] | null | null | null | setup.py | pytorch-duo/torchmm | 0e44f8599d26a29c345e7cc85e2885813346dc0b | [
"MIT"
] | 3 | 2021-06-08T22:22:40.000Z | 2022-03-12T00:47:40.000Z | setup.py | macabdul9/torchmm | 0e44f8599d26a29c345e7cc85e2885813346dc0b | [
"MIT"
] | null | null | null | import codecs
import os
from setuptools import find_packages, setup
# Basic information
NAME = "torchmm"
DESCRIPTION = "PyTorch DataLoader and Abstraction for multi-modal data."
VERSION = "0.0.2 alpha"
AUTHOR = "Abdul Waheed, Ganeshan Malhotra"
EMAIL = "abdulwaheed1513@gmail.com"
LICENSE = "MIT"
REPOSITORY = "https:/... | 28.797753 | 108 | 0.678892 |
a4849490214a648184f952591eac6d31b8226e68 | 7,954 | py | Python | scripts/data_loader.py | snehitvaddi/pseudo-visual-speech-denoising | 9247319ef967fa5c40902aeb7c04a117b1387f3a | [
"MIT"
] | 84 | 2020-12-22T10:50:06.000Z | 2022-03-22T06:17:06.000Z | scripts/data_loader.py | snehitvaddi/pseudo-visual-speech-denoising | 9247319ef967fa5c40902aeb7c04a117b1387f3a | [
"MIT"
] | 6 | 2020-12-23T03:49:47.000Z | 2022-03-30T11:41:26.000Z | scripts/data_loader.py | snehitvaddi/pseudo-visual-speech-denoising | 9247319ef967fa5c40902aeb7c04a117b1387f3a | [
"MIT"
] | 17 | 2020-12-23T15:52:01.000Z | 2022-02-07T11:58:02.000Z | from torch.utils.data import Dataset, DataLoader
import torch
import numpy as np
import audio.audio_utils as audio
import audio.hparams as hparams
import random
import os
import librosa
class DataGenerator(Dataset):
def __init__(self, pretrain_path, train_path, noise_path, sampling_rate, split):
sel... | 36.824074 | 140 | 0.576691 |
613a5ac72130c5363e3225ea79d337f2207eb360 | 677 | py | Python | coordinate_output.py | rmclarklab/B49_B75_B96_haplotypes | 1c554d12c005f7c38701d1621a8afff616333595 | [
"MIT"
] | null | null | null | coordinate_output.py | rmclarklab/B49_B75_B96_haplotypes | 1c554d12c005f7c38701d1621a8afff616333595 | [
"MIT"
] | null | null | null | coordinate_output.py | rmclarklab/B49_B75_B96_haplotypes | 1c554d12c005f7c38701d1621a8afff616333595 | [
"MIT"
] | null | null | null |
def coordinates(vcf, outdir):
chrom_file = open(outdir + "/chrom_file.txt", "w")
with open(vcf, "r") as openvcf:
for line in openvcf:
if line.split("=")[0] == "##contig":
vcfcord = line.split("=")
vcf_scaff = vcfcord[2].split(",")[0]
vcf... | 42.3125 | 97 | 0.40325 |
b76e34e2b99f263928c43a757db2d7170ac0ed49 | 1,458 | py | Python | conanfile.py | helmesjo/conan-fakeit | daf9622052cdc3b92eea40f2cef7151495fc0d7c | [
"MIT"
] | null | null | null | conanfile.py | helmesjo/conan-fakeit | daf9622052cdc3b92eea40f2cef7151495fc0d7c | [
"MIT"
] | null | null | null | conanfile.py | helmesjo/conan-fakeit | daf9622052cdc3b92eea40f2cef7151495fc0d7c | [
"MIT"
] | null | null | null | from conans import ConanFile
import os
class FakeItConan(ConanFile):
name = 'FakeIt'
version = '2.0.4'
description = 'C++ mocking made easy. A simple yet very expressive, headers only library for c++ mocking.'
settings = None
options = {'integration': ['boost', 'gtest', 'mstest', 'standalone', 'tp... | 36.45 | 111 | 0.6262 |
d8ad336bcb0afb2feb8a6f83dbe29e03ab52b9a2 | 1,228 | py | Python | skyportal/tests/frontend/test_top_sources.py | dannygoldstein/skyportal | 3f3518136530fcf5bd1787a4c890782164627fce | [
"BSD-3-Clause"
] | null | null | null | skyportal/tests/frontend/test_top_sources.py | dannygoldstein/skyportal | 3f3518136530fcf5bd1787a4c890782164627fce | [
"BSD-3-Clause"
] | null | null | null | skyportal/tests/frontend/test_top_sources.py | dannygoldstein/skyportal | 3f3518136530fcf5bd1787a4c890782164627fce | [
"BSD-3-Clause"
] | null | null | null | import uuid
from skyportal.tests import api
def test_top_sources(driver, user, public_source, public_group, upload_data_token):
obj_id = str(uuid.uuid4())
status, data = api(
'POST',
'sources',
data={
'id': obj_id,
'ra': 50.4,
'dec': 22.33,
... | 30.7 | 83 | 0.571661 |
35088ab8341d36f89559d3b95d8d743869c548b3 | 13,272 | py | Python | log_mito_act/model_798.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_mito_act/model_798.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_mito_act/model_798.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU'])
Monomer('BaxM', ['BidM', 'BaxA'])
Monomer('Apop', ['C3pro', 'X... | 79.473054 | 614 | 0.80975 |
f1b82185af4b277720b92d0f1200c1bacbf8b5ea | 15,772 | py | Python | dxm/lib/masking_api/api/application_api.py | experiortec/dxm-toolkit | b2ab6189e163c62fa8d7251cd533d2a36430d44a | [
"Apache-2.0"
] | 5 | 2018-08-23T15:47:05.000Z | 2022-01-19T23:38:18.000Z | dxm/lib/masking_api/api/application_api.py | experiortec/dxm-toolkit | b2ab6189e163c62fa8d7251cd533d2a36430d44a | [
"Apache-2.0"
] | 59 | 2018-10-15T10:37:00.000Z | 2022-03-22T20:49:25.000Z | dxm/lib/masking_api/api/application_api.py | experiortec/dxm-toolkit | b2ab6189e163c62fa8d7251cd533d2a36430d44a | [
"Apache-2.0"
] | 12 | 2019-03-08T19:59:13.000Z | 2021-12-16T03:28:04.000Z | # coding: utf-8
"""
Masking API
Schema for the Masking Engine API # noqa: E501
OpenAPI spec version: 5.1.8
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import... | 38.751843 | 142 | 0.614063 |
ff8fc6aabd9e97f8734da3a7af645921ec9e3f9e | 1,110 | py | Python | oreilly_ws/src/teleopbot/teleopbot/keyboard_driver.py | brand25/ros2_tuto | 9fc1dd4f130baa5ad6376227ea6869549b09e66c | [
"Apache-2.0"
] | 1 | 2022-02-02T07:50:55.000Z | 2022-02-02T07:50:55.000Z | oreilly_ws/src/teleopbot/teleopbot/keyboard_driver.py | brand25/ros2_tuto | 9fc1dd4f130baa5ad6376227ea6869549b09e66c | [
"Apache-2.0"
] | null | null | null | oreilly_ws/src/teleopbot/teleopbot/keyboard_driver.py | brand25/ros2_tuto | 9fc1dd4f130baa5ad6376227ea6869549b09e66c | [
"Apache-2.0"
] | null | null | null | import sys, select, tty, termios
import rclpy
from rclpy.node import Node
from rclpy.qos import QoSProfile
from std_msgs.msg import String
class KeyboardDriver(Node):
def __init__(self):
super().__init__('keyboard_driver')
self._key_pub = self.create_publisher(String, 'keys', QoSProfile(depth=10))... | 27.073171 | 83 | 0.646847 |
447b2bfb7e1975e6b7c2bc8ec423dc8ffac76fbe | 2,836 | py | Python | tests/test_stups/test_piu.py | mschwitalla/senza | 301a43fde41db194cbb80c68271692d1fe2212db | [
"Apache-2.0"
] | 106 | 2015-03-30T14:15:15.000Z | 2021-07-26T07:30:11.000Z | tests/test_stups/test_piu.py | mschwitalla/senza | 301a43fde41db194cbb80c68271692d1fe2212db | [
"Apache-2.0"
] | 547 | 2015-04-13T09:58:50.000Z | 2021-01-26T11:20:35.000Z | tests/test_stups/test_piu.py | mschwitalla/senza | 301a43fde41db194cbb80c68271692d1fe2212db | [
"Apache-2.0"
] | 102 | 2015-04-01T08:09:53.000Z | 2020-11-05T09:05:28.000Z | from unittest.mock import MagicMock
import pytest
from senza.exceptions import PiuNotFound
from senza.stups.piu import Piu
def test_request_access(monkeypatch):
m_call = MagicMock()
monkeypatch.setattr('senza.stups.piu.call', m_call)
Piu.request_access('127.0.0.1', 'no reason', None, True)
m_call.as... | 40.514286 | 77 | 0.52433 |
c918ef008f35488d5f6b858412d5f292e543dd33 | 2,976 | py | Python | astrosource/test/mocks.py | zemogle/autovar | d495a336c0559097f566c2ce3f6136645f29ed62 | [
"MIT"
] | 1 | 2019-01-28T13:35:39.000Z | 2019-01-28T13:35:39.000Z | astrosource/test/mocks.py | zemogle/astrosource | d495a336c0559097f566c2ce3f6136645f29ed62 | [
"MIT"
] | 14 | 2019-10-28T13:09:32.000Z | 2022-02-10T22:43:03.000Z | astrosource/test/mocks.py | zemogle/autovar | d495a336c0559097f566c2ce3f6136645f29ed62 | [
"MIT"
] | 3 | 2019-09-27T11:16:14.000Z | 2021-02-07T23:10:19.000Z | from unittest.mock import MagicMock
from astropy.table import Table, Column
import numpy as np
def create_table_cols():
mag = Column(np.array([12.33699989,12.03499985,11.31900024,12.20699978,11.48400021,11.88599968,12.09300041], dtype=np.float32))
emag = Column(np.array([0.025,0.021,0.025,0.035,0.022,0.027,0.... | 33.438202 | 131 | 0.681452 |
76010a7006fa4f6c0a3e0ebc2e86288fb686be92 | 3,158 | py | Python | fisher_py/data/business/reaction.py | abdelq/fisher_py | befb98732ba7c4e57858d158c68cda09ed829d66 | [
"MIT"
] | 3 | 2021-11-03T20:55:45.000Z | 2022-02-01T10:11:47.000Z | fisher_py/data/business/reaction.py | abdelq/fisher_py | befb98732ba7c4e57858d158c68cda09ed829d66 | [
"MIT"
] | 2 | 2022-01-28T02:04:21.000Z | 2022-01-29T01:29:14.000Z | fisher_py/data/business/reaction.py | abdelq/fisher_py | befb98732ba7c4e57858d158c68cda09ed829d66 | [
"MIT"
] | 1 | 2022-01-26T23:30:37.000Z | 2022-01-26T23:30:37.000Z | from fisher_py.net_wrapping import NetWrapperBase
from fisher_py.data.filter_enums import ActivationType
class Reaction(NetWrapperBase):
"""
The Reaction interface. Defines a reaction for fragmenting an ion (an MS/MS stage).
"""
def __init__(self, reaction_net):
super().__init__()
sel... | 34.326087 | 130 | 0.677961 |
94afc8ea17ee47132b10cb959a21c07a33b45acc | 16,518 | py | Python | volatility/framework/renderers/__init__.py | dl9rdz/volatility3 | 9d9cdfb7d43b98662089503fdb85f103d551b543 | [
"Linux-OpenIB"
] | null | null | null | volatility/framework/renderers/__init__.py | dl9rdz/volatility3 | 9d9cdfb7d43b98662089503fdb85f103d551b543 | [
"Linux-OpenIB"
] | null | null | null | volatility/framework/renderers/__init__.py | dl9rdz/volatility3 | 9d9cdfb7d43b98662089503fdb85f103d551b543 | [
"Linux-OpenIB"
] | null | null | null | # This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
#
"""Renderers.
Renderers display the unified output format in some manner (be it text
or file or graphical output
"""
import collecti... | 43.468421 | 148 | 0.637547 |
23d07d2cc80472aab4ffd32ec403e237bef306e5 | 434 | py | Python | linear_search.py | svikash/python-basic-program | e0542d98c2985c71cfbaaf3f09ccfdb747a9e2af | [
"MIT"
] | null | null | null | linear_search.py | svikash/python-basic-program | e0542d98c2985c71cfbaaf3f09ccfdb747a9e2af | [
"MIT"
] | null | null | null | linear_search.py | svikash/python-basic-program | e0542d98c2985c71cfbaaf3f09ccfdb747a9e2af | [
"MIT"
] | 1 | 2018-10-01T06:04:27.000Z | 2018-10-01T06:04:27.000Z | n=int(input("enter size of list"))
list=[]
print("enter the elements of list")
for i in range (0,n):
c=int(input(""))
list.append(c)
print("the list is ")
print(list)
flag = 0
search=int(input("enter the number you want to search in list"))
#mid= (l+1)/
for j in range(0,n):
if list[j] == search:... | 22.842105 | 65 | 0.569124 |
76f45d488d272a010970d255a5281b72591cc5e2 | 7,045 | py | Python | ml-prediction/ml.py | XiyueWang/arvato_segement_prediction | 84a922b935d039efaf7c7006270eb6066c200f38 | [
"CNRI-Python"
] | null | null | null | ml-prediction/ml.py | XiyueWang/arvato_segement_prediction | 84a922b935d039efaf7c7006270eb6066c200f38 | [
"CNRI-Python"
] | null | null | null | ml-prediction/ml.py | XiyueWang/arvato_segement_prediction | 84a922b935d039efaf7c7006270eb6066c200f38 | [
"CNRI-Python"
] | null | null | null | import numpy as np
import pandas as pd
from sklearn.metrics import roc_auc_score, roc_curve, precision_recall_curve, auc
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import GridSearchCV
from imblearn.under_sampling import TomekLinks
from sklearn.ens... | 33.231132 | 130 | 0.64088 |
3e6044ec5e462f98f0bc3ac520e1b03382de7212 | 3,898 | py | Python | quiz/models/quiz.py | manikagarg/iQuiz | 99b2550eeedb92134a631d71fdb017844f81ef78 | [
"MIT"
] | null | null | null | quiz/models/quiz.py | manikagarg/iQuiz | 99b2550eeedb92134a631d71fdb017844f81ef78 | [
"MIT"
] | null | null | null | quiz/models/quiz.py | manikagarg/iQuiz | 99b2550eeedb92134a631d71fdb017844f81ef78 | [
"MIT"
] | 1 | 2021-09-26T14:10:28.000Z | 2021-09-26T14:10:28.000Z | from django.db import models
from django.utils import timezone
import datetime
#from django.core.validators import MinValueValidator, MaxValueValidator
from .lti_user import *
from . import custom_fields as custom_fields
class Quiz(models.Model):
"""
The Quiz Model is used to store the basic information about... | 34.803571 | 114 | 0.659056 |
a351a9854dcdf37c8857cd14380c11509f1d039c | 243 | py | Python | tests/utils/test_cbook.py | fossabot/jcvi | 86948affd63e94c8327cf117c47d36940b508b68 | [
"BSD-2-Clause"
] | 1 | 2020-10-04T13:21:24.000Z | 2020-10-04T13:21:24.000Z | tests/utils/test_cbook.py | Wangjien/jcvi | 6732285f62dcbd7f3878e5017c3350124530c796 | [
"BSD-2-Clause"
] | null | null | null | tests/utils/test_cbook.py | Wangjien/jcvi | 6732285f62dcbd7f3878e5017c3350124530c796 | [
"BSD-2-Clause"
] | null | null | null | import pytest
@pytest.mark.parametrize(
"input,output", [("AT5G54690.2", "AT5G54690"), ("evm.test.1", "evm.test.1")],
)
def test_gene_name(input, output):
from jcvi.utils.cbook import gene_name
assert gene_name(input) == output
| 22.090909 | 81 | 0.683128 |
4cd6d530b4db1b2e9a037897cf2cdeb7fa06c57a | 1,199 | py | Python | profile/forms.py | ChristopherOloo/KilimoQAPortal | c905a42282bbce70b5477862185ad332185307ce | [
"MIT"
] | 67 | 2022-01-05T18:59:23.000Z | 2022-03-18T13:13:39.000Z | profile/forms.py | ChristopherOloo/KilimoQAPortal | c905a42282bbce70b5477862185ad332185307ce | [
"MIT"
] | 3 | 2022-01-10T10:03:23.000Z | 2022-03-11T16:58:38.000Z | profile/forms.py | ChristopherOloo/KilimoQAPortal | c905a42282bbce70b5477862185ad332185307ce | [
"MIT"
] | 4 | 2022-01-08T17:39:19.000Z | 2022-02-28T07:40:16.000Z | from django import forms
from .models import Profile,Position
from martor.fields import MartorFormField
class EditProfileForm(forms.ModelForm):
class Meta:
model = Profile
fields = ['profile_photo','full_name','location','title','about_me',
'website_link','twitter_link','github_link',
'not_to_Display... | 23.057692 | 104 | 0.719766 |
3f19fb7d69cc5c31dcf502a5b3927a78b26451eb | 5,134 | py | Python | flair/corpus_mapping.py | mlej8/MultilangStructureKD | 735a5a3835f63146cd83132c979fa58a9be2dace | [
"MIT"
] | 62 | 2020-04-28T05:05:10.000Z | 2022-03-17T18:26:45.000Z | flair/corpus_mapping.py | mlej8/MultilangStructureKD | 735a5a3835f63146cd83132c979fa58a9be2dace | [
"MIT"
] | 10 | 2020-12-21T21:52:09.000Z | 2021-08-06T13:11:56.000Z | flair/corpus_mapping.py | mlej8/MultilangStructureKD | 735a5a3835f63146cd83132c979fa58a9be2dace | [
"MIT"
] | 7 | 2020-07-09T12:42:00.000Z | 2021-04-28T09:17:38.000Z | corpus_map={'ner':{'eng':'CONLL_03_ENGLISH','en':'CONLL_03','nl':'CONLL_03_DUTCH','es':'CONLL_03_SPANISH','de':'CONLL_03_GERMAN'},
'upos':{'en':'UD_ENGLISH','nl':'UD_DUTCH','es':'UD_SPANISH','de':'UD_GERMAN','fr':'UD_FRENCH','it':'UD_ITALIAN','pt':'UD_PORTUGUESE','zh':'UD_CHINESE','ja':'UD_JAPANESE','ta':'UD_TAMIL'... | 131.641026 | 402 | 0.648617 |
95628b7f76f092081ef5e00f7b27e7fd5066f388 | 23,187 | py | Python | QUANTAXIS/QAData/QADataStruct.py | lxqjswa/QUANTAXIS | a5f89b28a75d1a5094630a4ed166f596840528b1 | [
"MIT"
] | 1 | 2018-09-09T02:55:10.000Z | 2018-09-09T02:55:10.000Z | QUANTAXIS/QAData/QADataStruct.py | lxqjswa/QUANTAXIS | a5f89b28a75d1a5094630a4ed166f596840528b1 | [
"MIT"
] | null | null | null | QUANTAXIS/QAData/QADataStruct.py | lxqjswa/QUANTAXIS | a5f89b28a75d1a5094630a4ed166f596840528b1 | [
"MIT"
] | null | null | null | # coding:utf-8
#
# The MIT License (MIT)
#
# Copyright (c) 2016-2018 yutiansut/QUANTAXIS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation th... | 27.056009 | 191 | 0.577436 |
d3e047ba968ed5543fdc2df37e4ef7caae1a4e3b | 282 | py | Python | oldp/apps/contact/urls.py | docsuleman/oldp | 8dcaa8e6e435794c872346b5014945ace885adb4 | [
"MIT"
] | 66 | 2018-05-07T12:34:39.000Z | 2022-02-23T20:14:24.000Z | oldp/apps/contact/urls.py | Justice-PLP-DHV/oldp | eadf235bb0925453d9a5b81963a0ce53afeb17fd | [
"MIT"
] | 68 | 2018-06-11T16:13:17.000Z | 2022-02-10T08:03:26.000Z | oldp/apps/contact/urls.py | Justice-PLP-DHV/oldp | eadf235bb0925453d9a5b81963a0ce53afeb17fd | [
"MIT"
] | 15 | 2018-06-23T19:41:13.000Z | 2021-08-18T08:21:49.000Z | from django.conf.urls import url
from . import views
app_name = 'contact'
urlpatterns = [
url(r'^$', views.form_view, name='form'),
url(r'^report_content$', views.report_content_view, name='report_content'),
url(r'^thankyou', views.thankyou_view, name='thankyou'),
]
| 23.5 | 79 | 0.695035 |
2799c38f7607a98f6e70400c29c06184ad9bd84a | 3,675 | py | Python | PCDARTS/architect.py | AllenChen1998/QueryNet | 1ab74d7f4cc9d25af30abe0631581cf7be81a07f | [
"Apache-2.0"
] | 2 | 2022-01-09T11:09:17.000Z | 2022-03-29T14:16:32.000Z | PCDARTS/architect.py | AllenChen1998/QueryNet | 1ab74d7f4cc9d25af30abe0631581cf7be81a07f | [
"Apache-2.0"
] | null | null | null | PCDARTS/architect.py | AllenChen1998/QueryNet | 1ab74d7f4cc9d25af30abe0631581cf7be81a07f | [
"Apache-2.0"
] | null | null | null | import torch
import numpy as np
import torch.nn as nn
from torch.autograd import Variable
def _concat(xs):
return torch.cat([x.view(-1) for x in xs])
class Architect(object):
def __init__(self, model, momentum, weight_decay, arch_learning_rate, arch_weight_decay):#args):
self.network_momentum ... | 38.28125 | 131 | 0.693333 |
bb5331565b8cd95e8fc5b54d814e9b3db2c514bd | 5,979 | py | Python | pylgbst/comms/__init__.py | karatheodory/pylgbst | 2aa82a818623fe8ecb8a6fc1c6ae083e56debd19 | [
"MIT"
] | 1 | 2021-04-04T13:31:28.000Z | 2021-04-04T13:31:28.000Z | pylgbst/comms/__init__.py | karatheodory/pylgbst | 2aa82a818623fe8ecb8a6fc1c6ae083e56debd19 | [
"MIT"
] | null | null | null | pylgbst/comms/__init__.py | karatheodory/pylgbst | 2aa82a818623fe8ecb8a6fc1c6ae083e56debd19 | [
"MIT"
] | null | null | null | """
This package holds communication aspects
"""
import binascii
import json
import logging
import socket
import traceback
from abc import abstractmethod
from binascii import unhexlify
from threading import Thread
from pylgbst.constants import MSG_DEVICE_SHUTDOWN, ENABLE_NOTIFICATIONS_HANDLE, ENABLE_NOTIFICATIONS_VALU... | 30.661538 | 106 | 0.567319 |
72fde37f2bfde474bc6fc1007bd65e35e436e660 | 9,398 | py | Python | resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/numpy/lib/machar.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | null | null | null | resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/numpy/lib/machar.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | null | null | null | resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/numpy/lib/machar.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | null | null | null | """
Machine arithmetics - determine the parameters of the
floating-point arithmetic system
"""
# Author: Pearu Peterson, September 2003
__all__ = ['MachAr']
from numpy.core.fromnumeric import any
from numpy.core.numeric import seterr
# Need to speed this up...especially for longfloat
class MachAr(object):
"""D... | 31.75 | 84 | 0.503618 |
133225901fd5c57b3f3937a463aaa96d1fe82e61 | 1,761 | py | Python | lib/rpistream/setup.py | thatguy1234510/rpi_stream_img | d3a2cc346d9ae5303b0d8990ea7a0ea8c6d85637 | [
"MIT"
] | 2 | 2019-11-04T09:33:44.000Z | 2021-02-28T16:06:30.000Z | lib/rpistream/setup.py | thatguy1234510/rpi_stream_img | d3a2cc346d9ae5303b0d8990ea7a0ea8c6d85637 | [
"MIT"
] | 8 | 2018-08-01T22:41:32.000Z | 2018-10-15T21:48:33.000Z | lib/rpistream/setup.py | thatguy1234510/rpi_stream_img | d3a2cc346d9ae5303b0d8990ea7a0ea8c6d85637 | [
"MIT"
] | null | null | null | import setuptools
long_description="""# RaspiCameraLivestream
### A very simple library built for streaming video from a remote Raspberry Pi server in realtime.
---
## How to install:
### MacOS or linux:
Open your terminal and type:
``` bash
sudo python -m pip install rpistream
```
### Windows:
Open cmd as adm... | 22.291139 | 113 | 0.71096 |
484e1321817f004c2f06cc3d1d70f41523918835 | 77 | py | Python | src/main/python/ui/distribution/__init__.py | boom-roasted/ImageWAO | 944505dab1a7c97b8eae2bf9fb30006d0f471f89 | [
"MIT"
] | 1 | 2020-03-22T01:52:52.000Z | 2020-03-22T01:52:52.000Z | src/main/python/ui/distribution/__init__.py | leftaltkey/ImageWAO | 944505dab1a7c97b8eae2bf9fb30006d0f471f89 | [
"MIT"
] | 2 | 2021-06-08T21:12:47.000Z | 2021-06-08T21:30:32.000Z | src/main/python/ui/distribution/__init__.py | leftaltkey/ImageWAO | 944505dab1a7c97b8eae2bf9fb30006d0f471f89 | [
"MIT"
] | null | null | null | from .distributionform import DistributionForm
__all__ = [DistributionForm]
| 19.25 | 46 | 0.844156 |
f48a868c0ac914f3c0075ac4e43a052567ff7fa8 | 10,211 | py | Python | docs/source/conf.py | agramfort/POT | 8dbfd3edae649f5f3e87be4a3ce446c59729b2f7 | [
"MIT"
] | null | null | null | docs/source/conf.py | agramfort/POT | 8dbfd3edae649f5f3e87be4a3ce446c59729b2f7 | [
"MIT"
] | null | null | null | docs/source/conf.py | agramfort/POT | 8dbfd3edae649f5f3e87be4a3ce446c59729b2f7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# POT documentation build configuration file, created by
# sphinx-quickstart on Mon Oct 24 11:10:10 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... | 32.009404 | 80 | 0.714719 |
274f10bd35f5d5dae96909eac46439516aa3fa21 | 15,358 | py | Python | morl/population_3d.py | yunshengtian/PGMORL | 71fd9ac1128ca129de4a7c8725d5f650e329379f | [
"MIT"
] | 47 | 2020-07-11T02:00:02.000Z | 2022-03-28T09:55:08.000Z | morl/population_3d.py | yunshengtian/PGMORL | 71fd9ac1128ca129de4a7c8725d5f650e329379f | [
"MIT"
] | 2 | 2021-09-01T15:45:21.000Z | 2021-10-13T09:20:07.000Z | morl/population_3d.py | mit-gfx/PGMORL | 71fd9ac1128ca129de4a7c8725d5f650e329379f | [
"MIT"
] | 13 | 2020-07-15T02:10:42.000Z | 2022-03-09T10:18:23.000Z | import numpy as np
import torch
import torch.optim as optim
from copy import deepcopy
from sample import Sample
from utils import get_ep_indices, generate_weights_batch_dfs, update_ep, compute_hypervolume, compute_sparsity, update_ep_and_compute_hypervolume_sparsity
from scipy.optimize import least_squares
import torch... | 44.387283 | 185 | 0.586209 |
22f49225ecb30a1ee88e7af914869cba037b34fd | 3,327 | py | Python | isi_sdk_8_2_1/isi_sdk_8_2_1/models/hdfs_fsimage_job_settings.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_1/isi_sdk_8_2_1/models/hdfs_fsimage_job_settings.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_1/isi_sdk_8_2_1/models/hdfs_fsimage_job_settings.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 8
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_2_1.models.hdfs_fs... | 28.435897 | 117 | 0.58942 |
8f1252d09b124a2b04c2846293668f786a2f805b | 5,736 | py | Python | cogs/dice/dice_utils.py | VegaSera/SWNDiscordBot2 | cb73b9d51591b6af9f2a1a603ea0dd8a7161020c | [
"MIT"
] | 2 | 2020-09-08T18:08:55.000Z | 2021-06-22T17:13:32.000Z | cogs/dice/dice_utils.py | VegaSera/SWNDiscordBot2 | cb73b9d51591b6af9f2a1a603ea0dd8a7161020c | [
"MIT"
] | null | null | null | cogs/dice/dice_utils.py | VegaSera/SWNDiscordBot2 | cb73b9d51591b6af9f2a1a603ea0dd8a7161020c | [
"MIT"
] | 1 | 2020-06-30T19:12:27.000Z | 2020-06-30T19:12:27.000Z | from cogs.utils.ToolUtils import diceroller
import re
def keep_dice(die, side, keep):
"""Dice in the format of XdYkZ. X is the number of dice to roll, Y is the number of side each die should have. Z is the number of dice to keep."""
tot, verbose = diceroller(die, side, verbose=True)
if keep >= die: # If... | 36.535032 | 150 | 0.532427 |
3d127f5da5b9a29f694f1906ec08096626029d9e | 289 | py | Python | client/verta/verta/__about__.py | Vafilor/modeldb | 57e617fa64368e7c5c8ae186955e3e28b39fd5a9 | [
"Apache-2.0"
] | null | null | null | client/verta/verta/__about__.py | Vafilor/modeldb | 57e617fa64368e7c5c8ae186955e3e28b39fd5a9 | [
"Apache-2.0"
] | null | null | null | client/verta/verta/__about__.py | Vafilor/modeldb | 57e617fa64368e7c5c8ae186955e3e28b39fd5a9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
__description__ = "Python client for interfacing with ModelDB and the Verta platform"
__license__ = "Apache 2.0"
__maintainer__ = "Michael Liu"
__maintainer_email__ = "miliu@verta.ai"
__title__ = "verta"
__url__ = "https://www.verta.ai/"
__version__ = "0.14.12a0"
| 28.9 | 85 | 0.726644 |
538ffe401c49c0d05a43261202eb3c320605d747 | 827 | py | Python | test.py | danx0r/djangle | 3b87a68ad423d87a40764ec50851592121b6b911 | [
"BSD-3-Clause"
] | null | null | null | test.py | danx0r/djangle | 3b87a68ad423d87a40764ec50851592121b6b911 | [
"BSD-3-Clause"
] | 4 | 2019-11-22T19:15:19.000Z | 2021-06-10T20:49:43.000Z | test.py | danx0r/djangle | 3b87a68ad423d87a40764ec50851592121b6b911 | [
"BSD-3-Clause"
] | null | null | null | import os,sys
cmd="""curl 'http://localhost:8000/example/testy/zzz/test?foo=bar' """
print (cmd)
os.system(cmd)
print ("\n")
cmd="""curl 'http://localhost:8000/example/save/test?data=\{"boo":"paw"\}' """
print (cmd)
os.system(cmd)
print ("\n")
cmd="""curl 'http://localhost:8000/example/save/test?data=\[\["boo","paw"... | 25.84375 | 125 | 0.631197 |
2a35042cd7108ee5e05430c63e66e6fccf2150fe | 7,105 | py | Python | tests/test_dpda.py | eohomegrownapps/automata | bd0ec7abd5662c5f1807937db5fdcc6d707c4f47 | [
"MIT"
] | null | null | null | tests/test_dpda.py | eohomegrownapps/automata | bd0ec7abd5662c5f1807937db5fdcc6d707c4f47 | [
"MIT"
] | null | null | null | tests/test_dpda.py | eohomegrownapps/automata | bd0ec7abd5662c5f1807937db5fdcc6d707c4f47 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Classes and functions for testing the behavior of DPDAs."""
# from unittest.mock import patch
import nose.tools as nose
import automata.base.exceptions as exceptions
import automata.pda.exceptions as pda_exceptions
import tests.test_pda as test_pda
from automata.pda.configuration import PDA... | 40.141243 | 79 | 0.626319 |
e5905be536947f3a01bb67683c6bc9ec6944c315 | 1,249 | py | Python | Python Scripts/tpot_genetic_spitzer_calibration.py | exowanderer/SpitzerDeepLearningNetwork | 37f3ca1731b05f64ec6080bf9e333c7a491840f8 | [
"MIT"
] | 1 | 2022-03-24T10:25:17.000Z | 2022-03-24T10:25:17.000Z | Python Scripts/tpot_genetic_spitzer_calibration.py | exowanderer/SpitzerDeepLearningNetwork | 37f3ca1731b05f64ec6080bf9e333c7a491840f8 | [
"MIT"
] | null | null | null | Python Scripts/tpot_genetic_spitzer_calibration.py | exowanderer/SpitzerDeepLearningNetwork | 37f3ca1731b05f64ec6080bf9e333c7a491840f8 | [
"MIT"
] | null | null | null | from tpot import TPOTRegressor
import pandas as pd
import numpy as np
import warnings
warnings.filterwarnings("ignore")
# from matplotlib import pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.externals import joblib
from sklearn.metrics import r2_score
from time imp... | 32.025641 | 96 | 0.783827 |
785a3bca3ce771c9233af5f3ea888fa01bdf5d0a | 3,979 | py | Python | alipay/aop/api/request/KoubeiCateringPosPaymodeDeleteRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/KoubeiCateringPosPaymodeDeleteRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/KoubeiCateringPosPaymodeDeleteRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.KoubeiCateringPosPaymodeDeleteModel import KoubeiCateringPosPaymodeDeleteModel
class KoubeiCateringPosPaymodeDeleteRequest(object):
... | 27.441379 | 148 | 0.645388 |
987f9a38dc2c0294e13369831944dd780207ccf4 | 6,188 | py | Python | ethereum/genesis_helpers.py | IIIIllllIIIIllllIIIIllllIIIIllllIIIIll/pyethereum | d962694be03686a8e5c1d7459ae272b70a5c9f77 | [
"MIT"
] | 11 | 2017-06-16T13:19:02.000Z | 2021-06-16T02:33:00.000Z | ethereum/genesis_helpers.py | IIIIllllIIIIllllIIIIllllIIIIllllIIIIll/pyethereum | d962694be03686a8e5c1d7459ae272b70a5c9f77 | [
"MIT"
] | 8 | 2017-11-20T15:09:43.000Z | 2018-04-01T09:36:29.000Z | ethereum/genesis_helpers.py | IIIIllllIIIIllllIIIIllllIIIIllllIIIIll/pyethereum | d962694be03686a8e5c1d7459ae272b70a5c9f77 | [
"MIT"
] | 12 | 2017-06-12T15:54:27.000Z | 2018-04-19T03:31:26.000Z | from ethereum.state import State
from ethereum.block import Block, BlockHeader, BLANK_UNCLES_HASH
from ethereum.utils import (
decode_hex,
big_endian_to_int,
encode_hex,
parse_as_bin,
parse_as_int,
normalize_address,
to_string,
)
from ethereum.config import Env
from ethereum.consensus_strate... | 38.197531 | 92 | 0.643342 |
2e1574dceaa3007d6fb829f6da4cb41833494c46 | 11,893 | py | Python | ansible/modules/system/open_iscsi.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | ansible/modules/system/open_iscsi.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | ansible/modules/system/open_iscsi.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2020-02-13T14:24:57.000Z | 2020-02-13T14:24:57.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Serge van Ginderachter <serge@vanginderachter.be>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either vers... | 30.41688 | 121 | 0.60523 |
d6c8f06999e21b4fc3906ca6eedf8c73de959d23 | 46,727 | py | Python | PandaRender.py | galsh17/cartwheel_train | a50abe18cfe8c1f0f24267c3efa8537ecf211e72 | [
"MIT"
] | 32 | 2018-09-04T08:51:08.000Z | 2022-02-22T02:04:38.000Z | PandaRender.py | galsh17/cartwheel_train | a50abe18cfe8c1f0f24267c3efa8537ecf211e72 | [
"MIT"
] | 5 | 2019-05-27T07:54:52.000Z | 2022-01-11T10:14:25.000Z | PandaRender.py | galsh17/cartwheel_train | a50abe18cfe8c1f0f24267c3efa8537ecf211e72 | [
"MIT"
] | 14 | 2018-06-22T15:29:39.000Z | 2021-09-28T12:58:37.000Z | """ The training-render file. (class TrainRenderer)
Update: This class is render only class. It does not take the mainloop()
control. Basically need to call function step().
Defines a rendering class. Defines a spinTask (panda3d) which basicalyl
renders 16-cameras at a time and sets the... | 33.884699 | 129 | 0.587048 |
01530d6788eec8bc5f7a3f5abd8ef0794178a80e | 14,415 | py | Python | src/squad/motion/states.py | douglasdaly/spot-robot | 7a4fdd7eb5fe5fc2d31180ed6b9f7ea21647bea2 | [
"MIT"
] | null | null | null | src/squad/motion/states.py | douglasdaly/spot-robot | 7a4fdd7eb5fe5fc2d31180ed6b9f7ea21647bea2 | [
"MIT"
] | null | null | null | src/squad/motion/states.py | douglasdaly/spot-robot | 7a4fdd7eb5fe5fc2d31180ed6b9f7ea21647bea2 | [
"MIT"
] | null | null | null | from collections.abc import Sequence
from datetime import datetime
from typing import (
Any,
Dict,
Iterable,
Iterator,
List,
Optional,
Tuple,
TypeVar,
Union,
)
from squad.constants import Leg
from squad.exceptions import StateError
from squad.kinematics.base import BodyParameters
fr... | 28.375984 | 78 | 0.543115 |
b13c9cd265d19c188c6a4398a2402e4d49f4d785 | 3,215 | py | Python | crawler/crawler/spiders/scrape.py | VikParuchuri/simpsons-scripts | 4356fb90bedfa3e5fd1ea6c974e5d27842af06e6 | [
"Apache-2.0"
] | 15 | 2015-02-26T16:05:37.000Z | 2021-11-24T14:59:29.000Z | crawler/crawler/spiders/scrape.py | VikParuchuri/simpsons-scripts | 4356fb90bedfa3e5fd1ea6c974e5d27842af06e6 | [
"Apache-2.0"
] | null | null | null | crawler/crawler/spiders/scrape.py | VikParuchuri/simpsons-scripts | 4356fb90bedfa3e5fd1ea6c974e5d27842af06e6 | [
"Apache-2.0"
] | 4 | 2016-11-17T00:47:11.000Z | 2018-12-18T03:55:46.000Z | from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.selector import HtmlXPathSelector
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import HtmlXPathSelector
from scrapy.item import Item, Field
import re
snpp_base_url = "http://www.snpp.com/episodes.html"
ss_base_url... | 34.202128 | 124 | 0.625194 |
e7602e4c24e3b25cf051c7a4c467a82bd8832171 | 1,909 | py | Python | tad/introducer/introducer_api.py | randywessels/tad-blockchain | 08a5f9565aa27f211350717d5e8cda14b46359e4 | [
"Apache-2.0"
] | 13 | 2021-07-20T15:21:54.000Z | 2022-02-09T04:32:56.000Z | tad/introducer/introducer_api.py | randywessels/tad-blockchain | 08a5f9565aa27f211350717d5e8cda14b46359e4 | [
"Apache-2.0"
] | 8 | 2021-07-21T17:22:59.000Z | 2021-09-18T23:01:59.000Z | tad/introducer/introducer_api.py | randywessels/tad-blockchain | 08a5f9565aa27f211350717d5e8cda14b46359e4 | [
"Apache-2.0"
] | 1 | 2021-07-20T18:14:02.000Z | 2021-07-20T18:14:02.000Z | from typing import Callable, Optional
from tad.introducer.introducer import Introducer
from tad.protocols.introducer_protocol import RequestPeersIntroducer, RespondPeersIntroducer
from tad.protocols.protocol_message_types import ProtocolMessageTypes
from tad.server.outbound_message import Message, make_msg
from tad.se... | 33.491228 | 100 | 0.686223 |
674f791daecb50c0cbca8ae6a781e3ecfd36b7fa | 940 | py | Python | napari/utils/colormaps/colorbars.py | OKaluza/napari | 95a6afbbdb54a530b1eaca23037b8f98c7c8b064 | [
"BSD-3-Clause"
] | null | null | null | napari/utils/colormaps/colorbars.py | OKaluza/napari | 95a6afbbdb54a530b1eaca23037b8f98c7c8b064 | [
"BSD-3-Clause"
] | 4 | 2019-12-08T20:20:44.000Z | 2020-01-16T21:57:33.000Z | napari/utils/colormaps/colorbars.py | OKaluza/napari | 95a6afbbdb54a530b1eaca23037b8f98c7c8b064 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
def make_colorbar(cmap, size=(12, 28), horizontal=True):
"""Make a colorbar from a colormap.
Parameters
----------
cmap : vispy.color.Colormap
Colormap to create colorbar with.
size : 2-tuple
Shape of colorbar.
horizontal : bool
If True colobar is or... | 26.111111 | 74 | 0.610638 |
0958928bcf350c427c35a34b86a28f5ff950beb3 | 3,009 | py | Python | pidtree_bcc/plugins/__init__.py | Yelp/pidtree-bcc | ea54752b873687a159091d509df3a4f9dcc4a994 | [
"BSD-3-Clause"
] | 20 | 2019-11-11T20:03:31.000Z | 2022-01-26T05:53:34.000Z | pidtree_bcc/plugins/__init__.py | Yelp/pidtree-bcc | ea54752b873687a159091d509df3a4f9dcc4a994 | [
"BSD-3-Clause"
] | 29 | 2019-10-21T21:38:33.000Z | 2022-03-09T14:44:41.000Z | pidtree_bcc/plugins/__init__.py | Yelp/pidtree-bcc | ea54752b873687a159091d509df3a4f9dcc4a994 | [
"BSD-3-Clause"
] | 4 | 2019-10-18T22:30:28.000Z | 2021-09-10T02:36:04.000Z | import logging
from typing import List
from pidtree_bcc.utils import find_subclass
class BasePlugin:
# Specifies which probes are compatible with the plugin
# Set to "*" to allow all probes
PROBE_SUPPORT = tuple()
def __init__(self, args: dict):
""" Constructor
:param dict args: pl... | 34.586207 | 107 | 0.5889 |
120d14805c68a62a05c0a3b41f12afb888f8640d | 7,048 | py | Python | project/number.py | rainbowhuanguw/electionguard-SDK | 789def57a8aa6a43fa59af4e9e8bfb37ea6ebe1c | [
"MIT"
] | null | null | null | project/number.py | rainbowhuanguw/electionguard-SDK | 789def57a8aa6a43fa59af4e9e8bfb37ea6ebe1c | [
"MIT"
] | null | null | null | project/number.py | rainbowhuanguw/electionguard-SDK | 789def57a8aa6a43fa59af4e9e8bfb37ea6ebe1c | [
"MIT"
] | null | null | null | import random
import hashlib
from typing import (
Sequence
)
LARGE_PRIME = (int(('''104438888141315250669175271071662438257996424904738378038423348328
3953907971553643537729993126875883902173634017777416360502926082946377942955704498
542097614841825246773580689398386320439747911160897731551074903967243883427132918... | 30.912281 | 111 | 0.665011 |
17c6854f0b75f8002ede36a52da21ac22b3f0153 | 175 | py | Python | workbook/myFirstModule.py | hasanzainul10/cv-1 | 102b110170b5951a866ed0fc01284b4cd99bfc8b | [
"MIT"
] | null | null | null | workbook/myFirstModule.py | hasanzainul10/cv-1 | 102b110170b5951a866ed0fc01284b4cd99bfc8b | [
"MIT"
] | null | null | null | workbook/myFirstModule.py | hasanzainul10/cv-1 | 102b110170b5951a866ed0fc01284b4cd99bfc8b | [
"MIT"
] | null | null | null | ##myFirstModule
def greeting(name):
print(f"Hello {name}")
def goodbye(name):
print(f"Goodbye {name}")
person1 = {"age" : 12, "name": "john", "country":"malaysia"} | 17.5 | 60 | 0.622857 |
0c390ca5b391194b5823411a9b5960fbf96f549b | 18,465 | py | Python | docs/conf.py | ywf5566/airflow | e7872dddbf275729b2c42e2a4ff602a6df7d1536 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | docs/conf.py | ywf5566/airflow | e7872dddbf275729b2c42e2a4ff602a6df7d1536 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | docs/conf.py | ywf5566/airflow | e7872dddbf275729b2c42e2a4ff602a6df7d1536 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# flake8: noqa
# Disable Flake8 because of all the sphinx imports
#
# 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 licens... | 33.880734 | 138 | 0.692066 |
b91e8eb1e974a71c93850c211acb4b2d2e946504 | 1,056 | py | Python | grove/tests/phaseestimation/test_phaseestimation.py | msohaibalam/grove | 8c27a5d12923d6ace57956db6a249e8d01e33f35 | [
"Apache-2.0"
] | 1 | 2020-07-15T15:40:49.000Z | 2020-07-15T15:40:49.000Z | grove/tests/phaseestimation/test_phaseestimation.py | msohaibalam/grove | 8c27a5d12923d6ace57956db6a249e8d01e33f35 | [
"Apache-2.0"
] | null | null | null | grove/tests/phaseestimation/test_phaseestimation.py | msohaibalam/grove | 8c27a5d12923d6ace57956db6a249e8d01e33f35 | [
"Apache-2.0"
] | 1 | 2021-11-27T16:20:00.000Z | 2021-11-27T16:20:00.000Z | import numpy as np
from pyquil.gates import H, CPHASE, SWAP, MEASURE
import pyquil.quil as pq
from grove.qft.fourier import inverse_qft
from grove.alpha.phaseestimation.phase_estimation import controlled
from grove.alpha.phaseestimation.phase_estimation import phase_estimation
def test_phase_estimation():
phase... | 28.540541 | 73 | 0.642045 |
a0421ba1db4b3e7f8fef11ee361550e414c51461 | 620 | py | Python | hn_clone/posts/views.py | bkavanagh/dj-hackernews-clone | 543d2774c2b956dd6aadd81a4f51c3df6c3e9060 | [
"MIT"
] | null | null | null | hn_clone/posts/views.py | bkavanagh/dj-hackernews-clone | 543d2774c2b956dd6aadd81a4f51c3df6c3e9060 | [
"MIT"
] | null | null | null | hn_clone/posts/views.py | bkavanagh/dj-hackernews-clone | 543d2774c2b956dd6aadd81a4f51c3df6c3e9060 | [
"MIT"
] | null | null | null | from django.shortcuts import (
render, get_object_or_404,
)
from django.views import generic
from .models import (
Post, Author, Tag
)
class IndexView(generic.ListView):
# model = Post
template_name = 'posts/index.html'
context_object_name = 'posts_list'
... | 22.962963 | 48 | 0.653226 |
2c6dd49259763070f73dde8c3b8bb67174433f99 | 4,131 | py | Python | pyrate/tasks/gamma.py | jlmaurer/PyRate | bf1a3d916f1c83e7a0dda3ecc15858f8f1e4ee84 | [
"Apache-2.0"
] | 1 | 2018-11-01T04:45:19.000Z | 2018-11-01T04:45:19.000Z | pyrate/tasks/gamma.py | bingo456/PyRate | bf1a3d916f1c83e7a0dda3ecc15858f8f1e4ee84 | [
"Apache-2.0"
] | null | null | null | pyrate/tasks/gamma.py | bingo456/PyRate | bf1a3d916f1c83e7a0dda3ecc15858f8f1e4ee84 | [
"Apache-2.0"
] | 1 | 2020-12-31T00:34:35.000Z | 2020-12-31T00:34:35.000Z | # This Python module is part of the PyRate software package.
#
# Copyright 2017 Geoscience Australia
#
# 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/... | 34.425 | 79 | 0.682885 |
76e8628625ed6f460e7592a885d8361499c06016 | 33,421 | py | Python | climatetalk/mdi/thermostat.py | kdschlosser/ClimateTalk | 3b09a45c295cf5228283d7095834e8f133ed7de3 | [
"MIT"
] | 3 | 2021-04-30T20:12:16.000Z | 2022-03-09T11:53:12.000Z | climatetalk/mdi/thermostat.py | kdschlosser/ClimateTalk | 3b09a45c295cf5228283d7095834e8f133ed7de3 | [
"MIT"
] | null | null | null | climatetalk/mdi/thermostat.py | kdschlosser/ClimateTalk | 3b09a45c295cf5228283d7095834e8f133ed7de3 | [
"MIT"
] | 2 | 2021-04-08T18:29:39.000Z | 2021-04-30T20:13:55.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Kevin Schlosser
import datetime
import threading
from ..utils import (
get_bit as _get_bit,
set_bit as _set_bit,
TwosCompliment
)
from ..packet import (
GetConfigurationRequest,
GetStatusRequest
)
from ..commands import (
SystemSwitchModify,
HeatS... | 26.212549 | 81 | 0.611502 |
df272570f222a6e7598bb9c9110ef9a702ebe7c3 | 2,276 | py | Python | code/distance/mmd_numpy_sklearn.py | lw0517/transferlearning | 230df8850b09f896a799ad865072c0164f45fadc | [
"MIT"
] | 9,657 | 2017-05-01T03:29:35.000Z | 2022-03-31T21:25:30.000Z | code/distance/mmd_numpy_sklearn.py | xiaohuihui-com/transferlearning | 17583db86db19709ff483a24590f0d5b88e25fe5 | [
"MIT"
] | 262 | 2017-09-16T09:33:02.000Z | 2022-03-30T05:08:45.000Z | code/distance/mmd_numpy_sklearn.py | xiaohuihui-com/transferlearning | 17583db86db19709ff483a24590f0d5b88e25fe5 | [
"MIT"
] | 3,273 | 2017-05-01T06:28:31.000Z | 2022-03-31T09:57:48.000Z | # Compute MMD (maximum mean discrepancy) using numpy and scikit-learn.
import numpy as np
from sklearn import metrics
def mmd_linear(X, Y):
"""MMD using linear kernel (i.e., k(x,y) = <x,y>)
Note that this is not the original linear MMD, only the reformulated and faster version.
The original version is:
... | 29.558442 | 92 | 0.554921 |
c231f9aa2b633e77d6ede57e27199c53e08e88e7 | 885 | py | Python | tests/test_shard.py | DolphDev/pynationstates-async | b632256636dadeb3abfd5b9dcfea6b72a9beda54 | [
"MIT"
] | null | null | null | tests/test_shard.py | DolphDev/pynationstates-async | b632256636dadeb3abfd5b9dcfea6b72a9beda54 | [
"MIT"
] | null | null | null | tests/test_shard.py | DolphDev/pynationstates-async | b632256636dadeb3abfd5b9dcfea6b72a9beda54 | [
"MIT"
] | null | null | null | import unittest
import nationstates_async as core
class ShardTest(unittest.TestCase):
def test_shard(self):
self.assertEqual(
core.Shard("numnations")._get_main_value(),
"numnations")
def test_shard_tail_gen(self):
self.assertEqual(core.Shard("dispatch", dispatchid="... | 27.65625 | 95 | 0.630508 |
d90b9d9a2c24180c78639f68097d6c11e0ed8d0a | 883 | py | Python | test.py | PGE383-HPC-Students/assignment14 | 76591df940abff818617e9878798ba40bea00fa8 | [
"MIT"
] | null | null | null | test.py | PGE383-HPC-Students/assignment14 | 76591df940abff818617e9878798ba40bea00fa8 | [
"MIT"
] | null | null | null | test.py | PGE383-HPC-Students/assignment14 | 76591df940abff818617e9878798ba40bea00fa8 | [
"MIT"
] | null | null | null | #/usr/bin/env python
#
# Copyright 2020-2021 John T. Foster
#
# 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... | 27.59375 | 74 | 0.722537 |
12f079c8867b07599ae62ec24d2d300a471fdec1 | 5,679 | py | Python | nnef/design_sample.py | lahplover/nnef | dcabf31337e5849593f343e6502fe0b8dc20452e | [
"MIT"
] | 2 | 2021-04-30T06:07:49.000Z | 2021-06-30T06:47:00.000Z | nnef/design_sample.py | lahplover/nnef | dcabf31337e5849593f343e6502fe0b8dc20452e | [
"MIT"
] | null | null | null | nnef/design_sample.py | lahplover/nnef | dcabf31337e5849593f343e6502fe0b8dc20452e | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import torch
from physics.protein_os import Protein
import options
from physics.anneal import AnnealSeq
import os
import h5py
from tqdm import tqdm
from utils import test_setup
"""
do mutations & design for a sample of protein backbones.
"""
###################################... | 37.86 | 120 | 0.652756 |
5e194563bbccd614c6118296f7c6047a96c166cb | 2,310 | py | Python | ipproxytool/spiders/proxy/gatherproxy.py | k1tCooler/himasoft | 546f11aafa9f17c36fc0f3bd98f3df5e4fe154b1 | [
"MIT"
] | null | null | null | ipproxytool/spiders/proxy/gatherproxy.py | k1tCooler/himasoft | 546f11aafa9f17c36fc0f3bd98f3df5e4fe154b1 | [
"MIT"
] | 3 | 2021-03-18T20:24:09.000Z | 2021-12-13T19:44:52.000Z | ipproxytool/spiders/proxy/gatherproxy.py | k1tCooler/himasoft | 546f11aafa9f17c36fc0f3bd98f3df5e4fe154b1 | [
"MIT"
] | null | null | null | # coding=utf-8
import json
import random
import re
import requests
from proxy import Proxy
from .basespider import BaseSpider
class GatherproxySpider(BaseSpider):
name = 'gatherproxy'
def __init__(self, *a, **kwargs):
super(GatherproxySpider, self).__init__(*a, **kwargs)
self.urls = [
... | 31.216216 | 110 | 0.500433 |
36cb5ffc63ed294cf2159a4fc777d17b8cddca33 | 620 | py | Python | tests/swat_config.py | jld23/sasoptpy | f96911f04d6c0c01fce902f1f995935583df69a8 | [
"Apache-2.0"
] | 20 | 2017-12-22T18:29:55.000Z | 2021-09-12T15:04:39.000Z | tests/swat_config.py | jld23/sasoptpy | f96911f04d6c0c01fce902f1f995935583df69a8 | [
"Apache-2.0"
] | 9 | 2019-01-24T14:52:33.000Z | 2022-03-16T14:14:35.000Z | tests/swat_config.py | jld23/sasoptpy | f96911f04d6c0c01fce902f1f995935583df69a8 | [
"Apache-2.0"
] | 12 | 2017-12-22T19:37:16.000Z | 2021-07-30T21:04:03.000Z |
import os
from swat import CAS
import warnings
def create_cas_connection():
cas_args = {'host': os.environ.get('CASHOST'),
'port': int(os.environ.get('CASPORT'))}
authinfo = os.environ.get('AUTHINFO', None)
if authinfo:
cas_args['authinfo'] = authinfo
return CAS(**cas_args)... | 28.181818 | 74 | 0.645161 |
5975cd6fbf0a7ec1c7ad36d0a67bce3fe1ecdabc | 1,083 | py | Python | habitat_baselines/rl/hrl/skills/wait.py | Jiayuan-Gu/habitat-lab | 5ce36a6c6502fe8e86d6732ba8bab9a5db471574 | [
"MIT"
] | null | null | null | habitat_baselines/rl/hrl/skills/wait.py | Jiayuan-Gu/habitat-lab | 5ce36a6c6502fe8e86d6732ba8bab9a5db471574 | [
"MIT"
] | null | null | null | habitat_baselines/rl/hrl/skills/wait.py | Jiayuan-Gu/habitat-lab | 5ce36a6c6502fe8e86d6732ba8bab9a5db471574 | [
"MIT"
] | null | null | null | from typing import Any
import gym.spaces as spaces
import torch
from habitat_baselines.rl.hrl.skills.skill import SkillPolicy
class WaitSkillPolicy(SkillPolicy):
def __init__(
self,
config,
action_space: spaces.Space,
batch_size,
):
super().__init__(config, action_spa... | 24.613636 | 76 | 0.638042 |
5022daad2d61e345ed4f186a89da55d635840af0 | 142 | py | Python | week6-python/hello/hello.py | fahofmeister/cs50x | 022eefa9f25958b115fc2d2a50d34aacbc2b62a5 | [
"MIT"
] | null | null | null | week6-python/hello/hello.py | fahofmeister/cs50x | 022eefa9f25958b115fc2d2a50d34aacbc2b62a5 | [
"MIT"
] | null | null | null | week6-python/hello/hello.py | fahofmeister/cs50x | 022eefa9f25958b115fc2d2a50d34aacbc2b62a5 | [
"MIT"
] | null | null | null | from cs50 import get_string
# This program asks the user name and greets him
name = get_string("What's your name?\n")
print(f"hello, {name}") | 28.4 | 48 | 0.739437 |
3fbbd313309a56c8caaaf05f666e4fd2b5adf402 | 4,275 | py | Python | smacc2_sm_reference_library/sm_aws_warehouse_navigation/launch/localization_launch.py | reelrbtx/SMACC2 | ac61cb1599f215fd9f0927247596796fc53f82bf | [
"Apache-2.0"
] | 48 | 2021-05-28T01:33:20.000Z | 2022-03-24T03:16:03.000Z | smacc2_sm_reference_library/sm_aws_warehouse_navigation/launch/localization_launch.py | reelrbtx/SMACC2 | ac61cb1599f215fd9f0927247596796fc53f82bf | [
"Apache-2.0"
] | 75 | 2021-06-25T22:11:21.000Z | 2022-03-30T13:05:38.000Z | smacc2_sm_reference_library/sm_aws_warehouse_navigation/launch/localization_launch.py | reelrbtx/SMACC2 | ac61cb1599f215fd9f0927247596796fc53f82bf | [
"Apache-2.0"
] | 14 | 2021-06-16T12:10:57.000Z | 2022-03-01T18:23:27.000Z | # Copyright (c) 2018 Intel Corporation
#
# 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... | 38.513514 | 94 | 0.621053 |
7c54f82c2c5891c4e2b9943c6e8c6350b8135c48 | 1,884 | py | Python | linkmap.py | iwanglian/tools | a0f6dec83421b33dcddb2064c0babdb292973feb | [
"MIT"
] | null | null | null | linkmap.py | iwanglian/tools | a0f6dec83421b33dcddb2064c0babdb292973feb | [
"MIT"
] | null | null | null | linkmap.py | iwanglian/tools | a0f6dec83421b33dcddb2064c0babdb292973feb | [
"MIT"
] | null | null | null | if __name__ == '__main__':
import sys, os
filenameArray = []
no_dir = 1
if len(sys.argv) > 1:
# walk around
no_dir = 0
rootDir = sys.argv[2]
for root, dirs, files in os.walk(rootDir):
for filespath in files:
if filespath.endswith(".m") or file... | 33.642857 | 103 | 0.495754 |
aab4290fec3dda7af3c2b2e7f6a1fc3b083b1273 | 902 | py | Python | app/main/models/price.py | kenneth-kip/Kilimo-Smart-API | c0b281f4a5e61731f544e3ed27eeca9ee7615339 | [
"MIT"
] | null | null | null | app/main/models/price.py | kenneth-kip/Kilimo-Smart-API | c0b281f4a5e61731f544e3ed27eeca9ee7615339 | [
"MIT"
] | 2 | 2021-03-31T19:11:06.000Z | 2021-12-13T19:58:50.000Z | app/main/models/price.py | kenneth-kip/Kilimo-Smart-API | c0b281f4a5e61731f544e3ed27eeca9ee7615339 | [
"MIT"
] | null | null | null | """ Price Model """
from datetime import date
from .. import db
class Price(db.Model):
""" Price's Model"""
__tablename__ = "Price"
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
low_price = db.Column(db.Numeric(scale=2), nullable=False)
high_price = db.Column(db.Numeric(scale=... | 39.217391 | 83 | 0.691796 |
ff1c5125869b2c3374e88bada1654a11dbbe0925 | 852 | py | Python | Chinese_remainder_theorem.py | kuzuri-03/Cryptography_Ciphers | e49bb346ea5651bf93530badb4e708a06c14eec7 | [
"MIT"
] | null | null | null | Chinese_remainder_theorem.py | kuzuri-03/Cryptography_Ciphers | e49bb346ea5651bf93530badb4e708a06c14eec7 | [
"MIT"
] | null | null | null | Chinese_remainder_theorem.py | kuzuri-03/Cryptography_Ciphers | e49bb346ea5651bf93530badb4e708a06c14eec7 | [
"MIT"
] | null | null | null | # modular inverse
def inverse_mod(a,b):
x = a
y = b
oldolds = 1
olds = 0
oldoldt = 0
oldt = 1
while y != 0:
q = x // y
r = x % y
x = y
y = r
s = oldolds - q * olds
t = oldoldt - q * oldt
oldolds = olds
oldoldt = oldt
old... | 20.780488 | 45 | 0.444836 |
32c4526838735a013a37354edf4acb9b040cb0d5 | 1,735 | py | Python | guaCaster.py | IanDCarroll/guaCaster | fae81b2707492339091a3eb0e638ef396588c29e | [
"MIT"
] | 3 | 2017-12-03T20:14:25.000Z | 2019-01-22T05:05:02.000Z | guaCaster.py | IanDCarroll/guaCaster | fae81b2707492339091a3eb0e638ef396588c29e | [
"MIT"
] | null | null | null | guaCaster.py | IanDCarroll/guaCaster | fae81b2707492339091a3eb0e638ef396588c29e | [
"MIT"
] | null | null | null | import wtnDice
import guaNames
def castYao():
#todo adjust tp call a wtnDice.di['totl'] getter method
cast = wtnDice.roll(3,2,{},[])
return cast
def idGua(guaCode):
jiuGua = 0 #Old situation
yiGua = 0 #The situation which affects the change
xinGua = 0 #New situation
for i in range(0,6): #Upper Trigram
... | 26.692308 | 57 | 0.588473 |
467c1da5b719d25c6e853475c1c02d8fe2e4583c | 1,465 | py | Python | tests/dao/redis/test_sliding_window_rate_limiter.py | 4heck/ru102py | 1961965f283b014b46e9618464ec1df6d9e6b03b | [
"MIT"
] | null | null | null | tests/dao/redis/test_sliding_window_rate_limiter.py | 4heck/ru102py | 1961965f283b014b46e9618464ec1df6d9e6b03b | [
"MIT"
] | null | null | null | tests/dao/redis/test_sliding_window_rate_limiter.py | 4heck/ru102py | 1961965f283b014b46e9618464ec1df6d9e6b03b | [
"MIT"
] | null | null | null | import time
import pytest
from redisolar.dao.base import RateLimitExceededException
from redisolar.dao.redis.sliding_window_rate_limiter import SlidingWindowRateLimiter
TEN_SECONDS = 10 * 1000
# Challenge #7
# @pytest.mark.skip("Remove for challenge #7")
def test_within_limit_inside_window(redis, key_schema):
e... | 26.160714 | 85 | 0.702389 |
784e56e7a3eb629a13274844419291d632014029 | 1,238 | py | Python | prediction/app.py | PauBatlle/NewsMultirank | 30f2f050bafdab1bf3902deac17c18ad5af648c0 | [
"Apache-2.0"
] | null | null | null | prediction/app.py | PauBatlle/NewsMultirank | 30f2f050bafdab1bf3902deac17c18ad5af648c0 | [
"Apache-2.0"
] | null | null | null | prediction/app.py | PauBatlle/NewsMultirank | 30f2f050bafdab1bf3902deac17c18ad5af648c0 | [
"Apache-2.0"
] | 1 | 2018-02-24T04:34:27.000Z | 2018-02-24T04:34:27.000Z | from flask import Flask, request, Response
from flask_cors import CORS
from predict import doPredict
import logging
from logging.handlers import RotatingFileHandler
from IPython import embed
app = Flask(__name__)
CORS(app)
@app.route('/', methods=['POST'])
def main():
aux = request.values
#embed()
print(len(reques... | 25.791667 | 85 | 0.692246 |
d88c79b5dc80e2ef528359116f99c915c4391a23 | 551 | py | Python | QucikSort_first.py | JhoLee/Algorithm | ae3db61ee8974e54ff4d6a15d0b6822353392339 | [
"Apache-2.0"
] | null | null | null | QucikSort_first.py | JhoLee/Algorithm | ae3db61ee8974e54ff4d6a15d0b6822353392339 | [
"Apache-2.0"
] | null | null | null | QucikSort_first.py | JhoLee/Algorithm | ae3db61ee8974e54ff4d6a15d0b6822353392339 | [
"Apache-2.0"
] | null | null | null | """
김용승 교수님의 알고리즘을 그대로 구현
"""
def QuickSort(R, m, n):
if(m < n):
i = m
j = n + 1
while(1):
while(i < len(R) and R[i]>=R[m]):
i =i + 1
while(j < len(R) and R[j]<=R[m]):
j = j - 1
if (i < j):
R[... | 19 | 46 | 0.328494 |
18b0786e4c0aa62029941c668570d0479d971bee | 181 | py | Python | dispike/errors/warnings.py | mitsuaky/dispike | bd3ffb28fc03307077d647ee233f4f0e5c594434 | [
"MIT"
] | 41 | 2020-12-29T03:07:38.000Z | 2022-01-30T09:05:03.000Z | dispike/errors/warnings.py | mitsuaky/dispike | bd3ffb28fc03307077d647ee233f4f0e5c594434 | [
"MIT"
] | 66 | 2020-12-28T08:04:27.000Z | 2021-11-04T09:12:54.000Z | dispike/errors/warnings.py | mitsuaky/dispike | bd3ffb28fc03307077d647ee233f4f0e5c594434 | [
"MIT"
] | 11 | 2021-01-21T22:36:34.000Z | 2021-11-04T07:23:30.000Z | class InsecureBindingWithCustomHostWarning(UserWarning):
"""
This warning is issued when a user binds to a ip address other than 127.0.0.1
ip address.
"""
pass
| 22.625 | 81 | 0.690608 |
24143f5a3bbe148a5db33d504fb888c9c6f86d54 | 224 | py | Python | ashwintest/test_emuegde.py | akrishna1995/emuedge | d33845107be3c9bbfcaf030df0a989e9d4972743 | [
"MIT"
] | null | null | null | ashwintest/test_emuegde.py | akrishna1995/emuedge | d33845107be3c9bbfcaf030df0a989e9d4972743 | [
"MIT"
] | null | null | null | ashwintest/test_emuegde.py | akrishna1995/emuedge | d33845107be3c9bbfcaf030df0a989e9d4972743 | [
"MIT"
] | null | null | null | #! /usr/bin/python
import sys
import os
from .. import xen
def main():
print "Hello World"
xnet=xen.test_topo(topo='exps/twoway_simple.topo', start=True, nolog=False)
if __name__ == "__main__" :
sys.exit(main())
| 18.666667 | 78 | 0.683036 |
8c4c73d2194874a13185fa478372838e4d8eb696 | 4,415 | py | Python | tplinker/metrics.py | luozhouyang/TPLinker | 3cacf48901f73a4d4e90ed51d8d5bbf8aecb5a02 | [
"Apache-2.0"
] | 8 | 2021-05-03T02:06:05.000Z | 2022-03-25T09:35:32.000Z | tplinker/metrics.py | anatanick/TPLinker | 3cacf48901f73a4d4e90ed51d8d5bbf8aecb5a02 | [
"Apache-2.0"
] | 1 | 2021-05-01T08:03:45.000Z | 2021-05-14T09:39:45.000Z | tplinker/metrics.py | anatanick/TPLinker | 3cacf48901f73a4d4e90ed51d8d5bbf8aecb5a02 | [
"Apache-2.0"
] | 4 | 2021-04-14T19:45:29.000Z | 2022-03-28T01:58:35.000Z | import json
import pytorch_lightning as pl
import torch
from torchmetrics import Metric
from tplinker.tagging_scheme import HandshakingTaggingDecoder, TagMapping
class SampleAccuracy(Metric):
def __init__(self):
super().__init__()
self.add_state('correct', default=torch.tensor(0), dist_reduce_f... | 39.419643 | 132 | 0.588675 |
d0975e773b7a5bf7c61638051e6ee01a3d3b8f2b | 89,520 | py | Python | src/sage/schemes/riemann_surfaces/riemann_surface.py | ChamanAgrawal/sage | 5f6d56ba247b352d7d46442e88fa3a027e9f222d | [
"BSL-1.0"
] | 2 | 2019-06-02T03:16:59.000Z | 2019-06-15T10:17:18.000Z | src/sage/schemes/riemann_surfaces/riemann_surface.py | ChamanAgrawal/sage | 5f6d56ba247b352d7d46442e88fa3a027e9f222d | [
"BSL-1.0"
] | null | null | null | src/sage/schemes/riemann_surfaces/riemann_surface.py | ChamanAgrawal/sage | 5f6d56ba247b352d7d46442e88fa3a027e9f222d | [
"BSL-1.0"
] | 1 | 2019-06-02T03:16:55.000Z | 2019-06-02T03:16:55.000Z | r"""
Riemann matrices and endomorphism rings of algebraic Riemann surfaces
This module provides a class, RiemannSurface, to model the Riemann surface
determined by a plane algebraic curve over a subfield of the complex numbers.
A homology basis is derived from the edges of a Voronoi cell decomposition based
on the br... | 39.610619 | 123 | 0.575983 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.