hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73310a540329d6e3f8052ced13dd752fb5b2d724 | 14,881 | py | Python | Lib/site-packages/wx-3.0-msw/wx/tools/Editra/src/ed_theme.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 5 | 2019-03-11T14:30:31.000Z | 2021-12-04T14:11:54.000Z | Lib/site-packages/wx-3.0-msw/wx/tools/Editra/src/ed_theme.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | Lib/site-packages/wx-3.0-msw/wx/tools/Editra/src/ed_theme.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | ###############################################################################
# Name: ed_theme.py #
# Purpose: Icon theme management for Editra #
# Author: Cody Precord <cprecord@editra.org> #
... | 35.515513 | 79 | 0.563605 |
7331500268e0c2957e33bc0000d20b28b9cbf73b | 5,111 | py | Python | code/estimators.py | calrencet/redditnews | bebc206ffa0ccdc9132a554d7a50efe89ea02765 | [
"Apache-2.0"
] | null | null | null | code/estimators.py | calrencet/redditnews | bebc206ffa0ccdc9132a554d7a50efe89ea02765 | [
"Apache-2.0"
] | null | null | null | code/estimators.py | calrencet/redditnews | bebc206ffa0ccdc9132a554d7a50efe89ea02765 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
from sklearn.model_selection import GridSearchCV
class EstimatorChecker:
def __init__(self, estimators, params):
"""
Initialize an instance of the class.
Inputs: `models`: The dictionary of estimators to use (e.g. {'etc': ExtraTreesClassifier(), 'rfc... | 49.621359 | 212 | 0.612405 |
73315a4e8a184072ce85f5bb77bb88c504cd5665 | 10,070 | py | Python | app-configurations/sublime/Sublime Text 3/Backup/20170807084451/mdpopups/st3/mdpopups/mdx/magiclink.py | michaelDomingues/osx-configurations | e5648012dc5358f3712aa33495de1a05c9dc1655 | [
"MIT"
] | 182 | 2017-03-05T07:43:13.000Z | 2022-03-15T13:09:07.000Z | app-configurations/sublime/Sublime Text 3/Backup/20170807084451/mdpopups/st3/mdpopups/mdx/magiclink.py | michaelDomingues/osx-configurations | e5648012dc5358f3712aa33495de1a05c9dc1655 | [
"MIT"
] | 1 | 2017-06-05T01:25:36.000Z | 2019-09-09T22:23:52.000Z | app-configurations/sublime/Sublime Text 3/Backup/20170807084451/mdpopups/st3/mdpopups/mdx/magiclink.py | michaelDomingues/osx-configurations | e5648012dc5358f3712aa33495de1a05c9dc1655 | [
"MIT"
] | 16 | 2017-03-07T11:01:27.000Z | 2022-01-08T09:21:01.000Z | """
Magic Link.
pymdownx.magiclink
An extension for Python Markdown.
Find http|ftp links and email address and turn them to actual links
MIT license.
Copyright (c) 2014 - 2017 Isaac Muse <isaacmuse@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associate... | 38.880309 | 112 | 0.55005 |
7331b13667a2554d0e43155835d8a6544a09797e | 1,980 | py | Python | setup.py | trianglegrrl/twp | e074127106dc745ce512fd5d684d1dbafe54a4ee | [
"MIT"
] | null | null | null | setup.py | trianglegrrl/twp | e074127106dc745ce512fd5d684d1dbafe54a4ee | [
"MIT"
] | null | null | null | setup.py | trianglegrrl/twp | e074127106dc745ce512fd5d684d1dbafe54a4ee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tableau Workbook SQL Extract Tool"""
import codecs
import os
import re
from setuptools import setup, find_packages
NAME = 'twp'
HERE = os.path.dirname(os.path.abspath(__file__))
def read(filename):
"""Load file contents from setup.py path."""
filepath = os.path.j... | 29.117647 | 73 | 0.584343 |
7331bb50e5c755d1a7082637fee92a4941803180 | 5,076 | py | Python | src/hdusd/export/light.py | kant/BlenderUSDHydraAddon | 6ff6c65b45054582e2c0806f341eeaa9d676ed9b | [
"Apache-2.0"
] | null | null | null | src/hdusd/export/light.py | kant/BlenderUSDHydraAddon | 6ff6c65b45054582e2c0806f341eeaa9d676ed9b | [
"Apache-2.0"
] | null | null | null | src/hdusd/export/light.py | kant/BlenderUSDHydraAddon | 6ff6c65b45054582e2c0806f341eeaa9d676ed9b | [
"Apache-2.0"
] | null | null | null | #**********************************************************************
# Copyright 2020 Advanced Micro Devices, 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.o... | 35.006897 | 108 | 0.654846 |
7331c406c9739a1cf93a7fe57339612f9949289d | 1,181 | py | Python | StreamPy/ML/ExamplesML/meetup_new.py | AnomalyInc/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | 2 | 2017-04-27T11:04:27.000Z | 2019-02-07T21:03:32.000Z | StreamPy/ML/ExamplesML/meetup_new.py | StreamPy/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | null | null | null | StreamPy/ML/ExamplesML/meetup_new.py | StreamPy/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | null | null | null | if __name__ == '__main__':
if __package__ is None:
import sys
from os import path
sys.path.append(path.dirname(path.dirname(path.dirname(path.abspath(__file__)))))
from ML import Stream_Learn, KMeans, Geomap
from ML.KMeans import kmeans
from Stream import Stream
import requests
import json... | 28.119048 | 96 | 0.630821 |
7332325d01c505789c93d39e65ea5bb96d3b3374 | 2,803 | py | Python | exeteracovid/processing/parsing_schemas.py | deng113jie/ExeTeraCovid | ee9ec90983d7c2c711962c7fe9ac25251392e41b | [
"Apache-2.0"
] | 3 | 2021-03-23T14:23:06.000Z | 2021-12-29T16:54:42.000Z | exeteracovid/processing/parsing_schemas.py | deng113jie/ExeTeraCovid | ee9ec90983d7c2c711962c7fe9ac25251392e41b | [
"Apache-2.0"
] | 29 | 2021-02-22T12:12:53.000Z | 2021-09-27T10:52:25.000Z | exeteracovid/processing/parsing_schemas.py | deng113jie/ExeTeraCovid | ee9ec90983d7c2c711962c7fe9ac25251392e41b | [
"Apache-2.0"
] | 1 | 2021-03-08T15:00:30.000Z | 2021-03-08T15:00:30.000Z | # Copyright 2020 KCL-BMEIS - King's College London
# 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... | 41.220588 | 119 | 0.689262 |
7332bb17f6f414748f1c2e29ab73fd82c56d1d11 | 886 | py | Python | setup.py | gebauerm/rapidFlow | 3aefcda3821a8891d40081460dd20d2876e3773d | [
"MIT"
] | 1 | 2022-01-03T14:51:02.000Z | 2022-01-03T14:51:02.000Z | setup.py | gebauerm/rapidFlow | 3aefcda3821a8891d40081460dd20d2876e3773d | [
"MIT"
] | 1 | 2022-02-04T13:22:18.000Z | 2022-02-04T16:17:56.000Z | setup.py | gebauerm/rapidFlow | 3aefcda3821a8891d40081460dd20d2876e3773d | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
URL = "https://github.com/gebauerm/rapidFlow"
__version__ = "0.1.7"
install_requires = [
"optuna>=2.9.1",
"click>=8.0.1", "scikit-learn", "scipy", "networkx>=2.5.1", "psycopg2-binary", "docker>=5.0.3",
"pandas", "tqdm>=4.62.3"],
test_require = ["py... | 28.580645 | 103 | 0.667043 |
7332ccc667bef4c16feb1b2f030a17aa222cc5a3 | 2,995 | py | Python | PyInstaller/__init__.py | BA7JCM/pyinstaller | 51ff689509391921bdce42848f3a077dcbb40ca0 | [
"Apache-2.0"
] | null | null | null | PyInstaller/__init__.py | BA7JCM/pyinstaller | 51ff689509391921bdce42848f3a077dcbb40ca0 | [
"Apache-2.0"
] | null | null | null | PyInstaller/__init__.py | BA7JCM/pyinstaller | 51ff689509391921bdce42848f3a077dcbb40ca0 | [
"Apache-2.0"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2005-2022, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt... | 45.378788 | 118 | 0.700501 |
73332031aa4d97862bb4e7d1366001e899f59713 | 13,901 | py | Python | python/tvm/intrin.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 1 | 2019-08-13T09:01:54.000Z | 2019-08-13T09:01:54.000Z | python/tvm/intrin.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | null | null | null | python/tvm/intrin.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 1 | 2019-05-01T16:57:15.000Z | 2019-05-01T16:57:15.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 u... | 22.13535 | 87 | 0.606575 |
73334e795c0f87147b42c33997adb72ee9d9155e | 207 | py | Python | colosseumrl/envs/tron/__init__.py | carletonz/colosseumrl | 878f0459731511d716672aee8a5adafcb96cf0a7 | [
"MIT"
] | 8 | 2019-06-04T00:22:30.000Z | 2022-02-14T15:27:17.000Z | colosseumrl/envs/tron/__init__.py | carletonz/colosseumrl | 878f0459731511d716672aee8a5adafcb96cf0a7 | [
"MIT"
] | 1 | 2019-07-23T03:32:59.000Z | 2019-07-23T06:16:35.000Z | colosseumrl/envs/tron/__init__.py | carletonz/colosseumrl | 878f0459731511d716672aee8a5adafcb96cf0a7 | [
"MIT"
] | 3 | 2020-01-13T08:09:27.000Z | 2021-11-14T01:30:25.000Z | from .TronGridEnvironment import TronGridEnvironment
from .TronGridClientEnvironment import TronGridClientEnvironment
from .TronRllibEnvironment import TronRllibEnvironment
from .TronRender import TronRender | 51.75 | 64 | 0.908213 |
73335da3a57d688f0c915de9e51f84ab27b71df7 | 313 | py | Python | app/catalog/templatetags/catalog_extras.py | yayunl/llfselfhelp | 55994003ad51e1664a733c84ed6afcb9f28b6499 | [
"MIT"
] | null | null | null | app/catalog/templatetags/catalog_extras.py | yayunl/llfselfhelp | 55994003ad51e1664a733c84ed6afcb9f28b6499 | [
"MIT"
] | 4 | 2021-04-08T21:37:08.000Z | 2021-09-22T19:31:17.000Z | app/catalog/templatetags/catalog_extras.py | yayunl/llfselfhelp | 55994003ad51e1664a733c84ed6afcb9f28b6499 | [
"MIT"
] | null | null | null | from django import template
register = template.Library()
@register.filter
def absolute_create_url(obj):
"""
Access model's meta data on template.
:param obj:
:return:
"""
return obj._meta.absolute_create_url
@register.filter
def class_name(value):
return value.__class__.__name__ | 17.388889 | 41 | 0.71246 |
7333615914cbe7c5ea62020c10adb3a0f7e98bda | 2,003 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/input_messages_filter_url.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/input_messages_filter_url.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/input_messages_filter_url.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 31.296875 | 103 | 0.635047 |
7333944fde051b2fa31c31b2e27c737177aa24e1 | 7,464 | py | Python | config/settings/production.py | PFdevelopment/locallibrary | 7e061a72d67d1bc89fa792850c7a699fec48dea9 | [
"MIT"
] | null | null | null | config/settings/production.py | PFdevelopment/locallibrary | 7e061a72d67d1bc89fa792850c7a699fec48dea9 | [
"MIT"
] | null | null | null | config/settings/production.py | PFdevelopment/locallibrary | 7e061a72d67d1bc89fa792850c7a699fec48dea9 | [
"MIT"
] | null | null | null | """
Production settings for LocalLibrary project.
- Use WhiteNoise for serving static files
- Use Amazon's S3 for storing uploaded media
- Use mailgun to send emails
- Use Redis for cache
- Use sentry for error logging
"""
import logging
from .base import * # noqa
# SECRET CONFIGURATION
# --------------------... | 34.555556 | 117 | 0.621919 |
73339edff0db0ff4a3744883c292280124126233 | 421 | py | Python | experiments/utils/header_attributes.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 3 | 2020-08-03T19:25:44.000Z | 2021-06-27T22:25:55.000Z | experiments/utils/header_attributes.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | null | null | null | experiments/utils/header_attributes.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 2 | 2020-08-07T22:54:28.000Z | 2021-02-18T06:11:01.000Z | from typing import List
TargetAttr = str
def get_header_attributes(abs_file_name: str) -> List[str]:
header_attributes: List[str]
with open(abs_file_name, 'r') as input_data_file:
header_line: str = input_data_file.readline()
header_line_without_line_break: str = header_line.replace('\n', '')... | 30.071429 | 75 | 0.729216 |
7333fdcdf7f5600b753ebed16c83219a44f2aeac | 2,582 | py | Python | python/graph/graph.py | jtpio/algo-toolbox | d0f675889889ad52d853d948b0191bbd14c1e9cd | [
"MIT"
] | null | null | null | python/graph/graph.py | jtpio/algo-toolbox | d0f675889889ad52d853d948b0191bbd14c1e9cd | [
"MIT"
] | null | null | null | python/graph/graph.py | jtpio/algo-toolbox | d0f675889889ad52d853d948b0191bbd14c1e9cd | [
"MIT"
] | null | null | null | from collections import defaultdict, deque
from heapq import heappush, heappop
class Graph:
'''
Very simple abstraction for undirected graphs.
The main purpose of this graph representation is to be able to edit it
quickly for custom needs.
Use Networkx for more advanced graphs.
The graph is s... | 27.763441 | 75 | 0.517816 |
73340360150a7c8798c4bbe5fcca9835278aed14 | 1,934 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_messaging/_executors/impl_blocking.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_messaging/_executors/impl_blocking.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_messaging/_executors/impl_blocking.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Red Hat, Inc.
# Copyright 2013 New Dream Network, LLC (DreamHost)
#
# 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.344828 | 78 | 0.675284 |
73340a0f90f131111e7b7fddf1d7633b7091f512 | 2,492 | py | Python | cathpy/core/datafiles.py | shouldsee/cathpy | 5f7fa1322434b2d254f0158c5840f029b12dbafe | [
"MIT"
] | 7 | 2019-04-15T19:18:44.000Z | 2022-02-07T20:43:45.000Z | cathpy/core/datafiles.py | shouldsee/cathpy | 5f7fa1322434b2d254f0158c5840f029b12dbafe | [
"MIT"
] | 14 | 2019-04-24T11:47:38.000Z | 2021-06-09T08:43:14.000Z | cathpy/core/datafiles.py | shouldsee/cathpy | 5f7fa1322434b2d254f0158c5840f029b12dbafe | [
"MIT"
] | 4 | 2019-04-15T16:32:12.000Z | 2021-03-05T02:54:51.000Z | """
Provides access to the location of CATH data files
"""
# core
import logging
import os
from cathpy.core.version import CathVersion
LOG = logging.getLogger(__name__)
class GenericFileType(object):
"""Represents a type of CATH Data file."""
type_id = None
path_parts = []
suffix = ''
class GcfF... | 24.194175 | 91 | 0.632825 |
733454ee39d485b2b0f487a6cd49352474e66ac9 | 4,654 | py | Python | ses_extract.py | ndvietbk/VIET_ARAIK | 7128bfdfbaeeb6bb0269eb872afc41e9c0e939ae | [
"MIT"
] | null | null | null | ses_extract.py | ndvietbk/VIET_ARAIK | 7128bfdfbaeeb6bb0269eb872afc41e9c0e939ae | [
"MIT"
] | null | null | null | ses_extract.py | ndvietbk/VIET_ARAIK | 7128bfdfbaeeb6bb0269eb872afc41e9c0e939ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2015 by Araik Tamazian
import argparse
import pandas as pd
import numpy as np
import progressbar as pbar
def parse_args():
"""
Parse command-line arguments.
"""
parser = argparse.ArgumentParser('Extract user sessions from log.')
parse... | 36.359375 | 96 | 0.593038 |
733492ee068cb4f640acf4d5dca3fadf8ec3f215 | 3,414 | py | Python | visionartificial/huMoments.py | AntiDesert5/Ingenieria-en-Computacion-UAEM | 02b5713ccd3752566d50d0d16fc7719a00d382f4 | [
"MIT"
] | 1 | 2021-08-16T19:44:08.000Z | 2021-08-16T19:44:08.000Z | visionartificial/huMoments.py | AntiDesert5/Ingenieria-en-Computacion-UAEM | 02b5713ccd3752566d50d0d16fc7719a00d382f4 | [
"MIT"
] | null | null | null | visionartificial/huMoments.py | AntiDesert5/Ingenieria-en-Computacion-UAEM | 02b5713ccd3752566d50d0d16fc7719a00d382f4 | [
"MIT"
] | null | null | null | from PIL import Image
import numpy
import math
image = Image.open("m.jpg")
np_im = numpy.array(image,dtype=numpy.int64)
imageWidth,imageHeight = image.size
imageArray =numpy.zeros((imageHeight,imageWidth),dtype=numpy.float64)
normalizeHuMoments = numpy.arange(7,dtype = numpy.float64)
def griyeCevir(imageHeigh... | 42.675 | 228 | 0.681605 |
73349c0b23244c85e6c9853ae9d8ca315404c0b7 | 1,431 | py | Python | test/test_pce_order.py | thj2009/gsMk | bae3da556afd976c12bbf7cfbbbc8f913e4fbb6d | [
"MIT"
] | 1 | 2021-08-23T13:42:29.000Z | 2021-08-23T13:42:29.000Z | test/test_pce_order.py | thj2009/gsMk | bae3da556afd976c12bbf7cfbbbc8f913e4fbb6d | [
"MIT"
] | null | null | null | test/test_pce_order.py | thj2009/gsMk | bae3da556afd976c12bbf7cfbbbc8f913e4fbb6d | [
"MIT"
] | null | null | null | import pytest
import numpy as np
from gsMk import PCE
def test_order1():
pce = PCE(nvar=3, nord=2)
orders = [[0, 0, 0],
[1, 0, 0],
[0, 1, 0],
[0, 0, 1],
[2, 0, 0],
[0, 2, 0],
[0, 0, 2],
[1, 1, 0],
[... | 23.080645 | 58 | 0.433263 |
7334aa1f22736a3949a70610ec86b6ec16885fec | 2,229 | py | Python | Kernel_Exploitation/HEVD/HEVD-ArbitraryWrite-Win7x86.py | dhn/OSEE | 9875d16edc09ac569681e325ef7dbfa0ba69cfbc | [
"BSD-3-Clause"
] | 152 | 2018-09-11T08:56:56.000Z | 2022-03-28T12:08:06.000Z | Kernel_Exploitation/HEVD/HEVD-ArbitraryWrite-Win7x86.py | dhn/OSEE | 9875d16edc09ac569681e325ef7dbfa0ba69cfbc | [
"BSD-3-Clause"
] | null | null | null | Kernel_Exploitation/HEVD/HEVD-ArbitraryWrite-Win7x86.py | dhn/OSEE | 9875d16edc09ac569681e325ef7dbfa0ba69cfbc | [
"BSD-3-Clause"
] | 46 | 2018-10-28T12:19:53.000Z | 2022-03-23T15:25:12.000Z | import os
from helper import *
from ctypes import *
def ioctl(function, devicetype = 0x00000022, access = 0x00000000, method = 0x00000003):
return ((devicetype << 16) | (access << 14) | (function << 2) | method)
def main():
HEVD_IOCTL_ARBITRARY_WRITE = ioctl(0x802)
lpFileName = "\\\\.\\HackSysExtremeVulnerableDriv... | 41.277778 | 87 | 0.611934 |
7334be5c0fb53498d8c83b171568f0b6348e3de0 | 860 | py | Python | python/sorngen_error.py | mbaerthel/sorngen | 835a2cf37e1788bf5b91ba77a8c4c52c29db5b70 | [
"MIT"
] | 1 | 2021-04-17T22:38:04.000Z | 2021-04-17T22:38:04.000Z | python/sorngen_error.py | mbaerthel/sorngen | 835a2cf37e1788bf5b91ba77a8c4c52c29db5b70 | [
"MIT"
] | null | null | null | python/sorngen_error.py | mbaerthel/sorngen | 835a2cf37e1788bf5b91ba77a8c4c52c29db5b70 | [
"MIT"
] | null | null | null | ##################################################################
##
## file: sorngen_error.py
##
## (c) 2018/2019 Jochen Rust
## University of Bremen
##
##################################################################
import sys
class ID():
INPUT_ARGS = 0
FILE_NOT_FOUND = 1
NO_EQUATI... | 25.294118 | 66 | 0.496512 |
7334c16e8c39192c3098d5f6dc7d7a1a022cf6e5 | 4,102 | py | Python | regolith/helper.py | MichaelTrumbull/regolith | 881f543cfa7bbf80b38ed2b357209c5bc009a6af | [
"CC0-1.0"
] | 7 | 2018-07-20T19:19:23.000Z | 2022-02-02T20:48:15.000Z | regolith/helper.py | MichaelTrumbull/regolith | 881f543cfa7bbf80b38ed2b357209c5bc009a6af | [
"CC0-1.0"
] | 822 | 2017-11-06T21:54:58.000Z | 2022-03-31T12:25:41.000Z | regolith/helper.py | MichaelTrumbull/regolith | 881f543cfa7bbf80b38ed2b357209c5bc009a6af | [
"CC0-1.0"
] | 43 | 2018-01-05T20:35:21.000Z | 2022-03-24T00:13:03.000Z | """Generic builder."""
from regolith.helpers import attestationshelper as attestations
from regolith.helpers import a_manurevhelper as a_manurev
from regolith.helpers import a_proprevhelper as a_proprev
from regolith.helpers import a_grppub_readlisthelper as a_gprl
from regolith.helpers import a_projectumhelper as a_p... | 59.449275 | 118 | 0.823988 |
7334c37fa3050bd588834a2025bdbff8d9516a43 | 157 | py | Python | srfnef/io/auto_load.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | srfnef/io/auto_load.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | srfnef/io/auto_load.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
'''
@author: Minghao Guo
@contact: mh.guo0111@gmail.com
@software: nef
@file: auto_load.py
@date: 7/8/2019
@desc:
'''
import srfnef as nef
| 14.272727 | 30 | 0.694268 |
733523947c61b1dbdbf3d81c5fa8290c4c588e0a | 1,889 | py | Python | src/ralph_scrooge/settings.py | kula1922/ralph_pricing | 3887ff7a900f10a7630f451dd39f86da829ce3da | [
"Apache-2.0"
] | null | null | null | src/ralph_scrooge/settings.py | kula1922/ralph_pricing | 3887ff7a900f10a7630f451dd39f86da829ce3da | [
"Apache-2.0"
] | null | null | null | src/ralph_scrooge/settings.py | kula1922/ralph_pricing | 3887ff7a900f10a7630f451dd39f86da829ce3da | [
"Apache-2.0"
] | null | null | null | import sys
# NFSEN (network) plugin default config
SSH_NFSEN_CREDENTIALS = {}
NFSEN_CHANNELS = []
NFSEN_CLASS_ADDRESS = []
NFSEN_FILES_PATH = ''
# Virtual Usages plugin default config
VIRTUAL_SERVICES = {}
# Shares plugin default config
SHARE_SERVICES = {}
# OpenStack
OPENSTACK_CEILOMETER = []
OPENSTACK_SIMPLE_USAG... | 21.712644 | 78 | 0.614082 |
73352c2ef6feab227c63e8c8b92dd59caa020cb7 | 11,660 | py | Python | game/game.py | 3CP-Studios/Space-Adventure | 82b829d3b382358bf8ce2581400da04b347729f4 | [
"MIT"
] | 3 | 2018-10-13T12:40:44.000Z | 2018-10-14T18:00:21.000Z | game/game.py | 3CP-Studios/Space-Adventure | 82b829d3b382358bf8ce2581400da04b347729f4 | [
"MIT"
] | 2 | 2018-10-13T20:01:24.000Z | 2018-10-14T11:16:23.000Z | game/game.py | 3CP-Studios/Space-Adventure | 82b829d3b382358bf8ce2581400da04b347729f4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import Game_lib.game
import threading
import pygame
from time import sleep as delay
import random
import numpy
from PIL import Image
default_speed=12
# define colors
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
YELLOW = (255, 255, 0)
spee... | 34.599407 | 175 | 0.69554 |
73354af9cf8f15f59a9596575136c61a21cf023b | 15,250 | py | Python | src/backend/sfm/routes/converters/github_functions.py | rropen/SFM | 48bb1dfa5979e2e142fd652ce653a771c9d8a6df | [
"MIT"
] | 3 | 2021-09-13T18:20:23.000Z | 2022-02-07T16:13:07.000Z | src/backend/sfm/routes/converters/github_functions.py | rropen/SFM | 48bb1dfa5979e2e142fd652ce653a771c9d8a6df | [
"MIT"
] | 48 | 2021-08-30T14:17:14.000Z | 2022-02-14T14:54:16.000Z | src/backend/sfm/routes/converters/github_functions.py | rropen/SFM | 48bb1dfa5979e2e142fd652ce653a771c9d8a6df | [
"MIT"
] | 1 | 2021-10-30T12:06:42.000Z | 2021-10-30T12:06:42.000Z | import json
import logging
from sfm.routes.work_items import crud as work_item_crud
from sfm.routes.commits import crud as commit_crud
from sfm.routes.projects import crud as project_crud
from sfm.models import (
WorkItem,
WorkItemUpdate,
WorkItemCreate,
ProjectCreate,
CommitCreate,
Project,
... | 35.798122 | 108 | 0.632393 |
73354fff67b2278ed7b90ec9b9448c18b069f35e | 613 | py | Python | solutions/linked-list-cycle.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | solutions/linked-list-cycle.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | 1 | 2022-02-22T15:42:54.000Z | 2022-02-25T00:10:04.000Z | solutions/linked-list-cycle.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | # Leetcode 141. Linked List Cycle
#
# Link: https://leetcode.com/problems/linked-list-cycle/
# Difficulty: Easy
# Complexity:
# O(N) time | where N represent the number of elements in the linked list
# O(1) space
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val... | 22.703704 | 75 | 0.619902 |
73356a3625c9a1aa15af5b6c1cf2ccb0c514b39a | 8,151 | py | Python | tensorflow/contrib/distributions/python/ops/vector_exponential_diag.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/distributions/python/ops/vector_exponential_diag.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/distributions/python/ops/vector_exponential_diag.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.376812 | 118 | 0.668139 |
73356cb375695cb0ac937226912cac9e87983e2a | 3,621 | py | Python | pytreex/block/t2a/cs/addappositionpunct.py | leotilli/pytreex | a40bfb9f33ffdb931993b30879830f1c898f1414 | [
"Apache-2.0"
] | 11 | 2015-06-24T08:41:44.000Z | 2021-09-02T21:12:10.000Z | pytreex/block/t2a/cs/addappositionpunct.py | leotilli/pytreex | a40bfb9f33ffdb931993b30879830f1c898f1414 | [
"Apache-2.0"
] | 4 | 2016-01-12T19:21:22.000Z | 2019-05-10T14:46:44.000Z | pytreex/block/t2a/cs/addappositionpunct.py | leotilli/pytreex | a40bfb9f33ffdb931993b30879830f1c898f1414 | [
"Apache-2.0"
] | 3 | 2016-01-22T11:54:11.000Z | 2019-04-30T17:09:55.000Z | #!/usr/bin/env python
# coding=utf-8
#
# A Treex block
#
from __future__ import unicode_literals
from pytreex.core.block import Block
from pytreex.core.exception import LoadingException
from pytreex.tool.lexicon.cs import Lexicon
import re
__author__ = "Ondřej Dušek"
__date__ = "2012"
class AddAppositionPunct(Block... | 40.233333 | 79 | 0.593206 |
73358ccd90c8b60640ccdf5206538de23a3e8436 | 228,170 | py | Python | instapy/instapy.py | iakrevetkho/PromoInsta | d37c4189fc81ce0667a96ae8cca23d7f6a057649 | [
"Apache-2.0"
] | null | null | null | instapy/instapy.py | iakrevetkho/PromoInsta | d37c4189fc81ce0667a96ae8cca23d7f6a057649 | [
"Apache-2.0"
] | null | null | null | instapy/instapy.py | iakrevetkho/PromoInsta | d37c4189fc81ce0667a96ae8cca23d7f6a057649 | [
"Apache-2.0"
] | null | null | null | """OS Modules environ method to get the setup vars from the Environment"""
# import built-in & third-party modules
import time
from datetime import datetime, timedelta
from math import ceil
import random
from sys import platform
from platform import python_version
import os
import csv
import json
import requests
from s... | 42.848826 | 144 | 0.437323 |
7335b5b3d2057847f366c03c3e4a8ac38d38e8f5 | 10,899 | py | Python | src/bloombox/schema/content/ProductContent_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 4 | 2018-01-23T20:13:11.000Z | 2018-07-28T22:36:09.000Z | src/bloombox/schema/content/ProductContent_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 159 | 2018-02-02T09:55:52.000Z | 2021-07-21T23:41:59.000Z | src/bloombox/schema/content/ProductContent_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 3 | 2018-01-23T20:13:15.000Z | 2020-01-17T01:07:53.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: content/ProductContent.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import refle... | 51.9 | 1,499 | 0.785118 |
7335e928d01c401fbca222011cd615640d25fddc | 215 | py | Python | conduit/tests/testing_utils.py | elenimath/saber | 71acab9798cf3aee1c4d64b09453e5234f8fdf1e | [
"Apache-2.0"
] | 12 | 2018-05-14T17:43:18.000Z | 2021-11-16T04:03:33.000Z | conduit/tests/testing_utils.py | elenimath/saber | 71acab9798cf3aee1c4d64b09453e5234f8fdf1e | [
"Apache-2.0"
] | 34 | 2019-05-06T19:13:36.000Z | 2021-05-06T19:12:35.000Z | conduit/tests/testing_utils.py | elenimath/saber | 71acab9798cf3aee1c4d64b09453e5234f8fdf1e | [
"Apache-2.0"
] | 3 | 2019-10-08T17:42:17.000Z | 2021-07-28T05:52:02.000Z | import yaml
def load_test_data(filename):
fileloc = os.path.dirname(__file__)
fn = os.path.join(fileloc, 'test_data', filename)
with open(fn) as fp:
test_data = yaml.load(fp)
return test_data | 30.714286 | 53 | 0.683721 |
733609cc9c48a890234e141127b6398f179c1c9d | 1,619 | py | Python | tests/views.py | uktrade/dit-thumber | e97d0c759d39bf330477e24b307c70233ac25f09 | [
"MIT"
] | 3 | 2017-02-17T23:43:59.000Z | 2021-05-25T23:53:11.000Z | tests/views.py | uktrade/dit-thumber | e97d0c759d39bf330477e24b307c70233ac25f09 | [
"MIT"
] | null | null | null | tests/views.py | uktrade/dit-thumber | e97d0c759d39bf330477e24b307c70233ac25f09 | [
"MIT"
] | null | null | null | from django.views.generic import FormView, TemplateView
from django.urls import reverse_lazy
from thumber.decorators import thumber_feedback
from .forms import ExampleForm
@thumber_feedback
class ExampleTemplateView(TemplateView):
def get_template_names(self):
return ['example.html']
def get_conte... | 23.463768 | 68 | 0.742434 |
733611b25c73b2d2da618e0eae8342f5d9bbb88f | 23,931 | py | Python | libqtile/config.py | airwoodix/qtile | 95ea620fb4c1b549fae3fc2f4162c6d33dc24f80 | [
"MIT"
] | 2 | 2015-01-03T02:25:19.000Z | 2015-02-07T19:16:06.000Z | libqtile/config.py | airwoodix/qtile | 95ea620fb4c1b549fae3fc2f4162c6d33dc24f80 | [
"MIT"
] | 1 | 2020-04-15T20:20:42.000Z | 2020-04-15T20:20:42.000Z | libqtile/config.py | zordsdavini/qtile | 571198aff5332e86ad156a8710d36d4507f43421 | [
"MIT"
] | 1 | 2015-01-22T15:53:01.000Z | 2015-01-22T15:53:01.000Z | # Copyright (c) 2012-2015 Tycho Andersen
# Copyright (c) 2013 xarvh
# Copyright (c) 2013 horsik
# Copyright (c) 2013-2014 roger
# Copyright (c) 2013 Tao Sauvage
# Copyright (c) 2014 ramnes
# Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 Adi Sieker
#
# Permission is hereby granted, free of charge, to any person obtai... | 32.692623 | 100 | 0.578204 |
73363ae3e947e44fe73b1580a29dd4a200fa355b | 3,938 | py | Python | configs/wxcs/retinanet_r50_fpn_1x_wxcs.py | mgnfcnt-ec/mmdet | 46647fba610dfb396569d7910058c707d67d4ec4 | [
"Apache-2.0"
] | 1 | 2022-03-01T02:46:52.000Z | 2022-03-01T02:46:52.000Z | configs/wxcs/retinanet_r50_fpn_1x_wxcs.py | mgnfcnt-ec/mmdet | 46647fba610dfb396569d7910058c707d67d4ec4 | [
"Apache-2.0"
] | null | null | null | configs/wxcs/retinanet_r50_fpn_1x_wxcs.py | mgnfcnt-ec/mmdet | 46647fba610dfb396569d7910058c707d67d4ec4 | [
"Apache-2.0"
] | null | null | null | model = dict(
type='RetinaNet',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style='pytorch',
init_cfg=dict(type='Pretrained',... | 28.128571 | 79 | 0.574911 |
7336900e0e7ca49a4f4799bec981bba65d5e9856 | 5,758 | py | Python | keccak.py | afknst/python-sha3 | 4c0e392e8b37f7d6e9fc89781ba6bef0a30e43cb | [
"MIT"
] | 1 | 2022-03-18T08:12:00.000Z | 2022-03-18T08:12:00.000Z | keccak.py | afknst/python-sha3 | 4c0e392e8b37f7d6e9fc89781ba6bef0a30e43cb | [
"MIT"
] | 1 | 2021-08-16T08:53:01.000Z | 2021-08-31T11:35:41.000Z | keccak.py | afknst/python-sha3 | 4c0e392e8b37f7d6e9fc89781ba6bef0a30e43cb | [
"MIT"
] | 1 | 2021-08-13T13:18:38.000Z | 2021-08-13T13:18:38.000Z | '''
Keccak SHA3 family under FIPS 202 standard.
'''
import sys
import numpy as np
BYTE_LENGTH = 8
PERMUTATION_WIDTHS = [25, 50, 100, 200, 400, 800, 1600]
PARAMETERS = {}
def init(_b=1600):
'''
Calculate w and l from given b and save in PARAMETERS.
'''
if _b not in PERMUTATION_WIDTHS:
print('... | 23.311741 | 79 | 0.449462 |
7336903dedf4f0cab56a110eb2aa3e765801bc2d | 243 | py | Python | maps/ravine/ravine.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | maps/ravine/ravine.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | maps/ravine/ravine.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | from map import Map
class Ravine(Map):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.name = 'ravine'
self.difficulty = 'expert'
self.page = 1
self.placement = [1, 1]
| 20.25 | 41 | 0.559671 |
733691e8d5b25610f48e8868a2bab423eb616041 | 72,971 | py | Python | twisted/web/client.py | sxamit/twisted | 30f6966329c857c3631c60aeb420d84d7828e01e | [
"MIT",
"Unlicense"
] | 1 | 2017-08-07T14:52:02.000Z | 2017-08-07T14:52:02.000Z | Lib/site-packages/twisted/web/client.py | adzhou/Python27 | a7113b69d54a04cc780143241c2f1fe81939ad3a | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/twisted/web/client.py | adzhou/Python27 | a7113b69d54a04cc780143241c2f1fe81939ad3a | [
"bzip2-1.0.6"
] | 1 | 2018-11-07T12:52:07.000Z | 2018-11-07T12:52:07.000Z | # -*- test-case-name: twisted.web.test.test_webclient,twisted.web.test.test_agent -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
HTTP client.
"""
from __future__ import division, absolute_import
import os
import warnings
try:
from urlparse import urlunparse, urljoin, urldefrag
e... | 33.565317 | 133 | 0.62507 |
73369f13f7d306b7aa474a517a128efc39e3fe44 | 1,039 | py | Python | tests/reactions/test_reaction_set.py | GENESIS-EFRC/reaction-network | 1482ac1b6b550a5bc9961e9210e33c86c07f64cf | [
"BSD-3-Clause-LBNL"
] | 29 | 2020-08-04T07:07:04.000Z | 2022-02-22T22:09:20.000Z | tests/reactions/test_reaction_set.py | GENESIS-EFRC/reaction-network | 1482ac1b6b550a5bc9961e9210e33c86c07f64cf | [
"BSD-3-Clause-LBNL"
] | 70 | 2021-02-22T07:01:40.000Z | 2022-03-31T20:11:56.000Z | tests/reactions/test_reaction_set.py | GENESIS-EFRC/reaction-network | 1482ac1b6b550a5bc9961e9210e33c86c07f64cf | [
"BSD-3-Clause-LBNL"
] | 3 | 2021-04-20T09:29:39.000Z | 2022-02-02T17:43:52.000Z | """ Tests for ReactionSet."""
from pathlib import Path
import pytest
from monty.serialization import loadfn
from pymatgen.core.composition import Element
from rxn_network.reactions.open import OpenComputedReaction
from rxn_network.reactions.reaction_set import ReactionSet
from rxn_network.costs.softplus import Softplu... | 28.861111 | 72 | 0.753609 |
7336a050aa98ebbee8252ec8e8be9a83c303fea4 | 4,935 | py | Python | tests/examples/ex_time_vis_chart.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | null | null | null | tests/examples/ex_time_vis_chart.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | null | null | null | tests/examples/ex_time_vis_chart.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | null | null | null | """Example Time Vis Chart."""
import pandas as pd
from dash import html
from implements import implements
from dash_charts.time_vis_chart import TimeVisChart
from dash_charts.utils_app import AppBase, AppInterface
from dash_charts.utils_fig import min_graph
from dash_charts.utils_helpers import parse_dash_cli_args
... | 34.51049 | 99 | 0.462006 |
7336ca4b68430df3fc3e53f45caefb17e75c9887 | 1,077 | py | Python | src/segmentation/models/resnetunet/configuration.py | prhuppertz/Burned_Area_Detection | 4091e8a5ba22c1db28b4accd71cf2994d544ffab | [
"Apache-2.0"
] | 5 | 2021-03-30T02:22:42.000Z | 2022-01-18T20:12:30.000Z | src/segmentation/models/resnetunet/configuration.py | prhuppertz/Burned_Area_Detection | 4091e8a5ba22c1db28b4accd71cf2994d544ffab | [
"Apache-2.0"
] | null | null | null | src/segmentation/models/resnetunet/configuration.py | prhuppertz/Burned_Area_Detection | 4091e8a5ba22c1db28b4accd71cf2994d544ffab | [
"Apache-2.0"
] | 3 | 2021-04-26T02:08:05.000Z | 2021-08-15T20:12:31.000Z | from src.segmentation.data.dataset import get_segmentation_dataset
from src.segmentation.data.augmentation import Augmentor, sequences
from src.segmentation.models.resnetunet.preprocessors import Preprocessor
from src.segmentation.models.resnetunet.postprocessor import Postprocessor
from src.segmentation.models.resnetu... | 43.08 | 79 | 0.780873 |
7336ce602f7f3092065718996a54108bbaf7ff4e | 25,572 | py | Python | post-processor/dsm2bdoomr_genfigreport.py | zackaryleady/DSM2_BDO_Analysis | 9ef2741f889fd1f037acfa5a8034b922b6a2f02f | [
"MIT"
] | 2 | 2020-01-09T22:19:12.000Z | 2020-01-10T22:26:02.000Z | post-processor/dsm2bdoomr_genfigreport.py | zackaryleady/DSM2_BDO_Analysis | 9ef2741f889fd1f037acfa5a8034b922b6a2f02f | [
"MIT"
] | null | null | null | post-processor/dsm2bdoomr_genfigreport.py | zackaryleady/DSM2_BDO_Analysis | 9ef2741f889fd1f037acfa5a8034b922b6a2f02f | [
"MIT"
] | null | null | null | # Required imported python libraries
# Python default libraries, no need to install
import os
import sys
import datetime
import logging
import argparse
# Data manipulation libraries
import numpy as np
import pandas as pd
# Graphing libraries
import plotly.graph_objs as go
import plotly.io as pio
# Statisti... | 46.158845 | 80 | 0.60007 |
7336e168ee3cc35699fba1acd0177d3a3bc39651 | 4,539 | py | Python | joj/horse/config.py | joint-online-judge/horse | ec08ecd0528f6a4fad3fa5f5932aef1495721437 | [
"MIT"
] | 6 | 2020-12-28T07:05:52.000Z | 2022-01-16T04:44:02.000Z | joj/horse/config.py | joint-online-judge/horse | ec08ecd0528f6a4fad3fa5f5932aef1495721437 | [
"MIT"
] | 56 | 2021-02-02T02:21:52.000Z | 2022-03-13T02:39:05.000Z | joj/horse/config.py | joint-online-judge/horse | ec08ecd0528f6a4fad3fa5f5932aef1495721437 | [
"MIT"
] | 3 | 2021-01-28T17:52:58.000Z | 2021-12-17T17:42:42.000Z | from typing import Type, Union
from pydantic import Field
from pydantic_universal_settings import (
BaseSettings,
CLIWatchMixin,
EnvFileMixin,
add_settings,
generate_all_settings,
get_settings_proxy,
)
@add_settings
class ServerSettings(BaseSettings):
"""
Server configuration
The... | 28.36875 | 90 | 0.660939 |
7336f998e617daf98a1a1cfc48388030fc3257d3 | 10,428 | py | Python | text-dream/python/linear_classifier/train.py | rothenha/interpretability | 37c664dc28f574b8f8d2eaf01a3ee4be3fecb1fd | [
"Apache-2.0"
] | 75 | 2019-06-08T13:29:56.000Z | 2022-03-19T20:55:34.000Z | text-dream/python/linear_classifier/train.py | Sparkier/interpretability | 37c664dc28f574b8f8d2eaf01a3ee4be3fecb1fd | [
"Apache-2.0"
] | 15 | 2019-07-26T17:32:41.000Z | 2020-01-08T07:20:54.000Z | text-dream/python/linear_classifier/train.py | rothenha/interpretability | 37c664dc28f574b8f8d2eaf01a3ee4be3fecb1fd | [
"Apache-2.0"
] | 14 | 2019-08-14T18:46:38.000Z | 2022-03-13T22:24:55.000Z | # Copyright 2018 Google LLC. 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 a... | 39.05618 | 80 | 0.680667 |
7336fe2ee1293a6fd8f5a58d9e16d2d4eeef72b0 | 2,165 | py | Python | tools/test_homography.py | chaowu2009/stereo-vo | 56ce2295c80935016d015f72ebc7f81c5ee8d898 | [
"MIT"
] | 4 | 2017-06-03T02:01:46.000Z | 2020-02-22T14:57:15.000Z | tools/test_homography.py | chaowu2009/stereo-vo | 56ce2295c80935016d015f72ebc7f81c5ee8d898 | [
"MIT"
] | null | null | null | tools/test_homography.py | chaowu2009/stereo-vo | 56ce2295c80935016d015f72ebc7f81c5ee8d898 | [
"MIT"
] | 1 | 2019-09-29T13:33:14.000Z | 2019-09-29T13:33:14.000Z | import numpy as np
import cv2
from matplotlib import pylab as plt
# Ref: http://www.pyimagesearch.com/2015/07/16/where-did-sift-and-surf-go-in-opencv-3/
picNumber = 1
filename_1 = "/home/cwu/project/stereo-calibration/calib_imgs/3/left/left_" + str(picNumber) +".jpg"
filename_2 = "/home/cwu/project/stereo-calibra... | 30.069444 | 103 | 0.69746 |
73371945d224c64fea1a1efbf3f56204aecc9c9e | 11,672 | py | Python | release/scripts/addons/blender_id/__init__.py | 1-MillionParanoidTterabytes/Blender-2.79b-blackened | e8d767324e69015aa66850d13bee7db1dc7d084b | [
"Unlicense"
] | 2 | 2018-06-18T01:50:25.000Z | 2018-06-18T01:50:32.000Z | blender_id/__init__.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | null | null | null | blender_id/__init__.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 32.603352 | 100 | 0.641193 |
73371a4f658e5899b4e524c510b89ccd6100a315 | 4,695 | py | Python | cgatpipelines/tools/pipeline_docs/pipeline_peakcalling/trackers/PeakcallingReport.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | null | null | null | cgatpipelines/tools/pipeline_docs/pipeline_peakcalling/trackers/PeakcallingReport.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | null | null | null | cgatpipelines/tools/pipeline_docs/pipeline_peakcalling/trackers/PeakcallingReport.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | null | null | null | import itertools
import glob
from CGATReport.Tracker import *
from CGATReport.Utils import PARAMS as P
from CGATCore import Pipeline as Pipeline
import cgatpipelines.PipelineTracks as PipelineTracks
###################################################################
####################################################... | 34.270073 | 136 | 0.519276 |
73376d9539554390704f75d4ec3a0f2d56d49b35 | 17,480 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/9_crop/1/train1_rm.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/9_crop/1/train1_rm.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/9_crop/1/train1_rm.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="2"
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import skimage.io
from skimage.transform import resize
from imgaug import augmenters as iaa
from tqdm import tqdm
import PIL
from PIL import Image... | 35.746421 | 123 | 0.656979 |
7337de7ab066ebd6f14eac3a573bcc9d5143b05e | 8,139 | py | Python | oscar/lib/python2.7/site-packages/coverage/plugin_support.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/coverage/plugin_support.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/coverage/plugin_support.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Support for plugins."""
import os
import os.path
import sys
from coverage.misc import CoverageException, isolate_module
from coverage.plugin import C... | 32.818548 | 91 | 0.600811 |
7337e2000671acd12a72ac2841711b3e70ed3c63 | 201 | py | Python | LZW/extra_typing.py | MapleCCC/LZW-Compressor | df770b557abaa096817a0f158d3eabc515e21d0e | [
"WTFPL"
] | 2 | 2020-04-04T14:20:28.000Z | 2020-05-05T11:39:07.000Z | LZW/extra_typing.py | MapleCCC/LZW-Compressor | df770b557abaa096817a0f158d3eabc515e21d0e | [
"WTFPL"
] | null | null | null | LZW/extra_typing.py | MapleCCC/LZW-Compressor | df770b557abaa096817a0f158d3eabc515e21d0e | [
"WTFPL"
] | null | null | null | from os import PathLike
from typing import Union
# This type hint is extracted from builtin open function's type annotation
# Except int type, we don't include.
Filename = Union[str, bytes, PathLike]
| 28.714286 | 74 | 0.781095 |
73380022b8a5130381b2b0c53e913a49fd7a512b | 10,543 | py | Python | selfdrive/test/tests/plant/test_longitudinal.py | openmechanics/opv0431arch | 994d9b3f74b41fbe7060be8ee2ecc87870d4a1e3 | [
"MIT"
] | 2 | 2021-04-07T02:39:00.000Z | 2021-08-30T19:54:27.000Z | selfdrive/test/tests/plant/test_longitudinal.py | openmechanics/opv0431arch | 994d9b3f74b41fbe7060be8ee2ecc87870d4a1e3 | [
"MIT"
] | 1 | 2021-03-26T00:38:47.000Z | 2021-03-26T00:38:47.000Z | selfdrive/test/tests/plant/test_longitudinal.py | openmechanics/opv0431arch | 994d9b3f74b41fbe7060be8ee2ecc87870d4a1e3 | [
"MIT"
] | 1 | 2022-01-29T04:23:49.000Z | 2022-01-29T04:23:49.000Z | #!/usr/bin/env python
import os
os.environ['OLD_CAN'] = '1'
os.environ['NOCRASH'] = '1'
import time
import unittest
import shutil
import matplotlib
matplotlib.use('svg')
from selfdrive.config import Conversions as CV, CruiseButtons as CB
from selfdrive.test.plant.maneuver import Maneuver
import selfdrive.manager as m... | 33.576433 | 124 | 0.585792 |
733838682f2a6bc6e583511beffa825c34fbffd6 | 1,928 | py | Python | pywick/callbacks/TQDM.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | 2 | 2020-11-28T07:56:09.000Z | 2021-11-08T09:30:39.000Z | pywick/callbacks/TQDM.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | null | null | null | pywick/callbacks/TQDM.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | null | null | null | from tqdm import tqdm
from . import Callback
__all__ = ['TQDM']
class TQDM(Callback):
def __init__(self):
"""
TQDM Progress Bar callback
This callback is automatically applied to
every SuperModule if verbose > 0
"""
self.progbar = None
super(TQDM, self)._... | 32.133333 | 102 | 0.569502 |
73383f6508bf846c48a1a326bfe042117007c1f7 | 805 | py | Python | aiovkcom/permissions.py | KonstantinTogoi/aiovkcom | db4a0789841496a5800bf86118f920eb4652b6ca | [
"BSD-2-Clause"
] | 1 | 2020-01-12T13:32:16.000Z | 2020-01-12T13:32:16.000Z | aiovkcom/permissions.py | KonstantinTogoi/aiovkcom | db4a0789841496a5800bf86118f920eb4652b6ca | [
"BSD-2-Clause"
] | null | null | null | aiovkcom/permissions.py | KonstantinTogoi/aiovkcom | db4a0789841496a5800bf86118f920eb4652b6ca | [
"BSD-2-Clause"
] | 1 | 2019-12-06T10:03:05.000Z | 2019-12-06T10:03:05.000Z | PERMISSIONS = (
# 'notify', # leads to unsupported access form
'friends',
'photos',
'audio',
'video',
'stories',
'pages',
'status',
'notes',
# 'messages', # available only after moderation
'wall',
'offline',
'docs',
'groups',
'notifications',
'stats',
... | 17.5 | 52 | 0.529193 |
733863579aa6a1568c754faa10d41e257434a545 | 16,848 | py | Python | Utils/utils.py | ys7yoo/npglm | 98cc040fff8a861e2d7e210fef049207f1714b2a | [
"MIT"
] | 9 | 2020-11-20T17:43:36.000Z | 2021-02-26T22:18:59.000Z | Utils/utils.py | ys7yoo/npglm | 98cc040fff8a861e2d7e210fef049207f1714b2a | [
"MIT"
] | 1 | 2021-02-04T13:51:17.000Z | 2021-02-04T23:56:07.000Z | Utils/utils.py | ys7yoo/npglm | 98cc040fff8a861e2d7e210fef049207f1714b2a | [
"MIT"
] | 1 | 2020-11-22T19:36:35.000Z | 2020-11-22T19:36:35.000Z | import numpy as np
import scipy.linalg as la
import torch
import threading, time
import matplotlib.pyplot as plt
from scipy.special import kv
import json
class Params():
"""Class that loads hyperparameters from a json file.
Example:
```
params = Params(json_path)
print(params.learning_rate)
p... | 36.546638 | 146 | 0.611349 |
73389d7152df2319e4cbcb52b279b92339250e47 | 3,303 | py | Python | NavPython/Init/useful_shit.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | null | null | null | NavPython/Init/useful_shit.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | null | null | null | NavPython/Init/useful_shit.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | null | null | null | #Useful stuff for python controlof the Navigator experiment
# IB2015
#
clr.AddReference("System.Core")
import System
clr.ImportExtensions(System.Linq)
from System import *
from System.Collections.Generic import Dictionary,List
import os
import glob
import datetime
from time import sleep
script_path = "C:\\EDMSuite\\... | 23.76259 | 106 | 0.707841 |
73389fb751afc1fb401af2f83acbcbc7757f36bb | 549 | py | Python | ielex/lexicon/migrations/0006_auto_20151106_1711.py | lingdb/CoBL-public | e50b441c4281b9299fb1cd0b46f906887cb86dd1 | [
"BSD-2-Clause"
] | 3 | 2017-05-30T04:40:43.000Z | 2019-04-25T14:54:54.000Z | ielex/lexicon/migrations/0006_auto_20151106_1711.py | lingdb/CoBL-public | e50b441c4281b9299fb1cd0b46f906887cb86dd1 | [
"BSD-2-Clause"
] | null | null | null | ielex/lexicon/migrations/0006_auto_20151106_1711.py | lingdb/CoBL-public | e50b441c4281b9299fb1cd0b46f906887cb86dd1 | [
"BSD-2-Clause"
] | 3 | 2018-07-02T13:42:12.000Z | 2019-05-17T13:11:13.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import ielex.lexicon.validators
class Migration(migrations.Migration):
dependencies = [
('lexicon', '0005_rename_Language_data_to_altname'),
]
operations = [
migrations.AlterField(
... | 23.869565 | 72 | 0.622951 |
7338f4297f7e19025cef9349393d5624da657a0f | 2,508 | py | Python | python/flags.py | JDzvonik/sling | 3000f6ff7ae5c2d5ddcae13ad3599e35bf375ec5 | [
"Apache-2.0"
] | 2,023 | 2017-10-13T01:39:21.000Z | 2022-03-27T14:24:09.000Z | python/flags.py | JDzvonik/sling | 3000f6ff7ae5c2d5ddcae13ad3599e35bf375ec5 | [
"Apache-2.0"
] | 166 | 2017-10-26T00:36:03.000Z | 2021-10-08T13:32:32.000Z | python/flags.py | JDzvonik/sling | 3000f6ff7ae5c2d5ddcae13ad3599e35bf375ec5 | [
"Apache-2.0"
] | 316 | 2017-10-12T20:34:28.000Z | 2022-02-02T16:03:45.000Z | # Copyright 2017 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 or agreed to in writing, s... | 26.967742 | 74 | 0.640351 |
7338f6da9d5328377bb8586a3dc3e1d08870a7c4 | 3,031 | py | Python | lib/utils/image_splitter_merger.py | Grusinator/BirdClassification | c78ca3dbf70c2509c79ca4641102a2d725084d2a | [
"MIT"
] | 1 | 2018-04-16T19:01:48.000Z | 2018-04-16T19:01:48.000Z | lib/utils/image_splitter_merger.py | Grusinator/BirdClassification | c78ca3dbf70c2509c79ca4641102a2d725084d2a | [
"MIT"
] | null | null | null | lib/utils/image_splitter_merger.py | Grusinator/BirdClassification | c78ca3dbf70c2509c79ca4641102a2d725084d2a | [
"MIT"
] | null | null | null | from PIL import Image
import math
from numpy import ndarray
import os
class image_splitter_merger():
def __init__(self,img_split_size, buffer= 50):
self.out_w = img_split_size[0]
self.out_h = img_split_size[1]
self.buf = int(buffer)
self.buf_hf = math.ceil(buffer/2.0)
self.... | 28.59434 | 83 | 0.591884 |
733902d84f13936ed025aa3d4da8c242f7499b7e | 15,355 | py | Python | neurosynth/analysis/classify.py | wmpauli/neurosynth | 43276cc9789a8c545b62a24bc522a01d1b45a265 | [
"MIT"
] | 1 | 2020-09-26T14:31:01.000Z | 2020-09-26T14:31:01.000Z | neurosynth/analysis/classify.py | wmpauli/neurosynth | 43276cc9789a8c545b62a24bc522a01d1b45a265 | [
"MIT"
] | null | null | null | neurosynth/analysis/classify.py | wmpauli/neurosynth | 43276cc9789a8c545b62a24bc522a01d1b45a265 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
""" Classification and decoding related tools """
import numpy as np
from functools import reduce
from sklearn.feature_selection.univariate_selection import SelectKBest
import re
def feature_selection(feat_select, X, y):
"""" Implements various kinds of feature selectio... | 36.911058 | 148 | 0.608271 |
73391b646dec94473d6552678cde64be1202a1b4 | 5,850 | py | Python | BlockMe/config.py | LinearGap/BlockMe | d75e39e5565eebf9757d31a486865ff6a0796620 | [
"MIT"
] | null | null | null | BlockMe/config.py | LinearGap/BlockMe | d75e39e5565eebf9757d31a486865ff6a0796620 | [
"MIT"
] | null | null | null | BlockMe/config.py | LinearGap/BlockMe | d75e39e5565eebf9757d31a486865ff6a0796620 | [
"MIT"
] | null | null | null | from datetime import datetime
from appdirs import user_config_dir
from config_default import config as default_config
import os, shutil, json
class config():
"""
Class responsible for managing the config files for the application.
Reading, writing, updating. Creation.
"""
def __init__(self):
... | 34.011628 | 125 | 0.612137 |
73391e65aad28fe443bc535c76a44ca93a3186d0 | 3,777 | py | Python | analysis/error_analysis.py | wadpac/SleepStageClassification | 5b288995e62bbd66faa66bd932b06af8a65f8445 | [
"Apache-2.0"
] | 24 | 2019-04-15T09:18:51.000Z | 2022-03-05T14:09:34.000Z | analysis/error_analysis.py | wadpac/SleepStageClassification | 5b288995e62bbd66faa66bd932b06af8a65f8445 | [
"Apache-2.0"
] | 2 | 2021-01-28T01:02:06.000Z | 2021-04-02T06:34:04.000Z | analysis/error_analysis.py | wadpac/SleepStageClassification | 5b288995e62bbd66faa66bd932b06af8a65f8445 | [
"Apache-2.0"
] | 11 | 2019-05-30T19:27:39.000Z | 2021-06-19T02:41:53.000Z | import sys,os
import argparse
import numpy as np
from scipy.signal import savgol_filter
import pandas as pd
from collections import Counter
from tqdm import tqdm
from entropy import spectral_entropy
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
def get_hist(arr, bins=20):
hist, edges = np... | 41.966667 | 105 | 0.70135 |
73393bad406a03545adb77967ca662cfbb1965f6 | 6,122 | py | Python | cantools/db/formats/kcd.py | jackjweinstein/cantools | 773c688b7ce5806dfe3d5d699a33c510ef20b983 | [
"MIT"
] | 1 | 2021-09-25T05:59:55.000Z | 2021-09-25T05:59:55.000Z | cantools/db/formats/kcd.py | danielhrisca/cantools | d489828d070e6d4cd84aaf7be9363b37ee7540fb | [
"MIT"
] | null | null | null | cantools/db/formats/kcd.py | danielhrisca/cantools | d489828d070e6d4cd84aaf7be9363b37ee7540fb | [
"MIT"
] | null | null | null | # Load and dump a CAN database in KCD format.
import logging
from xml.etree import ElementTree
from ..signal import Signal
from ..message import Message
from ..node import Node
from ..bus import Bus
from ..internal_database import InternalDatabase
from .utils import num
LOGGER = logging.getLogger(__name__)
# The ... | 27.954338 | 90 | 0.533322 |
7339acf80ca4a301087f8af7743b5cc4f3bb42ae | 544 | py | Python | examples/03-exceptions/example.py | damc-dev/kopf | 7c344fc682759bbf0647da60933021a75b3862d3 | [
"MIT"
] | null | null | null | examples/03-exceptions/example.py | damc-dev/kopf | 7c344fc682759bbf0647da60933021a75b3862d3 | [
"MIT"
] | null | null | null | examples/03-exceptions/example.py | damc-dev/kopf | 7c344fc682759bbf0647da60933021a75b3862d3 | [
"MIT"
] | null | null | null | import time
import kopf
E2E_TRACEBACKS = True
E2E_CREATE_TIME = 3.5
E2E_SUCCESS_COUNTS = {}
E2E_FAILURE_COUNTS = {'create_fn': 1}
class MyException(Exception):
pass
@kopf.on.create('zalando.org', 'v1', 'kopfexamples')
def create_fn(retry, **kwargs):
time.sleep(0.1) # for different timestamps of the event... | 22.666667 | 66 | 0.685662 |
7339bbf8fa475b8bd200a86f934e42913e7b88af | 8,369 | py | Python | smc/estimator.py | mavazquezlopez/distributed_particle_filtering | 5f3bce06c8dfb31e5af963f7a6389d2d299a5c60 | [
"Apache-2.0"
] | 4 | 2020-05-19T08:01:27.000Z | 2021-06-04T00:53:08.000Z | smc/estimator.py | mavazquezlopez/distributed_particle_filtering | 5f3bce06c8dfb31e5af963f7a6389d2d299a5c60 | [
"Apache-2.0"
] | null | null | null | smc/estimator.py | mavazquezlopez/distributed_particle_filtering | 5f3bce06c8dfb31e5af963f7a6389d2d299a5c60 | [
"Apache-2.0"
] | 3 | 2019-07-06T16:26:51.000Z | 2020-10-12T22:42:55.000Z | import abc
import numpy as np
import numpy.linalg
import state
import mposterior
def geometric_median(points, max_iterations=100, tolerance=0.001):
# initial estimate
estimate = np.median(points, axis=1)
for i in range(max_iterations):
# the norms for the vectors joining the previous estimate with every poi... | 30.768382 | 118 | 0.76401 |
7339de8f421997ab57f520c46fd2bc47aed772b8 | 17,036 | py | Python | master/nameko-master/nameko-master/test/amqp/test_publish.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/nameko-master/nameko-master/test/amqp/test_publish.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/nameko-master/nameko-master/test/amqp/test_publish.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | from __future__ import absolute_import
from datetime import datetime
import pytest
from amqp.exceptions import (
NotFound, PreconditionFailed, RecoverableConnectionError
)
from kombu import Connection
from kombu.common import maybe_declare
from kombu.compression import get_encoder
from kombu.messaging import Exch... | 36.09322 | 79 | 0.645398 |
733a1800d5106a06b9b2885127a007402bd64449 | 719 | py | Python | src/executor/Filterer.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 3 | 2020-02-12T01:24:46.000Z | 2020-02-13T00:50:46.000Z | src/executor/Filterer.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 32 | 2020-02-20T10:20:56.000Z | 2022-02-10T01:42:46.000Z | src/executor/Filterer.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 1 | 2020-02-22T02:47:19.000Z | 2020-02-22T02:47:19.000Z | from typing import Union
from ..data.MetaDataItem import MetaDataItem
from ..signals import StopSignal
from ..data.VideoItem import VideoItem
from ..data.FilterCondition import FilterCondition
from .iExecutor import iExecutor
class Filterer(iExecutor):
def __init__(self, *parents, filter_str: str = "tags['state... | 25.678571 | 83 | 0.684284 |
733a4d8352084912139b037e56a4e2ab6f9565b0 | 1,900 | py | Python | src/common/load_GSE103224.py | NCBI-Codeathons/Identifying-bulk-RNA-seq-derived-biomarkers-of-cancer-risk-within-single-cell-populations | fda26f5cfe41f3e64bff4602dc010d6f6be183f8 | [
"MIT"
] | 3 | 2020-01-15T03:17:52.000Z | 2020-09-30T20:12:53.000Z | src/common/load_GSE103224.py | NCBI-Codeathons/Identifying-bulk-RNA-seq-derived-biomarkers-of-cancer-risk-within-single-cell-populations | fda26f5cfe41f3e64bff4602dc010d6f6be183f8 | [
"MIT"
] | null | null | null | src/common/load_GSE103224.py | NCBI-Codeathons/Identifying-bulk-RNA-seq-derived-biomarkers-of-cancer-risk-within-single-cell-populations | fda26f5cfe41f3e64bff4602dc010d6f6be183f8 | [
"MIT"
] | 2 | 2021-05-17T20:59:33.000Z | 2021-05-27T07:30:42.000Z | import h5py
import numpy as np
from collections import defaultdict
DATA_F = '../../data/GSE103224.h5'
# Load cell names and tumor names
with h5py.File(DATA_F, 'r') as f:
CELLS = [
str(x)[2:-1]
for x in f['cell'][:]
]
TUMORS = [
str(x)[2:-1]
for x in f['tumor'][:]
]
... | 22.619048 | 58 | 0.601053 |
733a6deca0318fba04f3edf16ce4dc0a894c2ce9 | 510 | py | Python | api/tests/ver2/test_data/reset_test_data.py | pcf26536/politico-api | 1c9b8755ddad2baf0bfdeab4aa0674e4197a0d7c | [
"MIT"
] | 1 | 2019-02-22T19:34:32.000Z | 2019-02-22T19:34:32.000Z | api/tests/ver2/test_data/reset_test_data.py | pcf26536/politico-api | 1c9b8755ddad2baf0bfdeab4aa0674e4197a0d7c | [
"MIT"
] | null | null | null | api/tests/ver2/test_data/reset_test_data.py | pcf26536/politico-api | 1c9b8755ddad2baf0bfdeab4aa0674e4197a0d7c | [
"MIT"
] | 1 | 2019-02-07T22:12:25.000Z | 2019-02-07T22:12:25.000Z | from api.ver1.users.strings import email
from .signup_test_data import user_with_correct_signup_data
user_with_correct_email = {
email: user_with_correct_signup_data[email]
}
user_with_unexisting_email = user_with_correct_email.copy()
user_with_unexisting_email[email] = 'meandyou@them.us'
use... | 34 | 59 | 0.813725 |
733a7af569a1d2f90a313e892a45f74e52d6b305 | 634 | py | Python | Python/tree/Tree.py | MatteoEsposito/ProgettoInItinereII-IngegneriaDegliAlgoritmi- | c37543d2bc1919d0cdad98dbc018eaf65f221cdf | [
"MIT"
] | null | null | null | Python/tree/Tree.py | MatteoEsposito/ProgettoInItinereII-IngegneriaDegliAlgoritmi- | c37543d2bc1919d0cdad98dbc018eaf65f221cdf | [
"MIT"
] | null | null | null | Python/tree/Tree.py | MatteoEsposito/ProgettoInItinereII-IngegneriaDegliAlgoritmi- | c37543d2bc1919d0cdad98dbc018eaf65f221cdf | [
"MIT"
] | null | null | null | from dictionary.dictTrees.trees.treeArrayList import TreeArrayList
from dictionary.dictTrees.trees.strutture.Stack import PilaArrayList
class Tree(TreeArrayList):
def foundNodeByIndex(self, index):
"""Visita DFS per cercare un nodo che contenga l'indice richiesto."""
stack = PilaArrayList()
... | 33.368421 | 77 | 0.629338 |
733a85fc3416139e9de340d463dde2a27e5acb6c | 644 | py | Python | binarysearch.io/226_vanity_phonenumbers.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | binarysearch.io/226_vanity_phonenumbers.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | binarysearch.io/226_vanity_phonenumbers.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | class Solution:
def solve(self, digits):
map = {
'2':'abc',
'3': 'def',
'4': 'ghi',
'5': 'jkl',
'6': 'mno',
'7': 'pqrs',
'8': 'tuv',
'9': 'wxyz'
}
output = []
def helper(combination, digit... | 23.851852 | 55 | 0.335404 |
733a8b9c26755042604ab1c0f2efc5b04e7799d9 | 11,201 | py | Python | HW3/dbsys-hw3/update/dbsys-hw3/Utils/WorkloadGenerator.py | yliu120/dbsystem | d1b008f411929058a34a1dd2c44c9ee2cf899865 | [
"Apache-2.0"
] | null | null | null | HW3/dbsys-hw3/update/dbsys-hw3/Utils/WorkloadGenerator.py | yliu120/dbsystem | d1b008f411929058a34a1dd2c44c9ee2cf899865 | [
"Apache-2.0"
] | null | null | null | HW3/dbsys-hw3/update/dbsys-hw3/Utils/WorkloadGenerator.py | yliu120/dbsystem | d1b008f411929058a34a1dd2c44c9ee2cf899865 | [
"Apache-2.0"
] | null | null | null | import io, math, os, os.path, random, shutil, time, timeit
from Catalog.Schema import DBSchema
from Storage.StorageEngine import StorageEngine
from Database import Database
class CSVParser:
def __init__(self, separator, fieldParsers):
self.separator = separator
self.fieldParsers... | 38.228669 | 118 | 0.499866 |
733acbe3e0f0c20eaed1288ab0d7a4c23aed4642 | 6,131 | py | Python | neuralmonkey/dataset/dataset.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | null | null | null | neuralmonkey/dataset/dataset.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | null | null | null | neuralmonkey/dataset/dataset.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | null | null | null | """Implementation of the dataset class."""
import random
import collections
from typing import Callable, Dict, Iterable, List, Optional, Tuple
import numpy as np
from typeguard import check_argument_types
class Dataset(collections.Sized):
"""Base Dataset class.
This class serves as collection for data serie... | 33.502732 | 77 | 0.561735 |
733ad252c51dad64a5d00b9cb32fab2430f1f51e | 4,659 | py | Python | whoville/cloudbreak/models/vm_type_meta_json.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | whoville/cloudbreak/models/vm_type_meta_json.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | whoville/cloudbreak/models/vm_type_meta_json.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Cloudbreak API
Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud... | 31.06 | 984 | 0.604422 |
733ad68bc64b4d562856b9356170a9d0b74907b3 | 19,962 | py | Python | debug.py | SelvamArul/MOTR | 2a0b70288feaca665d460096159100d5077e9312 | [
"MIT"
] | null | null | null | debug.py | SelvamArul/MOTR | 2a0b70288feaca665d460096159100d5077e9312 | [
"MIT"
] | null | null | null | debug.py | SelvamArul/MOTR | 2a0b70288feaca665d460096159100d5077e9312 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------
# Copyright (c) 2021 megvii-model. All Rights Reserved.
# ------------------------------------------------------------------------
# Modified from Deformable DETR (https://github.com/fundamentalvision/Deformable-DETR)
# Copyright (c) 2020 SenseT... | 49.905 | 184 | 0.64733 |
733b0b806925a342c894327b09b31c8de1314633 | 4,046 | py | Python | alipay/aop/api/request/AlipayCommerceEducateCertificateInfoQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayCommerceEducateCertificateInfoQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayCommerceEducateCertificateInfoQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayCommerceEducateCertificateInfoQueryModel import AlipayCommerceEducateCertificateInfoQueryModel
class AlipayCommerceEducateCert... | 27.903448 | 148 | 0.651013 |
733b28ab093d99b696972b533200cce14856d141 | 8,396 | py | Python | ribohmm/_cmds/mappability_generate.py | djf604/RiboHMM | 56bd10a198fdf7e191ce0b3362150b1969deaa03 | [
"Apache-2.0"
] | 1 | 2019-06-03T20:37:08.000Z | 2019-06-03T20:37:08.000Z | ribohmm/_cmds/mappability_generate.py | djf604/RiboHMM | 56bd10a198fdf7e191ce0b3362150b1969deaa03 | [
"Apache-2.0"
] | 1 | 2019-06-03T20:39:38.000Z | 2019-06-03T20:39:38.000Z | ribohmm/_cmds/mappability_generate.py | djf604/ribohmm_refactor | 6bd0056aa8a9c7851d458995b23d5407821dc38a | [
"Apache-2.0"
] | 1 | 2021-03-08T09:36:01.000Z | 2021-03-08T09:36:01.000Z | import argparse
import datetime
import gzip
import pysam
import numpy as np
from ribohmm.contrib.load_data import load_gtf
from ribohmm.utils import make_complement
def populate_parser(parser):
parser.add_argument('--gtf-file', help='Path to GTF file containing transcript models')
parser.add_argument('--fast... | 39.051163 | 163 | 0.580634 |
733b2b8687f3f536717ab955d75b1bc6e44be070 | 12,057 | py | Python | models/fedsem.py | mingxuts/multi-center-fed-learning | 9262ddaefb79b14ea44b61ffce200b82d31b0af1 | [
"BSD-2-Clause"
] | 4 | 2021-09-03T02:44:14.000Z | 2022-03-04T03:28:09.000Z | models/fedsem.py | mingxuts/multi-center-fed-learning | 9262ddaefb79b14ea44b61ffce200b82d31b0af1 | [
"BSD-2-Clause"
] | null | null | null | models/fedsem.py | mingxuts/multi-center-fed-learning | 9262ddaefb79b14ea44b61ffce200b82d31b0af1 | [
"BSD-2-Clause"
] | 2 | 2021-10-10T11:57:53.000Z | 2022-02-15T20:27:10.000Z | import importlib
import numpy as np
import os
import sys
import time
import pickle
import copy
import random
import tensorflow as tf
import logging
tf.get_logger().setLevel(logging.ERROR)
from baseline_constants import ACCURACY_KEY
import metrics.writer as metrics_writer
STAT_METRICS_PATH = 'metrics/stat_metrics.c... | 42.755319 | 130 | 0.593597 |
733b48a9ba690bf9e7bdec4b0824eebf90bd08e3 | 4,044 | py | Python | chapter9/exercises/EG9-06 Tiny Contacts with Load and Save.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | chapter9/exercises/EG9-06 Tiny Contacts with Load and Save.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | chapter9/exercises/EG9-06 Tiny Contacts with Load and Save.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | # EG9-06 Tiny Contacts with Load and Save
from BTCInput import *
import pickle
# Create the contact class
class Contact:
pass
def new_contact():
'''
Reads in a new contact and stores it
'''
print('Create new contact')
# create a new instance
new_contact=Contact()
# add the data attri... | 28.885714 | 76 | 0.653561 |
733b4cd7961d76c330b5c88e8852657b0bee7c30 | 541 | py | Python | tests/models/bindingsitetestcase.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | tests/models/bindingsitetestcase.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | tests/models/bindingsitetestcase.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | from credoscript import models
from tests import CredoEntityTestCase
class BindingSiteTestCase(CredoEntityTestCase):
def setUp(self):
self.bs = models.BindingSite.query.limit(1).first()
# direct one-to-one relationship
def test_has_ligand(self):
self.assertOneToOne(self.bs, 'Ligand', mode... | 25.761905 | 73 | 0.719039 |
733b9ae6e35736f618e74b4bbf740fbc54f02802 | 487 | py | Python | terrascript/kibana/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/kibana/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/kibana/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/kibana/r.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class kibana_dashboard(terrascript.Resource):
pass
class kibana_role(terrascript.Resource):
pass
... | 16.233333 | 79 | 0.770021 |
733b9bd840acb94b82824c3ef2b592b9004fd59c | 422 | py | Python | configs/benchmarks/classification/_base_/models/resnet18.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | null | null | null | configs/benchmarks/classification/_base_/models/resnet18.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | null | null | null | configs/benchmarks/classification/_base_/models/resnet18.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | 1 | 2022-03-15T11:31:48.000Z | 2022-03-15T11:31:48.000Z | model = dict(
type='Classification',
backbone=dict(
type='ResNet',
depth=18,
in_channels=3,
num_stages=4,
strides=(1, 2, 2, 2),
dilations=(1, 1, 1, 1),
out_indices=[4], # 0: conv-1, x: stage-x
norm_cfg=dict(type='BN'),
frozen_stages=-1),
... | 26.375 | 60 | 0.533175 |
733babf6e263cd774b06ba569c356211cbe66d21 | 9,815 | py | Python | howiml/utils/plots.py | hermanwh/howi-ml | 9748a4a5749b467af303cdb0a8ef2c615ecf3ae6 | [
"Apache-2.0"
] | null | null | null | howiml/utils/plots.py | hermanwh/howi-ml | 9748a4a5749b467af303cdb0a8ef2c615ecf3ae6 | [
"Apache-2.0"
] | 6 | 2020-11-13T18:53:05.000Z | 2022-02-10T01:38:58.000Z | howiml/utils/plots.py | hermanwh/howi-ml | 9748a4a5749b467af303cdb0a8ef2c615ecf3ae6 | [
"Apache-2.0"
] | 1 | 2020-06-05T09:51:45.000Z | 2020-06-05T09:51:45.000Z | import numpy as np
import pandas as pd
import matplotlib.pyplot as pltt
def getPlotColors():
colors = [
'#000080',
'#2ca25f',
'#8856a7',
'#43a2ca',
'#e34a33',
'#636363',
'#663300',
'#003300',
'#ff3399',
'#99d8c9',
'#9ebcda',
... | 37.895753 | 212 | 0.619154 |
733beb603faa9f6f857632647164b6acc1c99a55 | 66,849 | py | Python | controllers/msg.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | 1 | 2018-01-06T12:58:32.000Z | 2018-01-06T12:58:32.000Z | controllers/msg.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | null | null | null | controllers/msg.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Messaging Module - Controllers
"""
module = request.controller
resourcename = request.function
if not settings.has_module(module):
raise HTTP(404, body="Module disabled: %s" % module)
# -----------------------------------------------------------------------------
def index():
... | 36.037197 | 250 | 0.502491 |
733c2260197dd0a5e536a4925860d636b6822a64 | 876 | py | Python | hashicorp_vault_client/test/test_body117.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | null | null | null | hashicorp_vault_client/test/test_body117.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | 2 | 2019-09-30T20:56:41.000Z | 2019-10-02T00:22:07.000Z | hashicorp_vault_client/test/test_body117.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
HashiCorp Vault API
HTTP API that gives you full access to Vault. All API routes are prefixed with `/v1/`. # noqa: E501
OpenAPI spec version: 1.2.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
... | 21.9 | 104 | 0.686073 |
733c2d15969dc4a6e115782779bd0636810a103f | 4,292 | py | Python | optim/radamw.py | XuezheMax/apollo | 7adf28f6af4606e4730e161473b33a9916211c61 | [
"Apache-2.0"
] | 166 | 2020-09-27T06:34:56.000Z | 2022-02-13T07:45:15.000Z | optim/radamw.py | JustCoolPig/apollo | 852991fd769f80689415abee8653c0a5eedbab40 | [
"Apache-2.0"
] | 9 | 2020-10-08T10:59:06.000Z | 2022-01-27T06:32:19.000Z | optim/radamw.py | JustCoolPig/apollo | 852991fd769f80689415abee8653c0a5eedbab40 | [
"Apache-2.0"
] | 15 | 2020-10-11T10:19:35.000Z | 2021-10-04T13:40:40.000Z | import math
import torch
from torch.optim.optimizer import Optimizer
class RAdamW(Optimizer):
def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0, degenerated_to_sgd=True):
if not 0.0 <= lr:
raise ValueError("Invalid learning rate: {}".format(lr))
if not 0... | 44.247423 | 148 | 0.50699 |
733c32f0c2e451d2ab3be157945014612b18e4b4 | 1,017 | py | Python | pyKinectTools/utils/DualViewer.py | colincsl/pyKinectTools | a84bb5b7ff9dd613576415932865c2ad435520b3 | [
"BSD-2-Clause-FreeBSD"
] | 33 | 2015-04-07T16:28:04.000Z | 2021-11-22T00:28:43.000Z | pyKinectTools/utils/DualViewer.py | colincsl/pyKinectTools | a84bb5b7ff9dd613576415932865c2ad435520b3 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | pyKinectTools/utils/DualViewer.py | colincsl/pyKinectTools | a84bb5b7ff9dd613576415932865c2ad435520b3 | [
"BSD-2-Clause-FreeBSD"
] | 13 | 2015-04-07T16:28:34.000Z | 2021-04-26T08:04:36.000Z |
import os, time, sys
import numpy as np
import cv, cv2
import scipy.ndimage as nd
sys.path.append('/Users/colin/code/Kinect-Projects/icuRecorder/')
from icuReader import ICUReader as DepthReader
camOffset = 11 # There is an ~11 second offset between the two cameras
clockTime = time.time()
# path = '/Users/colin/dat... | 25.425 | 106 | 0.748279 |
733c3734272b8147e7e1fbafde22bb430c0970f2 | 4,889 | py | Python | pix2pix/train.py | wattanapong/DFA | c05851beca2f8739f80531eb4de2f61639715cab | [
"Apache-2.0"
] | null | null | null | pix2pix/train.py | wattanapong/DFA | c05851beca2f8739f80531eb4de2f61639715cab | [
"Apache-2.0"
] | null | null | null | pix2pix/train.py | wattanapong/DFA | c05851beca2f8739f80531eb4de2f61639715cab | [
"Apache-2.0"
] | null | null | null | """General-purpose training script for image-to-image translation.
This script works for various models (with option '--model': e.g., pix2pix, cyclegan, colorization) and
different datasets (with option '--dataset_mode': e.g., aligned, unaligned, single, colorization).
You need to specify the dataset ('--dataroot'), e... | 61.886076 | 180 | 0.683166 |
733c3b067a0ac74d43ea04239c78ae333ada4729 | 3,987 | py | Python | experiments/vitchyr/goal_distribution/representation_learning/exps_20_07_13/exp3_rig_architecture_variants_one_obj.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/vitchyr/goal_distribution/representation_learning/exps_20_07_13/exp3_rig_architecture_variants_one_obj.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/vitchyr/goal_distribution/representation_learning/exps_20_07_13/exp3_rig_architecture_variants_one_obj.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.sets.vae_launcher import train_set_vae
if __name__ == '__main__':
variant = dict(
create_vae_kwargs=dict(
latent_dim=128,
encoder_cnn_kwargs=dict(
kerne... | 29.10219 | 72 | 0.479559 |
733c7a98c3f2ccd8da3d37e8e7ce900dc3db0165 | 1,838 | py | Python | scripts/convae_clf_nlabeled.py | ATTPC/VAE-event-classification | aae331d44bffffec2ca8a6cdef71208899db0052 | [
"MIT"
] | null | null | null | scripts/convae_clf_nlabeled.py | ATTPC/VAE-event-classification | aae331d44bffffec2ca8a6cdef71208899db0052 | [
"MIT"
] | 2 | 2018-12-20T20:10:52.000Z | 2019-02-04T17:44:01.000Z | scripts/convae_clf_nlabeled.py | ATTPC/VAE-event-classification | aae331d44bffffec2ca8a6cdef71208899db0052 | [
"MIT"
] | null | null | null | import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import numpy as np
import os
import sys
sys.path.append("../src")
from evaluate_n_labeled import n_labeled_data
print(os.getpid())
vgg = True
dd = True
alternate = ""
prefix = "vgg_" if vgg else ""
prefix += "d... | 27.029412 | 84 | 0.631121 |
733c7fb95dd2035a5cb63bcf37c06905ebdd24fb | 115,356 | py | Python | tensorflow/python/estimator/estimator_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/estimator/estimator_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/estimator/estimator_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.723061 | 86 | 0.70044 |
733c8c0527f8347aeac36a0a035913510999684e | 4,640 | py | Python | rbac/server/api/main.py | adamgering/sawtooth-next-directory | da07a115107909a90bb4f71ff756e0ba663320e8 | [
"Apache-2.0"
] | null | null | null | rbac/server/api/main.py | adamgering/sawtooth-next-directory | da07a115107909a90bb4f71ff756e0ba663320e8 | [
"Apache-2.0"
] | 1 | 2018-09-10T19:12:31.000Z | 2018-09-10T19:12:31.000Z | rbac/server/api/main.py | adamgering/sawtooth-next-directory | da07a115107909a90bb4f71ff756e0ba663320e8 | [
"Apache-2.0"
] | null | null | null | # 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 ... | 33.381295 | 85 | 0.721983 |
733cc41d7a685a5974be18eac7091ea2b53a5b11 | 48,714 | py | Python | canvas_course_site_wizard/tests/test_controller_create_canvas_course.py | Harvard-University-iCommons/django-canvas-course-site-wizard | 0210849e959407e5a850188f50756eb69b9a4dc2 | [
"MIT"
] | null | null | null | canvas_course_site_wizard/tests/test_controller_create_canvas_course.py | Harvard-University-iCommons/django-canvas-course-site-wizard | 0210849e959407e5a850188f50756eb69b9a4dc2 | [
"MIT"
] | 5 | 2018-05-10T19:49:43.000Z | 2021-01-29T19:39:34.000Z | canvas_course_site_wizard/tests/test_controller_create_canvas_course.py | Harvard-University-iCommons/django-canvas-course-site-wizard | 0210849e959407e5a850188f50756eb69b9a4dc2 | [
"MIT"
] | null | null | null | import contextlib
import uuid
from unittest import TestCase
from mock import patch, DEFAULT, MagicMock, Mock, ANY
from icommons_common.utils import Bunch
from icommons_ui.exceptions import RenderableException
from django.core.exceptions import ObjectDoesNotExist
from canvas_sdk.exceptions import CanvasAPIError
from ca... | 59.407317 | 131 | 0.716632 |
733cc6ed58b988c21097e86a7c319d84f8495a0e | 836 | py | Python | src/tumblelog/sitemap.py | myles/django-basic-tumblelog | 4967acd0c052a42c42312f41dd08ff3f6a5a846a | [
"Apache-2.0"
] | 2 | 2016-05-08T10:05:07.000Z | 2017-12-18T04:08:07.000Z | src/tumblelog/sitemap.py | myles/django-basic-tumblelog | 4967acd0c052a42c42312f41dd08ff3f6a5a846a | [
"Apache-2.0"
] | null | null | null | src/tumblelog/sitemap.py | myles/django-basic-tumblelog | 4967acd0c052a42c42312f41dd08ff3f6a5a846a | [
"Apache-2.0"
] | null | null | null | """
Copyright 2009 Myles Braithwaite <me@mylesbraithwaite.com>
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 agre... | 28.827586 | 72 | 0.778708 |
733cd5a7e5c497d8d46093c8cc607ec539c63317 | 469 | py | Python | arm/migrations/0005_auto_20180928_1723.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | 3 | 2018-10-16T09:36:12.000Z | 2019-04-15T03:12:49.000Z | arm/migrations/0005_auto_20180928_1723.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | arm/migrations/0005_auto_20180928_1723.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-09-28 17:23
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('arm', '0004_armtrainimage'),
]
operations = [
migrations.AlterField(
... | 22.333333 | 68 | 0.620469 |
733d068eac11b9769f09776755fa57efa90b1345 | 188 | py | Python | ml_challenge/path.py | fernandocamargoai/ml-challenge-2021 | 7ae082aeb2fe7674956e309afedbd25464d71525 | [
"MIT"
] | 1 | 2021-11-24T19:06:38.000Z | 2021-11-24T19:06:38.000Z | ml_challenge/path.py | fernandocamargoai/ml-challenge-2021 | 7ae082aeb2fe7674956e309afedbd25464d71525 | [
"MIT"
] | null | null | null | ml_challenge/path.py | fernandocamargoai/ml-challenge-2021 | 7ae082aeb2fe7674956e309afedbd25464d71525 | [
"MIT"
] | null | null | null | import os
def get_assets_path() -> str:
return os.environ.get("ASSETS_PATH", "assets")
def get_extra_data_path() -> str:
return os.environ.get("EXTRA_DATA_PATH", "extra_data")
| 18.8 | 58 | 0.702128 |
733d15e63760e27d2acdb05df2cadad3b1cfe535 | 20,168 | py | Python | spyder/widgets/calltip.py | Nicztin/spyder | 1c7b2232d2abbf1e101a1e2ab0552b32e8472bd6 | [
"MIT"
] | 1 | 2019-09-25T15:08:24.000Z | 2019-09-25T15:08:24.000Z | spyder/widgets/calltip.py | jorgeps86/spyder | 1c7b2232d2abbf1e101a1e2ab0552b32e8472bd6 | [
"MIT"
] | null | null | null | spyder/widgets/calltip.py | jorgeps86/spyder | 1c7b2232d2abbf1e101a1e2ab0552b32e8472bd6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2010 IPython Development Team
# Copyright (c) 2013- Spyder Project Contributors
#
# Distributed under the terms of the Modified BSD License
# (BSD 3-clause; see NOTICE.txt in the Spyder root directory... | 37.073529 | 80 | 0.550575 |
733d1bdce5b6830ca7a35c9114a8f3dbdd0acef2 | 37,536 | py | Python | mindspore/profiler/profiling.py | LaiYongqiang/mindspore | 1b7a38ccd86b55af50a0ea55c7f2f43813ed3e0e | [
"Apache-2.0"
] | 1 | 2021-11-19T14:21:45.000Z | 2021-11-19T14:21:45.000Z | mindspore/profiler/profiling.py | LaiYongqiang/mindspore | 1b7a38ccd86b55af50a0ea55c7f2f43813ed3e0e | [
"Apache-2.0"
] | null | null | null | mindspore/profiler/profiling.py | LaiYongqiang/mindspore | 1b7a38ccd86b55af50a0ea55c7f2f43813ed3e0e | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# 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 agre... | 46.169742 | 119 | 0.647858 |
733d251f4fb8c5132cfc849b79e577cedd067048 | 5,532 | py | Python | tests/test_conduction.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 118 | 2016-01-04T07:46:23.000Z | 2022-03-29T14:12:59.000Z | tests/test_conduction.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 4 | 2017-06-27T08:01:02.000Z | 2020-10-06T14:18:46.000Z | tests/test_conduction.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 22 | 2016-04-20T06:17:35.000Z | 2022-03-07T01:40:25.000Z | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2016, 2017, 2018, 2019, Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "S... | 40.379562 | 143 | 0.718727 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.