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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3d80d4abe9c83b86ecaed06d16585efb8b583b01 | 258 | py | Python | src/aioice/about.py | SimahoJr/aioice | 2f503e9f81d17a8afd10e643be8a5a618c797ed1 | [
"BSD-3-Clause"
] | null | null | null | src/aioice/about.py | SimahoJr/aioice | 2f503e9f81d17a8afd10e643be8a5a618c797ed1 | [
"BSD-3-Clause"
] | null | null | null | src/aioice/about.py | SimahoJr/aioice | 2f503e9f81d17a8afd10e643be8a5a618c797ed1 | [
"BSD-3-Clause"
] | null | null | null | __author__ = "Jeremy Lainé"
__email__ = "jeremy.laine@m4x.org"
__license__ = "BSD"
__summary__ = "An implementation of Interactive Connectivity Establishment (RFC 5245)"
__title__ = "aioice"
__uri__ = "https://github.com/aiortc/aioice"
__version__ = "0.7.7"
| 32.25 | 86 | 0.755814 |
8867c520caf72fedb2f24c6c6835682459849e7b | 368 | py | Python | keras/layers/__init__.py | ikingye/keras | 1a3ee8441933fc007be6b2beb47af67998d50737 | [
"MIT"
] | 5 | 2020-11-30T22:26:03.000Z | 2020-12-01T22:34:25.000Z | keras/layers/__init__.py | ikingye/keras | 1a3ee8441933fc007be6b2beb47af67998d50737 | [
"MIT"
] | 10 | 2020-12-01T22:55:29.000Z | 2020-12-11T18:31:46.000Z | keras/layers/__init__.py | ikingye/keras | 1a3ee8441933fc007be6b2beb47af67998d50737 | [
"MIT"
] | 15 | 2020-11-30T22:12:22.000Z | 2020-12-09T01:32:48.000Z | from tensorflow.keras.layers import *
from . import advanced_activations
from . import convolutional
from . import convolutional_recurrent
from . import core
from . import embeddings
from . import experimental
from . import local
from . import merge
from . import noise
from . import normalization
from . import pooling... | 23 | 37 | 0.80163 |
0c5fcdbdb84b17cb2f4d3c398cf630b31ecdfbf2 | 358 | py | Python | Python-Refresher/list.py | Ruhul12/Django | e6c6c2f125386212c0a7c7b2aed4beee649b39bd | [
"MIT"
] | 2 | 2021-09-10T07:43:41.000Z | 2021-09-11T19:40:40.000Z | Python-Refresher/list.py | ruhulaminparvez/Django | e6c6c2f125386212c0a7c7b2aed4beee649b39bd | [
"MIT"
] | null | null | null | Python-Refresher/list.py | ruhulaminparvez/Django | e6c6c2f125386212c0a7c7b2aed4beee649b39bd | [
"MIT"
] | null | null | null | # List
dog_names = ["tom", "sean", "sally", "mark"]
print(type(dog_names))
print(dog_names)
# Adding Item On Last Position
dog_names.append("sam")
print(dog_names)
# Adding Item On First Position
dog_names.insert(0, "bruz")
print(dog_names)
# Delete Items
del(dog_names[0])
print(dog_names)
# Length Of List
pr... | 14.916667 | 44 | 0.712291 |
e0f657126ee0d7de64396282a935abf3ea9b54a2 | 5,340 | py | Python | opencv/semantic_segmetation_opencv.py | vanduc103/coral_examples | a514d003a3948cb0888d2dabc0bdd93939f8ddd0 | [
"Apache-2.0"
] | null | null | null | opencv/semantic_segmetation_opencv.py | vanduc103/coral_examples | a514d003a3948cb0888d2dabc0bdd93939f8ddd0 | [
"Apache-2.0"
] | null | null | null | opencv/semantic_segmetation_opencv.py | vanduc103/coral_examples | a514d003a3948cb0888d2dabc0bdd93939f8ddd0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 33.375 | 97 | 0.702247 |
4a3ab5523bcaee8b874371e09eb17e2fb5d524e9 | 30,892 | py | Python | src/transformers/models/auto/tokenization_auto.py | techthiyanes/transformers | 705d65368fb28246534ef636fe62c008f4fb2682 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/auto/tokenization_auto.py | techthiyanes/transformers | 705d65368fb28246534ef636fe62c008f4fb2682 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/auto/tokenization_auto.py | techthiyanes/transformers | 705d65368fb28246534ef636fe62c008f4fb2682 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# 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... | 50.642623 | 126 | 0.62207 |
3356cf54493b802d6b5b3e2d0b35b1bcef283860 | 756 | py | Python | gspan_mining/benchmarkPlots/plot_chemical_graphs.py | NaazS03/gSpan | 45a500c3ff50385ef227956166a765e372574141 | [
"MIT"
] | null | null | null | gspan_mining/benchmarkPlots/plot_chemical_graphs.py | NaazS03/gSpan | 45a500c3ff50385ef227956166a765e372574141 | [
"MIT"
] | null | null | null | gspan_mining/benchmarkPlots/plot_chemical_graphs.py | NaazS03/gSpan | 45a500c3ff50385ef227956166a765e372574141 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
lines = []
line_styles = ['-', '--']
line_colors = ['red', 'blue']
x = [3,4,5,6,7,8,9,10]
y_num_total_graphs = [18121,5935,3608,2121,1770,1224,977,844]
y_num_closed_graphs = [2704,1642,1177,813,689,552,481,401]
line, = plt.plot(x, y_num_total_graphs, line_styles[0], color=line_colors... | 31.5 | 99 | 0.732804 |
d5cc187383cdcf7033bd73f05413a0c6c2a7c1e7 | 25,196 | py | Python | src/cfnlint/config.py | pmahony893/cfn-lint | e85ea913e2012e3ee2d7465a57eeda690be8c437 | [
"MIT-0"
] | null | null | null | src/cfnlint/config.py | pmahony893/cfn-lint | e85ea913e2012e3ee2d7465a57eeda690be8c437 | [
"MIT-0"
] | null | null | null | src/cfnlint/config.py | pmahony893/cfn-lint | e85ea913e2012e3ee2d7465a57eeda690be8c437 | [
"MIT-0"
] | null | null | null | """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
import sys
import argparse
import logging
import glob
import json
import os
import copy
from pathlib import Path
import six
import jsonschema
import cfnlint.decode.cfn_yaml
from cfnlint.version import __version__
f... | 37.438336 | 167 | 0.605334 |
84051f01d5b4a309ff74500544d1263fd0c9d60e | 6,407 | py | Python | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/lb/lbwlm_lbvserver_binding.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/lb/lbwlm_lbvserver_binding.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/lb/lbwlm_lbvserver_binding.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2016 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... | 30.951691 | 125 | 0.722179 |
42b542906887a1af25505c11574b495b50d89648 | 814 | py | Python | Collect/ETmonitor/Ei_monthly.py | ali1100/wa | 700e5014533c45f38a245c3abdeacc537cb307bc | [
"Apache-2.0"
] | 16 | 2017-04-27T21:22:37.000Z | 2020-10-21T12:57:03.000Z | Collect/ETmonitor/Ei_monthly.py | ali1100/wa | 700e5014533c45f38a245c3abdeacc537cb307bc | [
"Apache-2.0"
] | 1 | 2017-06-17T08:07:53.000Z | 2017-08-22T12:28:37.000Z | Collect/ETmonitor/Ei_monthly.py | wateraccounting/wa | 29ed8e7eac732135678a5d171cd5e53a54c95313 | [
"Apache-2.0"
] | 19 | 2016-10-24T13:24:34.000Z | 2020-02-03T17:42:22.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Jan 03 09:35:22 2018
@author: tih
"""
import os
import sys
from DataAccess import DownloadData
def main(Dir, Startdate='', Enddate='', latlim=[-60, 70], lonlim=[-180, 180], Waitbar = 1):
"""
This function downloads monthly ETmonitor data
Keyword arguments:
... | 25.4375 | 106 | 0.635135 |
8dfd466d3619045ce9c9fef81ef4d6bef9ce7675 | 1,466 | py | Python | BookClub/tests/views/recommender_views/test_recommender_abstract_view.py | amir-rahim/BookClubSocialNetwork | b69a07cd33592f700214252a64c7c1c53845625d | [
"MIT"
] | 4 | 2022-02-04T02:11:48.000Z | 2022-03-12T21:38:01.000Z | BookClub/tests/views/recommender_views/test_recommender_abstract_view.py | amir-rahim/BookClubSocialNetwork | b69a07cd33592f700214252a64c7c1c53845625d | [
"MIT"
] | 51 | 2022-02-01T18:56:23.000Z | 2022-03-31T15:35:37.000Z | BookClub/tests/views/recommender_views/test_recommender_abstract_view.py | amir-rahim/BookClubSocialNetwork | b69a07cd33592f700214252a64c7c1c53845625d | [
"MIT"
] | null | null | null | """Unit testing for the Recommender Base view"""
from django.urls import reverse
from django.test import TestCase, tag
from BookClub.models import User, Club
@tag('views', 'recommendations', 'base')
class BaseUserRecommenderViewTestCase(TestCase):
"""Testing for the Recommender Base view"""
fixtures = [
... | 40.722222 | 106 | 0.720327 |
1e79c21463c173377375ac3775bdd5836b86037a | 3,520 | py | Python | app_dir/app_notes_and_tips.py | virginia4/app_run_local | 5bcb8280dda777f972b09f49b420040db6bfeb77 | [
"MIT"
] | null | null | null | app_dir/app_notes_and_tips.py | virginia4/app_run_local | 5bcb8280dda777f972b09f49b420040db6bfeb77 | [
"MIT"
] | null | null | null | app_dir/app_notes_and_tips.py | virginia4/app_run_local | 5bcb8280dda777f972b09f49b420040db6bfeb77 | [
"MIT"
] | null | null | null | import dash_html_components as html
from . import app
about = """
In this page you can find useful tips of how to use the tool and get inform about updates,
issues adn changes. The app is heavily depending on your contributions, either that is
an new idea of how to make the tool more useful or reports of issues. Fee... | 51.014493 | 299 | 0.536364 |
eead97ceb93d8ee5cc84a0a9cbab3dc4a894a739 | 1,621 | py | Python | modelvshuman/datasets/info_mappings.py | TizianThieringer/model-vs-human | 17729b8167520f682d93d55c340c27de07bb2681 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 158 | 2021-06-04T15:19:58.000Z | 2022-03-30T00:31:28.000Z | modelvshuman/datasets/info_mappings.py | TizianThieringer/model-vs-human | 17729b8167520f682d93d55c340c27de07bb2681 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 7 | 2021-07-20T03:57:34.000Z | 2022-02-01T11:00:47.000Z | modelvshuman/datasets/info_mappings.py | TizianThieringer/model-vs-human | 17729b8167520f682d93d55c340c27de07bb2681 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 14 | 2021-06-16T13:33:11.000Z | 2022-03-29T15:04:09.000Z | from abc import ABC
class ImagePathToInformationMapping(ABC):
def __init__(self):
pass
def __call__(self, full_path):
pass
class ImageNetInfoMapping(ImagePathToInformationMapping):
"""
For ImageNet-like directory structures without sessions/conditions:
.../{category}/{im... | 28.438596 | 96 | 0.636027 |
e3b374f523813478fc7a31d204e877898d929145 | 1,421 | py | Python | windows/capture_window_480.py | Anonymousey/bongbot | 3498d379ef28206f3325691e340347baa14c2c97 | [
"MIT"
] | null | null | null | windows/capture_window_480.py | Anonymousey/bongbot | 3498d379ef28206f3325691e340347baa14c2c97 | [
"MIT"
] | null | null | null | windows/capture_window_480.py | Anonymousey/bongbot | 3498d379ef28206f3325691e340347baa14c2c97 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
capture_window_480.py
"""
import cygwinreg
import argparse
def set_registry(top, left, width, height):
'''set screen capture recorder registry settings
to desired pos and dimensions
'''
cap = cygwinreg.OpenKey(
cygwinreg.HKEY_CURRENT_USER,
"Software\\screen-capture-recorder",... | 30.234043 | 86 | 0.699507 |
275bf4c77ca02fa01e2141366668da9930d4be91 | 5,859 | py | Python | kCharge-firmware/temperature.py | koalacreations/kCharge-firmware | 6abbf5c3ba9eb4dba6877860f0d518b193ffa9bb | [
"MIT"
] | null | null | null | kCharge-firmware/temperature.py | koalacreations/kCharge-firmware | 6abbf5c3ba9eb4dba6877860f0d518b193ffa9bb | [
"MIT"
] | null | null | null | kCharge-firmware/temperature.py | koalacreations/kCharge-firmware | 6abbf5c3ba9eb4dba6877860f0d518b193ffa9bb | [
"MIT"
] | null | null | null | import time
import os
import json
import machine
import onewire
import ds18x20
import ubinascii
from leds import YELLOW, OFF, RED, GREEN
def convert_sensor_str(sensor):
return ubinascii.hexlify(sensor).decode("utf8")
def convert_sensor_byte(sensor):
return ubinascii.unhexlify(sensor)
class TemperatureSens... | 35.295181 | 129 | 0.587984 |
ff0dd891e013296a27d8f9b39ee4743db9105dc8 | 16,798 | py | Python | tsparser/ui.py | m4tx/techswarm-receiver | cf0a34c8bd2c98ce72ec3ab56231be556a55fb6b | [
"MIT"
] | null | null | null | tsparser/ui.py | m4tx/techswarm-receiver | cf0a34c8bd2c98ce72ec3ab56231be556a55fb6b | [
"MIT"
] | null | null | null | tsparser/ui.py | m4tx/techswarm-receiver | cf0a34c8bd2c98ce72ec3ab56231be556a55fb6b | [
"MIT"
] | null | null | null | import _curses, curses
from bisect import bisect_left
import math
import os
from threading import Thread
from time import sleep
from tsparser.utils import Singleton, StatisticDataCollector
class UserInterface(metaclass=Singleton):
"""
User Interface is a singleton. Once ran, it renders UI until exiting the a... | 44.439153 | 119 | 0.625134 |
e2a316bf5b0432533771df84ad8e6b880e422544 | 990 | py | Python | src/training.py | Sirius207/Subtractor | ebd1c57a7e3392f0516125db30fee5c2bc9e6936 | [
"MIT"
] | null | null | null | src/training.py | Sirius207/Subtractor | ebd1c57a7e3392f0516125db30fee5c2bc9e6936 | [
"MIT"
] | null | null | null | src/training.py | Sirius207/Subtractor | ebd1c57a7e3392f0516125db30fee5c2bc9e6936 | [
"MIT"
] | null | null | null | def train(DATA, BATCH_SIZE, trainingOutputPath, model):
x_train = DATA[0][0]
y_train = DATA[0][1]
x_val = DATA[1][0]
y_val = DATA[1][1]
training_log = list()
with open(trainingOutputPath, 'w') as output:
output.write('loss,acc,val_loss,val_acc\n')
for iteration in range(200... | 38.076923 | 76 | 0.568687 |
500432371e1577edeb28e4aaa9403f8e52a213aa | 45,158 | py | Python | dff_rfcn/core/module.py | faisalnazir/Deep-Feature-Flow | 489959fa4dc2a287ec28237d9eb4eec46ebce698 | [
"MIT"
] | null | null | null | dff_rfcn/core/module.py | faisalnazir/Deep-Feature-Flow | 489959fa4dc2a287ec28237d9eb4eec46ebce698 | [
"MIT"
] | null | null | null | dff_rfcn/core/module.py | faisalnazir/Deep-Feature-Flow | 489959fa4dc2a287ec28237d9eb4eec46ebce698 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Deep Feature Flow
# Copyright (c) 2017 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Modified by Yuwen Xiong
# --------------------------------------------------------
# Based on:
# MX-RCNN
# Copyright (c) 2016 by Contributors
# Licen... | 42.046555 | 140 | 0.617011 |
9d21c1bd4182c9790ccb22da6a62d458212b393b | 719 | py | Python | PacoteDownload/Mundo 3 do curso/Desafio 101.py | Gabriel-ER/CursoEmVideodoYoutube-Python- | 0733ce05f28f8f87603270ef5ab7cb51c8f2c5ac | [
"MIT"
] | null | null | null | PacoteDownload/Mundo 3 do curso/Desafio 101.py | Gabriel-ER/CursoEmVideodoYoutube-Python- | 0733ce05f28f8f87603270ef5ab7cb51c8f2c5ac | [
"MIT"
] | null | null | null | PacoteDownload/Mundo 3 do curso/Desafio 101.py | Gabriel-ER/CursoEmVideodoYoutube-Python- | 0733ce05f28f8f87603270ef5ab7cb51c8f2c5ac | [
"MIT"
] | null | null | null | def voto(ano_de_nascimento, analfabeto='N'):
from datetime import datetime, date
analfabeto = analfabeto.upper()
# posso pegar o ano também com:
idade = date.today().year - ano_de_nascimento
# idade = datetime.now().year - ano_de_nascimento
print(f'Idade: {idade} anos.')
if idade < 16:
... | 32.681818 | 61 | 0.62726 |
1967dd77d7645901712ca6f47decb61d96d08853 | 11,797 | py | Python | tests/test_unit.py | derrickorama/image_optim | 5d2a776409f48b43d26e311e58b72ca58992f3df | [
"MIT"
] | 2 | 2016-10-19T13:04:25.000Z | 2021-08-21T13:50:40.000Z | tests/test_unit.py | derrickorama/image_optim | 5d2a776409f48b43d26e311e58b72ca58992f3df | [
"MIT"
] | null | null | null | tests/test_unit.py | derrickorama/image_optim | 5d2a776409f48b43d26e311e58b72ca58992f3df | [
"MIT"
] | 1 | 2017-12-07T11:57:21.000Z | 2017-12-07T11:57:21.000Z | # -*- coding: utf-8 -*-
import os
import shutil
import subprocess
import unittest
import nose
from .context import ImageOptim, NoImagesOptimizedError
class ImageOptimTests(unittest.TestCase):
"""\"optimize\" method tests"""
jpg_file_orig = os.path.join(os.path.dirname(__file__), 'assets', 'jpg-example.jpg... | 40.539519 | 133 | 0.675595 |
6da7587bb073507a827c60dd162d9b83b77bc4e8 | 2,532 | py | Python | rpython/translator/test/test_interactive.py | kantai/passe-pypy-taint-tracking | b60a3663f8fe89892dc182c8497aab97e2e75d69 | [
"MIT"
] | 2 | 2016-07-06T23:30:20.000Z | 2017-05-30T15:59:31.000Z | rpython/translator/test/test_interactive.py | kantai/passe-pypy-taint-tracking | b60a3663f8fe89892dc182c8497aab97e2e75d69 | [
"MIT"
] | null | null | null | rpython/translator/test/test_interactive.py | kantai/passe-pypy-taint-tracking | b60a3663f8fe89892dc182c8497aab97e2e75d69 | [
"MIT"
] | 2 | 2020-07-09T08:14:22.000Z | 2021-01-15T18:01:25.000Z | from rpython.translator.interactive import Translation
import py
def test_simple_annotate():
def f(x,y):
return x+y
t = Translation(f, [int, int])
assert t.context is t.driver.translator
assert t.config is t.driver.config is t.context.config
s = t.annotate()
assert s.knowntype ==... | 21.641026 | 71 | 0.603081 |
31f057021cfdb445f46a8b994d0c0ae4c7b335dc | 3,185 | py | Python | keywords.py | deokhwaStory/naver_keywords | d38bab651183d5087edf7db8ca3a32eb964d00ed | [
"MIT"
] | null | null | null | keywords.py | deokhwaStory/naver_keywords | d38bab651183d5087edf7db8ca3a32eb964d00ed | [
"MIT"
] | null | null | null | keywords.py | deokhwaStory/naver_keywords | d38bab651183d5087edf7db8ca3a32eb964d00ed | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import requests
import json
import pymongo
from bs4 import BeautifulSoup
from sqlalchemy import *
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
# In[2]:
base = declarative_base()
class NaverKeywords(base):
__tabl... | 23.07971 | 104 | 0.6 |
0dede1a051a4efc1743ac075bd64382b654e5f72 | 22,958 | py | Python | stable_baselines/a2c/utils.py | hzm2016/stable-baselines | ebd5cf79ecf8d263becafe293c2034ffcb9bcce4 | [
"MIT"
] | 2 | 2019-12-02T08:59:50.000Z | 2021-08-20T12:38:25.000Z | stable_baselines/a2c/utils.py | hzm2016/stable-baselines-option-critic | 02935592d7bceb77b49bd6deef836c67a23e408b | [
"MIT"
] | null | null | null | stable_baselines/a2c/utils.py | hzm2016/stable-baselines-option-critic | 02935592d7bceb77b49bd6deef836c67a23e408b | [
"MIT"
] | null | null | null | import os
from collections import deque
import numpy as np
import tensorflow as tf
def fc(x, scope, nh, *, init_scale=1.0, init_bias=0.0):
with tf.variable_scope(scope):
nin = x.get_shape()[1].value
w = tf.get_variable("w", [nin, nh], initializer=ortho_init(init_scale))
b = tf.get_variabl... | 38.199667 | 119 | 0.657069 |
9bd86b099d537cf76d0c8758bfc0b278027259e2 | 2,275 | py | Python | python/gff/gff2orthocluster.py | lotharwissler/bioinformatics | 83a53771222ecb0759e3b4bfa2018d2cd7647643 | [
"MIT"
] | 10 | 2016-01-13T00:39:30.000Z | 2020-11-30T05:56:19.000Z | python/gff/gff2orthocluster.py | lotharwissler/bioinformatics | 83a53771222ecb0759e3b4bfa2018d2cd7647643 | [
"MIT"
] | 1 | 2017-02-09T22:46:49.000Z | 2017-02-09T22:46:49.000Z | python/gff/gff2orthocluster.py | lotharwissler/bioinformatics | 83a53771222ecb0759e3b4bfa2018d2cd7647643 | [
"MIT"
] | 10 | 2015-10-09T00:29:16.000Z | 2019-06-09T05:32:15.000Z | #!/usr/bin/python
import os, sys # low level handling, such as command line stuff
import string # string methods available
import re # regular expressions
import getopt # comand line argument handling
from low import * # custom functions, written by myself
import gff3
from collections import de... | 31.597222 | 83 | 0.487912 |
5b6bc0d7712ead86ff983e74a015b350ce708419 | 38,484 | py | Python | Day_13/AoCUtils.py | Uklusi/AdventOfCode2019 | 4f9bd09183129b78258647fa2b0a42d84d9c0820 | [
"MIT"
] | null | null | null | Day_13/AoCUtils.py | Uklusi/AdventOfCode2019 | 4f9bd09183129b78258647fa2b0a42d84d9c0820 | [
"MIT"
] | null | null | null | Day_13/AoCUtils.py | Uklusi/AdventOfCode2019 | 4f9bd09183129b78258647fa2b0a42d84d9c0820 | [
"MIT"
] | null | null | null | from __future__ import annotations
import hashlib
from typing import Sequence, Iterable, Optional, Callable, Union, Literal, TypeVar, NamedTuple, NoReturn, Any, NewType, cast, overload
from collections.abc import Iterable
from io import TextIOWrapper
from copy import copy, deepcopy
from math import gcd
from functools i... | 32.976864 | 151 | 0.595832 |
dd2db19a062e9d80eda287acce37bd759705d4b3 | 1,847 | py | Python | core/migrations/0030_abouttheeditorpage_editor.py | PARINetwork/pari | 08e4c42475ab62b37f3c3ab3ae6369acc2685ecc | [
"BSD-3-Clause"
] | 35 | 2015-10-04T17:07:20.000Z | 2022-03-23T08:10:13.000Z | core/migrations/0030_abouttheeditorpage_editor.py | PARINetwork/pari | 08e4c42475ab62b37f3c3ab3ae6369acc2685ecc | [
"BSD-3-Clause"
] | 322 | 2015-07-31T17:06:47.000Z | 2022-02-10T07:17:55.000Z | core/migrations/0030_abouttheeditorpage_editor.py | PARINetwork/pari | 08e4c42475ab62b37f3c3ab3ae6369acc2685ecc | [
"BSD-3-Clause"
] | 14 | 2016-05-09T10:50:20.000Z | 2021-05-08T14:48:51.000Z | # Generated by Django 2.2 on 2021-06-07 10:54
from django.db import migrations, models
import django.db.models.deletion
import modelcluster.fields
import wagtail.core.fields
class Migration(migrations.Migration):
dependencies = [
('wagtailimages', '0001_squashed_0021'),
('wagtailcore', '0041_gro... | 40.152174 | 191 | 0.59935 |
1434130e0a919ba49284a2d8e13d2e03c2fbfa2d | 4,524 | py | Python | src/tools/antool/syscalltable.py | krzycz/pmemfile | a1b9897a90cd223e24c10c4a7558235986f0fad3 | [
"BSD-3-Clause"
] | 82 | 2017-06-30T13:54:44.000Z | 2022-03-13T02:51:28.000Z | src/tools/antool/syscalltable.py | krzycz/pmemfile | a1b9897a90cd223e24c10c4a7558235986f0fad3 | [
"BSD-3-Clause"
] | 40 | 2017-05-12T13:27:14.000Z | 2017-11-16T19:47:40.000Z | src/tools/antool/syscalltable.py | krzycz/pmemfile | a1b9897a90cd223e24c10c4a7558235986f0fad3 | [
"BSD-3-Clause"
] | 15 | 2017-05-12T12:32:01.000Z | 2022-02-28T14:09:11.000Z | #!/usr/bin/python3
#
# Copyright 2017, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions... | 41.127273 | 120 | 0.521662 |
05e717ee1f19cfd348b43dd802012e128a07d155 | 78 | py | Python | pos.py | galleu/autobookdl | 18802f4dbb1a42a2a19d953bcfd0ea04ff5a037a | [
"MIT"
] | null | null | null | pos.py | galleu/autobookdl | 18802f4dbb1a42a2a19d953bcfd0ea04ff5a037a | [
"MIT"
] | null | null | null | pos.py | galleu/autobookdl | 18802f4dbb1a42a2a19d953bcfd0ea04ff5a037a | [
"MIT"
] | null | null | null | import pyautogui
while 1:
pos = pyautogui.position()
print(pos)
| 13 | 31 | 0.628205 |
ae96cf9db54ba6f25d391416577898ab8f4405a1 | 1,585 | py | Python | server/config/asgi.py | kfields/django-arcade | 24df3d43dde2d69df333529d8790507fb1f5fcf1 | [
"MIT"
] | 1 | 2021-10-03T05:44:32.000Z | 2021-10-03T05:44:32.000Z | server/config/asgi.py | kfields/django-arcade | 24df3d43dde2d69df333529d8790507fb1f5fcf1 | [
"MIT"
] | null | null | null | server/config/asgi.py | kfields/django-arcade | 24df3d43dde2d69df333529d8790507fb1f5fcf1 | [
"MIT"
] | null | null | null | """
ASGI config for config 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.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
from ariadne.asgi import GraphQL
fro... | 25.15873 | 87 | 0.738801 |
c8aa3c326e492a6e7f4b922ef309b583d1dd22c4 | 138 | py | Python | app/__init__.py | vax521/PublicationMS | 10d03fbd67d25e68497d2ae2c7a0d53cc8f0248e | [
"MIT"
] | 3 | 2019-06-15T09:47:30.000Z | 2022-01-16T07:06:06.000Z | app/__init__.py | vax521/PublicationMS | 10d03fbd67d25e68497d2ae2c7a0d53cc8f0248e | [
"MIT"
] | null | null | null | app/__init__.py | vax521/PublicationMS | 10d03fbd67d25e68497d2ae2c7a0d53cc8f0248e | [
"MIT"
] | 3 | 2018-07-03T03:22:10.000Z | 2019-06-15T09:48:14.000Z | from flask import Flask
app = Flask(__name__)
#读取配置文件信息
app.config.from_object('config')
from app import views
from app import retrieval
| 17.25 | 32 | 0.797101 |
72c284f28543ba85421744da067a5d0205e21380 | 4,449 | py | Python | combs_pub/rotamer/rotamer.py | npolizzi/combs_pub | a649d6104d7fb81cd75d9a838d630fda1ec5cc4e | [
"MIT"
] | null | null | null | combs_pub/rotamer/rotamer.py | npolizzi/combs_pub | a649d6104d7fb81cd75d9a838d630fda1ec5cc4e | [
"MIT"
] | null | null | null | combs_pub/rotamer/rotamer.py | npolizzi/combs_pub | a649d6104d7fb81cd75d9a838d630fda1ec5cc4e | [
"MIT"
] | 2 | 2020-11-02T23:04:27.000Z | 2021-07-11T16:41:36.000Z | import prody as pr
__all__ = ['get_chi', 'calc_rotamer']
#### ADAPTED FROM LENNA PETERSON https://gist.github.com/lennax/0f5f65ddbfa278713f58 #####
def get_chi(residue_sele, atoms_list):
'''Take parsedvdm and a list of 4 atoms and calculate dihedral in prody
Helper function for rotamer()'''
prody_list ... | 39.723214 | 128 | 0.365475 |
7808f1fe279cfff61b8016ed37ddb3ce9f42285d | 3,343 | py | Python | pyntnclick/utils.py | CTPUG/pyntnclick | 36082e663caba121b851b19f205c78e44936598b | [
"MIT"
] | 3 | 2020-01-02T10:11:14.000Z | 2021-11-16T08:43:08.000Z | pyntnclick/utils.py | CTPUG/pyntnclick | 36082e663caba121b851b19f205c78e44936598b | [
"MIT"
] | 1 | 2019-09-08T07:07:46.000Z | 2019-09-08T07:07:46.000Z | pyntnclick/utils.py | CTPUG/pyntnclick | 36082e663caba121b851b19f205c78e44936598b | [
"MIT"
] | 1 | 2020-08-29T20:04:52.000Z | 2020-08-29T20:04:52.000Z | # Misc utils I don't know where else to put
from __future__ import print_function, division
import sys
import pygame
from pygame.color import Color
from pygame.colordict import THECOLORS
from pygame.locals import SRCALPHA
from pygame.surface import Surface
if sys.version_info.major == 2:
str_type = basestring ... | 31.242991 | 78 | 0.639545 |
8ac393a1f2b0b7f49f7738801c95b92737645ced | 2,956 | py | Python | apps/win/mintty/mintty.py | hsnyder/knausj_talon | b25d7155d1c43aa8dd3cdb24164fb2c154d794e7 | [
"Unlicense"
] | 4 | 2020-07-26T00:31:29.000Z | 2021-06-24T15:07:02.000Z | apps/win/mintty/mintty.py | hsnyder/knausj_talon | b25d7155d1c43aa8dd3cdb24164fb2c154d794e7 | [
"Unlicense"
] | 1 | 2020-09-19T15:50:02.000Z | 2020-09-19T17:08:14.000Z | apps/win/mintty/mintty.py | hsnyder/knausj_talon | b25d7155d1c43aa8dd3cdb24164fb2c154d794e7 | [
"Unlicense"
] | 1 | 2021-09-20T14:45:08.000Z | 2021-09-20T14:45:08.000Z | from talon import Context, Module, actions, imgui, settings, ui
import os
import subprocess
mod = Module()
mod.apps.mintty = """
os: windows
and app.name: Terminal
os: windows
and app.name: mintty.exe
"""
ctx = Context()
ctx.matches = r"""
app: mintty
"""
directories_to_remap = {}
directories_to_excl... | 25.482759 | 102 | 0.586604 |
99e3bd926e1075700581eb63e4f89bb7c74d0a75 | 17,183 | py | Python | _build/jupyter_execute/contents/background/03_basic_hydrogeology.py | prabhasyadav/iGW-I | eba32830f32f1109a7bee600c65832af0e7183fa | [
"CC-BY-4.0"
] | null | null | null | _build/jupyter_execute/contents/background/03_basic_hydrogeology.py | prabhasyadav/iGW-I | eba32830f32f1109a7bee600c65832af0e7183fa | [
"CC-BY-4.0"
] | null | null | null | _build/jupyter_execute/contents/background/03_basic_hydrogeology.py | prabhasyadav/iGW-I | eba32830f32f1109a7bee600c65832af0e7183fa | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[4]:
# required libraries
import numpy as np
import matplotlib.pyplot as plt
import panel as pn
import pandas as pd
pn.extension("katex")
#from IPython.display import Image, Video
#import warnings
#warnings.filterwarnings('ignore')
# ## Lecture 1 - Course Introduction/... | 39.683603 | 532 | 0.695047 |
b71e6b3004af1e4050973b36f2a38d03ed10f61c | 5,180 | py | Python | epochalypse.py | pstirparo/utils | 8fcf56e08f173afd615a5394b7eeee7f72b3509c | [
"Apache-2.0"
] | 31 | 2016-11-20T14:24:05.000Z | 2022-02-04T16:41:04.000Z | epochalypse.py | pstirparo/utils | 8fcf56e08f173afd615a5394b7eeee7f72b3509c | [
"Apache-2.0"
] | 2 | 2016-11-20T17:51:11.000Z | 2020-05-13T09:50:23.000Z | epochalypse.py | pstirparo/utils | 8fcf56e08f173afd615a5394b7eeee7f72b3509c | [
"Apache-2.0"
] | 8 | 2017-05-31T18:12:57.000Z | 2021-05-03T14:13:00.000Z | #! /usr/bin/python
# -*- coding: iso-8859-15 -*-
#############################################################################
## ##
## Epochalypse.py --- Utility to convert epoch timestamps ##
## ... | 35 | 94 | 0.567375 |
6d0be790d6942b3ca72c59ec3ee7b794ad44f591 | 1,753 | py | Python | setup.py | mcsekrish/deepracer-utils | a97302d4457f87cb0d04c8f57403628c888945c7 | [
"MIT-0"
] | null | null | null | setup.py | mcsekrish/deepracer-utils | a97302d4457f87cb0d04c8f57403628c888945c7 | [
"MIT-0"
] | null | null | null | setup.py | mcsekrish/deepracer-utils | a97302d4457f87cb0d04c8f57403628c888945c7 | [
"MIT-0"
] | null | null | null | #!/usr/bin/env python3
from setuptools import setup, find_packages
from os import path
import versioneer
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='deepra... | 30.224138 | 76 | 0.621791 |
4d8677b463794e178dfca8a5c7982527c0d37b38 | 301 | py | Python | data/multilingual/Latn.TUR/Sans_8/pdf_to_json_test_Latn.TUR_Sans_8.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | 1 | 2021-09-19T19:47:35.000Z | 2021-09-19T19:47:35.000Z | data/multilingual/Latn.TUR/Sans_8/pdf_to_json_test_Latn.TUR_Sans_8.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | data/multilingual/Latn.TUR/Sans_8/pdf_to_json_test_Latn.TUR_Sans_8.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | import pdf_to_json as p2j
import json
url = "file:data/multilingual/Latn.TUR/Sans_8/udhr_Latn.TUR_Sans_8.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
| 30.1 | 71 | 0.810631 |
efc4f9b5b8d816eed4b389d524122b6db49806f5 | 2,415 | py | Python | data/p4VQE/R2/benchmark/startQiskit_Class63.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R2/benchmark/startQiskit_Class63.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R2/benchmark/startQiskit_Class63.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=9
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collection... | 27.443182 | 118 | 0.636439 |
d1eb115028cf3746ebd666b2e68a1d841e91b27e | 1,685 | py | Python | perfkitbenchmarker/version.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 3 | 2018-04-28T13:06:14.000Z | 2020-06-09T02:39:44.000Z | perfkitbenchmarker/version.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 1 | 2021-09-09T07:43:25.000Z | 2021-09-09T10:47:56.000Z | perfkitbenchmarker/version.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 6 | 2019-06-11T18:59:57.000Z | 2021-03-02T19:14:42.000Z | # Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 34.387755 | 74 | 0.673591 |
85cbda925354a1f04106e530720ae8f32525526f | 421 | py | Python | example_metrics.py | preact/preact-python | d2464a206a7e7733889cc9bfe965988218199674 | [
"MIT"
] | 1 | 2017-12-03T09:00:24.000Z | 2017-12-03T09:00:24.000Z | example_metrics.py | preact/preact-python | d2464a206a7e7733889cc9bfe965988218199674 | [
"MIT"
] | null | null | null | example_metrics.py | preact/preact-python | d2464a206a7e7733889cc9bfe965988218199674 | [
"MIT"
] | null | null | null | from preact import log_metrics_bulk
metricsdata = {
'data': [
{
'account_id': '517eda23c82561f72a000005',
'name': 'total-gigabytes-utilized',
'value': 691.751,
'ts': 1428527783
},
{
'account_id': '533dd27f4443aec9e4000001',
'name': 'total-gigabytes-utilized',
'va... | 18.304348 | 47 | 0.60095 |
a3b48af6cfe177d33c6fb49425812453c005fcc7 | 1,235 | py | Python | tasks.py | shad0w008/Scanver | cbe03d38422641e83275bfbc8d1ae93f42c3f387 | [
"Apache-2.0"
] | 22 | 2019-01-25T02:39:08.000Z | 2021-09-19T06:44:20.000Z | tasks.py | killvxk/Scanver | b23ac4753241f95e28587b82ae66672dd3eb6b7e | [
"Apache-2.0"
] | null | null | null | tasks.py | killvxk/Scanver | b23ac4753241f95e28587b82ae66672dd3eb6b7e | [
"Apache-2.0"
] | 13 | 2019-06-11T09:32:34.000Z | 2021-06-28T15:58:32.000Z | #!/usr/bin/env python3
# encoding=utf-8
#codeby 道长且阻
#email @ydhcui/QQ664284092
from core import scan
from service import app,TaskManage
@TaskManage.task(tasktype='-1')
def handwork():
'''手工录入'''
pass
@TaskManage.task(tasktype='-1')
def automatic():
'''批量导入'''
pass
@TaskManage.task(tasktype... | 18.712121 | 61 | 0.567611 |
ce4051a44f2fae8f90e26b773ffdccc8e5062477 | 2,184 | py | Python | entity/models.py | userlocalhost/airone-1 | 8aabeabb65fd2117876380f1f69a04f0cf39889d | [
"MIT"
] | null | null | null | entity/models.py | userlocalhost/airone-1 | 8aabeabb65fd2117876380f1f69a04f0cf39889d | [
"MIT"
] | null | null | null | entity/models.py | userlocalhost/airone-1 | 8aabeabb65fd2117876380f1f69a04f0cf39889d | [
"MIT"
] | null | null | null | from django.db import models
from airone.lib.acl import ACLObjType
from acl.models import ACLBase
from webhook.models import Webhook
class EntityAttr(ACLBase):
# This parameter is needed to make a relationship to the corresponding Entity at importing
parent_entity = models.ForeignKey("Entity", on_delete=model... | 37.655172 | 99 | 0.702381 |
334e5746085f8fc60a167720a3f39ee1ba379b78 | 513 | py | Python | setup.py | akush07/Forest-Fire-Prediction | 37d152dc96f16e1adaaaf6c06d3959b5aaa6807c | [
"MIT"
] | null | null | null | setup.py | akush07/Forest-Fire-Prediction | 37d152dc96f16e1adaaaf6c06d3959b5aaa6807c | [
"MIT"
] | null | null | null | setup.py | akush07/Forest-Fire-Prediction | 37d152dc96f16e1adaaaf6c06d3959b5aaa6807c | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='The Aim is to predict forest fire before it happens based on dataset that contains tree observations from four areas of the Roosevelt National Forest in Colorado. All observations are ... | 46.636364 | 340 | 0.758285 |
b18ddc38a345da07f5b59e6d0544f92b041721a1 | 367 | py | Python | {{cookiecutter.package_name}}/src/{{cookiecutter.app_slug}}/models.py | StuartMacKay/cookiecutter-django-library | 230550d690b6321f283fa73992953a982ec83c86 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.package_name}}/src/{{cookiecutter.app_slug}}/models.py | StuartMacKay/cookiecutter-django-library | 230550d690b6321f283fa73992953a982ec83c86 | [
"BSD-3-Clause"
] | 3 | 2020-10-06T13:46:18.000Z | 2020-10-06T13:56:02.000Z | {{cookiecutter.package_name}}/src/{{cookiecutter.app_slug}}/models.py | StuartMacKay/cookiecutter-django-library | 230550d690b6321f283fa73992953a982ec83c86 | [
"BSD-3-Clause"
] | null | null | null | {% if cookiecutter.create_copyright_notice == "y" %}
{%- include "resources/copyright/header.txt" %}
{% endif -%}
from django.db import models
from django.utils.translation import gettext_lazy as _
{% if cookiecutter.create_project == "y" %}
class Example(models.Model):
name = models.CharField(verbose_name=_("N... | 30.583333 | 78 | 0.713896 |
ab7470f2e871220c3ced7b21bfa03b033d46f191 | 636 | py | Python | LeetCodeSolutions/python/301_Remove_Invalid_Parentheses.py | ChuanleiGuo/AlgorithmsPlayground | 90b6287b742c8bfd3797540c408d679be2821a40 | [
"MIT"
] | 1 | 2017-03-27T13:38:37.000Z | 2017-03-27T13:38:37.000Z | LeetCodeSolutions/python/301_Remove_Invalid_Parentheses.py | ChuanleiGuo/AlgorithmsPlayground | 90b6287b742c8bfd3797540c408d679be2821a40 | [
"MIT"
] | null | null | null | LeetCodeSolutions/python/301_Remove_Invalid_Parentheses.py | ChuanleiGuo/AlgorithmsPlayground | 90b6287b742c8bfd3797540c408d679be2821a40 | [
"MIT"
] | null | null | null | class Solution(object):
def removeInvalidParentheses(self, s):
"""
:type s: str
:rtype: List[str]
"""
def is_valid(s):
ctr = 0
for c in s:
if c == '(':
ctr += 1
elif c == ')':
ctr ... | 26.5 | 77 | 0.361635 |
f32caa55c950d356164aaa87c397651f6918ed44 | 1,087 | py | Python | tests/utils.py | miracum/ahd2fhir | 0c1bf3e0d86278145f9f1fa5c99a121f8e961d5f | [
"Apache-2.0"
] | 3 | 2021-11-23T16:24:21.000Z | 2022-03-30T07:59:03.000Z | tests/utils.py | miracum/ahd2fhir | 0c1bf3e0d86278145f9f1fa5c99a121f8e961d5f | [
"Apache-2.0"
] | 40 | 2021-05-27T14:26:33.000Z | 2022-03-29T14:29:33.000Z | tests/utils.py | miracum/ahd2fhir | 0c1bf3e0d86278145f9f1fa5c99a121f8e961d5f | [
"Apache-2.0"
] | 1 | 2021-06-30T11:11:01.000Z | 2021-06-30T11:11:01.000Z | import json
from typing import Callable
from fhir.resources.attachment import Attachment
from fhir.resources.documentreference import DocumentReference, DocumentReferenceContent
from fhir.resources.reference import Reference
def get_empty_document_reference():
docref = DocumentReference.construct()
docref.st... | 31.057143 | 88 | 0.713891 |
ec934d694356fb09414b8fd7fc12be50aa472e2a | 496 | py | Python | yumi-control/client/yumi_control/yumi_utils.py | 0aqz0/egm-control | f139980d11f43ae05c306d84dba5b581bf440a51 | [
"MIT"
] | 1 | 2022-03-30T22:57:01.000Z | 2022-03-30T22:57:01.000Z | yumi-control/client/yumi_control/yumi_utils.py | 0aqz0/egm-control | f139980d11f43ae05c306d84dba5b581bf440a51 | [
"MIT"
] | 1 | 2021-11-25T12:11:50.000Z | 2021-11-25T12:11:50.000Z | yumi-control/client/yumi_control/yumi_utils.py | 0aqz0/yumi-control | f139980d11f43ae05c306d84dba5b581bf440a51 | [
"MIT"
] | null | null | null | import numpy as np
from yumipy import YuMiState
def rad2degree(angle):
return angle * 180.0 / np.pi
def clamp_to_limits(joint_angle, lower_bound, upper_bound):
return np.clip(joint_angle, lower_bound, upper_bound)
def set_new_target(target):
state = YuMiState()
state.joint1 = target[0]
state.join... | 26.105263 | 59 | 0.699597 |
7ef21108459851cad510a01f8a916f537ad86df1 | 2,523 | py | Python | ratings/migrations/0001_initial.py | vivekthedev/djangosnippets.org | 1bb3446de36ec5e4135dc9946eb8902875890a6c | [
"BSD-3-Clause"
] | 244 | 2016-08-26T05:25:48.000Z | 2022-03-17T22:51:58.000Z | ratings/migrations/0001_initial.py | vivekthedev/djangosnippets.org | 1bb3446de36ec5e4135dc9946eb8902875890a6c | [
"BSD-3-Clause"
] | 193 | 2016-08-25T15:38:20.000Z | 2022-03-01T11:02:22.000Z | ratings/migrations/0001_initial.py | vivekthedev/djangosnippets.org | 1bb3446de36ec5e4135dc9946eb8902875890a6c | [
"BSD-3-Clause"
] | 67 | 2016-10-22T10:43:09.000Z | 2022-03-23T23:15:59.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("contenttypes", "0001_initial"),
]
... | 34.561644 | 114 | 0.45541 |
f5f85a4d348e2e4ba00458cd3e4e25d56fe1f2f4 | 111,332 | py | Python | virtual/lib/python3.8/site-packages/django/db/models/sql/query.py | ShirQUillE-SandE/the-neighborhood-101 | fda09cb0481d1cd902f5e13b7ed61ed96772121d | [
"MIT"
] | 5 | 2021-09-05T16:11:12.000Z | 2022-03-20T12:28:42.000Z | virtual/lib/python3.8/site-packages/django/db/models/sql/query.py | ShirQUillE-SandE/the-neighborhood-101 | fda09cb0481d1cd902f5e13b7ed61ed96772121d | [
"MIT"
] | 21 | 2021-02-04T01:37:44.000Z | 2022-03-12T01:00:55.000Z | virtual/lib/python3.8/site-packages/django/db/models/sql/query.py | ShirQUillE-SandE/the-neighborhood-101 | fda09cb0481d1cd902f5e13b7ed61ed96772121d | [
"MIT"
] | 27 | 2021-11-10T08:44:10.000Z | 2022-03-30T08:19:46.000Z | """
Create SQL statements for QuerySets.
The code in here encapsulates all of the SQL construction so that QuerySets
themselves do not have to (and could be backed by things other than SQL
databases). The abstraction barrier only works one way: this module has to know
all about the internals of models in order to get ... | 44.657842 | 119 | 0.607139 |
05eb26966dc97e6f024460ad70bd374d28990323 | 1,564 | py | Python | pymnn/pip_package/MNN/nn/__init__.py | stephehuang/MNN | e8d9ee89aca3e8247745fb89b338eca2ad9b583d | [
"Apache-2.0"
] | 3 | 2020-09-26T03:40:17.000Z | 2021-12-26T06:58:11.000Z | pymnn/pip_package/MNN/nn/__init__.py | stephehuang/MNN | e8d9ee89aca3e8247745fb89b338eca2ad9b583d | [
"Apache-2.0"
] | 2 | 2020-06-19T08:04:43.000Z | 2020-10-23T03:34:44.000Z | pymnn/pip_package/MNN/nn/__init__.py | stephehuang/MNN | e8d9ee89aca3e8247745fb89b338eca2ad9b583d | [
"Apache-2.0"
] | 1 | 2021-06-06T06:54:53.000Z | 2021-06-06T06:54:53.000Z | from _mnncengine._nn import *
import _mnncengine._expr as _F
import _mnncengine._nn as _nn
def load_module_from_file(file_name, for_training):
m = _F.load_as_dict(file_name)
inputs_outputs = _F.get_inputs_and_outputs(m)
inputs = []
for key in inputs_outputs[0].keys():
inputs.append(inputs_ou... | 25.225806 | 104 | 0.63491 |
06293df65eda2c5a0384f0bf78ed2766aca79169 | 1,772 | py | Python | usage.py | mdettling/dns-tools | 9a7edc6835bf5800bb52d3d40fbcc8f48b3841ea | [
"MIT"
] | null | null | null | usage.py | mdettling/dns-tools | 9a7edc6835bf5800bb52d3d40fbcc8f48b3841ea | [
"MIT"
] | null | null | null | usage.py | mdettling/dns-tools | 9a7edc6835bf5800bb52d3d40fbcc8f48b3841ea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2020 devsecurity.io <dns-tools@devsecurity.io>
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 limita... | 33.433962 | 128 | 0.73307 |
45647ba876b6668d6a6db51437e11e7709c845aa | 13,139 | py | Python | optuna/multi_objective/trial.py | majiang/optuna | aeeb201f0ab362c47a580dc2e4ed7346bd8501fe | [
"MIT"
] | null | null | null | optuna/multi_objective/trial.py | majiang/optuna | aeeb201f0ab362c47a580dc2e4ed7346bd8501fe | [
"MIT"
] | null | null | null | optuna/multi_objective/trial.py | majiang/optuna | aeeb201f0ab362c47a580dc2e4ed7346bd8501fe | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Sequence
from typing import Union
from optuna import multi_objective
from optuna._deprecated import deprecated
from optuna._study_direction import StudyDirection
from optu... | 33.347716 | 99 | 0.643885 |
cd43012772e2d2ca2aed819c9c52c439b40a78aa | 4,595 | py | Python | snapflow/testing/utils.py | icedevml/snapflow | 329dae3f8eaa70d3a26d38a505faeb45d8eecb57 | [
"BSD-3-Clause"
] | null | null | null | snapflow/testing/utils.py | icedevml/snapflow | 329dae3f8eaa70d3a26d38a505faeb45d8eecb57 | [
"BSD-3-Clause"
] | null | null | null | snapflow/testing/utils.py | icedevml/snapflow | 329dae3f8eaa70d3a26d38a505faeb45d8eecb57 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
import tempfile
from contextlib import contextmanager
from dataclasses import dataclass
from typing import Any, Dict, Iterator, List, Optional
from commonmodel.base import Schema, SchemaLike
from dcp.data_format.handler import get_handler_for_name, infer_schema_for_name
from dcp.dat... | 34.548872 | 82 | 0.661371 |
ba088b116143638256294faf166bf093b5de23c4 | 8,582 | py | Python | software_scripts/0-dnapi.py | 19zhangt/sRNA_analysis_Maize | 8a7688a30f02f0a86b05bd820a8c7d7d110b2767 | [
"MIT"
] | 20 | 2016-10-18T13:33:57.000Z | 2021-12-18T02:04:00.000Z | software_scripts/0-dnapi.py | 19zhangt/sRNA_analysis_Maize | 8a7688a30f02f0a86b05bd820a8c7d7d110b2767 | [
"MIT"
] | 2 | 2016-10-19T21:06:39.000Z | 2017-03-23T18:04:41.000Z | software_scripts/0-dnapi.py | 19zhangt/sRNA_analysis_Maize | 8a7688a30f02f0a86b05bd820a8c7d7d110b2767 | [
"MIT"
] | 6 | 2016-11-10T04:23:14.000Z | 2022-03-10T12:20:11.000Z | #! /usr/bin/env python
import sys
import os.path
import re
import uuid
import signal
import fileinput
import subprocess
from argparse import ArgumentParser
import dnapilib
from dnapilib.io_utils import get_file_obj
from dnapilib.apred import adapter_prediction
from dnapilib.apred import iterative_adapter_prediction
f... | 35.172131 | 80 | 0.589257 |
bdd5bab6a96a311f2d63df79346ac77da721f92a | 3,132 | py | Python | octant/python-gsw/gsw/utilities/utilities.py | kthyng/octant | 65591d87797fa74e0c092d5f50fb0cd703eb412e | [
"BSD-3-Clause"
] | null | null | null | octant/python-gsw/gsw/utilities/utilities.py | kthyng/octant | 65591d87797fa74e0c092d5f50fb0cd703eb412e | [
"BSD-3-Clause"
] | null | null | null | octant/python-gsw/gsw/utilities/utilities.py | kthyng/octant | 65591d87797fa74e0c092d5f50fb0cd703eb412e | [
"BSD-3-Clause"
] | 1 | 2019-05-03T22:14:19.000Z | 2019-05-03T22:14:19.000Z | # -*- coding: utf-8 -*-
from __future__ import division
import os
import numpy as np
__all__ = [
'match_args_return',
'Dict2Struc',
'Cache_npz',
'read_data',
'strip_mask',
]
class match_args_return(object):
r"""Function decorator to homogenize ... | 28.733945 | 79 | 0.591635 |
8b04499cd4bb1b13e5a30b799e74bbac965a2197 | 2,738 | py | Python | makeRsaKeys.py | HoshinoTouko/LearnCryptography | 580dd67bd08ffc586b0ed32838180ea20613ab40 | [
"BSD-3-Clause"
] | null | null | null | makeRsaKeys.py | HoshinoTouko/LearnCryptography | 580dd67bd08ffc586b0ed32838180ea20613ab40 | [
"BSD-3-Clause"
] | null | null | null | makeRsaKeys.py | HoshinoTouko/LearnCryptography | 580dd67bd08ffc586b0ed32838180ea20613ab40 | [
"BSD-3-Clause"
] | null | null | null | # RSA Key Generator
# http://inventwithpython.com/hacking (BSD Licensed)
import random, sys, os, rabinMiller, cryptomath
def main():
# create a public/private keypair with 1024 bit keys
print('Making key files...')
makeKeyFiles('al_sweigart', 1024)
print('Key files made.')
def generateKey(keySize):
... | 36.506667 | 168 | 0.637327 |
1b1eafbdd1a8bcc102342bf0262680dfa5cf1e56 | 5,156 | py | Python | modules/PiDisplaySleep/click-listener/detect_sound.py | benwulmer/magicmirror | f61534893dc7101a563d8af82f500834e5bda88a | [
"MIT"
] | null | null | null | modules/PiDisplaySleep/click-listener/detect_sound.py | benwulmer/magicmirror | f61534893dc7101a563d8af82f500834e5bda88a | [
"MIT"
] | null | null | null | modules/PiDisplaySleep/click-listener/detect_sound.py | benwulmer/magicmirror | f61534893dc7101a563d8af82f500834e5bda88a | [
"MIT"
] | null | null | null | from collections import deque
from datetime import datetime
import time
from pathlib import Path
from typing import Union
import os
from fastdtw import fastdtw
from scipy.spatial.distance import euclidean
import librosa
import numpy as np
import sounddevice as sd
from scipy.spatial import distance
from scipy.signal imp... | 34.373333 | 95 | 0.561288 |
a401d37a3904e37f2bb54984a0e752e075c0f428 | 133 | py | Python | allennlp_models/lm/util/beam_search_generators/__init__.py | shunk031/allennlp-models | d37c5fadeef9326808a84dda0bcfd210a078d6b1 | [
"Apache-2.0"
] | 402 | 2020-03-11T22:58:35.000Z | 2022-03-29T09:05:27.000Z | allennlp_models/lm/util/beam_search_generators/__init__.py | staceywhitmore-inl/allennlp-models | 1e89d5e51cb45f3e77a48d4983bf980088334fac | [
"Apache-2.0"
] | 116 | 2020-03-11T01:26:57.000Z | 2022-03-25T13:03:56.000Z | allennlp_models/lm/util/beam_search_generators/__init__.py | staceywhitmore-inl/allennlp-models | 1e89d5e51cb45f3e77a48d4983bf980088334fac | [
"Apache-2.0"
] | 140 | 2020-03-11T00:51:35.000Z | 2022-03-29T09:05:36.000Z | from .beam_search_generator import BeamSearchGenerator
from .transformer_beam_search_generator import TransformerBeamSearchGenerator
| 44.333333 | 77 | 0.924812 |
05b0b4e60a309cc022447c70ebc4175baf9aba64 | 1,004 | py | Python | qiskit/util.py | Elliot-Coupe/qiskit-terra | 8a604e156ba4c2fa099b1c24cd941f59b9408398 | [
"Apache-2.0"
] | 1 | 2021-08-29T08:00:01.000Z | 2021-08-29T08:00:01.000Z | qiskit/util.py | Elliot-Coupe/qiskit-terra | 8a604e156ba4c2fa099b1c24cd941f59b9408398 | [
"Apache-2.0"
] | 6 | 2021-07-19T21:31:40.000Z | 2022-03-30T07:10:09.000Z | qiskit/util.py | Elliot-Coupe/qiskit-terra | 8a604e156ba4c2fa099b1c24cd941f59b9408398 | [
"Apache-2.0"
] | 1 | 2020-04-15T07:23:23.000Z | 2020-04-15T07:23:23.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 33.466667 | 77 | 0.77988 |
4cbfda5a81b400875aa935ee82eab189c6db3a06 | 2,108 | py | Python | kv_tool.py | TempAccountNull/Xbox_360_Crypto | be40b69bf841badcec77ac01bd641d43bebd7fa3 | [
"BSD-3-Clause"
] | null | null | null | kv_tool.py | TempAccountNull/Xbox_360_Crypto | be40b69bf841badcec77ac01bd641d43bebd7fa3 | [
"BSD-3-Clause"
] | null | null | null | kv_tool.py | TempAccountNull/Xbox_360_Crypto | be40b69bf841badcec77ac01bd641d43bebd7fa3 | [
"BSD-3-Clause"
] | 1 | 2021-06-29T01:29:56.000Z | 2021-06-29T01:29:56.000Z | #!/usr/bin/env python3
from enum import IntEnum
from pathlib import Path
from struct import pack_into
from XeCrypt import XeCryptKeyVaultEncrypt
class ConsoleType(IntEnum):
RETAIL_PHAT = 0
RETAIL_SLIM = 1
TEST_KIT = 2
DEVKIT = 3
def main() -> None:
cpu_key = bytes.fromhex("A55F6604990DD4736DE6A0E09FC57... | 29.277778 | 95 | 0.709677 |
3514e0b84678b114a24f158ff22a57bfec39f0bb | 436 | py | Python | chunk/main.py | andrewgryan/jinja-playground | dff19beb4573f9d0c828084eb9afdbcd0c761fdd | [
"BSD-3-Clause"
] | null | null | null | chunk/main.py | andrewgryan/jinja-playground | dff19beb4573f9d0c828084eb9afdbcd0c761fdd | [
"BSD-3-Clause"
] | null | null | null | chunk/main.py | andrewgryan/jinja-playground | dff19beb4573f9d0c828084eb9afdbcd0c761fdd | [
"BSD-3-Clause"
] | null | null | null | import jinja2
syntax = """
{% set CHUNKS=[] %}
{% for I in range(N) %}
{% do CHUNKS.append(ITEMS[I::N]) %}
{% endfor %}
{% for I in range(N) %}
[[task_{{ '%02d' % I }}]]
[[[environment]]]
HOURS={{ CHUNKS[I] | join(' ') }}
{% endfor %}
"""
environment = jinja2.Environment(extensions=['jinj... | 19.818182 | 62 | 0.53211 |
db8dabdf0f1fa840bf2633f5620ab6db235d0d87 | 69 | py | Python | coding/contains_duplicate/starter.py | alexanderywang/tech-interview-questions | a0098eda33db73d10787e198d1f105532ea32c09 | [
"MIT"
] | null | null | null | coding/contains_duplicate/starter.py | alexanderywang/tech-interview-questions | a0098eda33db73d10787e198d1f105532ea32c09 | [
"MIT"
] | null | null | null | coding/contains_duplicate/starter.py | alexanderywang/tech-interview-questions | a0098eda33db73d10787e198d1f105532ea32c09 | [
"MIT"
] | null | null | null | class Solution:
def hasDuplicate(self, nums: List[int]) -> bool:
| 23 | 52 | 0.681159 |
357a907b004d480559de30f5ea0a6e53cf43ffc9 | 1,243 | py | Python | app/__init__.py | imdreamer2018/blogByFlask | 87f374e40b45c95cb87402c3fe1bf4df226a297d | [
"MIT"
] | 2 | 2020-05-18T00:56:25.000Z | 2020-05-18T00:56:27.000Z | app/__init__.py | imdreamer2018/SimpleBlog | 87f374e40b45c95cb87402c3fe1bf4df226a297d | [
"MIT"
] | 4 | 2020-05-16T13:22:44.000Z | 2020-05-16T13:22:47.000Z | app/__init__.py | imdreamer2018/SimpleBlog | 87f374e40b45c95cb87402c3fe1bf4df226a297d | [
"MIT"
] | null | null | null | import os
from flask import Flask,render_template
from flask_bootstrap import Bootstrap
from flask_mail import Mail
from flask_moment import Moment
from flask_sqlalchemy import SQLAlchemy
from config import config
from flask_login import LoginManager
from flask_migrate import Migrate
from flask_pagedown import... | 28.906977 | 63 | 0.741754 |
3a82e07b26ad5409b0c8fa34c903638fb7d12cfb | 306 | py | Python | lasio/exceptions.py | ae3e/lasio | 8c539b7437c4ee852140df2d9e3be78cc14d38dc | [
"MIT"
] | 8 | 2020-01-27T19:29:37.000Z | 2021-10-02T17:55:01.000Z | lasio/exceptions.py | markderry/lasio | 006a2358b0123efdc11255803408f94ce8291c04 | [
"MIT"
] | 7 | 2020-06-18T11:42:50.000Z | 2020-09-27T13:22:51.000Z | lasio/exceptions.py | markderry/lasio | 006a2358b0123efdc11255803408f94ce8291c04 | [
"MIT"
] | 6 | 2020-05-16T14:03:27.000Z | 2021-08-05T15:00:29.000Z | class LASDataError(Exception):
'''Error during reading of numerical data from LAS file.'''
pass
class LASHeaderError(Exception):
'''Error during reading of header data from LAS file.'''
pass
class LASUnknownUnitError(Exception):
'''Error of unknown unit in LAS file.'''
pass
| 18 | 63 | 0.689542 |
7cd092768bcdae3c458a454ce4dc748f85a0b32c | 5,495 | py | Python | homeassistant/generated/config_flows.py | tggm/core | 8401c1ae533736877476996ec6bd385fb5e41164 | [
"Apache-2.0"
] | 3 | 2021-11-05T13:24:19.000Z | 2022-01-08T12:17:09.000Z | homeassistant/generated/config_flows.py | tggm/core | 8401c1ae533736877476996ec6bd385fb5e41164 | [
"Apache-2.0"
] | null | null | null | homeassistant/generated/config_flows.py | tggm/core | 8401c1ae533736877476996ec6bd385fb5e41164 | [
"Apache-2.0"
] | 2 | 2022-01-10T18:08:10.000Z | 2022-01-21T19:42:34.000Z | """Automatically generated by hassfest.
To update, run python3 -m script.hassfest
"""
# fmt: off
FLOWS = [
"abode",
"accuweather",
"acmeda",
"adax",
"adguard",
"advantage_air",
"aemet",
"agent_dvr",
"airly",
"airnow",
"airthings",
"airtouch4",
"airvisual",
"ala... | 16.20944 | 41 | 0.51465 |
3c2d134679155e01b30f8afb4d3307bd30aedd2f | 295 | py | Python | src/spaceone/monitoring/info/webhook_info.py | xellos00/plugin-amorepacific-monitoring-webhook | d31287c67a2481e055d070a0f254b0a1f8ba75fa | [
"Apache-2.0"
] | 1 | 2022-02-11T02:01:44.000Z | 2022-02-11T02:01:44.000Z | src/spaceone/monitoring/info/webhook_info.py | xellos00/plugin-amorepacific-monitoring-webhook | d31287c67a2481e055d070a0f254b0a1f8ba75fa | [
"Apache-2.0"
] | 2 | 2022-02-10T05:32:56.000Z | 2022-03-17T12:17:20.000Z | src/spaceone/monitoring/info/webhook_info.py | xellos00/plugin-amorepacific-monitoring-webhook | d31287c67a2481e055d070a0f254b0a1f8ba75fa | [
"Apache-2.0"
] | 2 | 2021-08-18T01:38:48.000Z | 2022-02-11T01:47:48.000Z | __all__ = ['WebhookPluginInfo']
from spaceone.api.monitoring.plugin import webhook_pb2, event_pb2
from spaceone.core.pygrpc.message_type import *
def WebhookPluginInfo(result):
result['metadata'] = change_struct_type(result['metadata'])
return webhook_pb2.WebhookPluginInfo(**result)
| 29.5 | 65 | 0.789831 |
eef0f306744ad69413024145579d8d5092d8ce88 | 303 | py | Python | data/multilingual/Latn.BUM/Mono_12/pdf_to_json_test_Latn.BUM_Mono_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | 1 | 2021-09-19T19:47:35.000Z | 2021-09-19T19:47:35.000Z | data/multilingual/Latn.BUM/Mono_12/pdf_to_json_test_Latn.BUM_Mono_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | data/multilingual/Latn.BUM/Mono_12/pdf_to_json_test_Latn.BUM_Mono_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | import pdf_to_json as p2j
import json
url = "file:data/multilingual/Latn.BUM/Mono_12/udhr_Latn.BUM_Mono_12.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
| 30.3 | 73 | 0.811881 |
59a81d0db1d9008b27b8156d01aefd938ea154aa | 4,508 | py | Python | Server/server.py | FredricM/ECE422 | 528bf8a3193394a3318de651ed0abc0bc2eab585 | [
"MIT"
] | null | null | null | Server/server.py | FredricM/ECE422 | 528bf8a3193394a3318de651ed0abc0bc2eab585 | [
"MIT"
] | null | null | null | Server/server.py | FredricM/ECE422 | 528bf8a3193394a3318de651ed0abc0bc2eab585 | [
"MIT"
] | null | null | null | import socket
import sys
import threading
import os
import getpass
import collections
from os.path import isfile, join
class mdict(dict):
def __setitem__(self, key, value):
"""add the given value to the list of values for this key"""
self.setdefault(key, []).append(value)
def createHome(name,... | 26.994012 | 82 | 0.582076 |
ad9290f565451aba1978ddd76827e2f5a1b6d649 | 23,725 | py | Python | datashader/mpl_ext.py | goncaloperes/datashader | 1ae52b65ec8a79920e5db9c6c04487f254428553 | [
"BSD-3-Clause"
] | 706 | 2019-11-15T07:50:54.000Z | 2022-03-31T10:55:04.000Z | datashader/mpl_ext.py | goncaloperes/datashader | 1ae52b65ec8a79920e5db9c6c04487f254428553 | [
"BSD-3-Clause"
] | 223 | 2019-11-15T19:32:54.000Z | 2022-03-31T20:46:21.000Z | datashader/mpl_ext.py | goncaloperes/datashader | 1ae52b65ec8a79920e5db9c6c04487f254428553 | [
"BSD-3-Clause"
] | 106 | 2019-12-05T12:32:54.000Z | 2022-03-31T15:50:00.000Z | from collections import OrderedDict
import warnings
from matplotlib.image import _ImageBase
from matplotlib.patches import Patch
from matplotlib.transforms import Bbox, TransformedBbox, BboxTransform
import matplotlib as mpl
import numpy as np
from . import reductions
from . import transfer_functions as tf
from .colo... | 32.278912 | 89 | 0.582044 |
6132220a9657b8015cde10327f13569fa8dc7d52 | 10,397 | py | Python | plugins/modules/oci_database_data_guard_association_facts.py | slmjy/oci-ansible-collection | 349c91e2868bf4706a6e3d6fb3b47fc622bfe11b | [
"Apache-2.0"
] | 108 | 2020-05-19T20:46:10.000Z | 2022-03-25T14:10:01.000Z | plugins/modules/oci_database_data_guard_association_facts.py | slmjy/oci-ansible-collection | 349c91e2868bf4706a6e3d6fb3b47fc622bfe11b | [
"Apache-2.0"
] | 90 | 2020-06-14T22:07:11.000Z | 2022-03-07T05:40:29.000Z | plugins/modules/oci_database_data_guard_association_facts.py | slmjy/oci-ansible-collection | 349c91e2868bf4706a6e3d6fb3b47fc622bfe11b | [
"Apache-2.0"
] | 42 | 2020-08-30T23:09:12.000Z | 2022-03-25T16:58:01.000Z | #!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 36.868794 | 152 | 0.652977 |
8c68f97661b9492e385d0dfda2523ddabb3c5383 | 1,827 | py | Python | cbmc_viewer/runt.py | natasha-jeppu/aws-viewer-for-cbmc | 456883a2db2cb043dfe0d859ed005ae50cb42a8d | [
"Apache-2.0"
] | null | null | null | cbmc_viewer/runt.py | natasha-jeppu/aws-viewer-for-cbmc | 456883a2db2cb043dfe0d859ed005ae50cb42a8d | [
"Apache-2.0"
] | null | null | null | cbmc_viewer/runt.py | natasha-jeppu/aws-viewer-for-cbmc | 456883a2db2cb043dfe0d859ed005ae50cb42a8d | [
"Apache-2.0"
] | null | null | null | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""Run a command with simple error handling."""
import logging
import subprocess
import sys
def run(cmd, cwd=None, ignored=None, encoding=None):
"""Run command cmd in directory cwd.
The argument 'ignor... | 35.134615 | 70 | 0.67433 |
95af194cca1c8044486f9423ec993532c757f229 | 2,446 | py | Python | protonfixes/gamefixes/600720.py | Citiroller/protonfixes | 6e0116bd1cd2172b6f0ff9905667bbc59595cdb7 | [
"BSD-2-Clause"
] | null | null | null | protonfixes/gamefixes/600720.py | Citiroller/protonfixes | 6e0116bd1cd2172b6f0ff9905667bbc59595cdb7 | [
"BSD-2-Clause"
] | null | null | null | protonfixes/gamefixes/600720.py | Citiroller/protonfixes | 6e0116bd1cd2172b6f0ff9905667bbc59595cdb7 | [
"BSD-2-Clause"
] | null | null | null | """ Game fix for Trackmania² Lagoon
"""
#pylint: disable=C0103
import os
import shutil
from protonfixes import util
from protonfixes.logger import log
mania_planet_games = [228760, 229870, 232910, 233050, 233070,
243360, 264660, 264850, 600720, 600730]
def main():
""" Create a ManiaPlanet ... | 41.457627 | 97 | 0.631235 |
003d0c72db78aca52471fb7e4d393f00f863e43f | 91 | py | Python | tests/test_archivator.py | seik/archivator | c0dc59b193eadf4f3b9c2713969b0a8a3b53598d | [
"MIT"
] | 1 | 2020-06-11T11:51:38.000Z | 2020-06-11T11:51:38.000Z | tests/test_archivator.py | seik/archivator | c0dc59b193eadf4f3b9c2713969b0a8a3b53598d | [
"MIT"
] | 6 | 2020-04-03T20:04:09.000Z | 2020-04-21T06:12:11.000Z | tests/test_archivator.py | seik/archivator | c0dc59b193eadf4f3b9c2713969b0a8a3b53598d | [
"MIT"
] | null | null | null | from archivator import __version__
def test_version():
assert __version__ == "0.1.0"
| 15.166667 | 34 | 0.725275 |
1ace656c0ef233be51c7eb19ae7a1eaabb404d5a | 8,048 | py | Python | visualize_results.py | akazako1/CollinsLab_ScrunchingAnalysis | 91509671fdada9b59f0e3e027b989afc53e5d45d | [
"MIT"
] | 1 | 2021-11-04T01:10:21.000Z | 2021-11-04T01:10:21.000Z | visualize_results.py | akazako1/CollinsLab_ScrunchingAnalysis | 91509671fdada9b59f0e3e027b989afc53e5d45d | [
"MIT"
] | null | null | null | visualize_results.py | akazako1/CollinsLab_ScrunchingAnalysis | 91509671fdada9b59f0e3e027b989afc53e5d45d | [
"MIT"
] | null | null | null | # code for displaying multiple images in one figure
# import libraries
import cv2 as cv
import numpy as np
import matplotlib
#matplotlib.use('Qt5Agg') # Apple doesn't like Tkinter (TkAgg backend) so I needed to change the backend to 'Qt5Agg'
from matplotlib import pyplot as plt
import read_input as rin
import data_... | 34.246809 | 150 | 0.657058 |
7acf434c8b36235251ca20345b06982397f1c9e5 | 11,039 | py | Python | mbrl/diagnostics/visualize_model_preds.py | pecey/mbrl-lib | ebca518b35a1370dbaede2a1c96fcde714bc5489 | [
"MIT"
] | 1 | 2021-06-17T08:35:31.000Z | 2021-06-17T08:35:31.000Z | mbrl/diagnostics/visualize_model_preds.py | pecey/mbrl-lib | ebca518b35a1370dbaede2a1c96fcde714bc5489 | [
"MIT"
] | 1 | 2021-08-13T12:37:03.000Z | 2021-08-14T16:34:31.000Z | mbrl/diagnostics/visualize_model_preds.py | pecey/mbrl-lib | ebca518b35a1370dbaede2a1c96fcde714bc5489 | [
"MIT"
] | 1 | 2021-12-13T10:50:33.000Z | 2021-12-13T10:50:33.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import pathlib
from typing import Generator, List, Optional, Tuple, cast
import gym.wrappers
import matpl... | 36.3125 | 90 | 0.585107 |
557ff981605dca12cb04f3bf278557843873e0c1 | 3,612 | py | Python | pytype/pytd/parse/parser_test.py | yang/pytype-hack | 093d69c9a6f6144f0209cdeb8eed6c7e832bbee0 | [
"Apache-2.0"
] | null | null | null | pytype/pytd/parse/parser_test.py | yang/pytype-hack | 093d69c9a6f6144f0209cdeb8eed6c7e832bbee0 | [
"Apache-2.0"
] | null | null | null | pytype/pytd/parse/parser_test.py | yang/pytype-hack | 093d69c9a6f6144f0209cdeb8eed6c7e832bbee0 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8; python-indent:2; indent-tabs-mode:nil -*-
# Copyright 2013 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/l... | 41.045455 | 80 | 0.67608 |
1303e52d511702c1ef294ce7544e1cbe234eaeea | 550 | py | Python | Climate.py | ZhiXingHeYi-0712/Solar-Radiation | 84020c446fcb62cadc844033b76197cf4d1b8071 | [
"MIT"
] | null | null | null | Climate.py | ZhiXingHeYi-0712/Solar-Radiation | 84020c446fcb62cadc844033b76197cf4d1b8071 | [
"MIT"
] | null | null | null | Climate.py | ZhiXingHeYi-0712/Solar-Radiation | 84020c446fcb62cadc844033b76197cf4d1b8071 | [
"MIT"
] | null | null | null | from enum import Enum
class Climate(Enum):
TROPICS = 1
MID_LATITUDE_SUMMER = 2
MID_LATITUDE_WINTER = 3
COLD_ZONE_SUMMER = 4
NONE_TYPE = 5
def getDetermination(type):
if (type == Climate.TROPICS):
return (0.95, 0.98, 1.02)
elif (type == Climate.MID_LATITUDE_SUMMER):
return (... | 26.190476 | 47 | 0.614545 |
18657e7d11d89d275ac9a0fc7e4e7b26806d95b3 | 399 | py | Python | decorators/lab/3_even_numbers.py | Minkov/python-oop-2020-06 | 63b830a42b7abfac5bee576a81ee7626c47a80bc | [
"MIT"
] | 3 | 2020-07-04T11:32:42.000Z | 2020-08-14T08:43:25.000Z | decorators/lab/3_even_numbers.py | Minkov/python-oop-2020-06 | 63b830a42b7abfac5bee576a81ee7626c47a80bc | [
"MIT"
] | null | null | null | decorators/lab/3_even_numbers.py | Minkov/python-oop-2020-06 | 63b830a42b7abfac5bee576a81ee7626c47a80bc | [
"MIT"
] | 2 | 2020-07-09T07:17:37.000Z | 2021-02-22T22:55:52.000Z | def even_numbers(func):
def is_even(number):
return number % 2 == 0
def wrapper(*args, **kwargs):
result = func(*args, **kwargs)
# return [x for x in result if is_even(x)]
return list(filter(is_even, result))
return wrapper
@even_numbers
def get_numbers(num... | 19.95 | 51 | 0.573935 |
9bd10940e7cf37b456846860caa3e9c2c967b6fd | 636 | py | Python | export_table.py | gkovacs/invideo-quizzes-analysis-las2016 | 6ec8686ef0d3ffa5e994f8dec41590fea87e9539 | [
"MIT"
] | null | null | null | export_table.py | gkovacs/invideo-quizzes-analysis-las2016 | 6ec8686ef0d3ffa5e994f8dec41590fea87e9539 | [
"MIT"
] | null | null | null | export_table.py | gkovacs/invideo-quizzes-analysis-las2016 | 6ec8686ef0d3ffa5e994f8dec41590fea87e9539 | [
"MIT"
] | null | null | null | import MySQLdb
import sqlite3
from pandas.io.sql import read_frame
import json
datastage_login = json.load(open('datastage_login.json'))
databases = {}
tablename = 'VideoInteraction'
databasename = 'Edx'
def getTableName():
return tablename
def getDatabaseName():
return databasename
def getDatabase():
if d... | 23.555556 | 157 | 0.761006 |
0d7c49c465c298a52945ddf6755a55f726315c49 | 2,040 | py | Python | infrastructure-provisioning/src/general/scripts/azure/ssn_create_datalake.py | ofuks/DLab | 460804a2559843d099936fe40373093f9bf9edcb | [
"Apache-2.0"
] | null | null | null | infrastructure-provisioning/src/general/scripts/azure/ssn_create_datalake.py | ofuks/DLab | 460804a2559843d099936fe40373093f9bf9edcb | [
"Apache-2.0"
] | null | null | null | infrastructure-provisioning/src/general/scripts/azure/ssn_create_datalake.py | ofuks/DLab | 460804a2559843d099936fe40373093f9bf9edcb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# *****************************************************************************
#
# Copyright (c) 2016, EPAM 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
#
#... | 37.777778 | 113 | 0.626961 |
0cf1b47f317c73d9be46ee3367d72fb072b5bb8d | 370 | py | Python | __init__.py | fwinstead/rules-of-acquisition-skill | f0682f9ecafa02aa6e30d11b101704cd8060aea1 | [
"Apache-2.0"
] | null | null | null | __init__.py | fwinstead/rules-of-acquisition-skill | f0682f9ecafa02aa6e30d11b101704cd8060aea1 | [
"Apache-2.0"
] | null | null | null | __init__.py | fwinstead/rules-of-acquisition-skill | f0682f9ecafa02aa6e30d11b101704cd8060aea1 | [
"Apache-2.0"
] | null | null | null | from mycroft import MycroftSkill, intent_file_handler
class RulesOfAcquisition(MycroftSkill):
def __init__(self):
MycroftSkill.__init__(self)
@intent_file_handler('acquisition.of.rules.intent')
def handle_acquisition_of_rules(self, message):
self.speak_dialog('acquisition.of.rules')
def... | 23.125 | 55 | 0.754054 |
008a2020e9d2909d2beb1b577a214cd5f8c64c03 | 63 | py | Python | scia/handlers/__init__.py | c-crogeo/scia | 7652668f8a7befc1f300415d6d3b1e7fc3a45bc3 | [
"MIT"
] | 1 | 2020-12-29T00:11:57.000Z | 2020-12-29T00:11:57.000Z | scia/handlers/__init__.py | c-crogeo/scia | 7652668f8a7befc1f300415d6d3b1e7fc3a45bc3 | [
"MIT"
] | null | null | null | scia/handlers/__init__.py | c-crogeo/scia | 7652668f8a7befc1f300415d6d3b1e7fc3a45bc3 | [
"MIT"
] | null | null | null | from .timedRotatingFileHandler import TimedRotatingFileHandler
| 31.5 | 62 | 0.920635 |
d8d0854ad6d263d1b0e7c5182b4c144246b0d0f3 | 460 | py | Python | Solutions1/is_palindrome.py | mohamedsugal/Leetcode-Solutions | c67720af4cb36d07d758c57efffac7a28e4f8b9f | [
"MIT"
] | 3 | 2020-11-12T06:51:44.000Z | 2021-09-19T00:26:33.000Z | Solutions1/is_palindrome.py | mohamedsugal/Leetcode-Solutions | c67720af4cb36d07d758c57efffac7a28e4f8b9f | [
"MIT"
] | null | null | null | Solutions1/is_palindrome.py | mohamedsugal/Leetcode-Solutions | c67720af4cb36d07d758c57efffac7a28e4f8b9f | [
"MIT"
] | null | null | null | string = "A man, a plan, a canal"
def is_palindrome(string):
left = 0
right = len(string) - 1
while left < right:
if not string[left].isalnum():
left += 1
elif not string[right].isalnum():
right -= 1
else:
if string[left].lower() != string[... | 23 | 62 | 0.495652 |
6591d51f2a37f882de36566a7bb22169808e2059 | 2,570 | py | Python | tensorflow/contrib/learn/python/learn/ops/array_ops.py | 285219011/hello-world | dfb71ea206eb9f61e5d97c9727caa1a6449e39cb | [
"Apache-2.0"
] | 6 | 2017-04-25T01:30:41.000Z | 2019-12-11T15:08:46.000Z | tensorflow/contrib/learn/python/learn/ops/array_ops.py | PaulTR/tensorflow | 84bcff1e814ee5697b5980535583737f8e81d82f | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/learn/python/learn/ops/array_ops.py | PaulTR/tensorflow | 84bcff1e814ee5697b5980535583737f8e81d82f | [
"Apache-2.0"
] | 8 | 2017-04-17T23:39:12.000Z | 2019-05-11T14:06:31.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.205479 | 80 | 0.700778 |
c7f2d09278cdd74aa9659c7b94c45516e258985f | 2,591 | py | Python | aliyun-python-sdk-pvtz/setup.py | DataDog/aliyun-openapi-python-sdk | 5cbee29bce6416dd62f61f0c3786b1af6ea0d84f | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-pvtz/setup.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-pvtz/setup.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | 1 | 2021-02-23T11:27:54.000Z | 2021-02-23T11:27:54.000Z | #!/usr/bin/python
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"... | 30.482353 | 69 | 0.66731 |
41e9d4efbce1242031deeb9508e7199988f6685d | 6,957 | py | Python | dvc/config_schema.py | NigelVanHattum/dvc | 356f9355fd5156595cfd4c786231ce2f04a5e046 | [
"Apache-2.0"
] | null | null | null | dvc/config_schema.py | NigelVanHattum/dvc | 356f9355fd5156595cfd4c786231ce2f04a5e046 | [
"Apache-2.0"
] | 81 | 2021-04-13T08:02:09.000Z | 2022-03-30T16:10:17.000Z | dvc/config_schema.py | NigelVanHattum/dvc | 356f9355fd5156595cfd4c786231ce2f04a5e046 | [
"Apache-2.0"
] | null | null | null | import os
from urllib.parse import urlparse
from funcy import walk_values
from voluptuous import (
All,
Any,
Coerce,
Invalid,
Lower,
Optional,
Range,
Schema,
)
Bool = All(
Lower,
Any("true", "false"),
lambda v: v == "true",
msg="expected true or false",
)
def supporte... | 30.647577 | 79 | 0.485698 |
ae891c44e9afe40bd1d5d05c6b84daad300a7357 | 2,032 | py | Python | utils/optim.py | Lednik7/data_fusion | 2cac8ee2ca6c144218731795bc118f6c355bd477 | [
"MIT"
] | 1 | 2022-01-23T10:18:16.000Z | 2022-01-23T10:18:16.000Z | utils/optim.py | Lednik7/data_fusion | 2cac8ee2ca6c144218731795bc118f6c355bd477 | [
"MIT"
] | null | null | null | utils/optim.py | Lednik7/data_fusion | 2cac8ee2ca6c144218731795bc118f6c355bd477 | [
"MIT"
] | null | null | null | import logging
import torch
import transformers
logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
NO_DECAY = ['bias', 'LayerNorm.weight']
def is_backbone(name):
return 'backbone' in name# or 'pooler' in name
def needs_decay(name):
return not any(w... | 30.787879 | 113 | 0.619587 |
f86244d22553511da6cc06c0fa5273f886302272 | 669 | py | Python | seeds/user_seeder.py | tamert/sentry-discord-webhook | a3b36b52c7e7b1a3d67e1f57185f748df1348412 | [
"MIT"
] | null | null | null | seeds/user_seeder.py | tamert/sentry-discord-webhook | a3b36b52c7e7b1a3d67e1f57185f748df1348412 | [
"MIT"
] | null | null | null | seeds/user_seeder.py | tamert/sentry-discord-webhook | a3b36b52c7e7b1a3d67e1f57185f748df1348412 | [
"MIT"
] | null | null | null | from flask_seeder import Seeder, Faker, generator
from models import User
import hashlib
class UserSeeder(Seeder):
# run() will be called by Flask-Seeder
def run(self):
# Create a new Faker and tell it how to create User objects
faker = Faker(
cls=User,
init={
... | 26.76 | 67 | 0.521674 |
eb866ffad6a03c485ce918b2acc772feee8d5038 | 3,245 | py | Python | main.py | Davidyz/AutoStacker | 9f637891b9379b166e41597bcd44a8011561beea | [
"MIT"
] | null | null | null | main.py | Davidyz/AutoStacker | 9f637891b9379b166e41597bcd44a8011561beea | [
"MIT"
] | null | null | null | main.py | Davidyz/AutoStacker | 9f637891b9379b166e41597bcd44a8011561beea | [
"MIT"
] | null | null | null | from modules import algo, imageRW, gps
import sys, os
from typing import List, Optional, Union
class ArgumentError(Exception):
pass
def parseArgs(args: List[str], config: dict[str, Union[str, int, None]] = {'source':None, 'target': None, 'group-size': 1, 'mode': 'mean'}) -> Optional[dict]:
'''
parse the ... | 41.602564 | 158 | 0.605547 |
fa904ba94bed2b6689060566145f1cc3eba67c25 | 7,202 | py | Python | udp-py/udp/ba/helper.py | moky/WormHole | 6b2b79274274f6764e0d519d384eb65489f4ca56 | [
"MIT"
] | 5 | 2020-05-24T03:35:00.000Z | 2021-06-05T00:27:54.000Z | udp-py/udp/ba/helper.py | moky/WormHole | 6b2b79274274f6764e0d519d384eb65489f4ca56 | [
"MIT"
] | null | null | null | udp-py/udp/ba/helper.py | moky/WormHole | 6b2b79274274f6764e0d519d384eb65489f4ca56 | [
"MIT"
] | 2 | 2020-09-11T05:29:11.000Z | 2022-03-13T15:45:22.000Z | # -*- coding: utf-8 -*-
#
# BA: Byte Array
#
# Written in 2021 by Moky <albert.moky@gmail.com>
#
# ==============================================================================
# MIT License
#
# Copyright (c) 2021 Albert Moky
#
# Permission is hereby granted, free of charge, to any per... | 38.513369 | 120 | 0.651347 |
712e08263f8a785926b30d75778f9da308e985f9 | 32,150 | py | Python | desktop/core/src/desktop/middleware.py | ajay25/hue | 5733a1605c1a6055a052012d6ee1c24a48658300 | [
"Apache-2.0"
] | null | null | null | desktop/core/src/desktop/middleware.py | ajay25/hue | 5733a1605c1a6055a052012d6ee1c24a48658300 | [
"Apache-2.0"
] | null | null | null | desktop/core/src/desktop/middleware.py | ajay25/hue | 5733a1605c1a6055a052012d6ee1c24a48658300 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 37.210648 | 272 | 0.69042 |
5f968955b150f7158a05d93e18ea9772a199547a | 1,250 | py | Python | src/pymap3d/tests/test_vincenty_vreckon.py | wrlssqi/pymap3d | bd91a5ff4e9066eb33fead3006ba9de191e2c5e5 | [
"BSD-2-Clause"
] | 116 | 2020-02-23T02:04:18.000Z | 2022-03-29T00:19:37.000Z | src/pymap3d/tests/test_vincenty_vreckon.py | wrlssqi/pymap3d | bd91a5ff4e9066eb33fead3006ba9de191e2c5e5 | [
"BSD-2-Clause"
] | 30 | 2017-04-25T12:43:50.000Z | 2020-01-27T07:56:18.000Z | src/pymap3d/tests/test_vincenty_vreckon.py | wrlssqi/pymap3d | bd91a5ff4e9066eb33fead3006ba9de191e2c5e5 | [
"BSD-2-Clause"
] | 53 | 2017-04-25T12:25:40.000Z | 2020-01-17T12:32:22.000Z | import pytest
from pytest import approx
import pymap3d.vincenty as vincenty
ll0 = [10, 20]
lat2 = [10.02137267, 10.01917819]
lon2 = [20.0168471, 20.0193493]
az2 = [218.00292856, 225.00336316]
sr1 = [3e3, 1e3]
az1 = [38, 45]
lat3 = (10.02137267, 10.00639286)
lon3 = (20.0168471, 20.00644951)
az3 = (218.00292856, 225.00... | 24.509804 | 55 | 0.6008 |
122dbb985bcd529a29aa213eeabbb97ca07d5257 | 913 | py | Python | examples/django/testsite/urls.py | wangsha/graphene-file-upload | 70efa3238ba5155ee5d2f4a2dbbb519884bdca59 | [
"MIT"
] | 276 | 2018-04-06T10:08:12.000Z | 2022-03-07T01:14:27.000Z | examples/django/testsite/urls.py | wangsha/graphene-file-upload | 70efa3238ba5155ee5d2f4a2dbbb519884bdca59 | [
"MIT"
] | 49 | 2018-04-05T23:48:57.000Z | 2022-03-17T12:43:10.000Z | examples/django/testsite/urls.py | wangsha/graphene-file-upload | 70efa3238ba5155ee5d2f4a2dbbb519884bdca59 | [
"MIT"
] | 42 | 2018-05-29T06:51:59.000Z | 2022-03-03T15:27:27.000Z | """testsite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | 36.52 | 77 | 0.730559 |
0281d01c3c0465970e5631e5bab2cfb4c97cd81a | 1,587 | py | Python | fluent_pages/utils/db.py | masschallenge/django-fluent-pages | 8beb083d89fba935ef3bfeda8cacf566f28b1334 | [
"Apache-2.0"
] | null | null | null | fluent_pages/utils/db.py | masschallenge/django-fluent-pages | 8beb083d89fba935ef3bfeda8cacf566f28b1334 | [
"Apache-2.0"
] | 1 | 2021-03-24T18:53:10.000Z | 2021-03-24T18:53:10.000Z | fluent_pages/utils/db.py | masschallenge/django-fluent-pages | 8beb083d89fba935ef3bfeda8cacf566f28b1334 | [
"Apache-2.0"
] | null | null | null | """
Custom generic managers
"""
from django.db import models
from django.db.models.query import QuerySet
# Based on django-queryset-transform.
# This object however, operates on a per-object instance
# without breaking the result generators
class DecoratingQuerySet(QuerySet):
"""
An enhancement of the Query... | 27.842105 | 89 | 0.657845 |
38d72429228c88544db0a5291176e0be42f473c8 | 7,703 | py | Python | pyassim/util_functions.py | ZoneTsuyoshi/pyassim | 1b40ce914a7b1e4ec6e240a6d67a19a22e431137 | [
"MIT"
] | null | null | null | pyassim/util_functions.py | ZoneTsuyoshi/pyassim | 1b40ce914a7b1e4ec6e240a6d67a19a22e431137 | [
"MIT"
] | null | null | null | pyassim/util_functions.py | ZoneTsuyoshi/pyassim | 1b40ce914a7b1e4ec6e240a6d67a19a22e431137 | [
"MIT"
] | null | null | null | # Copyright (c) The pyakalman developers.
# All rights reserved.
"""
Utility functions
"_determine_dimensionality", "_parse_observations", and "_last_dims" functions are originally provided in pykalman.
The other functions are original in this package.
"""
import numpy as np
try:
import cupy
except:
pass
de... | 30.089844 | 115 | 0.572894 |
ce4d31f42fbee2df90003587ef301e0ae1d611ec | 485 | py | Python | kiss/controllers/page.py | stanfeldman/kiss.py | badc1941d190e17b538f230d11633c817b668476 | [
"BSD-4-Clause"
] | 4 | 2016-07-04T15:22:30.000Z | 2017-03-04T15:12:20.000Z | kiss/controllers/page.py | stanfeldman/kiss.py | badc1941d190e17b538f230d11633c817b668476 | [
"BSD-4-Clause"
] | null | null | null | kiss/controllers/page.py | stanfeldman/kiss.py | badc1941d190e17b538f230d11633c817b668476 | [
"BSD-4-Clause"
] | 4 | 2018-11-13T05:51:33.000Z | 2022-02-13T10:52:34.000Z | from core import Controller
from kiss.views.templates import TemplateResponse
class PageController(Controller):
"""
If you need just to show page, create PageController and pass to it your page and optional context.
Use it like another controllers in urls settings of your app.
"""
def __init__(self, page, context... | 30.3125 | 100 | 0.754639 |
209abf1140db1d2c89d9177e5d299feba9953eee | 22,795 | py | Python | src/oci/management_dashboard/models/update_management_saved_search_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/management_dashboard/models/update_management_saved_search_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/management_dashboard/models/update_management_saved_search_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 34.642857 | 245 | 0.671989 |
579abe167fc728ccae238a02b41ba237ccd1c875 | 229 | py | Python | src/pytezos/michelson/sections/__init__.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 98 | 2019-02-07T16:33:38.000Z | 2022-03-31T15:53:41.000Z | src/pytezos/michelson/sections/__init__.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 152 | 2019-05-20T16:38:56.000Z | 2022-03-30T14:24:38.000Z | src/pytezos/michelson/sections/__init__.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 34 | 2019-07-25T12:03:51.000Z | 2021-11-11T22:23:38.000Z | from pytezos.michelson.sections.code import CodeSection
from pytezos.michelson.sections.parameter import ParameterSection
from pytezos.michelson.sections.storage import StorageSection
from pytezos.michelson.sections.tzt import *
| 45.8 | 65 | 0.873362 |
59169d8f8ea67d4122d217f8f9943b12ac04618f | 8,625 | py | Python | ambari-agent/src/main/python/ambari_agent/Controller.py | cglewis/ambari | e5d7e08e42baea2ad15784400c6f9e7ebb5f1608 | [
"Apache-2.0"
] | null | null | null | ambari-agent/src/main/python/ambari_agent/Controller.py | cglewis/ambari | e5d7e08e42baea2ad15784400c6f9e7ebb5f1608 | [
"Apache-2.0"
] | null | null | null | ambari-agent/src/main/python/ambari_agent/Controller.py | cglewis/ambari | e5d7e08e42baea2ad15784400c6f9e7ebb5f1608 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2.6
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"Licens... | 32.919847 | 119 | 0.679536 |
b6f03431ce9601cc4e9ea79206d093135fa17be9 | 968 | py | Python | examples/send_sms_advanced_tracking_ex.py | ubidreams/infobip-api-python-client | 3e585bf00565627bd7da46a2c8f10b860faaeb8b | [
"Apache-2.0"
] | null | null | null | examples/send_sms_advanced_tracking_ex.py | ubidreams/infobip-api-python-client | 3e585bf00565627bd7da46a2c8f10b860faaeb8b | [
"Apache-2.0"
] | null | null | null | examples/send_sms_advanced_tracking_ex.py | ubidreams/infobip-api-python-client | 3e585bf00565627bd7da46a2c8f10b860faaeb8b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from infobip.api.model.sms.mt.send.Tracking import Tracking
from infobip.clients import send_multiple_textual_sms_advanced
from infobip.api.model.sms.mt.send.textual.SMSAdvancedTextualRequest import SMSAdvancedTextualRequest
from infobip.api.model.sms.mt.send.Message import Message
from infobip... | 31.225806 | 137 | 0.809917 |
5d10c17c80b0a5c8c2e084a11e9bdc79e13cbb5e | 3,558 | py | Python | sharppy/tests/test_winds.py | skovic/SHARPpy | 19175269ab11fe06c917b5d10376862a4716e1db | [
"BSD-3-Clause"
] | 163 | 2015-01-05T06:57:16.000Z | 2022-03-15T04:19:42.000Z | sharppy/tests/test_winds.py | skovic/SHARPpy | 19175269ab11fe06c917b5d10376862a4716e1db | [
"BSD-3-Clause"
] | 187 | 2015-01-20T05:30:55.000Z | 2022-03-28T17:50:38.000Z | sharppy/tests/test_winds.py | skovic/SHARPpy | 19175269ab11fe06c917b5d10376862a4716e1db | [
"BSD-3-Clause"
] | 110 | 2015-01-06T05:55:47.000Z | 2022-03-15T18:40:21.000Z | import numpy as np
import numpy.ma as ma
import numpy.testing as npt
import sharppy.sharptab.winds as winds
import sharppy.sharptab.utils as utils
import sharppy.sharptab.interp as interp
from sharppy.sharptab.profile import Profile
import test_profile
prof = test_profile.TestProfile().prof
import time
def test_mea... | 32.054054 | 75 | 0.717257 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.