hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bd1bf9534a09738751e385e85f17cb72eb9affdf | 2,439 | py | Python | edgeboxes.py | khizar-anjum/LightWeightObjDetection | 2345a75d39a4114731d29fe0cef1fe346e10a567 | [
"MIT"
] | null | null | null | edgeboxes.py | khizar-anjum/LightWeightObjDetection | 2345a75d39a4114731d29fe0cef1fe346e10a567 | [
"MIT"
] | null | null | null | edgeboxes.py | khizar-anjum/LightWeightObjDetection | 2345a75d39a4114731d29fe0cef1fe346e10a567 | [
"MIT"
] | null | null | null | # code adapted from https://github.com/opencv/opencv_contrib/blob/master/modules/ximgproc/samples/edgeboxes_demo.py
# Author: Khizar Anjum
# Dec 3, 2019
# this code is based on [2] in README.md
import cv2
import numpy as np
class edgeboxes():
#this class is used for getting edgeboxes proposals for an image.
... | 39.33871 | 125 | 0.637556 |
66a93a77d79dd85bb8bea1153bab9cd911588e45 | 2,764 | py | Python | examples/hpc_cpu_example.py | Haydnspass/test-tube | ebc7af91eae0f99c286f1f720a675f6575e12201 | [
"MIT"
] | 716 | 2017-10-14T22:29:11.000Z | 2022-03-25T11:04:27.000Z | examples/hpc_cpu_example.py | Haydnspass/test-tube | ebc7af91eae0f99c286f1f720a675f6575e12201 | [
"MIT"
] | 56 | 2017-10-15T09:30:59.000Z | 2022-02-03T06:50:25.000Z | examples/hpc_cpu_example.py | Haydnspass/test-tube | ebc7af91eae0f99c286f1f720a675f6575e12201 | [
"MIT"
] | 77 | 2018-01-22T20:36:18.000Z | 2022-03-15T14:57:34.000Z | """Example launcher for a hyperparameter search on SLURM."""
from test_tube import Experiment, HyperOptArgumentParser, SlurmCluster
def train(hparams, *args):
"""Train your awesome model.
:param hparams: The arguments to run the model with.
"""
# Initialize experiments and track all the hyperparamete... | 32.139535 | 75 | 0.656657 |
f2b5523c90a1d90c46c0fb362b896db9df335445 | 30,111 | py | Python | manila_ui/tests/dashboards/project/shares/tests.py | dinaSap/manila-ui | 3b8d685dd7830da3c8c703bab3355902dcb1e610 | [
"Apache-2.0"
] | null | null | null | manila_ui/tests/dashboards/project/shares/tests.py | dinaSap/manila-ui | 3b8d685dd7830da3c8c703bab3355902dcb1e610 | [
"Apache-2.0"
] | null | null | null | manila_ui/tests/dashboards/project/shares/tests.py | dinaSap/manila-ui | 3b8d685dd7830da3c8c703bab3355902dcb1e610 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 NetApp, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 42.231417 | 79 | 0.628076 |
511165d29e67fd8fed5603dde045159dd8ca1366 | 5,143 | py | Python | runtime/python/Lib/distutils/tests/test_bdist_rpm.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | 207 | 2018-10-01T08:53:01.000Z | 2022-03-14T12:15:54.000Z | Thonny/Lib/distutils/tests/test_bdist_rpm.py | Pydiderot/pydiderotIDE | a42fcde3ea837ae40c957469f5d87427e8ce46d3 | [
"MIT"
] | 30 | 2019-01-04T10:14:56.000Z | 2020-10-12T14:00:31.000Z | Thonny/Lib/distutils/tests/test_bdist_rpm.py | Pydiderot/pydiderotIDE | a42fcde3ea837ae40c957469f5d87427e8ce46d3 | [
"MIT"
] | 76 | 2020-03-16T01:47:46.000Z | 2022-03-21T16:37:07.000Z | """Tests for distutils.command.bdist_rpm."""
import unittest
import sys
import os
from test.support import run_unittest, requires_zlib
from distutils.core import Distribution
from distutils.command.bdist_rpm import bdist_rpm
from distutils.tests import support
from distutils.spawn import find_executable
... | 37.816176 | 90 | 0.580012 |
a445658ef6c1c0b28645841953a38d37529a134c | 1,180 | py | Python | backend/kesaseteli/applications/migrations/0019_use_employer_applications_related_name.py | City-of-Helsinki/kesaseteli | 964f801c2dba72c4105b6e436b12b821b199d6d2 | [
"MIT"
] | 2 | 2021-05-10T09:28:35.000Z | 2021-05-17T12:15:34.000Z | backend/kesaseteli/applications/migrations/0019_use_employer_applications_related_name.py | City-of-Helsinki/yjdh | 1c07576b456d2be9c3171363450ed46de2c1bbcb | [
"MIT"
] | 931 | 2021-05-21T15:24:35.000Z | 2022-03-31T20:07:40.000Z | backend/kesaseteli/applications/migrations/0019_use_employer_applications_related_name.py | City-of-Helsinki/yjdh | 1c07576b456d2be9c3171363450ed46de2c1bbcb | [
"MIT"
] | 6 | 2021-07-06T11:07:02.000Z | 2022-02-07T12:42:21.000Z | # Generated by Django 3.2.4 on 2021-12-30 09:30
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("companies", "0005_remove_company_eauth_profile"),
migrations.swappable_dependency(s... | 31.052632 | 76 | 0.60339 |
1873a5290c2954d0f1235c045b5bce31b91d87a0 | 7,102 | py | Python | src/models/model_list.py | dorbat01/mammogram | 0fc8a82f14d79e75e064a0604df78c8c10c4e297 | [
"MIT"
] | 1 | 2019-11-15T17:23:05.000Z | 2019-11-15T17:23:05.000Z | src/models/model_list.py | dorbat01/mammogram | 0fc8a82f14d79e75e064a0604df78c8c10c4e297 | [
"MIT"
] | null | null | null | src/models/model_list.py | dorbat01/mammogram | 0fc8a82f14d79e75e064a0604df78c8c10c4e297 | [
"MIT"
] | null | null | null | import logging
import pathlib
from ..utils import load_json, save_json
from ..paths import model_path, trained_model_path
from ..data import available_datasets
from .algorithms import available_algorithms
from ..logging import logger
from .train import train_model, save_model, load_model
__all__ =[
'get_model_list... | 33.032558 | 97 | 0.636863 |
d501f84c790ed140ef1cb1fe47293867f2680734 | 25,599 | py | Python | salt/cloud/clouds/nova.py | pille/salt | 47322575309faac8c4755287d930469caffc1c65 | [
"Apache-2.0"
] | 1 | 2019-06-27T13:03:07.000Z | 2019-06-27T13:03:07.000Z | salt/cloud/clouds/nova.py | pille/salt | 47322575309faac8c4755287d930469caffc1c65 | [
"Apache-2.0"
] | null | null | null | salt/cloud/clouds/nova.py | pille/salt | 47322575309faac8c4755287d930469caffc1c65 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
OpenStack Nova Cloud Module
===========================
PLEASE NOTE: This module is currently in early development, and considered to be
experimental and unstable. It is not recommended for production use. Unless you
are actively developing code in this module, you should use the OpenStack
... | 32.568702 | 113 | 0.59725 |
7e238109b81aef0afe83d708d2db8059b66d99f7 | 8,978 | py | Python | ucsmsdk/mometa/equipment/EquipmentLocalDiskControllerCapProvider.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 78 | 2015-11-30T14:10:05.000Z | 2022-02-13T00:29:08.000Z | ucsmsdk/mometa/equipment/EquipmentLocalDiskControllerCapProvider.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 113 | 2015-11-20T09:42:46.000Z | 2022-03-16T16:53:29.000Z | ucsmsdk/mometa/equipment/EquipmentLocalDiskControllerCapProvider.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 86 | 2015-12-12T08:22:18.000Z | 2022-01-23T03:56:34.000Z | """This module contains the general information for EquipmentLocalDiskControllerCapProvider ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class EquipmentLocalDiskControllerCapProviderConsts:
CARD_TYPE_FLASH = "FLASH"
... | 66.014706 | 754 | 0.687235 |
a5abc656c2b3fde08109077b17f73a6214b06eed | 14,253 | py | Python | Dungeoneer/Treasure.py | tehologist/Dungeoneer | 96f8fb799096b70869158d63c76b2ecdc3510c51 | [
"BSD-3-Clause"
] | null | null | null | Dungeoneer/Treasure.py | tehologist/Dungeoneer | 96f8fb799096b70869158d63c76b2ecdc3510c51 | [
"BSD-3-Clause"
] | null | null | null | Dungeoneer/Treasure.py | tehologist/Dungeoneer | 96f8fb799096b70869158d63c76b2ecdc3510c51 | [
"BSD-3-Clause"
] | null | null | null | # Basic Fantasy RPG Dungeoneer Suite
# Copyright 2007-2012 Chris Gonnerman
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source code must retain the above copyright
# no... | 32.841014 | 79 | 0.416825 |
54cda099784522a8820a12ed4cf5c18b4a038e38 | 801 | py | Python | aw.py | GITliyanfeng/Flask_SSO_demo | f09f67dd2cbb6f8c955c3102a87965377a3c1ffb | [
"MIT"
] | null | null | null | aw.py | GITliyanfeng/Flask_SSO_demo | f09f67dd2cbb6f8c955c3102a87965377a3c1ffb | [
"MIT"
] | null | null | null | aw.py | GITliyanfeng/Flask_SSO_demo | f09f67dd2cbb6f8c955c3102a87965377a3c1ffb | [
"MIT"
] | null | null | null | import os
from datetime import timedelta
from flask import Flask, session, redirect, url_for, request
import requests
app = Flask(__name__)
app.secret_key = os.urandom(24)
app.permanent_session_lifetime = timedelta(seconds=24 * 60 * 60)
@app.route('/')
def index():
session.permanent = False
ti... | 25.03125 | 76 | 0.622971 |
b1d1d8e756bde8b20dba9fca8697c49032560a43 | 1,005 | py | Python | examples/summarization/bart/test_bart_examples.py | WQAQs/transformers | e5c393dcebf42eaec9c1e1d619b5a7788a2d7c65 | [
"Apache-2.0"
] | 1 | 2020-03-31T08:28:47.000Z | 2020-03-31T08:28:47.000Z | examples/summarization/bart/test_bart_examples.py | WQAQs/transformers | e5c393dcebf42eaec9c1e1d619b5a7788a2d7c65 | [
"Apache-2.0"
] | null | null | null | examples/summarization/bart/test_bart_examples.py | WQAQs/transformers | e5c393dcebf42eaec9c1e1d619b5a7788a2d7c65 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import sys
import tempfile
import unittest
from pathlib import Path
from unittest.mock import patch
from .evaluate_cnn import _run_generate
output_file_name = "output_bart_sum.txt"
articles = [" New York (CNN)When Liana Barrientos was 23 years old, she got married in Westchester County."]
... | 29.558824 | 108 | 0.711443 |
85e8a06dfb595ab8c93d1e99b8c0c3f350584a11 | 1,231 | py | Python | relmod/tests/tkfs.py | serwy/relmod | b2c7191b4cfd1c17cb98a37f19434451835bda5d | [
"BSD-2-Clause"
] | 2 | 2021-06-06T02:28:18.000Z | 2021-06-06T02:31:28.000Z | relmod/tests/tkfs.py | serwy/relmod | b2c7191b4cfd1c17cb98a37f19434451835bda5d | [
"BSD-2-Clause"
] | null | null | null | relmod/tests/tkfs.py | serwy/relmod | b2c7191b4cfd1c17cb98a37f19434451835bda5d | [
"BSD-2-Clause"
] | null | null | null | ##
## Author: Roger D. Serwy
## Copyright: 2020-2022, Roger D. Serwy
## All rights reserved.
## License: BSD 2-Clause, see LICENSE file from project
##
import os
class TinyKeyFS:
def __init__(self, base):
self.base = os.path.abspath(base)
self._ensure_path(self.base, split=False)
... | 25.122449 | 57 | 0.530463 |
044e25aa43e82100377e69244cb431908a9dee74 | 1,247 | py | Python | Lib/feaTools/writers/baseWriter.py | colinmford/feaTools | 1e36783cb04f027880ec6c593b7ba0274455d31f | [
"MIT"
] | 11 | 2015-05-26T18:31:32.000Z | 2016-09-15T10:22:02.000Z | Lib/feaTools/writers/baseWriter.py | colinmford/feaTools | 1e36783cb04f027880ec6c593b7ba0274455d31f | [
"MIT"
] | 4 | 2016-01-12T20:26:48.000Z | 2018-10-17T14:58:49.000Z | Lib/feaTools/writers/baseWriter.py | colinmford/feaTools | 1e36783cb04f027880ec6c593b7ba0274455d31f | [
"MIT"
] | 11 | 2015-03-05T19:03:52.000Z | 2018-08-20T21:00:29.000Z | class AbstractFeatureWriter(object):
def feature(self, name):
return self
def lookup(self, name):
return self
def table(self, name, data):
pass
def featureReference(self, name):
pass
def lookupReference(self, name):
pass
def classDefinition(self, nam... | 20.112903 | 110 | 0.627105 |
23f0d342a2ab601269589534aacd9ba6aac69346 | 8,171 | py | Python | 2020/07.py | mikewyer/aoc2021 | 2bd3e50b7a3e61e8b53f0126a971821ebfa48789 | [
"CC0-1.0"
] | null | null | null | 2020/07.py | mikewyer/aoc2021 | 2bd3e50b7a3e61e8b53f0126a971821ebfa48789 | [
"CC0-1.0"
] | null | null | null | 2020/07.py | mikewyer/aoc2021 | 2bd3e50b7a3e61e8b53f0126a971821ebfa48789 | [
"CC0-1.0"
] | null | null | null | """Day 7: Handy Haversacks ---
You land at the regional airport in time for your next flight. In fact, it looks
like you'll even have time to grab some food: all flights are currently delayed
due to issues in luggage processing.
Due to recent aviation regulations, many rules (your puzzle input) are being
enforced abo... | 36.477679 | 122 | 0.701383 |
ae094f4e035c458faa895ee0cb4ad34387e820dd | 7,795 | py | Python | lib/modules/powershell/persistence/userland/backdoor_lnk.py | 1r-f0rhun73r/Empire | 6e2bb66e39c2c02f9a593c64d922e89b0a57ac3e | [
"BSD-3-Clause"
] | null | null | null | lib/modules/powershell/persistence/userland/backdoor_lnk.py | 1r-f0rhun73r/Empire | 6e2bb66e39c2c02f9a593c64d922e89b0a57ac3e | [
"BSD-3-Clause"
] | null | null | null | lib/modules/powershell/persistence/userland/backdoor_lnk.py | 1r-f0rhun73r/Empire | 6e2bb66e39c2c02f9a593c64d922e89b0a57ac3e | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
from builtins import str
from builtins import object
from lib.common import helpers
class Module(object):
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Invoke-BackdoorLNK',
'Author': ['@harmj0y'],
'Description':... | 40.388601 | 177 | 0.52136 |
02677eaf9b41abcbc8e4bd30669a5c36412fa0db | 2,250 | py | Python | libqtile/scripts/main.py | body20002/qtile | e0f1968a96e9acf2b6c9562fae44802ffc9951ec | [
"MIT"
] | null | null | null | libqtile/scripts/main.py | body20002/qtile | e0f1968a96e9acf2b6c9562fae44802ffc9951ec | [
"MIT"
] | null | null | null | libqtile/scripts/main.py | body20002/qtile | e0f1968a96e9acf2b6c9562fae44802ffc9951ec | [
"MIT"
] | null | null | null | import argparse
import logging
import sys
from libqtile.log_utils import init_log
from libqtile.scripts import check, cmd_obj, migrate, run_cmd, shell, start, top
try:
# Python>3.7 can get the version from importlib
from importlib.metadata import distribution
VERSION = distribution("qtile").version
excep... | 29.220779 | 81 | 0.668889 |
edcb1833a2ed11b85a7c85b8e216734e8e2b888e | 9,337 | py | Python | tests/sentinel_commands_test.py | emorozov/aioredis | bad0bd2d1435e56688d189cf3209beec3d239557 | [
"MIT"
] | null | null | null | tests/sentinel_commands_test.py | emorozov/aioredis | bad0bd2d1435e56688d189cf3209beec3d239557 | [
"MIT"
] | 75 | 2020-12-09T06:53:47.000Z | 2022-03-25T01:05:24.000Z | tests/sentinel_commands_test.py | emorozov/aioredis | bad0bd2d1435e56688d189cf3209beec3d239557 | [
"MIT"
] | null | null | null | import asyncio
import pytest
import sys
import logging
from aioredis import RedisError, ReplyError, PoolClosedError
from aioredis.errors import MasterReplyError
from aioredis.sentinel.commands import RedisSentinel
from aioredis.abc import AbcPool
from tests.testutils import redis_version
pytestmark = redis_version(2,... | 30.613115 | 87 | 0.680947 |
fce74839564cb0a439c4b7387f16ebcc79e7403d | 483 | py | Python | tests/app3/test_moved_migrations/0001_initial.py | Conntac/django-squash | 8ff454f594697eecd6a01b8c822b92777fb15674 | [
"MIT"
] | 21 | 2019-05-27T08:27:30.000Z | 2022-03-16T11:53:23.000Z | tests/app3/test_moved_migrations/0001_initial.py | Conntac/django-squash | 8ff454f594697eecd6a01b8c822b92777fb15674 | [
"MIT"
] | 8 | 2019-08-18T23:52:35.000Z | 2022-03-07T20:43:14.000Z | tests/app3/test_moved_migrations/0001_initial.py | Conntac/django-squash | 8ff454f594697eecd6a01b8c822b92777fb15674 | [
"MIT"
] | 3 | 2019-08-18T19:27:36.000Z | 2020-08-19T08:15:26.000Z | # Generated by Django 2.0 on 2019-05-18 15:22
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Person',
fields=[
('id', models.AutoField(aut... | 21.954545 | 114 | 0.573499 |
8aae1495dd1b4642fba0d4ed4ee502f2eea8c3ef | 6,944 | py | Python | utils.py | bayesgroup/semi-supervised-NFs | 8ef6a481389810988c3ffe09a228f814d2de008b | [
"BSD-2-Clause"
] | 19 | 2020-01-30T07:25:23.000Z | 2021-02-06T23:23:06.000Z | utils.py | bayesgroup/semi-supervised-NFs | 8ef6a481389810988c3ffe09a228f814d2de008b | [
"BSD-2-Clause"
] | 1 | 2021-06-04T11:01:40.000Z | 2021-06-04T11:01:40.000Z | utils.py | SamsungLabs/semi-supervised-NFs | 8ef6a481389810988c3ffe09a228f814d2de008b | [
"BSD-2-Clause"
] | 1 | 2021-06-04T10:59:32.000Z | 2021-06-04T10:59:32.000Z | import numpy as np
import torch
from sklearn import datasets
import os
import torchvision
from torchvision import transforms
from sklearn.cluster import MiniBatchKMeans
import matplotlib.pyplot as plt
import warnings
from models import flows, coupling
def viz_array_grid(array, rows, cols, padding=0, channels_last=Fal... | 31.853211 | 111 | 0.575749 |
4be5efe65830100e741c5a4a8ee4e89d80a1b87f | 779 | py | Python | projectreport/finder/combine.py | nickderobertis/project-report | 881e2cb0c37ad1e1b03d6a2f13703c8ff125cf38 | [
"MIT"
] | null | null | null | projectreport/finder/combine.py | nickderobertis/project-report | 881e2cb0c37ad1e1b03d6a2f13703c8ff125cf38 | [
"MIT"
] | 15 | 2020-03-24T17:57:44.000Z | 2022-03-12T01:04:25.000Z | projectreport/finder/combine.py | nickderobertis/project-report | 881e2cb0c37ad1e1b03d6a2f13703c8ff125cf38 | [
"MIT"
] | null | null | null | from typing import Sequence
import os
from projectreport.finder.base import Finder
class CombinedFinder(Finder):
"""
Finder which can be passed other specific finders, and will return project paths that match any of the
passed finders.
"""
def __init__(self, finders: Sequence[Finder], recursive: ... | 29.961538 | 106 | 0.652118 |
48652876ec6073abf337a15d033317fde983a38c | 975 | py | Python | tests/tracing_tool/dynamic/test_fortran/test_fortran.py | ganeshutah/FPChecker | 53a471429762ace13f69733cb2f8b7227fc15b9f | [
"Apache-2.0"
] | 19 | 2019-09-28T16:15:45.000Z | 2022-02-15T15:11:28.000Z | tests/tracing_tool/dynamic/test_fortran/test_fortran.py | tanmaytirpankar/FPChecker | d3fe4bd9489c5705df58a67dbbc388ac1ebf56bf | [
"Apache-2.0"
] | 16 | 2020-02-01T18:43:00.000Z | 2021-12-22T14:47:39.000Z | tests/tracing_tool/dynamic/test_fortran/test_fortran.py | tanmaytirpankar/FPChecker | d3fe4bd9489c5705df58a67dbbc388ac1ebf56bf | [
"Apache-2.0"
] | 5 | 2020-07-27T18:15:36.000Z | 2021-11-01T18:43:34.000Z | #!/usr/bin/env python
import subprocess
import os
import sys
sys.path.append("..")
from .. import conftest
TRACING_TOLL_PATH = conftest.FPCHECKER_PATH
def setup_module(module):
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
os.chdir(THIS_DIR)
def teardown_module(module):
cmd = ["make clean"]
... | 23.780488 | 86 | 0.662564 |
540000fffe956260cfe9adb69b1a7819f5262036 | 1,424 | py | Python | src/cirrus/builtins/tasks/post-batch/lambda_function.py | sjwoodr/cirrus-geo | 8f1190325ba6f6c7fc82e5d3ddb16d34c1b8478d | [
"Apache-2.0"
] | 14 | 2022-01-11T12:28:51.000Z | 2022-03-30T18:46:33.000Z | src/cirrus/builtins/tasks/post-batch/lambda_function.py | sjwoodr/cirrus-geo | 8f1190325ba6f6c7fc82e5d3ddb16d34c1b8478d | [
"Apache-2.0"
] | 68 | 2021-10-04T18:49:57.000Z | 2022-03-30T14:54:39.000Z | src/cirrus/builtins/tasks/post-batch/lambda_function.py | sjwoodr/cirrus-geo | 8f1190325ba6f6c7fc82e5d3ddb16d34c1b8478d | [
"Apache-2.0"
] | 4 | 2021-10-05T14:20:14.000Z | 2022-03-08T18:50:47.000Z | import re
import json
import boto3
from cirrus.lib.process_payload import ProcessPayload
from cirrus.lib.logging import get_task_logger
logger = get_task_logger('lambda_function.update-state', payload=tuple())
BATCH_LOG_GROUP = '/aws/batch/job'
LOG_CLIENT = boto3.client('logs')
DEFAULT_ERROR = 'UnknownError'
ERROR... | 30.297872 | 79 | 0.695927 |
9fb61d02cc46b09beaf1a67184057bbc6a78ea65 | 4,744 | py | Python | python/pyspark/pandas/tests/test_extension.py | 913624784/spark | 81c3cc2312aaa730fa025159f56703170172c454 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2021-06-03T09:59:31.000Z | 2021-06-12T14:40:30.000Z | python/pyspark/pandas/tests/test_extension.py | gaoyajun02/spark | 2e1e1f83e49f69e37229c65592c1a2e87b1efe56 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 26 | 2016-10-27T06:07:00.000Z | 2018-01-26T00:21:32.000Z | python/pyspark/pandas/tests/test_extension.py | gaoyajun02/spark | 2e1e1f83e49f69e37229c65592c1a2e87b1efe56 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2020-11-04T17:36:17.000Z | 2021-04-16T15:57:07.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 31.210526 | 90 | 0.629005 |
faee70546ea57506fcea635575dc7db07253e8cc | 2,015 | py | Python | iv/Leetcode/easy/e101_symmetric_tree.py | iamsuman/iv | bf68d3fd45455b6041e74b09272f69503bf7a8ac | [
"MIT"
] | 2 | 2020-09-19T22:28:15.000Z | 2020-10-03T01:44:53.000Z | iv/Leetcode/easy/e101_symmetric_tree.py | iamsuman/iv | bf68d3fd45455b6041e74b09272f69503bf7a8ac | [
"MIT"
] | null | null | null | iv/Leetcode/easy/e101_symmetric_tree.py | iamsuman/iv | bf68d3fd45455b6041e74b09272f69503bf7a8ac | [
"MIT"
] | 1 | 2020-10-03T01:43:30.000Z | 2020-10-03T01:43:30.000Z | from iv.Binarytree.mytree import MyTree
# Definition for a binary tree node.
from typing import List
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def isSymmetric(self, root: TreeNode) -> bool:
... | 29.632353 | 59 | 0.529529 |
be7a39e1eef1534638b6f17d41c411adff23b121 | 2,410 | py | Python | frontoxy/blocks/writer.py | fabienvauchelles/frontoxy | 320a4b5592c507ac88955d727408b58ff35902b8 | [
"MIT"
] | 8 | 2016-10-20T15:52:09.000Z | 2019-03-27T19:16:40.000Z | frontoxy/blocks/writer.py | fabienvauchelles/frontoxy | 320a4b5592c507ac88955d727408b58ff35902b8 | [
"MIT"
] | 1 | 2018-01-19T12:31:06.000Z | 2018-01-24T09:38:12.000Z | frontoxy/blocks/writer.py | fabienvauchelles/frontoxy | 320a4b5592c507ac88955d727408b58ff35902b8 | [
"MIT"
] | 4 | 2017-08-17T11:40:41.000Z | 2021-01-21T07:07:48.000Z | # -*- coding: utf-8 -*-
from datetime import datetime
import json
import logging
import random
import time
import zipfile
logger = logging.getLogger(__name__)
class BlocksWriterError(Exception):
def __init__(self, message):
super(BlocksWriterError, self).__init__(message)
class BlocksWriter(obje... | 24.845361 | 93 | 0.609959 |
b33c0cd58ee6523e8ce482c8806d2ec494f8595b | 2,679 | py | Python | SQLite/gagFeatureDB_create.py | dev-ev/gag-search-dashboard | 47ea6c48142922afbe5badd4829a7b86faebcb69 | [
"BSD-2-Clause"
] | null | null | null | SQLite/gagFeatureDB_create.py | dev-ev/gag-search-dashboard | 47ea6c48142922afbe5badd4829a7b86faebcb69 | [
"BSD-2-Clause"
] | null | null | null | SQLite/gagFeatureDB_create.py | dev-ev/gag-search-dashboard | 47ea6c48142922afbe5badd4829a7b86faebcb69 | [
"BSD-2-Clause"
] | null | null | null | import sqlite3
def create_feature_table(sql_cursor, featureTabName, fileTabName):
table_command = (''' CREATE TABLE IF NOT EXISTS ''' + featureTabName +
''' (
feature_id INTEGER PRIMARY KEY,
raw_file_id INTEGER NOT... | 37.732394 | 89 | 0.417693 |
6240e36af4a03c3d2f745c094302e11f211481f0 | 5,250 | py | Python | boards/tests.py | landryPrct/forum | c17a0214d2b537b7d48877458da9fe87c2c13654 | [
"MIT"
] | 1 | 2022-03-10T17:01:03.000Z | 2022-03-10T17:01:03.000Z | boards/tests.py | landryPrct/forum | c17a0214d2b537b7d48877458da9fe87c2c13654 | [
"MIT"
] | null | null | null | boards/tests.py | landryPrct/forum | c17a0214d2b537b7d48877458da9fe87c2c13654 | [
"MIT"
] | null | null | null | from django.urls import resolve, reverse
from django.test import TestCase
from .views import home, board_topics, new_topic
from .models import Board, Topic, Post
from .forms import NewTopicForm
class HomeTests(TestCase):
def setUp(self):
self.board = Board.objects.create(name='Django', description='Django ... | 38.888889 | 96 | 0.654095 |
bd5a748647094b2ae9a1655c5c37ed4cdd7a030d | 2,630 | py | Python | server/external/youtube-dl/youtube_dl/extractor/audioboom.py | yycc179/urlp | d272b74c4aed18f03ccada8817ecf5c572a1bf71 | [
"MIT"
] | null | null | null | server/external/youtube-dl/youtube_dl/extractor/audioboom.py | yycc179/urlp | d272b74c4aed18f03ccada8817ecf5c572a1bf71 | [
"MIT"
] | null | null | null | server/external/youtube-dl/youtube_dl/extractor/audioboom.py | yycc179/urlp | d272b74c4aed18f03ccada8817ecf5c572a1bf71 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import float_or_none
class AudioBoomIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?audioboom\.com/(?:boos|posts)/(?P<id>[0-9]+)'
_TESTS = [{
'url': 'https://audioboom.com/boos/427983... | 37.571429 | 105 | 0.559696 |
1f034344f9ff8f3778a4ba3becaf56c49f11aba9 | 1,723 | py | Python | script/bump-version.py | OttoWinter/esphomeyaml | 6a85259e4d6d1b0a0f819688b8e555efcb99ecb0 | [
"MIT"
] | 249 | 2018-04-07T12:04:11.000Z | 2019-01-25T01:11:34.000Z | script/bump-version.py | OttoWinter/esphomeyaml | 6a85259e4d6d1b0a0f819688b8e555efcb99ecb0 | [
"MIT"
] | 243 | 2018-04-11T16:37:11.000Z | 2019-01-25T16:50:37.000Z | script/bump-version.py | OttoWinter/esphomeyaml | 6a85259e4d6d1b0a0f819688b8e555efcb99ecb0 | [
"MIT"
] | 40 | 2018-04-10T05:50:14.000Z | 2019-01-25T15:20:36.000Z | #!/usr/bin/env python3
import argparse
import re
import subprocess
from dataclasses import dataclass
import sys
@dataclass
class Version:
major: int
minor: int
patch: int
beta: int = 0
dev: bool = False
def __str__(self):
return f"{self.major}.{self.minor}.{self.full_patch}"
@pr... | 23.60274 | 81 | 0.594312 |
b1a3070779fc5b1327d16aac9013a9c3d5aa99c4 | 4,882 | py | Python | searcher/migrations/0001_initial.py | lawrie-sm/holyrood-search | 70f7d7cfd06ca1516fed4e057309c41d009a8d53 | [
"MIT"
] | null | null | null | searcher/migrations/0001_initial.py | lawrie-sm/holyrood-search | 70f7d7cfd06ca1516fed4e057309c41d009a8d53 | [
"MIT"
] | null | null | null | searcher/migrations/0001_initial.py | lawrie-sm/holyrood-search | 70f7d7cfd06ca1516fed4e057309c41d009a8d53 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-03-14 11:19
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]... | 54.244444 | 137 | 0.589103 |
542b3f34fd3d7b6b8fd56e144d4d6ca7bd95277e | 1,657 | py | Python | config/wsgi.py | JohnJohnsonOkah/agwuse | da6ecc0d48de6a044798dcc5fce266dca4d91fdd | [
"MIT"
] | null | null | null | config/wsgi.py | JohnJohnsonOkah/agwuse | da6ecc0d48de6a044798dcc5fce266dca4d91fdd | [
"MIT"
] | null | null | null | config/wsgi.py | JohnJohnsonOkah/agwuse | da6ecc0d48de6a044798dcc5fce266dca4d91fdd | [
"MIT"
] | null | null | null | """
WSGI config for AGWUSE project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` s... | 42.487179 | 79 | 0.802052 |
9d58468ae85a8a154e18d39645258be790ece4d0 | 30,630 | py | Python | client/paddleflow/client.py | qiaoshuangshuang/PaddleFlow | 15155a553587f18b09d4edfc604cb64a1fbe01a7 | [
"Apache-2.0"
] | 23 | 2021-12-31T02:36:13.000Z | 2022-03-29T07:38:43.000Z | client/paddleflow/client.py | qiaoshuangshuang/PaddleFlow | 15155a553587f18b09d4edfc604cb64a1fbe01a7 | [
"Apache-2.0"
] | 10 | 2022-01-05T08:47:37.000Z | 2022-03-29T11:59:43.000Z | client/paddleflow/client.py | qiaoshuangshuang/PaddleFlow | 15155a553587f18b09d4edfc604cb64a1fbe01a7 | [
"Apache-2.0"
] | 19 | 2021-12-30T14:37:24.000Z | 2022-03-23T03:30:32.000Z | """
Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
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 agre... | 46.409091 | 137 | 0.64538 |
c15e6e119d9aac691bd33cfc0b46d57096977d99 | 1,371 | py | Python | ipyscales/tests/test_selectors.py | vidartf/jupyter-scales | c826f7466e93f31946c535f12243267b02cf9af7 | [
"BSD-3-Clause"
] | 13 | 2017-08-31T13:51:17.000Z | 2021-08-10T08:52:10.000Z | ipyscales/tests/test_selectors.py | vidartf/jupyter-scales | c826f7466e93f31946c535f12243267b02cf9af7 | [
"BSD-3-Clause"
] | 10 | 2018-09-19T00:52:40.000Z | 2021-05-13T11:08:57.000Z | ipyscales/tests/test_selectors.py | vidartf/jupyter-scales | c826f7466e93f31946c535f12243267b02cf9af7 | [
"BSD-3-Clause"
] | 4 | 2017-09-18T08:14:45.000Z | 2019-11-14T00:47:23.000Z | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Vidar Tonaas Fauske.
# Distributed under the terms of the Modified BSD License.
from collections import OrderedDict
import pytest
from ipywidgets import Widget
from traitlets import TraitError
from ..selectors import StringDropdown, WidgetDropdown
def test_st... | 20.772727 | 67 | 0.656455 |
601b1f7447cf923a4157f15e6559d3797f646c19 | 1,855 | py | Python | visualize_json.py | jason-crowley/random-network-distillation-pytorch | 8bd1e2680efe05b5c7ea3f722bb8cfcb952f091c | [
"MIT"
] | null | null | null | visualize_json.py | jason-crowley/random-network-distillation-pytorch | 8bd1e2680efe05b5c7ea3f722bb8cfcb952f091c | [
"MIT"
] | null | null | null | visualize_json.py | jason-crowley/random-network-distillation-pytorch | 8bd1e2680efe05b5c7ea3f722bb8cfcb952f091c | [
"MIT"
] | 1 | 2021-06-25T23:34:27.000Z | 2021-06-25T23:34:27.000Z | import json
from json import encoder
encoder.FLOAT_REPR = lambda o: format(o, '.2f')
import os
import matplotlib.pyplot as plt
import numpy as np
def plot_file(path, name):
with open(path) as json_file:
data = json.load(json_file)
smoothed = data['nov_vals']
#smoothed = np.convolve(smoothed, np.on... | 33.727273 | 123 | 0.662534 |
91a922036426b00e503326b09551ac76f4b28e06 | 746 | py | Python | png-on-xml.py | PhuNH/example-mapnik | 4b442c751e8cdea1dd186d2c624f8284fe64c76c | [
"MIT"
] | null | null | null | png-on-xml.py | PhuNH/example-mapnik | 4b442c751e8cdea1dd186d2c624f8284fe64c76c | [
"MIT"
] | null | null | null | png-on-xml.py | PhuNH/example-mapnik | 4b442c751e8cdea1dd186d2c624f8284fe64c76c | [
"MIT"
] | null | null | null | import os
import mapnik
m = mapnik.Map(1200,800)
#m.srs = '+init=epsg:3395'
style = 'png-on-xml.xml'
mapnik.load_map(m,style)
s=mapnik.Style()
rule=mapnik.Rule()
sym = mapnik.RasterSymbolizer()
#sym.scaling = 'mapnik.scaling_method.GAUSSIAN'
sym.opacity = 1
#sym.comp_op = "screen"
rule.symbols.append(sym)
s.rules.appe... | 28.692308 | 85 | 0.717158 |
65d4038097b55f703702beb7e249b39bd947717f | 2,481 | py | Python | pysnmp-with-texts/CUMULUS-SNMP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/CUMULUS-SNMP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/CUMULUS-SNMP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CUMULUS-SNMP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CUMULUS-SNMP-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:31:58 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar ... | 99.24 | 505 | 0.790004 |
17fc2971f5b376dcba0e4ea076dfee97bf6f7d54 | 576 | py | Python | tests/test_SerialJobHandler___call__.py | Abjad/abjad-ext-nauert | 2d9f74156936917c21e691b3b5f8c54f431a0ee2 | [
"MIT"
] | 2 | 2020-12-06T20:54:13.000Z | 2021-04-15T16:02:28.000Z | tests/test_SerialJobHandler___call__.py | Abjad/abjad-ext-nauert | 2d9f74156936917c21e691b3b5f8c54f431a0ee2 | [
"MIT"
] | 34 | 2018-06-16T17:40:35.000Z | 2022-03-20T14:43:23.000Z | tests/test_SerialJobHandler___call__.py | Abjad/abjad-ext-nauert | 2d9f74156936917c21e691b3b5f8c54f431a0ee2 | [
"MIT"
] | 1 | 2020-10-16T13:07:54.000Z | 2020-10-16T13:07:54.000Z | import abjad
from abjadext import nauert
class Job(nauert.QuantizationJob):
### INITIALIZER ###
def __init__(self, number):
self.number = number
### SPECIAL METHODS ###
def __call__(self):
self.result = [
x for x in abjad.math.yield_all_compositions_of_integer(self.numb... | 20.571429 | 80 | 0.640625 |
726c32938ba257721a4d064524636fe3467bc8a5 | 955 | py | Python | python_for_beginners/nested_if_else_statement_exs/summer_clothes.py | deboradyankova/python_education | 41c246ae50b4bf0f372f7b8b2de8d02391eaad7a | [
"MIT"
] | null | null | null | python_for_beginners/nested_if_else_statement_exs/summer_clothes.py | deboradyankova/python_education | 41c246ae50b4bf0f372f7b8b2de8d02391eaad7a | [
"MIT"
] | null | null | null | python_for_beginners/nested_if_else_statement_exs/summer_clothes.py | deboradyankova/python_education | 41c246ae50b4bf0f372f7b8b2de8d02391eaad7a | [
"MIT"
] | null | null | null | outfits = ['T-Shirt', 'Shirt', 'Sweatshirt', 'Swim suit', ]
shoes = ['Sneakers', 'Moccasins', 'Sandals', 'Barefoot', ]
combs = [(2, 0), (1, 1), (0, 2), (3, 3)]
mapper = {
10_18: {
'morning': combs[0],
'afternoon': combs[1],
'evening': combs[1]
},
19_24: {
'morni... | 25.131579 | 65 | 0.54555 |
c9ade61d6ce7c5adb009b67fc0fb8ae745d5f41f | 9,682 | py | Python | build/PureCloudPlatformClientV2/models/share.py | cjohnson-ctl/platform-client-sdk-python | 38ce53bb8012b66e8a43cc8bd6ff00cf6cc99100 | [
"MIT"
] | 10 | 2019-02-22T00:27:08.000Z | 2021-09-12T23:23:44.000Z | libs/PureCloudPlatformClientV2/models/share.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 5 | 2018-06-07T08:32:00.000Z | 2021-07-28T17:37:26.000Z | libs/PureCloudPlatformClientV2/models/share.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 6 | 2020-04-09T17:43:07.000Z | 2022-02-17T08:48:05.000Z | # coding: utf-8
"""
Copyright 2016 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applica... | 24.265664 | 84 | 0.546271 |
eeed65542aefcf6f0f34572f2d7d638380bc4d9a | 412 | py | Python | hail/python/hailtop/aiogoogle/__init__.py | sigmarkarl/hail | 11b7c22342a945c61b24c5f8babf4ab411d3d2f1 | [
"MIT"
] | 2 | 2020-12-15T21:20:24.000Z | 2020-12-21T19:46:26.000Z | hail/python/hailtop/aiogoogle/__init__.py | Dania-Abuhijleh/hail | a187dc0867801ca1eee774588fe58604a133a0d9 | [
"MIT"
] | 2 | 2016-11-17T03:06:10.000Z | 2017-12-05T19:00:24.000Z | hail/python/hailtop/aiogoogle/__init__.py | Dania-Abuhijleh/hail | a187dc0867801ca1eee774588fe58604a133a0d9 | [
"MIT"
] | 2 | 2020-07-28T18:55:19.000Z | 2020-10-19T16:43:03.000Z | from .auth import Credentials, ApplicationDefaultCredentials, \
ServiceAccountCredentials, AccessToken, Session
from .client import ContainerClient, ComputeClient, IAmClient, LoggingClient
__all__ = [
'Credentials',
'ApplicationDefaultCredentials',
'ServiceAccountCredentials',
'AccessToken',
'S... | 25.75 | 76 | 0.735437 |
503054d9fc7633533aaeb7c609f9e4cc07ab0540 | 3,886 | py | Python | utils_collection/text_embedding.py | mzolfaghari/crossmodal-contrastive-learning | 060674e626abd552497ca34f12131c68f9f47a74 | [
"Apache-2.0"
] | null | null | null | utils_collection/text_embedding.py | mzolfaghari/crossmodal-contrastive-learning | 060674e626abd552497ca34f12131c68f9f47a74 | [
"Apache-2.0"
] | null | null | null | utils_collection/text_embedding.py | mzolfaghari/crossmodal-contrastive-learning | 060674e626abd552497ca34f12131c68f9f47a74 | [
"Apache-2.0"
] | null | null | null | import json
from pathlib import Path
import re
import sys
from typing import List
import nltk
import numpy as np
import multiprocessing as mp
def preprocess_bert_paragraph(
paragraph: List[str]) -> List[List[str]]:
new_paragraph = []
for i, sentence in enumerate(paragraph):
new_sentence = []
... | 32.383333 | 75 | 0.616572 |
ca66aa9d7b5515cc583cde5705913738d7f68483 | 3,970 | py | Python | tests/parsers/test_2014-castes-mbp.py | PulkitMishra/peracotta | 2062cfe1faad8efc6e04692231574a2d6b997e0b | [
"MIT"
] | null | null | null | tests/parsers/test_2014-castes-mbp.py | PulkitMishra/peracotta | 2062cfe1faad8efc6e04692231574a2d6b997e0b | [
"MIT"
] | null | null | null | tests/parsers/test_2014-castes-mbp.py | PulkitMishra/peracotta | 2062cfe1faad8efc6e04692231574a2d6b997e0b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
from parsers import read_smartctl
from parsers import read_decode_dimms
from parsers import read_dmidecode
from parsers import read_lspci_and_glxinfo
from parsers import read_lscpu
filedir = 'tests/2014-castes-mbp/'
def test_lspci():
expect = {
'type': 'graphics-card',
"working... | 33.644068 | 1,349 | 0.619647 |
5a41de356be9227f2995a770a28d4d4e131ad558 | 4,358 | py | Python | chump_django/settings.py | jlech42/chump_django | 6650de31ec9c4c35e45641a88f212e06a80ea4d7 | [
"MIT"
] | null | null | null | chump_django/settings.py | jlech42/chump_django | 6650de31ec9c4c35e45641a88f212e06a80ea4d7 | [
"MIT"
] | null | null | null | chump_django/settings.py | jlech42/chump_django | 6650de31ec9c4c35e45641a88f212e06a80ea4d7 | [
"MIT"
] | null | null | null | """
Django settings for chump_django project on Heroku. For more info, see:
https://github.com/heroku/heroku-django-template
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/set... | 29.445946 | 91 | 0.707435 |
c2c7605f5e3d03b323f08656c071568cb7b72487 | 3,798 | py | Python | examples/nmt_bidirectional/model.py | erayon/attention_keras | 75b74bcd73db70200368087a68c69d2f4a0ce707 | [
"MIT"
] | null | null | null | examples/nmt_bidirectional/model.py | erayon/attention_keras | 75b74bcd73db70200368087a68c69d2f4a0ce707 | [
"MIT"
] | null | null | null | examples/nmt_bidirectional/model.py | erayon/attention_keras | 75b74bcd73db70200368087a68c69d2f4a0ce707 | [
"MIT"
] | null | null | null | from tensorflow.python.keras.layers import Input, GRU, Dense, Concatenate, TimeDistributed, Bidirectional
from tensorflow.python.keras.models import Model
from layers.attention import AttentionLayer
def define_nmt(hidden_size, batch_size, en_timesteps, en_vsize, fr_timesteps, fr_vsize):
""" Defining a NMT model "... | 54.257143 | 165 | 0.767246 |
c8f2cc4feebcb2056f004f7b623a3ff80bad28c6 | 1,328 | py | Python | src/gluonts/mx/serde.py | lfywork/gluon-ts | 399dbad20f6e78685b707a30817b3a2f97925f8a | [
"Apache-2.0"
] | null | null | null | src/gluonts/mx/serde.py | lfywork/gluon-ts | 399dbad20f6e78685b707a30817b3a2f97925f8a | [
"Apache-2.0"
] | null | null | null | src/gluonts/mx/serde.py | lfywork/gluon-ts | 399dbad20f6e78685b707a30817b3a2f97925f8a | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 30.883721 | 76 | 0.684488 |
b27c603a46a67f4fdcf524208d6b3035888a0d6e | 34,708 | py | Python | yaql/standard_library/collections.py | nzlosh/yaql | bb65fc64026d431ffb866d02825deb3a0e4b5943 | [
"Apache-2.0"
] | 112 | 2015-10-18T02:57:41.000Z | 2022-03-28T18:26:36.000Z | yaql/standard_library/collections.py | nzlosh/yaql | bb65fc64026d431ffb866d02825deb3a0e4b5943 | [
"Apache-2.0"
] | 3 | 2020-06-09T11:54:38.000Z | 2021-04-30T06:12:37.000Z | yaql/standard_library/collections.py | nzlosh/yaql | bb65fc64026d431ffb866d02825deb3a0e4b5943 | [
"Apache-2.0"
] | 27 | 2015-12-10T00:10:02.000Z | 2022-03-20T21:51:01.000Z | # Copyright (c) 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 24.916009 | 79 | 0.631439 |
bd25dd06ae0c781826371d3552c335b90743c0f2 | 1,390 | py | Python | ooobuild/lo/awt/uno_control_image_control.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/awt/uno_control_image_control.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/awt/uno_control_image_control.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 33.902439 | 144 | 0.764748 |
d6794a54514852d0c3b8f8b0830a31494cfe7515 | 10,040 | py | Python | tests/requirements.py | edigaryev/alembic | cbde7ee5e1556683a84c888137933b64d81508f4 | [
"MIT"
] | 4 | 2020-07-23T11:58:49.000Z | 2022-02-25T09:01:25.000Z | tests/requirements.py | edigaryev/alembic | cbde7ee5e1556683a84c888137933b64d81508f4 | [
"MIT"
] | null | null | null | tests/requirements.py | edigaryev/alembic | cbde7ee5e1556683a84c888137933b64d81508f4 | [
"MIT"
] | 1 | 2022-02-07T01:51:33.000Z | 2022-02-07T01:51:33.000Z | from sqlalchemy import text
from alembic.testing import exclusions
from alembic.testing.requirements import SuiteRequirements
from alembic.util import sqla_compat
class DefaultRequirements(SuiteRequirements):
@property
def unicode_string(self):
return exclusions.skip_if(["oracle"])
@property
... | 33.135314 | 79 | 0.623506 |
3a0849bb62933cb9d4343b37b2f86e5992a386c9 | 13,442 | py | Python | gammapy/datasets/flux_points.py | luca-giunti/gammapy | f5873caa3e0ec7175df4647fca83cd44d1ab8fcc | [
"BSD-3-Clause"
] | null | null | null | gammapy/datasets/flux_points.py | luca-giunti/gammapy | f5873caa3e0ec7175df4647fca83cd44d1ab8fcc | [
"BSD-3-Clause"
] | null | null | null | gammapy/datasets/flux_points.py | luca-giunti/gammapy | f5873caa3e0ec7175df4647fca83cd44d1ab8fcc | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import logging
import numpy as np
from astropy import units as u
from astropy.table import Table
from gammapy.modeling.models import DatasetModels
from gammapy.utils.scripts import make_name, make_path
from .core import Dataset
from .utils import get_axes
... | 31.928741 | 91 | 0.584288 |
417c81731c73856abddfbe34fe7d11ce97018469 | 23,230 | py | Python | lib/galaxy/model/metadata.py | bensellak/galaxy | 020b145c8c0ee5f61543e87e5d1867ae717a6871 | [
"CC-BY-3.0"
] | 1 | 2016-04-15T11:52:45.000Z | 2016-04-15T11:52:45.000Z | lib/galaxy/model/metadata.py | bensellak/galaxy | 020b145c8c0ee5f61543e87e5d1867ae717a6871 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/model/metadata.py | bensellak/galaxy | 020b145c8c0ee5f61543e87e5d1867ae717a6871 | [
"CC-BY-3.0"
] | null | null | null | """
Galaxy Metadata
"""
import copy
import json
import logging
import os
import shutil
import sys
import tempfile
import weakref
from os.path import abspath
from six import string_types
from sqlalchemy.orm import object_session
import galaxy.model
from galaxy.util import (listify, string_as_bool,
... | 35.904173 | 146 | 0.633276 |
c2f1d876ec603c325d5fd840f0aed40ac0a43ab5 | 998 | py | Python | cleanup.py | DuncteBot/tf2-transformer-chatbot | 0e364da0537717de025314d40c5b0423891f9dc4 | [
"MIT"
] | null | null | null | cleanup.py | DuncteBot/tf2-transformer-chatbot | 0e364da0537717de025314d40c5b0423891f9dc4 | [
"MIT"
] | null | null | null | cleanup.py | DuncteBot/tf2-transformer-chatbot | 0e364da0537717de025314d40c5b0423891f9dc4 | [
"MIT"
] | null | null | null | import sqlite3
from helpers import get_db_path, get_timeframes
from traceback import print_tb
timeframes = get_timeframes()
print(timeframes)
for timeframe in timeframes:
with sqlite3.connect(get_db_path(timeframe)) as connection:
try:
c = connection.cursor()
print("Cleanin up!"... | 28.514286 | 103 | 0.576152 |
9e5d6341ee2c7920ae966f7497de11c892461d3c | 3,845 | py | Python | ports/nxp_lpc546/build-lpx54608/pins_af.py | ZHENGJIANG1997/OPENMV-RT106X | 276b4920210f97f60120fe7dd9c897dfd192576f | [
"MIT"
] | 181 | 2018-01-31T08:22:21.000Z | 2021-12-25T12:46:18.000Z | ports/nxp_lpc546/build-lpx54608/pins_af.py | ZHENGJIANG1997/OPENMV-RT106X | 276b4920210f97f60120fe7dd9c897dfd192576f | [
"MIT"
] | 19 | 2018-01-31T10:07:19.000Z | 2021-03-11T07:32:28.000Z | ports/nxp_lpc546/build-lpx54608/pins_af.py | ZHENGJIANG1997/OPENMV-RT106X | 276b4920210f97f60120fe7dd9c897dfd192576f | [
"MIT"
] | 87 | 2018-03-22T00:41:48.000Z | 2022-02-05T10:09:59.000Z | PINS_AF = (
('J12_2', (0, 'GPIO0_PIN16'), (1, 'FC4_TXD_SCL_MISO'), (3, 'CT1_CAP0'), ),
('J13_8', (0, 'GPIO0_PIN23'), (2, 'CT1_MAT2'), (3, 'CT3_MAT3'), ),
('J13_6', (0, 'GPIO0_PIN24'), (1, 'FC0_RXD_SDA_MOSI'), (3, 'CT2_CAP0'), ),
('J13_4', (0, 'GPIO0_PIN25'), (1, 'FC0_TXD_SCL_MISO'), (3, 'CT2_CAP1'), ),
('J13_... | 67.45614 | 122 | 0.551886 |
9cfb8fde8e1a39f1fe5acb3c8ff06122871e4c8e | 3,096 | py | Python | mad_outlier_detection.py | TDteach/neural_cleance | 0f2ea8a22c2663c71c82c36ef59d0dfa12fe5626 | [
"MIT"
] | null | null | null | mad_outlier_detection.py | TDteach/neural_cleance | 0f2ea8a22c2663c71c82c36ef59d0dfa12fe5626 | [
"MIT"
] | null | null | null | mad_outlier_detection.py | TDteach/neural_cleance | 0f2ea8a22c2663c71c82c36ef59d0dfa12fe5626 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2018-11-28 16:27:19
# @Author : Bolun Wang (bolunwang@cs.ucsb.edu)
# @Link : http://cs.ucsb.edu/~bolunwang
import os
import sys
import time
import numpy as np
from keras.preprocessing import image
##############################
# PARAMETERS ... | 26.237288 | 110 | 0.602713 |
c3001a26c70049c2d5a47d7bc6e3829c785243c8 | 10,772 | py | Python | leo/plugins/importers/coffeescript.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | leo/plugins/importers/coffeescript.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | leo/plugins/importers/coffeescript.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | #@+leo-ver=5-thin
#@+node:ekr.20160505094722.1: * @file importers/coffeescript.py
'''The @auto importer for coffeescript.'''
import re
import leo.core.leoGlobals as g
import leo.plugins.importers.linescanner as linescanner
Importer = linescanner.Importer
Target = linescanner.Target
#@+others
#@+node:ekr.20160505094722.... | 37.664336 | 87 | 0.540939 |
242246fa64534b12cc02e736d076764b80e77c90 | 2,385 | py | Python | experiments/ashvin/vae/fixed2/pusher2d/state_puck_dense6.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/fixed2/pusher2d/state_puck_dense6.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/fixed2/pusher2d/state_puck_dense6.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from rlkit.envs.multitask.point2d import MultitaskImagePoint2DEnv
from rlkit.envs.multitask.pusher2d import FullPusher2DEnv
from rlkit.launchers.arglauncher import run_variants
import rlkit.misc.hyperparameter as hyp
from rlkit.torch.vae.relabeled_vae_experiment import experiment
if __name__ == "__main__":
# noin... | 31.381579 | 73 | 0.598742 |
3b3336ce7b7c7e9e6974df8f951f637308fe09d5 | 4,227 | py | Python | crawler.py | danrneal/hot-100-crawler | ea0560213d93d3b157844d35283f3471016ae26e | [
"MIT"
] | null | null | null | crawler.py | danrneal/hot-100-crawler | ea0560213d93d3b157844d35283f3471016ae26e | [
"MIT"
] | null | null | null | crawler.py | danrneal/hot-100-crawler | ea0560213d93d3b157844d35283f3471016ae26e | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
import json
import os
from bs4 import BeautifulSoup
from dateutil.parser import parse as dateparse
import requests
START_DATE = dateparse("2008-03-15").date()
def main():
number_ones = open_hot_100_file("hot-100.json")
number_ones["_last_updated"] = dateparse(
... | 29.151724 | 75 | 0.537024 |
9298a93d27124d7a0bf4eeee6ac83dd541161e98 | 2,930 | py | Python | watcher/tests/notifications/test_service_notifications.py | ajaytikoo/watcher | 6dbac1f6ae7f3e10dfdcef5721fa4af7af54e159 | [
"Apache-2.0"
] | 64 | 2015-10-18T02:57:24.000Z | 2022-01-13T11:27:51.000Z | watcher/tests/notifications/test_service_notifications.py | ajaytikoo/watcher | 6dbac1f6ae7f3e10dfdcef5721fa4af7af54e159 | [
"Apache-2.0"
] | null | null | null | watcher/tests/notifications/test_service_notifications.py | ajaytikoo/watcher | 6dbac1f6ae7f3e10dfdcef5721fa4af7af54e159 | [
"Apache-2.0"
] | 35 | 2015-12-25T13:53:21.000Z | 2021-07-19T15:50:16.000Z | # -*- encoding: utf-8 -*-
# Copyright (c) 2017 Servionica
#
# 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 l... | 37.564103 | 79 | 0.608532 |
423f285227b1b2cc2db28598616be9ef744103ed | 5,864 | py | Python | dataprep/clean/clean_lei.py | devinllu/dataprep | d56861e5bed3c608cace74983f797dc729072d0a | [
"MIT"
] | 1 | 2022-02-14T07:18:00.000Z | 2022-02-14T07:18:00.000Z | dataprep/clean/clean_lei.py | devinllu/dataprep | d56861e5bed3c608cace74983f797dc729072d0a | [
"MIT"
] | null | null | null | dataprep/clean/clean_lei.py | devinllu/dataprep | d56861e5bed3c608cace74983f797dc729072d0a | [
"MIT"
] | null | null | null | """
Clean and validate a DataFrame column containing
Legal Entity Identifier (LEI) Numbers.
"""
# pylint: disable=too-many-lines, too-many-arguments, too-many-branches, unused-argument, E1101, E1133
from typing import Any, Union
from operator import itemgetter
import dask.dataframe as dd
import numpy as np
import pand... | 30.863158 | 102 | 0.606412 |
e51f9d077edd8fc384caf85d655e5d0eb8f6bfcf | 2,935 | py | Python | psana/psana/detector/UtilsEpix.py | ZLLentz/lcls2 | 3edbea556779f619944ee9b97fb33cd815a19a37 | [
"BSD-3-Clause-LBNL"
] | null | null | null | psana/psana/detector/UtilsEpix.py | ZLLentz/lcls2 | 3edbea556779f619944ee9b97fb33cd815a19a37 | [
"BSD-3-Clause-LBNL"
] | null | null | null | psana/psana/detector/UtilsEpix.py | ZLLentz/lcls2 | 3edbea556779f619944ee9b97fb33cd815a19a37 | [
"BSD-3-Clause-LBNL"
] | null | null | null | """
:py:class:`UtilsEpix` - utilities for epix... detectors
=======================================================
Usage::
from psana.detector.UtilsEpix import create_directory, alias_for_id,\
id_for_alias, id_epix, print_object_dir,
This software was developed for the LCLS project.
If you use all or p... | 39.133333 | 153 | 0.681431 |
c0f818a4eaeeff073d2cde1983d3beceada10277 | 887 | py | Python | setup.py | deadlock-delegate/binary | a643787be0070c35273057c4a176fe0f1588f1c5 | [
"MIT"
] | null | null | null | setup.py | deadlock-delegate/binary | a643787be0070c35273057c4a176fe0f1588f1c5 | [
"MIT"
] | 2 | 2019-01-28T10:22:14.000Z | 2019-01-28T10:40:45.000Z | setup.py | deadlock-delegate/binary | a643787be0070c35273057c4a176fe0f1588f1c5 | [
"MIT"
] | 2 | 2018-06-27T16:51:33.000Z | 2019-01-28T10:13:53.000Z | import sys
import setuptools
requires = [
]
tests_require = [
'flake8>=3.5.0',
'flake8-import-order>=0.17.1',
'flake8-print>=3.1.0',
'flake8-quotes>=1.0.0',
'pytest>=3.6.1',
'pytest-mock>=1.10.0',
]
extras_require = {
'test': tests_require,
'dev': requires + tests_require
}
setup_r... | 23.342105 | 94 | 0.669673 |
f617808175ac6529550668a565d8091dfc2074af | 148 | py | Python | FTSensor/pybind11-master/tests/test_eval_call.py | yanglh14/InteractiveGrasping | b5bc1866a1847e7b0c11616fd6cbe949c64a355b | [
"MIT"
] | 3 | 2021-04-14T08:24:40.000Z | 2021-11-04T04:10:19.000Z | FTSensor/pybind11-master/tests/test_eval_call.py | yanglh14/InteractiveGrasping | b5bc1866a1847e7b0c11616fd6cbe949c64a355b | [
"MIT"
] | null | null | null | FTSensor/pybind11-master/tests/test_eval_call.py | yanglh14/InteractiveGrasping | b5bc1866a1847e7b0c11616fd6cbe949c64a355b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# This file is called from 'test_eval.py'
if 'call_test2' in locals():
call_test2(y) # noqa: F821 undefined name
| 24.666667 | 47 | 0.628378 |
f2edee7734ea9b8483c9e4f00c14065219f25637 | 3,393 | py | Python | examples/linregPolyVsN.py | Duane321/pyprobml | 6d0ba29f22dc7fec9dfc73788bc5520e97663bdb | [
"MIT"
] | null | null | null | examples/linregPolyVsN.py | Duane321/pyprobml | 6d0ba29f22dc7fec9dfc73788bc5520e97663bdb | [
"MIT"
] | null | null | null | examples/linregPolyVsN.py | Duane321/pyprobml | 6d0ba29f22dc7fec9dfc73788bc5520e97663bdb | [
"MIT"
] | null | null | null |
# Based on https://github.com/probml/pmtk3/blob/master/demos/linregPolyVsN.m
import os
#from utils.util import poly_data_make
from sklearn.linear_model import Ridge
from sklearn.preprocessing import MinMaxScaler
import matplotlib.pyplot as plt
import numpy as np
from utils.util import save_fig
TrueDeg = 2 #The true ... | 37.7 | 130 | 0.650752 |
af32368548d921068e90e5c9078b9273f4e519e0 | 30,423 | py | Python | torchtext/data/field.py | kent930/text | 70a7ade847070454da1332444e48d46d688e4c0e | [
"BSD-3-Clause"
] | null | null | null | torchtext/data/field.py | kent930/text | 70a7ade847070454da1332444e48d46d688e4c0e | [
"BSD-3-Clause"
] | null | null | null | torchtext/data/field.py | kent930/text | 70a7ade847070454da1332444e48d46d688e4c0e | [
"BSD-3-Clause"
] | null | null | null | # coding: utf8
from collections import Counter, OrderedDict
from itertools import chain
import six
import torch
from tqdm import tqdm
from .dataset import Dataset
from .pipeline import Pipeline
from .utils import get_tokenizer
from ..vocab import Vocab, SubwordVocab
class RawField(object):
""" Defines a general ... | 44.155298 | 95 | 0.602472 |
df0d1b43dcf50f2f3bdda07b4fc490e4c878d34e | 519 | py | Python | src/genie/libs/parser/nxos/tests/ShowInstallAllStatus/cli/equal/golden_output2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/nxos/tests/ShowInstallAllStatus/cli/equal/golden_output2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/nxos/tests/ShowInstallAllStatus/cli/equal/golden_output2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | expected_output = {
"additional_info": "\"__inst_001__eigrp\" in vdc 1: EIGRP ISSU config check failed, ISSU may cause traffic disruption",
"module_support_check": "SUCCESS ",
"notifying_services": "FAIL",
"pre_upgrade_check_failed_code": "Return code 0x437F0001 ((null))",
"preparing_bios_version_i... | 43.25 | 124 | 0.705202 |
bc3b791696d12d80cfd8030cf4a320110fd6ebec | 5,214 | py | Python | NASA SPACEAPPS CHALLENGE/Solution/Software part/Astronomical Data and Python Libraries/Openpyxl/openpyxl-2.4.0-a1/openpyxl/styles/cell_style.py | sahirsharma/Martian | 062e9b47849512863c16713811f347ad7e121b56 | [
"MIT"
] | 7 | 2016-12-12T02:29:42.000Z | 2020-05-12T21:21:21.000Z | NASA SPACEAPPS CHALLENGE/Solution/Software part/Astronomical Data and Python Libraries/Openpyxl/openpyxl-2.4.0-a1/openpyxl/styles/cell_style.py | sahirsharma/Martian | 062e9b47849512863c16713811f347ad7e121b56 | [
"MIT"
] | 31 | 2017-01-05T06:07:28.000Z | 2018-05-27T13:13:06.000Z | NASA SPACEAPPS CHALLENGE/Solution/Software part/Astronomical Data and Python Libraries/Openpyxl/openpyxl-2.4.0-a1/openpyxl/styles/cell_style.py | sahirsharma/Martian | 062e9b47849512863c16713811f347ad7e121b56 | [
"MIT"
] | 3 | 2017-12-21T23:30:12.000Z | 2019-01-03T20:51:52.000Z | from __future__ import absolute_import
# Copyright (c) 2010-2015 openpyxl
from array import array
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.descriptors import (
Typed,
Float,
Bool,
Integer,
Sequence,
)
from openpyxl.descriptors.excel import ExtensionList
from openpyx... | 26.467005 | 91 | 0.605869 |
ab1760e88ebce5184109bb10cfe3263e2c2fb499 | 4,346 | py | Python | siren_pytorch/siren_pytorch.py | shinome551/siren-pytorch | 617c46227ab5e8c6afdd138bf2406a21d77a0543 | [
"MIT"
] | null | null | null | siren_pytorch/siren_pytorch.py | shinome551/siren-pytorch | 617c46227ab5e8c6afdd138bf2406a21d77a0543 | [
"MIT"
] | null | null | null | siren_pytorch/siren_pytorch.py | shinome551/siren-pytorch | 617c46227ab5e8c6afdd138bf2406a21d77a0543 | [
"MIT"
] | null | null | null | import math
import torch
from torch import nn
import torch.nn.functional as F
from einops import rearrange
# helpers
def exists(val):
return val is not None
def cast_tuple(val, repeat = 1):
return val if isinstance(val, tuple) else ((val,) * repeat)
# sin activation
class Sine(nn.Module):
def __init__(... | 29.767123 | 133 | 0.580764 |
217dbd02c281625869a5b8263ad073374066fe43 | 3,409 | py | Python | venv/lib/python3.8/site-packages/ansible_collections/cisco/ise/plugins/action/network_access_time_date_conditions_info.py | saeedya/docker-ansible | 6fb0cfc6bc4a5925b21380952a5a4502ec02119a | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/ansible_collections/cisco/ise/plugins/action/network_access_time_date_conditions_info.py | saeedya/docker-ansible | 6fb0cfc6bc4a5925b21380952a5a4502ec02119a | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/ansible_collections/cisco/ise/plugins/action/network_access_time_date_conditions_info.py | saeedya/docker-ansible | 6fb0cfc6bc4a5925b21380952a5a4502ec02119a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.action import ActionBase
try:
... | 34.09 | 128 | 0.653271 |
25c44c50146abbf16f7bff2ababf584935809b3a | 806 | py | Python | 8_Cloudrip_Mountain/396-Hunters_and_Prey/hunters_and_prey.py | katitek/Code-Combat | fbda1ac0ae4a2e2cbfce21492a2caec8098f1bef | [
"MIT"
] | null | null | null | 8_Cloudrip_Mountain/396-Hunters_and_Prey/hunters_and_prey.py | katitek/Code-Combat | fbda1ac0ae4a2e2cbfce21492a2caec8098f1bef | [
"MIT"
] | null | null | null | 8_Cloudrip_Mountain/396-Hunters_and_Prey/hunters_and_prey.py | katitek/Code-Combat | fbda1ac0ae4a2e2cbfce21492a2caec8098f1bef | [
"MIT"
] | null | null | null | def pickUpCoin():
item = hero.findNearestItem()
if item:
hero.move(item.pos)
def summonTroops():
if hero.gold >= hero.costOf("soldier"):
hero.summon("soldier")
def commandSoldier(soldier):
enemy = soldier.findNearestEnemy()
if enemy:
hero.command(soldier, "attack", enemy)... | 23.028571 | 48 | 0.626551 |
3042c82073ad1f17b459adfc193a59f32cbb683c | 4,007 | py | Python | venv/Lib/site-packages/pandas/tests/extension/list/array.py | Jos33y/student-performance-knn | 4e965434f52dd6a1380904aa257df1edfaebb3c4 | [
"MIT"
] | 1 | 2021-02-06T21:00:00.000Z | 2021-02-06T21:00:00.000Z | venv/Lib/site-packages/pandas/tests/extension/list/array.py | Jos33y/student-performance-knn | 4e965434f52dd6a1380904aa257df1edfaebb3c4 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/extension/list/array.py | Jos33y/student-performance-knn | 4e965434f52dd6a1380904aa257df1edfaebb3c4 | [
"MIT"
] | null | null | null | """
Test extension array for storing nested data in a pandas container.
The ListArray stores an ndarray of lists.
"""
import numbers
import random
import string
import numpy as np
from pandas.core.dtypes.base import ExtensionDtype
import pandas as pd
from pandas.core.arrays import ExtensionArray
... | 29.902985 | 87 | 0.568256 |
1314a8cd2e040337d0491b756d8f5af3eb083fa2 | 8,375 | py | Python | tests/test_notebooks.py | fchapoton/cars | c145e12c8b984d5c496c29cff474628044f6216e | [
"Apache-2.0"
] | 134 | 2020-07-30T08:51:29.000Z | 2022-03-30T09:56:01.000Z | tests/test_notebooks.py | fchapoton/cars | c145e12c8b984d5c496c29cff474628044f6216e | [
"Apache-2.0"
] | 9 | 2020-09-15T19:27:33.000Z | 2022-03-29T08:11:36.000Z | tests/test_notebooks.py | fchapoton/cars | c145e12c8b984d5c496c29cff474628044f6216e | [
"Apache-2.0"
] | 14 | 2020-08-06T07:29:55.000Z | 2022-03-25T07:40:39.000Z | #!/usr/bin/env python
# coding: utf8
# Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES).
#
# This file is part of CARS
# (see https://github.com/CNES/cars).
#
# 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... | 32.46124 | 78 | 0.580418 |
7fa7baf3a22338fd177f92ce358a5dabfd036fa5 | 5,884 | py | Python | test/unit/model/v2/test_verifier_section.py | geropizarro/molecule | ad4f2001ca3d604581709ace5fc99e6ddacd7035 | [
"MIT"
] | 1 | 2020-09-16T19:19:32.000Z | 2020-09-16T19:19:32.000Z | test/unit/model/v2/test_verifier_section.py | geropizarro/molecule | ad4f2001ca3d604581709ace5fc99e6ddacd7035 | [
"MIT"
] | 8 | 2020-09-16T07:32:49.000Z | 2020-09-20T15:17:32.000Z | test/unit/model/v2/test_verifier_section.py | geropizarro/molecule | ad4f2001ca3d604581709ace5fc99e6ddacd7035 | [
"MIT"
] | 1 | 2019-06-05T06:29:39.000Z | 2019-06-05T06:29:39.000Z | # Copyright (c) 2015-2018 Cisco Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... | 28.019048 | 79 | 0.508838 |
a34a81501d070fc6c2e78c819e74a025874540a3 | 4,454 | py | Python | sdk/python/pulumi_aws/applicationloadbalancing/listener.py | pulumi-bot/pulumi-aws | 756c60135851e015232043c8206567101b8ebd85 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/applicationloadbalancing/listener.py | pulumi-bot/pulumi-aws | 756c60135851e015232043c8206567101b8ebd85 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/applicationloadbalancing/listener.py | pulumi-bot/pulumi-aws | 756c60135851e015232043c8206567101b8ebd85 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
import pulumi.runtime
class Listener(pulumi.CustomResource):
"""
Provides a Load Balancer Listener resource.
... | 42.419048 | 258 | 0.648181 |
a6f8942fc55aa87cdd9d58b02f15d173e823a0bd | 7,380 | py | Python | pymapf/decentralized/nmpc/nmpc.py | APLA-Toolbox/pymapf | 255df006925401e5ccdf82afc7dac339221574ba | [
"MIT"
] | 25 | 2021-01-17T01:02:25.000Z | 2022-02-13T09:20:59.000Z | pymapf/decentralized/nmpc/nmpc.py | APLA-Toolbox/pymapf | 255df006925401e5ccdf82afc7dac339221574ba | [
"MIT"
] | 37 | 2021-01-16T22:36:32.000Z | 2021-11-15T11:51:59.000Z | pymapf/decentralized/nmpc/nmpc.py | APLA-Toolbox/pymapf | 255df006925401e5ccdf82afc7dac339221574ba | [
"MIT"
] | 5 | 2021-04-02T08:27:52.000Z | 2021-11-17T12:43:52.000Z | """
Decentralized planning using reactive control (nonlinear model predictive control)
author: Erwin Lejeune (erwin.lejeune15@gmail.com)
"""
from ..obstacle import Obstacle
from .nmpc_agent import NMPCAgent
import numpy as np
import matplotlib as mpl
from random import random
import os
if "DISPLAY" not in os.environ:... | 30.622407 | 88 | 0.530217 |
db7cdeb604f6a98ed0bec4ba87f22cc6c1604896 | 19,594 | py | Python | tests/cannlytics/traceability/leaf_test.py | mindthegrow/cannlytics | c266bc1169bef75214985901cd3165f415ad9ba7 | [
"MIT"
] | 7 | 2021-05-31T15:30:22.000Z | 2022-02-05T14:12:31.000Z | tests/cannlytics/traceability/leaf_test.py | mindthegrow/cannlytics | c266bc1169bef75214985901cd3165f415ad9ba7 | [
"MIT"
] | 17 | 2021-06-09T01:04:27.000Z | 2022-03-18T14:48:12.000Z | tests/cannlytics/traceability/leaf_test.py | mindthegrow/cannlytics | c266bc1169bef75214985901cd3165f415ad9ba7 | [
"MIT"
] | 5 | 2021-06-07T13:52:33.000Z | 2021-08-04T00:09:39.000Z | """
Leaf Integration Test | Cannlytics
Author: Keegan Skeate
Contact: keegan@cannlytics.com
Created: Thu Mar 18 16:08:18 2021
License: MIT License
Description:
This script performs the required tests to become a
Leaf Data Systems approved integrator. The test completes
at least one request for each requi... | 34.864769 | 112 | 0.57931 |
35061aa2cf645a13494d512b0a93d5e01cc300e2 | 15,807 | py | Python | djangox/lib/python3.8/site-packages/allauth/account/utils.py | DemarcusL/django_wiki_lab | 3b7cf18af7e0f89c94d10eb953ca018a150a2f55 | [
"MIT"
] | 3 | 2021-07-21T13:47:04.000Z | 2021-07-25T12:19:01.000Z | djangox/lib/python3.8/site-packages/allauth/account/utils.py | DemarcusL/django_wiki_lab | 3b7cf18af7e0f89c94d10eb953ca018a150a2f55 | [
"MIT"
] | 2 | 2021-05-12T06:25:57.000Z | 2022-03-01T04:16:03.000Z | djangox/lib/python3.8/site-packages/allauth/account/utils.py | DemarcusL/django_wiki_lab | 3b7cf18af7e0f89c94d10eb953ca018a150a2f55 | [
"MIT"
] | 1 | 2021-06-30T12:43:39.000Z | 2021-06-30T12:43:39.000Z | import unicodedata
from collections import OrderedDict
from datetime import timedelta
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import update_session_auth_hash
from django.core.exceptions import FieldDoesNotExist, ValidationError
from django.db import models
from dja... | 32.794606 | 88 | 0.658379 |
a902cac690f26a6650a8972e312bfe84ef77b24a | 1,921 | py | Python | tests/test_io.py | ifsm/apollon | c733591240f3a4d3825d61385bd19262bd76b43b | [
"BSD-3-Clause"
] | null | null | null | tests/test_io.py | ifsm/apollon | c733591240f3a4d3825d61385bd19262bd76b43b | [
"BSD-3-Clause"
] | 3 | 2021-03-25T05:35:43.000Z | 2021-05-06T04:51:58.000Z | tests/test_io.py | ifsm/apollon | c733591240f3a4d3825d61385bd19262bd76b43b | [
"BSD-3-Clause"
] | 1 | 2021-05-22T09:50:44.000Z | 2021-05-22T09:50:44.000Z | #!/usr/bin/python3
"""apollon/tests/test_io.py
Test cases for IO module.
"""
import json
from pathlib import Path
import unittest
import numpy as np
from hypothesis import given
import hypothesis.extra.numpy as htn
import apollon.io as aio
class MockFileLoader:
file = aio.WavFileAccessControl()
def __init__... | 29.553846 | 65 | 0.686622 |
f6de2a2d761bb73b631de995df59150bef743a09 | 7,478 | py | Python | instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/__init__.py | epsagon/opentelemetry-python-contrib | 2671ff53c8643ad55dcf78dad072f2f0b82e84e1 | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2019-11-26T14:31:09.000Z | 2020-01-09T23:04:49.000Z | instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/__init__.py | epsagon/opentelemetry-python-contrib | 2671ff53c8643ad55dcf78dad072f2f0b82e84e1 | [
"Apache-2.0",
"BSD-3-Clause"
] | 16 | 2020-02-07T10:01:02.000Z | 2020-04-06T22:03:31.000Z | instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/__init__.py | epsagon/opentelemetry-python-contrib | 2671ff53c8643ad55dcf78dad072f2f0b82e84e1 | [
"Apache-2.0",
"BSD-3-Clause"
] | 5 | 2020-02-05T14:59:12.000Z | 2020-04-03T15:34:16.000Z | # Copyright The OpenTelemetry 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 applicable law or agreed to in ... | 29.097276 | 81 | 0.689355 |
a5d2d84aac471339a589a6c3b01f772f027eee97 | 10,987 | py | Python | vision/utils/box_utils.py | faresbs/handshape-detection | f02e5cd8dcd1894ed0d42d12cc046e88e22615da | [
"MIT"
] | null | null | null | vision/utils/box_utils.py | faresbs/handshape-detection | f02e5cd8dcd1894ed0d42d12cc046e88e22615da | [
"MIT"
] | null | null | null | vision/utils/box_utils.py | faresbs/handshape-detection | f02e5cd8dcd1894ed0d42d12cc046e88e22615da | [
"MIT"
] | 1 | 2021-07-24T17:11:15.000Z | 2021-07-24T17:11:15.000Z | import collections
import torch
import itertools
from typing import List
import math
SSDBoxSizes = collections.namedtuple('SSDBoxSizes', ['min', 'max'])
SSDSpec = collections.namedtuple('SSDSpec', ['feature_map_size', 'shrinkage', 'box_sizes', 'aspect_ratios'])
def generate_ssd_priors(specs: List[SSDSpec], image_si... | 36.993266 | 115 | 0.609448 |
0bb75c369ea0f485c1d221046b42247cffdcf9e5 | 6,401 | py | Python | CS2/9000_bounce_off_breakout/4740_bounce_off/main05.py | nealholt/python_programming_curricula | eda4432dab97178b4a5712b160f5b1da74c068cb | [
"MIT"
] | 7 | 2020-10-14T03:23:12.000Z | 2022-03-09T23:16:13.000Z | CS2/9000_bounce_off_breakout/4740_bounce_off/main05.py | nealholt/python_programming_curricula | eda4432dab97178b4a5712b160f5b1da74c068cb | [
"MIT"
] | null | null | null | CS2/9000_bounce_off_breakout/4740_bounce_off/main05.py | nealholt/python_programming_curricula | eda4432dab97178b4a5712b160f5b1da74c068cb | [
"MIT"
] | 11 | 2021-02-21T20:50:56.000Z | 2022-01-29T07:01:28.000Z | import pygame, random, math
class WallRectangular:
def __init__(self, surface, color, rect):
self.surface = surface
self.rect = rect
self.color = color
def draw(self):
pygame.draw.rect(self.surface, self.color, self.rect)
def collidedAboveBelow(self, other):
'''Pre... | 31.377451 | 89 | 0.589127 |
4748ae6687542a67245f12791f9b2982dd875785 | 23,677 | py | Python | zerver/lib/notifications.py | rhencke/zulip | 6e61152a53eae4fdbf226c5d887c1e6c77fec28b | [
"Apache-2.0"
] | null | null | null | zerver/lib/notifications.py | rhencke/zulip | 6e61152a53eae4fdbf226c5d887c1e6c77fec28b | [
"Apache-2.0"
] | null | null | null | zerver/lib/notifications.py | rhencke/zulip | 6e61152a53eae4fdbf226c5d887c1e6c77fec28b | [
"Apache-2.0"
] | null | null | null |
from typing import cast, Any, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple
from confirmation.models import Confirmation, create_confirmation_link
from django.conf import settings
from django.template import loader
from django.utils.timezone import now as timezone_now
from django.utils.translation import u... | 43.444037 | 102 | 0.645394 |
3b1e90d33281b8ddf580d3f02f67f9ab63e0143b | 28,654 | py | Python | scopy/ScoDruglikeness/molproperty.py | abotzki/Scopy | b15e51a13507b5283888da90548bd50f7df5c50c | [
"MIT"
] | 32 | 2019-09-03T13:45:33.000Z | 2022-03-22T12:13:01.000Z | scopy/ScoDruglikeness/molproperty.py | abotzki/Scopy | b15e51a13507b5283888da90548bd50f7df5c50c | [
"MIT"
] | 2 | 2020-08-11T10:17:05.000Z | 2022-02-04T15:35:42.000Z | scopy/ScoDruglikeness/molproperty.py | abotzki/Scopy | b15e51a13507b5283888da90548bd50f7df5c50c | [
"MIT"
] | 9 | 2019-09-03T13:42:44.000Z | 2022-02-04T14:50:42.000Z | # -*- coding: utf-8 -*-
#Created on Tue Jun 25 21:59:42 2019
#
#@Author: Zhi-Jiang Yang, Dong-Sheng Cao
#@Institution: CBDD Group, Xiangya School of Pharmaceutical Science, CSU, China,
#@Homepage: http://www.scbdd.com
#@Mail: yzjkid9@gmail.com; oriental-cds@163.com
#@Blog: https://blog.moyule.me
from itertools impo... | 26.263978 | 248 | 0.596182 |
b5ade24b4b04c6813b2529c21c7df9b249e5c388 | 2,058 | py | Python | tests/test_ops/test_tensorrt_preprocess.py | Alsasolo/mmcv | 6dfc9312fa872c7fd63a5e6971e9ecca8e3d4ef1 | [
"Apache-2.0"
] | 3,748 | 2018-10-12T08:39:46.000Z | 2022-03-31T17:22:55.000Z | tests/test_ops/test_tensorrt_preprocess.py | Alsasolo/mmcv | 6dfc9312fa872c7fd63a5e6971e9ecca8e3d4ef1 | [
"Apache-2.0"
] | 1,637 | 2018-10-12T06:06:18.000Z | 2022-03-31T02:20:53.000Z | tests/test_ops/test_tensorrt_preprocess.py | Alsasolo/mmcv | 6dfc9312fa872c7fd63a5e6971e9ecca8e3d4ef1 | [
"Apache-2.0"
] | 1,234 | 2018-10-12T09:28:20.000Z | 2022-03-31T15:56:24.000Z | import os
from functools import wraps
import onnx
import torch
from mmcv.ops import nms
from mmcv.tensorrt.preprocess import preprocess_onnx
def remove_tmp_file(func):
@wraps(func)
def wrapper(*args, **kwargs):
onnx_file = 'tmp.onnx'
kwargs['onnx_file'] = onnx_file
try:
... | 27.078947 | 78 | 0.656948 |
b0e49d6c7655de2f6317ee2b6a76c844b713ff0c | 157 | py | Python | src/helper/__init__.py | Pierre-mulliez1/WineMe | 844ef41309c3f3421daa78c6cdec91cb603200e1 | [
"MIT"
] | 1 | 2022-01-20T11:14:25.000Z | 2022-01-20T11:14:25.000Z | src/helper/__init__.py | Pierre-mulliez1/WineMe | 844ef41309c3f3421daa78c6cdec91cb603200e1 | [
"MIT"
] | null | null | null | src/helper/__init__.py | Pierre-mulliez1/WineMe | 844ef41309c3f3421daa78c6cdec91cb603200e1 | [
"MIT"
] | null | null | null | """
WineMe
"""
__version__ = "0.1.0"
if __name__ == "__main__":
print("test")
def function1(stri):
print("this is a test {}".format(str(stri))) | 12.076923 | 48 | 0.585987 |
43eb2c4335613882ca2724f0c92865419181d748 | 390 | py | Python | web/authentication/serializers.py | lfpratik/gadget-board | e1d7ec3d677470be470df379822a946328dcf07b | [
"Apache-2.0"
] | 8 | 2016-11-09T08:01:51.000Z | 2021-11-08T02:54:41.000Z | web/authentication/serializers.py | mik4el/gadget-board | e1d7ec3d677470be470df379822a946328dcf07b | [
"Apache-2.0"
] | 11 | 2020-06-05T17:34:29.000Z | 2022-03-02T02:40:10.000Z | web/authentication/serializers.py | lfpratik/gadget-board | e1d7ec3d677470be470df379822a946328dcf07b | [
"Apache-2.0"
] | 4 | 2016-09-02T04:40:15.000Z | 2021-06-08T09:44:15.000Z | from rest_framework import serializers
from authentication.models import Account
class AccountSerializer(serializers.ModelSerializer):
password = serializers.CharField(write_only=True, required=False)
class Meta:
model = Account
fields = ('id', 'username', 'email', 'created_at', 'updated_at',... | 35.454545 | 85 | 0.720513 |
2d0c3ef61b2036e89a8de38389c784a4454eef3a | 1,652 | py | Python | src/ops/ansible/vars_plugins/opsconfig.py | astancu/ops-cli | 40cf3742a58b65ec5e711c0fcc622e85847b604c | [
"Apache-2.0"
] | null | null | null | src/ops/ansible/vars_plugins/opsconfig.py | astancu/ops-cli | 40cf3742a58b65ec5e711c0fcc622e85847b604c | [
"Apache-2.0"
] | null | null | null | src/ops/ansible/vars_plugins/opsconfig.py | astancu/ops-cli | 40cf3742a58b65ec5e711c0fcc622e85847b604c | [
"Apache-2.0"
] | null | null | null | #Copyright 2019 Adobe. All rights reserved.
#This file is licensed to you under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License. You may obtain a copy
#of the License at http://www.apache.org/licenses/LICENSE-2.0
#Unless required by applicable law or ag... | 35.148936 | 112 | 0.680387 |
c4153c72f9edfc24135b9b70c939a97ca511d9c6 | 995 | py | Python | _unittests/ut_documentation/test_nb_wines_1.py | sdpython/papierstat | f69de884c59ada30b58224dca39f2a44d92122c1 | [
"MIT"
] | 7 | 2019-03-21T09:52:31.000Z | 2021-01-17T16:56:27.000Z | _unittests/ut_documentation/test_nb_wines_1.py | sdpython/papierstat | f69de884c59ada30b58224dca39f2a44d92122c1 | [
"MIT"
] | 33 | 2018-02-08T23:56:57.000Z | 2021-02-10T23:55:43.000Z | _unittests/ut_documentation/test_nb_wines_1.py | sdpython/papierstat | f69de884c59ada30b58224dca39f2a44d92122c1 | [
"MIT"
] | 1 | 2021-02-11T09:16:33.000Z | 2021-02-11T09:16:33.000Z | # -*- coding: utf-8 -*-
"""
@brief test log(time=64s)
"""
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import add_missing_development_version
from pyquickhelper.ipythonhelper import test_notebook_execution_coverage
import papierstat
class TestNotebookWines(unittest... | 29.264706 | 79 | 0.661307 |
62ecf132093425e20ff8e413e6468e05783e656f | 649 | py | Python | src/setup.py | jeffbuttars/django-email-user-model | 77b920294cc336901916f0b4aaf8ea5e9c4865f7 | [
"MIT"
] | null | null | null | src/setup.py | jeffbuttars/django-email-user-model | 77b920294cc336901916f0b4aaf8ea5e9c4865f7 | [
"MIT"
] | null | null | null | src/setup.py | jeffbuttars/django-email-user-model | 77b920294cc336901916f0b4aaf8ea5e9c4865f7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import setuptools
from setuptools import setup, find_packages
import django_email_user_model
setup(name='django-email-user-model',
version=django_email_user_model.__version__,
description="Django custom user model that enable E-Mail as username",
author="Jef... | 25.96 | 76 | 0.657935 |
d631a5f3e4cd94c6217c8a08e50e2db451dc54a5 | 3,193 | py | Python | src/tests/ftest/util/agent_utils_params.py | vatelzh/daos | 3aca9ae033946ca24179ba0a180c0b8422cd2738 | [
"Apache-2.0"
] | 1 | 2019-11-28T07:26:38.000Z | 2019-11-28T07:26:38.000Z | src/tests/ftest/util/agent_utils_params.py | vatelzh/daos | 3aca9ae033946ca24179ba0a180c0b8422cd2738 | [
"Apache-2.0"
] | 52 | 2019-12-04T05:47:10.000Z | 2020-06-09T03:26:12.000Z | src/tests/ftest/util/agent_utils_params.py | vatelzh/daos | 3aca9ae033946ca24179ba0a180c0b8422cd2738 | [
"Apache-2.0"
] | 8 | 2019-12-04T08:26:00.000Z | 2020-06-09T07:40:11.000Z | #!/usr/bin/python
"""
(C) Copyright 2020 Intel Corporation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable ... | 39.419753 | 79 | 0.693705 |
c1c77b7cc90f66238a92161a7c0f5861c453c469 | 9,268 | py | Python | ner_input_data.py | trueto/CCLUE | 040d124545862deddec3367e49859e7e656e28c9 | [
"Apache-2.0"
] | 4 | 2020-11-26T08:05:58.000Z | 2021-11-16T02:29:53.000Z | ner_input_data.py | trueto/CCLUE | 040d124545862deddec3367e49859e7e656e28c9 | [
"Apache-2.0"
] | null | null | null | ner_input_data.py | trueto/CCLUE | 040d124545862deddec3367e49859e7e656e28c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 trueto
# 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 writi... | 37.983607 | 88 | 0.473565 |
dea51b90d55b4693a4f64482616adbf336a364df | 15,264 | py | Python | src/distdl/nn/mixins/interpolate_mixin.py | BuildJet/distdl | 28b0dcf2c0a762de924cc310398a2eab9c35297f | [
"BSD-2-Clause"
] | 25 | 2020-06-25T21:11:55.000Z | 2022-03-24T04:56:23.000Z | src/distdl/nn/mixins/interpolate_mixin.py | BuildJet/distdl | 28b0dcf2c0a762de924cc310398a2eab9c35297f | [
"BSD-2-Clause"
] | 97 | 2020-06-08T17:09:59.000Z | 2022-03-26T00:47:11.000Z | src/distdl/nn/mixins/interpolate_mixin.py | BuildJet/distdl | 28b0dcf2c0a762de924cc310398a2eab9c35297f | [
"BSD-2-Clause"
] | 8 | 2020-06-08T17:00:54.000Z | 2022-03-20T20:20:24.000Z | import numpy as np
import torch
from distdl.utilities.tensor_decomposition import compute_subtensor_shapes_balanced
from distdl.utilities.tensor_decomposition import compute_subtensor_start_indices
from distdl.utilities.tensor_decomposition import compute_subtensor_stop_indices
class InterpolateMixin:
r"""A mixi... | 41.934066 | 100 | 0.596043 |
c46d4003a610969e449427f3c445f070a1166c02 | 4,596 | py | Python | app/test/test_modelCode.py | rmetcalf9/dockPond | 5b26fa90ec76ca3988af4e193304453cbeb852ea | [
"MIT"
] | null | null | null | app/test/test_modelCode.py | rmetcalf9/dockPond | 5b26fa90ec76ca3988af4e193304453cbeb852ea | [
"MIT"
] | 11 | 2018-04-26T09:27:08.000Z | 2018-06-26T13:58:18.000Z | app/test/test_modelCode.py | rmetcalf9/dockPond | 5b26fa90ec76ca3988af4e193304453cbeb852ea | [
"MIT"
] | null | null | null | from TestHelperSuperClass import testHelperAPIClient
import unittest
import json
from unittest.mock import patch, call
#This file is for testing various models that may be used
basic_model_str = "from flask_restplus import fields\n\ndef getModel(flaskRestPlusAPI):\n return flaskRestPlusAPI.model('Animal', {\n '... | 69.636364 | 1,504 | 0.719104 |
3eb02bbad9bd5a0c3c2305655022f7629798f7c6 | 718 | py | Python | auto_script/auto_start_vm.py | imrocky1976/py | 23c5d876da4fbca3bc07760728844a90b0ad1efe | [
"MIT"
] | null | null | null | auto_script/auto_start_vm.py | imrocky1976/py | 23c5d876da4fbca3bc07760728844a90b0ad1efe | [
"MIT"
] | 6 | 2021-03-19T11:49:56.000Z | 2022-02-10T10:46:55.000Z | auto_script/auto_start_vm.py | yinzhe1989/py | 23c5d876da4fbca3bc07760728844a90b0ad1efe | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
import os
import time
if '__main__' == __name__:
while True:
with os.popen('VBoxManage list runningvms') as o:
if 'win7-1' not in o.read():
# vm is not running, start it
if os.system('VBoxManage startvm win7-1 --type gui') == 0:
... | 29.916667 | 88 | 0.480501 |
df9ef467fddcc730fb00b9dc5480b7a0e63224c7 | 256 | py | Python | src/Config.py | caixhstrive/Mini_Xception | 0cf7ce88d9cbe56f0dc20b0ef2850a499c033ce3 | [
"MIT"
] | 3 | 2018-11-21T06:51:57.000Z | 2018-11-21T08:20:53.000Z | src/Config.py | caixhstrive/Mini_Xception | 0cf7ce88d9cbe56f0dc20b0ef2850a499c033ce3 | [
"MIT"
] | null | null | null | src/Config.py | caixhstrive/Mini_Xception | 0cf7ce88d9cbe56f0dc20b0ef2850a499c033ce3 | [
"MIT"
] | null | null | null | frame_face_count = -1
frame_face_time = 0
EmotionLabels = ['Frame','Time','Prediction', 'Proability', 'angry', 'disgust', 'fear',
'happy', 'sad', 'surprise', 'neutral' ]
emotion_prediction = None
emotion_probability = 0.
emotion_text = None | 36.571429 | 87 | 0.671875 |
2eb885f20bdbf61668c101ec21f5828c452935db | 5,560 | py | Python | aws_lambda_builders/workflows/python_pip/compat.py | michael-k/aws-lambda-builders | 24d16a3f4bda83dc6c974ff644471936cf405a0c | [
"Apache-2.0"
] | null | null | null | aws_lambda_builders/workflows/python_pip/compat.py | michael-k/aws-lambda-builders | 24d16a3f4bda83dc6c974ff644471936cf405a0c | [
"Apache-2.0"
] | null | null | null | aws_lambda_builders/workflows/python_pip/compat.py | michael-k/aws-lambda-builders | 24d16a3f4bda83dc6c974ff644471936cf405a0c | [
"Apache-2.0"
] | null | null | null | import os
from aws_lambda_builders.workflows.python_pip.utils import OSUtils
def pip_import_string(python_exe):
os_utils = OSUtils()
cmd = [
python_exe,
"-c",
"import pip; print(pip.__version__)"
]
p = os_utils.popen(cmd, stdout=os_utils.pipe, stderr=os_utils.pipe)
stdout,... | 46.722689 | 78 | 0.702338 |
2a7f91887120fe849b114e15d0f61e82324c96eb | 23,796 | py | Python | pulp/apis/cplex_api.py | WASDi/pulp | 68c70ec33a03e0fadeab50d69b0da106edaa345f | [
"MIT"
] | 1,418 | 2015-04-23T12:33:11.000Z | 2022-03-31T22:26:43.000Z | pulp/apis/cplex_api.py | WASDi/pulp | 68c70ec33a03e0fadeab50d69b0da106edaa345f | [
"MIT"
] | 360 | 2015-04-14T19:09:47.000Z | 2022-03-20T13:05:14.000Z | pulp/apis/cplex_api.py | WASDi/pulp | 68c70ec33a03e0fadeab50d69b0da106edaa345f | [
"MIT"
] | 352 | 2015-04-16T15:45:41.000Z | 2022-03-12T09:16:04.000Z | from .core import LpSolver_CMD, LpSolver, subprocess, PulpSolverError, clock, log
from .core import (
cplex_dll_path,
ctypesArrayFill,
ilm_cplex_license,
ilm_cplex_license_signature,
to_string,
)
from .. import constants, sparse
import os
import warnings
import re
class CPLEX_CMD(LpSolver_CMD):
... | 41.747368 | 187 | 0.573164 |
ce2021971f9ed30d41d33d7b4daae50449c6a2ac | 167,006 | py | Python | tensorflow/python/distribute/distribute_lib.py | wainshine/tensorflow | dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d | [
"Apache-2.0"
] | 54 | 2017-06-17T14:07:48.000Z | 2022-03-29T02:11:20.000Z | tensorflow/python/distribute/distribute_lib.py | wainshine/tensorflow | dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d | [
"Apache-2.0"
] | 19 | 2021-12-28T12:44:55.000Z | 2022-01-13T08:11:28.000Z | tensorflow/python/distribute/distribute_lib.py | wainshine/tensorflow | dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d | [
"Apache-2.0"
] | 11 | 2018-04-19T22:36:01.000Z | 2021-08-02T08:44:43.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 43.33316 | 159 | 0.707376 |
0c0e50ee5cc0215bcc3de02ac2e2776479431578 | 26 | py | Python | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_parts/tests/test_utils.py | kaka-lin/azure-intelligent-edge-patterns | 766833c7c25d2458cec697937be288202d1763bc | [
"MIT"
] | 176 | 2019-07-03T00:20:15.000Z | 2022-03-14T07:51:22.000Z | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_parts/tests/test_utils.py | kaka-lin/azure-intelligent-edge-patterns | 766833c7c25d2458cec697937be288202d1763bc | [
"MIT"
] | 121 | 2019-06-24T20:47:27.000Z | 2022-03-28T02:16:18.000Z | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_parts/tests/test_utils.py | kaka-lin/azure-intelligent-edge-patterns | 766833c7c25d2458cec697937be288202d1763bc | [
"MIT"
] | 144 | 2019-06-18T18:48:43.000Z | 2022-03-31T12:14:46.000Z | """App utility tests.
"""
| 8.666667 | 21 | 0.576923 |
594b4274bf8199a4f831903ad53023954571d432 | 14,585 | py | Python | test/unit/vint/ast/plugin/scope_plugin/test_identifier_classifier.py | tmsanrinsha/vint | 8c34196252b43d7361d0f58cb78cf2d3e4e4fbd0 | [
"MIT"
] | 2 | 2021-06-15T15:07:28.000Z | 2021-10-05T12:23:23.000Z | test/unit/vint/ast/plugin/scope_plugin/test_identifier_classifier.py | tmsanrinsha/vint | 8c34196252b43d7361d0f58cb78cf2d3e4e4fbd0 | [
"MIT"
] | null | null | null | test/unit/vint/ast/plugin/scope_plugin/test_identifier_classifier.py | tmsanrinsha/vint | 8c34196252b43d7361d0f58cb78cf2d3e4e4fbd0 | [
"MIT"
] | null | null | null | import unittest
from pathlib import Path
from pprint import pprint
from vint.ast.parsing import Parser
from vint.ast.plugin.scope_plugin.redir_assignment_parser import traverse
from vint.ast.node_type import NodeType
from vint.ast.plugin.scope_plugin.identifier_classifier import (
IdentifierClassifier,
IDENTIF... | 43.150888 | 107 | 0.672883 |
96cee033a29569feba8b77ccf090bba40f8b77fb | 21,020 | py | Python | c7n/schema.py | mrwacky42/cloud-custodian | 68dc5f4ba61820e6b6a68aa30002f85303df34c9 | [
"Apache-2.0"
] | null | null | null | c7n/schema.py | mrwacky42/cloud-custodian | 68dc5f4ba61820e6b6a68aa30002f85303df34c9 | [
"Apache-2.0"
] | null | null | null | c7n/schema.py | mrwacky42/cloud-custodian | 68dc5f4ba61820e6b6a68aa30002f85303df34c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2017 Capital One Services, 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 ... | 36.493056 | 123 | 0.534443 |
e3d3d99fc8afbdc236d4c32c5c0058aaeb6a14d7 | 2,602 | py | Python | pagerank.py | userforbidden/Python-Samples | 95c4cd12d59ff2f974744c335597ca3e3dcb9f2d | [
"MIT"
] | 1 | 2019-11-08T21:06:00.000Z | 2019-11-08T21:06:00.000Z | pagerank.py | userforbidden/Python-Samples | 95c4cd12d59ff2f974744c335597ca3e3dcb9f2d | [
"MIT"
] | null | null | null | pagerank.py | userforbidden/Python-Samples | 95c4cd12d59ff2f974744c335597ca3e3dcb9f2d | [
"MIT"
] | null | null | null | import numpy as np
class Pagerank():
def __init__(self):
print("Program to calculate Pagerank")
self.graph_dict = {}
self.nodes = []
self.inputMatrix = None
def formSourceDestDict(self,lines):
for links in lines:
source,dest = [int(x) for x in links.s... | 32.936709 | 85 | 0.583782 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.