hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3ee733eb0c35c0973a8c3b9394e16bdb00277133 | 525 | py | Python | output/models/nist_data/list_pkg/non_negative_integer/schema_instance/nistschema_sv_iv_list_non_negative_integer_min_length_5_xsd/nistschema_sv_iv_list_non_negative_integer_min_length_5.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/list_pkg/non_negative_integer/schema_instance/nistschema_sv_iv_list_non_negative_integer_min_length_5_xsd/nistschema_sv_iv_list_non_negative_integer_min_length_5.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/list_pkg/non_negative_integer/schema_instance/nistschema_sv_iv_list_non_negative_integer_min_length_5_xsd/nistschema_sv_iv_list_non_negative_integer_min_length_5.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from typing import List
__NAMESPACE__ = "NISTSchema-SV-IV-list-nonNegativeInteger-minLength-5-NS"
@dataclass
class NistschemaSvIvListNonNegativeIntegerMinLength5:
class Meta:
name = "NISTSchema-SV-IV-list-nonNegativeInteger-minLength-5"
namespace = "NISTSc... | 26.25 | 77 | 0.681905 |
f53126a1da5aa79cbbe585bc4b95963a4dac4b16 | 959 | py | Python | tornadobase/handlers/basehandler.py | coyote240/tornadobase | 33c7b453dc4a42f09da7ff437387e0ba081a1918 | [
"MIT"
] | 1 | 2020-01-24T14:44:11.000Z | 2020-01-24T14:44:11.000Z | tornadobase/handlers/basehandler.py | coyote240/tornadobase | 33c7b453dc4a42f09da7ff437387e0ba081a1918 | [
"MIT"
] | 3 | 2017-04-23T23:14:55.000Z | 2017-06-27T17:33:50.000Z | tornadobase/handlers/basehandler.py | coyote240/tornadobase | 33c7b453dc4a42f09da7ff437387e0ba081a1918 | [
"MIT"
] | null | null | null | import logging
import tornado.web
from tornado.options import options
def server_settings(handler):
handler.set_header('Server', options.server)
handler.add_header('X-Frame-Options', options.x_frame_options)
handler.add_header('X-XSS-Protection', options.x_xss_protection)
handler.add_header('X-Conten... | 25.918919 | 68 | 0.704901 |
3da7ab3c493343b7b0a13a5a7d80e603a1f4990e | 10,493 | py | Python | cipher/mul_layer_mul_batch_lstm_cuda2.py | wtberry/CSCI4911 | c988b2949d5b81e797d90d8c2ff9e015eb4c044f | [
"MIT"
] | null | null | null | cipher/mul_layer_mul_batch_lstm_cuda2.py | wtberry/CSCI4911 | c988b2949d5b81e797d90d8c2ff9e015eb4c044f | [
"MIT"
] | null | null | null | cipher/mul_layer_mul_batch_lstm_cuda2.py | wtberry/CSCI4911 | c988b2949d5b81e797d90d8c2ff9e015eb4c044f | [
"MIT"
] | null | null | null | # Lab 12 RNN
import os
from string import ascii_uppercase
from collections import OrderedDict
from itertools import count
# In order to use Tensorboard with pyTorch...
from logger import Logger
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch import optim
import pre_process as pre
'... | 34.976667 | 171 | 0.709807 |
08c36e22592f0f2c71b2472e7ccfe9db38425cc1 | 13,100 | py | Python | src/scaffoldmaker/utils/meshrefinement.py | mahyar-osn/scaffoldmaker | 42d56c2778eb535a7384d0113c0304a0319a5469 | [
"Apache-2.0"
] | null | null | null | src/scaffoldmaker/utils/meshrefinement.py | mahyar-osn/scaffoldmaker | 42d56c2778eb535a7384d0113c0304a0319a5469 | [
"Apache-2.0"
] | null | null | null | src/scaffoldmaker/utils/meshrefinement.py | mahyar-osn/scaffoldmaker | 42d56c2778eb535a7384d0113c0304a0319a5469 | [
"Apache-2.0"
] | null | null | null | '''
Class for refining a mesh from one region to another.
'''
from __future__ import division
import math
from opencmiss.utils.zinc.field import findOrCreateFieldCoordinates, findOrCreateFieldGroup, findOrCreateFieldNodeGroup, \
findOrCreateFieldStoredMeshLocation, findOrCreateFieldStoredString
from opencmiss.zinc.... | 56.223176 | 134 | 0.646489 |
47d4f219993e698c543ce0efb8e2201bc2f62773 | 3,459 | py | Python | refreshbooks/test/test_adapters.py | fgregg/refreshbooks | cfd65ecd38cb6be3b61dbf6a01f93800603f34b1 | [
"MIT"
] | null | null | null | refreshbooks/test/test_adapters.py | fgregg/refreshbooks | cfd65ecd38cb6be3b61dbf6a01f93800603f34b1 | [
"MIT"
] | null | null | null | refreshbooks/test/test_adapters.py | fgregg/refreshbooks | cfd65ecd38cb6be3b61dbf6a01f93800603f34b1 | [
"MIT"
] | null | null | null | from lxml import etree
from refreshbooks import adapters
def test_request_xml_simple():
xml = adapters.xml_request('client.list')
# test that xml looks roughly like <request method="client.list"/>
request_document = etree.fromstring(xml)
assert 'request' == request_document.tag
assert {'metho... | 30.610619 | 78 | 0.596415 |
409a3a69d731eb784c2cc76661a65dfe4c031e0f | 170 | py | Python | opentamp/src/policy_hooks/vae/register_env.py | Algorithmic-Alignment-Lab/openTAMP-legacy | 3b7c3be164cc968ad77a928286d6460cd70a670e | [
"MIT"
] | 2 | 2022-03-09T19:48:20.000Z | 2022-03-26T17:31:07.000Z | opentamp/src/policy_hooks/vae/register_env.py | Algorithmic-Alignment-Lab/OpenTAMP | eecb950bd273da8cbed4394487630e8453f2c242 | [
"MIT"
] | null | null | null | opentamp/src/policy_hooks/vae/register_env.py | Algorithmic-Alignment-Lab/OpenTAMP | eecb950bd273da8cbed4394487630e8453f2c242 | [
"MIT"
] | null | null | null | from gym.envs.registration import register
register(
id='BlockSortEnv-v0',
entry_point='policy_hooks.vae.trained_envs:BlockSortEnv',
max_episode_steps=20,
)
| 21.25 | 61 | 0.764706 |
3961f8bd5ad8f15713aa3d93e2c8cb0171d559bf | 6,863 | py | Python | egs/wsj/asr1/local/extract_embedding_30mfcc.py | MeMAD-project/espnet-old-speaker-aware | 31e4f49da9ffe5a2219abd79832e78035595e580 | [
"Apache-2.0"
] | null | null | null | egs/wsj/asr1/local/extract_embedding_30mfcc.py | MeMAD-project/espnet-old-speaker-aware | 31e4f49da9ffe5a2219abd79832e78035595e580 | [
"Apache-2.0"
] | null | null | null | egs/wsj/asr1/local/extract_embedding_30mfcc.py | MeMAD-project/espnet-old-speaker-aware | 31e4f49da9ffe5a2219abd79832e78035595e580 | [
"Apache-2.0"
] | 3 | 2020-05-29T07:43:15.000Z | 2021-03-24T12:32:30.000Z | #!/usr/bin/env python3
# This script will just extract speaker embeddings with Tuomas Kaseva's
# speaker identification model, if you don't need diarisation
# author: Aku Rouhe
import numpy as np
import librosa
import keras
import sklearn
import spherecluster
import sys
import scipy.io.wavfile
import subprocess
impor... | 37.502732 | 105 | 0.657438 |
d8a5a2e0de5dc5880b4bafd849f385eeb4d6b62a | 6,848 | py | Python | sec_utils/SecNET.py | squigglepuff/firebytes | 6a6d5476ca73a489254c40c9bc87a0e68e5f36a4 | [
"Apache-2.0"
] | null | null | null | sec_utils/SecNET.py | squigglepuff/firebytes | 6a6d5476ca73a489254c40c9bc87a0e68e5f36a4 | [
"Apache-2.0"
] | null | null | null | sec_utils/SecNET.py | squigglepuff/firebytes | 6a6d5476ca73a489254c40c9bc87a0e68e5f36a4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# *-* coding: utf-8 *-*
import sys
import re
import socket
if sys.version_info[0] < 3:
import pyping
from logger import PrintLog
else:
from sec_utils.logger import PrintLog
'''
\brief This is a basic network testing class.
This class's sole purpose is to test for REALLY basic netwo... | 38.044444 | 123 | 0.563376 |
5772400912d00bdc2b06e0bf8f782573fbde2af4 | 912 | py | Python | src/gtk3/box-horizontal/builder/MainWindow.py | alexandrebarbaruiva/gui-python-gtk | 7b8e8ab05645271ae55e1e2165eefc9c8f5b0250 | [
"MIT"
] | 42 | 2020-05-09T16:23:23.000Z | 2022-03-28T13:05:32.000Z | src/gtk3/box-horizontal/builder/MainWindow.py | alexandrebarbaruiva/gui-python-gtk | 7b8e8ab05645271ae55e1e2165eefc9c8f5b0250 | [
"MIT"
] | 2 | 2020-05-27T19:23:54.000Z | 2022-03-08T01:42:59.000Z | src/gtk3/box-horizontal/builder/MainWindow.py | alexandrebarbaruiva/gui-python-gtk | 7b8e8ab05645271ae55e1e2165eefc9c8f5b0250 | [
"MIT"
] | 8 | 2020-05-09T16:23:28.000Z | 2022-03-31T22:44:45.000Z | # -*- coding: utf-8 -*-
"""Gtk.Box() horizontal."""
import gi
gi.require_version(namespace='Gtk', version='3.0')
from gi.repository import Gio, Gtk
@Gtk.Template(filename='MainWindow.ui')
class MainWindow(Gtk.ApplicationWindow):
__gtype_name__ = 'MainWindow'
def __init__(self, **kwargs):
super()._... | 21.209302 | 63 | 0.64364 |
713fb6c6cca44bb9635fb6fe52258e08e32059ae | 39,575 | py | Python | numba/tests/test_npdatetime.py | 10088/numba | 2f89d45807b55c676646338bb4d730b69658d2c5 | [
"BSD-2-Clause"
] | null | null | null | numba/tests/test_npdatetime.py | 10088/numba | 2f89d45807b55c676646338bb4d730b69658d2c5 | [
"BSD-2-Clause"
] | null | null | null | numba/tests/test_npdatetime.py | 10088/numba | 2f89d45807b55c676646338bb4d730b69658d2c5 | [
"BSD-2-Clause"
] | null | null | null | """
Test np.datetime64 and np.timedelta64 support.
"""
# NOTE: datetime64 and timedelta64 ufuncs are tested in test_ufuncs.
import contextlib
import itertools
import re
import unittest
import warnings
import numpy as np
from numba import jit, vectorize, njit
from numba.np.numpy_support import numpy_version
from nu... | 36.307339 | 92 | 0.503525 |
c7be20f8f92621dab55781c4a4576f6e0be12574 | 414 | py | Python | examples/ticker.py | robtaylor/iroha | e7713910ee64ca98f999b98b0c77c02fcfe2da09 | [
"BSD-3-Clause"
] | 34 | 2016-02-07T17:43:55.000Z | 2021-12-18T12:01:08.000Z | examples/ticker.py | robtaylor/iroha | e7713910ee64ca98f999b98b0c77c02fcfe2da09 | [
"BSD-3-Clause"
] | 5 | 2016-04-12T09:27:31.000Z | 2021-06-29T10:59:18.000Z | examples/ticker.py | robtaylor/iroha | e7713910ee64ca98f999b98b0c77c02fcfe2da09 | [
"BSD-3-Clause"
] | 5 | 2015-12-26T10:58:46.000Z | 2021-06-25T18:58:40.000Z | import sys
sys.path.append('../py')
from iroha import *
from iroha.iroha import *
d = IDesign()
mod = IModule(d, "mod")
tab = ITable(mod)
st1 = IState(tab)
st2 = IState(tab)
tab.initialSt = st1
tab.states.append(st1)
tab.states.append(st2)
design_tool.AddNextState(st1, st2)
ticker = design_tool.CreateTicker(tab)
in... | 17.25 | 38 | 0.731884 |
d2779469b87ca6c3af92bbcecf4fc2d2aaaa6a98 | 2,022 | py | Python | test/test_custom.py | jayvdb/GenSON | c29649be502c2a64ae0445bce803c9fe4207df9b | [
"MIT"
] | 1 | 2021-04-18T18:50:20.000Z | 2021-04-18T18:50:20.000Z | test/test_custom.py | jayvdb/GenSON | c29649be502c2a64ae0445bce803c9fe4207df9b | [
"MIT"
] | null | null | null | test/test_custom.py | jayvdb/GenSON | c29649be502c2a64ae0445bce803c9fe4207df9b | [
"MIT"
] | null | null | null | from genson import SchemaBuilder
from genson.schema.strategies import SchemaStrategy, Number
from . import base
class MaxTenStrategy(Number):
KEYWORDS = tuple(list(Number.KEYWORDS) + ['maximum'])
def to_schema(self):
schema = super(MaxTenStrategy, self).to_schema()
schema['maximum'] = 10
... | 26.96 | 63 | 0.627102 |
510bdc1085795452b3fec529a6099082bb70fa20 | 239 | py | Python | examples/gauss.pyre/gauss/util/__init__.py | rtburns-jpl/pyre | ffc4fc1b2936e355f709d084eb4055954960b3a2 | [
"BSD-3-Clause"
] | null | null | null | examples/gauss.pyre/gauss/util/__init__.py | rtburns-jpl/pyre | ffc4fc1b2936e355f709d084eb4055954960b3a2 | [
"BSD-3-Clause"
] | 1 | 2021-06-10T23:42:13.000Z | 2021-06-10T23:42:13.000Z | examples/gauss.pyre/gauss/util/__init__.py | jlmaurer/pyre | 6af38a83621d7d6228d147b4bb94f97fbb10f6e2 | [
"BSD-3-Clause"
] | 2 | 2020-08-31T18:07:52.000Z | 2021-12-10T08:54:39.000Z | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2020 all rights reserved
#
"""
Package with various utilities
"""
from .Counter import Counter as counter
from .Printer import Printer as printer
# end of file
| 12.578947 | 39 | 0.686192 |
e2c281d3a32a2bf035c473ecda7300b6547fa481 | 14,910 | py | Python | sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_send_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_send_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_send_async.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.
#-----------------------------------------------------------------... | 40.297297 | 128 | 0.674313 |
ced4f5312c4968883be678b63a98c7a8d3201093 | 1,325 | py | Python | ad_api/base/exceptions.py | matt-behrens-1/python-amazon-ad-api | 257a0ff2366fed04b12f3491e689e3a52994b1ca | [
"MIT"
] | 12 | 2021-11-06T11:12:12.000Z | 2022-03-31T19:10:08.000Z | ad_api/base/exceptions.py | saleweaver/python-amazon-ad-api | 55fca99167ea918d34d5c9e666a4107f10b348a6 | [
"MIT"
] | 12 | 2021-11-06T03:46:59.000Z | 2022-03-11T19:09:58.000Z | ad_api/base/exceptions.py | saleweaver/python-amazon-ad-api | 55fca99167ea918d34d5c9e666a4107f10b348a6 | [
"MIT"
] | 6 | 2021-09-19T00:47:57.000Z | 2022-01-11T13:55:44.000Z | class AdvertisingApiException(Exception):
code = 999
def __init__(self, error):
try:
self.amzn_code = error
except IndexError:
pass
self.error = error
class AdvertisingApiBadRequestException(AdvertisingApiException):
"""
400 Request has missing or invalid... | 30.113636 | 145 | 0.713208 |
770a669539fde8f605d9d7b4e7788f14311d4f44 | 820 | py | Python | nwm_test/test3.py | parkermac/LPM | 966376aabf96303c963056a21eec8fe6bcec7e18 | [
"MIT"
] | null | null | null | nwm_test/test3.py | parkermac/LPM | 966376aabf96303c963056a21eec8fe6bcec7e18 | [
"MIT"
] | null | null | null | nwm_test/test3.py | parkermac/LPM | 966376aabf96303c963056a21eec8fe6bcec7e18 | [
"MIT"
] | null | null | null | """
Code to test the hydrotools module.
"""
# Import the nwm Client
from hydrotools.nwm_client import http as nwm
import pandas as pd
# Path to server (NOMADS in this case)
server = "https://nomads.ncep.noaa.gov/pub/data/nccf/com/nwm/prod/"
# Instantiate model data service
model_data_service = nwm.NWMDataService(ser... | 28.275862 | 67 | 0.74878 |
d6681bdf95dc0a7e35c6fc520e368c5ed55887bb | 8,150 | py | Python | contrib/devtools/update-translations.py | mn-pro/MNPROV2-WALLET-UPDATE | 6e219403c7e29247051704912f15ba4e116fcab6 | [
"MIT"
] | 1 | 2019-08-02T16:06:19.000Z | 2019-08-02T16:06:19.000Z | contrib/devtools/update-translations.py | mn-pro/MNPROV2-WALLET-UPDATE | 6e219403c7e29247051704912f15ba4e116fcab6 | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | mn-pro/MNPROV2-WALLET-UPDATE | 6e219403c7e29247051704912f15ba4e116fcab6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the follo... | 38.625592 | 124 | 0.633865 |
fb4c31ab259e65cfca61a878fa71f2a963ba2d05 | 1,830 | py | Python | Ethos-Hate-Speech-Dataset/ethos/experiments/utilities/helping_functions.py | EricaWei053/lshwe-semantic-embedding | d3bcaaebe67f351a0c3124d6fce491cbefeb1fa3 | [
"MIT"
] | null | null | null | Ethos-Hate-Speech-Dataset/ethos/experiments/utilities/helping_functions.py | EricaWei053/lshwe-semantic-embedding | d3bcaaebe67f351a0c3124d6fce491cbefeb1fa3 | [
"MIT"
] | null | null | null | Ethos-Hate-Speech-Dataset/ethos/experiments/utilities/helping_functions.py | EricaWei053/lshwe-semantic-embedding | d3bcaaebe67f351a0c3124d6fce491cbefeb1fa3 | [
"MIT"
] | null | null | null | import numpy as np
embedding_path1 = "embeddings/crawl-300d-2M.vec" # FastText
embedding_path2 = "embeddings/glove.42B.300d.txt" # Glove 300d
embed_size = 300
def get_coefs(word, *arr):
return word, np.asarray(arr, dtype='float32')
def build_matrix(embedding_path, tk, max_features):
embedding_index = dic... | 41.590909 | 138 | 0.686885 |
f20e9ef6d7b5787bd5950016b83addd23644e864 | 45,417 | py | Python | pandas/tests/internals/test_internals.py | henighan/pandas | 45d8d77f27cf0dbc8cefe932f8fb64f6982b9527 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/internals/test_internals.py | henighan/pandas | 45d8d77f27cf0dbc8cefe932f8fb64f6982b9527 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/internals/test_internals.py | henighan/pandas | 45d8d77f27cf0dbc8cefe932f8fb64f6982b9527 | [
"BSD-3-Clause"
] | null | null | null | from collections import OrderedDict
from datetime import date, datetime
import itertools
import operator
import re
import numpy as np
import pytest
from pandas._libs.internals import BlockPlacement
import pandas as pd
from pandas import (
Categorical,
DataFrame,
DatetimeIndex,
Index,
MultiIndex,
... | 35.098145 | 88 | 0.555761 |
6c913245f4e210089d90fac681453445a5e04ec4 | 913 | py | Python | convolution.py | DanqingLiu/cs633 | f868048e87c310c150db53eef69f3ffd3fd02d41 | [
"BSD-3-Clause"
] | null | null | null | convolution.py | DanqingLiu/cs633 | f868048e87c310c150db53eef69f3ffd3fd02d41 | [
"BSD-3-Clause"
] | null | null | null | convolution.py | DanqingLiu/cs633 | f868048e87c310c150db53eef69f3ffd3fd02d41 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from scipy import signal
def myconv2d(image, filterr):
m = filterr.shape[0]
y, x = image.shape
y = y - m + 1
x = x - m + 1
conv = np.zeros((y,x))
for i in range(y):
for j in range(x):
conv[i][j] = np.sum(image[i:i+m, j:j+m]*filterr)
return conv
i... | 27.666667 | 60 | 0.539978 |
1ab47faed832b7110df3b1a1a6b901aee920b9f4 | 11,748 | py | Python | trove/tests/unittests/cluster/test_redis_cluster.py | ISCAS-VDI/trove-base | 6a13b8771f8c9f259577e79d12355f9142964169 | [
"Apache-2.0"
] | null | null | null | trove/tests/unittests/cluster/test_redis_cluster.py | ISCAS-VDI/trove-base | 6a13b8771f8c9f259577e79d12355f9142964169 | [
"Apache-2.0"
] | null | null | null | trove/tests/unittests/cluster/test_redis_cluster.py | ISCAS-VDI/trove-base | 6a13b8771f8c9f259577e79d12355f9142964169 | [
"Apache-2.0"
] | null | null | null | # Copyright [2015] Hewlett-Packard Development Company, L.P.
# 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... | 43.032967 | 79 | 0.586398 |
129aedb10f3c57d85776ad43b67be951ba852bdf | 68 | py | Python | venv/Lib/site-packages/panda3d/__init__.py | ferris77/pacman | 9d793146189630b4305af0bc7af65ce822b3998f | [
"MIT"
] | null | null | null | venv/Lib/site-packages/panda3d/__init__.py | ferris77/pacman | 9d793146189630b4305af0bc7af65ce822b3998f | [
"MIT"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/panda3d/__init__.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 1 | 2021-04-09T00:02:59.000Z | 2021-04-09T00:02:59.000Z | "Python bindings for the Panda3D libraries"
__version__ = '1.10.9'
| 17 | 43 | 0.75 |
7decd82f71d5fcc684346e4d3d5f486ef50b4044 | 1,802 | py | Python | mysqldecryptor/database.py | dist3r/mysql-decryptor | c018519bd90fb7bc9c708478220d3db5037294d2 | [
"MIT"
] | null | null | null | mysqldecryptor/database.py | dist3r/mysql-decryptor | c018519bd90fb7bc9c708478220d3db5037294d2 | [
"MIT"
] | null | null | null | mysqldecryptor/database.py | dist3r/mysql-decryptor | c018519bd90fb7bc9c708478220d3db5037294d2 | [
"MIT"
] | null | null | null | import re
import mysql.connector
def connect_to_database(user, password, host, port, database):
return mysql.connector.connect(user=user, password=password, host=host, port=port, database=database)
def close_connection(connection):
connection.close()
def read_from_table(connection, table_name, columns_na... | 31.068966 | 112 | 0.68091 |
b5587e8212ab37a512bc0e57f405a2b66db19c7b | 2,153 | py | Python | tests/st/ops/ascend/vector/test_distr_normal_diag_sample_001.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | tests/st/ops/ascend/vector/test_distr_normal_diag_sample_001.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | tests/st/ops/ascend/vector/test_distr_normal_diag_sample_001.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | # 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... | 32.134328 | 114 | 0.633535 |
e3d7183a410ad15170e39a62de515f9db2965815 | 629 | py | Python | tests/config/__init__.py | TheaperDeng/anomalib | f1c8a6b553b82a8974ccc9fd27aa5f9b939d5917 | [
"Apache-2.0"
] | null | null | null | tests/config/__init__.py | TheaperDeng/anomalib | f1c8a6b553b82a8974ccc9fd27aa5f9b939d5917 | [
"Apache-2.0"
] | null | null | null | tests/config/__init__.py | TheaperDeng/anomalib | f1c8a6b553b82a8974ccc9fd27aa5f9b939d5917 | [
"Apache-2.0"
] | null | null | null | """Tests for configuration getters/setters."""
# Copyright (C) 2020 Intel Corporation
#
# 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
#
# Unles... | 39.3125 | 76 | 0.764706 |
237b19cdc4c57362a9423c4a435950dfb2db1920 | 566 | py | Python | xcdlspider/xcdlspider/items.py | agamgn/Spider-Collections | 0b24c56a31d0906a9ecf2031e8f2002de9e7ccf2 | [
"Apache-2.0"
] | null | null | null | xcdlspider/xcdlspider/items.py | agamgn/Spider-Collections | 0b24c56a31d0906a9ecf2031e8f2002de9e7ccf2 | [
"Apache-2.0"
] | null | null | null | xcdlspider/xcdlspider/items.py | agamgn/Spider-Collections | 0b24c56a31d0906a9ecf2031e8f2002de9e7ccf2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class XcdlspiderItem(scrapy.Item):
#IP节点
IP_address = scrapy.Field()
#端口
port = scrapy.Field()
#服务器地址
server_address = scrapy.F... | 18.866667 | 52 | 0.628975 |
9c8522618a9a5dad4dcc8e3a2f2095dda28172da | 526 | py | Python | MxOnlie/apps/users/migrations/0003_auto_20170310_1506.py | why168/PythonProjects | 264caca9354426ca91a4565079969aa34f95ce3f | [
"Artistic-2.0"
] | null | null | null | MxOnlie/apps/users/migrations/0003_auto_20170310_1506.py | why168/PythonProjects | 264caca9354426ca91a4565079969aa34f95ce3f | [
"Artistic-2.0"
] | null | null | null | MxOnlie/apps/users/migrations/0003_auto_20170310_1506.py | why168/PythonProjects | 264caca9354426ca91a4565079969aa34f95ce3f | [
"Artistic-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-03-10 07:06
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0002_banner_emailverityrecord'),
]
operations = [
migrations.AlterFie... | 25.047619 | 119 | 0.61597 |
b87d73114b13c3cd1b1bfb933803077e34f630d9 | 342 | py | Python | src/calendar_cli/i18n/__init__.py | mogproject/calendar-cli | 095fe4cfe76bc1890742d22accef48a5f9f6ca45 | [
"Apache-2.0"
] | 12 | 2015-10-14T09:05:48.000Z | 2021-06-27T11:32:48.000Z | src/calendar_cli/i18n/__init__.py | mogproject/calendar-cli | 095fe4cfe76bc1890742d22accef48a5f9f6ca45 | [
"Apache-2.0"
] | 18 | 2015-10-14T06:20:26.000Z | 2017-01-23T23:33:01.000Z | src/calendar_cli/i18n/__init__.py | mogproject/calendar-cli | 095fe4cfe76bc1890742d22accef48a5f9f6ca45 | [
"Apache-2.0"
] | 4 | 2016-10-12T18:35:24.000Z | 2019-12-31T17:13:02.000Z | import os
import locale
def __get_locale():
# environment LANG is the first priority
lang = os.environ.get('LANG')
if lang:
return lang.lower()
return locale.getdefaultlocale()[0].lower()
__locale = __get_locale()
if __locale.startswith('ja_'):
from .messages_ja import *
else:
from ... | 18 | 47 | 0.678363 |
b8f0cffb6e8b839acc86b056187b368bcf11e9cf | 4,193 | py | Python | src/model.py | kinshuk4/edgeai-computer-pointer-controller | 36f4fe245e628d8f5ead4299d6660a9ca9b98110 | [
"MIT"
] | null | null | null | src/model.py | kinshuk4/edgeai-computer-pointer-controller | 36f4fe245e628d8f5ead4299d6660a9ca9b98110 | [
"MIT"
] | 3 | 2021-06-08T21:43:11.000Z | 2022-03-12T00:33:54.000Z | src/model.py | kinshuk4/edgeai-computer-pointer-controller | 36f4fe245e628d8f5ead4299d6660a9ca9b98110 | [
"MIT"
] | null | null | null | '''
This is a sample class for a model. You may choose to use it as-is or make any changes to it.
This has been provided just to give you an idea of how to structure your model class.
'''
from openvino.inference_engine import IECore
import logging
import cv2
from abc import ABC, abstractmethod
class EdgeModel(ABC):
... | 37.4375 | 117 | 0.654663 |
758907a7afd101250048ed038aa74a0723ae5cf2 | 4,233 | py | Python | recipemd/utils.py | andreasWallner/recipe-markdown | 40da2ac2a5e0e123a5172ee6b99d38f4503016d0 | [
"MIT"
] | 22 | 2015-09-08T21:33:50.000Z | 2021-12-25T01:03:35.000Z | recipemd/utils.py | andreasWallner/recipe-markdown | 40da2ac2a5e0e123a5172ee6b99d38f4503016d0 | [
"MIT"
] | 10 | 2015-09-26T21:25:27.000Z | 2017-03-07T20:28:36.000Z | recipemd/utils.py | andreasWallner/recipe-markdown | 40da2ac2a5e0e123a5172ee6b99d38f4503016d0 | [
"MIT"
] | 4 | 2015-05-30T16:23:06.000Z | 2016-04-18T13:58:07.000Z | import warnings
import os
from doctest import Example
from lxml.doctestcompare import LXMLOutputChecker
from functools import wraps
class XmlTestMixin(object):
""" mixin to test xml for equality
Uses lxml's doctestcompare facilities to compare XMLs that are serialized
to strings. Since it has no knowledge... | 32.813953 | 101 | 0.594378 |
8b7e2b6d797b592e2ccf768f4d8a2bf40e09d41d | 4,034 | py | Python | configs/_base_/bc/bc_mani_skill_PAConv_pointnet++4.py | Zed-Wu/ManiSkill-Learn | 8056fe327752cd0863f8730672fe62bd85a0ec12 | [
"Apache-2.0"
] | null | null | null | configs/_base_/bc/bc_mani_skill_PAConv_pointnet++4.py | Zed-Wu/ManiSkill-Learn | 8056fe327752cd0863f8730672fe62bd85a0ec12 | [
"Apache-2.0"
] | null | null | null | configs/_base_/bc/bc_mani_skill_PAConv_pointnet++4.py | Zed-Wu/ManiSkill-Learn | 8056fe327752cd0863f8730672fe62bd85a0ec12 | [
"Apache-2.0"
] | null | null | null | log_level = 'INFO'
stack_frame = 1
num_heads = 4
agent = dict(
type='BC',
batch_size=64,
policy_cfg=dict(
type='ContinuousPolicy',
policy_head_cfg=dict(
type='DeterministicHead',
noise_std=1e-5,
),
nn_cfg=dict(
type='PAConvPointnet2ManiV0'... | 33.065574 | 147 | 0.448686 |
9a18260a08de59776d7602ca613cf6a9b068bd12 | 17,534 | py | Python | src/p4z3/state.py | robotrobo/gauntlet | 60ff01b30daea9aa0bb3a6a380a2dad438a19be0 | [
"Apache-2.0"
] | 16 | 2020-11-10T02:11:42.000Z | 2022-01-02T15:02:52.000Z | src/p4z3/state.py | robotrobo/gauntlet | 60ff01b30daea9aa0bb3a6a380a2dad438a19be0 | [
"Apache-2.0"
] | 40 | 2019-10-29T13:08:59.000Z | 2020-09-03T08:19:52.000Z | src/p4z3/state.py | robotrobo/gauntlet | 60ff01b30daea9aa0bb3a6a380a2dad438a19be0 | [
"Apache-2.0"
] | 7 | 2020-09-22T07:45:45.000Z | 2022-02-23T18:30:22.000Z | from collections import deque
import types
import copy
import z3
from p4z3.base import log
from p4z3.base import StaticType, P4Z3Class, P4Expression
from p4z3.base import P4Slice, P4ComplexType, P4Member, P4Index
from p4z3.base import StructInstance, P4ComplexInstance, HeaderStack
from p4z3.base import z3_cast, propag... | 38.367615 | 90 | 0.617258 |
3c92492d6100f153cda53ceb8e738384c7f0262d | 6,078 | py | Python | src/app.py | dcronkite/ocr-viewer | d5c175545ba40415d8aeb28932f56751e590c08d | [
"MIT"
] | null | null | null | src/app.py | dcronkite/ocr-viewer | d5c175545ba40415d8aeb28932f56751e590c08d | [
"MIT"
] | null | null | null | src/app.py | dcronkite/ocr-viewer | d5c175545ba40415d8aeb28932f56751e590c08d | [
"MIT"
] | null | null | null | import datetime
import pathlib
import pickle
import sqlite3
import tkinter as tk
import random
import uuid
from tkinter import filedialog
from PIL import Image, ImageTk
class Application(tk.Frame):
def __init__(self, master=None):
super().__init__(master)
self.master = master
self.pack(fi... | 37.060976 | 119 | 0.619941 |
0c727d86f05de15e85d6c17a31b5be6a85e9d3e2 | 3,388 | py | Python | profiles_project/settings.py | AnzalShaikh/profiles-rest-api | 07a48087f579fe0f3896f8792632beec5a7d35ca | [
"MIT"
] | null | null | null | profiles_project/settings.py | AnzalShaikh/profiles-rest-api | 07a48087f579fe0f3896f8792632beec5a7d35ca | [
"MIT"
] | null | null | null | profiles_project/settings.py | AnzalShaikh/profiles-rest-api | 07a48087f579fe0f3896f8792632beec5a7d35ca | [
"MIT"
] | null | null | null | """
Django settings for profiles_project project.
Generated by 'django-admin startproject' using Django 3.2.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
fro... | 26.061538 | 91 | 0.705136 |
c1d895c273f7fb72b95e4ac997d2765ef7c300c0 | 977 | py | Python | hessian.py | ajayhk/Python | 5f5f93194ff5057aa1ee41470f258ed963973b92 | [
"MIT"
] | null | null | null | hessian.py | ajayhk/Python | 5f5f93194ff5057aa1ee41470f258ed963973b92 | [
"MIT"
] | null | null | null | hessian.py | ajayhk/Python | 5f5f93194ff5057aa1ee41470f258ed963973b92 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
def hessian(x):
"""
Calculate the hessian matrix with finite differences
Parameters:
- x : ndarray
Returns:
an array of shape (x.dim, x.ndim) + x.shape
where the array[i, j, ...] corresponds to the second derivative x_ij
"""
... | 25.710526 | 75 | 0.631525 |
5e10d5a912136184af3059e0523b2146e9e8c244 | 15,846 | py | Python | alphafold/model/config.py | lupoglaz/alphafold | 7aabdcb19e30d1bf44b2cb18ef78f2556d4f08d9 | [
"Apache-2.0"
] | null | null | null | alphafold/model/config.py | lupoglaz/alphafold | 7aabdcb19e30d1bf44b2cb18ef78f2556d4f08d9 | [
"Apache-2.0"
] | null | null | null | alphafold/model/config.py | lupoglaz/alphafold | 7aabdcb19e30d1bf44b2cb18ef78f2556d4f08d9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 39.125926 | 77 | 0.485801 |
37112ebd5c884a9078bd248120e634f2ac7ae27b | 2,203 | py | Python | misc/countlines.py | nmathewson/pynchon-gate | 899a00b471381e553a21356fed01a80b0f7d3115 | [
"MIT"
] | 25 | 2015-01-29T20:08:57.000Z | 2022-03-30T09:03:55.000Z | misc/countlines.py | abiggerhammer/pynchon-gate | 63330a5e1f6ead1f557923fa335ee831eca72e74 | [
"MIT"
] | null | null | null | misc/countlines.py | abiggerhammer/pynchon-gate | 63330a5e1f6ead1f557923fa335ee831eca72e74 | [
"MIT"
] | 2 | 2016-01-06T03:14:30.000Z | 2016-10-05T12:27:27.000Z | #!/usr/bin/python
import sys, re, tokenize, token
def countPyFile(fname):
f = open(fname)
codelines = {}
lastline = 0
IGNORE = (token.STRING, token.NEWLINE, token.INDENT, token.DEDENT)
docstrlines = 0
for toktp,tokstr,start,end,line in tokenize.generate_tokens(f.xreadlines().next):
#p... | 25.616279 | 85 | 0.563323 |
c2f588fe92b94e4dbcddbef1db1fd2cb61c2f34c | 4,410 | py | Python | nn.py | shreshthtuli/keras-py2cpp | 50f671e3d0ee4a21356fb8f853d355dc71cfb008 | [
"MIT-0",
"MIT"
] | 1 | 2019-06-27T03:47:03.000Z | 2019-06-27T03:47:03.000Z | nn.py | shreshthtuli/keras-py2cpp | 50f671e3d0ee4a21356fb8f853d355dc71cfb008 | [
"MIT-0",
"MIT"
] | 1 | 2019-01-17T08:40:11.000Z | 2019-01-22T14:42:08.000Z | nn.py | shreshthtuli/keras-py2cpp | 50f671e3d0ee4a21356fb8f853d355dc71cfb008 | [
"MIT-0",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import random
import gym
import numpy as np
import tensorflow as tf
from collections import deque
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras.optimizers import Adam
from tensorflow.keras import backend as K
from kerasify import e... | 35.564516 | 94 | 0.614739 |
2587fde0d8f94d1c82f1bee16c279632b20fe040 | 8,300 | py | Python | ansible-collections/adc/plugins/modules/citrix_adc_appfw_htmlerrorpage.py | sumanth-lingappa/citrix-adc-ansible-modules | 7d53659c3b72464855eb0d262fe2e7332d4dafd7 | [
"MIT"
] | null | null | null | ansible-collections/adc/plugins/modules/citrix_adc_appfw_htmlerrorpage.py | sumanth-lingappa/citrix-adc-ansible-modules | 7d53659c3b72464855eb0d262fe2e7332d4dafd7 | [
"MIT"
] | null | null | null | ansible-collections/adc/plugins/modules/citrix_adc_appfw_htmlerrorpage.py | sumanth-lingappa/citrix-adc-ansible-modules | 7d53659c3b72464855eb0d262fe2e7332d4dafd7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2020 Citrix Systems, Inc.
#
# 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
#... | 30.627306 | 130 | 0.621325 |
3ec2e634ec447295dad42e8114a7b6101255a7f1 | 4,003 | py | Python | examples/microphone_streaming_example.py | revdotcom/revai-python-package | 8ee68b6e017f61a79268b36f34c1ad5b8b150ef2 | [
"MIT"
] | 2 | 2018-10-23T00:45:22.000Z | 2018-11-25T08:57:27.000Z | examples/microphone_streaming_example.py | revdotcom/revai-python-package | 8ee68b6e017f61a79268b36f34c1ad5b8b150ef2 | [
"MIT"
] | 1 | 2018-10-23T00:44:41.000Z | 2018-10-23T00:44:41.000Z | examples/microphone_streaming_example.py | revdotcom/revai-python-package | 8ee68b6e017f61a79268b36f34c1ad5b8b150ef2 | [
"MIT"
] | null | null | null | """Copyright 2019 Google, Modified by REV 2019
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 writ... | 35.741071 | 84 | 0.661754 |
46d52e265173b489bf0f4ff8c0c5c6048f98ab36 | 351 | py | Python | ex019.py | thiagobachiega/python | 493b6bdee9c94e1ae8d4db06c8e5295a96f8922c | [
"MIT"
] | null | null | null | ex019.py | thiagobachiega/python | 493b6bdee9c94e1ae8d4db06c8e5295a96f8922c | [
"MIT"
] | null | null | null | ex019.py | thiagobachiega/python | 493b6bdee9c94e1ae8d4db06c8e5295a96f8922c | [
"MIT"
] | null | null | null | import random
aluno1 = input('Digite o nome do primeiro aluno: ')
aluno2 = input('Digite o nome do segundo aluno: ')
aluno3 = input('Digite o nome do terceiro aluno: ')
aluno4 = input('Digite o nome do quarto aluno: ')
lista = [aluno1, aluno2, aluno3, aluno4]
escolhido = random.choice(lista)
print('O aluno escolhido ... | 25.071429 | 52 | 0.712251 |
c82f6337fba0466e32d8feb407c08996f94e8c09 | 2,359 | py | Python | datemangler/datemangler.py | privatwolke/date-mangler | d21fce9921c65fe35d48c14b05e3e43dacdb2364 | [
"MIT"
] | 1 | 2015-10-13T00:39:11.000Z | 2015-10-13T00:39:11.000Z | datemangler/datemangler.py | privatwolke/datemangler | d21fce9921c65fe35d48c14b05e3e43dacdb2364 | [
"MIT"
] | null | null | null | datemangler/datemangler.py | privatwolke/datemangler | d21fce9921c65fe35d48c14b05e3e43dacdb2364 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# coding: utf-8
from __future__ import print_function
import os
import sys
import xattr
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from Crypto.Cipher import AES
class DateMangler:
def listdir_recursive(self, path, depth = -1):
files = []
if depth == 0... | 25.641304 | 125 | 0.69521 |
a11f100acc94fe74a6006cd7baa0b5dee165e08a | 3,313 | py | Python | test/functional/mempool_limit.py | ConneXdev/ConneX | 2a67367ef9e28109a536d5d6e4ddc11e4831022c | [
"MIT"
] | null | null | null | test/functional/mempool_limit.py | ConneXdev/ConneX | 2a67367ef9e28109a536d5d6e4ddc11e4831022c | [
"MIT"
] | null | null | null | test/functional/mempool_limit.py | ConneXdev/ConneX | 2a67367ef9e28109a536d5d6e4ddc11e4831022c | [
"MIT"
] | 2 | 2019-04-21T10:35:41.000Z | 2020-05-07T09:06:43.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mempool limiting together/eviction with the wallet."""
from decimal import Decimal
from test_fra... | 49.447761 | 166 | 0.679445 |
fd659b4da76066873535b4d1563cd8a58d6a5032 | 812 | py | Python | backend/manage.py | guoarthur/NYThyme | 2e5bdcb186936bec4d979c551b8a7250b451a64f | [
"Apache-2.0"
] | 1 | 2018-06-27T00:10:27.000Z | 2018-06-27T00:10:27.000Z | backend/manage.py | ArthurG/NYThyme | 2e5bdcb186936bec4d979c551b8a7250b451a64f | [
"Apache-2.0"
] | null | null | null | backend/manage.py | ArthurG/NYThyme | 2e5bdcb186936bec4d979c551b8a7250b451a64f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nythyme_server.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure th... | 35.304348 | 78 | 0.64532 |
914b44eec8f019f0b82150e32c9fa7b7a06f4a07 | 177 | py | Python | Python Files/pascal.py | Nmane1612/Nihar-Mane | aa4db52a384f706a431c994e4e12d8e5e0cd8402 | [
"Apache-2.0"
] | 3 | 2019-12-27T06:07:37.000Z | 2020-07-01T08:51:32.000Z | Python Files/pascal.py | Nihar16/Personal-Repository | 0d319eeb8dbfa3f7c3eb8501829939ecd6923464 | [
"MIT"
] | null | null | null | Python Files/pascal.py | Nihar16/Personal-Repository | 0d319eeb8dbfa3f7c3eb8501829939ecd6923464 | [
"MIT"
] | null | null | null | n=int(input("Enter the no of ros in pascal trainagle : "))
list=[1]
for i in range(n):
for j in range(i):
list.append(list[j-1]+list[j])
print(list)
| 22.125 | 59 | 0.564972 |
76613f4476b385c28c040d92e6a8c1aa30decaf4 | 42 | py | Python | colorprint/__main__.py | apua/colorprint | 4c8b22c21447b587dc827be83feb79084504cdaa | [
"WTFPL"
] | null | null | null | colorprint/__main__.py | apua/colorprint | 4c8b22c21447b587dc827be83feb79084504cdaa | [
"WTFPL"
] | 10 | 2015-02-10T04:00:30.000Z | 2015-03-01T06:20:36.000Z | colorprint/__main__.py | apua/colorprint | 4c8b22c21447b587dc827be83feb79084504cdaa | [
"WTFPL"
] | null | null | null | from . import commands
commands.run_cmd()
| 14 | 22 | 0.785714 |
d70dde154ff070277c233e5b1dc14cd71148cd61 | 934 | py | Python | deepcase/context_builder/embedding.py | noah-de/DeepCASE | 7254a016d99f0d0ed8128eed009b6973e1c52833 | [
"MIT"
] | 22 | 2021-07-22T13:26:16.000Z | 2022-03-16T07:22:23.000Z | deepcase/context_builder/embedding.py | noah-de/DeepCASE | 7254a016d99f0d0ed8128eed009b6973e1c52833 | [
"MIT"
] | 3 | 2021-12-21T06:33:25.000Z | 2022-03-22T09:26:44.000Z | deepcase/context_builder/embedding.py | noah-de/DeepCASE | 7254a016d99f0d0ed8128eed009b6973e1c52833 | [
"MIT"
] | 5 | 2021-07-26T15:26:51.000Z | 2022-03-16T21:41:17.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
class EmbeddingOneHot(nn.Module):
"""Embedder using simple one hot encoding."""
def __init__(self, input_size):
"""Embedder using simple one hot encoding.
Parameters
----------
input_size : int
... | 27.470588 | 66 | 0.542827 |
9430c922295ed3e4a7b190401aa1dff3cc2b6b9a | 214 | py | Python | setup.py | AlexanderSouthan/pyExperimentalDesign | d54ba275302be4f5a45a64e4e5a23858c34a1d0e | [
"MIT"
] | null | null | null | setup.py | AlexanderSouthan/pyExperimentalDesign | d54ba275302be4f5a45a64e4e5a23858c34a1d0e | [
"MIT"
] | null | null | null | setup.py | AlexanderSouthan/pyExperimentalDesign | d54ba275302be4f5a45a64e4e5a23858c34a1d0e | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='pyExperimentalDesign',
version='0.0.1',
packages=find_packages(where='src'),
install_requires=['numpy', 'pandas', 'scipy', 'statsmodels']
)
| 23.777778 | 64 | 0.696262 |
edc16b958f78e68dcf1c738e650a3a2916d89bb0 | 1,167 | py | Python | setup.py | mj/gpxpy | 85378a5c2bc62d6ef8ec21c004bba3d0d5417c95 | [
"Apache-2.0"
] | null | null | null | setup.py | mj/gpxpy | 85378a5c2bc62d6ef8ec21c004bba3d0d5417c95 | [
"Apache-2.0"
] | null | null | null | setup.py | mj/gpxpy | 85378a5c2bc62d6ef8ec21c004bba3d0d5417c95 | [
"Apache-2.0"
] | 1 | 2021-12-25T16:46:11.000Z | 2021-12-25T16:46:11.000Z | #!/usr/bin/python
# Copyright 2011 Tomo Krajina
#
# 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... | 32.416667 | 74 | 0.697515 |
d7d2f1a2087539555a7ddfc5be53c7d82be1c544 | 463 | py | Python | docs/conf.py | omega-graphics/omega-gte-project | 9f833e253bafde30ff8a7a2246d308b07cd0b00a | [
"Apache-2.0"
] | 1 | 2021-07-07T17:36:49.000Z | 2021-07-07T17:36:49.000Z | docs/conf.py | omega-graphics/omega-gte-project | 9f833e253bafde30ff8a7a2246d308b07cd0b00a | [
"Apache-2.0"
] | null | null | null | docs/conf.py | omega-graphics/omega-gte-project | 9f833e253bafde30ff8a7a2246d308b07cd0b00a | [
"Apache-2.0"
] | null | null | null |
import pygments.lexers._mapping
import sys
import os
sys.path.append(os.path.dirname(__file__))
import omegasl_highlight
pygments.lexers._mapping.LEXERS["OmegaSLLexer"] = ('omegasl_highlight', 'OmegaSL', ('omegasl',), ('AUTOM.build', '*.build'), ('text/omegasl',))
project = "OmegaGTE"
author = "Omega Graphics"
c... | 17.807692 | 143 | 0.710583 |
8d78c00bedcfd76bc03c82489d9844d86abf501e | 367 | py | Python | bobstack/siptransport/tlsSIPTransport.py | bobjects/BobStack | c177b286075044832f44baf9ace201780c8b4320 | [
"Apache-2.0"
] | null | null | null | bobstack/siptransport/tlsSIPTransport.py | bobjects/BobStack | c177b286075044832f44baf9ace201780c8b4320 | [
"Apache-2.0"
] | null | null | null | bobstack/siptransport/tlsSIPTransport.py | bobjects/BobStack | c177b286075044832f44baf9ace201780c8b4320 | [
"Apache-2.0"
] | null | null | null | from sipTransport import SIPTransport
from tlsSIPTransportConnection import TLSSIPTransportConnection
class TLSSIPTransport(SIPTransport):
@property
def transport_parameter_name(self):
return 'TLS'
def connect_to_address_and_port(self, address_string, port_integer):
# TODO
pass
... | 21.588235 | 72 | 0.711172 |
08883be8b46879b56877c308d60399982a0481ba | 4,480 | py | Python | Exercise-3/sensor_stick/scripts/segmentation.py | shahramk61/RoboND-Perception-Exercises | c3b116329b51ca7309460d8d878ac1928eb1eacd | [
"MIT"
] | null | null | null | Exercise-3/sensor_stick/scripts/segmentation.py | shahramk61/RoboND-Perception-Exercises | c3b116329b51ca7309460d8d878ac1928eb1eacd | [
"MIT"
] | null | null | null | Exercise-3/sensor_stick/scripts/segmentation.py | shahramk61/RoboND-Perception-Exercises | c3b116329b51ca7309460d8d878ac1928eb1eacd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Import modules
from pcl_helper import *
# TODO: Define functions as required
# Callback function for your Point Cloud Subscriber
def pcl_callback(pcl_msg):
# TODO: Convert ROS msg to PCL data
PCL_data = ros_to_pcl(pcl_msg)
# TODO: Voxel Grid Downsampling
vox = PCL_data.ma... | 31.328671 | 104 | 0.712277 |
9e3fcbcf28417fba3c0f9e7748a5015cdeeba41a | 7,589 | py | Python | ml4h/tensorize/database/tensorize.py | deflaux/ml4h | b1de99143b943c78cd8a1c86fcac36523c502ee5 | [
"BSD-3-Clause"
] | 45 | 2020-11-02T18:22:17.000Z | 2022-03-17T04:11:37.000Z | ml4h/tensorize/database/tensorize.py | deflaux/ml4h | b1de99143b943c78cd8a1c86fcac36523c502ee5 | [
"BSD-3-Clause"
] | 55 | 2020-11-03T19:49:53.000Z | 2022-03-17T11:04:54.000Z | ml4h/tensorize/database/tensorize.py | deflaux/ml4h | b1de99143b943c78cd8a1c86fcac36523c502ee5 | [
"BSD-3-Clause"
] | 9 | 2020-11-02T18:22:46.000Z | 2022-01-25T22:14:32.000Z | import logging
import tempfile
from typing import Dict, List
import h5py
import apache_beam as beam
from apache_beam import Pipeline
from google.cloud import storage
from ml4h.defines import TENSOR_EXT, GCS_BUCKET, JOIN_CHAR, CONCAT_CHAR, HD5_GROUP_CHAR, dataset_name_from_meaning
def tensorize_sql_fields(pipeline: ... | 43.867052 | 164 | 0.638688 |
5a88dbebc94d5c8bfd09a5ea08a066572cf280b2 | 6,647 | py | Python | src/sage/combinat/root_system/type_A_infinity.py | rekhabiswal/sage | e8633b09919542a65e7e990c8369fee30c7edefd | [
"BSL-1.0"
] | 3 | 2016-06-19T14:48:31.000Z | 2022-01-28T08:46:01.000Z | src/sage/combinat/root_system/type_A_infinity.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/root_system/type_A_infinity.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | 7 | 2021-11-08T10:01:59.000Z | 2022-03-03T11:25:52.000Z | """
Root system data for type A infinity
"""
#*****************************************************************************
# Copyright (C) 2016 Andrew Mathas <Andrew dot Mathas at Sydney dot edu dot au>
#
# Distributed under the terms of the GNU General Public License (GPL)
# http://www.gnu.org/lice... | 27.466942 | 81 | 0.480668 |
0932d3459d920999463a8ceef79eb31f3cf00c30 | 1,495 | py | Python | PartiePython/controller/NodeBookM.py | zelad/ClientBookmarkFfx | b84182112c80c73301d9d4a56f69c2fea820dd30 | [
"MIT"
] | null | null | null | PartiePython/controller/NodeBookM.py | zelad/ClientBookmarkFfx | b84182112c80c73301d9d4a56f69c2fea820dd30 | [
"MIT"
] | null | null | null | PartiePython/controller/NodeBookM.py | zelad/ClientBookmarkFfx | b84182112c80c73301d9d4a56f69c2fea820dd30 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding:Utf-8 -*-
'''
Created on 15 févr. 2016
@author: Kiki
'''
import json
class NodeBookM(object):
'''
classdocs
'''
def __init__(self,node):
'''
Constructor
'''
#partie propre à la récupération du bookMark FF
self.title =... | 28.75 | 74 | 0.482943 |
2dbfb43c7ee2b381d3470c51d2e267800e938072 | 1,308 | py | Python | scripts/graphs/tests/dtlz.py | nicholaspcr/Inicia-o_Cient-fica | cc58b96256be4cea6f8e3bd7893f8666af88f481 | [
"Apache-2.0"
] | null | null | null | scripts/graphs/tests/dtlz.py | nicholaspcr/Inicia-o_Cient-fica | cc58b96256be4cea6f8e3bd7893f8666af88f481 | [
"Apache-2.0"
] | null | null | null | scripts/graphs/tests/dtlz.py | nicholaspcr/Inicia-o_Cient-fica | cc58b96256be4cea6f8e3bd7893f8666af88f481 | [
"Apache-2.0"
] | null | null | null | from pymoo.factory import get_problem, get_reference_directions, get_visualization
from pymoo.util.plotting import plot
x = [0.040971105531507235,0.550373235584878,0.6817311625009819,0.6274478938025135,0.9234111071427142,0.02499901960750534,0.136171616578574,0.9084459589232222,0.21089363254881652,0.08574450529306678,... | 36.333333 | 238 | 0.778287 |
242d6c83529e0bad5cea56c248e55fa001623323 | 10,368 | py | Python | src/ebq_crypto_test.py | tswast/encrypted-bigquery-client | 35bdf1bbc7ea87a1482a78ad0347f4118bd0bfb1 | [
"Apache-2.0"
] | null | null | null | src/ebq_crypto_test.py | tswast/encrypted-bigquery-client | 35bdf1bbc7ea87a1482a78ad0347f4118bd0bfb1 | [
"Apache-2.0"
] | null | null | null | src/ebq_crypto_test.py | tswast/encrypted-bigquery-client | 35bdf1bbc7ea87a1482a78ad0347f4118bd0bfb1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2012 Google Inc. All Rights Reserved.
"""Unit test for ebq_crypto module."""
from google.apputils import app
import logging
from google.apputils import basetest as googletest
import ebq_crypto as ecrypto
_KEY1 = '0123456789abcdef'
_PLAINTEXT1 = 'this is test string one'
class ... | 41.806452 | 80 | 0.69184 |
5a68e2820e536586f590ec0028db58b7255b65a0 | 3,066 | py | Python | grr/CurveFit.py | nauralcodinglab/raphegif | c722875c39e83900c8a0a43f28a16d5336689a97 | [
"MIT"
] | null | null | null | grr/CurveFit.py | nauralcodinglab/raphegif | c722875c39e83900c8a0a43f28a16d5336689a97 | [
"MIT"
] | null | null | null | grr/CurveFit.py | nauralcodinglab/raphegif | c722875c39e83900c8a0a43f28a16d5336689a97 | [
"MIT"
] | null | null | null | from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from scipy import optimize
from .Tools import raiseExpectedGot
def exponential_curve(p, t):
"""Three parameter exponential.
I = (A + C) * exp (-t/tau) + C
p = [A, C, tau]
"""
A = p[0]
C = p[1]
tau = p[2]
... | 23.40458 | 79 | 0.574364 |
1d69d8037ae944cd2df487b9d9c2c5dcb9cc4380 | 4,856 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_recognize_custom_forms.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_recognize_custom_forms.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_recognize_custom_forms.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"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.
# --------------------------------------------------------------------... | 46.247619 | 105 | 0.569193 |
10858b2ec033b87a22e24cec55a4e803c041e322 | 1,117 | py | Python | modules/police.py | Team-Alphas/MissValenciaBot-Pro | 1749336d3e8b7b5568175cc67cfb929689455b6c | [
"MIT"
] | null | null | null | modules/police.py | Team-Alphas/MissValenciaBot-Pro | 1749336d3e8b7b5568175cc67cfb929689455b6c | [
"MIT"
] | null | null | null | modules/police.py | Team-Alphas/MissValenciaBot-Pro | 1749336d3e8b7b5568175cc67cfb929689455b6c | [
"MIT"
] | null | null | null | import html
import random
import time
from typing import List
from telegram import Bot, Update, ParseMode
from telegram.ext import run_async
from MissValencia import dispatcher
from MissValencia.modules.disable import DisableAbleCommandHandler
from MissValencia.modules.helper_funcs.chat_status import is_user_admin, u... | 26.595238 | 83 | 0.700985 |
e556f47b76d423049e460b0b815fbbae66a1e438 | 2,045 | py | Python | cartopy_extra_tiles/stamen_tiles.py | marceloandrioni/cartopy-extra-tiles | 81f33bd708dbbe5f0ca0eb8c44b1a864e629e2f6 | [
"MIT"
] | 1 | 2020-06-05T01:03:37.000Z | 2020-06-05T01:03:37.000Z | cartopy_extra_tiles/stamen_tiles.py | marceloandrioni/cartopy-extra-tiles | 81f33bd708dbbe5f0ca0eb8c44b1a864e629e2f6 | [
"MIT"
] | 1 | 2020-06-12T18:08:55.000Z | 2020-06-13T22:00:09.000Z | cartopy_extra_tiles/stamen_tiles.py | marceloandrioni/cartopy-extra-tiles | 81f33bd708dbbe5f0ca0eb8c44b1a864e629e2f6 | [
"MIT"
] | 1 | 2020-06-17T19:44:52.000Z | 2020-06-17T19:44:52.000Z | # ======================================================================
#
# Brad T. Aagaard, U.S. Geological Survey
#
# ======================================================================
"""Additional tiles from http://maps.stamen.com.
"""
import cartopy.crs as ccrs
from cartopy.io.img_tiles import GoogleTiles
c... | 30.984848 | 94 | 0.529584 |
15b7bdfde4856a83223e47ce8cb0a8d2f1466e39 | 8,422 | py | Python | matched_markets/methodology/tbr_iroas.py | ludmila-kuncarova/matched_markets | ded2469997e5bf5b87613f35c38aeb6d35c0ca6e | [
"Apache-2.0"
] | 17 | 2020-11-17T21:39:25.000Z | 2022-03-31T03:57:21.000Z | matched_markets/methodology/tbr_iroas.py | ludmila-kuncarova/matched_markets | ded2469997e5bf5b87613f35c38aeb6d35c0ca6e | [
"Apache-2.0"
] | 2 | 2021-04-06T23:09:49.000Z | 2021-11-04T14:43:55.000Z | matched_markets/methodology/tbr_iroas.py | ludmila-kuncarova/matched_markets | ded2469997e5bf5b87613f35c38aeb6d35c0ca6e | [
"Apache-2.0"
] | 7 | 2020-11-10T17:32:49.000Z | 2021-09-06T15:24:00.000Z | # Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 40.883495 | 80 | 0.686298 |
c360eacf11e6e20ae02da6a36521c314b4f3ed0d | 4,915 | py | Python | core/services.py | alexander-koval/bctip | 60b0eeaf4a62123af5c0f4d65aa184e23c9910db | [
"MIT"
] | null | null | null | core/services.py | alexander-koval/bctip | 60b0eeaf4a62123af5c0f4d65aa184e23c9910db | [
"MIT"
] | null | null | null | core/services.py | alexander-koval/bctip | 60b0eeaf4a62123af5c0f4d65aa184e23c9910db | [
"MIT"
] | null | null | null | import json
from typing import Optional, Dict, Tuple, TypedDict
import shortuuid as shortuuid
from bctip.local_settings import WALLET
from lnbits import bolt11
from lnbits.bolt11 import Invoice
from wallets.base import PaymentStatus, PaymentResponse
from .models import Payment, Wallet
def create_invoice(wallet_id: ... | 37.807692 | 110 | 0.630519 |
a64529278875177bd516533bef3c49a3824cdaf5 | 3,204 | py | Python | examples/cvae/mnist.py | nipunbatra/pyro | d5b0545c4f992d435692080db6969314a2c32f05 | [
"Apache-2.0"
] | 4,959 | 2017-11-03T14:39:17.000Z | 2019-02-04T16:14:30.000Z | examples/cvae/mnist.py | nipunbatra/pyro | d5b0545c4f992d435692080db6969314a2c32f05 | [
"Apache-2.0"
] | 985 | 2017-11-03T14:27:56.000Z | 2019-02-02T18:52:54.000Z | examples/cvae/mnist.py | nipunbatra/pyro | d5b0545c4f992d435692080db6969314a2c32f05 | [
"Apache-2.0"
] | 564 | 2017-11-03T15:05:55.000Z | 2019-01-31T14:02:29.000Z | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import torch
from torch.utils.data import DataLoader, Dataset
from torchvision.transforms import Compose, functional
from pyro.contrib.examples.util import MNIST
class CVAEMNIST(Dataset):
def __init__(self, ro... | 33.726316 | 81 | 0.634207 |
f22f25670f6bfc34082f365e0c88f4fec7c8f12b | 7,334 | py | Python | squarelet_auth/organizations/models.py | MuckRock/squarelet-auth | 17189b2f90b0d54fdd0d3c468833f719c07bc2a1 | [
"BSD-3-Clause"
] | null | null | null | squarelet_auth/organizations/models.py | MuckRock/squarelet-auth | 17189b2f90b0d54fdd0d3c468833f719c07bc2a1 | [
"BSD-3-Clause"
] | null | null | null | squarelet_auth/organizations/models.py | MuckRock/squarelet-auth | 17189b2f90b0d54fdd0d3c468833f719c07bc2a1 | [
"BSD-3-Clause"
] | null | null | null | # Django
from django.contrib.postgres.fields import JSONField
from django.db import models
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
# Standard Library
import logging
from uuid import uuid4
# SquareletAuth
from squarelet_auth import settings
logger = logging.getLogger(__n... | 29.813008 | 86 | 0.605263 |
a80ba4c3adabb7c0d7bffd6c43c7def17c4f31f5 | 610 | py | Python | tests/pipeline/ios/test_gdrive_io.py | jorgetagle/dagger | dafcfb9df904e512f050aefdacf6581c571bac23 | [
"MIT"
] | 5 | 2020-09-09T11:44:49.000Z | 2021-12-31T14:07:00.000Z | tests/pipeline/ios/test_gdrive_io.py | jorgetagle/dagger | dafcfb9df904e512f050aefdacf6581c571bac23 | [
"MIT"
] | null | null | null | tests/pipeline/ios/test_gdrive_io.py | jorgetagle/dagger | dafcfb9df904e512f050aefdacf6581c571bac23 | [
"MIT"
] | 3 | 2021-08-31T10:14:42.000Z | 2022-02-28T17:03:39.000Z | import unittest
from dagger.pipeline.io_factory import gdrive_io
import yaml
class GDriveIOTest(unittest.TestCase):
def setUp(self) -> None:
with open('tests/fixtures/pipeline/ios/gdrive_io.yaml', "r") as stream:
config = yaml.safe_load(stream)
self.db_io = gdrive_io.GDriveIO(config,... | 33.888889 | 86 | 0.718033 |
9f08f3f5111eba35bdf06a385c6a8ae11aefa47f | 4,001 | py | Python | tools.py | dryerem/SPBKitBot | b80989312e8b83c976f0a68b5afdd5da78c9e511 | [
"Apache-2.0"
] | null | null | null | tools.py | dryerem/SPBKitBot | b80989312e8b83c976f0a68b5afdd5da78c9e511 | [
"Apache-2.0"
] | null | null | null | tools.py | dryerem/SPBKitBot | b80989312e8b83c976f0a68b5afdd5da78c9e511 | [
"Apache-2.0"
] | null | null | null | import requests
from typing import Union
from bs4 import BeautifulSoup
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36',
'Accept': 'application/json, text/javascript, */*; q=0.01'}
url_replacements: str = 'http:/... | 31.753968 | 143 | 0.577106 |
5b690f8d77d6d8eae1adc4bf8b04d3dd3db3462a | 31 | py | Python | src/aceinna/tools/__init__.py | lihaiyong827/python-openimu | f1c536ba4182aaeabd87b63c08ebd92f97e8dbb4 | [
"Apache-2.0"
] | 64 | 2019-01-16T10:06:37.000Z | 2022-03-24T03:17:48.000Z | src/aceinna/tools/__init__.py | lihaiyong827/python-openimu | f1c536ba4182aaeabd87b63c08ebd92f97e8dbb4 | [
"Apache-2.0"
] | 52 | 2018-06-25T22:15:14.000Z | 2022-03-10T07:30:56.000Z | src/aceinna/tools/__init__.py | lihaiyong827/python-openimu | f1c536ba4182aaeabd87b63c08ebd92f97e8dbb4 | [
"Apache-2.0"
] | 31 | 2018-12-19T00:10:08.000Z | 2022-03-19T02:14:03.000Z | from .detector import Detector
| 15.5 | 30 | 0.83871 |
336d14734638ab4a907aedfa9f756592a1172225 | 524 | py | Python | boj/bfs/boj_16948_1.py | ruslanlvivsky/python-algorithm | 2b49bed33cd0e95b8a1e758008191f4392b3f667 | [
"MIT"
] | 3 | 2021-07-18T14:40:24.000Z | 2021-08-14T18:08:13.000Z | boj/bfs/boj_16948_1.py | jinsuSang/python-algorithm | 524849a0a7e71034d329fef63c4f384930334177 | [
"MIT"
] | null | null | null | boj/bfs/boj_16948_1.py | jinsuSang/python-algorithm | 524849a0a7e71034d329fef63c4f384930334177 | [
"MIT"
] | null | null | null | dx = [-1, 1, -2, 2, -1, 1]
dy = [-2, -2, 0, 0, 2, 2]
N = int(input())
sy, sx, ey, ex = map(int, input().split())
queue = [(sy, sx, 0)]
visited = [[False] * N for _ in range(N)]
result = -1
while queue:
ny, nx, cnt = queue.pop(0)
if ny == ey and nx == ex:
result = cnt
break
for i in rang... | 20.96 | 63 | 0.467557 |
482beb36a8575721d7f3ae6ff784ceaa959689cb | 168 | py | Python | (1) 24-Point Star.py | thedoodler/Designs_Using_Python_Turtle | f6507fbae6f9490ea2b102c250c2c815522a8651 | [
"CC0-1.0"
] | 16 | 2021-01-19T06:01:56.000Z | 2021-06-04T05:49:49.000Z | (1) 24-Point Star.py | Kushal997-das/Designs_Using_Python_Turtle | 55bc8fe7052d342ccc7bce7f28c6f02b3e0488ca | [
"CC0-1.0"
] | null | null | null | (1) 24-Point Star.py | Kushal997-das/Designs_Using_Python_Turtle | 55bc8fe7052d342ccc7bce7f28c6f02b3e0488ca | [
"CC0-1.0"
] | 2 | 2020-10-07T10:16:54.000Z | 2021-01-19T05:20:52.000Z | import turtle
t = turtle.Turtle()
for c in ['red', 'green', 'blue', 'purple']:
for i in range (1,7):
t.color(c)
t.forward(75)
t.left(90)
t.left(15)
| 15.272727 | 44 | 0.553571 |
a0fe1650074da0a42022991366bc46076dd1d14f | 6,503 | py | Python | test/functional/receivedby.py | tmiholdings/tmi | f1b6027f025dafc40616cde076df2f4b8cdae8a2 | [
"MIT"
] | null | null | null | test/functional/receivedby.py | tmiholdings/tmi | f1b6027f025dafc40616cde076df2f4b8cdae8a2 | [
"MIT"
] | null | null | null | test/functional/receivedby.py | tmiholdings/tmi | f1b6027f025dafc40616cde076df2f4b8cdae8a2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The TMIcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the listreceivedbyaddress RPC."""
from test_framework.test_framework import TMIcoinTestFramework
... | 43.939189 | 139 | 0.632016 |
e8b4817780c9863963a412cc0310a570dd47e3f7 | 5,762 | py | Python | maddpg/common/replay_buffer.py | enikon/MACP | 2de004d4eaf09f3b02dde3b7041ce6d693d0c25c | [
"MIT"
] | null | null | null | maddpg/common/replay_buffer.py | enikon/MACP | 2de004d4eaf09f3b02dde3b7041ce6d693d0c25c | [
"MIT"
] | null | null | null | maddpg/common/replay_buffer.py | enikon/MACP | 2de004d4eaf09f3b02dde3b7041ce6d693d0c25c | [
"MIT"
] | null | null | null | import numpy as np
import random
class ReplayBuffer(object):
def __init__(self, size):
"""Create Prioritized Replay buffer.
Parameters
----------
size: int
Max number of transitions to store in the buffer. When the buffer
overflows the old memories are drop... | 30.812834 | 108 | 0.569594 |
f57e7c8c8bf400f8b67771ced82b99cf20821430 | 326 | py | Python | onnx_tensorrt/__init__.py | KevinShek/onnx-tensorrt | 129efb0452fb56c652bfc97d9099d51124d3189a | [
"Apache-2.0"
] | null | null | null | onnx_tensorrt/__init__.py | KevinShek/onnx-tensorrt | 129efb0452fb56c652bfc97d9099d51124d3189a | [
"Apache-2.0"
] | null | null | null | onnx_tensorrt/__init__.py | KevinShek/onnx-tensorrt | 129efb0452fb56c652bfc97d9099d51124d3189a | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import
import pkg_resources
from . import backend
__version__ = "8.2.1"
try:
# The version is defined in setup.py
__version__ = pkg_resources.require("onnx_tensorrt")[0].version
except pkg_resources.DistributionNotFound:
__version__ =... | 21.733333 | 67 | 0.769939 |
27d37e056641dceaed64ce9adc2f86d44e19c67c | 36,490 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/operations/_policy_exemptions_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/operations/_policy_exemptions_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/operations/_policy_exemptions_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 ... | 55.795107 | 266 | 0.6718 |
d1b48d12dd4dbbb01dae2d736dbeec0d9e4dfd80 | 8,332 | py | Python | fontrender/workspace/wikiextractor-master/cirrus-extract.py | awanishraj/Shaili_Word_Recognition_Android | 3e3efec6ae5c27483623a789d7bda47260c1148c | [
"Apache-2.0"
] | null | null | null | fontrender/workspace/wikiextractor-master/cirrus-extract.py | awanishraj/Shaili_Word_Recognition_Android | 3e3efec6ae5c27483623a789d7bda47260c1148c | [
"Apache-2.0"
] | null | null | null | fontrender/workspace/wikiextractor-master/cirrus-extract.py | awanishraj/Shaili_Word_Recognition_Android | 3e3efec6ae5c27483623a789d7bda47260c1148c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# =============================================================================
# Version: 1.00 (December 15, 2015)
# Author: Giuseppe Attardi (attardi@di.unipi.it), University of Pisa
#
# =============================================================================
# ... | 33.732794 | 91 | 0.558209 |
a470ff5926478b1f6b877e63cda6b0979be4f24d | 734 | py | Python | webapi/cvmfsmon_geo.py | edytuk/cvmfs-servermon | a40b55519ce06f645905160419d020bb092cfdae | [
"BSD-2-Clause"
] | 1 | 2018-08-31T20:56:28.000Z | 2018-08-31T20:56:28.000Z | webapi/cvmfsmon_geo.py | edytuk/cvmfs-servermon | a40b55519ce06f645905160419d020bb092cfdae | [
"BSD-2-Clause"
] | 4 | 2020-03-05T00:06:51.000Z | 2021-12-09T15:34:41.000Z | webapi/cvmfsmon_geo.py | edytuk/cvmfs-servermon | a40b55519ce06f645905160419d020bb092cfdae | [
"BSD-2-Clause"
] | 2 | 2021-09-27T07:37:39.000Z | 2021-12-13T12:57:19.000Z | try:
from urllib import request as urllib_request
except ImportError: # python < 3
import urllib2 as urllib_request
def runtest(repo, server, headers):
url = ('http://%s/cvmfs/%s/api/v1.0/geo/cvmfs-stratum-one.cern.ch'
'/cvmfs-s1fnal.opensciencegrid.org,cvmfs-stratum-one.cern.ch,cvmfs-stratum-... | 31.913043 | 101 | 0.626703 |
39fa4e890822f264c1def08655b851904240932c | 8,050 | py | Python | python/happyfuntokenizing.py | arunchaganty/presidential-debates | be56ddcb78ad94c1ea25120572acc1f79e0c32f3 | [
"MIT"
] | null | null | null | python/happyfuntokenizing.py | arunchaganty/presidential-debates | be56ddcb78ad94c1ea25120572acc1f79e0c32f3 | [
"MIT"
] | 3 | 2015-12-03T00:30:26.000Z | 2016-01-05T22:07:20.000Z | python/happyfuntokenizing.py | arunchaganty/presidential-debates | be56ddcb78ad94c1ea25120572acc1f79e0c32f3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This code implements a basic, Twitter-aware tokenizer.
A tokenizer is a function that splits a string of text into words. In
Python terms, we map string and unicode objects into lists of unicode
objects.
There is not a single right way to do tokenizing. The best meth... | 34.848485 | 249 | 0.542981 |
15c3fd4fae6db240c00dd261b6329e3051595136 | 9,828 | py | Python | actilectrum/plugins/safe_t/clientbase.py | Actinium-project/Actilectrum | e703508283c240474261203b9eefcea2442852d4 | [
"MIT"
] | 2 | 2019-02-21T19:09:54.000Z | 2019-06-19T09:19:57.000Z | actilectrum/plugins/safe_t/clientbase.py | Actinium-project/Actilectrum | e703508283c240474261203b9eefcea2442852d4 | [
"MIT"
] | 1 | 2021-11-05T08:28:59.000Z | 2021-11-05T08:29:48.000Z | actilectrum/plugins/safe_t/clientbase.py | Actinium-project/Actilectrum | e703508283c240474261203b9eefcea2442852d4 | [
"MIT"
] | 1 | 2019-12-06T02:25:50.000Z | 2019-12-06T02:25:50.000Z | import time
from struct import pack
from typing import Optional
from actilectrum import ecc
from actilectrum.i18n import _
from actilectrum.util import UserCancelled
from actilectrum.keystore import bip39_normalize_passphrase
from actilectrum.bip32 import BIP32Node, convert_bip32_path_to_list_of_uint32
from actilectru... | 38.692913 | 119 | 0.624847 |
00b06fae1369c8f9e29b5100aaf08a9496868533 | 3,123 | py | Python | app/app/settings.py | sujitnoronha/app-api | 35a093f8edb811f29c054d832939bc868ef0a2fc | [
"MIT"
] | null | null | null | app/app/settings.py | sujitnoronha/app-api | 35a093f8edb811f29c054d832939bc868ef0a2fc | [
"MIT"
] | null | null | null | app/app/settings.py | sujitnoronha/app-api | 35a093f8edb811f29c054d832939bc868ef0a2fc | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 2.1.15.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Bu... | 25.185484 | 91 | 0.695805 |
0f85d03768cde145589802ef044c8c1d3f1d3928 | 1,222 | py | Python | tools/mo/openvino/tools/mo/front/caffe/binarization.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 1,127 | 2018-10-15T14:36:58.000Z | 2020-04-20T09:29:44.000Z | tools/mo/openvino/tools/mo/front/caffe/binarization.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 439 | 2018-10-20T04:40:35.000Z | 2020-04-19T05:56:25.000Z | tools/mo/openvino/tools/mo/front/caffe/binarization.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 414 | 2018-10-17T05:53:46.000Z | 2020-04-16T17:29:53.000Z | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from openvino.tools.mo.front.common.partial_infer.utils import float32_array
from openvino.tools.mo.ops.fakequantize import FakeQuantize
from openvino.tools.mo.front.common.replacement import FrontReplacementOp
from openvino.tools.mo.gra... | 39.419355 | 101 | 0.680033 |
5a3148d9980c287cf05bc6d1ec3f80fe6e4bdaa6 | 4,349 | py | Python | examples/nlp/duplex_text_normalization/helpers.py | Malkovsky/NeMo | 8cf9aad8ecba36f1bd7b096cf274c2bc8ac695c3 | [
"Apache-2.0"
] | null | null | null | examples/nlp/duplex_text_normalization/helpers.py | Malkovsky/NeMo | 8cf9aad8ecba36f1bd7b096cf274c2bc8ac695c3 | [
"Apache-2.0"
] | null | null | null | examples/nlp/duplex_text_normalization/helpers.py | Malkovsky/NeMo | 8cf9aad8ecba36f1bd7b096cf274c2bc8ac695c3 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION. 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 appli... | 44.835052 | 164 | 0.716946 |
018efaf8f961d45f99e912ccef15a3dd5a8c4ed6 | 925 | py | Python | kitsupublisher/ui_data/table_headers.py | cgwire-sunding/kitsu-publisher | a1e037bb66cb10532b1b1784469cea0a22f00bcb | [
"MIT"
] | 6 | 2020-08-31T13:57:50.000Z | 2021-11-11T20:24:05.000Z | kitsupublisher/ui_data/table_headers.py | cgwire-sunding/kitsu-publisher | a1e037bb66cb10532b1b1784469cea0a22f00bcb | [
"MIT"
] | 14 | 2020-03-09T15:44:39.000Z | 2020-08-10T08:01:08.000Z | kitsupublisher/ui_data/table_headers.py | cgwire-sunding/kitsu-publisher | a1e037bb66cb10532b1b1784469cea0a22f00bcb | [
"MIT"
] | 2 | 2020-03-09T11:10:07.000Z | 2020-07-24T06:10:03.000Z | """
Module with the header names of the table.
The keys are the task attributes we want to display, the values are the names
the columns will have in the table.
"""
from kitsupublisher.utils.pyversion import python_version
if python_version() >= (3, 6, 0):
tab_columns = {
"project_name": "Prod",
"t... | 29.83871 | 77 | 0.572973 |
a5adfed43b2c6d71da964c04efd168490fa6f7f6 | 9,434 | py | Python | ms3/app.py | hlinnaka/ms3 | 33f29c8f487bca80f810973475384a7120c1c569 | [
"MIT"
] | 1 | 2021-11-29T10:16:21.000Z | 2021-11-29T10:16:21.000Z | ms3/app.py | hlinnaka/ms3 | 33f29c8f487bca80f810973475384a7120c1c569 | [
"MIT"
] | null | null | null | ms3/app.py | hlinnaka/ms3 | 33f29c8f487bca80f810973475384a7120c1c569 | [
"MIT"
] | null | null | null | """
The Tornado application
"""
import os
import errno
import shutil
import socket
import hashlib
import logging
import urllib.parse
import tornado.web
import tornado.ioloop
import tornado.httpserver
from tornado.options import options, define
import ms3.general_options as general_options
from ms3.commands import... | 32.986014 | 80 | 0.5742 |
81272abe42e5d0a8c869a81c4a139f9f5b8d87b5 | 6,742 | py | Python | perceptual_advex/datasets.py | kevinbro96/perceptual-advex | e40ee996ab8c4ae4575004bf7b6b8ab5757ed6bb | [
"MIT"
] | 45 | 2021-01-28T22:30:13.000Z | 2022-03-11T07:01:04.000Z | perceptual_advex/datasets.py | kevinbro96/perceptual-advex | e40ee996ab8c4ae4575004bf7b6b8ab5757ed6bb | [
"MIT"
] | 11 | 2021-03-01T08:36:30.000Z | 2021-08-04T05:52:55.000Z | perceptual_advex/datasets.py | kevinbro96/perceptual-advex | e40ee996ab8c4ae4575004bf7b6b8ab5757ed6bb | [
"MIT"
] | 9 | 2021-02-15T18:09:38.000Z | 2022-03-11T22:25:17.000Z | import torch
import tempfile
import os
import numpy as np
from torchvision.datasets import CIFAR10
from robustness.datasets import CIFAR, DATASETS, DataSet, CustomImageNet
from robustness.data_augmentation import TRAIN_TRANSFORMS_IMAGENET, \
TEST_TRANSFORMS_IMAGENET
from robustness import data_augmentation
from t... | 27.406504 | 91 | 0.422278 |
46d9240bb24ff88c9efa53d672ee7c7686c31001 | 3,889 | py | Python | src/rsa_aes.py | uunicorn/pyskype | d1b10b31ef9d1dd3df2584fda51ee60ad3655ebe | [
"MIT"
] | 21 | 2015-03-14T07:16:44.000Z | 2021-11-13T14:13:05.000Z | src/rsa_aes.py | uunicorn/pyskype | d1b10b31ef9d1dd3df2584fda51ee60ad3655ebe | [
"MIT"
] | 6 | 2015-03-29T23:40:17.000Z | 2016-07-25T01:33:22.000Z | src/rsa_aes.py | uunicorn/pyskype | d1b10b31ef9d1dd3df2584fda51ee60ad3655ebe | [
"MIT"
] | 9 | 2015-03-14T13:33:20.000Z | 2021-11-05T16:24:28.000Z |
import os
from struct import pack, unpack
from binascii import *
from hashlib import *
from Crypto.Cipher import AES
import pack41, pack42
from things import *
from cred import *
login_key = 0xa8f223612f4f5fc81ef1ca5e310b0b21532a72df6c1af0fbec87304aec983aab5d74a14cc72e53ef7752a248c0e5abe09484b597692015e796350989c88b... | 30.382813 | 398 | 0.572641 |
e4498ee06672d08f13c5b652696a44d5803f6c7e | 2,073 | py | Python | src/example/settings.py | structsure/charon | e8fd7eef1dc85479ff52dadcb01a64d47c7325ed | [
"BSD-3-Clause"
] | 2 | 2019-04-30T16:22:42.000Z | 2019-05-01T14:39:40.000Z | src/example/settings.py | OSSSP/charon | e8fd7eef1dc85479ff52dadcb01a64d47c7325ed | [
"BSD-3-Clause"
] | 2 | 2019-04-30T14:55:40.000Z | 2019-05-22T16:55:39.000Z | src/example/settings.py | OSSSP/charon | e8fd7eef1dc85479ff52dadcb01a64d47c7325ed | [
"BSD-3-Clause"
] | 3 | 2019-04-30T15:16:51.000Z | 2021-08-22T17:12:53.000Z | import os
from schema import get_schema
from auth import AssignSecAuth
MONGO_HOST = os.environ['MONGO_HOST']
MONGO_PORT = os.getenv('MONGO_PORT', 27017)
X_DOMAIN = "*"
X_HEADERS = ["Access-Control-Allow-Origin", "Access-Control-Allow-Headers"]
X_EXPOSE_HEADERS = ["Access-Control-Allow-Origin", "Access-Control-Allow-... | 29.197183 | 100 | 0.557646 |
4927d3f9729e35ceea51c4aa41707f2eb7d8b742 | 4,116 | py | Python | sympy/physics/quantum/tests/test_matrixutils.py | yupbank/sympy | 66d7aef9dc1b26055af22e27ba42004c40b95d7c | [
"BSD-3-Clause"
] | 1 | 2021-11-19T03:38:42.000Z | 2021-11-19T03:38:42.000Z | sympy/physics/quantum/tests/test_matrixutils.py | yupbank/sympy | 66d7aef9dc1b26055af22e27ba42004c40b95d7c | [
"BSD-3-Clause"
] | null | null | null | sympy/physics/quantum/tests/test_matrixutils.py | yupbank/sympy | 66d7aef9dc1b26055af22e27ba42004c40b95d7c | [
"BSD-3-Clause"
] | null | null | null | from sympy.core.random import randint
from sympy.core.numbers import Integer
from sympy.matrices.dense import (Matrix, ones, zeros)
from sympy.physics.quantum.matrixutils import (
to_sympy, to_numpy, to_scipy_sparse, matrix_tensor_product,
matrix_to_zero, matrix_zeros, numpy_ndarray, scipy_sparse_matrix
)
fr... | 30.043796 | 77 | 0.673226 |
0dbf6907356baf690df09010a56415c95553a520 | 567 | py | Python | HackyEaster/he2022/level8/ch35/server.py | tbrup/ctf-writeups | dfac11abb3051af657ed3384c3c389c14a40c10e | [
"MIT"
] | null | null | null | HackyEaster/he2022/level8/ch35/server.py | tbrup/ctf-writeups | dfac11abb3051af657ed3384c3c389c14a40c10e | [
"MIT"
] | null | null | null | HackyEaster/he2022/level8/ch35/server.py | tbrup/ctf-writeups | dfac11abb3051af657ed3384c3c389c14a40c10e | [
"MIT"
] | null | null | null | import socket
def handle_client(client_socket):
import subprocess
while True:
client_socket.send(b'> ')
request = client_socket.recv(1024)[:-1].decode('ascii')
# print( f"[*] Received: {request}")
res = subprocess.run(request.split(' '), capture_output=True)
client_socket... | 27 | 69 | 0.68254 |
ff8c2e06ced60758d90407527a64ab4c8dd481ef | 3,645 | py | Python | surchessake_website/settings.py | blakelawyer/surchessake-website-django | 6d1f0f2dc4e32ac5f4dd99ea08ad52397bb954de | [
"MIT"
] | 1 | 2021-09-09T01:27:21.000Z | 2021-09-09T01:27:21.000Z | surchessake_website/settings.py | bond1999/surchessake-website-django | 6d1f0f2dc4e32ac5f4dd99ea08ad52397bb954de | [
"MIT"
] | null | null | null | surchessake_website/settings.py | bond1999/surchessake-website-django | 6d1f0f2dc4e32ac5f4dd99ea08ad52397bb954de | [
"MIT"
] | 1 | 2021-09-09T01:27:19.000Z | 2021-09-09T01:27:19.000Z | """
Django settings for surchessake_website project.
Generated by 'django-admin startproject' using Django 3.2.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
i... | 26.223022 | 91 | 0.707819 |
dfaabc2dbf56f03268031d4ea4e55d17194d45bd | 2,553 | py | Python | hw8.py | jschmidtnj/CS115 | fa2374f1ae9c9b63e572850a97af6086112d7a36 | [
"MIT"
] | null | null | null | hw8.py | jschmidtnj/CS115 | fa2374f1ae9c9b63e572850a97af6086112d7a36 | [
"MIT"
] | null | null | null | hw8.py | jschmidtnj/CS115 | fa2374f1ae9c9b63e572850a97af6086112d7a36 | [
"MIT"
] | 1 | 2022-01-03T01:44:39.000Z | 2022-01-03T01:44:39.000Z | '''
Created on Oct 31, 2017
@author: jschmid3@stevens.edu
Pledge: I pledge my honor that I have abided by the Stevens Honor System -Joshua Schmidt
CS115 - Hw 8
'''
def numToBase(n, b):
"""converts a number in decimal to base b"""
if n == 0:
return '0'
def numToBaseHelper(n,b):
"""helps... | 30.035294 | 91 | 0.5519 |
06a08bc9f855bf4bcb757caa4fec03e6da241e12 | 5,597 | py | Python | tests/languages/docker_test.py | xjin-Confluent/pre-commit | 669222f1872e2c322303f08edd3343150fa491c4 | [
"MIT"
] | 2 | 2021-08-21T07:39:36.000Z | 2021-12-15T10:25:45.000Z | tests/languages/docker_test.py | xjin-Confluent/pre-commit | 669222f1872e2c322303f08edd3343150fa491c4 | [
"MIT"
] | 6 | 2021-07-16T19:07:02.000Z | 2021-12-21T19:09:26.000Z | tests/languages/docker_test.py | LaudateCorpus1/pre-commit | 52e3bdf9ee12778dbbcf8389620c6d0639fd4aa6 | [
"MIT"
] | 3 | 2021-07-15T22:11:30.000Z | 2022-03-16T18:07:26.000Z | import builtins
import json
import ntpath
import os.path
import posixpath
from unittest import mock
import pytest
from pre_commit.languages import docker
DOCKER_CGROUP_EXAMPLE = b'''\
12:hugetlb:/docker/c33988ec7651ebc867cb24755eaf637a6734088bc7eef59d5799293a9e5450f7
11:blkio:/docker/c33988ec7651ebc867cb24755eaf637a... | 32.166667 | 95 | 0.740575 |
d16809886ee0e1ab770b4cdac9359743212e093e | 18,036 | py | Python | google/monitoring/dashboard/v1/monitoring-dashboard-v1-py/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/monitoring/dashboard/v1/monitoring-dashboard-v1-py/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/monitoring/dashboard/v1/monitoring-dashboard-v1-py/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 45.89313 | 92 | 0.639 |
7382053380ceac88ea4129712577457343167bd2 | 1,716 | py | Python | app.py | BuildWeek-ft-airbnb-6/airbnb-plotly-dash-app | 4ad98c1016427ee4b6edf03ba2bc51114a66765b | [
"MIT"
] | 1 | 2021-08-29T03:37:29.000Z | 2021-08-29T03:37:29.000Z | app.py | jbehringer95/airbnb-plotly-dash-app | 4ad98c1016427ee4b6edf03ba2bc51114a66765b | [
"MIT"
] | null | null | null | app.py | jbehringer95/airbnb-plotly-dash-app | 4ad98c1016427ee4b6edf03ba2bc51114a66765b | [
"MIT"
] | 3 | 2021-05-25T17:15:40.000Z | 2021-05-26T18:28:10.000Z | import dash
import dash_bootstrap_components as dbc
"""
https://github.com/facultyai/dash-bootstrap-components
dash-bootstrap-components provides Bootstrap components.
Plotly Dash is great! However, creating the initial layout can require a lot
of boilerplate. dash-bootstrap-components reduces this boilerplate by p... | 29.586207 | 89 | 0.794872 |
327103e241bf5701fbf1a47f90baef283f91c276 | 657 | py | Python | ten2any.py | Kevin-SJW/Enterprise-programming-exercises | 7b64e7c7c0d4b5bb4624b7ce3f5875485ab2d614 | [
"MIT"
] | 1 | 2019-05-12T11:17:57.000Z | 2019-05-12T11:17:57.000Z | ten2any.py | Kevin-SJW/Enterprise-programming-exercises | 7b64e7c7c0d4b5bb4624b7ce3f5875485ab2d614 | [
"MIT"
] | null | null | null | ten2any.py | Kevin-SJW/Enterprise-programming-exercises | 7b64e7c7c0d4b5bb4624b7ce3f5875485ab2d614 | [
"MIT"
] | null | null | null | #coding:utf-8
import os
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
from string import digits, ascii_uppercase, ascii_lowercase
Alphabet = digits + ascii_lowercase + ascii_uppercase
print ("Alphabet:",Alphabet)
#iteration
def ten2any(n,b=62):
ret =""
while n>0:
n,index = divmod(n,b)
ret = Alph... | 17.756757 | 59 | 0.636225 |
1aa97ec6bff8389c86272dfd3d17d51bdc16d32c | 5,712 | py | Python | sept/balancer.py | Ahuge/sept | da898e0a81a16ef1b0b5a0d0d13655b77c4a2aab | [
"MIT"
] | 5 | 2021-01-04T17:59:45.000Z | 2021-03-26T14:58:56.000Z | sept/balancer.py | Ahuge/sept | da898e0a81a16ef1b0b5a0d0d13655b77c4a2aab | [
"MIT"
] | 7 | 2021-01-04T17:13:33.000Z | 2022-03-07T19:59:27.000Z | sept/balancer.py | Ahuge/sept | da898e0a81a16ef1b0b5a0d0d13655b77c4a2aab | [
"MIT"
] | null | null | null | from sept.errors import (
ClosingBalancingParenthesisError,
OpeningBalancingParenthesisError,
)
START_TOK = "{"
CLOSE_TOK = "}"
class ParenthesisBalancer(object):
"""
The ParenthesisBalancer class runs a stack based pairing lookup against the "{{" and "}}" pairs.
It will check for any unbalanced... | 39.123288 | 205 | 0.596814 |
00a7e22134996edd24cc84b11678134526570f62 | 510 | py | Python | py-assert.py | psbharathy/python-snippets | 2a730c0e33ebee6074010c2f8552efc6d9b429c6 | [
"MIT"
] | null | null | null | py-assert.py | psbharathy/python-snippets | 2a730c0e33ebee6074010c2f8552efc6d9b429c6 | [
"MIT"
] | null | null | null | py-assert.py | psbharathy/python-snippets | 2a730c0e33ebee6074010c2f8552efc6d9b429c6 | [
"MIT"
] | null | null | null | # Python Assert
def attendance(days):
assert len(days) !=0, "Days should not be empty"
return 8 * days[0]
print("Total number of hours is ",attendance([20]))
print("Total number of hours is ",attendance([]))
# Output
# Traceback (most recent call last):
# File "py-assert.py", line 8, in <module>
# print... | 28.333333 | 55 | 0.668627 |
b2ef7649a42a1ac49cc35bdde5e81ea23d530f59 | 215 | py | Python | scripts/deploy_erc20.py | Jurassick89/dev-bootcamp-brownie | 61ca2cb63b031ca61eca4cf74ccaebc29c3aff3b | [
"MIT"
] | null | null | null | scripts/deploy_erc20.py | Jurassick89/dev-bootcamp-brownie | 61ca2cb63b031ca61eca4cf74ccaebc29c3aff3b | [
"MIT"
] | null | null | null | scripts/deploy_erc20.py | Jurassick89/dev-bootcamp-brownie | 61ca2cb63b031ca61eca4cf74ccaebc29c3aff3b | [
"MIT"
] | null | null | null | from brownie import ERC20Basic, config, accounts
def deployContract():
account = accounts.add(config["wallets"]["from_key"])
ERC20Basic.deploy(100000000,{'from': account})
def main():
deployContract()
| 23.888889 | 57 | 0.716279 |
8d55d009f26a80047e95f859c4141577762426ab | 1,313 | py | Python | Tencent/Sexy_Video_Detection/grab_cut3.py | orange-eng/internship | c8c566df453d3a4bdf692338f74916ae15792fa1 | [
"Apache-2.0"
] | 2 | 2021-11-14T14:09:47.000Z | 2022-02-08T22:04:50.000Z | Tencent/Sexy_Video_Detection/grab_cut3.py | orange-eng/internship | c8c566df453d3a4bdf692338f74916ae15792fa1 | [
"Apache-2.0"
] | null | null | null | Tencent/Sexy_Video_Detection/grab_cut3.py | orange-eng/internship | c8c566df453d3a4bdf692338f74916ae15792fa1 | [
"Apache-2.0"
] | null | null | null |
import cv2
import numpy as np
def readimg(src_path,background_path):
src = cv2.imread(src_path)
background = cv2.imread(background_path)
h, w, ch = src.shape
mask = np.zeros(src.shape[:2], dtype=np.uint8)
rect = (53,12,w-100,h-12)
bgdmodel = np.zeros((1,65),np.float64)
fgdmodel = np.zeros((1,65),np.float64)... | 25.745098 | 74 | 0.650419 |
752bab7687d479b1c2927019505c11dbf694f9b6 | 4,599 | py | Python | src/streamlink/plugins/picarto.py | mkbloke/streamlink | a6fa3c87efcef52a7a50b7879eb1e3e6cffe3bad | [
"BSD-2-Clause"
] | 10 | 2017-04-10T18:25:41.000Z | 2021-09-15T20:14:58.000Z | src/streamlink/plugins/picarto.py | mkbloke/streamlink | a6fa3c87efcef52a7a50b7879eb1e3e6cffe3bad | [
"BSD-2-Clause"
] | 9 | 2020-04-04T09:49:52.000Z | 2020-04-21T01:52:02.000Z | src/streamlink/plugins/picarto.py | mkbloke/streamlink | a6fa3c87efcef52a7a50b7879eb1e3e6cffe3bad | [
"BSD-2-Clause"
] | 4 | 2017-03-17T12:28:27.000Z | 2018-01-11T21:14:32.000Z | import logging
import re
from urllib.parse import urlparse
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream.hls import HLSStream
log = logging.getLogger(__name__)
@pluginmatcher(re.compile(r"""
https?://(?:www\.)?picarto\.tv/
(?:
s... | 31.285714 | 122 | 0.503805 |
e771f429ac284a846163d9b0848e4da07f2ee405 | 2,635 | py | Python | setup.py | ItsMrxNeutron/Wavelink | 3e11c16516dd89791c1247032045385979736554 | [
"MIT"
] | 203 | 2019-10-25T16:30:13.000Z | 2022-03-24T06:41:55.000Z | setup.py | ItsMrxNeutron/Wavelink | 3e11c16516dd89791c1247032045385979736554 | [
"MIT"
] | 99 | 2019-10-04T12:30:45.000Z | 2022-03-31T16:03:44.000Z | setup.py | ItsMrxNeutron/Wavelink | 3e11c16516dd89791c1247032045385979736554 | [
"MIT"
] | 175 | 2019-10-22T04:46:26.000Z | 2022-03-31T17:39:05.000Z | # -*- coding: utf-8 -*-
"""MIT License
Copyright (c) 2019-2020 PythonistaGuild
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... | 32.530864 | 99 | 0.691461 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.