hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ffe726a6ae10d61cc70057c9deff114b5cb7ea19 | 3,182 | py | Python | knob/api/targets.py | igor-toga/knob2 | 012d93b9f1bb3aa1baaeec34dfa722b8437531c9 | [
"Apache-2.0"
] | null | null | null | knob/api/targets.py | igor-toga/knob2 | 012d93b9f1bb3aa1baaeec34dfa722b8437531c9 | [
"Apache-2.0"
] | null | null | null | knob/api/targets.py | igor-toga/knob2 | 012d93b9f1bb3aa1baaeec34dfa722b8437531c9 | [
"Apache-2.0"
] | null | null | null | #
# 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
# ... | 31.82 | 88 | 0.63105 |
ffe73ed590892d86c5d63781d3b7fb2a14112cf4 | 14,660 | py | Python | tests/api/v1_2_10/test_tag.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v1_2_10/test_tag.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v1_2_10/test_tag.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNACenterAPI tag API fixtures and tests.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, inclu... | 25.232358 | 162 | 0.683151 |
ffe7a146af714eac4f707f6f443ebe65e2d6bca5 | 15,482 | py | Python | colossalai/nn/layer/parallel_3d/_vit.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | 1 | 2021-11-02T14:00:27.000Z | 2021-11-02T14:00:27.000Z | colossalai/nn/layer/parallel_3d/_vit.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | null | null | null | colossalai/nn/layer/parallel_3d/_vit.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | null | null | null | import math
from typing import Tuple
import torch
import torch.distributed as dist
from colossalai.context import ParallelMode, seed
from colossalai.core import global_context as gpc
from colossalai.registry import LAYERS
from colossalai.utils import checkpoint, get_current_device
from torch import Tensor, dtype, nn
... | 41.95664 | 102 | 0.628666 |
ffe7a4d2e0af6ea09d9fba047c0b69d7afcc4b2b | 6,864 | py | Python | tql/algo_ml/ftrl.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | tql/algo_ml/ftrl.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | tql/algo_ml/ftrl.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : tql-Python.
# @File : ftrl
# @Time : 2019-09-15 15:55
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
from datetime import datetime
from csv import DictReader
from math import ex... | 28.719665 | 96 | 0.495629 |
ffe7ac138c90f096bddb7504cb5e726d037c87ca | 11,294 | py | Python | contrib/python/prompt_toolkit/prompt_toolkit/key_binding/input_processor.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | 1 | 2021-01-19T17:18:38.000Z | 2021-01-19T17:18:38.000Z | contrib/python/prompt_toolkit/prompt_toolkit/key_binding/input_processor.py | dsferz/machinelearning_yandex | 8fde8314c5c70299ece8b8f00075ddfcd5e07ddf | [
"Apache-2.0"
] | 6 | 2020-06-05T18:44:19.000Z | 2022-01-13T00:48:56.000Z | contrib/python/prompt_toolkit/prompt_toolkit/key_binding/input_processor.py | dsferz/machinelearning_yandex | 8fde8314c5c70299ece8b8f00075ddfcd5e07ddf | [
"Apache-2.0"
] | 1 | 2018-08-06T14:13:12.000Z | 2018-08-06T14:13:12.000Z | # *** encoding: utf-8 ***
"""
An :class:`~.InputProcessor` receives callbacks for the keystrokes parsed from
the input in the :class:`~prompt_toolkit.inputstream.InputStream` instance.
The `InputProcessor` will according to the implemented keybindings call the
correct callbacks when new key presses are feed through `f... | 32.361032 | 137 | 0.6051 |
ffe7e27f5f94d643550ee3a4e5569a8a13e86bd5 | 3,095 | py | Python | pylily/0409/0409/0708.py | joannachuang/2019_summer_joanna | 1773cbad88cc2b7ebf20cebbd97d2988919372e6 | [
"Apache-2.0"
] | null | null | null | pylily/0409/0409/0708.py | joannachuang/2019_summer_joanna | 1773cbad88cc2b7ebf20cebbd97d2988919372e6 | [
"Apache-2.0"
] | null | null | null | pylily/0409/0409/0708.py | joannachuang/2019_summer_joanna | 1773cbad88cc2b7ebf20cebbd97d2988919372e6 | [
"Apache-2.0"
] | 1 | 2019-07-09T08:39:47.000Z | 2019-07-09T08:39:47.000Z | import json
import sqlite3
from datetime import datetime
import os
import Lily.ctao.database as cdb
import Lily.crawler.url_string as url
import requests
import pandas as pd
import numpy
import io
df = pd.read_html('''https://taipeicity.github.io/traffic_realtime/''', header = 0)
#for i in range(0, len(df)):
# ... | 34.010989 | 144 | 0.563813 |
ffe7eeb8a7ebc5edc44a277933fd3523ccd7d0f1 | 18,502 | py | Python | fml/kernels/kernels.py | larsbratholm/ml_clustering | dec3386676f8b22054f18643b1ae7d3e44c65527 | [
"MIT"
] | null | null | null | fml/kernels/kernels.py | larsbratholm/ml_clustering | dec3386676f8b22054f18643b1ae7d3e44c65527 | [
"MIT"
] | null | null | null | fml/kernels/kernels.py | larsbratholm/ml_clustering | dec3386676f8b22054f18643b1ae7d3e44c65527 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2016-2017 Anders Steen Christensen, Felix Faber, Lars Andersen Bratholm
#
# 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 withou... | 32.177391 | 185 | 0.591774 |
ffe80e7bfb5cc12437ad33304beae481248ec9b7 | 593 | py | Python | inspirationforge/settings/production.py | FarmCodeGary/InspirationForge | 2b78e9c388608ac19ed0ecb114ce5e0cc1f33213 | [
"MIT"
] | 1 | 2015-09-16T17:14:36.000Z | 2015-09-16T17:14:36.000Z | inspirationforge/settings/production.py | FarmCodeGary/InspirationForge | 2b78e9c388608ac19ed0ecb114ce5e0cc1f33213 | [
"MIT"
] | null | null | null | inspirationforge/settings/production.py | FarmCodeGary/InspirationForge | 2b78e9c388608ac19ed0ecb114ce5e0cc1f33213 | [
"MIT"
] | null | null | null | from .base import *
DEBUG = False
# Media files
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID']
AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY']
AWS_STORAGE_BUCKET_NAME = os.environ['AWS_STORAGE_BUCKET_NAME']
# Security-related settings
A... | 28.238095 | 63 | 0.790894 |
ffe82467b39ce3da52f9b2a79fa436e07ebbad31 | 1,186 | py | Python | lvsfunc/fun.py | Setsugennoao/lvsfunc | 44d9d9949f1dd7d7ad1c26417a8ca42ca9e2d382 | [
"MIT"
] | 62 | 2019-06-13T17:50:33.000Z | 2022-03-02T13:03:58.000Z | lvsfunc/fun.py | Varde-s-Forks/lvsfunc | ae6b5bab53213f04c3d892107f9f0b5611ad45e8 | [
"MIT"
] | 38 | 2019-09-09T13:54:13.000Z | 2022-02-24T10:41:05.000Z | lvsfunc/fun.py | Varde-s-Forks/lvsfunc | ae6b5bab53213f04c3d892107f9f0b5611ad45e8 | [
"MIT"
] | 27 | 2019-08-25T11:51:36.000Z | 2022-02-25T16:38:32.000Z | """
Very dumb "funny xdddd" functions.
These are not intended to be used in any release whatsoever.
If you *do* use them, I sincerely hope it's for an April Fools encode.
These functions are undocumented and will never be full features. Probably.
Don't tell louis this exists though, else I'm a dea... | 29.65 | 99 | 0.677909 |
ffe84dcf56ffa3e0a6ad0950076df51c79b0858b | 3,175 | py | Python | qnarre/doc/command.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/doc/command.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/doc/command.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2019 Quantapix 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 l... | 20.751634 | 79 | 0.661732 |
ffe85ef676774513f4493206af38933e6332d735 | 845 | py | Python | tests/test_loan_record.py | NRodriguezcuellar/invenio-circulation | 8e0c977849eb76ba9a342542dae3b6a6ef5bae16 | [
"MIT"
] | 1 | 2020-04-27T14:47:30.000Z | 2020-04-27T14:47:30.000Z | tests/test_loan_record.py | NRodriguezcuellar/invenio-circulation | 8e0c977849eb76ba9a342542dae3b6a6ef5bae16 | [
"MIT"
] | 2 | 2019-03-07T15:47:16.000Z | 2021-06-25T15:15:28.000Z | tests/test_loan_record.py | NRodriguezcuellar/invenio-circulation | 8e0c977849eb76ba9a342542dae3b6a6ef5bae16 | [
"MIT"
] | 1 | 2020-01-13T17:10:13.000Z | 2020-01-13T17:10:13.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2018-2019 CERN.
# Copyright (C) 2018-2019 RERO.
#
# Invenio-Circulation is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""Tests for loan JSON schema."""
from copy import deepcopy
from inveni... | 29.137931 | 78 | 0.746746 |
ffe877973589c14ec32ca6301823dd5f677f385a | 7,509 | py | Python | homeassistant/components/qwikswitch/__init__.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2021-09-29T20:33:32.000Z | 2021-09-29T20:33:32.000Z | homeassistant/components/qwikswitch/__init__.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:31:36.000Z | 2022-03-12T01:00:03.000Z | homeassistant/components/qwikswitch/__init__.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for Qwikswitch devices."""
import logging
from pyqwikswitch.async_ import QSUsb
from pyqwikswitch.qwikswitch import CMD_BUTTONS, QS_CMD, QS_ID, SENSORS, QSType
import voluptuous as vol
from homeassistant.components.binary_sensor import DEVICE_CLASSES_SCHEMA
from homeassistant.components.light import ATTR_B... | 32.227468 | 88 | 0.605007 |
ffe88535151770c874931b87e35b360b17ccff3f | 356 | py | Python | pymut/__init__.py | vlopezferrando/pymut | b77521edfd7d586d75053236cf66317186fa0da1 | [
"MIT"
] | 8 | 2017-02-10T10:13:59.000Z | 2020-11-30T03:37:53.000Z | pymut/__init__.py | vlopezferrando/pymut | b77521edfd7d586d75053236cf66317186fa0da1 | [
"MIT"
] | null | null | null | pymut/__init__.py | vlopezferrando/pymut | b77521edfd7d586d75053236cf66317186fa0da1 | [
"MIT"
] | 6 | 2017-09-14T10:39:06.000Z | 2021-06-01T11:46:47.000Z | import logging
import sys
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s %(levelname)-8s %(message)s',
datefmt='%m-%d %H:%M:%S',
stream=sys.stderr)
# Load all modules
from .amino_acids import *
from .data import *
from .features import *
from .io import *
from .pmut import *
from .predi... | 18.736842 | 53 | 0.685393 |
ffe8b41804030279a593d35e7b139240ea1ed10c | 6,702 | py | Python | train.py | munakoiso/alpha-zero | 49d0dee93955fa4fb3c91e1291b889bea24cb30f | [
"MIT"
] | 76 | 2018-05-03T21:10:09.000Z | 2022-02-15T23:43:30.000Z | train.py | munakoiso/alpha-zero | 49d0dee93955fa4fb3c91e1291b889bea24cb30f | [
"MIT"
] | 2 | 2018-09-22T03:01:12.000Z | 2019-01-13T12:08:32.000Z | train.py | munakoiso/alpha-zero | 49d0dee93955fa4fb3c91e1291b889bea24cb30f | [
"MIT"
] | 26 | 2018-09-03T12:45:02.000Z | 2021-12-06T07:25:01.000Z | # MIT License
#
# Copyright (c) 2018 Blanyal D'Souza
#
# 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, modify, mer... | 38.517241 | 80 | 0.597284 |
ffe91b6e864fb44ed0f434143307eb18a429c797 | 3,941 | py | Python | sarkas/potentials/yukawa.py | pwessels-uhh/sarkas | 78fb9f8106ed6b15fb67c22afea09593fed01730 | [
"MIT"
] | null | null | null | sarkas/potentials/yukawa.py | pwessels-uhh/sarkas | 78fb9f8106ed6b15fb67c22afea09593fed01730 | [
"MIT"
] | 1 | 2022-02-18T00:32:25.000Z | 2022-02-18T00:32:25.000Z | sarkas/potentials/yukawa.py | pwessels-uhh/sarkas | 78fb9f8106ed6b15fb67c22afea09593fed01730 | [
"MIT"
] | null | null | null | """
Module for handling Yukawa interaction
"""
import numpy as np
from numba import njit
import math as mt
@njit
def yukawa_force_pppm(r, pot_matrix):
"""
Calculates Potential and Force between two particles when the P3M algorithm is chosen.
Parameters
----------
r : float
Distance betwee... | 32.570248 | 111 | 0.606699 |
ffe926a2a5b91ea07304d45cd6e1de498d55d1b5 | 6,601 | py | Python | pheasant/plugins/mkdocs.py | timvink/pheasant | eb5b0a8b5473baad5ad4903984433fe763f5312e | [
"MIT"
] | null | null | null | pheasant/plugins/mkdocs.py | timvink/pheasant | eb5b0a8b5473baad5ad4903984433fe763f5312e | [
"MIT"
] | null | null | null | pheasant/plugins/mkdocs.py | timvink/pheasant | eb5b0a8b5473baad5ad4903984433fe763f5312e | [
"MIT"
] | null | null | null | import importlib
import io
import logging
import os
import re
from typing import List
import yaml
from mkdocs.config import config_options
from mkdocs.plugins import BasePlugin
from mkdocs.structure.files import get_files
from mkdocs.utils import markdown_extensions, string_types
import pheasant
from pheasant.core.ph... | 34.380208 | 83 | 0.586275 |
ffe93e284d794cd3928a59950707b4536c7d4083 | 715 | py | Python | tolqc-api/app/test/base/tests/test_wrong_type_400.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | tolqc-api/app/test/base/tests/test_wrong_type_400.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | tolqc-api/app/test/base/tests/test_wrong_type_400.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Genome Research Ltd.
#
# SPDX-License-Identifier: MIT
from test.base import BaseTestCase
class TestWrongType400(BaseTestCase):
def test_post_D_with_invalid_type_400(self):
response = self.client.open(
'/api/v1/D',
method='POST',
json={
... | 26.481481 | 65 | 0.496503 |
ffe93ff1e4463dd0dbbef65174fd01845ae39dab | 14,749 | py | Python | skynet/consensus/multiprocess_validation.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 7 | 2021-09-07T02:14:15.000Z | 2022-03-27T06:42:35.000Z | skynet/consensus/multiprocess_validation.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 1 | 2021-10-21T16:38:56.000Z | 2021-11-15T13:03:15.000Z | skynet/consensus/multiprocess_validation.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 3 | 2021-10-21T07:17:40.000Z | 2022-03-16T12:57:09.000Z | import asyncio
import logging
import traceback
from concurrent.futures.process import ProcessPoolExecutor
from dataclasses import dataclass
from typing import Dict, List, Optional, Sequence, Tuple, Union, Callable
from skynet.consensus.block_header_validation import validate_finished_header_block
from skynet.consensus... | 46.23511 | 117 | 0.660316 |
ffe9674a4fcfaab2e0527d546e982e36f57030ef | 5,993 | py | Python | spring1617_assignment1/cs231n/classifiers/linear_classifier.py | liaison/cs231n | 2d48724d94a06006f067ce72d4a2e7881f7194d8 | [
"MIT"
] | 1 | 2018-05-24T20:28:08.000Z | 2018-05-24T20:28:08.000Z | spring1617_assignment1/cs231n/classifiers/linear_classifier.py | liaison/cs231n | 2d48724d94a06006f067ce72d4a2e7881f7194d8 | [
"MIT"
] | null | null | null | spring1617_assignment1/cs231n/classifiers/linear_classifier.py | liaison/cs231n | 2d48724d94a06006f067ce72d4a2e7881f7194d8 | [
"MIT"
] | null | null | null | from __future__ import print_function
import numpy as np
from cs231n.classifiers.linear_svm import *
from cs231n.classifiers.softmax import *
from past.builtins import xrange
class LinearClassifier(object):
"""
Reference: http://cs231n.github.io/neural-networks-3/
"""
def __init__(self):
self.W = No... | 41.331034 | 92 | 0.503421 |
ffe97777174adbfe783b4f1ce7967d87d1a39331 | 8,450 | py | Python | Internet-Worm/venv_macos/lib/python3.8/site-packages/pyecharts/charts/chart.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null | Internet-Worm/venv_macos/lib/python3.8/site-packages/pyecharts/charts/chart.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null | Internet-Worm/venv_macos/lib/python3.8/site-packages/pyecharts/charts/chart.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null | from .. import options as opts
from .. import types
from ..charts.base import Base
from ..globals import RenderType, ThemeType, ToolTipFormatterType
from ..types import Optional, Sequence
class Chart(Base):
def __init__(self, init_opts: types.Init = opts.InitOpts()):
if isinstance(init_opts, dict):
... | 33.665339 | 88 | 0.583905 |
ffe9a47ce1e5ab402924967713c139dd2317408d | 9,134 | py | Python | YAMLR/YAMLREmbedding.py | ViniGarcia/FlexibleNFV-RA | a7938c05be0d8ca64e281c94b2efbeaefeabdcd5 | [
"MIT"
] | 2 | 2021-05-10T16:28:50.000Z | 2021-12-15T04:03:34.000Z | YAMLR/YAMLREmbedding.py | ViniGarcia/FlexibleNFV-RA | a7938c05be0d8ca64e281c94b2efbeaefeabdcd5 | [
"MIT"
] | null | null | null | YAMLR/YAMLREmbedding.py | ViniGarcia/FlexibleNFV-RA | a7938c05be0d8ca64e281c94b2efbeaefeabdcd5 | [
"MIT"
] | null | null | null | ######## YAMLR EMBEDDING CLASS DESCRIPTION ########
#PROJECT: NFV FLERAS (FLExible Resource Allocation Service)
#CREATED BY: VINICIUS FULBER GARCIA
#CONTACT: vfulber@inf.ufsm.br
#RECEIVES A YAML REQUEST FILE WITH THE SFC
#DESCRIPTION AND THE REQUESTED OPERATIONS
#FOR THE NFV RESOURCE ALLOCATION EXECUTION.
#THE STATU... | 25.657303 | 176 | 0.674951 |
ffe9b1f37de4e668770dd2d9ea558489f9a623c0 | 7,085 | py | Python | models/transformers_master/models/prophetnet/convert_prophetnet_original_pytorch_checkpoint_to_pytorch.py | 20000607-lxc/BERT-NER-Pytorch-master | 47f2e1291ab53674986eb91abdb72693eafe9b61 | [
"MIT"
] | null | null | null | models/transformers_master/models/prophetnet/convert_prophetnet_original_pytorch_checkpoint_to_pytorch.py | 20000607-lxc/BERT-NER-Pytorch-master | 47f2e1291ab53674986eb91abdb72693eafe9b61 | [
"MIT"
] | null | null | null | models/transformers_master/models/prophetnet/convert_prophetnet_original_pytorch_checkpoint_to_pytorch.py | 20000607-lxc/BERT-NER-Pytorch-master | 47f2e1291ab53674986eb91abdb72693eafe9b61 | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# 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... | 44.006211 | 118 | 0.655893 |
ffe9d14c744d3ee3fef511c96977beedda717345 | 1,382 | py | Python | samples/ensumble.py | upura/vivid | 6139697d60656d4774aceae880f5a07d929124a8 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | samples/ensumble.py | upura/vivid | 6139697d60656d4774aceae880f5a07d929124a8 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | samples/ensumble.py | upura/vivid | 6139697d60656d4774aceae880f5a07d929124a8 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | import pandas as pd
from sklearn.datasets import load_boston
from vivid.core import AbstractFeature
from vivid.metrics import regression_metrics
from vivid.out_of_fold.base import EnsembleFeature
from vivid.out_of_fold.boosting import XGBoostRegressorOutOfFold, LGBMRegressorOutOfFold
from vivid.out_of_fold.ensumble im... | 30.043478 | 88 | 0.719971 |
ffe9d7f1b60dd604c183a4b8b43e6d777e137732 | 2,466 | py | Python | btc_address_dump/p2tr_util.py | Groestlcoin/btc-address-dump | 04c4e0617974dd8025c1f5d6567978fb1a207ca7 | [
"MIT"
] | null | null | null | btc_address_dump/p2tr_util.py | Groestlcoin/btc-address-dump | 04c4e0617974dd8025c1f5d6567978fb1a207ca7 | [
"MIT"
] | null | null | null | btc_address_dump/p2tr_util.py | Groestlcoin/btc-address-dump | 04c4e0617974dd8025c1f5d6567978fb1a207ca7 | [
"MIT"
] | null | null | null | import hashlib
from typing import Optional
import ecdsa
from ecdsa.ellipticcurve import PointJacobi, Point
def bytes_from_int(x: int) -> bytes:
return x.to_bytes(32, byteorder="big")
def int_from_bytes(b: bytes) -> int:
return int.from_bytes(b, byteorder="big")
def tagged_hash(tag: str, msg: bytes) -> by... | 33.324324 | 113 | 0.669911 |
ffea799d83b47cd002081f1bb95eba3b88fac331 | 24,727 | py | Python | rllib/agents/ddpg/tests/test_ddpg.py | naijoaix/ray | 5a43b075bcc346fb95f1d30c85dbcb79a7fa5769 | [
"Apache-2.0"
] | 1 | 2021-12-13T20:43:30.000Z | 2021-12-13T20:43:30.000Z | rllib/agents/ddpg/tests/test_ddpg.py | thetwotravelers/ray | d6096df7428e6b2f5f371b7bafa67d998dd81e13 | [
"Apache-2.0"
] | null | null | null | rllib/agents/ddpg/tests/test_ddpg.py | thetwotravelers/ray | d6096df7428e6b2f5f371b7bafa67d998dd81e13 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import re
import unittest
from tempfile import TemporaryDirectory
import ray
import ray.rllib.agents.ddpg as ddpg
from ray.rllib.agents.ddpg.ddpg_torch_policy import ddpg_actor_critic_loss as loss_torch
from ray.rllib.agents.sac.tests.test_sac import SimpleEnv
from ray.rllib.policy.sample_batch impo... | 41.211667 | 88 | 0.536741 |
ffea907fbd4b5393b24e9428e579a9668d0989b8 | 10,394 | py | Python | algorithms/merging/merge.py | ndevenish/dials-fork | e3970ffcd2870ccd0e340f5e94999efcc978fb2b | [
"BSD-3-Clause"
] | null | null | null | algorithms/merging/merge.py | ndevenish/dials-fork | e3970ffcd2870ccd0e340f5e94999efcc978fb2b | [
"BSD-3-Clause"
] | null | null | null | algorithms/merging/merge.py | ndevenish/dials-fork | e3970ffcd2870ccd0e340f5e94999efcc978fb2b | [
"BSD-3-Clause"
] | null | null | null | """Merging functions for experiment lists and reflection tables."""
from __future__ import absolute_import, division, print_function
import logging
from six.moves import cStringIO as StringIO
from dxtbx.model import ExperimentList
from mmtbx.scaling import data_statistics
from dials.algorithms.scaling.Ih_table impo... | 39.520913 | 88 | 0.68299 |
ffeaad8ac20a9e500b9d5fa93c20da2e9d1b2799 | 8,740 | py | Python | hashing/scripts/latency_figure3.py | ShuhaoZhangTony/WalnutDB | 9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050 | [
"MIT"
] | null | null | null | hashing/scripts/latency_figure3.py | ShuhaoZhangTony/WalnutDB | 9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050 | [
"MIT"
] | null | null | null | hashing/scripts/latency_figure3.py | ShuhaoZhangTony/WalnutDB | 9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050 | [
"MIT"
] | null | null | null | import itertools as it
import os
import matplotlib
import matplotlib.pyplot as plt
import pylab
from matplotlib.font_manager import FontProperties
from matplotlib.ticker import MaxNLocator, LinearLocator, ScalarFormatter
OPT_FONT_NAME = 'Helvetica'
TICK_FONT_SIZE = 24
LABEL_FONT_SIZE = 28
LEGEND_FONT_SIZE = 30
LABEL_... | 35.967078 | 133 | 0.597826 |
ffeaccd13b2e705c3021beb649d4efd6144741b7 | 5,221 | py | Python | test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_multiapi_service_client_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_multiapi_service_client_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_multiapi_service_client_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 42.104839 | 133 | 0.678223 |
ffeaeaab75a36f9a3dcf86b13a3766f8aa0df92b | 12,188 | py | Python | grammars/gen/LegalOpinionListener.py | OpenLawsGR/judgments2AKN | 0c6217349cde36058d5599800e289fdf0d3eaf23 | [
"MIT"
] | 5 | 2019-11-28T17:02:59.000Z | 2021-02-05T17:39:49.000Z | grammars/gen/LegalOpinionListener.py | OpenLawsGR/judgments2AKN | 0c6217349cde36058d5599800e289fdf0d3eaf23 | [
"MIT"
] | null | null | null | grammars/gen/LegalOpinionListener.py | OpenLawsGR/judgments2AKN | 0c6217349cde36058d5599800e289fdf0d3eaf23 | [
"MIT"
] | null | null | null | # Generated from /home/plessas/EDBM34/grammars/LegalOpinion.g4 by ANTLR 4.7.2
from antlr4 import *
# This class defines a complete listener for a parse tree produced by LegalOpinionParser.
class LegalOpinionListener(ParseTreeListener):
# Enter a parse tree produced by LegalOpinionParser#akomaNtoso.
def enterA... | 28.950119 | 89 | 0.720873 |
ffeb0af2f1cbc0079a7c315c861e85de397a6bd9 | 1,749 | py | Python | uwb-beacon-firmware/tools/read_range.py | greck2908/robot-software | 2e1e8177148a089e8883967375dde7f8ed3d878b | [
"MIT"
] | 40 | 2016-10-04T19:59:22.000Z | 2020-12-25T18:11:35.000Z | uwb-beacon-firmware/tools/read_range.py | greck2908/robot-software | 2e1e8177148a089e8883967375dde7f8ed3d878b | [
"MIT"
] | 209 | 2016-09-21T21:54:28.000Z | 2022-01-26T07:42:37.000Z | uwb-beacon-firmware/tools/read_range.py | greck2908/robot-software | 2e1e8177148a089e8883967375dde7f8ed3d878b | [
"MIT"
] | 21 | 2016-11-07T14:40:16.000Z | 2021-11-02T09:53:37.000Z | #!/usr/bin/env python3
"""
Reads range information sent by the beacon over UAVCAN.
"""
import argparse
import uavcan
import os
import csv
def parse_args():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("port", help="Serial port or SocketCAN interface")
parser.add_argument(
... | 23.013158 | 88 | 0.587193 |
ffeb20a1cce7eb3adc8106a5458690aaa10af8e9 | 4,541 | py | Python | chroma_core/services/http_agent/sessions.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | 1 | 2021-02-08T16:59:14.000Z | 2021-02-08T16:59:14.000Z | chroma_core/services/http_agent/sessions.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | chroma_core/services/http_agent/sessions.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | # Copyright (c) 2018 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import threading
import uuid
from chroma_core.services import log_register
log = log_register(__name__)
class SessionCollection(object):
def __init__(self, queue... | 35.476563 | 114 | 0.505616 |
ffeb3542f73f77add26d58c7e882ca2f68ca2ea4 | 4,202 | py | Python | graph/tarjan.py | AnshulPatni/Algorithms | c8bcfb86d50f68041921e5140f01821ac12d9521 | [
"MIT"
] | 2 | 2018-04-30T19:31:04.000Z | 2018-05-05T14:29:45.000Z | graph/tarjan.py | AnshulPatni/Algorithms | c8bcfb86d50f68041921e5140f01821ac12d9521 | [
"MIT"
] | null | null | null | graph/tarjan.py | AnshulPatni/Algorithms | c8bcfb86d50f68041921e5140f01821ac12d9521 | [
"MIT"
] | 1 | 2018-04-16T12:45:49.000Z | 2018-04-16T12:45:49.000Z | """
Implements Tarjan's algorithm for finding strongly connected components
in a graph.
https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm
"""
class Node(object):
def __init__(self, name):
self.name = name
def __eq__(self, obj):
if isinstance(obj, Node):
... | 27.464052 | 144 | 0.535935 |
ffeb3e8c66163aa6e180ee9aa05edf661ced5dc6 | 2,744 | py | Python | src/main.py | khalidm/svpipeline | 4bfbc6ab9f8ed73ffb54856c7cce1348259ffa14 | [
"BSD-3-Clause"
] | null | null | null | src/main.py | khalidm/svpipeline | 4bfbc6ab9f8ed73ffb54856c7cce1348259ffa14 | [
"BSD-3-Clause"
] | null | null | null | src/main.py | khalidm/svpipeline | 4bfbc6ab9f8ed73ffb54856c7cce1348259ffa14 | [
"BSD-3-Clause"
] | null | null | null | '''
A Bioinformatics pipeline based on Ruffus.
Author: Khalid Mahmood (khalid.mahmood@unimelb.edu.au).
Copyright: 2015
See ../README.md for details about how to use the program.
Repository: https://github.com/khalidm/svpipeline
'''
from __future__ import print_function
from ruffus import *
import ruffus.cmdline as... | 33.876543 | 100 | 0.710277 |
ffeb73b0bb69a54c09c9137df74beee6ece63685 | 489 | py | Python | magic_link/migrations/0003_magiclink_accessed_at.py | phaer/django-magic-link | 4e4324d2dbf09afeec769feca588082e52c5f8a7 | [
"MIT"
] | 15 | 2020-08-27T23:09:10.000Z | 2021-10-10T17:26:00.000Z | magic_link/migrations/0003_magiclink_accessed_at.py | phaer/django-magic-link | 4e4324d2dbf09afeec769feca588082e52c5f8a7 | [
"MIT"
] | 5 | 2020-07-27T13:10:27.000Z | 2021-09-27T12:52:26.000Z | magic_link/migrations/0003_magiclink_accessed_at.py | phaer/django-magic-link | 4e4324d2dbf09afeec769feca588082e52c5f8a7 | [
"MIT"
] | 3 | 2021-02-07T06:51:39.000Z | 2021-09-27T12:05:00.000Z | # Generated by Django 3.0.8 on 2020-07-07 09:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("magic_link", "0002_magiclink_logged_in_at"),
]
operations = [
migrations.AddField(
model_name="magiclink",
name="acc... | 23.285714 | 85 | 0.588957 |
ffeb86bef94d17e3591dd61e739a241251a7836d | 5,999 | py | Python | feast_dremio/store.py | hainp/feast-dremio | a4f6c7d726b0b94231fb44896f1d3a0877cb0f98 | [
"MIT"
] | null | null | null | feast_dremio/store.py | hainp/feast-dremio | a4f6c7d726b0b94231fb44896f1d3a0877cb0f98 | [
"MIT"
] | null | null | null | feast_dremio/store.py | hainp/feast-dremio | a4f6c7d726b0b94231fb44896f1d3a0877cb0f98 | [
"MIT"
] | null | null | null | import contextlib
from datetime import datetime
from typing import Callable, ContextManager, Iterator, List, Optional, Union
import pandas as pd
import pyarrow
from feast.data_source import DataSource
from feast.feature_view import DUMMY_ENTITY_ID, DUMMY_ENTITY_VAL, FeatureView
from feast.infra.offline_stores.offline_... | 35.081871 | 156 | 0.664944 |
ffeb8c0d9c6f428b6ff47ef932e62a710b22612f | 158 | py | Python | djangae/models.py | benvand/djangae | 7b186fbe6952c5ae0afe5eb8258516c35760f96d | [
"BSD-3-Clause"
] | null | null | null | djangae/models.py | benvand/djangae | 7b186fbe6952c5ae0afe5eb8258516c35760f96d | [
"BSD-3-Clause"
] | null | null | null | djangae/models.py | benvand/djangae | 7b186fbe6952c5ae0afe5eb8258516c35760f96d | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
class CounterShard(models.Model):
count = models.PositiveIntegerField()
# Apply our django patches
from .patches import * | 17.555556 | 41 | 0.765823 |
ffebab95e436107a013f9a7af9b3cab7a63c8a93 | 2,290 | py | Python | Docker-basis/web-color-app/app.py | phuongvo9/DevOps-Essentials | 36290af52001bb589b37d62f0d98cf48ad554c73 | [
"Apache-2.0"
] | 1 | 2022-03-03T14:17:51.000Z | 2022-03-03T14:17:51.000Z | Docker-basis/web-color-app/app.py | phuongvo9/DevOps-Essentials | 36290af52001bb589b37d62f0d98cf48ad554c73 | [
"Apache-2.0"
] | null | null | null | Docker-basis/web-color-app/app.py | phuongvo9/DevOps-Essentials | 36290af52001bb589b37d62f0d98cf48ad554c73 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from flask import render_template
import socket
import random
import os
import argparse
app = Flask(__name__)
color_codes = {
"red": "#e74c3c",
"green": "#16a085",
"blue": "#2980b9",
"blue2": "#30336b",
"pink": "#be2edd",
"darkblue": "#130f40"
}
SUPPORTED_COLORS = ",".... | 34.179104 | 151 | 0.648035 |
ffebb562fcd5741a86602364456b9af2bbaa4586 | 608 | py | Python | src/qchecker/descriptions/__init__.py | James-Ansley/qchecker | a84f6805996b54897e5fe33ebee2b87b7793e32b | [
"MIT"
] | 1 | 2022-02-28T05:03:55.000Z | 2022-02-28T05:03:55.000Z | src/qchecker/descriptions/__init__.py | James-Ansley/qchecker | a84f6805996b54897e5fe33ebee2b87b7793e32b | [
"MIT"
] | null | null | null | src/qchecker/descriptions/__init__.py | James-Ansley/qchecker | a84f6805996b54897e5fe33ebee2b87b7793e32b | [
"MIT"
] | null | null | null | """This module retrieves curated descriptions of matched patterns intended to
be shown to students.
Allows for student-readable descriptions to be automatically retrieved
from default or custom description mappings.
Internally a list of description mappings from substructure class names to
description objects is stor... | 26.434783 | 77 | 0.773026 |
ffebb7ece7904653a3072509a6af46758536e97b | 6,285 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_api_service_list.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_api_service_list.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_api_service_list.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1API... | 32.066327 | 295 | 0.612251 |
ffebbd319e88e74d7cd7204c0549e7593c15fc4b | 7,195 | py | Python | st2common/st2common/util/jinja.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | st2common/st2common/util/jinja.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | 2 | 2020-03-04T08:33:36.000Z | 2020-03-04T08:34:14.000Z | st2common/st2common/util/jinja.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 34.099526 | 98 | 0.692842 |
ffebc285a79bea1e00bb149a06ea709af2e79efc | 107 | py | Python | blacklist.py | juuisle/zocho-api | 230205b4698f52e864c9308ef03cc8d9cfac331e | [
"MIT"
] | null | null | null | blacklist.py | juuisle/zocho-api | 230205b4698f52e864c9308ef03cc8d9cfac331e | [
"MIT"
] | null | null | null | blacklist.py | juuisle/zocho-api | 230205b4698f52e864c9308ef03cc8d9cfac331e | [
"MIT"
] | null | null | null | """
When user logout, token will be added to blacklist. (This is how logout works)
"""
BLACKLIST = set()
| 17.833333 | 79 | 0.682243 |
ffebdb420a91500ff9a32da1036a5cccf2d5cb46 | 6,355 | py | Python | python/eet/pipelines/fill_mask.py | SidaZh/EET | 6414faa734abfdb666556304ca3df5b7f5e54c38 | [
"Apache-2.0"
] | null | null | null | python/eet/pipelines/fill_mask.py | SidaZh/EET | 6414faa734abfdb666556304ca3df5b7f5e54c38 | [
"Apache-2.0"
] | null | null | null | python/eet/pipelines/fill_mask.py | SidaZh/EET | 6414faa734abfdb666556304ca3df5b7f5e54c38 | [
"Apache-2.0"
] | null | null | null | #
# Created by djz on 2022/04/01.
#
import torch
import numpy as np
from typing import Dict
from transformers.utils import logging
from .base import GenericTensor,Pipeline,PipelineException
logger = logging.get_logger(__name__)
class FillMaskPipeline(Pipeline):
def get_masked_index(self, input_ids: GenericTensor)... | 41 | 115 | 0.59764 |
ffec118c8a89816cd8bd674f44c9ab52a0907f71 | 6,865 | py | Python | fanficfare/adapters/adapter_nickandgregnet.py | davidferguson/FanFicUpload | dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2 | [
"Apache-2.0"
] | 1 | 2019-06-13T11:20:33.000Z | 2019-06-13T11:20:33.000Z | fanficfare/adapters/adapter_nickandgregnet.py | davidferguson/FanFicUpload | dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2 | [
"Apache-2.0"
] | null | null | null | fanficfare/adapters/adapter_nickandgregnet.py | davidferguson/FanFicUpload | dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013 Fanficdownloader team, 2015 FanFicFare team
#
# 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
#
# Un... | 38.138889 | 157 | 0.617917 |
ffec180348fe313216069cfd8c776ba2ca560ace | 13,346 | py | Python | openstackclient/volume/v1/volume.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/volume/v1/volume.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/volume/v1/volume.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | # Copyright 2012-2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 31.182243 | 79 | 0.528023 |
ffec2ab6c4ecf389d867e36a0fc9036d8a60d6bc | 12,285 | py | Python | collections/ansible_collections/community/general/plugins/lookup/passwordstore.py | lisenet/homelab-ansible | e77007ba5b45e4c1b8fdf3cff7699f231191b193 | [
"BSD-3-Clause"
] | 1 | 2020-12-23T13:27:39.000Z | 2020-12-23T13:27:39.000Z | .ansible/collections/ansible_collections/community/general/plugins/lookup/passwordstore.py | chronicc/proving-ground | 3e392122a05fb8383a3700954baebb0df330e9e3 | [
"MIT"
] | null | null | null | .ansible/collections/ansible_collections/community/general/plugins/lookup/passwordstore.py | chronicc/proving-ground | 3e392122a05fb8383a3700954baebb0df330e9e3 | [
"MIT"
] | null | null | null | # (c) 2017, Patrick Deelman <patrick@patrickdeelman.nl>
# (c) 2017 Ansible Project
# 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)
__metaclass__ = type
DOCUMENTATION = '''
lookup: passwordstore
auth... | 40.544554 | 135 | 0.608791 |
ffec358f625150b13eedbd6d8ec32374ed6d55ba | 10,049 | py | Python | examples/video-c3d/video_c3d.py | NervanaSystems/ngraph-python | ac032c83c7152b615a9ad129d54d350f9d6a2986 | [
"Apache-2.0"
] | 18 | 2018-03-19T04:16:49.000Z | 2021-02-08T14:44:58.000Z | examples/video-c3d/video_c3d.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 2 | 2019-04-16T06:41:49.000Z | 2019-05-06T14:08:13.000Z | examples/video-c3d/video_c3d.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 11 | 2018-06-16T15:59:08.000Z | 2021-03-06T00:45:30.000Z | #!/usr/bin/env python
# ******************************************************************************
# Copyright 2017-2018 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
... | 39.719368 | 93 | 0.643746 |
ffec393e2d855e20c7a632305a7767e4cb6a0781 | 701 | py | Python | ext/NN/datawhale_nlp/Task_02.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | ext/NN/datawhale_nlp/Task_02.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | ext/NN/datawhale_nlp/Task_02.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | # encoding: utf-8
from xplan.pipe import *
from xplan.nlp.utils import *
corpus = "深度学习的概念由Hinton等人于2006年提出。基于深度置信网络(DBN)提出非监督贪心逐层训练算法,为解决深层结构相关的优化难题带来希望,随后提出多层自动编码器深层结构。此外Lecun等人提出的卷积神经网络是第一个真正多层结构学习算法,它利用空间相对关系减少参数数目以提高训练性能。"
# 统计字/词频
corpus | xcount | xprint
corpus | xcut | xcount | xprint
print(corpus | xcut | xv... | 28.04 | 154 | 0.723252 |
ffec46ad8f2ec6203f5ba621e168aeb4d49a2afc | 540 | py | Python | Chapter_01/blog/migrations/0003_post_tags.py | codingEzio/code_py_book_django2_by_example | d215d0c87a557685824286822186966b06fa8d59 | [
"Unlicense"
] | 1 | 2021-04-23T16:35:45.000Z | 2021-04-23T16:35:45.000Z | Chapter_01/blog/migrations/0003_post_tags.py | codingEzio/code_py_book_django2_by_example | d215d0c87a557685824286822186966b06fa8d59 | [
"Unlicense"
] | null | null | null | Chapter_01/blog/migrations/0003_post_tags.py | codingEzio/code_py_book_django2_by_example | d215d0c87a557685824286822186966b06fa8d59 | [
"Unlicense"
] | null | null | null | # Generated by Django 2.0.5 on 2018-12-09 07:43
from django.db import migrations
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('taggit', '0002_auto_20150616_2121'),
('blog', '0002_comment'),
]
operations = [
migrations.AddField(
mode... | 25.714286 | 162 | 0.62963 |
ffec579034e33f16c9ced8a28c36d779a8ef2b85 | 451 | py | Python | Algos/leetcode/top/valid_parantheses.py | Suraj-Rajesh/code | 3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9 | [
"MIT"
] | null | null | null | Algos/leetcode/top/valid_parantheses.py | Suraj-Rajesh/code | 3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9 | [
"MIT"
] | null | null | null | Algos/leetcode/top/valid_parantheses.py | Suraj-Rajesh/code | 3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9 | [
"MIT"
] | null | null | null | #
# https://leetcode.com/problems/valid-parentheses/
#
expr = '{3 * [1 + 5(6 + 8) ]}'
braces = {
'{': '}',
'[': ']',
'(': ')'
}
def findBalanced(expr):
stack = []
for c in expr:
if c in '{}[]()':
if c in braces:
stack.append(braces[c])
else:
... | 17.346154 | 50 | 0.441242 |
ffec6c7f2d2be2946d278508ec256d5aecbaa9cb | 5,307 | py | Python | tests/frontend/remote-caches.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | tests/frontend/remote-caches.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | tests/frontend/remote-caches.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2019 Bloomberg Finance LP
#
# 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... | 39.022059 | 111 | 0.665725 |
ffec7acfcfffeb272450e873a51d8acbcc9e30b6 | 1,729 | py | Python | gipsy_toolbar/migrations/0001_initial.py | marwahaha/gipsy_toolbar | d680fa19e1db11cc740ecff1926534d54e9d779c | [
"BSD-3-Clause"
] | null | null | null | gipsy_toolbar/migrations/0001_initial.py | marwahaha/gipsy_toolbar | d680fa19e1db11cc740ecff1926534d54e9d779c | [
"BSD-3-Clause"
] | null | null | null | gipsy_toolbar/migrations/0001_initial.py | marwahaha/gipsy_toolbar | d680fa19e1db11cc740ecff1926534d54e9d779c | [
"BSD-3-Clause"
] | 1 | 2019-07-16T03:44:58.000Z | 2019-07-16T03:44:58.000Z | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'GipsyToolbarMenu'
db.create_table(u'gipsy_toolbar_gipsyto... | 45.5 | 156 | 0.631579 |
ffecdd4e4e1b12f1bc20ab97c8069e6c3362936d | 2,975 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/messages/delete_history.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/messages/delete_history.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/messages/delete_history.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 34.195402 | 147 | 0.612437 |
ffecf8bb7910ee947e9b4982f03c9b4c48035558 | 13,440 | py | Python | tests/test_handler.py | dszmaj/channels | be07934debaf620bf30f08103d88eff39cb4d6eb | [
"BSD-3-Clause"
] | null | null | null | tests/test_handler.py | dszmaj/channels | be07934debaf620bf30f08103d88eff39cb4d6eb | [
"BSD-3-Clause"
] | null | null | null | tests/test_handler.py | dszmaj/channels | be07934debaf620bf30f08103d88eff39cb4d6eb | [
"BSD-3-Clause"
] | 1 | 2022-03-04T22:00:32.000Z | 2022-03-04T22:00:32.000Z | from __future__ import unicode_literals
import os
from datetime import datetime
from itertools import islice
from django.http import FileResponse, HttpResponse, HttpResponseRedirect, JsonResponse, StreamingHttpResponse
from six import BytesIO
from channels import Channel
from channels.handler import AsgiHandler
from... | 37.752809 | 109 | 0.590923 |
ffed02d4d266f0cdb4435b68d42b7c5e1a2f913c | 9,718 | py | Python | source/objects/user.py | Haloghen/bot-base | 38272b6720ee1886a49fb8050d69c7811ed523fb | [
"MIT"
] | 1 | 2020-04-30T14:14:25.000Z | 2020-04-30T14:14:25.000Z | source/objects/user.py | Haloghen/bot-base | 38272b6720ee1886a49fb8050d69c7811ed523fb | [
"MIT"
] | null | null | null | source/objects/user.py | Haloghen/bot-base | 38272b6720ee1886a49fb8050d69c7811ed523fb | [
"MIT"
] | 2 | 2020-05-01T17:12:46.000Z | 2020-05-01T18:32:21.000Z | """MIT License
Copyright (c) 2020 Francesco Zimbolo A.K.A. Haloghen & Matteo Bocci A.K.A.
matteob99
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 limitati... | 37.521236 | 80 | 0.594258 |
ffed072460899c99ae452f9d4bddc809173071e3 | 5,537 | py | Python | models/StereoCNN/WideResnet_module.py | daili0015/ModelFeast | 0689ced4d0f37be438d3a91908e5e4cc5b7d54b8 | [
"MIT"
] | 247 | 2019-03-05T07:12:29.000Z | 2022-03-29T01:51:17.000Z | models/StereoCNN/WideResnet_module.py | jungerschwarz/ModelFeast | 03afca0b129532135910ee2ac72a3b85be795289 | [
"MIT"
] | 8 | 2019-05-21T03:05:27.000Z | 2021-12-09T03:22:51.000Z | models/StereoCNN/WideResnet_module.py | jungerschwarz/ModelFeast | 03afca0b129532135910ee2ac72a3b85be795289 | [
"MIT"
] | 47 | 2019-03-05T07:14:13.000Z | 2021-11-11T01:04:28.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: zcy
# @Date: 2019-02-14 19:29:27
# @Last Modified by: zcy
# @Last Modified time: 2019-02-16 11:18:59
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
from functools import partial
__all__ = ['WideResNet', 'WideBottleneck']
def... | 29.768817 | 80 | 0.5568 |
ffed0df3eab3b7194a0015b03ca1b0236927eb9e | 23 | py | Python | pixel_table/modes/pong/__init__.py | Spooner/pixel-table | 87ac04adbb74702bee3dcaa5c6bded7786cf73e7 | [
"MIT"
] | null | null | null | pixel_table/modes/pong/__init__.py | Spooner/pixel-table | 87ac04adbb74702bee3dcaa5c6bded7786cf73e7 | [
"MIT"
] | null | null | null | pixel_table/modes/pong/__init__.py | Spooner/pixel-table | 87ac04adbb74702bee3dcaa5c6bded7786cf73e7 | [
"MIT"
] | null | null | null | from .pong import Pong
| 11.5 | 22 | 0.782609 |
ffed26d5fbf15cba20dc7c0301ab8f1ea8a14cad | 7,787 | py | Python | core/agent_ray.py | shenzebang/DMTRPO | 3beb528c5b5aebe35dfa873788c5be3f5977f53f | [
"MIT"
] | 1 | 2019-11-17T11:05:26.000Z | 2019-11-17T11:05:26.000Z | core/agent_ray.py | shenzebang/DMTRPO | 3beb528c5b5aebe35dfa873788c5be3f5977f53f | [
"MIT"
] | null | null | null | core/agent_ray.py | shenzebang/DMTRPO | 3beb528c5b5aebe35dfa873788c5be3f5977f53f | [
"MIT"
] | null | null | null | from utils2.replay_memory import Memory
from utils2.torch import *
import ray
from core.running_state import ZFilter
@ray.remote
def collect_samples(pid, env, policy, custom_reward,
mean_action, render, running_state, min_batch_size):
# print(torch.randn(pid))
# print(torch.randn(1))
l... | 36.558685 | 126 | 0.596892 |
ffed2b64ea01cc71e040ed733d5d9469c2f765a5 | 26,977 | py | Python | Paxos_wDocker_nMininet/proposer.py | asgokhale/DistributedSystemsCourse | 9ae24ed65e7a7ef849c7e39ec5a1a8cc5973c12f | [
"Apache-2.0"
] | 4 | 2022-01-16T17:36:49.000Z | 2022-02-07T16:57:33.000Z | Paxos_wDocker_nMininet/proposer.py | asgokhale/DistributedSystemsCourse | 9ae24ed65e7a7ef849c7e39ec5a1a8cc5973c12f | [
"Apache-2.0"
] | null | null | null | Paxos_wDocker_nMininet/proposer.py | asgokhale/DistributedSystemsCourse | 9ae24ed65e7a7ef849c7e39ec5a1a8cc5973c12f | [
"Apache-2.0"
] | 1 | 2022-01-25T23:51:51.000Z | 2022-01-25T23:51:51.000Z | #!/usr/bin/python
#
# Purpose: Paxos Proposer
#
# Vanderbilt University Computer Science
# Author: Aniruddha Gokhale
# Course: CS6381 Distributed Systems Principles
# Created: Spring 2021
#
# Can be used on Mininet, insider a Docker cluster, and directly on distributed hosts
#
#
# system and time
import os
import sy... | 44.961667 | 199 | 0.56652 |
ffed366da40de5ce079f1486067c690e4e593104 | 10,723 | py | Python | env/Lib/site-packages/azure/servicebus/models.py | Ammar12/simplebanking | 6080d638b2e98bfcf96d782703e1dce25aebfcbc | [
"MIT"
] | null | null | null | env/Lib/site-packages/azure/servicebus/models.py | Ammar12/simplebanking | 6080d638b2e98bfcf96d782703e1dce25aebfcbc | [
"MIT"
] | null | null | null | env/Lib/site-packages/azure/servicebus/models.py | Ammar12/simplebanking | 6080d638b2e98bfcf96d782703e1dce25aebfcbc | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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://w... | 42.05098 | 89 | 0.650564 |
ffed3eb16b62d48b38bf26d12556b376bea78c10 | 331 | py | Python | sources/migrations/0014_remove_person_private.py | industrydive/sourcedive | eb8c4657a6c3182666dc15109bd982a5d5ba1325 | [
"MIT"
] | null | null | null | sources/migrations/0014_remove_person_private.py | industrydive/sourcedive | eb8c4657a6c3182666dc15109bd982a5d5ba1325 | [
"MIT"
] | 16 | 2019-05-30T20:55:25.000Z | 2020-06-09T18:52:34.000Z | sources/migrations/0014_remove_person_private.py | industrydive/sourcedive | eb8c4657a6c3182666dc15109bd982a5d5ba1325 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-07-26 15:45
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('sources', '0013_person_privacy_level'),
]
operations = [
migrations.RemoveField(
model_name='person',
name='private',
... | 18.388889 | 49 | 0.595166 |
ffed3f510016d0919371df6cc9f52af837cf8712 | 2,520 | py | Python | tests/testcli_3.py | gruiick/pySpaceTrader | 64de4de5fc57ef22e891d95a21d62f35f5ccb025 | [
"BSD-2-Clause"
] | 1 | 2020-04-08T08:00:08.000Z | 2020-04-08T08:00:08.000Z | tests/testcli_3.py | gruiick/pySpaceTrader | 64de4de5fc57ef22e891d95a21d62f35f5ccb025 | [
"BSD-2-Clause"
] | 5 | 2021-05-28T13:02:55.000Z | 2021-06-25T10:44:17.000Z | tests/testcli_3.py | gruiick/pySpaceTrader | 64de4de5fc57ef22e891d95a21d62f35f5ccb025 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
#
# $Id: testcli_3.py 1303.v0.2-dev.1 $
# SPDX-License-Identifier: BSD-2-Clause
"""
some tests
"""
# from dataclasses import dataclass
from pprint import pprint
from itertools import groupby
# import constants
import core
PODS = {0: {'type': 'food', 'value': 109},
1: {... | 24.466019 | 86 | 0.528571 |
ffed4a6af3bc0a6f546758550fc498e9b5d9c8fd | 41,369 | py | Python | cinder/backup/manager.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/backup/manager.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/backup/manager.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
# 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/LICEN... | 45.410538 | 79 | 0.566028 |
ffed8fb5b35d799ba331fd638e1ed67c5036fb1a | 5,232 | py | Python | oscar/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/pgraster.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/pgraster.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/pgraster.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | import binascii
import struct
from django.forms import ValidationError
from .const import (
GDAL_TO_POSTGIS, GDAL_TO_STRUCT, POSTGIS_HEADER_STRUCTURE, POSTGIS_TO_GDAL,
STRUCT_SIZE,
)
def pack(structure, data):
"""
Pack data into hex string with little endian format.
"""
return... | 32.296296 | 80 | 0.616972 |
ffed971c0da1cce740a3fe158acc8ff0bfc87180 | 6,608 | py | Python | object.py | dealien/Survivor | cbc0bcedad9811dd0ebe8a727cdd3bba5d3775fa | [
"MIT"
] | 8 | 2018-11-21T21:17:29.000Z | 2022-01-31T06:20:54.000Z | object.py | dealien/Survivor | cbc0bcedad9811dd0ebe8a727cdd3bba5d3775fa | [
"MIT"
] | 34 | 2018-11-21T21:18:23.000Z | 2020-01-14T00:24:41.000Z | object.py | dealien/Survivor | cbc0bcedad9811dd0ebe8a727cdd3bba5d3775fa | [
"MIT"
] | null | null | null | import random
import pygame
from settings import *
from settings import RANDTEXTURE, GRAPHICS, IMPASSABLE, IMGSIZE
class Object(pygame.sprite.Sprite):
""" """
# This is a generic object: player, monster, chest, stairs etc.
def __init__(self, image, x, y):
pygame.sprite.Sprite.__init__(self)
... | 30.878505 | 118 | 0.551301 |
ffedaee9e5f5a834301595c5a4221c3ad36150d8 | 6,478 | py | Python | data_steward/test/unit_test/achilles_test.py | amcgrenera-vumc/curation | f30aa8cb3b8de4e5dfdc3c95a0d98ca21de7df08 | [
"MIT"
] | null | null | null | data_steward/test/unit_test/achilles_test.py | amcgrenera-vumc/curation | f30aa8cb3b8de4e5dfdc3c95a0d98ca21de7df08 | [
"MIT"
] | null | null | null | data_steward/test/unit_test/achilles_test.py | amcgrenera-vumc/curation | f30aa8cb3b8de4e5dfdc3c95a0d98ca21de7df08 | [
"MIT"
] | null | null | null | import os
import unittest
from google.appengine.ext import testbed
import bq_utils
import gcs_utils
import resources
import test_util
import validation.sql_wrangle
from test_util import FAKE_HPO_ID
from validation import achilles
# This may change if we strip out unused analyses
ACHILLES_LOOKUP_COUNT = 215
ACHILLES_... | 47.632353 | 120 | 0.717351 |
ffedb44bf09010aad3bf701b6799ba5600d8b2b8 | 3,501 | py | Python | amg/utils.py | ladoramkershner/automated-metadata-generation | 38890c77f9224b9d769ad30796fd25afd60fd5bd | [
"CC0-1.0"
] | null | null | null | amg/utils.py | ladoramkershner/automated-metadata-generation | 38890c77f9224b9d769ad30796fd25afd60fd5bd | [
"CC0-1.0"
] | null | null | null | amg/utils.py | ladoramkershner/automated-metadata-generation | 38890c77f9224b9d769ad30796fd25afd60fd5bd | [
"CC0-1.0"
] | null | null | null | import glob
import json
import os
from typing import Sequence
def find_file(*path: Sequence[str]) -> str:
"""
Find a single file along a given PATH.
Parameters
----------
path : list
of strings defining a path and any search
wildcards
Returns
-------
found : str
... | 24.65493 | 71 | 0.519566 |
ffedbef06bddfd6e2bd3d723e6de512d77b5ac57 | 829 | py | Python | examples/example_filter/example_skip.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 86 | 2017-08-17T12:41:52.000Z | 2022-02-24T12:17:47.000Z | examples/example_filter/example_skip.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 10 | 2020-03-30T03:24:46.000Z | 2022-02-23T01:34:53.000Z | examples/example_filter/example_skip.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 7 | 2017-08-18T03:40:35.000Z | 2020-05-19T04:09:10.000Z | # !/usr/local/python/bin/python
# -*- coding: utf-8 -*-
# (C) Wu Dong, 2020
# All rights reserved
# @Author: 'Wu Dong <wudong@eastwu.cn>'
# @Time: '2020-04-13 10:51'
""" 演示skip忽略请求参数功能,pre-request仅尝试将key和value添加到params参数字典中
"""
from flask import Flask
from pre_request import pre, Rule
app = Flask(__name__)
app.confi... | 19.738095 | 68 | 0.670688 |
ffeddd7189f1aa59c08af38ae051cf7969eef92d | 8,376 | py | Python | src/demo_music_critic/convert_wav.py | fcr/Haifa_Tech_Meetup_Talk | d33a74dac894d2c5cd6aa49e1a60a7df284c0f8f | [
"MIT"
] | 4 | 2020-04-08T03:02:09.000Z | 2021-11-05T12:24:34.000Z | src/demo_music_critic/convert_wav.py | fcr/python_meetup_htm_slides | ef261cd2ec0bb81ecdd829420ae273baff3892cf | [
"MIT"
] | null | null | null | src/demo_music_critic/convert_wav.py | fcr/python_meetup_htm_slides | ef261cd2ec0bb81ecdd829420ae273baff3892cf | [
"MIT"
] | 1 | 2020-12-04T03:23:11.000Z | 2020-12-04T03:23:11.000Z | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... | 31.022222 | 96 | 0.686843 |
ffede64e57b4bc00fccf0cb99104b9d30a52c9cd | 5,658 | py | Python | docs/source/conf.py | ogreen/cugraph | d94ab29f14e6212a0c8bb5ec5fbe9e300cd57594 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | ogreen/cugraph | d94ab29f14e6212a0c8bb5ec5fbe9e300cd57594 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | ogreen/cugraph | d94ab29f14e6212a0c8bb5ec5fbe9e300cd57594 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018, NVIDIA CORPORATION.
#
# pygdf documentation build configuration file, created by
# sphinx-quickstart on Wed May 3 10:59:22 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible con... | 29.623037 | 79 | 0.690703 |
ffee0e51766681cf83588a614ce3f6feb1adf9a2 | 468 | py | Python | instructors/course-2015/logging/examples/log_ex1.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | instructors/course-2015/logging/examples/log_ex1.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | instructors/course-2015/logging/examples/log_ex1.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z | """
This is all you need to start logging!
In the last example we will get an equivalent short snip for a more advanced logger.
"""
import logging
logging.basicConfig(level='ERROR')
logging.debug("This is a string that we want to log.")
logging.warning("This is a string that we want to log.")
#logging.debug("This i... | 26 | 84 | 0.728632 |
ffee4f1f74f460d0f7716663f2a991eb6a5d2929 | 3,064 | py | Python | tests/common/test_run/ascend/selu_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_run/ascend/selu_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_run/ascend/selu_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2020-2021 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 agre... | 37.365854 | 104 | 0.718995 |
ffee768d1512815f32b4583ced88fb606743e7fe | 3,293 | py | Python | setup.py | efe/tdk | 7f2b1c7d3d3561d858b815267cccebc89e57af01 | [
"MIT"
] | 13 | 2018-12-13T11:16:34.000Z | 2021-03-02T10:56:54.000Z | setup.py | efe/tdk-cli | 7f2b1c7d3d3561d858b815267cccebc89e57af01 | [
"MIT"
] | 3 | 2019-08-15T11:16:28.000Z | 2020-09-16T11:30:52.000Z | setup.py | efe/tdk-cli | 7f2b1c7d3d3561d858b815267cccebc89e57af01 | [
"MIT"
] | 1 | 2018-10-27T12:30:06.000Z | 2018-10-27T12:30:06.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Note: To use the 'upload' functionality of this file, you must:
# $ pip install twine
import io
import os
import sys
from shutil import rmtree
from setuptools import find_packages, setup, Command
# Package meta-data.
NAME = 'tdk'
DESCRIPTION = 'A library for officia... | 27.214876 | 86 | 0.635591 |
ffee8f781d611bdc066acf66f7a51479272e9ee0 | 7,236 | py | Python | empower/core/ue.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | 2 | 2020-02-28T15:54:01.000Z | 2020-11-24T08:45:11.000Z | empower/core/ue.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | null | null | null | empower/core/ue.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | 1 | 2020-03-02T16:41:20.000Z | 2020-03-02T16:41:20.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2016 Roberto Riggio
#
# 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 applicabl... | 26.505495 | 79 | 0.555556 |
ffeea500a83c8fdd5d8d1cdc6d8b2c31c7126c45 | 236 | py | Python | vanilla_nn.py | OxenCotin/6.864_project | f430fa7e97bca08db4888947b980ab1e255f4f1a | [
"AAL"
] | null | null | null | vanilla_nn.py | OxenCotin/6.864_project | f430fa7e97bca08db4888947b980ab1e255f4f1a | [
"AAL"
] | null | null | null | vanilla_nn.py | OxenCotin/6.864_project | f430fa7e97bca08db4888947b980ab1e255f4f1a | [
"AAL"
] | null | null | null | import torch.nn as nn
import numpy as np
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.lin1 = nn.Linear()
self.lin2 = nn.Linear()
def forward(self, document):
out =
| 19.666667 | 35 | 0.59322 |
ffeeb1ac3bc49777af8694d5e8c73ef4a4b53535 | 113,508 | py | Python | pandaserver/dataservice/SetupperAtlasPlugin.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | null | null | null | pandaserver/dataservice/SetupperAtlasPlugin.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | null | null | null | pandaserver/dataservice/SetupperAtlasPlugin.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | null | null | null | '''
setup dataset for ATLAS
'''
import re
import sys
import time
import uuid
import datetime
import traceback
from pandaserver.dataservice import ErrorCode
from pandaserver.dataservice.DDM import rucioAPI
from pandaserver.taskbuffer.DatasetSpec import DatasetSpec
from pandaserver.taskbuffer import EventServiceUtils
f... | 54.284075 | 152 | 0.45514 |
ffeed1585a784ed9cbd8467b2c143cd90c64d1d6 | 1,771 | py | Python | src/test/tests/operators/inverse_ghost_zone.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/operators/inverse_ghost_zone.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/operators/inverse_ghost_zone.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: inverse_ghost_zone.py
#
# Defect ID: '6724
#
# Programmer: Hank Childs
# Date: March 3, 2006
#
# Modifications:
#
# Mark C. Miller, Wed Jan 20 07:37:11 PST 2010
# Added ability to switch ... | 23.302632 | 78 | 0.692264 |
ffeed15964e16e9bac9a39c119c160315ffcca82 | 1,833 | py | Python | activelearner/models/svm.py | EandrewJones/activelearner | ad706c222a5bdd65d30c1e00b3b9187b82525a59 | [
"Apache-2.0"
] | null | null | null | activelearner/models/svm.py | EandrewJones/activelearner | ad706c222a5bdd65d30c1e00b3b9187b82525a59 | [
"Apache-2.0"
] | 1 | 2020-06-07T21:08:57.000Z | 2020-06-07T21:08:57.000Z | activelearner/models/svm.py | EandrewJones/activelearner | ad706c222a5bdd65d30c1e00b3b9187b82525a59 | [
"Apache-2.0"
] | null | null | null | '''
SVM
An interrace for scikit-learn's C-Support Vector Classifier Model
'''
import logging
LOGGER = logging.getLogger(__name__)
import numpy as np
import sklearn.svm
from sklearn.multiclass import OneVsRestClassifier
from activelearner.interfaces import ContinuousModel
class SVM(ContinuousModel):
"""
C-... | 32.157895 | 75 | 0.644299 |
ffef3b199eb55540ef049bf5054771fdfc7d2c8c | 2,522 | py | Python | applications/tensorflow/cnns/training/Models/resnext.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/training/Models/resnext.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/training/Models/resnext.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | # Copyright 2019 Graphcore Ltd.
import tensorflow as tf
from .resnet_base import *
class ResNeXt(ResNetBase):
def __init__(self, opts, is_training=True):
if opts['dataset'] == 'imagenet':
definitions = RESNETS_Bottleneck_Imagenet
else:
if opts['widenet']:
de... | 35.521127 | 77 | 0.596352 |
ffef610099a99fdf3c5ed98b499d782265b9ca96 | 988 | py | Python | python/phonenumbers/shortdata/region_IQ.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:54.000Z | 2021-03-08T18:59:40.000Z | python/phonenumbers/shortdata/region_IQ.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/shortdata/region_IQ.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 1 | 2018-11-10T03:47:34.000Z | 2018-11-10T03:47:34.000Z | """Auto-generated file, do not edit by hand. IQ metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_IQ = PhoneMetadata(id='IQ', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='1\\d{2}', possible_number_pattern='\\d{... | 76 | 131 | 0.785425 |
ffef6644c4bc169858a7a4179c4189008ef14baf | 1,482 | py | Python | scripts/preprocess_embeddings.py | LandAndLand/ClinicalNotesICU | 0665a4ce61da110012e24eaa5500247ad9d0bea0 | [
"MIT"
] | 6 | 2019-11-14T21:49:54.000Z | 2021-02-23T09:15:24.000Z | scripts/preprocess_embeddings.py | LandAndLand/ClinicalNotesICU | 0665a4ce61da110012e24eaa5500247ad9d0bea0 | [
"MIT"
] | 3 | 2020-05-07T14:18:18.000Z | 2020-07-20T02:59:02.000Z | scripts/preprocess_embeddings.py | LandAndLand/ClinicalNotesICU | 0665a4ce61da110012e24eaa5500247ad9d0bea0 | [
"MIT"
] | 8 | 2020-01-05T13:59:28.000Z | 2022-01-03T06:55:59.000Z | from gensim.models import KeyedVectors
import pickle
import os
from config import Config
args = Config()
filename = '~/embeds/BioWordVec_PubMed_MIMICIII_d200.vec.bin'
model = KeyedVectors.load_word2vec_format(filename, binary=True)
print(model.vectors.shape)
print(len(model.index2word))
print(model.index2word[:20])
... | 23.52381 | 65 | 0.61336 |
ffef78c18be7e149e19591296f231294f53dc9e1 | 12,481 | py | Python | test/test_threads.py | ContextLogic/mongo-python-driver | 2435f8609d21c32123d315222b662990e8377f48 | [
"Apache-2.0"
] | null | null | null | test/test_threads.py | ContextLogic/mongo-python-driver | 2435f8609d21c32123d315222b662990e8377f48 | [
"Apache-2.0"
] | null | null | null | test/test_threads.py | ContextLogic/mongo-python-driver | 2435f8609d21c32123d315222b662990e8377f48 | [
"Apache-2.0"
] | 1 | 2020-03-26T08:42:40.000Z | 2020-03-26T08:42:40.000Z | # Copyright 2009-2012 10gen, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 31.677665 | 79 | 0.628395 |
ffef83ab594d3ef7e4fd905774e3727ea54bee70 | 1,642 | py | Python | luafun/utils/python_fix.py | Delaunay/LuaFun | bd0efd8fc2b064d6bf58993e59a6ad4ac6713b39 | [
"BSD-3-Clause"
] | 1 | 2021-02-06T06:42:29.000Z | 2021-02-06T06:42:29.000Z | luafun/utils/python_fix.py | Delaunay/LuaFun | bd0efd8fc2b064d6bf58993e59a6ad4ac6713b39 | [
"BSD-3-Clause"
] | 6 | 2021-04-08T21:46:06.000Z | 2021-05-09T01:40:04.000Z | luafun/utils/python_fix.py | Delaunay/LuaFun | bd0efd8fc2b064d6bf58993e59a6ad4ac6713b39 | [
"BSD-3-Clause"
] | null | null | null | from collections import defaultdict
import copy
from dataclasses import _is_dataclass_instance, fields
def asdict(obj, *, dict_factory=dict):
"""Return the fields of a dataclass instance as a new dictionary mapping
field names to field values.
Example usage:
@dataclass
class C:
x: in... | 34.93617 | 103 | 0.65408 |
ffefd3cac19bf5f1824004cb412fe8a1f207276d | 1,559 | py | Python | blender_integration/ipc_docker.py | brookman/IPC | 531527c3583d4b3ef7950bb10147a6d33308f7a3 | [
"MIT"
] | null | null | null | blender_integration/ipc_docker.py | brookman/IPC | 531527c3583d4b3ef7950bb10147a6d33308f7a3 | [
"MIT"
] | null | null | null | blender_integration/ipc_docker.py | brookman/IPC | 531527c3583d4b3ef7950bb10147a6d33308f7a3 | [
"MIT"
] | null | null | null | import os
class IpcDocker:
def __init__(self):
self.mesh_container_name = 'ipc_mesh'
self.run_container_name = 'ipc_run'
self.delete_container(self.mesh_container_name)
self.delete_container(self.run_container_name)
self.run_container(self.mesh_container_name, ['mkdir -p ... | 50.290323 | 182 | 0.688262 |
ffefdb41fdaf1a2687f8eda0ebdb3b20bc8db123 | 1,504 | py | Python | data-serving/scripts/prune-uploads/hooks/aggregate.py | open-covid-data/healthmap-gdo-temp | 5af5c9e2f7dcefa9039dc6b3a2e2c5094566fc2e | [
"MIT"
] | 5 | 2020-04-16T13:54:24.000Z | 2020-07-06T13:42:10.000Z | data-serving/scripts/prune-uploads/hooks/aggregate.py | open-covid-data/healthmap-gdo-temp | 5af5c9e2f7dcefa9039dc6b3a2e2c5094566fc2e | [
"MIT"
] | 487 | 2020-04-16T00:56:09.000Z | 2020-07-27T09:09:29.000Z | data-serving/scripts/prune-uploads/hooks/aggregate.py | open-covid-data/healthmap-gdo-temp | 5af5c9e2f7dcefa9039dc6b3a2e2c5094566fc2e | [
"MIT"
] | null | null | null | # Runs aggregate job after prune-uploads
import logging
import os
from typing import Any
import boto3
AWS_REGION = os.getenv("GDH_AGGREGATE_AWS_REGION", "eu-central-1")
# Job definition names are of the form PREFIX-<env>
PREFIX = os.getenv("JOB_DEF_PREFIX", "gdh-map-aggregation")
JOB_QUEUE = os.getenv("AGG_JOB_QUEUE... | 34.976744 | 80 | 0.639628 |
ffefee00a2ee76d9372cf9822b08938adae5b8f6 | 7,201 | py | Python | applications/tensorflow/cnns/training/Models/squeezenet.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/training/Models/squeezenet.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/training/Models/squeezenet.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | # Copyright 2019 Graphcore Ltd.
"""
SqueezeNet
A Convolutional ineural network with relatively few parameters (~1.25M) but equivalent
accuracy to AlexNet.
Architecture originally described in Caffe. Implemented here in Tensorflow for the IPU.
SQUEEZENET: ALEXNET-LEVEL ACCURACY WITH
50X FEWER PARAMETERS AND <0.5MB M... | 35.648515 | 99 | 0.616164 |
fff007691d0e6b413974fd633ebd82153aa16b87 | 3,644 | py | Python | experiments/ashvin/contexts/rig/pusher/test2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/contexts/rig/pusher/test2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/contexts/rig/pusher/test2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.contextual_rig_launcher_util import (
goal_conditioned_sac_experiment, process_args
)
from rlkit.launchers.launcher_util import run_experiment
from rlkit.launchers.arglauncher import run_variants
from multiworld.envs.mujoco.cameras import sawyer_init_cam... | 31.686957 | 73 | 0.57382 |
fff0b4b5e3b854fc9d8f30981e9f02a8fbdac450 | 3,901 | py | Python | config_files/wordnet_gloss_corpus.py | s-mizuki-nlp/semantic_specialization | 4d00a461f18828ee8ebaccf7c737a32ccc11809f | [
"Apache-2.0"
] | null | null | null | config_files/wordnet_gloss_corpus.py | s-mizuki-nlp/semantic_specialization | 4d00a461f18828ee8ebaccf7c737a32ccc11809f | [
"Apache-2.0"
] | null | null | null | config_files/wordnet_gloss_corpus.py | s-mizuki-nlp/semantic_specialization | 4d00a461f18828ee8ebaccf7c737a32ccc11809f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
DIR_SREF_CORPUS = "/home/sakae/Windows/dataset/word_sense_disambiguation/SREF/corpus/"
DIR_SREF_EMBEDDINGS = "/home/sakae/Windows/dataset/word_sense_disambiguation/SREF/vectors/"
from .sense_annotated_corpus import cfg_training
# evaluation dataset for all-word... | 50.012821 | 201 | 0.690336 |
fff0f84e6b213dd4bb84855dfa096fed3f06c3c9 | 5,236 | py | Python | assignments/hw7-backprop/code/nodes.py | 42Questions/ml_examples | c4bf4172ba9fad2a5e0f37d22314d10174e6a0c0 | [
"MIT"
] | null | null | null | assignments/hw7-backprop/code/nodes.py | 42Questions/ml_examples | c4bf4172ba9fad2a5e0f37d22314d10174e6a0c0 | [
"MIT"
] | null | null | null | assignments/hw7-backprop/code/nodes.py | 42Questions/ml_examples | c4bf4172ba9fad2a5e0f37d22314d10174e6a0c0 | [
"MIT"
] | null | null | null | """Computation graph node types
Nodes must implement the following methods:
__init__ - initialize node
forward - (step 1 of backprop) retrieve output ("out") of predecessor nodes (if
applicable), update own output ("out"), and set gradient ("d_out") to zero
backward - (step 2 of backprop), assumes ... | 33.350318 | 88 | 0.613636 |
fff124e803ed2bb2be8ddf7aedf74c88e124eec9 | 448 | py | Python | test/efficiency-tests/activations.py | Ankit-Dhankhar/PySyft | 750bd2c3987a570ef1dc8554b933696d416724c7 | [
"Apache-2.0"
] | null | null | null | test/efficiency-tests/activations.py | Ankit-Dhankhar/PySyft | 750bd2c3987a570ef1dc8554b933696d416724c7 | [
"Apache-2.0"
] | null | null | null | test/efficiency-tests/activations.py | Ankit-Dhankhar/PySyft | 750bd2c3987a570ef1dc8554b933696d416724c7 | [
"Apache-2.0"
] | 1 | 2021-04-18T15:27:15.000Z | 2021-04-18T15:27:15.000Z | from .assertions import assert_time
import pytest
import syft as sy
import torch as th
@pytest.mark.parametrize("activation", [th.tanh, th.sigmoid])
@assert_time(max_time=1)
def test_activation(activation, hook, workers):
bob = workers["bob"]
alice = workers["alice"]
crypto_prov = sy.VirtualWorker(hook,... | 24.888889 | 89 | 0.725446 |
fff16941b31146f3a3a5a809eddc5c22e89ec61c | 3,741 | py | Python | sfepy/postprocess/utils_vtk.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 510 | 2015-01-19T16:22:25.000Z | 2022-03-30T19:02:51.000Z | sfepy/postprocess/utils_vtk.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 402 | 2015-01-22T10:57:50.000Z | 2022-03-30T15:19:23.000Z | sfepy/postprocess/utils_vtk.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 156 | 2015-01-05T14:23:38.000Z | 2022-03-22T13:08:30.000Z | """Postprocessing utils based on VTK library"""
import vtk
import os
import tempfile
vtk_version = vtk.vtkVersion().GetVTKMajorVersion()
def get_vtk_from_file(filename):
"""
Read VTK file.
Parameters
----------
filename : str
Name of the VTK file.
Returns
-------
vtkdata : V... | 21.255682 | 79 | 0.613472 |
fff17402e23cb7b054d3e433650666b0554ed8ba | 12,118 | py | Python | tensorflow/python/training/sync_replicas_optimizer_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/training/sync_replicas_optimizer_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/training/sync_replicas_optimizer_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.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 applica... | 40.939189 | 80 | 0.679815 |
fff17ac4ab16b01255cc80c35579928ddaea164a | 402 | py | Python | pdbdb/migrations/0006_pdbresidueset_description.py | sndg-arg/covid19-web | fe809c87563a00bbec53c3646338d571fdde6a69 | [
"MIT"
] | null | null | null | pdbdb/migrations/0006_pdbresidueset_description.py | sndg-arg/covid19-web | fe809c87563a00bbec53c3646338d571fdde6a69 | [
"MIT"
] | 2 | 2021-03-10T17:08:59.000Z | 2021-09-29T17:40:48.000Z | pdbdb/migrations/0006_pdbresidueset_description.py | sndg-arg/covid19-web | fe809c87563a00bbec53c3646338d571fdde6a69 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-07-16 01:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pdbdb', '0005_auto_20200715_2235'),
]
operations = [
migrations.AddField(
model_name='pdbresidueset',
name='descript... | 21.157895 | 58 | 0.60199 |
fff17f0b759d0019bd9d71bca9f04ca5048d74d4 | 5,538 | py | Python | tests/unit/test_bake_project.py | neuromation/cookiecutter-neuro-project | b21458d3fd9300237667ac67ba1811dc14012d7a | [
"Apache-2.0"
] | 5 | 2019-09-17T14:00:13.000Z | 2020-08-31T08:05:28.000Z | tests/unit/test_bake_project.py | neuromation/cookiecutter-neuro-project | b21458d3fd9300237667ac67ba1811dc14012d7a | [
"Apache-2.0"
] | 249 | 2019-09-10T13:41:30.000Z | 2020-09-16T10:12:05.000Z | tests/unit/test_bake_project.py | neuromation/cookiecutter-neuro-project | b21458d3fd9300237667ac67ba1811dc14012d7a | [
"Apache-2.0"
] | 1 | 2019-09-20T12:29:13.000Z | 2019-09-20T12:29:13.000Z | import os
import subprocess
import sys
from pathlib import Path
import py
import pytest
import yaml
from cookiecutter.exceptions import FailedHookException
from pipx.constants import DEFAULT_PIPX_BIN_DIR, LOCAL_BIN_DIR
from pytest_cookies.plugin import Cookies # type: ignore
from pytest_virtualenv import VirtualEnv
... | 34.397516 | 88 | 0.637595 |
fff1803165c9c02a2dbfe3d9e54809c66036be79 | 180 | py | Python | 0x04-python-more_data_structures/0-square_matrix_simple.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | 0x04-python-more_data_structures/0-square_matrix_simple.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | 0x04-python-more_data_structures/0-square_matrix_simple.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
def square_matrix_simple(matrix=[]):
new = []
for i in range(0, len(matrix)):
new.append(list(map((lambda x: x * x), matrix[i])))
return new
| 25.714286 | 59 | 0.594444 |
fff1c3ff809492fb71e85a996c9654b3d57952fa | 1,845 | py | Python | setup.py | alexcrichton/wasmtime-py | 90ba6da0a0c5e8a13bdc28c019330f71067823df | [
"Apache-2.0"
] | 4 | 2020-03-25T20:55:29.000Z | 2020-03-26T08:57:43.000Z | setup.py | alexcrichton/wasmtime-py | 90ba6da0a0c5e8a13bdc28c019330f71067823df | [
"Apache-2.0"
] | null | null | null | setup.py | alexcrichton/wasmtime-py | 90ba6da0a0c5e8a13bdc28c019330f71067823df | [
"Apache-2.0"
] | null | null | null | import setuptools
import os
with open("README.md", "r") as fh:
long_description = fh.read()
version = "0.4.0"
# Give unique version numbers to all commits so our publication-on-each commit
# works on master
if 'PROD' not in os.environ:
stream = os.popen('git rev-list HEAD --count')
output = stream.read()... | 33.545455 | 80 | 0.63794 |
fff1c5ef9882f0c479d119ddb0bf68e919c016b4 | 2,740 | py | Python | tensorflow/python/keras/layers/embeddings_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/keras/layers/embeddings_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/keras/layers/embeddings_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.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 applica... | 32.619048 | 80 | 0.635401 |
fff1d4e7b7b8a27fb411a43fb8cea771209d13a6 | 571 | py | Python | Day 52 - Instagram Follower Bot/main.py | atulmkamble/100DaysOfCode | ccfb6cb8582be69c63c666a3b097e0130585e4c9 | [
"MIT"
] | 2 | 2021-12-07T00:39:57.000Z | 2021-12-07T01:44:21.000Z | Day 52 - Instagram Follower Bot/main.py | atulmkamble/100DaysOfCode | ccfb6cb8582be69c63c666a3b097e0130585e4c9 | [
"MIT"
] | null | null | null | Day 52 - Instagram Follower Bot/main.py | atulmkamble/100DaysOfCode | ccfb6cb8582be69c63c666a3b097e0130585e4c9 | [
"MIT"
] | 1 | 2021-09-12T14:02:27.000Z | 2021-09-12T14:02:27.000Z | """
This program follows the followers of an intended Instagram account
"""
# Import required class
from insta_follower import InstaFollower
# Initialize global variables
target_account = '' # TODO: Intended target account. e.g., shraddhakapoor
USERNAME = '' # TODO: Your instagram username
PASSWORD = '' # TODO: Your ... | 23.791667 | 73 | 0.739054 |
fff1d7e30085b03b587b164d1f31e87c35d0ba63 | 21,273 | py | Python | webapp/user.py | heyudude/webapp-flask-sqlite3-template | 5cba4e8acf0c9ee4ac5a5c1e7264317c4b3f92a5 | [
"MIT"
] | 1 | 2021-09-28T09:58:32.000Z | 2021-09-28T09:58:32.000Z | webapp/user.py | heyudude/webapp-flask-sqlite3-template | 5cba4e8acf0c9ee4ac5a5c1e7264317c4b3f92a5 | [
"MIT"
] | 29 | 2020-02-28T12:53:02.000Z | 2021-06-02T10:23:43.000Z | webapp/user.py | heyudude/webapp-flask-sqlite3-template | 5cba4e8acf0c9ee4ac5a5c1e7264317c4b3f92a5 | [
"MIT"
] | 1 | 2021-06-06T20:15:01.000Z | 2021-06-06T20:15:01.000Z | "User display and login/logout HTMl endpoints."
import fnmatch
import http.client
import json
import flask
import flask_mail
from werkzeug.security import check_password_hash, generate_password_hash
from webapp import constants
from webapp import utils
from webapp.saver import BaseSaver
KEYS = ["iuid", "username", ... | 41.95858 | 82 | 0.582616 |
fff1dba49a4d3e9edac946b36ca88f79c184c246 | 2,917 | py | Python | lab/refactoring/extract_class.py | sprajjwal/spd2.3-Testing_and_Architecture | 333e4e191d51eae3f8e84b2aca2f2f63731a22aa | [
"MIT"
] | null | null | null | lab/refactoring/extract_class.py | sprajjwal/spd2.3-Testing_and_Architecture | 333e4e191d51eae3f8e84b2aca2f2f63731a22aa | [
"MIT"
] | null | null | null | lab/refactoring/extract_class.py | sprajjwal/spd2.3-Testing_and_Architecture | 333e4e191d51eae3f8e84b2aca2f2f63731a22aa | [
"MIT"
] | null | null | null | # by Kami Bigdely
# Extract Class
class Food:
def __init__(
self, name, prep_time, is_veggie, food_type, cuisine, ingredients, recipe
):
self.name = name
self.prep_time = prep_time
self.is_veggie = is_veggie
self.food_type = food_type
self.cuisine = ... | 29.17 | 103 | 0.512513 |
fff1de03927bbeea5091f054c70deb1aa65af7e9 | 2,875 | py | Python | bundle/sagemaker_rl_agent/lib/python3.6/site-packages/markov/virtual_event/virtual_event_race_data.py | larsll/deepracer-simapp | 9251c32ff33d49955b63ccca4f38d01a0c721d4f | [
"MIT"
] | 3 | 2021-07-25T15:10:35.000Z | 2021-10-30T02:35:33.000Z | bundle/sagemaker_rl_agent/lib/python3.6/site-packages/markov/virtual_event/virtual_event_race_data.py | larsll/deepracer-simapp | 9251c32ff33d49955b63ccca4f38d01a0c721d4f | [
"MIT"
] | null | null | null | bundle/sagemaker_rl_agent/lib/python3.6/site-packages/markov/virtual_event/virtual_event_race_data.py | larsll/deepracer-simapp | 9251c32ff33d49955b63ccca4f38d01a0c721d4f | [
"MIT"
] | 3 | 2021-07-25T15:16:06.000Z | 2022-03-28T14:13:22.000Z | import rospy
from markov import utils
from markov.virtual_event.constants import DEFAULT_RACE_DURATION
class VirtualEventRaceData():
"""
VirtualEventRaceData class
"""
def __init__(self):
"""
VirtualEventRaceData constructor
"""
self._region = rospy.get_param("AWS_REGI... | 25.219298 | 90 | 0.588522 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.