hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ba85db38c48467a473b1f5022b7dfe1c25bcc9e4 | 15,516 | py | Python | adversarials/test_attack.py | vergilus/NJUNMT-pytorch | 85cc8d4f1aae04541d2e30ec2ca2b9b9fe2bea60 | [
"MIT"
] | 2 | 2020-02-16T02:56:55.000Z | 2020-03-08T15:04:31.000Z | adversarials/test_attack.py | vergilus/NJUNMT-pytorch | 85cc8d4f1aae04541d2e30ec2ca2b9b9fe2bea60 | [
"MIT"
] | null | null | null | adversarials/test_attack.py | vergilus/NJUNMT-pytorch | 85cc8d4f1aae04541d2e30ec2ca2b9b9fe2bea60 | [
"MIT"
] | null | null | null | from adversarials.adversarial_utils import *
from adversarials import attacker
from src.utils.logging import *
from src.utils.common_utils import *
from src.data.dataset import TextLineDataset
from src.data.data_iterator import DataIterator
from src.models import build_model
from src.decoding import beam_search
import... | 51.892977 | 200 | 0.586685 |
ba860ef0bbb9998d184a5e1d2b2471f8886f1c2c | 1,373 | py | Python | plots.py | shreyasnikte/semi-supervised-learning-methods | b60409cdbcb441d7749934f8984fc31d74b86de6 | [
"MIT"
] | 2 | 2019-02-12T01:47:24.000Z | 2019-02-12T01:47:30.000Z | plots.py | shreyasnikte/semi-supervised-learning-methods | b60409cdbcb441d7749934f8984fc31d74b86de6 | [
"MIT"
] | null | null | null | plots.py | shreyasnikte/semi-supervised-learning-methods | b60409cdbcb441d7749934f8984fc31d74b86de6 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
n = [0,10,20,40,80,160,320,640]
error_rate_knn = [0.352873876328,0.387737617135,0.453305017255,0.458524980174,0.474808757584,0.470144927536,0.473847774559,0.467094872065]
error_rate_svm = [0.357722691365,0.355341365462,0.355402176799,0.352894528152,0.352941176471,0.... | 27.46 | 138 | 0.761835 |
ba86b3218164d82acdf2e535950af7f6a5fd6761 | 1,845 | py | Python | gs-engine/gse_api_server/controller/service_mesh.py | gedge-platform/GEdge-Platform | b5cbe63089cf3d3263683cbcd5ec3d10ad85779b | [
"Apache-2.0"
] | 13 | 2020-10-14T07:45:08.000Z | 2021-10-01T08:19:56.000Z | gs-engine/gse_api_server/controller/service_mesh.py | gedge-platform/GEdge-Platform | b5cbe63089cf3d3263683cbcd5ec3d10ad85779b | [
"Apache-2.0"
] | null | null | null | gs-engine/gse_api_server/controller/service_mesh.py | gedge-platform/GEdge-Platform | b5cbe63089cf3d3263683cbcd5ec3d10ad85779b | [
"Apache-2.0"
] | 17 | 2020-11-09T05:16:42.000Z | 2021-12-28T08:04:33.000Z | from flask import Blueprint, request, jsonify
import json
import yaml
import app_conf
from tools.db_connector import DBConnector as mysql
from service import service_mesh as sm_service
service_mesh = Blueprint('service_mesh', __name__)
# set logger
logger = app_conf.Log.get_logger(__name__)
conn = my... | 30.245902 | 100 | 0.694851 |
ba87a2336a8f0ec71ea84a395469860438887992 | 2,363 | py | Python | tests/test_multiple_pubtopics.py | mpi-sws-rse/antevents-python | 5b9226813583141986014fc83f6f74342a5f271e | [
"Apache-2.0"
] | 7 | 2016-09-27T00:21:46.000Z | 2017-03-18T20:04:29.000Z | tests/test_multiple_pubtopics.py | mpi-sws-rse/antevents-python | 5b9226813583141986014fc83f6f74342a5f271e | [
"Apache-2.0"
] | null | null | null | tests/test_multiple_pubtopics.py | mpi-sws-rse/antevents-python | 5b9226813583141986014fc83f6f74342a5f271e | [
"Apache-2.0"
] | 2 | 2017-03-16T21:47:43.000Z | 2020-10-20T22:58:03.000Z | # Copyright 2016 by MPI-SWS and Data-Ken Research.
# Licensed under the Apache 2.0 License.
"""
Build a filter that takes an input stream and dispatches to one of several
output topics based on the input value.
"""
import asyncio
import unittest
from antevents.base import Publisher, DefaultSubscriber, Scheduler
from ... | 35.80303 | 75 | 0.64452 |
ba886223d7d5b936770b403beef641b7928034bb | 12,515 | py | Python | pe/packrat.py | goodmami/pe | ea2ff69742c7f76f370cdfa8e3f7ae0860d5e6fa | [
"MIT"
] | 18 | 2020-03-25T09:10:24.000Z | 2022-02-21T02:46:10.000Z | pe/packrat.py | goodmami/pe | ea2ff69742c7f76f370cdfa8e3f7ae0860d5e6fa | [
"MIT"
] | 21 | 2020-03-18T08:03:04.000Z | 2021-10-11T04:29:09.000Z | pe/packrat.py | goodmami/pe | ea2ff69742c7f76f370cdfa8e3f7ae0860d5e6fa | [
"MIT"
] | 1 | 2021-09-02T16:09:29.000Z | 2021-09-02T16:09:29.000Z |
"""
Packrat Parsing
"""
# NOTE: attempting to use exceptions instead of FAIL codes resulted in
# almost a 2x slowdown, so it's probably not a good idea
from typing import (Union, List, Dict, Callable, Iterable, Any)
from collections import defaultdict
import re
import inspect
from pe._constants import (
FAIL,
... | 32.42228 | 79 | 0.54159 |
ba8a3d42e7689a2e026e951ecc04b58e3c117678 | 582 | py | Python | tests/utils.py | davidmcnabnz/aiohttp-rpc | 25c3b61f48e45a8f2c5586f3e97ac16fd15f2c86 | [
"MIT"
] | 22 | 2020-05-24T08:54:51.000Z | 2022-02-16T13:03:14.000Z | tests/utils.py | davidmcnabnz/aiohttp-rpc | 25c3b61f48e45a8f2c5586f3e97ac16fd15f2c86 | [
"MIT"
] | 7 | 2020-08-31T19:40:21.000Z | 2021-08-02T06:50:05.000Z | tests/utils.py | davidmcnabnz/aiohttp-rpc | 25c3b61f48e45a8f2c5586f3e97ac16fd15f2c86 | [
"MIT"
] | 2 | 2020-05-24T12:18:19.000Z | 2021-08-01T11:30:43.000Z | import aiohttp
from aiohttp import web
import aiohttp_rpc
| 32.333333 | 107 | 0.785223 |
ba8b351fb6919d43ebf9cf7d016dae641fd9b448 | 14,346 | py | Python | examples/learning_fix/analysis/run_analysis.py | bingrao/Bug-Transformer | 9e39dc553c281f6372b7a8cfc8205aa186645899 | [
"MIT"
] | null | null | null | examples/learning_fix/analysis/run_analysis.py | bingrao/Bug-Transformer | 9e39dc553c281f6372b7a8cfc8205aa186645899 | [
"MIT"
] | null | null | null | examples/learning_fix/analysis/run_analysis.py | bingrao/Bug-Transformer | 9e39dc553c281f6372b7a8cfc8205aa186645899 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
usage: put under source folder, required files: evolving_state.txt, calib_state.txt, state.txt
After first run, integration_states.txt, vio_states.txt are generated and figures are saved in current dir
You can move the figures and state.txt, integration_states.txt, vio_states.txt into a fold... | 33.59719 | 112 | 0.548724 |
ba8cbf1e8f33b4e6ae6ea6fa33a6606299a26211 | 767 | py | Python | util/path.py | cassianobecker/dnn | bb2ea04f77733de9df10f795bb049ac3b9d30478 | [
"MIT"
] | 3 | 2020-02-21T21:35:07.000Z | 2020-09-29T15:20:00.000Z | util/path.py | cassianobecker/dnn | bb2ea04f77733de9df10f795bb049ac3b9d30478 | [
"MIT"
] | 27 | 2020-02-20T21:00:23.000Z | 2020-05-22T15:23:25.000Z | util/path.py | cassianobecker/dnn | bb2ea04f77733de9df10f795bb049ac3b9d30478 | [
"MIT"
] | null | null | null | import os
import shutil
| 21.305556 | 66 | 0.720991 |
ba8d939b382a63a60f2698d61f7d191c80c42ac1 | 1,204 | py | Python | CursoEmVideo/curso em video/ex45.py | elisio-ricardo/ExerciciosPythonCursoEmVideo | 47a10b2118a76f4f95a762876ef9ab90e92f4fd3 | [
"MIT"
] | null | null | null | CursoEmVideo/curso em video/ex45.py | elisio-ricardo/ExerciciosPythonCursoEmVideo | 47a10b2118a76f4f95a762876ef9ab90e92f4fd3 | [
"MIT"
] | null | null | null | CursoEmVideo/curso em video/ex45.py | elisio-ricardo/ExerciciosPythonCursoEmVideo | 47a10b2118a76f4f95a762876ef9ab90e92f4fd3 | [
"MIT"
] | null | null | null | from random import randint
from time import sleep
itens = ('Pedra', 'Papel', 'Tesoura')
computador = randint(0, 2)
print('''Suas opes:
[ 0 ] PEDRA
[ 1 ] PAPEL
[ 2 ] TESOURA''')
jogador = int(input('Qual a sua jogada? '))
print('JO')
sleep(1)
print('KEN')
sleep(1)
print('POOO')
print('#x#' * 13)
print('O computador jog... | 26.173913 | 70 | 0.593023 |
ba90813dd087e4a5ae66ed2dd627c0ad91bad8ca | 227 | py | Python | s06_estruturas_de_repeticao/s06_exercicios/s06_exercicio_05.py | adeogliari/GeekUniversity_Python | 1b6badc45ca1dfbaa2f42196fb2dedac417b866e | [
"MIT"
] | null | null | null | s06_estruturas_de_repeticao/s06_exercicios/s06_exercicio_05.py | adeogliari/GeekUniversity_Python | 1b6badc45ca1dfbaa2f42196fb2dedac417b866e | [
"MIT"
] | null | null | null | s06_estruturas_de_repeticao/s06_exercicios/s06_exercicio_05.py | adeogliari/GeekUniversity_Python | 1b6badc45ca1dfbaa2f42196fb2dedac417b866e | [
"MIT"
] | null | null | null | """
5) Faa um programa que pea ao usurio para digitar 10 valores e some-os.
"""
soma = 0
for n in range(10):
num = float(input(f'Digite o valor {n + 1} de 10 para ser somado \n'))
soma = soma + num
print(f'{soma}')
| 22.7 | 74 | 0.629956 |
ba90dc2cb2e51a3de479c4158575a47f4042bca2 | 852 | py | Python | LeetCode/01_Easy/lc_243.py | Zubieta/CPP | fb4a3cbf2e4edcc590df15663cd28fb9ecab679c | [
"MIT"
] | 8 | 2017-03-02T07:56:45.000Z | 2021-08-07T20:20:19.000Z | LeetCode/01_Easy/lc_243.py | zubie7a/Algorithms | fb4a3cbf2e4edcc590df15663cd28fb9ecab679c | [
"MIT"
] | null | null | null | LeetCode/01_Easy/lc_243.py | zubie7a/Algorithms | fb4a3cbf2e4edcc590df15663cd28fb9ecab679c | [
"MIT"
] | 1 | 2021-08-07T20:20:20.000Z | 2021-08-07T20:20:20.000Z | # 243 - Shortest Word Distance (Easy)
# https://leetcode.com/problems/shortest-word-distance/
| 34.08 | 70 | 0.524648 |
ba91558aefd2df242fdc6737e72408a5090c1f04 | 2,539 | py | Python | showdetector.py | squeakus/motiontracker | 9a3e744893de691f2af8f33372911ccf9c6ee5e0 | [
"BSD-2-Clause"
] | 1 | 2017-03-17T12:43:26.000Z | 2017-03-17T12:43:26.000Z | showdetector.py | squeakus/motiontracker | 9a3e744893de691f2af8f33372911ccf9c6ee5e0 | [
"BSD-2-Clause"
] | null | null | null | showdetector.py | squeakus/motiontracker | 9a3e744893de691f2af8f33372911ccf9c6ee5e0 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import print_function
import numpy as np
import cv2
import sys
import imutils
from imutils.video import VideoStream
import argparse
import time
if __name__ == '__main__':
main()
| 29.183908 | 97 | 0.620717 |
ba918a951cdd349ee4cd6bbade1526c24a7533de | 2,106 | py | Python | parse/bsoup.py | thorwhalen/ut | 353a4629c35a2cca76ef91a4d5209afe766433b4 | [
"MIT"
] | 4 | 2016-12-17T20:06:10.000Z | 2021-11-19T04:45:29.000Z | parse/bsoup.py | thorwhalen/ut | 353a4629c35a2cca76ef91a4d5209afe766433b4 | [
"MIT"
] | 11 | 2021-01-06T05:35:11.000Z | 2022-03-11T23:28:31.000Z | parse/bsoup.py | thorwhalen/ut | 353a4629c35a2cca76ef91a4d5209afe766433b4 | [
"MIT"
] | 3 | 2015-06-12T10:44:16.000Z | 2021-07-26T18:39:47.000Z | __author__ = 'thorwhalen'
"""
functions that work on soup, soup tags, etc.
"""
import bs4
from ut.pgenerator.get import last_element
from tempfile import mkdtemp
import os
import ut.pstr.to as strto
import ut.parse.util as parse_util
import ut.pstr.trans as pstr_trans
def get_elements(nodes, path_to_element):
... | 28.459459 | 114 | 0.623457 |
ba918ece5de60730c0129575be92e67c044ff8ec | 1,130 | py | Python | interview_query/utils/faker_sat_scores.py | mhetrerajat/ds-challenge | 3208df5c29612b0dfe60c1c082da1f31ad220b49 | [
"MIT"
] | null | null | null | interview_query/utils/faker_sat_scores.py | mhetrerajat/ds-challenge | 3208df5c29612b0dfe60c1c082da1f31ad220b49 | [
"MIT"
] | 1 | 2021-05-18T07:30:16.000Z | 2021-05-18T07:30:16.000Z | interview_query/utils/faker_sat_scores.py | mhetrerajat/ds-challenge | 3208df5c29612b0dfe60c1c082da1f31ad220b49 | [
"MIT"
] | null | null | null | from faker import Faker
from sqlalchemy import Column, Date, ForeignKey, Integer, String, Table, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm.session import sessionmaker
from sqlalchemy_utils import create_database, database_exists
connection_string = "mysql+mysqlconnector:... | 25.111111 | 86 | 0.679646 |
ba93a8b482897b7fb3cc384944adb1b34a68cd4c | 254 | py | Python | easy_ThirdGreatest.py | GabrielGhe/CoderbyteChallenges | 5601dbc24c95a65fed04896de2f534417c2e730d | [
"MIT"
] | 1 | 2020-11-04T15:30:18.000Z | 2020-11-04T15:30:18.000Z | easy_ThirdGreatest.py | GabrielGhe/CoderbyteChallenges | 5601dbc24c95a65fed04896de2f534417c2e730d | [
"MIT"
] | null | null | null | easy_ThirdGreatest.py | GabrielGhe/CoderbyteChallenges | 5601dbc24c95a65fed04896de2f534417c2e730d | [
"MIT"
] | null | null | null | """
Return the 3rd longest
string in an array of
strings
"""
print ThirdGreatest(raw_input())
| 21.166667 | 52 | 0.688976 |
ba93fd1478bd06284c76c1ea6935491739d75c91 | 347 | py | Python | rackio/workers/__init__.py | crivero7/rackio-framework | d3362041b1fc4c3af7eb51ac06b1f0f1b5aa497c | [
"MIT"
] | null | null | null | rackio/workers/__init__.py | crivero7/rackio-framework | d3362041b1fc4c3af7eb51ac06b1f0f1b5aa497c | [
"MIT"
] | null | null | null | rackio/workers/__init__.py | crivero7/rackio-framework | d3362041b1fc4c3af7eb51ac06b1f0f1b5aa497c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""rackio/workers/__init__.py
This module implements all Rackio Workers.
"""
from .alarms import AlarmWorker
from .api import APIWorker
from .continuos import _ContinuosWorker
from .controls import ControlWorker
from .functions import FunctionWorker
from .logger import LoggerWorker
from .state... | 24.785714 | 42 | 0.801153 |
ba9443740a1bddede8f3fe0b990e93d6b3615856 | 2,319 | py | Python | scripts/leetcode-submission.py | ZihuanLing/zihuanling.github.io | d1c308039bab43bf4966100e1783c486ec2f105d | [
"MIT"
] | 1 | 2022-02-24T07:05:19.000Z | 2022-02-24T07:05:19.000Z | scripts/leetcode-submission.py | ZihuanLing/zihuanling.github.io | d1c308039bab43bf4966100e1783c486ec2f105d | [
"MIT"
] | null | null | null | scripts/leetcode-submission.py | ZihuanLing/zihuanling.github.io | d1c308039bab43bf4966100e1783c486ec2f105d | [
"MIT"
] | null | null | null | # coding: utf-8
# leetcode
import os
import json
import requests
import time
if __name__ == '__main__':
main()
| 32.208333 | 156 | 0.580854 |
ba94a64403dabcab291a47f945af3b92e3234033 | 3,179 | py | Python | milestone1.py | kaiicheng/United-States-Population-Name-Dashboard | 9019538fcb58c7e97a3dc67d3b27cb8ad180e448 | [
"MIT"
] | null | null | null | milestone1.py | kaiicheng/United-States-Population-Name-Dashboard | 9019538fcb58c7e97a3dc67d3b27cb8ad180e448 | [
"MIT"
] | null | null | null | milestone1.py | kaiicheng/United-States-Population-Name-Dashboard | 9019538fcb58c7e97a3dc67d3b27cb8ad180e448 | [
"MIT"
] | null | null | null | """
File: Milestone1.py
Name:
-----------------------
This file tests the milestone 1 for
our babyname.py project
"""
import sys
# ------------- DO NOT EDIT THE CODE BELOW THIS LINE ---------------- #
if __name__ == "__main__":
main()
| 31.475248 | 88 | 0.493551 |
ba951d4ecafedfb08c55ff85b92950bc2b527ea0 | 1,003 | py | Python | Ballot.py | robbierobinette/rcv-tensorflow | 984852902f465bb6f61ba863e4b76092249911d0 | [
"MIT"
] | null | null | null | Ballot.py | robbierobinette/rcv-tensorflow | 984852902f465bb6f61ba863e4b76092249911d0 | [
"MIT"
] | null | null | null | Ballot.py | robbierobinette/rcv-tensorflow | 984852902f465bb6f61ba863e4b76092249911d0 | [
"MIT"
] | null | null | null | from typing import List, Set
from CandidateScore import CandidateScore
from Candidate import Candidate
from Voter import Voter
from ElectionConfig import ElectionConfig
| 37.148148 | 120 | 0.680957 |
ba9b2619a41c953c21ce58a65c8f71171bae6e85 | 5,853 | py | Python | experiments/RASF_pretraining/reconstruction.py | seanywang0408/RASF | 2437ace3f19812d1fe852651358b3cbb9325efb7 | [
"Apache-2.0"
] | 14 | 2022-03-16T13:00:38.000Z | 2022-03-28T11:53:34.000Z | experiments/RASF_pretraining/reconstruction.py | seanywang0408/RASF | 2437ace3f19812d1fe852651358b3cbb9325efb7 | [
"Apache-2.0"
] | null | null | null | experiments/RASF_pretraining/reconstruction.py | seanywang0408/RASF | 2437ace3f19812d1fe852651358b3cbb9325efb7 | [
"Apache-2.0"
] | null | null | null | import os
import time
from tqdm import tqdm
import trimesh
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
import _init_path
from config import cfg
from RASF import RASF
from pointclouds.datasets.shapenetpart import ShapenetPartDataset, to... | 32.337017 | 152 | 0.653169 |
ba9c65d98c4bb9faaef93d07f4f1dd876514f4a1 | 1,697 | py | Python | geoware/models/timezone.py | un33k/django-geoware | cd7c51e358e5b2d2c3ca92626edbdd7e4f573ab8 | [
"MIT"
] | 4 | 2017-01-02T21:38:45.000Z | 2017-01-31T09:59:30.000Z | geoware/models/timezone.py | un33k/django-geoware | cd7c51e358e5b2d2c3ca92626edbdd7e4f573ab8 | [
"MIT"
] | null | null | null | geoware/models/timezone.py | un33k/django-geoware | cd7c51e358e5b2d2c3ca92626edbdd7e4f573ab8 | [
"MIT"
] | null | null | null | from django.utils.translation import ugettext as _
from slugify import slugify
from .base import models
| 20.695122 | 72 | 0.558044 |
ba9cab0a86eada80999c888eaab2f667c62be16c | 1,905 | py | Python | tools/ransac.py | OhJaeKwang/gaze_estimation | 8fefa9ccb353ae5c164251a61221c369c1a825d2 | [
"MIT"
] | null | null | null | tools/ransac.py | OhJaeKwang/gaze_estimation | 8fefa9ccb353ae5c164251a61221c369c1a825d2 | [
"MIT"
] | null | null | null | tools/ransac.py | OhJaeKwang/gaze_estimation | 8fefa9ccb353ae5c164251a61221c369c1a825d2 | [
"MIT"
] | null | null | null | import os
import sys
import cv2
import numpy as np
import matplotlib.pyplot as plt
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from lib.utils import utils_inference
from lib.utils import utils_landmarks
from lib.ransac import ransac
### Eye Landmarks Detection
method = 'unityeyes_angle'
ckpt = 13... | 36.634615 | 193 | 0.709186 |
ba9d5fcab89a1398779538800ea4c82f1e9c755c | 241 | py | Python | test_scripts/pub100.py | talih0/dps-for-iot | e16f61da15d1d06f13cfce8a667c710f45441d4b | [
"Apache-2.0"
] | 57 | 2017-12-14T01:37:02.000Z | 2021-11-08T11:19:32.000Z | test_scripts/pub100.py | talih0/dps-for-iot | e16f61da15d1d06f13cfce8a667c710f45441d4b | [
"Apache-2.0"
] | 30 | 2017-11-03T18:40:51.000Z | 2021-06-30T13:47:16.000Z | test_scripts/pub100.py | talih0/dps-for-iot | e16f61da15d1d06f13cfce8a667c710f45441d4b | [
"Apache-2.0"
] | 15 | 2018-03-14T05:56:08.000Z | 2021-04-25T21:29:09.000Z | #!/usr/bin/python
from common import *
import atexit
atexit.register(cleanup)
subs = [
sub('1.1.#'),
sub('1.1.#'),
sub('1.1.#')
]
for i in range(100):
pub('1.1.{}'.format(i))
expect_pub_received(subs, ['1.1.\d+'] * 100)
| 13.388889 | 44 | 0.560166 |
ba9d99b33e51af7c8fc9a8456d443439f7486391 | 1,103 | py | Python | population.py | SSebigo/Gomoku | cc7195e3696a614119beb7ec1942f28a23b155b7 | [
"MIT"
] | null | null | null | population.py | SSebigo/Gomoku | cc7195e3696a614119beb7ec1942f28a23b155b7 | [
"MIT"
] | null | null | null | population.py | SSebigo/Gomoku | cc7195e3696a614119beb7ec1942f28a23b155b7 | [
"MIT"
] | null | null | null | from typing import List
from neural_network import NeuralNetwork
| 26.902439 | 75 | 0.606528 |
ba9f502bd80efd70b9e6648ecf3e02c644ef98ef | 4,601 | py | Python | borda.py | thesis-wisard/thesis_libs | a5643775092fdb4322c28ff3793075c86694025d | [
"MIT"
] | null | null | null | borda.py | thesis-wisard/thesis_libs | a5643775092fdb4322c28ff3793075c86694025d | [
"MIT"
] | null | null | null | borda.py | thesis-wisard/thesis_libs | a5643775092fdb4322c28ff3793075c86694025d | [
"MIT"
] | null | null | null | import wisardpkg as wp
import random
import numpy as np
import time
from astropy.stats import bootstrap
from astropy.utils import NumpyRNGContext
LOW_N = 5
HIGH_N = 31
MIN_SCORE = 0.1
GROW_INTERVAL = 100
MAX_DISCRIMINATOR_LIMIT = 10
| 33.583942 | 111 | 0.564008 |
ba9ff79eed66de8a976604f59d5d1e814bf57989 | 21,116 | py | Python | cloudroast/objectstorage/smoke/container_smoke.py | kurhula/cloudroast | dcccce6b3af9d150cb667fc05bd051e97b5f6e2c | [
"Apache-2.0"
] | null | null | null | cloudroast/objectstorage/smoke/container_smoke.py | kurhula/cloudroast | dcccce6b3af9d150cb667fc05bd051e97b5f6e2c | [
"Apache-2.0"
] | null | null | null | cloudroast/objectstorage/smoke/container_smoke.py | kurhula/cloudroast | dcccce6b3af9d150cb667fc05bd051e97b5f6e2c | [
"Apache-2.0"
] | 1 | 2020-04-13T17:47:04.000Z | 2020-04-13T17:47:04.000Z | """
Copyright 2013 Rackspace
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | 33.305994 | 79 | 0.617446 |
baa043ba112c1db1f058e902f2a7ddaf2805cded | 254 | py | Python | ui/experimental.py | miguelgarciaarribas/multroaster | eb3a17e8257cd184cb91d53a2a61c6d3481ac206 | [
"MIT"
] | 1 | 2020-04-18T09:13:18.000Z | 2020-04-18T09:13:18.000Z | ui/experimental.py | miguelgarciaarribas/multroaster | eb3a17e8257cd184cb91d53a2a61c6d3481ac206 | [
"MIT"
] | 18 | 2020-04-24T07:22:54.000Z | 2020-08-28T10:33:18.000Z | ui/experimental.py | miguelgarciaarribas/multroaster | eb3a17e8257cd184cb91d53a2a61c6d3481ac206 | [
"MIT"
] | null | null | null | from PyQt5.QtGui import QImage, QPixmap # review
| 31.75 | 55 | 0.716535 |
baa0b245e76c44193e4e6bd7bfd85355edd44a65 | 3,683 | py | Python | py2neo/exceptions.py | AYCHTECH/PY2NEO | fa0d296c13acb1697f4e112995eea9492e8e6159 | [
"Apache-2.0"
] | null | null | null | py2neo/exceptions.py | AYCHTECH/PY2NEO | fa0d296c13acb1697f4e112995eea9492e8e6159 | [
"Apache-2.0"
] | null | null | null | py2neo/exceptions.py | AYCHTECH/PY2NEO | fa0d296c13acb1697f4e112995eea9492e8e6159 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2011-2013, Nigel Small
#
# 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... | 25.054422 | 77 | 0.660874 |
baa0fbddbd32d3ef3694797a1f0547612c46e0e3 | 163 | py | Python | old/07/04.py | systemquant/book-pandas-for-finance | 90b7eb9be1de20a12ae72b9bb5d51424a979b174 | [
"MIT"
] | 10 | 2021-02-04T12:49:56.000Z | 2022-03-26T11:28:11.000Z | old/07/04.py | systemquant/book-pandas-for-finance | 90b7eb9be1de20a12ae72b9bb5d51424a979b174 | [
"MIT"
] | 1 | 2022-03-24T03:47:14.000Z | 2022-03-24T03:54:52.000Z | old/07/04.py | systemquant/book-pandas-for-finance | 90b7eb9be1de20a12ae72b9bb5d51424a979b174 | [
"MIT"
] | 4 | 2021-07-17T16:50:15.000Z | 2022-03-22T05:55:34.000Z | import pybithumb
df = pybithumb.get_ohlcv("BTC", interval="day")
df[""] = (df['high'] - df['low']) * 0.5
df[""] = df["open"] + df[""].shift(1)
print(df)
| 23.285714 | 47 | 0.588957 |
baa1caa8e9bdbac6ca15b15bf9f64230c965b99a | 23,105 | bzl | Python | repositories.bzl | jesseschalken/rules_proto_grpc | 2e8be8e27cc82203794f14dbdcf37189b02ab722 | [
"Apache-2.0"
] | null | null | null | repositories.bzl | jesseschalken/rules_proto_grpc | 2e8be8e27cc82203794f14dbdcf37189b02ab722 | [
"Apache-2.0"
] | null | null | null | repositories.bzl | jesseschalken/rules_proto_grpc | 2e8be8e27cc82203794f14dbdcf37189b02ab722 | [
"Apache-2.0"
] | null | null | null | """Common dependencies for rules_proto_grpc."""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load("//internal:common.bzl", "check_bazel_minimum_version")
# Versions
MINIMUM_BAZEL_VERSION = "3.0.0"
ENABLE_VERSION_NAGS = False
PROTOBUF_VERSION = "3.19.1" # When updating, also updat... | 36.328616 | 142 | 0.639602 |
baa49d25bf46be87576157d1dc079d66786d0226 | 437 | py | Python | ws_assets/routers.py | Ragnaruk/ws_assets | f593eb0e5c5fe2bf2945b488d7ab10be34d6b5cd | [
"MIT"
] | null | null | null | ws_assets/routers.py | Ragnaruk/ws_assets | f593eb0e5c5fe2bf2945b488d7ab10be34d6b5cd | [
"MIT"
] | null | null | null | ws_assets/routers.py | Ragnaruk/ws_assets | f593eb0e5c5fe2bf2945b488d7ab10be34d6b5cd | [
"MIT"
] | null | null | null | from fastapi import APIRouter
from ws_assets.routes import ui
from ws_assets.routes.api.v1 import websocket
from ws_assets.settings import Settings
settings = Settings()
# /api/v1
api_v1_router = APIRouter(tags=["v1"])
for endpoints in (websocket,):
api_v1_router.include_router(endpoints.router, prefix="/api/v1... | 20.809524 | 68 | 0.759725 |
baa5ec809f693db6d15b2be48cd628a88b94983c | 5,279 | py | Python | adventuredocs/adocs.py | hypatia-software-org/adventuredocs | bba007855e464cd95945b8a5cce73ebaa25f487f | [
"MIT"
] | 7 | 2016-02-20T00:38:10.000Z | 2016-04-18T16:45:20.000Z | adventuredocs/adocs.py | lily-seabreeze/adventuredocs | bba007855e464cd95945b8a5cce73ebaa25f487f | [
"MIT"
] | 19 | 2016-02-20T20:22:43.000Z | 2016-04-17T19:07:10.000Z | adventuredocs/adocs.py | lillian-gardenia-seabreeze/adventuredocs | bba007855e464cd95945b8a5cce73ebaa25f487f | [
"MIT"
] | 2 | 2016-03-26T01:57:37.000Z | 2016-03-28T18:06:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""AdventureDocs
Choose Your Own Adventure style software
documentation from markdown.
Use markdown files to represent a section of instructions,
and options to skip to a section, or just go to the next
section.
Load a directory of markdown files, which also includes a
... | 28.846995 | 249 | 0.638757 |
baa74fba93f9d044432ac0ced5081ee63ebaa072 | 3,095 | py | Python | examples/tutorial/tutorial_part_signatures.py | PhilippBoeing/synbioweaver | 23efdf79a325885a43e82ba13e6ccefb8eb3d733 | [
"MIT"
] | null | null | null | examples/tutorial/tutorial_part_signatures.py | PhilippBoeing/synbioweaver | 23efdf79a325885a43e82ba13e6ccefb8eb3d733 | [
"MIT"
] | null | null | null | examples/tutorial/tutorial_part_signatures.py | PhilippBoeing/synbioweaver | 23efdf79a325885a43e82ba13e6ccefb8eb3d733 | [
"MIT"
] | null | null | null | # This example runs the examples from figure 5 of the manuscript
from synbioweaver import *
declareNewMolecule('GFP')
declareNewMolecule('TetR')
declareNewPart('pConst', ConstitutivePromoter, [])
declareNewPart('cTetR', CodingRegion, moleculesAfter=[TetR])
declareNewPart('ter',Terminator)
declareNewPart('pNeg', Nega... | 40.194805 | 136 | 0.685622 |
baa7798d6951efa49c7dfc86901c4f88cfb2e6a7 | 243 | py | Python | tests/test_bz2.py | refi64/arclib | a872904fa4f4270b851b2e96c917d26d3c0a0a4c | [
"MIT"
] | 2 | 2019-05-04T16:41:16.000Z | 2020-11-09T09:44:19.000Z | tests/test_bz2.py | refi64/arclib | a872904fa4f4270b851b2e96c917d26d3c0a0a4c | [
"MIT"
] | null | null | null | tests/test_bz2.py | refi64/arclib | a872904fa4f4270b851b2e96c917d26d3c0a0a4c | [
"MIT"
] | null | null | null | from util import *
from arclib import bz2
from bz2 import compress, decompress
| 24.3 | 46 | 0.790123 |
baa96ababbc004f7b0ec9bc773951f114fc9b91e | 86 | py | Python | train/__init__.py | SeJV/ComparisonRLapproaches | e1988a97ed5fab10c847350d607e9feafeced61e | [
"MIT"
] | 2 | 2020-12-14T12:59:40.000Z | 2020-12-14T14:08:30.000Z | train/__init__.py | SeJV/ComparisonRLapproaches | e1988a97ed5fab10c847350d607e9feafeced61e | [
"MIT"
] | null | null | null | train/__init__.py | SeJV/ComparisonRLapproaches | e1988a97ed5fab10c847350d607e9feafeced61e | [
"MIT"
] | null | null | null | from train.train_agent import train_agent
from train.train_agents import train_agents
| 28.666667 | 43 | 0.883721 |
baa9b540682d38df669c05ad81b3c9ed20735c9d | 8,104 | py | Python | scripts/detectron2_inference.py | openem-team/openem | 45222c9c77084eacab278da25a8734ae7d43f677 | [
"MIT"
] | 10 | 2019-01-23T23:58:01.000Z | 2021-08-30T19:42:35.000Z | scripts/detectron2_inference.py | openem-team/openem | 45222c9c77084eacab278da25a8734ae7d43f677 | [
"MIT"
] | 3 | 2020-03-20T15:21:41.000Z | 2020-09-18T18:49:38.000Z | scripts/detectron2_inference.py | openem-team/openem | 45222c9c77084eacab278da25a8734ae7d43f677 | [
"MIT"
] | 2 | 2020-05-08T17:39:12.000Z | 2020-10-09T01:27:17.000Z | import argparse
import json
import logging
import multiprocessing as mp
import os
import time
from typing import List
from detectron2.structures import BoxMode
from detectron2 import model_zoo
from detectron2.data import MetadataCatalog, DatasetCatalog
from detectron2.structures import BoxMode
from detectron2.utils.vi... | 33.213115 | 126 | 0.640301 |
baab29c428a4fd141d39839a0e81de189e328413 | 679 | py | Python | redbot/type.py | kinow/redbot | f183f8468b3cf645711ff4a078ea85075ea9c081 | [
"MIT"
] | 167 | 2015-01-07T16:34:56.000Z | 2022-02-20T15:20:06.000Z | redbot/type.py | QPC-database/redbot | f05dd7754cd6f6ba005ae44beeb8ed21516a93c8 | [
"MIT"
] | 180 | 2015-02-01T01:37:53.000Z | 2022-02-17T04:32:01.000Z | redbot/type.py | QPC-database/redbot | f05dd7754cd6f6ba005ae44beeb8ed21516a93c8 | [
"MIT"
] | 32 | 2015-05-20T21:00:13.000Z | 2022-02-16T10:14:15.000Z | from typing import Any, Callable, Dict, List, Tuple
try:
from typing_extensions import Protocol
except ImportError:
from typing import Protocol # type: ignore
StrHeaderListType = List[Tuple[str, str]]
RawHeaderListType = List[Tuple[bytes, bytes]]
HeaderDictType = Dict[str, Any]
ParamDictType = Dict[str, str]... | 26.115385 | 83 | 0.696613 |
baab5621da39d454b371690762d14b2d4e136c2b | 1,660 | py | Python | beatsaver/models/users.py | Sirspam/BeatSaver.py | 7cd0224fb49d4b147ab9b150c0800988bc557c2d | [
"MIT"
] | 4 | 2021-08-13T16:16:22.000Z | 2021-09-25T04:34:56.000Z | beatsaver/models/users.py | Sirspam/BeatSaver.py | 7cd0224fb49d4b147ab9b150c0800988bc557c2d | [
"MIT"
] | null | null | null | beatsaver/models/users.py | Sirspam/BeatSaver.py | 7cd0224fb49d4b147ab9b150c0800988bc557c2d | [
"MIT"
] | 2 | 2021-08-15T00:14:38.000Z | 2021-12-13T02:35:56.000Z | from dataclasses import dataclass
from typing import Union
NoneType = type(None)
| 25.9375 | 81 | 0.631325 |
baab9796d720ace8942051881398273476a5ceda | 11,599 | py | Python | models/swin_transformer.py | rosinality/vision-transformers-pytorch | b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f | [
"MIT"
] | 77 | 2021-04-03T06:44:19.000Z | 2021-07-07T07:05:01.000Z | models/swin_transformer.py | rosinality/vision-transformers-pytorch | b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f | [
"MIT"
] | 1 | 2021-04-08T06:59:41.000Z | 2021-04-08T11:20:32.000Z | models/swin_transformer.py | rosinality/vision-transformers-pytorch | b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f | [
"MIT"
] | 6 | 2021-04-15T13:36:37.000Z | 2022-02-03T12:32:20.000Z | import math
from typing import Sequence, Tuple
import torch
from torch import nn
from torch.nn import functional as F
from tensorfn.config import config_model
from pydantic import StrictInt, StrictFloat
from .layer import DropPath, tuple2, PositionwiseFeedForward
LayerNorm = lambda x: nn.LayerNorm(x, eps=... | 30.523684 | 89 | 0.52358 |
baaba6a98acb8b308d5a161ba06afe454b488903 | 93 | py | Python | tests/conftest.py | Andy-Wilkinson/ChemMLToolk | 83efc7ea66d2def860a3e04ccd70d77fb689fddc | [
"MIT"
] | 1 | 2019-10-30T03:43:24.000Z | 2019-10-30T03:43:24.000Z | tests/conftest.py | Andy-Wilkinson/ChemMLToolk | 83efc7ea66d2def860a3e04ccd70d77fb689fddc | [
"MIT"
] | 2 | 2021-11-28T21:09:30.000Z | 2021-11-28T21:09:39.000Z | tests/conftest.py | Andy-Wilkinson/ChemMLToolkit | 83efc7ea66d2def860a3e04ccd70d77fb689fddc | [
"MIT"
] | null | null | null | import tensorflow as tf
if tf.__version__.startswith('1.'):
tf.enable_eager_execution()
| 18.6 | 35 | 0.752688 |
baac3262872d073b7970c4a5798360c41e0f8d75 | 12,340 | py | Python | snooper/db_hadler.py | tehreem09/web-snooper | bd02ef0aa38881321da8dc76b28560a7381b3841 | [
"MIT"
] | null | null | null | snooper/db_hadler.py | tehreem09/web-snooper | bd02ef0aa38881321da8dc76b28560a7381b3841 | [
"MIT"
] | null | null | null | snooper/db_hadler.py | tehreem09/web-snooper | bd02ef0aa38881321da8dc76b28560a7381b3841 | [
"MIT"
] | null | null | null | import json
# def basic_info_merger(dict):
# with open ('basic_number_info.json', 'r') as basic_num_info:
# num_info = json.load(basic_num_info)
# for data in num_info:
# # print(data)
# number = str(data.get('number'))[2:-2]
# # print(number)
# number2 = '+92'+ dict['n... | 33.172043 | 113 | 0.587439 |
baaddc9bb45e6aae722ae9541eaec5a520d340ca | 189 | py | Python | parse/forms.py | damiso15/excel_microservice | 4c1b57ad6b5d1afb455d55ea97981b8ecc7c28f6 | [
"MIT"
] | null | null | null | parse/forms.py | damiso15/excel_microservice | 4c1b57ad6b5d1afb455d55ea97981b8ecc7c28f6 | [
"MIT"
] | 5 | 2021-03-30T14:07:01.000Z | 2021-09-22T19:30:11.000Z | parse/forms.py | damiso15/excel_microservice | 4c1b57ad6b5d1afb455d55ea97981b8ecc7c28f6 | [
"MIT"
] | null | null | null | # from django import forms
# from .models import ExcelUpload
#
#
# class ExcelUploadForm(forms.ModelForm):
# class Meta:
# model = ExcelUpload
# fields = ('document', )
| 21 | 41 | 0.640212 |
baadf5b6a2a9d890b5b08db05c94ab43db51b053 | 154 | py | Python | src/common/utils/__init__.py | JonasFrey96/RPOSE | 7da77499ab777ce7ee37b731541982870da8d40b | [
"BSD-3-Clause"
] | null | null | null | src/common/utils/__init__.py | JonasFrey96/RPOSE | 7da77499ab777ce7ee37b731541982870da8d40b | [
"BSD-3-Clause"
] | null | null | null | src/common/utils/__init__.py | JonasFrey96/RPOSE | 7da77499ab777ce7ee37b731541982870da8d40b | [
"BSD-3-Clause"
] | null | null | null | from .loading import *
from .utils_dict_list import *
from .get_logger import get_neptune_logger, get_tensorboard_logger
from .map_dict import Map,DotDict | 38.5 | 66 | 0.844156 |
baae0bd8562b640b832596855eba8d94415bbcc3 | 2,676 | py | Python | mnist/mnist_reader.py | Amathlog/RLTorch | 51fbfe26644d0ad06a6a1e6654e42c4221b09b56 | [
"MIT"
] | 1 | 2019-03-11T10:36:23.000Z | 2019-03-11T10:36:23.000Z | mnist/mnist_reader.py | Amathlog/RLTorch | 51fbfe26644d0ad06a6a1e6654e42c4221b09b56 | [
"MIT"
] | null | null | null | mnist/mnist_reader.py | Amathlog/RLTorch | 51fbfe26644d0ad06a6a1e6654e42c4221b09b56 | [
"MIT"
] | null | null | null | import gzip
from pathlib import Path
import numpy as np
data_path = Path(__file__).parent / '..' / 'data'
train_images_file = data_path / 'train-images-idx3-ubyte.gz'
train_labels_file = data_path / 'train-labels-idx1-ubyte.gz'
test_images_file = data_path / 't10k-images-idx3-ubyte.gz'
test_labels_file = data_path /... | 31.482353 | 123 | 0.689836 |
bab2cdd97624bd764104d4c41b7ad0ceafb4df27 | 5,063 | py | Python | examples/tutorial_pt1.py | apoz00003/arcana | 23a8e8ce469cf541f2ed4703c1e9c1d10291d4a6 | [
"Apache-2.0"
] | 3 | 2018-11-12T05:50:38.000Z | 2020-02-03T04:25:05.000Z | examples/tutorial_pt1.py | apoz00003/arcana | 23a8e8ce469cf541f2ed4703c1e9c1d10291d4a6 | [
"Apache-2.0"
] | 72 | 2018-09-07T06:03:12.000Z | 2020-11-03T00:47:04.000Z | examples/tutorial_pt1.py | apoz00003/arcana | 23a8e8ce469cf541f2ed4703c1e9c1d10291d4a6 | [
"Apache-2.0"
] | 3 | 2018-02-12T05:07:35.000Z | 2018-03-02T03:11:29.000Z | from __future__ import absolute_import
from __future__ import print_function
import os.path
import numpy
# from nipype.interfaces.base import (
# TraitedSpec, traits, File, isdefined,
# CommandLineInputSpec, CommandLine)
from nipype.interfaces.base import (
TraitedSpec, traits, BaseInterface, File, isdefine... | 30.317365 | 89 | 0.661466 |
bab5445b3741cb376b235a2b48c913eff62843e9 | 381 | py | Python | phase_separation.py | wdecoster/read_length_SV_discovery | 3d012995d011089521a96907d5645bbc7cad53fe | [
"MIT"
] | 3 | 2019-10-15T20:21:45.000Z | 2021-08-21T08:58:27.000Z | phase_separation.py | wdecoster/read_length_SV_discovery | 3d012995d011089521a96907d5645bbc7cad53fe | [
"MIT"
] | null | null | null | phase_separation.py | wdecoster/read_length_SV_discovery | 3d012995d011089521a96907d5645bbc7cad53fe | [
"MIT"
] | 1 | 2020-07-22T01:30:44.000Z | 2020-07-22T01:30:44.000Z | from Bio import SeqIO
import sys
with open("phase0.fasta", 'w') as phase0, open("phase1.fasta", 'w') as phase1:
for record in SeqIO.parse(sys.argv[1], "fasta"):
if record.id.endswith('0'):
phase0.write(record.format("fasta"))
elif record.id.endswith('1'):
phase1.write(record... | 31.75 | 78 | 0.593176 |
bab5be57e22359586e87739856f23dc498c9a1a3 | 1,245 | py | Python | tests/integration/views/test_session.py | ONSdigital/census-survey-runner | 9f8cd3d664db5c5b49d348bdf48c58d1a3492aab | [
"MIT"
] | null | null | null | tests/integration/views/test_session.py | ONSdigital/census-survey-runner | 9f8cd3d664db5c5b49d348bdf48c58d1a3492aab | [
"MIT"
] | 3 | 2018-10-10T08:19:07.000Z | 2018-10-29T11:43:08.000Z | tests/integration/views/test_session.py | ONSdigital/census-survey-runner | 9f8cd3d664db5c5b49d348bdf48c58d1a3492aab | [
"MIT"
] | 1 | 2021-04-11T08:04:22.000Z | 2021-04-11T08:04:22.000Z | import time
from tests.integration.integration_test_case import IntegrationTestCase
from app.settings import RESPONDENT_ACCOUNT_URL
| 37.727273 | 71 | 0.734137 |
bab70bc3ca929ef53c40db322323ae3e7fc22459 | 557 | py | Python | test_ifo_env.py | medric49/sharingan | f6b85118016d45456fc1467c6706731562c0f0d7 | [
"MIT"
] | null | null | null | test_ifo_env.py | medric49/sharingan | f6b85118016d45456fc1467c6706731562c0f0d7 | [
"MIT"
] | null | null | null | test_ifo_env.py | medric49/sharingan | f6b85118016d45456fc1467c6706731562c0f0d7 | [
"MIT"
] | null | null | null | import os
from gym.envs.mujoco import reacher3dof
from rllab.envs.gym_env import GymEnv
os.environ['MKL_SERVICE_FORCE_INTEL'] = '1'
os.environ['MUJOCO_GL'] = 'egl'
env = GymEnv("Reacher3DOF-v1", mode='oracle', force_reset=True)
time_step = env.reset()
print(time_step)
while True:
env.render()
time_step = en... | 24.217391 | 63 | 0.696589 |
bab7f429091cfd8a1ee991d9f7990039209eef13 | 2,773 | py | Python | preprocessing/clause_splitter.py | cniklaus/argumentation-learning | d81c6b9f0f26ccee373994dacefd5b575fc3e763 | [
"MIT"
] | null | null | null | preprocessing/clause_splitter.py | cniklaus/argumentation-learning | d81c6b9f0f26ccee373994dacefd5b575fc3e763 | [
"MIT"
] | null | null | null | preprocessing/clause_splitter.py | cniklaus/argumentation-learning | d81c6b9f0f26ccee373994dacefd5b575fc3e763 | [
"MIT"
] | null | null | null | import spacy
from spacy.lang.de.examples import sentences
#from collections import OrderedDict
#import numpy as np
nlp = spacy.load('de_core_news_sm')
doc = nlp("Weil die Sonne scheint, ist es warm, nachdem ich ein Eis, das sehr lecker war, gegessen habe.")
print(doc.text)
#for token in doc:
# print(token.text, to... | 26.409524 | 106 | 0.60476 |
bab8a52d5c732186a4c6df87b8780ef2f9b9eb2b | 332 | py | Python | texasholdem/texasholdem/urls.py | stricoff92/games-hub | 23bbd308fc12e214abd8813607ce92fd0a20fa8c | [
"MIT"
] | null | null | null | texasholdem/texasholdem/urls.py | stricoff92/games-hub | 23bbd308fc12e214abd8813607ce92fd0a20fa8c | [
"MIT"
] | 5 | 2021-03-19T04:38:06.000Z | 2021-09-22T19:10:42.000Z | texasholdem/texasholdem/urls.py | stricoff92/games-hub | 23bbd308fc12e214abd8813607ce92fd0a20fa8c | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls import url
urlpatterns = [
url(r'^api-auth/', include('rest_framework.urls')),
path('', include('lobby.urls')),
path('', include('connectquatro.urls')),
path('admin/', admin.si... | 25.538462 | 55 | 0.695783 |
bab96adff00e5592d6dd50d6d5dcfa735edf0250 | 805 | py | Python | encryptedpickle/utils.py | ai-are-better-than-humans/encrypted-pickle-python | 7656233598e02e65971f69e11849a0f288b2b2a5 | [
"MIT"
] | 4 | 2016-05-23T08:07:31.000Z | 2020-02-26T17:07:15.000Z | encryptedpickle/utils.py | ai-are-better-than-humans/encrypted-pickle-python | 7656233598e02e65971f69e11849a0f288b2b2a5 | [
"MIT"
] | null | null | null | encryptedpickle/utils.py | ai-are-better-than-humans/encrypted-pickle-python | 7656233598e02e65971f69e11849a0f288b2b2a5 | [
"MIT"
] | 8 | 2016-05-23T23:17:22.000Z | 2021-05-12T18:13:10.000Z | # -*- coding: utf-8 -*-
'''
Some common, generic utilities
'''
from __future__ import absolute_import
from base64 import urlsafe_b64encode, urlsafe_b64decode
def urlsafe_nopadding_b64encode(data):
'''URL safe Base64 encode without padding (=)'''
return urlsafe_b64encode(data).rstrip('=')
def urlsafe_nopa... | 21.184211 | 55 | 0.650932 |
babaa94cdad5e340c2f91ecb33bb6c6a3444d673 | 1,655 | py | Python | payments/migrations/0004_expand_email_scope.py | jakereps/workshops.qiime2.org | 5941e4db8b63c3518db2b85d5c45afbea5781bfc | [
"BSD-3-Clause"
] | null | null | null | payments/migrations/0004_expand_email_scope.py | jakereps/workshops.qiime2.org | 5941e4db8b63c3518db2b85d5c45afbea5781bfc | [
"BSD-3-Clause"
] | null | null | null | payments/migrations/0004_expand_email_scope.py | jakereps/workshops.qiime2.org | 5941e4db8b63c3518db2b85d5c45afbea5781bfc | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2018, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 30.648148 | 106 | 0.536556 |
babb781d7744991028ae717034b56c6166172a1f | 1,304 | py | Python | src/ddo_transform/ddo_transform/standardize.py | bricrsa/datadevops | a6431d30f2ae283197ec91efd6b2052fff9452ea | [
"MIT"
] | null | null | null | src/ddo_transform/ddo_transform/standardize.py | bricrsa/datadevops | a6431d30f2ae283197ec91efd6b2052fff9452ea | [
"MIT"
] | null | null | null | src/ddo_transform/ddo_transform/standardize.py | bricrsa/datadevops | a6431d30f2ae283197ec91efd6b2052fff9452ea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Main module."""
from pyspark.sql import DataFrame
from pyspark.sql.functions import lit, col, to_timestamp
| 29.636364 | 78 | 0.546012 |
babc3fe8d7ed32b5021b112f40324e879f2c46d6 | 311 | py | Python | pype/plugins/harmony/create/create_template.py | kalisp/pype | 28bbffaf2d12ccee48313cd9985e8dfa05e81a5c | [
"MIT"
] | null | null | null | pype/plugins/harmony/create/create_template.py | kalisp/pype | 28bbffaf2d12ccee48313cd9985e8dfa05e81a5c | [
"MIT"
] | null | null | null | pype/plugins/harmony/create/create_template.py | kalisp/pype | 28bbffaf2d12ccee48313cd9985e8dfa05e81a5c | [
"MIT"
] | null | null | null | from avalon import harmony
| 23.923077 | 61 | 0.681672 |
babde36aa5e6a7922b35c485f8bf74af0c0cb0ed | 6,702 | py | Python | lib/surface/functions/get_logs.py | ianel20/google-cloud-sdk | 36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3 | [
"Apache-2.0"
] | null | null | null | lib/surface/functions/get_logs.py | ianel20/google-cloud-sdk | 36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3 | [
"Apache-2.0"
] | null | null | null | lib/surface/functions/get_logs.py | ianel20/google-cloud-sdk | 36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:23:41.000Z | 2020-07-25T12:23:41.000Z | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 40.618182 | 80 | 0.662787 |
babe558239c679b8bcf9e3c1eea23a5feb8f7bcc | 10,697 | py | Python | tests/test_graph.py | zheng-gao/ez_code | fbf48990291aa57d6436d4548b0a6c25dfb8f82d | [
"MIT"
] | null | null | null | tests/test_graph.py | zheng-gao/ez_code | fbf48990291aa57d6436d4548b0a6c25dfb8f82d | [
"MIT"
] | null | null | null | tests/test_graph.py | zheng-gao/ez_code | fbf48990291aa57d6436d4548b0a6c25dfb8f82d | [
"MIT"
] | null | null | null | from fixture.utils import equal_list, equal_dict
from ezcode.graph import NegativeCycleExist
from ezcode.graph.directed import DirectedGraph
from ezcode.graph.undirected import UndirectedGraph
def test_undirected_graph():
"""
A ------ C
| /|\
| / | \
| / | \
| / | E
... | 40.518939 | 205 | 0.444237 |
bac101b295130fa841be5de62c508bc47b701dd7 | 157 | py | Python | coffee_machine/coffees/__init__.py | mpszumowski/Coffee-Machine | acab8b1b7769d856d5746257507529bcdc9ba7de | [
"MIT"
] | null | null | null | coffee_machine/coffees/__init__.py | mpszumowski/Coffee-Machine | acab8b1b7769d856d5746257507529bcdc9ba7de | [
"MIT"
] | null | null | null | coffee_machine/coffees/__init__.py | mpszumowski/Coffee-Machine | acab8b1b7769d856d5746257507529bcdc9ba7de | [
"MIT"
] | null | null | null | from .abc_coffee import AbcCoffeeProgram
from .ingredients import Milk, Coffee
from .programs import (Cappuccino, Doppio, Espresso, Latte, Lungo, Macchiato)
| 39.25 | 77 | 0.815287 |
bac182c6d94a947ac4d0cc7021002d21a2cbd719 | 1,384 | py | Python | TabEL/client.py | seucs/entity-linker | 0156ad9b9d6439ea15518828513da9d9699b9acd | [
"Apache-2.0"
] | 4 | 2018-03-07T07:59:58.000Z | 2019-10-19T09:31:44.000Z | TabEL/client.py | acmom/entity-linker | 0156ad9b9d6439ea15518828513da9d9699b9acd | [
"Apache-2.0"
] | null | null | null | TabEL/client.py | acmom/entity-linker | 0156ad9b9d6439ea15518828513da9d9699b9acd | [
"Apache-2.0"
] | 2 | 2018-11-05T16:09:07.000Z | 2019-11-07T00:22:37.000Z | #coding=utf8
import time, sys, Queue
import MySQLdb
from MySQLdb import cursors
from multiprocessing.managers import BaseManager
from multiprocessing.sharedctypes import RawArray
from multiprocessing import Process, freeze_support, Array
reload(sys)
sys.setdefaultencoding('utf8')
if __name__ == '__main__':
freez... | 25.62963 | 73 | 0.639451 |
bac2adf850f35e65296bb63e66cba39f424768ca | 3,474 | py | Python | Polis/vps.py | willll/masternodes | 3e8e89898e340d51474edc817f5c6ba80d0ce8c1 | [
"Unlicense"
] | null | null | null | Polis/vps.py | willll/masternodes | 3e8e89898e340d51474edc817f5c6ba80d0ce8c1 | [
"Unlicense"
] | null | null | null | Polis/vps.py | willll/masternodes | 3e8e89898e340d51474edc817f5c6ba80d0ce8c1 | [
"Unlicense"
] | 2 | 2018-11-27T23:34:24.000Z | 2018-12-28T03:03:58.000Z | from invoke.exceptions import UnexpectedExit
from utils import execute_command, is_file_exists
import logging
'''
is_genkey_unique
'''
'''
is_vps_installed
'''
'''
is_polis_installed
'''
'''
is_monitoring_script_installed
'''
'''
BUG : Must be logged in root !
TODO : add an interactive shell to ask u... | 35.090909 | 175 | 0.563615 |
bac5271cebc525a305e4dcce861d0532699b554d | 4,330 | py | Python | src/cloudservice/azext_cloudservice/manual/_params.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/cloudservice/azext_cloudservice/manual/_params.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/cloudservice/azext_cloudservice/manual/_params.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # --------------------------------------------------------------------------
# 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 cause incor... | 75.964912 | 119 | 0.638337 |
bac5979f60f7a78a72eff8a38edbf552a2696bf8 | 504 | py | Python | examples/tutorial1/send.py | bufferx/stormed-amqp | 6b29ae069a3cf62277ed1dffe7dd895a743f28e9 | [
"MIT"
] | 15 | 2015-03-06T12:35:52.000Z | 2020-06-28T01:46:09.000Z | examples/tutorial1/send.py | brimcfadden/stormed-amqp | 59e81bfa4632366dc3f20b3dff25df3331480798 | [
"MIT"
] | 14 | 2015-01-08T21:13:27.000Z | 2016-03-09T13:22:01.000Z | examples/tutorial1/send.py | brimcfadden/stormed-amqp | 59e81bfa4632366dc3f20b3dff25df3331480798 | [
"MIT"
] | 14 | 2015-01-11T22:25:37.000Z | 2020-06-28T01:46:13.000Z | #! /usr/bin/env python
import logging
from tornado.ioloop import IOLoop
from stormed import Connection, Message
msg = Message('Hello World!')
logging.basicConfig()
conn = Connection(host='localhost')
conn.connect(on_connect)
io_loop = IOLoop.instance()
io_loop.start()
| 21 | 53 | 0.706349 |
bac96c72212d49906c555e8ee6009e66b8770acd | 420 | py | Python | structural/decorator_example.py | EdiBoba/python_patterns | b3343eed5592beea2996316feb8df4bad107e1fc | [
"MIT"
] | 2 | 2022-02-08T16:30:22.000Z | 2022-03-16T08:20:25.000Z | structural/decorator_example.py | EdiBoba/python_patterns | b3343eed5592beea2996316feb8df4bad107e1fc | [
"MIT"
] | null | null | null | structural/decorator_example.py | EdiBoba/python_patterns | b3343eed5592beea2996316feb8df4bad107e1fc | [
"MIT"
] | 3 | 2021-08-06T15:47:47.000Z | 2021-12-09T18:59:38.000Z | from abc import ABCMeta, abstractmethod
comp = Component()
comp = Wrapper(comp)
print(comp.operator())
| 16.153846 | 40 | 0.657143 |
baccd6c81424ffaf497761f8ea7d84c7831a264c | 281 | py | Python | nmfamv2/metadata/metadata_reader.py | gmarupilla/NMRFAMv2 | 2e9e7e1f43dbf1d8bcdbcff044bb686db3af09e0 | [
"MIT"
] | null | null | null | nmfamv2/metadata/metadata_reader.py | gmarupilla/NMRFAMv2 | 2e9e7e1f43dbf1d8bcdbcff044bb686db3af09e0 | [
"MIT"
] | null | null | null | nmfamv2/metadata/metadata_reader.py | gmarupilla/NMRFAMv2 | 2e9e7e1f43dbf1d8bcdbcff044bb686db3af09e0 | [
"MIT"
] | null | null | null | from .metadata_parser import parse_metadata
from nmfamv2.metadata import Metadata
# Parser
# Validator
# Object
| 20.071429 | 51 | 0.797153 |
bacd225ac1d42e9cb81fbdcf9ad0ce8c4ea2e152 | 428 | py | Python | f8a_report/dbtable_cleanup_main.py | rafiu007/f8a-stacks-report | d7b8d24a67aaaeb36556fe9de71e997074e52daf | [
"Apache-2.0"
] | null | null | null | f8a_report/dbtable_cleanup_main.py | rafiu007/f8a-stacks-report | d7b8d24a67aaaeb36556fe9de71e997074e52daf | [
"Apache-2.0"
] | 1 | 2020-10-29T08:00:39.000Z | 2020-10-29T08:03:46.000Z | f8a_report/dbtable_cleanup_main.py | practice-fabric8-analytics/f8a-stacks-report | 433402eb017201495654a4885c89ce6f378a1cd9 | [
"Apache-2.0"
] | 1 | 2020-10-28T16:07:21.000Z | 2020-10-28T16:07:21.000Z | """Daily clean up of DB tables."""
import logging
from helpers.report_helper import ReportHelper
logger = logging.getLogger(__file__)
def main():
"""Regular clean up of database tables."""
r = ReportHelper()
try:
r.cleanup_db_tables()
except Exception as e:
logger.exception("Excepti... | 19.454545 | 84 | 0.668224 |
bacd2e3df389119769eb29fc4b7a05c4e560d95f | 13,356 | py | Python | losses.py | ProbIOU/PROBIOU-EFFICIENTDET | 1906964f5ac82b73ad120ede1b5eef47bc520598 | [
"Apache-2.0"
] | 2 | 2021-09-02T01:56:58.000Z | 2021-11-19T14:42:41.000Z | losses.py | ProbIOU/PROBIOU-EFFICIENTDET | 1906964f5ac82b73ad120ede1b5eef47bc520598 | [
"Apache-2.0"
] | null | null | null | losses.py | ProbIOU/PROBIOU-EFFICIENTDET | 1906964f5ac82b73ad120ede1b5eef47bc520598 | [
"Apache-2.0"
] | 2 | 2021-12-18T01:11:01.000Z | 2022-02-14T23:00:38.000Z | """
Copyright 2017-2018 Fizyr (https://fizyr.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in w... | 37.516854 | 150 | 0.609763 |
bacda3db4aab0d0f6e89b164fd1966fe8e3f70d2 | 3,093 | py | Python | pomodoro.py | Mattynb/PomodoroGUI | b6c67a0f059497f17fad5cdc4c6b9089d63d29a8 | [
"MIT"
] | null | null | null | pomodoro.py | Mattynb/PomodoroGUI | b6c67a0f059497f17fad5cdc4c6b9089d63d29a8 | [
"MIT"
] | null | null | null | pomodoro.py | Mattynb/PomodoroGUI | b6c67a0f059497f17fad5cdc4c6b9089d63d29a8 | [
"MIT"
] | null | null | null | import PySimpleGUI as pg
import time
import sys
from pygame import mixer
# Section Popup
if __name__ == '__main__':
main()
| 30.93 | 126 | 0.430973 |
bacf8f6d3d4b525ddd175a8b2492963e5de1c2a0 | 4,703 | py | Python | addons/blender-skeletal-motion-animate/panels/retargeting.py | trisadmeslek/V-Sekai-Blender-tools | 0d8747387c58584b50c69c61ba50a881319114f8 | [
"MIT"
] | null | null | null | addons/blender-skeletal-motion-animate/panels/retargeting.py | trisadmeslek/V-Sekai-Blender-tools | 0d8747387c58584b50c69c61ba50a881319114f8 | [
"MIT"
] | null | null | null | addons/blender-skeletal-motion-animate/panels/retargeting.py | trisadmeslek/V-Sekai-Blender-tools | 0d8747387c58584b50c69c61ba50a881319114f8 | [
"MIT"
] | null | null | null | import bpy
from .main import ToolPanel
from ..operators import retargeting, detector
from ..core.icon_manager import Icons
from ..core.retargeting import get_target_armature
from bpy.types import PropertyGroup, UIList
from bpy.props import StringProperty
# Retargeting panel
| 35.900763 | 171 | 0.670423 |
bad12262ef46a460162421fa3fc24f38cea101a7 | 25 | py | Python | testsuite/modulegraph-dir/package_with_star_import/__init__.py | xoviat/modulegraph2 | 766d00bdb40e5b2fe206b53a87b1bce3f9dc9c2a | [
"MIT"
] | 9 | 2020-03-22T14:48:01.000Z | 2021-05-30T12:18:12.000Z | testsuite/modulegraph-dir/package_with_star_import/__init__.py | xoviat/modulegraph2 | 766d00bdb40e5b2fe206b53a87b1bce3f9dc9c2a | [
"MIT"
] | 15 | 2020-01-06T10:02:32.000Z | 2021-05-28T12:22:44.000Z | testsuite/modulegraph-dir/package_with_star_import/__init__.py | ronaldoussoren/modulegraph2 | b6ab1766b0098651b51083235ff8a18a5639128b | [
"MIT"
] | 4 | 2020-05-10T18:51:41.000Z | 2021-04-07T14:03:12.000Z | from no_imports import *
| 12.5 | 24 | 0.8 |
bad1baa27ef9fe52644d371d1f406ee906b6cb17 | 4,128 | py | Python | repos/system_upgrade/common/actors/selinux/selinuxprepare/tests/component_test_selinuxprepare.py | sm00th/leapp-repository | 1c171ec3a5f9260a3c6f84a9b15cad78a875ac61 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/common/actors/selinux/selinuxprepare/tests/component_test_selinuxprepare.py | sm00th/leapp-repository | 1c171ec3a5f9260a3c6f84a9b15cad78a875ac61 | [
"Apache-2.0"
] | 1 | 2022-03-07T15:34:11.000Z | 2022-03-07T15:35:15.000Z | repos/system_upgrade/common/actors/selinux/selinuxprepare/tests/component_test_selinuxprepare.py | sm00th/leapp-repository | 1c171ec3a5f9260a3c6f84a9b15cad78a875ac61 | [
"Apache-2.0"
] | null | null | null | import os
import pytest
from leapp.libraries.stdlib import api, CalledProcessError, run
from leapp.models import SELinuxModule, SELinuxModules
from leapp.reporting import Report
from leapp.snactor.fixture import current_actor_context
TEST_MODULES = [
['400', 'mock1'],
['99', 'mock1'],
['300', 'mock1'],
... | 38.579439 | 110 | 0.668362 |
bad1ccb092d8f5ff71c5c028aa84d24c26e25a42 | 20,919 | py | Python | run.py | BIDS-Apps/afni_proc_bids_app | b36d224b25fb023e3bffcf6a4fb96833a1ce18f4 | [
"Apache-2.0"
] | 1 | 2018-09-17T21:04:46.000Z | 2018-09-17T21:04:46.000Z | run.py | BIDS-Apps/afni_proc_bids_app | b36d224b25fb023e3bffcf6a4fb96833a1ce18f4 | [
"Apache-2.0"
] | 8 | 2017-12-05T17:02:53.000Z | 2022-02-17T16:04:50.000Z | run.py | BIDS-Apps/afni_proc_bids_app | b36d224b25fb023e3bffcf6a4fb96833a1ce18f4 | [
"Apache-2.0"
] | 3 | 2017-12-05T15:46:25.000Z | 2018-01-15T20:00:09.000Z | #!/usr/bin/env python3
from __future__ import absolute_import, division, print_function, unicode_literals
import argparse
import os
import subprocess
from glob import glob
import pandas as pd
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
import base64
import json
import numpy as np
impor... | 47.979358 | 304 | 0.571442 |
bad3f16dab0d3a862f98f60e8103cc7bdfb888f7 | 1,547 | py | Python | web/app/views_admin.py | pierre-chaville/automlk | 61386beba62f72360e1f5f8d6bcce17df653e2e8 | [
"MIT"
] | 16 | 2017-09-05T12:26:11.000Z | 2019-10-26T22:55:41.000Z | web/app/views_admin.py | pierre-chaville/automlk | 61386beba62f72360e1f5f8d6bcce17df653e2e8 | [
"MIT"
] | 1 | 2018-02-07T11:16:43.000Z | 2018-02-07T11:16:43.000Z | web/app/views_admin.py | pierre-chaville/automlk | 61386beba62f72360e1f5f8d6bcce17df653e2e8 | [
"MIT"
] | 8 | 2017-09-21T01:20:52.000Z | 2021-01-21T10:03:34.000Z | from app import app
from flask import render_template, request, flash
from .form import *
from automlk.monitor import get_heart_beeps
from automlk.context import get_config, set_config
| 35.976744 | 106 | 0.594053 |
bad3f37859ea848ad6a1f4639c0e685321d4ab5a | 2,471 | py | Python | tests/test_run.py | greyside/errand-boy | 4fe625cd35f123ac5a900acde8676e5303e0521c | [
"BSD-3-Clause"
] | 35 | 2015-01-13T15:40:37.000Z | 2022-01-14T10:18:41.000Z | tests/test_run.py | greyside/errand-boy | 4fe625cd35f123ac5a900acde8676e5303e0521c | [
"BSD-3-Clause"
] | 8 | 2015-09-01T15:13:27.000Z | 2020-02-05T09:10:02.000Z | tests/test_run.py | greyside/errand-boy | 4fe625cd35f123ac5a900acde8676e5303e0521c | [
"BSD-3-Clause"
] | 8 | 2015-06-28T18:26:21.000Z | 2019-11-28T08:39:44.000Z | import errand_boy
from errand_boy import run
from errand_boy.transports import unixsocket
from .base import mock, BaseTestCase
| 36.338235 | 139 | 0.673007 |
bad4cf3dc6de5ce2d0d4976051b05fed4b7194fc | 14,591 | py | Python | components/watcher_handle.py | Druzai/Bot_Mc_discord | 0ab210d201675db96fbb7ba527ab36aa67cddf90 | [
"MIT"
] | 2 | 2020-12-15T14:06:13.000Z | 2021-12-09T20:25:02.000Z | components/watcher_handle.py | Druzai/Bot_Mc_discord | 0ab210d201675db96fbb7ba527ab36aa67cddf90 | [
"MIT"
] | 21 | 2020-09-05T23:04:13.000Z | 2022-03-28T15:31:30.000Z | components/watcher_handle.py | Druzai/Bot_Mc_discord | 0ab210d201675db96fbb7ba527ab36aa67cddf90 | [
"MIT"
] | 1 | 2021-09-03T17:54:14.000Z | 2021-09-03T17:54:14.000Z | import socket
from contextlib import suppress
from os import SEEK_END, stat
from pathlib import Path
from re import search, split, findall
from sys import exc_info
from threading import Thread
from time import sleep
from traceback import format_exc
from colorama import Fore, Style
from discord import Webhook, Requests... | 51.741135 | 120 | 0.47872 |
bad8ded43ad99c5016d472583b43eb9b9f4122d5 | 745 | py | Python | utils/update_all_playlist_descriptions.py | stephanebruckert/resident-archive | 75c270faded445ac71065c1b6e5d587da925f379 | [
"MIT"
] | 16 | 2019-05-19T15:52:25.000Z | 2021-06-02T10:03:30.000Z | utils/update_all_playlist_descriptions.py | stephanebruckert/resident-archive | 75c270faded445ac71065c1b6e5d587da925f379 | [
"MIT"
] | 2 | 2019-06-16T10:22:40.000Z | 2019-11-21T22:00:07.000Z | utils/update_all_playlist_descriptions.py | resident-archive/resident-archive-lambdas | 75c270faded445ac71065c1b6e5d587da925f379 | [
"MIT"
] | 2 | 2019-08-19T12:27:05.000Z | 2019-10-31T08:27:19.000Z | #!/usr/bin/python3.7
"""
Set all playlist descriptions.
Example result:
Resident Advisor Archive www.residentarchive.com @residentarchive
"""
import boto3
import spotipy
from pprint import pprint
dynamodb = boto3.resource("dynamodb", region_name='eu-west-1')
ra_playlists = dynamodb.Table('ra_playlists')
scope = '... | 26.607143 | 81 | 0.769128 |
bad9b540ba82400bb66c15a6e6b7c6b46db61e1a | 1,428 | py | Python | msflops/reporter.py | swagshaw/mindspore-flops | 364139865c47b6c80cfd0ba6cd5e6901db983144 | [
"Apache-2.0"
] | 2 | 2021-10-09T11:53:35.000Z | 2022-02-02T16:07:33.000Z | msflops/reporter.py | swagshaw/mindspore-flops | 364139865c47b6c80cfd0ba6cd5e6901db983144 | [
"Apache-2.0"
] | null | null | null | msflops/reporter.py | swagshaw/mindspore-flops | 364139865c47b6c80cfd0ba6cd5e6901db983144 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
pd.set_option('display.width', 1000)
pd.set_option('display.max_rows', 10000)
pd.set_option('display.max_columns', 10000)
| 26.444444 | 72 | 0.553922 |
badc956a17a6eddf0152abe143da26f2b0200f6c | 106 | py | Python | security/compatibility.py | jsilhan/django-security | fd56a6ca8ab7ad2b1e91a33ea4ecb40bb10cc42b | [
"MIT"
] | null | null | null | security/compatibility.py | jsilhan/django-security | fd56a6ca8ab7ad2b1e91a33ea4ecb40bb10cc42b | [
"MIT"
] | null | null | null | security/compatibility.py | jsilhan/django-security | fd56a6ca8ab7ad2b1e91a33ea4ecb40bb10cc42b | [
"MIT"
] | null | null | null | try:
from ipware.ip import get_client_ip
except ImportError:
from ipware.ip2 import get_client_ip
| 21.2 | 40 | 0.783019 |
badd5923a861d26eeb620a2d2c3c1017d42267b7 | 736 | py | Python | setup.py | smherwig/cigarbox | 7d455f36df2e2d56f38fd73d3223aa77d5922e73 | [
"BSD-3-Clause"
] | null | null | null | setup.py | smherwig/cigarbox | 7d455f36df2e2d56f38fd73d3223aa77d5922e73 | [
"BSD-3-Clause"
] | null | null | null | setup.py | smherwig/cigarbox | 7d455f36df2e2d56f38fd73d3223aa77d5922e73 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
# See:
# https://packaging.python.org/guids/distruting-packages-using-setuptools
setup(
name="cigarbox",
version="0.1.0",
description="utility libraries",
long_description="utility libraries",
long_description_content_type="text/plain",
url="https://... | 28.307692 | 73 | 0.654891 |
bade9c016e086e5bd504bbf7ecd019f9ea2e8e26 | 322 | py | Python | tests/test_client.py | debonzi/celery_crossover | 2da97fe527a357d5c85dfd29b04424d08dbe9b93 | [
"MIT"
] | 10 | 2018-04-06T18:58:18.000Z | 2021-11-05T19:19:03.000Z | tests/test_client.py | debonzi/celery_crossover | 2da97fe527a357d5c85dfd29b04424d08dbe9b93 | [
"MIT"
] | 2 | 2018-08-15T18:15:54.000Z | 2021-03-26T06:58:02.000Z | tests/test_client.py | debonzi/celery_crossover | 2da97fe527a357d5c85dfd29b04424d08dbe9b93 | [
"MIT"
] | 3 | 2018-04-09T03:06:12.000Z | 2019-11-08T17:35:57.000Z | # -*- coding: utf-8 -*-
import types
from crossover import Client
from crossover import _Requester
| 26.833333 | 57 | 0.748447 |
bae06136e10bb2daeb4725a0ae34365494e741f2 | 9,707 | py | Python | tests/xmrswap/common.py | tecnovert/xmrswap | ad2983a4df03184453ff680c17602497acc75a87 | [
"MIT"
] | 2 | 2020-09-21T17:33:23.000Z | 2020-10-03T08:54:01.000Z | tests/xmrswap/common.py | tecnovert/xmrswap | ad2983a4df03184453ff680c17602497acc75a87 | [
"MIT"
] | 2 | 2020-10-03T09:18:48.000Z | 2020-10-13T19:58:34.000Z | tests/xmrswap/common.py | tecnovert/xmrswap | ad2983a4df03184453ff680c17602497acc75a87 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020 tecnovert
# Distributed under the MIT software license, see the accompanying
# file LICENSE.txt or http://www.opensource.org/licenses/mit-license.php.
import os
import sys
import time
import signal
import logging
import subprocess
from io import Str... | 35.6875 | 126 | 0.631709 |
bae2914a1bdd8e77239d3c806fce04b31c71f2e9 | 440 | py | Python | Projetos Python/pythonexercicios/des101.py | Moyses-Nunes/Projetos-Python | 71ae170fb0d7be6afea18608bca630b57b9f0dff | [
"MIT"
] | null | null | null | Projetos Python/pythonexercicios/des101.py | Moyses-Nunes/Projetos-Python | 71ae170fb0d7be6afea18608bca630b57b9f0dff | [
"MIT"
] | null | null | null | Projetos Python/pythonexercicios/des101.py | Moyses-Nunes/Projetos-Python | 71ae170fb0d7be6afea18608bca630b57b9f0dff | [
"MIT"
] | null | null | null | from random import randint
numeros = list()
sort(numeros)
somapar(numeros)
| 19.130435 | 59 | 0.565909 |
bae4f943156deccc9e0898af0ab959a665ca6cf6 | 71 | py | Python | lang/py/cookbook/v2/source/cb2_18_14_exm_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_18_14_exm_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_18_14_exm_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | if isinstance(other, float):
other = Measurement(other, 0)
| 23.666667 | 41 | 0.619718 |
bae79c652b368a3b504f884924072fb2c0c8f259 | 6,412 | py | Python | tests/environment.py | openpermissions/api-test-suite | 982aec0abc04adc92245278ebd452aa1a8a2160c | [
"Apache-2.0"
] | 3 | 2016-05-03T20:07:51.000Z | 2019-05-20T01:43:53.000Z | tests/environment.py | openpermissions/api-test-suite | 982aec0abc04adc92245278ebd452aa1a8a2160c | [
"Apache-2.0"
] | 8 | 2016-05-04T13:11:44.000Z | 2016-07-20T13:01:00.000Z | tests/environment.py | openpermissions/api-test-suite | 982aec0abc04adc92245278ebd452aa1a8a2160c | [
"Apache-2.0"
] | 1 | 2019-05-20T01:43:43.000Z | 2019-05-20T01:43:43.000Z | # -*- coding: utf-8 -*-
# Copyright 2016 Open Permissions Platform Coalition
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by appl... | 30.533333 | 107 | 0.678571 |
bae8b374ddcb9acaae8cb0a578eb44560c94794f | 2,802 | py | Python | test/animate.py | colonelwatch/ESP32-fluid-simulation | 407811901b45e3eadb43924e4754688f62eb6b05 | [
"MIT"
] | 5 | 2021-08-22T18:13:31.000Z | 2022-02-20T22:42:38.000Z | test/animate.py | colonelwatch/ESP32-fluid-simulation | 407811901b45e3eadb43924e4754688f62eb6b05 | [
"MIT"
] | null | null | null | test/animate.py | colonelwatch/ESP32-fluid-simulation | 407811901b45e3eadb43924e4754688f62eb6b05 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
DT = 0.01
FRAMERATE = 60
N_ROWS = 64
SECONDS = 10
velocity_frames = read_velocity()
pressure_frames = read_pressure()
color_frames = read_color()
divergence_frames = read_divergence()
frame_interval = 1000//FRAMERATE
frame_co... | 34.170732 | 104 | 0.682013 |
baeaf373a9c8459092cec53c9defe9e23ec03c38 | 9,519 | py | Python | policy/RTS2_FITS_LUTs.py | tguillemLSST/eotest | c6f150984fa5dff85b9805028645bf46fc846f11 | [
"BSD-3-Clause-LBNL"
] | 3 | 2016-04-21T07:05:45.000Z | 2020-08-05T08:37:37.000Z | policy/RTS2_FITS_LUTs.py | tguillemLSST/eotest | c6f150984fa5dff85b9805028645bf46fc846f11 | [
"BSD-3-Clause-LBNL"
] | 70 | 2015-03-26T09:48:53.000Z | 2020-04-22T16:29:43.000Z | policy/RTS2_FITS_LUTs.py | tguillemLSST/eotest | c6f150984fa5dff85b9805028645bf46fc846f11 | [
"BSD-3-Clause-LBNL"
] | 5 | 2017-08-15T20:52:44.000Z | 2022-03-25T12:54:07.000Z | RTS2_FITS_LUTs = {}
RTS2_FITS_LUTs['BNL'] = {
0: {
# 'MJD' : 'JD',
# 'MONDIODE' : 'AMP0.CURRENT.MIN',
'MONOWL': 'MONOCH.WAVELENG',
'FILTER': 'MONOCH.FILT_1',
'CONTROLL': 'INSTRUME',
'CCDTEMP': 'CRYO.C.TEMP',
'IMGTYPE': 'TESTTYPE',
... | 33.517606 | 62 | 0.460027 |
baebfbf068726c3c866bdd3aa0015d86ce8b2933 | 850 | py | Python | problem_#115.py | vivek28111992/DailyCoding | db58c069ef393f6a93fe86913660860134cb97a0 | [
"MIT"
] | null | null | null | problem_#115.py | vivek28111992/DailyCoding | db58c069ef393f6a93fe86913660860134cb97a0 | [
"MIT"
] | null | null | null | problem_#115.py | vivek28111992/DailyCoding | db58c069ef393f6a93fe86913660860134cb97a0 | [
"MIT"
] | null | null | null | """
Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a tree consists of a node in s and all of this node's descendants. The tree s could also be considered as a subtree of itself
"""
| 27.419355 | 274 | 0.614118 |
baedb9f63ad29c867ce4f5a6689df6868f5d1f76 | 2,039 | py | Python | tests/test_python_literal_action.py | madman-bob/python-argparse-utils | e3a816596d1b374825a4b8d45b56fbce4758a4f4 | [
"MIT"
] | 7 | 2019-07-05T20:17:08.000Z | 2021-09-27T04:56:40.000Z | tests/test_python_literal_action.py | madman-bob/python-argparse-utils | e3a816596d1b374825a4b8d45b56fbce4758a4f4 | [
"MIT"
] | 2 | 2019-04-03T09:43:40.000Z | 2020-05-05T17:47:22.000Z | tests/test_python_literal_action.py | madman-bob/python-argparse-utils | e3a816596d1b374825a4b8d45b56fbce4758a4f4 | [
"MIT"
] | 1 | 2020-12-11T10:47:49.000Z | 2020-12-11T10:47:49.000Z | from argparse import ArgumentParser
from contextlib import redirect_stderr
from io import StringIO
from re import escape as re_escape
from unittest import TestCase
from argparse_utils import python_literal_action
| 35.155172 | 92 | 0.590486 |
baedce755f416709ddf9ff38c919235dbc9775f4 | 3,911 | py | Python | emissor/processing/processing.py | cltl/GMRCAnnotation | cc4c7f0c9cbbce0eb6c7dee4d39d128f91b85839 | [
"MIT"
] | null | null | null | emissor/processing/processing.py | cltl/GMRCAnnotation | cc4c7f0c9cbbce0eb6c7dee4d39d128f91b85839 | [
"MIT"
] | 18 | 2021-01-12T15:18:07.000Z | 2021-03-23T12:30:57.000Z | emissor/processing/processing.py | cltl/GMRCAnnotation | cc4c7f0c9cbbce0eb6c7dee4d39d128f91b85839 | [
"MIT"
] | null | null | null | import logging
from joblib import Parallel, delayed
from typing import Iterable
from emissor.persistence import ScenarioStorage
from emissor.processing.api import DataPreprocessor, ScenarioInitializer, SignalProcessor
from emissor.representation.scenario import Modality
logger = logging.getLogger(__name__)
# TODO | 38.343137 | 121 | 0.706469 |
baee7b5f4d21c9ddb2c468e07c7ee4ee65dafa1e | 466 | py | Python | hgapp/powers/templatetags/power_tags.py | shadytradesman/The-Contract-Website | d8b353064f91c53ebab951dec784a0a36caba260 | [
"Apache-2.0"
] | 6 | 2020-10-03T12:15:05.000Z | 2021-10-15T04:43:36.000Z | hgapp/powers/templatetags/power_tags.py | shadytradesman/The-Contract-Website | d8b353064f91c53ebab951dec784a0a36caba260 | [
"Apache-2.0"
] | 99 | 2020-06-04T17:43:56.000Z | 2022-03-12T01:07:20.000Z | hgapp/powers/templatetags/power_tags.py | shadytradesman/The-Contract-Website | d8b353064f91c53ebab951dec784a0a36caba260 | [
"Apache-2.0"
] | 9 | 2020-06-06T16:39:09.000Z | 2020-10-02T16:24:17.000Z | from django import template
from powers.models import Power
register = template.Library()
| 24.526316 | 59 | 0.73176 |
baef32a63d7954d576b6da6841f0534bc30e3778 | 2,298 | py | Python | pySDC/projects/FastWaveSlowWave/plotgmrescounter_boussinesq.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 20 | 2015-03-21T09:02:55.000Z | 2022-02-26T20:22:21.000Z | pySDC/projects/FastWaveSlowWave/plotgmrescounter_boussinesq.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 61 | 2015-03-02T09:35:55.000Z | 2022-03-17T12:42:48.000Z | pySDC/projects/FastWaveSlowWave/plotgmrescounter_boussinesq.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 19 | 2015-02-20T11:52:33.000Z | 2022-02-02T10:46:27.000Z | import numpy as np
from matplotlib import pyplot as plt
from pylab import rcParams
def plot_buoyancy(cwd=''):
"""
Plotting routine for the cross section of the buoyancy
Args:
cwd (string): current working directory
"""
xx = np.load(cwd + 'data/xaxis.npy')
uend = np.load(cwd + 'data/s... | 43.358491 | 114 | 0.638381 |
baf0c0d13ccd7ea08a4340fe5baa52080b784567 | 3,297 | py | Python | src/voiceRecognition/voice_recognition.py | PandaFood/M7012E-Autonom_Robot | e0bef049cc63071f060414ed0ce89001d363401a | [
"FSFAP"
] | null | null | null | src/voiceRecognition/voice_recognition.py | PandaFood/M7012E-Autonom_Robot | e0bef049cc63071f060414ed0ce89001d363401a | [
"FSFAP"
] | null | null | null | src/voiceRecognition/voice_recognition.py | PandaFood/M7012E-Autonom_Robot | e0bef049cc63071f060414ed0ce89001d363401a | [
"FSFAP"
] | null | null | null | #Requires the modules SpeechRecognition and pyaudio
import speech_recognition as sr
import sys
sys.path.insert(1, "..")
from camera.camera import Camera
from widefind.widefindScript import WidefindTracker
#Handle transcriptions here
if __name__ == "__main__":
# create recognizer and mic instances
recogn... | 33.30303 | 135 | 0.695784 |
baf0d493a9dadaea985eb5034b9242e9393961b4 | 6,432 | py | Python | src/wind_power_forecasting/nodes/utils.py | vchaparro/wind-power-forecasting | 81e3d361af72c30fbd195a5dd8c7bf3b4df3db66 | [
"CC-BY-4.0"
] | 9 | 2021-03-01T08:40:39.000Z | 2022-03-15T07:21:25.000Z | src/wind_power_forecasting/nodes/utils.py | vchaparro/MasterThesis-wind-power-forecasting | 81e3d361af72c30fbd195a5dd8c7bf3b4df3db66 | [
"CC-BY-4.0"
] | null | null | null | src/wind_power_forecasting/nodes/utils.py | vchaparro/MasterThesis-wind-power-forecasting | 81e3d361af72c30fbd195a5dd8c7bf3b4df3db66 | [
"CC-BY-4.0"
] | 3 | 2021-04-15T17:55:05.000Z | 2022-03-17T18:12:51.000Z | import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import load_digits
from sklearn.model_selection import learning_curve
def export_reports(name, reports, loc):
""" Export each report in 'reports' to html in the location indicated by 'loc'
"""
for key ... | 32 | 86 | 0.640547 |
baf1b6f63140eb9c0e03761cfc6126eff7978de4 | 3,458 | py | Python | tools/archive_publisher.py | asiekierka/z2 | d926408423dc98d71d5e7fc2fda3202c03c309de | [
"MIT"
] | 1 | 2020-02-17T11:42:15.000Z | 2020-02-17T11:42:15.000Z | tools/archive_publisher.py | asiekierka/z2 | d926408423dc98d71d5e7fc2fda3202c03c309de | [
"MIT"
] | null | null | null | tools/archive_publisher.py | asiekierka/z2 | d926408423dc98d71d5e7fc2fda3202c03c309de | [
"MIT"
] | null | null | null | import glob
import os
import shutil
import sys
from zipfile import ZipFile
import django
from internetarchive import upload
sys.path.append("/var/projects/museum/")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "museum.settings")
django.setup()
from museum_site.models import File
ZGAMES_PATH = "/var/projects/muse... | 29.058824 | 74 | 0.520821 |
baf2515a70e81cae3144e3396637050e7d7c8ecd | 3,591 | py | Python | src/extractor.py | wciesialka/sillence-extractor | 34f188951b162280fa0473647ff83a21ddc3f04d | [
"MIT"
] | 4 | 2019-10-12T04:23:43.000Z | 2021-03-04T17:33:29.000Z | src/extractor.py | wciesialka/sillence-extractor | 34f188951b162280fa0473647ff83a21ddc3f04d | [
"MIT"
] | 4 | 2019-12-21T16:51:26.000Z | 2022-03-11T23:55:59.000Z | src/extractor.py | wciesialka/sillence-extractor | 34f188951b162280fa0473647ff83a21ddc3f04d | [
"MIT"
] | 1 | 2021-02-06T21:39:32.000Z | 2021-02-06T21:39:32.000Z | import ffmpeg
import os
import tempfile
import re
from pydub import AudioSegment
import math
FRAME_NAME_PATTERN = "frame-%08d.jpg"
FRACTION_PATTERN = r"(\d+)/(\d+)"
FRACTION_RE = re.compile(FRACTION_PATTERN)
SILENCE = -99.5
LOUDEST = 99.5 | 28.5 | 119 | 0.695071 |
baf2b885d77799a6834819f80aff075d0ff7c9a4 | 1,159 | py | Python | pwm/i2c_ads1115_pwm.py | jordibinefa/raspberrypi-codes | a043cb4e5fc69a4d2f14d7224fc5378cc6d8d093 | [
"MIT"
] | null | null | null | pwm/i2c_ads1115_pwm.py | jordibinefa/raspberrypi-codes | a043cb4e5fc69a4d2f14d7224fc5378cc6d8d093 | [
"MIT"
] | null | null | null | pwm/i2c_ads1115_pwm.py | jordibinefa/raspberrypi-codes | a043cb4e5fc69a4d2f14d7224fc5378cc6d8d093 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
# 20180726 - wiki.binefa.cat
# Based on a code from Tony DiCola (AdaFruit)
# License: Public Domain
import time
import Adafruit_ADS1x15
import time
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(32, GPIO.OUT)
GPIO.setup(33, GPIO.OUT)
GPIO.setup(12, GPIO.OUT)
GPIO.setup(35, GPIO.OUT)
... | 22.72549 | 146 | 0.646247 |
baf466052d1cb9e8f5732f162eeb87ffaa0dea2b | 65 | py | Python | app/db/models/__init__.py | EleutherAGI/eegi-backend | 6e013a4928f1cdea4ef495e82fe641f917708cde | [
"MIT"
] | null | null | null | app/db/models/__init__.py | EleutherAGI/eegi-backend | 6e013a4928f1cdea4ef495e82fe641f917708cde | [
"MIT"
] | 2 | 2021-05-15T15:33:31.000Z | 2021-05-28T15:55:21.000Z | app/db/models/__init__.py | EleutherAGI/eegi-backend | 6e013a4928f1cdea4ef495e82fe641f917708cde | [
"MIT"
] | 2 | 2021-05-15T15:08:25.000Z | 2021-05-16T16:05:55.000Z | from .users import *
from .summaries import *
from .keys import * | 21.666667 | 24 | 0.738462 |
baf4a552e3a9b31a37863ee85ea0bd2b5650c4cc | 3,423 | py | Python | remeta/util.py | m-guggenmos/remeta | d074d87cb45ae83cd0213ffbecbb3d85036f8cd2 | [
"MIT"
] | 1 | 2022-01-03T22:46:02.000Z | 2022-01-03T22:46:02.000Z | remeta/util.py | m-guggenmos/remeta | d074d87cb45ae83cd0213ffbecbb3d85036f8cd2 | [
"MIT"
] | null | null | null | remeta/util.py | m-guggenmos/remeta | d074d87cb45ae83cd0213ffbecbb3d85036f8cd2 | [
"MIT"
] | null | null | null | import sys
import warnings
import numpy as np
from scipy.stats import rankdata
TAB = ' '
maxfloat = np.float128 if hasattr(np, 'float128') else np.longdouble
| 29.765217 | 112 | 0.547181 |
baf58a848aabaf8670ef81bc6b8d5aced5608d67 | 1,372 | py | Python | tonga/models/handlers/command/command_handler.py | Qotto/tonga | a6ae223ebf0fb7b317118b762102f1909435d1cf | [
"MIT"
] | 1 | 2019-12-17T10:06:03.000Z | 2019-12-17T10:06:03.000Z | tonga/models/handlers/command/command_handler.py | Qotto/tonga | a6ae223ebf0fb7b317118b762102f1909435d1cf | [
"MIT"
] | 1 | 2019-07-04T15:22:58.000Z | 2019-07-05T07:23:31.000Z | tonga/models/handlers/command/command_handler.py | Qotto/tonga | a6ae223ebf0fb7b317118b762102f1909435d1cf | [
"MIT"
] | 2 | 2019-06-05T15:40:49.000Z | 2019-12-10T09:24:23.000Z | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Qotto, 2019
""" BaseCommandHandler Module
All command handler must be inherit from this class. Execute function was called by consumer on each received command.
For make an transaction in execute function return 'transaction' as string after end transaction other... | 24.945455 | 119 | 0.673469 |
baf6bab456465922d740d1791db8aca93417eb58 | 1,373 | py | Python | neighbourhoodapp/urls.py | marknesh/neighbourhood-watch | 57e36c800b9e4898be9f4949c80c902f7627699a | [
"MIT"
] | null | null | null | neighbourhoodapp/urls.py | marknesh/neighbourhood-watch | 57e36c800b9e4898be9f4949c80c902f7627699a | [
"MIT"
] | 10 | 2020-03-24T10:47:53.000Z | 2021-04-08T19:51:44.000Z | neighbourhoodapp/urls.py | marknesh/Neighbourhood-Watch | 57e36c800b9e4898be9f4949c80c902f7627699a | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path,re_path
from . import views
from rest_framework.authtoken.views import obtain_auth_token
from rest_framework_simplejwt import views as jwt_views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('', views.... | 44.290323 | 102 | 0.705754 |
baf6f7cf8752fa09d78da501f3bc6b60b55ed4dd | 1,517 | py | Python | 2015/day8/day8.py | naitmare01/Adventofcode | 34f2832fa7a18b76cf9827890632740c6f60679c | [
"MIT"
] | null | null | null | 2015/day8/day8.py | naitmare01/Adventofcode | 34f2832fa7a18b76cf9827890632740c6f60679c | [
"MIT"
] | null | null | null | 2015/day8/day8.py | naitmare01/Adventofcode | 34f2832fa7a18b76cf9827890632740c6f60679c | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import argparse
import codecs
if __name__ == '__main__':
main()
| 29.173077 | 120 | 0.667765 |
baf7b7cfc3a32ed71b8ccf99a03a13c2d80fa7cf | 155 | py | Python | r3det/ops/polygon_geo/polygon_geo.py | SJTU-Thinklab-Det/r3det-pytorch | aed1c26ecfad7ac518d24f0f4d537e1926a7e8bd | [
"Apache-2.0"
] | 42 | 2021-12-09T10:02:35.000Z | 2022-03-30T08:40:20.000Z | r3det/ops/polygon_geo/polygon_geo.py | SJTU-Thinklab-Det/r3det-pytorch | aed1c26ecfad7ac518d24f0f4d537e1926a7e8bd | [
"Apache-2.0"
] | 13 | 2021-12-14T01:47:32.000Z | 2022-03-30T08:01:17.000Z | r3det/ops/polygon_geo/polygon_geo.py | SJTU-Thinklab-Det/r3det-pytorch | aed1c26ecfad7ac518d24f0f4d537e1926a7e8bd | [
"Apache-2.0"
] | 5 | 2021-12-14T09:57:29.000Z | 2022-03-03T12:25:54.000Z | from . import polygon_geo_cpu
def polygon_iou(poly1, poly2):
"""Compute the IoU of polygons."""
return polygon_geo_cpu.polygon_iou(poly1, poly2)
| 22.142857 | 52 | 0.735484 |