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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ddbaf11f01859eaa081ff72a9bb1921842bfb30e | 117 | py | Python | Python/Tests/TestData/Grammar/ImportStmt.py | nanshuiyu/pytools | 9f9271fe8cf564b4f94e9456d400f4306ea77c23 | [
"Apache-2.0"
] | null | null | null | Python/Tests/TestData/Grammar/ImportStmt.py | nanshuiyu/pytools | 9f9271fe8cf564b4f94e9456d400f4306ea77c23 | [
"Apache-2.0"
] | null | null | null | Python/Tests/TestData/Grammar/ImportStmt.py | nanshuiyu/pytools | 9f9271fe8cf564b4f94e9456d400f4306ea77c23 | [
"Apache-2.0"
] | null | null | null | import sys
import sys, fob
import sys as oar
import sys as oar, fob as baz
import sys.fob
import sys.fob as oar | 19.5 | 30 | 0.735043 |
a3f38d52523ac75c38247f1a9c63ea51abd899ca | 495 | py | Python | stuff/accum.py | Code-JD/pytest-tutorial | c142358cb7571d65ca8844bc91d9b921c0868a50 | [
"MIT"
] | null | null | null | stuff/accum.py | Code-JD/pytest-tutorial | c142358cb7571d65ca8844bc91d9b921c0868a50 | [
"MIT"
] | null | null | null | stuff/accum.py | Code-JD/pytest-tutorial | c142358cb7571d65ca8844bc91d9b921c0868a50 | [
"MIT"
] | null | null | null | """
This module contains a basic accumulator class.
It's purpose is to show how to use the pytest framework for testing classes.
"""
# --------------------------------------------------------------------------------------
# Class: Accumulator
# -----------------------------------------------------------------------... | 23.571429 | 89 | 0.452525 |
90517269f2ea344544ac093e3b22d6e2181509fc | 1,576 | py | Python | src/doc/hu/a_tour_of_sage/conf.py | LaisRast/sage | 5fb2a6ea44400e469caee82748cf863ca0c5f724 | [
"BSL-1.0"
] | null | null | null | src/doc/hu/a_tour_of_sage/conf.py | LaisRast/sage | 5fb2a6ea44400e469caee82748cf863ca0c5f724 | [
"BSL-1.0"
] | null | null | null | src/doc/hu/a_tour_of_sage/conf.py | LaisRast/sage | 5fb2a6ea44400e469caee82748cf863ca0c5f724 | [
"BSL-1.0"
] | null | null | null | # nodoctest
# Numerical Sage documentation build configuration file, created by
# sphinx-quickstart on Sat Dec 6 11:08:04 2008.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# The contents of this file are pickled, so don't put values in the
# namespace that aren't pickleable (m... | 35.022222 | 81 | 0.752538 |
2ec2bb9a4b8d4b302e48987115ab8849d70b8179 | 524 | py | Python | simio/app/default_config.py | RB387/simio | f799a08b0dc8871d6fc5eebe4e8635881721b511 | [
"Apache-2.0"
] | null | null | null | simio/app/default_config.py | RB387/simio | f799a08b0dc8871d6fc5eebe4e8635881721b511 | [
"Apache-2.0"
] | null | null | null | simio/app/default_config.py | RB387/simio | f799a08b0dc8871d6fc5eebe4e8635881721b511 | [
"Apache-2.0"
] | null | null | null | import os
from typing import Dict, Any
from tzlocal import get_localzone
from simio.app.config_names import AppConfig
def get_default_config() -> Dict[Any, Any]:
return {
AppConfig: {
AppConfig.version: "0.1.0",
AppConfig.autogen_swagger: True,
AppConfig.enable_swagge... | 24.952381 | 73 | 0.597328 |
4d49c8018f69f35b0b044495ee4aaaa079fdcf56 | 4,677 | py | Python | spider/adt/course/__init__.py | UAws/myadelaide-timetable-synchronizer | 8cee9c895a7916cd035785cd2fa6f0a3a3d2235d | [
"MIT"
] | 6 | 2022-02-25T06:59:06.000Z | 2022-02-27T09:29:32.000Z | spider/adt/course/__init__.py | UAws/myadelaide-timetable-synchronizer | 8cee9c895a7916cd035785cd2fa6f0a3a3d2235d | [
"MIT"
] | null | null | null | spider/adt/course/__init__.py | UAws/myadelaide-timetable-synchronizer | 8cee9c895a7916cd035785cd2fa6f0a3a3d2235d | [
"MIT"
] | 2 | 2022-02-25T07:52:57.000Z | 2022-02-28T10:27:43.000Z | # Code generated by jtd-codegen for Python v0.3.1
import re
from dataclasses import dataclass
from datetime import datetime, timedelta, timezone
from typing import Any, Dict, Optional, Union, get_args, get_origin
@dataclass
class Course:
a_emplid: 'str'
a_strm: 'str'
b_catalog_nbr: 'str'
b_crse_id: '... | 36.826772 | 110 | 0.613427 |
7c5665002886b8c71a2ccf29a190d5e6b701e0dc | 519 | py | Python | plotly/validators/scattergl/marker/_cauto.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scattergl/marker/_cauto.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scattergl/marker/_cauto.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class CautoValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name='cauto', parent_name='scattergl.marker', **kwargs
):
super(CautoValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pare... | 30.529412 | 75 | 0.628131 |
6d3a204cf412d5728b7ddb6fcfa2e9600054a9f4 | 2,503 | py | Python | tests/unit_tests/test_engine.py | RussTheAerialist/render_engine | 426184c652bf5d2f812656f195e8b89827af33ff | [
"MIT"
] | null | null | null | tests/unit_tests/test_engine.py | RussTheAerialist/render_engine | 426184c652bf5d2f812656f195e8b89827af33ff | [
"MIT"
] | null | null | null | tests/unit_tests/test_engine.py | RussTheAerialist/render_engine | 426184c652bf5d2f812656f195e8b89827af33ff | [
"MIT"
] | null | null | null | from render_engine import Engine
import pytest
@pytest.fixture()
def base_engine(site_url):
return Engine(site_url=site_url, routes=[])
def test_engine_has_internal_env():
"""This ensures that each Engine instance has its own environment.
This allows you have different settings apply to each engine"""
... | 33.373333 | 79 | 0.717139 |
ea9723b6dc64cf04b92b7d511576ca8f7cd2d928 | 3,285 | py | Python | openaerostruct/tests/test_v1_struct_analysis.py | mdolab/OpenAeroStruct | a10a673ec0c0fd7e4c41b8ec39b856606ce7ec78 | [
"Apache-2.0"
] | 114 | 2017-04-06T15:24:19.000Z | 2022-03-21T09:57:43.000Z | openaerostruct/tests/test_v1_struct_analysis.py | mdolab/OpenAeroStruct | a10a673ec0c0fd7e4c41b8ec39b856606ce7ec78 | [
"Apache-2.0"
] | 322 | 2017-04-07T01:40:03.000Z | 2022-03-17T21:50:52.000Z | openaerostruct/tests/test_v1_struct_analysis.py | mdolab/OpenAeroStruct | a10a673ec0c0fd7e4c41b8ec39b856606ce7ec78 | [
"Apache-2.0"
] | 83 | 2017-04-06T16:53:26.000Z | 2022-03-19T19:34:05.000Z | from openmdao.utils.assert_utils import assert_rel_error
import unittest
import numpy as np
from openaerostruct.geometry.utils import generate_mesh
from openaerostruct.structures.struct_groups import SpatialBeamAlone
import openmdao.api as om
class Test(unittest.TestCase):
def test(self):
# Create a di... | 36.098901 | 117 | 0.61035 |
ed8a30afd83b2830831ae80c48cad45569a0b4e3 | 18,014 | py | Python | ibis/backends/bigquery/tests/test_compiler.py | ZeroCool2u/ibis | 19d152fa97f828ad70e4cd46f3cd7d2bae27eb64 | [
"Apache-2.0"
] | null | null | null | ibis/backends/bigquery/tests/test_compiler.py | ZeroCool2u/ibis | 19d152fa97f828ad70e4cd46f3cd7d2bae27eb64 | [
"Apache-2.0"
] | null | null | null | ibis/backends/bigquery/tests/test_compiler.py | ZeroCool2u/ibis | 19d152fa97f828ad70e4cd46f3cd7d2bae27eb64 | [
"Apache-2.0"
] | null | null | null | import datetime
import pandas as pd
import pytest
import ibis
import ibis.backends.bigquery as bq
import ibis.expr.datatypes as dt
import ibis.expr.operations as ops
from ibis.expr.types import TableExpr
pytestmark = pytest.mark.bigquery
pytest.importorskip('google.cloud.bigquery')
def test_timestamp_accepts_date_... | 31.112263 | 143 | 0.61974 |
1fa252b38d0f2b644f587058098d8d7f7a3a4621 | 3,668 | py | Python | nipy/modalities/fmri/tests/test_hrf.py | bpinsard/nipy | d49e8292adad6619e3dac710752131b567efe90e | [
"BSD-3-Clause"
] | 236 | 2015-01-09T21:28:37.000Z | 2022-03-27T11:51:58.000Z | nipy/modalities/fmri/tests/test_hrf.py | bpinsard/nipy | d49e8292adad6619e3dac710752131b567efe90e | [
"BSD-3-Clause"
] | 171 | 2015-03-23T00:31:43.000Z | 2021-11-22T12:43:00.000Z | nipy/modalities/fmri/tests/test_hrf.py | bpinsard/nipy | d49e8292adad6619e3dac710752131b567efe90e | [
"BSD-3-Clause"
] | 94 | 2015-02-01T12:39:47.000Z | 2022-01-27T06:38:19.000Z | """ Testing hrf module
"""
from __future__ import absolute_import
from os.path import dirname, join as pjoin
import numpy as np
from scipy.stats import gamma
import scipy.io as sio
from ..hrf import (
gamma_params,
gamma_expr,
lambdify_t,
spm_hrf_compat,
spmt,
dspmt,
ddspmt,
)
from ... | 32.75 | 80 | 0.629226 |
b68a37d555aa43c8c53daa57d8e7fb68a6a8011f | 1,013 | py | Python | tensorflow_datasets/text/drop/drop_test.py | jvishnuvardhan/datasets | b8e38187058f1221e67c6291b3f29385ebb35fa2 | [
"Apache-2.0"
] | 3,380 | 2018-09-11T05:03:31.000Z | 2022-03-31T20:04:57.000Z | tensorflow_datasets/text/drop/drop_test.py | jvishnuvardhan/datasets | b8e38187058f1221e67c6291b3f29385ebb35fa2 | [
"Apache-2.0"
] | 3,142 | 2018-09-14T10:09:00.000Z | 2022-03-31T18:25:44.000Z | tensorflow_datasets/text/drop/drop_test.py | jvishnuvardhan/datasets | b8e38187058f1221e67c6291b3f29385ebb35fa2 | [
"Apache-2.0"
] | 1,438 | 2018-09-16T13:58:22.000Z | 2022-03-31T11:19:54.000Z | # coding=utf-8
# Copyright 2021 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 30.69697 | 74 | 0.739388 |
4c93329531fdacea25097a01ff6c249044f1d1e4 | 17,482 | py | Python | tests/unit/fake_api.py | kennylajara/docker-py | a48a5a9647761406d66e8271f19fab7fa0c5f582 | [
"Apache-2.0"
] | 5,611 | 2015-01-02T16:46:16.000Z | 2022-03-31T21:49:58.000Z | tests/unit/fake_api.py | sdrees/docker-py | 8595cca8186b5d53c04ef71a1a3db86b7c53b012 | [
"Apache-2.0"
] | 2,176 | 2015-01-01T00:57:56.000Z | 2022-03-31T13:21:54.000Z | tests/unit/fake_api.py | sdrees/docker-py | 8595cca8186b5d53c04ef71a1a3db86b7c53b012 | [
"Apache-2.0"
] | 1,774 | 2015-01-05T12:49:03.000Z | 2022-03-29T13:27:47.000Z | from docker import constants
from . import fake_stat
CURRENT_VERSION = f'v{constants.DEFAULT_DOCKER_API_VERSION}'
FAKE_CONTAINER_ID = '3cc2351ab11b'
FAKE_IMAGE_ID = 'e9aa60c60128'
FAKE_EXEC_ID = 'd5d177f121dc'
FAKE_NETWORK_ID = '33fb6a3462b8'
FAKE_IMAGE_NAME = 'test_image'
FAKE_TARBALL_PATH = '/path/to/tarball'
FAKE... | 26.608828 | 77 | 0.604679 |
eda61c698589c9af040eb324c7b8c550e70f735a | 20,399 | py | Python | frappe/desk/query_report.py | kevingdc/frappe | 985bf3042e8277ef8ca93065b89f12a8c097f1a8 | [
"MIT"
] | null | null | null | frappe/desk/query_report.py | kevingdc/frappe | 985bf3042e8277ef8ca93065b89f12a8c097f1a8 | [
"MIT"
] | null | null | null | frappe/desk/query_report.py | kevingdc/frappe | 985bf3042e8277ef8ca93065b89f12a8c097f1a8 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import os, json
from frappe import _
from frappe.modules import scrub, get_module_path
from frappe.utils import flt, cint, get_html_format, get_url_to_form, gzip_d... | 29.866764 | 126 | 0.722241 |
0d20ce57d44c445571bf38474e19d410ced24aa0 | 1,902 | py | Python | lessons/cb2logger.py | chrisb13/CFDPython | 0b408ad8f1691b1f2b2785cf50898e713c3326d8 | [
"CC-BY-3.0"
] | null | null | null | lessons/cb2logger.py | chrisb13/CFDPython | 0b408ad8f1691b1f2b2785cf50898e713c3326d8 | [
"CC-BY-3.0"
] | null | null | null | lessons/cb2logger.py | chrisb13/CFDPython | 0b408ad8f1691b1f2b2785cf50898e713c3326d8 | [
"CC-BY-3.0"
] | null | null | null |
#python logging
import logging as lg
import time
import subprocess
import sys
import os
class LogStart(object):
"class that sets up a logger"
def __init__(self, fname,fout=False,level='debug'):
if level=='debug':
lvl=lg.DEBUG
elif level=='info':
lvl=lg.INFO
elif level=... | 34.581818 | 178 | 0.578864 |
881c614238a33e27963045472ebe29ab8d651ab0 | 46,549 | py | Python | src/sage/geometry/polyhedron/parent.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | null | null | null | src/sage/geometry/polyhedron/parent.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | null | null | null | src/sage/geometry/polyhedron/parent.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | null | null | null | r"""
Parents for Polyhedra
"""
#*****************************************************************************
# Copyright (C) 2014 Volker Braun <vbraun.name@gmail.com>
#
# Distributed under the terms of the GNU General Public License (GPL)
# http://www.gnu.org/licenses/
#***********************... | 37.328789 | 142 | 0.588154 |
9c63375754887301035959316ae62cf9223a55c4 | 12,241 | py | Python | tests/test_stac.py | stactools-packages/stactools-goes | 8d81c9644c02d3c79ac369228d659d065e0e6889 | [
"Apache-2.0"
] | 5 | 2021-07-06T21:48:11.000Z | 2021-11-09T15:57:45.000Z | tests/test_stac.py | stactools-packages/stactools-goes | 8d81c9644c02d3c79ac369228d659d065e0e6889 | [
"Apache-2.0"
] | 5 | 2021-06-15T16:16:51.000Z | 2021-09-07T14:44:57.000Z | tests/test_stac.py | stactools-packages/stactools-goes | 8d81c9644c02d3c79ac369228d659d065e0e6889 | [
"Apache-2.0"
] | null | null | null | import dataclasses
from datetime import datetime, timezone
from tests.test_mpc import MicrosoftPCData
from typing import Any, Callable, List
import math
import os.path
from tempfile import TemporaryDirectory
import unittest
from shapely.geometry import shape, box
import planetary_computer
from pystac import MediaType
... | 40.39934 | 92 | 0.632546 |
1b2d126675abff61344646cc5d62bbd7fd55fb6d | 8,921 | py | Python | functions/JD_multitaper.py | isgiddy/giddy-2020-roammiz | ffc710acee5342f64e8cb378e97114648c811f36 | [
"CC0-1.0"
] | 4 | 2020-09-21T11:27:48.000Z | 2022-02-21T11:39:08.000Z | functions/JD_multitaper.py | isgiddy/giddy-2020-roammiz | ffc710acee5342f64e8cb378e97114648c811f36 | [
"CC0-1.0"
] | 1 | 2021-01-04T16:16:45.000Z | 2021-01-04T16:16:45.000Z | functions/JD_multitaper.py | isgiddy/giddy-2020-roammiz | ffc710acee5342f64e8cb378e97114648c811f36 | [
"CC0-1.0"
] | null | null | null | from scipy.io.matlab import mio
import numpy as np
import spectrum as sp
from scipy import stats
def pmtmPH(x,dt=1.,nw=3,nfft=None):
"""
function [P,s,ci] = pmtmPH(x,dt,nw,qplot,nfft);
Computes the power spectrum using the multi-taper method with adaptive weighting.
Inputs:
x - Inp... | 32.322464 | 96 | 0.589844 |
fb57d4f3cf3c7da4868f811d972bbda46f3dcd2b | 4,266 | py | Python | getFCInterfaceStats.py | louisjia/dcnm-rest-sample | b3f589061eb33035337175e1fc527122c7cda174 | [
"BSD-3-Clause"
] | 7 | 2018-11-05T21:19:22.000Z | 2022-01-05T11:05:43.000Z | getFCInterfaceStats.py | louisjia/dcnm-rest-sample | b3f589061eb33035337175e1fc527122c7cda174 | [
"BSD-3-Clause"
] | 3 | 2018-08-31T21:49:42.000Z | 2020-08-08T00:47:06.000Z | getFCInterfaceStats.py | louisjia/dcnm-rest-sample | b3f589061eb33035337175e1fc527122c7cda174 | [
"BSD-3-Clause"
] | 9 | 2018-08-20T21:05:41.000Z | 2021-05-24T09:30:37.000Z | import http.client
import ssl
import base64
import string
import json
__author__ = "Louis Jia"
__copyright__ = "Copyright (C) 2018 Cisco System"
def getRestToken(username, password, serverip):
ssl._create_default_https_context = ssl._create_unverified_context
##replace server ip address here
conn = http.client... | 25.854545 | 157 | 0.691749 |
dc825e72aed877bc8105abf51201f204476dc0ab | 4,997 | py | Python | picore/src/pir2/display/DotDisplay.py | subhagho/r2d3.142 | 71f26b7da4ff2384ee1aa9727ea3d40cbcdf3718 | [
"Apache-2.0"
] | null | null | null | picore/src/pir2/display/DotDisplay.py | subhagho/r2d3.142 | 71f26b7da4ff2384ee1aa9727ea3d40cbcdf3718 | [
"Apache-2.0"
] | null | null | null | picore/src/pir2/display/DotDisplay.py | subhagho/r2d3.142 | 71f26b7da4ff2384ee1aa9727ea3d40cbcdf3718 | [
"Apache-2.0"
] | null | null | null | import pir2.common as common
import pir2.common.Logger as Logger
import pir2.display as display
import smbus
from time import sleep
# i2c bus (0 -- original Pi, 1 -- Rev 2 Pi)
I2CBUS = 1
# LCD Address
ADDRESS = 0x27
class DisplayI2CDot:
def __init__(self, addr, port=I2CBUS):
self.addr = addr
se... | 27.607735 | 107 | 0.663798 |
8633a5b474c9c3cc2ae2149506f5cb1f70ab1d91 | 10,284 | py | Python | whatshap/merge.py | panguangze/whatshap | ab398340d6187b427fb067dd98eb157d779e9820 | [
"MIT"
] | null | null | null | whatshap/merge.py | panguangze/whatshap | ab398340d6187b427fb067dd98eb157d779e9820 | [
"MIT"
] | null | null | null | whatshap/merge.py | panguangze/whatshap | ab398340d6187b427fb067dd98eb157d779e9820 | [
"MIT"
] | null | null | null | import logging
from abc import ABC, abstractmethod
from typing import Dict
from math import log
from networkx import (
Graph,
number_of_nodes,
number_of_edges,
connected_components,
node_connected_component,
shortest_path,
)
from whatshap.core import Read, ReadSet
logger = logging.getLogger(_... | 37.396364 | 95 | 0.540548 |
97c53cf87738e364e26d003e76af1901deb93143 | 1,090 | py | Python | util/reorder_samples.py | J-Moravec/pairtree | 91cbba628b78aea31034efb080976fdb47d83976 | [
"MIT"
] | null | null | null | util/reorder_samples.py | J-Moravec/pairtree | 91cbba628b78aea31034efb080976fdb47d83976 | [
"MIT"
] | null | null | null | util/reorder_samples.py | J-Moravec/pairtree | 91cbba628b78aea31034efb080976fdb47d83976 | [
"MIT"
] | null | null | null | import argparse
import json
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib'))
import inputparser
def _process(ssmfn, jsonfn, order):
params = inputparser.load_params(jsonfn)
ssms = inputparser.load_ssms(ssmfn)
order = [int(idx) for idx in order.split(',')]
N = len(par... | 26.585366 | 73 | 0.687156 |
3f8bb88e8461b1bb2ab7c594b0103a12f4165c11 | 346 | py | Python | Tests/test_discord_embed_call.py | MichaelCduBois/whpy | 8964e97cee00d3bd8f38086f640d13f0fe95068b | [
"MIT"
] | null | null | null | Tests/test_discord_embed_call.py | MichaelCduBois/whpy | 8964e97cee00d3bd8f38086f640d13f0fe95068b | [
"MIT"
] | 1 | 2019-10-02T02:06:22.000Z | 2019-10-02T04:17:10.000Z | Tests/test_discord_embed_call.py | MichaelCduBois/whpy | 8964e97cee00d3bd8f38086f640d13f0fe95068b | [
"MIT"
] | 1 | 2019-10-02T03:30:17.000Z | 2019-10-02T03:30:17.000Z | from dotenv import load_dotenv
import os
import pytest
from WhPy import discord
# Load Environment Variables
load_dotenv("./env/.env")
# Test Variables
channel_id = os.getenv("WEBHOOK_CHANNEL_ID")
token = os.getenv("WEBHOOK_TOKEN")
url = os.getenv("WEBHOOK_URL")
def test_():
"""
Scenario:
When
... | 15.043478 | 44 | 0.676301 |
73fb4ed3457b6fbc64b1f1ad6e2bda1fad6b513f | 528 | py | Python | faculdade/atv3.py | Tkl02/Aula-python | b260b9bcc088974c9a7c05b61f93bde2e06f65ac | [
"MIT"
] | null | null | null | faculdade/atv3.py | Tkl02/Aula-python | b260b9bcc088974c9a7c05b61f93bde2e06f65ac | [
"MIT"
] | null | null | null | faculdade/atv3.py | Tkl02/Aula-python | b260b9bcc088974c9a7c05b61f93bde2e06f65ac | [
"MIT"
] | null | null | null | from gtts import gTTS #bibliotecas
from playsound import playsound
text = str(input("qual a frase? ")) #variavel para selecionar texto
# idioma = str(input("qual idioma")) #variavel para selecionar idioma
idioma = 'pt-br'
audio = 'meusom.mp3' #atribuindo nome para o audio
convers = gTTS ( #conv... | 40.615385 | 71 | 0.6875 |
4fa5fe67eb407b4ee33227f2a54836089316e5dd | 1,264 | py | Python | testproj/users/migrations/0002_setup_oauth2_apps.py | johnny-prnd/drf-yasg | 5a943250e62ac1ecab1faa3155c5f87ab68367a3 | [
"BSD-3-Clause"
] | 1 | 2019-10-31T12:13:21.000Z | 2019-10-31T12:13:21.000Z | testproj/users/migrations/0002_setup_oauth2_apps.py | johnny-prnd/drf-yasg | 5a943250e62ac1ecab1faa3155c5f87ab68367a3 | [
"BSD-3-Clause"
] | 4 | 2021-06-28T20:54:50.000Z | 2022-03-29T18:26:22.000Z | testproj/users/migrations/0002_setup_oauth2_apps.py | johnny-prnd/drf-yasg | 5a943250e62ac1ecab1faa3155c5f87ab68367a3 | [
"BSD-3-Clause"
] | 1 | 2020-05-29T08:55:51.000Z | 2020-05-29T08:55:51.000Z | # Generated by Django 2.1.3 on 2018-12-19 07:57
from django.conf import settings
from django.db import migrations
def add_oauth_apps(apps, schema_editor):
# We can't import the Person model directly as it may be a newer
# version than this migration expects. We use the historical version.
User = apps.get_... | 31.6 | 83 | 0.670095 |
80fd410266ea0b924ac8582866322a4360184277 | 60,488 | py | Python | tests/pipeline/test_engine.py | fwagner-quantopian/zipline | 6f72d19554d3b1a05ae3b1451f3e805f3ee52360 | [
"Apache-2.0"
] | 1 | 2019-12-19T14:58:20.000Z | 2019-12-19T14:58:20.000Z | tests/pipeline/test_engine.py | fwagner-quantopian/zipline | 6f72d19554d3b1a05ae3b1451f3e805f3ee52360 | [
"Apache-2.0"
] | 1 | 2021-06-02T00:56:13.000Z | 2021-06-02T00:56:13.000Z | tests/pipeline/test_engine.py | fwagner-quantopian/zipline | 6f72d19554d3b1a05ae3b1451f3e805f3ee52360 | [
"Apache-2.0"
] | 1 | 2020-04-18T18:27:04.000Z | 2020-04-18T18:27:04.000Z | """
Tests for SimplePipelineEngine
"""
from __future__ import division
from collections import OrderedDict
from itertools import product
from operator import add, sub
from unittest import skipIf
from nose_parameterized import parameterized
import numpy as np
from numpy import (
arange,
array,
concatenate,
... | 36.047676 | 79 | 0.587935 |
47e856cc74a3139954ef2027c4a834b7de4a9269 | 9,264 | py | Python | LammpsSearchFuncs.py | m-bone/Bond_React_Python | e2f9fe5473e5b15d32484ccf2be6f6820a60b53f | [
"MIT"
] | 1 | 2021-02-19T06:17:40.000Z | 2021-02-19T06:17:40.000Z | LammpsSearchFuncs.py | m-bone/Bond_React_Python | e2f9fe5473e5b15d32484ccf2be6f6820a60b53f | [
"MIT"
] | null | null | null | LammpsSearchFuncs.py | m-bone/Bond_React_Python | e2f9fe5473e5b15d32484ccf2be6f6820a60b53f | [
"MIT"
] | null | null | null | ##############################################################################
# Developed by: Matthew Bone
# Last Updated: 30/07/2021
# Updated by: Matthew Bone
#
# Contact Details:
# Bristol Composites Institute (BCI)
# Department of Aerospace Engineering - University of Bristol
# Queen's Building - University Walk
#... | 38.6 | 189 | 0.659326 |
ef358d7c3c8b170a49199da66e792e267dcfe238 | 2,623 | py | Python | code/numpy/numpy-tutorial-master/scripts/game-of-life-big.py | vicb1/python-reference | 8bbb5b14ad0781cbb4b16e260ae1dc772acd6063 | [
"MIT"
] | null | null | null | code/numpy/numpy-tutorial-master/scripts/game-of-life-big.py | vicb1/python-reference | 8bbb5b14ad0781cbb4b16e260ae1dc772acd6063 | [
"MIT"
] | null | null | null | code/numpy/numpy-tutorial-master/scripts/game-of-life-big.py | vicb1/python-reference | 8bbb5b14ad0781cbb4b16e260ae1dc772acd6063 | [
"MIT"
] | null | null | null | # -----------------------------------------------------------------------------
# Copyright INRIA
# Contributors: Nicolas P. Rougier (Nicolas.Rougier@inria.fr)
#
# DANA is a computing framework for the simulation of distributed,
# asynchronous, numerical and adaptive models.
#
# This software is governed by the CeCILL ... | 43.716667 | 79 | 0.662981 |
2665f9732b1aa95690da2df0c0cd27ea0b1643c6 | 6,377 | py | Python | lib/lambdascrapers/sources_ lambdascrapers/en/NotWorking_11-9/allucen.py | proxium/script.module.lambdascrapers | f96ad4c7c44c011c9d0007a83edde8c4797e0e2f | [
"Beerware"
] | 11 | 2018-12-21T22:52:37.000Z | 2021-09-02T02:13:50.000Z | lib/lambdascrapers/sources_ lambdascrapers/en/NotWorking_11-9/allucen.py | proxium/script.module.lambdascrapers | f96ad4c7c44c011c9d0007a83edde8c4797e0e2f | [
"Beerware"
] | null | null | null | lib/lambdascrapers/sources_ lambdascrapers/en/NotWorking_11-9/allucen.py | proxium/script.module.lambdascrapers | f96ad4c7c44c011c9d0007a83edde8c4797e0e2f | [
"Beerware"
] | 1 | 2022-01-07T18:30:52.000Z | 2022-01-07T18:30:52.000Z | # -*- coding: utf-8 -*-
'''
allucen scraper for Exodus forks.
Nov 9 2018 - Checked
Updated and refactored by someone.
Originally created by others.
'''
import re,urllib,urlparse,json
from resources.lib.modules import client
from resources.lib.modules import control
from resources.lib.modules import sou... | 38.648485 | 183 | 0.514192 |
6373ea078f838fd3a48f55156d5c4c0e8e4ba8d0 | 351 | py | Python | ascii-decryption.py | leaen/Codeeval-solutions | fa83cb4fba3e56f79c0a6b00361c18cd3092c3f0 | [
"MIT"
] | null | null | null | ascii-decryption.py | leaen/Codeeval-solutions | fa83cb4fba3e56f79c0a6b00361c18cd3092c3f0 | [
"MIT"
] | null | null | null | ascii-decryption.py | leaen/Codeeval-solutions | fa83cb4fba3e56f79c0a6b00361c18cd3092c3f0 | [
"MIT"
] | null | null | null | import sys
def decrypt(phrase):
sentence = list(map(int, phrase.split()[4:]))
offset = 32 - min(sentence)
return ''.join(map(lambda x: chr(x + offset), sentence))
def main():
with open(sys.argv[1]) as input_file:
for phrase in input_file:
print(decrypt(phrase.strip()))
if __na... | 23.4 | 64 | 0.606838 |
9df784d98fe4caf0508c11ae291506369ccbbfa3 | 1,222 | py | Python | predict.py | celestinhermez/pytorch_image_classifier | e481b200db7eb769c5f553ad941b2f7129798dde | [
"MIT"
] | null | null | null | predict.py | celestinhermez/pytorch_image_classifier | e481b200db7eb769c5f553ad941b2f7129798dde | [
"MIT"
] | null | null | null | predict.py | celestinhermez/pytorch_image_classifier | e481b200db7eb769c5f553ad941b2f7129798dde | [
"MIT"
] | null | null | null | # We start by importing all the modules we will need, as well as the helper document with all our functions
import argparse
import torch
import json
import numpy as np
from torch import nn
from torch import optim
import torch.nn.functional as F
import os
from torchvision import datasets, transforms, models
from collect... | 31.333333 | 113 | 0.689034 |
716027fd6af3292e68d3f3796c953b266afc0386 | 1,972 | py | Python | games_seeker/commands/builder.py | sgg10/games_seeker | c9b7723586e79baffb5dc9f6ddb88f541da416a7 | [
"MIT"
] | null | null | null | games_seeker/commands/builder.py | sgg10/games_seeker | c9b7723586e79baffb5dc9f6ddb88f541da416a7 | [
"MIT"
] | null | null | null | games_seeker/commands/builder.py | sgg10/games_seeker | c9b7723586e79baffb5dc9f6ddb88f541da416a7 | [
"MIT"
] | null | null | null | from datetime import datetime
import click
import numpy as np
from docxtpl import DocxTemplate
from games_seeker.pc_builder.genetic_search import GeneticSearch
def generate_report(context, budget):
template = DocxTemplate("templates/template_builder.docx")
template.render(context)
date = dat... | 34.596491 | 117 | 0.586207 |
d988c3da7191dcbe0b2bd3f4321cb295e4dcc5c4 | 206 | py | Python | server/src/resources/__init__.py | Rubilmax/netflux | 9e79063b81e3dc78055fc683c230de511827f030 | [
"MIT"
] | 2 | 2019-06-17T08:28:03.000Z | 2019-06-17T08:28:32.000Z | server/src/resources/__init__.py | Rubilmax/netflux | 9e79063b81e3dc78055fc683c230de511827f030 | [
"MIT"
] | 3 | 2020-09-05T00:54:20.000Z | 2021-05-07T15:34:58.000Z | server/src/resources/__init__.py | Rubilmax/netflux | 9e79063b81e3dc78055fc683c230de511827f030 | [
"MIT"
] | null | null | null | from .mark import MarkResource, MovieMeanResource
from .user import UserResource, UsersResource, UserCreateResource, UserLoginResource
from .movie import MovieResource, MoviesResource, MovieCreateResource
| 41.2 | 84 | 0.864078 |
034453d02366d673db5308c6e672fdd87bda4dd1 | 5,007 | py | Python | ppo-comet.py | ZombaSY/minimalRL | be08d993c699a11603328db92c569f12f92de17a | [
"MIT"
] | null | null | null | ppo-comet.py | ZombaSY/minimalRL | be08d993c699a11603328db92c569f12f92de17a | [
"MIT"
] | null | null | null | ppo-comet.py | ZombaSY/minimalRL | be08d993c699a11603328db92c569f12f92de17a | [
"MIT"
] | null | null | null | import gym
from comet_ml import Experiment
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from utils.log import Log
from torch.distributions import Categorical
from utils.utils import save_model
import random
import argparse
parser = argparse.ArgumentParser()
parser.add... | 32.512987 | 110 | 0.561015 |
2da2341a37af7434871359b00ac4b30e4d679a6b | 1,564 | py | Python | tests/app/dao/test_speakers_dao.py | kentsanggds/api | 651cdf7d496690722d6a4f5b51f04f4be97899d4 | [
"MIT"
] | 1 | 2018-10-12T15:04:31.000Z | 2018-10-12T15:04:31.000Z | tests/app/dao/test_speakers_dao.py | kentsanggds/api | 651cdf7d496690722d6a4f5b51f04f4be97899d4 | [
"MIT"
] | 169 | 2017-11-07T00:45:25.000Z | 2022-03-12T00:08:59.000Z | tests/app/dao/test_speakers_dao.py | kentsanggds/api | 651cdf7d496690722d6a4f5b51f04f4be97899d4 | [
"MIT"
] | 1 | 2019-08-15T14:51:31.000Z | 2019-08-15T14:51:31.000Z | import json
from app.dao.speakers_dao import (
dao_create_speaker,
dao_update_speaker,
dao_get_speakers,
dao_get_speaker_by_id,
dao_get_speaker_by_name
)
from app.models import Speaker
from tests.db import create_speaker
class WhenUsingSpeakersDAO(object):
def it_creates_a_speaker(self, db)... | 31.918367 | 102 | 0.7289 |
384b7b8350652e8aba3787e62245e667735132a3 | 51,112 | py | Python | tests/snuba/api/endpoints/test_organization_events_stats.py | vaniot-s/sentry | 5c1accadebfaf8baf6863251c05b38ea979ee1c7 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/api/endpoints/test_organization_events_stats.py | vaniot-s/sentry | 5c1accadebfaf8baf6863251c05b38ea979ee1c7 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/api/endpoints/test_organization_events_stats.py | vaniot-s/sentry | 5c1accadebfaf8baf6863251c05b38ea979ee1c7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import mock
import six
import uuid
from pytz import utc
from datetime import timedelta
from django.core.urlresolvers import reverse
from sentry.testutils import APITestCase, SnubaTestCase
from sentry.testutils.helpers.datetime import iso_format, before_now
from sentry.utils.co... | 38.001487 | 116 | 0.475231 |
934fb0af8fcb0b3fd5066bea2fa7219f7e169276 | 3,481 | py | Python | bindings/python/ensmallen/datasets/string/streptomonosporaalba.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-09-10T18:31:58.000Z | 2022-03-24T04:28:04.000Z | bindings/python/ensmallen/datasets/string/streptomonosporaalba.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/streptomonosporaalba.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Streptomonospora alba.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein ... | 33.152381 | 223 | 0.678541 |
c17a32157f1dc35b9a2815402c78470a37950a2c | 3,820 | py | Python | tests/unit/test_deprecations.py | Demmenie/praw | 6d2dcaf8a53abc062dac3819545d5c08044605c8 | [
"BSD-2-Clause"
] | null | null | null | tests/unit/test_deprecations.py | Demmenie/praw | 6d2dcaf8a53abc062dac3819545d5c08044605c8 | [
"BSD-2-Clause"
] | null | null | null | tests/unit/test_deprecations.py | Demmenie/praw | 6d2dcaf8a53abc062dac3819545d5c08044605c8 | [
"BSD-2-Clause"
] | null | null | null | """This file should be updated as files/classes/functions are deprecated."""
import pytest
from praw import Reddit
from praw.exceptions import APIException, WebSocketException
from praw.models.reddit.user_subreddit import UserSubreddit
from . import UnitTest
@pytest.mark.filterwarnings("error", category=Deprecatio... | 42.444444 | 334 | 0.652094 |
2b4a8444609a528588c6edf14ab3b01e52bc88c0 | 191 | py | Python | configs/_base_/schedules/schedule_adadelta_8e.py | jeffreykuang/mmocr-1 | b17304edeb493b0a4d7224c23d23b952350d0db5 | [
"Apache-2.0"
] | 206 | 2021-07-30T09:04:08.000Z | 2022-03-22T00:57:44.000Z | configs/_base_/schedules/schedule_adadelta_8e.py | jeffreykuang/mmocr-1 | b17304edeb493b0a4d7224c23d23b952350d0db5 | [
"Apache-2.0"
] | 39 | 2021-08-05T07:16:46.000Z | 2022-03-14T13:23:48.000Z | configs/_base_/schedules/schedule_adadelta_8e.py | jeffreykuang/mmocr-1 | b17304edeb493b0a4d7224c23d23b952350d0db5 | [
"Apache-2.0"
] | 61 | 2021-07-30T07:51:41.000Z | 2022-03-30T14:40:02.000Z | # optimizer
optimizer = dict(type='Adadelta', lr=1.0)
optimizer_config = dict(grad_clip=dict(max_norm=0.5))
# learning policy
lr_config = dict(policy='step', step=[4, 6, 7])
total_epochs = 8
| 27.285714 | 53 | 0.722513 |
af84ef31bd932c47ecf83feae284f7c500bcc8d4 | 6,947 | py | Python | sdk/eventhub/azure-eventhub/azure/eventhub/aio/_eventprocessor/checkpoint_store.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | null | null | null | sdk/eventhub/azure-eventhub/azure/eventhub/aio/_eventprocessor/checkpoint_store.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | null | null | null | sdk/eventhub/azure-eventhub/azure/eventhub/aio/_eventprocessor/checkpoint_store.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 62.026786 | 119 | 0.653807 |
634501a61638daa57e1dee376eaa8929294ef681 | 1,853 | py | Python | cauliflowervest/server/handlers/rekey.py | isabella232/cauliflowervest | d3f52501ebed8b9a392350c8e177bbc602a6a09d | [
"Apache-2.0"
] | 292 | 2015-01-03T02:26:18.000Z | 2022-03-05T22:54:51.000Z | cauliflowervest/server/handlers/rekey.py | google/cauliflowervest | d3f52501ebed8b9a392350c8e177bbc602a6a09d | [
"Apache-2.0"
] | 15 | 2015-01-30T18:48:40.000Z | 2019-06-27T08:47:05.000Z | cauliflowervest/server/handlers/rekey.py | isabella232/cauliflowervest | d3f52501ebed8b9a392350c8e177bbc602a6a09d | [
"Apache-2.0"
] | 61 | 2015-01-24T09:23:58.000Z | 2022-03-08T14:12:14.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 34.962264 | 74 | 0.736643 |
b408e217a0e36e05a5668650cd1993550894fe4a | 1,391 | py | Python | test_get_references.py | mconlon17/vivo-foundation | 202f458bc72fb76c7d89240091c4fb00522cfe3f | [
"BSD-3-Clause"
] | null | null | null | test_get_references.py | mconlon17/vivo-foundation | 202f458bc72fb76c7d89240091c4fb00522cfe3f | [
"BSD-3-Clause"
] | 1 | 2015-04-04T01:38:51.000Z | 2015-04-04T01:38:51.000Z | tools/test_get_references.py | mconlon17/vivo-1.5-improvement | 44d8335eb7bbe518374a53c0e1f9f39014023ee7 | [
"BSD-3-Clause"
] | null | null | null | """
test_get_references.py -- Given a URI, get the references for the URI
Version 0.1 MC 2013-12-27
-- Initial version.
Version 0.2 MC 2014-09-18
-- Update for PEP 8 and Tools 2
"""
__author__ = "Michael Conlon"
__copyright__ = "Copyright 2014, University of Florida"
__license__ = "BSD 3-Clause ... | 25.290909 | 73 | 0.752696 |
046f59272fc71528f238ede7f7f7fa97b24ceaa1 | 567 | py | Python | 04 - Drawing canvas, timers/exercises/timers_circle.py | PableraShow/python-exercises | e1648fd42f3009ec6fb1e2096852b6d399e91d5b | [
"MIT"
] | 8 | 2018-10-01T17:35:57.000Z | 2022-02-01T08:12:12.000Z | 04 - Drawing canvas, timers/exercises/timers_circle.py | PableraShow/python-exercises | e1648fd42f3009ec6fb1e2096852b6d399e91d5b | [
"MIT"
] | null | null | null | 04 - Drawing canvas, timers/exercises/timers_circle.py | PableraShow/python-exercises | e1648fd42f3009ec6fb1e2096852b6d399e91d5b | [
"MIT"
] | 6 | 2018-07-22T19:15:21.000Z | 2022-02-05T07:54:58.000Z | """ Create a circle in the center of the canvas.
Use a timer to increase its radius one pixel every tenth of a second."""
import simplegui
WIDTH = 200
HEIGHT = 200
radius = 1
# Timer handler
def tick():
global radius
radius += 1
# Draw handler
def draw(canvas):
canvas.draw_circle([WIDTH / 2, HEIGH... | 20.25 | 77 | 0.691358 |
199df535d1c7e8a62efce606db7ed3c3e2ccfbda | 393 | py | Python | examples/pyp5js/gallery/sketch_006.py | MarcSkovMadsen/panel-sketch | 518cb177e2e8d1899b58f3a3f4d80d26c82ec760 | [
"MIT"
] | 5 | 2021-04-24T00:41:14.000Z | 2021-08-07T13:07:27.000Z | examples/pyp5js/gallery/sketch_006.py | MarcSkovMadsen/panel-sketch | 518cb177e2e8d1899b58f3a3f4d80d26c82ec760 | [
"MIT"
] | null | null | null | examples/pyp5js/gallery/sketch_006.py | MarcSkovMadsen/panel-sketch | 518cb177e2e8d1899b58f3a3f4d80d26c82ec760 | [
"MIT"
] | null | null | null | from pyp5js import *
r = None
def setup():
global r
createCanvas(900, 900)
r = random(100, 700)
noFill()
def draw():
x, y = 100, 100
rect(x, y, r, r)
def keyPressed():
console.log("Key pressed event")
if key == "n":
global r
r = random(100, 700)
redraw()
... | 12.28125 | 36 | 0.526718 |
b6114b684d44ab312a6246d357fefc8c61abbbe8 | 3,535 | py | Python | fortnitepy/enums.py | Chr0nicT/fortnitepy | a2d0a1a96935164cebe05c46448e36c83739e88b | [
"MIT"
] | null | null | null | fortnitepy/enums.py | Chr0nicT/fortnitepy | a2d0a1a96935164cebe05c46448e36c83739e88b | [
"MIT"
] | null | null | null | fortnitepy/enums.py | Chr0nicT/fortnitepy | a2d0a1a96935164cebe05c46448e36c83739e88b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2019 Terbau
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modif... | 29.705882 | 78 | 0.657709 |
d14a53254abfa8a66b986d00638142715dfe4a60 | 928 | py | Python | isi_sdk_8_2_2/test/test_license_license_tier.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_2/test/test_license_license_tier.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_2/test/test_license_license_tier.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 9
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_2
from i... | 22.634146 | 94 | 0.713362 |
3322a482bd23b5ac8fd7c5dab12b8ef5946ea22b | 828 | py | Python | aalh_iit_jeep_001/download-image-files.py | johndewees/iitmigration | 4dadfbecda719d6e7d60af076a231aedec3c862f | [
"Unlicense"
] | null | null | null | aalh_iit_jeep_001/download-image-files.py | johndewees/iitmigration | 4dadfbecda719d6e7d60af076a231aedec3c862f | [
"Unlicense"
] | null | null | null | aalh_iit_jeep_001/download-image-files.py | johndewees/iitmigration | 4dadfbecda719d6e7d60af076a231aedec3c862f | [
"Unlicense"
] | null | null | null | from openpyxl import load_workbook
import urllib.request
filename = 'aalh_iit_jeep_001.xlsx'
wb = load_workbook(filename)
ws = wb['Metadata Template']
minimumcol = 2
maximumcol = 50
minimumrow = 7
maximumrow = 394
targetcol = 48
iterationrow = 7
for row in ws.iter_rows(min_row=minimumrow, min_col=tar... | 31.846154 | 103 | 0.679952 |
926e78acee713c0d823922ef898fbdf3dccba2e5 | 168,317 | py | Python | tensorflow/python/feature_column/feature_column_test.py | tianhm/tensorflow | e55574f28257bdacd744dcdba86c839e661b1b2a | [
"Apache-2.0"
] | 47 | 2017-03-08T20:58:54.000Z | 2021-06-24T07:07:49.000Z | tensorflow/python/feature_column/feature_column_test.py | genSud/tensorflow | ec8216568d8cd9810004067558041c11a8356685 | [
"Apache-2.0"
] | 1 | 2019-07-11T16:29:54.000Z | 2019-07-11T16:29:54.000Z | tensorflow/python/feature_column/feature_column_test.py | genSud/tensorflow | ec8216568d8cd9810004067558041c11a8356685 | [
"Apache-2.0"
] | 19 | 2017-04-17T01:28:40.000Z | 2020-08-15T13:01:33.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.412245 | 123 | 0.636596 |
529025baf3a389264eb7e663f7f1f9ddce63e5bb | 5,144 | py | Python | lte/gateway/python/magma/subscriberdb/tests/protocols/diameter/server_tests.py | gurrapualt/magma | 13e05788fa6c40293a58b6e03cfb394bb79fa98f | [
"BSD-3-Clause"
] | 2 | 2020-12-09T11:42:30.000Z | 2021-09-26T03:28:33.000Z | lte/gateway/python/magma/subscriberdb/tests/protocols/diameter/server_tests.py | ViniBR01/magma | c1214880e66444b6e73000eb1165ec1a2d110a44 | [
"BSD-3-Clause"
] | 124 | 2020-08-21T06:11:21.000Z | 2022-03-21T05:25:26.000Z | lte/gateway/python/magma/subscriberdb/tests/protocols/diameter/server_tests.py | ViniBR01/magma | c1214880e66444b6e73000eb1165ec1a2d110a44 | [
"BSD-3-Clause"
] | 1 | 2020-09-21T04:25:06.000Z | 2020-09-21T04:25:06.000Z | """
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... | 33.842105 | 75 | 0.620723 |
ec88559db850d90ffa3abb43df6c058243cfa834 | 181 | py | Python | courses/MITx 6.00.1x/lec5/fingers1.py | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | courses/MITx 6.00.1x/lec5/fingers1.py | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | courses/MITx 6.00.1x/lec5/fingers1.py | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | def oddTuples(aTup):
'''
aTup: a tuple
returns: tuple, every other element of aTup.
'''
return aTup[::2]
print(oddTuples(('I', 'am', 'a', 'test', 'tuple')))
| 16.454545 | 51 | 0.546961 |
02fb069ddaad8396561f9f76277209145c80204e | 3,489 | py | Python | SVS/layers/global_mvn.py | ftshijt/SVS_system | 569d0a2f7ae89965bde132e5be538f6a84be471f | [
"Apache-2.0"
] | null | null | null | SVS/layers/global_mvn.py | ftshijt/SVS_system | 569d0a2f7ae89965bde132e5be538f6a84be471f | [
"Apache-2.0"
] | null | null | null | SVS/layers/global_mvn.py | ftshijt/SVS_system | 569d0a2f7ae89965bde132e5be538f6a84be471f | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from typing import Tuple
from typing import Union
import numpy as np
import torch
from typeguard import check_argument_types
from SVS.utils.nets_utils import make_pad_mask
from SVS.layers.abs_normalize import AbsNormalize
from SVS.layers.inversible_interface import InversibleInterface
class... | 29.319328 | 71 | 0.559473 |
5d14113cbc456ed3233ccfcc2d2a2fb5c64014c4 | 3,271 | py | Python | test/behave/steps/timer.py | qfruiti/mycroft-timer | 136c88b2ece119fdf7847b67334b7fb758a82377 | [
"Apache-2.0"
] | null | null | null | test/behave/steps/timer.py | qfruiti/mycroft-timer | 136c88b2ece119fdf7847b67334b7fb758a82377 | [
"Apache-2.0"
] | null | null | null | test/behave/steps/timer.py | qfruiti/mycroft-timer | 136c88b2ece119fdf7847b67334b7fb758a82377 | [
"Apache-2.0"
] | null | null | null | import time
from behave import given, then
from mycroft.audio import wait_while_speaking
from test.integrationtests.voight_kampff import (
emit_utterance,
wait_for_dialog)
@given('a {timer_length} timer is set')
@given('a timer is set for {timer_length}')
def given_set_timer_lenght(context, timer_le... | 32.71 | 74 | 0.633751 |
3bc5501a5c371dacec1128da0ac60374ec6521b1 | 4,433 | py | Python | lib/es/tests/test_commands.py | oremj/olympia | a88cdedd5c4755e8021ea30801974dbc71efa1f8 | [
"BSD-3-Clause"
] | null | null | null | lib/es/tests/test_commands.py | oremj/olympia | a88cdedd5c4755e8021ea30801974dbc71efa1f8 | [
"BSD-3-Clause"
] | null | null | null | lib/es/tests/test_commands.py | oremj/olympia | a88cdedd5c4755e8021ea30801974dbc71efa1f8 | [
"BSD-3-Clause"
] | null | null | null | import StringIO
import threading
from nose.tools import eq_
from django.core import management
from django.db import connection
import amo.search
import amo.tests
from amo.urlresolvers import reverse
from amo.utils import urlparams
from es.management.commands.reindex import call_es
from lib.es.utils import is_reinde... | 36.04065 | 79 | 0.62734 |
60d7e716750e00e4a1a26c2de40fd417bc722e2a | 3,697 | py | Python | SampleOAuth2_UsingPythonClient/settings.py | mmattes/SampleOAuth2_UsingPythonClient | b3aabe7bc8af65fd00cc4908a8473175fc301913 | [
"Apache-2.0"
] | 24 | 2018-10-10T00:19:13.000Z | 2021-10-19T19:12:41.000Z | SampleOAuth2_UsingPythonClient/settings.py | mmattes/SampleOAuth2_UsingPythonClient | b3aabe7bc8af65fd00cc4908a8473175fc301913 | [
"Apache-2.0"
] | 5 | 2018-12-04T08:14:35.000Z | 2021-07-06T08:33:58.000Z | SampleOAuth2_UsingPythonClient/settings.py | mmattes/SampleOAuth2_UsingPythonClient | b3aabe7bc8af65fd00cc4908a8473175fc301913 | [
"Apache-2.0"
] | 16 | 2018-12-10T19:37:32.000Z | 2022-01-23T20:35:50.000Z | """
Django settings for SampleOAuth2_UsingPythonClient project.
Generated by 'django-admin startproject' using Django 1.10.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/set... | 25.853147 | 91 | 0.706789 |
1a0b8628c1ea3fe63abd2edddda48334d3390744 | 2,107 | py | Python | python/dynamic-programming/boolean-paranthesis.py | fossabot/a-grim-loth | a6c8d549289a39ec981c1e0d0c754bb2708dfff9 | [
"MIT"
] | 4 | 2021-06-26T17:18:47.000Z | 2022-02-02T15:02:27.000Z | python/dynamic-programming/boolean-paranthesis.py | fossabot/a-grim-loth | a6c8d549289a39ec981c1e0d0c754bb2708dfff9 | [
"MIT"
] | 8 | 2021-06-29T07:00:32.000Z | 2021-12-01T11:26:22.000Z | python/dynamic-programming/boolean-paranthesis.py | fossabot/a-grim-loth | a6c8d549289a39ec981c1e0d0c754bb2708dfff9 | [
"MIT"
] | 3 | 2021-07-14T14:42:08.000Z | 2021-12-07T19:36:53.000Z | # Returns count of all possible
# parenthesizations that lead to
# result true for a boolean
# expression with symbols like
# true and false and operators
# like &, | and ^ filled between symbols
def countParenth(symb, oper, n):
F = [[0 for i in range(n + 1)] for i in range(n + 1)]
T = [[0 for i in range(n + ... | 29.263889 | 76 | 0.41196 |
de3c65107a7b9847acd2b18b75cf93b8ca67777c | 2,231 | py | Python | discriminator.py | TropComplique/SRFeat-pytorch | 194add4f199116153c500edbd0b7bca97913e995 | [
"MIT"
] | null | null | null | discriminator.py | TropComplique/SRFeat-pytorch | 194add4f199116153c500edbd0b7bca97913e995 | [
"MIT"
] | 1 | 2019-10-16T03:51:06.000Z | 2019-10-16T10:51:21.000Z | discriminator.py | TropComplique/SRFeat-pytorch | 194add4f199116153c500edbd0b7bca97913e995 | [
"MIT"
] | 2 | 2019-12-16T01:29:04.000Z | 2021-09-01T15:13:41.000Z | import torch
import torch.nn as nn
from torch.nn.utils import spectral_norm
USE_SN = True
def normalization(module):
return spectral_norm(module) if USE_SN else module
class Discriminator(nn.Module):
def __init__(self, in_channels, image_size, depth=64):
"""
Arguments:
in_chan... | 27.207317 | 83 | 0.555805 |
5cf7578b8a1f7b8c90af05a59a55c38b2bcf85eb | 347 | py | Python | fileinfo/fileinfo.py | pycabook/fileinfo | 48f23f2bde22483495a3b1cd16a5de346447efb5 | [
"MIT"
] | 3 | 2019-09-28T21:04:53.000Z | 2021-01-06T22:18:27.000Z | fileinfo/fileinfo.py | lgiordani/fileinfo | 6395b4848a196c9e9f790ecbe8c6b20b76cab312 | [
"MIT"
] | 3 | 2020-02-12T12:01:34.000Z | 2020-04-14T20:23:43.000Z | fileinfo/fileinfo.py | pycabook/fileinfo | 48f23f2bde22483495a3b1cd16a5de346447efb5 | [
"MIT"
] | 2 | 2020-03-13T07:40:02.000Z | 2020-03-22T19:25:32.000Z | import os
class FileInfo:
def __init__(self, path):
self.original_path = path
self.filename = os.path.basename(path)
def get_info(self):
return (
self.filename,
self.original_path,
os.path.abspath(self.original_path),
os.path.getsize(sel... | 21.6875 | 48 | 0.579251 |
f98e463615922d4704dc706e931dd25b2975d7f0 | 2,733 | py | Python | menus_project/constants.py | arcanemachine/menu-maker | c675dff5f04cde9924095d953bd7d7ad554d659d | [
"CC-BY-4.0"
] | 2 | 2022-02-14T15:21:02.000Z | 2022-02-15T06:20:48.000Z | menus_project/constants.py | arcanemachine/Menu-Maker | c675dff5f04cde9924095d953bd7d7ad554d659d | [
"CC-BY-4.0"
] | 1 | 2022-03-13T06:02:48.000Z | 2022-03-28T12:58:47.000Z | menus_project/constants.py | arcanemachine/django-menu-maker | 665b815c7255b756725d08bf3f66f144407b83d8 | [
"CC-BY-4.0"
] | null | null | null | from django.conf import settings
import server_config
FRONTEND_SERVER_URL = server_config.FRONTEND_SERVER_URL
FRONTEND_SERVER_URL_CONFIRM_EMAIL = \
FRONTEND_SERVER_URL + '/register/confirm-email/'
# misc
PROJECT_NAME = "Menu Maker"
RESERVED_KEYWORDS = ['add-new-restaurant', 'all', 'delete', 'edit', 'new-item',
... | 37.958333 | 79 | 0.778632 |
eba8f88ddd89fc2c20a916ffdc5c8530763fa1da | 2,085 | py | Python | metadata/iucr.py | sjennewein/MetaDataDistiller | 9d1559d2d30ccceadeff8c9921e4468fdb0651f2 | [
"MIT"
] | null | null | null | metadata/iucr.py | sjennewein/MetaDataDistiller | 9d1559d2d30ccceadeff8c9921e4468fdb0651f2 | [
"MIT"
] | null | null | null | metadata/iucr.py | sjennewein/MetaDataDistiller | 9d1559d2d30ccceadeff8c9921e4468fdb0651f2 | [
"MIT"
] | null | null | null | import json
import requests
from bs4 import BeautifulSoup
from .payload import Payload, Author, Affiliation
def map(url):
meta = Payload()
try:
r = requests.get(url)
except:
return {}
html = BeautifulSoup(r.content, 'html.parser')
metadata = html.find_all("meta")
r.close()
... | 35.338983 | 68 | 0.572662 |
b93601c4387b72156d1158bae75ed920d2c4414a | 15,538 | py | Python | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/database/mongodb/mongodb_user.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-03-29T18:41:01.000Z | 2020-03-29T18:41:01.000Z | ansible/ansible/modules/database/mongodb/mongodb_user.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 7 | 2020-09-07T17:27:56.000Z | 2022-03-02T06:25:46.000Z | ansible/ansible/modules/database/mongodb/mongodb_user.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 1 | 2020-10-30T12:48:24.000Z | 2020-10-30T12:48:24.000Z | #!/usr/bin/python
# (c) 2012, Elliott Foster <elliott@fourkitchens.com>
# Sponsored by Four Kitchens http://fourkitchens.com.
# (c) 2014, Epic Games, Inc.
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__m... | 34.995495 | 160 | 0.643519 |
6733e3d5835869fdba5e0339a77614cee989fdaf | 7,292 | py | Python | statistics/plot_statistics.py | JovanP1/Animal-sound-recognition | 354cec20167b32a1d71e5a71a65d6461abb5d9b1 | [
"MIT"
] | 1 | 2022-03-24T11:49:43.000Z | 2022-03-24T11:49:43.000Z | statistics/plot_statistics.py | jovan-stojanovic/Animal-sound-recognition | 354cec20167b32a1d71e5a71a65d6461abb5d9b1 | [
"MIT"
] | null | null | null | statistics/plot_statistics.py | jovan-stojanovic/Animal-sound-recognition | 354cec20167b32a1d71e5a71a65d6461abb5d9b1 | [
"MIT"
] | null | null | null | import os
import sys
import numpy as np
import argparse
import h5py
import time
import pickle
import matplotlib.pyplot as plt
import csv
from sklearn import metrics
from utilities import (create_folder, get_filename, d_prime)
import config
def load_statistics(statistics_path):
statistics_dict = p... | 42.150289 | 267 | 0.63124 |
594258688ee42e808d4ae9c54566fdc7050546fb | 2,197 | py | Python | SSMOECHS/Optimizer/HEED.py | lee-jingu/SSMOECHS | 5afb0899304689c05a68580a9eb5610dd83ea76a | [
"MIT"
] | 1 | 2021-02-12T01:32:23.000Z | 2021-02-12T01:32:23.000Z | SSMOECHS/Optimizer/HEED.py | lee-jingu/SSMOECHS | 5afb0899304689c05a68580a9eb5610dd83ea76a | [
"MIT"
] | null | null | null | SSMOECHS/Optimizer/HEED.py | lee-jingu/SSMOECHS | 5afb0899304689c05a68580a9eb5610dd83ea76a | [
"MIT"
] | null | null | null | import copy
import networkx as nx
import numpy as np
import config as cf
import random
import math
from network import Network
def Optimizer(network, Alive_Node, Residual=False, R=30, IN_Median=False):
HEED_NET=nx.create_empty_copy(network)
HEED_CHID=[]
P = cf.P_CH
## CH Selection
... | 32.308824 | 95 | 0.517979 |
e6a5863616063680da1042613071ad8b14743cc5 | 779 | py | Python | src/app/views/local.py | chenweixu/bunnyc_mgr | 1243fa951c45c665442212247d682ce3d39aec08 | [
"Apache-2.0"
] | null | null | null | src/app/views/local.py | chenweixu/bunnyc_mgr | 1243fa951c45c665442212247d682ce3d39aec08 | [
"Apache-2.0"
] | null | null | null | src/app/views/local.py | chenweixu/bunnyc_mgr | 1243fa951c45c665442212247d682ce3d39aec08 | [
"Apache-2.0"
] | null | null | null | from flask import request
from flask import jsonify
from app import app
from app import work_log
from app.main.local import LocalTask
from app.utils.myencrypt import create_key, verify_key
@app.route("/api/v2/local", methods=["POST"])
def v2_local():
work_log.debug(str(request.path))
try:
key = request... | 32.458333 | 66 | 0.629012 |
e6db7aa360b8ac1c60898da851cea8ed33860a6e | 1,325 | py | Python | kuryr/tests/unit/binding/__init__.py | openstack/kuryr | 5b38e84ef8a0a62ee44d53ddd1cda377b0d9d934 | [
"Apache-2.0"
] | 207 | 2015-07-15T01:46:02.000Z | 2022-03-24T10:06:53.000Z | kuryr/tests/unit/binding/__init__.py | MaysaMacedo/kuryr | 34439895e3c17e5b7de9a72cafc411bb97230853 | [
"Apache-2.0"
] | 1 | 2015-10-29T14:59:06.000Z | 2015-10-29T14:59:06.000Z | kuryr/tests/unit/binding/__init__.py | MaysaMacedo/kuryr | 34439895e3c17e5b7de9a72cafc411bb97230853 | [
"Apache-2.0"
] | 58 | 2015-07-22T08:29:32.000Z | 2021-08-11T08:56:11.000Z | # 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, software
# distributed under t... | 40.151515 | 76 | 0.710943 |
7a259555bf6db4c028f73470849980701be80517 | 21,065 | py | Python | loveletter/game.py | ErikGartner/love-letter | 36995788292ea6fdfc72a8b09adad01ba6683c26 | [
"MIT"
] | null | null | null | loveletter/game.py | ErikGartner/love-letter | 36995788292ea6fdfc72a8b09adad01ba6683c26 | [
"MIT"
] | null | null | null | loveletter/game.py | ErikGartner/love-letter | 36995788292ea6fdfc72a8b09adad01ba6683c26 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Love Letter Game object
"""
import numpy as np
from loveletter.card import Card
from loveletter.player import PlayerTools, PlayerAction, PlayerActionTools
class Game():
"""A Love Letter Game"""
def __init__(self, deck, players, turn_index, action_log=[]):
self._deck = deck... | 37.415631 | 96 | 0.609352 |
29147289bf39386e0a135df40adfed5bd69b9a16 | 1,830 | py | Python | src/pdc2/scripts/taxon_name_subst.py | jlanga/smsk_selection | 08070c6d4a6fbd9320265e1e698c95ba80f81123 | [
"MIT"
] | 4 | 2021-07-18T05:20:20.000Z | 2022-01-03T10:22:33.000Z | src/pdc2/scripts/taxon_name_subst.py | jlanga/smsk_selection | 08070c6d4a6fbd9320265e1e698c95ba80f81123 | [
"MIT"
] | 1 | 2017-08-21T07:26:13.000Z | 2018-11-08T13:59:48.000Z | src/pdc2/scripts/taxon_name_subst.py | jlanga/smsk_orthofinder | 08070c6d4a6fbd9320265e1e698c95ba80f81123 | [
"MIT"
] | 2 | 2021-07-18T05:20:26.000Z | 2022-03-31T18:23:31.000Z | import sys,os
import phylo3,newick3
import tree_utils
"""
to change sequence names with taxa names and make trees more readable,
and output a new file named infile.names
Create a tabular file that each line contains
code taxon_name
separated by tab
"""
if __name__ == "__main__":
if len(sys.argv) != 3:
print "pyth... | 26.521739 | 74 | 0.642623 |
fce9947a74af7090a82dad2dbcd8cdb5083b09fd | 11,428 | py | Python | web-service/main.py | emergentdevices/physical-web | e5f8cc6a56b04bc39f4dd78859ed0779105bbf49 | [
"Apache-2.0"
] | null | null | null | web-service/main.py | emergentdevices/physical-web | e5f8cc6a56b04bc39f4dd78859ed0779105bbf49 | [
"Apache-2.0"
] | null | null | null | web-service/main.py | emergentdevices/physical-web | e5f8cc6a56b04bc39f4dd78859ed0779105bbf49 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2014 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 34.215569 | 108 | 0.587592 |
98040cbc1c7deecbf212228e3e4aecc3130da852 | 28,250 | py | Python | env/lib/python3.8/site-packages/Crypto/PublicKey/RSA.py | juansjimenez/goodocity-backend | 77b2ab3f11047e2896e81358b8d8c63d7952b521 | [
"MIT"
] | 1 | 2020-09-26T02:27:05.000Z | 2020-09-26T02:27:05.000Z | env/lib/python3.8/site-packages/Crypto/PublicKey/RSA.py | juansjimenez/goodocity-backend | 77b2ab3f11047e2896e81358b8d8c63d7952b521 | [
"MIT"
] | 12 | 2021-04-11T19:46:06.000Z | 2021-06-18T16:08:37.000Z | env/lib/python3.8/site-packages/Crypto/PublicKey/RSA.py | juansjimenez/goodocity-backend | 77b2ab3f11047e2896e81358b8d8c63d7952b521 | [
"MIT"
] | 1 | 2018-07-06T03:48:08.000Z | 2018-07-06T03:48:08.000Z | # ===================================================================
#
# Copyright (c) 2016, Legrandin <helderijs@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributio... | 36.783854 | 94 | 0.578088 |
bf8a28d34495820979f4eb10b99b05fc924daf87 | 1,231 | py | Python | scripts/runner.py | TimSimpsonR/qtox | 7ed4c1fa15ecb5ce1ba2f5ea7d6a9deed422c7d2 | [
"MIT"
] | null | null | null | scripts/runner.py | TimSimpsonR/qtox | 7ed4c1fa15ecb5ce1ba2f5ea7d6a9deed422c7d2 | [
"MIT"
] | null | null | null | scripts/runner.py | TimSimpsonR/qtox | 7ed4c1fa15ecb5ce1ba2f5ea7d6a9deed422c7d2 | [
"MIT"
] | 1 | 2019-03-14T21:05:23.000Z | 2019-03-14T21:05:23.000Z | import subprocess
import os
import sys
def main():
venv_dir = os.path.dirname(sys.argv[0])
black = os.path.join(venv_dir, 'black')
flake8 = os.path.join(venv_dir, 'flake8')
mypy = os.path.join(venv_dir, 'mypy')
python = os.path.join(venv_dir, 'python')
print('Running Black...', flush=True)
... | 25.645833 | 64 | 0.576767 |
dc11d1c0f5e34b0beb8fed66110bd51d2993db67 | 47,672 | py | Python | flare/kernels.py | smheidrich/flare | 5a18c1042a5767ebb8dc20ac59a17df6f1bcad77 | [
"MIT"
] | null | null | null | flare/kernels.py | smheidrich/flare | 5a18c1042a5767ebb8dc20ac59a17df6f1bcad77 | [
"MIT"
] | null | null | null | flare/kernels.py | smheidrich/flare | 5a18c1042a5767ebb8dc20ac59a17df6f1bcad77 | [
"MIT"
] | null | null | null | """Single element 2-, 3-, and 2+3-body kernels.
The kernel functions to choose:
* Two body:
* two_body: force kernel
* two_body_en: energy kernel
* two_body_grad: gradient of kernel function
* two_body_force_en: energy force kernel
* Three body:
* three_body,
* three_body_grad,
* three_b... | 36.783951 | 79 | 0.551456 |
089b9614754ffabe470cd3218246846e575761a0 | 174 | py | Python | data/groups_const.py | zevgenia/Python_training | c785cbd0e4bb8f0c393b0a5a1bcd120f4c503848 | [
"Apache-2.0"
] | null | null | null | data/groups_const.py | zevgenia/Python_training | c785cbd0e4bb8f0c393b0a5a1bcd120f4c503848 | [
"Apache-2.0"
] | null | null | null | data/groups_const.py | zevgenia/Python_training | c785cbd0e4bb8f0c393b0a5a1bcd120f4c503848 | [
"Apache-2.0"
] | null | null | null | from model.group import Group
testdata = [
Group(name="Друзья", header="Друзья", footer="Друзья"),
Group(name="Работа", header="Сослуживцы", footer="Сослуживцы")
] | 21.75 | 66 | 0.683908 |
1a80e5723e5dd7da419e4c668ead426be52d7312 | 562 | py | Python | tests/test_scraper.py | promptapi/scraper-py | d47c5c1cdc6a01084ab5659a3219a5a652792053 | [
"MIT"
] | 4 | 2020-09-03T06:38:04.000Z | 2022-03-04T04:14:03.000Z | tests/test_scraper.py | promptapi/scraper-py | d47c5c1cdc6a01084ab5659a3219a5a652792053 | [
"MIT"
] | null | null | null | tests/test_scraper.py | promptapi/scraper-py | d47c5c1cdc6a01084ab5659a3219a5a652792053 | [
"MIT"
] | 3 | 2020-09-07T21:34:02.000Z | 2021-10-11T06:47:39.000Z | # pylint: disable=R0201,E1101
import os
import unittest
from scraper import Scraper
EXISTING_PROMPTAPI_TOKEN = os.environ.get('PROMPTAPI_TOKEN', None)
class TestSimple(unittest.TestCase):
def test_api_token(self):
os.environ['PROMPTAPI_TOKEN'] = '' # noqa: S105
scraper = Scraper('https://fake... | 22.48 | 66 | 0.670819 |
2e61c7574dd0510bbdd6e35b74585955eb35622f | 14,814 | py | Python | numpyro/infer/sa.py | cerbelaut/numpyro | f28e17e43e4cd3daca3de7a6fc04adcd337da31c | [
"Apache-2.0"
] | null | null | null | numpyro/infer/sa.py | cerbelaut/numpyro | f28e17e43e4cd3daca3de7a6fc04adcd337da31c | [
"Apache-2.0"
] | null | null | null | numpyro/infer/sa.py | cerbelaut/numpyro | f28e17e43e4cd3daca3de7a6fc04adcd337da31c | [
"Apache-2.0"
] | null | null | null | from collections import namedtuple
from jax import device_put, lax, random, vmap
from jax.flatten_util import ravel_pytree
import jax.numpy as jnp
from jax.scipy.special import logsumexp
import numpyro.distributions as dist
from numpyro.distributions.util import cholesky_update
from numpyro.infer.mcmc import MCMCKern... | 45.027356 | 110 | 0.649251 |
93b92fe6572d7003222a2e78e87453683b31ed1f | 4,859 | py | Python | src/python/nimbusml/internal/core/preprocessing/normalization/binner.py | michaelgsharp/NimbusML | 50031157265f49eec85d27fe67582d9ddaf01ef9 | [
"MIT"
] | 134 | 2018-11-01T22:15:24.000Z | 2019-05-04T11:30:08.000Z | src/python/nimbusml/internal/core/preprocessing/normalization/binner.py | michaelgsharp/NimbusML | 50031157265f49eec85d27fe67582d9ddaf01ef9 | [
"MIT"
] | 226 | 2019-05-07T19:00:44.000Z | 2021-01-06T07:59:48.000Z | src/python/nimbusml/internal/core/preprocessing/normalization/binner.py | michaelgsharp/NimbusML | 50031157265f49eec85d27fe67582d9ddaf01ef9 | [
"MIT"
] | 43 | 2019-05-15T20:19:42.000Z | 2022-03-30T10:26:07.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------------------------
# - Generated by tools/entrypoint_co... | 34.707143 | 94 | 0.617411 |
7a6f12f72b8aa90dd95b67209d7b47435edfc5c3 | 4,843 | py | Python | model/alexnet/alexnet.py | rawrawiz/ICNN | 145be374d690bdec32d3a358259584125d08f246 | [
"MIT"
] | null | null | null | model/alexnet/alexnet.py | rawrawiz/ICNN | 145be374d690bdec32d3a358259584125d08f246 | [
"MIT"
] | null | null | null | model/alexnet/alexnet.py | rawrawiz/ICNN | 145be374d690bdec32d3a358259584125d08f246 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import h5py
import math
import copy
import scipy.io as io
import numpy as np
from scipy.io import loadmat
import torch
import torch.nn as nn
import torch.nn.functional as F
from model.alexnet.conv_mask import conv_mask
class alexnet(nn.Module):
def __init__(self, pretrain_path, label_num... | 42.113043 | 140 | 0.576915 |
6173010d8e1cb8f1b890d9048ac1f56279faf39b | 5,868 | py | Python | HW9- State Machines:MDPs/MDP.py | edsul/6.036---2020 | 0ce7a21171baecadff2df626cacc9c176c70329b | [
"MIT"
] | null | null | null | HW9- State Machines:MDPs/MDP.py | edsul/6.036---2020 | 0ce7a21171baecadff2df626cacc9c176c70329b | [
"MIT"
] | null | null | null | HW9- State Machines:MDPs/MDP.py | edsul/6.036---2020 | 0ce7a21171baecadff2df626cacc9c176c70329b | [
"MIT"
] | 1 | 2020-11-24T07:28:38.000Z | 2020-11-24T07:28:38.000Z | import numpy as np
class SM:
start_state = None
def transduce(self, input_seq):
'''input_seq: a list of inputs to feed into SM
returns: a list of outputs of SM'''
res=[]
for x in input_seq:
new_state= self.transition_fn(self.start_state,x)
self.start... | 28.485437 | 142 | 0.503579 |
306230b58df77ef40162ce2ca414f9647d418b6e | 9,643 | py | Python | orcid_api_v3/models/researcher_url_v30_rc2.py | tenet-ac-za/NZ-ORCID-Hub | f1183fbb94509b102fa58d7812ed33d8f35c5d4d | [
"MIT"
] | 15 | 2017-02-06T01:41:57.000Z | 2021-07-22T08:53:40.000Z | orcid_api_v3/models/researcher_url_v30_rc2.py | tenet-ac-za/NZ-ORCID-Hub | f1183fbb94509b102fa58d7812ed33d8f35c5d4d | [
"MIT"
] | 82 | 2017-03-23T00:30:04.000Z | 2022-02-01T00:10:34.000Z | orcid_api_v3/models/researcher_url_v30_rc2.py | tenet-ac-za/NZ-ORCID-Hub | f1183fbb94509b102fa58d7812ed33d8f35c5d4d | [
"MIT"
] | 6 | 2017-03-23T07:26:05.000Z | 2021-02-23T11:20:21.000Z | # coding: utf-8
"""
ORCID Member
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: Latest
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import si... | 29.221212 | 182 | 0.604998 |
dd95c38f305805aa28f3b75472d7b160ad40264f | 496 | py | Python | src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/version.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 2 | 2021-06-05T17:51:26.000Z | 2021-11-17T11:17:56.000Z | src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/version.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 3 | 2020-05-27T20:16:26.000Z | 2020-07-23T19:46:49.000Z | src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/version.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 5 | 2020-05-09T17:47:09.000Z | 2020-10-01T19:52:06.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 ... | 35.428571 | 76 | 0.522177 |
c241062bcd86adf95556e7b4efec0959078c05eb | 1,560 | py | Python | freecad/cadquery2workbench/examples/FreeCAD/Ex023_Sweep.py | jpmlt/freecad-cadquery2-workbench | 6c488df2b8bfb767c0a02bbf8e4de9d00fc114e8 | [
"Apache-2.0"
] | 14 | 2021-12-02T23:38:48.000Z | 2022-03-24T13:23:33.000Z | freecad/cadquery2workbench/examples/FreeCAD/Ex023_Sweep.py | jpmlt/freecad-cadquery2-workbench | 6c488df2b8bfb767c0a02bbf8e4de9d00fc114e8 | [
"Apache-2.0"
] | 2 | 2022-01-19T03:40:35.000Z | 2022-03-05T00:38:10.000Z | freecad/cadquery2workbench/examples/FreeCAD/Ex023_Sweep.py | jpmlt/freecad-cadquery2-workbench | 6c488df2b8bfb767c0a02bbf8e4de9d00fc114e8 | [
"Apache-2.0"
] | null | null | null | import cadquery as cq
# Points we will use to create spline and polyline paths to sweep over
pts = [(0, 1), (1, 2), (2, 4)]
# Spline path generated from our list of points (tuples)
path = cq.Workplane("XZ").spline(pts)
# Sweep a circle with a diameter of 1.0 units along the spline path we just created
defaultSweep =... | 42.162162 | 115 | 0.742949 |
db20a12193d6fbdea27e1c318d3adfaae0053a38 | 447 | py | Python | 4 OOP/3_dataclass_car.py | pranjal-teaching/CP1890 | e3f238de65c0b67df229a9e04fc8b271ef7fe795 | [
"MIT"
] | null | null | null | 4 OOP/3_dataclass_car.py | pranjal-teaching/CP1890 | e3f238de65c0b67df229a9e04fc8b271ef7fe795 | [
"MIT"
] | null | null | null | 4 OOP/3_dataclass_car.py | pranjal-teaching/CP1890 | e3f238de65c0b67df229a9e04fc8b271ef7fe795 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
@dataclass
class Car:
make:str
model:str
year:int
def drive(self):
print(f"Driving my {self.year} {self.make} {self.model}.")
def to_string(self):
return f'Car {self.make} {self.model} {self.year}'
corolla2015 = Car('DC_Toyota', 'Corolla', 2015)... | 20.318182 | 66 | 0.668904 |
f637400779dea154f4d159e56a0e5d94cd7994ba | 16,268 | py | Python | back-end/social_network_analyzer/twitterSNA1-v2.1.py | tzamalisp/saint-open-source-tool-for-cyberthreats-monitoring | c30e6da5358555d06413541b6d3893c62a475368 | [
"MIT"
] | null | null | null | back-end/social_network_analyzer/twitterSNA1-v2.1.py | tzamalisp/saint-open-source-tool-for-cyberthreats-monitoring | c30e6da5358555d06413541b6d3893c62a475368 | [
"MIT"
] | null | null | null | back-end/social_network_analyzer/twitterSNA1-v2.1.py | tzamalisp/saint-open-source-tool-for-cyberthreats-monitoring | c30e6da5358555d06413541b6d3893c62a475368 | [
"MIT"
] | null | null | null | from pymongo import MongoClient
import pandas as pd
from collections import Counter
# NLP libraries
from nltk.tokenize import TweetTokenizer
from nltk.corpus import stopwords
import string
import csv
import json
# from datetime import datetime
import datetime
from collections import deque
"""TIME SERIES DESCRIPTIVE ... | 37.226545 | 147 | 0.61495 |
bf4955dd17acbf427dcc8c19b8d7e9cb2ea4d6d5 | 15,982 | py | Python | bin/ADFRsuite/CCSBpckgs/DejaVu2/GleObjects.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | null | null | null | bin/ADFRsuite/CCSBpckgs/DejaVu2/GleObjects.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | null | null | null | bin/ADFRsuite/CCSBpckgs/DejaVu2/GleObjects.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | 1 | 2021-11-04T21:48:14.000Z | 2021-11-04T21:48:14.000Z | ################################################################################
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your op... | 34.222698 | 101 | 0.569703 |
c8ed0caadf3e020d468f51c06913f0261529b49e | 48,122 | py | Python | lasagne/layers/special.py | goncaloperes/Library_Lasagne | 5d3c63cb315c50b1cbd27a6bc8664b406f34dd99 | [
"MIT"
] | 3,986 | 2015-04-09T17:00:42.000Z | 2022-03-30T08:21:55.000Z | lasagne/layers/special.py | goncaloperes/Library_Lasagne | 5d3c63cb315c50b1cbd27a6bc8664b406f34dd99 | [
"MIT"
] | 736 | 2015-04-09T16:23:00.000Z | 2021-01-02T01:35:45.000Z | lasagne/layers/special.py | goncaloperes/Library_Lasagne | 5d3c63cb315c50b1cbd27a6bc8664b406f34dd99 | [
"MIT"
] | 1,311 | 2015-04-09T17:05:38.000Z | 2022-03-27T03:41:01.000Z | import theano
import theano.tensor as T
import numpy as np
from .. import init
from .. import nonlinearities
from ..utils import as_tuple, floatX, int_types
from ..random import get_rng
from .base import Layer, MergeLayer
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
__all__ = [
"Nonlinea... | 40.575042 | 79 | 0.645214 |
b98cdb49e0afcc25317b5b06b8a1f0c2b9dd093d | 1,935 | py | Python | apps/users/migrations/0001_initial.py | yasir-khilji-64/squibler-platform-section | ade0387b3b84c147181f7aaf3741b97da83499c6 | [
"MIT"
] | 2 | 2022-03-06T18:28:54.000Z | 2022-03-06T20:37:46.000Z | apps/users/migrations/0001_initial.py | yasir-khilji-64/squibler-platform-section | ade0387b3b84c147181f7aaf3741b97da83499c6 | [
"MIT"
] | null | null | null | apps/users/migrations/0001_initial.py | yasir-khilji-64/squibler-platform-section | ade0387b3b84c147181f7aaf3741b97da83499c6 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-06 13:40
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
]
operations = [
migrations.CreateModel(
name='User',
... | 53.75 | 266 | 0.644444 |
ef62a39b9ea87beff919d3a1a49049092dd58859 | 13,861 | py | Python | notion/client.py | ciskander/notion-py | ac4a50c75ffd34d5a029055d594c5bdecb69b134 | [
"MIT"
] | null | null | null | notion/client.py | ciskander/notion-py | ac4a50c75ffd34d5a029055d594c5bdecb69b134 | [
"MIT"
] | null | null | null | notion/client.py | ciskander/notion-py | ac4a50c75ffd34d5a029055d594c5bdecb69b134 | [
"MIT"
] | null | null | null | import hashlib
import json
import re
import uuid
from requests import Session, HTTPError
from requests.cookies import cookiejar_from_dict
from urllib.parse import urljoin
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
from .block import Block, BLOCK_TYPES
... | 35.816537 | 122 | 0.588991 |
c0346858b2429e4b30d8850264dbd563b5d256df | 49 | py | Python | Python_Projects/OS-app/startup.py | ArturWagnerBusiness/Projects-2018-2020 | 37a217dc325f3ba42d8a7a1a743e5b6f8fab5df4 | [
"MIT"
] | null | null | null | Python_Projects/OS-app/startup.py | ArturWagnerBusiness/Projects-2018-2020 | 37a217dc325f3ba42d8a7a1a743e5b6f8fab5df4 | [
"MIT"
] | null | null | null | Python_Projects/OS-app/startup.py | ArturWagnerBusiness/Projects-2018-2020 | 37a217dc325f3ba42d8a7a1a743e5b6f8fab5df4 | [
"MIT"
] | null | null | null | from os import system
system("python client.py")
| 16.333333 | 26 | 0.77551 |
0bb01c8fe3b2b28a2e9ec8ebe0a8d93821f49cb3 | 870 | py | Python | python/team B/iq.py | friendlyghst/asuustrikeworkshop | 7a3519bf1b1811054bcffd04ba2262798d67add1 | [
"MIT"
] | 4 | 2019-03-04T07:46:10.000Z | 2020-05-27T17:11:50.000Z | python/team B/iq.py | friendlyghst/asuustrikeworkshop | 7a3519bf1b1811054bcffd04ba2262798d67add1 | [
"MIT"
] | null | null | null | python/team B/iq.py | friendlyghst/asuustrikeworkshop | 7a3519bf1b1811054bcffd04ba2262798d67add1 | [
"MIT"
] | 1 | 2019-02-22T05:38:45.000Z | 2019-02-22T05:38:45.000Z | from QUESTION import question
from test import evaluate
from newfile import enoch
class Question:
def quest(self):
print("Pick an Option")
list = [
"Oliver Twist was published by who? (A) Oliver Twist, (B) Charles Dickens: ",
"What was the name of Alexander the great's ho... | 23.513514 | 89 | 0.570115 |
8fcf860c8363eb65609d26846744c3f562521d29 | 32,867 | py | Python | pystella/rf/light_curve_plot.py | baklanovp/pystella | 47a8b9c3dcd343bf80fba80c8468b803f0f842ce | [
"MIT"
] | 1 | 2019-08-08T13:11:57.000Z | 2019-08-08T13:11:57.000Z | pystella/rf/light_curve_plot.py | cradesto/pystella | f6f44ed12d9648585a52a09e15d494daa4c70c59 | [
"MIT"
] | 9 | 2015-07-11T16:39:57.000Z | 2021-11-23T07:31:49.000Z | pystella/rf/light_curve_plot.py | cradesto/pystella | f6f44ed12d9648585a52a09e15d494daa4c70c59 | [
"MIT"
] | 1 | 2019-08-08T13:08:55.000Z | 2019-08-08T13:08:55.000Z | import os
import sys
from itertools import cycle
from collections import OrderedDict
import numpy as np
from pystella.rf import band
try:
import matplotlib.pyplot as plt
from matplotlib import gridspec
except ImportError as ex:
# import traceback
exc_type, exc_obj, exc_tb = sys.exc_info()
fn = os.... | 35.417026 | 114 | 0.535705 |
b006f9e27fd23300f7e8b7ad96c1e6f5920c991b | 14,819 | py | Python | UnleashClient/__init__.py | Unleash/unleash-client-pyhton | 2489ae9a2069628ae1d312855fc375baddaca004 | [
"MIT"
] | null | null | null | UnleashClient/__init__.py | Unleash/unleash-client-pyhton | 2489ae9a2069628ae1d312855fc375baddaca004 | [
"MIT"
] | null | null | null | UnleashClient/__init__.py | Unleash/unleash-client-pyhton | 2489ae9a2069628ae1d312855fc375baddaca004 | [
"MIT"
] | null | null | null | # pylint: disable=invalid-name
import warnings
from datetime import datetime, timezone
from typing import Callable, Optional
from apscheduler.job import Job
from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.triggers.interval import IntervalTrigger
from UnleashClient.api import register_... | 48.428105 | 258 | 0.624941 |
3f7313342d4beb6f3562f50f0f09f409df02fa81 | 1,502 | py | Python | cocotb/test_dut.py | CospanDesign/sdio-device | b945ce644b27bc6de62a8bd0042c7b696b9b5afc | [
"MIT"
] | 13 | 2016-05-08T14:21:12.000Z | 2021-10-07T04:15:02.000Z | cocotb/test_dut.py | ianhan/sdio-device | b945ce644b27bc6de62a8bd0042c7b696b9b5afc | [
"MIT"
] | 1 | 2018-07-25T01:12:16.000Z | 2018-07-25T13:19:35.000Z | cocotb/test_dut.py | CospanDesign/nysa-sdio-device | b997f59909b38017eaba38dbce103dfdca1c61c5 | [
"MIT"
] | 11 | 2016-07-06T05:24:42.000Z | 2021-08-22T05:07:17.000Z | # Simple tests for an adder module
import os
import sys
import cocotb
import logging
from cocotb.result import TestFailure
from nysa.host.sim.sim_host import NysaSim
from cocotb.clock import Clock
import time
from array import array as Array
from dut_driver import wb_sdio_deviceDriver
SIM_CONFIG = "sim_config.json"
... | 23.107692 | 82 | 0.697071 |
5c75eea69915fbb4b8da63ee6ce68f3eee3343dd | 24,475 | py | Python | pysnmp-with-texts/ASCEND-MIBCLTM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/ASCEND-MIBCLTM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/ASCEND-MIBCLTM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module ASCEND-MIBCLTM-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ASCEND-MIBCLTM-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:26:52 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, ... | 146.556886 | 2,311 | 0.777896 |
1d59e2f0d3e4c753b36059641cd4ef48f8c1d960 | 26,773 | py | Python | src/slim/deployment/model_deploy_test.py | uchuhimo/Ptolemy | 5c8ae188af30ee49d38f27d54c67af2eab9489e7 | [
"Apache-2.0"
] | 15 | 2020-08-24T07:11:20.000Z | 2021-09-13T08:03:42.000Z | src/slim/deployment/model_deploy_test.py | uchuhimo/Ptolemy | 5c8ae188af30ee49d38f27d54c67af2eab9489e7 | [
"Apache-2.0"
] | 5 | 2021-02-28T17:30:26.000Z | 2021-06-15T09:33:00.000Z | src/slim/deployment/model_deploy_test.py | uchuhimo/Ptolemy | 5c8ae188af30ee49d38f27d54c67af2eab9489e7 | [
"Apache-2.0"
] | 3 | 2020-10-22T09:11:11.000Z | 2021-01-16T14:49:34.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 46.970175 | 86 | 0.601875 |
2e18d120f9c93d7ea012d5095ec393804e44bde5 | 7,336 | py | Python | old-stuff-for-reference/nightjar-base/nightjar-src/python-src/nightjar/backend/api/deployment_map/service_data.py | groboclown/nightjar-mesh | 3655307b4a0ad00a0f18db835b3a0d04cb8e9615 | [
"MIT"
] | 3 | 2019-12-23T23:46:02.000Z | 2020-08-07T23:10:20.000Z | old-stuff-for-reference/nightjar-base/nightjar-src/python-src/nightjar/backend/api/deployment_map/service_data.py | groboclown/nightjar-mesh | 3655307b4a0ad00a0f18db835b3a0d04cb8e9615 | [
"MIT"
] | 2 | 2020-02-07T15:59:15.000Z | 2020-08-05T21:55:27.000Z | old-stuff-for-reference/nightjar-base/nightjar-src/python-src/nightjar/backend/api/deployment_map/service_data.py | groboclown/nightjar-mesh | 3655307b4a0ad00a0f18db835b3a0d04cb8e9615 | [
"MIT"
] | 1 | 2020-05-28T00:46:05.000Z | 2020-05-28T00:46:05.000Z |
"""
Data types for the service.
"""
from typing import List, Iterable, Dict, Union, Optional, Any
from ....msg import fatal, note
class EnvoyRoute:
"""
Defines the URL path to cluster matching.
"""
__slots__ = ('path_prefix', 'cluster_weights', 'total_weight',)
def __init__(
self, p... | 35.785366 | 100 | 0.578517 |
334bc752b6f13a3fa414a83022292e97eac7f773 | 2,861 | py | Python | third_party/zhon/zhon/hanzi.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | third_party/zhon/zhon/hanzi.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | third_party/zhon/zhon/hanzi.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null |
"""Constants for working with Chinese characters."""
import sys
#: Character code ranges for pertinent CJK ideograph Unicode blocks.
characters = cjk_ideographs = (
'\u3007' # Ideographic number zero, see issue #17
'\u4E00-\u9FFF' # CJK Unified Ideographs
'\u3400-\u4DBF' # CJK Unified Ideographs... | 31.43956 | 78 | 0.695211 |
ad7984a535e5fc96b9aa48dc3d8060ea666e94ed | 696 | py | Python | tensorflow_undo_labeling.py | trevorhobenshield/QuantLabel | 45aa9799e99ba90a2bbbc856c19839c87392b83f | [
"MIT"
] | null | null | null | tensorflow_undo_labeling.py | trevorhobenshield/QuantLabel | 45aa9799e99ba90a2bbbc856c19839c87392b83f | [
"MIT"
] | null | null | null | tensorflow_undo_labeling.py | trevorhobenshield/QuantLabel | 45aa9799e99ba90a2bbbc856c19839c87392b83f | [
"MIT"
] | null | null | null | import shutil
from pathlib import Path
def undo_labeling(img_directory: str) -> None:
"""
Undo labeling performed by `tensorflow_label.py`
:param img_directory: path to image directory that previously had it's contents labeled
:return: None
"""
# move images out of directories
for d in [f... | 24.857143 | 91 | 0.62931 |
2cdaf8f48851a5a3c4aaa7fbd5f9804f1391f42d | 176 | py | Python | ABC048/ABC048b.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | ABC048/ABC048b.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | ABC048/ABC048b.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | #ABC048b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
a, b, x = map(int, input().split())
ans = b // x - a // x
if (a % x == 0):
ans += 1
print(ans) | 16 | 35 | 0.585227 |
9c28d5a0050e216f625987a901ad705ccc7e2078 | 7,491 | py | Python | noxfile-template.py | TestShared-demo/python-docs-samples | c03bb27e87f50c31cd8b9e509dca2d0e0eec37ab | [
"Apache-2.0"
] | 1 | 2021-09-27T10:21:18.000Z | 2021-09-27T10:21:18.000Z | noxfile-template.py | TestShared-demo/python-docs-samples | c03bb27e87f50c31cd8b9e509dca2d0e0eec37ab | [
"Apache-2.0"
] | 2 | 2020-05-05T05:16:18.000Z | 2020-05-18T08:16:38.000Z | noxfile-template.py | TestShared-demo/python-docs-samples | c03bb27e87f50c31cd8b9e509dca2d0e0eec37ab | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 30.327935 | 89 | 0.682552 |
34e7e34f38ac1ec4a7e66e25f8cc8a870376076c | 10,885 | py | Python | build_wrapper.py | plafl/aduana | b14bb32f9b92393db241733f94d06a286525a3c1 | [
"BSD-3-Clause"
] | 54 | 2015-05-17T19:17:58.000Z | 2019-12-26T01:47:46.000Z | build_wrapper.py | plafl/aduana | b14bb32f9b92393db241733f94d06a286525a3c1 | [
"BSD-3-Clause"
] | 19 | 2015-06-22T09:58:31.000Z | 2017-05-08T08:56:50.000Z | build_wrapper.py | plafl/aduana | b14bb32f9b92393db241733f94d06a286525a3c1 | [
"BSD-3-Clause"
] | 15 | 2015-07-03T14:17:38.000Z | 2021-06-30T15:48:17.000Z | import platform
import cffi
aduana_src_root = 'lib/src/'
aduana_lib_root = 'lib/lib/'
aduana_src = [
aduana_lib_root + x for x in [
'smaz.c',
'xxhash.c',
'lmdb/mdb.c',
'lmdb/midl.c',
]] + [
aduana_src_root + x for x in [
'mmap_array.c',
'page_db.c',
... | 25.793839 | 105 | 0.614975 |
1f47bb8fe486e871e18d2090ba1b8c6c5cda2430 | 24,623 | py | Python | yt/visualization/color_maps.py | aemerick/yt | 984484616d75c6d7603e71b9d45c5d617705a0e5 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/visualization/color_maps.py | aemerick/yt | 984484616d75c6d7603e71b9d45c5d617705a0e5 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/visualization/color_maps.py | aemerick/yt | 984484616d75c6d7603e71b9d45c5d617705a0e5 | [
"BSD-3-Clause-Clear"
] | null | null | null | import numpy as np
import matplotlib.colors as cc
import matplotlib.cm as mcm
from . import _colormap_data as _cm
try:
import cmocean
except ImportError:
cmocean = None
def is_colormap(cmap):
return isinstance(cmap,cc.Colormap)
def check_color(name):
try:
cc.colorConverter.to_rgb(name)
... | 42.822609 | 261 | 0.598871 |
fbd66bb18e9c66ceb8bdd076bd052e79e578640a | 312 | py | Python | dependencies/georeference maps/pythongis/vector/fileformats/thirdparty/PyDTA/testvaluelabels.py | karimbahgat/AutoMap | eae52f16b7ce71cb2b4b7ae67cf6e4680ea2194f | [
"MIT"
] | 4 | 2015-12-05T14:31:55.000Z | 2018-02-09T05:54:36.000Z | dependencies/georeference maps/pythongis/vector/fileformats/thirdparty/PyDTA/testvaluelabels.py | karimbahgat/AutoMap | eae52f16b7ce71cb2b4b7ae67cf6e4680ea2194f | [
"MIT"
] | 1 | 2022-01-13T02:52:09.000Z | 2022-01-13T02:52:09.000Z | dependencies/georeference maps/pythongis/vector/fileformats/thirdparty/PyDTA/testvaluelabels.py | karimbahgat/AutoMap | eae52f16b7ce71cb2b4b7ae67cf6e4680ea2194f | [
"MIT"
] | 1 | 2018-10-24T01:08:11.000Z | 2018-10-24T01:08:11.000Z |
import sys
sys.path.append("C:/Users/kimo/Documents/GitHub")
import PyDTA
dta = PyDTA.Reader(open("Junk/bleh/BDIR51FL.DTA","rb"))
print dta
for var in dta.variables():
print var.name, var.label
if var.value_format:
print var.value_format
print dta.value_labels()[var.value_format]
| 17.333333 | 55 | 0.695513 |
1fa1dbf4062b705acbcc6f78e5f7f330211aa5cc | 1,534 | py | Python | setup.py | chatziko/ha-philipsjs | 54581fe81b15389cb5ee75d0c353550e9b6c89fa | [
"MIT"
] | 17 | 2016-11-06T18:52:03.000Z | 2021-05-09T18:10:06.000Z | setup.py | chatziko/ha-philipsjs | 54581fe81b15389cb5ee75d0c353550e9b6c89fa | [
"MIT"
] | 20 | 2017-09-01T16:08:48.000Z | 2022-03-19T22:51:15.000Z | setup.py | chatziko/ha-philipsjs | 54581fe81b15389cb5ee75d0c353550e9b6c89fa | [
"MIT"
] | 22 | 2016-12-13T15:24:06.000Z | 2022-03-18T20:28:13.000Z | import os
from setuptools import setup, find_packages
def readme():
with open('README.md') as f:
return f.read()
PACKAGE_NAME = 'ha-philipsjs'
HERE = os.path.abspath(os.path.dirname(__file__))
VERSION = '2.8.0'
PACKAGES = find_packages(exclude=['tests', 'tests.*', 'dist', 'ccu', 'build'])
REQUIRES = [
... | 28.407407 | 86 | 0.563885 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.