hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ece3d5dc5b3e65eb5f772a04f4f85633e49931c6 | 3,985 | py | Python | refinement/options.py | XinyuHua/pair-emnlp2020 | 45f8b8ea3752dfb43aa75914afab1b29b2f10c50 | [
"MIT"
] | 20 | 2020-10-10T05:38:14.000Z | 2022-02-15T01:07:39.000Z | refinement/options.py | XinyuHua/pair-emnlp2020 | 45f8b8ea3752dfb43aa75914afab1b29b2f10c50 | [
"MIT"
] | 4 | 2020-10-20T03:29:41.000Z | 2021-04-23T16:10:34.000Z | refinement/options.py | XinyuHua/pair-emnlp2020 | 45f8b8ea3752dfb43aa75914afab1b29b2f10c50 | [
"MIT"
] | 2 | 2021-07-06T01:20:01.000Z | 2021-08-19T05:26:24.000Z | import argparse
def _add_common_args(parser):
parser.add_argument("--ckpt-dir", type=str, required=True)
parser.add_argument("--domain", type=str, required=True,
choices=['arggen', 'opinion', 'news'])
parser.add_argument("--setup", type=str, required=True,
ch... | 46.337209 | 84 | 0.635383 |
13472e402d0523130dce0cb1bae781ab6dbcfb6c | 2,243 | py | Python | neo3/core/utils.py | Degget1986/neo-mamba | da7312d5027f3e9b0e5421495d5c00915bdfd786 | [
"MIT"
] | 12 | 2020-08-27T19:56:02.000Z | 2022-03-08T03:23:43.000Z | neo3/core/utils.py | Degget1986/neo-mamba | da7312d5027f3e9b0e5421495d5c00915bdfd786 | [
"MIT"
] | 101 | 2020-07-24T08:23:00.000Z | 2021-11-17T13:37:45.000Z | neo3/core/utils.py | Degget1986/neo-mamba | da7312d5027f3e9b0e5421495d5c00915bdfd786 | [
"MIT"
] | 11 | 2021-02-11T22:24:13.000Z | 2021-11-18T06:45:03.000Z | # type: ignore
from enum import Enum
from collections import Iterable
from neo3.core import serialization
from neo3.core import Size
def get_var_size(value: object) -> int:
"""
Determine the variable size of an object.
Note:
This function is only used internally for correctly returning object si... | 36.770492 | 116 | 0.623272 |
3524e98f6395b3e3a9c28cca0e087ddfb71bd159 | 378 | py | Python | Part 2/Chapter 02/Exercises/excercise_10.py | phuycke/Practice-of-computing-using-Python | 9e477bcaecb0e447dfa7184d2071ca338801c86f | [
"MIT"
] | 1 | 2019-08-13T11:12:59.000Z | 2019-08-13T11:12:59.000Z | Part 2/Chapter 02/Exercises/excercise_10.py | phuycke/Practice-of-computing-using-Python | 9e477bcaecb0e447dfa7184d2071ca338801c86f | [
"MIT"
] | null | null | null | Part 2/Chapter 02/Exercises/excercise_10.py | phuycke/Practice-of-computing-using-Python | 9e477bcaecb0e447dfa7184d2071ca338801c86f | [
"MIT"
] | 1 | 2021-05-16T11:42:19.000Z | 2021-05-16T11:42:19.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Pieter Huycke
email: pieter.huycke@ugent.be
GitHub: phuycke
"""
#%%
import math
# ask for input
number = int(input('Inputted number:\n'))
# reprompt until a perfect square is provided
while number != (int(math.sqrt(number))**2):
number = int(inpu... | 17.181818 | 45 | 0.664021 |
a5e6bf48172a1b8cafac27ab1f4a81e968b56da8 | 7,993 | py | Python | symphony/bdk/gen/agent_model/attachment_info.py | symphony-elias/symphony-bdk-python | 0d1cd94a9982e3687ea52c49acdb5f942ecd9bec | [
"Apache-2.0"
] | 17 | 2018-09-06T09:58:18.000Z | 2021-07-13T12:54:20.000Z | symphony/bdk/gen/agent_model/attachment_info.py | symphony-elias/symphony-bdk-python | 0d1cd94a9982e3687ea52c49acdb5f942ecd9bec | [
"Apache-2.0"
] | 59 | 2018-11-21T15:17:57.000Z | 2021-08-03T10:00:43.000Z | symphony/bdk/gen/agent_model/attachment_info.py | symphony-elias/symphony-bdk-python | 0d1cd94a9982e3687ea52c49acdb5f942ecd9bec | [
"Apache-2.0"
] | 37 | 2018-09-01T03:07:48.000Z | 2021-07-06T10:21:50.000Z | """
Agent API
This document refers to Symphony API calls to send and receive messages and content. They need the on-premise Agent installed to perform decryption/encryption of content. - sessionToken and keyManagerToken can be obtained by calling the authenticationAPI on the symphony back end and the key mana... | 44.904494 | 1,241 | 0.608157 |
fcb36d80d0e98663234e3630b8086c6a78c091b7 | 2,332 | py | Python | src/nlplib/core/model/sqlalchemy_/__init__.py | rectangletangle/nlplib | 7dcc0daf050a73c03b7d7f0257ad0b862586a6e3 | [
"BSD-2-Clause"
] | 1 | 2015-11-18T12:59:52.000Z | 2015-11-18T12:59:52.000Z | src/nlplib/core/model/sqlalchemy_/__init__.py | rectangletangle/nlplib | 7dcc0daf050a73c03b7d7f0257ad0b862586a6e3 | [
"BSD-2-Clause"
] | null | null | null | src/nlplib/core/model/sqlalchemy_/__init__.py | rectangletangle/nlplib | 7dcc0daf050a73c03b7d7f0257ad0b862586a6e3 | [
"BSD-2-Clause"
] | null | null | null | ''' This persistence back-end depends on the SQLAlchemy package
url : http://www.sqlalchemy.org '''
from contextlib import contextmanager
from sqlalchemy.orm import sessionmaker
from sqlalchemy import exc as sqlalchemy_exc
from sqlalchemy import create_engine
from nlplib.core.model.sqlalchemy_.map import defaul... | 29.15 | 93 | 0.691252 |
d81341d9ac4ae34b93b775d6a0972ed0fd156525 | 1,368 | py | Python | habitat_baselines/slambased/utils.py | joannetruong/habitat-api | aad2fd7b8545dce44daefd4b7b3941672eb96ee3 | [
"MIT"
] | 489 | 2019-02-21T21:47:40.000Z | 2020-08-10T06:43:24.000Z | habitat_baselines/slambased/utils.py | joannetruong/habitat-api | aad2fd7b8545dce44daefd4b7b3941672eb96ee3 | [
"MIT"
] | 380 | 2019-02-26T00:50:48.000Z | 2020-08-11T14:57:07.000Z | habitat_baselines/slambased/utils.py | joannetruong/habitat-api | aad2fd7b8545dce44daefd4b7b3941672eb96ee3 | [
"MIT"
] | 167 | 2019-02-26T00:38:30.000Z | 2020-08-09T23:07:10.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import time
import numpy as np
import torch
from PIL import Image
def generate_2dgrid(h, w, centered=False):
if c... | 25.811321 | 66 | 0.595029 |
7e6894a544fd01ad98bc6b22de1c7eaa6bddf2a0 | 2,272 | py | Python | addons/odoo_shipping_service_apps/models/website_shipping.py | marionumza/vocal_v12 | 480990e919c9410903e06e7813ee92800bd6a569 | [
"Unlicense"
] | null | null | null | addons/odoo_shipping_service_apps/models/website_shipping.py | marionumza/vocal_v12 | 480990e919c9410903e06e7813ee92800bd6a569 | [
"Unlicense"
] | null | null | null | addons/odoo_shipping_service_apps/models/website_shipping.py | marionumza/vocal_v12 | 480990e919c9410903e06e7813ee92800bd6a569 | [
"Unlicense"
] | 1 | 2021-05-05T07:59:08.000Z | 2021-05-05T07:59:08.000Z | # -*- coding: utf-8 -*-
#################################################################################
# Copyright (c) 2018-Present Webkul Software Pvt. Ltd. (<https://webkul.com/>)
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>
... | 30.293333 | 81 | 0.549296 |
df6e3ca932e4fa36b019ee62e708481f36e573ad | 1,633 | py | Python | service.py | yugimaster/service.1905.content.provider | 7a1f66c167de2599993064ae5f9ac2182686d010 | [
"Apache-2.0"
] | null | null | null | service.py | yugimaster/service.1905.content.provider | 7a1f66c167de2599993064ae5f9ac2182686d010 | [
"Apache-2.0"
] | null | null | null | service.py | yugimaster/service.1905.content.provider | 7a1f66c167de2599993064ae5f9ac2182686d010 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 PivosGroup
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your optio... | 24.742424 | 73 | 0.685854 |
176f941f183cdf68941d66bfa7a362cb1a43aa0f | 1,365 | py | Python | rcs/wiki/lock.py | ShuffleBox/django-rcsfield | dd8b5b22635bcdae9825e00b65887bb51171e76f | [
"BSD-3-Clause"
] | null | null | null | rcs/wiki/lock.py | ShuffleBox/django-rcsfield | dd8b5b22635bcdae9825e00b65887bb51171e76f | [
"BSD-3-Clause"
] | null | null | null | rcs/wiki/lock.py | ShuffleBox/django-rcsfield | dd8b5b22635bcdae9825e00b65887bb51171e76f | [
"BSD-3-Clause"
] | null | null | null | from datetime import datetime
from django.core.cache import cache
from django.conf import settings
class AlreadyLocked(Exception):
def __init__(self, lock):
self.lock_obj = lock
super(AlreadyLocked, self).__init__()
class EditLock(object):
"""
Using Django's cache system this class imple... | 35.921053 | 85 | 0.643223 |
7c7537d12d7036981511fb11924cf3a3d455fbc3 | 5,472 | py | Python | tests/parser_test.py | ThomasFeher/timew-report | 2e2525dd3777613af41c41160adc9e67dfb33bab | [
"MIT"
] | 42 | 2017-05-11T11:55:19.000Z | 2022-03-17T06:03:17.000Z | tests/parser_test.py | ThomasFeher/timew-report | 2e2525dd3777613af41c41160adc9e67dfb33bab | [
"MIT"
] | 1 | 2020-08-12T18:12:52.000Z | 2020-08-14T13:20:31.000Z | tests/parser_test.py | ThomasFeher/timew-report | 2e2525dd3777613af41c41160adc9e67dfb33bab | [
"MIT"
] | 2 | 2020-06-05T08:07:47.000Z | 2020-07-24T06:27:46.000Z | import pytest
from timewreport.interval import TimeWarriorInterval
from timewreport.parser import TimeWarriorParser
@pytest.fixture(scope='function')
def plain_export(tmpdir):
fn = tmpdir.mkdir('data').join('plain_export')
fn.write("""\
name1: value1
name2: value2
name3: value3
[]
""")
return fn
@pyte... | 27.77665 | 134 | 0.676901 |
7040e297185e95b6730f86c1b5ab964a85441194 | 10,742 | py | Python | UEF/DRL for Computer Games/[Summer School] ViZDoom/modifications/DDQN_DOOM.py | RedSerge/fun | 8fbcb7a3a00c046e93cff1dbbafb1936afa4b25e | [
"MIT"
] | null | null | null | UEF/DRL for Computer Games/[Summer School] ViZDoom/modifications/DDQN_DOOM.py | RedSerge/fun | 8fbcb7a3a00c046e93cff1dbbafb1936afa4b25e | [
"MIT"
] | null | null | null | UEF/DRL for Computer Games/[Summer School] ViZDoom/modifications/DDQN_DOOM.py | RedSerge/fun | 8fbcb7a3a00c046e93cff1dbbafb1936afa4b25e | [
"MIT"
] | null | null | null | from matplotlib import pyplot
from collections import deque
import random
import numpy as np
import keras
from CONFIG import *
from cv2 import resize
import vizdoom as vzd
import datetime
def svg_name(name):
return ''.join((name, "_", datetime.datetime.now().strftime("%y-%m-%d-%H-%M-%S_%f"), ".svg"))
class ReplayMem... | 32.850153 | 186 | 0.721933 |
edc1874e55364d6e4eb2808f50a5a956b5512eb3 | 78 | py | Python | build/myExtension.roboFontExt/lib/doSomethingElse.py | roboDocs/rf-extension-boilerplate | ffb2487121ba5ce29ac50a80700116a035133c84 | [
"MIT"
] | 4 | 2019-01-29T14:50:22.000Z | 2019-12-12T14:47:25.000Z | source/code/doSomethingElse.py | roboDocs/rf-extension-boilerplate | ffb2487121ba5ce29ac50a80700116a035133c84 | [
"MIT"
] | 2 | 2019-05-08T16:27:15.000Z | 2019-12-16T16:44:13.000Z | source/code/doSomethingElse.py | roboDocs/rf-extension-boilerplate | ffb2487121ba5ce29ac50a80700116a035133c84 | [
"MIT"
] | null | null | null | from comMyDomainMyExtensionMyModule import doSomethingElse
doSomethingElse()
| 19.5 | 58 | 0.897436 |
7d4b139020a0391e45f453c64ad91a4624b4140b | 34,916 | py | Python | koko/lib/sam_pcb.py | TheBeachLab/kokopelli | 529b8149a951363d2a027946464ea0bb22346428 | [
"MIT"
] | null | null | null | koko/lib/sam_pcb.py | TheBeachLab/kokopelli | 529b8149a951363d2a027946464ea0bb22346428 | [
"MIT"
] | 1 | 2018-11-23T11:52:41.000Z | 2018-11-23T11:52:41.000Z | koko/lib/sam_pcb.py | TheBeachLab/kokopelli | 529b8149a951363d2a027946464ea0bb22346428 | [
"MIT"
] | null | null | null | import operator
from math import cos, sin, atan2, radians, degrees, sqrt
import koko.lib.shapes2d as s2d
from koko.lib.text import text
from numpy import *
class PCB(object):
def __init__(self, x0, y0, width, height, chamfer_distance=0):
self.x0 = x0
self.y0 = y0
self.width = width
... | 35.304348 | 155 | 0.519389 |
596994624bef3ec4210b3b689b682f96696fc781 | 2,692 | py | Python | scripts/run_ncrf_parallel.py | seryrzu/centroFlye | b2a4378bc254cc59bf13ae4e802dab478666e079 | [
"BSD-3-Clause"
] | 21 | 2019-09-17T00:53:52.000Z | 2022-03-02T09:27:48.000Z | scripts/run_ncrf_parallel.py | seryrzu/centroFlye | b2a4378bc254cc59bf13ae4e802dab478666e079 | [
"BSD-3-Clause"
] | 14 | 2019-10-10T11:08:42.000Z | 2021-06-28T01:56:31.000Z | scripts/run_ncrf_parallel.py | seryrzu/centroFlye | b2a4378bc254cc59bf13ae4e802dab478666e079 | [
"BSD-3-Clause"
] | 6 | 2019-11-07T14:41:43.000Z | 2021-07-22T23:37:39.000Z | # (c) 2019 by Authors
# This file is a part of centroFlye program.
# Released under the BSD license (see LICENSE file)
import argparse
import os
from subprocess import call, Popen, PIPE
from utils.bio import read_bio_seqs, read_bio_seq, write_bio_seqs
from utils.various import chunks2
from utils.os_utils import smart_... | 34.512821 | 73 | 0.57578 |
0867821077fed73364d805a469c46a3be1cf2747 | 10,566 | py | Python | trac/wiki/model.py | haskell-infra/trac | 5e086948718893ede9965ea4ce3625da32676730 | [
"BSD-3-Clause"
] | null | null | null | trac/wiki/model.py | haskell-infra/trac | 5e086948718893ede9965ea4ce3625da32676730 | [
"BSD-3-Clause"
] | 1 | 2019-03-20T19:13:53.000Z | 2019-08-14T20:15:09.000Z | trac/wiki/model.py | haskell-infra/trac | 5e086948718893ede9965ea4ce3625da32676730 | [
"BSD-3-Clause"
] | 2 | 2019-03-20T01:23:30.000Z | 2019-12-06T16:13:07.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2009 Edgewall Software
# Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of th... | 39.871698 | 79 | 0.572591 |
b55fe0cd8340d8eb97ffc5e56ff93611e80c6d23 | 1,928 | py | Python | time_test.py | aviczhl2/an-AI | 895a1eb67529b0e08e3fa534dfc5fb5fa572cf79 | [
"MIT"
] | 3 | 2017-11-29T03:49:05.000Z | 2018-01-19T02:34:11.000Z | time_test.py | aviczhl2/an-AI | 895a1eb67529b0e08e3fa534dfc5fb5fa572cf79 | [
"MIT"
] | null | null | null | time_test.py | aviczhl2/an-AI | 895a1eb67529b0e08e3fa534dfc5fb5fa572cf79 | [
"MIT"
] | null | null | null |
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import argparse
import os
import shutil
import time
import importlib
import math
import warnings
parser=argparse.ArgumentParser(description='PyTorch Condense Convolutio... | 26.054054 | 94 | 0.648859 |
0fe283d676994d31c88521b658feff45b21e6032 | 54 | py | Python | pybotvac/__init__.py | raymccarthy/pybotvac | 0198410098ec4c3d8433cf210ea57fa037073370 | [
"MIT"
] | 3 | 2017-12-27T07:37:32.000Z | 2018-06-18T20:40:35.000Z | pybotvac/__init__.py | raymccarthy/pybotvac | 0198410098ec4c3d8433cf210ea57fa037073370 | [
"MIT"
] | 4 | 2017-04-07T13:18:29.000Z | 2018-07-01T06:35:30.000Z | pybotvac/__init__.py | raymccarthy/pybotvac | 0198410098ec4c3d8433cf210ea57fa037073370 | [
"MIT"
] | 5 | 2017-02-10T15:57:15.000Z | 2019-01-27T15:08:51.000Z | from .account import Account
from .robot import Robot
| 18 | 28 | 0.814815 |
6f1dd8b2c5c3cc470060af7e0a899ebdf73a4d31 | 8,253 | py | Python | scripts/o3de/o3de/utils.py | Shorotshishir/o3de | b0c522be5196a7166cb6f13d3ddf8dae75ef06c1 | [
"Apache-2.0",
"MIT"
] | 8 | 2021-08-31T02:14:19.000Z | 2021-12-28T19:20:59.000Z | scripts/o3de/o3de/utils.py | Shorotshishir/o3de | b0c522be5196a7166cb6f13d3ddf8dae75ef06c1 | [
"Apache-2.0",
"MIT"
] | 8 | 2021-07-12T13:55:00.000Z | 2021-10-04T14:53:21.000Z | scripts/o3de/o3de/utils.py | Shorotshishir/o3de | b0c522be5196a7166cb6f13d3ddf8dae75ef06c1 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-16T05:06:18.000Z | 2021-09-16T05:06:18.000Z | #
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
"""
This file contains utility functions
"""
import sys
import uuid
import os
import pathlib
import shutil
... | 36.197368 | 139 | 0.657458 |
3661bb18d6c84e0e0bcb384c0a48a791da0d78ec | 11,035 | py | Python | src/gdata/alt/appengine.py | lqc/google-data-api | b720582a472d627a0853d02e51e13dbce4cfe6ae | [
"Apache-2.0"
] | null | null | null | src/gdata/alt/appengine.py | lqc/google-data-api | b720582a472d627a0853d02e51e13dbce4cfe6ae | [
"Apache-2.0"
] | null | null | null | src/gdata/alt/appengine.py | lqc/google-data-api | b720582a472d627a0853d02e51e13dbce4cfe6ae | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright (C) 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 35.36859 | 79 | 0.68763 |
67cd3125f3db9c99e00ead8a2b0dafdf363b1382 | 4,796 | py | Python | util/generate-asm-lcov.py | susytech/ring | 0ccbdcbfa04b8bed51d1f22cb17d2f415a86b7e7 | [
"Apache-2.0"
] | null | null | null | util/generate-asm-lcov.py | susytech/ring | 0ccbdcbfa04b8bed51d1f22cb17d2f415a86b7e7 | [
"Apache-2.0"
] | null | null | null | util/generate-asm-lcov.py | susytech/ring | 0ccbdcbfa04b8bed51d1f22cb17d2f415a86b7e7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyleft (c) 2016, Google Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR... | 31.346405 | 88 | 0.653253 |
14812acdd3323ff013e6869e9b7acb061b6fee59 | 1,767 | py | Python | sa/profiles/Qtech/QOS/profile.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | sa/profiles/Qtech/QOS/profile.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | sa/profiles/Qtech/QOS/profile.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ---------------------------------------------------------------------
# Vendor: Qtech
# OS: QOS
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# SNM... | 32.722222 | 92 | 0.525184 |
5208d9761cf9d8d275029ff654d49c002af68e01 | 398 | py | Python | catkin_ws/src/unsupervised_msgs/setup.py | unsupervisedai/maryam_arduino | 9904669e8195a06b693f0c22fd658fd8fec2ab75 | [
"MIT"
] | null | null | null | catkin_ws/src/unsupervised_msgs/setup.py | unsupervisedai/maryam_arduino | 9904669e8195a06b693f0c22fd658fd8fec2ab75 | [
"MIT"
] | null | null | null | catkin_ws/src/unsupervised_msgs/setup.py | unsupervisedai/maryam_arduino | 9904669e8195a06b693f0c22fd658fd8fec2ab75 | [
"MIT"
] | null | null | null | ## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=[],
package_dir={'': 'src'},
requires=['std_msgs', 'rospy', 'message_f... | 28.428571 | 99 | 0.743719 |
9466dc38267577d981f93bbcb522dbe187cb66cb | 4,081 | py | Python | tests/test_get_config.py | PLSV/cookiecutter | 2bd62c67ec3e52b8e537d5346fd96ebd82803efe | [
"BSD-3-Clause"
] | 3 | 2020-12-17T13:08:20.000Z | 2021-06-06T08:56:40.000Z | tests/test_get_config.py | PLSV/cookiecutter | 2bd62c67ec3e52b8e537d5346fd96ebd82803efe | [
"BSD-3-Clause"
] | null | null | null | tests/test_get_config.py | PLSV/cookiecutter | 2bd62c67ec3e52b8e537d5346fd96ebd82803efe | [
"BSD-3-Clause"
] | 1 | 2020-12-17T13:08:23.000Z | 2020-12-17T13:08:23.000Z | """Collection of tests around loading cookiecutter config."""
import os
import pytest
from cookiecutter import config
from cookiecutter.exceptions import ConfigDoesNotExistException, InvalidConfiguration
def test_merge_configs():
"""Verify default and user config merged in expected way."""
default = {
... | 35.798246 | 85 | 0.61333 |
30105c03bbaded0327d925f694cf8e57cac29340 | 1,352 | py | Python | exps/default/nano.py | ZJU-lishuang/YOLOX | 528205b94f46ade3460519a97bfbb4a3d1c53df9 | [
"Apache-2.0"
] | 2 | 2021-08-20T02:11:47.000Z | 2021-11-19T04:31:50.000Z | exps/default/nano.py | ZJU-lishuang/YOLOX | 528205b94f46ade3460519a97bfbb4a3d1c53df9 | [
"Apache-2.0"
] | null | null | null | exps/default/nano.py | ZJU-lishuang/YOLOX | 528205b94f46ade3460519a97bfbb4a3d1c53df9 | [
"Apache-2.0"
] | 1 | 2021-09-02T12:12:44.000Z | 2021-09-02T12:12:44.000Z | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Copyright (c) Megvii, Inc. and its affiliates.
import os
import torch.nn as nn
from yolox.exp import Exp as MyExp
class Exp(MyExp):
def __init__(self):
super(Exp, self).__init__()
self.depth = 0.33
self.width = 0.25
self.scale = (0... | 32.190476 | 99 | 0.593935 |
21fb93292a2e63ae41c742016dd8b01312912abf | 3,560 | py | Python | bindings/python/ensmallen/datasets/string/ruminococcussp5139bfaa.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/ruminococcussp5139bfaa.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/ruminococcussp5139bfaa.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Ruminococcus sp. 5139BFAA.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--prot... | 32.962963 | 223 | 0.676966 |
55c8444a8428fb6fb4db4e5abf87b0cb6714df9d | 1,492 | py | Python | data_generator.py | yoongi0428/spotify_recSys_challenge_2018 | e4cd527a3c24502201345475cb660d43c01a4ea1 | [
"Apache-2.0"
] | 67 | 2018-07-02T03:33:57.000Z | 2022-02-25T05:01:38.000Z | data_generator.py | yoongi0428/spotify_recSys_challenge_2018 | e4cd527a3c24502201345475cb660d43c01a4ea1 | [
"Apache-2.0"
] | 2 | 2018-07-19T13:22:56.000Z | 2018-08-01T05:09:01.000Z | data_generator.py | yoongi0428/spotify_recSys_challenge_2018 | e4cd527a3c24502201345475cb660d43c01a4ea1 | [
"Apache-2.0"
] | 17 | 2018-07-02T05:08:29.000Z | 2022-02-25T05:28:37.000Z | """
Generate training set, test set and challenge set.
Convert the MPD's data format into our models'.
"""
import sys
import json
import os
import numpy as np
import argparse
from utils.spotify_reader import *
def fullpaths_generator(path):
filenames = os.listdir(path)
fullpaths = []
for filename in filen... | 36.390244 | 116 | 0.699062 |
2e12604e95cb2d062c2c481f92868e8b72bd9853 | 11,339 | py | Python | models/config.py | wavemind/gcb17ml | 350d0a82e5d97dd690b7c17e26f11b58d9c9e9ac | [
"Apache-2.0"
] | null | null | null | models/config.py | wavemind/gcb17ml | 350d0a82e5d97dd690b7c17e26f11b58d9c9e9ac | [
"Apache-2.0"
] | null | null | null | models/config.py | wavemind/gcb17ml | 350d0a82e5d97dd690b7c17e26f11b58d9c9e9ac | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 32.866667 | 80 | 0.62748 |
2c585573bd46bb79e3c82c34fb2f784a833dd94c | 5,558 | py | Python | setup.py | gregmccoy/django-compressor | 8255b350a811f96fb7a004e784e9ee2340f532bc | [
"Apache-2.0"
] | 1 | 2019-11-25T22:25:35.000Z | 2019-11-25T22:25:35.000Z | setup.py | eadwinCode/django-compressor | ccd7fb8410d5e94d34132a8c790b8ec8e434172e | [
"Apache-2.0"
] | null | null | null | setup.py | eadwinCode/django-compressor | ccd7fb8410d5e94d34132a8c790b8ec8e434172e | [
"Apache-2.0"
] | 1 | 2022-02-02T13:39:10.000Z | 2022-02-02T13:39:10.000Z | from __future__ import print_function
import ast
import os
import sys
import codecs
from fnmatch import fnmatchcase
from distutils.util import convert_path
from setuptools import setup, find_packages
class VersionFinder(ast.NodeVisitor):
def __init__(self):
self.version = None
def visit_Assign(self, n... | 37.053333 | 91 | 0.575747 |
922df571ede25a79e1a4ca00ad4526c3e7f183ea | 4,839 | py | Python | slack-bot/feeds/feed.py | jonathanschulberger/feed-reader | a48ab1051f52e7cbb8383d45a3ac88ffa9e34cd9 | [
"MIT"
] | null | null | null | slack-bot/feeds/feed.py | jonathanschulberger/feed-reader | a48ab1051f52e7cbb8383d45a3ac88ffa9e34cd9 | [
"MIT"
] | null | null | null | slack-bot/feeds/feed.py | jonathanschulberger/feed-reader | a48ab1051f52e7cbb8383d45a3ac88ffa9e34cd9 | [
"MIT"
] | null | null | null | import collections
import json
import os
import traceback
import requests
# constants
BASE_PATH_PREFIX = os.path.dirname(os.path.join(os.path.dirname(__file__)))
CONFIG_PATH_PREFIX = os.path.join(BASE_PATH_PREFIX, "config")
LOG_PATH_PREFIX = os.path.join(BASE_PATH_PREFIX, "logs")
class FeedReader:
def __init__(... | 32.918367 | 96 | 0.582972 |
dfb464b6c98706657ae5b9ea4c25b6b65dddf7b7 | 1,124 | py | Python | docs/core/howto/listings/trial/calculus/client_2.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 2 | 2015-11-08T12:59:22.000Z | 2018-10-19T01:06:40.000Z | docs/core/howto/listings/trial/calculus/client_2.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 5 | 2020-06-05T18:16:39.000Z | 2022-01-13T00:45:49.000Z | docs/core/howto/listings/trial/calculus/client_2.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 1 | 2019-01-25T18:08:19.000Z | 2019-01-25T18:08:19.000Z | # -*- test-case-name: calculus.test.test_client_2 -*-
from twisted.protocols import basic
from twisted.internet import defer, reactor
class ClientTimeoutError(Exception):
pass
class RemoteCalculationClient(basic.LineReceiver):
callLater = reactor.callLater
timeOut = 60
def __init__(self):
... | 20.436364 | 62 | 0.612989 |
81953c4c86aed2af8c19194ed48d5d8ca9b04adf | 4,122 | py | Python | examples/calibrate_levy_and_heston_models.py | jkirkby3/fypy | 28654800c91683685aee559aac13a17e3f4583b8 | [
"MIT"
] | 16 | 2021-04-24T18:51:00.000Z | 2022-03-31T16:17:21.000Z | examples/calibrate_levy_and_heston_models.py | jkirkby3/fypy | 28654800c91683685aee559aac13a17e3f4583b8 | [
"MIT"
] | null | null | null | examples/calibrate_levy_and_heston_models.py | jkirkby3/fypy | 28654800c91683685aee559aac13a17e3f4583b8 | [
"MIT"
] | 6 | 2021-04-28T12:19:25.000Z | 2022-03-31T16:19:36.000Z | """
This example shows how to calibrate a Levy model or Heston's stochastic volatility model (choose your favorite below).
We do the following:
1) Create a synthetic market surface, priced using Variance Gamma with set of "true" parameters
2) Create a calibrator and set the market prices as targets
3) Calib... | 37.135135 | 118 | 0.7164 |
c279b553b9c96a58df3577aab0774085bf382181 | 924 | py | Python | scripts/Audio-to-text/voice_to_text.py | SirishC/python-projects | 57a4186822496d949ef2a13d85830825401a65e9 | [
"MIT"
] | 2 | 2021-10-19T06:17:33.000Z | 2021-10-19T06:17:37.000Z | scripts/Audio-to-text/voice_to_text.py | SirishC/python-projects | 57a4186822496d949ef2a13d85830825401a65e9 | [
"MIT"
] | 4 | 2021-10-19T06:04:36.000Z | 2021-10-19T11:42:57.000Z | scripts/Audio-to-text/voice_to_text.py | SirishC/python-projects | 57a4186822496d949ef2a13d85830825401a65e9 | [
"MIT"
] | 1 | 2021-10-19T06:55:26.000Z | 2021-10-19T06:55:26.000Z | import speech_recognition as sr
import argparse
parser = argparse.ArgumentParser(
description=(
"Performs" "voice-to-text transcription on" "audio files using" "PocketSphinx."
)
)
parser.add_argument("-p", "--path", type=str, required=True, help="Audio file path.")
parser.add_argument(
"-o",
"... | 23.1 | 87 | 0.62987 |
e6a8acbb5de55b377dc69a507b6dd238c5746bf3 | 881 | py | Python | conpaas-director/cpsdirector/__init__.py | bopopescu/conpaas-1 | cea3c02f499a729464697de7cf98c2041febc0ab | [
"BSD-3-Clause"
] | 1 | 2015-08-03T03:57:06.000Z | 2015-08-03T03:57:06.000Z | conpaas-director/cpsdirector/__init__.py | bopopescu/conpaas-1 | cea3c02f499a729464697de7cf98c2041febc0ab | [
"BSD-3-Clause"
] | null | null | null | conpaas-director/cpsdirector/__init__.py | bopopescu/conpaas-1 | cea3c02f499a729464697de7cf98c2041febc0ab | [
"BSD-3-Clause"
] | 2 | 2017-05-27T09:07:53.000Z | 2020-07-26T03:15:55.000Z | # -*- coding: utf-8 -*-
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from cpsdirector import common
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = common.config_parser.get(
'director', 'DATABASE_URI')
db = SQLAlchemy(a... | 22.589744 | 65 | 0.785471 |
357bc620288291d31472f1d3f910c92fefd30c51 | 3,037 | py | Python | ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py | runningt/ambari | 7b91469e68a80bfcabe4b79d855caa684bf51378 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py | runningt/ambari | 7b91469e68a80bfcabe4b79d855caa684bf51378 | [
"Apache-2.0"
] | 2 | 2018-10-24T11:06:24.000Z | 2019-09-09T08:51:21.000Z | ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py | runningt/ambari | 7b91469e68a80bfcabe4b79d855caa684bf51378 | [
"Apache-2.0"
] | 2 | 2017-08-13T00:03:56.000Z | 2019-07-31T15:36:01.000Z | """
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... | 39.441558 | 278 | 0.73296 |
d13d57866a312379a175d46f2bd3aa5cbd033b6f | 1,722 | py | Python | setup.py | leVirve/dcard-spider | ac64cbcfe7ef6be7e554cef422b1a8a6bb968d46 | [
"MIT"
] | 95 | 2016-07-16T13:56:51.000Z | 2022-01-26T17:12:07.000Z | setup.py | jimmy29304825/mydcard-spider | e40274ca92a6768621174c38420f270092edbebe | [
"MIT"
] | 17 | 2016-07-26T14:18:34.000Z | 2020-05-18T12:33:06.000Z | setup.py | jimmy29304825/mydcard-spider | e40274ca92a6768621174c38420f270092edbebe | [
"MIT"
] | 32 | 2017-03-30T02:58:06.000Z | 2022-01-26T17:14:07.000Z | import codecs
from setuptools import setup
def readme():
with codecs.open('README.rst', 'r', 'utf-8') as f:
return f.read()
def version():
with open('dcard/__init__.py') as f:
for line in f:
if line.startswith('__version__'):
return line.replace("'", '').split()[-... | 29.186441 | 61 | 0.577236 |
9ca1cb7e0289f9d86a4a3556bd98308aa4dd7ce3 | 5,515 | py | Python | pulsequantum/awg.py | fabrizioberr/pulsequantum | 2737cbf5973abaa1ee39c9704dcabe630a1a5f6c | [
"MIT"
] | 2 | 2021-01-07T13:24:22.000Z | 2021-12-10T13:57:47.000Z | pulsequantum/awg.py | fabrizioberr/pulsequantum | 2737cbf5973abaa1ee39c9704dcabe630a1a5f6c | [
"MIT"
] | 1 | 2020-11-23T11:38:13.000Z | 2020-11-23T12:15:48.000Z | pulsequantum/awg.py | fabrizioberr/pulsequantum | 2737cbf5973abaa1ee39c9704dcabe630a1a5f6c | [
"MIT"
] | 2 | 2020-09-22T09:10:15.000Z | 2021-04-15T08:45:26.000Z | import time
class AWG():
"""
Class for AWG control
"""
def __init__(self, AWG=None, gseq=None):
self.AWG = AWG
self.gseq = gseq
#############################################################################################
# AWG functions (uploading, running AWG, turning on outputs. Note... | 39.676259 | 94 | 0.467271 |
3059de009e9e7fab8d75ddcfbb4b418ee6492403 | 1,096 | py | Python | library_management/library_management/doctype/customer/customer_dashboard.py | jprasanthkumar28/Promantia_Local | 92e5c9db793b266fc92fd74e558a5a8b0f1bcda7 | [
"MIT"
] | 1 | 2022-01-05T05:19:59.000Z | 2022-01-05T05:19:59.000Z | library_management/library_management/doctype/customer/customer_dashboard.py | jprasanthkumar28/Promantia_Local | 92e5c9db793b266fc92fd74e558a5a8b0f1bcda7 | [
"MIT"
] | null | null | null | library_management/library_management/doctype/customer/customer_dashboard.py | jprasanthkumar28/Promantia_Local | 92e5c9db793b266fc92fd74e558a5a8b0f1bcda7 | [
"MIT"
] | null | null | null |
from frappe import _
def get_dashboard_data(data):
return {
'heatmap': True,
'heatmap_message': _('This is based on transactions against this Customer. See timeline below for details'),
'fieldname': 'customer',
'non_standard_fieldnames': {
'Payment Entry': 'party',
'Quotation': 'party_name',
'Oppor... | 21.490196 | 110 | 0.566606 |
8cd709f51992cd941de499dc99c68300287ff590 | 106,999 | py | Python | nemde/core/model/constructor.py | akxen/nemde | 23afcdf128352f12d3074194a1321a8f810f4407 | [
"Apache-2.0"
] | null | null | null | nemde/core/model/constructor.py | akxen/nemde | 23afcdf128352f12d3074194a1321a8f810f4407 | [
"Apache-2.0"
] | null | null | null | nemde/core/model/constructor.py | akxen/nemde | 23afcdf128352f12d3074194a1321a8f810f4407 | [
"Apache-2.0"
] | 1 | 2022-01-16T01:48:54.000Z | 2022-01-16T01:48:54.000Z | """Model used to construct and solve NEMDE approximation"""
import time
from typing import Union
from pyomo.core.base.constraint import Constraint
import pyomo.environ as pyo
from nemde.core.model.utils import fast_start
def define_sets(m, data):
"""Define sets"""
# NEM regions
m.S_REGIONS = pyo.Set(i... | 40.240316 | 121 | 0.677913 |
75c3452d705421f99053b9a870ac77cc7e0d76a4 | 8,528 | py | Python | mrjob/fs/hadoop.py | mineshpateltc/mrjob | 596e232247a5f793e3c1d01ad183893a62339b1e | [
"Apache-2.0"
] | 1 | 2015-02-22T00:12:25.000Z | 2015-02-22T00:12:25.000Z | mrjob/fs/hadoop.py | kod3r/mrjob | 226a741548cf125ecfb549b7c50d52cda932d045 | [
"Apache-2.0"
] | 1 | 2021-03-26T00:47:44.000Z | 2021-03-26T00:47:44.000Z | mrjob/fs/hadoop.py | Milstein/mrjob | 226a741548cf125ecfb549b7c50d52cda932d045 | [
"Apache-2.0"
] | 1 | 2021-06-27T10:20:56.000Z | 2021-06-27T10:20:56.000Z | # Copyright 2009-2012 Yelp and Contributors
# Copyright 2013 David Marin
#
# 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 ... | 35.239669 | 83 | 0.594512 |
cb692596fb20bf0d9ab6f2730d72a4c5678ad705 | 7,035 | py | Python | kubernetes/client/models/istio_networking_v1alpha3_envoy_filter_listener_match.py | DrAuYueng/python | 9e5346352b16122d7956b59cd7924ea49f320dd2 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/istio_networking_v1alpha3_envoy_filter_listener_match.py | DrAuYueng/python | 9e5346352b16122d7956b59cd7924ea49f320dd2 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/istio_networking_v1alpha3_envoy_filter_listener_match.py | DrAuYueng/python | 9e5346352b16122d7956b59cd7924ea49f320dd2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.15.6
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class IstioNetwo... | 35.71066 | 259 | 0.654869 |
b536ab351d06996be3b2d908fd13e630bed4dfac | 851 | py | Python | wufoo_scoring/apps/weekly_location_reports.py | infomaven/wufoo_scoring | c316b2ae77c2be724a82725a57aa6f3b2b296e02 | [
"Unlicense"
] | null | null | null | wufoo_scoring/apps/weekly_location_reports.py | infomaven/wufoo_scoring | c316b2ae77c2be724a82725a57aa6f3b2b296e02 | [
"Unlicense"
] | null | null | null | wufoo_scoring/apps/weekly_location_reports.py | infomaven/wufoo_scoring | c316b2ae77c2be724a82725a57aa6f3b2b296e02 | [
"Unlicense"
] | null | null | null | """
wufoo_reporter.weekly_location_reports.py
Purpose: POSTS aggregate data to forms hosted on wufoo.com
Author: nwhitfield
Date: 6 Mar 2014
approved format: https://{subdomain}.wufoo.com/api/v3/forms/{formIdentifier}/entries.{xml|json}
{subdomain} = neighborhoodsonic
{formIdentifier} = s1m6or2u1rkli5v
sample post ... | 29.344828 | 95 | 0.750881 |
e02b53c3750de4bca157c05cc38221078536ac1d | 3,582 | py | Python | tests/test_chall_resp.py | bannsec/rex | e7ae2322b299face9a1209a4ce3f097a5f9522e1 | [
"BSD-2-Clause"
] | 1 | 2018-07-06T00:40:14.000Z | 2018-07-06T00:40:14.000Z | tests/test_chall_resp.py | bannsec/rex | e7ae2322b299face9a1209a4ce3f097a5f9522e1 | [
"BSD-2-Clause"
] | null | null | null | tests/test_chall_resp.py | bannsec/rex | e7ae2322b299face9a1209a4ce3f097a5f9522e1 | [
"BSD-2-Clause"
] | 1 | 2019-12-08T07:02:56.000Z | 2019-12-08T07:02:56.000Z | import rex
import angr
import nose
from rex.trace_additions import FormatInfoIntToStr, FormatInfoStrToInt
import os
bin_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries-private'))
def _do_pov_test(pov, enable_randomness=True):
""" Test a POV """
for _ in range(10):
... | 44.222222 | 118 | 0.726968 |
79db194400414fbacc28d617ee4295717c2ebbb3 | 528 | py | Python | notification_api/views/general.py | LandRegistry/dps-notification-api | 0ebf7e78df096c0ea8fe4fa15e61551ee75448ac | [
"MIT"
] | null | null | null | notification_api/views/general.py | LandRegistry/dps-notification-api | 0ebf7e78df096c0ea8fe4fa15e61551ee75448ac | [
"MIT"
] | null | null | null | notification_api/views/general.py | LandRegistry/dps-notification-api | 0ebf7e78df096c0ea8fe4fa15e61551ee75448ac | [
"MIT"
] | 1 | 2021-04-11T05:22:04.000Z | 2021-04-11T05:22:04.000Z | from flask import current_app, request, Blueprint, Response
import json
# This is the blueprint object that gets registered into the app in blueprints.py.
general = Blueprint('general', __name__)
@general.route("/health")
def check_status():
return Response(response=json.dumps({
"app": current_app.config... | 33 | 82 | 0.683712 |
ba659cfa29b51c1fa28ebafca0ed686fef77f4ac | 6,200 | py | Python | deepr/examples/movielens/jobs/build_records.py | Jasputtar/deepr | e887a3b2c55e7e760ca61f8c99978a8284834ac8 | [
"Apache-2.0"
] | 50 | 2020-05-19T17:29:44.000Z | 2022-01-15T20:50:50.000Z | deepr/examples/movielens/jobs/build_records.py | Jasputtar/deepr | e887a3b2c55e7e760ca61f8c99978a8284834ac8 | [
"Apache-2.0"
] | 75 | 2020-05-20T16:53:37.000Z | 2022-01-12T15:53:46.000Z | deepr/examples/movielens/jobs/build_records.py | Jasputtar/deepr | e887a3b2c55e7e760ca61f8c99978a8284834ac8 | [
"Apache-2.0"
] | 17 | 2020-05-25T13:23:03.000Z | 2022-02-21T11:22:08.000Z | """Build MovieLens dataset as TFRecords."""
import logging
import random
from typing import List, Dict, Tuple, Callable
from functools import partial
from dataclasses import dataclass
import tensorflow as tf
import deepr
from deepr.examples.movielens.utils import fields
try:
import pandas as pd
except ImportErr... | 36.25731 | 116 | 0.667742 |
00cdb3f9d695b1df6abd79dbadc1005956c52287 | 20,423 | py | Python | src/son/monitor/monitor.py | dang03/son-cli | 3e29322d4556f3e02f7b15c43c5e66a1e7e07bd3 | [
"Apache-2.0"
] | 4 | 2017-02-08T22:50:28.000Z | 2018-05-29T07:29:47.000Z | src/son/monitor/monitor.py | dang03/son-cli | 3e29322d4556f3e02f7b15c43c5e66a1e7e07bd3 | [
"Apache-2.0"
] | 81 | 2016-07-19T13:55:12.000Z | 2021-05-07T15:03:05.000Z | src/son/monitor/monitor.py | dang03/son-cli | 3e29322d4556f3e02f7b15c43c5e66a1e7e07bd3 | [
"Apache-2.0"
] | 13 | 2016-07-19T13:33:19.000Z | 2019-04-25T08:04:15.000Z | """
Copyright (c) 2015 SONATA-NFV
ALL RIGHTS RESERVED.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in... | 39.199616 | 191 | 0.679577 |
137a7d94db7b2ecad9ea45884465884c07f6a43a | 36 | py | Python | SQLtime/__init__.py | nishitm/SQLtime | c0b9d433f20594e49cc649f33445ef40ebcff96c | [
"MIT"
] | null | null | null | SQLtime/__init__.py | nishitm/SQLtime | c0b9d433f20594e49cc649f33445ef40ebcff96c | [
"MIT"
] | null | null | null | SQLtime/__init__.py | nishitm/SQLtime | c0b9d433f20594e49cc649f33445ef40ebcff96c | [
"MIT"
] | null | null | null | from SQLtime.sqltime import sqltime
| 18 | 35 | 0.861111 |
8c012f175879d4dded2a336fae80bc2be04d01dc | 737 | py | Python | setup.py | fcavani/jupyterhub-authenticator | dc3ed2e5278f5331a3c804beecec6f0a6e6d7f16 | [
"Apache-2.0"
] | 1 | 2020-12-05T13:03:22.000Z | 2020-12-05T13:03:22.000Z | setup.py | fcavani/jupyterhub-authenticator | dc3ed2e5278f5331a3c804beecec6f0a6e6d7f16 | [
"Apache-2.0"
] | null | null | null | setup.py | fcavani/jupyterhub-authenticator | dc3ed2e5278f5331a3c804beecec6f0a6e6d7f16 | [
"Apache-2.0"
] | null | null | null | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os.path
readme = ''
here = os.path.abspath(os.path.dirname(__file__))
readme_path = os.path.join(here, 'README.md')
if os.path.exists(readme_path):
with open(readme_path, 'rb') as stream:
readme = stream... | 24.566667 | 59 | 0.675712 |
8fd0a70ef0e31b70818ff415c013fb2cdeb4cfee | 20,550 | py | Python | flux_combined_high_binding/model_814.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_combined_high_binding/model_814.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_combined_high_binding/model_814.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', '... | 95.138889 | 798 | 0.804136 |
c52c03ece9bb35d633c71d970ee81d7df0bc2235 | 2,091 | py | Python | networking_bigswitch/plugins/bigswitch/utils.py | haphan/networking-bigswitch | db321ee4e561c6d3b96f67c485b50490bfce9346 | [
"Apache-2.0"
] | null | null | null | networking_bigswitch/plugins/bigswitch/utils.py | haphan/networking-bigswitch | db321ee4e561c6d3b96f67c485b50490bfce9346 | [
"Apache-2.0"
] | null | null | null | networking_bigswitch/plugins/bigswitch/utils.py | haphan/networking-bigswitch | db321ee4e561c6d3b96f67c485b50490bfce9346 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Big Switch Networks, 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... | 36.051724 | 78 | 0.636538 |
a34569d8728aa85b2054b00bee5d3a0e35417e41 | 4,987 | py | Python | baal/transformers_trainer_wrapper.py | llv22/baal_tf2.4_mac | 6eed225f8b57e61d8d16b1868ea655384c566700 | [
"Apache-2.0"
] | 575 | 2019-09-30T20:44:28.000Z | 2022-03-27T17:39:22.000Z | baal/transformers_trainer_wrapper.py | llv22/baal_tf2.4_mac | 6eed225f8b57e61d8d16b1868ea655384c566700 | [
"Apache-2.0"
] | 84 | 2019-10-01T15:58:55.000Z | 2022-03-28T13:27:32.000Z | baal/transformers_trainer_wrapper.py | llv22/baal_tf2.4_mac | 6eed225f8b57e61d8d16b1868ea655384c566700 | [
"Apache-2.0"
] | 51 | 2019-10-08T23:05:39.000Z | 2022-02-14T22:13:27.000Z | from typing import Optional, List, Sequence
import numpy as np
import structlog
from tqdm import tqdm
# These packages are optional and not needed for BaaL main package.
try:
from transformers import Trainer
except ImportError:
raise ImportError(
"`transformers` library is required to use this module."... | 39.896 | 100 | 0.635452 |
ce4091f2d3ef9ea30db26a86297804327e1534fe | 4,386 | py | Python | voice1.py | miaoyinnu/- | 039251f08398ebd18847e44bf8fd07e1178b5688 | [
"MIT"
] | null | null | null | voice1.py | miaoyinnu/- | 039251f08398ebd18847e44bf8fd07e1178b5688 | [
"MIT"
] | null | null | null | voice1.py | miaoyinnu/- | 039251f08398ebd18847e44bf8fd07e1178b5688 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pygame,re,time,itertools,random,threading,tkinter.messagebox,pyttsx3,tkinter
# Font来创建字体
from tkinter import * # 引入字体模块
import tkinter.font as tkFont
engine = pyttsx3.init()
root = tkinter.Tk() #建立一个root object
var = tkinter.StringVar()
pygame.mixer.init()
rate= 115
rate1=int(str(rate... | 25.5 | 433 | 0.611263 |
1de06fa2b599002fe5da0365742090f458e4b1e1 | 18,927 | py | Python | esphomeyaml/pins.py | dreed47/esphomeyaml | 9890a51c5136c356c2cc7f14a3ab8fe547bbb72a | [
"MIT"
] | 2 | 2020-12-03T17:38:24.000Z | 2021-03-10T04:11:44.000Z | esphomeyaml/pins.py | dreed47/esphomeyaml | 9890a51c5136c356c2cc7f14a3ab8fe547bbb72a | [
"MIT"
] | null | null | null | esphomeyaml/pins.py | dreed47/esphomeyaml | 9890a51c5136c356c2cc7f14a3ab8fe547bbb72a | [
"MIT"
] | null | null | null | from __future__ import division
import logging
import voluptuous as vol
import esphomeyaml.config_validation as cv
from esphomeyaml.const import CONF_INVERTED, CONF_MODE, CONF_NUMBER, CONF_PCF8574
from esphomeyaml.core import CORE
from esphomeyaml.cpp_types import Component, esphomelib_ns, io_ns
_LOGGER = logging.g... | 43.8125 | 100 | 0.529984 |
407551f20f084e617407d2978c8e052735289fd8 | 1,201 | py | Python | portal/filters.py | ansonpinhero/Shepherd | f600b11c5e37d87126b3cc596d9640b82d28711c | [
"MIT"
] | null | null | null | portal/filters.py | ansonpinhero/Shepherd | f600b11c5e37d87126b3cc596d9640b82d28711c | [
"MIT"
] | null | null | null | portal/filters.py | ansonpinhero/Shepherd | f600b11c5e37d87126b3cc596d9640b82d28711c | [
"MIT"
] | null | null | null | import django_filters
from django import forms
from .models import CustomUser , Profile, Request ,volunteer_invitations
class UserFilter(django_filters.FilterSet):
fields = ['first_name', 'last_name','username','user_type','email']
class Meta:
model = CustomUser
fields = {
'first_... | 29.292683 | 128 | 0.52373 |
12c6c96ee23f1fd9ceae3598b0d84fa44aa277c8 | 5,267 | py | Python | tools/sources/post_harvey.py | jasmcaus/aws-disaster-response-ml | 5b0c3feedfa848e99d3487cb9024589e17d49af1 | [
"MIT"
] | 1 | 2022-02-21T19:33:02.000Z | 2022-02-21T19:33:02.000Z | tools/sources/post_harvey.py | jasmcaus/aws-disaster-response-ml | 5b0c3feedfa848e99d3487cb9024589e17d49af1 | [
"MIT"
] | null | null | null | tools/sources/post_harvey.py | jasmcaus/aws-disaster-response-ml | 5b0c3feedfa848e99d3487cb9024589e17d49af1 | [
"MIT"
] | null | null | null | harvey_urls = [
"https://opendata.digitalglobe.com/events/hurricane-harvey/post-event/2017-08-29/1040010030BE1200/1040010030BE1200.tif",
"https://opendata.digitalglobe.com/events/hurricane-harvey/post-event/2017-08-29/1040010031C9C900/1040010031C9C900.tif",
"https://opendata.digitalglobe.com/events/hurrican... | 119.704545 | 124 | 0.807481 |
137cb70f475994b733ee466107225669db34275d | 468 | py | Python | k8s_client/consts.py | QARancher/k8s_client | b290caa5db12498ed9fbb2c972ab20141ff2c401 | [
"Unlicense"
] | null | null | null | k8s_client/consts.py | QARancher/k8s_client | b290caa5db12498ed9fbb2c972ab20141ff2c401 | [
"Unlicense"
] | 4 | 2020-05-05T14:42:33.000Z | 2020-05-10T08:15:28.000Z | k8s_client/consts.py | QARancher/k8s_client | b290caa5db12498ed9fbb2c972ab20141ff2c401 | [
"Unlicense"
] | null | null | null | import os
DEFAULT_NAMESPACE = "default"
WAIT_TIMEOUT = 60
COMPLETE_STATE = "Completed"
ERROR_STATE = "Error"
AUTHENTICATION_EXCEPTION = "unauthorized"
PULLING_EXCEPTION = "pull access denied"
PULLING_FAIL = "Failed to pull"
CREATED_SUCCESSFULLY = "Started container"
REPLICAS_THRESHOLD = 1
DEFAULT_MAX_THREADS = 20
KEY... | 29.25 | 69 | 0.777778 |
5cba51bef3a4f1b97d76044e53f1dcb3e8f09e87 | 7,124 | py | Python | tests/controller/test_containerController.py | AssaelDan/asn1editor | 8f4917ffe8c5fb8a4925c28239268583cbb6e742 | [
"MIT"
] | 5 | 2021-02-09T08:57:37.000Z | 2022-03-05T09:23:39.000Z | tests/controller/test_containerController.py | Groops78/asn1editor | 1c386b3a34bcfccd97b80aa29c0ce4cfcb81853f | [
"MIT"
] | 24 | 2020-08-03T09:57:03.000Z | 2022-03-25T10:23:31.000Z | tests/controller/test_containerController.py | Groops78/asn1editor | 1c386b3a34bcfccd97b80aa29c0ce4cfcb81853f | [
"MIT"
] | 2 | 2020-12-22T21:15:59.000Z | 2021-12-22T15:26:55.000Z | from unittest import TestCase
from asn1editor.controller import Controller
from asn1editor.controller import Converter
from tests.controller.test_listController import TestListInstanceFactory
from tests.controller.test_valueBoolControllers import TestValueInterface, TestOptionalInterface
class TestListInstanceFactor... | 45.96129 | 129 | 0.70817 |
81f7ce7ccdad53005bbffae945eea7baa38c4e9d | 2,768 | py | Python | application.py | andreas-wilm/russell-usb | 2099952688d3388de6705c26efb9240dda314de3 | [
"MIT"
] | null | null | null | application.py | andreas-wilm/russell-usb | 2099952688d3388de6705c26efb9240dda314de3 | [
"MIT"
] | null | null | null | application.py | andreas-wilm/russell-usb | 2099952688d3388de6705c26efb9240dda314de3 | [
"MIT"
] | null | null | null | """
Quick and dirty webapp for visit time tracking for the Microsoft Tech Lab Bus Tour 2019
Run with FLASK_APP=application.py flask run
See requirements.txt for dependencies.
"""
# standard library
from datetime import datetime, timezone
import sys
import os
import logging
# third party imports
from flask import Fl... | 29.763441 | 131 | 0.685694 |
a1cc5d2a5ea7b5e2aa399d8b4c21844c0de370d9 | 308 | py | Python | advent_of_code_2021/template_module.py | acviana/Advent-of-Code-2021 | 98a87afd14f430868bd71d0714dd396208505a5d | [
"MIT"
] | null | null | null | advent_of_code_2021/template_module.py | acviana/Advent-of-Code-2021 | 98a87afd14f430868bd71d0714dd396208505a5d | [
"MIT"
] | null | null | null | advent_of_code_2021/template_module.py | acviana/Advent-of-Code-2021 | 98a87afd14f430868bd71d0714dd396208505a5d | [
"MIT"
] | null | null | null | from typing import List
def load_data() -> List[str]:
with open("inputs/day_X_input.txt") as f:
return [item.strip() for item in f.readlines()]
def parse_data(data: List[str]):
pass
def main() -> None:
data = load_data()
parse_data(data)
if __name__ == "__main__":
main()
| 15.4 | 55 | 0.623377 |
eb7859c4161f5ef77652b909222a44a100d662e4 | 3,153 | py | Python | helloworld/settings.py | fasdacombr/ProjCRUD | dd9bf5094499dce78c6c620f72fc193f61086643 | [
"MIT"
] | null | null | null | helloworld/settings.py | fasdacombr/ProjCRUD | dd9bf5094499dce78c6c620f72fc193f61086643 | [
"MIT"
] | null | null | null | helloworld/settings.py | fasdacombr/ProjCRUD | dd9bf5094499dce78c6c620f72fc193f61086643 | [
"MIT"
] | null | null | null | """
Django settings for helloworld project.
Generated by 'django-admin startproject' using Django 3.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os... | 25.427419 | 91 | 0.695211 |
b7c700be1a82669087410d9241778816aefb61f0 | 21,130 | py | Python | training/coach.py | YoungjuNa-KR/encoder4editing | f3d29ab60614344945f0c157ed96e8d4a077f624 | [
"MIT"
] | null | null | null | training/coach.py | YoungjuNa-KR/encoder4editing | f3d29ab60614344945f0c157ed96e8d4a077f624 | [
"MIT"
] | null | null | null | training/coach.py | YoungjuNa-KR/encoder4editing | f3d29ab60614344945f0c157ed96e8d4a077f624 | [
"MIT"
] | 1 | 2022-01-26T04:06:57.000Z | 2022-01-26T04:06:57.000Z | import os
import random
import matplotlib
import matplotlib.pyplot as plt
matplotlib.use('Agg')
import torch
from torch import nn, autograd
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter
import torch.nn.functional as F
from utils import common, train_utils
from criteria imp... | 45.246253 | 174 | 0.61027 |
b2c7f42a23958b4d8487dc6b6c51f65464dbad76 | 1,595 | py | Python | lang/py/pylib/code/shutil/shutil_copy2.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | 13 | 2020-01-04T07:37:38.000Z | 2021-08-31T05:19:58.000Z | lang/py/pylib/code/shutil/shutil_copy2.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | 3 | 2020-06-05T22:42:53.000Z | 2020-08-24T07:18:54.000Z | lang/py/pylib/code/shutil/shutil_copy2.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | 9 | 2020-10-19T04:53:06.000Z | 2021-08-31T05:20:01.000Z | #!/usr/bin/env python
#
# Copyright 2007 Doug Hellmann.
#
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in all
# copies and tha... | 31.9 | 70 | 0.751724 |
c9fa40bfea09aaf6eb0832c2f87fb8cc870381f3 | 668 | py | Python | tests/integration_tests/points_tests/test_copy.py | synapticarbors/wagyu | b98354611dceda8888f2951e9704f843a4e88c27 | [
"MIT"
] | 1 | 2021-01-20T05:49:13.000Z | 2021-01-20T05:49:13.000Z | tests/integration_tests/points_tests/test_copy.py | synapticarbors/wagyu | b98354611dceda8888f2951e9704f843a4e88c27 | [
"MIT"
] | 1 | 2020-11-20T18:21:24.000Z | 2020-11-20T18:21:37.000Z | tests/integration_tests/points_tests/test_copy.py | synapticarbors/wagyu | b98354611dceda8888f2951e9704f843a4e88c27 | [
"MIT"
] | 2 | 2020-11-20T18:17:31.000Z | 2021-01-20T14:58:22.000Z | import copy
from hypothesis import given
from tests.integration_tests.utils import (BoundPortedPointsPair,
are_bound_ported_points_equal)
from . import strategies
@given(strategies.points_pairs)
def test_shallow(points_pair: BoundPortedPointsPair) -> None:
bound, porte... | 29.043478 | 77 | 0.70509 |
b65c68083f34d43965843bd168f5f3825c5174dd | 977 | py | Python | app/modules/webview_element.py | embian-inc/Appium-Python-Console | bb15ac441d713a0be4a8e6fee61ca54cf6fc7614 | [
"MIT"
] | 8 | 2017-09-25T05:46:53.000Z | 2022-02-04T14:42:57.000Z | app/modules/webview_element.py | embian-inc/Appium-Python-Console | bb15ac441d713a0be4a8e6fee61ca54cf6fc7614 | [
"MIT"
] | null | null | null | app/modules/webview_element.py | embian-inc/Appium-Python-Console | bb15ac441d713a0be4a8e6fee61ca54cf6fc7614 | [
"MIT"
] | 2 | 2018-11-28T19:16:20.000Z | 2022-02-04T14:39:15.000Z | # -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
class WebviewElement(object):
def __init__(self, element):
self.element = element
#bs4 node의 methods
def has_attr(self, attr):
if attr == 'hashcode':
return True
return attr in self.element
... | 21.23913 | 48 | 0.600819 |
9f2ea8315969be00301e6a58c9b33ead67e468ae | 242 | py | Python | pythontips/admin.py | thevetdoctor/pythontips | 2d2d9b9cece7673ac6d3d2c42134d46f6998e07c | [
"MIT"
] | null | null | null | pythontips/admin.py | thevetdoctor/pythontips | 2d2d9b9cece7673ac6d3d2c42134d46f6998e07c | [
"MIT"
] | null | null | null | pythontips/admin.py | thevetdoctor/pythontips | 2d2d9b9cece7673ac6d3d2c42134d46f6998e07c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
# Register your models here.
from .models import Tip
from .models import Link
admin.site.register(Tip)
admin.site.register(Link)
| 18.615385 | 40 | 0.727273 |
13e13dbfe6cb2a6bb3b3c4c892a91fe4796d4c19 | 250 | py | Python | manage.py | Jevenwill/voyager | 1066420bc32ce8861d4d74730c116091e36ac0ee | [
"Apache-2.0"
] | null | null | null | manage.py | Jevenwill/voyager | 1066420bc32ce8861d4d74730c116091e36ac0ee | [
"Apache-2.0"
] | null | null | null | manage.py | Jevenwill/voyager | 1066420bc32ce8861d4d74730c116091e36ac0ee | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "voyager.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 22.727273 | 71 | 0.772 |
9fa70ee3d95053a556f18ae8e0b35bc833b435f1 | 112 | py | Python | tests/settings_content_gfk.py | contentoolsraushan/contentools-raushan-raj | 3205e72c4a18249adc5c7fd4058540e1ba92a55d | [
"BSD-3-Clause"
] | 1 | 2016-11-16T02:34:00.000Z | 2016-11-16T02:34:00.000Z | tests/settings_content_gfk.py | contentoolsraushan/contentools-raushan-raj | 3205e72c4a18249adc5c7fd4058540e1ba92a55d | [
"BSD-3-Clause"
] | 5 | 2015-12-01T17:39:25.000Z | 2017-07-13T06:27:15.000Z | tests/settings_content_gfk.py | contentoolsraushan/contentools-raushan-raj | 3205e72c4a18249adc5c7fd4058540e1ba92a55d | [
"BSD-3-Clause"
] | 1 | 2020-06-12T09:54:55.000Z | 2020-06-12T09:54:55.000Z | from settings import * # flake8: noqa
INSTALLED_APPS.append('content_gfk')
ROOT_URLCONF = 'content_gfk.urls'
| 18.666667 | 38 | 0.767857 |
d0da6b43126db0c6ae094fa83f850b364a5928a9 | 4,136 | py | Python | pkgs/filetransferutils-pkg/setup.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 94 | 2018-04-30T20:29:15.000Z | 2022-03-29T13:40:31.000Z | pkgs/filetransferutils-pkg/setup.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 67 | 2018-12-06T21:08:09.000Z | 2022-03-29T18:00:46.000Z | pkgs/filetransferutils-pkg/setup.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 49 | 2018-06-29T18:59:03.000Z | 2022-03-10T02:07:59.000Z | #! /bin/env python
'''Setup file for Libs
See:
https://packaging.python.org/en/latest/distributing.html
'''
import re
import os
from setuptools import setup, find_packages, Command
def read(*paths):
'''read and return txt content of file'''
with open(os.path.join(os.path.dirname(__file__), *paths)) as f... | 30.865672 | 84 | 0.634671 |
a70980860f0eb6b797b0c27e2bcc87c43cb79e39 | 253 | py | Python | slides/code/interlude_01_1.py | letstrythat/scientificpython | 522bd70d66e4d985e5c22b1dc25b75f208910bb7 | [
"MIT"
] | null | null | null | slides/code/interlude_01_1.py | letstrythat/scientificpython | 522bd70d66e4d985e5c22b1dc25b75f208910bb7 | [
"MIT"
] | null | null | null | slides/code/interlude_01_1.py | letstrythat/scientificpython | 522bd70d66e4d985e5c22b1dc25b75f208910bb7 | [
"MIT"
] | null | null | null | import doctest
import math
def area(x: float) -> float:
"""Computes the area of an equilateral triangle.
>>> area(2)
1.7320508075688772
"""
return x * x * math.sqrt(3) / 4
if __name__ == "__main__":
print(doctest.testmod())
| 15.8125 | 52 | 0.616601 |
0635d648d16aa9331032f0c2d2422bfd795d8033 | 2,563 | py | Python | src/main.py | PrakharChelawat/naarad | 974ca44eaaf01e3b635287babb05e5c611e6aaf7 | [
"MIT"
] | 2 | 2019-05-15T05:39:19.000Z | 2019-06-27T06:40:39.000Z | src/main.py | PrakharChelawat/naarad | 974ca44eaaf01e3b635287babb05e5c611e6aaf7 | [
"MIT"
] | 27 | 2019-05-10T20:14:22.000Z | 2021-06-02T00:01:42.000Z | src/main.py | PrakharChelawat/naarad | 974ca44eaaf01e3b635287babb05e5c611e6aaf7 | [
"MIT"
] | 12 | 2019-05-11T10:42:59.000Z | 2019-12-04T20:03:06.000Z | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
import time
from time import sleep
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import ex... | 32.858974 | 94 | 0.634023 |
4f28fcb03ef118fb29e5814a29ad002fbb22219d | 16,465 | py | Python | salt/pillar/git_pillar.py | konradstarzyk/salt | 9ef4bb3b464661480cb7c455186870cdfc640f0d | [
"Apache-2.0"
] | null | null | null | salt/pillar/git_pillar.py | konradstarzyk/salt | 9ef4bb3b464661480cb7c455186870cdfc640f0d | [
"Apache-2.0"
] | null | null | null | salt/pillar/git_pillar.py | konradstarzyk/salt | 9ef4bb3b464661480cb7c455186870cdfc640f0d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Use a git repository as a Pillar source
---------------------------------------
.. note::
This external pillar has been rewritten for the :doc:`2015.8.0
</topics/releases/2015.8.0>` release. The old method of configuring this
external pillar will be maintained for a couple relea... | 33.878601 | 79 | 0.629213 |
9935e1731f7b16c7803e75d0a8af69a6915a3f0e | 9,408 | py | Python | files/Utilities/AutoDMG.app/Contents/Resources/IEDUpdateCache.py | samdoran/ansible-role-macos-server | a401b8d10914fd6208e681b971204184e6fab7e2 | [
"MIT"
] | null | null | null | files/Utilities/AutoDMG.app/Contents/Resources/IEDUpdateCache.py | samdoran/ansible-role-macos-server | a401b8d10914fd6208e681b971204184e6fab7e2 | [
"MIT"
] | null | null | null | files/Utilities/AutoDMG.app/Contents/Resources/IEDUpdateCache.py | samdoran/ansible-role-macos-server | a401b8d10914fd6208e681b971204184e6fab7e2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# IEDUpdateCache.py
# AutoDMG
#
# Created by Per Olofsson on 2013-10-22.
# Copyright 2013-2014 Per Olofsson, University of Gothenburg. All rights reserved.
#
from Foundation import *
import os
import hashlib
from IEDLog import LogDebug, LogInfo, LogNotice, LogWarning, LogError, LogMessag... | 42.763636 | 126 | 0.561331 |
16b3f55c80da983c7743a6c9bcb8c87fc68e5a7c | 934 | py | Python | root/open_nix.py | akash-sr12/python-desktop-assistant | 3863ad9104e112c85ccfa18f944b442206c2405d | [
"MIT"
] | null | null | null | root/open_nix.py | akash-sr12/python-desktop-assistant | 3863ad9104e112c85ccfa18f944b442206c2405d | [
"MIT"
] | null | null | null | root/open_nix.py | akash-sr12/python-desktop-assistant | 3863ad9104e112c85ccfa18f944b442206c2405d | [
"MIT"
] | null | null | null | # (c) 2020 - Akash Sarkar
# open_nix
import sys
sys.path.insert(0, 'E:/Projects/Python/myAssistant/nixAssistant/root/common/')
import os
import speak_nix as nix
import sr_nix as sr
def applications(input):
if 'open word' in query or 'open ms word' in query or 'ms word' in query:
nix.spe... | 34.592593 | 117 | 0.627409 |
87b7e477f6e679866db110d810c787e75f236815 | 17,304 | py | Python | python/mm/path_inference_private/proj_templates.py | tjhunter/phd-thesis-tjhunter | 8238e156b5dba9940bdda2a46cfffb62699f364d | [
"Apache-2.0"
] | 1 | 2018-03-25T11:36:21.000Z | 2018-03-25T11:36:21.000Z | python/mm/path_inference_private/proj_templates.py | tjhunter/phd-thesis-tjhunter | 8238e156b5dba9940bdda2a46cfffb62699f364d | [
"Apache-2.0"
] | null | null | null | python/mm/path_inference_private/proj_templates.py | tjhunter/phd-thesis-tjhunter | 8238e156b5dba9940bdda2a46cfffb62699f364d | [
"Apache-2.0"
] | null | null | null | import logging
from build import data_path
__author__ = 'tjhunter'
'''
Created on Sep 23, 2011
@author: tjhunter
'''
import os
import re
# pylint: disable=W0402
from string import Template
import gzip
import logging
import simplejson as json
def get_data_dir():
if 'DATA_DIR' in os.environ:
s = os.environ['DA... | 31.692308 | 141 | 0.671521 |
c1dee56d1e22279443b31072d950063e490454ee | 5,042 | py | Python | rltf/memory/replay_buffer.py | psFournier/rltf | aae5451415dc18deda3c0c84580df42a12dc3843 | [
"MIT"
] | 90 | 2018-05-02T17:15:52.000Z | 2021-11-09T08:53:44.000Z | rltf/memory/replay_buffer.py | arita37/rltf | d56714494f73e53ed4b41d6376d942332b406885 | [
"MIT"
] | 1 | 2019-10-01T11:41:53.000Z | 2019-12-08T15:38:53.000Z | rltf/memory/replay_buffer.py | arita37/rltf | d56714494f73e53ed4b41d6376d942332b406885 | [
"MIT"
] | 25 | 2018-01-14T16:56:44.000Z | 2021-11-09T08:53:48.000Z | import threading
import numpy as np
from rltf.memory import BaseBuffer
from rltf.utils import seeding
class ReplayBuffer(BaseBuffer):
"""Uniform replay buffer. Supports both image observations and low-level
observations
"""
def __init__(self, size, state_shape, obs_dtype, act_shape, act_dtype, obs_len=1,... | 34.772414 | 103 | 0.690004 |
74c847151c4f15514676f014b0ce028d73a118cf | 46,700 | py | Python | src/ptvsd/_vendored/pydevd/tests_python/debugger_unittest.py | MinKPark/ptvsd | 202ee9912590f1b66aac23134a82ea1a825628d5 | [
"MIT"
] | 1 | 2019-05-21T00:05:35.000Z | 2019-05-21T00:05:35.000Z | src/ptvsd/_vendored/pydevd/tests_python/debugger_unittest.py | MinKPark/ptvsd | 202ee9912590f1b66aac23134a82ea1a825628d5 | [
"MIT"
] | null | null | null | src/ptvsd/_vendored/pydevd/tests_python/debugger_unittest.py | MinKPark/ptvsd | 202ee9912590f1b66aac23134a82ea1a825628d5 | [
"MIT"
] | null | null | null | from collections import namedtuple
from contextlib import contextmanager
import json
try:
from urllib import quote, quote_plus, unquote_plus
except ImportError:
from urllib.parse import quote, quote_plus, unquote_plus # @UnresolvedImport
import re
import socket
import subprocess
import threading
import time
i... | 37.389912 | 168 | 0.588887 |
9fd50b269c91b0206c2e4d7d071466dc4085646c | 1,230 | py | Python | e3.py | afroebel/bootcamp | 9819ddb66cce5a3d21d1ecade37f737197eb9255 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | e3.py | afroebel/bootcamp | 9819ddb66cce5a3d21d1ecade37f737197eb9255 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | e3.py | afroebel/bootcamp | 9819ddb66cce5a3d21d1ecade37f737197eb9255 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from e3_2 import *
# Part A: load data
wt_lac = np.loadtxt('data/wt_lac.csv', delimiter = ',', skiprows=3)
q18m_lac = np.loadtxt('data/q18m_lac.csv', delimiter = ',', skiprows=3)
q18a_lac = np.loadtxt('data/q18a_lac.csv', delimiter = ',', skiprows=3)
#wt
iptg0 = wt_l... | 30.75 | 81 | 0.679675 |
dfc4b6a53d32c5bd554347e785ba33c1cf137269 | 14,861 | py | Python | experiments_update/training/ROLO_step1_train_30_exp2.py | marcpasfatou/ROLO | 32137cbe749320c9b2aff6c8cc4d954b013f779c | [
"Apache-2.0"
] | 3 | 2017-12-01T22:20:41.000Z | 2019-04-23T13:56:06.000Z | experiments_update/training/ROLO_step1_train_30_exp2.py | marcpasfatou/ROLO | 32137cbe749320c9b2aff6c8cc4d954b013f779c | [
"Apache-2.0"
] | null | null | null | experiments_update/training/ROLO_step1_train_30_exp2.py | marcpasfatou/ROLO | 32137cbe749320c9b2aff6c8cc4d954b013f779c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) <2016> <GUANGHAN NING>. 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 ... | 42.704023 | 209 | 0.603391 |
6d8b160fa8b5f5f29baab503d9c9c11e676f65e9 | 99 | py | Python | constants/ResponseStatus.py | wudinaonao/FlaskMark12306Captcha | c03550dc5583b435192f220f871c71cabadd3e39 | [
"Apache-2.0"
] | 1 | 2020-07-21T06:41:07.000Z | 2020-07-21T06:41:07.000Z | constants/ResponseStatus.py | wudinaonao/FlaskMark12306Captcha | c03550dc5583b435192f220f871c71cabadd3e39 | [
"Apache-2.0"
] | 6 | 2020-11-13T18:45:19.000Z | 2022-03-12T00:22:18.000Z | constants/ResponseStatus.py | wudinaonao/FlaskMark12306Captcha | c03550dc5583b435192f220f871c71cabadd3e39 | [
"Apache-2.0"
] | null | null | null | from enum import Enum
class ResponseStatus(Enum):
SUCCESS = "success"
FAILED = "failed"
| 12.375 | 27 | 0.676768 |
a977b8acbf4ab8e54c343a1933cdd75b8b587d76 | 2,679 | py | Python | rest/accounts_handler.py | sanskarkatiyar/thingsIO | 79377a148aa1bd04e432b877ee28bbc536891cf5 | [
"MIT"
] | null | null | null | rest/accounts_handler.py | sanskarkatiyar/thingsIO | 79377a148aa1bd04e432b877ee28bbc536891cf5 | [
"MIT"
] | null | null | null | rest/accounts_handler.py | sanskarkatiyar/thingsIO | 79377a148aa1bd04e432b877ee28bbc536891cf5 | [
"MIT"
] | null | null | null | import os
import redis
import uuid
import hashlib
from werkzeug.security import check_password_hash
from werkzeug.security import generate_password_hash
# TODO: Make operations, transactional, if possible.
class accounts_handler:
def __init__(self, redisHost=None):
if redisHost is None:
self... | 24.577982 | 75 | 0.52221 |
1938e26f8a79073e71fd27a68d3a17e6759df13f | 708 | py | Python | prettyqt/positioning/geoshape.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 7 | 2019-05-01T01:34:36.000Z | 2022-03-08T02:24:14.000Z | prettyqt/positioning/geoshape.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 141 | 2019-04-16T11:22:01.000Z | 2021-04-14T15:12:36.000Z | prettyqt/positioning/geoshape.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 5 | 2019-04-17T11:48:19.000Z | 2021-11-21T10:30:19.000Z | from __future__ import annotations
from prettyqt.qt import QtPositioning
from prettyqt.utils import bidict
SHAPE_TYPES = bidict(
unknown=QtPositioning.QGeoShape.ShapeType.UnknownType,
rectangle=QtPositioning.QGeoShape.ShapeType.RectangleType,
circle=QtPositioning.QGeoShape.ShapeType.CircleType,
path=... | 28.32 | 64 | 0.766949 |
deb9d9ffe25dd8eb814e84459f49a59bcc9ad8ed | 897 | py | Python | Python/PathSum2.py | Jspsun/LEETCodePractice | 9dba8c0441201a188b93e4d39a0a9b7602857a5f | [
"MIT"
] | 3 | 2017-10-14T19:49:28.000Z | 2019-01-12T21:51:11.000Z | Python/PathSum2.py | Jspsun/LEETCodePractice | 9dba8c0441201a188b93e4d39a0a9b7602857a5f | [
"MIT"
] | null | null | null | Python/PathSum2.py | Jspsun/LEETCodePractice | 9dba8c0441201a188b93e4d39a0a9b7602857a5f | [
"MIT"
] | 5 | 2017-02-06T19:10:23.000Z | 2020-12-19T01:58:10.000Z | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def pathSum(self, root, sum):
"""
:type root: TreeNode
:type sum: int
:rtype: List[List... | 27.181818 | 71 | 0.545151 |
50095b002ddcf4a36fa41b2c5a0382821b7cb685 | 439 | py | Python | originbar.py | lamter/importfut | cf9887c77e586e949f92f4e54a635df39c6a2a66 | [
"MIT"
] | 2 | 2020-05-17T03:31:03.000Z | 2022-02-07T03:46:31.000Z | originbar.py | lamter/importfut | cf9887c77e586e949f92f4e54a635df39c6a2a66 | [
"MIT"
] | null | null | null | originbar.py | lamter/importfut | cf9887c77e586e949f92f4e54a635df39c6a2a66 | [
"MIT"
] | 2 | 2021-06-02T03:41:33.000Z | 2022-02-07T03:46:36.000Z | import logging
import os
class OriginBar(object):
"""
原始数据实例
"""
def __init__(self, year, path):
self.log = logging.getLogger('root')
self.year = year
self.path = path
self.symbol = os.path.split(path)[-1].strip('.csv')
def __str__(self):
s = object.__str_... | 19.954545 | 67 | 0.537585 |
dcdcd6ad7cf81979c372f82ea31b963b88d8f6bb | 1,920 | py | Python | helper_scripts/watershed_params/logmassratio/get_lmr_parallel.py | mahdiqezlou/LyTomo-Watershed | 76940101c6cc46cd7f1b2622f72c198f55a45251 | [
"MIT"
] | 1 | 2022-03-08T23:18:49.000Z | 2022-03-08T23:18:49.000Z | helper_scripts/watershed_params/logmassratio/get_lmr_parallel.py | mahdiqezlou/LyTomo-Watershed | 76940101c6cc46cd7f1b2622f72c198f55a45251 | [
"MIT"
] | 3 | 2022-02-12T22:25:12.000Z | 2022-02-18T06:22:30.000Z | helper_scripts/watershed_params/logmassratio/get_lmr_parallel.py | mahdiqezlou/LyTomo-Watershed | 76940101c6cc46cd7f1b2622f72c198f55a45251 | [
"MIT"
] | null | null | null | ## A parallel code to get peaks and label maps for a sequence of logmassratio parameters in minima.py
from mpi4py import MPI
import numpy as np
import time
import h5py
import argparse
def runit(lmr0):
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
size = comm.Get_size()
tss = time.asctime()
print('Rank =... | 32.542373 | 109 | 0.667708 |
2dce88a3f5d4f5916835654f5642cf86b8999eaf | 24,076 | py | Python | paddlespeech/text/speechtask/punctuation_restoration/training/trainer.py | gongel/DeepSpeech | 84ea04638622dcd6a5e2fef8bf2edd50b90f4f52 | [
"Apache-2.0"
] | null | null | null | paddlespeech/text/speechtask/punctuation_restoration/training/trainer.py | gongel/DeepSpeech | 84ea04638622dcd6a5e2fef8bf2edd50b90f4f52 | [
"Apache-2.0"
] | null | null | null | paddlespeech/text/speechtask/punctuation_restoration/training/trainer.py | gongel/DeepSpeech | 84ea04638622dcd6a5e2fef8bf2edd50b90f4f52 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.92638 | 115 | 0.586476 |
1454e1d54857e0465a90d4f492e99d2898ec4a23 | 1,177 | py | Python | pysrc/tup2int.py | m0n0ph1/xed | d5d801e3413c9d792e2b2381235b4eaf823b3d22 | [
"Apache-2.0"
] | 1 | 2021-09-29T02:16:42.000Z | 2021-09-29T02:16:42.000Z | pysrc/tup2int.py | m0n0ph1/xed | d5d801e3413c9d792e2b2381235b4eaf823b3d22 | [
"Apache-2.0"
] | null | null | null | pysrc/tup2int.py | m0n0ph1/xed | d5d801e3413c9d792e2b2381235b4eaf823b3d22 | [
"Apache-2.0"
] | 2 | 2018-12-30T03:48:57.000Z | 2021-03-25T22:57:54.000Z | #!/usr/bin/env python
# -*- python -*-
#BEGIN_LEGAL
#
#Copyright (c) 2016 Intel 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-... | 33.628571 | 75 | 0.700085 |
47589b780184a37b0f4fea43f5d39c4a3f6ddf3b | 985 | py | Python | mmdet/models/detectors/faster_rcnn.py | youshyee/Greatape-Detection | 333b63d8f76538659bcd2bc6022128830a7a435b | [
"Apache-2.0"
] | 1 | 2019-09-22T16:47:16.000Z | 2019-09-22T16:47:16.000Z | mmdet/models/detectors/faster_rcnn.py | youshyee/Greatape-Detection | 333b63d8f76538659bcd2bc6022128830a7a435b | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/faster_rcnn.py | youshyee/Greatape-Detection | 333b63d8f76538659bcd2bc6022128830a7a435b | [
"Apache-2.0"
] | null | null | null | from .two_stage import TwoStageDetector
from ..registry import DETECTORS
@DETECTORS.register_module
class FasterRCNN(TwoStageDetector):
def __init__(self,
backbone,
rpn_head,
bbox_roi_extractor,
bbox_head,
train_cfg,
... | 28.970588 | 50 | 0.532995 |
986b5b5485631713ad328167b6d0af452f28d70a | 619 | py | Python | mayan/apps/permissions/permissions.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | 1 | 2021-06-17T18:24:25.000Z | 2021-06-17T18:24:25.000Z | mayan/apps/permissions/permissions.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | 7 | 2020-06-06T00:01:04.000Z | 2022-01-13T01:47:17.000Z | mayan/apps/permissions/permissions.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | 1 | 2020-07-29T21:03:27.000Z | 2020-07-29T21:03:27.000Z | from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from . import PermissionNamespace
namespace = PermissionNamespace(label=_('Permissions'), name='permissions')
permission_role_create = namespace.add_permission(
label=_('Create roles'), name='role_cr... | 29.47619 | 75 | 0.781906 |
bba99fec8259a908d01ccd91383e73f04395f546 | 8,021 | py | Python | setup.py | mkniewallner/mypy | e1c03ab0f37495ef4072892778ab126d04860814 | [
"PSF-2.0"
] | null | null | null | setup.py | mkniewallner/mypy | e1c03ab0f37495ef4072892778ab126d04860814 | [
"PSF-2.0"
] | null | null | null | setup.py | mkniewallner/mypy | e1c03ab0f37495ef4072892778ab126d04860814 | [
"PSF-2.0"
] | null | null | null | #!/usr/bin/env python
import glob
import os
import os.path
import sys
if sys.version_info < (3, 6, 0):
sys.stderr.write("ERROR: You need Python 3.6 or later to use mypy.\n")
exit(1)
# we'll import stuff from the source tree, let's ensure is on the sys path
sys.path.insert(0, os.path.dirname(os.path.realpath(... | 36.963134 | 95 | 0.60379 |
449c89da1fed6eb2b29f3613ac06688740e24982 | 61,688 | py | Python | pyextra/acados_template/acados_ocp_solver.py | moreno7798/openpilot-1 | 1a41ce3db293729a0491f757092f0c02ded66ff5 | [
"MIT"
] | 73 | 2017-10-28T20:52:31.000Z | 2022-03-05T21:41:34.000Z | pyextra/acados_template/acados_ocp_solver.py | moreno7798/openpilot-1 | 1a41ce3db293729a0491f757092f0c02ded66ff5 | [
"MIT"
] | 2 | 2018-12-12T20:47:04.000Z | 2021-10-03T12:08:42.000Z | pyextra/acados_template/acados_ocp_solver.py | moreno7798/openpilot-1 | 1a41ce3db293729a0491f757092f0c02ded66ff5 | [
"MIT"
] | 24 | 2017-11-03T13:26:36.000Z | 2022-01-15T16:09:55.000Z | # -*- coding: future_fstrings -*-
#
# Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,
# Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,
# Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,
# Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Di... | 43.626591 | 174 | 0.652007 |
90cf2ebfde4d14994d0b24c523bffa8807600fbc | 518 | py | Python | app/config.py | justinycho-business/battleships | e53f7dc8fa5af36d417d7694e07f9b20397f093e | [
"MIT"
] | null | null | null | app/config.py | justinycho-business/battleships | e53f7dc8fa5af36d417d7694e07f9b20397f093e | [
"MIT"
] | null | null | null | app/config.py | justinycho-business/battleships | e53f7dc8fa5af36d417d7694e07f9b20397f093e | [
"MIT"
] | null | null | null | import os
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY')
SQLALCHEMY_TRACK_MODIFICATIONS = False
# SQLAlchemy 1.4 no longer supports url strings that start with 'postgres'
# (only 'postgresql') but heroku's postgres add-on automatically sets the
# url in the hidden config vars to start wit... | 37 | 78 | 0.716216 |
c57b3b48a7f05a907889624003c00ec011bcdead | 12,552 | py | Python | models/r_net.py | z00bean/uml-NLP-project-R-net-1 | d48a3c11c49d62da45c92bb7f4034ec0001fd4e6 | [
"MIT"
] | 1 | 2019-03-09T07:14:51.000Z | 2019-03-09T07:14:51.000Z | models/r_net.py | z00bean/R-net-1 | d48a3c11c49d62da45c92bb7f4034ec0001fd4e6 | [
"MIT"
] | null | null | null | models/r_net.py | z00bean/R-net-1 | d48a3c11c49d62da45c92bb7f4034ec0001fd4e6 | [
"MIT"
] | null | null | null | import torch
from torch import nn
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from modules.attention import AttentionPooling
from modules.recurrent import RNN, AttentionEncoder, AttentionEncoderCell, StackedCell
from utils.dataset import Documents
def pack_residual(x_pack, y_pack):
x_... | 49.417323 | 125 | 0.659337 |
70d8e127e24509818e8c63f197197da7e8c85092 | 592 | py | Python | course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/main.py | lukeconibear/machine-learning-engineering-for-production-public | a7fc3eda7405116db598532743aa8297009f9e38 | [
"Apache-2.0"
] | null | null | null | course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/main.py | lukeconibear/machine-learning-engineering-for-production-public | a7fc3eda7405116db598532743aa8297009f9e38 | [
"Apache-2.0"
] | null | null | null | course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/main.py | lukeconibear/machine-learning-engineering-for-production-public | a7fc3eda7405116db598532743aa8297009f9e38 | [
"Apache-2.0"
] | null | null | null | import pickle
import numpy as np
from typing import List
from fastapi import FastAPI
from pydantic import BaseModel, conlist
# COD
app = FastAPI(title="Predicting Wine Class with batching")
# Open classifier in global scope
with open("models/wine-95-fixed.pkl", "rb") as file:
clf = pickle.load(file)
class Wine... | 22.769231 | 71 | 0.726351 |
8eff62038c64a1878762b9d213521d0058d9df57 | 410 | py | Python | 7_pythonmodule.py | joshcorr/PythonforPowerShellUsers | 3e7a7c1828976741bc59574c63084900f81b32eb | [
"MIT"
] | 3 | 2020-10-16T02:43:44.000Z | 2020-10-16T16:46:28.000Z | 7_pythonmodule.py | joshcorr/PythonforPowerShellUsers | 3e7a7c1828976741bc59574c63084900f81b32eb | [
"MIT"
] | null | null | null | 7_pythonmodule.py | joshcorr/PythonforPowerShellUsers | 3e7a7c1828976741bc59574c63084900f81b32eb | [
"MIT"
] | 1 | 2020-10-16T16:46:30.000Z | 2020-10-16T16:46:30.000Z | """
This is a test module
"""
# Doc strings are rendered in help(pythonmodule)
# this can be imported using import pythonmodule from shell
# This is a statement
def powershell_python():
"""Prints a string for example"""
print('This is a function')
# duner name shows us how the module was imported
# is your ... | 24.117647 | 59 | 0.72439 |
ccc4b31a9f1956f1dad07f46913e7c6bcf6b0d15 | 1,130 | py | Python | sentiment_discovery/model/run.py | dadelani/sentiment-discovery | 0cbfc5f6345dacbf52f1f806a9e136a61ca35cf8 | [
"BSD-3-Clause"
] | 2 | 2019-04-24T08:23:54.000Z | 2020-06-24T10:25:34.000Z | sentiment_discovery/model/run.py | mikekestemont/sentiment-discovery | 84bf39846ddf6b099d99318214a013269b5b0e61 | [
"BSD-3-Clause"
] | null | null | null | sentiment_discovery/model/run.py | mikekestemont/sentiment-discovery | 84bf39846ddf6b099d99318214a013269b5b0e61 | [
"BSD-3-Clause"
] | 1 | 2020-10-27T19:38:41.000Z | 2020-10-27T19:38:41.000Z | from torch.autograd import Variable
def run_model(model, data_iter, data_fn):
"""runs a model over a given dataset"""
for data in data_iter:
data_dict = data_fn(data)
#if model is on gpu, but not vanilla data parallel
if model.using_cuda and not (model.data_parallel and not model.distributed):
#move... | 32.285714 | 89 | 0.697345 |
b2920586a92dbdefdf8237b1a6a95aba287bdf04 | 14,339 | py | Python | autotest/gdrivers/l1b.py | dtusk/gdal1 | 30dcdc1eccbca2331674f6421f1c5013807da609 | [
"MIT"
] | 3 | 2017-01-12T10:18:56.000Z | 2020-03-21T16:42:55.000Z | autotest/gdrivers/l1b.py | ShinNoNoir/gdal-1.11.5-vs2015 | 5d544e176a4c11f9bcd12a0fe66f97fd157824e6 | [
"MIT"
] | null | null | null | autotest/gdrivers/l1b.py | ShinNoNoir/gdal-1.11.5-vs2015 | 5d544e176a4c11f9bcd12a0fe66f97fd157824e6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test read/write functionality for L1B driver.
# Author: Even Rouault <even dot rouault at mines dash paris dot org>
#
####################... | 48.11745 | 2,917 | 0.680382 |
62058e75c2faee32f1dcf40795de7bf7a5e9602c | 5,622 | py | Python | uq_benchmark_2019/cifar/data_lib.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | uq_benchmark_2019/cifar/data_lib.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | uq_benchmark_2019/cifar/data_lib.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | 35.1375 | 80 | 0.726788 |
a4f4529ab624955333b5aaadb43dbbc8a459ef58 | 8,956 | py | Python | engine.py | akshitac8/OW-DETR | 9d6705f059a1eb51ea6edfa26ee624abeb67c775 | [
"Apache-2.0"
] | 7 | 2022-03-29T22:38:05.000Z | 2022-03-30T11:47:00.000Z | engine.py | akshitac8/OW-DETR | 9d6705f059a1eb51ea6edfa26ee624abeb67c775 | [
"Apache-2.0"
] | null | null | null | engine.py | akshitac8/OW-DETR | 9d6705f059a1eb51ea6edfa26ee624abeb67c775 | [
"Apache-2.0"
] | null | null | null | # ------------------------------------------------------------------------
# Deformable DETR
# Copyright (c) 2020 SenseTime. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 [see LICENSE for details]
# ------------------------------------------------------------------------
# Modified from DETR (ht... | 45.005025 | 163 | 0.648057 |
4a1a729c1854a3240bbc870f7d4eb2fb9b5858cc | 14,922 | py | Python | O365/event.py | BDeliers/python-o365 | 24bf6d8aa82b00b02faf9a5d1d790481d19991b7 | [
"Apache-2.0"
] | null | null | null | O365/event.py | BDeliers/python-o365 | 24bf6d8aa82b00b02faf9a5d1d790481d19991b7 | [
"Apache-2.0"
] | null | null | null | O365/event.py | BDeliers/python-o365 | 24bf6d8aa82b00b02faf9a5d1d790481d19991b7 | [
"Apache-2.0"
] | null | null | null | from O365.contact import Contact
from O365.group import Group
from O365.connection import Connection
import logging
import json
import requests
import time
log = logging.getLogger(__name__)
class Event( object ):
'''
Class for managing the creation and manipluation of events in a calendar.
Methods:
create -- Cr... | 32.940397 | 131 | 0.704798 |
4a2d3af4817299c0ae66f2102a66439cd81d30bd | 6,305 | py | Python | data/voc0712_cityperson.py | LeBronPrince/SSD | b4fd3d4b648a1566a90f152505cc946afc0794a1 | [
"MIT"
] | null | null | null | data/voc0712_cityperson.py | LeBronPrince/SSD | b4fd3d4b648a1566a90f152505cc946afc0794a1 | [
"MIT"
] | null | null | null | data/voc0712_cityperson.py | LeBronPrince/SSD | b4fd3d4b648a1566a90f152505cc946afc0794a1 | [
"MIT"
] | null | null | null | """VOC Dataset Classes
Original author: Francisco Massa
https://github.com/fmassa/vision/blob/voc_dataset/torchvision/datasets/voc.py
Updated by: Ellis Brown, Max deGroot
"""
from .config import HOME
import os.path as osp
import sys
import torch
import torch.utils.data as data
import cv2
import numpy as np
if sys.ver... | 35.027778 | 81 | 0.601427 |
08ef26e5438cc20f147fc0731316e605d67ab3c7 | 394 | py | Python | tests/app/externalOutages/test_getReasonId.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | tests/app/externalOutages/test_getReasonId.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | 21 | 2021-01-08T18:03:32.000Z | 2021-02-02T16:17:34.000Z | tests/app/externalOutages/test_getReasonId.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | import unittest
from src.appConfig import initAppConfig
from src.app.externalOutages.getReasonId import getReasonId
class TestGetReasonId(unittest.TestCase):
def test_run(self) -> None:
"""tests the function that gets the reason Id
"""
appConf = initAppConfig()
reasId = getReasonId... | 30.307692 | 62 | 0.692893 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.