hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b252bb8863e2cde9dc1c8cf3fba5014be866dbed | 5,607 | py | Python | gnuradio-3.7.13.4/gr-qtgui/apps/plot_spectrogram_base.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | 1 | 2021-03-09T07:32:37.000Z | 2021-03-09T07:32:37.000Z | gnuradio-3.7.13.4/gr-qtgui/apps/plot_spectrogram_base.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | null | null | null | gnuradio-3.7.13.4/gr-qtgui/apps/plot_spectrogram_base.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# ... | 32.789474 | 97 | 0.619939 |
b252ce6e7da24bbb6a02a3119c677f69f7ea2e58 | 4,699 | py | Python | unused/csv_slicer_crop_threshold.py | eufmike/storm_image_processing | 076335519be0be3b66d289a180421d36770ab820 | [
"CC-BY-4.0"
] | null | null | null | unused/csv_slicer_crop_threshold.py | eufmike/storm_image_processing | 076335519be0be3b66d289a180421d36770ab820 | [
"CC-BY-4.0"
] | null | null | null | unused/csv_slicer_crop_threshold.py | eufmike/storm_image_processing | 076335519be0be3b66d289a180421d36770ab820 | [
"CC-BY-4.0"
] | null | null | null | # %%
# slice the csv according to the frame size
import os, sys
import pandas as pd
# from tkinter import *
# Functions Section Begins ----------------------------------------------------- #
def dircheck(targetpaths):
"""
dircheck checks the target folder and create the folder if it does not exist.
targetdirlist: l... | 32.631944 | 100 | 0.683337 |
b25374f98c200b684bc06d7e6e70a0fae5c15a98 | 4,682 | py | Python | doodle.py | plasticuproject/DoodleNet | 1abbf05b2302ce6d8a47d369ddb45d4c5a0dc26d | [
"MIT"
] | 2 | 2020-03-16T01:26:42.000Z | 2020-06-19T12:04:37.000Z | doodle.py | plasticuproject/DoodleNet | 1abbf05b2302ce6d8a47d369ddb45d4c5a0dc26d | [
"MIT"
] | null | null | null | doodle.py | plasticuproject/DoodleNet | 1abbf05b2302ce6d8a47d369ddb45d4c5a0dc26d | [
"MIT"
] | null | null | null | import pygame
import random
import numpy as np
import cv2
from dutil import add_pos
#User constants
device = "gpu"
model_fname = 'Model.h5'
background_color = (210, 210, 210)
input_w = 144
input_h = 192
image_scale = 3
image_padding = 10
mouse_interps = 10
#Derived constants
drawing_w = input_w * image_scale
drawing... | 30.012821 | 90 | 0.683682 |
b253aa300dbf2d178cf0b2b7ef4c04bdb3c8a3ab | 2,259 | py | Python | tests/dmon/test_dmon.py | Bounti/avatar2_dmon | c24a908b2cd3faea290380b4d0364d23b4430d2e | [
"Apache-2.0"
] | null | null | null | tests/dmon/test_dmon.py | Bounti/avatar2_dmon | c24a908b2cd3faea290380b4d0364d23b4430d2e | [
"Apache-2.0"
] | null | null | null | tests/dmon/test_dmon.py | Bounti/avatar2_dmon | c24a908b2cd3faea290380b4d0364d23b4430d2e | [
"Apache-2.0"
] | null | null | null | from avatar2 import *
import sys
import os
import logging
import time
import argparse
import subprocess
import struct
import ctypes
from random import randint
# For profiling
import pstats
import numpy as np
import numpy.testing as npt
logging.basicConfig(filename='/tmp/inception-tests.log', level=logging.INFO)
GDB... | 29.337662 | 146 | 0.698097 |
b255a55b50c0a4e6111dcdc38c9b04c04072f949 | 7,716 | py | Python | lexer/scanner.py | lohhans/Compiladores-2020.4 | c196c11d0c1ec3b25b54b01e0729474205f328ed | [
"MIT"
] | 3 | 2021-01-08T03:41:35.000Z | 2021-01-11T04:22:31.000Z | lexer/scanner.py | laisy/Compiladores-2020.4 | c196c11d0c1ec3b25b54b01e0729474205f328ed | [
"MIT"
] | 1 | 2021-01-17T07:56:56.000Z | 2021-01-17T07:56:56.000Z | lexer/scanner.py | laisy/Compiladores-2020.4 | c196c11d0c1ec3b25b54b01e0729474205f328ed | [
"MIT"
] | 3 | 2021-01-08T00:13:27.000Z | 2021-09-09T13:56:54.000Z | from lexer.token import Token
| 31.365854 | 100 | 0.424313 |
b256d93e962708f149cc2aba7b423f5e16306972 | 2,295 | py | Python | tests/test_laser.py | chiragjn/laserembeddings | 37f2aaf723966f24fe0a8d473241725fba46f691 | [
"BSD-3-Clause"
] | null | null | null | tests/test_laser.py | chiragjn/laserembeddings | 37f2aaf723966f24fe0a8d473241725fba46f691 | [
"BSD-3-Clause"
] | null | null | null | tests/test_laser.py | chiragjn/laserembeddings | 37f2aaf723966f24fe0a8d473241725fba46f691 | [
"BSD-3-Clause"
] | null | null | null | import os
import pytest
import numpy as np
from laserembeddings import Laser
SIMILARITY_TEST = os.getenv('SIMILARITY_TEST')
| 32.785714 | 151 | 0.57342 |
b2587d1aad26d95bdbf9bbeb64895092e8199eaa | 1,467 | py | Python | alipay/aop/api/domain/TaxReceiptOnceInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/TaxReceiptOnceInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/TaxReceiptOnceInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
| 26.196429 | 83 | 0.611452 |
b2590f93012b66c0c656914441825de752b36b9c | 1,371 | py | Python | Make-Sense-of-Census/code.py | NishantNair14/greyatom-python-for-data-science | e269530300c996eb67e7c1f2317d0b279b8091ae | [
"MIT"
] | null | null | null | Make-Sense-of-Census/code.py | NishantNair14/greyatom-python-for-data-science | e269530300c996eb67e7c1f2317d0b279b8091ae | [
"MIT"
] | null | null | null | Make-Sense-of-Census/code.py | NishantNair14/greyatom-python-for-data-science | e269530300c996eb67e7c1f2317d0b279b8091ae | [
"MIT"
] | null | null | null | # --------------
# Importing header files
import numpy as np
# Path of the file has been stored in variable called 'path'
#New record
new_record=[[50, 9, 4, 1, 0, 0, 40, 0]]
#Code starts here
data_file='subset_1000.csv'
data=np.genfromtxt(path,delimiter=",",skip_header=1)
print(data)
census=np.conc... | 19.585714 | 61 | 0.676878 |
b259ceb8b82845e18e8b6159d8f807dea2a352fc | 1,478 | py | Python | scripts/rgb2labels.py | theRealSuperMario/supermariopy | 9fff8275278ff26caff50da86109c25d276bb30b | [
"MIT"
] | 36 | 2019-07-14T16:10:37.000Z | 2022-03-29T10:11:03.000Z | scripts/rgb2labels.py | theRealSuperMario/supermariopy | 9fff8275278ff26caff50da86109c25d276bb30b | [
"MIT"
] | 3 | 2019-10-09T15:11:13.000Z | 2021-07-31T02:17:43.000Z | scripts/rgb2labels.py | theRealSuperMario/supermariopy | 9fff8275278ff26caff50da86109c25d276bb30b | [
"MIT"
] | 14 | 2019-08-29T14:11:54.000Z | 2022-03-06T13:41:56.000Z | import numpy as np
from matplotlib import pyplot as plt
"""
https://stackoverflow.com/questions/42750910/convert-rgb-image-to-index-image/62980021#62980021
convert semantic labels from RGB coding to index coding
Steps:
1. define COLORS (see below)
2. hash colors
3. run rgb2index(segmentation_rgb)
see example below
T... | 28.980392 | 95 | 0.696888 |
b25a1d4640dfacab5e05d7eaa4739062eb18d83d | 9,857 | py | Python | app/models/template.py | FireFragment/memegen | f0a1b3ba465b8cd68a873951ab50eeaa91d57a35 | [
"MIT"
] | null | null | null | app/models/template.py | FireFragment/memegen | f0a1b3ba465b8cd68a873951ab50eeaa91d57a35 | [
"MIT"
] | null | null | null | app/models/template.py | FireFragment/memegen | f0a1b3ba465b8cd68a873951ab50eeaa91d57a35 | [
"MIT"
] | null | null | null | import asyncio
import shutil
from functools import cached_property
from pathlib import Path
import aiopath
from datafiles import datafile, field
from furl import furl
from sanic import Request
from sanic.log import logger
from .. import settings, utils
from ..types import Dimensions
from .overlay import Overlay
from ... | 32.747508 | 84 | 0.573501 |
b25a3c66ad289a972f5766ff0bd4fc4b5518f26d | 833 | py | Python | corpora_toolbox/utils/io.py | laurahzdz/corpora_toolbox | 14a14534df1d80e6a7b2f37ce5f547f1cb5e81a4 | [
"MIT"
] | null | null | null | corpora_toolbox/utils/io.py | laurahzdz/corpora_toolbox | 14a14534df1d80e6a7b2f37ce5f547f1cb5e81a4 | [
"MIT"
] | null | null | null | corpora_toolbox/utils/io.py | laurahzdz/corpora_toolbox | 14a14534df1d80e6a7b2f37ce5f547f1cb5e81a4 | [
"MIT"
] | null | null | null | import codecs
import os
# Function to save a string into a file
# Function to read all files in a dir with a specific extension
# Function to read a file into a string
# Function to create a directory
| 25.242424 | 68 | 0.698679 |
b25bc6b4a0128eafc07471d9e7edfbe8c99fcc86 | 4,108 | py | Python | Games/WarCardGame.py | AyselHavutcu/PythonGames | 8144f56a4c015e43a94ab529244475c3db9adee4 | [
"MIT"
] | null | null | null | Games/WarCardGame.py | AyselHavutcu/PythonGames | 8144f56a4c015e43a94ab529244475c3db9adee4 | [
"MIT"
] | null | null | null | Games/WarCardGame.py | AyselHavutcu/PythonGames | 8144f56a4c015e43a94ab529244475c3db9adee4 | [
"MIT"
] | null | null | null | import random
suits = ('Hearts', 'Diamonds', 'Spades', 'Clubs')
ranks = ('Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Jack', 'Queen', 'King', 'Ace')
values = {'Two':2, 'Three':3, 'Four':4, 'Five':5, 'Six':6, 'Seven':7, 'Eight':8,
'Nine':9, 'Ten':10, 'Jack':11, 'Queen':12, 'King'... | 30.42963 | 115 | 0.595424 |
b25bc80a13089b17ce70ec72af0643fdd3cdbaca | 16,503 | py | Python | startracker/beast/beast.py | Oregon-Tech-Rocketry-and-Aerospace/space-debris-card | d72303436b6cb1a409d5217d0518db0b0335d10a | [
"MIT"
] | null | null | null | startracker/beast/beast.py | Oregon-Tech-Rocketry-and-Aerospace/space-debris-card | d72303436b6cb1a409d5217d0518db0b0335d10a | [
"MIT"
] | null | null | null | startracker/beast/beast.py | Oregon-Tech-Rocketry-and-Aerospace/space-debris-card | d72303436b6cb1a409d5217d0518db0b0335d10a | [
"MIT"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
raise Runtime... | 39.57554 | 150 | 0.712719 |
b25c863ab03cce95c0e614b48a6296f7ce35eeb0 | 2,522 | py | Python | development_playgrounds/transformation_planar_flow_test.py | ai-di/Brancher | 01d51137b0e6fc81512994c21cc3a19287353767 | [
"MIT"
] | 208 | 2019-06-15T13:48:40.000Z | 2021-10-16T05:03:46.000Z | development_playgrounds/transformation_planar_flow_test.py | ai-di/Brancher | 01d51137b0e6fc81512994c21cc3a19287353767 | [
"MIT"
] | 18 | 2019-06-17T11:22:13.000Z | 2019-09-26T10:45:59.000Z | development_playgrounds/transformation_planar_flow_test.py | ai-di/Brancher | 01d51137b0e6fc81512994c21cc3a19287353767 | [
"MIT"
] | 32 | 2019-06-15T19:08:53.000Z | 2020-02-16T13:39:41.000Z | import matplotlib.pyplot as plt
import numpy as np
import torch
from brancher.variables import ProbabilisticModel
from brancher.standard_variables import NormalVariable, DeterministicVariable, LogNormalVariable
import brancher.functions as BF
from brancher.visualizations import plot_density
from brancher.transformatio... | 31.525 | 96 | 0.676447 |
b25e6638db74f47962fb3638fca683037c34ed82 | 3,837 | py | Python | src/onegov/people/models/membership.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/people/models/membership.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/people/models/membership.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.orm import Base
from onegov.core.orm.mixins import ContentMixin
from onegov.core.orm.mixins import TimestampMixin
from onegov.core.orm.mixins import UTCPublicationMixin
from onegov.core.orm.types import UUID
from onegov.search import ORMSearchable
from sqlalchemy import Column
from sqlalchemy import Fo... | 31.195122 | 84 | 0.661194 |
b2600eaa1ce4c305aedb5991b27f9834888e24d3 | 512 | py | Python | setup.py | drrobotk/multilateral_index_calc | 7b1cf2f178e4407167c90ed64743f9357da1d4f0 | [
"MIT"
] | 3 | 2021-11-27T00:00:56.000Z | 2022-02-14T09:58:33.000Z | setup.py | drrobotk/multilateral_index_calc | 7b1cf2f178e4407167c90ed64743f9357da1d4f0 | [
"MIT"
] | null | null | null | setup.py | drrobotk/multilateral_index_calc | 7b1cf2f178e4407167c90ed64743f9357da1d4f0 | [
"MIT"
] | null | null | null | from gettext import find
from setuptools import setup, find_packages
setup(
name='PriceIndexCalc',
version='0.1-dev9',
description='Price Index Calculator using bilateral and multilateral methods',
author='Dr. Usman Kayani',
url='https://github.com/drrobotk/PriceIndexCalc',
author_email='usman.... | 32 | 82 | 0.703125 |
b2604e0c3e4e10fe06252e6006860caca1b86c21 | 480 | py | Python | cryptofeed_werks/bigquery_storage/constants.py | globophobe/crypto-tick-data | 7ec5d1e136b9bc27ae936f55cf6ab7fe5e37bda4 | [
"MIT"
] | null | null | null | cryptofeed_werks/bigquery_storage/constants.py | globophobe/crypto-tick-data | 7ec5d1e136b9bc27ae936f55cf6ab7fe5e37bda4 | [
"MIT"
] | null | null | null | cryptofeed_werks/bigquery_storage/constants.py | globophobe/crypto-tick-data | 7ec5d1e136b9bc27ae936f55cf6ab7fe5e37bda4 | [
"MIT"
] | null | null | null | import os
try:
from google.cloud import bigquery # noqa
except ImportError:
BIGQUERY = False
else:
BIGQUERY = True
GOOGLE_APPLICATION_CREDENTIALS = "GOOGLE_APPLICATION_CREDENTIALS"
BIGQUERY_LOCATION = "BIGQUERY_LOCATION"
BIGQUERY_DATASET = "BIGQUERY_DATASET"
| 20 | 65 | 0.729167 |
b261027bb447ffd4f357da57323ee5f92a50b62a | 599 | py | Python | todoapp/todos/models.py | Buddheshwar-Nath-Keshari/test-ubuntu | 5e801ecd21503f160e52c091120a1a0c80c6600d | [
"MIT"
] | null | null | null | todoapp/todos/models.py | Buddheshwar-Nath-Keshari/test-ubuntu | 5e801ecd21503f160e52c091120a1a0c80c6600d | [
"MIT"
] | null | null | null | todoapp/todos/models.py | Buddheshwar-Nath-Keshari/test-ubuntu | 5e801ecd21503f160e52c091120a1a0c80c6600d | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import smart_text as smart_unicode
from django.utils.translation import ugettext_lazy as _
| 31.526316 | 81 | 0.707846 |
b2612d097a5e022b18b2c108ce7b4e1fdc16b1dc | 6,054 | py | Python | ultra_config_tests/unit_tests/test_ultra_config.py | timmartin19/ultra-config | 9af6a1313f49bf86b230be8e8beeb1c3479b9ab6 | [
"MIT"
] | 1 | 2017-01-05T18:32:22.000Z | 2017-01-05T18:32:22.000Z | ultra_config_tests/unit_tests/test_ultra_config.py | timmartin19/ultra-config | 9af6a1313f49bf86b230be8e8beeb1c3479b9ab6 | [
"MIT"
] | 239 | 2018-08-10T19:28:42.000Z | 2022-03-28T09:40:20.000Z | ultra_config_tests/unit_tests/test_ultra_config.py | timmartin19/ultra-config | 9af6a1313f49bf86b230be8e8beeb1c3479b9ab6 | [
"MIT"
] | 1 | 2019-06-10T14:14:15.000Z | 2019-06-10T14:14:15.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import unittest
from ultra_config import simple_config, load_json_file_settings, \
load_configparser_settings, load_python_object_settings, load_dict_setti... | 38.316456 | 103 | 0.66964 |
b264318ef812ccb5494cb1fbb53e013385e1b79c | 970 | py | Python | leetcode/87. Scramble String.py | CSU-FulChou/IOS_er | 4286677854c4afe61f745bfd087527e369402dc7 | [
"MIT"
] | 2 | 2020-02-10T15:20:03.000Z | 2020-02-23T07:23:57.000Z | leetcode/87. Scramble String.py | CSU-FulChou/IOS_er | 4286677854c4afe61f745bfd087527e369402dc7 | [
"MIT"
] | null | null | null | leetcode/87. Scramble String.py | CSU-FulChou/IOS_er | 4286677854c4afe61f745bfd087527e369402dc7 | [
"MIT"
] | 1 | 2020-02-24T04:46:44.000Z | 2020-02-24T04:46:44.000Z | # 2021.04.16 hard: | 33.448276 | 98 | 0.5 |
b264888cc9f1eb496c9df03db998069fffdf3f86 | 3,079 | py | Python | packaging/setup/plugins/ovirt-engine-setup/all-in-one/super_user.py | SunOfShine/ovirt-engine | 7684597e2d38ff854e629e5cbcbb9f21888cb498 | [
"Apache-2.0"
] | 1 | 2021-02-02T05:38:35.000Z | 2021-02-02T05:38:35.000Z | packaging/setup/plugins/ovirt-engine-setup/all-in-one/super_user.py | SunOfShine/ovirt-engine | 7684597e2d38ff854e629e5cbcbb9f21888cb498 | [
"Apache-2.0"
] | null | null | null | packaging/setup/plugins/ovirt-engine-setup/all-in-one/super_user.py | SunOfShine/ovirt-engine | 7684597e2d38ff854e629e5cbcbb9f21888cb498 | [
"Apache-2.0"
] | null | null | null | #
# ovirt-engine-setup -- ovirt engine setup
# Copyright (C) 2013 Red Hat, 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 r... | 28.775701 | 76 | 0.616759 |
b2666be5a27dd8e787680368717223bfc00f077e | 4,296 | py | Python | deploy/deploy.py | ColdStack-Network/blockchain | 3852f888e9d184a4fbc71365514a55dd9c510adb | [
"Unlicense"
] | null | null | null | deploy/deploy.py | ColdStack-Network/blockchain | 3852f888e9d184a4fbc71365514a55dd9c510adb | [
"Unlicense"
] | null | null | null | deploy/deploy.py | ColdStack-Network/blockchain | 3852f888e9d184a4fbc71365514a55dd9c510adb | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
import argparse
import subprocess
import json
parser = argparse.ArgumentParser(description='Deploy blockchain')
parser.add_argument('--validator-node',
help='validator node ssh address. First node becomes boot node and active validator.',
nargs='+'
)
parser.add_argument('--api-node', help... | 28.078431 | 100 | 0.657588 |
b267e740ceab58f8898f41e8edaa0a8a6747e59b | 6,299 | py | Python | 4_neural_networks.py | scientificprogrammer123/Udacity_Machine-Learning | e6f5a73724ac51c9dcc9c28ee1652991982598ca | [
"MIT"
] | null | null | null | 4_neural_networks.py | scientificprogrammer123/Udacity_Machine-Learning | e6f5a73724ac51c9dcc9c28ee1652991982598ca | [
"MIT"
] | null | null | null | 4_neural_networks.py | scientificprogrammer123/Udacity_Machine-Learning | e6f5a73724ac51c9dcc9c28ee1652991982598ca | [
"MIT"
] | 1 | 2021-04-14T22:04:52.000Z | 2021-04-14T22:04:52.000Z | # lesson 1: neural networks
# cell body, neuron, axon, synapse
# spike trains travel down the axon, and causes excitation to occur at other axons.
# a computation unit.
#
# x1 -> w1 ->
# x2 -> w2 -> theta -> y
# x3 -> w3 ->
#
# sum_{=1}^{k} xi*wi, activation
# >=theta, firing threshold
#
# For percept... | 29.712264 | 111 | 0.62883 |
b26837a3549f4fc5b6bc64ba12abe7c4d44f56e0 | 267 | py | Python | gitprivacy/dateredacter/__init__.py | fapdash/git-privacy | 357a2952d8feb9e193373e18284e57a26d14b96c | [
"BSD-2-Clause"
] | 7 | 2019-10-15T08:30:02.000Z | 2021-12-26T20:37:18.000Z | gitprivacy/dateredacter/__init__.py | fapdash/git-privacy | 357a2952d8feb9e193373e18284e57a26d14b96c | [
"BSD-2-Clause"
] | 30 | 2019-04-22T15:08:34.000Z | 2022-02-16T20:39:28.000Z | gitprivacy/dateredacter/__init__.py | cburkert/pyGitPrivacy | d522e62f85446e7554f6b66b5287f9c3a6aa33c2 | [
"BSD-2-Clause"
] | 2 | 2021-06-22T18:17:01.000Z | 2021-12-21T09:48:33.000Z | import abc
from datetime import datetime
from .reduce import ResolutionDateRedacter
| 19.071429 | 54 | 0.71161 |
b26aa848ad9a71009d6da1cdab45cb44abfe1110 | 2,178 | py | Python | functions/cm_plotter.py | evanmy/keymorph | 5b57d86047ca13c73f494e21fdf271f261912f84 | [
"MIT"
] | null | null | null | functions/cm_plotter.py | evanmy/keymorph | 5b57d86047ca13c73f494e21fdf271f261912f84 | [
"MIT"
] | null | null | null | functions/cm_plotter.py | evanmy/keymorph | 5b57d86047ca13c73f494e21fdf271f261912f84 | [
"MIT"
] | null | null | null | import torch
from skimage.filters import gaussian
def blur_cm_plot(Cm_plot, sigma):
"""
Blur the keypoints/center-of-masses for better visualiztion
Arguments
---------
Cm_plot : tensor with the center-of-masses
sigma : how much to blur
Return
------
out : blurred points... | 26.888889 | 82 | 0.5427 |
b26afc8ce026caaf2cd97fb955bcaaad804230cc | 3,790 | py | Python | examples/cooperative_work_examples.py | hfs/maproulette-python-client | 0a3e4b68af7892700463c2afc66a1ae4dcbf0825 | [
"Apache-2.0"
] | null | null | null | examples/cooperative_work_examples.py | hfs/maproulette-python-client | 0a3e4b68af7892700463c2afc66a1ae4dcbf0825 | [
"Apache-2.0"
] | null | null | null | examples/cooperative_work_examples.py | hfs/maproulette-python-client | 0a3e4b68af7892700463c2afc66a1ae4dcbf0825 | [
"Apache-2.0"
] | null | null | null | import maproulette
import json
import base64
# Create a configuration object for MapRoulette using your API key:
config = maproulette.Configuration(api_key="API_KEY")
# Create an API objects with the above config object:
api = maproulette.Task(config)
# Setting a challenge ID in which we'll place our cooperative tas... | 50.533333 | 108 | 0.58628 |
b26b274e30196d87e8ffb7a61d1cdb928d240314 | 1,101 | py | Python | src/biopsykit/sleep/sleep_wake_detection/algorithms/_base.py | Zwitscherle/BioPsyKit | 7200c5f1be75c20f53e1eb4c991aca1c89e3dd88 | [
"MIT"
] | 10 | 2020-11-05T13:34:55.000Z | 2022-03-11T16:20:10.000Z | src/biopsykit/sleep/sleep_wake_detection/algorithms/_base.py | Zwitscherle/BioPsyKit | 7200c5f1be75c20f53e1eb4c991aca1c89e3dd88 | [
"MIT"
] | 14 | 2021-03-11T14:43:52.000Z | 2022-03-10T19:44:57.000Z | src/biopsykit/sleep/sleep_wake_detection/algorithms/_base.py | Zwitscherle/BioPsyKit | 7200c5f1be75c20f53e1eb4c991aca1c89e3dd88 | [
"MIT"
] | 3 | 2021-09-13T13:14:38.000Z | 2022-02-19T09:13:25.000Z | """Module for sleep/wake detection base class."""
from biopsykit.utils._types import arr_t
from biopsykit.utils.datatype_helper import SleepWakeDataFrame
| 29.756757 | 110 | 0.62852 |
b26b2d344b00d14f7c80d63267fca336b474dfed | 287 | py | Python | FluentPython/ch02/cartesian.py | eroicaleo/LearningPython | 297d46eddce6e43ce0c160d2660dff5f5d616800 | [
"MIT"
] | 1 | 2020-10-12T13:33:29.000Z | 2020-10-12T13:33:29.000Z | FluentPython/ch02/cartesian.py | eroicaleo/LearningPython | 297d46eddce6e43ce0c160d2660dff5f5d616800 | [
"MIT"
] | null | null | null | FluentPython/ch02/cartesian.py | eroicaleo/LearningPython | 297d46eddce6e43ce0c160d2660dff5f5d616800 | [
"MIT"
] | 1 | 2016-11-09T07:28:45.000Z | 2016-11-09T07:28:45.000Z | #!/usr/bin/env python
colors = ['white', 'black']
sizes = ['S', 'M', 'L']
tshirts = [(color, size) for size in sizes
for color in colors ]
print(tshirts)
tshirts = [(color, size) for color in colors
for size in sizes ]
print(tshirts)
| 22.076923 | 46 | 0.54007 |
b26b3c9bc4d2fbf8cbbb44a23143622070070eef | 316 | py | Python | create.py | devanshsharma22/ONE | 27450ff2e9e07164527043a161274495ef3a1178 | [
"CC-BY-3.0"
] | null | null | null | create.py | devanshsharma22/ONE | 27450ff2e9e07164527043a161274495ef3a1178 | [
"CC-BY-3.0"
] | null | null | null | create.py | devanshsharma22/ONE | 27450ff2e9e07164527043a161274495ef3a1178 | [
"CC-BY-3.0"
] | null | null | null | from flask import Flask
from models import *
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL')
app.config['SQLALCHEMY_TRACK_MODIFICATIONS']=False
db.init_app(app)
if __name__ == "__main__":
with app.app_context():
main()
| 15.8 | 70 | 0.708861 |
b26beef2d3bbff1212787d1023080b96af3af78b | 1,160 | py | Python | jmetex/main.py | innovocloud/jmetex | 5e7c4d9695174fe2f5c3186b8bbb41857e9715df | [
"Apache-2.0"
] | 2 | 2018-02-19T14:21:31.000Z | 2018-03-15T03:16:05.000Z | jmetex/main.py | innovocloud/jmetex | 5e7c4d9695174fe2f5c3186b8bbb41857e9715df | [
"Apache-2.0"
] | null | null | null | jmetex/main.py | innovocloud/jmetex | 5e7c4d9695174fe2f5c3186b8bbb41857e9715df | [
"Apache-2.0"
] | null | null | null | import sys
import time
import argparse
from prometheus_client import start_http_server, Metric, REGISTRY, Summary
from .interfacecollector import InterfaceCollector
from .opticalcollector import OpticalCollector
| 40 | 96 | 0.675862 |
b26ccd47df1988e1e17fa1b203b55759ef55fe03 | 472 | py | Python | vispp/io.py | c-cameron/vispp | a985c0fd5a7add968968ec025da17ad0c5ab0f73 | [
"BSD-3-Clause"
] | null | null | null | vispp/io.py | c-cameron/vispp | a985c0fd5a7add968968ec025da17ad0c5ab0f73 | [
"BSD-3-Clause"
] | null | null | null | vispp/io.py | c-cameron/vispp | a985c0fd5a7add968968ec025da17ad0c5ab0f73 | [
"BSD-3-Clause"
] | null | null | null | from matplotlib.backends.backend_pdf import PdfPages
def better_savefig(fig, figfile, format="pdf", **kwargs):
"""To be used instead of .savefig
This function saves pdfs without creation date. So subsequent
overwrites of pdf files does not cause e.g. git modified.
"""
if format == "pdf":
... | 31.466667 | 71 | 0.667373 |
b26de06366dede83defa5d174c6610df50dcc9a0 | 1,133 | py | Python | mappings.py | timeseries-ru/EL | 2528fe50b92efd0b28611ddd9b531d085a12d0df | [
"MIT"
] | null | null | null | mappings.py | timeseries-ru/EL | 2528fe50b92efd0b28611ddd9b531d085a12d0df | [
"MIT"
] | null | null | null | mappings.py | timeseries-ru/EL | 2528fe50b92efd0b28611ddd9b531d085a12d0df | [
"MIT"
] | null | null | null | import sklearn.decomposition as decomposition
import sklearn.preprocessing as preprocessing
import sklearn.linear_model as linear_model
import sklearn.ensemble as ensemble
import sklearn.cluster as cluster
import sklearn.neighbors as neighbors
import sklearn.neural_network as neural_network
| 40.464286 | 77 | 0.752868 |
b26eb6867abd481f8fa7df4a751d92de7df14d0f | 231 | py | Python | Find_the_Runner_Up_Score_.py | KrShivanshu/264136_Python_Daily | 8caeae12a495509675544b957af3ffbaa50e6ed2 | [
"CC0-1.0"
] | null | null | null | Find_the_Runner_Up_Score_.py | KrShivanshu/264136_Python_Daily | 8caeae12a495509675544b957af3ffbaa50e6ed2 | [
"CC0-1.0"
] | null | null | null | Find_the_Runner_Up_Score_.py | KrShivanshu/264136_Python_Daily | 8caeae12a495509675544b957af3ffbaa50e6ed2 | [
"CC0-1.0"
] | null | null | null | if __name__ == '__main__':
n = int(input())
arr = map(int, input().split())
max = -9999999
max2 = -9999999
for i in arr:
if(i>max):
max2=max
max=i
elif i>max2 and max>i:
max2=i
print(max2) | 16.5 | 35 | 0.532468 |
b26fb5509497d72210ea4f3275edb63a6b2bc440 | 85 | py | Python | tests/__init__.py | doublechiang/qsmcmd | 63e31390de020472c6ff4284cbe2d2c5147cb13d | [
"MIT"
] | 1 | 2021-05-07T09:57:01.000Z | 2021-05-07T09:57:01.000Z | tests/__init__.py | doublechiang/qsmcmd | 63e31390de020472c6ff4284cbe2d2c5147cb13d | [
"MIT"
] | 30 | 2017-08-24T21:21:03.000Z | 2021-01-21T19:32:36.000Z | tests/__init__.py | doublechiang/qsmcmd | 63e31390de020472c6ff4284cbe2d2c5147cb13d | [
"MIT"
] | null | null | null | import os, sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__),'../src'))
| 21.25 | 68 | 0.694118 |
b26fea559278660731c5b3eb16d98ce810c85f89 | 7,669 | py | Python | mindspore/python/mindspore/rewrite/namer.py | httpsgithu/mindspore | c29d6bb764e233b427319cb89ba79e420f1e2c64 | [
"Apache-2.0"
] | 1 | 2022-02-23T09:13:43.000Z | 2022-02-23T09:13:43.000Z | mindspore/python/mindspore/rewrite/namer.py | 949144093/mindspore | c29d6bb764e233b427319cb89ba79e420f1e2c64 | [
"Apache-2.0"
] | null | null | null | mindspore/python/mindspore/rewrite/namer.py | 949144093/mindspore | c29d6bb764e233b427319cb89ba79e420f1e2c64 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 36.519048 | 120 | 0.604903 |
b270dcf5ee3dfde551682fd9a8c7f93e84cb34a6 | 3,391 | py | Python | tests/test_autopilot.py | aidanmelen/bobcat_miner | 5ce85e17e93332a126db0a196c29b01433dc90d4 | [
"Apache-2.0"
] | 6 | 2022-01-06T05:50:14.000Z | 2022-03-25T09:41:34.000Z | tests/test_autopilot.py | aidanmelen/bobcat_miner | 5ce85e17e93332a126db0a196c29b01433dc90d4 | [
"Apache-2.0"
] | 9 | 2022-01-19T03:16:33.000Z | 2022-02-20T20:37:56.000Z | tests/test_autopilot.py | aidanmelen/bobcat_miner | 5ce85e17e93332a126db0a196c29b01433dc90d4 | [
"Apache-2.0"
] | 3 | 2022-01-06T05:50:00.000Z | 2022-02-15T16:24:58.000Z | from unittest.mock import patch, call, PropertyMock, AsyncMock, MagicMock, mock_open
import unittest
from bobcat_miner import BobcatAutopilot, Bobcat, OnlineStatusCheck
import mock_endpoints
if __name__ == "__main__":
unittest.main()
| 37.677778 | 100 | 0.604247 |
b271a810a148e7642fe7f668a6757b9d19a1951c | 5,687 | py | Python | fig/project.py | kazoup/fig | d34dc45b783f830ed64988c3c8ffb3d4f550d059 | [
"BSD-3-Clause"
] | null | null | null | fig/project.py | kazoup/fig | d34dc45b783f830ed64988c3c8ffb3d4f550d059 | [
"BSD-3-Clause"
] | null | null | null | fig/project.py | kazoup/fig | d34dc45b783f830ed64988c3c8ffb3d4f550d059 | [
"BSD-3-Clause"
] | 1 | 2019-12-11T01:08:39.000Z | 2019-12-11T01:08:39.000Z | from __future__ import unicode_literals
from __future__ import absolute_import
import logging
from .service import Service
log = logging.getLogger(__name__)
def get_services(self, service_names=None):
"""
Returns a list of this project's services filtered
by the provided list of names, or... | 34.053892 | 183 | 0.604713 |
b2743a4c76c53ef106ccb49cbbfbe8057b1bd708 | 2,136 | py | Python | input/utils/chi-squared-contingency-tests.py | g-p-m/GPM | 00aa3ea664e14b99eedd6cbeabbc2b85edf2b208 | [
"BSD-3-Clause"
] | null | null | null | input/utils/chi-squared-contingency-tests.py | g-p-m/GPM | 00aa3ea664e14b99eedd6cbeabbc2b85edf2b208 | [
"BSD-3-Clause"
] | null | null | null | input/utils/chi-squared-contingency-tests.py | g-p-m/GPM | 00aa3ea664e14b99eedd6cbeabbc2b85edf2b208 | [
"BSD-3-Clause"
] | null | null | null | import numpy, scipy.stats
T1 = numpy.asarray([
[ 316, 378, 393, 355, 391, 371, 400, 397, 385, 371, 382, 371, ],
[ 336, 339, 322, 341, 314, 311, 339, 310, 331, 355, 316, 306, ],
[ 375, 364, 375, 381, 381, 401, 374, 396, 422, 417, 372, 435, ],
[ 238, 231, 263, 268, 239, 259, 243, 206, 257, 228, 252, 203, ]])
T2 = numpy.... | 46.434783 | 65 | 0.558521 |
b2760534184d4098001909eaf620372388d8db5f | 4,916 | py | Python | inference_speed.py | guillesanbri/DPT | d65d1e4adade95bb6265c28ab29e009028b3f9a8 | [
"MIT"
] | null | null | null | inference_speed.py | guillesanbri/DPT | d65d1e4adade95bb6265c28ab29e009028b3f9a8 | [
"MIT"
] | null | null | null | inference_speed.py | guillesanbri/DPT | d65d1e4adade95bb6265c28ab29e009028b3f9a8 | [
"MIT"
] | null | null | null | import os
import wandb
import torch
import warnings
import numpy as np
import torchvision.transforms
from fvcore.nn import FlopCountAnalysis
from dpt.models import DPTDepthModel
# Hyperparameters and config
# Input
net_w, net_h = 640, 192
h_kitti, w_kitti = 352, 1216
# Model architecture
backbone = "vitb_rn50_384"... | 35.114286 | 119 | 0.605574 |
b2768c03376cae3fece006df9dcfa990067b957c | 5,122 | py | Python | cybox/common/tools.py | siemens/python-cybox | b692a98c8a62bd696e2a0dda802ada7359853482 | [
"BSD-3-Clause"
] | null | null | null | cybox/common/tools.py | siemens/python-cybox | b692a98c8a62bd696e2a0dda802ada7359853482 | [
"BSD-3-Clause"
] | null | null | null | cybox/common/tools.py | siemens/python-cybox | b692a98c8a62bd696e2a0dda802ada7359853482 | [
"BSD-3-Clause"
] | 1 | 2019-04-16T18:37:32.000Z | 2019-04-16T18:37:32.000Z | # Copyright (c) 2014, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
import cybox
import cybox.bindings.cybox_common as common_binding
from cybox.common import HashList, StructuredText, VocabString
def to_dict(self):
toolinfo_dict = {}
if self.id_ is not None:... | 33.25974 | 89 | 0.650527 |
b2769b5ec360ec5dc6f9171e3632b3ef3f3dc0c8 | 570 | py | Python | python/ray/rllib/models/tf/tf_modelv2.py | alex-petrenko/ray | dfc94ce7bcd5d9d008822efdeec17c3f6bb9c606 | [
"Apache-2.0"
] | 1 | 2020-09-27T08:48:11.000Z | 2020-09-27T08:48:11.000Z | python/ray/rllib/models/tf/tf_modelv2.py | JunpingDu/ray | 214f09d969480279930994cabbcc2a75535cc6ca | [
"Apache-2.0"
] | 4 | 2019-03-04T13:03:24.000Z | 2019-06-06T11:25:07.000Z | python/ray/rllib/models/tf/tf_modelv2.py | JunpingDu/ray | 214f09d969480279930994cabbcc2a75535cc6ca | [
"Apache-2.0"
] | 1 | 2020-04-30T09:06:20.000Z | 2020-04-30T09:06:20.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from ray.rllib.models.modelv2 import ModelV2
from ray.rllib.utils import try_import_tf
tf = try_import_tf()
| 23.75 | 74 | 0.642105 |
b27869ddfe009d8e2d025f4f2f3d4a1de697cced | 1,401 | py | Python | EventManager/Home/models.py | 201901407/woc3.0-eventmanager-DarshilParikh | 8174cd5373e3f3e4723a9fd6381266a56dddc4e6 | [
"MIT"
] | 1 | 2021-01-03T13:57:38.000Z | 2021-01-03T13:57:38.000Z | EventManager/Home/models.py | 201901407/woc3.0-eventmanager-DarshilParikh | 8174cd5373e3f3e4723a9fd6381266a56dddc4e6 | [
"MIT"
] | null | null | null | EventManager/Home/models.py | 201901407/woc3.0-eventmanager-DarshilParikh | 8174cd5373e3f3e4723a9fd6381266a56dddc4e6 | [
"MIT"
] | null | null | null | from django.db import models
import uuid, datetime
from django.utils import timezone
# Create your models here.
| 35.025 | 97 | 0.751606 |
b278da741753c0353d746ae92b8910102ad49380 | 2,450 | py | Python | zulip_bots/zulip_bots/terminal.py | maanuanubhav999/python-zulip-api | abebf28077b31d6b3a7183044c6493230d890d91 | [
"Apache-2.0"
] | 1 | 2020-07-09T17:23:15.000Z | 2020-07-09T17:23:15.000Z | zulip_bots/zulip_bots/terminal.py | maanuanubhav999/python-zulip-api | abebf28077b31d6b3a7183044c6493230d890d91 | [
"Apache-2.0"
] | null | null | null | zulip_bots/zulip_bots/terminal.py | maanuanubhav999/python-zulip-api | abebf28077b31d6b3a7183044c6493230d890d91 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
import argparse
from zulip_bots.finder import import_module_from_source, resolve_bot_path
from zulip_bots.simple_lib import TerminalBotHandler
current_dir = os.path.dirname(os.path.abspath(__file__))
if __name__ == '__main__':
main()
| 31.410256 | 106 | 0.624082 |
b27948c3537469faf68e7dba6797c0ed2aa2c1dd | 3,606 | py | Python | tesHistMatch.py | cliffeby/Duckpin2 | 9b1b0891e898625373409f7b4b7d4e058184c45e | [
"MIT"
] | null | null | null | tesHistMatch.py | cliffeby/Duckpin2 | 9b1b0891e898625373409f7b4b7d4e058184c45e | [
"MIT"
] | 1 | 2018-04-23T21:35:32.000Z | 2018-10-04T03:15:00.000Z | tesHistMatch.py | cliffeby/Duckpin2 | 9b1b0891e898625373409f7b4b7d4e058184c45e | [
"MIT"
] | null | null | null | # import the necessary packages
import io
import time
import cropdata1024, cropdata1440
import numpy as np
import threading
import cv2
mask_crop_ranges = cropdata1440.ballCrops
crop_ranges = cropdata1024.pin_crop_ranges
arm_crop_ranges = cropdata1440.resetArmCrops
scrop_ranges = cropdata1024.special_crop_ranges
x=y=x1... | 33.700935 | 136 | 0.567942 |
b27a7998ddf212b0241aa835db7ce95126acc646 | 2,929 | py | Python | authlib/integrations/flask_client/remote_app.py | bobh66/authlib | e3e18da74d689b61a8dc8db46775ff77a57c6c2a | [
"BSD-3-Clause"
] | 1 | 2021-12-09T07:11:05.000Z | 2021-12-09T07:11:05.000Z | authlib/integrations/flask_client/remote_app.py | bobh66/authlib | e3e18da74d689b61a8dc8db46775ff77a57c6c2a | [
"BSD-3-Clause"
] | null | null | null | authlib/integrations/flask_client/remote_app.py | bobh66/authlib | e3e18da74d689b61a8dc8db46775ff77a57c6c2a | [
"BSD-3-Clause"
] | 2 | 2021-05-24T20:34:12.000Z | 2022-03-26T07:46:17.000Z | from flask import redirect
from flask import request as flask_req
from flask import _app_ctx_stack
from ..base_client import RemoteApp
def authorize_redirect(self, redirect_uri=None, **kwargs):
"""Create a HTTP Redirect for Authorization Endpoint.
:param redirect_uri: Callback or redirect URI for... | 35.719512 | 84 | 0.665073 |
b27a85f2428bee55c3eb4af112108417cb5d5e83 | 2,552 | py | Python | models/cnn_stft.py | gumpy-hybridBCI/GUMPY- | 12a679626836c0be0063dd4012380ec2fa0245cb | [
"MIT"
] | 27 | 2018-02-20T14:17:42.000Z | 2021-04-16T02:36:40.000Z | models/cnn_stft.py | gumpy-hybridBCI/GUMPY- | 12a679626836c0be0063dd4012380ec2fa0245cb | [
"MIT"
] | 3 | 2019-02-22T12:18:40.000Z | 2021-06-13T17:09:08.000Z | models/cnn_stft.py | gumpy-hybridBCI/GUMPY- | 12a679626836c0be0063dd4012380ec2fa0245cb | [
"MIT"
] | 15 | 2018-03-19T20:04:50.000Z | 2022-02-24T10:12:06.000Z | from .model import KerasModel
import keras
from keras.models import Sequential
from keras.layers import Dense, Activation, Flatten
from keras.layers import BatchNormalization, Dropout, Conv2D, MaxPooling2D
import kapre
from kapre.utils import Normalization2D
from kapre.time_frequency import Spectrogram
| 37.529412 | 87 | 0.575627 |
b27aa21ef3977e3a19e7a6820a49fc999d5453c5 | 1,347 | py | Python | test/test_http.py | tylerlong/ringcentral-python | 518a6b2b493360a40f2ee0eaa8ae3f12e01d4f52 | [
"MIT"
] | 3 | 2017-01-26T01:58:50.000Z | 2018-12-26T09:06:21.000Z | test/test_http.py | tylerlong/ringcentral-python | 518a6b2b493360a40f2ee0eaa8ae3f12e01d4f52 | [
"MIT"
] | 3 | 2017-03-25T21:50:04.000Z | 2018-09-05T23:35:26.000Z | test/test_http.py | tylerlong/ringcentral-python | 518a6b2b493360a40f2ee0eaa8ae3f12e01d4f52 | [
"MIT"
] | 1 | 2017-02-14T22:27:16.000Z | 2017-02-14T22:27:16.000Z | from .test_base import BaseTestCase
| 43.451613 | 144 | 0.589458 |
b27aa7dc89425beb1b8dd2de335e508e06185c2e | 6,685 | py | Python | src/scaffold/models/abstract/meta.py | Su-yj/django-scaffold-tools | db97b1feece8cc57131e3a14b292857204e8e574 | [
"Apache-2.0"
] | 2 | 2021-02-25T17:52:03.000Z | 2021-05-25T23:49:40.000Z | src/scaffold/models/abstract/meta.py | Su-yj/django-scaffold-tools | db97b1feece8cc57131e3a14b292857204e8e574 | [
"Apache-2.0"
] | null | null | null | src/scaffold/models/abstract/meta.py | Su-yj/django-scaffold-tools | db97b1feece8cc57131e3a14b292857204e8e574 | [
"Apache-2.0"
] | 1 | 2022-03-24T09:40:57.000Z | 2022-03-24T09:40:57.000Z | from datetime import datetime
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.db import models
from scaffold.exceptions.exceptions import AppError
# def patch_methods(model_class):
# def do_patch(cls):
# for k in cls.__dict__:
# obj ... | 21.495177 | 74 | 0.57472 |
b27aafce477f2a5f5a7f14f7e8edc439ed8f615c | 3,740 | py | Python | tests/unit/client/resources/box/test_box.py | etingof/softboxen | 2a7ba85669d563de9824e3962bd48a0849482e3f | [
"BSD-2-Clause"
] | 2 | 2020-02-08T20:43:35.000Z | 2020-06-24T18:46:59.000Z | tests/unit/client/resources/box/test_box.py | etingof/softboxen | 2a7ba85669d563de9824e3962bd48a0849482e3f | [
"BSD-2-Clause"
] | 2 | 2020-03-07T08:07:17.000Z | 2021-09-15T21:12:12.000Z | tests/unit/client/resources/box/test_box.py | etingof/softboxen | 2a7ba85669d563de9824e3962bd48a0849482e3f | [
"BSD-2-Clause"
] | 1 | 2020-05-04T06:10:45.000Z | 2020-05-04T06:10:45.000Z | #
# This file is part of softboxen software.
#
# Copyright (c) 2020, Ilya Etingof <etingof@gmail.com>
# License: https://github.com/etingof/softboxen/LICENSE.rst
#
import json
import sys
import unittest
from unittest import mock
from softboxen.client.resources.box import box
from softboxen.client.resources.box import... | 31.428571 | 79 | 0.674866 |
b27af965481a6eface77ab77feda170f704b5500 | 543 | py | Python | photoseleven/db.py | photoseleven/photoseleven-backend | 2e511d5e48477b6b41a6d98f0630b1bcada8a298 | [
"MIT"
] | null | null | null | photoseleven/db.py | photoseleven/photoseleven-backend | 2e511d5e48477b6b41a6d98f0630b1bcada8a298 | [
"MIT"
] | null | null | null | photoseleven/db.py | photoseleven/photoseleven-backend | 2e511d5e48477b6b41a6d98f0630b1bcada8a298 | [
"MIT"
] | 1 | 2020-03-29T11:20:40.000Z | 2020-03-29T11:20:40.000Z | import click
from flask import current_app, g
from flask.cli import with_appcontext
from flask_pymongo import PyMongo
from werkzeug.security import check_password_hash, generate_password_hash
| 19.392857 | 73 | 0.692449 |
b27e012ad9d98a21878536e044d958f15626c65e | 4,354 | py | Python | c1_tools/c1_Preferences.py | jacobmartinez3d/c1_tools | e317d52e91a375c6ac1b6914a74787056118484e | [
"MIT"
] | null | null | null | c1_tools/c1_Preferences.py | jacobmartinez3d/c1_tools | e317d52e91a375c6ac1b6914a74787056118484e | [
"MIT"
] | null | null | null | c1_tools/c1_Preferences.py | jacobmartinez3d/c1_tools | e317d52e91a375c6ac1b6914a74787056118484e | [
"MIT"
] | null | null | null | # preferences panel to allow inputting cutom parameters for the structure of a project and its
# naming conventions.
# --------------------------------------------------------------------------------------------------
import hashlib
import nuke
from nukescripts.panels import PythonPanel
import fileinput
import os
impor... | 37.213675 | 120 | 0.579927 |
b27e60d49c438918ac9f9898312b3fc091fc3cf6 | 35,738 | py | Python | src/proto/runtime_pb2_grpc.py | layotto/python-sdk | dac5833ebbfe16d6e5b6322041ca65431096f14b | [
"Apache-2.0"
] | null | null | null | src/proto/runtime_pb2_grpc.py | layotto/python-sdk | dac5833ebbfe16d6e5b6322041ca65431096f14b | [
"Apache-2.0"
] | 1 | 2022-02-23T14:37:01.000Z | 2022-02-23T14:37:01.000Z | src/proto/runtime_pb2_grpc.py | layotto/python-sdk | dac5833ebbfe16d6e5b6322041ca65431096f14b | [
"Apache-2.0"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
import runtime_pb2 as runtime__pb2
def add_RuntimeServicer_to_server(servicer, se... | 45.352792 | 129 | 0.651603 |
b27fdc318377fdd21756f01199453a4713d91df6 | 1,794 | py | Python | forecast_box/validate.py | kyleclo/forecast-box | 5b965f0c7f45c92e800c31df1c7a12a6d08527b1 | [
"Apache-2.0"
] | 1 | 2017-02-08T19:34:35.000Z | 2017-02-08T19:34:35.000Z | forecast_box/validate.py | kyleclo/forecast-box | 5b965f0c7f45c92e800c31df1c7a12a6d08527b1 | [
"Apache-2.0"
] | null | null | null | forecast_box/validate.py | kyleclo/forecast-box | 5b965f0c7f45c92e800c31df1c7a12a6d08527b1 | [
"Apache-2.0"
] | null | null | null | """
Validation
"""
import numpy as np
import pandas as pd
from model import Model
# TODO: different versions with resampling or subsampling
# TODO: return DataFrame of forecasted_values along with metric?
def validate_model(name, params, time_series, metric_fun):
"""Evaluates performance of Model forecast met... | 36.612245 | 79 | 0.696767 |
b280b873fa11a9c22244c5a88ce9b4b92bf52fa9 | 338 | py | Python | config/api_router.py | summerthe/django_api_starter | 8f6c83fccc3a138a636850f7d23d9aac72e06f8f | [
"MIT"
] | null | null | null | config/api_router.py | summerthe/django_api_starter | 8f6c83fccc3a138a636850f7d23d9aac72e06f8f | [
"MIT"
] | null | null | null | config/api_router.py | summerthe/django_api_starter | 8f6c83fccc3a138a636850f7d23d9aac72e06f8f | [
"MIT"
] | null | null | null | from django.conf import settings
from django.urls.conf import include, path
from rest_framework.routers import DefaultRouter, SimpleRouter
if settings.DEBUG:
router = DefaultRouter()
else:
router = SimpleRouter()
app_name = "api"
urlpatterns = [
path("", include("summers_api.users.api.urls")),
]
urlpatter... | 22.533333 | 62 | 0.745562 |
b28150bc596dbcfe86da754ccfece409615ba261 | 339 | py | Python | backstack/__init__.py | pixlie/platform | 10782e9ddfb1dc2311e22987a16e9e77f3d71d34 | [
"MIT"
] | 2 | 2019-06-06T11:21:35.000Z | 2021-12-19T12:17:02.000Z | backstack/__init__.py | pixlie/backstack | 10782e9ddfb1dc2311e22987a16e9e77f3d71d34 | [
"MIT"
] | null | null | null | backstack/__init__.py | pixlie/backstack | 10782e9ddfb1dc2311e22987a16e9e77f3d71d34 | [
"MIT"
] | null | null | null | from .models import SystemModel, BaseModel
from .errors import ServerError, Errors
from .config import settings
from .db import db, Base
from .commands import Commands
name = "platform"
__all__ = [
"name",
"SystemModel",
"BaseModel",
"ServerError",
"Errors",
"settings",
"db",
"Base",... | 15.409091 | 42 | 0.646018 |
b282134e67aa67a11713d58542eb8a80ec036fb7 | 1,571 | py | Python | samples/archive/stream/stream.py | zzzDavid/heterocl | 977aae575d54a30c5bf6d869e8f71bdc815cf7e9 | [
"Apache-2.0"
] | 236 | 2019-05-19T01:48:11.000Z | 2022-03-31T09:03:54.000Z | samples/archive/stream/stream.py | zzzDavid/heterocl | 977aae575d54a30c5bf6d869e8f71bdc815cf7e9 | [
"Apache-2.0"
] | 248 | 2019-05-17T19:18:36.000Z | 2022-03-30T21:25:47.000Z | samples/archive/stream/stream.py | AlgaPeng/heterocl-2 | b5197907d1fe07485466a63671a2a906a861c939 | [
"Apache-2.0"
] | 85 | 2019-05-17T20:09:27.000Z | 2022-02-28T20:19:00.000Z | import heterocl as hcl
hcl.init()
target = hcl.Platform.xilinx_zc706
initiation_interval = 4
a = hcl.placeholder((10, 20), name="a")
b = hcl.placeholder((10, 20), name="b")
c = hcl.placeholder((10, 20), name="c")
d = hcl.placeholder((10, 20), name="d")
e = hcl.placeholder((10, 20), name="e")
# compute customization... | 26.627119 | 64 | 0.589433 |
b282a97791327fc19ad1bc909b5a0f67419da315 | 653 | py | Python | setup.py | eminaktas/k8s-workload-scaler | 388ebd9c472911c5dd783610d12ae314c1e4adad | [
"MIT"
] | 3 | 2021-06-11T08:33:19.000Z | 2022-03-01T23:32:35.000Z | setup.py | eminaktas/k8s-workload-scaler | 388ebd9c472911c5dd783610d12ae314c1e4adad | [
"MIT"
] | null | null | null | setup.py | eminaktas/k8s-workload-scaler | 388ebd9c472911c5dd783610d12ae314c1e4adad | [
"MIT"
] | null | null | null | import os
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md')) as readme_file:
README = readme_file.read()
setup(
name='k8s-workload-scaler',
version='0.0.2',
packages=['k8s_workload_scaler'],
url='github.com/eminaktas/k8s-workl... | 25.115385 | 58 | 0.653905 |
b2839dcc8ba1e2c6405ad07dce2a45037d7c2944 | 13,561 | py | Python | ros/dynamic_reconfigure/src/dynamic_reconfigure/client.py | numberen/apollo-platform | 8f359c8d00dd4a98f56ec2276c5663cb6c100e47 | [
"Apache-2.0"
] | 2 | 2018-12-11T16:35:20.000Z | 2019-01-23T16:42:17.000Z | opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/client.py | Roboy/roboy_managing_node_fpga | 64ffe5aec2f2c98a051bb1a881849c195b8d052c | [
"BSD-3-Clause"
] | 1 | 2018-12-28T21:11:50.000Z | 2018-12-28T21:11:50.000Z | opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/client.py | Roboy/roboy_managing_node_fpga | 64ffe5aec2f2c98a051bb1a881849c195b8d052c | [
"BSD-3-Clause"
] | 3 | 2018-01-29T12:22:56.000Z | 2020-12-08T09:08:46.000Z | # Software License Agreement (BSD License)
#
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | 39.080692 | 138 | 0.594794 |
b2842a9629f4ea0e56df84c21b6edd075792d02d | 7,803 | py | Python | l0bnb/relaxation/core.py | jonathan-taylor/l0bnb | 0c2beef67b92861ec51bc3514d485eabad43c611 | [
"MIT"
] | 25 | 2020-04-14T00:32:04.000Z | 2022-03-23T11:49:06.000Z | l0bnb/relaxation/core.py | jonathan-taylor/l0bnb | 0c2beef67b92861ec51bc3514d485eabad43c611 | [
"MIT"
] | 1 | 2021-10-12T16:37:04.000Z | 2021-10-12T16:37:04.000Z | l0bnb/relaxation/core.py | jonathan-taylor/l0bnb | 0c2beef67b92861ec51bc3514d485eabad43c611 | [
"MIT"
] | 9 | 2020-05-14T04:15:44.000Z | 2022-03-04T14:58:25.000Z | import copy
from time import time
from collections import namedtuple
import numpy as np
from numba.typed import List
from numba import njit
from ._coordinate_descent import cd_loop, cd
from ._cost import get_primal_cost, get_dual_cost
from ._utils import get_ratio_threshold, get_active_components
from . import GS_FLA... | 39.015 | 79 | 0.60387 |
b2842ba57b4666045fc4763a33435c2f652b5394 | 5,668 | py | Python | uroboros-diversification/src/diversification/bb_branchfunc_diversify.py | whj0401/RLOBF | 2755eb5e21e4f2445a7791a1159962e80a5739ca | [
"MIT"
] | 3 | 2020-12-11T06:15:17.000Z | 2021-04-24T07:09:03.000Z | uroboros-diversification/src/diversification/bb_branchfunc_diversify.py | whj0401/RLOBF | 2755eb5e21e4f2445a7791a1159962e80a5739ca | [
"MIT"
] | null | null | null | uroboros-diversification/src/diversification/bb_branchfunc_diversify.py | whj0401/RLOBF | 2755eb5e21e4f2445a7791a1159962e80a5739ca | [
"MIT"
] | 2 | 2021-03-10T17:46:33.000Z | 2021-03-31T08:00:27.000Z | from analysis.visit import *
from disasm.Types import *
from utils.ail_utils import *
from utils.pp_print import *
from junkcodes import get_junk_codes
obfs_proportion = 0.015
| 46.459016 | 128 | 0.534227 |
b284e34183349b94655f2ba4c0ad549e6e0f8f3f | 273 | py | Python | dsfaker/generators/str.py | pajachiet/dsfaker | 0e65ba336608c2ccc5e32a541f3b66dfad019b35 | [
"MIT"
] | 3 | 2017-03-12T22:08:59.000Z | 2017-05-22T16:57:17.000Z | dsfaker/generators/str.py | pajachiet/dsfaker | 0e65ba336608c2ccc5e32a541f3b66dfad019b35 | [
"MIT"
] | 12 | 2017-03-01T10:14:08.000Z | 2017-04-23T12:15:10.000Z | dsfaker/generators/str.py | pajachiet/dsfaker | 0e65ba336608c2ccc5e32a541f3b66dfad019b35 | [
"MIT"
] | 2 | 2017-05-04T15:36:21.000Z | 2018-02-07T13:49:13.000Z | from random import Random
from rstr import Rstr
from . import Generator
| 22.75 | 41 | 0.677656 |
b285955d688db6c4b472e2c5faffe22749cd5bcf | 7,081 | py | Python | ssh/factorcheck.py | riquelmev/cs338 | cdbff5e25b112a9fb2e039f59c0ebf036649ffd8 | [
"MIT"
] | null | null | null | ssh/factorcheck.py | riquelmev/cs338 | cdbff5e25b112a9fb2e039f59c0ebf036649ffd8 | [
"MIT"
] | null | null | null | ssh/factorcheck.py | riquelmev/cs338 | cdbff5e25b112a9fb2e039f59c0ebf036649ffd8 | [
"MIT"
] | null | null | null | import numpy
import math
print(math.lcm(0x00eca08bfa42dcad582302232a80813894fd2e4b842dca21eba465619a0d464a9f864ab2e9c0be42367d63c595e81385dcb66bbf8242cddb848969f883af2fbb8c1490a3932c03d15b2d7dfb08dd2c61e05978fbfd337e70ba838574cfe443658910aef9303e968d32351339c14a3c08920a5c1a854cea5af98bd32f1098a2fc5f8a468009c7c063f48c2... | 337.190476 | 1,320 | 0.990679 |
b286d23fc369a16764ed55694919ccd382975d06 | 138 | py | Python | main1.py | dubblin27/bible-of-algo | 4f893ba0d32d8d169abf4c4485f105cc8169cdbb | [
"MIT"
] | null | null | null | main1.py | dubblin27/bible-of-algo | 4f893ba0d32d8d169abf4c4485f105cc8169cdbb | [
"MIT"
] | null | null | null | main1.py | dubblin27/bible-of-algo | 4f893ba0d32d8d169abf4c4485f105cc8169cdbb | [
"MIT"
] | null | null | null | su = 0
a = [3,5,6,2,7,1]
print(sum(a))
x, y = input("Enter a two value: ").split()
x = int(x)
y = int(y)
su = a[y] + sum(a[:y])
print(su) | 17.25 | 44 | 0.514493 |
b2887d26206a7158175689bb0d3fde0011f6d15d | 8,099 | py | Python | reagent/test/training/test_qrdqn.py | dmitryvinn/ReAgent | f98825b9d021ec353a1f9087840a05fea259bf42 | [
"BSD-3-Clause"
] | 1,156 | 2019-10-02T12:15:31.000Z | 2022-03-31T16:01:27.000Z | reagent/test/training/test_qrdqn.py | dmitryvinn/ReAgent | f98825b9d021ec353a1f9087840a05fea259bf42 | [
"BSD-3-Clause"
] | 448 | 2019-10-03T13:40:52.000Z | 2022-03-28T07:49:15.000Z | reagent/test/training/test_qrdqn.py | dmitryvinn/ReAgent | f98825b9d021ec353a1f9087840a05fea259bf42 | [
"BSD-3-Clause"
] | 214 | 2019-10-13T13:28:33.000Z | 2022-03-24T04:11:52.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import unittest
import torch
from reagent.core.parameters import EvaluationParameters, RLParameters
from reagent.core.types import FeatureData, DiscreteDqnInput, ExtraData
from reagent.evaluation.evaluator import get_metric... | 40.293532 | 88 | 0.633782 |
b28976d7d07ee0d85891e3ce1f95a592baa06a72 | 717 | py | Python | highway_env/__init__.py | songanz/highway-env | ac21d1da25e224dbdbf8ba39509f4013bd029f52 | [
"MIT"
] | 1 | 2019-11-06T15:28:27.000Z | 2019-11-06T15:28:27.000Z | highway_env/__init__.py | songanz/highway-env | ac21d1da25e224dbdbf8ba39509f4013bd029f52 | [
"MIT"
] | null | null | null | highway_env/__init__.py | songanz/highway-env | ac21d1da25e224dbdbf8ba39509f4013bd029f52 | [
"MIT"
] | 1 | 2019-07-22T03:37:09.000Z | 2019-07-22T03:37:09.000Z | from gym.envs.registration import register
register(
id='highway-v0',
entry_point='highway_env.envs:HighwayEnv',
)
register(
id='highway-continuous-v0',
entry_point='highway_env.envs:HighwayEnvCon',
)
register(
id='highway-continuous-intrinsic-rew-v0',
entry_point='highway_env.envs:HighwayEnv... | 18.384615 | 63 | 0.714086 |
b28b3da62fcf1d7ad1f84230a298ab9d0ed79266 | 700 | py | Python | twitcaspy/auth/app.py | Alma-field/twitcaspy | 25f3e850f2d5aab8a864bd6b7003468587fa3ea7 | [
"MIT"
] | null | null | null | twitcaspy/auth/app.py | Alma-field/twitcaspy | 25f3e850f2d5aab8a864bd6b7003468587fa3ea7 | [
"MIT"
] | 18 | 2021-10-01T13:40:01.000Z | 2021-10-18T12:34:57.000Z | twitcaspy/auth/app.py | Alma-field/twitcaspy | 25f3e850f2d5aab8a864bd6b7003468587fa3ea7 | [
"MIT"
] | null | null | null | # Twitcaspy
# Copyright 2021 Alma-field
# See LICENSE for details.
#
# based on tweepy(https://github.com/tweepy/tweepy)
# Copyright (c) 2009-2021 Joshua Roesslein
from .auth import AuthHandler
from .oauth import OAuth2Basic
| 22.580645 | 57 | 0.671429 |
b28d0dae8fb9ed9ee50b81bbf1aae13554854cbe | 1,352 | py | Python | src/baskerville/models/model_interface.py | deflect-ca/baskerville | 9659f4b39ab66fcf5329a4eccff15e97245b04f0 | [
"CC-BY-4.0"
] | 2 | 2021-12-03T11:26:38.000Z | 2022-01-12T22:24:29.000Z | src/baskerville/models/model_interface.py | deflect-ca/baskerville | 9659f4b39ab66fcf5329a4eccff15e97245b04f0 | [
"CC-BY-4.0"
] | 3 | 2022-01-19T15:17:37.000Z | 2022-03-22T04:55:22.000Z | src/baskerville/models/model_interface.py | deflect-ca/baskerville | 9659f4b39ab66fcf5329a4eccff15e97245b04f0 | [
"CC-BY-4.0"
] | null | null | null | # Copyright (c) 2020, eQualit.ie inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import inspect
import logging
| 26 | 71 | 0.621302 |
b28d6cf5837de54ecfea09556ec7ac0f5538da24 | 2,253 | py | Python | setup_win(MPL2).py | iefan/army_holiday | 0c79cf89c4dbb16bd87ca754265821f82b298f13 | [
"Apache-2.0"
] | null | null | null | setup_win(MPL2).py | iefan/army_holiday | 0c79cf89c4dbb16bd87ca754265821f82b298f13 | [
"Apache-2.0"
] | null | null | null | setup_win(MPL2).py | iefan/army_holiday | 0c79cf89c4dbb16bd87ca754265821f82b298f13 | [
"Apache-2.0"
] | null | null | null | # Used successfully in Python2.5 with matplotlib 0.91.2 and PyQt4 (and Qt 4.3.3)
from distutils.core import setup
import py2exe
import sys
# no arguments
if len(sys.argv) == 1:
sys.argv.append("py2exe")
# We need to import the glob module to search for all files.
import glob
# We need to exclude matplotlib back... | 51.204545 | 122 | 0.625388 |
b28f9f150dd905146af9d33f4c81aae2c96483db | 1,529 | py | Python | GeeksForGeeks/Sudo Placement 2019/Find the closest number.py | nayanapardhekar/Python | 55ea0cc1dd69192b25cb71358cd03cc2ce13be0a | [
"MIT"
] | 37 | 2019-04-03T07:19:57.000Z | 2022-01-09T06:18:41.000Z | GeeksForGeeks/Sudo Placement 2019/Find the closest number.py | nayanapardhekar/Python | 55ea0cc1dd69192b25cb71358cd03cc2ce13be0a | [
"MIT"
] | 16 | 2020-08-11T08:09:42.000Z | 2021-10-30T17:40:48.000Z | GeeksForGeeks/Sudo Placement 2019/Find the closest number.py | nayanapardhekar/Python | 55ea0cc1dd69192b25cb71358cd03cc2ce13be0a | [
"MIT"
] | 130 | 2019-10-02T14:40:20.000Z | 2022-01-26T17:38:26.000Z | # Find the closest number
# Difficulty: Basic Marks: 1
'''
Given an array of sorted integers. The task is to find the closest value to the given number in array. Array may contain duplicate values.
Note: If the difference is same for two values print the value which is greater than the given number.
Input:
The first... | 26.824561 | 264 | 0.517986 |
b2910846552317313e27d4630f9b125c62fc3263 | 4,391 | py | Python | qcodes/tests/test_sweep_values.py | riju-pal/QCoDeS_riju | 816e76809160e9af457f6ef6d4aca1b0dd5eea82 | [
"MIT"
] | 223 | 2016-10-29T15:00:24.000Z | 2022-03-20T06:53:34.000Z | qcodes/tests/test_sweep_values.py | M1racleShih/Qcodes | c03029a6968e16379155aadc8b083a02e01876a6 | [
"MIT"
] | 3,406 | 2016-10-25T10:44:50.000Z | 2022-03-31T09:47:35.000Z | qcodes/tests/test_sweep_values.py | nikhartman/Qcodes | 042c5e25ab9e40b20c316b4055c4842844834d1e | [
"MIT"
] | 263 | 2016-10-25T11:35:36.000Z | 2022-03-31T08:53:20.000Z | import pytest
from qcodes.instrument.parameter import Parameter
from qcodes.instrument.sweep_values import SweepValues
from qcodes.utils.validators import Numbers
def test_errors(c0, c1, c2):
# only complete 3-part slices are valid
with pytest.raises(TypeError):
c0[1:2] # For Int params this c... | 25.235632 | 76 | 0.566614 |
b2920a5b35fa8d9589396ec223bdc4d33e30fd7a | 350 | py | Python | src/django_powerdns_api/urls.py | andrzej-jankowski/django-powerdns-api | c7bc793022ba9fde2dd0e3564c3c63398611540b | [
"Apache-2.0"
] | null | null | null | src/django_powerdns_api/urls.py | andrzej-jankowski/django-powerdns-api | c7bc793022ba9fde2dd0e3564c3c63398611540b | [
"Apache-2.0"
] | null | null | null | src/django_powerdns_api/urls.py | andrzej-jankowski/django-powerdns-api | c7bc793022ba9fde2dd0e3564c3c63398611540b | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from django_powerdns_api.routers import router
urlpatterns = patterns(
'',
url(r... | 20.588235 | 51 | 0.768571 |
b292be09587a07ede608a3607cc6852e3db17188 | 925 | py | Python | tools/SDKTool/src/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/__init__.py | Passer-D/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 1,210 | 2020-08-18T07:57:36.000Z | 2022-03-31T15:06:05.000Z | tools/SDKTool/src/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/__init__.py | guokaiSama/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 37 | 2020-08-24T02:48:38.000Z | 2022-01-30T06:41:52.000Z | tools/SDKTool/src/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/__init__.py | guokaiSama/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 275 | 2020-08-18T08:35:16.000Z | 2022-03-31T15:06:07.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making GameAISDK available.
This source code file is licensed under the GNU General Public License Version 3.
For full details, please refer to the file "LICENSE.txt" which is provided as part of this source code package.
Copyright... | 35.576923 | 111 | 0.776216 |
b293b0671b5147e6e833e70a808c61e5033f825f | 579 | py | Python | python/codingbat/src/sum_double.py | christopher-burke/warmups | 140c96ada87ec5e9faa4622504ddee18840dce4a | [
"MIT"
] | null | null | null | python/codingbat/src/sum_double.py | christopher-burke/warmups | 140c96ada87ec5e9faa4622504ddee18840dce4a | [
"MIT"
] | 2 | 2022-03-10T03:49:14.000Z | 2022-03-14T00:49:54.000Z | python/codingbat/src/sum_double.py | christopher-burke/warmups | 140c96ada87ec5e9faa4622504ddee18840dce4a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""sum_double
Given two int values, return their sum.
Unless the two values are the same, then return double their sum.
sum_double(1, 2) 3
sum_double(3, 2) 5
sum_double(2, 2) 8
source: https://codingbat.com/prob/p141905
"""
def sum_double(a: int, b: int) -> int:
"""Sum Double.
... | 18.09375 | 65 | 0.618307 |
b293c4e951eab343a95232f50c197cd3ae253ad6 | 126 | py | Python | database_email_backend/__init__.py | enderlabs/django-database-email-backend | aad6bade66d076b5425f772430adc7e77e60f5ce | [
"MIT"
] | 1 | 2016-01-15T18:54:59.000Z | 2016-01-15T18:54:59.000Z | database_email_backend/__init__.py | enderlabs/django-database-email-backend | aad6bade66d076b5425f772430adc7e77e60f5ce | [
"MIT"
] | 1 | 2015-11-04T22:19:21.000Z | 2015-11-04T22:19:21.000Z | database_email_backend/__init__.py | enderlabs/django-database-email-backend | aad6bade66d076b5425f772430adc7e77e60f5ce | [
"MIT"
] | 4 | 2015-11-04T20:45:16.000Z | 2021-03-03T06:28:20.000Z | # -*- coding: utf-8 -*-
VERSION = (1, 0, 4)
__version__ = "1.0.4"
__authors__ = ["Stefan Foulis <stefan.foulis@gmail.com>", ]
| 25.2 | 59 | 0.611111 |
b293f0ceac4f743a52151b0799d4e433f9e36af9 | 366 | py | Python | src/draw.py | mattdesl/inkyphat-mods | 2867161e66ffce87b75170e081f5ab481ce5e6b1 | [
"MIT"
] | 7 | 2020-04-25T09:24:18.000Z | 2022-01-02T03:24:24.000Z | src/draw.py | mattdesl/inkyphat-mods | 2867161e66ffce87b75170e081f5ab481ce5e6b1 | [
"MIT"
] | null | null | null | src/draw.py | mattdesl/inkyphat-mods | 2867161e66ffce87b75170e081f5ab481ce5e6b1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse
from PIL import Image
from inky import InkyPHAT
print("""Inky pHAT/wHAT: Logo
Displays the Inky pHAT/wHAT logo.
""")
type = "phat"
colour = "black"
inky_display = InkyPHAT(colour)
inky_display.set_border(inky_display.BLACK)
img = Image.open("assets/InkypHAT-212x104-bw.png")
i... | 18.3 | 50 | 0.762295 |
b296a32574784e1bd7a3f60cbb896711ff7dd880 | 1,230 | py | Python | newsapp/tests.py | Esther-Anyona/four-one-one | 6a5e019b35710941a669c1b49e993b683c99d615 | [
"MIT"
] | null | null | null | newsapp/tests.py | Esther-Anyona/four-one-one | 6a5e019b35710941a669c1b49e993b683c99d615 | [
"MIT"
] | null | null | null | newsapp/tests.py | Esther-Anyona/four-one-one | 6a5e019b35710941a669c1b49e993b683c99d615 | [
"MIT"
] | null | null | null | from django.test import TestCase
from .models import *
from django.contrib.auth.models import User
# Create your tests here.
user = User.objects.get(id=1)
profile = Profile.objects.get(id=1)
neighbourhood = Neighbourhood.objects.get(id=1)
| 30 | 170 | 0.702439 |
b296bd14330ba64af65527855f690dd49d0a2709 | 4,620 | py | Python | ssdlite/load_caffe_weights.py | kkrpawkal/MobileNetv2-SSDLite | b434ed07b46d6e7f733ec97e180b57c8db30cae3 | [
"MIT"
] | null | null | null | ssdlite/load_caffe_weights.py | kkrpawkal/MobileNetv2-SSDLite | b434ed07b46d6e7f733ec97e180b57c8db30cae3 | [
"MIT"
] | null | null | null | ssdlite/load_caffe_weights.py | kkrpawkal/MobileNetv2-SSDLite | b434ed07b46d6e7f733ec97e180b57c8db30cae3 | [
"MIT"
] | null | null | null | import numpy as np
import sys,os
caffe_root = '/home/yaochuanqi/work/ssd/caffe/'
sys.path.insert(0, caffe_root + 'python')
import caffe
deploy_proto = 'deploy.prototxt'
save_model = 'deploy.caffemodel'
weights_dir = 'output'
box_layers = ['conv_13/expand', 'Conv_1', 'layer_19_2_2', 'layer_19_2_3', 'layer_19... | 54.352941 | 124 | 0.541775 |
b2977674be0d43e625cea5afb3180e9f200426a4 | 996 | py | Python | qa327/frontend/exceptions.py | rickyzhangca/CISC-327 | e419caafa6ae3fe77aa411228b6b58b237fe6a61 | [
"MIT"
] | null | null | null | qa327/frontend/exceptions.py | rickyzhangca/CISC-327 | e419caafa6ae3fe77aa411228b6b58b237fe6a61 | [
"MIT"
] | 39 | 2020-10-11T02:31:14.000Z | 2020-12-15T20:18:56.000Z | qa327/frontend/exceptions.py | rickyzhangca/CISC-327 | e419caafa6ae3fe77aa411228b6b58b237fe6a61 | [
"MIT"
] | 1 | 2020-10-17T02:44:43.000Z | 2020-10-17T02:44:43.000Z | '''
This is the exceptions module:
'''
'''
Exception of when user do not have the access to certain pages.
'''
'''
Exception of the first password and the second password does not match during registration.
'''
'''
Exception of when the user input format is wrong.
'''
'''
Exception of when the ticket name is wrong... | 21.191489 | 91 | 0.736948 |
b299f61f9bab8f0fdfd0cbba6dbcac61cd8b37ce | 239 | py | Python | dags/minimal_dag.py | MarcusJones/kaggle_petfinder_adoption | 2d745b48405f4d4211b523eae272b9169fcf9fa2 | [
"MIT"
] | 1 | 2019-01-24T04:22:39.000Z | 2019-01-24T04:22:39.000Z | dags/minimal_dag.py | MarcusJones/kaggle_petfinder_adoption | 2d745b48405f4d4211b523eae272b9169fcf9fa2 | [
"MIT"
] | null | null | null | dags/minimal_dag.py | MarcusJones/kaggle_petfinder_adoption | 2d745b48405f4d4211b523eae272b9169fcf9fa2 | [
"MIT"
] | null | null | null | import airflow as af
from airflow.operators.dummy_operator import DummyOperator
from datetime import datetime
with af.DAG('minimal_dag', start_date=datetime(2016, 1, 1)) as dag:
op = DummyOperator(task_id='op')
op.dag is dag # True
| 23.9 | 67 | 0.76569 |
b29ab73d546b03f1d056e040fdce2adc50067aef | 2,567 | py | Python | app.py | paulinaacostac/GPT2 | 4d06584b2e8adfa708f1306e38dadd48c899ac8a | [
"MIT"
] | 2 | 2022-01-06T17:48:58.000Z | 2022-01-06T18:23:31.000Z | app.py | paulinaacostac/gpt2-WebAPI | 4d06584b2e8adfa708f1306e38dadd48c899ac8a | [
"MIT"
] | null | null | null | app.py | paulinaacostac/gpt2-WebAPI | 4d06584b2e8adfa708f1306e38dadd48c899ac8a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import os
import numpy as np
import tensorflow.compat.v1 as tf
from src import model, sample, encoder
from flask import Flask
from flask import request, jsonify
import time
######model
########API
gen = interact_model()
sess, context, output, enc = next(gen)
app = Flask(__nam... | 26.463918 | 159 | 0.603039 |
b29b61190657129eadf2448fe993cb4e944db000 | 1,096 | py | Python | t/unit/utils/test_div.py | kaiix/kombu | 580b5219cc50cad278c4b664d0e0f85e37a5e9ea | [
"BSD-3-Clause"
] | 1,920 | 2015-01-03T15:43:23.000Z | 2022-03-30T19:30:35.000Z | t/unit/utils/test_div.py | kaiix/kombu | 580b5219cc50cad278c4b664d0e0f85e37a5e9ea | [
"BSD-3-Clause"
] | 949 | 2015-01-02T18:56:00.000Z | 2022-03-31T23:14:59.000Z | t/unit/utils/test_div.py | kaiix/kombu | 580b5219cc50cad278c4b664d0e0f85e37a5e9ea | [
"BSD-3-Clause"
] | 833 | 2015-01-07T23:56:35.000Z | 2022-03-31T22:04:11.000Z | import pickle
from io import BytesIO, StringIO
from kombu.utils.div import emergency_dump_state
| 23.319149 | 69 | 0.595803 |
b29c8d36ba3db7e707e861825377dec464aebc9b | 3,754 | py | Python | intents/oversights/more_than_just_topk.py | googleinterns/debaised-analysis | 0dad1186a177a171956a33c49999d9387b9f989d | [
"Apache-2.0"
] | 1 | 2020-06-26T19:16:15.000Z | 2020-06-26T19:16:15.000Z | intents/oversights/more_than_just_topk.py | bhagyakjain/debaised-analysis | 6b8b27575bf3f60a6711e370bfad838e29f5cc8a | [
"Apache-2.0"
] | 30 | 2020-06-01T13:42:25.000Z | 2022-03-31T03:58:55.000Z | intents/oversights/more_than_just_topk.py | googleinterns/debaised-analysis | 0dad1186a177a171956a33c49999d9387b9f989d | [
"Apache-2.0"
] | 10 | 2020-06-10T05:43:59.000Z | 2020-08-20T10:32:24.000Z | """
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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distrib... | 37.168317 | 117 | 0.697389 |
b29e142efe612167f93b68a27b4c24715a4da2ff | 1,058 | py | Python | zkpytb/json.py | zertrin/zkpytb | 066662d9c7bd233f977302cb11cf888a2a1828d2 | [
"MIT"
] | 2 | 2021-07-17T19:30:17.000Z | 2022-02-14T04:55:46.000Z | zkpytb/json.py | zertrin/zkpytb | 066662d9c7bd233f977302cb11cf888a2a1828d2 | [
"MIT"
] | null | null | null | zkpytb/json.py | zertrin/zkpytb | 066662d9c7bd233f977302cb11cf888a2a1828d2 | [
"MIT"
] | null | null | null | """
Helper functions related to json
Author: Marc Gallet
"""
import datetime
import decimal
import json
import uuid
import pathlib
| 27.128205 | 88 | 0.618147 |
b29e7d32ca4c3f659315bd72acd899c4542a2363 | 1,960 | py | Python | back_end/consts.py | DoctorChe/crash_map | e540ab8a45f67ff78c9993ac3eb1b413d4786cd9 | [
"MIT"
] | 1 | 2019-04-04T21:55:24.000Z | 2019-04-04T21:55:24.000Z | back_end/consts.py | DoctorChe/crash_map | e540ab8a45f67ff78c9993ac3eb1b413d4786cd9 | [
"MIT"
] | 2 | 2019-04-14T10:11:25.000Z | 2019-04-25T20:49:54.000Z | back_end/consts.py | DoctorChe/crash_map | e540ab8a45f67ff78c9993ac3eb1b413d4786cd9 | [
"MIT"
] | null | null | null | # encoding: utf-8
# input data constants
MARI_EL = ' '
YOSHKAR_OLA = ' , -'
VOLZHSK = ' , '
VOLZHSK_ADM = ' , '
MOUNTIN = ' , '
ZVENIGOVO = ' , '
KILEMARY = ' , '
KUZHENER = ' , '
TUREK = ' , - '
MEDVEDEVO = ' , '
MORKI = ' , '
NEW_TORYAL = ' , '
ORSHANKA = ' , '
PARANGA = ' , '
SERNUR = ' , ... | 26.849315 | 175 | 0.758673 |
b29fec21f725de737210b497e78b6e2a1d2273be | 7,195 | py | Python | tests/unit/modules/win_iis_test.py | matt-malarkey/salt | c06860730d99e4f4941cbc164ee6db40157a07c9 | [
"Apache-2.0"
] | 1 | 2018-09-19T22:42:54.000Z | 2018-09-19T22:42:54.000Z | tests/unit/modules/win_iis_test.py | matt-malarkey/salt | c06860730d99e4f4941cbc164ee6db40157a07c9 | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/win_iis_test.py | matt-malarkey/salt | c06860730d99e4f4941cbc164ee6db40157a07c9 | [
"Apache-2.0"
] | 1 | 2019-07-23T13:42:23.000Z | 2019-07-23T13:42:23.000Z | # -*- coding: utf-8 -*-
'''
:synopsis: Unit Tests for Windows IIS Module 'module.win_iis'
:platform: Windows
:maturity: develop
versionadded:: Carbon
'''
# Import Python Libs
from __future__ import absolute_import
import json
# Import Salt Libs
from salt.exceptions import SaltInvocationError
from salt... | 40.421348 | 88 | 0.522168 |
b2a0afa260118cc81d83a6eee84100a7f5b452a7 | 6,217 | py | Python | scripts/loader_to_sharepoint.py | lawrkelly/python-useful-scripts | dfa044049e41bd0faed96473a79b4a25e051c198 | [
"MIT"
] | null | null | null | scripts/loader_to_sharepoint.py | lawrkelly/python-useful-scripts | dfa044049e41bd0faed96473a79b4a25e051c198 | [
"MIT"
] | 4 | 2020-09-18T09:58:14.000Z | 2021-12-13T20:47:39.000Z | scripts/loader_to_sharepoint.py | lawrkelly/python-useful-scripts | dfa044049e41bd0faed96473a79b4a25e051c198 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Loader_to_sharepoint.py
#
#
from pathlib import Path
import os.path
import requests,json,urllib
import pandas as pd
import collections
from collections import defaultdict
import xmltodict
import getpass
from shareplum import Office365
from shareplum.site import Version
from sha... | 32.89418 | 149 | 0.579379 |
b2a1766bc5fbc87d90f9559b3c26e49052f3b261 | 869 | py | Python | tests/test_tunnels_released.py | jhaapako/tcf | ecd75404459c6fec9d9fa1522b70a8deab896644 | [
"Apache-2.0"
] | 24 | 2018-08-21T18:04:48.000Z | 2022-02-07T22:50:06.000Z | tests/test_tunnels_released.py | jhaapako/tcf | ecd75404459c6fec9d9fa1522b70a8deab896644 | [
"Apache-2.0"
] | 16 | 2018-08-21T18:03:52.000Z | 2022-03-01T17:15:42.000Z | tests/test_tunnels_released.py | jhaapako/tcf | ecd75404459c6fec9d9fa1522b70a8deab896644 | [
"Apache-2.0"
] | 29 | 2018-08-22T19:40:59.000Z | 2021-12-21T11:13:23.000Z | #! /usr/bin/python3
#
# Copyright (c) 2017 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
# pylint: disable = missing-docstring
import os
import socket
import commonl.testing
import tcfl
import tcfl.tc
srcdir = os.path.dirname(__file__)
ttbd = commonl.testing.test_ttbd(config_files = [
# strip to re... | 24.138889 | 77 | 0.700806 |
b2a18a1d5893e676f4cfbf5555c659a91725ab53 | 52,309 | py | Python | tagger-algo.py | li992/MAT | a5fb87b2d1ef667e5eb4a1c4e87caae6f1f75292 | [
"Apache-2.0"
] | null | null | null | tagger-algo.py | li992/MAT | a5fb87b2d1ef667e5eb4a1c4e87caae6f1f75292 | [
"Apache-2.0"
] | null | null | null | tagger-algo.py | li992/MAT | a5fb87b2d1ef667e5eb4a1c4e87caae6f1f75292 | [
"Apache-2.0"
] | null | null | null | import glob,os,stanza,argparse
from datetime import datetime
# route initiation
directory_path = os.getcwd()
#stanford tagger initiation
nlp = stanza.Pipeline('en')
dimDict ={}
# type specifiers
have = ["have","has","'ve","had","having","hath"]
do = ["do","does","did","doing","done"]
wp = ["who","whom","whose","whic... | 71.853022 | 3,008 | 0.580569 |
b2a64ad7dcb9aaa41898aea3c2d8af7ef4fc0f3f | 1,582 | py | Python | template.py | deepak7376/design_pattern | 855aa0879d478f7b2682c2ae5e92599b5c81a1c6 | [
"MIT"
] | null | null | null | template.py | deepak7376/design_pattern | 855aa0879d478f7b2682c2ae5e92599b5c81a1c6 | [
"MIT"
] | null | null | null | template.py | deepak7376/design_pattern | 855aa0879d478f7b2682c2ae5e92599b5c81a1c6 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
class FileAverageCalculator(AverageCalculator):
class MemoryAverageCalculator(AverageCalculator):
mac = MemoryAverageCalculator([3, 1, 4, 1, 5, 9, 2, 6, 5, 3])
print(mac.average()) # Call the template method
# fac = FileAverageCalculator(open('data.txt'))
# print(fac.average... | 21.972222 | 78 | 0.583439 |
b2a90936580b1ab7bbc9587223bca80795b6020a | 2,906 | py | Python | conanfile.py | helmesjo/conan-lua | da8f0c54ac9d1949c6ac64d9ab64639df8226061 | [
"MIT"
] | null | null | null | conanfile.py | helmesjo/conan-lua | da8f0c54ac9d1949c6ac64d9ab64639df8226061 | [
"MIT"
] | 1 | 2019-12-26T18:53:06.000Z | 2020-02-12T13:45:40.000Z | conanfile.py | helmesjo/conan-lua | da8f0c54ac9d1949c6ac64d9ab64639df8226061 | [
"MIT"
] | null | null | null | from conans import ConanFile, CMake, tools
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
| 42.735294 | 151 | 0.66724 |
b2a93406f378840531084977a82ef40530d2aedf | 3,800 | py | Python | train.py | mcao610/My_BART | 0f5963ff8688986e28b2ff94a9cc7a3a0adcf3a3 | [
"MIT"
] | null | null | null | train.py | mcao610/My_BART | 0f5963ff8688986e28b2ff94a9cc7a3a0adcf3a3 | [
"MIT"
] | null | null | null | train.py | mcao610/My_BART | 0f5963ff8688986e28b2ff94a9cc7a3a0adcf3a3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import torch
import logging
import torch.distributed as dist
import torch.multiprocessing as mp
from torch.utils.data import Dataset, DataLoader, BatchSampler
from torch.utils.data.distributed import DistributedSampler
from fairseq.tasks.translation ... | 31.932773 | 103 | 0.669737 |
b2aa5d4587a6ca679b22dbefb38488aae64a9c0e | 4,555 | py | Python | yaml-to-md.py | phlummox/pptx-to-md | 6bd16c9cdf28946cd0ab9b8766b6eea1410de705 | [
"Unlicense"
] | 2 | 2022-02-19T11:45:56.000Z | 2022-03-07T13:34:09.000Z | yaml-to-md.py | phlummox/pptx-to-md | 6bd16c9cdf28946cd0ab9b8766b6eea1410de705 | [
"Unlicense"
] | null | null | null | yaml-to-md.py | phlummox/pptx-to-md | 6bd16c9cdf28946cd0ab9b8766b6eea1410de705 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
"""
intermediate yaml to markdown conversion
"""
import sys
import yaml
def yaml_to_markdown(yaml, outfile):
"""Given a list of dicts representing PowerPoint slides
-- presumably loaded from a YAML file -- convert to
markdown and print the result on the file-like
object 'outfile'.
""... | 25.305556 | 88 | 0.630077 |
b2aacb8c58e5a1abfc8fe218bf0ba965384b2044 | 1,032 | py | Python | library/real/display_real.py | console-beaver/MIT-Racecar-cbeast | f7f9c156e7072da7acc680ae1ad1de344253ae05 | [
"MIT"
] | null | null | null | library/real/display_real.py | console-beaver/MIT-Racecar-cbeast | f7f9c156e7072da7acc680ae1ad1de344253ae05 | [
"MIT"
] | null | null | null | library/real/display_real.py | console-beaver/MIT-Racecar-cbeast | f7f9c156e7072da7acc680ae1ad1de344253ae05 | [
"MIT"
] | null | null | null | """
Copyright Harvey Mudd College
MIT License
Spring 2020
Contains the Display module of the racecar_core library
"""
import cv2 as cv
import os
from nptyping import NDArray
from display import Display
| 23.454545 | 78 | 0.587209 |
b2ad711075be04cba1f9b409149e9a9fc3958436 | 749 | py | Python | DominantSparseEigenAD/tests/demos/2ndderivative.py | buwantaiji/DominantSparseEigenAD | 36d534b6713ba256309b07116ebc542bee01cd51 | [
"Apache-2.0"
] | 23 | 2019-10-29T03:35:18.000Z | 2022-02-11T16:38:24.000Z | DominantSparseEigenAD/tests/demos/2ndderivative.py | navyTensor/DominantSparseEigenAD | 3a5ac361edafd82f98ecf4d9fcad5c4e0b242178 | [
"Apache-2.0"
] | null | null | null | DominantSparseEigenAD/tests/demos/2ndderivative.py | navyTensor/DominantSparseEigenAD | 3a5ac361edafd82f98ecf4d9fcad5c4e0b242178 | [
"Apache-2.0"
] | 6 | 2019-11-06T09:09:45.000Z | 2022-02-09T06:24:15.000Z | """
A small toy example demonstrating how the process of computing 1st
derivative can be added to the original computation graph to produce an enlarged
graph whose back-propagation yields the 2nd derivative.
"""
import torch
x = torch.randn(10, requires_grad=True)
exp = torch.exp(x)
cos = torch.cos(x)
y = exp * co... | 32.565217 | 86 | 0.695594 |
b2adb9d7006450ffeda3b214aef1de0a2d913357 | 1,335 | py | Python | test_default.py | dukedhx/tokenflex-reporting-python-script | f837b4e4a1cf388620da94abbaddab6bcabd51a8 | [
"MIT"
] | 4 | 2018-12-17T09:09:44.000Z | 2020-12-15T16:35:47.000Z | test_default.py | dukedhx/tokenflex-reporting-python-script | f837b4e4a1cf388620da94abbaddab6bcabd51a8 | [
"MIT"
] | null | null | null | test_default.py | dukedhx/tokenflex-reporting-python-script | f837b4e4a1cf388620da94abbaddab6bcabd51a8 | [
"MIT"
] | 4 | 2019-09-01T10:08:32.000Z | 2021-01-09T10:12:46.000Z | #####################################################################
## Copyright (c) Autodesk, Inc. All rights reserved
## Written by Forge Partner Development
##
## Permission to use, copy, modify, and distribute this software in
## object code form for any purpose and without fee is hereby granted,
## provided that... | 32.560976 | 70 | 0.691386 |
b2ae0f0ae136e69e9eedb942d08d354586e0fafa | 4,850 | py | Python | HyperAPI/hdp_api/routes/nitro.py | RomainGeffraye/HyperAPI | 6bcd831ee48abb3a4f67f85051bc0d2a07c7aaef | [
"BSD-3-Clause"
] | null | null | null | HyperAPI/hdp_api/routes/nitro.py | RomainGeffraye/HyperAPI | 6bcd831ee48abb3a4f67f85051bc0d2a07c7aaef | [
"BSD-3-Clause"
] | null | null | null | HyperAPI/hdp_api/routes/nitro.py | RomainGeffraye/HyperAPI | 6bcd831ee48abb3a4f67f85051bc0d2a07c7aaef | [
"BSD-3-Clause"
] | null | null | null | from HyperAPI.hdp_api.routes import Resource, Route
from HyperAPI.hdp_api.routes.base.version_management import available_since
| 38.188976 | 113 | 0.640412 |
b2b1ab378336c1f38be58369252277dd0f368208 | 4,883 | py | Python | third_party/pyth/p2w_autoattest.py | dendisuhubdy/wormhole | 29cd5a3934aaf489a1b7aa45495414c5cb974c82 | [
"Apache-2.0"
] | 695 | 2020-08-29T22:42:51.000Z | 2022-03-31T05:33:57.000Z | third_party/pyth/p2w_autoattest.py | dendisuhubdy/wormhole | 29cd5a3934aaf489a1b7aa45495414c5cb974c82 | [
"Apache-2.0"
] | 478 | 2020-08-30T16:48:42.000Z | 2022-03-30T23:00:11.000Z | third_party/pyth/p2w_autoattest.py | dendisuhubdy/wormhole | 29cd5a3934aaf489a1b7aa45495414c5cb974c82 | [
"Apache-2.0"
] | 230 | 2020-10-19T06:44:13.000Z | 2022-03-28T11:11:47.000Z | #!/usr/bin/env python3
# This script sets up a simple loop for periodical attestation of Pyth data
from pyth_utils import *
from http.client import HTTPConnection
from http.server import HTTPServer, BaseHTTPRequestHandler
import json
import os
import re
import subprocess
import time
import threading
P2W_ADDRESS = ... | 27.587571 | 87 | 0.683596 |
a22accaa90f9f185eea9b823f9c8bb986540fecb | 3,644 | py | Python | hands-on_introduction/3 - model_validation.py | varunpandey0502/skyfi_labs_ml_workshop | 6a209a16ca3674c1d2cd75e4dcc2e695f50dc583 | [
"MIT"
] | null | null | null | hands-on_introduction/3 - model_validation.py | varunpandey0502/skyfi_labs_ml_workshop | 6a209a16ca3674c1d2cd75e4dcc2e695f50dc583 | [
"MIT"
] | null | null | null | hands-on_introduction/3 - model_validation.py | varunpandey0502/skyfi_labs_ml_workshop | 6a209a16ca3674c1d2cd75e4dcc2e695f50dc583 | [
"MIT"
] | null | null | null | import pandas as pd
melbourne_file_path = './melbourne_housing_data.csv'
melbourne_data = pd.read_csv(melbourne_file_path)
melbourne_data.dropna(axis=0)
y = melbourne_data.Price
melbourne_features = ['Rooms','Bathroom','Landsize','Lattitude','Longtitude']
X = melbourne_data[melbourne_features]
X.describe()
X.he... | 35.378641 | 353 | 0.791164 |
a22cbabe9b6d8f3afdad45c7ee147591f90ad7e9 | 3,406 | py | Python | src/npu/comprehension.py | feagi/feagi | 598abbe294b5d9cd7ff34861fa6568ba899b2ab8 | [
"Apache-2.0"
] | 1 | 2022-03-17T08:27:11.000Z | 2022-03-17T08:27:11.000Z | src/npu/comprehension.py | feagi/feagi | 598abbe294b5d9cd7ff34861fa6568ba899b2ab8 | [
"Apache-2.0"
] | 1 | 2022-02-10T16:30:35.000Z | 2022-02-10T16:33:21.000Z | src/npu/comprehension.py | feagi/feagi | 598abbe294b5d9cd7ff34861fa6568ba899b2ab8 | [
"Apache-2.0"
] | 1 | 2022-02-07T22:15:54.000Z | 2022-02-07T22:15:54.000Z |
# Copyright 2016-2022 The FEAGI 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 applic... | 44.233766 | 120 | 0.620376 |
a22ccf953739987c462b05149a48bd232390c0be | 5,286 | py | Python | policyhandler/onap/process_info.py | alex-sh2020/dcaegen2-platform-policy-handler | e969b079e331cc32b1ca361c49ee7b56e43900a7 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2020-07-14T18:54:07.000Z | 2020-07-14T19:16:06.000Z | policyhandler/onap/process_info.py | alex-sh2020/dcaegen2-platform-policy-handler | e969b079e331cc32b1ca361c49ee7b56e43900a7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | policyhandler/onap/process_info.py | alex-sh2020/dcaegen2-platform-policy-handler | e969b079e331cc32b1ca361c49ee7b56e43900a7 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2020-07-14T18:53:46.000Z | 2021-10-15T16:55:54.000Z | # ================================================================================
# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use ... | 34.54902 | 95 | 0.573023 |