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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
62d91761ca4bcf3d32c9501ac860f664f56eaa93 | 12,344 | py | Python | preprocessing.py | bgunnar5/TimeSeries | 25cdf9f3d5f7cb66b0064f7a29de35df7c668c6e | [
"MIT"
] | null | null | null | preprocessing.py | bgunnar5/TimeSeries | 25cdf9f3d5f7cb66b0064f7a29de35df7c668c6e | [
"MIT"
] | null | null | null | preprocessing.py | bgunnar5/TimeSeries | 25cdf9f3d5f7cb66b0064f7a29de35df7c668c6e | [
"MIT"
] | null | null | null | '''
This module defines a TimeSeries object that will be used in all other components. It provides all the preprocessing
methods for time series data as specified in the Project 1 handout.
Authors: Yifeng Cui and Jacob Rammer
Group name: The Classy Coders
Most recent modification: 2/9/21
'''
import pandas as pd
import... | 35.676301 | 116 | 0.589193 |
62d92c29ec931fee083524b337f47ef788bff0f5 | 1,031 | py | Python | slice_db/graph/__init__.py | rivethealth/slice-db | 2f94ae7e6c8970bd4ff42b10b0d612c4df179ab8 | [
"MIT"
] | 1 | 2021-04-07T18:13:56.000Z | 2021-04-07T18:13:56.000Z | slice_db/graph/__init__.py | rivethealth/slice-db | 2f94ae7e6c8970bd4ff42b10b0d612c4df179ab8 | [
"MIT"
] | null | null | null | slice_db/graph/__init__.py | rivethealth/slice-db | 2f94ae7e6c8970bd4ff42b10b0d612c4df179ab8 | [
"MIT"
] | null | null | null | from __future__ import annotations
import typing
T = typing.TypeVar("T")
DepFn = typing.Callable[[T], typing.Iterable[T]]
class CycleError(Exception):
def __init__(self, nodes):
super().__init__(CycleError.str(nodes))
self.nodes = nodes
@staticmethod
def str(nodes: typing.List[T]) -> s... | 21.040816 | 66 | 0.552861 |
62d92dcc03860d42a1963dafbe92dfa0bc82a4d1 | 754 | py | Python | papermerge/test/parts/app_0/migrations/0002_auto_20201111_0650.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | 1,586 | 2020-01-07T10:53:31.000Z | 2022-03-31T16:15:42.000Z | papermerge/test/parts/app_0/migrations/0002_auto_20201111_0650.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | 398 | 2020-01-29T16:31:44.000Z | 2022-03-11T21:22:10.000Z | papermerge/test/parts/app_0/migrations/0002_auto_20201111_0650.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | 196 | 2020-01-29T09:25:16.000Z | 2022-03-29T11:08:35.000Z | # Generated by Django 3.1 on 2020-11-11 06:50
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('app_0', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Color',
field... | 27.925926 | 122 | 0.587533 |
62d96def2c133230f77bc449869bd60c0b6252ac | 1,475 | py | Python | Supervised_Learning/SoftmaxRegression.py | shyamsn97/artificial-intelligence | 9f15906f0b342195ba66c20bcc77d895ba64169f | [
"MIT"
] | null | null | null | Supervised_Learning/SoftmaxRegression.py | shyamsn97/artificial-intelligence | 9f15906f0b342195ba66c20bcc77d895ba64169f | [
"MIT"
] | null | null | null | Supervised_Learning/SoftmaxRegression.py | shyamsn97/artificial-intelligence | 9f15906f0b342195ba66c20bcc77d895ba64169f | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import sys
sys.path.append('../tools')
import tools
import iterative_methods
class SoftmaxRegression():
"""
Softmax Regression class for multi-class classification
Parameters:
X: numpy array() data matrix
y: numpy array() class labels, must be numeric
... | 36.875 | 213 | 0.647458 |
62d97be3f99644e17520a04826138fb72e12af18 | 1,076 | py | Python | test/dom/html/test_element.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | 2 | 2018-05-28T23:01:20.000Z | 2018-05-29T03:59:38.000Z | test/dom/html/test_element.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | test/dom/html/test_element.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | def error(msg):
raise 'ERROR: ' + msg
def test():
print 'Testing Syntax'
from util import testAttribute
from util import testIntAttribute
from xml.dom import implementation
from xml.dom.html.HTMLElement import HTMLElement
#Test with an HTML Element
doc = implementation.createHTMLDocum... | 21.098039 | 52 | 0.607807 |
62d981d77dd0653eb962f88eb42f304a669abcee | 5,329 | py | Python | geokey_wegovnow/tests/test_conversions.py | ExCiteS/geokey-wegonow | 66df7e17fa3eb2d8da2e56e39236b019f98a2a08 | [
"MIT"
] | null | null | null | geokey_wegovnow/tests/test_conversions.py | ExCiteS/geokey-wegonow | 66df7e17fa3eb2d8da2e56e39236b019f98a2a08 | [
"MIT"
] | 2 | 2017-02-22T13:20:29.000Z | 2018-11-07T16:39:33.000Z | geokey_wegovnow/tests/test_conversions.py | ExCiteS/geokey-wegonow | 66df7e17fa3eb2d8da2e56e39236b019f98a2a08 | [
"MIT"
] | null | null | null | # coding=utf-8
"""Non-Django tests for self-contained conversion methods."""
from unittest import TestCase
from geokey_wegovnow.conversions import make_cm_url, get_link_title
class ExternalUrlsConversionTests(TestCase):
def test_first_plural_removed(self):
geokey_url = "https://wegovnow-gk-sandona.geoke... | 41.96063 | 113 | 0.693939 |
62d993604860574153caf62eb97e1f9c151ce170 | 2,899 | py | Python | services/traction/acapy_wrapper/apis/action_menu_api.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_wrapper/apis/action_menu_api.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_wrapper/apis/action_menu_api.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | # coding: utf-8
from typing import Dict, List # noqa: F401
from fastapi import ( # noqa: F401
APIRouter,
Body,
Cookie,
Depends,
Form,
Header,
Path,
Query,
Request,
Response,
Security,
status,
)
from acapy_wrapper.models.extra_models import TokenModel # noqa: F401
fr... | 26.117117 | 79 | 0.686444 |
62d9987c29c250dd52a59cfefa0cc130f03d3c7e | 908 | py | Python | tests/test_main.py | b-biswas/BlendingToolKit | 2e85da4df99a84bcdff1d85ed66eb8589eb72499 | [
"MIT"
] | 16 | 2018-12-08T07:51:49.000Z | 2022-03-27T16:52:00.000Z | tests/test_main.py | b-biswas/BlendingToolKit | 2e85da4df99a84bcdff1d85ed66eb8589eb72499 | [
"MIT"
] | 252 | 2018-10-29T20:23:40.000Z | 2022-03-28T20:45:37.000Z | tests/test_main.py | b-biswas/BlendingToolKit | 2e85da4df99a84bcdff1d85ed66eb8589eb72499 | [
"MIT"
] | 8 | 2019-01-02T07:40:59.000Z | 2021-01-21T03:10:04.000Z | import subprocess
import pytest
from hydra import compose
from hydra import initialize
from btk.main import main
def get_cfg(overrides):
overrides = [f"{key}={value}" for key, value in overrides.items()]
with initialize(config_path="../conf"):
cfg = compose("config", overrides=overrides)
return ... | 23.282051 | 90 | 0.665198 |
62d99c5bebc09ec0609a374d6c4646422241e5b0 | 2,956 | py | Python | alipay/aop/api/domain/PaymentClauseDetailDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/PaymentClauseDetailDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/PaymentClauseDetailDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.WitnessPrincipalDTO import WitnessPrincipalDTO
from alipay.aop.api.domain.WitnessPrincipalDTO import WitnessPrincipalDTO
class PaymentClauseDetailDTO(object):
def __init__(se... | 31.446809 | 89 | 0.627876 |
62d9c035a9c8d729754136c846a379e31c9a91f9 | 2,117 | py | Python | 01-Lesson-Plans/02-Python/3/Activities/02-Stu_Refresher/Solved/marketing.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-04-13T07:14:34.000Z | 2021-04-13T07:14:34.000Z | 01-Lesson-Plans/02-Python/3/Activities/02-Stu_Refresher/Solved/marketing.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 2 | 2021-06-02T03:14:19.000Z | 2022-02-11T23:21:24.000Z | 01-Lesson-Plans/02-Python/3/Activities/02-Stu_Refresher/Solved/marketing.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-05-07T13:26:50.000Z | 2021-05-07T13:26:50.000Z | # -*- coding: utf-8 -*-
"""Refresher activity.
This script will use variables, conditionals, lists, dicts, and functions
to print out different greetings for customers based on their
business tier (determined by revenue).
"""
# List of dicts
customers = [
{ "first_name": "Tom", "last_name": "Bell", "revenue": 0 }... | 40.711538 | 120 | 0.679735 |
62d9c98519111ac4dadd973207a150c3a2324afc | 1,924 | py | Python | evaluate_img.py | diamondgloves/im2latex | 8ef3378cb289846a5d85ce60785e11c6c5291700 | [
"Apache-2.0"
] | 1 | 2020-01-03T15:30:32.000Z | 2020-01-03T15:30:32.000Z | evaluate_img.py | diamondgloves/im2latex | 8ef3378cb289846a5d85ce60785e11c6c5291700 | [
"Apache-2.0"
] | null | null | null | evaluate_img.py | diamondgloves/im2latex | 8ef3378cb289846a5d85ce60785e11c6c5291700 | [
"Apache-2.0"
] | null | null | null | import click
from os import path
from model.utils.data_generator import DataGenerator
from model.img2seq import Img2SeqModel
from model.utils.general import Config
from model.utils.text import Vocab, load_formulas
from model.utils.image import greyscale, build_images
from model.evaluation.text import score_files
from... | 35.62963 | 77 | 0.72973 |
62d9eca961a72a054fa5b8f3201a635866e1ad13 | 558 | py | Python | freecoinage/coins/admin.py | clifer/freecoinage | 0bc8300f09445ef6d8258b3ca782627e0d81e2f1 | [
"MIT"
] | null | null | null | freecoinage/coins/admin.py | clifer/freecoinage | 0bc8300f09445ef6d8258b3ca782627e0d81e2f1 | [
"MIT"
] | null | null | null | freecoinage/coins/admin.py | clifer/freecoinage | 0bc8300f09445ef6d8258b3ca782627e0d81e2f1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Coin, Currency, Algorithm, Miner, MinerType, MiningPool, MiningPoolType, Market, Daemon, Exchange
#from freecoinage.users.models import UserCoin
admin.site.register(Coin)
#admin.site.register(UserCoin)
admin.site.register(Currency)
admin.s... | 29.368421 | 118 | 0.801075 |
62da098f8ec1ae7b0baa248b158979543f7cb59c | 1,183 | py | Python | mainMenu/menuLayout.py | GingerNinja2962/wtc-lms-GUI | e65f5aa64919649690059da37f7bd608b823ca6a | [
"Apache-2.0"
] | 2 | 2021-04-08T11:08:12.000Z | 2021-05-20T11:02:26.000Z | mainMenu/menuLayout.py | GingerNinja2962/wtc-lms-GUI | e65f5aa64919649690059da37f7bd608b823ca6a | [
"Apache-2.0"
] | null | null | null | mainMenu/menuLayout.py | GingerNinja2962/wtc-lms-GUI | e65f5aa64919649690059da37f7bd608b823ca6a | [
"Apache-2.0"
] | 1 | 2021-04-08T11:08:15.000Z | 2021-04-08T11:08:15.000Z | import PySimpleGUI as sg
def layout():
"""
Create the layout for the main menu and return it as a list.
Returns
-------
mainMenuLayout : list
The layout to be used by the main menu GUI.
"""
settings_menu_items = ["Unused", ["&Change Theme", "General Settings"]]
exit_me... | 31.131579 | 79 | 0.492815 |
62da11cd3e312f5e88ad55a71cb190d2606b321c | 9,356 | py | Python | applications/tube-network/tube_network_example/src/migrations/timetable_migration.py | LivingMatrix/examples | 3ee2a212e47e1820b1940e4d0cb101380af08ff0 | [
"Apache-2.0"
] | null | null | null | applications/tube-network/tube_network_example/src/migrations/timetable_migration.py | LivingMatrix/examples | 3ee2a212e47e1820b1940e4d0cb101380af08ff0 | [
"Apache-2.0"
] | null | null | null | applications/tube-network/tube_network_example/src/migrations/timetable_migration.py | LivingMatrix/examples | 3ee2a212e47e1820b1940e4d0cb101380af08ff0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Grakn Labs 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 agreed to in writin... | 49.502646 | 125 | 0.565626 |
62da129882b63b2dd04675053a3cb1b9fd7b0269 | 3,238 | py | Python | HA_Addon/rvc2mqtt/entity/temperature.py | ccirrinc/rvc2mqtt | 108328323357e55be6242887b964ca936ea7b3fc | [
"Apache-2.0"
] | 1 | 2022-01-30T18:02:13.000Z | 2022-01-30T18:02:13.000Z | rvc2mqtt/entity/temperature.py | ccirrinc/rvc2mqtt | 108328323357e55be6242887b964ca936ea7b3fc | [
"Apache-2.0"
] | null | null | null | rvc2mqtt/entity/temperature.py | ccirrinc/rvc2mqtt | 108328323357e55be6242887b964ca936ea7b3fc | [
"Apache-2.0"
] | null | null | null | """
Temperature sensor
Copyright 2022 Sean Brogan
SPDX-License-Identifier: Apache-2.0
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.582418 | 80 | 0.662137 |
62da6fd69268ebce12fd1b92a8082bf1864a0b90 | 25,219 | py | Python | custodian/qchem/handlers.py | matk86/custodian | 5bea12a72bca3e64712422d6e9d252b69449826f | [
"MIT"
] | 1 | 2016-02-28T00:40:44.000Z | 2016-02-28T00:40:44.000Z | custodian/qchem/handlers.py | matk86/custodian | 5bea12a72bca3e64712422d6e9d252b69449826f | [
"MIT"
] | null | null | null | custodian/qchem/handlers.py | matk86/custodian | 5bea12a72bca3e64712422d6e9d252b69449826f | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, division
import shutil
import time
"""
This module implements error handlers for QChem runs. Currently tested only
for B3LYP DFT jobs.
"""
import copy
import glob
import json
import logging
import os
import re
import tarfile
from pymatgen.core.structure impor... | 45.603978 | 90 | 0.558825 |
62da8a3ad491d974c75acf694f96c8c620ed14d8 | 9,358 | py | Python | dcel/pyeps.py | anglyan/dcel | e1d5ac2e2ac73376956791419cb971b1b2627b07 | [
"BSD-2-Clause"
] | 13 | 2018-06-21T14:56:22.000Z | 2022-03-10T03:56:31.000Z | dcel/pyeps.py | anglyan/dcel | e1d5ac2e2ac73376956791419cb971b1b2627b07 | [
"BSD-2-Clause"
] | 3 | 2018-02-17T05:25:34.000Z | 2018-04-24T04:43:37.000Z | dcel/pyeps.py | anglyan/dcel | e1d5ac2e2ac73376956791419cb971b1b2627b07 | [
"BSD-2-Clause"
] | 10 | 2016-03-21T13:44:27.000Z | 2021-03-13T02:36:24.000Z | #! /usr/bin/env python
#Copyright 2008, Angel Yanguas-Gil
"""Crude ps and eps drawing of geometrical objects.
Geometrical objects are represented by PSClasses. These
are inserted in PSPlot, a container class with the
methods needed for saving the plots as ps and eps files.
Methods expects points passed as (x, y) pai... | 23.278607 | 72 | 0.561017 |
62da97ae2bb5699f86041976ce84b83ef49893ba | 1,670 | py | Python | reveries/common/usd/pipeline/setdress_prim_export.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | reveries/common/usd/pipeline/setdress_prim_export.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | reveries/common/usd/pipeline/setdress_prim_export.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z | from avalon import io
class SetDressPrimExport(object):
def __init__(self, output_path, shot_name):
self.output_path = output_path
self.shot_name = shot_name
self._export()
def _get_setdress_layer_usd(self):
from reveries.common import get_publish_files
# Get shot id... | 29.298246 | 82 | 0.626946 |
62dac87e84130a4b10d9097c8e7f516d335480b5 | 119 | py | Python | loam/boards/papilio.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 14 | 2017-10-08T09:16:10.000Z | 2021-11-27T19:12:24.000Z | loam/boards/papilio.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 7 | 2018-04-12T21:33:49.000Z | 2018-08-21T22:14:20.000Z | loam/boards/papilio.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 3 | 2018-07-24T04:55:02.000Z | 2019-12-30T08:12:39.000Z | from loam import Board
class Papilio(Board):
def __init__(self, name):
super(Papilio,self).__init__(name)
| 19.833333 | 42 | 0.697479 |
62daef8dd3dc78908ec0d748a372dd9575599ee6 | 2,904 | py | Python | unit2_assignment_01.py | AbhishekKumar1277/Mission-RnD-Python- | 3e039dd3016db7ff0d67ad1cce2123852f15d093 | [
"MIT"
] | null | null | null | unit2_assignment_01.py | AbhishekKumar1277/Mission-RnD-Python- | 3e039dd3016db7ff0d67ad1cce2123852f15d093 | [
"MIT"
] | null | null | null | unit2_assignment_01.py | AbhishekKumar1277/Mission-RnD-Python- | 3e039dd3016db7ff0d67ad1cce2123852f15d093 | [
"MIT"
] | null | null | null | __author__ = 'Kalyan'
notes = '''
1. Read instructions for each function carefully.
2. Feel free to create new functions if needed. Give good names!
3. Use builtins and datatypes that we have seen so far.
4. If something about the function spec is not clear, use the corresponding test
for clarification.
5. ... | 34.571429 | 134 | 0.59814 |
62db2201200fd45df54a6b90c997bb30ed9696bd | 6,575 | py | Python | pandaharvester/harvestermisc/arc_utils.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 11 | 2017-06-01T10:16:58.000Z | 2019-11-22T08:41:36.000Z | pandaharvester/harvestermisc/arc_utils.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 34 | 2016-10-25T19:15:24.000Z | 2021-03-05T12:59:04.000Z | pandaharvester/harvestermisc/arc_utils.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 17 | 2016-10-24T13:29:45.000Z | 2021-03-23T17:35:27.000Z | import inspect
import json
import pickle
import re
import arc
from pandaharvester.harvestercore import core_utils
class DataPoint:
'''
Wrapper around arc.datapoint_from_url() which does not clean up DataPoints
when python objects are destroyed, leading to connection leaking when used
with gridftp. Thi... | 36.731844 | 80 | 0.615817 |
62db382362d20af037ae19128f5bce3ce23d3fad | 407 | py | Python | sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_version.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_version.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_version.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
VERSION =... | 40.7 | 76 | 0.469287 |
62db4a67420c130b34f06acd96e0ddef3128632d | 1,102 | py | Python | tests/tests/test_unit/test_tools/test_image_processing.py | npeschke/cellfinder-core | 7a86a7d2c879c94da529ec6140f7e5c3f02bf288 | [
"BSD-3-Clause"
] | 5 | 2021-01-22T11:40:01.000Z | 2021-09-10T07:16:05.000Z | tests/tests/test_unit/test_tools/test_image_processing.py | npeschke/cellfinder-core | 7a86a7d2c879c94da529ec6140f7e5c3f02bf288 | [
"BSD-3-Clause"
] | 38 | 2021-01-22T11:50:29.000Z | 2022-03-11T11:04:06.000Z | tests/tests/test_unit/test_tools/test_image_processing.py | npeschke/cellfinder-core | 7a86a7d2c879c94da529ec6140f7e5c3f02bf288 | [
"BSD-3-Clause"
] | 12 | 2021-06-18T09:57:24.000Z | 2022-03-06T13:03:18.000Z | import random
import numpy as np
from cellfinder_core.tools import image_processing as img_tools
def test_crop_center_2d():
x_shape = random.randint(2, 100)
y_shape = random.randint(2, 100)
img = np.random.rand(y_shape, x_shape)
assert (
img == img_tools.crop_center_2d(img, crop_x=x_shape, c... | 29 | 76 | 0.694192 |
62db67eb4b2cb308f88d7de60f027290c3fd10f8 | 25,142 | py | Python | weatherflow2mqtt/weatherflow_mqtt.py | The-Deep-Sea/hass-weatherflow2mqtt | 50a1da505989daa2f2ed6fcc4b1e44b495d3d0ab | [
"MIT"
] | null | null | null | weatherflow2mqtt/weatherflow_mqtt.py | The-Deep-Sea/hass-weatherflow2mqtt | 50a1da505989daa2f2ed6fcc4b1e44b495d3d0ab | [
"MIT"
] | null | null | null | weatherflow2mqtt/weatherflow_mqtt.py | The-Deep-Sea/hass-weatherflow2mqtt | 50a1da505989daa2f2ed6fcc4b1e44b495d3d0ab | [
"MIT"
] | null | null | null | """Program listening to the UDP Broadcast from
a WeatherFlow Weather Station and publishing
sensor data to MQTT.
"""
import json
from typing import OrderedDict
import paho.mqtt.client as mqtt
import asyncio
import logging
import time
from datetime import datetime
import sys
import os
from weatherflow2mqtt.aioud... | 48.164751 | 151 | 0.594742 |
62db7fce538e7a65d9ae933682af1c6b51f81285 | 2,701 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/messages/get_web_page_preview.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/messages/get_web_page_preview.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/messages/get_web_page_preview.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... | 33.345679 | 110 | 0.624213 |
62db8ab01076c91eca2a1c13ea0b2e492cd79ad6 | 5,509 | py | Python | abl/vpath/base/zip.py | AbletonAG/abl.vpath | 74923ef63e3fee23ae0bbb3d5fab9b1a9b8158fe | [
"MIT"
] | null | null | null | abl/vpath/base/zip.py | AbletonAG/abl.vpath | 74923ef63e3fee23ae0bbb3d5fab9b1a9b8158fe | [
"MIT"
] | 4 | 2015-09-21T15:14:11.000Z | 2018-09-13T14:28:48.000Z | abl/vpath/base/zip.py | AbletonAG/abl.vpath | 74923ef63e3fee23ae0bbb3d5fab9b1a9b8158fe | [
"MIT"
] | 1 | 2017-05-31T14:22:44.000Z | 2017-05-31T14:22:44.000Z | #******************************************************************************
# (C) 2010 Ableton AG
# Author: Stephan Diehl <stephan.diehl@ableton.com>
#******************************************************************************
from io import BytesIO
from zipfile import ZipFile
from .fs import FileSystem, BaseU... | 25.387097 | 79 | 0.574333 |
62dbb0d746a8d210c26f0ea1e472c4e2117b1615 | 2,738 | py | Python | cogs/level.py | auredentan/DiscordBdBot | f8097cd2786037cf8b3624d3dc4aebbdd2eeb559 | [
"MIT"
] | null | null | null | cogs/level.py | auredentan/DiscordBdBot | f8097cd2786037cf8b3624d3dc4aebbdd2eeb559 | [
"MIT"
] | null | null | null | cogs/level.py | auredentan/DiscordBdBot | f8097cd2786037cf8b3624d3dc4aebbdd2eeb559 | [
"MIT"
] | 1 | 2019-06-02T10:46:20.000Z | 2019-06-02T10:46:20.000Z | import discord
from discord.ext import commands
from db.models import Member as DBMember
import logging
from discord.channel import Channel
from discord.ext.commands.bot import Bot
from discord.member import Member
from discord.message import Message
from sqlalchemy.orm.session import Session
from typing import Dict,... | 35.102564 | 118 | 0.596421 |
62dbb537b1a53c1de29aa2155c20e56d6af2fce7 | 2,488 | py | Python | steps/utils/report_utils.py | chris414862/TrilingualLossProj | fead084748b5391e8558167466844368ef5293ab | [
"BSD-3-Clause"
] | null | null | null | steps/utils/report_utils.py | chris414862/TrilingualLossProj | fead084748b5391e8558167466844368ef5293ab | [
"BSD-3-Clause"
] | null | null | null | steps/utils/report_utils.py | chris414862/TrilingualLossProj | fead084748b5391e8558167466844368ef5293ab | [
"BSD-3-Clause"
] | null | null | null | import datetime
from losses.funcs.loss_func_utils import dot_sim_matrix, cosine_sim_matrix
def report_initial_info(batch_size, tot_size, updates_per_epoch, device, args):
print('TRAINER: Using device type %s' % device)
if device == "cuda":
print('TRAINER: Found %d GPUs' % torch.cuda.device_count())
... | 34.082192 | 113 | 0.576367 |
62dc1d34dcebb832fda3660755e1611c38b04182 | 2,143 | py | Python | snowpaw/snowpaw.py | LTTPP/whitehoof | 900b8f8c226c27f3d641e209359cf7ee2ea21033 | [
"MIT"
] | null | null | null | snowpaw/snowpaw.py | LTTPP/whitehoof | 900b8f8c226c27f3d641e209359cf7ee2ea21033 | [
"MIT"
] | null | null | null | snowpaw/snowpaw.py | LTTPP/whitehoof | 900b8f8c226c27f3d641e209359cf7ee2ea21033 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Liu Jianwei. All Rights Reserved.
# Author: Liu Jianwei
# Contact: tungliu@126.com
# Link: https://liujianwei.tech/
"""snowpaw.py"""
from __future__ import print_function
import logging
import time
from functools import wraps
from decimal import Deci... | 22.092784 | 81 | 0.612226 |
62dc331b3e9126561cee202b3bb3aa5d0dac4fe9 | 9,016 | py | Python | ote_sdk/ote_sdk/tests/configuration/test_configurable_parameters.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_sdk/ote_sdk/tests/configuration/test_configurable_parameters.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_sdk/ote_sdk/tests/configuration/test_configurable_parameters.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2021-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
import copy
import pytest
from ote_sdk.configuration.configurable_parameters import ConfigurableParameters
from ote_sdk.configuration.elements import metadata_keys
from ote_sdk.configuration.enums import AutoHPOState
from ote_sdk.conf... | 40.071111 | 108 | 0.669476 |
62dc3777d276565e484d6387416455d8ea86333b | 16,305 | py | Python | CadVlan/BlockRules/views.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 17 | 2015-05-19T20:03:45.000Z | 2022-03-24T06:19:47.000Z | CadVlan/BlockRules/views.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 41 | 2015-01-27T18:36:07.000Z | 2021-06-10T20:34:03.000Z | CadVlan/BlockRules/views.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 19 | 2016-09-12T07:35:42.000Z | 2022-01-28T23:46:11.000Z | # -*- coding:utf-8 -*-
# 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 "Lic... | 35.064516 | 126 | 0.595523 |
62dc469291316da3d8f32a363b7e6518b400169d | 650 | py | Python | atom/tuple.py | enthought/atom | 1f194e3550d62c4ca1d79521dff97531ffe3f0ac | [
"BSD-3-Clause"
] | null | null | null | atom/tuple.py | enthought/atom | 1f194e3550d62c4ca1d79521dff97531ffe3f0ac | [
"BSD-3-Clause"
] | 1 | 2020-12-04T10:11:07.000Z | 2020-12-04T10:13:46.000Z | atom/tuple.py | enthought/atom | 1f194e3550d62c4ca1d79521dff97531ffe3f0ac | [
"BSD-3-Clause"
] | 1 | 2020-12-04T10:05:32.000Z | 2020-12-04T10:05:32.000Z | #------------------------------------------------------------------------------
# Copyright (c) 2013, Enthought, Inc.
# All rights reserved.
#------------------------------------------------------------------------------
from .catom import Member, DEFAULT_FACTORY, DEFAULT_VALUE, VALIDATE_TUPLE
class Tuple(Member):
... | 30.952381 | 79 | 0.498462 |
62dc528453d1d437e02bcb9ffdb30168205f5a72 | 19,972 | py | Python | wasatch/utils.py | adiravishankara/Wasatch.PY | 058b3de2c9399e9aea6347fa360f9c7dbbf296aa | [
"MIT"
] | null | null | null | wasatch/utils.py | adiravishankara/Wasatch.PY | 058b3de2c9399e9aea6347fa360f9c7dbbf296aa | [
"MIT"
] | null | null | null | wasatch/utils.py | adiravishankara/Wasatch.PY | 058b3de2c9399e9aea6347fa360f9c7dbbf296aa | [
"MIT"
] | null | null | null | # ##############################################################################
# #
# utils.py #
# ... | 33.679595 | 119 | 0.601893 |
62dc6292ca037cfa38585a4c3e54b5bcc90a4149 | 12,505 | py | Python | venv/Lib/site-packages/pyrogram/raw/base/update.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/base/update.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/base/update.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... | 89.321429 | 2,992 | 0.737625 |
62dc772cfe2c9d838c94bcb1595312c2035dd62e | 5,235 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_persistent_volume_status.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_persistent_volume_status.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_persistent_volume_status.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | 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: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Per... | 30.614035 | 185 | 0.598854 |
62dc9786ba1052ca30f1f65fe43424731dcc2f2e | 11,962 | py | Python | mslib/mscolab/_tests/test_sockets_manager.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 33 | 2020-12-04T04:29:28.000Z | 2022-03-05T17:11:49.000Z | mslib/mscolab/_tests/test_sockets_manager.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 614 | 2020-12-06T16:54:44.000Z | 2022-03-31T07:41:02.000Z | mslib/mscolab/_tests/test_sockets_manager.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 51 | 2020-12-04T15:10:46.000Z | 2022-03-20T02:02:11.000Z | # -*- coding: utf-8 -*-
"""
mslib.mscolab._tests.test_sockets.py
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests for sockets module
This file is part of mss.
:copyright: Copyright 2019 Shivashis Padhi
:copyright: Copyright 2019-2021 by the mss team, see AUTHORS.
:license: APACHE-2.0, see LICE... | 37.735016 | 102 | 0.609346 |
62dc97d03e54c9b4450f1a210a7ca5254c4d0481 | 92,516 | py | Python | tencentcloud/dnspod/v20210323/models.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | 465 | 2018-04-27T09:54:59.000Z | 2022-03-29T02:18:01.000Z | tencentcloud/dnspod/v20210323/models.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | 91 | 2018-04-27T09:48:11.000Z | 2022-03-12T08:04:04.000Z | tencentcloud/dnspod/v20210323/models.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | 232 | 2018-05-02T08:02:46.000Z | 2022-03-30T08:02:48.000Z | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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... | 29.416852 | 122 | 0.590265 |
62dcd7c526774654174070a13fdd51e219364b7d | 1,359 | py | Python | tests/utils/request_factory.py | EnvSys/django-moderation | afa80926354bdc263d6d9214eb983000334d77e2 | [
"BSD-3-Clause"
] | 97 | 2015-03-21T02:18:39.000Z | 2022-02-22T01:30:19.000Z | tests/utils/request_factory.py | EnvSys/django-moderation | afa80926354bdc263d6d9214eb983000334d77e2 | [
"BSD-3-Clause"
] | 85 | 2015-05-05T05:22:23.000Z | 2022-03-28T10:32:00.000Z | tests/utils/request_factory.py | EnvSys/django-moderation | afa80926354bdc263d6d9214eb983000334d77e2 | [
"BSD-3-Clause"
] | 70 | 2015-04-13T07:29:32.000Z | 2022-03-24T10:54:58.000Z | """
RequestFactory mock class,
snippet taken from http://www.djangosnippets.org/snippets/963/
"""
from io import StringIO
from django.test import Client
from django.core.handlers.wsgi import WSGIRequest
class RequestFactory(Client):
"""
Class that lets you create mock Request objects for use in testing.
... | 28.914894 | 77 | 0.613687 |
62dce0ef7155e2f6388f4bf024705d3d28b1ed88 | 983 | py | Python | src/preprocessing/raw_audio_to_spectrogram_save_data.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 6 | 2020-08-03T03:13:25.000Z | 2022-02-11T08:32:10.000Z | src/preprocessing/raw_audio_to_spectrogram_save_data.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 1 | 2020-09-08T16:10:38.000Z | 2020-09-08T16:10:38.000Z | src/preprocessing/raw_audio_to_spectrogram_save_data.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 2 | 2020-08-03T21:37:21.000Z | 2021-03-26T02:19:17.000Z | import numpy as np
import matplotlib.pyplot as plt
import pickle
import librosa
import pdb
save_path = '/scratch/speech/raw_audio_dataset/'
f = open('/scratch/speech/raw_audio_dataset/raw_audio_full.pkl', 'rb')
data = pickle.load(f)
sample_rate = 16000
nfft = pow(2, 9)
def create_data(data, n_fft):
utterances_ne... | 32.766667 | 151 | 0.690743 |
62dcf445d17d3d349085d50a95fad27b346618cd | 2,323 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/update_message_id.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/update_message_id.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/update_message_id.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... | 30.973333 | 103 | 0.608696 |
62dcfd1eefb891647f5322756500cfcf795cbaef | 4,343 | py | Python | deployments/prod/environment.py | DataBiosphere/azul | abcaa7c6a04f1f5b8fd74e449e254eff6c433913 | [
"Apache-2.0"
] | 17 | 2018-07-20T02:53:35.000Z | 2022-01-11T12:27:31.000Z | deployments/prod/environment.py | DataBiosphere/azul | abcaa7c6a04f1f5b8fd74e449e254eff6c433913 | [
"Apache-2.0"
] | 3,887 | 2018-06-29T15:23:02.000Z | 2022-03-31T23:29:37.000Z | deployments/prod/environment.py | DataBiosphere/azul | abcaa7c6a04f1f5b8fd74e449e254eff6c433913 | [
"Apache-2.0"
] | 21 | 2018-07-06T03:17:33.000Z | 2022-02-18T04:10:02.000Z | import json
from typing import (
Mapping,
Optional,
)
def env() -> Mapping[str, Optional[str]]:
"""
Returns a dictionary that maps environment variable names to values. The
values are either None or strings. String values can contain references to
other environment variables in the form `{FO... | 39.126126 | 127 | 0.565508 |
62dd3187855df01a5db430d81c80b2c9ac47a445 | 613 | py | Python | bloodloan/ui/templ.py | edenbaus/jupyter-mortgage | 30303332864cb7e40446cae1b126ae061043d922 | [
"Unlicense"
] | 9 | 2017-12-22T18:24:48.000Z | 2021-12-21T11:17:50.000Z | bloodloan/ui/templ.py | edenbaus/jupyter-mortgage | 30303332864cb7e40446cae1b126ae061043d922 | [
"Unlicense"
] | 1 | 2019-05-21T21:40:20.000Z | 2019-05-21T21:40:20.000Z | bloodloan/ui/templ.py | edenbaus/jupyter-mortgage | 30303332864cb7e40446cae1b126ae061043d922 | [
"Unlicense"
] | 5 | 2017-12-04T20:37:19.000Z | 2021-01-23T18:19:17.000Z | """Templ: a Temple of Templates
"""
import os
from mako.template import Template
SCRIPTDIR = os.path.dirname(os.path.realpath(__file__))
TEMPL = os.path.join(SCRIPTDIR, 'templ')
class Templ:
"""A list of templates
"""
Close = Template(filename=os.path.join(TEMPL, 'close.mako'))
SchedulePreface = ... | 27.863636 | 85 | 0.717781 |
62dd3eec018650c76f23dcd89d623059d575f48c | 2,279 | py | Python | maths/softmax.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | maths/softmax.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | maths/softmax.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | 1 | 2020-06-26T09:46:17.000Z | 2020-06-26T09:46:17.000Z | '''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | 30.386667 | 77 | 0.701185 |
62dd47942602bf06fdeb956341dd358901e0ad49 | 3,673 | py | Python | test/vanilla/low-level/Expected/AcceptanceTests/ObjectTypeLowLevel/objecttypelowlevel/rest/_request_builders.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/low-level/Expected/AcceptanceTests/ObjectTypeLowLevel/objecttypelowlevel/rest/_request_builders.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/low-level/Expected/AcceptanceTests/ObjectTypeLowLevel/objecttypelowlevel/rest/_request_builders.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 34.980952 | 101 | 0.652872 |
62dd5ecbfac2ff9e88f504da11af1477fc2bb2d1 | 446 | py | Python | call_forward_flask/__init__.py | youssefaloua/call-forwarding-flask | d361c916f7a9599e32dd99e3bd2de60238f7020d | [
"MIT"
] | 12 | 2017-04-21T07:29:23.000Z | 2021-08-24T21:17:28.000Z | call_forward_flask/__init__.py | youssefaloua/call-forwarding-flask | d361c916f7a9599e32dd99e3bd2de60238f7020d | [
"MIT"
] | 164 | 2017-04-21T07:22:34.000Z | 2022-03-31T23:28:41.000Z | call_forward_flask/__init__.py | youssefaloua/call-forwarding-flask | d361c916f7a9599e32dd99e3bd2de60238f7020d | [
"MIT"
] | 6 | 2020-06-18T11:47:19.000Z | 2022-03-29T00:29:36.000Z |
from call_forward_flask.config import (
config_env_files,
)
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///dev.sqlite'
db = SQLAlchemy()
db.init_app(app)
environment = app.config.get('ENV', 'production')
app.config.from... | 20.272727 | 62 | 0.775785 |
62dd6248a8712b9dc1596b4d4861ab3595f5925f | 694 | py | Python | src/bromine/utils/image.py | Etiqa/bromine | cabf0931f5a06796c26fdc7fb9f7ecf147554fd5 | [
"BSD-2-Clause"
] | 2 | 2018-09-20T12:37:01.000Z | 2021-08-30T14:44:25.000Z | src/bromine/utils/image.py | Etiqa/bromine | cabf0931f5a06796c26fdc7fb9f7ecf147554fd5 | [
"BSD-2-Clause"
] | null | null | null | src/bromine/utils/image.py | Etiqa/bromine | cabf0931f5a06796c26fdc7fb9f7ecf147554fd5 | [
"BSD-2-Clause"
] | null | null | null | from PIL import Image
from six import BytesIO
def image_from_bytes(bytes_):
return Image.open(BytesIO(bytes_))
def png_format(image):
bytes_ = BytesIO()
image.save(bytes_, 'PNG')
return bytes_.getvalue()
class ScreenshotFromPngBytes(object):
def __init__(self, png_bytes):
self._png_by... | 18.756757 | 48 | 0.684438 |
62dd8e6f435606e8f52d9cf146bef11520f9e051 | 6,442 | py | Python | open-hackathon-server/src/hackathon/user/user_mgr.py | akondasif/open-hackathon-bak_01 | d60ad764edf689a95b6ffcc56815338b380801de | [
"MIT"
] | null | null | null | open-hackathon-server/src/hackathon/user/user_mgr.py | akondasif/open-hackathon-bak_01 | d60ad764edf689a95b6ffcc56815338b380801de | [
"MIT"
] | null | null | null | open-hackathon-server/src/hackathon/user/user_mgr.py | akondasif/open-hackathon-bak_01 | d60ad764edf689a95b6ffcc56815338b380801de | [
"MIT"
] | 1 | 2019-04-03T23:13:55.000Z | 2019-04-03T23:13:55.000Z | # -*- coding: utf-8 -*-
#
# -----------------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this softw... | 39.521472 | 92 | 0.588171 |
62dd9e52621682da5906a8598f30ce985ed6242f | 8,092 | py | Python | detect.py | tailtq/TFLite-Retinaface | 93a16087d672f8e0efbf981cc61e5369dedb66f0 | [
"MIT"
] | 2 | 2021-06-01T06:27:39.000Z | 2022-03-18T13:05:03.000Z | detect.py | tailtq/TFLite-Retinaface | 93a16087d672f8e0efbf981cc61e5369dedb66f0 | [
"MIT"
] | null | null | null | detect.py | tailtq/TFLite-Retinaface | 93a16087d672f8e0efbf981cc61e5369dedb66f0 | [
"MIT"
] | null | null | null | from __future__ import print_function
import os
import argparse
import torch
import torch.backends.cudnn as cudnn
import numpy as np
from data import cfg_mnet, cfg_re50
from layers.functions.prior_box import PriorBox
from utils.nms.py_cpu_nms import py_cpu_nms
import cv2
from models.retinaface import RetinaFace
from ut... | 41.71134 | 187 | 0.613075 |
62ddbc58ff09990018ff0cd2f52cb6afce46492d | 298 | py | Python | snf/train/datatransforms.py | AnonICML/SelfNormalizingFlows | f924e786b83e4766241c6ece90b5195a3acc9e64 | [
"MIT"
] | 66 | 2020-11-17T12:06:52.000Z | 2022-02-05T23:58:15.000Z | snf/train/datatransforms.py | AnonICML/SelfNormalizingFlows | f924e786b83e4766241c6ece90b5195a3acc9e64 | [
"MIT"
] | 1 | 2021-07-26T19:29:32.000Z | 2021-07-27T16:23:03.000Z | snf/train/datatransforms.py | AnonICML/SelfNormalizingFlows | f924e786b83e4766241c6ece90b5195a3acc9e64 | [
"MIT"
] | 8 | 2020-11-17T17:42:51.000Z | 2022-03-14T14:12:37.000Z | import torch
import numpy as np
class ToTensorNoNorm():
def __call__(self, X_i):
X_i = np.array(X_i, copy=False)
if len(X_i.shape) == 2:
# Add channel dim.
X_i = X_i[:, :, None]
return torch.from_numpy(np.array(X_i, copy=True)).permute(2, 0, 1) | 27.090909 | 74 | 0.573826 |
62ddca55601a18c548025bb81f9f7fa57fe19762 | 12,898 | py | Python | samples/Windows/autoExposure.py | pixelink-support/PixelinkPythonWrapper | ad7ba24c550825eb12f16e1eaf9c66f35db52a8f | [
"MIT"
] | 5 | 2020-04-21T07:18:44.000Z | 2021-12-28T17:33:38.000Z | samples/Windows/autoExposure.py | pixelink-support/PixelinkPythonWrapper | ad7ba24c550825eb12f16e1eaf9c66f35db52a8f | [
"MIT"
] | 1 | 2020-05-19T19:08:25.000Z | 2020-05-22T10:24:11.000Z | samples/Windows/autoExposure.py | pixelink-support/PixelinkPythonWrapper | ad7ba24c550825eb12f16e1eaf9c66f35db52a8f | [
"MIT"
] | 1 | 2021-11-16T18:55:54.000Z | 2021-11-16T18:55:54.000Z | """
autoExposure.py
This demonstrates how to control a camera's autoexposure features.
Option 1) Enable autoexposure (FeatureFlags.AUTO)
When autoexposure is enabled, the camera controls the exposure based on its own internal algorithm.
The exposure will be continuously adjusted over time by the camera until a... | 38.732733 | 139 | 0.669716 |
62ddcbf93f8298e6b03f5d1a1f0a94d758bdc92c | 11,332 | py | Python | Assignment/Assignment2/word2vec_김민정/word2vec.py | Tobigs-team/Text-Seminar | 5db6e28e3345f276973113608fd0532480123fc7 | [
"MIT"
] | 7 | 2021-01-07T16:28:39.000Z | 2022-03-06T00:34:48.000Z | Assignment/Assignment2/word2vec_김민정/word2vec.py | jinseock95/Text-Seminar | 5db6e28e3345f276973113608fd0532480123fc7 | [
"MIT"
] | 2 | 2020-11-05T07:19:25.000Z | 2020-12-30T03:09:44.000Z | Assignment/Assignment2/word2vec_김민정/word2vec.py | Tobigs-team/Text-Seminar | 5db6e28e3345f276973113608fd0532480123fc7 | [
"MIT"
] | 18 | 2020-10-07T12:10:45.000Z | 2020-12-30T10:55:25.000Z | # %%
#!/usr/bin/env python
import numpy as np
import random
from utils.gradcheck import gradcheck_naive
from utils.utils import normalizeRows, softmax
def sigmoid(x):
"""
Compute the sigmoid function for the input here.
Arguments:
x -- A scalar or numpy array.
Return:
s -- sigmoid(x)
"""... | 32.846377 | 156 | 0.638457 |
62dddb0c85ba9facc73585bce6017575e44d384e | 5,704 | py | Python | python/vineyard/launcher/script.py | v6d-io/v6d | 8f692c9bd95dad06c304a0020d4f946a5756c1e0 | [
"Apache-2.0",
"CC0-1.0"
] | 117 | 2021-05-30T05:21:03.000Z | 2022-03-26T03:35:50.000Z | python/vineyard/launcher/script.py | v6d-io/v6d | 8f692c9bd95dad06c304a0020d4f946a5756c1e0 | [
"Apache-2.0",
"CC0-1.0"
] | 294 | 2021-05-28T03:04:26.000Z | 2022-03-31T07:09:45.000Z | python/vineyard/launcher/script.py | v6d-io/v6d | 8f692c9bd95dad06c304a0020d4f946a5756c1e0 | [
"Apache-2.0",
"CC0-1.0"
] | 30 | 2021-05-31T13:34:57.000Z | 2022-03-25T06:39:47.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2020-2021 Alibaba Group Holding Limited.
#
# 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/LI... | 31.340659 | 83 | 0.569425 |
62ddef1d885dc1ed9eff48389a9188a457902ba3 | 16,975 | py | Python | salt/states/pkg.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | salt/states/pkg.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | salt/states/pkg.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | '''
Installation of packages using OS package managers such as yum or apt-get.
==========================================================================
Salt can manage software packages via the pkg state module, packages can be
set up to be installed, latest, removed and purged. Package management
declarations are t... | 34.15493 | 79 | 0.494021 |
62ddf22e1ca9eb093b170cd73926e9352738f29d | 1,500 | py | Python | qube/lint/domains/cli.py | qbicsoftware/qube | 59d6d034d6def13f6456cc80de0f56029b24af03 | [
"MIT"
] | 2 | 2020-04-16T18:50:06.000Z | 2020-04-19T10:39:50.000Z | qube/lint/domains/cli.py | qbicsoftware/qube-cli | 59d6d034d6def13f6456cc80de0f56029b24af03 | [
"MIT"
] | 202 | 2020-09-25T07:48:39.000Z | 2022-03-28T04:04:54.000Z | qube/lint/domains/cli.py | qbicsoftware/qube | 59d6d034d6def13f6456cc80de0f56029b24af03 | [
"MIT"
] | null | null | null | import os
from qube.lint.TemplateLinter import TemplateLinter, files_exist_linting, GetLintingFunctionsMeta
CWD = os.getcwd()
class CliJavaLint(TemplateLinter, metaclass=GetLintingFunctionsMeta):
def __init__(self, path):
super().__init__(path)
def lint(self):
super().lint_project(self, sel... | 30.612245 | 99 | 0.611333 |
62de34fb86792439155e9bdec0d6a783fcbff61e | 1,688 | py | Python | src/data/make_vehicleid.py | zh272/AIGOGO | 0255cf8c4776358b73ee6b1792325a151a0cfa78 | [
"BSD-3-Clause"
] | null | null | null | src/data/make_vehicleid.py | zh272/AIGOGO | 0255cf8c4776358b73ee6b1792325a151a0cfa78 | [
"BSD-3-Clause"
] | null | null | null | src/data/make_vehicleid.py | zh272/AIGOGO | 0255cf8c4776358b73ee6b1792325a151a0cfa78 | [
"BSD-3-Clause"
] | null | null | null | import time
import requests
import numpy as np
import os
import pandas as pd
import requests
import time
from bs4 import BeautifulSoup
def get_external_vehicleid():
'''
Input:
None
Output:
df_vehicleid
Description:
get the map of vehicles to replacement cost, damage cost id, and... | 29.103448 | 188 | 0.660545 |
62de555d175358a049cd7bf0616f4c0c6f5315c4 | 509 | py | Python | terrascript/provider/joerx/cheesecake.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/provider/joerx/cheesecake.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/provider/joerx/cheesecake.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/provider/joerx/cheesecake.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:13:47 UTC)
import terrascript
class cheesecake(terrascript.Provider):
"""Provides cheesecakes"""
__description__ = "Provides cheesecakes"
__namespace__ = "joerx"
__name__ = "cheesecake"
__so... | 25.45 | 73 | 0.719057 |
62de67ea50f0c91c36690d7de2a664e798ac08af | 19,142 | py | Python | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_extensions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_extensions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_extensions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 43.603645 | 231 | 0.675478 |
62de6a3503a915439bf987983b5d3e100a752444 | 670 | py | Python | raspi-4/changeData.py | EasternEdgeRobotics/2019 | 19f833262e7bdd026fffc0ac894327369d6bb66f | [
"MIT"
] | 1 | 2020-07-24T20:40:49.000Z | 2020-07-24T20:40:49.000Z | raspi-4/changeData.py | EasternEdgeRobotics/2019 | 19f833262e7bdd026fffc0ac894327369d6bb66f | [
"MIT"
] | 9 | 2019-08-23T01:39:53.000Z | 2019-08-23T01:42:48.000Z | raspi-4/changeData.py | EasternEdgeRobotics/2019 | 19f833262e7bdd026fffc0ac894327369d6bb66f | [
"MIT"
] | null | null | null | import sys
import serial
# Serial setup
ser = serial.Serial('/dev/ttyACM0', 115200)
def changeData(ser, secondary):
send = ("{ sensorsreading:" + str(secondary) + "," + str(secondary) + " }")
if (ser.isOpen() is False):
ser.open()
ser.write(send.encode("utf-8"))
ser.flush()
if __name__ == "__... | 24.814815 | 79 | 0.565672 |
62dec55ea5d049234104ecafc4f76355aad71d50 | 742 | py | Python | python/math/1385_find_the_distance_value_between_two_arrays.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/math/1385_find_the_distance_value_between_two_arrays.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/math/1385_find_the_distance_value_between_two_arrays.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 1 | 2019-07-24T02:15:31.000Z | 2019-07-24T02:15:31.000Z | class Solution(object):
def findTheDistanceValue(self, arr1, arr2, d):
"""
:type arr1: List[int]
:type arr2: List[int]
:type d: int
:rtype: int
"""
res = 0
for a1 in arr1:
dv = True
for a2 in arr2:
if abs(a1 - a2... | 27.481481 | 78 | 0.447439 |
62ded029f82dff3fd0687f2f67cce617f6523b44 | 2,711 | py | Python | rally/plugins/openstack/scenarios/ceilometer/meters.py | LorenzoBianconi/rally | 2bbd7ee590cca048fb4ad6a8eefc484989979ff8 | [
"Apache-2.0"
] | 1 | 2021-09-29T02:16:09.000Z | 2021-09-29T02:16:09.000Z | rally/plugins/openstack/scenarios/ceilometer/meters.py | noah8713/rally-ovs | 2434787c2cf4ca267108966c4ddc55ded3c333d9 | [
"Apache-2.0"
] | 1 | 2020-07-14T11:29:31.000Z | 2020-07-14T11:29:31.000Z | rally/plugins/openstack/scenarios/ceilometer/meters.py | noah8713/rally-ovs | 2434787c2cf4ca267108966c4ddc55ded3c333d9 | [
"Apache-2.0"
] | 1 | 2020-07-02T01:33:48.000Z | 2020-07-02T01:33:48.000Z | # 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... | 43.031746 | 78 | 0.678347 |
62dee07d7a4a0cfd8f3814840c15f9f1d2f5ad4a | 1,053 | py | Python | src/wired_components/request/models.py | pauleveritt/wired_components | a9072d5fc48680d5ff895887842ffd0f06bc0081 | [
"MIT"
] | 1 | 2019-09-15T12:30:44.000Z | 2019-09-15T12:30:44.000Z | src/wired_components/request/models.py | pauleveritt/wired_components | a9072d5fc48680d5ff895887842ffd0f06bc0081 | [
"MIT"
] | null | null | null | src/wired_components/request/models.py | pauleveritt/wired_components | a9072d5fc48680d5ff895887842ffd0f06bc0081 | [
"MIT"
] | null | null | null | from __future__ import annotations
from dataclasses import dataclass
from wired.dataclasses import injected
from zope.interface import Interface, implementer
from wired_components.resource import IRoot, IResource
from .utils import relative_static_path, resource_path, relative_path
from ..resource import Resource, R... | 28.459459 | 71 | 0.744539 |
62defc25166108c3fc5a93f84dfa37dc25ceee57 | 1,424 | py | Python | upol_search_engine/celery_app.py | UPOLSearch/UPOL-Search-Engine | 791f0a4a01b4d034637ee6dba4cfd254ae8f3f50 | [
"MIT"
] | 1 | 2022-02-02T17:49:23.000Z | 2022-02-02T17:49:23.000Z | upol_search_engine/celery_app.py | UPOLSearch/UPOL-Search-Engine | 791f0a4a01b4d034637ee6dba4cfd254ae8f3f50 | [
"MIT"
] | 5 | 2017-10-09T09:23:32.000Z | 2017-11-13T08:17:08.000Z | upol_search_engine/celery_app.py | UPOLSearch/UPOL-Search-Engine | 791f0a4a01b4d034637ee6dba4cfd254ae8f3f50 | [
"MIT"
] | null | null | null | import datetime
from celery import Celery
from kombu import Exchange, Queue
from upol_search_engine import settings
def next_start_each_n_days():
days = settings.CONFIG.getfloat('Crawler', 'crawl_every_n_days')
return days
class Config(object):
broker_url = 'amqp://guest:guest@localhost:5672//'
re... | 24.135593 | 74 | 0.603933 |
62df23743fded84502d9c1f59f01a907fe9b975b | 1,851 | py | Python | blatann/utils/__init__.py | dkkeller/blatann | 2b72df4812f68fb718ab96d16c82343ee35969a5 | [
"BSD-3-Clause"
] | null | null | null | blatann/utils/__init__.py | dkkeller/blatann | 2b72df4812f68fb718ab96d16c82343ee35969a5 | [
"BSD-3-Clause"
] | null | null | null | blatann/utils/__init__.py | dkkeller/blatann | 2b72df4812f68fb718ab96d16c82343ee35969a5 | [
"BSD-3-Clause"
] | null | null | null | import time
import logging
import sys
from blatann.utils import _threading
LOG_FORMAT = "[%(asctime)s] [%(threadName)s] [%(name)s.%(funcName)s:%(lineno)s] [%(levelname)s]: %(message)s"
def setup_logger(name=None, level="DEBUG"):
logger = logging.getLogger(name)
logger.setLevel(level)
formatt... | 25.708333 | 110 | 0.599136 |
62df4b3ca02804078678b6efff354eb864b1318d | 3,333 | py | Python | google-cloud-sdk/.install/.backup/lib/surface/compute/rolling_updates/rollback.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/compute/rolling_updates/rollback.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/compute/rolling_updates/rollback.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2014 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 ag... | 35.83871 | 80 | 0.710771 |
62df5ad0495e848ca8a39549f640f380d09c4e71 | 11,481 | py | Python | msa.py | tgillet1/PASTA | 454d7b4595d9ed28ae40c8629d33d7403c579020 | [
"MIT"
] | null | null | null | msa.py | tgillet1/PASTA | 454d7b4595d9ed28ae40c8629d33d7403c579020 | [
"MIT"
] | null | null | null | msa.py | tgillet1/PASTA | 454d7b4595d9ed28ae40c8629d33d7403c579020 | [
"MIT"
] | 1 | 2021-09-28T12:11:30.000Z | 2021-09-28T12:11:30.000Z | from pairwise import NeedlemanWunsch, PositionWeightedMatcher
import math
from sequence import NeuriteSequence, MultipleSequenceAlignment
import concurrent.futures
import sequence
from collections import Counter
# from random import shuffle
from tree import TreeLogicFactory
from buffer import XMLBuildWriter
class Mult... | 43.988506 | 152 | 0.636965 |
62df6a5c80260ca53f8afd142e60348048a7d644 | 663 | py | Python | tests/integration/test_smoke.py | ssichynskyi/web_metric_collection | 3ec4907fb21bcb04526b193989e6dd073d55294b | [
"MIT"
] | null | null | null | tests/integration/test_smoke.py | ssichynskyi/web_metric_collection | 3ec4907fb21bcb04526b193989e6dd073d55294b | [
"MIT"
] | null | null | null | tests/integration/test_smoke.py | ssichynskyi/web_metric_collection | 3ec4907fb21bcb04526b193989e6dd073d55294b | [
"MIT"
] | null | null | null | import pytest
from src.service import TOPIC, PRODUCER as producer
"""This test ensure that kafka producer is properly configured
and the overall setup (including Aiven kafka broker) is working"""
@pytest.mark.smoke
def test_smoke_kafka_producer():
with producer:
producer._producer.config['max_block_ms'... | 24.555556 | 66 | 0.68175 |
62df6cce0ad9aec2be80ff8476ef02b3d10ba2b2 | 11,082 | py | Python | train_bottleneck.py | sesmond/keras-yolo3-darknet | 8e80de47cce689222c7d9e06030de8c1b4b897cd | [
"MIT"
] | null | null | null | train_bottleneck.py | sesmond/keras-yolo3-darknet | 8e80de47cce689222c7d9e06030de8c1b4b897cd | [
"MIT"
] | null | null | null | train_bottleneck.py | sesmond/keras-yolo3-darknet | 8e80de47cce689222c7d9e06030de8c1b4b897cd | [
"MIT"
] | null | null | null | # """
# Retrain the YOLO model for your own dataset.
# """
# import os
# import numpy as np
# import keras.backend as K
# from keras.layers import Input, Lambda
# from keras.models import Model
# from keras.optimizers import Adam
# from keras.callbacks import TensorBoard, ModelCheckpoint, ReduceLROnPlateau, EarlyStoppi... | 49.695067 | 166 | 0.653582 |
62df7a4bb1545a1cc1eb4b6a38f07bb2bc9b6f25 | 9,508 | py | Python | mslib/msui/_tests/test_sideview.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 33 | 2020-12-04T04:29:28.000Z | 2022-03-05T17:11:49.000Z | mslib/msui/_tests/test_sideview.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 614 | 2020-12-06T16:54:44.000Z | 2022-03-31T07:41:02.000Z | mslib/msui/_tests/test_sideview.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 51 | 2020-12-04T15:10:46.000Z | 2022-03-20T02:02:11.000Z | # -*- coding: utf-8 -*-
"""
mslib.msui._tests.test_sideview
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module provides pytest functions to tests msui.sideview
This file is part of mss.
:copyright: Copyright 2017 Joern Ungermann
:copyright: Copyright 2017-2021 by the mss team, see AUTHORS.
:lic... | 41.33913 | 112 | 0.693416 |
62df883a755b759e0b5f265968519fa07f3164eb | 1,285 | py | Python | rtfsig/yara.py | PwCUK-CTO/rtfsig | dbc7c4c7630449f689c01d503c9678a0a673cf00 | [
"Apache-2.0"
] | 27 | 2020-09-21T15:12:08.000Z | 2021-08-09T20:27:19.000Z | rtfsig/yara.py | PwCUK-CTO/rtfsig | dbc7c4c7630449f689c01d503c9678a0a673cf00 | [
"Apache-2.0"
] | null | null | null | rtfsig/yara.py | PwCUK-CTO/rtfsig | dbc7c4c7630449f689c01d503c9678a0a673cf00 | [
"Apache-2.0"
] | 2 | 2020-09-26T14:49:08.000Z | 2020-10-05T19:37:17.000Z | """
Utility module that uses Jinja2 to generate Yara rules from a basic template.
"""
from jinja2 import Template
from . import VERSION_STRING
RULE_TEMPLATE = """
rule {{ rule_name }} {
meta:
description = "{{ description }}"
generated_by = "rtfsig version {{ version }}"
strings:
{% for string in str... | 24.245283 | 77 | 0.618677 |
62df8f9fbfbe54353932a4f51ece4727a6f44639 | 32,258 | py | Python | topi/python/topi/arm_cpu/conv2d.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 2 | 2019-07-29T06:26:59.000Z | 2019-07-29T06:27:02.000Z | topi/python/topi/arm_cpu/conv2d.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | null | null | null | topi/python/topi/arm_cpu/conv2d.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... | 41.040712 | 100 | 0.59703 |
62dfb27cd57a5381488efe1a891138b8d6805ac5 | 5,437 | py | Python | docs/source/conf.py | x94carbone/pyroVED | 07c500bef9a506bea06d65ec231ef7164abc61f2 | [
"MIT"
] | 20 | 2021-03-12T08:50:41.000Z | 2022-03-25T16:20:47.000Z | docs/source/conf.py | x94carbone/pyroVED | 07c500bef9a506bea06d65ec231ef7164abc61f2 | [
"MIT"
] | 17 | 2021-04-26T21:20:33.000Z | 2021-07-22T23:04:12.000Z | docs/source/conf.py | x94carbone/pyroVED | 07c500bef9a506bea06d65ec231ef7164abc61f2 | [
"MIT"
] | 3 | 2021-04-26T18:22:48.000Z | 2022-02-02T21:56:25.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 32.171598 | 83 | 0.651462 |
62dfcf8853610d7521667ab5ec3b745060974247 | 117 | py | Python | cogbot/extensions/helpchat/__init__.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 8 | 2016-12-26T14:10:38.000Z | 2021-01-02T03:50:05.000Z | cogbot/extensions/helpchat/__init__.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 28 | 2016-12-12T04:06:53.000Z | 2020-04-23T06:18:55.000Z | cogbot/extensions/helpchat/__init__.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 9 | 2017-06-03T00:33:57.000Z | 2020-10-29T18:16:02.000Z | from cogbot.extensions.helpchat.help_chat import HelpChat
def setup(bot):
bot.add_cog(HelpChat(bot, __name__))
| 19.5 | 57 | 0.777778 |
62dff88f23b9d502d25b4038188fef447868e149 | 15,798 | py | Python | bot/game/sdbDeck.py | Trimatix-indie/SuperDeckBreaker | 6c5f0a6593df5e7f6807b1e2b09aff65dcf8a6fc | [
"MIT"
] | null | null | null | bot/game/sdbDeck.py | Trimatix-indie/SuperDeckBreaker | 6c5f0a6593df5e7f6807b1e2b09aff65dcf8a6fc | [
"MIT"
] | 34 | 2021-03-20T22:42:16.000Z | 2021-09-29T15:50:31.000Z | bot/game/sdbDeck.py | Trimatix-indie/SuperDeckBreaker | 6c5f0a6593df5e7f6807b1e2b09aff65dcf8a6fc | [
"MIT"
] | null | null | null | import json
# from urllib import request
import random
from abc import ABC, abstractmethod
from typing import List, Dict
from discord import Message, Embed, Colour
from datetime import datetime
import os
import traceback
import gspread
from oauth2client.service_account import ServiceAccountCredentials
from .. import ... | 43.401099 | 294 | 0.643119 |
62e0081015481ba166b5aae6ed559d5c19081f6d | 45,788 | py | Python | bpython/repl.py | ocurero/bpython | 32363dc8bea1fd12997f314cb424bf72cbe1e599 | [
"PSF-2.0"
] | null | null | null | bpython/repl.py | ocurero/bpython | 32363dc8bea1fd12997f314cb424bf72cbe1e599 | [
"PSF-2.0"
] | null | null | null | bpython/repl.py | ocurero/bpython | 32363dc8bea1fd12997f314cb424bf72cbe1e599 | [
"PSF-2.0"
] | null | null | null | # The MIT License
#
# Copyright (c) 2009-2011 the bpython authors.
# Copyright (c) 2012-2013,2015 Sebastian Ramacher
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, inc... | 36.339683 | 82 | 0.565039 |
62e032151e82d4e24159444e405253a600b2d628 | 4,445 | py | Python | asposewordscloud/models/requests/get_document_properties_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/requests/get_document_properties_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/requests/get_document_properties_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="get_document_properties_online_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person o... | 43.15534 | 133 | 0.655568 |
62e04539473db561ca5327106497ddc773eed433 | 1,569 | py | Python | qiller/prepare.py | MADindustries/WhatManager2 | d000c53fd993cb526aee85ce2dbc957fa4070ab8 | [
"MIT"
] | 4 | 2015-08-26T05:13:58.000Z | 2022-01-24T07:29:51.000Z | qiller/prepare.py | point-source/WhatManager2 | d087f3603a5a96cf191a30d56619c0f5ce0dabc7 | [
"MIT"
] | 21 | 2015-08-14T03:58:43.000Z | 2019-11-14T18:25:37.000Z | qiller/prepare.py | point-source/WhatManager2 | d087f3603a5a96cf191a30d56619c0f5ce0dabc7 | [
"MIT"
] | 2 | 2015-10-28T09:02:16.000Z | 2019-09-23T00:21:54.000Z |
import logging
import os.path
import shutil
from mutagen.flac import FLAC
logger = logging.getLogger(__name__)
def conditional_rename(src, dst):
if src != dst:
logger.debug('Renaming {0} to {1}'.format(src, dst))
shutil.move(src, dst)
class Preparer(object):
def __init__(self, temp_dir):... | 32.020408 | 68 | 0.662843 |
62e082f8affdb84c4ac96e22f87135a69580315e | 3,866 | py | Python | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 42.955556 | 130 | 0.696586 |
62e08bfecfab7d4d15965024fa03aead18c68291 | 4,474 | py | Python | freebible/parsers/web.py | neocl/freebible | c0616ff0dd0130b657a7f6c4148ef4ab3792617d | [
"MIT"
] | 11 | 2018-04-04T19:28:10.000Z | 2022-01-15T21:42:54.000Z | freebible/parsers/web.py | neocl/freebible | c0616ff0dd0130b657a7f6c4148ef4ab3792617d | [
"MIT"
] | 1 | 2019-02-06T15:48:40.000Z | 2019-07-06T02:31:42.000Z | freebible/parsers/web.py | neocl/freebible | c0616ff0dd0130b657a7f6c4148ef4ab3792617d | [
"MIT"
] | 2 | 2020-08-11T23:45:51.000Z | 2021-10-16T10:31:58.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
World English Bible parser
Latest version can be found at https://github.com/neocl/freebible
@author: Le Tuan Anh <tuananh.ke@gmail.com>
@license: MIT
'''
# Copyright (c) 2018, Le Tuan Anh <tuananh.ke@gmail.com>
#
# Permission is hereby granted, free of charge, to a... | 34.682171 | 98 | 0.629861 |
62e0a1bbb8d427eb592c67609bf91fe103548556 | 12,053 | py | Python | darkhex/algorithms/best_response.py | BedirT/dark-hex-tools | c4b803253e57d3c87edddde6e82740c643378dde | [
"MIT"
] | null | null | null | darkhex/algorithms/best_response.py | BedirT/dark-hex-tools | c4b803253e57d3c87edddde6e82740c643378dde | [
"MIT"
] | 10 | 2022-01-16T05:55:09.000Z | 2022-03-09T20:21:21.000Z | darkhex/algorithms/best_response.py | BedirT/darkhex | c4b803253e57d3c87edddde6e82740c643378dde | [
"MIT"
] | null | null | null | """
Using open_spiel dark_hex implementation
to calculate best response value for a given player strategy.
"""
import typing
from collections import defaultdict
import pydot
from decimal import Decimal
import pyspiel
from darkhex.utils.util import (get_open_spiel_state, save_file)
class Node:
"""Best response st... | 38.263492 | 83 | 0.564922 |
62e0b2af35c28f40c04f4cb6de19d17477ead12d | 21,294 | py | Python | management/account/adminviews.py | pranavjandu/Attendance-Management-System | 76e87427a84cdd25ee544f13e98892492811aef9 | [
"MIT"
] | null | null | null | management/account/adminviews.py | pranavjandu/Attendance-Management-System | 76e87427a84cdd25ee544f13e98892492811aef9 | [
"MIT"
] | 6 | 2021-03-30T13:59:27.000Z | 2022-03-12T00:42:34.000Z | management/account/adminviews.py | pranavjandu/Facial-Attendance-System-Django | 76e87427a84cdd25ee544f13e98892492811aef9 | [
"MIT"
] | null | null | null | from .models import Batch, Course, CustomUser, Instructor,Students
from django.shortcuts import redirect, render,HttpResponseRedirect
from django.contrib import messages
from django.urls import reverse
from .filters import InstructorFilter,StudentFilter,CourseFilter,BatchFilter
from json import dumps,loads
import os
i... | 39 | 150 | 0.630459 |
62e0b61d9722e4ff0804788bebcde2e1508dbaed | 2,316 | py | Python | tiveU/articles/views.py | rds0751/newtiveu | 779ac840f0787ea0e74701b43d4320b44429527e | [
"MIT"
] | null | null | null | tiveU/articles/views.py | rds0751/newtiveu | 779ac840f0787ea0e74701b43d4320b44429527e | [
"MIT"
] | null | null | null | tiveU/articles/views.py | rds0751/newtiveu | 779ac840f0787ea0e74701b43d4320b44429527e | [
"MIT"
] | null | null | null | from django.contrib import messages
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import CreateView, ListView, UpdateView, DetailView
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from tiveU.helpers import AuthorRequiredMixin
from tiveU.ar... | 33.565217 | 77 | 0.734024 |
62e0e6cf7185bdec34c181e58f7e5e800f5f1d0b | 1,432 | py | Python | src/doskvolGhostgenerator.py | TimPasquini/BladesInTheDarkGenerators | 30f0acaac8555b6bdb12fad1494bdbfdadee13e5 | [
"MIT"
] | 8 | 2021-08-01T19:11:30.000Z | 2021-11-02T19:16:58.000Z | src/doskvolGhostgenerator.py | TimPasquini/BladesInTheDarkGenerators | 30f0acaac8555b6bdb12fad1494bdbfdadee13e5 | [
"MIT"
] | 1 | 2021-11-05T15:26:38.000Z | 2021-11-05T15:26:38.000Z | src/doskvolGhostgenerator.py | TimPasquini/BladesInTheDarkGenerators | 30f0acaac8555b6bdb12fad1494bdbfdadee13e5 | [
"MIT"
] | 2 | 2021-08-02T10:31:53.000Z | 2022-03-28T15:20:12.000Z | # doskvolGhostGenerator.py
# Uses the tables at the end of Blades in the Dark to generate a description
# for a random ghost.
from random import choice as rc
from utils import json_retreiver
def print_ghost(ghost_dict):
"""This will print text that describes a new ghost"""
output = f"""
This is the ghost of ... | 40.914286 | 141 | 0.726257 |
62e14f1312f1f76dedb6bca1ad4fc2332e2da00c | 4,815 | py | Python | lib_fr/nets/vgg16.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | lib_fr/nets/vgg16.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | lib_fr/nets/vgg16.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Tensorflow Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Xinlei Chen
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ impor... | 48.636364 | 125 | 0.556594 |
62e1690ef9cf813689454ffb5ad22063e3d0adb0 | 19,540 | py | Python | runners/rurllab.py | SurvivorT/SRTP | 1ddc0c4ec31d61daf9f4292c533722e61818eb51 | [
"MIT"
] | null | null | null | runners/rurllab.py | SurvivorT/SRTP | 1ddc0c4ec31d61daf9f4292c533722e61818eb51 | [
"MIT"
] | null | null | null | runners/rurllab.py | SurvivorT/SRTP | 1ddc0c4ec31d61daf9f4292c533722e61818eb51 | [
"MIT"
] | null | null | null | import os.path as osp
import tensorflow as tf
import rllab.misc.logger as logger
from rllab import config
from rllab.baselines.linear_feature_baseline import LinearFeatureBaseline
from rllab.baselines.zero_baseline import ZeroBaseline
from rllab.misc.ext import set_seed
from rllab.sampler import parallel_sampler
from... | 53.829201 | 106 | 0.550819 |
62e1733bea9bd3b17f144424fe3b725b518c66ca | 280 | py | Python | venv/lib/python3.8/site-packages/mplfinance/_version.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/mplfinance/_version.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/mplfinance/_version.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | null | null | null |
version_info = (0, 12, 7, 'alpha', 0)
_specifier_ = {'alpha': 'a','beta': 'b','candidate': 'rc','final': ''}
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
'' if version_info[3]=='final' else _specifier_[version_info[3]]+str(version_info[4]))
| 35 | 88 | 0.635714 |
62e17379eeaa368b37699da7e726ebdd5e678704 | 7,584 | py | Python | tools/train.py | JJLimmm/YOLOx | 85fdb819be84dfec3a8306cb74872a1c0ef28e3e | [
"Apache-2.0"
] | null | null | null | tools/train.py | JJLimmm/YOLOx | 85fdb819be84dfec3a8306cb74872a1c0ef28e3e | [
"Apache-2.0"
] | null | null | null | tools/train.py | JJLimmm/YOLOx | 85fdb819be84dfec3a8306cb74872a1c0ef28e3e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Copyright (c) Megvii, Inc. and its affiliates.
import argparse
import random
import warnings
from loguru import logger
import time
import gc
import torch
import torch.backends.cudnn as cudnn
from yolox.core import Trainer, launch
from yolox.exp import get_exp
from yolo... | 31.081967 | 111 | 0.561577 |
62e19951d3ccce1de5f61811240b11d91a7fcab3 | 17,490 | py | Python | common/ring/ring.py | escudocloud/encswift_server | 90a5a999c06b40da89d5f785795f80bd9d990640 | [
"Apache-2.0"
] | null | null | null | common/ring/ring.py | escudocloud/encswift_server | 90a5a999c06b40da89d5f785795f80bd9d990640 | [
"Apache-2.0"
] | null | null | null | common/ring/ring.py | escudocloud/encswift_server | 90a5a999c06b40da89d5f785795f80bd9d990640 | [
"Apache-2.0"
] | 1 | 2016-09-27T09:08:24.000Z | 2016-09-27T09:08:24.000Z | # Copyright (c) 2010-2012 OpenStack Foundation
#
# 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 agree... | 40.864486 | 79 | 0.559119 |
62e199f3e9c7104496fedf8feceffce2f52eaf13 | 7,912 | py | Python | ogsolar/libs/yview_client.py | pjaos/rpi_ogsolar | 716756ffe25301bfb3f6b0727c83222d2d1e8de7 | [
"MIT"
] | null | null | null | ogsolar/libs/yview_client.py | pjaos/rpi_ogsolar | 716756ffe25301bfb3f6b0727c83222d2d1e8de7 | [
"MIT"
] | null | null | null | ogsolar/libs/yview_client.py | pjaos/rpi_ogsolar | 716756ffe25301bfb3f6b0727c83222d2d1e8de7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import socket
from time import sleep, time
from threading import Thread, Lock
from p3lib.netif import NetIF
import json
class AYTListener(object):
"""@brief Responsible listening for are you there messages from the host and sending responses
back."""
AYT_POLL_SEC... | 36.62963 | 121 | 0.572548 |
62e1daad8f4f9476980e1346abda2b14b2880902 | 3,448 | py | Python | lenstronomy/SimulationAPI/ObservationConfig/ZTF.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | lenstronomy/SimulationAPI/ObservationConfig/ZTF.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | lenstronomy/SimulationAPI/ObservationConfig/ZTF.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | # Conditions for the ZTF survey
import lenstronomy.Util.util as util
__all__ = ['ZTF']
"""
Sources
https://iopscience.iop.org/article/10.1088/1538-3873/aaecbe/pdf
Table 1
- seeing
- pixel_scale
- gain
- read_noise
http://web.ipac.caltech.edu/staff/fmasci/ztf/ztf_pipelines_deliverable... | 33.475728 | 118 | 0.599188 |
62e1f6d1af481a981ccdca8aaca05d8105e4b6f6 | 2,366 | py | Python | examples/plotting/lat_lon_lines.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 2 | 2020-07-02T13:01:42.000Z | 2020-08-27T20:05:31.000Z | examples/plotting/lat_lon_lines.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 1 | 2020-05-11T13:38:56.000Z | 2020-05-11T13:38:56.000Z | examples/plotting/lat_lon_lines.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | null | null | null | """
=================================================
Drawing heliographic longitude and latitude lines
=================================================
How to draw your own (Stonyhurst) longitude and latitude lines
"""
import matplotlib.pyplot as plt
import numpy as np
import astropy.units as u
from astropy.coordin... | 38.786885 | 85 | 0.594675 |
62e202c2c79efa99a33272bc5643c67c291083ee | 7,653 | py | Python | panda_gym/envs/robots/panda.py | jc-bao/panda-gym | 1860bf7459d50fc1a3677d937c984034fd936a7e | [
"MIT"
] | 1 | 2021-12-24T01:43:14.000Z | 2021-12-24T01:43:14.000Z | panda_gym/envs/robots/panda.py | jc-bao/panda-gym | 1860bf7459d50fc1a3677d937c984034fd936a7e | [
"MIT"
] | null | null | null | panda_gym/envs/robots/panda.py | jc-bao/panda-gym | 1860bf7459d50fc1a3677d937c984034fd936a7e | [
"MIT"
] | null | null | null | import numpy as np
from gym import spaces
from panda_gym.envs.core import PyBulletRobot
from panda_gym.pybullet import PyBullet
class Panda(PyBulletRobot):
"""Panda robot in PyBullet.
Args:
sim (PyBullet): Simulation instance.
block_gripper (bool, optional): Whether the gripper is blocked. D... | 45.826347 | 123 | 0.632954 |
62e215f0342cd64215fe0c86b5a167b80532262b | 1,567 | py | Python | agogosml_cli/cli/init.py | cicorias/agogosml | 60e0b52c2fc721bdd965aadaf8c1afd1ddb9b7d1 | [
"MIT"
] | 13 | 2018-12-07T21:02:20.000Z | 2019-02-22T14:36:31.000Z | agogosml_cli/cli/init.py | cicorias/agogosml | 60e0b52c2fc721bdd965aadaf8c1afd1ddb9b7d1 | [
"MIT"
] | 43 | 2018-11-30T11:31:43.000Z | 2019-04-03T16:09:06.000Z | agogosml_cli/cli/init.py | cicorias/agogosml | 60e0b52c2fc721bdd965aadaf8c1afd1ddb9b7d1 | [
"MIT"
] | 13 | 2018-11-29T00:31:29.000Z | 2019-02-22T18:50:28.000Z | """Init command module."""
import json
from pathlib import Path
import click
import cli.utils as utils
@click.command()
@click.option('--force', '-f', is_flag=True, default=False, required=False,
help='Ovewrite existing manifest file')
@click.option('--project-name', prompt=True, required=False,
... | 31.979592 | 77 | 0.646458 |
62e25271fe7b4f185886d1404b2ad5ea676b5f73 | 26 | py | Python | foliant/backends/docus/__init__.py | foliant-docs/foliantcontrib.docus | 7a81581d93a1e1b4827ee0ee458c0454a6ad093f | [
"MIT"
] | null | null | null | foliant/backends/docus/__init__.py | foliant-docs/foliantcontrib.docus | 7a81581d93a1e1b4827ee0ee458c0454a6ad093f | [
"MIT"
] | null | null | null | foliant/backends/docus/__init__.py | foliant-docs/foliantcontrib.docus | 7a81581d93a1e1b4827ee0ee458c0454a6ad093f | [
"MIT"
] | null | null | null | from .docus import Backend | 26 | 26 | 0.846154 |
62e25c61b19f5d867df8c188f773e29e93f2b4fd | 228 | py | Python | autumn_ca/setup.py | goshdarngames/Autumn-CA | 85bd1db5aa08882a01d6954e085b76e316ac5712 | [
"MIT"
] | null | null | null | autumn_ca/setup.py | goshdarngames/Autumn-CA | 85bd1db5aa08882a01d6954e085b76e316ac5712 | [
"MIT"
] | null | null | null | autumn_ca/setup.py | goshdarngames/Autumn-CA | 85bd1db5aa08882a01d6954e085b76e316ac5712 | [
"MIT"
] | null | null | null | from distutils.core import setup
from Cython.Build import cythonize
import numpy
setup (
ext_modules = cythonize("lib/neighbourhood.pyx"),
include_dirs=[numpy.get_include()],
extra_compile_args = ["-ffast-math"]
)
| 20.727273 | 53 | 0.736842 |
62e273a8ffdf3718633f7265785556d26302b4e8 | 1,067 | py | Python | webapp/__init__.py | heyudude/webapp-flask-sqlite3-template | 5cba4e8acf0c9ee4ac5a5c1e7264317c4b3f92a5 | [
"MIT"
] | 1 | 2021-09-28T09:58:32.000Z | 2021-09-28T09:58:32.000Z | webapp/__init__.py | heyudude/webapp-flask-sqlite3-template | 5cba4e8acf0c9ee4ac5a5c1e7264317c4b3f92a5 | [
"MIT"
] | 29 | 2020-02-28T12:53:02.000Z | 2021-06-02T10:23:43.000Z | webapp/__init__.py | heyudude/webapp-flask-sqlite3-template | 5cba4e8acf0c9ee4ac5a5c1e7264317c4b3f92a5 | [
"MIT"
] | 1 | 2021-06-06T20:15:01.000Z | 2021-06-06T20:15:01.000Z | "Web app template based on Flask and Sqlite3. With user account handling."
import re
__version__ = "0.3.6"
class Constants:
VERSION = __version__
SOURCE_NAME = "webapp-sqlite3"
SOURCE_URL = "https://github.com/pekrau/webapp-flask-sqlite3-template"
BOOTSTRAP_VERSION = "4.6.0"
JQUERY_VERSION... | 24.813953 | 75 | 0.618557 |
62e2834ec2e1289f266ca64ce333dc9f6c759543 | 6,402 | py | Python | www/settings.py | adam-iris/es-example-django | 012a30bd3ba3f47f86c59cc73773dae79f88379d | [
"MIT"
] | null | null | null | www/settings.py | adam-iris/es-example-django | 012a30bd3ba3f47f86c59cc73773dae79f88379d | [
"MIT"
] | null | null | null | www/settings.py | adam-iris/es-example-django | 012a30bd3ba3f47f86c59cc73773dae79f88379d | [
"MIT"
] | 2 | 2021-08-05T18:19:34.000Z | 2021-08-12T19:42:18.000Z | """
Django settings for www project.
Generated by 'django-admin startproject' using Django 3.2.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib imp... | 27.242553 | 93 | 0.668697 |
62e28ee30088e0ba9f2c49ab2d165a79156054bd | 675 | py | Python | ParsersClasses/GaussianParser.py | UFRGS-CAROL/radiation-benchmarks-parsers | a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b | [
"Apache-2.0"
] | null | null | null | ParsersClasses/GaussianParser.py | UFRGS-CAROL/radiation-benchmarks-parsers | a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b | [
"Apache-2.0"
] | null | null | null | ParsersClasses/GaussianParser.py | UFRGS-CAROL/radiation-benchmarks-parsers | a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b | [
"Apache-2.0"
] | null | null | null |
import re
from Parser import Parser
class GaussianParser(Parser):
_dim = None
def parseErrMethod(self, errString):
m = re.match(".*ERR.*\[(\d+)..(\d+)\].*r\: ([0-9e\+\-\.]+).*e\: ([0-9e\+\-\.]+)", errString)
if m:
posX = int(m.group(1))
posY = int(m.group(2))
... | 27 | 100 | 0.478519 |
62e2d377e9ddfd8209bcf727f8d62273eeef364b | 12,973 | py | Python | gala-ragdoll/ragdoll/utils/yang_module.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | gala-ragdoll/ragdoll/utils/yang_module.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | gala-ragdoll/ragdoll/utils/yang_module.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | import libyang
import os
import sys
import importlib
import operator
from ragdoll.utils.git_tools import GitTools
PROJECTNAME = "gala-ragdoll"
TARGETDIR = GitTools().target_dir
class YangModule(object):
def __init__(self):
self._cwd_dir = os.getcwd()
self._target_dir = "yang_modules"
self.... | 35.445355 | 92 | 0.525168 |
62e2d6cc2876b534f8977d14e4f215f4893a779a | 5,451 | py | Python | train.py | Kexiii/pytorch-hymenoptera | 4c9f8efee3fd455c135cd42c74bc5199b7d0764e | [
"MIT"
] | 6 | 2018-11-21T16:10:16.000Z | 2021-12-16T02:25:59.000Z | train.py | Kexiii/pytorch-hymenoptera | 4c9f8efee3fd455c135cd42c74bc5199b7d0764e | [
"MIT"
] | null | null | null | train.py | Kexiii/pytorch-hymenoptera | 4c9f8efee3fd455c135cd42c74bc5199b7d0764e | [
"MIT"
] | 1 | 2018-11-21T16:10:18.000Z | 2018-11-21T16:10:18.000Z | from __future__ import print_function, division
import torch
import torch.optim as optim
import torch.nn.functional as F
from torch.autograd import Variable
import time
from datetime import datetime
import os
import copy
import json
import argparse
import pickle
from data_loader.data_loader import get_dat... | 42.585938 | 134 | 0.574023 |
62e2e0506207a5e598f80758c7ef6a8700bfb781 | 10,260 | py | Python | modules/core/aaa/masterkey.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | modules/core/aaa/masterkey.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | modules/core/aaa/masterkey.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | """
MasterKey Authentication
Copyright: (c) 2010-2022 Sahana Software Foundation
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without lim... | 32.884615 | 87 | 0.524172 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.