hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
debe9e4f5079c1767ee4a5874a12704d9b6439c7 | 808 | py | Python | hackerVote/urls.py | v786/hacker_vote | 7a1af94a99e2c4c2393147784c1acd2bcf0258ee | [
"MIT"
] | null | null | null | hackerVote/urls.py | v786/hacker_vote | 7a1af94a99e2c4c2393147784c1acd2bcf0258ee | [
"MIT"
] | null | null | null | hackerVote/urls.py | v786/hacker_vote | 7a1af94a99e2c4c2393147784c1acd2bcf0258ee | [
"MIT"
] | null | null | null | """hackerVote URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | 35.130435 | 77 | 0.705446 |
3b1f900d24a318773800855a5dd3091b1cf3dfc9 | 3,066 | py | Python | baracus/prepare.py | jelman/baracus | d5d024af2209f91fb384b23bee8273c505f31b91 | [
"Apache-2.0"
] | 8 | 2017-06-26T22:46:09.000Z | 2020-08-28T05:08:34.000Z | baracus/prepare.py | jelman/baracus | d5d024af2209f91fb384b23bee8273c505f31b91 | [
"Apache-2.0"
] | 11 | 2017-06-08T10:19:24.000Z | 2020-05-13T13:11:52.000Z | baracus/prepare.py | jelman/baracus | d5d024af2209f91fb384b23bee8273c505f31b91 | [
"Apache-2.0"
] | 13 | 2017-06-08T10:20:46.000Z | 2022-03-30T22:06:03.000Z | import os
from baracus.utils import run, run_fs_if_not_available
def prepare_fs_data(fs_dir, out_dir, subject):
out_files = downsample_surfs(fs_dir, out_dir, subject)
out_files["aseg" + "_file"] = prepare_aseg(fs_dir, out_dir, subject)
return out_files
def downsample_surfs(fs_dir, out_dir, subject, hem... | 41.432432 | 117 | 0.6197 |
d90be90b5bbf7b1790d03b677d9c9f6a43fcf7a6 | 82,193 | py | Python | torch/quantization/fx/quantization_patterns.py | xiaomengy/pytorch | 5060b69d62943e11f053f8c86b8154a7d009af11 | [
"Intel"
] | 3 | 2019-01-21T12:15:39.000Z | 2019-06-08T13:59:44.000Z | torch/quantization/fx/quantization_patterns.py | BIT-silence/pytorch | 5060b69d62943e11f053f8c86b8154a7d009af11 | [
"Intel"
] | null | null | null | torch/quantization/fx/quantization_patterns.py | BIT-silence/pytorch | 5060b69d62943e11f053f8c86b8154a7d009af11 | [
"Intel"
] | null | null | null | import torch
from torch.fx import GraphModule
from torch.fx.graph import (
Node,
Graph,
)
from torch.quantization import (
default_affine_fixed_qparams_fake_quant,
default_symmetric_fixed_qparams_fake_quant,
)
from ..quantization_mappings import (
get_static_quant_module_class,
get_dynamic_quan... | 48.60615 | 132 | 0.623289 |
a6c381c609a0f46ed1db7b960599e39daf2604ab | 1,436 | py | Python | venv/Lib/site-packages/tests/test_048_FetchTupleBinaryData_02.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_048_FetchTupleBinaryData_02.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_048_FetchTupleBinaryData_02.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | #
# Licensed Materials - Property of IBM
#
# (c) Copyright IBM Corp. 2007-2008
#
import unittest, sys
import ibm_db
import config
from testfunctions import IbmDbTestFunctions
class IbmDbTestCase(unittest.TestCase):
def test_048_FetchTupleBinaryData_02(self):
obj = IbmDbTestFunctions()
obj.assert_expect(s... | 28.156863 | 117 | 0.688022 |
b7453292ffc5d462d75a472e25d11e8f08708731 | 2,785 | py | Python | backend/exc.py | al-indigo/vmemperor | 80eb6d47d839a4736eb6f9d2fcfad35f0a7b3bb1 | [
"Apache-2.0"
] | null | null | null | backend/exc.py | al-indigo/vmemperor | 80eb6d47d839a4736eb6f9d2fcfad35f0a7b3bb1 | [
"Apache-2.0"
] | 8 | 2017-10-11T13:26:10.000Z | 2021-12-13T20:27:52.000Z | backend/exc.py | ispras/vmemperor | 80eb6d47d839a4736eb6f9d2fcfad35f0a7b3bb1 | [
"Apache-2.0"
] | 4 | 2017-07-27T12:25:42.000Z | 2018-01-28T02:06:26.000Z | import json
from rethinkdb import RethinkDB
r = RethinkDB()
import tornado.options as opts
__all__ = ['EmperorException',
'XenAdapterException',
'XenAdapterAPIError', 'XenAdapterArgumentError', 'XenAdapterConnectionError',
'AuthenticationException', 'AuthenticationRealmException', 'A... | 31.647727 | 153 | 0.64237 |
2dc9a99e818ef96a36d30df790bace2c18172635 | 4,296 | py | Python | models.py | jbmyre/ip | 99178b3e25b91cdabdbb1e453ad753dd775f773a | [
"MIT"
] | 1 | 2016-11-02T20:32:34.000Z | 2016-11-02T20:32:34.000Z | models.py | jbmyre/ip_manager | 99178b3e25b91cdabdbb1e453ad753dd775f773a | [
"MIT"
] | null | null | null | models.py | jbmyre/ip_manager | 99178b3e25b91cdabdbb1e453ad753dd775f773a | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.db.models.signals import post_save
class Subnet(models.Model):
STATIC = 'Static'
DHCP = 'DHCP'
name = models.CharField(
verbose_name="Subnet Name",
max_length=100
)
vlan = models.IntegerField(
... | 22.259067 | 80 | 0.583333 |
68e5866b35ae2616b3079c3221dd469bcee91f16 | 12,020 | py | Python | tests/_server_test.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | tests/_server_test.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | tests/_server_test.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | # from __future__ import print_function
import argparse
import os
import pathlib
from pprint import pprint
import grpc
from d3m import utils as d3m_utils, runtime as runtime_module
from d3m.metadata import problem as problem_module
from ta3ta2_api import core_pb2, core_pb2_grpc, value_pb2, utils
from axolotl.utils i... | 31.302083 | 117 | 0.717138 |
c35a1659aff0b7a706eb906ded01bb6281a11109 | 116 | py | Python | __init__.py | anglebinbin/Barista-tool | 2d51507fb3566881923f0b273127f59d23ed317f | [
"MIT"
] | 1 | 2020-02-11T19:05:17.000Z | 2020-02-11T19:05:17.000Z | __init__.py | anglebinbin/Barista-tool | 2d51507fb3566881923f0b273127f59d23ed317f | [
"MIT"
] | null | null | null | __init__.py | anglebinbin/Barista-tool | 2d51507fb3566881923f0b273127f59d23ed317f | [
"MIT"
] | null | null | null | # required for providing correct package import, see https://stackoverflow.com/questions/448271/what-is-init-py-for
| 58 | 115 | 0.810345 |
fad79b5ded46394dfd6cd98da41e75a080dcd875 | 17,067 | py | Python | packages/python/plotly/plotly/tests/test_optional/test_px/test_px_functions.py | adehad/plotly.py | bca292530c400c61e8b7f8a6571262a9dde43ee3 | [
"MIT"
] | 1 | 2021-10-08T18:37:36.000Z | 2021-10-08T18:37:36.000Z | packages/python/plotly/plotly/tests/test_optional/test_px/test_px_functions.py | adehad/plotly.py | bca292530c400c61e8b7f8a6571262a9dde43ee3 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/tests/test_optional/test_px/test_px_functions.py | adehad/plotly.py | bca292530c400c61e8b7f8a6571262a9dde43ee3 | [
"MIT"
] | null | null | null | import plotly.express as px
import plotly.graph_objects as go
from numpy.testing import assert_array_equal
import numpy as np
import pandas as pd
import pytest
def _compare_figures(go_trace, px_fig):
"""Compare a figure created with a go trace and a figure created with
a px function call. Check that all value... | 34.271084 | 88 | 0.576786 |
33af7bca94df4bd7c6d4b1304c2512f85d9ab759 | 3,317 | py | Python | sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.779412 | 180 | 0.700935 |
51d0bd367f395a42963328f02eb81555b11d6930 | 72,935 | py | Python | venv/lib/python2.7/site-packages/pyramid/tests/test_viewderivers.py | bhavul/GIDS-Endurance-Hacker-Puzzle | 78b057b9158e7e818de833f1fd91c7f5d598ac8a | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/pyramid/tests/test_viewderivers.py | bhavul/GIDS-Endurance-Hacker-Puzzle | 78b057b9158e7e818de833f1fd91c7f5d598ac8a | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/pyramid/tests/test_viewderivers.py | bhavul/GIDS-Endurance-Hacker-Puzzle | 78b057b9158e7e818de833f1fd91c7f5d598ac8a | [
"MIT"
] | null | null | null | import unittest
from zope.interface import implementer
from pyramid import testing
from pyramid.exceptions import ConfigurationError
from pyramid.interfaces import (
IResponse,
IRequest,
)
class TestDeriveView(unittest.TestCase):
def setUp(self):
self.config = testing.setUp()
def tearDow... | 40.632312 | 84 | 0.633167 |
2eb1aa285d90f9682ed0aaf0c389501fd4f045ee | 971 | py | Python | blog/urls.py | samiksha-patil/Knowledge-Sharing-Platform | 22e61a659d5ad63fe656fa639dc897cbdebad4fe | [
"bzip2-1.0.6"
] | 1 | 2021-05-09T08:18:49.000Z | 2021-05-09T08:18:49.000Z | blog/urls.py | samiksha-patil/Knowledge-Sharing-Platform | 22e61a659d5ad63fe656fa639dc897cbdebad4fe | [
"bzip2-1.0.6"
] | 9 | 2021-03-19T01:11:35.000Z | 2022-03-12T00:20:13.000Z | blog/urls.py | samiksha-patil/Knowledge-Sharing-Platform | 22e61a659d5ad63fe656fa639dc897cbdebad4fe | [
"bzip2-1.0.6"
] | null | null | null | from django.urls import path
from . import views
from django.conf.urls import url
from .views import PostListView,PostDetailView,PostCreateView,PostUpdateView,PostDeleteView,UserPostListView,UserAnswerListView
urlpatterns = [
path('',PostListView.as_view(),name='blog-home'),
path('post/<int:pk>/',PostDetailVie... | 44.136364 | 127 | 0.729145 |
67185af64e290521a0643af8efc9fd89c4e3e344 | 1,531 | py | Python | sa/profiles/DLink/DVG/ping.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | sa/profiles/DLink/DVG/ping.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | sa/profiles/DLink/DVG/ping.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ---------------------------------------------------------------------
# DLink.DVG.ping
# ---------------------------------------------------------------------
# Copyright (C) 2007-2011 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# Python modules
i... | 31.244898 | 100 | 0.472894 |
9a129b601df40ff4df214bf709dcf1c690cd8c54 | 13,619 | py | Python | appion/bin/pyace2.py | leschzinerlab/myami-3.2-freeHand | 974b8a48245222de0d9cfb0f433533487ecce60d | [
"MIT"
] | null | null | null | appion/bin/pyace2.py | leschzinerlab/myami-3.2-freeHand | 974b8a48245222de0d9cfb0f433533487ecce60d | [
"MIT"
] | null | null | null | appion/bin/pyace2.py | leschzinerlab/myami-3.2-freeHand | 974b8a48245222de0d9cfb0f433533487ecce60d | [
"MIT"
] | 1 | 2019-09-05T20:58:37.000Z | 2019-09-05T20:58:37.000Z | #!/usr/bin/env python
#pythonlib
import os
import re
import sys
import math
import time
import glob
import numpy
import shutil
import subprocess
#appion
from appionlib import apFile
from appionlib import apParam
from appionlib import apImage
from appionlib import apDisplay
from appionlib import apDatabase
from appionl... | 37.414835 | 113 | 0.677363 |
8228e15dc3fca8b2a2bca9452ab2b2c4b3132354 | 225 | py | Python | media_management/media_management/doctype/film_element/test_film_element.py | ashish-greycube/media_management | 1f295b8ca3c54c51f3be2b48d1976c94455767b0 | [
"MIT"
] | null | null | null | media_management/media_management/doctype/film_element/test_film_element.py | ashish-greycube/media_management | 1f295b8ca3c54c51f3be2b48d1976c94455767b0 | [
"MIT"
] | null | null | null | media_management/media_management/doctype/film_element/test_film_element.py | ashish-greycube/media_management | 1f295b8ca3c54c51f3be2b48d1976c94455767b0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, GreyCube Technologies and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestFilmElement(unittest.TestCase):
pass
| 20.454545 | 60 | 0.773333 |
0533b0234631e0a72023c7824a3a4ac5fd6276e5 | 808 | py | Python | medianeg.py | lessen/src | bc09a33d22e942214df5608806b11370e21ce7e8 | [
"MIT"
] | null | null | null | medianeg.py | lessen/src | bc09a33d22e942214df5608806b11370e21ce7e8 | [
"MIT"
] | 1 | 2016-12-28T22:44:52.000Z | 2016-12-28T22:44:52.000Z | medianeg.py | lessen/src | bc09a33d22e942214df5608806b11370e21ce7e8 | [
"MIT"
] | null | null | null | from median import median
from eg import eg
import time
from random import random as r
@eg
def _med():
"pre-sorting lists only really useful for large lists (over 10,000) items"
assert median([1,2,3,4,5]) == 3
assert median([1,2,4,5]) == 3
for pow in range(2,7):
slow=fast=0
for i in range(100):
s... | 26.933333 | 76 | 0.591584 |
1bf623c80050edba6f7926bb1bf182f6216e54e0 | 470 | py | Python | Aulasatualizada/execicio_curso em video/execicio_90_dicionario_em_python.py | swellington231/AulaPaython | 7b72ddec4d85f4660c0c395de07a133993aa2c70 | [
"MIT"
] | null | null | null | Aulasatualizada/execicio_curso em video/execicio_90_dicionario_em_python.py | swellington231/AulaPaython | 7b72ddec4d85f4660c0c395de07a133993aa2c70 | [
"MIT"
] | null | null | null | Aulasatualizada/execicio_curso em video/execicio_90_dicionario_em_python.py | swellington231/AulaPaython | 7b72ddec4d85f4660c0c395de07a133993aa2c70 | [
"MIT"
] | null | null | null | aluno = dict()
aluno['nome'] = str(input('Nome: '))
aluno['média'] = float(input(f'Méida do {aluno["nome"]}: '))
if aluno['média'] >= 7:
aluno['Situação '] = 'Aprovado'
elif 5 <= aluno['média'] < 7:
aluno['Situação'] = 'recuperação'
else:
aluno['Situação'] = 'reprovado'
for k , v in aluno.items():
pri... | 27.647059 | 60 | 0.587234 |
3b118e1063e8bc7eaabd2d0c9af22a9146ed4883 | 135,948 | py | Python | env/lib/python3.6/site-packages/autopep8.py | phoebekaranja/Pitch1 | 6f64b8a330db35af0462ebdb6517cd99da810baa | [
"MIT"
] | null | null | null | env/lib/python3.6/site-packages/autopep8.py | phoebekaranja/Pitch1 | 6f64b8a330db35af0462ebdb6517cd99da810baa | [
"MIT"
] | 6 | 2020-06-05T19:04:55.000Z | 2021-12-13T19:50:25.000Z | virtual/lib/python3.6/site-packages/autopep8.py | LoiseMwarangu/Instagram | 1bb0791a69350e0b9a3d2864d7132c6a605360d7 | [
"MIT"
] | 1 | 2019-01-17T07:17:31.000Z | 2019-01-17T07:17:31.000Z | #!/usr/bin/env python
# Copyright (C) 2010-2011 Hideo Hattori
# Copyright (C) 2011-2013 Hideo Hattori, Steven Myint
# Copyright (C) 2013-2016 Hideo Hattori, Steven Myint, Bill Wendling
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files... | 33.759126 | 79 | 0.554124 |
164b0b6736683c348cfd7260abda065f9fd219eb | 57,827 | py | Python | pyDEA/core/gui_modules/table_gui.py | olga-perederieieva/pyDEA | eac02bac901b9109efb5d6a3841809f70e378912 | [
"MIT"
] | 29 | 2017-10-22T03:03:20.000Z | 2022-03-21T09:15:22.000Z | pyDEA/core/gui_modules/table_gui.py | olga-perederieieva/pyDEA | eac02bac901b9109efb5d6a3841809f70e378912 | [
"MIT"
] | 6 | 2018-07-18T01:40:43.000Z | 2021-04-11T00:38:30.000Z | pyDEA/core/gui_modules/table_gui.py | olga-perederieieva/pyDEA | eac02bac901b9109efb5d6a3841809f70e378912 | [
"MIT"
] | 20 | 2018-01-23T05:50:29.000Z | 2022-02-22T05:04:56.000Z | ''' This module contains classes responsible for displaying input data
in a table (TableFrame and TableFrameWithInputOutputBox).
It also contains many classes necessary for TableFrameWithInputOutputBox.
Attributes:
CELL_WIDTH (int): constant that defined width of a cell in a table
'''
from tkinter ... | 43.186706 | 101 | 0.586473 |
0d1cb2bd13372c70e8d90b7d4a0a7f5ca93d8028 | 1,487 | py | Python | haipproxy-0.1/utils/redis_util.py | sampleCJ/haipproxy | 656f7b1ee884ff20f6b58662b7a80e92c9c7f881 | [
"MIT"
] | 1 | 2018-03-20T09:14:33.000Z | 2018-03-20T09:14:33.000Z | haipproxy-0.1/utils/redis_util.py | sampleCJ/haipproxy | 656f7b1ee884ff20f6b58662b7a80e92c9c7f881 | [
"MIT"
] | null | null | null | haipproxy-0.1/utils/redis_util.py | sampleCJ/haipproxy | 656f7b1ee884ff20f6b58662b7a80e92c9c7f881 | [
"MIT"
] | 1 | 2018-09-08T08:06:54.000Z | 2018-09-08T08:06:54.000Z | import uuid
import time
import redis
from config.settings import (
REDIS_HOST, REDIS_PORT, DEFAULT_REDIS_DB,
REDIS_PASSWORD, LOCKER_PREFIX)
def get_redis_conn(**kwargs):
host = kwargs.get('host', REDIS_HOST)
port = kwargs.get('port', REDIS_PORT)
db = kwargs.get('db', DEFAULT_REDIS_DB)
passwo... | 27.537037 | 71 | 0.631473 |
2d556724ace48fefdd785ad63151add648429fc7 | 6,264 | py | Python | projects/ibsr/config.py | vuhoangminh/medical-segmentation | 4a2a663d1f2d6de5c78bc521f6ed2aa1681a8804 | [
"MIT"
] | 1 | 2018-12-06T09:17:26.000Z | 2018-12-06T09:17:26.000Z | projects/ibsr/config.py | vuhoangminh/medical-segmentation | 4a2a663d1f2d6de5c78bc521f6ed2aa1681a8804 | [
"MIT"
] | null | null | null | projects/ibsr/config.py | vuhoangminh/medical-segmentation | 4a2a663d1f2d6de5c78bc521f6ed2aa1681a8804 | [
"MIT"
] | 2 | 2019-05-07T10:07:33.000Z | 2019-05-20T12:50:37.000Z | config = dict()
config["env"] = "SERVER" # change this to "FULL" if you want to run full
# config["mode"] = "TEST" # change this to "FULL" if you want to run full
config["mode"] = "FULL" # change this to "FULL" if you want to run full
config["data_folders"] = ["data_train", "data_valid"]
# change this if you want to... | 46.058824 | 138 | 0.706258 |
1256290643e8c03c0652e705e96b3a0ff7dfb61b | 741 | py | Python | data-mining/cluster-analysis/assignment/clustering-data/python/main_k_means.py | 4979/courses | dd9efa0a6b60cead833f36a6bfa518dd4fece17f | [
"Apache-2.0"
] | null | null | null | data-mining/cluster-analysis/assignment/clustering-data/python/main_k_means.py | 4979/courses | dd9efa0a6b60cead833f36a6bfa518dd4fece17f | [
"Apache-2.0"
] | null | null | null | data-mining/cluster-analysis/assignment/clustering-data/python/main_k_means.py | 4979/courses | dd9efa0a6b60cead833f36a6bfa518dd4fece17f | [
"Apache-2.0"
] | null | null | null | import sys
from LoadData import *
from k_means import *
from evaluation import *
if __name__ == "__main__":
if len(sys.argv) != 3:
print "[usage] <data-file> <ground-truth-file>"
exit(1)
dataFilename = sys.argv[1]
groundtruthFilename = sys.argv[2]
data = loadPoints(dataFil... | 21.171429 | 55 | 0.608637 |
1b4981087626856baeb84bb50ff45392b851c655 | 473 | py | Python | caluculating_error.py | araj29011998/refjdnsdf | 7dadbc393b061e2b1e671c386572aa469dd80770 | [
"MIT"
] | null | null | null | caluculating_error.py | araj29011998/refjdnsdf | 7dadbc393b061e2b1e671c386572aa469dd80770 | [
"MIT"
] | null | null | null | caluculating_error.py | araj29011998/refjdnsdf | 7dadbc393b061e2b1e671c386572aa469dd80770 | [
"MIT"
] | null | null | null | import pandas as pd
from math import sqrt
from sklearn.metrics import mean_squared_error
#predicted and expected values obtained by implementing ARIMA model code on data set of each user
res=pd.read_csv('predicted_expected_values_for_all_users.csv')
#userid=[x for x in res['userid']]
predicted=[x for x in res... | 31.533333 | 98 | 0.767442 |
17f7cda687dd4e78d7c2979b3a5d49cff66f5202 | 1,340 | py | Python | cleanplots.py | markessien/meplotter | 393af7058530f82c7a37cd13d357021fe5ea87fd | [
"MIT"
] | null | null | null | cleanplots.py | markessien/meplotter | 393af7058530f82c7a37cd13d357021fe5ea87fd | [
"MIT"
] | null | null | null | cleanplots.py | markessien/meplotter | 393af7058530f82c7a37cd13d357021fe5ea87fd | [
"MIT"
] | null | null | null |
debug_file = "/home/mark/.chia/mainnet/log/debug.log"
file = open(debug_file, "r")
def get_file_name(str):
plotpos = str.find(".plot")
return str[:plotpos+5]
files_not_found = []
files_no_pk = []
for line in file:
err = -1
pos = line.find(" Failed to open file ")
if pos > -1:
err = 1... | 24.363636 | 83 | 0.59403 |
ad7b0e1de089fb7456efc881bbb88bbb29e1e2d8 | 2,862 | py | Python | src/setup.py | Oire/TheQube | fcfd8a68b15948e0740642d635db24adef8cc314 | [
"MIT"
] | 21 | 2015-08-02T21:26:14.000Z | 2019-12-27T09:57:44.000Z | src/setup.py | Oire/TheQube | fcfd8a68b15948e0740642d635db24adef8cc314 | [
"MIT"
] | 34 | 2015-01-12T00:38:14.000Z | 2020-08-31T11:19:37.000Z | src/setup.py | Oire/TheQube | fcfd8a68b15948e0740642d635db24adef8cc314 | [
"MIT"
] | 15 | 2015-03-24T15:42:30.000Z | 2020-09-24T20:26:42.000Z | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import py2exe
import shutil
from glob import glob
import os
from logger import logger
logging = logger.getChild("Installer")
name = 'TheQube'
__version__ = 0.9
__author__ = 'Andre Polykanine also known as Menelion Elensúlë'
def get... | 27.519231 | 246 | 0.63522 |
5b37d85fafcc76f3684ecdfea45db41b28935524 | 8,593 | py | Python | TH/forecast_models/LGBM.py | lorenzodonadio/TimeHierarchy | a84693d8f701cd88904313610d863add8b79769f | [
"MIT"
] | 1 | 2021-06-19T16:58:31.000Z | 2021-06-19T16:58:31.000Z | TH/forecast_models/LGBM.py | lorenzodonadio/TimeHierarchy | a84693d8f701cd88904313610d863add8b79769f | [
"MIT"
] | null | null | null | TH/forecast_models/LGBM.py | lorenzodonadio/TimeHierarchy | a84693d8f701cd88904313610d863add8b79769f | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import warnings
from tbats import TBATS
from tqdm import tqdm
from .BaseFuncs import BaseFuncs
from ..utils.regressors import RegLGBM
from lightgbm import LGBMRegressor
import pdb
class ForecastLGBM(BaseFuncs):
def __init__(self,
col_name,
n... | 49.102857 | 125 | 0.509368 |
1b75b21e78d9d4278036883c5d97923a2f0fdaee | 1,825 | py | Python | benchmarks/Evolution/both/evo_tests/fetch_json_tests/html_test_case.py | nuprl/retic_performance | 621211c2f40251ce5364c33e72e4067e34a32013 | [
"MIT"
] | 3 | 2018-08-03T02:41:29.000Z | 2021-03-19T03:18:47.000Z | benchmarks/Evolution/both/evo_tests/fetch_json_tests/html_test_case.py | nuprl/retic_performance | 621211c2f40251ce5364c33e72e4067e34a32013 | [
"MIT"
] | 3 | 2018-02-04T17:53:56.000Z | 2018-11-10T17:06:57.000Z | benchmarks/Evolution/both/evo_tests/fetch_json_tests/html_test_case.py | nuprl/retic_performance | 621211c2f40251ce5364c33e72e4067e34a32013 | [
"MIT"
] | 1 | 2018-08-04T00:14:12.000Z | 2018-08-04T00:14:12.000Z | __author__ = 'Edwin Cowart, Kevin McDonough'
class JSONTestCase:
""" A JSON Test Case
"""
def __init__(self, name=None, in_json=None, out_json=None):
""" Construct a JSON Test Case
:param name: The name of the JSON Test Cases
:type name: String or None
:param in_json: The i... | 30.416667 | 77 | 0.591781 |
b451124b3406d1253972c4c38d5de6ee59f88c18 | 45,032 | py | Python | statsmodels/tsa/statespace/representation.py | o-P-o/statsmodels | ee9f5c0bd7ee7f646bdbaf31fbc295e5a0ab02f8 | [
"BSD-3-Clause"
] | 1 | 2020-06-18T07:38:11.000Z | 2020-06-18T07:38:11.000Z | statsmodels/tsa/statespace/representation.py | o-P-o/statsmodels | ee9f5c0bd7ee7f646bdbaf31fbc295e5a0ab02f8 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/tsa/statespace/representation.py | o-P-o/statsmodels | ee9f5c0bd7ee7f646bdbaf31fbc295e5a0ab02f8 | [
"BSD-3-Clause"
] | null | null | null | """
State Space Representation
Author: Chad Fulton
License: Simplified-BSD
"""
import numpy as np
from .tools import (
find_best_blas_type, validate_matrix_shape, validate_vector_shape
)
from .initialization import Initialization
from . import tools
class OptionWrapper(object):
def __init__(self, mask_attri... | 40.064057 | 79 | 0.583874 |
0c39d2419a0ee61981a3a71ea61a1e0a0a9ccd9e | 12,952 | py | Python | edward/inferences.py | twiecki/edward | 1ac2eeb7f5163915848afd3b027c714255459de3 | [
"Apache-2.0"
] | 4 | 2016-05-09T18:48:21.000Z | 2018-03-01T22:50:42.000Z | edward/inferences.py | twiecki/edward | 1ac2eeb7f5163915848afd3b027c714255459de3 | [
"Apache-2.0"
] | null | null | null | edward/inferences.py | twiecki/edward | 1ac2eeb7f5163915848afd3b027c714255459de3 | [
"Apache-2.0"
] | 3 | 2016-07-05T14:19:08.000Z | 2019-09-04T13:48:59.000Z | from __future__ import print_function
import numpy as np
import tensorflow as tf
from edward.data import Data
from edward.util import kl_multivariate_normal, log_sum_exp
from edward.variationals import PointMass
try:
import prettytensor as pt
except ImportError:
pass
class Inference:
"""
Base class f... | 36.178771 | 90 | 0.603613 |
d202a5abda56b9e3577009497e4e7d84fb8f2c56 | 3,012 | py | Python | tg/handler.py | pandov/myitacademy | e674816f325d68c84b908bf3429fda9b8d14e615 | [
"Apache-2.0"
] | 1 | 2021-08-03T12:30:59.000Z | 2021-08-03T12:30:59.000Z | tg/handler.py | pandov/myitacademy | e674816f325d68c84b908bf3429fda9b8d14e615 | [
"Apache-2.0"
] | null | null | null | tg/handler.py | pandov/myitacademy | e674816f325d68c84b908bf3429fda9b8d14e615 | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
from io import BytesIO
from src.connections import connections
from src.dlib_wrapper import *
from src.utils import *
from pathlib import Path
# detector = dlib_cnn_face_detector()
detector = dlib_face_frontal_detector()
predictor2d = dlib_face_landmarks_predictor()
predictor3d = get_fm_d... | 37.185185 | 112 | 0.64741 |
1e8dff84bf260e37d0a7da4269b967a651c8336e | 147 | py | Python | capitulo-05/ex05.py | bryan-lima/exercicios-livro-introd-prog-python-3ed | b6bc26dced9728510865704a80cb0d97f81f756b | [
"MIT"
] | 3 | 2021-11-09T17:54:10.000Z | 2022-01-30T22:32:25.000Z | capitulo-05/ex05.py | bryan-lima/exercicios-livro-introd-prog-python-3ed | b6bc26dced9728510865704a80cb0d97f81f756b | [
"MIT"
] | null | null | null | capitulo-05/ex05.py | bryan-lima/exercicios-livro-introd-prog-python-3ed | b6bc26dced9728510865704a80cb0d97f81f756b | [
"MIT"
] | null | null | null | # Reescreva o programa anterior para escrever os 10 primeiros múltiplos de 3
lastNumber = 30
n = 3
while n <= lastNumber:
print(n)
n += 3
| 18.375 | 76 | 0.687075 |
7df9ca3daf76852d74d8144f772a538efc1a64f0 | 447 | py | Python | summary.py | TheEvolt/yolo3-pytorch | 4c31e8ab3e619dcd93b9d1dc11b89aa252bca84b | [
"MIT"
] | null | null | null | summary.py | TheEvolt/yolo3-pytorch | 4c31e8ab3e619dcd93b9d1dc11b89aa252bca84b | [
"MIT"
] | null | null | null | summary.py | TheEvolt/yolo3-pytorch | 4c31e8ab3e619dcd93b9d1dc11b89aa252bca84b | [
"MIT"
] | null | null | null | # --------------------------------------------#
# 该部分代码用于看网络结构
# --------------------------------------------#
import torch
from torchsummary import summary
from nets.yolo import YoloBody
if __name__ == "__main__":
# 需要使用device来指定网络在GPU还是CPU运行
device = torch.device("cuda" if torch.cuda.is_availabl... | 31.928571 | 74 | 0.505593 |
a2f4149c89e5e951abb08e29d11c6a259872a1b0 | 13,695 | py | Python | pelita/maze_generator.py | DanBenHa/pelita | 557c3a757a24e0f1abe25f7edf5c4ffee83a077e | [
"BSD-2-Clause"
] | null | null | null | pelita/maze_generator.py | DanBenHa/pelita | 557c3a757a24e0f1abe25f7edf5c4ffee83a077e | [
"BSD-2-Clause"
] | null | null | null | pelita/maze_generator.py | DanBenHa/pelita | 557c3a757a24e0f1abe25f7edf5c4ffee83a077e | [
"BSD-2-Clause"
] | null | null | null | """
Generate maze layouts for 'pelita', without dead ends.
Algorithm:
* start with an empty grid
* draw a wall with gaps, dividing the grid in 2
* repeat recursively for each sub-grid
* find dead ends
* remove a wall at the dead ends
Players 1,3 always start in the bottom left; 2,4 in the top right
Food is placed ran... | 32.147887 | 84 | 0.623512 |
d97485675f99c8ef7071a4e23a53b07780e7c4fa | 881 | py | Python | deeppavlov/core/models/nn_model.py | khakhulin/DeepPavlov | 5f631cc887aa935f2e67b7c65a19c7e777cf7db7 | [
"Apache-2.0"
] | 1 | 2018-07-18T11:50:45.000Z | 2018-07-18T11:50:45.000Z | deeppavlov/core/models/nn_model.py | khakhulin/DeepPavlov | 5f631cc887aa935f2e67b7c65a19c7e777cf7db7 | [
"Apache-2.0"
] | null | null | null | deeppavlov/core/models/nn_model.py | khakhulin/DeepPavlov | 5f631cc887aa935f2e67b7c65a19c7e777cf7db7 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2017 Neural Networks and Deep Learning lab, MIPT
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 a... | 29.366667 | 72 | 0.76504 |
bd5be189c12eb187b2e4b895f42d9ee4e79c85b0 | 1,683 | py | Python | publictitles/resources.py | LandRegistry/public-titles | 1d52e5dd80e4632d98f40356262819bbf5c907ed | [
"MIT"
] | null | null | null | publictitles/resources.py | LandRegistry/public-titles | 1d52e5dd80e4632d98f40356262819bbf5c907ed | [
"MIT"
] | null | null | null | publictitles/resources.py | LandRegistry/public-titles | 1d52e5dd80e4632d98f40356262819bbf5c907ed | [
"MIT"
] | null | null | null | from flask import Response
from flask.ext.restful import Resource, fields, marshal_with, abort, reqparse
from publictitles.models import Title
from publictitles import app, db
class TitleResource(Resource):
resource_fields = { 'title_number': fields.String,
'house_number': ... | 38.25 | 109 | 0.582294 |
077b7075a41e205a16b2d53d41eb915518d3f483 | 4,252 | py | Python | azure-mgmt-dns/azure/mgmt/dns/v2016_04_01/models/record_set.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-dns/azure/mgmt/dns/v2016_04_01/models/record_set.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-dns/azure/mgmt/dns/v2016_04_01/models/record_set.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 49.44186 | 82 | 0.630997 |
50be50c7f3029a8436bff1d8f72cd6fad42340a4 | 6,974 | py | Python | Detector/train.py | ColinWine/Accurate-and-rapid-pulmonary-tuberculosis-diagnosis-system | 7be433b3a495a7c4db2b850a79dc505e413909c4 | [
"Apache-2.0"
] | null | null | null | Detector/train.py | ColinWine/Accurate-and-rapid-pulmonary-tuberculosis-diagnosis-system | 7be433b3a495a7c4db2b850a79dc505e413909c4 | [
"Apache-2.0"
] | null | null | null | Detector/train.py | ColinWine/Accurate-and-rapid-pulmonary-tuberculosis-diagnosis-system | 7be433b3a495a7c4db2b850a79dc505e413909c4 | [
"Apache-2.0"
] | 1 | 2022-02-19T09:07:55.000Z | 2022-02-19T09:07:55.000Z | import os
import sys
import time
import argparse
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'lib'))
# os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" # see issue #152
# os.environ["CUDA_VISIBLE_DEVICES"] = '0'
import numpy as np
import torch.nn as nn
import torch.utils.data
import torch.distributed ... | 38.530387 | 100 | 0.659736 |
22c9daeaa0f648562e27b6593c6954571ab20327 | 2,778 | py | Python | Web App/SignLanguage/detect.py | Aravindhan-G/Sign-Language-Synthesis | 6f306a3055419eedfe0a6e877ee8ee6967cfa06c | [
"MIT"
] | null | null | null | Web App/SignLanguage/detect.py | Aravindhan-G/Sign-Language-Synthesis | 6f306a3055419eedfe0a6e877ee8ee6967cfa06c | [
"MIT"
] | null | null | null | Web App/SignLanguage/detect.py | Aravindhan-G/Sign-Language-Synthesis | 6f306a3055419eedfe0a6e877ee8ee6967cfa06c | [
"MIT"
] | null | null | null | from flask import Blueprint, render_template, Response
import cv2
import time
import pickle
import numpy as np
import mediapipe as mp
detect= Blueprint('detect',__name__)
mp_drawing = mp.solutions.drawing_utils
mp_hands = mp.solutions.hands
drawing_styles = mp.solutions.drawing_styles
mod = pickle.load(op... | 36.077922 | 94 | 0.537077 |
5f3a4f37cf22ce1c6cb864631d290aa8ea0f80d9 | 3,584 | py | Python | 2_ Preprocessing/properties/MissingData.py | DavidStahl97/Predictive-Analytics | c607ef2a5fc2b6654122b0b5ef90cb1a23f88eb0 | [
"MIT"
] | null | null | null | 2_ Preprocessing/properties/MissingData.py | DavidStahl97/Predictive-Analytics | c607ef2a5fc2b6654122b0b5ef90cb1a23f88eb0 | [
"MIT"
] | null | null | null | 2_ Preprocessing/properties/MissingData.py | DavidStahl97/Predictive-Analytics | c607ef2a5fc2b6654122b0b5ef90cb1a23f88eb0 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import missingno as msno
from sklearn.impute import SimpleImputer
import matplotlib.pyplot as plt
def review_data():
# Read csv file into pandas dataframe
propertydata = pd.read_csv("propertydata.csv")
# Print first five rows
print(propertydata.head())
# Pr... | 30.632479 | 118 | 0.681083 |
30b2fcda38e3f910b4f7c7212fb480217de14864 | 301 | py | Python | pytest/mod.py | free31jafar/Zeref | 9cfe9f2e753e6d30d974ced6177080575635e17c | [
"MIT"
] | null | null | null | pytest/mod.py | free31jafar/Zeref | 9cfe9f2e753e6d30d974ced6177080575635e17c | [
"MIT"
] | null | null | null | pytest/mod.py | free31jafar/Zeref | 9cfe9f2e753e6d30d974ced6177080575635e17c | [
"MIT"
] | null | null | null | import pytest
from redbot.core import modlog
__all__ = ["mod"]
@pytest.fixture
def mod(config, monkeypatch):
from redbot.core import Config
with monkeypatch.context() as m:
m.setattr(Config, "get_conf", lambda *args, **kwargs: config)
modlog._init()
return modlog
| 18.8125 | 69 | 0.671096 |
f5ea565ea94ce8fa326d82a47f95a13bd5351fcc | 24,397 | py | Python | 46/swagger_client/api_client.py | apitore/apitore-sdk-python | c0814c5635ddd09e9a20fcb155b62122bee41d33 | [
"Apache-2.0"
] | 3 | 2018-08-21T06:14:33.000Z | 2019-10-18T23:05:50.000Z | 46/swagger_client/api_client.py | apitore/apitore-sdk-python | c0814c5635ddd09e9a20fcb155b62122bee41d33 | [
"Apache-2.0"
] | null | null | null | 46/swagger_client/api_client.py | apitore/apitore-sdk-python | c0814c5635ddd09e9a20fcb155b62122bee41d33 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
WordNet APIs
You can access ALL WordNet DB.<BR />[Endpoint] https://api.apitore.com/api/46 # noqa: E501
OpenAPI spec version: 0.0.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import datetime
import json
import... | 39.223473 | 96 | 0.550519 |
b9a1d22e9b6453c6264fc1b5bf39db08f385a293 | 903 | py | Python | tests/test_auth_refresh_request.py | ConsenSys/mythx-models | e912c2fc6e7d18041310d3b9f0f95085db47ed9b | [
"MIT"
] | 2 | 2019-08-26T13:42:28.000Z | 2019-11-13T15:44:16.000Z | tests/test_auth_refresh_request.py | ConsenSys/mythx-models | e912c2fc6e7d18041310d3b9f0f95085db47ed9b | [
"MIT"
] | 22 | 2019-08-26T13:14:55.000Z | 2021-04-18T14:22:52.000Z | tests/test_auth_refresh_request.py | ConsenSys/mythx-models | e912c2fc6e7d18041310d3b9f0f95085db47ed9b | [
"MIT"
] | 6 | 2019-08-29T15:51:38.000Z | 2021-04-05T11:41:34.000Z | from hypothesis import given
from mythx_models.request import AuthRefreshRequest
from .strategies.auth import auth_refresh_request
@given(auth_refresh_request())
def test_serde(response):
obj = AuthRefreshRequest(**response)
assert obj.dict(by_alias=True) == {
"accessToken": response["accessToken"],... | 28.21875 | 85 | 0.688815 |
c1f12be3bcd3311db12df082f6cefce22b8d31fe | 1,684 | py | Python | j3a-crypter/src/file_worker.py | PraserX/j3a | f98f0cf9f940d9ae9af22cdb6b9e8ec4a8f02367 | [
"MIT"
] | 1 | 2020-04-23T12:09:58.000Z | 2020-04-23T12:09:58.000Z | j3a-crypter/src/file_worker.py | PraserX/j3a | f98f0cf9f940d9ae9af22cdb6b9e8ec4a8f02367 | [
"MIT"
] | null | null | null | j3a-crypter/src/file_worker.py | PraserX/j3a | f98f0cf9f940d9ae9af22cdb6b9e8ec4a8f02367 | [
"MIT"
] | null | null | null | import codecs
import io
import json
import os
import sys
class FileWorker(object):
""" File worker - easy file loading
There can be a problem with encoding, so we have to try open file as standard
UTF-8 and as a UTF-8 with BOM.
"""
def open_file(self, file):
""" Open specified file """
... | 26.730159 | 81 | 0.570071 |
948e85e26769003f9af6b012a163f9e1a59d48f5 | 3,402 | py | Python | Bioinformatics_k-mer_generator_with_Flask/venv/Lib/site-packages/Bio/Align/Applications/_MSAProbs.py | ee2110/Machine_Learning_based_web_applications | a414f3906e49003230f5440bb7f035a8d72767a6 | [
"MIT"
] | 2 | 2019-10-25T18:20:34.000Z | 2019-10-28T15:26:40.000Z | Bioinformatics_k-mer_generator_with_Flask/venv/Lib/site-packages/Bio/Align/Applications/_MSAProbs.py | ee2110/Machine_Learning_based_web_applications | a414f3906e49003230f5440bb7f035a8d72767a6 | [
"MIT"
] | 1 | 2020-04-25T20:36:07.000Z | 2020-04-25T20:36:07.000Z | site-packages/Bio/Align/Applications/_MSAProbs.py | Wristlebane/Pyto | 901ac307b68486d8289105c159ca702318bea5b0 | [
"MIT"
] | 1 | 2019-04-12T20:52:12.000Z | 2019-04-12T20:52:12.000Z | # Copyright 2013 by Christian Brueffer. All rights reserved.
#
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BSD 3-Clause License".
# Please see the LICENSE file that should have been included as part of this
# package.
"""Command line wrapp... | 41.487805 | 97 | 0.611993 |
bccfb9677d99bf1200ffd241439a9320e9180492 | 6,562 | py | Python | tests/test_ppp.py | pettni/posipoly | a40afd093567f62979bba73eae61a6416009bedc | [
"MIT"
] | 1 | 2021-07-09T02:07:44.000Z | 2021-07-09T02:07:44.000Z | tests/test_ppp.py | pettni/posipoly | a40afd093567f62979bba73eae61a6416009bedc | [
"MIT"
] | 1 | 2018-07-24T18:21:44.000Z | 2018-07-24T18:29:50.000Z | tests/test_ppp.py | pettni/posipoly | a40afd093567f62979bba73eae61a6416009bedc | [
"MIT"
] | 1 | 2020-04-28T17:18:59.000Z | 2020-04-28T17:18:59.000Z | import sympy
from sympy.abc import x, y
import numpy as np
from posipoly import *
from posipoly.ppp import *
def test_is_dd():
np.testing.assert_equal(is_dd(np.array([[1, 0],[0, 1]] )), True)
np.testing.assert_equal(is_dd(np.array([[1, 1],[1, 1]] )), True)
np.testing.assert_equal(is_dd(np.array([[1, 1.01],[1.01... | 33.141414 | 101 | 0.611856 |
fb3d428bcf4bf55da0a938ee0b0a35b9e029083d | 49,758 | py | Python | pandas/tests/resample/test_datetime_index.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 2 | 2019-12-02T11:24:30.000Z | 2021-02-28T12:13:54.000Z | pandas/tests/resample/test_datetime_index.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 1 | 2019-10-31T08:19:49.000Z | 2019-10-31T08:19:49.000Z | pandas/tests/resample/test_datetime_index.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 4 | 2019-10-09T07:52:08.000Z | 2021-07-12T02:37:59.000Z | from datetime import datetime, timedelta
from functools import partial
from io import StringIO
import numpy as np
import pytest
import pytz
from pandas.errors import UnsupportedFunctionCall
import pandas as pd
from pandas import DataFrame, Series, Timedelta, Timestamp, isna, notna
from pandas.core.groupby.grouper im... | 31.632549 | 88 | 0.60332 |
560fe1546104fe817f956ee5d06f91a70113683a | 1,950 | py | Python | config/settings/local.py | roger-link/tacky | 8c8b37bcf8c9773f9c7d283c9038c962b9923620 | [
"MIT"
] | null | null | null | config/settings/local.py | roger-link/tacky | 8c8b37bcf8c9773f9c7d283c9038c962b9923620 | [
"MIT"
] | null | null | null | config/settings/local.py | roger-link/tacky | 8c8b37bcf8c9773f9c7d283c9038c962b9923620 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Local settings
- Run in Debug mode
- Use console backend for emails
- Add Django Debug Toolbar
- Add django-extensions as app
"""
from .common import * # noqa
# DEBUG
# ------------------------------------------------------------------------------
DEBUG = env.bool('DJANGO_DEBUG', default... | 30.952381 | 99 | 0.498974 |
0849bbd8fc29f9b6fee5b4e0b854bfbd588a4caa | 1,750 | py | Python | packages/nbextension/nteract_on_jupyter/extension.py | lgeiger/nteract | fbb426fd2a9fd9def57aca5e89444db86de25562 | [
"BSD-3-Clause"
] | null | null | null | packages/nbextension/nteract_on_jupyter/extension.py | lgeiger/nteract | fbb426fd2a9fd9def57aca5e89444db86de25562 | [
"BSD-3-Clause"
] | 1 | 2018-10-19T15:07:06.000Z | 2018-10-19T15:07:06.000Z | packages/nbextension/nteract_on_jupyter/extension.py | lgeiger/nteract | fbb426fd2a9fd9def57aca5e89444db86de25562 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
"""A tornado based nteract server."""
# Copyright (c) nteract development team.
# Distributed under the terms of the Modified BSD License.
import os
from notebook.utils import url_path_join as ujoin
from os.path import join as pjoin
from jupyter_core.paths import ENV_JUPYTER_PATH, jupyter_config_path
... | 27.34375 | 68 | 0.695429 |
0c48013030433aa41a8d9b86561c5388c0a8b9c9 | 3,743 | py | Python | main.py | adarshchbs/adda_sketch | 25f7adf3563d8e1edb8c431fb93876bbed4d4e76 | [
"MIT"
] | null | null | null | main.py | adarshchbs/adda_sketch | 25f7adf3563d8e1edb8c431fb93876bbed4d4e76 | [
"MIT"
] | null | null | null | main.py | adarshchbs/adda_sketch | 25f7adf3563d8e1edb8c431fb93876bbed4d4e76 | [
"MIT"
] | null | null | null | """Main script for ADDA."""
import os
import numpy as np
import torch
import params
from pretrain import eval_src, train_src
from resnet_18 import ResNetClassifier, ResNetEncoder
from discriminator import Discriminator
from utils import init_model, init_random_seed
from test import eval_tgt
from adopt import train_tar... | 34.33945 | 100 | 0.6786 |
26c059bde1c2f2f5ba30184429168dae8efe8965 | 1,900 | py | Python | setup.py | dhalbert/Adafruit_CircuitPython_BLE_iBBQ | 586b3bbebdb7fe04b5c1ede501a5b546bf80756e | [
"MIT"
] | null | null | null | setup.py | dhalbert/Adafruit_CircuitPython_BLE_iBBQ | 586b3bbebdb7fe04b5c1ede501a5b546bf80756e | [
"MIT"
] | null | null | null | setup.py | dhalbert/Adafruit_CircuitPython_BLE_iBBQ | 586b3bbebdb7fe04b5c1ede501a5b546bf80756e | [
"MIT"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the lo... | 35.185185 | 87 | 0.689474 |
cf9f86b17d9ee1ac661c5f3a6aa151a31fd168eb | 2,796 | py | Python | server/templates/user/adduser.py | chenqianhe/CreditStatisticsSystem | 882ae725dbb429303e3dce4da703116ae3c954fe | [
"MIT"
] | null | null | null | server/templates/user/adduser.py | chenqianhe/CreditStatisticsSystem | 882ae725dbb429303e3dce4da703116ae3c954fe | [
"MIT"
] | null | null | null | server/templates/user/adduser.py | chenqianhe/CreditStatisticsSystem | 882ae725dbb429303e3dce4da703116ae3c954fe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# project: credit-statistics-system
# author: Chen Qianhe
# GitHub: https://github.com/chenqianhe
# datetime: 2021/12/14 13:03
from server.database.link_database import LinkDatabase
import time
from email.mime.text import MIMEText
from email.header import Header
import smtpl... | 32.137931 | 108 | 0.550787 |
72de1622d5fc406861fb42eb1ea1c397735b0a33 | 29,814 | py | Python | bzt/modules/gatling.py | Avi-Labs/taurus | 3aa9bc294778d99be545575467fb5897dc815330 | [
"Apache-2.0"
] | 1,743 | 2015-03-30T20:56:03.000Z | 2022-03-31T09:08:37.000Z | bzt/modules/gatling.py | Avi-Labs/taurus | 3aa9bc294778d99be545575467fb5897dc815330 | [
"Apache-2.0"
] | 1,159 | 2015-04-01T08:25:53.000Z | 2022-03-29T08:15:31.000Z | bzt/modules/gatling.py | Avi-Labs/taurus | 3aa9bc294778d99be545575467fb5897dc815330 | [
"Apache-2.0"
] | 497 | 2015-03-31T21:05:18.000Z | 2022-03-17T12:45:21.000Z | """
Module holds all stuff regarding Gatling tool usage
Copyright 2015 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless require... | 37.979618 | 120 | 0.581438 |
91cac733cd43ef59c57f2a1a42d31ebc89e2564e | 4,262 | py | Python | Kanta.py | TomasJouhilampi/Painonhallinta | dd5ca4931316ba25f9946f8c91dd5697aae1d127 | [
"CC0-1.0"
] | null | null | null | Kanta.py | TomasJouhilampi/Painonhallinta | dd5ca4931316ba25f9946f8c91dd5697aae1d127 | [
"CC0-1.0"
] | null | null | null | Kanta.py | TomasJouhilampi/Painonhallinta | dd5ca4931316ba25f9946f8c91dd5697aae1d127 | [
"CC0-1.0"
] | null | null | null | # Tietokantamoduli
# Modulien ja kirjastojen lataukset
import sqlite3
from sqlite3.dbapi2 import SQLITE_INSERT
# Luodaan uusi tietokanta projektin hakemistoon
tietokannan_nimi = 'painonhallinta.db'
def luo_tietokanta(tiedosto):
"""Luo tietokannan huom. tiedoston tyyppi po. .db
Args:
tiedosto (string)... | 32.287879 | 181 | 0.665415 |
97e0a8690f0eef7fcecc3005f2550e2768d4714e | 1,045 | py | Python | frappe/core/doctype/language/language.py | sbkolate/jacfrappe | 40cdb5b5fb0f1ccf802cb43df3cf65b593134fb5 | [
"MIT"
] | null | null | null | frappe/core/doctype/language/language.py | sbkolate/jacfrappe | 40cdb5b5fb0f1ccf802cb43df3cf65b593134fb5 | [
"MIT"
] | null | null | null | frappe/core/doctype/language/language.py | sbkolate/jacfrappe | 40cdb5b5fb0f1ccf802cb43df3cf65b593134fb5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, json
from frappe.model.document import Document
class Language(Document):
pass
def export_languages_json():
'''Export list of a... | 30.735294 | 77 | 0.689952 |
9770616e911b7c9607656a82995664db40988d38 | 3,443 | py | Python | mwa_pb/measured_beamformer.py | NickSwainston/mwa_pb | 6656ee2b83c23e6c31ae8dac6f67a46d9b881eae | [
"MIT"
] | 2 | 2020-07-20T05:38:00.000Z | 2020-08-10T01:31:52.000Z | mwa_pb/measured_beamformer.py | NickSwainston/mwa_pb | 6656ee2b83c23e6c31ae8dac6f67a46d9b881eae | [
"MIT"
] | 15 | 2019-05-01T01:58:06.000Z | 2022-03-23T15:54:13.000Z | mwa_pb/measured_beamformer.py | NickSwainston/mwa_pb | 6656ee2b83c23e6c31ae8dac6f67a46d9b881eae | [
"MIT"
] | 7 | 2019-04-16T08:30:40.000Z | 2022-03-28T13:34:13.000Z | import os
import numpy
from scipy import interpolate
from . import config
##################################
def delayset2delaylines(delayset):
"""
Calculate an array of 5 delay line flags based on the delay setting.
NOT VECTOR.
"""
# See if we have a valid delay setting
if delayset ... | 29.681034 | 81 | 0.584084 |
e6d7556e0f81f73317ad863f5224df2799653de4 | 9,001 | py | Python | shopify_yearmakemodel_advanced_search/shopify_yearmakemodel_advanced_search.py | chaps/py_shopify_ymm_advance_search | f83a3c8d30728d4c281b879cbc458e82771654f7 | [
"MIT"
] | null | null | null | shopify_yearmakemodel_advanced_search/shopify_yearmakemodel_advanced_search.py | chaps/py_shopify_ymm_advance_search | f83a3c8d30728d4c281b879cbc458e82771654f7 | [
"MIT"
] | null | null | null | shopify_yearmakemodel_advanced_search/shopify_yearmakemodel_advanced_search.py | chaps/py_shopify_ymm_advance_search | f83a3c8d30728d4c281b879cbc458e82771654f7 | [
"MIT"
] | null | null | null | """Main module."""
import requests
from enum import Enum
class SearchConditionsEnum(Enum):
EQUALS = "equals"
NOT_EQUALS = "not_equals"
BEGINS_WITH = "begins_with"
ENDS_WITH = "ends_with"
CONTAINS = "contains"
DOES_NOT_CONTAINS = "does_not_contains"
GREATER_THAN = "greater_than"
GREAT... | 32.970696 | 136 | 0.553383 |
ade3c20b4a698e2f676fbe78717055cde6382852 | 1,037 | py | Python | esp32/tools/run_initial_lopy_test.py | knagymate/pycom-micropython-sigfox-ble | 03a166e7e5a98eeab273305fb4a22d3f32326b93 | [
"MIT"
] | 3 | 2020-03-06T16:14:00.000Z | 2021-09-11T20:50:27.000Z | esp32/tools/run_initial_lopy_test.py | knagymate/pycom-micropython-sigfox-ble | 03a166e7e5a98eeab273305fb4a22d3f32326b93 | [
"MIT"
] | 2 | 2020-03-12T07:59:22.000Z | 2020-03-12T08:41:29.000Z | esp32/tools/run_initial_lopy_test.py | knagymate/pycom-micropython-sigfox-ble | 03a166e7e5a98eeab273305fb4a22d3f32326b93 | [
"MIT"
] | 1 | 2020-08-27T21:29:52.000Z | 2020-08-27T21:29:52.000Z | #
# Copyright (c) 2020, Pycom Limited.
#
# This software is licensed under the GNU GPL version 3 or any
# later version, with permitted additional terms. For more information
# see the Pycom Licence v1.0 document supplied with this file, or
# available at https://www.pycom.io/opensource/licensing
#
import pyboard
impo... | 28.027027 | 113 | 0.707811 |
2a728b68cd416b82e16d4e753d1c4edfa426117f | 2,017 | py | Python | english/clustering/Meanshift/Meanshift_predict_cloud.py | Lyuyangdaisy/DS_package | ca0f220598ee156028646fbefccde08b2ece62ea | [
"MIT"
] | 6 | 2021-03-13T10:33:47.000Z | 2022-01-23T07:22:40.000Z | english/clustering/Meanshift/Meanshift_predict_cloud.py | Lyuyangdaisy/DS_package | ca0f220598ee156028646fbefccde08b2ece62ea | [
"MIT"
] | null | null | null | english/clustering/Meanshift/Meanshift_predict_cloud.py | Lyuyangdaisy/DS_package | ca0f220598ee156028646fbefccde08b2ece62ea | [
"MIT"
] | 2 | 2021-05-05T17:47:34.000Z | 2021-10-10T16:13:53.000Z | from sklearn.model_selection import train_test_split
import sys
import os
import joblib
import warnings
from mlp_training_cloud import get_data,data_process
import pandas as pd
import matplotlib.pyplot as plt
import datetime
warnings.filterwarnings("ignore")
# *********************************************************... | 32.015873 | 158 | 0.639068 |
2afb1e5a36b9e5908b3b07a9ebb1817345fe5bb6 | 310 | py | Python | practical/core/views.py | Ekhel/django-practical | ef92d09e841cdef2c9fc1dd935f02a16ed67a60b | [
"MIT"
] | null | null | null | practical/core/views.py | Ekhel/django-practical | ef92d09e841cdef2c9fc1dd935f02a16ed67a60b | [
"MIT"
] | null | null | null | practical/core/views.py | Ekhel/django-practical | ef92d09e841cdef2c9fc1dd935f02a16ed67a60b | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.contrib.auth import (login as auth_login, authenticate)
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
def index(request):
return render(request,'apl/home.html')
| 31 | 68 | 0.822581 |
a47aba75e5ffb691a45490d9b080292b83d26fce | 32,205 | py | Python | daemon/tests/test_gui.py | montag451/core | 3be162b0b0f54b35520b980023abdfad4ff5e489 | [
"BSD-2-Clause"
] | null | null | null | daemon/tests/test_gui.py | montag451/core | 3be162b0b0f54b35520b980023abdfad4ff5e489 | [
"BSD-2-Clause"
] | null | null | null | daemon/tests/test_gui.py | montag451/core | 3be162b0b0f54b35520b980023abdfad4ff5e489 | [
"BSD-2-Clause"
] | null | null | null | """
Tests for testing tlv message handling.
"""
import os
import time
import mock
import netaddr
import pytest
from mock import MagicMock
from core.api.tlv import coreapi
from core.emane.ieee80211abg import EmaneIeee80211abgModel
from core.emulator.enumerations import (
ConfigFlags,
ConfigTlvs,
EventTlvs,... | 33.132716 | 88 | 0.589412 |
36f871b4f33d2a47025528d6bbaf5ebdf20e71b0 | 49,849 | py | Python | sfepy/terms/terms.py | antonykamp/sfepy | 8213d3c8cc2825602b41dc65eb543b575856ca8c | [
"BSD-3-Clause"
] | 1 | 2021-05-15T16:28:45.000Z | 2021-05-15T16:28:45.000Z | sfepy/terms/terms.py | Moyunning/sfepy | 127ab753a2f4f24ed359d0152088d11227c3dd49 | [
"BSD-3-Clause"
] | null | null | null | sfepy/terms/terms.py | Moyunning/sfepy | 127ab753a2f4f24ed359d0152088d11227c3dd49 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import re
from copy import copy
import numpy as nm
from sfepy.base.base import (as_float_or_complex, get_default, assert_,
Container, Struct, basestr, goptions)
from sfepy.base.compat import in1d
# Used for imports in term files.
from sfepy.terms.ex... | 31.253292 | 80 | 0.517523 |
fef8a49653a2cf5b206d375068d17900eb8776dd | 606 | py | Python | filmfestival/migrations/0013_auto_20150610_1459.py | mykonosbiennale/mykonosbiennale.github.io | fba479807204768ac440c77c4850b64fb25d113d | [
"Apache-2.0"
] | 1 | 2017-08-19T01:07:22.000Z | 2017-08-19T01:07:22.000Z | filmfestival/migrations/0013_auto_20150610_1459.py | thanos/mykonosbiennale.org | ddb53fbe4198ce29c252c72f9dca49ed277c50dc | [
"Apache-2.0"
] | 7 | 2015-04-02T04:48:43.000Z | 2022-03-11T23:14:58.000Z | filmfestival/migrations/0013_auto_20150610_1459.py | mykonosbiennale/mykonosbiennale.github.io | fba479807204768ac440c77c4850b64fb25d113d | [
"Apache-2.0"
] | 1 | 2015-04-15T20:56:03.000Z | 2015-04-15T20:56:03.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('filmfestival', '0012_auto_20150610_1454'),
]
operations = [
migrations.AlterModelOptions(
name='screening',
... | 24.24 | 88 | 0.59571 |
87b274db799595f219c0dfcf7a9f8b79e096e49d | 9,479 | py | Python | IR_DACF_KW.py | LePingKYXK/Dipole-ACF | fcbb22c904c6a1019095ef66c5e94f37446357f1 | [
"BSD-4-Clause-UC"
] | 10 | 2016-09-25T02:45:34.000Z | 2021-12-26T02:44:20.000Z | IR_DACF_KW.py | LePingKYXK/Dipole-ACF | fcbb22c904c6a1019095ef66c5e94f37446357f1 | [
"BSD-4-Clause-UC"
] | 2 | 2016-09-23T22:50:55.000Z | 2017-07-12T00:16:35.000Z | IR_DACF_KW.py | LePingKYXK/Dipole-ACF | fcbb22c904c6a1019095ef66c5e94f37446357f1 | [
"BSD-4-Clause-UC"
] | 7 | 2016-11-11T04:26:48.000Z | 2021-05-22T12:18:06.000Z | #!/usr/bin/env python
''' This script (VERSION 3.3) is the improved version based on Dr. Kulig's first
version of ir_total_QC.py, which is a pure Python script, without using Numpy,
Scipy and no visulization of the results.
The author renamed it into IR_DACF_KW.py, where "K" refers to Dr. Kulig,
and "W" ref... | 35.501873 | 101 | 0.598797 |
f0ba5be658d70d07e8c26c9d8b61196b30949662 | 1,420 | py | Python | app/core/tests/test_admin.py | GerryBolanos/recipe-app-api | 8a3dd2f8bceee86950d89a8eabe8d8584cbf67ac | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | GerryBolanos/recipe-app-api | 8a3dd2f8bceee86950d89a8eabe8d8584cbf67ac | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | GerryBolanos/recipe-app-api | 8a3dd2f8bceee86950d89a8eabe8d8584cbf67ac | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class AdminSiteTests(TestCase):
def setUp(self):
"""Create test client, add new user"""
self.client = Client()
self.admin_user = get_user_model().objects.create_superuse... | 33.023256 | 68 | 0.633099 |
f65196c5cebb513061671c71a29e1421bc263653 | 1,316 | py | Python | tests/conftest.py | iwanb/sphinx-autodoc-typehints | a25fa05084b4cee7e9e733603b79e68986a0ffee | [
"MIT"
] | null | null | null | tests/conftest.py | iwanb/sphinx-autodoc-typehints | a25fa05084b4cee7e9e733603b79e68986a0ffee | [
"MIT"
] | null | null | null | tests/conftest.py | iwanb/sphinx-autodoc-typehints | a25fa05084b4cee7e9e733603b79e68986a0ffee | [
"MIT"
] | 1 | 2020-05-17T17:11:26.000Z | 2020-05-17T17:11:26.000Z | import os
import sys
import pathlib
import shutil
import pytest
from sphinx.testing.path import path
from sphobjinv import Inventory
pytest_plugins = 'sphinx.testing.fixtures'
collect_ignore = ['roots']
@pytest.fixture(scope='session')
def inv(pytestconfig):
cache_path = 'python{v.major}.{v.minor}/objects.inv'.... | 29.244444 | 94 | 0.705167 |
f29f89cbf65a01d6a423e7fd00f7fdf4f4f28e6a | 2,056 | py | Python | tests/keras/utils/generic_utils_test.py | nils-werner/keras | 78f26df8fb2b8aa5c6262aef44a494a8335a9c6e | [
"MIT"
] | 30 | 2017-04-11T04:17:22.000Z | 2020-09-08T08:18:37.000Z | tests/keras/utils/generic_utils_test.py | nils-werner/keras | 78f26df8fb2b8aa5c6262aef44a494a8335a9c6e | [
"MIT"
] | null | null | null | tests/keras/utils/generic_utils_test.py | nils-werner/keras | 78f26df8fb2b8aa5c6262aef44a494a8335a9c6e | [
"MIT"
] | 21 | 2017-03-27T08:06:11.000Z | 2020-06-18T09:35:07.000Z | import sys
import pytest
from keras.utils.generic_utils import custom_object_scope, has_arg
from keras import activations
from keras import regularizers
def test_custom_objects_scope():
def custom_fn():
pass
class CustomClass(object):
pass
with custom_object_scope({'CustomClass': Custom... | 30.686567 | 88 | 0.572471 |
e83ea00c001ad3d2b1e05877b70f433e6a22bea1 | 1,363 | py | Python | fuzz/helper.py | xumia/debian-openssl | f3694133edbc53065100d6cc2250ae6745e63638 | [
"OpenSSL"
] | 18,396 | 2015-11-11T09:36:37.000Z | 2022-03-31T23:31:51.000Z | fuzz/helper.py | xumia/debian-openssl | f3694133edbc53065100d6cc2250ae6745e63638 | [
"OpenSSL"
] | 2,471 | 2015-11-10T04:01:38.000Z | 2022-03-31T21:37:21.000Z | fuzz/helper.py | xumia/debian-openssl | f3694133edbc53065100d6cc2250ae6745e63638 | [
"OpenSSL"
] | 4,219 | 2015-11-10T12:17:34.000Z | 2022-03-31T10:41:43.000Z | #!/usr/bin/python
#
# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the OpenSSL license (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/... | 25.716981 | 76 | 0.677916 |
e70e4b50a6610b065c5099e192d010a6c1106b63 | 240 | py | Python | xitorch/__init__.py | mfkasim91/lintorch | 7a7da4b960e83c07e45ddb999da99510d3c9e909 | [
"MIT"
] | 4 | 2020-10-15T15:07:54.000Z | 2022-01-29T23:01:10.000Z | xitorch/__init__.py | mfkasim91/lintorch | 7a7da4b960e83c07e45ddb999da99510d3c9e909 | [
"MIT"
] | 7 | 2020-09-16T11:44:34.000Z | 2020-09-24T13:17:19.000Z | xitorch/__init__.py | mfkasim91/lintorch | 7a7da4b960e83c07e45ddb999da99510d3c9e909 | [
"MIT"
] | 2 | 2020-09-17T09:41:33.000Z | 2020-09-17T10:00:40.000Z | from xitorch._core.editable_module import *
from xitorch._core.pure_function import *
from xitorch._core.linop import *
from xitorch.debug.modes import *
from xitorch.version import get_version as _get_version
__version__ = _get_version()
| 30 | 55 | 0.825 |
0e34ef15d5974e6c1eb27689b2411ee481202311 | 2,611 | py | Python | src/constants.py | BoseSean/db-explain-viz | bb2b0fa52558b1ffdb0940cce3a977ccebcae8c3 | [
"Apache-2.0"
] | 1 | 2018-12-06T08:41:31.000Z | 2018-12-06T08:41:31.000Z | src/constants.py | BoseSean/db-explain-viz | bb2b0fa52558b1ffdb0940cce3a977ccebcae8c3 | [
"Apache-2.0"
] | null | null | null | src/constants.py | BoseSean/db-explain-viz | bb2b0fa52558b1ffdb0940cce3a977ccebcae8c3 | [
"Apache-2.0"
] | null | null | null | from inspect import getmembers, isfunction
NaN = float("NaN")
class Fields:
'''
Fields contain all the possible attribute names of a node in QEP tree
'''
NODE_TYPE = 'Node Type'
ACTUAL_ROWS = 'Actual Rows'
PLAN_ROWS = 'Plan Rows'
ACTUAL_TOTAL_TIME = 'Actual Total Time'
ACTUAL_LOOPS = '... | 30.011494 | 81 | 0.641517 |
26fa10bdd7cc2e39aec30800a4bc6cb62c1b0136 | 402 | py | Python | radio/migrations/0004_system_recorder_uuid.py | MaxwellDPS/trunk-player | 19f116e64249823f3a12b35ed55252db60b1cf78 | [
"MIT"
] | null | null | null | radio/migrations/0004_system_recorder_uuid.py | MaxwellDPS/trunk-player | 19f116e64249823f3a12b35ed55252db60b1cf78 | [
"MIT"
] | 7 | 2021-06-10T23:24:05.000Z | 2022-03-03T21:48:12.000Z | radio/migrations/0004_system_recorder_uuid.py | MaxwellDPS/trunk-player | 19f116e64249823f3a12b35ed55252db60b1cf78 | [
"MIT"
] | 1 | 2022-03-26T07:04:21.000Z | 2022-03-26T07:04:21.000Z | # Generated by Django 3.2.7 on 2021-09-19 16:52
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('radio', '0003_defaultagenecy'),
]
operations = [
migrations.AddField(
model_name='system',
name='recorde... | 20.1 | 55 | 0.606965 |
031fcbc56203bf898e89b17a9ff3683514a33b46 | 26,957 | py | Python | simple_rl/agents/func_approx/sam_stuff/main.py | samlobel/simple_rl_mbrl | ed868916d06dbf68f4af23bea83b0e852e88df6e | [
"Apache-2.0"
] | 1 | 2020-01-30T13:14:24.000Z | 2020-01-30T13:14:24.000Z | simple_rl/agents/func_approx/sam_stuff/main.py | samlobel/simple_rl_mbrl | ed868916d06dbf68f4af23bea83b0e852e88df6e | [
"Apache-2.0"
] | null | null | null | simple_rl/agents/func_approx/sam_stuff/main.py | samlobel/simple_rl_mbrl | ed868916d06dbf68f4af23bea83b0e852e88df6e | [
"Apache-2.0"
] | null | null | null | import numpy as np
import random
from collections import namedtuple, deque, defaultdict
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
import pdb
from copy import deepcopy
import shutil
import os
import time
import argparse
import pickle
import torch.optim as optim
import torch
import torch.nn as nn
... | 41.472308 | 170 | 0.63171 |
cbab773b5151b5c4bd0aeda45af0b629d25ed47a | 1,317 | py | Python | benchmark/backup_googlenet.py | Oneflow-Inc/vision | 352e9240f63118112ea174bb2d0b502fa54be16f | [
"BSD-3-Clause"
] | 40 | 2021-10-19T02:34:56.000Z | 2022-03-25T07:49:44.000Z | benchmark/backup_googlenet.py | Oneflow-Inc/vision | 352e9240f63118112ea174bb2d0b502fa54be16f | [
"BSD-3-Clause"
] | 53 | 2021-10-22T02:24:44.000Z | 2022-03-31T04:20:47.000Z | benchmark/backup_googlenet.py | Oneflow-Inc/vision | 352e9240f63118112ea174bb2d0b502fa54be16f | [
"BSD-3-Clause"
] | 11 | 2022-01-06T02:57:07.000Z | 2022-03-23T15:19:51.000Z | from benchmark import *
import oneflow_benchmark
from flowvision.models.googlenet import googlenet
@oneflow_benchmark.ci_settings(compare={"median": "5%"})
def test_googlenet_batch_size1(benchmark, net=googlenet, input_shape=[1, 3, 224, 224]):
model, x, optimizer = fetch_args(net, input_shape)
benchmark(run, ... | 36.583333 | 87 | 0.7388 |
ad249aad4b58c47c0bc3495f7074208912e483bd | 26,507 | py | Python | lib/googlecloudsdk/third_party/apis/artifactregistry/v1alpha1/artifactregistry_v1alpha1_client.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/googlecloudsdk/third_party/apis/artifactregistry/v1alpha1/artifactregistry_v1alpha1_client.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/third_party/apis/artifactregistry/v1alpha1/artifactregistry_v1alpha1_client.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | """Generated client library for artifactregistry version v1alpha1."""
# NOTE: This file is autogenerated and should not be edited by hand.
from __future__ import absolute_import
from apitools.base.py import base_api
from googlecloudsdk.third_party.apis.artifactregistry.v1alpha1 import artifactregistry_v1alpha1_messag... | 46.832155 | 266 | 0.732674 |
fd95a40cac16b245badc74e58480545ea1139f70 | 7,760 | py | Python | xfraud/supplement/07Learning_hybrid/ours_learn-grid-A.py | eBay/xFraud | 55525c472f40c452b6fb3508f4f8b273af596081 | [
"Apache-2.0"
] | 17 | 2021-11-04T12:49:28.000Z | 2022-03-27T14:55:14.000Z | xfraud/supplement/07Learning_hybrid/ours_learn-grid-A.py | eBay/xFraud | 55525c472f40c452b6fb3508f4f8b273af596081 | [
"Apache-2.0"
] | 1 | 2022-03-12T01:03:11.000Z | 2022-03-12T01:03:11.000Z | xfraud/supplement/07Learning_hybrid/ours_learn-grid-A.py | eBay/xFraud | 55525c472f40c452b6fb3508f4f8b273af596081 | [
"Apache-2.0"
] | 1 | 2022-03-01T08:06:49.000Z | 2022-03-01T08:06:49.000Z | #!/usr/bin/env python
# coding: utf-8
# - Edge weight is inferred by GNNExplainer and node importance is given by five Ebay annotators. Not every annotator has annotated each node.
# - Seed is the txn to explain.
# - id is the community id.
import math
from tqdm.auto import tqdm
import random
import pandas as pd
imp... | 44.597701 | 217 | 0.683634 |
63f17d48f8c4626dd76450f86c4282b3b5f5ce93 | 8,469 | py | Python | pylatex/utils.py | yxqd/PyLaTeX | 467823012185bcdb7a7a6f6f253c2835193ab5c8 | [
"MIT"
] | null | null | null | pylatex/utils.py | yxqd/PyLaTeX | 467823012185bcdb7a7a6f6f253c2835193ab5c8 | [
"MIT"
] | null | null | null | pylatex/utils.py | yxqd/PyLaTeX | 467823012185bcdb7a7a6f6f253c2835193ab5c8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This module implements some simple utility functions.
.. :copyright: (c) 2014 by Jelte Fennema.
:license: MIT, see License for more details.
"""
import os.path
import getpass
import shutil
import tempfile
import pylatex.base_classes
_latex_special_chars = {
'&': r'\&',
'%': r... | 23.789326 | 79 | 0.585902 |
247b4470485d9e341902906feeb941e49ad98be2 | 2,539 | py | Python | mysite/account/models.py | wuhaoqiu/engr597-stable | 284ab9efae8361c139d330313abb831bfea9e5b9 | [
"MIT"
] | null | null | null | mysite/account/models.py | wuhaoqiu/engr597-stable | 284ab9efae8361c139d330313abb831bfea9e5b9 | [
"MIT"
] | 6 | 2020-06-05T20:18:51.000Z | 2022-03-11T23:42:53.000Z | mysite/account/models.py | wuhaoqiu/engr597-stable | 284ab9efae8361c139d330313abb831bfea9e5b9 | [
"MIT"
] | 1 | 2020-06-24T01:39:15.000Z | 2020-06-24T01:39:15.000Z | # User,Group,Permission
from django.db import models
from django.conf import settings
from django.contrib.auth.models import User
# Create your models here.
# this will create one more table called Profile, 并不是在原User table里直接增加
class Profile(models.Model):
# instead of inheritance, we use OneToOneField to extend m... | 59.046512 | 178 | 0.760142 |
919dd5cc6e139ab4a3fbf1e71dd8607700e407f7 | 7,137 | py | Python | manim/animation/animation.py | yy/manim | 2ed00b6b26499afa23ba419373e6899448e29f15 | [
"MIT"
] | 1 | 2019-01-13T19:21:00.000Z | 2019-01-13T19:21:00.000Z | manim/animation/animation.py | yy/manim | 2ed00b6b26499afa23ba419373e6899448e29f15 | [
"MIT"
] | null | null | null | manim/animation/animation.py | yy/manim | 2ed00b6b26499afa23ba419373e6899448e29f15 | [
"MIT"
] | null | null | null | """Animate mobjects."""
__all__ = ["Animation", "Wait"]
import typing
from copy import deepcopy
import numpy as np
if typing.TYPE_CHECKING:
from manim.scene.scene import Scene
from .. import logger
from ..mobject.mobject import Mobject
from ..utils.rate_functions import smooth
DEFAULT_ANIMATION_RUN_TIME: fl... | 32.889401 | 85 | 0.628555 |
71a43f80646b0b3a01d151b1838849b9ac192a0b | 327 | py | Python | test/integration/test_config_schema.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | null | null | null | test/integration/test_config_schema.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | 6 | 2021-11-11T20:57:49.000Z | 2021-12-10T15:30:33.000Z | test/integration/test_config_schema.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | null | null | null | from galaxy_test.driver import integration_util
class ConfigSchemaTestCase(integration_util.IntegrationTestCase):
def test_schema_path_resolution_graph(self):
# Run schema's validation method; throws error if schema invalid
schema = self._app.config.schema
schema.validate_path_resolution_g... | 36.333333 | 72 | 0.785933 |
513069c763cf41e5dcc341806a5302ae1a490ae5 | 4,600 | py | Python | horovod/spark/util/safe_shell_exec.py | rahul003/horovod | 6a933cd4c60f7eae5816aa380adefda5b70ef3cf | [
"Apache-2.0"
] | 4 | 2018-10-10T18:17:45.000Z | 2019-03-15T05:29:20.000Z | horovod/spark/util/safe_shell_exec.py | rahul003/horovod | 6a933cd4c60f7eae5816aa380adefda5b70ef3cf | [
"Apache-2.0"
] | 7 | 2018-10-15T23:04:29.000Z | 2019-01-17T23:15:03.000Z | horovod/spark/util/safe_shell_exec.py | rahul003/horovod | 6a933cd4c60f7eae5816aa380adefda5b70ef3cf | [
"Apache-2.0"
] | 2 | 2018-11-01T18:30:11.000Z | 2018-11-08T05:41:30.000Z | # Copyright 2018 Uber Technologies, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 30.872483 | 84 | 0.644783 |
a3a4873b216defa4635804e665fcffac42cf1a97 | 1,163 | py | Python | readthedocs/settings/proxito/base.py | yohalchan/readthedocs.org | 77df2790b985eb17f345a36656e15778443931b6 | [
"MIT"
] | 1 | 2020-09-24T22:01:38.000Z | 2020-09-24T22:01:38.000Z | readthedocs/settings/proxito/base.py | https-microsoft-com-powershell/readthedocs.org | a1d2de8907ecb2da84402bbb6cc5c271be20b5c0 | [
"MIT"
] | null | null | null | readthedocs/settings/proxito/base.py | https-microsoft-com-powershell/readthedocs.org | a1d2de8907ecb2da84402bbb6cc5c271be20b5c0 | [
"MIT"
] | null | null | null | """
Base settings for Proxito
Some of these settings will eventually be backported into the main settings file,
but currently we have them to be able to run the site with the old middleware for
a staged rollout of the proxito code.
"""
class CommunityProxitoSettingsMixin:
ROOT_URLCONF = 'readthedocs.proxito.url... | 29.075 | 81 | 0.654342 |
a485961ac05eb1e7dfb7ec6821462004c4a201ce | 1,623 | py | Python | pyfov.py | flags/Reactor-3 | b41a2904c9ec8cc14bcee03611602d0e568acf12 | [
"MIT"
] | 56 | 2015-04-20T08:31:29.000Z | 2021-12-19T14:05:18.000Z | pyfov.py | HexDecimal/Reactor-3 | b41a2904c9ec8cc14bcee03611602d0e568acf12 | [
"MIT"
] | 2 | 2018-07-24T11:24:41.000Z | 2021-05-16T03:04:53.000Z | pyfov.py | HexDecimal/Reactor-3 | b41a2904c9ec8cc14bcee03611602d0e568acf12 | [
"MIT"
] | 9 | 2015-11-03T02:56:20.000Z | 2021-04-28T08:19:57.000Z | def old_light(los_map, world_pos, size, row, start_slope, end_slope, xx, xy, yx, yy, collision_map, map_size):
_return_chunks = set()
if start_slope < end_slope:
return los_map, _return_chunks
x, y, z = world_pos
_next_start_slope = start_slope
for i in range(row, size):
_blocked = False
_d_x = -i
_... | 22.232877 | 128 | 0.617375 |
dff37a9bfafeafe6be435860ab916e5ecf533b32 | 3,142 | py | Python | buildout_env/lib/python2.7/site-packages/scipy/interpolate/__init__.py | salayhin/talkofacta | 8b5a14245dd467bb1fda75423074c4840bd69fb7 | [
"MIT"
] | 11 | 2017-12-25T23:22:13.000Z | 2021-09-28T00:23:37.000Z | buildout_env/lib/python2.7/site-packages/scipy/interpolate/__init__.py | salayhin/talkofacta | 8b5a14245dd467bb1fda75423074c4840bd69fb7 | [
"MIT"
] | 1 | 2017-01-12T09:51:20.000Z | 2017-03-09T23:19:57.000Z | buildout_env/lib/python2.7/site-packages/scipy/interpolate/__init__.py | salayhin/talkofacta | 8b5a14245dd467bb1fda75423074c4840bd69fb7 | [
"MIT"
] | 4 | 2017-01-11T15:40:52.000Z | 2018-07-25T16:03:52.000Z | """========================================
Interpolation (:mod:`scipy.interpolate`)
========================================
.. currentmodule:: scipy.interpolate
Sub-package for objects used in interpolation.
As listed below, this sub-package contains spline functions and classes,
one-dimensional and multi-dimensio... | 17.852273 | 72 | 0.706238 |
a0a5bc9014071cbd73a5ac2cb48f3db38cea9565 | 2,023 | py | Python | court_scraper/platforms/oscn/pages/daily_filings.py | mscarey/court-scraper | 0e13976d901352a09cfd7e48450bbe427494f48e | [
"0BSD"
] | 30 | 2020-09-08T23:59:34.000Z | 2022-03-24T03:02:47.000Z | court_scraper/platforms/oscn/pages/daily_filings.py | palewire/court-scraper | da4b614fb16806d8b5117373d273f802ca93a8cb | [
"0BSD"
] | 111 | 2020-09-16T23:42:40.000Z | 2022-02-19T01:25:55.000Z | court_scraper/platforms/oscn/pages/daily_filings.py | palewire/court-scraper | da4b614fb16806d8b5117373d273f802ca93a8cb | [
"0BSD"
] | 9 | 2020-10-05T13:19:03.000Z | 2021-12-11T12:12:13.000Z | import requests
from court_scraper.utils import dates_for_range
from .base_search import BaseSearch
from .daily_filings_results import DailyFilingsResultsPage
class DailyFilings(BaseSearch):
"""Search daily filings by county for limited number of larger counties.
Supports searches by date only.
Args:
... | 36.781818 | 90 | 0.622837 |
615cdacf1566ffb3afa10469197aad0ddba40f10 | 4,463 | py | Python | code/sf_t3d/settings.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 8 | 2017-03-13T16:34:28.000Z | 2021-11-16T11:35:56.000Z | code/sf_t3d/settings.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | null | null | null | code/sf_t3d/settings.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 3 | 2017-03-28T09:26:40.000Z | 2020-12-08T14:16:12.000Z | """
Django settings for sf_t3d project.
Generated by 'django-admin startproject' using Django 1.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
# Bu... | 26.885542 | 91 | 0.686758 |
a1d26b4b1ab781aeb7a08930d510bb6093b06a37 | 1,186 | py | Python | v2.5.7/toontown/hood/SBHoodDataAI.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-01T15:46:43.000Z | 2021-07-23T16:26:48.000Z | v2.5.7/toontown/hood/SBHoodDataAI.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 1 | 2019-06-29T03:40:05.000Z | 2021-06-13T01:15:16.000Z | v2.5.7/toontown/hood/SBHoodDataAI.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-28T21:18:46.000Z | 2021-02-25T06:37:25.000Z | from direct.directnotify import DirectNotifyGlobal
import HoodDataAI
from toontown.toonbase import ToontownGlobals
from toontown.safezone import ButterflyGlobals
from toontown.episodes.DistributedPrologueEventAI import DistributedPrologueEventAI
class SBHoodDataAI(HoodDataAI.HoodDataAI):
notify = DirectNotifyGloba... | 35.939394 | 83 | 0.699831 |
e35971a3344bda446a680bfee708ae69607e10c8 | 736 | py | Python | examples/LandmarkDetection/DQN/utils/change_paths.py | Jdorri/rl-medical | 750b1f10413daa9cd8e346332bd844212e76ddd8 | [
"Apache-2.0"
] | 6 | 2020-01-10T15:32:00.000Z | 2021-06-14T17:28:03.000Z | examples/LandmarkDetection/DQN/utils/change_paths.py | Jdorri/rl-medical | 750b1f10413daa9cd8e346332bd844212e76ddd8 | [
"Apache-2.0"
] | 78 | 2020-01-19T10:47:31.000Z | 2020-05-13T11:13:05.000Z | examples/LandmarkDetection/DQN/utils/change_paths.py | Jdorri/rl-medical | 750b1f10413daa9cd8e346332bd844212e76ddd8 | [
"Apache-2.0"
] | 1 | 2020-10-04T12:04:26.000Z | 2020-10-04T12:04:26.000Z | import os
new_base_path = "/vol/biomedic/users/aa16914/shared/data/RL_data/cardiac_mri_adult"
file_path = "/vol/biomedic/users/aa16914/shared/data/RL_data/"
data_files = ["cardiac_test_files.txt", "cardiac_train_files.txt"]
landmark_files = ["cardiac_test_landmarks.txt", "cardiac_train_landmarks.txt"]
file_full_path... | 32 | 84 | 0.703804 |
f0c83b1c1795b799bf17d60b046b9de50a0af6eb | 2,750 | py | Python | build_vectors.py | alekseimi/code2vec_mag | 49281e64c437066fd510787d7b3c4867a1b32a21 | [
"MIT"
] | null | null | null | build_vectors.py | alekseimi/code2vec_mag | 49281e64c437066fd510787d7b3c4867a1b32a21 | [
"MIT"
] | 4 | 2020-03-04T23:19:59.000Z | 2022-02-10T00:15:38.000Z | build_vectors.py | alekseimi/code2vec_mag | 49281e64c437066fd510787d7b3c4867a1b32a21 | [
"MIT"
] | null | null | null | from common import common
from extractor import Extractor
import os
import csv
SHOW_TOP_CONTEXTS = 2
MAX_PATH_LENGTH = 8
MAX_PATH_WIDTH = 2
JAR_PATH = 'JavaExtractor/JPredict/target/JavaExtractor-0.0.1-SNAPSHOT.jar'
# 1. Pridobi vektor in ime metode
# raw_prediction, method_prediction_results
# raw_prediction.origin... | 39.285714 | 104 | 0.630909 |
480955c3b68ec4c9d8e9c1b28f061222a212b819 | 968 | py | Python | statbus/models/util.py | psykzz/statbus | 67fb9ed487b45cdab36b61e7d037952a13fff492 | [
"MIT"
] | null | null | null | statbus/models/util.py | psykzz/statbus | 67fb9ed487b45cdab36b61e7d037952a13fff492 | [
"MIT"
] | null | null | null | statbus/models/util.py | psykzz/statbus | 67fb9ed487b45cdab36b61e7d037952a13fff492 | [
"MIT"
] | null | null | null | from enum import Enum
from typing import Callable, Any
from peewee import *
from statbus.utils.FlaskDB import FlaskDBWrapper as FlaskDB
db_wrapper = FlaskDB()
class DBModel(db_wrapper.Model):
"""Meta model all models should parent from"""
pass
""" Enum field hack
This isn't supported by peewee but easy e... | 22 | 77 | 0.663223 |
6d7bcf35d1948be5683e503a1e54a003104650fd | 1,180 | py | Python | dummy_package/subpackage2/submoduleB.py | b1quint/testing_rtd | 4745a223eebbf182ff217d05615298f88453b085 | [
"MIT"
] | null | null | null | dummy_package/subpackage2/submoduleB.py | b1quint/testing_rtd | 4745a223eebbf182ff217d05615298f88453b085 | [
"MIT"
] | null | null | null | dummy_package/subpackage2/submoduleB.py | b1quint/testing_rtd | 4745a223eebbf182ff217d05615298f88453b085 | [
"MIT"
] | 1 | 2019-01-16T13:40:38.000Z | 2019-01-16T13:40:38.000Z | """
This is a submodule living inside subpackage1.
"""
import os
def my_other_method1(p):
"""
This is the doctring used on subpackage2. It has nothing to do with the `dummy_package.greet_people` module.
Parameters
----------
p : str
I have no idea why this should be a string.
... | 21.454545 | 117 | 0.590678 |
1604bc534278e67327c499859427504aa3818a78 | 114,693 | py | Python | source/list_future_reminders/list_future_reminders.py | peterlynch/MoneydancePythonScripts | ecadd7bf5e4197e8e457ee6a9ba13bc586fd4346 | [
"MIT"
] | null | null | null | source/list_future_reminders/list_future_reminders.py | peterlynch/MoneydancePythonScripts | ecadd7bf5e4197e8e457ee6a9ba13bc586fd4346 | [
"MIT"
] | null | null | null | source/list_future_reminders/list_future_reminders.py | peterlynch/MoneydancePythonScripts | ecadd7bf5e4197e8e457ee6a9ba13bc586fd4346 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# list_future_reminders.py (build: 1004)
###############################################################################
# MIT License
#
# Copyright (c) 2020 Stuart Beesley - StuWareSoftSystems
#
# Permission is hereby granted, free of charge, to any person obtaining a co... | 40.130511 | 386 | 0.676022 |
67b4fe96574a0f27f540c675daec327b9241132d | 8,910 | py | Python | gscommands.py | charlievieth/GoSubl | 07dec6a5fef09e4e1d686cfe5d586edcda003381 | [
"MIT"
] | null | null | null | gscommands.py | charlievieth/GoSubl | 07dec6a5fef09e4e1d686cfe5d586edcda003381 | [
"MIT"
] | 1 | 2020-11-06T22:01:04.000Z | 2020-11-06T22:01:04.000Z | gscommands.py | charlievieth/GoSubl | 07dec6a5fef09e4e1d686cfe5d586edcda003381 | [
"MIT"
] | null | null | null | from gosubl import gs
from gosubl import gspatch
from gosubl import mg9
import datetime
import os
import re
import sublime
import sublime_plugin
DOMAIN = "GoSublime"
GENERATED_CODE_RE = re.compile(
r"^\/\/ Code generated .* DO NOT EDIT\.$",
re.MULTILINE,
)
# TODO: make this configurable
FMT_IGNORED_EXTS = ... | 31.935484 | 102 | 0.580471 |
c745ab4e1060e8b72708f7bbaa04fa2de5ad9536 | 6,071 | py | Python | tests/projects/test_docker_projects.py | cclauss/mlflow | 05f18899df6db3364673d39910cc71bef4b95d27 | [
"Apache-2.0"
] | 3 | 2019-10-07T01:12:25.000Z | 2020-07-06T04:27:51.000Z | tests/projects/test_docker_projects.py | aelmasry/mlflow | 50efb4e4a7af6c351592f027681243d59f288254 | [
"Apache-2.0"
] | 15 | 2019-10-07T01:11:46.000Z | 2022-03-08T23:33:53.000Z | tests/projects/test_docker_projects.py | aelmasry/mlflow | 50efb4e4a7af6c351592f027681243d59f288254 | [
"Apache-2.0"
] | 6 | 2019-11-28T13:23:35.000Z | 2020-07-08T19:22:12.000Z | import os
import mock
import pytest
from databricks_cli.configure.provider import DatabricksConfig
import mlflow
from mlflow.entities import ViewType
from mlflow.projects import ExecutionException, _get_docker_image_uri
from mlflow.store import file_store
from mlflow.utils.mlflow_tags import MLFLOW_PROJECT_ENV, MLFL... | 41.582192 | 99 | 0.748641 |
c232a78fc7e8b959a75d7390ae2b8dd837067df8 | 88 | py | Python | tests/test_cli.py | vivainio/cftool | e3d53b3849e271c6ab93df426b5f543f38af5617 | [
"MIT"
] | null | null | null | tests/test_cli.py | vivainio/cftool | e3d53b3849e271c6ab93df426b5f543f38af5617 | [
"MIT"
] | null | null | null | tests/test_cli.py | vivainio/cftool | e3d53b3849e271c6ab93df426b5f543f38af5617 | [
"MIT"
] | null | null | null | from cfut.cli import do_ecr_push
def test_do_ecr_publish(init):
do_ecr_push(None)
| 14.666667 | 32 | 0.784091 |
c271c44f47b4dba0e192db479ec207eb8681558c | 3,248 | py | Python | src/ansiblemdgen/AutoDocumenterIndex.py | murphypetercl/ansible-mdgen | 86668f29bed5d206bca01fcbf568c8cd45cd8b4d | [
"MIT"
] | 14 | 2021-01-27T23:54:44.000Z | 2022-03-30T01:27:54.000Z | src/ansiblemdgen/AutoDocumenterIndex.py | murphypetercl/ansible-mdgen | 86668f29bed5d206bca01fcbf568c8cd45cd8b4d | [
"MIT"
] | 7 | 2021-01-29T20:31:50.000Z | 2021-03-31T17:10:00.000Z | src/ansiblemdgen/AutoDocumenterIndex.py | murphypetercl/ansible-mdgen | 86668f29bed5d206bca01fcbf568c8cd45cd8b4d | [
"MIT"
] | 1 | 2022-03-18T18:59:41.000Z | 2022-03-18T18:59:41.000Z | #!/usr/bin/env python3
from ansiblemdgen.Config import SingleConfig
import sys
import yaml
import os
from os import walk
from ansiblemdgen.Utils import SingleLog,FileUtils
from mdutils.mdutils import MdUtils
class IndexWriter:
def __init__(self):
self.config = SingleConfig()
self.log = SingleLog... | 32.808081 | 96 | 0.593596 |
8496ae51fad6daae86de2ec33d946cefd84dd494 | 4,695 | py | Python | qiskit/optimization/ising/stable_set.py | IanJoel/qiskit-aqua | 7707172d01f0539358f1ce2406f307e830105303 | [
"Apache-2.0"
] | null | null | null | qiskit/optimization/ising/stable_set.py | IanJoel/qiskit-aqua | 7707172d01f0539358f1ce2406f307e830105303 | [
"Apache-2.0"
] | null | null | null | qiskit/optimization/ising/stable_set.py | IanJoel/qiskit-aqua | 7707172d01f0539358f1ce2406f307e830105303 | [
"Apache-2.0"
] | 2 | 2020-02-13T02:17:58.000Z | 2020-08-09T07:56:25.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 33.297872 | 85 | 0.644941 |
fceb36dd10a7c2e8d6eea587eff7fe47021932ef | 3,741 | py | Python | HW2/gradebook_202101-14765_HW20220Assignment_2021-03-11-18-59-42/Libraries/HT_natural_convection.py | CarlGriffinsteed/UVM-ME144-Heat-Transfer | 9c477449d6ba5d6a9ee7c57f1c0ed4aab0ce4cca | [
"CC-BY-3.0"
] | 7 | 2017-06-02T20:31:22.000Z | 2021-04-05T13:52:33.000Z | HW2/gradebook_202101-14765_HW20220Assignment_2021-03-11-18-59-42/Libraries/HT_natural_convection.py | CarlGriffinsteed/UVM-ME144-Heat-Transfer | 9c477449d6ba5d6a9ee7c57f1c0ed4aab0ce4cca | [
"CC-BY-3.0"
] | null | null | null | HW2/gradebook_202101-14765_HW20220Assignment_2021-03-11-18-59-42/Libraries/HT_natural_convection.py | CarlGriffinsteed/UVM-ME144-Heat-Transfer | 9c477449d6ba5d6a9ee7c57f1c0ed4aab0ce4cca | [
"CC-BY-3.0"
] | 9 | 2019-01-24T17:43:41.000Z | 2021-07-25T18:08:34.000Z | """
Object name: HorizontalCylinder
Functions: Gr(g,beta,DT,D,nu) gives the Grashoff number based on:
gravity g, thermal expansion coefficient beta, Temperature difference DT,
length scale D, viscosity nu
Ra(g,beta,DT,D,nu,alpha) gives the Rayleigh number where alpha is the thermal ... | 35.971154 | 102 | 0.493718 |
8a082a521a272e45316d72513cad8cc5c78a172e | 572 | py | Python | code_eval/utils/shapenet_pre_handle.py | leonardozcm/Point-Completion-Fig-AutoGenerator | 109f5a414f51469fac82d0d23cde69efb9cf97e0 | [
"Apache-2.0"
] | null | null | null | code_eval/utils/shapenet_pre_handle.py | leonardozcm/Point-Completion-Fig-AutoGenerator | 109f5a414f51469fac82d0d23cde69efb9cf97e0 | [
"Apache-2.0"
] | null | null | null | code_eval/utils/shapenet_pre_handle.py | leonardozcm/Point-Completion-Fig-AutoGenerator | 109f5a414f51469fac82d0d23cde69efb9cf97e0 | [
"Apache-2.0"
] | null | null | null | import os
def pre_handle(path):
shapenet_list = []
for folder in os.listdir(path):
dense_path = path + "/" + folder + "/pcds/dense/"
gt_path = path + "/" + folder + "/pcds/gt/"
item_list = []
for pcd in os.listdir(dense_path):
item_list.append([dense_path ... | 28.6 | 63 | 0.601399 |
c81e8d507d33b857658f520f84f36e820df38171 | 4,126 | py | Python | cryomem/common/plotproc.py | bebaek/cryomem | 088fba2568d10451adda51a068c15c8c2a73d9ce | [
"MIT"
] | 1 | 2018-09-16T12:29:04.000Z | 2018-09-16T12:29:04.000Z | cryomem/common/plotproc.py | bebaek/cryomem | 088fba2568d10451adda51a068c15c8c2a73d9ce | [
"MIT"
] | null | null | null | cryomem/common/plotproc.py | bebaek/cryomem | 088fba2568d10451adda51a068c15c8c2a73d9ce | [
"MIT"
] | null | null | null | import multiprocessing as mp
import queue
import matplotlib as mpl
mpl.use("tkagg")
import matplotlib.pyplot as plt
import time
from .plothyst import plothyst
#def _f_proc(q, **kwargs):
# """Process target function"""
# _Plotter(q, **kwargs)
class _Plotter(mp.Process):
"""Core plotting object. Controlled by... | 30.338235 | 94 | 0.554532 |
00e4870359998193f0559d67e24c0df288e0876c | 975 | py | Python | examples/neko.py | ahmed-amr1/schtabtag | d5f1e550fccaf58cbcf9fac39528b921659cec7c | [
"MIT"
] | null | null | null | examples/neko.py | ahmed-amr1/schtabtag | d5f1e550fccaf58cbcf9fac39528b921659cec7c | [
"MIT"
] | null | null | null | examples/neko.py | ahmed-amr1/schtabtag | d5f1e550fccaf58cbcf9fac39528b921659cec7c | [
"MIT"
] | null | null | null | from anekos import NekosLifeClient, SFWImageTags
import discord
from discord.ext import commands
neko = NekosLifeClient()
client = commands.Bot(command_prefix=".")
"""
<'solog', 'smug', 'feet', 'smallboobs', 'lewdkemo', 'woof', 'gasm', 'solo', '8ball', 'goose', 'cuddle', 'avatar', 'cum', 'slap', 'les', 'v3', ... | 54.166667 | 640 | 0.624615 |
898014f906d180a1e1f52b8cbe5b548feec2fc70 | 5,092 | py | Python | tests/integration/lambdas/lambda_integration.py | lsdev693/localstack | f384f5837caad840201258a3d94e19d4bf68571f | [
"Apache-2.0"
] | 1 | 2020-02-21T04:43:55.000Z | 2020-02-21T04:43:55.000Z | tests/integration/lambdas/lambda_integration.py | lsdev693/localstack | f384f5837caad840201258a3d94e19d4bf68571f | [
"Apache-2.0"
] | null | null | null | tests/integration/lambdas/lambda_integration.py | lsdev693/localstack | f384f5837caad840201258a3d94e19d4bf68571f | [
"Apache-2.0"
] | 1 | 2020-04-17T15:02:32.000Z | 2020-04-17T15:02:32.000Z | import json
import base64
import logging
import boto3.dynamodb.types
from io import BytesIO
from localstack.utils.aws import aws_stack
from localstack.utils.common import to_str, to_bytes
TEST_BUCKET_NAME = 'test-bucket'
KINESIS_STREAM_NAME = 'test_stream_1'
MSG_BODY_RAISE_ERROR_FLAG = 'raise_error'
MSG_BODY_MESSAGE_T... | 36.113475 | 110 | 0.654556 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.