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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38adf12efe0955889aa567e4d28d1b03caac5a68 | 16,541 | py | Python | MainUi.py | ashiscs/Cinfo | 7e8fa8ce19f323425fab6117e68ac2678b4e17dc | [
"MIT"
] | 2 | 2019-08-04T17:07:15.000Z | 2020-02-27T21:10:33.000Z | MainUi.py | ashiscs/Cinfo | 7e8fa8ce19f323425fab6117e68ac2678b4e17dc | [
"MIT"
] | null | null | null | MainUi.py | ashiscs/Cinfo | 7e8fa8ce19f323425fab6117e68ac2678b4e17dc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Cinfo.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from lib.windows import SystemInfo,NetworkInfo,SoftwareInfo,StorageInfo
from lib.w... | 43.18799 | 118 | 0.658364 |
38adf5135ba96d1b77ac81787a609cb624e0fe2c | 2,061 | py | Python | phrasehunter/phrase.py | ZTMowrer947/python-phrase-hunter | ba7a5215cb777c79f5b3e12a0eb8be0e076fabf6 | [
"MIT"
] | null | null | null | phrasehunter/phrase.py | ZTMowrer947/python-phrase-hunter | ba7a5215cb777c79f5b3e12a0eb8be0e076fabf6 | [
"MIT"
] | null | null | null | phrasehunter/phrase.py | ZTMowrer947/python-phrase-hunter | ba7a5215cb777c79f5b3e12a0eb8be0e076fabf6 | [
"MIT"
] | null | null | null | """Module for Phrase class"""
class Phrase:
"""Phrase to be guessed by a player."""
def __init__(self, phrase: str):
self.phrase = phrase.lower()
self.correct_guesses = []
def __str__(self):
split_string = list(self.phrase)
for index, char in enumerate(split... | 29.869565 | 76 | 0.573508 |
38adf5ebd6f269f17c1fa14e7dbf39222e45d753 | 1,362 | py | Python | python/dataProcessing/generatePlots.py | Maplenormandy/list-62x | c1731d0610fdf9e58cb2792d706e8904c549fbd6 | [
"MIT"
] | 1 | 2020-11-07T12:40:59.000Z | 2020-11-07T12:40:59.000Z | python/dataProcessing/generatePlots.py | Maplenormandy/list-62x | c1731d0610fdf9e58cb2792d706e8904c549fbd6 | [
"MIT"
] | null | null | null | python/dataProcessing/generatePlots.py | Maplenormandy/list-62x | c1731d0610fdf9e58cb2792d706e8904c549fbd6 | [
"MIT"
] | null | null | null | import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from statsmodels.stats.weightstats import ttost_paired
data = pd.read_csv(open('combined_data.csv'))
for t in data.index:
if int(data.loc[t, 'Baseline']) == 0:
data.loc[t, 'STF Baseline'] = data.loc[t, 'Succesfully Tracked Features 0... | 31.674419 | 93 | 0.696035 |
38ae0fe9553f95fb150a80de3d4ea69f9eadc688 | 2,233 | py | Python | mdx_steroids/absimgsrc.py | twardoch/markdown-steroids | 919b332c32aa1ea92857a5079b36cf522d07371a | [
"BSD-3-Clause"
] | 4 | 2018-01-25T23:30:30.000Z | 2019-09-13T08:26:19.000Z | mdx_steroids/absimgsrc.py | twardoch/markdown-steroids | 919b332c32aa1ea92857a5079b36cf522d07371a | [
"BSD-3-Clause"
] | 1 | 2020-12-03T19:44:04.000Z | 2020-12-03T19:44:04.000Z | mdx_steroids/absimgsrc.py | twardoch/markdown-steroids | 919b332c32aa1ea92857a5079b36cf522d07371a | [
"BSD-3-Clause"
] | 1 | 2018-01-26T01:18:10.000Z | 2018-01-26T01:18:10.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
# mdx_steroids.absimgsrc
The `mdx_steroids.absimgsrc` replaces relative image URLs with absolute ones.
### Installation
```bash
pip install --user --upgrade git+https://github.com/twardoch/markdown-steroids.git
```
### Docs
* https://github.com/twardoch/markdown-st... | 26.583333 | 86 | 0.669951 |
38ae20e99835b3fb20d9cbf9afb450e873abec63 | 1,638 | py | Python | ibis/backends/omniscidb/dtypes.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 1 | 2020-08-04T08:40:45.000Z | 2020-08-04T08:40:45.000Z | ibis/backends/omniscidb/dtypes.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 1 | 2020-10-02T23:51:48.000Z | 2020-10-03T00:54:29.000Z | ibis/backends/omniscidb/dtypes.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 1 | 2020-10-01T18:48:01.000Z | 2020-10-01T18:48:01.000Z | """OmniSciDB data types and SQL dtypes compatibility."""
import ibis.expr.datatypes as dt
sql_to_ibis_dtypes = {
'BIGINT': dt.int64,
'BOOL': dt.Boolean,
'DATE': dt.date,
'DECIMAL': dt.Decimal(18, 9),
'DOUBLE': dt.double,
'FLOAT': dt.float32,
'INT': dt.int32,
'LINESTRING': dt.linestring,... | 22.75 | 56 | 0.553114 |
38ae2d20299c66fcc1488c60c338053b518746b2 | 6,827 | py | Python | pni_customization/pni_customization/doctype/contract_payment/contract_payment.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/contract_payment/contract_payment.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/contract_payment/contract_payment.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021, Jigar Tarpara and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
import datetime
class ContractPayment(Document):
def validate(self):
self.validat... | 41.628049 | 173 | 0.557785 |
38ae4b6ea3a857663eb7674af96a0f6cfe2c70e7 | 26,037 | py | Python | src/reader/seedev_corpus.py | lasigeBioTM/IBEnt | de7574991684de72e9b545c2b8fb5c8d95b0a83b | [
"MIT"
] | null | null | null | src/reader/seedev_corpus.py | lasigeBioTM/IBEnt | de7574991684de72e9b545c2b8fb5c8d95b0a83b | [
"MIT"
] | null | null | null | src/reader/seedev_corpus.py | lasigeBioTM/IBEnt | de7574991684de72e9b545c2b8fb5c8d95b0a83b | [
"MIT"
] | null | null | null | import argparse
import codecs
import logging
import pickle
import xml.etree.ElementTree as ET
import os
import sys
import pprint
import itertools
from nltk.corpus import stopwords
import nltk
import numpy as np
import progressbar as pb
import time
from pycorenlp import StanfordCoreNLP
from sklearn import metrics, svm,... | 54.69958 | 158 | 0.52675 |
38ae7d9adb33e4cc8f97c41e1227f41fe91b767d | 1,905 | py | Python | core/utils.py | MicroBitcoinOrg/SnapshotToolkit | 98e629fed5dbcdfbe8495dca3149b1dff50534e0 | [
"MIT"
] | 1 | 2019-09-30T09:14:32.000Z | 2019-09-30T09:14:32.000Z | core/utils.py | MicroBitcoinOrg/SnapshotToolkit | 98e629fed5dbcdfbe8495dca3149b1dff50534e0 | [
"MIT"
] | 1 | 2019-11-07T13:35:57.000Z | 2019-11-08T10:49:36.000Z | core/utils.py | MicroBitcoinOrg/SnapshotToolkit | 98e629fed5dbcdfbe8495dca3149b1dff50534e0 | [
"MIT"
] | 1 | 2019-11-07T13:40:27.000Z | 2019-11-07T13:40:27.000Z | # Copyright (C) 2015-2016 The bitcoin-blockchain-parser developers
#
# This file is part of bitcoin-blockchain-parser.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of bitcoin-blockchain-parser, including this file, may be copied,
# modif... | 23.8125 | 79 | 0.668241 |
38ae80fd6208919d6faffecc4eafa48770679ea1 | 268 | py | Python | roll_die_project/roll_die/test_roll_module.py | spencerpomme/coconuts-on-fire | 407d61b3583c472707a4e7b077a9a3ab12743996 | [
"Apache-2.0"
] | 1 | 2015-04-23T11:43:26.000Z | 2015-04-23T11:43:26.000Z | roll_die_project/roll_die/test_roll_module.py | spencerpomme/coconuts-on-fire | 407d61b3583c472707a4e7b077a9a3ab12743996 | [
"Apache-2.0"
] | null | null | null | roll_die_project/roll_die/test_roll_module.py | spencerpomme/coconuts-on-fire | 407d61b3583c472707a4e7b077a9a3ab12743996 | [
"Apache-2.0"
] | null | null | null | def test_roll(side_num, roll_num):
'''
Roll a die with side_num sides roll_num times.
'''
print('Roll a %d sided die %d times.' % (side_num, roll_num))
for i in range(roll_num):
roll = roll_die(side_num)
print('Roll is', str(roll))
| 29.777778 | 65 | 0.61194 |
38ae9649d27223e811c4c6674231f54d8ccddfc4 | 61 | py | Python | src/read_itek/vendor/schema/__init__.py | njvack/read_itek | f9fd7f904f38b7f3f19a1d84d5d4d84046b1b289 | [
"MIT"
] | null | null | null | src/read_itek/vendor/schema/__init__.py | njvack/read_itek | f9fd7f904f38b7f3f19a1d84d5d4d84046b1b289 | [
"MIT"
] | null | null | null | src/read_itek/vendor/schema/__init__.py | njvack/read_itek | f9fd7f904f38b7f3f19a1d84d5d4d84046b1b289 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from .schema import * | 20.333333 | 38 | 0.836066 |
38aea6870d3a5f0a78bcd883a56612f2ca406d96 | 4,768 | py | Python | ROS_WS/site_ws/src/site_model/src/tools/RadCamFusion/radar_roi.py | OrangeSodahub/ROS-WS | 5b3c56ea1b46025298360eed9c06f25f7c5f7fe6 | [
"MIT"
] | 1 | 2022-03-20T19:16:06.000Z | 2022-03-20T19:16:06.000Z | ROS_WS/site_ws/src/site_model/src/tools/RadCamFusion/radar_roi.py | OrangeSodahub/ROS-WS | 5b3c56ea1b46025298360eed9c06f25f7c5f7fe6 | [
"MIT"
] | null | null | null | ROS_WS/site_ws/src/site_model/src/tools/RadCamFusion/radar_roi.py | OrangeSodahub/ROS-WS | 5b3c56ea1b46025298360eed9c06f25f7c5f7fe6 | [
"MIT"
] | null | null | null | #############################################################
# This py file generate the roi of radar detection. #
# Author: Yangxiuyu #
#############################################################
import numpy as np
from torch import det
# radar message type
from msgs... | 42.19469 | 104 | 0.650797 |
38aeba63a3eee8770234fc2b7d5ff3360780c3f9 | 8,402 | py | Python | src/vec.py | falconlee236/CodingTheMatrix-Answer | 4fab8087bde352913da71c8d86b802a93231b1b5 | [
"MIT"
] | null | null | null | src/vec.py | falconlee236/CodingTheMatrix-Answer | 4fab8087bde352913da71c8d86b802a93231b1b5 | [
"MIT"
] | null | null | null | src/vec.py | falconlee236/CodingTheMatrix-Answer | 4fab8087bde352913da71c8d86b802a93231b1b5 | [
"MIT"
] | null | null | null | # Copyright 2013 Philip N. Klein
def getitem(v, k):
"""
Return the value of entry k in v.
Be sure getitem(v,k) returns 0 if k is not represented in v.f.
>>> v = Vec({'a','b','c', 'd'},{'a':2,'c':1,'d':3})
>>> v['d']
3
>>> v['b']
0
"""
assert k in v.D
return v.f[k] if k in ... | 29.900356 | 84 | 0.466318 |
38aebf75e9b38e711bab4d22bb5f6499cb2df8dd | 647 | py | Python | setup.py | mherbert93/ds-unit-3-sprint-1 | 2840c08dbf94881926c46cdddbdcd972307344a7 | [
"MIT"
] | null | null | null | setup.py | mherbert93/ds-unit-3-sprint-1 | 2840c08dbf94881926c46cdddbdcd972307344a7 | [
"MIT"
] | null | null | null | setup.py | mherbert93/ds-unit-3-sprint-1 | 2840c08dbf94881926c46cdddbdcd972307344a7 | [
"MIT"
] | null | null | null |
from setuptools import find_packages, setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="lambdata-mherbert93", # the name that you will install via pip
version="1.6",
author="Martin Herbert",
author_email="martinherbert93@gmail.com",
description="Not sure what ... | 34.052632 | 94 | 0.695518 |
38aee87a3d7cc5879d3a387cf6088dcda1d71ad1 | 576 | py | Python | apps/ingest/migrations/0011_auto_20210805_1748.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 18 | 2017-06-12T09:58:02.000Z | 2021-10-01T11:14:34.000Z | apps/ingest/migrations/0011_auto_20210805_1748.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 276 | 2019-04-26T20:13:01.000Z | 2022-03-31T10:26:28.000Z | apps/ingest/migrations/0011_auto_20210805_1748.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 7 | 2018-03-13T23:44:26.000Z | 2021-09-15T17:54:55.000Z | # Generated by Django 2.2.10 on 2021-08-05 17:48
import apps.ingest.models
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ingest', '0010_auto_20210805_1743'),
]
operations = [
migrations.AddField(
... | 26.181818 | 150 | 0.657986 |
38aef545d40d5000c3506663a2f1fec56e36135a | 22,599 | py | Python | WebSocket/Handle/heartbeat.py | wc7086/viperpython | ce4db2bc2533fa98cb4854e50286a4d88a28189d | [
"BSD-3-Clause"
] | null | null | null | WebSocket/Handle/heartbeat.py | wc7086/viperpython | ce4db2bc2533fa98cb4854e50286a4d88a28189d | [
"BSD-3-Clause"
] | null | null | null | WebSocket/Handle/heartbeat.py | wc7086/viperpython | ce4db2bc2533fa98cb4854e50286a4d88a28189d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# @File : heartbeat.py
# @Date : 2021/2/27
# @Desc :
import functools
import ipaddress as ipaddr
import json
import time
from Core.Handle.host import Host
# from Lib.External.qqwry import qqwry
from Lib.configs import RPC_FRAMEWORK_API_REQ, VIPER_IP
from Lib.ipgeo import IPGeo
from Lib.log i... | 39.927562 | 116 | 0.500376 |
38af0aeb553cc90a7e5bf14c0bb5d21fcd1530ec | 209 | py | Python | intro/nomeando_slices.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | null | null | null | intro/nomeando_slices.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | 2 | 2020-07-19T15:36:35.000Z | 2022-02-02T20:30:16.000Z | intro/nomeando_slices.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
def namedSlice():
'''
Nomeando slices: struct slice(start, end, step)
'''
lista = [2,2,34,5,24,1,3]
theLastTree = slice(-3, None)
print(lista[theLastTree])
namedSlice() | 17.416667 | 51 | 0.602871 |
38af10ec44a459458cb715f9c30d37781cbed328 | 14,400 | py | Python | otrrentworker/worker/pushvideo.py | omza/otrrentworker | faa70884a29dd271a33346ed45b3f43e5d7a7a21 | [
"MIT"
] | null | null | null | otrrentworker/worker/pushvideo.py | omza/otrrentworker | faa70884a29dd271a33346ed45b3f43e5d7a7a21 | [
"MIT"
] | null | null | null | otrrentworker/worker/pushvideo.py | omza/otrrentworker | faa70884a29dd271a33346ed45b3f43e5d7a7a21 | [
"MIT"
] | null | null | null | """ imports & globals """
import os
from sys import stdout, stderr
import configparser
import re
import urllib
import fnmatch
from datetime import datetime
import subprocess
""" azure storage repositories """
from azurestorage import (
queue,
db
)
from azurestorage.wrapper import StorageTableCollection
fro... | 42.72997 | 183 | 0.549097 |
38af74cbe2829d75f9306c645a1675922c93a85f | 2,481 | py | Python | src/dnt/translation.py | strfx/deep-neural-transcriber | 7ca422a226d544b6b93fe6aca31ac0ce9c727667 | [
"MIT"
] | 4 | 2021-11-17T10:17:18.000Z | 2022-03-12T15:13:32.000Z | src/dnt/translation.py | strfx/deep-neural-transcriber | 7ca422a226d544b6b93fe6aca31ac0ce9c727667 | [
"MIT"
] | 1 | 2021-11-19T11:56:40.000Z | 2022-03-07T17:38:16.000Z | src/dnt/translation.py | strfx/deep-neural-transcriber | 7ca422a226d544b6b93fe6aca31ac0ce9c727667 | [
"MIT"
] | 1 | 2022-03-02T07:15:01.000Z | 2022-03-02T07:15:01.000Z | """
Translate transcripts using commercial translation service DeepL.
"""
from typing import Protocol
import requests # type: ignore
DEEPL_API_URL = "https://api-free.deepl.com/v2/translate"
class Translator(Protocol):
def translate(self, text: str, target_lang: str = 'DE') -> str:
# TODO: Should ther... | 28.517241 | 80 | 0.575977 |
38af79277779f77ffe31c2f6e26ae88f3e1a7ae9 | 4,198 | py | Python | tensorflow/contrib/autograph/pyct/static_analysis/live_values_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/autograph/pyct/static_analysis/live_values_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/autograph/pyct/static_analysis/live_values_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 32.796875 | 80 | 0.685326 |
38afcd6f7a44f336ce0d11116625d419141b238f | 3,585 | py | Python | anomaly detector/common/logger.py | abhilashabhilash3/Robust-vision-based-obstacle-detection | e8f48a2dd157a02844cde893e4944ae920361d20 | [
"MIT"
] | null | null | null | anomaly detector/common/logger.py | abhilashabhilash3/Robust-vision-based-obstacle-detection | e8f48a2dd157a02844cde893e4944ae920361d20 | [
"MIT"
] | null | null | null | anomaly detector/common/logger.py | abhilashabhilash3/Robust-vision-based-obstacle-detection | e8f48a2dd157a02844cde893e4944ae920361d20 | [
"MIT"
] | 1 | 2020-06-08T16:30:03.000Z | 2020-06-08T16:30:03.000Z | # Level | Level for Humans | Level Description
# -------|------------------|------------------------------------
# 0 | DEBUG | [Default] Print all messages
# 1 | INFO | Filter out INFO messages
# 2 | WARNING | Filter out INFO & WA... | 29.628099 | 90 | 0.542259 |
38b03b0cab062e521f8cd5e43b9ae9c49aefd569 | 20,676 | py | Python | intersight/models/compute_server_setting.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/compute_server_setting.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/compute_server_setting.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class ComputeServerSetting(object):
"""
NOTE: This ... | 30.952096 | 389 | 0.620478 |
38b05c95682bc99d296c9cd08e9414b93ce4dbd1 | 1,107 | py | Python | bindEthIrq.py | a523/obscmdbench | 109f83d42f7e266d6205bac3f13c210502ed86f4 | [
"Apache-2.0"
] | 27 | 2018-01-23T09:23:03.000Z | 2021-08-09T19:01:42.000Z | bindEthIrq.py | a523/obscmdbench | 109f83d42f7e266d6205bac3f13c210502ed86f4 | [
"Apache-2.0"
] | 3 | 2019-06-23T07:30:21.000Z | 2020-08-04T08:58:19.000Z | bindEthIrq.py | a523/obscmdbench | 109f83d42f7e266d6205bac3f13c210502ed86f4 | [
"Apache-2.0"
] | 8 | 2018-09-20T10:08:39.000Z | 2021-09-14T07:33:37.000Z | #!/usr/bin/python
#coding=utf8
import os,re
def irq():
#return irq number and network interface number
#exp:
#irq iface
#61 0
#62 1
cpunum = os.popen("cat /proc/cpuinfo|grep \"model name\"|wc -l").read().replace("\n","")
r = os.popen("cat /proc/interrupts |grep -E \"eth[0-9]-\"|awk '{sub... | 33.545455 | 154 | 0.606143 |
38b066d4fd5c9555d40e48e9193f5dd8b61dd155 | 3,433 | py | Python | pysyrenn/frontend/concat_layer.py | 95616ARG/SyReNN | 19abf589e84ee67317134573054c648bb25c244d | [
"MIT"
] | 36 | 2019-08-19T06:17:52.000Z | 2022-03-11T09:02:40.000Z | pysyrenn/frontend/concat_layer.py | 95616ARG/SyReNN | 19abf589e84ee67317134573054c648bb25c244d | [
"MIT"
] | 8 | 2020-04-09T20:59:04.000Z | 2022-03-11T23:56:50.000Z | pysyrenn/frontend/concat_layer.py | 95616ARG/SyReNN | 19abf589e84ee67317134573054c648bb25c244d | [
"MIT"
] | 4 | 2021-01-13T11:17:55.000Z | 2021-06-28T19:36:04.000Z | """Methods describing concatenation layers.
"""
import aenum
import numpy as np
import torch
from pysyrenn.frontend.layer import NetworkLayer
import syrenn_proto.syrenn_pb2 as transformer_pb
class ConcatAlong(aenum.Enum):
"""Specifies how the concatenation should be performed.
"""
# Concatenate the channel... | 37.725275 | 79 | 0.652491 |
38b07481b7c1b1a3d82400c36a419da15bf706e2 | 4,012 | py | Python | language-modeling/fast_transformers/events/.ipynb_checkpoints/filters-checkpoint.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 5 | 2021-11-06T16:10:31.000Z | 2021-12-25T19:47:42.000Z | language-modeling/fast_transformers/events/.ipynb_checkpoints/filters-checkpoint.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | null | null | null | language-modeling/fast_transformers/events/.ipynb_checkpoints/filters-checkpoint.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 2 | 2021-11-30T03:36:54.000Z | 2021-12-25T19:49:58.000Z | """Define composable functions to filter events."""
import weakref
from .event import Event
class EventFilter(object):
"""EventFilter instances are predicates (ie functions that return True or
False) to be used with an event dispatcher for filtering event
instances.
The main benefit from using raw ... | 29.284672 | 79 | 0.654786 |
38b08fd32b4eeb3c55b3d4b83398a2c802af16a1 | 2,472 | py | Python | homeassistant/components/binary_sensor/__init__.py | mbs-technologie/home-assistant | 71fc446425cbb1c0d4670c261ce8ea3bfd83a73d | [
"MIT"
] | 13 | 2017-02-01T13:25:34.000Z | 2022-01-26T01:30:39.000Z | homeassistant/components/binary_sensor/__init__.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 9 | 2017-07-26T18:05:32.000Z | 2021-12-05T14:16:34.000Z | homeassistant/components/binary_sensor/__init__.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 21 | 2017-07-26T17:09:40.000Z | 2022-03-27T22:37:22.000Z | """
Component to interface with binary sensors.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/binary_sensor/
"""
import asyncio
import logging
import voluptuous as vol
from homeassistant.helpers.entity_component import EntityComponent
from homeassist... | 30.518519 | 75 | 0.657767 |
38b09316f2bb68a1aeb28db8b4699a219bfb3378 | 1,277 | py | Python | astronomaly/postprocessing/scaling.py | nmcardoso/astronomaly | 28c6a7ced2e1553de463a74fc3a19635e45ae548 | [
"BSD-3-Clause"
] | 48 | 2019-11-22T14:41:59.000Z | 2022-03-23T01:48:59.000Z | astronomaly/postprocessing/scaling.py | nmcardoso/astronomaly | 28c6a7ced2e1553de463a74fc3a19635e45ae548 | [
"BSD-3-Clause"
] | 12 | 2021-02-23T15:35:29.000Z | 2022-01-26T09:48:35.000Z | astronomaly/postprocessing/scaling.py | nmcardoso/astronomaly | 28c6a7ced2e1553de463a74fc3a19635e45ae548 | [
"BSD-3-Clause"
] | 6 | 2019-11-27T10:02:43.000Z | 2021-10-11T02:18:06.000Z | from sklearn.preprocessing import StandardScaler
import pandas as pd
from astronomaly.base.base_pipeline import PipelineStage
class FeatureScaler(PipelineStage):
def __init__(self, **kwargs):
"""
Rescales features using a standard sklearn scalar that subtracts the
mean and divides by the ... | 33.605263 | 79 | 0.638215 |
38b0ab8316de2bff7f1e94720029f0bfe3e8a2da | 1,093 | py | Python | sapp/pipeline/add_features.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 74 | 2020-12-18T20:04:30.000Z | 2022-03-22T22:26:02.000Z | sapp/pipeline/add_features.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 61 | 2020-12-21T21:33:05.000Z | 2022-01-27T21:22:20.000Z | sapp/pipeline/add_features.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 20 | 2021-04-08T01:28:53.000Z | 2022-03-22T22:26:05.000Z | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
from typing import List, Optional, Set, Tuple
from . import DictEntries, PipelineStep, Summary
log: logging.Logger = loggin... | 35.258065 | 87 | 0.672461 |
38b0b9cc031f8f8174433f6516343ae262d1659b | 1,201 | py | Python | 2d_uniform_velocity.py | OceanParcels/parcels_cgrid_interpolation_schemes | 1a699001e4eebf2ba7de39592081ec829358a876 | [
"MIT"
] | null | null | null | 2d_uniform_velocity.py | OceanParcels/parcels_cgrid_interpolation_schemes | 1a699001e4eebf2ba7de39592081ec829358a876 | [
"MIT"
] | null | null | null | 2d_uniform_velocity.py | OceanParcels/parcels_cgrid_interpolation_schemes | 1a699001e4eebf2ba7de39592081ec829358a876 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on December 1 2018
@author: Philippe Delandmeter
Master file interpolating a 2D uniform velocity
in an unstructured C-grid quadrilateral
"""
import numpy as np
import hexahedra_utils as h_u
import interpolation_utils as i_u
x = [0, 2, 1.5, .4]
y = [0, -.5,... | 26.688889 | 63 | 0.661948 |
38b0eef8251eb134063de317b1a7ec3016f08b81 | 3,967 | py | Python | alipay/aop/api/request/AlipayBossFncAntbudgetReturnRequest.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/AlipayBossFncAntbudgetReturnRequest.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/AlipayBossFncAntbudgetReturnRequest.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.AlipayBossFncAntbudgetReturnModel import AlipayBossFncAntbudgetReturnModel
class AlipayBossFncAntbudgetReturnRequest(object):
d... | 27.358621 | 148 | 0.644316 |
38b10bda1789425ce2a8966e86d3c6b5020fadf0 | 18,748 | py | Python | http_check/datadog_checks/http_check/http_check.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | http_check/datadog_checks/http_check/http_check.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | http_check/datadog_checks/http_check/http_check.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2010-2017
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# stdlib
from datetime import datetime
import _strptime # noqa
import os.path
import re
import socket
import ssl
import time
import warnings
from urlparse import urlparse
# 3rd party
import requests
from request... | 41.941834 | 135 | 0.614946 |
38b11aedc51bf21bceb32d9aa4fdf9ee9d073faa | 3,795 | py | Python | examples/example_compiler_gym_service/env_tests.py | sparkingdark/CompilerGym | 48b4fda4bd336729f941ce932cd82d773fee6024 | [
"MIT"
] | 3 | 2021-02-25T17:51:27.000Z | 2021-05-23T10:33:28.000Z | examples/example_compiler_gym_service/env_tests.py | soumith/CompilerGym | a5422ea856588107b257951383c1c821bcdf65da | [
"MIT"
] | null | null | null | examples/example_compiler_gym_service/env_tests.py | soumith/CompilerGym | a5422ea856588107b257951383c1c821bcdf65da | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Tests for the example CompilerGym service."""
import gym
import numpy as np
import pytest
from gym.spaces import Box
import compiler_gym
im... | 24.803922 | 70 | 0.686957 |
38b120cf5fe70fc106913d56912adcfdc934177f | 691 | py | Python | client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetHyperparametersResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetHyperparametersResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetHyperparametersResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class ModeldbGetHyperparametersResponse(BaseType):
def __init__(self, hyperparameters=None):
required = {
"hyperparameters": False,
}
self.hyperparameters = hyperparameters
for k, v in required.items():
... | 27.64 | 75 | 0.706223 |
38b144eee83e364f28557431090eb3762f9553cd | 45,490 | py | Python | salt/modules/iptables.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/modules/iptables.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/modules/iptables.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Support for iptables
'''
# Import python libs
import os
import re
import sys
import shlex
# Import salt libs
import salt.utils
from salt.state import STATE_INTERNAL_KEYWORDS as _STATE_INTERNAL_KEYWORDS
from salt.exceptions import SaltException
def __virtual__():
'''
Only load the... | 35.90371 | 111 | 0.591031 |
38b1589f69edfe427d80bae2e04c3be675d5b60b | 2,804 | py | Python | core/mixins.py | KraftSoft/letsgo-back | 24159eee1a510e9ae218a0262bc6a51618414b33 | [
"BSD-3-Clause"
] | 1 | 2018-02-17T08:46:11.000Z | 2018-02-17T08:46:11.000Z | core/mixins.py | KraftSoft/letsgo-back | 24159eee1a510e9ae218a0262bc6a51618414b33 | [
"BSD-3-Clause"
] | null | null | null | core/mixins.py | KraftSoft/letsgo-back | 24159eee1a510e9ae218a0262bc6a51618414b33 | [
"BSD-3-Clause"
] | null | null | null | from chat.models import Confirm
from core.models import User, Meeting, UserPhotos, SocialData
from core.permissions import IsStaffOrOwner
from core.serializers import UserSerializerExtended, MeetingSerializer, PhotoSerializer, \
ConfirmSerializer, ConfirmExtendedSerializer, SocialSerializer
from core.constants impo... | 29.829787 | 99 | 0.656562 |
38b1668885d128ba52df215d5aa32bc986eb25c7 | 4,843 | py | Python | tabular/planing_utils.py | ronamit/Ron_Discount | e1a7dacbc5b901aa9bb84bbe2c2121fb652c7804 | [
"MIT"
] | null | null | null | tabular/planing_utils.py | ronamit/Ron_Discount | e1a7dacbc5b901aa9bb84bbe2c2121fb652c7804 | [
"MIT"
] | null | null | null | tabular/planing_utils.py | ronamit/Ron_Discount | e1a7dacbc5b901aa9bb84bbe2c2121fb652c7804 | [
"MIT"
] | null | null | null | from __future__ import division, absolute_import, print_function
import numpy as np
#------------------------------------------------------------------------------------------------------------~
def GetUniformPolicy(N, A):
"""
Create a Markov stochastic policy which chooses actions randomly uniform from each s... | 39.696721 | 150 | 0.549866 |
38b18019135046efb040ca65195aef5a02c877c6 | 4,556 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.489796 | 217 | 0.717954 |
38b18061c07a4ef85ad02c0edc91006613654c87 | 11,869 | py | Python | upfserviceagent/agent/agent.py | lightedge/lightedge-upfservice-agent | 2ccc418972371fb395cb5d6d7f3de382c26f57e7 | [
"Apache-2.0"
] | null | null | null | upfserviceagent/agent/agent.py | lightedge/lightedge-upfservice-agent | 2ccc418972371fb395cb5d6d7f3de382c26f57e7 | [
"Apache-2.0"
] | null | null | null | upfserviceagent/agent/agent.py | lightedge/lightedge-upfservice-agent | 2ccc418972371fb395cb5d6d7f3de382c26f57e7 | [
"Apache-2.0"
] | 4 | 2020-05-29T10:13:31.000Z | 2020-08-12T12:45:28.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2020 Fondazione Bruno Kessler
# Author(s): Giovanni Baggio (g.baggio@fbk.eu)
#
# 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.... | 30.590206 | 80 | 0.586486 |
38b19611a58b62148f6ea18659db7495b4e148ee | 15,587 | py | Python | s3contents/genericmanager.py | aleia-team/s3contents | b41a8f77daf918afa43d50b6e0edddc4b8b2736d | [
"Apache-2.0"
] | 197 | 2016-12-20T23:24:25.000Z | 2022-03-28T11:17:57.000Z | s3contents/genericmanager.py | aleia-team/s3contents | b41a8f77daf918afa43d50b6e0edddc4b8b2736d | [
"Apache-2.0"
] | 128 | 2016-10-22T18:41:42.000Z | 2022-03-29T18:57:23.000Z | s3contents/genericmanager.py | aleia-team/s3contents | b41a8f77daf918afa43d50b6e0edddc4b8b2736d | [
"Apache-2.0"
] | 93 | 2017-01-22T14:59:33.000Z | 2022-03-20T14:51:43.000Z | import datetime
import json
import mimetypes
import os
from dateutil.tz import tzutc
from fsspec.asyn import sync
from tornado.web import HTTPError
from s3contents.chunks import (
assemble_chunks,
delete_chunks,
prune_stale_chunks,
store_content_chunk,
)
from s3contents.genericfs import GenericFSError... | 33.958606 | 104 | 0.562841 |
38b1ae9bbefbd56f0fe6b6cd066fc775ebc83f68 | 3,561 | py | Python | b64.py | tomwisniewskiprv/Python_networking | 6584aaa94630eb4afdcceacaa0563cc68b21fc2b | [
"MIT"
] | null | null | null | b64.py | tomwisniewskiprv/Python_networking | 6584aaa94630eb4afdcceacaa0563cc68b21fc2b | [
"MIT"
] | null | null | null | b64.py | tomwisniewskiprv/Python_networking | 6584aaa94630eb4afdcceacaa0563cc68b21fc2b | [
"MIT"
] | null | null | null | # Base64 encoding and decoding
# Tomasz Wiśniewski
# 2017.10.08
# Python 3.x
# NOTE:
# I made this script to learn how base64 works, however it should be done on binary level not on chars.
# Next version will be upgraded.
import unittest
import argparse
import base64
def allowed_chars():
""" Returns a list of c... | 32.081081 | 114 | 0.602921 |
38b1b034cdff8b31074365442363a89eca375a00 | 1,946 | py | Python | geneContentMatrix.py | tatumdmortimer/core-genome-alignment | d60799b2b6a47d9b983d332b2de814b991607886 | [
"MIT"
] | 18 | 2015-05-28T15:48:05.000Z | 2021-03-04T04:24:16.000Z | geneContentMatrix.py | tatumdmortimer/core-genome-alignment | d60799b2b6a47d9b983d332b2de814b991607886 | [
"MIT"
] | null | null | null | geneContentMatrix.py | tatumdmortimer/core-genome-alignment | d60799b2b6a47d9b983d332b2de814b991607886 | [
"MIT"
] | 3 | 2017-12-07T08:39:01.000Z | 2020-11-25T09:40:07.000Z | #!/usr/bin/env python
import sys
import os
import getopt
import re
# This script uses the orthologous groups output by OrthoMCL to create a
# a matrix of gene content.
def get_arguments(argv):
if len(argv) == 0:
usage()
sys.exit(2)
groupsFile = None
try:
opts, args = getopt.ge... | 27.027778 | 76 | 0.615622 |
38b1c54c99cd24ad55abc5b8f2d66b58ad9fb5f9 | 1,645 | py | Python | tests/helper.py | rhino2rhonda/vfs | 8f55ae36d34871fc649092f2a28b91465a495341 | [
"MIT"
] | null | null | null | tests/helper.py | rhino2rhonda/vfs | 8f55ae36d34871fc649092f2a28b91465a495341 | [
"MIT"
] | null | null | null | tests/helper.py | rhino2rhonda/vfs | 8f55ae36d34871fc649092f2a28b91465a495341 | [
"MIT"
] | null | null | null | import functools
import os
import shutil
import unittest
import sfs.config as config
def dummy_file(path, size=5):
with open(path, 'w') as out:
out.seek(size - 1)
out.write('\0')
def dummy_link(link_path, file_path='dummy_file'):
os.symlink(file_path, link_path)
class TestCaseWithFS(unitt... | 28.859649 | 78 | 0.625532 |
38b1d80def7a524ebdf9eca7f48e3b718864e042 | 504 | py | Python | leetcode_python/src/algorithms/arrays/maximum_product_subarray.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | leetcode_python/src/algorithms/arrays/maximum_product_subarray.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | leetcode_python/src/algorithms/arrays/maximum_product_subarray.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | from typing import List
class MaximumProductSubArray:
def calculate(self, items: List[int]) -> int:
result = max(items)
maximum, minimum = 1, 1
for i in items:
if i == 0:
maximum = 1
minimum = 1
continue
temp_max = ... | 18.666667 | 51 | 0.498016 |
38b21fc093aec695ebeb0602749187e6a5c29448 | 15,561 | py | Python | demisto_sdk/commands/find_dependencies/tests/find_dependencies_test.py | SepioSystems/demisto-sdk | f28007a637b7a38f4165bc522328ccbbd9b05628 | [
"MIT"
] | null | null | null | demisto_sdk/commands/find_dependencies/tests/find_dependencies_test.py | SepioSystems/demisto-sdk | f28007a637b7a38f4165bc522328ccbbd9b05628 | [
"MIT"
] | null | null | null | demisto_sdk/commands/find_dependencies/tests/find_dependencies_test.py | SepioSystems/demisto-sdk | f28007a637b7a38f4165bc522328ccbbd9b05628 | [
"MIT"
] | null | null | null | import json
import os
import pytest
from demisto_sdk.commands.common.git_tools import git_path
from demisto_sdk.commands.find_dependencies.find_dependencies import \
PackDependencies
@pytest.fixture(scope="module")
def id_set():
id_set_path = os.path.normpath(
os.path.join(__file__, git_path(), 'demi... | 40.002571 | 158 | 0.526766 |
38b240e4ef0d6e0fa6018531a63154a7c430c475 | 3,749 | py | Python | toontown/classicchars/DistributedGoofySpeedway.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/classicchars/DistributedGoofySpeedway.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/classicchars/DistributedGoofySpeedway.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from pandac.PandaModules import *
from toontown.classicchars import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from toontown.classicchars import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.t... | 35.704762 | 270 | 0.679915 |
38b244c807b4c075edbee8c2993f8c7696656582 | 6,508 | py | Python | KPConv-PyTorch/test_colmap_baseline_models.py | dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images | b0e9c0d26177f74b20cbf95f15cefba9af695c70 | [
"MIT"
] | 3 | 2021-12-20T02:41:28.000Z | 2022-02-18T15:47:48.000Z | KPConv-PyTorch/test_colmap_baseline_models.py | dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images | b0e9c0d26177f74b20cbf95f15cefba9af695c70 | [
"MIT"
] | null | null | null | KPConv-PyTorch/test_colmap_baseline_models.py | dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images | b0e9c0d26177f74b20cbf95f15cefba9af695c70 | [
"MIT"
] | null | null | null | #
#
# 0=================================0
# | Kernel Point Convolutions |
# 0=================================0
#
#
# ----------------------------------------------------------------------------------------------------------------------
#
# Callable script to start a training on ModelNet40 dat... | 30.698113 | 120 | 0.535187 |
38b248c2fbc2def6bb83defa062d630730e3762e | 808 | py | Python | photos/urls.py | mutheud/gallery | ff3cb450e8d75c34b800544ebf0aa756279bbd83 | [
"MIT"
] | null | null | null | photos/urls.py | mutheud/gallery | ff3cb450e8d75c34b800544ebf0aa756279bbd83 | [
"MIT"
] | null | null | null | photos/urls.py | mutheud/gallery | ff3cb450e8d75c34b800544ebf0aa756279bbd83 | [
"MIT"
] | null | null | null | """photos URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | 33.666667 | 79 | 0.699257 |
38b250e2e6e3c5f72f2cc4b020d623c4535f1d16 | 40,491 | py | Python | aries-cloudagent-python/aries_cloudagent/protocols/out_of_band/v1_0/manager.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | null | null | null | aries-cloudagent-python/aries_cloudagent/protocols/out_of_band/v1_0/manager.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | null | null | null | aries-cloudagent-python/aries_cloudagent/protocols/out_of_band/v1_0/manager.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | 1 | 2022-02-02T17:05:27.000Z | 2022-02-02T17:05:27.000Z | """Classes to manage connections."""
import asyncio
import json
import logging
from typing import Mapping, Sequence, Optional
from ....connections.base_manager import BaseConnectionManager
from ....connections.models.conn_record import ConnRecord
from ....connections.util import mediation_record_if_id
from ....core.... | 39.736016 | 88 | 0.558667 |
38b2517dc0a95ff349197bd24f122e1fab1e673f | 4,123 | py | Python | AttentionGAN/AttentionGAN_v1_multi/model.py | VDIGPKU/CMUA-Watermark | 34152ef7d1c7f6d47488dfd710cc98936fffe43b | [
"MIT"
] | 39 | 2021-12-13T21:59:32.000Z | 2022-03-25T12:44:34.000Z | AttentionGAN/AttentionGAN_v1_multi/model.py | VDIGPKU/CMUA-Watermark | 34152ef7d1c7f6d47488dfd710cc98936fffe43b | [
"MIT"
] | 2 | 2022-01-19T12:09:23.000Z | 2022-03-28T06:45:13.000Z | AttentionGAN/AttentionGAN_v1_multi/model.py | VDIGPKU/CMUA-Watermark | 34152ef7d1c7f6d47488dfd710cc98936fffe43b | [
"MIT"
] | 8 | 2021-12-17T12:09:18.000Z | 2022-03-29T15:50:20.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
class ResidualBlock(nn.Module):
"""Residual Block with instance normalization."""
def __init__(self, dim_in, dim_out):
super(ResidualBlock, self).__init__()
self.main = nn.Sequential(
nn.Conv2d(di... | 42.071429 | 116 | 0.635945 |
38b273dab0556934ee8ba88b2590f6886c885f70 | 2,694 | py | Python | Semantic_Segmentation/tools/semantic_visualize.py | yokoro13/SketchyScene | 1301a9d3ee2fd91b6c19fe8b1e036a39f514ef4a | [
"MIT"
] | 81 | 2018-08-07T03:30:08.000Z | 2022-03-26T07:57:13.000Z | Semantic_Segmentation/tools/semantic_visualize.py | yokoro13/SketchyScene | 1301a9d3ee2fd91b6c19fe8b1e036a39f514ef4a | [
"MIT"
] | 7 | 2019-01-18T03:52:29.000Z | 2021-07-24T22:48:10.000Z | Semantic_Segmentation/tools/semantic_visualize.py | yokoro13/SketchyScene | 1301a9d3ee2fd91b6c19fe8b1e036a39f514ef4a | [
"MIT"
] | 15 | 2018-07-25T08:07:36.000Z | 2022-01-23T16:16:47.000Z | import argparse
import numpy as np
from PIL import Image
import scipy.io
import matplotlib.pyplot as plt
import os
def visualize_semantic_segmentation(label_array, color_map, black_bg=False, save_path=None):
"""
tool for visualizing semantic segmentation for a given label array
:param label_array: [H, W]... | 39.043478 | 113 | 0.673348 |
38b28c0353ad4fc0ae3ee460b93b278b74355c26 | 1,906 | py | Python | flatsat/opensatkit/cfs/create_flag.py | cromulencellc/hackasat-final-2021 | d01a1b5d7947b3e41ae2da3ec63d5f43278a5eac | [
"MIT"
] | 4 | 2022-02-25T05:45:27.000Z | 2022-03-10T01:05:27.000Z | flatsat/opensatkit/cfs/create_flag.py | cromulencellc/hackasat-final-2021 | d01a1b5d7947b3e41ae2da3ec63d5f43278a5eac | [
"MIT"
] | null | null | null | flatsat/opensatkit/cfs/create_flag.py | cromulencellc/hackasat-final-2021 | d01a1b5d7947b3e41ae2da3ec63d5f43278a5eac | [
"MIT"
] | 2 | 2022-03-02T02:14:16.000Z | 2022-03-05T07:36:18.000Z | #!/usr/bin/env python3
import os
import secrets
import sys
ADCS_DEFS_PATH = "osk_adcs_defs"
FLAG_FILENAME = "flag.txt"
FLAG_LEN = 8 # in bytes
def check_file_exists(path):
if os.path.exists(path) and not os.path.isdir(path):
return True
return False
def check_flag_format(path):
flag = b''
... | 26.109589 | 121 | 0.593914 |
38b29c7033342511d97c7c62339e320d9f5d21d8 | 29,360 | py | Python | custom_components/dual_smart_thermostat/climate.py | nickrout/ha-dual-smart-thermostat | 45061cf849ec647d3c7e5760364e8fe07a6514c7 | [
"Apache-2.0",
"MIT"
] | 14 | 2020-12-09T14:13:25.000Z | 2022-03-23T08:07:07.000Z | custom_components/dual_smart_thermostat/climate.py | nickrout/ha-dual-smart-thermostat | 45061cf849ec647d3c7e5760364e8fe07a6514c7 | [
"Apache-2.0",
"MIT"
] | 3 | 2022-02-21T18:37:06.000Z | 2022-03-21T13:40:38.000Z | custom_components/dual_smart_thermostat/climate.py | nickrout/ha-dual-smart-thermostat | 45061cf849ec647d3c7e5760364e8fe07a6514c7 | [
"Apache-2.0",
"MIT"
] | 4 | 2021-06-07T10:57:14.000Z | 2022-03-04T19:40:31.000Z | """Adds support for generic thermostat units."""
import asyncio
import logging
import voluptuous as vol
from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateEntity
from homeassistant.components.climate.const import (
ATTR_PRESET_MODE,
CURRENT_HVAC_COOL,
CURRENT_HVAC_HEAT,
CURRENT_HVAC_... | 35.674362 | 96 | 0.605484 |
38b2c7a63f870575b7a8de7d0f2966c6ca1fee3f | 3,299 | py | Python | diskOperations/fileAndFolderOperations.py | nav9/iRest | 12e6fdaeb0fa9d253c056fd2de057dd9d1aa8121 | [
"MIT"
] | null | null | null | diskOperations/fileAndFolderOperations.py | nav9/iRest | 12e6fdaeb0fa9d253c056fd2de057dd9d1aa8121 | [
"MIT"
] | null | null | null | diskOperations/fileAndFolderOperations.py | nav9/iRest | 12e6fdaeb0fa9d253c056fd2de057dd9d1aa8121 | [
"MIT"
] | null | null | null | import os
import shutil
import logging
from collections import deque
#TODO: Try catch for most of the functions are needed
#Note: Since these functions are operating-system-independent, they are kept as part of this package, rather than placing them in the operatingSystemFunctions package
class FileOperations:
def... | 50.753846 | 258 | 0.715975 |
38b31cbe7737ed2c468a79ab93e1c5905fa3868c | 873 | py | Python | niapy/tests/test_cro.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | null | null | null | niapy/tests/test_cro.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | 1 | 2021-08-13T07:52:40.000Z | 2021-08-16T08:52:20.000Z | niapy/tests/test_cro.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | 2 | 2021-08-08T08:29:53.000Z | 2021-08-12T15:31:55.000Z | # encoding=utf8
from niapy.algorithms.basic import CoralReefsOptimization
from niapy.tests.test_algorithm import AlgorithmTestCase, MyProblem
class CROTestCase(AlgorithmTestCase):
def setUp(self):
AlgorithmTestCase.setUp(self)
self.algo = CoralReefsOptimization
def test_custom(self):
... | 37.956522 | 103 | 0.754868 |
38b32bf03bbaf29deb8bd306d6ce44849d74eb92 | 15,433 | py | Python | c2cwsgiutils/health_check.py | jhutchings1/c2cwsgiutils | 733f3eace5393539a170455038a27d42682bf4f5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | c2cwsgiutils/health_check.py | jhutchings1/c2cwsgiutils | 733f3eace5393539a170455038a27d42682bf4f5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | c2cwsgiutils/health_check.py | jhutchings1/c2cwsgiutils | 733f3eace5393539a170455038a27d42682bf4f5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | """
Setup an health_check API.
To use it, create an instance of this class in your application initialization and do a few calls to its
methods add_db_check()
"""
import configparser
import copy
import logging
import os
import re
import subprocess
import time
import traceback
from collections import Counter
from typin... | 40.613158 | 110 | 0.601244 |
38b34d28a33c5ed69af9bf45fe882c6beb2d05c8 | 1,273 | py | Python | tests/test_log_config.py | StudioTrackr/configur | 6e7505a812d830955f2ef65fc14b650b10487e37 | [
"MIT"
] | null | null | null | tests/test_log_config.py | StudioTrackr/configur | 6e7505a812d830955f2ef65fc14b650b10487e37 | [
"MIT"
] | null | null | null | tests/test_log_config.py | StudioTrackr/configur | 6e7505a812d830955f2ef65fc14b650b10487e37 | [
"MIT"
] | null | null | null | import logging.config
import pytest
from configur.logging_config import init_logging
@pytest.fixture(autouse=True)
def reset_logger():
# Reset any existing logging
logging.root = logging.RootLogger(logging.WARNING)
logging.root.manager.loggerDict = {}
yield
def test_init_logging_levels():
asse... | 23.145455 | 55 | 0.709348 |
38b3749328b2a317a0aaf41f529799868f7827bf | 6,171 | py | Python | src/cromwell_resource_crawler/__init__.py | biowdl/cromwell-resource-crawler | 0d0cf638e8e4b4b1afb0cacbc312d76996d31a07 | [
"MIT"
] | null | null | null | src/cromwell_resource_crawler/__init__.py | biowdl/cromwell-resource-crawler | 0d0cf638e8e4b4b1afb0cacbc312d76996d31a07 | [
"MIT"
] | 2 | 2020-06-16T13:17:35.000Z | 2020-07-30T09:04:28.000Z | src/cromwell_resource_crawler/__init__.py | biowdl/cromwell-resource-crawler | 0d0cf638e8e4b4b1afb0cacbc312d76996d31a07 | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Leiden University Medical Center
#
# 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, me... | 41.695946 | 79 | 0.635715 |
38b37d41460ec7b94cc5779415da2ccf85b03f7e | 4,782 | py | Python | invoicer/_profile/__init__.py | mtik00/invoicer | 6128202ca86823dc998b8ea661050702544b9b21 | [
"MIT"
] | null | null | null | invoicer/_profile/__init__.py | mtik00/invoicer | 6128202ca86823dc998b8ea661050702544b9b21 | [
"MIT"
] | 1 | 2021-08-04T23:32:15.000Z | 2021-08-04T23:32:15.000Z | invoicer/_profile/__init__.py | mtik00/invoicer | 6128202ca86823dc998b8ea661050702544b9b21 | [
"MIT"
] | null | null | null | import pyotp
from flask import Blueprint, render_template, request, flash, redirect, url_for, session
from flask_login import login_required, current_user
from ..models import Profile, User, InvoiceTheme, SiteTheme
from ..database import db
from ..cache import app_cache
from .forms import ProfileForm, TwoFAEnableForm
... | 33.440559 | 88 | 0.676286 |
38b3dd3cb6931766c1bdc07113429921b82f5464 | 856 | py | Python | api_app/api/dependencies/workspace_service_templates.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | 1 | 2022-03-02T19:46:46.000Z | 2022-03-02T19:46:46.000Z | api_app/api/dependencies/workspace_service_templates.py | frankfanslc/AzureTRE | c6ab21cfdb252b37ca23fde13cf397d519da31a7 | [
"MIT"
] | 1 | 2022-02-21T09:43:20.000Z | 2022-02-21T09:43:20.000Z | api_app/api/dependencies/workspace_service_templates.py | frankfanslc/AzureTRE | c6ab21cfdb252b37ca23fde13cf397d519da31a7 | [
"MIT"
] | null | null | null | from fastapi import Depends, HTTPException, Path
from starlette.status import HTTP_404_NOT_FOUND
from api.dependencies.database import get_repository
from db.errors import EntityDoesNotExist
from db.repositories.resource_templates import ResourceTemplateRepository
from models.domain.resource import ResourceType
from m... | 50.352941 | 186 | 0.857477 |
38b3de087b28d6743e3c3f4d6e68c7c27cf38897 | 415 | py | Python | files/utils.py | danielchriscarter/part2-django | d4adffa3280431151bb8d1c51f0be2dbffff9dd1 | [
"BSD-2-Clause"
] | null | null | null | files/utils.py | danielchriscarter/part2-django | d4adffa3280431151bb8d1c51f0be2dbffff9dd1 | [
"BSD-2-Clause"
] | null | null | null | files/utils.py | danielchriscarter/part2-django | d4adffa3280431151bb8d1c51f0be2dbffff9dd1 | [
"BSD-2-Clause"
] | null | null | null | import os
# Traverse a dictionary structure of directories and files to give a list-based structure for outputs
def traverse(root, files, dirs):
subfiles = files[root.id]
subdirs = []
for d in dirs[root.id]:
subdirs.append(traverse(d, files, dirs))
return (root, subfiles, subdirs)
# Have this ... | 29.642857 | 101 | 0.703614 |
38b3e0d0646d275708e14df06a7609d6950a0fc1 | 6,966 | py | Python | python/example/deformable_backward_3d.py | srl-ethz/diffPD_sim2real | e491668995a163b8ff7542d99f0b4e0c0f4ed2df | [
"MIT"
] | 4 | 2022-02-10T02:28:42.000Z | 2022-02-10T07:28:35.000Z | python/example/deformable_backward_3d.py | srl-ethz/diffPD_sim2real | e491668995a163b8ff7542d99f0b4e0c0f4ed2df | [
"MIT"
] | null | null | null | python/example/deformable_backward_3d.py | srl-ethz/diffPD_sim2real | e491668995a163b8ff7542d99f0b4e0c0f4ed2df | [
"MIT"
] | null | null | null | import sys
sys.path.append('../')
import os
from pathlib import Path
import time
from pathlib import Path
import scipy.optimize
import numpy as np
import pickle
from py_diff_pd.common.common import ndarray, create_folder
from py_diff_pd.common.common import print_info, print_ok, print_error, PrettyTabular
from py_dif... | 40.034483 | 132 | 0.580247 |
38b412d7c8961504b41077843068df8b961cdabf | 3,648 | py | Python | tests/fiaas_skipper/conftest.py | rarruda/skipper | a5ed39eac102116ef49dc952d6f1f4017acaa11c | [
"Apache-2.0"
] | 7 | 2018-05-02T14:00:56.000Z | 2022-01-13T09:31:28.000Z | tests/fiaas_skipper/conftest.py | rarruda/skipper | a5ed39eac102116ef49dc952d6f1f4017acaa11c | [
"Apache-2.0"
] | 43 | 2018-03-27T13:35:20.000Z | 2022-03-23T09:02:35.000Z | tests/fiaas_skipper/conftest.py | rarruda/skipper | a5ed39eac102116ef49dc952d6f1f4017acaa11c | [
"Apache-2.0"
] | 7 | 2020-06-26T08:54:41.000Z | 2022-03-17T11:49:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8
# Copyright 2017-2019 The FIAAS 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
#
# U... | 32 | 117 | 0.629112 |
38b42103237c59e5c32c2699ac843ecbca9fc542 | 1,351 | py | Python | tests/common/test_op/ascend/triplet_loss.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_op/ascend/triplet_loss.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_op/ascend/triplet_loss.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019-2021 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 agre... | 37.527778 | 99 | 0.725389 |
38b42f93c42d4653b5f2b0b2651a149da66ebf1e | 9,014 | py | Python | cogs/misc.py | HypixelBot/bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 10 | 2020-06-06T13:57:46.000Z | 2021-11-08T09:27:42.000Z | cogs/misc.py | HypixelBot/Bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 7 | 2020-06-06T14:04:05.000Z | 2020-07-05T04:05:37.000Z | cogs/misc.py | HypixelBot/bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 14 | 2020-06-09T17:12:52.000Z | 2021-07-21T23:24:30.000Z | import logging
import sys
import aiohttp
import time as t
from discord import Webhook, AsyncWebhookAdapter
from trello import TrelloClient
from cogs.utils.checks import *
from cogs.utils.mojang import *
from cogs.utils.time import human_timedelta
log = logging.getLogger(__name__)
class Misc(commands.Cog):
"""Co... | 54.301205 | 263 | 0.594298 |
38b43b779349f6b780045f656aee0e58ae1d694b | 3,227 | py | Python | views/nationals.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | views/nationals.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | views/nationals.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | from collections import defaultdict
from functools import lru_cache
from urllib.parse import urlparse
from hashlib import sha1
from elasticsearch.exceptions import NotFoundError
from legislative_act import model as dm
from legislative_act.history import flushed
from settings import FOLLOW_DOMAINS
COUNTRIES = {
'... | 28.06087 | 76 | 0.59343 |
38b474cbd2404eeaab579d6cc5847f92b3df22e3 | 191,037 | py | Python | python/sbp/observation.py | zk20/libsbp | 041c5055f5db422258ebb3ce3f8e9f6e5d3e5fa9 | [
"MIT"
] | null | null | null | python/sbp/observation.py | zk20/libsbp | 041c5055f5db422258ebb3ce3f8e9f6e5d3e5fa9 | [
"MIT"
] | null | null | null | python/sbp/observation.py | zk20/libsbp | 041c5055f5db422258ebb3ce3f8e9f6e5d3e5fa9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (C) 2015-2018 Swift Navigation Inc.
# Contact: https://support.swiftnav.com
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHO... | 30.041988 | 93 | 0.612944 |
38b476eea8e0dbfabc2834194903196bb31be0cf | 5,819 | py | Python | autobias/training/data_batcher.py | chrisc36/autobias | df1120d46adccf024c8dc59f86dd95f2c710fb52 | [
"Apache-2.0"
] | 3 | 2020-12-27T11:42:14.000Z | 2021-04-12T14:19:39.000Z | autobias/training/data_batcher.py | chrisc36/autobias | df1120d46adccf024c8dc59f86dd95f2c710fb52 | [
"Apache-2.0"
] | 1 | 2020-12-28T01:36:46.000Z | 2020-12-28T01:36:46.000Z | autobias/training/data_batcher.py | chrisc36/autobias | df1120d46adccf024c8dc59f86dd95f2c710fb52 | [
"Apache-2.0"
] | null | null | null | import logging
from collections import defaultdict
from typing import List, Iterable
import numpy as np
from torch.utils.data import BatchSampler, Sampler
from torch.utils.data import RandomSampler as TorchRandomSampler
from autobias.utils import py_utils
from autobias.utils.configured import Configured
class Sampl... | 29.841026 | 91 | 0.687231 |
38b4794ab0ca90c3dcb3e0e7048b0902651d2eb9 | 10,882 | py | Python | feature_space_tree/experiments/experiment_simple.py | lopez-monroy/FeatureSpaceTreeOld | 200a9e35f1251db85a6c83f2e864db2649e531e2 | [
"Apache-2.0"
] | null | null | null | feature_space_tree/experiments/experiment_simple.py | lopez-monroy/FeatureSpaceTreeOld | 200a9e35f1251db85a6c83f2e864db2649e531e2 | [
"Apache-2.0"
] | null | null | null | feature_space_tree/experiments/experiment_simple.py | lopez-monroy/FeatureSpaceTreeOld | 200a9e35f1251db85a6c83f2e864db2649e531e2 | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python
# coding: utf-8
# Copyright (C) 2011-2012 FeatureSpaceTree Project
#
# 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
... | 40.007353 | 156 | 0.470318 |
38b49852075ee0f930718053d08aac9bdfbeebff | 363 | py | Python | callisto/web/metrics.py | isabella232/callisto | 182b9c3a56d13fbb3f8f199a984b4c4be6c17e9f | [
"MIT"
] | 84 | 2020-02-18T14:58:35.000Z | 2022-03-04T22:34:46.000Z | callisto/web/metrics.py | wrike/callisto | 182b9c3a56d13fbb3f8f199a984b4c4be6c17e9f | [
"MIT"
] | 6 | 2020-07-13T19:31:07.000Z | 2022-03-30T15:35:23.000Z | callisto/web/metrics.py | isabella232/callisto | 182b9c3a56d13fbb3f8f199a984b4c4be6c17e9f | [
"MIT"
] | 9 | 2021-03-08T10:17:29.000Z | 2022-03-04T12:21:53.000Z | from __future__ import annotations
import typing as t
import aiohttp.web as web
from ..libs.domains import consts
if t.TYPE_CHECKING:
from ..libs.use_cases.metrics import MetricsUseCase
async def metrics_handler(request: web.Request) -> web.Response:
uc: MetricsUseCase = request.app[consts.METRICS_USE_CA... | 20.166667 | 65 | 0.774105 |
38b4a14b7b53eba03d4998c0f8efb31ed1b2c02f | 232 | py | Python | teamcity/datadog_checks/teamcity/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | teamcity/datadog_checks/teamcity/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | teamcity/datadog_checks/teamcity/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:45:42.000Z | 2018-08-15T05:45:42.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .__about__ import __version__
from .teamcity import TeamCityCheck
__all__ = [
'__version__',
'TeamCityCheck'
]
| 21.090909 | 59 | 0.732759 |
38b4dcf81f802fda7fc3de00103f3c1c446e6cb4 | 3,129 | py | Python | document_library/tests/test_settings.py | bitlabstudio/django-document-library | 0427687bf601f188e55e6a311af8d8ce34c08432 | [
"MIT"
] | 6 | 2016-11-27T13:16:08.000Z | 2021-07-14T02:38:00.000Z | document_library/tests/test_settings.py | bitlabstudio/django-document-library | 0427687bf601f188e55e6a311af8d8ce34c08432 | [
"MIT"
] | 1 | 2017-09-20T22:31:24.000Z | 2020-12-08T17:00:58.000Z | document_library/tests/test_settings.py | bitlabstudio/django-document-library | 0427687bf601f188e55e6a311af8d8ce34c08432 | [
"MIT"
] | 3 | 2017-01-11T05:37:40.000Z | 2021-01-09T12:12:23.000Z | """Settings that need to be set in order to run the tests."""
import os
DOCUMENT_LIBRARY_PAGINATION_AMOUNT = 2
DOCUMENT_LIBRARY_PAGINATE_BY_CATEGORIES = True
DEBUG = True
FILER_DEBUG = True
SITE_ID = 1
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
... | 25.439024 | 70 | 0.689038 |
38b4fa0e2725d3f9b4cd1a876b5c805ef9679d51 | 1,413 | py | Python | build_time/src/font_dev_utils.py | moyogo/tachyfont | 05c8b3e7357e7a13af37ef81b719a0ff749105a5 | [
"Apache-2.0"
] | null | null | null | build_time/src/font_dev_utils.py | moyogo/tachyfont | 05c8b3e7357e7a13af37ef81b719a0ff749105a5 | [
"Apache-2.0"
] | null | null | null | build_time/src/font_dev_utils.py | moyogo/tachyfont | 05c8b3e7357e7a13af37ef81b719a0ff749105a5 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2015 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... | 28.836735 | 74 | 0.645435 |
38b51c15d17fac3d2b534e7004b4788ada418948 | 4,905 | py | Python | asposewordscloud/models/requests/get_runs_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/requests/get_runs_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/requests/get_runs_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="get_runs_online_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy... | 43.794643 | 127 | 0.650561 |
38b53d7c8a69e4eb2f995bad216f89a38096eec8 | 3,230 | py | Python | betabernsum/bbs.py | anthony-aylward/betabernsum | 71b8d83e2fe8010c85829a1d203ef3ce02b74153 | [
"MIT"
] | null | null | null | betabernsum/bbs.py | anthony-aylward/betabernsum | 71b8d83e2fe8010c85829a1d203ef3ce02b74153 | [
"MIT"
] | null | null | null | betabernsum/bbs.py | anthony-aylward/betabernsum | 71b8d83e2fe8010c85829a1d203ef3ce02b74153 | [
"MIT"
] | null | null | null | #===============================================================================
# bbs.py
#===============================================================================
# Imports ======================================================================
from functools import partial
from multiprocessing import Pool
fro... | 27.142857 | 80 | 0.537461 |
38b5481e7dc712f8de6dfe38e794e29e83ec8ce8 | 2,459 | py | Python | tests/common/test_run/log_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_run/log_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_run/log_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019-2021 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... | 45.537037 | 113 | 0.692965 |
38b55cb399d4bbf0901ea51086d5d46c210ab894 | 13,138 | py | Python | demisto_sdk/commands/common/hook_validations/docker.py | yalonso7/demisto-sdk | 4b832078cdadb0b604a064532975e8be68ac726a | [
"MIT"
] | null | null | null | demisto_sdk/commands/common/hook_validations/docker.py | yalonso7/demisto-sdk | 4b832078cdadb0b604a064532975e8be68ac726a | [
"MIT"
] | null | null | null | demisto_sdk/commands/common/hook_validations/docker.py | yalonso7/demisto-sdk | 4b832078cdadb0b604a064532975e8be68ac726a | [
"MIT"
] | null | null | null | import re
from datetime import datetime, timedelta
from pkg_resources import parse_version
import requests
from demisto_sdk.commands.common.errors import Errors
from demisto_sdk.commands.common.hook_validations.base_validator import \
BaseValidator
from demisto_sdk.commands.common.tools import get_yaml
# disable... | 41.05625 | 118 | 0.611585 |
38b5623b4fc71284986f9aedf0bbe57ed5be8d12 | 10,444 | py | Python | contrib/buildgen/tests/python/pants_test/contrib/buildgen/test_build_file_manipulator.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | contrib/buildgen/tests/python/pants_test/contrib/buildgen/test_build_file_manipulator.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | contrib/buildgen/tests/python/pants_test/contrib/buildgen/test_build_file_manipulator.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
from textwrap import dedent
from pants.build_graph.address import Address
from pants_tes... | 27.62963 | 97 | 0.576503 |
38b5635f169e6e646050583c06f756e8354f0bb6 | 27,000 | py | Python | platonpm/tools/builder.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | platonpm/tools/builder.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | platonpm/tools/builder.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | import functools
import json
from pathlib import (
Path,
)
import tempfile
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Iterable,
List,
Optional,
Set,
Tuple,
)
from platon_typing import (
URI,
HexStr,
Manifest,
)
from platon_utils import (
add_0x_pref... | 29.347826 | 99 | 0.662926 |
38b5d078960ed41012d895e714567d7ab2652d15 | 634 | py | Python | jinjamator/daemon/database/__init__.py | jinjamator/jinjamator-core | 928a6db56a20f57d6f7dc66fb46de71de945817e | [
"Apache-2.0"
] | 7 | 2020-05-06T07:48:14.000Z | 2021-12-11T15:57:26.000Z | jinjamator/daemon/database/__init__.py | jinjamator/jinjamator-core | 928a6db56a20f57d6f7dc66fb46de71de945817e | [
"Apache-2.0"
] | 1 | 2020-04-11T15:13:07.000Z | 2020-04-27T20:01:34.000Z | jinjamator/daemon/database/__init__.py | jinjamator/jinjamator-core | 928a6db56a20f57d6f7dc66fb46de71de945817e | [
"Apache-2.0"
] | 1 | 2020-05-29T08:53:08.000Z | 2020-05-29T08:53:08.000Z | # Copyright 2019 Wilhelm Putz
# 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... | 35.222222 | 74 | 0.769716 |
38b5ddaa23cb81560bef2c9f37b8a84fa0381dcf | 3,448 | py | Python | insta/migrations/0001_initial.py | JKimani77/instagramclone | 87481a7e721f91f0b370be51f23266df996a9c5e | [
"MIT"
] | null | null | null | insta/migrations/0001_initial.py | JKimani77/instagramclone | 87481a7e721f91f0b370be51f23266df996a9c5e | [
"MIT"
] | null | null | null | insta/migrations/0001_initial.py | JKimani77/instagramclone | 87481a7e721f91f0b370be51f23266df996a9c5e | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2021-05-25 05:41
import cloudinary.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_US... | 47.232877 | 161 | 0.610789 |
38b5ee5cad09c04a9953347a1e25cdc5c1a5d0e8 | 11,516 | py | Python | nlisim/geometry/generator.py | jbeezley/simulation-hello-world | b4e1258de9c7601af1701041fa39f8f6c5e5a61e | [
"Apache-2.0"
] | 4 | 2021-05-21T15:46:15.000Z | 2022-03-01T02:58:32.000Z | nlisim/geometry/generator.py | jbeezley/simulation-hello-world | b4e1258de9c7601af1701041fa39f8f6c5e5a61e | [
"Apache-2.0"
] | 10 | 2020-11-10T23:20:37.000Z | 2022-03-12T01:34:47.000Z | nlisim/geometry/generator.py | jbeezley/simulation-hello-world | b4e1258de9c7601af1701041fa39f8f6c5e5a61e | [
"Apache-2.0"
] | 2 | 2020-12-16T14:24:26.000Z | 2021-01-08T15:56:20.000Z | import json
import struct
import time
from typing import List, Tuple, Union
import h5py
import numpy as np
from scipy import ndimage
import vtk
from nlisim.coordinates import Point
from nlisim.diffusion import discrete_laplacian
from nlisim.geometry.math_function import Cylinder, Sphere
from nlisim.grid import Rectan... | 37.511401 | 99 | 0.602119 |
38b606c20c35a1f648a6b95faeadbce9e6aa8279 | 328 | py | Python | practice/97_new.py | porala/python | 41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4 | [
"DOC"
] | 1 | 2020-01-15T11:04:16.000Z | 2020-01-15T11:04:16.000Z | practice/97_new.py | porala/python | 41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4 | [
"DOC"
] | 2 | 2021-03-31T19:36:19.000Z | 2021-06-10T22:29:26.000Z | practice/97_new.py | porala/python | 41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4 | [
"DOC"
] | null | null | null | #!/usr/bin/python
file = open("copy_data_to_file.txt", "w")
while True:
text = input("Enter value: ")
if text == "CLOSE":
file.close()
break
if text == "SAVE":
for i in lines:
file.write(lines + "\n")
continue
else:
lines = file.readlines()
c... | 19.294118 | 41 | 0.512195 |
38b618dea63e12f50d99d068139b32ec7530f47a | 1,287 | py | Python | documentation/iPython_Walkthroughs/qtim_dce/DCE_Processing_Notebook.py | QTIM-Lab/qtim_tools | 92bd15ec7a81c5eda70d11a015f74538f3c41e22 | [
"Apache-2.0"
] | 12 | 2017-03-29T18:17:24.000Z | 2020-03-19T05:28:56.000Z | documentation/iPython_Walkthroughs/qtim_dce/DCE_Processing_Notebook.py | QTIM-Lab/qtim_tools | 92bd15ec7a81c5eda70d11a015f74538f3c41e22 | [
"Apache-2.0"
] | 7 | 2017-03-08T21:06:01.000Z | 2017-06-21T19:01:58.000Z | documentation/iPython_Walkthroughs/qtim_dce/DCE_Processing_Notebook.py | QTIM-Lab/qtim_tools | 92bd15ec7a81c5eda70d11a015f74538f3c41e22 | [
"Apache-2.0"
] | 5 | 2017-03-02T09:08:21.000Z | 2019-10-26T05:37:39.000Z |
from qtim_tools.test_data import load_test_file
# test_file = "your_file_here.nii.gz"
test_file = load_test_file(data="dce_tofts_v6")
print 'Test File Loaded: ' + test_file
from qtim_tools.qtim_dce import tofts_parametric_mapper
# Input Parameters
T1_tissue=1000
T1_blood=1440
relaxivity=.0045
TR=5
TE=2.1
scan_time... | 20.758065 | 60 | 0.818182 |
38b6217795369a2e99693d2616dc8714d9da95d6 | 347 | py | Python | gobbli/__init__.py | awesome-archive/gobbli | 71aacbdc1184871b164185dc0c9f615f07b83173 | [
"Apache-2.0"
] | null | null | null | gobbli/__init__.py | awesome-archive/gobbli | 71aacbdc1184871b164185dc0c9f615f07b83173 | [
"Apache-2.0"
] | null | null | null | gobbli/__init__.py | awesome-archive/gobbli | 71aacbdc1184871b164185dc0c9f615f07b83173 | [
"Apache-2.0"
] | null | null | null | import gobbli.augment as augment
import gobbli.dataset as dataset
import gobbli.experiment as experiment
import gobbli.io as io
import gobbli.model as model
from gobbli.util import TokenizeMethod
__all__ = [
# Modules
"augment",
"dataset",
"experiment",
"model",
"io",
# Misc top level impor... | 19.277778 | 38 | 0.70317 |
38b6334947af607d93e211a50cfdfd4c48fdb79f | 199 | py | Python | maps/in_the_loop/in_the_loop.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | maps/in_the_loop/in_the_loop.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | maps/in_the_loop/in_the_loop.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | from map import Map
class InTheLoop(Map):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.name = 'in_the_loop'
self.difficulty = 'beginner'
| 19.9 | 41 | 0.613065 |
38b636de2bd637331d01524eece0ee32be5adebf | 412 | py | Python | mitmproxy/addons/anticache.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/addons/anticache.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/addons/anticache.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | from mitmproxy import ctx
class AntiCache:
def load(self, loader):
loader.add_option(
"anticache",
bool,
False,
"""
Strip out request headers that might cause the server to return
304-not-modified.
""",
)
def ... | 21.684211 | 75 | 0.51699 |
38b6531fa2045525f672904a123669bc5f0aab49 | 571 | py | Python | pyfyre/widgets/text.py | MrSluffy/pyfyre | e0b7fd32c230d8b2879123e8d2e91367b41e82f3 | [
"MIT"
] | null | null | null | pyfyre/widgets/text.py | MrSluffy/pyfyre | e0b7fd32c230d8b2879123e8d2e91367b41e82f3 | [
"MIT"
] | null | null | null | pyfyre/widgets/text.py | MrSluffy/pyfyre | e0b7fd32c230d8b2879123e8d2e91367b41e82f3 | [
"MIT"
] | null | null | null | from pyfyre.widgets.widget import Widget
class Text(Widget):
"""Creates a Text widget.
This is a simple widget to put a text on the screen.
Attributes
----------
textContent : str
The text content of the Text widget
"""
def __init__(self, textContent: str, className="", props... | 25.954545 | 73 | 0.614711 |
38b65a41ed670245c6b2d4b1dc1f9d5ad7a8a9c4 | 666 | py | Python | test/unittests/test_LuRunoff.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | test/unittests/test_LuRunoff.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | test/unittests/test_LuRunoff.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | import numpy as np
from VariableUnittest import VariableUnitTest
from gwlfe.MultiUse_Fxns.Runoff import LuRunoff
class TestLuRunoff(VariableUnitTest):
def test_LuRunoff(self):
z = self.z
np.testing.assert_array_almost_equal(
LuRunoff.LuRunoff_f(z.NYrs, z.DaysMonth, z.InitSnow_0, z.Te... | 41.625 | 116 | 0.636637 |
38b6630038534d11197862169fe2eab929aa5514 | 4,679 | py | Python | wechat_django/models/article.py | UltraVacuum/wechat-django | 0ea243067f5bc5e69cab6c4585d5e46d9399a583 | [
"MIT"
] | 166 | 2019-02-23T10:19:33.000Z | 2022-02-03T06:50:15.000Z | wechat_django/models/article.py | UltraVacuum/wechat-django | 0ea243067f5bc5e69cab6c4585d5e46d9399a583 | [
"MIT"
] | 19 | 2019-05-07T07:28:32.000Z | 2021-06-02T06:56:03.000Z | wechat_django/models/article.py | UltraVacuum/wechat-django | 0ea243067f5bc5e69cab6c4585d5e46d9399a583 | [
"MIT"
] | 54 | 2019-02-27T07:55:57.000Z | 2021-09-02T06:47:51.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models as m, transaction
from django.utils.translation import ugettext_lazy as _
from ..utils.model import model_fields
from . import appmethod, Material, WeChatModel
class Article(WeChatModel):
material = m.ForeignKey(
... | 33.905797 | 77 | 0.608463 |
38b66320b4282c1451a943b94ef07d81b2792434 | 14,558 | py | Python | topi/python/topi/generic/nn.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 1 | 2019-08-13T09:01:54.000Z | 2019-08-13T09:01:54.000Z | topi/python/topi/generic/nn.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | null | null | null | topi/python/topi/generic/nn.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 1 | 2019-05-01T16:57:15.000Z | 2019-05-01T16:57:15.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 u... | 25.630282 | 71 | 0.663141 |
38b686cb9b419274e2286ef1fdd41fc21a154952 | 14,930 | py | Python | keras2onnx/_parser_tf.py | xadupre/keras-onnx | 17559f987ecce7ec40ab8a36a9596eb950f9b332 | [
"MIT"
] | 1 | 2020-10-26T03:03:02.000Z | 2020-10-26T03:03:02.000Z | keras2onnx/_parser_tf.py | xadupre/keras-onnx | 17559f987ecce7ec40ab8a36a9596eb950f9b332 | [
"MIT"
] | null | null | null | keras2onnx/_parser_tf.py | xadupre/keras-onnx | 17559f987ecce7ec40ab8a36a9596eb950f9b332 | [
"MIT"
] | null | null | null | ###############################################################################
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
###############################################################################
imp... | 40.570652 | 119 | 0.655526 |
38b6878fd267ac5304b893b5c69a88c7cdb6fbec | 1,607 | py | Python | epab/utils/_av.py | 132nd-etcher/epab | 5226d3a36580f8cc50cf5dcac426adb1350a2c9b | [
"MIT"
] | 2 | 2018-12-13T06:49:10.000Z | 2018-12-13T07:37:49.000Z | epab/utils/_av.py | etcher-be/epab | 5226d3a36580f8cc50cf5dcac426adb1350a2c9b | [
"MIT"
] | 109 | 2018-08-22T04:25:56.000Z | 2019-10-17T05:10:21.000Z | epab/utils/_av.py | etcher-be/epab | 5226d3a36580f8cc50cf5dcac426adb1350a2c9b | [
"MIT"
] | 1 | 2018-02-25T05:53:18.000Z | 2018-02-25T05:53:18.000Z | # coding=utf-8
"""
Convenience methods for AV
"""
import subprocess # nosec
import elib_run
class AV:
"""
Convenience methods for AV
"""
@staticmethod
def _out(level, msg: str, details: str = None):
if level not in ('Information', 'Error'):
raise ValueError(f'unknown level: ... | 23.985075 | 107 | 0.550716 |
38b6c628a5e331e4ba2544f019a9d7fa15201e94 | 2,651 | py | Python | venv/lib/python2.7/site-packages/py2neo/ext/geoff/__main__.py | KairosSystems/drMouse | f98d04084eb1210db88df4c9888eea149ae31b2c | [
"MIT"
] | 9 | 2017-07-15T08:45:22.000Z | 2021-07-06T08:32:03.000Z | venv/lib/python2.7/site-packages/py2neo/ext/geoff/__main__.py | KairosSystems/drMouse | f98d04084eb1210db88df4c9888eea149ae31b2c | [
"MIT"
] | 6 | 2017-05-05T13:11:51.000Z | 2019-01-25T22:46:30.000Z | venv/lib/python2.7/site-packages/py2neo/ext/geoff/__main__.py | KairosSystems/drMouse | f98d04084eb1210db88df4c9888eea149ae31b2c | [
"MIT"
] | 3 | 2018-03-16T14:11:52.000Z | 2020-03-04T02:08:31.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright 2011-2014, Nigel Small
#
# 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
#
# Unle... | 28.202128 | 76 | 0.584308 |
38b6cfbb4a8cab0bf3b7df27ca890b3505be37c1 | 2,661 | py | Python | python/tree/0101_symmetric_tree.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/tree/0101_symmetric_tree.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/tree/0101_symmetric_tree.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 1 | 2019-07-24T02:15:31.000Z | 2019-07-24T02:15:31.000Z | # Definition for a binary tree node.
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def isSymmetric(self, root):
"""
:type root: TreeNode
:rtype: bool
"""
if not root:
re... | 20.789063 | 62 | 0.493799 |
38b6efdf8d261357a9f8f08e63190b82be029081 | 2,774 | py | Python | model/encoderdecoder.py | ab3llini/News2Title | 80b5117d5495890425ddeaddd77ef64624df5855 | [
"MIT"
] | null | null | null | model/encoderdecoder.py | ab3llini/News2Title | 80b5117d5495890425ddeaddd77ef64624df5855 | [
"MIT"
] | null | null | null | model/encoderdecoder.py | ab3llini/News2Title | 80b5117d5495890425ddeaddd77ef64624df5855 | [
"MIT"
] | 1 | 2019-11-04T01:17:40.000Z | 2019-11-04T01:17:40.000Z | from keras.models import Model
from keras.layers import Input, LSTM, Dense, Embedding, TimeDistributed
# ----------------------------------------------------------------------------------------
# ----------------------------------------- MODEL ----------------------------------------
# --------------------------------... | 28.597938 | 90 | 0.601658 |
38b71989410fad9a5697410a8f4ceb5bb54c9a3d | 809 | py | Python | aqua_test/util.py | behara/AquaRepo | cfd4316272c09d0c95621b538c27be608be9a940 | [
"MIT"
] | 25 | 2017-10-23T09:22:06.000Z | 2021-09-15T11:04:51.000Z | aqua_test/util.py | behara/AquaRepo | cfd4316272c09d0c95621b538c27be608be9a940 | [
"MIT"
] | 37 | 2017-10-18T15:40:18.000Z | 2021-12-19T12:59:29.000Z | aqua_test/util.py | behara/AquaRepo | cfd4316272c09d0c95621b538c27be608be9a940 | [
"MIT"
] | 17 | 2017-10-19T08:39:09.000Z | 2021-11-01T09:35:05.000Z | '''
Module for utility functions.
TODO: Remove all fabric dependant util functions.
'''
from fabric.api import run as _run, local as _local, hide
from boss.core.util.colors import green
def host_print(msg, remote=True, leading_chars='\n'):
''' Print a raw message on the host. '''
cmd = 'echo "{0}{1}"'.form... | 22.472222 | 61 | 0.644005 |
38b7258b954d3293d4f4328cf2556bb9668c2a0a | 2,768 | py | Python | data.py | scaomath/kaggle-riiid-test | 6c99deccc33def7e5d0c982b0a9a19612138e893 | [
"MIT"
] | null | null | null | data.py | scaomath/kaggle-riiid-test | 6c99deccc33def7e5d0c982b0a9a19612138e893 | [
"MIT"
] | null | null | null | data.py | scaomath/kaggle-riiid-test | 6c99deccc33def7e5d0c982b0a9a19612138e893 | [
"MIT"
] | null | null | null | import os
import gc
import sys
import pickle
from time import time
import datatable as dt
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
sns.set()
DEFAULT_FIG_WIDTH = 20
sns.set_context("paper", font_scale=1.2)
from sakt import *
HOME = os.path.dirname(os.path.abspath... | 32.952381 | 92 | 0.652095 |
38b747b2751370f8b46a8141c0f92f5a8417346b | 2,247 | py | Python | alien_invasion/ship.py | gp111111/python_again | 4cd81362a2a72fa91886bb9550d45112d1921470 | [
"MIT"
] | null | null | null | alien_invasion/ship.py | gp111111/python_again | 4cd81362a2a72fa91886bb9550d45112d1921470 | [
"MIT"
] | null | null | null | alien_invasion/ship.py | gp111111/python_again | 4cd81362a2a72fa91886bb9550d45112d1921470 | [
"MIT"
] | null | null | null | #from turtle import screensize
import pygame
from pygame.sprite import Sprite
class Ship(Sprite):
"""Manage the ship behaviors"""
def __init__(self,ai_settings,screen):
"""Initialize the ship and the position"""
super().__init__()
self.screen = screen
self.ai_setting... | 37.45 | 76 | 0.635959 |
38b74b0996cd086b52159a2767f854dd842df530 | 4,337 | py | Python | tikz2graphml/Gui.py | ysahil97/tikz-to-yed-graphml | de3cc51675b9d09c68445ac7f40cccd64a28e448 | [
"Apache-2.0"
] | null | null | null | tikz2graphml/Gui.py | ysahil97/tikz-to-yed-graphml | de3cc51675b9d09c68445ac7f40cccd64a28e448 | [
"Apache-2.0"
] | 3 | 2019-05-03T04:46:19.000Z | 2019-05-03T04:47:01.000Z | tikz2graphml/Gui.py | ysahil97/tikz-to-yed-graphml | de3cc51675b9d09c68445ac7f40cccd64a28e448 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import logging
from tikz2graphml.parseTikz import ParseTikz
import tkinter
from tkinter import ttk, StringVar, Label, Entry, LEFT, W, Text, END, messagebox
from tkinter.filedialog import askopenfilename, askdirectory
logger = logging.getLogger()
class Gui:
def __init__(self, window):
... | 47.141304 | 157 | 0.672815 |
38b74cb8812da044f3e33f079047df4960581fb8 | 484,505 | py | Python | nova/tests/compute/test_compute.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/tests/compute/test_compute.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/tests/compute/test_compute.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Piston Cloud Computing, Inc.
# All Rights Reserved.
# Copyright 2013 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | 44.458157 | 79 | 0.600312 |
38b74f7fb9d266cde05d075b8750d0226e48ea27 | 1,383 | py | Python | utils/load_Flame.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | utils/load_Flame.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | utils/load_Flame.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
from tqdm import tqdm
def load_FLAME_csv_params(df):
params = df['params']
print("shape params", np.shape(params))
# process data
# read csv columns that are stored as a string of '[xxx yyy zzz]' and set it to a numpy array
# params_data = [
# [float(... | 31.431818 | 119 | 0.527115 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.