hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2db0de7d99dab58dd9d282ebc3d215943b2f8e91 | 11,644 | py | Python | fedot/core/pipelines/ts_wrappers.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 358 | 2020-06-11T09:34:53.000Z | 2022-03-31T12:56:22.000Z | fedot/core/pipelines/ts_wrappers.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 467 | 2020-06-11T13:49:45.000Z | 2022-03-31T14:19:48.000Z | fedot/core/pipelines/ts_wrappers.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 48 | 2020-07-13T14:50:45.000Z | 2022-03-26T09:37:13.000Z | from copy import copy
from typing import Union
import numpy as np
from fedot.core.data.data import InputData, OutputData
from fedot.core.data.multi_modal import MultiModalData
from fedot.core.operations.evaluation.operation_implementations.data_operations.ts_transformations import ts_to_table
from fedot.core.reposito... | 40.151724 | 117 | 0.678976 |
2db0e95b196509a3caadb40a0fe4694158c6f5c4 | 1,719 | py | Python | src/test/data/tasks/make_targets.py | benw1/WINGS | 32d4bfd073da0b86d2340cde25a5601d0a1ec95e | [
"RSA-MD"
] | 4 | 2022-01-04T18:24:56.000Z | 2022-01-27T08:23:37.000Z | src/test/data/tasks/make_targets.py | benw1/WINGS | 32d4bfd073da0b86d2340cde25a5601d0a1ec95e | [
"RSA-MD"
] | null | null | null | src/test/data/tasks/make_targets.py | benw1/WINGS | 32d4bfd073da0b86d2340cde25a5601d0a1ec95e | [
"RSA-MD"
] | null | null | null | #! /usr/bin/env python
import os
import wpipe as wp
def register(task):
_temp = task.mask(source='*', name='start', value=task.name)
_temp = task.mask(source='*', name='__init__', value='*')
if __name__ == '__main__':
my_pipe = wp.Pipeline()
my_job = wp.Job()
my_job.logprint("Preparing targets")... | 47.75 | 97 | 0.518325 |
2db13ceaa7a62e6c2f67ea74e7cb0d56af24a1ca | 17,486 | py | Python | dashboard/views.py | StevenZZJ/dataQualityDashboard | c2604904d50346d73d4353bb007122ad7b547555 | [
"MIT"
] | null | null | null | dashboard/views.py | StevenZZJ/dataQualityDashboard | c2604904d50346d73d4353bb007122ad7b547555 | [
"MIT"
] | null | null | null | dashboard/views.py | StevenZZJ/dataQualityDashboard | c2604904d50346d73d4353bb007122ad7b547555 | [
"MIT"
] | null | null | null | import json
import random
from django.utils.safestring import SafeString
# debug
'''
1. Step 1: Put your libraries in the same directory as views.py
2. Step 2: Import your libraries here with a '.'
'''
from .completeness_class import *
from .outlier import *
from .IntegrateFunction import *
from dashboard.forms impo... | 43.282178 | 120 | 0.555873 |
2db145762c6163eb6c0d84675b698c54b24994b9 | 75 | py | Python | cubelang/__main__.py | poletaevvlad/CubeLang | 06f34e7204f4656589eb33c4afe660383704861f | [
"MIT"
] | 1 | 2019-12-04T04:02:11.000Z | 2019-12-04T04:02:11.000Z | cubelang/__main__.py | poletaevvlad/CubeLang | 06f34e7204f4656589eb33c4afe660383704861f | [
"MIT"
] | null | null | null | cubelang/__main__.py | poletaevvlad/CubeLang | 06f34e7204f4656589eb33c4afe660383704861f | [
"MIT"
] | null | null | null | from cubelang.cli.entry import main
if __name__ == "__main__":
main()
| 15 | 35 | 0.693333 |
2db1629c9e64992538aa116ac3e8e1811fef4e21 | 1,749 | py | Python | carla/models/catalog/Linear_TF/model_linear.py | jayanthyetukuri/CARLA | c3f3aaf11a5a8499c4bec5065e0c17ec8e6f5950 | [
"MIT"
] | 140 | 2021-08-03T21:53:32.000Z | 2022-03-20T08:52:02.000Z | carla/models/catalog/Linear_TF/model_linear.py | jayanthyetukuri/CARLA | c3f3aaf11a5a8499c4bec5065e0c17ec8e6f5950 | [
"MIT"
] | 19 | 2021-08-09T15:03:38.000Z | 2022-03-22T08:37:46.000Z | carla/models/catalog/Linear_TF/model_linear.py | jayanthyetukuri/CARLA | c3f3aaf11a5a8499c4bec5065e0c17ec8e6f5950 | [
"MIT"
] | 16 | 2021-08-23T12:14:58.000Z | 2022-03-01T00:52:58.000Z | from keras.layers import Dense
from keras.models import Sequential
from keras.utils import to_categorical
class LinearModel:
def __init__(self, dim_input, num_of_classes, data_name):
"""
Parameters
----------
dim_input: int > 0
number of neurons for this layer
... | 24.291667 | 87 | 0.543168 |
2db1d433bce0d0f66f2e864fc5e4f77ca22bacd3 | 1,003 | py | Python | cv-lab9/create_pyramid.py | TroddenSpade/Computer-Vision-notes | 3d16b37a8ed577af821d9dae11864ee8e0b82c73 | [
"MIT"
] | 1 | 2021-08-31T18:57:26.000Z | 2021-08-31T18:57:26.000Z | cv-lab9/create_pyramid.py | TroddenSpade/Computer-Vision-notes | 3d16b37a8ed577af821d9dae11864ee8e0b82c73 | [
"MIT"
] | 1 | 2021-08-25T09:44:15.000Z | 2021-08-25T09:44:15.000Z | cv-lab9/create_pyramid.py | TroddenSpade/Computer-Vision-notes | 3d16b37a8ed577af821d9dae11864ee8e0b82c73 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
I = cv2.imread('karimi.jpg')
m,n,_ = I.shape
P1 = np.array([[0,0], [0, m-1], [n-1,0], [n-1,m-1]])
psize = 7 # size of the pyramid (no. of levels)
# building the pyramid
J = np.ones((600,500,3), dtype=np.uint8)*255
m2,n2,_ = J.shape
v = np.array([(n2//2,0)])
P2 = np.array([(0,4*m2//5... | 20.06 | 62 | 0.482552 |
2db1d5830d1d33eb933d69e47cd488fbfe914cbf | 2,482 | py | Python | spec/config.py | jmvrbanac/ansible-flow | 666dc3664ed8001640d50c0e00d749f44f16826f | [
"Apache-2.0"
] | 13 | 2015-12-03T10:41:13.000Z | 2020-01-05T16:22:42.000Z | spec/config.py | jmvrbanac/ansible-flow | 666dc3664ed8001640d50c0e00d749f44f16826f | [
"Apache-2.0"
] | 2 | 2015-12-17T22:16:53.000Z | 2016-05-30T01:20:59.000Z | spec/config.py | jmvrbanac/ansible-flow | 666dc3664ed8001640d50c0e00d749f44f16826f | [
"Apache-2.0"
] | 6 | 2015-12-09T21:38:55.000Z | 2020-02-24T21:15:06.000Z | from ansibleflow import config
from specter import Spec, expect
def build_target_obj(overrides=None):
target_dict = {
'playbooks': ['play.yml'],
'inventory': 'inventory.ini',
'tags': 'nope',
'ansible-options': '-vvvv',
}
if overrides:
target_dict.update(overrides)
... | 31.025 | 68 | 0.62772 |
2db1dd9ff84c5e13a4ec754e923a33566c7e0999 | 421 | py | Python | runtests.py | rsalmaso/django-rest-caller | 234475d1baeb5ae92fbaa86798c1e9260eeff8f1 | [
"MIT"
] | null | null | null | runtests.py | rsalmaso/django-rest-caller | 234475d1baeb5ae92fbaa86798c1e9260eeff8f1 | [
"MIT"
] | null | null | null | runtests.py | rsalmaso/django-rest-caller | 234475d1baeb5ae92fbaa86798c1e9260eeff8f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
def runtests():
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
django.setup()
TestRunner = get_runner(settings)
test_runner = TestRunner()
failures = test_... | 19.136364 | 59 | 0.714964 |
2db217429237eb552e4502ed9b646d4e370756eb | 5,234 | py | Python | relation/rblock_efficient.py | hackerekcah/ESRelation | 6aa1e4bcb04c90fca79a125cc128481155da54a1 | [
"MIT"
] | null | null | null | relation/rblock_efficient.py | hackerekcah/ESRelation | 6aa1e4bcb04c90fca79a125cc128481155da54a1 | [
"MIT"
] | null | null | null | relation/rblock_efficient.py | hackerekcah/ESRelation | 6aa1e4bcb04c90fca79a125cc128481155da54a1 | [
"MIT"
] | null | null | null | from torch import nn
from .scaled_softmax import ScaledSoftmax
from .perplexity_entropy import calc_relation_structure
import torch
import torch.nn.functional as F
from . import register_rblock
@register_rblock('RBlockEfficient')
class RBlockEfficient(nn.Module):
def __init__(self,
in_channels,
... | 37.120567 | 99 | 0.570692 |
2db265f11d663aacfe86439c5a800cb0b8ad9995 | 2,781 | py | Python | remo/base/tasks.py | acidburn0zzz/remo | caa7adc40928d7f83475cf4bd78f8d609967bc87 | [
"BSD-3-Clause"
] | 1 | 2018-04-05T13:29:30.000Z | 2018-04-05T13:29:30.000Z | remo/base/tasks.py | acidburn0zzz/remo | caa7adc40928d7f83475cf4bd78f8d609967bc87 | [
"BSD-3-Clause"
] | 3 | 2021-03-20T05:31:34.000Z | 2021-06-10T23:43:06.000Z | remo/base/tasks.py | Acidburn0zzz/remo | caa7adc40928d7f83475cf4bd78f8d609967bc87 | [
"BSD-3-Clause"
] | null | null | null | from django import forms
from django.conf import settings
from django.contrib.auth.models import User
from django.core.mail import EmailMessage
from django.core.validators import validate_email
from django.template.loader import render_to_string
import requests
from remo.celery import app
@app.task
def send_remo_ma... | 31.965517 | 87 | 0.615965 |
2db27f3d3f5136f87683f979e239cd4e76c509d8 | 11,195 | py | Python | tests/test_mock_methods.py | lgwillmore/typemock | cbde9e8f1388785998b72ee8d0420f083eaeea7c | [
"MIT"
] | 8 | 2019-06-11T12:16:06.000Z | 2022-03-22T12:58:30.000Z | tests/test_mock_methods.py | lgwillmore/type-mock | cbde9e8f1388785998b72ee8d0420f083eaeea7c | [
"MIT"
] | 7 | 2019-06-16T19:16:46.000Z | 2020-12-08T20:44:02.000Z | tests/test_mock_methods.py | lgwillmore/type-mock | cbde9e8f1388785998b72ee8d0420f083eaeea7c | [
"MIT"
] | 1 | 2022-03-22T13:00:03.000Z | 2022-03-22T13:00:03.000Z | from typing import Dict, Any, List
from unittest import TestCase
from typemock import tmock, when, verify, match
from typemock.api import NoBehaviourSpecifiedError
class NestedThing:
nested_att: str = "internal"
class MyThing:
def return_a_str(self) -> str:
pass
def convert_int_to_str(self, nu... | 38.47079 | 116 | 0.624297 |
2db2a335c797d5ce10216ce9e0c4d03317b359b5 | 9,597 | py | Python | airflow/providers/ftp/hooks/ftp.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | 1 | 2021-03-03T07:00:02.000Z | 2021-03-03T07:00:02.000Z | airflow/providers/ftp/hooks/ftp.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | 36 | 2021-11-26T00:08:49.000Z | 2021-11-26T00:09:33.000Z | airflow/providers/ftp/hooks/ftp.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | 3 | 2020-06-30T02:38:17.000Z | 2022-01-19T06:14:08.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 33.322917 | 88 | 0.625091 |
2db2d369820ed0dfd784b049ae2af237d4a4072f | 803 | py | Python | urls.py | dpfried/mocs | d594a47c2e3125a30fe14c2bc646d0e0614cb8b2 | [
"MIT"
] | 8 | 2016-05-31T09:54:15.000Z | 2021-08-13T13:25:01.000Z | urls.py | dpfried/mocs | d594a47c2e3125a30fe14c2bc646d0e0614cb8b2 | [
"MIT"
] | null | null | null | urls.py | dpfried/mocs | d594a47c2e3125a30fe14c2bc646d0e0614cb8b2 | [
"MIT"
] | 10 | 2015-01-07T06:45:44.000Z | 2021-06-21T08:41:57.000Z | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('... | 33.458333 | 71 | 0.657534 |
2db30397287ca6d454e09b6fe2c20946dc2eb168 | 782 | py | Python | tutorials/scripts/12_NAS_LSTM/dh_project/dh_project/lstm_search/problem.py | minesweeter/tutorials | 2af710a2607f455759dfa6a3c97e6d8e8471689d | [
"BSD-2-Clause"
] | 1 | 2021-09-04T16:59:30.000Z | 2021-09-04T16:59:30.000Z | tutorials/scripts/12_NAS_LSTM/dh_project/dh_project/lstm_search/problem.py | minesweeter/tutorials | 2af710a2607f455759dfa6a3c97e6d8e8471689d | [
"BSD-2-Clause"
] | 2 | 2021-11-12T14:29:03.000Z | 2022-01-31T09:16:06.000Z | tutorials/scripts/12_NAS_LSTM/dh_project/dh_project/lstm_search/problem.py | minesweeter/tutorials | 2af710a2607f455759dfa6a3c97e6d8e8471689d | [
"BSD-2-Clause"
] | 4 | 2021-08-08T18:28:50.000Z | 2022-02-11T20:38:38.000Z | from deephyper.problem import NaProblem
from dh_project.lstm_search.load_data import load_data
from dh_project.lstm_search.search_space import create_search_space
Problem = NaProblem(seed=2019)
Problem.load_data(load_data)
Problem.search_space(create_search_space, num_layers=5)
Problem.hyperparameters(
batch_si... | 22.342857 | 99 | 0.703325 |
2db3084648ec4ded4c8f4d277fc4ba333ea637ac | 10,724 | py | Python | doozerlib/gitdata.py | vfreex/doozer | 8ad0a1234120cdc30890afbbdda1bc40e4a4fc76 | [
"Apache-2.0"
] | null | null | null | doozerlib/gitdata.py | vfreex/doozer | 8ad0a1234120cdc30890afbbdda1bc40e4a4fc76 | [
"Apache-2.0"
] | null | null | null | doozerlib/gitdata.py | vfreex/doozer | 8ad0a1234120cdc30890afbbdda1bc40e4a4fc76 | [
"Apache-2.0"
] | null | null | null | # This file is part of gitdata project <https://github.com/adammhaile/gitdata>
# and released under LGPL v3 <https://www.gnu.org/licenses/lgpl-3.0.en.html>
from __future__ import absolute_import, print_function, unicode_literals
from future import standard_library
standard_library.install_aliases()
import yaml
import ... | 41.405405 | 139 | 0.549049 |
2db30acbd1c4f3d0858a4871ed8eba1c3159dae3 | 465 | py | Python | hedweb/constants/file_constants.py | hed-standard/hed-web | 8603526266dff78cf07e49e6c0f0c715a9225289 | [
"MIT"
] | null | null | null | hedweb/constants/file_constants.py | hed-standard/hed-web | 8603526266dff78cf07e49e6c0f0c715a9225289 | [
"MIT"
] | null | null | null | hedweb/constants/file_constants.py | hed-standard/hed-web | 8603526266dff78cf07e49e6c0f0c715a9225289 | [
"MIT"
] | 2 | 2022-02-04T19:55:40.000Z | 2022-02-04T21:36:04.000Z | BYTE_LIMIT = -1
TEXT_EXTENSION = '.txt'
TSV_EXTENSION = '.tsv'
SPREADSHEET_EXTENSIONS = ['.xlsx', '.txt', '.tsv']
EXCEL_FILE_EXTENSIONS = ['.xlsx']
EXCEL_EXTENSION = '.xlsx'
SIDECAR_FILE_EXTENSIONS = ['.json']
TEXT_FILE_EXTENSIONS = ['.txt', '.tsv']
SCHEMA_WIKI_EXTENSION = '.mediawiki'
SCHEMA_XML_EXTENSION = '... | 35.769231 | 70 | 0.709677 |
2db31b2d3856747ea28627058c5848890aaca4db | 1,171 | py | Python | arena/event_loop/worker.py | DaAwesomeP/ARENA-py | 876a6b0c6800d7c2b1a592fd5f25529b9c140efc | [
"BSD-3-Clause"
] | 4 | 2021-01-22T23:49:52.000Z | 2022-03-04T06:01:18.000Z | arena/event_loop/worker.py | DaAwesomeP/ARENA-py | 876a6b0c6800d7c2b1a592fd5f25529b9c140efc | [
"BSD-3-Clause"
] | 50 | 2020-08-14T22:24:36.000Z | 2022-03-18T20:41:12.000Z | arena/event_loop/worker.py | DaAwesomeP/ARENA-py | 876a6b0c6800d7c2b1a592fd5f25529b9c140efc | [
"BSD-3-Clause"
] | 10 | 2019-10-28T20:15:18.000Z | 2021-06-29T18:02:06.000Z | import signal, os
import asyncio
import traceback
class Worker(object):
"""
Wrapper for async function for single ARENA tasks.
"""
def __init__(self, event_loop, func, event=None, *args, **kwargs):
self.event_loop = event_loop
self.func = func
self.event = event
self.arg... | 30.025641 | 79 | 0.623399 |
2db32f3bdc7961c83d05ae9c16a9bbaf7b9b8ade | 37,148 | py | Python | pycryptoki/cryptoki/__init__.py | nondejus/pycryptoki | 5dbc9fe6b1d17b2bc52a3e91a01abcd0ddc2b0e3 | [
"Apache-2.0"
] | null | null | null | pycryptoki/cryptoki/__init__.py | nondejus/pycryptoki | 5dbc9fe6b1d17b2bc52a3e91a01abcd0ddc2b0e3 | [
"Apache-2.0"
] | null | null | null | pycryptoki/cryptoki/__init__.py | nondejus/pycryptoki | 5dbc9fe6b1d17b2bc52a3e91a01abcd0ddc2b0e3 | [
"Apache-2.0"
] | null | null | null | """
Definitions of PKCS11 types and Function bindings.
"""
# Included because I know there are places that import & use ctypes from the old
# cryptoki.py
# noinspection PyUnresolvedReferences
from ctypes import *
from pycryptoki.cryptoki._ck_func_list import *
from pycryptoki.cryptoki.c_defs import *
from pycryptoki.... | 31.777588 | 80 | 0.74965 |
2db3375fafe7172b34ff07a3d3388eeebe26e3d7 | 24,400 | py | Python | mesonbuild/mparser.py | felipeborges/meson | 74ae71903370da0f7cd0049af8dd83f0afd68bf8 | [
"Apache-2.0"
] | null | null | null | mesonbuild/mparser.py | felipeborges/meson | 74ae71903370da0f7cd0049af8dd83f0afd68bf8 | [
"Apache-2.0"
] | null | null | null | mesonbuild/mparser.py | felipeborges/meson | 74ae71903370da0f7cd0049af8dd83f0afd68bf8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014-2017 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agree... | 35.260116 | 221 | 0.548648 |
2db33aef1c5ea37dfbf8d20e438130a7a8999a2f | 1,591 | py | Python | tests/common/test_run/ascend/erfc_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_run/ascend/erfc_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_run/ascend/erfc_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 38.804878 | 74 | 0.728473 |
2db39a449527a6ce36f1732fedce706b9427b9f7 | 29,260 | py | Python | impacket/dcerpc/v5/dcom/oaut.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/dcerpc/v5/dcom/oaut.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/dcerpc/v5/dcom/oaut.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | 1 | 2022-01-28T00:53:41.000Z | 2022-01-28T00:53:41.000Z | # Copyright (c) 2003-2014 CORE Security Technologies
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Author: Alberto Solino
#
# Description:
# [MS-OAUT]: OLE Automation Protocol Implementation
# ... | 25.180723 | 267 | 0.597368 |
2db39d7a1b9e680da6e9049b7f8232cdcc8674da | 991 | py | Python | var/spack/repos/builtin/packages/r-globals/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/r-globals/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2021-01-08T22:23:53.000Z | 2022-03-30T11:08:17.000Z | var/spack/repos/builtin/packages/r-globals/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RGlobals(RPackage):
"""Identifies global ("unknown" or "free") objects in R expressions by... | 41.291667 | 96 | 0.730575 |
2db3a0bdb86f372a565beb6985a243e383d4d425 | 4,401 | py | Python | mouse_controller.py | File5/python-ds4 | 7cfed49696a20ceacd812d379ec603ed8e7965f7 | [
"MIT"
] | null | null | null | mouse_controller.py | File5/python-ds4 | 7cfed49696a20ceacd812d379ec603ed8e7965f7 | [
"MIT"
] | null | null | null | mouse_controller.py | File5/python-ds4 | 7cfed49696a20ceacd812d379ec603ed8e7965f7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 Aleksandr Zuev <zuev08@gmail.com>
#
# Distributed under terms of the MIT license.
from collections import defaultdict
import pygame
import mouse
from controller import Controller as JoystickController
class MouseControllerEventHandler:
"""Cont... | 33.340909 | 96 | 0.630993 |
2db3a102547b99daf725a74447440bc6e081f42d | 50 | py | Python | galah/sheep/components/__init__.py | brownhead/galah | f4475c49c920fcebbcb96636385f23863dc1e4c2 | [
"MIT"
] | 1 | 2021-01-03T00:23:56.000Z | 2021-01-03T00:23:56.000Z | galah/sheep/components/__init__.py | itsjohncs/galah | f4475c49c920fcebbcb96636385f23863dc1e4c2 | [
"MIT"
] | null | null | null | galah/sheep/components/__init__.py | itsjohncs/galah | f4475c49c920fcebbcb96636385f23863dc1e4c2 | [
"MIT"
] | 1 | 2016-12-21T19:54:41.000Z | 2016-12-21T19:54:41.000Z | import consumer
import maintainer
import producer
| 12.5 | 17 | 0.88 |
2db3ab91b3730adb1926abfdae8685c17b07c2d0 | 546 | py | Python | supriya/ugens/BufRateScale.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/BufRateScale.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/BufRateScale.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | import collections
from supriya import CalculationRate
from supriya.ugens.BufInfoUGenBase import BufInfoUGenBase
class BufRateScale(BufInfoUGenBase):
"""
A buffer sample-rate scale info unit generator.
::
>>> supriya.ugens.BufRateScale.kr(buffer_id=0)
BufRateScale.kr()
"""
###... | 21.84 | 80 | 0.721612 |
2db3d2bc7417e74ee5a383061c67bcbf3813ea57 | 2,762 | py | Python | src/main/python/programmingtheiot/common/ResourceNameEnum.py | Nitinsd96/Air-Pollution-Monitoring-System | 4870223ce7b40b4ea465620a4c3d39cf617c6eff | [
"MIT"
] | null | null | null | src/main/python/programmingtheiot/common/ResourceNameEnum.py | Nitinsd96/Air-Pollution-Monitoring-System | 4870223ce7b40b4ea465620a4c3d39cf617c6eff | [
"MIT"
] | null | null | null | src/main/python/programmingtheiot/common/ResourceNameEnum.py | Nitinsd96/Air-Pollution-Monitoring-System | 4870223ce7b40b4ea465620a4c3d39cf617c6eff | [
"MIT"
] | null | null | null | #####
#
# This class is part of the Programming the Internet of Things
# project, and is available via the MIT License, which can be
# found in the LICENSE file at the top level of this repository.
#
# You may find it more helpful to your design to adjust the
# functionality, constants and interfaces (if there are an... | 41.223881 | 80 | 0.784576 |
2db3f169c6b8edc1c8319eb41165c588fa8f1af8 | 1,380 | py | Python | talks-articles/languages-n-runtimes/python/terminal-whisper/netcat-sample.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 37 | 2015-02-01T23:16:39.000Z | 2021-12-22T16:50:48.000Z | talks-articles/languages-n-runtimes/python/terminal-whisper/netcat-sample.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 1 | 2017-03-02T04:55:48.000Z | 2018-01-14T10:51:11.000Z | talks-articles/languages-n-runtimes/python/terminal-whisper/netcat-sample.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 15 | 2015-03-02T08:09:01.000Z | 2021-06-10T03:25:41.000Z | #!/usr/bin/env python3
## netcat -lv -s 127.0.0.1 -p 8080
import socket, time
def connect():
s = socket.socket()
s.connect(('localhost', 8080))
return s
def publish_with_delay(txt):
conn.send(b"%s" % txt)
time.sleep(0.5)
def line_demo(conn):
publish_with_delay("this is a text")
publish_... | 25.090909 | 71 | 0.652174 |
2db407badb3a505501e37055733e79fb58767350 | 913 | py | Python | test/test_user.py | atlanticwave-sdx/sdx-controller-client | 426453bf84e9522e857fd78139bb63429b9091cc | [
"MIT"
] | null | null | null | test/test_user.py | atlanticwave-sdx/sdx-controller-client | 426453bf84e9522e857fd78139bb63429b9091cc | [
"MIT"
] | null | null | null | test/test_user.py | atlanticwave-sdx/sdx-controller-client | 426453bf84e9522e857fd78139bb63429b9091cc | [
"MIT"
] | null | null | null | # coding: utf-8
"""
SDX-Controller
You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501
OpenAPI spec version: 1.0.0
Contact: yxin@renci.org
Generated by: https://github.com/swagger-api/swagger-code... | 22.825 | 156 | 0.673604 |
2db420fbf509b1b7a125fc8402dc2d89ab7337e4 | 5,001 | py | Python | src/modules/clstm.py | imatge-upc/rvos-mots | 38dd9d552685e5e685903c2154097917444b2676 | [
"BSD-3-Clause"
] | 6 | 2020-09-29T12:35:34.000Z | 2021-11-24T02:56:22.000Z | src/modules/clstm.py | imatge-upc/rvos-mots | 38dd9d552685e5e685903c2154097917444b2676 | [
"BSD-3-Clause"
] | null | null | null | src/modules/clstm.py | imatge-upc/rvos-mots | 38dd9d552685e5e685903c2154097917444b2676 | [
"BSD-3-Clause"
] | 1 | 2020-11-16T06:24:34.000Z | 2020-11-16T06:24:34.000Z | import torch
from torch import nn
import torch.nn.functional as f
from torch.autograd import Variable
class ConvLSTMCell(nn.Module):
"""
Generate a convolutional LSTM cell
"""
def __init__(self, args, input_size, hidden_size, kernel_size, padding):
super(ConvLSTMCell,self).__init__()
... | 36.772059 | 109 | 0.623075 |
2db42c46910ec9f9cca1a44157400dd2a876c925 | 966 | py | Python | src/gafaelfawr/schema/__init__.py | lsst-sqre/gafaelfawr | 5d965e9d7901987ef041fd341637d75407b55227 | [
"MIT"
] | null | null | null | src/gafaelfawr/schema/__init__.py | lsst-sqre/gafaelfawr | 5d965e9d7901987ef041fd341637d75407b55227 | [
"MIT"
] | 155 | 2020-05-29T17:21:13.000Z | 2022-03-28T19:55:52.000Z | src/gafaelfawr/schema/__init__.py | lsst-sqre/gafaelfawr | 5d965e9d7901987ef041fd341637d75407b55227 | [
"MIT"
] | 3 | 2021-04-26T18:02:58.000Z | 2022-02-03T01:29:13.000Z | """All database schema objects."""
from __future__ import annotations
from typing import TYPE_CHECKING
from gafaelfawr.schema.admin import Admin
from gafaelfawr.schema.admin_history import AdminHistory
from gafaelfawr.schema.base import Base
from gafaelfawr.schema.subtoken import Subtoken
from gafaelfawr.schema.toke... | 25.421053 | 69 | 0.763975 |
2db431cbb493a90b63b6bbde0a558474acb9a065 | 5,031 | py | Python | tests/st/ops/ascend/vector/test_maxpool_grad_with_argmax_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/st/ops/ascend/vector/test_maxpool_grad_with_argmax_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/st/ops/ascend/vector/test_maxpool_grad_with_argmax_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 40.248 | 98 | 0.561916 |
2db448e9c8f85c841c8676c0046361f02dae3c75 | 1,025 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/registry_usage_list_result.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/registry_usage_list_result.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/registry_usage_list_result.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 34.166667 | 76 | 0.603902 |
2db46b02db40d1c85b172db19fccc054e94c7fc7 | 8,541 | py | Python | homeassistant/components/nederlandse_spoorwegen/sensor.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2021-09-29T20:33:32.000Z | 2021-09-29T20:33:32.000Z | homeassistant/components/nederlandse_spoorwegen/sensor.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:31:36.000Z | 2022-03-12T01:00:03.000Z | homeassistant/components/nederlandse_spoorwegen/sensor.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for Nederlandse Spoorwegen public transport."""
from datetime import datetime, timedelta
import logging
import ns_api
from ns_api import RequestParametersError
import requests
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import ATTR_ATTRIBUTI... | 33.363281 | 103 | 0.603911 |
2db49125d671d0105fa5174123686ccb38c637ea | 3,972 | py | Python | intersight/models/storage_virtual_drive_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/storage_virtual_drive_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/storage_virtual_drive_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class StorageVirtualDriveList(object):
"""
NOTE: Th... | 25.792208 | 88 | 0.563192 |
2db4a8fbaf7f760d1423c743e7db66f74c9358ab | 2,661 | py | Python | StockPrices.py | geo-xar/stockprices | 9b7d4dd30819615e36633dea85d9a92b53609ba6 | [
"MIT"
] | null | null | null | StockPrices.py | geo-xar/stockprices | 9b7d4dd30819615e36633dea85d9a92b53609ba6 | [
"MIT"
] | null | null | null | StockPrices.py | geo-xar/stockprices | 9b7d4dd30819615e36633dea85d9a92b53609ba6 | [
"MIT"
] | null | null | null | # Copyright 2022 by Georgios Charitos.
# All rights reserved.
import requests
import sys
class Stock:
def __init__(self, symbol, name, price):
self.symbol = symbol
self.name = name
self.price = price
class StockPrices(object):
"""
Class that retrieves and holds all the stock pr... | 34.115385 | 131 | 0.543029 |
2db502ea83b94e6c844ce31b3e9f0e5a0f813b95 | 699 | py | Python | sphinx_gallery/tests/test_utils.py | ksunden/sphinx-gallery | 7f26c1a6fc8f53169af2e5fa558d0efbfb32fb4f | [
"BSD-3-Clause"
] | null | null | null | sphinx_gallery/tests/test_utils.py | ksunden/sphinx-gallery | 7f26c1a6fc8f53169af2e5fa558d0efbfb32fb4f | [
"BSD-3-Clause"
] | null | null | null | sphinx_gallery/tests/test_utils.py | ksunden/sphinx-gallery | 7f26c1a6fc8f53169af2e5fa558d0efbfb32fb4f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Test utility functions
==================
"""
# Author: Nicholas Cain
# License: 3-clause BSD
from __future__ import division, absolute_import, print_function
import sphinx_gallery.utils as utils
import pytest
def test_replace_py_ipynb():
# Test behavior of function with expected in... | 27.96 | 76 | 0.713877 |
2db50ce05e52b2bb33448e567f9efb317ba58a52 | 7,790 | py | Python | bruges/models/wedge.py | hyperiongeo/bruges | 6d9a3aae86aaa53107caaa20e9aafa390358b0f8 | [
"Apache-2.0"
] | null | null | null | bruges/models/wedge.py | hyperiongeo/bruges | 6d9a3aae86aaa53107caaa20e9aafa390358b0f8 | [
"Apache-2.0"
] | null | null | null | bruges/models/wedge.py | hyperiongeo/bruges | 6d9a3aae86aaa53107caaa20e9aafa390358b0f8 | [
"Apache-2.0"
] | null | null | null | from collections import namedtuple
import numpy as np
import scipy.ndimage as sn
from bruges.util import sigmoid
def pad_func(before, after):
"""
Padding function. Operates on vector *in place*,
as per the np.pad documentation.
"""
def pad_with(x, pad_width, iaxis, kwargs):
x[:pad_width[... | 39.145729 | 109 | 0.606033 |
2db51db3d15af62f5f4ca2c1811b0b5c33ea908f | 1,104 | py | Python | samples/test/placeholder_concat_test.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | null | null | null | samples/test/placeholder_concat_test.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | null | null | null | samples/test/placeholder_concat_test.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1 | 2022-01-19T09:13:12.000Z | 2022-01-19T09:13:12.000Z | # Copyright 2021 The Kubeflow 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 or agreed to in... | 33.454545 | 94 | 0.748188 |
2db522b7f412e36be9152a29d2458d456b0d5378 | 669 | py | Python | sqlglot/optimizer/quote_identities.py | RobinL/sqlglot | 7ec1022ac4c1fbaeb44e47d5f187a78e5c14735a | [
"MIT"
] | null | null | null | sqlglot/optimizer/quote_identities.py | RobinL/sqlglot | 7ec1022ac4c1fbaeb44e47d5f187a78e5c14735a | [
"MIT"
] | null | null | null | sqlglot/optimizer/quote_identities.py | RobinL/sqlglot | 7ec1022ac4c1fbaeb44e47d5f187a78e5c14735a | [
"MIT"
] | null | null | null | from sqlglot import expressions as exp
def quote_identities(expression):
"""
Rewrite sqlglot AST to ensure all identities are quoted.
Example:
>>> import sqlglot
>>> expression = sqlglot.parse_one("SELECT x.a AS a FROM db.x")
>>> quote_identities(expression).sql()
'SELECT ... | 25.730769 | 71 | 0.626308 |
2db5324ecae848ddac5a87fbd784d5fe1c228f00 | 3,927 | py | Python | ros/tcpros.py | robotika/husky | bbe57fc80a9d2e99c027a57390af07df064e826e | [
"MIT"
] | 3 | 2016-02-16T02:02:25.000Z | 2021-08-06T20:39:11.000Z | ros/tcpros.py | robotika/husky | bbe57fc80a9d2e99c027a57390af07df064e826e | [
"MIT"
] | null | null | null | ros/tcpros.py | robotika/husky | bbe57fc80a9d2e99c027a57390af07df064e826e | [
"MIT"
] | 1 | 2018-03-15T03:37:06.000Z | 2018-03-15T03:37:06.000Z | """
Parsing TCPROS communication protocol
usage:
./tcpros <log file to replay>
"""
import socket
import struct
import sys
import datetime
def prefix4BytesLen( s ):
"adding ROS length"
return struct.pack("I", len(s)) + s
def splitLenStr( data ):
ret = []
while len(data) >= 4:
size = s... | 28.456522 | 93 | 0.527884 |
2db533c77f3ae66597fd8187585d12dabdc3d221 | 769 | py | Python | acme/agents/tf/dqfd/__init__.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | 2,650 | 2020-06-01T16:31:25.000Z | 2022-03-31T07:32:41.000Z | acme/agents/tf/dqfd/__init__.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | 199 | 2020-06-02T01:09:09.000Z | 2022-03-31T17:11:20.000Z | acme/agents/tf/dqfd/__init__.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | 344 | 2020-06-01T16:45:21.000Z | 2022-03-30T11:15:09.000Z | # python3
# Copyright 2018 DeepMind Technologies Limited. 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 re... | 38.45 | 75 | 0.775033 |
2db53568d7babba8ec1236ac91d587d76509878e | 1,719 | py | Python | parcels/forms.py | festlv/latvijas-pasta-toolis | 61d682e319fb70781869783593811b58881db96c | [
"MIT"
] | null | null | null | parcels/forms.py | festlv/latvijas-pasta-toolis | 61d682e319fb70781869783593811b58881db96c | [
"MIT"
] | null | null | null | parcels/forms.py | festlv/latvijas-pasta-toolis | 61d682e319fb70781869783593811b58881db96c | [
"MIT"
] | null | null | null | # coding=utf-8
from django import forms
from django.forms import ModelForm
from django.forms.models import modelformset_factory
from parcels.models import Shipment
from django.forms.util import ErrorList
from django.utils.safestring import mark_safe
class DivErrorList(ErrorList):
def __unicode__(self):
re... | 25.656716 | 76 | 0.591623 |
2db53a67f145a6689f2f298bde6cf55c0634aac1 | 13,341 | py | Python | cate/ops/correlation.py | TomBlock/cate | 3924300a9d85f09fd40bc67b9f8a220230788d1c | [
"MIT"
] | null | null | null | cate/ops/correlation.py | TomBlock/cate | 3924300a9d85f09fd40bc67b9f8a220230788d1c | [
"MIT"
] | null | null | null | cate/ops/correlation.py | TomBlock/cate | 3924300a9d85f09fd40bc67b9f8a220230788d1c | [
"MIT"
] | 1 | 2019-02-14T13:49:37.000Z | 2019-02-14T13:49:37.000Z | # The MIT License (MIT)
# Copyright (c) 2016, 2017 by the ESA CCI Toolbox development team and contributors
#
# 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 wi... | 46.975352 | 154 | 0.65295 |
2db55ce69afc03dead912eba1634f8a45090b4d5 | 8,223 | py | Python | bin/ontobio-parse-assocs.py | valearna/ontobio | 460915df0beb0d4fbcd414cf4157769b08954857 | [
"BSD-3-Clause"
] | 1 | 2019-08-03T23:48:04.000Z | 2019-08-03T23:48:04.000Z | bin/ontobio-parse-assocs.py | valearna/ontobio | 460915df0beb0d4fbcd414cf4157769b08954857 | [
"BSD-3-Clause"
] | null | null | null | bin/ontobio-parse-assocs.py | valearna/ontobio | 460915df0beb0d4fbcd414cf4157769b08954857 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Command line wrapper to gafparser.py
Type:
ogr-parse-assocs -h
For instructions
Examples:
```
```
"""
import argparse
import networkx as nx
from networkx.algorithms.dag import ancestors, descendants
from ontobio.assoc_factory import AssociationSetFactory
from ontobio.ontol_factory ... | 36.709821 | 142 | 0.636143 |
2db55e2e90abe5f912da6ea5340d65a972cc02ef | 1,475 | py | Python | alphatwirl_interface/scribblers.py | benkrikler/alphatwirl-interface | ce9b3775b099fbcc55402be2df0e4f2e477d8e6d | [
"BSD-3-Clause"
] | null | null | null | alphatwirl_interface/scribblers.py | benkrikler/alphatwirl-interface | ce9b3775b099fbcc55402be2df0e4f2e477d8e6d | [
"BSD-3-Clause"
] | 4 | 2018-03-05T13:48:26.000Z | 2018-03-19T12:28:56.000Z | alphatwirl_interface/scribblers.py | benkrikler/alphatwirl-interface | ce9b3775b099fbcc55402be2df0e4f2e477d8e6d | [
"BSD-3-Clause"
] | 1 | 2018-02-15T17:10:23.000Z | 2018-02-15T17:10:23.000Z | import numpy as np
class ComponentName(object):
def __repr__(self):
return '{}()'.format(
self.__class__.__name__,
)
def begin(self, event):
self.vals = []
event.componentName = self.vals
self.vals[:] = [event.config.component.name]
# e.g., "HTMHT... | 26.818182 | 79 | 0.579661 |
2db56e928dce9a105267b9fb213e1ef8169bed26 | 12,582 | py | Python | pygeoapi/provider/filesystem.py | ksonda/pygeoapi | 8ce6e1b1d678a0bcf2d9810e36fa1701a244a062 | [
"MIT"
] | null | null | null | pygeoapi/provider/filesystem.py | ksonda/pygeoapi | 8ce6e1b1d678a0bcf2d9810e36fa1701a244a062 | [
"MIT"
] | null | null | null | pygeoapi/provider/filesystem.py | ksonda/pygeoapi | 8ce6e1b1d678a0bcf2d9810e36fa1701a244a062 | [
"MIT"
] | null | null | null | # =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
#
# Copyright (c) 2020 Tom Kralidis
#
# 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 ... | 35.542373 | 91 | 0.487522 |
2db5736a31b682de36ea05a3f9d4e6980c2f0a64 | 18,521 | py | Python | qualipy/run.py | baasman/qualipy | e246a44ea3a5dcc92291983c52a89189338f808f | [
"Apache-2.0"
] | 1 | 2019-07-15T15:16:44.000Z | 2019-07-15T15:16:44.000Z | qualipy/run.py | baasman/qualipy | e246a44ea3a5dcc92291983c52a89189338f808f | [
"Apache-2.0"
] | null | null | null | qualipy/run.py | baasman/qualipy | e246a44ea3a5dcc92291983c52a89189338f808f | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
import os
import datetime
from typing import Any, Dict, Optional, Union, Dict, List, Callable
import warnings
import logging
import copy
from qualipy.backends.pandas_backend.generator import BackendPandas
from qualipy.backends.sql_backend.generator import BackendSQL
... | 39.830108 | 138 | 0.574753 |
2db60282d550aef3464a65b9e3ce8b3f18964331 | 669 | py | Python | students/migrations/0006_auto_20201204_1717.py | henrylameck/school_management_system | 38c270977d001d28f2338eb90fffc3e8c2598d06 | [
"MIT"
] | null | null | null | students/migrations/0006_auto_20201204_1717.py | henrylameck/school_management_system | 38c270977d001d28f2338eb90fffc3e8c2598d06 | [
"MIT"
] | 3 | 2021-06-05T00:01:48.000Z | 2021-09-22T19:39:12.000Z | students/migrations/0006_auto_20201204_1717.py | henrylameck/school_management_system | 38c270977d001d28f2338eb90fffc3e8c2598d06 | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-12-04 14:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('students', '0005_auto_20201204_1649'),
]
operations = [
migrations.AlterField(
model_name='studentadmission',
name='ap... | 27.875 | 101 | 0.626308 |
2db625d881392d392f93c93f7395232990a4b2e3 | 1,354 | py | Python | examples/upload_video.py | FLIR/conservator-cli | 4831b847a5777a21e2fdbf6336b16ad0f0afc25d | [
"MIT"
] | 9 | 2021-02-05T23:30:50.000Z | 2022-02-04T01:41:41.000Z | examples/upload_video.py | FLIR/conservator-cli | 4831b847a5777a21e2fdbf6336b16ad0f0afc25d | [
"MIT"
] | 48 | 2021-02-05T23:32:01.000Z | 2022-03-25T20:51:01.000Z | examples/upload_video.py | FLIR/conservator-cli | 4831b847a5777a21e2fdbf6336b16ad0f0afc25d | [
"MIT"
] | 2 | 2021-03-18T00:33:19.000Z | 2021-04-03T17:28:52.000Z | import sys
import logging
import os.path as osp
from FLIR.conservator.conservator import Conservator
logging.basicConfig(level="INFO")
# Use either a named configuration
# conservator = Conservator.create('local')
# Or instead of a named configuration rely on the default which was created with `conservator config cr... | 28.208333 | 116 | 0.782127 |
2db62a538b518369a044f277964bf7faf1942a83 | 1,532 | py | Python | builder/mypy_boto3_builder/structures/class_record.py | jbpratt78/mypy_boto3 | c1cfc39aa5643ca149dd6a4b16124826fcc28fa0 | [
"MIT"
] | null | null | null | builder/mypy_boto3_builder/structures/class_record.py | jbpratt78/mypy_boto3 | c1cfc39aa5643ca149dd6a4b16124826fcc28fa0 | [
"MIT"
] | null | null | null | builder/mypy_boto3_builder/structures/class_record.py | jbpratt78/mypy_boto3 | c1cfc39aa5643ca149dd6a4b16124826fcc28fa0 | [
"MIT"
] | null | null | null | """
Base class for all structures that can be rendered to a class.
"""
from dataclasses import dataclass, field
from typing import Set, List
from mypy_boto3_builder.type_annotations.fake_annotation import FakeAnnotation
from mypy_boto3_builder.structures.attribute import Attribute
from mypy_boto3_builder.structures.me... | 33.304348 | 78 | 0.685379 |
2db62f769b7823f3441147bbbeebb05c026e8cfe | 1,867 | py | Python | TrainingExtensions/torch/src/python/aimet_torch/model_validator/__init__.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 945 | 2020-04-30T02:23:55.000Z | 2022-03-31T08:44:32.000Z | TrainingExtensions/torch/src/python/aimet_torch/model_validator/__init__.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 563 | 2020-05-01T03:07:22.000Z | 2022-03-30T05:35:58.000Z | TrainingExtensions/torch/src/python/aimet_torch/model_validator/__init__.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 186 | 2020-04-30T00:55:26.000Z | 2022-03-30T09:54:51.000Z | # -*- mode: python -*-
# =============================================================================
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2021, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided t... | 50.459459 | 80 | 0.693626 |
2db6565a62c9fcc0205cd2015087996dcc327682 | 2,713 | py | Python | src/aws_device_config.py | synapse-wireless-labs/raspi-aws-iot-sensor | c3334e77e05762c55fdb57153d76bfd99a6dfa0c | [
"Apache-2.0"
] | null | null | null | src/aws_device_config.py | synapse-wireless-labs/raspi-aws-iot-sensor | c3334e77e05762c55fdb57153d76bfd99a6dfa0c | [
"Apache-2.0"
] | null | null | null | src/aws_device_config.py | synapse-wireless-labs/raspi-aws-iot-sensor | c3334e77e05762c55fdb57153d76bfd99a6dfa0c | [
"Apache-2.0"
] | null | null | null | import json
import time
import logging
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTShadowClient
def create_shadow_client(host, ca_file, private_file, cert_file, thing_name):
client = AWSIoTMQTTShadowClient(thing_name)
client.configureCredentials(ca_file, private_file, cert_file)
client.configureEndpoin... | 34.341772 | 93 | 0.670475 |
2db66b6e14242a48d37e5ddb3492534c1c72cf18 | 1,027 | py | Python | line_bot/scripts.py | BWsix/line-to-discord | 66280190af258bd324db21940a42111fa0f67ef2 | [
"MIT"
] | 2 | 2022-03-22T02:38:21.000Z | 2022-03-22T12:20:52.000Z | line_bot/scripts.py | BWsix/line-to-discord | 66280190af258bd324db21940a42111fa0f67ef2 | [
"MIT"
] | null | null | null | line_bot/scripts.py | BWsix/line-to-discord | 66280190af258bd324db21940a42111fa0f67ef2 | [
"MIT"
] | 3 | 2021-10-12T00:32:43.000Z | 2021-12-04T20:19:45.000Z | SITE = "https://github.com/BWsix/line-to-discord"
class scripts:
cmd = {
'discohook' : "啟用服務",
'discolink' : "連結discord頻道",
'discounlink' : "取消連結discord頻道",
'discoquery' : "取得已連結的discord頻道列表",
'discohelp' : "取得指令列表",
}
def get_help(self) -> str:
"""
取得所有指令
指令列表 :
指令 : 說明文... | 20.959184 | 49 | 0.583252 |
2db66be2505dde38a501edf45984e1f36beb351d | 3,517 | py | Python | python/paddle/v2/topology.py | AI-books/Paddle | 5b5f4f514047975ac09ec42b31e46dabf235e7dd | [
"Apache-2.0"
] | null | null | null | python/paddle/v2/topology.py | AI-books/Paddle | 5b5f4f514047975ac09ec42b31e46dabf235e7dd | [
"Apache-2.0"
] | null | null | null | python/paddle/v2/topology.py | AI-books/Paddle | 5b5f4f514047975ac09ec42b31e46dabf235e7dd | [
"Apache-2.0"
] | 1 | 2020-06-04T04:27:15.000Z | 2020-06-04T04:27:15.000Z | # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 30.318966 | 78 | 0.638328 |
2db6b754cf22c283a4a69aba3aa7ec825e252f44 | 11,423 | py | Python | pypokerengine/engine/round_manager.py | yy019384/PyPokerEngine | 6c3004d4dc8c1a0109711d105c4a25b2da4eccac | [
"MIT"
] | null | null | null | pypokerengine/engine/round_manager.py | yy019384/PyPokerEngine | 6c3004d4dc8c1a0109711d105c4a25b2da4eccac | [
"MIT"
] | null | null | null | pypokerengine/engine/round_manager.py | yy019384/PyPokerEngine | 6c3004d4dc8c1a0109711d105c4a25b2da4eccac | [
"MIT"
] | null | null | null | from functools import reduce
from pypokerengine.engine.table import Table
from pypokerengine.engine.player import Player
from pypokerengine.engine.pay_info import PayInfo
from pypokerengine.engine.poker_constants import PokerConstants as Const
from pypokerengine.engine.action_checker import ActionChecker
from pypokere... | 39.389655 | 87 | 0.634159 |
2db6c0ac731bb4c280f4d886fd3036df5f823edd | 5,333 | py | Python | asteroid/scripts/asteroid_cli.py | hushell/asteroid | 73d93c8af734b0d985c67013e9f4a8462d1a924f | [
"MIT"
] | null | null | null | asteroid/scripts/asteroid_cli.py | hushell/asteroid | 73d93c8af734b0d985c67013e9f4a8462d1a924f | [
"MIT"
] | null | null | null | asteroid/scripts/asteroid_cli.py | hushell/asteroid | 73d93c8af734b0d985c67013e9f4a8462d1a924f | [
"MIT"
] | null | null | null | import os
import yaml
import itertools
import glob
import warnings
from typing import List
import asteroid
from asteroid.models.publisher import upload_publishable
from asteroid.models.base_models import BaseModel
SUPPORTED_EXTENSIONS = [
".wav",
".flac",
".ogg",
]
def upload():
""" CLI function to... | 33.33125 | 98 | 0.632477 |
2db6c43269b819aea283cae3763b5d227cb416db | 1,817 | py | Python | newsroom/build/download.py | peter-xbs/newsroom_chinese | 7fcae68b2ea5584d08d0c48faee34a0734237e6b | [
"Apache-2.0"
] | 82 | 2018-05-01T16:32:38.000Z | 2019-05-18T01:43:15.000Z | newsroom/build/download.py | peter-xbs/newsroom_chinese | 7fcae68b2ea5584d08d0c48faee34a0734237e6b | [
"Apache-2.0"
] | 20 | 2018-05-01T19:32:48.000Z | 2019-04-12T07:57:48.000Z | newsroom/build/download.py | peter-xbs/newsroom_chinese | 7fcae68b2ea5584d08d0c48faee34a0734237e6b | [
"Apache-2.0"
] | 15 | 2018-05-01T17:34:11.000Z | 2019-05-07T09:28:21.000Z | import time, random, requests
from concurrent.futures import ThreadPoolExecutor
class Downloader(object):
def __init__(
self,
workers = 8,
tries = 3,
sleep = 2,
multiplier = 1.5,
):
"""
Launch a thread pool of workers to ... | 21.127907 | 76 | 0.503577 |
2db6d27553a2f78da069285e7d40f16af82ef5c9 | 3,248 | py | Python | subt/test_multitrace.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 12 | 2017-02-16T10:22:59.000Z | 2022-03-20T05:48:06.000Z | subt/test_multitrace.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 618 | 2016-08-30T04:46:12.000Z | 2022-03-25T16:03:10.000Z | subt/test_multitrace.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 11 | 2016-08-27T20:02:55.000Z | 2022-03-07T08:53:53.000Z |
import unittest
from unittest.mock import MagicMock, patch, call
from subt.multitrace import MultiTraceManager, get_intervals
class MultiTraceManagerTest(unittest.TestCase):
def test_usage(self):
bus = MagicMock()
mtm = MultiTraceManager(bus=bus, config={})
mtm.on_robot_xyz(['A150L', [5... | 42.181818 | 133 | 0.588978 |
2db6f2da0c50d1301c833a17db21c9d8ac757324 | 1,215 | py | Python | tests/test_tools.py | BFourcin/rcmodel | 160eb2ad7ea60f328abde157baeef7378e28d815 | [
"MIT"
] | 5 | 2021-07-05T13:48:59.000Z | 2021-12-08T11:40:51.000Z | tests/test_tools.py | BFourcin/rcmodel | 160eb2ad7ea60f328abde157baeef7378e28d815 | [
"MIT"
] | null | null | null | tests/test_tools.py | BFourcin/rcmodel | 160eb2ad7ea60f328abde157baeef7378e28d815 | [
"MIT"
] | null | null | null | import pytest
import torch
from rcmodel.tools import InputScaling
@pytest.fixture
def scaling():
rm_CA = [200, 800] # [min, max] Capacitance/area
ex_C = [1.5 * 10 ** 4, 10 ** 6] # Capacitance
R = [0.2, 1.2] # Resistance ((K.m^2)/W)
scaling = InputScaling(rm_CA, ex_C, R)
return scaling
def t... | 27 | 107 | 0.697942 |
2db6fbc24a489819688feae03a60fe6594248a6d | 1,314 | py | Python | diffprivlib/tools/__init__.py | Jakondak/differential-privacy-library | c26bab301f2554b52c8bd836b28091f2f2611cd4 | [
"MIT"
] | 1 | 2020-06-14T18:18:01.000Z | 2020-06-14T18:18:01.000Z | diffprivlib/tools/__init__.py | dohmatob/differential-privacy-library | 1a17bf0e3bf7d18d5c19258abbf81c27fd9a5e16 | [
"MIT"
] | null | null | null | diffprivlib/tools/__init__.py | dohmatob/differential-privacy-library | 1a17bf0e3bf7d18d5c19258abbf81c27fd9a5e16 | [
"MIT"
] | 1 | 2022-01-02T11:29:30.000Z | 2022-01-02T11:29:30.000Z | # MIT License
#
# Copyright (C) IBM Corporation 2019
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... | 57.130435 | 120 | 0.78691 |
2db7005ce9ef40db92e427996a4a7b7b698590f0 | 6,075 | py | Python | examples/conll_2003/conll_seq_crf_elmo.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 50 | 2019-09-13T10:32:29.000Z | 2022-02-14T16:52:53.000Z | examples/conll_2003/conll_seq_crf_elmo.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 31 | 2019-09-03T11:06:03.000Z | 2021-08-20T14:57:09.000Z | examples/conll_2003/conll_seq_crf_elmo.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 9 | 2019-09-16T03:25:15.000Z | 2021-05-11T10:28:25.000Z | from sciwing.datasets.seq_labeling.conll_dataset import CoNLLDatasetManager
import sciwing.constants as constants
import pathlib
from sciwing.modules.embedders.word_embedder import WordEmbedder
from sciwing.modules.embedders.concat_embedders import ConcatEmbedders
from sciwing.modules.embedders.elmo_embedder import Elm... | 34.517045 | 102 | 0.694486 |
2db7055357c491dfc9a45532e0fcd8f322df1a82 | 9,961 | py | Python | tests/unit/lib/cookiecutter/test_question.py | ssenchenko/aws-sam-cli | c04386c0d6ec9f80cd4c7d4706f5d197f580db02 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | tests/unit/lib/cookiecutter/test_question.py | ssenchenko/aws-sam-cli | c04386c0d6ec9f80cd4c7d4706f5d197f580db02 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2021-07-29T20:56:48.000Z | 2021-07-29T20:56:48.000Z | tests/unit/lib/cookiecutter/test_question.py | ssenchenko/aws-sam-cli | c04386c0d6ec9f80cd4c7d4706f5d197f580db02 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2021-11-26T13:12:50.000Z | 2021-11-26T13:12:50.000Z | from typing import List, Union, Dict
from unittest import TestCase
from unittest.mock import ANY, patch, Mock
from parameterized import parameterized
from samcli.lib.cookiecutter.question import Question, QuestionKind, Choice, Confirm, Info, QuestionFactory
class TestQuestion(TestCase):
_ANY_TEXT = "any text"
... | 41.677824 | 117 | 0.689891 |
2db70fe0ea6133958f50717f884a6fbca58f2951 | 4,717 | py | Python | final_notebook.py | superporchetta/BEC_TSSP | ce6e36d208518cf9951f4961965ec88031dd01ae | [
"MIT"
] | 1 | 2020-11-05T11:01:31.000Z | 2020-11-05T11:01:31.000Z | final_notebook.py | superporchetta/numerical_methods_project | ce6e36d208518cf9951f4961965ec88031dd01ae | [
"MIT"
] | null | null | null | final_notebook.py | superporchetta/numerical_methods_project | ce6e36d208518cf9951f4961965ec88031dd01ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Numerical Methods Project: Vorticies in BEC with Harmonic Trap
# The following inmplementation can be found on [GitHub](https://github.com/superporchetta/numerical_methods_project).
# In[ ]:
# In[ ]:
import numpy as np
import matplotlib.pyplot as plt
import time
import ... | 28.245509 | 267 | 0.645537 |
2db71856446dff8fb2949c691feec27bb6fee52c | 3,116 | py | Python | tests/test_devicedata_users_devices.py | wmclendon/fortigaterepr | 9e23edbd25cd27deb7687d5a8690fd69dcada8ed | [
"Apache-2.0"
] | 1 | 2020-01-21T18:48:10.000Z | 2020-01-21T18:48:10.000Z | tests/test_devicedata_users_devices.py | wmclendon/fortigaterepr | 9e23edbd25cd27deb7687d5a8690fd69dcada8ed | [
"Apache-2.0"
] | 16 | 2019-10-21T12:39:08.000Z | 2021-06-02T00:38:38.000Z | tests/test_devicedata_users_devices.py | wmclendon/fortigaterepr | 9e23edbd25cd27deb7687d5a8690fd69dcada8ed | [
"Apache-2.0"
] | 1 | 2020-10-14T02:42:33.000Z | 2020-10-14T02:42:33.000Z | import base64
import copy
import json
import logging
import os
import tempfile
from unittest import mock
import pandas as pd
import pandas.api.types as ptypes
import pytest
import requests
from fortigaterepr.devicedata import (
ForitgateDetectedDevices,
FortigateDhcpClientLeases,
FortigateManagedAps,
... | 30.54902 | 72 | 0.670411 |
2db7275850961c01415df0d576c89b8467d86cab | 2,894 | py | Python | experiments/visualizations/UMAP.py | coleygroup/del_qsar | b55f1d37e250235ad59eb64ebd450ba947cb5aed | [
"MIT"
] | 7 | 2021-09-08T03:34:51.000Z | 2022-03-30T15:28:17.000Z | experiments/visualizations/UMAP.py | coleygroup/del_qsar | b55f1d37e250235ad59eb64ebd450ba947cb5aed | [
"MIT"
] | 4 | 2021-12-04T06:40:37.000Z | 2022-01-17T07:39:56.000Z | experiments/visualizations/UMAP.py | coleygroup/del_qsar | b55f1d37e250235ad59eb64ebd450ba947cb5aed | [
"MIT"
] | 3 | 2021-09-07T03:03:34.000Z | 2022-03-02T03:48:04.000Z | import os
import sys
import h5py
import numba
import numpy as np
import umap
from absl import app
from absl import flags
DELQSAR_ROOT = os.path.abspath(__file__ + '/../../../')
sys.path += [os.path.dirname(DELQSAR_ROOT)]
FLAGS = flags.FLAGS
flags.DEFINE_integer('num_threads', 40, 'Number of threads')
flags.DEFINE_str... | 42.558824 | 120 | 0.731168 |
2db72f7f2290ce6022387da266ac0db838f8c60a | 1,388 | py | Python | aoc-2021/day-04/day_4.py | bsamseth/advent-of-code-2018 | bdd3969e61fac3f1543c20983260aa9fda912e99 | [
"MIT"
] | 1 | 2021-01-03T17:09:13.000Z | 2021-01-03T17:09:13.000Z | aoc-2021/day-04/day_4.py | bsamseth/advent-of-code-2018 | bdd3969e61fac3f1543c20983260aa9fda912e99 | [
"MIT"
] | 3 | 2021-06-01T23:09:26.000Z | 2022-03-12T01:08:40.000Z | aoc-2021/day-04/day_4.py | bsamseth/advent-of-code | 65d40548057a86b6fda37aec8e7d5d473d627124 | [
"MIT"
] | null | null | null | import numpy as np
def make_winning_mask(n):
"""(2n, n, n) mask with a (n, n) sub-masks for each winning pattern."""
masks = np.zeros((2 * n, n, n), dtype=int)
for i in range(n):
masks[i, i, :] = 1
masks[n + i, :, i] = 1
return masks
# Parse input:
with open("input.txt") as f:
fi... | 31.545455 | 97 | 0.641931 |
2db73e69e0c6ec9d9eacb31bc7f94a161b59676d | 1,244 | py | Python | experiments/inference_scaling/analyse_results.py | ML-KULeuven/betaproblog | 77c98fae81f6b457901ee7a9cdc781d290525c3d | [
"Apache-2.0"
] | null | null | null | experiments/inference_scaling/analyse_results.py | ML-KULeuven/betaproblog | 77c98fae81f6b457901ee7a9cdc781d290525c3d | [
"Apache-2.0"
] | null | null | null | experiments/inference_scaling/analyse_results.py | ML-KULeuven/betaproblog | 77c98fae81f6b457901ee7a9cdc781d290525c3d | [
"Apache-2.0"
] | null | null | null | import pickle
input_folder = f"../../networks/inference_scaling/2021-08-10-16-08-21-experiment/"
networks = [
"small1",
"small2",
"small3",
"child",
"alarm",
"water",
"win95pts",
"hepar2",
]
inference_samples = [10, 100, 1000, 10000]
with open(f"{input_folder}sdd_cpu_1threads_nograd_an... | 30.341463 | 89 | 0.586817 |
2db762e2bcad1939dbd0ae6ed2fbc888e548a70d | 2,271 | py | Python | nmt/two_decoders.py | varvara-l/nmt_chit_chat | 899fadacfc0ae1d45da2cdc840e991444ca8f31c | [
"Apache-2.0"
] | null | null | null | nmt/two_decoders.py | varvara-l/nmt_chit_chat | 899fadacfc0ae1d45da2cdc840e991444ca8f31c | [
"Apache-2.0"
] | null | null | null | nmt/two_decoders.py | varvara-l/nmt_chit_chat | 899fadacfc0ae1d45da2cdc840e991444ca8f31c | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import random
import sys
import tensorflow as tf
from .nmt import create_or_load_hparams, create_hparams, add_arguments
from .utils import misc_utils as utils
from .utils import evaluation_utils
def two_dec_train():
pass
def two_dec_inference():
pass
def run_main(flags, default_... | 27.695122 | 80 | 0.704976 |
2db767471768621de5b55062be52f39b060855ad | 408 | py | Python | dev/chimera/format_chimera_dataset.py | stefanobellelli/nonce3vec | 50c17cea552afd85e78ebc12f97898995dafc3a8 | [
"MIT"
] | null | null | null | dev/chimera/format_chimera_dataset.py | stefanobellelli/nonce3vec | 50c17cea552afd85e78ebc12f97898995dafc3a8 | [
"MIT"
] | 10 | 2018-07-18T03:15:23.000Z | 2018-09-13T16:19:06.000Z | dev/chimera/format_chimera_dataset.py | stefanobellelli/nonce3vec | 50c17cea552afd85e78ebc12f97898995dafc3a8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Formats a raw chimera dataset for SVM classification."""
with open('testset_chimeras.txt', 'r') as src:
src = src.readlines()
out = ''
for i in range(len(src)):
src[i] = src[i].split('\t')
src[i][1] = src[i][1].split(' @@ ')
for s in src[i][1]:
s = s.replace('___', 'nonce')
out += f... | 21.473684 | 59 | 0.578431 |
2db78481b74993a8725ed1dcdaeb3ad02cc2ee08 | 641 | py | Python | haystack/exceptions.py | mcroydon/django-haystack | bdb0151cb85dc3a1b2bafcf9f5f410c9653a4ac5 | [
"BSD-3-Clause"
] | 1 | 2016-05-09T12:26:20.000Z | 2016-05-09T12:26:20.000Z | haystack/exceptions.py | mcroydon/django-haystack | bdb0151cb85dc3a1b2bafcf9f5f410c9653a4ac5 | [
"BSD-3-Clause"
] | null | null | null | haystack/exceptions.py | mcroydon/django-haystack | bdb0151cb85dc3a1b2bafcf9f5f410c9653a4ac5 | [
"BSD-3-Clause"
] | null | null | null | class HaystackError(Exception):
"""A generic exception for all others to extend."""
pass
class SearchBackendError(HaystackError):
"""Raised when a backend can not be found."""
pass
class SearchFieldError(HaystackError):
"""Raised when a field encounters an error."""
pass
class MissingDependen... | 26.708333 | 70 | 0.709828 |
2db7b0cb7000242c38a8154f27ad938d610c2f6f | 25,088 | py | Python | python/swagger_client/api_client.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | python/swagger_client/api_client.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | python/swagger_client/api_client.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | # coding: utf-8
"""
Easy!Appointments API
These are the OpenAPI specs that describe the REST API of Easy!Appointments. # noqa: E501
OpenAPI spec version: 1.0.0
Contact: info@easyappointments.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_i... | 39.633491 | 96 | 0.552376 |
2db7ba35164cd6e41f55d4ba10a167c8a1bf8643 | 30 | py | Python | atom3d/datasets/smp/models/__init__.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | atom3d/datasets/smp/models/__init__.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | atom3d/datasets/smp/models/__init__.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | from .enn_smp import ENN_SMP
| 15 | 29 | 0.8 |
2db7cbd77c16dcdac1dfee68c7c478efa6aad6b5 | 5,297 | py | Python | tests/test_installer.py | WAY29/pdm | 1401e5560e89cb1377c7c4a4ab7e59c11fe5a82b | [
"MIT"
] | null | null | null | tests/test_installer.py | WAY29/pdm | 1401e5560e89cb1377c7c4a4ab7e59c11fe5a82b | [
"MIT"
] | null | null | null | tests/test_installer.py | WAY29/pdm | 1401e5560e89cb1377c7c4a4ab7e59c11fe5a82b | [
"MIT"
] | null | null | null | import logging
import os
import pytest
from pdm.installers import InstallManager
from pdm.models.candidates import Candidate
from pdm.models.pip_shims import Link
from pdm.models.requirements import parse_requirement
def test_install_wheel_with_inconsistent_dist_info(project):
req = parse_requirement("pyfunctio... | 35.550336 | 88 | 0.707004 |
2db7dcb0cad5328be06c9c9f415e66d09ca0b82f | 2,576 | py | Python | render/intro.py | JerryLingjieMei/ADEPT-Dataset-Release | 900d9d5c7e780a5daa06f0484d91539a4ca92ff8 | [
"MIT"
] | 14 | 2019-11-06T23:13:35.000Z | 2021-02-04T17:28:31.000Z | render/intro.py | JerryLingjieMei/ADEPT-Dataset-Release | 900d9d5c7e780a5daa06f0484d91539a4ca92ff8 | [
"MIT"
] | null | null | null | render/intro.py | JerryLingjieMei/ADEPT-Dataset-Release | 900d9d5c7e780a5daa06f0484d91539a4ca92ff8 | [
"MIT"
] | 5 | 2019-12-05T02:34:40.000Z | 2020-10-14T02:33:32.000Z | import bpy
import os
import numpy as np
from PIL import Image
from imageio import imread
from render.camera import set_camera
from utils.geometry import convert_euler
def get_intro_camera(rendering, n):
nn = int(n / 8)
phi_s = np.concatenate([
np.linspace(rendering.camera_phi, rendering.camera_phi +... | 39.030303 | 96 | 0.652562 |
2db7e2dc55a21636d84de4fd7e0cebff76a16451 | 15,661 | py | Python | entity_link/source/entity_link.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 3 | 2021-05-24T23:06:40.000Z | 2021-11-08T10:32:42.000Z | entity_link/source/entity_link.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 4 | 2020-10-12T03:00:43.000Z | 2020-11-17T01:47:56.000Z | entity_link/source/entity_link.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 2 | 2021-03-01T15:30:26.000Z | 2022-01-13T21:30:20.000Z | from pathlib import Path
import sys
import json
import rltk
global g_tokenizer
g_tokenizer = rltk.CrfTokenizer()
us_state_abbrev = {
'Alabama': 'AL',
'Alaska': 'AK',
'American Samoa': 'AS',
'Arizona': 'AZ',
'Arkansas': 'AR',
'California': 'CA',
'Colorado': 'CO',
'Connecticut': 'CT',
... | 29.604915 | 127 | 0.628057 |
2db8276811ec39fcf4351949771da797100cd823 | 3,607 | py | Python | here_location_services/tour_planning_api.py | jain-aayush1123/here-location-services-python | 11ad5ef8273b4f243c43bc00ebd470f725b980bc | [
"Apache-2.0"
] | 16 | 2021-02-15T13:49:29.000Z | 2022-03-29T10:34:43.000Z | here_location_services/tour_planning_api.py | jain-aayush1123/here-location-services-python | 11ad5ef8273b4f243c43bc00ebd470f725b980bc | [
"Apache-2.0"
] | 8 | 2021-02-27T18:40:46.000Z | 2021-10-03T15:49:27.000Z | here_location_services/tour_planning_api.py | jain-aayush1123/here-location-services-python | 11ad5ef8273b4f243c43bc00ebd470f725b980bc | [
"Apache-2.0"
] | 11 | 2021-02-16T04:58:08.000Z | 2022-02-21T20:51:55.000Z | # Copyright (C) 2019-2021 HERE Europe B.V.
# SPDX-License-Identifier: Apache-2.0
"""This module contains classes for accessing `HERE Tour Planning API <https://developer.here.com/documentation/tour-planning/2.3.0/api-reference-swagger.html>`_.
""" # noqa E501
from typing import Any, Dict, Optional
import requests
... | 37.185567 | 162 | 0.651788 |
2db82e1ee6ded31ce6a3cf351982259c3c126a64 | 29 | py | Python | abc/178/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/178/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/178/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | x = int(input())
print(1 - x) | 14.5 | 16 | 0.551724 |
2db8310cb9f46915e0e544e36258ece58e79c96b | 12,032 | py | Python | src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2022_05_02_preview/models/__init__.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2022_05_02_preview/models/__init__.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2022_05_02_preview/models/__init__.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 38.564103 | 94 | 0.816905 |
2db875e1aef5beff2e2dcbc979dad507333b0895 | 3,481 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/input_bot_inline_message_text.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/input_bot_inline_message_text.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/input_bot_inline_message_text.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 38.677778 | 193 | 0.633439 |
2db8d9a4add627bdad8ec83e0a05319f12b4336f | 36,798 | py | Python | torchtext/experimental/vectors.py | dongreenberg/text | 77c732ab816a41f52259e72430aa837910cc6948 | [
"BSD-3-Clause"
] | 1 | 2021-05-06T15:49:58.000Z | 2021-05-06T15:49:58.000Z | torchtext/experimental/vectors.py | dongreenberg/text | 77c732ab816a41f52259e72430aa837910cc6948 | [
"BSD-3-Clause"
] | null | null | null | torchtext/experimental/vectors.py | dongreenberg/text | 77c732ab816a41f52259e72430aa837910cc6948 | [
"BSD-3-Clause"
] | 1 | 2021-07-14T21:06:11.000Z | 2021-07-14T21:06:11.000Z | import logging
import torch
from torch import Tensor
import torch.nn as nn
from typing import List
from torchtext.utils import (
download_from_url,
extract_archive
)
from torchtext._torchtext import (
Vectors as VectorsPybind,
_load_token_and_vectors_from_file
)
__all__ = [
'FastText',
'GloVe... | 56.43865 | 142 | 0.755231 |
2db912be6a10cfcf8ea3229e0890729ec8742da0 | 12,165 | py | Python | tests/resources/test_transform_file_complete.py | AndrewEckart/ServiceX_App | f15a004c0910b316f59e4fbad7f28c16bb5d2ae7 | [
"BSD-3-Clause"
] | null | null | null | tests/resources/test_transform_file_complete.py | AndrewEckart/ServiceX_App | f15a004c0910b316f59e4fbad7f28c16bb5d2ae7 | [
"BSD-3-Clause"
] | null | null | null | tests/resources/test_transform_file_complete.py | AndrewEckart/ServiceX_App | f15a004c0910b316f59e4fbad7f28c16bb5d2ae7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2019, IRIS-HEP
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the foll... | 47.519531 | 88 | 0.638718 |
2db94d5950373015415b2ab04368aa53af92ab3c | 806 | py | Python | pathogen_memo/controllers/getallquery.py | NajlaBioinfo/pathogen_memo_app | 426a0ef545ffc96da8c6fc1bca5eb19caaf1879c | [
"MIT"
] | null | null | null | pathogen_memo/controllers/getallquery.py | NajlaBioinfo/pathogen_memo_app | 426a0ef545ffc96da8c6fc1bca5eb19caaf1879c | [
"MIT"
] | 3 | 2021-09-03T10:33:09.000Z | 2022-03-12T00:17:18.000Z | pathogen_memo/controllers/getallquery.py | NajlaBioinfo/pathogen_memo_app | 426a0ef545ffc96da8c6fc1bca5eb19caaf1879c | [
"MIT"
] | null | null | null |
import psycopg2
import os
#__ Configure access to .env file
from dotenv import load_dotenv
from pathlib import Path # python3 only
def gethemall(tablename):
"""
Get all rows table
"""
#Load env
load_dotenv()
env_path = Path('.') / '.env'
load_dotenv(dotenv_path=env_path)
dbname ... | 22.388889 | 62 | 0.604218 |
2db9703b3427957c51f7d8b8fb639b197bdaf048 | 3,306 | py | Python | refinery/bnpy/scripts/AsteriskK8.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 103 | 2015-01-13T00:48:14.000Z | 2021-11-08T10:53:22.000Z | refinery/bnpy/scripts/AsteriskK8.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 7 | 2015-02-21T04:03:40.000Z | 2021-08-23T20:24:54.000Z | refinery/bnpy/scripts/AsteriskK8.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 27 | 2015-01-23T00:54:31.000Z | 2020-12-30T14:30:50.000Z | '''
AsteriskK8.py
Simple toy dataset of 8 Gaussian components with full covariance.
Generated data form an "asterisk" shape when plotted in 2D.
'''
import scipy.linalg
import numpy as np
from bnpy.util.RandUtil import rotateCovMat
from bnpy.data import XData, MinibatchIterator
######################################... | 30.611111 | 135 | 0.6219 |
2db99ae75fd6d0630bc4bc512a0e0c57064721d6 | 31,816 | py | Python | trimesh/scene/scene.py | nbraem/trimesh | 63b56b90cb764e1138d6c373fab58ddff3fcae75 | [
"MIT"
] | null | null | null | trimesh/scene/scene.py | nbraem/trimesh | 63b56b90cb764e1138d6c373fab58ddff3fcae75 | [
"MIT"
] | null | null | null | trimesh/scene/scene.py | nbraem/trimesh | 63b56b90cb764e1138d6c373fab58ddff3fcae75 | [
"MIT"
] | null | null | null | import numpy as np
import collections
from .. import util
from .. import units
from .. import convex
from .. import caching
from .. import grouping
from .. import transformations
from .. import bounds as bounds_module
from ..io import gltf
from ..parent import Geometry
from .transforms import TransformForest
clas... | 31.784216 | 81 | 0.548969 |
2db9e603b385ae39f86c3c2de96f3f30b8646fb2 | 3,078 | py | Python | fetch_command_files/fetch_planning_interface_traj.py | sid-dey/arm_planning | 20ae0a23c73026bee90accfa3626a5593af9e9cc | [
"BSD-3-Clause"
] | 10 | 2020-03-13T23:50:31.000Z | 2022-01-17T10:40:57.000Z | fetch_command_files/fetch_planning_interface_traj.py | sid-dey/arm_planning | 20ae0a23c73026bee90accfa3626a5593af9e9cc | [
"BSD-3-Clause"
] | 1 | 2020-03-18T15:59:31.000Z | 2021-04-28T17:13:19.000Z | fetch_command_files/fetch_planning_interface_traj.py | sid-dey/arm_planning | 20ae0a23c73026bee90accfa3626a5593af9e9cc | [
"BSD-3-Clause"
] | 10 | 2020-11-20T02:30:08.000Z | 2022-02-24T04:05:57.000Z | #!/usr/bin/env python
import copy
import actionlib
import rospy
import numpy as np
#import pcl
from math import sin, cos
from moveit_python import (MoveGroupInterface,
PlanningSceneInterface,
PickPlaceInterface)
from moveit_msgs.msg import PlaceLocation, MoveItErro... | 37.536585 | 123 | 0.665367 |
2db9fcc0272b62146e66b757d23da2ac3a2f1582 | 12,117 | py | Python | flexget/plugins/list/movie_list.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/list/movie_list.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/list/movie_list.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
import logging
from collections import MutableSet
from datetime import datetime
from sqlalchemy import Column, Unicode, Integer, ForeignKey, func, DateTime
from sqlalchemy.orm ... | 36.496988 | 115 | 0.639845 |
2dba03b1984421da473b1a68e80bc5792fba44c3 | 389 | py | Python | constants.py | Jazzer9F/RadBot | 6735bd89e0e735bbf14b90ea77571a53cdb2869f | [
"MIT"
] | 3 | 2020-12-23T17:49:11.000Z | 2021-03-11T10:41:17.000Z | constants.py | Jazzer9F/RadBot | 6735bd89e0e735bbf14b90ea77571a53cdb2869f | [
"MIT"
] | 6 | 2020-12-23T16:36:33.000Z | 2021-01-05T17:11:08.000Z | constants.py | Jazzer9F/RadBot | 6735bd89e0e735bbf14b90ea77571a53cdb2869f | [
"MIT"
] | 3 | 2020-12-26T13:36:48.000Z | 2021-03-19T10:20:09.000Z | # Constants used in all the scripts
eXRD = '0x6468e79A80C0eaB0F9A2B574c8d5bC374Af59414'
eXRD_vault = '0x2b988eE889C3049104C1A5F87AF0f522790CF5F6'
eXRD_rewards = '0xDF191bFbdE2e3E178e3336E63C18DD20d537c421'
USDC = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
pool = '0x684B00a5773679f88598A19976fBeb25a68E9a5f'
VOID = '0x... | 38.9 | 59 | 0.874036 |
2dba09bcf3f27275f7512798a716f9de145b6ce9 | 5,277 | py | Python | raiden/tests/integration/test_regression_parity.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | null | null | null | raiden/tests/integration/test_regression_parity.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | 12 | 2019-08-09T19:12:17.000Z | 2019-12-05T15:49:29.000Z | raiden/tests/integration/test_regression_parity.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | null | null | null | import pytest
from raiden import waiting
from raiden.settings import DEFAULT_NUMBER_OF_BLOCK_CONFIRMATIONS
from raiden.tests.utils.detect_failure import raise_on_failure
from raiden.tests.utils.events import wait_for_state_change
from raiden.tests.utils.smartcontracts import deploy_rpc_test_contract
from raiden.tests.... | 34.717105 | 91 | 0.750805 |
2dba14bb9fc36b58cf9ea2dab241869b08733cc8 | 109,783 | py | Python | src/sage/knots/link.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | null | null | null | src/sage/knots/link.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | null | null | null | src/sage/knots/link.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | null | null | null | r"""
Links
A knot is defined as embedding of the circle `\mathbb{S}^1` in the
3-dimensional sphere `\mathbb{S}^3`, considered up to ambient isotopy.
They represent the physical idea of a knotted rope, but with the
particularity that the rope is closed. That is, the ends of the
rope are joined.
A link is an embedding ... | 36.232013 | 158 | 0.44179 |
2dba2872ec1165135114a15252c3d410d14a3c0d | 12,910 | py | Python | app/foreman_exporter.py | marcinbojko/foreman_exporter | 0eeddd0f252a866aea8485f2f4f9cd1309e550c2 | [
"Apache-2.0"
] | 1 | 2021-08-31T20:04:22.000Z | 2021-08-31T20:04:22.000Z | app/foreman_exporter.py | marcinbojko/foreman_exporter | 0eeddd0f252a866aea8485f2f4f9cd1309e550c2 | [
"Apache-2.0"
] | null | null | null | app/foreman_exporter.py | marcinbojko/foreman_exporter | 0eeddd0f252a866aea8485f2f4f9cd1309e550c2 | [
"Apache-2.0"
] | null | null | null | #!/bin/python3
''' foreman exporter '''
import datetime
import distutils.core
import json
import os
import threading
import time
import urllib.parse
import urllib.request
import logging
import requests
from packaging import version
from prometheus_client import Summary, start_http_server
from prometheus_client.core imp... | 41.645161 | 174 | 0.673044 |
2dba5217b0b5f6680abb409a8432b86a4ed2ecbe | 15,133 | py | Python | VisualizationGUI/framework/visualization/GUIhelpers/helpers.py | MD-cyb3/evaluation-framework | a088a5adcdf4a0f537da740b215784d7a0eae95d | [
"Apache-2.0"
] | 5 | 2020-10-05T07:59:31.000Z | 2020-11-23T16:15:55.000Z | VisualizationGUI/framework/visualization/GUIhelpers/helpers.py | siemens/evaluation-framework | 9c8671c46569d857e7ad72e6687474c489e7ddb8 | [
"Apache-2.0"
] | 1 | 2020-09-17T09:36:09.000Z | 2020-09-17T09:36:09.000Z | VisualizationGUI/framework/visualization/GUIhelpers/helpers.py | siemens/evaluation-framework | 9c8671c46569d857e7ad72e6687474c489e7ddb8 | [
"Apache-2.0"
] | 4 | 2020-09-18T10:12:21.000Z | 2022-03-29T16:57:33.000Z | # -*- coding: utf-8 -*-
"""
© Siemens AG, 2020
Author: Michael Dyck (m.dyck@gmx.net)
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 b... | 43.361032 | 109 | 0.56314 |
2dba677f738ee5b7fe33a7ceccf48bb4c5774252 | 27,404 | py | Python | pytype/tests/test_typevar2.py | google/pytype | b5a40b8afb497a2217fc366492b894c027383c83 | [
"Apache-2.0"
] | 3,882 | 2015-03-22T12:17:15.000Z | 2022-03-31T17:13:20.000Z | pytype/tests/test_typevar2.py | google/pytype | b5a40b8afb497a2217fc366492b894c027383c83 | [
"Apache-2.0"
] | 638 | 2015-11-03T06:34:44.000Z | 2022-03-31T23:41:48.000Z | pytype/tests/test_typevar2.py | google/pytype | b5a40b8afb497a2217fc366492b894c027383c83 | [
"Apache-2.0"
] | 301 | 2015-08-14T10:21:17.000Z | 2022-03-08T11:03:40.000Z | """Tests for TypeVar."""
from pytype import file_utils
from pytype.pytd import pytd_utils
from pytype.tests import test_base
class TypeVarTest(test_base.BaseTest):
"""Tests for TypeVar."""
def test_id(self):
ty = self.Infer("""
import typing
T = typing.TypeVar("T")
def f(x: T) -> T:
... | 28.339193 | 81 | 0.534812 |
2dba94f2de6c6849f4fcce3c4face32e262f758c | 3,103 | py | Python | stage/test_databricks_ml_evaluator_processor.py | streamsets/datacollector-tests-external | 6f255b5e7496deeef333b57a5e9df4911ba3ef00 | [
"Apache-2.0"
] | 1 | 2020-04-14T03:01:51.000Z | 2020-04-14T03:01:51.000Z | stage/test_databricks_ml_evaluator_processor.py | streamsets/datacollector-tests-external | 6f255b5e7496deeef333b57a5e9df4911ba3ef00 | [
"Apache-2.0"
] | 1 | 2019-04-24T11:06:38.000Z | 2019-04-24T11:06:38.000Z | stage/test_databricks_ml_evaluator_processor.py | anubandhan/datacollector-tests | 301c024c66d68353735256b262b681dd05ba16cc | [
"Apache-2.0"
] | 2 | 2019-05-24T06:34:37.000Z | 2020-03-30T11:48:18.000Z | # Copyright 2018 StreamSets Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 39.782051 | 103 | 0.72865 |
2dba9842a6bc660a338db88ed2c30857fff59769 | 5,909 | py | Python | rlkit/torch/vae/biva/layers/block.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 63 | 2019-10-24T10:11:44.000Z | 2022-02-17T20:54:41.000Z | rlkit/torch/vae/biva/layers/block.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 6 | 2020-04-30T11:47:23.000Z | 2021-06-08T20:31:58.000Z | rlkit/torch/vae/biva/layers/block.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 8 | 2019-11-23T22:26:59.000Z | 2021-04-15T11:54:22.000Z | from typing import *
from .convolution import *
from .linear import *
class GatedResNet(nn.Module):
def __init__(self, input_shape: Tuple, dim: Tuple, aux_shape: Optional[Tuple] = None, weightnorm: bool = True,
act: nn.Module = nn.ReLU,
transposed: bool = False, dropout: Optiona... | 34.555556 | 115 | 0.57607 |
2dbac470eb799cedbb3bf20c2234d8fe74d827c9 | 25,067 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_replications_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_replications_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_replications_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.249077 | 219 | 0.675669 |
2dbad650e8571653d93cf33fd85a224478a81561 | 1,132 | py | Python | mysql/tests/common_config.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2020-08-08T02:01:01.000Z | 2020-08-08T02:01:01.000Z | mysql/tests/common_config.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | mysql/tests/common_config.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2019-03-06T14:30:52.000Z | 2019-03-06T14:30:52.000Z | # (C) Datadog, Inc. 2010-2017
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import common
import tags
MYSQL_MINIMAL_CONFIG = {
'server': common.HOST,
'user': common.USER,
'pass': common.PASS,
'port': common.PORT
}
MYSQL_COMPLEX_CONFIG = {
'server': common.HOST,
'... | 23.102041 | 78 | 0.542403 |
2dbaebce95cfcd5c3872f94761c5be6cff09b825 | 688 | py | Python | apps/receitas/admin.py | ollyvergithub/AppReceitasDjango | d16e94af8b60624d56be95d486df025283d4e3e5 | [
"MIT"
] | null | null | null | apps/receitas/admin.py | ollyvergithub/AppReceitasDjango | d16e94af8b60624d56be95d486df025283d4e3e5 | [
"MIT"
] | 7 | 2021-03-19T11:29:09.000Z | 2022-01-13T02:53:07.000Z | apps/receitas/admin.py | ollyvergithub/AppReceitasDjango | d16e94af8b60624d56be95d486df025283d4e3e5 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.utils.html import format_html
from .models import Receita
class ListandoReceitas(admin.ModelAdmin):
list_display = ('id', 'nome_receita', 'categoria', 'tempo_preparo', 'publicada', 'thumbnail')
list_display_links = ('id', 'nome_receita')
search_fields = ('nome_r... | 32.761905 | 98 | 0.704942 |
2dbb1c0a0b95931fa9dc22be7288c129918fac5d | 2,633 | py | Python | tests/test_latest_episodes_list_tab.py | andrsd/podcastista | c05a1de09d2820899aebe592d3d4b01d64d1e5fe | [
"MIT"
] | null | null | null | tests/test_latest_episodes_list_tab.py | andrsd/podcastista | c05a1de09d2820899aebe592d3d4b01d64d1e5fe | [
"MIT"
] | 17 | 2021-09-22T12:21:46.000Z | 2022-02-26T12:26:40.000Z | tests/test_latest_episodes_list_tab.py | andrsd/podcastista | c05a1de09d2820899aebe592d3d4b01d64d1e5fe | [
"MIT"
] | null | null | null | import platform
import pytest
from unittest.mock import MagicMock, patch
from PyQt5 import QtWidgets
if platform.system() == "Darwin":
episode1 = {
'resume_point': {
'resume_position_ms': 0,
'fully_played': False
},
'duration_ms': 100,
'release_date': '2020-... | 26.59596 | 75 | 0.535131 |
2dbb30295e3227128b76736e47f8b0f48dfcbaa4 | 6,019 | py | Python | lost_ds/vis/vis.py | l3p-cv/lost_ds | 4a2f3ef027128b759d28e67cb1fdaa0a557e343c | [
"MIT"
] | 1 | 2022-03-30T11:29:57.000Z | 2022-03-30T11:29:57.000Z | lost_ds/vis/vis.py | l3p-cv/lost_ds | 4a2f3ef027128b759d28e67cb1fdaa0a557e343c | [
"MIT"
] | null | null | null | lost_ds/vis/vis.py | l3p-cv/lost_ds | 4a2f3ef027128b759d28e67cb1fdaa0a557e343c | [
"MIT"
] | null | null | null | import os
from tqdm import tqdm
from joblib import Parallel, delayed
try:
import seaborn as sns
except:
pass
import numpy as np
import cv2
from lost_ds.util import get_fs
from lost_ds.geometry.lost_geom import LOSTGeometries
from lost_ds.functional.api import remove_empty
def get_fontscale(fontscale, thic... | 39.860927 | 81 | 0.615052 |
2dbb32b6fb7e99eba9946c0267ff01781d71e612 | 16,638 | py | Python | cadnano/views/pathview/prexovermanager.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2022-03-27T14:37:32.000Z | 2022-03-27T14:37:32.000Z | cadnano/views/pathview/prexovermanager.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | null | null | null | cadnano/views/pathview/prexovermanager.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2021-01-22T02:29:38.000Z | 2021-01-22T02:29:38.000Z | from collections import deque
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QColor
from PyQt5.QtWidgets import QGraphicsRectItem
from cadnano.gui.palette import getNoPen
from cadnano.proxies.cnenum import StrandType
from .pathextras import PreXoverItem
class PreXoverManager(QGraphicsRectItem):
"""Summary
... | 36.486842 | 108 | 0.536783 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.