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
16c419fdca7106c111bc212d4d4e57e97bd1d1d7
2,550
py
Python
resources/python/dnac/01_dnac.py
wwt/curl-requests-foundations
63429d82b4f3d11902c365c1ae7803e137c718e8
[ "Apache-2.0" ]
null
null
null
resources/python/dnac/01_dnac.py
wwt/curl-requests-foundations
63429d82b4f3d11902c365c1ae7803e137c718e8
[ "Apache-2.0" ]
2
2021-07-14T08:47:48.000Z
2021-10-30T23:33:23.000Z
resources/python/dnac/01_dnac.py
wwt/curl-requests-foundations
63429d82b4f3d11902c365c1ae7803e137c718e8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Step 1 - Authenticate & retrieve a session token import requests auth_url = 'https://sandboxdnac.cisco.com/dna/system/api/v1/auth/token' headers = {'Content-Type':'application/json'} auth_data = ('devnetuser', 'Cisco123!') response = requests.post(auth_url, headers=headers, auth=auth_data) prin...
45.535714
118
0.75451
5865e1444a4b70865e5a58a5ba9893858d340003
124
py
Python
web/settings/dev.py
koualsky/start
544fde3a353f78a7a6d5782d240d98644731d6b0
[ "MIT" ]
null
null
null
web/settings/dev.py
koualsky/start
544fde3a353f78a7a6d5782d240d98644731d6b0
[ "MIT" ]
null
null
null
web/settings/dev.py
koualsky/start
544fde3a353f78a7a6d5782d240d98644731d6b0
[ "MIT" ]
null
null
null
from .base import * STATIC_URL = '/static/' STATIC_ROOT = '/code/static' MEDIA_URL = '/media/' MEDIA_ROOT = '/code/media'
15.5
28
0.677419
53f15956fa97bfa6fe44a7a9988c274aac6f0f79
1,462
py
Python
tests/test_link_annotation.py
abael/ScrapyPageFinder
10a90bde78abc0649c7966a358593435c9c05738
[ "MIT" ]
31
2016-02-05T08:13:50.000Z
2022-01-05T09:25:07.000Z
tests/test_link_annotation.py
abael/ScrapyPageFinder
10a90bde78abc0649c7966a358593435c9c05738
[ "MIT" ]
null
null
null
tests/test_link_annotation.py
abael/ScrapyPageFinder
10a90bde78abc0649c7966a358593435c9c05738
[ "MIT" ]
12
2016-02-23T09:12:37.000Z
2021-11-17T07:21:04.000Z
import os.path import page_finder from util import extract_all_links try: FILE = __file__ except NameError: FILE = './tests' TESTDIR = os.getenv('TESTPATH', os.path.dirname(os.path.realpath(FILE))) def get_local_url(filename): return 'file:///{0}/{1}'.format(os.path.join(TESTDIR, '...
27.074074
76
0.660055
978d8b2fce4186f5907ce1c62af41a4ef23a3596
194
py
Python
server/views/main/__init__.py
ojengwa/zapcore
f9eace7dc8ab4bc8bc3bb9c212ba43395e0459c1
[ "MIT" ]
null
null
null
server/views/main/__init__.py
ojengwa/zapcore
f9eace7dc8ab4bc8bc3bb9c212ba43395e0459c1
[ "MIT" ]
3
2020-09-05T08:03:34.000Z
2021-05-07T20:03:30.000Z
server/views/main/__init__.py
ojengwa/zapcore
f9eace7dc8ab4bc8bc3bb9c212ba43395e0459c1
[ "MIT" ]
null
null
null
from __future__ import absolute_import from flask import Blueprint from flask_cors import CORS main = Blueprint( 'main', __name__ ) # add CORS support CORS(main) from . import views
12.933333
38
0.747423
d70463f472e0d0fa870dbb54110e54072b119978
3,792
py
Python
mudicom/lookup.py
neurosnap/mudicom
04011967007409f0c5253b4f308f53a7b0fc99c6
[ "MIT" ]
32
2015-01-09T10:51:06.000Z
2021-04-03T09:50:52.000Z
mudicom/lookup.py
neurosnap/mudicom
04011967007409f0c5253b4f308f53a7b0fc99c6
[ "MIT" ]
3
2015-05-07T19:15:26.000Z
2021-04-16T15:13:23.000Z
mudicom/lookup.py
neurosnap/mudicom
04011967007409f0c5253b4f308f53a7b0fc99c6
[ "MIT" ]
18
2015-04-11T14:24:42.000Z
2020-12-27T21:26:06.000Z
# -*- coding: utf-8 -*- """ mudicom.lookup ~~~~~~~~~~~~~~ Basic dictionary lookup helper functions. """ def VR(VR=None, description=None): """ Value Representation (VR) <-> Description lookup. :param VR: Takes the VR and returns its description :param description: Take the description of a VR ...
39.915789
150
0.593091
59372ad6157ec2e465098f30d8f920d8453839fc
1,059
py
Python
skp_edu_docker/code/master/workflow/dataconf/workflow_dataconf_image.py
TensorMSA/hoyai_docker
12f0041e6306d8a6421585a4b51666bad30be442
[ "MIT" ]
8
2017-06-16T00:19:12.000Z
2020-08-13T03:15:57.000Z
kict_edu_docker/code/master/workflow/dataconf/workflow_dataconf_image.py
TensorMSA/tensormsa_docker
12f0041e6306d8a6421585a4b51666bad30be442
[ "MIT" ]
21
2017-06-09T10:15:14.000Z
2018-03-29T07:51:02.000Z
skp_edu_docker/code/master/workflow/dataconf/workflow_dataconf_image.py
TensorMSA/hoyai_docker
12f0041e6306d8a6421585a4b51666bad30be442
[ "MIT" ]
4
2017-10-25T09:59:53.000Z
2020-05-07T09:51:11.000Z
from master.workflow.dataconf.workflow_dataconf import WorkFlowDataConf class WorkflowDataConfFrame(WorkFlowDataConf): """ """ def get_view_obj(self): """ get column type info for view :return: """ self._get_default_type() self._get_modified_type() ...
16.045455
71
0.486308
5e7630a1be13ffcb0ad28e78039265530dee3bae
1,172
py
Python
custom_components/browser_mod/sensor.py
racelandshop/hass-browser_mod
122c9df959336c1f3d09c79f1c977eb78147957a
[ "MIT" ]
1
2021-12-22T23:21:37.000Z
2021-12-22T23:21:37.000Z
custom_components/browser_mod/sensor.py
racelandshop/hass-browser_mod
122c9df959336c1f3d09c79f1c977eb78147957a
[ "MIT" ]
null
null
null
custom_components/browser_mod/sensor.py
racelandshop/hass-browser_mod
122c9df959336c1f3d09c79f1c977eb78147957a
[ "MIT" ]
null
null
null
from datetime import datetime from homeassistant.const import STATE_UNAVAILABLE from .helpers import setup_platform, BrowserModEntity PLATFORM = "sensor" async def async_setup_platform(hass, config, async_add_devices, discovery_info=None): return setup_platform(hass, config, async_add_devices, PLATFORM, Browse...
27.255814
86
0.695392
4190572b1fdb76f146278e090e4bb694ed76a037
8,854
py
Python
qstkutil/qsdateutil.py
elxavicio/QSTK
4981506c37227a72404229d5e1e0887f797a5d57
[ "BSD-3-Clause" ]
55
2015-01-07T17:58:40.000Z
2018-12-30T12:31:53.000Z
qstkutil/qsdateutil.py
elxavicio/QSTK
4981506c37227a72404229d5e1e0887f797a5d57
[ "BSD-3-Clause" ]
3
2016-12-20T19:21:18.000Z
2019-02-19T14:33:18.000Z
qstkutil/qsdateutil.py
elxavicio/QSTK
4981506c37227a72404229d5e1e0887f797a5d57
[ "BSD-3-Clause" ]
38
2015-03-02T17:24:06.000Z
2019-01-06T13:51:19.000Z
''' (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. Please see http://wiki.quantsoftware.org/index.php?title=QSTK_License for license details. Created on Jan 1, 2011 @author:Drew Bratcher @contact: dbratcher@gatech.edu @summary: Contains tutorial for backteste...
30.958042
85
0.650102
356a59f9fdda7e5addb39b33e6e9a4e93199b097
24,826
py
Python
src/container/kube-manager/kube_manager/vnc/vnc_pod.py
kaweue/contrail-controller
66a8f1d13e2c28ddae6b5a5be6f068a03bea94e3
[ "Apache-2.0" ]
null
null
null
src/container/kube-manager/kube_manager/vnc/vnc_pod.py
kaweue/contrail-controller
66a8f1d13e2c28ddae6b5a5be6f068a03bea94e3
[ "Apache-2.0" ]
null
null
null
src/container/kube-manager/kube_manager/vnc/vnc_pod.py
kaweue/contrail-controller
66a8f1d13e2c28ddae6b5a5be6f068a03bea94e3
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2017 Juniper Networks, Inc. All rights reserved. # """ VNC pod management for kubernetes """ import json import uuid from cStringIO import StringIO from cfgm_common.exceptions import RefsExistError, NoIdError from cfgm_common.utils import cgitb_hook from vnc_api.vnc_api import ( InstanceIp, Flo...
38.609642
96
0.596351
8a2aabe2c1ef6825a04c8c1dc6f9eedf78a8c7c8
8,393
py
Python
fisb/level0/utilities.py
rand-projects/fisb-decode
870f6be8b7e7013fcba0c4f2f894aae425700563
[ "BSD-2-Clause-Patent" ]
7
2021-05-29T13:12:20.000Z
2021-12-26T02:38:34.000Z
fisb/level0/utilities.py
rand-projects/fisb-decode
870f6be8b7e7013fcba0c4f2f894aae425700563
[ "BSD-2-Clause-Patent" ]
null
null
null
fisb/level0/utilities.py
rand-projects/fisb-decode
870f6be8b7e7013fcba0c4f2f894aae425700563
[ "BSD-2-Clause-Patent" ]
null
null
null
"""Module containing level0 utility functions. """ import sys, os, time from datetime import timezone, datetime import fisb.level0.level0Config as cfg # String for performing translation of dlac to text # # FIS-B uses a form of DLAC encoding. Some non-printing characters # have been changed to printing characters (t...
32.785156
105
0.612892
c7b6aadc85cf553352f5850b574fccfbcf12b689
4,322
py
Python
girder/molecules/molecules/models/experimental.py
bnmajor/mongochemserver
aa76ab6e7f749c3e893f27e208984b6ed2d4b2b5
[ "BSD-3-Clause" ]
14
2015-05-04T16:40:48.000Z
2021-07-13T08:00:30.000Z
girder/molecules/molecules/models/experimental.py
bnmajor/mongochemserver
aa76ab6e7f749c3e893f27e208984b6ed2d4b2b5
[ "BSD-3-Clause" ]
88
2015-07-24T07:58:43.000Z
2021-02-23T19:37:13.000Z
girder/molecules/molecules/models/experimental.py
bnmajor/mongochemserver
aa76ab6e7f749c3e893f27e208984b6ed2d4b2b5
[ "BSD-3-Clause" ]
8
2015-06-12T20:54:39.000Z
2021-04-09T01:07:15.000Z
from jsonschema import validate, ValidationError from girder.models.model_base import AccessControlledModel, ValidationException from girder.constants import AccessType class Experimental(AccessControlledModel): ''' { "spectrumType": "Infrared", "experimentalTechnique": "InfraRed Multiphoton D...
31.779412
79
0.437298
7079408bfa9dcde8b9b4a47041d2a026a8840017
6,717
py
Python
tools/execsnoop.py
cippaciong/bcc
aa4aa5211e6fe2b6e830bf511905ec8e3528449a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tools/execsnoop.py
cippaciong/bcc
aa4aa5211e6fe2b6e830bf511905ec8e3528449a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tools/execsnoop.py
cippaciong/bcc
aa4aa5211e6fe2b6e830bf511905ec8e3528449a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/python # @lint-avoid-python-3-compatibility-imports # # execsnoop Trace new processes via exec() syscalls. # For Linux, uses BCC, eBPF. Embedded C. # # USAGE: execsnoop [-h] [-t] [-x] [-n NAME] # # This currently will print up to a maximum of 19 arguments, plus the process # name, so 20 fields in t...
29.460526
79
0.63183
1f18d0ea075bee82b9a678b45f7c59af0ef0e8d1
1,137
py
Python
tests/test_instance_wrapper.py
CodeYellowBV/django-tally
a705821050da912fb8dabd56c41c040ea0a00a21
[ "MIT" ]
null
null
null
tests/test_instance_wrapper.py
CodeYellowBV/django-tally
a705821050da912fb8dabd56c41c040ea0a00a21
[ "MIT" ]
null
null
null
tests/test_instance_wrapper.py
CodeYellowBV/django-tally
a705821050da912fb8dabd56c41c040ea0a00a21
[ "MIT" ]
null
null
null
from django.test import TestCase from django_tally.user_def.instance_wrapper import InstanceWrapper from django_tally.user_def.lang import KW from .testapp.models import Foo, Baz class InstanceWrapperTest(TestCase): def test_instance_wapper(self): foo = Foo(value=5) foo.save() baz = Baz(...
30.72973
66
0.621812
46da81be280601cd761b431f4abf68df386ec9cd
438
py
Python
env/Lib/site-packages/plotly/validators/scatter/marker/line/_reversescale.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
venv/Lib/site-packages/plotly/validators/scatter/marker/line/_reversescale.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
venv/Lib/site-packages/plotly/validators/scatter/marker/line/_reversescale.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatter.marker.line", **kwargs ): super(ReversescaleValidator, self).__init__( plotly_name=plotly_name, ...
31.285714
85
0.66895
7162dee7d39141585fac04a0bb550dae57226160
7,638
py
Python
datasets/ollie/ollie.py
dkajtoch/datasets
12ef7f0d541a5aca5b29ebc2dddf5e1214f0e3e9
[ "Apache-2.0" ]
9
2021-04-26T14:43:52.000Z
2021-11-08T09:47:24.000Z
datasets/ollie/ollie.py
dkajtoch/datasets
12ef7f0d541a5aca5b29ebc2dddf5e1214f0e3e9
[ "Apache-2.0" ]
null
null
null
datasets/ollie/ollie.py
dkajtoch/datasets
12ef7f0d541a5aca5b29ebc2dddf5e1214f0e3e9
[ "Apache-2.0" ]
1
2022-02-28T18:08:09.000Z
2022-02-28T18:08:09.000Z
# coding=utf-8 # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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/lice...
39.57513
152
0.520817
24c8b9883ddbdae5af6ad44d4af85ff58f9bf090
1,187
py
Python
iadmin/templatetags/iadmin_urls.py
saxix/django-iadmin
675317e8f0b4142eaf351595da27c065637a83ba
[ "BSD-1-Clause" ]
1
2015-06-23T09:24:12.000Z
2015-06-23T09:24:12.000Z
iadmin/templatetags/iadmin_urls.py
saxix/django-iadmin
675317e8f0b4142eaf351595da27c065637a83ba
[ "BSD-1-Clause" ]
null
null
null
iadmin/templatetags/iadmin_urls.py
saxix/django-iadmin
675317e8f0b4142eaf351595da27c065637a83ba
[ "BSD-1-Clause" ]
null
null
null
from django.core.urlresolvers import reverse, NoReverseMatch, resolve from django import template from django.template.base import Template from django.template.loader import render_to_string, find_template, get_template register = template.Library() @register.filter def admin_urlname(opts, arg): return 'admin:%s...
23.27451
148
0.738837
a3d5f83579039a91f4e92b2e687f17cbacc944e7
299
py
Python
saleor/product/migrations/0151_merge_20211022_0935.py
wuchujiecode/saleor
c2ee650e11b1dde6744be7c46e28262318ae4ac9
[ "CC-BY-4.0" ]
null
null
null
saleor/product/migrations/0151_merge_20211022_0935.py
wuchujiecode/saleor
c2ee650e11b1dde6744be7c46e28262318ae4ac9
[ "CC-BY-4.0" ]
null
null
null
saleor/product/migrations/0151_merge_20211022_0935.py
wuchujiecode/saleor
c2ee650e11b1dde6744be7c46e28262318ae4ac9
[ "CC-BY-4.0" ]
null
null
null
# Generated by Django 3.2.6 on 2021-10-22 09:35 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('product', '0149_rename_detail_product_overview'), ('product', '0150_collection_collection_search_gin'), ] operations = [ ]
19.933333
61
0.67893
1413af751cf7bd04cdde734fd8967e2977b19dfb
2,334
py
Python
ROAR/agent_module/jAM2Agent.py
mavabene/ROAR
51955293ad87128ec2c549142abf91d45314f380
[ "Apache-2.0" ]
null
null
null
ROAR/agent_module/jAM2Agent.py
mavabene/ROAR
51955293ad87128ec2c549142abf91d45314f380
[ "Apache-2.0" ]
null
null
null
ROAR/agent_module/jAM2Agent.py
mavabene/ROAR
51955293ad87128ec2c549142abf91d45314f380
[ "Apache-2.0" ]
null
null
null
from ROAR.agent_module.agent import Agent from pathlib import Path from ROAR.control_module.stanley_controller import Stanley_controller from ROAR.control_module.pid_controller import PIDController from ROAR.planning_module.local_planner.simple_waypoint_following_local_planner import \ SimpleWaypointFollowingLocalP...
48.625
118
0.731362
5695f786d070f617c3816571159f973c1d1bfbea
7,194
py
Python
src/table_validator/desktop/validation_drop_target.py
cthoyt/income2019
b336a31d2b15e5ec504fcb57a141602ceea0249e
[ "MIT" ]
null
null
null
src/table_validator/desktop/validation_drop_target.py
cthoyt/income2019
b336a31d2b15e5ec504fcb57a141602ceea0249e
[ "MIT" ]
1
2019-08-15T12:46:21.000Z
2019-08-15T13:56:49.000Z
src/table_validator/desktop/validation_drop_target.py
cthoyt/income2019
b336a31d2b15e5ec504fcb57a141602ceea0249e
[ "MIT" ]
3
2019-08-07T10:09:19.000Z
2019-11-27T22:26:06.000Z
#!/usr/bin/python3 # -*- coding: utf-8 -*- """Desktop GUI for ``table_validator``. Author: Wolfgang Müller The initial starting point was taken from zetcode However, there are only few lines that survived changes. - ZetCode PyQt5 tutorial This is a simple drag and drop example. Author: Jan Bodnar Website: zetcode....
28.434783
134
0.61315
dd22bc1161228c77d538881a164dc29e5d10fecd
35,449
py
Python
python-package/brainflow/board_shim.py
kusumikakd/Brainflow
eb566a8cd49e27d47f56b93406d7ac17f3ef6547
[ "MIT" ]
null
null
null
python-package/brainflow/board_shim.py
kusumikakd/Brainflow
eb566a8cd49e27d47f56b93406d7ac17f3ef6547
[ "MIT" ]
null
null
null
python-package/brainflow/board_shim.py
kusumikakd/Brainflow
eb566a8cd49e27d47f56b93406d7ac17f3ef6547
[ "MIT" ]
null
null
null
import ctypes import numpy from numpy.ctypeslib import ndpointer import pkg_resources import enum import os import platform import sys import struct import json from brainflow.exit_codes import BrainflowExitCodes class BoardIds (enum.Enum): """Enum to store all supported Board Ids""" STREAMING_BOARD = -2 #:...
39.387778
255
0.649835
33390971d92a152b2c5c47aaec7bacfc91e22499
630
py
Python
ifind/common/encoding.py
padre-lab-eu/extended_simiir
aa9d54784dcfb4c629687317622eae8ba6d59a79
[ "MIT" ]
2
2018-03-20T01:14:50.000Z
2021-05-15T12:05:32.000Z
ifind/common/encoding.py
padre-lab-eu/extended_simiir
aa9d54784dcfb4c629687317622eae8ba6d59a79
[ "MIT" ]
null
null
null
ifind/common/encoding.py
padre-lab-eu/extended_simiir
aa9d54784dcfb4c629687317622eae8ba6d59a79
[ "MIT" ]
3
2015-02-04T13:36:26.000Z
2015-03-17T08:22:27.000Z
import string def encode_symbols(instring): """ Encodes symbols for HTTP GET. Args: string (str): String to be included in a GET request. Returns: str: String with some characters replaced with URL encodings. Usage: Private method. """ encoded_string = string.re...
26.25
69
0.650794
096235ddeed3f14cfe50f8aa61cf36616fe92a1b
5,217
py
Python
python/lsst/eotest/sensor/pca_bias_profile_plots.py
tguillemLSST/eotest
c6f150984fa5dff85b9805028645bf46fc846f11
[ "BSD-3-Clause-LBNL" ]
3
2016-04-21T07:05:45.000Z
2020-08-05T08:37:37.000Z
python/lsst/eotest/sensor/pca_bias_profile_plots.py
tguillemLSST/eotest
c6f150984fa5dff85b9805028645bf46fc846f11
[ "BSD-3-Clause-LBNL" ]
70
2015-03-26T09:48:53.000Z
2020-04-22T16:29:43.000Z
python/lsst/eotest/sensor/pca_bias_profile_plots.py
tguillemLSST/eotest
c6f150984fa5dff85b9805028645bf46fc846f11
[ "BSD-3-Clause-LBNL" ]
5
2017-08-15T20:52:44.000Z
2022-03-25T12:54:07.000Z
import os import numpy as np import matplotlib.pyplot as plt from astropy.io import fits from .ccd_bias_pca import CCD_bias_PCA from .overscan_frame import make_overscan_frame from .AmplifierGeometry import makeAmplifierGeometry __all__ = ['pca_bias_profile_plots'] def plot_imarr(imarr, vmin=-10, vmax=10): plt....
44.211864
80
0.612229
58ae87ec5b698f77dadfbc3abdb4413837d5561c
2,058
py
Python
Proyect Code/4.-All Sklearn Classification Algorithms.py
DataEngel/Heart-Disease-UCI---Classification
8601b1c94aad9de9e3af60dc11ba75325fe95b9d
[ "Apache-2.0" ]
null
null
null
Proyect Code/4.-All Sklearn Classification Algorithms.py
DataEngel/Heart-Disease-UCI---Classification
8601b1c94aad9de9e3af60dc11ba75325fe95b9d
[ "Apache-2.0" ]
null
null
null
Proyect Code/4.-All Sklearn Classification Algorithms.py
DataEngel/Heart-Disease-UCI---Classification
8601b1c94aad9de9e3af60dc11ba75325fe95b9d
[ "Apache-2.0" ]
null
null
null
import pandas as pd from sklearn.neighbors import KNeighborsClassifier from sklearn.ensemble import BaggingClassifier from sklearn.linear_model import LogisticRegression from sklearn.svm import SVC from sklearn.svm import LinearSVC from sklearn.linear_model import SGDClassifier from sklearn.tree import DecisionTreeC...
39.576923
259
0.729835
29a04727ba3657d7eba62b0f3c8d273e0c4e82aa
2,361
py
Python
phaseshifts/gui/ImportDialog.py
Liam-Deacon/phaseshifts
23307b42e2d7b1fe772f78257635dc0872ca7ea4
[ "MIT" ]
null
null
null
phaseshifts/gui/ImportDialog.py
Liam-Deacon/phaseshifts
23307b42e2d7b1fe772f78257635dc0872ca7ea4
[ "MIT" ]
1
2019-09-21T15:12:58.000Z
2019-09-21T15:12:58.000Z
phaseshifts/gui/ImportDialog.py
Lightslayer/phaseshifts
23307b42e2d7b1fe772f78257635dc0872ca7ea4
[ "MIT" ]
null
null
null
''' Created on 10 Feb 2014 @author: Liam Deacon @contact: liam.deacon@diamond.ac.uk @copyright: Copyright 2014 Liam Deacon @license: MIT License 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 Softw...
33.253521
80
0.663278
6ed272c09833eed8d7bee715b191c5e49e913f8f
382
py
Python
build/lib/minotaur-manticore-maze/progress.py
smidem/minotaur-manticore-maze
0c08c83857b19be6cc6cae4b1f2acf5d485858a6
[ "MIT" ]
null
null
null
build/lib/minotaur-manticore-maze/progress.py
smidem/minotaur-manticore-maze
0c08c83857b19be6cc6cae4b1f2acf5d485858a6
[ "MIT" ]
null
null
null
build/lib/minotaur-manticore-maze/progress.py
smidem/minotaur-manticore-maze
0c08c83857b19be6cc6cae4b1f2acf5d485858a6
[ "MIT" ]
null
null
null
from tqdm import tqdm import time class Progress(): def bar(self, secs, prefix): self.secs = secs self.prefix = prefix with tqdm(total=100, ncols=75, bar_format='{l_bar}{bar}|', desc=prefix) as pbar: for i in range(100): ...
22.470588
45
0.481675
666ada53d2334ae4e4296495f6c400d73483ea82
9,075
py
Python
sdks/python/http_client/v1/polyaxon_sdk/models/v1_search.py
gregmbi/polyaxon
8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
[ "Apache-2.0" ]
null
null
null
sdks/python/http_client/v1/polyaxon_sdk/models/v1_search.py
gregmbi/polyaxon
8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
[ "Apache-2.0" ]
null
null
null
sdks/python/http_client/v1/polyaxon_sdk/models/v1_search.py
gregmbi/polyaxon
8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, 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 ...
25.208333
85
0.562975
8e886a4bbe7582d0c4cc635e0b153178757a725d
1,022
py
Python
lib/_Install_Package.py
jeffrimko/Verace
2823e88367dd45f86ae770839d4f114577495639
[ "MIT" ]
null
null
null
lib/_Install_Package.py
jeffrimko/Verace
2823e88367dd45f86ae770839d4f114577495639
[ "MIT" ]
null
null
null
lib/_Install_Package.py
jeffrimko/Verace
2823e88367dd45f86ae770839d4f114577495639
[ "MIT" ]
null
null
null
##==============================================================# ## SECTION: Imports # ##==============================================================# import os import subprocess ##==============================================================# ## SECTION: Function Defin...
36.5
87
0.342466
118062a5cf09c827e53317f2f178d4b31d081754
10,598
py
Python
hdp-ambari-mpack-3.1.4.0/stacks/HDP/3.0/services/YARN/package/alerts/alert_ats_hbase.py
dropoftruth/dfhz_hdp_mpack
716f0396dce25803365c1aed9904b74fbe396f79
[ "Apache-2.0" ]
3
2022-01-05T10:10:36.000Z
2022-02-21T06:57:06.000Z
hdp-ambari-mpack-3.1.4.0/stacks/HDP/3.0/services/YARN/package/alerts/alert_ats_hbase.py
dropoftruth/dfhz_hdp_mpack
716f0396dce25803365c1aed9904b74fbe396f79
[ "Apache-2.0" ]
13
2019-06-05T07:47:00.000Z
2019-12-29T08:29:27.000Z
hdp-ambari-mpack-3.1.4.0/stacks/HDP/3.0/services/YARN/package/alerts/alert_ats_hbase.py
dropoftruth/dfhz_hdp_mpack
716f0396dce25803365c1aed9904b74fbe396f79
[ "Apache-2.0" ]
2
2022-01-05T09:09:20.000Z
2022-02-21T07:02:06.000Z
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
43.081301
161
0.702208
4d20bff7ad9fe4b2d06702afa000a251018e0197
389
py
Python
toascii/converter.py
Iapetus-11/2ascii
7b77c22819f26ab8b8fa85b55fe1c022b0590bb4
[ "MIT" ]
16
2020-11-17T14:20:19.000Z
2022-03-27T16:25:05.000Z
toascii/converter.py
Iapetus-11/2ascii
7b77c22819f26ab8b8fa85b55fe1c022b0590bb4
[ "MIT" ]
null
null
null
toascii/converter.py
Iapetus-11/2ascii
7b77c22819f26ab8b8fa85b55fe1c022b0590bb4
[ "MIT" ]
2
2021-10-11T21:26:41.000Z
2022-03-11T08:44:02.000Z
class Converter: """Base converter class, contains the asciify() method which is used in all Converter subclasses.""" def asciify(self, image): for row in image: for b, g, r in row: lumination = 0.2126 * r + 0.7152 * g + 0.0722 * b yield self.gradient[int((lu...
35.363636
104
0.562982
ed11d9b069bf9cfe2becfeb30cad297b8361c18d
844
py
Python
setup.py
prokopst/clizy
c024be725377c05c3db186f463e18f70dc90b55e
[ "Apache-2.0" ]
31
2018-04-20T01:05:47.000Z
2018-10-06T15:08:44.000Z
setup.py
prokopst/clizy
c024be725377c05c3db186f463e18f70dc90b55e
[ "Apache-2.0" ]
5
2018-04-25T07:47:20.000Z
2018-10-16T06:31:32.000Z
setup.py
getclizy/clizy
c024be725377c05c3db186f463e18f70dc90b55e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from setuptools import setup, find_packages import sys if sys.version_info < (3, 6): raise RuntimeError("Python < 3.6 is not supported!") with open('docs/README.md') as file: long_description = file.read() setup( name='clizy', version='0.0.2', description="Command-line inter...
30.142857
84
0.674171
b2eceee674a60198115c150d9874fcc672135c1b
936
py
Python
unittest_reinvent/running_modes/reinforcement_tests/test_margin_guard_mean_stats.py
lilleswing/Reinvent-1
ac4e3e6fa6379c6f4af883478dfd1b3407933ada
[ "Apache-2.0" ]
183
2020-04-04T02:01:15.000Z
2022-03-30T21:56:56.000Z
unittest_reinvent/running_modes/reinforcement_tests/test_margin_guard_mean_stats.py
lilleswing/Reinvent-1
ac4e3e6fa6379c6f4af883478dfd1b3407933ada
[ "Apache-2.0" ]
39
2020-04-05T15:19:56.000Z
2022-03-09T12:58:21.000Z
unittest_reinvent/running_modes/reinforcement_tests/test_margin_guard_mean_stats.py
lilleswing/Reinvent-1
ac4e3e6fa6379c6f4af883478dfd1b3407933ada
[ "Apache-2.0" ]
70
2020-04-05T19:25:43.000Z
2022-02-22T12:04:39.000Z
import unittest from unittest.mock import Mock import torch import numpy as np from running_modes.reinforcement_learning.margin_guard import MarginGuard class MarginGuardMeanStatsTest(unittest.TestCase): def setUp(self) -> None: self.runner = Mock() self.mg = MarginGuard(self.runner) sel...
32.275862
75
0.66453
9c8f52389ca8af8762fae0edd609a8a97a982485
2,644
py
Python
scripts/run_tracking_eval_set.py
raphaelchang/omni_slam_eval
7df7d76c520c1325ac4f1a85f87b7af07d9628c3
[ "MIT" ]
7
2020-06-15T01:04:10.000Z
2021-12-15T03:49:05.000Z
scripts/run_tracking_eval_set.py
raphaelchang/omni_slam_eval
7df7d76c520c1325ac4f1a85f87b7af07d9628c3
[ "MIT" ]
null
null
null
scripts/run_tracking_eval_set.py
raphaelchang/omni_slam_eval
7df7d76c520c1325ac4f1a85f87b7af07d9628c3
[ "MIT" ]
4
2020-06-15T16:02:12.000Z
2021-10-12T07:18:47.000Z
import roslaunch import os from parse import parse import sys import argparse parser = argparse.ArgumentParser(description='Run tracking evaluation set') parser.add_argument('working_dir', help='working directory') parser.add_argument('--motion', type=str, help='motion type for motion set evaluation') parser.add_argum...
41.3125
189
0.538956
2f5599ce043dd86c33dd0bd6d53ad0dcd80c1f13
600
py
Python
read_parquet.py
gkovacs/crypocurrency-trading
74edbea2a3c3585b7df976bbe5bb0bab911cd030
[ "MIT" ]
5
2018-05-02T19:41:55.000Z
2019-06-24T12:04:12.000Z
read_parquet.py
gkovacs/crypocurrency-trading
74edbea2a3c3585b7df976bbe5bb0bab911cd030
[ "MIT" ]
null
null
null
read_parquet.py
gkovacs/crypocurrency-trading
74edbea2a3c3585b7df976bbe5bb0bab911cd030
[ "MIT" ]
1
2018-11-15T16:25:22.000Z
2018-11-15T16:25:22.000Z
#!/usr/bin/env python3 import paratext import pandas import lz4.frame import gzip import io import pyarrow.parquet as pq import pyarrow as pa ''' filepath = 'cboe/lz4_test/BTCUSD_order_book_20170627.csv.lz4' #filepath = 'cboe/lz4_test/BTCUSD_order_book_20170627.csv.gz' df = pandas.read_csv(io.TextIOWrapper(lz4.frame....
22.222222
64
0.756667
ebcee15ed226b37f75a0283649de27c10c8c0ecb
37,793
py
Python
despasito/equations_of_state/saft/gamma_sw.py
nikita-bykov/despasito
484ccd8d013bf83de79a28c605d0bdced90ca391
[ "BSD-3-Clause" ]
3
2020-09-28T21:06:56.000Z
2022-02-06T20:21:00.000Z
despasito/equations_of_state/saft/gamma_sw.py
nikita-bykov/despasito
484ccd8d013bf83de79a28c605d0bdced90ca391
[ "BSD-3-Clause" ]
20
2019-09-20T15:44:45.000Z
2021-04-05T18:11:20.000Z
despasito/equations_of_state/saft/gamma_sw.py
nikita-bykov/despasito
484ccd8d013bf83de79a28c605d0bdced90ca391
[ "BSD-3-Clause" ]
6
2020-04-07T23:35:37.000Z
2021-11-18T13:17:24.000Z
# -- coding: utf8 -- r""" EOS object for SAFT-:math:`\gamma`-SW Equations referenced in this code are from Lymperiadis, A. et. al, J. Chem. Phys. 127, 234903 (2007) """ import numpy as np import logging import despasito.equations_of_state.eos_toolbox as tb from despasito.equations_of_state import c...
38.329615
271
0.570741
2aeba7e503587515f45dd368c4496fa8915beaf8
743
py
Python
python/variable.py
itzsoumyadip/vs
acf32cd0bacb26e62854060e0acf5eb41b7a68c8
[ "Unlicense" ]
1
2019-07-05T04:27:05.000Z
2019-07-05T04:27:05.000Z
python/variable.py
itzsoumyadip/vs
acf32cd0bacb26e62854060e0acf5eb41b7a68c8
[ "Unlicense" ]
null
null
null
python/variable.py
itzsoumyadip/vs
acf32cd0bacb26e62854060e0acf5eb41b7a68c8
[ "Unlicense" ]
null
null
null
## IN PYTHON COSTANT VARIBLE CAN NOT CREATED num =5 num2 = num print(id(num)) # returns memory address of the varible print(id(num) ,id(num2)) # both nun and num2 are pointing towards same Data and Address this is why python is more memory effecient print(id(5)) # address is not based on varible name it base ...
19.051282
135
0.546433
920e621975c812f0d89afae659fc1f7db89e2c65
819
py
Python
src/feature/utils.py
0shimax/Easy-Over-Complete-Distribution
3a646bdb819d961cd77725eb31bbaa47ee2a0be9
[ "MIT" ]
5
2020-10-16T03:07:05.000Z
2022-01-03T07:52:18.000Z
src/feature/utils.py
0shimax/Easy-Over-Complete-Distribution
3a646bdb819d961cd77725eb31bbaa47ee2a0be9
[ "MIT" ]
1
2021-01-20T02:29:51.000Z
2021-01-20T02:29:51.000Z
src/feature/utils.py
0shimax/Easy-Over-Complete-Distribution
3a646bdb819d961cd77725eb31bbaa47ee2a0be9
[ "MIT" ]
1
2021-12-15T12:37:28.000Z
2021-12-15T12:37:28.000Z
import io from torchvision import transforms import torch from pathlib import Path from PIL import Image class ImageTransform(object): def __init__(self): pass def __call__(self, x): normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.2...
26.419355
68
0.581197
cc4438463f39ed8c523ce6f53519b4b16bf07a9d
893
py
Python
vtkplotter_examples/basic/lorenz.py
ismarou/vtkplotter-examples
1eefcc026be169ab7a77a5bce6dec8044c33b554
[ "MIT" ]
4
2020-07-30T02:38:29.000Z
2021-09-12T14:30:18.000Z
vtkplotter_examples/basic/lorenz.py
ismarou/vtkplotter-examples
1eefcc026be169ab7a77a5bce6dec8044c33b554
[ "MIT" ]
null
null
null
vtkplotter_examples/basic/lorenz.py
ismarou/vtkplotter-examples
1eefcc026be169ab7a77a5bce6dec8044c33b554
[ "MIT" ]
null
null
null
import numpy as np dt = 0.002 y = (25.0, -10.0, -7.0) # Starting point (initial condition) pts, cols = [], [] for t in np.linspace(0, 20, int(20 / dt)): # Integrate a funny differential equation dydt = np.array( [-8 / 3.0 * y[0] + y[1] * y[2], -10.0 * (y[1] - y[2]), -y[1] * y[0] + 2...
29.766667
74
0.586786
656734fa6739f4ddf8870d24f93442e61ab8fb64
9,892
py
Python
boto/sqs/message.py
Yurzs/boto
d739d6c52877699206e69b9901bbe92ea437ba5d
[ "MIT" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
boto/sqs/message.py
Yurzs/boto
d739d6c52877699206e69b9901bbe92ea437ba5d
[ "MIT" ]
4,640
2015-07-08T16:19:08.000Z
2019-12-02T15:01:27.000Z
boto/sqs/message.py
Yurzs/boto
d739d6c52877699206e69b9901bbe92ea437ba5d
[ "MIT" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
36.367647
116
0.675596
10856ffbb31c03d47dbb0fe294abb6586e373999
779
py
Python
teryt_tree/migrations/0007_auto_20191020_2005.py
rwakulszowa/django-teryt-tree
ef7562ac36626a9f6f5292da26eb9d63da4f1806
[ "BSD-3-Clause" ]
3
2016-07-04T08:58:51.000Z
2019-06-23T14:58:41.000Z
teryt_tree/migrations/0007_auto_20191020_2005.py
rwakulszowa/django-teryt-tree
ef7562ac36626a9f6f5292da26eb9d63da4f1806
[ "BSD-3-Clause" ]
5
2017-12-03T04:28:01.000Z
2020-01-07T00:36:28.000Z
teryt_tree/migrations/0007_auto_20191020_2005.py
watchdogpolska/django-teryt-tree
0f7bc7ea5d027d37b6929777e65a27286412209f
[ "BSD-3-Clause" ]
4
2017-12-02T22:25:44.000Z
2020-10-31T20:18:57.000Z
# Generated by Django 2.2.6 on 2019-10-21 01:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("teryt_tree", "0006_auto_20191020_1953"), ] operations = [ migrations.AlterField( model_name="jednostkaadministracyjna", ...
26.862069
62
0.608472
db1f525658526f575d640197cfa3e8af0adc1668
4,212
py
Python
open/Dell/code/rnnt/tensorrt/preprocessing/preprocessing.py
ctuning/inference_results_v1.1
d9176eca28fcf6d7a05ccb97994362a76a1eb5ab
[ "Apache-2.0" ]
12
2021-09-23T08:05:57.000Z
2022-03-21T03:52:11.000Z
open/Dell/code/rnnt/tensorrt/preprocessing/preprocessing.py
ctuning/inference_results_v1.1
d9176eca28fcf6d7a05ccb97994362a76a1eb5ab
[ "Apache-2.0" ]
24
2021-07-19T01:09:35.000Z
2022-03-17T11:44:02.000Z
open/Dell/code/rnnt/tensorrt/preprocessing/preprocessing.py
ctuning/inference_results_v1.1
d9176eca28fcf6d7a05ccb97994362a76a1eb5ab
[ "Apache-2.0" ]
16
2021-09-23T20:26:38.000Z
2022-03-09T12:59:56.000Z
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
33.428571
100
0.656695
b5e66e738e1cd0b6bead2f8dd3e536f022267eb0
4,099
py
Python
src/all_networks_with_n_nodes_e_edges.py
Eandreas1857/dsgrn_acdc
cfbccbd6cc27ffa4b0bd570ffb4f206b2ca9705c
[ "MIT" ]
null
null
null
src/all_networks_with_n_nodes_e_edges.py
Eandreas1857/dsgrn_acdc
cfbccbd6cc27ffa4b0bd570ffb4f206b2ca9705c
[ "MIT" ]
null
null
null
src/all_networks_with_n_nodes_e_edges.py
Eandreas1857/dsgrn_acdc
cfbccbd6cc27ffa4b0bd570ffb4f206b2ca9705c
[ "MIT" ]
null
null
null
import itertools import networkx as nx import DSGRN from DSGRN import * # Function to generate all binary strings def generateAllBinaryStrings(binary_list, n, arr, i): if i == n: a = [] for i in range(0, n): a.append(arr[i]) binary_list.append(a) return # First...
29.489209
130
0.529397
94b90c258fe8d2bc6bc06651278960c3c2707966
7,690
py
Python
pycatflow/input.py
Finn090/PyCatFlow
5e3c65c6f13c225c94bd3d3a805be867e0b0ff55
[ "MIT" ]
null
null
null
pycatflow/input.py
Finn090/PyCatFlow
5e3c65c6f13c225c94bd3d3a805be867e0b0ff55
[ "MIT" ]
null
null
null
pycatflow/input.py
Finn090/PyCatFlow
5e3c65c6f13c225c94bd3d3a805be867e0b0ff55
[ "MIT" ]
null
null
null
def find_delimiter(data): if type(data) == str: headers = data.split("\n")[0] else: headers = data.decode("utf-8").split("\n")[0] delimiters = [",", ";", "\t"] # Removed: , "\s", "|" l = {} for d in delimiters: count = 0 for c in headers: if c.f...
40.687831
205
0.561378
38697e08240c4ea80279317bf94d091da7f6c1b9
3,246
py
Python
weasyprint/tests/test_draw/test_list.py
OptikSage/WeasyPrint
e9ccfb1c7a62924cfe05cbee68cd722b4846704a
[ "BSD-3-Clause" ]
12
2019-08-02T07:58:16.000Z
2022-01-31T23:45:08.000Z
weasyprint/tests/test_draw/test_list.py
OptikSage/WeasyPrint
e9ccfb1c7a62924cfe05cbee68cd722b4846704a
[ "BSD-3-Clause" ]
8
2019-08-02T08:06:18.000Z
2022-03-11T23:45:17.000Z
weasyprint/tests/test_draw/test_list.py
OptikSage/WeasyPrint
e9ccfb1c7a62924cfe05cbee68cd722b4846704a
[ "BSD-3-Clause" ]
11
2019-07-31T16:23:36.000Z
2022-01-29T08:30:07.000Z
""" weasyprint.tests.test_draw.test_list ------------------------------------ Test how lists are drawn. :copyright: Copyright 2011-2018 Simon Sapin and contributors, see AUTHORS. :license: BSD, see LICENSE for details. """ import pytest from . import B, _, assert_pixels, r from ..testing_utils ...
38.188235
78
0.369994
f0abbe2b7982d559f238153cc15b961825c581e2
3,376
py
Python
scripts/density_representation/optimize_sparse_params.py
felixmusil/ml_tools
8731bd5628edcf50d03ea7fc99c570f428a08f7b
[ "MIT" ]
1
2020-03-10T09:13:45.000Z
2020-03-10T09:13:45.000Z
scripts/density_representation/optimize_sparse_params.py
felixmusil/ml_tools
8731bd5628edcf50d03ea7fc99c570f428a08f7b
[ "MIT" ]
null
null
null
scripts/density_representation/optimize_sparse_params.py
felixmusil/ml_tools
8731bd5628edcf50d03ea7fc99c570f428a08f7b
[ "MIT" ]
null
null
null
import ase from ase.io import read,write from ase.visualize import view import sys,os import mkl from glob import glob from copy import copy from sklearn.model_selection import KFold,ParameterGrid import cPickle as pck import json import pandas as pd sys.path.insert(0,'/home/musil/git/ml_tools/') from ml_tools.descri...
37.511111
98
0.724526
820729a6366ee5ee6c778d41e4c88274e4ed256a
543
py
Python
Ex_Files_Python_Automation/Exercise Files/Source Code/fileIO.py
smile-bold/Python-Projects
41773e2c4d3b28304aa7a0a8454e28e59b06c313
[ "MIT" ]
null
null
null
Ex_Files_Python_Automation/Exercise Files/Source Code/fileIO.py
smile-bold/Python-Projects
41773e2c4d3b28304aa7a0a8454e28e59b06c313
[ "MIT" ]
null
null
null
Ex_Files_Python_Automation/Exercise Files/Source Code/fileIO.py
smile-bold/Python-Projects
41773e2c4d3b28304aa7a0a8454e28e59b06c313
[ "MIT" ]
null
null
null
#!/usr/bin/python3 f = open('inputFile.txt', 'r') # opens file with only read permissions passFile = open('PassFile.txt', 'w') #opens file with write permissions failFile = open('FailFile.txt', 'w') # opens file with write permissions for line in f: # loops through line element of total line array line_split = li...
33.9375
92
0.6814
c48244655e913fa5ce80f29fce3c3fc85527a6d8
1,639
py
Python
lpips_loss.py
nelson870708/PerceptualSimilarity
c46cc10ea108403d2c42925e1417617912efd4d8
[ "BSD-2-Clause" ]
null
null
null
lpips_loss.py
nelson870708/PerceptualSimilarity
c46cc10ea108403d2c42925e1417617912efd4d8
[ "BSD-2-Clause" ]
null
null
null
lpips_loss.py
nelson870708/PerceptualSimilarity
c46cc10ea108403d2c42925e1417617912efd4d8
[ "BSD-2-Clause" ]
null
null
null
import argparse import matplotlib.pyplot as plt import torch from torch.autograd import Variable import lpips parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("--ref_path", type=str, default="./imgs/ex_ref.png") parser.add_argument("--pred_path", type=str, ...
29.8
88
0.675412
8fef64ffa68d7c99523df4ecab4f30ee6df48c8f
2,139
py
Python
experiments/1dt_shallowwater/hyperparams.py
flabowski/POD-UQNN
1c81be432e69d24ae894828f42918fbc1fe54bc1
[ "MIT" ]
15
2020-05-29T11:42:14.000Z
2022-03-20T03:53:44.000Z
experiments/1dt_shallowwater/hyperparams.py
flabowski/POD-UQNN
1c81be432e69d24ae894828f42918fbc1fe54bc1
[ "MIT" ]
null
null
null
experiments/1dt_shallowwater/hyperparams.py
flabowski/POD-UQNN
1c81be432e69d24ae894828f42918fbc1fe54bc1
[ "MIT" ]
11
2020-06-09T01:16:22.000Z
2021-04-27T08:53:02.000Z
"""Default hyperparameters for 1D time-dep Burgers Equation.""" import numpy as np from poduqnn.varneuralnetwork import NORM_MEANSTD from scipy.optimize import brentq HP = {} # Dimension of u(x, t, mu) HP["n_v"] = 2 # Space HP["n_x"] = 132 HP["x_min"] = 0. HP["x_max"] = 100. # Time HP["n_t"] = 51 HP["t_min"] = 0. HP[...
22.755319
97
0.546517
aa1f0a3a061d26650a44920c7b76dc53d2090240
3,486
py
Python
gita_bot/ses_mailer.py
yashlab/node_projs
9bce23ea45d8caf3e2e97e33a494caa56e85a4b7
[ "MIT" ]
null
null
null
gita_bot/ses_mailer.py
yashlab/node_projs
9bce23ea45d8caf3e2e97e33a494caa56e85a4b7
[ "MIT" ]
1
2021-04-11T19:35:10.000Z
2021-04-11T19:35:10.000Z
gita_bot/ses_mailer.py
yashlab/node_projs
9bce23ea45d8caf3e2e97e33a494caa56e85a4b7
[ "MIT" ]
null
null
null
import smtplib import email.utils from email.mime.multipart import MIMEMultipart from email.mime.image import MIMEImage from email.mime.text import MIMEText import mimetypes,os,base64,random from aws_ses_creds import * ''' This file will contain the following: * SENDER : email id of the sender (user@example.com)...
37.483871
128
0.623924
c1ad478fb3808f0699dde3af237924ceb1095f9e
427
py
Python
app.py
clash402/quizzer-2
183afc89bb911052c2e99dfeef2433901e5abe13
[ "MIT" ]
null
null
null
app.py
clash402/quizzer-2
183afc89bb911052c2e99dfeef2433901e5abe13
[ "MIT" ]
null
null
null
app.py
clash402/quizzer-2
183afc89bb911052c2e99dfeef2433901e5abe13
[ "MIT" ]
null
null
null
from question import Question from question_bank import QuestionBank from data_manager import DataManager from quiz import Quiz from ui import UI class App: def __init__(self): question_bank = QuestionBank(DataManager(), Question).generate() quiz = Quiz(question_bank) self.ui = UI(quiz) ...
22.473684
72
0.697892
a4831a05e1c75ec00cbbc19e3a60b6a6e9ab9e1e
7,132
py
Python
joblib/externals/loky/backend/popen_loky_posix.py
cclauss/joblib
902fb6bbcf75c461d1b6703e5a01605fc592f214
[ "BSD-3-Clause" ]
1
2019-07-16T10:25:24.000Z
2019-07-16T10:25:24.000Z
joblib/externals/loky/backend/popen_loky_posix.py
cclauss/joblib
902fb6bbcf75c461d1b6703e5a01605fc592f214
[ "BSD-3-Clause" ]
1
2020-02-17T00:13:09.000Z
2020-02-17T00:13:09.000Z
joblib/externals/loky/backend/popen_loky_posix.py
jdanbrown/joblib
e205833ed42f0f1c72d69d96f4c266734cea9d95
[ "BSD-3-Clause" ]
1
2019-03-25T09:56:23.000Z
2019-03-25T09:56:23.000Z
############################################################################### # Popen for LokyProcess. # # author: Thomas Moreau and Olivier Grisel # import os import sys import signal import pickle from io import BytesIO from . import reduction, spawn from .context import get_spawning_popen, set_spawning_popen from...
33.172093
79
0.502243
b7ca445c5b63016b656d45482d196fd1f7c6523b
314
py
Python
contracts/enums.py
City-of-Helsinki/berth-reservations
a3b1a8c2176f132505527acdf6da3a62199401db
[ "MIT" ]
3
2020-10-13T07:58:48.000Z
2020-12-22T09:41:50.000Z
contracts/enums.py
City-of-Helsinki/berth-reservations
a3b1a8c2176f132505527acdf6da3a62199401db
[ "MIT" ]
422
2018-10-25T10:57:05.000Z
2022-03-30T05:47:14.000Z
contracts/enums.py
City-of-Helsinki/berth-reservations
a3b1a8c2176f132505527acdf6da3a62199401db
[ "MIT" ]
1
2020-04-03T07:38:03.000Z
2020-04-03T07:38:03.000Z
from django.db.models import TextChoices from django.utils.translation import gettext_lazy as _ class ContractStatus(TextChoices): NEW = "new", _("New") PENDING = "pending", _("Pending") SIGNED = "signed", _("Signed") DELETED = "deleted", _("Deleted") CANCELLED = "cancelled", _("Cancelled")
28.545455
54
0.678344
ad8451beb5399539f276cbaaaf7a1dab0cc3c741
2,483
py
Python
signing/test/test_signedprotocol.py
nkrowlan/signing-server
53f9b8ffef493526c467d59b93fc71a6644a7b6a
[ "Apache-2.0" ]
null
null
null
signing/test/test_signedprotocol.py
nkrowlan/signing-server
53f9b8ffef493526c467d59b93fc71a6644a7b6a
[ "Apache-2.0" ]
null
null
null
signing/test/test_signedprotocol.py
nkrowlan/signing-server
53f9b8ffef493526c467d59b93fc71a6644a7b6a
[ "Apache-2.0" ]
null
null
null
from twisted.internet import defer from twisted.test import proto_helpers from twisted.trial import unittest from signing.processor import Processor from signing.signedprotocol import SignedProtocol, SignedProtocolFactory, InvalidSignature class SignedProtocolTestCase(unittest.TestCase): """ Trivial command i...
31.833333
100
0.660491
b868aa43973c7b3c028d3471b8b163aeeb5ea49a
363
py
Python
examples/get_search.py
ToucanTocard/crawliexpress
1506bdcd4d02d4f7ac9fc9829deff2f737bea211
[ "MIT" ]
null
null
null
examples/get_search.py
ToucanTocard/crawliexpress
1506bdcd4d02d4f7ac9fc9829deff2f737bea211
[ "MIT" ]
2
2020-12-23T00:59:14.000Z
2021-07-22T15:47:48.000Z
examples/get_search.py
ToucanTocard/crawliexpress
1506bdcd4d02d4f7ac9fc9829deff2f737bea211
[ "MIT" ]
null
null
null
from crawliexpress import Client from time import sleep client = Client( "https://www.aliexpress.com", # copy it from your browser cookies "xxxx", ) page = 1 while True: search_page = client.get_search("akame ga kill", page=page) print(search_page.page) if search_page.has_next_page() is False...
19.105263
63
0.666667
93e43af349b642b611b0b5f14dcc6b912a3ffb3e
1,112
py
Python
tests/test_estimator.py
iglpdc/dmrg_helpers
df27ff06395c0a4779c2d2723d57524da55cc14a
[ "MIT" ]
1
2019-09-26T13:06:04.000Z
2019-09-26T13:06:04.000Z
tests/test_estimator.py
iglpdc/dmrg_helpers
df27ff06395c0a4779c2d2723d57524da55cc14a
[ "MIT" ]
null
null
null
tests/test_estimator.py
iglpdc/dmrg_helpers
df27ff06395c0a4779c2d2723d57524da55cc14a
[ "MIT" ]
null
null
null
''' Test for the database class. ''' import os from nose.tools import with_setup from dmrg_helpers.extract.database import Database def setup_function(): pass def teardown_function(): os.remove('tests/db_test.sqlite3') @with_setup(setup_function, teardown_function) def test_members(): db = Database('test...
30.054054
79
0.715827
86aab7ceb9b8ba6be1e8d9aa4d80c731229988f5
3,159
py
Python
pypop/simulation/wold.py
trouleau/pypop
a9b22ad02e890e250fb91a8dc32a9dfde3d4e3de
[ "MIT" ]
null
null
null
pypop/simulation/wold.py
trouleau/pypop
a9b22ad02e890e250fb91a8dc32a9dfde3d4e3de
[ "MIT" ]
null
null
null
pypop/simulation/wold.py
trouleau/pypop
a9b22ad02e890e250fb91a8dc32a9dfde3d4e3de
[ "MIT" ]
null
null
null
import random as rd import numpy as np import numba #@numba.njit def _total_intensity(mu, adj, beta, delta, t): return mu + np.sum(adj / (beta + 1 + delta), axis=0) #@numba.njit def _simulate(mu, adj, beta, last, delta, start_t, start_n, max_t, max_n, seed=None): dim = len(mu) # FIXME: Add fake 0.0 eve...
34.714286
91
0.600823
050b387ed1a1dfa36fa27847f66d96f0e99ed7f3
5,395
py
Python
main.py
VedderPradhan/redditanalyst
be3efcab602b82b33aa9356fd2ba7672cf91e271
[ "BSD-3-Clause" ]
null
null
null
main.py
VedderPradhan/redditanalyst
be3efcab602b82b33aa9356fd2ba7672cf91e271
[ "BSD-3-Clause" ]
null
null
null
main.py
VedderPradhan/redditanalyst
be3efcab602b82b33aa9356fd2ba7672cf91e271
[ "BSD-3-Clause" ]
null
null
null
#import the necesary libraries import praw import beepy as beep import time nagreedacounts = 50 #number of accounts that are desired to check naccounts = nagreedacounts #variable number of accouts for repeated acconts on the subreddit fixedaccounts = nagreedacounts #fixed number of accounts print("\nMa...
42.480315
177
0.596849
5a8c2738e2bfd60e1da9205eb98b3c9d086b7e32
2,524
py
Python
a4/utils.py
MG2033/CS224N
ad8cd76c925ccc03ad813bc11d1c05d9614c7948
[ "MIT" ]
null
null
null
a4/utils.py
MG2033/CS224N
ad8cd76c925ccc03ad813bc11d1c05d9614c7948
[ "MIT" ]
null
null
null
a4/utils.py
MG2033/CS224N
ad8cd76c925ccc03ad813bc11d1c05d9614c7948
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ CS224N 2018-19: Homework 4 nmt.py: NMT Model Pencheng Yin <pcyin@cs.cmu.edu> Sahil Chopra <schopra8@stanford.edu> """ import math from typing import List import numpy as np import torch import torch.nn as nn import torch.nn.functional as F def pad_sents(sents, pad...
32.358974
100
0.651347
86d900d72f46bde9bfc14a769cccbf5d93ab9e29
1,617
py
Python
problematic/peakfinders2d.py
stefsmeets/problematic
b9b5294d93f70b7c6fa755594ab1f6111e4bc383
[ "MIT" ]
9
2018-09-10T04:29:50.000Z
2020-08-08T17:38:40.000Z
problematic/peakfinders2d.py
stefsmeets/problematic
b9b5294d93f70b7c6fa755594ab1f6111e4bc383
[ "MIT" ]
5
2018-06-08T08:46:24.000Z
2022-02-15T08:15:47.000Z
problematic/peakfinders2d.py
stefsmeets/problematic
b9b5294d93f70b7c6fa755594ab1f6111e4bc383
[ "MIT" ]
7
2019-07-16T16:18:05.000Z
2021-11-04T14:27:00.000Z
import numpy as np import scipy.ndimage as ndi NO_PEAKS = np.array([[np.nan, np.nan]]) def clean_peaks(peaks): if len(peaks) == 0: return NO_PEAKS else: return peaks def find_peaks_regionprops(z, min_sigma=4, max_sigma=5, threshold=1, min_size=50, return_props=Fal...
27.87931
86
0.667285
dba260aebb1e650a01e92add05c53be3ac93019e
4,554
py
Python
src/so.py
salembeats/alfred-stackoverflow
4faf08f0d03959ce784fb9c7a6c29adf503dfe11
[ "MIT" ]
1
2019-12-18T03:07:25.000Z
2019-12-18T03:07:25.000Z
src/so.py
salembeats/alfred-stackoverflow
4faf08f0d03959ce784fb9c7a6c29adf503dfe11
[ "MIT" ]
null
null
null
src/so.py
salembeats/alfred-stackoverflow
4faf08f0d03959ce784fb9c7a6c29adf503dfe11
[ "MIT" ]
null
null
null
#!/usr/bin/python # encoding: utf-8 # # Copyright © 2014 deanishe@deanishe.net # # MIT Licence. See http://opensource.org/licenses/MIT # # Created on 2014-12-29 # """ Search StackOverflow API """ from __future__ import print_function, unicode_literals, absolute_import import functools from HTMLParser import HTMLPars...
24.095238
78
0.567633
da3c7b1852e0544c8dfab3969fe2fbaa46017c4d
1,039
py
Python
scripts/mtDNA/split_mtdna_by_genes.py
mahajrod/MAVR
4db74dff7376a2ffe4426db720b241de9198f329
[ "MIT" ]
10
2015-04-28T14:15:04.000Z
2021-03-15T00:07:38.000Z
scripts/mtDNA/split_mtdna_by_genes.py
mahajrod/MAVR
4db74dff7376a2ffe4426db720b241de9198f329
[ "MIT" ]
null
null
null
scripts/mtDNA/split_mtdna_by_genes.py
mahajrod/MAVR
4db74dff7376a2ffe4426db720b241de9198f329
[ "MIT" ]
6
2017-03-16T22:38:41.000Z
2021-08-11T00:22:52.000Z
#!/usr/bin/env python __author__ = 'Sergei F. Kliver' import os import argparse from Bio import SeqIO from RouToolPa.GeneralRoutines import FileRoutines from RouToolPa.Routines import MtDNARoutines parser = argparse.ArgumentParser() parser.add_argument("-i", "--input_file", action="store", dest="input", required=Tru...
37.107143
103
0.708373
03b53f72d734af70048764b087c81f0c1e47a090
16
py
Python
custom_components/apc-home/typings/__init__.py
xannor/ha-apc-home
ee7198b5bb527596ff8eb6a060ef80b889243d29
[ "Unlicense" ]
null
null
null
custom_components/apc-home/typings/__init__.py
xannor/ha-apc-home
ee7198b5bb527596ff8eb6a060ef80b889243d29
[ "Unlicense" ]
null
null
null
custom_components/apc-home/typings/__init__.py
xannor/ha-apc-home
ee7198b5bb527596ff8eb6a060ef80b889243d29
[ "Unlicense" ]
null
null
null
""" Typings """
8
15
0.4375
2339bab622eebfa9429efa3aa9019a393fa81e8b
1,840
py
Python
scripts/bootstrap_filter_demo.py
karalleyna/pyprobml
72195e46fdffc4418910e76d02e3d6469f4ce272
[ "MIT" ]
null
null
null
scripts/bootstrap_filter_demo.py
karalleyna/pyprobml
72195e46fdffc4418910e76d02e3d6469f4ce272
[ "MIT" ]
null
null
null
scripts/bootstrap_filter_demo.py
karalleyna/pyprobml
72195e46fdffc4418910e76d02e3d6469f4ce272
[ "MIT" ]
null
null
null
# Demo of the bootstrap filter under a # nonlinear discrete system # Author: Gerardo Gerardo Durán-Martín (@gerdm) import jax import nlds_lib as ds import jax.numpy as jnp import matplotlib.pyplot as plt from jax import random import pyprobml_utils as pml def plot_samples(sample_state, sample_obs, ax=None): fig...
28.307692
80
0.659783
14d428b15ebcb7d3e882314754e363ef45b6ccd1
1,147
py
Python
core/commands/admin/info_group.py
TheLonelyAdventurer/nebula8
e8fd48f91ce510bc1ebe4be38546c11afa8d2fa5
[ "Apache-2.0" ]
19
2020-12-24T02:47:41.000Z
2022-03-18T07:33:52.000Z
core/commands/admin/info_group.py
TheLonelyAdventurer/nebula8
e8fd48f91ce510bc1ebe4be38546c11afa8d2fa5
[ "Apache-2.0" ]
22
2020-09-29T04:56:29.000Z
2022-03-18T14:10:27.000Z
core/commands/admin/info_group.py
TheLonelyAdventurer/nebula8
e8fd48f91ce510bc1ebe4be38546c11afa8d2fa5
[ "Apache-2.0" ]
15
2020-09-29T04:56:37.000Z
2022-01-24T15:39:07.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright SquirrelNetwork from core.database.repository.group import GroupRepository from languages.getLang import languages from core.utilities.message import message from core.handlers.welcome import save_group from core import decorators @decorators.admin.user_admin ...
32.771429
61
0.694856
3d8f4eec3191e69c6ca44d056b29605f41c85dd2
2,593
py
Python
openvision/datasets/sythtextprovider.py
liuzz1983/open_vision
f346e2f789944ea590c1d263e72a6e93490bb3a0
[ "MIT" ]
null
null
null
openvision/datasets/sythtextprovider.py
liuzz1983/open_vision
f346e2f789944ea590c1d263e72a6e93490bb3a0
[ "MIT" ]
null
null
null
openvision/datasets/sythtextprovider.py
liuzz1983/open_vision
f346e2f789944ea590c1d263e72a6e93490bb3a0
[ "MIT" ]
null
null
null
## an initial version ## Transform the tfrecord to slim data provider format import numpy import tensorflow as tf import os slim = tf.contrib.slim ITEMS_TO_DESCRIPTIONS = { 'image': 'slim.tfexample_decoder.Image', 'shape': 'shape', 'height': 'height', 'width': 'width', 'object/bbox': 'box', ...
36.013889
85
0.66371
45cf0eeb9178cbf1cf37b6ac7dbed185d7f842b7
4,009
py
Python
basic_test/run_glove_test.py
yangheng95/LCF-ABSA
0eeb4788269a498d34c2aff942e03af78026617e
[ "MIT" ]
31
2019-10-07T03:05:39.000Z
2020-06-17T01:34:21.000Z
basic_test/run_glove_test.py
yangheng95/LCF-ABSA
0eeb4788269a498d34c2aff942e03af78026617e
[ "MIT" ]
7
2019-10-16T13:37:52.000Z
2020-03-30T03:40:56.000Z
basic_test/run_glove_test.py
yangheng95/LCF-ABSA
0eeb4788269a498d34c2aff942e03af78026617e
[ "MIT" ]
3
2020-01-12T13:03:35.000Z
2020-06-11T08:26:01.000Z
# -*- coding: utf-8 -*- # file: run_glove_test.py # time: 2021/12/4 # author: yangheng <yangheng@m.scnu.edu.cn> # github: https://github.com/yangheng95 # Copyright (C) 2021. All Rights Reserved. import shutil from torch import cuda from pyabsa import APCModelList, BERTBaselineAPCModelList, GloVeAPCModelList, \ AT...
43.576087
122
0.583188
3e17ac7d0be1260e528611f516f0b11b677e20c3
419
py
Python
3-mouth04/day05/mysite3/otm/models.py
gary-gggggg/gary
d8ba30ea4bc2b662a2d6a87d247f813e5680d63e
[ "Apache-2.0" ]
4
2021-02-01T10:28:11.000Z
2021-02-01T10:34:40.000Z
3-mouth04/day05/mysite3/otm/models.py
gary-gggggg/gary
d8ba30ea4bc2b662a2d6a87d247f813e5680d63e
[ "Apache-2.0" ]
null
null
null
3-mouth04/day05/mysite3/otm/models.py
gary-gggggg/gary
d8ba30ea4bc2b662a2d6a87d247f813e5680d63e
[ "Apache-2.0" ]
null
null
null
from django.db import models # Create your models here. class Publisher(models.Model): name = models.CharField('名称', max_length=50, unique=True) def __str__(self): return self.name class Book(models.Model): title = models.CharField('书名', max_length=50) publisher = models.ForeignKey(Publishe...
23.277778
90
0.701671
8657f3e1d2a87659e5b10d266266fd37c618f675
3,700
py
Python
official/vision/serving/export_saved_model_lib_v2.py
wnorris/models
a5e4965d1f4e4b02d51aa344336b6fff53af7c17
[ "Apache-2.0" ]
1
2020-09-14T10:46:07.000Z
2020-09-14T10:46:07.000Z
official/vision/serving/export_saved_model_lib_v2.py
wnorris/models
a5e4965d1f4e4b02d51aa344336b6fff53af7c17
[ "Apache-2.0" ]
null
null
null
official/vision/serving/export_saved_model_lib_v2.py
wnorris/models
a5e4965d1f4e4b02d51aa344336b6fff53af7c17
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 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...
37.755102
78
0.757297
54597a53bed51356ff6b39df928cb250f6847261
806
py
Python
tests/repository/test_in_memory_repos.py
banillie/bcompiler-engine
26b63b6e630e2925175ffff6b48b42d70f7ba544
[ "MIT" ]
null
null
null
tests/repository/test_in_memory_repos.py
banillie/bcompiler-engine
26b63b6e630e2925175ffff6b48b42d70f7ba544
[ "MIT" ]
null
null
null
tests/repository/test_in_memory_repos.py
banillie/bcompiler-engine
26b63b6e630e2925175ffff6b48b42d70f7ba544
[ "MIT" ]
null
null
null
# type: ignore import json import pytest from engine.exceptions import DatamapNotCSVException from engine.repository.datamap import InMemorySingleDatamapRepository def test_datamapline_repository_single_file_repo(datamap, datamapline_list_objects): repo = InMemorySingleDatamapRepository(datamap) assert rep...
36.636364
84
0.792804
a4aab6782810f9c148100e4c48422f5a4b7c3c28
3,356
py
Python
evaluation.py
Ary80/prova
059b814da402a32ce5e510af1b7377ad09bf4422
[ "MIT" ]
10
2018-07-26T15:01:55.000Z
2022-03-23T13:45:20.000Z
evaluation.py
Ary80/prova
059b814da402a32ce5e510af1b7377ad09bf4422
[ "MIT" ]
1
2019-08-12T11:43:19.000Z
2019-08-12T11:43:19.000Z
evaluation.py
Ary80/prova
059b814da402a32ce5e510af1b7377ad09bf4422
[ "MIT" ]
1
2020-02-08T00:55:20.000Z
2020-02-08T00:55:20.000Z
import numpy as np from scipy.stats import spearmanr from scipy.spatial.distance import cosine import Levenshtein as levenshtein import collections def task_accuracy_metrics(reward_list): """ Accuracy as percentage of examples that received rewards """ accuracy = sum(reward_list)*100/float(len(reward_list)) print(...
21.651613
105
0.757747
1cc97f931bd0094dc920a8a7034acb8b13463142
2,201
py
Python
src/utils/shell.py
sota/old-lang
4e7c93699a48f102f0d677a47bdfcf102d7a7db7
[ "MIT" ]
1
2020-05-05T20:51:16.000Z
2020-05-05T20:51:16.000Z
src/utils/shell.py
sota/old-lang
4e7c93699a48f102f0d677a47bdfcf102d7a7db7
[ "MIT" ]
null
null
null
src/utils/shell.py
sota/old-lang
4e7c93699a48f102f0d677a47bdfcf102d7a7db7
[ "MIT" ]
null
null
null
''' shell utilities ''' import os import re import sys import fnmatch from subprocess import Popen, PIPE, CalledProcessError from contextlib import contextmanager #pylint: disable=invalid-name def expandpath(path): return os.path.realpath(os.path.expanduser(path)) def inversepath(path): return '/'.join(['..'...
28.584416
106
0.602453
8018b516b1c8b66eecc02b4e133da97ff6345a81
787
py
Python
简单本地端口扫描[线程版].py
hzeyuan/100-Python
9def809d5a7c49bc63308d97ebbedf64cdca7ab4
[ "Apache-2.0" ]
7
2021-02-11T07:40:57.000Z
2022-01-23T11:24:31.000Z
简单本地端口扫描[线程版].py
hzeyuan/100-Python
9def809d5a7c49bc63308d97ebbedf64cdca7ab4
[ "Apache-2.0" ]
null
null
null
简单本地端口扫描[线程版].py
hzeyuan/100-Python
9def809d5a7c49bc63308d97ebbedf64cdca7ab4
[ "Apache-2.0" ]
3
2020-01-25T08:45:55.000Z
2021-01-21T14:51:51.000Z
import socket import threading def get_ip_status(lock, ip, port): server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.settimeout(1) try: result = server.connect_ex((ip, port)) with lock: if result == 0: print('{0} port {1} is open'.format(ip, port)...
26.233333
75
0.613723
1953c0d4c76c56f67fec68d55402b347aabe4e76
7,472
py
Python
Alignment/OfflineValidation/python/TkAlAllInOneTool/helperFunctions.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
Alignment/OfflineValidation/python/TkAlAllInOneTool/helperFunctions.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
Alignment/OfflineValidation/python/TkAlAllInOneTool/helperFunctions.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 from builtins import range import os import re import ROOT import sys from .TkAlExceptions import AllInOneError import CondCore.Utilities.conddblib as conddblib import six ####################--- Helpers ---############################ def re...
32.9163
165
0.582173
558602d6dd89475d17bd9a82d3c7cd24e9729e36
2,258
py
Python
benchmarks/template_server.py
AltaverseDAO/bittensor
ce0e6887d7e2b279b168949d4e7730981db8de6f
[ "MIT" ]
2
2020-03-11T19:40:05.000Z
2020-06-14T19:35:34.000Z
benchmarks/template_server.py
AltaverseDAO/bittensor
ce0e6887d7e2b279b168949d4e7730981db8de6f
[ "MIT" ]
null
null
null
benchmarks/template_server.py
AltaverseDAO/bittensor
ce0e6887d7e2b279b168949d4e7730981db8de6f
[ "MIT" ]
null
null
null
#!/bin/python3 # The MIT License (MIT) # Copyright © 2021 Yuma Rao # 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, ...
36.419355
123
0.698849
e2353c5d276f86274743e88b0c7d583842557494
8,992
py
Python
noisypy/calibration_utils.py
wobbuuu/noisypy
3e4a48e55a391a9552da0df77f115e86ef100037
[ "MIT" ]
null
null
null
noisypy/calibration_utils.py
wobbuuu/noisypy
3e4a48e55a391a9552da0df77f115e86ef100037
[ "MIT" ]
null
null
null
noisypy/calibration_utils.py
wobbuuu/noisypy
3e4a48e55a391a9552da0df77f115e86ef100037
[ "MIT" ]
null
null
null
import warnings import numpy as np import pandas as pd import scipy as sp from scipy.signal import savgol_filter from matplotlib import pyplot as plt import csaps from .noisy_utils import det2power from .settings import * __all__ = ['calibrate', 'fit_calibration'] def calibrate(vbs, res_inds, det_inds, skip=[], na...
39.438596
96
0.560276
9bebbedc7bc2e78818ae1b4594d94751fc4a240a
19,680
py
Python
contrib/runners/winrm_runner/winrm_runner/winrm_base.py
anirudhbagri/st2
bedc17015c6f0c4d7c00b30684ae6015b55bf702
[ "Apache-2.0" ]
null
null
null
contrib/runners/winrm_runner/winrm_runner/winrm_base.py
anirudhbagri/st2
bedc17015c6f0c4d7c00b30684ae6015b55bf702
[ "Apache-2.0" ]
null
null
null
contrib/runners/winrm_runner/winrm_runner/winrm_base.py
anirudhbagri/st2
bedc17015c6f0c4d7c00b30684ae6015b55bf702
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
39.438878
133
0.625457
33fe9e9be53a7fa23a4f7e9dfde20304cfd01402
443
py
Python
Ekeopara_Praise/Phase 2/LIST/Day39 Tasks/Task5.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
Ekeopara_Praise/Phase 2/LIST/Day39 Tasks/Task5.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
Ekeopara_Praise/Phase 2/LIST/Day39 Tasks/Task5.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
'''5. Write a Python program to count the number of strings where the string length is 2 or more and the first and last character are same from a given list of strings. Sample List : ['abc', 'xyz', 'aba', '1221'] Expected Result : 2''' def match_words(words): ctr = 0 for word in words: if len(word) > 1 and ...
27.6875
111
0.654628
eec89efefb45f4e5ab988873cca7dc5426dfb502
373
py
Python
srcipts/requests/admins_get.py
GerasimovRM/Where-I-Am
58f6f0d1533421890f199dacabe523a447486b9f
[ "MIT" ]
null
null
null
srcipts/requests/admins_get.py
GerasimovRM/Where-I-Am
58f6f0d1533421890f199dacabe523a447486b9f
[ "MIT" ]
null
null
null
srcipts/requests/admins_get.py
GerasimovRM/Where-I-Am
58f6f0d1533421890f199dacabe523a447486b9f
[ "MIT" ]
null
null
null
from requests import get, post from pprint import pprint from srcipts.requests.common import URL tokens = post(f'{URL}/signin', json={'nickname': 'Roman', 'unhashed_password': 'сильныйпароль'}).json() pprint(tokens) headers = {'Authorization': f'Bearer {tokens["access_token"]}'} ...
31.083333
82
0.659517
ff6852823c830cb630f713afb2f571f83c3b84e5
3,951
py
Python
python_modules/dagster/dagster/grpc/compile.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
python_modules/dagster/dagster/grpc/compile.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
python_modules/dagster/dagster/grpc/compile.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
"""Compile the proto definitions into Python. This tooling should be invoked to regenerate the Python grpc artifacts by running: python -m dagster.grpc.compile """ import os import shutil import subprocess import sys from dagster.utils import file_relative_path, safe_tempfile_path PROTOS_DIR = file_relative_pat...
28.630435
100
0.572766
aaf69b8dd0c1074846a14b8afb7d19deb478560a
51,629
py
Python
src/pmt/thirdparty/cihp_pgn/infer.py
fabioo29/physio-motion-transfer
b3bbbf98d6af0d79de8a29aa638b5c392a55d6f4
[ "MIT" ]
2
2021-06-30T23:13:36.000Z
2022-01-05T19:42:52.000Z
src/pmt/thirdparty/cihp_pgn/infer.py
fabioo29/physio-motion-transfer
b3bbbf98d6af0d79de8a29aa638b5c392a55d6f4
[ "MIT" ]
null
null
null
src/pmt/thirdparty/cihp_pgn/infer.py
fabioo29/physio-motion-transfer
b3bbbf98d6af0d79de8a29aa638b5c392a55d6f4
[ "MIT" ]
null
null
null
import os import tensorflow as tf import numpy as np from glob import glob from PIL import Image slim = tf.contrib.slim N_CLASSES = 20 INPUT_RESIZE = 1080 label_colours = [(0,0,0) , (128,0,0), (255,0,0), (0,85,0), (170,0,51), (255,85,0), (0,0,85), (0,119,221), (85,85,0), (0,85,85), (85,51,0), (52,86,...
51.992951
152
0.609735
80d3f723b648a84a21f8d661e45c1c2e0c528bdd
6,964
py
Python
test/functional/rpc_getblockstats.py
Frank-GER/syscoin
efbdac67f9d3d37d75de3480b8bb2c539ad05dd4
[ "MIT" ]
61
2016-03-09T10:42:05.000Z
2018-03-13T05:06:30.000Z
test/functional/rpc_getblockstats.py
Frank-GER/syscoin
efbdac67f9d3d37d75de3480b8bb2c539ad05dd4
[ "MIT" ]
153
2016-02-29T17:45:10.000Z
2018-03-16T23:37:02.000Z
test/functional/rpc_getblockstats.py
Frank-GER/syscoin
efbdac67f9d3d37d75de3480b8bb2c539ad05dd4
[ "MIT" ]
18
2016-03-02T21:50:44.000Z
2018-03-07T20:36:12.000Z
#!/usr/bin/env python3 # Copyright (c) 2017-2021 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 getblockstats rpc call # from test_framework.blocktools import COINBASE_MATURITY from test_fram...
41.700599
121
0.627944
9c9ff6929b6ec873f836d992d30150a81e27a6a6
2,280
py
Python
generated-libraries/python/netapp/ntdtest/group4_stats_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
2
2017-03-28T15:31:26.000Z
2018-08-16T22:15:18.000Z
generated-libraries/python/netapp/ntdtest/group4_stats_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
generated-libraries/python/netapp/ntdtest/group4_stats_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
from netapp.netapp_object import NetAppObject class Group4StatsInfo(NetAppObject): """ 4th nested typedef at level 1 """ _field_16 = None @property def field_16(self): """ Dummy/Generic Field 16 accepts any string Attributes: non-creatable, non-modifiable ""...
27.142857
90
0.555702
b87831eecb5eb6278e2387725e2f12fff3a4339c
23,777
py
Python
python/friesian/example/dien/utils.py
Forest216/BigDL
840da9a2eaf395978dd83730b02aa5e5dfbd7989
[ "Apache-2.0" ]
null
null
null
python/friesian/example/dien/utils.py
Forest216/BigDL
840da9a2eaf395978dd83730b02aa5e5dfbd7989
[ "Apache-2.0" ]
null
null
null
python/friesian/example/dien/utils.py
Forest216/BigDL
840da9a2eaf395978dd83730b02aa5e5dfbd7989
[ "Apache-2.0" ]
null
null
null
# # Copyright 2016 The BigDL 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 or agreed to in ...
40.505963
100
0.593304
6eb29e19e1e98b8a82bfd8dde2537fe123954f96
2,764
py
Python
tests/test_rfc4059.py
inexio/pyasn1-modules
13b84f74541ec442037273ddf8ba62bbba2cd974
[ "BSD-2-Clause" ]
2
2020-12-29T07:13:05.000Z
2021-02-07T15:32:26.000Z
tests/test_rfc4059.py
inexio/pyasn1-modules
13b84f74541ec442037273ddf8ba62bbba2cd974
[ "BSD-2-Clause" ]
3
2020-12-22T23:21:43.000Z
2021-04-06T16:24:39.000Z
tests/test_rfc4059.py
inexio/pyasn1-modules
13b84f74541ec442037273ddf8ba62bbba2cd974
[ "BSD-2-Clause" ]
1
2021-01-17T17:45:03.000Z
2021-01-17T17:45:03.000Z
# # This file is part of pyasn1-modules software. # # Created by Russ Housley # Copyright (c) 2021, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # import sys import unittest from pyasn1.codec.der.decoder import decode as der_decoder from pyasn1.codec.der.encoder import encode as der_encoder ...
39.485714
80
0.787627
da1901e5247726ada17f4669d26678c5d36217f0
8,587
py
Python
backbones/iresnet.py
fdbtrs/mixfacenets
ca3ef306b7e05cfab94f48e753d5aac248281032
[ "MIT" ]
48
2021-07-26T13:09:53.000Z
2022-02-23T11:41:39.000Z
backbones/iresnet.py
Gaurav14cs17/mixfacenets
ea7fe3f65a2a00dfc529ef21bfc7d279fdaf58b8
[ "MIT" ]
5
2021-08-02T10:19:15.000Z
2022-01-14T13:46:17.000Z
backbones/iresnet.py
Gaurav14cs17/mixfacenets
ea7fe3f65a2a00dfc529ef21bfc7d279fdaf58b8
[ "MIT" ]
10
2021-07-29T09:45:07.000Z
2021-12-07T00:39:48.000Z
import torch from torch import nn __all__ = ['iresnet18', 'iresnet34', 'iresnet50', 'iresnet100'] from backbones.mixnetm import _calc_width, count_model_flops def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): """3x3 convolution with padding""" return nn.Conv2d(in_planes, ...
35.92887
99
0.549668
583e5473642c271dd51ab99d0a8fe0423388e86b
3,516
py
Python
onnxmltools/convert/sklearn/shape_calculators/LinearClassifier.py
weikexin/onnxmltools
b5ea8a43bb0abf5ca23f0913dc2d9ea11b9724b1
[ "MIT" ]
null
null
null
onnxmltools/convert/sklearn/shape_calculators/LinearClassifier.py
weikexin/onnxmltools
b5ea8a43bb0abf5ca23f0913dc2d9ea11b9724b1
[ "MIT" ]
null
null
null
onnxmltools/convert/sklearn/shape_calculators/LinearClassifier.py
weikexin/onnxmltools
b5ea8a43bb0abf5ca23f0913dc2d9ea11b9724b1
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import nu...
55.809524
114
0.713026
d96fd991e3e16c561267b3912950392f1e3067ec
307
py
Python
pyecharts/charts/three_axis_charts/line3D.py
CharileWithZoe/pyecharts
dbded9a8932cc13840b7d130802176fd88a97bf8
[ "MIT" ]
11,032
2017-12-21T01:21:38.000Z
2022-03-31T23:02:38.000Z
pyecharts/charts/three_axis_charts/line3D.py
reed-hong/pyecharts
5f01f2fb43d1602a46d77234721450008cbff7eb
[ "MIT" ]
1,687
2017-12-21T02:10:47.000Z
2022-03-31T14:31:45.000Z
pyecharts/charts/three_axis_charts/line3D.py
reed-hong/pyecharts
5f01f2fb43d1602a46d77234721450008cbff7eb
[ "MIT" ]
2,528
2017-12-21T07:57:52.000Z
2022-03-30T15:34:51.000Z
from ... import types from ...charts.chart import ThreeAxisChart from ...options import InitOpts class Line3D(ThreeAxisChart): """ <<< 3D Line-Chart >>> """ def __init__(self, init_opts: types.Init = InitOpts()): super().__init__(init_opts) self._3d_chart_type = "line3D"
21.928571
59
0.644951
47437ecb2d68c8018ad981a71be07b9da3bfb4be
9,346
py
Python
etcviz/etc.py
kbsezginel/etcviz
3a10e1fbfe0e2b032e87b20a58386c412f59ff28
[ "BSD-3-Clause" ]
1
2021-11-17T15:00:14.000Z
2021-11-17T15:00:14.000Z
etcviz/etc.py
kbsezginel/etcviz
3a10e1fbfe0e2b032e87b20a58386c412f59ff28
[ "BSD-3-Clause" ]
null
null
null
etcviz/etc.py
kbsezginel/etcviz
3a10e1fbfe0e2b032e87b20a58386c412f59ff28
[ "BSD-3-Clause" ]
null
null
null
""" ETC object. """ import os import math import random import shutil import importlib from copy import deepcopy import pygame from .mode import Mode from .tools import read_csv, write_csv class ETC: def __init__(self, mode_dir, scenes=None, resolution=(1280, 720)): """ Initialize a ETC object. ...
33.862319
106
0.527391
abdf54eb125199426eab4c0378e22309b08c20b3
1,697
py
Python
src/docserver/api/auth.py
djpugh/docserver
8b272ae8fe75b4773da6111a074a141bcf4698c9
[ "MIT" ]
1
2020-12-29T09:16:51.000Z
2020-12-29T09:16:51.000Z
src/docserver/api/auth.py
djpugh/docserver
8b272ae8fe75b4773da6111a074a141bcf4698c9
[ "MIT" ]
36
2020-11-14T18:47:37.000Z
2022-03-26T15:37:25.000Z
src/docserver/api/auth.py
djpugh/docserver
8b272ae8fe75b4773da6111a074a141bcf4698c9
[ "MIT" ]
null
null
null
import logging from fastapi import APIRouter, Depends, HTTPException from docserver.api import schemas from docserver.auth.authenticator import AuthenticationState, authenticator logger = logging.getLogger(__name__) router = APIRouter() @router.get('/token/upload', response_model=schemas.TokenResponse) async def g...
39.465116
127
0.750147
730c052353b0ff24b200472679fad20a5c850fa3
3,765
py
Python
borg/test/test_models.py
borg-project/borg
5140cff6c96de365b2eba9f07b7fc606b4b16c1b
[ "MIT" ]
7
2015-03-13T06:40:19.000Z
2018-02-23T10:35:46.000Z
borg/test/test_models.py
borg-project/borg
5140cff6c96de365b2eba9f07b7fc606b4b16c1b
[ "MIT" ]
null
null
null
borg/test/test_models.py
borg-project/borg
5140cff6c96de365b2eba9f07b7fc606b4b16c1b
[ "MIT" ]
4
2015-06-17T15:51:45.000Z
2021-10-20T20:28:07.000Z
"""@author: Bryan Silverthorn <bcs@cargo-cult.org>""" import numpy import nose.tools import borg def test_sampled_pmfs_log_pmf(): """Test borg.models.sampled_pmfs_log_pmf().""" cdfs = \ numpy.log([ [[0.1, 0.9], [0.9, 0.1]], [[0.1, 0.9], [0.9, 0.1]], ]) counts =...
41.373626
117
0.58008
417ac477f7c4f3d536b1a4bd96f947e6e4b6f8d5
29,514
py
Python
assembler.py
muffinjets/LADXR
bbd82a5b7bac015561bb6a4cfe1c5fa017f827f5
[ "MIT" ]
null
null
null
assembler.py
muffinjets/LADXR
bbd82a5b7bac015561bb6a4cfe1c5fa017f827f5
[ "MIT" ]
null
null
null
assembler.py
muffinjets/LADXR
bbd82a5b7bac015561bb6a4cfe1c5fa017f827f5
[ "MIT" ]
null
null
null
import binascii import utils import re REGS8 = {"A": 7, "B": 0, "C": 1, "D": 2, "E": 3, "H": 4, "L": 5, "[HL]": 6} REGS16A = {"BC": 0, "DE": 1, "HL": 2, "SP": 3} REGS16B = {"BC": 0, "DE": 1, "HL": 2, "AF": 3} FLAGS = {"NZ": 0x00, "Z": 0x08, "NC": 0x10, "C": 0x18} CONST_MAP = {} class ExprBase: de...
36.846442
125
0.46771
bb00b89d3986d3c9f0ed00ee1bc886cf9221a8a3
36,170
py
Python
salt/modules/nilrt_ip.py
jasonarewhy/salt
4e54f213c511586c9232e961adf9afafd945f9f2
[ "Apache-2.0" ]
1
2016-08-21T21:19:12.000Z
2016-08-21T21:19:12.000Z
salt/modules/nilrt_ip.py
dubb-b/salt
20f23f5c98f600f557b3eff6e67543ae4c7a14d7
[ "Apache-2.0" ]
2
2019-03-06T20:43:44.000Z
2019-04-10T23:56:02.000Z
salt/modules/nilrt_ip.py
dubb-b/salt
20f23f5c98f600f557b3eff6e67543ae4c7a14d7
[ "Apache-2.0" ]
1
2020-04-10T20:18:40.000Z
2020-04-10T20:18:40.000Z
# -*- coding: utf-8 -*- ''' The networking module for NI Linux Real-Time distro ''' # Import python libs from __future__ import absolute_import, print_function, unicode_literals import logging import time import os import re # Import salt libs import salt.exceptions import salt.utils.files import salt.utils.validate...
34.513359
119
0.644401
c9d244aee0f51a2ff824a92d9e8c9252c5fc1944
5,400
py
Python
falcon/routing/util.py
jxub/falcon
7d6c06a9e8c8ec38a3cad2e5f29236b592e656a6
[ "Apache-2.0" ]
null
null
null
falcon/routing/util.py
jxub/falcon
7d6c06a9e8c8ec38a3cad2e5f29236b592e656a6
[ "Apache-2.0" ]
null
null
null
falcon/routing/util.py
jxub/falcon
7d6c06a9e8c8ec38a3cad2e5f29236b592e656a6
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 by Rackspace Hosting, 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 t...
34.83871
89
0.675556
c307a3782e4a075419eda1a56a2d8103b8298ae6
2,366
py
Python
rlpyt/experiments/configs/mujoco/pg/mujoco_ppo.py
DavidSlayback/rlpyt
445adbd3917842caae0cae0d06e4b2866c8f1258
[ "MIT" ]
null
null
null
rlpyt/experiments/configs/mujoco/pg/mujoco_ppo.py
DavidSlayback/rlpyt
445adbd3917842caae0cae0d06e4b2866c8f1258
[ "MIT" ]
null
null
null
rlpyt/experiments/configs/mujoco/pg/mujoco_ppo.py
DavidSlayback/rlpyt
445adbd3917842caae0cae0d06e4b2866c8f1258
[ "MIT" ]
null
null
null
import copy from rlpyt.envs.wrappers import ClipActionsWrapper, RLPYT_WRAPPER_KEY configs = dict() env_args = dict() env_args[RLPYT_WRAPPER_KEY] = [ClipActionsWrapper] config = dict( agent=dict(), algo=dict( discount=0.99, learning_rate=3e-4, clip_grad_norm=1e6, entropy_loss_co...
26
69
0.633136
1a33e4cacf6da32d0fea895ef4bf0176cbf0a4a4
8,919
py
Python
alipay/aop/api/domain/AlipayAssetCardNewtemplateCreateModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayAssetCardNewtemplateCreateModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayAssetCardNewtemplateCreateModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.CardFundInfo import CardFundInfo from alipay.aop.api.domain.CardCreditInfo import CardCreditInfo class AlipayAssetCardNewtemplateCreateModel(object): def __init...
33.404494
82
0.595134
98ef2aff1c3ec72e627dbc374f8cb026d12e7d75
2,418
py
Python
database/db_connector.py
CcEeCcIi/DatabasePortfolio
e675fb8f16cffd911cb314704c39cc94fb6b128c
[ "MIT" ]
null
null
null
database/db_connector.py
CcEeCcIi/DatabasePortfolio
e675fb8f16cffd911cb314704c39cc94fb6b128c
[ "MIT" ]
null
null
null
database/db_connector.py
CcEeCcIi/DatabasePortfolio
e675fb8f16cffd911cb314704c39cc94fb6b128c
[ "MIT" ]
null
null
null
#code from OSU Flask Tutorial import MySQLdb import os from dotenv import load_dotenv, find_dotenv # Load our environment variables from the .env file in the root of our project. load_dotenv(find_dotenv()) # Set the variables in our application with those environment variables host = os.environ.get("340DBHOST") user...
36.636364
133
0.705542
53d41189ac6415087e44fdad1fc2c8ff236032a5
6,753
py
Python
converter/extract_fea.py
shijun18/XunFei_Classifier
f1331f1ada5b897656f7b3161b000c29e70e450f
[ "MIT" ]
12
2021-07-14T13:16:07.000Z
2022-01-27T11:57:50.000Z
converter/extract_fea.py
shijun18/XunFei_Classifier
f1331f1ada5b897656f7b3161b000c29e70e450f
[ "MIT" ]
null
null
null
converter/extract_fea.py
shijun18/XunFei_Classifier
f1331f1ada5b897656f7b3161b000c29e70e450f
[ "MIT" ]
2
2021-06-30T07:51:36.000Z
2021-12-11T07:46:39.000Z
import os import numpy as np import pandas as pd import librosa import random def add_noise(wav,factor): wav_n = wav + factor*np.random.normal(0,1,len(wav)) return wav_n def time_shifting(wav,sr,factor): wav_roll = np.roll(wav,int(sr/factor)) return wav_roll def time_stretch(wav,factor): wav_stc...
40.680723
114
0.605509
dd4f9172d79c361592e2d1cee0e128e585b6b86f
4,886
py
Python
dataset/cocodataset.py
DAMONYLY/YOLOv3
fae4e9533de70d187e09b97ee8b74d06deb0f037
[ "MIT" ]
null
null
null
dataset/cocodataset.py
DAMONYLY/YOLOv3
fae4e9533de70d187e09b97ee8b74d06deb0f037
[ "MIT" ]
null
null
null
dataset/cocodataset.py
DAMONYLY/YOLOv3
fae4e9533de70d187e09b97ee8b74d06deb0f037
[ "MIT" ]
null
null
null
import os import numpy as np import torch from torch.utils.data import Dataset import cv2 from pycocotools.coco import COCO from utils.utils import * class COCODataset(Dataset): """ COCO dataset class. """ def __init__(self, model_type, data_dir='COCO', json_file='instances_train2017.json', ...
38.171875
89
0.57061
0c6fb84f0be6586966972290c73b947b4431a812
1,314
py
Python
ws-tests/config_test_study_push.py
OpenTreeOfLife/phylesystem-api
569efaed343fd3e783d57818ccba2461bf990c5a
[ "BSD-2-Clause" ]
7
2015-01-11T06:24:41.000Z
2019-10-18T00:24:21.000Z
ws-tests/config_test_study_push.py
OpenTreeOfLife/phylesystem-api
569efaed343fd3e783d57818ccba2461bf990c5a
[ "BSD-2-Clause" ]
63
2015-01-19T13:23:59.000Z
2022-02-03T13:53:14.000Z
ws-tests/config_test_study_push.py
OpenTreeOfLife/phylesystem-api
569efaed343fd3e783d57818ccba2461bf990c5a
[ "BSD-2-Clause" ]
2
2015-06-14T08:25:43.000Z
2020-12-27T09:24:53.000Z
#!/usr/bin/env python import sys, os from opentreetesting import test_http_json_method, writable_api_host_and_oauth_or_exit #This test should only pass if filesize is set very low in the config and/or max tree number is set to 0 DOMAIN, auth_token = writable_api_host_and_oauth_or_exit(__file__) study = '10' SUBMIT_URI ...
34.578947
104
0.567732
464dce3d29dc5c9c0f2044c8f3f2986e43d0f441
3,891
py
Python
ppmessage/api/handlers/pppageonlineportaluserhandler.py
augustand/ppmessage
73beac9c75f751d5026ff7defff23732c7419b43
[ "Apache-2.0" ]
6
2017-11-03T17:31:52.000Z
2020-06-14T09:14:36.000Z
ppmessage/api/handlers/pppageonlineportaluserhandler.py
augustand/ppmessage
73beac9c75f751d5026ff7defff23732c7419b43
[ "Apache-2.0" ]
null
null
null
ppmessage/api/handlers/pppageonlineportaluserhandler.py
augustand/ppmessage
73beac9c75f751d5026ff7defff23732c7419b43
[ "Apache-2.0" ]
16
2017-08-08T01:25:47.000Z
2019-09-17T16:32:06.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2010-2016 PPMessage. # Guijin Ding, dingguijin@gmail.com # # from .basehandler import BaseHandler from ppmessage.api.error import API_ERR from ppmessage.db.models import DeviceInfo from ppmessage.db.models import DeviceUser from ppmessage.core.constant import API_LEVEL imp...
31.893443
119
0.614495
77b4edf43d6f2fa41e54e5cf24c8034a7270a861
8,463
py
Python
src/gridthings/grid.py
kafonek/gridthings
adb84fb1beedc56a9ab59c7597f32234e9a1c4bc
[ "BSD-3-Clause" ]
2
2021-12-10T22:43:23.000Z
2021-12-21T13:07:00.000Z
src/gridthings/grid.py
kafonek/gridthings
adb84fb1beedc56a9ab59c7597f32234e9a1c4bc
[ "BSD-3-Clause" ]
null
null
null
src/gridthings/grid.py
kafonek/gridthings
adb84fb1beedc56a9ab59c7597f32234e9a1c4bc
[ "BSD-3-Clause" ]
null
null
null
from typing import Any, Dict, List, Optional, Tuple, Type, Union from .cell import Cell, OutOfBoundsCell from .collection import Collection # A Grid represents some tabular data, the kind of thing you might analyze in Pandas # This library is about letting you accomplish tasks that may be confusing or # difficult in ...
43.623711
102
0.602978