hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7952fdfe210cf955b6018a8b4f1c8dcd742e577b | 5,102 | py | Python | nitro/resource/config/ns/nstcpbufparam.py | HanseMerkur/nitro-python | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | [
"Apache-2.0"
] | 2 | 2020-08-24T18:04:22.000Z | 2020-08-24T18:04:47.000Z | nitro/resource/config/ns/nstcpbufparam.py | HanseMerkur/nitro-python | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | [
"Apache-2.0"
] | null | null | null | nitro/resource/config/ns/nstcpbufparam.py | HanseMerkur/nitro-python | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2015 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 31.493827 | 137 | 0.599373 |
7952fe3bf97975ce835c0142e84dd524de5fc242 | 2,077 | py | Python | bench/atom10_test.py | kkszysiu/ultrafeedparser | f3f9a53013049a29771743b5e4ec97fb7c39080e | [
"MIT"
] | null | null | null | bench/atom10_test.py | kkszysiu/ultrafeedparser | f3f9a53013049a29771743b5e4ec97fb7c39080e | [
"MIT"
] | null | null | null | bench/atom10_test.py | kkszysiu/ultrafeedparser | f3f9a53013049a29771743b5e4ec97fb7c39080e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import time
import pytest
import feedparser
import ultrafeedparser
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
ATOM10_DATA = """
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<link href="http://example.org/"/>
<updated>2003-12-13T18:... | 21.635417 | 60 | 0.634569 |
7952fe4dbcb544af681681a908ce28d6671bdb8b | 1,101 | py | Python | _95.py | elfgzp/leetCode | 964c6574d310a9a6c486bf638487fd2f72b83b3f | [
"MIT"
] | 3 | 2019-04-12T06:22:56.000Z | 2019-05-04T04:25:01.000Z | _95.py | elfgzp/Leetcode | 964c6574d310a9a6c486bf638487fd2f72b83b3f | [
"MIT"
] | null | null | null | _95.py | elfgzp/Leetcode | 964c6574d310a9a6c486bf638487fd2f72b83b3f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = 'gzp'
from utils import TreeNode
class Solution:
cache = {}
def generateTrees(self, n):
"""
:type n: int
:rtype: List[TreeNode]
"""
if n == 0:
return []
return self._generateTrees(1, n)
def _generateTrees(... | 23.425532 | 59 | 0.506812 |
7952fee4951eb2e973f97efaaebb4da80d34110c | 653 | py | Python | tools/lib/auth_config.py | salah608/OPENPILOT | be214b44947d2a52571b1031c25dde5d54a5fe10 | [
"MIT"
] | 3 | 2019-06-24T07:46:43.000Z | 2019-06-25T07:18:02.000Z | tools/lib/auth_config.py | salah608/OPENPILOT | be214b44947d2a52571b1031c25dde5d54a5fe10 | [
"MIT"
] | 1 | 2019-06-24T07:55:47.000Z | 2019-06-25T03:33:11.000Z | tools/lib/auth_config.py | salah608/OPENPILOT | be214b44947d2a52571b1031c25dde5d54a5fe10 | [
"MIT"
] | 2 | 2019-06-25T06:40:15.000Z | 2019-06-26T10:11:22.000Z | import json
import os
from common.file_helpers import mkdirs_exists_ok
from system.hardware import PC
class MissingAuthConfigError(Exception):
pass
if PC:
CONFIG_DIR = os.path.expanduser('~/.comma')
else:
CONFIG_DIR = "/tmp/.comma"
mkdirs_exists_ok(CONFIG_DIR)
def get_token():
try:
with open(os.path.... | 18.657143 | 61 | 0.701378 |
7952ffc65d6f5a2c929666249affd8ba4b03c5fd | 343 | py | Python | 5.py | Polar1ty/euler_problems | bc1cd917d95d1b63b80a0b182dbd5e9f90a95d90 | [
"MIT"
] | 2 | 2020-06-09T10:35:12.000Z | 2020-06-09T11:32:16.000Z | 5.py | Polar1ty/euler_problems | bc1cd917d95d1b63b80a0b182dbd5e9f90a95d90 | [
"MIT"
] | null | null | null | 5.py | Polar1ty/euler_problems | bc1cd917d95d1b63b80a0b182dbd5e9f90a95d90 | [
"MIT"
] | null | null | null | # Smallest multiple
import time
start = time.time()
for i in range(1, 1000000000):
if i % 11 == 0 and i % 12 == 0 and i % 13 == 0 and i % 14 == 0 and i % 15 == 0 and i % 16 == 0 and i % 17 == 0 and i % 18 == 0 and i % 19 == 0 and i % 20 == 0:
print(i)
end = time.time()
print('Time of execution = ... | 31.181818 | 164 | 0.51895 |
795302b0cb2e341c667b782d79d15466edb70e60 | 21,120 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/google/gcp_dns_managed_zone.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/google/gcp_dns_managed_zone.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/google/gcp_dns_managed_zone.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | 33.684211 | 159 | 0.615672 |
795302b4e0a8f72d38fa24d4cb82755338744c19 | 2,441 | py | Python | neighbourhood/migrations/0001_initial.py | EmmanuelMuchiri/Neighbourhood | 2412eab3f557db655329734254fb460009d81cc8 | [
"MIT"
] | null | null | null | neighbourhood/migrations/0001_initial.py | EmmanuelMuchiri/Neighbourhood | 2412eab3f557db655329734254fb460009d81cc8 | [
"MIT"
] | 4 | 2020-06-05T23:34:55.000Z | 2021-06-10T21:57:02.000Z | neighbourhood/migrations/0001_initial.py | markmumba/defaulters | 8f78863fb04932c0af0186442aa0873f861da5cb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-09-14 12:22
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import tinymce.models
class Migration(migrations.Migration):
initial = True
dependenci... | 40.016393 | 132 | 0.602212 |
795302c3364c83eceba63908704b80f0160b5721 | 1,013 | py | Python | chainerrl/agents/double_dqn.py | WhenTheyCry96/chainerrl | 0f32aae2855dbb6288ae628be6271739ced6c42c | [
"MIT"
] | 2 | 2020-05-20T06:15:20.000Z | 2020-05-20T06:15:27.000Z | chainerrl/agents/double_dqn.py | WhenTheyCry96/chainerrl | 0f32aae2855dbb6288ae628be6271739ced6c42c | [
"MIT"
] | null | null | null | chainerrl/agents/double_dqn.py | WhenTheyCry96/chainerrl | 0f32aae2855dbb6288ae628be6271739ced6c42c | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases() # NOQA
import chainer
from chainerrl.agents import dqn
from chainerrl.recurrent import state_kept... | 28.138889 | 79 | 0.739388 |
7953033cbf0cbd23a941af3ee95e30e52edcc434 | 13,629 | py | Python | oscrypto/_mac/_core_foundation_ctypes.py | frennkie/oscrypto | 24aff3148379b931d9c72ab3b069e537dc2195f8 | [
"MIT"
] | 1 | 2020-05-17T06:44:51.000Z | 2020-05-17T06:44:51.000Z | oscrypto/_mac/_core_foundation_ctypes.py | frennkie/oscrypto | 24aff3148379b931d9c72ab3b069e537dc2195f8 | [
"MIT"
] | null | null | null | oscrypto/_mac/_core_foundation_ctypes.py | frennkie/oscrypto | 24aff3148379b931d9c72ab3b069e537dc2195f8 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from ctypes.util import find_library
from ctypes import c_void_p, c_long, c_uint32, c_char_p, c_byte, c_ulong, c_bool
from ctypes import CDLL, string_at, cast, POINTER, byref
import ctypes
from .._ffi import FFIEngineEr... | 27.70122 | 112 | 0.650525 |
795303cf33f28b3556462435158b835e5e917016 | 4,276 | py | Python | BPBackendDjango/BPBackendDjango/Views/leaderboardviews.py | bp-momentum/BP-backend | f6b4b344c2c5fae3c8bb17874771aa49a48e97ef | [
"MIT"
] | 3 | 2022-03-15T09:56:31.000Z | 2022-03-15T09:56:59.000Z | BPBackendDjango/BPBackendDjango/Views/leaderboardviews.py | bp-momentum/BP-backend | f6b4b344c2c5fae3c8bb17874771aa49a48e97ef | [
"MIT"
] | 38 | 2022-01-16T18:26:10.000Z | 2022-03-14T23:14:40.000Z | BPBackendDjango/BPBackendDjango/Views/leaderboardviews.py | bp-momentum/BP-backend | f6b4b344c2c5fae3c8bb17874771aa49a48e97ef | [
"MIT"
] | null | null | null | import math
from rest_framework.views import APIView
from rest_framework.response import Response
from ..models import Leaderboard
from ..Helperclasses.jwttoken import JwToken
from ..Helperclasses.handlers import ErrorHandler, LeaderboardHandler
class ListLeaderboardView(APIView):
def post(self, request, *args... | 36.237288 | 122 | 0.540225 |
79530478975ce2e4256ce556c0c0c7a8919ebc46 | 643 | py | Python | __init__.py | ionicsolutions/ytterbium | 8cc6b4f942d7040e008ecf03f58b1a241800e74f | [
"Apache-2.0"
] | 1 | 2022-03-16T13:26:58.000Z | 2022-03-16T13:26:58.000Z | __init__.py | ionicsolutions/ytterbium | 8cc6b4f942d7040e008ecf03f58b1a241800e74f | [
"Apache-2.0"
] | 1 | 2017-12-18T12:06:10.000Z | 2017-12-20T17:11:21.000Z | __init__.py | ionicsolutions/ytterbium | 8cc6b4f942d7040e008ecf03f58b1a241800e74f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# (c) 2017 Kilian Kluge
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.823529 | 76 | 0.720062 |
79530569bb969510dc48cf4b0ea577ebffa66be8 | 1,382 | py | Python | aea/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | aea/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | aea/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 28.204082 | 82 | 0.642547 |
7953057edeafeb57009948e085a9239d610ebaa5 | 12,706 | py | Python | egs/wsj/s5/steps/tfrnnlm/train_lstm_fast.py | hainan-xv/kaldi | 053a9f515fc6712d5da84ca35ab0802a1fd89588 | [
"Apache-2.0"
] | 4 | 2017-10-02T17:59:15.000Z | 2019-04-10T11:07:50.000Z | egs/wsj/s5/steps/tfrnnlm/train_lstm_fast.py | hainan-xv/kaldi | 053a9f515fc6712d5da84ca35ab0802a1fd89588 | [
"Apache-2.0"
] | 8 | 2017-01-05T18:00:41.000Z | 2017-11-09T19:08:02.000Z | egs/wsj/s5/steps/tfrnnlm/train_lstm_fast.py | hainan-xv/kaldi | 053a9f515fc6712d5da84ca35ab0802a1fd89588 | [
"Apache-2.0"
] | 1 | 2017-09-29T23:52:56.000Z | 2017-09-29T23:52:56.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
# Copyright (C) 2017 Intellisist, Inc. (Author: Hainan Xu)
# 2018 Dongji Gao
#
# 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 L... | 35.994334 | 141 | 0.678892 |
795305e0b4e181b7a67c9d73abc8b9d69aad5ade | 927 | py | Python | lib/surface/compute/instance_groups/managed/instance_configs/__init__.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/instance_groups/managed/instance_configs/__init__.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/instance_groups/managed/instance_configs/__init__.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | 1 | 2020-07-24T20:13:29.000Z | 2020-07-24T20:13:29.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 40.304348 | 74 | 0.785329 |
79530732b75cb8e36fb6bddf2a4b313079a633d9 | 1,195 | py | Python | apps/news/handlers/create.py | hiraq/testcoil | f136ca6b3e9d0ce5da9f868ab63d9c7dda0f859e | [
"MIT"
] | null | null | null | apps/news/handlers/create.py | hiraq/testcoil | f136ca6b3e9d0ce5da9f868ab63d9c7dda0f859e | [
"MIT"
] | null | null | null | apps/news/handlers/create.py | hiraq/testcoil | f136ca6b3e9d0ce5da9f868ab63d9c7dda0f859e | [
"MIT"
] | null | null | null | from http import HTTPStatus
from sanic.response import json
from core.helpers import jsonapi
from apps.commons.errors import DataDuplicateError
from apps.news.models import News
from apps.news.repository import NewsRepo
from apps.news.services import CreateService
from apps.topics.models import Topic
from apps.topics... | 29.875 | 87 | 0.629289 |
7953077804ddeebb41b5d12a2c0c4640b4ae4efa | 8,071 | py | Python | ARNet_ai2thor/faster_rcnn/datasets/ai2thor_attribute_dataset_loader.py | sdh9446/3D-SGG | 1137aaa1e72a228c9208a4299d7b67c60e2a7222 | [
"MIT"
] | null | null | null | ARNet_ai2thor/faster_rcnn/datasets/ai2thor_attribute_dataset_loader.py | sdh9446/3D-SGG | 1137aaa1e72a228c9208a4299d7b67c60e2a7222 | [
"MIT"
] | null | null | null | ARNet_ai2thor/faster_rcnn/datasets/ai2thor_attribute_dataset_loader.py | sdh9446/3D-SGG | 1137aaa1e72a228c9208a4299d7b67c60e2a7222 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from PIL import Image
import os.path as osp
import numpy as np
import numpy.random as npr
import json
import cv2
import torch
import torch.utils.data as data
import torchvision.transforms as transforms
from fast_rcnn.config import cfg
class ai2thor_attribute_dataset(data.Dataset):
def _... | 38.990338 | 112 | 0.623962 |
795308154c5f335c016af92ad6467fecf17f3cf0 | 557 | py | Python | api/open_general_licences/migrations/0002_auto_20200522_1410.py | django-doctor/lite-api | 1ba278ba22ebcbb977dd7c31dd3701151cd036bf | [
"MIT"
] | null | null | null | api/open_general_licences/migrations/0002_auto_20200522_1410.py | django-doctor/lite-api | 1ba278ba22ebcbb977dd7c31dd3701151cd036bf | [
"MIT"
] | null | null | null | api/open_general_licences/migrations/0002_auto_20200522_1410.py | django-doctor/lite-api | 1ba278ba22ebcbb977dd7c31dd3701151cd036bf | [
"MIT"
] | null | null | null | # Generated by Django 2.2.12 on 2020-05-22 14:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("open_general_licences", "0001_initial"),
]
operations = [
migrations.AlterField(
model_name="opengenerallicence",
n... | 27.85 | 101 | 0.657092 |
795308e0f33a5f7bca390db630aa8beadd59f72e | 1,076 | py | Python | app/__init__.py | zhangchenchen/A-clean-blog-by-flask-bootstrap | 16f7da63efdf07780bc65b42087574463c3acd51 | [
"Apache-2.0"
] | 1 | 2017-12-24T10:12:03.000Z | 2017-12-24T10:12:03.000Z | app/__init__.py | zhangchenchen/A-clean-blog-by-flask-bootstrap | 16f7da63efdf07780bc65b42087574463c3acd51 | [
"Apache-2.0"
] | null | null | null | app/__init__.py | zhangchenchen/A-clean-blog-by-flask-bootstrap | 16f7da63efdf07780bc65b42087574463c3acd51 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Flask, render_template
from flask.ext.bootstrap import Bootstrap
from flask.ext.mail import Mail
from flask.ext.moment import Moment
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
from flask.ext.pagedown import PageDo... | 25.023256 | 62 | 0.757435 |
79530aaf3e7601129f2f739babc977be8578e37c | 1,491 | py | Python | dex/test/test.py | qintangtao/python.dex | 1dca5d45c8a1ffdd6332ae9759fceb996587d0b6 | [
"MIT"
] | 291 | 2015-01-09T16:15:00.000Z | 2022-01-17T20:18:02.000Z | dex/test/test.py | qintangtao/python.dex | 1dca5d45c8a1ffdd6332ae9759fceb996587d0b6 | [
"MIT"
] | 14 | 2015-01-23T14:08:39.000Z | 2019-06-11T02:33:51.000Z | dex/test/test.py | qintangtao/python.dex | 1dca5d45c8a1ffdd6332ae9759fceb996587d0b6 | [
"MIT"
] | 41 | 2015-01-31T12:33:59.000Z | 2020-06-27T03:21:33.000Z | ################################################################################
#
# Copyright (c) 2012 ObjectLabs Corporation
#
# 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 restri... | 46.59375 | 80 | 0.696177 |
79530bad52f159ca7e354545eaaeaa0f45cc55ad | 1,842 | py | Python | homeassistant/components/binary_sensor/nest.py | instantchow/home-assistant | 6797365d4fd74328a0c9e961f652cfb37f48bc7d | [
"MIT"
] | null | null | null | homeassistant/components/binary_sensor/nest.py | instantchow/home-assistant | 6797365d4fd74328a0c9e961f652cfb37f48bc7d | [
"MIT"
] | null | null | null | homeassistant/components/binary_sensor/nest.py | instantchow/home-assistant | 6797365d4fd74328a0c9e961f652cfb37f48bc7d | [
"MIT"
] | null | null | null | """
Support for Nest Thermostat Binary Sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.nest/
"""
import logging
import socket
import homeassistant.components.nest as nest
from homeassistant.components.binary_sensor import BinarySen... | 34.111111 | 77 | 0.584148 |
79530cc4b963fe5449406b92a773f6dbc2d39f0a | 3,080 | py | Python | Android/NDK/android-ndk-r20b-win/prebuilt/windows-x86_64/share/gdb/system-gdbinit/elinos.py | X018/CCTOOL | 989af4d7edab82bf540400eb72eca4e7447d722c | [
"MIT"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | Android/NDK/android-ndk-r20b-win/prebuilt/windows-x86_64/share/gdb/system-gdbinit/elinos.py | X018/CCTOOL | 989af4d7edab82bf540400eb72eca4e7447d722c | [
"MIT"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | Android/NDK/android-ndk-r20b-win/prebuilt/windows-x86_64/share/gdb/system-gdbinit/elinos.py | X018/CCTOOL | 989af4d7edab82bf540400eb72eca4e7447d722c | [
"MIT"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | # Copyright (C) 2011-2016 Free Software Foundation, Inc.
# This program 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 of the License, or
# (at your option) any later version.
#
# This progr... | 33.478261 | 78 | 0.653571 |
79530d9dc9201209e6f12a5d435fd48828fa0427 | 3,595 | py | Python | tests/ssh/test_ssh_protocol.py | vrtdev/bless | cdcc506bf7cf7b71883bc459b9be190ac6b92638 | [
"Apache-2.0"
] | 1 | 2018-06-28T08:13:04.000Z | 2018-06-28T08:13:04.000Z | tests/ssh/test_ssh_protocol.py | vrtdev/bless | cdcc506bf7cf7b71883bc459b9be190ac6b92638 | [
"Apache-2.0"
] | 3 | 2017-03-06T21:34:12.000Z | 2017-12-11T19:03:43.000Z | tests/ssh/test_ssh_protocol.py | vrtdev/bless | cdcc506bf7cf7b71883bc459b9be190ac6b92638 | [
"Apache-2.0"
] | null | null | null | import pytest
from bless.ssh.protocol.ssh_protocol import pack_ssh_mpint, _hex_characters_length, \
pack_ssh_uint32, pack_ssh_uint64, pack_ssh_string
def test_strings():
strings = {'': '00000000'.decode('hex'), u'abc': '00000003616263'.decode('hex'),
b'1234': '0000000431323334'.decode('hex'), '... | 43.313253 | 100 | 0.651182 |
79530dba1f819e9200d230e72e5a216260d5fd4f | 431 | py | Python | main.py | RiyanDcosta/Python_Globals | 12be4baebc00d9cd5a51493d4eddcef307a6fd3f | [
"BSD-3-Clause"
] | 1 | 2021-02-02T04:31:45.000Z | 2021-02-02T04:31:45.000Z | main.py | RiyanDcosta/Python_Globals | 12be4baebc00d9cd5a51493d4eddcef307a6fd3f | [
"BSD-3-Clause"
] | null | null | null | main.py | RiyanDcosta/Python_Globals | 12be4baebc00d9cd5a51493d4eddcef307a6fd3f | [
"BSD-3-Clause"
] | 1 | 2021-02-02T04:31:50.000Z | 2021-02-02T04:31:50.000Z | # Copyright (c) <year>, <copyright holder>
# 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.
from classes import T1, T2
import time
def exec_func():
t1 = T1()
t2 = T2()
t1.get()
... | 17.24 | 72 | 0.605568 |
79530dbe22c1fd9f9495f321129088a815727720 | 1,974 | py | Python | ThesisAnalysis/scripts/reduction/spe_spectrum.py | watsonjj/ThesisAnalysis | 5bfae5700dd953fe5f44c56a0cf0a34241dd4c17 | [
"BSD-3-Clause"
] | null | null | null | ThesisAnalysis/scripts/reduction/spe_spectrum.py | watsonjj/ThesisAnalysis | 5bfae5700dd953fe5f44c56a0cf0a34241dd4c17 | [
"BSD-3-Clause"
] | null | null | null | ThesisAnalysis/scripts/reduction/spe_spectrum.py | watsonjj/ThesisAnalysis | 5bfae5700dd953fe5f44c56a0cf0a34241dd4c17 | [
"BSD-3-Clause"
] | null | null | null | from ThesisAnalysis import get_data, ThesisHDF5Writer
from ThesisAnalysis.files import spe_files
import numpy as np
import pandas as pd
from CHECLabPy.core.io import DL1Reader
from CHECLabPy.spectrum_fitters.gentile import GentileFitter
import warnings
from pandas.errors import PerformanceWarning
def process(file):
... | 28.608696 | 68 | 0.651469 |
79531013fba593787a179c8562b8f3a2fdf04bbb | 1,037 | py | Python | onnxruntime/__init__.py | csteegz/onnxruntime | a36810471b346ec862ac6e4de7f877653f49525e | [
"MIT"
] | 1 | 2020-07-12T15:23:49.000Z | 2020-07-12T15:23:49.000Z | onnxruntime/__init__.py | ajinkya933/onnxruntime | 0e799a03f2a99da6a1b87a2cd37facb420c482aa | [
"MIT"
] | null | null | null | onnxruntime/__init__.py | ajinkya933/onnxruntime | 0e799a03f2a99da6a1b87a2cd37facb420c482aa | [
"MIT"
] | 1 | 2020-09-09T06:55:51.000Z | 2020-09-09T06:55:51.000Z | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#--------------------------------------------------------------------------
"""
ONNX Runtime
enables high-performance evaluation of trained machine lea... | 47.136364 | 202 | 0.700096 |
7953119df8487c9daf0617cf940da3c546c51bc0 | 994 | py | Python | manage.py | wooyek/secure-share | b3b1dd6a03dc278e881e866a5554254523d33a81 | [
"MIT"
] | null | null | null | manage.py | wooyek/secure-share | b3b1dd6a03dc278e881e866a5554254523d33a81 | [
"MIT"
] | 1 | 2020-05-01T10:53:25.000Z | 2020-05-01T10:53:25.000Z | manage.py | wooyek/secure-share | b3b1dd6a03dc278e881e866a5554254523d33a81 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
import logging
import os
import sys
from pathlib import Path
logging.basicConfig(
format='%(asctime)s %(levelname)-7s %(thread)-5d %(filename)s:%(lineno)s | %(funcName)s | %(message)s',
# format='%(asctime)s... | 34.275862 | 118 | 0.716298 |
795311c0283eb8c807d539e54cb603b1dc5c2382 | 117,658 | py | Python | theano/gpuarray/elemwise.py | michaelosthege/aesara | 55c88832ba71f87c9612d573ede74a4c042ef570 | [
"BSD-3-Clause"
] | null | null | null | theano/gpuarray/elemwise.py | michaelosthege/aesara | 55c88832ba71f87c9612d573ede74a4c042ef570 | [
"BSD-3-Clause"
] | null | null | null | theano/gpuarray/elemwise.py | michaelosthege/aesara | 55c88832ba71f87c9612d573ede74a4c042ef570 | [
"BSD-3-Clause"
] | null | null | null | import copy
from io import StringIO
import numpy as np
from theano import scalar
from theano.gof.graph import Apply
from theano.gof.op import Op
from theano.gof.utils import MethodNotDefined
from theano.link.c.interface import HideC
from theano.scalar import Composite, Scalar
from theano.scalar.basic import complex_t... | 35.17429 | 117 | 0.458286 |
7953126f52b2dd2a836c29dfc8938147228ef5ae | 2,336 | py | Python | savecode/threeyears/idownserver/taskbackdealer/taskbackmanager.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2019-05-19T11:54:26.000Z | 2019-05-19T12:03:49.000Z | savecode/threeyears/idownserver/taskbackdealer/taskbackmanager.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 1 | 2020-11-27T07:55:15.000Z | 2020-11-27T07:55:15.000Z | savecode/threeyears/idownserver/taskbackdealer/taskbackmanager.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2021-09-06T18:06:12.000Z | 2021-12-31T07:44:43.000Z | """task dispath manager"""
# -*- coding:utf-8 -*-
import traceback
from datacontract import DataMatcher, InputData
from ..config_taskbackdeal import taskbackconfig
from ..servicemanager import DealerBase
from .taskbackdealerbase import TaskBackDealerBase
class TaskBackManager(DealerBase):
"""dispatch tasks"""... | 31.567568 | 74 | 0.559932 |
795312861c9e7f6c44564cd005aacadce888ba2e | 2,978 | py | Python | matminer/featurizers/site/tests/test_bonding.py | ncfrey/matminer | 5a688de8f2c7eaf5109d34d58ab7875cfe980e48 | [
"BSD-3-Clause-LBNL"
] | 326 | 2017-01-26T00:12:27.000Z | 2022-03-22T15:07:31.000Z | matminer/featurizers/site/tests/test_bonding.py | ncfrey/matminer | 5a688de8f2c7eaf5109d34d58ab7875cfe980e48 | [
"BSD-3-Clause-LBNL"
] | 578 | 2017-01-02T23:57:11.000Z | 2022-03-31T13:01:31.000Z | matminer/featurizers/site/tests/test_bonding.py | ncfrey/matminer | 5a688de8f2c7eaf5109d34d58ab7875cfe980e48 | [
"BSD-3-Clause-LBNL"
] | 182 | 2017-01-12T18:45:26.000Z | 2022-03-24T15:03:54.000Z | import unittest
import numpy as np
from pymatgen.analysis.local_env import VoronoiNN, CrystalNN
from matminer.featurizers.site.bonding import (
BondOrientationalParameter,
AverageBondLength,
AverageBondAngle,
)
from matminer.featurizers.site.tests.base import SiteFeaturizerTest
class BondingTest(SiteFea... | 34.229885 | 112 | 0.636333 |
7953166c979acc1b82a4a36e3f9f9393c433dccb | 25,833 | py | Python | python/ccxt/bibox.py | ZacharyATanenbaum/ccxt | 539a9e83dd2ca6a547103fd5910e0e776af5a48a | [
"MIT"
] | 2 | 2020-02-25T22:50:00.000Z | 2020-09-11T00:24:45.000Z | python/ccxt/bibox.py | ZacharyATanenbaum/ccxt | 539a9e83dd2ca6a547103fd5910e0e776af5a48a | [
"MIT"
] | 8 | 2018-09-04T05:28:15.000Z | 2018-12-21T08:10:35.000Z | python/ccxt/bibox.py | ZacharyATanenbaum/ccxt | 539a9e83dd2ca6a547103fd5910e0e776af5a48a | [
"MIT"
] | 1 | 2022-03-15T23:30:16.000Z | 2022-03-15T23:30:16.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
# -----------------------------------------------------------------------------
try:
basestri... | 37.989706 | 143 | 0.496187 |
79531698bcf5d0e7c61489b602808abdd6fccd1b | 1,159 | py | Python | solutions/03_01.py | glemaitre/IBIOM-M2-deep-learning | 001bf7834e57a7357326087d31049fc91ab8967f | [
"MIT"
] | null | null | null | solutions/03_01.py | glemaitre/IBIOM-M2-deep-learning | 001bf7834e57a7357326087d31049fc91ab8967f | [
"MIT"
] | null | null | null | solutions/03_01.py | glemaitre/IBIOM-M2-deep-learning | 001bf7834e57a7357326087d31049fc91ab8967f | [
"MIT"
] | null | null | null | def my_init(shape=(5, 5, 3, 3), dtype=None):
array = np.zeros(shape=shape)
array[2, 2] = np.eye(3)
return array
conv_strides_same = Sequential([
Conv2D(filters=3, kernel_size=5, strides=2,
padding="same", kernel_initializer=my_init,
input_shape=(None, None, 3))
])
conv_strides_va... | 34.088235 | 65 | 0.709232 |
795317d48d79f204ed3aa3c6aaee613f07389742 | 87 | py | Python | run1.py | kaaiian/use_roost | b7a53a4e79c0d2d3a9a575493cf215d23cacab8f | [
"MIT"
] | null | null | null | run1.py | kaaiian/use_roost | b7a53a4e79c0d2d3a9a575493cf215d23cacab8f | [
"MIT"
] | null | null | null | run1.py | kaaiian/use_roost | b7a53a4e79c0d2d3a9a575493cf215d23cacab8f | [
"MIT"
] | null | null | null | from use_roost__learn_on_aflow_script import run
if __name__ == '__main__':
run(1) | 21.75 | 48 | 0.770115 |
7953192a28b8d231a4bf96e92675d53b2f5558f2 | 55 | py | Python | camd/experiment/__init__.py | MuratAykol-TRI/CAMD-1 | ed331ad6706f36f092739152a06f156ed87fdae2 | [
"Apache-2.0"
] | null | null | null | camd/experiment/__init__.py | MuratAykol-TRI/CAMD-1 | ed331ad6706f36f092739152a06f156ed87fdae2 | [
"Apache-2.0"
] | null | null | null | camd/experiment/__init__.py | MuratAykol-TRI/CAMD-1 | ed331ad6706f36f092739152a06f156ed87fdae2 | [
"Apache-2.0"
] | null | null | null | from camd.experiment.base import Experiment, ATFSampler | 55 | 55 | 0.872727 |
7953197eead256ee4529ed71c3b1094b902f437a | 22,495 | py | Python | tables/scripts/ptrepack.py | robbmcleod/PyTables | 7a3181f4fbdbbb4a0786f17df6e3126b7581fc91 | [
"BSD-3-Clause"
] | null | null | null | tables/scripts/ptrepack.py | robbmcleod/PyTables | 7a3181f4fbdbbb4a0786f17df6e3126b7581fc91 | [
"BSD-3-Clause"
] | null | null | null | tables/scripts/ptrepack.py | robbmcleod/PyTables | 7a3181f4fbdbbb4a0786f17df6e3126b7581fc91 | [
"BSD-3-Clause"
] | 1 | 2020-05-26T08:28:03.000Z | 2020-05-26T08:28:03.000Z | # -*- coding: utf-8 -*-
########################################################################
#
# License: BSD
# Created: February 10, 2004
# Author: Francesc Alted - faltet@pytables.com
#
# $Id$
#
########################################################################
"""This utility lets you repack your data f... | 38.918685 | 81 | 0.593776 |
7953198a4dad26e4354a8cc05e281d355e69422b | 936 | py | Python | metroid/migrations/0001_initial.py | Bryhn-Bjolgerud/metroid | bb29a9cbd240b7c78643b74b017040079d381e24 | [
"MIT"
] | 23 | 2021-04-06T13:03:09.000Z | 2022-03-11T13:47:54.000Z | metroid/migrations/0001_initial.py | Bryhn-Bjolgerud/metroid | bb29a9cbd240b7c78643b74b017040079d381e24 | [
"MIT"
] | 4 | 2021-07-13T10:17:38.000Z | 2022-02-02T15:01:59.000Z | metroid/migrations/0001_initial.py | Bryhn-Bjolgerud/metroid | bb29a9cbd240b7c78643b74b017040079d381e24 | [
"MIT"
] | 2 | 2021-10-04T07:48:47.000Z | 2022-02-02T13:29:06.000Z | # Generated by Django 3.1.5 on 2021-02-01 18:06
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name='FailedMessage',
fields=[
('id', models.AutoField... | 33.428571 | 114 | 0.574786 |
79531aacdbb392d1efbc936d67f18d59e78771e7 | 1,645 | py | Python | test/rules/functions/test_find_in_map.py | j0lly/cfn-python-lint | 3032bab8fe190763bd0df1c34905c3528ceb411f | [
"MIT-0"
] | 1 | 2019-03-19T22:49:38.000Z | 2019-03-19T22:49:38.000Z | test/rules/functions/test_find_in_map.py | j0lly/cfn-python-lint | 3032bab8fe190763bd0df1c34905c3528ceb411f | [
"MIT-0"
] | null | null | null | test/rules/functions/test_find_in_map.py | j0lly/cfn-python-lint | 3032bab8fe190763bd0df1c34905c3528ceb411f | [
"MIT-0"
] | 1 | 2020-05-04T16:32:19.000Z | 2020-05-04T16:32:19.000Z | """
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to ... | 43.289474 | 87 | 0.731307 |
79531afeca35fa04b4b0e9adef01dced320a614c | 1,237 | py | Python | tests/unit/test_count_reads.py | mlin/idseq-dag | b474fd434b95a3a65b53c7d9f875449ca3f42172 | [
"MIT"
] | null | null | null | tests/unit/test_count_reads.py | mlin/idseq-dag | b474fd434b95a3a65b53c7d9f875449ca3f42172 | [
"MIT"
] | null | null | null | tests/unit/test_count_reads.py | mlin/idseq-dag | b474fd434b95a3a65b53c7d9f875449ca3f42172 | [
"MIT"
] | null | null | null | import os
import sys
import tempfile
import unittest
from idseq_dag.util.count import count_reads
from idseq_dag.exceptions import InvalidInputFileError
class TestCountReads(unittest.TestCase):
def test_count_reads(self):
expect_reads = {
os.path.join(os.path.dirname(__file__), "fixtures", "re... | 38.65625 | 102 | 0.632983 |
79531bdb2b60db1099d13fe57cde9dd4de12d9ce | 15,543 | py | Python | manimlib/mobject/svg/svg_mobject.py | sanjaydatasciencedojo/manim | 603a1a21dbb5eca325ed670f46ea72401a8edf1d | [
"MIT"
] | null | null | null | manimlib/mobject/svg/svg_mobject.py | sanjaydatasciencedojo/manim | 603a1a21dbb5eca325ed670f46ea72401a8edf1d | [
"MIT"
] | null | null | null | manimlib/mobject/svg/svg_mobject.py | sanjaydatasciencedojo/manim | 603a1a21dbb5eca325ed670f46ea72401a8edf1d | [
"MIT"
] | null | null | null | import itertools as it
import re
import string
import warnings
from xml.dom import minidom
from manimlib.constants import *
from manimlib.mobject.geometry import Circle, Rectangle, RoundedRectangle
from manimlib.mobject.types.vectorized_mobject import VGroup, VMobject
from manimlib.utils.color import *
from manimlib.u... | 36.400468 | 99 | 0.559802 |
79531c638474a32e2f3582865ee7ae37603ebe9d | 9,424 | py | Python | chapter13-mi-unsupervised/iic-13.5.1.py | gabrielmahia/obamAI | ba45f0a6efae793d7f5e356a1dbf5c6835a65dba | [
"MIT"
] | 1,291 | 2018-03-30T07:42:07.000Z | 2022-03-31T20:27:55.000Z | chapter13-mi-unsupervised/iic-13.5.1.py | gabrielmahia/obamAI | ba45f0a6efae793d7f5e356a1dbf5c6835a65dba | [
"MIT"
] | 18 | 2019-01-01T16:50:28.000Z | 2022-03-31T17:58:31.000Z | chapter13-mi-unsupervised/iic-13.5.1.py | gabrielmahia/obamAI | ba45f0a6efae793d7f5e356a1dbf5c6835a65dba | [
"MIT"
] | 798 | 2018-03-26T01:01:47.000Z | 2022-03-31T06:33:07.000Z | """Build, train and evaluate an IIC Model
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.keras.layers import Input, Dense, Flatten
from tensorflow.keras.models import Model
from tensorflow.keras.optimizers import Adam
from tensorflow.... | 36.246154 | 89 | 0.541384 |
79531c7a61143f17f43c5ca3d99d875d53e6ee91 | 4,093 | py | Python | app.py | matcha1024/flask-blog | a5594f3d579e16f324173fafc0f9fa9b2a96f3a4 | [
"MIT"
] | null | null | null | app.py | matcha1024/flask-blog | a5594f3d579e16f324173fafc0f9fa9b2a96f3a4 | [
"MIT"
] | null | null | null | app.py | matcha1024/flask-blog | a5594f3d579e16f324173fafc0f9fa9b2a96f3a4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import Flask, request, render_template, redirect
from flask_sqlalchemy import SQLAlchemy
from datetime import datetime
import os
import markdown
md = markdown.Markdown()
# My Global Ip Adress -> https://www.cman.jp/network/support/go_access.cgi
MY_IP = "123.45.67.89"
ap... | 29.65942 | 181 | 0.697288 |
79531d5c6268d2abe89b46f4c3286a2f15ecb54e | 1,964 | py | Python | setup.py | eonu/daze | af1a0cc37bf5519bd5f03245e32df9dd2be0c030 | [
"MIT"
] | null | null | null | setup.py | eonu/daze | af1a0cc37bf5519bd5f03245e32df9dd2be0c030 | [
"MIT"
] | 2 | 2021-01-20T07:17:51.000Z | 2021-03-01T10:53:36.000Z | setup.py | eonu/daze | af1a0cc37bf5519bd5f03245e32df9dd2be0c030 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import print_function
from setuptools import setup, find_packages
python_requires = '>=3.5,<3.10'
setup_requires = [
'Cython', # 'Cython>=0.28.5',
'numpy', # 'numpy>=1.17,<2',
'scipy' # 'scipy>=1.3,<2'
]
install_requires = [
'numpy', # 'nu... | 33.288136 | 137 | 0.613035 |
79531d8a7ac713e2f7045b881bef136edf6cbc4b | 5,013 | py | Python | pytext/models/seq_models/light_conv.py | yinghai/pytext | 5457c157d7a5f39bb96e2f207560cc52d9b98c83 | [
"BSD-3-Clause"
] | 6,199 | 2018-12-13T15:34:51.000Z | 2022-03-26T04:08:58.000Z | pytext/models/seq_models/light_conv.py | yinghai/pytext | 5457c157d7a5f39bb96e2f207560cc52d9b98c83 | [
"BSD-3-Clause"
] | 1,356 | 2018-12-13T15:50:33.000Z | 2022-03-03T20:45:58.000Z | pytext/models/seq_models/light_conv.py | yinghai/pytext | 5457c157d7a5f39bb96e2f207560cc52d9b98c83 | [
"BSD-3-Clause"
] | 842 | 2018-12-13T15:35:13.000Z | 2022-03-23T13:27:00.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from typing import Dict, Optional
import torch.jit
import torch.nn as nn
from pytext.config import ConfigBase
from torch import Tensor
from .base import PyTextIncrementalDecoderComponent
from .utils import unfold1d
class L... | 34.572414 | 103 | 0.597048 |
79531e438794c049f1c0530320403de955841e2c | 5,133 | py | Python | wpcv/plp/data/quadnet.py | Peiiii/wpcv | 56ed5327b921c52cd666c76bc204ac9ee5e5d150 | [
"MIT"
] | null | null | null | wpcv/plp/data/quadnet.py | Peiiii/wpcv | 56ed5327b921c52cd666c76bc204ac9ee5e5d150 | [
"MIT"
] | null | null | null | wpcv/plp/data/quadnet.py | Peiiii/wpcv | 56ed5327b921c52cd666c76bc204ac9ee5e5d150 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import division
import sys
import os
import config as cfg
sys.path.append(os.path.abspath('..'))
import cv2
import random, os, glob, json
from utils.centernet_utils import draw_points_heatmap
from torch.utils.data import dataset
import numpy as np
try:
import xml.etree.cElementTre... | 34.449664 | 120 | 0.598091 |
79531e879f092a35fa6893f669deb7e3c9b2ecc6 | 23,106 | py | Python | test/ltc_test_vectors.py | tonymorony/pywallet | fe51f2e8c53407001583c6496534bc8b0e221a4b | [
"MIT"
] | 16 | 2017-10-13T12:22:36.000Z | 2021-05-06T08:26:04.000Z | test/ltc_test_vectors.py | prestonw/pywallet | fe51f2e8c53407001583c6496534bc8b0e221a4b | [
"MIT"
] | 1 | 2019-03-01T06:05:41.000Z | 2019-03-01T06:05:41.000Z | test/ltc_test_vectors.py | prestonw/pywallet | fe51f2e8c53407001583c6496534bc8b0e221a4b | [
"MIT"
] | 15 | 2017-11-21T22:49:35.000Z | 2021-04-26T23:22:18.000Z | ################################################################################################
# Test Functions
################################################################################################
from lib import coin_types
from lib.base import *
coin = coin_types.ltc
class bip32_tests:
def __init_... | 65.82906 | 210 | 0.787241 |
79531fa9089551b8586bdca2a7af7b9ed8c4d8fc | 3,462 | py | Python | utils/misc.py | Tensor-Reloaded/Pytorch-Template | 32dd17885de711d46433d9d59f4924d7d29735a4 | [
"AFL-3.0"
] | 1 | 2021-12-29T10:52:08.000Z | 2021-12-29T10:52:08.000Z | utils/misc.py | Tensor-Reloaded/Pytorch-Template | 32dd17885de711d46433d9d59f4924d7d29735a4 | [
"AFL-3.0"
] | 13 | 2021-05-10T11:38:06.000Z | 2022-01-08T12:28:03.000Z | utils/misc.py | Tensor-Reloaded/Pytorch-Template | 32dd17885de711d46433d9d59f4924d7d29735a4 | [
"AFL-3.0"
] | null | null | null | import sys
import time
import os
import pathlib
import zipfile
from hydra.core.hydra_config import HydraConfig
TOTAL_BAR_LENGTH = 80
LAST_T = time.time()
BEGIN_T = LAST_T
def progress_bar(current, total, msg=None):
global LAST_T, BEGIN_T
if current == 0:
BEGIN_T = time.time() # Reset for new bar.
... | 30.637168 | 110 | 0.583478 |
79531fabab990cf534be190b44743f52f38ed532 | 679 | py | Python | setup.py | OtakoidTony/HentaiCrawler.py | 9c599036fd5754319641f0e865555bed7664cd05 | [
"MIT"
] | 1 | 2021-08-20T05:28:21.000Z | 2021-08-20T05:28:21.000Z | setup.py | OtakoidTony/HentaiCrawler.py | 9c599036fd5754319641f0e865555bed7664cd05 | [
"MIT"
] | null | null | null | setup.py | OtakoidTony/HentaiCrawler.py | 9c599036fd5754319641f0e865555bed7664cd05 | [
"MIT"
] | null | null | null | from setuptools import setup
with open("README.md", 'rt', encoding='UTF8') as rm:
long_description = rm.read()
setup(
name = "HentaiCrawler",
version = "0.1.0",
packages = ["HentaiCrawler",],
license = "MIT",
author='Rojiku, OtakoidTony, Park Hyun',
url = "https://github.com/OtakoidTony/He... | 28.291667 | 60 | 0.643594 |
7953204f7599a62db554bcbcf9b7ea17f5670645 | 1,743 | py | Python | src/python/CSVComparisons/parse_csv.py | carrliitos/NLPInformationExtraction | 64c9a72b80f0a80afeafdb3db625ac19449f7cf9 | [
"Apache-2.0"
] | 5 | 2020-09-25T07:44:21.000Z | 2022-03-16T06:55:21.000Z | src/python/CSVComparisons/parse_csv.py | carrliitos/NLPInformationExtraction | 64c9a72b80f0a80afeafdb3db625ac19449f7cf9 | [
"Apache-2.0"
] | null | null | null | src/python/CSVComparisons/parse_csv.py | carrliitos/NLPInformationExtraction | 64c9a72b80f0a80afeafdb3db625ac19449f7cf9 | [
"Apache-2.0"
] | 2 | 2020-12-17T03:03:49.000Z | 2021-03-20T12:00:41.000Z | import csv
from itertools import zip_longest
with open('TEST1.csv', 'r', newline='') as csv_file1, open('TEST2.csv', 'r', newline='') as csv_file2:
csv_reader1 = csv.reader(csv_file1)
csv_reader2 = csv.reader(csv_file2)
csv1_length = 0
csv2_length = 0
next(csv_reader1)
next(csv_reader2)
word1_array = []
wor... | 22.636364 | 102 | 0.601262 |
7953211c639cb7964b1e2af495941518988aee2c | 3,334 | py | Python | api/synchronous/example/locustfile.py | shelviaandi/CameraTraps | 5263a50261f29c1b0b1db522f3d96c9657fcdabc | [
"MIT"
] | null | null | null | api/synchronous/example/locustfile.py | shelviaandi/CameraTraps | 5263a50261f29c1b0b1db522f3d96c9657fcdabc | [
"MIT"
] | null | null | null | api/synchronous/example/locustfile.py | shelviaandi/CameraTraps | 5263a50261f29c1b0b1db522f3d96c9657fcdabc | [
"MIT"
] | 1 | 2020-10-26T15:33:25.000Z | 2020-10-26T15:33:25.000Z | import io
import json
import os
import random
from locust import HttpLocust, TaskSet, task
from requests_toolbelt.multipart import decoder
from PIL import Image
"""
Load testing using Locust.
Installation instructions: https://docs.locust.io/en/stable/quickstart.html
Once Locust is installed, to run the tests:
loc... | 33.34 | 135 | 0.621776 |
7953222cddce59d43f43fcc0845728b081afeafb | 3,107 | py | Python | sdk/synapse/azure-synapse-spark/setup.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | null | null | null | sdk/synapse/azure-synapse-spark/setup.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | 1 | 2021-06-07T06:37:28.000Z | 2021-06-07T06:37:28.000Z | sdk/synapse/azure-synapse-spark/setup.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 33.408602 | 91 | 0.606695 |
795322a34c37b5ced578163aa6c0503e8f579e38 | 5,410 | py | Python | tests/test_ikala.py | marypilataki/mirdata | 78981e1f1e7b8661e2d04de0dd5640981bbb1881 | [
"BSD-3-Clause"
] | null | null | null | tests/test_ikala.py | marypilataki/mirdata | 78981e1f1e7b8661e2d04de0dd5640981bbb1881 | [
"BSD-3-Clause"
] | null | null | null | tests/test_ikala.py | marypilataki/mirdata | 78981e1f1e7b8661e2d04de0dd5640981bbb1881 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
from mirdata import ikala, utils
from tests.test_utils import run_track_tests
def test_track():
default_trackid = '10161_chorus'
data_home = 'tests/resources/mir_datasets/iKala'
track = ikala.Track(default_trackid, data_home=data_home)
expected_attributes ... | 39.202899 | 88 | 0.707579 |
7953237757066a1e307a88164071dd53e0b5748e | 22 | py | Python | Data/__init__.py | himammz/GpTest | 66d6158fe3729cd26ee89b5d4531a45ef80b4bb4 | [
"Apache-2.0"
] | 1 | 2017-05-03T17:45:58.000Z | 2017-05-03T17:45:58.000Z | Data/__init__.py | LobnaMazhar/test-Python_heroku_webhook | cf51971646a3481cc89bbfef17e5816f8684448d | [
"Apache-2.0"
] | null | null | null | Data/__init__.py | LobnaMazhar/test-Python_heroku_webhook | cf51971646a3481cc89bbfef17e5816f8684448d | [
"Apache-2.0"
] | null | null | null | __all__ = ['Database'] | 22 | 22 | 0.681818 |
7953243c5927c2f75d4af44559f4faacd3d719b5 | 4,262 | py | Python | sdk/python/pulumi_azure/automation/get_string_variable.py | adnang/pulumi-azure | 32360d2f1e41e27d7fdd6522cb26d65e531f279f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/automation/get_string_variable.py | adnang/pulumi-azure | 32360d2f1e41e27d7fdd6522cb26d65e531f279f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/automation/get_string_variable.py | adnang/pulumi-azure | 32360d2f1e41e27d7fdd6522cb26d65e531f279f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class GetStr... | 39.100917 | 149 | 0.685594 |
795324cb64549f94a2e1e72de3f5747dcd82d838 | 3,049 | py | Python | octoprint.py | gaunab/octopi_gui | 1cc1d71d3b1acf0c0041c71a005de3dbd7667def | [
"BSD-3-Clause"
] | null | null | null | octoprint.py | gaunab/octopi_gui | 1cc1d71d3b1acf0c0041c71a005de3dbd7667def | [
"BSD-3-Clause"
] | null | null | null | octoprint.py | gaunab/octopi_gui | 1cc1d71d3b1acf0c0041c71a005de3dbd7667def | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
# http://isbullsh.it/2012/06/Rest-api-in-python/#conclusion
import requests, json
import os.path
class Api():
def __init__(self,url="localhost",api=None,apikeyfile=None):
""" Create new Connection-Object to octoprint
Params: - url (string)
Url of octoprint ... | 30.79798 | 88 | 0.516563 |
795325797bd22c251135eb538383fbd4bf408068 | 471 | py | Python | bungieapi/generated/components/schemas/destiny/definitions/animations.py | itemmanager/bungieapi | 0c4326f88ea0f28a1dcab683dc08c8d21c940fc1 | [
"MIT"
] | 5 | 2022-01-06T21:05:53.000Z | 2022-02-12T19:58:11.000Z | bungieapi/generated/components/schemas/destiny/definitions/animations.py | itemmanager/bungieapi | 0c4326f88ea0f28a1dcab683dc08c8d21c940fc1 | [
"MIT"
] | 8 | 2021-12-25T02:40:56.000Z | 2022-03-28T03:31:41.000Z | bungieapi/generated/components/schemas/destiny/definitions/animations.py | itemmanager/bungieapi | 0c4326f88ea0f28a1dcab683dc08c8d21c940fc1 | [
"MIT"
] | 1 | 2022-01-30T23:53:25.000Z | 2022-01-30T23:53:25.000Z | # generated by update to not change manually
import dataclasses as dt
import typing as t
from bungieapi.json import to_json
@dt.dataclass(frozen=True)
class DestinyAnimationReference:
anim_identifier: str
anim_name: str
path: str
def to_json(self) -> t.Mapping[str, t.Any]:
return {
... | 23.55 | 60 | 0.66242 |
795325a601defaa8695328190f3fe5332f3ccff6 | 841 | py | Python | Standard Library/socket/Sentdex/Three/client.py | shubhamnag14/Python-Documents | d3fee0ad90232b413f6ac1b562588fb255b79e42 | [
"Apache-2.0"
] | 2 | 2020-11-27T13:21:05.000Z | 2021-04-19T21:14:21.000Z | Standard Library/socket/Sentdex/Three/client.py | shubhamnag14/Python-Documents | d3fee0ad90232b413f6ac1b562588fb255b79e42 | [
"Apache-2.0"
] | null | null | null | Standard Library/socket/Sentdex/Three/client.py | shubhamnag14/Python-Documents | d3fee0ad90232b413f6ac1b562588fb255b79e42 | [
"Apache-2.0"
] | 1 | 2021-06-27T20:31:42.000Z | 2021-06-27T20:31:42.000Z | import socket
import pickle
HEADERSIZE = 10
# https://pythonprogramming.net/pickle-objects-sockets-tutorial-python-3/
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((socket.gethostname(), 1243))
while True:
full_msg = ''
new_msg = True
while True:
msg = s.recv(16)
if new_m... | 24.028571 | 73 | 0.581451 |
795326e519f2810aecf2b35a27faf6d6de5bf454 | 13,539 | py | Python | pycity_base/classes/demand/zone_parameters.py | RWTH-EBC/pyCity | 88c832aa647ceb8889abd8f851b7349c3366e30a | [
"MIT"
] | 11 | 2019-08-13T15:18:04.000Z | 2022-01-19T08:03:02.000Z | pycity_base/classes/demand/zone_parameters.py | RWTH-EBC/pyCity | 88c832aa647ceb8889abd8f851b7349c3366e30a | [
"MIT"
] | 29 | 2019-06-15T20:51:16.000Z | 2020-08-27T16:04:30.000Z | pycity_base/classes/demand/zone_parameters.py | RWTH-EBC/pyCity | 88c832aa647ceb8889abd8f851b7349c3366e30a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 24 21:22:29 2015
@author: tsz
Inputs:
A_f (section 6.4) - used area in m^2
"""
from __future__ import division
import numpy as np
import math
class ZoneParameters(object):
"""
This class holds all relevant parameters of a single zone as ... | 42.442006 | 103 | 0.572273 |
795329942ee80322beabc19262a95f119509000d | 543 | py | Python | player/migrations/0004_song_account.py | jacebrowning/virtualboombox | a4f0b2647b9f12e7e7ec4a3a245074225a35808d | [
"MIT"
] | 4 | 2020-01-03T06:55:18.000Z | 2021-03-23T18:40:39.000Z | player/migrations/0004_song_account.py | jacebrowning/virtualboombox | a4f0b2647b9f12e7e7ec4a3a245074225a35808d | [
"MIT"
] | 3 | 2019-12-30T21:21:47.000Z | 2021-06-10T19:49:40.000Z | player/migrations/0004_song_account.py | jacebrowning/virtualboombox | a4f0b2647b9f12e7e7ec4a3a245074225a35808d | [
"MIT"
] | 1 | 2021-03-23T18:40:55.000Z | 2021-03-23T18:40:55.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-29 23:50
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('player', '0003_auto_20170129_1726'),
]
operations ... | 24.681818 | 113 | 0.64825 |
79532a623fb15c766120b09ce43676730523f843 | 1,306 | py | Python | sleepypuppy/admin/assessment/models.py | hexlism/css_platform | 0c80cb314e7e3ecf73de2feec5349c04c0dd581b | [
"Apache-2.0"
] | 4 | 2016-07-28T08:07:40.000Z | 2019-08-25T16:48:05.000Z | sleepypuppy/admin/assessment/models.py | hexlism/css_platform | 0c80cb314e7e3ecf73de2feec5349c04c0dd581b | [
"Apache-2.0"
] | null | null | null | sleepypuppy/admin/assessment/models.py | hexlism/css_platform | 0c80cb314e7e3ecf73de2feec5349c04c0dd581b | [
"Apache-2.0"
] | 3 | 2016-07-29T06:16:49.000Z | 2019-08-25T16:43:43.000Z | # Copyright 2015 Netflix, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 34.368421 | 78 | 0.692956 |
79532b91149b17e53a54153552f70e7f3aeceace | 51,814 | py | Python | Lib/httplib.py | karkranikhil/python | a96b80dfda19ed4cdcc35b087fb8474757e34a93 | [
"bzip2-1.0.6"
] | 4 | 2020-05-18T22:35:54.000Z | 2021-08-24T02:50:38.000Z | Lib/httplib.py | karkranikhil/python | a96b80dfda19ed4cdcc35b087fb8474757e34a93 | [
"bzip2-1.0.6"
] | null | null | null | Lib/httplib.py | karkranikhil/python | a96b80dfda19ed4cdcc35b087fb8474757e34a93 | [
"bzip2-1.0.6"
] | 4 | 2020-05-18T02:51:32.000Z | 2022-02-25T21:54:30.000Z | r"""HTTP/1.1 client library
<intro stuff goes here>
<other stuff, too>
HTTPConnection goes through a number of "states", which define when a client
may legally make another request or fetch the response for a particular
request. This diagram details these state transitions:
(null)
|
| HTTPConnection(... | 35.537723 | 97 | 0.576813 |
79532c02497ec5f050ec2e5ec8803034d80fbfb0 | 4,297 | py | Python | avx512-jpeg-zizag/16bit-array/sse_generate.py | clayne/toys | ec06411e2d3b920403607888d4a573e41390ee5b | [
"BSD-2-Clause"
] | 2 | 2019-01-06T05:32:18.000Z | 2019-12-12T04:54:56.000Z | avx512-jpeg-zizag/16bit-array/sse_generate.py | clayne/toys | ec06411e2d3b920403607888d4a573e41390ee5b | [
"BSD-2-Clause"
] | null | null | null | avx512-jpeg-zizag/16bit-array/sse_generate.py | clayne/toys | ec06411e2d3b920403607888d4a573e41390ee5b | [
"BSD-2-Clause"
] | null | null | null | import sys
order = [
[ 0, 1, 8, 16, 9, 2, 3, 10],
[17, 24, 32, 25, 18, 11, 4, 5],
[12, 19, 26, 33, 40, 48, 41, 34],
[27, 20, 13, 6, 7, 14, 21, 28],
[35, 42, 49, 56, 57, 50, 43, 36],
[29, 22, 15, 23, 30, 37, 44, 51],
[58, 59, 52, 45, 38, 31, 39, 46],
[53, 60, 61, 54, 47, 55, 62,... | 27.722581 | 114 | 0.572958 |
79532c8ab6a0523e82acb426077d2533ad58310a | 4,024 | py | Python | alipay/aop/api/domain/DeliveryInfo.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/DeliveryInfo.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/DeliveryInfo.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
class DeliveryInfo(object):
def __init__(self):
self._city_code = None
self._consignee = None
self._contact_phone = None
self._detail_address = None
... | 30.717557 | 79 | 0.599404 |
79532dc7348c06e8a4fc8341682fe764848d78b5 | 3,111 | py | Python | src/lsqr_spark.py | chocjy/randomized-LS-solvers | 4c1c9211ee56a7344baebc6d36e33d72ccb620b9 | [
"Apache-2.0"
] | 12 | 2015-04-14T08:03:08.000Z | 2020-05-08T12:07:32.000Z | src/lsqr_spark.py | chocjy/randomized-LS-solvers | 4c1c9211ee56a7344baebc6d36e33d72ccb620b9 | [
"Apache-2.0"
] | null | null | null | src/lsqr_spark.py | chocjy/randomized-LS-solvers | 4c1c9211ee56a7344baebc6d36e33d72ccb620b9 | [
"Apache-2.0"
] | 3 | 2015-04-14T08:02:50.000Z | 2018-09-22T01:55:17.000Z | from math import sqrt, log
import numpy as np
from numpy.linalg import norm, lstsq
import time
import logging
logger = logging.getLogger(__name__)
def lsqr_spark( matrix_Ab, m, n, N, tol=1e-14, iter_lim=None):
"""
A simple version of LSQR on Spark
"""
x_iter = []
time_iter = []
t0 = time.tim... | 21.163265 | 70 | 0.472195 |
79532e44a6790c5e602fb7495a583ffe4db37a16 | 87 | py | Python | pricePrediction/predict/__main__.py | rsanchezgarc/CoPriNet | 33708a82746278270fd1aa600d4b562ea0f62c1c | [
"MIT"
] | null | null | null | pricePrediction/predict/__main__.py | rsanchezgarc/CoPriNet | 33708a82746278270fd1aa600d4b562ea0f62c1c | [
"MIT"
] | null | null | null | pricePrediction/predict/__main__.py | rsanchezgarc/CoPriNet | 33708a82746278270fd1aa600d4b562ea0f62c1c | [
"MIT"
] | 1 | 2022-03-02T16:21:16.000Z | 2022-03-02T16:21:16.000Z | from pricePrediction.predict.predict import main
if __name__ == '__main__':
main() | 21.75 | 48 | 0.747126 |
79532e9aa8ba7972b089a44884f9a7909d57f8ab | 297 | py | Python | utils/Serializable.py | Wanket/RnD-py | 20ffe47adf96b32272304a9f6b1f1a98598f721f | [
"MIT"
] | null | null | null | utils/Serializable.py | Wanket/RnD-py | 20ffe47adf96b32272304a9f6b1f1a98598f721f | [
"MIT"
] | null | null | null | utils/Serializable.py | Wanket/RnD-py | 20ffe47adf96b32272304a9f6b1f1a98598f721f | [
"MIT"
] | null | null | null | import json
from typing import TypeVar, Type
class Serializable:
def serialize(self) -> str:
return json.dumps(self.__dict__, default=lambda o: o.__dict__)
T = TypeVar("T")
@staticmethod
def deserialize(t: Type[T], data: str) -> T:
return t(**json.loads(data))
| 21.214286 | 70 | 0.646465 |
79532f4f9d0763cf835e2952a5d6048db714160d | 22 | py | Python | project/todo/models/__init__.py | dagothar/django-todo | dd360e873b2a92cb542e623d6cc43bcd6bfe3570 | [
"MIT"
] | null | null | null | project/todo/models/__init__.py | dagothar/django-todo | dd360e873b2a92cb542e623d6cc43bcd6bfe3570 | [
"MIT"
] | null | null | null | project/todo/models/__init__.py | dagothar/django-todo | dd360e873b2a92cb542e623d6cc43bcd6bfe3570 | [
"MIT"
] | null | null | null | from task import Task
| 11 | 21 | 0.818182 |
79532f90a8f34a234db2fdd0ad903b7758866a66 | 7,884 | py | Python | src/models/forecast/web_sarima.py | webclinic017/advisor_app | 9cdab4aca19e193850943ef8308bad5c5ea0415d | [
"MIT"
] | null | null | null | src/models/forecast/web_sarima.py | webclinic017/advisor_app | 9cdab4aca19e193850943ef8308bad5c5ea0415d | [
"MIT"
] | null | null | null | src/models/forecast/web_sarima.py | webclinic017/advisor_app | 9cdab4aca19e193850943ef8308bad5c5ea0415d | [
"MIT"
] | null | null | null | import warnings
from datetime import datetime, date
import pandas as pd
import numpy as np
from matplotlib.font_manager import FontProperties
import matplotlib.pyplot as plt
import itertools
import streamlit as st
import yfinance as yf
from statsmodels.tsa.stattools import adfuller
from statsmodels.tsa.seasonal import ... | 36.841121 | 99 | 0.601598 |
7953308dff57badc907c2979df0f52e41e1db2e0 | 36,007 | py | Python | python/ray/actor.py | arcelien/ray | 06c768823c781244bf0be183cc7876641df0c290 | [
"Apache-2.0"
] | 2 | 2019-10-23T07:31:45.000Z | 2019-10-23T07:31:47.000Z | python/ray/actor.py | arcelien/ray | 06c768823c781244bf0be183cc7876641df0c290 | [
"Apache-2.0"
] | null | null | null | python/ray/actor.py | arcelien/ray | 06c768823c781244bf0be183cc7876641df0c290 | [
"Apache-2.0"
] | 1 | 2019-05-23T20:33:09.000Z | 2019-05-23T20:33:09.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
import hashlib
import inspect
import logging
import six
import sys
import threading
from abc import ABCMeta, abstractmethod
from collections import namedtuple
from ray.function_manager import Func... | 41.578522 | 79 | 0.642097 |
7953328ea49bd41aab9343a58a6743607ded8af7 | 4,823 | py | Python | src/aprl/training/embedded_agents.py | fkamrani/adversarial-policies | 53e129c2083f6557ddc18dbb39e4e633a2d7ab9b | [
"MIT"
] | 211 | 2019-02-22T08:07:25.000Z | 2022-03-14T10:44:20.000Z | src/aprl/training/embedded_agents.py | fkamrani/adversarial-policies | 53e129c2083f6557ddc18dbb39e4e633a2d7ab9b | [
"MIT"
] | 51 | 2019-02-08T01:39:49.000Z | 2022-02-15T21:21:46.000Z | src/aprl/training/embedded_agents.py | fkamrani/adversarial-policies | 53e129c2083f6557ddc18dbb39e4e633a2d7ab9b | [
"MIT"
] | 41 | 2019-04-23T05:01:49.000Z | 2022-03-16T06:51:19.000Z | """Wrappers to embed a fixed agent in an environment."""
from aprl.envs.multi_agent import VecMultiWrapper, _tuple_pop, _tuple_space_filter
class CurryVecEnv(VecMultiWrapper):
"""Substitutes in a fixed agent for one of the players in a VecMultiEnv.
The agent's session will be closed, if it exists, when the ... | 41.93913 | 95 | 0.6695 |
795333cb2e4f4be8e83ada37895191f5d9f85f3c | 3,595 | py | Python | github/tests/PullRequestFile.py | dkavanagh/github-skill | 6c38e6d16b367cb86f758e7cdac4131377ce31ce | [
"MIT"
] | null | null | null | github/tests/PullRequestFile.py | dkavanagh/github-skill | 6c38e6d16b367cb86f758e7cdac4131377ce31ce | [
"MIT"
] | null | null | null | github/tests/PullRequestFile.py | dkavanagh/github-skill | 6c38e6d16b367cb86f758e7cdac4131377ce31ce | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | 74.895833 | 570 | 0.539638 |
7953341be29433e88cb161bda9eb159ca012f198 | 3,279 | py | Python | src/aiy/voicehat.py | zmsp/AIY-data-center-utility | c88b50e6ca952b1ba9deea5ea85ff38fd5ff42c1 | [
"Apache-2.0"
] | 2 | 2017-10-30T14:46:10.000Z | 2019-04-05T07:56:32.000Z | src/aiy/voicehat.py | zmsp/AIY-data-center-utility | c88b50e6ca952b1ba9deea5ea85ff38fd5ff42c1 | [
"Apache-2.0"
] | 10 | 2018-12-20T10:22:11.000Z | 2021-07-30T10:14:33.000Z | src/aiy/voicehat.py | zmsp/AIY-data-center-utility | c88b50e6ca952b1ba9deea5ea85ff38fd5ff42c1 | [
"Apache-2.0"
] | 2 | 2018-12-28T22:33:51.000Z | 2020-12-06T18:55:41.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 29.809091 | 82 | 0.695334 |
7953346f1d1d506e9341e5d25669ee2d5b56db8e | 2,412 | py | Python | models.py | saschalalala/paranoiabot | 82a97aa0050bbcf04438ea0a59b828d8f6794409 | [
"MIT"
] | null | null | null | models.py | saschalalala/paranoiabot | 82a97aa0050bbcf04438ea0a59b828d8f6794409 | [
"MIT"
] | null | null | null | models.py | saschalalala/paranoiabot | 82a97aa0050bbcf04438ea0a59b828d8f6794409 | [
"MIT"
] | null | null | null | from django.db import models
from enumfields import (
EnumField,
Enum
)
# Create your models here.
class Clearance(Enum):
IR = 0
R = 1
O = 2
Y = 3
G = 4
B = 5
I = 6
V = 7
U = 8
class PlayerManager(models.Manager):
"""
A default filter to avoid duplicate code ... | 26.217391 | 89 | 0.671642 |
795335030b9b7c588ca14e7aa039af8d65098f6c | 305 | py | Python | 2017/02/tax-bracket-proposals-20170224/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2017/02/tax-bracket-proposals-20170224/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2017/02/tax-bracket-proposals-20170224/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
import base_filters
COPY_GOOGLE_DOC_KEY = '1E1HTsh3C69-dbAp3h15bkYnyDemVLA4oHDOorvwrcUY'
USE_ASSETS = False
# Use these variables to override the default cache timeouts for this graphic
# DEFAULT_MAX_AGE = 20
# ASSETS_MAX_AGE = 300
JINJA_FILTER_FUNCTIONS = base_filters.FILTERS
| 21.785714 | 77 | 0.816393 |
7953359a28e65f7d7dc9e56b0bf213c30e3bae1f | 729 | py | Python | python/ch_08_coin_count_test.py | simonmonk/raspberrypi_cookbook_ed4 | dc320dfae4252f70c812af1dd7739d13d09615c1 | [
"MIT"
] | 7 | 2022-03-19T18:53:39.000Z | 2022-03-22T13:41:30.000Z | python/ch_08_coin_count_test.py | simonmonk/raspberrypi_cookbook_ed4 | dc320dfae4252f70c812af1dd7739d13d09615c1 | [
"MIT"
] | null | null | null | python/ch_08_coin_count_test.py | simonmonk/raspberrypi_cookbook_ed4 | dc320dfae4252f70c812af1dd7739d13d09615c1 | [
"MIT"
] | null | null | null | import cv2
from imutils.video import VideoStream
from imutils import resize
vs = VideoStream(src=0).start()
while True:
img = vs.read()
img = resize(img, width=800)
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
img = cv2.blur(img, (3, 3))
detected_circles = cv2.HoughCircles(img,
cv2.HOUG... | 23.516129 | 64 | 0.589849 |
7953360c6eac3b1880ea09f8e000c7cb49ba6fbe | 2,132 | py | Python | recognize.py | disalechinmay/Face-Recognition | ba7aad77ae595a33f1ee2e8ac1372ed11142cd97 | [
"Apache-2.0"
] | 1 | 2018-09-12T17:36:20.000Z | 2018-09-12T17:36:20.000Z | recognize.py | disalechinmay/FaceHash-Face-Recognition | ba7aad77ae595a33f1ee2e8ac1372ed11142cd97 | [
"Apache-2.0"
] | null | null | null | recognize.py | disalechinmay/FaceHash-Face-Recognition | ba7aad77ae595a33f1ee2e8ac1372ed11142cd97 | [
"Apache-2.0"
] | null | null | null | import cv2
from imutils import face_utils
import numpy as np
import argparse
import imutils
import dlib
import math
from PIL import Image
from subprocess import call
import os
import threading
import time
import tensorflow as tf
from tensorflow import keras
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import face... | 26.320988 | 92 | 0.721388 |
7953362be22a5b935a9d5e9f2141bdbc2e31298f | 3,944 | py | Python | elasticsearch/client/enrich.py | Conky5/elasticsearch-py | 93543a7fee51c0da6e898c9155bdb5f965c5bb53 | [
"Apache-2.0"
] | 4 | 2021-05-31T19:34:27.000Z | 2021-06-01T18:14:31.000Z | elasticsearch/client/enrich.py | Conky5/elasticsearch-py | 93543a7fee51c0da6e898c9155bdb5f965c5bb53 | [
"Apache-2.0"
] | 22 | 2021-05-15T00:01:49.000Z | 2022-02-26T00:08:00.000Z | elasticsearch/client/enrich.py | Conky5/elasticsearch-py | 93543a7fee51c0da6e898c9155bdb5f965c5bb53 | [
"Apache-2.0"
] | 1 | 2021-04-07T01:37:57.000Z | 2021-04-07T01:37:57.000Z | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use ... | 36.518519 | 106 | 0.649594 |
795337426c6e3f7084465848e1adc48e7d8cb836 | 3,397 | py | Python | airbyte-integrations/connectors/source-paystack/unit_tests/test_streams.py | onaio/airbyte | 38302e82a25f1b66742c3febfbff0668556920f2 | [
"MIT"
] | 22 | 2020-08-27T00:47:20.000Z | 2020-09-17T15:39:39.000Z | airbyte-integrations/connectors/source-paystack/unit_tests/test_streams.py | onaio/airbyte | 38302e82a25f1b66742c3febfbff0668556920f2 | [
"MIT"
] | 116 | 2020-08-27T01:11:27.000Z | 2020-09-19T02:47:52.000Z | airbyte-integrations/connectors/source-paystack/unit_tests/test_streams.py | onaio/airbyte | 38302e82a25f1b66742c3febfbff0668556920f2 | [
"MIT"
] | 1 | 2020-09-15T06:10:01.000Z | 2020-09-15T06:10:01.000Z | #
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#
from http import HTTPStatus
from unittest.mock import MagicMock
import pytest
from source_paystack.streams import PaystackStream
START_DATE = "2020-08-01T00:00:00Z"
@pytest.fixture
def patch_base_class(mocker):
# Mock abstract methods to enable insta... | 31.747664 | 89 | 0.732705 |
795339b57a0f47bcdcbd8eb45fb246d8d02f60a8 | 24,884 | py | Python | src/ggrc/views/converters.py | sfarbotka/ggrc-core | ef7aae6bc09ad2f53a2414f643572e07d689784a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc/views/converters.py | sfarbotka/ggrc-core | ef7aae6bc09ad2f53a2414f643572e07d689784a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc/views/converters.py | sfarbotka/ggrc-core | ef7aae6bc09ad2f53a2414f643572e07d689784a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2019 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Main view functions for import and export pages.
This module handles all view related function to import and export pages
including the import/export api endponts.
"""
# pylint: disable=inconsistent-ret... | 33.855782 | 89 | 0.702258 |
795339d53e58abe73283674189e762c74508a449 | 3,579 | py | Python | models/CausalNormClassifier.py | hyperconnect/LADE | cfe96b7ca6520f3410d4cae9cc10919e6114bbb9 | [
"BSD-3-Clause"
] | 78 | 2020-11-30T09:46:01.000Z | 2022-03-30T02:42:48.000Z | models/CausalNormClassifier.py | hyperconnect/LADE | cfe96b7ca6520f3410d4cae9cc10919e6114bbb9 | [
"BSD-3-Clause"
] | 18 | 2020-12-30T10:39:11.000Z | 2022-03-21T07:27:27.000Z | models/CausalNormClassifier.py | hyperconnect/LADE | cfe96b7ca6520f3410d4cae9cc10919e6114bbb9 | [
"BSD-3-Clause"
] | 8 | 2020-12-02T15:41:23.000Z | 2022-02-26T11:57:37.000Z | import torch
import torch.nn as nn
from utils import *
from os import path
import math
class Causal_Norm_Classifier(nn.Module):
def __init__(self, num_classes=1000, feat_dim=2048, use_effect=True, num_head=2, tau=16.0, alpha=3.0, gamma=0.03125, *args):
super(Causal_Norm_Classifier, self).__init__()
... | 42.607143 | 180 | 0.621403 |
795339f29dc25eabcba954c0ee0dac74019b153e | 8,170 | py | Python | dmarc_imap.py | sirio81/dmarc-monitoring | 372d66889246786c22b06bc9d777bd39b104c0d9 | [
"MIT"
] | null | null | null | dmarc_imap.py | sirio81/dmarc-monitoring | 372d66889246786c22b06bc9d777bd39b104c0d9 | [
"MIT"
] | null | null | null | dmarc_imap.py | sirio81/dmarc-monitoring | 372d66889246786c22b06bc9d777bd39b104c0d9 | [
"MIT"
] | null | null | null | import os
import imaplib
import email
import email.header
import re
import argparse
# Should we attempt validation of DKIM signatures on report emails?
# try:
# import dkim
# import dnspython
# DKIM_CHECK = True
# except ImportError:
# DKIM_CHECK = False
__all__ = ['ReportDownloader', 'IMAPException']
#... | 50.122699 | 154 | 0.586291 |
79533a2d2a1cac13cbc89cced298e81a245728f7 | 7,289 | py | Python | grtoolkit/Circuits/Phasors/__init__.py | ZenosParadox/grtoolkit | 2e34f151a78f57864e39e572c221ca4b73e48bb7 | [
"MIT"
] | 3 | 2020-02-02T14:33:30.000Z | 2020-07-29T00:27:46.000Z | grtoolkit/Circuits/Phasors/__init__.py | ZenosParadox/grtoolkit | 2e34f151a78f57864e39e572c221ca4b73e48bb7 | [
"MIT"
] | null | null | null | grtoolkit/Circuits/Phasors/__init__.py | ZenosParadox/grtoolkit | 2e34f151a78f57864e39e572c221ca4b73e48bb7 | [
"MIT"
] | 2 | 2020-02-02T14:33:32.000Z | 2022-03-21T14:33:34.000Z | from sympy import pi
from math import *
from cmath import *
# General expression for sinusoid:
# v(t) = Vm*sin(w*t + phi)
# where,
# phi = phase
# If comparing two sinusoids phase1 != phase2 then "out of phase".
# One sinusoid leads or lags by phase in radians or degrees.
# If phase difference = 0 then "in phase"
... | 26.60219 | 101 | 0.562491 |
79533a7f16d953e52c9ff412a06ddcf11be2153a | 157,885 | py | Python | sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protected_items_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protected_items_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protected_items_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 57.163287 | 369 | 0.693099 |
79533aa1fe1fad4323ee4ae1ae27e432ee084c79 | 959 | py | Python | scripts/WindowsVersion/AWC.py | Lyniat/AutomatedWallpaperChanger | 76093f4f9bd20d8fdfd497f6dfbe93d22b17feac | [
"MIT"
] | null | null | null | scripts/WindowsVersion/AWC.py | Lyniat/AutomatedWallpaperChanger | 76093f4f9bd20d8fdfd497f6dfbe93d22b17feac | [
"MIT"
] | null | null | null | scripts/WindowsVersion/AWC.py | Lyniat/AutomatedWallpaperChanger | 76093f4f9bd20d8fdfd497f6dfbe93d22b17feac | [
"MIT"
] | 1 | 2021-07-19T17:32:04.000Z | 2021-07-19T17:32:04.000Z | import os
import PySimpleGUI as sg
from gui import AWCGUI
from runtime import AWC
__author__ = "Marten Scheuck"
"""This runs the install process."""
#TODO: Make next and previous desktop wallpaper available
#TODO: Log when desktop wallpaper is change
def main():
"""This function runs the program"""
gui_in... | 23.390244 | 70 | 0.578728 |
79533b2feead96de85c7ce775025ba2298560df2 | 609 | py | Python | products/migrations/0008_auto_20210414_1630.py | KennyDaktyl/pieczatki-colop.pl | 25719c57a4cf42face23a034852c712e0ae7c20b | [
"MIT"
] | null | null | null | products/migrations/0008_auto_20210414_1630.py | KennyDaktyl/pieczatki-colop.pl | 25719c57a4cf42face23a034852c712e0ae7c20b | [
"MIT"
] | null | null | null | products/migrations/0008_auto_20210414_1630.py | KennyDaktyl/pieczatki-colop.pl | 25719c57a4cf42face23a034852c712e0ae7c20b | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-04-14 16:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0007_auto_20210412_1214'),
]
operations = [
migrations.AlterField(
model_name='colors',
name='class_text... | 25.375 | 88 | 0.599343 |
79533bf9f284ef1d7f325b4ec49d033459ac2152 | 786 | py | Python | leetcode/single_number_II_leetcode_137/single_number_II.py | Williano/Interview-Prep | 0ad688637215080c7e4d26c640d74c89227e7cfb | [
"MIT"
] | null | null | null | leetcode/single_number_II_leetcode_137/single_number_II.py | Williano/Interview-Prep | 0ad688637215080c7e4d26c640d74c89227e7cfb | [
"MIT"
] | null | null | null | leetcode/single_number_II_leetcode_137/single_number_II.py | Williano/Interview-Prep | 0ad688637215080c7e4d26c640d74c89227e7cfb | [
"MIT"
] | null | null | null | """
Leetcode No: 137
Title: Single Number II
Description:
Given an integer array nums where every element appears three times except
for one, which appears exactly once. Find the single element and return it.
You must implement a solution with a linear runtime complexity and use only
constant ex... | 21.243243 | 78 | 0.597964 |
79533cee6eb2b8f6cb163335e97b46187b7b9a8b | 8,359 | py | Python | pymic/net/net2d/cople_net.py | vincentme/PyMIC | 5cbbca7d0a19232be647086d4686ceea523f45ee | [
"Apache-2.0"
] | 147 | 2019-12-23T02:52:04.000Z | 2022-03-06T16:30:43.000Z | pymic/net/net2d/cople_net.py | vincentme/PyMIC | 5cbbca7d0a19232be647086d4686ceea523f45ee | [
"Apache-2.0"
] | 4 | 2020-12-18T12:47:21.000Z | 2021-05-21T02:18:01.000Z | pymic/net/net2d/cople_net.py | vincentme/PyMIC | 5cbbca7d0a19232be647086d4686ceea523f45ee | [
"Apache-2.0"
] | 32 | 2020-01-08T13:48:50.000Z | 2022-03-12T06:31:13.000Z | # -*- coding: utf-8 -*-
"""
Author: Guotai Wang
Date: 12 June, 2020
Implementation of of COPLENet for COVID-19 pneumonia lesion segmentation from CT images.
Reference:
G. Wang et al. A Noise-robust Framework for Automatic Segmentation of COVID-19 Pneumonia Lesions
from CT Images. IEEE Transactions on Medica... | 41.17734 | 113 | 0.6039 |
79533d0eb65e889ec8aa60424f545aaed81c95da | 525 | py | Python | pys60/bbdata/connectionstate.py | crutchwalkfactory/jaikuengine-mobile-client | c47100ec009d47a4045b3d98addc9b8ad887b132 | [
"MIT"
] | null | null | null | pys60/bbdata/connectionstate.py | crutchwalkfactory/jaikuengine-mobile-client | c47100ec009d47a4045b3d98addc9b8ad887b132 | [
"MIT"
] | null | null | null | pys60/bbdata/connectionstate.py | crutchwalkfactory/jaikuengine-mobile-client | c47100ec009d47a4045b3d98addc9b8ad887b132 | [
"MIT"
] | null | null | null | from bbdata.base import *
from bbdata.uid import *
CONNECTIONSTATE_TYPE = [ CONTEXT_UID_SENSORDATAFACTORY, 64, 1, 0 ]
class ConnectionState(BBCompound):
def __init__(self, name='connectionstate'):
super(BBCompound, self).__init__(name)
self.name = ShortString('name')
self.state = Int('state')
self.message =... | 26.25 | 66 | 0.746667 |
79533e3f5bf8fb9f6713cd3c82fd4fefe97b4c8b | 68 | py | Python | 2020/examples-in-class-2020-09-24/for_loop_example2.py | ati-ozgur/course-python | 38237d120043c07230658b56dc3aeb01c3364933 | [
"Apache-2.0"
] | 1 | 2021-02-04T16:59:11.000Z | 2021-02-04T16:59:11.000Z | 2020/examples-in-class-2020-09-24/for_loop_example2.py | ati-ozgur/course-python | 38237d120043c07230658b56dc3aeb01c3364933 | [
"Apache-2.0"
] | null | null | null | 2020/examples-in-class-2020-09-24/for_loop_example2.py | ati-ozgur/course-python | 38237d120043c07230658b56dc3aeb01c3364933 | [
"Apache-2.0"
] | 1 | 2019-10-30T14:37:48.000Z | 2019-10-30T14:37:48.000Z | start = 1
stop = 10
for index in range(start,stop):
print(index) | 17 | 31 | 0.676471 |
79533e4e47c9037c119100d9e267ebe23e9fa81b | 616 | py | Python | blog/mysite/blog/migrations/0004_post_tags.py | EssaAlshammri/django-by-example | d1a1cba9308d4f19bbb1228dbd191ad5540b2c78 | [
"MIT"
] | 3 | 2017-04-25T10:19:02.000Z | 2017-06-07T12:50:30.000Z | blog/mysite/blog/migrations/0004_post_tags.py | EssaAlshammri/django-by-example | d1a1cba9308d4f19bbb1228dbd191ad5540b2c78 | [
"MIT"
] | null | null | null | blog/mysite/blog/migrations/0004_post_tags.py | EssaAlshammri/django-by-example | d1a1cba9308d4f19bbb1228dbd191ad5540b2c78 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-20 18:38
from __future__ import unicode_literals
from django.db import migrations
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('taggit', '0002_auto_20150616_2121'),
('blog', '0003_auto_20170320_124... | 26.782609 | 162 | 0.646104 |
795340c9912642948b0953c9b7ef0df8f0277957 | 2,136 | py | Python | project/api/views.py | pjconnolly12/Flasktaskr | 70f54e92c6cc59b4b392379d2ea9c5d8a73d2dee | [
"MIT"
] | null | null | null | project/api/views.py | pjconnolly12/Flasktaskr | 70f54e92c6cc59b4b392379d2ea9c5d8a73d2dee | [
"MIT"
] | null | null | null | project/api/views.py | pjconnolly12/Flasktaskr | 70f54e92c6cc59b4b392379d2ea9c5d8a73d2dee | [
"MIT"
] | null | null | null | # project/api/views.py
from functools import wraps
from flask import flash, redirect, jsonify, \
session, url_for, Blueprint, make_response
from project import db
from project.models import Task
################
#### config ####
################
api_blueprint = Blueprint('api', __name__)
###################... | 26.04878 | 70 | 0.561798 |
7953412485dde982fa8d741724f7d3e410f9ce70 | 9,704 | py | Python | models/crabnet.py | kaaiian/KingCrabNet | 05ffbcc48cd692223c475ebd8ca758e01ded6521 | [
"MIT"
] | 1 | 2020-03-04T06:21:36.000Z | 2020-03-04T06:21:36.000Z | models/crabnet.py | kaaiian/KingCrabNet | 05ffbcc48cd692223c475ebd8ca758e01ded6521 | [
"MIT"
] | null | null | null | models/crabnet.py | kaaiian/KingCrabNet | 05ffbcc48cd692223c475ebd8ca758e01ded6521 | [
"MIT"
] | null | null | null | import numpy as np
import torch
from torch import nn
# %%
class AttentionBlock(nn.Module):
"""
This implements the multi-headed attention block
of the CrabNet architecture.
Parameters
----------
d_model: int
the number of expected features in the input (required, default=32).
nhea... | 33.232877 | 79 | 0.540293 |
7953412be5f3e29ec43af40f6a7a831c8e66269a | 3,994 | py | Python | astroquery/xmatch/tests/test_xmatch.py | astrocatalogs/astroquery | 9919a32cb027febcd73cd743efaae6754061a534 | [
"BSD-3-Clause"
] | 1 | 2020-04-18T23:47:09.000Z | 2020-04-18T23:47:09.000Z | astroquery/xmatch/tests/test_xmatch.py | astrocatalogs/astroquery | 9919a32cb027febcd73cd743efaae6754061a534 | [
"BSD-3-Clause"
] | null | null | null | astroquery/xmatch/tests/test_xmatch.py | astrocatalogs/astroquery | 9919a32cb027febcd73cd743efaae6754061a534 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os.path
import requests
from astropy.tests.helper import pytest
from astropy.io import ascii
from astropy.table import Table
from astropy.units import arcsec
from ...utils import commons
from ...utils.testing_tools import MockResponse
from ...xmat... | 33.847458 | 77 | 0.655233 |
7953414ad2e63a0b829aa71b9c2de91044d1b254 | 6,601 | py | Python | sdk/python/pulumi_azure_native/peering/v20200401/get_peering.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/peering/v20200401/get_peering.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/peering/v20200401/get_peering.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 33.507614 | 181 | 0.626875 |
79534294295df3eccf5c2d9a5606ce7bbac0dea8 | 389 | py | Python | test/syste_test_IEEE13bus_timeSeries/IEEE13bus.py | JonasVil/dssdata | bbc6ce7509dec39143d5202f11acbf5e977e7c06 | [
"MIT"
] | 4 | 2020-05-08T21:32:50.000Z | 2022-01-14T08:23:39.000Z | test/syste_test_IEEE13bus_timeSeries/IEEE13bus.py | julioolvera1/dssdata | 541bb4dc449c0035177ed09f00111ddf46d76b3d | [
"MIT"
] | 26 | 2020-04-06T17:11:31.000Z | 2020-05-04T14:50:50.000Z | test/syste_test_IEEE13bus_timeSeries/IEEE13bus.py | julioolvera1/dssdata | 541bb4dc449c0035177ed09f00111ddf46d76b3d | [
"MIT"
] | 12 | 2020-04-06T17:11:45.000Z | 2020-05-01T13:37:47.000Z | import opendssdirect as dss
path = "test/syste_test_IEEE13bus_timeSeries/IEEE13Nodeckt.dss"
dss.run_command(f"Compile {path}")
dss.run_command("Set Voltagebases=[115, 4.16, .48]")
dss.run_command("calcv")
dss.run_command("set mode=daily stepsize=5m hour = 0")
dss.Solution.Solve()
dss.run_command("Show Voltages LN Nod... | 29.923077 | 63 | 0.773779 |
795342f75b3e105f6872c521ee94c552a752bb5c | 1,621 | py | Python | Python/zzz_training_challenge/UdemyPythonPro/Chapter10_Cython/2_CythonCode/benchmarks/test_clipping.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | Python/zzz_training_challenge/UdemyPythonPro/Chapter10_Cython/2_CythonCode/benchmarks/test_clipping.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/UdemyPythonPro/Chapter10_Cython/2_CythonCode/benchmarks/test_clipping.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | '''Test code.
'''
import random
from timeit import Timer
import numpy as np
import fastvector
v = fastvector.VectorND([random.random() for _ in range(100_000)])
a = np.array([random.random() for _ in range(100_000)])
num_runs = 100
import_string = (
'''
from __main__ import v, a
import fastvector
import numpy ... | 27.016667 | 101 | 0.721777 |
795342f8422f69200ec25dc470335a2e84edeb59 | 10,482 | py | Python | container_sdk/api/cluster/cluster_client.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | container_sdk/api/cluster/cluster_client.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | container_sdk/api/cluster/cluster_client.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
import container_sdk.model.container.cluster_pb2
import container_sdk.api.cluster.delete_cluster_pb2
import google.protobuf.empty_pb2
import container_sdk.api.cluster.get_pb2
import container_sdk.api.cluster.import_resources_pb2
import container_sdk.api.cluster.list_p... | 36.778947 | 176 | 0.613623 |
7953439beb74850f7ebc720c50350daa5e788921 | 3,080 | py | Python | source/_static/code/aiyagari/aiyagari_household.py | tuttugu-ryo/lecture-source-py | 9ce84044c2cc421775ea63a004556d7ae3b4e504 | [
"BSD-3-Clause"
] | 56 | 2017-05-09T10:45:23.000Z | 2022-01-20T20:33:27.000Z | source/_static/code/aiyagari/aiyagari_household.py | tuttugu-ryo/lecture-source-py | 9ce84044c2cc421775ea63a004556d7ae3b4e504 | [
"BSD-3-Clause"
] | 7 | 2017-06-30T01:52:46.000Z | 2019-05-01T20:09:47.000Z | source/_static/code/aiyagari/aiyagari_household.py | tuttugu-ryo/lecture-source-py | 9ce84044c2cc421775ea63a004556d7ae3b4e504 | [
"BSD-3-Clause"
] | 117 | 2017-04-25T16:09:17.000Z | 2022-03-23T02:30:29.000Z | import numpy as np
from numba import jit
class Household:
"""
This class takes the parameters that define a household asset accumulation
problem and computes the corresponding reward and transition matrices R
and Q required to generate an instance of DiscreteDP, and thereby solve
for the optimal po... | 29.902913 | 94 | 0.548052 |
79534459aecf4d6d2f516997d6a7ef7c3927b1ef | 3,099 | py | Python | eero/eero.py | nguyenmp/eero-client | 96c5350dd42f9e3479478fb2905100085de6ca01 | [
"MIT"
] | 111 | 2017-10-20T14:46:59.000Z | 2022-03-17T12:40:51.000Z | eero/eero.py | nguyenmp/eero-client | 96c5350dd42f9e3479478fb2905100085de6ca01 | [
"MIT"
] | 13 | 2017-11-30T23:56:34.000Z | 2021-09-12T03:36:58.000Z | eero/eero.py | nguyenmp/eero-client | 96c5350dd42f9e3479478fb2905100085de6ca01 | [
"MIT"
] | 32 | 2017-10-23T17:26:23.000Z | 2022-02-24T02:57:56.000Z | from .client import Client
from .exception import ClientException
import re
class Eero(object):
def __init__(self, session):
# type(SessionStorage) -> ()
self.session = session
self.client = Client()
@property
def _cookie_dict(self):
if self.needs_login():
ret... | 35.62069 | 79 | 0.50597 |
795345197a69ddb717def7e02babb9caf970c41a | 16,196 | py | Python | #4_Misfit_Analysis.py | mshodge/FaultScarpAlgorithm | 25ddc9b063705ceb941c1bbe00ffe2ac1bb107cb | [
"MIT"
] | null | null | null | #4_Misfit_Analysis.py | mshodge/FaultScarpAlgorithm | 25ddc9b063705ceb941c1bbe00ffe2ac1bb107cb | [
"MIT"
] | 1 | 2021-01-05T09:04:09.000Z | 2021-01-05T09:04:09.000Z | #4_Misfit_Analysis.py | mshodge/FaultScarpAlgorithm | 25ddc9b063705ceb941c1bbe00ffe2ac1bb107cb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 21 14:02:54 2017 - v1.0 Finalised Fri Apr 13
@author: michaelhodge
"""
#A script to perform a misfit analysis between manual and algorithm methods
#to identify the best performing parameter space
#Loads packages required
import pickle
import panda... | 39.502439 | 197 | 0.756421 |
79534529aa317c5d0f92f6d91d078b8adba9eaa6 | 17,746 | py | Python | airspider/spider.py | AirSpiders/AirSpider | a56e4b1c640e19113b2b078c9a8e7f3a02b2f721 | [
"Apache-2.0"
] | 21 | 2020-03-20T09:01:24.000Z | 2021-06-30T02:00:56.000Z | airspider/spider.py | LRENZ/AirSpider | a56e4b1c640e19113b2b078c9a8e7f3a02b2f721 | [
"Apache-2.0"
] | null | null | null | airspider/spider.py | LRENZ/AirSpider | a56e4b1c640e19113b2b078c9a8e7f3a02b2f721 | [
"Apache-2.0"
] | 6 | 2020-03-30T09:24:22.000Z | 2020-10-30T16:45:02.000Z | #!/usr/bin/env python
import asyncio
import collections
import typing
import weakref
from datetime import datetime
from functools import reduce
from inspect import isawaitable
from signal import SIGINT, SIGTERM
from types import AsyncGeneratorType
from aiohttp import ClientSession
from airspider.exceptions import (... | 34.86444 | 114 | 0.594162 |
7953453359fb27d68a7c993da18092d61f2e0702 | 733 | py | Python | bookstore/books/signals.py | M0673N/bookstore | ec9477550ba46f9ffde3817cf676e97b0239263d | [
"MIT"
] | null | null | null | bookstore/books/signals.py | M0673N/bookstore | ec9477550ba46f9ffde3817cf676e97b0239263d | [
"MIT"
] | null | null | null | bookstore/books/signals.py | M0673N/bookstore | ec9477550ba46f9ffde3817cf676e97b0239263d | [
"MIT"
] | null | null | null | from bookstore.books.models import Book
import cloudinary.uploader
from django.db.models.signals import pre_save, pre_delete
from django.dispatch import receiver
@receiver(pre_save, sender=Book)
def delete_old_book_image_on_change(sender, instance, **kwargs):
try:
old_image = sender.objects.get(pk=instanc... | 31.869565 | 64 | 0.729877 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.