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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28e9b8d60042486bde24fc5f615a195203daee06 | 4,581 | py | Python | gammapy/estimators/tests/test_flux.py | Jaleleddine/gammapy | de9195df40fa5bbf8840cda4e7cd5e8cc5eaadbb | [
"BSD-3-Clause"
] | null | null | null | gammapy/estimators/tests/test_flux.py | Jaleleddine/gammapy | de9195df40fa5bbf8840cda4e7cd5e8cc5eaadbb | [
"BSD-3-Clause"
] | null | null | null | gammapy/estimators/tests/test_flux.py | Jaleleddine/gammapy | de9195df40fa5bbf8840cda4e7cd5e8cc5eaadbb | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
from numpy.testing import assert_allclose
import astropy.units as u
from gammapy.datasets import Datasets, SpectrumDatasetOnOff
from gammapy.estimators.flux import FluxEstimator
from gammapy.modeling.models import PowerLawS... | 32.489362 | 81 | 0.697446 |
f0c0cf68b9c0d6ee18b9b863e55c27aee0897cb4 | 10,184 | py | Python | tests/sitemaps_tests/urls/http.py | Lord-Elrond/django | 178109c1734ccc16386c3e3cbae1465c7a1b8ed8 | [
"BSD-3-Clause",
"0BSD"
] | 61,676 | 2015-01-01T00:05:13.000Z | 2022-03-31T20:37:54.000Z | tests/sitemaps_tests/urls/http.py | Lord-Elrond/django | 178109c1734ccc16386c3e3cbae1465c7a1b8ed8 | [
"BSD-3-Clause",
"0BSD"
] | 8,884 | 2015-01-01T00:12:05.000Z | 2022-03-31T19:53:11.000Z | tests/sitemaps_tests/urls/http.py | Lord-Elrond/django | 178109c1734ccc16386c3e3cbae1465c7a1b8ed8 | [
"BSD-3-Clause",
"0BSD"
] | 33,143 | 2015-01-01T02:04:52.000Z | 2022-03-31T19:42:46.000Z | from datetime import date, datetime
from django.conf.urls.i18n import i18n_patterns
from django.contrib.sitemaps import GenericSitemap, Sitemap, views
from django.http import HttpResponse
from django.urls import path
from django.utils import timezone
from django.views.decorators.cache import cache_page
from ..models ... | 28.849858 | 112 | 0.669776 |
4f36ef20c299731940e8f8ae851890ab2398b823 | 648 | py | Python | day25/module_np.py | Net-Mist/advent_of_code2021 | 124d773356bee2794294800de7673d5fac24db0a | [
"MIT"
] | 1 | 2022-01-03T09:21:33.000Z | 2022-01-03T09:21:33.000Z | day25/module_np.py | Net-Mist/advent_of_code2021 | 124d773356bee2794294800de7673d5fac24db0a | [
"MIT"
] | null | null | null | day25/module_np.py | Net-Mist/advent_of_code2021 | 124d773356bee2794294800de7673d5fac24db0a | [
"MIT"
] | null | null | null | import numpy as np
def move_right(map: np.ndarray) -> tuple:
translated_map = np.concatenate([map[:, -1:], map[:, :-1]], axis=1)
moved = (translated_map == 1) & (map == 0)
init_map_position = np.concatenate([moved[:, 1:], moved[:, :1]], axis=1)
map[init_map_position] = 0
map[moved] = 1
return ... | 32.4 | 76 | 0.589506 |
beca6f91fe4f5e56e00223a7cd610fc0480d2b3e | 14,036 | py | Python | python/digest_proteome.py | ostannick/maldb | 89b09f0a08366653f994e3eab5a187a61be7db3f | [
"MIT"
] | 2 | 2020-09-30T17:26:26.000Z | 2021-04-30T11:48:22.000Z | python/digest_proteome.py | ostannick/maldb | 89b09f0a08366653f994e3eab5a187a61be7db3f | [
"MIT"
] | null | null | null | python/digest_proteome.py | ostannick/maldb | 89b09f0a08366653f994e3eab5a187a61be7db3f | [
"MIT"
] | 1 | 2021-11-09T23:08:22.000Z | 2021-11-09T23:08:22.000Z | """Script to digest a proteome into peptides that may be detected by mass spectrometry.
Two JSON files are generated, a sequence file and a peptide file. In the peptide file, all mass values (fields "mz1" and "avg") are strings as they are represented here by Decimal objects, not floats, in order to maintain precision... | 58.240664 | 683 | 0.699701 |
1dfe9256e65c324e52e4679c4fdb2bfbfa3a3c60 | 1,969 | py | Python | ingestion/src/metadata/orm_profiler/metrics/static/min_length.py | ambassify/OpenMetadata | d959a49f8d997c8e65c4b10309b720b0060e1271 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/orm_profiler/metrics/static/min_length.py | ambassify/OpenMetadata | d959a49f8d997c8e65c4b10309b720b0060e1271 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/orm_profiler/metrics/static/min_length.py | ambassify/OpenMetadata | d959a49f8d997c8e65c4b10309b720b0060e1271 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Collate
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software... | 28.128571 | 87 | 0.726257 |
c039b8079b59e0a661607cdb5549846123a07456 | 2,325 | py | Python | scripts/discbracket_pred_postags.py | aghie/disco2labels | 5548118b2c741554284c7da8ee1996ea26d8bf73 | [
"MIT"
] | 3 | 2021-03-18T04:47:02.000Z | 2021-12-19T18:58:32.000Z | scripts/discbracket_pred_postags.py | aghie/disco2labels | 5548118b2c741554284c7da8ee1996ea26d8bf73 | [
"MIT"
] | null | null | null | scripts/discbracket_pred_postags.py | aghie/disco2labels | 5548118b2c741554284c7da8ee1996ea26d8bf73 | [
"MIT"
] | 1 | 2020-10-20T15:11:13.000Z | 2020-10-20T15:11:13.000Z | from argparse import ArgumentParser
import os
import nltk
from nltk.tree import Tree
def change_postags(tree, d_tags={}):
new_children = []
for idchild, child in enumerate(tree):
if type(child) == type(u'') or type(child) == type(""):
idx_word = int(child.split("=")[0])... | 29.807692 | 113 | 0.532043 |
64384634f5665352eea8912fc0a066ed4e364292 | 3,421 | py | Python | billingclient/openstack/common/apiclient/utils.py | nubeliu/billingclient | f2539e211ca049f3ddc9ce5680932f8f5eff7434 | [
"Apache-2.0"
] | 1 | 2018-01-04T16:20:51.000Z | 2018-01-04T16:20:51.000Z | billingclient/openstack/common/apiclient/utils.py | nubeliu/billingclient | f2539e211ca049f3ddc9ce5680932f8f5eff7434 | [
"Apache-2.0"
] | null | null | null | billingclient/openstack/common/apiclient/utils.py | nubeliu/billingclient | f2539e211ca049f3ddc9ce5680932f8f5eff7434 | [
"Apache-2.0"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 33.871287 | 78 | 0.609763 |
0090da101c1590ee432545a75a1a0aa8cf938dd0 | 130 | py | Python | photo/urls.py | margretmwangi/PGallery | 09f5cab276f40a226fc3b702bcd0f6913155f335 | [
"Unlicense",
"MIT"
] | null | null | null | photo/urls.py | margretmwangi/PGallery | 09f5cab276f40a226fc3b702bcd0f6913155f335 | [
"Unlicense",
"MIT"
] | 8 | 2021-03-19T04:11:05.000Z | 2021-09-22T19:06:38.000Z | photo/urls.py | margretmwangi/PGallery | 09f5cab276f40a226fc3b702bcd0f6913155f335 | [
"Unlicense",
"MIT"
] | null | null | null | from django.urls import path
from .import views
urlpatterns = [
path('',views.index),
path('new/', views.new),
]
| 13 | 28 | 0.607692 |
6bd1743525b790caf54e7731687b06534e87f1f8 | 13,488 | py | Python | keras/preprocessing/text.py | XDoodler/keras | 068a680480ebf27ecbe57f1406d60157b7d2df38 | [
"MIT"
] | 5 | 2018-04-06T00:05:56.000Z | 2019-05-11T20:09:23.000Z | keras/preprocessing/text.py | xuhdev/keras | 500fab77143c68f7c7e6db81d58e8c140c329b6e | [
"MIT"
] | null | null | null | keras/preprocessing/text.py | xuhdev/keras | 500fab77143c68f7c7e6db81d58e8c140c329b6e | [
"MIT"
] | 6 | 2018-04-27T11:26:29.000Z | 2019-09-11T02:46:53.000Z | # -*- coding: utf-8 -*-
"""Utilities for text input preprocessing.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import string
import sys
import warnings
from collections import OrderedDict
from hashlib import md5
import numpy as np
from six.moves imp... | 36.258065 | 93 | 0.545003 |
9f31671cc03b001c344ea96fa7801ed4792cdff4 | 2,010 | py | Python | examples/request-oauthlib.py | minrk/python-mwoauth | 24d0dbb094e144ec3ddeed8adc54011ae6582c6c | [
"MIT"
] | 7 | 2015-10-18T14:18:03.000Z | 2021-06-26T00:14:58.000Z | examples/request-oauthlib.py | minrk/python-mwoauth | 24d0dbb094e144ec3ddeed8adc54011ae6582c6c | [
"MIT"
] | 23 | 2016-05-06T22:15:57.000Z | 2021-10-17T19:38:54.000Z | examples/request-oauthlib.py | minrk/python-mwoauth | 24d0dbb094e144ec3ddeed8adc54011ae6582c6c | [
"MIT"
] | 10 | 2016-05-06T23:45:12.000Z | 2020-07-12T11:11:04.000Z | import json
import requests
from mwoauth import ConsumerToken, Handshaker
from requests_oauthlib import OAuth1
from six.moves import input # For compatibility between python 2 and 3
try:
creds_doc = json.load(open("credentials.do_not_commit.json"))
consumer_key = creds_doc['consumer_key']
consumer_secre... | 33.5 | 73 | 0.69602 |
7357eaf172ed6d9855c7088bc6da6f0fe3788cf7 | 572 | py | Python | Src/Clova/vendor/libpasteurize/fixes/fix_memoryview.py | NishiYusuke/Line-boot-award | d77f26b9109f3cba45be5906bcb6c9314974cd92 | [
"MIT"
] | 2 | 2020-08-17T07:52:48.000Z | 2020-12-18T16:39:32.000Z | Src/Clova/vendor/libpasteurize/fixes/fix_memoryview.py | NishiYusuke/Line-boot-award | d77f26b9109f3cba45be5906bcb6c9314974cd92 | [
"MIT"
] | 5 | 2020-12-15T23:40:14.000Z | 2022-02-23T15:43:18.000Z | Src/Clova/vendor/libpasteurize/fixes/fix_memoryview.py | NishiYusuke/Line-boot-award | d77f26b9109f3cba45be5906bcb6c9314974cd92 | [
"MIT"
] | 4 | 2019-05-16T09:57:33.000Z | 2021-07-14T12:31:21.000Z | u"""
Fixer for memoryview(s) -> buffer(s).
Explicit because some memoryview methods are invalid on buffer objects.
"""
from lib2to3 import fixer_base
from lib2to3.fixer_util import Name
class FixMemoryview(fixer_base.BaseFix):
explicit = True # User must specify that they want this.
PATTERN = ... | 26 | 72 | 0.61014 |
fe85853e022265626e25173aee0ff5607a09a347 | 8,948 | py | Python | src/fidesops/core/config.py | ethycasean/fidesops | 3acd69ea1fbdc2e3ba7fabff89ae240ded577b8e | [
"Apache-2.0"
] | null | null | null | src/fidesops/core/config.py | ethycasean/fidesops | 3acd69ea1fbdc2e3ba7fabff89ae240ded577b8e | [
"Apache-2.0"
] | null | null | null | src/fidesops/core/config.py | ethycasean/fidesops | 3acd69ea1fbdc2e3ba7fabff89ae240ded577b8e | [
"Apache-2.0"
] | null | null | null | # pylint: disable=C0115,C0116, E0213
import hashlib
import logging
import os
from typing import Dict, List, Optional, Union, Tuple, Any, MutableMapping
import bcrypt
import toml
from pydantic import (
AnyHttpUrl,
BaseSettings,
PostgresDsn,
ValidationError,
validator,
)
from pydantic.env_settings i... | 30.127946 | 93 | 0.651207 |
aa158d46fe3516463fc6085bc19ace78f0e028bf | 88 | py | Python | src/tracks/admin.py | craftbytesio/trackmate-backend | 0e62557d997a147137aadab0bdd582a9c8d2aa75 | [
"MIT"
] | null | null | null | src/tracks/admin.py | craftbytesio/trackmate-backend | 0e62557d997a147137aadab0bdd582a9c8d2aa75 | [
"MIT"
] | null | null | null | src/tracks/admin.py | craftbytesio/trackmate-backend | 0e62557d997a147137aadab0bdd582a9c8d2aa75 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Track
admin.site.register(Track)
| 14.666667 | 32 | 0.806818 |
ff95b5740237ab7faf656df6fbefa2b901de807f | 1,958 | py | Python | python3/koans/about_dictionaries.py | zb45659/python_koans | c7228bc75cecf575a061a1786ec5d9976f91748c | [
"MIT"
] | null | null | null | python3/koans/about_dictionaries.py | zb45659/python_koans | c7228bc75cecf575a061a1786ec5d9976f91748c | [
"MIT"
] | null | null | null | python3/koans/about_dictionaries.py | zb45659/python_koans | c7228bc75cecf575a061a1786ec5d9976f91748c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Based on AboutHashes in the Ruby Koans
#
from runner.koan import *
class AboutDictionaries(Koan):
def test_creating_dictionaries(self):
empty_dict = dict()
self.assertEqual(dict, type(empty_dict))
self.assertDictEqual({}, empty_dict)
... | 33.758621 | 120 | 0.618999 |
ccc5d1830045a475f902603c92f8e0bd5bd22384 | 2,095 | py | Python | LeetCode/replace-elements.py | amgad01/algorithms | 53eecf06e907cde806d4b78dc78fcd70d0271e3e | [
"MIT"
] | 1 | 2021-03-05T18:13:02.000Z | 2021-03-05T18:13:02.000Z | LeetCode/replace-elements.py | amgad01/algorithms | 53eecf06e907cde806d4b78dc78fcd70d0271e3e | [
"MIT"
] | null | null | null | LeetCode/replace-elements.py | amgad01/algorithms | 53eecf06e907cde806d4b78dc78fcd70d0271e3e | [
"MIT"
] | 1 | 2021-07-25T01:55:12.000Z | 2021-07-25T01:55:12.000Z | from nose.tools import assert_equal
def replace_elements(arr: [int]) -> [int]:
"""Given an array arr, replace every element in that array with the greatest element among the elements to its right
and replace the last element with -1. After doing so, return the array."""
if type(arr) is not list:
r... | 41.9 | 120 | 0.61957 |
56cd3edac3dcdd4a983ad6f7143a2a5960d10390 | 957 | py | Python | polls/models.py | dresl/django_choice_and_question | 70e7af7845b3913e76bdc6fe484b7c93118a58b5 | [
"Apache-2.0"
] | 1 | 2015-03-16T21:24:47.000Z | 2015-03-16T21:24:47.000Z | polls/models.py | dresl/django_choice_and_question | 70e7af7845b3913e76bdc6fe484b7c93118a58b5 | [
"Apache-2.0"
] | null | null | null | polls/models.py | dresl/django_choice_and_question | 70e7af7845b3913e76bdc6fe484b7c93118a58b5 | [
"Apache-2.0"
] | null | null | null | import datetime
from django.db import models
from django.utils import timezone
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def __unicode__(self): # __unicode__ on Python 2 ; __str__ on Python 3
... | 39.875 | 88 | 0.703239 |
7066f9582b7df47a7c0b7f76f60b5caef3a149dc | 5,451 | py | Python | adspygoogle/dfp/zsi/v201010/UserService_services.py | hockeyprincess/google-api-dfp-python | efa82a8d85cbdc90f030db9d168790c55bd8b12a | [
"Apache-2.0"
] | null | null | null | adspygoogle/dfp/zsi/v201010/UserService_services.py | hockeyprincess/google-api-dfp-python | efa82a8d85cbdc90f030db9d168790c55bd8b12a | [
"Apache-2.0"
] | null | null | null | adspygoogle/dfp/zsi/v201010/UserService_services.py | hockeyprincess/google-api-dfp-python | efa82a8d85cbdc90f030db9d168790c55bd8b12a | [
"Apache-2.0"
] | null | null | null | ##################################################
# UserService_services.py
# generated by ZSI.generate.wsdl2python
##################################################
from UserService_services_types import *
import urlparse, types
from ZSI.TCcompound import ComplexType, Struct
from ZSI import client
import ZSI
# ... | 36.583893 | 103 | 0.680976 |
2c65e998d34cc66e47cc0a26a7c12f8d3f1c16a9 | 91,077 | py | Python | selfdrive/car/hyundai/values.py | agegold/openpilot-7 | 35241560368c93ab2e8a32d7a28d641f92d1a261 | [
"MIT"
] | null | null | null | selfdrive/car/hyundai/values.py | agegold/openpilot-7 | 35241560368c93ab2e8a32d7a28d641f92d1a261 | [
"MIT"
] | null | null | null | selfdrive/car/hyundai/values.py | agegold/openpilot-7 | 35241560368c93ab2e8a32d7a28d641f92d1a261 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import Dict, List, Union
from cereal import car
from common.conversions import Conversions as CV
from selfdrive.car import dbc_dict
from selfdrive.car.docs_definitions import CarInfo
from common.params import Params
Ecu = car.CarParams.Ecu
# Steer torque limits
class CarC... | 121.923695 | 901 | 0.570781 |
a09219b333b06ba02e134ab0c25dbac1fca7ed27 | 953 | py | Python | retractions/doi.py | clbarnes/retractions | 86c7262b399149241c75b1df6e259f827cdfe4c3 | [
"MIT"
] | null | null | null | retractions/doi.py | clbarnes/retractions | 86c7262b399149241c75b1df6e259f827cdfe4c3 | [
"MIT"
] | null | null | null | retractions/doi.py | clbarnes/retractions | 86c7262b399149241c75b1df6e259f827cdfe4c3 | [
"MIT"
] | null | null | null | from typing import NamedTuple
class DOI(NamedTuple):
prefix: str
suffix: str
def __str__(self):
return self.to_str()
def to_str(self):
return "doi:" + self.to_minimal()
def to_minimal(self):
return f"{self.prefix}/{self.suffix}"
def to_url(self):
return "htt... | 24.435897 | 68 | 0.52256 |
051b428111d658a18ec498502eed50b6c66750ab | 79,997 | py | Python | python/ccxt/mexc.py | divyanshBuyhatke/ccxt | ffb7feb098d0ab7c662d522c9bca4199ae971415 | [
"MIT"
] | 60 | 2018-07-10T03:40:31.000Z | 2021-09-15T11:07:26.000Z | python/ccxt/mexc.py | divyanshBuyhatke/ccxt | ffb7feb098d0ab7c662d522c9bca4199ae971415 | [
"MIT"
] | 37 | 2018-06-29T15:58:21.000Z | 2019-06-23T07:29:39.000Z | python/ccxt/mexc.py | divyanshBuyhatke/ccxt | ffb7feb098d0ab7c662d522c9bca4199ae971415 | [
"MIT"
] | 39 | 2018-03-21T19:54:33.000Z | 2021-03-09T05:09:02.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
import hashlib
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import ... | 40.773191 | 249 | 0.459567 |
be9bdb764ae95d3fa49eff75df3d6b57cc158bc8 | 51,088 | py | Python | tests/test_process.py | jmsl31/coverage.py | f596816a0e62a78f3e75d0debb059541c3b090c2 | [
"Apache-2.0"
] | null | null | null | tests/test_process.py | jmsl31/coverage.py | f596816a0e62a78f3e75d0debb059541c3b090c2 | [
"Apache-2.0"
] | null | null | null | tests/test_process.py | jmsl31/coverage.py | f596816a0e62a78f3e75d0debb059541c3b090c2 | [
"Apache-2.0"
] | null | null | null | # coding: utf8
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Tests for process behavior of coverage.py."""
import glob
import os
import os.path
import re
import sys
import textwrap
import pytest
import co... | 36.780418 | 100 | 0.599123 |
8fa1060d190d889dbcf72de943fc2eabb83582ad | 8,437 | py | Python | model/FPN.py | Leyan529/ImageSegmentationPL | c41d6b4d2fa86620601dd4401775494d372f07b2 | [
"MIT"
] | null | null | null | model/FPN.py | Leyan529/ImageSegmentationPL | c41d6b4d2fa86620601dd4401775494d372f07b2 | [
"MIT"
] | null | null | null | model/FPN.py | Leyan529/ImageSegmentationPL | c41d6b4d2fa86620601dd4401775494d372f07b2 | [
"MIT"
] | null | null | null | '''FPN in PyTorch.
See the paper "Feature Pyramid Networks for Object Detection" for more details.
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import pytorch_lightning as pl
import os
from LightningFunc.step import *
from LightningFunc.accuracy import *
fr... | 37.665179 | 102 | 0.611592 |
3c2f3606fdc2d0fb959be03950c705953c3609b7 | 22,650 | py | Python | holoviews/tests/plotting/bokeh/test_pathplot.py | pyviz/holoviews | 22db2d1dd3b5d0b42a08f00645e04f693ad63dbb | [
"BSD-3-Clause"
] | 304 | 2019-02-07T16:41:57.000Z | 2019-11-08T23:43:33.000Z | holoviews/tests/plotting/bokeh/test_pathplot.py | pyviz/holoviews | 22db2d1dd3b5d0b42a08f00645e04f693ad63dbb | [
"BSD-3-Clause"
] | 689 | 2019-02-07T00:01:16.000Z | 2019-11-11T22:42:58.000Z | holoviews/tests/plotting/bokeh/test_pathplot.py | pyviz/holoviews | 22db2d1dd3b5d0b42a08f00645e04f693ad63dbb | [
"BSD-3-Clause"
] | 61 | 2019-02-08T17:06:30.000Z | 2019-11-02T21:32:50.000Z | import datetime as dt
import numpy as np
from holoviews.core import NdOverlay, HoloMap
from holoviews.core.options import Cycle
from holoviews.element import Path, Polygons, Contours
from holoviews.streams import PolyDraw
from holoviews.util.transform import dim
from .test_plot import TestBokehPlot, bokeh_renderer
... | 47.684211 | 120 | 0.545563 |
7fb053983ffd29776a09ecf23c508fa0a2231833 | 6,139 | py | Python | python/raspberrypi/DFRobot_Alcohol.py | DFRobot/DFRobot_Alcohol | 3ec93350ad3035439272680917a0f15ee4ce4519 | [
"MIT"
] | 1 | 2020-11-24T05:40:33.000Z | 2020-11-24T05:40:33.000Z | python/raspberrypi/DFRobot_Alcohol.py | DFRobot/DFRobot_Alcohol | 3ec93350ad3035439272680917a0f15ee4ce4519 | [
"MIT"
] | null | null | null | python/raspberrypi/DFRobot_Alcohol.py | DFRobot/DFRobot_Alcohol | 3ec93350ad3035439272680917a0f15ee4ce4519 | [
"MIT"
] | 1 | 2022-03-15T06:40:02.000Z | 2022-03-15T06:40:02.000Z | # -*- coding: utf-8 -*
'''!
@file DFRobot_Alcohol.py
@brief DFRobot_Alcohol Class infrastructure, implementation of underlying methods
@copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
@license The MIT License (MIT)
@author [ZhixinLiu](zhixin.liu@dfrobot.com)
@version V1.0
@date 2020-0... | 31.321429 | 85 | 0.630233 |
f7d93736ba75b719939c91301177fd6912b1ffe4 | 149 | py | Python | content_c_lists/ex19_reverse_list_order.py | Alyssonmach/learning-python-with-codes | e5ef70f3b56712e98449b3053eb34416b8025cb1 | [
"MIT"
] | 3 | 2020-11-28T08:26:54.000Z | 2020-12-23T18:37:37.000Z | content_c_lists/ex19_reverse_list_order.py | Alyssonmach/learning-python-with-codes | e5ef70f3b56712e98449b3053eb34416b8025cb1 | [
"MIT"
] | 1 | 2021-02-12T12:17:49.000Z | 2021-02-12T12:17:49.000Z | content_c_lists/ex19_reverse_list_order.py | Alyssonmach/learning-python-with-codes | e5ef70f3b56712e98449b3053eb34416b8025cb1 | [
"MIT"
] | null | null | null | import sys
sys.path.append('../implementations/')
from implementations.cars import cars
print(cars)
cars.reverse() # reverse order list
print(cars) | 18.625 | 38 | 0.771812 |
2fcd7795794f3c580e2f46d8067ad6636a50734b | 2,271 | py | Python | Day14/day14.py | rnegrin90/AdventOfCode2017 | 2746d6c402cf00d1d5af353ffa9f9d44f6b1c7d1 | [
"MIT"
] | null | null | null | Day14/day14.py | rnegrin90/AdventOfCode2017 | 2746d6c402cf00d1d5af353ffa9f9d44f6b1c7d1 | [
"MIT"
] | null | null | null | Day14/day14.py | rnegrin90/AdventOfCode2017 | 2746d6c402cf00d1d5af353ffa9f9d44f6b1c7d1 | [
"MIT"
] | null | null | null | from Day10.day10 import get_dense_hash, generate_from_ascii
import Day10
def to_bit_array(input_list):
result = list()
for element in input_list:
result.append('{0:08b}'.format(element))
return map(int, ''.join(result))
def bit_result(list):
return to_bit_array(get_dense_hash(list))
def co... | 25.516854 | 106 | 0.593131 |
1bed2563a5ea54fd45d2c9e4bb60a29ba7bb224b | 3,467 | py | Python | img2txt/img_processing.py | HungThinhPhung/Miscellaneous | dee5c6551a8580510c3c4e54087d38feb995d4d4 | [
"MIT"
] | null | null | null | img2txt/img_processing.py | HungThinhPhung/Miscellaneous | dee5c6551a8580510c3c4e54087d38feb995d4d4 | [
"MIT"
] | null | null | null | img2txt/img_processing.py | HungThinhPhung/Miscellaneous | dee5c6551a8580510c3c4e54087d38feb995d4d4 | [
"MIT"
] | null | null | null | from os import listdir
from os.path import isfile, join
import matplotlib.pylab as plt
from PIL import Image
import numpy as np
import pytesseract
import cv2
def get_list_file(directory):
files = [f for f in listdir(directory) if isfile(join(directory, f))]
files.sort()
return files
def get_distance(x, ... | 27.736 | 104 | 0.53043 |
fe2a03b03c095323141b1122f02e7ddaf5a619fb | 9,177 | py | Python | ci/build_windows.py | sandutsar/incubator-mxnet | 3ae7ddfd9c99f40a33c4cb716b3810e5463b810a | [
"Apache-2.0",
"MIT"
] | 1 | 2021-06-17T12:59:24.000Z | 2021-06-17T12:59:24.000Z | ci/build_windows.py | sandutsar/incubator-mxnet | 3ae7ddfd9c99f40a33c4cb716b3810e5463b810a | [
"Apache-2.0",
"MIT"
] | 4 | 2021-03-30T13:16:50.000Z | 2021-10-04T08:49:33.000Z | ci/build_windows.py | sandutsar/incubator-mxnet | 3ae7ddfd9c99f40a33c4cb716b3810e5463b810a | [
"Apache-2.0",
"MIT"
] | 1 | 2019-12-11T19:22:13.000Z | 2019-12-11T19:22:13.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache Licens... | 31.536082 | 123 | 0.600305 |
79b406b22ad4f550fa278e43bdb554bde3426a40 | 2,750 | py | Python | pynames/from_list_generator.py | FrBrGeorge/pynames | 52773059846cad714d0107f65dcccc9b4ef234f9 | [
"BSD-3-Clause"
] | 19 | 2015-03-28T08:57:04.000Z | 2016-06-18T07:09:04.000Z | pynames/from_list_generator.py | FrBrGeorge/pynames | 52773059846cad714d0107f65dcccc9b4ef234f9 | [
"BSD-3-Clause"
] | 10 | 2015-02-10T15:38:16.000Z | 2016-06-28T04:55:20.000Z | pynames/from_list_generator.py | FrBrGeorge/pynames | 52773059846cad714d0107f65dcccc9b4ef234f9 | [
"BSD-3-Clause"
] | 6 | 2015-02-09T17:41:40.000Z | 2016-06-17T07:19:17.000Z | # coding: utf-8
from __future__ import unicode_literals
import json
import random
from pynames.relations import GENDER, LANGUAGE, LANGUAGE_FORMS_LANGTH
from pynames.names import Name
from pynames.base import BaseGenerator
from pynames import exceptions
class FromListGenerator(BaseGenerator):
SOURCE = None
... | 38.194444 | 123 | 0.649818 |
16773d5ddb872f38226d6b2c09eeac751fee61d8 | 1,475 | py | Python | preprocessing/build_search_index.py | RobinRojowiec/intent-recognition-in-doctor-patient-interviews | b91c7a9f3ad70edd0f39b56e3219f48d1fcf2078 | [
"Apache-2.0"
] | null | null | null | preprocessing/build_search_index.py | RobinRojowiec/intent-recognition-in-doctor-patient-interviews | b91c7a9f3ad70edd0f39b56e3219f48d1fcf2078 | [
"Apache-2.0"
] | null | null | null | preprocessing/build_search_index.py | RobinRojowiec/intent-recognition-in-doctor-patient-interviews | b91c7a9f3ad70edd0f39b56e3219f48d1fcf2078 | [
"Apache-2.0"
] | 1 | 2021-11-24T18:48:47.000Z | 2021-11-24T18:48:47.000Z | """
IDE: PyCharm
Project: simulating-doctor-patient-interviews-using-neural-networks
Author: Robin
Filename: build_search_index
Date: 26.04.2019
Loads the transcripts in JSON format and stores them in a search index based on Whoosh
"""
from collections import defaultdict
from common.paths import SEARCH_INDEX_PATH, RO... | 33.522727 | 95 | 0.703051 |
b894eb370bf875e6d29cca38a9f78ec714e8b515 | 30,050 | py | Python | etl/config_deaths_week.py | icane/demographic-indicators | b1c394a4497e8e4c0189bf4c0518ce38fb873d4c | [
"Apache-2.0"
] | null | null | null | etl/config_deaths_week.py | icane/demographic-indicators | b1c394a4497e8e4c0189bf4c0518ce38fb873d4c | [
"Apache-2.0"
] | 1 | 2022-01-18T11:01:29.000Z | 2022-01-18T11:01:29.000Z | etl/config_deaths_week.py | icane/demographic-indicators | b1c394a4497e8e4c0189bf4c0518ce38fb873d4c | [
"Apache-2.0"
] | null | null | null | from beautifuldict.baseconfig import Baseconfig
from etl.config_common import common_cfg
from decouple import config
params = {
'file': 'Datos_carga_semanal_demo.xlsx',
'series': {
'mortalidad_total_base': {
'sheet': 'Defunciones semanas',
'label': 'Dato base',
'c... | 43.424855 | 108 | 0.487454 |
1503ae586a3fb17d20806f235b21ed1aee4f356a | 34,214 | py | Python | yt_dlp/extractor/soundcloud.py | renalid/yt-dlp | 0d32e124c69c5d53eb9dd286aa6147ec4cf52e54 | [
"Unlicense"
] | 1 | 2021-10-14T20:14:11.000Z | 2021-10-14T20:14:11.000Z | yt_dlp/extractor/soundcloud.py | renalid/yt-dlp | 0d32e124c69c5d53eb9dd286aa6147ec4cf52e54 | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/soundcloud.py | renalid/yt-dlp | 0d32e124c69c5d53eb9dd286aa6147ec4cf52e54 | [
"Unlicense"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
import itertools
import re
import json
# import random
from .common import (
InfoExtractor,
SearchInfoExtractor
)
from ..compat import (
compat_HTTPError,
compat_kwargs,
compat_str,
)
from ..utils import (
error_to_compat_str,
Extract... | 37.680617 | 195 | 0.518969 |
97540c4973b3a0c59d63ab208341ff12536e476a | 10,331 | py | Python | pgsqltoolsservice/hosting/json_reader.py | sergb213/pgtoolsservice | 6296a207e7443fe4ebd5c91d837c033ee7886cab | [
"MIT"
] | null | null | null | pgsqltoolsservice/hosting/json_reader.py | sergb213/pgtoolsservice | 6296a207e7443fe4ebd5c91d837c033ee7886cab | [
"MIT"
] | null | null | null | pgsqltoolsservice/hosting/json_reader.py | sergb213/pgtoolsservice | 6296a207e7443fe4ebd5c91d837c033ee7886cab | [
"MIT"
] | 1 | 2020-07-30T11:46:44.000Z | 2020-07-30T11:46:44.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 42.167347 | 117 | 0.602168 |
407423a42384ab38793d3b5a6d298b5c4ff6db71 | 659 | py | Python | authors/apps/articles/tests/test_tag_article.py | andela/ah-backend-zeus | 44e2f554c4a7a10c06bd3c7be42fc91571c09f29 | [
"BSD-3-Clause"
] | 1 | 2019-03-22T09:13:35.000Z | 2019-03-22T09:13:35.000Z | authors/apps/articles/tests/test_tag_article.py | andela/ah-backend-zeus | 44e2f554c4a7a10c06bd3c7be42fc91571c09f29 | [
"BSD-3-Clause"
] | 13 | 2018-11-27T16:48:25.000Z | 2021-06-10T21:00:19.000Z | authors/apps/articles/tests/test_tag_article.py | andela/ah-backend-zeus | 44e2f554c4a7a10c06bd3c7be42fc91571c09f29 | [
"BSD-3-Clause"
] | 9 | 2018-11-23T11:10:24.000Z | 2019-04-04T11:04:33.000Z | from rest_framework.test import APIClient
from .base_test import BaseTest
from rest_framework import status
class TestTagArticle(BaseTest):
def test_create_article_with_tags(self):
reponse = self.client.post(
'/api/articles/',
data={
"article": {
... | 31.380952 | 70 | 0.552352 |
5b2ceb8d1ab5efb94ddc2b984b21bd9f559faba6 | 14,278 | py | Python | examples/mnist/extract_features/feature+visualization.py | kl456123/caffe | 472d6137fbbd0e22a1bf3e21367b4cad59a10c40 | [
"BSD-2-Clause"
] | null | null | null | examples/mnist/extract_features/feature+visualization.py | kl456123/caffe | 472d6137fbbd0e22a1bf3e21367b4cad59a10c40 | [
"BSD-2-Clause"
] | null | null | null | examples/mnist/extract_features/feature+visualization.py | kl456123/caffe | 472d6137fbbd0e22a1bf3e21367b4cad59a10c40 | [
"BSD-2-Clause"
] | null | null | null |
# coding: utf-8
import numpy as np
import caffe
import os
import matplotlib.pyplot as plt
# get_ipython().magic(u'matplotlib inline')
# set display defaults
plt.rcParams['figure.figsize'] = (10, 10) # large images
# don't interpolate: show square pixels
plt.rcParams['image.interpolation'] = 'nearest'
# use ... | 36.055556 | 113 | 0.563314 |
77779d7ed3be0d81a1f6c560fc48a35ad960b5cc | 3,395 | py | Python | django/api/keycloak_authentication.py | bcgov/cthub | b356146ac3d4ed903d1371b5f01a0c109170947c | [
"Apache-2.0"
] | 1 | 2021-12-05T22:11:20.000Z | 2021-12-05T22:11:20.000Z | django/api/keycloak_authentication.py | bcgov/cthub | b356146ac3d4ed903d1371b5f01a0c109170947c | [
"Apache-2.0"
] | 5 | 2021-09-24T16:54:38.000Z | 2022-01-22T22:08:38.000Z | django/api/keycloak_authentication.py | bcgov/cthub | b356146ac3d4ed903d1371b5f01a0c109170947c | [
"Apache-2.0"
] | 2 | 2021-10-19T17:26:34.000Z | 2021-12-05T22:12:56.000Z | from keycloak import KeycloakOpenID
from django.conf import settings
from rest_framework import authentication, exceptions
class KeycloakAuthentication(authentication.BaseAuthentication):
def authenticate(self, request):
auth = request.headers.get('Authorization', None)
if not auth:
... | 33.284314 | 76 | 0.531075 |
8c20b3704d04faf62d0e36bc5254472fd8990dc1 | 31 | py | Python | FociNet.py | cellimnet/FociNet | e4470ac898e40b7e42c2bd357494941d8bc22624 | [
"Apache-2.0"
] | 5 | 2020-07-27T12:41:30.000Z | 2022-03-13T02:15:45.000Z | FociNet.py | cellimnet/FociNet | e4470ac898e40b7e42c2bd357494941d8bc22624 | [
"Apache-2.0"
] | null | null | null | FociNet.py | cellimnet/FociNet | e4470ac898e40b7e42c2bd357494941d8bc22624 | [
"Apache-2.0"
] | null | null | null | import UNet_pre
import VGG_pre
| 10.333333 | 15 | 0.870968 |
554537f3843881f30a0912a439e8d0c3dec01012 | 3,188 | py | Python | test/countries/test_estonia.py | hugovk/python-holidays | e22c667a159c959d81b512cc354910fc5c6653a9 | [
"MIT"
] | 48 | 2016-11-22T09:18:50.000Z | 2018-01-14T14:06:49.000Z | test/countries/test_estonia.py | hugovk/python-holidays | e22c667a159c959d81b512cc354910fc5c6653a9 | [
"MIT"
] | 59 | 2016-12-03T15:52:36.000Z | 2018-01-16T09:37:15.000Z | test/countries/test_estonia.py | hugovk/python-holidays | e22c667a159c959d81b512cc354910fc5c6653a9 | [
"MIT"
] | 51 | 2016-11-25T14:53:55.000Z | 2018-01-16T09:58:56.000Z | # -*- coding: utf-8 -*-
# python-holidays
# ---------------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: dr-prodigy <maurizio.... | 36.643678 | 78 | 0.679109 |
f2ec2320a6307a8c886805584906641f23fbfbe8 | 1,018 | py | Python | users/migrations/0002_auto_20211212_0856.py | herschel-ma/BlogApp | 30182bafea9eb3083759d5c4b97389e6efa115bb | [
"MIT"
] | 2 | 2021-11-08T08:03:08.000Z | 2021-12-17T09:53:50.000Z | users/migrations/0002_auto_20211212_0856.py | herschel-ma/BlogApp | 30182bafea9eb3083759d5c4b97389e6efa115bb | [
"MIT"
] | null | null | null | users/migrations/0002_auto_20211212_0856.py | herschel-ma/BlogApp | 30182bafea9eb3083759d5c4b97389e6efa115bb | [
"MIT"
] | 1 | 2021-11-08T08:03:09.000Z | 2021-11-08T08:03:09.000Z | # Generated by Django 3.2.8 on 2021-12-12 00:56
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Avatar',
fi... | 31.8125 | 159 | 0.594303 |
dd73965aebc174da482268134b627227567db3b4 | 1,309 | py | Python | LAB03/04-Xray/backend/cloudalbum/tests/test_s3.py | liks79/moving-to-serverless-renew | 2f173071ab387654d4cc851a0b39130613906378 | [
"MIT"
] | 6 | 2019-08-21T04:13:34.000Z | 2019-10-29T07:15:39.000Z | LAB03/04-Xray/backend/cloudalbum/tests/test_s3.py | liks79/moving-to-serverless-renew | 2f173071ab387654d4cc851a0b39130613906378 | [
"MIT"
] | 89 | 2019-07-31T02:29:54.000Z | 2022-03-12T01:03:22.000Z | LAB03/04-Xray/backend/cloudalbum/tests/test_s3.py | michaelrishiforrester/moving-to-serverless-renew | 27cbcbde9db3d2bc66212fe4f768563d25f64c19 | [
"MIT"
] | 4 | 2019-08-02T03:00:35.000Z | 2020-02-26T18:44:03.000Z | """
cloudalbum/tests/test_s3.py
~~~~~~~~~~~~~~~~~~~~~~~
Test S3 bucket is available.
:description: CloudAlbum is a fully featured sample application for 'Moving to AWS serverless' training course
:copyright: © 2019 written by Dayoungle Jun, Sungshik Jou.
:license: MIT, see LICENSE for more deta... | 33.564103 | 114 | 0.639419 |
a2becfbb84900923a60ee81997af74514115b41c | 1,528 | py | Python | bot.py | j-nguyen/FractalBot | 03e562cf1a697a4b3106f8565083b85c7c5ed76b | [
"Apache-2.0"
] | 8 | 2016-11-06T04:24:39.000Z | 2021-07-18T11:32:05.000Z | bot.py | j-nguyen/FractalBot | 03e562cf1a697a4b3106f8565083b85c7c5ed76b | [
"Apache-2.0"
] | 44 | 2016-10-11T14:18:27.000Z | 2017-06-03T05:26:52.000Z | bot.py | j-nguyen/FractalBot | 03e562cf1a697a4b3106f8565083b85c7c5ed76b | [
"Apache-2.0"
] | 1 | 2021-07-18T13:59:07.000Z | 2021-07-18T13:59:07.000Z | from discord.ext import commands
import cogs.utils.db as db
import discord
import asyncio
import logging
import json
import datetime
import psycopg2
# Logger Configuration
logger = logging.getLogger('discord')
logger.setLevel(logging.DEBUG)
handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='... | 23.875 | 102 | 0.660995 |
be2c7635be83ce975f63bd1605b4cb56b98f69f5 | 661 | py | Python | manage.py | JRudransh/Login | 5ef760b0faac97067dc5592fab54762d5a47a8d0 | [
"Apache-2.0"
] | null | null | null | manage.py | JRudransh/Login | 5ef760b0faac97067dc5592fab54762d5a47a8d0 | [
"Apache-2.0"
] | null | null | null | manage.py | JRudransh/Login | 5ef760b0faac97067dc5592fab54762d5a47a8d0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Login.settings')
try:
from django.core.management import execute_from_command_line
except Import... | 28.73913 | 73 | 0.677761 |
f13ef5fc539a6dde9079c854c622f392e878041e | 3,817 | py | Python | fastapi_admin/auth/depends.py | Chise1/fastapi-admin | 74693cf8dd854d61ae5bd931ebe85f5b94f48121 | [
"Apache-2.0"
] | null | null | null | fastapi_admin/auth/depends.py | Chise1/fastapi-admin | 74693cf8dd854d61ae5bd931ebe85f5b94f48121 | [
"Apache-2.0"
] | null | null | null | fastapi_admin/auth/depends.py | Chise1/fastapi-admin | 74693cf8dd854d61ae5bd931ebe85f5b94f48121 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
@File : depends.py
@Time : 2020/4/5 22:19
@Author : chise
@Email : chise123@live.com
@Software: PyCharm
@info :auth的公共依赖项和类似依赖的函数
"""
from datetime import datetime, timedelta
from typing import Callable
import jwt
from fastapi import Depends, HTTPException, status
from fastap... | 24.785714 | 88 | 0.668326 |
74b0f64ba4faa7f151c1259023279114aac047d7 | 7,155 | py | Python | models/cml.py | AzizIlyosov/NCE_Projected_LRec | ed7d5138874552467ddcde06cc7d2cbe43f7f137 | [
"MIT"
] | null | null | null | models/cml.py | AzizIlyosov/NCE_Projected_LRec | ed7d5138874552467ddcde06cc7d2cbe43f7f137 | [
"MIT"
] | null | null | null | models/cml.py | AzizIlyosov/NCE_Projected_LRec | ed7d5138874552467ddcde06cc7d2cbe43f7f137 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
from tqdm import tqdm
from utils.progress import WorkSplitter, inhour
from scipy.sparse import vstack, hstack, lil_matrix
import pyximport; pyximport.install()
from utils.cython.negative_sampler import get_negative_samples
# Under construction...
class CollaborativeMetricL... | 43.628049 | 117 | 0.584486 |
bd1b0babfc58710a65ea707c45a161f1ff17c235 | 1,394 | py | Python | Backend/compChemComputation.py | GaryZ700/CatLab_CompChem | 4a3dee5a3778eb8b69b53b9d0e9ed6321cadedea | [
"MIT"
] | 1 | 2021-11-13T12:21:52.000Z | 2021-11-13T12:21:52.000Z | Backend/compChemComputation.py | GaryZ700/CatLab_CompChem | 4a3dee5a3778eb8b69b53b9d0e9ed6321cadedea | [
"MIT"
] | null | null | null | Backend/compChemComputation.py | GaryZ700/CatLab_CompChem | 4a3dee5a3778eb8b69b53b9d0e9ed6321cadedea | [
"MIT"
] | null | null | null | #Written by Gary Zeri
#Computer Science Major at Chapman University, Member of Dr. LaRue's CatLab
#Abstract class that specifies the methods all Computational Chemistry Calculations must contain and support
#Also imports the compChemGlobal class here to allow its constants and functions to be accessed from all the de... | 31.681818 | 119 | 0.52726 |
eedafdce4f81e7e2ab69c5f77e4b6b25b6ec006d | 1,382 | py | Python | index.py | km42428/give-me-response-front | 1ddd3fdf02ae0ea0cde8c5a126da0c702af55364 | [
"MIT"
] | null | null | null | index.py | km42428/give-me-response-front | 1ddd3fdf02ae0ea0cde8c5a126da0c702af55364 | [
"MIT"
] | null | null | null | index.py | km42428/give-me-response-front | 1ddd3fdf02ae0ea0cde8c5a126da0c702af55364 | [
"MIT"
] | null | null | null | import numpy as np
from apscheduler.schedulers.background import BackgroundScheduler
import pyaudio
from flask import Flask
from flask import render_template
from flask_bootstrap import Bootstrap
app = Flask(__name__)
bootstrap = Bootstrap(app)
CHUNK = 1024
RATE = 44100
p = pyaudio.PyAudio()
stream = p.open(format=py... | 24.678571 | 65 | 0.668596 |
0285d87d50dc5b85b41ac155c4ed42b5020bba5f | 393 | py | Python | satudata/asgi.py | debitomika/satudata | 61cfcf7de616cdcd55ac7b575b8171022476a3f1 | [
"Apache-2.0"
] | null | null | null | satudata/asgi.py | debitomika/satudata | 61cfcf7de616cdcd55ac7b575b8171022476a3f1 | [
"Apache-2.0"
] | null | null | null | satudata/asgi.py | debitomika/satudata | 61cfcf7de616cdcd55ac7b575b8171022476a3f1 | [
"Apache-2.0"
] | null | null | null | """
ASGI config for satudata 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.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
d8f64ca49955399a04812bedfc483b7dfcfdf7b2 | 5,687 | py | Python | dayu_widgets/collapse.py | OneLight-Develop-Team/dayu_widgets | b1098f3213ad3604d2695f83e5b3d609087b4a10 | [
"MIT"
] | null | null | null | dayu_widgets/collapse.py | OneLight-Develop-Team/dayu_widgets | b1098f3213ad3604d2695f83e5b3d609087b4a10 | [
"MIT"
] | null | null | null | dayu_widgets/collapse.py | OneLight-Develop-Team/dayu_widgets | b1098f3213ad3604d2695f83e5b3d609087b4a10 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###################################################################
# Author: Mu yanru
# Date : 2019.3
# Email : muyanru345@163.com
###################################################################
# Import future modules
from __future__ import absolute_import
from __fu... | 35.993671 | 88 | 0.672411 |
3843729f9ac040204b3214f0d4b1c9da8aade162 | 4,348 | py | Python | src/python/turicreate/test/test_lambda.py | pappasG/turicreate | 494e313957a6c01333628b182a7d5bc6efea18f8 | [
"BSD-3-Clause"
] | 2 | 2019-02-08T08:45:27.000Z | 2020-09-07T05:55:18.000Z | src/python/turicreate/test/test_lambda.py | pappasG/turicreate | 494e313957a6c01333628b182a7d5bc6efea18f8 | [
"BSD-3-Clause"
] | 3 | 2022-02-15T04:42:24.000Z | 2022-03-12T01:05:15.000Z | src/python/turicreate/test/test_lambda.py | pappasG/turicreate | 494e313957a6c01333628b182a7d5bc6efea18f8 | [
"BSD-3-Clause"
] | 1 | 2019-11-23T09:47:24.000Z | 2019-11-23T09:47:24.000Z | # -*- coding: utf-8 -*-
# Copyright © 2017 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
from __future__ import print_function as _
from __future__ import division as _
from... | 35.349593 | 172 | 0.635465 |
9277e78234941d493820fc74e3f9fe4ce4cdd043 | 3,520 | py | Python | benchipfs/do_benchmark.py | chunchuan-wang/droplet-engine | 5c2dbac90aa3bde837ed4989ecd78235e5d9ef8e | [
"Apache-2.0"
] | 10 | 2020-10-14T14:22:20.000Z | 2022-03-16T11:33:14.000Z | benchipfs/do_benchmark.py | chunchuan-wang/droplet-engine | 5c2dbac90aa3bde837ed4989ecd78235e5d9ef8e | [
"Apache-2.0"
] | null | null | null | benchipfs/do_benchmark.py | chunchuan-wang/droplet-engine | 5c2dbac90aa3bde837ed4989ecd78235e5d9ef8e | [
"Apache-2.0"
] | 4 | 2020-08-30T12:40:40.000Z | 2021-08-03T15:27:12.000Z | #© 2017-2020, ETH Zurich, D-INFK, lubu@inf.ethz.ch
import os
import argparse
import requests
import numpy as np
import json
from ipfs_util import IPFSStorage, run_ipfs_load
import time
from cStringIO import StringIO
def get_results(server_ip, server_port, addresses):
content = "\n".join(addresses)
req = requ... | 41.411765 | 119 | 0.718182 |
fcbe128ae6a09fc2446dffe998b3c3a29d8df77b | 997 | py | Python | example/txtly/txtly-report.py | sourcery-ai-bot/kaleyra-python | 782333149e7f8673f383a5743f4ed06efb867d36 | [
"MIT"
] | 2 | 2020-11-21T18:10:46.000Z | 2021-09-21T19:28:03.000Z | example/txtly/txtly-report.py | sourcery-ai-bot/kaleyra-python | 782333149e7f8673f383a5743f4ed06efb867d36 | [
"MIT"
] | 3 | 2021-11-11T15:04:46.000Z | 2021-11-11T15:15:47.000Z | example/txtly/txtly-report.py | sourcery-ai-bot/kaleyra-python | 782333149e7f8673f383a5743f4ed06efb867d36 | [
"MIT"
] | 7 | 2019-08-05T18:46:22.000Z | 2021-11-15T16:49:34.000Z | #!/usr/bin/env python
from api.txtly.txtly_request import TxtlyRequest
__author__ = "Likhit Jain and Yashita P Jain"
__copyright__ = "Copyright 2019, Kaleyra"
__license__ = "MIT"
__version__ = "1.0"
__email__ = "support@kaleyra.com"
__status__ = "Production"
# Users can extract the reports of all the Txtly links tha... | 28.485714 | 97 | 0.777332 |
07467e06e3a14b90ba7fc829b8c660938668fa97 | 1,312 | py | Python | tiflash/__init__.py | webbcam/tiflash | 54e26232174b2ac20f2b6da40d7704a317886b24 | [
"MIT"
] | 5 | 2018-07-16T05:45:06.000Z | 2021-06-02T16:41:17.000Z | tiflash/__init__.py | jcao1022/tiflash | 841d4d2c6eeba35ef62c7a8feefc476182175e3d | [
"MIT"
] | 54 | 2018-07-13T03:59:20.000Z | 2019-10-16T05:47:14.000Z | tiflash/__init__.py | jcao1022/tiflash | 841d4d2c6eeba35ef62c7a8feefc476182175e3d | [
"MIT"
] | 2 | 2019-03-19T03:09:52.000Z | 2022-03-25T11:41:13.000Z | """
TIFlash
Licensed under the MIT license (see `LICENSE` file)
A (unofficial) python module for flashing TI devices.
"""
from tiflash.core import ( get_connections,
get_devicetypes,
get_cpus,
list_options,
... | 32.8 | 57 | 0.368902 |
526cef6f85c3b7f1dd3ac3af963ae052e82ca3c4 | 1,294 | py | Python | series_tiempo_ar_api/apps/management/migrations/0001_auto_20190408_0958.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 28 | 2017-12-16T20:30:52.000Z | 2021-08-11T17:35:04.000Z | series_tiempo_ar_api/apps/management/migrations/0001_auto_20190408_0958.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 446 | 2017-11-16T15:21:40.000Z | 2021-06-10T20:14:21.000Z | series_tiempo_ar_api/apps/management/migrations/0001_auto_20190408_0958.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 12 | 2018-08-23T16:13:32.000Z | 2022-03-01T23:12:28.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2019-04-08 12:58
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('django_datajsonar', '0006_synchronizer_node'),
('man... | 31.560976 | 112 | 0.599691 |
3d9c4cd1b3bdf3711f148d3e12c0cafa6cbeb310 | 1,263 | py | Python | ssseg/cfgs/gcnet/cfgs_voc_resnet101os8.py | skydengyao/sssegmentation | 606b05983fa967bb3c98d1120f44dfc516532dad | [
"MIT"
] | 1 | 2021-05-28T06:42:37.000Z | 2021-05-28T06:42:37.000Z | ssseg/cfgs/gcnet/cfgs_voc_resnet101os8.py | skydengyao/sssegmentation | 606b05983fa967bb3c98d1120f44dfc516532dad | [
"MIT"
] | null | null | null | ssseg/cfgs/gcnet/cfgs_voc_resnet101os8.py | skydengyao/sssegmentation | 606b05983fa967bb3c98d1120f44dfc516532dad | [
"MIT"
] | null | null | null | '''define the config file for voc and resnet101os8'''
from .base_cfg import *
# modify dataset config
DATASET_CFG = DATASET_CFG.copy()
DATASET_CFG['train'].update(
{
'type': 'voc',
'set': 'trainaug',
'rootdir': 'data/VOCdevkit/VOC2012',
}
)
DATASET_CFG['test'].update(
{
'ty... | 23.388889 | 90 | 0.667458 |
f3c1140975799049297de414a043209f97c1b327 | 1,864 | py | Python | docs/conf.py | noloco-io/python-sdk | 0ae6c8ff026abb60fdd2fc6eaf67f08f786f15a2 | [
"MIT"
] | null | null | null | docs/conf.py | noloco-io/python-sdk | 0ae6c8ff026abb60fdd2fc6eaf67f08f786f15a2 | [
"MIT"
] | null | null | null | docs/conf.py | noloco-io/python-sdk | 0ae6c8ff026abb60fdd2fc6eaf67f08f786f15a2 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 35.846154 | 79 | 0.661481 |
dd18abb97229772fb444cf9f8b32bd0472ade9f2 | 5,681 | py | Python | banet/models.py | mnpinto/banet | 80da08fc4dbd6760ef453db1448e32dfa3587df9 | [
"Apache-2.0"
] | 28 | 2019-12-02T14:34:11.000Z | 2022-02-28T14:29:44.000Z | banet/models.py | mnpinto/banet | 80da08fc4dbd6760ef453db1448e32dfa3587df9 | [
"Apache-2.0"
] | 2 | 2021-09-28T00:35:10.000Z | 2021-12-31T07:43:40.000Z | banet/models.py | mnpinto/banet | 80da08fc4dbd6760ef453db1448e32dfa3587df9 | [
"Apache-2.0"
] | 10 | 2019-12-02T14:34:14.000Z | 2021-04-28T05:32:31.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/03_models.ipynb (unless otherwise specified).
__all__ = ['DROP', 'BTNorm2d', 'LSTM', 'SpaceConv', 'UpSpaceConv', 'TimeConv', 'UpTimeConv', 'SpaceTimeConv',
'UpSpaceTimeConv', 'BA_Net']
# Cell
from fastai.vision import *
# Cell
DROP = 0.2 # Dropout
# Cell
cl... | 41.166667 | 109 | 0.610456 |
43458527b02a02050cdc3969b68d0554d21cbab3 | 13,423 | py | Python | arguments.py | obin-hero/Neural-SLAM | 72764961333f2c9c34ff709252afb60a36711c0d | [
"MIT"
] | null | null | null | arguments.py | obin-hero/Neural-SLAM | 72764961333f2c9c34ff709252afb60a36711c0d | [
"MIT"
] | null | null | null | arguments.py | obin-hero/Neural-SLAM | 72764961333f2c9c34ff709252afb60a36711c0d | [
"MIT"
] | null | null | null | import argparse
import math
import torch
def get_args():
parser = argparse.ArgumentParser(description='Active-Neural-SLAM')
## General Arguments
parser.add_argument('--seed', type=int, default=1,
help='random seed (default: 1)')
parser.add_argument('--auto_gpu_config', type=in... | 53.907631 | 81 | 0.588989 |
24a76a0939e33f1adefe1024145e632cd0a35232 | 6,506 | py | Python | ptvapi/models/v3_disruption_modes_response.py | richardjkendall/ptv-api-client | 9b1a3882ebee8cef363e688a56b90e2643799a88 | [
"MIT"
] | null | null | null | ptvapi/models/v3_disruption_modes_response.py | richardjkendall/ptv-api-client | 9b1a3882ebee8cef363e688a56b90e2643799a88 | [
"MIT"
] | null | null | null | ptvapi/models/v3_disruption_modes_response.py | richardjkendall/ptv-api-client | 9b1a3882ebee8cef363e688a56b90e2643799a88 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
PTV Timetable API - Version 3
The PTV Timetable API provides direct access to Public Transport Victoria’s public transport timetable data. The API returns scheduled timetable, route and stop data for all metropolitan and regional train, tram and bus services in Victoria, including Night... | 43.66443 | 2,172 | 0.659084 |
2cec72fbbc09aa034e1c034712be0c360de2c0f0 | 6,202 | py | Python | src/offline/news/action-preprocessing/process.py | leewaylicn/recommender-system-dev-workshop-code | 47fedfe75e0dcef9b45b0be6a4c19b194d0b036b | [
"Apache-2.0"
] | null | null | null | src/offline/news/action-preprocessing/process.py | leewaylicn/recommender-system-dev-workshop-code | 47fedfe75e0dcef9b45b0be6a4c19b194d0b036b | [
"Apache-2.0"
] | null | null | null | src/offline/news/action-preprocessing/process.py | leewaylicn/recommender-system-dev-workshop-code | 47fedfe75e0dcef9b45b0be6a4c19b194d0b036b | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import pickle
import boto3
from pyspark.sql import SparkSession
from pyspark.sql.functions import col, size, row_number, expr, array_join
from pyspark.sql.types import StructType, StructField, StringType
from pyspark.sql.window import Window
def list_s3_by_prefix(bucket, prefix, filter_func... | 39.75641 | 111 | 0.681071 |
cc4b15434af1f77095a570f02371628c110ef8c4 | 675 | py | Python | examples/code_monitoring.py | jm-begon/progressmonitor | 94097a3cd553c37b2f87a01c9ec92766b4819dd5 | [
"BSD-3-Clause"
] | null | null | null | examples/code_monitoring.py | jm-begon/progressmonitor | 94097a3cd553c37b2f87a01c9ec92766b4819dd5 | [
"BSD-3-Clause"
] | null | null | null | examples/code_monitoring.py | jm-begon/progressmonitor | 94097a3cd553c37b2f87a01c9ec92766b4819dd5 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#! /usr/bin/env python
"""
This example illustrates the code monitoring with :func:`code_monitor`.
"""
from __future__ import generators
__author__ = "Begon Jean-Michel <jm.begon@gmail.com>"
__copyright__ = "3-clause BSD License"
__version__ = '1.0'
import time
import sys
from progressmonito... | 16.463415 | 71 | 0.617778 |
0930317ca514d6264e42e76f7286edb39004ca40 | 7,217 | py | Python | sheldon_moveit_config/tests/moveit_ik_demo.py | shinselrobots/sheldon | 911148cd82d28e37aebc5e083fbf830d1c9768ab | [
"Apache-2.0"
] | 1 | 2021-01-02T18:17:52.000Z | 2021-01-02T18:17:52.000Z | sheldon_moveit_config/tests/moveit_ik_demo.py | shinselrobots/sheldon | 911148cd82d28e37aebc5e083fbf830d1c9768ab | [
"Apache-2.0"
] | null | null | null | sheldon_moveit_config/tests/moveit_ik_demo.py | shinselrobots/sheldon | 911148cd82d28e37aebc5e083fbf830d1c9768ab | [
"Apache-2.0"
] | 4 | 2017-09-16T03:56:01.000Z | 2018-09-19T02:15:57.000Z | #!/usr/bin/env python
"""
moveit_ik_demo.py - Version 0.1 2014-01-14
Use inverse kinemtatics to move the end effector to a specified pose
Created for the Pi Robot Project: http://www.pirobot.org
Copyright (c) 2014 Patrick Goebel. All rights reserved.
This program is free software; you c... | 39.872928 | 94 | 0.599695 |
2a8840fc1d94717db714081e1ac1ca33cda02232 | 14,970 | py | Python | neo/io/plexonio.py | tclose/python-neo | 338d381b735a019f6be68ab7196366eed33815fe | [
"BSD-3-Clause"
] | null | null | null | neo/io/plexonio.py | tclose/python-neo | 338d381b735a019f6be68ab7196366eed33815fe | [
"BSD-3-Clause"
] | null | null | null | neo/io/plexonio.py | tclose/python-neo | 338d381b735a019f6be68ab7196366eed33815fe | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Class for reading data from Plexion acquisition system (.plx)
Compatible with versions 100 to 106.
Other versions have not been tested.
This IO is developed thanks to the header file downloadable from:
http://www.plexon.com/downloads.html
Supported: Read
Author: sgarcia
"""
import date... | 32.543478 | 164 | 0.524182 |
ad98ea3ae524b600ec9eb4c3ba14bd1fa435d708 | 1,658 | py | Python | src/biodescriptors/calc/calc_plane_angles.py | GlukhovIgor/Descriptors_package | 6d27af1b4e7ab58a14898aaa95c8b2040d7b236b | [
"MIT"
] | 1 | 2022-03-21T12:16:26.000Z | 2022-03-21T12:16:26.000Z | src/biodescriptors/calc/calc_plane_angles.py | GlukhovIgor/Descriptors_package | 6d27af1b4e7ab58a14898aaa95c8b2040d7b236b | [
"MIT"
] | null | null | null | src/biodescriptors/calc/calc_plane_angles.py | GlukhovIgor/Descriptors_package | 6d27af1b4e7ab58a14898aaa95c8b2040d7b236b | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import sympy
from biodescriptors.calc.calc_COM_for_planes import _calc_COM_for_planes
from biodescriptors.calc import constraints
from biodescriptors.calc import utils
def _calc_plane_angles(chain, l1, l2, l3):
"""Calculate angles between every layer. l1, l2, l3 - lists wh... | 34.541667 | 140 | 0.716526 |
62199857f7b9640d30856799c6986e4761e7cba3 | 17,032 | py | Python | rat-sql-gap/seq2struct/datasets/spider_lib/process_sql.py | JuruoMP/gap-exp | 2d7af8a1da2f0ff8f9d3a2c6e15cc6383c716c05 | [
"Apache-2.0"
] | null | null | null | rat-sql-gap/seq2struct/datasets/spider_lib/process_sql.py | JuruoMP/gap-exp | 2d7af8a1da2f0ff8f9d3a2c6e15cc6383c716c05 | [
"Apache-2.0"
] | null | null | null | rat-sql-gap/seq2struct/datasets/spider_lib/process_sql.py | JuruoMP/gap-exp | 2d7af8a1da2f0ff8f9d3a2c6e15cc6383c716c05 | [
"Apache-2.0"
] | null | null | null | ################################
# Assumptions:
# 1. sql is correct
# 2. only table name has alias
# 3. only one intersect/union/except
#
# val: number(float)/string(str)/sql(dict)
# col_unit: (agg_id, col_id, isDistinct(bool))
# val_unit: (unit_op, col_unit1, col_unit2)
# table_unit: (table_type, col_unit/sql)
#... | 29.62087 | 123 | 0.587189 |
d39ccccacf4785337f3a1a37a43f9e0d8f04530f | 1,954 | py | Python | routes/student.py | lyon916/fastapi-mongo-template | 423f34a129453ec20fc0a301a3fac75ead1dc281 | [
"Apache-2.0"
] | null | null | null | routes/student.py | lyon916/fastapi-mongo-template | 423f34a129453ec20fc0a301a3fac75ead1dc281 | [
"Apache-2.0"
] | null | null | null | routes/student.py | lyon916/fastapi-mongo-template | 423f34a129453ec20fc0a301a3fac75ead1dc281 | [
"Apache-2.0"
] | null | null | null | from fastapi import APIRouter, Body
from fastapi.encoders import jsonable_encoder
from database.database import *
from models.student import *
router = APIRouter()
@router.get("/", response_description="Students retrieved")
async def get_students():
students = await retrieve_students()
return ResponseModel(... | 39.877551 | 112 | 0.717503 |
b326b3142b2c0a15dfefd1ea3847cdae7ab502ed | 673 | py | Python | manage.py | RoofBite/CrossTableDjango | 50db635297d780dc0536afc6bcbf83b8f0c96af0 | [
"MIT"
] | null | null | null | manage.py | RoofBite/CrossTableDjango | 50db635297d780dc0536afc6bcbf83b8f0c96af0 | [
"MIT"
] | null | null | null | manage.py | RoofBite/CrossTableDjango | 50db635297d780dc0536afc6bcbf83b8f0c96af0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'CrossTableProject.settings')
try:
from django.core.management import execute_from_command_line
e... | 29.26087 | 81 | 0.683507 |
a92017f4142f671f337b15104b049581309bd290 | 3,906 | py | Python | tensorflow/python/autograph/pyct/pretty_printer.py | datanonymous/TFandroid | 89927e863b1ad96184ab09188f62b7e391c896d9 | [
"Apache-2.0"
] | 6 | 2019-02-05T22:36:51.000Z | 2022-01-14T03:50:57.000Z | tensorflow/python/autograph/pyct/pretty_printer.py | shekharpalit/tensorflow | 6aa83398ab03bfae822f36772757097bcb98b6ed | [
"Apache-2.0"
] | 1 | 2019-02-22T00:50:13.000Z | 2019-02-22T00:50:13.000Z | tensorflow/python/autograph/pyct/pretty_printer.py | shekharpalit/tensorflow | 6aa83398ab03bfae822f36772757097bcb98b6ed | [
"Apache-2.0"
] | 8 | 2016-01-14T13:12:56.000Z | 2021-04-09T10:20:53.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 31 | 80 | 0.585509 |
0738d8473bfa1c1eb4e38e1a55226136c501f711 | 628 | py | Python | stackoverflow/api/v1/tests/test_config.py | asheuh/StackOverflow-lite | 061845fc8ac4ac1ed5e1cc52f13331186c837536 | [
"MIT"
] | 6 | 2018-08-17T09:07:29.000Z | 2019-03-26T06:18:53.000Z | stackoverflow/api/v1/tests/test_config.py | asheux/stackoverflow-clone | 061845fc8ac4ac1ed5e1cc52f13331186c837536 | [
"MIT"
] | 49 | 2018-08-07T19:07:07.000Z | 2018-09-13T17:09:12.000Z | stackoverflow/api/v1/tests/test_config.py | asheux/stackoverflow-clone | 061845fc8ac4ac1ed5e1cc52f13331186c837536 | [
"MIT"
] | 2 | 2021-02-02T16:33:52.000Z | 2021-06-22T17:31:10.000Z | import unittest
from flask import current_app
from stackoverflow import create_app, settings
class ConfigTestCase(unittest.TestCase):
def setUp(self):
"""Creates an environment for the test that is close to the app running"""
self.app = create_app(settings.TESTING)
self.app_context = self.a... | 29.904762 | 82 | 0.69586 |
30c50534dd473fd8ccadbc8826f35d32edf8b6cc | 101 | py | Python | medicines/admin.py | notrealanurag/curezo_old | c3fd350750a799ae975ed6a89f6db2b39a22fbd0 | [
"MIT"
] | null | null | null | medicines/admin.py | notrealanurag/curezo_old | c3fd350750a799ae975ed6a89f6db2b39a22fbd0 | [
"MIT"
] | 5 | 2021-03-19T11:01:39.000Z | 2021-09-22T19:35:40.000Z | medicines/admin.py | notrealanurag/curezo_old | c3fd350750a799ae975ed6a89f6db2b39a22fbd0 | [
"MIT"
] | null | null | null | from django.contrib import admin
from medicines.models import medicine
admin.site.register(medicine) | 25.25 | 37 | 0.851485 |
9900c221c72cf2f8721fc41a9f12845848fcd0c5 | 4,961 | py | Python | datasets/data_utils.py | JiHooooo/FixMatch-pytorch | f74d3e1847ef8e6404bfc6c05a1d73364ddf9d52 | [
"MIT"
] | 178 | 2020-10-08T00:18:46.000Z | 2022-03-23T08:18:45.000Z | datasets/data_utils.py | JiHooooo/FixMatch-pytorch | f74d3e1847ef8e6404bfc6c05a1d73364ddf9d52 | [
"MIT"
] | 18 | 2020-10-08T09:24:07.000Z | 2021-12-14T09:32:35.000Z | datasets/data_utils.py | JiHooooo/FixMatch-pytorch | f74d3e1847ef8e6404bfc6c05a1d73364ddf9d52 | [
"MIT"
] | 36 | 2020-10-08T02:21:44.000Z | 2022-03-27T12:10:07.000Z | import torch
import torchvision
from torchvision import datasets
from torch.utils.data import sampler, DataLoader
from torch.utils.data.sampler import BatchSampler
import torch.distributed as dist
import numpy as np
from datasets.DistributedProxySampler import DistributedProxySampler
def split_ssl_data(data, tar... | 35.690647 | 103 | 0.614191 |
13a8d0af1bb3ecb522220b4666abf5ec1c8760f1 | 11,842 | py | Python | userbot/modules/android.py | RoyalBoy69/OUB | d450fd55bbf2e292bc1a70e669217b79106edc7a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2020-11-07T16:29:10.000Z | 2020-11-07T16:29:13.000Z | userbot/modules/android.py | RoyalBoy69/OUB | d450fd55bbf2e292bc1a70e669217b79106edc7a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2020-07-03T03:36:32.000Z | 2020-07-03T03:36:32.000Z | userbot/modules/android.py | RoyalBoy69/OUB | d450fd55bbf2e292bc1a70e669217b79106edc7a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 16 | 2020-07-11T17:22:36.000Z | 2021-11-06T22:55:33.000Z | # Copyright (C) 2020 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
import asyncio
import json
import math
import os
import re
import time
from bs4 import BeautifulSoup
from requests im... | 34.524781 | 102 | 0.563334 |
454b12437d642944cbcacbc14092c2d596ddce94 | 514 | py | Python | fiber/editor.py | leukeleu/django-fiber-multilingual | 4574fffb953c442ff7981c16ea1d460784e38eab | [
"Apache-2.0"
] | 143 | 2015-01-06T01:15:22.000Z | 2017-07-08T04:10:08.000Z | fiber/editor.py | check4anjil/django-fiber | 48d1af8867e19b9e27332d2b98ca07a47927de15 | [
"Apache-2.0"
] | 44 | 2015-01-22T14:21:32.000Z | 2017-05-31T16:59:23.000Z | fiber/editor.py | check4anjil/django-fiber | 48d1af8867e19b9e27332d2b98ca07a47927de15 | [
"Apache-2.0"
] | 53 | 2015-01-21T21:48:49.000Z | 2017-06-12T07:33:13.000Z | from .app_settings import EDITOR
from .utils.import_util import import_element
editor = import_element(EDITOR)
renderer = editor.get('renderer', None)
def get_editor_field_name(html_field_name):
"""
Returns markup or html field name, depending on editor.
Input is html field_name:
get_editor_field_n... | 23.363636 | 59 | 0.72179 |
e8c84b06351a941d4b7206912e50856e6c4ab9fc | 643 | py | Python | boto3_exceptions/events.py | siteshen/boto3_exceptions | d6174c2577c9d4b17a09a89cd0e4bd1fe555b26b | [
"MIT"
] | 2 | 2021-06-22T00:00:35.000Z | 2021-07-15T03:25:52.000Z | boto3_exceptions/events.py | siteshen/boto3_exceptions | d6174c2577c9d4b17a09a89cd0e4bd1fe555b26b | [
"MIT"
] | null | null | null | boto3_exceptions/events.py | siteshen/boto3_exceptions | d6174c2577c9d4b17a09a89cd0e4bd1fe555b26b | [
"MIT"
] | null | null | null | import boto3
exceptions = boto3.client('events').exceptions
ConcurrentModificationException = exceptions.ConcurrentModificationException
InternalException = exceptions.InternalException
InvalidEventPatternException = exceptions.InvalidEventPatternException
InvalidStateException = exceptions.InvalidStateException
Limi... | 45.928571 | 76 | 0.908243 |
ca63f0eb7e0ebb032266f7201640f9ad89a9449f | 866 | py | Python | venv/Lib/site-packages/pandas/tests/arrays/floating/conftest.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/arrays/floating/conftest.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/arrays/floating/conftest.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import pandas as pd
from pandas.core.arrays.floating import (
Float32Dtype,
Float64Dtype,
)
@pytest.fixture(params=[Float32Dtype, Float64Dtype])
def dtype(request):
return request.param()
@pytest.fixture
def data(dtype):
return pd.array(
li... | 21.65 | 64 | 0.603926 |
ad9e8e5455b2cdabd3bc6a5691f5a6bbaa84f639 | 6,282 | py | Python | SignUp.py | ycdxsb/LibraryManageDesktopApp | aaa932303526c7bcca94b19704501fd73d93a001 | [
"BSD-2-Clause"
] | 74 | 2018-07-03T05:10:23.000Z | 2021-12-11T13:46:47.000Z | SignUp.py | ycdxsb/LibraryManageDesktopApp | aaa932303526c7bcca94b19704501fd73d93a001 | [
"BSD-2-Clause"
] | 2 | 2019-02-17T03:32:26.000Z | 2019-11-12T06:44:03.000Z | SignUp.py | ycdxsb/LibraryManageDesktopApp | aaa932303526c7bcca94b19704501fd73d93a001 | [
"BSD-2-Clause"
] | 44 | 2018-04-28T11:02:57.000Z | 2021-06-15T12:02:10.000Z | import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
import qdarkstyle
from PyQt5.QtSql import *
import hashlib
class SignUpWidget(QWidget):
student_signup_signal = pyqtSignal(str)
def __init__(self):
super().__init__()
self.setUpUI()
def setUpUI(... | 40.269231 | 109 | 0.643585 |
4d38d090ada6ca7e5c024bb646554f16f21575eb | 2,046 | py | Python | src/covid19/lk_vax_centers/expand_i18n.py | kaveenr/covid19 | f77b1abad1a809c7ad0b77208211ed266251c489 | [
"MIT"
] | 5 | 2021-06-11T16:11:58.000Z | 2021-09-02T14:09:41.000Z | src/covid19/lk_vax_centers/expand_i18n.py | kaveenr/covid19 | f77b1abad1a809c7ad0b77208211ed266251c489 | [
"MIT"
] | 2 | 2021-07-06T11:11:50.000Z | 2021-08-23T10:35:31.000Z | src/covid19/lk_vax_centers/expand_i18n.py | kaveenr/covid19 | f77b1abad1a809c7ad0b77208211ed266251c489 | [
"MIT"
] | 2 | 2021-08-16T15:32:44.000Z | 2021-08-23T03:25:08.000Z | import os
from utils import timex, tsv
from covid19._utils import log
from covid19.lk_vax_centers import lk_vax_center_utils, translate_utils
def expand_i18n_for_data(data):
data['fuzzy_key']
district = data['district']
police = data['police']
center = data['center']
log.info(f'Expanding (i18n... | 31 | 78 | 0.72043 |
daa2597c0f12bd3c3602a1f6a3d8217ff1992d40 | 870 | py | Python | examples/callback/server2.py | delmic/Pyro4 | 74e9c18e83a2002d9254c5e867866201121082d3 | [
"MIT"
] | 6 | 2015-04-09T07:19:23.000Z | 2018-01-15T08:00:15.000Z | examples/callback/server2.py | delmic/Pyro4 | 74e9c18e83a2002d9254c5e867866201121082d3 | [
"MIT"
] | 1 | 2018-04-18T06:13:22.000Z | 2018-04-18T06:13:22.000Z | examples/callback/server2.py | delmic/Pyro4 | 74e9c18e83a2002d9254c5e867866201121082d3 | [
"MIT"
] | 5 | 2016-04-22T08:17:53.000Z | 2019-01-14T12:11:46.000Z | from __future__ import with_statement
import Pyro4
class CallbackServer(object):
def doCallback(self, callback):
print("server: doing callback 1 to client")
try:
callback.call1()
except:
print("got an exception from the callback.")
print("".join... | 32.222222 | 58 | 0.595402 |
ba2fe097a31aaa81ce9f44f9b95b7743d213a43e | 4,201 | py | Python | test/torch/federated/test_utils.py | NicoSerranoP/PySyft | 87fcd566c46fce4c16d363c94396dd26bd82a016 | [
"Apache-2.0"
] | 3 | 2020-09-23T14:09:09.000Z | 2020-09-23T19:26:28.000Z | test/torch/federated/test_utils.py | NicoSerranoP/PySyft | 87fcd566c46fce4c16d363c94396dd26bd82a016 | [
"Apache-2.0"
] | 1 | 2020-09-29T00:24:31.000Z | 2020-09-29T00:24:31.000Z | test/torch/federated/test_utils.py | NicoSerranoP/PySyft | 87fcd566c46fce4c16d363c94396dd26bd82a016 | [
"Apache-2.0"
] | 1 | 2021-09-04T16:27:41.000Z | 2021-09-04T16:27:41.000Z | import pytest
import torch as th
import syft as sy
from syft.frameworks.torch.fl import utils
from syft.frameworks.torch import fl
def test_extract_batches_per_worker(workers):
bob = workers["bob"]
alice = workers["alice"]
datasets = [
fl.BaseDataset(th.tensor([1, 2]), th.tensor([1, 2])).send(b... | 27.279221 | 85 | 0.608665 |
bf41f6113d3614140fccd36b87b676b963ff4d95 | 1,821 | py | Python | tree/binary/03.py | zlikun-lang/python-data-structure-and-algorithm | f6bd97e1cfb142baa804113c654ab32144c34175 | [
"Apache-2.0"
] | null | null | null | tree/binary/03.py | zlikun-lang/python-data-structure-and-algorithm | f6bd97e1cfb142baa804113c654ab32144c34175 | [
"Apache-2.0"
] | null | null | null | tree/binary/03.py | zlikun-lang/python-data-structure-and-algorithm | f6bd97e1cfb142baa804113c654ab32144c34175 | [
"Apache-2.0"
] | null | null | null | # 二叉搜索树
class BinarySearchTree(object):
class TreeNode:
def __init__(self, data, left=None, right=None):
self.data = data
self.left = left
self.right = right
def __init__(self):
self.root = None
def insert(self, data):
if data is None:
... | 21.174419 | 65 | 0.56782 |
23cac07113f835397a6a583ffc71bd0fe407f8e2 | 18,320 | py | Python | resolwe_bio/tests/processes/test_diff_expression.py | genialis/resolwe-bio | 90da00d18576843dc70d097e7baba5217f7e10a8 | [
"Apache-2.0"
] | 12 | 2015-12-07T18:29:27.000Z | 2022-03-16T08:00:18.000Z | resolwe_bio/tests/processes/test_diff_expression.py | genialis/resolwe-bio | 90da00d18576843dc70d097e7baba5217f7e10a8 | [
"Apache-2.0"
] | 480 | 2015-11-20T21:46:43.000Z | 2022-03-28T12:40:57.000Z | resolwe_bio/tests/processes/test_diff_expression.py | genialis/resolwe-bio | 90da00d18576843dc70d097e7baba5217f7e10a8 | [
"Apache-2.0"
] | 45 | 2015-11-19T14:54:07.000Z | 2022-02-13T21:36:50.000Z | from pathlib import Path
from resolwe.flow.models import Data, Process
from resolwe.test import tag_process, with_resolwe_host
from resolwe_bio.utils.test import KBBioProcessTestCase
class DiffExpProcessorTestCase(KBBioProcessTestCase):
@tag_process("cuffdiff")
def test_cuffdiff(self):
with self.pre... | 36.64 | 101 | 0.497871 |
d4afa067f5a35378614ac108b8353bad4eecc0a1 | 3,591 | py | Python | src/python/pants/base/exiter.py | lgirault/pants | 7731c9783d8011089f59d47c41d49fdd6433bb4f | [
"Apache-2.0"
] | 94 | 2015-01-15T21:24:20.000Z | 2022-02-16T16:55:43.000Z | src/python/pants/base/exiter.py | lgirault/pants | 7731c9783d8011089f59d47c41d49fdd6433bb4f | [
"Apache-2.0"
] | 5 | 2020-07-18T01:04:43.000Z | 2021-05-10T08:40:56.000Z | src/python/pants/base/exiter.py | lgirault/pants | 7731c9783d8011089f59d47c41d49fdd6433bb4f | [
"Apache-2.0"
] | 47 | 2015-02-25T02:20:07.000Z | 2022-03-21T00:59:16.000Z | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import sys
import traceback
from builtins import object
from future.utils... | 39.032609 | 100 | 0.685324 |
ae355a382996a17a501a56b74350d8442ab0479c | 1,360 | py | Python | grr/client/grr_response_client/unprivileged/linux/sandbox.py | khanhgithead/grr | 8ad8a4d2c5a93c92729206b7771af19d92d4f915 | [
"Apache-2.0"
] | 4,238 | 2015-01-01T15:34:50.000Z | 2022-03-31T08:18:05.000Z | grr/client/grr_response_client/unprivileged/linux/sandbox.py | khanhgithead/grr | 8ad8a4d2c5a93c92729206b7771af19d92d4f915 | [
"Apache-2.0"
] | 787 | 2015-01-02T21:34:24.000Z | 2022-03-02T13:26:38.000Z | grr/client/grr_response_client/unprivileged/linux/sandbox.py | khanhgithead/grr | 8ad8a4d2c5a93c92729206b7771af19d92d4f915 | [
"Apache-2.0"
] | 856 | 2015-01-02T02:50:11.000Z | 2022-03-31T11:11:53.000Z | #!/usr/bin/env python
"""Sandboxing functionality on Linux."""
import ctypes
import ctypes.util
import errno
import grp
import os
import pwd
# See unshare(2)
CLONE_NEWIPC = 0x08000000
CLONE_NEWNET = 0x40000000
class Error(Exception):
pass
def EnterSandbox(user: str, group: str) -> None:
"""Enters the sandbox... | 22.295082 | 78 | 0.672794 |
b8525654813950921194158c0195ab0d3e163d10 | 4,034 | py | Python | objsamples/sample_list_subscriber.py | alimony/FuelSDK-Python | e7b5742ee9f8f32a7e4204ae462a00b90dd55169 | [
"MIT"
] | null | null | null | objsamples/sample_list_subscriber.py | alimony/FuelSDK-Python | e7b5742ee9f8f32a7e4204ae462a00b90dd55169 | [
"MIT"
] | null | null | null | objsamples/sample_list_subscriber.py | alimony/FuelSDK-Python | e7b5742ee9f8f32a7e4204ae462a00b90dd55169 | [
"MIT"
] | 2 | 2019-10-28T13:00:14.000Z | 2019-12-18T10:54:32.000Z | from __future__ import print_function
import ET_Client
try:
debug = False
stubObj = ET_Client.ET_Client(False, debug)
# NOTE: These examples only work in accounts where the SubscriberKey functionality is not enabled
# SubscriberKey will need to be included in the props if that feature is enable... | 45.325843 | 132 | 0.636589 |
74a00c020c8344bc488392ccc2fd13f16ef2c90c | 131 | py | Python | project-simple-01.py | MaxZar1/project-simple | c3f1256c182c6a90f2dc3da96b393b427885ea10 | [
"MIT"
] | null | null | null | project-simple-01.py | MaxZar1/project-simple | c3f1256c182c6a90f2dc3da96b393b427885ea10 | [
"MIT"
] | null | null | null | project-simple-01.py | MaxZar1/project-simple | c3f1256c182c6a90f2dc3da96b393b427885ea10 | [
"MIT"
] | null | null | null | # to jest komentarz
import pgzrun
WIDTH = 1280
HEIGHT = 847
def draw():
screen.blit("ptak-tlo-1280x847", (0,0))
pgzrun.go()
| 11.909091 | 43 | 0.664122 |
6769f000ac674abc0bf258550cabedd182e02698 | 358 | py | Python | episcan/scraper/DOMElem.py | eliottness/episcan | aee955fa87488a0945f4e8947b49b9dc9b37a0ba | [
"MIT"
] | 3 | 2020-07-14T15:07:27.000Z | 2021-09-06T09:50:10.000Z | episcan/scraper/DOMElem.py | eliottness/episcan | aee955fa87488a0945f4e8947b49b9dc9b37a0ba | [
"MIT"
] | 1 | 2020-07-30T16:32:55.000Z | 2020-08-03T12:37:08.000Z | episcan/scraper/DOMElem.py | eliottness/episcan | aee955fa87488a0945f4e8947b49b9dc9b37a0ba | [
"MIT"
] | null | null | null | from selenium.webdriver.common.by import By
class DOMElem:
by : By # Search method to find the particular element
value : str # Search value
send_keys : str # Keys to enter if the value is a field
def __init__(self, by, val, keys=None):
self.by = by
self.value ... | 27.538462 | 66 | 0.603352 |
b81ec3f511f3475a552199f406946a4cd1a99948 | 18,841 | py | Python | src/main/gateway/sensortag_aws.py | JFKenso/SensorTag | 22d02df28c067528063e1cfb6374a6b306af1cf6 | [
"Apache-2.0"
] | null | null | null | src/main/gateway/sensortag_aws.py | JFKenso/SensorTag | 22d02df28c067528063e1cfb6374a6b306af1cf6 | [
"Apache-2.0"
] | null | null | null | src/main/gateway/sensortag_aws.py | JFKenso/SensorTag | 22d02df28c067528063e1cfb6374a6b306af1cf6 | [
"Apache-2.0"
] | null | null | null | from btle import UUID, Peripheral, DefaultDelegate
import struct
import math
import boto
import json
import time
import datetime
import ssl
import paho.mqtt.client as mqtt
import threading
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient
import sys
import logging
import time
import getopt
# AWS Credentials
awsEn... | 32.097104 | 114 | 0.620137 |
fa1b0e487f20cb2eb4dfc684564bf88b6703a566 | 710 | py | Python | var/spack/repos/builtin/packages/ufcx/package.py | QianJianhua1/spack | 363536fd929d2aee280e07780ff6c98498d7be46 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/ufcx/package.py | QianJianhua1/spack | 363536fd929d2aee280e07780ff6c98498d7be46 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/ufcx/package.py | QianJianhua1/spack | 363536fd929d2aee280e07780ff6c98498d7be46 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Ufcx(CMakePackage):
"""FFCx provides the ufcx.h interface header for finite element kernel... | 30.869565 | 76 | 0.704225 |
45a689a4799a609c601c24e8a7a676780faf87e3 | 2,467 | py | Python | spinor_gpe/tests/fft_tests.py | readthedocs-assistant/spinor-gpe | 02ec6ad98479ca182ff3f7f578669690bb1d5379 | [
"MIT"
] | null | null | null | spinor_gpe/tests/fft_tests.py | readthedocs-assistant/spinor-gpe | 02ec6ad98479ca182ff3f7f578669690bb1d5379 | [
"MIT"
] | 1 | 2021-06-10T12:02:16.000Z | 2021-06-10T12:02:16.000Z | spinor_gpe/tests/fft_tests.py | readthedocs-assistant/spinor-gpe | 02ec6ad98479ca182ff3f7f578669690bb1d5379 | [
"MIT"
] | 1 | 2022-01-19T20:07:03.000Z | 2022-01-19T20:07:03.000Z | """Test script for FFT and other functions in the tensor_tools.py module.
The working directory for this script needs to be in the project root
directory, i.e. /spinor-gpe/.
"""
# pylint: disable=wrong-import-position
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
import numpy as np # noqa: E402
fro... | 27.10989 | 76 | 0.677341 |
7c2160488520b872bdf57d0dd7199295c8482b6a | 22,373 | py | Python | python/Tracker_wrapper/ObjectnessVisualizer.py | ibogun/DeepAntrack | 0b13d363a30c8ad63c0e2c8cbc16aebff90de69a | [
"MIT"
] | 1 | 2016-09-13T18:20:17.000Z | 2016-09-13T18:20:17.000Z | python/Tracker_wrapper/ObjectnessVisualizer.py | ibogun/DeepAntrack | 0b13d363a30c8ad63c0e2c8cbc16aebff90de69a | [
"MIT"
] | null | null | null | python/Tracker_wrapper/ObjectnessVisualizer.py | ibogun/DeepAntrack | 0b13d363a30c8ad63c0e2c8cbc16aebff90de69a | [
"MIT"
] | null | null | null | __author__ = 'Ivan'
import objectness_python
import tracker_python
from Dataset import VOT2015Dataset
import numpy as np
import matplotlib.pyplot as plt
import cv2
from matplotlib import gridspec
import re
import os
import time
import math
import copy
class ObjectnessVizualizer(object):
"""Class to perform objectn... | 32.709064 | 116 | 0.538998 |
1e5e2109fb6c08612a5995625cace2e1b752e8ac | 9,981 | py | Python | audonnx/core/model.py | audeering/audonnx | 3995e580e75f357e06193508f0d1177dc629d1ec | [
"MIT"
] | 1 | 2022-01-08T10:01:42.000Z | 2022-01-08T10:01:42.000Z | audonnx/core/model.py | audeering/audonnx | 3995e580e75f357e06193508f0d1177dc629d1ec | [
"MIT"
] | 10 | 2022-01-07T10:08:14.000Z | 2022-03-30T09:56:39.000Z | audonnx/core/model.py | audeering/audonnx | 3995e580e75f357e06193508f0d1177dc629d1ec | [
"MIT"
] | null | null | null | import os
import re
import typing
import numpy as np
import onnxruntime
import audeer
import audobject
import yaml
from audonnx.core.node import (
InputNode,
OutputNode,
)
from audonnx.core.typing import (
Labels,
Transform,
)
class Model(audobject.Object):
r"""Model with multiple input and out... | 30.337386 | 79 | 0.52089 |
743d04660a5d152994841e4b304649d8db5d21a2 | 10,233 | py | Python | build/PureCloudPlatformClientV2/models/report_run_entry.py | cjohnson-ctl/platform-client-sdk-python | 38ce53bb8012b66e8a43cc8bd6ff00cf6cc99100 | [
"MIT"
] | 10 | 2019-02-22T00:27:08.000Z | 2021-09-12T23:23:44.000Z | libs/PureCloudPlatformClientV2/models/report_run_entry.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 5 | 2018-06-07T08:32:00.000Z | 2021-07-28T17:37:26.000Z | libs/PureCloudPlatformClientV2/models/report_run_entry.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 6 | 2020-04-09T17:43:07.000Z | 2022-02-17T08:48:05.000Z | # coding: utf-8
"""
Copyright 2016 SmartBear Software
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... | 25.906329 | 144 | 0.572559 |
427d2d62033df3f35a93f74785d3a2fd476331a0 | 2,957 | py | Python | teaching_material/docs/build/html/_static/falling_sphere_answer.py | IntroGM/2017 | 38262fb8999efb10673ee456cbb311b9987dfa5e | [
"MIT"
] | 1 | 2019-11-17T01:12:54.000Z | 2019-11-17T01:12:54.000Z | teaching_material/docs/source/scripts/falling_sphere_answer.py | IntroGM/2017 | 38262fb8999efb10673ee456cbb311b9987dfa5e | [
"MIT"
] | null | null | null | teaching_material/docs/source/scripts/falling_sphere_answer.py | IntroGM/2017 | 38262fb8999efb10673ee456cbb311b9987dfa5e | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import numpy as np
import matplotlib.pyplot as plt
from math import pi
### falling_sphere.py
###
### Script to calculate the finite differences
### solution for the falling sphere in a viscous fluid
### (Stokes' law).
###
### Compared against analytical solution.
#####################
#### Paramet... | 27.635514 | 100 | 0.639838 |
229cba2798fb5f180d5d1619625cafcf1cf8b711 | 4,778 | py | Python | code/config/config_ht.py | marksidell/wordclock | 5b53e7c954cac776e51222fbe2cdc97dd2d39d0e | [
"MIT"
] | 14 | 2021-06-24T06:39:20.000Z | 2021-08-25T14:34:26.000Z | code/config/config_ht.py | marksidell/wordclock | 5b53e7c954cac776e51222fbe2cdc97dd2d39d0e | [
"MIT"
] | 1 | 2021-06-25T19:29:15.000Z | 2021-06-25T19:29:15.000Z | code/config/config_ht.py | marksidell/wordclock | 5b53e7c954cac776e51222fbe2cdc97dd2d39d0e | [
"MIT"
] | 2 | 2021-06-24T06:39:48.000Z | 2022-02-21T06:57:40.000Z | '''
Configuration for the Hans & Tomomi clock
'''
from wordclock.configdefs import Word, BirthDate
VERSION_2 = True
CLOCK_NAME = 'Hans & Tomomi'
LAT = 37.38770336913209
LON = -122.08460007293597
IT = Word('it', 0, 0, False)
TWIST = Word('twist', 0, 1, False)
WIST = Word('wist', 0, 2, False)
IS = Word('is', 0, ... | 26.10929 | 48 | 0.566346 |
2276444c235eac3e737a2f19054c527cc34903ee | 19,187 | py | Python | my_project/template_graphs.py | CenterForTheBuiltEnvironment/clima | 32ee02fdd48ee82c16c996a09ea6768830e3b272 | [
"MIT"
] | 15 | 2021-01-15T00:37:15.000Z | 2022-03-31T07:52:20.000Z | my_project/template_graphs.py | krkh-1702/clima | e7bae5baf1ca2b4b64553be0b52e59cf9f2a0e52 | [
"MIT"
] | 114 | 2021-01-13T07:31:24.000Z | 2022-03-25T08:50:23.000Z | my_project/template_graphs.py | krkh-1702/clima | e7bae5baf1ca2b4b64553be0b52e59cf9f2a0e52 | [
"MIT"
] | 5 | 2021-07-01T20:14:28.000Z | 2021-12-14T15:13:05.000Z | from math import ceil, floor
import numpy as np
import pandas as pd
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from pythermalcomfort.models import adaptive_ashrae
from pythermalcomfort.utilities import running_mean_outdoor_temperature
from my_project.global_scheme import mapping_dicti... | 30.552548 | 97 | 0.525929 |
a095b0f73dfd7f329e0db79fa5904b94939512bd | 2,502 | py | Python | katana/api/transport/data.py | kusanagi/katana-sdk-python3 | cd089409ec0d822f4d7bd6b4bebd527e003089ee | [
"MIT"
] | 2 | 2017-03-21T20:02:47.000Z | 2017-05-02T19:32:01.000Z | katana/api/transport/data.py | kusanagi/katana-sdk-python3 | cd089409ec0d822f4d7bd6b4bebd527e003089ee | [
"MIT"
] | 19 | 2017-03-10T12:09:34.000Z | 2018-06-01T18:10:06.000Z | katana/api/transport/data.py | kusanagi/katana-sdk-python3 | cd089409ec0d822f4d7bd6b4bebd527e003089ee | [
"MIT"
] | 5 | 2017-03-10T11:40:50.000Z | 2019-03-26T06:28:33.000Z | """
Python 3 SDK for the KATANA(tm) Framework (http://katana.kusanagi.io)
Copyright (c) 2016-2018 KUSANAGI S.L. All rights reserved.
Distributed under the MIT license.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
"""
__license__ = "MIT"
__c... | 21.947368 | 76 | 0.59992 |
199eb46b9e9a558ceb2e0b053456425416601a19 | 11,722 | py | Python | magenta/models/piano_genie/configs.py | KenniVelez/magenta | e86b7de2ffd36173b694e00c44268d1b3b774224 | [
"Apache-2.0"
] | null | null | null | magenta/models/piano_genie/configs.py | KenniVelez/magenta | e86b7de2ffd36173b694e00c44268d1b3b774224 | [
"Apache-2.0"
] | null | null | null | magenta/models/piano_genie/configs.py | KenniVelez/magenta | e86b7de2ffd36173b694e00c44268d1b3b774224 | [
"Apache-2.0"
] | 1 | 2022-03-07T04:46:27.000Z | 2022-03-07T04:46:27.000Z | # Copyright 2022 The Magenta Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 25.819383 | 79 | 0.725047 |
1f32c3661cdbe3bf0c6a019c66de1d7eea20b25e | 539 | py | Python | my_package/InterpolationCh/setup.py | iBobbyTS/Colab-DAIN | 29469e64db5d45e824def45769a2d7c7b72c431c | [
"MIT"
] | 2 | 2020-07-06T16:05:31.000Z | 2020-07-11T00:57:53.000Z | my_package/InterpolationCh/setup.py | iBobbyTS/Colab-DAIN | 29469e64db5d45e824def45769a2d7c7b72c431c | [
"MIT"
] | null | null | null | my_package/InterpolationCh/setup.py | iBobbyTS/Colab-DAIN | 29469e64db5d45e824def45769a2d7c7b72c431c | [
"MIT"
] | null | null | null | #!/content/Python/bin/python3.6
import os
import torch
from setuptools import setup, find_packages
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
from compiler_args import nvcc_args, cxx_args
setup(
name='interpolationch_cuda',
ext_modules=[
CUDAExtension('interpolationch_cuda', ... | 25.666667 | 67 | 0.701299 |
50e084962d15de032e922ad01928b309a0e82567 | 7,809 | py | Python | docs/conf.py | k-sunako/learning-understanding_machine_learning | 4f173e67e79940cbb40c8d17726b0d2e4b9749b7 | [
"MIT"
] | null | null | null | docs/conf.py | k-sunako/learning-understanding_machine_learning | 4f173e67e79940cbb40c8d17726b0d2e4b9749b7 | [
"MIT"
] | null | null | null | docs/conf.py | k-sunako/learning-understanding_machine_learning | 4f173e67e79940cbb40c8d17726b0d2e4b9749b7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# py38-ds-template documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration valu... | 31.873469 | 80 | 0.706108 |
d9612d59d78e8f15f631d25d99ecb134cf4c35d1 | 6,822 | py | Python | train_sppe/src/train.py | marcnunez/CabinMonitoringV1 | f95cf73afcd843f1a8a107517f96d4631a5d8726 | [
"Apache-2.0"
] | null | null | null | train_sppe/src/train.py | marcnunez/CabinMonitoringV1 | f95cf73afcd843f1a8a107517f96d4631a5d8726 | [
"Apache-2.0"
] | 6 | 2021-03-19T01:28:22.000Z | 2022-03-11T23:50:44.000Z | train_sppe/src/train.py | marcnunez/CabinMonitoringV1 | f95cf73afcd843f1a8a107517f96d4631a5d8726 | [
"Apache-2.0"
] | null | null | null | # -----------------------------------------------------
# Copyright (c) Shanghai Jiao Tong University. All rights reserved.
# Written by Jiefeng Li (jeff.lee.sjtu@gmail.com)
# -----------------------------------------------------
import torch
import torch.utils.data
from utils.dataset import coco, cabin
from opt impor... | 30.72973 | 106 | 0.557021 |
40f89afe7e2acecb016d133a7fbfd5ef407e41c9 | 4,147 | py | Python | archives/src/episode4/investigate_case.py | NovelBox/sherlock-no-adventure | 9fe59ade8446d5c27e7bd390de9de42e26fc63a1 | [
"MIT"
] | null | null | null | archives/src/episode4/investigate_case.py | NovelBox/sherlock-no-adventure | 9fe59ade8446d5c27e7bd390de9de42e26fc63a1 | [
"MIT"
] | null | null | null | archives/src/episode4/investigate_case.py | NovelBox/sherlock-no-adventure | 9fe59ade8446d5c27e7bd390de9de42e26fc63a1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Episode 4-3
'''
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
sys.path.append('storybuilder')
from storybuilder.builder.world import World
# DEFINE
TITLE = "事件捜査"
# NOTE: outlines
ABSTRACT = """
$limeは$maryが戻ってこないことに気づき、市場に探しに出かける。$ignesからの情報でどうや... | 45.571429 | 96 | 0.68001 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.