hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4e921adfc47af0014cf2b438fa5298e2ac03b8dd | 249 | py | Python | server.py | Anandsingh446/Docker-Jenkins-Demo | f439828e1a02a85675de784bb966642fc5f3d5c7 | [
"Apache-2.0"
] | null | null | null | server.py | Anandsingh446/Docker-Jenkins-Demo | f439828e1a02a85675de784bb966642fc5f3d5c7 | [
"Apache-2.0"
] | null | null | null | server.py | Anandsingh446/Docker-Jenkins-Demo | f439828e1a02a85675de784bb966642fc5f3d5c7 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
PORT = 8000
MESSAGE = "I love you "
app = Flask(__name__)
@app.route("/")
def root():
result = MESSAGE.encode("utf-8")
return result
if __name__ == "__main__":
app.run(debug=True, host="0.0.0.0", port=PORT)
| 14.647059 | 50 | 0.634538 |
649a9652033c1dbcb8184ea83fbaa13239c11684 | 16,101 | py | Python | tests/template_tests/filter_tests/test_urlize.py | Fak3/django | 1ae8014a0bbae0cc1d951c1ee0f7888b6141f582 | [
"PSF-2.0",
"BSD-3-Clause"
] | 19 | 2015-07-07T02:08:59.000Z | 2021-11-08T11:05:40.000Z | tests/template_tests/filter_tests/test_urlize.py | Fak3/django | 1ae8014a0bbae0cc1d951c1ee0f7888b6141f582 | [
"PSF-2.0",
"BSD-3-Clause"
] | 31 | 2018-08-26T14:01:16.000Z | 2018-10-19T07:35:57.000Z | tests/template_tests/filter_tests/test_urlize.py | Fak3/django | 1ae8014a0bbae0cc1d951c1ee0f7888b6141f582 | [
"PSF-2.0",
"BSD-3-Clause"
] | 145 | 2019-03-14T18:54:45.000Z | 2022-03-04T20:25:31.000Z | from django.template.defaultfilters import urlize
from django.test import SimpleTestCase
from django.utils.functional import lazy
from django.utils.safestring import mark_safe
from ..utils import setup
class UrlizeTests(SimpleTestCase):
@setup({'urlize01': '{% autoescape off %}{{ a|urlize }} {{ b|urlize }}{% en... | 41.07398 | 119 | 0.55332 |
a9cf1083b0cacf1421a0b8e4d75c551af4d1472d | 2,578 | py | Python | src/spring-cloud/azext_spring_cloud/_client_factory.py | Sneezry/azure-cli-extensions | bd186fe31c8fbd8c8b945fb749349e7f243be532 | [
"MIT"
] | null | null | null | src/spring-cloud/azext_spring_cloud/_client_factory.py | Sneezry/azure-cli-extensions | bd186fe31c8fbd8c8b945fb749349e7f243be532 | [
"MIT"
] | null | null | null | src/spring-cloud/azext_spring_cloud/_client_factory.py | Sneezry/azure-cli-extensions | bd186fe31c8fbd8c8b945fb749349e7f243be532 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 36.309859 | 94 | 0.766098 |
c64b92b33c02309900d1d3425e56ecb3a5affacc | 23,993 | py | Python | tensorflow/python/autograph/pyct/common_transformers/anf.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 56 | 2018-06-21T13:47:23.000Z | 2020-05-13T09:31:47.000Z | tensorflow/python/autograph/pyct/common_transformers/anf.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 6 | 2022-01-15T07:17:47.000Z | 2022-02-14T15:28:22.000Z | tensorflow/python/autograph/pyct/common_transformers/anf.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 15 | 2018-09-06T14:18:32.000Z | 2020-05-14T06:35:30.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.886548 | 80 | 0.711958 |
9f440f2005183d7000319dcb42ee8c329df60fab | 2,879 | py | Python | md3.py | liuwuliuyun/meta-data-api | aa768ae2178734a81c3a07a43e07bfafc7d670a6 | [
"MIT"
] | null | null | null | md3.py | liuwuliuyun/meta-data-api | aa768ae2178734a81c3a07a43e07bfafc7d670a6 | [
"MIT"
] | null | null | null | md3.py | liuwuliuyun/meta-data-api | aa768ae2178734a81c3a07a43e07bfafc7d670a6 | [
"MIT"
] | null | null | null | import datetime
import socket
sock = socket.socket()
# Bind the socket to the port
server_address = ('localhost', 5559)
sock.bind(server_address)
sock.listen(5)
#data structure
file_dict = {'root' : ['user']}
file_stat = {}
header = '[MD3'+datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")+']: '
# TEST CODE COMMEN... | 26.906542 | 109 | 0.585967 |
233e24d775e28618520d022a082f2da339dc09bb | 1,263 | py | Python | src/marketdata/main.py | hyperwave-research/hyperwave | 561d2225666f2190213184e464e8e9376c241b43 | [
"MIT"
] | null | null | null | src/marketdata/main.py | hyperwave-research/hyperwave | 561d2225666f2190213184e464e8e9376c241b43 | [
"MIT"
] | null | null | null | src/marketdata/main.py | hyperwave-research/hyperwave | 561d2225666f2190213184e464e8e9376c241b43 | [
"MIT"
] | null | null | null | import argparse
import logging
from pandas.core.common import SettingWithCopyWarning
from ._commands import commands
import os
import pandas as pd
import warnings
warnings.simplefilter(action="ignore", category=SettingWithCopyWarning)
def get_argparse():
parser = argparse.ArgumentParser()
parser.add_argum... | 21.775862 | 84 | 0.688836 |
ba695c878ca86ba91f1c4e08ea7d30f61301d849 | 115 | py | Python | arquivos.py | ravysoares/projetos | 1b43a54be90cb2382799f9479d2f6610d2ecc53f | [
"Apache-2.0"
] | null | null | null | arquivos.py | ravysoares/projetos | 1b43a54be90cb2382799f9479d2f6610d2ecc53f | [
"Apache-2.0"
] | null | null | null | arquivos.py | ravysoares/projetos | 1b43a54be90cb2382799f9479d2f6610d2ecc53f | [
"Apache-2.0"
] | null | null | null | arquivos = open('numeros.txt','w')
for linha in range(1,1000):
arquivos.write('%d\n'%linha)
arquivos.close()
| 16.428571 | 34 | 0.66087 |
b3964e07d0b086b6d768338adceeda980f93377a | 6,804 | py | Python | reg_wsi/register_multiplex_wsi.py | EDRN/slide-image-registration | 76dd0428d0c23c8a409219a0b6b7a1b247f56882 | [
"Apache-2.0"
] | null | null | null | reg_wsi/register_multiplex_wsi.py | EDRN/slide-image-registration | 76dd0428d0c23c8a409219a0b6b7a1b247f56882 | [
"Apache-2.0"
] | null | null | null | reg_wsi/register_multiplex_wsi.py | EDRN/slide-image-registration | 76dd0428d0c23c8a409219a0b6b7a1b247f56882 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
'''
"Copyright 2020–2021, by the California Institute of Technology. ALL RIGHTS RESERVED.
United States Government Sponsorship acknowledged. Any commercial use must be negotiated
with the Office of Technology Transfer at the California Institute of Technology.
This software may be ... | 32.4 | 134 | 0.652263 |
a932bf1057a31c887ff262f4c4c0f7cc112aa24d | 12 | py | Python | backend/services/web/api/__init__.py | noasck/EduARd | f4a95a92d513b017ff2f0b0c3591207a741b1110 | [
"MIT"
] | 3 | 2021-04-16T14:37:47.000Z | 2021-06-28T21:13:50.000Z | backend/services/web/api/__init__.py | noasck/EduARd | f4a95a92d513b017ff2f0b0c3591207a741b1110 | [
"MIT"
] | 1 | 2021-04-17T14:45:59.000Z | 2021-04-17T14:45:59.000Z | backend/services/web/api/__init__.py | noasck/EduARd | f4a95a92d513b017ff2f0b0c3591207a741b1110 | [
"MIT"
] | null | null | null | LOADING = 1
| 6 | 11 | 0.666667 |
7dcc0dc3da57a9a89c543e039f1604a730cb5952 | 2,342 | py | Python | salt/states/pecl.py | ageron/salt | 72a0a89011e55ce7c875e948b5f0e97e70328153 | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:56.000Z | 2021-03-08T18:59:46.000Z | salt/states/pecl.py | ageron/salt | 72a0a89011e55ce7c875e948b5f0e97e70328153 | [
"Apache-2.0"
] | null | null | null | salt/states/pecl.py | ageron/salt | 72a0a89011e55ce7c875e948b5f0e97e70328153 | [
"Apache-2.0"
] | null | null | null | '''
Installation of PHP pecl extensions.
==============================================
A state module to manage php pecl extensions.
.. code-block:: yaml
mongo:
pecl.installed
'''
def installed(
name,
version=None):
'''
Make sure that a pecl extension is installed.
name
... | 28.216867 | 78 | 0.576857 |
d5fe3cf83444bc2539f94380045bdd00c67a7c23 | 2,620 | py | Python | Skin2PDF/mcskin2pdf.py | hreese/minecraft_utils | 7dc4a0316709143c2a4bc19a95faaf83c7b32556 | [
"Apache-2.0"
] | null | null | null | Skin2PDF/mcskin2pdf.py | hreese/minecraft_utils | 7dc4a0316709143c2a4bc19a95faaf83c7b32556 | [
"Apache-2.0"
] | null | null | null | Skin2PDF/mcskin2pdf.py | hreese/minecraft_utils | 7dc4a0316709143c2a4bc19a95faaf83c7b32556 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# get player's heasd skin and create a large (A3) printable PDF
from reportlab.pdfgen import canvas
from reportlab.lib.units import cm
from reportlab.lib.colors import Color
from reportlab.lib.pagesizes import A3,A4
import urllib2
import PIL
import sys
import io
from contextlib import closing
from ... | 29.438202 | 112 | 0.625191 |
21c5306750b2a026a091dce4792b0bf3d6b60e0c | 6,475 | py | Python | pymanifest/__init__.py | claybrooks/pymanifest | 8be1297b7d57352fd91047afbcb33e8b5317c37b | [
"Unlicense"
] | null | null | null | pymanifest/__init__.py | claybrooks/pymanifest | 8be1297b7d57352fd91047afbcb33e8b5317c37b | [
"Unlicense"
] | null | null | null | pymanifest/__init__.py | claybrooks/pymanifest | 8be1297b7d57352fd91047afbcb33e8b5317c37b | [
"Unlicense"
] | null | null | null | import argparse
import os
import fnmatch
import logging
class ArgSet:
def __init__(
self, files,
directories,
recurse_directories,
manifests,
patterns
):
self.files = files
self.directories = directories
self.recurse_directories = recurse_directo... | 28.650442 | 113 | 0.611429 |
867422d50fbf393dc6b41d0efaac56d033e77bb5 | 7,669 | py | Python | vnegmas/backend/src/dynetx/readwrite/edgelist.py | YueNing/vnegmas | e95adc56ee9aab8d6cd6f28cce04383e199dc2b8 | [
"MIT"
] | 3 | 2019-06-29T11:40:29.000Z | 2019-09-07T02:15:09.000Z | vnegmas/backend/src/dynetx/readwrite/edgelist.py | YueNing/vnegmas | e95adc56ee9aab8d6cd6f28cce04383e199dc2b8 | [
"MIT"
] | null | null | null | vnegmas/backend/src/dynetx/readwrite/edgelist.py | YueNing/vnegmas | e95adc56ee9aab8d6cd6f28cce04383e199dc2b8 | [
"MIT"
] | null | null | null | """
Read and write DyNetx graphs as edge lists.
The multi-line adjacency list format is useful for graphs with nodes
that can be meaningfully represented as strings.
With the edgelist format simple edge data can be stored but node or graph data is not.
There is no way of representing isolated nodes unless the node ha... | 23.169184 | 86 | 0.520798 |
4a7ddf3ae68954287c471878d9e109d59849a8fd | 830 | py | Python | yaksh_data/yaksh/urls_password_reset.py | amitpeshwani/question_template | b906dad9140e81ef2d520b9f146c8fa3376b7700 | [
"Python-2.0"
] | 1 | 2022-03-21T11:14:17.000Z | 2022-03-21T11:14:17.000Z | yaksh_data/yaksh/urls_password_reset.py | amitpeshwani/question_template | b906dad9140e81ef2d520b9f146c8fa3376b7700 | [
"Python-2.0"
] | null | null | null | yaksh_data/yaksh/urls_password_reset.py | amitpeshwani/question_template | b906dad9140e81ef2d520b9f146c8fa3376b7700 | [
"Python-2.0"
] | null | null | null | from django.conf.urls import url
from django.contrib.auth.views import password_reset, password_reset_confirm,\
password_reset_done, password_reset_complete, password_change,\
password_change_done
urlpatterns = [
url(r'^forgotpassword/$', password_reset,
name="password_reset"),
url(r'^p... | 39.52381 | 78 | 0.701205 |
1b011066aa16f16f2b0dceb0d90c86f0ae625557 | 697 | py | Python | config/__init__.py | wangzishuo111/bk_prometheus | c6aa16d8a547a3d00fbca317f6846ad35b1297ea | [
"MIT"
] | null | null | null | config/__init__.py | wangzishuo111/bk_prometheus | c6aa16d8a547a3d00fbca317f6846ad35b1297ea | [
"MIT"
] | 2 | 2021-02-08T20:48:38.000Z | 2021-06-10T23:03:39.000Z | config/__init__.py | wangzishuo111/bk_prometheus | c6aa16d8a547a3d00fbca317f6846ad35b1297ea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
__all__ = ['celery_app', 'RUN_VER', 'APP_CODE', 'SECRET_KEY', 'BK_URL', 'BASE_DIR']
import os
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from blueapps.core.celery import celery_app
# app ... | 26.807692 | 83 | 0.736011 |
a82d7e112f93b46aef8d34a050fbcf42c8a5bfd3 | 2,771 | py | Python | AutoTicketsBot/util.py | y95847frank/AutomatedTicketBot | 66754758430c7a1240b69259e32fcb452639c134 | [
"MIT"
] | 1 | 2021-03-26T05:07:20.000Z | 2021-03-26T05:07:20.000Z | AutoTicketsBot/util.py | y95847frank/AutomatedTicketBot | 66754758430c7a1240b69259e32fcb452639c134 | [
"MIT"
] | null | null | null | AutoTicketsBot/util.py | y95847frank/AutomatedTicketBot | 66754758430c7a1240b69259e32fcb452639c134 | [
"MIT"
] | null | null | null | import sys
import os
import yaml
import schedule
import time
import datetime
import argparse
def addArgs():
parser = argparse.ArgumentParser(description='Set config yaml.')
parser.add_argument("-a", "--username", help="set the account name")
parser.add_argument("-p", "--password", help="set the password")
... | 33.792683 | 124 | 0.664381 |
8cd8c9609ad3ca096a9497e433f92e5d2036d3fb | 1,233 | py | Python | torchmetrics/__about__.py | karthikrangasai/metrics | 93cb842f24d15804dd2e7677ca7fc6631b234773 | [
"Apache-2.0"
] | 4 | 2021-03-22T09:02:31.000Z | 2021-03-23T07:35:39.000Z | torchmetrics/__about__.py | karthikrangasai/metrics | 93cb842f24d15804dd2e7677ca7fc6631b234773 | [
"Apache-2.0"
] | 4 | 2021-06-14T08:40:18.000Z | 2021-07-27T20:01:08.000Z | torchmetrics/__about__.py | karthikrangasai/metrics | 93cb842f24d15804dd2e7677ca7fc6631b234773 | [
"Apache-2.0"
] | null | null | null | __version__ = "0.7.0dev"
__author__ = "PyTorchLightning et al."
__author_email__ = "name@pytorchlightning.ai"
__license__ = "Apache-2.0"
__copyright__ = f"Copyright (c) 2020-2021, {__author__}."
__homepage__ = "https://github.com/PyTorchLightning/metrics"
__docs__ = "PyTorch native Metrics"
__docs_url__ = "https://torc... | 44.035714 | 106 | 0.76399 |
f57152276073d7dba3206f9b6a673c245f6fa77a | 18,555 | py | Python | utils/matrix_utils.py | michchr/HybridControlPy | 75d64810956fade5360f18b81332a781b31eebf9 | [
"MIT"
] | 1 | 2020-05-16T07:10:51.000Z | 2020-05-16T07:10:51.000Z | utils/matrix_utils.py | michchr/HybridControlPy | 75d64810956fade5360f18b81332a781b31eebf9 | [
"MIT"
] | null | null | null | utils/matrix_utils.py | michchr/HybridControlPy | 75d64810956fade5360f18b81332a781b31eebf9 | [
"MIT"
] | 1 | 2022-02-10T03:15:28.000Z | 2022-02-10T03:15:28.000Z | import inspect
from abc import ABCMeta, abstractmethod
from copy import deepcopy as _deepcopy, copy as _copy
import sympy as sp
import wrapt
import itertools
from utils.func_utils import get_cached_func_spec, make_function
from structdict import StructDict, OrderedStructDict
import numpy as np
from numpy.lib.stride_t... | 32.957371 | 118 | 0.631205 |
22884c81bd33731528e7eb53a4b2d4683fd3cb35 | 6,621 | py | Python | test/hummingbot/connector/exchange/probit/test_probit_api_user_stream_data_source.py | pecuniafinance/hummingbot | 2cbb19c187a429d3e6000dc938617ca2a1f9f357 | [
"Apache-2.0"
] | 542 | 2021-12-17T22:34:31.000Z | 2022-03-31T14:36:23.000Z | test/hummingbot/connector/exchange/probit/test_probit_api_user_stream_data_source.py | pecuniafinance/hummingbot | 2cbb19c187a429d3e6000dc938617ca2a1f9f357 | [
"Apache-2.0"
] | 291 | 2021-12-17T20:07:53.000Z | 2022-03-31T11:07:23.000Z | test/hummingbot/connector/exchange/probit/test_probit_api_user_stream_data_source.py | pecuniafinance/hummingbot | 2cbb19c187a429d3e6000dc938617ca2a1f9f357 | [
"Apache-2.0"
] | 220 | 2021-12-17T12:41:23.000Z | 2022-03-31T23:03:22.000Z | import asyncio
import json
import unittest
from collections import Awaitable
from typing import Optional
from unittest.mock import patch, AsyncMock
from aiohttp import WSMsgType
from hummingbot.connector.exchange.probit.probit_api_user_stream_data_source import (
ProbitAPIUserStreamDataSource
)
from hummingbot.co... | 39.177515 | 119 | 0.711675 |
cb5454ff109f62c4911edb768f032f7b6de80fdb | 887 | py | Python | PyMesh/python/pymesh/meshutils/manifold_check.py | VincentLefevre/3D-parallax | 8eab905fcc591e1bd7ddbbb01ad21427286c02e3 | [
"MIT"
] | 73 | 2021-01-05T07:25:51.000Z | 2022-03-17T20:46:01.000Z | PyMesh/python/pymesh/meshutils/manifold_check.py | VincentLefevre/3D-parallax | 8eab905fcc591e1bd7ddbbb01ad21427286c02e3 | [
"MIT"
] | 1 | 2021-01-05T11:45:36.000Z | 2021-01-05T20:55:28.000Z | PyMesh/python/pymesh/meshutils/manifold_check.py | VincentLefevre/3D-parallax | 8eab905fcc591e1bd7ddbbb01ad21427286c02e3 | [
"MIT"
] | 4 | 2021-01-05T10:27:50.000Z | 2021-01-06T12:02:57.000Z | import PyMesh
from .. import Mesh
def is_vertex_manifold(mesh):
""" Vertex manifold check. The result is stored as a per-vertex scalar
field named "vertex_manifold".
"""
vertex_manifold = PyMesh.is_vertex_manifold(mesh.faces)
mesh.add_attribute("vertex_manifold")
mesh.set_attribute(... | 32.851852 | 76 | 0.713641 |
15960cb39b460bb10b10fbc80a7cc812710cdcdd | 1,490 | py | Python | MSMetaEnhancer/libs/utils/ConverterBuilder.py | RECETOX/MSMetaEnhancer | 863077330740a5b2c91f005599460cee238b2e6f | [
"MIT"
] | null | null | null | MSMetaEnhancer/libs/utils/ConverterBuilder.py | RECETOX/MSMetaEnhancer | 863077330740a5b2c91f005599460cee238b2e6f | [
"MIT"
] | 33 | 2021-11-16T15:12:45.000Z | 2022-03-31T08:59:50.000Z | MSMetaEnhancer/libs/utils/ConverterBuilder.py | RECETOX/MSMetaEnhancer | 863077330740a5b2c91f005599460cee238b2e6f | [
"MIT"
] | null | null | null | from MSMetaEnhancer.libs.converters.web import *
from MSMetaEnhancer.libs.converters.web import __all__ as web_converters
from MSMetaEnhancer.libs.converters.compute import *
from MSMetaEnhancer.libs.converters.compute import __all__ as compute_converters
from MSMetaEnhancer.libs.utils.Errors import UnknownConverter
... | 37.25 | 80 | 0.685906 |
935b3be9bba1daed28e5ddb24bb028b3fc1b9558 | 17,508 | py | Python | ogr/services/pagure/project.py | lachmanfrantisek/ogr | 4bdf2ce1a78b69df28cd890f8775ad546befa5bf | [
"MIT"
] | null | null | null | ogr/services/pagure/project.py | lachmanfrantisek/ogr | 4bdf2ce1a78b69df28cd890f8775ad546befa5bf | [
"MIT"
] | null | null | null | ogr/services/pagure/project.py | lachmanfrantisek/ogr | 4bdf2ce1a78b69df28cd890f8775ad546befa5bf | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2018-2019 Red Hat, Inc.
# 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, m... | 32.84803 | 100 | 0.602582 |
96706fdb7deee4b00dcf76e329fc06982041e33c | 7,806 | py | Python | neutron/debug/debug_agent.py | kevinbenton/neutron | f27fba3ad77d907713e3e1cbfa45d33e0135c08b | [
"Apache-2.0"
] | null | null | null | neutron/debug/debug_agent.py | kevinbenton/neutron | f27fba3ad77d907713e3e1cbfa45d33e0135c08b | [
"Apache-2.0"
] | null | null | null | neutron/debug/debug_agent.py | kevinbenton/neutron | f27fba3ad77d907713e3e1cbfa45d33e0135c08b | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012, Nachi Ueno, NTT MCL, 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:/... | 38.643564 | 79 | 0.593005 |
05e64c864731e330dd6f465041d2bc1d20971d0e | 11,352 | py | Python | category_encoders/m_estimate.py | RoyalTS/category_encoders | a810a4b7abfce9fc4eb7fc401e3d37f2c1c6e402 | [
"BSD-3-Clause"
] | 1 | 2021-07-09T08:14:31.000Z | 2021-07-09T08:14:31.000Z | category_encoders/m_estimate.py | RoyalTS/category_encoders | a810a4b7abfce9fc4eb7fc401e3d37f2c1c6e402 | [
"BSD-3-Clause"
] | null | null | null | category_encoders/m_estimate.py | RoyalTS/category_encoders | a810a4b7abfce9fc4eb7fc401e3d37f2c1c6e402 | [
"BSD-3-Clause"
] | null | null | null | """M-probability estimate"""
import numpy as np
import pandas as pd
from sklearn.base import BaseEstimator
from category_encoders.ordinal import OrdinalEncoder
import category_encoders.utils as util
from sklearn.utils.random import check_random_state
__author__ = 'Jan Motl'
class MEstimateEncoder(BaseEstimator, util... | 36.619355 | 137 | 0.614341 |
281f00ba0126c47931a04c1c44347ecde284f8c4 | 554 | py | Python | day1/src/puzzle2.py | DirkdenHoedt/AdventOfCode2020 | 98e85a12ca3630dcf698f21124fb89b66418c263 | [
"MIT"
] | null | null | null | day1/src/puzzle2.py | DirkdenHoedt/AdventOfCode2020 | 98e85a12ca3630dcf698f21124fb89b66418c263 | [
"MIT"
] | null | null | null | day1/src/puzzle2.py | DirkdenHoedt/AdventOfCode2020 | 98e85a12ca3630dcf698f21124fb89b66418c263 | [
"MIT"
] | null | null | null | #!/bin/env python3
numbers = []
def puzzle2():
# Read in all the numbers
with open('input.txt', 'r') as input:
for line in input:
numbers.append(int(line))
# Compare all the numbers
for x in numbers:
for y in numbers:
for z in numbers:
if(x + y +... | 26.380952 | 69 | 0.433213 |
02d4b225fa34e310d206a592b485b8ff707cdd17 | 670 | py | Python | chemprop/web/wsgi.py | shomikverma/chemprop | ddaa874fe1f6ef4fbdf6b980c3157bed2ae85faa | [
"MIT"
] | 689 | 2020-02-14T20:22:33.000Z | 2022-03-31T13:45:09.000Z | chemprop/web/wsgi.py | shomikverma/chemprop | ddaa874fe1f6ef4fbdf6b980c3157bed2ae85faa | [
"MIT"
] | 214 | 2020-02-23T19:54:15.000Z | 2022-03-30T21:47:06.000Z | chemprop/web/wsgi.py | shomikverma/chemprop | ddaa874fe1f6ef4fbdf6b980c3157bed2ae85faa | [
"MIT"
] | 296 | 2020-02-14T15:39:13.000Z | 2022-03-28T16:27:17.000Z | """
Runs the web interface version of Chemprop.
Designed to be used for production only, along with Gunicorn.
"""
from chemprop.web.app import app, db
from chemprop.web.utils import clear_temp_folder, set_root_folder
def build_app(*args, **kwargs):
# Set up root folder and subfolders
set_root_folder(
... | 24.814815 | 65 | 0.658209 |
cd63b4372793f477ba5ac658c7d721167f372a1d | 25,304 | py | Python | astropy/io/registry.py | jayvdb/astropy | bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f | [
"BSD-3-Clause"
] | 445 | 2019-01-26T13:50:26.000Z | 2022-03-18T05:17:38.000Z | astropy/io/registry.py | jayvdb/astropy | bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f | [
"BSD-3-Clause"
] | 242 | 2019-01-29T15:48:27.000Z | 2022-03-31T22:09:21.000Z | astropy/io/registry.py | jayvdb/astropy | bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f | [
"BSD-3-Clause"
] | 31 | 2019-03-10T09:51:27.000Z | 2022-02-14T23:11:12.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import contextlib
import pathlib
import re
import sys
import inspect
import os
from collections import OrderedDict
from operator import itemgetter
import numpy as np
__all__ = ['register_reader', 'register_writer', 'register_identifier',
'... | 34.758242 | 82 | 0.616701 |
b188328364586521b798f7c607a85ab44d684920 | 13,714 | py | Python | bin/metawrap-scripts/binning_refiner.py | qi-lee/metaWRAP | f5b4737e748af69681a604ed584fafd7b4eb664d | [
"MIT"
] | 251 | 2018-02-17T22:11:47.000Z | 2022-03-30T07:16:29.000Z | bin/metawrap-scripts/binning_refiner.py | qi-lee/metaWRAP | f5b4737e748af69681a604ed584fafd7b4eb664d | [
"MIT"
] | 419 | 2018-02-14T18:09:17.000Z | 2022-03-30T22:42:02.000Z | bin/metawrap-scripts/binning_refiner.py | qi-lee/metaWRAP | f5b4737e748af69681a604ed584fafd7b4eb664d | [
"MIT"
] | 152 | 2018-03-23T03:31:36.000Z | 2022-03-13T06:08:49.000Z | #!/usr/bin/env python2.7
# Copyright (C) 2017, Weizhi Song, Torsten Thomas.
# songwz03@gmail.com
# t.thomas@unsw.edu.au
# Binning_refiner is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version... | 42.590062 | 158 | 0.700817 |
e9402b582313b1a6d95766ae71c3037c639b7830 | 4,610 | py | Python | dkt/trainer.py | ysb06/boostcamp-p4-dkt | 1ab3cf4d060dcb77f23180d1abe0554d559961cf | [
"MIT"
] | null | null | null | dkt/trainer.py | ysb06/boostcamp-p4-dkt | 1ab3cf4d060dcb77f23180d1abe0554d559961cf | [
"MIT"
] | null | null | null | dkt/trainer.py | ysb06/boostcamp-p4-dkt | 1ab3cf4d060dcb77f23180d1abe0554d559961cf | [
"MIT"
] | null | null | null | import os
import torch
import numpy as np
import torch.nn as nn
from sklearn.metrics import roc_auc_score, accuracy_score
def train(
train_loader, model, optimizer,
clip_grad: int,
logging_step: int,
device: torch.device,
):
model.train()
total_preds = []
total_targets = []
losses = [... | 26.494253 | 69 | 0.62321 |
f0e9313378e3d2f69d3d78c56db2b026d7ce085e | 1,363 | py | Python | 14.py | jeslinmx/advent2020 | 3b4ff9860af18be1b5dbf2a406f6cfd445ecc7da | [
"MIT"
] | 1 | 2020-12-23T20:15:12.000Z | 2020-12-23T20:15:12.000Z | 14.py | jeslinmx/advent2020 | 3b4ff9860af18be1b5dbf2a406f6cfd445ecc7da | [
"MIT"
] | null | null | null | 14.py | jeslinmx/advent2020 | 3b4ff9860af18be1b5dbf2a406f6cfd445ecc7da | [
"MIT"
] | 1 | 2020-12-23T16:09:50.000Z | 2020-12-23T16:09:50.000Z | # Problem: https://adventofcode.com/2020/day/14
# Input
from sys import stdin
program = list(stdin)
# Part 1
from collections import defaultdict
mem = defaultdict(int)
for line in program:
if line.startswith("mask = "):
mask = line.strip()[-36:]
ones_mask = int(mask.replace("X", "0"), base=2)
... | 34.075 | 77 | 0.603815 |
58a30d989233d96a254075c965fb24a6445476b7 | 3,991 | py | Python | dffml/source/dir.py | SGeetansh/dffml | 04647bdcadef2f7e7b59cdd8ac1e89f17ef1095b | [
"MIT"
] | 3 | 2021-03-08T18:41:21.000Z | 2021-06-05T20:15:14.000Z | dffml/source/dir.py | NikhilBartwal/dffml | 16180144f388924d9e5840c4aa80d08970af5e60 | [
"MIT"
] | 24 | 2020-05-20T23:29:57.000Z | 2021-04-14T04:18:21.000Z | dffml/source/dir.py | NikhilBartwal/dffml | 16180144f388924d9e5840c4aa80d08970af5e60 | [
"MIT"
] | 1 | 2021-04-19T23:58:26.000Z | 2021-04-19T23:58:26.000Z | """
Loads files from a directory
"""
import os
import glob
import pathlib
from typing import List
from ..record import Record
from ..base import config, field
from .memory import MemorySource
from ..util.entrypoint import entrypoint
from ..source.source import BaseSource
from ..configloader.configloader import ConfigL... | 31.674603 | 89 | 0.567527 |
443a6ba099886f5c437e951e657f65e3cc23430c | 999 | py | Python | kAFL-Fuzzer/kafl_debug.py | SafeBreach-Labs/hAFL2 | f607d2b4973f1b2ca689dbe8e467dbd7dbac0881 | [
"BSD-3-Clause"
] | 102 | 2021-08-05T16:50:26.000Z | 2022-03-08T19:30:17.000Z | kAFL-Fuzzer/kafl_debug.py | SafeBreach-Labs/hAFL2 | f607d2b4973f1b2ca689dbe8e467dbd7dbac0881 | [
"BSD-3-Clause"
] | 1 | 2022-02-24T09:13:14.000Z | 2022-02-24T09:13:14.000Z | kAFL-Fuzzer/kafl_debug.py | SB-GC-Labs/hAFL1 | 2f4c49bff11163f25e282b12acbd021a13cdb00d | [
"BSD-3-Clause"
] | 18 | 2021-08-04T22:45:39.000Z | 2022-03-25T06:38:56.000Z | #!/usr/bin/env python3
#
# Copyright (C) 2017-2019 Sergej Schumilo, Cornelius Aschermann, Tim Blazytko
# Copyright (C) 2019-2020 Intel Corporation
#
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Execute a given kAFL target with individual test inputs for purpose of debug/inspection.
"""
import os
import sys
impor... | 23.785714 | 88 | 0.683684 |
1449bf0d4f5a75df4ebca2888cc8e2b28b1c7b04 | 321 | py | Python | app/endpoint/routes.py | vladimirze/Gimme-JSON-backend | 37fba97fcc99a2e631606f97fc48e6c280775ed0 | [
"MIT"
] | null | null | null | app/endpoint/routes.py | vladimirze/Gimme-JSON-backend | 37fba97fcc99a2e631606f97fc48e6c280775ed0 | [
"MIT"
] | null | null | null | app/endpoint/routes.py | vladimirze/Gimme-JSON-backend | 37fba97fcc99a2e631606f97fc48e6c280775ed0 | [
"MIT"
] | null | null | null | from app.endpoint import api
from flask import Blueprint
blueprint = Blueprint('endpoint', __name__)
blueprint.add_url_rule('/endpoint/', view_func=api.EndpointCollection.as_view('endpoint_collection'))
blueprint.add_url_rule('/endpoint/<string:endpoint_id>/', view_func=api.EndpointEntity.as_view('endpoint_entity'))... | 35.666667 | 114 | 0.813084 |
4675602a002364d12f00ae1279376f7a3d612348 | 783 | py | Python | runway/_cli/commands/_takeoff.py | avosper-intellaegis/runway | 757d4e7db269ec16479b044ac82a69f25fa2a450 | [
"Apache-2.0"
] | 134 | 2018-02-26T21:35:23.000Z | 2022-03-03T00:30:27.000Z | runway/_cli/commands/_takeoff.py | asksmruti/runway | 8aca76df9372e3d13eb35e12f81758f618e89e74 | [
"Apache-2.0"
] | 937 | 2018-03-08T22:04:35.000Z | 2022-03-30T12:21:47.000Z | runway/_cli/commands/_takeoff.py | asksmruti/runway | 8aca76df9372e3d13eb35e12f81758f618e89e74 | [
"Apache-2.0"
] | 70 | 2018-02-26T23:48:11.000Z | 2022-03-02T18:44:30.000Z | """``runway takeoff`` command."""
# docs: file://./../../../docs/source/commands.rst
import logging
from typing import TYPE_CHECKING, Any, cast
import click
from .. import options
from ._deploy import deploy
if TYPE_CHECKING:
from ..._logging import RunwayLogger
LOGGER = cast("RunwayLogger", logging.getLogger(_... | 23.727273 | 77 | 0.708812 |
aee45c5b8bb1b7ec425d184d701e7be58af48bc4 | 4,445 | py | Python | nanopb_helpers/__init__.py | wheeler-microfluidics/nanopb-helpers | 29d2e265905005113817303d8da9af0a5efb7110 | [
"BSD-3-Clause"
] | null | null | null | nanopb_helpers/__init__.py | wheeler-microfluidics/nanopb-helpers | 29d2e265905005113817303d8da9af0a5efb7110 | [
"BSD-3-Clause"
] | null | null | null | nanopb_helpers/__init__.py | wheeler-microfluidics/nanopb-helpers | 29d2e265905005113817303d8da9af0a5efb7110 | [
"BSD-3-Clause"
] | null | null | null | '''
Provide an API for cross-platform compiling Protocol Buffer definitions for the
following targets:
- `nanopb` C
- Google C++
- Python
__NB__ The compilation is performed using bundled [`nanopb`][1]
[binary distributions][2].
`nanopb` is Copyright (c) 2011 Petteri Aimonen <jpa at nanopb.mail.kapsi.fi>
See [lic... | 29.832215 | 79 | 0.624297 |
3c29fededf16df0784cfa8c3c23fa318126655ec | 1,067 | bzl | Python | tools/workspace/raspberrypi-firmware/repository.bzl | kabrezi/pi3hat | 583595c5895240a5dc2b75f5981aef6d7671f94b | [
"Apache-2.0"
] | 64 | 2017-01-18T15:12:05.000Z | 2022-02-16T08:28:11.000Z | tools/workspace/raspberrypi-firmware/repository.bzl | kabrezi/pi3hat | 583595c5895240a5dc2b75f5981aef6d7671f94b | [
"Apache-2.0"
] | 7 | 2021-02-18T14:51:37.000Z | 2022-03-28T20:58:56.000Z | tools/workspace/raspberrypi-firmware/repository.bzl | kabrezi/pi3hat | 583595c5895240a5dc2b75f5981aef6d7671f94b | [
"Apache-2.0"
] | 14 | 2021-01-11T09:48:34.000Z | 2021-12-16T16:20:35.000Z | # -*- python -*-
# Copyright 2018 Josh Pieper, jjp@pobox.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 applic... | 38.107143 | 84 | 0.733833 |
9ab649cab2ed92f18bdeaa17a0d65eea86ae8d23 | 2,157 | py | Python | tools/giws/datatypes/shortDataGiws.py | sguazt/dcsxx-testbed | e7210f0c7f54256d5bf0c90297e0c4f9eaf82da0 | [
"Apache-2.0"
] | null | null | null | tools/giws/datatypes/shortDataGiws.py | sguazt/dcsxx-testbed | e7210f0c7f54256d5bf0c90297e0c4f9eaf82da0 | [
"Apache-2.0"
] | null | null | null | tools/giws/datatypes/shortDataGiws.py | sguazt/dcsxx-testbed | e7210f0c7f54256d5bf0c90297e0c4f9eaf82da0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python -u
# Copyright or Copr. INRIA/Scilab - Sylvestre LEDRU
#
# Sylvestre LEDRU - <sylvestre.ledru@inria.fr> <sylvestre@ledru.info>
#
# This software is a computer program whose purpose is to generate C++ wrapper
# for Java objects/methods.
#
# This software is governed by the CeCILL license under Fren... | 37.189655 | 79 | 0.762633 |
c2ec19ba32936e2522af8fb83460894b6a209da3 | 2,030 | py | Python | packages/syft/src/syft/proto/core/pointer/pointer_pb2.py | vishalbelsare/PySyft | fb04404fcfbef82fad1fb47407b35a24e9afb599 | [
"Apache-1.1"
] | 8,428 | 2017-08-10T09:17:49.000Z | 2022-03-31T08:20:14.000Z | packages/syft/src/syft/proto/core/pointer/pointer_pb2.py | vishalbelsare/PySyft | fb04404fcfbef82fad1fb47407b35a24e9afb599 | [
"Apache-1.1"
] | 4,779 | 2017-08-09T23:19:00.000Z | 2022-03-29T11:49:36.000Z | packages/syft/src/syft/proto/core/pointer/pointer_pb2.py | vishalbelsare/PySyft | fb04404fcfbef82fad1fb47407b35a24e9afb599 | [
"Apache-1.1"
] | 2,307 | 2017-08-10T08:52:12.000Z | 2022-03-30T05:36:07.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: proto/core/pointer/pointer.proto
"""Generated protocol buffer code."""
# third party
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf imp... | 44.130435 | 664 | 0.780296 |
ca34a91d75261d0721fde818ae2320a6d75abc38 | 755 | py | Python | src/third_party/skia/gn/dehydrate_sksl.py | rhencke/engine | 1016db292c4e73374a0a11536b18303c9522a224 | [
"BSD-3-Clause"
] | 54 | 2016-04-05T17:45:19.000Z | 2022-01-31T06:27:33.000Z | src/third_party/skia/gn/dehydrate_sksl.py | rhencke/engine | 1016db292c4e73374a0a11536b18303c9522a224 | [
"BSD-3-Clause"
] | 25 | 2016-03-18T04:01:06.000Z | 2020-06-27T15:39:35.000Z | src/third_party/skia/gn/dehydrate_sksl.py | rhencke/engine | 1016db292c4e73374a0a11536b18303c9522a224 | [
"BSD-3-Clause"
] | 50 | 2016-03-03T20:31:58.000Z | 2022-03-31T18:26:13.000Z | #!/usr/bin/env python
#
# Copyright 2020 Google LLC
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import subprocess
import sys
skslc = sys.argv[1]
targetDir = sys.argv[2]
includes = sys.argv[3:]
for inc in includes:
print("Recompiling " + inc + ... | 26.034483 | 74 | 0.633113 |
155f50966c56421999b6e02a9f1ff4fece286e96 | 3,836 | py | Python | flopy/mt3d/mttob.py | codacy-badger/flopy | de874b02661f59ef4e99f18272883a13a4d55f16 | [
"CC0-1.0",
"BSD-3-Clause"
] | 1 | 2022-03-30T14:48:22.000Z | 2022-03-30T14:48:22.000Z | flopy/mt3d/mttob.py | codacy-badger/flopy | de874b02661f59ef4e99f18272883a13a4d55f16 | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | flopy/mt3d/mttob.py | codacy-badger/flopy | de874b02661f59ef4e99f18272883a13a4d55f16 | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | from ..pakbase import Package
class Mt3dTob(Package):
"""
Transport Observation package class
"""
def __init__(self, model, outnam='tob_output', CScale=1.0, FluxGroups=[],
FScale=1.0, iOutFlux=0, extension='tob', unitnumber=None,
filenames=None):
if unitnumb... | 33.946903 | 127 | 0.48488 |
17189708d5c5782c3a0eda6bfba8378af7f73c84 | 384 | py | Python | project_plantware/warehouse/migrations/0008_auto_20200629_2114.py | naiem2525/plantware | 5d72989780ff39b59949dde649052d9d01729c86 | [
"bzip2-1.0.6"
] | null | null | null | project_plantware/warehouse/migrations/0008_auto_20200629_2114.py | naiem2525/plantware | 5d72989780ff39b59949dde649052d9d01729c86 | [
"bzip2-1.0.6"
] | null | null | null | project_plantware/warehouse/migrations/0008_auto_20200629_2114.py | naiem2525/plantware | 5d72989780ff39b59949dde649052d9d01729c86 | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 3.0.7 on 2020-06-29 15:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('warehouse', '0007_auto_20200628_1420'),
]
operations = [
migrations.AlterField(
model_name='order',
name='date_order... | 20.210526 | 49 | 0.598958 |
82768baec8bb33e473288b5e757951c756c0f198 | 1,374 | py | Python | setup.py | briang1/django-filebrowser-no-grappelli | 61363cb37c03d3f98008b55691ed4c423c416c4a | [
"BSD-3-Clause"
] | null | null | null | setup.py | briang1/django-filebrowser-no-grappelli | 61363cb37c03d3f98008b55691ed4c423c416c4a | [
"BSD-3-Clause"
] | null | null | null | setup.py | briang1/django-filebrowser-no-grappelli | 61363cb37c03d3f98008b55691ed4c423c416c4a | [
"BSD-3-Clause"
] | 1 | 2019-12-03T06:17:59.000Z | 2019-12-03T06:17:59.000Z | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='django-filebrowser-no-grappelli',
version='3.7.8',
description='Media-Management no Grappelli',
long_description=read('README.rst'),
url='http... | 34.35 | 70 | 0.640466 |
e662d65002493925065b9f75a08ec56fc051bf3c | 8,134 | py | Python | source/lambda/jobresultprocessor/lambda_function.py | jfathi/document-understanding-solution | 81da1cce082b8f814ee09825bff4984086f67cab | [
"Apache-2.0"
] | 138 | 2020-04-01T02:15:14.000Z | 2022-03-29T17:54:27.000Z | source/lambda/jobresultprocessor/lambda_function.py | jfathi/document-understanding-solution | 81da1cce082b8f814ee09825bff4984086f67cab | [
"Apache-2.0"
] | 59 | 2020-05-04T15:39:34.000Z | 2022-02-22T17:54:53.000Z | source/lambda/jobresultprocessor/lambda_function.py | jfathi/document-understanding-solution | 81da1cce082b8f814ee09825bff4984086f67cab | [
"Apache-2.0"
] | 68 | 2020-04-02T01:42:53.000Z | 2022-03-11T17:37:36.000Z |
######################################################################################################################
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... | 41.28934 | 151 | 0.610032 |
24bdee255f7dafab2868373a0c344ea5439b3c16 | 2,637 | py | Python | vmtkScripts/vmtksurfacebooleanoperation.py | Clemson-MSE/vmtk | de358d4316ed441e20a39d46128a6a6c47af20cb | [
"Apache-2.0"
] | null | null | null | vmtkScripts/vmtksurfacebooleanoperation.py | Clemson-MSE/vmtk | de358d4316ed441e20a39d46128a6a6c47af20cb | [
"Apache-2.0"
] | null | null | null | vmtkScripts/vmtksurfacebooleanoperation.py | Clemson-MSE/vmtk | de358d4316ed441e20a39d46128a6a6c47af20cb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
## Program: VMTK
## Module: $RCSfile: vmtksurfacebooleanOperation.py,v $
## Language: Python
## Date: $Date: 2005/09/14 09:49:59 $
## Version: $Revision: 1.7 $
## Copyright (c) Luca Antiga, David Steinman. All rights reserved.
## See LICENSE file for details.
## This softw... | 35.16 | 125 | 0.667425 |
52defc9936ac19817e42359fb246e0a12b31e825 | 600 | py | Python | hazedumper/__init__.py | cxldxice/hazedumper | 2c5aea17165cc931d8b027671150c01eb13abc4e | [
"MIT"
] | null | null | null | hazedumper/__init__.py | cxldxice/hazedumper | 2c5aea17165cc931d8b027671150c01eb13abc4e | [
"MIT"
] | null | null | null | hazedumper/__init__.py | cxldxice/hazedumper | 2c5aea17165cc931d8b027671150c01eb13abc4e | [
"MIT"
] | null | null | null | #name: hazedumper
#desc: pkg for auto update offsets
#source: https://github.com/frk1/hazedumper
#author: by @fxcvd
import requests
from .default import *
HAZEDUMPER_URL = "https://raw.githubusercontent.com/frk1/hazedumper/master/csgo.min.json"
LoadError = Exception("LoadError")
def load():
res = requests.get... | 20.689655 | 89 | 0.683333 |
5c9842a8435c4046002497b359c6b53001afe32c | 71,311 | py | Python | src/sage/rings/multi_power_series_ring_element.py | ChamanAgrawal/sage | 5f6d56ba247b352d7d46442e88fa3a027e9f222d | [
"BSL-1.0"
] | 2 | 2019-06-02T03:16:47.000Z | 2019-06-15T10:17:19.000Z | src/sage/rings/multi_power_series_ring_element.py | ChamanAgrawal/sage | 5f6d56ba247b352d7d46442e88fa3a027e9f222d | [
"BSL-1.0"
] | null | null | null | src/sage/rings/multi_power_series_ring_element.py | ChamanAgrawal/sage | 5f6d56ba247b352d7d46442e88fa3a027e9f222d | [
"BSL-1.0"
] | 1 | 2019-06-02T03:16:55.000Z | 2019-06-02T03:16:55.000Z | r"""
Multivariate Power Series
Construct and manipulate multivariate power series (in finitely many
variables) over a given commutative ring. Multivariate power series
are implemented with total-degree precision.
EXAMPLES:
Power series arithmetic, tracking precision::
sage: R.<s,t> = PowerSeriesRing(ZZ); R
... | 33.495068 | 154 | 0.497118 |
569e62e7aa67f7c8824d71dd723072f97be22237 | 10,247 | py | Python | Hw2TSP.py | Halil-ibrahim-GUNBULAK/GenericAlgortihm-TSP_solving | 89c97916d1c49aa1c8ecc17840f4035224122c66 | [
"Apache-2.0"
] | 1 | 2022-02-15T13:36:17.000Z | 2022-02-15T13:36:17.000Z | Hw2TSP.py | Halil-ibrahim-GUNBULAK/GenericAlgortihm-TSP_solving | 89c97916d1c49aa1c8ecc17840f4035224122c66 | [
"Apache-2.0"
] | null | null | null | Hw2TSP.py | Halil-ibrahim-GUNBULAK/GenericAlgortihm-TSP_solving | 89c97916d1c49aa1c8ecc17840f4035224122c66 | [
"Apache-2.0"
] | null | null | null | import random
import copy
import os
import time
import math
import matplotlib.pyplot as plt
list_of_cities = []
# inside the city class keeps the x y coordinates and name of the city also the distance between two cities is calculated here again
class City(object):
def __init__(self, num, x, y, distance=None):
... | 33.596721 | 168 | 0.662145 |
f9f1f18216ba989e964815e13cef608bba4528f2 | 18,350 | py | Python | graphTranspose-dsf-prim-bellmanFord-dijkstra.py | luckydoglou/advanced-algorithms | 0e4b5b9c550b61ac795bee0cc49a564438b0ea44 | [
"MIT"
] | 1 | 2020-07-31T02:00:09.000Z | 2020-07-31T02:00:09.000Z | graphTranspose-dsf-prim-bellmanFord-dijkstra.py | luckydoglou/advanced-algorithms | 0e4b5b9c550b61ac795bee0cc49a564438b0ea44 | [
"MIT"
] | null | null | null | graphTranspose-dsf-prim-bellmanFord-dijkstra.py | luckydoglou/advanced-algorithms | 0e4b5b9c550b61ac795bee0cc49a564438b0ea44 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Topic: Graph theory, minimal spanning tree, shortest path, greedy algorithms
Implementation: graph transpose, in & out degree, depth-first-search
prim's algorithm, bellman-ford algorithm, and dijkstra's algorithm
Name: Xiaolou Huang
Date: 11/12/2019
"""
import sys
... | 37.296748 | 107 | 0.424251 |
24141e3c3781cc5a23372f5443879b5c1918a482 | 360 | py | Python | studybud/urls.py | FDB09/discord-clone | f44eaef6332aefee60656ce956858c5f49e895b4 | [
"MIT"
] | null | null | null | studybud/urls.py | FDB09/discord-clone | f44eaef6332aefee60656ce956858c5f49e895b4 | [
"MIT"
] | null | null | null | studybud/urls.py | FDB09/discord-clone | f44eaef6332aefee60656ce956858c5f49e895b4 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('base.urls')),
path('api/', include('base.api.urls'))
]
urlpatterns += static(settings.MEDIA... | 27.692308 | 76 | 0.736111 |
3c42a8d2b4cad643e49df4981410bd4eb789ff3e | 283 | py | Python | reid/loss/__init__.py | tiancity-NJU/Person-Reid | 153e5695acca533229793ef96d0e7cb01dbc243d | [
"MIT"
] | 1 | 2019-03-26T07:49:44.000Z | 2019-03-26T07:49:44.000Z | reid/loss/__init__.py | tiancity-NJU/Person-Reid | 153e5695acca533229793ef96d0e7cb01dbc243d | [
"MIT"
] | null | null | null | reid/loss/__init__.py | tiancity-NJU/Person-Reid | 153e5695acca533229793ef96d0e7cb01dbc243d | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from .oim import oim, OIM, OIMLoss
from .triplet import TripletLoss
from .selftraining_triplet import SelfTraining_TripletLoss
__all__ = [
'oim',
'OIM',
'OIMLoss',
'TripletLoss',
'SelfTraining_TripletLoss',
]
| 20.214286 | 59 | 0.699647 |
4b1e8d83c902e889fa4eebdd49c8c01010ccd0a3 | 15,878 | py | Python | src/functions.py | JanSKowalski/ese440-ese441 | 90d7b7afc34aa062aad23dd23813284f66bf1f4d | [
"MIT"
] | null | null | null | src/functions.py | JanSKowalski/ese440-ese441 | 90d7b7afc34aa062aad23dd23813284f66bf1f4d | [
"MIT"
] | null | null | null | src/functions.py | JanSKowalski/ese440-ese441 | 90d7b7afc34aa062aad23dd23813284f66bf1f4d | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.utils.data as data
import torchvision.transforms as transforms
import torchvision.datasets as datasets
from sklearn import metrics
#from sklearn import decomposition
#from sklearn import manifold
from sklearn.m... | 33.217573 | 217 | 0.711928 |
b9d6d327855355e490230e2f43b9b8faefb39cae | 897 | py | Python | ryzen/run_per_core_prof.py | akhilguliani/daemon | 5faae4fb303da563d661571d93d9c7a7e6a36fb0 | [
"Apache-2.0"
] | null | null | null | ryzen/run_per_core_prof.py | akhilguliani/daemon | 5faae4fb303da563d661571d93d9c7a7e6a36fb0 | [
"Apache-2.0"
] | 1 | 2020-06-12T06:14:14.000Z | 2020-06-12T06:14:14.000Z | ryzen/run_per_core_prof.py | akhilguliani/daemon | 5faae4fb303da563d661571d93d9c7a7e6a36fb0 | [
"Apache-2.0"
] | 1 | 2019-12-10T10:54:19.000Z | 2019-12-10T10:54:19.000Z |
import sys
from time import time
import psutil
from msr import setup_perf
from frequency import *
from launcher import *
## Setup perf registers and set frequency to max
setup_perf()
# ensure MSR module is loaded
psutil.Popen(args=["modprobe","msr"])
# set govornor to userspace and freq to max possible
set_gov_usersp... | 26.382353 | 159 | 0.750279 |
e1a15eb345e26b13bf6384732af38807f7e38421 | 18,018 | py | Python | cea/optimization/slave/seasonal_storage/design_operation.py | VMarty/CityEnergyAnalyst | 5ab4385fc008f3b23f5bd5f9ba683d401cfcef38 | [
"MIT"
] | 1 | 2018-08-16T14:34:23.000Z | 2018-08-16T14:34:23.000Z | cea/optimization/slave/seasonal_storage/design_operation.py | VMarty/CityEnergyAnalyst | 5ab4385fc008f3b23f5bd5f9ba683d401cfcef38 | [
"MIT"
] | null | null | null | cea/optimization/slave/seasonal_storage/design_operation.py | VMarty/CityEnergyAnalyst | 5ab4385fc008f3b23f5bd5f9ba683d401cfcef38 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Storage Design And Operation
This File is called by "Storage_Optimizer_incl_Losses_main.py" (Optimization Routine) and
will operate the storage according to the inputs given by the main file.
The operation data is stored
"""
from __future__ import divi... | 45.5 | 198 | 0.679321 |
7461e8f6dc27c4d12823a9631c1657f129661e53 | 6,575 | py | Python | ceilometer/tests/compute/virt/vmware/test_inspector.py | rdo-management/ceilometer | df10a87ea7810f3ebf47b7d027e30a8403d89b0f | [
"Apache-2.0"
] | null | null | null | ceilometer/tests/compute/virt/vmware/test_inspector.py | rdo-management/ceilometer | df10a87ea7810f3ebf47b7d027e30a8403d89b0f | [
"Apache-2.0"
] | null | null | null | ceilometer/tests/compute/virt/vmware/test_inspector.py | rdo-management/ceilometer | df10a87ea7810f3ebf47b7d027e30a8403d89b0f | [
"Apache-2.0"
] | 3 | 2015-10-08T20:03:36.000Z | 2020-02-05T10:45:50.000Z | # Copyright (c) 2014 VMware, 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... | 39.608434 | 78 | 0.681065 |
841180795de2068473c52cb75a9f59bee1785e80 | 3,091 | py | Python | misc/window_control.py | Madd0g/talon-configs | 0be618cd5185de11c5916b1f6b4f67b67121c3b4 | [
"Unlicense"
] | 7 | 2019-10-13T23:25:06.000Z | 2021-12-01T01:01:58.000Z | misc/window_control.py | Madd0g/talon-configs | 0be618cd5185de11c5916b1f6b4f67b67121c3b4 | [
"Unlicense"
] | null | null | null | misc/window_control.py | Madd0g/talon-configs | 0be618cd5185de11c5916b1f6b4f67b67121c3b4 | [
"Unlicense"
] | 4 | 2020-01-17T19:50:48.000Z | 2022-03-01T05:39:04.000Z | from os import system
from talon.voice import Context, Key, press
from talon import macos, applescript
from ..utils import parse_words_as_integer
ctx = Context("window_control")
def jump_tab(m):
tab_number = parse_words_as_integer(m._words[1:])
if tab_number is not None and tab_number > 0 and tab_number < 9... | 41.213333 | 155 | 0.568424 |
1d0006654e4b55f44be844ea21e9916e4fbad82e | 13,937 | py | Python | ptfce/ptfce.py | drammock/ptfce | 572fd1355b92e05532d57477a460659577a46c23 | [
"BSD-3-Clause"
] | null | null | null | ptfce/ptfce.py | drammock/ptfce | 572fd1355b92e05532d57477a460659577a46c23 | [
"BSD-3-Clause"
] | null | null | null | ptfce/ptfce.py | drammock/ptfce | 572fd1355b92e05532d57477a460659577a46c23 | [
"BSD-3-Clause"
] | null | null | null | '''
Adaptation of the pTFCE algorithm to MEG data.
Probabilistic TFCE (pTFCE) was originally published in:
Spisák T, Spisák Z, Zunhammer M, Bingel U, Smith S, Nichols T, & Kincses T
(2019). Probabilistic TFCE: A generalized combination of cluster size and
voxel intensity to increase statistical power. Neu... | 43.148607 | 79 | 0.683433 |
60719274ac677463051523675119dc1045aa1bff | 386 | py | Python | test.py | TimVan1596/datasetX | 9c124ef02dd8998cca4fdadab34076e157f8a253 | [
"WTFPL"
] | null | null | null | test.py | TimVan1596/datasetX | 9c124ef02dd8998cca4fdadab34076e157f8a253 | [
"WTFPL"
] | null | null | null | test.py | TimVan1596/datasetX | 9c124ef02dd8998cca4fdadab34076e157f8a253 | [
"WTFPL"
] | null | null | null | import h5py
import numpy as np
from matplotlib import pyplot as plt
# # 同序shuffle-按相同顺序打乱两个数组
# def same_shuffle(arr1: list, arr2: list):
# rand_state = np.random.get_state()
# np.random.shuffle(arr1)
# np.random.set_state(rand_state)
# np.random.shuffle(arr2)
# return arr1, arr2
import os
from ur... | 19.3 | 43 | 0.704663 |
0bf73df3fb842a4e73200cd928cc00df14738884 | 273 | py | Python | kYPython/FluentPython/BasicLearn/OOP/Functiontools.py | kyaing/KDYSample | 6a09ef3f7dab18a71187cd81f7da2dd13cf7a4a5 | [
"MIT"
] | 10 | 2017-02-23T07:42:20.000Z | 2017-02-23T07:42:25.000Z | kYPython/FluentPython/BasicLearn/OOP/Functiontools.py | kaideyi/KDYSample | 6a09ef3f7dab18a71187cd81f7da2dd13cf7a4a5 | [
"MIT"
] | null | null | null | kYPython/FluentPython/BasicLearn/OOP/Functiontools.py | kaideyi/KDYSample | 6a09ef3f7dab18a71187cd81f7da2dd13cf7a4a5 | [
"MIT"
] | null | null | null | import functools
def note(func):
"""note function"""
@functools.wraps(func) # 用以消除装饰器带来的副作用
def wrapper():
'''wrapper function'''
print('note something')
return func()
return wrapper
@note
def test():
"""test function"""
print('--test--')
print(help(test))
| 15.166667 | 39 | 0.659341 |
49ef9524d795a19f016013168b8cdebf2260279f | 25,151 | py | Python | TrainingExtensions/torch/src/python/aimet_torch/onnx_utils.py | quic-dkhullar/aimet | 0f7b80193036bdf074e67628122f82fcc324a346 | [
"BSD-3-Clause"
] | null | null | null | TrainingExtensions/torch/src/python/aimet_torch/onnx_utils.py | quic-dkhullar/aimet | 0f7b80193036bdf074e67628122f82fcc324a346 | [
"BSD-3-Clause"
] | null | null | null | TrainingExtensions/torch/src/python/aimet_torch/onnx_utils.py | quic-dkhullar/aimet | 0f7b80193036bdf074e67628122f82fcc324a346 | [
"BSD-3-Clause"
] | null | null | null | # /usr/bin/env python3.5
# -*- mode: python -*-
# =============================================================================
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2017-2020, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modifica... | 42.919795 | 119 | 0.647569 |
5203deb8b3220dc8cdac678223b9685887f03d41 | 3,041 | py | Python | Lib/ctypes/test/test_python_api.py | s-wakaba/bitpacked-cpython | d036e47137907c2b4e416561428f1a3362cc2829 | [
"PSF-2.0"
] | null | null | null | Lib/ctypes/test/test_python_api.py | s-wakaba/bitpacked-cpython | d036e47137907c2b4e416561428f1a3362cc2829 | [
"PSF-2.0"
] | null | null | null | Lib/ctypes/test/test_python_api.py | s-wakaba/bitpacked-cpython | d036e47137907c2b4e416561428f1a3362cc2829 | [
"PSF-2.0"
] | null | null | null | from ctypes import *
import unittest, sys
from test import support
################################################################
# This section should be moved into ctypes\__init__.py, when it's ready.
from _ctypes import PyObj_FromPtr
################################################################
from sys imp... | 33.417582 | 90 | 0.640908 |
f0eec0d047f0249799fd545c3dc70110a14a78e5 | 3,877 | py | Python | Pythonfile/game.py | panzermeow/Board-Game-Art-of-statecraft | 7cbd4ceb561f406f0c63b88cf45f354169532d10 | [
"Apache-2.0"
] | null | null | null | Pythonfile/game.py | panzermeow/Board-Game-Art-of-statecraft | 7cbd4ceb561f406f0c63b88cf45f354169532d10 | [
"Apache-2.0"
] | null | null | null | Pythonfile/game.py | panzermeow/Board-Game-Art-of-statecraft | 7cbd4ceb561f406f0c63b88cf45f354169532d10 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 2 00:03:07 2020
@author: Tianyang Yu
"""
import factory as fac
import pop
import numpy as np
import re
import country as c
name=['USA']
country=[]
def load_country():
for i in range(len(name)):
temp=c.Country()
#basic info
print("-"*20)
... | 41.688172 | 92 | 0.606139 |
0475fe201cc60ac9e3f1894049096a4113a8ed38 | 593 | py | Python | Arquivo/2020-2/2020-2-uff-lrp/provas/2021-p1/q4.py | joaog314/uff-projects | 417895d5b7c6fd88e9c67c925e7c6a4abb6bb6f4 | [
"MIT"
] | null | null | null | Arquivo/2020-2/2020-2-uff-lrp/provas/2021-p1/q4.py | joaog314/uff-projects | 417895d5b7c6fd88e9c67c925e7c6a4abb6bb6f4 | [
"MIT"
] | null | null | null | Arquivo/2020-2/2020-2-uff-lrp/provas/2021-p1/q4.py | joaog314/uff-projects | 417895d5b7c6fd88e9c67c925e7c6a4abb6bb6f4 | [
"MIT"
] | null | null | null | entr = list(map(int, input().split()))
values = list(map(int, input().split()))
if (1 <= entr[0] <= 1000) and (1 <= entr[1] <= 100):
count = 0
# print(values[i:i+2])
while values != [entr[1]]*len(values):
for i in range(len(values)):
while values[i] != entr[1]:
if val... | 32.944444 | 67 | 0.438449 |
b0243e8ab59af6cac8d13ffc5a0e3262c1c703b0 | 37 | py | Python | venv/lib/python3.6/encodings/cp861.py | JamesMusyoka/Blog | fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5 | [
"Unlicense"
] | 2 | 2019-04-17T13:35:50.000Z | 2021-12-21T00:11:36.000Z | venv/lib/python3.6/encodings/cp861.py | JamesMusyoka/Blog | fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5 | [
"Unlicense"
] | 2 | 2021-03-31T19:51:24.000Z | 2021-06-10T23:05:09.000Z | venv/lib/python3.6/encodings/cp861.py | JamesMusyoka/Blog | fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5 | [
"Unlicense"
] | 2 | 2019-10-01T08:47:35.000Z | 2020-07-11T06:32:16.000Z | /usr/lib/python3.6/encodings/cp861.py | 37 | 37 | 0.810811 |
e6247bbec150f12c0afddaa324046418eb992d6e | 10,152 | py | Python | pak/datasets/UMPM.py | jutanke/pak | 6f3be954ef68804ebe622cafe46f033ccf6eb2e7 | [
"MIT"
] | 20 | 2018-09-19T06:52:01.000Z | 2020-10-02T11:18:00.000Z | pak/datasets/UMPM.py | justayak/pak | 6f3be954ef68804ebe622cafe46f033ccf6eb2e7 | [
"MIT"
] | 2 | 2017-11-16T21:42:54.000Z | 2018-03-12T19:31:03.000Z | pak/datasets/UMPM.py | justayak/pak | 6f3be954ef68804ebe622cafe46f033ccf6eb2e7 | [
"MIT"
] | 3 | 2020-01-12T08:51:09.000Z | 2020-10-06T05:47:24.000Z | from pak.datasets.Dataset import Dataset
import numpy as np
from pak import utils
from pak.util import download, unzip
from os import makedirs, listdir
from os.path import join, isfile, isdir, exists, splitext
import time
import cv2
import json
import c3d
class UMPM:
""" Utrecht Multi-Person Motion Benchmark
... | 32.854369 | 95 | 0.476753 |
e5e0437a2714beb57f4638fd1e0e30d08df6258a | 21,885 | py | Python | tests/unit/compile/test_serialization.py | iconix/flambe | 939e28853ece75094ae9335e3d10e3821235a97a | [
"MIT"
] | null | null | null | tests/unit/compile/test_serialization.py | iconix/flambe | 939e28853ece75094ae9335e3d10e3821235a97a | [
"MIT"
] | null | null | null | tests/unit/compile/test_serialization.py | iconix/flambe | 939e28853ece75094ae9335e3d10e3821235a97a | [
"MIT"
] | null | null | null | import pytest
import tempfile
from collections import abc, OrderedDict
import os
import pprint
import torch
import dill
from ruamel.yaml.compat import StringIO
from ruamel.yaml import YAML
# from flambe.compile import yaml
from flambe import Component, save_state_to_file, load_state_from_file, load, save
from flambe.... | 35.412621 | 370 | 0.665661 |
abf57b0733da8ccb4e9af88912cc415419a9fb91 | 1,881 | py | Python | samples/openapi3/client/petstore/python-experimental/test/test_user_api.py | therockstorm/openapi-generator | 01d0b5d4780ebe2d6025e2b443ec136c6ce16c45 | [
"Apache-2.0"
] | 11,868 | 2018-05-12T02:58:07.000Z | 2022-03-31T21:19:39.000Z | samples/openapi3/client/petstore/python-experimental/test/test_user_api.py | therockstorm/openapi-generator | 01d0b5d4780ebe2d6025e2b443ec136c6ce16c45 | [
"Apache-2.0"
] | 9,672 | 2018-05-12T14:25:43.000Z | 2022-03-31T23:59:30.000Z | samples/openapi3/client/petstore/python-experimental/test/test_user_api.py | therockstorm/openapi-generator | 01d0b5d4780ebe2d6025e2b443ec136c6ce16c45 | [
"Apache-2.0"
] | 4,776 | 2018-05-12T12:06:08.000Z | 2022-03-31T19:52:51.000Z | # coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
... | 21.62069 | 174 | 0.611377 |
2c35f64cb93e34800b4b37edd7c579265808728e | 535 | py | Python | MortgageCalculator.py | Xzya/CodeAbbeySolutions | 0a37eb246c24c1d74a6ff6c2ccf525444c5e787a | [
"MIT"
] | 2 | 2021-07-25T13:41:48.000Z | 2022-03-02T21:07:39.000Z | MortgageCalculator.py | Xzya/CodeAbbeySolutions | 0a37eb246c24c1d74a6ff6c2ccf525444c5e787a | [
"MIT"
] | null | null | null | MortgageCalculator.py | Xzya/CodeAbbeySolutions | 0a37eb246c24c1d74a6ff6c2ccf525444c5e787a | [
"MIT"
] | 5 | 2015-10-29T16:11:43.000Z | 2022-03-13T12:50:32.000Z | ##input
# 3800000 5 108
##answer
# 43766
def binary_search(P, R, L, xmin, xmax):
if xmax <= xmin:
return None
x = (xmax + xmin) / 2
newP = P
for i in range(0, L):
temp = (x - (newP * (R/12/100)))
newP -= temp
if newP < -1e-7:
return binary_search(P, R, L, xmin, x)
elif newP > 1e-7:
r... | 16.71875 | 47 | 0.547664 |
51ec6c9cd56a69b97331386663815f64aa470250 | 10,096 | py | Python | lib/galaxy/webapps/reports/controllers/system.py | julozi/galaxy | 90d9da03975f254ac128747cd04532c3595d6155 | [
"CC-BY-3.0"
] | 2 | 2017-03-28T12:11:41.000Z | 2017-04-22T02:58:25.000Z | lib/galaxy/webapps/reports/controllers/system.py | userssss/galaxy | 9662164ad68b39adf5a5606a7aa8e388f6a79f1e | [
"CC-BY-3.0"
] | 2 | 2019-04-03T15:37:17.000Z | 2019-04-03T19:37:09.000Z | lib/galaxy/webapps/reports/controllers/system.py | userssss/galaxy | 9662164ad68b39adf5a5606a7aa8e388f6a79f1e | [
"CC-BY-3.0"
] | 1 | 2020-06-30T17:53:16.000Z | 2020-06-30T17:53:16.000Z | import logging
import os
import subprocess
from datetime import datetime, timedelta
from decimal import Decimal
from sqlalchemy import and_, desc, false, null, true
from sqlalchemy.orm import eagerload
from galaxy import model, util
from galaxy.webapps.base.controller import BaseUIController, web
log = logging.getLo... | 47.17757 | 184 | 0.571513 |
e0fa38e2ffe41ef585bec85131d0bf6d201d03d8 | 27,215 | py | Python | chainer_/chainercv2/models/preresnet.py | naviocean/imgclsmob | f2993d3ce73a2f7ddba05da3891defb08547d504 | [
"MIT"
] | 2,649 | 2018-08-03T14:18:00.000Z | 2022-03-31T08:08:17.000Z | chainer_/chainercv2/models/preresnet.py | naviocean/imgclsmob | f2993d3ce73a2f7ddba05da3891defb08547d504 | [
"MIT"
] | 95 | 2018-08-13T01:46:03.000Z | 2022-03-13T08:38:14.000Z | chainer_/chainercv2/models/preresnet.py | naviocean/imgclsmob | f2993d3ce73a2f7ddba05da3891defb08547d504 | [
"MIT"
] | 549 | 2018-08-06T08:09:22.000Z | 2022-03-31T08:08:21.000Z | """
PreResNet for ImageNet-1K, implemented in Chainer.
Original paper: 'Identity Mappings in Deep Residual Networks,' https://arxiv.org/abs/1603.05027.
"""
__all__ = ['PreResNet', 'preresnet10', 'preresnet12', 'preresnet14', 'preresnetbc14b', 'preresnet16', 'preresnet18_wd4',
'preresnet18_wd2', 'pre... | 33.765509 | 120 | 0.610766 |
31c9acf21df88f17daf0cd37b134e06ba5fda37f | 3,457 | py | Python | purity_fb/purity_fb_1dot8/models/bucket_post.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 5 | 2017-09-08T20:47:22.000Z | 2021-06-29T02:11:05.000Z | purity_fb/purity_fb_1dot8/models/bucket_post.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 16 | 2017-11-27T20:57:48.000Z | 2021-11-23T18:46:43.000Z | purity_fb/purity_fb_1dot8/models/bucket_post.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 22 | 2017-10-13T15:33:05.000Z | 2021-11-08T19:56:21.000Z | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.8 Python SDK
Pure Storage FlashBlade REST 1.8 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.8
Contact: i... | 28.105691 | 204 | 0.571594 |
964ca923951de274dfe53a7e2f914e9fbe8e0dc3 | 1,569 | py | Python | protlearn/features/tests/test_atc.py | tadorfer/ProtClass | da1a01ea9abd3c367b3389dfed683c6a9dfa6afd | [
"MIT"
] | 24 | 2020-09-17T10:35:44.000Z | 2022-03-09T19:19:01.000Z | protlearn/features/tests/test_atc.py | tadorfer/ProtClass | da1a01ea9abd3c367b3389dfed683c6a9dfa6afd | [
"MIT"
] | 14 | 2020-08-09T18:23:01.000Z | 2020-11-19T05:48:14.000Z | protlearn/features/tests/test_atc.py | tadorfer/ProtClass | da1a01ea9abd3c367b3389dfed683c6a9dfa6afd | [
"MIT"
] | 3 | 2020-03-17T16:43:54.000Z | 2020-08-03T06:10:24.000Z | import pytest
import numpy as np
from ..atc import atc
import pkg_resources
PATH = pkg_resources.resource_filename(__name__, 'test_data/')
def test_atc():
"Test sequence compositions"
# load data
X_list = open(PATH+'multiple.txt').read().splitlines()
X_err = 'AGT2HT9'
# test relative com... | 33.382979 | 75 | 0.6297 |
075c96d633523b239579f75b4b68da4662ad4dfc | 369 | py | Python | Script/Commands/Messages/Creators/refresh_dbl.py | PowerEvolved/Clash-Of-Clans-Discord-Bot | 3c2c534c85d314e3cf35786220a49b1d563b022f | [
"BSD-3-Clause"
] | 7 | 2021-12-01T13:49:34.000Z | 2022-03-02T08:27:09.000Z | Script/Commands/Messages/Creators/refresh_dbl.py | BilouKass/Clash-Of-Clans-Discord-Bot | 4dad2349581e2be1c2280b9f8bd4070777db1ef4 | [
"BSD-3-Clause"
] | null | null | null | Script/Commands/Messages/Creators/refresh_dbl.py | BilouKass/Clash-Of-Clans-Discord-Bot | 4dad2349581e2be1c2280b9f8bd4070777db1ef4 | [
"BSD-3-Clause"
] | 5 | 2021-05-01T14:26:20.000Z | 2022-02-13T19:10:15.000Z | # Refreshes the top.gg guilds count
from Script.Clients.discord_client import Clash_info
from Script.Clients.top_gg_client import Dbl_client
from Script.import_emojis import Emojis
async def refresh_dbl(ctx):
await Dbl_client.post_guild_count(len(Clash_info.guilds))
await ctx.send(str(Emojis["Yes"]) + " (htt... | 30.75 | 83 | 0.783198 |
6edfe761dab7c4b5c1e39ab061892719a5b31c8e | 3,035 | py | Python | 02_data_types/05_dictionaries.py | twiindan/selenium_lessons | 798557e8f584f9e6655414c13f232017483f0439 | [
"Apache-2.0"
] | null | null | null | 02_data_types/05_dictionaries.py | twiindan/selenium_lessons | 798557e8f584f9e6655414c13f232017483f0439 | [
"Apache-2.0"
] | null | null | null | 02_data_types/05_dictionaries.py | twiindan/selenium_lessons | 798557e8f584f9e6655414c13f232017483f0439 | [
"Apache-2.0"
] | 1 | 2020-07-16T09:49:47.000Z | 2020-07-16T09:49:47.000Z | #-*- coding: utf-8 -*-
'''
MOD 06: Dictionaries
'''
spam = {"one": 1, "two": 2, "three": 3} # This is a dictionary
print(spam)
print(type(spam))
eggs = {1: "one",
2: "two",
3: "three"} # Again, no problem with multiline declaration
print(eggs)
# Still more ways to declare dictionaries
spam = di... | 33.351648 | 114 | 0.519934 |
9cf3f1064905620aa8b88c5853177db16fa47b1c | 1,648 | py | Python | models/body_80_200.py | VisualComputingInstitute/BiternionNets-ROS | f29aca8d761d453ccef372d648a805aec7347091 | [
"MIT"
] | 12 | 2016-04-19T13:24:59.000Z | 2021-06-02T10:32:00.000Z | models/body_80_200.py | VisualComputingInstitute/BiternionNets-ROS | f29aca8d761d453ccef372d648a805aec7347091 | [
"MIT"
] | 4 | 2016-02-28T21:48:07.000Z | 2018-10-28T15:59:26.000Z | models/body_80_200.py | VisualComputingInstitute/BiternionNets-ROS | f29aca8d761d453ccef372d648a805aec7347091 | [
"MIT"
] | 8 | 2016-08-29T13:17:11.000Z | 2020-08-18T08:21:40.000Z | import cv2
import numpy as np
import DeepFried2 as df
from lbtoolbox.augmentation import AugmentationPipeline, Cropper
from df_extras import Flatten, Biternion
def mknet():
return df.Sequential( # 184x76
df.SpatialConvolution( 3, 24, (3, 3)), # 182x74
df.BatchNormalization(24),
df.R... | 28.912281 | 64 | 0.614684 |
d1384a9fb6af37634f385a2ab572ff2eae912757 | 1,401 | py | Python | Chapter 13/cell_transpose.py | ostin-r/automate-boring-stuff-solutions | 78f0a2981e6520ff2907285e666168a0f35eba02 | [
"FTL"
] | 4 | 2021-06-14T10:37:58.000Z | 2021-12-30T17:49:17.000Z | Chapter 13/cell_transpose.py | ostin-r/automate-boring-stuff-solutions | 78f0a2981e6520ff2907285e666168a0f35eba02 | [
"FTL"
] | null | null | null | Chapter 13/cell_transpose.py | ostin-r/automate-boring-stuff-solutions | 78f0a2981e6520ff2907285e666168a0f35eba02 | [
"FTL"
] | 1 | 2021-07-29T15:26:54.000Z | 2021-07-29T15:26:54.000Z | '''
Austin Richards 3/26/21
cell_transpose.py transposes all columns in a sheet
'''
import os
import logging as log
import openpyxl as xl
from openpyxl.utils import get_column_letter
log.basicConfig(level=log.DEBUG, format='%(asctime)s : %(message)s')
def transpose_all(file):
wb = xl.load_workbook(file)
she... | 31.840909 | 97 | 0.65596 |
63341e0d5f2f44f6eae40653b0dee466395f719d | 2,928 | py | Python | workshop/forms.py | grinyahoo/wm-django | 1ba221ba989666dba66c45dad9745836f30c42f4 | [
"MIT"
] | null | null | null | workshop/forms.py | grinyahoo/wm-django | 1ba221ba989666dba66c45dad9745836f30c42f4 | [
"MIT"
] | 5 | 2020-06-05T23:30:58.000Z | 2022-02-10T08:27:50.000Z | workshop/forms.py | grinyahoo/wm-django | 1ba221ba989666dba66c45dad9745836f30c42f4 | [
"MIT"
] | null | null | null | import datetime
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit
from django import forms
from django.contrib.auth.forms import AuthenticationForm
from .models import Customer, Employee, Vehicle, Task, Invoice
# TODO: make timezone aware
YEARS = tuple((x... | 30.5 | 115 | 0.587773 |
fcc1b2fe3e3da21504f7936a796d802b35286ea4 | 7,653 | py | Python | uos3/configUp/utils.py | aliaksei135/telecommand-server | eb6f23f03ff75a18a5115f3038bb4d4192594627 | [
"MIT"
] | null | null | null | uos3/configUp/utils.py | aliaksei135/telecommand-server | eb6f23f03ff75a18a5115f3038bb4d4192594627 | [
"MIT"
] | null | null | null | uos3/configUp/utils.py | aliaksei135/telecommand-server | eb6f23f03ff75a18a5115f3038bb4d4192594627 | [
"MIT"
] | 1 | 2020-04-22T20:39:49.000Z | 2020-04-22T20:39:49.000Z | import struct
from .models import config
# https://truct.readthedocs.io/en/latest/#example-usage
CONFIG_BYTES_FORMAT_STR = ('?' # CF00 tx_enable 1
'B' # CF01 tx_interval 8
'B' # CF02 tx_interval_downlink 8
'B' # CF03 tx_datarate ... | 48.745223 | 81 | 0.505815 |
11c36fa1b23517bfc79a5c416ec9eb94905bbf1d | 450 | py | Python | export_messages.py | Totskoz/time_counter | 137363c12ceefff7617ba443814bfd0ac336bbf1 | [
"FSFAP"
] | null | null | null | export_messages.py | Totskoz/time_counter | 137363c12ceefff7617ba443814bfd0ac336bbf1 | [
"FSFAP"
] | null | null | null | export_messages.py | Totskoz/time_counter | 137363c12ceefff7617ba443814bfd0ac336bbf1 | [
"FSFAP"
] | null | null | null | # Author: https://github.com/Gugu7264
import os
from discord import Intents
from discord.ext import commands
from dotenv import load_dotenv
load_dotenv("dev.env")
client = commands.Bot(command_prefix=os.getenv("prefix"), intents=Intents.all())
@bot.command()
async def copy(ctx):
with open("file.txt", "w") as ... | 21.428571 | 80 | 0.691111 |
56167d38f9283a0673c5644999af6e2ea1b39529 | 415 | py | Python | olc_webportalv2/cowbat/migrations/0014_sequencingrun_progress.py | OLC-Bioinformatics/olc_genomics_portal | d70ec669a3a49106f8290fff5dee089726259a23 | [
"MIT"
] | 3 | 2019-01-03T21:22:21.000Z | 2019-04-23T15:47:29.000Z | olc_webportalv2/cowbat/migrations/0014_sequencingrun_progress.py | OLC-Bioinformatics/olc_genomics_portal | d70ec669a3a49106f8290fff5dee089726259a23 | [
"MIT"
] | 49 | 2019-01-03T18:15:12.000Z | 2022-03-11T23:37:20.000Z | olc_webportalv2/cowbat/migrations/0014_sequencingrun_progress.py | OLC-Bioinformatics/olc_webportalv2 | d70ec669a3a49106f8290fff5dee089726259a23 | [
"MIT"
] | 58 | 2019-01-03T21:21:59.000Z | 2021-11-02T18:00:20.000Z | # Generated by Django 2.1.5 on 2019-09-06 14:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cowbat', '0013_auto_20190823_1932'),
]
operations = [
migrations.AddField(
model_name='sequencingrun',
name='progres... | 21.842105 | 73 | 0.614458 |
a1719eda6c997d015daa0c5453cf88f63315b391 | 25,973 | py | Python | atnresilience/create_atn_db.py | TimKrash/airport-viz | 9a56ae2fd6c7dcc508ca722120e8d5860860d816 | [
"Unlicense"
] | null | null | null | atnresilience/create_atn_db.py | TimKrash/airport-viz | 9a56ae2fd6c7dcc508ca722120e8d5860860d816 | [
"Unlicense"
] | null | null | null | atnresilience/create_atn_db.py | TimKrash/airport-viz | 9a56ae2fd6c7dcc508ca722120e8d5860860d816 | [
"Unlicense"
] | null | null | null | import os
from datetime import datetime as datetime
from sqlalchemy import create_engine
import sqlite3
import pandas as pd
# print(os.getcwd())
import db_tools as DBTools
# if __name__ == "__main__":
# import db_tools as DBTools
# else:
# import atnresilience.db_tools as DBTools
class ATNLoader(DBTools.DB... | 43.43311 | 1,095 | 0.607015 |
7a46d83e076f7f70f0864eb6b75d7462a1145964 | 241 | py | Python | setup.py | deeplego/wl-graph-kernels | ea046737f91017380090cb8d061efc1a44fefb5e | [
"MIT"
] | 20 | 2019-05-29T20:57:36.000Z | 2021-08-21T09:32:34.000Z | setup.py | deeplego/wl-graph-kernels | ea046737f91017380090cb8d061efc1a44fefb5e | [
"MIT"
] | null | null | null | setup.py | deeplego/wl-graph-kernels | ea046737f91017380090cb8d061efc1a44fefb5e | [
"MIT"
] | 4 | 2019-05-13T08:08:28.000Z | 2021-08-31T14:31:14.000Z | from setuptools import setup, find_packages
from wlkernel import __version__
setup(
name='wlkernel',
version=__version__,
description='Weisfeiler-Lehman kernel for RDF graphs',
packages=find_packages(exclude=['tests']),
)
| 20.083333 | 58 | 0.746888 |
c8e1833c8f013907afb20925decef986ee144f05 | 28,233 | py | Python | flexget/plugins/clients/deluge.py | vxcamiloxv/Flexget | f18e53b59b768515d8e67464b8cc41bddfc00c33 | [
"MIT"
] | null | null | null | flexget/plugins/clients/deluge.py | vxcamiloxv/Flexget | f18e53b59b768515d8e67464b8cc41bddfc00c33 | [
"MIT"
] | null | null | null | flexget/plugins/clients/deluge.py | vxcamiloxv/Flexget | f18e53b59b768515d8e67464b8cc41bddfc00c33 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
import base64
import re
import sys
import logging
import os
import time
from flexget import plugin
from flexget.entry import Entry
from flexget.event import event
from f... | 48.344178 | 118 | 0.533489 |
cf6c421c8bd1e1c3830f0d0e47cd7f4d4eb08d07 | 102 | py | Python | buildout/build.py | Hejtman/astro-empires | c334e9aa8b9c6eab183f9b0fd98eb042f7b7ab79 | [
"MIT"
] | null | null | null | buildout/build.py | Hejtman/astro-empires | c334e9aa8b9c6eab183f9b0fd98eb042f7b7ab79 | [
"MIT"
] | null | null | null | buildout/build.py | Hejtman/astro-empires | c334e9aa8b9c6eab183f9b0fd98eb042f7b7ab79 | [
"MIT"
] | null | null | null | import json
from game import Game
game = Game(85, 4, 4, 3, 1, 1, 'J14:54:16:41')
game.save('data')
| 12.75 | 46 | 0.627451 |
a1fdc3690ad865dd91536275f04e0ca895b3ae1f | 739 | py | Python | gammapy/scripts/tests/test_all.py | joleroi/gammapy | c4e0c4bd74c79d30e0837559d18b7a1a269f70d9 | [
"BSD-3-Clause"
] | null | null | null | gammapy/scripts/tests/test_all.py | joleroi/gammapy | c4e0c4bd74c79d30e0837559d18b7a1a269f70d9 | [
"BSD-3-Clause"
] | null | null | null | gammapy/scripts/tests/test_all.py | joleroi/gammapy | c4e0c4bd74c79d30e0837559d18b7a1a269f70d9 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from astropy.tests.helper import pytest
from ...utils.scripts import get_all_main_functions
SCRIPTS = get_all_main_functions()
NAMES = sorted(SCRI... | 32.130435 | 66 | 0.687415 |
0cc981f379c03f59861f1c601da5a2e1adc407ca | 193 | py | Python | versions/extra_editions/Aquaman/documentation/gen_a_quick_passwd.py | flipchan/LayerProx | 345e6905b8f36b3a11e096d6c3a73ea0ebf69b24 | [
"Apache-2.0"
] | 13 | 2016-09-28T23:59:25.000Z | 2021-06-28T00:55:08.000Z | extra_editions/Aquaman/documentation/gen_a_quick_passwd.py | flipchan/LayerProx | 345e6905b8f36b3a11e096d6c3a73ea0ebf69b24 | [
"Apache-2.0"
] | 1 | 2016-10-11T17:40:33.000Z | 2016-10-11T17:40:33.000Z | versions/extra_editions/Aquaman/documentation/gen_a_quick_passwd.py | flipchan/LayerProx | 345e6905b8f36b3a11e096d6c3a73ea0ebf69b24 | [
"Apache-2.0"
] | 1 | 2016-10-10T16:18:41.000Z | 2016-10-10T16:18:41.000Z | from os import urandom
import base64
mynumber = 81 #change this if needed
myl = base64.b64encode(urandom(mynumber))
print 'ur generated key with ' + str(mynumber) + 'chars is: ' + str(myl)
| 21.444444 | 73 | 0.720207 |
50f34754a53d360aea5e567f709d9137869e1a13 | 215 | py | Python | Tools/grmm/lib/jython/Lib/test/bugs/pr235.py | arne-cl/codra-rst-parser | a03631aace2146da2fed0c0c8f0a3fe1c8c5483d | [
"Apache-2.0"
] | 8 | 2016-11-24T09:38:31.000Z | 2021-04-23T13:04:48.000Z | Tools/grmm/lib/jython/Lib/test/bugs/pr235.py | arne-cl/codra-rst-parser | a03631aace2146da2fed0c0c8f0a3fe1c8c5483d | [
"Apache-2.0"
] | 1 | 2019-01-16T00:58:12.000Z | 2019-12-30T14:33:16.000Z | Tools/grmm/lib/jython/Lib/test/bugs/pr235.py | arne-cl/codra-rst-parser | a03631aace2146da2fed0c0c8f0a3fe1c8c5483d | [
"Apache-2.0"
] | 4 | 2018-12-04T12:21:05.000Z | 2021-02-05T08:00:14.000Z | # PR#235, JPython crashes (i.e. uncaught Java exception) under strange
# (illegal) input.
bogus = '''\
def f(x, z, x):
pass
f(y=1)
'''
try:
compile(bogus, '<string>', 'exec')
except SyntaxError:
pass
| 14.333333 | 70 | 0.609302 |
87551a19d18c033111d6b47a06ccc05e2ab9a537 | 46 | py | Python | test/declare.py | CHUNHUNGFAN/Course_Social_Network_Novel | fe85ffe6ba7213e4b5a7878554184f1728899694 | [
"MIT"
] | null | null | null | test/declare.py | CHUNHUNGFAN/Course_Social_Network_Novel | fe85ffe6ba7213e4b5a7878554184f1728899694 | [
"MIT"
] | 5 | 2021-03-10T12:17:57.000Z | 2022-02-27T01:52:58.000Z | test/declare.py | CHUNHUNGFAN/Course_Social_Network_Novel | fe85ffe6ba7213e4b5a7878554184f1728899694 | [
"MIT"
] | null | null | null | #%%
a = [[0]]*8
print(a)
print(a[0][0])
# %%
| 6.571429 | 14 | 0.369565 |
035bfb65e0a828f8b236e090904c6c55c7396c2b | 10,214 | py | Python | pictobot/keyboards.py | baychimo/pictobot | 05b42e7e5875e10aa911f546889b5d6d2ea87ac5 | [
"MIT"
] | 1 | 2022-03-27T20:44:25.000Z | 2022-03-27T20:44:25.000Z | pictobot/keyboards.py | baychimo/pictobot | 05b42e7e5875e10aa911f546889b5d6d2ea87ac5 | [
"MIT"
] | 16 | 2021-06-01T23:43:58.000Z | 2022-02-13T09:53:38.000Z | pictobot/keyboards.py | baychimo/pictobot | 05b42e7e5875e10aa911f546889b5d6d2ea87ac5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from settings.base import _
from pictograms import *
from collections import OrderedDict
###############################################################################
# INLINE KEYBOARDS #
# Inception of dicts co... | 43.83691 | 79 | 0.488643 |
934bfb8f20d5e5ce4e8df9808021234f616da4a7 | 2,104 | py | Python | asl-api/engine/tensor/custom_CNN.py | ooawagaeri/orbital-asl-application | 4e65306652edd3217eaa097ebe63506a403b2475 | [
"MIT"
] | 2 | 2021-05-29T17:35:13.000Z | 2021-05-29T17:35:14.000Z | asl-api/engine/tensor/custom_CNN.py | ooawagaeri/orbital-asl-application | 4e65306652edd3217eaa097ebe63506a403b2475 | [
"MIT"
] | 1 | 2021-06-18T08:50:26.000Z | 2021-06-18T08:50:26.000Z | asl-api/engine/tensor/custom_CNN.py | ooawagaeri/orbital-asl-application | 4e65306652edd3217eaa097ebe63506a403b2475 | [
"MIT"
] | null | null | null | """
custom_CNN.py
Used to perform / extract features from img via convolution operation(s)
"""
import torch.nn as nn
import torch.nn.functional as func
import joblib
import os
class CustomCNN(nn.Module):
"""
Custom convolution neural network class
Attributes:
conv1 : torch.Conv2d
conv2 : ... | 31.402985 | 85 | 0.601711 |
b74cdb1fdf63f335bfc817a5f880078206c37ca4 | 1,575 | py | Python | metalfi/src/data/meta/importance/dropcolumn.py | CemOezcan/metalfi | d7a071eea0229ce621fa07e3474a26d43bfaac66 | [
"MIT"
] | 2 | 2019-12-05T07:57:14.000Z | 2019-12-05T13:02:08.000Z | metalfi/src/data/meta/importance/dropcolumn.py | CemOezcan/metalfi | d7a071eea0229ce621fa07e3474a26d43bfaac66 | [
"MIT"
] | 31 | 2019-12-05T15:14:47.000Z | 2020-12-04T14:37:46.000Z | metalfi/src/data/meta/importance/dropcolumn.py | CemOezcan/metalfi | d7a071eea0229ce621fa07e3474a26d43bfaac66 | [
"MIT"
] | 1 | 2020-12-04T13:40:11.000Z | 2020-12-04T13:40:11.000Z | from pandas import DataFrame
from rfpimp import *
from sklearn.preprocessing import StandardScaler
from metalfi.src.data.meta.importance.featureimportance import FeatureImportance
class DropColumnImportance(FeatureImportance):
def __init__(self, dataset):
super(DropColumnImportance, self).__init__(datas... | 35.795455 | 108 | 0.688889 |
b6a55027b8fcf91423641f6a6b1afc44ae39060f | 23,744 | py | Python | lale/sklearn_compat.py | gbdrt/lale | 291f824a6b96f088e787979ca768f50d7758424e | [
"Apache-2.0"
] | null | null | null | lale/sklearn_compat.py | gbdrt/lale | 291f824a6b96f088e787979ca768f50d7758424e | [
"Apache-2.0"
] | null | null | null | lale/sklearn_compat.py | gbdrt/lale | 291f824a6b96f088e787979ca768f50d7758424e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 IBM 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 writing, ... | 35.438806 | 128 | 0.628833 |
7c5c46b9c330f3b3fd09e8a030201b58fbccdbe2 | 1,760 | py | Python | nexxT/tests/interface/test_dataSample.py | ifm/nexxT | e697763a940f054287e8d3dc59105377de0ae2f0 | [
"Apache-2.0"
] | 5 | 2020-05-03T10:52:14.000Z | 2022-03-02T10:32:33.000Z | nexxT/tests/interface/test_dataSample.py | ifm/nexxT | e697763a940f054287e8d3dc59105377de0ae2f0 | [
"Apache-2.0"
] | 32 | 2020-05-18T15:49:00.000Z | 2022-02-22T20:10:56.000Z | nexxT/tests/interface/test_dataSample.py | ifm/nexxT | e697763a940f054287e8d3dc59105377de0ae2f0 | [
"Apache-2.0"
] | 2 | 2020-03-21T15:04:46.000Z | 2021-03-01T15:42:49.000Z | # SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2020 ifm electronic gmbh
#
# THE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
#
import logging
import math
import platform
import time
import pytest
from nexxT.interface import DataSample
logging.getLogger(__name__).debug("executing test_dataSample.py... | 33.846154 | 113 | 0.680114 |
f5f8b23bc92ba5faf8f13226381035c99561cf36 | 3,844 | py | Python | scrapers/scrape_so.py | BrianG4/covid_19 | 409258c515a7610afe8ce4d21df862e28ddfcb6a | [
"CC-BY-4.0"
] | null | null | null | scrapers/scrape_so.py | BrianG4/covid_19 | 409258c515a7610afe8ce4d21df862e28ddfcb6a | [
"CC-BY-4.0"
] | null | null | null | scrapers/scrape_so.py | BrianG4/covid_19 | 409258c515a7610afe8ce4d21df862e28ddfcb6a | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
from bs4 import BeautifulSoup
import scrape_common as sc
base_url = 'https://corona.so.ch'
url = f'{base_url}/bevoelkerung/daten/woechentlicher-situationsbericht/'
d = sc.download(url, silent=True)
soup = BeautifulSoup(d, 'html.parser')
pdf_url = soup.find(href... | 39.22449 | 173 | 0.590271 |
d79d3823f2c685ea195f168e283e682f2950590b | 46 | py | Python | huffman/__init__.py | nicktimko/huffman | bfad004ce7951750cc4536ae4466f87afa0f5e5d | [
"MIT"
] | 18 | 2017-03-07T20:00:04.000Z | 2022-03-09T00:22:35.000Z | huffman/__init__.py | nicktimko/huffman | bfad004ce7951750cc4536ae4466f87afa0f5e5d | [
"MIT"
] | 1 | 2018-04-20T14:26:29.000Z | 2018-04-20T14:33:30.000Z | huffman/__init__.py | nicktimko/huffman | bfad004ce7951750cc4536ae4466f87afa0f5e5d | [
"MIT"
] | 5 | 2017-03-30T07:23:19.000Z | 2022-02-01T20:10:08.000Z | from .huffman import *
__version__ = "0.1.2"
| 11.5 | 22 | 0.673913 |
23056e74bc614f0ca5296193fab6f615f544f87d | 19,776 | py | Python | networks/FlowNet2.py | huent189/fast_blind_video_consistency | 0c0c138d60f4b6215c0d7b40d6c58a14b028bcc5 | [
"MIT"
] | null | null | null | networks/FlowNet2.py | huent189/fast_blind_video_consistency | 0c0c138d60f4b6215c0d7b40d6c58a14b028bcc5 | [
"MIT"
] | null | null | null | networks/FlowNet2.py | huent189/fast_blind_video_consistency | 0c0c138d60f4b6215c0d7b40d6c58a14b028bcc5 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torch.nn import init
import math
import numpy as np
try:
from networks.resample2d_package.resample2d import Resample2d
from networks.channelnorm_package.channelnorm import ChannelNorm
from networks import FlowNetC
from networks import FlowNetS
from networks... | 38.251451 | 165 | 0.602043 |
88e5569d75f3f38543cad1824c5bc597eb4ec6fe | 1,336 | py | Python | cwlab/__main__.py | krini-project/CWLab | 7e75cf9c4d00a9defb03802b358d40902f1ffd59 | [
"Apache-2.0"
] | null | null | null | cwlab/__main__.py | krini-project/CWLab | 7e75cf9c4d00a9defb03802b358d40902f1ffd59 | [
"Apache-2.0"
] | null | null | null | cwlab/__main__.py | krini-project/CWLab | 7e75cf9c4d00a9defb03802b358d40902f1ffd59 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
import argparse
def main():
parser = argparse.ArgumentParser(
prog="cwlab",
description='CWLab: A platform-agnostic, cloud-ready framework for simplified' + \
' deployment of the Common Workflow Language using a graphical web interface '
)
... | 27.265306 | 93 | 0.628743 |
732a71f4e594c1de558c63c9322c0ef78b556ae4 | 13,689 | py | Python | wbb/modules/greetings.py | stylishsuryaa/WilliamButcherBotp | 56f0a49239c4e6daf9e004360b31b92254e5dcb1 | [
"MIT"
] | null | null | null | wbb/modules/greetings.py | stylishsuryaa/WilliamButcherBotp | 56f0a49239c4e6daf9e004360b31b92254e5dcb1 | [
"MIT"
] | null | null | null | wbb/modules/greetings.py | stylishsuryaa/WilliamButcherBotp | 56f0a49239c4e6daf9e004360b31b92254e5dcb1 | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2021 TheHamkerCat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... | 34.568182 | 88 | 0.646797 |
6fc170f289ac14925bc9a39a3675375f2a0fb1ed | 873 | bzl | Python | rules/expand_template/hello.bzl | CyberFlameGO/examples | 87a4812cb23f7e7969d74cc073579fb82540c0f6 | [
"Apache-2.0"
] | 572 | 2015-09-02T20:26:41.000Z | 2022-03-30T07:43:22.000Z | rules/expand_template/hello.bzl | CyberFlameGO/examples | 87a4812cb23f7e7969d74cc073579fb82540c0f6 | [
"Apache-2.0"
] | 158 | 2015-08-31T20:21:50.000Z | 2022-03-20T20:13:14.000Z | rules/expand_template/hello.bzl | CyberFlameGO/examples | 87a4812cb23f7e7969d74cc073579fb82540c0f6 | [
"Apache-2.0"
] | 408 | 2015-08-31T20:05:14.000Z | 2022-03-28T02:36:44.000Z | """Generate a file using a template.
It is much more memory-efficient to use a template file than creating the whole
content during the analysis phase.
"""
# Label of the template file to use.
_TEMPLATE = "//expand_template:hello.cc"
def hello(**kwargs):
_hello(
source_file = "{name}.cc".format(**kwargs)... | 24.25 | 79 | 0.608247 |
a077448c1de73d0fb41bc622fda12dc019930bdf | 8,789 | py | Python | pitop/keyboard/vendor/pynput/keyboard/_win32.py | pi-top/pi-top-Python-SDK | 6c83cc5f612d77f86f8d391c7f2924a28f7b1232 | [
"Apache-2.0"
] | 28 | 2020-11-24T08:02:58.000Z | 2022-02-27T18:37:33.000Z | pitop/keyboard/vendor/pynput/keyboard/_win32.py | pi-top/pi-top-Python-SDK | 6c83cc5f612d77f86f8d391c7f2924a28f7b1232 | [
"Apache-2.0"
] | 263 | 2020-11-10T14:35:10.000Z | 2022-03-31T12:35:13.000Z | pitop/keyboard/vendor/pynput/keyboard/_win32.py | pi-top/pi-top-Python-SDK | 6c83cc5f612d77f86f8d391c7f2924a28f7b1232 | [
"Apache-2.0"
] | 1 | 2022-01-31T22:48:35.000Z | 2022-01-31T22:48:35.000Z | # coding=utf-8
# pynput
# Copyright (C) 2015-2018 Moses Palmér
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
... | 30.947183 | 86 | 0.631926 |
1ce576985b5ba0605d70bc72bd302c1c63879004 | 602 | py | Python | test/test_analysis.py | EvilPsyCHo/Deep-Time-Series-Prediction | f6a6da060bb3f7d07f2a61967ee6007e9821064e | [
"Apache-2.0"
] | 334 | 2019-11-01T01:39:18.000Z | 2022-03-31T08:10:17.000Z | test/test_analysis.py | luxixiang/Deep-Time-Series-Prediction | f6a6da060bb3f7d07f2a61967ee6007e9821064e | [
"Apache-2.0"
] | 8 | 2019-12-30T08:01:32.000Z | 2021-12-06T05:27:29.000Z | test/test_analysis.py | luxixiang/Deep-Time-Series-Prediction | f6a6da060bb3f7d07f2a61967ee6007e9821064e | [
"Apache-2.0"
] | 57 | 2020-01-13T13:20:15.000Z | 2022-03-31T08:10:20.000Z | # encoding: utf-8
"""
@author : zhirui zhou
@contact: evilpsycho42@gmail.com
@time : 2020/4/27 15:11
"""
import pytest
from deepseries.analysis import SeriesAnalysisModel
import numpy as np
def test_analysis_model():
x = np.random.rand(4, 500) + 1e-3
x[0][0] = np.nan
x[0][1] = 0
model = SeriesAnalys... | 20.758621 | 57 | 0.671096 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.