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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
947326ec1e6764387f8f688fc871d6938528c208 | 1,266 | py | Python | video/emotion_detection_camera.py | xii1/image-classifier-service | 01d5f2d6ca1436cefa9e3b978caebcc614b9ed34 | [
"MIT"
] | null | null | null | video/emotion_detection_camera.py | xii1/image-classifier-service | 01d5f2d6ca1436cefa9e3b978caebcc614b9ed34 | [
"MIT"
] | null | null | null | video/emotion_detection_camera.py | xii1/image-classifier-service | 01d5f2d6ca1436cefa9e3b978caebcc614b9ed34 | [
"MIT"
] | null | null | null | import cv2
from ml.facial_expression_classification import predict_facial_expression_by_array, IMAGE_WIDTH, IMAGE_HEIGHT
from video.camera import Camera
OPENCV_HAARCASCADE_FRONTALFACE_FILE = 'trained_models/opencv/haarcascades/haarcascade_frontalface_alt.xml'
| 38.363636 | 109 | 0.655608 |
9474293f5ec239c728c0ec0b3c31ea7b0eb35bf9 | 3,221 | py | Python | vb2py/test_at_scale/testheinsega.py | ceprio/xl_vb2py | 899fec0301140fd8bd313e8c80b3fa839b3f5ee4 | [
"BSD-3-Clause"
] | null | null | null | vb2py/test_at_scale/testheinsega.py | ceprio/xl_vb2py | 899fec0301140fd8bd313e8c80b3fa839b3f5ee4 | [
"BSD-3-Clause"
] | null | null | null | vb2py/test_at_scale/testheinsega.py | ceprio/xl_vb2py | 899fec0301140fd8bd313e8c80b3fa839b3f5ee4 | [
"BSD-3-Clause"
] | null | null | null |
import unittest
from vb2py.test_at_scale import file_tester
if __name__ == '__main__':
unittest.main()
| 40.2625 | 120 | 0.804409 |
9474886f597535a540299d4544f2ce99f2545825 | 9,257 | py | Python | scripts/forecast_models_ex.py | chiara87todaro/1C_PYproject | 871dddc3c1e70edc3d6d6470a0f286b6bcf5e7cf | [
"BSD-3-Clause"
] | null | null | null | scripts/forecast_models_ex.py | chiara87todaro/1C_PYproject | 871dddc3c1e70edc3d6d6470a0f286b6bcf5e7cf | [
"BSD-3-Clause"
] | null | null | null | scripts/forecast_models_ex.py | chiara87todaro/1C_PYproject | 871dddc3c1e70edc3d6d6470a0f286b6bcf5e7cf | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 17 10:23:50 2019
@author: chiara
"""
import os
import numpy as np # scientific calculation
import pandas as pd # data analysis
import itertools
import warnings
from statsmodels.tsa.arima_model import ARMA
ts1=list(range(0,500,2))
len(ts1)
mode... | 44.936893 | 85 | 0.480393 |
9474bac774018b60c0a057e186d5951eb0b4920a | 6,798 | py | Python | app/front/forms.py | karilint/TaxonManager | 62969403f349319b1253b53a98dc55f5a597da17 | [
"MIT"
] | null | null | null | app/front/forms.py | karilint/TaxonManager | 62969403f349319b1253b53a98dc55f5a597da17 | [
"MIT"
] | 16 | 2022-01-18T07:16:20.000Z | 2022-03-21T08:49:32.000Z | app/front/forms.py | karilint/TaxonManager | 62969403f349319b1253b53a98dc55f5a597da17 | [
"MIT"
] | null | null | null | # Copyright 2020 Frances M. Skinner, Christian Hill
#
# 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 appli... | 36.945652 | 184 | 0.661518 |
9474e2d806d86010d62a12d23d2e46d45b4305af | 1,336 | py | Python | src/reddack/cli.py | diatomicDisaster/Reddit-Slackbot | 4f22af110e72eab19d9162a4428800a1895303f3 | [
"MIT"
] | null | null | null | src/reddack/cli.py | diatomicDisaster/Reddit-Slackbot | 4f22af110e72eab19d9162a4428800a1895303f3 | [
"MIT"
] | 10 | 2022-02-21T01:11:20.000Z | 2022-02-22T18:13:00.000Z | src/reddack/cli.py | diatomicDisaster/redack | 4f22af110e72eab19d9162a4428800a1895303f3 | [
"MIT"
] | null | null | null | # Future imports
from __future__ import (
annotations
)
# Standard imports
import argparse
from typing import (
Sequence
)
from pathlib import Path
# Local imports
import reddack
import reddack.config
import reddack.utils
def create_arg_parser() -> argparse.ArgumentParser:
"""Create the argument parser f... | 22.644068 | 67 | 0.658683 |
9474e898a0c7ad31351c854ed58654d64d8a886d | 2,815 | py | Python | src/TSP/DP.py | ox4f5da2/TSP | b395806b44fdc2e2b5d7488b77356ccbf30eef21 | [
"MIT"
] | null | null | null | src/TSP/DP.py | ox4f5da2/TSP | b395806b44fdc2e2b5d7488b77356ccbf30eef21 | [
"MIT"
] | null | null | null | src/TSP/DP.py | ox4f5da2/TSP | b395806b44fdc2e2b5d7488b77356ccbf30eef21 | [
"MIT"
] | null | null | null | import time
import numpy as np
import utils #
inf = 10e7 #
def getMinDistance(point, cityNum, dp):
"""
:param point: ndarray
:param cityNum: int
:return: dp list
"""
column = 1 << (cityNum - 1) # dp
# dp
for i in range(cityNum):
dp[i][0] = point[i][0]
# dp
for j in range(1, column): ... | 28.15 | 101 | 0.574778 |
9475e0c18bbe81db935a18b756540e0834fe6a82 | 503 | py | Python | Chapter09/others/convertor.py | PacktPublishing/Machine-Learning-for-Mobile | 89ccd5a8caba5266c5be0a3465e8cb112cbc5a7a | [
"MIT"
] | 13 | 2018-06-28T04:21:55.000Z | 2021-10-05T19:45:48.000Z | Chapter09/screenshots/avinash/convertor.py | PacktPublishing/Machine-Learning-for-Mobile | 89ccd5a8caba5266c5be0a3465e8cb112cbc5a7a | [
"MIT"
] | null | null | null | Chapter09/screenshots/avinash/convertor.py | PacktPublishing/Machine-Learning-for-Mobile | 89ccd5a8caba5266c5be0a3465e8cb112cbc5a7a | [
"MIT"
] | 12 | 2018-12-19T13:59:23.000Z | 2021-08-16T15:47:35.000Z | import tfcoreml as tf_converter
tf_converter.convert(tf_model_path = 'retrained_graph.pb',
mlmodel_path = 'converted.mlmodel',
output_feature_names = ['final_result:0'],
image_input_names = 'input:0',
class_labels = 'retrained_labels.tx... | 41.916667 | 63 | 0.475149 |
94763e73690878ccbfb0b93a8b2aa9df65644db9 | 5,567 | py | Python | pythem-master/pythem/modules/fuzzer.py | Marzooq13579/Hack-Gadgets | 4b9351c4465f3e01fb0390b1e86dfe7c26237a19 | [
"MIT"
] | 8 | 2019-02-17T20:11:46.000Z | 2019-10-18T06:27:16.000Z | pythem-master/pythem/modules/fuzzer.py | Marzooq13579/Hack-Gadgets | 4b9351c4465f3e01fb0390b1e86dfe7c26237a19 | [
"MIT"
] | null | null | null | pythem-master/pythem/modules/fuzzer.py | Marzooq13579/Hack-Gadgets | 4b9351c4465f3e01fb0390b1e86dfe7c26237a19 | [
"MIT"
] | 4 | 2019-02-17T23:00:18.000Z | 2019-10-18T06:27:14.000Z | #!/usr/bin/env python2.7
# Copyright (c) 2016-2018 Angelo Moura
#
# This file is part of the program pythem
#
# pythem is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at... | 36.86755 | 97 | 0.485181 |
9476f2d76b635e59e675584f63851e269e61905f | 874 | py | Python | attention/utils/metadata.py | fbickfordsmith/attention-iclr | 3b8744fd344ed7e2e360a601be12f12e69892941 | [
"MIT"
] | null | null | null | attention/utils/metadata.py | fbickfordsmith/attention-iclr | 3b8744fd344ed7e2e360a601be12f12e69892941 | [
"MIT"
] | null | null | null | attention/utils/metadata.py | fbickfordsmith/attention-iclr | 3b8744fd344ed7e2e360a601be12f12e69892941 | [
"MIT"
] | null | null | null | """
Define metadata variables used throughout the repository.
"""
import numpy as np
import pandas as pd
from scipy.spatial.distance import squareform
from sklearn.metrics.pairwise import cosine_distances
from ..utils.paths import path_metadata, path_representations, path_results
wnids = np.loadtxt(path_metadata/'ima... | 38 | 75 | 0.803204 |
9477323d968feefdc5b066b7368d4e3e196160db | 767 | py | Python | Grokking-Algorithms/Greedy/classRoomScheduling.py | javokhirbek1999/AlgorithmsDS | f5f403fed959ac8cf3064c8c852c59f2e67496ab | [
"MIT"
] | 6 | 2021-03-21T02:24:05.000Z | 2021-04-05T01:32:13.000Z | Grokking-Algorithms/Greedy/classRoomScheduling.py | javokhirbek1999/AlgorithmsDS | f5f403fed959ac8cf3064c8c852c59f2e67496ab | [
"MIT"
] | null | null | null | Grokking-Algorithms/Greedy/classRoomScheduling.py | javokhirbek1999/AlgorithmsDS | f5f403fed959ac8cf3064c8c852c59f2e67496ab | [
"MIT"
] | null | null | null |
# The classroom scheduling problem
# Suppose you have a classroom and you want to hold as many classes as possible
# __________________________
#| class | start | end |
#|_______|_________|________|
#| Art | 9:00 am | 10:30am|
#|_______|_________|________|
#| Eng | 9:30am | 10:30am|
#|_______|_________|_____... | 27.392857 | 80 | 0.698827 |
947752ce89babbd55c9b6ee0f3a325aa92e874d3 | 4,462 | py | Python | app/tests/checkout_backend/uses_cases/test_total_amount_processor.py | jcazallasc/lana-python-challenge | 134ef30b6dcc7c323c90df8992b194741f071d95 | [
"MIT"
] | null | null | null | app/tests/checkout_backend/uses_cases/test_total_amount_processor.py | jcazallasc/lana-python-challenge | 134ef30b6dcc7c323c90df8992b194741f071d95 | [
"MIT"
] | null | null | null | app/tests/checkout_backend/uses_cases/test_total_amount_processor.py | jcazallasc/lana-python-challenge | 134ef30b6dcc7c323c90df8992b194741f071d95 | [
"MIT"
] | null | null | null | from django.test import TestCase
from checkout_backend.entities.offer_entity import OfferEntity
from checkout_backend.entities.product_entity import ProductEntity
from checkout_backend.uses_cases.total_amount_processor import TotalAmountProcessor
| 27.54321 | 83 | 0.485208 |
94777a5313465c9c8238bf7bf45c469fe3eb78a4 | 315 | py | Python | wavelink/__init__.py | hamza1311/Wavelink | f593c59d3589dea9a5337731ac3daaac4cabbfee | [
"MIT"
] | null | null | null | wavelink/__init__.py | hamza1311/Wavelink | f593c59d3589dea9a5337731ac3daaac4cabbfee | [
"MIT"
] | null | null | null | wavelink/__init__.py | hamza1311/Wavelink | f593c59d3589dea9a5337731ac3daaac4cabbfee | [
"MIT"
] | null | null | null | __title__ = 'WaveLink'
__author__ = 'EvieePy'
__license__ = 'MIT'
__copyright__ = 'Copyright 2019-2020 (c) PythonistaGuild'
__version__ = '0.6.0'
from .client import Client
from .errors import *
from .eqs import *
from .events import *
from .player import *
from .node import Node
from .websocket import WebSocket
| 22.5 | 57 | 0.752381 |
947bb882a6bca2a6316713846edc3e060262afd0 | 656 | py | Python | test/supporting/test_processor.py | holitics/phenome-extensions | 230d1494d0f0d7a1d747cb8af9413df46d8d0e25 | [
"Apache-2.0"
] | 1 | 2019-11-22T18:15:39.000Z | 2019-11-22T18:15:39.000Z | test/supporting/test_processor.py | holitics/phenome-extensions | 230d1494d0f0d7a1d747cb8af9413df46d8d0e25 | [
"Apache-2.0"
] | 1 | 2020-02-29T03:13:39.000Z | 2020-02-29T03:19:29.000Z | test/supporting/test_processor.py | holitics/phenome-extensions | 230d1494d0f0d7a1d747cb8af9413df46d8d0e25 | [
"Apache-2.0"
] | null | null | null | # test_processor.py, Copyright (c) 2019, Phenome Project - Nicholas Saparoff <nick.saparoff@gmail.com>
from phenome_core.core.base.base_processor import BaseProcessor
| 22.62069 | 102 | 0.685976 |
947d9383137b613729b449880f7118b84411c66a | 344 | py | Python | Pyspark_Sample_ML_programs/simpleapp.py | mihaque313/pyspark_mllib | 8342108384d15b7f2169aff190038e176d7533a9 | [
"Apache-2.0"
] | 7 | 2018-01-31T07:44:13.000Z | 2021-09-17T11:07:08.000Z | Pyspark_Sample_ML_programs/simpleapp.py | mihaque313/pyspark_mllib | 8342108384d15b7f2169aff190038e176d7533a9 | [
"Apache-2.0"
] | 2 | 2017-11-24T05:57:47.000Z | 2021-06-29T10:42:24.000Z | Pyspark_Sample_ML_programs/simpleapp.py | mihaque313/pyspark_mllib | 8342108384d15b7f2169aff190038e176d7533a9 | [
"Apache-2.0"
] | 6 | 2017-11-02T12:28:37.000Z | 2019-07-06T08:03:33.000Z | from pyspark import SparkContext
logFile = "D:/Spark/spark-1.6.1-bin-hadoop2.6/README.md"
sc = SparkContext("local", "Simple App")
logData = sc.textFile(logFile).cache()
numAs = logData.filter(lambda s: 'a' in s).count()
numBs = logData.filter(lambda s: 'b' in s).count()
print("Lines with a: %i, lines with ... | 34.4 | 60 | 0.671512 |
947e361e77f0dbd8f7fdac8ef15859fe0c1d3230 | 1,218 | py | Python | cli/src/commands/Backup.py | cicharka/epiphany | 8f7ac8916ba32919629c792cc7bdb9156d4295d7 | [
"Apache-2.0"
] | 2 | 2019-02-12T14:02:33.000Z | 2019-07-16T08:44:24.000Z | cli/src/commands/Backup.py | cicharka/epiphany | 8f7ac8916ba32919629c792cc7bdb9156d4295d7 | [
"Apache-2.0"
] | null | null | null | cli/src/commands/Backup.py | cicharka/epiphany | 8f7ac8916ba32919629c792cc7bdb9156d4295d7 | [
"Apache-2.0"
] | null | null | null | import os
from cli.src.commands.BackupRecoveryBase import BackupRecoveryBase
from cli.src.helpers.doc_list_helpers import select_single
| 34.8 | 103 | 0.715107 |
947e404b2d74b25f2cf7a78cf9b4ba6e70f26910 | 228 | py | Python | python/testData/inspections/PyUnresolvedReferencesInspection3K/objectNewAttributes.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/inspections/PyUnresolvedReferencesInspection3K/objectNewAttributes.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/inspections/PyUnresolvedReferencesInspection3K/objectNewAttributes.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z |
x = C()
print(x.foo)
print(x.<warning descr="Unresolved attribute reference 'bar' for class 'C'">bar</warning>)
| 22.8 | 90 | 0.622807 |
9481c1171edc52dfcbc1a9877ebb6348ed166a5e | 84 | py | Python | lumin/nn/ensemble/__init__.py | choisant/lumin | c039136eb096e8f3800f13925f9325b99cf7e76b | [
"Apache-2.0"
] | 43 | 2019-02-11T16:16:42.000Z | 2021-12-13T15:35:20.000Z | lumin/nn/ensemble/__init__.py | choisant/lumin | c039136eb096e8f3800f13925f9325b99cf7e76b | [
"Apache-2.0"
] | 48 | 2020-05-21T02:40:50.000Z | 2021-08-10T11:07:08.000Z | lumin/nn/ensemble/__init__.py | choisant/lumin | c039136eb096e8f3800f13925f9325b99cf7e76b | [
"Apache-2.0"
] | 14 | 2019-05-02T15:09:41.000Z | 2022-01-12T21:13:34.000Z | # from .ensemble import * # noqa 403
# __all__ = [*ensemble.__all__] # noqa F405
| 21 | 44 | 0.654762 |
9482473a1126c6399fbe546129eda6043f695cbf | 490 | py | Python | scg-scrape.py | josteinstraume/python-capstone | a7cf2e3d6e0cf83686b999f9877d06446c1176af | [
"BSD-3-Clause"
] | 1 | 2017-09-01T22:54:00.000Z | 2017-09-01T22:54:00.000Z | scg-scrape.py | josteinstraume/python-capstone | a7cf2e3d6e0cf83686b999f9877d06446c1176af | [
"BSD-3-Clause"
] | null | null | null | scg-scrape.py | josteinstraume/python-capstone | a7cf2e3d6e0cf83686b999f9877d06446c1176af | [
"BSD-3-Clause"
] | null | null | null | import urllib, csv, numpy
from BeautifulSoup import *
url = raw_input('Enter URL to crawl: ')
if len(url) < 1:
url = 'http://sales.starcitygames.com//deckdatabase/deckshow.php?&t%5BC1%5D=3&start_num=0&start_num=0&limit=limit'
html = urllib.urlopen(url).read()
soup = BeautifulSoup(html)
# Retrieve all of the anchor ... | 27.222222 | 115 | 0.685714 |
9482667f7b3f81e2c39c9eb01e0e0b4cdd7db3f4 | 2,921 | py | Python | wire/messages.py | evuez/stork | bd57b207957a9e2feb6ec253cfd2c125a139e52b | [
"MIT"
] | null | null | null | wire/messages.py | evuez/stork | bd57b207957a9e2feb6ec253cfd2c125a139e52b | [
"MIT"
] | null | null | null | wire/messages.py | evuez/stork | bd57b207957a9e2feb6ec253cfd2c125a139e52b | [
"MIT"
] | null | null | null | """
Messages:
https://wiki.theory.org/BitTorrentSpecification#Messages
<length prefix><message ID><payload>
"""
from collections import namedtuple
from struct import pack
from struct import unpack
FORMAT = '>IB{}'
Message = namedtuple('Message', 'len id payload')
KEEP_ALIVE = -1
CHOKE = 0
UNCHOKE = 1
INTERESTED =... | 19.091503 | 73 | 0.683328 |
9482e836bc889d1e104a509019fa216e2390d9d4 | 1,515 | py | Python | nimrud/minimal/features.py | grayhem/nimrud | 5ced7107f5183ed71fc98c2d9fec178cf74cd988 | [
"MIT"
] | 1 | 2018-12-11T14:17:08.000Z | 2018-12-11T14:17:08.000Z | nimrud/minimal/features.py | grayhem/nimrud | 5ced7107f5183ed71fc98c2d9fec178cf74cd988 | [
"MIT"
] | null | null | null | nimrud/minimal/features.py | grayhem/nimrud | 5ced7107f5183ed71fc98c2d9fec178cf74cd988 | [
"MIT"
] | 3 | 2017-05-21T10:19:20.000Z | 2019-04-09T01:10:06.000Z | """
functions to be mapped over point neighborhoods
"""
import numpy as np
# for handling empty neighborhoods in centroid
np.seterr(invalid="raise")
def take(neighborhood_idx, search_space_cloud):
"""
return an array of points from the search space (needed for the following)
"""
return search_spa... | 25.677966 | 92 | 0.688449 |
948360ee32179bd011bde2331cc1861483d3487f | 4,002 | py | Python | Code Voorraad/Python stages/main.py | MarZwa/smart-kitchen | 2c313119116cd387564e39e63b7b602680ad5187 | [
"MIT"
] | null | null | null | Code Voorraad/Python stages/main.py | MarZwa/smart-kitchen | 2c313119116cd387564e39e63b7b602680ad5187 | [
"MIT"
] | null | null | null | Code Voorraad/Python stages/main.py | MarZwa/smart-kitchen | 2c313119116cd387564e39e63b7b602680ad5187 | [
"MIT"
] | null | null | null | import serial
import os
import json
from pprint import pprint
import mysql.connector
import time
import requests
mydb = mysql.connector.connect(
host="localhost",
user="max",
passwd="maximum123",
database="SmartKitchenDb"
)
com = serial.Serial('/dev/ttyUSB1', baudrate=9600, timeout=3.0)
com2 = serial.... | 41.6875 | 140 | 0.618941 |
94847930b226d1efe5a63b43542e7df43b0d1b37 | 1,049 | py | Python | docs/sphinx-jupyter-widgets-cleanup.py | jinsanity07git/tmip-emat | ff816cf50f141825078bb276d6da46d92c5028a9 | [
"BSD-3-Clause"
] | null | null | null | docs/sphinx-jupyter-widgets-cleanup.py | jinsanity07git/tmip-emat | ff816cf50f141825078bb276d6da46d92c5028a9 | [
"BSD-3-Clause"
] | null | null | null | docs/sphinx-jupyter-widgets-cleanup.py | jinsanity07git/tmip-emat | ff816cf50f141825078bb276d6da46d92c5028a9 | [
"BSD-3-Clause"
] | null | null | null |
import argparse, os
parser = argparse.ArgumentParser()
parser.add_argument('outdir', type=str, help='sphinx output directory')
args = parser.parse_args()
import re
duplicate_tag = '''(<script src="https://unpkg.com/@jupyter-widgets/html-manager@\^[0-9]*\.[0-9]*\.[0-9]*/dist/embed-amd.js"></script>)'''
bad1 = re.co... | 26.897436 | 138 | 0.705434 |
9484fa5bc2d2fde4df65c4b2fe52f46809a2781f | 480 | py | Python | finance_manager/database/views/v_input_inc_other.py | jehboyes/finance_manager | d310a3a4c2c6b6e5564e2a83e3f355b23266b773 | [
"MIT"
] | null | null | null | finance_manager/database/views/v_input_inc_other.py | jehboyes/finance_manager | d310a3a4c2c6b6e5564e2a83e3f355b23266b773 | [
"MIT"
] | null | null | null | finance_manager/database/views/v_input_inc_other.py | jehboyes/finance_manager | d310a3a4c2c6b6e5564e2a83e3f355b23266b773 | [
"MIT"
] | null | null | null | from finance_manager.database.replaceable import ReplaceableObject as o
from finance_manager.database.views import account_description, p_list_string, p_sum_string
| 40 | 110 | 0.764583 |
94855633809fd0ec0bf2dcd84d688eb77e81384d | 1,524 | py | Python | examples/example_plugin/example_plugin/signals.py | susanhooks/nautobot | bc3ef5958f0d5decb0be763342c790f26ff1e20e | [
"Apache-2.0"
] | null | null | null | examples/example_plugin/example_plugin/signals.py | susanhooks/nautobot | bc3ef5958f0d5decb0be763342c790f26ff1e20e | [
"Apache-2.0"
] | null | null | null | examples/example_plugin/example_plugin/signals.py | susanhooks/nautobot | bc3ef5958f0d5decb0be763342c790f26ff1e20e | [
"Apache-2.0"
] | null | null | null | """Signal handlers for the example example_plugin."""
def nautobot_database_ready_callback(sender, *, apps, **kwargs):
"""
Callback function triggered by the nautobot_database_ready signal when the Nautobot database is fully ready.
This function is connected to that signal in ExamplePluginConfig.ready().... | 39.076923 | 112 | 0.705381 |
94862dcf90686609ce3f0a6f42a3235da01595c7 | 8,988 | py | Python | scrape/scrape_md.py | jesse-peters/people | 7c7efbff65e7db4cc5409748f72f0ed98ae1be96 | [
"CC0-1.0"
] | null | null | null | scrape/scrape_md.py | jesse-peters/people | 7c7efbff65e7db4cc5409748f72f0ed98ae1be96 | [
"CC0-1.0"
] | null | null | null | scrape/scrape_md.py | jesse-peters/people | 7c7efbff65e7db4cc5409748f72f0ed98ae1be96 | [
"CC0-1.0"
] | null | null | null | import re
import lxml.html
import click
import scrapelib
from common import Person
# @attr.s
# class ContactDetail:
# note = attr.ib()
# voice = attr.ib()
# email =attr.ib()
# fax = attr.ib()
# address = attr.ib()
# @attr.s
# class Person:
# name = attr.ib()
# state = attr.ib()
# ... | 30.060201 | 92 | 0.584446 |
9488f4460b704b58bd7868b851740603de9d3660 | 6,962 | py | Python | overwatch/stats/ids.py | jonghwanhyeon/overwatch-stats | 37b19414dc746d0a9bd5a2cf38ee949ffdf62e25 | [
"MIT"
] | 12 | 2017-09-02T10:47:24.000Z | 2018-06-11T16:09:21.000Z | overwatch/stats/ids.py | jonghwanhyeon/overwatch-stats | 37b19414dc746d0a9bd5a2cf38ee949ffdf62e25 | [
"MIT"
] | 5 | 2018-04-01T09:30:39.000Z | 2021-01-14T09:52:04.000Z | overwatch/stats/ids.py | hyeon0145/overwatch-stats | 37b19414dc746d0a9bd5a2cf38ee949ffdf62e25 | [
"MIT"
] | 2 | 2017-09-19T15:11:49.000Z | 2018-03-30T20:02:50.000Z | OVERALL_CATEGORY_ID = '0x02E00000FFFFFFFF'
HERO_CATEGORY_IDS = {
'reaper': '0x02E0000000000002',
'tracer': '0x02E0000000000003',
'mercy': '0x02E0000000000004',
'hanzo': '0x02E0000000000005',
'torbjorn': '0x02E0000000000006',
'reinhardt': '0x02E0000000000007',
'pharah': '0x02E0000000000008',... | 31.502262 | 99 | 0.682275 |
94895e02f21a684db845d0d46679e9537e49785c | 16,851 | py | Python | dataloaders/custom_transforms.py | JACKYLUO1991/DCBNet | b797584b66ad99fe984f58268befb12ec60ccfae | [
"MIT"
] | 6 | 2021-06-14T15:23:59.000Z | 2022-01-19T12:29:20.000Z | dataloaders/custom_transforms.py | JACKYLUO1991/DCBANet | b797584b66ad99fe984f58268befb12ec60ccfae | [
"MIT"
] | 1 | 2021-06-03T08:08:20.000Z | 2021-06-09T17:24:54.000Z | dataloaders/custom_transforms.py | JACKYLUO1991/DCBANet | b797584b66ad99fe984f58268befb12ec60ccfae | [
"MIT"
] | 1 | 2020-09-19T17:13:36.000Z | 2020-09-19T17:13:36.000Z | import torch
import math
import numbers
import random
import numpy as np
from PIL import Image, ImageOps
from scipy.ndimage.filters import gaussian_filter
from scipy.ndimage.interpolation import map_coordinates
import cv2
from scipy import ndimage
def to_multilabel(pre_mask, classes=2):
""" Multi-label """
m... | 32.656977 | 119 | 0.537891 |
94898fd94bd3fe0499bb64604b546c928d2c6aa0 | 2,325 | py | Python | tools/Polygraphy/tests/backend/trt/test_profile.py | KaliberAI/TensorRT | 34a167558058bb801176430d37d38a46328ab0d2 | [
"Apache-2.0"
] | 5,249 | 2019-06-17T17:20:34.000Z | 2022-03-31T17:56:05.000Z | tools/Polygraphy/tests/backend/trt/test_profile.py | KaliberAI/TensorRT | 34a167558058bb801176430d37d38a46328ab0d2 | [
"Apache-2.0"
] | 1,721 | 2019-06-17T18:13:29.000Z | 2022-03-31T16:09:53.000Z | tools/Polygraphy/tests/backend/trt/test_profile.py | KaliberAI/TensorRT | 34a167558058bb801176430d37d38a46328ab0d2 | [
"Apache-2.0"
] | 1,414 | 2019-06-18T04:01:17.000Z | 2022-03-31T09:16:53.000Z | #
# Copyright (c) 2021, NVIDIA 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 appl... | 40.086207 | 106 | 0.673118 |
948d349dd45abeaca4dd80acac76c13c402ebd73 | 1,611 | py | Python | silvapermaculture/search.py | Walachul/SilvaPermaculture | 47c8579f14b22b33ba8b27c03ce244dc2c7b17e8 | [
"MIT"
] | null | null | null | silvapermaculture/search.py | Walachul/SilvaPermaculture | 47c8579f14b22b33ba8b27c03ce244dc2c7b17e8 | [
"MIT"
] | 5 | 2021-03-18T23:28:19.000Z | 2022-03-11T23:45:03.000Z | silvapermaculture/search.py | Walachul/SilvaPermaculture | 47c8579f14b22b33ba8b27c03ce244dc2c7b17e8 | [
"MIT"
] | 1 | 2019-09-08T14:45:13.000Z | 2019-09-08T14:45:13.000Z | from flask import current_app
#This module is created for interaction with the Elasticsearch index
#Function that adds element to the index of Elasticsearch. Uses model as the SQLAlchemy model
#Function that removes indexed elements. Uses model as the SQLAlchemy model
#Function that searches the fields specified to ... | 47.382353 | 101 | 0.692117 |
948d415b98380c188931709b7710a872ebb746cb | 263 | py | Python | client.py | mguidon/socket-logger | ff74a7974a2965794a4b90068b9ecb4aedf95346 | [
"MIT"
] | null | null | null | client.py | mguidon/socket-logger | ff74a7974a2965794a4b90068b9ecb4aedf95346 | [
"MIT"
] | null | null | null | client.py | mguidon/socket-logger | ff74a7974a2965794a4b90068b9ecb4aedf95346 | [
"MIT"
] | null | null | null | import socketio
sio = socketio.Client()
sio.connect('http://localhost:8080')
sio.wait() | 14.611111 | 37 | 0.69962 |
8469536286b19dfddcc5622a89710f4c22502799 | 3,388 | py | Python | interview/chainlink/problems.py | topliceanu/learn | 6f4bb19fffb7b2baa88f047409075d5765ee6308 | [
"MIT"
] | 24 | 2016-03-21T07:53:54.000Z | 2020-06-29T12:16:36.000Z | interview/chainlink/problems.py | topliceanu/learn | 6f4bb19fffb7b2baa88f047409075d5765ee6308 | [
"MIT"
] | 5 | 2015-09-29T17:12:36.000Z | 2020-03-26T20:51:56.000Z | interview/chainlink/problems.py | topliceanu/learn | 6f4bb19fffb7b2baa88f047409075d5765ee6308 | [
"MIT"
] | 12 | 2016-05-24T16:48:32.000Z | 2020-10-02T12:22:09.000Z |
# Write a function that accepts as an argument a string of addition/subtraction operations.
# The function should return the result of the operations as an integer
# ex: calculate("1 - 2 + 3") => 2
# Next, write a function that accepts as an argument a string of addition/subtraction
# operations and also includes par... | 32.266667 | 108 | 0.619835 |
84699eaf44ad2cc9577c8cecad8b2d9e9e2a0a25 | 355 | py | Python | example.py | badmutex/CoPipes | b329a381f0dbaef238b9e36c7103fd72bee80138 | [
"BSD-2-Clause"
] | 1 | 2020-11-27T23:18:58.000Z | 2020-11-27T23:18:58.000Z | example.py | badi/CoPipes | b329a381f0dbaef238b9e36c7103fd72bee80138 | [
"BSD-2-Clause"
] | null | null | null | example.py | badi/CoPipes | b329a381f0dbaef238b9e36c7103fd72bee80138 | [
"BSD-2-Clause"
] | null | null | null | from copipes import coroutine, pipeline, null
from copipes.macros.pipe import pipe
if __name__ == '__main__':
pipeline(
putStrLn,
replicate.params(3),
putStrLn,
).feed(range(10))
| 14.791667 | 45 | 0.574648 |
846e06126ad4220ba24d719a68f1fbc8b1349f7e | 1,693 | py | Python | tests/attention/test_attention_layer.py | SamuelCahyawijaya/fast-transformers | 6ae8ed4cc50bd037968db4f5062e4d328aae73fe | [
"MIT"
] | 1,171 | 2020-06-30T01:57:19.000Z | 2022-03-31T15:11:25.000Z | tests/attention/test_attention_layer.py | SamuelCahyawijaya/fast-transformers | 6ae8ed4cc50bd037968db4f5062e4d328aae73fe | [
"MIT"
] | 105 | 2020-06-30T14:40:56.000Z | 2022-02-08T16:31:45.000Z | tests/attention/test_attention_layer.py | SamuelCahyawijaya/fast-transformers | 6ae8ed4cc50bd037968db4f5062e4d328aae73fe | [
"MIT"
] | 127 | 2020-06-26T09:07:48.000Z | 2022-03-25T06:46:37.000Z | #
# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/
# Written by Angelos Katharopoulos <angelos.katharopoulos@idiap.ch>,
# Apoorv Vyas <avyas@idiap.ch>
#
import unittest
import torch
from fast_transformers.attention.attention_layer import AttentionLayer
if __name__ == "__main__":
unittest.m... | 25.651515 | 70 | 0.489663 |
846eacdff1b10d8e9e80d22c01185eced8ed622a | 54 | py | Python | api_permission/__init__.py | jayvdb/django-api-permission | ba771314b4a9c5c2edc5161b423e257012be8922 | [
"MIT"
] | 3 | 2020-06-01T17:06:16.000Z | 2021-12-12T05:40:04.000Z | api_permission/__init__.py | jayvdb/django-api-permission | ba771314b4a9c5c2edc5161b423e257012be8922 | [
"MIT"
] | 4 | 2020-06-02T06:46:06.000Z | 2020-06-04T17:38:57.000Z | api_permission/__init__.py | tcitry/django-api-permission | 371bd5f2989edf906c91a0e5af60a4da11d0da42 | [
"MIT"
] | null | null | null | default_app_config = 'api_permission.apps.AuthConfig'
| 27 | 53 | 0.851852 |
846eee9785f4109a7b7f8c3840b04ea8fc5f8ad8 | 8,187 | py | Python | sliceMaker.py | longnow/longview | 9345faacec64f427eab43790abc165af6a572e3d | [
"BSD-2-Clause"
] | 82 | 2015-01-23T04:20:31.000Z | 2022-02-18T22:33:53.000Z | sliceMaker.py | longnow/longview | 9345faacec64f427eab43790abc165af6a572e3d | [
"BSD-2-Clause"
] | 2 | 2015-03-27T22:24:46.000Z | 2017-02-20T08:19:12.000Z | sliceMaker.py | longnow/longview | 9345faacec64f427eab43790abc165af6a572e3d | [
"BSD-2-Clause"
] | 7 | 2015-06-04T20:37:02.000Z | 2021-03-10T02:41:08.000Z | #!/usr/bin/env python
# Copyright (c) 02004, The Long Now Foundation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# ... | 34.544304 | 117 | 0.623183 |
847444d00846464ca49ce4d6bdb0871b264d4796 | 1,974 | py | Python | get_longi_lati.py | icepoint666/Pytorch-ThinPlateSpline | 4d1870acddf1cd4bc5d159f0f092cad0ad32406b | [
"MIT"
] | 4 | 2019-06-14T06:07:46.000Z | 2021-06-24T11:19:51.000Z | get_longi_lati.py | icepoint666/Pytorch-ThinPlateSpline | 4d1870acddf1cd4bc5d159f0f092cad0ad32406b | [
"MIT"
] | null | null | null | get_longi_lati.py | icepoint666/Pytorch-ThinPlateSpline | 4d1870acddf1cd4bc5d159f0f092cad0ad32406b | [
"MIT"
] | 1 | 2019-09-02T15:29:00.000Z | 2019-09-02T15:29:00.000Z | import numpy as np
import torch
import matplotlib.animation as animation
import matplotlib.pyplot as plt
from PIL import Image
import ThinPlateSpline as TPS
# 2048x2048.jpg size: 2048 x 2048
if __name__ == '__main__':
print("It is suggested that clicking on the image close to the middle position will be more ac... | 26.675676 | 107 | 0.507092 |
8476a6714e07b92b94204deb2d35b8762a330fb7 | 10,325 | py | Python | webapp/core/migrations/0001_initial.py | PoCDAB/cfns-webapp | 69637efa2046a04172898d3f41520e060efb77f5 | [
"MIT"
] | null | null | null | webapp/core/migrations/0001_initial.py | PoCDAB/cfns-webapp | 69637efa2046a04172898d3f41520e060efb77f5 | [
"MIT"
] | null | null | null | webapp/core/migrations/0001_initial.py | PoCDAB/cfns-webapp | 69637efa2046a04172898d3f41520e060efb77f5 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-08-25 14:44
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import fontawesome_5.fields
| 53.776042 | 206 | 0.584407 |
8476a9ee2f8f9e282c273d156e62ada0e657e0d2 | 6,292 | py | Python | tlidb/examples/algorithms/DecoderAlgorithm.py | alon-albalak/TLiDB | 4f3524a3bbe7580e417dd884c4dc8751bdaf8855 | [
"MIT"
] | null | null | null | tlidb/examples/algorithms/DecoderAlgorithm.py | alon-albalak/TLiDB | 4f3524a3bbe7580e417dd884c4dc8751bdaf8855 | [
"MIT"
] | null | null | null | tlidb/examples/algorithms/DecoderAlgorithm.py | alon-albalak/TLiDB | 4f3524a3bbe7580e417dd884c4dc8751bdaf8855 | [
"MIT"
] | null | null | null | from tlidb.examples.utils import move_to
from .algorithm import Algorithm | 42.513514 | 145 | 0.642403 |
847909d2044f70ab8e0ef6ff859f6c9ee0041a42 | 950 | py | Python | python/ray/workflow/examples/comparisons/argo/exit_handler_workflow.py | willfrey/ray | 288a81b42ef0186ab4db33b30191614a7bdb69f6 | [
"Apache-2.0"
] | 1 | 2019-06-19T02:23:43.000Z | 2019-06-19T02:23:43.000Z | python/ray/workflow/examples/comparisons/argo/exit_handler_workflow.py | willfrey/ray | 288a81b42ef0186ab4db33b30191614a7bdb69f6 | [
"Apache-2.0"
] | 73 | 2021-09-25T07:11:39.000Z | 2022-03-26T07:10:59.000Z | python/ray/workflow/examples/comparisons/argo/exit_handler_workflow.py | willfrey/ray | 288a81b42ef0186ab4db33b30191614a7bdb69f6 | [
"Apache-2.0"
] | 1 | 2019-09-24T16:24:49.000Z | 2019-09-24T16:24:49.000Z | from typing import Tuple, Optional
import ray
from ray import workflow
if __name__ == "__main__":
res = intentional_fail.options(**workflow.options(catch_exceptions=True)).bind()
print(workflow.create(exit_handler.bind(res)).run())
| 20.652174 | 84 | 0.685263 |
84794719e66077b7bdf8b3053df34935cda4eda8 | 2,984 | py | Python | thop/count_hooks.py | jwpleow/aanet | b83e7b11dfee117114ae7b35645b85e886d3d436 | [
"Apache-2.0"
] | null | null | null | thop/count_hooks.py | jwpleow/aanet | b83e7b11dfee117114ae7b35645b85e886d3d436 | [
"Apache-2.0"
] | null | null | null | thop/count_hooks.py | jwpleow/aanet | b83e7b11dfee117114ae7b35645b85e886d3d436 | [
"Apache-2.0"
] | null | null | null | import argparse
import torch
import torch.nn as nn
multiply_adds = 1
| 25.724138 | 82 | 0.614611 |
8479d2ec291f95cbf616deccc6b6e4ba086c6d91 | 973 | py | Python | generation_rs/process_output.py | microsoft/MRS | 1213bf21b1f76d9822e0426dfd81222112a40e05 | [
"MIT"
] | 2 | 2021-08-11T18:00:33.000Z | 2021-09-04T09:38:05.000Z | generation_rs/process_output.py | microsoft/MRS | 1213bf21b1f76d9822e0426dfd81222112a40e05 | [
"MIT"
] | null | null | null | generation_rs/process_output.py | microsoft/MRS | 1213bf21b1f76d9822e0426dfd81222112a40e05 | [
"MIT"
] | 1 | 2021-09-13T12:29:10.000Z | 2021-09-13T12:29:10.000Z | """Convert the output format of fairseq.generate to the input format of the evaluation script."""
from argparse import ArgumentParser
from collections import defaultdict
if __name__ == '__main__':
main()
| 32.433333 | 97 | 0.605344 |
847a476fd67e7e3cc4666225c8b259822acfd9f5 | 2,861 | py | Python | mincaml/beta.py | aita/MinCaml.py | 17ccd4377a08dffeaefab483032c46ec4979787d | [
"Apache-2.0"
] | 1 | 2022-01-26T10:50:28.000Z | 2022-01-26T10:50:28.000Z | mincaml/beta.py | aita/py-mincaml | 17ccd4377a08dffeaefab483032c46ec4979787d | [
"Apache-2.0"
] | null | null | null | mincaml/beta.py | aita/py-mincaml | 17ccd4377a08dffeaefab483032c46ec4979787d | [
"Apache-2.0"
] | null | null | null | from pyrsistent import pmap
from . import logger
from .util import find
| 26.009091 | 72 | 0.496679 |
847a9a23d323396f48036e5736dbf6c9d53bc3f8 | 2,297 | py | Python | bakker/config.py | friedrichschoene/bakker | 49732046a61edb993b97901b63232a5d4bab8370 | [
"MIT"
] | 1 | 2019-05-26T08:28:37.000Z | 2019-05-26T08:28:37.000Z | bakker/config.py | friedrichschoene/bakker | 49732046a61edb993b97901b63232a5d4bab8370 | [
"MIT"
] | 13 | 2019-05-20T23:26:50.000Z | 2019-05-30T16:40:19.000Z | bakker/config.py | friedrichschoene/bakker | 49732046a61edb993b97901b63232a5d4bab8370 | [
"MIT"
] | null | null | null | import json
import os
from bakker.storage import FileSystemStorage
DEFAULT_STORAGE_KEY = 'default.storage'
DEFAULT_STORAGE_CHOICES = ['fs']
STORAGE_FILE_SYSTEM_PATH = 'storage.file_system.path'
| 29.831169 | 80 | 0.533304 |
847bc9447499030160ab79bc00fe56bed18a4fc7 | 1,589 | py | Python | Image_Stitching/cropper.py | RogerZhangsc/VDAS | 1783f19c96223916d1627d74c754521746fbb9f3 | [
"MIT"
] | null | null | null | Image_Stitching/cropper.py | RogerZhangsc/VDAS | 1783f19c96223916d1627d74c754521746fbb9f3 | [
"MIT"
] | 1 | 2018-03-13T07:51:22.000Z | 2018-03-13T07:51:22.000Z | Image_Stitching/cropper.py | RogerZhangsc/VDAS | 1783f19c96223916d1627d74c754521746fbb9f3 | [
"MIT"
] | 1 | 2018-03-13T07:45:19.000Z | 2018-03-13T07:45:19.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 16 00:37:05 2018
@author: Sunny
"""
import cv2
import numpy as np
import os
from os.path import abspath
FPS = 30
OUTPUT_FRAME_WIDTH = 0 #SHOULD REMAIN SAME AS INPUT
OUTPUT_FRAME_HEIGHT = 0 #SHOULD BE 2x INPUT
MULTI_STITCH = 0 #OFF
##STEP 1 - Read EACH FRAME FROM VIDEO ... | 26.932203 | 73 | 0.60793 |
847c54faa0fb9230a80f8d346585c5ab5678996e | 2,118 | py | Python | home/views.py | pantsocksboots/rackandstack | 9681da91fbaac08a83b008e4632c9ba876f0f5c5 | [
"MIT"
] | null | null | null | home/views.py | pantsocksboots/rackandstack | 9681da91fbaac08a83b008e4632c9ba876f0f5c5 | [
"MIT"
] | 5 | 2022-02-05T00:10:27.000Z | 2022-03-23T19:45:38.000Z | home/views.py | pantsocksboots/rackandstack | 9681da91fbaac08a83b008e4632c9ba876f0f5c5 | [
"MIT"
] | null | null | null | from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.template.response import TemplateResponse
from rubric.models import Evolution
from stucon.models import Student
from gradebook.models import ObjectiveScore, TraitScore
from django.contrib.auth.forms import PasswordCh... | 37.157895 | 102 | 0.695467 |
847cffbf3f3b90f415b76c7927bc0b7ea2d7f97e | 36,852 | py | Python | src/main.py | xtreme3d/editor | 7e38ddf2d707d19cf967ba58e5e791eaf6ff0ba3 | [
"BSL-1.0"
] | null | null | null | src/main.py | xtreme3d/editor | 7e38ddf2d707d19cf967ba58e5e791eaf6ff0ba3 | [
"BSL-1.0"
] | null | null | null | src/main.py | xtreme3d/editor | 7e38ddf2d707d19cf967ba58e5e791eaf6ff0ba3 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
import io
import os.path
import shutil
import getpass
import math
import time
import datetime
import ctypes
import Tkinter, tkFileDialog
import logging
import sdl2
import json
from framework import *
from framework import keycodes
from xtreme3d import x3dconstants as constants
from pluginbase i... | 36.705179 | 120 | 0.593835 |
847d04298e6ad886d17c9d7cd621439d5a1d9da5 | 665 | py | Python | barriers/models/history/mentions.py | felix781/market-access-python-frontend | 3b0e49feb4fdf0224816326938a46002aa4a2b1c | [
"MIT"
] | 1 | 2021-12-15T04:14:03.000Z | 2021-12-15T04:14:03.000Z | barriers/models/history/mentions.py | felix781/market-access-python-frontend | 3b0e49feb4fdf0224816326938a46002aa4a2b1c | [
"MIT"
] | 19 | 2019-12-11T11:32:47.000Z | 2022-03-29T15:40:57.000Z | barriers/models/history/mentions.py | felix781/market-access-python-frontend | 3b0e49feb4fdf0224816326938a46002aa4a2b1c | [
"MIT"
] | 2 | 2021-02-09T09:38:45.000Z | 2021-03-29T19:07:09.000Z | import dateutil.parser
from utils.models import APIModel
| 21.451613 | 61 | 0.681203 |
847e17d2919bb31ff23498c5c4f31e06ffddf82f | 2,316 | py | Python | scripts/show-profile.py | ekiden/ekiden | 2654947f5fcf783c9ca04779af7afdd69622508b | [
"Apache-2.0"
] | 19 | 2020-03-03T01:21:47.000Z | 2022-01-28T04:39:51.000Z | scripts/show-profile.py | ekiden/ekiden | 2654947f5fcf783c9ca04779af7afdd69622508b | [
"Apache-2.0"
] | 1 | 2021-04-14T04:03:27.000Z | 2021-04-14T04:10:09.000Z | scripts/show-profile.py | ekiden/ekiden | 2654947f5fcf783c9ca04779af7afdd69622508b | [
"Apache-2.0"
] | 2 | 2020-07-05T02:55:46.000Z | 2022-01-28T04:42:06.000Z | #!/usr/bin/env python
import argparse
import numpy as np
EKIDEN_PROFILE_PREFIX = 'ekiden-profile:'
if __name__ == '__main__':
parser = argparse.ArgumentParser(description=None)
parser.add_argument('profile', type=str,
help="Profile output file")
parser.add_argument('--sort', type=... | 31.726027 | 93 | 0.588515 |
847f1f8680526733f3ed4e93363ffac0b157bf32 | 1,669 | py | Python | annotators/SentRewrite/test.py | Ramimashkouk/dream | d23771105962efa2551a8420680713aad139da38 | [
"Apache-2.0"
] | 7 | 2020-12-07T19:59:16.000Z | 2020-12-24T16:20:47.000Z | annotators/SentRewrite/test.py | Ramimashkouk/dream | d23771105962efa2551a8420680713aad139da38 | [
"Apache-2.0"
] | null | null | null | annotators/SentRewrite/test.py | Ramimashkouk/dream | d23771105962efa2551a8420680713aad139da38 | [
"Apache-2.0"
] | null | null | null | import requests
url = "http://0.0.0.0:8017/sentrewrite"
data = {
"utterances_histories": [
[["do you know lionel messi?"], ["yes, he is a football player."], ["who is the best, he or c.ronaldo?"]]
],
"annotation_histories": [
[
{"ner": [[{"confidence": 1, "end_pos": 24, "start_... | 28.775862 | 114 | 0.382265 |
847fb0e10b694dfca2f648cbc1f0600bcca559e5 | 18,580 | py | Python | bioimageio/core/prediction.py | bioimage-io/python-core | 78fa57fd0af968b57c0df8f294faf3a8b502909e | [
"MIT"
] | 2 | 2021-10-01T19:20:48.000Z | 2021-11-29T15:44:27.000Z | bioimageio/core/prediction.py | bioimage-io/python-core | 78fa57fd0af968b57c0df8f294faf3a8b502909e | [
"MIT"
] | 98 | 2021-09-22T08:44:40.000Z | 2022-03-30T17:21:55.000Z | bioimageio/core/prediction.py | bioimage-io/python-core | 78fa57fd0af968b57c0df8f294faf3a8b502909e | [
"MIT"
] | 2 | 2021-11-28T11:25:17.000Z | 2022-03-12T03:06:05.000Z | import collections
import os
from itertools import product
from pathlib import Path
from typing import Dict, Iterator, List, NamedTuple, Optional, OrderedDict, Sequence, Tuple, Union
import numpy as np
import xarray as xr
from tqdm import tqdm
from bioimageio.core import image_helper
from bioimageio.core import load_... | 38.789144 | 119 | 0.64887 |
84807805d4c9e99301ea9459dc3f1a877cc0d1c9 | 428 | py | Python | pulsar/async/_subprocess.py | PyCN/pulsar | fee44e871954aa6ca36d00bb5a3739abfdb89b26 | [
"BSD-3-Clause"
] | 1,410 | 2015-01-02T14:55:07.000Z | 2022-03-28T17:22:06.000Z | pulsar/async/_subprocess.py | PyCN/pulsar | fee44e871954aa6ca36d00bb5a3739abfdb89b26 | [
"BSD-3-Clause"
] | 194 | 2015-01-22T06:18:24.000Z | 2020-10-20T21:21:58.000Z | pulsar/async/_subprocess.py | PyCN/pulsar | fee44e871954aa6ca36d00bb5a3739abfdb89b26 | [
"BSD-3-Clause"
] | 168 | 2015-01-31T10:29:55.000Z | 2022-03-14T10:22:24.000Z |
if __name__ == '__main__':
import sys
import pickle
from multiprocessing import current_process
from multiprocessing.spawn import import_main_path
data = pickle.load(sys.stdin.buffer)
current_process().authkey = data['authkey']
sys.path = data['path']
import_main_path(data['main'])
... | 25.176471 | 54 | 0.705607 |
848110a231f5df03b0cf46d679131237eeb6b3f8 | 1,867 | py | Python | app/app/calculation_service/mongoSetup.py | alasdair-macleod/demoappback | fedd555279a1e3b91172face7cec41eb158cbf0f | [
"MIT"
] | null | null | null | app/app/calculation_service/mongoSetup.py | alasdair-macleod/demoappback | fedd555279a1e3b91172face7cec41eb158cbf0f | [
"MIT"
] | 1 | 2019-01-16T15:45:31.000Z | 2019-01-16T15:45:31.000Z | app/app/calculation_service/mongoSetup.py | alasdair-macleod/demoappback | fedd555279a1e3b91172face7cec41eb158cbf0f | [
"MIT"
] | 1 | 2017-10-30T14:34:41.000Z | 2017-10-30T14:34:41.000Z | from app import db
| 64.37931 | 560 | 0.459025 |
848241c80266ef1ad52d7380feee252a6561ee95 | 217 | py | Python | lista/schemas/prestador_schema.py | ViniciusGarciaSilva/izi-serv-backend | 6b9288b9bf4b20bfe86c291dc321f3e1476f1198 | [
"MIT"
] | null | null | null | lista/schemas/prestador_schema.py | ViniciusGarciaSilva/izi-serv-backend | 6b9288b9bf4b20bfe86c291dc321f3e1476f1198 | [
"MIT"
] | null | null | null | lista/schemas/prestador_schema.py | ViniciusGarciaSilva/izi-serv-backend | 6b9288b9bf4b20bfe86c291dc321f3e1476f1198 | [
"MIT"
] | null | null | null | from marshmallow_sqlalchemy import ModelSchema
from marshmallow import fields
from lista.models.prestador_model import PrestadorModel | 31 | 55 | 0.824885 |
84841b824ca105976b7c170ca16678142365540b | 218 | py | Python | preprocessing/utils.py | nazariinyzhnyk/nlp-beatles-lyrics-modeling | d341b6c2a1fe60a3ca6cae03052775b443f8cedb | [
"MIT"
] | null | null | null | preprocessing/utils.py | nazariinyzhnyk/nlp-beatles-lyrics-modeling | d341b6c2a1fe60a3ca6cae03052775b443f8cedb | [
"MIT"
] | null | null | null | preprocessing/utils.py | nazariinyzhnyk/nlp-beatles-lyrics-modeling | d341b6c2a1fe60a3ca6cae03052775b443f8cedb | [
"MIT"
] | null | null | null | import random
import numpy as np
def set_seed(random_state: int = 42) -> None:
"""Function fixes random state to ensure results are reproducible"""
np.random.seed(random_state)
random.seed(random_state)
| 21.8 | 72 | 0.729358 |
848440f9712c0a01ee428394d7d4cc5695b4f759 | 1,855 | py | Python | assignment/pubsub.py | nilaysaha/multitasking | a87eb24c81e7a784f278eff8209e9356c8da9754 | [
"Apache-2.0"
] | null | null | null | assignment/pubsub.py | nilaysaha/multitasking | a87eb24c81e7a784f278eff8209e9356c8da9754 | [
"Apache-2.0"
] | null | null | null | assignment/pubsub.py | nilaysaha/multitasking | a87eb24c81e7a784f278eff8209e9356c8da9754 | [
"Apache-2.0"
] | null | null | null | #!/bin/python3
import os, amqp
USERNAME=os.environ['MQTT_USERNAME']
PASSWORD=os.environ['MQTT_PASSWORD']
AMQP_URL=f"amqp://{MQTT_USERNAME}:{MQTT_PASSWORD}@finch.rmq.cloudamqp.com/wwarpzsg"
| 31.440678 | 83 | 0.632884 |
84846056b889ee2c52a600b994c1916e7f5e9757 | 12,234 | py | Python | run.py | ceesroele/sarcasm_detection | 48e7853dd0aa298d3d1095c54131047195185a0c | [
"MIT"
] | null | null | null | run.py | ceesroele/sarcasm_detection | 48e7853dd0aa298d3d1095c54131047195185a0c | [
"MIT"
] | null | null | null | run.py | ceesroele/sarcasm_detection | 48e7853dd0aa298d3d1095c54131047195185a0c | [
"MIT"
] | null | null | null | """
Train a model on the Reddit dataset by Khodak.
"""
import functools
import time
import logging
import pickle
import os
import pandas as pd
from sklearn.model_selection import train_test_split
from simpletransformers.classification import ClassificationModel, ClassificationArgs
from utils import (
hour_min_se... | 33.064865 | 145 | 0.679908 |
8487557b661ba93e451a0dbc3862a8a6a3503d2d | 578 | py | Python | assembler/arguments.py | ITD27M01/hack-assembler | 58f691adf979106209b407be08c7d31b59088957 | [
"Apache-2.0"
] | 1 | 2021-01-18T07:31:39.000Z | 2021-01-18T07:31:39.000Z | assembler/arguments.py | ITD27M01/hack-assembler | 58f691adf979106209b407be08c7d31b59088957 | [
"Apache-2.0"
] | null | null | null | assembler/arguments.py | ITD27M01/hack-assembler | 58f691adf979106209b407be08c7d31b59088957 | [
"Apache-2.0"
] | null | null | null | import argparse
| 36.125 | 106 | 0.645329 |
84877d8e0c39333155c2bb8353f6901be3110160 | 102 | py | Python | yetl/metasource/__init__.py | semanticinsight/yetl-framework | c9cf5b686cc3cb701c49e9e2a11a7bba1ecd6e73 | [
"MIT"
] | null | null | null | yetl/metasource/__init__.py | semanticinsight/yetl-framework | c9cf5b686cc3cb701c49e9e2a11a7bba1ecd6e73 | [
"MIT"
] | null | null | null | yetl/metasource/__init__.py | semanticinsight/yetl-framework | c9cf5b686cc3cb701c49e9e2a11a7bba1ecd6e73 | [
"MIT"
] | null | null | null | from .metasource import FileMetasource
from .index import Index
__all__ = ["FileMetasource", "Index"] | 25.5 | 38 | 0.784314 |
848793513929c8f40197ffaea7f2dd8482916af6 | 188 | py | Python | visitors/signals.py | hugorodgerbrown/django-visitor | badb4a7fb5ea696bf5a249188b6cff8cc0a834ae | [
"MIT"
] | 6 | 2021-06-11T13:33:00.000Z | 2022-03-16T13:49:55.000Z | visitors/signals.py | hugorodgerbrown/django-visitor | badb4a7fb5ea696bf5a249188b6cff8cc0a834ae | [
"MIT"
] | 3 | 2021-02-13T15:09:54.000Z | 2021-09-23T14:43:20.000Z | visitors/signals.py | hugorodgerbrown/django-visitor | badb4a7fb5ea696bf5a249188b6cff8cc0a834ae | [
"MIT"
] | 2 | 2021-03-25T14:34:40.000Z | 2021-07-28T17:42:32.000Z | from django.dispatch import Signal
# sent when a user creates their own Visitor - can
# be used to send the email with the token
# kwargs: visitor
self_service_visitor_created = Signal()
| 26.857143 | 50 | 0.781915 |
84885840fe4d6bf52cfb121aa385ebb535f1235e | 5,112 | py | Python | eukarya/scripts_nonsql/statistics_OGs.py | ESDeutekom/ComparingOrthologies | 090b95c29f70865f2c3d6d408f565482f49c0f44 | [
"MIT"
] | 2 | 2020-07-15T10:37:31.000Z | 2020-10-22T08:44:21.000Z | eukarya/scripts_nonsql/statistics_OGs.py | ESDeutekom/ComparingOrthologies | 090b95c29f70865f2c3d6d408f565482f49c0f44 | [
"MIT"
] | 1 | 2021-11-05T02:40:09.000Z | 2021-11-10T10:36:57.000Z | eukarya/scripts_nonsql/statistics_OGs.py | ESDeutekom/ComparingOrthologies | 090b95c29f70865f2c3d6d408f565482f49c0f44 | [
"MIT"
] | null | null | null | #python3
import os
import sys
import statistics as s
import pandas as pd
from find_loss import *
##########################
## statistics on orthogroups
##########################
"""if len(sys.argv) != 5:
print("Need 4 arguments: [Orthologous group input file] [LECA orthologous groups input list] [method name] [stat... | 41.225806 | 130 | 0.669601 |
84888b176eb03a9243b2cb5e2358400c50f22984 | 479 | py | Python | pyGLLib/light.py | juanmcasillas/pyGLLib | eb91e5f50ed2e05b7822de8a7125e57eafa91eca | [
"Apache-2.0"
] | null | null | null | pyGLLib/light.py | juanmcasillas/pyGLLib | eb91e5f50ed2e05b7822de8a7125e57eafa91eca | [
"Apache-2.0"
] | null | null | null | pyGLLib/light.py | juanmcasillas/pyGLLib | eb91e5f50ed2e05b7822de8a7125e57eafa91eca | [
"Apache-2.0"
] | null | null | null |
# ///////////////////////////////////////////////////////////////////////////
#
#
#
# ///////////////////////////////////////////////////////////////////////////
| 26.611111 | 77 | 0.334029 |
8488cc8ce068e91e508b283bfe9c9c35a89f3f41 | 2,472 | py | Python | src/models/aggregation_layers.py | InnovArul/vidreid_cosegmentation | e8b3d02b8fae21501fdd10afbb5592e03c9701e4 | [
"Apache-2.0"
] | 41 | 2019-10-29T03:08:34.000Z | 2022-01-16T11:39:07.000Z | src/models/aggregation_layers.py | InnovArul/vidreid_cosegmentation | e8b3d02b8fae21501fdd10afbb5592e03c9701e4 | [
"Apache-2.0"
] | 2 | 2020-09-15T08:31:20.000Z | 2020-10-16T11:57:48.000Z | src/models/aggregation_layers.py | InnovArul/vidreid_cosegmentation | e8b3d02b8fae21501fdd10afbb5592e03c9701e4 | [
"Apache-2.0"
] | 10 | 2019-10-29T10:16:56.000Z | 2022-02-05T06:20:21.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
AGGREGATION = {
"tp": AggregationTP,
"ta": AggregationTA,
"rnn": AggregationRNN,
}
| 26.297872 | 74 | 0.557443 |
848a765ca116ea720ab0290ad87ce587db057bdd | 7,563 | py | Python | scripts/run_autoencoder.py | kashefy/transform | bb0855d06c878b5015810bbf6e1f9c7b6b1414a3 | [
"BSD-2-Clause"
] | null | null | null | scripts/run_autoencoder.py | kashefy/transform | bb0855d06c878b5015810bbf6e1f9c7b6b1414a3 | [
"BSD-2-Clause"
] | null | null | null | scripts/run_autoencoder.py | kashefy/transform | bb0855d06c878b5015810bbf6e1f9c7b6b1414a3 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
""" Auto Encoder Example.
Using an auto encoder on MNIST handwritten digits.
References:
Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. "Gradient-based
learning applied to document recognition." Proceedings of the IEEE,
86(11):2278-2324, November 1998.
Links:
[MNIST Dataset] ht... | 46.398773 | 122 | 0.623298 |
848bcf190a3b0c3ad5ed94d7892b725d609ef60b | 1,105 | py | Python | map/forms.py | mpbrown/buffalo-community-engagement-map | 04cba068de9a22db4fe8708d1bd3c10d5a6adfbd | [
"MIT"
] | 1 | 2021-04-11T16:40:31.000Z | 2021-04-11T16:40:31.000Z | map/forms.py | mpbrown/buffalo-community-engagement-map | 04cba068de9a22db4fe8708d1bd3c10d5a6adfbd | [
"MIT"
] | null | null | null | map/forms.py | mpbrown/buffalo-community-engagement-map | 04cba068de9a22db4fe8708d1bd3c10d5a6adfbd | [
"MIT"
] | null | null | null | from django import forms
| 40.925926 | 123 | 0.721267 |
848c472304255db936ace73dffdffd1e34d2745e | 33,182 | py | Python | tensorflow/mcst_model.py | nkzhlee/RCModel | 3288250edc8f4021f40e49f547b393434f02be4b | [
"Apache-2.0"
] | 1 | 2018-03-23T05:40:40.000Z | 2018-03-23T05:40:40.000Z | tensorflow/mcst_model.py | nkzhlee/RCModel | 3288250edc8f4021f40e49f547b393434f02be4b | [
"Apache-2.0"
] | null | null | null | tensorflow/mcst_model.py | nkzhlee/RCModel | 3288250edc8f4021f40e49f547b393434f02be4b | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf8 -*-
# ==============================================================================
# Copyright 2017 lizhaohui.com, 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 o... | 44.780027 | 157 | 0.55952 |
848ca2162eb67138e863cb310ce9975b6442a245 | 4,629 | py | Python | customer_api/api/migrations/0008_auto_20171017_1504.py | t-yanaka/zabbix-report | ef471b60626dd5fef9bcaa74d6cbbc00cca10c9b | [
"MIT"
] | 2 | 2017-06-27T00:03:35.000Z | 2020-09-16T11:47:53.000Z | customer_api/api/migrations/0008_auto_20171017_1504.py | t-yanaka/zabbix-report | ef471b60626dd5fef9bcaa74d6cbbc00cca10c9b | [
"MIT"
] | null | null | null | customer_api/api/migrations/0008_auto_20171017_1504.py | t-yanaka/zabbix-report | ef471b60626dd5fef9bcaa74d6cbbc00cca10c9b | [
"MIT"
] | 3 | 2017-10-13T19:31:08.000Z | 2020-09-16T11:47:54.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-17 06:04
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| 42.46789 | 133 | 0.576366 |
848d0a475c3b87a18c7dd5763e120485b26a266f | 2,395 | py | Python | mmdet/core/mask/transforms.py | vanyalzr/mmdetection | 7fc2e1a20cd4b4dda82027659363be2b15e4adf9 | [
"Apache-2.0"
] | 2 | 2021-03-29T13:36:37.000Z | 2022-01-26T13:39:07.000Z | mmdet/core/mask/transforms.py | vanyalzr/mmdetection | 7fc2e1a20cd4b4dda82027659363be2b15e4adf9 | [
"Apache-2.0"
] | 10 | 2020-09-10T16:54:11.000Z | 2020-12-18T12:07:59.000Z | mmdet/core/mask/transforms.py | vanyalzr/mmdetection | 7fc2e1a20cd4b4dda82027659363be2b15e4adf9 | [
"Apache-2.0"
] | 2 | 2020-09-10T15:35:19.000Z | 2020-10-16T00:14:12.000Z | # Copyright (C) 2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 31.933333 | 98 | 0.609603 |
848d70c4b1bee184660635e74ea05b4f231ad7b9 | 1,311 | py | Python | SSGP/SMORMS3.py | Krystian95/SSGP | ed29de72858c47e7365c2dbb2194603390bc0a29 | [
"BSD-3-Clause"
] | null | null | null | SSGP/SMORMS3.py | Krystian95/SSGP | ed29de72858c47e7365c2dbb2194603390bc0a29 | [
"BSD-3-Clause"
] | null | null | null | SSGP/SMORMS3.py | Krystian95/SSGP | ed29de72858c47e7365c2dbb2194603390bc0a29 | [
"BSD-3-Clause"
] | null | null | null | ################################################################################
# SSGP: Sparse Spectrum Gaussian Process
# Github: https://github.com/MaxInGaussian/SSGP
# Author: Max W. Y. Lam (maxingaussian@gmail.com)
################################################################################
import numpy as... | 37.457143 | 80 | 0.525553 |
848d88b5383b8a146bb61bbf80914cbd12720899 | 1,163 | py | Python | demo.py | itsrobli/depreciation-rate-classifier | ab1ef346d577a3ee64d200ee41e097bba12f6b14 | [
"BSD-3-Clause"
] | null | null | null | demo.py | itsrobli/depreciation-rate-classifier | ab1ef346d577a3ee64d200ee41e097bba12f6b14 | [
"BSD-3-Clause"
] | null | null | null | demo.py | itsrobli/depreciation-rate-classifier | ab1ef346d577a3ee64d200ee41e097bba12f6b14 | [
"BSD-3-Clause"
] | null | null | null | # 25 February 2019 - Robert Li <robertwli@gmail.com>
import sys
from src.text_classifier_deprn_rates import DeprnPredictor
predict = DeprnPredictor()
print('Evaluate using user input.\n')
user_description = ['']
print('\"QQ\" to quit.')
print('\"CR\" to see classification report.')
print('Otherwise...')
while True... | 33.228571 | 81 | 0.625107 |
848e1f0b23e38f992134149de9fc12de2192d81a | 26,620 | py | Python | morphablegraphs/motion_analysis/bvh_analyzer.py | dfki-asr/morphablegraphs | 02c77aab72aa4b58f4067c720f5d124f0be3ea80 | [
"MIT"
] | 5 | 2020-03-03T21:07:01.000Z | 2021-05-12T16:59:28.000Z | morphablegraphs/motion_analysis/bvh_analyzer.py | dfki-asr/morphablegraphs | 02c77aab72aa4b58f4067c720f5d124f0be3ea80 | [
"MIT"
] | null | null | null | morphablegraphs/motion_analysis/bvh_analyzer.py | dfki-asr/morphablegraphs | 02c77aab72aa4b58f4067c720f5d124f0be3ea80 | [
"MIT"
] | 1 | 2020-07-20T06:57:08.000Z | 2020-07-20T06:57:08.000Z | #!/usr/bin/env python
#
# Copyright 2019 DFKI GmbH.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merg... | 41.335404 | 120 | 0.629151 |
848f27135d042bd3f94d3429114f25b17a09d4d2 | 1,679 | py | Python | tests/data/tokenizers/test_character_tokenizer.py | naetherm/NSEC_NMT | bba533116f37d0f48dbe96150097a1e84ecf162e | [
"MIT"
] | null | null | null | tests/data/tokenizers/test_character_tokenizer.py | naetherm/NSEC_NMT | bba533116f37d0f48dbe96150097a1e84ecf162e | [
"MIT"
] | null | null | null | tests/data/tokenizers/test_character_tokenizer.py | naetherm/NSEC_NMT | bba533116f37d0f48dbe96150097a1e84ecf162e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Copyright 2019, University of Freiburg.
Chair of Algorithms and Data Structures.
Markus Nther <naetherm@informatik.uni-freiburg.de>
'''
import argparse
import unittest
import torch
import tests.utils as test_utils
from fairseq.data.tokenizers.character_tokenizer import CharacterTokenizer | 33.58 | 125 | 0.659321 |
849193606996f031236d222d383c8ca454a60778 | 796 | py | Python | django_slack/templatetags/django_slack.py | lociii/django-slack | 409521f427a68d12ad7e7ac3e19d517d2ba131ba | [
"BSD-3-Clause"
] | 237 | 2015-01-24T01:03:13.000Z | 2022-03-31T16:38:06.000Z | django_slack/templatetags/django_slack.py | lociii/django-slack | 409521f427a68d12ad7e7ac3e19d517d2ba131ba | [
"BSD-3-Clause"
] | 106 | 2015-02-25T12:09:02.000Z | 2022-03-31T09:57:31.000Z | django_slack/templatetags/django_slack.py | lociii/django-slack | 409521f427a68d12ad7e7ac3e19d517d2ba131ba | [
"BSD-3-Clause"
] | 83 | 2015-02-11T15:20:19.000Z | 2022-03-30T01:58:16.000Z | from django import template
from django.utils.encoding import force_str
from django.utils.functional import keep_lazy
from django.utils.safestring import SafeText, mark_safe
from django.template.defaultfilters import stringfilter
register = template.Library()
_slack_escapes = {
ord('&'): u'&',
ord('<'): u... | 28.428571 | 80 | 0.73995 |
849292d06ca82342349cb2e46296455073ef7ba5 | 1,780 | py | Python | lemmus/__init__.py | naturalis/lemmus | 1a157c5143f7d7323dece488f3b8e9498c01baa5 | [
"Apache-2.0"
] | null | null | null | lemmus/__init__.py | naturalis/lemmus | 1a157c5143f7d7323dece488f3b8e9498c01baa5 | [
"Apache-2.0"
] | null | null | null | lemmus/__init__.py | naturalis/lemmus | 1a157c5143f7d7323dece488f3b8e9498c01baa5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
__all__ = ['issue','init','review']
try:
import sys
except ImportError:
print 'Error while import [sys] module \nConsider checking your pc since os should really be there you fool!'
exit(1)
# checking which version we are using.
if sys.version_info >= (3,0):
print 'This is written in python 2... | 25.070423 | 119 | 0.763483 |
849327abc0a6bfbc556e90f7ac827c3427e15ee2 | 1,330 | py | Python | analysis/compatibility.py | casperschmit/cct-selector | 46d6e7524fa0d53fd389d136ef33fa92b20e4c03 | [
"MIT"
] | null | null | null | analysis/compatibility.py | casperschmit/cct-selector | 46d6e7524fa0d53fd389d136ef33fa92b20e4c03 | [
"MIT"
] | null | null | null | analysis/compatibility.py | casperschmit/cct-selector | 46d6e7524fa0d53fd389d136ef33fa92b20e4c03 | [
"MIT"
] | null | null | null | import ast
| 32.439024 | 129 | 0.702256 |
8496e0f055e0198bed6da26e15eab46f3ad4d1c2 | 4,076 | py | Python | models/Baseline.py | WorldChanger01/CORE_VAE | 702cc05f721b128ba219667b79357dcac88988ed | [
"Apache-2.0"
] | null | null | null | models/Baseline.py | WorldChanger01/CORE_VAE | 702cc05f721b128ba219667b79357dcac88988ed | [
"Apache-2.0"
] | null | null | null | models/Baseline.py | WorldChanger01/CORE_VAE | 702cc05f721b128ba219667b79357dcac88988ed | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import numpy as np
import math
from scipy.misc import logsumexp
import torch
import torch.utils.data
import torch.nn as nn
from torch.nn import Linear
from torch.autograd import Variable
from torch.nn.functional import normalize
from utils.distributions import log_Bernoulli, ... | 32.870968 | 128 | 0.602306 |
84977020945cbac5f5269bef5d81627f58f39aa2 | 293 | py | Python | 2/solution-a.py | gmodena/adventofcode2017 | 6fb72b2220f38e5f65b04f491c8787f1b999ba60 | [
"Unlicense"
] | 1 | 2017-12-08T21:36:50.000Z | 2017-12-08T21:36:50.000Z | 2/solution-a.py | gmodena/adventofcode2017 | 6fb72b2220f38e5f65b04f491c8787f1b999ba60 | [
"Unlicense"
] | null | null | null | 2/solution-a.py | gmodena/adventofcode2017 | 6fb72b2220f38e5f65b04f491c8787f1b999ba60 | [
"Unlicense"
] | null | null | null | if __name__ == '__main__':
checksum = 0
while True:
try:
numbers = input()
except EOFError:
break
numbers = map(int, numbers.split('\t'))
numbers = sorted(numbers)
checksum += numbers[-1] - numbers[0]
print(checksum)
| 24.416667 | 47 | 0.522184 |
8499f0ce83e6065ffb27d334a070e91c6b055b97 | 492 | py | Python | cleanup.py | manojtpillai/kubuculum | fff9617e766d11870d4556b5d7738f08d683b79c | [
"MIT"
] | 3 | 2020-01-23T09:54:48.000Z | 2022-03-11T11:31:37.000Z | cleanup.py | manojtpillai/kubuculum | fff9617e766d11870d4556b5d7738f08d683b79c | [
"MIT"
] | 1 | 2020-01-26T17:58:40.000Z | 2020-08-08T14:46:22.000Z | cleanup.py | manojtpillai/kubuculum | fff9617e766d11870d4556b5d7738f08d683b79c | [
"MIT"
] | 3 | 2020-09-25T09:56:53.000Z | 2021-04-30T05:57:05.000Z | #!/usr/bin/env python3
import argparse
from kubuculum.setup_run import setup_run
parser = argparse. ArgumentParser()
parser.add_argument("-n", "--namespace", help="namespace to cleanup")
args = parser.parse_args()
default_namespace = "nm-kubuculum"
if args.namespace:
environment_params = { 'namespace' : args.na... | 25.894737 | 69 | 0.752033 |
849f3dc6b354f4b220da9b3369062677cb677003 | 1,422 | py | Python | faktura/settings.py | Tethik/faktura | a2ffa7d93d9b4afbaafe02e5ae65c5e3541fd969 | [
"MIT"
] | null | null | null | faktura/settings.py | Tethik/faktura | a2ffa7d93d9b4afbaafe02e5ae65c5e3541fd969 | [
"MIT"
] | 1 | 2016-02-16T10:06:34.000Z | 2016-02-16T10:06:34.000Z | faktura/settings.py | Tethik/faktura | a2ffa7d93d9b4afbaafe02e5ae65c5e3541fd969 | [
"MIT"
] | null | null | null | from faktura import app
from flask import request, render_template, send_file, redirect, make_response, jsonify
from faktura.breadcrumbs import breadcrumbs
from faktura.models import db, TemplateVariable, User
from flask.ext.login import login_required
from faktura.csrf import generate_csrf_token
| 35.55 | 115 | 0.742616 |
84a003ef6f199ed7523b05473d149ac0c3610842 | 5,192 | py | Python | taobao_scrapper_extreme.py | marcozzxx810/TaobaoWebscrapper | c7c50731478d733023e09336c724aef9a3342687 | [
"MIT"
] | null | null | null | taobao_scrapper_extreme.py | marcozzxx810/TaobaoWebscrapper | c7c50731478d733023e09336c724aef9a3342687 | [
"MIT"
] | null | null | null | taobao_scrapper_extreme.py | marcozzxx810/TaobaoWebscrapper | c7c50731478d733023e09336c724aef9a3342687 | [
"MIT"
] | null | null | null | import os
import re
import json
import time
import random
import requests
import pandas as pd
from retrying import retry
import openpyxl
from login import TaoBaoLogin
requests.packages.urllib3.disable_warnings()
req_session = requests.Session()
GOODS_EXCEL_PATH = 'taobao_goods.xlsx'
DATE=time.strftime("%d-%b-%Y... | 33.070064 | 355 | 0.565293 |
84a06d1506beb62e6347ce70533ace4e51a84886 | 229 | py | Python | api/admin.py | SchoolOrchestration/Firehose | 4b1424c8b86e601a9fe87d64dd760627969e1a4b | [
"MIT"
] | null | null | null | api/admin.py | SchoolOrchestration/Firehose | 4b1424c8b86e601a9fe87d64dd760627969e1a4b | [
"MIT"
] | null | null | null | api/admin.py | SchoolOrchestration/Firehose | 4b1424c8b86e601a9fe87d64dd760627969e1a4b | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Payload
admin.site.register(Payload, PayloadAdmin) | 28.625 | 50 | 0.733624 |
84a09546ac95d4a84cc0d3fa2d9a4fe281474906 | 3,371 | py | Python | useful_scripts/prepDataset.py | jessvb/3d_world_procedural_generation | 44468f4267ccb378de90efb53d6c52a204cd6e25 | [
"MIT"
] | 7 | 2019-01-29T21:20:01.000Z | 2020-11-23T01:03:04.000Z | useful_scripts/prepDataset.py | jessvb/3d_world_procedural_generation | 44468f4267ccb378de90efb53d6c52a204cd6e25 | [
"MIT"
] | null | null | null | useful_scripts/prepDataset.py | jessvb/3d_world_procedural_generation | 44468f4267ccb378de90efb53d6c52a204cd6e25 | [
"MIT"
] | 1 | 2021-07-12T10:43:29.000Z | 2021-07-12T10:43:29.000Z | import os
import tensorflow as tf
import random
import numpy as np
import matplotlib.pyplot as plt
# uncomment for inline for the notebook:
# %matplotlib inline
import pickle
# enter the directory where the training images are:
TRAIN_DIR = 'train/'
IMAGE_SIZE = 512
train_image_file_names = [TRAIN_DIR+i for i in os.li... | 32.104762 | 93 | 0.63631 |
84a0d9d3c023f36de188ac13980c222c4ee2ce2f | 11,211 | py | Python | pysnmp/ITOUCH-RADIUS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/ITOUCH-RADIUS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/ITOUCH-RADIUS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module ITOUCH-RADIUS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ITOUCH-RADIUS-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:47:05 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | 121.858696 | 1,690 | 0.769155 |
84a0dde2dd28330424d1614dcdc5f2153dc8f814 | 1,042 | py | Python | Computer Science/Development/imageProcessor/robo_controls.py | zbendt/ECE-Capstone-Project | 1bafc61f896191ccd5a843980500fb4b8bbeb8bd | [
"MIT"
] | null | null | null | Computer Science/Development/imageProcessor/robo_controls.py | zbendt/ECE-Capstone-Project | 1bafc61f896191ccd5a843980500fb4b8bbeb8bd | [
"MIT"
] | null | null | null | Computer Science/Development/imageProcessor/robo_controls.py | zbendt/ECE-Capstone-Project | 1bafc61f896191ccd5a843980500fb4b8bbeb8bd | [
"MIT"
] | null | null | null | import time
import GRBL
start_crdnts_up = {} #start coordinates
start_crdnts_dn = {} #start coordinates
pass_crdnts_up = {} #test pass stack
pass_crdnts_dn = {} #test pass stack
fail_crdnts_up = {} #test fail stack
fail_crdnts_dn = {} #test fail stack
camera_cordnts_up = {} #camera locations
camera_cordnts_dn = {} ... | 21.265306 | 40 | 0.664107 |
84a25e78d37556f783d531dbd2f253cc21aa8554 | 2,453 | py | Python | gc_apps/gis_tabular/urls.py | IQSS/geoconnect | 09c91be7ffbc04fbfa9850f6b740277d971ac8a7 | [
"Apache-2.0"
] | 6 | 2015-10-28T15:35:04.000Z | 2020-08-20T10:18:33.000Z | gc_apps/gis_tabular/urls.py | IQSS/geoconnect | 09c91be7ffbc04fbfa9850f6b740277d971ac8a7 | [
"Apache-2.0"
] | 50 | 2015-01-05T15:09:00.000Z | 2021-06-30T04:11:36.000Z | gc_apps/gis_tabular/urls.py | IQSS/geoconnect | 09c91be7ffbc04fbfa9850f6b740277d971ac8a7 | [
"Apache-2.0"
] | 2 | 2017-02-28T02:18:49.000Z | 2017-07-14T02:40:43.000Z | from django.conf.urls import url
from gc_apps.gis_tabular import views, views_create_layer, views_delete
urlpatterns = [
url(r'^test/latest/$', views.view_tabular_file_latest, name="view_tabular_file_latest"),
#url(r'^test1/(?P<tabular_id>\d{1,10})/$', 'view_tabular_file', name="view_tabular_file"),
url... | 37.166667 | 103 | 0.695067 |
84a2e5d9683c035f2d6ea4247ae739fbffd32f85 | 4,047 | py | Python | 008_behavioral_cloning/training.py | amitbcp/deep_learning_projects | 47e208fb7480ee5d49d4ddc4fcb2ba4eab76d8d5 | [
"MIT"
] | 6 | 2020-03-16T04:49:01.000Z | 2020-11-18T21:43:44.000Z | 008_behavioral_cloning/training.py | amitbcp/deep_learning_projects | 47e208fb7480ee5d49d4ddc4fcb2ba4eab76d8d5 | [
"MIT"
] | 5 | 2021-09-08T01:07:32.000Z | 2022-03-11T23:53:02.000Z | 008_behavioral_cloning/training.py | amitbcp/self_driving_projects | 47e208fb7480ee5d49d4ddc4fcb2ba4eab76d8d5 | [
"MIT"
] | null | null | null | import csv
import cv2
import utils
import argparse
import numpy as np
from model import network
from sklearn.utils import shuffle
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
import pickle
if __name__ == "__main__":
main()
| 32.376 | 80 | 0.694589 |
84a7be35e3a7ff08acc0d5a1abcf02fbbad579df | 1,519 | py | Python | pyswan/parser.py | JosiahMg/pyswan | d017726fe2aea8b5bd335954bbfbb4c81002eee8 | [
"Apache-2.0"
] | 3 | 2021-12-24T06:42:52.000Z | 2022-01-02T11:48:56.000Z | pyswan/parser.py | JosiahMg/pyswan | d017726fe2aea8b5bd335954bbfbb4c81002eee8 | [
"Apache-2.0"
] | 4 | 2022-01-07T00:38:31.000Z | 2022-01-14T07:15:11.000Z | pyswan/parser.py | JosiahMg/pyswan | d017726fe2aea8b5bd335954bbfbb4c81002eee8 | [
"Apache-2.0"
] | null | null | null | from pyswan.numeral import ExtractNumeral
from pyswan.extract_time import GenDatetime
from pyswan.extract_number import GenNumber
from pyswan.extract_math_equation import GenMathEquation
from pyswan.extract_cpca import GenPlace
def parse(target, dim):
"""
:param target: input data
:param dim:
:return... | 28.660377 | 80 | 0.622778 |
84ab6e8a9d52009482f08103bea85204c90f5e58 | 383 | py | Python | cp_validator/__init__.py | klashxx/cp_validator | 17dcb0a5b999190add1c6139101694e514d43676 | [
"MIT"
] | null | null | null | cp_validator/__init__.py | klashxx/cp_validator | 17dcb0a5b999190add1c6139101694e514d43676 | [
"MIT"
] | null | null | null | cp_validator/__init__.py | klashxx/cp_validator | 17dcb0a5b999190add1c6139101694e514d43676 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
__author__ = 'Juan Diego Godoy Robles'
__version__ = '0.1'
__ppath__ = os.path.dirname(os.path.realpath(__file__))
if __ppath__ not in sys.path:
sys.path.append(os.path.dirname(__ppath__))
from flask import Flask
app = Flask(__name__)
from cp_validator import extract... | 20.157895 | 55 | 0.751958 |
84ac5b0013ebf1c9eb4b51c77737716e82bf7346 | 3,732 | py | Python | src/data/datasets/Stocks/Stocks.py | msc5/junior-iw | d356e015fcd3a3be638097a1acc02d5dea4751aa | [
"MIT"
] | null | null | null | src/data/datasets/Stocks/Stocks.py | msc5/junior-iw | d356e015fcd3a3be638097a1acc02d5dea4751aa | [
"MIT"
] | null | null | null | src/data/datasets/Stocks/Stocks.py | msc5/junior-iw | d356e015fcd3a3be638097a1acc02d5dea4751aa | [
"MIT"
] | null | null | null |
import random
import torch
import torch.nn as nn
from pathlib import Path
from torch.utils.data import Dataset, DataLoader
RAW_PATH = 'src/data/datasets/Stocks/raw'
APIKEY = 'A6YNKD8LYDFDEALD'
if __name__ == "__main__":
from rich import print
make_dataset()
# seq_len, batch_size = 50, 256
seq_... | 30.096774 | 70 | 0.548767 |
84adba39a6a4c0e1a2f47db291c44ae8499e12cc | 513 | py | Python | common/helpers/client_helpers.py | srrokib/aws-cloudformation-resource-providers-frauddetector | 08c049a57e4f9d54666ef7bc250d878853be3cd4 | [
"Apache-2.0"
] | 4 | 2021-05-24T05:35:05.000Z | 2021-11-08T09:43:48.000Z | common/helpers/client_helpers.py | srrokib/aws-cloudformation-resource-providers-frauddetector | 08c049a57e4f9d54666ef7bc250d878853be3cd4 | [
"Apache-2.0"
] | 3 | 2021-04-29T20:30:17.000Z | 2021-05-14T16:28:19.000Z | common/helpers/client_helpers.py | srrokib/aws-cloudformation-resource-providers-frauddetector | 08c049a57e4f9d54666ef7bc250d878853be3cd4 | [
"Apache-2.0"
] | 3 | 2021-04-07T16:03:03.000Z | 2021-10-30T03:25:33.000Z | from cloudformation_cli_python_lib import (
SessionProxy,
exceptions,
)
# Use this global and use `afd_client = get_singleton_afd_client(session)` for singleton
afd_client = None
| 28.5 | 88 | 0.746589 |
84ae2d27a7faf85ed78a360e4c7469b228bf8a62 | 6,205 | py | Python | python/p054.py | wephy/project-euler | cc4824478282d3e1514a1bf7a1821b938db5bfcb | [
"MIT"
] | null | null | null | python/p054.py | wephy/project-euler | cc4824478282d3e1514a1bf7a1821b938db5bfcb | [
"MIT"
] | 1 | 2021-06-07T19:03:35.000Z | 2021-06-07T19:03:35.000Z | python/p054.py | wephy/project-euler | cc4824478282d3e1514a1bf7a1821b938db5bfcb | [
"MIT"
] | null | null | null | # Poker hands
import os
import numpy as np
def score(hand):
"""Return a number representing the score of a particular hand"""
ROYAL_FLUSH = ["T", "J", "Q", "K", "A"]
RANKS = ["2", "3", "4", "5", "6", "7", "8", "9", "T", "J", "Q", "K", "A"]
# Test for royal flush
failed = False
if len(set(c... | 28.726852 | 77 | 0.494601 |
84af899d6b5f8151362343ed14a77e305bd145de | 9,116 | py | Python | flask_unchained/bundles/security/config.py | briancappello/flask-unchained | bff296b5c808f5b1db10f7dddb81054600545749 | [
"MIT"
] | 69 | 2018-10-10T01:59:11.000Z | 2022-03-29T17:29:30.000Z | flask_unchained/bundles/security/config.py | briancappello/flask-unchained | bff296b5c808f5b1db10f7dddb81054600545749 | [
"MIT"
] | 18 | 2018-11-17T12:42:02.000Z | 2021-05-22T18:45:27.000Z | flask_unchained/bundles/security/config.py | briancappello/flask-unchained | bff296b5c808f5b1db10f7dddb81054600545749 | [
"MIT"
] | 7 | 2018-10-12T16:20:25.000Z | 2021-10-06T12:18:21.000Z | from datetime import datetime, timezone
from flask import abort
from flask_unchained import BundleConfig
from http import HTTPStatus
from .forms import (
LoginForm,
RegisterForm,
ForgotPasswordForm,
ResetPasswordForm,
ChangePasswordForm,
SendConfirmationForm,
)
from .models import AnonymousUser... | 27.130952 | 85 | 0.672554 |
84afb0c16b01e51d16f652466d95f285c1d5b079 | 170 | py | Python | shipping/cythonize.py | pgolo/sic | de5f660dec40eb349e59dc1382f41028a8a34936 | [
"MIT"
] | 2 | 2020-11-10T13:49:17.000Z | 2020-11-25T13:36:48.000Z | shipping/cythonize.py | pgolo/sic | de5f660dec40eb349e59dc1382f41028a8a34936 | [
"MIT"
] | 21 | 2020-06-14T06:37:15.000Z | 2021-09-28T15:35:39.000Z | shipping/cythonize.py | pgolo/sic | de5f660dec40eb349e59dc1382f41028a8a34936 | [
"MIT"
] | null | null | null | try:
from Cython.Build import cythonize
ext_modules = cythonize(['sic/core.py', 'sic/implicit.py'], compiler_directives={'language_level': '3'})
except:
pass
| 28.333333 | 108 | 0.7 |
84b03486abe280974e87a12cb1bf611555a5d7be | 32,867 | py | Python | edb/ir/scopetree.py | sbdchd/edgedb | a70f34d3e5c1477a7755b3531de8f84f2650cf96 | [
"Apache-2.0"
] | 2 | 2019-01-21T05:43:52.000Z | 2019-05-24T02:53:14.000Z | edb/ir/scopetree.py | ciusji/edgedb | 1c68c02430a92464839f03f43c4e5ad6f7ede4e0 | [
"Apache-2.0"
] | null | null | null | edb/ir/scopetree.py | ciusji/edgedb | 1c68c02430a92464839f03f43c4e5ad6f7ede4e0 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB 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... | 34.560463 | 79 | 0.563848 |
84b08fcdf38c4f4e63d2736b09775825c6763619 | 4,017 | py | Python | resources/users.py | gwasserfall/matcha | ff9069375da0eb81d08a2205ee52e31d11676f01 | [
"MIT"
] | 3 | 2020-01-13T12:04:36.000Z | 2020-06-15T16:26:50.000Z | resources/users.py | gwasserfall/matcha | ff9069375da0eb81d08a2205ee52e31d11676f01 | [
"MIT"
] | null | null | null | resources/users.py | gwasserfall/matcha | ff9069375da0eb81d08a2205ee52e31d11676f01 | [
"MIT"
] | null | null | null | from flask import request
from flask_restful import Resource, abort
from flask_jwt_extended import get_jwt_identity
from helpers import jwt_refresh_required
from helpers.genders import genders
from helpers.email import send_validation_email
from models.user import User, get_full_user
from models.validation import Val... | 27.895833 | 135 | 0.593478 |
84b2c796c59298594154dd3e238974ac2137c117 | 1,765 | py | Python | utils/crf.py | pengzhiliang/MRBrainS_seg | 52c392edb0b3d3988cdf526002f2e6df5c8401fe | [
"MIT"
] | 46 | 2018-12-12T06:39:23.000Z | 2022-03-14T09:23:23.000Z | utils/crf.py | liumindbdx/MRBrainS_seg | 52c392edb0b3d3988cdf526002f2e6df5c8401fe | [
"MIT"
] | 4 | 2019-10-30T09:20:20.000Z | 2020-06-11T11:51:17.000Z | utils/crf.py | liumindbdx/MRBrainS_seg | 52c392edb0b3d3988cdf526002f2e6df5c8401fe | [
"MIT"
] | 9 | 2019-04-02T10:47:42.000Z | 2022-02-23T00:54:47.000Z | import numpy as np
import pydensecrf.densecrf as dcrf
from pydensecrf.utils import compute_unary, create_pairwise_bilateral, create_pairwise_gaussian, unary_from_softmax
def dense_crf(img, prob):
'''
input:
img: numpy array of shape (num of channels, height, width)
prob: numpy array of shape (9, hei... | 39.222222 | 145 | 0.684419 |
84b4d037a94a31e2165bd6581679dac391151805 | 435 | py | Python | 2021/__00.py | terezaif/adventofcode | 67601f79a3b01d71434ef0236387ffd5ab7dca0f | [
"MIT"
] | 4 | 2020-12-06T13:11:59.000Z | 2021-12-15T11:34:34.000Z | 2021/__00.py | terezaif/adventofcode | 67601f79a3b01d71434ef0236387ffd5ab7dca0f | [
"MIT"
] | null | null | null | 2021/__00.py | terezaif/adventofcode | 67601f79a3b01d71434ef0236387ffd5ab7dca0f | [
"MIT"
] | 1 | 2021-12-02T16:32:50.000Z | 2021-12-02T16:32:50.000Z | from aocd import get_data
data = get_data(day=2, year=2021)
print(part1(data))
print(part2(data))
test_data = """forward 5
down 5
forward 8
up 3
down 8
forward 2"""
| 12.428571 | 42 | 0.643678 |
84b76a8676a19ebc9fa379b48d1d23747d4e43c3 | 6,256 | py | Python | monkPriorityList.py | skasch/ffxiv-sim | eb69fa55a8004f064937eeaffec8f1c7e31f7db8 | [
"MIT"
] | null | null | null | monkPriorityList.py | skasch/ffxiv-sim | eb69fa55a8004f064937eeaffec8f1c7e31f7db8 | [
"MIT"
] | null | null | null | monkPriorityList.py | skasch/ffxiv-sim | eb69fa55a8004f064937eeaffec8f1c7e31f7db8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue May 31 17:02:24 2016
@author: rmondoncancel
"""
# Deprecated
priorityList = [
{
'name': 'fistOfFire',
'group': 'monk',
'prepull': True,
'condition': {
'type': 'buffPresent',
'name': 'fistOfFire',
'compa... | 24.825397 | 47 | 0.307385 |
84b7a85139287ab51f816065cf0d6ff27012f826 | 2,740 | py | Python | robotto.py | sectrimte/pkmn_robotto | 4c9e4bbcf91e96ca4e8808c5f7d2d0a235016e69 | [
"Apache-2.0"
] | null | null | null | robotto.py | sectrimte/pkmn_robotto | 4c9e4bbcf91e96ca4e8808c5f7d2d0a235016e69 | [
"Apache-2.0"
] | null | null | null | robotto.py | sectrimte/pkmn_robotto | 4c9e4bbcf91e96ca4e8808c5f7d2d0a235016e69 | [
"Apache-2.0"
] | null | null | null | import pyautogui
import random
from state import State
import time
fight_screen_bg_color = [52, 52, 52]
fight_screen_blank_xy = [533,733]
button_run_xy = [486, 755]
#definition state machine
states = ['move', 'encounter', 'check_pokemon', 'run']
current_state = MoveState()
#move(path_circle_by... | 26.346154 | 130 | 0.583212 |
84b947747158c22cea0ee583bdecc74083bcd0ad | 2,209 | py | Python | accounts/tests.py | HerbyDE/jagdreisencheck-webapp | 9af5deda2423b787da88a0c893f3c474d8e4f73f | [
"BSD-3-Clause"
] | null | null | null | accounts/tests.py | HerbyDE/jagdreisencheck-webapp | 9af5deda2423b787da88a0c893f3c474d8e4f73f | [
"BSD-3-Clause"
] | null | null | null | accounts/tests.py | HerbyDE/jagdreisencheck-webapp | 9af5deda2423b787da88a0c893f3c474d8e4f73f | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.auth.hashers import check_password
from django.test import TestCase
from accounts.forms import CreateBaseUserInstance
from accounts.models import User
# Unit tests for SignUp and Registration | 35.063492 | 120 | 0.616569 |
84ba5b58e3b09cdda3ab86841485c081865f35c5 | 271 | py | Python | src/replit/__init__.py | ykdojo/replit-py | 6f8f4572d067bc0160543ef70e10e3ec18d6112c | [
"0BSD"
] | null | null | null | src/replit/__init__.py | ykdojo/replit-py | 6f8f4572d067bc0160543ef70e10e3ec18d6112c | [
"0BSD"
] | null | null | null | src/replit/__init__.py | ykdojo/replit-py | 6f8f4572d067bc0160543ef70e10e3ec18d6112c | [
"0BSD"
] | null | null | null | # flake8: noqa
"""The Replit Python module."""
from . import web
from .audio import Audio
from .database import db, Database
# Backwards compatibility.
def clear() -> None:
"""Clear the terminal."""
print("\033[H\033[2J", end="", flush=True)
audio = Audio()
| 16.9375 | 46 | 0.656827 |