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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1d488ec79fd0fb964b3c10dbc7bb61569fe26ec0 | 1,685 | py | Python | data_type/udint.py | hsocarras/pycip | 288a741e5cf1e9df366ed62437e0b99f6920ef90 | [
"Apache-2.0"
] | null | null | null | data_type/udint.py | hsocarras/pycip | 288a741e5cf1e9df366ed62437e0b99f6920ef90 | [
"Apache-2.0"
] | null | null | null | data_type/udint.py | hsocarras/pycip | 288a741e5cf1e9df366ed62437e0b99f6920ef90 | [
"Apache-2.0"
] | null | null | null | from .base_datatype import BaseDatatype
class UDINT(BaseDatatype):
"""Class to implement UDINT datatype of CIP especification.
Methods
-------
class encode
class decode
classmethod validate_range
classmethod GetIDCode
staticmethod Identify
"""
_id_code = 0xC8
_min_v... | 22.466667 | 79 | 0.531157 |
1d48a944e1222e7537543be12e046aae56d81012 | 17,333 | py | Python | Alexa-Skill/lambda_function.py | revathivijay/VJTI-Navigation | 29d25c6ffa69937b73b75a064017799d6d583459 | [
"MIT"
] | null | null | null | Alexa-Skill/lambda_function.py | revathivijay/VJTI-Navigation | 29d25c6ffa69937b73b75a064017799d6d583459 | [
"MIT"
] | null | null | null | Alexa-Skill/lambda_function.py | revathivijay/VJTI-Navigation | 29d25c6ffa69937b73b75a064017799d6d583459 | [
"MIT"
] | 2 | 2020-09-09T11:20:08.000Z | 2022-02-24T21:20:22.000Z | #------------------------------Part1--------------------------------
# In this part we import necessary graph files and initialize our graph
from src.Graph import Graph,initialize_map, get_image_mapping
from googletrans import Translator
import requests
translator = Translator()
nodes,map_node = initialize_map('src/n... | 44.44359 | 144 | 0.590088 |
1d48ace9f8df1486389cee44a390ab89586826e5 | 3,921 | py | Python | network.py | rromildosf/ga4ann | 0eb17f1fc102507b8fb0c8116f61fefa5cbb3924 | [
"MIT"
] | 1 | 2019-01-09T22:53:45.000Z | 2019-01-09T22:53:45.000Z | network.py | rromildosf/ga4ann | 0eb17f1fc102507b8fb0c8116f61fefa5cbb3924 | [
"MIT"
] | null | null | null | network.py | rromildosf/ga4ann | 0eb17f1fc102507b8fb0c8116f61fefa5cbb3924 | [
"MIT"
] | null | null | null | """Class that represents the network to be evolved."""
import random
import logging
from train import train_and_score
from utils import network_to_json
class Network():
"""Represent a network and let us operate on it.
Currently only works for an MLP.
"""
def __init__(self, nn_param_choices=None):
... | 32.139344 | 93 | 0.541444 |
1d48b8f1cb59cdaeb475eef78dc9de287361dd46 | 193 | py | Python | src/methods/knn_noise_filter.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | 7 | 2020-11-16T16:50:37.000Z | 2021-09-08T16:56:32.000Z | src/methods/knn_noise_filter.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | null | null | null | src/methods/knn_noise_filter.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | 3 | 2020-07-03T04:14:55.000Z | 2021-03-14T21:51:22.000Z | from sklearn.neighbors import KNeighborsClassifier
def knn_filter(x_train, y, x_test, n_neighbors=20):
knc = KNeighborsClassifier()
knc.fit(x_train, y)
return knc.predict(x_test)
| 24.125 | 51 | 0.751295 |
1d48b98341920d689663837f01625c2f2c8567f4 | 11,007 | py | Python | src/qfit/find_altlocs_near_ligand.py | sakibh/qfit-3.0 | fcc9d56b21d2d16ffb2796da0d48003649a31909 | [
"MIT"
] | null | null | null | src/qfit/find_altlocs_near_ligand.py | sakibh/qfit-3.0 | fcc9d56b21d2d16ffb2796da0d48003649a31909 | [
"MIT"
] | null | null | null | src/qfit/find_altlocs_near_ligand.py | sakibh/qfit-3.0 | fcc9d56b21d2d16ffb2796da0d48003649a31909 | [
"MIT"
] | null | null | null | '''
Excited States software: qFit 3.0
Contributors: Saulo H. P. de Oliveira, Gydo van Zundert, and Henry van den Bedem.
Contact: vdbedem@stanford.edu
Copyright (C) 2009-2019 Stanford University
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation f... | 88.056 | 6,071 | 0.496139 |
1d48f6b53432966e5fcbfb3068074e74e51fad78 | 30,492 | py | Python | djangocms_versioning/admin.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | djangocms_versioning/admin.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | djangocms_versioning/admin.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from django.contrib import admin, messages
from django.contrib.admin.options import IncorrectLookupParameters
from django.contrib.admin.utils import flatten_fieldsets, unquote
from django.contrib.admin.views.main import ChangeList
from django.contrib.contenttypes.models import ContentTy... | 37.831266 | 101 | 0.603207 |
1d4922f5344e83da698f271ad30b7bad693ae247 | 13,579 | py | Python | src/AtomicMath/scripts/rebuild_AtomicMath.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | 3 | 2019-11-26T05:33:47.000Z | 2020-05-18T06:49:41.000Z | src/AtomicMath/scripts/rebuild_AtomicMath.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | null | null | null | src/AtomicMath/scripts/rebuild_AtomicMath.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | null | null | null | #!python3
# -*- coding:utf-8 -*-
import os
import sys
import time
import ctypes
import shutil
import subprocess
IsPy3 = sys.version_info[0] >= 3
if IsPy3:
import winreg
else:
import codecs
import _winreg as winreg
BuildType = 'Release'
IsRebuild = True
Build = 'Rebuild'
Update = False
Copy = False
CleanAl... | 38.143258 | 195 | 0.595626 |
1d494ba8c3ba0565a5aac658c89cefa15fc85d6b | 4,430 | py | Python | src/evaluator.py | beeps82/rl-medical-1 | 9c707caf13e8054a49b34115d615d83f0b34ba5c | [
"Apache-2.0"
] | 34 | 2020-10-03T16:21:02.000Z | 2022-03-23T13:47:13.000Z | src/evaluator.py | hadjerbourekouche/rl-medical | 2696e6ab649011ad221275e26b2001bc8f962bd7 | [
"Apache-2.0"
] | 4 | 2020-10-09T10:32:07.000Z | 2021-01-26T19:36:17.000Z | src/evaluator.py | hadjerbourekouche/rl-medical | 2696e6ab649011ad221275e26b2001bc8f962bd7 | [
"Apache-2.0"
] | 15 | 2020-10-25T22:34:06.000Z | 2022-02-20T15:44:08.000Z | import numpy as np
import torch
from itertools import chain
class Evaluator(object):
def __init__(self, environment, model, logger, agents, max_steps):
self.env = environment
self.model = model
self.logger = logger
self.agents = agents
self.max_steps = max_steps
def pl... | 45.670103 | 110 | 0.560045 |
1d496305aa5546a5617c2a9c66448d416b0411ee | 1,480 | py | Python | statsmodels/genmod/families/tests/test_link.py | saedsaleh/statsmodels | 7df5291f04f406f127242736008f72cb4a579262 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/genmod/families/tests/test_link.py | saedsaleh/statsmodels | 7df5291f04f406f127242736008f72cb4a579262 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/genmod/families/tests/test_link.py | saedsaleh/statsmodels | 7df5291f04f406f127242736008f72cb4a579262 | [
"BSD-3-Clause"
] | null | null | null | """
Test functions for genmod.families.links
"""
from statsmodels.compat.python import range
import numpy as np
from numpy.testing import assert_allclose
import statsmodels.genmod.families as families
# Family instances
links = families.links
logit = links.Logit()
inverse_power = links.inverse_power()
sqrt = links.sqr... | 27.924528 | 84 | 0.660135 |
1d4965e5a1da29cb34e25a6384c57bb3a1af563c | 27,855 | py | Python | legal-api/src/legal_api/reports/report.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | 1 | 2019-11-07T20:32:59.000Z | 2019-11-07T20:32:59.000Z | legal-api/src/legal_api/reports/report.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | null | null | null | legal-api/src/legal_api/reports/report.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# 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 agree... | 48.954306 | 153 | 0.631269 |
1d496d1ee97e876935e6a280ffbd862dcd991ab3 | 4,199 | py | Python | setup.py | bitranox/lib_shopware6_api_base | d8298d835482e29119ab45c3816aeb6f26dd0ba3 | [
"MIT"
] | 5 | 2022-01-12T13:24:34.000Z | 2022-02-22T09:37:17.000Z | setup.py | bitranox/lib_shopware6_api_base | d8298d835482e29119ab45c3816aeb6f26dd0ba3 | [
"MIT"
] | 1 | 2022-02-14T21:25:19.000Z | 2022-02-15T13:38:32.000Z | setup.py | bitranox/lib_shopware6_api_base | d8298d835482e29119ab45c3816aeb6f26dd0ba3 | [
"MIT"
] | 1 | 2022-03-31T13:44:08.000Z | 2022-03-31T13:44:08.000Z | #!/usr/bin/env python3
import codecs
import os
import pathlib
from typing import Any, List, Dict
from setuptools import setup # type: ignore
from setuptools import find_packages
def is_travis_deploy() -> bool:
if os.getenv("DEPLOY_SDIST", "") or os.getenv("DEPLOY_WHEEL", ""):
return is_tagged_commit()
... | 35.285714 | 139 | 0.714694 |
1d49791828ad08f88ac69ee07565baee51245bee | 2,539 | py | Python | solutions_by_text/base.py | sijanonly/sbt-python-client | b467d78414e7e01181025cd25456756f46ace237 | [
"MIT"
] | 1 | 2018-10-12T20:20:22.000Z | 2018-10-12T20:20:22.000Z | solutions_by_text/base.py | sijanonly/sbt-python-client | b467d78414e7e01181025cd25456756f46ace237 | [
"MIT"
] | null | null | null | solutions_by_text/base.py | sijanonly/sbt-python-client | b467d78414e7e01181025cd25456756f46ace237 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author: sijanonly
# @Date: 2018-03-15 12:59:25
# @Last Modified time: 2018-07-27 14:26:14
import json
from urllib import parse
import requests
from .handle_exceptions import CustomException
class SolutionByTextHTTPInterface(object):
"""
Base class providing interface for actua... | 23.081818 | 84 | 0.586058 |
1d4980b0abc43ed46c29b124ef0524387cbcfce2 | 4,200 | py | Python | ML/Minor/code/train_model.py | SIgnlngX/Minor-Project | f000e16c67f8ce738af96556c161e9087d7bee0f | [
"MIT"
] | 4 | 2017-10-09T19:00:08.000Z | 2019-02-04T14:05:58.000Z | ML/Minor/code/train_model.py | SIgnlngX/Minor-Project | f000e16c67f8ce738af96556c161e9087d7bee0f | [
"MIT"
] | 6 | 2017-10-07T05:46:59.000Z | 2017-12-17T06:57:43.000Z | ML/Minor/code/train_model.py | SIgnlngX/sign-language-interpreter | f000e16c67f8ce738af96556c161e9087d7bee0f | [
"MIT"
] | 8 | 2017-10-06T11:21:07.000Z | 2021-05-02T18:40:41.000Z | #!/usr/bin/env python
import os
import sys
import csv
import numpy as np
from sklearn import metrics
from sklearn import linear_model
from sklearn import svm
from sklearn.model_selection import train_test_split
from sklearn.externals import joblib
from sklearn.neighbors import KNeighborsClassifier
from common.config... | 32.307692 | 98 | 0.686429 |
1d498e78b566a14f91a958cfce1f1978c77ba59a | 32,045 | py | Python | tests/test_ls.py | jain-aayush1123/here-location-services-python | 11ad5ef8273b4f243c43bc00ebd470f725b980bc | [
"Apache-2.0"
] | 16 | 2021-02-15T13:49:29.000Z | 2022-03-29T10:34:43.000Z | tests/test_ls.py | jain-aayush1123/here-location-services-python | 11ad5ef8273b4f243c43bc00ebd470f725b980bc | [
"Apache-2.0"
] | 8 | 2021-02-27T18:40:46.000Z | 2021-10-03T15:49:27.000Z | tests/test_ls.py | jain-aayush1123/here-location-services-python | 11ad5ef8273b4f243c43bc00ebd470f725b980bc | [
"Apache-2.0"
] | 11 | 2021-02-16T04:58:08.000Z | 2022-02-21T20:51:55.000Z | # Copyright (C) 2019-2021 HERE Europe B.V.
# SPDX-License-Identifier: Apache-2.0
import json
from datetime import datetime, timedelta
import pandas as pd
import pytest
import pytz
from geojson import FeatureCollection, Point
from geojson.geometry import LineString
from here_location_services import LS
from here_loca... | 32.077077 | 98 | 0.610298 |
1d49cd737d9a85b930760e820142f278c723e331 | 432 | py | Python | Florence/QuadratureRules/__init__.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 65 | 2017-08-04T10:21:13.000Z | 2022-02-21T21:45:09.000Z | Florence/QuadratureRules/__init__.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 6 | 2018-06-03T02:29:20.000Z | 2022-01-18T02:30:22.000Z | Florence/QuadratureRules/__init__.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 10 | 2018-05-30T09:44:10.000Z | 2021-05-18T08:06:51.000Z | from .NumericIntegrator import GaussQuadrature, GaussQuadratureLogarithmic, GaussLobattoQuadrature
from .GaussLobattoPoints import GaussLobattoPoints1D, GaussLobattoPointsQuad, GaussLobattoPointsHex
from .QuadratureRule import QuadratureRule
from .FeketePointsTri import FeketePointsTri
from .FeketePointsTet import Feke... | 61.714286 | 99 | 0.902778 |
1d49e353776cf84090c123964697384f4adb17f7 | 4,965 | py | Python | cdkk/cdkkGameTemplate.py | BrianDunneKK/cdkk | 31444b23b64be92d77ba82cbbdbc0b289bf39524 | [
"MIT"
] | null | null | null | cdkk/cdkkGameTemplate.py | BrianDunneKK/cdkk | 31444b23b64be92d77ba82cbbdbc0b289bf39524 | [
"MIT"
] | null | null | null | cdkk/cdkkGameTemplate.py | BrianDunneKK/cdkk | 31444b23b64be92d77ba82cbbdbc0b289bf39524 | [
"MIT"
] | null | null | null | import pygame
import cdkk
import random
app_styles = {
"Ninja": {"fillcolour": "yellow", "shape": "Ellipse", "width": 80, "height": 60}
}
cdkk.stylesheet.add_stylesheet(app_styles)
# --------------------------------------------------
class Sprite_Ninja(cdkk.Sprite_TextBox):
def __init__(self, posx, posy):
... | 30.090909 | 109 | 0.586908 |
1d49fbbe58ed1784052645579718fc2e765b90f1 | 821 | py | Python | doc/ext/cinder_autodoc.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 1 | 2019-01-22T05:37:38.000Z | 2019-01-22T05:37:38.000Z | doc/ext/cinder_autodoc.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-25T13:04:01.000Z | 2019-08-17T13:15:24.000Z | doc/ext/cinder_autodoc.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-17T13:32:50.000Z | 2018-11-08T08:39:39.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... | 30.407407 | 75 | 0.752741 |
1d49fbc489f168655f2ee3b1e064b9872726caf5 | 5,536 | py | Python | aesara/link/numba/dispatch/scan.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | aesara/link/numba/dispatch/scan.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | aesara/link/numba/dispatch/scan.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from numba import types
from numba.extending import overload
from aesara.graph.fg import FunctionGraph
from aesara.link.numba.dispatch import basic as numba_basic
from aesara.link.numba.dispatch.basic import (
create_arg_string,
create_tuple_string,
numba_funcify,
)
from aesara.link.util... | 35.037975 | 96 | 0.67341 |
1d4a2290e9e07b9430e2a0961bdabc7c2f27e38d | 2,244 | py | Python | tests/data/test_running_average_analysis.py | iryzhkov/stock-trading-backend | 7161026b7b4deb78a934b66550c85a27c6b32933 | [
"MIT"
] | 1 | 2021-01-27T18:24:02.000Z | 2021-01-27T18:24:02.000Z | tests/data/test_running_average_analysis.py | iryzhkov/stock-trading-backend | 7161026b7b4deb78a934b66550c85a27c6b32933 | [
"MIT"
] | null | null | null | tests/data/test_running_average_analysis.py | iryzhkov/stock-trading-backend | 7161026b7b4deb78a934b66550c85a27c6b32933 | [
"MIT"
] | null | null | null | """Unit tests for running average analysis.
"""
from datetime import datetime
import unittest
from stock_trading_backend.data import RunningAverageAnalysis, GeneratedStockData
class TestRunningAverageAnalysis(unittest.TestCase):
"""Unit tests for running average analysis.
"""
def test_initializes(self):... | 38.033898 | 85 | 0.670677 |
1d4a2f901baf23f1f920bcd95e1ce052d21dae74 | 2,141 | py | Python | docs/source/conf.py | autocorr/faust_line_imaging | 4ab62ef389a00628a3538d2dbd351024fe835c77 | [
"MIT"
] | 1 | 2021-05-25T13:45:48.000Z | 2021-05-25T13:45:48.000Z | docs/source/conf.py | autocorr/faust_line_imaging | 4ab62ef389a00628a3538d2dbd351024fe835c77 | [
"MIT"
] | null | null | null | docs/source/conf.py | autocorr/faust_line_imaging | 4ab62ef389a00628a3538d2dbd351024fe835c77 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 35.098361 | 79 | 0.676319 |
1d4a569db536945f29b6b98606129c9d8c8c3559 | 113 | py | Python | smt_switch/tests/__init__.py | makaimann/ezSMT | e4f7ffd1adb35f6a5e8a9c5aabb3143c24ab0aad | [
"BSD-3-Clause"
] | 1 | 2020-06-24T02:12:24.000Z | 2020-06-24T02:12:24.000Z | smt_switch/tests/__init__.py | makaimann/ezSMT | e4f7ffd1adb35f6a5e8a9c5aabb3143c24ab0aad | [
"BSD-3-Clause"
] | null | null | null | smt_switch/tests/__init__.py | makaimann/ezSMT | e4f7ffd1adb35f6a5e8a9c5aabb3143c24ab0aad | [
"BSD-3-Clause"
] | 1 | 2019-10-10T22:21:19.000Z | 2019-10-10T22:21:19.000Z | from smt_switch.src import solvers
all_logic_solvers = {'Z3', 'CVC4'}
bv_solvers = {'Z3', 'CVC4', 'Boolector'}
| 18.833333 | 40 | 0.690265 |
1d4a6fab2b650e1f94addbff53ff02dc8a076d91 | 1,068 | py | Python | ez_trans/logger.py | liuyuns/ezsync | 781b561f4416f64ba34c29b569cd07057fde1eb7 | [
"Apache-2.0"
] | 3 | 2015-12-14T01:38:00.000Z | 2018-10-08T03:54:25.000Z | ez_trans/logger.py | liuyuns/ezsync | 781b561f4416f64ba34c29b569cd07057fde1eb7 | [
"Apache-2.0"
] | null | null | null | ez_trans/logger.py | liuyuns/ezsync | 781b561f4416f64ba34c29b569cd07057fde1eb7 | [
"Apache-2.0"
] | null | null | null | import threading
class logger(object):
"""description of class"""
def log(self, message, level='debug'):
pass
def error(self, message):
pass
def warn(self, message):
pass
def message(self, message):
self.log(message)
pass
class log_prxoy(object):
log... | 23.733333 | 94 | 0.579588 |
1d4a85740ea3fdc1e11e56242099200903406929 | 105 | py | Python | abc/165/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/165/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/165/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | X = int(input())
money = 100
ans = 0
while money < X:
money += money // 100
ans += 1
print(ans)
| 11.666667 | 25 | 0.542857 |
1d4a988a8e5378ecf6fd9ebbe0474bbcddd7f456 | 575 | py | Python | abc/229/D.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/229/D.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/229/D.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
def main():
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
S = ns()
K = ni()
A = [0] * (len(S) + 1)
for i in range(len(S)):
A[i + 1] = A[i] + 1 if S[i] ... | 22.115385 | 60 | 0.495652 |
1d4abff72e883f60ab3b6e2aa4ca650c67b85bae | 14,422 | py | Python | scriptabit/plugins/trello/trello.py | luqiang21/scriptabit | 0d0cf71814e98954850891fa0887bdcffcf7147d | [
"Apache-2.0"
] | 9 | 2016-09-04T07:02:20.000Z | 2021-06-29T07:29:40.000Z | scriptabit/plugins/trello/trello.py | luqiang21/scriptabit | 0d0cf71814e98954850891fa0887bdcffcf7147d | [
"Apache-2.0"
] | 35 | 2016-07-30T01:03:15.000Z | 2022-02-12T20:27:37.000Z | scriptabit/plugins/trello/trello.py | luqiang21/scriptabit | 0d0cf71814e98954850891fa0887bdcffcf7147d | [
"Apache-2.0"
] | 8 | 2016-09-05T12:36:53.000Z | 2020-06-15T18:25:50.000Z | # -*- coding: utf-8 -*-
""" Synchronisation of Trello cards to Habitica To-Dos.
"""
# Ensure backwards compatibility with Python 2
from __future__ import (
absolute_import,
division,
print_function,
unicode_literals)
from builtins import *
import logging
import os
import sys
import json
from configpar... | 33.934118 | 80 | 0.590001 |
1d4ad3938a440b8dad01dbbb83cfbe8e1651dfe2 | 26,968 | py | Python | MedTAG_Dockerized/MedTAG_sket_dock_App/sket/sket/sket.py | MedTAG/medtag-core | f2dae7b38230179d71babede7e4910631d91053f | [
"MIT"
] | 6 | 2021-12-20T12:15:17.000Z | 2022-02-02T15:28:42.000Z | MedTAG_Dockerized/MedTAG_sket_dock_App/sket/sket/sket.py | MedTAG/medtag-core | f2dae7b38230179d71babede7e4910631d91053f | [
"MIT"
] | 1 | 2022-03-07T14:57:44.000Z | 2022-03-11T18:11:55.000Z | MedTAG_Dockerized/MedTAG_sket_dock_App/sket/sket/sket.py | MedTAG/medtag-core | f2dae7b38230179d71babede7e4910631d91053f | [
"MIT"
] | 2 | 2021-05-29T09:44:38.000Z | 2021-12-28T03:53:40.000Z | import os
import uuid
import json
from .rep_proc.report_processing import ReportProc
from .ont_proc.ontology_processing import OntoProc
from .nerd.nerd import NERD
from .rdf_proc.rdf_processing import RDFProc
from .utils import utils
class SKET(object):
def __init__(
self,
use_case, src... | 40.553383 | 162 | 0.608759 |
1d4ae0a762e1bafaa3fa615e1d82ff93891d9dfd | 6,754 | py | Python | notification_builder.py | HardWare68/Trade-Notifier | 500e00111f5614d62dd2d46565104a262dfe00d3 | [
"Apache-2.0"
] | null | null | null | notification_builder.py | HardWare68/Trade-Notifier | 500e00111f5614d62dd2d46565104a262dfe00d3 | [
"Apache-2.0"
] | null | null | null | notification_builder.py | HardWare68/Trade-Notifier | 500e00111f5614d62dd2d46565104a262dfe00d3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Jonathan Carter
# 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 ... | 48.242857 | 188 | 0.610009 |
1d4af7da9dff3d7f26900c0948599d913b58890e | 612 | py | Python | raiden/tests/utils/client.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | null | null | null | raiden/tests/utils/client.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | 12 | 2019-08-09T19:12:17.000Z | 2019-12-05T15:49:29.000Z | raiden/tests/utils/client.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | null | null | null | from eth_utils import to_checksum_address
from raiden.network.rpc.client import JSONRPCClient
from raiden.tests.utils.factories import HOP1
def burn_eth(rpc_client: JSONRPCClient, amount_to_leave: int = 0) -> None:
"""Burns all the ETH on the account of the given raiden service"""
address = to_checksum_addre... | 40.8 | 88 | 0.771242 |
1d4b2d7c18d6308afc0925ef5e0c11e753f5fc0d | 2,261 | py | Python | keystoneclient/tests/v3/test_projects.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | 1 | 2020-12-18T01:07:30.000Z | 2020-12-18T01:07:30.000Z | keystoneclient/tests/v3/test_projects.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | keystoneclient/tests/v3/test_projects.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 35.888889 | 75 | 0.670942 |
1d4b553f755234b284287e85780b9a1e042ec8b8 | 2,138 | py | Python | datawinners/location/migrations/0001_initial.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/location/migrations/0001_initial.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/location/migrations/0001_initial.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'LocationLevel'
db.create_table('location_locationlevel', (
('id', self.gf('dja... | 48.590909 | 119 | 0.600561 |
1d4bbe7d077b7a91d4a9e970ecdfb49e37418b7c | 6,793 | py | Python | luna/gateware/usb/usb2/endpoints/status.py | mithro/luna | 9641dab2e54faf97159f399f2cfaf054f1ca08d3 | [
"BSD-3-Clause"
] | null | null | null | luna/gateware/usb/usb2/endpoints/status.py | mithro/luna | 9641dab2e54faf97159f399f2cfaf054f1ca08d3 | [
"BSD-3-Clause"
] | null | null | null | luna/gateware/usb/usb2/endpoints/status.py | mithro/luna | 9641dab2e54faf97159f399f2cfaf054f1ca08d3 | [
"BSD-3-Clause"
] | null | null | null | #
# This file is part of LUNA.
#
""" Endpoint interfaces for providing status updates to the host.
These are mainly meant for use with interrupt endpoints; and allow a host to e.g.
repeatedly poll a device for status.
"""
from nmigen import Elaboratable, Module, Signal, Array
from ..endpoint import Endpo... | 37.120219 | 113 | 0.591933 |
1d4bddbe3836d8ea87fc6fb23b73d2446a359e6a | 6,306 | py | Python | tests/test_cluster.py | pbuslaev/freud | ed83bdc63ee8fddba78f070ce9ddf2a0021d67b8 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cluster.py | pbuslaev/freud | ed83bdc63ee8fddba78f070ce9ddf2a0021d67b8 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cluster.py | pbuslaev/freud | ed83bdc63ee8fddba78f070ce9ddf2a0021d67b8 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import numpy.testing as npt
import freud
import matplotlib
import unittest
import util
from test_managedarray import TestManagedArray
matplotlib.use('agg')
class TestCluster(unittest.TestCase):
def test_constructor(self):
"""Ensure no arguments are accepted to the constructor."""
... | 33.015707 | 78 | 0.579924 |
1d4be76707542a1c02542e396905c9229acab2b9 | 641 | py | Python | 238.py | gdmanandamohon/leetcode | a691a4e37ee1fdad69c710e3710c5faf8b0a7d76 | [
"MIT"
] | null | null | null | 238.py | gdmanandamohon/leetcode | a691a4e37ee1fdad69c710e3710c5faf8b0a7d76 | [
"MIT"
] | null | null | null | 238.py | gdmanandamohon/leetcode | a691a4e37ee1fdad69c710e3710c5faf8b0a7d76 | [
"MIT"
] | null | null | null | '''
@author: l4zyc0d3r
People who are happy makes other happy. I am gonna finish it slowly but definitely.cdt
'''
class Solution:
def productExceptSelf(self, N: List[int]) -> List[int]:
lft = []
rht = []
rht_prd = 1
lft_prd = 1
for i in range(len(N)):
lft_prd *=... | 26.708333 | 86 | 0.49298 |
1d4c53da070b1f2da2d63a4e6b1faeefe2b1af93 | 15,038 | py | Python | grader_e2e/tests/test_grader_success.py | HackSoftware/HackGraderTests | 7bddb1a3c44a1a92c7ac387da7d43dcbc3d4befd | [
"MIT"
] | null | null | null | grader_e2e/tests/test_grader_success.py | HackSoftware/HackGraderTests | 7bddb1a3c44a1a92c7ac387da7d43dcbc3d4befd | [
"MIT"
] | 2 | 2020-06-05T17:54:26.000Z | 2021-06-01T22:17:14.000Z | grader_e2e/tests/test_grader_success.py | HackSoftware/HackGraderTests | 7bddb1a3c44a1a92c7ac387da7d43dcbc3d4befd | [
"MIT"
] | null | null | null | import requests
import json
from datetime import datetime
from unittest import TestCase
from settings.base import GRADE_URL, BASE_DIR, THRESHOLD
from ..helper_tests import prepare_and_get, prepare_and_post, poll
from ..helpers import read_binary_file, output_checking_test_binary, elapsed_time
class HackTesterValidS... | 38.558974 | 109 | 0.623421 |
1d4ca44f482156b361aa82a96a90fb5fe008c755 | 7,398 | py | Python | descriptor/utils/data.py | pskrunner14/descriptor | 05b4efa8794d0dc21b8486a549bfa7f982a08d70 | [
"MIT"
] | null | null | null | descriptor/utils/data.py | pskrunner14/descriptor | 05b4efa8794d0dc21b8486a549bfa7f982a08d70 | [
"MIT"
] | null | null | null | descriptor/utils/data.py | pskrunner14/descriptor | 05b4efa8794d0dc21b8486a549bfa7f982a08d70 | [
"MIT"
] | null | null | null | """ Data Utility Module for Image Captioning CRNN model. """
import os
import json
import collections
import multiprocessing as mp
import numpy as np
import cv2
from tqdm import tqdm
import torch
import torchvision as vision
import torchtext as text
from descriptor.models.cnn_encoder import get_cnn_encoder, encode
... | 34.570093 | 106 | 0.630846 |
1d4ca817db21ff9742ccf0ee897f2a1d64f40f6f | 7,015 | py | Python | src/test/tests/queries/xrayimage.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/queries/xrayimage.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/queries/xrayimage.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: xrayimage.py
# Tests: queries - xray imagel
#
# Programmer: Eric Brugger
# Date: July 13, 2010
#
# Modifications:
# Kathleen Bonnell, Thu Jul 14 10:44:55 PDT 2011
# Change most of... | 26.078067 | 305 | 0.681112 |
1d4cab9827ba1c6901a49b9bb0c9fd58a272d641 | 33,637 | py | Python | crosshair/core_test.py | Rik-de-Kort/CrossHair | e0a06969d571aebcc582359afdedf25f38630c0d | [
"MIT"
] | null | null | null | crosshair/core_test.py | Rik-de-Kort/CrossHair | e0a06969d571aebcc582359afdedf25f38630c0d | [
"MIT"
] | null | null | null | crosshair/core_test.py | Rik-de-Kort/CrossHair | e0a06969d571aebcc582359afdedf25f38630c0d | [
"MIT"
] | null | null | null | import collections
import copy
import dataclasses
import inspect
import re
import sys
import unittest
from typing import *
import pytest # type: ignore
from crosshair.core import get_constructor_signature
from crosshair.core import is_deeply_immutable
from crosshair.core import proxy_for_type
from crosshair.core imp... | 29.249565 | 105 | 0.560365 |
1d4cb09c015142fd1ad68bd5906cfc2b02811cd7 | 891 | py | Python | atom/proton/python/test/test_portfolio_construction_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 11 | 2019-04-16T02:11:17.000Z | 2021-12-16T22:51:40.000Z | atom/proton/python/test/test_portfolio_construction_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 81 | 2019-11-19T23:24:28.000Z | 2022-03-28T11:35:47.000Z | atom/proton/python/test/test_portfolio_construction_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 11 | 2020-07-08T02:29:56.000Z | 2022-03-28T10:05:33.000Z | # coding: utf-8
"""
Hydrogen Proton API
Financial engineering module of Hydrogen Atom # noqa: E501
OpenAPI spec version: 1.9.2
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import... | 21.214286 | 101 | 0.705948 |
1d4ccede569511a884016edb7c78d4f325370101 | 10,973 | py | Python | species/util/phot_util.py | vandalt/species | 527dd900a60c4d691bd490569cd3b2007f9beead | [
"MIT"
] | null | null | null | species/util/phot_util.py | vandalt/species | 527dd900a60c4d691bd490569cd3b2007f9beead | [
"MIT"
] | null | null | null | species/util/phot_util.py | vandalt/species | 527dd900a60c4d691bd490569cd3b2007f9beead | [
"MIT"
] | null | null | null | """
Utility functions for photometry.
"""
import math
import warnings
from typing import Dict, List, Optional, Tuple, Union
import numpy as np
import spectres
from typeguard import typechecked
from species.analysis import photometry
from species.core import box
from species.read import read_calibration, read_filte... | 36.45515 | 99 | 0.557186 |
1d4ce1bf5e2973f8ba03493dac0fcf81623d7b67 | 853 | py | Python | docker/third-party/nnUNet/nnunet/training/network_training/nnUNetTrainerV2VanillaSGD_DRO_IS.py | LucasFidon/trustworthy-ai-fetal-brain-segmentation | 84959da54d8c2fb156da2b06cca30fa31a1c926d | [
"BSD-3-Clause"
] | null | null | null | docker/third-party/nnUNet/nnunet/training/network_training/nnUNetTrainerV2VanillaSGD_DRO_IS.py | LucasFidon/trustworthy-ai-fetal-brain-segmentation | 84959da54d8c2fb156da2b06cca30fa31a1c926d | [
"BSD-3-Clause"
] | null | null | null | docker/third-party/nnUNet/nnunet/training/network_training/nnUNetTrainerV2VanillaSGD_DRO_IS.py | LucasFidon/trustworthy-ai-fetal-brain-segmentation | 84959da54d8c2fb156da2b06cca30fa31a1c926d | [
"BSD-3-Clause"
] | null | null | null | from nnunet.training.network_training.nnUNetTrainerV2VanillaSGD_DRO import nnUNetTrainerV2VanillaSGD_DRO
from nnunet.training.network_training.nnUNetTrainerV2_DRO import CLIP_IMPORTANCE_WEIGHTS
class nnUNetTrainerV2VanillaSGD_DRO_IS(nnUNetTrainerV2VanillaSGD_DRO):
def __init__(self, plans_file, fold, output_folde... | 56.866667 | 104 | 0.744431 |
1d4cf2d58d90176303adc3d208ce252f1660b997 | 3,053 | py | Python | wasmtime/loader.py | tkat0/wasmtime-py | eee99afc9665282308d569edf70a570034770d7d | [
"Apache-2.0"
] | null | null | null | wasmtime/loader.py | tkat0/wasmtime-py | eee99afc9665282308d569edf70a570034770d7d | [
"Apache-2.0"
] | null | null | null | wasmtime/loader.py | tkat0/wasmtime-py | eee99afc9665282308d569edf70a570034770d7d | [
"Apache-2.0"
] | null | null | null | """
This module is a custom loader for Python which enables importing wasm files
directly into Python programs simply through usage of the `import` statement.
You can import this module with `import wasmtime.loader` and then afterwards you
can `import your_wasm_file` which will automatically compile and instantiate
`y... | 37.231707 | 127 | 0.663282 |
1d4cf89e8f7c177fee45b3f399eeab312847d665 | 2,664 | py | Python | airsenal/scripts/fill_player_table.py | tallamjr/AIrsenal | 48f223407d806a9a374a406d6fe1289e5a36e48f | [
"MIT"
] | null | null | null | airsenal/scripts/fill_player_table.py | tallamjr/AIrsenal | 48f223407d806a9a374a406d6fe1289e5a36e48f | [
"MIT"
] | null | null | null | airsenal/scripts/fill_player_table.py | tallamjr/AIrsenal | 48f223407d806a9a374a406d6fe1289e5a36e48f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Fill the "Player" table with info from this and past seasonss FPL
"""
import os
import json
from airsenal.framework.schema import Player, session_scope, session
from airsenal.framework.data_fetcher import FPLDataFetcher
from airsenal.framework.utils import CURRENT_SEASON, get_past_seasons
... | 27.183673 | 69 | 0.600976 |
1d4d0985805d9369827ec3e600025dbd6264ee11 | 582 | py | Python | examples/hingeLossPlot.py | Duane321/pyprobml | 6d0ba29f22dc7fec9dfc73788bc5520e97663bdb | [
"MIT"
] | null | null | null | examples/hingeLossPlot.py | Duane321/pyprobml | 6d0ba29f22dc7fec9dfc73788bc5520e97663bdb | [
"MIT"
] | null | null | null | examples/hingeLossPlot.py | Duane321/pyprobml | 6d0ba29f22dc7fec9dfc73788bc5520e97663bdb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Plots 0-1, hinge and log loss.
import matplotlib.pyplot as pl
import numpy as np
from utils.util import save_fig
zeroOne = np.vectorize(lambda x: 1 * (x <= 0))
hinge = np.vectorize(lambda x: max(0, 1-x))
logLoss = np.vectorize(lambda x: np.log2(1 + np.exp(-x)))
funs = [zeroOne, hinge, logLo... | 23.28 | 58 | 0.634021 |
1d4d604d9d4ab2b53c07e88f48e1e43928ac9faf | 994 | py | Python | sharkdata_core/datasets/dataset_base.py | markusSMHI/sharkdata_py3 | 129a250e1729cfef10994f0778d1243a05f9cf8a | [
"MIT"
] | null | null | null | sharkdata_core/datasets/dataset_base.py | markusSMHI/sharkdata_py3 | 129a250e1729cfef10994f0778d1243a05f9cf8a | [
"MIT"
] | null | null | null | sharkdata_core/datasets/dataset_base.py | markusSMHI/sharkdata_py3 | 129a250e1729cfef10994f0778d1243a05f9cf8a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Copyright (c) 2013-present SMHI, Swedish Meteorological and Hydrological Institute
# License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
import sharkdata_core
class DatasetBase(object):
def __init__(self):
""" Base class... | 28.4 | 86 | 0.583501 |
1d4dba9d889a552ab952cad85009f2679d6e06a5 | 338 | py | Python | test/__init__.py | knarflin/CrypTen | 6a06dc8cd52200f40a9fc520be0066bd0dea6b14 | [
"MIT"
] | 1 | 2019-12-06T06:08:40.000Z | 2019-12-06T06:08:40.000Z | test/__init__.py | knarflin/CrypTen | 6a06dc8cd52200f40a9fc520be0066bd0dea6b14 | [
"MIT"
] | 10 | 2021-02-03T16:45:53.000Z | 2021-04-07T16:24:17.000Z | test/__init__.py | knarflin/CrypTen | 6a06dc8cd52200f40a9fc520be0066bd0dea6b14 | [
"MIT"
] | 1 | 2021-02-10T06:15:02.000Z | 2021-02-10T06:15:02.000Z | #!/usr/bin/env python3
# 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.
from .multiprocess_test_case import MultiProcessTestCase
# expose classes and functions in package:
__all__ = ["Multi... | 28.166667 | 65 | 0.778107 |
1d4dc85d592f0a13f8743a1e52554fb5f25c8720 | 8,052 | py | Python | wide_deep/dnn_linear_combined.py | krthaker1224/models | 71a325d50868f86129f313b5c6e85f4c8f9fbfe2 | [
"Apache-2.0"
] | null | null | null | wide_deep/dnn_linear_combined.py | krthaker1224/models | 71a325d50868f86129f313b5c6e85f4c8f9fbfe2 | [
"Apache-2.0"
] | null | null | null | wide_deep/dnn_linear_combined.py | krthaker1224/models | 71a325d50868f86129f313b5c6e85f4c8f9fbfe2 | [
"Apache-2.0"
] | null | null | null | # # 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 r... | 39.470588 | 144 | 0.737581 |
1d4dd5d421ead25165c508ef3d8cab30c04501c6 | 1,192 | py | Python | lift/Generator/Constants.py | wolongyuan/lift-js | 95b2012a3993e787f07d0ace3acafbd855bc7c45 | [
"MIT"
] | null | null | null | lift/Generator/Constants.py | wolongyuan/lift-js | 95b2012a3993e787f07d0ace3acafbd855bc7c45 | [
"MIT"
] | null | null | null | lift/Generator/Constants.py | wolongyuan/lift-js | 95b2012a3993e787f07d0ace3acafbd855bc7c45 | [
"MIT"
] | null | null | null | import Util
import math
import pprint
import bitstring
string_pool = {}
integer_pool = {}
start_address = 0x10000000 # the start_address of data section
def string(str):
if str in string_pool:
return string_pool[str]
else:
label = 'str_' + Util.rand_bytes()
string_pool[str] = label
... | 24.833333 | 86 | 0.567114 |
1d4df3749eaacdc36d3f84e92dbb183fd99e7277 | 23,652 | py | Python | vx/vxt.py | 9001/diodes | a402f6926dbabeef0bf53ba380c203b16bd1455a | [
"MIT"
] | 2 | 2020-05-27T17:28:00.000Z | 2020-09-21T18:49:33.000Z | vx/vxt.py | 9001/diodes | a402f6926dbabeef0bf53ba380c203b16bd1455a | [
"MIT"
] | null | null | null | vx/vxt.py | 9001/diodes | a402f6926dbabeef0bf53ba380c203b16bd1455a | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# coding: utf-8
from __future__ import print_function, unicode_literals
"""vxt.py: transfer files encoded as dotmatrix patterns"""
__author__ = "ed <vx@ocv.me>"
__copyright__ = 2020
__license__ = "MIT"
__url__ = "https://github.com/9001/diodes/"
import re
import os
import sys
import stat
import... | 31.705094 | 299 | 0.51391 |
1d4dfc5164b328a1ab4b11fa3a127501ae0f1b33 | 4,971 | py | Python | google-datacatalog-kafka-connector/tests/google/datacatalog_connectors/kafka/scrape/avro_schema_parser_test.py | bonifacyj/datacatalog-connectors-message-brokers | 0f72c800ebf1e570b638a0ad930d48e9dc44a25e | [
"Apache-2.0"
] | 1 | 2021-04-30T22:52:41.000Z | 2021-04-30T22:52:41.000Z | google-datacatalog-kafka-connector/tests/google/datacatalog_connectors/kafka/scrape/avro_schema_parser_test.py | bonifacyj/datacatalog-connectors-message-brokers | 0f72c800ebf1e570b638a0ad930d48e9dc44a25e | [
"Apache-2.0"
] | 2 | 2020-10-01T14:24:12.000Z | 2020-11-12T16:40:01.000Z | google-datacatalog-kafka-connector/tests/google/datacatalog_connectors/kafka/scrape/avro_schema_parser_test.py | bonifacyj/datacatalog-connectors-message-brokers | 0f72c800ebf1e570b638a0ad930d48e9dc44a25e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 33.14 | 74 | 0.529672 |
1d4e38d12cc24dd1a7ec2264d6ae89fcbb0fc777 | 4,358 | py | Python | aiida_siesta/examples/plugins/siesta/example_scf_fail.py | albgar/legacy_aiida_plugin | a375d357c88b30209bee9b341064f84a8ef244d6 | [
"MIT"
] | null | null | null | aiida_siesta/examples/plugins/siesta/example_scf_fail.py | albgar/legacy_aiida_plugin | a375d357c88b30209bee9b341064f84a8ef244d6 | [
"MIT"
] | null | null | null | aiida_siesta/examples/plugins/siesta/example_scf_fail.py | albgar/legacy_aiida_plugin | a375d357c88b30209bee9b341064f84a8ef244d6 | [
"MIT"
] | null | null | null | #!/usr/bin/env runaiida
# This is an example of a calculation that will end in a FINISHED
# state but with a non-zero exit code, due to lack of scf convergence
# in the allotted number of iterations.
import sys
import os.path as op
from aiida.engine import submit
from aiida.orm import load_code
from aiida_siesta.calc... | 25.337209 | 79 | 0.561955 |
1d4e70c4df6708c9d9313a15a9a37bf537d6a19d | 4,218 | py | Python | pycoind/util/key.py | TemplarJQ/pycoindAnnotationVersion | d33b4c455c4654e0fde35500d230437210d5325e | [
"MIT"
] | null | null | null | pycoind/util/key.py | TemplarJQ/pycoindAnnotationVersion | d33b4c455c4654e0fde35500d230437210d5325e | [
"MIT"
] | null | null | null | pycoind/util/key.py | TemplarJQ/pycoindAnnotationVersion | d33b4c455c4654e0fde35500d230437210d5325e | [
"MIT"
] | null | null | null | # The MIT License (MIT)
#
# Copyright (c) 2014 Richard Moore
#
# 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, mod... | 36.678261 | 82 | 0.712423 |
1d4e7eefb9fe1c1079fb0a660c8042977ecb32d5 | 305 | py | Python | master/tutorials/30-days-of-code/30-running-time-and-complexity/solution.py | bitnot/hackerrank-solutions | cb54af3e80f9aa188a7aadf357c5d9bcc0715249 | [
"MIT"
] | null | null | null | master/tutorials/30-days-of-code/30-running-time-and-complexity/solution.py | bitnot/hackerrank-solutions | cb54af3e80f9aa188a7aadf357c5d9bcc0715249 | [
"MIT"
] | null | null | null | master/tutorials/30-days-of-code/30-running-time-and-complexity/solution.py | bitnot/hackerrank-solutions | cb54af3e80f9aa188a7aadf357c5d9bcc0715249 | [
"MIT"
] | null | null | null | from math import sqrt
def is_prime(n):
if n < 2:
return False
for i in range(2, int(sqrt(n))):
if n % i == 0:
return False
return True
t = int(input().strip())
for t0 in range(t):
n = int(input().strip())
print("Prime" if is_prime(n) else "Not prime") | 21.785714 | 50 | 0.540984 |
1d4e9f3f869b9d1486fb91c78a6e9415d5d9514c | 3,377 | py | Python | contacts/contacts.py | brandonrobertz/foiamail | b3454e6117dce2d3c070af87b43ced85f4438690 | [
"MIT"
] | null | null | null | contacts/contacts.py | brandonrobertz/foiamail | b3454e6117dce2d3c070af87b43ced85f4438690 | [
"MIT"
] | null | null | null | contacts/contacts.py | brandonrobertz/foiamail | b3454e6117dce2d3c070af87b43ced85f4438690 | [
"MIT"
] | null | null | null | """
this module
- loads contacts
- returns contacts by agency:
{agency:[contacts]}
which produces an agency list
"""
from __future__ import print_function
import csv
from auth import auth
import gdata.data
import gdata.contacts.data
from time import sleep
from log import log
from msg.utils import user_input, err... | 27.680328 | 77 | 0.657684 |
1d4eaae28da170915cdcfc5269377c41f1878239 | 8,181 | py | Python | docusign_rooms/models/room_user.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | 2 | 2020-11-11T01:38:45.000Z | 2021-11-14T17:00:43.000Z | docusign_rooms/models/room_user.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | null | null | null | docusign_rooms/models/room_user.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | 1 | 2021-11-14T17:00:32.000Z | 2021-11-14T17:00:32.000Z | # coding: utf-8
"""
DocuSign Rooms API - v2
An API for an integrator to access the features of DocuSign Rooms # noqa: E501
OpenAPI spec version: v2
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import... | 27.45302 | 99 | 0.583303 |
1d4eaeb1d88f741644ca8f9253ed73afc7091d49 | 221 | py | Python | Seeder/contracts/apps.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 8 | 2017-08-16T19:18:57.000Z | 2022-01-24T10:08:19.000Z | Seeder/contracts/apps.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 242 | 2017-02-03T19:15:52.000Z | 2022-03-25T08:02:52.000Z | Seeder/contracts/apps.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 2 | 2019-03-06T12:36:29.000Z | 2019-07-08T12:52:20.000Z | from django.apps import AppConfig
class ContractConfig(AppConfig):
name = 'contracts'
verbose_name = "Contracts"
def ready(self):
# pylint: disable=W0611,W0612
from . import signals # noqa | 22.1 | 38 | 0.665158 |
1d4eb99ae039a675f5d12e618b670f58a5478723 | 6,388 | py | Python | usgs/api.py | wperkins/usgs | 2a9270a64f1d794af56ebb511d0d86c3ed3f8991 | [
"0BSD"
] | 67 | 2016-11-11T06:09:20.000Z | 2022-03-08T10:56:35.000Z | usgs/api.py | wperkins/usgs | 2a9270a64f1d794af56ebb511d0d86c3ed3f8991 | [
"0BSD"
] | 28 | 2017-03-06T02:33:02.000Z | 2022-03-08T22:46:15.000Z | usgs/api.py | wperkins/usgs | 2a9270a64f1d794af56ebb511d0d86c3ed3f8991 | [
"0BSD"
] | 32 | 2017-03-22T02:04:37.000Z | 2022-03-31T04:09:15.000Z |
import os
import json
from datetime import datetime
from urllib3.util.retry import Retry
import requests
from requests.adapters import HTTPAdapter
from requests_futures.sessions import FuturesSession
from usgs import USGS_API, USGSError, __version__
from usgs import payloads
TMPFILE = os.path.join(os.path.expandus... | 27.773913 | 111 | 0.676111 |
1d4ecdf8b6b755a86c9a14142e6666de57916531 | 3,395 | py | Python | code/processing/seq/20191108_RNA_DNA_seq/barcode_extraction.py | RPGroup-PBoC/rnaseq_barcode | f90bdd7388d08b8dd1eeaaaedd75040580af5f10 | [
"MIT"
] | null | null | null | code/processing/seq/20191108_RNA_DNA_seq/barcode_extraction.py | RPGroup-PBoC/rnaseq_barcode | f90bdd7388d08b8dd1eeaaaedd75040580af5f10 | [
"MIT"
] | 1 | 2020-11-02T19:07:52.000Z | 2020-11-02T19:07:52.000Z | code/processing/seq/20191108_RNA_DNA_seq/barcode_extraction.py | RPGroup-PBoC/rnaseq_barcode | f90bdd7388d08b8dd1eeaaaedd75040580af5f10 | [
"MIT"
] | null | null | null | #%%
import os
import glob
import itertools
import re
import regex
import numpy as np
import pandas as pd
import skbio
import collections
import git
#%%
# Import this project's library
import rnaseq_barcode as rnaseq
# Find home directory for repo
repo = git.Repo("./", search_parent_directories=True)
homedir = repo.w... | 30.044248 | 76 | 0.656848 |
1d4edd54e65274dea24650d0b1161bb78a8ad40d | 28,152 | py | Python | mountaintools/cairio/cairioclient.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | mountaintools/cairio/cairioclient.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | mountaintools/cairio/cairioclient.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | import json
import urllib.request as request
import hashlib
import os
import pathlib
import random
import base64
import tempfile
from datetime import datetime as dt
from .sha1cache import Sha1Cache
from .cairioremoteclient import CairioRemoteClient
import time
from getpass import getpass
class CairioClient():
def... | 37.737265 | 222 | 0.587774 |
1d4ee751b97600e9386d8a92d30f839020cc6a54 | 8,680 | py | Python | adaptive/tests/test_cquad.py | caenrigen/adaptive | c8895ed24883a8985823897e3e3b3686ae20c3e5 | [
"BSD-3-Clause"
] | null | null | null | adaptive/tests/test_cquad.py | caenrigen/adaptive | c8895ed24883a8985823897e3e3b3686ae20c3e5 | [
"BSD-3-Clause"
] | null | null | null | adaptive/tests/test_cquad.py | caenrigen/adaptive | c8895ed24883a8985823897e3e3b3686ae20c3e5 | [
"BSD-3-Clause"
] | null | null | null | from functools import partial
from operator import attrgetter
import numpy as np
import pytest
from adaptive.learner import IntegratorLearner
from adaptive.learner.integrator_coeffs import ns
from adaptive.learner.integrator_learner import DivergentIntegralError
from .algorithm_4 import DivergentIntegralError as A4D... | 32.754717 | 90 | 0.632373 |
1d4ef38a61442fa653c48610b126859c382eed31 | 113 | py | Python | pythonapi/restapi/admin.py | lavaraja/python-api | 071d31980508fbc18c6b6efed8e599bdfcfb969a | [
"BSD-3-Clause"
] | null | null | null | pythonapi/restapi/admin.py | lavaraja/python-api | 071d31980508fbc18c6b6efed8e599bdfcfb969a | [
"BSD-3-Clause"
] | 8 | 2019-12-04T23:34:21.000Z | 2021-06-10T18:21:40.000Z | pythonapi/restapi/admin.py | lavaraja/python-api | 071d31980508fbc18c6b6efed8e599bdfcfb969a | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from .models import book
admin.site.register(book)
# Register your models here.
| 22.6 | 32 | 0.80531 |
1d4f47bea40c5727000a427a38fdf02595344a24 | 66,284 | py | Python | lingvo/core/recurrent.py | tom-doerr/lingvo | 2441edc7fee78903502ebd528ab4dc309db0001d | [
"Apache-2.0"
] | 4 | 2019-06-08T00:19:06.000Z | 2020-08-03T16:28:53.000Z | lingvo/core/recurrent.py | tom-doerr/lingvo | 2441edc7fee78903502ebd528ab4dc309db0001d | [
"Apache-2.0"
] | null | null | null | lingvo/core/recurrent.py | tom-doerr/lingvo | 2441edc7fee78903502ebd528ab4dc309db0001d | [
"Apache-2.0"
] | 5 | 2018-12-11T08:05:16.000Z | 2020-05-30T03:40:13.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.343099 | 117 | 0.658243 |
1d4f55deecf3d58c01165ffb70a37fd3d9d752cf | 13,701 | py | Python | features/resnet.py | daniellevy/fast-dro | dc75246ed5df5c40a54990916ec351ec2b9e0d86 | [
"MIT"
] | 31 | 2020-10-13T03:18:37.000Z | 2022-03-31T15:54:47.000Z | features/resnet.py | daniellevy/fast-dro | dc75246ed5df5c40a54990916ec351ec2b9e0d86 | [
"MIT"
] | 1 | 2020-12-02T19:31:13.000Z | 2020-12-02T19:52:17.000Z | features/resnet.py | daniellevy/fast-dro | dc75246ed5df5c40a54990916ec351ec2b9e0d86 | [
"MIT"
] | 3 | 2020-10-13T23:31:22.000Z | 2021-12-14T22:31:25.000Z | """
Implements various ResNet models as well as the possibility to load the
pre-trained versions
"""
import torch
import torch.nn as nn
from torchvision.models.utils import load_state_dict_from_url
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152', 'resnext50_32x4d', 'resn... | 39.25788 | 107 | 0.633092 |
1d4fa5d402f60a713115b41b61be9f424869194d | 7,709 | py | Python | google/cloud/compute_v1/services/region_target_https_proxies/transports/base.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/region_target_https_proxies/transports/base.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/region_target_https_proxies/transports/base.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 36.535545 | 101 | 0.652614 |
1d4fd6f33d58ab7763a2e026be786b3e3878bf07 | 125 | py | Python | maro/__misc__.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | maro/__misc__.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | maro/__misc__.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
__version__ = "0.1.1a0"
__data_version__ = "0.1"
| 15.625 | 38 | 0.72 |
1d4fe1321b82b1c561c514eded30ceb7f9675c37 | 11,095 | py | Python | tensorflow/contrib/nn/python/ops/sampling_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/contrib/nn/python/ops/sampling_ops_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/nn/python/ops/sampling_ops_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.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... | 34.349845 | 80 | 0.590807 |
1d4ff7b84155bc2c1b0c5fe563ea909a8c75c9ea | 440 | py | Python | cityhallmonitor/migrations/0003_matterattachment_link_obtained_at.py | NUKnightLab/cityhallmonitor | c016d0822191a741e9fe38a69d9ce7ad53d99986 | [
"MIT"
] | null | null | null | cityhallmonitor/migrations/0003_matterattachment_link_obtained_at.py | NUKnightLab/cityhallmonitor | c016d0822191a741e9fe38a69d9ce7ad53d99986 | [
"MIT"
] | 138 | 2015-10-01T20:38:46.000Z | 2021-06-10T17:47:20.000Z | cityhallmonitor/migrations/0003_matterattachment_link_obtained_at.py | NUKnightLab/cityhallmonitor | c016d0822191a741e9fe38a69d9ce7ad53d99986 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('cityhallmonitor', '0002_matter_attachments_obtained_at'),
]
operations = [
migrations.AddField(
model_name='matt... | 22 | 67 | 0.638636 |
1d50124c800ef3767e3b5f30c12e5c7693d76057 | 13,082 | py | Python | tests/test_astro_func.py | lucilecoutouly/nenupy | 8bfcab9558087f0696080d750293d9b8edc30665 | [
"MIT"
] | 4 | 2018-10-02T16:32:32.000Z | 2022-03-08T10:55:36.000Z | tests/test_astro_func.py | lucilecoutouly/nenupy | 8bfcab9558087f0696080d750293d9b8edc30665 | [
"MIT"
] | 54 | 2018-10-16T14:48:29.000Z | 2022-02-24T11:02:59.000Z | tests/test_astro_func.py | lucilecoutouly/nenupy | 8bfcab9558087f0696080d750293d9b8edc30665 | [
"MIT"
] | 2 | 2020-10-12T14:29:17.000Z | 2021-11-24T13:11:16.000Z | #! /usr/bin/python3
# -*- coding: utf-8 -*-
__author__ = 'Alan Loh'
__copyright__ = 'Copyright 2020, nenupy'
__credits__ = ['Alan Loh']
__maintainer__ = 'Alan'
__email__ = 'alan.loh@obspm.fr'
__status__ = 'Production'
import numpy as np
import astropy.units as u
from astropy.coordinates import (
EarthLocation,
... | 29.266219 | 65 | 0.431891 |
1d50186878c1f932cef779480d98b4513b4325b0 | 577 | py | Python | art/wsgi.py | cjmash/art-backend | fb1dfd69cca9cda1d8714bd7066c3920d1a97312 | [
"MIT"
] | null | null | null | art/wsgi.py | cjmash/art-backend | fb1dfd69cca9cda1d8714bd7066c3920d1a97312 | [
"MIT"
] | null | null | null | art/wsgi.py | cjmash/art-backend | fb1dfd69cca9cda1d8714bd7066c3920d1a97312 | [
"MIT"
] | null | null | null | """
WSGI config for art project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
import dotenv
from django.core.wsgi import get_wsgi_application
from whitenoise.django im... | 23.08 | 78 | 0.783362 |
1d502bb42f1924255f4a213ae1b4ee239ad543a5 | 2,752 | py | Python | test/vanilla/low-level/AcceptanceTests/test_byte.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/low-level/AcceptanceTests/test_byte.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/low-level/AcceptanceTests/test_byte.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""),... | 41.69697 | 109 | 0.703852 |
1d502e64d55153712c115b017a894ba880bb8977 | 21,966 | py | Python | nova/tests/unit/virt/vmwareapi/test_ds_util.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2015-11-30T19:44:00.000Z | 2015-11-30T19:44:00.000Z | nova/tests/unit/virt/vmwareapi/test_ds_util.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 11 | 2017-06-19T01:28:55.000Z | 2017-06-23T02:01:47.000Z | nova/tests/unit/virt/vmwareapi/test_ds_util.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 7 | 2015-01-20T10:30:08.000Z | 2020-02-05T10:29:05.000Z | # Copyright (c) 2014 VMware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 45.197531 | 79 | 0.58281 |
1d504f51f144a9472e7cc1761b8179cf96d41409 | 1,627 | py | Python | scripts/simulation/Progressbar.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | scripts/simulation/Progressbar.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 6 | 2020-02-17T13:44:43.000Z | 2020-06-25T15:35:05.000Z | scripts/simulation/Progressbar.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 29 12:30:14 2015
@author: hoseung
"""
import numpy as np
M_frac = [0.0190095168
,0.0073920634
,0.0257823544
,0.0043527887
,0.026893331
,0.0068899623
,0.0092256156
,0.0182159136
,0.0082356121
,0.0270207381
,0.0292612557
,0.0103692281
,0.0635676811
,0.0209481735
,0.0198399... | 12.710938 | 45 | 0.620774 |
1d509f7dc578c9827b555e96f54a9ad28b27759c | 3,420 | py | Python | common/view/console.py | Mark-Zwaving/weather-model-download-animation | 3687ad2ed4f368230338a3ff8f35d67933fedb93 | [
"MIT"
] | null | null | null | common/view/console.py | Mark-Zwaving/weather-model-download-animation | 3687ad2ed4f368230338a3ff8f35d67933fedb93 | [
"MIT"
] | null | null | null | common/view/console.py | Mark-Zwaving/weather-model-download-animation | 3687ad2ed4f368230338a3ff8f35d67933fedb93 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''Library contains a log function'''
__author__ = 'Mark Zwaving'
__email__ = 'markzwaving@gmail.com'
__copyright__ = 'Copyright (C) Mark Zwaving. All rights reserved.'
__license__ = 'GNU Lesser General Public License (LGPL)'
__version__ = '0.0.7'
__maintainer__ = 'Mark Zw... | 32.884615 | 97 | 0.600877 |
1d50c3023fff5de79f438867c27e9d981bdfdb6c | 5,777 | py | Python | automation/domains.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | automation/domains.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | automation/domains.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | 3 | 2021-09-22T11:06:58.000Z | 2022-01-25T09:29:24.000Z | """
Creates Domain classes for the automation scripts.
The domain classes help navigate between directories in each challenge domain.
To include a new domain, createa a domain dictionary with the following keys:
- name: used for overall domain
- filetype: extension to use on files
- subdomain & relevant url (key, valu... | 46.58871 | 136 | 0.659512 |
1d50c43810e4b8ca5f8e4f16b3367231e7d1f9a1 | 6,424 | py | Python | billingclient/openstack/common/apiclient/fake_client.py | nubeliu/billingclient | f2539e211ca049f3ddc9ce5680932f8f5eff7434 | [
"Apache-2.0"
] | 1 | 2018-01-04T16:20:51.000Z | 2018-01-04T16:20:51.000Z | billingclient/openstack/common/apiclient/fake_client.py | nubeliu/billingclient | f2539e211ca049f3ddc9ce5680932f8f5eff7434 | [
"Apache-2.0"
] | null | null | null | billingclient/openstack/common/apiclient/fake_client.py | nubeliu/billingclient | f2539e211ca049f3ddc9ce5680932f8f5eff7434 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 OpenStack Foundation
# 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 requ... | 33.810526 | 78 | 0.569427 |
1d50d61f8ec486d45000e3087d81be463a2f9871 | 6,892 | py | Python | Cappellari/mge/mge_fit_example.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | Cappellari/mge/mge_fit_example.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 6 | 2020-02-17T13:44:43.000Z | 2020-06-25T15:35:05.000Z | Cappellari/mge/mge_fit_example.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | #!/usr/bin/env python
"""
This example illustrates how to obtain an MGE fit from a galaxy image
using the mge_fit_sectors package and how to verify the results.
V1.0.0: Translated NGC4342 example from the corresponding IDL version.
Michele Cappellari, Aspen Airport, 8 February 2014
V1.0.1: Fix... | 37.053763 | 91 | 0.630006 |
1d50e1488d8bc96e475f82ad685b549352b07930 | 1,419 | py | Python | BlockServerToKafka/test_modules/__init__.py | GustavLero/EPICS-inst_servers | 4bcdd6a80f1d9e074de3f0f7c66968d506981988 | [
"BSD-3-Clause"
] | 1 | 2020-08-20T23:38:53.000Z | 2020-08-20T23:38:53.000Z | BlockServerToKafka/test_modules/__init__.py | GustavLero/EPICS-inst_servers | 4bcdd6a80f1d9e074de3f0f7c66968d506981988 | [
"BSD-3-Clause"
] | 88 | 2015-09-03T11:50:41.000Z | 2021-02-18T19:13:04.000Z | BlockServerToKafka/test_modules/__init__.py | GustavLero/EPICS-inst_servers | 4bcdd6a80f1d9e074de3f0f7c66968d506981988 | [
"BSD-3-Clause"
] | 1 | 2020-08-20T23:38:05.000Z | 2020-08-20T23:38:05.000Z | from __future__ import print_function, absolute_import, division, unicode_literals
# This file is part of the ISIS IBEX application.
# Copyright (C) 2012-2020 Science & Technology Facilities Council.
# All rights reserved.
#
# This program is distributed in the hope that it will be useful.
# This program and the accomp... | 41.735294 | 92 | 0.75969 |
1d510ee9896d873e4c0a7ebb393167eca7a7e742 | 9,155 | py | Python | quart/asgi.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | 1 | 2020-08-09T19:45:14.000Z | 2020-08-09T19:45:14.000Z | quart/asgi.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | null | null | null | quart/asgi.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | null | null | null | import asyncio
import warnings
from functools import partial
from typing import Any, AnyStr, Callable, Dict, List, Optional, Set, Tuple, TYPE_CHECKING
from urllib.parse import urlparse
from .datastructures import CIMultiDict, Headers
from .wrappers import Request, Response, Websocket # noqa: F401
if TYPE_CHECKING:
... | 37.830579 | 98 | 0.563954 |
1d5110749d9c4dbf759343e9bd66c51bd31713d7 | 6,176 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_usages_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_usages_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_usages_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 ... | 40.900662 | 146 | 0.66386 |
1d51149215dd71e9285f89d436af1843bf9986c5 | 2,311 | py | Python | Scripts/calc_forcings_SITc_LENS.py | zmlabe/ThicknessSensitivity | 6defdd897a61d7d1a02f34a9f4ec92b2b17b3075 | [
"MIT"
] | 1 | 2017-10-22T02:22:14.000Z | 2017-10-22T02:22:14.000Z | Scripts/calc_forcings_SITc_LENS.py | zmlabe/ThicknessSensitivity | 6defdd897a61d7d1a02f34a9f4ec92b2b17b3075 | [
"MIT"
] | null | null | null | Scripts/calc_forcings_SITc_LENS.py | zmlabe/ThicknessSensitivity | 6defdd897a61d7d1a02f34a9f4ec92b2b17b3075 | [
"MIT"
] | 4 | 2018-04-05T17:55:36.000Z | 2022-03-31T07:05:01.000Z | """
Create forcing file of constant sea ice thickness at 2 m
Notes
-----
Reference : Kay et al. [2014]
Author : Zachary Labe
Date : 16 August 2017
"""
### Import modules
import numpy as np
from netCDF4 import Dataset
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
import nclcmap... | 28.530864 | 114 | 0.686716 |
1d512ab884e8cb5f1f30675dd7ff31e1eb0feea8 | 5,145 | py | Python | userbot/plugins/stickcreater.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | userbot/plugins/stickcreater.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | userbot/plugins/stickcreater.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | # Random RGB Sticklet by @PhycoNinja13b
# modified by @UniBorg
import io
import os
import random
import textwrap
from PIL import Image, ImageDraw, ImageFont
from telethon.tl.types import InputMessagesFilterDocument
from userbot.utils import lightning_cmd
# RegEx by https://t.me/c/1220993104/500653 ( @SnapDragon741... | 35 | 85 | 0.671526 |
1d5133dd4fffe50b99cbdc3fded7d256ae6190f0 | 6,348 | py | Python | checkmerge/analysis/tests/test_dependence.py | jjkester/checkmerge | 23d1d9982cd7dc333b5748be3415e9b92f6576f4 | [
"Apache-2.0"
] | 1 | 2019-06-16T07:57:15.000Z | 2019-06-16T07:57:15.000Z | checkmerge/analysis/tests/test_dependence.py | jjkester/checkmerge | 23d1d9982cd7dc333b5748be3415e9b92f6576f4 | [
"Apache-2.0"
] | null | null | null | checkmerge/analysis/tests/test_dependence.py | jjkester/checkmerge | 23d1d9982cd7dc333b5748be3415e9b92f6576f4 | [
"Apache-2.0"
] | null | null | null | import unittest
from checkmerge import app
from checkmerge.analysis.dependence import DependenceAnalysis
from checkmerge.ir import Node, Dependency, DependencyType
class DependenceAnalysisTestCase(unittest.TestCase):
def setUp(self):
self.ancestor = Node(typ="FunctionDef", label="calc", children=[
... | 53.79661 | 109 | 0.520951 |
1d5150053de1ba68ed79fb70c7efec76c23ea163 | 2,350 | py | Python | qlearning/teacher.py | ethanabrooks/teacher-RL | 41b44fa4de1e8ce7e0c3eac726919c28ede63538 | [
"MIT"
] | null | null | null | qlearning/teacher.py | ethanabrooks/teacher-RL | 41b44fa4de1e8ce7e0c3eac726919c28ede63538 | [
"MIT"
] | null | null | null | qlearning/teacher.py | ethanabrooks/teacher-RL | 41b44fa4de1e8ce7e0c3eac726919c28ede63538 | [
"MIT"
] | null | null | null | import gym
import numpy as np
from gym.spaces import Box
from qlearning.algorithm import QLearning
class TeacherEnv(gym.Env):
def __init__(
self,
seed: int,
training_iterations: int,
env_id: str,
alpha: float,
gamma: float,
):
super().__init__()
... | 30.519481 | 85 | 0.557447 |
1d517152f85c9d822160c542ce2a6e51aa2660b5 | 3,720 | py | Python | recognition/common/rec_builder.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 12,377 | 2017-12-04T02:46:57.000Z | 2022-03-31T16:48:31.000Z | recognition/common/rec_builder.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 1,851 | 2017-12-05T05:41:23.000Z | 2022-03-30T13:06:22.000Z | recognition/common/rec_builder.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 4,198 | 2017-12-05T02:57:19.000Z | 2022-03-30T10:29:37.000Z | import os
import sys
import mxnet as mx
from mxnet import ndarray as nd
import random
import argparse
import cv2
import time
import sklearn
import numpy as np
class SeqRecBuilder():
def __init__(self, path, image_size=(112, 112)):
self.path = path
self.image_size = image_size
self.last_lab... | 33.818182 | 79 | 0.527957 |
1d517dd8bdc0223e355d54d374a2351f1c7aa407 | 10,583 | py | Python | demos/robot/classifier_robot.py | birfan/openface | 3328af0111700717f1cb60b034b12c6c9c4e0c6c | [
"Apache-2.0"
] | null | null | null | demos/robot/classifier_robot.py | birfan/openface | 3328af0111700717f1cb60b034b12c6c9c4e0c6c | [
"Apache-2.0"
] | null | null | null | demos/robot/classifier_robot.py | birfan/openface | 3328af0111700717f1cb60b034b12c6c9c4e0c6c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
"""
/*******************************************************************************
* Copyright (c) 2016-present, Bahar Irfan. All rights reserved. *
* *
* This file is adapted from the classifier_webca... | 41.996032 | 146 | 0.573089 |
1d518121c40b97ad221311a89dd8bee1f8676439 | 299 | py | Python | cm4/flask_rest_api/app/__init__.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | cm4/flask_rest_api/app/__init__.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | cm4/flask_rest_api/app/__init__.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from flask_pymongo import PyMongo
from cm4.flask_rest_api.rest_config import RestConfig
app = Flask(__name__)
app.config.from_object(RestConfig)
mongo = PyMongo(app)
cloud = mongo.db.cloud
#
# TODO: WHY IS THIS NOT ON THE TOP
#
from cm4.flask_rest_api.app import routes
| 17.588235 | 53 | 0.789298 |
1d51945b4edb53b4e9ae4d2f30a9c20fc4a9dcdd | 27,892 | py | Python | ote_sdk/ote_sdk/test_suite/training_tests_actions.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_sdk/ote_sdk/test_suite/training_tests_actions.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_sdk/ote_sdk/test_suite/training_tests_actions.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
import importlib
import os
from abc import ABC, abstractmethod
from collections import OrderedDict
from copy import deepcopy
from typing import List, Optional, Type
import pytest
from ote_sdk.configuration.helper import create as ote_sdk_... | 36.845443 | 90 | 0.680159 |
1d51dc84c2f9438f05f8702e0011c5b2e2844ff3 | 9,642 | py | Python | src/wavestate/iirrational/v2/algorithms/order_reduce_programs.py | wavestate/wavestate-iirrational | 01d6dba8b2131fa2a099a74f17e6540f30cee606 | [
"Apache-2.0"
] | null | null | null | src/wavestate/iirrational/v2/algorithms/order_reduce_programs.py | wavestate/wavestate-iirrational | 01d6dba8b2131fa2a099a74f17e6540f30cee606 | [
"Apache-2.0"
] | null | null | null | src/wavestate/iirrational/v2/algorithms/order_reduce_programs.py | wavestate/wavestate-iirrational | 01d6dba8b2131fa2a099a74f17e6540f30cee606 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: © 2021 Massachusetts Institute of Technology.
# SPDX-FileCopyrightText: © 2021 Lee McCuller <mcculler@mit.edu>
# NOTICE: authors should document their contributions in concisely in NOTICE
# with details inline ... | 27.548571 | 77 | 0.550093 |
1d51e94a3c1965e8837b4055a5a9b8b8557cfcd8 | 5,502 | py | Python | src_retrieval/data.py | AI-Swasthyam/fixMyPose | 37c668adcd54bca3f259f1bfee07588f77861bc1 | [
"MIT"
] | 7 | 2021-12-14T07:12:00.000Z | 2022-02-25T00:23:44.000Z | src_retrieval/data.py | AI-Swasthyam/fixMyPose | 37c668adcd54bca3f259f1bfee07588f77861bc1 | [
"MIT"
] | 2 | 2021-11-22T15:27:38.000Z | 2021-12-01T13:29:29.000Z | src_retrieval/data.py | hyounghk/FixMyPose | 1b31c7f9e25ade6ee929cbbdc56d50162a8c2218 | [
"MIT"
] | null | null | null | from torch.utils.data import Dataset
import torchvision.transforms as transforms
import h5py
from param import args
from tok import Tokenizer
from utils import BufferLoader
import copy
from PIL import Image
import json
import random
import os
import numpy as np
import torch
DATA_ROOT = "dataset/"
def pil_loader(path)... | 35.044586 | 103 | 0.547074 |
1d51ebb9da021166511a0f88709a12dcccffe100 | 3,274 | py | Python | daeclipse/models/deviation.py | Pepper-Wood/eclipse-api | cabe418d925ad5feb7e4e310fe87219712695043 | [
"MIT"
] | null | null | null | daeclipse/models/deviation.py | Pepper-Wood/eclipse-api | cabe418d925ad5feb7e4e310fe87219712695043 | [
"MIT"
] | 55 | 2021-07-28T03:48:58.000Z | 2022-03-31T07:22:42.000Z | daeclipse/models/deviation.py | Pepper-Wood/eclipse-api | cabe418d925ad5feb7e4e310fe87219712695043 | [
"MIT"
] | null | null | null | """Model to represent DeviantArt Eclipse Deviation."""
from daeclipse.models.deviationmedia import DeviationMedia
from daeclipse.models.gruser import Gruser
from daeclipse.models.model import Model
from daeclipse.models.stats import Stats
class Deviation(Model):
"""Model to represent DeviantArt Eclipse Deviation... | 35.978022 | 67 | 0.635003 |
1d51fb1f1e8ae53f5e802b58a350d5e1080d1440 | 1,934 | py | Python | scene_graph/scripts/plot_loss.py | SAMMiCA/robot_home_service | fa1a49346b38e6f82e7cf0c7f9c09349d956c972 | [
"MIT"
] | null | null | null | scene_graph/scripts/plot_loss.py | SAMMiCA/robot_home_service | fa1a49346b38e6f82e7cf0c7f9c09349d956c972 | [
"MIT"
] | null | null | null | scene_graph/scripts/plot_loss.py | SAMMiCA/robot_home_service | fa1a49346b38e6f82e7cf0c7f9c09349d956c972 | [
"MIT"
] | null | null | null | import re, sys, os
import matplotlib.pyplot as plt
from ..utils.functions import MovingAverage
with open(sys.argv[1], 'r') as f:
inp = f.read()
patterns = {
'train': re.compile(r'\[\s*(?P<epoch>\d+)\]\s*(?P<iteration>\d+) \|\| B: (?P<b>\S+) \| C: (?P<c>\S+) \| M: (?P<m>\S+) \|( S: (?P<s>\S+) \|)? T: (?P<t>\S+)'),
... | 24.481013 | 158 | 0.58273 |
1d520da6a86712fab7fbee70d58e88b495c0b0ad | 3,411 | py | Python | tools/python/dhis2api/refResolver.py | dhis2/dhis2-api-specification | bdef355508ec150be4bf0b4346b8b0d6a8e665b5 | [
"BSD-3-Clause"
] | 5 | 2019-08-30T09:56:27.000Z | 2021-02-22T11:08:34.000Z | tools/python/dhis2api/refResolver.py | dhis2/dhis2-api-specification | bdef355508ec150be4bf0b4346b8b0d6a8e665b5 | [
"BSD-3-Clause"
] | null | null | null | tools/python/dhis2api/refResolver.py | dhis2/dhis2-api-specification | bdef355508ec150be4bf0b4346b8b0d6a8e665b5 | [
"BSD-3-Clause"
] | 6 | 2018-10-12T07:50:11.000Z | 2020-10-18T05:39:49.000Z | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from urllib.parse import urlparse, urljoin
import json
from os.path import isfile
import jsonpath_rw
import requests
c... | 41.597561 | 110 | 0.474348 |
1d520f8df912abf5302efa87ace163cbf6f27b14 | 3,203 | py | Python | test/unit/gen_libs/is_add_cmd.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | test/unit/gen_libs/is_add_cmd.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | test/unit/gen_libs/is_add_cmd.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Classification (U)
"""Program: is_add_cmd.py
Description: Unit testing of is_add_cmd in gen_libs.py.
Usage:
test/unit/gen_libs/is_add_cmd.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
import unittest... | 21.938356 | 77 | 0.583203 |
1d521a504dd791039f44f2a95175bc2a05d203a3 | 1,213 | py | Python | testproject/settings.py | ojii/django-nani | e75b3e91738bcddf94264df832a13ac47e979394 | [
"BSD-3-Clause"
] | 1 | 2015-09-28T10:07:48.000Z | 2015-09-28T10:07:48.000Z | testproject/settings.py | ojii/django-nani | e75b3e91738bcddf94264df832a13ac47e979394 | [
"BSD-3-Clause"
] | null | null | null | testproject/settings.py | ojii/django-nani | e75b3e91738bcddf94264df832a13ac47e979394 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import django
import os
import sys
SITE_ID = 1
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
PYTHON_VERSION = '%s.%s' % sys.version_info[:2]
DJANGO_VERSION = django.get_version()
JUNIT_OUTPUT_DIR = os.path.join(
PROJECT_PATH,
'..',
'junit-dj%s-py%s' % (DJANGO_VERSION,... | 17.838235 | 57 | 0.673537 |
1d52224051b499253ef14dfb54cc30cfe7b35d60 | 14,553 | py | Python | Krapi/PublicApiRequests.py | cavus700/KrankenApi---Krapi | 3f808abf10778f7b8d3d8133af8212cf25088717 | [
"MIT"
] | 1 | 2017-09-02T17:11:07.000Z | 2017-09-02T17:11:07.000Z | Krapi/PublicApiRequests.py | cavus700/KrankenApi---Krapi | 3f808abf10778f7b8d3d8133af8212cf25088717 | [
"MIT"
] | null | null | null | Krapi/PublicApiRequests.py | cavus700/KrankenApi---Krapi | 3f808abf10778f7b8d3d8133af8212cf25088717 | [
"MIT"
] | null | null | null | #MIT License
#Copyright (c) [2017] [Robin Hubbig]
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, pub... | 38.297368 | 157 | 0.626469 |
1d523dda32a32813dc17f6f9fc71019f423bd870 | 5,209 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_virtual_machine_sizes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_virtual_machine_sizes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_virtual_machine_sizes_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 ... | 44.144068 | 135 | 0.66961 |
1d526a411d9f7dba21b4b6e8160875193bab444b | 2,892 | py | Python | bamboos/docker/env_up.py | xorver/oneprovider-ccm | ec30625a3ecb62e22b7ba5e0dd18d53668009bf9 | [
"MIT"
] | null | null | null | bamboos/docker/env_up.py | xorver/oneprovider-ccm | ec30625a3ecb62e22b7ba5e0dd18d53668009bf9 | [
"MIT"
] | null | null | null | bamboos/docker/env_up.py | xorver/oneprovider-ccm | ec30625a3ecb62e22b7ba5e0dd18d53668009bf9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Brings up a DNS server with container (skydns + skydock) that allow
different dockers to see each other by hostnames.
Run the script with -h flag to learn about script's running options.
"""
from __future__ import print_function
import argparse
import json
import os
from environment import a... | 26.777778 | 79 | 0.676003 |
1d526ee6241284b3fdeca29c76d9ef23ece366fd | 282,379 | py | Python | salt/modules/win_lgpo.py | feth/salt | f4e610bb987d9529faca1f0ad1c339d3c4b3642b | [
"Apache-2.0"
] | null | null | null | salt/modules/win_lgpo.py | feth/salt | f4e610bb987d9529faca1f0ad1c339d3c4b3642b | [
"Apache-2.0"
] | 1 | 2019-09-06T13:57:28.000Z | 2019-09-06T13:57:28.000Z | salt/modules/win_lgpo.py | feth/salt | f4e610bb987d9529faca1f0ad1c339d3c4b3642b | [
"Apache-2.0"
] | 1 | 2020-09-30T16:09:48.000Z | 2020-09-30T16:09:48.000Z | # -*- coding: utf-8 -*-
'''
Manage Local Policy on Windows
This module allows configuring local group policy (i.e. ``gpedit.msc``) on a
Windows server.
.. versionadded:: 2016.11.0
Administrative Templates
========================
Administrative template policies are dynamically read from ADMX/ADML files on
the serv... | 53.440386 | 223 | 0.434845 |
1d527b4b6d499267eb2b0179e407f601a8ba73f6 | 42 | py | Python | maps/flooded_valley/__init__.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | maps/flooded_valley/__init__.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | maps/flooded_valley/__init__.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | from .flooded_valley import FloodedValley
| 21 | 41 | 0.880952 |
1d52909862a75ce66558e6957cdb46dc807b2628 | 86 | py | Python | gerapy/spiders/__init__.py | awesome-archive/Gerapy | e9792d020397cd85b4d553b91b7829078b728b98 | [
"MIT"
] | 1 | 2018-12-07T02:05:32.000Z | 2018-12-07T02:05:32.000Z | gerapy/spiders/__init__.py | Tilyp/Gerapy | e9792d020397cd85b4d553b91b7829078b728b98 | [
"MIT"
] | null | null | null | gerapy/spiders/__init__.py | Tilyp/Gerapy | e9792d020397cd85b4d553b91b7829078b728b98 | [
"MIT"
] | null | null | null | from .crawl import CrawlSpider
from .json import JsonSpider
from .spider import Spider | 28.666667 | 30 | 0.837209 |
1d5294cab5391391c93b8376cf419fb4357c47c0 | 3,227 | py | Python | examples/scripts/csc/cbpdn_gry.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 217 | 2016-06-13T16:41:26.000Z | 2022-03-22T06:31:05.000Z | examples/scripts/csc/cbpdn_gry.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 21 | 2016-06-13T23:28:35.000Z | 2022-02-17T23:20:01.000Z | examples/scripts/csc/cbpdn_gry.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 47 | 2016-12-14T13:08:33.000Z | 2021-12-12T01:59:49.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
# with the package.
"""
Single-channel CSC
==================
This example demonstrates solving a convolutional sparse coding problem ... | 25.015504 | 197 | 0.677409 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.