hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
356bf69789fcdff483b30f2dd86757b1ad448ff4 | 34,806 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/aio/operations/_express_route_circuits_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/aio/operations/_express_route_circuits_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/aio/operations/_express_route_circuits_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.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 ... | 49.86533 | 201 | 0.66296 |
e65e0ec76d5756193408096e053858a4ac95ffe1 | 38,934 | py | Python | diofant/utilities/enumerative.py | diofant/omg | 72fd45f832240d1ded6f0a411e97bb9f7aa9f1d2 | [
"BSD-3-Clause"
] | null | null | null | diofant/utilities/enumerative.py | diofant/omg | 72fd45f832240d1ded6f0a411e97bb9f7aa9f1d2 | [
"BSD-3-Clause"
] | null | null | null | diofant/utilities/enumerative.py | diofant/omg | 72fd45f832240d1ded6f0a411e97bb9f7aa9f1d2 | [
"BSD-3-Clause"
] | null | null | null | """
Algorithms and classes to support enumerative combinatorics.
Currently just multiset partitions, but more could be added.
Terminology (following Knuth, algorithm 7.1.2.5M TAOCP)
*multiset* aaabbcccc has a *partition* aaabc | bccc
The submultisets, aaabc and bccc of the partition are called
*parts*, or sometimes ... | 36.31903 | 79 | 0.59023 |
901a32aa0ac9cf16715fa58417c1df5155635527 | 431 | py | Python | venv/Scripts/pip3-script.py | kevindsouza2306/ImplementingLeNet | 46592c9a5c2f65551bcf9e0a2f5cde61a8f6f0f5 | [
"MIT"
] | null | null | null | venv/Scripts/pip3-script.py | kevindsouza2306/ImplementingLeNet | 46592c9a5c2f65551bcf9e0a2f5cde61a8f6f0f5 | [
"MIT"
] | null | null | null | venv/Scripts/pip3-script.py | kevindsouza2306/ImplementingLeNet | 46592c9a5c2f65551bcf9e0a2f5cde61a8f6f0f5 | [
"MIT"
] | null | null | null | #!C:\Users\Administrator\PycharmProjects\ImplementingLeNet\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)... | 33.153846 | 82 | 0.684455 |
154ed22214830071d93b2005ab0c38382239fc0f | 6,771 | py | Python | pandas/tests/indexes/multi/test_analytics.py | gsyqax/pandas | cb35d8a938c9222d903482d2f66c62fece5a7aae | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 4 | 2015-06-09T07:27:52.000Z | 2021-08-06T13:50:05.000Z | pandas/tests/indexes/multi/test_analytics.py | gsyqax/pandas | cb35d8a938c9222d903482d2f66c62fece5a7aae | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 7 | 2015-08-30T23:51:00.000Z | 2018-12-29T19:52:35.000Z | pandas/tests/indexes/multi/test_analytics.py | gsyqax/pandas | cb35d8a938c9222d903482d2f66c62fece5a7aae | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 5 | 2017-10-04T22:24:49.000Z | 2021-08-06T13:50:13.000Z | import numpy as np
import pytest
from pandas.compat.numpy import _np_version_under1p17
import pandas as pd
from pandas import Index, MultiIndex, date_range, period_range
import pandas._testing as tm
def test_shift(idx):
# GH8083 test the base class for shift
msg = "Not supported for type MultiIndex"
wi... | 25.745247 | 85 | 0.570669 |
d5e87d1df246245a376e681132a77064203e5d1e | 27,609 | py | Python | pandas/tseries/tools.py | augustoproiete-forks/pandas-dev--pandas | fcd73ad2e7482414b61d47056c6c9c220b11702c | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/tseries/tools.py | augustoproiete-forks/pandas-dev--pandas | fcd73ad2e7482414b61d47056c6c9c220b11702c | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/tseries/tools.py | augustoproiete-forks/pandas-dev--pandas | fcd73ad2e7482414b61d47056c6c9c220b11702c | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | from datetime import datetime, timedelta, time
import numpy as np
from collections import MutableMapping
import pandas.lib as lib
import pandas.tslib as tslib
import pandas.core.common as com
from pandas.core.common import ABCIndexClass, ABCSeries, ABCDataFrame
import pandas.compat as compat
from pandas.util.decorator... | 35.260536 | 79 | 0.567569 |
017f4f6c91f2b3297fc3e5bc09505dc9bd927f4e | 1,997 | py | Python | scripts/update_bugs_assets.py | theastropath/turbot | c623cd9af73876efdd315f3d7dd09448a06d3331 | [
"MIT"
] | 10 | 2020-04-11T23:43:42.000Z | 2021-06-18T17:31:09.000Z | scripts/update_bugs_assets.py | theastropath/turbot | c623cd9af73876efdd315f3d7dd09448a06d3331 | [
"MIT"
] | 116 | 2020-04-15T20:37:49.000Z | 2022-03-29T22:21:25.000Z | scripts/update_bugs_assets.py | theastropath/turbot | c623cd9af73876efdd315f3d7dd09448a06d3331 | [
"MIT"
] | 3 | 2020-04-11T23:56:34.000Z | 2020-06-18T17:44:34.000Z | #!/usr/bin/env python3
import csv
import re
from enum import Enum
from pathlib import Path
import requests
from bs4 import BeautifulSoup
page = requests.get("https://animalcrossing.fandom.com/wiki/Bugs_(New_Horizons)")
tree = BeautifulSoup(page.content, "lxml")
class Hemisphere(Enum):
NORTHERN = 0
SOUTHERN... | 24.353659 | 82 | 0.51978 |
5cde6b38c9ddb19747bdf4e89a338c06cfd776bf | 2,864 | py | Python | dsp/digaree/cgen_srf.py | FelixVi/Bedrock | 82072341902048e5b37022512909d209efb243d6 | [
"RSA-MD"
] | 17 | 2019-09-29T14:52:18.000Z | 2022-03-28T21:16:25.000Z | dsp/digaree/cgen_srf.py | FelixVi/Bedrock | 82072341902048e5b37022512909d209efb243d6 | [
"RSA-MD"
] | null | null | null | dsp/digaree/cgen_srf.py | FelixVi/Bedrock | 82072341902048e5b37022512909d209efb243d6 | [
"RSA-MD"
] | 4 | 2019-12-04T17:30:38.000Z | 2021-11-01T01:52:13.000Z | #!/usr/bin/python
# SRF cavity analog state computer
# Takes in cavity field, forward, and reverse vector measurements
# and computes the cavity detune frequency, decay parameter, and
# power imbalance for the purposes of a tuning loop and quench detector.
# Keeps a history of the previous four cavity field mesurement... | 35.358025 | 72 | 0.694832 |
f9ebfd4e89c2442074f19f2808eb0f453b301244 | 2,413 | py | Python | trust_stores_observatory/root_record.py | jurajsomorovsky/trust_stores_observatory | 6dfdd4985e54c46fc7383b888c1b5828ba329ee6 | [
"MIT"
] | null | null | null | trust_stores_observatory/root_record.py | jurajsomorovsky/trust_stores_observatory | 6dfdd4985e54c46fc7383b888c1b5828ba329ee6 | [
"MIT"
] | null | null | null | trust_stores_observatory/root_record.py | jurajsomorovsky/trust_stores_observatory | 6dfdd4985e54c46fc7383b888c1b5828ba329ee6 | [
"MIT"
] | null | null | null | from binascii import hexlify
from typing import TYPE_CHECKING
from cryptography.hazmat.primitives.hashes import SHA256
from cryptography.x509 import Certificate
from trust_stores_observatory.certificate_utils import CertificateUtils
if TYPE_CHECKING:
from trust_stores_observatory.store_fetcher.scraped_root_recor... | 43.089286 | 117 | 0.733527 |
d4b9bfd4bfee3b966cf1ec80603a0a489298c957 | 7,387 | py | Python | hoomd/mcm/test-py/move_by_type.py | brendonwaters/Mechanical-Contraction-Method | 3476c04c3af32d8a60d0d88c91c95bdcfb116dc3 | [
"BSD-3-Clause"
] | null | null | null | hoomd/mcm/test-py/move_by_type.py | brendonwaters/Mechanical-Contraction-Method | 3476c04c3af32d8a60d0d88c91c95bdcfb116dc3 | [
"BSD-3-Clause"
] | null | null | null | hoomd/mcm/test-py/move_by_type.py | brendonwaters/Mechanical-Contraction-Method | 3476c04c3af32d8a60d0d88c91c95bdcfb116dc3 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, print_function
from hoomd import *
from hoomd import mcm
import hoomd
import unittest
import os
import numpy
context.initialize()
def create_empty(**kwargs):
snap = data.make_snapshot(**kwargs);
return init.read_snapshot(snap);
# This test ensures that the small box code path... | 39.92973 | 161 | 0.580208 |
fae74e30af609dee826d20a05cbcbcad079fdffe | 793 | py | Python | api/app/services/images/generateQr.py | JexPY/filemanager-fastapi | da830fe6d9a3d515e0d04e6e690ff366225ec251 | [
"MIT"
] | 24 | 2020-09-15T11:59:55.000Z | 2022-03-13T19:58:02.000Z | api/app/services/images/generateQr.py | JexPY/filemanager-fastapi | da830fe6d9a3d515e0d04e6e690ff366225ec251 | [
"MIT"
] | null | null | null | api/app/services/images/generateQr.py | JexPY/filemanager-fastapi | da830fe6d9a3d515e0d04e6e690ff366225ec251 | [
"MIT"
] | 5 | 2020-10-11T08:41:29.000Z | 2022-03-10T07:23:55.000Z | import os
import qrcode
from PIL import Image
from pathlib import Path
from ..helpers.uniqueFileName import generate_unique_name
def qr_code_image(text = str, with_logo = bool):
print(with_logo)
qrImagePIL = qrcode.QRCode(
error_correction=qrcode.constants.ERROR_CORRECT_H,
border=2,
)
... | 26.433333 | 107 | 0.677175 |
4103081d0334965fb6fb9f3a0bccbe5ad64cbea2 | 2,390 | py | Python | js/setup.py | jaimergp/nglview | be6faafc68202854a818d2569d69675503184875 | [
"MIT"
] | 161 | 2020-07-28T14:05:57.000Z | 2022-03-31T08:38:06.000Z | js/setup.py | gph82/nglview | d0a186b6b69e9ecd76171d61249686a7af5d6589 | [
"MIT"
] | 123 | 2020-07-27T15:02:27.000Z | 2022-03-30T18:31:51.000Z | js/setup.py | gph82/nglview | d0a186b6b69e9ecd76171d61249686a7af5d6589 | [
"MIT"
] | 42 | 2020-07-28T09:50:06.000Z | 2022-03-11T18:50:22.000Z | """
nglview-js-widgets setup
"""
import json
from pathlib import Path
from jupyter_packaging import (
create_cmdclass,
install_npm,
ensure_targets,
combine_commands,
skip_if_exists
)
import setuptools
HERE = Path(__file__).parent.resolve()
# The name of the project
name = "nglview-js-widgets"
la... | 25.157895 | 80 | 0.670293 |
2667ce4730976f1857f9ed82f1170a02e190c651 | 6,059 | py | Python | venv/Lib/site-packages/resampy/filters.py | Terrathaw/ba21_loma_2_py | eebf5104dd054cef1ab61f0b257933ff679e75ec | [
"MIT"
] | 179 | 2016-04-10T14:38:05.000Z | 2022-03-27T10:41:45.000Z | lo-fi-machine/processing/package/resampy/filters.py | rochelletham/lo-tify | 910c62d0ec14bc5a7aaa4f7dca80c0ca14c4c060 | [
"MIT"
] | 63 | 2016-04-09T15:12:22.000Z | 2021-07-05T08:01:54.000Z | lo-fi-machine/processing/package/resampy/filters.py | rochelletham/lo-tify | 910c62d0ec14bc5a7aaa4f7dca80c0ca14c4c060 | [
"MIT"
] | 38 | 2016-04-21T15:44:37.000Z | 2022-01-28T03:24:53.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''Filter construction and loading.
--------------------------------
`resampy` provides two pre-computed resampling filters which are tuned for either
high-quality or fast calculation:
- `kaiser_best` : 64 zero-crossings, a Kaiser window with beta=14.769656459379492... | 30.913265 | 92 | 0.627166 |
3b39bc8964c5b808922adc9f560f2969e58ed32f | 121,269 | py | Python | pymatgen/io/vasp/sets.py | vorwerkc/pymatgen | 81e96a4a5739e383f921b7272db7ebf8b1710cb9 | [
"MIT"
] | null | null | null | pymatgen/io/vasp/sets.py | vorwerkc/pymatgen | 81e96a4a5739e383f921b7272db7ebf8b1710cb9 | [
"MIT"
] | null | null | null | pymatgen/io/vasp/sets.py | vorwerkc/pymatgen | 81e96a4a5739e383f921b7272db7ebf8b1710cb9 | [
"MIT"
] | null | null | null | # Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module defines the VaspInputSet abstract base class and a concrete
implementation for the parameters developed and tested by the core team
of pymatgen, including the Materials Virtual Lab, Materials Project and the MI... | 38.80608 | 119 | 0.593326 |
359d4b1fbeb2e50a841eded74b7099a0c8f5577e | 3,580 | py | Python | intersight/models/fault_instance_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/fault_instance_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/fault_instance_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class FaultInstanceRef(object):
"""
NOTE: This clas... | 23.866667 | 77 | 0.537709 |
c97b6b4b4fc2c4bc8ceeeaa886aacb819568d57e | 1,220 | py | Python | fudbyte/urls.py | niieq/fudbyte | b8f7339908492d64858ca7d8471b5b45f7b4e097 | [
"BSD-3-Clause"
] | null | null | null | fudbyte/urls.py | niieq/fudbyte | b8f7339908492d64858ca7d8471b5b45f7b4e097 | [
"BSD-3-Clause"
] | 5 | 2021-03-19T03:03:36.000Z | 2022-01-13T01:33:56.000Z | fudbyte/urls.py | niieq/fudbyte | b8f7339908492d64858ca7d8471b5b45f7b4e097 | [
"BSD-3-Clause"
] | null | null | null | """fudbyte URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | 42.068966 | 79 | 0.718033 |
e042b30c089ec186b90de49edb4373949a874624 | 1,300 | py | Python | counterpartylib/lib/message_type.py | longhoangwkm/counterparty-lib | 74a457df36261e580b29161a26f0f561f95ce06e | [
"MIT"
] | 169 | 2015-05-14T04:21:51.000Z | 2022-03-19T21:06:46.000Z | counterpartylib/lib/message_type.py | longhoangwkm/counterparty-lib | 74a457df36261e580b29161a26f0f561f95ce06e | [
"MIT"
] | 321 | 2015-04-24T08:51:21.000Z | 2022-02-23T21:52:42.000Z | counterpartylib/lib/message_type.py | longhoangwkm/counterparty-lib | 74a457df36261e580b29161a26f0f561f95ce06e | [
"MIT"
] | 120 | 2015-05-10T16:04:23.000Z | 2022-02-23T01:08:41.000Z | import logging
logger = logging.getLogger(__name__)
import struct
from counterpartylib.lib import config
from counterpartylib.lib import util
def pack(message_type_id, block_index=None):
# pack message ID into 1 byte if not zero
if util.enabled('short_tx_type_id', block_index) and message_type_id > 0 and mess... | 37.142857 | 103 | 0.712308 |
aface321b9b7aff48cee9712b5423cfd62ea5164 | 456 | py | Python | tests/test_web_scraper.py | meobilivang/newsreader-cli | de45540b614a29c5e5ef0054444cfee376d11b2b | [
"Apache-2.0"
] | 5 | 2021-11-01T05:13:02.000Z | 2021-11-03T06:48:26.000Z | tests/test_web_scraper.py | meobilivang/newsreader-cli | de45540b614a29c5e5ef0054444cfee376d11b2b | [
"Apache-2.0"
] | 2 | 2021-11-02T01:29:57.000Z | 2021-11-02T01:34:36.000Z | tests/test_web_scraper.py | meobilivang/newsreader-cli | de45540b614a29c5e5ef0054444cfee376d11b2b | [
"Apache-2.0"
] | null | null | null | import pytest
from newsreadercli import NewsScraper
from newsreadercli import Article
def test_web_scraper():
scraper = NewsScraper()
test_page = open("tests/test_data/vnexpress-test.html", 'r', encoding='utf-8')
scraper.page_scrape(None, test_page.read())
for article in scraper.articles_cu... | 25.333333 | 82 | 0.723684 |
c944b58bde40b2f07539d989f566a4e56c44027c | 1,261 | py | Python | get_checksums.py | bdclark/ansible-filebeat | 78ef3949db0e1c408eaeb06d19a386c5020cd984 | [
"MIT"
] | null | null | null | get_checksums.py | bdclark/ansible-filebeat | 78ef3949db0e1c408eaeb06d19a386c5020cd984 | [
"MIT"
] | null | null | null | get_checksums.py | bdclark/ansible-filebeat | 78ef3949db0e1c408eaeb06d19a386c5020cd984 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import requests
import yaml
import sys
VERSIONS = [
'7.0.1',
'7.0.0',
'6.7.2',
'6.7.1',
'6.7.0',
'6.6.2',
'6.6.1',
'6.6.0',
'6.5.4',
'6.5.3',
'6.5.2',
'6.5.1',
'6.5.0',
'6.4.3',
'6.4.2',
'6.4.1',
'6.4.0',
'6.3.2',
'6.3.1',
'6.3.0',
'6.2.4',
'6.2.3',
... | 19.4 | 111 | 0.569389 |
c2d60afe478887a53b296db8213319f124a5f667 | 1,226 | py | Python | algo_archive/old_dataloading_algos/retrieval/pickle_sets.py | singator/urops | 20006b39b9e181227b0b5d7f0e885aa92e79aeed | [
"MIT"
] | 1 | 2018-04-04T17:41:45.000Z | 2018-04-04T17:41:45.000Z | algo_archive/old_dataloading_algos/retrieval/pickle_sets.py | singator/urops | 20006b39b9e181227b0b5d7f0e885aa92e79aeed | [
"MIT"
] | null | null | null | algo_archive/old_dataloading_algos/retrieval/pickle_sets.py | singator/urops | 20006b39b9e181227b0b5d7f0e885aa92e79aeed | [
"MIT"
] | 1 | 2018-07-26T01:30:43.000Z | 2018-07-26T01:30:43.000Z | """ Create and pickle feature and label matrices for the three lots under
current consideration: primis, secondus, and solum.
Intended working directory: ./data/
"""
import os
import glob
import cv2
import numpy as np
# os.chdir("/Users/nurmister/Documents/academic/urops/retrieval/")
import data_manager
# os.chd... | 28.511628 | 73 | 0.659869 |
0044d3381bd175bc08b2b60102b3ed5b376cd6d4 | 680 | py | Python | LinearRegression/Bayesian_LR.py | roger8587/Machine_Learning | d435cece8993608f0da45580ab81fd6db61d345a | [
"MIT"
] | 1 | 2021-08-24T06:11:12.000Z | 2021-08-24T06:11:12.000Z | LinearRegression/Bayesian_LR.py | roger8587/Machine_Learning | d435cece8993608f0da45580ab81fd6db61d345a | [
"MIT"
] | null | null | null | LinearRegression/Bayesian_LR.py | roger8587/Machine_Learning | d435cece8993608f0da45580ab81fd6db61d345a | [
"MIT"
] | null | null | null | import numpy as np
class Bayesian_Linear_Reg(object):
def __init__(self, Data, Y):
ones = np.ones(Data.shape[0], dtype=int).reshape(-1, 1)
self.X = np.concatenate([ones, Data], axis=1)
self.Y = Y
def posterior(self, alpha, beta):
self.beta = beta
self.S_N_inv = ... | 35.789474 | 84 | 0.597059 |
c36f75c08eef20e52f563c4b155d66118e9f986f | 2,457 | py | Python | deeploglizer/models/ae.py | logpai/deep-loglizer- | 1069a1e0e9b000e1bc9b353fb01d3d451d9a6d5d | [
"Apache-2.0"
] | 55 | 2021-07-21T08:34:46.000Z | 2022-03-27T19:53:14.000Z | deeploglizer/models/ae.py | logpai/deep-loglizer- | 1069a1e0e9b000e1bc9b353fb01d3d451d9a6d5d | [
"Apache-2.0"
] | 10 | 2021-07-21T08:37:27.000Z | 2022-03-21T09:00:07.000Z | deeploglizer/models/ae.py | logpai/deep-loglizer- | 1069a1e0e9b000e1bc9b353fb01d3d451d9a6d5d | [
"Apache-2.0"
] | 18 | 2021-07-09T06:40:31.000Z | 2022-02-08T07:42:40.000Z | import torch
import torch.nn.functional as F
from torch import nn
from deeploglizer.models import ForcastBasedModel
class AutoEncoder(ForcastBasedModel):
def __init__(
self,
meta_data,
hidden_size=100,
num_layers=1,
num_directions=2,
embedding_dim=16,
model... | 28.905882 | 73 | 0.573057 |
f414e311ff00d83d57cc39d67aa9e40f55b05821 | 84 | py | Python | script_tarea2.py | AnaLopezP/warmupbien | d46883bc72f1d6aec2ab25672cfde26dfb182ede | [
"Apache-2.0"
] | null | null | null | script_tarea2.py | AnaLopezP/warmupbien | d46883bc72f1d6aec2ab25672cfde26dfb182ede | [
"Apache-2.0"
] | null | null | null | script_tarea2.py | AnaLopezP/warmupbien | d46883bc72f1d6aec2ab25672cfde26dfb182ede | [
"Apache-2.0"
] | null | null | null | import colorama
from colorama import init, Fore
print(Fore.GREEN + "Hola Mundo")
| 21 | 33 | 0.75 |
227042bf4474e38eaddb3526fab1c628dfdce495 | 7,715 | py | Python | solar-system.py | jacanchaplais/solar-system | 86e56d127af3f91234af3b9bd72888049fe6deed | [
"MIT"
] | null | null | null | solar-system.py | jacanchaplais/solar-system | 86e56d127af3f91234af3b9bd72888049fe6deed | [
"MIT"
] | null | null | null | solar-system.py | jacanchaplais/solar-system | 86e56d127af3f91234af3b9bd72888049fe6deed | [
"MIT"
] | null | null | null | ###############################################################################
## Solar System Simulation ##
## Written by Jacan Chaplais, 2019 ##
## jacan.chaplais@gmail.com ##
... | 35.883721 | 79 | 0.594945 |
d0c3850f49c5024a1a1c4d870a767ab286729761 | 300 | py | Python | cf8.py | ammkazi/pythonB2 | 4ceba24f3dcd40f110b6fda8057d58ab1e4be88f | [
"MIT"
] | null | null | null | cf8.py | ammkazi/pythonB2 | 4ceba24f3dcd40f110b6fda8057d58ab1e4be88f | [
"MIT"
] | null | null | null | cf8.py | ammkazi/pythonB2 | 4ceba24f3dcd40f110b6fda8057d58ab1e4be88f | [
"MIT"
] | null | null | null | # wap to print fibonacci series upto nth term
# output : 0 1 1 2 3 5 8 13 21 34 55 89
n = int(input("Enter the number of terms : "))
i = 3
n1 = 0
n2 = 1
print(n1, n2, end=' ')
n3 = n1 + n2
while i <= n:
n3 = n1 + n2
print(n3, end=' ')
n1 = n2
n2 = n3
i = i+1
| 16.666667 | 47 | 0.496667 |
e13d3eaea886ed397b12338c88d254bac98f92e4 | 777 | py | Python | src/constants.py | joehowells/critical-keep | 4aba3322a8582a2d06ab0d4b67028738249669e9 | [
"MIT"
] | 1 | 2019-04-27T22:39:33.000Z | 2019-04-27T22:39:33.000Z | src/constants.py | joehowells/critical-keep | 4aba3322a8582a2d06ab0d4b67028738249669e9 | [
"MIT"
] | null | null | null | src/constants.py | joehowells/critical-keep | 4aba3322a8582a2d06ab0d4b67028738249669e9 | [
"MIT"
] | null | null | null | DUNGEON_DEPTH = 7
DUNGEON_MIDBOSS = 3
DUNGEON_ENDBOSS = 7
WEAPON_TIER_SELECTION = [
[0, 0, 0, 0, 1],
[0, 0, 0, 1, 1],
[0, 0, 1, 1, 1],
[0, 1, 1, 1, 1],
[1, 1, 1, 1, 2],
[1, 1, 1, 2, 2],
[1, 1, 2, 2, 2],
[1, 2, 2, 2, 2],
]
CAP_HP = 80
CAP_ATTACK = 30
CAP_DEFEND = 30
CAP_HIT = 50
CAP_CRI... | 16.891304 | 29 | 0.607465 |
aa48b5d0058e4d5c47e658ba0523f148dbfd35b5 | 1,844 | py | Python | baselines/gail/statistics.py | rwill128/baselines | 24dd0c80db01623bb1224ab044b64da3fbec63cc | [
"MIT"
] | null | null | null | baselines/gail/statistics.py | rwill128/baselines | 24dd0c80db01623bb1224ab044b64da3fbec63cc | [
"MIT"
] | null | null | null | baselines/gail/statistics.py | rwill128/baselines | 24dd0c80db01623bb1224ab044b64da3fbec63cc | [
"MIT"
] | null | null | null | '''
This code is highly based on https://github.com/carpedm20/deep-rl-tensorflow/blob/master/agents/statistic.py
'''
import tensorflow as tf
import numpy as np
import baselines.common.tf_util as U
class stats():
def __init__(self, scalar_keys=[], histogram_keys=[]):
self.scalar_keys = scalar_keys
... | 40.086957 | 108 | 0.62039 |
b7d8acd7281637d8b990f697504bf8e9b4bf24e7 | 311 | py | Python | data/multilingual/Latn.OTE/Sun-ExtA_12/pdf_to_json_test_Latn.OTE_Sun-ExtA_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | 1 | 2021-09-19T19:47:35.000Z | 2021-09-19T19:47:35.000Z | data/multilingual/Latn.OTE/Sun-ExtA_12/pdf_to_json_test_Latn.OTE_Sun-ExtA_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | data/multilingual/Latn.OTE/Sun-ExtA_12/pdf_to_json_test_Latn.OTE_Sun-ExtA_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | import pdf_to_json as p2j
import json
url = "file:data/multilingual/Latn.OTE/Sun-ExtA_12/udhr_Latn.OTE_Sun-ExtA_12.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
| 31.1 | 81 | 0.810289 |
703c2767588c8c8e47f73a47d7bda0631fa4fc82 | 4,077 | py | Python | osf/migrations/0183_populate_file_versions_through.py | gaybro8777/osf.io | 30408511510a40bc393565817b343ef5fd76ab14 | [
"Apache-2.0"
] | 628 | 2015-01-15T04:33:22.000Z | 2022-03-30T06:40:10.000Z | osf/migrations/0183_populate_file_versions_through.py | gaybro8777/osf.io | 30408511510a40bc393565817b343ef5fd76ab14 | [
"Apache-2.0"
] | 4,712 | 2015-01-02T01:41:53.000Z | 2022-03-30T14:18:40.000Z | osf/migrations/0183_populate_file_versions_through.py | Johnetordoff/osf.io | de10bf249c46cede04c78f7e6f7e352c69e6e6b5 | [
"Apache-2.0"
] | 371 | 2015-01-12T16:14:08.000Z | 2022-03-31T18:58:29.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-03-03 17:52
from __future__ import unicode_literals
import logging
from django.db import migrations, connection
logger = logging.getLogger(__file__)
def restore_default_through_table(state, schema):
sql = """
DROP TABLE osf_basefilenode_vers... | 41.181818 | 215 | 0.728232 |
faf3a88f1fd67f41f2c3a50b5211925d5643f800 | 88,634 | py | Python | remaster/usr/lib/live-installer/configobj.py | LanderU/Desktop-Tools | ad63c56457f14c8fb6a8ee990923cb8f41001834 | [
"Apache-2.0"
] | null | null | null | remaster/usr/lib/live-installer/configobj.py | LanderU/Desktop-Tools | ad63c56457f14c8fb6a8ee990923cb8f41001834 | [
"Apache-2.0"
] | null | null | null | remaster/usr/lib/live-installer/configobj.py | LanderU/Desktop-Tools | ad63c56457f14c8fb6a8ee990923cb8f41001834 | [
"Apache-2.0"
] | null | null | null | # configobj.py
# A config file reader/writer that supports nested sections in config files.
# Copyright (C) 2005-2008 Michael Foord, Nicola Larosa
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# nico AT tekNico DOT net
# ConfigObj 4
# http://www.voidspace.org.uk/python/configobj.html
# Released subject to th... | 35.4536 | 114 | 0.530451 |
f029eeefad4504ada84a96950c92a809d782769c | 3,135 | py | Python | resource/pypi/cryptography-1.7.1/src/cryptography/hazmat/primitives/keywrap.py | hipnusleo/Laserjet | f53e0b740f48f2feb0c0bb285ec6728b313b4ccc | [
"Apache-2.0"
] | null | null | null | resource/pypi/cryptography-1.7.1/src/cryptography/hazmat/primitives/keywrap.py | hipnusleo/Laserjet | f53e0b740f48f2feb0c0bb285ec6728b313b4ccc | [
"Apache-2.0"
] | null | null | null | resource/pypi/cryptography-1.7.1/src/cryptography/hazmat/primitives/keywrap.py | hipnusleo/Laserjet | f53e0b740f48f2feb0c0bb285ec6728b313b4ccc | [
"Apache-2.0"
] | null | null | null | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import struct
from cryptography.hazmat.primitives.ciphers import... | 36.453488 | 80 | 0.606699 |
3326990f5d431b40ba473e37466e486d973603e6 | 2,875 | py | Python | imcsdk/imcbasetype.py | ecoen66/imcsdk | b10eaa926a5ee57cea7182ae0adc8dd1c818b0ab | [
"Apache-2.0"
] | 31 | 2016-06-14T07:23:59.000Z | 2021-09-12T17:17:26.000Z | imcsdk/imcbasetype.py | sthagen/imcsdk | 1831eaecb5960ca03a8624b1579521749762b932 | [
"Apache-2.0"
] | 109 | 2016-05-25T03:56:56.000Z | 2021-10-18T02:58:12.000Z | imcsdk/imcbasetype.py | sthagen/imcsdk | 1831eaecb5960ca03a8624b1579521749762b932 | [
"Apache-2.0"
] | 67 | 2016-05-17T05:53:56.000Z | 2022-03-24T15:52:53.000Z | # Copyright 2015 Cisco Systems, 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... | 29.040404 | 74 | 0.613217 |
2984b93d5704706985fe48a7d7d829b341c12c0f | 10,734 | py | Python | reveal_graph_embedding/experiments/utility.py | MKLab-ITI/reveal-graph-embedding | 72d4af794536f97b8ede06c0f27f261ea85d8c4b | [
"Apache-2.0"
] | 31 | 2015-07-14T16:21:25.000Z | 2021-06-30T14:10:44.000Z | reveal_graph_embedding/experiments/utility.py | MKLab-ITI/reveal-graph-embedding | 72d4af794536f97b8ede06c0f27f261ea85d8c4b | [
"Apache-2.0"
] | null | null | null | reveal_graph_embedding/experiments/utility.py | MKLab-ITI/reveal-graph-embedding | 72d4af794536f97b8ede06c0f27f261ea85d8c4b | [
"Apache-2.0"
] | 11 | 2016-08-21T03:07:20.000Z | 2020-03-07T03:17:05.000Z | __author__ = 'Georgios Rizos (georgerizos@iti.gr)'
import time
import numpy as np
from scipy.sparse import issparse
from sklearn.multiclass import OneVsRestClassifier
from sklearn import svm
from sklearn.preprocessing import normalize
from reveal_graph_embedding.datautil.snow_datautil import snow_read_data
from reve... | 46.873362 | 120 | 0.548351 |
5a091bbab763b3f308bd3181be7744ac8a99f868 | 792 | py | Python | app/helpers/__init__.py | geoadmin/service-alti | 813f3271ddef8d6075954b5800a0f99c865f3fef | [
"BSD-3-Clause"
] | 1 | 2017-02-17T21:34:23.000Z | 2017-02-17T21:34:23.000Z | app/helpers/__init__.py | geoadmin/service-alti | 813f3271ddef8d6075954b5800a0f99c865f3fef | [
"BSD-3-Clause"
] | 48 | 2016-07-18T08:59:40.000Z | 2022-02-24T13:16:38.000Z | app/helpers/__init__.py | geoadmin/service-alti | 813f3271ddef8d6075954b5800a0f99c865f3fef | [
"BSD-3-Clause"
] | 3 | 2017-01-22T09:59:23.000Z | 2021-04-29T07:21:58.000Z | # -*- coding: utf-8 -*-
import logging
import logging.config
import os
from os import path
import yaml
from flask import jsonify
from flask import make_response
from app.settings import LOGGING_CFG
logger = logging.getLogger(__name__)
def make_error_msg(code, msg):
return make_response(jsonify({'success': Fal... | 22 | 100 | 0.707071 |
7287e6ab6a921b52630e04331947971b300a6171 | 24,115 | py | Python | Lib/site-packages/win32com/client/build.py | egorcompany/telegram-chat-members | 19a7c2bffe2fb832b79a4475ca324c438d5f548d | [
"MIT"
] | 3 | 2016-11-24T03:57:22.000Z | 2019-02-27T15:19:50.000Z | Lib/site-packages/win32com/client/build.py | egorcompany/telegram-chat-members | 19a7c2bffe2fb832b79a4475ca324c438d5f548d | [
"MIT"
] | 67 | 2016-10-19T01:23:47.000Z | 2016-12-14T04:30:38.000Z | Lib/site-packages/win32com/client/build.py | egorcompany/telegram-chat-members | 19a7c2bffe2fb832b79a4475ca324c438d5f548d | [
"MIT"
] | 1 | 2020-08-08T12:44:48.000Z | 2020-08-08T12:44:48.000Z | """Contains knowledge to build a COM object definition.
This module is used by both the @dynamic@ and @makepy@ modules to build
all knowledge of a COM object.
This module contains classes which contain the actual knowledge of the object.
This include parameter and return type information, the COM dispid and CLS... | 38.217116 | 163 | 0.672569 |
fcfdf96381b919d6f93357a8a19aaa4ee15fab71 | 2,487 | py | Python | catalog/aws/ml-ops/lambda-python/cloudwatch_model_metrics.py | JamesWoolfenden/dataops-infra | 151477a3dc5c3b600cdf2138926726a889fef231 | [
"MIT"
] | null | null | null | catalog/aws/ml-ops/lambda-python/cloudwatch_model_metrics.py | JamesWoolfenden/dataops-infra | 151477a3dc5c3b600cdf2138926726a889fef231 | [
"MIT"
] | null | null | null | catalog/aws/ml-ops/lambda-python/cloudwatch_model_metrics.py | JamesWoolfenden/dataops-infra | 151477a3dc5c3b600cdf2138926726a889fef231 | [
"MIT"
] | null | null | null | """ This class implements a function to send evaluation metrics to CloudWatch using Boto3 """
import boto3
modelname = "${var.job_name}"
client = boto3.client("cloudwatch")
class CWEvalMetrics:
# initialize the region and the model name with the class instantiation
def __init__(self, region="${var.environm... | 31.0875 | 100 | 0.567752 |
7ebb5f25ebd5803fc65a8483de77a67f92044fe0 | 451 | py | Python | tests/util/test_util_c.py | philihp/openskill.py | 657a7ddeb81564a23b9aaf19ba225d82b1193046 | [
"MIT"
] | 120 | 2021-09-03T03:06:11.000Z | 2022-03-28T05:54:54.000Z | tests/util/test_util_c.py | philihp/openskill.py | 657a7ddeb81564a23b9aaf19ba225d82b1193046 | [
"MIT"
] | 48 | 2021-09-23T07:15:13.000Z | 2022-03-31T14:47:25.000Z | tests/util/test_util_c.py | philihp/openskill.py | 657a7ddeb81564a23b9aaf19ba225d82b1193046 | [
"MIT"
] | 6 | 2022-01-20T16:45:28.000Z | 2022-03-28T23:48:07.000Z | import pytest
from openskill import Rating, team_rating
from openskill.util import util_c
r = Rating()
team_1 = [r]
team_2 = [r, r]
def test_util_c():
# Compute Values
team_ratings = team_rating([team_1, team_2])
assert util_c(team_ratings) == pytest.approx(15.590239, 0.00000001)
# Compute 5 v 5
... | 23.736842 | 71 | 0.674058 |
f8708ac4e7924ae7df29e73e62f8a9e8b050b83a | 26,083 | py | Python | IPython/frontend/html/notebook/notebookapp.py | gitforhf/ipython | 48b63c19a53f9e26dc4f64150641c730cb6a2305 | [
"BSD-3-Clause-Clear"
] | 1 | 2019-04-19T23:00:22.000Z | 2019-04-19T23:00:22.000Z | IPython/frontend/html/notebook/notebookapp.py | kod3r/ipython | 48b63c19a53f9e26dc4f64150641c730cb6a2305 | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/frontend/html/notebook/notebookapp.py | kod3r/ipython | 48b63c19a53f9e26dc4f64150641c730cb6a2305 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-05-03T10:25:12.000Z | 2020-05-03T10:25:12.000Z | # coding: utf-8
"""A tornado based IPython notebook server.
Authors:
* Brian Granger
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPY... | 39.519697 | 116 | 0.595484 |
4128d0ccc3f5257701c702bb896cfebf70a4aaaa | 404 | py | Python | 06/01/TextCalendar/formatmonth.py | pylangstudy/201709 | 53d868786d7327a83bfa7f4149549c6f9855a6c6 | [
"CC0-1.0"
] | null | null | null | 06/01/TextCalendar/formatmonth.py | pylangstudy/201709 | 53d868786d7327a83bfa7f4149549c6f9855a6c6 | [
"CC0-1.0"
] | 32 | 2017-09-01T00:52:17.000Z | 2017-10-01T00:30:02.000Z | 06/01/TextCalendar/formatmonth.py | pylangstudy/201709 | 53d868786d7327a83bfa7f4149549c6f9855a6c6 | [
"CC0-1.0"
] | null | null | null | import calendar
print(calendar.TextCalendar())
print(calendar.TextCalendar(firstweekday=0))#月曜日
print(calendar.TextCalendar(firstweekday=6))#日曜日
for firstweekday in [0, 6]:#月,日
c = calendar.TextCalendar(firstweekday=firstweekday)
print(c.formatmonth(2017, 9))
for firstweekday in [0, 6]:#月,日
c = calendar.... | 28.857143 | 56 | 0.74505 |
d978beb4625e0712ec2b3dd1369b085d21426a2c | 370 | py | Python | backend/core/services/__init__.py | ethosdev/poap-fun | a4ef4f8f0fd9ad1b3dc925c7024078783ae9e3c5 | [
"MIT"
] | 8 | 2020-10-20T04:49:29.000Z | 2022-02-27T00:03:49.000Z | backend/core/services/__init__.py | ethosdev/poap-fun | a4ef4f8f0fd9ad1b3dc925c7024078783ae9e3c5 | [
"MIT"
] | 17 | 2021-03-19T15:08:08.000Z | 2021-09-22T19:37:31.000Z | backend/core/services/__init__.py | ethosdev/poap-fun | a4ef4f8f0fd9ad1b3dc925c7024078783ae9e3c5 | [
"MIT"
] | 8 | 2021-04-28T22:29:26.000Z | 2022-03-28T16:47:47.000Z | from ._poap_integration_service import PoapIntegrationService
from ._raffle_results_service import RaffleResultsService
from ._email_service import EmailService
from ._raffle_multi_join import RaffleMultipleJoinService
poap_integration_service = PoapIntegrationService()
raffle_results_service = RaffleResultsService()... | 33.636364 | 61 | 0.889189 |
552414d89e83f3119d580c4fcc98578d08a15b9c | 1,790 | py | Python | unsdgbot/message_processor/bot_response_text.py | btaba/UN-SDG-bot | 46fde9a866cefe37b8e600e87b37ed0f73bc94a2 | [
"MIT"
] | null | null | null | unsdgbot/message_processor/bot_response_text.py | btaba/UN-SDG-bot | 46fde9a866cefe37b8e600e87b37ed0f73bc94a2 | [
"MIT"
] | null | null | null | unsdgbot/message_processor/bot_response_text.py | btaba/UN-SDG-bot | 46fde9a866cefe37b8e600e87b37ed0f73bc94a2 | [
"MIT"
] | null | null | null | """
Some generic text that the bot will return
"""
def get_sdg_quick_replies(sequence_number=1):
sdg_quick_replies = [
{
"content_type": "text",
"title": 'Continue',
"payload": 'SDG_QUICK_REPLY_CONTINUE' + str(sequence_number)
},
{
"cont... | 30.862069 | 111 | 0.580447 |
8b724cfadcf14ad99db7518bab7a67136a3a67c8 | 1,740 | py | Python | Researchforum/researchforum/config/environment.py | Pratikgit/Researchforum | 3f86d1d959ac51ca224faba302092c23e805cfb4 | [
"Apache-2.0"
] | null | null | null | Researchforum/researchforum/config/environment.py | Pratikgit/Researchforum | 3f86d1d959ac51ca224faba302092c23e805cfb4 | [
"Apache-2.0"
] | null | null | null | Researchforum/researchforum/config/environment.py | Pratikgit/Researchforum | 3f86d1d959ac51ca224faba302092c23e805cfb4 | [
"Apache-2.0"
] | null | null | null | """Pylons environment configuration"""
import os
from mako.lookup import TemplateLookup
from pylons.configuration import PylonsConfig
from pylons.error import handle_mako_error
import researchforum.lib.app_globals as app_globals
import researchforum.lib.helpers
from researchforum.config.routing import make_map
def l... | 35.510204 | 80 | 0.709195 |
a7389c573e3553cd8fc6d587c7545e9a38b1141e | 9,075 | py | Python | msc_pygeoapi/connector/elasticsearch_.py | Dukestep/msc-pygeoapi | a7376ed0031f2cb4675ebd9f17d802c1783a2941 | [
"MIT"
] | 9 | 2020-12-11T04:21:42.000Z | 2022-01-04T19:00:22.000Z | msc_pygeoapi/connector/elasticsearch_.py | Dukestep/msc-pygeoapi | a7376ed0031f2cb4675ebd9f17d802c1783a2941 | [
"MIT"
] | 25 | 2020-04-22T22:17:06.000Z | 2022-01-31T12:12:40.000Z | msc_pygeoapi/connector/elasticsearch_.py | Dukestep/msc-pygeoapi | a7376ed0031f2cb4675ebd9f17d802c1783a2941 | [
"MIT"
] | 18 | 2020-04-22T23:40:40.000Z | 2022-02-07T14:07:19.000Z | # =================================================================
#
# Author: Etienne <etienne.pelletier@canada.ca>
#
# Copyright (c) 2021 Etienne Pelletier
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to dea... | 31.842105 | 79 | 0.598457 |
480eb035c11c58128e23a94857ff0e46bd61d84d | 339 | py | Python | jsp_fwk/__init__.py | dothinking/job_shop_schedule | ad61467b37471a5debdb59a96aa9c7c3b2eef55a | [
"Apache-1.1"
] | null | null | null | jsp_fwk/__init__.py | dothinking/job_shop_schedule | ad61467b37471a5debdb59a96aa9c7c3b2eef55a | [
"Apache-1.1"
] | null | null | null | jsp_fwk/__init__.py | dothinking/job_shop_schedule | ad61467b37471a5debdb59a96aa9c7c3b2eef55a | [
"Apache-1.1"
] | 1 | 2022-03-15T06:18:06.000Z | 2022-03-15T06:18:06.000Z | # domain class
from .model.domain import (Job, Machine, Operation)
# variable
from .model.variable import (JobStep, MachineStep, OperationStep)
# problem, solution and solver
from .model.problem import JSProblem
from .model.solution import JSSolution
from .model.solver import JSSolver
# benchmark
from .model.benchma... | 26.076923 | 65 | 0.80236 |
5773000f9f98a75234e9668d7a8cc8e22b7e8e16 | 365 | py | Python | src/test/tinc/tinctest/test/dryrun/mocktests/dryrun_test_load_failure.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 9 | 2018-04-20T03:31:01.000Z | 2020-05-13T14:10:53.000Z | src/test/tinc/tinctest/test/dryrun/mocktests/dryrun_test_load_failure.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 36 | 2017-09-21T09:12:27.000Z | 2020-06-17T16:40:48.000Z | src/test/tinc/tinctest/test/dryrun/mocktests/dryrun_test_load_failure.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 32 | 2017-08-31T12:50:52.000Z | 2022-03-01T07:34:53.000Z | from tinctest.case import TINCTestCase
class Sample2TINCTests(TINCTestCase):
@classmethod
def setUpClass(cls):
print "SetupClass"
def setUp(self):
print "setup"
def test_021(self):
pass
def tearDown(self):
print "teardown"
@classmethod
def tearDo... | 17.380952 | 38 | 0.619178 |
417d717d58cd0463499394f2b91c2deaf9fe3ebc | 943 | py | Python | braggi-rest-api/braggi_rest_api/dashboard/views.py | SushritPasupuleti/Braggi-A-Python-Based-Contextual-Chatbot-Framework | c81fa4bb0551d2d32fedc5c5d5fbf17940f5d2b1 | [
"MIT"
] | 6 | 2018-07-01T14:55:50.000Z | 2020-11-02T13:22:07.000Z | braggi-rest-api/braggi_rest_api/dashboard/views.py | SushritPasupuleti/Braggi-A-Python-Based-Contextual-Chatbot-Framework | c81fa4bb0551d2d32fedc5c5d5fbf17940f5d2b1 | [
"MIT"
] | null | null | null | braggi-rest-api/braggi_rest_api/dashboard/views.py | SushritPasupuleti/Braggi-A-Python-Based-Contextual-Chatbot-Framework | c81fa4bb0551d2d32fedc5c5d5fbf17940f5d2b1 | [
"MIT"
] | 2 | 2018-09-10T11:45:22.000Z | 2019-11-21T11:40:20.000Z | from django.shortcuts import render
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import TemplateView
from rest_api.Braggi_Engine import Run
from django.template import Context, loader
from django.http import HttpResponse
class DashboardHomeView(LoginRequiredMixin, TemplateView):... | 33.678571 | 83 | 0.744433 |
40e4d567f6bc1aa42c47cadefd89a79bf3bdd4f6 | 10,674 | py | Python | sdk/python/pulumi_aws/cloudhsmv2/cluster.py | sibuthomasmathew/pulumi-aws | 6351f2182eb6f693d4e09e4136c385adfa0ab674 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/cloudhsmv2/cluster.py | sibuthomasmathew/pulumi-aws | 6351f2182eb6f693d4e09e4136c385adfa0ab674 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/cloudhsmv2/cluster.py | sibuthomasmathew/pulumi-aws | 6351f2182eb6f693d4e09e4136c385adfa0ab674 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilitie... | 49.646512 | 181 | 0.664512 |
1c87d3c9874cf7783f10ad214ee5d216c5c0123c | 6,743 | py | Python | tfkit/model/clas/model.py | fossabot/TFkit | aade08634171eaee41e3d687b0f65259bef8fe43 | [
"Apache-2.0"
] | null | null | null | tfkit/model/clas/model.py | fossabot/TFkit | aade08634171eaee41e3d687b0f65259bef8fe43 | [
"Apache-2.0"
] | null | null | null | tfkit/model/clas/model.py | fossabot/TFkit | aade08634171eaee41e3d687b0f65259bef8fe43 | [
"Apache-2.0"
] | null | null | null | import sys
import os
import torch
from torch import nn
dir_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.abspath(os.path.join(dir_path, os.pardir)))
from torch import softmax, sigmoid
from tfkit.model.clas.dataloader import get_feature_from_data
from tfkit.utility.loss import FocalLoss, ... | 44.361842 | 115 | 0.607148 |
63d32294b1f786161a3afaa769057710173b69a7 | 21,252 | py | Python | autoscraper/auto_scraper.py | hicala/autoscraper | deb8a297d35bc5725b30219df31a09efb936cffb | [
"MIT"
] | 1 | 2020-11-11T19:46:21.000Z | 2020-11-11T19:46:21.000Z | autoscraper/auto_scraper.py | hicala/autoscraper | deb8a297d35bc5725b30219df31a09efb936cffb | [
"MIT"
] | null | null | null | autoscraper/auto_scraper.py | hicala/autoscraper | deb8a297d35bc5725b30219df31a09efb936cffb | [
"MIT"
] | null | null | null | import hashlib
import json
import unicodedata
from collections import defaultdict
from html import unescape
from urllib.parse import urljoin, urlparse
import requests
from bs4 import BeautifulSoup
from autoscraper.utils import get_random_str, unique_hashable, unique_stack_list, \
ResultItem, FuzzyText
class Au... | 36.515464 | 110 | 0.595191 |
2dbc9d6967d9da83edb2e46827f1095b68c4962a | 414 | py | Python | meiduo_mall/apps/verifications/urls.py | MarioKarting/Django_meiduo_project | ef06e70b1ddb6709983ebb644452c980afc29000 | [
"MIT"
] | null | null | null | meiduo_mall/apps/verifications/urls.py | MarioKarting/Django_meiduo_project | ef06e70b1ddb6709983ebb644452c980afc29000 | [
"MIT"
] | null | null | null | meiduo_mall/apps/verifications/urls.py | MarioKarting/Django_meiduo_project | ef06e70b1ddb6709983ebb644452c980afc29000 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# _*_ coding:utf-8 _*_
from django.conf.urls import url
from . import views
urlpatterns = [
# 1.获取图形验证码 image_codes/(?P<uuid>[\w-]+)/
url(r'^image_codes/(?P<uuid>[\w-]+)/$', views.ImageCodeView.as_view(), name='img_code'),
# 2. 短信验证码sms_codes/(?P<mobile>1[3-9]\d{9})/
ur... | 23 | 95 | 0.608696 |
397cf01a005b89afc96e3869078734e3ebb23018 | 55 | py | Python | FSWDF-Project/main.py | chrischism8063/Mongo-py | c531f93cd37cd9d9420e39811a37c8bcfc1e5d1c | [
"MIT"
] | null | null | null | FSWDF-Project/main.py | chrischism8063/Mongo-py | c531f93cd37cd9d9420e39811a37c8bcfc1e5d1c | [
"MIT"
] | null | null | null | FSWDF-Project/main.py | chrischism8063/Mongo-py | c531f93cd37cd9d9420e39811a37c8bcfc1e5d1c | [
"MIT"
] | null | null | null | # main entry to the system
from application import app
| 18.333333 | 27 | 0.8 |
16f389e5ce30ba25217b58ac39ef7ace30f1f583 | 1,252 | py | Python | tests/test_vbox.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | tests/test_vbox.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | tests/test_vbox.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | import time
#from cm4.vm.Vm import Vm
from cm4.configuration.config import Config
# from cm4.mongo.mongoDB import MongoDB
from cm4.common.debug import HEADING, myself
import subprocess
# nosetest -v --nopature
# nosetests -v --nocapture tests/test_vbox.py
class Test_vagrant:
def setup(self):
pass
d... | 26.083333 | 101 | 0.630192 |
9376e3bc4fca50d0e4bb00b25f621c99d359cb87 | 15,735 | py | Python | qiskit_machine_learning/algorithms/distribution_learners/qgan/numpy_discriminator.py | Cryoris/qiskit-machine-learning | 140ab993c9f80e513fea896d9d67459ed20d1b60 | [
"Apache-2.0"
] | null | null | null | qiskit_machine_learning/algorithms/distribution_learners/qgan/numpy_discriminator.py | Cryoris/qiskit-machine-learning | 140ab993c9f80e513fea896d9d67459ed20d1b60 | [
"Apache-2.0"
] | null | null | null | qiskit_machine_learning/algorithms/distribution_learners/qgan/numpy_discriminator.py | Cryoris/qiskit-machine-learning | 140ab993c9f80e513fea896d9d67459ed20d1b60 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 37.915663 | 99 | 0.572609 |
b573b06042927b4f47ee115d8e793754e5c21466 | 1,392 | py | Python | DS-Unit-3-Sprint-1-Software-Engineering/acme_report.py | matthew-sessions/DS-Unit-3-Sprint-1-Software-Engineering | 8acef8ef1348b49b3f5410d75592c3e7b8161b53 | [
"MIT"
] | null | null | null | DS-Unit-3-Sprint-1-Software-Engineering/acme_report.py | matthew-sessions/DS-Unit-3-Sprint-1-Software-Engineering | 8acef8ef1348b49b3f5410d75592c3e7b8161b53 | [
"MIT"
] | null | null | null | DS-Unit-3-Sprint-1-Software-Engineering/acme_report.py | matthew-sessions/DS-Unit-3-Sprint-1-Software-Engineering | 8acef8ef1348b49b3f5410d75592c3e7b8161b53 | [
"MIT"
] | null | null | null | from acme import Product
import random
from random import randint, sample, uniform
ADJECTIVES = ['Awesome', 'Shiny', 'Impressive', 'Portable', 'Improved']
NOUNS = ['Anvil', 'Catapult', 'Disguise', 'Mousetrap', '???']
def generate_products(num_products=30):
"""generates 30 products"""
products = []
for i ... | 32.372093 | 73 | 0.656609 |
19c7f23c1f8fd727b8a05be2d2460580ec1bc551 | 9,115 | py | Python | custom_components/thermiagenesis/climate.py | CJNE/thermiagenesis | 14b87d4469bd11ebd8bef03d41d44029ebfe871f | [
"MIT"
] | 7 | 2020-10-16T09:12:35.000Z | 2022-03-01T06:52:33.000Z | custom_components/thermiagenesis/climate.py | CJNE/thermiagenesis | 14b87d4469bd11ebd8bef03d41d44029ebfe871f | [
"MIT"
] | 37 | 2021-12-07T09:01:49.000Z | 2022-03-30T13:27:07.000Z | custom_components/thermiagenesis/climate.py | CJNE/thermiagenesis | 14b87d4469bd11ebd8bef03d41d44029ebfe871f | [
"MIT"
] | 1 | 2021-12-10T20:19:12.000Z | 2021-12-10T20:19:12.000Z | """ Thermia Genesis climate sensors."""
import logging
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import ATTR_CURRENT_TEMPERATURE
from homeassistant.components.climate.const import ATTR_MAX_TEMP
from homeassistant.components.climate.const import ATTR_MIN_TEMP... | 36.314741 | 93 | 0.693801 |
62895c8e59bae96876957bc323411b1fbb27003a | 3,705 | py | Python | main.py | evanloshin/CarND-Advanced-Lane-Lines | 36fdf250694105fa0ed557e911ac9105348cab4d | [
"MIT"
] | null | null | null | main.py | evanloshin/CarND-Advanced-Lane-Lines | 36fdf250694105fa0ed557e911ac9105348cab4d | [
"MIT"
] | null | null | null | main.py | evanloshin/CarND-Advanced-Lane-Lines | 36fdf250694105fa0ed557e911ac9105348cab4d | [
"MIT"
] | null | null | null | # import python libraries
print('Importing dependencies...')
import numpy as np
import cv2
from matplotlib import pyplot as plt
from moviepy.editor import VideoFileClip
import sys
# import project dependencies
import functions as fn
from classes import undistorter, transformer, laneFinder
def main(argv):
#######... | 44.638554 | 115 | 0.716059 |
8ef158ace90ba28e36d7fe10f23d5ec9230b2ff3 | 855 | py | Python | tutorials_for_myself/dataclass.py | pestun/ultimate-utils | 676002e80422067256c43172a78825ed12954bcb | [
"MIT"
] | 5 | 2021-03-13T16:07:26.000Z | 2021-09-09T17:00:36.000Z | tutorials_for_myself/dataclass.py | pestun/ultimate-utils | 676002e80422067256c43172a78825ed12954bcb | [
"MIT"
] | 8 | 2021-03-09T21:52:09.000Z | 2021-12-02T17:23:33.000Z | tutorials_for_myself/dataclass.py | pestun/ultimate-utils | 676002e80422067256c43172a78825ed12954bcb | [
"MIT"
] | 5 | 2021-03-24T20:38:43.000Z | 2022-03-17T07:54:12.000Z | # https://realpython.com/python-data-classes/
from dataclasses import dataclass
@dataclass
class DataClassCard:
rank: str
suit: str
default_test: str = 'default'
card = DataClassCard('Q', 'Hearts')
print(card)
print(card == DataClassCard('Q', 'Hearts'))
#%%
from dataclasses import dataclass, field
d... | 20.357143 | 118 | 0.694737 |
e67cdbd4bc550a44580b4a16a330135360d6cbef | 1,456 | py | Python | app/api/v2/views/rsvps.py | MaggieKimani1/QUESTIONER-API-V2 | e1440ce75a52757278b48b19223f81b95f0b1eee | [
"MIT"
] | null | null | null | app/api/v2/views/rsvps.py | MaggieKimani1/QUESTIONER-API-V2 | e1440ce75a52757278b48b19223f81b95f0b1eee | [
"MIT"
] | null | null | null | app/api/v2/views/rsvps.py | MaggieKimani1/QUESTIONER-API-V2 | e1440ce75a52757278b48b19223f81b95f0b1eee | [
"MIT"
] | null | null | null | from flask import Flask, request, jsonify, json
from flask_restful import Resource
from app.api.v2.models.meetupmodel import Meetups
from app.api.v2.models.rsvpmodel import Rsvps
from flask_expects_json import expects_json
from app.api.v2.utils.json_schema import rsvp_schema
from flask_jwt_extended import get_jwt_ident... | 36.4 | 98 | 0.653846 |
b2cae7f552f2d2d0b4d2d33295b8ceff37e94207 | 7,694 | py | Python | etna/transforms/timestamp/time_flags.py | martins0n/etna | 51e9cec5183da2499ca247b0e2db215507246ceb | [
"Apache-2.0"
] | 326 | 2021-11-18T15:30:50.000Z | 2022-03-31T09:44:15.000Z | etna/transforms/timestamp/time_flags.py | martins0n/etna | 51e9cec5183da2499ca247b0e2db215507246ceb | [
"Apache-2.0"
] | 305 | 2021-11-17T10:28:31.000Z | 2022-03-31T18:05:03.000Z | etna/transforms/timestamp/time_flags.py | martins0n/etna | 51e9cec5183da2499ca247b0e2db215507246ceb | [
"Apache-2.0"
] | 29 | 2021-11-21T12:10:48.000Z | 2022-03-31T22:55:06.000Z | from copy import deepcopy
from typing import Optional
import numpy as np
import pandas as pd
from etna.transforms.base import FutureMixin
from etna.transforms.base import Transform
class TimeFlagsTransform(Transform, FutureMixin):
"""TimeFlagsTransform is a class that implements extraction of the main time-base... | 40.282723 | 120 | 0.659865 |
f21ede9bd6e772b8bcf1f85e87d157c687b22489 | 1,297 | py | Python | kgl_deepfake/pytorch_retinaface/utils/timer.py | qAp/kgl_deepfake | d3ee36d704d82d5d72068ea16276a88b5746c8de | [
"Apache-2.0"
] | null | null | null | kgl_deepfake/pytorch_retinaface/utils/timer.py | qAp/kgl_deepfake | d3ee36d704d82d5d72068ea16276a88b5746c8de | [
"Apache-2.0"
] | null | null | null | kgl_deepfake/pytorch_retinaface/utils/timer.py | qAp/kgl_deepfake | d3ee36d704d82d5d72068ea16276a88b5746c8de | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/12h_pytorch_retinaface.utils.timer.ipynb (unless otherwise specified).
__all__ = ['Timer']
# Cell
# %load Pytorch_Retinaface/utils/timer.py
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT L... | 27.020833 | 118 | 0.561295 |
b69b6b72f7037628cfc1a2f1056170d837474838 | 437 | py | Python | pytest_djangoapp/compat.py | jayvdb/pytest-djangoapp | 271df3cd57045961aadeb1ee4433de3f4fcfd2ef | [
"BSD-3-Clause"
] | 34 | 2018-06-18T12:18:13.000Z | 2021-05-14T14:15:39.000Z | pytest_djangoapp/compat.py | jayvdb/pytest-djangoapp | 271df3cd57045961aadeb1ee4433de3f4fcfd2ef | [
"BSD-3-Clause"
] | 25 | 2019-05-21T23:13:13.000Z | 2022-02-10T10:49:50.000Z | pytest_djangoapp/compat.py | jayvdb/pytest-djangoapp | 271df3cd57045961aadeb1ee4433de3f4fcfd2ef | [
"BSD-3-Clause"
] | 4 | 2018-06-25T03:59:22.000Z | 2021-05-27T04:09:57.000Z | from django import VERSION
def get_urlpatterns(patterns_list):
"""Returns object suitable to use as urlpatterns in `urls.py`.
Example::
urlpatterns = get_urlpatterns([
url(r'^index/$', index, name='index'),
])
:param patterns_list:
:return:
"""
if VERSION >= (1, ... | 19.863636 | 66 | 0.617849 |
0298c309bebdf6ba9ce0b82bf5b8c05a550be290 | 7,574 | py | Python | rdr_service/alembic/versions/f2aa951ca1a7_add_summary_columns.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 39 | 2017-10-13T19:16:27.000Z | 2021-09-24T16:58:21.000Z | rdr_service/alembic/versions/f2aa951ca1a7_add_summary_columns.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 312 | 2017-09-08T15:42:13.000Z | 2022-03-23T18:21:40.000Z | rdr_service/alembic/versions/f2aa951ca1a7_add_summary_columns.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 19 | 2017-09-15T13:58:00.000Z | 2022-02-07T18:33:20.000Z | """Add summary columns
Revision ID: f2aa951ca1a7
Revises: 7e250583b9cb
Create Date: 2017-10-23 16:50:06.586388
"""
import model.utils
import sqlalchemy as sa
from alembic import op
from rdr_service.participant_enums import OrderStatus
# revision identifiers, used by Alembic.
revision = "f2aa951ca1a7"
down_revision ... | 49.181818 | 119 | 0.746633 |
b614d97625fcda8cccccac9ff6ae6c80f3e48f4b | 3,409 | py | Python | model_YYMetRod.py | LeiDai/meep_metamaterials | 2ca51c861e1f69e638e920c9bdacc7c583e22aed | [
"MIT"
] | 6 | 2019-03-18T07:00:51.000Z | 2021-09-01T12:42:13.000Z | model_YYMetRod.py | LeiDai/meep_metamaterials | 2ca51c861e1f69e638e920c9bdacc7c583e22aed | [
"MIT"
] | null | null | null | model_YYMetRod.py | LeiDai/meep_metamaterials | 2ca51c861e1f69e638e920c9bdacc7c583e22aed | [
"MIT"
] | 5 | 2017-02-20T12:00:46.000Z | 2021-05-29T23:57:07.000Z | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import meep_utils, meep_materials
import numpy as np
from meep_utils import in_sphere, in_xcyl, in_ycyl, in_zcyl, in_xslab, in_yslab, in_zslab
"""
"""
class YYMR(meep_utils.AbstractMeepModel): #{{{
"""
MMxxxxxxMM
MMxxxxxxMM
^ z MMxxxxxxMM... | 44.855263 | 115 | 0.63127 |
bef0b396db1f0d92743bab2d85c4369ff0db45fb | 371 | py | Python | dist/weewx-3.9.2/bin/weeplot/__init__.py | v0rts/docker-weewx | 70b2f252051dfead4fcb74e74662b297831e6342 | [
"Apache-2.0"
] | 10 | 2017-01-05T17:30:48.000Z | 2021-09-18T15:04:20.000Z | dist/weewx-3.9.2/bin/weeplot/__init__.py | v0rts/docker-weewx | 70b2f252051dfead4fcb74e74662b297831e6342 | [
"Apache-2.0"
] | 2 | 2019-07-21T10:48:42.000Z | 2022-02-16T20:36:45.000Z | dist/weewx-3.9.2/bin/weeplot/__init__.py | v0rts/docker-weewx | 70b2f252051dfead4fcb74e74662b297831e6342 | [
"Apache-2.0"
] | 12 | 2017-01-05T18:50:30.000Z | 2021-10-05T07:35:45.000Z | #
# Copyright (c) 2009-2015 Tom Keffer <tkeffer@gmail.com>
#
# See the file LICENSE.txt for your full rights.
#
"""Package weeplot. A set of modules for doing simple plots
"""
# Define possible exceptions that could get thrown.
class ViolatedPrecondition(StandardError):
"""Exception thrown when a function i... | 24.733333 | 78 | 0.716981 |
276ca847c4b55092ff6718ca7d1390a93ee237fd | 2,166 | py | Python | nuagevsdsim/simentities/nusimcloudmgmtsystem.py | pdellaert/vspk-sim | 459a84366a9bdde82d74aca18ea866e3d55d62ee | [
"BSD-3-Clause"
] | null | null | null | nuagevsdsim/simentities/nusimcloudmgmtsystem.py | pdellaert/vspk-sim | 459a84366a9bdde82d74aca18ea866e3d55d62ee | [
"BSD-3-Clause"
] | null | null | null | nuagevsdsim/simentities/nusimcloudmgmtsystem.py | pdellaert/vspk-sim | 459a84366a9bdde82d74aca18ea866e3d55d62ee | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# BSD 3-Clause License
#
# Copyright (c) 2017, Nokia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright no... | 39.381818 | 80 | 0.753463 |
52eab244dd28a96397d7ff83d1bed8847384b762 | 628 | py | Python | pomegranate/__init__.py | jkleckner/pomegranate | c91c80b50c2e9ea4c5edcadad7e314c1abbb3178 | [
"MIT"
] | 1 | 2018-12-29T04:43:30.000Z | 2018-12-29T04:43:30.000Z | pomegranate/__init__.py | jkleckner/pomegranate | c91c80b50c2e9ea4c5edcadad7e314c1abbb3178 | [
"MIT"
] | null | null | null | pomegranate/__init__.py | jkleckner/pomegranate | c91c80b50c2e9ea4c5edcadad7e314c1abbb3178 | [
"MIT"
] | null | null | null | # __init__.py: pomegranate
# Contact: Jacob Schreiber <jmschreiber91@gmail.com>
"""
For detailed documentation and examples, see the README.
"""
import os
from .base import *
from .parallel import *
from .distributions import *
from .kmeans import Kmeans
from .gmm import GeneralMixtureModel
from .NaiveBayes import... | 22.428571 | 56 | 0.789809 |
ee7b0459ef0e8b4a8711a64029779af69688da5e | 1,398 | py | Python | venv/Lib/site-packages/nipype/interfaces/cmtk/tests/test_auto_CFFConverter.py | richung99/digitizePlots | 6b408c820660a415a289726e3223e8f558d3e18b | [
"MIT"
] | 585 | 2015-01-12T16:06:47.000Z | 2022-03-26T14:51:08.000Z | nipype/interfaces/cmtk/tests/test_auto_CFFConverter.py | tamires-consulting/nipype | b7879d75a63b6500b2e7d2c3eba5aa7670339274 | [
"Apache-2.0"
] | 2,329 | 2015-01-01T09:56:41.000Z | 2022-03-30T14:24:49.000Z | nipype/interfaces/cmtk/tests/test_auto_CFFConverter.py | tamires-consulting/nipype | b7879d75a63b6500b2e7d2c3eba5aa7670339274 | [
"Apache-2.0"
] | 487 | 2015-01-20T01:04:52.000Z | 2022-03-21T21:22:47.000Z | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..convert import CFFConverter
def test_CFFConverter_inputs():
input_map = dict(
creator=dict(),
data_files=dict(),
description=dict(
usedefault=True,
),
email=dict(),
gifti_labels=dict(),
... | 26.377358 | 67 | 0.572961 |
49059ef86ac659f49bc90661f08b5970671685cd | 2,563 | py | Python | transformer_pytorch/trainer/metrics.py | walkacross/transformer-pytorch | 6aa06889f6d10fceb5587b47aba15e65fa305074 | [
"Apache-2.0"
] | 1 | 2022-01-05T08:59:30.000Z | 2022-01-05T08:59:30.000Z | transformer_pytorch/trainer/metrics.py | walkacross/transformer-pytorch | 6aa06889f6d10fceb5587b47aba15e65fa305074 | [
"Apache-2.0"
] | null | null | null | transformer_pytorch/trainer/metrics.py | walkacross/transformer-pytorch | 6aa06889f6d10fceb5587b47aba15e65fa305074 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import pdb
class TokenCrossEntropyLoss(nn.Module):
def __init__(self, pad_idx=0):
super().__init__()
self.pad_idx = pad_idx
self.loss_function = nn.CrossEntropyLoss(reduction="sum",ignore_index=pad_idx)
def forward(self, input, targe... | 32.443038 | 86 | 0.611783 |
739ce7b2ecb4d72cb424909a9e08c3f9a2164104 | 14,689 | py | Python | python/ccxt/async_support/__init__.py | npomfret/ccxt | 55e64d28c1a4a4925353076af9880dc18101fb73 | [
"MIT"
] | null | null | null | python/ccxt/async_support/__init__.py | npomfret/ccxt | 55e64d28c1a4a4925353076af9880dc18101fb73 | [
"MIT"
] | null | null | null | python/ccxt/async_support/__init__.py | npomfret/ccxt | 55e64d28c1a4a4925353076af9880dc18101fb73 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""CCXT: CryptoCurrency eXchange Trading Library (Async)"""
# -----------------------------------------------------------------------------
__version__ = '1.64.30'
# -----------------------------------------------------------------------------
from ccxt.async_support.base.exchange import Ex... | 50.82699 | 86 | 0.557015 |
e69684e13ea956e9fb0141c56ff363a4cb5b3201 | 2,155 | py | Python | scripts/ntrip_client_node.py | jewos0127/ntrip_client | 0989fb9d15e2a83acbc36fa9cc721060303ab4aa | [
"MIT"
] | null | null | null | scripts/ntrip_client_node.py | jewos0127/ntrip_client | 0989fb9d15e2a83acbc36fa9cc721060303ab4aa | [
"MIT"
] | null | null | null | scripts/ntrip_client_node.py | jewos0127/ntrip_client | 0989fb9d15e2a83acbc36fa9cc721060303ab4aa | [
"MIT"
] | null | null | null | #!/usr/bin/python
import rospy
import socket
from base64 import b64encode
from rtcm_msgs.msg import Message
def rtcm_run():
# Init ROS Node
rospy.init_node('ntrip_client_node', anonymous=True)
# Setting for NTRIP
ntrip_server = rospy.get_param('~ntrip_server', 'ntrip.server.com')
ntrip_mountpoin... | 30.352113 | 73 | 0.618561 |
eb8e8c76a1963aee891e75fbe3d82cad5d566f58 | 2,095 | py | Python | tests/functional/test_fish.py | frankhli843/thedarn | 9e00f854c248156fba820f39b2834e8273583984 | [
"MIT"
] | null | null | null | tests/functional/test_fish.py | frankhli843/thedarn | 9e00f854c248156fba820f39b2834e8273583984 | [
"MIT"
] | null | null | null | tests/functional/test_fish.py | frankhli843/thedarn | 9e00f854c248156fba820f39b2834e8273583984 | [
"MIT"
] | null | null | null | import pytest
from tests.functional.plots import with_confirmation, without_confirmation, \
refuse_with_confirmation, select_command_with_arrows
containers = (('thedarn/python3-fish',
u'''FROM python:3
# Use jessie-backports since it has the fish package. See here for details:
... | 39.528302 | 141 | 0.663484 |
2c5bfe50b80142ed8bf87e9160ef83dc10ddb68f | 3,902 | py | Python | feature_engine/imputation/missing_indicator.py | ttungl/feature_engine | cf2ff55c5b4eeb4353021b12d57a7c2870a7febb | [
"BSD-3-Clause"
] | 1 | 2020-10-22T21:49:38.000Z | 2020-10-22T21:49:38.000Z | feature_engine/imputation/missing_indicator.py | ttungl/feature_engine | cf2ff55c5b4eeb4353021b12d57a7c2870a7febb | [
"BSD-3-Clause"
] | 3 | 2020-10-27T16:27:49.000Z | 2020-11-13T13:22:08.000Z | feature_engine/imputation/missing_indicator.py | SunnyxBd/feature_engine | e40457ce8b4baa1e146976bf1af1bbdf6eae1305 | [
"BSD-3-Clause"
] | 1 | 2020-11-16T21:58:05.000Z | 2020-11-16T21:58:05.000Z | # Authors: Soledad Galli <solegalli@protonmail.com>
# License: BSD 3 clause
import numpy as np
from feature_engine.dataframe_checks import _is_dataframe
from feature_engine.imputation.base_imputer import BaseImputer
from feature_engine.variable_manipulation import _define_variables
class AddMissingIndicator(BaseImp... | 31.983607 | 85 | 0.633521 |
0e779ec3c203a6ae2c314fba25409bb89c0ccbfb | 7,019 | py | Python | app/controllers/journal.py | ukayaj620/rejournal | daf80036c3aabc55ce7ba145241a50bf52af1c75 | [
"MIT"
] | null | null | null | app/controllers/journal.py | ukayaj620/rejournal | daf80036c3aabc55ce7ba145241a50bf52af1c75 | [
"MIT"
] | null | null | null | app/controllers/journal.py | ukayaj620/rejournal | daf80036c3aabc55ce7ba145241a50bf52af1c75 | [
"MIT"
] | null | null | null | from flask import redirect, url_for, flash, send_file
from flask_login import current_user
import os
from app.models.journal import Journal
from app.models.journal_log import JournalLog
from app.models.author import Author
from app.models.status import Status
from app.models.reviewer import Reviewer
from app.utils.mail... | 32.646512 | 132 | 0.701382 |
e7f96f30eaa47c72278e9a3c55a557be8bc58c1e | 2,738 | py | Python | CV.py | ccfelius/mandelbrotset | 0fdc02749bb6886677d58e179965e7ce00a5ef16 | [
"MIT"
] | 1 | 2020-12-10T17:36:42.000Z | 2020-12-10T17:36:42.000Z | CV.py | ccfelius/mandelbrotset | 0fdc02749bb6886677d58e179965e7ce00a5ef16 | [
"MIT"
] | null | null | null | CV.py | ccfelius/mandelbrotset | 0fdc02749bb6886677d58e179965e7ce00a5ef16 | [
"MIT"
] | 1 | 2021-01-05T13:07:40.000Z | 2021-01-05T13:07:40.000Z | from mandelbrotset.monte import *
import scipy.stats as st
import math
def conf_int(mean, var, n, p=0.95):
pnew = (p+1)/2
zval = st.norm.ppf(pnew)
sigma = math.sqrt(var)
alambda = (zval*sigma)/math.sqrt(n)
min_lambda = mean - alambda
plus_lambda = mean + alambda
return f"Confidence interval... | 35.102564 | 185 | 0.70672 |
48e0b8f9d9ea9a113d8f004c7d93531b653af3e2 | 1,676 | py | Python | models/python/hypothalamus/dynamical/miro_experiments/entropy_percept.py | ABRG-Models/MammalBot | 0b153232b94197c7a65156c1c3451ab2b9f725ae | [
"MIT"
] | null | null | null | models/python/hypothalamus/dynamical/miro_experiments/entropy_percept.py | ABRG-Models/MammalBot | 0b153232b94197c7a65156c1c3451ab2b9f725ae | [
"MIT"
] | null | null | null | models/python/hypothalamus/dynamical/miro_experiments/entropy_percept.py | ABRG-Models/MammalBot | 0b153232b94197c7a65156c1c3451ab2b9f725ae | [
"MIT"
] | null | null | null |
import cv2
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import entropy
from scipy import ndimage
# imo = cv2.imread('ball1.jpg')
# imo = cv2.imread('room_balls.jpg')
def computeEntropy( I, Q = None):
# x,b = np.histogram( I, 20 )
x = I.flatten()
x = x/float(sum(x))
if Q is n... | 22.052632 | 73 | 0.470167 |
33b8149e457ebceec0434136ac555e58a0b82fec | 12,290 | py | Python | tests/test_rewind.py | wmendes-ionos/patroni | 0057f9018bc0b8f78cd5c53d8a6ae7a06141e24d | [
"MIT"
] | null | null | null | tests/test_rewind.py | wmendes-ionos/patroni | 0057f9018bc0b8f78cd5c53d8a6ae7a06141e24d | [
"MIT"
] | null | null | null | tests/test_rewind.py | wmendes-ionos/patroni | 0057f9018bc0b8f78cd5c53d8a6ae7a06141e24d | [
"MIT"
] | null | null | null | from mock import Mock, PropertyMock, patch, mock_open
from patroni.postgresql import Postgresql
from patroni.postgresql.cancellable import CancellableSubprocess
from patroni.postgresql.rewind import Rewind
from six.moves import builtins
from . import BaseTestPostgresql, MockCursor, psycopg_connect
class MockThread(... | 49.35743 | 120 | 0.673637 |
90b39b407d8b1d7cc90e14397e100ca9f34500ad | 2,602 | py | Python | starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/kubernetes_labels/tables.py | starlingx/gui | f6546289180f0ed97b357ed1ad426084f1e64588 | [
"Apache-2.0"
] | 1 | 2020-02-07T19:01:54.000Z | 2020-02-07T19:01:54.000Z | starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/kubernetes_labels/tables.py | starlingx/gui | f6546289180f0ed97b357ed1ad426084f1e64588 | [
"Apache-2.0"
] | null | null | null | starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/kubernetes_labels/tables.py | starlingx/gui | f6546289180f0ed97b357ed1ad426084f1e64588 | [
"Apache-2.0"
] | 1 | 2021-06-17T17:17:08.000Z | 2021-06-17T17:17:08.000Z | #
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2019 Wind River Systems, Inc.
# Copyright (C) 2019 Intel Corporation
#
import logging
from django.urls import reverse # noqa
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
from horizon import excep... | 27.389474 | 70 | 0.614527 |
9a9c9ffe0ae1946cbcd5be70ca3201a1f9c899c2 | 972 | py | Python | setup.py | ilemhadri/lassoNet | adf0aaf7131a57d8427ae40db7a19e608d6809a4 | [
"MIT"
] | 1 | 2020-05-28T02:33:00.000Z | 2020-05-28T02:33:00.000Z | setup.py | ilemhadri/lassoNet | adf0aaf7131a57d8427ae40db7a19e608d6809a4 | [
"MIT"
] | null | null | null | setup.py | ilemhadri/lassoNet | adf0aaf7131a57d8427ae40db7a19e608d6809a4 | [
"MIT"
] | null | null | null | from setuptools import setup
from pathlib import Path
def read(fname):
return (Path(__file__).parent / fname).open().read()
setup(
name="lassonet",
version="0.0.9",
author="Louis Abraham, Ismael Lemhadri",
author_email="louis.abraham@yahoo.fr, lemhadri@stanford.edu",
license="MIT",
descr... | 27 | 69 | 0.634774 |
e1972ea524bab133dfcf1e008bb9cbf28bab75dd | 1,114 | py | Python | website/settings/production.py | LKKTGB/lkk-website | d9cd2f5a11f2b4316ea4b242c5e09981207abdfb | [
"MIT"
] | null | null | null | website/settings/production.py | LKKTGB/lkk-website | d9cd2f5a11f2b4316ea4b242c5e09981207abdfb | [
"MIT"
] | 5 | 2020-04-26T09:03:33.000Z | 2022-02-02T13:00:39.000Z | website/settings/production.py | LKKTGB/lkk-website | d9cd2f5a11f2b4316ea4b242c5e09981207abdfb | [
"MIT"
] | null | null | null | import os
import dj_database_url
from website.settings.base import *
SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]
DEBUG = False
GA_TRACKING_ID = 'UA-114678735-1'
# security
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SOCIAL_AUTH_REDIRECT_IS_HTTPS = True
ALLOWED_HOSTS = [
'lkkpomia.tgb.org.tw',
... | 21.018868 | 79 | 0.679533 |
6d5c3886ee0e28fec541324f4dcead8b2e037653 | 5,081 | py | Python | hparams.py | sebakeaaen/autovc | aecc37901528f65209dafe30ac98094ccc6ea475 | [
"MIT"
] | 2 | 2022-02-24T22:27:10.000Z | 2022-03-10T22:03:45.000Z | hparams.py | sebakeaaen/autovc | aecc37901528f65209dafe30ac98094ccc6ea475 | [
"MIT"
] | null | null | null | hparams.py | sebakeaaen/autovc | aecc37901528f65209dafe30ac98094ccc6ea475 | [
"MIT"
] | null | null | null | # NOTE: If you want full control for model architecture. please take a look
# at the code and change whatever you want. Some hyper parameters are hardcoded.
class Map(dict):
"""
Example:
m = Map({'first_name': 'Eduardo'}, last_name='Pool', age=24, sports=['Soccer'])
Credits to epool:
https://stackov... | 29.71345 | 96 | 0.708128 |
a6416b561c30ee72079d70f5f1dabcdb070e8cc8 | 1,284 | py | Python | nicos_mlz/toftof/devices/datasinks/__init__.py | ebadkamil/nicos | 0355a970d627aae170c93292f08f95759c97f3b5 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/toftof/devices/datasinks/__init__.py | ebadkamil/nicos | 0355a970d627aae170c93292f08f95759c97f3b5 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/toftof/devices/datasinks/__init__.py | ISISComputingGroup/nicos | 94cb4d172815919481f8c6ee686f21ebb76f2068 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 45.857143 | 79 | 0.67757 |
b1365cd56d1faa2bab51a7cf5d3586bc53a20499 | 338 | py | Python | django/solution/untitled/iris/admin.py | giserh/book-python | ebd4e70cea1dd56986aa8efbae3629ba3f1ba087 | [
"MIT"
] | 1 | 2019-01-02T15:04:08.000Z | 2019-01-02T15:04:08.000Z | django/solution/untitled/iris/admin.py | giserh/book-python | ebd4e70cea1dd56986aa8efbae3629ba3f1ba087 | [
"MIT"
] | null | null | null | django/solution/untitled/iris/admin.py | giserh/book-python | ebd4e70cea1dd56986aa8efbae3629ba3f1ba087 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Iris
@admin.register(Iris)
class IrisAdmin(admin.ModelAdmin):
list_display = ['date_added', 'species']
list_display_links = ['species']
search_fields = ['^species']
list_filter = ['species', 'date_added']
radio_fields = {
'species': admi... | 24.142857 | 44 | 0.674556 |
76faae602507e8b1fff21ab92ab079fd4feceea5 | 2,340 | py | Python | migrations/versions/2ce405cef0af_.py | leduy8/gotit-final-project | 02f2cabbaef0f9f0542aa3efc9f835774beec948 | [
"MIT"
] | null | null | null | migrations/versions/2ce405cef0af_.py | leduy8/gotit-final-project | 02f2cabbaef0f9f0542aa3efc9f835774beec948 | [
"MIT"
] | null | null | null | migrations/versions/2ce405cef0af_.py | leduy8/gotit-final-project | 02f2cabbaef0f9f0542aa3efc9f835774beec948 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 2ce405cef0af
Revises:
Create Date: 2022-03-16 15:19:59.781471
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2ce405cef0af'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 36 | 74 | 0.665812 |
63354a3c7e20470c272155516a2973e439b26b8f | 1,491 | py | Python | src/pymortests/algorithms.py | fameyer/pymorWin | b449a38754fddb719d554f1aacf9280a585f1168 | [
"Unlicense"
] | null | null | null | src/pymortests/algorithms.py | fameyer/pymorWin | b449a38754fddb719d554f1aacf9280a585f1168 | [
"Unlicense"
] | null | null | null | src/pymortests/algorithms.py | fameyer/pymorWin | b449a38754fddb719d554f1aacf9280a585f1168 | [
"Unlicense"
] | null | null | null | # This file is part of the pyMOR project (http://www.pymor.org).
# Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function
import numpy as np
import pytest
from pymor.la.... | 28.673077 | 106 | 0.726358 |
ab68421753501228e37854b9540d2c19ca20d33a | 7,674 | py | Python | data_helpers.py | nguyentungcuong/SA-master | 358b30aabac8982e1e8369d401ac951a85640ecf | [
"Apache-2.0"
] | null | null | null | data_helpers.py | nguyentungcuong/SA-master | 358b30aabac8982e1e8369d401ac951a85640ecf | [
"Apache-2.0"
] | null | null | null | data_helpers.py | nguyentungcuong/SA-master | 358b30aabac8982e1e8369d401ac951a85640ecf | [
"Apache-2.0"
] | null | null | null | import numpy as np
import re
from pyvi import ViTokenizer
import pandas as pd
import string
import itertools
from collections import Counter
# data dict_abbreviation
filename = './data1/dict/dict_abbreviation.csv'
data = pd.read_csv(filename, sep="\t", encoding='utf-8')
list_abbreviation = data['abbreviation']
list_co... | 38.562814 | 117 | 0.598124 |
f5302191f1eef39d61232e01099890896a91df6c | 2,702 | py | Python | bin/scrape_software_versions.py | SciLifeLab/NGI-MethylSeq | 3d3f291c975669fc6dd0ce96e3dfbc6622002a1b | [
"MIT"
] | 17 | 2016-06-08T21:15:30.000Z | 2019-01-09T09:09:20.000Z | bin/scrape_software_versions.py | SciLifeLab/NGI-MethylSeq | 3d3f291c975669fc6dd0ce96e3dfbc6622002a1b | [
"MIT"
] | 10 | 2016-10-17T15:16:40.000Z | 2018-02-27T12:55:53.000Z | bin/scrape_software_versions.py | SciLifeLab/NGI-MethylSeq | 3d3f291c975669fc6dd0ce96e3dfbc6622002a1b | [
"MIT"
] | 10 | 2016-06-08T14:51:05.000Z | 2018-02-21T12:54:36.000Z | #!/usr/bin/env python
from __future__ import print_function
from collections import OrderedDict
import re
regexes = {
'NGI-MethylSeq': ['v_ngi_methylseq.txt', r"(\S+)"],
'Nextflow': ['v_nextflow.txt', r"(\S+)"],
'Bismark genomePrep': ['v_bismark_genome_preparation.txt', r"Bismark Genome Preparation Version... | 45.79661 | 110 | 0.639896 |
7aacb48d0c4216efabf29a8aae0abf6c64a43741 | 9,401 | py | Python | plugins/modules/oci_network_load_balancer_health_facts.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_network_load_balancer_health_facts.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_network_load_balancer_health_facts.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 38.847107 | 158 | 0.662695 |
b4dfcb0c10539009df20bae254e31476a5ddd653 | 1,543 | py | Python | tf_quant_finance/experimental/pricing_platform/framework/core/daycount_conventions.py | slowy07/tf-quant-finance | 0976f720fb58a2d7bfd863640c12a2425cd2f94f | [
"Apache-2.0"
] | 3,138 | 2019-07-24T21:43:17.000Z | 2022-03-30T12:11:09.000Z | tf_quant_finance/experimental/pricing_platform/framework/core/daycount_conventions.py | Aarif1430/tf-quant-finance | 9372eb1ddf2b48cb1a3d4283bc67a10647ddc7a6 | [
"Apache-2.0"
] | 63 | 2019-09-07T19:16:03.000Z | 2022-03-29T19:29:40.000Z | tf_quant_finance/experimental/pricing_platform/framework/core/daycount_conventions.py | Aarif1430/tf-quant-finance | 9372eb1ddf2b48cb1a3d4283bc67a10647ddc7a6 | [
"Apache-2.0"
] | 423 | 2019-07-26T21:28:05.000Z | 2022-03-26T13:07:44.000Z | # Lint as: python3
# Copyright 2020 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 35.883721 | 101 | 0.787427 |
552a07540b035138bb25aad96d486c3079c44d62 | 9,565 | py | Python | flarestack/analyses/tde/compare_spectral_indices_individual.py | robertdstein/flarestack | 2ce7e67da336514f6f38f06126a1fbd82131e441 | [
"MIT"
] | null | null | null | flarestack/analyses/tde/compare_spectral_indices_individual.py | robertdstein/flarestack | 2ce7e67da336514f6f38f06126a1fbd82131e441 | [
"MIT"
] | 25 | 2019-11-14T15:46:24.000Z | 2020-11-27T11:14:22.000Z | flarestack/analyses/tde/compare_spectral_indices_individual.py | robertdstein/flarestack | 2ce7e67da336514f6f38f06126a1fbd82131e441 | [
"MIT"
] | 2 | 2020-01-06T19:39:27.000Z | 2020-07-16T20:32:29.000Z | from __future__ import print_function
from builtins import str
import numpy as np
import os
import pickle as Pickle
from flarestack.core.results import ResultsHandler
from flarestack.data.icecube.gfu.gfu_v002_p01 import txs_sample_v1
from flarestack.shared import plot_output_dir, flux_to_k, analysis_dir, catalogue_dir
... | 27.485632 | 86 | 0.528594 |
2113518661a9d8ea22b2a3e85fff1aa796007c16 | 9,089 | py | Python | applications/DamApplication/python_scripts/check_and_prepare_model_process_dam_thermal.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 778 | 2017-01-27T16:29:17.000Z | 2022-03-30T03:01:51.000Z | applications/DamApplication/python_scripts/check_and_prepare_model_process_dam_thermal.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 6,634 | 2017-01-15T22:56:13.000Z | 2022-03-31T15:03:36.000Z | applications/DamApplication/python_scripts/check_and_prepare_model_process_dam_thermal.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 224 | 2017-02-07T14:12:49.000Z | 2022-03-06T23:09:34.000Z | import KratosMultiphysics
def Factory(settings, Model):
if not isinstance(settings, Parameters):
raise Exception("expected input shall be a Parameters object, encapsulating a json string")
return CheckAndPrepareModelProcessDamThermal(Model, settings["Parameters"])
## All the processes python should b... | 58.262821 | 139 | 0.721972 |
4b25dc100f6763420e0b693116c1c07b46bb92de | 8,199 | py | Python | activefolders/monitor.py | cybera/activefolders | 424adeb44df3f4fb187ecbc13334188a8d30a062 | [
"Apache-2.0"
] | null | null | null | activefolders/monitor.py | cybera/activefolders | 424adeb44df3f4fb187ecbc13334188a8d30a062 | [
"Apache-2.0"
] | null | null | null | activefolders/monitor.py | cybera/activefolders | 424adeb44df3f4fb187ecbc13334188a8d30a062 | [
"Apache-2.0"
] | null | null | null | from threading import Thread
from time import sleep
from activefolders.utils import logging
import peewee
import activefolders.conf as conf
import activefolders.db as db
import activefolders.controllers.folders as folders
import activefolders.controllers.transfers as transfers
import activefolders.controllers.exports a... | 42.046154 | 169 | 0.634712 |
2ec6d388088c9557160ae19965b6e9218805abd5 | 6,006 | py | Python | mcrouter/test/test_poolstats.py | erikwebb/mcrouter | c2b99aaacf3b6665cb829d19d55a4c468e2e95d0 | [
"MIT"
] | null | null | null | mcrouter/test/test_poolstats.py | erikwebb/mcrouter | c2b99aaacf3b6665cb829d19d55a4c468e2e95d0 | [
"MIT"
] | null | null | null | mcrouter/test/test_poolstats.py | erikwebb/mcrouter | c2b99aaacf3b6665cb829d19d55a4c468e2e95d0 | [
"MIT"
] | null | null | null | # Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the LICENSE
# file in the root directory of this source tree.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals... | 42 | 78 | 0.53713 |
795d324db085e8f9d04dd79fa580eb7fb3056617 | 2,098 | py | Python | ludwig/datasets/yelp_review_polarity/__init__.py | hfurkanbozkurt/ludwig | bfcbd52237c73702764e733ede4351e0146394bd | [
"Apache-2.0"
] | 970 | 2020-12-17T15:09:20.000Z | 2022-03-31T22:58:03.000Z | ludwig/datasets/yelp_review_polarity/__init__.py | hfurkanbozkurt/ludwig | bfcbd52237c73702764e733ede4351e0146394bd | [
"Apache-2.0"
] | 503 | 2020-12-16T21:44:40.000Z | 2022-03-31T18:21:52.000Z | ludwig/datasets/yelp_review_polarity/__init__.py | hfurkanbozkurt/ludwig | bfcbd52237c73702764e733ede4351e0146394bd | [
"Apache-2.0"
] | 145 | 2020-12-18T07:38:30.000Z | 2022-03-29T19:05:08.000Z | #! /usr/bin/env python
# Copyright (c) 2019 Uber Technologies, 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 a... | 41.137255 | 102 | 0.71592 |
a2079f19fb6929abf3d2612ea84b8e6dbb490116 | 2,082 | py | Python | manager/get_operator_target_group_status.py | wja30/cortex_0.31 | 522ec6226526dee6b4f8c3ed67bdf2b913d25de3 | [
"Apache-2.0"
] | 8,260 | 2019-01-31T00:56:06.000Z | 2022-03-30T11:39:21.000Z | manager/get_operator_target_group_status.py | wja30/cortex_0.31 | 522ec6226526dee6b4f8c3ed67bdf2b913d25de3 | [
"Apache-2.0"
] | 1,196 | 2019-02-19T07:47:54.000Z | 2022-03-31T16:06:30.000Z | manager/get_operator_target_group_status.py | wja30/cortex_0.31 | 522ec6226526dee6b4f8c3ed67bdf2b913d25de3 | [
"Apache-2.0"
] | 664 | 2019-01-31T04:52:26.000Z | 2022-03-22T02:39:00.000Z | # Copyright 2021 Cortex Labs, 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 wri... | 37.178571 | 97 | 0.761768 |
0f525616bc9ffc7558d400a00b265928c8665531 | 777 | py | Python | specklepy/tests/test_zernike.py | felixbosco/specklepy | 18f1d542f04cbe31fec8675791bf8350a09441c6 | [
"MIT"
] | null | null | null | specklepy/tests/test_zernike.py | felixbosco/specklepy | 18f1d542f04cbe31fec8675791bf8350a09441c6 | [
"MIT"
] | null | null | null | specklepy/tests/test_zernike.py | felixbosco/specklepy | 18f1d542f04cbe31fec8675791bf8350a09441c6 | [
"MIT"
] | 2 | 2020-12-07T14:21:13.000Z | 2021-02-26T13:52:52.000Z | import unittest
from specklepy.utils.zernike import Zernike
from specklepy.plotting.utils import imshow
class TestZernike(unittest.TestCase):
def setUp(self):
self.size = 256
def test_init(self):
z = Zernike()
imshow(z.init_rho(self.size), title='Radius')
imshow(z.init_phi(s... | 25.9 | 67 | 0.6139 |
6545a6cd729de8c77af499d8b753c71b26dc4e80 | 45 | py | Python | stummtaube/commands.py | gaetjen/stummtaube | 760466f361256cf1dbe3bf24995034e2e5385a9b | [
"MIT"
] | 2 | 2021-02-11T20:17:12.000Z | 2021-02-15T14:00:52.000Z | stummtaube/commands.py | gaetjen/stummtaube | 760466f361256cf1dbe3bf24995034e2e5385a9b | [
"MIT"
] | null | null | null | stummtaube/commands.py | gaetjen/stummtaube | 760466f361256cf1dbe3bf24995034e2e5385a9b | [
"MIT"
] | null | null | null | START = '!start'
JOIN = '!join'
END = "!end"
| 11.25 | 16 | 0.533333 |
e2742f3d8f9ec37a70d94a3376a987d9e059a069 | 2,477 | py | Python | albertpointscompanion/api/migrations/0002_auto_20211107_0752.py | monocuro-oss/albert-points-companion | 49df51d8ef56f451627ea2a905d2ac97bb16008f | [
"MIT"
] | null | null | null | albertpointscompanion/api/migrations/0002_auto_20211107_0752.py | monocuro-oss/albert-points-companion | 49df51d8ef56f451627ea2a905d2ac97bb16008f | [
"MIT"
] | null | null | null | albertpointscompanion/api/migrations/0002_auto_20211107_0752.py | monocuro-oss/albert-points-companion | 49df51d8ef56f451627ea2a905d2ac97bb16008f | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-07 07:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='HelperGroup',
... | 39.31746 | 117 | 0.559144 |
feeb8752e67748ea514b0d6d2ad6710b7c8a2a21 | 18,798 | py | Python | train.py | bhaprayan/keras-yolo3 | 9ad5ff761f3baf9042a17327c0149591ce1307c8 | [
"MIT"
] | null | null | null | train.py | bhaprayan/keras-yolo3 | 9ad5ff761f3baf9042a17327c0149591ce1307c8 | [
"MIT"
] | null | null | null | train.py | bhaprayan/keras-yolo3 | 9ad5ff761f3baf9042a17327c0149591ce1307c8 | [
"MIT"
] | null | null | null | """
Retrain the YOLO model for your own dataset.
"""
import numpy as np
import keras.backend as K
import tensorflow as tf
from keras.layers import Input, Lambda
from keras.models import Model
from keras.optimizers import Adam
from keras.callbacks import TensorBoard, ModelCheckpoint, ReduceLROnPlateau, EarlyStopping
f... | 45.84878 | 137 | 0.675551 |
cf2bdc75780c0bff9555234afa4cf1672646eff6 | 5,838 | py | Python | files/bin/ivr.py | torao/rpi-recorder | 978c0ec635196caad6b80e4b11c0bfe3c41cb8aa | [
"MIT"
] | null | null | null | files/bin/ivr.py | torao/rpi-recorder | 978c0ec635196caad6b80e4b11c0bfe3c41cb8aa | [
"MIT"
] | null | null | null | files/bin/ivr.py | torao/rpi-recorder | 978c0ec635196caad6b80e4b11c0bfe3c41cb8aa | [
"MIT"
] | null | null | null | import datetime
import fcntl
import os
import re
import subprocess
import sys
import time
DEFAULT_TELOP = "iVR 1.0"
def file_extension(file):
return os.path.splitext(os.path.basename(file))[1]
AUXILIARY_UNITS = ["", "k", "M", "G", "T", "P"]
# Exception to be used when an SIGTERM/SIGINT is detected.
class Term... | 29.484848 | 96 | 0.620932 |
e16d91ef723d58214cf24f204d3b3aad94ede0d0 | 29,611 | py | Python | fairseq/data/iterators.py | Mu-Y/fairseq | 1ed8b8d73f76611ad39675a647449d29b1050179 | [
"MIT"
] | 1 | 2021-11-26T00:42:23.000Z | 2021-11-26T00:42:23.000Z | fairseq/data/iterators.py | Mu-Y/fairseq | 1ed8b8d73f76611ad39675a647449d29b1050179 | [
"MIT"
] | null | null | null | fairseq/data/iterators.py | Mu-Y/fairseq | 1ed8b8d73f76611ad39675a647449d29b1050179 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import itertools
import logging
import math
import operator
import os
import queue
import time
from threading import Thread
import numpy as n... | 36.110976 | 94 | 0.606666 |
fd3ba94a9fe9ee148c489f019403ff7edf6f7b22 | 2,296 | py | Python | greenberry/consensus/block_rewards.py | greenberrycoin/gbch-blockchain | d99843d720c6e7bd7baaf8bb4639a46dbb56caed | [
"Apache-2.0"
] | null | null | null | greenberry/consensus/block_rewards.py | greenberrycoin/gbch-blockchain | d99843d720c6e7bd7baaf8bb4639a46dbb56caed | [
"Apache-2.0"
] | null | null | null | greenberry/consensus/block_rewards.py | greenberrycoin/gbch-blockchain | d99843d720c6e7bd7baaf8bb4639a46dbb56caed | [
"Apache-2.0"
] | null | null | null | from greenberry.util.ints import uint32, uint64
# 1 GreenBerry coin = 1,000,000,000,000 = 1 trillion mojo.
_mojo_per_greenberry = 1000000000000
_blocks_per_year = 1681920 # 32 * 6 * 24 * 365
def calculate_pool_reward(height: uint32) -> uint64:
"""
Returns the pool reward at a certain block height. The pool ... | 44.153846 | 116 | 0.674652 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.