hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38c62692fda0c5705934a7c506f825f68cfeadc1 | 2,109 | py | Python | lib/resnet_parameters.py | googleinterns/loop-project | 28acb1c815e0a65f51e809d278eea08ffb06483e | [
"Apache-2.0"
] | 3 | 2020-05-29T00:34:34.000Z | 2020-12-14T21:50:12.000Z | lib/resnet_parameters.py | googleinterns/loop-project | 28acb1c815e0a65f51e809d278eea08ffb06483e | [
"Apache-2.0"
] | 2 | 2020-07-21T00:57:15.000Z | 2020-09-04T22:09:33.000Z | lib/resnet_parameters.py | googleinterns/loop-project | 28acb1c815e0a65f51e809d278eea08ffb06483e | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass, field
import tensorflow as tf
@dataclass
class ResNetParameters:
"""Stores ResNet parameters.
Arguments:
input_shape (tensor): shape of input image tensor
num_layers (int): number of residual blocks
num_classes (int): number of classes
num_templates (int): number of temp... | 35.745763 | 73 | 0.733049 |
faf4c4d8f0b4b6194a1c551fb92679f8fc7673df | 2,224 | py | Python | suzieq/genhosts.py | foobug/suzieq | c5927616a0e1a1fd9283f2a3eeb120d24ff0f2b5 | [
"Apache-2.0"
] | 487 | 2020-04-29T13:34:34.000Z | 2022-03-31T06:13:41.000Z | suzieq/genhosts.py | foobug/suzieq | c5927616a0e1a1fd9283f2a3eeb120d24ff0f2b5 | [
"Apache-2.0"
] | 410 | 2020-04-24T20:57:52.000Z | 2022-03-31T18:07:48.000Z | suzieq/genhosts.py | foobug/suzieq | c5927616a0e1a1fd9283f2a3eeb120d24ff0f2b5 | [
"Apache-2.0"
] | 75 | 2020-04-29T22:13:34.000Z | 2022-03-31T17:00:17.000Z | #!/usr/bin/env python3
import sys
import shlex
def process_ansible_inventory(filename, namespace='default'):
"""Read an Ansible inventory file and produce device list for suzieq
:param filename: Ansible inventory filename
:type filename: string
:param namespace: The namespace associated with the da... | 28.883117 | 86 | 0.515737 |
9d39035a81627868f41bf9748875f830cfb318d6 | 640 | py | Python | Sort/04.04_quicksort_one_recursion.py | Szymon-Budziak/ASD_exercises_solutions | 36ccbdae03a6c7e4ad141a2b7b01bef9353574ee | [
"MIT"
] | 7 | 2021-12-28T23:38:42.000Z | 2022-03-29T16:36:16.000Z | Sort/04.04_quicksort_one_recursion.py | Szymon-Budziak/ASD_exercises_solutions | 36ccbdae03a6c7e4ad141a2b7b01bef9353574ee | [
"MIT"
] | null | null | null | Sort/04.04_quicksort_one_recursion.py | Szymon-Budziak/ASD_exercises_solutions | 36ccbdae03a6c7e4ad141a2b7b01bef9353574ee | [
"MIT"
] | 4 | 2021-06-29T20:21:52.000Z | 2022-03-12T10:04:17.000Z | from time import perf_counter
from random import randint, seed
seed(100)
def partition(T, p, r):
pivot = T[r]
i = p-1
for j in range(p, r):
if T[j] <= pivot:
i += 1
T[i], T[j] = T[j], T[i]
T[i+1], T[r] = T[r], T[i+1]
return i+1
def quicksort(T, p, r):
while p ... | 18.823529 | 44 | 0.479688 |
130123773f93b8fba7426540ddca75e27c97e11b | 1,659 | py | Python | iRobotCreateLib/ConfigManager.py | ramtinkermani/iRobotCreateAPI-Python | 2eaf9d40b5e2af57fae2db222252556fc95ab92c | [
"MIT"
] | null | null | null | iRobotCreateLib/ConfigManager.py | ramtinkermani/iRobotCreateAPI-Python | 2eaf9d40b5e2af57fae2db222252556fc95ab92c | [
"MIT"
] | null | null | null | iRobotCreateLib/ConfigManager.py | ramtinkermani/iRobotCreateAPI-Python | 2eaf9d40b5e2af57fae2db222252556fc95ab92c | [
"MIT"
] | null | null | null | import json
from Errors import IRobotCreateError, ErrorCode
class ConfigManager:
configuration = {}
@staticmethod
def __readConfig():
try:
# TODO: Change the follwoing to a relative path. Temporary fix.
fp = open("/home/pi/workspace/PyCharmRemote/iRobotCreateLib/configurati... | 40.463415 | 144 | 0.675708 |
02f017f0b6c8ea56efe3e24ccbee4d2bb5eb1799 | 3,872 | py | Python | facebook_business/adobjects/playablecontent.py | mschmo/facebook-python-ads-sdk | bf273b4627c99dc261e4483ae0a4c5de648b37c8 | [
"CNRI-Python"
] | null | null | null | facebook_business/adobjects/playablecontent.py | mschmo/facebook-python-ads-sdk | bf273b4627c99dc261e4483ae0a4c5de648b37c8 | [
"CNRI-Python"
] | null | null | null | facebook_business/adobjects/playablecontent.py | mschmo/facebook-python-ads-sdk | bf273b4627c99dc261e4483ae0a4c5de648b37c8 | [
"CNRI-Python"
] | null | null | null | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | 36.528302 | 124 | 0.686725 |
70d3c9496ec73087098d268296c4315738ea29f7 | 2,916 | py | Python | junior_class/chapter-3-Computer_Vision/code/nets/AlexNet.py | wwhio/awesome-DeepLearning | 2cc92edcf0c22bdfc670c537cc819c8fadf33fac | [
"Apache-2.0"
] | 1,150 | 2021-06-01T03:44:21.000Z | 2022-03-31T13:43:42.000Z | junior_class/chapter-3-Computer_Vision/code/nets/AlexNet.py | wwhio/awesome-DeepLearning | 2cc92edcf0c22bdfc670c537cc819c8fadf33fac | [
"Apache-2.0"
] | 358 | 2021-06-01T03:58:47.000Z | 2022-03-28T02:55:00.000Z | junior_class/chapter-3-Computer_Vision/code/nets/AlexNet.py | wwhio/awesome-DeepLearning | 2cc92edcf0c22bdfc670c537cc819c8fadf33fac | [
"Apache-2.0"
] | 502 | 2021-05-31T12:52:14.000Z | 2022-03-31T02:51:41.000Z | # Copyright (c) 2021 PaddlePaddle 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 appli... | 31.021277 | 74 | 0.580933 |
4cb58ae571f6f42f544ec36dd319d5bc742bf493 | 17,043 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_log_analytics_operations.py | dubiety/azure-sdk-for-python | 62ffa839f5d753594cf0fe63668f454a9d87a346 | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_log_analytics_operations.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_log_analytics_operations.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 45.206897 | 211 | 0.681394 |
4d0f748e4bbbe187b19ecaa48ff425cdaa0a4e3b | 2,301 | py | Python | misc/haptics/game.py | mmolnar0/sgillen_research | 752e09fdf7a996c832e71b0a8296322fe77e9ae3 | [
"MIT"
] | null | null | null | misc/haptics/game.py | mmolnar0/sgillen_research | 752e09fdf7a996c832e71b0a8296322fe77e9ae3 | [
"MIT"
] | null | null | null | misc/haptics/game.py | mmolnar0/sgillen_research | 752e09fdf7a996c832e71b0a8296322fe77e9ae3 | [
"MIT"
] | null | null | null | import cv2
import cv2.aruco as aruco
import numpy as np
from scipy.signal import sawtooth
from numpy import sin, pi
import sounddevice as sd
# Open the default camera (should be your built in webcam if you have one)
cap = cv2.VideoCapture(0)
if not cap.isOpened():
print("something went wrong! video not open")
... | 32.871429 | 116 | 0.706215 |
1332867b1a2c8a2ed09c95a527615a2e6313426b | 210 | py | Python | John/deploy_john/pack_to_bento.py | handertolium/lil-NLP-app | 10342a58034af2b343d3e993910fb98571b509d4 | [
"Apache-2.0"
] | null | null | null | John/deploy_john/pack_to_bento.py | handertolium/lil-NLP-app | 10342a58034af2b343d3e993910fb98571b509d4 | [
"Apache-2.0"
] | null | null | null | John/deploy_john/pack_to_bento.py | handertolium/lil-NLP-app | 10342a58034af2b343d3e993910fb98571b509d4 | [
"Apache-2.0"
] | null | null | null | import torch
from main import QandA
def saveBento():
bento_svc = QandA()
bento_svc.pack('onnx_model', './john_model_fp16.onnx')
bento_svc.save()
if __name__ == '__main__':
saveBento() | 14 | 58 | 0.657143 |
722c93d91dceb88cc76f522b12b2edbc725294eb | 5,446 | py | Python | src/sentinel/azext_sentinel/vendored_sdks/logic_app/mgmt/logic/operations/workflow_version_triggers_operations.py | amirjalali65/azure-cli-extensions | dcc7607afafea1815d70bc5c765b7a0be07544a7 | [
"MIT"
] | null | null | null | src/sentinel/azext_sentinel/vendored_sdks/logic_app/mgmt/logic/operations/workflow_version_triggers_operations.py | amirjalali65/azure-cli-extensions | dcc7607afafea1815d70bc5c765b7a0be07544a7 | [
"MIT"
] | null | null | null | src/sentinel/azext_sentinel/vendored_sdks/logic_app/mgmt/logic/operations/workflow_version_triggers_operations.py | amirjalali65/azure-cli-extensions | dcc7607afafea1815d70bc5c765b7a0be07544a7 | [
"MIT"
] | 1 | 2021-02-17T21:35:31.000Z | 2021-02-17T21:35:31.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 44.639344 | 221 | 0.672971 |
df9036b197570a80a809da1c56061dc6f1f4a3ca | 6,691 | py | Python | tests/ci/build_check.py | newly12/ClickHouse | e1c2e629d8c077193f951cdb02fac9c0b1631c65 | [
"Apache-2.0"
] | 1 | 2021-11-25T08:42:06.000Z | 2021-11-25T08:42:06.000Z | tests/ci/build_check.py | zhaoqiang75/ClickHouse | c86b43c7efc1c0cc9c66eb3c7d1274326378ce1b | [
"Apache-2.0"
] | null | null | null | tests/ci/build_check.py | zhaoqiang75/ClickHouse | c86b43c7efc1c0cc9c66eb3c7d1274326378ce1b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
import subprocess
import logging
import json
import os
import sys
import time
from github import Github
from s3_helper import S3Helper
from pr_info import PRInfo
from get_robot_token import get_best_robot_token
from version_helper import get_version_from_repo, update_version_local
from ccache_u... | 36.966851 | 179 | 0.698401 |
a92071e10b429d8d42cc08aec09974708a8635c5 | 4,350 | py | Python | backend/dataset/publish/repository/tts.py | agupta54/ulca | c1f570ac254ce2ac73f40c49716458f4f7cbaee2 | [
"MIT"
] | 3 | 2022-01-12T06:51:51.000Z | 2022-02-23T18:54:33.000Z | backend/dataset/publish/repository/tts.py | agupta54/ulca | c1f570ac254ce2ac73f40c49716458f4f7cbaee2 | [
"MIT"
] | 6 | 2021-08-31T19:21:26.000Z | 2022-01-03T05:53:42.000Z | backend/dataset/publish/repository/tts.py | agupta54/ulca | c1f570ac254ce2ac73f40c49716458f4f7cbaee2 | [
"MIT"
] | 8 | 2021-08-12T08:07:49.000Z | 2022-01-25T04:40:51.000Z | import logging
from collections import OrderedDict
from datetime import datetime
from logging.config import dictConfig
from bson import ObjectId
from configs.configs import db_cluster, db, tts_collection
import pymongo
log = logging.getLogger('file')
mongo_instance_tts = None
class TTSRepo:
def __init__(self)... | 32.706767 | 116 | 0.54 |
6309e90ee4144a8109840fbeeb1b9e5cd77209c4 | 2,948 | py | Python | yolox/utils/allreduce_norm.py | mrzhuzhe/YOLOX | ffb5e3f70a181bc75c045faa7e7f4668d79d629a | [
"Apache-2.0"
] | 1 | 2022-01-29T15:47:50.000Z | 2022-01-29T15:47:50.000Z | yolox/utils/allreduce_norm.py | mrzhuzhe/YOLOX | ffb5e3f70a181bc75c045faa7e7f4668d79d629a | [
"Apache-2.0"
] | null | null | null | yolox/utils/allreduce_norm.py | mrzhuzhe/YOLOX | ffb5e3f70a181bc75c045faa7e7f4668d79d629a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
import pickle
from collections import OrderedDict
import torch
from torch import distributed as dist
from torch import nn
from .dist import _get_global_gloo_group, get_world_size
ASYNC_NORM = (
... | 28.346154 | 91 | 0.652307 |
11ebf3ce01d0c64ed7827ee2f83fd98d5b9fcc75 | 273 | py | Python | setup.py | DucTranVan/grasp-detection-pytorch | 720b395b7d01f058de35a8420773b0a5905fe110 | [
"MIT"
] | 5 | 2021-08-03T07:18:25.000Z | 2022-02-05T18:15:39.000Z | setup.py | DucTranVan/grasp-detection-pytorch | 720b395b7d01f058de35a8420773b0a5905fe110 | [
"MIT"
] | 1 | 2021-08-04T10:51:18.000Z | 2021-08-04T18:03:02.000Z | setup.py | DucTranVan/grasp-detection-pytorch | 720b395b7d01f058de35a8420773b0a5905fe110 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='Build a deep learning architecture to predict graspabel locations for robotic manipulation.',
author='DucTran',
license='MIT',
)
| 24.818182 | 110 | 0.710623 |
4746f3b60c0e0688895c7e09ef7540b73cec27be | 8,383 | py | Python | models/gan_normal.py | chengyu0910/DeepFusion_IQA_V1.1 | 7c55f7629b24df00a8c37f82e6142c3a636a667b | [
"BSD-3-Clause"
] | 1 | 2020-02-04T10:30:58.000Z | 2020-02-04T10:30:58.000Z | models/gan_normal.py | chengyu0910/DeepFusion_IQA_V1.1 | 7c55f7629b24df00a8c37f82e6142c3a636a667b | [
"BSD-3-Clause"
] | null | null | null | models/gan_normal.py | chengyu0910/DeepFusion_IQA_V1.1 | 7c55f7629b24df00a8c37f82e6142c3a636a667b | [
"BSD-3-Clause"
] | 2 | 2020-02-03T11:01:28.000Z | 2022-03-18T06:46:36.000Z | import numpy as np
import torch
import os
import itertools
from collections import OrderedDict
from torch.autograd import Variable
import util.util as util
from util.image_pool import ImagePool
from .base_model import BaseModel
from . import networks
from torchvision import transforms
from PIL import Image
import pdb
... | 39.356808 | 160 | 0.613146 |
ead3fc0309a5e3fcacf8f4e9ec0702a9dbbef34d | 1,560 | py | Python | LeetCode/weekly-contest-126-2019.10.17/commonChars_1002.py | Max-PJB/python-learning2 | e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd | [
"MIT"
] | null | null | null | LeetCode/weekly-contest-126-2019.10.17/commonChars_1002.py | Max-PJB/python-learning2 | e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd | [
"MIT"
] | null | null | null | LeetCode/weekly-contest-126-2019.10.17/commonChars_1002.py | Max-PJB/python-learning2 | e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
@ Author : pengj
@ date : 2019/10/17 10:26
@ IDE : PyCharm
@ GitHub : https://github.com/JackyPJB
@ Contact : pengjianbiao@hotmail.com
---------------... | 21.971831 | 103 | 0.526923 |
34fbe3a8a7190b8b9a805d732bd92428e4338ced | 1,838 | py | Python | dizoo/mujoco/config/walker2d_sac_default_config.py | Hcnaeg/DI-engine | aba0c629f87649854091e9e59d948f83962e3e1e | [
"Apache-2.0"
] | 464 | 2021-07-08T07:26:33.000Z | 2022-03-31T12:35:16.000Z | dizoo/mujoco/config/walker2d_sac_default_config.py | Hcnaeg/DI-engine | aba0c629f87649854091e9e59d948f83962e3e1e | [
"Apache-2.0"
] | 177 | 2021-07-09T08:22:55.000Z | 2022-03-31T07:35:22.000Z | dizoo/mujoco/config/walker2d_sac_default_config.py | Hcnaeg/DI-engine | aba0c629f87649854091e9e59d948f83962e3e1e | [
"Apache-2.0"
] | 92 | 2021-07-08T12:16:37.000Z | 2022-03-31T09:24:41.000Z | from easydict import EasyDict
walker2d_sac_default_config = dict(
exp_name='walker2d_sac',
env=dict(
env_id='Walker2d-v3',
norm_obs=dict(use_norm=False, ),
norm_reward=dict(use_norm=False, ),
collector_env_num=1,
evaluator_env_num=8,
use_act_scale=True,
n... | 27.848485 | 81 | 0.607182 |
b6974f70a4274038fd3ebb9b582106bcf0534bf5 | 700 | py | Python | scripts/tags/generate_mapstyle.py | rinigus/geocoder-nlp | 9fa6fd16121caf70bbbe597c4dcc46e40d5655a2 | [
"MIT"
] | 16 | 2017-01-21T08:01:00.000Z | 2022-02-15T20:32:45.000Z | scripts/tags/generate_mapstyle.py | rinigus/geocoder-nlp | 9fa6fd16121caf70bbbe597c4dcc46e40d5655a2 | [
"MIT"
] | 58 | 2017-01-08T22:05:00.000Z | 2022-03-23T17:07:38.000Z | scripts/tags/generate_mapstyle.py | rinigus/geocoder-nlp | 9fa6fd16121caf70bbbe597c4dcc46e40d5655a2 | [
"MIT"
] | 2 | 2017-09-01T20:51:44.000Z | 2018-08-01T16:20:17.000Z | #!/usr/bin/env python3
import sqlite3
db = sqlite3.connect('taginfo-db.db')
c = db.cursor()
mapost = ""
whitelist = ""
keyvals = []
for r in c.execute("select key,value from tags where key='shop' order by count_all desc limit 50"):
key, value = r
# no need for these
if value in ['yes', 'no']:
c... | 20 | 99 | 0.555714 |
fa7289fc9c4392cfa5e4bf6d8792bbb750f4a933 | 267 | py | Python | pyramid_stocks/pyramid_stocks/views/default.py | keitheck/pyramid-stocks | 11ebed189c48ed9966bf95cbade59d793f04d9ca | [
"MIT"
] | null | null | null | pyramid_stocks/pyramid_stocks/views/default.py | keitheck/pyramid-stocks | 11ebed189c48ed9966bf95cbade59d793f04d9ca | [
"MIT"
] | 3 | 2019-12-26T16:42:45.000Z | 2021-06-01T22:22:44.000Z | pyramid_stocks/pyramid_stocks/views/default.py | keitheck/pyramid-stocks | 11ebed189c48ed9966bf95cbade59d793f04d9ca | [
"MIT"
] | null | null | null | from pyramid.view import view_config
from pyramid.security import NO_PERMISSION_REQUIRED
@view_config(
route_name='home',
renderer='../templates/index.jinja2',
permission=NO_PERMISSION_REQUIRED)
def home_view(request):
"""index page"""
return {} | 24.272727 | 51 | 0.741573 |
2a3aa996770ffe5f626157e59d33fdc1337bb465 | 1,154 | py | Python | docs/source/notebooks/make-nblinks.py | cweniger/swyft | 2c0ed514622a37e8ec4e406b99a8327ecafb7ab4 | [
"MIT"
] | 2 | 2020-06-27T21:30:10.000Z | 2020-08-07T07:25:53.000Z | docs/source/notebooks/make-nblinks.py | cweniger/swyft | 2c0ed514622a37e8ec4e406b99a8327ecafb7ab4 | [
"MIT"
] | null | null | null | docs/source/notebooks/make-nblinks.py | cweniger/swyft | 2c0ed514622a37e8ec4e406b99a8327ecafb7ab4 | [
"MIT"
] | 1 | 2020-11-02T10:04:29.000Z | 2020-11-02T10:04:29.000Z | import json
from pathlib import Path
IGNORE = [
".ipynb_checkpoints",
"Video",
]
def create_nblink(notebook_path):
d = {}
d["path"] = str(notebook_path)
d["extra-media"] = []
return d
def main():
root = Path(__file__).parent
# clean directory first
for old_nblink in root.glob("*... | 25.644444 | 79 | 0.570191 |
64fccf49c988f6778c740aa54d540c67b5062957 | 6,968 | py | Python | conda/api.py | dfroger/conda | c0f99ff46b217d081501e66f4dcd7bcdb5d9c6aa | [
"BSD-3-Clause"
] | null | null | null | conda/api.py | dfroger/conda | c0f99ff46b217d081501e66f4dcd7bcdb5d9c6aa | [
"BSD-3-Clause"
] | null | null | null | conda/api.py | dfroger/conda | c0f99ff46b217d081501e66f4dcd7bcdb5d9c6aa | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, division, absolute_import
import os
from collections import defaultdict
from os.path import isdir, join
from operator import itemgetter
from conda import config
from conda import install
from conda.fetch import fetch_index
from conda.compat import iteritems, itervalues
from cond... | 33.661836 | 95 | 0.631745 |
159a31bdc066af1c8c4fc48dc709dccca7340277 | 20,638 | py | Python | speedcom/utilities.py | emissible/emissilbe | 5537e787ccb883a101d2d40b38d480e257ac9755 | [
"MIT"
] | 1 | 2019-02-20T05:11:16.000Z | 2019-02-20T05:11:16.000Z | speedcom/utilities.py | emissible/emissilbe | 5537e787ccb883a101d2d40b38d480e257ac9755 | [
"MIT"
] | null | null | null | speedcom/utilities.py | emissible/emissilbe | 5537e787ccb883a101d2d40b38d480e257ac9755 | [
"MIT"
] | null | null | null | import json
import math
import matplotlib
#matplotlib.use("TkAgg")
import matplotlib.pyplot as plt
try:
import NNModels
except:
import speedcom.NNModels as NNModels
import numpy as np
import os
import pandas as pd
from rdkit import Chem
import rdkit.Chem.Draw as draw
#import speedcom
#import core
#import rdki... | 35.460481 | 85 | 0.614982 |
bde381a5e18969891e14d48fc5036768ccbfe56d | 3,419 | py | Python | Projects/STM8S_Discovery_Examples/echo_UART_with_ISR/build_upload.py | gicking/STM8_templates | c077e23f8cc5f6eb4b301eecb91d2d121f905719 | [
"Apache-2.0"
] | 29 | 2015-10-30T08:05:14.000Z | 2021-08-09T10:29:43.000Z | Projects/STM8S_Discovery_Examples/echo_UART_with_ISR/build_upload.py | gicking/STM8_templates | c077e23f8cc5f6eb4b301eecb91d2d121f905719 | [
"Apache-2.0"
] | 6 | 2017-12-22T15:44:54.000Z | 2018-12-17T09:55:13.000Z | Projects/STM8S_Discovery_Examples/echo_UART_with_ISR/build_upload.py | gicking/STM8_templates | c077e23f8cc5f6eb4b301eecb91d2d121f905719 | [
"Apache-2.0"
] | 10 | 2016-04-19T07:30:26.000Z | 2020-05-11T21:44:29.000Z | #!/usr/bin/python
'''
Script for building and uploading a STM8 project with dependency auto-detection
'''
# set general options
UPLOAD = 'SWIM' # select 'BSL' or 'SWIM'
TERMINAL = True # set True to open terminal after upload
RESET = 1 # STM8 reset: 0=skip, 1=manual, 2=DTR line (RS232),... | 33.851485 | 137 | 0.685581 |
6b13f0da9f2c6cf1e231102b0b38fc940fc0fb01 | 1,582 | py | Python | setup.py | chenzq/PaddleX | 089b06af02b6cf4ae1afd537d439cf9c30b7750e | [
"Apache-2.0"
] | 1 | 2020-11-04T02:51:42.000Z | 2020-11-04T02:51:42.000Z | setup.py | chenzq/PaddleX | 089b06af02b6cf4ae1afd537d439cf9c30b7750e | [
"Apache-2.0"
] | null | null | null | setup.py | chenzq/PaddleX | 089b06af02b6cf4ae1afd537d439cf9c30b7750e | [
"Apache-2.0"
] | null | null | null | # copyright (c) 2020 PaddlePaddle 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... | 36.790698 | 79 | 0.702276 |
5a8dcb6f1f6b848b08e284a0b5f2a9fc83e06857 | 14,376 | py | Python | eZmaxApi/model/ezsignfolder_reorder_v1_response.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | eZmaxApi/model/ezsignfolder_reorder_v1_response.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | eZmaxApi/model/ezsignfolder_reorder_v1_response.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | """
eZmax API Definition (Full)
This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501
The version of the OpenAPI document: 1.1.7
Contact: support-api@ezmax.ca
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401... | 43.696049 | 121 | 0.584238 |
7d8ab4d551b651445a9b1e7e6123a4acd2c0a63e | 2,130 | py | Python | mimiciii/steps/movements.py | AdamBanham/ICPM2021 | 9b50ba0090dd52ea88820d1edf8859a7207a0d56 | [
"MIT"
] | 1 | 2021-09-01T09:39:43.000Z | 2021-09-01T09:39:43.000Z | mimiciii/steps/movements.py | AdamBanham/ICPM2021 | 9b50ba0090dd52ea88820d1edf8859a7207a0d56 | [
"MIT"
] | null | null | null | mimiciii/steps/movements.py | AdamBanham/ICPM2021 | 9b50ba0090dd52ea88820d1edf8859a7207a0d56 | [
"MIT"
] | null | null | null | from tqdm import tqdm
from os import remove as remove_file
import pandas as pd
from ults import get_query_s3_location,update_query_dbname,BATCH_SIZE,run_query
from more_itertools import chunked
CONTROLFLOW_SQL_SWAP = "##SUBJECTS##"
MOVEMENTS_PATIENT_UNIVERSE_SQL = "mimiciii/in/movements_patient_universe.SQL"
MOVEMEN... | 49.534884 | 144 | 0.77277 |
0f2519cf30fd1ad6b2fb6a9ca5a1ac0a0e66de12 | 6,112 | py | Python | feed/views.py | ThusharaX/mumbleapi | 8435fe9d86869cce81961f42c9860fa3810c171b | [
"Apache-2.0"
] | 187 | 2021-04-24T14:49:44.000Z | 2022-03-31T14:25:22.000Z | feed/views.py | shukl08vk/mumbleapi | 101825d8aecba7eac4e31046e7b4b15b36c55f77 | [
"Apache-2.0"
] | 119 | 2021-04-24T18:08:43.000Z | 2022-01-09T00:57:19.000Z | feed/views.py | shukl08vk/mumbleapi | 101825d8aecba7eac4e31046e7b4b15b36c55f77 | [
"Apache-2.0"
] | 174 | 2021-04-24T15:57:23.000Z | 2022-03-11T02:09:04.000Z | from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Q
from rest_framework import status
from rest_framework.decorators import api_view, permission_classes
from rest_framework.pagination import PageNumberPagination
from rest_framework.permissions import IsAuthenticated
from rest_framework.... | 32.168421 | 124 | 0.669666 |
53256df41aa8aa17cbd674d3082d87d7400e7bd4 | 55 | py | Python | test/test.py | Graham42/yaml_git_web_api | d8701695c70905efb6f8afc7a34e5b927978cde3 | [
"MIT"
] | null | null | null | test/test.py | Graham42/yaml_git_web_api | d8701695c70905efb6f8afc7a34e5b927978cde3 | [
"MIT"
] | null | null | null | test/test.py | Graham42/yaml_git_web_api | d8701695c70905efb6f8afc7a34e5b927978cde3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# some tests should go here
pass
| 13.75 | 27 | 0.727273 |
c383e0949adb898071bc41c66355af501729334b | 35,372 | py | Python | zolo/adapters/huobi_restful_adapters.py | firefirer1983/zolo | 889409b491363eb54c2997e01333b77bc81e0c89 | [
"MIT"
] | 2 | 2021-05-06T12:10:02.000Z | 2021-08-15T09:25:31.000Z | zolo/adapters/huobi_restful_adapters.py | firefirer1983/zolo | 889409b491363eb54c2997e01333b77bc81e0c89 | [
"MIT"
] | null | null | null | zolo/adapters/huobi_restful_adapters.py | firefirer1983/zolo | 889409b491363eb54c2997e01333b77bc81e0c89 | [
"MIT"
] | null | null | null | import abc
import math
from decimal import Decimal
from functools import partial
from pprint import pprint
from typing import Dict, Tuple, Union, List, Optional
from zolo.dtypes import Lot, CREDENTIAL_EMPTY, POSITION_EMPTY, MARGIN_EMPTY
from zolo.posts import OrderPostType, MarketOrder, LimitOrder, LimitIocOrder, \
... | 37.430688 | 81 | 0.571695 |
69a9479746c38cbdb29231f88d2cf6f7613a18d9 | 707 | py | Python | books/python-testing-with-pytest/ch5_plugins/pytest-nice/pytest_nice.py | phiratio/lpthw | a32240d4355fb331805d515f96e1d009914e5c47 | [
"MIT"
] | 1 | 2021-04-21T09:38:38.000Z | 2021-04-21T09:38:38.000Z | books/python-testing-with-pytest/ch5_plugins/pytest-nice/pytest_nice.py | phiratio/lpthw | a32240d4355fb331805d515f96e1d009914e5c47 | [
"MIT"
] | 34 | 2019-12-16T16:53:24.000Z | 2022-01-13T02:29:30.000Z | books/python-testing-with-pytest/ch5_plugins/pytest-nice/pytest_nice.py | phiratio/lpthw | a32240d4355fb331805d515f96e1d009914e5c47 | [
"MIT"
] | null | null | null | """Code for pytest-nice plugin."""
import pytest
def pytest_addoption(parser):
"""Turn nice features on with --nice option."""
group = parser.getgroup('nice')
group.addoption("--nice", action="store_true",
help="nice: turn FAILED into OPPORTUNITY for improvement")
def pytest_report_... | 29.458333 | 78 | 0.660537 |
80eb8268de5d62a9f83e52a8569b65dbbc61d815 | 4,164 | py | Python | tkmagicgrid/__main__.py | bmjcode/tkMagicGrid | bc92b0a11d40cced3a653888a1376f7da66bc0e6 | [
"MIT"
] | 3 | 2018-12-14T16:42:33.000Z | 2020-09-13T21:20:50.000Z | tkmagicgrid/__main__.py | bmjcode/tkMagicGrid | bc92b0a11d40cced3a653888a1376f7da66bc0e6 | [
"MIT"
] | null | null | null | tkmagicgrid/__main__.py | bmjcode/tkMagicGrid | bc92b0a11d40cced3a653888a1376f7da66bc0e6 | [
"MIT"
] | null | null | null | """Demonstration of the MagicGrid widget."""
try:
# Python 3
from tkinter import *
from tkinter.messagebox import showinfo, showwarning
except (ImportError):
# Python 2
from Tkinter import *
from tkMessageBox import showinfo, showwarning
from .widget import MagicGrid
__all__ = ["demo"]
BEA... | 30.617647 | 78 | 0.506004 |
3c07e9184b4f6a3e431df4e526493f418c21890d | 3,561 | py | Python | lib/helpers/kodi_constants.py | MediaBrasil/script.module.metadatautils | 4d55cb4591a703cd54d3b790f063fdaa5b9e95f0 | [
"Apache-2.0"
] | null | null | null | lib/helpers/kodi_constants.py | MediaBrasil/script.module.metadatautils | 4d55cb4591a703cd54d3b790f063fdaa5b9e95f0 | [
"Apache-2.0"
] | null | null | null | lib/helpers/kodi_constants.py | MediaBrasil/script.module.metadatautils | 4d55cb4591a703cd54d3b790f063fdaa5b9e95f0 | [
"Apache-2.0"
] | 2 | 2017-07-09T15:03:15.000Z | 2020-02-05T19:08:05.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
script.module.metadatautils
kodi_constants.py
Several common constants for use with Kodi json api
"""
import os, sys
if sys.version_info.major == 3:
from .utils import KODI_VERSION
else:
from utils import KODI_VERSION
FIELDS_BASE = ["dateadded", "file"... | 63.589286 | 120 | 0.595619 |
a9cd777b079fa09a7305004dd2d04785a5b25f48 | 4,872 | py | Python | test/devices_tests/fan_test.py | M-o-a-T/xknx | 0cf07a01a44c76478d916884437f3f4769a4ddd5 | [
"MIT"
] | null | null | null | test/devices_tests/fan_test.py | M-o-a-T/xknx | 0cf07a01a44c76478d916884437f3f4769a4ddd5 | [
"MIT"
] | null | null | null | test/devices_tests/fan_test.py | M-o-a-T/xknx | 0cf07a01a44c76478d916884437f3f4769a4ddd5 | [
"MIT"
] | null | null | null | """Unit test for Fan objects."""
import asyncio
import unittest
from unittest.mock import patch
import pytest
pytestmark = pytest.mark.asyncio
from xknx import XKNX
from xknx.devices import Fan
from xknx.dpt import DPTArray, DPTBinary
from xknx.exceptions import CouldNotParseTelegram
from xknx.telegram import GroupAd... | 33.6 | 110 | 0.586002 |
5a45cce640e0a2957c5cccf7b899a9c95a621116 | 36,922 | py | Python | Visual Tracking/SiamR-CNN-master/data.py | shikivi/- | e83cc9342115801e1464e9907a971801dbd68335 | [
"MIT"
] | 195 | 2020-04-04T13:50:08.000Z | 2022-03-24T03:29:38.000Z | Visual Tracking/SiamR-CNN-master/data.py | shikivi/- | e83cc9342115801e1464e9907a971801dbd68335 | [
"MIT"
] | 30 | 2020-04-12T08:14:34.000Z | 2021-09-20T13:36:12.000Z | Visual Tracking/SiamR-CNN-master/data.py | shikivi/- | e83cc9342115801e1464e9907a971801dbd68335 | [
"MIT"
] | 40 | 2020-04-05T00:10:49.000Z | 2022-03-09T08:34:10.000Z | # -*- coding: utf-8 -*-
# File: data.py
import copy
import platform
import numpy as np
import bisect
import cv2
import glob
import random
import os
import PIL
from tabulate import tabulate
from termcolor import colored
import xmltodict
from tensorpack.dataflow import (
DataFromList, MapDataComponent, MultiProcess... | 42.536866 | 157 | 0.642246 |
498048860d059500a9b8e2d9734607a4b382d1cf | 414 | py | Python | nested_q_8.py | Samridhi-88/nested_list | 1087cf46db5520fd569ea67caef77c0af77a95b5 | [
"MIT"
] | null | null | null | nested_q_8.py | Samridhi-88/nested_list | 1087cf46db5520fd569ea67caef77c0af77a95b5 | [
"MIT"
] | null | null | null | nested_q_8.py | Samridhi-88/nested_list | 1087cf46db5520fd569ea67caef77c0af77a95b5 | [
"MIT"
] | null | null | null | element=[23,14,56,12,19,9,15,25,31,42,43]
i=0
sum1=0
sum2=0
list1=[]
list2=[]
while i<len(element):
if element[i]%2==0:
sum1+=element[i]
list1.append(element[i])
everaj=sum1/len(list1)
else:
sum2+=element[i]
list2.append(element[i])
everaj1=sum2/len(list2)
i+=... | 18.818182 | 41 | 0.608696 |
782ff0f8a18cb523d3b951681bb0b46e685bce36 | 1,176 | py | Python | flaked/plugins/flaked_shire.py | ischaojie/flaked | 3b5b6156ad52c78c95b963d61572ce91b84ff956 | [
"MIT"
] | 1 | 2022-03-18T10:40:15.000Z | 2022-03-18T10:40:15.000Z | flaked/plugins/flaked_shire.py | ischaojie/flaked | 3b5b6156ad52c78c95b963d61572ce91b84ff956 | [
"MIT"
] | 2 | 2022-03-20T14:46:18.000Z | 2022-03-21T13:38:59.000Z | flaked/plugins/flaked_shire.py | ischaojie/flaked | 3b5b6156ad52c78c95b963d61572ce91b84ff956 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from ast import NodeVisitor
__version__ = "0.1.4"
SHIRE_MODULES = ("luz", "luzong", "corelib")
MESSAGE = "SH00 shire old style import found"
class ShireImportVisitor(NodeVisitor):
def __init__(self):
super(ShireImportVisitor, self).__init__()
self.imports = []
def v... | 24.5 | 65 | 0.583333 |
54ad505442430bc86da03ef3e1674f4da382e732 | 621 | py | Python | necrobot/match/matchglobals.py | Khold6458/necrobot | 0bf9397eba43c6f7e8df77451f772b8de835cd1b | [
"MIT"
] | null | null | null | necrobot/match/matchglobals.py | Khold6458/necrobot | 0bf9397eba43c6f7e8df77451f772b8de835cd1b | [
"MIT"
] | 1 | 2018-10-08T22:05:30.000Z | 2018-10-08T22:05:30.000Z | necrobot/match/matchglobals.py | Khold6458/necrobot | 0bf9397eba43c6f7e8df77451f772b8de835cd1b | [
"MIT"
] | null | null | null | import discord
from necrobot.util.singleton import Singleton
class MatchGlobals(metaclass=Singleton):
def __init__(self):
self._deadline_fn = MatchGlobals._default_deadline
self._channel_category = None
def set_deadline_fn(self, f):
self._deadline_fn = f
def set_channel_category(... | 23 | 61 | 0.698873 |
6d1cb49382a5c76f3db877497eadf9d22a9e4f98 | 956 | py | Python | server/views.py | Decision2016/IndigoRobot | da427cc6a960eb211c31fa029f724d83dc5b0531 | [
"MIT"
] | null | null | null | server/views.py | Decision2016/IndigoRobot | da427cc6a960eb211c31fa029f724d83dc5b0531 | [
"MIT"
] | 5 | 2021-03-30T12:41:35.000Z | 2021-06-10T18:15:43.000Z | server/views.py | Decision2016/IndigoRobot | da427cc6a960eb211c31fa029f724d83dc5b0531 | [
"MIT"
] | null | null | null | from utils.baseclasses import BaseAPIView
from account.decorators import cq_permission_required
from account.models import User
from .statistics import Statistics
from mcserver.views import MinecraftServerControl
class ServerAPI(BaseAPIView):
@cq_permission_required
def post(self, request):
data = req... | 43.454545 | 135 | 0.696653 |
6f2059b6abffb9ae6b59a1755c3528ccc462e6c4 | 244 | py | Python | leetcode/344. ReverseString/soln.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | leetcode/344. ReverseString/soln.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | leetcode/344. ReverseString/soln.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
l = len(s)
for i in range(l//2):
s[i], s[l-i-1] = s[l-i-1], s[i]
| 27.111111 | 58 | 0.471311 |
c3bc847307be0962712f086d54beab846faec110 | 1,188 | py | Python | daemon/daemon_controller.py | naren-m/home_assistant | a20d64b79d97cbb2c9bae197c0900515ed8bfbfc | [
"MIT"
] | null | null | null | daemon/daemon_controller.py | naren-m/home_assistant | a20d64b79d97cbb2c9bae197c0900515ed8bfbfc | [
"MIT"
] | null | null | null | daemon/daemon_controller.py | naren-m/home_assistant | a20d64b79d97cbb2c9bae197c0900515ed8bfbfc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys, time
import action_part as ap
import logging
import pyttsx, time
import schedule
import app_logger
from daemon import Daemon
logger = app_logger.logger
engine = pyttsx.init()
# https://github.com/dbader/schedule
try:
actions = ap.MyActions()
except Exception, e:
print "Exceptio... | 19.47541 | 74 | 0.68266 |
c17b1a8a2f8f5f5c9cadd53c6d2c17ab31e5df9e | 75,522 | py | Python | build/scripts-3.10/find_primes.py | git4robot/pypi_find_primes | 8426950789045863c85dae855a87d71e611115bf | [
"MIT"
] | null | null | null | build/scripts-3.10/find_primes.py | git4robot/pypi_find_primes | 8426950789045863c85dae855a87d71e611115bf | [
"MIT"
] | null | null | null | build/scripts-3.10/find_primes.py | git4robot/pypi_find_primes | 8426950789045863c85dae855a87d71e611115bf | [
"MIT"
] | null | null | null | #!python3
'''
The CLI Tool.
'''
from math import log, sqrt, log2, ceil, floor, gcd
from random import randint, randrange
from functools import reduce
from operator import mul
from argparse import ArgumentParser
NUMPY_ENABLED = True
try:
from numpy import ones, nonzero, __version__
print('Detected numpy versi... | 27.878184 | 269 | 0.393051 |
f1b37d98392f02e33bfcd121708d0a19bae665c3 | 5,541 | py | Python | torch_attack_mask_03.py | beibuwandeluori/Attack-ImageNet-tianchi | 85294952ac1a190c26bba5e8f141b1c68e72668a | [
"MIT"
] | null | null | null | torch_attack_mask_03.py | beibuwandeluori/Attack-ImageNet-tianchi | 85294952ac1a190c26bba5e8f141b1c68e72668a | [
"MIT"
] | null | null | null | torch_attack_mask_03.py | beibuwandeluori/Attack-ImageNet-tianchi | 85294952ac1a190c26bba5e8f141b1c68e72668a | [
"MIT"
] | null | null | null | # Helper function for extracting features from pre-trained models
import sys, os
import argparse
import torch
import torch.nn as nn
import cv2
import numpy as np
import glob
from attacker import Attacker, AttackerPGD, AttackerTPGD, AttackerMIFGSM
import torchattacks
from loader import ImageNet_A, input_diversity
from ... | 41.977273 | 142 | 0.616495 |
92fb33038ea2443006f63e05c4d073f4ff596192 | 3,228 | py | Python | app/user/handlers.py | dogukangungordi/cinetify-Movie | 85946010f4471cef0fb42873d50d59493372d060 | [
"MIT"
] | null | null | null | app/user/handlers.py | dogukangungordi/cinetify-Movie | 85946010f4471cef0fb42873d50d59493372d060 | [
"MIT"
] | null | null | null | app/user/handlers.py | dogukangungordi/cinetify-Movie | 85946010f4471cef0fb42873d50d59493372d060 | [
"MIT"
] | null | null | null | import json
import falcon
from psycopg2 import IntegrityError
from app.utils.auth import hash_password, verify_password, generate_token
from app.utils.hooks import open_cursor_hook, close_cursor_hook, auth_required
from app.utils.misc import make_code
from app.user.validation import (
validate_user_create, validate... | 31.960396 | 87 | 0.684015 |
1bb8709f22e0d043ecaf77e27536b2f14b168852 | 102,207 | py | Python | tensorflow_estimator/python/estimator/estimator.py | Suraj-Upadhyay/estimator | 781c0d30c6bf100aa174591dd97cb70fc39d294d | [
"Apache-2.0"
] | 1 | 2020-09-29T15:21:14.000Z | 2020-09-29T15:21:14.000Z | tensorflow_estimator/python/estimator/estimator.py | Suraj-Upadhyay/estimator | 781c0d30c6bf100aa174591dd97cb70fc39d294d | [
"Apache-2.0"
] | null | null | null | tensorflow_estimator/python/estimator/estimator.py | Suraj-Upadhyay/estimator | 781c0d30c6bf100aa174591dd97cb70fc39d294d | [
"Apache-2.0"
] | null | null | null | # 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... | 42.764435 | 138 | 0.689464 |
f9c3108c4632c11bf707b81d8fb115c05a2e55ce | 5,576 | py | Python | tightbinding_code/helpers.py | prz3m37/TightBinding | 2172a4d369c00772181ded3cd9e8083a87c2ad47 | [
"MIT"
] | 4 | 2019-09-01T18:05:08.000Z | 2020-08-06T12:28:48.000Z | tightbinding_code/helpers.py | prz3m37/TightBinding | 2172a4d369c00772181ded3cd9e8083a87c2ad47 | [
"MIT"
] | null | null | null | tightbinding_code/helpers.py | prz3m37/TightBinding | 2172a4d369c00772181ded3cd9e8083a87c2ad47 | [
"MIT"
] | null | null | null | import os
import datetime
import numpy as np
import config as cfg
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
class TightBindingHelpers(object):
"""
Class with helpers method such as plotting and saving results functions of calculations. This method is used in
ExecuteTightB... | 36.444444 | 115 | 0.553802 |
339e47df3c9bae1a46c07018f282a5a1402b9321 | 693 | py | Python | hough.py | vgaurav3011/Machine_Learning_Algorithms | fc11f61964e17c87408ac9b4c1834333b2436e27 | [
"MIT"
] | null | null | null | hough.py | vgaurav3011/Machine_Learning_Algorithms | fc11f61964e17c87408ac9b4c1834333b2436e27 | [
"MIT"
] | null | null | null | hough.py | vgaurav3011/Machine_Learning_Algorithms | fc11f61964e17c87408ac9b4c1834333b2436e27 | [
"MIT"
] | 1 | 2019-10-02T03:56:00.000Z | 2019-10-02T03:56:00.000Z | import cv2
import numpy as np
img = cv2.imread("../1.jpg")
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
kernel = np.ones((5,5),np.float32)/25
gray = cv2.filter2D(gray,-1,kernel)
edges = cv2.Canny(gray,400,600,apertureSize = 5)
cv2.imshow('image',edges)
cv2.waitKey(0)
lines = cv2.HoughLines(edges,1,np.pi/180,15)
for i ... | 26.653846 | 48 | 0.562771 |
6e2024a2c09799a8fc9fa137574a844f5655cafd | 1,526 | py | Python | tests/snuba/api/endpoints/test_project_tags.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/api/endpoints/test_project_tags.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/api/endpoints/test_project_tags.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.testutils import APITestCase, SnubaTestCase
from sentry.testutils.helpers.datetime import before_now, iso_format
class ProjectTagsTest(APITestCase, SnubaTestCase):
def test_simple(self):
user = self.create_us... | 34.681818 | 98 | 0.611402 |
b0d4e22171f8c8bbdcaf4fb7566628871356e98b | 6,874 | py | Python | 02_TensorFlow_Way/C0205_loss_functions.py | zhuyuanxiang/tensorflow_cookbook | 57d7ee719385ddd249a67c3a85bd336e884a67e5 | [
"MIT"
] | 7 | 2019-11-30T05:42:47.000Z | 2021-10-09T03:02:19.000Z | 02_TensorFlow_Way/C0205_loss_functions.py | zhuyuanxiang/tensorflow_cookbook | 57d7ee719385ddd249a67c3a85bd336e884a67e5 | [
"MIT"
] | null | null | null | 02_TensorFlow_Way/C0205_loss_functions.py | zhuyuanxiang/tensorflow_cookbook | 57d7ee719385ddd249a67c3a85bd336e884a67e5 | [
"MIT"
] | 2 | 2019-12-05T06:44:48.000Z | 2021-10-09T03:02:20.000Z | # -*- encoding: utf-8 -*-
"""
@Author : zYx.Tom
@Contact : 526614962@qq.com
@site : https://github.com/zhuyuanxiang/tensorflow_cookbook
---------------------------
@Software : PyCharm
@Project : TensorFlow_Machine_Learning_Cookbook
@File : C0205_loss_functions.py
@Version : ... | 37.562842 | 109 | 0.650713 |
af71799c9a5b3574aba318001c5e89aacff351d1 | 4,046 | py | Python | src/python/pants/backend/python/macros/python_requirements_caof.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/macros/python_requirements_caof.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | 14 | 2020-09-26T02:01:56.000Z | 2022-03-30T10:19:28.000Z | src/python/pants/backend/python/macros/python_requirements_caof.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import os
from itertools import groupby
from pathlib import Path
from typing import Iterable, Mapping
from packaging.utils import canonicalize_name as ... | 38.903846 | 100 | 0.685615 |
ca5c08175164f9ece019b68d09ab03e6b6e3f36c | 3,298 | py | Python | cinder/quota_utils.py | whitepages/cinder | bd70ce6f4dd58ba904a7c941700cdce54e5a705e | [
"Apache-2.0"
] | null | null | null | cinder/quota_utils.py | whitepages/cinder | bd70ce6f4dd58ba904a7c941700cdce54e5a705e | [
"Apache-2.0"
] | 1 | 2021-03-21T11:38:29.000Z | 2021-03-21T11:38:29.000Z | cinder/quota_utils.py | isabella232/cinder | bd70ce6f4dd58ba904a7c941700cdce54e5a705e | [
"Apache-2.0"
] | 1 | 2021-03-21T11:37:47.000Z | 2021-03-21T11:37:47.000Z | # Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 40.716049 | 78 | 0.574894 |
2dbfb178291f0c18dc8d8ce60a303706f3504927 | 3,556 | py | Python | tests/test_js_expressions.py | AutomatedTester/amo-validator | a063002497395ce04085a3940713b4467f12e9fd | [
"BSD-3-Clause"
] | null | null | null | tests/test_js_expressions.py | AutomatedTester/amo-validator | a063002497395ce04085a3940713b4467f12e9fd | [
"BSD-3-Clause"
] | null | null | null | tests/test_js_expressions.py | AutomatedTester/amo-validator | a063002497395ce04085a3940713b4467f12e9fd | [
"BSD-3-Clause"
] | null | null | null | from js_helper import _do_test_raw, _get_var
def test_boolean_comparison():
"""Test that true/false are properly compared."""
scope = _do_test_raw("""
var a = false < true,
b = true > false,
c = false > true,
d = true < false,
e = false < false,
f = true < true,
... | 28.222222 | 78 | 0.556243 |
38b6734b0070eca0f300dfc969549ba7903c629d | 14,719 | py | Python | test/unit/test_manager.py | NorthLandTeam/ncclient | ff6bba74c3304f0a5053087449f5a51e8eb13ed4 | [
"Apache-2.0"
] | null | null | null | test/unit/test_manager.py | NorthLandTeam/ncclient | ff6bba74c3304f0a5053087449f5a51e8eb13ed4 | [
"Apache-2.0"
] | null | null | null | test/unit/test_manager.py | NorthLandTeam/ncclient | ff6bba74c3304f0a5053087449f5a51e8eb13ed4 | [
"Apache-2.0"
] | null | null | null | import unittest
from mock import patch, MagicMock
from ncclient import manager
from ncclient.devices.junos import JunosDeviceHandler
import logging
class TestManager(unittest.TestCase):
@patch('ncclient.transport.SSHSession')
def test_ssh(self, mock_ssh):
m = MagicMock()
mock_ssh.return_value... | 45.150307 | 392 | 0.614308 |
7728dda6627b11f1d8611e058d8840c507db83ee | 3,199 | py | Python | TBWright/day17.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 3 | 2020-11-16T15:20:11.000Z | 2020-12-11T17:01:42.000Z | TBWright/day17.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | null | null | null | TBWright/day17.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 1 | 2020-12-13T04:42:44.000Z | 2020-12-13T04:42:44.000Z | """
"""
from lib.helpers import timer
INACTIVE = '.'
ACTIVE = '#'
infinite_grid = {(x, y, 0, 0): state for y, line in enumerate(open("inputs/day17_input.txt", "r").read().splitlines()) for x, state in enumerate(line)}
def get_neighbor_cube_coords(coord):
xcoord, ycoord, zcoord, _ = coord
neighbor_coords =... | 37.197674 | 151 | 0.64864 |
b7272d4fc4b0caf1e5a739349c14cac7b6b66e82 | 531 | py | Python | src/products/migrations/0004_auto_20190704_2341.py | kirankotari/tryDjango | da931d1b6a21bb4b6c9ef8877de45f8161f1aef7 | [
"MIT"
] | 2 | 2021-01-14T08:14:44.000Z | 2021-07-14T11:41:09.000Z | src/products/migrations/0004_auto_20190704_2341.py | kirankotari/tryDjango | da931d1b6a21bb4b6c9ef8877de45f8161f1aef7 | [
"MIT"
] | 3 | 2020-02-12T00:52:38.000Z | 2021-06-10T21:41:20.000Z | src/products/migrations/0004_auto_20190704_2341.py | kirankotari/tryDjango | da931d1b6a21bb4b6c9ef8877de45f8161f1aef7 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.9 on 2019-07-04 18:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0003_auto_20190704_1053'),
]
operations = [
migrations.AlterField(
model_name='product',
name='featured'... | 22.125 | 49 | 0.568738 |
6d4222389a4db5c5beb3f35cad590489b1c4a2a7 | 191 | py | Python | setup.py | perfah/covid-19-in-my-region | 402159a2789a798c8d96d96dc8647b99d3b961ed | [
"MIT"
] | 3 | 2020-04-30T22:02:33.000Z | 2021-02-22T13:53:23.000Z | setup.py | perfah/covid-19-in-my-region | 402159a2789a798c8d96d96dc8647b99d3b961ed | [
"MIT"
] | null | null | null | setup.py | perfah/covid-19-in-my-region | 402159a2789a798c8d96d96dc8647b99d3b961ed | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='covid_19_in_my_region',
packages=['covid_19_in_my_region'],
include_package_data=True,
install_requires=[
'flask',
],
)
| 17.363636 | 39 | 0.675393 |
2391f420f2e31b93fdf729ad96ea52465e190d86 | 3,281 | py | Python | qiskit/extensions/standard/iswap.py | maddy-tod/qiskit-terra | f11740cf0375c725880fc5feea749fbb64011f11 | [
"Apache-2.0"
] | 1 | 2020-04-16T22:03:40.000Z | 2020-04-16T22:03:40.000Z | qiskit/extensions/standard/iswap.py | maddy-tod/qiskit-terra | f11740cf0375c725880fc5feea749fbb64011f11 | [
"Apache-2.0"
] | 1 | 2020-04-08T05:17:25.000Z | 2020-04-08T05:17:25.000Z | qiskit/extensions/standard/iswap.py | maddy-tod/qiskit-terra | f11740cf0375c725880fc5feea749fbb64011f11 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 26.039683 | 77 | 0.455349 |
f17407d4136c2a2317e8b7809ceac85fa502ee5e | 3,191 | py | Python | fight_covid19/maps/views.py | hrithik098/Fight-Covid19 | b61d3476c93bfd8011f970bb94eaf62f102306fe | [
"MIT"
] | null | null | null | fight_covid19/maps/views.py | hrithik098/Fight-Covid19 | b61d3476c93bfd8011f970bb94eaf62f102306fe | [
"MIT"
] | null | null | null | fight_covid19/maps/views.py | hrithik098/Fight-Covid19 | b61d3476c93bfd8011f970bb94eaf62f102306fe | [
"MIT"
] | null | null | null | import requests
from django.conf import settings
from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import HttpResponse
from django.shortcuts import render
from django.urls import reverse_lazy
from django.views.generic import ListView
from django.views.generic import View
from django.views.... | 31.284314 | 82 | 0.627076 |
54813e867964648a31081fcbd26ebbb2810882fc | 25,594 | py | Python | autotest/ogr/ogr_ngw.py | jpapadakis/gdal | f07aa15fd65af36b04291303cc6834c87f662814 | [
"MIT"
] | 18 | 2021-01-27T00:07:35.000Z | 2022-03-25T22:20:13.000Z | autotest/ogr/ogr_ngw.py | jpapadakis/gdal | f07aa15fd65af36b04291303cc6834c87f662814 | [
"MIT"
] | 1 | 2015-04-14T00:19:57.000Z | 2015-04-14T00:29:29.000Z | autotest/ogr/ogr_ngw.py | jpapadakis/gdal | f07aa15fd65af36b04291303cc6834c87f662814 | [
"MIT"
] | 1 | 2021-11-21T02:33:51.000Z | 2021-11-21T02:33:51.000Z | #!/usr/bin/env pytest
# -*- coding: utf-8 -*-
################################################################################
# Project: OGR NextGIS Web Driver
# Purpose: Tests OGR NGW Driver capabilities
# Author: Dmitry Baryshnikov, polimax@mail.ru
# Language: Python
#############################################... | 37.418129 | 159 | 0.646402 |
478c7f57f46cb8749a99bbe054b26f9eb5bdf3ce | 8,129 | py | Python | emsm/plugins/server.py | KronK0321/emsm | 2d8882003ff6d688cd4074dcce17f3171f99a69f | [
"MIT"
] | 82 | 2015-02-17T19:26:51.000Z | 2022-03-30T20:13:43.000Z | emsm/plugins/server.py | KronK0321/emsm | 2d8882003ff6d688cd4074dcce17f3171f99a69f | [
"MIT"
] | 55 | 2015-01-01T19:49:25.000Z | 2021-06-11T19:45:26.000Z | emsm/plugins/server.py | SilkAndSlug/emsm | 2c1cdb305205942e797fdf47fd030c87080d19f9 | [
"MIT"
] | 32 | 2015-01-15T11:47:04.000Z | 2021-12-19T21:49:20.000Z | #!/usr/bin/env python3
# The MIT License (MIT)
#
# Copyright (c) 2014-2018 <see AUTHORS.txt>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitati... | 30.107407 | 81 | 0.575225 |
25948289db6fd050f35541c3834f5b256c638372 | 681 | py | Python | globaltags/gravatar.py | xarg/snippify | b692a941a7a46959df9aff064b7ad056d0125484 | [
"MIT"
] | 2 | 2016-08-19T06:24:02.000Z | 2021-05-11T00:08:24.000Z | globaltags/gravatar.py | xarg/snippify | b692a941a7a46959df9aff064b7ad056d0125484 | [
"MIT"
] | 5 | 2021-05-01T15:03:07.000Z | 2021-05-01T15:03:08.000Z | globaltags/gravatar.py | xarg/snippify | b692a941a7a46959df9aff064b7ad056d0125484 | [
"MIT"
] | null | null | null | import hashlib
from django import template
register = template.Library()
@register.simple_tag
def gravatar(email, size=48):
"""
Simply gets the Gravatar for the commenter. There is no rating or
custom "not found" icon yet. Used with the Django comments.
If no size is given, the default is 48 pixels b... | 25.222222 | 80 | 0.654919 |
3dce02fe3e9dd4a73abe9b2ff3e73bca50c46b7d | 355 | py | Python | noticeboard/permissions/api.py | NdauwaRafael/py-noticeboard | bb3ffcf5e82315fb1a5e58d113766406fdce4211 | [
"Apache-2.0"
] | null | null | null | noticeboard/permissions/api.py | NdauwaRafael/py-noticeboard | bb3ffcf5e82315fb1a5e58d113766406fdce4211 | [
"Apache-2.0"
] | 4 | 2021-03-09T01:44:19.000Z | 2022-02-12T07:50:22.000Z | noticeboard/permissions/api.py | NdauwaRafael/py-noticeboard | bb3ffcf5e82315fb1a5e58d113766406fdce4211 | [
"Apache-2.0"
] | null | null | null | from permissions.models import Permission
from rest_framework import viewsets, permissions
from .serializers import PermissionSerializer
# Permission View Set
class PermissionViewSet(viewsets.ModelViewSet):
queryset = Permission.objects.all()
permission_classes = [
permissions.AllowAny
]
seria... | 27.307692 | 48 | 0.791549 |
d6bb29d9bf6f1c85ce6d91a7cd3a846d9535b80d | 4,466 | py | Python | seaborn/algorithms.py | Hagai/seaborn | 64928c910264579bf406d317242de9d56870ca97 | [
"BSD-3-Clause"
] | 1 | 2020-04-03T22:58:36.000Z | 2020-04-03T22:58:36.000Z | seaborn/algorithms.py | Hagai/seaborn | 64928c910264579bf406d317242de9d56870ca97 | [
"BSD-3-Clause"
] | 3 | 2021-03-30T13:15:12.000Z | 2021-09-22T18:55:59.000Z | seaborn/algorithms.py | Hagai/seaborn | 64928c910264579bf406d317242de9d56870ca97 | [
"BSD-3-Clause"
] | 2 | 2020-08-03T13:02:06.000Z | 2020-11-04T03:15:44.000Z | """Algorithms to support fitting routines in seaborn plotting functions."""
from __future__ import division
import numbers
import numpy as np
import warnings
def bootstrap(*args, **kwargs):
"""Resample one or more arrays with replacement and store aggregate values.
Positional arguments are a sequence of arra... | 33.833333 | 79 | 0.622033 |
e42effaeb8570588c8952cdc1025cf689ffce5ae | 18,758 | py | Python | voicefixer/restorer/model.py | ZFTurbo/voicefixer | 21b46cc0b8bea0eff7b3f2b219958e442c94b68a | [
"MIT"
] | 1 | 2021-11-09T18:02:43.000Z | 2021-11-09T18:02:43.000Z | voicefixer/restorer/model.py | ZFTurbo/voicefixer | 21b46cc0b8bea0eff7b3f2b219958e442c94b68a | [
"MIT"
] | null | null | null | voicefixer/restorer/model.py | ZFTurbo/voicefixer | 21b46cc0b8bea0eff7b3f2b219958e442c94b68a | [
"MIT"
] | null | null | null | # import pytorch_lightning as pl
import torch.utils
from voicefixer.tools.mel_scale import MelScale
import torch.utils.data
import matplotlib.pyplot as plt
import librosa.display
from voicefixer.vocoder.base import Vocoder
from voicefixer.tools.pytorch_util import *
# from voicefixer.models.restorer.mel_denoiser.model... | 46.316049 | 225 | 0.555816 |
7c2372ebaf72e4413a6240bdd0fda204f4d56361 | 8,796 | py | Python | get_landmarks_dermofit.py | Innes-BG/Morphometries_detectthia | 712081ba937a86b0a8204b7c03c4e77ff7e33a4c | [
"MIT"
] | null | null | null | get_landmarks_dermofit.py | Innes-BG/Morphometries_detectthia | 712081ba937a86b0a8204b7c03c4e77ff7e33a4c | [
"MIT"
] | null | null | null | get_landmarks_dermofit.py | Innes-BG/Morphometries_detectthia | 712081ba937a86b0a8204b7c03c4e77ff7e33a4c | [
"MIT"
] | null | null | null |
import cv2
import numpy as np
from numpy import array, transpose, mean, stack, where
from matplotlib import pyplot as plt
from sklearn.decomposition import PCA
import math
import os
import time
from math import atan2, pi, sin, cos
def sort_points_by_angle(landmarks):
#Sort points by angle
angles=[]
for ... | 35.467742 | 148 | 0.609936 |
4f20f72cf2659886891f3d2ca99310ca0b3177bc | 17,925 | py | Python | eqparse/loadsim.py | TfedUD/eqparse | ab1fba5b4995bed3f5fa2f77cdf505bb613c7e71 | [
"MIT"
] | null | null | null | eqparse/loadsim.py | TfedUD/eqparse | ab1fba5b4995bed3f5fa2f77cdf505bb613c7e71 | [
"MIT"
] | null | null | null | eqparse/loadsim.py | TfedUD/eqparse | ab1fba5b4995bed3f5fa2f77cdf505bb613c7e71 | [
"MIT"
] | null | null | null | '''
the 'load' module provides common access to the 'sim' and 'hsr' modules, including
automated batch routines and plotting. all parsing logic for sim files/reports should
be accomplished in 'sim.py' or 'hsr.py'; this is mainly an API for script-running.
'''
import os
import xlwings as xw
import shutil
... | 35.21611 | 125 | 0.476597 |
7850e6e0c8ce721cb49f5063e1ccb2e1bff5d82a | 19,310 | py | Python | pontoon/administration/views.py | st-l10n/pontoon | 87404e1b17285f0e787094538c1fd16e2422cc65 | [
"BSD-3-Clause"
] | null | null | null | pontoon/administration/views.py | st-l10n/pontoon | 87404e1b17285f0e787094538c1fd16e2422cc65 | [
"BSD-3-Clause"
] | null | null | null | pontoon/administration/views.py | st-l10n/pontoon | 87404e1b17285f0e787094538c1fd16e2422cc65 | [
"BSD-3-Clause"
] | 3 | 2017-10-15T13:15:47.000Z | 2018-10-10T09:03:19.000Z | import csv
import logging
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.db import transaction, IntegrityError
from django.db.models import Max
from django.http import Http404, HttpResponse, HttpResponseForbidde... | 37.568093 | 96 | 0.64174 |
7f3c03a94ea27b29b2d78944b90cabd88f60cd01 | 1,456 | py | Python | supertokens_python/recipe/passwordless/api/phone_number_exists.py | SKOOTUK/supertokens-python | c0751dd5af911835199223efbe5a91e7c1f1f954 | [
"Apache-2.0"
] | null | null | null | supertokens_python/recipe/passwordless/api/phone_number_exists.py | SKOOTUK/supertokens-python | c0751dd5af911835199223efbe5a91e7c1f1f954 | [
"Apache-2.0"
] | 3 | 2022-02-21T18:42:06.000Z | 2022-03-04T11:54:15.000Z | supertokens_python/recipe/passwordless/api/phone_number_exists.py | SKOOTUK/supertokens-python | c0751dd5af911835199223efbe5a91e7c1f1f954 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved.
#
# This software is licensed under the Apache License, Version 2.0 (the
# "License") as published by the Apache Software Foundation.
#
# You may not use this file except in compliance with the License. You may
# obtain a copy of the License at... | 45.5 | 92 | 0.751374 |
e5b826213bf4c19b41b7f78b1a83bd00a90c7462 | 2,297 | py | Python | sim2real_drone_racing/learning/deep_drone_racing_learner/src/ddr_learner/common_flags.py | tianqi-wang1996/DeepRobustDroneRacing | a6eeaea1263a71a0fae8b35f53e8938daa966bfb | [
"MIT"
] | 2 | 2020-11-24T11:16:48.000Z | 2021-04-02T05:14:44.000Z | sim2real_drone_racing/learning/deep_drone_racing_learner/src/ddr_learner/common_flags.py | tianqi-wang1996/DeepRobustDroneRacing | a6eeaea1263a71a0fae8b35f53e8938daa966bfb | [
"MIT"
] | 1 | 2021-02-19T14:31:39.000Z | 2021-12-24T02:55:39.000Z | sim2real_drone_racing/learning/deep_drone_racing_learner/src/ddr_learner/common_flags.py | tianqi-wang1996/DeepRobustDroneRacing | a6eeaea1263a71a0fae8b35f53e8938daa966bfb | [
"MIT"
] | 3 | 2021-03-24T08:34:25.000Z | 2022-02-28T07:17:54.000Z | import gflags
FLAGS = gflags.FLAGS
# Train parameters
gflags.DEFINE_integer('img_width', 300, 'Target Image Width')
gflags.DEFINE_integer('img_height', 200, 'Target Image Height')
gflags.DEFINE_integer('batch_size', 32, 'Batch size in training and evaluation')
gflags.DEFINE_float("learning_rate", 0.001, "Learning rat... | 47.854167 | 93 | 0.705703 |
894865140b3c7d224a0c8df6596fb455c64ab484 | 2,974 | py | Python | pylearn2/scripts/datasets/make_stl10_patches.py | ikervazquezlopez/Pylearn2 | 2971e8f64374ffde572d4cf967aad5342beaf5e0 | [
"BSD-3-Clause"
] | 2,045 | 2015-01-01T14:07:52.000Z | 2022-03-08T08:56:41.000Z | pylearn2/scripts/datasets/make_stl10_patches.py | ikervazquezlopez/Pylearn2 | 2971e8f64374ffde572d4cf967aad5342beaf5e0 | [
"BSD-3-Clause"
] | 305 | 2015-01-02T13:18:24.000Z | 2021-08-20T18:03:28.000Z | pylearn2/scripts/datasets/make_stl10_patches.py | ikervazquezlopez/Pylearn2 | 2971e8f64374ffde572d4cf967aad5342beaf5e0 | [
"BSD-3-Clause"
] | 976 | 2015-01-01T17:08:51.000Z | 2022-03-25T19:53:17.000Z | """
This script makes a dataset of two million approximately whitened patches,
extracted at random uniformly from a downsampled version of the STL-10
unlabeled and train dataset.
It assumes that you have already run make_downsampled_stl10.py,
which downsamples the STL-10 images to 1/3 of their original resolution.
Th... | 36.716049 | 79 | 0.742771 |
acd5dc9089b165b51be2e386ebb7dbae59c46384 | 1,831 | py | Python | test/chemistry/test_uccsd_hartree_fock.py | Sahar2/qiskit-aqua | a228fbe6b9613cff43e47796a7e4843deba2b051 | [
"Apache-2.0"
] | null | null | null | test/chemistry/test_uccsd_hartree_fock.py | Sahar2/qiskit-aqua | a228fbe6b9613cff43e47796a7e4843deba2b051 | [
"Apache-2.0"
] | null | null | null | test/chemistry/test_uccsd_hartree_fock.py | Sahar2/qiskit-aqua | a228fbe6b9613cff43e47796a7e4843deba2b051 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 39.804348 | 115 | 0.64828 |
673a3d9582101630594ed7d40964c9ec0b101133 | 6,595 | py | Python | Scripts_Model/old/scripts_pytorch/alexnet_pytorch.py | zhangziyezzy/DeepLearningMugenKnock | e306f436fb41b5549d0adf9ad331d638e5906e29 | [
"MIT"
] | 10 | 2021-12-17T06:07:25.000Z | 2022-03-25T13:50:05.000Z | Scripts_Model/old/scripts_pytorch/alexnet_pytorch.py | karaage0703/DeepLearningMugenKnock | 26830fe049c7da8001977ca0df12e946c0f030eb | [
"MIT"
] | null | null | null | Scripts_Model/old/scripts_pytorch/alexnet_pytorch.py | karaage0703/DeepLearningMugenKnock | 26830fe049c7da8001977ca0df12e946c0f030eb | [
"MIT"
] | 2 | 2022-03-15T02:42:09.000Z | 2022-03-30T23:19:55.000Z | import torch
import torch.nn.functional as F
import argparse
import cv2
import numpy as np
from glob import glob
num_classes = 2
img_height, img_width = 227, 227
channel = 3
GPU = False
torch.manual_seed(0)
class AlexNet(torch.nn.Module):
def __init__(self):
super(AlexNet, self).__init__()
self.co... | 29.441964 | 87 | 0.498863 |
09cd12d84b0649077032851c4ad4adeb825703a4 | 21 | py | Python | project_pist_v1/models/__init__.py | Herosbrine/odoo_project_ | 69066bd7bf172f8d19bdd156be6cc9b2975dd638 | [
"Apache-2.0"
] | null | null | null | project_pist_v1/models/__init__.py | Herosbrine/odoo_project_ | 69066bd7bf172f8d19bdd156be6cc9b2975dd638 | [
"Apache-2.0"
] | null | null | null | project_pist_v1/models/__init__.py | Herosbrine/odoo_project_ | 69066bd7bf172f8d19bdd156be6cc9b2975dd638 | [
"Apache-2.0"
] | null | null | null | from . import projet
| 10.5 | 20 | 0.761905 |
dcdde55589dbbb4fec65f77d72648deb6e3f6cdc | 3,002 | py | Python | nugoo/apps/people/migrations/0001_initial.py | edcwkim/nugoo | 2a509310f8fe93aa631fc53a50e9634c16cf5045 | [
"Apache-2.0"
] | 2 | 2022-03-11T01:29:27.000Z | 2022-03-11T01:29:50.000Z | nugoo/apps/people/migrations/0001_initial.py | edcwkim/nugoo | 2a509310f8fe93aa631fc53a50e9634c16cf5045 | [
"Apache-2.0"
] | null | null | null | nugoo/apps/people/migrations/0001_initial.py | edcwkim/nugoo | 2a509310f8fe93aa631fc53a50e9634c16cf5045 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-26 05:32
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import nugoo.apps.people.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operat... | 46.184615 | 185 | 0.606929 |
028abd1485669ca41b67e3b4e22552a7a817293a | 194 | py | Python | mobile.py | Abhishikta456/Normal-distribution | 46d6fae088c10e5d4560a08bd5fcccb5b98042c0 | [
"MIT"
] | null | null | null | mobile.py | Abhishikta456/Normal-distribution | 46d6fae088c10e5d4560a08bd5fcccb5b98042c0 | [
"MIT"
] | null | null | null | mobile.py | Abhishikta456/Normal-distribution | 46d6fae088c10e5d4560a08bd5fcccb5b98042c0 | [
"MIT"
] | null | null | null | import plotly.figure_factory as ff
import pandas as pd
import csv
df = pd.read_csv("data.csv")
fig = ff.create_distplot([df["Avg Rating"].tolist()], ["Avg Rating"], show_hist=False)
fig.show()
| 24.25 | 86 | 0.726804 |
d0b380689ec8268a8008a146b0e5157af37d28e0 | 10,200 | py | Python | pyathena/sixray_test/sixray_test.py | changgoo/pyathena-1 | c461ac3390d773537ce52393e3ebf68a3282aa46 | [
"MIT"
] | null | null | null | pyathena/sixray_test/sixray_test.py | changgoo/pyathena-1 | c461ac3390d773537ce52393e3ebf68a3282aa46 | [
"MIT"
] | null | null | null | pyathena/sixray_test/sixray_test.py | changgoo/pyathena-1 | c461ac3390d773537ce52393e3ebf68a3282aa46 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from ..load_sim import LoadSimAll
def scp_to_pc(source, target='NEWCOOL',
hostname='kimjg.astro.princeton.edu', username='jgkim'):
"""Function to copy files to my directory
"""
from paramiko import SSHClient
from... | 38.202247 | 94 | 0.546961 |
e93310b4b53f187957bc89d4b0c2f6a59d4ab38e | 5,415 | py | Python | src/old/database/DbInitializer.py | ytyaru0/Github.Contributioner.20180303140000 | 950e2c932a1c594408648331e0ac0f3682c4983a | [
"CC0-1.0"
] | null | null | null | src/old/database/DbInitializer.py | ytyaru0/Github.Contributioner.20180303140000 | 950e2c932a1c594408648331e0ac0f3682c4983a | [
"CC0-1.0"
] | null | null | null | src/old/database/DbInitializer.py | ytyaru0/Github.Contributioner.20180303140000 | 950e2c932a1c594408648331e0ac0f3682c4983a | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from abc import ABCMeta, abstractmethod
import os.path
from setting.Config import Config
import dataset
import glob
# 抽象クラス
class DbInitializer(metaclass=ABCMeta):
def __init__(self):
self._path_dir_root = os.path.abspath(os.path.dirname(os.path.dirname(os.pat... | 38.404255 | 187 | 0.633426 |
e9140dd94cf523c8acee8967e10f27c75066ad6f | 1,229 | py | Python | fixture/application.py | Shelkovica/python_training | c870008b251e8eae8f3ff2e451a15771a9d5f7ff | [
"Apache-2.0"
] | null | null | null | fixture/application.py | Shelkovica/python_training | c870008b251e8eae8f3ff2e451a15771a9d5f7ff | [
"Apache-2.0"
] | null | null | null | fixture/application.py | Shelkovica/python_training | c870008b251e8eae8f3ff2e451a15771a9d5f7ff | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self, browser, base_url, local_url, username, password, local_group_url):
if browser == "firefox":
self.wd =... | 31.512821 | 102 | 0.627339 |
ea195625e37daa64d5d5ff4f6bb28b71761cbb38 | 24,257 | py | Python | contrib/regularized_embeddings.py | eigenfoo/word2gm | d6b89842803dd78c9ac2bf26a802c71fcef82f54 | [
"BSD-3-Clause"
] | 3 | 2018-12-27T14:50:41.000Z | 2019-03-11T16:03:07.000Z | contrib/regularized_embeddings.py | eigenfoo/word2gm | d6b89842803dd78c9ac2bf26a802c71fcef82f54 | [
"BSD-3-Clause"
] | null | null | null | contrib/regularized_embeddings.py | eigenfoo/word2gm | d6b89842803dd78c9ac2bf26a802c71fcef82f54 | [
"BSD-3-Clause"
] | null | null | null | """
Ben Athiwaratkun
Training code for Gaussian Mixture word embeddings model
Adapted from tensorflow's word2vec.py
(https://github.com/tensorflow/models/blob/master/tutorials/embedding/word2vec.py)
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
impo... | 38.935795 | 132 | 0.65041 |
1ddff97500d326bb73d06a97cdafe035251c7680 | 620 | py | Python | venv/bin/rst2html.py | acounsel/zwazo | beeb3591674a8290a89704e3da56aa4d425418e8 | [
"MIT"
] | null | null | null | venv/bin/rst2html.py | acounsel/zwazo | beeb3591674a8290a89704e3da56aa4d425418e8 | [
"MIT"
] | 10 | 2019-11-25T16:54:39.000Z | 2022-02-10T08:29:51.000Z | venv/bin/rst2html.py | acounsel/zwazo | beeb3591674a8290a89704e3da56aa4d425418e8 | [
"MIT"
] | null | null | null | #!/Users/Marisa/Sites/zwazo/venv/bin/python3
# $Id: rst2html.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing HTML.
"""
try:
import locale
locale.setl... | 25.833333 | 78 | 0.737097 |
b0449121f98255a7ffbc8970e492aceb5a7f8d2a | 1,245 | py | Python | extensions/widgets/interactive/NumericInput/NumericInput.py | willingc/oh-missions-oppia-beta | 3d97903a5155ec67f135b1aa2c02f3bb39eb02e7 | [
"Apache-2.0"
] | null | null | null | extensions/widgets/interactive/NumericInput/NumericInput.py | willingc/oh-missions-oppia-beta | 3d97903a5155ec67f135b1aa2c02f3bb39eb02e7 | [
"Apache-2.0"
] | 2 | 2021-06-10T23:58:39.000Z | 2021-12-13T20:51:34.000Z | extensions/widgets/interactive/NumericInput/NumericInput.py | willingc/oh-missions-oppia-beta | 3d97903a5155ec67f135b1aa2c02f3bb39eb02e7 | [
"Apache-2.0"
] | null | null | null | from core.domain import widget_domain
from extensions.objects.models import objects
class NumericInput(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a widget, ... | 32.763158 | 79 | 0.699598 |
109422f948a8a29c875dcfdb424e7f71d2bd02c6 | 394 | py | Python | apps/track/migrations/0022_auto_20210319_1551.py | martinlehoux/django_bike | 05373d2649647fe8ebadb0aad54b9a7ec1900fe7 | [
"MIT"
] | 1 | 2020-08-12T17:53:37.000Z | 2020-08-12T17:53:37.000Z | apps/track/migrations/0022_auto_20210319_1551.py | martinlehoux/django_bike | 05373d2649647fe8ebadb0aad54b9a7ec1900fe7 | [
"MIT"
] | 12 | 2020-07-03T03:52:00.000Z | 2021-09-22T18:00:44.000Z | apps/track/migrations/0022_auto_20210319_1551.py | martinlehoux/django_bike | 05373d2649647fe8ebadb0aad54b9a7ec1900fe7 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-19 15:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("track", "0021_auto_20200915_1528"),
]
operations = [
migrations.RemoveField(
model_name="track",
name="parser",
),
... | 18.761905 | 47 | 0.560914 |
068edd676296c97bfe5055b82b80f1b57f846c2f | 1,763 | py | Python | barcodes/dxfwrite/tests/test_solid.py | sbarton272/AcousticBarcodes-Explorations | 73f019228988727575af7d67d1b7c7119f6c49a6 | [
"MIT"
] | null | null | null | barcodes/dxfwrite/tests/test_solid.py | sbarton272/AcousticBarcodes-Explorations | 73f019228988727575af7d67d1b7c7119f6c49a6 | [
"MIT"
] | null | null | null | barcodes/dxfwrite/tests/test_solid.py | sbarton272/AcousticBarcodes-Explorations | 73f019228988727575af7d67d1b7c7119f6c49a6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#coding:utf-8
# Created: 20.02.2010
# Copyright (C) 2010, Manfred Moitzi
# License: MIT License
__author__ = "mozman <mozman@gmx.at>"
import unittest
from dxfwrite.base import dxfstr, DXFValidationError
from dxfwrite.entities import Solid
class TestSolid(unittest.TestCase):
def test_solid_... | 39.177778 | 103 | 0.59671 |
45696041574414b6598c109704c2977dfc8d343e | 182,959 | py | Python | zvmsdk/smtclient.py | haolp/python-zvm-sdk | 784b60b6528b57eb3fe9f795af439a25e20843b9 | [
"Apache-2.0"
] | null | null | null | zvmsdk/smtclient.py | haolp/python-zvm-sdk | 784b60b6528b57eb3fe9f795af439a25e20843b9 | [
"Apache-2.0"
] | null | null | null | zvmsdk/smtclient.py | haolp/python-zvm-sdk | 784b60b6528b57eb3fe9f795af439a25e20843b9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017,2020 IBM Corp.
#
# 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 agr... | 45.063793 | 79 | 0.510781 |
317e9fc1184ee14a2aa11ec5bcfe86d5663fb39c | 27 | py | Python | tomark/__init__.py | codazoda/tomark | f504c932c24ace8f5eda14325d299d949f8dde93 | [
"MIT"
] | 7 | 2021-01-25T04:42:37.000Z | 2021-07-06T20:47:32.000Z | tomark/__init__.py | codazoda/tomark | f504c932c24ace8f5eda14325d299d949f8dde93 | [
"MIT"
] | null | null | null | tomark/__init__.py | codazoda/tomark | f504c932c24ace8f5eda14325d299d949f8dde93 | [
"MIT"
] | 2 | 2021-01-25T04:42:58.000Z | 2021-07-06T04:45:47.000Z | from .tomark import Tomark
| 13.5 | 26 | 0.814815 |
348cc447f562e843d70b6c3d13c0beb4f6aa7312 | 5,440 | py | Python | satchmo/apps/product/views/adminviews.py | djangoplicity/satchmo | 75b672dffb64fed3e55c253d51a0ce73f0747e05 | [
"BSD-3-Clause"
] | null | null | null | satchmo/apps/product/views/adminviews.py | djangoplicity/satchmo | 75b672dffb64fed3e55c253d51a0ce73f0747e05 | [
"BSD-3-Clause"
] | null | null | null | satchmo/apps/product/views/adminviews.py | djangoplicity/satchmo | 75b672dffb64fed3e55c253d51a0ce73f0747e05 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.auth.decorators import user_passes_test
from django.contrib import messages
from django.core import urlresolvers
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.utils.translation import ugettext as _
from django.db import IntegrityError
from product.forms... | 37.006803 | 142 | 0.670404 |
ecf30d039a9053fac5ac961b8a17d388e8514946 | 349 | py | Python | env3/Scripts/easy_install-script.py | kdmitrieva16/python_training | 8c88d44c8d4c26f09ed60f091138ae9c85307fce | [
"Apache-2.0"
] | null | null | null | env3/Scripts/easy_install-script.py | kdmitrieva16/python_training | 8c88d44c8d4c26f09ed60f091138ae9c85307fce | [
"Apache-2.0"
] | null | null | null | env3/Scripts/easy_install-script.py | kdmitrieva16/python_training | 8c88d44c8d4c26f09ed60f091138ae9c85307fce | [
"Apache-2.0"
] | null | null | null | #!C:\PTGH\python_training\env3\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==18.1','console_scripts','easy_install'
__requires__ = 'setuptools==18.1'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('setuptools==18.1', 'console_scrip... | 31.727273 | 81 | 0.733524 |
cfc10f45701526425731ce202fcc60e0ee252408 | 50,430 | py | Python | detectron2/utils/visualizer.py | aabbas90/detectron2 | e96afbad765b27bddf55237bc4a051963690aba0 | [
"Apache-2.0"
] | 1 | 2021-01-06T10:29:37.000Z | 2021-01-06T10:29:37.000Z | detectron2/utils/visualizer.py | aabbas90/detectron2 | e96afbad765b27bddf55237bc4a051963690aba0 | [
"Apache-2.0"
] | null | null | null | detectron2/utils/visualizer.py | aabbas90/detectron2 | e96afbad765b27bddf55237bc4a051963690aba0 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
import colorsys
import logging
import math
import numpy as np
from enum import Enum, unique
import cv2
import matplotlib as mpl
import matplotlib.colors as mplc
import matplotlib.figure as mplfigure
import pycocotools.mask as mask_util
import torch
from matplotlib.back... | 40.669355 | 167 | 0.583204 |
50ec796fdb3c0d33eb4403884d65cc159beb7843 | 24,381 | py | Python | src/biokbase/narrative/jobs/jobmanager.py | msneddon/narrative | 499d7e7773c40144a4c130f9de4668501d940f90 | [
"MIT"
] | null | null | null | src/biokbase/narrative/jobs/jobmanager.py | msneddon/narrative | 499d7e7773c40144a4c130f9de4668501d940f90 | [
"MIT"
] | null | null | null | src/biokbase/narrative/jobs/jobmanager.py | msneddon/narrative | 499d7e7773c40144a4c130f9de4668501d940f90 | [
"MIT"
] | null | null | null | """
KBase Job Manager
The main class here defines a manager for running jobs (as Job objects).
This class knows how to fetch job status, kill jobs, etc.
It also communicates with the front end over the KBaseJobs channel.
It is intended for use as a singleton - use the get_manager() function
to fetch it.
"""
__author_... | 41.748288 | 220 | 0.554571 |
33a726f9a396ff15102ee56bd59a71b3feffb925 | 583 | py | Python | ej2bplotter.py | lboccardi/SS_20212C_TP4 | 5034ce9084c2fa86bbca8b15fc35910cd21b02eb | [
"MIT"
] | null | null | null | ej2bplotter.py | lboccardi/SS_20212C_TP4 | 5034ce9084c2fa86bbca8b15fc35910cd21b02eb | [
"MIT"
] | null | null | null | ej2bplotter.py | lboccardi/SS_20212C_TP4 | 5034ce9084c2fa86bbca8b15fc35910cd21b02eb | [
"MIT"
] | null | null | null | import sys
import matplotlib.pyplot as plt
import numpy as np
if __name__ == '__main__':
if (len(sys.argv) < 2):
print("Wrong amount of parameters")
exit()
times = []
positions = []
velocities = []
data = np.genfromtxt(".\TP4\datos3Jupiter.csv", delimiter=",", names... | 26.5 | 101 | 0.578045 |
345b1817bea7c61036934d3d67bc6af6905f6a12 | 4,924 | py | Python | loss.py | ml-postech/LISA | 4f3c1cd7e56d6d7b107a587152cd703663cfa4c4 | [
"BSD-3-Clause"
] | null | null | null | loss.py | ml-postech/LISA | 4f3c1cd7e56d6d7b107a587152cd703663cfa4c4 | [
"BSD-3-Clause"
] | null | null | null | loss.py | ml-postech/LISA | 4f3c1cd7e56d6d7b107a587152cd703663cfa4c4 | [
"BSD-3-Clause"
] | 1 | 2022-03-31T16:06:22.000Z | 2022-03-31T16:06:22.000Z | import torch
import torch.nn.functional as F
import torchaudio
class hp:
class dsp:
sample_rate = 16000
min_vol = -96 # in dBFS
max_vol = 0 # in dBFS
class loss:
class spectrogramloss: # According to Su et al. (2020)
n_fft = [2048, 512]
hop_length = [... | 34.433566 | 120 | 0.602965 |
f076497504573934ac0276a2ae05473905436b2c | 3,051 | py | Python | src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_py3.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_py3.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/sync_agent_py3.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 38.620253 | 83 | 0.602753 |
748421d83f29db3322117a9ba96365800795a060 | 1,409 | py | Python | workbench/planning/migrations/0013_publicholiday.py | yoshson/workbench | 701558cac3357cd82e4dc99f0fefed12ee81ddc5 | [
"MIT"
] | 15 | 2020-09-02T22:17:34.000Z | 2022-02-01T20:09:10.000Z | workbench/planning/migrations/0013_publicholiday.py | yoshson/workbench | 701558cac3357cd82e4dc99f0fefed12ee81ddc5 | [
"MIT"
] | 18 | 2020-01-08T15:28:26.000Z | 2022-02-28T02:46:41.000Z | workbench/planning/migrations/0013_publicholiday.py | yoshson/workbench | 701558cac3357cd82e4dc99f0fefed12ee81ddc5 | [
"MIT"
] | 8 | 2020-09-29T08:00:24.000Z | 2022-01-16T11:58:19.000Z | # Generated by Django 3.2.2 on 2021-05-16 13:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("planning", "0012_auto_20210429_1448"),
]
operations = [
migrations.CreateModel(
name="PublicHoliday",
fields=[
... | 29.354167 | 80 | 0.419446 |
332c2279fe65065a025a9c773c1b1c23f116c5d7 | 867 | py | Python | variations/data_preperation.py | amarkumar1720/AlexNet | d544405df8a0ff08c64699cbdfd7869c8f3f5302 | [
"MIT"
] | null | null | null | variations/data_preperation.py | amarkumar1720/AlexNet | d544405df8a0ff08c64699cbdfd7869c8f3f5302 | [
"MIT"
] | null | null | null | variations/data_preperation.py | amarkumar1720/AlexNet | d544405df8a0ff08c64699cbdfd7869c8f3f5302 | [
"MIT"
] | null | null | null | import os
import shutil
# /home/amareshiitd/Desktop/deep learning/assn1/
default = ''
label=['Apple','Baby','Bicycle','Bird','Bus','Camel','Car','Chimpanzee','Clock','Crocodile','Deer','Dog','Elephant','Fish','Flower','Frog','Guitar','Horse','Lamp','Lock','Man','Motorcycle','Mushroom','Orange','Pear','Plane','Rocket',... | 43.35 | 303 | 0.657439 |
30ed73bcc4022fc4a852252d37d12922c9444347 | 2,193 | py | Python | relay.py | krazybean/pagerduty_hook | fd16ba3c05ee02762c21c8ebc601fc9089403248 | [
"MIT"
] | null | null | null | relay.py | krazybean/pagerduty_hook | fd16ba3c05ee02762c21c8ebc601fc9089403248 | [
"MIT"
] | null | null | null | relay.py | krazybean/pagerduty_hook | fd16ba3c05ee02762c21c8ebc601fc9089403248 | [
"MIT"
] | null | null | null | import os
import sys
import requests
import time
import json
class Relay:
def __init__(self):
"""
tests environment for from/to endpoints
"""
try:
self.external_relay = os.environ['external_hook']
self.external_dest = os.environ['destination']
se... | 29.635135 | 95 | 0.510716 |
40eb361df52ac255304c646faf336f9f73401e8b | 1,821 | py | Python | configs/tridentnet/tridentnet_r50_caffe_1x_icdar2021_isolated.py | TriplePool/mmdetection | f72a87174ef9397b1e9239809bb961c8edbf4239 | [
"Apache-2.0"
] | null | null | null | configs/tridentnet/tridentnet_r50_caffe_1x_icdar2021_isolated.py | TriplePool/mmdetection | f72a87174ef9397b1e9239809bb961c8edbf4239 | [
"Apache-2.0"
] | null | null | null | configs/tridentnet/tridentnet_r50_caffe_1x_icdar2021_isolated.py | TriplePool/mmdetection | f72a87174ef9397b1e9239809bb961c8edbf4239 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/models/faster_rcnn_r50_caffe_c4_icdar2021.py',
'../_base_/datasets/icdar2021_detection_isolated.py',
'../_base_/schedules/schedule_1x_half_batch.py', '../_base_/default_runtime.py'
]
model = dict(
type='TridentFasterRCNN',
pretrained='open-mmlab://detectron2/resnet50_caffe',
... | 33.722222 | 83 | 0.641955 |
2be612a9d76c8bacb2caeeee1504e1d920729ba8 | 8,138 | py | Python | program_rtp.py | kaisubr/rotten-tomatoes-prediction | d6d6b81e23253763242f36fbbc973b07ba2fddfc | [
"Apache-2.0"
] | 1 | 2020-01-08T22:43:55.000Z | 2020-01-08T22:43:55.000Z | program_rtp.py | kaisubr/rotten-tomatoes-prediction | d6d6b81e23253763242f36fbbc973b07ba2fddfc | [
"Apache-2.0"
] | null | null | null | program_rtp.py | kaisubr/rotten-tomatoes-prediction | d6d6b81e23253763242f36fbbc973b07ba2fddfc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in
import numpy as np # linear algebra
i... | 29.273381 | 150 | 0.685549 |
1ac99ac4b149af53917ae0f6f4b35ff4ec32c0fe | 1,031 | py | Python | java/test/src/main/resources/test_cross_language_invocation.py | eisber/ray | 94a286ef1d8ad5a3093b7f996a811727fa0e2d3e | [
"Apache-2.0"
] | null | null | null | java/test/src/main/resources/test_cross_language_invocation.py | eisber/ray | 94a286ef1d8ad5a3093b7f996a811727fa0e2d3e | [
"Apache-2.0"
] | null | null | null | java/test/src/main/resources/test_cross_language_invocation.py | eisber/ray | 94a286ef1d8ad5a3093b7f996a811727fa0e2d3e | [
"Apache-2.0"
] | null | null | null | # This file is used by CrossLanguageInvocationTest.java to test cross-language
# invocation.
import six
import ray
@ray.remote
def py_func(value):
assert isinstance(value, bytes)
return b"Response from Python: " + value
@ray.remote
def py_func_call_java_function(value):
assert isinstance(value, bytes)... | 24.547619 | 78 | 0.681862 |
69daa7a824ee858ab1e3d9e802281549ab7951c8 | 950 | bzl | Python | test/testdata/angle_bracket_test/input.bzl | bsilver8192/stardoc | cdd19379490c681563b38ef86299f039bd368ce0 | [
"Apache-2.0"
] | null | null | null | test/testdata/angle_bracket_test/input.bzl | bsilver8192/stardoc | cdd19379490c681563b38ef86299f039bd368ce0 | [
"Apache-2.0"
] | null | null | null | test/testdata/angle_bracket_test/input.bzl | bsilver8192/stardoc | cdd19379490c681563b38ef86299f039bd368ce0 | [
"Apache-2.0"
] | null | null | null | """Input file to test angle bracket bug (https://github.com/bazelbuild/skydoc/issues/186)"""
def bracket_function(name):
"""Dummy docstring with <brackets>.
This rule runs checks on <angle brackets>.
Args:
name: an arg with **formatted** docstring.
Returns:
some <angled> brackets
... | 22.619048 | 92 | 0.585263 |
37ca26d1ebd89704ea87b60f0b5a8e013b9d0d62 | 387 | py | Python | bbdd2/asgi.py | saczuac/bbdd2 | 08436c3db08fbb39349fead50609ec9d2c78ca57 | [
"MIT"
] | null | null | null | bbdd2/asgi.py | saczuac/bbdd2 | 08436c3db08fbb39349fead50609ec9d2c78ca57 | [
"MIT"
] | null | null | null | bbdd2/asgi.py | saczuac/bbdd2 | 08436c3db08fbb39349fead50609ec9d2c78ca57 | [
"MIT"
] | null | null | null | """
ASGI config for bbdd2 project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTING... | 22.764706 | 78 | 0.782946 |
7c01f3f774ea59f22e586a71dff8354de9ed4f16 | 3,953 | py | Python | src/aob/settings/base.py | Busaka/aob | cc23925c0bb24c1b8da74bf14a2bdf04584550c7 | [
"MIT"
] | null | null | null | src/aob/settings/base.py | Busaka/aob | cc23925c0bb24c1b8da74bf14a2bdf04584550c7 | [
"MIT"
] | null | null | null | src/aob/settings/base.py | Busaka/aob | cc23925c0bb24c1b8da74bf14a2bdf04584550c7 | [
"MIT"
] | null | null | null | """
Django settings for aob project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
from django.core.urlresolvers import reverse_lazy
from os.path import dirname, ... | 28.035461 | 74 | 0.708576 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.