hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8e12c2ea0bb3dc10c29a17c14b0b682a2529c3cb | 80 | py | Python | credentials/raspador_slackbot_credentials.py | xyla-io/raspador | 4e77234239d44a83faf5c1d3a6d022a9e3861f25 | [
"MIT"
] | null | null | null | credentials/raspador_slackbot_credentials.py | xyla-io/raspador | 4e77234239d44a83faf5c1d3a6d022a9e3861f25 | [
"MIT"
] | null | null | null | credentials/raspador_slackbot_credentials.py | xyla-io/raspador | 4e77234239d44a83faf5c1d3a6d022a9e3861f25 | [
"MIT"
] | null | null | null | raspador_slackbot_credentials = {
'BOT_NAME': {
'api_token': 'TOKEN'
}
} | 16 | 33 | 0.6375 |
d6c75602aa92c02dae36d62a300f509b23471bc8 | 12,219 | py | Python | Python/klampt/control/controller.py | smeng9/Klampt | 7ff91bead90ac04280eff310623338fd10aaba79 | [
"BSD-3-Clause"
] | 238 | 2015-01-09T15:21:27.000Z | 2022-03-30T22:48:45.000Z | Python/klampt/control/controller.py | smeng9/Klampt | 7ff91bead90ac04280eff310623338fd10aaba79 | [
"BSD-3-Clause"
] | 89 | 2015-08-26T16:56:42.000Z | 2022-03-29T23:45:46.000Z | Python/klampt/control/controller.py | smeng9/Klampt | 7ff91bead90ac04280eff310623338fd10aaba79 | [
"BSD-3-Clause"
] | 84 | 2015-01-10T18:41:52.000Z | 2022-03-30T03:32:50.000Z | """Defines a set of generic "controller blocks" that are repeatedly-updating
processes, which typically output commands to a simulated or real robot.
However, blocks can do much more, including estimators, read from sensor
drivers, etc.
The :class:`ControllerBlock` class defines a block as accepting some
inputs and p... | 36.693694 | 98 | 0.660447 |
c93515952f04e11c4a251c72d7d77e4a67dea485 | 2,692 | py | Python | keras/src/layers/trainable_lambda_loss_function_layers.py | garysnake/crsae | ca03574fc75e855e612df71535504e956ef897c7 | [
"MIT"
] | null | null | null | keras/src/layers/trainable_lambda_loss_function_layers.py | garysnake/crsae | ca03574fc75e855e612df71535504e956ef897c7 | [
"MIT"
] | null | null | null | keras/src/layers/trainable_lambda_loss_function_layers.py | garysnake/crsae | ca03574fc75e855e612df71535504e956ef897c7 | [
"MIT"
] | null | null | null | """
Copyright (c) 2018 CRISP
Layer with a trainable scalar multiplication.
:author: Bahareh Tolooshams
"""
from keras import backend as K
from keras.layers import Layer
from keras.initializers import (
Identity,
Initializer,
Constant,
Ones,
Zeros,
RandomNormal,
)
from keras.activations import... | 27.191919 | 86 | 0.568351 |
07345f4fd4627daffd8facb6a31678ee7a216e8e | 13,926 | py | Python | src/Infraestructura/clusterServer/reactors/vmServerPacketReactor.py | lbarriosh/cygnus-cloud | 1a17fbb55de69adba2ec42db4c9a063865af4fbd | [
"Apache-2.0"
] | 3 | 2017-09-03T22:01:35.000Z | 2019-01-10T05:40:44.000Z | src/Infraestructura/clusterServer/reactors/vmServerPacketReactor.py | lbarriosh/cygnus-cloud | 1a17fbb55de69adba2ec42db4c9a063865af4fbd | [
"Apache-2.0"
] | null | null | null | src/Infraestructura/clusterServer/reactors/vmServerPacketReactor.py | lbarriosh/cygnus-cloud | 1a17fbb55de69adba2ec42db4c9a063865af4fbd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
'''
========================================================================
CygnusCloud
========================================================================
File: vmServerPacketReactor.py
Version: 5.0
Description: virtual machi... | 51.198529 | 151 | 0.650582 |
9527e264a0817ce99188bada1aae8c5cae50d033 | 369 | py | Python | stor/wallet/lineage_proof.py | Stor-Network/stor-blockchain | 3c3cd1a3b99592e88160107ca5b81afc0937b992 | [
"Apache-2.0"
] | 19 | 2021-06-29T20:06:09.000Z | 2022-02-09T04:33:00.000Z | stor/wallet/lineage_proof.py | Stor-Network/stor-blockchain | 3c3cd1a3b99592e88160107ca5b81afc0937b992 | [
"Apache-2.0"
] | 8 | 2021-07-04T03:21:51.000Z | 2021-12-27T07:56:09.000Z | stor/wallet/lineage_proof.py | Stor-Network/stor-blockchain | 3c3cd1a3b99592e88160107ca5b81afc0937b992 | [
"Apache-2.0"
] | 6 | 2021-10-04T17:15:30.000Z | 2022-03-15T08:40:01.000Z | from dataclasses import dataclass
from typing import Optional
from stor.types.blockchain_format.sized_bytes import bytes32
from stor.util.ints import uint64
from stor.util.streamable import Streamable, streamable
@dataclass(frozen=True)
@streamable
class LineageProof(Streamable):
parent_name: bytes32
inner_p... | 24.6 | 60 | 0.818428 |
ac3f8e488a862bcb0feda704fe84d85f9d8a93a1 | 40,203 | py | Python | py3status/core.py | boucman/py3status | 84b57304fbf71a466ccb1ed2f2dd039ece6eefb6 | [
"BSD-3-Clause"
] | 1 | 2020-04-07T19:11:36.000Z | 2020-04-07T19:11:36.000Z | py3status/core.py | boucman/py3status | 84b57304fbf71a466ccb1ed2f2dd039ece6eefb6 | [
"BSD-3-Clause"
] | 2 | 2018-03-15T18:44:42.000Z | 2018-03-15T19:22:04.000Z | py3status/core.py | boucman/py3status | 84b57304fbf71a466ccb1ed2f2dd039ece6eefb6 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
from __future__ import division
import os
import pkg_resources
import sys
import time
from collections import deque
from json import dumps
from pprint import pformat
from signal import signal, SIGTERM, SIGUSR1, SIGTSTP, SIGCONT
from subprocess import Popen
from threading import E... | 38.288571 | 87 | 0.577196 |
65cce102c88ed6de1fd235c159908017b0173dca | 1,913 | py | Python | DjangoBlog/admin_site.py | pointworld/DjangoBlog | 0ceb8a4b5cb9518fceb7b59357447230eca1a65a | [
"MIT"
] | 4 | 2019-09-09T12:54:59.000Z | 2019-09-18T06:56:43.000Z | DjangoBlog/admin_site.py | pointworld/DjangoBlog | 0ceb8a4b5cb9518fceb7b59357447230eca1a65a | [
"MIT"
] | null | null | null | DjangoBlog/admin_site.py | pointworld/DjangoBlog | 0ceb8a4b5cb9518fceb7b59357447230eca1a65a | [
"MIT"
] | 1 | 2019-09-09T12:54:21.000Z | 2019-09-09T12:54:21.000Z | from django.contrib.admin import AdminSite
from django.contrib.sites.admin import SiteAdmin
from django.contrib.admin.models import LogEntry
from django.contrib.sites.models import Site
from DjangoBlog.logentryadmin import LogEntryAdmin
from blog.admin import *
from accounts.admin import *
from oauth.admin import *
fro... | 29.430769 | 82 | 0.772608 |
b1a1e69a9e043c2f25204cfe53fe03ee3825a6c0 | 551 | py | Python | research/delf/delf/python/examples/tomesek_npy_to_list.py | brejchajan/models | 37e05adf3d43c3bf6684cb65dfcfdab6e7d754ac | [
"Apache-2.0"
] | null | null | null | research/delf/delf/python/examples/tomesek_npy_to_list.py | brejchajan/models | 37e05adf3d43c3bf6684cb65dfcfdab6e7d754ac | [
"Apache-2.0"
] | null | null | null | research/delf/delf/python/examples/tomesek_npy_to_list.py | brejchajan/models | 37e05adf3d43c3bf6684cb65dfcfdab6e7d754ac | [
"Apache-2.0"
] | null | null | null | import numpy as np
import os
from tqdm import tqdm
d = np.load('/mnt/matylda1/itomesek/PUBLIC/Switzerland_evaluation/Alps_photos_to_segments_compact_test.npy', allow_pickle='True').item()
#root_path = '/mnt/matylda1/Locate/data/photoparam_raw/netvlad/Alps/database_depth'
root_path = '/mnt/data1/data/delg/Alps_query'
... | 42.384615 | 136 | 0.749546 |
878d8fa09507cda07a0366f1819f6682794a0507 | 288 | py | Python | .bash/powerline-shell/segments/root.py | chrislaskey/.dot-files | 44be2364f2824a2c70300f7c0f2963a592c7083e | [
"MIT"
] | null | null | null | .bash/powerline-shell/segments/root.py | chrislaskey/.dot-files | 44be2364f2824a2c70300f7c0f2963a592c7083e | [
"MIT"
] | null | null | null | .bash/powerline-shell/segments/root.py | chrislaskey/.dot-files | 44be2364f2824a2c70300f7c0f2963a592c7083e | [
"MIT"
] | null | null | null | def add_root_indicator_segment():
root_indicators = {
'bash': ' \\$',
'zsh': ' %#',
'bare': ' $',
}
bg = Color.CMD_PASSED_BG
fg = Color.CMD_PASSED_FG
powerline.append(root_indicators[powerline.args.shell], fg, bg)
add_root_indicator_segment()
| 24 | 67 | 0.600694 |
1a3d2e9e0a05353f35efdc2676a339f220413c78 | 772 | py | Python | docs/conf.py | gmr/tornado-dynamodb | 902867ed33a033bac6f047b7c8053326d6587b8a | [
"BSD-3-Clause"
] | 2 | 2016-01-01T09:20:36.000Z | 2016-11-04T08:53:43.000Z | docs/conf.py | gmr/tornado-dynamodb | 902867ed33a033bac6f047b7c8053326d6587b8a | [
"BSD-3-Clause"
] | 1 | 2016-03-13T15:35:25.000Z | 2016-04-01T12:49:39.000Z | docs/conf.py | gmr/tornado-dynamodb | 902867ed33a033bac6f047b7c8053326d6587b8a | [
"BSD-3-Clause"
] | null | null | null | import sys
sys.path.insert(0, '../')
import tornado_dynamodb
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = 'torn... | 22.057143 | 68 | 0.687824 |
250328b6d6cf969c07462707e01f319b2d904179 | 450 | py | Python | riccipy/metrics/mclenaghan_tariq_tupper.py | cjayross/riccipy | 2cc0ca5e1aa4af91b203b3ff2bb1effd7d2f4846 | [
"MIT"
] | 4 | 2019-08-17T04:28:06.000Z | 2021-01-02T15:19:18.000Z | riccipy/metrics/mclenaghan_tariq_tupper.py | grdbii/riccipy | 2cc0ca5e1aa4af91b203b3ff2bb1effd7d2f4846 | [
"MIT"
] | 3 | 2019-08-02T04:07:43.000Z | 2020-06-18T07:49:38.000Z | riccipy/metrics/mclenaghan_tariq_tupper.py | grdbii/riccipy | 2cc0ca5e1aa4af91b203b3ff2bb1effd7d2f4846 | [
"MIT"
] | null | null | null | """
Name: McLenaghan-Tariq-Tupper
References:
- McLenaghan, J. Math. Phys., v16, p11, (1975)
- Tupper, Gen. Rel. Grav., v7, p479, (1976)
- Stephani (10.21) p121
"""
from sympy import diag, symbols
coords = symbols("t x y phi", real=True)
variables = symbols("a", constant=True)
functions = ()
t, x, y, ph = ... | 26.470588 | 72 | 0.577778 |
0d843dfd7ec1f878e2a94aa0cfe3d58453021428 | 2,065 | py | Python | src/foreign_if/python/main/python/frovedis/matrix/dtype.py | XpressAI/frovedis | bda0f2c688fb832671c5b542dd8df1c9657642ff | [
"BSD-2-Clause"
] | null | null | null | src/foreign_if/python/main/python/frovedis/matrix/dtype.py | XpressAI/frovedis | bda0f2c688fb832671c5b542dd8df1c9657642ff | [
"BSD-2-Clause"
] | null | null | null | src/foreign_if/python/main/python/frovedis/matrix/dtype.py | XpressAI/frovedis | bda0f2c688fb832671c5b542dd8df1c9657642ff | [
"BSD-2-Clause"
] | null | null | null | """dtype.py"""
#!/usr/bin/env python
import numpy as np
from ctypes import c_char_p
def get_string_array_pointer(str_vec):
str_vec = np.asarray(str_vec)
str_ptr = (c_char_p * len(str_vec))()
str_ptr[:] = np.array([e.encode('ascii') for e in str_vec.T])
return str_ptr
class DTYPE:
"""A python cont... | 28.287671 | 79 | 0.572881 |
28853a8ac6e99a5121579ab822bb6590701865e2 | 2,854 | py | Python | src/score.py | lionking0000/recYnH | da1e4898c4148b399ed0f0a0848f5748679b7b98 | [
"MIT"
] | 2 | 2020-03-02T11:09:31.000Z | 2020-03-12T13:48:40.000Z | src/score.py | lionking0000/recYnH | da1e4898c4148b399ed0f0a0848f5748679b7b98 | [
"MIT"
] | null | null | null | src/score.py | lionking0000/recYnH | da1e4898c4148b399ed0f0a0848f5748679b7b98 | [
"MIT"
] | null | null | null | import os
VERBOSE = False
def run_cmd( cmd ):
if VERBOSE: print cmd
os.system( cmd )
def read_R_generated_matrix( file ):
rownames = []
colnames = []
m = []
f = open( file )
for line in f.xreadlines():
if line[0] == "#": continue
rownames = line[:-1].split("\t")
bre... | 32.804598 | 137 | 0.598458 |
952d747347c55a3b6af09a29fcd29e43de392329 | 9,085 | py | Python | out/pe_file_format.py | horus-4ever/python-file-format-reader | 3e38647ff28682a598eb0bd0e2547fa5db7b3d38 | [
"MIT"
] | 1 | 2021-05-01T12:46:06.000Z | 2021-05-01T12:46:06.000Z | out/pe_file_format.py | horus-4ever/python-file-format-reader | 3e38647ff28682a598eb0bd0e2547fa5db7b3d38 | [
"MIT"
] | null | null | null | out/pe_file_format.py | horus-4ever/python-file-format-reader | 3e38647ff28682a598eb0bd0e2547fa5db7b3d38 | [
"MIT"
] | null | null | null |
import sys
FILE = sys.argv[1]
reader = open(FILE, "rb")
def _runtime_lookup(name):
try:
return _func_wrapper(getattr(MAPS, name).__getitem__)
except AttributeError:
pass
try:
return _func_wrapper(getattr(BITFLAGS, name).get)
except AttributeError:
print(f"No such map ... | 39.672489 | 159 | 0.69268 |
0ccdafea09b3e339af212afff484eac41d67ab96 | 239 | py | Python | netman/core/validator.py | internap/netman | 8760f168cf056ce4428d239610514969e5f9bf56 | [
"Apache-2.0"
] | 38 | 2015-11-30T10:11:42.000Z | 2022-02-10T18:31:44.000Z | netman/core/validator.py | internap/netman | 8760f168cf056ce4428d239610514969e5f9bf56 | [
"Apache-2.0"
] | 143 | 2015-12-10T19:00:42.000Z | 2020-08-20T13:51:42.000Z | netman/core/validator.py | internap/netman | 8760f168cf056ce4428d239610514969e5f9bf56 | [
"Apache-2.0"
] | 15 | 2015-12-14T23:03:30.000Z | 2019-01-15T19:35:45.000Z | from netman.core.objects.exceptions import BadMplsIpState
def is_valid_mpls_state(state):
option = str(state).lower()
if option not in ['true', 'false']:
raise BadMplsIpState(state)
return {'state': option == 'true'}
| 26.555556 | 57 | 0.686192 |
d20268352296031922d33fd7d66b723f83ce7b5c | 3,411 | py | Python | mapmint-services/context/service.py | mapmint/mapmint | 6425c3178e6e3f3d036aed60e03eb9924e00f9f8 | [
"MIT"
] | 41 | 2015-02-10T10:34:42.000Z | 2022-02-25T07:52:12.000Z | mapmint-services/context/service.py | mapmint/mapmint | 6425c3178e6e3f3d036aed60e03eb9924e00f9f8 | [
"MIT"
] | 19 | 2015-01-06T11:48:35.000Z | 2021-09-03T15:40:23.000Z | mapmint-services/context/service.py | mapmint/mapmint | 6425c3178e6e3f3d036aed60e03eb9924e00f9f8 | [
"MIT"
] | 33 | 2015-02-20T09:34:57.000Z | 2021-05-26T14:18:37.000Z | # -*- coding: utf-8 -*-
###############################################################################
# Author: Gérald Fenoy, gerald.fenoy@geolabs.fr
# Copyright (c) 2010-2019, Cartoworks Inc.
###############################################################################
# Permission is hereby granted, free o... | 37.9 | 111 | 0.615069 |
41c8f290ef339e1c25a51a8083c33abc653c6d51 | 5,353 | py | Python | test/functional/feature_versionbits_warning.py | bitcoin-rush/bitcoinrush | 4329a6a7b9ce7a2188225f4abfc307e68de7dae0 | [
"MIT"
] | null | null | null | test/functional/feature_versionbits_warning.py | bitcoin-rush/bitcoinrush | 4329a6a7b9ce7a2188225f4abfc307e68de7dae0 | [
"MIT"
] | null | null | null | test/functional/feature_versionbits_warning.py | bitcoin-rush/bitcoinrush | 4329a6a7b9ce7a2188225f4abfc307e68de7dae0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-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 version bits warning system.
Generate chains with block versions that appear to be signalling unk... | 47.371681 | 140 | 0.712124 |
e3d620a70cffe28f506d4c0cf64f1c63da85d7bd | 6,204 | py | Python | Incident-Response/Tools/grr/grr/core/grr_response_core/lib/parsers/linux_release_parser_test.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 1 | 2021-07-24T17:22:50.000Z | 2021-07-24T17:22:50.000Z | Incident-Response/Tools/grr/grr/core/grr_response_core/lib/parsers/linux_release_parser_test.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-28T03:40:31.000Z | 2022-02-28T03:40:52.000Z | Incident-Response/Tools/grr/grr/core/grr_response_core/lib/parsers/linux_release_parser_test.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-25T08:34:51.000Z | 2022-03-16T17:29:44.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""Unit test for the linux distribution parser."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import io
import os
from absl import app
from grr_response_core.lib.parsers import linux_release_parser
fr... | 31.653061 | 80 | 0.693746 |
cd4efc10879355904d75ed588afb3fbc432263b3 | 10,975 | py | Python | remo/voting/migrations/0007_auto__add_field_poll_bug__add_field_poll_automated_poll__chg_field_pol.py | glogiotatidis/remo | 1c4f55c63c8d03cbee776b60af042b8068d9f297 | [
"BSD-3-Clause"
] | null | null | null | remo/voting/migrations/0007_auto__add_field_poll_bug__add_field_poll_automated_poll__chg_field_pol.py | glogiotatidis/remo | 1c4f55c63c8d03cbee776b60af042b8068d9f297 | [
"BSD-3-Clause"
] | null | null | null | remo/voting/migrations/0007_auto__add_field_poll_bug__add_field_poll_automated_poll__chg_field_pol.py | glogiotatidis/remo | 1c4f55c63c8d03cbee776b60af042b8068d9f297 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Poll.bug'
db.add_column('voting_poll', 'bug',
self.gf('django.db.model... | 72.203947 | 201 | 0.565558 |
182330f9c5a6a796c456b6f446b06eefe4624238 | 11,396 | py | Python | setup.py | ArneBinder/transformers | ddaafd78fb9c98d4f7b5009fb1998deff4c3d6f1 | [
"Apache-2.0"
] | 1 | 2021-02-08T06:35:21.000Z | 2021-02-08T06:35:21.000Z | setup.py | ArneBinder/transformers | ddaafd78fb9c98d4f7b5009fb1998deff4c3d6f1 | [
"Apache-2.0"
] | null | null | null | setup.py | ArneBinder/transformers | ddaafd78fb9c98d4f7b5009fb1998deff4c3d6f1 | [
"Apache-2.0"
] | 3 | 2021-09-19T00:54:21.000Z | 2021-11-22T01:13:26.000Z | # Copyright 2020 The HuggingFace Team. 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 applicabl... | 36.292994 | 233 | 0.67357 |
3af51437903540119d8d80bb0bc088f669ca3ecd | 2,652 | py | Python | contrib/attic/jumpy/setup.py | eric-erki/deeplearning4j | b9d462f66879e9315767b70190bd2ab31b9a3275 | [
"Apache-2.0"
] | null | null | null | contrib/attic/jumpy/setup.py | eric-erki/deeplearning4j | b9d462f66879e9315767b70190bd2ab31b9a3275 | [
"Apache-2.0"
] | null | null | null | contrib/attic/jumpy/setup.py | eric-erki/deeplearning4j | b9d462f66879e9315767b70190bd2ab31b9a3275 | [
"Apache-2.0"
] | null | null | null | # /* ******************************************************************************
# * Copyright (c) 2021 Deeplearning4j Contributors
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License, Version 2.0 which is available at
# * https://www.apache.org... | 42.774194 | 84 | 0.585973 |
6c4f3cf2e292b6d3e2945f9435fbe4e56b1166ef | 5,119 | py | Python | convexgeometry/optimization.py | jtanderson/convexgeometry | 572236e7f7374eff309391f65a3b91dcdc9c31ca | [
"MIT"
] | 1 | 2021-03-02T21:53:49.000Z | 2021-03-02T21:53:49.000Z | convexgeometry/optimization.py | jtanderson/convexgeometry | 572236e7f7374eff309391f65a3b91dcdc9c31ca | [
"MIT"
] | null | null | null | convexgeometry/optimization.py | jtanderson/convexgeometry | 572236e7f7374eff309391f65a3b91dcdc9c31ca | [
"MIT"
] | 1 | 2021-06-08T20:48:53.000Z | 2021-06-08T20:48:53.000Z | import numpy as np
import numpy.linalg as la
def CentralCutEllipsoid(eps, sepK, n, R):
"""
Solves the following problem:
Given a rational number eps > 0 and circumscriebd convex set (K; n, R)
given by an oracle sepK that, for any y and any rational delta > 0,
either asserts that y in S(K, delta) or... | 29.589595 | 95 | 0.544247 |
50be83eeff14fa7efb8c148221e43e942800ead2 | 65,170 | py | Python | src/hangar/checkout.py | KarenImmanuel/hangar-py | 2a5caff259ad699db56676f14a70cb94e75d8a5b | [
"Apache-2.0"
] | null | null | null | src/hangar/checkout.py | KarenImmanuel/hangar-py | 2a5caff259ad699db56676f14a70cb94e75d8a5b | [
"Apache-2.0"
] | null | null | null | src/hangar/checkout.py | KarenImmanuel/hangar-py | 2a5caff259ad699db56676f14a70cb94e75d8a5b | [
"Apache-2.0"
] | null | null | null | import atexit
import os
import weakref
from contextlib import suppress
from functools import partial
from collections import namedtuple
from uuid import uuid4
import lmdb
import warnings
from .arrayset import Arraysets
from .diff import ReaderUserDiff, WriterUserDiff
from .merger import select_merge_algorithm
from .m... | 39.859327 | 97 | 0.580513 |
1bb553cfb5c764f4eb32d61012ef3c60a96e058e | 2,935 | py | Python | word2vec/graph.py | pjavia/NLP | 21f3bee00842564cdb0618bcf4ba9a589af0fc69 | [
"MIT"
] | null | null | null | word2vec/graph.py | pjavia/NLP | 21f3bee00842564cdb0618bcf4ba9a589af0fc69 | [
"MIT"
] | null | null | null | word2vec/graph.py | pjavia/NLP | 21f3bee00842564cdb0618bcf4ba9a589af0fc69 | [
"MIT"
] | null | null | null | import tensorflow as tf
import preprocessing
from random import shuffle, seed
from datetime import datetime
from tensorflow.contrib.tensorboard.plugins import projector
import os
g = tf.Graph()
batch = 20
par = (2, 128, 'datasetSentences.txt')
obj = preprocessing.word2vec(par)
obj.fetch_data()
obj.prepare_data_for_wor... | 40.205479 | 117 | 0.660307 |
ccd959d905c91fc690f22e23018d457b6a67aa5d | 8,736 | py | Python | intersight/model/ether_physical_port_list_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/ether_physical_port_list_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/ether_physical_port_list_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... | 49.636364 | 1,678 | 0.639881 |
4cd0cb1a313c30ebdb2927742061ea7ed65911b2 | 25,269 | py | Python | neurst/tasks/speech2text.py | Yaoming95/neurst | f7e2a043f20b6724310b048035e0a6075f60032a | [
"Apache-2.0"
] | 16 | 2021-06-22T02:36:32.000Z | 2022-03-27T23:07:55.000Z | neurst/tasks/speech2text.py | Yaoming95/neurst | f7e2a043f20b6724310b048035e0a6075f60032a | [
"Apache-2.0"
] | 1 | 2022-03-12T13:28:23.000Z | 2022-03-12T13:28:23.000Z | neurst/tasks/speech2text.py | Yaoming95/neurst | f7e2a043f20b6724310b048035e0a6075f60032a | [
"Apache-2.0"
] | 3 | 2021-08-03T12:49:35.000Z | 2021-09-02T03:58:18.000Z | # Copyright 2020 ByteDance 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 writin... | 51.674847 | 119 | 0.608572 |
ee2620eaa7243e232e0de52745eb4a5cf2a57e18 | 1,052 | py | Python | isi_sdk_7_2/test/test_filepool_default_policy_default_policy.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_7_2/test/test_filepool_default_policy_default_policy.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_7_2/test/test_filepool_default_policy_default_policy.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 2
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_7_2
from isi... | 25.658537 | 126 | 0.747148 |
b786f9603f5261e8a5ea4730c546f96480c776a1 | 143 | py | Python | modules/text/decorate/arabic/__init__.py | painor/modular_menu_bot | 18e560ef674c72b4572e14ed63f2ae262f364706 | [
"MIT"
] | null | null | null | modules/text/decorate/arabic/__init__.py | painor/modular_menu_bot | 18e560ef674c72b4572e14ed63f2ae262f364706 | [
"MIT"
] | null | null | null | modules/text/decorate/arabic/__init__.py | painor/modular_menu_bot | 18e560ef674c72b4572e14ed63f2ae262f364706 | [
"MIT"
] | null | null | null | from gettext import gettext as _
name = _("decorate arabic text")
description = _("decorates an arabic text using a random method each time")
| 28.6 | 75 | 0.762238 |
08169789dea12aea4a26c3090fa018c1655e45bb | 21,536 | py | Python | sympy/series/gruntz.py | mamueller/sympy | be25332c4341e008839052475c8d4e5853ce56fe | [
"BSD-3-Clause"
] | null | null | null | sympy/series/gruntz.py | mamueller/sympy | be25332c4341e008839052475c8d4e5853ce56fe | [
"BSD-3-Clause"
] | null | null | null | sympy/series/gruntz.py | mamueller/sympy | be25332c4341e008839052475c8d4e5853ce56fe | [
"BSD-3-Clause"
] | 1 | 2019-09-19T06:20:55.000Z | 2019-09-19T06:20:55.000Z | """
Limits
======
Implemented according to the PhD thesis
http://www.cybertester.com/data/gruntz.pdf, which contains very thorough
descriptions of the algorithm including many examples. We summarize here
the gist of it.
All functions are sorted according to how rapidly varying they are at
infinity using the followin... | 32.482655 | 83 | 0.589385 |
f9ab4b160ce5ba162feee37f4b4d41e3421795ac | 3,604 | py | Python | tourism/settings.py | mhiloca/TourismApi | b9904354f2d249e996d79f7a6ad58269c68363d7 | [
"MIT"
] | null | null | null | tourism/settings.py | mhiloca/TourismApi | b9904354f2d249e996d79f7a6ad58269c68363d7 | [
"MIT"
] | null | null | null | tourism/settings.py | mhiloca/TourismApi | b9904354f2d249e996d79f7a6ad58269c68363d7 | [
"MIT"
] | null | null | null | """
Django settings for tourism project.
Generated by 'django-admin startproject' using Django 2.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
fr... | 25.560284 | 91 | 0.704495 |
73a83df24f35f451808c953ddb5b42fd5fa9ffdd | 2,197 | py | Python | script/analyze/poetcloud.py | onlyrico/poetry | 2a81d7824832aed24d393f20fc8adeafb1bda7fb | [
"MIT"
] | 496 | 2020-04-09T12:54:26.000Z | 2022-03-27T09:21:48.000Z | script/analyze/poetcloud.py | onlyrico/poetry | 2a81d7824832aed24d393f20fc8adeafb1bda7fb | [
"MIT"
] | 5 | 2019-08-19T14:39:18.000Z | 2021-11-12T02:16:31.000Z | script/analyze/poetcloud.py | onlyrico/poetry | 2a81d7824832aed24d393f20fc8adeafb1bda7fb | [
"MIT"
] | 59 | 2019-12-17T01:06:11.000Z | 2022-03-24T06:06:41.000Z | # 诗人词云生成,字数=频率
# pip install pyecharts
import os.path as path
import os
from math import log10
import math
from pyecharts.charts import WordCloud
adjust = {}
file = open('./search_count.csv', 'r', encoding='utf-8')
segs = list(map(lambda line: line.split(','), file.readlines()[1:]))
count_max = 0
for... | 31.385714 | 85 | 0.592626 |
72328682d7d493d5ab811d47e587b49e1e212ad1 | 318 | py | Python | setup.py | jbjulia/mcc-mnc | 1290476535a3786515bdc92a6189afd327a7c816 | [
"MIT"
] | null | null | null | setup.py | jbjulia/mcc-mnc | 1290476535a3786515bdc92a6189afd327a7c816 | [
"MIT"
] | null | null | null | setup.py | jbjulia/mcc-mnc | 1290476535a3786515bdc92a6189afd327a7c816 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='mcc-mnc',
version='1.0.0',
packages=['src'],
url='https://github.com/jbjulia/mcc-mnc',
license='MIT',
author='Joseph Julian',
author_email='joseph.b.julian@gmail.com',
description='Mobile Country Codes (MCC) and Mobile Network Codes (MNC)',
)
| 24.461538 | 76 | 0.654088 |
0e9534913154632467ba4ee1275445d7b9a57141 | 6,109 | py | Python | tools/c7n_trailcreator/setup.py | wildbinaryforest/cloud-custodian | f132a909003738ff48c3008665ad7f4aa596553d | [
"Apache-2.0"
] | 1 | 2020-06-26T16:55:54.000Z | 2020-06-26T16:55:54.000Z | tools/c7n_trailcreator/setup.py | wildbinaryforest/cloud-custodian | f132a909003738ff48c3008665ad7f4aa596553d | [
"Apache-2.0"
] | null | null | null | tools/c7n_trailcreator/setup.py | wildbinaryforest/cloud-custodian | f132a909003738ff48c3008665ad7f4aa596553d | [
"Apache-2.0"
] | null | null | null | # Automatically generated from poetry/pyproject.toml
# flake8: noqa
# -*- coding: utf-8 -*-
from setuptools import setup
packages = \
['c7n_trailcreator']
package_data = \
{'': ['*']}
install_requires = \
['argcomplete (>=1.11.1,<2.0.0)',
'attrs (>=19.3.0,<20.0.0)',
'boto3 (>=1.14.8,<2.0.0)',
'botocore (>=1.17.8,... | 107.175439 | 4,623 | 0.697823 |
c71a62a28556172e1c39ba97410872cbe2788e43 | 1,534 | py | Python | implementation/adjacency_set_graph/__init__.py | e-liyai/Graphs_in_Python | 7b7ec2e38be8761ada4f58b65d6d50c8f2ff133b | [
"MIT"
] | null | null | null | implementation/adjacency_set_graph/__init__.py | e-liyai/Graphs_in_Python | 7b7ec2e38be8761ada4f58b65d6d50c8f2ff133b | [
"MIT"
] | null | null | null | implementation/adjacency_set_graph/__init__.py | e-liyai/Graphs_in_Python | 7b7ec2e38be8761ada4f58b65d6d50c8f2ff133b | [
"MIT"
] | null | null | null | import numpy as np
from implementation.base_graph import Graph
from implementation.node import Node
class AdjacencySetGraph(Graph):
def __init__(self, numVertices, directed=False):
super(AdjacencySetGraph, self).__init__(numVertices, directed)
self.vertex_list = []
for i in range(numVer... | 27.890909 | 80 | 0.613429 |
f88d42669772483c7412efe16c27fe8a5c4bb6a6 | 335 | py | Python | tests/__init__.py | davidlt/pkgtools | d9648d5c97c1c9612cca802bed1d3f12610e7be4 | [
"BSD-3-Clause"
] | 2 | 2015-04-25T14:48:37.000Z | 2017-12-13T14:24:40.000Z | tests/__init__.py | davidlt/pkgtools | d9648d5c97c1c9612cca802bed1d3f12610e7be4 | [
"BSD-3-Clause"
] | 60 | 2015-01-26T09:44:36.000Z | 2022-01-08T16:53:56.000Z | tests/__init__.py | davidlt/pkgtools | d9648d5c97c1c9612cca802bed1d3f12610e7be4 | [
"BSD-3-Clause"
] | 15 | 2015-01-19T08:46:53.000Z | 2020-04-14T19:11:30.000Z | from os.path import abspath
import imp
location = abspath (__file__)
testDir = location.rsplit ("/", 1)[0]
baseDir = location.rsplit ("/", 2)[0]
cmsBuildFilename = abspath (baseDir+"/cmsBuild")
cmsBuildFile = open (cmsBuildFilename, 'r')
cmsBuild = imp.load_module ("cmsBuild", cmsBuildFile, cmsBuildFilename, ["",'r', i... | 37.222222 | 96 | 0.725373 |
9ea749c178406275cc9b62017882ba125e3e89e2 | 1,163 | py | Python | tests/test_relu.py | gavinuhma/tf-encrypted | 4e18d78a151bbe91489a1773fb839b889ff5b460 | [
"Apache-2.0"
] | 3 | 2018-10-18T19:36:02.000Z | 2020-07-05T19:46:23.000Z | tests/test_relu.py | dropoutlabs/tf-encrypted | 48c9dc7419163425e736ad05bb19980d134fc851 | [
"Apache-2.0"
] | null | null | null | tests/test_relu.py | dropoutlabs/tf-encrypted | 48c9dc7419163425e736ad05bb19980d134fc851 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=missing-docstring
import unittest
import numpy as np
import tensorflow as tf
import tf_encrypted as tfe
from tf_encrypted.layers.activation import Relu
class TestRelu(unittest.TestCase):
def setUp(self):
tf.reset_default_graph()
def test_forward(self):
input_shape = [2, 2, 2, 50]
... | 26.431818 | 68 | 0.703353 |
e92d9b211e3c976b00af5ec99b05baa817837dd0 | 3,518 | py | Python | userbot/modules/sed.py | StayWithMe69/ViollinProject | b27f22e85ced75fa2230bfcec222341c374ca98c | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/sed.py | StayWithMe69/ViollinProject | b27f22e85ced75fa2230bfcec222341c374ca98c | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/sed.py | StayWithMe69/ViollinProject | b27f22e85ced75fa2230bfcec222341c374ca98c | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2022-03-17T22:23:51.000Z | 2022-03-17T22:23:51.000Z | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
# The entire source code is OSSRPL except 'sed' which is GPLv3
# License: GPLv3 and OSSRPL
""" Userbot command for sed.... | 30.068376 | 83 | 0.542354 |
6e3ce063d0092079b053ba007ae0d848e51e691d | 1,910 | py | Python | spirit/category/models.py | shriyanka/daemo-forum | 58c555f69208beedbb0c09f7b7d1e32ab741b2c5 | [
"MIT"
] | 1 | 2016-02-29T01:26:42.000Z | 2016-02-29T01:26:42.000Z | spirit/category/models.py | shriyanka/daemo-forum | 58c555f69208beedbb0c09f7b7d1e32ab741b2c5 | [
"MIT"
] | 16 | 2015-08-10T18:28:18.000Z | 2022-03-11T23:12:48.000Z | spirit/category/models.py | shriyanka/daemo-forum | 58c555f69208beedbb0c09f7b7d1e32ab741b2c5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from django.conf import settings
from .managers import CategoryQuerySet
from ..core.utils.models import AutoSlugField
cla... | 32.931034 | 100 | 0.7 |
a6f2e7346e17f22476592e8451e93e0c8c6de516 | 13,248 | py | Python | spanner/tests/unit/test_batch.py | bomboradata/bombora-google-cloud-python | 255bbebe6c50490f40fcc3eed40bae1e77e03859 | [
"Apache-2.0"
] | null | null | null | spanner/tests/unit/test_batch.py | bomboradata/bombora-google-cloud-python | 255bbebe6c50490f40fcc3eed40bae1e77e03859 | [
"Apache-2.0"
] | null | null | null | spanner/tests/unit/test_batch.py | bomboradata/bombora-google-cloud-python | 255bbebe6c50490f40fcc3eed40bae1e77e03859 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 36.098093 | 79 | 0.66795 |
f5b3d4def4eb1b55b946b4312030764117d0dac4 | 1,269 | py | Python | transforms/TileTissueNet5Class.py | msk-mind/luna-ml | a4ef02c5f64e83b55a9d244e04fd1ef01d604bf6 | [
"Apache-2.0"
] | null | null | null | transforms/TileTissueNet5Class.py | msk-mind/luna-ml | a4ef02c5f64e83b55a9d244e04fd1ef01d604bf6 | [
"Apache-2.0"
] | null | null | null | transforms/TileTissueNet5Class.py | msk-mind/luna-ml | a4ef02c5f64e83b55a9d244e04fd1ef01d604bf6 | [
"Apache-2.0"
] | null | null | null | import torch
import torchvision
from torchvision.models import resnet18, resnet34, resnet50, squeezenet1_1, vgg19_bn
from luna.pathology.analysis.ml import TorchTransformModel
from models.tissue_tile_net import TissueTileNet
from utils import get_state_dict_from_git_tag
import numpy as np
class TissueTileNetTransfor... | 36.257143 | 95 | 0.689519 |
d85b4e6462fb0489bd1eaf654a7b4bd95cadbd34 | 1,180 | py | Python | conference/migrations/0027_auto_20201204_1539.py | ethancarlsson/epcon | 10ae259ad75271651506d44cc5e71cf089349ea3 | [
"BSD-2-Clause"
] | 40 | 2015-03-03T22:14:58.000Z | 2022-02-15T22:27:48.000Z | conference/migrations/0027_auto_20201204_1539.py | ethancarlsson/epcon | 10ae259ad75271651506d44cc5e71cf089349ea3 | [
"BSD-2-Clause"
] | 699 | 2015-01-21T10:13:29.000Z | 2022-02-08T09:26:36.000Z | conference/migrations/0027_auto_20201204_1539.py | ethancarlsson/epcon | 10ae259ad75271651506d44cc5e71cf089349ea3 | [
"BSD-2-Clause"
] | 96 | 2015-01-22T11:03:13.000Z | 2022-01-31T05:35:34.000Z | # Generated by Django 2.2.17 on 2020-12-04 14:39
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('conference', '0026_auto_20201204_1130'),
]
operations = [
migrations.AlterField(
model_name='c... | 33.714286 | 202 | 0.637288 |
2b7dd22e7ac7d553df7dfbdbceb44315315ecd2c | 2,055 | py | Python | 2019/day23/2.py | tomhel/AoC_2019 | c76c34235821864bc763f85d43cbcbfb9ed43469 | [
"MIT"
] | 1 | 2021-12-07T13:18:52.000Z | 2021-12-07T13:18:52.000Z | 2019/day23/2.py | tomhel/AoC | c76c34235821864bc763f85d43cbcbfb9ed43469 | [
"MIT"
] | null | null | null | 2019/day23/2.py | tomhel/AoC | c76c34235821864bc763f85d43cbcbfb9ed43469 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import intcode
import threading
import queue
class Network(object):
def __init__(self):
self.devices = {}
self.nat = None
self.nat_log = []
def connect(self, address, ingress, egress):
self.devices[address] = (ingress, egress)
def is_idle(self):
... | 25.6875 | 91 | 0.506569 |
091ed8b032e0cd44e6dec6272ed7f59361ea7ac1 | 4,552 | py | Python | configs/example/hmctest.py | believe7028/gem5 | 9486ad465cbecd816a8d9500d05fa86c573756dd | [
"BSD-3-Clause"
] | 24 | 2019-07-09T06:17:08.000Z | 2022-03-17T11:13:22.000Z | configs/example/hmctest.py | believe7028/gem5 | 9486ad465cbecd816a8d9500d05fa86c573756dd | [
"BSD-3-Clause"
] | null | null | null | configs/example/hmctest.py | believe7028/gem5 | 9486ad465cbecd816a8d9500d05fa86c573756dd | [
"BSD-3-Clause"
] | 12 | 2019-07-08T09:31:55.000Z | 2021-12-15T02:42:35.000Z | from __future__ import print_function
import sys
import argparse
import subprocess
from pprint import pprint
import m5
from m5.objects import *
from m5.util import *
addToPath('../')
from common import MemConfig
from common import HMC
def add_options(parser):
parser.add_argument("--external-memory-system", de... | 39.241379 | 79 | 0.619069 |
e762ed54f9d144cbb05b1189a0d17a33ecf28de2 | 2,572 | py | Python | naive_bayes/emails/email_preprocess.py | bitnot/ud120 | 344469e5e0e875473f2070e333f706d7987b4993 | [
"MIT"
] | null | null | null | naive_bayes/emails/email_preprocess.py | bitnot/ud120 | 344469e5e0e875473f2070e333f706d7987b4993 | [
"MIT"
] | null | null | null | naive_bayes/emails/email_preprocess.py | bitnot/ud120 | 344469e5e0e875473f2070e333f706d7987b4993 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import pickle
import numpy
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.feature_selection import SelectPercentile, f_classif
def preprocess(words_file="../word_data.pkl", authors_file="../email_authors.pkl"):
"""... | 40.825397 | 108 | 0.726672 |
c785207371cb075b5c0a5cd9854d2f5ffa42ede2 | 3,983 | py | Python | plugins/inline.py | TR-TECH-GUIDE/Amanda-Music-v2 | fd49e9692ec5d657729b378e97a3bb298930f07d | [
"MIT"
] | 1 | 2021-12-22T14:10:41.000Z | 2021-12-22T14:10:41.000Z | plugins/inline.py | TharukRenuja/Amanda-Music-v2 | fd49e9692ec5d657729b378e97a3bb298930f07d | [
"MIT"
] | null | null | null | plugins/inline.py | TharukRenuja/Amanda-Music-v2 | fd49e9692ec5d657729b378e97a3bb298930f07d | [
"MIT"
] | 2 | 2021-09-04T02:16:26.000Z | 2021-10-05T03:46:54.000Z | #MIT License
#Copyright (c) 2021 TR-TECH-GUIDE
#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, merge, publis... | 39.83 | 280 | 0.624906 |
8398700a31b0bec0eff51711a05a7bc9861971f5 | 279 | py | Python | src/mdurl/_url.py | executablebooks/mdurl | a50720050d4d7bd1d66e41f81603bd82f6a1b228 | [
"MIT"
] | null | null | null | src/mdurl/_url.py | executablebooks/mdurl | a50720050d4d7bd1d66e41f81603bd82f6a1b228 | [
"MIT"
] | 3 | 2021-08-31T13:35:50.000Z | 2022-02-04T20:11:39.000Z | src/mdurl/_url.py | hukkin/mdurl | a50720050d4d7bd1d66e41f81603bd82f6a1b228 | [
"MIT"
] | 1 | 2021-08-31T13:27:54.000Z | 2021-08-31T13:27:54.000Z | from typing import NamedTuple, Optional
class URL(NamedTuple):
protocol: Optional[str]
slashes: bool
auth: Optional[str]
port: Optional[str]
hostname: Optional[str]
hash: Optional[str] # noqa: A003
search: Optional[str]
pathname: Optional[str]
| 21.461538 | 39 | 0.681004 |
6f90367354680864560ddd18abb8aed582b1eba6 | 303 | py | Python | src/griottes/__init__.py | BaroudLab/napari-griottes | c0a5885979a7747b8d3a496d5ff8c24d09d4afe0 | [
"BSD-3-Clause"
] | null | null | null | src/griottes/__init__.py | BaroudLab/napari-griottes | c0a5885979a7747b8d3a496d5ff8c24d09d4afe0 | [
"BSD-3-Clause"
] | null | null | null | src/griottes/__init__.py | BaroudLab/napari-griottes | c0a5885979a7747b8d3a496d5ff8c24d09d4afe0 | [
"BSD-3-Clause"
] | null | null | null |
try:
from ._version import version as __version__
except ImportError:
__version__ = "unknown"
from ._reader import napari_get_reader
from ._writer import write_single_image, write_multiple
from ._sample_data import make_sample_data
from ._widget import ExampleQWidget, example_magic_widget
| 25.25 | 57 | 0.818482 |
956d5190e27962643d8eafc53a32c2cccd36eca2 | 57,151 | py | Python | zerver/lib/export.py | anh2111htd/zulip | 001ec76e1f9ec460782dd4db608084dc142cae26 | [
"Apache-2.0"
] | null | null | null | zerver/lib/export.py | anh2111htd/zulip | 001ec76e1f9ec460782dd4db608084dc142cae26 | [
"Apache-2.0"
] | null | null | null | zerver/lib/export.py | anh2111htd/zulip | 001ec76e1f9ec460782dd4db608084dc142cae26 | [
"Apache-2.0"
] | null | null | null | import datetime
from boto.s3.connection import S3Connection
from boto.s3.key import Key # for mypy
from django.apps import apps
from django.conf import settings
from django.forms.models import model_to_dict
from django.utils.timezone import make_aware as timezone_make_aware
from django.utils.timezone import is_naive a... | 37.426981 | 109 | 0.657784 |
1b8462fded4a6e6ea746d258648a856bc93dbd11 | 15,320 | py | Python | exp/tests/test_lab_views.py | sehgalvibhor/lookit-api | 7dad97a2c9a0342fb839b5b11beaa4e00af99e8c | [
"MIT"
] | null | null | null | exp/tests/test_lab_views.py | sehgalvibhor/lookit-api | 7dad97a2c9a0342fb839b5b11beaa4e00af99e8c | [
"MIT"
] | null | null | null | exp/tests/test_lab_views.py | sehgalvibhor/lookit-api | 7dad97a2c9a0342fb839b5b11beaa4e00af99e8c | [
"MIT"
] | null | null | null | from django.test import Client, TestCase, override_settings
from django.urls import reverse
from django_dynamic_fixture import G
from guardian.shortcuts import assign_perm
from accounts.backends import TWO_FACTOR_AUTH_SESSION_KEY
from accounts.models import User
from studies.models import Lab, Study, StudyType
from st... | 41.293801 | 88 | 0.646279 |
571b5cb0bbeb167ec7325889879698a3c49e5b8c | 1,630 | py | Python | contact/migrations/0001_initial.py | Dimstella/blockchain-contact-tracing-app-hospitals | e0b2bf2b3b8c06e58032faed99900d1c7b7d300d | [
"MIT"
] | null | null | null | contact/migrations/0001_initial.py | Dimstella/blockchain-contact-tracing-app-hospitals | e0b2bf2b3b8c06e58032faed99900d1c7b7d300d | [
"MIT"
] | null | null | null | contact/migrations/0001_initial.py | Dimstella/blockchain-contact-tracing-app-hospitals | e0b2bf2b3b8c06e58032faed99900d1c7b7d300d | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2020-12-05 14:32
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
... | 44.054054 | 160 | 0.576687 |
cdee06a9ec68002af8327d177bb588be28ee4032 | 4,173 | py | Python | client/python/setup.py | miyamotok0105/modeldb | 6b2b7fb598d90be733e4b68efae3165c24efe2d1 | [
"MIT"
] | 1 | 2018-08-23T01:15:43.000Z | 2018-08-23T01:15:43.000Z | client/python/setup.py | miyamotok0105/modeldb | 6b2b7fb598d90be733e4b68efae3165c24efe2d1 | [
"MIT"
] | 1 | 2018-08-20T17:37:22.000Z | 2018-08-20T17:37:22.000Z | client/python/setup.py | miyamotok0105/modeldb | 6b2b7fb598d90be733e4b68efae3165c24efe2d1 | [
"MIT"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.absp... | 35.974138 | 94 | 0.661395 |
cbd6962d25f3901bbb114e1c49ffe7720c40aa11 | 2,206 | py | Python | pygeoapi/__init__.py | anthonyfok/pygeoapi | b6a981f46d8fdaa29540d9e34cd273fdab177371 | [
"MIT"
] | null | null | null | pygeoapi/__init__.py | anthonyfok/pygeoapi | b6a981f46d8fdaa29540d9e34cd273fdab177371 | [
"MIT"
] | 5 | 2021-12-10T14:10:28.000Z | 2021-12-10T17:08:57.000Z | pygeoapi/__init__.py | anthonyfok/pygeoapi | b6a981f46d8fdaa29540d9e34cd273fdab177371 | [
"MIT"
] | 3 | 2021-11-15T16:21:38.000Z | 2022-01-03T07:50:50.000Z | # =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
#
# Copyright (c) 2021 Tom Kralidis
#
# 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 ... | 34.46875 | 76 | 0.697189 |
7d76b04f21e976bde82c03730ff0e53d61cba4bb | 15,039 | py | Python | cnmodel/cells/sgc.py | cnmodel/cnmodel | e4fee803d9f783d961c4a7ebb69ae222b74d8441 | [
"BSD-3-Clause"
] | 5 | 2017-07-26T21:46:14.000Z | 2020-11-27T07:53:14.000Z | cnmodel/cells/sgc.py | cnmodel/cnmodel | e4fee803d9f783d961c4a7ebb69ae222b74d8441 | [
"BSD-3-Clause"
] | 12 | 2017-07-26T07:16:16.000Z | 2021-07-14T13:41:37.000Z | cnmodel/cells/sgc.py | cnmodel/cnmodel | e4fee803d9f783d961c4a7ebb69ae222b74d8441 | [
"BSD-3-Clause"
] | 10 | 2017-07-26T07:03:29.000Z | 2021-06-23T15:52:37.000Z | from __future__ import print_function
from neuron import h
from ..util import nstomho
from ..util import Params
import numpy as np
from .cell import Cell
from .. import synapses
from .. import an_model
from .. import data
__all__ = ['SGC', 'SGC_TypeI', 'DummySGC']
class SGC(Cell):
scaled = False
@classm... | 42.483051 | 133 | 0.586409 |
5dbc51101aa4413d5cb3d3874b613c3a1be48861 | 124 | py | Python | seismo/__init__.py | ezietsman/seismo | 43729526391126c025bf13d727edb693cd46daa9 | [
"MIT"
] | 1 | 2015-07-23T08:01:18.000Z | 2015-07-23T08:01:18.000Z | seismo/__init__.py | ezietsman/seismo | 43729526391126c025bf13d727edb693cd46daa9 | [
"MIT"
] | null | null | null | seismo/__init__.py | ezietsman/seismo | 43729526391126c025bf13d727edb693cd46daa9 | [
"MIT"
] | null | null | null | from .timeseries import deeming, fast_deeming, find_peak
from .fitting import signal, sinewave
from .session import Session
| 31 | 56 | 0.830645 |
f9471216393d4ce6df07969f5da1ee9015fdcc99 | 5,510 | py | Python | lwganrt/holo/holodemo.py | darkAlert/impersonator-rt | 8a2b879cf60f2094944a0104592d460fee3bda6a | [
"MIT"
] | 6 | 2020-04-17T08:47:58.000Z | 2021-07-02T10:58:52.000Z | lwganrt/holo/holodemo.py | darkAlert/impersonator-rt | 8a2b879cf60f2094944a0104592d460fee3bda6a | [
"MIT"
] | null | null | null | lwganrt/holo/holodemo.py | darkAlert/impersonator-rt | 8a2b879cf60f2094944a0104592d460fee3bda6a | [
"MIT"
] | 1 | 2020-05-24T23:46:54.000Z | 2020-05-24T23:46:54.000Z | import os
import glob
from shutil import copyfile
from holovideo import make_video
def run_imitator(img_dir, img_names, tgt_path, load_path, output_dir):
preds_name_mask = 'imitators/pred_*.jpg'
for img_name in img_names:
subject_name = img_name.split('.')[0]
src_path = os.path.join(img_dir,img_name)
print ... | 34.4375 | 237 | 0.748094 |
0f1f88f8795f5ea258778785d1aee5c343570443 | 12,214 | py | Python | examples/adwords/v201809/shopping/add_shopping_campaign_for_showcase_ads.py | beamc83/python-googleads | 6039d08e2d85850a46a70f24359d362ffde2f7ed | [
"Apache-2.0"
] | 2 | 2019-07-11T13:01:56.000Z | 2019-07-11T13:01:58.000Z | examples/adwords/v201809/shopping/add_shopping_campaign_for_showcase_ads.py | SoungMo/googleads-python-lib | fe86335c416e0571328c0a481c4b0cff863c01d9 | [
"Apache-2.0"
] | null | null | null | examples/adwords/v201809/shopping/add_shopping_campaign_for_showcase_ads.py | SoungMo/googleads-python-lib | fe86335c416e0571328c0a481c4b0cff863c01d9 | [
"Apache-2.0"
] | 1 | 2020-07-19T14:24:05.000Z | 2020-07-19T14:24:05.000Z | #!/usr/bin/env python
#
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 30.383085 | 80 | 0.664402 |
3517cc23d413b34aacfb0e6b9f51a521da23bf02 | 328 | py | Python | api/migrations/0004_remove_company_suppliers.py | apigram/jade-api | 1aece29c3109db68897fdf854be431554e7f2863 | [
"Apache-2.0"
] | null | null | null | api/migrations/0004_remove_company_suppliers.py | apigram/jade-api | 1aece29c3109db68897fdf854be431554e7f2863 | [
"Apache-2.0"
] | null | null | null | api/migrations/0004_remove_company_suppliers.py | apigram/jade-api | 1aece29c3109db68897fdf854be431554e7f2863 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.3 on 2018-11-09 13:26
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0003_auto_20181110_0020'),
]
operations = [
migrations.RemoveField(
model_name='company',
name='suppliers',
)... | 18.222222 | 47 | 0.591463 |
d585f1257918c8c823be929a0545044e8a281b53 | 5,411 | py | Python | python/dlxapi/models/user_group_added_event.py | dlens/dlxapi | 189a6519240ce625d7a9cdb89e305a335d2aa045 | [
"MIT"
] | null | null | null | python/dlxapi/models/user_group_added_event.py | dlens/dlxapi | 189a6519240ce625d7a9cdb89e305a335d2aa045 | [
"MIT"
] | 1 | 2020-08-20T17:31:43.000Z | 2020-08-20T17:31:43.000Z | python/dlxapi/models/user_group_added_event.py | dlens/dlxapi | 189a6519240ce625d7a9cdb89e305a335d2aa045 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Decision Lens API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import... | 26.787129 | 119 | 0.573461 |
9fd9e8d6c48ab4814903e0697be06740d2e153a7 | 22,241 | py | Python | anyex/async/bitmex.py | ttwishing/anyex | cfd1f2f04ab992b790add4843aafff91e5773cbf | [
"MIT"
] | null | null | null | anyex/async/bitmex.py | ttwishing/anyex | cfd1f2f04ab992b790add4843aafff91e5773cbf | [
"MIT"
] | null | null | null | anyex/async/bitmex.py | ttwishing/anyex | cfd1f2f04ab992b790add4843aafff91e5773cbf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/anyex/anyex/blob/master/CONTRIBUTING.md#how-to-contribute-code
from anyex.async.base.exchange import Exchange
import json
from anyex.base.errors import ExchangeError
from anyex.base.errors import Auth... | 39.087873 | 126 | 0.48568 |
0a612a4b42b21c535508de762fdc327ac40b7d00 | 5,977 | py | Python | leads/views.py | rakibul-islam-raju/django-crm | bd2fe84e6662b2d2425d890c64a9f15c3b76127a | [
"MIT"
] | null | null | null | leads/views.py | rakibul-islam-raju/django-crm | bd2fe84e6662b2d2425d890c64a9f15c3b76127a | [
"MIT"
] | null | null | null | leads/views.py | rakibul-islam-raju/django-crm | bd2fe84e6662b2d2425d890c64a9f15c3b76127a | [
"MIT"
] | null | null | null | from django.core.mail import send_mail
from django.shortcuts import render
from django.views import generic
from django.urls import reverse_lazy
from django.contrib.auth.mixins import LoginRequiredMixin
from agents.mixins import OrganisorAndLoginRequiredMixin
from .forms import *
from .models import *
class Landing... | 32.483696 | 85 | 0.67124 |
7dbc20dbf6ce2034b9eb0a29872cfaaedaceae83 | 482 | py | Python | tests/bootstrap5_utilities/test_models.py | crydotsnake/djangocms-boostrap5 | d9693eca62b5c04f150b0231c668564ea2ae24b4 | [
"BSD-3-Clause"
] | 4 | 2021-09-10T10:43:15.000Z | 2022-02-15T08:53:00.000Z | tests/bootstrap5_utilities/test_models.py | crydotsnake/djangocms-boostrap5 | d9693eca62b5c04f150b0231c668564ea2ae24b4 | [
"BSD-3-Clause"
] | 3 | 2021-09-27T07:45:29.000Z | 2022-02-02T18:37:25.000Z | tests/bootstrap5_utilities/test_models.py | crydotsnake/djangocms-boostrap5 | d9693eca62b5c04f150b0231c668564ea2ae24b4 | [
"BSD-3-Clause"
] | 3 | 2021-09-20T16:36:32.000Z | 2021-12-17T10:36:27.000Z | from django.test import TestCase
from djangocms_bootstrap5.contrib.bootstrap5_utilities.models import (
Bootstrap5Spacing,
)
class B5UtilitiesModelTestCase(TestCase):
def test_instance(self):
instance = Bootstrap5Spacing.objects.create()
self.assertEqual(str(instance), "1")
self.asse... | 28.352941 | 71 | 0.717842 |
f74161f3def9e3e8308d97b48187ded2dee83717 | 57 | py | Python | annie/blueprints/playground/__init__.py | hno2/emlie | 6ccb2a55c569e9384beecd14e6272dbc1a5bddf3 | [
"MIT"
] | null | null | null | annie/blueprints/playground/__init__.py | hno2/emlie | 6ccb2a55c569e9384beecd14e6272dbc1a5bddf3 | [
"MIT"
] | 46 | 2021-05-10T09:59:40.000Z | 2021-09-21T07:39:49.000Z | annie/blueprints/playground/__init__.py | hno2/emlie | 6ccb2a55c569e9384beecd14e6272dbc1a5bddf3 | [
"MIT"
] | null | null | null | from annie.blueprints.playground.views import playground
| 28.5 | 56 | 0.877193 |
9f9861200b2e8a98ecdbb7c884088a6c2a87d0ec | 7,503 | py | Python | src/brisca_game_ar.py | narcispr/pyBrisca | 57b80ac88a4f68420d7989c8a82e94690282ce35 | [
"MIT"
] | 2 | 2019-10-22T11:46:32.000Z | 2020-06-05T20:40:09.000Z | src/brisca_game_ar.py | narcispr/pyBrisca | 57b80ac88a4f68420d7989c8a82e94690282ce35 | [
"MIT"
] | null | null | null | src/brisca_game_ar.py | narcispr/pyBrisca | 57b80ac88a4f68420d7989c8a82e94690282ce35 | [
"MIT"
] | null | null | null | import time
import random
import cv2
from cv2 import aruco
import pyttsx3
from card_utils import Stack
from brisca_utils import check_victory_hand, BriscaDeck
from brisca_players import BriscaPlayerSimpleAI
def get_marker_id():
cam = cv2.VideoCapture(0)
num_frames = 0
aruco_dict = aruco.Dictionary_get(aru... | 41.916201 | 111 | 0.547114 |
eff693c41ffad375bc6f4ed799312f1f1196d14e | 9,067 | py | Python | src/minterpy/polynomials/lagrange_polynomial.py | karanprime/minterpy | 75d8976b2ddcf79ebaa29b4cb80691ca02a6d180 | [
"MIT"
] | 13 | 2021-11-30T17:52:45.000Z | 2021-12-09T10:05:20.000Z | src/minterpy/polynomials/lagrange_polynomial.py | karanprime/minterpy | 75d8976b2ddcf79ebaa29b4cb80691ca02a6d180 | [
"MIT"
] | 2 | 2021-11-30T18:31:22.000Z | 2022-02-10T10:13:37.000Z | src/minterpy/polynomials/lagrange_polynomial.py | karanprime/minterpy | 75d8976b2ddcf79ebaa29b4cb80691ca02a6d180 | [
"MIT"
] | 6 | 2021-11-30T18:17:26.000Z | 2022-02-18T17:38:27.000Z | """
LagrangePolynomial class
"""
from typing import Any, Optional
import numpy as np
import minterpy
from minterpy.global_settings import ARRAY
from ..core import Grid, MultiIndexSet
from ..core.ABC import MultivariatePolynomialSingleABC
from ..core.utils import insert_lexicographically
from ..core.verification impo... | 33.457565 | 916 | 0.686004 |
7140e77b003d28edbea6cdfe5446f240e9e41141 | 14,151 | py | Python | grinder/config.py | gridcentric/grinder | fb0fb52c0690a9c80ca0704cf7231b407482d793 | [
"MIT"
] | 1 | 2018-06-11T01:36:46.000Z | 2018-06-11T01:36:46.000Z | grinder/config.py | gridcentric/grinder | fb0fb52c0690a9c80ca0704cf7231b407482d793 | [
"MIT"
] | null | null | null | grinder/config.py | gridcentric/grinder | fb0fb52c0690a9c80ca0704cf7231b407482d793 | [
"MIT"
] | null | null | null | # Copyright 2013 GridCentric Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | 42.241791 | 102 | 0.629637 |
6d56f2b6e3fb382f4d6480a04af031014792feac | 11,309 | py | Python | senteval/examples/sent2vec.py | wasiahmad/community_question_answering | 73d13bc1cdf2ea66d13209c007dcc2767cf2155c | [
"MIT"
] | 11 | 2018-10-04T04:37:03.000Z | 2020-02-19T15:59:51.000Z | senteval/examples/sent2vec.py | wasiahmad/community_question_answering | 73d13bc1cdf2ea66d13209c007dcc2767cf2155c | [
"MIT"
] | 1 | 2020-04-02T09:49:57.000Z | 2020-04-02T13:44:56.000Z | senteval/examples/sent2vec.py | wasiahmad/community_question_answering | 73d13bc1cdf2ea66d13209c007dcc2767cf2155c | [
"MIT"
] | 8 | 2018-10-08T06:52:32.000Z | 2020-04-18T03:49:14.000Z | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
"""
This file contains the definition of encoders used in https://arxiv.org/pdf/1705.02364.pdf
"""
import numpy as np
import t... | 36.246795 | 95 | 0.567601 |
9b543a8e7d828d75f301480129ca03b250947128 | 7,038 | py | Python | astrometry.py | astromark/lacewing | e96d2dbbcce0e0c8cc00e7923ada4c8031de80ef | [
"BSD-2-Clause"
] | 3 | 2015-07-03T20:47:44.000Z | 2020-11-27T08:47:32.000Z | astrometry.py | astromark/lacewing | e96d2dbbcce0e0c8cc00e7923ada4c8031de80ef | [
"BSD-2-Clause"
] | 1 | 2017-11-20T22:02:11.000Z | 2018-01-06T01:54:31.000Z | astrometry.py | astromark/lacewing | e96d2dbbcce0e0c8cc00e7923ada4c8031de80ef | [
"BSD-2-Clause"
] | 1 | 2020-02-21T08:48:53.000Z | 2020-02-21T08:48:53.000Z | import numpy
# Weighted Standard Devation taken from http://stackoverflow.com/questions/2413522/weighted-standard-deviation-in-numpy
def wstddev(x,u):
w = 1/(u**2)
average = numpy.average(x,weights=w)
variance = numpy.dot(w,(x-average)**2)/w.sum()
return average,numpy.sqrt(variance)
def isnumber(x):
... | 28.152 | 119 | 0.516482 |
6ae2aa96f2c876642c3751ad7dc2750224fba968 | 3,227 | py | Python | src/envs/gravity_pendulum.py | jlebensold/flrl-ddpg | d91e9f4aedf48d0614e33bd22c7f684ecda089b1 | [
"MIT"
] | 1 | 2021-05-11T06:28:01.000Z | 2021-05-11T06:28:01.000Z | src/envs/gravity_pendulum.py | jlebensold/flrl-ddpg | d91e9f4aedf48d0614e33bd22c7f684ecda089b1 | [
"MIT"
] | null | null | null | src/envs/gravity_pendulum.py | jlebensold/flrl-ddpg | d91e9f4aedf48d0614e33bd22c7f684ecda089b1 | [
"MIT"
] | 1 | 2021-03-07T06:33:17.000Z | 2021-03-07T06:33:17.000Z | from gym.envs.classic_control.pendulum import PendulumEnv, angle_normalize
from gym import Wrapper
import gym
from gym import spaces
from gym.utils import seeding
import numpy as np
from os import path
class GravityPendulum(gym.Env):
metadata = {
'render.modes' : ['human', 'rgb_array'],
'video.fram... | 32.928571 | 112 | 0.590022 |
c70c920126b64363bd9b57fc952ad1be98664ef5 | 5,455 | py | Python | watchdog_kj_kultura/organizations/migrations/0001_initial_squashed_0007_auto_20161230_1852.py | watchdogpolska/watchdog-kj-kultura | ea1a5c52ef2a174c012cc08eff5fdd7aa3b911b0 | [
"MIT"
] | null | null | null | watchdog_kj_kultura/organizations/migrations/0001_initial_squashed_0007_auto_20161230_1852.py | watchdogpolska/watchdog-kj-kultura | ea1a5c52ef2a174c012cc08eff5fdd7aa3b911b0 | [
"MIT"
] | 138 | 2016-12-10T19:18:18.000Z | 2019-06-10T19:32:40.000Z | watchdog_kj_kultura/organizations/migrations/0001_initial_squashed_0007_auto_20161230_1852.py | watchdogpolska/watchdog-kj-kultura | ea1a5c52ef2a174c012cc08eff5fdd7aa3b911b0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-30 18:40
from __future__ import unicode_literals
import autoslug.fields
from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
imp... | 54.009901 | 326 | 0.640697 |
3ef1799b6f0c065a9dce7b0faa97e48e2a5e0a4a | 448 | py | Python | core/src/main/python/synapse/ml/core/spark/FluentAPI.py | ppruthi/SynapseML | d38c82455b28585cb35f6f4386a508ff4026f1d3 | [
"MIT"
] | null | null | null | core/src/main/python/synapse/ml/core/spark/FluentAPI.py | ppruthi/SynapseML | d38c82455b28585cb35f6f4386a508ff4026f1d3 | [
"MIT"
] | null | null | null | core/src/main/python/synapse/ml/core/spark/FluentAPI.py | ppruthi/SynapseML | d38c82455b28585cb35f6f4386a508ff4026f1d3 | [
"MIT"
] | null | null | null | # Copyright (C) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in project root for information.
import sys
if sys.version >= "3":
basestring = str
import pyspark
def _mlTransform(self, t):
return t.transform(self)
setattr(pyspark.sql.dataframe.DataFrame, "mlTran... | 18.666667 | 78 | 0.736607 |
d8a5b667656c679e52cf0b1d81c42e27c6a1b0f9 | 3,723 | py | Python | configs/ssd/ssd300_coco.py | mengfu188/mmdetection.bak | 0bc0ea591b5725468f83f9f48630a1e3ad599303 | [
"Apache-2.0"
] | 2 | 2020-07-14T13:55:17.000Z | 2021-05-07T11:25:31.000Z | configs/ssd/ssd300_coco.py | mengfu188/mmdetection.bak | 0bc0ea591b5725468f83f9f48630a1e3ad599303 | [
"Apache-2.0"
] | null | null | null | configs/ssd/ssd300_coco.py | mengfu188/mmdetection.bak | 0bc0ea591b5725468f83f9f48630a1e3ad599303 | [
"Apache-2.0"
] | null | null | null | # model settings
input_size = 300
model = dict(
type='SingleStageDetector',
pretrained='',
backbone=dict(
type='Mb_Tiny_RFB',
out_indices=(7, 10, 12, 13)),
neck=None,
bbox_head=dict(
type='SSDHead',
input_size=input_size,
in_channels=(64, 128, 256, 256),
... | 28.860465 | 79 | 0.609992 |
e87aa13ebbc44ae872d7b67592eedc87a68dde46 | 4,689 | py | Python | RecoLocalCalo/HcalRecAlgos/python/RemoveAddSevLevel.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | RecoLocalCalo/HcalRecAlgos/python/RemoveAddSevLevel.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | RecoLocalCalo/HcalRecAlgos/python/RemoveAddSevLevel.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | from __future__ import print_function
from __future__ import absolute_import
import FWCore.ParameterSet.Config as cms
def RemoveFlag(sevLevelComputer,flag="HFLongShort"):
''' Removes the specified flag from the Severity Level Computer,
and returns the revised Computer.'''
removeSeverity=-1 # Track wh... | 39.403361 | 122 | 0.618895 |
22e8027dbfb38aad56439a5fcc2703c9fa03c250 | 2,833 | py | Python | test_elasticsearch/test_serializer.py | achave11/elasticsearch-py | 5611445203ebabb1a450b17c2c93cd3546a12071 | [
"Apache-2.0"
] | 1 | 2020-09-16T01:51:00.000Z | 2020-09-16T01:51:00.000Z | test_elasticsearch/test_serializer.py | achave11/elasticsearch-py | 5611445203ebabb1a450b17c2c93cd3546a12071 | [
"Apache-2.0"
] | null | null | null | test_elasticsearch/test_serializer.py | achave11/elasticsearch-py | 5611445203ebabb1a450b17c2c93cd3546a12071 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import uuid
from datetime import datetime
from decimal import Decimal
from elasticsearch.serializer import (
JSONSerializer,
Deserializer,
DEFAULT_SERIALIZERS,
TextSerializer,
)
from elasticsearch.exceptions import SerializationError, ImproperlyConfigured
from .test... | 34.13253 | 87 | 0.673491 |
eac37bbea75c77b8a34d4cdb0548c1665e340439 | 1,378 | py | Python | ciutil.py | raxvan/srcbuild | 28687d9e90b8bb93d1ca18d666da6b0c8b7012c3 | [
"Apache-2.0"
] | null | null | null | ciutil.py | raxvan/srcbuild | 28687d9e90b8bb93d1ca18d666da6b0c8b7012c3 | [
"Apache-2.0"
] | null | null | null | ciutil.py | raxvan/srcbuild | 28687d9e90b8bb93d1ca18d666da6b0c8b7012c3 | [
"Apache-2.0"
] | null | null | null |
import os
import time
def files_equal(file_path_a,file_path_b):
import sys
if not os.path.exists(file_path_a):
print("FAILURE\nMissing file:" + file_path_a)
sys.exit(-1)
if not os.path.exists(file_path_b):
print("FAILURE\nMissing file:" + file_path_b)
sys.exit(-1)
_af = os.path.abspath(fil... | 21.2 | 60 | 0.644412 |
594afeb57528c542ad50df9143b36721692861a0 | 9,805 | py | Python | dunnotheway/_test.py | iuriramos/DunnoTheWay | 29831698e940183688809d865fa75136abddaf0d | [
"BSD-2-Clause"
] | null | null | null | dunnotheway/_test.py | iuriramos/DunnoTheWay | 29831698e940183688809d865fa75136abddaf0d | [
"BSD-2-Clause"
] | null | null | null | dunnotheway/_test.py | iuriramos/DunnoTheWay | 29831698e940183688809d865fa75136abddaf0d | [
"BSD-2-Clause"
] | null | null | null | import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
from collections import defaultdict, namedtuple
from common.db import open_database_session
from common.utils import distance_two_dimensions_coordinates
import flight.models.fixtures
from flight.models.airport import Airport
from flight.models.flig... | 38.602362 | 101 | 0.699847 |
5262fe24c4cdbf7dc34328250a0221fd32c9f382 | 411 | py | Python | portal/privascope_portal/wsgi.py | privascope/privascope_portal | a580df8c94f68e69f96fe099b0032dc922227804 | [
"Apache-2.0"
] | null | null | null | portal/privascope_portal/wsgi.py | privascope/privascope_portal | a580df8c94f68e69f96fe099b0032dc922227804 | [
"Apache-2.0"
] | null | null | null | portal/privascope_portal/wsgi.py | privascope/privascope_portal | a580df8c94f68e69f96fe099b0032dc922227804 | [
"Apache-2.0"
] | null | null | null | """
WSGI config for privascope_portal project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJ... | 24.176471 | 78 | 0.79562 |
ee484eb7455287ee10b79a1959b8b999195c7503 | 2,601 | py | Python | forte/data/readers/plaintext_reader.py | zhanyuanucb/forte | 4cb691c11b6945e789d7e445e62ba1ac5a9ffc4a | [
"Apache-2.0"
] | 163 | 2019-11-01T19:25:40.000Z | 2022-03-30T22:49:45.000Z | forte/data/readers/plaintext_reader.py | zhanyuanucb/forte | 4cb691c11b6945e789d7e445e62ba1ac5a9ffc4a | [
"Apache-2.0"
] | 633 | 2019-11-01T20:07:08.000Z | 2022-03-31T23:11:20.000Z | forte/data/readers/plaintext_reader.py | KGerring/forte | 7dc6e6c7d62d9a4126bdfc5ca02d15be3ffd61ca | [
"Apache-2.0"
] | 62 | 2019-11-01T19:41:33.000Z | 2022-03-24T11:14:21.000Z | # Copyright 2019 The Forte 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 ... | 33.346154 | 79 | 0.690888 |
1d0741c4bd728102c1afc184488192f4a7c58303 | 1,634 | py | Python | src/cfnlint/rules/functions/If.py | sthagen/aws-cloudformation-cfn-lint | 8628b2bab208acb2ac7843d2cadf7b56252058f7 | [
"MIT-0"
] | 445 | 2018-04-19T14:43:33.000Z | 2019-03-01T11:00:21.000Z | src/cfnlint/rules/functions/If.py | sthagen/cfn-lint | 80c8211eb028b374fdf547f21a8e218248dedc89 | [
"MIT-0"
] | 464 | 2018-04-19T17:29:50.000Z | 2019-03-01T14:20:19.000Z | src/cfnlint/rules/functions/If.py | sthagen/cfn-lint | 80c8211eb028b374fdf547f21a8e218248dedc89 | [
"MIT-0"
] | 93 | 2018-04-19T14:55:35.000Z | 2019-03-01T03:26:47.000Z | """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
from cfnlint.rules import CloudFormationLintRule
from cfnlint.rules import RuleMatch
class If(CloudFormationLintRule):
"""Check if Condition exists"""
id = 'E1028'
shortdesc = 'Check Fn::If structure ... | 36.311111 | 169 | 0.561812 |
6f47bb0da07100f82ecd27a8b90006165fc71e27 | 1,919 | py | Python | roi_align/setup.py | daikiclimate/Grid-Anchor-based-Image-Cropping-Pytorch | f6f925dadaf3c975f84c422ad575e0c92dc87320 | [
"MIT"
] | 51 | 2019-09-19T06:30:04.000Z | 2022-03-16T09:24:27.000Z | roi_align/setup.py | daikiclimate/Grid-Anchor-based-Image-Cropping-Pytorch | f6f925dadaf3c975f84c422ad575e0c92dc87320 | [
"MIT"
] | 13 | 2019-10-28T03:56:11.000Z | 2021-01-14T03:39:48.000Z | roi_align/setup.py | daikiclimate/Grid-Anchor-based-Image-Cropping-Pytorch | f6f925dadaf3c975f84c422ad575e0c92dc87320 | [
"MIT"
] | 19 | 2019-09-24T05:49:38.000Z | 2021-12-28T10:01:57.000Z | from __future__ import print_function
import os
import torch
from pkg_resources import parse_version
min_version = parse_version('1.0.0')
current_version = parse_version(torch.__version__)
if current_version < min_version: #PyTorch before 1.0
from torch.utils.ffi import create_extension
sources = ['src/roi_... | 28.641791 | 97 | 0.628452 |
b54276360c286c4c82e053d333042cdbdf80e066 | 196 | py | Python | kiwi_bugfix_typechecker/__init__.py | kiwi0fruit/jats-semi-supervised-pytorch | 67e9bb85f09f8ef02e17e495784d1d9a71c3adec | [
"MIT"
] | null | null | null | kiwi_bugfix_typechecker/__init__.py | kiwi0fruit/jats-semi-supervised-pytorch | 67e9bb85f09f8ef02e17e495784d1d9a71c3adec | [
"MIT"
] | null | null | null | kiwi_bugfix_typechecker/__init__.py | kiwi0fruit/jats-semi-supervised-pytorch | 67e9bb85f09f8ef02e17e495784d1d9a71c3adec | [
"MIT"
] | null | null | null | def test_assert() -> None:
try:
assert False
# noinspection PyUnreachableCode
raise RuntimeError("assert keyword doesn't work")
except AssertionError:
pass
| 24.5 | 57 | 0.637755 |
2fdb6cae9d203c40f41d1f85612044ba1c3cd027 | 753 | py | Python | instaclone/migrations/0001_initial.py | Kips-alih/instagram-clone | f64dd065f45c324981d8f35d9745cd5108aea5b6 | [
"MIT"
] | null | null | null | instaclone/migrations/0001_initial.py | Kips-alih/instagram-clone | f64dd065f45c324981d8f35d9745cd5108aea5b6 | [
"MIT"
] | null | null | null | instaclone/migrations/0001_initial.py | Kips-alih/instagram-clone | f64dd065f45c324981d8f35d9745cd5108aea5b6 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2021-12-02 17:02
import cloudinary.models
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Image',
fields=[
('i... | 28.961538 | 114 | 0.598938 |
c0f32eb8cf765a614be150facf69da26c14b6375 | 2,968 | py | Python | saleor/dashboard/customer/filters.py | VanilleBid/weekly-saleor | e776e86ee7ce710929ef33878d936e2a8367a217 | [
"BSD-3-Clause"
] | null | null | null | saleor/dashboard/customer/filters.py | VanilleBid/weekly-saleor | e776e86ee7ce710929ef33878d936e2a8367a217 | [
"BSD-3-Clause"
] | 86 | 2018-03-08T14:19:19.000Z | 2018-05-12T14:55:16.000Z | saleor/dashboard/customer/filters.py | JesusDelgadoPatlan/tiendaSpark | 0c8cfe7fa6e070f57daf4d06e2776bc4059ad830 | [
"BSD-3-Clause"
] | 2 | 2018-03-05T12:29:10.000Z | 2018-09-28T12:40:52.000Z | from django import forms
from django.db.models import Q
from django.utils.translation import npgettext, pgettext_lazy
from django_countries import countries
from django_filters import CharFilter, ChoiceFilter, OrderingFilter
from ...core.filters import SortedFilterSet
from ...userprofile.models import User
SORT_BY_FI... | 38.545455 | 78 | 0.688679 |
693083c5546c9df640eb1847e4b676e69d06b302 | 143 | py | Python | FinalWork/main.py | LIGHT1213/MySQL_Class | 4b88b4bdc882aad17c85b211abaeaf8933a232ec | [
"MIT"
] | null | null | null | FinalWork/main.py | LIGHT1213/MySQL_Class | 4b88b4bdc882aad17c85b211abaeaf8933a232ec | [
"MIT"
] | null | null | null | FinalWork/main.py | LIGHT1213/MySQL_Class | 4b88b4bdc882aad17c85b211abaeaf8933a232ec | [
"MIT"
] | null | null | null | from tkinter import *
import pymysql
import Login
import RecordAndSearch
global db
Login.UserLoginMain()
RecordAndSearch.RecordAndSearchMain()
| 17.875 | 37 | 0.853147 |
7b5b0e55d5fae86f10cd470179a7fb22d3a75481 | 506 | py | Python | App/ext.py | qianfengproject/DBTest | a31d569cf23d7998a68f77071d51f113d1742303 | [
"Apache-2.0"
] | null | null | null | App/ext.py | qianfengproject/DBTest | a31d569cf23d7998a68f77071d51f113d1742303 | [
"Apache-2.0"
] | null | null | null | App/ext.py | qianfengproject/DBTest | a31d569cf23d7998a68f77071d51f113d1742303 | [
"Apache-2.0"
] | null | null | null | from flask_migrate import Migrate
from flask_session import Session
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
migrate = Migrate()
def init_ext(app):
Session(app=app)
migrate.init_app(app=app, db=db)
#session
app.config['SECRET_KEY']='100'
app.config['SESSION_TYPE']='redis'
#s... | 24.095238 | 94 | 0.737154 |
485cc46fda4f72c3f7f6f371b0d74768a56f7a31 | 16,528 | py | Python | kartothek/io/dask/delayed.py | eacheson/kartothek | 2a72f521a28112e811cf2c204c8be315d7de45ed | [
"MIT"
] | null | null | null | kartothek/io/dask/delayed.py | eacheson/kartothek | 2a72f521a28112e811cf2c204c8be315d7de45ed | [
"MIT"
] | null | null | null | kartothek/io/dask/delayed.py | eacheson/kartothek | 2a72f521a28112e811cf2c204c8be315d7de45ed | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from collections import defaultdict
from functools import partial
import dask
from dask import delayed
from kartothek.core import naming
from kartothek.core.docs import default_docs
from kartothek.core.factory import _ensure_factory
from kartothek.core.naming import DEFAULT_METADATA_VERSION
... | 30.105647 | 91 | 0.687076 |
742326d113c5e6948d84edf9b3a75d69e5a2cf11 | 7,159 | py | Python | wechat_work.py | yepcn/flexget_qbittorrent_mod | 09c284492dd9640c8cc81765e520553dfee0d975 | [
"MIT"
] | 1 | 2020-10-13T00:45:30.000Z | 2020-10-13T00:45:30.000Z | wechat_work.py | yepcn/flexget_qbittorrent_mod | 09c284492dd9640c8cc81765e520553dfee0d975 | [
"MIT"
] | null | null | null | wechat_work.py | yepcn/flexget_qbittorrent_mod | 09c284492dd9640c8cc81765e520553dfee0d975 | [
"MIT"
] | null | null | null | from datetime import timedelta, datetime
import requests
from flexget import db_schema, plugin
from flexget.event import event
from flexget.manager import Session
from flexget.plugin import PluginError
from loguru import logger
from sqlalchemy import Column, Integer, String, DateTime
_PLUGIN_NAME = 'wechat_work'
_CO... | 35.093137 | 116 | 0.639335 |
02a6422bd867428b4ab5e0496aa244dd76a0e5d9 | 1,626 | py | Python | test/ffmpeg-vaapi/vpp/sharpen.py | zhangyuankun-star/vaapi-fits | 117b10f4d458b3685de16eebae795f7cb54207e2 | [
"BSD-3-Clause"
] | null | null | null | test/ffmpeg-vaapi/vpp/sharpen.py | zhangyuankun-star/vaapi-fits | 117b10f4d458b3685de16eebae795f7cb54207e2 | [
"BSD-3-Clause"
] | null | null | null | test/ffmpeg-vaapi/vpp/sharpen.py | zhangyuankun-star/vaapi-fits | 117b10f4d458b3685de16eebae795f7cb54207e2 | [
"BSD-3-Clause"
] | null | null | null | ###
### Copyright (C) 2018-2019 Intel Corporation
###
### SPDX-License-Identifier: BSD-3-Clause
###
from ....lib import *
from ..util import *
from .vpp import VppTest
spec = load_test_spec("vpp", "sharpen")
class default(VppTest):
def before(self):
vars(self).update(
caps = platform.get_caps("vpp", "... | 29.035714 | 79 | 0.632226 |
0dd16d2a9caac681638b5af42e47a62339fd51d8 | 13,056 | bzl | Python | third_party/engine.bzl | stereoboy/isaac_sdk_20191213 | 73c863254e626c8d498870189fbfb20be4e10fb3 | [
"FSFAP"
] | 1 | 2020-04-14T13:55:16.000Z | 2020-04-14T13:55:16.000Z | third_party/engine.bzl | stereoboy/isaac_sdk_20191213 | 73c863254e626c8d498870189fbfb20be4e10fb3 | [
"FSFAP"
] | 4 | 2020-09-25T22:34:29.000Z | 2022-02-09T23:45:12.000Z | third_party/engine.bzl | stereoboy/isaac_sdk_20191213 | 73c863254e626c8d498870189fbfb20be4e10fb3 | [
"FSFAP"
] | 1 | 2020-07-02T11:51:17.000Z | 2020-07-02T11:51:17.000Z | """
Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related docu... | 42.666667 | 142 | 0.66322 |
b3c06219e25623f2c534ad9e34e6118c04676d37 | 7,597 | py | Python | tensorflow_probability/python/internal/batch_shape_lib_test.py | NeelGhoshal/probability | 45ed841e3cff6cdc7cd1b2d96dd874d9070318f7 | [
"Apache-2.0"
] | 3,670 | 2018-02-14T03:29:40.000Z | 2022-03-30T01:19:52.000Z | tensorflow_probability/python/internal/batch_shape_lib_test.py | gregorystrubel/probability | df96f3d56eff92c6b06fbac68dc58e095e28fed6 | [
"Apache-2.0"
] | 1,395 | 2018-02-24T02:28:49.000Z | 2022-03-31T16:12:06.000Z | tensorflow_probability/python/internal/batch_shape_lib_test.py | gregorystrubel/probability | df96f3d56eff92c6b06fbac68dc58e095e28fed6 | [
"Apache-2.0"
] | 1,135 | 2018-02-14T01:51:10.000Z | 2022-03-28T02:24:11.000Z | # Copyright 2021 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 45.220238 | 120 | 0.669212 |
93350c65fa1141b6a1b0547f2f5c1262d1f90ccb | 7,153 | py | Python | ansible/modules/network/avi/avi_healthmonitor.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 1 | 2022-01-25T22:52:58.000Z | 2022-01-25T22:52:58.000Z | ansible/modules/network/avi/avi_healthmonitor.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | ansible/modules/network/avi/avi_healthmonitor.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | 36.494898 | 157 | 0.653292 |
2a756facd25032b53ba448c5b57942c81751445f | 1,433 | py | Python | pykit/utils/_generate.py | ContinuumIO/pyk | 1730d7b831e0cf12a641ac23b5cf03e17e0dc550 | [
"BSD-3-Clause"
] | 9 | 2015-06-23T00:13:49.000Z | 2022-02-23T02:46:43.000Z | pykit/utils/_generate.py | ContinuumIO/pyk | 1730d7b831e0cf12a641ac23b5cf03e17e0dc550 | [
"BSD-3-Clause"
] | 1 | 2017-08-30T08:13:12.000Z | 2017-08-31T06:36:32.000Z | pykit/utils/_generate.py | ContinuumIO/pyk | 1730d7b831e0cf12a641ac23b5cf03e17e0dc550 | [
"BSD-3-Clause"
] | 7 | 2015-05-08T10:17:47.000Z | 2021-04-01T15:00:57.000Z | #! /usr/bin/env python
"""
Generate some internal code.
"""
from __future__ import absolute_import
from collections import defaultdict
from os.path import splitext
from pykit.ir import ops
def getorder():
pos = defaultdict(int) # { 'opname': index }
fn, ext = splitext(ops.__file__)
lines = list(open(fn +... | 28.66 | 78 | 0.5485 |
ed94772504c189f761e2ed4d499023bbd29a3329 | 3,243 | py | Python | tf_retinanet/models/fpn.py | edend10/tf-retinanet | dba799b0c2ccfa3c641a7e14e10599d9e4ec3437 | [
"Apache-2.0"
] | 122 | 2020-01-13T14:31:09.000Z | 2021-09-28T02:05:17.000Z | tf_retinanet/models/fpn.py | edend10/tf-retinanet | dba799b0c2ccfa3c641a7e14e10599d9e4ec3437 | [
"Apache-2.0"
] | 14 | 2020-01-13T18:43:30.000Z | 2020-10-04T13:28:25.000Z | tf_retinanet/models/fpn.py | edend10/tf-retinanet | dba799b0c2ccfa3c641a7e14e10599d9e4ec3437 | [
"Apache-2.0"
] | 42 | 2020-01-13T22:03:54.000Z | 2021-08-30T09:51:16.000Z | """
Copyright 2017-2019 Fizyr (https://fizyr.com)
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... | 41.050633 | 117 | 0.713228 |
0951e94a96107a296d1168b45e8a8af9aa30099c | 727 | py | Python | nz_crawl_demo/day1/python2/demo3.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day1/python2/demo3.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day1/python2/demo3.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | #encoding:utf-8
# import sys
# print sys.version 打印python的版本
import urllib2
import urllib
def baidu(params):
url = "https://www.baidu.com/s?" + params
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36",
}... | 22.71875 | 140 | 0.651994 |
1299cf977ca39152cf4c93cef51acdcca33c4c34 | 3,933 | py | Python | Shingles/run_shingles.py | mastino/ert | 5e88828b74344322ad635b8f8d804cef6c7cea9a | [
"BSD-3-Clause-LBNL"
] | null | null | null | Shingles/run_shingles.py | mastino/ert | 5e88828b74344322ad635b8f8d804cef6c7cea9a | [
"BSD-3-Clause-LBNL"
] | null | null | null | Shingles/run_shingles.py | mastino/ert | 5e88828b74344322ad635b8f8d804cef6c7cea9a | [
"BSD-3-Clause-LBNL"
] | null | null | null | '''
run_shingles.py
author Brian Gravelle
email gravelle@lanl.gov
This script generates and runs benchamrks to identify benchamrks that hit the roofline
at different arithmentic intensties on a particular system.
shingles.c is the driver, this generates a series of shingles.h files with different AIs
'''
import... | 30.968504 | 105 | 0.658276 |
a014102f6e73819795a7eed39f72e93ad52fbe7b | 1,183 | py | Python | pipeline/boto_helpers.py | wilsonpe66/server-backend | 16665d810fe1829f5dacc67f396b7cecf5af042f | [
"BSD-3-Clause"
] | 1 | 2019-09-26T04:00:55.000Z | 2019-09-26T04:00:55.000Z | pipeline/boto_helpers.py | wilsonpe66/server-backend | 16665d810fe1829f5dacc67f396b7cecf5af042f | [
"BSD-3-Clause"
] | 2 | 2020-06-05T21:58:55.000Z | 2021-06-10T21:45:08.000Z | pipeline/boto_helpers.py | wilsonpe66/server-backend | 16665d810fe1829f5dacc67f396b7cecf5af042f | [
"BSD-3-Clause"
] | 1 | 2019-09-26T03:55:06.000Z | 2019-09-26T03:55:06.000Z | import json
import os.path
import subprocess
import boto3
# This is all cribbed from the django branch's cluster_management/deployment_helpers folder
# TODO once the branches are merged, use that code and NOT this code
def get_aws_object_names():
configs_folder = get_configs_folder()
with open(o... | 28.166667 | 92 | 0.716822 |
416f9aff2f6f7f3950b9ca2b3930da5e9f04357d | 9,835 | py | Python | dis_sdk_python/dependency/setuptools-40.6.3/pkg_resources/tests/test_pkg_resources.py | leishanlin/huaweicloud-sdk-python-dis | 900317432b9e9b3fea331d2cb9aa402594f9992b | [
"Apache-2.0"
] | null | null | null | dis_sdk_python/dependency/setuptools-40.6.3/pkg_resources/tests/test_pkg_resources.py | leishanlin/huaweicloud-sdk-python-dis | 900317432b9e9b3fea331d2cb9aa402594f9992b | [
"Apache-2.0"
] | 2 | 2017-09-02T12:26:14.000Z | 2017-09-06T06:40:54.000Z | dis_sdk_python/dependency/setuptools-40.6.3/pkg_resources/tests/test_pkg_resources.py | leishanlin/huaweicloud-sdk-python-dis | 900317432b9e9b3fea331d2cb9aa402594f9992b | [
"Apache-2.0"
] | 5 | 2017-08-26T12:11:14.000Z | 2019-10-07T02:01:06.000Z | # coding: utf-8
from __future__ import unicode_literals
import sys
import tempfile
import os
import zipfile
import datetime
import time
import subprocess
import stat
import distutils.dist
import distutils.command.install_egg_info
try:
from unittest import mock
except ImportError:
import mock
from pkg_resourc... | 33.681507 | 77 | 0.631317 |
aa840622831a7c609bdb4ab09308cc89d8ee503a | 4,521 | py | Python | predictionserver/futureconventions/namingconventions.py | EricZLou/predictionserver | 5f9d4a6711f9941f3c221ef1dccf57418dd17306 | [
"MIT"
] | null | null | null | predictionserver/futureconventions/namingconventions.py | EricZLou/predictionserver | 5f9d4a6711f9941f3c221ef1dccf57418dd17306 | [
"MIT"
] | null | null | null | predictionserver/futureconventions/namingconventions.py | EricZLou/predictionserver | 5f9d4a6711f9941f3c221ef1dccf57418dd17306 | [
"MIT"
] | null | null | null | from predictionserver.futureconventions.sepconventions import SepConventions
import os
import re
import uuid
import itertools
# Things that should be moved elsewhere :)
class NamingConventions:
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.DELAYED = "delayed" + SepConventions.sep... | 36.756098 | 104 | 0.646317 |
828115475a4350b8972c7d571a0399a7d825a8fd | 6,980 | py | Python | src/contentratings/browser/basic.py | NextThought/nti.contentratings | d6c5cb082085c03edfdc87d27d4bdd22f336d68f | [
"ZPL-2.1"
] | null | null | null | src/contentratings/browser/basic.py | NextThought/nti.contentratings | d6c5cb082085c03edfdc87d27d4bdd22f336d68f | [
"ZPL-2.1"
] | null | null | null | src/contentratings/browser/basic.py | NextThought/nti.contentratings | d6c5cb082085c03edfdc87d27d4bdd22f336d68f | [
"ZPL-2.1"
] | null | null | null | from datetime import datetime, timedelta
from zope.interface import Interface, implementer
from zope.component import queryUtility, queryMultiAdapter
from zope.traversing.browser.interfaces import IAbsoluteURL
from contentratings.browser.interfaces import IAnonymousSession
from contentratings.browser.interfaces import ... | 36.354167 | 79 | 0.641261 |
64cd106f643918a969d934e38a1488a72ec66864 | 1,005 | py | Python | scraper/storage_spiders/fyivn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | null | null | null | scraper/storage_spiders/fyivn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 10 | 2020-02-11T23:34:28.000Z | 2022-03-11T23:16:12.000Z | scraper/storage_spiders/fyivn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 3 | 2018-08-05T14:54:25.000Z | 2021-06-07T01:49:59.000Z | # Auto generated by generator.py. Delete this line if you make modification.
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
XPATH = {
'name' : "//div[@class='prod_header_title']/h1[@id='prod_title']",
'price' : "//div[@class='prod_pricebox_price_final']/span[@id='special_price_... | 37.222222 | 88 | 0.646766 |
117d62406d6b638d839e27a86f0c1ffadfab7310 | 659 | py | Python | runs/bro/100KB/src1-tgt1/icmp-par-noids-iter00500.cfg.py | Largio/broeval | 89e831d07f066100afdd1a5b220f9f08f1c10b3d | [
"MIT"
] | null | null | null | runs/bro/100KB/src1-tgt1/icmp-par-noids-iter00500.cfg.py | Largio/broeval | 89e831d07f066100afdd1a5b220f9f08f1c10b3d | [
"MIT"
] | null | null | null | runs/bro/100KB/src1-tgt1/icmp-par-noids-iter00500.cfg.py | Largio/broeval | 89e831d07f066100afdd1a5b220f9f08f1c10b3d | [
"MIT"
] | null | null | null |
# Write results to this file
OUTFILE = 'runs/bro/100KB/src1-tgt1/icmp-par-noids-iter00500.result.csv'
# Source computers for the request
SOURCE = ['10.0.0.1']
# Target machines for the requests (aka server)
TARGET = ['10.0.0.2']
# IDS Mode. (ATM: noids, min, max, http, ssl, ftp, icmp, mysql)
IDSMODE = 'noids'
# Co... | 24.407407 | 72 | 0.704097 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.