hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f6618a1b92f87b0c01aea0561400b4b29521929e | 9,067 | py | Python | src/main/resources/templates/c/gcc/test/testUtils/AbstractTest.py | AutoscanForJavaFork/Artemis | 43a1da12e5dc6a2f54ec8c29f9f4512520fb0c46 | [
"MIT"
] | 213 | 2019-06-20T19:22:05.000Z | 2022-03-29T14:49:53.000Z | src/main/resources/templates/c/gcc/test/testUtils/AbstractTest.py | AutoscanForJavaFork/Artemis | 43a1da12e5dc6a2f54ec8c29f9f4512520fb0c46 | [
"MIT"
] | 2,992 | 2019-06-19T13:40:38.000Z | 2022-03-31T21:17:12.000Z | src/main/resources/templates/c/test/testUtils/AbstractTest.py | FreshLlamanade/Artemis | 19d971ea76e0218cc21936da567b5e2cc3c200e4 | [
"MIT"
] | 365 | 2019-07-30T11:30:58.000Z | 2022-03-22T07:23:16.000Z | from abc import ABC, abstractmethod
from traceback import print_exc
from signal import SIGALRM, SIG_IGN, alarm, signal
from datetime import datetime, timedelta
from contextlib import contextmanager
from typing import Optional, List, Dict
from os import path, makedirs
from io import TextIOWrapper
from testUtils.junit.Te... | 32.851449 | 159 | 0.598654 |
f661cc62c8f1f288fdb74e3ee65e3731208bb505 | 311 | py | Python | bassl/pretrain/__init__.py | kakaobrain/bassl | 551fe94343debf60a64c787be6752284153a0f7a | [
"Apache-2.0"
] | 55 | 2022-01-17T02:18:40.000Z | 2022-03-25T08:24:28.000Z | bassl/finetune/__init__.py | kakaobrain/bassl | 551fe94343debf60a64c787be6752284153a0f7a | [
"Apache-2.0"
] | 5 | 2022-01-18T01:59:49.000Z | 2022-03-24T00:20:35.000Z | bassl/finetune/__init__.py | kakaobrain/bassl | 551fe94343debf60a64c787be6752284153a0f7a | [
"Apache-2.0"
] | 1 | 2022-01-23T10:50:15.000Z | 2022-01-23T10:50:15.000Z | # ------------------------------------------------------------------------------------
# BaSSL
# Copyright (c) 2021 KakaoBrain. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 [see LICENSE for details]
# ------------------------------------------------------------------------------------
| 51.833333 | 86 | 0.334405 |
f66373f676f7fc2f78b1b39bfeacfa7e3aaf7994 | 3,574 | py | Python | thirdweb/types/nft.py | nftlabs/nftlabs-sdk-python | ea533142dc0881872b347cd8ce635dc0bfff3153 | [
"Apache-2.0"
] | 30 | 2021-10-31T13:17:58.000Z | 2022-02-04T13:41:13.000Z | thirdweb/types/nft.py | nftlabs/nftlabs-sdk-python | ea533142dc0881872b347cd8ce635dc0bfff3153 | [
"Apache-2.0"
] | 36 | 2021-11-03T20:30:38.000Z | 2022-02-14T10:15:40.000Z | thirdweb/types/nft.py | nftlabs/nftlabs-sdk-python | ea533142dc0881872b347cd8ce635dc0bfff3153 | [
"Apache-2.0"
] | 10 | 2021-11-10T19:59:41.000Z | 2022-01-21T21:26:55.000Z | from dataclasses import dataclass
from typing import Any, Dict, Optional, Union
| 27.705426 | 69 | 0.628707 |
f663a3710764487e9930ac48b883d9c2b9f1ba2a | 5,304 | py | Python | hello.py | jvns/git-workflow | f67c12b444a2a9eaf6d677cee093b44d9359fa3b | [
"MIT"
] | 205 | 2015-01-07T07:33:17.000Z | 2022-03-10T15:36:48.000Z | hello.py | usmanakram232/git-workflow | f67c12b444a2a9eaf6d677cee093b44d9359fa3b | [
"MIT"
] | 3 | 2015-11-28T23:40:54.000Z | 2021-07-08T01:11:23.000Z | hello.py | usmanakram232/git-workflow | f67c12b444a2a9eaf6d677cee093b44d9359fa3b | [
"MIT"
] | 28 | 2015-02-18T16:35:04.000Z | 2022-02-03T07:30:29.000Z | from flask import Flask, render_template, jsonify, request, g, abort
import pandas as pd
import networkx as nx
import pygraphviz as pgv
import json
import tempfile
import numpy as np
import brewer2mpl
from StringIO import StringIO
import psycopg2
import urlparse
import os
app = Flask(__name__)
app.config['DEBUG'] = T... | 30.65896 | 109 | 0.637821 |
f664121a0591f3c49d3c27c79769fde8a288b705 | 4,530 | py | Python | fn_whois_rdap/fn_whois_rdap/util/helper.py | khirazo/resilient-community-apps | 76d21d899945a5458203d6ba9cfaaf9907b395b2 | [
"MIT"
] | null | null | null | fn_whois_rdap/fn_whois_rdap/util/helper.py | khirazo/resilient-community-apps | 76d21d899945a5458203d6ba9cfaaf9907b395b2 | [
"MIT"
] | null | null | null | fn_whois_rdap/fn_whois_rdap/util/helper.py | khirazo/resilient-community-apps | 76d21d899945a5458203d6ba9cfaaf9907b395b2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# (c) Copyright IBM Corp. 2019. All Rights Reserved.
# pragma pylint: disable=unused-argument, no-self-use
import socket
from past.builtins import basestring, unicode
import tldextract
import logging
import time
import traceback
from ipwhois import IPWhois, exceptions
from datetime import date... | 31.901408 | 112 | 0.678587 |
f66596fd7558631f8b9f361150e7e02c8bbae04c | 2,086 | py | Python | unity-environment/Learning/plot_with_std.py | KooroshNaderi/UnityClimberAgent | 1953dc6786872304a2fd19140f685895557ad052 | [
"Apache-2.0"
] | null | null | null | unity-environment/Learning/plot_with_std.py | KooroshNaderi/UnityClimberAgent | 1953dc6786872304a2fd19140f685895557ad052 | [
"Apache-2.0"
] | 6 | 2019-12-23T21:43:11.000Z | 2022-02-10T00:40:39.000Z | unity-environment/Learning/plot_with_std.py | KooroshNaderi/UnityClimberAgent | 1953dc6786872304a2fd19140f685895557ad052 | [
"Apache-2.0"
] | null | null | null | '''
Created on Oct 4, 2017
@author: amin
'''
from __future__ import division, print_function
from matplotlib import pyplot as plt
import numpy as np
import matplotlib
import os
# Set some parameters to apply to all plots. These can be overridden
# in each plot if desired
# Plot size to 14" x 7"
matplotlib.rc('figure... | 33.111111 | 119 | 0.645733 |
f666a22d035d3d4a25437e0747c3477add75b192 | 3,373 | py | Python | docker/laaws-demo-webui/cgi-bin/text-search.py | lockss/laaws-demo | f7aeb1b3a15f5955ae7ab41b64b5e45d07e0433e | [
"BSD-3-Clause"
] | null | null | null | docker/laaws-demo-webui/cgi-bin/text-search.py | lockss/laaws-demo | f7aeb1b3a15f5955ae7ab41b64b5e45d07e0433e | [
"BSD-3-Clause"
] | null | null | null | docker/laaws-demo-webui/cgi-bin/text-search.py | lockss/laaws-demo | f7aeb1b3a15f5955ae7ab41b64b5e45d07e0433e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import requests
import json
import cgi
import cgitb
import sys
cgitb.enable(display=0, logdir="/usr/local/apache2/logs/cgitb")
# URL prefix for SOLR query service
# XXX should work with both EDINA and BL
service = "http://laaws-indexer-solr:8983/solr/test-core/select"
# URL prefix for OpenWayba... | 35.505263 | 106 | 0.558257 |
f66747f467bda95dc0b3cabad44bd181726ed982 | 4,682 | py | Python | src/Dijkstra.py | CATHY0706/Dijkstra_tsp | efbfe88410d2dfa8b5f25f0b85e9309d283dbfeb | [
"Apache-2.0"
] | null | null | null | src/Dijkstra.py | CATHY0706/Dijkstra_tsp | efbfe88410d2dfa8b5f25f0b85e9309d283dbfeb | [
"Apache-2.0"
] | null | null | null | src/Dijkstra.py | CATHY0706/Dijkstra_tsp | efbfe88410d2dfa8b5f25f0b85e9309d283dbfeb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Tianyi Zhang and Botao Gao
Created on Tue Dec 1st 14:03:37 2020
Based on the code found in tutorial at this website: 'https://blog.csdn.net/u014798883/article/details/106200697'
"""
def dijkstra(adjacency_matrix, start, path, cost, max):
"""
... | 44.590476 | 124 | 0.602307 |
f6682ef64e0abbac8e8a75420b895edbc5772431 | 250 | py | Python | OOPs/inheritance.py | Shivams9/pythoncodecamp | e6cd27f4704a407ee360414a8c9236b254117a59 | [
"MIT"
] | 6 | 2021-08-04T08:15:22.000Z | 2022-02-02T11:15:56.000Z | OOPs/inheritance.py | Maurya232Abhishek/Python-repository-for-basics | 3dcec5c529a0847df07c9dcc1424675754ce6376 | [
"MIT"
] | 14 | 2021-08-02T06:28:00.000Z | 2022-03-25T10:44:15.000Z | OOPs/inheritance.py | Maurya232Abhishek/Python-repository-for-basics | 3dcec5c529a0847df07c9dcc1424675754ce6376 | [
"MIT"
] | 6 | 2021-07-16T04:56:41.000Z | 2022-02-16T04:40:06.000Z |
c = C()
c.f1()
c.f2()
c.f()
| 13.157895 | 24 | 0.404 |
f66acfa950756b0265e49ea6bcbefcc97bbaa364 | 187 | py | Python | lead_manager/venv/Scripts/django-admin.py | MartinMwiti/Django-React-Apps | 1e4c91faeda9d129142d4dbe7fd95a70c7a58d5d | [
"MIT"
] | null | null | null | lead_manager/venv/Scripts/django-admin.py | MartinMwiti/Django-React-Apps | 1e4c91faeda9d129142d4dbe7fd95a70c7a58d5d | [
"MIT"
] | 21 | 2021-03-11T00:34:32.000Z | 2022-03-12T00:39:44.000Z | lead_manager/venv/Scripts/django-admin.py | MartinMwiti/Django-React-Apps | 1e4c91faeda9d129142d4dbe7fd95a70c7a58d5d | [
"MIT"
] | null | null | null | #!d:\software development\django-react-apps\lead_manager\venv\scripts\python.exe
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 31.166667 | 80 | 0.802139 |
f66f9216ccf7018139eacffb698b267bfd4e1bbc | 2,189 | py | Python | examples/webapp_flask.py | avalente/appmetrics | 366fc7e1ca897e49a2227cbfa43bfa02a47f1acc | [
"Apache-2.0"
] | 60 | 2015-01-19T05:32:32.000Z | 2021-06-08T07:35:02.000Z | examples/webapp_flask.py | alexKeleon/appmetrics | 366fc7e1ca897e49a2227cbfa43bfa02a47f1acc | [
"Apache-2.0"
] | 6 | 2015-03-02T19:25:02.000Z | 2021-03-27T17:26:07.000Z | examples/webapp_flask.py | alexKeleon/appmetrics | 366fc7e1ca897e49a2227cbfa43bfa02a47f1acc | [
"Apache-2.0"
] | 12 | 2015-01-19T05:04:14.000Z | 2020-09-08T07:49:54.000Z | """ simple flask application to show appmetrics usage. """
# a couple of endpoints are defined and a couple of metrics
# measuring throughput and latency for each endpoint plus one
# for the global throughput
#
# of course, flask must be installed (pip install flask)
# Example:
#
# $ python examples/webapp_flask.py ... | 32.191176 | 394 | 0.734125 |
f6715c20809e2e51e6fcf8fa73b5bb43564256b6 | 29,278 | py | Python | game/particle/p4system.py | Sipondo/ulix-dexflow | de46482fe08e3d600dd5da581f0524b55e5df961 | [
"MIT"
] | 5 | 2021-06-25T16:44:38.000Z | 2021-12-31T01:29:00.000Z | game/particle/p4system.py | Sipondo/ulix-dexflow | de46482fe08e3d600dd5da581f0524b55e5df961 | [
"MIT"
] | null | null | null | game/particle/p4system.py | Sipondo/ulix-dexflow | de46482fe08e3d600dd5da581f0524b55e5df961 | [
"MIT"
] | 1 | 2021-06-25T20:33:47.000Z | 2021-06-25T20:33:47.000Z | import moderngl
from .p4dyna.equation import Equation
from numpy.random import random
| 35.661389 | 132 | 0.546622 |
f6723d1d3ec3bf091fc0f8a529233ad8594ca943 | 1,764 | py | Python | server/comm/tests/IpcCommTest.py | belre/DllWrapper-Win32Pipe | e2a81689cb3018a8ee79a9d5e38d0f32dc979997 | [
"MIT"
] | null | null | null | server/comm/tests/IpcCommTest.py | belre/DllWrapper-Win32Pipe | e2a81689cb3018a8ee79a9d5e38d0f32dc979997 | [
"MIT"
] | null | null | null | server/comm/tests/IpcCommTest.py | belre/DllWrapper-Win32Pipe | e2a81689cb3018a8ee79a9d5e38d0f32dc979997 | [
"MIT"
] | null | null | null | import unittest
from comm import IpcComm
from comm import IpcTransmitter
import json
| 23.837838 | 101 | 0.475624 |
f672cd8f72a56c9f5ec0fdbb9ba4d18a17feb3e0 | 10,093 | py | Python | scqubits/io_utils/fileio_serializers.py | saipavanc/scqubits | a99ff75498110558c64e6a6e276834e5714793a5 | [
"BSD-3-Clause"
] | 108 | 2019-12-14T16:08:04.000Z | 2022-03-21T03:48:33.000Z | scqubits/io_utils/fileio_serializers.py | saipavanc/scqubits | a99ff75498110558c64e6a6e276834e5714793a5 | [
"BSD-3-Clause"
] | 62 | 2019-12-14T02:41:00.000Z | 2022-02-06T07:32:42.000Z | scqubits/io_utils/fileio_serializers.py | saipavanc/scqubits | a99ff75498110558c64e6a6e276834e5714793a5 | [
"BSD-3-Clause"
] | 46 | 2019-12-21T12:13:11.000Z | 2022-03-31T17:09:53.000Z | # fileio_serializers.py
#
# This file is part of scqubits: a Python package for superconducting qubits,
# arXiv:2107.08552 (2021). https://arxiv.org/abs/2107.08552
#
# Copyright (c) 2019 and later, Jens Koch and Peter Groszkowski
# All rights reserved.
#
# This source code is licensed under the BSD-style licen... | 30.218563 | 89 | 0.661151 |
f672f9dedd21cb0b5ca593d026104393d22f9ce8 | 39 | py | Python | lhotse/tools/__init__.py | csukuangfj/lhotse | 9b12055ca75718914c5457b33e498d1c8e8b86d8 | [
"Apache-2.0"
] | 353 | 2020-10-31T10:38:51.000Z | 2022-03-30T05:22:52.000Z | lhotse/tools/__init__.py | csukuangfj/lhotse | 9b12055ca75718914c5457b33e498d1c8e8b86d8 | [
"Apache-2.0"
] | 353 | 2020-10-27T23:25:12.000Z | 2022-03-31T22:16:05.000Z | lhotse/tools/__init__.py | csukuangfj/lhotse | 9b12055ca75718914c5457b33e498d1c8e8b86d8 | [
"Apache-2.0"
] | 66 | 2020-11-01T06:08:08.000Z | 2022-03-29T02:03:07.000Z | from .sph2pipe import install_sph2pipe
| 19.5 | 38 | 0.871795 |
f6748a527fcca89db5882d6c5fe0f761006224a7 | 2,328 | py | Python | dolphin/api/v1/access_info.py | ThisIsClark/dolphin | 204cffd3faa1c83fde90942537737fe441406cd1 | [
"Apache-2.0"
] | null | null | null | dolphin/api/v1/access_info.py | ThisIsClark/dolphin | 204cffd3faa1c83fde90942537737fe441406cd1 | [
"Apache-2.0"
] | null | null | null | dolphin/api/v1/access_info.py | ThisIsClark/dolphin | 204cffd3faa1c83fde90942537737fe441406cd1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The SODA 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 wri... | 36.375 | 79 | 0.707904 |
f674f950bc65f3ca25e588c8f6a8f3b548831ffe | 1,826 | py | Python | Pokemon/LegendaryPokemonKNN.py | pranavj1001/MachineLearningRecipes | 513e24ba0b5a8994158131cb0c84e779eee78c68 | [
"MIT"
] | 2 | 2018-01-14T06:14:44.000Z | 2018-01-15T15:35:07.000Z | Pokemon/LegendaryPokemonKNN.py | pranavj1001/MachineLearningRecipes | 513e24ba0b5a8994158131cb0c84e779eee78c68 | [
"MIT"
] | null | null | null | Pokemon/LegendaryPokemonKNN.py | pranavj1001/MachineLearningRecipes | 513e24ba0b5a8994158131cb0c84e779eee78c68 | [
"MIT"
] | 2 | 2019-06-10T09:01:20.000Z | 2019-12-05T01:10:48.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 24 23:08:26 2017
@author: pranavjain
This model classifies a pokemon as legendary or not-legendary.
Required Data to predict Hit Points, Attack Points, Defence Points, Special Attack Points, Special Defence Points, Speed Points
"""
# import libra... | 30.949153 | 127 | 0.766703 |
f675b2a5f4cdacd4a31a0ac2238ec1c5c5d23ed6 | 4,392 | py | Python | test/test_builder.py | equinor/curvy | 791a2202f02fd0c86797d7052deeca50333e66f6 | [
"MIT"
] | 3 | 2021-03-17T01:00:50.000Z | 2021-06-20T03:17:50.000Z | test/test_builder.py | Statoil/curvy | 791a2202f02fd0c86797d7052deeca50333e66f6 | [
"MIT"
] | 1 | 2022-02-11T16:57:29.000Z | 2022-02-13T19:56:59.000Z | test/test_builder.py | Statoil/curvy | 791a2202f02fd0c86797d7052deeca50333e66f6 | [
"MIT"
] | 3 | 2019-03-11T12:17:03.000Z | 2022-02-15T03:37:27.000Z | import unittest
from curvy import builder, axis
import datetime
import numpy as np
taus = [[2,5],[5,7],[7,11]]
prices = [3,5,4]
knots = [5,7]
if __name__ == '__main__':
unittest.main() | 30.289655 | 92 | 0.589936 |
f67699a54e5a98e0d273159f57f639b8fe6cfffb | 2,091 | py | Python | steps/make/npm.py | flipcoder/siege-tools | df8a9fa5a4a6f2bcce4789cebe17b0c4dd3f7e60 | [
"MIT"
] | 6 | 2015-08-14T15:26:38.000Z | 2019-11-14T01:08:31.000Z | steps/make/npm.py | flipcoder/siege-tools | df8a9fa5a4a6f2bcce4789cebe17b0c4dd3f7e60 | [
"MIT"
] | null | null | null | steps/make/npm.py | flipcoder/siege-tools | df8a9fa5a4a6f2bcce4789cebe17b0c4dd3f7e60 | [
"MIT"
] | 1 | 2019-05-10T04:52:40.000Z | 2019-05-10T04:52:40.000Z | #!/usr/bin/env python
import os
import sgmake
import subprocess
import json
from common import Status
from common import Settings
from common import Support
from common import call
#def update(project):
#if os.path.isfile("package.json.ls") or os.path.isfile("package.lson"):
# # remove temp generated packag... | 27.155844 | 91 | 0.573888 |
f6771eb1bdef0d5a9fe61445482e89e720f0f91d | 522 | py | Python | sources/deepzoom/large_image_source_deepzoom/girder_source.py | naglepuff/large_image | 4e928166f228fe894c38e4b01af5370e72f7229c | [
"Apache-2.0"
] | 85 | 2017-03-10T09:48:17.000Z | 2022-03-31T18:55:58.000Z | sources/deepzoom/large_image_source_deepzoom/girder_source.py | naglepuff/large_image | 4e928166f228fe894c38e4b01af5370e72f7229c | [
"Apache-2.0"
] | 248 | 2017-01-27T16:11:13.000Z | 2022-03-31T14:05:18.000Z | sources/deepzoom/large_image_source_deepzoom/girder_source.py | naglepuff/large_image | 4e928166f228fe894c38e4b01af5370e72f7229c | [
"Apache-2.0"
] | 33 | 2017-03-10T14:06:35.000Z | 2022-03-19T08:32:06.000Z | # -*- coding: utf-8 -*-
from girder_large_image.girder_tilesource import GirderTileSource
from . import DeepzoomFileTileSource
| 24.857143 | 76 | 0.741379 |
f67731f5fc0850e27929602df508ab390137d452 | 194 | py | Python | trac/Lib/site-packages/projectplan-0.93.0-py2.7-patched.egg/projectplan/renderer/__init__.py | thinkbase/PortableTrac | 9ea0210f6b88f135ef73f370b48127af0495b2d7 | [
"BSD-3-Clause"
] | 2 | 2015-08-06T04:19:21.000Z | 2020-04-29T23:52:10.000Z | trac/Lib/site-packages/projectplan-0.93.0-py2.7-patched.egg/projectplan/renderer/__init__.py | thinkbase/PortableTrac | 9ea0210f6b88f135ef73f370b48127af0495b2d7 | [
"BSD-3-Clause"
] | null | null | null | trac/Lib/site-packages/projectplan-0.93.0-py2.7-patched.egg/projectplan/renderer/__init__.py | thinkbase/PortableTrac | 9ea0210f6b88f135ef73f370b48127af0495b2d7 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from ppchartrenderer import *
from ppticketsperuserday import *
#from pphierarchicalrenderer import *
from ppreportrenderer import *
from ppgroupstatsrenderer import *
| 21.555556 | 37 | 0.783505 |
f67772509b463ffdb32e8b1ff18b59f81eb3ecda | 2,674 | py | Python | tests/sources/zuul/test_api.py | bregman-arie/cibyl | 41132c1cb885f3306fe6aff59225cfafb6563207 | [
"Apache-2.0"
] | null | null | null | tests/sources/zuul/test_api.py | bregman-arie/cibyl | 41132c1cb885f3306fe6aff59225cfafb6563207 | [
"Apache-2.0"
] | null | null | null | tests/sources/zuul/test_api.py | bregman-arie/cibyl | 41132c1cb885f3306fe6aff59225cfafb6563207 | [
"Apache-2.0"
] | null | null | null | """
# Copyright 2022 Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 27.854167 | 79 | 0.636874 |
f67860e5e860f7dd53b1e0dfd7d2593031b44100 | 3,735 | py | Python | src/cihpc/core/structures/project_step.py | janhybs/ci-hpi | 293740c7af62ecada5744ff663266de2e3d37445 | [
"MIT"
] | 1 | 2020-01-09T13:00:18.000Z | 2020-01-09T13:00:18.000Z | src/cihpc/core/structures/project_step.py | janhybs/ci-hpi | 293740c7af62ecada5744ff663266de2e3d37445 | [
"MIT"
] | null | null | null | src/cihpc/core/structures/project_step.py | janhybs/ci-hpi | 293740c7af62ecada5744ff663266de2e3d37445 | [
"MIT"
] | 2 | 2018-08-12T01:13:28.000Z | 2018-08-13T14:37:28.000Z | #!/usr/bin/python
# author: Jan Hybs
import cihpc.core.structures as structures_init
from cihpc.cfg.config import global_configuration
from cihpc.core.structures.project_step_collect import ProjectStepCollect
from cihpc.core.structures.project_step_container import ProjectStepContainer
from cihpc.core.structures.proje... | 41.966292 | 94 | 0.668273 |
f678eb53ea8b81db409d272313d26c5cd3f11ca6 | 3,747 | py | Python | maha/parsers/functions/parse_dimensions.py | MuhammadAlBarham/Maha | c28e0b7ca69942905548f013a1e35208ef8de7e7 | [
"BSD-3-Clause"
] | 1 | 2021-11-02T08:25:12.000Z | 2021-11-02T08:25:12.000Z | maha/parsers/functions/parse_dimensions.py | vikrambala/Maha | 67020437e745b8fca4770186608326b81073d4b7 | [
"BSD-3-Clause"
] | null | null | null | maha/parsers/functions/parse_dimensions.py | vikrambala/Maha | 67020437e745b8fca4770186608326b81073d4b7 | [
"BSD-3-Clause"
] | null | null | null | __all__ = ["parse_dimension"]
from typing import List
from maha.parsers.rules import (
RULE_DURATION,
RULE_NAME,
RULE_NUMERAL,
RULE_ORDINAL,
RULE_TIME,
)
from maha.parsers.templates import Dimension, DimensionType
from maha.rexy import Expression
def parse_dimension(
text: str,
amount_of... | 28.603053 | 83 | 0.619696 |
f679aca9364b8dc5091f23223316413bce1eb328 | 16,854 | py | Python | pcbdraw.py | Gasman2014/PcbDraw | 06920b8676a1a6f9d585111769b4785e9b7687fc | [
"MIT"
] | 1 | 2019-04-04T09:36:28.000Z | 2019-04-04T09:36:28.000Z | pcbdraw.py | arturo182/PcbDraw | 06920b8676a1a6f9d585111769b4785e9b7687fc | [
"MIT"
] | null | null | null | pcbdraw.py | arturo182/PcbDraw | 06920b8676a1a6f9d585111769b4785e9b7687fc | [
"MIT"
] | 1 | 2018-10-16T02:16:27.000Z | 2018-10-16T02:16:27.000Z | #!/usr/bin/env python
import argparse
import json
import math
import os
import re
import shutil
import sys
import tempfile
import pcbnew
from lxml import etree
default_style = {
"copper": "#417e5a",
"board": "#4ca06c",
"silk": "#f0f0f0",
"pads": "#b5ae30",
"outline": "#000000"
}
unique_prefix.cou... | 38.217687 | 104 | 0.572742 |
f679b14fc387f30bc2bc6b965bd6ffea44f1f036 | 2,189 | py | Python | src/lib/selectors/Local/core.py | williamwmarx/mtx | 31548b60a4e88124b0384350cbec8df1d88975cb | [
"CC0-1.0"
] | null | null | null | src/lib/selectors/Local/core.py | williamwmarx/mtx | 31548b60a4e88124b0384350cbec8df1d88975cb | [
"CC0-1.0"
] | null | null | null | src/lib/selectors/Local/core.py | williamwmarx/mtx | 31548b60a4e88124b0384350cbec8df1d88975cb | [
"CC0-1.0"
] | null | null | null | import os
from pathlib import Path
from shutil import copyfile
from lib.common.selector import Selector
from lib.common.etypes import Etype, Index
from lib.common.exceptions import SelectorIndexError
BASE = Path("/mtriage")
module = Local
| 31.271429 | 101 | 0.703518 |
f67a7ad9d7958716c654a9de8d7055db963e7764 | 620 | py | Python | cohorts_proj/api/migrations/0002_auto_20201118_0125.py | zferic/harmonization-website | f6a081481df3a3a62cb075fbb63ad0470b0d4e06 | [
"MIT"
] | 1 | 2020-09-20T02:32:01.000Z | 2020-09-20T02:32:01.000Z | cohorts_proj/api/migrations/0002_auto_20201118_0125.py | zferic/harmonization-website | f6a081481df3a3a62cb075fbb63ad0470b0d4e06 | [
"MIT"
] | 20 | 2020-04-17T14:01:41.000Z | 2022-03-12T00:30:23.000Z | cohorts_proj/api/migrations/0002_auto_20201118_0125.py | zferic/harmonization-website | f6a081481df3a3a62cb075fbb63ad0470b0d4e06 | [
"MIT"
] | 3 | 2020-10-08T00:24:51.000Z | 2021-06-02T20:07:30.000Z | # Generated by Django 3.0.7 on 2020-11-18 01:25
from django.db import migrations, models
| 32.631579 | 281 | 0.648387 |
f67b5cd19685b6f6168adfcb635e7a19ce5a128b | 11,335 | py | Python | simulateur/rn/Rn.py | thearsenik/sport-ironcar | bc48ee842bccbe4657216f3ef559c3f00a0fe944 | [
"MIT"
] | null | null | null | simulateur/rn/Rn.py | thearsenik/sport-ironcar | bc48ee842bccbe4657216f3ef559c3f00a0fe944 | [
"MIT"
] | null | null | null | simulateur/rn/Rn.py | thearsenik/sport-ironcar | bc48ee842bccbe4657216f3ef559c3f00a0fe944 | [
"MIT"
] | null | null | null | import logging
import sys
sys.path.insert(0, '../')
import config
from tensorflow.python.tools import inspect_checkpoint as chkp
import tensorflow as tf
import numpy as np
import random
logging.basicConfig(filename=config.logFile,level=config.logLevelPlayer, format='%(asctime)s %(message)s')
... | 42.935606 | 163 | 0.610763 |
f67c5e99f8382f72d21656638e76066a8f6362fa | 1,096 | py | Python | web/api/maestro_api/db/models/agent.py | Farfetch/maestro | 837d93866123aea8b90ad0e2aaf3f13bf3ef6907 | [
"MIT"
] | 21 | 2022-02-02T11:52:14.000Z | 2022-02-06T02:44:16.000Z | web/api/maestro_api/db/models/agent.py | Farfetch/maestro | 837d93866123aea8b90ad0e2aaf3f13bf3ef6907 | [
"MIT"
] | 78 | 2022-02-02T12:13:12.000Z | 2022-03-29T08:10:42.000Z | web/api/maestro_api/db/models/agent.py | Farfetch/maestro | 837d93866123aea8b90ad0e2aaf3f13bf3ef6907 | [
"MIT"
] | null | null | null | from maestro_api.libs.extended.enum import ExtendedEnum
from mongoengine import StringField
from maestro_api.db.mixins import CreatedUpdatedDocumentMixin
from maestro_api.libs.datetime import strftime
| 30.444444 | 85 | 0.684307 |
f67cb57866ffbaf57adcdd2f642ca09d35ff5b0c | 521 | py | Python | fanscribed/management/commands/rssfetchall.py | fanscribed/fanscribed | 89b14496459f81a152df38ed5098fba2b087a1d7 | [
"MIT"
] | 8 | 2015-01-05T07:04:02.000Z | 2016-07-19T17:56:46.000Z | fanscribed/management/commands/rssfetchall.py | fanscribed/fanscribed | 89b14496459f81a152df38ed5098fba2b087a1d7 | [
"MIT"
] | 32 | 2015-03-18T18:51:00.000Z | 2021-06-10T20:37:33.000Z | fanscribed/management/commands/rssfetchall.py | fanscribed/fanscribed | 89b14496459f81a152df38ed5098fba2b087a1d7 | [
"MIT"
] | 5 | 2015-02-10T21:15:32.000Z | 2016-06-02T17:26:14.000Z | from django.core.management.base import BaseCommand
from ...apps.podcasts.models import Podcast
| 30.647059 | 60 | 0.614203 |
f67d51e4d04cf2aabb8deef1712b57f7257ceacc | 1,003 | py | Python | HW8/EX2/fairpy/items/min_sharing_impl/time_limit.py | ShmuelLa/research-algorithms | 43cab0e9c13ce9ddb9646f7539f1a865e86f9841 | [
"MIT"
] | null | null | null | HW8/EX2/fairpy/items/min_sharing_impl/time_limit.py | ShmuelLa/research-algorithms | 43cab0e9c13ce9ddb9646f7539f1a865e86f9841 | [
"MIT"
] | null | null | null | HW8/EX2/fairpy/items/min_sharing_impl/time_limit.py | ShmuelLa/research-algorithms | 43cab0e9c13ce9ddb9646f7539f1a865e86f9841 | [
"MIT"
] | null | null | null | #!python3
"""
A context for running functions with a time-limit.
Throws an exception if the function does not finish within the limit.
USAGE:
with time_limit(10):
foo()
NOTE: This does not work on Windows. See:
https://stackoverflow.com/a/8420498/827927
"""
import signal
import contextlib
IS_TIME_LIMIT_SUPPORT... | 22.795455 | 75 | 0.684945 |
f67e76c93cfde02c31983edf748ae38341b647b9 | 4,969 | py | Python | accounts/views.py | Jaheen/CrazyCart | bb72ed71edfe90580482c47d90bcd7ecaa302970 | [
"MIT"
] | null | null | null | accounts/views.py | Jaheen/CrazyCart | bb72ed71edfe90580482c47d90bcd7ecaa302970 | [
"MIT"
] | 10 | 2021-03-18T22:40:53.000Z | 2022-03-11T23:50:51.000Z | accounts/views.py | Jaheen/CrazyCart | bb72ed71edfe90580482c47d90bcd7ecaa302970 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import login as UserLogin, logout as UserLogout, authenticate
from django.contrib import messages
from .models import *
from .verification import sendVerificationEmail
#SUGGESTED TO USE CLA... | 39.436508 | 120 | 0.623063 |
f67fc9d4d95893aeeecd1c5378c7a47c828c7677 | 5,476 | py | Python | depth_tests.py | AhmedAlaa10/Consistent_Video_Depth_Estimation | 1a8868eadcf0b2082cdfea8ed339865f0ba8ea01 | [
"MIT"
] | null | null | null | depth_tests.py | AhmedAlaa10/Consistent_Video_Depth_Estimation | 1a8868eadcf0b2082cdfea8ed339865f0ba8ea01 | [
"MIT"
] | null | null | null | depth_tests.py | AhmedAlaa10/Consistent_Video_Depth_Estimation | 1a8868eadcf0b2082cdfea8ed339865f0ba8ea01 | [
"MIT"
] | null | null | null | import os
import re
import sys
from posix import listdir
from shutil import copyfile
from pathlib import Path
import numpy as np
from PIL import Image
from skimage.transform import resize
import utils.image_io
TAG_FLOAT = 202021.25
TAG_CHAR = 'PIEH'
name="shaman_3"
if len(sys.argv) > 1:
name = str(sys.argv[1])
... | 33.595092 | 153 | 0.721695 |
9c8668c7c7bb6c29a806eaa8d8f7bd5230f9648a | 24,684 | py | Python | mountain_cartographer.py | Naburimannu/beyaz-dag | 50dbe54c8cffecafcf209b30f44bd326d84a424c | [
"BSD-3-Clause"
] | 1 | 2018-02-23T17:31:08.000Z | 2018-02-23T17:31:08.000Z | mountain_cartographer.py | Naburimannu/beyaz-dag | 50dbe54c8cffecafcf209b30f44bd326d84a424c | [
"BSD-3-Clause"
] | 2 | 2016-03-15T04:39:46.000Z | 2016-03-15T04:43:00.000Z | mountain_cartographer.py | Naburimannu/beyaz-dag | 50dbe54c8cffecafcf209b30f44bd326d84a424c | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 Thomas C. Hudson
# Governed by the license described in LICENSE.txt
import libtcodpy as libtcod
import cProfile
import scipy.spatial.kdtree
import config
import algebra
import map
import log
from components import *
import miscellany
import bestiary
import ai
import actions
import spells
import quest... | 36.677563 | 122 | 0.624777 |
9c869ea13c57d3dfb524eb647b6f3d5f86eafa6e | 7,307 | py | Python | test_scripts/ns_instance/duan/service/vfc/nfvo/lcm/lcm/ns_vnfs/biz/grant_vnf.py | lremember/VFC | 837559db1396091811382359100bfc60e1aab5b2 | [
"MIT"
] | 1 | 2019-10-10T00:52:18.000Z | 2019-10-10T00:52:18.000Z | test_scripts/ns_instance/duan/service/vfc/nfvo/lcm/lcm/ns_vnfs/biz/grant_vnf.py | lremember/VFC-Files | 837559db1396091811382359100bfc60e1aab5b2 | [
"MIT"
] | null | null | null | test_scripts/ns_instance/duan/service/vfc/nfvo/lcm/lcm/ns_vnfs/biz/grant_vnf.py | lremember/VFC-Files | 837559db1396091811382359100bfc60e1aab5b2 | [
"MIT"
] | null | null | null | # Copyright 2018 ZTE Corporation.
#
# 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 ... | 41.754286 | 116 | 0.575065 |
9c86fc3cc7d33b4cf70c509d1568b79a22d1d208 | 5,877 | py | Python | tests/test_oyashiki.py | maidnomad/maidchan-slackbot | 42364c2ffef60211a1d5be53f7d3ff1922418abd | [
"MIT"
] | null | null | null | tests/test_oyashiki.py | maidnomad/maidchan-slackbot | 42364c2ffef60211a1d5be53f7d3ff1922418abd | [
"MIT"
] | null | null | null | tests/test_oyashiki.py | maidnomad/maidchan-slackbot | 42364c2ffef60211a1d5be53f7d3ff1922418abd | [
"MIT"
] | null | null | null | from unittest import mock
import freezegun
import pytest
def test_weather_responded_error(target):
"""API"""
with mock.patch("maidchan.tasks.._call_weather_api") as mock_call_weather_api:
mock_call_weather_api.side_effect = Exception
actual = target({"user_id": "00000000", "text": ""})
... | 34.570588 | 86 | 0.532244 |
9c88328d2f2e6bbd1db0fc76c3be87f48859e1ad | 65,821 | py | Python | robotcode/language_server/robotframework/diagnostics/namespace.py | mardukbp/robotcode | 0b34cf6e7931423117036fcf70f74e27da0cfb0f | [
"Apache-2.0"
] | null | null | null | robotcode/language_server/robotframework/diagnostics/namespace.py | mardukbp/robotcode | 0b34cf6e7931423117036fcf70f74e27da0cfb0f | [
"Apache-2.0"
] | null | null | null | robotcode/language_server/robotframework/diagnostics/namespace.py | mardukbp/robotcode | 0b34cf6e7931423117036fcf70f74e27da0cfb0f | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
import ast
import asyncio
import itertools
import weakref
from collections import OrderedDict
from dataclasses import dataclass, field
from enum import Enum
from pathlib import Path
from typing import (
Any,
AsyncIterator,
Callable,
Dict,
Iterable,
List,
N... | 40.356223 | 120 | 0.519925 |
9c8aa12d673cf3649dc9201dd6e2e41e93e6b37f | 2,513 | py | Python | graph.py | monopolize-all/Wave-Sim | f78cfc3195fcf545d585f3dbdfc9c1b9e59798cc | [
"BSD-3-Clause"
] | 1 | 2022-03-31T03:15:02.000Z | 2022-03-31T03:15:02.000Z | graph.py | monopolize-all/Wave-Sim | f78cfc3195fcf545d585f3dbdfc9c1b9e59798cc | [
"BSD-3-Clause"
] | null | null | null | graph.py | monopolize-all/Wave-Sim | f78cfc3195fcf545d585f3dbdfc9c1b9e59798cc | [
"BSD-3-Clause"
] | 1 | 2022-03-18T09:56:50.000Z | 2022-03-18T09:56:50.000Z | import tkinter
from util import Variable_Slider_Widget
| 32.636364 | 97 | 0.619976 |
9c8c2ec534ad96bf825fbadbde34d2692ea3214c | 10,275 | py | Python | src/FLI/camera.py | astroufsc/python-FLI | e5fc8802bca100433802e03915edd2cd0bd62b05 | [
"MIT"
] | 1 | 2015-05-29T00:38:00.000Z | 2015-05-29T00:38:00.000Z | src/FLI/camera.py | astroufsc/python-FLI | e5fc8802bca100433802e03915edd2cd0bd62b05 | [
"MIT"
] | null | null | null | src/FLI/camera.py | astroufsc/python-FLI | e5fc8802bca100433802e03915edd2cd0bd62b05 | [
"MIT"
] | null | null | null | """
FLI.camera.py
Object-oriented interface for handling FLI USB cameras
author: Craig Wm. Versek, Yankee Environmental Systems
author_email: cwv@yesinc.com
"""
__author__ = 'Craig Wm. Versek'
__date__ = '2012-08-08'
import sys, time, warnings
try:
from collections import OrderedDict
except Impor... | 40.936255 | 120 | 0.605742 |
9c8d73a16d474beccfcd4957adb9d6ffb14b93ca | 4,388 | py | Python | segment trees/Tree33_update(add lr)_query(weighted sum)_v2.py | DreamShaded/flykiller.github.io | 37b7abc44544613f56ec994452ddd8d2a4ac8df2 | [
"MIT"
] | 5 | 2021-08-10T18:07:39.000Z | 2022-03-26T08:16:24.000Z | segment trees/Tree33_update(add lr)_query(weighted sum)_v2.py | DreamShaded/flykiller.github.io | 37b7abc44544613f56ec994452ddd8d2a4ac8df2 | [
"MIT"
] | null | null | null | segment trees/Tree33_update(add lr)_query(weighted sum)_v2.py | DreamShaded/flykiller.github.io | 37b7abc44544613f56ec994452ddd8d2a4ac8df2 | [
"MIT"
] | 2 | 2021-03-31T18:14:06.000Z | 2021-08-23T04:15:30.000Z | # we can use Segment Tree 24 and Segment Tree 31 and combine them.
if __name__ == '__main__':
n, m = [int(i) for i in input().split()]
STree1 = SegmentTree1(n)
STree2 = SegmentTree2(n, lambda a, b, x: a + b*x, lambda a, b: a+b, 0)
arr = [int(i) for i in input().split()]
for i in range(n):
... | 34.551181 | 103 | 0.459435 |
9c8d9632b51002742a71d2968e1021ca4aac37d9 | 761 | py | Python | tests/client/lcd/api/feegrant_test.py | terra-money/terra.py | d66de6bb4d9d78f08ad8ffe05ae72d847fc5099d | [
"MIT"
] | 66 | 2021-10-21T23:29:38.000Z | 2022-03-30T15:58:13.000Z | tests/client/lcd/api/feegrant_test.py | terra-money/terra.py | d66de6bb4d9d78f08ad8ffe05ae72d847fc5099d | [
"MIT"
] | 50 | 2021-10-19T06:11:56.000Z | 2022-03-31T17:06:57.000Z | tests/client/lcd/api/feegrant_test.py | terra-money/terra.py | d66de6bb4d9d78f08ad8ffe05ae72d847fc5099d | [
"MIT"
] | 39 | 2021-11-07T17:28:31.000Z | 2022-03-31T15:03:57.000Z | from terra_sdk.client.lcd import LCDClient, PaginationOptions
terra = LCDClient(
url="https://pisco-lcd.terra.dev/",
chain_id="pisco-1",
)
pagOpt = PaginationOptions(limit=2, count_total=True)
| 26.241379 | 78 | 0.73456 |
9c8e3ad5fa1769d9fb66fb1f9d1bd81f7b58b1e3 | 586 | py | Python | letters/sort_by.py | clairempr/letterpress | 05af199018b00ecff847789c71adbf9abc53b3a7 | [
"Apache-2.0"
] | 5 | 2017-04-27T19:36:41.000Z | 2020-10-04T15:03:46.000Z | letters/sort_by.py | clairempr/letterpress | 05af199018b00ecff847789c71adbf9abc53b3a7 | [
"Apache-2.0"
] | 14 | 2017-06-17T14:12:34.000Z | 2022-03-11T23:15:32.000Z | letters/sort_by.py | clairempr/letterpress | 05af199018b00ecff847789c71adbf9abc53b3a7 | [
"Apache-2.0"
] | null | null | null | # Used for user-selected sort order
from letter_sentiment.custom_sentiment import get_custom_sentiments
DATE = 'DATE'
RELEVANCE = 'RELEVANCE'
SENTIMENT = 'SENTIMENT'
| 27.904762 | 114 | 0.773038 |
9c8f54bbbfe1e98306867cca1e589d5209ed5cee | 1,419 | py | Python | core/pycopia/inet/packet/inet.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 89 | 2015-03-26T11:25:20.000Z | 2022-01-12T06:25:14.000Z | core/pycopia/inet/packet/inet.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 1 | 2015-07-05T03:27:43.000Z | 2015-07-11T06:21:20.000Z | core/pycopia/inet/packet/inet.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 30 | 2015-04-30T01:35:54.000Z | 2022-01-12T06:19:49.000Z | """Internet packet basic
Simple operations like performing checksums and swapping byte orders.
"""
# Copyright 1997, Corporation for National Research Initiatives
# written by Jeremy Hylton, jeremy@cnri.reston.va.us
#from _ip import *
import array
import struct
from socket import htons, ntohs
# Should generalize fr... | 22.887097 | 69 | 0.627907 |
9c92762d98989b0ae4eb5388e7e45d799bef4d27 | 445 | py | Python | catalog/migrations/0009_auto_20180929_1001.py | mentatij/otus_catalog_dj | 46bb1fc148bb436743d170176e5103282dfb6cc3 | [
"MIT"
] | null | null | null | catalog/migrations/0009_auto_20180929_1001.py | mentatij/otus_catalog_dj | 46bb1fc148bb436743d170176e5103282dfb6cc3 | [
"MIT"
] | null | null | null | catalog/migrations/0009_auto_20180929_1001.py | mentatij/otus_catalog_dj | 46bb1fc148bb436743d170176e5103282dfb6cc3 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.1 on 2018-09-29 10:01
from django.db import migrations, models
| 23.421053 | 109 | 0.613483 |
9c92bba166a952628d0c7f796fdb4a115c5fe618 | 1,865 | py | Python | test/test_modify_group.py | Docent321/python_traning | eb4b9f6ba9821f6e32dce954c83754d40b8f66c5 | [
"Apache-2.0"
] | null | null | null | test/test_modify_group.py | Docent321/python_traning | eb4b9f6ba9821f6e32dce954c83754d40b8f66c5 | [
"Apache-2.0"
] | null | null | null | test/test_modify_group.py | Docent321/python_traning | eb4b9f6ba9821f6e32dce954c83754d40b8f66c5 | [
"Apache-2.0"
] | null | null | null |
from model.group import Group
from random import randrange
#def test_modify_groop_name(app):
# if app.group.count() == 0:
# app.group.create(Group(name="qweqwe", header="qweqwe", footer="qweqwe"))
# old_groups = app.group.get_group_list()
# group = Group(name="New group")
# group.id = old_groups[0... | 41.444444 | 94 | 0.692225 |
9c94c23785142e08b30342809bc3b549b76dac91 | 946 | py | Python | Graph/357 DFS on graph.py | ikaushikpal/DS-450-python | 9466f77fb9db9e6a5bb3f20aa89ba6332f49e848 | [
"MIT"
] | 3 | 2021-06-28T12:04:19.000Z | 2021-09-07T07:23:41.000Z | Graph/357 DFS on graph.py | SupriyoDam/DS-450-python | 5dc21ce61b3279e9bd9d6ef3ad236667227ca283 | [
"MIT"
] | null | null | null | Graph/357 DFS on graph.py | SupriyoDam/DS-450-python | 5dc21ce61b3279e9bd9d6ef3ad236667227ca283 | [
"MIT"
] | 1 | 2021-06-28T15:42:55.000Z | 2021-06-28T15:42:55.000Z | from collections import defaultdict
g = Graph()
g.addEdge('A','B')
g.addEdge('B','D')
g.addEdge('A','C')
g.addEdge('C','D')
# g.addEdge('D','E')
# g.addEdge('E','F')
g.graph['G'] = []
g.dfs('A') | 24.894737 | 56 | 0.612051 |
9c950d2a39976a79ca933929f87f958add0fa87e | 7,312 | py | Python | transform/support/docxRenderer.py | openenglishbible/USFM-Tools | 8438b29037d7b413d59d6ba7507c473bbda2da8c | [
"MIT"
] | 14 | 2016-02-01T15:02:35.000Z | 2022-01-18T06:21:56.000Z | transform/support/docxRenderer.py | openenglishbible/USFM-Tools | 8438b29037d7b413d59d6ba7507c473bbda2da8c | [
"MIT"
] | 2 | 2021-02-27T10:05:58.000Z | 2022-02-26T19:10:46.000Z | transform/support/docxRenderer.py | openenglishbible/USFM-Tools | 8438b29037d7b413d59d6ba7507c473bbda2da8c | [
"MIT"
] | 6 | 2015-02-11T22:41:12.000Z | 2021-01-03T09:13:58.000Z | # -*- coding: utf-8 -*-
#
import codecs
import os
from docx import Document
from docx.shared import Inches, Pt, RGBColor
import abstractRenderer
#
# Renders to Word .docx
#
| 34.490566 | 149 | 0.591493 |
9c95da0f17b2e834d70853f308abd5efe0eb37b4 | 357 | py | Python | merge_csv.py | RicherMans/Dcase2018_pooling | 10540502bba7215a1ba157614b39fedecb079d9b | [
"Apache-2.0"
] | 13 | 2019-04-14T08:10:59.000Z | 2021-04-01T08:36:35.000Z | merge_csv.py | RicherMans/Dcase2018_pooling | 10540502bba7215a1ba157614b39fedecb079d9b | [
"Apache-2.0"
] | null | null | null | merge_csv.py | RicherMans/Dcase2018_pooling | 10540502bba7215a1ba157614b39fedecb079d9b | [
"Apache-2.0"
] | 3 | 2019-04-22T10:40:27.000Z | 2020-05-14T11:27:09.000Z | import argparse
import pandas as pd
parser = argparse.ArgumentParser()
parser.add_argument('csvs', type=argparse.FileType('r'), nargs='+')
parser.add_argument('-out', type=argparse.FileType('w'), default='out.csv')
args = parser.parse_args()
pd.concat([pd.read_csv(f, sep='\t') for f in args.csvs],
axis=0).to_... | 39.666667 | 75 | 0.70028 |
9c9783eb738d90cec205f76bc47ef31bc9e4981c | 1,867 | py | Python | tests/test_generate_histogram_plot.py | laelbarlow/amoebae | 3c6607bcb64a60baee2f19f0a25e14b325e9725d | [
"Apache-2.0"
] | 8 | 2020-07-16T21:36:38.000Z | 2021-11-28T08:32:05.000Z | tests/test_generate_histogram_plot.py | laelbarlow/amoebae | 3c6607bcb64a60baee2f19f0a25e14b325e9725d | [
"Apache-2.0"
] | null | null | null | tests/test_generate_histogram_plot.py | laelbarlow/amoebae | 3c6607bcb64a60baee2f19f0a25e14b325e9725d | [
"Apache-2.0"
] | 1 | 2020-07-31T21:21:15.000Z | 2020-07-31T21:21:15.000Z | #!/usr/bin/env python3
"""PyTest tests for the generate_histogram_plot.py module.
"""
import os
import sys
sys.path.append(os.path.join(os.path.dirname(sys.path[0]),'amoebaelib')) # Customize.
from generate_histogram_plot import \
generate_histogram, \
generate_double_histogram, \
autolabel_bars, \
generate_bar_chart
... | 22.22619 | 90 | 0.528656 |
9c98525fcb0d0b1802ff821f7d1db0119cf52338 | 10,149 | py | Python | src/tools/convert_airsimcam_to_coco.py | PhyllisH/CenterNet | dc17ed79329a7a8faeffbd44be85019b4779a371 | [
"MIT"
] | null | null | null | src/tools/convert_airsimcam_to_coco.py | PhyllisH/CenterNet | dc17ed79329a7a8faeffbd44be85019b4779a371 | [
"MIT"
] | null | null | null | src/tools/convert_airsimcam_to_coco.py | PhyllisH/CenterNet | dc17ed79329a7a8faeffbd44be85019b4779a371 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pickle
import json
import numpy as np
import math
import cv2
import os
import random
import matplotlib.pyplot as plt
from pyquaternion import Quaternion
import pycocotools.coco as coco
# DATA_PATH = '..... | 42.822785 | 122 | 0.515913 |
9c9a821cc281b228396f8b843b5b439e1cb8ce61 | 14,355 | py | Python | dataset_production/extract_ear_tail_segmentations.py | OllieBoyne/dog-dynamics | c472f984cb04e6dea932be6a42f4daaf174fb44c | [
"Apache-2.0"
] | 1 | 2020-10-04T18:40:23.000Z | 2020-10-04T18:40:23.000Z | dataset_production/extract_ear_tail_segmentations.py | OllieBoyne/dog-dynamics | c472f984cb04e6dea932be6a42f4daaf174fb44c | [
"Apache-2.0"
] | null | null | null | dataset_production/extract_ear_tail_segmentations.py | OllieBoyne/dog-dynamics | c472f984cb04e6dea932be6a42f4daaf174fb44c | [
"Apache-2.0"
] | null | null | null | """Scripts for second stage of labelling - ear and tail segmentations"""
from vis.utils import *
from dataset_production.mturk_processor import *
from scipy.ndimage import center_of_mass as COM
from matplotlib import colors
def extract_colours(rgb_array):
"""Given an array of (r,g,b) values, returns list of unique ... | 34.927007 | 126 | 0.676419 |
9c9ab6d958bddc118fb34cac20ce0e74d1c7b8ce | 664 | py | Python | dl_jp_geojson/data/makecsv.py | mski-iksm/dl_jp_geojson | 64edaa3f6200994c4d8fb61b52ecc0bae9da6842 | [
"MIT"
] | null | null | null | dl_jp_geojson/data/makecsv.py | mski-iksm/dl_jp_geojson | 64edaa3f6200994c4d8fb61b52ecc0bae9da6842 | [
"MIT"
] | null | null | null | dl_jp_geojson/data/makecsv.py | mski-iksm/dl_jp_geojson | 64edaa3f6200994c4d8fb61b52ecc0bae9da6842 | [
"MIT"
] | null | null | null | import pandas as pd
savename = "prefecture_city.csv"
savedf = False
for num in range(1, 48):
strnum = '{0:02d}'.format(num)
filename = "prefecture{}.txt".format(strnum)
df = pd.read_csv(filename, sep='|', skiprows=[1])
df.columns = ["nan0", 'prefecture_name', 'prefecture_code',
... | 27.666667 | 64 | 0.575301 |
9c9b7594766494a397545f4d3091de4ab4059dcb | 2,396 | py | Python | extras/tests/test_views.py | 2bithacker/peering-manager | 5953c4b1f2cff2a370b68d418a98c5c9e3037de8 | [
"Apache-2.0"
] | null | null | null | extras/tests/test_views.py | 2bithacker/peering-manager | 5953c4b1f2cff2a370b68d418a98c5c9e3037de8 | [
"Apache-2.0"
] | 1 | 2021-11-11T22:08:22.000Z | 2021-11-11T22:08:22.000Z | extras/tests/test_views.py | 2bithacker/peering-manager | 5953c4b1f2cff2a370b68d418a98c5c9e3037de8 | [
"Apache-2.0"
] | null | null | null | from unittest.mock import patch
from funcy.funcs import identity
from extras.models import IXAPI
from utils.testing import ViewTestCases
| 30.329114 | 61 | 0.466611 |
9c9bab4583ba12cbca4b9bc83f9587b603f8df68 | 405 | py | Python | refinery/units/obfuscation/ps1/escape.py | bronxc/refinery | 9448facf48a0008f27861dd1a5ee8f5218e6bb86 | [
"BSD-3-Clause"
] | 1 | 2022-02-13T20:57:15.000Z | 2022-02-13T20:57:15.000Z | refinery/units/obfuscation/ps1/escape.py | bronxc/refinery | 9448facf48a0008f27861dd1a5ee8f5218e6bb86 | [
"BSD-3-Clause"
] | null | null | null | refinery/units/obfuscation/ps1/escape.py | bronxc/refinery | 9448facf48a0008f27861dd1a5ee8f5218e6bb86 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
from refinery.units.obfuscation import Deobfuscator
from refinery.units.obfuscation.ps1 import Ps1StringLiterals
| 25.3125 | 62 | 0.671605 |
9c9bed51d7ce9e6e6a8e36ed3a6d340243c9131e | 7,399 | py | Python | torchshard/nn/modules/linear.py | KaiyuYue/torchshard | 89e21def180bf6063ceb2e312a61631173abc7e7 | [
"Apache-2.0"
] | 265 | 2021-04-27T12:06:45.000Z | 2022-03-17T11:13:17.000Z | torchshard/nn/modules/linear.py | poodarchu/torchshard | 667cfce9ed3e2170c7768d910a71aa07897857e7 | [
"Apache-2.0"
] | 7 | 2021-05-24T06:54:44.000Z | 2022-01-01T18:47:38.000Z | torchshard/nn/modules/linear.py | KaiyuYue/torchshard | 89e21def180bf6063ceb2e312a61631173abc7e7 | [
"Apache-2.0"
] | 11 | 2021-04-28T04:15:44.000Z | 2022-01-26T04:29:30.000Z | import warnings
import math
from typing import Optional, TypeVar
import torch
import torch.nn as nn
from torch import Tensor
from torch.nn import Module
from torch.nn import init
from torch.nn.parameter import Parameter
import torchshard
from .. import functional as F
from ...distributed import get_world_size, get_... | 35.066351 | 114 | 0.602784 |
9c9c1b01207c7561b9e6a131ab0ef5cd461c221f | 635 | py | Python | hood/forms.py | magechaP/WayaHoodie | 3138f72bee9e6326390ed808da7958a96019b2f4 | [
"MIT"
] | null | null | null | hood/forms.py | magechaP/WayaHoodie | 3138f72bee9e6326390ed808da7958a96019b2f4 | [
"MIT"
] | 4 | 2020-06-05T22:58:00.000Z | 2021-09-08T01:17:04.000Z | hood/forms.py | magechaP/WayaHoodie | 3138f72bee9e6326390ed808da7958a96019b2f4 | [
"MIT"
] | null | null | null | from django import forms
from .models import Profile,Post,Neighbourhood,Business
from django.contrib.auth.models import User
| 25.4 | 56 | 0.677165 |
9c9cabc6e5e7bcca6db0d16855af1de0a476a452 | 234 | py | Python | k_means_clustering/data.py | awesome-archive/Machine-Learning-with-Python | 898ebbf2d7c780cb5a89bad51d0b7e043e25879f | [
"MIT"
] | 2 | 2020-08-11T03:59:26.000Z | 2020-11-04T21:52:48.000Z | k_means_clustering/data.py | skylaronomics/Machine-Learning-with-Python | 186a6f38f6719e5610e0143aecdf170c842ff107 | [
"MIT"
] | 2 | 2021-06-02T02:30:02.000Z | 2021-11-15T17:51:42.000Z | k_means_clustering/data.py | skylaronomics/Machine-Learning-with-Python | 186a6f38f6719e5610e0143aecdf170c842ff107 | [
"MIT"
] | 1 | 2020-07-21T18:36:03.000Z | 2020-07-21T18:36:03.000Z | inputs = [[-14, -5], [13, 13], [20, 23], [-19, -11], [-9, -16], [21, 27], [-49, 15], [26, 13], [-46, 5], [-34, -1],
[11, 15], [-49, 0], [-22, -16], [19, 28], [-12, -8], [-13, -19], [-41, 8], [-11, -6], [-25, -9], [-18, -3]]
| 78 | 117 | 0.324786 |
9c9d795d7478f8874ad3e2278920a0dbad64e675 | 1,639 | py | Python | NiaPy/tests/test_ba.py | kivancguckiran/NiaPy | 06d3699c1466bfc54c4220a4aabe97cad50f75e4 | [
"MIT"
] | 2 | 2018-10-07T08:41:44.000Z | 2019-04-05T15:30:56.000Z | NiaPy/tests/test_ba.py | kivancguckiran/NiaPy | 06d3699c1466bfc54c4220a4aabe97cad50f75e4 | [
"MIT"
] | null | null | null | NiaPy/tests/test_ba.py | kivancguckiran/NiaPy | 06d3699c1466bfc54c4220a4aabe97cad50f75e4 | [
"MIT"
] | null | null | null | # pylint: disable=old-style-class, line-too-long
from NiaPy.tests.test_algorithm import AlgorithmTestCase, MyBenchmark
from NiaPy.algorithms.basic import BatAlgorithm
| 49.666667 | 157 | 0.661379 |
9c9d85a146755f67b9bdd4855fe645173983f2c8 | 223 | py | Python | tests/run_tests.py | in-toto/layout-web-tool | cbadd131a692e8457d548da2d37012306ba4a7b9 | [
"MIT"
] | 1 | 2020-04-01T15:05:54.000Z | 2020-04-01T15:05:54.000Z | tests/run_tests.py | in-toto/layout-web-tool | cbadd131a692e8457d548da2d37012306ba4a7b9 | [
"MIT"
] | 42 | 2017-05-23T17:19:19.000Z | 2021-04-26T12:28:47.000Z | tests/run_tests.py | in-toto/layout-web-tool | cbadd131a692e8457d548da2d37012306ba4a7b9 | [
"MIT"
] | 7 | 2017-05-04T02:13:07.000Z | 2020-07-09T10:56:03.000Z | from unittest import defaultTestLoader, TextTestRunner
import sys
suite = defaultTestLoader.discover(start_dir=".")
result = TextTestRunner(verbosity=2, buffer=True).run(suite)
sys.exit(0 if result.wasSuccessful() else 1)
| 31.857143 | 60 | 0.802691 |
9c9e5420532409a23c5fc534b2790fbcc02c3ff3 | 3,104 | py | Python | solstice/core/shot.py | tpoveda/solstice | ccccc376cebd6701d038fdd6ebaabc33ebdf259f | [
"MIT"
] | null | null | null | solstice/core/shot.py | tpoveda/solstice | ccccc376cebd6701d038fdd6ebaabc33ebdf259f | [
"MIT"
] | null | null | null | solstice/core/shot.py | tpoveda/solstice | ccccc376cebd6701d038fdd6ebaabc33ebdf259f | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Base class that defines Artella Shot for Solstice
"""
from __future__ import print_function, division, absolute_import
__author__ = "Tomas Poveda"
__license__ = "MIT"
__maintainer__ = "Tomas Poveda"
__email__ = "tpovedatd@gmail.com"
import logging
import artellapi... | 31.353535 | 107 | 0.662371 |
9c9e6fd73ba9c604609823280549a5b9ea38d594 | 764 | py | Python | tests/integration/conftest.py | pshelby/boto3_paginator | 9680e6f2f4075e1c3bb7a082f913a514e0d912f5 | [
"MIT"
] | null | null | null | tests/integration/conftest.py | pshelby/boto3_paginator | 9680e6f2f4075e1c3bb7a082f913a514e0d912f5 | [
"MIT"
] | null | null | null | tests/integration/conftest.py | pshelby/boto3_paginator | 9680e6f2f4075e1c3bb7a082f913a514e0d912f5 | [
"MIT"
] | null | null | null | """Fixtures for integration tests."""
from pytest import fixture
| 27.285714 | 57 | 0.659686 |
9c9f0bd5bac5004d0be7ff13716a4af3686f9d6a | 17,094 | py | Python | src/shaders/MaterialX/build_materialX_osl.py | FrankFirsching/OpenShadingLanguage | 2789d4345a2865af669c8b3bb402a5bff9faf927 | [
"BSD-3-Clause"
] | 2 | 2019-10-05T20:01:05.000Z | 2021-07-29T19:28:18.000Z | src/shaders/MaterialX/build_materialX_osl.py | brechtvl/OpenShadingLanguage | 71c4fb263fcdc88decf2b86d346836f7a2b4d463 | [
"BSD-3-Clause"
] | null | null | null | src/shaders/MaterialX/build_materialX_osl.py | brechtvl/OpenShadingLanguage | 71c4fb263fcdc88decf2b86d346836f7a2b4d463 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
'''
Generate compilable .osl files from .mx templates
Adam Martinez
TODO: Some functionalization in place, can it be expanded?
Add ability to specify shader and shader type to compile to osl
Is there a more compact representation of the BUILD_DICT we can employ?
'''
import os
imp... | 40.507109 | 155 | 0.514333 |
9ca0a45bddeef0f2653047fb40011df6a5d96a62 | 782 | py | Python | QuickStarts/HM.py | nj-czy/UCTB | bddb8b47953bef1f44cb06f1a57a3d7efbd31c3a | [
"MIT"
] | 28 | 2020-02-28T03:16:43.000Z | 2022-03-31T07:24:47.000Z | QuickStarts/HM.py | nj-czy/UCTB | bddb8b47953bef1f44cb06f1a57a3d7efbd31c3a | [
"MIT"
] | 8 | 2020-06-30T09:34:56.000Z | 2022-01-17T12:20:28.000Z | QuickStarts/HM.py | nj-czy/UCTB | bddb8b47953bef1f44cb06f1a57a3d7efbd31c3a | [
"MIT"
] | 13 | 2020-06-04T09:47:36.000Z | 2022-02-25T09:50:52.000Z | from UCTB.dataset import NodeTrafficLoader
from UCTB.model import HM
from UCTB.evaluation import metric
from UCTB.utils import save_predict_in_dataset
data_loader = NodeTrafficLoader(dataset='Bike', city='NYC', closeness_len=0, period_len=0, trend_len=4,
with_lm=False, normalize=F... | 41.157895 | 104 | 0.704604 |
9ca2a39bfe7f388015f1c315841d7c7f13c699eb | 14,764 | py | Python | contrib/grv_proxy_model/proxy_model.py | PierreZ/foundationdb | d97d9681766766836f991ec65f64b66b654b966c | [
"Apache-2.0"
] | 11,024 | 2018-04-19T16:06:46.000Z | 2022-03-31T23:43:55.000Z | contrib/grv_proxy_model/proxy_model.py | PierreZ/foundationdb | d97d9681766766836f991ec65f64b66b654b966c | [
"Apache-2.0"
] | 4,430 | 2018-04-19T17:12:33.000Z | 2022-03-31T23:56:34.000Z | contrib/grv_proxy_model/proxy_model.py | PierreZ/foundationdb | d97d9681766766836f991ec65f64b66b654b966c | [
"Apache-2.0"
] | 1,146 | 2018-04-19T16:45:57.000Z | 2022-03-30T10:43:57.000Z | #
# proxy_model.py
#
# This source file is part of the FoundationDB open source project
#
# Copyright 2013-2020 Apple Inc. and the FoundationDB project 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 o... | 43.551622 | 260 | 0.684503 |
9ca4c6440cb1de8f401d9054c72769d131e5b57a | 2,808 | py | Python | zookeeper-contrib/zookeeper-contrib-rest/src/python/demo_queue.py | lzk630/zookeeper | 424631f0361ef9c97c439f2e2570bdadfb47f774 | [
"Apache-2.0"
] | 255 | 2015-07-16T06:23:51.000Z | 2022-03-22T06:43:23.000Z | src/contrib/rest/src/python/demo_queue.py | phunt/zookeeper | 8bf467bca26079ce6fca94dfef96efa13d4df664 | [
"Apache-2.0"
] | 46 | 2015-11-18T01:46:53.000Z | 2022-03-21T21:19:55.000Z | src/contrib/rest/src/python/demo_queue.py | phunt/zookeeper | 8bf467bca26079ce6fca94dfef96efa13d4df664 | [
"Apache-2.0"
] | 132 | 2015-01-07T08:54:50.000Z | 2021-06-23T07:48:34.000Z | #! /usr/bin/env 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
# "... | 28.08 | 86 | 0.633903 |
9ca51e950be017b28a0d4cdd38cd2171db8c47ae | 6,010 | py | Python | trade_remedies_api/core/migrations/0001_initial.py | uktrade/trade-remedies-api | fbe2d142ef099c7244788a0f72dd1003eaa7edce | [
"MIT"
] | 1 | 2020-08-13T10:37:15.000Z | 2020-08-13T10:37:15.000Z | trade_remedies_api/core/migrations/0001_initial.py | uktrade/trade-remedies-api | fbe2d142ef099c7244788a0f72dd1003eaa7edce | [
"MIT"
] | 4 | 2020-09-10T13:41:52.000Z | 2020-12-16T09:00:21.000Z | trade_remedies_api/core/migrations/0001_initial.py | uktrade/trade-remedies-api | fbe2d142ef099c7244788a0f72dd1003eaa7edce | [
"MIT"
] | null | null | null | # Generated by Django 2.0.1 on 2018-10-15 14:44
from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import django_countries.fields
import security.models
import timezone_field.fields
import u... | 39.281046 | 134 | 0.450749 |
9ca773ac0f073470bf450494c33f4940782589f8 | 4,857 | py | Python | apps/quiz/graphql/querys.py | nxexox/questionnaire-site | 9598e64c950da42d8282bb438f4498f854ea698a | [
"MIT"
] | null | null | null | apps/quiz/graphql/querys.py | nxexox/questionnaire-site | 9598e64c950da42d8282bb438f4498f854ea698a | [
"MIT"
] | null | null | null | apps/quiz/graphql/querys.py | nxexox/questionnaire-site | 9598e64c950da42d8282bb438f4498f854ea698a | [
"MIT"
] | null | null | null | """
ALL Query GraphQL.
"""
import logging
import datetime
import graphene
from graphql import GraphQLError
from .types import (
AccountTestType, TestCaseType, StartTestType
)
from ..models import (
AccountTest, TestCase, Test
)
logger = logging.getLogger(__name__)
# TODO: /
| 30.54717 | 111 | 0.624665 |
9ca89f63a6d302d06960f1d3111151094f3756f2 | 218 | py | Python | Bioinformatics Stronghold/Global Alignment with Scoring Matrix.py | Vinay-Vinod/Rosalind | 6818a38d1378a55e84e9f75636bacce2c274d24c | [
"MIT"
] | null | null | null | Bioinformatics Stronghold/Global Alignment with Scoring Matrix.py | Vinay-Vinod/Rosalind | 6818a38d1378a55e84e9f75636bacce2c274d24c | [
"MIT"
] | null | null | null | Bioinformatics Stronghold/Global Alignment with Scoring Matrix.py | Vinay-Vinod/Rosalind | 6818a38d1378a55e84e9f75636bacce2c274d24c | [
"MIT"
] | null | null | null | from Bio import pairwise2
from Bio import SeqIO
from Bio.SubsMat.MatrixInfo import blosum62
s = 'PLEASANTLY'
t = 'MEANLY'
a = pairwise2.align.globalds(s, t, blosum62, -5, -5)
print(pairwise2.format_alignment(*a[0]))
| 21.8 | 52 | 0.747706 |
9cab50c58e4f3c4b31b27fba5d18763090e63b20 | 4,547 | py | Python | source_optics/models/author.py | mpdehaan/source_optics | ce0215ad63e47f0ab645c765129bac3c7236aff1 | [
"Apache-2.0"
] | 1 | 2021-08-24T03:41:34.000Z | 2021-08-24T03:41:34.000Z | source_optics/models/author.py | mpdehaan/source_optics | ce0215ad63e47f0ab645c765129bac3c7236aff1 | [
"Apache-2.0"
] | null | null | null | source_optics/models/author.py | mpdehaan/source_optics | ce0215ad63e47f0ab645c765129bac3c7236aff1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2019 SourceOptics Project Contributors
#
# 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... | 36.087302 | 116 | 0.632065 |
9cab8d3a411dd7c4773e6e7308b7a8e97ceb31d6 | 2,820 | py | Python | commands/image.py | mhwdvs/MITSBot | a0b3899b24df61976b0a6c98c61a75b9e8fa32a0 | [
"MIT"
] | null | null | null | commands/image.py | mhwdvs/MITSBot | a0b3899b24df61976b0a6c98c61a75b9e8fa32a0 | [
"MIT"
] | null | null | null | commands/image.py | mhwdvs/MITSBot | a0b3899b24df61976b0a6c98c61a75b9e8fa32a0 | [
"MIT"
] | null | null | null | import random
import requests
from mitsbot_globals import bingAPIKey, animals, animalFilter, addEventListener
from discordHelpers import sendImageEmbed
# add event listeners for discord commands
addEventListener("an", sendAnimal)
addEventListener("animal", sendAnimal)
addEventListener("ang", sendAnimalGif)
ad... | 42.089552 | 120 | 0.620567 |
9cae496e1b2f412f1fae88cb2da5c9ceee2ccec9 | 2,020 | py | Python | influxdb-2.0/data_recv.py | anubhavs9/iot-reference-codes | 032802152976b7dea9d9e6cb0e60659efb82c295 | [
"MIT"
] | null | null | null | influxdb-2.0/data_recv.py | anubhavs9/iot-reference-codes | 032802152976b7dea9d9e6cb0e60659efb82c295 | [
"MIT"
] | null | null | null | influxdb-2.0/data_recv.py | anubhavs9/iot-reference-codes | 032802152976b7dea9d9e6cb0e60659efb82c295 | [
"MIT"
] | null | null | null | import json
import influxdb_client
from influxdb_client.client.write_api import SYNCHRONOUS
if __name__ == "__main__":
q = QueryData()
query = f'from(bucket:"{q.bucket}")\
|> range(start: -5m)\
|> filter(fn:(r) => r._measurement == "my_measurement")\
|> filter(fn: (r) => r.location == ... | 33.114754 | 72 | 0.562871 |
9caf022c3f2864b15bee88ecc375d06b4492e187 | 1,839 | py | Python | filesystem.py | mvdnes/mdms | 95f80efaf9c1b527515d7fd6155f3e9245e86164 | [
"MIT"
] | null | null | null | filesystem.py | mvdnes/mdms | 95f80efaf9c1b527515d7fd6155f3e9245e86164 | [
"MIT"
] | null | null | null | filesystem.py | mvdnes/mdms | 95f80efaf9c1b527515d7fd6155f3e9245e86164 | [
"MIT"
] | 1 | 2018-07-25T10:01:07.000Z | 2018-07-25T10:01:07.000Z | import os
import shutil
| 28.734375 | 67 | 0.585644 |
9caf05395c79fc2af4c7564cdcfd716e7e6bd154 | 2,049 | py | Python | omniscient/kg/triple_store.py | Impavidity/Omniscient | 4e51791739dc9c1b1399df42ff36e0920b4c1c5c | [
"Apache-2.0"
] | 2 | 2018-11-14T05:29:52.000Z | 2019-05-21T03:42:28.000Z | omniscient/kg/triple_store.py | Impavidity/Omniscient | 4e51791739dc9c1b1399df42ff36e0920b4c1c5c | [
"Apache-2.0"
] | null | null | null | omniscient/kg/triple_store.py | Impavidity/Omniscient | 4e51791739dc9c1b1399df42ff36e0920b4c1c5c | [
"Apache-2.0"
] | 2 | 2019-08-08T00:41:26.000Z | 2020-03-17T18:12:31.000Z | from omniscient.base.constants import *
from omniscient.base.logger import Log
from elasticsearch import Elasticsearch, helpers
import json
logger = Log("info")
| 28.068493 | 124 | 0.630063 |
9caf406a1ea001c308fc80f8ba7e257e04a231a5 | 1,223 | py | Python | commands/joinserver.py | Heufneutje/DideRobot | acbb608d5c73cef8739d9dd3149d781afc75acae | [
"MIT"
] | null | null | null | commands/joinserver.py | Heufneutje/DideRobot | acbb608d5c73cef8739d9dd3149d781afc75acae | [
"MIT"
] | null | null | null | commands/joinserver.py | Heufneutje/DideRobot | acbb608d5c73cef8739d9dd3149d781afc75acae | [
"MIT"
] | null | null | null | from CommandTemplate import CommandTemplate
import GlobalStore
from IrcMessage import IrcMessage
| 42.172414 | 200 | 0.745707 |
9cafc3e6882c69b4dd9c6fff6f58dcd2b8f75de5 | 398 | py | Python | onegreek/old.comments/old.comments/__init__.py | goldhand/onegreek | 1ad105f15608284a9e80802734f0c6222413a4a0 | [
"BSD-3-Clause"
] | 1 | 2019-06-13T11:46:08.000Z | 2019-06-13T11:46:08.000Z | onegreek/old.comments/old.comments/__init__.py | goldhand/onegreek | 1ad105f15608284a9e80802734f0c6222413a4a0 | [
"BSD-3-Clause"
] | null | null | null | onegreek/old.comments/old.comments/__init__.py | goldhand/onegreek | 1ad105f15608284a9e80802734f0c6222413a4a0 | [
"BSD-3-Clause"
] | null | null | null | from django.core.urlresolvers import reverse_lazy
from .models import PComment as Comment
from .forms import PCommentForm as CommentForm
def get_model():
"""
Return the model to use for commenting.
"""
return Comment
def get_form():
"""
Return the form to use for commenting.
"""
retur... | 20.947368 | 49 | 0.70603 |
9cb19cdf8855026084363e3183821b88d0d91181 | 1,361 | py | Python | src/panoptes/pocs/state/states/default/observing.py | programatt/POCS | 6450a27e3d3a9bb33e251f5d3508266445fe8136 | [
"MIT"
] | null | null | null | src/panoptes/pocs/state/states/default/observing.py | programatt/POCS | 6450a27e3d3a9bb33e251f5d3508266445fe8136 | [
"MIT"
] | null | null | null | src/panoptes/pocs/state/states/default/observing.py | programatt/POCS | 6450a27e3d3a9bb33e251f5d3508266445fe8136 | [
"MIT"
] | null | null | null | from multiprocessing import Process
from panoptes.utils import error
def on_enter(event_data):
"""Take an observation image.
This state is responsible for taking the actual observation image.
"""
pocs = event_data.model
current_obs = pocs.observatory.current_observation
pocs.say(f" I'm obse... | 40.029412 | 97 | 0.68626 |
9cb3b866b240fca4b686d2dbdbde5c913b7e9e68 | 4,183 | py | Python | src/datasets/cityscape.py | Brazilian-Institute-of-Robotics/autonomous_perception | 5645a2bc6811b33e9e6bf0f6873f496dff45ad94 | [
"MIT"
] | null | null | null | src/datasets/cityscape.py | Brazilian-Institute-of-Robotics/autonomous_perception | 5645a2bc6811b33e9e6bf0f6873f496dff45ad94 | [
"MIT"
] | null | null | null | src/datasets/cityscape.py | Brazilian-Institute-of-Robotics/autonomous_perception | 5645a2bc6811b33e9e6bf0f6873f496dff45ad94 | [
"MIT"
] | 1 | 2020-12-23T23:27:30.000Z | 2020-12-23T23:27:30.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 23 00:54:08 2019
@author: nelson
"""
import tensorflow_datasets.public_api as tfds
import os
import tensorflow as tf
classes = [{'name': 'road' , 'color': [128, 64,128]},
{'name': 'sidewalk' , 'color': [244, 35,232]},
... | 39.838095 | 89 | 0.491274 |
9cb42d7e7d29bdef3eb52b0cd527e745541b8523 | 4,697 | py | Python | scripts/utils.py | JIC-Image-Analysis/leaf-cell-polarisation-tensors | cf5495a77a0bb77aa99206146267e41995ee5ebd | [
"MIT"
] | null | null | null | scripts/utils.py | JIC-Image-Analysis/leaf-cell-polarisation-tensors | cf5495a77a0bb77aa99206146267e41995ee5ebd | [
"MIT"
] | null | null | null | scripts/utils.py | JIC-Image-Analysis/leaf-cell-polarisation-tensors | cf5495a77a0bb77aa99206146267e41995ee5ebd | [
"MIT"
] | null | null | null | """Utility functions."""
import os.path
import logging
import numpy as np
from jicbioimage.core.image import MicroscopyCollection
from jicbioimage.core.transform import transformation
from jicbioimage.core.io import (
AutoWrite,
FileBackend,
DataManager,
_md5_hexdigest_from_file,
)
from jicbioimage.t... | 30.303226 | 76 | 0.70875 |
9cb4e7e16692d11e46d9cf8f2373fcd636831fcc | 831 | py | Python | cos/patches.py | baylee-d/cos.io | 3f88acb0feb7a167bf9e81c42e28f9d2d38bbd43 | [
"Apache-2.0"
] | null | null | null | cos/patches.py | baylee-d/cos.io | 3f88acb0feb7a167bf9e81c42e28f9d2d38bbd43 | [
"Apache-2.0"
] | null | null | null | cos/patches.py | baylee-d/cos.io | 3f88acb0feb7a167bf9e81c42e28f9d2d38bbd43 | [
"Apache-2.0"
] | null | null | null | from django.utils.html import strip_tags
| 30.777778 | 75 | 0.616125 |
9cb6b2fa52f4755d592b0155718670f52aeb9f41 | 5,242 | py | Python | tests/unit/data/metadataset_test.py | Brikwerk/learn2learn | 7997c13c26ec627d13ce77ba98427260df78ada8 | [
"MIT"
] | 1 | 2021-07-07T17:03:45.000Z | 2021-07-07T17:03:45.000Z | tests/unit/data/metadataset_test.py | Brikwerk/learn2learn | 7997c13c26ec627d13ce77ba98427260df78ada8 | [
"MIT"
] | null | null | null | tests/unit/data/metadataset_test.py | Brikwerk/learn2learn | 7997c13c26ec627d13ce77ba98427260df78ada8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import unittest
from unittest import TestCase
import learn2learn as l2l
import numpy as np
from numpy.testing import assert_array_equal
from learn2learn.data import MetaDataset
from .util_datasets import TestDatasets
if __name__ == '__main__':
unittest.main()
| 44.803419 | 112 | 0.643457 |
9cb773294b5f9609161513dcd00107f097b6bbc0 | 4,974 | py | Python | shutter.py | devgiants/home-automation-items | c516e344d24649746af501d46b88fc1bc0ab3368 | [
"MIT"
] | null | null | null | shutter.py | devgiants/home-automation-items | c516e344d24649746af501d46b88fc1bc0ab3368 | [
"MIT"
] | null | null | null | shutter.py | devgiants/home-automation-items | c516e344d24649746af501d46b88fc1bc0ab3368 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import logging
import sys
import threading
from gpiozero import LED, Button
from signal import pause | 34.068493 | 146 | 0.608162 |
9cb7c784e0a6d8c1980b922a58d1d3caf3ac317b | 1,094 | py | Python | project/apps/registration/migrations/0003_auto_20190904_0615.py | dbinetti/barberscore | 13c3d8193834bd2bb79922e28d3f5ab1675bdffd | [
"BSD-2-Clause"
] | 13 | 2017-08-07T15:45:49.000Z | 2019-07-03T13:58:50.000Z | project/apps/registration/migrations/0003_auto_20190904_0615.py | barberscore/barberscore-api | 2aa9f8598c18c28ba1d4a294f76fd055619f803e | [
"BSD-2-Clause"
] | 309 | 2017-07-14T02:34:12.000Z | 2022-01-14T21:37:02.000Z | project/apps/registration/migrations/0003_auto_20190904_0615.py | dbinetti/barberscore-django | 16fbd9945becda0a765bbdf52ad459a63655128f | [
"BSD-2-Clause"
] | 5 | 2017-08-07T14:01:07.000Z | 2019-06-24T19:44:55.000Z | # Generated by Django 2.2.4 on 2019-09-04 13:15
from django.db import migrations
| 26.682927 | 52 | 0.581353 |
9cb8db803f38715facca07d97b74c472e6e12272 | 416 | py | Python | py_ws/sep_while.py | hjhan/python-for-kids | 51d8cb3361fc7b7c4fb0a714670498450611d219 | [
"MIT"
] | null | null | null | py_ws/sep_while.py | hjhan/python-for-kids | 51d8cb3361fc7b7c4fb0a714670498450611d219 | [
"MIT"
] | null | null | null | py_ws/sep_while.py | hjhan/python-for-kids | 51d8cb3361fc7b7c4fb0a714670498450611d219 | [
"MIT"
] | null | null | null | # print("", end=' ')
n = int(input(""))
i = 0
digits = [] # list
while (n >= 10 ** i):
# digit = int(n % 10 ** (i + 1) / 10 ** i)
digit = n % 10 ** (i + 1) // 10 ** i #
#digits.insert(0, digit)
digits.append(digit)
i += 1
print("%s" % digits)
len = len(digits)
sum = 0
for i in ran... | 23.111111 | 52 | 0.478365 |
9cbade0bc4a1a6746c6d1a8abe962b54698d0d4e | 3,469 | py | Python | src/generator/dependency_tracker.py | SirGFM/SirGFM.github.io | d2432be03bb0ced68b546bd25769e59dfade4982 | [
"Zlib"
] | null | null | null | src/generator/dependency_tracker.py | SirGFM/SirGFM.github.io | d2432be03bb0ced68b546bd25769e59dfade4982 | [
"Zlib"
] | null | null | null | src/generator/dependency_tracker.py | SirGFM/SirGFM.github.io | d2432be03bb0ced68b546bd25769e59dfade4982 | [
"Zlib"
] | null | null | null |
import json
import sys
import re
def main(src, output_name):
"""Create the list of dependencies for any given page
"""
pattern = re.compile(r'\$add_game\(.+?, (.+?)\)')
d_name = ''
html_name = ''
if output_name.endswith('.d'):
d_name = output_name
elif output_name.endswith('.html'... | 33.355769 | 113 | 0.502162 |
9cbc11953dd73fb6f511c74d730fad379ee2138f | 91 | py | Python | config.py | agithug/fan-controller | 046ecd9120c3a3fa0c581cbcd3dc89bd50a7373c | [
"MIT"
] | null | null | null | config.py | agithug/fan-controller | 046ecd9120c3a3fa0c581cbcd3dc89bd50a7373c | [
"MIT"
] | null | null | null | config.py | agithug/fan-controller | 046ecd9120c3a3fa0c581cbcd3dc89bd50a7373c | [
"MIT"
] | null | null | null | #used as a configuration file
def fan:
pin = 4
dependencies = [python3,gpiozero]
| 13 | 37 | 0.67033 |
9cbc945a0d3063f43ad61663e0acc93e00ed41c0 | 6,742 | py | Python | src/HAnDS/helper.py | abhipec/hands | ff9658d4226c78b96c02ccf3b91b7d2699f0e4cf | [
"MIT"
] | 13 | 2019-05-02T01:44:04.000Z | 2022-02-21T13:39:47.000Z | src/HAnDS/helper.py | abhipec/hands | ff9658d4226c78b96c02ccf3b91b7d2699f0e4cf | [
"MIT"
] | 1 | 2021-06-01T13:04:51.000Z | 2021-06-08T16:07:35.000Z | src/HAnDS/helper.py | abhipec/hands | ff9658d4226c78b96c02ccf3b91b7d2699f0e4cf | [
"MIT"
] | 1 | 2019-12-26T07:24:03.000Z | 2019-12-26T07:24:03.000Z | """
Contains various helper function related to CADS framework.
"""
import os
import errno
import pickle
from nameparser import HumanName
#pylint:disable=raising-bad-type
def ensure_directory(directory):
"""
Create the directories along the provided directory path that do not exist.
"""
directory = os.... | 29.831858 | 96 | 0.641946 |
9cbd3addb82fc2785f1af32671b0ecfb8f84bd9d | 1,974 | py | Python | zmon_worker_monitor/adapters/ifunctionfactory_plugin.py | heroldus/zmon-worker | 458f8bacb5a00f7fd93d59db406a2c80870519d1 | [
"Apache-2.0"
] | 17 | 2016-06-03T14:59:21.000Z | 2020-11-06T13:12:18.000Z | zmon_worker_monitor/adapters/ifunctionfactory_plugin.py | heroldus/zmon-worker | 458f8bacb5a00f7fd93d59db406a2c80870519d1 | [
"Apache-2.0"
] | 394 | 2016-06-03T14:47:37.000Z | 2020-04-21T09:31:23.000Z | zmon_worker_monitor/adapters/ifunctionfactory_plugin.py | heroldus/zmon-worker | 458f8bacb5a00f7fd93d59db406a2c80870519d1 | [
"Apache-2.0"
] | 55 | 2016-08-15T12:42:28.000Z | 2021-04-06T10:49:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from ibase_plugin import IBasePlugin
from abc import ABCMeta, abstractmethod
def propartial(func, *args, **kwargs):
'''
>>> propartial(int, base=2)('100')
4
>>> propartial(int, base=2)('100', base=16)
256
>>> propartial(int, base=2, __protected=... | 32.9 | 118 | 0.678825 |
9cbd9e49ae6c4d9c717ce04a992db53d48888f0a | 17,459 | py | Python | design.py | tvanzyl/adaptive_bandwidth_kde | 8aef713b78705ac3192bf5eb6b42b93b3611d8dc | [
"MIT"
] | null | null | null | design.py | tvanzyl/adaptive_bandwidth_kde | 8aef713b78705ac3192bf5eb6b42b93b3611d8dc | [
"MIT"
] | null | null | null | design.py | tvanzyl/adaptive_bandwidth_kde | 8aef713b78705ac3192bf5eb6b42b93b3611d8dc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 6 16:59:19 2016
@author: tvzyl
"""
import data
from sklearn.datasets import make_spd_matrix
from pandas import DataFrame
from numpy import mean, diag, eye, rot90, dot, array, abs
from numpy import zeros, ones, arange
from numpy.random import uniform
from scipy.stats ... | 48.768156 | 281 | 0.627986 |
9cc4a956152fdbca76b3675be69befe26d5b5929 | 41 | py | Python | 0x02-python-import_modules/101-easy_print.py | Nahi-Terefe/alx-higher_level_programming | c67a78a6f79e853918963971f8352979e7691541 | [
"MIT"
] | null | null | null | 0x02-python-import_modules/101-easy_print.py | Nahi-Terefe/alx-higher_level_programming | c67a78a6f79e853918963971f8352979e7691541 | [
"MIT"
] | null | null | null | 0x02-python-import_modules/101-easy_print.py | Nahi-Terefe/alx-higher_level_programming | c67a78a6f79e853918963971f8352979e7691541 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import easy_print_101
| 13.666667 | 21 | 0.804878 |
9cc5c9273609531bbca19e97c35f0e5eef3aa812 | 675 | py | Python | offline_tools/processing/create_samples.py | kauevestena/snav | 73b93bc4e5c9d9fc51cbd3559a1d74209d2a7fc9 | [
"MIT"
] | 2 | 2019-05-13T20:46:01.000Z | 2021-02-10T14:06:37.000Z | offline_tools/processing/create_samples.py | kauevestena/snav | 73b93bc4e5c9d9fc51cbd3559a1d74209d2a7fc9 | [
"MIT"
] | null | null | null | offline_tools/processing/create_samples.py | kauevestena/snav | 73b93bc4e5c9d9fc51cbd3559a1d74209d2a7fc9 | [
"MIT"
] | null | null | null | import os
import glob
import random
from processing_functions import misc as msc
from shutil import copyfile
# define the number of samples you want
n_samples = 50
imgsPath = os.environ['HOME']+'/data/extracted_images/2019-07-11-16-21-46/ngr'
out_path = os.environ['HOME']+'/data/extracted_images/samples/'+msc.find... | 19.285714 | 98 | 0.742222 |
9cc5d0cf3bc75d730a617fb4405aa3d01d0ee2a9 | 16,626 | py | Python | AppcestryCore/compare.py | jason-chao/appcestry | c3858e51ac27466cb008722453a3cc9882b2e6a1 | [
"MIT"
] | 3 | 2019-04-04T02:49:40.000Z | 2021-08-31T03:19:47.000Z | AppcestryCore/compare.py | jason-chao/appcestry | c3858e51ac27466cb008722453a3cc9882b2e6a1 | [
"MIT"
] | null | null | null | AppcestryCore/compare.py | jason-chao/appcestry | c3858e51ac27466cb008722453a3cc9882b2e6a1 | [
"MIT"
] | 2 | 2019-04-05T15:06:54.000Z | 2019-08-04T12:21:55.000Z | #!/usr/bin/env python3
# This script compares AppGene files for similiarty
# Run this script in terminal / command line to see the usage of arguments.
import os
import argparse
from sklearn.feature_extraction.text import HashingVectorizer
import json
import re
from sklearn.metrics.pairwise import cosine_similarity
im... | 41.669173 | 206 | 0.630218 |
9cc696533b798f11c9e94346fe3734171f19a56d | 328 | py | Python | api/common/JQSDK_Connect.py | abcdcamey/stock-data | bfdc67e60b7d4de59c66dbb52159574b4e0a5e51 | [
"MIT"
] | 1 | 2019-04-10T09:07:59.000Z | 2019-04-10T09:07:59.000Z | api/common/JQSDK_Connect.py | abcdcamey/stock-data | bfdc67e60b7d4de59c66dbb52159574b4e0a5e51 | [
"MIT"
] | 2 | 2021-06-01T23:39:34.000Z | 2021-12-13T19:58:31.000Z | api/common/JQSDK_Connect.py | abcdcamey/stock-data | bfdc67e60b7d4de59c66dbb52159574b4e0a5e51 | [
"MIT"
] | null | null | null | #coding=utf-8
from jqdatasdk import *
| 16.4 | 86 | 0.670732 |
9cc7ac4c9568f74a7e2bfcb29110a9c6f879e2fd | 4,561 | py | Python | python/coloralgorithm/coloralgorithm.py | jonolt/dmx-colormatch | 170ac4748f7d4d03e14104a2096cdd11b63d7a0e | [
"Xnet",
"X11"
] | null | null | null | python/coloralgorithm/coloralgorithm.py | jonolt/dmx-colormatch | 170ac4748f7d4d03e14104a2096cdd11b63d7a0e | [
"Xnet",
"X11"
] | 1 | 2021-03-05T19:37:02.000Z | 2021-03-05T19:37:02.000Z | python/coloralgorithm/coloralgorithm.py | jonolt/dmx-colormatch | 170ac4748f7d4d03e14104a2096cdd11b63d7a0e | [
"Xnet",
"X11"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from fixture import FixtureRGB
import math
import time
import numpy as np
if __name__ == "__main__":
org_rgbc = [1508, 1147, 2873, 5526]
org_dmx = [200, 150, 210]
#org_rgbc = [3333,1186,705,5057]
#org_dmx = [255, 200, 0]
#org_rgbc=[1604,1828,... | 24.923497 | 147 | 0.521377 |
9cc7f5b2b9f4e310e35dc3ebd0e3ad778fc7d355 | 3,880 | py | Python | oasislmf/utils/defaults.py | strategist922/OasisLMF | 7f30ab061307d27943b3fc1b0262c6200e2cdcf3 | [
"BSD-3-Clause"
] | 1 | 2019-10-25T03:15:14.000Z | 2019-10-25T03:15:14.000Z | oasislmf/utils/defaults.py | strategist922/OasisLMF | 7f30ab061307d27943b3fc1b0262c6200e2cdcf3 | [
"BSD-3-Clause"
] | null | null | null | oasislmf/utils/defaults.py | strategist922/OasisLMF | 7f30ab061307d27943b3fc1b0262c6200e2cdcf3 | [
"BSD-3-Clause"
] | null | null | null | __all__ = [
'get_config_profile',
'get_default_accounts_profile',
'get_default_deterministic_analysis_settings',
'get_default_exposure_profile',
'get_default_fm_aggregation_profile',
'get_default_unified_profile',
'get_loc_dtypes',
'get_acc_dtypes',
'get_scope_dtypes',
'get_info_... | 26.758621 | 107 | 0.70799 |
9cc9655c102180c64f11f7ecabab9a8083456ce9 | 318 | py | Python | PythonModulo1/ex006.py | BossNX/ExerciciosDePython | 27c79d284794f65f94d3a07de11429d665ec92da | [
"MIT"
] | null | null | null | PythonModulo1/ex006.py | BossNX/ExerciciosDePython | 27c79d284794f65f94d3a07de11429d665ec92da | [
"MIT"
] | null | null | null | PythonModulo1/ex006.py | BossNX/ExerciciosDePython | 27c79d284794f65f94d3a07de11429d665ec92da | [
"MIT"
] | null | null | null | n = int(input('Digite um nmero: '))
d = n * 2
t = n * 3
r = n ** (1/2)
print('O dobro de \033[4;31m{}\033[m vale \033[34m{}\033[m. '.format(n, d))
print('O triplo de \033[4;33m{}\033[m vale \033[36m{}\033[m. '.format(n, t))
print('A raz quadrada de \033[4;35m{}\033[m igual a \033[32m{:.2f}\033[m. '.format(n, r))
| 39.75 | 92 | 0.578616 |
9cca040e273e226a19dc1e216e57277c3625c810 | 1,107 | py | Python | api/views.py | aleattene/ASD-Management | 3824ad1697eecf8c052e56bed9bbe53eddd71d00 | [
"MIT"
] | null | null | null | api/views.py | aleattene/ASD-Management | 3824ad1697eecf8c052e56bed9bbe53eddd71d00 | [
"MIT"
] | 21 | 2021-07-22T08:32:24.000Z | 2022-02-16T10:38:24.000Z | api/views.py | aleattene/asd-management-webapp-responsive | 3824ad1697eecf8c052e56bed9bbe53eddd71d00 | [
"MIT"
] | null | null | null | import requests
import json
from environs import Env
from django.http import HttpResponse, HttpResponseBadRequest, HttpRequest
from django.views.decorators.csrf import csrf_exempt, csrf_protect
env = Env()
if __name__ == "__main__":
request_access_token() | 29.131579 | 82 | 0.707317 |
9ccc6cbd9c91a838175af4e8950b1d1c84a28033 | 555 | py | Python | Lab04.py | gksmfzz1/JavaProject | 6b22badf8052a66928ab3ef2f60e83bfa54466c1 | [
"Apache-2.0"
] | null | null | null | Lab04.py | gksmfzz1/JavaProject | 6b22badf8052a66928ab3ef2f60e83bfa54466c1 | [
"Apache-2.0"
] | null | null | null | Lab04.py | gksmfzz1/JavaProject | 6b22badf8052a66928ab3ef2f60e83bfa54466c1 | [
"Apache-2.0"
] | null | null | null | # 30 while 10010000 5
number = 100
isloot = True
sumnum = 0
while isloot:
if number >= 10000:
isloot = False
sumnum += number
number += 5
print(sumnum)
# 34 (F) (c)
# = (100/180) x ( - 32)
F = 0
C = 0
isloot = True
while isloot:
F = int(input(' (0)'))
if F > 0 :
C = ... | 14.605263 | 49 | 0.533333 |
9cd017d4ef005fd4cb543de0bc5fedaa0f8e0574 | 747 | py | Python | Aurix code/jsonDijkstra/map2json/Line_t.py | SamiEzz/embeddedTwirtee | 118e7709c9bb173701e25c4b1375ee1d384a61a4 | [
"MIT"
] | null | null | null | Aurix code/jsonDijkstra/map2json/Line_t.py | SamiEzz/embeddedTwirtee | 118e7709c9bb173701e25c4b1375ee1d384a61a4 | [
"MIT"
] | 1 | 2020-02-26T16:14:32.000Z | 2020-02-26T16:14:32.000Z | python_tools/map2json/Line_t.py | SamiEzz/embeddedTwirtee | 118e7709c9bb173701e25c4b1375ee1d384a61a4 | [
"MIT"
] | null | null | null | from Point_t import Point_t
from Leg import *
import math
| 43.941176 | 244 | 0.686747 |
9cd0e0ae6fade5e80f9f3332ac23be40551b8667 | 6,344 | py | Python | multiMNIST/display_result.py | kelvin95/EPOSearch | 020f0a8890437449dd7bb37534697aa9f71e8305 | [
"MIT"
] | null | null | null | multiMNIST/display_result.py | kelvin95/EPOSearch | 020f0a8890437449dd7bb37534697aa9f71e8305 | [
"MIT"
] | null | null | null | multiMNIST/display_result.py | kelvin95/EPOSearch | 020f0a8890437449dd7bb37534697aa9f71e8305 | [
"MIT"
] | null | null | null | import numpy as np
import pickle as pkl
import os
import matplotlib.pyplot as plt
from brokenaxes import brokenaxes
from latex_utils import latexify
baseline = "indiv"
methods = [
# "epo",
# "pmtl",
"linscalar",
# "gradnorm",
"gradortho",
"grad... | 35.049724 | 83 | 0.51466 |
9cd122ce12f565785b62e9d4b58b2d66d5dbc30f | 1,849 | py | Python | api/organisations/tests/factories.py | django-doctor/lite-api | 1ba278ba22ebcbb977dd7c31dd3701151cd036bf | [
"MIT"
] | 3 | 2019-05-15T09:30:39.000Z | 2020-04-22T16:14:23.000Z | api/organisations/tests/factories.py | django-doctor/lite-api | 1ba278ba22ebcbb977dd7c31dd3701151cd036bf | [
"MIT"
] | 85 | 2019-04-24T10:39:35.000Z | 2022-03-21T14:52:12.000Z | api/organisations/tests/factories.py | django-doctor/lite-api | 1ba278ba22ebcbb977dd7c31dd3701151cd036bf | [
"MIT"
] | 1 | 2021-01-17T11:12:19.000Z | 2021-01-17T11:12:19.000Z | import random
import factory
from django.utils import timezone
from api.addresses.tests.factories import AddressFactory
from api.organisations import models
from api.organisations.enums import OrganisationType, OrganisationStatus
from api.organisations.tests.providers import OrganisationProvider
factory.Faker.add_pr... | 33.017857 | 105 | 0.746349 |