hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7908a6550b0c0adbf7a047f819a435542bde8f9f | 6,642 | py | Python | acore/classifier_power_multid_truth.py | zhao-david/ACORE-LFI | 91de88b77f0be110e42ed91bbb7a50b7ca83319a | [
"MIT"
] | 9 | 2020-03-17T10:38:28.000Z | 2022-03-10T20:05:11.000Z | acore/classifier_power_multid_truth.py | zhao-david/ACORE-LFI | 91de88b77f0be110e42ed91bbb7a50b7ca83319a | [
"MIT"
] | null | null | null | acore/classifier_power_multid_truth.py | zhao-david/ACORE-LFI | 91de88b77f0be110e42ed91bbb7a50b7ca83319a | [
"MIT"
] | 1 | 2020-10-15T19:44:12.000Z | 2020-10-15T19:44:12.000Z | from warnings import simplefilter
simplefilter(action='ignore', category=FutureWarning)
import numpy as np
import argparse
import pandas as pd
from tqdm.auto import tqdm
from datetime import datetime
import seaborn as sns
import matplotlib.pyplot as plt
from utils.functions import compute_exact_tau, compute_exact_tau... | 47.784173 | 119 | 0.647094 |
7908d2573074e550da58f0b678637c9c8a53bac2 | 2,436 | py | Python | src/visualization_simulator/src/ui/ui_birdview.py | AndyYangjd/data_fuse_demo | 3e19e42c2e02795e8b11aa60e5310c02a3e04316 | [
"BSD-3-Clause"
] | 8 | 2020-10-09T13:43:51.000Z | 2022-01-17T06:18:52.000Z | src/visualization_simulator/src/ui/ui_birdview.py | AndyYangjd/data_fuse_demo | 3e19e42c2e02795e8b11aa60e5310c02a3e04316 | [
"BSD-3-Clause"
] | null | null | null | src/visualization_simulator/src/ui/ui_birdview.py | AndyYangjd/data_fuse_demo | 3e19e42c2e02795e8b11aa60e5310c02a3e04316 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'birdview.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtG... | 43.5 | 75 | 0.71798 |
7908eb5c747d1b302729d9401e1781c65d594dd4 | 30,985 | py | Python | pycalc/MAVProxy/modules/mavproxy_cmdlong.py | joakimzhang/python-electron | 79bc174a14c5286ca739bb7d8ce6522fdc6e9e80 | [
"CC0-1.0"
] | null | null | null | pycalc/MAVProxy/modules/mavproxy_cmdlong.py | joakimzhang/python-electron | 79bc174a14c5286ca739bb7d8ce6522fdc6e9e80 | [
"CC0-1.0"
] | 8 | 2021-01-28T19:26:22.000Z | 2022-03-24T18:07:24.000Z | pycalc/MAVProxy/modules/mavproxy_cmdlong.py | joakimzhang/python-electron | 79bc174a14c5286ca739bb7d8ce6522fdc6e9e80 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
'''command long'''
import threading
import time, os
import math
from pymavlink import mavutil
from MAVProxy.modules.lib import mp_module
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt
from threading import Thread
import mpl_toolkits.mplot3d.axes3d as... | 36.367371 | 93 | 0.487333 |
7909475aadf75da5fbcd516584081dbb378cca5c | 3,210 | py | Python | applauncher/configuration.py | maxpowel/applauncher | 31d51b68f08c7f9595b3b610a7b52f9ed657d851 | [
"Apache-2.0"
] | 3 | 2018-05-06T19:00:55.000Z | 2018-06-05T09:03:34.000Z | applauncher/configuration.py | maxpowel/applauncher | 31d51b68f08c7f9595b3b610a7b52f9ed657d851 | [
"Apache-2.0"
] | 10 | 2018-03-15T13:14:59.000Z | 2021-09-21T13:26:10.000Z | applauncher/configuration.py | maxpowel/applauncher | 31d51b68f08c7f9595b3b610a7b52f9ed657d851 | [
"Apache-2.0"
] | 2 | 2018-05-24T17:30:20.000Z | 2021-09-06T22:03:31.000Z | """Configuration format loaders"""
import locale
import os
from abc import ABC, abstractmethod
import yaml
from pydantic import create_model
def load_configuration(configuration_file_path, parameters_file_path, bundles):
"""Combines the configuration and parameters and build the configuration object"""
mappin... | 38.674699 | 119 | 0.65109 |
79094888287f3474ad5629d99bfe9b593a29fedb | 16,392 | py | Python | cogs/music.py | ROYAL-HarsH/HexBot | 572e3b26291f295f89bd0f7ad8ad5c03c4147470 | [
"MIT"
] | 123 | 2020-09-10T06:52:00.000Z | 2022-03-31T09:52:53.000Z | cogs/music.py | ROYAL-HarsH/HexBot | 572e3b26291f295f89bd0f7ad8ad5c03c4147470 | [
"MIT"
] | 6 | 2020-10-28T18:07:18.000Z | 2021-09-14T17:22:03.000Z | cogs/music.py | ROYAL-HarsH/HexBot | 572e3b26291f295f89bd0f7ad8ad5c03c4147470 | [
"MIT"
] | 29 | 2020-09-05T12:23:34.000Z | 2022-02-08T16:23:48.000Z | import math
import lavalink
import ksoftapi
import discord
from discord.ext import commands
class Music(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.kclient = bot.kclient
if not hasattr(bot, 'lavalink'):
bot.lavalink = lavalink.Client(bot.user.id)
bo... | 42.798956 | 141 | 0.596694 |
790948f12fb2c097c5f715da10b669a2a2549d97 | 1,377 | py | Python | encoding/functions/rectify.py | Womcos/SCARF | b90251bc23410cb810a7082ca75147a7aae21dec | [
"MIT"
] | 1 | 2021-04-06T11:29:04.000Z | 2021-04-06T11:29:04.000Z | encoding/functions/rectify.py | Womcos/SCARF | b90251bc23410cb810a7082ca75147a7aae21dec | [
"MIT"
] | null | null | null | encoding/functions/rectify.py | Womcos/SCARF | b90251bc23410cb810a7082ca75147a7aae21dec | [
"MIT"
] | 1 | 2021-04-06T08:41:12.000Z | 2021-04-06T08:41:12.000Z |
"""Rectify function"""
import torch
from torch.autograd import Function
from encoding import cpu
if torch.cuda.device_count() > 0:
from encoding import gpu
__all__ = ['rectify']
class _rectify(Function):
@staticmethod
def forward(ctx, y, x, kernel_size, stride, padding, dilation, average):
ctx.s... | 32.023256 | 83 | 0.6122 |
79095e078b9d5efc3c6bd59cedd2e6f83016271b | 2,081 | py | Python | Music/play.py | Aggis15/T4NK0R | 05d1791e51f50bcb44c56ca936e5a11b7de21fb1 | [
"MIT"
] | null | null | null | Music/play.py | Aggis15/T4NK0R | 05d1791e51f50bcb44c56ca936e5a11b7de21fb1 | [
"MIT"
] | null | null | null | Music/play.py | Aggis15/T4NK0R | 05d1791e51f50bcb44c56ca936e5a11b7de21fb1 | [
"MIT"
] | null | null | null | import asyncio
import discord
from discord.ext import commands
from discord.commands import slash_command, Option
import wavelink
import json
from dotenv import load_dotenv
import os
load_dotenv()
# Initiate json
file = open("config.json")
data = json.load(file)
# Public variables
guildID = data["guildID"][0]
clas... | 30.15942 | 98 | 0.623258 |
7909756fd37eb6e030d6eb99d8d2fad056c695ad | 3,770 | py | Python | register/utils.py | cds-snc/covid-alert-portal | e7d56fa9fa4a2ad2d60f056eae063713661bd260 | [
"MIT"
] | 43 | 2020-07-31T14:38:06.000Z | 2022-03-07T11:28:28.000Z | register/utils.py | cds-snc/covid-alert-portal | e7d56fa9fa4a2ad2d60f056eae063713661bd260 | [
"MIT"
] | 322 | 2020-07-23T19:38:26.000Z | 2022-03-31T19:15:45.000Z | register/utils.py | cds-snc/covid-alert-portal | e7d56fa9fa4a2ad2d60f056eae063713661bd260 | [
"MIT"
] | 6 | 2020-11-28T19:30:20.000Z | 2021-07-29T18:06:55.000Z | import random
import string
from django.conf import settings
from nacl.signing import SigningKey
from nacl.encoding import Base64Encoder
import segno
import io
import cairosvg
from django.template.loader import render_to_string
import base64
import PyPDF2
import os
# Will generate a random alphanumeric string with 62... | 25.821918 | 88 | 0.687268 |
79097f340e2f2648a96497697dffe80e749af723 | 33,648 | py | Python | lib/doconce/jupyterbook.py | aless80/doconce | ead1bbafa253ea9959ec81007344b58654c75233 | [
"BSD-3-Clause"
] | 34 | 2017-01-04T13:11:31.000Z | 2022-03-10T20:24:51.000Z | lib/doconce/jupyterbook.py | aless80/doconce | ead1bbafa253ea9959ec81007344b58654c75233 | [
"BSD-3-Clause"
] | 93 | 2020-01-19T09:10:03.000Z | 2022-01-22T11:51:12.000Z | lib/doconce/jupyterbook.py | aless80/doconce | ead1bbafa253ea9959ec81007344b58654c75233 | [
"BSD-3-Clause"
] | 8 | 2019-06-27T17:07:16.000Z | 2022-03-14T10:36:38.000Z | import os, sys, shutil, glob, math
import regex as re
from doconce import globals
from .doconce import read_file, write_file, doconce2format, handle_index_and_bib, preprocess
from .misc import option, help_print_options, check_command_line_options, system, _abort, \
find_file_with_extensions, folder_checker, doconc... | 46.156379 | 125 | 0.642118 |
790999d7cfe7e7ecdacf0df07fa17392853db17a | 261 | py | Python | terrascript/kind/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/kind/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/kind/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/kind/r.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class kind_cluster(terrascript.Resource):
pass
| 18.642857 | 79 | 0.770115 |
7909b180475865b79fdf49655ea6e1c4768a2cbd | 4,436 | py | Python | management_layer/metrics.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | null | null | null | management_layer/metrics.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | 90 | 2018-01-23T10:30:01.000Z | 2019-01-31T10:53:42.000Z | management_layer/metrics.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | 1 | 2021-08-17T14:16:23.000Z | 2021-08-17T14:16:23.000Z | import asyncio
import functools
import logging
from types import FunctionType, ModuleType
from typing import Type
from prometheus_client import Histogram, Counter
logger = logging.getLogger(__name__)
H = Histogram(f"management_layer_call_duration_seconds", "API call duration (s)",
["call"])
def _prom... | 38.241379 | 97 | 0.656673 |
790a08f366bde280be8d0312fc96104bd4d44c5a | 3,753 | py | Python | simmbse/structure_item.py | tsherburne/ma_sim | 4082da1c80401dec4293415bc9e9239a6bb8185d | [
"BSD-3-Clause"
] | null | null | null | simmbse/structure_item.py | tsherburne/ma_sim | 4082da1c80401dec4293415bc9e9239a6bb8185d | [
"BSD-3-Clause"
] | null | null | null | simmbse/structure_item.py | tsherburne/ma_sim | 4082da1c80401dec4293415bc9e9239a6bb8185d | [
"BSD-3-Clause"
] | null | null | null | import simpy
import logging
"""
Recursive GraphQL schema for JSON StructureItem - passed as Python dictionary
type StructureItem {
id: ID!
type: StructureType
# optional annotation for a Branch
annotation: String
# reference UUID / Name / Num for: Function, Exit / ExitCondition (Exit), Replicate (DomainSet... | 39.925532 | 103 | 0.572342 |
790a12c98d343c9d305668dfe266339f5ab4440a | 14,445 | py | Python | awswrangler/neptune/neptune.py | minwook-shin/aws-data-wrangler | 304e734db5e96cc5e11ff54b4f3a1cf7c4e5736b | [
"Apache-2.0"
] | null | null | null | awswrangler/neptune/neptune.py | minwook-shin/aws-data-wrangler | 304e734db5e96cc5e11ff54b4f3a1cf7c4e5736b | [
"Apache-2.0"
] | null | null | null | awswrangler/neptune/neptune.py | minwook-shin/aws-data-wrangler | 304e734db5e96cc5e11ff54b4f3a1cf7c4e5736b | [
"Apache-2.0"
] | null | null | null | """Amazon Neptune Module."""
import logging
import re
from typing import Any
import pandas as pd
from gremlin_python.process.graph_traversal import GraphTraversalSource, __
from gremlin_python.process.translator import Translator
from gremlin_python.process.traversal import Cardinality, T
from gremlin_python.structur... | 34.640288 | 116 | 0.638975 |
790a3a0571330e3c1221e6178016abcb51459297 | 1,105 | py | Python | infertrade/algos/community/__init__.py | holderfolyf/infertrade | db46d35244c01d595ae0fc5ad896101ec2a3fb57 | [
"Apache-2.0"
] | null | null | null | infertrade/algos/community/__init__.py | holderfolyf/infertrade | db46d35244c01d595ae0fc5ad896101ec2a3fb57 | [
"Apache-2.0"
] | null | null | null | infertrade/algos/community/__init__.py | holderfolyf/infertrade | db46d35244c01d595ae0fc5ad896101ec2a3fb57 | [
"Apache-2.0"
] | null | null | null | """
Functions for signals and positions created within this package.
Copyright 2021 InferStat Ltd
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
Un... | 39.464286 | 113 | 0.819005 |
790a7e29375efe0aee4b8f054dd71d6c77c4540b | 7,709 | py | Python | src/python/pants/reporting/reporting.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/reporting/reporting.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/reporting/reporting.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import sys
from six import StringIO
from pants.base.workunit import WorkUnitL... | 49.416667 | 109 | 0.705928 |
790a8d3e219ee2a9d7df7c77d6ce7c72b979a675 | 75 | py | Python | by-session/ta-921/j5/list7.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | 2 | 2015-04-29T20:59:35.000Z | 2018-09-26T13:33:43.000Z | by-session/ta-921/j5/list7.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | null | null | null | by-session/ta-921/j5/list7.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | null | null | null | a = [1, 1]
for i in range(10):
a.append(a[-1] + a[-2])
print a
| 10.714286 | 28 | 0.44 |
790ace19384d70584442abecc4540ceb6f9392b5 | 1,585 | py | Python | tiveU/users/views.py | rds0751/newtiveu | 779ac840f0787ea0e74701b43d4320b44429527e | [
"MIT"
] | null | null | null | tiveU/users/views.py | rds0751/newtiveu | 779ac840f0787ea0e74701b43d4320b44429527e | [
"MIT"
] | null | null | null | tiveU/users/views.py | rds0751/newtiveu | 779ac840f0787ea0e74701b43d4320b44429527e | [
"MIT"
] | null | null | null | from django.contrib.auth.mixins import LoginRequiredMixin
from django.urls import reverse
from django.views.generic import DetailView, ListView, RedirectView, UpdateView
from tiveU.articles.models import Article
from .models import User
class UserDetailView(LoginRequiredMixin, DetailView):
model = User
# The... | 33.723404 | 80 | 0.705363 |
790aed5ae55c522da0eaaaef4bf1503de4b0e9e0 | 2,703 | py | Python | mdrsl/rule_generation/decision_tree_conversion/tree_edge.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 3 | 2020-08-03T19:25:44.000Z | 2021-06-27T22:25:55.000Z | mdrsl/rule_generation/decision_tree_conversion/tree_edge.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | null | null | null | mdrsl/rule_generation/decision_tree_conversion/tree_edge.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 2 | 2020-08-07T22:54:28.000Z | 2021-02-18T06:11:01.000Z | from typing import List
from mdrsl.data_structures.rules.generalized_rule_part import GeneralizedAntecedent
from mdrsl.data_structures.item import Literal, NEQLiteral, EQLiteral
from mdrsl.rule_generation.decision_tree_conversion.attribute_id_to_name_conversion import DecisionTreeFeatureIDConverter
class TreeEdge:
... | 35.565789 | 121 | 0.669996 |
790b01b1c205b5dea6dd4f8d22dcd97188b5f521 | 4,031 | py | Python | object_detection_app.py | Prasad9/Detect-Flags-SSD | c0d662bde99ed8df33d72bd06d61d5eb869d31a5 | [
"MIT"
] | 13 | 2017-11-08T07:09:13.000Z | 2022-03-28T07:09:47.000Z | object_detection_app.py | Prasad9/Detect-Flags-SSD | c0d662bde99ed8df33d72bd06d61d5eb869d31a5 | [
"MIT"
] | 3 | 2018-03-08T04:30:19.000Z | 2019-01-03T15:47:24.000Z | object_detection_app.py | Prasad9/Detect-Flags-SSD | c0d662bde99ed8df33d72bd06d61d5eb869d31a5 | [
"MIT"
] | 5 | 2018-01-15T15:26:44.000Z | 2021-08-18T08:02:51.000Z | import os
import cv2
import time
import argparse
import multiprocessing
import numpy as np
import tools.find_mxnet
import mxnet as mx
import sys
from detect.image_detector import ImageDetector
from symbol.symbol_factory import get_symbol
from utils import WebcamVideoStream
class_names = 'Argentina, Australia, Bhutan,... | 41.556701 | 112 | 0.711734 |
790b1681efe2d5bb5b44069894dfe0b461c9f34f | 753 | py | Python | database/task_class/annotation.py | cozy9/Metascape | 261901657bef5e1060f1ae86a2a3913d1e4c87c4 | [
"Apache-2.0"
] | 2 | 2021-08-01T19:33:44.000Z | 2022-02-14T16:37:34.000Z | database/task_class/annotation.py | data2code/Metascape | 261901657bef5e1060f1ae86a2a3913d1e4c87c4 | [
"Apache-2.0"
] | null | null | null | database/task_class/annotation.py | data2code/Metascape | 261901657bef5e1060f1ae86a2a3913d1e4c87c4 | [
"Apache-2.0"
] | 1 | 2019-05-22T12:44:34.000Z | 2019-05-22T12:44:34.000Z | #!/usr/bin/env python
#from .core import *
import numpy as np
import pandas as pd
import shutil
import urllib
import urlparse
from os.path import splitext, basename
import os
from os import sys, path
from pprint import pprint
import StringIO
import db
from gp import *
from core import *
from IPython.core.debugger impor... | 25.965517 | 115 | 0.759628 |
790b1cc12df560ef9f4e3ce6bcdbf341f94a9bba | 14,093 | py | Python | tests/testUtils.py | drmaxchen/pyradio | f2e46856425cfb233d29d391199bfb9b85824b06 | [
"BSD-3-Clause"
] | 2 | 2020-09-11T01:04:07.000Z | 2020-09-11T01:35:46.000Z | tests/testUtils.py | drmaxchen/pyradio | f2e46856425cfb233d29d391199bfb9b85824b06 | [
"BSD-3-Clause"
] | null | null | null | tests/testUtils.py | drmaxchen/pyradio | f2e46856425cfb233d29d391199bfb9b85824b06 | [
"BSD-3-Clause"
] | 1 | 2020-09-11T01:04:46.000Z | 2020-09-11T01:04:46.000Z |
import ast
import csv
import logging
import math
import os
from nose_parameterized import parameterized
import numpy
import SimpleITK as sitk
import six
from radiomics import getTestCase, imageoperations
# Get the logger. This is done outside the class, as it is needed by both the class and the custom_name_func
log... | 36.228792 | 122 | 0.67679 |
790b2d371432522b12c630954ab58dc667368862 | 1,496 | py | Python | markup.py | ak212/python-hockey-rss | 60dc71168db53dee0eaf2bf02a40a73f5e3527db | [
"MIT"
] | 1 | 2015-12-22T18:37:45.000Z | 2015-12-22T18:37:45.000Z | markup.py | ak212/python-hockey-rss | 60dc71168db53dee0eaf2bf02a40a73f5e3527db | [
"MIT"
] | null | null | null | markup.py | ak212/python-hockey-rss | 60dc71168db53dee0eaf2bf02a40a73f5e3527db | [
"MIT"
] | null | null | null | import os
__author__ = "Aaron Koeppel"
__version__ = 1.0
def xmlMarkup(games, team_ab, team_name, team_record):
'''Markup the RSS feed using the data obtained.
:param games: list of games that the team played this season
:type games: list of GameData
:param team_ab: the team's abbreviated name
:type ... | 32.521739 | 79 | 0.625 |
790b30bb249216e305afd822386e038ae1bd80bf | 694 | py | Python | alipay/aop/api/response/AlipayCommerceAntestCaselistQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayCommerceAntestCaselistQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayCommerceAntestCaselistQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayCommerceAntestCaselistQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayCommerceAntestCaselistQueryResponse, self).__init__()
self._data = None
... | 26.692308 | 114 | 0.706052 |
790b6a5adb8a57ca2f1be67f7f489b48f270744e | 6,711 | py | Python | tests/layers/test_layers_normalization.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | tests/layers/test_layers_normalization.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | tests/layers/test_layers_normalization.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import unittest
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import tensorflow as tf
import tensorlayer as tl
from tensorlayer.layers import *
from tensorlayer.models import Model
from tests.utils import CustomTestCase
class Laye_BatchNorm_Test(CustomTestCase):
... | 32.736585 | 124 | 0.573387 |
790b8bcb2e61535fc042fec9fe81c76d4f11fe74 | 4,968 | py | Python | goal_prox/envs/fetch/custom_push.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | 4 | 2021-11-17T20:19:34.000Z | 2022-03-31T04:21:26.000Z | goal_prox/envs/fetch/custom_push.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | goal_prox/envs/fetch/custom_push.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | import os
from gym import utils
from gym.envs.robotics import fetch_env
import numpy as np
from goal_prox.envs.holdout_sampler import HoldoutSampler, LineHoldoutSampler
from goal_prox.envs.old_holdout_sampler import OldHoldoutSampler
# Ensure we get the path separator correct on windows
MODEL_XML_PATH = os.path.join(... | 38.8125 | 100 | 0.636675 |
790b91273bac667d95710a4535755a287da3ae43 | 5,444 | py | Python | camper/twit/models.py | drinks/camper | 82d9f1342886d91bf6787c1bcdb1a7cb62e53ca3 | [
"BSD-3-Clause"
] | null | null | null | camper/twit/models.py | drinks/camper | 82d9f1342886d91bf6787c1bcdb1a7cb62e53ca3 | [
"BSD-3-Clause"
] | null | null | null | camper/twit/models.py | drinks/camper | 82d9f1342886d91bf6787c1bcdb1a7cb62e53ca3 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from django.template.defaultfilters import truncatechars
from django.utils import timezone
from camper.sked.models import Event, Session
from camper.twit.threads import SendTweetThread
class TweetTooLongError(Exception):
def __init__(self, msg=None):
self.msg = msg
if... | 30.58427 | 96 | 0.560434 |
790ba99b6826b9dacdfc3f4386e29754279b0b8c | 4,849 | py | Python | lsw_slackbot/slack.py | emilyhunt/lsw-slackbot | 1069aee5046b30075db52e1735c33d0ca84d71c4 | [
"BSD-3-Clause"
] | null | null | null | lsw_slackbot/slack.py | emilyhunt/lsw-slackbot | 1069aee5046b30075db52e1735c33d0ca84d71c4 | [
"BSD-3-Clause"
] | null | null | null | lsw_slackbot/slack.py | emilyhunt/lsw-slackbot | 1069aee5046b30075db52e1735c33d0ca84d71c4 | [
"BSD-3-Clause"
] | null | null | null | """Various functions that interact with Slack, e.g. posting messages."""
import asyncio
import logging
import socket
from pathlib import Path
from typing import Union, Optional
from slack_sdk.errors import SlackApiError
from lsw_slackbot.plots import plot_resource_use
from lsw_slackbot.resources import current_memory... | 41.444444 | 120 | 0.690864 |
790bb2b2346db328645da4a58ef2ec3b51ffc921 | 311,499 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 44.411035 | 4,257 | 0.6624 |
790be614a340f7ba78a86e453628b9bbc3592651 | 2,805 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/update_history_property.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/update_history_property.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/update_history_property.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 40.652174 | 118 | 0.647772 |
790c138a3e179991434973e9c0575166d21d0d4c | 202 | py | Python | Programming Languages & Libraries/Python/Python Complete Bootcamp/__name__ and __main__/one.py | ttotoc/codebook | 2085e2e29cad9510ba9017e0a760cd0d2d4a734e | [
"MIT"
] | null | null | null | Programming Languages & Libraries/Python/Python Complete Bootcamp/__name__ and __main__/one.py | ttotoc/codebook | 2085e2e29cad9510ba9017e0a760cd0d2d4a734e | [
"MIT"
] | null | null | null | Programming Languages & Libraries/Python/Python Complete Bootcamp/__name__ and __main__/one.py | ttotoc/codebook | 2085e2e29cad9510ba9017e0a760cd0d2d4a734e | [
"MIT"
] | null | null | null | #one.py
print('hello')
def func():
print("Func() in one.py")
print("TOP LEVEL IN one.py")
if __name__ == "__main__":
print("one.py is being run directly!")
else:
print("one.py has been imported!") | 16.833333 | 39 | 0.658416 |
790c27a56ffea18d938238326b7e66906fce3238 | 4,686 | py | Python | experiments/steven/online-vae/pick_and_place/state_exp.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/steven/online-vae/pick_and_place/state_exp.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/steven/online-vae/pick_and_place/state_exp.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import init_sawyer_camera_v1
from multiworld.envs.mujoco.cameras import sawyer_pick_and_place_camera
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.grill.launcher import grill_her_td3_full_experiment
import rlkit.torc... | 35.5 | 80 | 0.568289 |
790c306b71032e576a44a0537655d890cf85245c | 397 | py | Python | terrascript/data/mrcrilly/awx.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/data/mrcrilly/awx.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/data/mrcrilly/awx.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/data/mrcrilly/awx.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:12:44 UTC)
import terrascript
class awx_credential(terrascript.Data):
pass
class awx_credential_azure_key_vault(terrascript.Data):
pass
class awx_credentials(terrascript.Data):
pass
__all__ = [
"awx... | 17.26087 | 73 | 0.753149 |
790c3f5ad6dc4ed22ca30ff6fbd0ee4526b37abe | 2,796 | py | Python | tests/st/ops/ascend/vector/test_expm1_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/st/ops/ascend/vector/test_expm1_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/st/ops/ascend/vector/test_expm1_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019 Huawei Technologies Co., Ltd
#
# 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... | 32.511628 | 89 | 0.546853 |
790c5fcb996d72b9571af6b7d6b1843518659273 | 7,274 | py | Python | src/drf_yasg/renderers.py | yihuang/drf-yasg | e860ce315f85b93731b5d7a7dfcc91149d2a1948 | [
"BSD-3-Clause"
] | null | null | null | src/drf_yasg/renderers.py | yihuang/drf-yasg | e860ce315f85b93731b5d7a7dfcc91149d2a1948 | [
"BSD-3-Clause"
] | null | null | null | src/drf_yasg/renderers.py | yihuang/drf-yasg | e860ce315f85b93731b5d7a7dfcc91149d2a1948 | [
"BSD-3-Clause"
] | null | null | null | import six
from django.shortcuts import render, resolve_url
from django.utils.functional import Promise
from rest_framework.renderers import BaseRenderer, JSONRenderer, TemplateHTMLRenderer
from rest_framework.utils import json
from .app_settings import redoc_settings, swagger_settings
from .codecs import VALIDATORS,... | 41.096045 | 110 | 0.690267 |
790c61d66ec9360ba20d79b6857506daf66299c9 | 287,940 | py | Python | core/domain/prod_validation_jobs_one_off_test.py | cclauss/oppia | 7ad9d06e434c589f0aaa015252ca65872557b7eb | [
"Apache-2.0"
] | null | null | null | core/domain/prod_validation_jobs_one_off_test.py | cclauss/oppia | 7ad9d06e434c589f0aaa015252ca65872557b7eb | [
"Apache-2.0"
] | null | null | null | core/domain/prod_validation_jobs_one_off_test.py | cclauss/oppia | 7ad9d06e434c589f0aaa015252ca65872557b7eb | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2019 The Oppia 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 requi... | 45.437904 | 80 | 0.623512 |
790c7949e38fea35c440f0cd1ae210a7ab63f104 | 6,169 | py | Python | model/studentB.py | eungbean/knowledge-distillation-cifar10 | 683379804c8724d097a845cee85f130b6767dbd7 | [
"MIT"
] | 1 | 2021-02-27T15:13:32.000Z | 2021-02-27T15:13:32.000Z | model/studentB.py | eungbean/knowledge-distillation-cifar10 | 683379804c8724d097a845cee85f130b6767dbd7 | [
"MIT"
] | 9 | 2019-12-16T22:16:55.000Z | 2021-09-08T01:23:09.000Z | model/studentB.py | eungbean/knowledge-distillation-cifar10 | 683379804c8724d097a845cee85f130b6767dbd7 | [
"MIT"
] | null | null | null | """
Baseline CNN, losss function and metrics
Also customizes knowledge distillation (KD) loss function here
"""
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
class Flatten(nn.Module):
def forward(self, input):
return input.view(input.size(0), -1)
"""
This is t... | 40.058442 | 119 | 0.625385 |
790c7a1b4c501fb03fc116411c54360745164692 | 2,803 | py | Python | figure_3/model_III/sobolev_alignment/train_VAE.py | saroudant/sobolev_alignment_manuscript | 2b4d7ce4bbdac3a32ad8c02b950b4d1c91cda193 | [
"MIT"
] | null | null | null | figure_3/model_III/sobolev_alignment/train_VAE.py | saroudant/sobolev_alignment_manuscript | 2b4d7ce4bbdac3a32ad8c02b950b4d1c91cda193 | [
"MIT"
] | null | null | null | figure_3/model_III/sobolev_alignment/train_VAE.py | saroudant/sobolev_alignment_manuscript | 2b4d7ce4bbdac3a32ad8c02b950b4d1c91cda193 | [
"MIT"
] | null | null | null | """
This script:
- Train Sobolev Alignment.
- Save the two networks.
"""
import os, sys, getopt
import pandas as pd
import numpy as np
import re
from anndata import AnnData
import torch
from pickle import dump, load
from copy import deepcopy
import gc
from sobolev_alignment import SobolevAlignment
# Import params
fr... | 26.443396 | 119 | 0.727435 |
790c981f4cc854524f7a2a7c9050b86f4e6f0725 | 2,453 | py | Python | nemo/collections/nlp/data/text_normalization/utils.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | 1 | 2021-09-10T10:40:51.000Z | 2021-09-10T10:40:51.000Z | nemo/collections/nlp/data/text_normalization/utils.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | null | null | null | nemo/collections/nlp/data/text_normalization/utils.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 34.069444 | 111 | 0.6596 |
790cc39c12fa89c6948cffb05bfafa9131ed6db1 | 1,655 | py | Python | controller/class_converter.py | EmilRyberg/P6BinPicking | c33b650db3ae16c56d46d12bfbc59d26c0d9e6aa | [
"MIT"
] | 1 | 2021-08-04T16:18:22.000Z | 2021-08-04T16:18:22.000Z | controller/class_converter.py | EmilRyberg/P6BinPicking | c33b650db3ae16c56d46d12bfbc59d26c0d9e6aa | [
"MIT"
] | null | null | null | controller/class_converter.py | EmilRyberg/P6BinPicking | c33b650db3ae16c56d46d12bfbc59d26c0d9e6aa | [
"MIT"
] | 1 | 2021-08-03T03:41:41.000Z | 2021-08-03T03:41:41.000Z | from controller.enums import PartEnum
def convert_from_part_id(part_id):
if part_id == PartEnum.FUSE.value:
return 'Fuse', 'Fuse'
elif part_id == PartEnum.BACKCOVER.value:
return 'BottomCover', 'BottomCoverFlipped'
elif part_id == PartEnum.WHITECOVER.value:
return 'WhiteCover', 'Wh... | 34.479167 | 50 | 0.682175 |
790d258c90c95ae815827212a0fd1da8191e3ca9 | 1,103 | py | Python | tests/test_clients/test_methods/test_errors/test_chat_not_found.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | tests/test_clients/test_methods/test_errors/test_chat_not_found.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | tests/test_clients/test_methods/test_errors/test_chat_not_found.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | import uuid
from http import HTTPStatus
import pytest
from botx.clients.methods.errors.chat_not_found import (
ChatNotFoundData,
ChatNotFoundError,
)
from botx.clients.methods.v3.chats.add_user import AddUser
from botx.concurrency import callable_to_coroutine
pytestmark = pytest.mark.asyncio
pytest_plugins =... | 26.902439 | 80 | 0.682684 |
790d6cb3a155ec439cad0318ff3fa9dce5e228ef | 267 | py | Python | pylint_django_translations/plugin.py | troyjfarrell/pylint_django_translations | b6c5349379024cdc5445499229bc31330591049a | [
"BSD-3-Clause"
] | null | null | null | pylint_django_translations/plugin.py | troyjfarrell/pylint_django_translations | b6c5349379024cdc5445499229bc31330591049a | [
"BSD-3-Clause"
] | null | null | null | pylint_django_translations/plugin.py | troyjfarrell/pylint_django_translations | b6c5349379024cdc5445499229bc31330591049a | [
"BSD-3-Clause"
] | null | null | null | "Plugin registration"
from pylint.lint import PyLinter
from .checkers import register_checkers
from .suppression import suppress_warnings
def register(linter: PyLinter) -> None:
"Register the plugin"
register_checkers(linter)
suppress_warnings(linter)
| 22.25 | 42 | 0.790262 |
790db0a494b66f67346f0144d8df455628407ad8 | 9,231 | py | Python | airflow/sensors/base_sensor_operator.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 3 | 2015-08-25T13:56:44.000Z | 2020-03-21T10:26:58.000Z | airflow/sensors/base_sensor_operator.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 37 | 2020-07-21T07:50:02.000Z | 2022-03-29T22:31:28.000Z | airflow/sensors/base_sensor_operator.py | santecapital/airflow | 7f02e56c9cb8b548624d13e9c2c2b89d753f996b | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 4 | 2020-07-17T14:02:28.000Z | 2022-02-23T04:29:58.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... | 41.769231 | 96 | 0.638609 |
790dc993af14fbf202955f5e6c992d231e8d2f2f | 812 | py | Python | tests/test_function_definition.py | joseph-hellerstein/symSBML-deprecated | 197f1860bb2e8c5648b3d95d51f8b774fadcaa68 | [
"MIT"
] | 1 | 2021-01-10T03:39:59.000Z | 2021-01-10T03:39:59.000Z | tests/test_function_definition.py | joseph-hellerstein/symSBML-deprecated | 197f1860bb2e8c5648b3d95d51f8b774fadcaa68 | [
"MIT"
] | null | null | null | tests/test_function_definition.py | joseph-hellerstein/symSBML-deprecated | 197f1860bb2e8c5648b3d95d51f8b774fadcaa68 | [
"MIT"
] | 3 | 2020-08-06T08:02:31.000Z | 2022-01-16T18:08:35.000Z | """
Tests for Reactions
"""
from src.common import constants as cn
from src.common.simple_sbml import SimpleSBML
from src.common import simple_sbml
from src.common.function_definition import FunctionDefinition
from tests.common import helpers
import copy
import libsbml
import numpy as np
import unittest
IGNORE_TEST ... | 21.368421 | 69 | 0.716749 |
790dcb854858e35c21f05a12f5c5e59fd69b88de | 17,505 | py | Python | tensor2tensor/data_generators/algorithmic.py | shankharaj29/tensor2tensor | b89ba51a6fa9e0c20009cfb57ee8de04f7138392 | [
"Apache-2.0"
] | 1 | 2019-02-16T10:39:45.000Z | 2019-02-16T10:39:45.000Z | tensor2tensor/data_generators/algorithmic.py | PedroLelis/tensor2tensor | 5a867d031bd493eeb7d2776e1118d1594ff0a623 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/data_generators/algorithmic.py | PedroLelis/tensor2tensor | 5a867d031bd493eeb7d2776e1118d1594ff0a623 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Tensor2Tensor 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... | 32.06044 | 87 | 0.70517 |
790dd67805d984f9cd1a0d14782011a31fbc0274 | 14,858 | py | Python | jina/orchestrate/deployments/config/k8s.py | gauribhutani/jina | e1e23643f8260e6917d9704b63edc54bcebbc7e9 | [
"Apache-2.0"
] | null | null | null | jina/orchestrate/deployments/config/k8s.py | gauribhutani/jina | e1e23643f8260e6917d9704b63edc54bcebbc7e9 | [
"Apache-2.0"
] | 1 | 2022-03-08T18:46:28.000Z | 2022-03-08T18:47:24.000Z | jina/orchestrate/deployments/config/k8s.py | kuraakhilesh8230/jina | 7cc23944fcdfd9944dc805ce8a116818d45317ee | [
"Apache-2.0"
] | 1 | 2022-03-17T04:50:07.000Z | 2022-03-17T04:50:07.000Z | import copy
from argparse import Namespace
from typing import Dict, Union, List, Optional, Tuple
from jina import __default_executor__
from jina.enums import PodRoleType
from jina.excepts import NoContainerizedError
from jina.orchestrate.deployments.config.k8slib import kubernetes_deployment
from jina.orchestrate.depl... | 40.485014 | 158 | 0.573428 |
790ddf7082426bbcac3a19c111985878009197dc | 3,413 | py | Python | Tools/Scripts/webkitpy/tool/mocktool.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/tool/mocktool.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/tool/mocktool.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2011 Google Inc. All rights reserved.
# Copyright (C) 2019 Apple Inc. 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 ... | 39.229885 | 113 | 0.730735 |
790dfbabe99181be277c7a5d49fc080057ab0ccf | 2,583 | py | Python | scripts/deindexify.py | learningequality/channel2site | 0020c15f404c58e369bbe435950e1a38418313e8 | [
"MIT"
] | null | null | null | scripts/deindexify.py | learningequality/channel2site | 0020c15f404c58e369bbe435950e1a38418313e8 | [
"MIT"
] | null | null | null | scripts/deindexify.py | learningequality/channel2site | 0020c15f404c58e369bbe435950e1a38418313e8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse
import bs4
import os
import re
# better indentation hack via https://stackoverflow.com/a/15513483/127114
orig_prettify = bs4.BeautifulSoup.prettify
r = re.compile(r'^(\s*)', re.MULTILINE)
def prettify(self, encoding=None, formatter="minimal", indent_width=3):
return r.sub(r'\... | 33.115385 | 98 | 0.603175 |
790e090aa563b12ea93463b7f3475dec12766fb1 | 5,379 | py | Python | stancode_project/baby_names/babygraphics.py | beomgyutxt/stanCode_project | 6e1e09b40c2104e98c0cf97478fbec0e345be21b | [
"MIT"
] | null | null | null | stancode_project/baby_names/babygraphics.py | beomgyutxt/stanCode_project | 6e1e09b40c2104e98c0cf97478fbec0e345be21b | [
"MIT"
] | null | null | null | stancode_project/baby_names/babygraphics.py | beomgyutxt/stanCode_project | 6e1e09b40c2104e98c0cf97478fbec0e345be21b | [
"MIT"
] | null | null | null | """
SC101 Baby Names Project
Adapted from Nick Parlante's Baby Names assignment by
Jerry Liao.
YOUR DESCRIPTION HERE
"""
import tkinter
import babynames
import babygraphicsgui as gui
FILENAMES = [
'data/full/baby-1900.txt', 'data/full/baby-1910.txt',
'data/full/baby-1920.txt', 'data/full/baby-1930.txt',
... | 35.86 | 112 | 0.636178 |
790e50f085f96675619957c8359eeab6c7a1018f | 808 | py | Python | examples/dmrg/03-density_matrix.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | examples/dmrg/03-density_matrix.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | examples/dmrg/03-density_matrix.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
from pyscf import gto
from pyscf import scf
from pyscf import mcscf
from pyscf.dmrgscf import dmrgci
'''
Block code for active space N-particle density matrices.
'''
b = 1.2
mol = gto.M(
verbose = 4,
atom = 'N 0 0 0; N 0 0 %f'%b,
basis... | 20.2 | 64 | 0.679455 |
790e5ec257778133a9ac30ca59887a817c05e144 | 14,150 | py | Python | src/qa4sm_preprocessing/nc_image_reader/transpose.py | s-scherrer/qa4sm-preprocessing | dbb6dea8e4d34b69ee4d5f82f0a0028294d45170 | [
"MIT"
] | null | null | null | src/qa4sm_preprocessing/nc_image_reader/transpose.py | s-scherrer/qa4sm-preprocessing | dbb6dea8e4d34b69ee4d5f82f0a0028294d45170 | [
"MIT"
] | 5 | 2021-07-29T11:41:24.000Z | 2022-01-18T14:34:38.000Z | src/qa4sm_preprocessing/nc_image_reader/transpose.py | s-scherrer/qa4sm-preprocessing | dbb6dea8e4d34b69ee4d5f82f0a0028294d45170 | [
"MIT"
] | 3 | 2021-07-28T13:56:05.000Z | 2021-11-15T07:39:45.000Z | import copy
import dask
import dask.array as da
from dask.distributed import Client
import datetime
import logging
import math
from multiprocessing.pool import ThreadPool
import numpy as np
from pathlib import Path
from tqdm.auto import tqdm
from typing import Union, TypeVar, Tuple
import xarray as xr
import shutil
imp... | 34.681373 | 84 | 0.637597 |
790e86d135ee08aa433422ee85291f62d15dc188 | 2,125 | py | Python | setup.py | mikiec84/gaffer | 8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d | [
"MIT",
"Unlicense"
] | null | null | null | setup.py | mikiec84/gaffer | 8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d | [
"MIT",
"Unlicense"
] | null | null | null | setup.py | mikiec84/gaffer | 8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d | [
"MIT",
"Unlicense"
] | 1 | 2018-10-28T00:59:17.000Z | 2018-10-28T00:59:17.000Z | # -*- coding: utf-8 -
#
# This file is part of gaffer. See the NOTICE for more information.
import os
import sys
from setuptools import setup, find_packages, Extension
py_version = sys.version_info[:2]
if py_version < (2, 6):
raise RuntimeError('On Python 2, Gaffer requires Python 2.6 or better')
CLASSIFIERS ... | 28.333333 | 75 | 0.6 |
790eeceb218e6787689db264a375fbf3fdaabb82 | 2,186 | py | Python | CHAPTER 10 (maps, hash tables and skip lists)/probe_hash_map_class.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 10 (maps, hash tables and skip lists)/probe_hash_map_class.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 10 (maps, hash tables and skip lists)/probe_hash_map_class.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | from hash_map_base_class import *
class ProbeHashMap(HashMapBase):
"""Hash map implemented with linear probing for collision resolution."""
_AVAIL = object() # sentinal marks locations of previous deletions
def _is_available(self,j):
"""Return True if the index j is available in the table."""
... | 40.481481 | 83 | 0.558097 |
790f3872d7620a5bb51110e2e02db5fdf3a93f98 | 18,274 | py | Python | SCRAPE/Lib/site-packages/twisted/logger/test/test_json.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/logger/test/test_json.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/logger/test/test_json.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.logger._json}.
"""
from io import BytesIO, StringIO
from typing import IO, Any, List, Optional, Sequence, cast
from zope.interface import implementer
from zope.interface.exceptions import BrokenMethodImplementation
from z... | 37.600823 | 92 | 0.613002 |
790f3f4dbe41b1f674c9a7fa335f4b9b19284f0c | 2,583 | py | Python | telethon_tests/utils_test.py | Rezlazy/Telethon | 239ee16bc3c6e393d3777414fc504cacd7d70642 | [
"MIT"
] | 2 | 2018-03-31T05:43:23.000Z | 2018-07-11T12:35:50.000Z | telethon_tests/utils_test.py | Rezlazy/Telethon | 239ee16bc3c6e393d3777414fc504cacd7d70642 | [
"MIT"
] | 1 | 2018-03-20T21:15:47.000Z | 2018-03-20T21:15:47.000Z | telethon_tests/utils_test.py | Rezlazy/Telethon | 239ee16bc3c6e393d3777414fc504cacd7d70642 | [
"MIT"
] | 1 | 2019-05-10T21:53:16.000Z | 2019-05-10T21:53:16.000Z | import os
import unittest
from telethon.tl import TLObject
from telethon.extensions import BinaryReader
class UtilsTests(unittest.TestCase):
@staticmethod
def test_binary_writer_reader():
# Test that we can read properly
data = b'\x01\x05\x00\x00\x00\r\x00\x00\x00\x00\x00\x00\x00\x00\x00' \
... | 41.66129 | 105 | 0.593109 |
790f6954579b5a8a2751447a057ceec9885a72e0 | 8,803 | py | Python | PyFunceble/output/clean.py | NeolithEra/PyFunceble | 58db861d36224f279a460f4959aaa2e140ce749f | [
"MIT"
] | null | null | null | PyFunceble/output/clean.py | NeolithEra/PyFunceble | 58db861d36224f279a460f4959aaa2e140ce749f | [
"MIT"
] | null | null | null | PyFunceble/output/clean.py | NeolithEra/PyFunceble | 58db861d36224f279a460f4959aaa2e140ce749f | [
"MIT"
] | null | null | null | """
The tool to check the availability or syntax of domains, IPv4, IPv6 or URL.
::
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ ... | 34.65748 | 88 | 0.546291 |
790f86edf2189fb2add3cdf42d517513e392ae59 | 4,004 | py | Python | alipay/aop/api/request/AlipayEbppInvoiceApplyStatusNotifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayEbppInvoiceApplyStatusNotifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayEbppInvoiceApplyStatusNotifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayEbppInvoiceApplyStatusNotifyModel import AlipayEbppInvoiceApplyStatusNotifyModel
class AlipayEbppInvoiceApplyStatusNotifyReque... | 27.613793 | 148 | 0.647353 |
790fa5f6b643c5d338bc52217f5245fbe16a735b | 5,378 | py | Python | mmdet3d/models/model_utils/vote_module.py | BOURSa/mmdetection3d | 27d0001e873b3102a828a27e1372873fcf81ed7e | [
"Apache-2.0"
] | 12 | 2021-03-17T09:07:18.000Z | 2022-01-21T01:37:42.000Z | mmdet3d/models/model_utils/vote_module.py | BOURSa/mmdetection3d | 27d0001e873b3102a828a27e1372873fcf81ed7e | [
"Apache-2.0"
] | 1 | 2020-08-11T05:44:29.000Z | 2020-08-11T05:44:29.000Z | mmdet3d/models/model_utils/vote_module.py | BOURSa/mmdetection3d | 27d0001e873b3102a828a27e1372873fcf81ed7e | [
"Apache-2.0"
] | 2 | 2021-03-17T09:25:15.000Z | 2021-04-22T09:15:58.000Z | import torch
from mmcv.cnn import ConvModule
from torch import nn as nn
from mmdet3d.models.builder import build_loss
class VoteModule(nn.Module):
"""Vote module.
Generate votes from seed point features.
Args:
in_channels (int): Number of channels of seed point features.
vote_per_seed (... | 38.690647 | 79 | 0.57289 |
790fcad30f24a02df67c053c24d7cb4c3fa91244 | 372 | py | Python | terrascript/data/onelogin.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/data/onelogin.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/data/onelogin.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/data/onelogin.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:23:37 UTC)
#
# For imports without namespace, e.g.
#
# >>> import terrascript.data.onelogin
#
# instead of
#
# >>> import terrascript.data.onelogin.onelogin
#
# This is only available for 'official' and 'partner' providers... | 24.8 | 73 | 0.739247 |
790fd3d52f08e73bf70777d82bb57ccc7d5433c2 | 1,456 | py | Python | solutions_by_text/sbt_token_generator.py | sijanonly/sbt-python-client | b467d78414e7e01181025cd25456756f46ace237 | [
"MIT"
] | 1 | 2018-10-12T20:20:22.000Z | 2018-10-12T20:20:22.000Z | solutions_by_text/sbt_token_generator.py | sijanonly/sbt-python-client | b467d78414e7e01181025cd25456756f46ace237 | [
"MIT"
] | null | null | null | solutions_by_text/sbt_token_generator.py | sijanonly/sbt-python-client | b467d78414e7e01181025cd25456756f46ace237 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
solutions_by_text.sbt_token_generator
~~~~~~~~~~~~
This module handles security token generation.
"""
# @Author: sijanonly
# @Date: 2018-03-19 10:57:26
# @Last Modified by: sijanonly
# @Last Modified time: 2018-03-19 14:51:07
import json
from urllib import parse
import requests
from... | 25.103448 | 74 | 0.666896 |
790fe5b5bc53e0ed33112caa272bfaa17a849a24 | 6,123 | py | Python | gs_compress.py | brio50/groups-io | 4d70a007fb772a40a16e7cd784f3659a04a8e51c | [
"MIT"
] | null | null | null | gs_compress.py | brio50/groups-io | 4d70a007fb772a40a16e7cd784f3659a04a8e51c | [
"MIT"
] | null | null | null | gs_compress.py | brio50/groups-io | 4d70a007fb772a40a16e7cd784f3659a04a8e51c | [
"MIT"
] | null | null | null | # https://github.com/theeko74/pdfc
# modified by brio50 on 2022/01/23, working with gs version 9.54.0
"""
Simple python wrapper script to use ghoscript function to compress PDF files.
Compression levels:
0: default
1: prepress
2: printer
3: ebook
4: screen
Dependency: Ghostscript.
On MacOSX insta... | 35.598837 | 100 | 0.600033 |
790ff7ce54753e832c534a3815d0738e185cbb86 | 5,137 | py | Python | opacus/utils/tensor_utils.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 6 | 2021-06-16T14:49:22.000Z | 2022-03-29T20:44:40.000Z | opacus/utils/tensor_utils.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 12 | 2022-02-17T16:29:31.000Z | 2022-03-29T15:06:42.000Z | opacus/utils/tensor_utils.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 3 | 2021-11-18T10:13:00.000Z | 2022-03-23T10:25:55.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Utils for generating stats from torch tensors.
"""
from typing import Iterator, List, Tuple, Union
import numpy as np
import torch
from torch.functional import F
def calc_sample_norms(
named_params: Iterator[Tuple[s... | 34.709459 | 103 | 0.625268 |
790ffe614e778d774c375bfee358e50990217936 | 1,186 | py | Python | zerver/webhooks/dropbox/tests.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | null | null | null | zerver/webhooks/dropbox/tests.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | 6 | 2020-09-05T21:07:41.000Z | 2021-12-02T17:56:37.000Z | zerver/webhooks/dropbox/tests.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | 1 | 2021-01-07T23:27:52.000Z | 2021-01-07T23:27:52.000Z | # -*- coding: utf-8 -*-
from typing import Text
from zerver.lib.test_classes import WebhookTestCase
class DropboxHookTests(WebhookTestCase):
STREAM_NAME = 'test'
URL_TEMPLATE = "/api/v1/external/dropbox?&api_key={api_key}&stream={stream}"
FIXTURE_DIR_NAME = 'dropbox'
def test_file_updated(self) -> No... | 40.896552 | 93 | 0.682968 |
790ffeb65cab72faeb94c4e79e5014d27786bd44 | 8,198 | py | Python | tests/test_ec2/test_spot_instances.py | argos83/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | 1 | 2021-03-06T22:01:41.000Z | 2021-03-06T22:01:41.000Z | tests/test_ec2/test_spot_instances.py | marciogh/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | null | null | null | tests/test_ec2/test_spot_instances.py | marciogh/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | 1 | 2017-10-19T00:53:28.000Z | 2017-10-19T00:53:28.000Z | from __future__ import unicode_literals
from nose.tools import assert_raises
import datetime
import boto
import boto3
import sure # noqa
from boto.exception import JSONResponseError
from moto import mock_ec2
from moto.backends import get_model
from moto.core.utils import iso_8601_datetime_with_milliseconds
@mock_e... | 35.95614 | 177 | 0.723347 |
7910157a58eb1ea2d2d8daf89a1c9e4bce53c233 | 19,489 | py | Python | dust_attenuation/radiative_transfer.py | gbrammer/dust_attenuation | 15144c55d594ea06c4790215f7e0e66b03fd8255 | [
"BSD-3-Clause"
] | 2 | 2018-10-30T21:40:32.000Z | 2019-09-26T09:58:26.000Z | dust_attenuation/radiative_transfer.py | gbrammer/dust_attenuation | 15144c55d594ea06c4790215f7e0e66b03fd8255 | [
"BSD-3-Clause"
] | 49 | 2018-05-01T15:16:03.000Z | 2021-05-05T20:18:34.000Z | dust_attenuation/radiative_transfer.py | gbrammer/dust_attenuation | 15144c55d594ea06c4790215f7e0e66b03fd8255 | [
"BSD-3-Clause"
] | 6 | 2018-02-28T11:05:07.000Z | 2020-04-14T10:58:44.000Z | # -*- coding: utf-8 -*-
import numpy as np
import astropy.units as u
import pkg_resources
from astropy.io import ascii
from astropy.modeling.tabular import tabular_model
from .baseclasses import BaseAtttauVModel
from .helpers import _test_valid_x_range
__all__ = ["WG00"]
x_range_WG00 = [0.1, 3.0001]
class WG00(... | 26.47962 | 85 | 0.494535 |
79101de73e573d60c0217da347fd8de0c7c2739b | 1,753 | py | Python | m2-modified/ims/exception/exception.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | null | null | null | m2-modified/ims/exception/exception.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | null | null | null | m2-modified/ims/exception/exception.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | null | null | null | from abc import ABCMeta
from abc import abstractproperty
# The base class for all BMI Exceptions
# Made abstract since it is recommended to raise the specific subclass
class BMIException(Exception):
__metaclass__ = ABCMeta
@abstractproperty
def status_code(self):
pass
# The base class for all e... | 24.347222 | 74 | 0.735881 |
7910348e4ee88b9a142059489b08d1d7eb6ab784 | 6,517 | py | Python | test/IECoreScene/MeshAlgoWindingTest.py | lucienfostier/cortex | b9916ee4c0392e41934df0e6d4e4b696c0e857ab | [
"BSD-3-Clause"
] | 1 | 2018-09-02T13:05:18.000Z | 2018-09-02T13:05:18.000Z | test/IECoreScene/MeshAlgoWindingTest.py | lucienfostier/cortex | b9916ee4c0392e41934df0e6d4e4b696c0e857ab | [
"BSD-3-Clause"
] | 1 | 2018-11-07T19:40:15.000Z | 2018-11-07T19:40:15.000Z | test/IECoreScene/MeshAlgoWindingTest.py | noizfactory/cortex | c2b5bd154d9d7919a0c498f865c5e40a7687e1ce | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2017, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistribu... | 43.738255 | 189 | 0.709069 |
7910477c808524c7b4d584fbc8a2cadee8e22d41 | 2,619 | py | Python | homeassistant/components/mqtt/server.py | mbs-technologie/home-assistant | 71fc446425cbb1c0d4670c261ce8ea3bfd83a73d | [
"MIT"
] | 13 | 2017-02-01T13:25:34.000Z | 2022-01-26T01:30:39.000Z | homeassistant/components/mqtt/server.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 9 | 2017-07-26T18:05:32.000Z | 2021-12-05T14:16:34.000Z | homeassistant/components/mqtt/server.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 21 | 2017-07-26T17:09:40.000Z | 2022-03-27T22:37:22.000Z | """
Support for a local MQTT broker.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/mqtt/#use-the-embedded-broker
"""
import logging
import tempfile
from homeassistant.core import callback
from homeassistant.components.mqtt import PROTOCOL_311
from hom... | 28.78022 | 79 | 0.628102 |
7910c5ebf545b99d0da04088415e5905fcfdab5c | 2,979 | py | Python | contrast/detectors/LC400Buffer.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | contrast/detectors/LC400Buffer.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | 2 | 2018-09-19T06:49:03.000Z | 2019-06-28T10:47:37.000Z | contrast/detectors/LC400Buffer.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | from .Detector import Detector
import time
import numpy as np
import PyTango
class LC400Buffer(Detector):
"""
Class representing the LC400 piezo machine under the
control of the LC400ScanControl Tango device, used for
reading the flyscan positions.
"""
def __init__(self, name=None, device=No... | 33.852273 | 76 | 0.595166 |
7910e676ecc65c7c985e08317edb12aecf5634f3 | 904 | py | Python | analysis/tuning_get_seclamp_currents_frequency.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | null | null | null | analysis/tuning_get_seclamp_currents_frequency.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | null | null | null | analysis/tuning_get_seclamp_currents_frequency.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | 4 | 2020-02-18T09:25:20.000Z | 2021-11-20T23:52:29.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun May 20 11:35:03 2018
@author: DanielM
"""
import os
import numpy as np
import shelve
# Setup some parameters given by paradigm_frequency_inhibition.py
stim_delay = 100 # ms
dt = 0.01 # ms
stim_dtp = stim_delay / dt
data_path = "C:\\Users\\Daniel\\pyDentateData\\tuning\\r... | 31.172414 | 110 | 0.698009 |
79113382a02f94dd6453c9ba88d7ec956f2b374d | 8,692 | py | Python | open-hackathon-server/src/hackathon/registration/register_mgr.py | akondasif/open-hackathon-bak_01 | d60ad764edf689a95b6ffcc56815338b380801de | [
"MIT"
] | null | null | null | open-hackathon-server/src/hackathon/registration/register_mgr.py | akondasif/open-hackathon-bak_01 | d60ad764edf689a95b6ffcc56815338b380801de | [
"MIT"
] | null | null | null | open-hackathon-server/src/hackathon/registration/register_mgr.py | akondasif/open-hackathon-bak_01 | d60ad764edf689a95b6ffcc56815338b380801de | [
"MIT"
] | 1 | 2019-04-03T23:13:55.000Z | 2019-04-03T23:13:55.000Z | # -*- coding: utf-8 -*-
#
# -----------------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this softw... | 43.029703 | 111 | 0.63035 |
791157ae3b347f84845428ba3a9a8d3945d9995e | 204 | py | Python | aws/backends.py | florimondmanca/personal-api | 6300f965d3f51d1bf5f10cf1eb15d673bd627631 | [
"MIT"
] | 4 | 2018-08-17T08:06:06.000Z | 2020-02-20T15:15:56.000Z | aws/backends.py | florimondmanca/personal-api | 6300f965d3f51d1bf5f10cf1eb15d673bd627631 | [
"MIT"
] | 2 | 2018-10-08T15:59:58.000Z | 2018-10-20T16:50:13.000Z | aws/backends.py | florimondmanca/personal-api | 6300f965d3f51d1bf5f10cf1eb15d673bd627631 | [
"MIT"
] | 1 | 2019-09-14T23:15:10.000Z | 2019-09-14T23:15:10.000Z | """Define AWS storage backends for media files."""
from storages.backends.s3boto3 import S3Boto3Storage
def MediaBackend():
"""Media storage backend."""
return S3Boto3Storage(location="media")
| 22.666667 | 52 | 0.740196 |
791159eca229664867b1db2f7c5628ba9e602206 | 340 | py | Python | Code Forces/Round 719/D.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | Code Forces/Round 719/D.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | Code Forces/Round 719/D.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | for tt in range(int(input())):
n = int(input())
ans = 0
arr = list(map(int,input().split()))
freq = dict()
for i in range(n):
arr[i] -= i
if arr[i] not in freq:
freq[arr[i]] = 0
freq[arr[i]] += 1
for i in freq:
ans += freq[i]*(freq[i]-1)//2
... | 22.666667 | 40 | 0.432353 |
79117300bdf0c529f3049d1dd6c10107888899f6 | 4,035 | py | Python | notebooks/template_preprocessing_columns.py | lkorczowski/cleandata | dadfc2768c3b980ab0e4871ebd86eaeeb4b7eaaf | [
"MIT"
] | null | null | null | notebooks/template_preprocessing_columns.py | lkorczowski/cleandata | dadfc2768c3b980ab0e4871ebd86eaeeb4b7eaaf | [
"MIT"
] | 3 | 2020-04-11T16:59:22.000Z | 2020-04-12T08:51:50.000Z | notebooks/template_preprocessing_columns.py | lkorczowski/cleandata | dadfc2768c3b980ab0e4871ebd86eaeeb4b7eaaf | [
"MIT"
] | null | null | null | import pandas as pd
from utils.config import Config
import numpy as np
import pandas as pd
def fun_clean_categogy1(array, keyw1, index, BOW):
compty = 0
c = 0
for elm in array:
if elm == "oui" or elm == "parfois":
BOW[c].append(keyw1[index])
compty += 1
c += 1
#... | 33.625 | 120 | 0.596778 |
7911814b2544cb4b0971f64669225d69255d5e12 | 280 | py | Python | HLWD_opencv_py/dissect-video-to-img-sequence.py | yo1995/Daily_Python_Tasks | 211255deead5023cdcea1db4f49a53eedfe762b6 | [
"MIT"
] | 14 | 2018-05-21T05:12:25.000Z | 2021-11-28T14:49:55.000Z | HLWD_opencv_py/dissect-video-to-img-sequence.py | yo1995/Daily_Python_Tasks | 211255deead5023cdcea1db4f49a53eedfe762b6 | [
"MIT"
] | 2 | 2018-11-28T20:59:37.000Z | 2021-07-27T22:39:33.000Z | HLWD_opencv_py/dissect-video-to-img-sequence.py | yo1995/Daily_Python_Tasks | 211255deead5023cdcea1db4f49a53eedfe762b6 | [
"MIT"
] | 6 | 2019-03-21T01:07:57.000Z | 2021-03-29T03:24:33.000Z | import cv2
import sys
cwd = sys.path[0]
if __name__ == '__main__':
success = True
cap = cv2.VideoCapture(cwd + '/face.avi')
i = 0
while success:
success, img = cap.read()
cv2.imwrite(cwd + '/out/frame' + str(i) + '.jpg', img)
i = i + 1
| 17.5 | 62 | 0.539286 |
79119ec5d960238b8bce59c5e1216f4b7ccc88ef | 2,386 | py | Python | test_projects/line_round_dot_setting/main.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | test_projects/line_round_dot_setting/main.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | test_projects/line_round_dot_setting/main.py | simon-ritchie/apyscript | c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279 | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | """Test project for line_round_dot_setting.
Command examples:
$ python test_projects/line_round_dot_setting/main.py
"""
import sys
sys.path.append('./')
import os
from types import ModuleType
import apysc as ap
from apysc._file import file_util
this_module: ModuleType = sys.modules[__name__]
_D... | 26.21978 | 65 | 0.644174 |
7911c99d78a73a426ee4cb2cd58a16faf9d951ce | 1,535 | py | Python | mudpi/sensors/mcp3xxx/soil_sensor.py | icyspace/mudpi-core | d2afffacee0ba5c5ca57eada3017495d8697c5a4 | [
"BSD-4-Clause"
] | 163 | 2020-02-17T16:34:54.000Z | 2022-02-28T23:12:11.000Z | mudpi/sensors/mcp3xxx/soil_sensor.py | icyspace/mudpi-core | d2afffacee0ba5c5ca57eada3017495d8697c5a4 | [
"BSD-4-Clause"
] | 28 | 2020-05-05T19:42:25.000Z | 2021-08-04T18:36:32.000Z | mudpi/sensors/mcp3xxx/soil_sensor.py | icyspace/mudpi-core | d2afffacee0ba5c5ca57eada3017495d8697c5a4 | [
"BSD-4-Clause"
] | 31 | 2020-02-27T18:30:42.000Z | 2022-01-18T21:14:56.000Z | import sys
from adafruit_mcp3xxx.analog_in import AnalogIn
from logger.Logger import Logger, LOG_LEVEL
from sensors.mcp3xxx.sensor import Sensor
# Tested using Sun3Drucker Model SX239
# Wet Water = 287
# Dry Air = 584
AirBounds = 43700
WaterBounds = 13000
intervals = int((AirBounds - WaterBounds) / 3)
class Soi... | 30.7 | 72 | 0.581759 |
7911d3232a0bd43a05dfc18ccc2a1346af89097a | 989 | py | Python | alipay/aop/api/response/AlipayDataAiserviceCloudbusTransitorridorQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayDataAiserviceCloudbusTransitorridorQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayDataAiserviceCloudbusTransitorridorQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.CloudbusTransitResultItem import CloudbusTransitResultItem
class AlipayDataAiserviceCloudbusTransitorridorQueryResponse(AlipayResponse):
def __init__(self):
... | 32.966667 | 127 | 0.736097 |
7911d33c7927194b9e6d026ac20d72abbcfcce73 | 1,601 | py | Python | python/python/basics/strings.py | othonreyes/code_problems | 6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf | [
"MIT"
] | null | null | null | python/python/basics/strings.py | othonreyes/code_problems | 6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf | [
"MIT"
] | null | null | null | python/python/basics/strings.py | othonreyes/code_problems | 6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf | [
"MIT"
] | null | null | null | s = "Hey there! what should this string be?"
# Length should be 20
print("Length of s = %d" % len(s[0:20]))
# Index
print("The first occurrence of the letter a = %d" % s.index("!"))
# Count
print("t occurs %d times" % s.count("t"))
# Slicing the string into bits
s1 = "hello world"
print(s1[:1]) # splicing is exclusi... | 32.673469 | 78 | 0.630231 |
7911eaa8ea902c2d707dd0577cbe4b39b9cd8766 | 2,267 | py | Python | tests/utilities/test_deepspeed_collate_checkpoint.py | lemairecarl/pytorch-lightning | 85304d4672a9ed24a16f7f5b2abaa34148ab86f4 | [
"Apache-2.0"
] | 8 | 2020-01-15T06:58:15.000Z | 2021-11-05T11:36:36.000Z | tests/utilities/test_deepspeed_collate_checkpoint.py | lemairecarl/pytorch-lightning | 85304d4672a9ed24a16f7f5b2abaa34148ab86f4 | [
"Apache-2.0"
] | 3 | 2020-02-16T07:58:26.000Z | 2020-03-30T09:32:55.000Z | tests/utilities/test_deepspeed_collate_checkpoint.py | lemairecarl/pytorch-lightning | 85304d4672a9ed24a16f7f5b2abaa34148ab86f4 | [
"Apache-2.0"
] | 3 | 2020-02-15T21:35:52.000Z | 2021-02-06T09:13:49.000Z | # Copyright The PyTorch Lightning team.
#
# 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 i... | 42.773585 | 111 | 0.763564 |
7911f7addbdaee9daae738d587926aefb7be909e | 2,980 | py | Python | vyperlogix/gds/where.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/gds/where.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/gds/where.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | '''
Given one or more regular expressions on the command line, searches
the PATH for all files that match.
Copyright (C) 2002 GDS Software
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either vers... | 30.408163 | 78 | 0.624832 |
79121cc2e6f8ec7b3221cced87cae4ab02202b2a | 19,629 | py | Python | pyserver/fileapi_local.py | joeedh/fairmotion | 5c322fc012cdd94ddc2f21d68264c845b3c2c770 | [
"MIT"
] | 1 | 2015-05-22T14:11:17.000Z | 2015-05-22T14:11:17.000Z | pyserver/fileapi_local.py | joeedh/fairmotion | 5c322fc012cdd94ddc2f21d68264c845b3c2c770 | [
"MIT"
] | 2 | 2021-09-02T20:01:35.000Z | 2022-01-26T19:47:35.000Z | pyserver/fileapi_local.py | joeedh/fairmotion | 5c322fc012cdd94ddc2f21d68264c845b3c2c770 | [
"MIT"
] | null | null | null | from logger import elog, mlog, alog
from db_engine import mysql_connect, mysql_reconnect, get_qs, \
estr, valid_pass, SQLParamError, sql_selectall, \
sql_insertinto, do_param_error, sq, sql_update
import random, time, json, os, os.path, sys, math, types
from utils import *
from... | 23.996333 | 109 | 0.564777 |
791222b3b912a722dc4b523ab34c11aeab27c632 | 15,547 | py | Python | Q/questionnaire/views/views_realizations.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | null | null | null | Q/questionnaire/views/views_realizations.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | 477 | 2015-01-07T18:22:27.000Z | 2017-07-17T15:05:48.000Z | Q/questionnaire/views/views_realizations.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | null | null | null | ####################
# ES-DOC CIM Questionnaire
# Copyright (c) 2017 ES-DOC. All rights reserved.
#
# University of Colorado, Boulder
# http://cires.colorado.edu/
#
# This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT].
####################
from djan... | 41.569519 | 178 | 0.684827 |
79125b9c3e79e985960f11e5e49d7855ceaf8ab5 | 2,766 | py | Python | lemur/users/models.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/users/models.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/users/models.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | """
.. module: lemur.users.models
:platform: unix
:synopsis: This module contains all of the models need to create a user within
lemur
:copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""... | 30.733333 | 121 | 0.66992 |
79127c600637992e90e8fccba7274a1ee5cb8abe | 3,314 | py | Python | homeassistant/components/sensor/time_date.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | homeassistant/components/sensor/time_date.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | homeassistant/components/sensor/time_date.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | """
Support for showing the date and the time.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.time_date/
"""
from datetime import timedelta
import asyncio
import logging
import voluptuous as vol
from homeassistant.components.sensor import PLATFO... | 30.40367 | 79 | 0.645142 |
79128d1a07934f9109398178d67b1e08ce05cdac | 41,015 | py | Python | scripts/build_test.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | null | null | null | scripts/build_test.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | null | null | null | scripts/build_test.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | 44.825137 | 80 | 0.665464 |
79129778375c59ca99fec40099522b0fd9469a56 | 3,715 | py | Python | experiments/ashvin/rfeatures/sawyer/door/bc3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/rfeatures/sawyer/door/bc3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/rfeatures/sawyer/door/bc3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import gym
import rlkit.torch.pytorch_util as ptu
from rlkit.data_management.obs_dict_replay_buffer import ObsDictRelabelingBuffer
from rlkit.exploration_strategies.base import \
PolicyWrappedWithExplorationStrategy
from rlkit.exploration_strategies.gaussian_and_epislon import \
GaussianAndEpislonStrategy
from... | 34.719626 | 102 | 0.676716 |
7912c6805f0ec162b9dc4c102df8c8be8d12b4c0 | 10,290 | py | Python | niftynet/network/simulator_gan.py | dkurt/NiftyNet | 8e543c1765bf657922cc2ea1c366e6dcaa00de51 | [
"Apache-2.0"
] | 2 | 2019-06-19T12:34:49.000Z | 2019-06-19T12:36:22.000Z | niftynet/network/simulator_gan.py | tomvars/NiftyNet | 3a4d54544c0886751bacfdbddb42eb90fe0d5b54 | [
"Apache-2.0"
] | null | null | null | niftynet/network/simulator_gan.py | tomvars/NiftyNet | 3a4d54544c0886751bacfdbddb42eb90fe0d5b54 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division
import numpy as np
import tensorflow as tf
from niftynet.layer.activation import ActiLayer
from niftynet.layer.convolution import ConvolutionalLayer
from niftynet.layer.deconvolution import DeconvolutionalLayer
from niftynet.laye... | 40.671937 | 81 | 0.558212 |
7912e3c2b57911cb3a8e1e9cc898044e40d7ee2e | 2,550 | py | Python | catalyst/dl/utils/torch.py | balakhonoff/catalyst | 82d904aee97045efbaef3963e36c2ce5173ddac4 | [
"Apache-2.0"
] | 2 | 2021-02-22T12:15:41.000Z | 2021-05-02T15:22:24.000Z | catalyst/dl/utils/torch.py | balakhonoff/catalyst | 82d904aee97045efbaef3963e36c2ce5173ddac4 | [
"Apache-2.0"
] | null | null | null | catalyst/dl/utils/torch.py | balakhonoff/catalyst | 82d904aee97045efbaef3963e36c2ce5173ddac4 | [
"Apache-2.0"
] | 1 | 2018-12-21T15:56:21.000Z | 2018-12-21T15:56:21.000Z | from typing import Callable, Iterable
import torch
from torch.utils.data.dataloader import default_collate as default_collate_fn
from catalyst.data import ListDataset
def get_loader(
data_source: Iterable[dict],
open_fn: Callable,
dict_transform: Callable = None,
sampler=None,
collate_fn: Callab... | 36.956522 | 78 | 0.652941 |
7912f9565c3c6fcc59092297879f08c4d862fa81 | 22,317 | py | Python | unit_tests/test_lib_charm_openstack_api_crud.py | openstack/charm-octavia | 505e00700b7d7b1d65fbfaa103e15cdc4e3fa865 | [
"Apache-2.0"
] | 5 | 2018-10-25T08:38:37.000Z | 2020-07-27T09:08:05.000Z | unit_tests/test_lib_charm_openstack_api_crud.py | openstack/charm-octavia | 505e00700b7d7b1d65fbfaa103e15cdc4e3fa865 | [
"Apache-2.0"
] | 1 | 2020-03-01T02:57:10.000Z | 2020-03-01T02:57:10.000Z | unit_tests/test_lib_charm_openstack_api_crud.py | openstack/charm-octavia | 505e00700b7d7b1d65fbfaa103e15cdc4e3fa865 | [
"Apache-2.0"
] | 8 | 2019-12-03T17:22:22.000Z | 2021-07-21T10:40:24.000Z | # Copyright 2018 Canonical Ltd
#
# 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... | 46.590814 | 78 | 0.616301 |
79130907d076de4754a1aae15259a847c314c66f | 13,023 | py | Python | datumaro/plugins/vgg_face2_format.py | yasakova-anastasia/datumaro | 7082fc4f50291d3b3c2022f069f76628e9fd07bb | [
"MIT"
] | 237 | 2020-09-07T14:29:26.000Z | 2022-03-31T12:53:48.000Z | datumaro/plugins/vgg_face2_format.py | openvinotoolkit/datumaro | 0a279e386551fedff4708e54f731a50799e60326 | [
"MIT"
] | 330 | 2020-09-09T21:27:29.000Z | 2022-03-31T12:36:18.000Z | datumaro/plugins/vgg_face2_format.py | yasakova-anastasia/datumaro | 7082fc4f50291d3b3c2022f069f76628e9fd07bb | [
"MIT"
] | 63 | 2020-09-09T07:44:28.000Z | 2022-03-17T16:07:26.000Z | # Copyright (C) 2020-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
import csv
import os
import os.path as osp
from datumaro.components.annotation import (
AnnotationType, Bbox, Label, LabelCategories, Points,
)
from datumaro.components.converter import Converter
from datumaro.components.extractor import... | 43.41 | 86 | 0.522 |
79132f98076045eb56696f39225cb9870c98160e | 4,815 | py | Python | var/spack/repos/builtin/packages/hwloc/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | var/spack/repos/builtin/packages/hwloc/package.py | vlkale/spack | 011b6e684d3978c956e5ea60d2982ccc0bac5d6d | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2019-07-30T10:12:28.000Z | 2019-12-17T09:02:27.000Z | var/spack/repos/builtin/packages/hwloc/package.py | vlkale/spack | 011b6e684d3978c956e5ea60d2982ccc0bac5d6d | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 5 | 2019-07-30T09:42:14.000Z | 2021-01-25T05:39:20.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import sys
class Hwloc(AutotoolsPackage):
"""The Hardware Locality (hwloc) software project.
The Portable Hardwa... | 50.684211 | 115 | 0.723572 |
791336ffb4651c08974903c823ee494553fcf22c | 829 | py | Python | desafios/Mundo 2/Ex042.py | duartecgustavo/Python---Estudos- | 13a47f115dd24ef475addaed7b0c860a7b3817ca | [
"MIT"
] | 6 | 2021-01-20T20:43:39.000Z | 2021-08-13T15:44:10.000Z | desafios/Mundo 2/Ex042.py | duartecgustavo/PythonProgress | 13a47f115dd24ef475addaed7b0c860a7b3817ca | [
"MIT"
] | null | null | null | desafios/Mundo 2/Ex042.py | duartecgustavo/PythonProgress | 13a47f115dd24ef475addaed7b0c860a7b3817ca | [
"MIT"
] | 1 | 2020-09-06T03:34:19.000Z | 2020-09-06T03:34:19.000Z | # Desafio 42 - Aula 12 : Refazer Desasfio 35 e mostrar qual o tipo do triangulo.
# A/ Equilatero.
# B/ Isósceles.
# C/ Escaleno.
print('\033[32mATENÇÃO! VAMOS MONTAR UM TRIÂNGULO!!!\033[m')
a = int(input('Digite a primeira medida: '))
b = int(input('Digite a segunda medida: '))
c = int(input('Digite a terceira medid... | 39.47619 | 104 | 0.659831 |
7913755100e03ac5558240f30ea54c68903e49d6 | 48,204 | py | Python | indra/tools/reading/submit_reading_pipeline.py | budakn/INDRA | 393958b2ca7bc1ca5d054885c0634f434ff7496e | [
"BSD-2-Clause"
] | 2 | 2020-01-14T08:59:10.000Z | 2020-12-18T16:21:38.000Z | indra/tools/reading/submit_reading_pipeline.py | budakn/INDRA | 393958b2ca7bc1ca5d054885c0634f434ff7496e | [
"BSD-2-Clause"
] | null | null | null | indra/tools/reading/submit_reading_pipeline.py | budakn/INDRA | 393958b2ca7bc1ca5d054885c0634f434ff7496e | [
"BSD-2-Clause"
] | null | null | null | from __future__ import absolute_import, print_function, unicode_literals
import pickle
from builtins import dict, str
import os
import re
import boto3
import logging
import botocore.session
from time import sleep
import matplotlib as mpl
from numpy import median, arange, array
from indra.tools.reading.util.reporter ... | 40.885496 | 83 | 0.582192 |
79137c1ba687018a1ccbbad45f7b26b6a1e64b66 | 2,393 | py | Python | agents/tensorflow_iris.py | yamamototakas/fxtrading | 955d247b832de7180b8893edaad0b50df515809f | [
"MIT"
] | null | null | null | agents/tensorflow_iris.py | yamamototakas/fxtrading | 955d247b832de7180b8893edaad0b50df515809f | [
"MIT"
] | null | null | null | agents/tensorflow_iris.py | yamamototakas/fxtrading | 955d247b832de7180b8893edaad0b50df515809f | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import numpy as np
import tensorflow as tf
tf.logging.set_verbosity(tf.logging.INFO)
# Data sets
IRIS_TRAINING = os.path.join(os.path.dirname(__file__), "iris_training.csv")
IRIS_TEST = os.path.joi... | 35.716418 | 82 | 0.633514 |
79138bafb46758ee7a30b6ff1536fedfaae5b1fe | 6,764 | py | Python | jina/__init__.py | liushuigs/jina | b3550e901b2a340924330b5ba2801603e493c933 | [
"Apache-2.0"
] | null | null | null | jina/__init__.py | liushuigs/jina | b3550e901b2a340924330b5ba2801603e493c933 | [
"Apache-2.0"
] | null | null | null | jina/__init__.py | liushuigs/jina | b3550e901b2a340924330b5ba2801603e493c933 | [
"Apache-2.0"
] | null | null | null | """
Top-level module of Jina.
The primary function of this module is to import all of the public Jina
interfaces into a single place. The interfaces themselves are located in
sub-modules, as described below.
"""
# DO SOME OS-WISE PATCHES
import datetime as _datetime
import os as _os
import platform as _platform
imp... | 32.363636 | 122 | 0.724571 |
79139423407425431ab62afbad35329da897c500 | 3,224 | py | Python | zerver/management/commands/set_message_flags.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | zerver/management/commands/set_message_flags.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | zerver/management/commands/set_message_flags.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
from typing import Any, Iterable
from optparse import make_option
import logging
import sys
from django.core.management.base import BaseCommand, CommandParser
from zerver.lib import utils
from zerver.models import UserMessage, get_user_pro... | 36.224719 | 97 | 0.537531 |
7913baddd5217de766b11951ef9dd76062d93a22 | 757 | py | Python | O3/_14_kernel_methods_linearly_inseparable_data/rbf_kernel_iris_dataset.py | ShAlireza/ML-Tries | 4516be7a3275c9bdedd7bd258800be384b6b34f0 | [
"MIT"
] | null | null | null | O3/_14_kernel_methods_linearly_inseparable_data/rbf_kernel_iris_dataset.py | ShAlireza/ML-Tries | 4516be7a3275c9bdedd7bd258800be384b6b34f0 | [
"MIT"
] | null | null | null | O3/_14_kernel_methods_linearly_inseparable_data/rbf_kernel_iris_dataset.py | ShAlireza/ML-Tries | 4516be7a3275c9bdedd7bd258800be384b6b34f0 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from sklearn.svm import SVC
from O3 import prepare_data
from utils import plot_decision_regions
X_train, X_test, y_train, y_test = prepare_data(standardize=True,
split=True)
svm = SVC(kernel='rbf', random_state=1, g... | 24.419355 | 65 | 0.688243 |
7913e4feab4a0649f74537e2601693cadf560967 | 2,320 | py | Python | examples/scripts/data_reduction_ex1.py | MS44neuro/drtest | 9e17105f39338cef7d65e541996c70f2c2731ab4 | [
"MIT"
] | null | null | null | examples/scripts/data_reduction_ex1.py | MS44neuro/drtest | 9e17105f39338cef7d65e541996c70f2c2731ab4 | [
"MIT"
] | null | null | null | examples/scripts/data_reduction_ex1.py | MS44neuro/drtest | 9e17105f39338cef7d65e541996c70f2c2731ab4 | [
"MIT"
] | null | null | null | """This code demonstrates how to perform the tested data reduction module.
"""
import os
import sys
import glob
import pyabf
import matplotlib.pyplot as plt
pathToHere = os.path.abspath(os.path.dirname(__file__))
pathToData = os.path.abspath(pathToHere + "/../data/")
pathToModule = os.path.abspath(pathTo... | 35.692308 | 123 | 0.608621 |
7913e989d0345483b70b65e303a711adcf5365fd | 190,006 | py | Python | git_cl.py | wuyong2k/chromium_depot_tool | b80458a73a9f20d688adb10162fb3a9348081885 | [
"BSD-3-Clause"
] | null | null | null | git_cl.py | wuyong2k/chromium_depot_tool | b80458a73a9f20d688adb10162fb3a9348081885 | [
"BSD-3-Clause"
] | null | null | null | git_cl.py | wuyong2k/chromium_depot_tool | b80458a73a9f20d688adb10162fb3a9348081885 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Copyright (C) 2008 Evan Martin <martine@danga.com>
"""A git-command for integrating reviews on Rietveld and Gerrit."""
from __f... | 37.336608 | 80 | 0.654348 |
7913f6fac7136b1cc2030a2c0aeb758fec9fedab | 1,348 | py | Python | mdrsl/rule_generation/association_rule_mining/convert_single_target_car_to_multi_target_car.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 3 | 2020-08-03T19:25:44.000Z | 2021-06-27T22:25:55.000Z | mdrsl/rule_generation/association_rule_mining/convert_single_target_car_to_multi_target_car.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | null | null | null | mdrsl/rule_generation/association_rule_mining/convert_single_target_car_to_multi_target_car.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 2 | 2020-08-07T22:54:28.000Z | 2021-02-18T06:11:01.000Z | from typing import List
from pyarc.data_structures.car import ClassAssocationRule
from pyarc.data_structures.antecedent import Antecedent as CARAntecedent
from pyarc.data_structures.consequent import Consequent as CARConsequent
from mdrsl.data_structures.rules.generalized_rule_part import GeneralizedAntecedent
from m... | 44.933333 | 98 | 0.818991 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.