hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
795b8bb32f8e6bed3554493539946f65276bd359 | 18,517 | py | Python | libqtile/backend/base.py | ep12/qtile | 67f97604d9535c35eea459d7261adb4ece0980f8 | [
"MIT"
] | null | null | null | libqtile/backend/base.py | ep12/qtile | 67f97604d9535c35eea459d7261adb4ece0980f8 | [
"MIT"
] | null | null | null | libqtile/backend/base.py | ep12/qtile | 67f97604d9535c35eea459d7261adb4ece0980f8 | [
"MIT"
] | null | null | null | from __future__ import annotations
import contextlib
import enum
import math
import typing
from abc import ABCMeta, abstractmethod
import cairocffi
from libqtile import drawer, pangocffi, utils
from libqtile.command.base import CommandObject
if typing.TYPE_CHECKING:
from typing import Any, Dict, List, Optional,... | 30.306056 | 90 | 0.604688 |
795b8d55bd5f2826e7067585e8e2ab9c10e823c1 | 10,394 | py | Python | src/utils/data_augmentation.py | gourav287/Gender-Emotion-Recognition | d6f19310270fd5d107db333439a0b942c8b41d66 | [
"MIT"
] | 1 | 2021-07-05T09:32:34.000Z | 2021-07-05T09:32:34.000Z | src/utils/data_augmentation.py | gourav287/Gender-Emotion-Recognition | d6f19310270fd5d107db333439a0b942c8b41d66 | [
"MIT"
] | null | null | null | src/utils/data_augmentation.py | gourav287/Gender-Emotion-Recognition | d6f19310270fd5d107db333439a0b942c8b41d66 | [
"MIT"
] | 1 | 2021-05-12T05:12:04.000Z | 2021-05-12T05:12:04.000Z | import numpy as np
from random import shuffle
from .preprocessor import preprocess_input
from .preprocessor import _imread as imread
from .preprocessor import _imresize as imresize
from .preprocessor import to_categorical
import scipy.ndimage as ndi
import cv2
class ImageGenerator(object):
""" Image generator wit... | 43.48954 | 77 | 0.564941 |
795b8da854ab86fa605d82236c70e3dbcf2c0bce | 728 | py | Python | code-challenges-401/tree/test_breadth_first.py | arensdj/data-structures-and-algorithms | 8f965a147b4e02f88dbf9b9b01f805221e0a738a | [
"MIT"
] | null | null | null | code-challenges-401/tree/test_breadth_first.py | arensdj/data-structures-and-algorithms | 8f965a147b4e02f88dbf9b9b01f805221e0a738a | [
"MIT"
] | null | null | null | code-challenges-401/tree/test_breadth_first.py | arensdj/data-structures-and-algorithms | 8f965a147b4e02f88dbf9b9b01f805221e0a738a | [
"MIT"
] | null | null | null | from tree import BinarySearchTree
def test_preorder_traversal():
tree = BinarySearchTree()
tree.add(25)
tree.add(15)
tree.add(35)
tree.add(8)
tree.add(19)
tree.add(30)
tree.add(45)
expected = [25, 15, 8, 19, 35, 30, 45]
result = []
result = tree.get_pre_order_data()
... | 19.675676 | 61 | 0.622253 |
795b8e4ebb50e0343f2a6950b3473624eddc4790 | 3,754 | py | Python | schedule/views.py | yuking11/schedule-cms-server | 9c7bb56aa5251e91e05d4ec49eb4fc70f661ba3e | [
"MIT"
] | null | null | null | schedule/views.py | yuking11/schedule-cms-server | 9c7bb56aa5251e91e05d4ec49eb4fc70f661ba3e | [
"MIT"
] | null | null | null | schedule/views.py | yuking11/schedule-cms-server | 9c7bb56aa5251e91e05d4ec49eb4fc70f661ba3e | [
"MIT"
] | null | null | null | from django.shortcuts import render
from .models import Schedule
from .serializers import ScheduleSerializer
from rest_framework import generics
from rest_framework.views import APIView
from rest_framework.response import Response
from datetime import datetime, date, timedelta
from dateutil.relativedelta import relativ... | 42.179775 | 93 | 0.658764 |
795b8efa3b3f2a8216416847a6168ffe12a0aaad | 5,079 | py | Python | test/test_clocked.py | JesseBuesking/clocked | cc7967031c0d4b5685fbbf636180a694364bcff4 | [
"MIT"
] | 2 | 2015-01-07T06:21:34.000Z | 2016-05-30T03:12:38.000Z | test/test_clocked.py | JesseBuesking/clocked | cc7967031c0d4b5685fbbf636180a694364bcff4 | [
"MIT"
] | null | null | null | test/test_clocked.py | JesseBuesking/clocked | cc7967031c0d4b5685fbbf636180a694364bcff4 | [
"MIT"
] | null | null | null | """ Tests for Clocked. """
from time import sleep
import unittest
# noinspection PyDocstring
from clocked.clockit import Clocked
from clocked.decorators import clocked
class TestClocked(unittest.TestCase):
def _assert(self, mini, val, maxi):
self.assertTrue(
mini <= val <= maxi,
... | 27.454054 | 67 | 0.556803 |
795b9031e39178494c4ea916744b7f8b1cb05a3b | 1,738 | py | Python | extract.py | InvokerLiu/DenseNet-Tensorflow | 8e171eb3f14a46cc68cdebd3d4db92b1376af698 | [
"Apache-2.0"
] | 2 | 2019-05-07T03:34:27.000Z | 2019-05-07T03:37:43.000Z | extract.py | InvokerLiu/DenseNet-Tensorflow | 8e171eb3f14a46cc68cdebd3d4db92b1376af698 | [
"Apache-2.0"
] | null | null | null | extract.py | InvokerLiu/DenseNet-Tensorflow | 8e171eb3f14a46cc68cdebd3d4db92b1376af698 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
# coding=utf-8
# ================================================================
#
# Editor : PyCharm
# File name : extract.py
# Author : LiuBo
# Created date: 2019-05-09 09:52
# Description :
#
# ================================================================... | 42.390244 | 119 | 0.649022 |
795b9092659ad7fbba35b21bf555895e1b375519 | 14,208 | py | Python | .venv/lib/python3.8/site-packages/findatapy/util/configmanager.py | eo1989/VectorBTanalysis | bea3deaf2ee3fc114b308146f2af3e4f35f70197 | [
"MIT"
] | null | null | null | .venv/lib/python3.8/site-packages/findatapy/util/configmanager.py | eo1989/VectorBTanalysis | bea3deaf2ee3fc114b308146f2af3e4f35f70197 | [
"MIT"
] | null | null | null | .venv/lib/python3.8/site-packages/findatapy/util/configmanager.py | eo1989/VectorBTanalysis | bea3deaf2ee3fc114b308146f2af3e4f35f70197 | [
"MIT"
] | null | null | null | __author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# 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 appl... | 39.798319 | 129 | 0.578407 |
795b921295d4eaedad3a19761d118d03b72217e5 | 26,819 | py | Python | booking/managers.py | mattmc318/Pharmasseuse | aed9e7c40ada7ac1d4e6f080e05ba96fda0ea53f | [
"MIT"
] | null | null | null | booking/managers.py | mattmc318/Pharmasseuse | aed9e7c40ada7ac1d4e6f080e05ba96fda0ea53f | [
"MIT"
] | 1 | 2019-06-25T01:24:05.000Z | 2019-06-27T21:08:41.000Z | booking/managers.py | mattmc318/Pharmasseuse | aed9e7c40ada7ac1d4e6f080e05ba96fda0ea53f | [
"MIT"
] | null | null | null | import pytz
import sys
from django.db import models
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from datetime import date, datetime, timedelta
from dateutil.relativedelta import relativedelta
from pharmasseuse.settings import TIME_ZONE
tz = pytz.timezone(TIME_ZONE)
class Appointme... | 32.157074 | 90 | 0.5033 |
795b923d6a54cbe3ac1846a4213245ecb72e7af9 | 620 | py | Python | service/repo.py | ppmadalin/py-patterns | ea898e0119c0cd746953c955152efa779fc72f14 | [
"MIT"
] | 4 | 2020-07-22T13:39:33.000Z | 2021-07-26T19:11:35.000Z | service/repo.py | madalinpopa/py-patterns | 795322225fba80d794fda8ac16c46c1fab210db2 | [
"MIT"
] | null | null | null | service/repo.py | madalinpopa/py-patterns | 795322225fba80d794fda8ac16c46c1fab210db2 | [
"MIT"
] | 2 | 2022-02-19T11:38:55.000Z | 2022-03-26T02:12:06.000Z | # coding: utf-8
# service/repo.py
import abc
from sqlalchemy.orm import Session
from model import Blog
class AbstractRepository(abc.ABC):
@abc.abstractmethod
def add(self, blog: Blog):
raise NotImplementedError
@abc.abstractmethod
def get(self, name: str) -> Blog:
raise NotImpleme... | 20 | 69 | 0.680645 |
795b924b9d25ca292ad451bb12db68e50b22e422 | 2,644 | py | Python | pose_recorder.py | MikeFlanigan/CSCI-5922_Final_Proj | 9f4b8dc87ac2db46c02ee8a9409aea7deb477021 | [
"Unlicense"
] | null | null | null | pose_recorder.py | MikeFlanigan/CSCI-5922_Final_Proj | 9f4b8dc87ac2db46c02ee8a9409aea7deb477021 | [
"Unlicense"
] | null | null | null | pose_recorder.py | MikeFlanigan/CSCI-5922_Final_Proj | 9f4b8dc87ac2db46c02ee8a9409aea7deb477021 | [
"Unlicense"
] | null | null | null |
import numpy as np
from numpy import pi
from math import sin, cos
import rospy
from sensor_msgs.msg import LaserScan
from std_msgs.msg import Float32MultiArray
import matplotlib.pyplot as plt
import tf
import time
RunningOdroid = False
numReadings = 100
lastScan = [0]*numReadings
def scan_cb( msg ):
global l... | 34.789474 | 102 | 0.576399 |
795b9325f12e6b7d857eca6c5bee2bfb2afae32e | 4,089 | py | Python | bokeh/sphinxext/bokeh_palette_group.py | jeisch/bokeh | 6be4d5ebbec04117f2bb0693fe64dc664f8f1bb1 | [
"BSD-3-Clause"
] | 1 | 2020-03-21T04:11:51.000Z | 2020-03-21T04:11:51.000Z | bokeh/sphinxext/bokeh_palette_group.py | jeisch/bokeh | 6be4d5ebbec04117f2bb0693fe64dc664f8f1bb1 | [
"BSD-3-Clause"
] | 2 | 2021-05-08T11:43:21.000Z | 2021-05-10T19:16:43.000Z | bokeh/sphinxext/bokeh_palette_group.py | jeisch/bokeh | 6be4d5ebbec04117f2bb0693fe64dc664f8f1bb1 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 34.361345 | 100 | 0.493275 |
795b93a447dae6b1adf39061a7079ddbbe4548a5 | 703 | py | Python | dss_sm_so/tests/__init__.py | MobileCloudNetworking/dssaas | 87b6f7d60ecc397a88326a955b2ddfd3d73205d1 | [
"Apache-2.0"
] | null | null | null | dss_sm_so/tests/__init__.py | MobileCloudNetworking/dssaas | 87b6f7d60ecc397a88326a955b2ddfd3d73205d1 | [
"Apache-2.0"
] | null | null | null | dss_sm_so/tests/__init__.py | MobileCloudNetworking/dssaas | 87b6f7d60ecc397a88326a955b2ddfd3d73205d1 | [
"Apache-2.0"
] | 1 | 2018-10-09T06:28:36.000Z | 2018-10-09T06:28:36.000Z | # Copyright 2014 Zuercher Hochschule fuer Angewandte Wissenschaften
# 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/... | 37 | 78 | 0.732575 |
795b943d2d03bb00951f5d7fa1bcfdc0c64ca5c6 | 829 | py | Python | py_eureka_client/exceptions.py | dev-89/python-eureka-client | 9927fc2766d19a79a5f192667c8755fe38e01d2c | [
"MIT"
] | null | null | null | py_eureka_client/exceptions.py | dev-89/python-eureka-client | 9927fc2766d19a79a5f192667c8755fe38e01d2c | [
"MIT"
] | null | null | null | py_eureka_client/exceptions.py | dev-89/python-eureka-client | 9927fc2766d19a79a5f192667c8755fe38e01d2c | [
"MIT"
] | null | null | null | from logging import exception
import py_eureka_client.http_client as http_client
from py_eureka_client import instance
class EurekaServerConnectionException(http_client.URLError):
pass
class DiscoverException(http_client.URLError):
pass
class WrongXMLNodeError(Exception):
"""Custom error that is rais... | 26.741935 | 73 | 0.721351 |
795b95a286215dfb8c37dc5634d5889e732b2f1c | 21,985 | py | Python | qa/rpc-tests/wallet.py | lycion/lkcoinse | 9cf9ed5730217566b44466c22dc255f0134ad1bb | [
"MIT"
] | null | null | null | qa/rpc-tests/wallet.py | lycion/lkcoinse | 9cf9ed5730217566b44466c22dc255f0134ad1bb | [
"MIT"
] | null | null | null | qa/rpc-tests/wallet.py | lycion/lkcoinse | 9cf9ed5730217566b44466c22dc255f0134ad1bb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2015 The Lkcoinse Core developers
# Copyright (c) 2015-2017 The Lkcoinse Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import test_framework.loginit
import time
im... | 45.802083 | 164 | 0.632659 |
795b9637c04ad2e9b60b6859781d50c72311451d | 3,847 | py | Python | wagtail/wagtailcore/tests/test_dbwhitelister.py | lojack/wagtail | eaf61d5550795a3278184261f6f956f603df8d46 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailcore/tests/test_dbwhitelister.py | lojack/wagtail | eaf61d5550795a3278184261f6f956f603df8d46 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailcore/tests/test_dbwhitelister.py | lojack/wagtail | eaf61d5550795a3278184261f6f956f603df8d46 | [
"BSD-3-Clause"
] | null | null | null | from django.test import TestCase
from wagtail.wagtailcore.rich_text import DbWhitelister
from wagtail.wagtailcore.whitelist import Whitelister
from bs4 import BeautifulSoup
class TestDbWhitelister(TestCase):
def assertHtmlEqual(self, str1, str2):
"""
Assert that two HTML strings are equal at the D... | 75.431373 | 326 | 0.707824 |
795b965beca6ef8b993a4c5b0802fc81010eecc6 | 1,955 | py | Python | setup.py | aaronbiller/spackl | 71906a3da6470f67bff19c42bd0f1f8748c5056f | [
"MIT"
] | null | null | null | setup.py | aaronbiller/spackl | 71906a3da6470f67bff19c42bd0f1f8748c5056f | [
"MIT"
] | null | null | null | setup.py | aaronbiller/spackl | 71906a3da6470f67bff19c42bd0f1f8748c5056f | [
"MIT"
] | null | null | null | import re
from io import open
from setuptools import setup, find_packages
README = 'README.md'
CHANGES = 'CHANGES.md'
VERSION_FILE = 'spackl/__init__.py'
def read(path):
with open(path, encoding='utf-8') as f:
return f.read()
def find_version():
version_file = read(VERSION_FILE)
version_match ... | 26.066667 | 67 | 0.582097 |
795b96adabb64d1e14a3cff35e3c25886eb06aac | 712 | py | Python | setup.py | neurospin/deep_folding | 4c580314dfa4ae87c5d115f211c42185ae183f64 | [
"CECILL-B"
] | 1 | 2021-10-06T06:47:53.000Z | 2021-10-06T06:47:53.000Z | setup.py | neurospin/deep_folding | 4c580314dfa4ae87c5d115f211c42185ae183f64 | [
"CECILL-B"
] | 5 | 2021-04-19T07:12:33.000Z | 2022-01-14T14:53:22.000Z | setup.py | neurospin/deep_folding | 4c580314dfa4ae87c5d115f211c42185ae183f64 | [
"CECILL-B"
] | 2 | 2021-09-09T11:39:08.000Z | 2021-09-09T12:29:34.000Z | import os
from setuptools import setup, find_packages
release_info = {}
python_dir = os.path.dirname(__file__)
with open(os.path.join(python_dir, "deep_folding", "info.py")) as f:
code = f.read()
exec(code, release_info)
setup(
name=release_info['NAME'],
version=release_info['__version__'],
packag... | 30.956522 | 68 | 0.717697 |
795b980937c88934f44a01a256940bf5374f04ab | 370 | py | Python | thermosteam/equilibrium/ideal.py | yoelcortes/thermotree | 7d7c045ed7324ff7fd69188f3176207be08d7070 | [
"MIT"
] | 2 | 2020-01-10T14:23:08.000Z | 2020-02-21T20:36:49.000Z | thermosteam/equilibrium/ideal.py | yoelcortes/thermotree | 7d7c045ed7324ff7fd69188f3176207be08d7070 | [
"MIT"
] | 3 | 2019-12-09T08:10:41.000Z | 2019-12-09T08:40:52.000Z | thermosteam/equilibrium/ideal.py | yoelcortes/thermotree | 7d7c045ed7324ff7fd69188f3176207be08d7070 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 29 08:43:40 2021
@author: yrc2
"""
from numba import njit
__all__ = ('ideal_coefficient',)
def ideal(cls):
cls.f = ideal_coefficient
cls.args = ()
return cls
@property
def ideal_coefficient(self):
return _ideal_coefficient
@njit(cache=True)
def _ideal_... | 16.818182 | 47 | 0.675676 |
795b983029de527b4d18fc59e6ae285d2b68ce73 | 1,643 | py | Python | Maria/federated_segmentation_unet_pneumo/model.py | anirbansen3027/UdacityOpenSource | c032f610a7861c234e189841f996bff877c94e34 | [
"Apache-2.0"
] | 2 | 2019-08-19T19:16:59.000Z | 2020-09-03T19:18:27.000Z | Maria/federated_segmentation_unet_pneumo/model.py | anirbansen3027/UdacityOpenSource | c032f610a7861c234e189841f996bff877c94e34 | [
"Apache-2.0"
] | null | null | null | Maria/federated_segmentation_unet_pneumo/model.py | anirbansen3027/UdacityOpenSource | c032f610a7861c234e189841f996bff877c94e34 | [
"Apache-2.0"
] | 1 | 2019-08-20T13:14:59.000Z | 2019-08-20T13:14:59.000Z | # https://github.com/usuyama/pytorch-unet
import torch
from torch import nn
def double_conv(in_channels, out_channels):
return nn.Sequential(
nn.Conv2d(in_channels, out_channels, 3, padding=1),
nn.ReLU(inplace=True),
nn.Conv2d(out_channels, out_channels, 3, padding=1),
nn.ReLU(inp... | 34.229167 | 92 | 0.570298 |
795b98a5af239e4c9c124fb4c6d75935151d2f06 | 4,416 | py | Python | tests/data/until_12_999.py | GTmmiller/TurkeyVulture | 4481d04d0e210b6058573afdacc2c089ed8bbeb5 | [
"Apache-2.0"
] | null | null | null | tests/data/until_12_999.py | GTmmiller/TurkeyVulture | 4481d04d0e210b6058573afdacc2c089ed8bbeb5 | [
"Apache-2.0"
] | null | null | null | tests/data/until_12_999.py | GTmmiller/TurkeyVulture | 4481d04d0e210b6058573afdacc2c089ed8bbeb5 | [
"Apache-2.0"
] | null | null | null | JSON = {
"id": "999",
"to": {
"data": [
{
"id": "1",
"name": "Person One"
},
{
"id": "2",
"name": "Person Two"
},
{
"id": "3",
"name": "Person Three"
},
{
"id": ... | 29.637584 | 162 | 0.380208 |
795b98d54c49199771ccdbd82ce39b2ffac54da8 | 18,776 | py | Python | ucsmsdk/mometa/equipment/EquipmentSwitchIOCardFsm.py | Curlyfingers/ucsmsdk | 982ff2d8faa12ffb88e1f8cba98cf5749f05c93d | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/equipment/EquipmentSwitchIOCardFsm.py | Curlyfingers/ucsmsdk | 982ff2d8faa12ffb88e1f8cba98cf5749f05c93d | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/equipment/EquipmentSwitchIOCardFsm.py | Curlyfingers/ucsmsdk | 982ff2d8faa12ffb88e1f8cba98cf5749f05c93d | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for EquipmentSwitchIOCardFsm ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class EquipmentSwitchIOCardFsmConsts:
COMPLETION_TIME_ = ""
CURRENT_FSM_EVACUATE = "Evacuate"
... | 87.738318 | 3,727 | 0.75703 |
795b997d8204e79adf618a4822d4276463cb7663 | 7,235 | py | Python | lib/graph.py | balcilar/cnn_graph | 9516e7c11d418b7873f9ac232faf678200dfcf7f | [
"MIT"
] | 1 | 2019-08-02T21:57:39.000Z | 2019-08-02T21:57:39.000Z | lib/graph.py | balcilar/cnn_graph | 9516e7c11d418b7873f9ac232faf678200dfcf7f | [
"MIT"
] | null | null | null | lib/graph.py | balcilar/cnn_graph | 9516e7c11d418b7873f9ac232faf678200dfcf7f | [
"MIT"
] | null | null | null | import sklearn.metrics
import sklearn.neighbors
import matplotlib.pyplot as plt
import scipy.sparse
import scipy.sparse.linalg
import scipy.spatial.distance
import numpy as np
def grid(m, dtype=np.float32):
"""Return the embedding of a grid graph."""
M = m**2
x = np.linspace(0, 1, m, dtype=dtype)
y = ... | 27.934363 | 79 | 0.540981 |
795b9a507ea0f9641e8e77d09d76e99bd4bdbddf | 339 | py | Python | 0014/solve.py | Murgio/Project-Euler | c24935a697edfa98c20077bb4206f99a4c19ef52 | [
"MIT"
] | null | null | null | 0014/solve.py | Murgio/Project-Euler | c24935a697edfa98c20077bb4206f99a4c19ef52 | [
"MIT"
] | null | null | null | 0014/solve.py | Murgio/Project-Euler | c24935a697edfa98c20077bb4206f99a4c19ef52 | [
"MIT"
] | null | null | null | from tqdm import tqdm
def chain(n):
if n == 1:
return 1
if n % 2 == 0:
return 1 + chain(n/2)
return 1 + chain(3*n+1)
def sol(limit: int):
m = 0
num = 1
for i in tqdm(range(1, limit)):
c = chain(i)
if c > m:
m = c
num = i
return num
pr... | 16.95 | 35 | 0.451327 |
795b9beab8369f6cd281feeb246bc9d33f5cd028 | 10,555 | py | Python | src/.history/DSP_main_20201015183927.py | hassan-alhujhoj/ENEL420-GA-DSP | e550300bc671950f27909b499d440446a325326d | [
"MIT"
] | null | null | null | src/.history/DSP_main_20201015183927.py | hassan-alhujhoj/ENEL420-GA-DSP | e550300bc671950f27909b499d440446a325326d | [
"MIT"
] | null | null | null | src/.history/DSP_main_20201015183927.py | hassan-alhujhoj/ENEL420-GA-DSP | e550300bc671950f27909b499d440446a325326d | [
"MIT"
] | null | null | null | """
Genetic Algorithms for Digital Signal Processing
Created on Mon Oct 05 20:01:05 2020
Last Edited on Mon Oct 12 2020 by Luke Trenberth
TODO tidy up this code and to finalise it. Add up the third FIR filter method in here too.
"""
from os import major
import numpy as np
import matplotlib
from scipy import s... | 45.300429 | 149 | 0.604642 |
795b9e508d3752d358ce339165273de8a1151812 | 1,184 | py | Python | _build/jupyter_execute/curriculum-notebooks/Mathematics/StatisticsProject/AccessingData/spotify-popularity.py | BryceHaley/curriculum-jbook | d1246799ddfe62b0cf5c389394a18c2904383437 | [
"CC-BY-4.0"
] | 1 | 2022-03-18T18:19:40.000Z | 2022-03-18T18:19:40.000Z | _build/jupyter_execute/curriculum-notebooks/Mathematics/StatisticsProject/AccessingData/spotify-popularity.py | callysto/curriculum-jbook | ffb685901e266b0ae91d1250bf63e05a87c456d9 | [
"CC-BY-4.0"
] | null | null | null | _build/jupyter_execute/curriculum-notebooks/Mathematics/StatisticsProject/AccessingData/spotify-popularity.py | callysto/curriculum-jbook | ffb685901e266b0ae91d1250bf63e05a87c456d9 | [
"CC-BY-4.0"
] | null | null | null | 
<a href="https://hub.callysto.ca/jupyter/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcallysto%2Fcurriculum-notebooks&branch=master&subPath=Mathematics/StatisticsProject/Accessing... | 56.380952 | 425 | 0.793919 |
795ba13042aeac3da7c4e7d01077ab574108d512 | 5,296 | py | Python | python_scripts/user_scaffold_analysis_mysql.py | gulyas/network_games_analysis | 2e6bdd2a2275702495af1c18043758193d94377b | [
"MIT"
] | null | null | null | python_scripts/user_scaffold_analysis_mysql.py | gulyas/network_games_analysis | 2e6bdd2a2275702495af1c18043758193d94377b | [
"MIT"
] | null | null | null | python_scripts/user_scaffold_analysis_mysql.py | gulyas/network_games_analysis | 2e6bdd2a2275702495af1c18043758193d94377b | [
"MIT"
] | 1 | 2021-03-30T18:39:08.000Z | 2021-03-30T18:39:08.000Z | """
Examines scaffold hypothesis on a particular user.
Uses data from the MySQL Database.
"""
import csv
import json
import numpy as np
import matplotlib.pyplot as plt
import igraph
PATH = "D:\\network_games\\"
SAVE_PATH = "D:\\network_games\\scaffold\\"
FILENAME = "scaffold_data_mysql.csv"
# Specify the name of the ... | 31.337278 | 109 | 0.599131 |
795ba1cad868c2c03dff4b5d9dd221b32fddf550 | 1,467 | py | Python | xlsxwriter/test/comparison/test_chart_str02.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_chart_str02.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_chart_str02.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2021, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompar... | 25.293103 | 97 | 0.546694 |
795ba2cdf62e09c0415ea43fca2d26305c91f9d6 | 30,587 | py | Python | custom/apps/gsid/reports/sql_reports.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | custom/apps/gsid/reports/sql_reports.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | 1 | 2022-03-12T01:03:25.000Z | 2022-03-12T01:03:25.000Z | custom/apps/gsid/reports/sql_reports.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | import functools
from sqlagg.columns import *
from sqlagg.base import AliasColumn
from sqlagg.filters import *
from corehq.apps.fixtures.models import FixtureDataItem, FixtureDataType
from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader, DataTablesColumnGroup, DTSortType
from corehq.apps.report... | 39.014031 | 136 | 0.565077 |
795ba3610878abe65fc03a09b97d92840e3d238b | 1,484 | py | Python | PYTHON/scripts/puzzles/twoBranch.py | oruanaidh-ai/wayback_machine | 2529fc9e18120a092890abbb94483f643682fb90 | [
"BSD-2-Clause"
] | null | null | null | PYTHON/scripts/puzzles/twoBranch.py | oruanaidh-ai/wayback_machine | 2529fc9e18120a092890abbb94483f643682fb90 | [
"BSD-2-Clause"
] | null | null | null | PYTHON/scripts/puzzles/twoBranch.py | oruanaidh-ai/wayback_machine | 2529fc9e18120a092890abbb94483f643682fb90 | [
"BSD-2-Clause"
] | null | null | null | class Node:
pass
import random
top = Node()
def buildTree(t, lev=5):
"""
Build a random tree. It is not a binary tree.
Subnodes (if they exist) are placed inside a vector.
There can be as many as fifteen subnodes.
"""
if lev == 0: return
subnodes = []
for i in range(15):
... | 21.2 | 62 | 0.578167 |
795ba3855053a137b2481d91c6ec7ffcb94c78c9 | 1,294 | py | Python | shibgreen/server/start_introducer.py | BTCgreen-Network/shibgreen-blockchain | b1e41e82ad849775543aa36fefc0c0d03e13f6e8 | [
"Apache-2.0"
] | 12 | 2021-11-10T02:52:38.000Z | 2022-03-22T10:19:45.000Z | shibgreen/server/start_introducer.py | BTCgreen-Network/shibgreen-blockchain | b1e41e82ad849775543aa36fefc0c0d03e13f6e8 | [
"Apache-2.0"
] | 13 | 2021-11-16T03:09:34.000Z | 2022-03-09T00:45:05.000Z | shibgreen/server/start_introducer.py | BTCgreen-Network/shibgreen-blockchain | b1e41e82ad849775543aa36fefc0c0d03e13f6e8 | [
"Apache-2.0"
] | 1 | 2022-03-15T08:25:06.000Z | 2022-03-15T08:25:06.000Z | import pathlib
from typing import Dict
from shibgreen.introducer.introducer import Introducer
from shibgreen.introducer.introducer_api import IntroducerAPI
from shibgreen.server.outbound_message import NodeType
from shibgreen.server.start_service import run_service
from shibgreen.util.config import load_config_cli
fro... | 28.755556 | 89 | 0.74575 |
795ba500d6e4e362e9ca6c7f5d40140382346b22 | 2,145 | py | Python | cogs/server_info.py | NilsRG/discord-bot | 2f4dd1511a011a524c01d875f3cb55c0cc48cad9 | [
"MIT"
] | 1 | 2021-03-04T23:24:39.000Z | 2021-03-04T23:24:39.000Z | cogs/server_info.py | dylanbuchi/discord-bot-sb | 374a062bce669c13d8ecdf876a10e48d3bd884cd | [
"MIT"
] | null | null | null | cogs/server_info.py | dylanbuchi/discord-bot-sb | 374a062bce669c13d8ecdf876a10e48d3bd884cd | [
"MIT"
] | 2 | 2021-03-06T10:56:21.000Z | 2021-06-30T12:40:24.000Z | import discord, datetime, time
from discord.ext import commands
from datetime import datetime, timedelta
from cogs.admin_config import get_guild_delete_timer
#bot start time
start_time = time.time()
class Server(commands.Cog):
def __init__(self, client):
self.client = client
# @commands.command(nam... | 36.355932 | 78 | 0.657809 |
795ba527a487cfb2b9717a1ce78f6f2facdd25a4 | 10,137 | py | Python | pyanalyze/test_value.py | sobolevn/pyanalyze | f3851db84e57e3ff7f8e2dd271c3b218e2d3bbcc | [
"Apache-2.0"
] | null | null | null | pyanalyze/test_value.py | sobolevn/pyanalyze | f3851db84e57e3ff7f8e2dd271c3b218e2d3bbcc | [
"Apache-2.0"
] | null | null | null | pyanalyze/test_value.py | sobolevn/pyanalyze | f3851db84e57e3ff7f8e2dd271c3b218e2d3bbcc | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from qcore.asserts import assert_eq, assert_in, assert_is, assert_is_not
from . import tests
from . import value
from .value import KnownValue, TypedValue, MultiValuedValue, SubclassValue
from .test_node_visito... | 35.819788 | 88 | 0.702377 |
795ba57d9887b20be8c07af6c6c3fe3480a9798d | 2,411 | py | Python | homeassistant/components/met/config_flow.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 2 | 2019-10-19T15:07:32.000Z | 2022-01-29T10:33:20.000Z | homeassistant/components/met/config_flow.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 4 | 2021-02-08T21:05:14.000Z | 2021-09-08T02:57:03.000Z | homeassistant/components/met/config_flow.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 1 | 2019-10-04T13:26:54.000Z | 2019-10-04T13:26:54.000Z | """Config flow to configure Met component."""
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_ELEVATION, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
from .const import DOMAI... | 33.957746 | 88 | 0.64662 |
795ba64d85385384e85132135b8e9ad2f53906ed | 193 | py | Python | source/approximate/hash_collisions/generate_strings.py | kunalghosh/T-61.5060-Algorithmic-Methods-of-Data-Mining | 718b1ca4a3f83f1b244bb7ddeb5cc430b2967516 | [
"MIT"
] | null | null | null | source/approximate/hash_collisions/generate_strings.py | kunalghosh/T-61.5060-Algorithmic-Methods-of-Data-Mining | 718b1ca4a3f83f1b244bb7ddeb5cc430b2967516 | [
"MIT"
] | null | null | null | source/approximate/hash_collisions/generate_strings.py | kunalghosh/T-61.5060-Algorithmic-Methods-of-Data-Mining | 718b1ca4a3f83f1b244bb7ddeb5cc430b2967516 | [
"MIT"
] | null | null | null | import string
import itertools
import sys
combos = 3
if len(sys.argv) == 2:
combos = int(sys.argv[1])
for a in itertools.combinations(string.ascii_letters,combos):
print "-".join(a)
| 16.083333 | 61 | 0.699482 |
795ba720fe704388b6d6b8dc2bd3ed9e24112748 | 52,659 | py | Python | mne/channels/channels.py | jasmainak/mne-python | 039cb1bf52770019bd48ac028795af0861792fa2 | [
"BSD-3-Clause"
] | null | null | null | mne/channels/channels.py | jasmainak/mne-python | 039cb1bf52770019bd48ac028795af0861792fa2 | [
"BSD-3-Clause"
] | 2 | 2016-02-27T13:43:15.000Z | 2018-07-18T19:44:45.000Z | mne/channels/channels.py | jasmainak/mne-python | 039cb1bf52770019bd48ac028795af0861792fa2 | [
"BSD-3-Clause"
] | 1 | 2017-03-05T20:44:07.000Z | 2017-03-05T20:44:07.000Z | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
# Denis Engemann <denis.engemann@gmail.com>
# Andrew Dykstra <andrew.r.dykstra@gmail.com>
# Teon Brooks <teon.brooks@gmail.com>
#
# License: BSD (3-clause)
import os
... | 37.856937 | 79 | 0.59044 |
795ba7e9d56977e2fd4d2fa3d0226b8ee579a899 | 3,383 | py | Python | ai-engineer-deploying-solutions/module-iot/solution/modules/ImageClassifierService/app/predict.py | DSoftse/Pluralsight | 44bfb372a52815b7c86c1daefaf74542551c21a0 | [
"MIT"
] | 130 | 2017-07-07T21:01:32.000Z | 2022-03-17T11:51:26.000Z | ai-engineer-deploying-solutions/module-iot/solution/modules/ImageClassifierService/app/predict.py | DSoftse/Pluralsight | 44bfb372a52815b7c86c1daefaf74542551c21a0 | [
"MIT"
] | 8 | 2018-02-19T07:12:31.000Z | 2021-04-27T05:59:12.000Z | ai-engineer-deploying-solutions/module-iot/solution/modules/ImageClassifierService/app/predict.py | DSoftse/Pluralsight | 44bfb372a52815b7c86c1daefaf74542551c21a0 | [
"MIT"
] | 307 | 2017-02-17T04:45:02.000Z | 2022-02-23T17:42:07.000Z |
from urllib.request import urlopen
import tensorflow.compat.v1 as tf
from PIL import Image
import numpy as np
# import scipy
# from scipy import misc
import sys
import os
filename = 'model.pb'
labels_filename = 'labels.txt'
mean_values_b_g_r = (0,0,0)
size = (256, 256)
output_layer = 'loss:0'
input_node = 'Plac... | 29.938053 | 98 | 0.605971 |
795ba989a5085fe1f4f4fcfba0f04fb13bb45396 | 13,069 | py | Python | test.py | YisenLiu-Intelligent-Sensing/SSC_AE | 9aaed69808cd136cc443d8e7005ca2cf2aecfac4 | [
"MIT"
] | null | null | null | test.py | YisenLiu-Intelligent-Sensing/SSC_AE | 9aaed69808cd136cc443d8e7005ca2cf2aecfac4 | [
"MIT"
] | null | null | null | test.py | YisenLiu-Intelligent-Sensing/SSC_AE | 9aaed69808cd136cc443d8e7005ca2cf2aecfac4 | [
"MIT"
] | null | null | null | """
@file test.py
@brief Script for test
@author Yisen Liu
Copyright (C) 2021 Institute of Intelligent Manufacturing, Guangdong Academy of Sciences. All right reserved.
"""
import csv
import glob
import os
import sys
import numpy as np
import tensorflow as tf
from sklearn import metrics
import... | 39.246246 | 200 | 0.660571 |
795baaca02700ea82e4b707300430dde6667d60e | 14,710 | py | Python | reset_free_learning/test_script.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-13T21:48:52.000Z | 2022-03-13T21:48:52.000Z | reset_free_learning/test_script.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | reset_free_learning/test_script.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 37.052897 | 112 | 0.67172 |
795bacfa292b1dee9719810769b1e01c205fd2c3 | 1,456 | py | Python | tests/test_user.py | rukaury/ePlannerAPI | 8f9dad6f6716670d23ec8087ad07504a39f7564d | [
"MIT"
] | null | null | null | tests/test_user.py | rukaury/ePlannerAPI | 8f9dad6f6716670d23ec8087ad07504a39f7564d | [
"MIT"
] | null | null | null | tests/test_user.py | rukaury/ePlannerAPI | 8f9dad6f6716670d23ec8087ad07504a39f7564d | [
"MIT"
] | null | null | null | from app import db
from tests.base import BaseTestCase
from app.models.users import User
import unittest
class TestUserModel(BaseTestCase):
"""
Test that the auth token is generated correctly
"""
def test_encode_user_token(self):
"""
Test that a user token is generated correctly
... | 27.471698 | 111 | 0.62294 |
795badd2ff1e68eea64f9f3e142efb3bc38f5f94 | 1,830 | py | Python | azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/application_gateway_ssl_predefined_policy.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/application_gateway_ssl_predefined_policy.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/application_gateway_ssl_predefined_policy.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 40.666667 | 88 | 0.642077 |
795bae0052082720624a682405ae7a4f25513b75 | 2,195 | py | Python | rannsaka/locust_files/task_sets/basic_get.py | pcrews/rannsaka | 4bd86e86eb31c18e9ec0cbbc7926f8f3d4063e26 | [
"Apache-2.0"
] | 2 | 2015-11-11T16:14:17.000Z | 2019-01-13T05:02:51.000Z | rannsaka/locust_files/task_sets/basic_get.py | pcrews/rannsaka | 4bd86e86eb31c18e9ec0cbbc7926f8f3d4063e26 | [
"Apache-2.0"
] | null | null | null | rannsaka/locust_files/task_sets/basic_get.py | pcrews/rannsaka | 4bd86e86eb31c18e9ec0cbbc7926f8f3d4063e26 | [
"Apache-2.0"
] | null | null | null | if __name__ == "__main__" and __package__ is None:
__package__ = "task_sets.nova_basic_task_set"
import os
import random
import time
import json
from locust import HttpLocust, TaskSet, task
from baseTaskSet import baseTaskSet
import task_funcs.keystone_v2_base as keystone_base
import task_funcs.nova_v2_base as n... | 37.20339 | 98 | 0.634624 |
795bae458b30b6afef21de4895095801b46687e3 | 544 | py | Python | manage.py | Miguelrom/EasyApproval | 14bc48086ca20a2830d0ff17961a7cec84ea42bc | [
"Apache-2.0"
] | null | null | null | manage.py | Miguelrom/EasyApproval | 14bc48086ca20a2830d0ff17961a7cec84ea42bc | [
"Apache-2.0"
] | 3 | 2019-12-03T22:36:30.000Z | 2019-12-12T01:27:34.000Z | manage.py | Miguelrom/EasyApproval | 14bc48086ca20a2830d0ff17961a7cec84ea42bc | [
"Apache-2.0"
] | 12 | 2019-12-03T22:36:12.000Z | 2019-12-12T05:52:15.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'EasyApproval.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django.... | 34 | 76 | 0.689338 |
795baf163b123836e69f2e9a67e51f256adfd230 | 184 | py | Python | counterblock/__init__.py | coinwarp/dogeblock | fc4a3a8315e1e822c1261f0fbcb4e1bbd300dfcd | [
"MIT"
] | null | null | null | counterblock/__init__.py | coinwarp/dogeblock | fc4a3a8315e1e822c1261f0fbcb4e1bbd300dfcd | [
"MIT"
] | null | null | null | counterblock/__init__.py | coinwarp/dogeblock | fc4a3a8315e1e822c1261f0fbcb4e1bbd300dfcd | [
"MIT"
] | null | null | null | import os, sys
def server_main():
from counterblock import server
server.main()
def armory_utxsvr_main():
from counterblock import armory_utxsvr
armory_utxsvr.main()
| 18.4 | 42 | 0.73913 |
795baf6a1f4e38cd98c20021e0b6d3b3b1a7b6f8 | 9,500 | py | Python | chainer/functions/array/resize_images.py | chemshi/chainer | ff322e0a87b0a9e3dc3d49f62ce2f3cb6dc19cc9 | [
"MIT"
] | 1 | 2019-04-09T04:55:06.000Z | 2019-04-09T04:55:06.000Z | chainer/functions/array/resize_images.py | chemshi/chainer | ff322e0a87b0a9e3dc3d49f62ce2f3cb6dc19cc9 | [
"MIT"
] | null | null | null | chainer/functions/array/resize_images.py | chemshi/chainer | ff322e0a87b0a9e3dc3d49f62ce2f3cb6dc19cc9 | [
"MIT"
] | null | null | null | import numpy
from chainer import backend
from chainer.backends import cuda
from chainer import function_node
from chainer.utils import type_check
def _infer_lines(B, C, H, W, out_H, out_W, kH, kW):
target_size = 2 ** 17
line_size = B * C * (H * W // out_H + kH * kW * out_W)
target_lines = target_size // ... | 31.879195 | 79 | 0.542316 |
795bafe32cae3f6857cf4c37a329a860c727431e | 760 | py | Python | pddlrl/wrappers/preprocess.py | IBM/pddlrl | e057cc67426c91c9180286a67acad5b9a1ba7fc6 | [
"MIT"
] | 5 | 2022-03-24T16:47:21.000Z | 2022-03-25T16:04:04.000Z | pddlrl/wrappers/preprocess.py | IBM/pddlrl | e057cc67426c91c9180286a67acad5b9a1ba7fc6 | [
"MIT"
] | null | null | null | pddlrl/wrappers/preprocess.py | IBM/pddlrl | e057cc67426c91c9180286a67acad5b9a1ba7fc6 | [
"MIT"
] | null | null | null | # This file is a part of PDDLRL project.
# Copyright (c) 2020 Clement Gehring (clement@gehring.io)
# Copyright (c) 2021 Masataro Asai (guicho2.71828@gmail.com, masataro.asai@ibm.com), IBM Corporation
from typing import Callable
from acme.wrappers import base
import dm_env
class PreprocessWrapper(base.EnvironmentWr... | 29.230769 | 100 | 0.728947 |
795bb03c61f00c2afaef15536993e97a18bf2ef4 | 3,360 | py | Python | kslurm/cli/ssnake.py | pvandyken/kslurm | ae67b6de9e93b991274a36bfc5b2d6272320d7e6 | [
"MIT"
] | 1 | 2021-09-27T23:44:40.000Z | 2021-09-27T23:44:40.000Z | kslurm/cli/ssnake.py | pvandyken/kslurm | ae67b6de9e93b991274a36bfc5b2d6272320d7e6 | [
"MIT"
] | 10 | 2021-09-17T01:08:05.000Z | 2021-10-21T01:46:39.000Z | kslurm/cli/ssnake.py | pvandyken/kslurm | ae67b6de9e93b991274a36bfc5b2d6272320d7e6 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
# import itertools as it
# import subprocess
# import sys
# from pathlib import Path
# import attr
# from colorama import Fore, Style
# from kslurm.args.arg_types import PositionalArg
# from kslurm.exceptions import ValidationError
# from kslurm.models import SlurmModel
# from ... | 29.734513 | 85 | 0.596131 |
795bb07372febc7b18fb41970b6f61137725a836 | 80 | py | Python | src/db/__init__.py | tws0002/footage-importer | a797b79efa184167ca472369b07d1a029dd86cbd | [
"MIT"
] | null | null | null | src/db/__init__.py | tws0002/footage-importer | a797b79efa184167ca472369b07d1a029dd86cbd | [
"MIT"
] | null | null | null | src/db/__init__.py | tws0002/footage-importer | a797b79efa184167ca472369b07d1a029dd86cbd | [
"MIT"
] | null | null | null | from .parse_path import parse_path
from .import_resource import import_resource
| 26.666667 | 44 | 0.875 |
795bb07d4422db925f4ccb2386c5e1a195e5dd45 | 1,711 | py | Python | tests/nfe_reader/ba/test_crawler.py | jroquejr/nfe-reader | 277379bfb9865b2656c2576d8ccf8c3e1f3cacd1 | [
"MIT"
] | null | null | null | tests/nfe_reader/ba/test_crawler.py | jroquejr/nfe-reader | 277379bfb9865b2656c2576d8ccf8c3e1f3cacd1 | [
"MIT"
] | 2 | 2021-04-21T14:57:31.000Z | 2021-04-21T14:57:32.000Z | tests/nfe_reader/ba/test_crawler.py | jroquejr/nfe-reader | 277379bfb9865b2656c2576d8ccf8c3e1f3cacd1 | [
"MIT"
] | null | null | null | import re
import pytest
import requests_mock
from nfe_reader.ba.crawler import Crawler
from nfe_reader.exceptions import InvalidQRCode, UnavailableServerException
from tests.util import load_file
FAKE_URL = "http://nfe.sefaz.ba.gov.br/servicos/nfce/qrcode.aspx?p=29190710230480000300650020046429391067584521|2|1|1|02D... | 33.54902 | 159 | 0.703098 |
795bb0c5076a1977a9004f4f381d1a399497b37c | 721 | py | Python | cms/run_traj.py | broadinstitute/cms | 4743ffd3feac08f02be7719c82b3371cb94a4d6b | [
"BSD-2-Clause"
] | 13 | 2015-05-18T14:39:00.000Z | 2020-07-22T12:57:07.000Z | cms/run_traj.py | broadinstitute/cms | 4743ffd3feac08f02be7719c82b3371cb94a4d6b | [
"BSD-2-Clause"
] | 33 | 2015-04-13T20:48:02.000Z | 2019-12-19T07:27:30.000Z | cms/run_traj.py | broadinstitute/cms | 4743ffd3feac08f02be7719c82b3371cb94a4d6b | [
"BSD-2-Clause"
] | 9 | 2016-03-31T06:56:01.000Z | 2020-01-30T16:35:45.000Z | ## relaunches cosi command until a selection trajectory is created successully (i.e., resampling selection coefficients/sweep start times from specified distributions)
## last updated: 08.15.16 vitti@broadinstitute.org NIX 3.12
import sys
import subprocess
output, cosibuild, params, maxAttempts = sys.argv[1], sys.arg... | 36.05 | 167 | 0.736477 |
795bb2483680237df7b816a6450386669ceeaf02 | 1,512 | py | Python | blog/migrations/0001_initial.py | inoxidables/tienda | 994a36368da94b069e0948c52192c734eb22ddc4 | [
"MIT"
] | null | null | null | blog/migrations/0001_initial.py | inoxidables/tienda | 994a36368da94b069e0948c52192c734eb22ddc4 | [
"MIT"
] | null | null | null | blog/migrations/0001_initial.py | inoxidables/tienda | 994a36368da94b069e0948c52192c734eb22ddc4 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2021-10-22 13:31
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_USER_MODEL),
]
ope... | 34.363636 | 119 | 0.56746 |
795bb2d1e903f35a3e8882fb8a717e9022c69ea8 | 11,535 | py | Python | tests/test_fortinet_ngfw.py | melscoop-test/ghcr-test-401-1276973 | f3ab152d8408dd77a9f279e4e2e9b41c8a04e82f | [
"BSD-2-Clause",
"CC0-1.0"
] | null | null | null | tests/test_fortinet_ngfw.py | melscoop-test/ghcr-test-401-1276973 | f3ab152d8408dd77a9f279e4e2e9b41c8a04e82f | [
"BSD-2-Clause",
"CC0-1.0"
] | null | null | null | tests/test_fortinet_ngfw.py | melscoop-test/ghcr-test-401-1276973 | f3ab152d8408dd77a9f279e4e2e9b41c8a04e82f | [
"BSD-2-Clause",
"CC0-1.0"
] | null | null | null | # Copyright 2019 Splunk, Inc.
#
# Use of this source code is governed by a BSD-2-clause-style
# license that can be found in the LICENSE-BSD2 file or at
# https://opensource.org/licenses/BSD-2-Clause
import random
from jinja2 import Environment
from .sendmessage import *
from .splunkutils import *
from .timeutils imp... | 68.254438 | 721 | 0.723971 |
795bb344eefc7428612d184d46993b617f69b2f7 | 20,927 | py | Python | vnpy/gateway/ib/ib_gateway.py | JonnyORZ/vnpy | c3bb624d95625412a2dd593326abf3833321d2e2 | [
"MIT"
] | 11 | 2019-11-18T06:07:16.000Z | 2020-10-12T11:36:21.000Z | vnpy/gateway/ib/ib_gateway.py | dovnekai/vnpy | 222475fdf97f77f60cec4ecee231f1b85f44df21 | [
"MIT"
] | 2 | 2019-07-17T09:39:34.000Z | 2019-10-19T16:21:55.000Z | vnpy/gateway/ib/ib_gateway.py | dovnekai/vnpy | 222475fdf97f77f60cec4ecee231f1b85f44df21 | [
"MIT"
] | 6 | 2019-10-30T14:52:21.000Z | 2021-01-11T05:41:17.000Z | """
Please install ibapi from Interactive Brokers github page.
"""
from copy import copy
from datetime import datetime
from queue import Empty
from threading import Thread, Condition
from ibapi import comm
from ibapi.client import EClient
from ibapi.common import MAX_MSG_LEN, NO_VALID_ID, OrderId, TickAttrib, TickerId... | 27.64465 | 108 | 0.583648 |
795bb4b7b49ee5a3f7a2c0da10bb448cc7de9b41 | 20,968 | py | Python | mmdet/models/dense_heads/ttf_head.py | NceBoy/mmd_nce | 47223e88661701a87413136d572f1a56d05d0f03 | [
"Apache-2.0"
] | null | null | null | mmdet/models/dense_heads/ttf_head.py | NceBoy/mmd_nce | 47223e88661701a87413136d572f1a56d05d0f03 | [
"Apache-2.0"
] | null | null | null | mmdet/models/dense_heads/ttf_head.py | NceBoy/mmd_nce | 47223e88661701a87413136d572f1a56d05d0f03 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import normal_init, kaiming_init
import numpy as np
from mmcv.ops import ModulatedDeformConv2dPack as ModulatedDeformConvPack
from mmdet.core import multi_apply, calc_region
from mmcv.runner import force_fp32
from mmdet.models.losses imp... | 40.168582 | 118 | 0.557135 |
795bb4eb9500b54661e8c101d43230713a7565c9 | 4,498 | py | Python | ansible/galera-operator/ansible/library/mysql_status.py | canghai908/operator-sdk-samples | ddcf4086d52f2bcbc79d6269eb9fb0ee795494d3 | [
"Apache-2.0"
] | null | null | null | ansible/galera-operator/ansible/library/mysql_status.py | canghai908/operator-sdk-samples | ddcf4086d52f2bcbc79d6269eb9fb0ee795494d3 | [
"Apache-2.0"
] | null | null | null | ansible/galera-operator/ansible/library/mysql_status.py | canghai908/operator-sdk-samples | ddcf4086d52f2bcbc79d6269eb9fb0ee795494d3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2018, James Cammarata <jimi@sngx.net>
# Copied and modified mainly from the mysql_variables.py module.
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metac... | 27.426829 | 141 | 0.631836 |
795bb62763fc4e6a8ab30085777d3b8c1105b88c | 2,555 | py | Python | GASTNet-pipeline/common/skeleton.py | farhan3a/3D-HumanPoseEstimation | 906b972749371c8fb16cb851e9a069df1cf76053 | [
"CC0-1.0"
] | 235 | 2020-07-14T10:41:18.000Z | 2022-03-28T13:15:28.000Z | GASTNet-pipeline/common/skeleton.py | farhan3a/3D-HumanPoseEstimation | 906b972749371c8fb16cb851e9a069df1cf76053 | [
"CC0-1.0"
] | 58 | 2020-07-14T23:39:55.000Z | 2022-03-24T12:48:13.000Z | GASTNet-pipeline/common/skeleton.py | farhan3a/3D-HumanPoseEstimation | 906b972749371c8fb16cb851e9a069df1cf76053 | [
"CC0-1.0"
] | 52 | 2020-07-23T05:59:42.000Z | 2022-03-14T07:13:26.000Z | import numpy as np
class Skeleton:
def __init__(self, parents, joints_left, joints_right):
assert len(joints_left) == len(joints_right)
self._parents = parents
self._joints_left = joints_left
self._joints_right = joints_right
def num_joints(self):
return len(self._par... | 31.158537 | 73 | 0.599609 |
795bb63fe330e50d1e2d4a5685a42511e5e37cca | 43,418 | py | Python | superset/charts/schemas.py | jinnig/superset | c2e429039234cd74ce80e931a6df8400558fd4be | [
"Apache-2.0"
] | 1 | 2021-04-12T15:40:41.000Z | 2021-04-12T15:40:41.000Z | superset/charts/schemas.py | skhortiuk/superset | ac9c1372b42d8b64cf204faa88fe37a37bf0b06b | [
"Apache-2.0"
] | null | null | null | superset/charts/schemas.py | skhortiuk/superset | ac9c1372b42d8b64cf204faa88fe37a37bf0b06b | [
"Apache-2.0"
] | null | null | null | # 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... | 35.042776 | 88 | 0.633977 |
795bb78867340afa17dd66d6c6e39d13a275458e | 5,987 | py | Python | fonts/svga141_8x14.py | ccccmagicboy/st7735_mpy | b15f1bde69fbe6e0eb4931c57e71c136d8e7f024 | [
"MIT"
] | 6 | 2020-07-11T16:59:19.000Z | 2021-07-16T19:32:49.000Z | ports/esp32/user_modules/st7735_mpy/fonts/svga141_8x14.py | d4niele/micropython | a1f7b37d392bf46b28045ce215ae899fda8d8c38 | [
"MIT"
] | 1 | 2020-04-14T03:14:45.000Z | 2020-04-14T03:14:45.000Z | fonts/svga141_8x14.py | ccccmagicboy/st7735_mpy | b15f1bde69fbe6e0eb4931c57e71c136d8e7f024 | [
"MIT"
] | null | null | null | """converted from ..\fonts\SVGA141__8x14.bin """
WIDTH = 8
HEIGHT = 14
FIRST = 0x20
LAST = 0x7f
_FONT =\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x18\x3c\x3c\x3c\x18\x18\x00\x18\x18\x00\x00\x00'\
b'\x00\x66\x66\x66\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x6c\x6c\xfe\x6c\x6c\x... | 57.019048 | 60 | 0.704359 |
795bb886c8972d63b1627377334b014c09f72c8c | 11,426 | py | Python | core/Brute_Force.py | Ankesh054-official/LittleBrother-GUI- | db1f338109b756a78c2fb142a9f7a5263aef3c12 | [
"MIT"
] | 16 | 2020-09-16T09:10:43.000Z | 2022-02-17T02:19:54.000Z | core/Brute_Force.py | swagkarna/LittleBrother-GUI- | 73bfca36c3c0640b9c59c135ca1877e84449bf77 | [
"MIT"
] | 1 | 2020-12-24T02:06:26.000Z | 2021-01-14T05:50:08.000Z | core/Brute_Force.py | Ankesh054-official/LittleBrother-GUI- | db1f338109b756a78c2fb142a9f7a5263aef3c12 | [
"MIT"
] | 4 | 2020-09-16T14:00:47.000Z | 2021-01-04T04:16:23.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import smtplib
import threading
from optparse import *
import time
try :
from proxylist import ProxyList
except:
print("pip3 install proxylist ")
try :
from mechanize import Browser
except:
print("pip3 install mechanize")
from os import *
from tkinter import *
f... | 44.11583 | 143 | 0.553037 |
795bb93a9c95e13049eb5474019eb1afa55a06c9 | 6,905 | py | Python | env/Lib/site-packages/socketio/base_manager.py | NXPY123/gsoc-tagger | c85602ae9f5dbb9bec45cc5e9e50ec62177d46a5 | [
"MIT"
] | 9 | 2021-02-15T05:53:17.000Z | 2022-02-25T01:47:09.000Z | env/Lib/site-packages/socketio/base_manager.py | NXPY123/gsoc-tagger | c85602ae9f5dbb9bec45cc5e9e50ec62177d46a5 | [
"MIT"
] | 5 | 2022-02-04T13:00:12.000Z | 2022-02-24T18:13:24.000Z | env/Lib/site-packages/socketio/base_manager.py | NXPY123/gsoc-tagger | c85602ae9f5dbb9bec45cc5e9e50ec62177d46a5 | [
"MIT"
] | 7 | 2022-02-05T20:29:14.000Z | 2022-03-26T13:16:44.000Z | import itertools
import logging
from bidict import bidict
default_logger = logging.getLogger('socketio')
class BaseManager(object):
"""Manage client connections.
This class keeps track of all the clients and the rooms they are in, to
support the broadcasting of messages. The data used by this class is
... | 35.777202 | 79 | 0.602317 |
795bb989eb24a6e6fa7d2592744c9fc6c0b58884 | 9,901 | py | Python | src/python/pants/option/options_bootstrapper.py | AHassanSOS/pants | fe3d9834c0e2d78bb252604d6572ffd3b7ac5226 | [
"Apache-2.0"
] | 1 | 2020-08-26T03:30:31.000Z | 2020-08-26T03:30:31.000Z | src/python/pants/option/options_bootstrapper.py | AHassanSOS/pants | fe3d9834c0e2d78bb252604d6572ffd3b7ac5226 | [
"Apache-2.0"
] | 1 | 2021-09-02T14:16:37.000Z | 2021-09-02T14:16:37.000Z | src/python/pants/option/options_bootstrapper.py | AHassanSOS/pants | fe3d9834c0e2d78bb252604d6572ffd3b7ac5226 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import itertools
import logging
import os
import stat
import sys
from pants.base.build_environment import get_default_pants_config_file
from pants.engine.fs import FileContent
from pants.... | 40.913223 | 113 | 0.710231 |
795bba0563a95eb5c132aab78156353860ff8405 | 14,172 | py | Python | gamestonk_terminal/cryptocurrency/discovery/pycoingecko_model.py | Aerex/GamestonkTerminal | 680e0cd278f0d8e45031cdc9d51f247e9aa90ce1 | [
"MIT"
] | 3 | 2021-02-28T09:54:47.000Z | 2021-03-11T17:42:35.000Z | gamestonk_terminal/cryptocurrency/discovery/pycoingecko_model.py | Aerex/GamestonkTerminal | 680e0cd278f0d8e45031cdc9d51f247e9aa90ce1 | [
"MIT"
] | 3 | 2022-02-28T03:37:52.000Z | 2022-02-28T03:37:53.000Z | gamestonk_terminal/cryptocurrency/discovery/pycoingecko_model.py | Aerex/GamestonkTerminal | 680e0cd278f0d8e45031cdc9d51f247e9aa90ce1 | [
"MIT"
] | 1 | 2021-11-20T16:09:48.000Z | 2021-11-20T16:09:48.000Z | """CoinGecko model"""
__docformat__ = "numpy"
import pandas as pd
from pycoingecko import CoinGeckoAPI
from gamestonk_terminal.cryptocurrency.dataframe_helpers import (
percent_to_float,
create_df_index,
wrap_text_in_df,
)
from gamestonk_terminal.cryptocurrency.pycoingecko_helpers import (
changes_pars... | 28.688259 | 117 | 0.567951 |
795bba4d7f02a170d14d75e7fd70811599931c83 | 2,828 | py | Python | python_modules/dagster/dagster/utils/interrupts.py | souterjk/dagster | 8b744a4959bb04ff9587cfee82a796404fcbc89e | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/utils/interrupts.py | souterjk/dagster | 8b744a4959bb04ff9587cfee82a796404fcbc89e | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/utils/interrupts.py | souterjk/dagster | 8b744a4959bb04ff9587cfee82a796404fcbc89e | [
"Apache-2.0"
] | 1 | 2019-09-11T03:02:27.000Z | 2019-09-11T03:02:27.000Z | import signal
import sys
import threading
from contextlib import contextmanager
_received_interrupt = {"received": False}
def setup_interrupt_handlers():
# Map SIGTERM to SIGINT (for k8s)
signal.signal(signal.SIGTERM, signal.getsignal(signal.SIGINT))
# Set SIGBREAK handler to SIGINT on Windows
if sy... | 31.076923 | 100 | 0.730552 |
795bba8377d816082a3c25d3bcbb76119e07e29d | 6,079 | py | Python | gym_duckietown/objects.py | abdelq/gym-duckietown | 189392eab698b26db5e253b2a7fbe063b6e5e410 | [
"MIT"
] | null | null | null | gym_duckietown/objects.py | abdelq/gym-duckietown | 189392eab698b26db5e253b2a7fbe063b6e5e410 | [
"MIT"
] | null | null | null | gym_duckietown/objects.py | abdelq/gym-duckietown | 189392eab698b26db5e253b2a7fbe063b6e5e410 | [
"MIT"
] | null | null | null | import numpy as np
from .collision import *
import pyglet
from pyglet.gl import *
class WorldObj:
def __init__(self, obj, domain_rand, safety_radius_mult):
"""
Initializes the object and its properties
"""
self.process_obj_dict(obj, safety_radius_mult)
self.domain_rand = ... | 31.827225 | 85 | 0.595822 |
795bbaf6e33f31984f169011542b14c3468a139f | 4,465 | py | Python | manual_setup/system_calls.py | Rekrau/PyGreentea | 457d7dc5be12b15c3c7663ceaf6d74301de56e43 | [
"BSD-2-Clause"
] | null | null | null | manual_setup/system_calls.py | Rekrau/PyGreentea | 457d7dc5be12b15c3c7663ceaf6d74301de56e43 | [
"BSD-2-Clause"
] | 4 | 2016-04-22T15:39:21.000Z | 2016-11-15T21:23:58.000Z | manual_setup/system_calls.py | Rekrau/PyGreentea | 457d7dc5be12b15c3c7663ceaf6d74301de56e43 | [
"BSD-2-Clause"
] | 4 | 2017-05-12T00:17:55.000Z | 2019-07-01T19:23:32.000Z | import inspect
import multiprocessing
import os
import platform
import sys
def setup_paths(caffe_path, malis_path):
cmd_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0]))
if cmd_folder not in sys.path:
sys.path.append(cmd_folder)
cmd_subfolder = ... | 34.083969 | 150 | 0.64972 |
795bbb995b2199179c32741261a83f9a18eec48a | 54 | py | Python | acmicpc/15894/15894.py | love-adela/algorithm | 4ccd02173c96f8369962f1fd4e5166a221690fa2 | [
"MIT"
] | 3 | 2019-03-09T05:19:23.000Z | 2019-04-06T09:26:36.000Z | acmicpc/15894/15894.py | love-adela/algorithm | 4ccd02173c96f8369962f1fd4e5166a221690fa2 | [
"MIT"
] | 1 | 2020-02-23T10:38:04.000Z | 2020-02-23T10:38:04.000Z | acmicpc/15894/15894.py | love-adela/algorithm | 4ccd02173c96f8369962f1fd4e5166a221690fa2 | [
"MIT"
] | 1 | 2019-05-22T13:47:53.000Z | 2019-05-22T13:47:53.000Z | import sys
n = int(sys.stdin.readline())
print(4 * n)
| 13.5 | 29 | 0.666667 |
795bbbdd194aa04f498c0f4a94c9475d5eb5e2bb | 7,397 | py | Python | utils/train.py | wingeva1986/dddd_trainer | 608bfec699446040aea205387c9a2129ea5fa575 | [
"Apache-2.0"
] | 1 | 2022-03-01T00:51:46.000Z | 2022-03-01T00:51:46.000Z | utils/train.py | wingeva1986/dddd_trainer | 608bfec699446040aea205387c9a2129ea5fa575 | [
"Apache-2.0"
] | null | null | null | utils/train.py | wingeva1986/dddd_trainer | 608bfec699446040aea205387c9a2129ea5fa575 | [
"Apache-2.0"
] | null | null | null | import json
import os
import random
import time
import tqdm
from configs import Config
from loguru import logger
from utils import load_cache
from nets import Net
class Train:
def __init__(self, project_name: str):
self.project_name = project_name
self.project_path = os.path.join(os.path.dirname... | 47.11465 | 117 | 0.517913 |
795bbd208d7abb7ac3d7af358f93e9ab4b6c9d6f | 49,552 | py | Python | IPython/core/magics/execution.py | dpsanders/ipython | b8295e9af6745b9c466d11bb31a6eef221e231c1 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-03-12T02:52:13.000Z | 2020-03-12T02:52:13.000Z | IPython/core/magics/execution.py | dpsanders/ipython | b8295e9af6745b9c466d11bb31a6eef221e231c1 | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/core/magics/execution.py | dpsanders/ipython | b8295e9af6745b9c466d11bb31a6eef221e231c1 | [
"BSD-3-Clause-Clear"
] | null | null | null | # -*- coding: utf-8 -*-
"""Implementation of execution-related magic functions.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 The IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYIN... | 38.442203 | 92 | 0.567908 |
795bbd5d7f560cde381299806a3706c4dbb8b125 | 126 | py | Python | __init__.py | nchauhan890/tagger | 1b3769a6a8d540a58a608be276055282a697c00e | [
"MIT"
] | 2 | 2020-01-25T21:40:47.000Z | 2020-01-26T12:38:23.000Z | __init__.py | nchauhan890/tagger | 1b3769a6a8d540a58a608be276055282a697c00e | [
"MIT"
] | null | null | null | __init__.py | nchauhan890/tagger | 1b3769a6a8d540a58a608be276055282a697c00e | [
"MIT"
] | null | null | null | import tagger.api as api
import tagger.structure as structure
import tagger.lexers as lexers
import tagger.parsers as parsers
| 25.2 | 36 | 0.84127 |
795bbd6d3ea7917e85e2edd55a47bb85467ee617 | 2,933 | py | Python | test_settings.py | tony-joseph/crimson_antispam | 81c75f5ba80555f5d540133d0c10a9d8610321ee | [
"BSD-3-Clause"
] | 5 | 2018-02-13T13:17:24.000Z | 2020-05-06T16:59:37.000Z | test_settings.py | tony-joseph/crimson-antispam | 81c75f5ba80555f5d540133d0c10a9d8610321ee | [
"BSD-3-Clause"
] | 1 | 2016-04-25T09:20:16.000Z | 2016-04-26T15:25:30.000Z | test_settings.py | tony-joseph/crimson_antispam | 81c75f5ba80555f5d540133d0c10a9d8610321ee | [
"BSD-3-Clause"
] | 1 | 2018-04-13T09:03:41.000Z | 2018-04-13T09:03:41.000Z | import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used ... | 24.855932 | 91 | 0.691101 |
795bbd93b7fd55c31805ab1067c3aefcd4971cbf | 10,129 | py | Python | app/recipe/tests/test_recipe_api.py | mathewajik/recipe-app-api | 2f7ba9ea7713f2420d9ffbe78bcaec090ac014d3 | [
"MIT"
] | null | null | null | app/recipe/tests/test_recipe_api.py | mathewajik/recipe-app-api | 2f7ba9ea7713f2420d9ffbe78bcaec090ac014d3 | [
"MIT"
] | null | null | null | app/recipe/tests/test_recipe_api.py | mathewajik/recipe-app-api | 2f7ba9ea7713f2420d9ffbe78bcaec090ac014d3 | [
"MIT"
] | null | null | null | import os
import tempfile
from PIL import Image
from core.models import Recipe, Tag, Ingredient
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from recipe.serializers import RecipeSerializer, RecipeDetailSerializer
from rest_framework import sta... | 36.046263 | 79 | 0.628098 |
795bbe94f03fab5b38bfc6985757b3e0c5a4f5a7 | 1,713 | py | Python | src/data/sql_pipeline/0.8 prices_monthly_snapshot/test_prices_monthly_snapshot.py | parker84/north-dash | 2a726075df46c931715548fb203b3ac909199587 | [
"MIT"
] | null | null | null | src/data/sql_pipeline/0.8 prices_monthly_snapshot/test_prices_monthly_snapshot.py | parker84/north-dash | 2a726075df46c931715548fb203b3ac909199587 | [
"MIT"
] | 1 | 2022-02-26T18:10:05.000Z | 2022-02-26T18:10:05.000Z | src/data/sql_pipeline/0.8 prices_monthly_snapshot/test_prices_monthly_snapshot.py | parker84/northdash | 2a726075df46c931715548fb203b3ac909199587 | [
"MIT"
] | null | null | null | import pytest
from settings import ENGINE_PATH
from sqlalchemy import create_engine
from pandas_profiling import ProfileReport
import pandas as pd
import datetime
from src.utils.testing_suite import TestSuite
engine = create_engine(ENGINE_PATH)
conn = engine.connect()
prepped_test_suite = TestSuite(
unique_cols=['... | 40.785714 | 154 | 0.803853 |
795bc01c7f46fe923148ec3a456ed494ffedaf49 | 20,193 | py | Python | pybotters/models/gmocoin.py | yoshiY-private/pybotters | 571fa207470d9aebed4b2966815489bd1e5c95b6 | [
"MIT"
] | 1 | 2022-03-24T13:27:33.000Z | 2022-03-24T13:27:33.000Z | pybotters/models/gmocoin.py | yoshiY-private/pybotters | 571fa207470d9aebed4b2966815489bd1e5c95b6 | [
"MIT"
] | null | null | null | pybotters/models/gmocoin.py | yoshiY-private/pybotters | 571fa207470d9aebed4b2966815489bd1e5c95b6 | [
"MIT"
] | null | null | null | from __future__ import annotations
import asyncio
import logging
from datetime import datetime, timezone
from dateutil import parser
from decimal import Decimal
from enum import Enum, auto
from typing import Any, Awaitable, Optional, cast
import aiohttp
from pybotters.store import DataStore, DataStoreManager
from pyb... | 29.565154 | 88 | 0.589709 |
795bc1c0075613236f7426167d6bcdb8e4af73fc | 1,860 | py | Python | dfscode/dfs_wrapper.py | idea-iitd/graphgen | 0c74511faeed593dcfa7a6c59fc177812232f7d2 | [
"MIT"
] | 34 | 2020-01-23T11:08:02.000Z | 2022-03-02T01:50:04.000Z | dfscode/dfs_wrapper.py | idea-iitd/graphgen | 0c74511faeed593dcfa7a6c59fc177812232f7d2 | [
"MIT"
] | 6 | 2020-02-17T11:22:15.000Z | 2021-12-20T16:35:00.000Z | dfscode/dfs_wrapper.py | idea-iitd/graphgen | 0c74511faeed593dcfa7a6c59fc177812232f7d2 | [
"MIT"
] | 11 | 2020-01-28T08:10:44.000Z | 2022-01-03T20:31:39.000Z | import os
import subprocess
import tempfile
import pickle
import networkx as nx
def get_min_dfscode(G, temp_path=tempfile.gettempdir()):
input_fd, input_path = tempfile.mkstemp(dir=temp_path)
with open(input_path, 'w') as f:
vcount = len(G.nodes)
f.write(str(vcount) + '\n')
i = 0
... | 25.833333 | 95 | 0.576882 |
795bc1e2cafc3234b0c2086c3007a26be50b8cbe | 4,194 | py | Python | SCF.py | datala/seeClickFix-loader | 884bae2cb3c4585d69f9420ce68a843f4665d121 | [
"Apache-2.0"
] | null | null | null | SCF.py | datala/seeClickFix-loader | 884bae2cb3c4585d69f9420ce68a843f4665d121 | [
"Apache-2.0"
] | null | null | null | SCF.py | datala/seeClickFix-loader | 884bae2cb3c4585d69f9420ce68a843f4665d121 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 3 11:23:21 2017
@author: Cerina
"""
#import json
import sys
import requests
import gspread
from oauth2client.service_account import ServiceAccountCredentials
scope = "https://spreadsheets.google.com/feeds"
credentials = ServiceAccountCredentials.from_json_keyfile_name... | 32.765625 | 106 | 0.58846 |
795bc2575bea2a594325c327430619f3f7d8149b | 5,496 | py | Python | model/attention.py | nSamsow/CSNLN | 309c7451828c8878b85577ee78d4ecd465c045f0 | [
"MIT"
] | null | null | null | model/attention.py | nSamsow/CSNLN | 309c7451828c8878b85577ee78d4ecd465c045f0 | [
"MIT"
] | null | null | null | model/attention.py | nSamsow/CSNLN | 309c7451828c8878b85577ee78d4ecd465c045f0 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils import spectral_norm as spectral_norm_fn
from torch.nn.utils import weight_norm as weight_norm_fn
from PIL import Image
from torchvision import transforms
from torchvision import utils as vutils
from model import common
from model.ut... | 44.682927 | 135 | 0.579148 |
795bc2dab06dfadbd8b2fe39743610e9164efa96 | 475 | py | Python | missingnumberinarray.py | idvipul1999/Microsoft_GeeksforGeeks | 9e294f3beb986bf9eae00e22a3599551b4808008 | [
"MIT"
] | null | null | null | missingnumberinarray.py | idvipul1999/Microsoft_GeeksforGeeks | 9e294f3beb986bf9eae00e22a3599551b4808008 | [
"MIT"
] | null | null | null | missingnumberinarray.py | idvipul1999/Microsoft_GeeksforGeeks | 9e294f3beb986bf9eae00e22a3599551b4808008 | [
"MIT"
] | null | null | null | import math
import os
import random
import re
import sys
def missing(arr):
#CODE 1 is here
prev=arr[0]
for i in range(1,len(arr)):
diff = abs(arr[i]-prev)
if(diff==1):
prev = arr[i]
else:
return(arr[i]-1)
t = int(input())
arr=[]
for j in range(0,t):
n = ... | 17.592593 | 50 | 0.543158 |
795bc47aa9a4335e893a22643bfb4e5b5772170f | 1,201 | py | Python | import_savedmodel_to_tfb.py | yhwang/tf-utility | 728f42fa7b3e1b8bbcaf5e9514267f7b8b298e16 | [
"Apache-2.0"
] | null | null | null | import_savedmodel_to_tfb.py | yhwang/tf-utility | 728f42fa7b3e1b8bbcaf5e9514267f7b8b298e16 | [
"Apache-2.0"
] | null | null | null | import_savedmodel_to_tfb.py | yhwang/tf-utility | 728f42fa7b3e1b8bbcaf5e9514267f7b8b298e16 | [
"Apache-2.0"
] | null | null | null | import sys
import argparse
import tensorflow as tf
from tensorflow.python.platform import app
from tensorflow.python.summary import summary
def import_to_tensorboard(savedmodel_dir, tag, log_dir):
"""Load a SavedModel and export it to tensorbloard log dir
Args:
savedmodel_dir: The location of the savedmodel
... | 33.361111 | 87 | 0.713572 |
795bc4868c8b92eefcaa2f621e2c1f89a8c7eacc | 2,273 | py | Python | tests/transformers/map_keys_test.py | santunioni/transformer | a34b8b40cba81382c8483d590050c3e36cee5bff | [
"MIT"
] | 1 | 2022-02-21T22:15:08.000Z | 2022-02-21T22:15:08.000Z | tests/transformers/map_keys_test.py | santunioni/Transformer | a34b8b40cba81382c8483d590050c3e36cee5bff | [
"MIT"
] | null | null | null | tests/transformers/map_keys_test.py | santunioni/Transformer | a34b8b40cba81382c8483d590050c3e36cee5bff | [
"MIT"
] | null | null | null | import pytest
from resources import credito
from transformer.transformers.map_keys import MapKeys, MapKeysConfig
@pytest.fixture
def metadata_credito():
return {"type": "deal", "origin": "pipedrive"}
@pytest.fixture(scope="session")
def target_data():
return credito.target_data()
@pytest.fixture(scope="s... | 31.569444 | 134 | 0.648922 |
795bc4aebc7e52e17fbc251ac32cec56aeac1336 | 5,033 | py | Python | examples/mnist_vae.py | joshuagornall/jax | c97cd0a526c12ad81988fd58c1c66df4ddd71813 | [
"ECL-2.0",
"Apache-2.0"
] | 17,375 | 2018-11-18T02:15:55.000Z | 2022-03-31T23:49:46.000Z | examples/mnist_vae.py | joshuagornall/jax | c97cd0a526c12ad81988fd58c1c66df4ddd71813 | [
"ECL-2.0",
"Apache-2.0"
] | 5,018 | 2018-11-22T17:04:07.000Z | 2022-03-31T23:36:25.000Z | examples/mnist_vae.py | joshuagornall/jax | c97cd0a526c12ad81988fd58c1c66df4ddd71813 | [
"ECL-2.0",
"Apache-2.0"
] | 1,805 | 2018-11-21T10:13:53.000Z | 2022-03-31T23:49:19.000Z | # Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.471014 | 80 | 0.722631 |
795bc4ddc7ac0278618fdb4f39277b43deff2941 | 3,181 | py | Python | BEASF.py | haddomou/COVID-CXNet | d7546401b38a2d2ca70ee98aa7ebd9e23c3aa05c | [
"MIT"
] | 2 | 2020-09-07T06:03:11.000Z | 2022-02-22T22:17:23.000Z | BEASF.py | ShubhamAggarwal2000/COVID-CXNet | 1baa9f7b8f4af86aab42dd05e44a3357813662d6 | [
"MIT"
] | null | null | null | BEASF.py | ShubhamAggarwal2000/COVID-CXNet | 1baa9f7b8f4af86aab42dd05e44a3357813662d6 | [
"MIT"
] | null | null | null | import numpy as np
import copy
def subhist(image_pdf, minimum, maximum, normalize):
"""
Compute the subhistogram between [minimum, maximum] of a given histogram image_pdf
:param image_pdf: numpy.array
:param minimum: int
:param maximum: int
:param normalize: boolean
:return: numpy.array
... | 32.793814 | 107 | 0.614587 |
795bc519da533731fcf545dfb06e3539e5078b90 | 6,416 | py | Python | nova/tests/unit/scheduler/weights/test_weights_affinity.py | lixiaoy1/nova | 357b8b38e88300948bb2e07d1bbaabd1e9d7b60e | [
"Apache-2.0"
] | 1 | 2018-08-19T02:13:16.000Z | 2018-08-19T02:13:16.000Z | nova/tests/unit/scheduler/weights/test_weights_affinity.py | lixiaoy1/nova | 357b8b38e88300948bb2e07d1bbaabd1e9d7b60e | [
"Apache-2.0"
] | 2 | 2021-03-31T19:25:14.000Z | 2021-12-13T20:15:06.000Z | nova/tests/unit/scheduler/weights/test_weights_affinity.py | lixiaoy1/nova | 357b8b38e88300948bb2e07d1bbaabd1e9d7b60e | [
"Apache-2.0"
] | 1 | 2020-07-22T22:15:29.000Z | 2020-07-22T22:15:29.000Z | # Copyright (c) 2015 Ericsson AB
# 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 ... | 40.1 | 78 | 0.590399 |
795bc59e192525653ef717c01e654b89793e1b03 | 4,253 | py | Python | shortener/shortener/settings/production.py | siauPatrick/shortener_project | 2438e28a2bab7c37aff2f06185b14ede93422567 | [
"MIT"
] | null | null | null | shortener/shortener/settings/production.py | siauPatrick/shortener_project | 2438e28a2bab7c37aff2f06185b14ede93422567 | [
"MIT"
] | null | null | null | shortener/shortener/settings/production.py | siauPatrick/shortener_project | 2438e28a2bab7c37aff2f06185b14ede93422567 | [
"MIT"
] | null | null | null | """Production settings and globals."""
from os import environ
import dj_database_url
from S3 import CallingFormat
from base import *
# Normally you should not import ANYTHING from Django directly
# into your settings, but ImproperlyConfigured is an exception.
from django.core.exceptions import ImproperlyConfigured... | 30.163121 | 99 | 0.652481 |
795bc7aa0fd4c54c49f180ea4c33eadf38155117 | 478 | py | Python | 35-search-insert-position/35-search-insert-position.py | kayanmorshed/Leetcode | 233e50a069a69fbe126dc86d293d4024eb070b8a | [
"MIT"
] | null | null | null | 35-search-insert-position/35-search-insert-position.py | kayanmorshed/Leetcode | 233e50a069a69fbe126dc86d293d4024eb070b8a | [
"MIT"
] | null | null | null | 35-search-insert-position/35-search-insert-position.py | kayanmorshed/Leetcode | 233e50a069a69fbe126dc86d293d4024eb070b8a | [
"MIT"
] | null | null | null | class Solution:
def searchInsert(self, nums: List[int], target: int) -> int:
left, right = -1, len(nums)
while left < right:
mid = (left + right) // 2
if mid < 0: return 0
if nums[mid] == target:
return mid
... | 23.9 | 66 | 0.384937 |
795bc7e2d4bd3fbacc5ad11facc1a8e1abd634e1 | 3,125 | py | Python | backend/task/models.py | crowdbotics-apps/mosistant-28436 | 010ae78f47bdd5490d69bf36e896590d158d2988 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/task/models.py | crowdbotics-apps/mosistant-28436 | 010ae78f47bdd5490d69bf36e896590d158d2988 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/task/models.py | crowdbotics-apps/mosistant-28436 | 010ae78f47bdd5490d69bf36e896590d158d2988 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from django.conf import settings
from django.db import models
class Message(models.Model):
"Generated Model"
customer = models.ForeignKey(
"task_profile.CustomerProfile",
on_delete=models.CASCADE,
related_name="message_customer",
)
tasker = models.ForeignKey(
"task_prof... | 24.038462 | 47 | 0.61984 |
795bc8141031b2985a2ac02f741a1fa3b0cc92e2 | 158 | py | Python | login/admin.py | yueminghai/login-register | 90f103901cb85d1dd783fc05844269d448a1caa8 | [
"Apache-2.0"
] | null | null | null | login/admin.py | yueminghai/login-register | 90f103901cb85d1dd783fc05844269d448a1caa8 | [
"Apache-2.0"
] | null | null | null | login/admin.py | yueminghai/login-register | 90f103901cb85d1dd783fc05844269d448a1caa8 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
# Register your models here.
from . import models
admin.site.register(models.User)
admin.site.register(models.ConfirmString) | 26.333333 | 41 | 0.816456 |
795bc8bc177d4643fa0792f54b27550dee0fe953 | 1,706 | py | Python | v4/ResUnpack.py | qwerty472123/pakUnpacker | b1ed337375d899f656fd2705961dc39a1c43f451 | [
"MIT"
] | 30 | 2018-05-15T02:35:39.000Z | 2022-03-21T09:24:45.000Z | v4/ResUnpack.py | qwerty472123/pakUnpacker | b1ed337375d899f656fd2705961dc39a1c43f451 | [
"MIT"
] | 1 | 2019-02-20T18:41:35.000Z | 2019-02-20T18:41:35.000Z | v4/ResUnpack.py | qwerty472123/pakUnpacker | b1ed337375d899f656fd2705961dc39a1c43f451 | [
"MIT"
] | 16 | 2018-06-11T08:05:32.000Z | 2021-03-04T02:15:51.000Z | import collections
import struct
import sys
import os
def UnpackDataPack(input_file):
uc = open(input_file,'rb')
data = uc.read()
original_data = data
version, num_entries, encoding = struct.unpack("<IIB", data[:9])
if version != 4:
raise Exception("Wrong file version in ", input_file)
data =... | 34.816327 | 240 | 0.582063 |
795bc8c8f25b06722287b5937acef958391568b6 | 3,311 | py | Python | nipyapi/nifi/models/flow_entity.py | jyoti-arora1991/nipyapi | ad0b2bdfd0e65049df7cb45042402201ec924e1e | [
"Apache-2.0"
] | null | null | null | nipyapi/nifi/models/flow_entity.py | jyoti-arora1991/nipyapi | ad0b2bdfd0e65049df7cb45042402201ec924e1e | [
"Apache-2.0"
] | null | null | null | nipyapi/nifi/models/flow_entity.py | jyoti-arora1991/nipyapi | ad0b2bdfd0e65049df7cb45042402201ec924e1e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
NiFi Rest Api
The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, ... | 26.701613 | 479 | 0.525823 |
795bc9120b193e941b608f1530d681ff5d9b1fe9 | 285 | py | Python | my-shop/myshop/serializers.py | tomaszd/django-shop | 6db26e8cb8cdd86281c6b15ac25223d324b9e3c1 | [
"BSD-3-Clause"
] | null | null | null | my-shop/myshop/serializers.py | tomaszd/django-shop | 6db26e8cb8cdd86281c6b15ac25223d324b9e3c1 | [
"BSD-3-Clause"
] | null | null | null | my-shop/myshop/serializers.py | tomaszd/django-shop | 6db26e8cb8cdd86281c6b15ac25223d324b9e3c1 | [
"BSD-3-Clause"
] | null | null | null |
from shop.serializers.bases import ProductSerializer
class ProductDetailSerializer(ProductSerializer):
class Meta(ProductSerializer.Meta):
fields = ['product_name', 'slug', 'unit_price', 'manufacturer', 'card_type', 'speed',
'product_code', 'storage']
| 31.666667 | 93 | 0.698246 |
795bca1e4b1b43ffeb3ab7aafed3ae76857b84bf | 90 | py | Python | src/docker_flask/docker/conf.py | Smeaol22/docker_flask | f6a6bae1c92a8d4f81de310406d9868a74f8af7b | [
"BSD-2-Clause"
] | null | null | null | src/docker_flask/docker/conf.py | Smeaol22/docker_flask | f6a6bae1c92a8d4f81de310406d9868a74f8af7b | [
"BSD-2-Clause"
] | null | null | null | src/docker_flask/docker/conf.py | Smeaol22/docker_flask | f6a6bae1c92a8d4f81de310406d9868a74f8af7b | [
"BSD-2-Clause"
] | null | null | null | DOCKER_IMAGE = "docker_flask:0.0.1"
EXPOSE_PORT = 8180
BASE_CONTAINER_ADDRESS = '127.0.0'
| 22.5 | 35 | 0.766667 |
795bca2e144640be3e98bd5aac1dbae52f4dfc4d | 83 | py | Python | Domains/Python/01 - Introduction/Arithmetic Operators/solution.py | abhinavgunwant/hackerrank-solutions | e016366cb6a9fac562a754d2b230fef907080733 | [
"MIT"
] | 1 | 2019-06-09T00:04:56.000Z | 2019-06-09T00:04:56.000Z | Domains/Python/01 - Introduction/Arithmetic Operators/solution.py | abhinavgunwant/hackerrank-solutions | e016366cb6a9fac562a754d2b230fef907080733 | [
"MIT"
] | 19 | 2019-06-09T14:45:52.000Z | 2019-06-17T18:52:53.000Z | Domains/Python/01 - Introduction/Arithmetic Operators/solution.py | abhinavgunwant/hackerrank-solutions | e016366cb6a9fac562a754d2b230fef907080733 | [
"MIT"
] | null | null | null | # Get a
a = int(input())
# Get b
b = int(input())
print(a+b)
print(a-b)
print(a*b) | 10.375 | 16 | 0.566265 |
795bcb38a2192072c8aee722a7d703f93d4a8c26 | 4,359 | py | Python | source/interprocedural_analyses/taint/test/integration/taint_in_taint_out.py | ddainesefb/pyre-check | dedd67493f4334b6b5bf446260ed364b35b4a6aa | [
"MIT"
] | null | null | null | source/interprocedural_analyses/taint/test/integration/taint_in_taint_out.py | ddainesefb/pyre-check | dedd67493f4334b6b5bf446260ed364b35b4a6aa | [
"MIT"
] | 1 | 2021-08-16T12:11:37.000Z | 2021-08-16T12:11:37.000Z | source/interprocedural_analyses/taint/test/integration/taint_in_taint_out.py | abishekvashok/pyre-check | 20ae7df26216db06fcb17246f6125f4b6655890f | [
"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.
from builtins import __test_sink, __test_source
from typing import Dict, List, Tuple
def some_service(id):
...
def _unpack(tuple):
... | 19.373333 | 83 | 0.590961 |
795bcb612af9979613f4b9db3686d9152faeac50 | 833 | py | Python | djangopwa/urls.py | IsmaelBarros/Django_pwa | 7d903dda9c0e3f35d7d6df7b0350b0856f36a883 | [
"MIT"
] | null | null | null | djangopwa/urls.py | IsmaelBarros/Django_pwa | 7d903dda9c0e3f35d7d6df7b0350b0856f36a883 | [
"MIT"
] | null | null | null | djangopwa/urls.py | IsmaelBarros/Django_pwa | 7d903dda9c0e3f35d7d6df7b0350b0856f36a883 | [
"MIT"
] | null | null | null | """djangopwa URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | 34.708333 | 77 | 0.695078 |
795bcbac231b87126d0462b08df549784625204a | 485 | py | Python | kaffepause/breaks/enums.py | Eirsteir/kaffepause | 77535f057e68d575831e3a44f36285ab2fe621d4 | [
"MIT"
] | null | null | null | kaffepause/breaks/enums.py | Eirsteir/kaffepause | 77535f057e68d575831e3a44f36285ab2fe621d4 | [
"MIT"
] | 2 | 2022-02-28T21:04:22.000Z | 2022-03-01T21:05:37.000Z | kaffepause/breaks/enums.py | Eirsteir/kaffepause | 77535f057e68d575831e3a44f36285ab2fe621d4 | [
"MIT"
] | null | null | null | from django.db import models
from django.utils.translation import gettext as _
from kaffepause.common.bases import NeomodelRelationshipEnum
class InvitationReply(models.TextChoices):
ACCEPTED = "accepted"
DECLINED = "declined"
IGNORED = "ignored"
class BreakRelationship(NeomodelRelationshipEnum):
P... | 24.25 | 60 | 0.715464 |
795bcbcf5772221d7f5fb9d5a52c8acf2c1ec97c | 687 | py | Python | esgmetrics/esgscraper/__main__.py | shweta-29/Sustainability_Company_Information | 293091b1ae168d4c1bfa6e2fda42d80daabe10a3 | [
"MIT"
] | 14 | 2021-09-01T15:46:50.000Z | 2022-03-28T00:15:30.000Z | esgmetrics/esgscraper/__main__.py | shweta-29/Sustainability_Company_Information | 293091b1ae168d4c1bfa6e2fda42d80daabe10a3 | [
"MIT"
] | null | null | null | esgmetrics/esgscraper/__main__.py | shweta-29/Sustainability_Company_Information | 293091b1ae168d4c1bfa6e2fda42d80daabe10a3 | [
"MIT"
] | 4 | 2021-12-18T06:50:57.000Z | 2022-03-30T11:25:18.000Z | """
This script allows the user to scrape the ESG, CSR ratings and financial
metrics of the companies from the following websites: SustainAnalytics,
S&P Global, CSR HUB, MSCI, Yahoo Finance
This tool accepts Company's names list in comma separated value
file (.csv) format as input.
The output is a .csv file with Com... | 31.227273 | 76 | 0.791849 |
795bccb800e15a72f566065a8eaa253ab2935164 | 18,905 | py | Python | tensorflow/contrib/distributions/python/ops/shape.py | danielgordon10/tensorflow | 395cfc42ee3c5842f5383f4049674c012998b133 | [
"Apache-2.0"
] | 1 | 2018-11-15T08:44:10.000Z | 2018-11-15T08:44:10.000Z | tensorflow/contrib/distributions/python/ops/shape.py | danielgordon10/tensorflow | 395cfc42ee3c5842f5383f4049674c012998b133 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/distributions/python/ops/shape.py | danielgordon10/tensorflow | 395cfc42ee3c5842f5383f4049674c012998b133 | [
"Apache-2.0"
] | 1 | 2021-03-06T02:46:54.000Z | 2021-03-06T02:46:54.000Z | # Copyright 2016 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... | 40.223404 | 80 | 0.645332 |
795bcdc2d69298c7e5b47a60b5ae84cb4492124d | 6,455 | py | Python | QUBEKit/parametrisation/xml_protein.py | cole-group/QUBEK | 50f8a9c06396f2222a6fe058bf764a6bd7021e38 | [
"MIT"
] | 14 | 2018-10-19T12:32:39.000Z | 2022-01-07T05:06:06.000Z | QUBEKit/parametrisation/xml_protein.py | cole-group/QUBEK | 50f8a9c06396f2222a6fe058bf764a6bd7021e38 | [
"MIT"
] | null | null | null | QUBEKit/parametrisation/xml_protein.py | cole-group/QUBEK | 50f8a9c06396f2222a6fe058bf764a6bd7021e38 | [
"MIT"
] | 6 | 2019-02-26T13:32:58.000Z | 2021-06-01T15:11:27.000Z | #!/usr/bin/env python3
from QUBEKit.parametrisation.base_parametrisation import Parametrisation
from QUBEKit.utils.decorators import for_all_methods, timer_logger
from collections import OrderedDict
from copy import deepcopy
from simtk.openmm import app, XmlSerializer
import xml.etree.ElementTree as ET
@for_all_me... | 49.274809 | 138 | 0.630209 |
795bcded1ff62164a683c5d5ecd8c628bb597bb1 | 698 | py | Python | scripts/dump_registry.py | shakfu/py2max | c88c80510ca7ca1bd13314cbf8ccfe57d788fec0 | [
"Unlicense"
] | 1 | 2021-07-24T09:18:19.000Z | 2021-07-24T09:18:19.000Z | scripts/dump_registry.py | shakfu/py2max | c88c80510ca7ca1bd13314cbf8ccfe57d788fec0 | [
"Unlicense"
] | null | null | null | scripts/dump_registry.py | shakfu/py2max | c88c80510ca7ca1bd13314cbf8ccfe57d788fec0 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
from pathlib import Path
#sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
from py2max import Patcher
from py2max.registry import objects
def chunks(lst, n):
"""Yield successive n-sized chunks from lst."""
for i in range(0, len(lst), n):
yield... | 23.266667 | 63 | 0.648997 |
795bcf198c00bec109c3e24ca768de5c5f32e578 | 286 | py | Python | yt_aspect/__init__.py | chrishavlin/yt_aspect | 01173da347fcef4abf201f2da3c8233b37f23892 | [
"MIT"
] | 1 | 2021-12-10T20:39:13.000Z | 2021-12-10T20:39:13.000Z | yt_aspect/__init__.py | data-exp-lab/yt_aspect | 01173da347fcef4abf201f2da3c8233b37f23892 | [
"MIT"
] | 6 | 2021-09-07T19:54:16.000Z | 2021-09-16T20:18:51.000Z | yt_aspect/__init__.py | chrishavlin/yt_aspect | 01173da347fcef4abf201f2da3c8233b37f23892 | [
"MIT"
] | 1 | 2021-09-15T21:55:57.000Z | 2021-09-15T21:55:57.000Z | from .data_structures import ASPECTDataset # noqa: F401
from .data_structures import ASPECTUnstructuredIndex # noqa: F401
from .data_structures import ASPECTUnstructuredMesh # noqa: F401
from .fields import ASPECTFieldInfo # noqa: F401
from .io import IOHandlerASPECT # noqa: F401
| 47.666667 | 66 | 0.807692 |
795bcf1abe937a74908e4b0036f61b9e21fe175c | 1,695 | py | Python | src/githistorian/graph.py | drachlyznardh/git-historian | f3691c47d26e65aff25f29283ef3b940de0d2697 | [
"MIT"
] | null | null | null | src/githistorian/graph.py | drachlyznardh/git-historian | f3691c47d26e65aff25f29283ef3b940de0d2697 | [
"MIT"
] | 2 | 2018-08-11T09:17:14.000Z | 2018-08-11T09:18:12.000Z | src/githistorian/graph.py | drachlyznardh/git-historian | f3691c47d26e65aff25f29283ef3b940de0d2697 | [
"MIT"
] | null | null | null | # encoding: utf-8
from __future__ import print_function
# Silencing BROKEN PIPE errors
from signal import signal, SIGPIPE, SIG_DFL
signal(SIGPIPE, SIG_DFL)
from .row import unroll as row_unroll
from .column import unroll as column_unroll
from .layout import Layout
class VisitOrder:
def __init__ (self):
self.cont... | 20.421687 | 77 | 0.692625 |
795bcf64980177bf468906c238b796354923fd42 | 141 | py | Python | passwordmanager/apps.py | percevalm/aumyproject | b24b38005188ce9dd41ed663cf54dad5464afef3 | [
"bzip2-1.0.6"
] | null | null | null | passwordmanager/apps.py | percevalm/aumyproject | b24b38005188ce9dd41ed663cf54dad5464afef3 | [
"bzip2-1.0.6"
] | 16 | 2020-03-24T17:30:37.000Z | 2022-03-11T23:57:41.000Z | passwordmanager/apps.py | percevalm/aumyproject | b24b38005188ce9dd41ed663cf54dad5464afef3 | [
"bzip2-1.0.6"
] | null | null | null | from django.apps import AppConfig
class PasswordmanagerConfig(AppConfig):
name = 'passwordmanager'
verbose_name ='Password Manager' | 23.5 | 39 | 0.780142 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.