hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
41af56265d2a05c39faa4a7748196f4661c1ed2f | 6,174 | py | Python | tests/util/test_package.py | leloberg/Home-Assistant | 5800b57791ac7767d19a50dcd07ea40353d925fc | [
"Apache-2.0"
] | 1 | 2019-05-29T15:43:01.000Z | 2019-05-29T15:43:01.000Z | tests/util/test_package.py | leloberg/Home-Assistant | 5800b57791ac7767d19a50dcd07ea40353d925fc | [
"Apache-2.0"
] | null | null | null | tests/util/test_package.py | leloberg/Home-Assistant | 5800b57791ac7767d19a50dcd07ea40353d925fc | [
"Apache-2.0"
] | null | null | null | """Test Home Assistant package util methods."""
import asyncio
import logging
import os
import sys
from subprocess import PIPE
from unittest.mock import MagicMock, call, patch
import pkg_resources
import pytest
import homeassistant.util.package as package
RESOURCE_DIR = os.path.abspath(
os.path.join(os.path.dir... | 31.340102 | 77 | 0.683997 |
c6593cdc69d717b54855bf8754d824a2b93d2efd | 1,807 | py | Python | zinnia/tests/test_context.py | SteveByerly/django-blog-zinnia | 0dba47b6c7da2ed94c98131159262f97784865fe | [
"BSD-3-Clause"
] | 2 | 2017-02-24T15:36:29.000Z | 2017-12-30T15:59:34.000Z | zinnia/tests/test_context.py | SteveByerly/django-blog-zinnia | 0dba47b6c7da2ed94c98131159262f97784865fe | [
"BSD-3-Clause"
] | null | null | null | zinnia/tests/test_context.py | SteveByerly/django-blog-zinnia | 0dba47b6c7da2ed94c98131159262f97784865fe | [
"BSD-3-Clause"
] | null | null | null | """Test cases for Zinnia Context"""
from django.test import TestCase
from django.template import Context
from django.core.paginator import Paginator
from zinnia.context import get_context_first_object
from zinnia.context import get_context_first_matching_object
from zinnia.context import get_context_loop_positions
c... | 34.09434 | 67 | 0.600996 |
0cbeb9237abe02df9c6637257a16f99fb892ec0a | 5,992 | py | Python | helpers.py | mwasilew/ci-scripts | 0750f7ca1e4da17ce386d2188b05d8294164fb72 | [
"Apache-2.0"
] | null | null | null | helpers.py | mwasilew/ci-scripts | 0750f7ca1e4da17ce386d2188b05d8294164fb72 | [
"Apache-2.0"
] | null | null | null | helpers.py | mwasilew/ci-scripts | 0750f7ca1e4da17ce386d2188b05d8294164fb72 | [
"Apache-2.0"
] | null | null | null | import contextlib
from zipfile import ZipFile
import json
import os
import subprocess
import sys
import traceback
from typing import Optional
import requests
SECRETS = os.environ.get('SECRETS_DIR', '/secrets')
def require_env(*env_names):
missing = []
for e in env_names:
try:
yield os.en... | 31.046632 | 93 | 0.598131 |
7c498d04d22128226dff2cf9ff6695f46c70b713 | 2,225 | py | Python | result_writer.py | equill/datadog-snmp | 101963a33cf96d6ec32c7ff3e0a274ed4c4942d5 | [
"Apache-2.0"
] | null | null | null | result_writer.py | equill/datadog-snmp | 101963a33cf96d6ec32c7ff3e0a274ed4c4942d5 | [
"Apache-2.0"
] | 3 | 2017-06-11T15:52:05.000Z | 2017-08-17T14:59:20.000Z | result_writer.py | equill/datadog-snmp | 101963a33cf96d6ec32c7ff3e0a274ed4c4942d5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Query remote devices via SNMP
# and update the shared storage dict.
#
# Note that we're not on python3.6 yet,
# so shared substructures don't work.
# This is why the indices are crappy-looking composite strings.
# Copyright [2017] [James Fleming <james@electronic-quill.net]
#
# Licensed u... | 32.720588 | 86 | 0.65618 |
f50124ddce917b6bdd1f443b8b6717b04893e189 | 14,913 | py | Python | Components/HelpMenu.py | Necom1/Mango-Pi | 6476b471c2345f0417f075742e7da74a1c5155fe | [
"MIT"
] | 1 | 2020-07-23T19:16:25.000Z | 2020-07-23T19:16:25.000Z | Components/HelpMenu.py | Necom1/Mango-Pi | 6476b471c2345f0417f075742e7da74a1c5155fe | [
"MIT"
] | null | null | null | Components/HelpMenu.py | Necom1/Mango-Pi | 6476b471c2345f0417f075742e7da74a1c5155fe | [
"MIT"
] | 1 | 2021-01-09T12:26:54.000Z | 2021-01-09T12:26:54.000Z | import asyncio
import discord
import itertools
from discord.ext.commands.help import HelpCommand
from discord.ext.commands import Command, Context, Group, Cog
def process_description(description: str):
"""
Function to cut the passed in string before \n\n if any
Parameters
----------
description: ... | 34.125858 | 118 | 0.566687 |
84c1e99bddf7855ac3a8eb83b4f4ad3f76c90462 | 1,240 | py | Python | clients/kratos/python/test/test_needs_privileged_session_error.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | 77 | 2020-02-14T17:27:36.000Z | 2022-03-25T08:44:52.000Z | clients/kratos/python/test/test_needs_privileged_session_error.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | 125 | 2020-02-07T21:45:52.000Z | 2022-03-31T12:54:24.000Z | clients/kratos/python/test/test_needs_privileged_session_error.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | 44 | 2020-01-31T22:05:47.000Z | 2022-03-09T14:41:22.000Z | """
Ory Kratos API
Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the admini... | 33.513514 | 446 | 0.754839 |
78176e90d0c56529241ba67752e680084325b8b3 | 51 | py | Python | mlops/examples/image/__init__.py | kostaleonard/mlops | 236d3499535d6294768c15336180217829fb2ee3 | [
"MIT"
] | 1 | 2021-11-26T21:41:00.000Z | 2021-11-26T21:41:00.000Z | mlops/examples/image/__init__.py | kostaleonard/mlops | 236d3499535d6294768c15336180217829fb2ee3 | [
"MIT"
] | 39 | 2021-11-18T20:01:34.000Z | 2022-03-26T17:59:07.000Z | mlops/examples/image/__init__.py | kostaleonard/mlops | 236d3499535d6294768c15336180217829fb2ee3 | [
"MIT"
] | null | null | null | """Contains examples on image processing tasks."""
| 25.5 | 50 | 0.745098 |
36ea40c1cfe44da503b7c662fa4b8c110c9b2f8b | 2,813 | py | Python | brownies/BNL/restools/width_analysis.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 14 | 2019-08-29T23:46:24.000Z | 2022-03-21T10:16:25.000Z | brownies/BNL/restools/width_analysis.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 1 | 2020-08-04T16:14:45.000Z | 2021-12-01T01:54:34.000Z | brownies/BNL/restools/width_analysis.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 2 | 2022-03-03T22:41:41.000Z | 2022-03-03T22:54:43.000Z | import math
import numpy
def Chi2Distribution(y, nu, norm, verbose=False):
"""
Porter-Thomas distribution
Froehner's eq. (277).
Really just a chi^2 distribution with nu degrees of freedom
:param y:
:param nu:
:param norm:
:param verbose:
:return:
"""
if verbose:
pr... | 30.247312 | 96 | 0.571987 |
6766ba02264b6cb1a1850674395d3724a705f300 | 605 | py | Python | podcast/8/export-csv-to-md.py | kukimik/haskellfoundation.github.io | 8f5ebdb3ca9c7caf57f128892d2964f63282a4b4 | [
"Apache-2.0"
] | 23 | 2021-05-08T22:24:13.000Z | 2022-03-05T19:43:46.000Z | podcast/8/export-csv-to-md.py | kukimik/haskellfoundation.github.io | 8f5ebdb3ca9c7caf57f128892d2964f63282a4b4 | [
"Apache-2.0"
] | 92 | 2021-05-08T02:13:36.000Z | 2022-03-23T18:47:22.000Z | podcast/8/export-csv-to-md.py | kukimik/haskellfoundation.github.io | 8f5ebdb3ca9c7caf57f128892d2964f63282a4b4 | [
"Apache-2.0"
] | 22 | 2021-05-17T22:40:00.000Z | 2022-03-25T01:44:23.000Z | #!/usr/bin/env python3
#
# Quick helper to export my CSV to the transcription Markdown format. You might
# have to fix the Windows line endings prior, and this will print an extra
# newline at the end.
#
# I use `_Speaker:_` instead of `_Speaker_:`. Both have been used, mixed before.
import sys, csv
def export_to_md(... | 28.809524 | 80 | 0.629752 |
c56d4215c48318ad696e7d06a3d9c59d8c18b82f | 17,413 | py | Python | glance/common/exception.py | wkoathp/glance | eb0c47047ddc28371f546437118986ed904f41d3 | [
"Apache-2.0"
] | null | null | null | glance/common/exception.py | wkoathp/glance | eb0c47047ddc28371f546437118986ed904f41d3 | [
"Apache-2.0"
] | null | null | null | glance/common/exception.py | wkoathp/glance | eb0c47047ddc28371f546437118986ed904f41d3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | 31.262118 | 79 | 0.689887 |
2d752cb7467a96bdda24382d8b3e40cd5404b1a5 | 3,058 | py | Python | examples/advanced/circuits.py | quantopian/cvxpy | 7deee4d172470aa8f629dab7fead50467afa75ff | [
"Apache-2.0"
] | 5 | 2017-08-31T01:37:00.000Z | 2022-03-24T04:23:09.000Z | examples/advanced/circuits.py | quantopian/cvxpy | 7deee4d172470aa8f629dab7fead50467afa75ff | [
"Apache-2.0"
] | null | null | null | examples/advanced/circuits.py | quantopian/cvxpy | 7deee4d172470aa8f629dab7fead50467afa75ff | [
"Apache-2.0"
] | 6 | 2017-02-09T19:37:07.000Z | 2021-01-07T00:17:54.000Z | # An object oriented model of a circuit.
from cvxpy import *
import abc
class Node(object):
""" A node connecting devices. """
def __init__(self):
self.voltage = Variable()
self.current_flows = []
# The current entering a node equals the current leaving the node.
def constraints(self):... | 30.277228 | 80 | 0.662525 |
8e8366c185b76f1bfa937d34f658d152e91294e8 | 2,167 | py | Python | utils/ark_utils.py | bvshyam/ark-analysis | f5fdeda2328c12e78ef7d6ca5abc8af3fe464db6 | [
"BSD-3-Clause"
] | null | null | null | utils/ark_utils.py | bvshyam/ark-analysis | f5fdeda2328c12e78ef7d6ca5abc8af3fe464db6 | [
"BSD-3-Clause"
] | null | null | null | utils/ark_utils.py | bvshyam/ark-analysis | f5fdeda2328c12e78ef7d6ca5abc8af3fe464db6 | [
"BSD-3-Clause"
] | null | null | null | import time
import random
import os
import json
import csv
import string
import requests
from bs4 import BeautifulSoup
import html5lib
# Setup Logging
import logging
from logutil import LOGGER_NAME
logger = logging.getLogger(LOGGER_NAME)
def csv_write(file_name, data, open_type='w'):
try:
if not data:
... | 25.797619 | 157 | 0.570374 |
bcfa7fa1b1def40ea12071c15eb5152422be37c1 | 2,242 | py | Python | gqsat/buffer.py | dmeoli/GQSAT | 25e088a3f76406639082412e2f982321ef86d3a0 | [
"Apache-2.0"
] | null | null | null | gqsat/buffer.py | dmeoli/GQSAT | 25e088a3f76406639082412e2f982321ef86d3a0 | [
"Apache-2.0"
] | null | null | null | gqsat/buffer.py | dmeoli/GQSAT | 25e088a3f76406639082412e2f982321ef86d3a0 | [
"Apache-2.0"
] | 1 | 2022-02-27T21:00:21.000Z | 2022-02-27T21:00:21.000Z | # Copyright 2019-2020 Nvidia 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 i... | 33.969697 | 78 | 0.632471 |
4b4456139bd60d5af580a5927b288ce0380b1996 | 14,132 | py | Python | cogs/textgames.py | GitHubEmploy/modbot | 68f216f4f6b866c468218c5d3a5e7ca9d8088ec2 | [
"MIT"
] | 11 | 2019-01-10T22:09:31.000Z | 2021-12-14T05:26:10.000Z | cogs/textgames.py | SAXSN/modbot | f3bbb0b9e2551306c45e3c09eb83ccd2fcef7cca | [
"MIT"
] | 5 | 2019-01-10T07:20:19.000Z | 2021-04-22T00:57:34.000Z | cogs/textgames.py | SAXSN/modbot | f3bbb0b9e2551306c45e3c09eb83ccd2fcef7cca | [
"MIT"
] | 34 | 2019-01-10T05:49:29.000Z | 2022-02-11T14:04:54.000Z | """
MIT License
Copyright (c) 2019 WebKide [d.id @323578534763298816]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modi... | 43.888199 | 117 | 0.515568 |
3abddc50c418dbe7047e06549bfcf5e649d1f3dc | 6,182 | py | Python | neutron/common/config.py | yagosys/neutron | 005fec677c3bf8b2aa0df68c4aedc2b708ec7caf | [
"Apache-2.0"
] | 1 | 2016-01-13T14:29:07.000Z | 2016-01-13T14:29:07.000Z | neutron/common/config.py | yagosys/neutron | 005fec677c3bf8b2aa0df68c4aedc2b708ec7caf | [
"Apache-2.0"
] | null | null | null | neutron/common/config.py | yagosys/neutron | 005fec677c3bf8b2aa0df68c4aedc2b708ec7caf | [
"Apache-2.0"
] | 3 | 2015-04-03T08:47:02.000Z | 2020-02-05T10:40:45.000Z | # Copyright 2011 VMware, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 40.142857 | 78 | 0.656422 |
f040a429a092a4ebd49ec74b6f68170a035f2cf2 | 388 | py | Python | tests/test_mpripper.py | zackwine/mpripper | f0f80e84d8a0ff6b1211104c2d4abf1f3a95e985 | [
"BSD-3-Clause"
] | null | null | null | tests/test_mpripper.py | zackwine/mpripper | f0f80e84d8a0ff6b1211104c2d4abf1f3a95e985 | [
"BSD-3-Clause"
] | null | null | null | tests/test_mpripper.py | zackwine/mpripper | f0f80e84d8a0ff6b1211104c2d4abf1f3a95e985 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_mpripper
----------------------------------
Tests for `mpripper` module.
"""
import unittest
from mpripper import mpripper
class TestMpripper(unittest.TestCase):
def setUp(self):
pass
def test_something(self):
pass
def tearDown(... | 13.37931 | 38 | 0.574742 |
5810e540bb09cbcfede7dadcb313ad3a81b48075 | 2,887 | py | Python | code/musicPlay.py | KaranTyagi/emotion-detection-music-player | 0f36917483ad509a596e4017a21e0c72924db48e | [
"MIT"
] | 7 | 2018-07-24T20:20:04.000Z | 2021-05-16T20:54:10.000Z | code/musicPlay.py | Hitesh1912/emotion-recognizing-music-player | a21c248e8acd52a282b5cacfd42f89f3d61136ea | [
"MIT"
] | null | null | null | code/musicPlay.py | Hitesh1912/emotion-recognizing-music-player | a21c248e8acd52a282b5cacfd42f89f3d61136ea | [
"MIT"
] | 5 | 2018-05-03T21:07:26.000Z | 2021-10-08T11:25:09.000Z | from time import sleep
import pygame
import sys
import random
import keyboard
_songs = ['/MSCS/Projects/emosic/romantic.mp3','/MSCS/Projects/emosic/joy.mp3', '/MSCS/Projects/emosic/relax.mp3', '/MSCS/Projects/emosic/rock.mp3']
_currently_playing_song = None
def playsound(soundfile):
"""Play sound through default... | 26.731481 | 148 | 0.674749 |
26dfaf662bc07e5a572ef8b3205bc0a66fb356eb | 1,807 | py | Python | domains/explore/problems/training/problem115_EE.py | patras91/rae_release | 0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30 | [
"BSD-3-Clause"
] | 1 | 2021-09-28T12:56:56.000Z | 2021-09-28T12:56:56.000Z | domains/explore/problems/training/problem115_EE.py | patras91/rae_release | 0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30 | [
"BSD-3-Clause"
] | null | null | null | domains/explore/problems/training/problem115_EE.py | patras91/rae_release | 0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30 | [
"BSD-3-Clause"
] | 1 | 2022-03-31T16:30:39.000Z | 2022-03-31T16:30:39.000Z | __author__ = 'patras'
from domain_exploreEnv import *
from timer import DURATION
from state import state, rv
DURATION.TIME = {
'survey': 5,
'monitor': 5,
'screen': 5,
'sample': 5,
'process': 5,
'fly': 3,
'deposit': 1,
'transferData': 1,
'take': 2,
'put': 2,
'move': 10,
'... | 30.627119 | 247 | 0.480354 |
b1b50d896163df8fee33bd4b71376dfceeaaa5f4 | 29,838 | py | Python | cinder/tests/unit/api/v3/test_group_snapshots.py | cloudification-io/cinder | 23d76e01f2b4f3771b57fb287084a4884238b827 | [
"Apache-2.0"
] | 571 | 2015-01-01T17:47:26.000Z | 2022-03-23T07:46:36.000Z | cinder/tests/unit/api/v3/test_group_snapshots.py | dFarui/cinder | b2922384054ddbd46e071fd07372a75a21d7f85d | [
"Apache-2.0"
] | 37 | 2015-01-22T23:27:04.000Z | 2021-02-05T16:38:48.000Z | cinder/tests/unit/api/v3/test_group_snapshots.py | dFarui/cinder | b2922384054ddbd46e071fd07372a75a21d7f85d | [
"Apache-2.0"
] | 841 | 2015-01-04T17:17:11.000Z | 2022-03-31T12:06:51.000Z | # Copyright (C) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 45.763804 | 79 | 0.570849 |
a044549be37daaec7217f74b2454b03ebe462a76 | 4,719 | py | Python | NewsSentiment/losses/seq2seqloss.py | jamie-iai/NewsMTSC | 912d2a84b2c81962c06729a31d974bdf95d33dc9 | [
"MIT"
] | 46 | 2021-04-09T11:53:40.000Z | 2022-03-31T14:41:13.000Z | NewsSentiment/losses/seq2seqloss.py | jamie-iai/NewsMTSC | 912d2a84b2c81962c06729a31d974bdf95d33dc9 | [
"MIT"
] | 14 | 2021-05-25T12:44:52.000Z | 2022-01-12T08:51:58.000Z | NewsSentiment/losses/seq2seqloss.py | jamie-iai/NewsMTSC | 912d2a84b2c81962c06729a31d974bdf95d33dc9 | [
"MIT"
] | 7 | 2021-05-23T11:40:27.000Z | 2022-03-28T03:13:26.000Z | import torch
import torch.nn as nn
from NewsSentiment.SentimentClasses import SentimentClasses
class SequenceLoss(nn.Module):
"""
Input to this loss are sequences, see models/multitargets/seq2seq.py
"""
def __init__(self, device, weight):
super(SequenceLoss, self).__init__()
self.dev... | 45.815534 | 108 | 0.535707 |
4f5004314eb76803c040217476948983640da1d4 | 2,079 | py | Python | model_navigator/converter/tf2onnx/tf_saver.py | triton-inference-server/model_navigator | ec2915f4f5a6b9ed7e1b59290899e2b56b98bcc7 | [
"ECL-2.0",
"Apache-2.0"
] | 49 | 2021-04-09T18:32:07.000Z | 2022-03-29T07:32:24.000Z | model_navigator/converter/tf2onnx/tf_saver.py | triton-inference-server/model_navigator | ec2915f4f5a6b9ed7e1b59290899e2b56b98bcc7 | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2021-07-13T09:00:12.000Z | 2021-11-15T17:16:35.000Z | model_navigator/converter/tf2onnx/tf_saver.py | triton-inference-server/model_navigator | ec2915f4f5a6b9ed7e1b59290899e2b56b98bcc7 | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2021-04-09T18:31:56.000Z | 2022-03-01T08:08:04.000Z | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 38.5 | 119 | 0.699856 |
9256272187f3e8d2273d34de44114eab205628d9 | 496 | py | Python | plotly/validators/scatter3d/line/_width.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 2 | 2018-12-03T15:20:42.000Z | 2018-12-03T15:20:47.000Z | plotly/validators/scatter3d/line/_width.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatter3d/line/_width.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 2 | 2019-06-17T01:35:57.000Z | 2020-11-03T01:07:19.000Z | import _plotly_utils.basevalidators
class WidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name='width', parent_name='scatter3d.line', **kwargs
):
super(WidthValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_... | 29.176471 | 73 | 0.614919 |
a49001e4c4bf56ef13684ba1b408768c8791e9de | 14,255 | py | Python | pyupdater/vendor/PyInstaller/loader/pyi_archive.py | rsumner31/PyUpdater1 | d9658000472e57453267ee8fa174ae914dd8d33c | [
"BSD-2-Clause"
] | null | null | null | pyupdater/vendor/PyInstaller/loader/pyi_archive.py | rsumner31/PyUpdater1 | d9658000472e57453267ee8fa174ae914dd8d33c | [
"BSD-2-Clause"
] | null | null | null | pyupdater/vendor/PyInstaller/loader/pyi_archive.py | rsumner31/PyUpdater1 | d9658000472e57453267ee8fa174ae914dd8d33c | [
"BSD-2-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2013, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this softwa... | 32.620137 | 97 | 0.555244 |
419f0503dcc8c8f2dc3f99edd60855bd43427e6c | 1,393 | py | Python | tests/test_padding.py | amartya-dev/rich | c65f0ee527569e643a4a7dfe302e14cbc7b87304 | [
"MIT"
] | null | null | null | tests/test_padding.py | amartya-dev/rich | c65f0ee527569e643a4a7dfe302e14cbc7b87304 | [
"MIT"
] | null | null | null | tests/test_padding.py | amartya-dev/rich | c65f0ee527569e643a4a7dfe302e14cbc7b87304 | [
"MIT"
] | null | null | null | import pytest
from rich.padding import Padding
from rich.console import Console, ConsoleOptions
from rich.style import Style
from rich.segment import Segment
def test_repr():
padding = Padding("foo", (1, 2))
assert isinstance(repr(padding), str)
def test_indent():
indent_result = Padding.indent("test",... | 26.788462 | 74 | 0.636755 |
4699ea195693ad0f0d45aa9d81ad0ddb4a7db567 | 9,667 | py | Python | download_oscar/dod.py | Uinelj/download_oscar | a6b14e9957b9de9faa9e4f7651262831886f5a59 | [
"MIT"
] | null | null | null | download_oscar/dod.py | Uinelj/download_oscar | a6b14e9957b9de9faa9e4f7651262831886f5a59 | [
"MIT"
] | null | null | null | download_oscar/dod.py | Uinelj/download_oscar | a6b14e9957b9de9faa9e4f7651262831886f5a59 | [
"MIT"
] | null | null | null | import argparse
import os
from hashlib import sha256
from io import StringIO
from pathlib import Path
from typing import List
import requests
from bs4 import BeautifulSoup
from requests import sessions
from tqdm import tqdm
from download_oscar.status import Status
def login(user: str, password: str, s: sessions.Ses... | 31.488599 | 143 | 0.60991 |
a6b4092580a9971b945e8d1d0abaed497b494407 | 1,047 | py | Python | delphin_6_automation/simulation.py | ribuild/delphin_6_automation | 12024381fc1042b46314c55d88b6349229ea33b7 | [
"MIT"
] | 2 | 2017-11-08T18:37:36.000Z | 2018-01-09T12:10:58.000Z | delphin_6_automation/simulation.py | ribuild/delphin_6_automation | 12024381fc1042b46314c55d88b6349229ea33b7 | [
"MIT"
] | 111 | 2018-02-26T08:25:44.000Z | 2021-03-31T19:17:19.000Z | delphin_6_automation/simulation.py | thp44/delphin_6_automation | 12024381fc1042b46314c55d88b6349229ea33b7 | [
"MIT"
] | 3 | 2017-11-06T10:01:25.000Z | 2018-02-14T09:45:28.000Z | __author__ = "Christian Kongsgaard"
__license__ = 'MIT'
# -------------------------------------------------------------------------------------------------------------------- #
# IMPORTS
# Modules
import os
import sys
source_folder = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.insert(0, sou... | 28.297297 | 120 | 0.593123 |
93241610de5ee68ebb699802552b05f5e44eb4fb | 2,034 | py | Python | tests/test_spatial_pad.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | 1 | 2021-07-13T00:34:41.000Z | 2021-07-13T00:34:41.000Z | tests/test_spatial_pad.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | null | null | null | tests/test_spatial_pad.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# 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... | 35.068966 | 105 | 0.657817 |
665d6ad63db099ac0bbca9c32aa26a6586602102 | 3,683 | py | Python | GenPyQRCode.py | deeppunster/play_qrcode | 748faa0f70b1bd44e0a6167c3f788431dd7f6585 | [
"MIT"
] | null | null | null | GenPyQRCode.py | deeppunster/play_qrcode | 748faa0f70b1bd44e0a6167c3f788431dd7f6585 | [
"MIT"
] | null | null | null | GenPyQRCode.py | deeppunster/play_qrcode | 748faa0f70b1bd44e0a6167c3f788431dd7f6585 | [
"MIT"
] | null | null | null | """
GenPyQRCode.py - Generate QR codes using pyqrcode.
"""
import logging
import logging.config
from logging import getLogger, debug, error
from pathlib import Path
from typing import Any, Union, Optional
import pyqrcode
import yaml # from PyYAML library
__author__ = 'Travis Risner'
__project__ = "play_qrcode"
__cr... | 28.114504 | 78 | 0.598968 |
5aa4cf7f53cfbf62bd246840806e79cfca651c93 | 91 | py | Python | tests/utils/__init__.py | id23cat/DMC-compute-nodes | de295b97c0832eb83a7f4c29cb34b517b9ded1bd | [
"Apache-2.0"
] | null | null | null | tests/utils/__init__.py | id23cat/DMC-compute-nodes | de295b97c0832eb83a7f4c29cb34b517b9ded1bd | [
"Apache-2.0"
] | null | null | null | tests/utils/__init__.py | id23cat/DMC-compute-nodes | de295b97c0832eb83a7f4c29cb34b517b9ded1bd | [
"Apache-2.0"
] | 1 | 2021-06-15T14:46:41.000Z | 2021-06-15T14:46:41.000Z | from tests.utils.timed_dict import *
from tests.utils.error_context_handler_mixin import *
| 30.333333 | 53 | 0.846154 |
5999da6f182c1a16a5a66ca4b21c1084d0745e72 | 16,848 | py | Python | simulator/simulator_extensions.py | paulosevero/laxus | db295f3a9c979a8bc4aa0467e8b4a46f8d178d40 | [
"MIT"
] | null | null | null | simulator/simulator_extensions.py | paulosevero/laxus | db295f3a9c979a8bc4aa0467e8b4a46f8d178d40 | [
"MIT"
] | null | null | null | simulator/simulator_extensions.py | paulosevero/laxus | db295f3a9c979a8bc4aa0467e8b4a46f8d178d40 | [
"MIT"
] | null | null | null | """Contains helper methods that extend EdgeSimPy to simulate maintenance in edge infrastructures.
"""
# EdgeSimPy components
from edge_sim_py.components.topology import Topology
from edge_sim_py.components.base_station import BaseStation
from edge_sim_py.components.edge_server import EdgeServer
from edge_sim_py.compone... | 41.910448 | 201 | 0.670109 |
82c06280ab80844b0d55c84b6a8a0c9a7b99a141 | 134 | py | Python | src/preprocessing.py | parama/agegap | 7583b37abd3b96648c0f10ca75dd3f3a36e78868 | [
"MIT"
] | null | null | null | src/preprocessing.py | parama/agegap | 7583b37abd3b96648c0f10ca75dd3f3a36e78868 | [
"MIT"
] | null | null | null | src/preprocessing.py | parama/agegap | 7583b37abd3b96648c0f10ca75dd3f3a36e78868 | [
"MIT"
] | null | null | null | def process_raw_data(raw_data_path):
# Michael's preprocessing code
pass
def convert_to_database(data_folder_path):
pass | 19.142857 | 42 | 0.768657 |
b828dd6cc1d9303b812c5d499fee4a26b92356e3 | 2,712 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20191201/get_virtual_network_gateway_bgp_peer_status.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20191201/get_virtual_network_gateway_bgp_peer_status.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20191201/get_virtual_network_gateway_bgp_peer_status.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 39.304348 | 184 | 0.698378 |
0060dcc3a1e57bae6265f7a7308a12f13a0dfb80 | 56 | py | Python | src/reading_from_input.py | Maiconfz/python-playground | 11a4a169740575cb09b40ed7902992d63580871a | [
"Unlicense"
] | null | null | null | src/reading_from_input.py | Maiconfz/python-playground | 11a4a169740575cb09b40ed7902992d63580871a | [
"Unlicense"
] | null | null | null | src/reading_from_input.py | Maiconfz/python-playground | 11a4a169740575cb09b40ed7902992d63580871a | [
"Unlicense"
] | null | null | null | name = input("What's your name?\n")
print("Hello", name) | 28 | 35 | 0.660714 |
5a7a0c3089ba98345b6302420caea5cfcc6e3b49 | 520 | py | Python | manage.py | hafeez77sk/klu-project-demo | 9a7d7d8b4d5447a2a9ad659d52c14748730d7671 | [
"CC-BY-4.0",
"MIT"
] | 40 | 2018-09-03T10:14:47.000Z | 2021-08-29T00:37:24.000Z | manage.py | hafeez77sk/klu-project-demo | 9a7d7d8b4d5447a2a9ad659d52c14748730d7671 | [
"CC-BY-4.0",
"MIT"
] | 6 | 2018-10-03T16:44:52.000Z | 2019-12-05T07:08:55.000Z | manage.py | hafeez77sk/klu-project-demo | 9a7d7d8b4d5447a2a9ad659d52c14748730d7671 | [
"CC-BY-4.0",
"MIT"
] | 777 | 2018-08-27T14:19:09.000Z | 2022-03-27T23:16:27.000Z | import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'helloworld.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's insta... | 34.666667 | 74 | 0.688462 |
a59d822c49c9c8bbe1f7c18360dd425288249736 | 3,548 | py | Python | linear_operator/operators/kronecker_product_added_diag_linear_operator.py | Balandat/linear_operator | 34c1bc6a0bf4010d54243a4503fb24b9c3201b95 | [
"MIT"
] | 18 | 2020-11-13T14:21:38.000Z | 2022-03-01T22:14:07.000Z | linear_operator/operators/kronecker_product_added_diag_linear_operator.py | Balandat/linear_operator | 34c1bc6a0bf4010d54243a4503fb24b9c3201b95 | [
"MIT"
] | 7 | 2020-11-16T00:53:27.000Z | 2021-01-15T06:10:14.000Z | linear_operator/operators/kronecker_product_added_diag_linear_operator.py | Balandat/linear_operator | 34c1bc6a0bf4010d54243a4503fb24b9c3201b95 | [
"MIT"
] | 2 | 2020-11-13T02:31:11.000Z | 2021-06-04T12:43:05.000Z | #!/usr/bin/env python3
from __future__ import annotations
import torch
from .added_diag_linear_operator import AddedDiagLinearOperator
from .diag_linear_operator import DiagLinearOperator
class KroneckerProductAddedDiagLinearOperator(AddedDiagLinearOperator):
def __init__(self, *linear_operators, preconditione... | 41.255814 | 107 | 0.697576 |
3436f6662fa95b0306fd855668c0659baf99e5ce | 139 | py | Python | jsonclasses_cli/utils/run.py | forever9717/jsonclasses-cli | b20d10cdf2d6c970a879e2a64f31555d4d808829 | [
"MIT"
] | null | null | null | jsonclasses_cli/utils/run.py | forever9717/jsonclasses-cli | b20d10cdf2d6c970a879e2a64f31555d4d808829 | [
"MIT"
] | null | null | null | jsonclasses_cli/utils/run.py | forever9717/jsonclasses-cli | b20d10cdf2d6c970a879e2a64f31555d4d808829 | [
"MIT"
] | null | null | null | from rich import print
from os import system
def run(cmd: str) -> None:
print(f"[bold green]RUN[/bold green] {cmd}")
system(cmd)
| 17.375 | 48 | 0.661871 |
f55981121bebabccafbebf1221180f3f340b9673 | 5,501 | py | Python | packages/pyre/parsing/Scanner.py | PyreFramework/pyre | 345c7449a3416eea1c1affa74fb32faff30a6aaa | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/parsing/Scanner.py | PyreFramework/pyre | 345c7449a3416eea1c1affa74fb32faff30a6aaa | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/parsing/Scanner.py | PyreFramework/pyre | 345c7449a3416eea1c1affa74fb32faff30a6aaa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2022 all rights reserved
#
# externals
from ..patterns import coroutine
# my superclass
from .Lexer import Lexer
# class declaration
class Scanner(metaclass=Lexer):
"""
The input stream tokenizer
"""
# types
# exceptions
... | 28.801047 | 94 | 0.557899 |
7aceda3271f41eda9078f9230c3e20129f69795e | 2,301 | py | Python | jobs/monitor.py | parente/honey.data | 418fa282fdaf1941b91c364ee13b6cabc0e581ea | [
"MIT"
] | null | null | null | jobs/monitor.py | parente/honey.data | 418fa282fdaf1941b91c364ee13b6cabc0e581ea | [
"MIT"
] | null | null | null | jobs/monitor.py | parente/honey.data | 418fa282fdaf1941b91c364ee13b6cabc0e581ea | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Counts the number of times a hall effect sensor detects a magnetic field
every minute and writes those counts to a hourly CSVs on local disk.
"""
import datetime
import logging
import math
import os
import signal
import threading
from gpiozero import LineSensor
import safer
from . import co... | 24.478723 | 76 | 0.676228 |
03af5a3ff8a35e2adc62131db9c8a491f33647e6 | 8,579 | py | Python | src/pyinterp/grid.py | readthedocs-assistant/pangeo-pyinterp | e9dc18445dce36638d5a90f64c8e2f1b53164f90 | [
"BSD-3-Clause"
] | null | null | null | src/pyinterp/grid.py | readthedocs-assistant/pangeo-pyinterp | e9dc18445dce36638d5a90f64c8e2f1b53164f90 | [
"BSD-3-Clause"
] | null | null | null | src/pyinterp/grid.py | readthedocs-assistant/pangeo-pyinterp | e9dc18445dce36638d5a90f64c8e2f1b53164f90 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2022 CNES
#
# All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
"""
Regular grids
=============
"""
from typing import Optional, Union
import numpy as np
from . import core
from . import interface
class Grid2D:
"""2D Cartesian ... | 35.016327 | 79 | 0.530598 |
dea49e82193e21d5e13d89d78d3a3eeb4fa7b471 | 23,244 | py | Python | python/ray/tests/test_resource_demand_scheduler.py | carlos-aguayo/ray | fedbdd5dc6a47aa9cba170816f8c0950193b4fd6 | [
"Apache-2.0"
] | null | null | null | python/ray/tests/test_resource_demand_scheduler.py | carlos-aguayo/ray | fedbdd5dc6a47aa9cba170816f8c0950193b4fd6 | [
"Apache-2.0"
] | null | null | null | python/ray/tests/test_resource_demand_scheduler.py | carlos-aguayo/ray | fedbdd5dc6a47aa9cba170816f8c0950193b4fd6 | [
"Apache-2.0"
] | null | null | null | import pytest
import time
import yaml
import tempfile
import shutil
import unittest
import ray
from ray.tests.test_autoscaler import SMALL_CLUSTER, MockProvider, \
MockProcessRunner
from ray.autoscaler.autoscaler import StandardAutoscaler
from ray.autoscaler.load_metrics import LoadMetrics
from ray.autoscaler.node... | 36.432602 | 79 | 0.566297 |
f69f37f6f8930702dd7944cc95c4abdd17995439 | 7,723 | py | Python | venv/lib/python3.7/site-packages/torch/onnx/symbolic_opset12.py | GOOGLE-M/SGC | 78ad8d02b80808302e38559e2d0f430f66a809bd | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/torch/onnx/symbolic_opset12.py | GOOGLE-M/SGC | 78ad8d02b80808302e38559e2d0f430f66a809bd | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/torch/onnx/symbolic_opset12.py | GOOGLE-M/SGC | 78ad8d02b80808302e38559e2d0f430f66a809bd | [
"MIT"
] | null | null | null | import torch
import torch.onnx.symbolic_helper as sym_help
from torch.onnx.symbolic_helper import parse_args, _parse_arg, _unimplemented
from torch.onnx.utils import _add_block, _add_input_to_block, _add_output_to_block
# EDITING THIS FILE? READ THIS FIRST!
# see Note [Edit Symbolic Files] in symbolic_helper.py
# Th... | 42.202186 | 125 | 0.678881 |
ed1171337e3db944171d1f31d183824732125e93 | 36,522 | py | Python | testplan/exporters/testing/pdf/renderers/entries/assertions.py | apretori-tic/testplan | d3926d328e46c88d12a9c2568d4918f8aa44f26e | [
"Apache-2.0"
] | null | null | null | testplan/exporters/testing/pdf/renderers/entries/assertions.py | apretori-tic/testplan | d3926d328e46c88d12a9c2568d4918f8aa44f26e | [
"Apache-2.0"
] | null | null | null | testplan/exporters/testing/pdf/renderers/entries/assertions.py | apretori-tic/testplan | d3926d328e46c88d12a9c2568d4918f8aa44f26e | [
"Apache-2.0"
] | null | null | null | import re
from cgi import escape
from reportlab.lib import colors
from reportlab.platypus import Paragraph
from reportlab.pdfbase.pdfmetrics import stringWidth
from testplan.common.exporters.pdf import RowStyle, create_table
from testplan.common.exporters.pdf import format_table_style, format_cell_data
from testplan.... | 32.492883 | 80 | 0.508324 |
9d18ce2dccc17ba81419ea853303830fef537b5f | 495 | py | Python | lessinline/api/public/services/serializers.py | skpatro23/lessinline | 0f95a8ce40faaa4e814c45c2fc051f7166e27472 | [
"MIT"
] | null | null | null | lessinline/api/public/services/serializers.py | skpatro23/lessinline | 0f95a8ce40faaa4e814c45c2fc051f7166e27472 | [
"MIT"
] | null | null | null | lessinline/api/public/services/serializers.py | skpatro23/lessinline | 0f95a8ce40faaa4e814c45c2fc051f7166e27472 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from lessinline.services.models import Service, Slot
class SlotSerializer(serializers.ModelSerializer):
class Meta:
model = Slot
fields = ['id', 'start_time', 'end_time', 'capacity', 'is_open']
class ServiceSerializer(serializers.ModelSerializer):
slots... | 29.117647 | 88 | 0.69899 |
386705436fd4cfbce7177f7a900443b4f57ec939 | 1,500 | py | Python | cvtools/label_convert/split_dataset.py | AlvinIsonomia/cvtools | 1b294adc03a64c7dd616f4a81a1fff2df9149757 | [
"Apache-2.0"
] | null | null | null | cvtools/label_convert/split_dataset.py | AlvinIsonomia/cvtools | 1b294adc03a64c7dd616f4a81a1fff2df9149757 | [
"Apache-2.0"
] | null | null | null | cvtools/label_convert/split_dataset.py | AlvinIsonomia/cvtools | 1b294adc03a64c7dd616f4a81a1fff2df9149757 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# author : gfjiangly
# time : 2019/7/17 16:51
# e-mail : jgf0719@foxmail.com
# software : PyCharm
import os.path as osp
import copy
import cvtools
class SplitDataset(object):
"""coco-like datasets analysis"""
def __init__(self, ann_file):
self.ann_file = ann_file
... | 31.914894 | 82 | 0.634667 |
058b52f3731d7485f6fdf40b0decd734f4db4a38 | 854 | py | Python | blogproject/urls.py | zhoujingliumaoshen/zhoujingblogdata | 92ad35ee1068f96f73bd9cda53bc93f21df0205a | [
"Apache-2.0"
] | null | null | null | blogproject/urls.py | zhoujingliumaoshen/zhoujingblogdata | 92ad35ee1068f96f73bd9cda53bc93f21df0205a | [
"Apache-2.0"
] | null | null | null | blogproject/urls.py | zhoujingliumaoshen/zhoujingblogdata | 92ad35ee1068f96f73bd9cda53bc93f21df0205a | [
"Apache-2.0"
] | null | null | null | """blogproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Clas... | 34.16 | 79 | 0.692037 |
4ccabd1739dbb181934ceaf6f3bbfad24c46fa77 | 6,557 | py | Python | src/multiq2.py | devil-r/Os-simulator | afb99d57d16ebb598a66fcd967f1d67247b4efb4 | [
"MIT"
] | null | null | null | src/multiq2.py | devil-r/Os-simulator | afb99d57d16ebb598a66fcd967f1d67247b4efb4 | [
"MIT"
] | null | null | null | src/multiq2.py | devil-r/Os-simulator | afb99d57d16ebb598a66fcd967f1d67247b4efb4 | [
"MIT"
] | null | null | null | def multilevel(table):
process={}
process["Foreground"]=[]
process["Background"]=[]
process["Gantt"]=[]
output = []
for element in table["data"]:
if element["type"] == 0:
element["BTL"]=element["bt"]
process["Foreground"].append(element)
else:
... | 32.949749 | 129 | 0.47232 |
c56b78acc4134d0cabf116d3d3a6494e487d8e08 | 259,534 | py | Python | pysnmp-with-texts/Nortel-Magellan-Passport-VoiceNetworkingMIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/Nortel-Magellan-Passport-VoiceNetworkingMIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/Nortel-Magellan-Passport-VoiceNetworkingMIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module Nortel-Magellan-Passport-VoiceNetworkingMIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-Magellan-Passport-VoiceNetworkingMIB
# Produced by pysmi-0.3.4 at Wed May 1 14:28:42 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by use... | 194.699175 | 12,317 | 0.796871 |
55094e8ca77d2d429d4da37883ecdc6f50ee81e8 | 80 | py | Python | src/acrv_ros_wrappers/__init__.py | best-of-acrv/acrv-ros-wrappers | 464a6209e335d5d6dd40c30319f0a8418f74e7a8 | [
"BSD-3-Clause"
] | null | null | null | src/acrv_ros_wrappers/__init__.py | best-of-acrv/acrv-ros-wrappers | 464a6209e335d5d6dd40c30319f0a8418f74e7a8 | [
"BSD-3-Clause"
] | null | null | null | src/acrv_ros_wrappers/__init__.py | best-of-acrv/acrv-ros-wrappers | 464a6209e335d5d6dd40c30319f0a8418f74e7a8 | [
"BSD-3-Clause"
] | null | null | null | from . import service
from . import services
__all__ = ['service', 'services']
| 16 | 33 | 0.7125 |
a94becc7a97038a8f100edc30abc1ef9deb3dc66 | 3,431 | py | Python | tests/test_gw/test_gw_reparameterisations.py | Rodrigo-Tenorio/nessai | 2b4175da61b3a7250d1154a126ad93481836df0d | [
"MIT"
] | null | null | null | tests/test_gw/test_gw_reparameterisations.py | Rodrigo-Tenorio/nessai | 2b4175da61b3a7250d1154a126ad93481836df0d | [
"MIT"
] | null | null | null | tests/test_gw/test_gw_reparameterisations.py | Rodrigo-Tenorio/nessai | 2b4175da61b3a7250d1154a126ad93481836df0d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests for GW reparameterisations"""
import pytest
from nessai.gw.reparameterisations import (
DistanceReparameterisation,
default_gw,
get_gw_reparameterisation,
)
from unittest.mock import MagicMock, patch, create_autospec
@pytest.fixture
def distance_reparam():
return crea... | 32.367925 | 78 | 0.721364 |
41ee2c07501bdd99afed4d3662b37550e05d4644 | 981 | py | Python | assembly/filter_coverage/wrapper.py | avilab/vs-wrappers | 65524b3566969da7909e0d08c423b6eecadea039 | [
"MIT"
] | 1 | 2021-04-25T08:20:14.000Z | 2021-04-25T08:20:14.000Z | assembly/filter_coverage/wrapper.py | avilab/vs-wrappers | 65524b3566969da7909e0d08c423b6eecadea039 | [
"MIT"
] | 2 | 2018-12-28T08:40:03.000Z | 2019-02-22T13:28:34.000Z | assembly/filter_coverage/wrapper.py | avilab/vs-wrappers | 65524b3566969da7909e0d08c423b6eecadea039 | [
"MIT"
] | null | null | null | __author__ = "Taavi Päll"
__copyright__ = "Copyright 2019, Taavi Päll"
__email__ = "tapa741@gmail.com"
__license__ = "MIT"
import pandas as pd
from Bio import SeqIO
if not isinstance(snakemake.input.coverage, str):
raise ValueError("coverage must be file path")
if not isinstance(snakemake.input.contigs, str):
... | 30.65625 | 63 | 0.727829 |
e73992696834720cd54174ae84a7c947f1e763e2 | 5,523 | py | Python | trsl/statistics.py | iisc-sag-open/trsl | 03adbcf3b5a6dfa502c4ad0cbbff1de10bf9c730 | [
"MIT"
] | null | null | null | trsl/statistics.py | iisc-sag-open/trsl | 03adbcf3b5a6dfa502c4ad0cbbff1de10bf9c730 | [
"MIT"
] | null | null | null | trsl/statistics.py | iisc-sag-open/trsl | 03adbcf3b5a6dfa502c4ad0cbbff1de10bf9c730 | [
"MIT"
] | null | null | null | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# Copyright of the Indian Institute of Science's Speech and Audio group.
"""
Used for producing graphs for trsl
"""
import argparse
import json
import logging
import math
from trsl import Trsl
from collections import Counter
from matplotlib import pyplot as plt
from nl... | 25.808411 | 78 | 0.606192 |
1b81a05680ab3094f3db0beeb9e87379f09fa141 | 1,429 | py | Python | tests/marks.py | michaelawyu/nanopie | 32e84f072d03a6b3eff33920c929546c81969a64 | [
"Apache-2.0"
] | 1 | 2020-09-02T22:34:10.000Z | 2020-09-02T22:34:10.000Z | tests/marks.py | michaelawyu/nanopie | 32e84f072d03a6b3eff33920c929546c81969a64 | [
"Apache-2.0"
] | null | null | null | tests/marks.py | michaelawyu/nanopie | 32e84f072d03a6b3eff33920c929546c81969a64 | [
"Apache-2.0"
] | null | null | null | import pkgutil
import pytest
from nanopie.auth.creds.jwt import JWT_INSTALLED
jwt_installed = pytest.mark.skipif(
not JWT_INSTALLED, reason="requires that pyjwt is installed"
)
cryptography_installed = pytest.mark.skipif(
pkgutil.find_loader("cryptography") == None,
reason="requires that cryptography is ... | 35.725 | 87 | 0.752974 |
ba29516d299d9cb9f8067e6edc4f22f1c80073c0 | 583 | py | Python | twitterscheduler/migrations/0005_auto_20170905_1206.py | caleblogan/twitter-scheduler | 120ac516e718ac58079fb2e66dc8d49b3e60e7ad | [
"MIT"
] | 1 | 2020-08-16T18:52:06.000Z | 2020-08-16T18:52:06.000Z | twitterscheduler/migrations/0005_auto_20170905_1206.py | caleblogan/twitter-scheduler | 120ac516e718ac58079fb2e66dc8d49b3e60e7ad | [
"MIT"
] | 3 | 2020-02-12T00:19:59.000Z | 2021-06-10T19:59:54.000Z | twitterscheduler/migrations/0005_auto_20170905_1206.py | caleblogan/twitter-scheduler | 120ac516e718ac58079fb2e66dc8d49b3e60e7ad | [
"MIT"
] | 1 | 2020-03-08T23:26:45.000Z | 2020-03-08T23:26:45.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-05 19:06
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('twitterscheduler', '0004_auto_20170904... | 25.347826 | 110 | 0.658662 |
aa1a246a110f2d07719061162bb1d244fec5617d | 2,902 | py | Python | Pandas/PandasPlot/plot.py | Liangchengdeye/Pandas-plot | a134d2e816f88d4278a0b84a9bdec00c47fd8171 | [
"Apache-2.0"
] | null | null | null | Pandas/PandasPlot/plot.py | Liangchengdeye/Pandas-plot | a134d2e816f88d4278a0b84a9bdec00c47fd8171 | [
"Apache-2.0"
] | null | null | null | Pandas/PandasPlot/plot.py | Liangchengdeye/Pandas-plot | a134d2e816f88d4278a0b84a9bdec00c47fd8171 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
@version: v1.0
@author: W_H_J
@license: Apache Licence
@contact: 415900617@qq.com
@site:
@software: PyCharm
@file: plot.py
@time: 2018/1/4 15:07
@describe:读取数据库信息并分析其话费总金额,利用pandas分析处理,并绘制
参考资料:http://blog.csdn.net/hustqb/article/details/54410670
"""
import rand... | 29.02 | 110 | 0.604411 |
979ff341bcea96dfb71b81a832a8ac0fb839fe6b | 35,426 | py | Python | rdkit/sping/PS/pidPS.py | sdvillal/rdkit | 270f7b76e51fe44439d52d55a0a99538d8333f7b | [
"PostgreSQL"
] | null | null | null | rdkit/sping/PS/pidPS.py | sdvillal/rdkit | 270f7b76e51fe44439d52d55a0a99538d8333f7b | [
"PostgreSQL"
] | null | null | null | rdkit/sping/PS/pidPS.py | sdvillal/rdkit | 270f7b76e51fe44439d52d55a0a99538d8333f7b | [
"PostgreSQL"
] | 1 | 2022-03-30T03:22:10.000Z | 2022-03-30T03:22:10.000Z | """
piddlePS - a PostScript backend for the PIDDLE drawing module
Magnus Lie Hetland
1999
"""
# some fixups by Chris Lee (cwlee@artsci.wustl.edu)
# help from Paul S. and Bernhard Herzog and others
# $Id$
#
# For each page, the coordinate system is intialized with "0 canvasHeight translate" so
# that coordiante... | 36.634953 | 100 | 0.633715 |
cb08ea8fba01c9694bba7e015a61763f76ce96c2 | 8,235 | py | Python | siggregator/siggregator.py | packmad/Siggregator | 70ff7432e715b7a25a82098320c351ddb78daa7d | [
"Apache-2.0"
] | 3 | 2021-03-16T15:28:00.000Z | 2021-07-23T09:07:54.000Z | siggregator/siggregator.py | packmad/Siggregator | 70ff7432e715b7a25a82098320c351ddb78daa7d | [
"Apache-2.0"
] | null | null | null | siggregator/siggregator.py | packmad/Siggregator | 70ff7432e715b7a25a82098320c351ddb78daa7d | [
"Apache-2.0"
] | 1 | 2022-03-29T21:57:36.000Z | 2022-03-29T21:57:36.000Z | #!/usr/bin/env python3
import hashlib
import json
import magic
import os
import re
import subprocess
import sys
import yara
import ordlookup
import pefile
import ssdeep
import tlsh
from multiprocessing import Pool
from os.path import isdir, isfile, join, basename, abspath, dirname, realpath
from pathlib import Path
f... | 32.678571 | 106 | 0.560291 |
7c5231ee6febb23d8d8437011b79b2a4f3b8a949 | 7,475 | py | Python | KalmanTD_model.py | jusporrer/PCBS-Kalman-Filter | 65f9446f4106d90f1d87f9ac55ce6e8770594274 | [
"MIT"
] | null | null | null | KalmanTD_model.py | jusporrer/PCBS-Kalman-Filter | 65f9446f4106d90f1d87f9ac55ce6e8770594274 | [
"MIT"
] | null | null | null | KalmanTD_model.py | jusporrer/PCBS-Kalman-Filter | 65f9446f4106d90f1d87f9ac55ce6e8770594274 | [
"MIT"
] | null | null | null | # Contributors : Juliana Sporrer (juliana.sporrer.18@ucl.ac.uk)
# Dual Masters in Brain and Mind Sciences (UCL, ENS, & Sorbonne Univeristy)
# -------------------------------------------------------------------------
# References:
# Gershman, S.J., 2015. A Unifying Probabilistic View of Associative Learning.
# PLoS... | 46.71875 | 222 | 0.665151 |
6dcea8fece9240c77e872e858f351fe198389807 | 27,552 | py | Python | cumulusci/tasks/bulkdata/snowfakery.py | adamlincoln/CumulusCI | 7a8a2370c9869205af271c78a330429494100bc4 | [
"BSD-3-Clause"
] | null | null | null | cumulusci/tasks/bulkdata/snowfakery.py | adamlincoln/CumulusCI | 7a8a2370c9869205af271c78a330429494100bc4 | [
"BSD-3-Clause"
] | 1 | 2021-08-30T22:37:46.000Z | 2021-09-03T16:26:15.000Z | cumulusci/tasks/bulkdata/snowfakery.py | adamlincoln/CumulusCI | 7a8a2370c9869205af271c78a330429494100bc4 | [
"BSD-3-Clause"
] | null | null | null | import shutil
import time
import typing as T
from collections import defaultdict
from contextlib import contextmanager
from datetime import timedelta
from pathlib import Path
from queue import Empty
from tempfile import TemporaryDirectory, mkdtemp
import psutil
import yaml
from snowfakery.api import COUNT_REPS
from sq... | 37.536785 | 177 | 0.634364 |
a91c5519b3d801cde448b9863ce52782762f2598 | 1,213 | py | Python | tessEvalTest.py | zhengjiawen/crnn.pytorch | 0721deb8c2914a5a090b231a644c2331d2fc9bd9 | [
"MIT"
] | null | null | null | tessEvalTest.py | zhengjiawen/crnn.pytorch | 0721deb8c2914a5a090b231a644c2331d2fc9bd9 | [
"MIT"
] | null | null | null | tessEvalTest.py | zhengjiawen/crnn.pytorch | 0721deb8c2914a5a090b231a644c2331d2fc9bd9 | [
"MIT"
] | null | null | null | import tesserocr
import cv2 as cv
from PIL import Image
import os
import numpy as np
debug = True
def regWordByTesserocr(img):
image = Image.fromarray(img)
result = tesserocr.image_to_text(image, lang='chi_sim+equ+eng')
return result
gt_path = './data/res/'
img_path = '/data/home/zjw/pythonFile/masktext... | 26.955556 | 102 | 0.611707 |
7db009648a0e46507f1cddad0333b45efc56b553 | 907 | py | Python | umeboshi/tasks.py | makingspace/ticker | 01917bb0234c40903fc4db4aff93f28e0125d087 | [
"BSD-3-Clause"
] | 7 | 2015-12-30T21:34:06.000Z | 2022-01-31T09:18:03.000Z | umeboshi/tasks.py | makingspace/ticker | 01917bb0234c40903fc4db4aff93f28e0125d087 | [
"BSD-3-Clause"
] | 2 | 2021-04-15T06:26:05.000Z | 2021-04-16T15:35:07.000Z | umeboshi/tasks.py | makingspace/ticker | 01917bb0234c40903fc4db4aff93f28e0125d087 | [
"BSD-3-Clause"
] | 1 | 2021-12-21T08:33:55.000Z | 2021-12-21T08:33:55.000Z | # -*- coding: utf-8 -*-
"""
django-umeboshi.tasks
~~~~~~~~~~~~~~~~~~~~~~~~~~
Tasks to run asynchronously via Celery
"""
from umeboshi.models import Event
from django.utils import timezone
from celery.task import task
from umeboshi.utils import lock
@task(ignore_result=True, soft_time_limit=300)
def process_event(ev... | 25.194444 | 97 | 0.661521 |
8ab3cac4f5130e622b0cab6373c0e5352b73a712 | 6,060 | py | Python | chb/x86/opcodes/X86Stos.py | kestreltechnology/CodeHawk-Binary | aa0b2534e0318e5fb3770ec7b4d78feb0feb2394 | [
"MIT"
] | null | null | null | chb/x86/opcodes/X86Stos.py | kestreltechnology/CodeHawk-Binary | aa0b2534e0318e5fb3770ec7b4d78feb0feb2394 | [
"MIT"
] | null | null | null | chb/x86/opcodes/X86Stos.py | kestreltechnology/CodeHawk-Binary | aa0b2534e0318e5fb3770ec7b4d78feb0feb2394 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# CodeHawk Binary Analyzer
# Author: Henny Sipma
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2016-2020 Kestrel Technology LLC
# Copyright (c) 2020 Henny Si... | 34.628571 | 80 | 0.594059 |
a7366afcb45004d912369253b5ebce5e30e6e107 | 7,051 | py | Python | models/ops/test.py | Tarandro/TransTrack | 81c12d0737125052f3eb2773ac47be60144f6ccb | [
"MIT"
] | 466 | 2020-12-31T02:53:51.000Z | 2022-03-28T08:55:35.000Z | models/ops/test.py | Tarandro/TransTrack | 81c12d0737125052f3eb2773ac47be60144f6ccb | [
"MIT"
] | 59 | 2021-01-01T06:27:55.000Z | 2022-03-30T10:28:23.000Z | models/ops/test.py | Tarandro/TransTrack | 81c12d0737125052f3eb2773ac47be60144f6ccb | [
"MIT"
] | 90 | 2021-01-01T08:56:07.000Z | 2022-03-30T09:38:31.000Z | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import time
import torch
import torch.nn as nn
from torch.autograd import gradcheck
from functions.ms_deform_attn_func import MSDeformAttnFunction, ms_deform_attn_core_pytorch
... | 47.006667 | 136 | 0.704581 |
1f5c4dab8d3cb7d6ac54f301ddbf44c22dcc387c | 805 | py | Python | match.py | 64u71bm/Python-Programs | 601d4a171593b84f7fada1870ddddd3999eb16a0 | [
"MIT"
] | 1 | 2018-12-07T15:19:33.000Z | 2018-12-07T15:19:33.000Z | match.py | 64u71bm/Python-Programs | 601d4a171593b84f7fada1870ddddd3999eb16a0 | [
"MIT"
] | null | null | null | match.py | 64u71bm/Python-Programs | 601d4a171593b84f7fada1870ddddd3999eb16a0 | [
"MIT"
] | null | null | null | #Write a function matched(s) that takes as input a string s and checks if the brackets "(" and ")" in s are matched: that is, every "(" has a matching ")" after it and every ")" has a matching "(" before it. Your function should ignore all other symbols that appear in s. Your function should return True if s has matc... | 26.833333 | 358 | 0.638509 |
7ef0295bb2a6fa7a1a8910e6717d23d1dfb64e07 | 1,097 | py | Python | download.py | betodealmeida/musicradar | 4947d5c839a34149d6ba2f47bbd7e72c08f6c2a6 | [
"MIT"
] | null | null | null | download.py | betodealmeida/musicradar | 4947d5c839a34149d6ba2f47bbd7e72c08f6c2a6 | [
"MIT"
] | null | null | null | download.py | betodealmeida/musicradar | 4947d5c839a34149d6ba2f47bbd7e72c08f6c2a6 | [
"MIT"
] | null | null | null | import os.path
import re
from urllib.parse import urlparse
from bs4 import BeautifulSoup
import requests
baseurl = 'https://www.musicradar.com/news/tech/free-music-samples-download-loops-hits-and-multis-627820'
content = requests.get(baseurl).text
soup = BeautifulSoup(content, 'html.parser')
for link in soup.findAll... | 30.472222 | 105 | 0.65907 |
8ad913e2100e4a9b28ebd0a233546ce7ac3ecc88 | 1,822 | py | Python | tests/test_utils.py | JackHunt/tf-models | 6d22c309e28456865afd1cdc3fb87afd275cddfc | [
"BSD-3-Clause"
] | null | null | null | tests/test_utils.py | JackHunt/tf-models | 6d22c309e28456865afd1cdc3fb87afd275cddfc | [
"BSD-3-Clause"
] | null | null | null | tests/test_utils.py | JackHunt/tf-models | 6d22c309e28456865afd1cdc3fb87afd275cddfc | [
"BSD-3-Clause"
] | null | null | null | # BSD 3-Clause License
# Copyright (c) 2021, Jack Hunt
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list o... | 44.439024 | 80 | 0.770582 |
10561ab193d49ed2c2727bc2a0cc26443094e915 | 1,133 | py | Python | app/investors/views.py | dev-johnlopez/Assignably | 056960556dd75dfce064970887f37a44a8c66aec | [
"MIT"
] | 1 | 2021-06-09T02:19:18.000Z | 2021-06-09T02:19:18.000Z | app/investors/views.py | dev-johnlopez/Assignably | 056960556dd75dfce064970887f37a44a8c66aec | [
"MIT"
] | 1 | 2021-06-01T23:45:06.000Z | 2021-06-01T23:45:06.000Z | app/investors/views.py | dev-johnlopez/assignably | 056960556dd75dfce064970887f37a44a8c66aec | [
"MIT"
] | null | null | null | from flask import Blueprint, g, render_template, redirect, url_for, g, flash, \
request
from flask_security import current_user, login_required, current_user
from app import db
from app.email import send_email
from app.deals.forms import DealForm
from app.investors.forms import InvestorForm
from app.auth.models imp... | 33.323529 | 79 | 0.671668 |
780d09abcbee222a17aa953447d082d59edfb23b | 2,821 | py | Python | nodes/calibrate_latency.py | mkoval/robot_kf | 985110b2dff1105519e9d3d8d2b9e9d30d270f1f | [
"BSD-2-Clause"
] | 12 | 2018-05-24T07:44:18.000Z | 2022-03-16T06:23:19.000Z | nodes/calibrate_latency.py | mkoval/robot_kf | 985110b2dff1105519e9d3d8d2b9e9d30d270f1f | [
"BSD-2-Clause"
] | null | null | null | nodes/calibrate_latency.py | mkoval/robot_kf | 985110b2dff1105519e9d3d8d2b9e9d30d270f1f | [
"BSD-2-Clause"
] | 6 | 2016-04-19T07:57:43.000Z | 2020-06-29T06:49:40.000Z | #!/usr/bin/env python
from __future__ import print_function
import roslib; roslib.load_manifest('robot_kf')
import rospy
import math
import numpy as np
from nav_msgs.msg import Odometry
from sensor_msgs.msg import Imu
class CompassCalibrator:
def __init__(self, target):
self.collecting = False
self... | 32.425287 | 86 | 0.646579 |
d0debe409679c6381fc88400877b1186ff50a102 | 3,185 | py | Python | app/starlette/api/clients.py | snakeoiljosh/Webster | 8fa56c009dafa8ba00fd5c2b462b2e88afe2bd97 | [
"MIT"
] | null | null | null | app/starlette/api/clients.py | snakeoiljosh/Webster | 8fa56c009dafa8ba00fd5c2b462b2e88afe2bd97 | [
"MIT"
] | null | null | null | app/starlette/api/clients.py | snakeoiljosh/Webster | 8fa56c009dafa8ba00fd5c2b462b2e88afe2bd97 | [
"MIT"
] | null | null | null | from spectree import Response
from starlette.authentication import requires
from starlette.exceptions import HTTPException
from starlette.responses import JSONResponse
from ...orm.oauth2client import OAuth2Client
from ...schemas.oauth2client import (
OAuth2ClientCreate,
OAuth2ClientResponse,
OAuth2ClientReq... | 39.8125 | 85 | 0.683516 |
0c8ad60dfe15fd4b8b41315691590550a0b9971c | 8,281 | py | Python | dreamuserdb/migrations/0009_auto__del_service.py | dreamplatform/dream-userdb | 5cc448cbcc3f17fd29eb6c38aadb67dc55715f70 | [
"BSD-3-Clause"
] | null | null | null | dreamuserdb/migrations/0009_auto__del_service.py | dreamplatform/dream-userdb | 5cc448cbcc3f17fd29eb6c38aadb67dc55715f70 | [
"BSD-3-Clause"
] | null | null | null | dreamuserdb/migrations/0009_auto__del_service.py | dreamplatform/dream-userdb | 5cc448cbcc3f17fd29eb6c38aadb67dc55715f70 | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'Service'
db.delete_table('dreamuserdb_service')
def backwards(self, orm):
... | 70.177966 | 182 | 0.566115 |
388618a73c4bf9da93824712c378de9e856b6e0b | 35,613 | py | Python | lib/python2.7/site-packages/ryu/lib/bfdlib.py | nishaero/wifi-userseg-ryu | 1132f2c813b79eff755bdd1a9e73e7ad3980af7c | [
"Apache-2.0"
] | 9 | 2019-12-12T06:57:51.000Z | 2022-01-10T04:01:49.000Z | lib/python2.7/site-packages/ryu/lib/bfdlib.py | nishaero/wifi-userseg-ryu | 1132f2c813b79eff755bdd1a9e73e7ad3980af7c | [
"Apache-2.0"
] | null | null | null | lib/python2.7/site-packages/ryu/lib/bfdlib.py | nishaero/wifi-userseg-ryu | 1132f2c813b79eff755bdd1a9e73e7ad3980af7c | [
"Apache-2.0"
] | 1 | 2020-03-26T17:58:28.000Z | 2020-03-26T17:58:28.000Z | # Copyright (C) 2014 Xinguard, Inc.
# Copyright (C) 2013 Nippon Telegraph and Telephone 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/LICE... | 36.714433 | 79 | 0.562267 |
d84013cff4bbcac93d6a3b9ee746f8ba3d55bfdf | 10,351 | py | Python | BittrexMarketBuys.py | dezryth/BittrexMarketBuys | 158da8a3bc9682b481a0d1d7a30172af543dc2cc | [
"ISC"
] | null | null | null | BittrexMarketBuys.py | dezryth/BittrexMarketBuys | 158da8a3bc9682b481a0d1d7a30172af543dc2cc | [
"ISC"
] | null | null | null | BittrexMarketBuys.py | dezryth/BittrexMarketBuys | 158da8a3bc9682b481a0d1d7a30172af543dc2cc | [
"ISC"
] | null | null | null | import codecs
import datetime
import time
import hmac
import hashlib
import json
import requests
import sqlite3
import json
import collections
import subprocess
import configparser
import sys
from datetime import datetime
from pushover import init, Client
# Enable Push notifications
PushoverEnabled = 1
# SET IMPORTAN... | 35.693103 | 163 | 0.637426 |
5162055026591c3dcb0f2bef1e3e4baafba26434 | 1,769 | py | Python | web/impact/impact/tests/test_program_family_list_view.py | masschallenge/impact-api | 81075ced8fcc95de9390dd83c15e523e67fc48c0 | [
"MIT"
] | 5 | 2017-10-19T15:11:52.000Z | 2020-03-08T07:16:21.000Z | web/impact/impact/tests/test_program_family_list_view.py | masschallenge/impact-api | 81075ced8fcc95de9390dd83c15e523e67fc48c0 | [
"MIT"
] | 182 | 2017-06-21T19:32:13.000Z | 2021-03-22T13:38:16.000Z | web/impact/impact/tests/test_program_family_list_view.py | masschallenge/impact-api | 81075ced8fcc95de9390dd83c15e523e67fc48c0 | [
"MIT"
] | 1 | 2018-06-23T11:53:18.000Z | 2018-06-23T11:53:18.000Z | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
import json
from jsonschema import Draft4Validator
from django.urls import reverse
from impact.tests.factories import ProgramFamilyFactory
from impact.tests.api_test_case import APITestCase
from impact.tests.test_program_family_detail_view import (
PROGRAM_FA... | 37.638298 | 78 | 0.691916 |
a6838852ea0e0523a652829afc6ab84531fbc695 | 1,278 | py | Python | pythran/tests/test_nogil.py | cclauss/pythran | 6f9fc994d34fc0ed328a199ee6fec8499049a7f8 | [
"BSD-3-Clause"
] | 1 | 2018-03-24T00:33:03.000Z | 2018-03-24T00:33:03.000Z | pythran/tests/test_nogil.py | cclauss/pythran | 6f9fc994d34fc0ed328a199ee6fec8499049a7f8 | [
"BSD-3-Clause"
] | null | null | null | pythran/tests/test_nogil.py | cclauss/pythran | 6f9fc994d34fc0ed328a199ee6fec8499049a7f8 | [
"BSD-3-Clause"
] | null | null | null | from test_env import TestEnv
from pythran.typing import List, Set, Dict, NDArray
import numpy as np
class TestNoGil(TestEnv):
def test_list_param(self):
code="""
def list_param(l):
return l, sum(i*j for i in l for j in l)
"""
self.run_test(code, list(range(3000)), list_... | 30.428571 | 73 | 0.519562 |
96d1930712dd7de6cd91f4b47fffb07a60cf2c7c | 2,404 | py | Python | utils/Generator.py | ynakaDream/Deep-Learning-GANs | 2e00405079c131245f4dd23eb494a27a2b12598d | [
"MIT"
] | 4 | 2019-01-14T04:38:51.000Z | 2020-02-13T20:38:10.000Z | utils/Generator.py | ynakaDream/Deep-Learning-GANs | 2e00405079c131245f4dd23eb494a27a2b12598d | [
"MIT"
] | null | null | null | utils/Generator.py | ynakaDream/Deep-Learning-GANs | 2e00405079c131245f4dd23eb494a27a2b12598d | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch.nn.functional as F
class GeneratorGAN(nn.Module):
def __init__(self, input, output, nc):
self.nc = nc
super().__init__()
self.fc1 = nn.Linear(input, 1024)
self.fc2 = nn.Linear(1024, 512)
self.fc3 = nn.Linear(512, 256)
self.fc4 = nn... | 42.928571 | 109 | 0.458403 |
5688d2507dbda7e188b3f5dba2c428f47608664f | 1,450 | py | Python | sortingAlgorithms/heapSortIndex.py | hungleba/sortingCollection | a31909d79b8a4f2206d971c15f0764515242ec53 | [
"MIT"
] | null | null | null | sortingAlgorithms/heapSortIndex.py | hungleba/sortingCollection | a31909d79b8a4f2206d971c15f0764515242ec53 | [
"MIT"
] | null | null | null | sortingAlgorithms/heapSortIndex.py | hungleba/sortingCollection | a31909d79b8a4f2206d971c15f0764515242ec53 | [
"MIT"
] | null | null | null | # Best case, worst case: O(NlogN)
# Popular when space is tight (e.g. embedded systems) because it provides
# optimal performance with just a few dozen lines of code
import sys
import random
time = 0 # Debug var
compareTimes = 0 # Debug var
step = 0
def main():
arr = []
#99-1
for i in range(15, 0,... | 24.166667 | 74 | 0.596552 |
1d3dc4ff021ededf93b4ad282dcb81264af28843 | 16,046 | py | Python | pipelinewise/cli/utils.py | ashalitkin/pipelinewise | 52901c801ccd591c01cf7a2e5e3309db121d027d | [
"Apache-2.0"
] | null | null | null | pipelinewise/cli/utils.py | ashalitkin/pipelinewise | 52901c801ccd591c01cf7a2e5e3309db121d027d | [
"Apache-2.0"
] | null | null | null | pipelinewise/cli/utils.py | ashalitkin/pipelinewise | 52901c801ccd591c01cf7a2e5e3309db121d027d | [
"Apache-2.0"
] | null | null | null | """
PipelineWise CLI - Utilities
"""
import errno
import glob
import json
import logging
import os
import re
import secrets
import string
import sys
import tempfile
import warnings
import jsonschema
import yaml
from io import StringIO
from datetime import date, datetime
from jinja2 import Template
from ansible.errors... | 29.825279 | 114 | 0.639786 |
b2cc7b0faa675dbf95279c92a159470f16254a33 | 58,924 | py | Python | tests/blockchain/org_hierarchy_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | tests/blockchain/org_hierarchy_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | tests/blockchain/org_hierarchy_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 72 | 2018-04-13T18:29:12.000Z | 2020-05-29T06:00:33.000Z | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 34.238234 | 96 | 0.483725 |
eb02a924f19413f3eb1060a0be6b8dc21472d0a5 | 2,283 | py | Python | reporter/test/test_php_assertions_source.py | Wikia/jira-reporter | af8a2df6dfb679872b82cba67560961d0ad5b2fb | [
"MIT"
] | 3 | 2015-08-19T13:27:24.000Z | 2022-01-14T15:46:19.000Z | reporter/test/test_php_assertions_source.py | Wikia/jira-reporter | af8a2df6dfb679872b82cba67560961d0ad5b2fb | [
"MIT"
] | 74 | 2015-01-22T16:30:20.000Z | 2022-03-25T17:03:00.000Z | reporter/test/test_php_assertions_source.py | Wikia/jira-reporter | af8a2df6dfb679872b82cba67560961d0ad5b2fb | [
"MIT"
] | 3 | 2016-04-10T18:26:00.000Z | 2020-06-17T06:35:15.000Z | """
Set of unit tests for PHPAssertionsSource
"""
import unittest
from ..sources import PHPAssertionsSource
class PHPAssertionsSourceTestClass(unittest.TestCase):
"""
Unit tests for PHPAssertionsSource class
"""
def setUp(self):
self._source = PHPAssertionsSource()
def test_normalize(sel... | 63.416667 | 734 | 0.672799 |
5196b2f77b689c68d7c95fa100f194a198e5f6b8 | 2,693 | py | Python | pysparkling/tests/test_context.py | ptallada/pysparkling | f0e8e8d039f3313c2693b7c7576cb1b7ba5a6d78 | [
"Apache-2.0"
] | 260 | 2015-05-11T18:08:44.000Z | 2022-01-15T13:19:43.000Z | pysparkling/tests/test_context.py | ptallada/pysparkling | f0e8e8d039f3313c2693b7c7576cb1b7ba5a6d78 | [
"Apache-2.0"
] | 79 | 2015-06-02T09:53:25.000Z | 2021-09-26T11:18:18.000Z | pysparkling/tests/test_context.py | ptallada/pysparkling | f0e8e8d039f3313c2693b7c7576cb1b7ba5a6d78 | [
"Apache-2.0"
] | 50 | 2015-06-06T17:00:58.000Z | 2022-01-15T13:19:18.000Z | import logging
import unittest
import pysparkling
class Context(unittest.TestCase):
def test_broadcast(self):
b = pysparkling.Context().broadcast([1, 2, 3])
self.assertEqual(b.value[0], 1)
def test_lock1(self):
"""Should not be able to create a new RDD inside a map operation."""
... | 32.445783 | 76 | 0.604159 |
8182d59826ba865c9de5d08386481d5223dc3954 | 166 | py | Python | dsco/project_template/{{cookiecutter.project_name}}/flask_run.py | Teradata/dsco | 2dd39ec637d01aac30fee0a1feb596316b90d934 | [
"MIT"
] | 3 | 2020-03-20T13:01:54.000Z | 2021-10-19T17:49:18.000Z | dsco/project_template/{{cookiecutter.project_name}}/flask_run.py | Teradata/dsco | 2dd39ec637d01aac30fee0a1feb596316b90d934 | [
"MIT"
] | null | null | null | dsco/project_template/{{cookiecutter.project_name}}/flask_run.py | Teradata/dsco | 2dd39ec637d01aac30fee0a1feb596316b90d934 | [
"MIT"
] | null | null | null | """App entry point."""
from {{ cookiecutter.project_name }} import create_app
app = create_app()
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True)
| 20.75 | 54 | 0.668675 |
6d4614c94de535d0a306ec66064b6368dd603def | 27 | py | Python | utils/__init__.py | Atihinen/raspibot | 3945bf920cebfc2304dcafa326968e56679b3cb8 | [
"MIT"
] | null | null | null | utils/__init__.py | Atihinen/raspibot | 3945bf920cebfc2304dcafa326968e56679b3cb8 | [
"MIT"
] | null | null | null | utils/__init__.py | Atihinen/raspibot | 3945bf920cebfc2304dcafa326968e56679b3cb8 | [
"MIT"
] | null | null | null | __author__ = 'jjauhiainen'
| 13.5 | 26 | 0.777778 |
b58fc2b6f6abd145026d43bc5a736a54c30e4f6b | 1,907 | py | Python | main/models.py | lgb2002/club | 099f5777699abe48f067684fc5fd2b7c7e97e07d | [
"MIT"
] | 1 | 2019-09-15T01:23:32.000Z | 2019-09-15T01:23:32.000Z | main/models.py | lgb2002/club | 099f5777699abe48f067684fc5fd2b7c7e97e07d | [
"MIT"
] | 1 | 2022-02-12T05:22:29.000Z | 2022-02-12T05:22:29.000Z | main/models.py | lgb2002/club | 099f5777699abe48f067684fc5fd2b7c7e97e07d | [
"MIT"
] | null | null | null | from django.db import models
from django.conf import settings
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
from django.contrib.auth.models import User
class ClubList(models.Model):
ClubName = models.CharField(max_length = 50, blank = "True")
ClubDescription = models.TextField(max_length... | 30.269841 | 74 | 0.694284 |
39c6cf1b9790a99a8bda24fb344b20c071147c2e | 751 | py | Python | burun/0004/count_words.py | saurabh896/python-1 | f8d3aedf4c0fe6e24dfa3269ea7e642c9f7dd9b7 | [
"MIT"
] | 3,976 | 2015-01-01T15:49:39.000Z | 2022-03-31T03:47:56.000Z | burun/0004/count_words.py | dwh65416396/python | 1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a | [
"MIT"
] | 97 | 2015-01-11T02:59:46.000Z | 2022-03-16T14:01:56.000Z | burun/0004/count_words.py | dwh65416396/python | 1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a | [
"MIT"
] | 3,533 | 2015-01-01T06:19:30.000Z | 2022-03-28T13:14:54.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Date: 10-03-15
# Author: Liang
import re
import operator
# Read the file
myfile = open('english_text.txt', 'r')
# Extract words from file excluding punctuation and /n
words = re.findall(r"[\w']+", myfile.read())
# Dictionary contains all the words and frequencies
wor... | 24.225806 | 71 | 0.679095 |
a2cf5c0f97be2b6a005dbcbb0c2f9bdf33b97d6f | 988 | bzl | Python | android/apk_import.bzl | artem-zinnatullin/rules_android | b60d84e5635233d2d8fc905041576bd44cefbb94 | [
"Apache-2.0"
] | 140 | 2018-02-15T15:49:41.000Z | 2022-03-31T06:23:13.000Z | android/apk_import.bzl | artem-zinnatullin/rules_android | b60d84e5635233d2d8fc905041576bd44cefbb94 | [
"Apache-2.0"
] | 38 | 2018-07-09T23:37:52.000Z | 2022-03-27T03:43:30.000Z | android/apk_import.bzl | artem-zinnatullin/rules_android | b60d84e5635233d2d8fc905041576bd44cefbb94 | [
"Apache-2.0"
] | 16 | 2018-06-08T04:08:11.000Z | 2022-03-30T09:51:21.000Z | # Copyright 2019 The Bazel 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 applicable la... | 29.939394 | 74 | 0.700405 |
523a3bcfd41493cc55ac688181d9fc69bce47cee | 31,691 | py | Python | tools/nntool/quantization/multiplicative/mult_quantization.py | bot-motion/gap_sdk | bd117a8a4b5384b2b889f72effbfed4f7f938a88 | [
"Apache-2.0"
] | null | null | null | tools/nntool/quantization/multiplicative/mult_quantization.py | bot-motion/gap_sdk | bd117a8a4b5384b2b889f72effbfed4f7f938a88 | [
"Apache-2.0"
] | null | null | null | tools/nntool/quantization/multiplicative/mult_quantization.py | bot-motion/gap_sdk | bd117a8a4b5384b2b889f72effbfed4f7f938a88 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020 GreenWaves Technologies, SAS
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This progr... | 40.064475 | 123 | 0.634281 |
bb4ee76b33330ebaf13e751512ea39b705613dc6 | 62,713 | py | Python | signal_processing_FFT.py | GUO-Liping/SignalProcessing | 8625eef788adddd967455e1b675fca7ac3569a6b | [
"Apache-2.0"
] | 3 | 2021-01-24T08:02:33.000Z | 2021-08-15T13:19:11.000Z | signal_processing_FFT.py | GUO-Liping/SignalProcessing | 8625eef788adddd967455e1b675fca7ac3569a6b | [
"Apache-2.0"
] | null | null | null | signal_processing_FFT.py | GUO-Liping/SignalProcessing | 8625eef788adddd967455e1b675fca7ac3569a6b | [
"Apache-2.0"
] | null | null | null | # 该程序用于将振动时域信号转换为频域信号
import numpy as np
import matplotlib.pyplot as plt
from scipy import pi
from scipy.fftpack import fft, rfft, fftfreq, rfftfreq
from scipy.signal import blackman, hann, hamming, kaiser, bartlett
from user_func_package import *
time_series = np.array([0,0.002,0.004,0.006,0.008,0.01,0.012,0.014,0.0... | 407.227273 | 18,651 | 0.722179 |
c78738c8cba8ef8ee13b7ea333b5b81363f44b25 | 533 | py | Python | model_compiler/src/model_compiler/models/sources/__init__.py | ZTE/Adlik | cac4b601ec8b06a3e382b19b3fed7f28ef0a80d9 | [
"Apache-2.0"
] | 5 | 2019-09-24T01:59:15.000Z | 2019-09-26T22:28:56.000Z | model_compiler/src/model_compiler/models/sources/__init__.py | ZTE/Adlik | cac4b601ec8b06a3e382b19b3fed7f28ef0a80d9 | [
"Apache-2.0"
] | null | null | null | model_compiler/src/model_compiler/models/sources/__init__.py | ZTE/Adlik | cac4b601ec8b06a3e382b19b3fed7f28ef0a80d9 | [
"Apache-2.0"
] | 2 | 2019-09-25T08:57:53.000Z | 2019-09-27T00:48:56.000Z | # Copyright 2019 ZTE corporation. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from . import keras_model_file, oneflow_model_file, onnx_model_file, openvino_model_file, \
tf_frozen_graph_file, tf_model_file, saved_model_file, torch_model_file
__all__ = [
'caffe_model_file',
'keras_... | 26.65 | 91 | 0.729831 |
10189774d4f8670f0d5b9d6893b574305a55ad9b | 1,062 | py | Python | t3.py | wisecsj/wisecsj.github.io | 76335af6bdfab2a986e17aeac34d05da2ea25cdc | [
"Apache-2.0"
] | 1 | 2021-02-22T09:03:38.000Z | 2021-02-22T09:03:38.000Z | t3.py | wisecsj/wisecsj.github.io | 76335af6bdfab2a986e17aeac34d05da2ea25cdc | [
"Apache-2.0"
] | 26 | 2018-10-26T10:17:17.000Z | 2021-09-16T11:03:01.000Z | t3.py | wisecsj/wisecsj.github.io | 76335af6bdfab2a986e17aeac34d05da2ea25cdc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import itertools
import hashlib
import time
import sys
def dsign(authkey):
url = "http://www.520mojing.com/"
idstring = "y7cZZF"
uid = 62039
uurl = "{}member.php?mod=getpasswd&uid={}&id={}".format(url, uid, idstring)
url_md5 = hashlib.md5(uurl + authkey)
return url_md5.hexdigest... | 25.285714 | 79 | 0.560264 |
ee88ec9d3628798841dc7616b5172925cd17ed17 | 3,178 | py | Python | test/test_dataframe/test_dataframe_dataframeoptimized.py | ErwingForeroXpert/Presupuesto | e23660e0748736eb1b918928c296692fd6763ff3 | [
"MIT"
] | null | null | null | test/test_dataframe/test_dataframe_dataframeoptimized.py | ErwingForeroXpert/Presupuesto | e23660e0748736eb1b918928c296692fd6763ff3 | [
"MIT"
] | null | null | null | test/test_dataframe/test_dataframe_dataframeoptimized.py | ErwingForeroXpert/Presupuesto | e23660e0748736eb1b918928c296692fd6763ff3 | [
"MIT"
] | null | null | null | import unittest
import gc
from faker import Faker
import numpy as np
from test.test_fixtures import FakeTable
from budget.dataframes import DataFrameOptimized
from budget.dataframes import func
def criteriaDeleteRows(dataframe, limit=None):
validator = {
"columna1": func.validate_empty_or_cero,
}
... | 34.172043 | 90 | 0.667086 |
62b0fa7195619791020e1d49b2bd35b38e1ac690 | 614 | py | Python | src/tests/test_with_setup_and_teardown_fixture.py | sjsumitj/pytest_tutorial | 0e2015fa0e231c982afccd65df26ab1e4b00e2ec | [
"MIT"
] | 1 | 2020-11-29T19:26:31.000Z | 2020-11-29T19:26:31.000Z | src/tests/test_with_setup_and_teardown_fixture.py | sjsumitj/pytest_tutorial | 0e2015fa0e231c982afccd65df26ab1e4b00e2ec | [
"MIT"
] | null | null | null | src/tests/test_with_setup_and_teardown_fixture.py | sjsumitj/pytest_tutorial | 0e2015fa0e231c982afccd65df26ab1e4b00e2ec | [
"MIT"
] | null | null | null | import pytest
from ..sum import *
@pytest.fixture(scope='session')
def get_sum_test_data():
return [(3,5,8), (-2,-2,-4), (-1,5,4), (3,-5,-2), (0,5,5)]
@pytest.fixture(autouse=True)
def setup_and_teardown():
#setup part
print('\nFetching data from db')
yield
#teardown part
... | 29.238095 | 66 | 0.578176 |
53a9f0eb67a3e505c384815b28c1cd0f60d30ec7 | 2,330 | py | Python | augly/utils.py | meontechno/augly | c1254dd3e3dcb9d7c45ffcaf5934bb3f6a873992 | [
"MIT"
] | null | null | null | augly/utils.py | meontechno/augly | c1254dd3e3dcb9d7c45ffcaf5934bb3f6a873992 | [
"MIT"
] | null | null | null | augly/utils.py | meontechno/augly | c1254dd3e3dcb9d7c45ffcaf5934bb3f6a873992 | [
"MIT"
] | null | null | null | # MIT License
# Copyright (c) 2021 meontechno
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, pub... | 36.984127 | 80 | 0.72618 |
b23cc00da7efe2014d8c4bef1c9027fd5ffaa6f7 | 9,243 | py | Python | code/train.py | LawsonAbs/GAIN | 1eedc2a6663a7110e4de92cbb30dcf462c2d70b5 | [
"MIT"
] | 3 | 2021-11-10T11:16:16.000Z | 2021-12-28T01:58:57.000Z | code/train.py | LawsonAbs/GAIN | 1eedc2a6663a7110e4de92cbb30dcf462c2d70b5 | [
"MIT"
] | null | null | null | code/train.py | LawsonAbs/GAIN | 1eedc2a6663a7110e4de92cbb30dcf462c2d70b5 | [
"MIT"
] | null | null | null | import time
import matplotlib
import matplotlib.pyplot as plt
import torch
from torch import nn
from torch import optim
from config import *
from data import DGLREDataset, DGLREDataloader, BERTDGLREDataset # 这是从data.py 中引入几个类
from models.GAIN import GAIN_GloVe, GAIN_BERT
from test import test
from utils import Accur... | 38.5125 | 154 | 0.560532 |
122f0b0b8882cae60eaa16f65fa6435be6e22a22 | 1,398 | py | Python | rpython/jit/backend/x86/tool/test/test_viewcode.py | jptomo/pypy-lang-scheme | 55edb2cec69d78f86793282a4566fcbc1ef9fcac | [
"MIT"
] | 34 | 2015-07-09T04:53:27.000Z | 2021-07-19T05:22:27.000Z | rpython/jit/backend/x86/tool/test/test_viewcode.py | jptomo/pypy-lang-scheme | 55edb2cec69d78f86793282a4566fcbc1ef9fcac | [
"MIT"
] | 6 | 2015-05-30T17:20:45.000Z | 2017-06-12T14:29:23.000Z | rpython/jit/backend/x86/tool/test/test_viewcode.py | jptomo/pypy-lang-scheme | 55edb2cec69d78f86793282a4566fcbc1ef9fcac | [
"MIT"
] | 11 | 2015-09-07T14:26:08.000Z | 2020-04-10T07:20:41.000Z | from cStringIO import StringIO
from rpython.jit.backend.tool.viewcode import format_code_dump_with_labels
from rpython.jit.backend.tool.viewcode import find_objdump
import os
import py
import tempfile
from rpython.tool.udir import udir
def test_format_code_dump_with_labels():
lines = StringIO("""
aa00 <.data>:
aa0... | 18.891892 | 74 | 0.678112 |
ac7f679815bad5c5d1c502cbcf302a53ba668597 | 297 | py | Python | portfolio/apps.py | ferraith/django-portfolio | 496dc50e22889d5bc809b274c59bc9530250e298 | [
"MIT"
] | 1 | 2017-12-22T00:44:23.000Z | 2017-12-22T00:44:23.000Z | portfolio/apps.py | ferraith/django-portfolio | 496dc50e22889d5bc809b274c59bc9530250e298 | [
"MIT"
] | 8 | 2017-12-19T10:57:20.000Z | 2017-12-23T20:26:17.000Z | portfolio/apps.py | ferraith/django-portfolio | 496dc50e22889d5bc809b274c59bc9530250e298 | [
"MIT"
] | null | null | null | """Configuration of the portfolio application."""
from django.apps import AppConfig
class PortfolioConfig(AppConfig):
"""Represents Django portfolio app.
Class representing Django portfolio application and its configuration.
:cvar name: name of app
"""
name = 'portfolio'
| 21.214286 | 74 | 0.727273 |
927e82b614ebc27e42794e10594df4d584f0f5bb | 17,045 | py | Python | tools/coverage-converter/lcov_cobertura.py | garyttierney/rust-csp | e23b3c76a6aedfa1e6cc57deb9f43eaaacea0cd4 | [
"MIT"
] | 3 | 2017-09-27T14:29:08.000Z | 2018-08-04T00:04:35.000Z | tools/coverage-converter/lcov_cobertura.py | garyttierney/secsp | e23b3c76a6aedfa1e6cc57deb9f43eaaacea0cd4 | [
"MIT"
] | 159 | 2018-11-30T20:02:53.000Z | 2021-07-26T05:16:22.000Z | tools/coverage-converter/lcov_cobertura.py | garyttierney/secsp | e23b3c76a6aedfa1e6cc57deb9f43eaaacea0cd4 | [
"MIT"
] | 1 | 2018-03-12T13:35:26.000Z | 2018-03-12T13:35:26.000Z | #!/usr/bin/env python
# Copyright 2011-2012 Eric Wendelin
#
# This is free software, licensed under the Apache License, Version 2.0,
# available in the accompanying LICENSE.txt file.
"""
Converts lcov line coverage output to Cobertura-compatible XML for CI
"""
import re
import sys
import os
import time
import subpro... | 41.072289 | 107 | 0.546201 |
9e7a19e997048c7d5f35afa0dd3413bbb6309353 | 2,507 | py | Python | Phase_2/pytools-master/ycsb/ycsb_results_aggregator_lvl2.py | manu2504/WANCom | 8acdffb947d36fa7d7c8c78cbe9c3b06864128a6 | [
"MIT"
] | null | null | null | Phase_2/pytools-master/ycsb/ycsb_results_aggregator_lvl2.py | manu2504/WANCom | 8acdffb947d36fa7d7c8c78cbe9c3b06864128a6 | [
"MIT"
] | null | null | null | Phase_2/pytools-master/ycsb/ycsb_results_aggregator_lvl2.py | manu2504/WANCom | 8acdffb947d36fa7d7c8c78cbe9c3b06864128a6 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import argparse
import logging
import pandas as pd
import numpy as np
from pytools.common.io import io_tuple_list2file
import ycsb_common as ycsb
logging.basicConfig(
format="(%(funcName).5s):[%(lineno)4d] %(asctime)s %(levelname)7s| %(message)s",
datefmt='%H:%M:%S', level=logging.DEBUG)
l... | 26.114583 | 99 | 0.692461 |
b352818cce5b22c3cc2a2f85286b3a2058ca55e2 | 3,777 | py | Python | isi_sdk_8_2_1/isi_sdk_8_2_1/models/cloud_job_files_name.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_1/isi_sdk_8_2_1/models/cloud_job_files_name.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_1/isi_sdk_8_2_1/models/cloud_job_files_name.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 8
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class CloudJobFilesName(object):... | 26.412587 | 80 | 0.553614 |
cb4bb161d46207f9fad0b3d9e1c1430bb098ef9d | 952 | py | Python | configs/recognition/r2plus1d/r2plus1d_r34_video_inference_8x8x1_180e_kinetics400_rgb.py | Naoki-Wake/mmaction2 | a2032605db82509744a18d993c94a06feb1efd15 | [
"Apache-2.0"
] | 1,870 | 2020-07-11T09:33:46.000Z | 2022-03-31T13:21:36.000Z | configs/recognition/r2plus1d/r2plus1d_r34_video_inference_8x8x1_180e_kinetics400_rgb.py | jayleicn/mmaction2-1 | 0a6fde1abb8403f1f68b568f5b4694c6f828e27e | [
"Apache-2.0"
] | 1,285 | 2020-07-11T11:18:57.000Z | 2022-03-31T08:41:17.000Z | configs/recognition/r2plus1d/r2plus1d_r34_video_inference_8x8x1_180e_kinetics400_rgb.py | jayleicn/mmaction2-1 | 0a6fde1abb8403f1f68b568f5b4694c6f828e27e | [
"Apache-2.0"
] | 557 | 2020-07-11T09:51:57.000Z | 2022-03-31T13:21:35.000Z | _base_ = ['../../_base_/models/r2plus1d_r34.py']
# model settings
model = dict(backbone=dict(act_cfg=dict(type='ReLU')))
# dataset settings
dataset_type = 'VideoDataset'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_bgr=False)
test_pipeline = [
dict(type='DecordInit'),
... | 28 | 78 | 0.62605 |
54f4397697b78a72d56706b547b009216291b444 | 2,595 | py | Python | sdk/servicebus/azure-servicebus/azure/servicebus/aio/_async_utils.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/servicebus/azure-servicebus/azure/servicebus/aio/_async_utils.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/servicebus/azure-servicebus/azure/servicebus/aio/_async_utils.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # ------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -------------------------------------------------------------------------
import sys
... | 32.848101 | 101 | 0.629672 |
a24399e45ff590fc3b0994b6c48f96868a524a3f | 11,595 | py | Python | controllers/gcm/gcm.py | enterstudio/the-blue-alliance | b53f752fe1f059b4b6f91c841e1865a6c6b81268 | [
"MIT"
] | null | null | null | controllers/gcm/gcm.py | enterstudio/the-blue-alliance | b53f752fe1f059b4b6f91c841e1865a6c6b81268 | [
"MIT"
] | null | null | null | controllers/gcm/gcm.py | enterstudio/the-blue-alliance | b53f752fe1f059b4b6f91c841e1865a6c6b81268 | [
"MIT"
] | null | null | null | ################################################################################
# gae_python_gcm/gcm.py
#
# In Python, for Google App Engine
# Originally ported from https://github.com/Instagram/node2dm
# Extended to support new GCM API.
# Greg Bayer <greg@gbayer.com>
#
# From: https://github.com/gregbayer/gae-python-... | 40.121107 | 210 | 0.608021 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.