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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a6fd24bb9b3330cdbca7e2cedc2c3a6c53c4b4e | 13,990 | py | Python | main.py | frankbroniewski/qgis-pag-plugin | c3c3c42e1e11065394789566307109f7efdb574d | [
"MIT"
] | null | null | null | main.py | frankbroniewski/qgis-pag-plugin | c3c3c42e1e11065394789566307109f7efdb574d | [
"MIT"
] | 108 | 2015-09-01T12:28:28.000Z | 2021-02-02T07:51:30.000Z | main.py | frankbroniewski/qgis-pag-plugin | c3c3c42e1e11065394789566307109f7efdb574d | [
"MIT"
] | 2 | 2018-12-04T09:57:07.000Z | 2021-10-14T06:32:14.000Z | # -*- coding: utf-8 -*-
'''
/***************************************************************************
PagLuxembourg
A QGIS plugin
Gestion de Plans d'Aménagement Général du Grand-Duché de Luxembourg
-------------------
begin : 201... | 38.539945 | 212 | 0.593066 |
1a6fe039c3c606ab7305ad29fde83d1c4ac01904 | 1,321 | py | Python | E 2015-2016/March 17/Compound_RCalc_Multiple_cond_conv.py | bnajafi/Python4ScientificComputing_Fundamentals | 7c943404654d9c44920ea9a7fdee28bc99ad8d05 | [
"MIT"
] | 65 | 2017-01-19T08:03:38.000Z | 2021-04-02T17:41:43.000Z | E 2015-2016/March 17/Compound_RCalc_Multiple_cond_conv.py | bnajafi/Python4ScientificComputing_Fundamentals | 7c943404654d9c44920ea9a7fdee28bc99ad8d05 | [
"MIT"
] | null | null | null | E 2015-2016/March 17/Compound_RCalc_Multiple_cond_conv.py | bnajafi/Python4ScientificComputing_Fundamentals | 7c943404654d9c44920ea9a7fdee28bc99ad8d05 | [
"MIT"
] | 110 | 2017-01-19T08:04:14.000Z | 2020-07-23T13:44:52.000Z |
R1={"type":"convective","Area":15,"h_conv":10}
R2={"type":"conductive","length":0.004,"Area":1.2,"k":0.78}
R3={"type":"conductive","length":0.01,"Area":1.2,"k":0.09}
R4={"type":"conductive","length":0.004,"Area":1.2,"k":0.78}
R5={"type":"convective","Area":15,"h_conv":40}
R_network= [R1,R2,R3,R4,R5]
def Rcalc_Series(... | 44.033333 | 140 | 0.548827 |
1a6fe41ea41fa38b0fade7ab7daa0f06cd527f10 | 10,312 | py | Python | capstone/scripts/ngrams.py | truthiswill/capstone | 61b17611ebee17a5f5e4f64ae4ccaa67ac357478 | [
"MIT"
] | null | null | null | capstone/scripts/ngrams.py | truthiswill/capstone | 61b17611ebee17a5f5e4f64ae4ccaa67ac357478 | [
"MIT"
] | 4 | 2021-09-02T20:54:31.000Z | 2022-02-27T14:04:06.000Z | capstone/scripts/ngrams.py | whitemike889/capstone | 61b17611ebee17a5f5e4f64ae4ccaa67ac357478 | [
"MIT"
] | null | null | null | import copy
import random
from queue import Queue
from threading import Thread
import rocksdb
import traceback
from collections import Counter
from multiprocessing import Process, Manager
from multiprocessing.pool import Pool
import nltk
from tqdm import tqdm
from django.conf import settings
from capdb.models import ... | 42.61157 | 206 | 0.68173 |
1a6fecd99fe6a268bf8b792d6f7fd2df9f3d1db0 | 4,018 | py | Python | kode/script_rapport13_14_15_tunnellerFv.py | LtGlahn/kostrarapportering2021 | a5096c0e6de3c33089b2a5de37118da562fa3b4d | [
"MIT"
] | null | null | null | kode/script_rapport13_14_15_tunnellerFv.py | LtGlahn/kostrarapportering2021 | a5096c0e6de3c33089b2a5de37118da562fa3b4d | [
"MIT"
] | null | null | null | kode/script_rapport13_14_15_tunnellerFv.py | LtGlahn/kostrarapportering2021 | a5096c0e6de3c33089b2a5de37118da562fa3b4d | [
"MIT"
] | null | null | null | from datetime import datetime
from copy import deepcopy
import geopandas as gpd
import pandas as pd
import numpy as np
import STARTHER
import lastnedvegnett
import skrivdataframe
import nvdbapiv3
import nvdbgeotricks
t0 = datetime.now()
# Henter alle tunneler
mittfilter = lastnedvegnett.kostraFagdataFilter( m... | 40.585859 | 162 | 0.678198 |
1a6ff1b1b754c2a92af60539c8ff6d2807b48e1c | 334 | py | Python | tests/test_models.py | exolever/django-simple-user | 8c7f4e78b5da434cd3960e59d9b08cf69a636e0a | [
"MIT"
] | null | null | null | tests/test_models.py | exolever/django-simple-user | 8c7f4e78b5da434cd3960e59d9b08cf69a636e0a | [
"MIT"
] | 1 | 2019-09-02T15:41:57.000Z | 2019-09-02T15:41:57.000Z | tests/test_models.py | exolever/django-simple-user | 8c7f4e78b5da434cd3960e59d9b08cf69a636e0a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_simple_user
------------
Tests for `simple_user` models module.
"""
from django.test import TestCase
from auth_uuid import models
class TestAuth(TestCase):
def setUp(self):
pass
def test_something(self):
pass
def tearDown(self):... | 12.846154 | 38 | 0.616766 |
1a6ff5e073fcacd872ee88bce12e387fc25746a7 | 249 | py | Python | app/api/v1/utils/comments_validator.py | Dave-mash/flask-blog | 43cf4d7274b0b3d57e277f670882b1559c592638 | [
"MIT"
] | 1 | 2019-03-23T11:36:19.000Z | 2019-03-23T11:36:19.000Z | app/api/v1/utils/comments_validator.py | Dave-mash/flask-blog | 43cf4d7274b0b3d57e277f670882b1559c592638 | [
"MIT"
] | null | null | null | app/api/v1/utils/comments_validator.py | Dave-mash/flask-blog | 43cf4d7274b0b3d57e277f670882b1559c592638 | [
"MIT"
] | null | null | null | """
This module validates incoming comments
"""
class CommentsValidator:
def __init__(self, comment):
self.comment = comment
def valid_comment(self):
if not self.comment:
return "The comment field is required!" | 20.75 | 51 | 0.658635 |
1a70068022568de4bbbb6d67643449d765dff0a7 | 1,203 | py | Python | test/integration/test_multi_workflow.py | boto/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 13 | 2016-06-15T06:10:57.000Z | 2021-10-30T03:52:28.000Z | test/integration/test_multi_workflow.py | DalavanCloud/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 11 | 2016-09-15T01:48:08.000Z | 2019-01-09T06:11:44.000Z | test/integration/test_multi_workflow.py | DalavanCloud/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 16 | 2016-06-05T03:42:04.000Z | 2022-03-01T17:43:14.000Z | import time
import unittest
from botoflow import WorkflowWorker, ActivityWorker, workflow_starter
from multiprocessing_workflows import OneMultiWorkflow, TwoMultiWorkflow
from various_activities import BunchOfActivities
from utils import SWFMixIn
class TestMultiWorkflows(SWFMixIn, unittest.TestCase):
def test_t... | 35.382353 | 88 | 0.709892 |
1a701ba944cf7b8e72bff5083bffcd6e086a015b | 2,952 | py | Python | docker/dags/nba_endpoint.py | llance/PyNBA | 5a1fd1390afe9a02aecd1fdf502a866a634ef3b2 | [
"MIT"
] | 1 | 2020-12-17T11:54:13.000Z | 2020-12-17T11:54:13.000Z | docker/dags/nba_endpoint.py | llance/PyNBA | 5a1fd1390afe9a02aecd1fdf502a866a634ef3b2 | [
"MIT"
] | 31 | 2020-03-24T16:40:58.000Z | 2022-03-29T22:28:43.000Z | docker/dags/nba_endpoint.py | llance/PyNBA | 5a1fd1390afe9a02aecd1fdf502a866a634ef3b2 | [
"MIT"
] | null | null | null | import csv
import logging
import pandas as pd
import requests
from contextlib import contextmanager
from nba_api.stats.endpoints import shotchartdetail, commonteamroster
from nba_api.stats.static import players
from nba_api.stats.static import teams
from sqlalchemy.orm import sessionmaker, scoped_session
logger = ... | 37.367089 | 115 | 0.62771 |
1a702388a5db3df61c7df5725310353d03bdff9a | 3,950 | py | Python | sdks/python/appcenter_sdk/models/OrganizationRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/OrganizationRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/OrganizationRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class OrganizationRe... | 28.417266 | 88 | 0.578228 |
1a70355750d0c9bd18ae6b14b5babebfbb77de97 | 2,484 | py | Python | src/HistEqualizer/HistogramEqualization.py | victormmp/processamento-digital-imagens | adbfae47e5840b2ad10f2dcd8f58166a461bb26b | [
"MIT"
] | null | null | null | src/HistEqualizer/HistogramEqualization.py | victormmp/processamento-digital-imagens | adbfae47e5840b2ad10f2dcd8f58166a461bb26b | [
"MIT"
] | 12 | 2018-12-02T18:10:36.000Z | 2018-12-09T15:41:11.000Z | src/HistEqualizer/HistogramEqualization.py | victormmp/processamento-digital-imagens | adbfae47e5840b2ad10f2dcd8f58166a461bb26b | [
"MIT"
] | null | null | null | """
Histogram Equalization Class
"""
import numpy
import math
import copy
import matplotlib.pyplot as plt
class HistogramEqualization:
"""Implements Histogram Equalization"""
imgName = "IMG" #ImageName
colorDepth = 8 #Intensity represented by 8 bits
def __init__(self, pixels, colorDepth=8, imgName="... | 31.443038 | 99 | 0.628824 |
1a705544b7425a0f3c1a0847b2b882a1130a2fba | 3,491 | py | Python | tests/benchmarks/benchmarkCPU.py | LuCeHe/home-platform | 06f9370bfacecebd0c8623a3b8f0511532a9a1f0 | [
"BSD-3-Clause"
] | 1 | 2021-07-27T09:15:43.000Z | 2021-07-27T09:15:43.000Z | tests/benchmarks/benchmarkCPU.py | LuCeHe/home-platform | 06f9370bfacecebd0c8623a3b8f0511532a9a1f0 | [
"BSD-3-Clause"
] | null | null | null | tests/benchmarks/benchmarkCPU.py | LuCeHe/home-platform | 06f9370bfacecebd0c8623a3b8f0511532a9a1f0 | [
"BSD-3-Clause"
] | 1 | 2021-07-27T09:21:12.000Z | 2021-07-27T09:21:12.000Z | from __future__ import print_function
# Copyright (c) 2017, IGLU consortium
# 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 ... | 31.45045 | 87 | 0.709539 |
1a709146b175e4d7a4d872fa82a5615e0d5d26a2 | 56,307 | py | Python | Allura/allura/model/project.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | null | null | null | Allura/allura/model/project.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | null | null | null | Allura/allura/model/project.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | null | null | null | # 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,... | 39.485975 | 132 | 0.596054 |
1a70a64ae7eba035a27317dac84565fd19e87662 | 709 | py | Python | migrations/versions/a2443af2c65e_.py | ravenscroftj/harri_gttool | 11e8e6b5e8c4bbfc62dc15c7d8b099d4a4fa1a5e | [
"MIT"
] | null | null | null | migrations/versions/a2443af2c65e_.py | ravenscroftj/harri_gttool | 11e8e6b5e8c4bbfc62dc15c7d8b099d4a4fa1a5e | [
"MIT"
] | 4 | 2020-06-18T14:38:26.000Z | 2021-12-13T19:54:55.000Z | migrations/versions/a2443af2c65e_.py | ravenscroftj/harri_gttool | 11e8e6b5e8c4bbfc62dc15c7d8b099d4a4fa1a5e | [
"MIT"
] | null | null | null | """Add annotation timer column to links
Revision ID: a2443af2c65e
Revises: 79dcf9aa4f15
Create Date: 2018-04-04 14:03:25.622267
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a2443af2c65e'
down_revision = '79dcf9aa4f15'
branch_labels = None
depends_on = None
... | 24.448276 | 94 | 0.70945 |
1a70cbe0533a2b8558d12f5e0b7fcdaff9a7403e | 771 | py | Python | resources/algorithms/poc/wikipedia_extract.py | pBouillon/Telecom_PPII | dd4a1451c716c22162bd618554509b6618e27f57 | [
"MIT"
] | 1 | 2019-12-10T19:05:14.000Z | 2019-12-10T19:05:14.000Z | resources/algorithms/poc/wikipedia_extract.py | pBouillon/Telecom_PPII | dd4a1451c716c22162bd618554509b6618e27f57 | [
"MIT"
] | null | null | null | resources/algorithms/poc/wikipedia_extract.py | pBouillon/Telecom_PPII | dd4a1451c716c22162bd618554509b6618e27f57 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
wikipedia_city_big_numbers_extract.py
-------------------------------------
Extract huge numbers that may be the population (further treatment needed) from a wikipedia city's page.
:author: Bouillon Pierre
"""
import re
import requests
from http import HTTPStatus
API = 'ht... | 24.09375 | 108 | 0.601816 |
1a70d6fed5f92005eed6ca38d74a312b43b2c4fa | 5,142 | py | Python | oslo_log/tests/unit/test_formatters.py | kaptnemo/oslo.log | b97137fb8e418b08067b7ad49c176f4bfc45e916 | [
"Apache-2.0"
] | null | null | null | oslo_log/tests/unit/test_formatters.py | kaptnemo/oslo.log | b97137fb8e418b08067b7ad49c176f4bfc45e916 | [
"Apache-2.0"
] | null | null | null | oslo_log/tests/unit/test_formatters.py | kaptnemo/oslo.log | b97137fb8e418b08067b7ad49c176f4bfc45e916 | [
"Apache-2.0"
] | 1 | 2020-07-21T02:18:23.000Z | 2020-07-21T02:18:23.000Z | # Copyright (c) 2016 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 agreed to i... | 35.708333 | 78 | 0.665889 |
1a70ecd17b26f3f3a84cff718ae9aa92f7fcde46 | 627 | py | Python | handler_test.py | garyalex/sensuhandlers | fe978acbe6319b9872dc4291f234295d5609e7c3 | [
"Apache-2.0"
] | 1 | 2018-08-05T05:54:17.000Z | 2018-08-05T05:54:17.000Z | handler_test.py | garyalex/sensuhandlers | fe978acbe6319b9872dc4291f234295d5609e7c3 | [
"Apache-2.0"
] | null | null | null | handler_test.py | garyalex/sensuhandlers | fe978acbe6319b9872dc4291f234295d5609e7c3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Test Handler for Function devel."""
import sys
import json
import handler_funcs
# users = handler_funcs.getconfig()
# for user in users:
# print user
for stdinLine in sys.stdin:
sendMessage = False
rawdata = stdinLine
# print(rawdata)
jsondata = json.loads(rawdata)
ch... | 26.125 | 48 | 0.649123 |
1a71005138d44f14a9d2cd775e1b71d1723c3d67 | 1,196 | py | Python | src/CryptoPlus/Hash/python_whirlpool.py | koujiandou-mhfg/python-cryptoplus | a5a1f8aecce4ddf476b2d80b586822d9e91eeb7d | [
"MIT"
] | 64 | 2015-01-15T10:41:41.000Z | 2022-01-10T23:51:42.000Z | src/CryptoPlus/Hash/python_whirlpool.py | koujiandou-mhfg/python-cryptoplus | a5a1f8aecce4ddf476b2d80b586822d9e91eeb7d | [
"MIT"
] | 5 | 2016-01-05T17:48:22.000Z | 2018-02-22T04:32:17.000Z | src/CryptoPlus/Hash/python_whirlpool.py | koujiandou-mhfg/python-cryptoplus | a5a1f8aecce4ddf476b2d80b586822d9e91eeb7d | [
"MIT"
] | 53 | 2015-04-14T00:17:02.000Z | 2022-03-12T05:32:05.000Z | import pywhirlpool
__all__ = ['new','digest_size']
def new(data=None):
"""Create a new pure python Whirlpool hash object
data = initial input (raw string) to the hashing object
if present, the method call update(arg) is made
EXAMPLE: (http://paginas.terra.com... | 38.580645 | 138 | 0.66806 |
1a710a4cdc28bb563efd88ac8903710baf52cd60 | 3,159 | py | Python | userbot/modules/www.py | iqbalfcksht/madafaka | f7b4c9b986cc2f6ae771df74242440c50e600c4a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/www.py | iqbalfcksht/madafaka | f7b4c9b986cc2f6ae771df74242440c50e600c4a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/www.py | iqbalfcksht/madafaka | f7b4c9b986cc2f6ae771df74242440c50e600c4a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
""" Userbot module containing commands related to the \
Information Superhighway (yes, Internet). """
import os
fr... | 30.669903 | 87 | 0.611903 |
1a7113ea4cce53b8945e05bb6894cdee10178352 | 1,939 | py | Python | app/models.py | Chr12t0pher/Parkwood-Vale-Harriers-PUBLIC | 8c0a554ffe7c3c808a6ab70858bc13ae3c3990a8 | [
"MIT"
] | null | null | null | app/models.py | Chr12t0pher/Parkwood-Vale-Harriers-PUBLIC | 8c0a554ffe7c3c808a6ab70858bc13ae3c3990a8 | [
"MIT"
] | null | null | null | app/models.py | Chr12t0pher/Parkwood-Vale-Harriers-PUBLIC | 8c0a554ffe7c3c808a6ab70858bc13ae3c3990a8 | [
"MIT"
] | null | null | null | from app import db
from datetime import date
class Runner(db.Model):
"""Database storing all the Runners and their details."""
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String, unique=True)
name = db.Column(db.String)
email = db.Column(db.String)
phone_number = db.Co... | 31.786885 | 113 | 0.654461 |
1a713749513c215e93e4f2fb7829c027686c4f52 | 56,743 | py | Python | nova/tests/unit/objects/test_objects.py | windskyer/nova | df485344dfd0f9e927e51273a3aaa71d948f2980 | [
"Apache-2.0"
] | 2 | 2018-11-18T16:03:18.000Z | 2019-05-15T04:34:55.000Z | nova/tests/unit/objects/test_objects.py | windskyer/nova | df485344dfd0f9e927e51273a3aaa71d948f2980 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/objects/test_objects.py | windskyer/nova | df485344dfd0f9e927e51273a3aaa71d948f2980 | [
"Apache-2.0"
] | 2 | 2015-12-28T14:36:29.000Z | 2018-11-18T16:03:20.000Z | # Copyright 2013 IBM Corp.
#
# 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... | 41.297671 | 79 | 0.628412 |
1a71450b417a4cc646c17cbc636728521321ce82 | 973 | py | Python | scipy/_build_utils/tests/test_circular_imports.py | clementkng/scipy | 8e40c067b64016dc344c537655f56454fd1788ba | [
"BSD-3-Clause"
] | null | null | null | scipy/_build_utils/tests/test_circular_imports.py | clementkng/scipy | 8e40c067b64016dc344c537655f56454fd1788ba | [
"BSD-3-Clause"
] | null | null | null | scipy/_build_utils/tests/test_circular_imports.py | clementkng/scipy | 8e40c067b64016dc344c537655f56454fd1788ba | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, absolute_import, print_function
import sys
import subprocess
PUBLIC_SUBMODULES = [
'cluster',
'cluster.hierarchy',
'cluster.vq',
'constants',
'fft'
'fftpack',
'fftpack.convolve',
'integrate',
'interpolate',
'io',
'io.arff',
'io.wavfile'... | 20.270833 | 75 | 0.597122 |
1a71478820103bdb3c49b483c4ea6c41f6e1da62 | 6,480 | py | Python | tree_bot.py | StephanHeijl/Rainworms | 724f00e110c88a956ae32688dcc2dd156a389938 | [
"MIT"
] | null | null | null | tree_bot.py | StephanHeijl/Rainworms | 724f00e110c88a956ae32688dcc2dd156a389938 | [
"MIT"
] | null | null | null | tree_bot.py | StephanHeijl/Rainworms | 724f00e110c88a956ae32688dcc2dd156a389938 | [
"MIT"
] | null | null | null | import itertools
from copy import deepcopy
from bots import *
from propagate_scores import *
class TreeBot(Bot):
def __init__(self, select_action_method):
super(TreeBot, self).__init__()
self.name = f"TreeBotRelative"
self.select_action_method = select_action_method
self.tree = nx... | 44.383562 | 118 | 0.613272 |
1a7151e3d2984253ef5befcbd2e0542d13267b2f | 3,505 | py | Python | pbc/tests/test_components.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | pbc/tests/test_components.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | pbc/tests/test_components.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | import numpy as np
from pyscf import gto
from pyscf.dft import rks
from pyscf.pbc import gto as pbcgto
from pyscf.pbc import dft as pbcdft
from pyscf.pbc.dft.gen_grid import gen_uniform_grids
from pyscf.pbc.dft.numint import eval_ao, eval_rho
# These are the components to be tested:
from pyscf.pbc.scf import hf as pb... | 32.453704 | 88 | 0.629387 |
1a716fe78d3af21b6730e0cfe42666c615b11158 | 197 | py | Python | accounts/utils.py | fossabot/flaam-api | d11651aa77c4b7c5e26b6443f9699e0a4bec4354 | [
"MIT"
] | 1 | 2022-01-07T04:01:06.000Z | 2022-01-07T04:01:06.000Z | accounts/utils.py | fossabot/flaam-api | d11651aa77c4b7c5e26b6443f9699e0a4bec4354 | [
"MIT"
] | 26 | 2021-11-14T06:02:59.000Z | 2022-03-29T14:17:39.000Z | accounts/utils.py | fossabot/flaam-api | d11651aa77c4b7c5e26b6443f9699e0a4bec4354 | [
"MIT"
] | 1 | 2022-01-05T18:51:01.000Z | 2022-01-05T18:51:01.000Z | from pathlib import Path
from typing import Any
def avatar_path(instance: Any, filename: str) -> str:
ext = Path(filename).suffix[1:].lower()
return f"avatars/avatar_{instance.pk}.{ext}"
| 24.625 | 53 | 0.71066 |
1a717c0b4fcb7574471c697544395ed09c5d2f80 | 4,551 | py | Python | cloudmesh_cmd3/plugins/cm_shell_inventory.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | cloudmesh_cmd3/plugins/cm_shell_inventory.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | 4 | 2021-06-08T20:20:08.000Z | 2022-03-11T23:30:22.000Z | cloudmesh_cmd3/plugins/cm_shell_inventory.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from cmd3.shell import command
from pprint import pprint
from cloudmesh.inventory import Inventory
from cloudmesh_base.logger import LOGGER
log = LOGGER(__file__)
class cm_shell_inventory:
"""opt_example class"""
inventory_connection = False
inventory_name = None
... | 29.36129 | 78 | 0.522523 |
1a71a44f1f4412dec97e9ce5b6ef93286b0b8901 | 122 | py | Python | fake_site_pkg/null_source.py | aroberge/pyextensions | cd18f6936df2c4ffafacb445fe77f8908d67f4f1 | [
"MIT"
] | null | null | null | fake_site_pkg/null_source.py | aroberge/pyextensions | cd18f6936df2c4ffafacb445fe77f8908d67f4f1 | [
"MIT"
] | null | null | null | fake_site_pkg/null_source.py | aroberge/pyextensions | cd18f6936df2c4ffafacb445fe77f8908d67f4f1 | [
"MIT"
] | null | null | null | """Returns the same source it receives as input.
Used for testing.
"""
def transform_source(source):
return source
| 13.555556 | 48 | 0.721311 |
1a71a9e028973426e7b148b4aba7ff030cbb9226 | 516 | py | Python | py/src/experimental/myhelmholtz.py | bueler/stokes-implicit | e6f40798c9d441316d1b88a93b9103b8e6cb5e89 | [
"MIT"
] | 1 | 2020-12-11T12:18:03.000Z | 2020-12-11T12:18:03.000Z | py/src/experimental/myhelmholtz.py | bueler/stokes-implicit | e6f40798c9d441316d1b88a93b9103b8e6cb5e89 | [
"MIT"
] | null | null | null | py/src/experimental/myhelmholtz.py | bueler/stokes-implicit | e6f40798c9d441316d1b88a93b9103b8e6cb5e89 | [
"MIT"
] | null | null | null | # simple Helmholtz equation
from firedrake import *
mesh = UnitSquareMesh(10, 10)
V = FunctionSpace(mesh, "CG", 1)
u = TrialFunction(V)
v = TestFunction(V)
f = Function(V)
x, y = SpatialCoordinate(mesh)
f.interpolate((1+8*pi*pi)*cos(x*pi*2)*cos(y*pi*2))
a = (dot(grad(v), grad(u)) + v * u) * dx
L = f * v * dx
u = Fu... | 22.434783 | 54 | 0.573643 |
1a71bc5963976955ef1bd2237c40304e7de77356 | 689 | py | Python | lepidoptera/migrations/0025_initial_value_markdown_reference.py | BelgianBiodiversityPlatform/catalogue-lepidoptera-belgium-webapp | c0ed7fde78f9af5afbd91c53ed3f543046e8dd41 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2020-11-17T18:02:44.000Z | 2021-02-02T04:00:21.000Z | lepidoptera/migrations/0025_initial_value_markdown_reference.py | BelgianBiodiversityPlatform/catalogue-lepidoptera-belgium-webapp | c0ed7fde78f9af5afbd91c53ed3f543046e8dd41 | [
"BSD-2-Clause-FreeBSD"
] | 5 | 2020-06-05T19:00:59.000Z | 2022-01-13T00:52:30.000Z | lepidoptera/migrations/0025_initial_value_markdown_reference.py | BelgianBiodiversityPlatform/catalogue-lepidoptera-belgium-webapp | c0ed7fde78f9af5afbd91c53ed3f543046e8dd41 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # Generated by Django 2.0.13 on 2019-08-30 12:17
from django.db import migrations
def noop(apps, schema_editor):
pass
def make_reference_populated(apps, schema_editor):
Publication = apps.get_model('lepidoptera', 'Publication')
for p in Publication.objects.all():
# We need some disgusting hack ... | 22.966667 | 84 | 0.66328 |
1a71c045d50ca64d3c2649669e5fdc0b868237d4 | 17,587 | py | Python | pose_tcn.py | msieb1/LTCN | c9432891327774edf8193e885cc4f10f53fcaa60 | [
"MIT"
] | 1 | 2020-08-21T03:47:33.000Z | 2020-08-21T03:47:33.000Z | pose_tcn.py | msieb1/LTCN | c9432891327774edf8193e885cc4f10f53fcaa60 | [
"MIT"
] | null | null | null | pose_tcn.py | msieb1/LTCN | c9432891327774edf8193e885cc4f10f53fcaa60 | [
"MIT"
] | null | null | null | import torch
from torch import nn
from torch.nn import functional as F
from torchvision import models
from torch.autograd import Function
import torchvision.models as models
from torch.nn.utils.rnn import pack_padded_sequence
from copy import deepcopy as copy
from pdb import set_trace
VOCAB_SIZE = 2
class BatchNormCo... | 37.821505 | 108 | 0.598283 |
1a71ce1cd0f0820f9a626132e0c769d0e8fae39e | 97 | py | Python | test1.py | abkumarggn/python-learning-1 | df45396cd14f5762053728760953b3806d0069b6 | [
"Apache-2.0"
] | null | null | null | test1.py | abkumarggn/python-learning-1 | df45396cd14f5762053728760953b3806d0069b6 | [
"Apache-2.0"
] | null | null | null | test1.py | abkumarggn/python-learning-1 | df45396cd14f5762053728760953b3806d0069b6 | [
"Apache-2.0"
] | null | null | null | a=20
b=40
print(a,b)
i=input("Please enter your fav number..: ")
print(i)
c=int(i)
c=i*3
print(c) | 12.125 | 43 | 0.649485 |
1a720a1b974eb01a3b95ff650cfdbc547ea3ea8f | 830 | py | Python | starks/logutils.py | alexpeits/starks | 72f27695c9af4f77fd8fa59bb3f6b30d517f7e11 | [
"BSD-3-Clause"
] | null | null | null | starks/logutils.py | alexpeits/starks | 72f27695c9af4f77fd8fa59bb3f6b30d517f7e11 | [
"BSD-3-Clause"
] | null | null | null | starks/logutils.py | alexpeits/starks | 72f27695c9af4f77fd8fa59bb3f6b30d517f7e11 | [
"BSD-3-Clause"
] | null | null | null | """
logutils
~~~~~~~~
Various logging utilities
"""
import logging
import inspect
def create_logger(*args, **kwargs):
"""Return a logger with a nicely formatted name, depending on the caller.
This works by using inspect to grab the frame containing information
about the caller of this function. This ... | 25.151515 | 77 | 0.689157 |
1a721bf66bbc68c2c534aba9d277741bd14a2187 | 910 | py | Python | tests/test_packages/test_skills/test_erc1155_client/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | tests/test_packages/test_skills/test_erc1155_client/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | tests/test_packages/test_skills/test_erc1155_client/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 41.363636 | 84 | 0.597802 |
1a7225c0370e0875f5a2217e5e22f4112e7391ec | 2,864 | py | Python | jina/helloworld/fashion/app.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 2 | 2021-06-30T06:56:30.000Z | 2022-03-11T01:27:19.000Z | jina/helloworld/fashion/app.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | null | null | null | jina/helloworld/fashion/app.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | null | null | null | import os
from pathlib import Path
from jina import Flow
from jina.parsers.helloworld import set_hw_parser
if __name__ == '__main__':
from helper import (
print_result,
write_html,
download_data,
index_generator,
query_generator,
)
from my_executors import MyEncoder... | 27.018868 | 112 | 0.59602 |
1a72431e497bdd373a7c4054e1b1873c070fb8bd | 1,149 | py | Python | tests/tests_lib_state.py | kusanagi/kusanagi-sdk-python | 4fd6843f39fa271afc7588b5ec58e7758b09fd61 | [
"MIT"
] | 1 | 2022-02-24T19:02:28.000Z | 2022-02-24T19:02:28.000Z | tests/tests_lib_state.py | jeronimoalbi/kusanagi-sdk-python | 4fd6843f39fa271afc7588b5ec58e7758b09fd61 | [
"MIT"
] | null | null | null | tests/tests_lib_state.py | jeronimoalbi/kusanagi-sdk-python | 4fd6843f39fa271afc7588b5ec58e7758b09fd61 | [
"MIT"
] | 1 | 2021-05-16T17:40:21.000Z | 2021-05-16T17:40:21.000Z | # Python 3 SDK for the KUSANAGI(tm) framework (http://kusanagi.io)
# Copyright (c) 2016-2021 KUSANAGI S.L. All rights reserved.
#
# Distributed under the MIT license.
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
def test_lib_state_inval... | 31.916667 | 73 | 0.70322 |
1a7281714f3d66447005652126c7771311a748ec | 4,491 | py | Python | alipay/aop/api/domain/AlipayBossProdAlcagmprodAgreementUnsignModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayBossProdAlcagmprodAgreementUnsignModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayBossProdAlcagmprodAgreementUnsignModel.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 *
class AlipayBossProdAlcagmprodAgreementUnsignModel(object):
def __init__(self):
self._agreement_id_list = None
self._cancel_date = None
self._out_sign_no = None
self._pr... | 32.309353 | 85 | 0.59764 |
1a72c1aa337c21aa6b3a1f9802103092efa4fa83 | 9,143 | py | Python | paddleslim/analysis/latency_predictor.py | maxpark/PaddleSlim | f6b827fca5f3d9cc467426b8ef30e3a6d2b012b9 | [
"Apache-2.0"
] | 1 | 2021-12-30T08:23:21.000Z | 2021-12-30T08:23:21.000Z | paddleslim/analysis/latency_predictor.py | maxpark/PaddleSlim | f6b827fca5f3d9cc467426b8ef30e3a6d2b012b9 | [
"Apache-2.0"
] | null | null | null | paddleslim/analysis/latency_predictor.py | maxpark/PaddleSlim | f6b827fca5f3d9cc467426b8ef30e3a6d2b012b9 | [
"Apache-2.0"
] | null | null | null | """Define latency predictor that predict the latency of model on devices.
"""
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
... | 37.318367 | 180 | 0.609756 |
1a72cd085ba8f49c14a2296fc23845c95f237be0 | 5,523 | py | Python | examples/larq_experiment.py | AdamHillier/zookeeper | f9a2c19d429bf61a3bc64dc51ba942872b22c5a1 | [
"Apache-2.0"
] | 4 | 2019-05-30T17:07:28.000Z | 2019-07-07T14:01:29.000Z | examples/larq_experiment.py | AdamHillier/zookeeper | f9a2c19d429bf61a3bc64dc51ba942872b22c5a1 | [
"Apache-2.0"
] | 58 | 2020-10-15T06:39:46.000Z | 2022-03-29T12:05:45.000Z | examples/larq_experiment.py | AdamHillier/zookeeper | f9a2c19d429bf61a3bc64dc51ba942872b22c5a1 | [
"Apache-2.0"
] | 1 | 2019-06-02T17:01:13.000Z | 2019-06-02T17:01:13.000Z | """An example of how to use Zookeeper to run a Larq BinaryNet experiment on MNIST."""
from functools import partial
from typing import Sequence, Tuple, Union
import larq as lq
import tensorflow as tf
from zookeeper import ComponentField, Field, cli, component, factory, task
from zookeeper.tf import Dataset, Experime... | 34.955696 | 85 | 0.589354 |
1a72e8217c57592a25c38461bbf2306a644aba09 | 10,347 | py | Python | forager_embedding_server/src/ais.py | forager-research/forager-server | 7557076f9114391cf3a6953d4312883a9de5ce27 | [
"MIT"
] | 4 | 2021-09-21T01:58:21.000Z | 2022-03-02T21:28:32.000Z | index_server/ais.py | jeremyephron/forager | 6db1590686e0e34b2e42ff5deb70f62fcee73d7d | [
"MIT"
] | 2 | 2020-10-07T01:03:06.000Z | 2020-10-12T19:08:55.000Z | index_server/ais.py | jeremyephron/forager | 6db1590686e0e34b2e42ff5deb70f62fcee73d7d | [
"MIT"
] | null | null | null | import math
import numpy as np
from sklearn.isotonic import IsotonicRegression
# Alternative to tree: isotonic regression
def fit_isotonic(y_test, prob_pos):
"""Given 0/1 labels 'y_test' and predicted model scores 'prob_pos', Train
an isotonic regression model to calibrate model scores."""
try:
i... | 35.193878 | 88 | 0.609839 |
1a72f032bbdb89d8ecc1f03006bd978af4f8f072 | 30,811 | py | Python | gammapy/modeling/models/tests/test_spectral.py | kabartay/gammapy | 015206d2418b1d254f1c9d3ea819ab0c5ece99e9 | [
"BSD-3-Clause"
] | 1 | 2021-02-02T21:35:27.000Z | 2021-02-02T21:35:27.000Z | gammapy/modeling/models/tests/test_spectral.py | kabartay/gammapy | 015206d2418b1d254f1c9d3ea819ab0c5ece99e9 | [
"BSD-3-Clause"
] | null | null | null | gammapy/modeling/models/tests/test_spectral.py | kabartay/gammapy | 015206d2418b1d254f1c9d3ea819ab0c5ece99e9 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import operator
import pytest
import numpy as np
from numpy.testing import assert_allclose
import astropy.units as u
from gammapy.maps import MapAxis
from gammapy.modeling.models import (
SPECTRAL_MODEL_REGISTRY,
BrokenPowerLawSpectralModel,
Co... | 34.893545 | 124 | 0.620655 |
1a72f07dda32cb9d4c2b1b07847109214c2d15c8 | 2,940 | py | Python | empower/apps/e2eqosmanager/algorithms/exponentialquantumadaptation.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | 2 | 2020-02-28T15:54:01.000Z | 2020-11-24T08:45:11.000Z | empower/apps/e2eqosmanager/algorithms/exponentialquantumadaptation.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | null | null | null | empower/apps/e2eqosmanager/algorithms/exponentialquantumadaptation.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2019 Pedro Heleno Isolani
#
# 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 app... | 38.684211 | 111 | 0.67551 |
1a735967f947044517bf12feed3613579a363a3e | 27,751 | py | Python | tests/test_emr/test_emr_boto3.py | argos83/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | 1 | 2021-03-06T22:01:41.000Z | 2021-03-06T22:01:41.000Z | tests/test_emr/test_emr_boto3.py | marciogh/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | null | null | null | tests/test_emr/test_emr_boto3.py | marciogh/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | 1 | 2017-10-19T00:53:28.000Z | 2017-10-19T00:53:28.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
from copy import deepcopy
from datetime import datetime
import boto3
import pytz
import six
import sure # noqa
from botocore.exceptions import ClientError
from nose.tools import assert_raises
from moto import mock_emr
run_job_flow_args = d... | 41.793675 | 117 | 0.648301 |
1a736405267b4054a76df5e31570182370664845 | 3,113 | py | Python | python/ingestion/primary_care_access_to_bq.py | aaronsn/health-equity-tracker | c6b0b7cb76a17320a820bb826c622dad2fb9762d | [
"MIT"
] | null | null | null | python/ingestion/primary_care_access_to_bq.py | aaronsn/health-equity-tracker | c6b0b7cb76a17320a820bb826c622dad2fb9762d | [
"MIT"
] | null | null | null | python/ingestion/primary_care_access_to_bq.py | aaronsn/health-equity-tracker | c6b0b7cb76a17320a820bb826c622dad2fb9762d | [
"MIT"
] | null | null | null | import json
import logging
from pandas import DataFrame, read_excel
from .gcs_to_bq_util import append_dataframe_to_bq
# This is implicitly depended on by pandas.read_excel
import xlrd # noqa: F401
from google.cloud import storage
_STATE_NAMES = [
"Alabama",
"Alaska",
"Arizona",
"Arkansas",
"Calif... | 28.559633 | 84 | 0.573402 |
1a73652c3521f496da1ccd1b9114d7766db31ba6 | 2,116 | py | Python | tests/whois_state_test.py | ecix/pytinyirrdbcache | eca57af48ecddfbd3cf55af6fdd1a3dfa6d65670 | [
"BSD-3-Clause"
] | 1 | 2017-02-24T08:37:51.000Z | 2017-02-24T08:37:51.000Z | tests/whois_state_test.py | ecix/pytinyirrdbcache | eca57af48ecddfbd3cf55af6fdd1a3dfa6d65670 | [
"BSD-3-Clause"
] | null | null | null | tests/whois_state_test.py | ecix/pytinyirrdbcache | eca57af48ecddfbd3cf55af6fdd1a3dfa6d65670 | [
"BSD-3-Clause"
] | 1 | 2019-09-19T11:34:56.000Z | 2019-09-19T11:34:56.000Z | import pytest
from whoiscache.state import WhoisCacheState
from whoiscache import types as T
def test_macros():
"""Test macro state updates"""
state = WhoisCacheState()
add1 = ("ADD", '2', T.Macro(name='A', members=['a', 'b']))
add2 = ("ADD", '3', T.Macro(name='B', members=['b', 'c']))
state.appl... | 27.842105 | 75 | 0.571361 |
1a73834fe83fa5c4b0ec00bf2b5f490c9f6615e1 | 2,490 | py | Python | axopy/gui/graph.py | jdekarske/axopy | a60abb44a12c5e833b9033170825773bb0691394 | [
"MIT"
] | 13 | 2019-01-23T13:00:00.000Z | 2022-01-17T14:45:32.000Z | axopy/gui/graph.py | jdekarske/axopy | a60abb44a12c5e833b9033170825773bb0691394 | [
"MIT"
] | 45 | 2017-01-16T22:44:59.000Z | 2018-12-18T18:43:08.000Z | axopy/gui/graph.py | jdekarske/axopy | a60abb44a12c5e833b9033170825773bb0691394 | [
"MIT"
] | 5 | 2017-01-13T00:14:08.000Z | 2018-11-08T13:16:24.000Z | """
Widgets for plotting multi-channel signals.
"""
import pyqtgraph
class SignalWidget(pyqtgraph.GraphicsLayoutWidget):
"""
Scrolling oscilloscope-like widget for displaying real-time signals.
Intended for multi-channel viewing, each channel gets its own row in the
widget, and all channels share y-... | 27.666667 | 79 | 0.604016 |
1a73b51a7c041dca8e3d09ab0b6a1c8e1f81dae0 | 1,688 | py | Python | cq/tests/test_schemas.py | lukaszb/cq | e32f18c0a873e925d68cfafc53e18328157a6621 | [
"MIT"
] | 4 | 2017-03-15T15:01:44.000Z | 2021-02-05T03:08:41.000Z | cq/tests/test_schemas.py | lukaszb/cq | e32f18c0a873e925d68cfafc53e18328157a6621 | [
"MIT"
] | 14 | 2017-01-09T11:15:40.000Z | 2021-03-25T21:58:14.000Z | cq/tests/test_schemas.py | lukaszb/cq | e32f18c0a873e925d68cfafc53e18328157a6621 | [
"MIT"
] | 1 | 2017-03-12T18:03:38.000Z | 2017-03-12T18:03:38.000Z | from .app import User
from .app import UserRegisteredSchema
from .app import UserEmailChangedSchema
import cq.aggregates
import cq.exceptions
import cq.schemas
import pytest
class AggregateWithoutMutators(cq.aggregates.Aggregate):
pass
def test_aggregate_get_schema__none_mutators_registered():
assert Ag... | 27.672131 | 92 | 0.686611 |
1a73be1b89a1b63348d83396b930366510916256 | 16,668 | py | Python | skbio/sequence/_iupac_sequence.py | johnchase/scikit-bio | 340e6153b6c93053d923d344e63481860e03731e | [
"BSD-3-Clause"
] | null | null | null | skbio/sequence/_iupac_sequence.py | johnchase/scikit-bio | 340e6153b6c93053d923d344e63481860e03731e | [
"BSD-3-Clause"
] | null | null | null | skbio/sequence/_iupac_sequence.py | johnchase/scikit-bio | 340e6153b6c93053d923d344e63481860e03731e | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | 29.71123 | 79 | 0.577754 |
1a73ce402f04c211d145663e1359bb3f3e064e67 | 8,062 | py | Python | pbc/df/df_ao2mo.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | pbc/df/df_ao2mo.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | pbc/df/df_ao2mo.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
import time
import numpy
from pyscf import lib
from pyscf import ao2mo
from pyscf.ao2mo import _ao2mo
from pyscf.ao2mo.incore import iden_coeffs, _conc_mos
from pyscf.pbc import tools
from pyscf.pbc.df.df_jk import zdotNN, zdotCN, zdotNC, KPT_DIFF_T... | 39.135922 | 89 | 0.579509 |
1a73ebf9a80621ffa88f231282a03a76d991197c | 7,413 | py | Python | tests/test_config.py | jaegertracing/jaeger-client-python | a6c973158bf9b02cd7f5a966ccfd29ab86c44a5b | [
"Apache-2.0"
] | 372 | 2017-10-31T21:51:26.000Z | 2022-03-23T10:36:19.000Z | tests/test_config.py | jaegertracing/jaeger-client-python | a6c973158bf9b02cd7f5a966ccfd29ab86c44a5b | [
"Apache-2.0"
] | 276 | 2017-10-10T11:33:50.000Z | 2022-03-24T16:36:16.000Z | tests/test_config.py | jaegertracing/jaeger-client-python | a6c973158bf9b02cd7f5a966ccfd29ab86c44a5b | [
"Apache-2.0"
] | 157 | 2017-10-09T07:16:41.000Z | 2021-12-29T14:49:26.000Z | # Copyright (c) 2016-2018 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 applicable law or agree... | 36.69802 | 91 | 0.646702 |
1a740572aa44e6a7c7ed85685bbd2bb639464826 | 5,873 | py | Python | improver/utilities/rescale.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | null | null | null | improver/utilities/rescale.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | 4 | 2017-05-24T10:30:02.000Z | 2021-09-30T08:58:50.000Z | improver/utilities/rescale.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 39.416107 | 88 | 0.667632 |
1a74284a814f09aad4579118a48bb5eab19fe26c | 2,608 | py | Python | tests/st/ops/ascend/vector/test_sigmoid_cross_entropy_with_logits.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/st/ops/ascend/vector/test_sigmoid_cross_entropy_with_logits.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/st/ops/ascend/vector/test_sigmoid_cross_entropy_with_logits.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.726027 | 178 | 0.649156 |
1a7438be6f7f5c64a3a90ae9f0d6891b07a3190d | 641 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_GG.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_GG.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_GG.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. GG metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_GG = PhoneMetadata(id='GG', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[19]\\d{2,5}', possible_length=(3, ... | 71.222222 | 175 | 0.725429 |
1a7442c76e731554ae3f79345803e9c4a0fb2a2d | 12,474 | py | Python | dsc_extract_physio.py | slevyrosetti/7T-DSC-MRI-Toolbox | 83998bc993b6c054eb27cca0709d0040dd6c1cc8 | [
"Apache-2.0"
] | null | null | null | dsc_extract_physio.py | slevyrosetti/7T-DSC-MRI-Toolbox | 83998bc993b6c054eb27cca0709d0040dd6c1cc8 | [
"Apache-2.0"
] | null | null | null | dsc_extract_physio.py | slevyrosetti/7T-DSC-MRI-Toolbox | 83998bc993b6c054eb27cca0709d0040dd6c1cc8 | [
"Apache-2.0"
] | 2 | 2020-12-17T02:51:39.000Z | 2021-09-01T08:17:29.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Plot physiological signal vs. time and return acquisition time for each repetition.
Created on Tue Jul 4 17:45:43 2017
@author: slevy
"""
import numpy as np
import matplotlib.pyplot as plt
import pickle
import argparse
import os
from datetime import datetime
clas... | 43.013793 | 218 | 0.685746 |
1a74492f16cb6ed452ee96b04e65cfc2cb8ef3af | 1,945 | py | Python | tests/test_player_shelter.py | devdo-eu/zombreak | 05958a7e3980de1933eebda8645dda2db3d0da71 | [
"MIT"
] | null | null | null | tests/test_player_shelter.py | devdo-eu/zombreak | 05958a7e3980de1933eebda8645dda2db3d0da71 | [
"MIT"
] | 1 | 2021-04-01T06:18:33.000Z | 2021-04-01T06:18:33.000Z | tests/test_player_shelter.py | devdo-eu/zombreak | 05958a7e3980de1933eebda8645dda2db3d0da71 | [
"MIT"
] | null | null | null | from player.player_shelter import PlayerShelter
from logic.game_state import GameState
from logic.city_card import CityCard
from tests.common import zombie, fast_zombie, big_zombie, dumper_factory
import tests.common
from enums.supply import Supply
def test_sanity_check():
assert fast_zombie
assert zombie
... | 36.698113 | 92 | 0.717738 |
1a745da46279229a45ec96172721badd07620c03 | 2,447 | py | Python | tests/tensor/test_utils.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | tests/tensor/test_utils.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | tests/tensor/test_utils.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pytest
import aesara.tensor as at
from aesara.graph.fg import FunctionGraph
from aesara.tensor.type import matrix
from aesara.tensor.utils import hash_from_ndarray, shape_of_variables
def test_hash_from_ndarray():
hashes = []
rng = np.random.rand(5, 5)
for data in [
-2,... | 30.5875 | 78 | 0.565182 |
1a74708e07b8dcae756fb4234ad7910a58a20d41 | 980 | py | Python | src/python/pants/task/fmt_task_mixin.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 1 | 2021-05-05T18:58:28.000Z | 2021-05-05T18:58:28.000Z | src/python/pants/task/fmt_task_mixin.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | null | null | null | src/python/pants/task/fmt_task_mixin.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 3 | 2020-06-30T08:28:13.000Z | 2021-07-28T09:35:57.000Z | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.task.target_restriction_mixins import (
DeprecatedSkipAndDeprecatedTransitiveGoalOptionsRegistrar,
HasSkipAndTransitiveGoalOptionsMixin,
)
class FmtGoalRegistrar(Depre... | 32.666667 | 92 | 0.712245 |
1a748151e7367307e17791124597e21048f81b50 | 8,055 | py | Python | ignite/metrics/accumulation.py | VinhLoiIT/ignite | 3b2b9655ea9f80ce49b8a9f1c2d72f80e2a95f56 | [
"BSD-3-Clause"
] | 1 | 2020-06-13T15:22:08.000Z | 2020-06-13T15:22:08.000Z | ignite/metrics/accumulation.py | VinhLoiIT/ignite | 3b2b9655ea9f80ce49b8a9f1c2d72f80e2a95f56 | [
"BSD-3-Clause"
] | null | null | null | ignite/metrics/accumulation.py | VinhLoiIT/ignite | 3b2b9655ea9f80ce49b8a9f1c2d72f80e2a95f56 | [
"BSD-3-Clause"
] | 1 | 2020-06-13T15:30:46.000Z | 2020-06-13T15:30:46.000Z | import numbers
from typing import Callable, Union, Any, Optional
from ignite.metrics import Metric
from ignite.metrics.metric import sync_all_reduce, reinit__is_reduced
from ignite.exceptions import NotComputableError
import torch
__all__ = ["VariableAccumulation", "GeometricAverage", "Average"]
class VariableAcc... | 42.845745 | 119 | 0.658225 |
1a748fdc41fd6fab6aad14ca7bb800b97e376616 | 3,954 | py | Python | scripts/general_plots/gas_slice.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | scripts/general_plots/gas_slice.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 6 | 2020-02-17T13:44:43.000Z | 2020-06-25T15:35:05.000Z | scripts/general_plots/gas_slice.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 3 19:57:02 2015
@author: hoseung
"""
import load
import numpy as np
import utils.sampling as smp
import tree.halomodule as hmo
#wdir = './'
#wdir = '/home/hoseung/Work/data/AGN2/'
wdir = '/home/hoseung/Work/data/Aquarius/'
rscale = 5.0
lmax = 10
#nout = int(input("NO... | 30.183206 | 93 | 0.593829 |
1a74b481d170448a6e941a629056c6d32afdc360 | 414 | py | Python | python/04_sets/01_introductiontosets.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | python/04_sets/01_introductiontosets.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | python/04_sets/01_introductiontosets.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | 3 | 2021-09-22T11:06:58.000Z | 2022-01-25T09:29:24.000Z | # Solution to [Introduction to Sets](https://www.hackerrank.com/challenges/py-introduction-to-sets)
def average(array):
"""Returns the average of distinct heights."""
unique_vals = set(array)
return sum(unique_vals) / len(unique_vals)
# your code goes here
if __name__ == '__main__':
n = int(... | 27.6 | 99 | 0.661836 |
1a74c9294166e6d2c868dddf706d31d842ce797a | 3,038 | py | Python | engine/src/juliabox/plugins/vol_defcfg/defcfg.py | karthiganesh/juliabox | 761d39c7f8f481bdb5bf1dc4011d4e267158e551 | [
"MIT"
] | 50 | 2016-09-09T02:17:09.000Z | 2022-03-15T17:16:20.000Z | engine/src/juliabox/plugins/vol_defcfg/defcfg.py | wsshin/JuliaBox | 395df7654834f9671ab132cd29c02fb05ce42c27 | [
"MIT"
] | 58 | 2016-08-29T19:19:28.000Z | 2018-11-14T01:49:16.000Z | engine/src/juliabox/plugins/vol_defcfg/defcfg.py | wsshin/JuliaBox | 395df7654834f9671ab132cd29c02fb05ce42c27 | [
"MIT"
] | 24 | 2016-09-27T18:20:54.000Z | 2022-01-02T09:37:44.000Z | import os
from juliabox.jbox_util import ensure_delete, make_sure_path_exists, unique_sessname, JBoxCfg
from juliabox.vol import JBoxVol
class JBoxDefaultConfigVol(JBoxVol):
provides = [JBoxVol.JBP_CONFIG]
FS_LOC = None
@staticmethod
def configure():
cfg_location = os.path.expanduser(JBoxCf... | 35.325581 | 98 | 0.691244 |
1a74ca54dd24c19adb5c739c9378b125860277f4 | 1,090 | py | Python | fv3config/config/rundir.py | VulcanClimateModeling/fv3config | 544eaf1bc6f1c4617cd8ee6bd3298136ed180f4c | [
"BSD-2-Clause"
] | 2 | 2019-11-12T21:05:09.000Z | 2019-11-17T18:08:34.000Z | fv3config/config/rundir.py | VulcanClimateModeling/fv3config | 544eaf1bc6f1c4617cd8ee6bd3298136ed180f4c | [
"BSD-2-Clause"
] | 77 | 2019-11-12T21:15:38.000Z | 2021-05-07T22:39:36.000Z | fv3config/config/rundir.py | VulcanClimateModeling/fv3config | 544eaf1bc6f1c4617cd8ee6bd3298136ed180f4c | [
"BSD-2-Clause"
] | null | null | null | import logging
import os
from .namelist import config_to_namelist
from .._asset_list import write_assets_to_directory
from .._tables import update_diag_table_for_config
from .derive import get_current_date
from .nudging import enable_nudging
logger = logging.getLogger("fv3config")
def write_run_directory(config, tar... | 37.586207 | 86 | 0.758716 |
1a74d66a05d04770d24321a9651df108e7a48820 | 107 | py | Python | spektral/__init__.py | haozhu233/spektral | ef83b93fa8d0b8015a0793371bb63b8447398b42 | [
"MIT"
] | 1 | 2021-01-04T11:21:03.000Z | 2021-01-04T11:21:03.000Z | spektral/__init__.py | haozhu233/spektral | ef83b93fa8d0b8015a0793371bb63b8447398b42 | [
"MIT"
] | null | null | null | spektral/__init__.py | haozhu233/spektral | ef83b93fa8d0b8015a0793371bb63b8447398b42 | [
"MIT"
] | null | null | null | from . import brain
from . import datasets
from . import layers
from . import utils
__version__ = '0.1.0'
| 15.285714 | 22 | 0.728972 |
1a7524ac057e97371ef4d4d6385d177951a6c4b5 | 545 | py | Python | recipeProject/manage.py | Mazziitoozz/Django_REST_recipe_api | b248342aed1bda5d4d39a17509dcd11962fecf10 | [
"MIT"
] | null | null | null | recipeProject/manage.py | Mazziitoozz/Django_REST_recipe_api | b248342aed1bda5d4d39a17509dcd11962fecf10 | [
"MIT"
] | null | null | null | recipeProject/manage.py | Mazziitoozz/Django_REST_recipe_api | b248342aed1bda5d4d39a17509dcd11962fecf10 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'recipeProject.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django... | 34.0625 | 77 | 0.689908 |
1a752f8037b302ee3158bb5e90d1d1df9217fec0 | 745 | py | Python | office365/directory/userProfile.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/directory/userProfile.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/directory/userProfile.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | from office365.directory.passwordProfile import PasswordProfile
from office365.runtime.client_value import ClientValue
class UserProfile(ClientValue):
def __init__(self, principal_name, password, display_name=None, account_enabled=False):
"""
User profile
:type principal_name: str
... | 35.47619 | 91 | 0.696644 |
1a7574e0c5746388c8b0e73bb6319ad65231bf05 | 3,528 | py | Python | src/test.py | B06901052/deep-stabilization | b6030b463cf1f1128660e900669f43e742aa2651 | [
"Apache-2.0"
] | null | null | null | src/test.py | B06901052/deep-stabilization | b6030b463cf1f1128660e900669f43e742aa2651 | [
"Apache-2.0"
] | null | null | null | src/test.py | B06901052/deep-stabilization | b6030b463cf1f1128660e900669f43e742aa2651 | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
import numpy.linalg as LA
from queue import SimpleQueue
from math import ceil
from time import time
from importlib import reload
import matplotlib.pyplot as plt
from IPython.display import Video
from warnings import simplefilter
from scipy.linalg import sqrtm
import torch
from torchvision... | 30.678261 | 115 | 0.676871 |
1a75755e0513b5d3bbb6fadff49dd310233ecfbd | 3,211 | py | Python | sdks/python/appcenter_sdk/models/EmailVerificationRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/EmailVerificationRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/EmailVerificationRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class EmailVerificat... | 28.669643 | 91 | 0.570539 |
1a7593438e0dc9feff733bb90c5d697f28df051f | 1,004 | py | Python | user_inteface/CameraPane.py | Hammer-Inc/csit_student_signup | 826bc7e49bdb20497f52628250fbcf8ec01ce969 | [
"MIT"
] | null | null | null | user_inteface/CameraPane.py | Hammer-Inc/csit_student_signup | 826bc7e49bdb20497f52628250fbcf8ec01ce969 | [
"MIT"
] | 7 | 2020-03-24T15:56:02.000Z | 2021-10-12T22:14:28.000Z | user_inteface/CameraPane.py | Hammer-Inc/csit_student_signup | 826bc7e49bdb20497f52628250fbcf8ec01ce969 | [
"MIT"
] | null | null | null | import tkinter as tk
from PIL import Image, ImageTk
class CameraPane(tk.Frame):
placeholder = Image.open("./resources/placeholder.jpg")
CAMERA_DIM = (160, 120)
def __init__(self, master, **kw):
super().__init__(master, **kw)
self.grid(row=0, column=0)
self._cam = None
sel... | 30.424242 | 59 | 0.619522 |
1a7593db9a4cdf748e5ca7312997fe722bdbb1ff | 4,900 | py | Python | runner.py | JunLi-Galios/pytorch-template | 18038044b81238223770180300ff3cad0ca41978 | [
"MIT"
] | 1 | 2019-08-08T17:21:47.000Z | 2019-08-08T17:21:47.000Z | runner.py | JunLi-Galios/pytorch-template | 18038044b81238223770180300ff3cad0ca41978 | [
"MIT"
] | null | null | null | runner.py | JunLi-Galios/pytorch-template | 18038044b81238223770180300ff3cad0ca41978 | [
"MIT"
] | null | null | null | import os
import time
from glob import glob
import numpy as np
from tqdm import tqdm
import torch
import torch.nn as nn
import torch.nn.functional as F
class Runner():
def __init__(self, model_name, net, optim, torch_device, criterion, epochs, logger, save_dir, save_interval, scheduler, resume_file):
s... | 34.507042 | 137 | 0.55551 |
1a7599a394ada7dd973dde6eb0271ba776524881 | 176 | py | Python | chp_look_up/app/apps.py | di2ag/chp-look-up | b4d928dfc20ae9b9e3467d536dd5704a45eb7255 | [
"Apache-2.0"
] | null | null | null | chp_look_up/app/apps.py | di2ag/chp-look-up | b4d928dfc20ae9b9e3467d536dd5704a45eb7255 | [
"Apache-2.0"
] | null | null | null | chp_look_up/app/apps.py | di2ag/chp-look-up | b4d928dfc20ae9b9e3467d536dd5704a45eb7255 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class ChpLookUpConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'chp_look_up'
label = 'chp_look_up' | 29.333333 | 56 | 0.755682 |
1a75a04e60b7fb3a47a906c94226daa0a5ece6be | 5,921 | py | Python | src/blackbench/micro-targets/list-literal.py | ichard26/blackperf | 1e4e36b8de4ba351a95f4948866620bada64cf53 | [
"MIT"
] | 3 | 2021-04-28T03:59:03.000Z | 2021-06-26T02:12:30.000Z | src/blackbench/micro-targets/list-literal.py | ichard26/blackperf | 1e4e36b8de4ba351a95f4948866620bada64cf53 | [
"MIT"
] | 6 | 2021-06-14T22:46:31.000Z | 2021-08-14T22:46:25.000Z | src/blackbench/micro-targets/list-literal.py | ichard26/blackperf | 1e4e36b8de4ba351a95f4948866620bada64cf53 | [
"MIT"
] | 2 | 2021-09-18T15:23:21.000Z | 2022-02-01T13:02:33.000Z | config = some.Structure(
value=set([u'some_rather_long_text_value',
u'some_rather_long_text_value',
u'some_rather_long_text_value',
u'some_rather_long_text_value',
u'some_rather_long_text_value',
u'some_rather_long_text_value',
u'some_rather_long_text_value',
... | 39.211921 | 46 | 0.699713 |
1a75a53f57c13f6de38e134cc94caaefb1b5571b | 2,082 | py | Python | tieba/utils/caches.py | changleibox/TiebaCrawler | d4f0af508660d4e6d38cdb410ce2711117d13f3a | [
"Apache-2.0"
] | 21 | 2018-03-15T05:41:46.000Z | 2021-07-27T00:06:15.000Z | tieba/utils/caches.py | changleibox/TiebaCrawler | d4f0af508660d4e6d38cdb410ce2711117d13f3a | [
"Apache-2.0"
] | 3 | 2018-06-01T09:00:52.000Z | 2020-04-16T11:39:02.000Z | tieba/utils/caches.py | changleibox/TiebaCrawler | d4f0af508660d4e6d38cdb410ce2711117d13f3a | [
"Apache-2.0"
] | 9 | 2018-06-07T02:19:33.000Z | 2021-07-29T02:55:18.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Created by box on 2018/3/15.
import csv
import os
from tieba.common.configs import COOKIES_FILE_NAME, ACCOUNT_FILE_NAME
from tieba.utils import utils
__cookies = dict()
def read_request_cookies():
global __cookies
if os.path.exists(COOKIES_FILE_NAME):
... | 26.692308 | 84 | 0.658982 |
1a75b7218add4d73114a4dd2536bc5a10532cef6 | 29,205 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/models/_network_management_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/models/_network_management_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/models/_network_management_client_enums.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 ... | 29.088645 | 112 | 0.707824 |
1a75b8c74573d3ec88547f71653a70726bb8f64c | 5,576 | py | Python | research/object_detection/inference_from_model.py | AlvaroCavalcante/models | 5312d38ecadeb4b5647e7a80e35cf19c515925f4 | [
"Apache-2.0"
] | 2 | 2020-07-24T01:53:09.000Z | 2020-10-26T07:45:50.000Z | research/object_detection/inference_from_model.py | AlvaroCavalcante/models | 5312d38ecadeb4b5647e7a80e35cf19c515925f4 | [
"Apache-2.0"
] | null | null | null | research/object_detection/inference_from_model.py | AlvaroCavalcante/models | 5312d38ecadeb4b5647e7a80e35cf19c515925f4 | [
"Apache-2.0"
] | 8 | 2020-09-17T13:09:11.000Z | 2021-12-17T09:58:43.000Z | import numpy as np
import os
import tensorflow as tf
import pathlib
import glob
import fnmatch
# this is important to ensure that your script is using the local "utils" folder
os.chdir(os.getcwd())
from PIL import Image
# export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim # Don't forget to run this on the research folde... | 42.564885 | 127 | 0.715387 |
1a75c6510e37f5ba0503bbf05c749675f762f99d | 5,373 | py | Python | egs/word_embedding/word2vec/cbow_en.py | charlesliucn/LanMIT | 537dab22335a21285699776ce66d95cb14c3db52 | [
"Apache-2.0"
] | 17 | 2019-07-08T08:34:50.000Z | 2021-11-19T13:39:29.000Z | egs/word_embedding/word2vec/cbow_en.py | charlesliucn/kaldi-lm | 537dab22335a21285699776ce66d95cb14c3db52 | [
"Apache-2.0"
] | null | null | null | egs/word_embedding/word2vec/cbow_en.py | charlesliucn/kaldi-lm | 537dab22335a21285699776ce66d95cb14c3db52 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
import numpy as np
import collections
import math
import os
import random
import tensorflow as tf
import zipfile
os.environ["CUDA_VISIBLE_DEVICES"] = "4"
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.5
session = tf.Session(config = config)
def read_data(filen... | 30.355932 | 91 | 0.697376 |
1a75e7188e253cdaf1e6e91941ea3a07777a17a5 | 997 | py | Python | nxstart/filebuilder/pynx.py | roedesh/nxstart | ad1470aeae865270267322e265669f38945e268a | [
"MIT"
] | 40 | 2018-06-19T02:28:00.000Z | 2021-11-14T20:00:34.000Z | nxstart/filebuilder/pynx.py | roedesh/nxstart | ad1470aeae865270267322e265669f38945e268a | [
"MIT"
] | 2 | 2018-06-19T09:49:36.000Z | 2018-12-02T13:14:26.000Z | nxstart/filebuilder/pynx.py | roedesh/nxstart | ad1470aeae865270267322e265669f38945e268a | [
"MIT"
] | 4 | 2018-06-19T09:19:29.000Z | 2020-03-31T14:35:12.000Z | # -*- coding: utf-8 -*-
"""Includes functions for copying the PyNX template files."""
import datetime
import os
from distutils.dir_util import copy_tree
from nxstart.utils.files import get_full_path, replace_in_file
def create_pynx_project(folder_path, name, author):
"""
Copies the files from templates/bas... | 32.16129 | 97 | 0.722166 |
1a76202673b985dd9b091f666711efd68a917a6e | 386 | py | Python | nomination/maintenance_context.py | unt-libraries/django-nomination | 90e42109f8113e411e51e29485e8d1f1e9848373 | [
"BSD-3-Clause"
] | 2 | 2016-12-07T09:09:11.000Z | 2018-01-31T13:57:04.000Z | nomination/maintenance_context.py | unt-libraries/django-nomination | 90e42109f8113e411e51e29485e8d1f1e9848373 | [
"BSD-3-Clause"
] | 100 | 2016-01-21T19:52:57.000Z | 2021-06-01T20:23:59.000Z | nomination/maintenance_context.py | unt-libraries/django-nomination | 90e42109f8113e411e51e29485e8d1f1e9848373 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
def maintenance_needed(request):
"""Returns the maintenance message if it is specified in the settings"""
try:
maintenance_message = settings.MAINTENANCE_MSG
except AttributeError:
maintenance_message = None
maintenance_dict = {
'maintenance_mes... | 27.571429 | 76 | 0.715026 |
1a764119fdd8bec9d6064e1d54e58a9b8cd8693c | 5,463 | py | Python | revolt/ext/commands/client.py | byemc/revolt.py | 0e8cd7250b7da71ebec3800167cd104dfb007741 | [
"MIT"
] | 28 | 2021-08-17T23:25:48.000Z | 2021-12-16T00:13:05.000Z | revolt/ext/commands/client.py | byemc/revolt.py | 0e8cd7250b7da71ebec3800167cd104dfb007741 | [
"MIT"
] | 14 | 2021-08-31T06:00:12.000Z | 2021-12-28T22:59:08.000Z | revolt/ext/commands/client.py | byemc/revolt.py | 0e8cd7250b7da71ebec3800167cd104dfb007741 | [
"MIT"
] | 12 | 2021-08-18T00:55:53.000Z | 2021-11-20T16:58:18.000Z | from __future__ import annotations
import re
import traceback
from typing import Any, Callable, Union
import revolt
from .command import Command
from .context import Context
from .errors import CheckError, CommandNotFound
from .view import StringView
__all__ = (
"CommandsMeta",
"CommandsClient"
)
quote_reg... | 28.305699 | 143 | 0.597291 |
1a765bf8fb0f63d3c58ed3533794083022be0d9b | 143 | py | Python | Element_Analytics/apps/signup/urls.py | drproduck/Element-Analytics | aa1a77578e6401b4e82ce9fe9072c796496d878d | [
"MIT"
] | 1 | 2019-12-09T09:43:30.000Z | 2019-12-09T09:43:30.000Z | Element_Analytics/apps/signup/urls.py | drproduck/Element-Analytics | aa1a77578e6401b4e82ce9fe9072c796496d878d | [
"MIT"
] | 37 | 2018-02-04T04:41:46.000Z | 2018-04-29T20:39:09.000Z | Element_Analytics/apps/signup/urls.py | drproduck/Element-Analytics | aa1a77578e6401b4e82ce9fe9072c796496d878d | [
"MIT"
] | null | null | null | from apps.signup import views as core_views
from django.urls import path
urlpatterns = [
path('', core_views.signup, name='signup')
] | 23.833333 | 47 | 0.713287 |
1a76600dd2420cbb7b67b303ac362e621f4bef3f | 1,786 | py | Python | Clase08/arbolado_parques_veredas.py | qagustina/python-exercises | b4e0708ed1b3defea4d9b6adb4d97fc2d3b4a7e1 | [
"MIT"
] | null | null | null | Clase08/arbolado_parques_veredas.py | qagustina/python-exercises | b4e0708ed1b3defea4d9b6adb4d97fc2d3b4a7e1 | [
"MIT"
] | null | null | null | Clase08/arbolado_parques_veredas.py | qagustina/python-exercises | b4e0708ed1b3defea4d9b6adb4d97fc2d3b4a7e1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 4 21:07:44 2021
@author: qagustina
"""
# 8.9: Comparando especies en parques y en veredas
import os
import pandas as pd
directorio = '../Data'
archivo_parques = 'arbolado-en-espacios-verdes.csv'
archivo_veredas = 'arbolado-publico-lineal-2017-2018.csv'
fname_p = os.pat... | 34.346154 | 119 | 0.765398 |
1a768654fb835372c253095a09f930ddada26268 | 1,017 | py | Python | misc.py | ECrownofFire/chaos | 0cfbb85ab52654967909aef54eff3a0e62b641bd | [
"MIT"
] | 1,804 | 2017-05-23T02:34:27.000Z | 2017-05-26T00:44:44.000Z | misc.py | ECrownofFire/chaos | 0cfbb85ab52654967909aef54eff3a0e62b641bd | [
"MIT"
] | 345 | 2017-05-20T23:55:12.000Z | 2017-06-19T07:48:58.000Z | misc.py | ECrownofFire/chaos | 0cfbb85ab52654967909aef54eff3a0e62b641bd | [
"MIT"
] | 248 | 2017-05-23T02:00:07.000Z | 2017-05-26T00:00:28.000Z | import sh
from urllib.parse import urlparse
def removeDotGit(url):
""" Remove trailing `.git` from the git remote url """
if url.endswith('.git'):
return url[:-4]
return url
def get_self_urn():
""" determine the URN for the repo on github by looking at the remote named
"origin", and pars... | 27.486486 | 79 | 0.618486 |
1a76ab14805def3da283bd5c821b045579b31ba1 | 30,421 | py | Python | mindmeld/components/_config.py | AravindR7/mindmeld | 470bba73ac56b6388146212ddaf697097e81cec3 | [
"Apache-2.0"
] | 1 | 2019-12-12T12:44:33.000Z | 2019-12-12T12:44:33.000Z | mindmeld/components/_config.py | AravindR7/mindmeld | 470bba73ac56b6388146212ddaf697097e81cec3 | [
"Apache-2.0"
] | null | null | null | mindmeld/components/_config.py | AravindR7/mindmeld | 470bba73ac56b6388146212ddaf697097e81cec3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015 Cisco Systems, Inc. and others. 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... | 34.335214 | 99 | 0.466191 |
1a76b92da17e63017fb7a63e12fe22db3078b852 | 1,518 | py | Python | miniworld/model/StartableObject.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 5 | 2019-05-11T14:57:15.000Z | 2021-07-05T00:35:25.000Z | miniworld/model/StartableObject.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 27 | 2017-03-17T07:11:02.000Z | 2019-05-26T23:36:56.000Z | miniworld/model/StartableObject.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 6 | 2017-05-03T12:11:33.000Z | 2020-04-03T11:44:27.000Z | from miniworld.errors import Base
from miniworld.model.singletons.Singletons import singletons
class AlreadyStartedError(Base):
pass
class AlreadyPerformedShutdownError(Base):
pass
# TODO: DOC
class StartableObject(object):
def __init__(self):
self.started = False
self.shutdown_compl... | 26.631579 | 97 | 0.693676 |
1a76f86798813bf3ae67aeaf51f3c87648fef934 | 13,674 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_virtual_machine_extension_images_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_virtual_machine_extension_images_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_virtual_machine_extension_images_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 39.520231 | 211 | 0.672517 |
1a770b74a33bd9cb9eabb14ae33e2aa78cc75840 | 2,403 | py | Python | dnacentersdk/models/validators/v2_1_2/jsd_3e94cb1b485b8b0e.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | dnacentersdk/models/validators/v2_1_2/jsd_3e94cb1b485b8b0e.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | dnacentersdk/models/validators/v2_1_2/jsd_3e94cb1b485b8b0e.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNA Center Create Application Set data model.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
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, ... | 32.917808 | 78 | 0.632543 |
1a775450ec4a61de7f40275ac80746f502586901 | 1,299 | py | Python | python_modules/libraries/dagster-shell/setup.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-shell/setup.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-shell/setup.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | from typing import Dict
from setuptools import find_packages, setup
def get_version() -> str:
version: Dict[str, str] = {}
with open("dagster_shell/version.py") as fp:
exec(fp.read(), version) # pylint: disable=W0122
return version["__version__"]
if __name__ == "__main__":
ver = get_versi... | 33.307692 | 103 | 0.601232 |
1a778948b65140429580e4dcbd618af2af2c2ae3 | 3,419 | py | Python | packages/labtools/__init__.py | nala-cub/coda | 581608cfc4d9b485182c6f5f40dd2ab7540cec66 | [
"Apache-2.0"
] | 1 | 2021-11-13T06:19:22.000Z | 2021-11-13T06:19:22.000Z | packages/labtools/__init__.py | nala-cub/coda | 581608cfc4d9b485182c6f5f40dd2ab7540cec66 | [
"Apache-2.0"
] | 1 | 2021-12-21T17:56:58.000Z | 2021-12-21T18:16:27.000Z | packages/labtools/__init__.py | nala-cub/coda | 581608cfc4d9b485182c6f5f40dd2ab7540cec66 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Cory Paik. 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... | 32.254717 | 80 | 0.747879 |
1a778d3882a2d20a993f11086b1d8e1b34b97fec | 15,027 | py | Python | maad/util/math_func.py | scikit-maad/scikit-maad | 2052c6f5ffc2a973fa1676364cc1663d7da1715a | [
"BSD-3-Clause"
] | 31 | 2019-06-27T11:30:09.000Z | 2022-03-14T22:07:34.000Z | maad/util/math_func.py | scikit-maad/scikit-maad | 2052c6f5ffc2a973fa1676364cc1663d7da1715a | [
"BSD-3-Clause"
] | 9 | 2019-03-29T20:45:09.000Z | 2022-03-18T12:25:53.000Z | maad/util/math_func.py | scikit-maad/scikit-maad | 2052c6f5ffc2a973fa1676364cc1663d7da1715a | [
"BSD-3-Clause"
] | 7 | 2019-07-29T13:26:40.000Z | 2022-03-24T00:44:47.000Z | #!/usr/bin/env python
"""
Mathematical tools for audio signal processing.
"""
#
# Authors: Juan Sebastian ULLOA <lisofomia@gmail.com>
# Sylvain HAUPERT <sylvain.haupert@mnhn.fr>
#
# License: New BSD License
# =============================================================================
# Load th... | 33.31929 | 203 | 0.514807 |
1a7798fcadc2507a3992148ebb334cafc77aced3 | 1,112 | py | Python | KristaBackup/core/actions/__init__.py | javister/krista-backup | f8852c20afdf483e842ff22497bdd80eedc30c78 | [
"Apache-2.0"
] | 7 | 2020-07-28T06:53:02.000Z | 2022-03-18T05:23:03.000Z | KristaBackup/core/actions/__init__.py | javister/krista-backup | f8852c20afdf483e842ff22497bdd80eedc30c78 | [
"Apache-2.0"
] | 1 | 2020-11-25T16:13:26.000Z | 2020-11-25T16:13:26.000Z | KristaBackup/core/actions/__init__.py | javister/krista-backup | f8852c20afdf483e842ff22497bdd80eedc30c78 | [
"Apache-2.0"
] | 1 | 2020-07-28T13:47:09.000Z | 2020-07-28T13:47:09.000Z | from .action import Action
from .movebkpperiod import MoveBkpPeriod
from .script import Command, Script
from .archiver import Archiver, ArchiverTar, ArchiverZip
from .check_last_backup import CheckLastBackup
from .pgdump import PgDump
from .cleaner import Cleaner
from .dataspace_checker import DataSpaceChecker
from .in... | 28.512821 | 56 | 0.727518 |
1a77ae43dce91c84575e70df61c9a698916a2f88 | 2,049 | py | Python | alipay/aop/api/response/AlipayOpenSpIsvRelationQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayOpenSpIsvRelationQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayOpenSpIsvRelationQueryResponse.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.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.PromotionRelationDTO import PromotionRelationDTO
class AlipayOpenSpIsvRelationQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenSpIsvRel... | 32.52381 | 109 | 0.675451 |
1a77bff77eb24e2a89e8024290a2c3ebcb13c8f1 | 361 | py | Python | easyml/mainsite/migrations/0009_auto_20180927_1922.py | evancasey1/EasyML | 69f0c246cb7e1d6f7167eb504c30693088e703fd | [
"MIT"
] | null | null | null | easyml/mainsite/migrations/0009_auto_20180927_1922.py | evancasey1/EasyML | 69f0c246cb7e1d6f7167eb504c30693088e703fd | [
"MIT"
] | null | null | null | easyml/mainsite/migrations/0009_auto_20180927_1922.py | evancasey1/EasyML | 69f0c246cb7e1d6f7167eb504c30693088e703fd | [
"MIT"
] | 1 | 2020-10-25T08:14:33.000Z | 2020-10-25T08:14:33.000Z | # Generated by Django 2.1.1 on 2018-09-27 19:22
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('mainsite', '0008_mlmodel'),
]
operations = [
migrations.RenameField(
model_name='csvfiledata',
old_name='designation',
... | 19 | 47 | 0.581717 |
1a77e6300ad68d9e6ffb8d839b3e3389750ce3cc | 3,584 | py | Python | apysc/_geom/path_dest_x_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | apysc/_geom/path_dest_x_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | apysc/_geom/path_dest_x_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | """Interface class implementation for the destination x path data.
"""
from typing import Dict
from apysc._type.attr_linking_interface import AttrLinkingInterface
from apysc._type.int import Int
from apysc._type.revert_interface import RevertInterface
class PathDestXInterface(RevertInterface, AttrLinkingI... | 31.165217 | 73 | 0.578683 |
1a7800038325d66046f5c35b9ac21b0682e64856 | 1,607 | py | Python | experiments/dissent/args.py | znewman01/spectrum-impl | 389b463afa6463bc4a5de6884157730e9cf0b59e | [
"MIT"
] | 2 | 2021-03-12T12:31:34.000Z | 2022-02-03T01:06:58.000Z | experiments/dissent/args.py | znewman01/spectrum-impl | 389b463afa6463bc4a5de6884157730e9cf0b59e | [
"MIT"
] | null | null | null | experiments/dissent/args.py | znewman01/spectrum-impl | 389b463afa6463bc4a5de6884157730e9cf0b59e | [
"MIT"
] | 1 | 2021-07-20T20:21:39.000Z | 2021-07-20T20:21:39.000Z | """Run Dissent experiments.
Use the source from <https://github.com/dedis/Dissent> (current commit as of
2021-09-05).
We create an Ubuntu AMI with the Dissent binaries. Our AWS environment:
- (many) client machines
- "server0" machine
- "server1" machine
A Spectrum experiment is parameterized by number of channels ... | 22.013699 | 80 | 0.669571 |
1a780c59bde6ba749489328b5676887a2325fde8 | 1,675 | py | Python | pages/themes/PyQt/examples/simple_table_headeractions.py | WWWCourses/ProgressBG-Python-UniCredit-Slides | 87539aa2f73738370ac8df865cf3a1adac447391 | [
"MIT"
] | null | null | null | pages/themes/PyQt/examples/simple_table_headeractions.py | WWWCourses/ProgressBG-Python-UniCredit-Slides | 87539aa2f73738370ac8df865cf3a1adac447391 | [
"MIT"
] | null | null | null | pages/themes/PyQt/examples/simple_table_headeractions.py | WWWCourses/ProgressBG-Python-UniCredit-Slides | 87539aa2f73738370ac8df865cf3a1adac447391 | [
"MIT"
] | null | null | null | import sys
from PyQt5 import QtWidgets as qtw
from PyQt5 import QtCore as qtc
from PyQt5 import QtGui as qtg
class SimpleTable(qtw.QTableWidget):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.rows = args[0]
self.cols = args[1]
# make column labels:
col_labels = []
for i in r... | 25 | 85 | 0.728358 |
1a78154617dfc8bed7474b180aab65aa250b8019 | 1,274 | py | Python | examples/baseline.py | shoemakerdr/analytic_shrinkage | 10beefe7bd7161e09483ddc0641ed370042569e4 | [
"MIT"
] | null | null | null | examples/baseline.py | shoemakerdr/analytic_shrinkage | 10beefe7bd7161e09483ddc0641ed370042569e4 | [
"MIT"
] | null | null | null | examples/baseline.py | shoemakerdr/analytic_shrinkage | 10beefe7bd7161e09483ddc0641ed370042569e4 | [
"MIT"
] | null | null | null | """This code replicates the baseline results for the analytic shrinkage estimator
from the working paper called
'Analytical Nonlinear Shrinkage of Large-Dimensional Covariance Matrices'
Ledoit and Wolf 2018
Figure 4
"""
import numpy as np
import nonlinshrink as nls
if __name__ == '__main__':
ps = np.arange(sta... | 29.627907 | 81 | 0.538462 |
1a78171e4aebdfde6c424b89d9d7e20ed7c2fa57 | 36,344 | py | Python | libqtile/backend/x11/xcbq.py | airwoodix/qtile | 95ea620fb4c1b549fae3fc2f4162c6d33dc24f80 | [
"MIT"
] | null | null | null | libqtile/backend/x11/xcbq.py | airwoodix/qtile | 95ea620fb4c1b549fae3fc2f4162c6d33dc24f80 | [
"MIT"
] | 1 | 2020-04-15T20:20:42.000Z | 2020-04-15T20:20:42.000Z | libqtile/backend/x11/xcbq.py | zordsdavini/qtile | 571198aff5332e86ad156a8710d36d4507f43421 | [
"MIT"
] | null | null | null | # Copyright (c) 2009-2010 Aldo Cortesi
# Copyright (c) 2010 matt
# Copyright (c) 2010, 2012, 2014 dequis
# Copyright (c) 2010 Philip Kranz
# Copyright (c) 2010-2011 Paul Colomiets
# Copyright (c) 2011 osebelin
# Copyright (c) 2011 Mounier Florian
# Copyright (c) 2011 Kenji_Takahashi
# Copyright (c) 2011 Tzbob
# Copyrig... | 32.771867 | 91 | 0.587965 |
1a7824a183ad89fe71129dfdd739276767996208 | 2,201 | py | Python | parlai/tasks/lmcrisischats/agents.py | odemasi/ParlAI | eb8e468b21b5241522e068fe641758d6df23b564 | [
"MIT"
] | null | null | null | parlai/tasks/lmcrisischats/agents.py | odemasi/ParlAI | eb8e468b21b5241522e068fe641758d6df23b564 | [
"MIT"
] | null | null | null | parlai/tasks/lmcrisischats/agents.py | odemasi/ParlAI | eb8e468b21b5241522e068fe641758d6df23b564 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
# from parlai.core.teachers import FixedDialogTeacher
from parlai.tasks.crisischats.agents import CrisisChatsTeacher
from .build import build
import numpy as np
# class LMCrisisChatsTeacher(FixedDialogTeacher):
class LMCrisisChatsTeacher(CrisisChatsTeacher):
data_folder_nam... | 27.17284 | 77 | 0.527033 |
1a78344ff83abc000b6809f6cfc2f60cff683cc0 | 2,584 | py | Python | src/cpu/testers/networktest/NetworkTest.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | src/cpu/testers/networktest/NetworkTest.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | src/cpu/testers/networktest/NetworkTest.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2009 Advanced Micro Devices, Inc.
# 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
# notice, this list of conditions... | 53.833333 | 101 | 0.765867 |
1a783f8b7479a2946ca57292be285ade5228dc2a | 17,733 | py | Python | lecarb/estimator/mscn/mscn.py | sfu-db/AreCELearnedYet | a0ed0c0713c87aeab96bb10db06fc0687d96b1ab | [
"MIT"
] | 34 | 2020-12-14T01:21:29.000Z | 2022-03-29T04:52:46.000Z | lecarb/estimator/mscn/mscn.py | sfu-db/AreCELearnedYet | a0ed0c0713c87aeab96bb10db06fc0687d96b1ab | [
"MIT"
] | 5 | 2020-12-28T16:06:22.000Z | 2022-01-19T18:28:53.000Z | lecarb/estimator/mscn/mscn.py | sfu-db/AreCELearnedYet | a0ed0c0713c87aeab96bb10db06fc0687d96b1ab | [
"MIT"
] | 12 | 2021-02-08T17:50:13.000Z | 2022-03-28T11:09:06.000Z | import time
import logging
from typing import Dict, Any, Tuple
import numpy as np
import torch
from torch.autograd import Variable
from torch.utils.data import DataLoader, dataset
from .model import SetConv
from ..estimator import Estimator, OPS
from ..utils import report_model, qerror, evaluate, run_test
from ...dat... | 41.529274 | 136 | 0.672701 |
1a783fe91028996dbd93785caab163fad5d11375 | 54 | py | Python | contrary/__init__.py | rbricheno/contrary | 23d790027f7deb9ccad8f356ee8a04a8b00ac05f | [
"MIT"
] | null | null | null | contrary/__init__.py | rbricheno/contrary | 23d790027f7deb9ccad8f356ee8a04a8b00ac05f | [
"MIT"
] | null | null | null | contrary/__init__.py | rbricheno/contrary | 23d790027f7deb9ccad8f356ee8a04a8b00ac05f | [
"MIT"
] | null | null | null | __all__ = ['contrary']
from contrary.contrary import * | 27 | 31 | 0.759259 |
1a78530be3160aa1cc29b4af5375357f3b28c371 | 8,349 | py | Python | mps_database/tools/mps_names.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | null | null | null | mps_database/tools/mps_names.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 1 | 2017-07-07T21:31:59.000Z | 2017-07-07T21:31:59.000Z | mps_database/tools/mps_names.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 4 | 2017-07-07T20:10:54.000Z | 2020-12-13T00:03:37.000Z | from mps_database.mps_config import MPSConfig, models
class MpsName:
"""
This class helps build PV names for MPS componets.
"""
def __init__(self, session):
self.session = session
def getDeviceInputNameFromId(self, deviceInputId):
"""
Builds the PV base name for the specifi... | 41.331683 | 132 | 0.614684 |
1a786618307824f683b797c8b350d603c2ace10f | 4,020 | py | Python | devel/lib/python2.7/dist-packages/industrial_msgs/msg/_RobotMode.py | Pontiky/yaskawa-hc10-moveit | 2a6031f9404d285aa662636ccc941485b339e7fd | [
"BSD-2-Clause"
] | 1 | 2021-05-19T04:09:29.000Z | 2021-05-19T04:09:29.000Z | devel/lib/python2.7/dist-packages/industrial_msgs/msg/_RobotMode.py | Pontiky/yaskawa-hc10-moveit | 2a6031f9404d285aa662636ccc941485b339e7fd | [
"BSD-2-Clause"
] | null | null | null | devel/lib/python2.7/dist-packages/industrial_msgs/msg/_RobotMode.py | Pontiky/yaskawa-hc10-moveit | 2a6031f9404d285aa662636ccc941485b339e7fd | [
"BSD-2-Clause"
] | null | null | null | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from industrial_msgs/RobotMode.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
class RobotMode(genpy.Message):
_md5sum = "24ac279e988b6b3db836e437e6ed1ba0... | 31.904762 | 145 | 0.659701 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.