hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7398e8292797a50bf6c42c368fc2eb59c7ca47ec | 5,612 | py | Python | feeds.py | yoursantu/indiannewsplus | 252f0367b43ec2edea636157bcf2d8a92dda6f3f | [
"MIT"
] | null | null | null | feeds.py | yoursantu/indiannewsplus | 252f0367b43ec2edea636157bcf2d8a92dda6f3f | [
"MIT"
] | null | null | null | feeds.py | yoursantu/indiannewsplus | 252f0367b43ec2edea636157bcf2d8a92dda6f3f | [
"MIT"
] | null | null | null | """RSS feeds for the `multilingual_news` app."""
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.shortcuts import get_current_site
from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse
from django.utils.transl... | 37.66443 | 76 | 0.661083 | 4,892 | 0.871703 | 0 | 0 | 0 | 0 | 0 | 0 | 1,118 | 0.199216 |
73991f48e7be2da65079b1e532a4f69842cc8cd4 | 15,814 | py | Python | config/settings/base.py | kingsdigitallab/field-django | 6ceba79866d6971a6891f0b81ca9ed2a2d5a32db | [
"MIT"
] | null | null | null | config/settings/base.py | kingsdigitallab/field-django | 6ceba79866d6971a6891f0b81ca9ed2a2d5a32db | [
"MIT"
] | 2 | 2020-08-12T23:53:01.000Z | 2022-02-10T09:41:09.000Z | config/settings/base.py | kingsdigitallab/field-django | 6ceba79866d6971a6891f0b81ca9ed2a2d5a32db | [
"MIT"
] | null | null | null | """
Base settings to build other settings files upon.
"""
import os
from pathlib import Path
import environ
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent
# field/
APPS_DIR = ROOT_DIR / "field"
env = environ.Env()
READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False)
if READ_DO... | 36.437788 | 93 | 0.622992 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11,977 | 0.757367 |
73997218b858bff90d72a13225aff826e20a867f | 5,464 | py | Python | tests/test_subtyping_processing.py | phac-nml/biohansel | 1f4da7081ed248fc0c2c52e36e0a4cf4adbb1c8d | [
"Apache-2.0"
] | 25 | 2018-09-24T16:14:06.000Z | 2021-10-06T00:47:26.000Z | tests/test_subtyping_processing.py | phac-nml/biohansel | 1f4da7081ed248fc0c2c52e36e0a4cf4adbb1c8d | [
"Apache-2.0"
] | 53 | 2018-07-13T16:13:43.000Z | 2021-03-04T19:58:41.000Z | tests/test_subtyping_processing.py | phac-nml/bio_hansel | 1f4da7081ed248fc0c2c52e36e0a4cf4adbb1c8d | [
"Apache-2.0"
] | 11 | 2018-09-24T16:14:11.000Z | 2020-11-05T17:17:15.000Z | # -*- coding: utf-8 -*-
import pandas as pd
import pytest
from bio_hansel.qc import QC
from bio_hansel.subtype import Subtype
from bio_hansel.subtype_stats import SubtypeCounts
from bio_hansel.subtyper import absent_downstream_subtypes, sorted_subtype_ints, empty_results, \
get_missing_internal_subtypes
from bio_... | 35.947368 | 112 | 0.548133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,083 | 0.198206 |
7399721b18f0c510e440d6fd414b7fdd42d11e8d | 8,869 | py | Python | capreolus/benchmark/codesearchnet.py | seanmacavaney/capreolus | 8695a471f9d8e911ad12778a82327e3973f92af0 | [
"Apache-2.0"
] | null | null | null | capreolus/benchmark/codesearchnet.py | seanmacavaney/capreolus | 8695a471f9d8e911ad12778a82327e3973f92af0 | [
"Apache-2.0"
] | null | null | null | capreolus/benchmark/codesearchnet.py | seanmacavaney/capreolus | 8695a471f9d8e911ad12778a82327e3973f92af0 | [
"Apache-2.0"
] | null | null | null | import gzip
import json
import pickle
from collections import defaultdict
from pathlib import Path
from zipfile import ZipFile
from tqdm import tqdm
from capreolus import ConfigOption, Dependency, constants
from capreolus.utils.common import download_file, remove_newline
from capreolus.utils.loginit import get_logger... | 39.95045 | 183 | 0.628481 | 8,355 | 0.942045 | 2,942 | 0.331717 | 8,395 | 0.946555 | 0 | 0 | 2,960 | 0.333747 |
739b66623c870e2641dd70a59dd1c2539187536e | 1,161 | py | Python | tests/cli.py | chriswmackey/honeybee-radiance-folder | 5576df94d781fd131c683c8b05aa04ac42df34b8 | [
"MIT"
] | null | null | null | tests/cli.py | chriswmackey/honeybee-radiance-folder | 5576df94d781fd131c683c8b05aa04ac42df34b8 | [
"MIT"
] | 113 | 2019-07-18T03:38:26.000Z | 2022-03-26T03:26:06.000Z | tests/cli.py | chriswmackey/honeybee-radiance-folder | 5576df94d781fd131c683c8b05aa04ac42df34b8 | [
"MIT"
] | 6 | 2019-07-18T00:05:26.000Z | 2021-10-04T08:50:26.000Z | from click.testing import CliRunner
from honeybee_radiance_folder.cli import filter_json_file
import json
import os
def test_filter_file():
runner = CliRunner()
input_file = './tests/assets/project_folder/grid_info.json'
output_file = './tests/assets/temp/grid_filtered_0.json'
result = runner.invoke(
... | 29.769231 | 88 | 0.669251 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 324 | 0.27907 |
739ba1a424b3444916622cc94f3e8ea065012ebc | 13,648 | py | Python | perma_web/perma/forms.py | leppert/perma | adb0cec29679c3d161d72330e19114f89f8c42ac | [
"MIT",
"Unlicense"
] | null | null | null | perma_web/perma/forms.py | leppert/perma | adb0cec29679c3d161d72330e19114f89f8c42ac | [
"MIT",
"Unlicense"
] | null | null | null | perma_web/perma/forms.py | leppert/perma | adb0cec29679c3d161d72330e19114f89f8c42ac | [
"MIT",
"Unlicense"
] | null | null | null | import logging
from django import forms
from django.forms import ModelForm
from django.forms.widgets import flatatt
from django.utils.html import mark_safe
from perma.models import Registrar, Organization, LinkUser
logger = logging.getLogger(__name__)
class RegistrarForm(ModelForm):
class Meta:
model = ... | 31.81352 | 158 | 0.656726 | 13,203 | 0.967394 | 0 | 0 | 0 | 0 | 0 | 0 | 4,011 | 0.293889 |
739baac2ff5ef50ecd5e6693fbb6afb0bb494d6a | 5,403 | py | Python | samples/sample-2.py | shoriwe/LVaED | 68ca38eed2b4c2b1b7a6a8304c8effbcf2f977f7 | [
"MIT"
] | null | null | null | samples/sample-2.py | shoriwe/LVaED | 68ca38eed2b4c2b1b7a6a8304c8effbcf2f977f7 | [
"MIT"
] | 19 | 2021-02-08T22:14:16.000Z | 2021-03-03T15:13:07.000Z | samples/sample-2.py | shoriwe/LVaED | 68ca38eed2b4c2b1b7a6a8304c8effbcf2f977f7 | [
"MIT"
] | 3 | 2021-08-30T01:06:32.000Z | 2022-02-21T03:22:28.000Z | import io
import os
import re
import zipfile
import flask
import markdown
import blueprints.example
import blueprints.home
import blueprints.presentation
import blueprints.transformations
class Zipper(object):
def __init__(self):
self._content = None
self._content_handler = io.BytesIO()
def append(self, file... | 37.006849 | 108 | 0.760689 | 837 | 0.154914 | 0 | 0 | 0 | 0 | 0 | 0 | 1,911 | 0.353692 |
739bd82ee95264fe3d722473cc7aa6319a24720f | 4,420 | py | Python | yexinyang/scripts/main.py | TheSignPainter/MLproject-docknet | 5d5647356f116d34ef57267524851e44595e5e93 | [
"MIT"
] | null | null | null | yexinyang/scripts/main.py | TheSignPainter/MLproject-docknet | 5d5647356f116d34ef57267524851e44595e5e93 | [
"MIT"
] | null | null | null | yexinyang/scripts/main.py | TheSignPainter/MLproject-docknet | 5d5647356f116d34ef57267524851e44595e5e93 | [
"MIT"
] | 4 | 2019-05-29T12:31:51.000Z | 2019-05-30T12:00:12.000Z | import os, time
import numpy as np
import logging
import fire
import torch
import torch.optim as optim
import torch.nn as nn
from torch.utils.data import DataLoader
from model import *
from dataset import *
def train(dataloader, model, optimizer, criterion, device):
epoch_loss = 0.0
total_nu... | 30.694444 | 102 | 0.601357 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 627 | 0.141855 |
739c941ac4971ed7f222b2a59535b53c9bba54d7 | 1,018 | py | Python | myconnectome/utils/download_file.py | poldrack/myconnectome | 201f414b3165894d6fe0be0677c8a58f6d161948 | [
"MIT"
] | 28 | 2015-04-02T16:43:14.000Z | 2020-06-17T20:04:26.000Z | myconnectome/utils/download_file.py | poldrack/myconnectome | 201f414b3165894d6fe0be0677c8a58f6d161948 | [
"MIT"
] | 11 | 2015-05-19T02:57:22.000Z | 2017-03-17T17:36:16.000Z | myconnectome/utils/download_file.py | poldrack/myconnectome | 201f414b3165894d6fe0be0677c8a58f6d161948 | [
"MIT"
] | 10 | 2015-05-21T17:01:26.000Z | 2020-11-11T04:28:08.000Z | # -*- coding: utf-8 -*-
"""
download file using requests
Created on Fri Jul 3 09:13:04 2015
@author: poldrack
"""
import requests
import os
from requests.packages.urllib3.util import Retry
from requests.adapters import HTTPAdapter
from requests import Session, exceptions
# from http://stackoverflow.com/questions/16... | 30.848485 | 104 | 0.698428 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 336 | 0.330059 |
739ceade8d1851b8f8c7cabe7fe9035c80fe7143 | 9,388 | py | Python | django-openstack/django_openstack/syspanel/views/instances.py | tylesmit/openstack-dashboard | 8199011a98aa8bc5672e977db014f61eccc4668c | [
"Apache-2.0"
] | 2 | 2015-05-18T13:50:23.000Z | 2015-05-18T14:47:08.000Z | django-openstack/django_openstack/syspanel/views/instances.py | tylesmit/openstack-dashboard | 8199011a98aa8bc5672e977db014f61eccc4668c | [
"Apache-2.0"
] | null | null | null | django-openstack/django_openstack/syspanel/views/instances.py | tylesmit/openstack-dashboard | 8199011a98aa8bc5672e977db014f61eccc4668c | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2011 Fourth Paradigm Development, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "Licen... | 36.96063 | 101 | 0.659139 | 0 | 0 | 0 | 0 | 6,973 | 0.742757 | 0 | 0 | 2,684 | 0.285897 |
739e11e44ead5664c57ce1862ebd696671d1bb6a | 612 | py | Python | image_png.py | tomasdisk/tommGL-py | 63876cc7211610908f388c2fd9b2b5f4dbd4411c | [
"MIT"
] | 1 | 2018-06-19T21:19:20.000Z | 2018-06-19T21:19:20.000Z | image_png.py | tomasdisk/tommGL-py | 63876cc7211610908f388c2fd9b2b5f4dbd4411c | [
"MIT"
] | null | null | null | image_png.py | tomasdisk/tommGL-py | 63876cc7211610908f388c2fd9b2b5f4dbd4411c | [
"MIT"
] | null | null | null | from datetime import datetime as dt
from bitmap import Bitmap, PilBitmap
h = 500
w = 500
image = Bitmap(w, h, alpha=True)
pil_image = PilBitmap(w, h, alpha=True)
color_red = 0
for i in range(h):
for j in range(w):
image.set_rgba_pixel(j, i, color_red, 0, 0, 150)
pil_image.set_rgba_pixel(j, i, colo... | 27.818182 | 70 | 0.643791 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.173203 |
739e6d0875de7997feffc9f90decf0de25b225f9 | 9,157 | py | Python | src/memberdef.py | alljoyn/devtools-codegen | 388cac15e584dce3040d5090e8f627e5360e5c0f | [
"0BSD"
] | null | null | null | src/memberdef.py | alljoyn/devtools-codegen | 388cac15e584dce3040d5090e8f627e5360e5c0f | [
"0BSD"
] | null | null | null | src/memberdef.py | alljoyn/devtools-codegen | 388cac15e584dce3040d5090e8f627e5360e5c0f | [
"0BSD"
] | null | null | null | # Copyright AllSeen Alliance. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR... | 33.177536 | 96 | 0.644207 | 3,937 | 0.429944 | 0 | 0 | 0 | 0 | 0 | 0 | 3,875 | 0.423174 |
739eb239f78d72920cbdfea243f1d357367bd4a8 | 2,187 | py | Python | ddcz/migrations/0010_creativepage_creativepageconcept_creativepagesection.py | Nathaka/graveyard | dcc5ba2fa1679318e65c0078f734cbfeeb287c32 | [
"MIT"
] | 6 | 2018-06-10T09:47:50.000Z | 2022-02-13T12:22:07.000Z | ddcz/migrations/0010_creativepage_creativepageconcept_creativepagesection.py | Nathaka/graveyard | dcc5ba2fa1679318e65c0078f734cbfeeb287c32 | [
"MIT"
] | 268 | 2018-05-30T21:54:50.000Z | 2022-01-08T21:00:03.000Z | ddcz/migrations/0010_creativepage_creativepageconcept_creativepagesection.py | jimmeak/graveyard | 4c0f9d5e8b6c965171d9dc228c765b662f5b7ab4 | [
"MIT"
] | 4 | 2018-09-14T03:50:08.000Z | 2021-04-19T19:36:23.000Z | # Generated by Django 2.0.2 on 2018-06-13 22:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("ddcz", "0009_auto_201806... | 30.375 | 68 | 0.40695 | 2,028 | 0.927298 | 0 | 0 | 0 | 0 | 0 | 0 | 226 | 0.103338 |
739f4a4af64c366326ef39984c42e5d44fc7cab0 | 8,145 | py | Python | libml/preprocess.py | isabella232/l2p | 4379849b009edd9d5fde71d625cbb9aa1166aa17 | [
"Apache-2.0"
] | 45 | 2021-12-20T19:14:30.000Z | 2022-03-31T14:08:44.000Z | libml/preprocess.py | google-research/l2p | 98b10eaf07d3dd899a324fe4149bf6f01e26c589 | [
"Apache-2.0"
] | 3 | 2021-12-29T03:53:22.000Z | 2022-03-18T01:08:25.000Z | libml/preprocess.py | isabella232/l2p | 4379849b009edd9d5fde71d625cbb9aa1166aa17 | [
"Apache-2.0"
] | 5 | 2021-12-22T01:37:18.000Z | 2022-02-14T23:17:38.000Z | # coding=utf-8
# Copyright 2020 The Learning-to-Prompt Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 38.060748 | 80 | 0.672437 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,329 | 0.285942 |
73a022545603af3f26c0bf2eec8dadb8c4ffd178 | 2,693 | py | Python | glue/viewers/matplotlib/qt/toolbar.py | tiagopereira/glue | 85bf7ce2d252d7bc405e8160b56fc83d46b9cbe4 | [
"BSD-3-Clause"
] | 1 | 2019-12-17T07:58:35.000Z | 2019-12-17T07:58:35.000Z | glue/viewers/matplotlib/qt/toolbar.py | scalet98/glue | ff949ad52e205c20561f48c05f870b2abb39e0b0 | [
"BSD-3-Clause"
] | null | null | null | glue/viewers/matplotlib/qt/toolbar.py | scalet98/glue | ff949ad52e205c20561f48c05f870b2abb39e0b0 | [
"BSD-3-Clause"
] | 1 | 2019-08-04T14:10:12.000Z | 2019-08-04T14:10:12.000Z | from __future__ import absolute_import, division, print_function
from matplotlib.backends.backend_qt5 import NavigationToolbar2QT
from glue.config import viewer_tool
from glue.viewers.common.tool import CheckableTool, Tool
__all__ = ['MatplotlibTool', 'MatplotlibCheckableTool', 'HomeTool', 'SaveTool',
'P... | 24.935185 | 88 | 0.678797 | 1,864 | 0.692165 | 0 | 0 | 1,358 | 0.50427 | 0 | 0 | 443 | 0.164501 |
73a0ab5a7274a4ae6d6cb3e1e3d9e17024ee3ea6 | 1,003 | py | Python | 2_4_overfitting_underfitting/utils_overfitting.py | layerwise/training | 21ad2a5684a3712192fb13f8214bc3bb4c975f3e | [
"MIT"
] | null | null | null | 2_4_overfitting_underfitting/utils_overfitting.py | layerwise/training | 21ad2a5684a3712192fb13f8214bc3bb4c975f3e | [
"MIT"
] | null | null | null | 2_4_overfitting_underfitting/utils_overfitting.py | layerwise/training | 21ad2a5684a3712192fb13f8214bc3bb4c975f3e | [
"MIT"
] | 1 | 2021-07-20T11:38:47.000Z | 2021-07-20T11:38:47.000Z | import matplotlib.pyplot as plt
import numpy as np
from ipywidgets import interactive, interactive_output, fixed, HBox, VBox
import ipywidgets as widgets
def true_function_old(x):
x_copy = -1 * x
f = 2 * x_copy * np.sin(0.8*x_copy) + 0.5 * x_copy**2 - 5
return f
def sigmoid(x, L=10, k=2, x_0=20):
re... | 24.463415 | 73 | 0.62014 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 105 | 0.104686 |
73a4124d5d48a030e18fb459f88816554d8ff126 | 1,036 | py | Python | analyze.py | sveitser/mandarin | 474617971e5eb9120d5ea5454cc2c49bb40b4977 | [
"MIT"
] | null | null | null | analyze.py | sveitser/mandarin | 474617971e5eb9120d5ea5454cc2c49bb40b4977 | [
"MIT"
] | null | null | null | analyze.py | sveitser/mandarin | 474617971e5eb9120d5ea5454cc2c49bb40b4977 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import jieba
import numpy as np
jieba.setLogLevel(60) # quiet
fname = sys.argv[1]
with open(fname) as f:
text = f.read()
tokenizer = jieba.Tokenizer()
tokens = list(tokenizer.cut(text))
occurences = np.array([tokenizer.FREQ[w] for w in tokens if w in tokenizer.FREQ])... | 20.313725 | 81 | 0.697876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.159266 |
73a548fe78fa2339c064396148e3d2072e173b7a | 2,836 | py | Python | brown_clustering/data.py | helpmefindaname/BrownClustering | 1b9d3e424a58813dec13ef619ca18e3671d75819 | [
"MIT"
] | 7 | 2021-11-30T13:35:46.000Z | 2022-03-31T14:01:04.000Z | brown_clustering/data.py | helpmefindaname/BrownClustering | 1b9d3e424a58813dec13ef619ca18e3671d75819 | [
"MIT"
] | null | null | null | brown_clustering/data.py | helpmefindaname/BrownClustering | 1b9d3e424a58813dec13ef619ca18e3671d75819 | [
"MIT"
] | null | null | null | from itertools import tee
from typing import Dict, Iterator, List, Sequence, Tuple
from brown_clustering.defaultvaluedict import DefaultValueDict
Corpus = Sequence[Sequence[str]]
class BigramCorpus:
def __init__(
self,
corpus: Corpus,
alpha: float = 1,
start_symbo... | 30.494624 | 78 | 0.565233 | 2,507 | 0.883992 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.077927 |
73a58a2a727d6573f018385b2dad3ec0e4b46b5e | 3,299 | py | Python | xs/layers/ops.py | eLeVeNnN/xshinnosuke | 69da91e0ea5042437edfc31c0e6ff9ef394c6cc9 | [
"MIT"
] | 290 | 2020-07-06T02:13:12.000Z | 2021-01-04T14:23:39.000Z | xs/layers/ops.py | E1eveNn/xshinnosuke | 69da91e0ea5042437edfc31c0e6ff9ef394c6cc9 | [
"MIT"
] | 1 | 2020-12-03T11:11:48.000Z | 2020-12-03T11:11:48.000Z | xs/layers/ops.py | E1eveNn/xshinnosuke | 69da91e0ea5042437edfc31c0e6ff9ef394c6cc9 | [
"MIT"
] | 49 | 2020-07-16T00:27:47.000Z | 2020-11-26T03:03:14.000Z | from .base import *
class Input(Layer):
def __init__(self, input_shape: Union[List, Tuple], **kwargs):
super(Input, self).__init__(input_shape=input_shape, **kwargs)
self._shape = input_shape
def call(self, x: F.Tensor, *args, **kwargs) -> F.Tensor:
self._data = x
return self.... | 39.746988 | 114 | 0.620794 | 3,267 | 0.9903 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.00485 |
73a60122798b5b44ac1b77285ac69b9d5cb78587 | 2,888 | py | Python | fcore/util.py | superwhyun/farmos | 9292f3ba24b7d07002af0549ae510ce4edf09ce5 | [
"BSD-3-Clause"
] | null | null | null | fcore/util.py | superwhyun/farmos | 9292f3ba24b7d07002af0549ae510ce4edf09ce5 | [
"BSD-3-Clause"
] | null | null | null | fcore/util.py | superwhyun/farmos | 9292f3ba24b7d07002af0549ae510ce4edf09ce5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018 JiNong, Inc.
# All right reserved.
#
"""
Utility Functions를 정의함.
"""
import time
import math
import logging
import logging.handlers
def getdefaultlogger():
_logger = logging.getLogger('mate')
_logger.setLevel(logging.DEBUG)
streamHa... | 33.976471 | 158 | 0.621191 | 2,206 | 0.76174 | 0 | 0 | 0 | 0 | 0 | 0 | 366 | 0.126381 |
73a657e874819eb1f55d87b508eba3c94d916b59 | 144 | py | Python | src/lib/__init__.py | gfjiangly/RCNet | ef6860f23943eb8e21fdec565019f2f8eda17673 | [
"MIT"
] | null | null | null | src/lib/__init__.py | gfjiangly/RCNet | ef6860f23943eb8e21fdec565019f2f8eda17673 | [
"MIT"
] | null | null | null | src/lib/__init__.py | gfjiangly/RCNet | ef6860f23943eb8e21fdec565019f2f8eda17673 | [
"MIT"
] | null | null | null | # -*- encoding:utf-8 -*-
# @Time : 2019/10/23 15:45
# @Author : gfjiang
# @Site :
# @File : __init__.py
# @Software: PyCharm
| 18 | 30 | 0.513889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.944444 |
73a7196bbf0eb253a97a49fbb8e7cb7ec93df591 | 611 | py | Python | tests/manual/i3wmcommands.py | diegoperezm/screencast-script | ac477c6f44a151cafa88ebfd981d2bbe34f792bd | [
"MIT"
] | null | null | null | tests/manual/i3wmcommands.py | diegoperezm/screencast-script | ac477c6f44a151cafa88ebfd981d2bbe34f792bd | [
"MIT"
] | null | null | null | tests/manual/i3wmcommands.py | diegoperezm/screencast-script | ac477c6f44a151cafa88ebfd981d2bbe34f792bd | [
"MIT"
] | null | null | null | import sys
# for development
sys.path.append('../../src')
from screencastscript import ScreencastScript # noqa: E402
screencast = ScreencastScript()
screencast.sleep(1)
screencast.i3wm_focus_left()
screencast.sleep(1)
screencast.i3wm_zoom_in()
screencast.sleep(1)
screencast.i3wm_zoom_out()
screencast.sleep(1)
sc... | 16.972222 | 59 | 0.800327 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.065466 |
73a7a553c3b396a8049a5ddf4e1a0e97e5a14ea4 | 1,003 | py | Python | hippocampus/scripts/s04_hipp_cortex_fc_mean.py | CNG-LAB/cng-open | b775a8fd554a39ad3b4033e545bd4bf68f7ed46b | [
"MIT"
] | null | null | null | hippocampus/scripts/s04_hipp_cortex_fc_mean.py | CNG-LAB/cng-open | b775a8fd554a39ad3b4033e545bd4bf68f7ed46b | [
"MIT"
] | null | null | null | hippocampus/scripts/s04_hipp_cortex_fc_mean.py | CNG-LAB/cng-open | b775a8fd554a39ad3b4033e545bd4bf68f7ed46b | [
"MIT"
] | null | null | null | """
computes the mean hippocampal-cortical functional connectivity (fc) matrix,
for the left hemisphere subfields
"""
import os
import h5py
import numpy as np
# data dirs
ddir = '../data/'
conndir = '../data/tout_hippoc/'
odir = '../data/tout_group/'
# get HCP - S900 subject list
subjlist = '../d... | 25.075 | 75 | 0.645065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 427 | 0.425723 |
73a85bf483c1c47a0091ad63bb16957bd6c8d4f4 | 3,907 | py | Python | setup.py | sgp79/reptools | 3290b8daab58a0c5f2965fb221f7b480c380966b | [
"MIT"
] | null | null | null | setup.py | sgp79/reptools | 3290b8daab58a0c5f2965fb221f7b480c380966b | [
"MIT"
] | 1 | 2021-12-10T13:09:54.000Z | 2021-12-10T13:09:54.000Z | setup.py | sgp79/reptools | 3290b8daab58a0c5f2965fb221f7b480c380966b | [
"MIT"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
#To install:
# py -3 setup.py sdist
# pip3 install .
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
from os import path
from io import... | 32.831933 | 98 | 0.653187 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,728 | 0.698234 |
73a9012563f8e544e446267b12c23f24456df159 | 1,563 | py | Python | peeldb/migrations/0033_auto_20171018_1423.py | ashwin31/opensource-job-portal | 2885ea52f8660e893fe0531c986e3bee33d986a2 | [
"MIT"
] | 1 | 2021-09-27T05:01:39.000Z | 2021-09-27T05:01:39.000Z | peeldb/migrations/0033_auto_20171018_1423.py | kiran1415/opensource-job-portal | 2885ea52f8660e893fe0531c986e3bee33d986a2 | [
"MIT"
] | null | null | null | peeldb/migrations/0033_auto_20171018_1423.py | kiran1415/opensource-job-portal | 2885ea52f8660e893fe0531c986e3bee33d986a2 | [
"MIT"
] | 1 | 2022-01-05T09:02:32.000Z | 2022-01-05T09:02:32.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-10-18 14:23
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('peeldb', '0032_skill_skill_type'),
]
operations = [
migrations.AlterField(
... | 40.076923 | 130 | 0.435061 | 1,405 | 0.898912 | 0 | 0 | 0 | 0 | 0 | 0 | 418 | 0.267434 |
73a9cda8e0d2bd2c5fe35622d180c1e9b443a525 | 1,905 | py | Python | application/modules/post/windows-priv-check/wpc/report/issues.py | cys3c/viper-shell | e05a07362b7d1e6d73c302a24d2506846e43502c | [
"PSF-2.0",
"BSD-2-Clause"
] | 2 | 2018-06-30T03:21:30.000Z | 2020-03-22T02:31:02.000Z | application/modules/post/windows-priv-check/wpc/report/issues.py | cys3c/viper-shell | e05a07362b7d1e6d73c302a24d2506846e43502c | [
"PSF-2.0",
"BSD-2-Clause"
] | null | null | null | application/modules/post/windows-priv-check/wpc/report/issues.py | cys3c/viper-shell | e05a07362b7d1e6d73c302a24d2506846e43502c | [
"PSF-2.0",
"BSD-2-Clause"
] | 3 | 2017-11-15T11:08:20.000Z | 2020-03-22T02:31:03.000Z | from wpc.report.issue import issue
import xml.etree.cElementTree as etree
from lxml import etree as letree
from operator import itemgetter, attrgetter, methodcaller
# TODO should this class contain info about the scan? or define a new class called report?
# Version of script
# Date, time of audit
# Who the audit ran... | 31.229508 | 95 | 0.632546 | 1,548 | 0.812598 | 0 | 0 | 0 | 0 | 0 | 0 | 392 | 0.205774 |
73aa3640a120523b4d2b177f875511cc1784ef46 | 1,456 | py | Python | util/doxify.py | lanfangping/ravel | 7be759f219828b09696faf0b3eb52e83243998f9 | [
"Apache-2.0"
] | 9 | 2016-03-14T19:19:21.000Z | 2020-03-24T07:04:39.000Z | util/doxify.py | lanfangping/ravel | 7be759f219828b09696faf0b3eb52e83243998f9 | [
"Apache-2.0"
] | null | null | null | util/doxify.py | lanfangping/ravel | 7be759f219828b09696faf0b3eb52e83243998f9 | [
"Apache-2.0"
] | 10 | 2016-05-10T14:47:56.000Z | 2021-11-08T05:47:47.000Z | #!/usr/bin/python
"""
From Mininet 2.2.1: convert simple documentation to epydoc/pydoctor-compatible markup
"""
from sys import stdin, stdout, argv
import os
from tempfile import mkstemp
from subprocess import call
import re
spaces = re.compile(r'\s+')
singleLineExp = re.compile(r'\s+"([^"]+)"')
commentStartExp = r... | 23.483871 | 85 | 0.625687 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 311 | 0.213599 |
73aa48515ec8f415bcd5c491e96baf51080aa39d | 3,924 | py | Python | mysite/stock/views.py | flohh-py/django-tutorial | feecb2b25d88abe0cdccdae4cef87658fa5d8ea7 | [
"MIT"
] | null | null | null | mysite/stock/views.py | flohh-py/django-tutorial | feecb2b25d88abe0cdccdae4cef87658fa5d8ea7 | [
"MIT"
] | null | null | null | mysite/stock/views.py | flohh-py/django-tutorial | feecb2b25d88abe0cdccdae4cef87658fa5d8ea7 | [
"MIT"
] | null | null | null | from django.views.generic import ListView, DetailView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.urls import reverse_lazy, reverse
from django.shortcuts import redirect
from .models import StockEntry, StockEntryLine
from .forms import StockEntryForm, StockEntryLineForm, StockEn... | 34.421053 | 79 | 0.690367 | 3,534 | 0.900612 | 0 | 0 | 0 | 0 | 0 | 0 | 1,227 | 0.312691 |
73aaccfbd257c25514479c0a480ba43ed3380e07 | 2,589 | py | Python | src/sentry/web/frontend/generic.py | erhuabushuo/sentry | 8b3bad10155aaacfdff80910e5972e64304e880c | [
"BSD-3-Clause"
] | null | null | null | src/sentry/web/frontend/generic.py | erhuabushuo/sentry | 8b3bad10155aaacfdff80910e5972e64304e880c | [
"BSD-3-Clause"
] | null | null | null | src/sentry/web/frontend/generic.py | erhuabushuo/sentry | 8b3bad10155aaacfdff80910e5972e64304e880c | [
"BSD-3-Clause"
] | null | null | null | """
sentry.web.frontend.generic
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from... | 31.573171 | 121 | 0.683275 | 0 | 0 | 0 | 0 | 701 | 0.270761 | 0 | 0 | 893 | 0.344921 |
73aaee020a07b3d8d2a092fd658dc4eb59eaed84 | 878 | py | Python | setup.py | harsh020/synthetic_metric | acecba0150a37c58613a477918ad407373c4cd5c | [
"MIT"
] | 1 | 2021-11-08T09:19:02.000Z | 2021-11-08T09:19:02.000Z | setup.py | harsh020/synthetic_metric | acecba0150a37c58613a477918ad407373c4cd5c | [
"MIT"
] | 2 | 2021-10-14T11:30:21.000Z | 2021-10-14T11:55:50.000Z | setup.py | harsh020/synthetic_metric | acecba0150a37c58613a477918ad407373c4cd5c | [
"MIT"
] | null | null | null | import setuptools
setuptools.setup(
name="synmetric",
version="0.2.dev1",
license='MIT',
author="Harsh Soni",
author_email="[email protected]",
description="Metric to evaluate data quality for synthetic data.",
url="https://github.com/harsh020/synthetic_metric",
download_url = 'https:... | 28.322581 | 90 | 0.624146 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 482 | 0.548975 |
73ac2455924ff0001809acc001de20f6e6bc1656 | 813 | py | Python | neurokit2/microstates/__init__.py | danibene/NeuroKit | df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a | [
"MIT"
] | 1 | 2020-12-31T17:48:11.000Z | 2020-12-31T17:48:11.000Z | neurokit2/microstates/__init__.py | danibene/NeuroKit | df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a | [
"MIT"
] | null | null | null | neurokit2/microstates/__init__.py | danibene/NeuroKit | df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a | [
"MIT"
] | 2 | 2021-12-25T15:39:49.000Z | 2021-12-25T15:44:16.000Z | """Submodule for NeuroKit."""
from .microstates_clean import microstates_clean
from .microstates_peaks import microstates_peaks
from .microstates_static import microstates_static
from .microstates_dynamic import microstates_dynamic
from .microstates_complexity import microstates_complexity
from .microstates_segment im... | 35.347826 | 58 | 0.771218 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 217 | 0.266913 |
73ac5bc20db43b168b228169be2bbfd420f16a64 | 2,184 | py | Python | notario/tests/validators/test_hybrid.py | alfredodeza/notario | 036bdc8435778c6f20f059d3789c8eb8242cff92 | [
"MIT"
] | 4 | 2015-08-20T20:14:55.000Z | 2018-06-01T14:39:29.000Z | notario/tests/validators/test_hybrid.py | alfredodeza/notario | 036bdc8435778c6f20f059d3789c8eb8242cff92 | [
"MIT"
] | 9 | 2016-02-04T21:46:12.000Z | 2018-11-14T04:43:10.000Z | notario/tests/validators/test_hybrid.py | alfredodeza/notario | 036bdc8435778c6f20f059d3789c8eb8242cff92 | [
"MIT"
] | 4 | 2015-04-29T20:40:12.000Z | 2018-11-14T04:08:20.000Z | from pytest import raises
from notario.validators import Hybrid
from notario.exceptions import Invalid
from notario.decorators import optional
from notario import validate
def validator(x):
assert x, 'fail'
class TestHybrid(object):
def test_use_validator_passes(self):
schema = ()
hybrid = ... | 29.513514 | 68 | 0.588828 | 1,965 | 0.899725 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.092491 |
73ac608fd669eeeca5d58b623c5bbec41cd2e0ea | 346 | py | Python | players/urls.py | OnerInce/nfl-rest_api | 8d66d68ae7f04476a1b9f509e69a9d0dc83bfcca | [
"Apache-2.0"
] | 2 | 2021-06-14T18:14:10.000Z | 2022-01-29T18:45:28.000Z | players/urls.py | OnerInce/nfl-rest_api | 8d66d68ae7f04476a1b9f509e69a9d0dc83bfcca | [
"Apache-2.0"
] | null | null | null | players/urls.py | OnerInce/nfl-rest_api | 8d66d68ae7f04476a1b9f509e69a9d0dc83bfcca | [
"Apache-2.0"
] | 1 | 2022-02-09T14:14:20.000Z | 2022-02-09T14:14:20.000Z | from django.urls import path, include
from . import views
from rest_framework import routers
router = routers.SimpleRouter()
router.register(r'players', views.PlayerView, basename='players')
router.register(r'teams', views.TeamView, basename='teams')
urlpatterns = [
path('', views.APIWelcomeView),
path('', ... | 28.833333 | 66 | 0.736994 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.109827 |
73ad356948f61ca0a0905878d21b428c799f6aa2 | 380 | py | Python | watch/migrations/0014_auto_20201101_2304.py | msyoki/Neighborhood | d7eb55ba7772388850d8bcf04a867aba3fa81665 | [
"Unlicense"
] | null | null | null | watch/migrations/0014_auto_20201101_2304.py | msyoki/Neighborhood | d7eb55ba7772388850d8bcf04a867aba3fa81665 | [
"Unlicense"
] | null | null | null | watch/migrations/0014_auto_20201101_2304.py | msyoki/Neighborhood | d7eb55ba7772388850d8bcf04a867aba3fa81665 | [
"Unlicense"
] | 1 | 2021-02-08T10:27:06.000Z | 2021-02-08T10:27:06.000Z | # Generated by Django 2.0.2 on 2020-11-01 20:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('watch', '0013_alert'),
]
operations = [
migrations.AlterField(
model_name='alert',
name='news',
field=mo... | 20 | 62 | 0.584211 | 287 | 0.755263 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 0.207895 |
73aed6f56861e4609809462a9a1cf35c41cc4da9 | 612 | py | Python | torchx/examples/apps/lightning_classy_vision/test/component_test.py | LaudateCorpus1/torchx | 9ee0fdbf63882ba836c00d7522f6850c0c6dc418 | [
"BSD-3-Clause"
] | 101 | 2021-06-12T20:00:09.000Z | 2022-03-31T11:14:35.000Z | torchx/examples/apps/lightning_classy_vision/test/component_test.py | LaudateCorpus1/torchx | 9ee0fdbf63882ba836c00d7522f6850c0c6dc418 | [
"BSD-3-Clause"
] | 340 | 2021-06-14T18:16:12.000Z | 2022-03-31T21:10:28.000Z | torchx/examples/apps/lightning_classy_vision/test/component_test.py | LaudateCorpus1/torchx | 9ee0fdbf63882ba836c00d7522f6850c0c6dc418 | [
"BSD-3-Clause"
] | 19 | 2021-06-13T06:17:21.000Z | 2022-03-28T19:28:00.000Z | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import torchx.examples.apps.lightning_classy_vision.component as lightning_classy_vision
from torchx.components... | 36 | 88 | 0.785948 | 243 | 0.397059 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.364379 |
73aff3784e37e6b27b43b9c61f5212221ec2b0ef | 1,270 | py | Python | app.py | cykreet/getV | 429833b94fe9c40c594290c9d4b163e8559a4033 | [
"MIT"
] | null | null | null | app.py | cykreet/getV | 429833b94fe9c40c594290c9d4b163e8559a4033 | [
"MIT"
] | null | null | null | app.py | cykreet/getV | 429833b94fe9c40c594290c9d4b163e8559a4033 | [
"MIT"
] | null | null | null | import requests
from sanic import Sanic
from sanic.response import json
from sanic_limiter import Limiter, get_remote_address
from bs4 import BeautifulSoup
async def ratelimit_handler(request, exception):
return json({"error": f"Ratelimit exceeded {exception}."}, status=429)
app = Sanic()
app.error_handler.add(... | 36.285714 | 169 | 0.670866 | 0 | 0 | 0 | 0 | 749 | 0.589764 | 856 | 0.674016 | 361 | 0.284252 |
73b067acf9b9f460405ab89ad75c34fdcfb06605 | 8,373 | py | Python | third_party/xiuminglib/xiuminglib/vis/video.py | leehsiu/nerfactor | 87f7d3ffa56bdbca925958a4b89e249d35006c80 | [
"Apache-2.0"
] | 183 | 2021-06-04T01:22:57.000Z | 2022-03-31T06:18:20.000Z | third_party/xiuminglib/xiuminglib/vis/video.py | leehsiu/nerfactor | 87f7d3ffa56bdbca925958a4b89e249d35006c80 | [
"Apache-2.0"
] | 40 | 2019-05-05T17:04:10.000Z | 2021-09-06T18:11:19.000Z | third_party/xiuminglib/xiuminglib/vis/video.py | leehsiu/nerfactor | 87f7d3ffa56bdbca925958a4b89e249d35006c80 | [
"Apache-2.0"
] | 26 | 2021-06-04T18:28:11.000Z | 2022-03-22T13:44:19.000Z | from os.path import join, dirname
import numpy as np
from .text import put_text
from .. import const
from ..os import makedirs
from ..imprt import preset_import
from ..log import get_logger
logger = get_logger()
def make_video(
imgs, fps=24, outpath=None, method='matplotlib', dpi=96, bitrate=-1):
"""Wri... | 37.886878 | 80 | 0.609817 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,253 | 0.388511 |
73b135f20a4d854cdb5b09c10b76e9756be5c474 | 161 | py | Python | shipfunk_python/__init__.py | vilkasgroup/shipfunk_python | cd8a5414bda7e9670511c52d0b4df2efd11ee5d9 | [
"MIT"
] | null | null | null | shipfunk_python/__init__.py | vilkasgroup/shipfunk_python | cd8a5414bda7e9670511c52d0b4df2efd11ee5d9 | [
"MIT"
] | 2 | 2018-01-16T07:32:18.000Z | 2018-01-17T07:29:41.000Z | shipfunk_python/__init__.py | vilkasgroup/shipfunk_python | cd8a5414bda7e9670511c52d0b4df2efd11ee5d9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for Shipfunk."""
__author__ = """Jaana Sarajärvi"""
__email__ = '[email protected]'
__version__ = '0.1.1'
| 20.125 | 39 | 0.652174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.716049 |
73b14a8ac2d94f0475d3f40d5181eb41aedadcce | 638 | py | Python | vpc/nos/driver/ovs/ne.py | zhufawuwo/baton | 64c88750bc96b92e268b4903f34a1d5021c686f4 | [
"Apache-2.0"
] | null | null | null | vpc/nos/driver/ovs/ne.py | zhufawuwo/baton | 64c88750bc96b92e268b4903f34a1d5021c686f4 | [
"Apache-2.0"
] | null | null | null | vpc/nos/driver/ovs/ne.py | zhufawuwo/baton | 64c88750bc96b92e268b4903f34a1d5021c686f4 | [
"Apache-2.0"
] | null | null | null | #! python3
# coding: utf-8
from vpc.nos import NetworkElement,NetworkElementEvent,event_t,EventChain
class OVSEvent(NetworkElementEvent):
def __init__(self,ne_id,type):
super().__init__(ne_id,type)
class OVS(NetworkElement):
def __init__(self,channel,datapath):
super().__init__()
self... | 20.580645 | 73 | 0.653605 | 492 | 0.77116 | 0 | 0 | 63 | 0.098746 | 0 | 0 | 35 | 0.054859 |
73b18a00ca497be31f461b8bdce57d8afe3a826f | 1,307 | py | Python | cumulusci/core/config/BaseConfig.py | leboff/CumulusCI | 81edbb1d64f2cc215a951c570052a1e423821cc1 | [
"BSD-3-Clause"
] | 163 | 2018-09-13T18:49:34.000Z | 2022-03-25T08:37:15.000Z | cumulusci/core/config/BaseConfig.py | leboff/CumulusCI | 81edbb1d64f2cc215a951c570052a1e423821cc1 | [
"BSD-3-Clause"
] | 1,280 | 2018-09-11T20:09:37.000Z | 2022-03-31T18:40:21.000Z | cumulusci/core/config/BaseConfig.py | leboff/CumulusCI | 81edbb1d64f2cc215a951c570052a1e423821cc1 | [
"BSD-3-Clause"
] | 93 | 2018-09-13T07:29:22.000Z | 2022-03-26T23:15:48.000Z | import logging
class BaseConfig(object):
"""BaseConfig provides a common interface for nested access for all Config objects in CCI."""
defaults = {}
def __init__(self, config=None, keychain=None):
if config is None:
self.config = {}
else:
self.config = config
... | 28.413043 | 97 | 0.560826 | 1,289 | 0.986228 | 0 | 0 | 0 | 0 | 0 | 0 | 292 | 0.223412 |
73b21fcf6f7c734702d8957b8a9a200636e97246 | 8,995 | py | Python | scikit_algo/All.py | sankar-mukherjee/CoFee | d05b461a6cdd581be0f8084a804f02be3332ccdd | [
"Apache-2.0"
] | null | null | null | scikit_algo/All.py | sankar-mukherjee/CoFee | d05b461a6cdd581be0f8084a804f02be3332ccdd | [
"Apache-2.0"
] | null | null | null | scikit_algo/All.py | sankar-mukherjee/CoFee | d05b461a6cdd581be0f8084a804f02be3332ccdd | [
"Apache-2.0"
] | null | null | null | """
Created on Tue Feb 24 16:08:39 2015
@author: mukherjee
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn import preprocessing, metrics
from sklearn.learning_curve import learning_curve
# read Form data
DATA_FORM_FILE = 'all-merged-cat.csv'
#rawdata = pd.read_cs... | 36.864754 | 104 | 0.642023 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,115 | 0.568649 |
73b2b67943acda046ca7c7f56efd2e03603a7e68 | 4,140 | py | Python | tests/test_client.py | KazkiMatz/py-googletrans | c1d6d5d27c7386c2a1aa6c78dfe376dbb910f7a5 | [
"MIT"
] | null | null | null | tests/test_client.py | KazkiMatz/py-googletrans | c1d6d5d27c7386c2a1aa6c78dfe376dbb910f7a5 | [
"MIT"
] | 1 | 2020-11-28T18:53:18.000Z | 2020-11-28T18:53:18.000Z | tests/test_client.py | TashinAhmed/googletrans | 9c0014cdcdc22e1f146624279f8dd69c3c62e385 | [
"MIT"
] | null | null | null | from httpcore import TimeoutException
from httpcore._exceptions import ConnectError
from httpx import Timeout, Client, ConnectTimeout
from unittest.mock import patch
from pytest import raises
from googletrans import Translator
def test_bind_multiple_service_urls():
service_urls = [
'translate.google.com'... | 25.714286 | 73 | 0.68913 | 137 | 0.032357 | 0 | 0 | 177 | 0.041804 | 0 | 0 | 741 | 0.175012 |
73b2dbd6e7f9c859fe75e459a5b5509630530b13 | 3,324 | py | Python | Network/class_func.py | Mobad225/S-DCNet | a5fff5da2e04441f1f9133944ad09bdf087896e6 | [
"MIT"
] | 153 | 2019-07-31T07:27:11.000Z | 2022-01-05T08:52:56.000Z | Network/class_func.py | Mobad225/S-DCNet | a5fff5da2e04441f1f9133944ad09bdf087896e6 | [
"MIT"
] | 17 | 2019-09-11T07:45:29.000Z | 2021-04-20T05:10:47.000Z | Network/class_func.py | Mobad225/S-DCNet | a5fff5da2e04441f1f9133944ad09bdf087896e6 | [
"MIT"
] | 30 | 2019-08-20T05:35:20.000Z | 2021-11-07T07:49:19.000Z | # -*- coding: utf-8 -*-
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
# Func1: change density map into count map
# density map: batch size * 1 * w * h
def get_local_count(density_map,psize,pstride):
IF_gpu = torch.cuda.is_available() # if gpu, return gpu
IF_r... | 34.625 | 99 | 0.647112 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 532 | 0.160048 |
73b325d3f7c7dfbcd48251ddfe6b8d3299767cb6 | 540 | py | Python | src/python/pants/backend/codegen/avro/avro_subsystem.py | danxmoran/pants | 7fafd7d789747c9e6a266847a0ccce92c3fa0754 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/codegen/avro/avro_subsystem.py | danxmoran/pants | 7fafd7d789747c9e6a266847a0ccce92c3fa0754 | [
"Apache-2.0"
] | 22 | 2022-01-27T09:59:50.000Z | 2022-03-30T07:06:49.000Z | src/python/pants/backend/codegen/avro/avro_subsystem.py | danxmoran/pants | 7fafd7d789747c9e6a266847a0ccce92c3fa0754 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from pants.option.option_types import BoolOption
from pants.option.subsystem import Subsystem
class AvroSubsystem(Subsystem):
options_scope = "avr... | 27 | 75 | 0.709259 | 275 | 0.509259 | 0 | 0 | 0 | 0 | 0 | 0 | 238 | 0.440741 |
73b51f1631247fbf3daf41c2e06e80f0d22df79c | 11,864 | py | Python | shade/tests/unit/test_shade.py | mail2nsrajesh/shade | 65ce1a22896e52ff59a23a393e3bc4227f55f006 | [
"Apache-2.0"
] | null | null | null | shade/tests/unit/test_shade.py | mail2nsrajesh/shade | 65ce1a22896e52ff59a23a393e3bc4227f55f006 | [
"Apache-2.0"
] | null | null | null | shade/tests/unit/test_shade.py | mail2nsrajesh/shade | 65ce1a22896e52ff59a23a393e3bc4227f55f006 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 34.99705 | 76 | 0.567515 | 10,932 | 0.921443 | 0 | 0 | 1,418 | 0.119521 | 0 | 0 | 3,089 | 0.260367 |
73b53eb4cdb22bcc92d1f7a0efda19417f586729 | 3,780 | py | Python | plots_tournament.py | rradules/opponent_modelling_monfg | eb28546a6024613a76c942a2e53a48e6a8d83233 | [
"MIT"
] | 1 | 2021-03-04T04:40:50.000Z | 2021-03-04T04:40:50.000Z | plots_tournament.py | rradules/opponent_modelling_monfg | eb28546a6024613a76c942a2e53a48e6a8d83233 | [
"MIT"
] | null | null | null | plots_tournament.py | rradules/opponent_modelling_monfg | eb28546a6024613a76c942a2e53a48e6a8d83233 | [
"MIT"
] | null | null | null | import matplotlib
import pandas as pd
matplotlib.rcParams['pdf.fonttype'] = 42
matplotlib.rcParams['ps.fonttype'] = 42
import matplotlib.pyplot as plt
import seaborn as sns
from utils.utils import mkdir_p
sns.set()
sns.despine()
sns.set_context("paper", rc={"font.size": 18, "axes.labelsize": 18, "xtick.labelsize": 15... | 34.678899 | 113 | 0.579101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,195 | 0.316138 |
73b6522af809e94b26c9f10e4657b8e31125731b | 3,979 | py | Python | test/test_wrapper.py | bertsky/ocrd_keraslm | da105a8a8b68844389cd3e08307c05c9c6123350 | [
"Apache-2.0"
] | null | null | null | test/test_wrapper.py | bertsky/ocrd_keraslm | da105a8a8b68844389cd3e08307c05c9c6123350 | [
"Apache-2.0"
] | null | null | null | test/test_wrapper.py | bertsky/ocrd_keraslm | da105a8a8b68844389cd3e08307c05c9c6123350 | [
"Apache-2.0"
] | null | null | null | import os, sys
import shutil
from unittest import TestCase, main
from ocrd.resolver import Resolver
from ocrd_models.ocrd_page import to_xml
from ocrd_modelfactory import page_from_file
from ocrd_utils import MIMETYPE_PAGE
from ocrd_tesserocr.recognize import TesserocrRecognize
from ocrd_keraslm.wrapper import KerasRa... | 43.25 | 103 | 0.605931 | 3,516 | 0.883639 | 0 | 0 | 0 | 0 | 0 | 0 | 1,084 | 0.27243 |
73b6bd8f4831b3ecbdd4ef2d6b98086651e18b51 | 16,415 | py | Python | meltingpot/python/configs/substrates/territory_rooms.py | Rohan138/meltingpot | d4e3839225b78babcedbbbf95cf747ff9e0a87b5 | [
"Apache-2.0"
] | null | null | null | meltingpot/python/configs/substrates/territory_rooms.py | Rohan138/meltingpot | d4e3839225b78babcedbbbf95cf747ff9e0a87b5 | [
"Apache-2.0"
] | null | null | null | meltingpot/python/configs/substrates/territory_rooms.py | Rohan138/meltingpot | d4e3839225b78babcedbbbf95cf747ff9e0a87b5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 31.266667 | 80 | 0.50003 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,556 | 0.460311 |
73b6d9825bd3d60f6c8e389a888e756f7df56287 | 5,269 | py | Python | aptitudetech_private/tasks.py | CloudGround/aptitudetech_private | d4d150226bd33ea0c76086264286ae7cae52457f | [
"MIT"
] | null | null | null | aptitudetech_private/tasks.py | CloudGround/aptitudetech_private | d4d150226bd33ea0c76086264286ae7cae52457f | [
"MIT"
] | null | null | null | aptitudetech_private/tasks.py | CloudGround/aptitudetech_private | d4d150226bd33ea0c76086264286ae7cae52457f | [
"MIT"
] | 1 | 2019-05-17T00:04:05.000Z | 2019-05-17T00:04:05.000Z | #-*- coding: utf-8 -*-
import frappe
import boto3
import boto3.session
import rows
import json
import zipfile
import tempfile
import sqlite3
from io import BytesIO
from frappe import _
from frappe.utils import cint, flt, today, getdate, get_first_day, add_to_date
try:
from frappe.utils import file_manager
with_file_... | 31.933333 | 139 | 0.72974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,737 | 0.329664 |
73b7ddfb55e7a791df45923bdbfc93d74e627ca1 | 1,983 | py | Python | udfs/tests/test_run_udfs.py | tslr/bigquery-utils | 67143b87a24bbbde684aa5ff061f80ffc27c71ed | [
"Apache-2.0"
] | null | null | null | udfs/tests/test_run_udfs.py | tslr/bigquery-utils | 67143b87a24bbbde684aa5ff061f80ffc27c71ed | [
"Apache-2.0"
] | null | null | null | udfs/tests/test_run_udfs.py | tslr/bigquery-utils | 67143b87a24bbbde684aa5ff061f80ffc27c71ed | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.054545 | 87 | 0.642965 | 1,182 | 0.596067 | 0 | 0 | 1,139 | 0.574382 | 0 | 0 | 728 | 0.367121 |
73b8798661011cebe8aed8c67f5ab3688edd6b74 | 1,195 | py | Python | pandas/tests/generic/test_panel.py | EternalLearner42/pandas | a2b414ccaab83e085d46e8217d5302a5d0f874f4 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/generic/test_panel.py | EternalLearner42/pandas | a2b414ccaab83e085d46e8217d5302a5d0f874f4 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/generic/test_panel.py | EternalLearner42/pandas | a2b414ccaab83e085d46e8217d5302a5d0f874f4 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable-msg=E1101,W0612
from warnings import catch_warnings, simplefilter
from pandas import Panel
from pandas.util.testing import assert_panel_equal
from .test_generic import Generic
class TestPanel(Generic):
_typ = Panel
_comparator = lambda self, x, y: assert_panel_equa... | 30.641026 | 77 | 0.659414 | 120 | 0.100418 | 0 | 0 | 0 | 0 | 0 | 0 | 500 | 0.41841 |
73b8db5714154072049f41562b46bb8f89e7deee | 1,233 | py | Python | shortest-paths.py | SAUSy-Lab/map-speed-test | 0c9e78056017a247976ff63782c6366c5a724bf4 | [
"MIT"
] | 2 | 2017-03-31T02:16:57.000Z | 2019-07-13T14:31:04.000Z | shortest-paths.py | SAUSy-Lab/map-speed-test | 0c9e78056017a247976ff63782c6366c5a724bf4 | [
"MIT"
] | 10 | 2017-01-07T04:26:41.000Z | 2017-03-07T21:00:27.000Z | shortest-paths.py | SAUSy-Lab/map-speed-test | 0c9e78056017a247976ff63782c6366c5a724bf4 | [
"MIT"
] | null | null | null | # calculate shortest paths between OD pairs
# in the map_speed_od postgis table
# update the shortest path geometry into the table
import requests, json, psycopg2
# get OD pairs from DB
conn_string = (
"host='localhost' dbname='' user='' password=''"
)
connection = psycopg2.connect(conn_string)
connection.autocommit ... | 25.163265 | 103 | 0.687753 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 764 | 0.619627 |
73b9218ed262aae642dc0406539a72aa91d888bc | 320 | py | Python | my_tools/tools_for_os/for_file.py | Alex2Yang97/waiting_time_project | 649dbaa4bd45b9b9974a5b71a8ee17fada07bcc9 | [
"MIT"
] | null | null | null | my_tools/tools_for_os/for_file.py | Alex2Yang97/waiting_time_project | 649dbaa4bd45b9b9974a5b71a8ee17fada07bcc9 | [
"MIT"
] | 12 | 2020-11-13T17:16:58.000Z | 2021-04-23T01:25:17.000Z | my_tools/tools_for_os/for_file.py | Alex2Yang97/waiting_time_project | 649dbaa4bd45b9b9974a5b71a8ee17fada07bcc9 | [
"MIT"
] | null | null | null | #-*- coding:utf-8 -*-
# @Time : 2020-02-15 15:49
# @Author : Zhirui(Alex) Yang
# @Function :
import os
def create_folder(folder_name):
if not os.path.exists(folder_name):
os.makedirs(folder_name)
print(folder_name, 'has created!')
else:
print(folder_name, 'already existed!')
| 17.777778 | 46 | 0.61875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.396875 |
73be179d5a3f60a254ebcb05e6ce4cdd7d7c207f | 7,842 | py | Python | tcp_tls_tunnel/hyper_http2_adapter.py | DSAdv/tcp-tls-tunnel-py | e9b5271e4cfae1df09b9fab77db4906b7cee8337 | [
"MIT"
] | 1 | 2021-08-30T21:03:41.000Z | 2021-08-30T21:03:41.000Z | tcp_tls_tunnel/hyper_http2_adapter.py | DSAdv/tcp-tls-tunnel-py | e9b5271e4cfae1df09b9fab77db4906b7cee8337 | [
"MIT"
] | 1 | 2022-03-31T12:02:29.000Z | 2022-03-31T12:02:29.000Z | tcp_tls_tunnel/hyper_http2_adapter.py | DSAdv/tcp-tls-tunnel-py | e9b5271e4cfae1df09b9fab77db4906b7cee8337 | [
"MIT"
] | 1 | 2021-08-28T14:35:18.000Z | 2021-08-28T14:35:18.000Z | import ssl
import socket
from typing import Tuple
from hyper.common.util import to_native_string
from urllib.parse import urlparse
from hyper import HTTP11Connection, HTTPConnection
from hyper.common.bufsocket import BufferedSocket
from hyper.common.exceptions import TLSUpgrade
from hyper.contrib import HTTP20Adapter
... | 35.165919 | 98 | 0.561464 | 5,821 | 0.742285 | 0 | 0 | 0 | 0 | 0 | 0 | 917 | 0.116934 |
73bfa3453754f3fe35dd27f3bb51112f146dfd38 | 1,387 | py | Python | get_variances.py | OmnesRes/GRIMMER | 173c99ebdb6a9edb1242d24a791d0c5d778ff643 | [
"MIT"
] | 4 | 2017-02-20T12:03:29.000Z | 2018-10-27T14:06:07.000Z | get_variances.py | OmnesRes/GRIMMER | 173c99ebdb6a9edb1242d24a791d0c5d778ff643 | [
"MIT"
] | 1 | 2019-10-08T17:39:30.000Z | 2019-10-11T20:56:50.000Z | get_variances.py | OmnesRes/GRIMMER | 173c99ebdb6a9edb1242d24a791d0c5d778ff643 | [
"MIT"
] | null | null | null | from itertools import *
import time
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
#my own variance function runs much faster than numpy or the Python 3 ported statistics module
def variance(data,u):
return sum([(i-u)**2 for i in data])/len(data)
##rounding the means and variances helps to col... | 26.169811 | 94 | 0.626532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 378 | 0.272531 |
73c1b51a0130489b93a3586b1b8afac1d574b406 | 621 | py | Python | utils/pagenation.py | Andrewpqc/URL-shortener | 74943b9f1f787e243a32e27eec425eb51f84e65e | [
"MIT"
] | 9 | 2018-07-01T11:19:05.000Z | 2021-12-30T03:00:03.000Z | utils/pagenation.py | Andrewpqc/URL-shortener | 74943b9f1f787e243a32e27eec425eb51f84e65e | [
"MIT"
] | 1 | 2020-12-09T23:46:04.000Z | 2020-12-09T23:46:04.000Z | utils/pagenation.py | Andrewpqc/URL-shortener | 74943b9f1f787e243a32e27eec425eb51f84e65e | [
"MIT"
] | 1 | 2018-06-06T15:10:57.000Z | 2018-06-06T15:10:57.000Z | # coding: utf-8
"""
paginate.py
```````````
: 分页api
"""
from flask import url_for
def pagination(lit, page, perpage,endpoint):
"""
返回当前分页的列表对象,
next、last链接
{current: next_lit}
"""
_yu = len(lit) % perpage
_chu = len(lit) // perpage
if _yu == 0:
last = _chu
else:... | 20.7 | 50 | 0.558776 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.260337 |
73c3330e453fbfebace232606fc0f58589eb269b | 5,272 | py | Python | app/default/rest_train.py | dbhack-aquila/aquila | 5fd31665fcfdb2a1ba341f5c98d44668e467add8 | [
"MIT"
] | 1 | 2017-12-16T14:51:54.000Z | 2017-12-16T14:51:54.000Z | app/default/rest_train.py | dbhack-aquila/aquila | 5fd31665fcfdb2a1ba341f5c98d44668e467add8 | [
"MIT"
] | null | null | null | app/default/rest_train.py | dbhack-aquila/aquila | 5fd31665fcfdb2a1ba341f5c98d44668e467add8 | [
"MIT"
] | null | null | null | import pandas as pd
from . import default
import wikipedia
import json
from flask import jsonify
import re
import os
import multiprocessing
import requests
import urllib
import hashlib
df = 0
wikipedia.set_lang("de")
def init():
path = os.path.dirname(os.path.abspath(__file__)) + "/surveyor_hackathon_data_20171... | 33.579618 | 190 | 0.624241 | 0 | 0 | 0 | 0 | 1,089 | 0.206563 | 0 | 0 | 1,569 | 0.29761 |
73c42c7f51f7b24a02fde60345ef5bd395fee637 | 246 | py | Python | tools/python_api_Easytest/out.py | xutongxin1/UnitAi-project | 226ccc7d73096fd3582a55bf76593756d8033892 | [
"MIT"
] | 5 | 2019-03-23T09:21:14.000Z | 2019-10-18T11:31:10.000Z | tools/python_api_Easytest/out.py | xutongxin1/UnitAi-project | 226ccc7d73096fd3582a55bf76593756d8033892 | [
"MIT"
] | null | null | null | tools/python_api_Easytest/out.py | xutongxin1/UnitAi-project | 226ccc7d73096fd3582a55bf76593756d8033892 | [
"MIT"
] | 2 | 2020-01-12T06:03:44.000Z | 2020-01-17T00:23:20.000Z | import json,requests
def test():
url='http://localhost:5000/login'
headers = {'Content-Type':'application/json'}
data={
"user": "xutongxin"
}
req = requests.post(url, json.dumps(data), headers)
result = json.loads(req.text)
print(test) | 22.363636 | 52 | 0.686992 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 0.317073 |
73c50231a058cf0ef478478e7a36afc7a3fd3081 | 3,481 | py | Python | src/cam_loop.py | stay-whimsical/screamchess | 4950d480f8f33db2bc3f2d94eea5dc6706ae8087 | [
"MIT"
] | 2 | 2019-06-19T20:25:12.000Z | 2021-06-04T04:43:36.000Z | src/cam_loop.py | pablo-meier/screamchess | 4950d480f8f33db2bc3f2d94eea5dc6706ae8087 | [
"MIT"
] | 8 | 2017-08-19T07:09:55.000Z | 2017-08-20T21:11:11.000Z | src/cam_loop.py | pablo-meier/screamchess | 4950d480f8f33db2bc3f2d94eea5dc6706ae8087 | [
"MIT"
] | 1 | 2020-04-17T00:19:43.000Z | 2020-04-17T00:19:43.000Z | from camera import board_image_processor as bip
from chess.models import *
import cv2
import numpy as np
from media.sound import *
def show_webcam(mirror=False):
cam = cv2.VideoCapture(0)
while True:
ret_val, img = cam.read()
#chess_state = process_image(img)
cv2.imshow('webcam', img)
... | 33.152381 | 72 | 0.564493 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 485 | 0.139328 |
73c507797796f3d05c197c7fb4b73550955df8ce | 2,854 | py | Python | __train/preprocessing.py | aiddun/jazzCNN | f2d60d1b0697e71327e1d6d2bb9af6407e1253d1 | [
"MIT"
] | 1 | 2018-03-02T09:59:36.000Z | 2018-03-02T09:59:36.000Z | _evaluate/preprocessing.py | AidDun/jazzCNN | f2d60d1b0697e71327e1d6d2bb9af6407e1253d1 | [
"MIT"
] | 3 | 2020-11-13T17:17:54.000Z | 2022-02-09T23:27:21.000Z | _evaluate/preprocessing.py | AidDun/jazzCNN | f2d60d1b0697e71327e1d6d2bb9af6407e1253d1 | [
"MIT"
] | null | null | null | import numpy as np
from numpy import random
import glob
import scipy.io.wavfile
np.random.seed(4)
def preprocess(periods, testCategoryNum):
periodList = periods
catNum = len(periodList)
def createpathlist():
print("Loading file paths.")
x = []
y = []
for recDirIndex in ... | 25.711712 | 131 | 0.501402 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 353 | 0.123686 |
73c590592e5f6c7d80e9e638ac61992cbf513263 | 49 | py | Python | test/fixtures/python/analysis/main1.py | matsubara0507/semantic | 67899f701abc0f1f0cb4374d8d3c249afc33a272 | [
"MIT"
] | 8,844 | 2019-05-31T15:47:12.000Z | 2022-03-31T18:33:51.000Z | test/fixtures/python/analysis/main1.py | matsubara0507/semantic | 67899f701abc0f1f0cb4374d8d3c249afc33a272 | [
"MIT"
] | 401 | 2019-05-31T18:30:26.000Z | 2022-03-31T16:32:29.000Z | test/fixtures/python/analysis/main1.py | matsubara0507/semantic | 67899f701abc0f1f0cb4374d8d3c249afc33a272 | [
"MIT"
] | 504 | 2019-05-31T17:55:03.000Z | 2022-03-30T04:15:04.000Z | import a as b
import b.c as e
b.foo(1)
e.baz(1)
| 8.166667 | 15 | 0.632653 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
73c5ed5d0d7202bd31940ec8f1e4251cfbaeba8a | 10,054 | py | Python | app/views.py | allthingsclowd/K5_User_Onboarding_Example | 313b0033ceb015cca86574762915e02000d4bbbb | [
"MIT"
] | null | null | null | app/views.py | allthingsclowd/K5_User_Onboarding_Example | 313b0033ceb015cca86574762915e02000d4bbbb | [
"MIT"
] | null | null | null | app/views.py | allthingsclowd/K5_User_Onboarding_Example | 313b0033ceb015cca86574762915e02000d4bbbb | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""Summary - Flask Views Used to Control/Wrap a web UI
around the Add User Python Script
Author: Graham Land
Date: 08/12/16
Twitter: @allthingsclowd
Github: https://github.com/allthingscloud
Blog: https://allthingscloud.eu
"""
from flask import flash, render_template, session,... | 41.717842 | 98 | 0.514919 | 0 | 0 | 0 | 0 | 9,207 | 0.915755 | 0 | 0 | 2,940 | 0.292421 |
73c828b9d6fbfbe855a2020cf66b582e67bedfef | 867 | py | Python | src/users/models.py | gabrielstork/django-to-do-list | 756f636fc531f131bbf0649c14272178ce13d957 | [
"MIT"
] | 6 | 2021-11-15T18:56:44.000Z | 2022-02-15T10:02:24.000Z | src/users/models.py | gabrielstork/django-to-do-list | 756f636fc531f131bbf0649c14272178ce13d957 | [
"MIT"
] | 1 | 2022-02-14T20:28:39.000Z | 2022-02-14T20:28:39.000Z | src/users/models.py | gabrielstork/django-to-do-list | 756f636fc531f131bbf0649c14272178ce13d957 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.core.validators import MinLengthValidator
from django.utils.translation import gettext_lazy as _
from django.db import models
from . import validators
class User(AbstractUser):
min_length_validator = MinLengthValidator(
limit_value=3,
... | 27.967742 | 76 | 0.690888 | 649 | 0.748558 | 0 | 0 | 0 | 0 | 0 | 0 | 152 | 0.175317 |
73c9920f5c36cc9f240880ba80cb675e0c7cb5ca | 5,135 | py | Python | readux/books/abbyyocr.py | jpkarlsberg/readux | 50a895dcf7d64b753a07808e9be218cab3682850 | [
"Apache-2.0"
] | null | null | null | readux/books/abbyyocr.py | jpkarlsberg/readux | 50a895dcf7d64b753a07808e9be218cab3682850 | [
"Apache-2.0"
] | null | null | null | readux/books/abbyyocr.py | jpkarlsberg/readux | 50a895dcf7d64b753a07808e9be218cab3682850 | [
"Apache-2.0"
] | null | null | null | '''
:class:`eulxml.xmlmap.XmlObject` classes for working with ABBYY
FineReadux OCR XML.
Currently supports **FineReader6-schema-v1** and
**FineReader8-schema-v2**.
----
'''
from eulxml import xmlmap
class Base(xmlmap.XmlObject):
'''Base :class:`eulxml.xmlmap.XmlObject` for ABBYY OCR XML with
common namespace... | 36.161972 | 84 | 0.651996 | 4,388 | 0.854528 | 0 | 0 | 0 | 0 | 0 | 0 | 2,947 | 0.573905 |
73c9e7bedf96216a6d9365965c340b5bab6a369e | 742 | py | Python | Aulas/aula14.py | adonaifariasdev/cursoemvideo-python3 | 1fd35e45b24c52013fa3bc98e723971db8e6b7d1 | [
"MIT"
] | null | null | null | Aulas/aula14.py | adonaifariasdev/cursoemvideo-python3 | 1fd35e45b24c52013fa3bc98e723971db8e6b7d1 | [
"MIT"
] | null | null | null | Aulas/aula14.py | adonaifariasdev/cursoemvideo-python3 | 1fd35e45b24c52013fa3bc98e723971db8e6b7d1 | [
"MIT"
] | null | null | null | '''for c in range(1, 10):
print(c)
print('FIM')'''
'''c = 1
while c < 10:
print(c)
c += 1
print('FIM')'''
'''n = 1
while n != 0: #flag ou condição de parada
n = int(input('Digite um valor: '))
print('FIM')'''
'''r = 'S'
while r == 'S':
n = int(input('Digite um valor: '))
r = str(input('Quer c... | 22.484848 | 86 | 0.540431 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 536 | 0.718499 |
73cb0638be23bf0c8d4dd43c1030dd71337f3c61 | 2,330 | py | Python | tests/test_markdown_in_code_cells.py | st--/jupytext | f8e8352859cc22e17b11154d0770fd946c4a430a | [
"MIT"
] | 5,378 | 2018-09-01T22:03:43.000Z | 2022-03-31T06:51:42.000Z | tests/test_markdown_in_code_cells.py | st--/jupytext | f8e8352859cc22e17b11154d0770fd946c4a430a | [
"MIT"
] | 812 | 2018-08-31T08:26:13.000Z | 2022-03-30T18:12:11.000Z | tests/test_markdown_in_code_cells.py | st--/jupytext | f8e8352859cc22e17b11154d0770fd946c4a430a | [
"MIT"
] | 380 | 2018-09-02T01:40:07.000Z | 2022-03-25T13:57:23.000Z | """Issue #712"""
from nbformat.v4.nbbase import new_code_cell, new_notebook
from jupytext import reads, writes
from jupytext.cell_to_text import three_backticks_or_more
from jupytext.compare import compare, compare_notebooks
from .utils import requires_myst
def test_three_backticks_or_more():
assert three_backt... | 17.923077 | 63 | 0.564807 | 0 | 0 | 0 | 0 | 543 | 0.233047 | 0 | 0 | 650 | 0.27897 |
73cd6b9d543cd1b702c785eacf0e7b85b40a9737 | 629 | py | Python | amy/workshops/migrations/0152_event_open_ttt_applications.py | code-review-doctor/amy | 268c1a199510457891459f3ddd73fcce7fe2b974 | [
"MIT"
] | 53 | 2015-01-10T17:39:19.000Z | 2019-06-12T17:36:34.000Z | amy/workshops/migrations/0152_event_open_ttt_applications.py | code-review-doctor/amy | 268c1a199510457891459f3ddd73fcce7fe2b974 | [
"MIT"
] | 1,176 | 2015-01-02T06:32:47.000Z | 2019-06-18T11:57:47.000Z | amy/workshops/migrations/0152_event_open_ttt_applications.py | code-review-doctor/amy | 268c1a199510457891459f3ddd73fcce7fe2b974 | [
"MIT"
] | 44 | 2015-01-03T15:08:56.000Z | 2019-06-09T05:33:08.000Z | # Generated by Django 2.1 on 2018-09-02 14:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('workshops', '0151_auto_20180902_0409'),
]
operations = [
migrations.AddField(
model_name='event',
name='open_TTT_appli... | 33.105263 | 281 | 0.677266 | 538 | 0.855326 | 0 | 0 | 0 | 0 | 0 | 0 | 300 | 0.476948 |
73ced5d59e03f3d885db00b3181a8bf0e4e60e2a | 5,220 | py | Python | example/cifar10/fast_at.py | KuanKuanQAQ/ares | 40dbefc18f6438e1812021fe6d6c3195f22ca295 | [
"MIT"
] | 206 | 2020-12-31T09:43:11.000Z | 2022-03-30T07:02:41.000Z | example/cifar10/fast_at.py | afoolboy/ares | 89610d41fdde194e4ad916d29961aaed73383692 | [
"MIT"
] | 7 | 2021-01-26T06:45:44.000Z | 2022-02-26T05:25:48.000Z | example/cifar10/fast_at.py | afoolboy/ares | 89610d41fdde194e4ad916d29961aaed73383692 | [
"MIT"
] | 61 | 2020-12-29T14:02:41.000Z | 2022-03-26T14:21:10.000Z | ''' This file provides a wrapper class for Fast_AT (https://github.com/locuslab/fast_adversarial) model for CIFAR-10 dataset. '''
import sys
import os
import torch
import torch.nn as nn
import torch.nn.functional as F
import tensorflow as tf
from ares.model.pytorch_wrapper import pytorch_classifier_with_logits
from ... | 37.021277 | 129 | 0.638314 | 4,129 | 0.790996 | 0 | 0 | 851 | 0.163027 | 0 | 0 | 417 | 0.079885 |
73cf094cf77e18c95fada7abbb805a0feed41fec | 526 | py | Python | auto_pilot/common/registrable.py | farrellsc/zAutoPilot | 652d93690237dcb21c3cbdbdad95f917b7fec6e3 | [
"MIT"
] | 1 | 2018-03-05T08:27:58.000Z | 2018-03-05T08:27:58.000Z | auto_pilot/common/registrable.py | farrellsc/zAutoPilot | 652d93690237dcb21c3cbdbdad95f917b7fec6e3 | [
"MIT"
] | null | null | null | auto_pilot/common/registrable.py | farrellsc/zAutoPilot | 652d93690237dcb21c3cbdbdad95f917b7fec6e3 | [
"MIT"
] | null | null | null | from typing import Callable, TypeVar, List
T = TypeVar('T')
class Registrable(object):
reg_list = dict()
@classmethod
def register(cls, class_name: str) -> Callable:
def register_inner(class_type: T) -> None:
cls.reg_list[class_name] = class_type
return register_inner
@c... | 23.909091 | 51 | 0.65019 | 462 | 0.878327 | 0 | 0 | 396 | 0.752852 | 0 | 0 | 3 | 0.005703 |
73cf528b5a42e68ea53f81fc68bbf5a7a0f2cf10 | 688 | py | Python | noheavenbot/cogs/commands/testing.py | Molanito13/noheaven-bot | ad126d4601321ecabff9d1d214ce7d3f4e258c3e | [
"MIT"
] | 3 | 2018-10-13T14:05:24.000Z | 2018-12-25T21:40:21.000Z | noheavenbot/cogs/commands/testing.py | Molanito13/noheaven-bot | ad126d4601321ecabff9d1d214ce7d3f4e258c3e | [
"MIT"
] | 2 | 2018-10-08T14:33:39.000Z | 2020-03-02T18:00:47.000Z | noheavenbot/cogs/commands/testing.py | Molanito13/noheaven-bot | ad126d4601321ecabff9d1d214ce7d3f4e258c3e | [
"MIT"
] | 5 | 2018-10-08T14:18:58.000Z | 2020-11-01T17:55:51.000Z | from discord.ext.commands import command, Cog
from noheavenbot.utils.constants import TEXTCHANNELS
from discord import Member
from noheavenbot.utils.database_tables.table_users import Users
from noheavenbot.utils.validator import has_role as check_role
class Test(Cog):
def __init__(self, bot):
self.bot =... | 28.666667 | 112 | 0.709302 | 389 | 0.563768 | 0 | 0 | 314 | 0.455072 | 299 | 0.433333 | 87 | 0.126087 |
73cfd3a5b8cd1e7653bb83ccce83e87f0876fda2 | 6,174 | py | Python | mayan/apps/linking/tests/test_smart_link_condition_views.py | atitaya1412/Mayan-EDMS | bda9302ba4b743e7d829ad118b8b836221888172 | [
"Apache-2.0"
] | 343 | 2015-01-05T14:19:35.000Z | 2018-12-10T19:07:48.000Z | mayan/apps/linking/tests/test_smart_link_condition_views.py | atitaya1412/Mayan-EDMS | bda9302ba4b743e7d829ad118b8b836221888172 | [
"Apache-2.0"
] | 191 | 2015-01-03T00:48:19.000Z | 2018-11-30T09:10:25.000Z | mayan/apps/linking/tests/test_smart_link_condition_views.py | atitaya1412/Mayan-EDMS | bda9302ba4b743e7d829ad118b8b836221888172 | [
"Apache-2.0"
] | 257 | 2019-05-14T10:26:37.000Z | 2022-03-30T03:37:36.000Z | from mayan.apps.testing.tests.base import GenericViewTestCase
from ..events import event_smart_link_edited
from ..permissions import permission_smart_link_edit
from .mixins import (
SmartLinkConditionViewTestMixin, SmartLinkTestMixin,
SmartLinkViewTestMixin
)
class SmartLinkConditionViewTestCase(
SmartL... | 33.737705 | 75 | 0.698737 | 5,901 | 0.955782 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
73d0507c967519673d3c90287e9f91022857b10e | 19,105 | py | Python | P1.py | chinmaydas96/CarND-LaneLines-P1 | be8e03257962314d6adea68634d053d5f0550510 | [
"MIT"
] | null | null | null | P1.py | chinmaydas96/CarND-LaneLines-P1 | be8e03257962314d6adea68634d053d5f0550510 | [
"MIT"
] | null | null | null | P1.py | chinmaydas96/CarND-LaneLines-P1 | be8e03257962314d6adea68634d053d5f0550510 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Self-Driving Car Engineer Nanodegree
#
#
# ## Project: **Finding Lane Lines on the Road**
# ***
# In this project, you will use the tools you learned about in the lesson to identify lane lines on the road. You can develop your pipeline on a series of individual images, and... | 40.997854 | 638 | 0.702277 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,609 | 0.659363 |
73d14617d94420a3d56d21a483a4a8f9476f65c1 | 170 | py | Python | notebooks/container/__init__.py | DanieleBaranzini/sktime-tutorial-pydata-amsterdam-2020 | eb9d76a8dc7fff29e4123b940200d58eed87147c | [
"BSD-3-Clause"
] | 114 | 2020-06-16T09:29:30.000Z | 2022-03-12T09:06:52.000Z | notebooks/container/__init__.py | DanieleBaranzini/sktime-tutorial-pydata-amsterdam-2020 | eb9d76a8dc7fff29e4123b940200d58eed87147c | [
"BSD-3-Clause"
] | 5 | 2020-11-06T13:02:26.000Z | 2021-06-10T18:34:37.000Z | notebooks/container/__init__.py | DanieleBaranzini/sktime-tutorial-pydata-amsterdam-2020 | eb9d76a8dc7fff29e4123b940200d58eed87147c | [
"BSD-3-Clause"
] | 62 | 2020-06-16T09:25:05.000Z | 2022-03-01T21:02:10.000Z | from container.base import TimeBase
from container.array import TimeArray, TimeDtype
from container.timeseries import TimeSeries
from container.timeframe import TimeFrame | 42.5 | 48 | 0.876471 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
73d30c85b213e414209b78284449266b653e1713 | 558 | py | Python | spiketools/utils/base.py | claire98han/SpikeTools | f1cdffd50e2cbdb75961a716425c4665aa930f54 | [
"Apache-2.0"
] | 1 | 2022-03-09T19:40:37.000Z | 2022-03-09T19:40:37.000Z | spiketools/utils/base.py | claire98han/SpikeTools | f1cdffd50e2cbdb75961a716425c4665aa930f54 | [
"Apache-2.0"
] | 35 | 2021-09-28T15:13:31.000Z | 2021-11-26T04:38:08.000Z | spiketools/utils/base.py | claire98han/SpikeTools | f1cdffd50e2cbdb75961a716425c4665aa930f54 | [
"Apache-2.0"
] | 4 | 2021-09-28T14:56:24.000Z | 2022-03-09T21:00:31.000Z | """Base utility functions, that manipulate basic data structures, etc."""
###################################################################################################
###################################################################################################
def flatten(lst):
"""Flatten a list of l... | 26.571429 | 99 | 0.378136 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 472 | 0.845878 |
73d374874a532014fc2ba903875cc4289b921e60 | 11,593 | py | Python | zentral/contrib/osquery/forms.py | mikemcdonald/zentral | 4aa03937abfbcea6480aa04bd99f4da7b8dfc923 | [
"Apache-2.0"
] | null | null | null | zentral/contrib/osquery/forms.py | mikemcdonald/zentral | 4aa03937abfbcea6480aa04bd99f4da7b8dfc923 | [
"Apache-2.0"
] | null | null | null | zentral/contrib/osquery/forms.py | mikemcdonald/zentral | 4aa03937abfbcea6480aa04bd99f4da7b8dfc923 | [
"Apache-2.0"
] | 1 | 2020-09-09T19:26:04.000Z | 2020-09-09T19:26:04.000Z | from django import forms
from zentral.core.probes.forms import BaseCreateProbeForm
from zentral.utils.forms import validate_sha256
from .probes import (OsqueryProbe, OsqueryComplianceProbe,
OsqueryDistributedQueryProbe, OsqueryFileCarveProbe,
OsqueryFIMProbe)
# OsqueryProbe
... | 35.344512 | 114 | 0.547399 | 10,950 | 0.943884 | 0 | 0 | 1,977 | 0.170416 | 0 | 0 | 2,134 | 0.18395 |
73d5dcabb54b57daa8b78e26015c8bd966917221 | 197 | py | Python | src/dataclay/communication/grpc/messages/logicmodule/__init__.py | kpavel/pyclay | 275bc8af5c57301231a20cca1cc88556a9c84c79 | [
"BSD-3-Clause"
] | 1 | 2020-04-16T17:09:15.000Z | 2020-04-16T17:09:15.000Z | src/dataclay/communication/grpc/messages/logicmodule/__init__.py | kpavel/pyclay | 275bc8af5c57301231a20cca1cc88556a9c84c79 | [
"BSD-3-Clause"
] | 35 | 2019-11-06T17:06:16.000Z | 2021-04-12T16:27:20.000Z | src/dataclay/communication/grpc/messages/logicmodule/__init__.py | kpavel/pyclay | 275bc8af5c57301231a20cca1cc88556a9c84c79 | [
"BSD-3-Clause"
] | 1 | 2020-05-06T11:28:16.000Z | 2020-05-06T11:28:16.000Z |
""" Class description goes here. """
"""Package containing gRPC classes."""
__author__ = 'Enrico La Sala <[email protected]>'
__copyright__ = '2017 Barcelona Supercomputing Center (BSC-CNS)'
| 24.625 | 64 | 0.725888 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.817259 |
73db434f1dcc511c2a6170ca3b1d4a1d255f07e3 | 87 | py | Python | src/cms/models/offers/__init__.py | mckinly/cms-django | c9995a3bfab6ee2d02f2406a7f83cf91b7ccfcca | [
"Apache-2.0"
] | 14 | 2020-12-03T07:56:30.000Z | 2021-10-30T13:09:50.000Z | src/cms/models/offers/__init__.py | Integreat/integreat-cms | b3f80964a6182d714f26ac229342b47e1c7c4f29 | [
"Apache-2.0"
] | 367 | 2020-11-20T00:34:20.000Z | 2021-12-14T15:20:42.000Z | src/cms/models/offers/__init__.py | mckinly/cms-django | c9995a3bfab6ee2d02f2406a7f83cf91b7ccfcca | [
"Apache-2.0"
] | 3 | 2021-02-09T18:46:52.000Z | 2021-12-07T10:41:39.000Z | """
This package contains :class:`~cms.models.offers.offer_template.OfferTemplate`
"""
| 21.75 | 78 | 0.758621 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.988506 |
73dc1ffc39f60e86bf599c00df7b537997fbf251 | 5,150 | py | Python | service/audio_trigger_test.py | nicolas-f/noisesensor | fc007fe5e03b0deca0863d987cb6776be1cd2bef | [
"BSD-3-Clause"
] | 2 | 2020-03-29T21:58:45.000Z | 2021-09-21T12:43:15.000Z | service/audio_trigger_test.py | nicolas-f/noisesensor | fc007fe5e03b0deca0863d987cb6776be1cd2bef | [
"BSD-3-Clause"
] | null | null | null | service/audio_trigger_test.py | nicolas-f/noisesensor | fc007fe5e03b0deca0863d987cb6776be1cd2bef | [
"BSD-3-Clause"
] | 1 | 2019-02-19T14:53:01.000Z | 2019-02-19T14:53:01.000Z | import numpy
from scipy.spatial import distance
import matplotlib.pyplot as plt
import math
import matplotlib.ticker as mtick
freqs = [20, 25, 31.5, 40, 50, 63, 80, 100, 125, 160, 200, 250, 315, 400, 500, 630, 800, 1000, 1250, 1600, 2000, 2500, 3150, 4000, 5000, 6300, 8000, 10000, 12500]
def cosine_distance(a, b, we... | 37.591241 | 162 | 0.665825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 624 | 0.121165 |
73ddae6e14c41c647c3dc794212f25f68df13789 | 1,094 | py | Python | Python/6-hc_sr04-sensor.py | matr1xprogrammer/raspberry_pi-iot | 7ff8247fde839a23dd75720c58f3b04d86485ec4 | [
"MIT"
] | 2 | 2017-02-18T12:05:25.000Z | 2017-02-18T12:15:53.000Z | Python/6-hc_sr04-sensor.py | matr1xprogrammer/raspberry_pi-iot | 7ff8247fde839a23dd75720c58f3b04d86485ec4 | [
"MIT"
] | null | null | null | Python/6-hc_sr04-sensor.py | matr1xprogrammer/raspberry_pi-iot | 7ff8247fde839a23dd75720c58f3b04d86485ec4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# HC-SR04 Ultrasonic ranging sensor
#
import RPi.GPIO as GPIO
import sys, time
try:
GPIO.setmode(GPIO.BCM)
TRIG = 23
ECHO = 24
print "Distance measurement in progress..."
GPIO.setup(TRIG, GPIO.OUT)
GPIO.setup(ECHO, GPIO.IN)
GPIO.output(TRIG, False)
whi... | 22.791667 | 74 | 0.543876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 183 | 0.167276 |
73de45d1436eebf32a4bbacaf18feaafc9502e50 | 10,651 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/ospfv3/ospfv3.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/ospfv3/ospfv3.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/ospfv3/ospfv3.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #
# -*- coding: utf-8 -*-
# Copyright 2020 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
from __future__ import absolute_import, division, print_function
__metaclass__ = type
"""
The eos_ospfv3 config file.
It is in this file where the current configuration ... | 36.351536 | 103 | 0.529903 | 9,526 | 0.894376 | 0 | 0 | 0 | 0 | 0 | 0 | 2,537 | 0.238194 |
73de5fb73d8473474f580b5f20b98adc8660e07b | 1,141 | py | Python | platypush/plugins/logger/__init__.py | BlackLight/runbullet | 8d26c8634d2677b4402f0a21b9ab8244b44640db | [
"MIT"
] | 3 | 2017-11-03T17:03:36.000Z | 2017-11-10T06:38:15.000Z | platypush/plugins/logger/__init__.py | BlackLight/runbullet | 8d26c8634d2677b4402f0a21b9ab8244b44640db | [
"MIT"
] | 14 | 2017-11-04T11:46:37.000Z | 2017-12-11T19:15:27.000Z | platypush/plugins/logger/__init__.py | BlackLight/runbullet | 8d26c8634d2677b4402f0a21b9ab8244b44640db | [
"MIT"
] | null | null | null | from platypush.plugins import Plugin, action
class LoggerPlugin(Plugin):
"""
Plugin to log traces on the standard Platypush logger
"""
@action
def trace(self, msg, *args, **kwargs):
"""
logger.trace wrapper
"""
self.logger.trace(msg, *args, **kwargs)
@action
... | 21.12963 | 57 | 0.531113 | 1,070 | 0.937774 | 0 | 0 | 933 | 0.817704 | 0 | 0 | 357 | 0.312883 |
73de6cd753fb9320e7590a96928403d694712cd8 | 1,632 | py | Python | hc/front/tests/test_add_pdc.py | IfBkg/healthchecks | dcd8a74c6b0bcdb0065e7c27d5b6639823400562 | [
"BSD-3-Clause"
] | 1 | 2020-07-13T15:33:31.000Z | 2020-07-13T15:33:31.000Z | hc/front/tests/test_add_pdc.py | IfBkg/healthchecks | dcd8a74c6b0bcdb0065e7c27d5b6639823400562 | [
"BSD-3-Clause"
] | 53 | 2020-11-27T14:55:01.000Z | 2021-04-22T10:01:13.000Z | hc/front/tests/test_add_pdc.py | IfBkg/healthchecks | dcd8a74c6b0bcdb0065e7c27d5b6639823400562 | [
"BSD-3-Clause"
] | null | null | null | from django.test.utils import override_settings
from hc.api.models import Channel
from hc.test import BaseTestCase
@override_settings(PD_VENDOR_KEY="foo")
class AddPdConnectTestCase(BaseTestCase):
def setUp(self):
super().setUp()
self.url = "/projects/%s/add_pdc/" % self.project.code
def test... | 34 | 76 | 0.677083 | 1,474 | 0.903186 | 0 | 0 | 1,514 | 0.927696 | 0 | 0 | 215 | 0.13174 |
73dee1fd408bd1037f09660c2312f58f954869d8 | 994 | py | Python | atcoder/corp/codethxfes2014b_e.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | 1 | 2018-11-12T15:18:55.000Z | 2018-11-12T15:18:55.000Z | atcoder/corp/codethxfes2014b_e.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | atcoder/corp/codethxfes2014b_e.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | import sys
sys.setrecursionlimit(3000)
def check(rs, cs):
table[rs][cs] = 2
if (rs, cs) == (rg, cg): return True
if rs > 0 and table[rs - 1][cs] == 1 and check(rs - 1, cs):
return True
if cs > 0 and table[rs][cs - 1] == 1 and check(rs, cs - 1):
return True
if rs < r - 1 and table[rs... | 28.4 | 67 | 0.524145 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.013078 |
73df0b517cdf0b8ebc3a55ea196f1562c83f9f1c | 4,329 | py | Python | tests/test_bullet_train.py | masschallenge/bullet-train-python-client | bcec653c0b4ed65779ab4e1a2f809810c684be00 | [
"BSD-3-Clause"
] | null | null | null | tests/test_bullet_train.py | masschallenge/bullet-train-python-client | bcec653c0b4ed65779ab4e1a2f809810c684be00 | [
"BSD-3-Clause"
] | null | null | null | tests/test_bullet_train.py | masschallenge/bullet-train-python-client | bcec653c0b4ed65779ab4e1a2f809810c684be00 | [
"BSD-3-Clause"
] | null | null | null | import json
import logging
from unittest import mock, TestCase
from bullet_train import BulletTrain
import os
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
TEST_API_URL = 'https://test.bullet-train.io/api'
TEST_IDENTIFIER = 'test-identity'
TEST_FEATURE = 'test-feature'
class MockResponse:
... | 34.632 | 113 | 0.736891 | 2,849 | 0.65812 | 0 | 0 | 2,409 | 0.55648 | 0 | 0 | 823 | 0.190113 |
73df243fb4b55e390ea6a1111a32c8c6671d261d | 3,105 | py | Python | plim/console.py | spollard/Plim | 7689de85364691063ed5c43a891c433f9ebef5b9 | [
"MIT"
] | 85 | 2015-01-08T20:15:54.000Z | 2022-03-12T21:51:27.000Z | plim/console.py | spollard/Plim | 7689de85364691063ed5c43a891c433f9ebef5b9 | [
"MIT"
] | 18 | 2015-02-27T14:59:08.000Z | 2021-09-24T10:27:19.000Z | plim/console.py | spollard/Plim | 7689de85364691063ed5c43a891c433f9ebef5b9 | [
"MIT"
] | 14 | 2015-02-26T07:20:42.000Z | 2022-02-01T17:52:16.000Z | """
This module contains entry points for command-line utilities provided by Plim package.
"""
import sys
import os
import argparse
import codecs
from pkg_resources import get_distribution
from pkg_resources import EntryPoint
from mako.template import Template
from mako.lookup import TemplateLookup
from .util import ... | 40.324675 | 116 | 0.622544 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,251 | 0.402899 |
73e0868276739ce21107e9b9452274d8030151db | 2,568 | py | Python | devel_notes/test_class_speed.py | mekhub/alphafold | 8d89abf73ea07841b550b968aceae794acb244df | [
"MIT"
] | 3 | 2019-05-15T16:46:20.000Z | 2019-07-19T13:27:45.000Z | devel_notes/test_class_speed.py | mekhub/alphafold | 8d89abf73ea07841b550b968aceae794acb244df | [
"MIT"
] | null | null | null | devel_notes/test_class_speed.py | mekhub/alphafold | 8d89abf73ea07841b550b968aceae794acb244df | [
"MIT"
] | 4 | 2020-02-08T02:43:01.000Z | 2021-08-22T09:23:17.000Z | #!/usr/bin/python
import time
import sys
import os
from copy import deepcopy
sys.path.append(os.path.join(os.getcwd(), '..'))
from alphafold.partition import DynamicProgrammingData as DP
def getval( DP, idx ):
return DP.X[ idx ][ idx ]
x = [[]]*500
for i in range( 500 ): x[i] = [0.0]*500
dx = deepcopy( x )
xcontr... | 20.709677 | 60 | 0.575545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 573 | 0.223131 |
73e13d84ff4673d8d1b1b964136674b1bd1ae5ef | 688 | py | Python | testRead.py | BichonCby/BaseBSPython | 411f7f5be5636aa7dc9975fb0ab61daa37e6d40a | [
"MIT"
] | null | null | null | testRead.py | BichonCby/BaseBSPython | 411f7f5be5636aa7dc9975fb0ab61daa37e6d40a | [
"MIT"
] | null | null | null | testRead.py | BichonCby/BaseBSPython | 411f7f5be5636aa7dc9975fb0ab61daa37e6d40a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*-coding:Latin-1 -*
import time
from Definitions import *
#from ev3dev2.motor import OUTPUT_B,LargeMotor
from ev3dev2.sensor import *
from AddSensors import AngleSensor
from ev3dev2.sensor.lego import TouchSensor
import Trace
trace = Trace.Trace()
i=0
toucher = TouchSensor(INPUT_3)
EncoderS... | 22.193548 | 57 | 0.699128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.241279 |
73e2d9cdb5fe490b5f63b902095fb196603f96d6 | 1,912 | py | Python | circular-queue/circular-queue.py | tywmick/data-structures | 996451b470a118f3f27faab6e109f50716e399a5 | [
"Unlicense"
] | null | null | null | circular-queue/circular-queue.py | tywmick/data-structures | 996451b470a118f3f27faab6e109f50716e399a5 | [
"Unlicense"
] | null | null | null | circular-queue/circular-queue.py | tywmick/data-structures | 996451b470a118f3f27faab6e109f50716e399a5 | [
"Unlicense"
] | null | null | null | class CircularQueue:
"""
A circlular queue: a first-in-first-out data structure with a fixed buffer size.
"""
def __init__(self, size):
if type(size) is not int:
raise TypeError("Queue size must be a postive integer.")
if size <= 0:
raise ValueError("Queue size m... | 31.344262 | 87 | 0.569038 | 1,911 | 0.999477 | 0 | 0 | 0 | 0 | 0 | 0 | 770 | 0.40272 |
73e339eb2591f2a4b2f2b9553c0b32fcb1202cbf | 2,697 | py | Python | infer.py | vic9527/ViClassifier | fd6c4730e880f35a9429277a6025219315e067cc | [
"MIT"
] | 1 | 2021-11-03T05:05:34.000Z | 2021-11-03T05:05:34.000Z | infer.py | vic9527/viclassifier | fd6c4730e880f35a9429277a6025219315e067cc | [
"MIT"
] | null | null | null | infer.py | vic9527/viclassifier | fd6c4730e880f35a9429277a6025219315e067cc | [
"MIT"
] | null | null | null | def load_model(model_path, device_type='cuda'):
import torch
from viclassifier.utils import dev_opt
device = dev_opt.usingDevice(device_type)
model = torch.load(model_path, map_location=device)
model.to(device)
# 测试时不启用 BatchNormalization 和 Dropout
model.eval()
return model
def predic... | 32.107143 | 105 | 0.632925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,060 | 0.350877 |
73e41b86e4797d0bdf28efbbcf4b63a5d38dc998 | 1,675 | py | Python | compiler/router/tests/10_supply_grid_test.py | bsg-external/OpenRAM | 3c5e13f95c925a204cabf052525c3de07638168f | [
"BSD-3-Clause"
] | 43 | 2016-11-06T20:53:46.000Z | 2021-09-03T18:57:39.000Z | compiler/router/tests/10_supply_grid_test.py | bsg-external/OpenRAM | 3c5e13f95c925a204cabf052525c3de07638168f | [
"BSD-3-Clause"
] | 27 | 2016-11-15T19:28:25.000Z | 2018-02-20T19:23:52.000Z | compiler/router/tests/10_supply_grid_test.py | bsg-external/OpenRAM | 3c5e13f95c925a204cabf052525c3de07638168f | [
"BSD-3-Clause"
] | 30 | 2016-11-09T16:02:45.000Z | 2018-02-23T17:07:59.000Z | # See LICENSE for licensing information.
#
# Copyright (c) 2016-2019 Regents of the University of California and The Board
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
#
#!/usr/bin/env python3
"Run a regresion test the... | 29.385965 | 79 | 0.63403 | 954 | 0.569552 | 0 | 0 | 0 | 0 | 0 | 0 | 558 | 0.333134 |
73e5db5282163558729f472aa4322e2b0c37c1ec | 3,021 | py | Python | sources/decoding/analyse_model.py | int-brain-lab/paper-ephys-atlas | 47a7d52d6d59b5b618826d6f4cb72329dee77e0e | [
"MIT"
] | null | null | null | sources/decoding/analyse_model.py | int-brain-lab/paper-ephys-atlas | 47a7d52d6d59b5b618826d6f4cb72329dee77e0e | [
"MIT"
] | null | null | null | sources/decoding/analyse_model.py | int-brain-lab/paper-ephys-atlas | 47a7d52d6d59b5b618826d6f4cb72329dee77e0e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat May 21 17:05:48 2022
@author: Guido Meijer
"""
import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score, balanced_accuracy_score, confusion_matrix
from ibllib.atlas import BrainRegions
from joblib im... | 32.138298 | 115 | 0.737504 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,164 | 0.385303 |
73e778dc0ac39e74782e31bce2904aee2683d400 | 3,923 | py | Python | Lab04_82773/ex4_4/ex4_4.py | viniciusbenite/cdb | ccc39e9320b03e26d5479a24f76a209ed2283000 | [
"MIT"
] | null | null | null | Lab04_82773/ex4_4/ex4_4.py | viniciusbenite/cdb | ccc39e9320b03e26d5479a24f76a209ed2283000 | [
"MIT"
] | null | null | null | Lab04_82773/ex4_4/ex4_4.py | viniciusbenite/cdb | ccc39e9320b03e26d5479a24f76a209ed2283000 | [
"MIT"
] | null | null | null | # Vinicius Ribeiro
# Nmec 82773
# Make sure to run pip3 install -r requirements.txt and load the .dump at Neo4j
# https://neo4j.com/docs/operations-manual/current/tools/dump-load/
# Dataset: https://neo4j.com/graphgist/beer-amp-breweries-graphgist#_create_nodes_and_relationships
import sys
from neo4j import GraphData... | 42.182796 | 116 | 0.515932 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,282 | 0.581698 |
73e823c830b6abe9c91c69930849b15b603a17bb | 184 | py | Python | readthedocs/code-tabs/python/tests/test_directory_listing_recursive.py | xenon-middleware/xenon-tutorial | 92e4e4037ab2bc67c8473ac4366ff41326a7a41c | [
"Apache-2.0"
] | 2 | 2016-06-23T09:03:34.000Z | 2018-03-31T12:45:39.000Z | readthedocs/code-tabs/python/tests/test_directory_listing_recursive.py | NLeSC/Xenon-examples | 92e4e4037ab2bc67c8473ac4366ff41326a7a41c | [
"Apache-2.0"
] | 54 | 2015-11-26T16:36:48.000Z | 2017-08-01T12:12:51.000Z | readthedocs/code-tabs/python/tests/test_directory_listing_recursive.py | xenon-middleware/xenon-examples | 92e4e4037ab2bc67c8473ac4366ff41326a7a41c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import pytest
from pyxenon_snippets import directory_listing_recursive
def test_directory_listing_recursive():
directory_listing_recursive.run_example()
| 16.727273 | 56 | 0.831522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.11413 |
73e8d0b6bdf6ce5014c04793aa8b3ccc731b67fb | 764 | py | Python | submissions/past201912-open/i.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | 1 | 2021-05-10T01:16:28.000Z | 2021-05-10T01:16:28.000Z | submissions/past201912-open/i.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | 3 | 2021-05-11T06:14:15.000Z | 2021-06-19T08:18:36.000Z | submissions/past201912-open/i.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | null | null | null | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
from itertools import product
n, m = map(int, readline().split())
inf = float('inf')
dp = [inf] * (2 ** n)
dp[0] = 0
for _ in range(m):
s, c = readline().rstrip().deco... | 27.285714 | 62 | 0.510471 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.010471 |
73e8d525fff7a96e23c10924c3bedcf78a0ab5d6 | 55,250 | py | Python | google/cloud/dlp_v2/services/dlp_service/transports/grpc_asyncio.py | LaudateCorpus1/python-dlp | e0a51c9254677016f547647848dcbee85ee1bf29 | [
"Apache-2.0"
] | 32 | 2020-07-11T02:50:13.000Z | 2022-02-10T19:45:59.000Z | google/cloud/dlp_v2/services/dlp_service/transports/grpc_asyncio.py | LaudateCorpus1/python-dlp | e0a51c9254677016f547647848dcbee85ee1bf29 | [
"Apache-2.0"
] | 112 | 2020-02-11T13:24:14.000Z | 2022-03-31T20:59:08.000Z | google/cloud/dlp_v2/services/dlp_service/transports/grpc_asyncio.py | LaudateCorpus1/python-dlp | e0a51c9254677016f547647848dcbee85ee1bf29 | [
"Apache-2.0"
] | 22 | 2020-02-03T18:23:38.000Z | 2022-01-29T08:09:29.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 43.814433 | 102 | 0.639982 | 54,002 | 0.977412 | 0 | 0 | 46,324 | 0.838443 | 0 | 0 | 34,164 | 0.618353 |
73e9a8245d7f2b954b01c47bce5f6ddf87248068 | 781 | py | Python | tym.py | tsyogesh40/Finger_recognition-Python- | 4c1597cd246be1248bbfbb6cfc1ce1cbf5c4ecac | [
"MIT"
] | null | null | null | tym.py | tsyogesh40/Finger_recognition-Python- | 4c1597cd246be1248bbfbb6cfc1ce1cbf5c4ecac | [
"MIT"
] | null | null | null | tym.py | tsyogesh40/Finger_recognition-Python- | 4c1597cd246be1248bbfbb6cfc1ce1cbf5c4ecac | [
"MIT"
] | null | null | null | import datetime
t=datetime.datetime.now()
#date format
weekday=t.strftime("%a") # %A for abbr
day=t.strftime("%d")
month=t.strftime("%b") #%B for abbr
month_num=t.strftime("%m")
year=t.strftime("%Y")
date=t.strftime("%Y-%m-%d")
print(date)
#time format
hour_12=t.strftime("%I")
hour_24=t.strftime("%H")
minutes=t.... | 17.75 | 55 | 0.641485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 192 | 0.245839 |
73eb8bdab00daf7ae249b9e5cfe3937c7c3470b5 | 92 | py | Python | parameters_8001.py | sanket0211/courier-portal | 6b35aa006813f710db9c3e61da4a718aff20881d | [
"BSD-3-Clause"
] | null | null | null | parameters_8001.py | sanket0211/courier-portal | 6b35aa006813f710db9c3e61da4a718aff20881d | [
"BSD-3-Clause"
] | null | null | null | parameters_8001.py | sanket0211/courier-portal | 6b35aa006813f710db9c3e61da4a718aff20881d | [
"BSD-3-Clause"
] | null | null | null | password="pbkdf2(1000,20,sha512)$8a062c206755a51e$df13c5122a621a9de3a64d39f26460f175076ca0"
| 46 | 91 | 0.891304 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.891304 |
73ec5cfa22b958735251f6bd136ed85eba9a7172 | 562 | py | Python | TheKinozal/custom_storages/async_s3_video.py | R-Mielamud/TheKinozal | 62cb79faae58b23f0ef0175593ed9b5746229b5b | [
"MIT"
] | 1 | 2020-10-16T19:15:32.000Z | 2020-10-16T19:15:32.000Z | TheKinozal/custom_storages/async_s3_video.py | R-Mielamud/TheKinozal | 62cb79faae58b23f0ef0175593ed9b5746229b5b | [
"MIT"
] | null | null | null | TheKinozal/custom_storages/async_s3_video.py | R-Mielamud/TheKinozal | 62cb79faae58b23f0ef0175593ed9b5746229b5b | [
"MIT"
] | null | null | null | import os
from TheKinozal import settings
from storages.backends.s3boto3 import S3Boto3Storage
from helpers.random_string import generate_random_string
from helpers.chunked_upload import ChunkedS3VideoUploader
class AsyncS3VideoStorage(S3Boto3Storage):
def _save(self, name, content):
filename, ext = os.pat... | 35.125 | 81 | 0.756228 | 350 | 0.622776 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.010676 |
73ed247eb28b6b5d48aa9d6331bcb389807b9a5d | 1,098 | py | Python | bh_tsne/prep_result.py | mr4jay/numerai | a07b2dcafe9f078df8578d150d585f239fe73c51 | [
"MIT"
] | 306 | 2016-09-18T07:32:33.000Z | 2022-03-22T16:30:26.000Z | bh_tsne/prep_result.py | mikekosk/numerai | 2a09c648c66143ee101cd80de4827108aaf218fc | [
"MIT"
] | 2 | 2017-01-04T02:17:20.000Z | 2017-09-18T11:43:59.000Z | bh_tsne/prep_result.py | mikekosk/numerai | 2a09c648c66143ee101cd80de4827108aaf218fc | [
"MIT"
] | 94 | 2016-09-17T03:48:55.000Z | 2022-01-05T11:54:25.000Z | import struct
import numpy as np
import pandas as pd
df_train = pd.read_csv('../data/train_data.csv')
df_valid = pd.read_csv('../data/valid_data.csv')
df_test = pd.read_csv('../data/test_data.csv')
with open('result.dat', 'rb') as f:
N, = struct.unpack('i', f.read(4))
no_dims, = struct.unpack('i', f.read(4))
... | 34.3125 | 79 | 0.653916 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 251 | 0.228597 |
73eec10a12c7ce55e197ae8c7928050831069eb9 | 623 | py | Python | moca/urls.py | satvikdhandhania/vit-11 | e599f2b82a9194658c67bbd5c7e45f3b50d016da | [
"BSD-3-Clause"
] | 1 | 2016-09-20T20:36:53.000Z | 2016-09-20T20:36:53.000Z | moca/urls.py | satvikdhandhania/vit-11 | e599f2b82a9194658c67bbd5c7e45f3b50d016da | [
"BSD-3-Clause"
] | null | null | null | moca/urls.py | satvikdhandhania/vit-11 | e599f2b82a9194658c67bbd5c7e45f3b50d016da | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls.defaults import patterns, url, include
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
(r'^log/', include('requestlog.urls')),
(r'^admin/', include(admin.site.urls)),
# Pass anything that does... | 23.074074 | 60 | 0.632424 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 227 | 0.364366 |