hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7969033a31ee784358b564ec9530b9d196e6d446 | 80,991 | py | Python | electrum/lnworker.py | donob4n/electrum | 4346d2fc765f40a9388108c06cf1ee132d663923 | [
"MIT"
] | 1 | 2020-07-13T08:23:46.000Z | 2020-07-13T08:23:46.000Z | electrum/lnworker.py | donob4n/electrum | 4346d2fc765f40a9388108c06cf1ee132d663923 | [
"MIT"
] | null | null | null | electrum/lnworker.py | donob4n/electrum | 4346d2fc765f40a9388108c06cf1ee132d663923 | [
"MIT"
] | null | null | null | # Copyright (C) 2018 The Electrum developers
# Distributed under the MIT software license, see the accompanying
# file LICENCE or http://www.opensource.org/licenses/mit-license.php
import asyncio
import os
from decimal import Decimal
import random
import time
from typing import Optional, Sequence, Tuple, List, Set, Di... | 47.335476 | 263 | 0.647023 |
79690431afe1726cd632763556e35d9c109a99c6 | 149 | py | Python | graft/config.py | chrizzFTD/graft | 758fa0cb233b65e19b3a9e02f8f0976eb1029917 | [
"MIT"
] | null | null | null | graft/config.py | chrizzFTD/graft | 758fa0cb233b65e19b3a9e02f8f0976eb1029917 | [
"MIT"
] | 2 | 2020-04-25T10:09:01.000Z | 2020-05-01T12:03:37.000Z | graft/config.py | chrizzFTD/graft | 758fa0cb233b65e19b3a9e02f8f0976eb1029917 | [
"MIT"
] | null | null | null | SERVERS = {
1: ('localhost', 15000),
2: ('localhost', 15001),
3: ('localhost', 15002),
4: ('localhost', 15003),
5: ('localhost', 15004),
}
| 18.625 | 26 | 0.550336 |
7969043a0780c50c2e73978a8910c7dea0d77cd1 | 141 | py | Python | requestbin/tests/__init__.py | madisvain/requestbin | 7415d525cb0de1011adc7a8b5972d08d64f0a6ef | [
"MIT"
] | 5 | 2018-09-30T20:10:52.000Z | 2021-12-14T16:11:41.000Z | requestbin/tests/__init__.py | madisvain/requestbin | 7415d525cb0de1011adc7a8b5972d08d64f0a6ef | [
"MIT"
] | null | null | null | requestbin/tests/__init__.py | madisvain/requestbin | 7415d525cb0de1011adc7a8b5972d08d64f0a6ef | [
"MIT"
] | 1 | 2019-12-21T10:41:18.000Z | 2019-12-21T10:41:18.000Z | from requestbin.models import db, Bin, Request
class TestBase(object):
def setup(self):
db.create_tables(models=[Bin, Request])
| 23.5 | 47 | 0.70922 |
796904e7323ef5ee200a1b8f9f83c5a96281b136 | 636 | py | Python | env/bin/rst2pseudoxml.py | Raniac/NEURO-LEARN | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | [
"Apache-2.0"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | env/bin/rst2pseudoxml.py | Raniac/neurolearn_dev | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | [
"Apache-2.0"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | env/bin/rst2pseudoxml.py | Raniac/NEURO-LEARN | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | [
"Apache-2.0"
] | 1 | 2020-07-17T12:49:49.000Z | 2020-07-17T12:49:49.000Z | #!/home/bennyray/Projects/neuro-learn/env/bin/python3
# $Id: rst2pseudoxml.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing pseudo-XML.
"""
try:
import lo... | 26.5 | 73 | 0.743711 |
79690530b96b3165d972ad7e0288e56ecbd65fd6 | 540 | py | Python | educa/apps/chat/views.py | eqba1/Personal-E-Learn | 238796f5606e05a66863a105e2edbebc0a85a346 | [
"MIT"
] | null | null | null | educa/apps/chat/views.py | eqba1/Personal-E-Learn | 238796f5606e05a66863a105e2edbebc0a85a346 | [
"MIT"
] | null | null | null | educa/apps/chat/views.py | eqba1/Personal-E-Learn | 238796f5606e05a66863a105e2edbebc0a85a346 | [
"MIT"
] | null | null | null | from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseForbidden
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.template import loader
@login_required
def course_chat_room(request, course_id):
try:
course =... | 27 | 62 | 0.757407 |
7969055534f8c8aafb76fb85e6c5ad33d2c0df86 | 2,112 | py | Python | examples/drqa/interactive.py | rockingdingo/ParlAI | ceb009e1d81d2fec22454667559c6ff02a5624b9 | [
"BSD-3-Clause"
] | null | null | null | examples/drqa/interactive.py | rockingdingo/ParlAI | ceb009e1d81d2fec22454667559c6ff02a5624b9 | [
"BSD-3-Clause"
] | null | null | null | examples/drqa/interactive.py | rockingdingo/ParlAI | ceb009e1d81d2fec22454667559c6ff02a5624b9 | [
"BSD-3-Clause"
] | 1 | 2019-10-10T01:17:09.000Z | 2019-10-10T01:17:09.000Z | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
"""Simple interactive scrip... | 32.492308 | 79 | 0.659091 |
79690618e4d8a5e6f3cc8f0073cada1b478755bc | 435 | py | Python | wsgi_comparison/streamlit_app.py | gerardrbentley/streamlit-random | 9711973519977960365df32f077b58f31277c732 | [
"Apache-2.0"
] | 4 | 2022-03-22T01:44:51.000Z | 2022-03-29T10:14:08.000Z | wsgi_comparison/streamlit_app.py | gerardrbentley/streamlit-random | 9711973519977960365df32f077b58f31277c732 | [
"Apache-2.0"
] | 1 | 2022-03-25T10:19:15.000Z | 2022-03-26T03:51:59.000Z | wsgi_comparison/streamlit_app.py | gerardrbentley/streamlit-random | 9711973519977960365df32f077b58f31277c732 | [
"Apache-2.0"
] | 2 | 2022-03-26T04:09:51.000Z | 2022-03-27T15:06:11.000Z | import streamlit as st
if st.button("Do Something Fun 🎉!"):
st.session_state.show_fun = True
elif 'show_fun' not in st.session_state:
st.session_state.show_fun = False
if st.session_state.show_fun:
fun_input = st.text_area('', placeholder='Type some nonsense then hit cmd/ctrl + enter')
if len(fun_inp... | 36.25 | 92 | 0.703448 |
7969071d02242e46d8993e75cfcec6ccbb912197 | 1,369 | py | Python | modules/TensorBoardWriter.py | AlanPXD/IC-AutoEncoder | ec73cd9928f47e57b7f3ec66efc5ebe37a418199 | [
"MIT"
] | null | null | null | modules/TensorBoardWriter.py | AlanPXD/IC-AutoEncoder | ec73cd9928f47e57b7f3ec66efc5ebe37a418199 | [
"MIT"
] | null | null | null | modules/TensorBoardWriter.py | AlanPXD/IC-AutoEncoder | ec73cd9928f47e57b7f3ec66efc5ebe37a418199 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from os import write
from pandas.core.frame import DataFrame
from tensorflow.python.keras.engine.training import Model
from tensorflow.python.ops import summary_ops_v2
import tensorflow as tf
class TensorBoardWriterABC (ABC):
"""
This class
"""
@abstractmethod... | 22.816667 | 66 | 0.623083 |
796908620537f9434904b8b3535d039f3e45d4bf | 37,148 | py | Python | trello_reporter/charting/models.py | TomasTomecek/trello-reporter | dc5ec1ba2e41b38b814ab0031207c832f179cf1e | [
"MIT"
] | 4 | 2017-10-23T18:42:12.000Z | 2022-03-15T07:31:07.000Z | trello_reporter/charting/models.py | TomasTomecek/trello-reporter | dc5ec1ba2e41b38b814ab0031207c832f179cf1e | [
"MIT"
] | 4 | 2016-08-09T13:35:05.000Z | 2017-05-25T07:48:38.000Z | trello_reporter/charting/models.py | TomasTomecek/trello-reporter | dc5ec1ba2e41b38b814ab0031207c832f179cf1e | [
"MIT"
] | 3 | 2016-10-11T15:17:32.000Z | 2020-03-18T13:42:43.000Z | # -*- coding: utf-8 -*-
"""
notes:
* trello_id -- we don't trust trello's ID system
"""
from __future__ import unicode_literals
import logging
import re
from django.dispatch.dispatcher import receiver
from django.utils.dateparse import parse_datetime
from trello_reporter.charting.constants import SPRINT_CARDS_ACT... | 38.376033 | 116 | 0.59664 |
796909808af5a6e5a416961cd66155fc32ebb439 | 10,803 | py | Python | ghga_service_chassis_lib/object_storage_dao.py | ghga-de/ghga-service-chassis-lib | 7a4d544386a88bec961601f2f838a6a955df6698 | [
"Apache-2.0"
] | 1 | 2021-07-20T07:47:24.000Z | 2021-07-20T07:47:24.000Z | ghga_service_chassis_lib/object_storage_dao.py | ghga-de/ghga-service-chassis-lib | 7a4d544386a88bec961601f2f838a6a955df6698 | [
"Apache-2.0"
] | 20 | 2021-07-02T14:38:57.000Z | 2022-02-09T10:42:41.000Z | ghga_service_chassis_lib/object_storage_dao.py | ghga-de/ghga-service-chassis-lib | 7a4d544386a88bec961601f2f838a6a955df6698 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 - 2022 Universität Tübingen, DKFZ and EMBL
# for the German Human Genome-Phenome Archive (GHGA)
#
# 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/... | 36.251678 | 89 | 0.649449 |
796909d6f18e755d9d021506e08bae5d55c656b3 | 4,326 | py | Python | tests/test_grid.py | divmain/lightyear | f328a2c5113edaab15565d0372e610aa8636ab90 | [
"MIT"
] | 1 | 2015-08-25T12:31:13.000Z | 2015-08-25T12:31:13.000Z | tests/test_grid.py | divmain/lightyear | f328a2c5113edaab15565d0372e610aa8636ab90 | [
"MIT"
] | null | null | null | tests/test_grid.py | divmain/lightyear | f328a2c5113edaab15565d0372e610aa8636ab90 | [
"MIT"
] | null | null | null | from textwrap import dedent
import env
from lightyear import LY
# COLOR OPERATIONS
def test_grid_a():
i = dedent('''
// Configure primary grid with 16 columns.
grid-column-width = 60px
grid-gutter = 32px
.thing
col(8)
''')
o = ('.thing{box-sizing:border-... | 28.460526 | 113 | 0.572122 |
796909eeb5bef53e65eff0bab33386d450fbc9de | 1,741 | py | Python | basal-ganglia/topalidou-et-al-2014/cython/single-trial.py | mtopalid/Neurosciences | 8531d59f8370f0cf7f1b4b1f72e4bf11b96e1354 | [
"BSD-3-Clause"
] | 27 | 2015-01-24T01:14:29.000Z | 2021-06-10T06:50:46.000Z | basal-ganglia/topalidou-et-al-2014/cython/single-trial.py | mtopalid/Neurosciences | 8531d59f8370f0cf7f1b4b1f72e4bf11b96e1354 | [
"BSD-3-Clause"
] | 1 | 2015-02-24T15:44:27.000Z | 2015-02-24T15:44:27.000Z | basal-ganglia/topalidou-et-al-2014/cython/single-trial.py | mtopalid/Neurosciences | 8531d59f8370f0cf7f1b4b1f72e4bf11b96e1354 | [
"BSD-3-Clause"
] | 8 | 2015-10-05T23:02:30.000Z | 2019-12-31T23:46:14.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier
# Distributed under the (new) BSD License.
#
# Contributors: Nicolas P. Rougier (Nicolas.Rougier@inria.fr)
# ------------------------------------------------------------------... | 36.270833 | 79 | 0.552556 |
79690a46397dc3080ffaef4e54c93536eb06ced2 | 46 | py | Python | surreal/test_helpers/__init__.py | PeihongYu/surreal | 2556bd9c362a53e0a94da914ba59b5d4621c4081 | [
"MIT"
] | 471 | 2018-10-29T07:11:54.000Z | 2022-03-31T11:56:00.000Z | surreal/test_helpers/__init__.py | PeihongYu/surreal | 2556bd9c362a53e0a94da914ba59b5d4621c4081 | [
"MIT"
] | 34 | 2018-10-30T12:02:56.000Z | 2019-05-22T07:57:51.000Z | surreal/test_helpers/__init__.py | PeihongYu/surreal | 2556bd9c362a53e0a94da914ba59b5d4621c4081 | [
"MIT"
] | 77 | 2018-10-30T00:51:52.000Z | 2022-03-01T08:26:35.000Z | from .integration_test import integration_test | 46 | 46 | 0.913043 |
79690ab5c6ec52a47ffde4883daf3eb257181101 | 4,927 | py | Python | Betathon/main.py | IdkDwij/Termithon | 304de15a3adcd2726223d3dde6e45fb0533ae28a | [
"Apache-2.0"
] | 2 | 2022-01-28T23:08:25.000Z | 2022-02-20T15:59:57.000Z | Betathon/main.py | IdkDwij/Termithon | 304de15a3adcd2726223d3dde6e45fb0533ae28a | [
"Apache-2.0"
] | 4 | 2022-02-08T21:56:40.000Z | 2022-03-02T16:30:05.000Z | Betathon/main.py | IdkDwij/Termithon | 304de15a3adcd2726223d3dde6e45fb0533ae28a | [
"Apache-2.0"
] | 2 | 2022-02-04T01:44:40.000Z | 2022-02-16T15:36:39.000Z | import getpass
import os
import random
import socket
from uuid import getnode as get_mac
mac = get_mac()
# Made in python
# collaborated with https://github.com/BigBoyTaco/ for this little update
# thanks for green1490#2863 for helping me with arguments
print('Termithon')
idkdwij = '''
I D K ... | 26.777174 | 136 | 0.55754 |
79690b22f1d03d59f49fc664a80107a694e5bf01 | 227 | py | Python | app/Owner.py | kinr-jay/masonite_auth_example | 9378feab4793d85d14c6a89d17bc39dbfa123998 | [
"MIT"
] | null | null | null | app/Owner.py | kinr-jay/masonite_auth_example | 9378feab4793d85d14c6a89d17bc39dbfa123998 | [
"MIT"
] | null | null | null | app/Owner.py | kinr-jay/masonite_auth_example | 9378feab4793d85d14c6a89d17bc39dbfa123998 | [
"MIT"
] | null | null | null | """Owner Model."""
from masoniteorm.models import Model
from masoniteorm.relationships import has_many
class Owner(Model):
@has_many("id", "owner_id")
def dogs(self):
from app.Dog import Dog
return Dog | 22.7 | 46 | 0.687225 |
79690b46c91f04c98e810a0daa7f08d28c08e493 | 3,357 | py | Python | data_prep_code/cluster_embeddings_emotional.py | hitzkrieg/CourteousStyleTransfer | 24bfc4cacc121aa60d8949d2c4817fe142b0b3ef | [
"Apache-2.0"
] | null | null | null | data_prep_code/cluster_embeddings_emotional.py | hitzkrieg/CourteousStyleTransfer | 24bfc4cacc121aa60d8949d2c4817fe142b0b3ef | [
"Apache-2.0"
] | null | null | null | data_prep_code/cluster_embeddings_emotional.py | hitzkrieg/CourteousStyleTransfer | 24bfc4cacc121aa60d8949d2c4817fe142b0b3ef | [
"Apache-2.0"
] | null | null | null | import numpy as np
from sklearn.cluster import KMeans
from sklearn.metrics import pairwise_distances_argmin_min
from tqdm import tqdm
from sklearn.cluster import DBSCAN, MiniBatchKMeans
from sklearn import metrics
from time import time
import pickle
def unpickle_2(filename):
with open(filename, 'rb') as fp:
return... | 32.592233 | 92 | 0.687221 |
79690b64fc2e2f332cb206e6a2ce26da8da85459 | 997 | py | Python | src/toxn/config/__init__.py | gaborbernat/toxn | 1ecb1121b3e3dc30b892b0254cb5566048b5d2e7 | [
"MIT"
] | 4 | 2018-04-15T15:12:32.000Z | 2019-06-03T12:41:06.000Z | src/toxn/config/__init__.py | gaborbernat/tox3 | 1ecb1121b3e3dc30b892b0254cb5566048b5d2e7 | [
"MIT"
] | 3 | 2018-03-15T11:06:30.000Z | 2018-04-15T15:17:29.000Z | src/toxn/config/__init__.py | gaborbernat/tox3 | 1ecb1121b3e3dc30b892b0254cb5566048b5d2e7 | [
"MIT"
] | 1 | 2019-09-25T19:53:09.000Z | 2019-09-25T19:53:09.000Z | """configuration objects
these are a join of user provided inputs:
- cli
- environment variable
- tox config file
and generated by the running of these tool (referred to as state).
"""
from pathlib import Path
from typing import IO, Sequence, Union
from toxn.config.models.core import root_dir
from .cli import parse
f... | 31.15625 | 84 | 0.762287 |
79690d5f7a68b6e88ad1eedeb4874d37ed7038b4 | 3,581 | py | Python | github/Installation.py | devnoname120/gist-alfred | 5e918566254b6891241be3ad6e2f6c77959052ff | [
"MIT"
] | 113 | 2015-06-24T19:36:22.000Z | 2022-03-05T05:15:49.000Z | github/Installation.py | devnoname120/gist-alfred | 5e918566254b6891241be3ad6e2f6c77959052ff | [
"MIT"
] | 18 | 2016-05-03T08:21:54.000Z | 2022-03-26T18:24:21.000Z | github/Installation.py | devnoname120/gist-alfred | 5e918566254b6891241be3ad6e2f6c77959052ff | [
"MIT"
] | 13 | 2015-07-02T03:16:04.000Z | 2022-03-15T10:42:38.000Z | # -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2017 Jannis Gebauer <ja.geb@me.com> #
# Copyright 2017 Simon <spam@esemi.ru> ... | 44.209877 | 129 | 0.516615 |
79690e202ae3175e244d3889a4da7644cb3b14e2 | 3,098 | py | Python | src/py/test_patches_2class.py | rtiglobalhealth/trachoma | 5aac19f7af45ed99a14e6712cda7e8c1f4118bbd | [
"Apache-2.0"
] | null | null | null | src/py/test_patches_2class.py | rtiglobalhealth/trachoma | 5aac19f7af45ed99a14e6712cda7e8c1f4118bbd | [
"Apache-2.0"
] | null | null | null | src/py/test_patches_2class.py | rtiglobalhealth/trachoma | 5aac19f7af45ed99a14e6712cda7e8c1f4118bbd | [
"Apache-2.0"
] | 2 | 2021-01-07T17:21:05.000Z | 2021-09-14T19:18:30.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
from tensorflow.keras import layers
from tensorflow.keras.applications.resnet50 import preprocess_input
import json
import os
import glob
import sys
import pandas as p... | 29.788462 | 117 | 0.668496 |
79690eb1b57dbea00ed7e2c706e44a4077483192 | 1,945 | py | Python | packages/w3af/w3af/core/controllers/vdaemon/elf.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | 3 | 2019-04-09T22:59:33.000Z | 2019-06-14T09:23:24.000Z | tools/w3af/w3af/core/controllers/vdaemon/elf.py | sravani-m/Web-Application-Security-Framework | d9f71538f5cba6fe1d8eabcb26c557565472f6a6 | [
"MIT"
] | null | null | null | tools/w3af/w3af/core/controllers/vdaemon/elf.py | sravani-m/Web-Application-Security-Framework | d9f71538f5cba6fe1d8eabcb26c557565472f6a6 | [
"MIT"
] | null | null | null | """
elf.py
Copyright 2006 Andres Riancho
This file is part of w3af, http://w3af.org/ .
w3af 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 version 2 of the License.
w3af is distributed in the hope that it will... | 32.416667 | 97 | 0.669409 |
79690f46a395edae2c7dd832ae052535860b3ba2 | 13,213 | py | Python | test/unit/models/test_proposals.py | sirrok/sentinel | b13db5204ce46dc31489d6aa6d3619a8992dca90 | [
"MIT"
] | null | null | null | test/unit/models/test_proposals.py | sirrok/sentinel | b13db5204ce46dc31489d6aa6d3619a8992dca90 | [
"MIT"
] | null | null | null | test/unit/models/test_proposals.py | sirrok/sentinel | b13db5204ce46dc31489d6aa6d3619a8992dca90 | [
"MIT"
] | null | null | null | import pytest
import sys
import os
import time
os.environ['SENTINEL_ENV'] = 'test'
os.environ['SENTINEL_CONFIG'] = os.path.normpath(os.path.join(os.path.dirname(__file__), '../../test_sentinel.conf'))
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '../../../lib')))
import misc
import config
fr... | 52.852 | 3,630 | 0.779914 |
79690f9efd0242787e5705c172e32a96d7fad323 | 8,978 | py | Python | agent/agentBYOL.py | Orithu/curl_rainbow | f372bd538b9381684c3e300f4be7353ecb2a980c | [
"MIT"
] | null | null | null | agent/agentBYOL.py | Orithu/curl_rainbow | f372bd538b9381684c3e300f4be7353ecb2a980c | [
"MIT"
] | null | null | null | agent/agentBYOL.py | Orithu/curl_rainbow | f372bd538b9381684c3e300f4be7353ecb2a980c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2017 Kai Arulkumaran
#
# 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,... | 50.156425 | 434 | 0.679884 |
7969103215ccfbf1b1b95bd3ef69c5a3ea83fc66 | 6,635 | py | Python | src/sentry/api/endpoints/organization_release_files.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 2 | 2019-03-04T12:45:54.000Z | 2019-03-04T12:45:55.000Z | src/sentry/api/endpoints/organization_release_files.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 196 | 2019-06-10T08:34:10.000Z | 2022-02-22T01:26:13.000Z | src/sentry/api/endpoints/organization_release_files.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import re
import logging
from django.db import IntegrityError, transaction
from rest_framework.response import Response
from sentry.api.base import DocSection
from sentry.api.bases.organization import OrganizationReleasesBaseEndpoint
from sentry.api.content_negotiation import Co... | 36.059783 | 99 | 0.594424 |
7969106ba1995fb42a4747e5653cea4e425d456f | 2,042 | py | Python | Vault7/Lost-in-Translation/windows/Resources/Ops/PyScripts/lib/ops/data/plugins.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 46 | 2017-05-15T11:15:08.000Z | 2018-07-02T03:32:52.000Z | Vault7/Lost-in-Translation/windows/Resources/Ops/PyScripts/lib/ops/data/plugins.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | null | null | null | Vault7/Lost-in-Translation/windows/Resources/Ops/PyScripts/lib/ops/data/plugins.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 24 | 2017-05-17T03:26:17.000Z | 2018-07-09T07:00:50.000Z |
from ops.data import OpsClass, OpsField, DszObject, DszCommandObject, cmd_definitions
import dsz
if ('plugins' not in cmd_definitions):
dszplugin = OpsClass('plugins', {'address': OpsField('address', dsz.TYPE_STRING), 'plugin': OpsClass('plugin', {'core': OpsField('core', dsz.TYPE_BOOL), 'reallyloaded': OpsFie... | 291.714286 | 1,750 | 0.7238 |
796911a8a2d3f78a00be4ec6bc6d17625d37df31 | 2,014 | py | Python | contents/2_Q_Learning_maze/RL_brain.py | daringpig/RL-from-morvan | d10ff281f60c6828dc38db0d308d4ad8f220f4b9 | [
"MIT"
] | null | null | null | contents/2_Q_Learning_maze/RL_brain.py | daringpig/RL-from-morvan | d10ff281f60c6828dc38db0d308d4ad8f220f4b9 | [
"MIT"
] | null | null | null | contents/2_Q_Learning_maze/RL_brain.py | daringpig/RL-from-morvan | d10ff281f60c6828dc38db0d308d4ad8f220f4b9 | [
"MIT"
] | null | null | null | """
This part of code is the Q learning brain, which is a brain of the agent.
All decisions are made in here.
View more on my tutorial page: https://morvanzhou.github.io/tutorials/
"""
import numpy as np
import pandas as pd
class QLearningTable:
def __init__(self, actions, learning_rate=0.01, reward_decay=0.9, ... | 34.135593 | 99 | 0.607746 |
796911cef6e1d32883d84cea97c46adbe6556420 | 3,004 | py | Python | homeassistant/components/motion_blinds/config_flow.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | homeassistant/components/motion_blinds/config_flow.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 79 | 2020-07-23T07:13:37.000Z | 2022-03-22T06:02:37.000Z | homeassistant/components/motion_blinds/config_flow.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """Config flow to configure Motion Blinds using their WLAN API."""
from motionblinds import MotionDiscovery
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_API_KEY, CONF_HOST
from .const import DEFAULT_GATEWAY_NAME, DOMAIN
from .gateway import ConnectMotionGatewa... | 32.652174 | 86 | 0.6498 |
796913984441c860198c594ee42e5755b3105e73 | 833 | py | Python | src/compas_rcf/install_rhino.py | FatimAmiri/compas_rcf | 6922036dbb033a83b9ff1cc8c016f865f6ee8e34 | [
"MIT"
] | null | null | null | src/compas_rcf/install_rhino.py | FatimAmiri/compas_rcf | 6922036dbb033a83b9ff1cc8c016f865f6ee8e34 | [
"MIT"
] | null | null | null | src/compas_rcf/install_rhino.py | FatimAmiri/compas_rcf | 6922036dbb033a83b9ff1cc8c016f865f6ee8e34 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import compas_rhino.install
__all__ = []
INSTALLABLE_PACKAGES = ['compas_fab', 'roslibpy', 'compas_rcf']
# ==============================================================================
# Main
# ===========... | 28.724138 | 84 | 0.57623 |
7969140754d5358fad93d4d40a5ef8b6c2301fb1 | 1,594 | py | Python | tests/test_stats.py | gordon-shumway-net/peeringdb | a6260ff38ded13ae29d20f13f6d6955a4ad08189 | [
"BSD-2-Clause"
] | null | null | null | tests/test_stats.py | gordon-shumway-net/peeringdb | a6260ff38ded13ae29d20f13f6d6955a4ad08189 | [
"BSD-2-Clause"
] | null | null | null | tests/test_stats.py | gordon-shumway-net/peeringdb | a6260ff38ded13ae29d20f13f6d6955a4ad08189 | [
"BSD-2-Clause"
] | null | null | null | import io
import datetime
import pytest
from .util import ClientCase, Group
from django.core.management import call_command
from django.conf import settings
from django.contrib.auth import get_user_model
from peeringdb_server.models import REFTAG_MAP, UTC
DATE_PAST = datetime.datetime(year=2019, month=11, day=1)
... | 24.90625 | 79 | 0.685696 |
796915284560f4d09fa681121cddcde6cb8bda97 | 4,227 | py | Python | tb_rest_client/api/api_pe/ui_settings_controller_api.py | samson0v/python_tb_rest_client | 08ff7898740f7cec2170e85d5c3c89e222e967f7 | [
"Apache-2.0"
] | 30 | 2020-06-19T06:42:50.000Z | 2021-08-23T21:16:36.000Z | tb_rest_client/api/api_pe/ui_settings_controller_api.py | samson0v/python_tb_rest_client | 08ff7898740f7cec2170e85d5c3c89e222e967f7 | [
"Apache-2.0"
] | 25 | 2021-08-30T01:17:27.000Z | 2022-03-16T14:10:14.000Z | tb_rest_client/api/api_pe/ui_settings_controller_api.py | samson0v/python_tb_rest_client | 08ff7898740f7cec2170e85d5c3c89e222e967f7 | [
"Apache-2.0"
] | 23 | 2020-07-06T13:41:54.000Z | 2021-08-23T21:04:50.000Z | # coding: utf-8
"""
ThingsBoard REST API
ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501
OpenAPI spec version: 3.3.3PAAS-RC1
Contact: info@thingsboard.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_impo... | 34.933884 | 152 | 0.633073 |
796915dc68eefea9870b68dbbd1652a3da5e5786 | 5,845 | py | Python | pinax/projects/social_project/urls.py | jpic/pinax | a9b30e437e4298d74101b45cec0d4dba9702cdd1 | [
"MIT"
] | null | null | null | pinax/projects/social_project/urls.py | jpic/pinax | a9b30e437e4298d74101b45cec0d4dba9702cdd1 | [
"MIT"
] | null | null | null | pinax/projects/social_project/urls.py | jpic/pinax | a9b30e437e4298d74101b45cec0d4dba9702cdd1 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.contrib import admin
admin.autodiscover()
from bookmarks.feeds import BookmarkFeed
from bookmarks.models import BookmarkInstance
from microblogging.feeds import TweetFeedAll,... | 39.761905 | 139 | 0.708469 |
7969163776c167444910c63dcf4b7d02db463bad | 1,206 | py | Python | experiment_runner.py | slawekslex/shopee | 843a912ef067abac19c0273aa8473e01f4184197 | [
"MIT"
] | 1 | 2021-05-28T03:04:47.000Z | 2021-05-28T03:04:47.000Z | experiment_runner.py | slawekslex/shopee | 843a912ef067abac19c0273aa8473e01f4184197 | [
"MIT"
] | null | null | null | experiment_runner.py | slawekslex/shopee | 843a912ef067abac19c0273aa8473e01f4184197 | [
"MIT"
] | 1 | 2021-06-05T16:22:04.000Z | 2021-06-05T16:22:04.000Z |
import subprocess
import random
from train_utils import *
import inspect
def draw_hypers():
class CONF(ConfigClass):
bert_path ='./indobert-base-p2'
arcface_m = random.uniform(0.1,0.8)
arcface_s = random.uniform(10,50)
lr = random.uniform(1e-3,1e-2)
lr_mult = random.randin... | 30.15 | 82 | 0.611111 |
79691808fa3169284d0b2ad6ec82700ca21f80d1 | 276 | py | Python | s3direct/urls.py | jsayles/django-s3direct | 6a35e0e24cdc8f0b2a38bbece08864de18a04ab0 | [
"MIT"
] | null | null | null | s3direct/urls.py | jsayles/django-s3direct | 6a35e0e24cdc8f0b2a38bbece08864de18a04ab0 | [
"MIT"
] | null | null | null | s3direct/urls.py | jsayles/django-s3direct | 6a35e0e24cdc8f0b2a38bbece08864de18a04ab0 | [
"MIT"
] | null | null | null | from django.urls import path
from s3direct.views import get_upload_params, generate_aws_v4_signature
urlpatterns = [
path('get_upload_params/', get_upload_params, name='s3direct'),
path('get_aws_v4_signature/', generate_aws_v4_signature, name='s3direct-signing'),
]
| 30.666667 | 86 | 0.789855 |
7969185fdbc241d4beba6cceda96fb367c8e2124 | 429 | py | Python | src/app.py | Naruita/tinyApps | 13e3949f08c0251897bf35aa5650b110de276d27 | [
"MIT"
] | 1 | 2020-09-15T10:46:30.000Z | 2020-09-15T10:46:30.000Z | src/app.py | Naruita/tinyApps | 13e3949f08c0251897bf35aa5650b110de276d27 | [
"MIT"
] | 5 | 2020-05-25T16:39:14.000Z | 2020-11-08T19:11:46.000Z | src/app.py | Naruita/tinyApps | 13e3949f08c0251897bf35aa5650b110de276d27 | [
"MIT"
] | 2 | 2020-05-25T16:15:30.000Z | 2020-06-16T07:13:56.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# importing various different applications
from components import crackChecker, datasetMaker, oneSpotApp, oneSpotTabs, YTsearch
class Blueprint:
@staticmethod
def run():
print("Here's a list of tinyApps that are ready to be run!")
print("1. oneSpotApp... | 26.8125 | 84 | 0.657343 |
796918fe65c51cce6c79295aaa6b5dbb4e690855 | 5,192 | py | Python | archive/templates/first_level_model_wrapper.py | cnlab/cnlab_pipeline | 979e2fcdfe9113deec1bc9bad17c2624c1e516bb | [
"MIT"
] | null | null | null | archive/templates/first_level_model_wrapper.py | cnlab/cnlab_pipeline | 979e2fcdfe9113deec1bc9bad17c2624c1e516bb | [
"MIT"
] | 1 | 2022-03-25T20:40:02.000Z | 2022-03-25T20:40:02.000Z | archive/templates/first_level_model_wrapper.py | cnlab/cnlab_pipeline | 979e2fcdfe9113deec1bc9bad17c2624c1e516bb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Building first level models using _nipype_ and _SPM12_
# HOW TO USE
#
# * You should not need to change anything in this script, only the inputs to this script
#
# * Inputs to the script are:
# 1. `MODELSPEC` - the full/absolute path to the model JSON file (__REQUIRED__)... | 34.384106 | 165 | 0.674307 |
7969196a00379e9236f1d69edba634b39c95e953 | 14,626 | py | Python | tensorflow/python/data/kernel_tests/dataset_from_generator_op_test.py | imdone/tensorflow | bb4d1ef3861c83627ee9586b85ac3070a7d38335 | [
"Apache-2.0"
] | 1 | 2021-04-16T14:53:22.000Z | 2021-04-16T14:53:22.000Z | tensorflow/python/data/kernel_tests/dataset_from_generator_op_test.py | imdone/tensorflow | bb4d1ef3861c83627ee9586b85ac3070a7d38335 | [
"Apache-2.0"
] | 10 | 2018-02-04T18:41:52.000Z | 2018-05-02T09:00:46.000Z | tensorflow/python/data/kernel_tests/dataset_from_generator_op_test.py | imdone/tensorflow | bb4d1ef3861c83627ee9586b85ac3070a7d38335 | [
"Apache-2.0"
] | 4 | 2018-01-17T14:22:49.000Z | 2018-02-27T15:06:41.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.656642 | 88 | 0.678928 |
79691a89bf279a3986a01cac07ee1af8c389c120 | 3,087 | py | Python | bot/plugins/giveaway.py | Preocts/twitch-chat-bot | 50341c30d8eada4b50634c8f25a9eb0eed681735 | [
"MIT"
] | 62 | 2019-11-16T22:07:42.000Z | 2022-03-08T20:50:01.000Z | bot/plugins/giveaway.py | Preocts/twitch-chat-bot | 50341c30d8eada4b50634c8f25a9eb0eed681735 | [
"MIT"
] | 30 | 2019-03-19T15:05:55.000Z | 2022-03-24T05:00:53.000Z | bot/plugins/giveaway.py | Preocts/twitch-chat-bot | 50341c30d8eada4b50634c8f25a9eb0eed681735 | [
"MIT"
] | 56 | 2019-06-08T20:34:31.000Z | 2022-02-21T20:10:38.000Z | from __future__ import annotations
import random
from typing import Match
import aiosqlite
from bot.config import Config
from bot.data import command
from bot.data import esc
from bot.data import format_msg
from bot.permissions import is_moderator
from bot.permissions import is_subscriber
async def ensure_giveaway... | 31.824742 | 74 | 0.654681 |
79691a8b24386dca8fd12050837f723889d2f0b9 | 1,068 | py | Python | upstream/wav2vec2_hug/expert.py | OlegJakushkin/s3prl | c0e41f07fa56f0f79b5bf3839b4d0a4cf7c421bf | [
"MIT"
] | 1 | 2021-06-17T13:20:12.000Z | 2021-06-17T13:20:12.000Z | upstream/wav2vec2_hug/expert.py | OlegJakushkin/s3prl | c0e41f07fa56f0f79b5bf3839b4d0a4cf7c421bf | [
"MIT"
] | null | null | null | upstream/wav2vec2_hug/expert.py | OlegJakushkin/s3prl | c0e41f07fa56f0f79b5bf3839b4d0a4cf7c421bf | [
"MIT"
] | null | null | null | from typing import List
import torch.nn as nn
from torch.tensor import Tensor
from transformers import Wav2Vec2Processor, Wav2Vec2Model
SAMPLE_RATE = 16000
class UpstreamExpert(nn.Module):
def __init__(self, ckpt: str = None, model_config: str = None, **kwargs):
super().__init__()
self.processo... | 31.411765 | 77 | 0.64794 |
79691bce4dc890e74c7a68da0c9e5dd258306068 | 812 | py | Python | gqn/mathematics.py | musyoku/chainer-gqn-playground | 657bb931d2c531ff8f078fcb1686bbf1999afa7f | [
"MIT"
] | null | null | null | gqn/mathematics.py | musyoku/chainer-gqn-playground | 657bb931d2c531ff8f078fcb1686bbf1999afa7f | [
"MIT"
] | null | null | null | gqn/mathematics.py | musyoku/chainer-gqn-playground | 657bb931d2c531ff8f078fcb1686bbf1999afa7f | [
"MIT"
] | null | null | null | import math
def yaw(eye, center):
eye_x, eye_z = eye[0], eye[2]
center_x, center_z = center[0], center[2]
eye_direction = (center_x - eye_x, center_z - eye_z)
frontward_direction = (0, 1)
norm_eye = math.sqrt(eye_direction[0] * eye_direction[0] +
eye_direction[1] * eye_dir... | 33.833333 | 72 | 0.594828 |
79691bf8a76b7fdcaaeb7f6bdbec84bfae8bcd29 | 10,231 | py | Python | pip/commands/install.py | michaelw/python-pip-deb | b203a9682d7860b06f07afab3dfb3f44ea2bcec5 | [
"MIT"
] | null | null | null | pip/commands/install.py | michaelw/python-pip-deb | b203a9682d7860b06f07afab3dfb3f44ea2bcec5 | [
"MIT"
] | null | null | null | pip/commands/install.py | michaelw/python-pip-deb | b203a9682d7860b06f07afab3dfb3f44ea2bcec5 | [
"MIT"
] | null | null | null | import os, sys
from pip.req import InstallRequirement, RequirementSet
from pip.req import parse_requirements
from pip.log import logger
from pip.locations import build_prefix, src_prefix
from pip.basecommand import Command
from pip.index import PackageFinder
from pip.exceptions import InstallationError
class InstallC... | 41.254032 | 102 | 0.583716 |
79691d1d10cc52764ba47097a21ec13c4f0fa149 | 637 | py | Python | test/udfs/__init__.py | quanchao/database-implementation | f1a215cc6607a96e05345604ae7b6197f4474c49 | [
"Apache-2.0"
] | 34 | 2019-12-22T06:07:40.000Z | 2022-03-19T13:16:29.000Z | test/udfs/__init__.py | quanchao/database-implementation | f1a215cc6607a96e05345604ae7b6197f4474c49 | [
"Apache-2.0"
] | 88 | 2020-01-29T19:25:19.000Z | 2022-03-25T05:20:52.000Z | test/udfs/__init__.py | quanchao/database-implementation | f1a215cc6607a96e05345604ae7b6197f4474c49 | [
"Apache-2.0"
] | 33 | 2019-12-22T06:00:19.000Z | 2022-02-02T05:28:24.000Z | # coding=utf-8
# Copyright 2018-2020 EVA
#
# 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 ... | 42.466667 | 74 | 0.761381 |
796920f3344b435a0d05e6e9a1fc61b53cebc764 | 17,795 | py | Python | mmaction/datasets/video_dataset.py | apulis/mmaction | fb6c5710dbb6d88a5564b64c096fdd5a749494dd | [
"Apache-2.0"
] | null | null | null | mmaction/datasets/video_dataset.py | apulis/mmaction | fb6c5710dbb6d88a5564b64c096fdd5a749494dd | [
"Apache-2.0"
] | null | null | null | mmaction/datasets/video_dataset.py | apulis/mmaction | fb6c5710dbb6d88a5564b64c096fdd5a749494dd | [
"Apache-2.0"
] | 1 | 2020-02-14T01:17:57.000Z | 2020-02-14T01:17:57.000Z | import mmcv
import glob
import numpy as np
import os.path as osp
from mmcv.parallel import DataContainer as DC
from torch.utils.data import Dataset
from .transforms import (GroupImageTransform)
from .utils import to_tensor
try:
import decord
except ImportError:
pass
class RawFramesRecord(object):
def _... | 39.988764 | 141 | 0.538353 |
796922ca59c53834064523a5b02101016e5861d8 | 3,312 | py | Python | ynab/models/account_wrapper.py | adamwolf/ynab-python | a4ef77dd9680f16fcb6e0983771c47dcfb28239c | [
"Apache-2.0"
] | 18 | 2018-04-11T15:01:26.000Z | 2018-09-06T17:54:14.000Z | ynab/models/account_wrapper.py | adamwolf/ynab-python | a4ef77dd9680f16fcb6e0983771c47dcfb28239c | [
"Apache-2.0"
] | 1 | 2018-07-05T20:02:56.000Z | 2018-08-10T19:55:46.000Z | ynab/models/account_wrapper.py | adamwolf/ynab-python | a4ef77dd9680f16fcb6e0983771c47dcfb28239c | [
"Apache-2.0"
] | 5 | 2018-06-20T05:30:54.000Z | 2019-01-09T14:47:15.000Z | # coding: utf-8
"""
YNAB API Endpoints
Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudge... | 28.551724 | 294 | 0.577899 |
796923f7066078a5e2198c5217cbb329079d9604 | 571 | py | Python | env/lib/python3.8/site-packages/plotly/validators/histogram2d/hoverlabel/_namelength.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/histogram2d/hoverlabel/_namelength.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/histogram2d/hoverlabel/_namelength.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="namelength", parent_name="histogram2d.hoverlabel", **kwargs
):
super(NamelengthValidator, self).__init__(
plotly_name=plotly_name,
... | 33.588235 | 86 | 0.62697 |
7969247306a7eaead7e3979cf9b3e0eb87aca3d8 | 9,203 | py | Python | lib/layer_utils/proposal_target_layer.py | Smallflyfly/3d_pose_estimation_regression_method_sunrgbd | 7ec26c4efcde774c7fca565e608b955f54f4af1b | [
"MIT"
] | 3 | 2019-01-31T15:40:27.000Z | 2019-05-13T08:02:41.000Z | lib/layer_utils/proposal_target_layer.py | Smallflyfly/3d_pose_estimation_regression_method_sunrgbd | 7ec26c4efcde774c7fca565e608b955f54f4af1b | [
"MIT"
] | 1 | 2019-01-31T15:42:07.000Z | 2019-01-31T15:55:07.000Z | lib/layer_utils/proposal_target_layer.py | Smallflyfly/3d_pose_estimation_regression_method_sunrgbd | 7ec26c4efcde774c7fca565e608b955f54f4af1b | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Faster R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick, Sean Bell and Xinlei Chen
# --------------------------------------------------------
from __future__ import absolute_import
from... | 40.364035 | 162 | 0.722699 |
7969247646bbd7c799bbf57c5d3eafae62542251 | 4,804 | py | Python | _gmdb/cmd/search.py | mxk/gmdb | 1344069a175afbca0593e4460d99889a2acf86d8 | [
"BSD-2-Clause"
] | 2 | 2015-10-16T20:56:07.000Z | 2015-12-27T14:31:47.000Z | _gmdb/cmd/search.py | mxk/gmdb | 1344069a175afbca0593e4460d99889a2acf86d8 | [
"BSD-2-Clause"
] | null | null | null | _gmdb/cmd/search.py | mxk/gmdb | 1344069a175afbca0593e4460d99889a2acf86d8 | [
"BSD-2-Clause"
] | 1 | 2020-10-29T20:40:09.000Z | 2020-10-29T20:40:09.000Z |
#
# Written by Maxim Khitrov (July 2011)
#
from . import Command
from .. import DBControl, conf
from ..db import uint64
import time
# TODO: Add an option to update thr_id during backup (test performance first)
class search(Command):
"""Search message index.
This command is used to create a message ID file, whic... | 34.070922 | 77 | 0.692756 |
796924dc339738f40af48e1c1c6641ac2104fdd8 | 1,739 | py | Python | dbops_venv/lib/python3.5/site-packages/bleach/tests/test_unicode.py | fractal520/dbops | 20c6b6b5669e09b43cd19e6f3fa0448bc7d5eaac | [
"MIT"
] | 15 | 2016-02-24T06:32:57.000Z | 2020-06-17T05:06:36.000Z | dbops_venv/lib/python3.5/site-packages/bleach/tests/test_unicode.py | fractal520/dbops | 20c6b6b5669e09b43cd19e6f3fa0448bc7d5eaac | [
"MIT"
] | 5 | 2020-03-24T15:33:06.000Z | 2021-02-02T21:42:36.000Z | dbops_venv/lib/python3.5/site-packages/bleach/tests/test_unicode.py | fractal520/dbops | 20c6b6b5669e09b43cd19e6f3fa0448bc7d5eaac | [
"MIT"
] | 4 | 2017-02-04T13:45:31.000Z | 2018-07-05T11:57:24.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from nose.tools import eq_
from bleach import clean, linkify
from bleach.tests.tools import in_
def test_japanese_safe_simple():
eq_('ヘルプとチュートリアル', clean('ヘルプとチュートリアル'))
eq_('ヘルプとチュートリアル', linkify('ヘルプとチュートリアル'))
def test_japanese_strip():
... | 28.983333 | 70 | 0.616446 |
796925861c88d12664ddc5a53756caf34590065b | 8,191 | py | Python | ansible/plugins/callback/foreman.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 1 | 2022-01-25T22:52:58.000Z | 2022-01-25T22:52:58.000Z | ansible/plugins/callback/foreman.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | ansible/plugins/callback/foreman.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# (c) 2015, 2016 Daniel Lobato <elobatocs@gmail.com>
# (c) 2016 Guido Günther <agx@sigxcpu.org>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass_... | 35.306034 | 121 | 0.581248 |
7969276eee0a619bbfbed3f9ccf5d9d242273c55 | 1,497 | py | Python | src/pretix/helpers/cache.py | fabm3n/pretix | 520fb620888d5c434665a6a4a33cb2ab22dd42c7 | [
"Apache-2.0"
] | 1,248 | 2015-04-24T13:32:06.000Z | 2022-03-29T07:01:36.000Z | src/pretix/helpers/cache.py | fabm3n/pretix | 520fb620888d5c434665a6a4a33cb2ab22dd42c7 | [
"Apache-2.0"
] | 2,113 | 2015-02-18T18:58:16.000Z | 2022-03-31T11:12:32.000Z | src/pretix/helpers/cache.py | fabm3n/pretix | 520fb620888d5c434665a6a4a33cb2ab22dd42c7 | [
"Apache-2.0"
] | 453 | 2015-05-13T09:29:06.000Z | 2022-03-24T13:39:16.000Z | #
# This file is part of pretix (Community Edition).
#
# Copyright (C) 2014-2020 Raphael Michel and contributors
# Copyright (C) 2020-2021 rami.io GmbH and contributors
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by ... | 48.290323 | 118 | 0.769539 |
79692785b1277dc43afc518ee949316e85353fff | 853 | py | Python | kornia/utils/__init__.py | Ishticode/kornia | 974abb43ec72d12dbd244a2fb247bbbab8498de0 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2022-03-15T02:24:30.000Z | 2022-03-15T02:24:30.000Z | kornia/utils/__init__.py | Ishticode/kornia | 974abb43ec72d12dbd244a2fb247bbbab8498de0 | [
"ECL-2.0",
"Apache-2.0"
] | 14 | 2021-09-26T11:07:56.000Z | 2022-03-20T11:11:15.000Z | kornia/utils/__init__.py | Ishticode/kornia | 974abb43ec72d12dbd244a2fb247bbbab8498de0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from .draw import draw_line, draw_rectangle
from .grid import create_meshgrid, create_meshgrid3d
from .helpers import _extract_device_dtype, safe_inverse_with_mask, safe_solve_with_mask
from .image import ImageToTensor, image_list_to_tensor, image_to_tensor, tensor_to_image
from .memory import batched_forward
from .mis... | 29.413793 | 88 | 0.763189 |
796927f0fa8bdf9cace760425ae61832f68b8c76 | 1,608 | py | Python | walbert.py | ErkHal/walbert | 359e6806eab2eedd82182e12783db99726cc8184 | [
"WTFPL"
] | 3 | 2019-02-11T15:11:26.000Z | 2021-02-05T06:49:24.000Z | walbert.py | ErkHal/walbert | 359e6806eab2eedd82182e12783db99726cc8184 | [
"WTFPL"
] | null | null | null | walbert.py | ErkHal/walbert | 359e6806eab2eedd82182e12783db99726cc8184 | [
"WTFPL"
] | 2 | 2019-09-15T16:17:38.000Z | 2020-08-06T14:49:01.000Z | #!/usr/bin/env python
# Uses PyWal colors and adds them to a predefined Albert launcher theme
__author__ = "ErkHal"
import os
import json
import cssutils
#Edit these to change the color variables assigned to the QSS rules
SELECTION_COLOR = 'color6'
pywalFilepath = os.path.join(os.environ['HOME'], '.cache/wal/colors... | 36.545455 | 106 | 0.679726 |
7969280d2c8a5361cd3931236f1f0ee59cbb6934 | 3,841 | py | Python | Question_31_40/answers_py/answer_40.py | lusi1990/ImageProcessing100Wen | 3682e1d68a1b8472818402df2cc75ded82bb1805 | [
"MIT"
] | null | null | null | Question_31_40/answers_py/answer_40.py | lusi1990/ImageProcessing100Wen | 3682e1d68a1b8472818402df2cc75ded82bb1805 | [
"MIT"
] | null | null | null | Question_31_40/answers_py/answer_40.py | lusi1990/ImageProcessing100Wen | 3682e1d68a1b8472818402df2cc75ded82bb1805 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import matplotlib.pyplot as plt
# DCT hyoer-parameter
T = 8
K = 8
channel = 3
# BGR -> Y Cb Cr
def BGR2YCbCr(img):
H, W, _ = img.shape
ycbcr = np.zeros([H, W, 3], dtype=np.float32)
ycbcr[..., 0] = 0.2990 * img[..., 2] + 0.5870 * img[..., 1] + 0.1140 * img[..., 0]
ycbcr... | 22.331395 | 99 | 0.460817 |
7969283325131a696699c0f2030ce89029d505eb | 456 | py | Python | src/chapter8/exercise5.py | group3BSE1/BSE-2021 | c3d04df5afb97a742858d72e0699a65de072f26f | [
"MIT"
] | null | null | null | src/chapter8/exercise5.py | group3BSE1/BSE-2021 | c3d04df5afb97a742858d72e0699a65de072f26f | [
"MIT"
] | null | null | null | src/chapter8/exercise5.py | group3BSE1/BSE-2021 | c3d04df5afb97a742858d72e0699a65de072f26f | [
"MIT"
] | 1 | 2021-04-09T09:26:27.000Z | 2021-04-09T09:26:27.000Z | while True:
fname = input('Enter file name:')
try:
hfile = open(fname)
break
except:
hfile = None
print('File not exist')
continue
list_mails = []
for line in hfile:
if line.startswith('From '):
mails = line.split()
list_mails.append(m... | 26.823529 | 84 | 0.58114 |
7969284505db40290b4c0f02e99206801b95e3db | 22,050 | py | Python | lib/galaxy/managers/hdas.py | itisAliRH/galaxy | b3b693ea0788f773442c8481472a87f43ccb10d7 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/managers/hdas.py | itisAliRH/galaxy | b3b693ea0788f773442c8481472a87f43ccb10d7 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/managers/hdas.py | itisAliRH/galaxy | b3b693ea0788f773442c8481472a87f43ccb10d7 | [
"CC-BY-3.0"
] | null | null | null | """
Manager and Serializer for HDAs.
HistoryDatasetAssociations (HDAs) are datasets contained or created in a
history.
"""
import gettext
import logging
import os
from typing import (
Any,
Dict,
List,
)
from sqlalchemy.orm.session import object_session
from galaxy import (
datatypes,
exceptions,
... | 37.821612 | 121 | 0.614785 |
796928b1d8589b760bd0cfebb908bcae6c654d8e | 4,477 | py | Python | bif_moderate_coupling/beta = 0.2/moderate_coupling_gamma_range.py | helene-todd/M2_thesis_code | f844d6652229c6abe09bd40aa43f5002faa9e5ba | [
"MIT"
] | null | null | null | bif_moderate_coupling/beta = 0.2/moderate_coupling_gamma_range.py | helene-todd/M2_thesis_code | f844d6652229c6abe09bd40aa43f5002faa9e5ba | [
"MIT"
] | null | null | null | bif_moderate_coupling/beta = 0.2/moderate_coupling_gamma_range.py | helene-todd/M2_thesis_code | f844d6652229c6abe09bd40aa43f5002faa9e5ba | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import math
from shapely import geometry
import os
# TODO : write to file in xppaut style rather than like this.. or open weak coupling solution
c = ['#511845', '#900c3f', '#c70039', '#ff5733']
s = ['-', '--']
flatten = lambda t: [item for sublist in contour1.collec... | 38.930435 | 236 | 0.609337 |
7969293579d09732b0145c0e2d66733a9910c21d | 17,510 | py | Python | ceilometer/network/statistics/opendaylight/driver.py | mail2nsrajesh/ceilometer | f53ab18125cc2efc9a9d492a9c1e4acbc2e28d90 | [
"Apache-2.0"
] | null | null | null | ceilometer/network/statistics/opendaylight/driver.py | mail2nsrajesh/ceilometer | f53ab18125cc2efc9a9d492a9c1e4acbc2e28d90 | [
"Apache-2.0"
] | null | null | null | ceilometer/network/statistics/opendaylight/driver.py | mail2nsrajesh/ceilometer | f53ab18125cc2efc9a9d492a9c1e4acbc2e28d90 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2013 NEC 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 applicable... | 39.17226 | 79 | 0.564592 |
79692a08193a3831c10ee74586f4ee110b29f6b3 | 2,496 | py | Python | python/cusignal/test/test_peak_finding.py | zz4fap/cusignal | b753c8f02dfe660cc7c70c8c49d2ac7ef6fa25b1 | [
"Apache-2.0"
] | 1 | 2021-05-16T20:30:20.000Z | 2021-05-16T20:30:20.000Z | python/cusignal/test/test_peak_finding.py | zz4fap/cusignal | b753c8f02dfe660cc7c70c8c49d2ac7ef6fa25b1 | [
"Apache-2.0"
] | null | null | null | python/cusignal/test/test_peak_finding.py | zz4fap/cusignal | b753c8f02dfe660cc7c70c8c49d2ac7ef6fa25b1 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019-2020, NVIDIA 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... | 32 | 77 | 0.673878 |
79692a198629187fda08a5522f1be30cba89d035 | 2,854 | py | Python | analytics/object/detect-object.py | xwu2git/Smart-City-Sample | 192aa460e5075e4fb08e8924983720f8b28571f1 | [
"BSD-3-Clause"
] | 126 | 2019-07-15T14:44:54.000Z | 2022-03-22T11:03:50.000Z | analytics/object/detect-object.py | xwu2git/Smart-City-Sample | 192aa460e5075e4fb08e8924983720f8b28571f1 | [
"BSD-3-Clause"
] | 97 | 2019-07-16T18:28:29.000Z | 2022-03-16T07:27:57.000Z | analytics/object/detect-object.py | xwu2git/Smart-City-Sample | 192aa460e5075e4fb08e8924983720f8b28571f1 | [
"BSD-3-Clause"
] | 74 | 2019-07-15T14:45:02.000Z | 2022-03-23T12:10:03.000Z | #!/usr/bin/python3
from db_ingest import DBIngest
from db_query import DBQuery
from signal import signal, SIGTERM
from rec2db import Rec2DB
from runva import RunVA
from language import text
from threading import Event
from configuration import env
import traceback
scenario = env["SCENARIO"]
office = list(map(float, e... | 30.042105 | 161 | 0.632796 |
79692c08a626997e689a08e6013d88cf46b09f16 | 6,545 | py | Python | zoo/unet/unet_c.py | robertlugg/keras-idiomatic-programmer | 6e33411d9eb1b170387aa0a9e7cf34fbbc84e59c | [
"Apache-2.0"
] | 1 | 2021-07-06T23:23:41.000Z | 2021-07-06T23:23:41.000Z | zoo/unet/unet_c.py | robertlugg/keras-idiomatic-programmer | 6e33411d9eb1b170387aa0a9e7cf34fbbc84e59c | [
"Apache-2.0"
] | null | null | null | zoo/unet/unet_c.py | robertlugg/keras-idiomatic-programmer | 6e33411d9eb1b170387aa0a9e7cf34fbbc84e59c | [
"Apache-2.0"
] | 1 | 2020-05-15T07:13:02.000Z | 2020-05-15T07:13:02.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 33.911917 | 96 | 0.592819 |
79692d79cdd28819a54b0ba2c6839ff0689eeff0 | 1,285 | py | Python | origamibot/core/util.py | cmd410/OrigamiBot | 03667d069f0c0b088671936ce36bf8f85a029b93 | [
"MIT"
] | 4 | 2020-06-30T10:32:54.000Z | 2020-11-01T23:07:58.000Z | origamibot/core/util.py | cmd410/OrigamiBot | 03667d069f0c0b088671936ce36bf8f85a029b93 | [
"MIT"
] | 6 | 2020-06-26T23:14:59.000Z | 2020-07-26T11:48:07.000Z | origamibot/core/util.py | cmd410/OrigamiBot | 03667d069f0c0b088671936ce36bf8f85a029b93 | [
"MIT"
] | 1 | 2020-07-28T08:52:51.000Z | 2020-07-28T08:52:51.000Z | from inspect import signature, BoundArguments
from typing import Optional
def check_args(method, args) -> Optional[BoundArguments]:
"""Checks if arguments are suitable for given method.
Returns BoundArguments, or None on failure.
"""
try:
bound_args = signature(method).bind(*args)
bou... | 33.815789 | 75 | 0.564202 |
79692d80b4c988f99b5371ef9409f2d08d4c0046 | 8,533 | py | Python | utils.py | marcomusy/welsh_embryo_stager | 9a9280bf6681d625568c97bb22334bb7cdfa12ea | [
"MIT"
] | null | null | null | utils.py | marcomusy/welsh_embryo_stager | 9a9280bf6681d625568c97bb22334bb7cdfa12ea | [
"MIT"
] | 1 | 2022-03-14T18:14:23.000Z | 2022-03-14T18:14:29.000Z | utils.py | marcomusy/welsh_embryo_stager | 9a9280bf6681d625568c97bb22334bb7cdfa12ea | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
from vedo.utils import sortByColumn
from vedo import Plotter, Points, Spline
from scipy import signal
import os
#########################################################################
class SplinePlotter(Plotter):
def __init__(self, **kwargs):
... | 31.839552 | 98 | 0.50041 |
79692eadae261d5d4839a9f9ba84420ebdc46dfa | 17,620 | py | Python | recbole/model/general_recommender/nncf.py | ShanleiMu/RecBole-1 | 9ec15faf90126dfb512901d0f2303ef3c2efb71d | [
"MIT"
] | null | null | null | recbole/model/general_recommender/nncf.py | ShanleiMu/RecBole-1 | 9ec15faf90126dfb512901d0f2303ef3c2efb71d | [
"MIT"
] | null | null | null | recbole/model/general_recommender/nncf.py | ShanleiMu/RecBole-1 | 9ec15faf90126dfb512901d0f2303ef3c2efb71d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2021/1/14
# @Author : Chengyuan Li
# @Email : 2017202049@ruc.edu.cn
r"""
NNCF
################################################
Reference:
Ting Bai et al. "A Neural Collaborative Filtering Model with Interaction-based Neighborhood." in CIKM 2017.
Reference code:
... | 44.160401 | 145 | 0.617253 |
7969304dd742efcdf2b49acf6945021b2f92d5a8 | 8,944 | py | Python | neutron/tests/unit/objects/test_common_types.py | igor-toga/local-snat | 7adfe5668d309ff56350acee0d0b986e670abe7c | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/objects/test_common_types.py | igor-toga/local-snat | 7adfe5668d309ff56350acee0d0b986e670abe7c | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/objects/test_common_types.py | igor-toga/local-snat | 7adfe5668d309ff56350acee0d0b986e670abe7c | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 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... | 40.107623 | 79 | 0.645125 |
796930517d8d3e4c4978d951cab65ae66d18ee18 | 17,415 | py | Python | gerrit/changes/revision/__init__.py | sstoefe/python-gerrit-api | 9fc370224a291878987d422702dc9293930e2da6 | [
"MIT"
] | 59 | 2020-11-02T02:09:14.000Z | 2022-02-18T07:43:10.000Z | gerrit/changes/revision/__init__.py | sstoefe/python-gerrit-api | 9fc370224a291878987d422702dc9293930e2da6 | [
"MIT"
] | 20 | 2020-12-18T08:03:11.000Z | 2022-03-30T16:04:19.000Z | gerrit/changes/revision/__init__.py | sstoefe/python-gerrit-api | 9fc370224a291878987d422702dc9293930e2da6 | [
"MIT"
] | 15 | 2020-11-20T13:29:27.000Z | 2022-03-01T07:25:13.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Author: Jialiang Shi
try:
from urllib.parse import quote_plus
except ImportError:
from urllib import quote_plus
from gerrit.changes.revision.drafts import GerritChangeRevisionDrafts
from gerrit.changes.revision.comments import GerritChangeRevisionComments
from ge... | 36.818182 | 120 | 0.600517 |
79693067ba4994a72673e670fb3b47f8b964c52c | 17,846 | py | Python | calib/pre_process-SOAO.py | SilverRon/gppy | 0ee56ca270af62afe1702fce37bef30add14f12a | [
"MIT"
] | 4 | 2019-05-08T08:08:59.000Z | 2021-12-22T08:57:46.000Z | calib/pre_process-SOAO.py | SilverRon/gppy | 0ee56ca270af62afe1702fce37bef30add14f12a | [
"MIT"
] | null | null | null | calib/pre_process-SOAO.py | SilverRon/gppy | 0ee56ca270af62afe1702fce37bef30add14f12a | [
"MIT"
] | 2 | 2019-05-08T08:09:02.000Z | 2019-06-27T13:41:44.000Z | #!/home/paek/anaconda2/bin/python2.7
# 1. FILE CHECK, whether new folder was updated.
# 2. pre-processing + log file
# 3. moving
# 4. combine and subtraction (not yet)
# 18.12.04 add something by G.Paek
import os, sys, glob
import numpy as np
import astropy.io.ascii as ascii
from astropy.io import fits
obs ... | 41.025287 | 140 | 0.529026 |
796930a88309365af69da5f351ac6e17df948c70 | 8,988 | py | Python | mindsdb/libs/helpers/general_helpers.py | claswh/mindsdb | 3222cd34eb45c6d8c3a8fa3e0d9ee1eb5e78068c | [
"MIT"
] | 1 | 2019-07-09T20:21:27.000Z | 2019-07-09T20:21:27.000Z | mindsdb/libs/helpers/general_helpers.py | claswh/mindsdb | 3222cd34eb45c6d8c3a8fa3e0d9ee1eb5e78068c | [
"MIT"
] | null | null | null | mindsdb/libs/helpers/general_helpers.py | claswh/mindsdb | 3222cd34eb45c6d8c3a8fa3e0d9ee1eb5e78068c | [
"MIT"
] | null | null | null | import platform
import re
import urllib
import uuid
from pathlib import Path
import pickle
import requests
from contextlib import contextmanager
import ctypes
import io
import os, sys
import tempfile
from mindsdb.__about__ import __version__
from mindsdb.config import CONFIG
from mindsdb.libs.data_types.mindsdb_logge... | 32.447653 | 175 | 0.630619 |
796931e7ffb2433409dca3fae4f273daebaac071 | 5,633 | py | Python | python/ccxt/binanceusdm.py | mped-oticon/ccxt | 6ef07552532cd9cef335e638a6793bd4bfa0de88 | [
"MIT"
] | 1 | 2021-05-16T11:30:59.000Z | 2021-05-16T11:30:59.000Z | python/ccxt/binanceusdm.py | mped-oticon/ccxt | 6ef07552532cd9cef335e638a6793bd4bfa0de88 | [
"MIT"
] | null | null | null | python/ccxt/binanceusdm.py | mped-oticon/ccxt | 6ef07552532cd9cef335e638a6793bd4bfa0de88 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.binance import binance
class binanceusdm(binance):
def describe(self):
return self.deep_extend(super(binanceusdm, ... | 53.647619 | 162 | 0.530978 |
796932352f8cc7bf81b557611ad0d2e2b36e593b | 29,387 | py | Python | lib/yaml/constructor.py | CanarysPlayground/Demo02063957 | 94b5396a87748651b20c80e1ec3ff16577f618af | [
"MIT"
] | null | null | null | lib/yaml/constructor.py | CanarysPlayground/Demo02063957 | 94b5396a87748651b20c80e1ec3ff16577f618af | [
"MIT"
] | 11 | 2022-01-18T09:23:04.000Z | 2022-01-18T09:27:00.000Z | lib/yaml/constructor.py | CanarysPlayground/Demo02063957 | 94b5396a87748651b20c80e1ec3ff16577f618af | [
"MIT"
] | null | null | null |
__all__ = [
'BaseConstructor',
'SafeConstructor',
'FullConstructor',
'UnsafeConstructor',
'Constructor',
'ConstructorError'
]
from .error import *
from .nodes import *
import collections.abc, datetime, base64, binascii, re, sys, types
class ConstructorError(MarkedYAMLError):
... | 39.23498 | 113 | 0.582877 |
796932df8f0042ff731f7354648b5913b33716a9 | 171 | py | Python | yt_concate/pipeline/steps/initialize_yt.py | Sedriskor/yt-concate | a6e7ce98b7f540233cefc94db39f210f33999639 | [
"MIT"
] | null | null | null | yt_concate/pipeline/steps/initialize_yt.py | Sedriskor/yt-concate | a6e7ce98b7f540233cefc94db39f210f33999639 | [
"MIT"
] | null | null | null | yt_concate/pipeline/steps/initialize_yt.py | Sedriskor/yt-concate | a6e7ce98b7f540233cefc94db39f210f33999639 | [
"MIT"
] | null | null | null | from .step import Step
from yt_concate.model.yt import YT
class InitializeYt(Step):
def process(self, data, inputs, utils):
return [YT(url) for url in data]
| 21.375 | 43 | 0.701754 |
79693375e106f83276892edf3f6bd0c18467b602 | 3,579 | py | Python | visualize/nctu_visual.py | Po-Jen/bnn-tracking | 85a017155e2ba86ed1249489636af98607e53fb3 | [
"MIT"
] | 4 | 2020-07-01T02:28:25.000Z | 2021-12-21T11:31:33.000Z | visualize/nctu_visual.py | biomotion/bnn-tracking | 85a017155e2ba86ed1249489636af98607e53fb3 | [
"MIT"
] | null | null | null | visualize/nctu_visual.py | biomotion/bnn-tracking | 85a017155e2ba86ed1249489636af98607e53fb3 | [
"MIT"
] | 3 | 2020-12-05T04:58:21.000Z | 2021-12-21T11:31:37.000Z | #!/usr/bin/env python2
import sensor_msgs.point_cloud2 as pcl2
import rospy
from visualization_msgs.msg import Marker
from visualization_msgs.msg import MarkerArray
import json
import sys
from sensor_msgs.msg import PointCloud2, PointField
import numpy as np
from std_msgs.msg import Header
import tf
import os
import ro... | 41.616279 | 138 | 0.648785 |
796933ccb831bf3990e8e167156c44d4083fbe0d | 6,152 | py | Python | hassio-google-drive-backup/backup/model/backupscheme.py | spo0n125/teste | ec923bc1475f8931799db0e279bad59517f61ed0 | [
"MIT"
] | null | null | null | hassio-google-drive-backup/backup/model/backupscheme.py | spo0n125/teste | ec923bc1475f8931799db0e279bad59517f61ed0 | [
"MIT"
] | null | null | null | hassio-google-drive-backup/backup/model/backupscheme.py | spo0n125/teste | ec923bc1475f8931799db0e279bad59517f61ed0 | [
"MIT"
] | 1 | 2021-12-12T19:31:05.000Z | 2021-12-12T19:31:05.000Z | from abc import ABC, abstractmethod
from calendar import monthrange
from datetime import datetime, timedelta
from typing import List, Optional, Sequence
from .snapshots import Snapshot
from ..time import Time
from ..config import GenConfig
from ..logger import getLogger
from typing import List
logger = getLogger(__nam... | 35.356322 | 95 | 0.592815 |
796933db9bd2f00caefadbfd03085189343226b9 | 8,735 | py | Python | plugins/doc_fragments/fragments.py | Nothing4You/pan-os-ansible | 50078a71eef0c5e9a4263020135df6a0e05961bf | [
"Apache-2.0"
] | null | null | null | plugins/doc_fragments/fragments.py | Nothing4You/pan-os-ansible | 50078a71eef0c5e9a4263020135df6a0e05961bf | [
"Apache-2.0"
] | 22 | 2020-10-19T06:12:10.000Z | 2022-03-07T10:04:30.000Z | plugins/doc_fragments/fragments.py | patrickdaj/pan-os-ansible | 1e3daf5fe0d862516561cc95e420691c03a38403 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright: (c) 2020, Garfield Lee Freeman (@shinmog)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class ModuleDocFragment(object):
# Standard files docu... | 30.43554 | 115 | 0.537378 |
796934404ef0557d961eaf91ecedb8bfb9d7c76e | 17,118 | py | Python | chapter6/figures.py | mtrazzi/understanding-rl | 83a9b7608c805189a39b4ef81893f6ebe982f9e1 | [
"MIT"
] | 95 | 2020-04-26T12:36:07.000Z | 2020-05-02T13:23:47.000Z | chapter6/figures.py | 3outeille/rl-book-challenge | b02595b0aec3e9632ef5d9814e925384931089bd | [
"MIT"
] | 2 | 2020-09-24T20:29:29.000Z | 2021-11-27T11:17:45.000Z | chapter6/figures.py | 3outeille/rl-book-challenge | b02595b0aec3e9632ef5d9814e925384931089bd | [
"MIT"
] | 15 | 2020-04-27T04:10:02.000Z | 2020-04-30T21:42:04.000Z | import argparse
from td import OneStepTD
from off_pol_td import OffPolicyTD
from driving import DrivingEnv, TRAVEL_TIME
from sarsa import Sarsa
from windy_gridworld import WindyGridworld
import numpy as np
from randomwalk import RandomWalk, NotSoRandomWalk, LEFT, RIGHT
from cliff import TheCliff
import matplotlib.pyplo... | 38.295302 | 189 | 0.688924 |
7969358631eb8db35cc03f6c201ec39ac6a00a1d | 1,501 | py | Python | src/features/generate/FER.py | pandov/myitacademy | e674816f325d68c84b908bf3429fda9b8d14e615 | [
"Apache-2.0"
] | 1 | 2021-08-03T12:30:59.000Z | 2021-08-03T12:30:59.000Z | src/features/generate/FER.py | pandov/myitacademy | e674816f325d68c84b908bf3429fda9b8d14e615 | [
"Apache-2.0"
] | null | null | null | src/features/generate/FER.py | pandov/myitacademy | e674816f325d68c84b908bf3429fda9b8d14e615 | [
"Apache-2.0"
] | null | null | null | import cv2
from tqdm import tqdm
from itertools import chain as iterchain
from ..raw import CK
from ..raw import JAFFE
from ..raw import FER2013
from ...paths import PATH_DATA_PROCESSED
from ...utils import *
def iter_preproc_datasets(**kwargs):
dataset1 = CK(**kwargs)
dataset2 = JAFFE(**kwargs)
dataset = ... | 33.355556 | 81 | 0.697535 |
796936f8de52a5181133389dc301a64be41c0bf6 | 7,035 | py | Python | starter.py | osanchez42/Device42_HPSM_Sync | e572f316393369b7550b50aa90785580beafb091 | [
"Apache-2.0"
] | null | null | null | starter.py | osanchez42/Device42_HPSM_Sync | e572f316393369b7550b50aa90785580beafb091 | [
"Apache-2.0"
] | null | null | null | starter.py | osanchez42/Device42_HPSM_Sync | e572f316393369b7550b50aa90785580beafb091 | [
"Apache-2.0"
] | 1 | 2020-10-15T16:44:50.000Z | 2020-10-15T16:44:50.000Z | # -*- coding:utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import imp
import csv
import StringIO
from hpsm import HpsmApi
from device42 import Device42Doql
conf = imp.load_source('conf', 'conf')
device42 = {
'host': conf.d42_host,
'username': conf.d42_username,
'password': conf.d4... | 35.351759 | 116 | 0.580242 |
796937a1a9770df9d52048488a0c2160451dc4af | 5,866 | py | Python | examples/mnist/tf_example.py | cclauss/petastorm | 12fc6542005c6dc7c99997604b939536cca79fa9 | [
"Apache-2.0"
] | 1 | 2018-09-25T10:59:29.000Z | 2018-09-25T10:59:29.000Z | examples/mnist/tf_example.py | cclauss/petastorm | 12fc6542005c6dc7c99997604b939536cca79fa9 | [
"Apache-2.0"
] | null | null | null | examples/mnist/tf_example.py | cclauss/petastorm | 12fc6542005c6dc7c99997604b939536cca79fa9 | [
"Apache-2.0"
] | 1 | 2019-06-18T20:34:44.000Z | 2019-06-18T20:34:44.000Z | # Copyright (c) 2017-2018 Uber Technologies, 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 ... | 44.778626 | 118 | 0.620696 |
7969384eb1a5c4377c653eaf58d89920093e032c | 194 | py | Python | qmt/geometry/__init__.py | agarwalrounak/qmt | 6fb8ee55fb9d544b72f6dc0c275000914e03af06 | [
"MIT"
] | 1 | 2018-09-30T00:45:53.000Z | 2018-09-30T00:45:53.000Z | qmt/geometry/__init__.py | DalavanCloud/qmt | ea5d234012a1d1d39f34834ac9f2007c2a6d4852 | [
"MIT"
] | null | null | null | qmt/geometry/__init__.py | DalavanCloud/qmt | ea5d234012a1d1d39f34834ac9f2007c2a6d4852 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""Geometry generation and handling."""
from .property_map import PropertyMap, MaterialPropertyMap
| 32.333333 | 59 | 0.793814 |
79693a0c94bfce8cf2893733c74ccfe00d5ae268 | 1,007 | py | Python | 001.py | rui1106/lemon_1 | d64563334fff2753cd9a36312d2c68d77915f829 | [
"CC0-1.0"
] | null | null | null | 001.py | rui1106/lemon_1 | d64563334fff2753cd9a36312d2c68d77915f829 | [
"CC0-1.0"
] | null | null | null | 001.py | rui1106/lemon_1 | d64563334fff2753cd9a36312d2c68d77915f829 | [
"CC0-1.0"
] | null | null | null | import json
import jsonpath
import requests
url = 'https://www.ximalaya.com/revision/play/v1/audio?id=353467583&ptype=1'
headers = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36",
"cookie": "_xmLog=h5&3abef489-b7c1-4015-9594... | 32.483871 | 200 | 0.729891 |
79693bb35e41fad52808c532bbbf7ac2d627f18c | 1,176 | py | Python | openpype/hosts/maya/plugins/publish/collect_unreal_skeletalmesh.py | Tilix4/OpenPype | 8909bd890170880aa7ec8b673abaa25a9bdf40f2 | [
"MIT"
] | 1 | 2022-02-08T15:40:41.000Z | 2022-02-08T15:40:41.000Z | openpype/hosts/maya/plugins/publish/collect_unreal_skeletalmesh.py | zafrs/OpenPype | 4b8e7e1ed002fc55b31307efdea70b0feaed474f | [
"MIT"
] | 2 | 2022-03-18T01:46:03.000Z | 2022-03-18T01:46:16.000Z | openpype/hosts/maya/plugins/publish/collect_unreal_skeletalmesh.py | zafrs/OpenPype | 4b8e7e1ed002fc55b31307efdea70b0feaed474f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from maya import cmds # noqa
import pyblish.api
class CollectUnrealSkeletalMesh(pyblish.api.InstancePlugin):
"""Collect Unreal Skeletal Mesh."""
order = pyblish.api.CollectorOrder + 0.2
label = "Collect Unreal Skeletal Meshes"
families = ["skeletalMesh"]
def process(self... | 29.4 | 78 | 0.585034 |
79693be2aa77a96f92e171d6a8f958b78777bdeb | 1,860 | py | Python | parser/fase2/team12/src/FUNCIONES_NATIVAS/MATHEMATICAL_FUNCTION/Sqrt.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/fase2/team12/src/FUNCIONES_NATIVAS/MATHEMATICAL_FUNCTION/Sqrt.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/fase2/team12/src/FUNCIONES_NATIVAS/MATHEMATICAL_FUNCTION/Sqrt.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | import sys, os.path
import math
dir_nodo = (os.path.abspath(os.path.join(os.path.dirname(__file__), '..','..')) + '\\EXPRESION\\EXPRESION\\')
sys.path.append(dir_nodo)
ent_nodo = (os.path.abspath(os.path.join(os.path.dirname(__file__), '..','..')) + '\\ENTORNO\\')
sys.path.append(ent_nodo)
c3d_dir = (os.path.abspath... | 30.491803 | 109 | 0.598387 |
79693ca8868a71a0b199b4a6161fcdea5c9062bd | 12,739 | py | Python | django_cubes/api.py | intelie/django-cubes | ff964b3b39bcc2e2a8851b3f000a18099d4f226a | [
"MIT"
] | 5 | 2015-06-19T23:12:22.000Z | 2018-01-05T14:44:55.000Z | django_cubes/api.py | intelie/django-cubes | ff964b3b39bcc2e2a8851b3f000a18099d4f226a | [
"MIT"
] | 3 | 2015-06-24T22:34:00.000Z | 2017-08-11T09:34:34.000Z | django_cubes/api.py | intelie/django-cubes | ff964b3b39bcc2e2a8851b3f000a18099d4f226a | [
"MIT"
] | 6 | 2016-05-17T20:22:30.000Z | 2020-12-27T12:11:52.000Z | # -*- coding: utf-8 -*-
import logging
import re
from collections import OrderedDict
from threading import local
from rest_framework.views import APIView
from rest_framework import permissions
from rest_framework.response import Response
from rest_framework.exceptions import ParseError
from rest_framework.renderers im... | 30.845036 | 117 | 0.61347 |
79693cad8bb10e98f313c26cd1543e9b1fcf7647 | 3,551 | py | Python | pixelpuncher/game/utils/messages.py | ej2/pixelpuncher | 8dd31090252c00772932c78ea21438d1e979f722 | [
"BSD-3-Clause"
] | null | null | null | pixelpuncher/game/utils/messages.py | ej2/pixelpuncher | 8dd31090252c00772932c78ea21438d1e979f722 | [
"BSD-3-Clause"
] | null | null | null | pixelpuncher/game/utils/messages.py | ej2/pixelpuncher | 8dd31090252c00772932c78ea21438d1e979f722 | [
"BSD-3-Clause"
] | null | null | null | import random
from pixelpuncher.game.utils.message import GameMessageManager, get_random_attack_verbs, get_random_pain_word, \
get_random_defeat_message
DANGER_WORDS = ["treacherous", "formidable", "deadly", "troublesome", "lethal"]
def low_energy_message(skill):
return "<span class='hit'>You don't have eno... | 28.18254 | 112 | 0.70459 |
79693dd3ecf174cdb80495032be7e4b3b25ebd5e | 24,886 | py | Python | pydantic/types.py | Jasonnor/pydantic | e8326f899e037904a8e47928e4eedec6a56cf5ef | [
"MIT"
] | 1 | 2020-08-30T12:32:13.000Z | 2020-08-30T12:32:13.000Z | pydantic/types.py | Jasonnor/pydantic | e8326f899e037904a8e47928e4eedec6a56cf5ef | [
"MIT"
] | 100 | 2020-09-19T09:11:41.000Z | 2022-03-28T19:02:26.000Z | pydantic/types.py | Jasonnor/pydantic | e8326f899e037904a8e47928e4eedec6a56cf5ef | [
"MIT"
] | null | null | null | import math
import re
import warnings
from decimal import Decimal
from enum import Enum
from pathlib import Path
from types import new_class
from typing import (
TYPE_CHECKING,
Any,
Callable,
ClassVar,
Dict,
List,
Optional,
Pattern,
Set,
Type,
TypeVar,
Union,
cast,
)
... | 29.416076 | 117 | 0.64028 |
79693f119722f14ea479dc57211f02758acc21ea | 399 | py | Python | chap6 5.py | dishashetty5/Python-for-Everybody-Strings | c4253299e8bd5eba8f45bd1f3faa4bb23c7463c8 | [
"MIT"
] | null | null | null | chap6 5.py | dishashetty5/Python-for-Everybody-Strings | c4253299e8bd5eba8f45bd1f3faa4bb23c7463c8 | [
"MIT"
] | null | null | null | chap6 5.py | dishashetty5/Python-for-Everybody-Strings | c4253299e8bd5eba8f45bd1f3faa4bb23c7463c8 | [
"MIT"
] | null | null | null | """Take the following Python code that stores a string:
str = 'X-DSPAM-Confidence:0.8475'
Use find and string slicing to extract the portion of the string after the
colon character and then use the float function to convert the extracted
string into a floating point number."""
str = 'X-DSPAM-Confidence:0.8475'
m=... | 33.25 | 75 | 0.736842 |
79693f1510a9620e48305b22866ac8546a2272d3 | 2,382 | py | Python | lib/core/test/generate_arithmetic_parameters.py | nvaytet/scipp | f14f56ed19cccb4162d55b1123df7225eeedb395 | [
"BSD-3-Clause"
] | 43 | 2019-04-08T14:13:11.000Z | 2022-02-08T06:09:35.000Z | lib/core/test/generate_arithmetic_parameters.py | nvaytet/scipp | f14f56ed19cccb4162d55b1123df7225eeedb395 | [
"BSD-3-Clause"
] | 1,342 | 2019-03-30T07:06:08.000Z | 2022-03-28T13:12:47.000Z | lib/core/test/generate_arithmetic_parameters.py | nvaytet/scipp | f14f56ed19cccb4162d55b1123df7225eeedb395 | [
"BSD-3-Clause"
] | 12 | 2019-06-13T08:56:12.000Z | 2021-11-04T08:24:18.000Z | # SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2021 Scipp contributors (https://github.com/scipp)
"""
This script generates input parameters to test whether arithmetic
operations are consistent with Python.
It takes the output file as its only command line argument.
"""
from itertools import product
import s... | 32.189189 | 77 | 0.566331 |
79693f519d05d34274ef84c2966538172be7e5a0 | 6,440 | py | Python | train.py | kyokono/tacotts | bafb03f62405f5b93c098356051daf57d1defa6e | [
"MIT"
] | 1 | 2019-03-11T14:46:04.000Z | 2019-03-11T14:46:04.000Z | train.py | kyokono/tacotts | bafb03f62405f5b93c098356051daf57d1defa6e | [
"MIT"
] | null | null | null | train.py | kyokono/tacotts | bafb03f62405f5b93c098356051daf57d1defa6e | [
"MIT"
] | null | null | null | import argparse
from datetime import datetime
import math
import numpy as np
import os
import subprocess
import time
import tensorflow as tf
import traceback
from datasets.datafeeder import DataFeeder
from hparams import hparams, hparams_debug_string
from models import create_model
from text import sequence_to_text
fr... | 41.818182 | 104 | 0.677174 |
796940cbd4bd643441c29692021613699daecd3b | 1,786 | py | Python | supg/selector/naive_recall.py | stanford-futuredata/supg | cff4e7eb9b657e79a8f1d8e245e23bcad543126c | [
"Apache-2.0"
] | 3 | 2020-08-31T21:03:31.000Z | 2021-01-17T08:08:51.000Z | supg/selector/naive_recall.py | stanford-futuredata/supg | cff4e7eb9b657e79a8f1d8e245e23bcad543126c | [
"Apache-2.0"
] | 1 | 2021-07-29T06:07:25.000Z | 2021-07-29T07:04:57.000Z | supg/selector/naive_recall.py | stanford-futuredata/supg | cff4e7eb9b657e79a8f1d8e245e23bcad543126c | [
"Apache-2.0"
] | 4 | 2020-09-03T03:13:37.000Z | 2021-12-20T12:13:51.000Z | from typing import Sequence
import numpy as np
import math
from supg.datasource import DataSource
from supg.sampler import Sampler, ImportanceSampler
from supg.selector.base_selector import BaseSelector, ApproxQuery
def calc_lb(p, n, delta, T):
# Lower bound on the precision of a sample with failure probability... | 31.333333 | 80 | 0.634378 |
796940e3485a3d618515836783b149e271ec5763 | 3,596 | py | Python | irbis/__init__.py | amironov73/PythonIrbis | ca44fa19f804a182a7289b2a72e00bfd5558162b | [
"MIT"
] | 3 | 2019-08-30T13:34:24.000Z | 2020-08-12T13:48:08.000Z | irbis/__init__.py | amironov73/PythonIrbis | ca44fa19f804a182a7289b2a72e00bfd5558162b | [
"MIT"
] | 13 | 2018-09-14T04:56:46.000Z | 2021-01-14T13:10:32.000Z | irbis/__init__.py | amironov73/PythonIrbis | ca44fa19f804a182a7289b2a72e00bfd5558162b | [
"MIT"
] | 5 | 2018-09-14T04:54:21.000Z | 2022-03-12T16:48:54.000Z | # coding: utf-8
"""
Модуль содержит основную функциональность по работе с сервером ИРБИС64,
в т. ч. для манипуляций с записями.
"""
# ManagedIrbis ported from C# to Python.
# Python supported: 3.6 and higher
# IRBIS64 supported: 2014 and higher
from irbis._common import ADMINISTRATOR, BRIEF, CATALOGER, close_async, ... | 44.95 | 78 | 0.73693 |
796941730a764c03a1a523d3a813c573eebaf460 | 1,375 | py | Python | pyinfra/operations/xbps.py | blarghmatey/pyinfra | b8287618d66a4e00963c88a3ef191c94e8320f70 | [
"MIT"
] | 1 | 2020-12-24T08:24:13.000Z | 2020-12-24T08:24:13.000Z | pyinfra/operations/xbps.py | blarghmatey/pyinfra | b8287618d66a4e00963c88a3ef191c94e8320f70 | [
"MIT"
] | null | null | null | pyinfra/operations/xbps.py | blarghmatey/pyinfra | b8287618d66a4e00963c88a3ef191c94e8320f70 | [
"MIT"
] | null | null | null | '''
Manage XBPS packages and repositories. Note that XBPS package names are case-sensitive.
'''
from pyinfra.api import operation
from .util.packaging import ensure_packages
@operation
def upgrade(state=None, host=None):
'''
Upgrades all XBPS packages.
'''
yield 'xbps-install -y -u'
_upgrade = upg... | 20.220588 | 87 | 0.64 |
7969419550618dfff0652ab152a33331c79bb08f | 3,011 | py | Python | qct_tools/TabuSearch.py | Holly-Jiang/QCTSA | b90136b9df18fc21ae53b431f1e5e0c6ef786fae | [
"MIT"
] | null | null | null | qct_tools/TabuSearch.py | Holly-Jiang/QCTSA | b90136b9df18fc21ae53b431f1e5e0c6ef786fae | [
"MIT"
] | null | null | null | qct_tools/TabuSearch.py | Holly-Jiang/QCTSA | b90136b9df18fc21ae53b431f1e5e0c6ef786fae | [
"MIT"
] | null | null | null | from queue import Queue
from base import NeighborSolutionLocator
from base.Gate import Gate
from base.MySolution import MySolution
from base.NeighborSolutionLocator import findBestNeighbor, findAmnestyNeighbor
import sys
class TabuSearch:
threshold = 1000
p = 0.9
def __init__(self, tabulist: list, maxIte... | 39.618421 | 258 | 0.640319 |
7969423802b5da2b8edb7921965bd1a07c70dba6 | 2,729 | py | Python | migrate/servicev1/mig_etcd.py | wuchengyi2006/xbus | 54dbe376861d19a291c9693b4f8de3e46f31eaf2 | [
"Apache-2.0"
] | 11 | 2019-06-05T03:37:44.000Z | 2021-12-05T11:01:01.000Z | migrate/servicev1/mig_etcd.py | wuchengyi2006/xbus | 54dbe376861d19a291c9693b4f8de3e46f31eaf2 | [
"Apache-2.0"
] | 2 | 2021-01-26T11:33:14.000Z | 2021-04-01T09:19:55.000Z | migrate/servicev1/mig_etcd.py | wuchengyi2006/xbus | 54dbe376861d19a291c9693b4f8de3e46f31eaf2 | [
"Apache-2.0"
] | 8 | 2016-08-25T03:07:05.000Z | 2021-12-05T11:01:03.000Z | import re
import traceback
import etcd3
from collections import namedtuple, defaultdict
Endpoint = namedtuple('Endpoint', ['lease_id', 'addr', 'data'])
class Service(object):
def __init__(self):
self.desc = None
self.endpoints = []
r_old_key = re.compile(r'^/services/(.+)/(.+)/(desc|node_.+)$')... | 30.662921 | 71 | 0.544155 |
796942d6cc3c71bbc8a76c8c2f953fbe3292970c | 5,278 | py | Python | khajiit/camera/managed_threading.py | k-space-ee/zoidberg | 46eaef75db7caac95a6c0089f04c720fd1936e5b | [
"MIT"
] | 2 | 2018-07-19T11:48:53.000Z | 2020-02-20T11:42:30.000Z | khajiit/camera/managed_threading.py | k-space-ee/zoidberg | 46eaef75db7caac95a6c0089f04c720fd1936e5b | [
"MIT"
] | null | null | null | khajiit/camera/managed_threading.py | k-space-ee/zoidberg | 46eaef75db7caac95a6c0089f04c720fd1936e5b | [
"MIT"
] | 2 | 2018-09-15T10:11:46.000Z | 2020-02-20T11:42:51.000Z | from threading import Thread, Event
import logging
logger = logging.getLogger("threading")
from collections import deque
from queue import Queue, Empty
import ctypes
libc = ctypes.cdll.LoadLibrary('libc.so.6')
from time import sleep, time
class ThreadManager(Thread):
def __init__(self):
Thread.__init__(... | 32.9875 | 116 | 0.505495 |
796942f16c15c233e24ced5dbc2fd31b4acb5747 | 8,532 | py | Python | prototype/nplinker/scoring/iokr/run_iokr_novel.py | louwenjjr/nplinker | 22e957d0f3326775ca5c1f850073067c6fb256d6 | [
"Apache-2.0"
] | 6 | 2018-10-24T20:33:49.000Z | 2022-03-11T03:44:14.000Z | prototype/nplinker/scoring/iokr/run_iokr_novel.py | louwenjjr/nplinker | 22e957d0f3326775ca5c1f850073067c6fb256d6 | [
"Apache-2.0"
] | 44 | 2018-10-25T19:46:26.000Z | 2022-03-31T20:31:06.000Z | prototype/nplinker/scoring/iokr/run_iokr_novel.py | louwenjjr/nplinker | 22e957d0f3326775ca5c1f850073067c6fb256d6 | [
"Apache-2.0"
] | 4 | 2018-10-29T15:29:41.000Z | 2022-03-10T14:36:40.000Z | # Copyright 2021 The NPLinker 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... | 36.618026 | 142 | 0.679208 |
7969431f52d84f343bb93791fa39afc54a778f0a | 612 | py | Python | packages/pyre/units/volume.py | lijun99/pyre | 004dfd4c06489b4ba5b32877338ca6440f2d523b | [
"BSD-3-Clause"
] | 3 | 2019-08-02T21:02:47.000Z | 2021-09-08T13:59:43.000Z | packages/pyre/units/volume.py | lijun99/pyre | 004dfd4c06489b4ba5b32877338ca6440f2d523b | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/units/volume.py | lijun99/pyre | 004dfd4c06489b4ba5b32877338ca6440f2d523b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2019 all rights reserved
#
from .length import meter, centimeter, foot, inch
#
# definitions of common volume units
# data taken from Appendix F of Halliday, Resnick, Walker, "Fundamentals of Physics",
# fourth edition, John Willey and Son... | 19.741935 | 85 | 0.72549 |
7969436e99a26583074ab3b7ef0202d572c92b39 | 401 | py | Python | git_kloc/user/views.py | jsj14/git_kloc | a76f076798ae6b56c7cbaa0e0d463c70c777ef42 | [
"MIT"
] | null | null | null | git_kloc/user/views.py | jsj14/git_kloc | a76f076798ae6b56c7cbaa0e0d463c70c777ef42 | [
"MIT"
] | null | null | null | git_kloc/user/views.py | jsj14/git_kloc | a76f076798ae6b56c7cbaa0e0d463c70c777ef42 | [
"MIT"
] | 1 | 2020-12-22T14:04:17.000Z | 2020-12-22T14:04:17.000Z | # -*- coding: utf-8 -*-
"""
user/views.py
:copyright: (c) 2017 by Joe Paul.
:license: see LICENSE for details.
"""
from flask import Blueprint, render_template
blueprint = Blueprint(
'user', __name__,
url_prefix='/', static_folder='../static'
)
@blueprint.route('/', methods=["GET", "POST"])
def... | 17.434783 | 46 | 0.605985 |
796944e5d92e97d0ff478deae54ea5ae57e8de8e | 939 | py | Python | lesson 13/question 1.py | Kev-in123/ICS2O7 | 425c59975d4ce6aa0937fd8715b51d04487e4fa9 | [
"MIT"
] | 2 | 2021-08-10T18:16:08.000Z | 2021-09-26T19:49:26.000Z | lesson 13/question 1.py | Kev-in123/ICS2O7 | 425c59975d4ce6aa0937fd8715b51d04487e4fa9 | [
"MIT"
] | null | null | null | lesson 13/question 1.py | Kev-in123/ICS2O7 | 425c59975d4ce6aa0937fd8715b51d04487e4fa9 | [
"MIT"
] | null | null | null |
word = input("Enter a word: ")
print(f"The word in exchanged case is: {word.swapcase()}")
print("----------------------------------")
alt_word = [word[i].upper() if not i % 2 else word[i].lower() for i in range(len(word))]
print(f"The word in alternating upper and lower case is: {''.join(alt_word)}")
print("... | 36.115385 | 91 | 0.526092 |
7969450a642d3d361573cf0e9956b09bb066efa0 | 436 | py | Python | PythonClient/setup.py | inayatkh/carla | 957d44bb38ba1fb04041dd935cf3ac41f675121e | [
"MIT"
] | 1 | 2018-03-09T10:17:23.000Z | 2018-03-09T10:17:23.000Z | PythonClient/setup.py | inayatkh/carla | 957d44bb38ba1fb04041dd935cf3ac41f675121e | [
"MIT"
] | null | null | null | PythonClient/setup.py | inayatkh/carla | 957d44bb38ba1fb04041dd935cf3ac41f675121e | [
"MIT"
] | null | null | null | from setuptools import setup
# @todo Dependencies are missing.
setup(
name='carla_client',
version='0.7.1',
packages=['carla', 'carla.benchmarks', 'carla.planner'],
license='MIT License',
description='Python API for communicating with the CARLA server.',
url='https://github.com/carla-simulator... | 27.25 | 70 | 0.699541 |
7969451ab3a51e4c22ff8ecb7693878db3ee57b7 | 5,293 | py | Python | randomforest.py | vrozova/cell_morphology | 8148e5cd5b20dc010eab2a83026aec0467573e54 | [
"MIT"
] | null | null | null | randomforest.py | vrozova/cell_morphology | 8148e5cd5b20dc010eab2a83026aec0467573e54 | [
"MIT"
] | null | null | null | randomforest.py | vrozova/cell_morphology | 8148e5cd5b20dc010eab2a83026aec0467573e54 | [
"MIT"
] | null | null | null | import os
import pandas as pd
import numpy as np
import preprocessing as proc
import randomforest as rf
from pandas.api.types import CategoricalDtype
import seaborn as sns
from matplotlib import pyplot as plt
from scipy import stats
import joblib
from imblearn.over_sampling import SMOTE
from sklearn.model_selection im... | 37.274648 | 114 | 0.671075 |
79694523a7a9871660ed9831c7ebf541f425e94e | 10,205 | py | Python | adanet/core/summary.py | GitHub30/adanet | a84211247e0e336ef5cfc47da598df37a75d66a8 | [
"Apache-2.0"
] | 5 | 2018-10-31T17:42:05.000Z | 2021-07-07T15:48:58.000Z | adanet/core/summary.py | GitHub30/adanet | a84211247e0e336ef5cfc47da598df37a75d66a8 | [
"Apache-2.0"
] | null | null | null | adanet/core/summary.py | GitHub30/adanet | a84211247e0e336ef5cfc47da598df37a75d66a8 | [
"Apache-2.0"
] | 1 | 2018-12-21T15:23:13.000Z | 2018-12-21T15:23:13.000Z | """Tensorboard summaries for the single graph AdaNet implementation.
Copyright 2018 The AdaNet 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
https://www.apache.... | 33.679868 | 80 | 0.69172 |
796946a8ec31b79a2a8a16c88b678178cd285477 | 27,174 | py | Python | napari/_qt/qt_viewer.py | mrocklin/napari | b61d9ae570e30091a97b6c76e37cd95fe5b296b6 | [
"BSD-3-Clause"
] | null | null | null | napari/_qt/qt_viewer.py | mrocklin/napari | b61d9ae570e30091a97b6c76e37cd95fe5b296b6 | [
"BSD-3-Clause"
] | null | null | null | napari/_qt/qt_viewer.py | mrocklin/napari | b61d9ae570e30091a97b6c76e37cd95fe5b296b6 | [
"BSD-3-Clause"
] | null | null | null | import os.path
from copy import copy
from pathlib import Path
import numpy as np
from qtpy.QtCore import QCoreApplication, QSize, Qt
from qtpy.QtGui import QCursor, QGuiApplication
from qtpy.QtWidgets import (
QFileDialog,
QMessageBox,
QSplitter,
QVBoxLayout,
QWidget,
)
from vispy.scene import Arcb... | 34.484772 | 79 | 0.615699 |
7969474b19e2540f70f7bc5b41460774f921a028 | 9,011 | py | Python | tests/seahub/auth/views/test_login.py | MJochim/seahub | 66fcc6772511d43346a2980613576c5fdb4c4945 | [
"Apache-2.0"
] | null | null | null | tests/seahub/auth/views/test_login.py | MJochim/seahub | 66fcc6772511d43346a2980613576c5fdb4c4945 | [
"Apache-2.0"
] | null | null | null | tests/seahub/auth/views/test_login.py | MJochim/seahub | 66fcc6772511d43346a2980613576c5fdb4c4945 | [
"Apache-2.0"
] | null | null | null | from django.conf import settings
from django.core.cache import cache
from django.core.urlresolvers import reverse
from django.utils.http import urlquote
import pytest
pytestmark = pytest.mark.django_db
from seahub.base.accounts import User
from seahub.auth.forms import AuthenticationForm, CaptchaAuthenticationForm
fr... | 38.840517 | 90 | 0.68028 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.