hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08f83064d18c0f8fcb20b8c0d07582e059f5d1a2
9,842
py
Python
a2/rides/CC_0125_0172_0242_1557_ride_share_rides.py
hritvikpatel4/RideShare
54744e1d6585915ef1d50d6bbdb28ddd9dfe48ff
[ "MIT" ]
1
2020-12-12T19:42:54.000Z
2020-12-12T19:42:54.000Z
a2/rides/CC_0125_0172_0242_1557_ride_share_rides.py
hritvikpatel4/RideShare
54744e1d6585915ef1d50d6bbdb28ddd9dfe48ff
[ "MIT" ]
null
null
null
a2/rides/CC_0125_0172_0242_1557_ride_share_rides.py
hritvikpatel4/RideShare
54744e1d6585915ef1d50d6bbdb28ddd9dfe48ff
[ "MIT" ]
null
null
null
from flask import Flask, jsonify, request, make_response import mysql.connector, csv, string, collections, datetime from mysql.connector import Error import requests ride_share = Flask(__name__) ip = "http://127.0.0.1:4000" def get_area_from_number(a): with open('AreaNameEnum.csv') as csv_file: csv_reader...
28.445087
202
0.607803
from flask import Flask, jsonify, request, make_response import mysql.connector, csv, string, collections, datetime from mysql.connector import Error import requests ride_share = Flask(__name__) ip = "http://127.0.0.1:4000" def get_area_from_number(a): with open('AreaNameEnum.csv') as csv_file: csv_reader...
true
true
08f8309d0738b603c7cde6c3828e36e891b750dc
2,754
py
Python
grr/server/grr_response_server/databases/db_message_handler_test.py
tsehori/grr
048506f22f74642bfe61749069a45ddf496fdab3
[ "Apache-2.0" ]
1
2021-07-01T01:43:06.000Z
2021-07-01T01:43:06.000Z
grr/server/grr_response_server/databases/db_message_handler_test.py
tsehori/grr
048506f22f74642bfe61749069a45ddf496fdab3
[ "Apache-2.0" ]
44
2021-05-14T22:49:24.000Z
2022-03-13T21:54:02.000Z
grr/server/grr_response_server/databases/db_message_handler_test.py
tsehori/grr
048506f22f74642bfe61749069a45ddf496fdab3
[ "Apache-2.0" ]
1
2020-06-25T14:25:54.000Z
2020-06-25T14:25:54.000Z
#!/usr/bin/env python # Lint as: python3 """Tests for the message handler database api.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import queue from grr_response_core.lib import rdfvalue from grr_response_core.lib import utils from grr_response_s...
29.934783
76
0.690632
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import queue from grr_response_core.lib import rdfvalue from grr_response_core.lib import utils from grr_response_server.rdfvalues import objects as rdf_objects class DatabaseTestHandlerMixin(object): ...
true
true
08f830dbf9f01c59f9573bab2ff8be81b318904a
860
py
Python
ooobuild/dyn/uri/uri_reference_factory.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/uri/uri_reference_factory.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/uri/uri_reference_factory.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
33.076923
86
0.762791
from ...lo.uri.uri_reference_factory import UriReferenceFactory as UriReferenceFactory __all__ = ['UriReferenceFactory']
true
true
08f830f9cfcd3257c7a06a4372fad77fe6cb6c52
1,652
py
Python
fsleyes/tests/overlays/test_overlay_rgbvector.py
pauldmccarthy/fsleyes
453a6b91ec7763c39195814d635257e3766acf83
[ "Apache-2.0" ]
12
2018-05-05T01:36:25.000Z
2021-09-23T20:44:08.000Z
fsleyes/tests/overlays/test_overlay_rgbvector.py
pauldmccarthy/fsleyes
453a6b91ec7763c39195814d635257e3766acf83
[ "Apache-2.0" ]
97
2018-05-05T02:17:23.000Z
2022-03-29T14:58:42.000Z
fsleyes/tests/overlays/test_overlay_rgbvector.py
pauldmccarthy/fsleyes
453a6b91ec7763c39195814d635257e3766acf83
[ "Apache-2.0" ]
6
2017-12-09T09:02:00.000Z
2021-03-05T18:55:13.000Z
#!/usr/bin/env python # # test_overlay_rgbvector.py - # # Author: Paul McCarthy <pauldmccarthy@gmail.com> # from unittest import mock import pytest from fsleyes.tests import run_cli_tests, asrgb, mul import fsleyes.gl.textures.data as texdata pytestmark = pytest.mark.overlayclitest cli_tests = """ dti/dti_V1 -ot...
25.030303
69
0.664044
from unittest import mock import pytest from fsleyes.tests import run_cli_tests, asrgb, mul import fsleyes.gl.textures.data as texdata pytestmark = pytest.mark.overlayclitest cli_tests = """ dti/dti_V1 -ot rgbvector dti/dti_V1 -ot rgbvector -in none dti/dti_V1 -ot rgbvector -in linear dti/dti_V1 -ot rgbvector -i...
true
true
08f8313f9a9fb86f8c26e59f646e0b103e98c418
1,967
py
Python
stuff/database_utils.py
LaloRivero/omegaup
046859ffe998e590d7a5918014ecdd39b78423aa
[ "BSD-3-Clause" ]
1
2019-09-10T23:24:54.000Z
2019-09-10T23:24:54.000Z
stuff/database_utils.py
LaloRivero/omegaup
046859ffe998e590d7a5918014ecdd39b78423aa
[ "BSD-3-Clause" ]
1
2017-04-09T03:15:43.000Z
2017-04-09T03:15:43.000Z
stuff/database_utils.py
LaloRivero/omegaup
046859ffe998e590d7a5918014ecdd39b78423aa
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- # type: ignore '''Library of utilities to work with MySQL.''' import os import shlex import subprocess import tempfile _MYSQL_BINARY = '/usr/bin/mysql' _MYSQLDUMP_BINARY = '/usr/bin/mysqldump' def quote(s): '''Escapes the string |s| so it can be safely used in a she...
29.358209
78
0.634469
import os import shlex import subprocess import tempfile _MYSQL_BINARY = '/usr/bin/mysql' _MYSQLDUMP_BINARY = '/usr/bin/mysqldump' def quote(s): if 'quote' in dir(shlex): return shlex.quote(s) import pipes return pipes.quote(s) def default_config_file(): return os.path.join(...
true
true
08f831482264eeda87c2c27f5216f0485ca3c28d
1,613
py
Python
scapy_funcs/scapy_list_protocol.py
SecTraversl/Toolbox_Python_3.8
0ad1d92d3a12225ea60e4eef3f263aecfffd1b65
[ "MIT" ]
null
null
null
scapy_funcs/scapy_list_protocol.py
SecTraversl/Toolbox_Python_3.8
0ad1d92d3a12225ea60e4eef3f263aecfffd1b65
[ "MIT" ]
null
null
null
scapy_funcs/scapy_list_protocol.py
SecTraversl/Toolbox_Python_3.8
0ad1d92d3a12225ea60e4eef3f263aecfffd1b65
[ "MIT" ]
null
null
null
# %% ####################################### def scapy_list_protocol(proto=(Ether, Dot1Q, ARP, IP, ICMP, TCP, UDP, Raw)[0]): """Lists field information for a given protocol. Examples: >>> ##### EXAMPLE 1 ##### >>> scapy_list_protocol() Displaying field info for protocol: <class 'scapy.layers.l2.Ether'>...
43.594595
165
0.522629
def scapy_list_protocol(proto=(Ether, Dot1Q, ARP, IP, ICMP, TCP, UDP, Raw)[0]): print(f"Displaying field info for protocol: {proto}") print('') ls(proto)
true
true
08f83183df942f4472aee6f5f6136d2901700548
102,047
py
Python
chia/full_node/full_node.py
sevenstarsandokan/chia-blockchain
3037b61df7fbb9e01beb40393134ad6150125d22
[ "Apache-2.0" ]
3
2021-06-16T05:12:13.000Z
2021-08-14T01:26:54.000Z
chia/full_node/full_node.py
sevenstarsandokan/chia-blockchain
3037b61df7fbb9e01beb40393134ad6150125d22
[ "Apache-2.0" ]
null
null
null
chia/full_node/full_node.py
sevenstarsandokan/chia-blockchain
3037b61df7fbb9e01beb40393134ad6150125d22
[ "Apache-2.0" ]
null
null
null
import asyncio import dataclasses import logging import random import time import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union import aiosqlite from blspy import AugSchemeMPL import chia.server.ws_connection as ws # lgtm [py/import-and-import-from] from...
50.023039
120
0.624624
import asyncio import dataclasses import logging import random import time import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union import aiosqlite from blspy import AugSchemeMPL import chia.server.ws_connection as ws from chia.consensus.block_creation impo...
true
true
08f8318a44e8811052d938d9fd6558d38a76d3ab
1,746
py
Python
virtualspaces/account/views.py
warplydesigned/virualspaces_backend_dj
47e22dc112da13b5f4dd1f4bd43852b710a57fdf
[ "MIT" ]
null
null
null
virtualspaces/account/views.py
warplydesigned/virualspaces_backend_dj
47e22dc112da13b5f4dd1f4bd43852b710a57fdf
[ "MIT" ]
6
2018-11-10T22:05:48.000Z
2018-12-11T05:39:09.000Z
virtualspaces/account/views.py
warplydesigned/virualspaces_backend_dj
47e22dc112da13b5f4dd1f4bd43852b710a57fdf
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import uuid from rest_framework import views, permissions, status from rest_framework.response import Response from djoser.views import UserView as DjoserUserView, UserDeleteView as DjoserUserDeleteView from djoser import serializers from .models impor...
31.178571
91
0.745132
from __future__ import unicode_literals import uuid from rest_framework import views, permissions, status from rest_framework.response import Response from djoser.views import UserView as DjoserUserView, UserDeleteView as DjoserUserDeleteView from djoser import serializers from .models import CustomUser from .seria...
true
true
08f833363964fc2ff5baf465d5dbea0dbca743ba
1,239
py
Python
packages/PIPS/pips/src/Passes/pyps/workspace_intr.py
DVSR1966/par4all
86b33ca9da736e832b568c5637a2381f360f1996
[ "MIT" ]
51
2015-01-31T01:51:39.000Z
2022-02-18T02:01:50.000Z
packages/PIPS/pips/src/Passes/pyps/workspace_intr.py
DVSR1966/par4all
86b33ca9da736e832b568c5637a2381f360f1996
[ "MIT" ]
7
2017-05-29T09:29:00.000Z
2019-03-11T16:01:39.000Z
packages/PIPS/pips/src/Passes/pyps/workspace_intr.py
DVSR1966/par4all
86b33ca9da736e832b568c5637a2381f360f1996
[ "MIT" ]
12
2015-03-26T08:05:38.000Z
2022-02-18T02:01:51.000Z
from __future__ import with_statement # to cope with python2.5 import pyps import os import sys cfile= r"""#ifndef PYPS_INTRINSICS_H #define PYPS_INTRINSICS_H #ifndef MOD # define MOD(a, b) ((a) % (b)) #endif #ifndef MIN # define MIN(a, b) ( (a) < (b) ? (a) : (b) ) #endif #ifndef MAX # define MAX(a, b) ( (a) > (b) ...
26.361702
93
0.658596
from __future__ import with_statement import pyps import os import sys cfile= r"""#ifndef PYPS_INTRINSICS_H #define PYPS_INTRINSICS_H #ifndef MOD # define MOD(a, b) ((a) % (b)) #endif #ifndef MIN # define MIN(a, b) ( (a) < (b) ? (a) : (b) ) #endif #ifndef MAX # define MAX(a, b) ( (a) > (b) ? (a) : (b) ) #endif #if...
true
true
08f8339036c2afdd014922591bcaf60fcae9b01f
40,793
py
Python
examples/pytorch/question-answering/run_qa_no_trainer.py
elusenji/transformers
af14c61973effd8b8077ac61b3f24bdd4a632f25
[ "Apache-2.0" ]
null
null
null
examples/pytorch/question-answering/run_qa_no_trainer.py
elusenji/transformers
af14c61973effd8b8077ac61b3f24bdd4a632f25
[ "Apache-2.0" ]
null
null
null
examples/pytorch/question-answering/run_qa_no_trainer.py
elusenji/transformers
af14c61973effd8b8077ac61b3f24bdd4a632f25
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 # Copyright 2021 The HuggingFace Inc. 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/LI...
45.477146
127
0.673939
import argparse import logging import math import os import random from pathlib import Path import datasets import numpy as np import torch from datasets import load_dataset, load_metric from torch.utils.data import DataLoader from tqdm.auto import tqdm import transformers from accelerate import Accelerator from hug...
true
true
08f8340a4d384778dbf0fbb98b5adac0b45aa020
5,362
py
Python
pygsuite/slides/slide.py
gitter-badger/pygsuite
536766c36f653edbc7585141f1c3327f508e19da
[ "MIT" ]
null
null
null
pygsuite/slides/slide.py
gitter-badger/pygsuite
536766c36f653edbc7585141f1c3327f508e19da
[ "MIT" ]
null
null
null
pygsuite/slides/slide.py
gitter-badger/pygsuite
536766c36f653edbc7585141f1c3327f508e19da
[ "MIT" ]
null
null
null
from dataclasses import dataclass from typing import List, Union from jinja2 import Template, Environment, meta from .page_element import PageElement, Table, Shape, Image, Line from pygsuite.slides.element_properties import ElementProperties from pygsuite.slides.enums import ShapeType from pygsuite.utility.guids impo...
33.098765
98
0.531705
from dataclasses import dataclass from typing import List, Union from jinja2 import Template, Environment, meta from .page_element import PageElement, Table, Shape, Image, Line from pygsuite.slides.element_properties import ElementProperties from pygsuite.slides.enums import ShapeType from pygsuite.utility.guids impo...
true
true
08f835133c9fbc1cc20790e066682016f808ef37
647
py
Python
resolwe_bio/kb/serializers.py
HudoGriz/resolwe-bio
4f7363cfa7d9d5a43f1a70ef36c69be3faed7fea
[ "Apache-2.0" ]
null
null
null
resolwe_bio/kb/serializers.py
HudoGriz/resolwe-bio
4f7363cfa7d9d5a43f1a70ef36c69be3faed7fea
[ "Apache-2.0" ]
null
null
null
resolwe_bio/kb/serializers.py
HudoGriz/resolwe-bio
4f7363cfa7d9d5a43f1a70ef36c69be3faed7fea
[ "Apache-2.0" ]
null
null
null
""".. Ignore pydocstyle D400. =========== Serializers =========== """ from rest_framework import serializers from resolwe.rest.serializers import SelectiveFieldMixin from .models import Feature, Mapping class FeatureSerializer(SelectiveFieldMixin, serializers.ModelSerializer): """Serializer for feature.""" ...
19.606061
74
0.672334
from rest_framework import serializers from resolwe.rest.serializers import SelectiveFieldMixin from .models import Feature, Mapping class FeatureSerializer(SelectiveFieldMixin, serializers.ModelSerializer): class Meta: model = Feature fields = '__all__' class MappingSerializer(SelectiveFiel...
true
true
08f8351dcf2beff8fd7db19d6773e81637adb76d
12,745
py
Python
src/CTK_trunk/CTK/Config.py
helix84/activae
0e40bd71577f829b597bbf0931bbeb2c581ac410
[ "BSD-3-Clause" ]
null
null
null
src/CTK_trunk/CTK/Config.py
helix84/activae
0e40bd71577f829b597bbf0931bbeb2c581ac410
[ "BSD-3-Clause" ]
null
null
null
src/CTK_trunk/CTK/Config.py
helix84/activae
0e40bd71577f829b597bbf0931bbeb2c581ac410
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2010 CENATIC: Centro Nacional de Referencia de # Aplicacion de las TIC basadas en Fuentes Abiertas, Spain. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # Redistribution...
27.949561
79
0.528207
import copy import types class ConfigNode (object): def __init__ (self): self._val = None self._child = {} def _get_value (self): return self._val def _set_value (self, val): self._val = val value = property (_get_value, _set_value) def get_val (self, k...
false
true
08f835ae8435123400182375ec31e386de20bfbe
45,316
py
Python
sunpy/database/database.py
lokeshkeelisetti/sunpy
0d271e9b2e596c873d7b5dfc8a9a94578121ae65
[ "BSD-2-Clause" ]
null
null
null
sunpy/database/database.py
lokeshkeelisetti/sunpy
0d271e9b2e596c873d7b5dfc8a9a94578121ae65
[ "BSD-2-Clause" ]
null
null
null
sunpy/database/database.py
lokeshkeelisetti/sunpy
0d271e9b2e596c873d7b5dfc8a9a94578121ae65
[ "BSD-2-Clause" ]
null
null
null
# Author: Simon Liedtke <liedtke.simon@googlemail.com> # # This module was developed with funding provided by # the Google Summer of Code (2013). import os.path import operator import itertools from datetime import datetime from contextlib import contextmanager from sqlalchemy import create_engine, exists from sqlalc...
39.405217
101
0.622098
import os.path import operator import itertools from datetime import datetime from contextlib import contextmanager from sqlalchemy import create_engine, exists from sqlalchemy.orm import scoped_session, sessionmaker from astropy import units import sunpy from sunpy.database import commands, tables from sunpy.datab...
true
true
08f8365cff1dfe2fb212f87c26b3cd0298f07595
319
py
Python
django/api/models/__init__.py
amichard/cthub
8f96b18e923348e9d0110bead3fb7464cc745e22
[ "Apache-2.0" ]
null
null
null
django/api/models/__init__.py
amichard/cthub
8f96b18e923348e9d0110bead3fb7464cc745e22
[ "Apache-2.0" ]
null
null
null
django/api/models/__init__.py
amichard/cthub
8f96b18e923348e9d0110bead3fb7464cc745e22
[ "Apache-2.0" ]
null
null
null
from . import credit_class from . import icbc_registration_data from . import icbc_upload_date from . import icbc_vehicle from . import model_year from . import organization from . import vehicle from . import vehicle_class from . import vehicle_zev_type from . import vin_decoded_information from . import ldv_rebates
26.583333
37
0.827586
from . import credit_class from . import icbc_registration_data from . import icbc_upload_date from . import icbc_vehicle from . import model_year from . import organization from . import vehicle from . import vehicle_class from . import vehicle_zev_type from . import vin_decoded_information from . import ldv_rebates
true
true
08f83767aa5ca33e7aa6b76bf3bb1fad27d407ad
2,196
py
Python
hwtLib/cesnet/mi32/sliding_window.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
null
null
null
hwtLib/cesnet/mi32/sliding_window.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
null
null
null
hwtLib/cesnet/mi32/sliding_window.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from hwt.code import connect, If from hwt.interfaces.utils import addClkRstn from hwt.math import isPow2 from hwt.synthesizer.param import Param from hwtLib.abstract.busBridge import BusBridge from hwtLib.cesnet.mi32.intf import Mi32 class Mi32SlidingWindow(BusBridge): ...
31.826087
88
0.63388
from hwt.code import connect, If from hwt.interfaces.utils import addClkRstn from hwt.math import isPow2 from hwt.synthesizer.param import Param from hwtLib.abstract.busBridge import BusBridge from hwtLib.cesnet.mi32.intf import Mi32 class Mi32SlidingWindow(BusBridge): def _config(self): Mi32._config(se...
true
true
08f83a07109a48da964bd8436804a3f28b166fd5
61
py
Python
graph/unit_test/__init__.py
ahmed-shariff/lighttrack
28ff1aea5273ead4013d0c733ca15328d7563245
[ "MIT" ]
47
2019-07-17T12:48:59.000Z
2022-01-30T20:58:46.000Z
graph/unit_test/__init__.py
ahmed-shariff/lighttrack
28ff1aea5273ead4013d0c733ca15328d7563245
[ "MIT" ]
15
2020-09-25T20:59:32.000Z
2022-02-13T02:13:40.000Z
pose_track/openpose_track/sgcn/graph/unit_test/__init__.py
lxy5513/cvToolBox
51586c8016b47f5e7852032f9f3211c89d80f537
[ "MIT" ]
16
2019-07-25T08:11:35.000Z
2021-06-03T10:37:02.000Z
import sys, os sys.path.append(os.path.abspath("../utils/"))
20.333333
45
0.688525
import sys, os sys.path.append(os.path.abspath("../utils/"))
true
true
08f83a8518fb8b2017d43636658793caf7bc1d71
841
py
Python
setup.py
userdel/pydng
e1bea44e1581029772ef26f7e59b8f8e1093dc3c
[ "MIT" ]
1
2021-05-04T11:29:22.000Z
2021-05-04T11:29:22.000Z
setup.py
userdel/pydng
e1bea44e1581029772ef26f7e59b8f8e1093dc3c
[ "MIT" ]
4
2020-03-24T16:24:48.000Z
2021-06-01T23:04:11.000Z
setup.py
irlrobot/pydng
e1bea44e1581029772ef26f7e59b8f8e1093dc3c
[ "MIT" ]
null
null
null
import re import setuptools with open("README.md", "r") as fh: long_description = fh.read() VERSION = re.search( r'^__version__\s*=\s*"(.*)"', open('pydng/__init__.py').read(), re.M ).group(1) setuptools.setup( name="pydng", version=VERSION, author="Josh Campbell", author_email="josh@...
26.28125
79
0.646849
import re import setuptools with open("README.md", "r") as fh: long_description = fh.read() VERSION = re.search( r'^__version__\s*=\s*"(.*)"', open('pydng/__init__.py').read(), re.M ).group(1) setuptools.setup( name="pydng", version=VERSION, author="Josh Campbell", author_email="josh@...
true
true
08f83b6a84ffb41ee0a82622ee71cafafdcd4c17
11,896
py
Python
machine_read_scripts/reachJSONextraction.py
sanyabt/napdi-kg
fa2f1ac0da13fceb88fd99a5832e0be5c57f88a1
[ "BSD-3-Clause" ]
3
2021-12-22T09:41:11.000Z
2022-01-24T18:51:54.000Z
machine_read_scripts/reachJSONextraction.py
sanyabt/napdi-kg
fa2f1ac0da13fceb88fd99a5832e0be5c57f88a1
[ "BSD-3-Clause" ]
null
null
null
machine_read_scripts/reachJSONextraction.py
sanyabt/napdi-kg
fa2f1ac0da13fceb88fd99a5832e0be5c57f88a1
[ "BSD-3-Clause" ]
null
null
null
import os, sys from indra.statements import stmts_from_json_file, stmts_to_json_file import pandas as pd from indra.ontology.bio import bio_ontology import indra.tools.assemble_corpus as ac import re import pickle import requests from datetime import datetime, timedelta import time from indra.sources import reach #####...
36.158055
166
0.702757
import os, sys from indra.statements import stmts_from_json_file, stmts_to_json_file import pandas as pd from indra.ontology.bio import bio_ontology import indra.tools.assemble_corpus as ac import re import pickle import requests from datetime import datetime, timedelta import time from indra.sources import reach pred...
true
true
08f83c26d833817ff1d798d9ef3b97afaf59e711
2,503
py
Python
hash_table.py
matt185/FlaskAPI
a7af5d89137f1d4045c7fa8c2a3eba397a83e594
[ "MIT" ]
null
null
null
hash_table.py
matt185/FlaskAPI
a7af5d89137f1d4045c7fa8c2a3eba397a83e594
[ "MIT" ]
null
null
null
hash_table.py
matt185/FlaskAPI
a7af5d89137f1d4045c7fa8c2a3eba397a83e594
[ "MIT" ]
null
null
null
class Node: def __init__(self, data=None, next_node=None): self.data = data self.next_node = next_node class Data: def __init__(self, key, value): self.key = key self.value = value class HashTable: def __init__(self, table_size): self.table_size = table_size ...
29.447059
87
0.497004
class Node: def __init__(self, data=None, next_node=None): self.data = data self.next_node = next_node class Data: def __init__(self, key, value): self.key = key self.value = value class HashTable: def __init__(self, table_size): self.table_size = table_size ...
true
true
08f83d3860ba98c6eacba519d62749cb03988cef
21,065
py
Python
tests/test_dictools_file_handler.py
jolnanis/motus
e608827f6e16ff88d2e231d9ce3fea4767969424
[ "MIT" ]
null
null
null
tests/test_dictools_file_handler.py
jolnanis/motus
e608827f6e16ff88d2e231d9ce3fea4767969424
[ "MIT" ]
null
null
null
tests/test_dictools_file_handler.py
jolnanis/motus
e608827f6e16ff88d2e231d9ce3fea4767969424
[ "MIT" ]
null
null
null
import io import os import unittest from unittest import mock import tempfile from motus import dictools from motus.dictools import FileHandler, Reader, Writer DIC = 'motus.dictools.Dic' FILE_HANDLER = 'motus.dictools.FileHandler' READER = 'motus.dictools.Reader' WRITER = 'motus.dictools.Writer' class DictoolsTest...
28.54336
74
0.584999
import io import os import unittest from unittest import mock import tempfile from motus import dictools from motus.dictools import FileHandler, Reader, Writer DIC = 'motus.dictools.Dic' FILE_HANDLER = 'motus.dictools.FileHandler' READER = 'motus.dictools.Reader' WRITER = 'motus.dictools.Writer' class DictoolsTest...
true
true
08f83d84d41782df5e0bf5c5ad713b1b160e76ce
3,050
py
Python
inferelator_0_5_0/counts_velocity_calculated.py
asistradition/inferelator_run_scripts
5f122e8f4ff565f8ccf1b3224bc1408839969097
[ "MIT" ]
1
2020-04-20T14:53:10.000Z
2020-04-20T14:53:10.000Z
inferelator_0_5_0/counts_velocity_calculated.py
asistradition/inferelator_run_scripts
5f122e8f4ff565f8ccf1b3224bc1408839969097
[ "MIT" ]
null
null
null
inferelator_0_5_0/counts_velocity_calculated.py
asistradition/inferelator_run_scripts
5f122e8f4ff565f8ccf1b3224bc1408839969097
[ "MIT" ]
null
null
null
from inferelator import crossvalidation_workflow from inferelator import utils from inferelator.distributed.inferelator_mp import MPControl from inferelator.preprocessing import single_cell from inferelator.workflow import inferelator_workflow from inferelator.velocity_workflow import VelocityWorkflow import os utils....
41.216216
110
0.779672
from inferelator import crossvalidation_workflow from inferelator import utils from inferelator.distributed.inferelator_mp import MPControl from inferelator.preprocessing import single_cell from inferelator.workflow import inferelator_workflow from inferelator.velocity_workflow import VelocityWorkflow import os utils....
true
true
08f83ebdfb812cf8396b1f4b9867b456ded57dc1
73,871
py
Python
sphinx/ext/autodoc/__init__.py
dfremont/sphinx
aad103885f971273b7b97386bd8ab483195ada30
[ "BSD-2-Clause" ]
null
null
null
sphinx/ext/autodoc/__init__.py
dfremont/sphinx
aad103885f971273b7b97386bd8ab483195ada30
[ "BSD-2-Clause" ]
null
null
null
sphinx/ext/autodoc/__init__.py
dfremont/sphinx
aad103885f971273b7b97386bd8ab483195ada30
[ "BSD-2-Clause" ]
null
null
null
""" sphinx.ext.autodoc ~~~~~~~~~~~~~~~~~~ Automatically insert docstrings for functions, classes or whole modules into the doctree, thus avoiding duplication between docstrings and documentation for those who like elaborate docstrings. :copyright: Copyright 2007-2020 by the Sphinx team, see AU...
41.039444
95
0.596811
import importlib import re import warnings from inspect import Parameter from types import ModuleType from typing import Any, Callable, Dict, Iterator, List, Sequence, Set, Tuple, Type, Union from docutils.statemachine import StringList import sphinx from sphinx.application import Sphinx from sphinx.config import Co...
true
true
08f83ef5aeec5503a269bec9b50f90b36871d2cb
2,518
py
Python
nalp/models/layers/gumbel_softmax.py
gugarosa/feelyng
95a427049b9b82b0f5bc2ad200443ae7fc85eb6c
[ "MIT" ]
1
2018-10-01T20:15:31.000Z
2018-10-01T20:15:31.000Z
nalp/models/layers/gumbel_softmax.py
gugarosa/feelyng
95a427049b9b82b0f5bc2ad200443ae7fc85eb6c
[ "MIT" ]
null
null
null
nalp/models/layers/gumbel_softmax.py
gugarosa/feelyng
95a427049b9b82b0f5bc2ad200443ae7fc85eb6c
[ "MIT" ]
1
2018-10-01T20:15:37.000Z
2018-10-01T20:15:37.000Z
"""Gumbel-Softmax layer. """ from typing import Any, Dict, Optional, Tuple import tensorflow as tf from tensorflow.keras.layers import Layer import nalp.utils.constants as c def gumbel_distribution(input_shape: Tuple[int, ...]) -> tf.Tensor: """Samples a tensor from a Gumbel distribution. Args: in...
27.67033
91
0.640588
from typing import Any, Dict, Optional, Tuple import tensorflow as tf from tensorflow.keras.layers import Layer import nalp.utils.constants as c def gumbel_distribution(input_shape: Tuple[int, ...]) -> tf.Tensor: uniform_dist = tf.random.uniform(input_shape, 0, 1) gumbel_dist = -1 * tf.math.log( ...
true
true
08f83f0a14969c210b4cfe9922d55c2bd3cbc5f1
280
py
Python
locuspocus/Exceptions.py
jonahcullen/LocusPocus
26e59f6483f15858ad1cacb51a55a58cdcffcd78
[ "MIT" ]
null
null
null
locuspocus/Exceptions.py
jonahcullen/LocusPocus
26e59f6483f15858ad1cacb51a55a58cdcffcd78
[ "MIT" ]
null
null
null
locuspocus/Exceptions.py
jonahcullen/LocusPocus
26e59f6483f15858ad1cacb51a55a58cdcffcd78
[ "MIT" ]
null
null
null
# Exception abstract class class ZeroWindowError(Exception): # pragma: no cover def __init__(self,expr,message,*args): self.expr = expr self.message = ( 'Operation requiring window, but window is 0:' + \ message.format(args) )
28
62
0.607143
class ZeroWindowError(Exception): def __init__(self,expr,message,*args): self.expr = expr self.message = ( 'Operation requiring window, but window is 0:' + \ message.format(args) )
true
true
08f83f7ebe338a1e1060b3bd9af4836e7a16fee6
3,242
py
Python
app_config.py
nprapps/changinglives
892d718cc8547ddececf9b95ce016390830d8fc4
[ "DOC", "Unlicense" ]
null
null
null
app_config.py
nprapps/changinglives
892d718cc8547ddececf9b95ce016390830d8fc4
[ "DOC", "Unlicense" ]
null
null
null
app_config.py
nprapps/changinglives
892d718cc8547ddececf9b95ce016390830d8fc4
[ "DOC", "Unlicense" ]
1
2021-02-18T11:25:15.000Z
2021-02-18T11:25:15.000Z
#!/usr/bin/env python """ Project-wide application configuration. DO NOT STORE SECRETS, PASSWORDS, ETC. IN THIS FILE. They will be exposed to users. Use environment variables instead. """ import os PROJECT_NAME = 'She Works: Her Money' PROJECT_SLUG = 'changing-lives' REPOSITORY_NAME = 'changinglives' CONFIG_NAME = ...
27.016667
137
0.686305
import os PROJECT_NAME = 'She Works: Her Money' PROJECT_SLUG = 'changing-lives' REPOSITORY_NAME = 'changinglives' CONFIG_NAME = PROJECT_SLUG.replace('-', '').upper() PROJECT_CREDITS = 'Jeremy Bowers, Danny DeBelius, Kitty Eisele, Christopher Groskopf, Alyson Hurt and Selena Simmons-Duffin / NPR' PROJECT_SHORTLINK =...
true
true
08f84158f09f3bf91020fd01fb15ec323fad830a
1,506
py
Python
run/events-storage/main.py
cumason123/python-docs-samples
b523300fb6ca43fdad4834f54fac5b3a6a859bd1
[ "Apache-2.0" ]
null
null
null
run/events-storage/main.py
cumason123/python-docs-samples
b523300fb6ca43fdad4834f54fac5b3a6a859bd1
[ "Apache-2.0" ]
null
null
null
run/events-storage/main.py
cumason123/python-docs-samples
b523300fb6ca43fdad4834f54fac5b3a6a859bd1
[ "Apache-2.0" ]
1
2022-03-13T15:10:30.000Z
2022-03-13T15:10:30.000Z
# Copyright 2020 Google, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.042553
79
0.699203
import os from flask import Flask, request required_fields = ['Ce-Id', 'Ce-Source', 'Ce-Type', 'Ce-Specversion'] app = Flask(__name__) @app.route('/', methods=['POST']) def index(): for field in required_fields: if field not in request.headers: errmsg = f'Bad Request: missing required heade...
true
true
08f84350e64724d9b16211f77a9a9b4f84abb439
695
py
Python
lzproduction/utils/collections.py
alexanderrichards/LZProduction
de5b70ec195a9cd573da9d59807ff959358a5e37
[ "MIT" ]
2
2017-04-28T10:16:06.000Z
2018-06-25T06:54:58.000Z
lzproduction/utils/collections.py
alexanderrichards/LZProduction
de5b70ec195a9cd573da9d59807ff959358a5e37
[ "MIT" ]
106
2016-10-07T16:29:33.000Z
2021-03-22T09:13:24.000Z
lzproduction/utils/collections.py
alexanderrichards/LZProduction
de5b70ec195a9cd573da9d59807ff959358a5e37
[ "MIT" ]
1
2017-04-27T15:34:12.000Z
2017-04-27T15:34:12.000Z
"""Utilities for working with collection types.""" def list_splitter(sequence, nentries): """Split sequence into groups.""" # iterable must be of type Sequence for i in xrange(0, len(sequence), nentries): yield sequence[i:i + nentries] def subdict(dct, seq, **kwargs): """Return a sub dict. o...
36.578947
81
0.677698
def list_splitter(sequence, nentries): for i in xrange(0, len(sequence), nentries): yield sequence[i:i + nentries] def subdict(dct, seq, **kwargs): # also works natively with seq being an iterator, no tuple initialisation return dict({key: dct[key] for key in seq if key in dct},...
true
true
08f843cc954c65d0e5be324f2391e8f5f5dd5575
9,714
py
Python
fixture/contact.py
Shelkovica/python_training
c870008b251e8eae8f3ff2e451a15771a9d5f7ff
[ "Apache-2.0" ]
null
null
null
fixture/contact.py
Shelkovica/python_training
c870008b251e8eae8f3ff2e451a15771a9d5f7ff
[ "Apache-2.0" ]
null
null
null
fixture/contact.py
Shelkovica/python_training
c870008b251e8eae8f3ff2e451a15771a9d5f7ff
[ "Apache-2.0" ]
null
null
null
from selenium.webdriver.support.ui import Select from model.contact import Contact from random import randrange import re class ContactHelper: def __init__(self,app, local_url): self.app = app self.local_url = local_url def return_to_home_page(self): wd = self.app.wd if not (...
41.690987
165
0.66049
from selenium.webdriver.support.ui import Select from model.contact import Contact from random import randrange import re class ContactHelper: def __init__(self,app, local_url): self.app = app self.local_url = local_url def return_to_home_page(self): wd = self.app.wd if not (...
true
true
08f843e2e171309f9c504f24746b1073145d23f0
5,961
py
Python
scripts/coordinate_import.py
xqt/pwb
9a4fe27138f32952e533256195849d05855df0b0
[ "MIT" ]
1
2022-02-10T00:20:42.000Z
2022-02-10T00:20:42.000Z
scripts/coordinate_import.py
euku/spbot
e6d505c8965b4e6730b3dc4505f92e35a3edb2e2
[ "MIT" ]
1
2021-12-08T16:29:41.000Z
2021-12-08T16:29:41.000Z
scripts/coordinate_import.py
euku/spbot
e6d505c8965b4e6730b3dc4505f92e35a3edb2e2
[ "MIT" ]
2
2022-01-04T04:10:38.000Z
2022-01-04T04:18:18.000Z
#!/usr/bin/python3 r""" Coordinate importing script. Usage: python pwb.py coordinate_import -site:wikipedia:en \ -cat:Category:Coordinates_not_on_Wikidata This will work on all pages in the category "coordinates not on Wikidata" and will import the coordinates on these pages to Wikidata. The data from t...
31.539683
77
0.64922
from typing import Optional import pywikibot from pywikibot import pagegenerators from pywikibot.bot import ConfigParserBot, WikidataBot from pywikibot.exceptions import CoordinateGlobeUnknownError docuReplacements = {'&params;': pagegenerators.parameterHelp} class CoordImportRobot(ConfigParserBot, WikidataBot): ...
true
true
08f84450d14c0383800fe5cf14f1e9feb765855b
570
py
Python
setup.py
AfonsoV/easyGalaxy
f7b5dd7160c11be473e7811ffdf53de2fd777d8b
[ "MIT" ]
14
2017-10-05T14:16:30.000Z
2020-11-19T07:07:35.000Z
setup.py
clannadxu/easyGalaxy
0608b17d84d00c2bdc069ebfb83024bf8d15e309
[ "MIT" ]
4
2017-10-26T09:29:05.000Z
2019-04-02T15:40:32.000Z
setup.py
clannadxu/easyGalaxy
0608b17d84d00c2bdc069ebfb83024bf8d15e309
[ "MIT" ]
8
2018-01-15T07:36:42.000Z
2021-08-24T07:46:50.000Z
from distutils.core import setup setup( name='ezgal', packages=['ezgal'], package_dir={'ezgal': 'ezgal'}, package_data={'ezgal': ['data/refs/*', 'data/models/*', 'data/filters/*']}, version='2.0', description='A tool for calculating observables of stellar populations from a grid of SED vs age.',...
38
103
0.659649
from distutils.core import setup setup( name='ezgal', packages=['ezgal'], package_dir={'ezgal': 'ezgal'}, package_data={'ezgal': ['data/refs/*', 'data/models/*', 'data/filters/*']}, version='2.0', description='A tool for calculating observables of stellar populations from a grid of SED vs age.',...
true
true
08f8450b82645cec083ca53c5fa5864169e1121f
8,337
py
Python
test/functional/feature_proxy.py
polymathdanny/sato
3613c99e8a4c70acd4e8803eeb0aef91c0fc21d9
[ "MIT" ]
null
null
null
test/functional/feature_proxy.py
polymathdanny/sato
3613c99e8a4c70acd4e8803eeb0aef91c0fc21d9
[ "MIT" ]
null
null
null
test/functional/feature_proxy.py
polymathdanny/sato
3613c99e8a4c70acd4e8803eeb0aef91c0fc21d9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Copyright (c) 2017-2020 The Sato Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test satod with different proxy configuration. Te...
41.477612
119
0.626964
import socket import os from test_framework.socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType from test_framework.test_framework import SatoTestFramework from test_framework.util import PORT_MIN, PORT_RANGE, assert_equal from test_framework.netutil import test_ipv6_local RANGE_BEGIN = PORT_...
true
true
08f8457d0be64cb2e0e763657342b5b02d16fcd3
964
py
Python
spay/baseapp/views.py
ietuday/django-stripe-integration
16ab009fd5a40c0ce857b4e6a2c0be564cf633bb
[ "MIT" ]
null
null
null
spay/baseapp/views.py
ietuday/django-stripe-integration
16ab009fd5a40c0ce857b4e6a2c0be564cf633bb
[ "MIT" ]
null
null
null
spay/baseapp/views.py
ietuday/django-stripe-integration
16ab009fd5a40c0ce857b4e6a2c0be564cf633bb
[ "MIT" ]
null
null
null
from django.shortcuts import render,redirect from django.urls import reverse import stripe # Create your views here. stripe.api_key = 'XXXXXXXXXXXXXXXXXXXXXXXXXX' def home(request): context = {} return render(request,'template.html',context) def charge(request): if request.method == 'POST': a...
22.952381
53
0.635892
from django.shortcuts import render,redirect from django.urls import reverse import stripe stripe.api_key = 'XXXXXXXXXXXXXXXXXXXXXXXXXX' def home(request): context = {} return render(request,'template.html',context) def charge(request): if request.method == 'POST': amount = request.POST['amou...
true
true
08f84664259564497f80be680b2afddd62c3d3d9
2,726
py
Python
tools/tickLogger/utils.py
sjev/ib_trader
3ddcca78a5ff3650e5676c3f2c30ecb57fae82ae
[ "BSD-2-Clause" ]
1
2019-07-24T03:15:24.000Z
2019-07-24T03:15:24.000Z
tools/tickLogger/utils.py
sjev/ib_trader
3ddcca78a5ff3650e5676c3f2c30ecb57fae82ae
[ "BSD-2-Clause" ]
null
null
null
tools/tickLogger/utils.py
sjev/ib_trader
3ddcca78a5ff3650e5676c3f2c30ecb57fae82ae
[ "BSD-2-Clause" ]
2
2019-07-24T03:15:27.000Z
2019-10-20T20:15:02.000Z
# -*- coding: utf-8 -*- """ utilities for tick logger @author: Jev Kuznetsov """ import logging import os import time import datetime as dt def configLogging(logFile, fileLevel= logging.INFO, consoleLevel = logging.INFO): """ configure logging to console and file """ fmt_file = "%(asctime)s...
26.211538
82
0.542553
import logging import os import time import datetime as dt def configLogging(logFile, fileLevel= logging.INFO, consoleLevel = logging.INFO): fmt_file = "%(asctime)s %(levelname)s [%(name)s-%(funcName)s] - %(message)s" fmt_console ="%(asctime)s %(levelname)s [%(name)s] - %(message)s" ...
true
true
08f846b575210b811a2886a730cb69dd70194640
28,580
py
Python
examples/run_glue.py
Tarpelite/UniNLP
176c2a0f88c8054bf69e1f92693d353737367c34
[ "MIT" ]
null
null
null
examples/run_glue.py
Tarpelite/UniNLP
176c2a0f88c8054bf69e1f92693d353737367c34
[ "MIT" ]
3
2021-06-02T00:41:41.000Z
2022-02-10T01:07:59.000Z
examples/run_glue.py
Tarpelite/UniNLP
176c2a0f88c8054bf69e1f92693d353737367c34
[ "MIT" ]
1
2020-01-27T03:02:19.000Z
2020-01-27T03:02:19.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, 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...
54.334601
159
0.623023
from __future__ import absolute_import, division, print_function import argparse import glob import logging import os import random import numpy as np import torch from torch.utils.data import (DataLoader, RandomSampler, SequentialSampler, TensorDataset) from torch.utils.da...
true
true
08f84704b8a4fb98734aeb2d262509b2e32070b7
429
py
Python
xplrmain/migrations/0003_userpost_username.py
APNovichkov/xplrio
a1cb04c726f16dfb888f53198400a51d16417de7
[ "MIT" ]
null
null
null
xplrmain/migrations/0003_userpost_username.py
APNovichkov/xplrio
a1cb04c726f16dfb888f53198400a51d16417de7
[ "MIT" ]
12
2019-12-09T21:10:58.000Z
2022-01-13T01:55:56.000Z
xplrmain/migrations/0003_userpost_username.py
APNovichkov/xplrio
a1cb04c726f16dfb888f53198400a51d16417de7
[ "MIT" ]
1
2020-11-16T15:01:15.000Z
2020-11-16T15:01:15.000Z
# Generated by Django 2.2.7 on 2019-12-05 18:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('xplrmain', '0002_auto_20191204_0913'), ] operations = [ migrations.AddField( model_name='userpost', name='username',...
22.578947
90
0.620047
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('xplrmain', '0002_auto_20191204_0913'), ] operations = [ migrations.AddField( model_name='userpost', name='username', field=models.CharField(default='def...
true
true
08f847186e4d71264f8595cf63179adbe2590176
2,923
py
Python
Bridge/Mesh.py
BlenderNPR/BEER
656aa816ab99b1df84acb17adc7a6322fb41ac24
[ "MIT" ]
242
2018-05-22T07:41:30.000Z
2021-01-05T03:33:22.000Z
Bridge/Mesh.py
BlenderNPR/BEER
656aa816ab99b1df84acb17adc7a6322fb41ac24
[ "MIT" ]
38
2020-06-10T11:56:20.000Z
2021-01-05T22:34:09.000Z
Bridge/Mesh.py
BlenderNPR/BEER
656aa816ab99b1df84acb17adc7a6322fb41ac24
[ "MIT" ]
16
2020-06-11T02:20:19.000Z
2021-01-05T08:00:55.000Z
# Copyright (c) 2020 BlenderNPR and contributors. MIT license. import logging as log from Malt.GL import Mesh from Malt.GL.GL import * MESHES = {} def load_mesh(msg): name = msg['name'] data = msg['data'] MESHES[name] = [] def load_VBO(data): VBO = gl_buffer(GL_INT, 1) glGenBuffers(...
34.797619
115
0.606226
import logging as log from Malt.GL import Mesh from Malt.GL.GL import * MESHES = {} def load_mesh(msg): name = msg['name'] data = msg['data'] MESHES[name] = [] def load_VBO(data): VBO = gl_buffer(GL_INT, 1) glGenBuffers(1, VBO) glBindBuffer(GL_ARRAY_BUFFER, VBO[0]) gl...
true
true
08f847636470ac7caf3ac42b829fd666616c5016
17,774
py
Python
bioagents/tests/dtda_test.py
kkaris/bioagents
353570ca88dc70c2851222cbd5604be782147f82
[ "BSD-2-Clause" ]
6
2016-10-29T13:53:11.000Z
2021-07-07T12:28:40.000Z
bioagents/tests/dtda_test.py
kkaris/bioagents
353570ca88dc70c2851222cbd5604be782147f82
[ "BSD-2-Clause" ]
66
2016-06-23T16:29:02.000Z
2021-11-03T18:09:34.000Z
bioagents/tests/dtda_test.py
kkaris/bioagents
353570ca88dc70c2851222cbd5604be782147f82
[ "BSD-2-Clause" ]
15
2016-03-18T20:46:22.000Z
2020-08-27T09:39:43.000Z
import xml.etree.ElementTree as ET from indra.statements import Agent from kqml import KQMLList, KQMLString from bioagents.dtda.dtda import DTDA, get_disease, cbio_efo_map from bioagents.dtda.dtda_module import DTDA_Module from bioagents.tests.util import ekb_from_text, get_request, agent_clj_from_text from bioagents.t...
32.375228
80
0.661247
import xml.etree.ElementTree as ET from indra.statements import Agent from kqml import KQMLList, KQMLString from bioagents.dtda.dtda import DTDA, get_disease, cbio_efo_map from bioagents.dtda.dtda_module import DTDA_Module from bioagents.tests.util import ekb_from_text, get_request, agent_clj_from_text from bioagents.t...
true
true
08f84793476c4c250b9a66c0cafe25586a029928
28,592
py
Python
lib/services/cdn/ncloud_cdn/model/global_cdn_rule.py
KidongSohn/ncloud-sdk-py
1c62471a9bd320d77164ed3193a0ebb9f64229ff
[ "MIT" ]
null
null
null
lib/services/cdn/ncloud_cdn/model/global_cdn_rule.py
KidongSohn/ncloud-sdk-py
1c62471a9bd320d77164ed3193a0ebb9f64229ff
[ "MIT" ]
null
null
null
lib/services/cdn/ncloud_cdn/model/global_cdn_rule.py
KidongSohn/ncloud-sdk-py
1c62471a9bd320d77164ed3193a0ebb9f64229ff
[ "MIT" ]
null
null
null
# coding: utf-8 """ cdn OpenAPI spec version: 2018-06-21T02:27:10Z Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class GlobalCdnRule(object): """NOTE: This class is auto generated by the swagger code generator program. ...
35.168512
805
0.682639
import pprint import re import six class GlobalCdnRule(object): swagger_types = { 'protocol_type_code': 'str', 'service_domain_type_code': 'str', 'origin_url': 'str', 'origin_path': 'str', 'origin_http_port': 'int', 'origin_https_port': 'int', 'forward...
true
true
08f84865d66be1c07fcc6054c734c00179f2bdec
3,613
py
Python
share/lib/python/neuron/rxdtests/tests/wave1d/wave1d_125_1.py
myneuronews/neuron
ac9ca9940071524a534465b52bcab734290f8e27
[ "BSD-3-Clause" ]
null
null
null
share/lib/python/neuron/rxdtests/tests/wave1d/wave1d_125_1.py
myneuronews/neuron
ac9ca9940071524a534465b52bcab734290f8e27
[ "BSD-3-Clause" ]
null
null
null
share/lib/python/neuron/rxdtests/tests/wave1d/wave1d_125_1.py
myneuronews/neuron
ac9ca9940071524a534465b52bcab734290f8e27
[ "BSD-3-Clause" ]
null
null
null
from neuron import h, rxd, gui import numpy import sys import time npar = len(sys.argv) #if(npar<2): # print "usage: python wave1d.py <nseg> <nsubseg>" # sys.exit(0) #rxd.options.nsubseg =int(sys.argv[2]) rxd.options.subseg_interpolation = 0 rxd.options.subseg_averaging = 0 sec = h.Section() sec.L = 100 sec...
23.461039
148
0.674232
from neuron import h, rxd, gui import numpy import sys import time npar = len(sys.argv) rxd.options.subseg_interpolation = 0 rxd.options.subseg_averaging = 0 sec = h.Section() sec.L = 100 sec.diam = 1 sec.nseg = 125 sec.Ra = 150 Rm = 25370 dend= sec for myseg in dend: myseg.v = -64 for myseg in dend: myseg.cm ...
true
true
08f848a18bb051d225bff05012601c325985b340
3,452
py
Python
mars/tensor/expressions/reduction/nancumsum.py
lmatz/mars
45f9166b54eb91b21e66cef8b590a41aa8ac9569
[ "Apache-2.0" ]
1
2018-12-26T08:37:04.000Z
2018-12-26T08:37:04.000Z
mars/tensor/expressions/reduction/nancumsum.py
lmatz/mars
45f9166b54eb91b21e66cef8b590a41aa8ac9569
[ "Apache-2.0" ]
null
null
null
mars/tensor/expressions/reduction/nancumsum.py
lmatz/mars
45f9166b54eb91b21e66cef8b590a41aa8ac9569
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2018 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
34.52
81
0.650637
import numpy as np from .... import operands from ..datasource import tensor as astensor from ..arithmetic.add import TensorTreeAdd from .core import TensorCumReduction class TensorNanCumsum(operands.NanCumsum, TensorCumReduction): def __init__(self, axis=None, dtype=None, **kw): super(TensorNanCumsum, ...
true
true
08f849320267e322cad7eeb9fa326528844ff079
14,789
py
Python
clif/python/func_test.py
timgates42/clif
b865c88beff70b31068889926d1184d5ddc0b9eb
[ "Apache-2.0" ]
null
null
null
clif/python/func_test.py
timgates42/clif
b865c88beff70b31068889926d1184d5ddc0b9eb
[ "Apache-2.0" ]
null
null
null
clif/python/func_test.py
timgates42/clif
b865c88beff70b31068889926d1184d5ddc0b9eb
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
25.900175
97
0.481777
from __future__ import absolute_import from __future__ import division from __future__ import print_function import textwrap import unittest from google.protobuf import text_format from clif.protos import ast_pb2 from clif.python import pyext class FuncTest(unittest.TestCase): def setUp(self): super(FuncTes...
true
true
08f849aed9338d2630802046affa6300a265a895
13,314
py
Python
certbot/certbot/_internal/plugins/selection.py
tyrm/certbot
08839758bd80015377e8aaf61361f1c091d4c98f
[ "Apache-2.0" ]
1
2017-05-14T17:09:38.000Z
2017-05-14T17:09:38.000Z
certbot/certbot/_internal/plugins/selection.py
tyrm/certbot
08839758bd80015377e8aaf61361f1c091d4c98f
[ "Apache-2.0" ]
5
2021-03-15T21:43:04.000Z
2021-07-22T20:31:43.000Z
certbot/certbot/_internal/plugins/selection.py
bmw/letsencrypt
fa237907a3e62a3b58993a4ae77fc377bac62468
[ "Apache-2.0" ]
null
null
null
"""Decide which plugins to use for authentication & installation""" import logging from typing import Optional from typing import Tuple from certbot import errors from certbot import interfaces from certbot._internal.plugins import disco from certbot.compat import os from certbot.display import util as display_util ...
40.223565
100
0.664639
import logging from typing import Optional from typing import Tuple from certbot import errors from certbot import interfaces from certbot._internal.plugins import disco from certbot.compat import os from certbot.display import util as display_util logger = logging.getLogger(__name__) def pick_configurator( ...
true
true
08f849cab4d35f93826d892b1a66530ab32f3d74
1,875
py
Python
tests/test_value_object.py
billyrrr/onto
72733d36a2583ae4758f7cf33a5229b79773702b
[ "MIT" ]
1
2020-10-04T10:01:45.000Z
2020-10-04T10:01:45.000Z
tests/test_value_object.py
billyrrr/onto
72733d36a2583ae4758f7cf33a5229b79773702b
[ "MIT" ]
null
null
null
tests/test_value_object.py
billyrrr/onto
72733d36a2583ae4758f7cf33a5229b79773702b
[ "MIT" ]
null
null
null
import pytest def test_unwrap(): # NEEDS: pip install phonenumbers # Otherwise, this test is skipped. import phonenumbers from onto.models.base import Serializable class PhoneNumber(Serializable): class Meta: unwrap = 'formatted_number' from onto.attrs import attrs...
31.779661
93
0.613867
import pytest def test_unwrap(): import phonenumbers from onto.models.base import Serializable class PhoneNumber(Serializable): class Meta: unwrap = 'formatted_number' from onto.attrs import attrs formatted_number = attrs.string.optional number_obje...
true
true
08f84a7d593d24f46c4647ace9fee38f442e38c4
30,782
py
Python
LAD-AMA-Common/metrics_ext_utils/metrics_ext_handler.py
shridpant/azure-linux-extensions
4b5e66f33d5b93b15b427a9438931f0414f12a6e
[ "Apache-2.0" ]
null
null
null
LAD-AMA-Common/metrics_ext_utils/metrics_ext_handler.py
shridpant/azure-linux-extensions
4b5e66f33d5b93b15b427a9438931f0414f12a6e
[ "Apache-2.0" ]
null
null
null
LAD-AMA-Common/metrics_ext_utils/metrics_ext_handler.py
shridpant/azure-linux-extensions
4b5e66f33d5b93b15b427a9438931f0414f12a6e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Azure Linux extension # # Copyright (c) Microsoft Corporation # All rights reserved. # 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 Software without restrictio...
43.911555
246
0.690241
import platform import sys if sys.version_info[0] < 3: from future import standard_library standard_library.install_aliases() from builtins import str import urllib.request, urllib.error, urllib.parse import json import os from shutil import copyfile, rmtree import stat import filecmp import metrics_e...
true
true
08f84ae563ce253fba6db1de24b5cfa2a06e1ad8
1,004
py
Python
examples/color/csscolor.py
Granitosaurus/generativepy
668d79be6127e97762425987fd8fda43d20e73ce
[ "MIT" ]
null
null
null
examples/color/csscolor.py
Granitosaurus/generativepy
668d79be6127e97762425987fd8fda43d20e73ce
[ "MIT" ]
null
null
null
examples/color/csscolor.py
Granitosaurus/generativepy
668d79be6127e97762425987fd8fda43d20e73ce
[ "MIT" ]
null
null
null
from generativepy.drawing import makeImage from generativepy.color import Color def draw(ctx, width, height, frame_no, frame_count): ctx.set_source_rgba(*Color(1).get_rgba()) ctx.paint() ctx.set_source_rgba(*Color('salmon').get_rgba()) ctx.rectangle(50, 50, 100, 100) ctx.fill() ctx.set_sourc...
25.74359
57
0.662351
from generativepy.drawing import makeImage from generativepy.color import Color def draw(ctx, width, height, frame_no, frame_count): ctx.set_source_rgba(*Color(1).get_rgba()) ctx.paint() ctx.set_source_rgba(*Color('salmon').get_rgba()) ctx.rectangle(50, 50, 100, 100) ctx.fill() ctx.set_sourc...
true
true
08f84b823550acc435807f894bce77bb5033a0a3
44,534
py
Python
ExtentionPackages/pysnmp/smi/mibs/SNMPv2-SMI.py
hongsofwing/PyQYT-master
9a112d9adbf9885a8b7535b7ef7759b60a0f9a29
[ "CNRI-Python" ]
null
null
null
ExtentionPackages/pysnmp/smi/mibs/SNMPv2-SMI.py
hongsofwing/PyQYT-master
9a112d9adbf9885a8b7535b7ef7759b60a0f9a29
[ "CNRI-Python" ]
null
null
null
ExtentionPackages/pysnmp/smi/mibs/SNMPv2-SMI.py
hongsofwing/PyQYT-master
9a112d9adbf9885a8b7535b7ef7759b60a0f9a29
[ "CNRI-Python" ]
null
null
null
# # This file is part of pysnmp software. # # Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net> # License: http://pysnmp.sf.net/license.html # import sys import traceback from pysnmp.smi.indices import OidOrderedDict from pysnmp.smi import exval, error from pysnmp.proto import rfc1902 from pysnmp import cache, debu...
35.741573
209
0.599901
import sys import traceback from pysnmp.smi.indices import OidOrderedDict from pysnmp.smi import exval, error from pysnmp.proto import rfc1902 from pysnmp import cache, debug from pyasn1.error import PyAsn1Error Integer, ObjectIdentifier = mibBuilder.importSymbols( "ASN1", "Integer", "ObjectIdentifier" ) (Constra...
true
true
08f84c394bb4b0c9e2f4043410e9902520202f51
340
py
Python
src/scripts/util/manipular_json.py
BiggerThanOurselves/anonymousCents
82911fdaacdad2a5b642da3640115f8c8318b10c
[ "MIT" ]
14
2020-09-29T16:09:00.000Z
2021-11-12T12:25:22.000Z
src/scripts/util/manipular_json.py
BiggerThanOurselves/anonymousCents
82911fdaacdad2a5b642da3640115f8c8318b10c
[ "MIT" ]
null
null
null
src/scripts/util/manipular_json.py
BiggerThanOurselves/anonymousCents
82911fdaacdad2a5b642da3640115f8c8318b10c
[ "MIT" ]
null
null
null
import json def abre_json(caminho): arquivo_json = open(caminho, 'r') dict_dados_json = json.load(arquivo_json) arquivo_json.close() return dict_dados_json def grava_json(caminho, conteudo): arquivo_json = open(caminho, 'w') json.dump(conteudo, arquivo_json) arquivo_json.close() return...
24.285714
45
0.720588
import json def abre_json(caminho): arquivo_json = open(caminho, 'r') dict_dados_json = json.load(arquivo_json) arquivo_json.close() return dict_dados_json def grava_json(caminho, conteudo): arquivo_json = open(caminho, 'w') json.dump(conteudo, arquivo_json) arquivo_json.close() return...
true
true
08f84dead2ec9a34aa101a8e803a516467e6db2d
417
py
Python
alphabacktest/cli.py
serginc21/alphabacktest
dfa7f8cd70ddf74b5a5bbfc79a72e7d6ae6b22d4
[ "MIT" ]
11
2021-02-03T15:14:36.000Z
2022-03-18T04:01:20.000Z
alphabacktest/cli.py
serginc21/alphabacktest
dfa7f8cd70ddf74b5a5bbfc79a72e7d6ae6b22d4
[ "MIT" ]
null
null
null
alphabacktest/cli.py
serginc21/alphabacktest
dfa7f8cd70ddf74b5a5bbfc79a72e7d6ae6b22d4
[ "MIT" ]
2
2021-07-19T19:56:25.000Z
2021-12-05T02:43:52.000Z
"""Console script for alphabacktest.""" import sys import click @click.command() def main(args=None): """Console script for alphabacktest.""" click.echo("Replace this message by putting your code into " "alphabacktest.cli.main") click.echo("See click documentation at https://click.palletspr...
24.529412
79
0.676259
import sys import click @click.command() def main(args=None): click.echo("Replace this message by putting your code into " "alphabacktest.cli.main") click.echo("See click documentation at https://click.palletsprojects.com/") return 0 if __name__ == "__main__": sys.exit(main())
true
true
08f84dfe336b511b6e18c649f98c058c30f33d4d
7,133
py
Python
aia_helpers.py
dstansby/solarsynoptic
e8f2a4d58d8beb3fd5e8d85f6294148653e79e50
[ "BSD-2-Clause" ]
2
2020-07-27T15:19:16.000Z
2021-04-27T09:44:28.000Z
aia_helpers.py
dstansby/solarsynoptic
e8f2a4d58d8beb3fd5e8d85f6294148653e79e50
[ "BSD-2-Clause" ]
2
2022-01-10T17:33:00.000Z
2022-01-17T19:50:07.000Z
aia_helpers.py
dstansby/solarsynoptic
e8f2a4d58d8beb3fd5e8d85f6294148653e79e50
[ "BSD-2-Clause" ]
null
null
null
from datetime import datetime, timedelta import pathlib import shutil import urllib.request import urllib.error from astropy.coordinates import SkyCoord, Longitude from astropy.time import Time import astropy.units as u from astropy.wcs import WCS from reproject import reproject_interp import numpy as np import matpl...
30.224576
78
0.646993
from datetime import datetime, timedelta import pathlib import shutil import urllib.request import urllib.error from astropy.coordinates import SkyCoord, Longitude from astropy.time import Time import astropy.units as u from astropy.wcs import WCS from reproject import reproject_interp import numpy as np import matpl...
true
true
08f84e3b1085b05601e3f9c4239e9fb4d60bd5bd
7,297
py
Python
python/opencv/opencv_2/image_processing/hough_circle_transform_using_color_extraction.py
jeremiedecock/snippets
4bd4e7f459eee610d5cf19f845299ca942ff4b64
[ "MIT" ]
23
2015-06-08T13:01:00.000Z
2021-12-30T08:20:04.000Z
python/opencv/opencv_2/image_processing/hough_circle_transform_using_color_extraction.py
jeremiedecock/snippets
4bd4e7f459eee610d5cf19f845299ca942ff4b64
[ "MIT" ]
1
2020-10-22T02:36:10.000Z
2020-10-22T02:36:10.000Z
python/opencv/opencv_2/image_processing/hough_circle_transform_using_color_extraction.py
jeremiedecock/snippets
4bd4e7f459eee610d5cf19f845299ca942ff4b64
[ "MIT" ]
7
2017-10-31T09:48:14.000Z
2022-01-04T15:59:45.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ OpenCV - Extract one color. Required: opencv library (Debian: aptitude install python-opencv) See: https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgproc/py_houghcircles/py_houghcirc...
41.697143
168
0.651089
from __future__ import print_function import cv2 as cv import numpy as np import argparse LOWER_COLOR_H = 105 LOWER_COLOR_S = 135 LOWER_COLOR_V = 68 UPPER_COLOR_H = 120 UPPER_COLOR_S = 220 UPPER_COLOR_V = 180 HCT_ACCUMULATOR_RESOLUTION = 1.2 HCT_CANNY_EDGE_THRESHOLD = 50 HCT_ACCUMULATOR_THRES...
true
true
08f84e8a6434f1f215c104d60b73032bc9228a5d
1,654
py
Python
hw_asr/collate_fn/collate.py
qwerty-Bk/dla_hw1
305c71a4bb55c192bd0b6cbdd7dbb11b4731ab22
[ "MIT" ]
null
null
null
hw_asr/collate_fn/collate.py
qwerty-Bk/dla_hw1
305c71a4bb55c192bd0b6cbdd7dbb11b4731ab22
[ "MIT" ]
null
null
null
hw_asr/collate_fn/collate.py
qwerty-Bk/dla_hw1
305c71a4bb55c192bd0b6cbdd7dbb11b4731ab22
[ "MIT" ]
null
null
null
import logging import numpy as np import torch from typing import List from speechbrain.utils.data_utils import pad_right_to logger = logging.getLogger(__name__) def collate_fn(dataset_items: List[dict]): """ Collate and pad fields in dataset items """ result_batch = {} # TODO: your code here ...
33.755102
93
0.5526
import logging import numpy as np import torch from typing import List from speechbrain.utils.data_utils import pad_right_to logger = logging.getLogger(__name__) def collate_fn(dataset_items: List[dict]): result_batch = {} tensor_keys = ('audio', 'spectrogram', 'text_encoded') max_tens ...
true
true
08f84f2fe367b20fd5d1fe7dc8bd02c7826b18f5
2,758
py
Python
tests/ut/python/pynative_mode/nn/test_batchnorm.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
7
2020-05-24T03:19:26.000Z
2020-05-24T03:20:00.000Z
tests/ut/python/pynative_mode/nn/test_batchnorm.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
null
null
null
tests/ut/python/pynative_mode/nn/test_batchnorm.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
33.634146
85
0.647933
import numpy as np import pytest import mindspore.nn as nn from mindspore import Tensor, Parameter def test_bn_pars_valid1(): with pytest.raises(ValueError): nn.BatchNorm2d(num_features=0) def test_bn_pars_valid2(): with pytest.raises(ValueError): nn.BatchNorm2d(num_features=3, momentum=-0....
true
true
08f85099f76a70b5fefaf3f4339438efb0ff2c3f
4,211
py
Python
scrapli_netconf/transport/plugins/asyncssh/transport.py
scrapli/scrapli_netconf
820beba46ed4039b31bf7ac9073b325904429320
[ "MIT" ]
61
2020-05-17T19:57:25.000Z
2022-03-30T01:10:32.000Z
scrapli_netconf/transport/plugins/asyncssh/transport.py
scrapli/scrapli_netconf
820beba46ed4039b31bf7ac9073b325904429320
[ "MIT" ]
79
2020-05-17T20:22:05.000Z
2022-03-02T14:37:28.000Z
scrapli_netconf/transport/plugins/asyncssh/transport.py
scrapli/scrapli_netconf
820beba46ed4039b31bf7ac9073b325904429320
[ "MIT" ]
6
2021-01-07T16:45:28.000Z
2022-02-11T19:31:49.000Z
"""scrapli_netconf.transport.plugins.asyncssh.transport""" import asyncio from asyncssh import connect from asyncssh.connection import SSHClientConnection from asyncssh.misc import ChannelOpenError, PermissionDenied from scrapli.exceptions import ScrapliAuthenticationFailed, ScrapliConnectionNotOpened from scrapli.tr...
41.284314
100
0.627404
import asyncio from asyncssh import connect from asyncssh.connection import SSHClientConnection from asyncssh.misc import ChannelOpenError, PermissionDenied from scrapli.exceptions import ScrapliAuthenticationFailed, ScrapliConnectionNotOpened from scrapli.transport.plugins.asyncssh.transport import AsyncsshTransport...
true
true
08f85152afdd5e718e55bbc19d5f776ec175888b
299
py
Python
src/networks/__init__.py
bjfranks/Classification-AD
4eecd6648bb6b54662944921924c8960c2ca236c
[ "MIT" ]
27
2020-05-30T16:27:31.000Z
2022-03-28T16:45:25.000Z
src/networks/__init__.py
bjfranks/Classification-AD
4eecd6648bb6b54662944921924c8960c2ca236c
[ "MIT" ]
3
2021-04-22T10:01:55.000Z
2022-01-13T02:50:31.000Z
src/networks/__init__.py
bjfranks/Classification-AD
4eecd6648bb6b54662944921924c8960c2ca236c
[ "MIT" ]
7
2020-06-15T16:31:23.000Z
2022-03-23T09:33:32.000Z
from .main import build_network from .toy_Net import Toy_Net from .mnist_LeNet import MNIST_LeNet from .cifar10_LeNet import CIFAR10_LeNet from .cbam import CBAM from .imagenet_WideResNet import ImageNet_WideResNet from .classifier_Net import ClassifierNet from .modules.focal_loss import FocalLoss
33.222222
52
0.862876
from .main import build_network from .toy_Net import Toy_Net from .mnist_LeNet import MNIST_LeNet from .cifar10_LeNet import CIFAR10_LeNet from .cbam import CBAM from .imagenet_WideResNet import ImageNet_WideResNet from .classifier_Net import ClassifierNet from .modules.focal_loss import FocalLoss
true
true
08f851d75c3330a55a674be198a9ac1a4aa8b824
1,540
py
Python
sag_customization/sagolsem_customization/report/simple_item_wise_sales_register/simple_item_wise_sales_register.py
sunhoww/sag_customization
3d18a1198bb62f49b830a6b60a44ad56a006e6cf
[ "MIT" ]
null
null
null
sag_customization/sagolsem_customization/report/simple_item_wise_sales_register/simple_item_wise_sales_register.py
sunhoww/sag_customization
3d18a1198bb62f49b830a6b60a44ad56a006e6cf
[ "MIT" ]
5
2018-07-28T06:45:28.000Z
2018-08-16T15:43:27.000Z
sag_customization/sagolsem_customization/report/simple_item_wise_sales_register/simple_item_wise_sales_register.py
sunhoww/sag_customization
3d18a1198bb62f49b830a6b60a44ad56a006e6cf
[ "MIT" ]
1
2020-02-27T10:22:20.000Z
2020-02-27T10:22:20.000Z
# Copyright (c) 2018, Libermatic and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ def execute(filters={}): columns = [ _('Posting Date') + ':Date:80', _('Item Code') + ':Link/Item:100', _('Item Gr...
32.083333
75
0.563636
from __future__ import unicode_literals import frappe from frappe import _ def execute(filters={}): columns = [ _('Posting Date') + ':Date:80', _('Item Code') + ':Link/Item:100', _('Item Group') + ':Link/Item Group:100', _('More Description') + '::150', _('Amount') + ':Cur...
true
true
08f852cb8f0f70f96996b33ac831d2713b1d7635
6,519
py
Python
src/moca_modules/moca_memory/MocaMemoryController.py
el-ideal-ideas/MocaTwitterUtils
544a260600ade1b8cd4e0a2d2967c2fb6a8f38d3
[ "MIT" ]
null
null
null
src/moca_modules/moca_memory/MocaMemoryController.py
el-ideal-ideas/MocaTwitterUtils
544a260600ade1b8cd4e0a2d2967c2fb6a8f38d3
[ "MIT" ]
null
null
null
src/moca_modules/moca_memory/MocaMemoryController.py
el-ideal-ideas/MocaTwitterUtils
544a260600ade1b8cd4e0a2d2967c2fb6a8f38d3
[ "MIT" ]
null
null
null
# -- Imports -------------------------------------------------------------------------- from typing import ( List, Union, Any, Dict ) from pathlib import Path from time import sleep from gc import collect from threading import Thread from ..moca_utils import moca_dump as dump, moca_load as load # ----------------...
35.429348
113
0.508667
from typing import ( List, Union, Any, Dict ) from pathlib import Path from time import sleep from gc import collect from threading import Thread from ..moca_utils import moca_dump as dump, moca_load as load class MocaMemoryController: def __init__( self, cache_dir: Union[Path, str...
true
true
08f8534b3876463ff357cc227894fc58e88f7186
11,023
py
Python
geotrek/signage/tests/test_views.py
billux/Geotrek-admin
cdc2749bb391b46a55d3870802d93f8a96db3740
[ "BSD-2-Clause" ]
null
null
null
geotrek/signage/tests/test_views.py
billux/Geotrek-admin
cdc2749bb391b46a55d3870802d93f8a96db3740
[ "BSD-2-Clause" ]
null
null
null
geotrek/signage/tests/test_views.py
billux/Geotrek-admin
cdc2749bb391b46a55d3870802d93f8a96db3740
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from collections import OrderedDict from django.conf import settings from django.contrib.auth.models import Permission from django.test import TestCase from geotrek.common.tests import CommonTest from geotrek.authent.tests import AuthentFixturesTest from geotrek.authent.factories import PathMa...
39.938406
119
0.642112
from collections import OrderedDict from django.conf import settings from django.contrib.auth.models import Permission from django.test import TestCase from geotrek.common.tests import CommonTest from geotrek.authent.tests import AuthentFixturesTest from geotrek.authent.factories import PathManagerFactory, StructureF...
true
true
08f853e58596d83ada5f991c13d0cda77725df18
5,148
py
Python
threeML/plugins/UnresolvedExtendedXYLike.py
cescalara/threeML
4ac90d91159f5469d3ea90456901f46ba4a2d533
[ "BSD-3-Clause" ]
1
2021-01-26T14:21:26.000Z
2021-01-26T14:21:26.000Z
threeML/plugins/UnresolvedExtendedXYLike.py
kabartay/threeML
83e33b7cc05fb0d2588d802439c44e3ceda0cb2d
[ "BSD-3-Clause" ]
null
null
null
threeML/plugins/UnresolvedExtendedXYLike.py
kabartay/threeML
83e33b7cc05fb0d2588d802439c44e3ceda0cb2d
[ "BSD-3-Clause" ]
null
null
null
import copy import matplotlib.pyplot as plt import numpy as np import pandas as pd from astromodels import Model, PointSource from threeML.classicMLE.goodness_of_fit import GoodnessOfFit from threeML.classicMLE.joint_likelihood import JointLikelihood from threeML.data_list import DataList from threeML.exceptions.cust...
30.826347
106
0.606838
import copy import matplotlib.pyplot as plt import numpy as np import pandas as pd from astromodels import Model, PointSource from threeML.classicMLE.goodness_of_fit import GoodnessOfFit from threeML.classicMLE.joint_likelihood import JointLikelihood from threeML.data_list import DataList from threeML.exceptions.cust...
true
true
08f854f43681d1f694bb48604773256be7ce927b
1,519
py
Python
src/python/lib/setup.py
liangyuRain/mesos
0f9448497ddb259063911811ab3ce5784747ca2d
[ "Apache-2.0" ]
2
2019-04-07T08:39:48.000Z
2020-04-22T13:07:34.000Z
src/python/lib/setup.py
liangyuRain/mesos
0f9448497ddb259063911811ab3ce5784747ca2d
[ "Apache-2.0" ]
1
2022-01-17T12:25:46.000Z
2022-01-17T12:25:46.000Z
src/python/lib/setup.py
liangyuRain/mesos
0f9448497ddb259063911811ab3ce5784747ca2d
[ "Apache-2.0" ]
1
2021-08-18T09:26:06.000Z
2021-08-18T09:26:06.000Z
# 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"); you may not u...
30.38
74
0.735352
from setuptools import find_packages, setup from mesos import __version__ def read_requirements(filename="requirements.in"): with open(filename) as f: return f.readlines() setup( author='Apache Mesos', author_email='dev@mesos.apache.org', description='Client library for Mesos http rest ap...
true
true
08f85534a62dc221561b623781adcb11b2de5e19
1,056
py
Python
rqalpha/examples/technical_analysis/golden_cross.py
jandykwan/rqalpha
1ed12adb5337ad81cb0c662a45ff4c787b4f3313
[ "Apache-2.0" ]
44
2017-06-17T09:43:17.000Z
2022-03-02T11:08:03.000Z
rqalpha/examples/technical_analysis/golden_cross.py
hadrianl/rqalpha_kairui
eb0e0de1d69f1a4d6f349d4dc011e1c9eccfe2d8
[ "Apache-2.0" ]
2
2018-07-31T08:42:11.000Z
2019-05-07T10:25:52.000Z
rqalpha/examples/technical_analysis/golden_cross.py
hadrianl/rqalpha_kairui
eb0e0de1d69f1a4d6f349d4dc011e1c9eccfe2d8
[ "Apache-2.0" ]
28
2017-06-26T10:06:29.000Z
2021-12-17T04:26:04.000Z
# Run `rqalpha mod enable sys_funcat` first. from rqalpha.api import * # 在这个方法中编写任何的初始化逻辑。context对象将会在你的算法策略的任何方法之间做传递。 def init(context): context.s1 = "000001.XSHE" # 当前关注股票为 context.s1 # S 为 set_current_stock 的简写。等价于 set_current_stock(context.s1) S(context.s1) # 设置这个策略当中会用到的参数,在策略中可以随时调用,这个策略使用...
28.540541
83
0.72822
from rqalpha.api import * def init(context): context.s1 = "000001.XSHE" S(context.s1) context.SHORTPERIOD = 20 context.LONGPERIOD = 120 def handle_bar(context, bar_dict): short_ma = MA(C, context.SHORTPERIOD) long_ma = MA(C, context.LONGPERIOD) plot("short ma", short_ma.val...
true
true
08f8559fd8b7eabe60f85d7d080d75296efda13e
1,223
py
Python
bempp/api/utils/timing.py
ignacia-fp/bempp-cl
a65232558826e51e624b1a4f649b6a0ed5a7f551
[ "MIT" ]
70
2019-09-04T15:15:05.000Z
2022-03-22T16:54:40.000Z
bempp/api/utils/timing.py
ignacia-fp/bempp-cl
a65232558826e51e624b1a4f649b6a0ed5a7f551
[ "MIT" ]
66
2020-01-16T08:31:00.000Z
2022-03-25T11:18:59.000Z
bempp/api/utils/timing.py
ignacia-fp/bempp-cl
a65232558826e51e624b1a4f649b6a0ed5a7f551
[ "MIT" ]
22
2019-09-30T08:50:33.000Z
2022-03-20T19:37:22.000Z
"""Timing functions.""" import time as _time def timeit(message): """Time a method in Bempp.""" def timeit_impl(fun): """Return an implementation of timeit.""" def timed_fun(*args, **kwargs): """Time something.""" from bempp.api import GLOBAL_PARAMETERS ...
24.46
71
0.53148
import time as _time def timeit(message): def timeit_impl(fun): def timed_fun(*args, **kwargs): from bempp.api import GLOBAL_PARAMETERS from bempp.api import log if not GLOBAL_PARAMETERS.verbosity.extended_verbosity: return fun(*args, **...
true
true
08f85603ce37664797200ab54fade6370d9f1ae6
4,496
py
Python
taichi-experiment/sdf_renderer.py
andy971022/acg-project
e42b0f9010f5f9fc2c7eb4b9b306ae6321ddfd51
[ "MIT" ]
null
null
null
taichi-experiment/sdf_renderer.py
andy971022/acg-project
e42b0f9010f5f9fc2c7eb4b9b306ae6321ddfd51
[ "MIT" ]
null
null
null
taichi-experiment/sdf_renderer.py
andy971022/acg-project
e42b0f9010f5f9fc2c7eb4b9b306ae6321ddfd51
[ "MIT" ]
null
null
null
import math import time import numpy as np import taichi as ti ti.init(arch=ti.gpu) res = 1280, 720 color_buffer = ti.Vector.field(3, dtype=ti.f32, shape=res) max_ray_depth = 6 eps = 1e-4 inf = 1e10 fov = 0.23 dist_limit = 100 camera_pos = ti.Vector([0.0, 0.32, 3.7]) light_pos = [-1.5, 0.6, 0.3] light_normal = [1....
27.248485
79
0.499333
import math import time import numpy as np import taichi as ti ti.init(arch=ti.gpu) res = 1280, 720 color_buffer = ti.Vector.field(3, dtype=ti.f32, shape=res) max_ray_depth = 6 eps = 1e-4 inf = 1e10 fov = 0.23 dist_limit = 100 camera_pos = ti.Vector([0.0, 0.32, 3.7]) light_pos = [-1.5, 0.6, 0.3] light_normal = [1....
true
true
08f856b4fc24389ac49fd04db971558616d8470f
1,536
py
Python
backuphunter/__main__.py
NeuronAddict/backup-hunter
8be2c2b4d03f75fdc79c953568223493648a55a9
[ "Apache-2.0" ]
1
2020-04-14T18:24:14.000Z
2020-04-14T18:24:14.000Z
backuphunter/__main__.py
NeuronAddict/backup-hunter
8be2c2b4d03f75fdc79c953568223493648a55a9
[ "Apache-2.0" ]
null
null
null
backuphunter/__main__.py
NeuronAddict/backup-hunter
8be2c2b4d03f75fdc79c953568223493648a55a9
[ "Apache-2.0" ]
null
null
null
import argparse import requests from backuphunter.search import search def main(): parser = argparse.ArgumentParser(description='Find backup files on web application.\n' 'For each URL, search variations for backup files.\n' 'Example : for ...
42.666667
110
0.597005
import argparse import requests from backuphunter.search import search def main(): parser = argparse.ArgumentParser(description='Find backup files on web application.\n' 'For each URL, search variations for backup files.\n' 'Example : for ...
true
true
08f856b8476eacfd2f01912790e3b303aab0c5ea
8,378
py
Python
tfjs-converter/python/tensorflowjs/converters/fuse_prelu_test.py
mogotech/tfjs
3fb35297ef4572e444d257341e4bccdb0a3f866a
[ "Apache-2.0" ]
1
2019-12-13T04:10:10.000Z
2019-12-13T04:10:10.000Z
tfjs-converter/python/tensorflowjs/converters/fuse_prelu_test.py
sachio222/tfjs
02f09a3ee05d1b67184acf47feb34bd672ba1606
[ "Apache-2.0" ]
null
null
null
tfjs-converter/python/tensorflowjs/converters/fuse_prelu_test.py
sachio222/tfjs
02f09a3ee05d1b67184acf47feb34bd672ba1606
[ "Apache-2.0" ]
2
2020-02-27T07:37:59.000Z
2020-04-03T10:35:33.000Z
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
35.054393
80
0.692528
import os import shutil import tempfile import tensorflow as tf from tensorflow.core.protobuf import config_pb2 from tensorflow.core.protobuf import meta_graph_pb2 from tensorflowjs.converters import fuse_depthwise_conv2d from tensorflowjs.converters import fuse_prelu from tensorflowjs.converters import tf_saved_mod...
true
true
08f856d7c7f3aa71f0996f078518798f64a301bb
18,779
py
Python
tests/operation/testdatashader.py
thoth291/holoviews
98b657262e3c9322ad7848b950053d171d661c35
[ "BSD-3-Clause" ]
null
null
null
tests/operation/testdatashader.py
thoth291/holoviews
98b657262e3c9322ad7848b950053d171d661c35
[ "BSD-3-Clause" ]
null
null
null
tests/operation/testdatashader.py
thoth291/holoviews
98b657262e3c9322ad7848b950053d171d661c35
[ "BSD-3-Clause" ]
null
null
null
from unittest import SkipTest from nose.plugins.attrib import attr import numpy as np from holoviews import (Dimension, Curve, Points, Image, Dataset, RGB, Path, Graph, TriMesh, QuadMesh, NdOverlay, Contours) from holoviews.element.comparison import ComparisonTestCase from holoviews.core.util im...
46.598015
105
0.527611
from unittest import SkipTest from nose.plugins.attrib import attr import numpy as np from holoviews import (Dimension, Curve, Points, Image, Dataset, RGB, Path, Graph, TriMesh, QuadMesh, NdOverlay, Contours) from holoviews.element.comparison import ComparisonTestCase from holoviews.core.util im...
true
true
08f857e157867ed9148aa5f33f81b5f81e32e6fa
8,138
py
Python
saleor/order/utils.py
hairychris/saleor
7c1ecf58b85567a3e148fd6cad9949ba18aa4cb8
[ "BSD-3-Clause" ]
2
2019-02-21T01:54:54.000Z
2019-02-21T01:55:04.000Z
saleor/order/utils.py
alexredondosk8/saleor
1ca28980eccb5c71e8f021c2dba66346c244d89e
[ "BSD-3-Clause" ]
5
2021-03-18T23:51:16.000Z
2022-03-11T23:45:26.000Z
saleor/order/utils.py
alexredondosk8/saleor
1ca28980eccb5c71e8f021c2dba66346c244d89e
[ "BSD-3-Clause" ]
null
null
null
from functools import wraps from django.conf import settings from django.shortcuts import get_object_or_404, redirect from prices import Money, TaxedMoney from ..account.utils import store_user_address from ..checkout import AddressType from ..core.utils.taxes import ( ZERO_MONEY, get_tax_rate_by_name, get_taxes_...
34.629787
79
0.701769
from functools import wraps from django.conf import settings from django.shortcuts import get_object_or_404, redirect from prices import Money, TaxedMoney from ..account.utils import store_user_address from ..checkout import AddressType from ..core.utils.taxes import ( ZERO_MONEY, get_tax_rate_by_name, get_taxes_...
true
true
08f858342beb337718aa892595c548793e168934
263
py
Python
unittest_reinvent/running_modes/curriculum_tests/__init__.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/curriculum_tests/__init__.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/curriculum_tests/__init__.py
lilleswing/Reinvent-1
ac4e3e6fa6379c6f4af883478dfd1b3407933ada
[ "Apache-2.0" ]
70
2020-04-05T19:25:43.000Z
2022-02-22T12:04:39.000Z
from unittest_reinvent.running_modes.curriculum_tests.test_manual_curriculum_learning import \ TestManualCurriculumLearning from unittest_reinvent.running_modes.curriculum_tests.test_automated_curriculum_learning import \ TestAutomatedCurriculumLearning
43.833333
97
0.897338
from unittest_reinvent.running_modes.curriculum_tests.test_manual_curriculum_learning import \ TestManualCurriculumLearning from unittest_reinvent.running_modes.curriculum_tests.test_automated_curriculum_learning import \ TestAutomatedCurriculumLearning
true
true
08f85862d5ce37ad3007790f8ebd63007b37dc30
1,388
py
Python
fixture/db.py
SentyQ/python_training
89ffc5616de93bc2adc0d50f023e359edca9ca77
[ "Apache-2.0" ]
null
null
null
fixture/db.py
SentyQ/python_training
89ffc5616de93bc2adc0d50f023e359edca9ca77
[ "Apache-2.0" ]
null
null
null
fixture/db.py
SentyQ/python_training
89ffc5616de93bc2adc0d50f023e359edca9ca77
[ "Apache-2.0" ]
null
null
null
import pymysql.cursors from model.group import Group from model.contact import Contact class DbFixture: def __init__(self, host, name, user, password): self.host = host self.name = name self.user = user self.password = password self.connection = pymysql.connect(host=host, d...
33.047619
116
0.589337
import pymysql.cursors from model.group import Group from model.contact import Contact class DbFixture: def __init__(self, host, name, user, password): self.host = host self.name = name self.user = user self.password = password self.connection = pymysql.connect(host=host, d...
true
true
08f858ed0df516edfb4adf0626ac2f30e2f5883c
5,589
py
Python
opsdroid/tests/test_constraints.py
avinash-gudipati/opsdroid
4f6c04c894b378274db452f783ca0580f475f2fc
[ "Apache-2.0" ]
null
null
null
opsdroid/tests/test_constraints.py
avinash-gudipati/opsdroid
4f6c04c894b378274db452f783ca0580f475f2fc
[ "Apache-2.0" ]
null
null
null
opsdroid/tests/test_constraints.py
avinash-gudipati/opsdroid
4f6c04c894b378274db452f783ca0580f475f2fc
[ "Apache-2.0" ]
null
null
null
import pytest import asynctest.mock as amock from opsdroid.cli.start import configure_lang from opsdroid.core import OpsDroid from opsdroid.events import Message from opsdroid.matchers import match_regex from opsdroid import constraints configure_lang({}) # Required for our internationalization of error messages @...
35.150943
82
0.701736
import pytest import asynctest.mock as amock from opsdroid.cli.start import configure_lang from opsdroid.core import OpsDroid from opsdroid.events import Message from opsdroid.matchers import match_regex from opsdroid import constraints configure_lang({}) @pytest.fixture def opsdroid(): """An instance of the O...
false
true
08f8592d82a7bf779e2aebf1b5c168843611262b
2,758
py
Python
txcouchbase/tests/test_views.py
griels/couchbase-python-client
c74e63cab3c71a5609c3bce08fcecadb195cfcf6
[ "Apache-2.0" ]
1
2017-11-10T13:03:11.000Z
2017-11-10T13:03:11.000Z
txcouchbase/tests/test_views.py
griels/couchbase-python-client
c74e63cab3c71a5609c3bce08fcecadb195cfcf6
[ "Apache-2.0" ]
null
null
null
txcouchbase/tests/test_views.py
griels/couchbase-python-client
c74e63cab3c71a5609c3bce08fcecadb195cfcf6
[ "Apache-2.0" ]
null
null
null
# Copyright 2013, Couchbase, 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...
30.988764
78
0.662074
from twisted.internet import defer from txcouchbase.bucket import BatchedView from couchbase.exceptions import HTTPError, ArgumentError from couchbase.async.view import AsyncViewBase from couchbase.tests.base import ViewTestCase from txcouchbase.tests.base import gen_base class RowsHandler(AsyncViewBase): def __...
false
true
08f859656cb839b04d7ea4053be83b708901b1d2
1,853
py
Python
tests/test_tutorial/test_extra_models/test_tutorial004.py
parampavar/fastapi
4e77737a3f7bf2608132ea170e9ff013b5af6732
[ "MIT" ]
2
2020-07-17T21:33:28.000Z
2020-07-17T21:33:38.000Z
tests/test_tutorial/test_extra_models/test_tutorial004.py
parampavar/fastapi
4e77737a3f7bf2608132ea170e9ff013b5af6732
[ "MIT" ]
1
2021-07-24T15:25:13.000Z
2021-07-24T15:25:13.000Z
tests/test_tutorial/test_extra_models/test_tutorial004.py
parampavar/fastapi
4e77737a3f7bf2608132ea170e9ff013b5af6732
[ "MIT" ]
1
2019-03-29T06:15:07.000Z
2019-03-29T06:15:07.000Z
from fastapi.testclient import TestClient from extra_models.tutorial004 import app client = TestClient(app) openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/items/": { "get": { "responses": { "200...
30.377049
83
0.409066
from fastapi.testclient import TestClient from extra_models.tutorial004 import app client = TestClient(app) openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/items/": { "get": { "responses": { "200...
true
true
08f859e32e6e81a74dfe798702183072bceb64be
3,200
py
Python
scripts/venv/lib/python2.7/site-packages/cogent/draw/legend.py
sauloal/cnidaria
fe6f8c8dfed86d39c80f2804a753c05bb2e485b4
[ "MIT" ]
3
2015-11-20T08:44:42.000Z
2016-12-14T01:40:03.000Z
scripts/venv/lib/python2.7/site-packages/cogent/draw/legend.py
sauloal/cnidaria
fe6f8c8dfed86d39c80f2804a753c05bb2e485b4
[ "MIT" ]
1
2017-09-04T14:04:32.000Z
2020-05-26T19:04:00.000Z
scripts/venv/lib/python2.7/site-packages/cogent/draw/legend.py
sauloal/cnidaria
fe6f8c8dfed86d39c80f2804a753c05bb2e485b4
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import division from cogent.core import moltype, annotation from matplotlib.collections import PatchCollection from matplotlib.text import Text from matplotlib.transforms import Affine2D from cogent.draw.rlg2mpl import Group, Drawable, figureLayout from cogent.draw.linear import ...
35.555556
72
0.565938
from __future__ import division from cogent.core import moltype, annotation from matplotlib.collections import PatchCollection from matplotlib.text import Text from matplotlib.transforms import Affine2D from cogent.draw.rlg2mpl import Group, Drawable, figureLayout from cogent.draw.linear import Display, DisplayPolicy...
true
true
08f85b3a6cc2025831a1c6044d7d71302367ea14
2,103
py
Python
src/Accunniscila/frontend/views.py
GiorgioBelli/Accunniscila
ca19c7db2b34fb8ee426ec6773e470a7877500de
[ "MIT" ]
2
2020-06-01T14:28:47.000Z
2020-06-03T14:59:55.000Z
src/Accunniscila/frontend/views.py
GiorgioBelli/Accunniscila
ca19c7db2b34fb8ee426ec6773e470a7877500de
[ "MIT" ]
3
2020-06-07T08:22:35.000Z
2020-06-07T08:22:40.000Z
src/Accunniscila/frontend/views.py
GiorgioBelli/Accunniscila
ca19c7db2b34fb8ee426ec6773e470a7877500de
[ "MIT" ]
1
2020-06-27T09:54:15.000Z
2020-06-27T09:54:15.000Z
from django.shortcuts import render import Orders.views as order_views from Menu.models import Pizza from Utilities.views import EmptyAPIView, NoAuthAPIView, AuthAPIView # Create your views here. class IndexView(EmptyAPIView): def get(self,request): return render(request, 'frontend/homepage.html') ...
27.311688
131
0.696148
from django.shortcuts import render import Orders.views as order_views from Menu.models import Pizza from Utilities.views import EmptyAPIView, NoAuthAPIView, AuthAPIView class IndexView(EmptyAPIView): def get(self,request): return render(request, 'frontend/homepage.html') def post(self,request):...
true
true
08f85b4dc3e21d45125d86e765aa636f3f8fd6bb
1,274
py
Python
investment_stocks_predict_trend/predict_3.py
u6k/investment-machine-predict-prices
54b433719ad80179043797c2720ed9900d8bd20c
[ "MIT" ]
1
2020-11-27T13:37:20.000Z
2020-11-27T13:37:20.000Z
investment_stocks_predict_trend/predict_3.py
u6k/investment-machine-predict-prices
54b433719ad80179043797c2720ed9900d8bd20c
[ "MIT" ]
1
2020-09-25T23:53:03.000Z
2020-09-25T23:53:03.000Z
investment_stocks_predict_trend/predict_3.py
u6k/investment-trade-predict
54b433719ad80179043797c2720ed9900d8bd20c
[ "MIT" ]
null
null
null
import argparse from sklearn import ensemble from predict_base import PredictClassificationBase class PredictClassification_3(PredictClassificationBase): def model_fit(self, x_train, y_train): return ensemble.RandomForestClassifier(n_estimators=200).fit(x_train, y_train) if __name__ == "__main__": ...
35.388889
103
0.703297
import argparse from sklearn import ensemble from predict_base import PredictClassificationBase class PredictClassification_3(PredictClassificationBase): def model_fit(self, x_train, y_train): return ensemble.RandomForestClassifier(n_estimators=200).fit(x_train, y_train) if __name__ == "__main__": ...
true
true
08f85b99c3669b6d1a2cde7228c49353f8e3ffbb
2,470
py
Python
sdk/python/tests/dsl/volume_op_tests.py
15379180/pipelines
589c905b426062d4b8ee9bf47855c1d5e87bb749
[ "Apache-2.0" ]
3
2019-09-18T01:33:27.000Z
2021-06-09T08:19:10.000Z
sdk/python/tests/dsl/volume_op_tests.py
15379180/pipelines
589c905b426062d4b8ee9bf47855c1d5e87bb749
[ "Apache-2.0" ]
12
2020-09-26T01:03:09.000Z
2022-03-03T23:12:24.000Z
sdk/python/tests/dsl/volume_op_tests.py
15379180/pipelines
589c905b426062d4b8ee9bf47855c1d5e87bb749
[ "Apache-2.0" ]
5
2020-08-31T08:48:46.000Z
2021-11-26T07:29:04.000Z
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35.797101
79
0.596356
from kubernetes.client.models import ( V1Volume, V1PersistentVolumeClaimVolumeSource ) import kfp from kfp.dsl import PipelineParam, VolumeOp, PipelineVolume import unittest class TestVolumeOp(unittest.TestCase): def test_basic(self): def my_pipeline(param1, param2): vol = VolumeOp( ...
true
true
08f85bd912725e0a620047a8503eb325b8994216
3,101
py
Python
src/oci/core/models/volume_group_source_from_volume_group_backup_details.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/core/models/volume_group_source_from_volume_group_backup_details.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/core/models/volume_group_source_from_volume_group_backup_details.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
38.7625
245
0.713318
from .volume_group_source_details import VolumeGroupSourceDetails from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class VolumeGroupSourceFromVolumeGroupBackupDetails(VolumeGroupSourceDe...
true
true
08f85cafa42e260e5512898e9ce9cf422925feeb
1,067
py
Python
accepted/Longest_Continuous_Increasing_Subsequence.py
sheagk/leetcode_solutions
7571bd13f4274f6b4b622b43a414d56fc26d3be0
[ "MIT" ]
null
null
null
accepted/Longest_Continuous_Increasing_Subsequence.py
sheagk/leetcode_solutions
7571bd13f4274f6b4b622b43a414d56fc26d3be0
[ "MIT" ]
null
null
null
accepted/Longest_Continuous_Increasing_Subsequence.py
sheagk/leetcode_solutions
7571bd13f4274f6b4b622b43a414d56fc26d3be0
[ "MIT" ]
1
2020-09-03T14:26:00.000Z
2020-09-03T14:26:00.000Z
## https://leetcode.com/problems/longest-continuous-increasing-subsequence/ ## problem is to find the length of the longest continously increasing ## subsequence. solution is to loop through the sequence and keep track ## of the length of the current sequence and the length of the longest ## sequence, then return t...
33.34375
75
0.622306
class Solution: def findLengthOfLCIS(self, nums: List[int]) -> int: if len(nums) == 0: return 0 long_length = 0 cur_length = 1 last_number_in_sequence = nums[0] larger = lambda x, y: max([x, y]) for ii in range(1, len(nums)): ...
true
true
08f85d9b429e4fc50a55c3ca3520e3c4add0c293
2,603
py
Python
delete_similar.py
callmefish/CSCE636ActionRecognition
a3d0cf851b13646c4434005ff9c14d4c5f77e231
[ "MIT" ]
null
null
null
delete_similar.py
callmefish/CSCE636ActionRecognition
a3d0cf851b13646c4434005ff9c14d4c5f77e231
[ "MIT" ]
null
null
null
delete_similar.py
callmefish/CSCE636ActionRecognition
a3d0cf851b13646c4434005ff9c14d4c5f77e231
[ "MIT" ]
null
null
null
import cv2 import os # import numpy as np from skimage.measure import compare_ssim def remove_simillar_image_by_ssim(path): img_list = os.listdir(path) img_list.sort() save_list = [] count_num = 0 for i in range(len(img_list)): try: img = cv2.imread(os.path.join(pa...
40.671875
95
0.522858
import cv2 import os from skimage.measure import compare_ssim def remove_simillar_image_by_ssim(path): img_list = os.listdir(path) img_list.sort() save_list = [] count_num = 0 for i in range(len(img_list)): try: img = cv2.imread(os.path.join(path, img_list[i])) ...
true
true
08f85e19901980fb9eae642a1626a28d0b0b654d
6,795
py
Python
tests/integration/utils/test_smb.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
1
2021-09-06T00:14:04.000Z
2021-09-06T00:14:04.000Z
tests/integration/utils/test_smb.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
2
2021-04-30T21:17:57.000Z
2021-12-13T20:40:23.000Z
tests/integration/utils/test_smb.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Test utility methods that communicate with SMB shares. """ from __future__ import absolute_import import getpass import logging import os import signal import subprocess import tempfile import time import salt.utils.files import salt.utils.path import salt.utils.smb from tests.support.case...
31.169725
84
0.601472
from __future__ import absolute_import import getpass import logging import os import signal import subprocess import tempfile import time import salt.utils.files import salt.utils.path import salt.utils.smb from tests.support.case import TestCase from tests.support.unit import skipIf log = logging.getLogger(__name_...
true
true
08f85e47eac44f7e06ef08a7cb72a60e7a66fa94
1,028
py
Python
examples/humanoid.py
mlberkeley/multiarchy
18ceae308efe67ad3e575a3e76a784af036b25a6
[ "MIT" ]
null
null
null
examples/humanoid.py
mlberkeley/multiarchy
18ceae308efe67ad3e575a3e76a784af036b25a6
[ "MIT" ]
3
2019-12-04T09:21:08.000Z
2022-02-09T23:32:41.000Z
examples/humanoid.py
mlberkeley/multiarchy
18ceae308efe67ad3e575a3e76a784af036b25a6
[ "MIT" ]
1
2020-02-25T09:49:53.000Z
2020-02-25T09:49:53.000Z
"""Author: Brandon Trabucco, Copyright 2019, MIT License""" from multiarchy.launch import launch_local from multiarchy.baselines.sac import sac, sac_variant from gym.envs.mujoco.humanoid import HumanoidEnv if __name__ == "__main__": # parameters for the learning experiment variant = dict( max_num_s...
25.7
65
0.646887
from multiarchy.launch import launch_local from multiarchy.baselines.sac import sac, sac_variant from gym.envs.mujoco.humanoid import HumanoidEnv if __name__ == "__main__": variant = dict( max_num_steps=1000000, logging_dir="humanoid/sac/", hidden_size=400, num_hidden_layers...
true
true
08f85e6a16db6a79b9cc4eefac1b6765f4f4f49e
532
py
Python
test/Ad1/test_q1.py
profwellington/fundamentos_de_programacao
7572e3a81429136e5596fc762ae77628528c186b
[ "MIT" ]
null
null
null
test/Ad1/test_q1.py
profwellington/fundamentos_de_programacao
7572e3a81429136e5596fc762ae77628528c186b
[ "MIT" ]
null
null
null
test/Ad1/test_q1.py
profwellington/fundamentos_de_programacao
7572e3a81429136e5596fc762ae77628528c186b
[ "MIT" ]
null
null
null
#!/usr/bin/env python import unittest from Ad1 import q1 class Test_q1(unittest.TestCase): def test_init(self): assert 5 == 5 def test_impar_numero(self): assert ((q1.main(3))[0]) == 3 def test_impar_area(self): assert round(((q1.main(3))[1]),2) == 28.27 ...
18.344828
55
0.546992
import unittest from Ad1 import q1 class Test_q1(unittest.TestCase): def test_init(self): assert 5 == 5 def test_impar_numero(self): assert ((q1.main(3))[0]) == 3 def test_impar_area(self): assert round(((q1.main(3))[1]),2) == 28.27 def test_impar_p...
true
true
08f85ec8f55cba3df2a21ef2a9fee9991660a6b3
1,306
py
Python
mvpa2/tests/test_staticprojection.py
nno/PyMVPA
a125596bf81b8e9848768852f697bd3cff9674c4
[ "MIT" ]
227
2015-01-17T20:13:54.000Z
2022-01-26T21:14:30.000Z
mvpa2/tests/test_staticprojection.py
nno/PyMVPA
a125596bf81b8e9848768852f697bd3cff9674c4
[ "MIT" ]
364
2015-01-05T21:55:09.000Z
2021-09-09T20:37:55.000Z
mvpa2/tests/test_staticprojection.py
nno/PyMVPA
a125596bf81b8e9848768852f697bd3cff9674c4
[ "MIT" ]
111
2015-01-06T19:26:41.000Z
2022-01-26T21:14:31.000Z
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the PyMVPA package for the # copyright and license terms. # ### ### ### ### ###...
38.411765
78
0.570444
import numpy as np from mvpa2.testing import * from mvpa2.testing.datasets import * from mvpa2.mappers.staticprojection import StaticProjectionMapper def test_staticprojection_reverse_fa(): ds = datasets['uni2small'] proj = np.eye(ds.nfeatures) spm = StaticProjectionMapper(proj=proj[:,:3], recon=proj[:,:...
true
true
08f85f6342ced474c0ebd5c6cecafeecc9afc622
3,473
py
Python
pyres-1.2-py3.6.egg/resweb/server.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
pyres-1.2-py3.6.egg/resweb/server.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
pyres-1.2-py3.6.egg/resweb/server.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
import os from itty import Redirect, get, post, serve_static_file, run_itty, handle_request from pyres import ResQ from pyres import failure from views import ( Overview, Queues, Queue, Workers, Working, Failed, Stats, Stat, Worker, Delayed, DelayedTimestamp ) from base64 imp...
27.346457
81
0.678664
import os from itty import Redirect, get, post, serve_static_file, run_itty, handle_request from pyres import ResQ from pyres import failure from views import ( Overview, Queues, Queue, Workers, Working, Failed, Stats, Stat, Worker, Delayed, DelayedTimestamp ) from base64 imp...
true
true
08f85fbd5d5cd690254ee8f3aed001efae447d5c
5,769
py
Python
MTP/core/LimitManager.py
pablo-miselu/MTP
b7328bd69032df7f3dabebe3fe39846926b44fdc
[ "Apache-2.0" ]
null
null
null
MTP/core/LimitManager.py
pablo-miselu/MTP
b7328bd69032df7f3dabebe3fe39846926b44fdc
[ "Apache-2.0" ]
null
null
null
MTP/core/LimitManager.py
pablo-miselu/MTP
b7328bd69032df7f3dabebe3fe39846926b44fdc
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Pablo De La Garza, Miselu 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 ...
38.46
123
0.511354
import pUtils class LimitManager: def __init__(self,limitDict): self.testMeasurementList = [] self.limitDict = limitDict def checkLimits(self,testName,measurementDict,testStartTimestamp,testEndTimestamp): overallTestResult = True sortedMeasurementList = sor...
true
true
08f860412af3cf75e0c4507f9062617e2ceb543f
12,243
py
Python
engine_v1.py
MatthewAbugeja/lmbn
6e18e752f95614ef37d5a767672cb81e82708d94
[ "MIT" ]
45
2021-01-25T15:42:59.000Z
2022-03-22T07:08:40.000Z
engine_v1.py
MatthewAbugeja/lmbn
6e18e752f95614ef37d5a767672cb81e82708d94
[ "MIT" ]
12
2021-01-29T05:00:35.000Z
2022-02-11T01:12:00.000Z
engine_v1.py
MatthewAbugeja/lmbn
6e18e752f95614ef37d5a767672cb81e82708d94
[ "MIT" ]
13
2021-01-27T06:38:32.000Z
2022-03-06T05:35:28.000Z
import os import torch import numpy as np import utils.utility as utility from scipy.spatial.distance import cdist from utils.functions import cmc, mean_ap, cmc_baseline, eval_liaoxingyu from utils.re_ranking import re_ranking import scipy.io from torchvision import datasets, transforms from data_v1.sampler import a_Ra...
40.140984
152
0.538022
import os import torch import numpy as np import utils.utility as utility from scipy.spatial.distance import cdist from utils.functions import cmc, mean_ap, cmc_baseline, eval_liaoxingyu from utils.re_ranking import re_ranking import scipy.io from torchvision import datasets, transforms from data_v1.sampler import a_Ra...
true
true
08f861f90fd95181b4ae7ab0d1a9b3ac4e5e4a27
879
py
Python
vyapp/plugins/page_scroll.py
hgdsraj/vy
759cd5ab006c14f40c57dcd9eb190adf1a67e18f
[ "MIT" ]
null
null
null
vyapp/plugins/page_scroll.py
hgdsraj/vy
759cd5ab006c14f40c57dcd9eb190adf1a67e18f
[ "MIT" ]
null
null
null
vyapp/plugins/page_scroll.py
hgdsraj/vy
759cd5ab006c14f40c57dcd9eb190adf1a67e18f
[ "MIT" ]
null
null
null
""" Overview ======== This plugin turns possible to scroll pages. Key-Commands ============ Namespace: page-scroll Mode: NORMAL Event: <Key-Q> Description: Scroll a page up. Mode: NORMAL Event: <Key-A> Description: Scroll one page down. """ from tkinter import SCROLL class PageScroll: def __init__(self, a...
14.65
48
0.565415
from tkinter import SCROLL class PageScroll: def __init__(self, area): area.install('page-scroll', ('NORMAL', '<Key-Q>', self.scroll_up), ('NORMAL', '<Key-A>', self.scroll_down)) self.area = area def scroll_up(self, event): self.area.yview(SCROLL, -1, 'page') ...
true
true
08f865f15f36381fe76addd1e7672429d10a66f2
623
py
Python
strings/reverse_letters.py
TeddyFirman/Algorithm_Python
edbd50a97a62c2beb2a187e4c411c677aa43115e
[ "MIT" ]
null
null
null
strings/reverse_letters.py
TeddyFirman/Algorithm_Python
edbd50a97a62c2beb2a187e4c411c677aa43115e
[ "MIT" ]
null
null
null
strings/reverse_letters.py
TeddyFirman/Algorithm_Python
edbd50a97a62c2beb2a187e4c411c677aa43115e
[ "MIT" ]
null
null
null
def reverse_letters(input_str: str) -> str: """ Reverses letters in a given string without adjusting the position of the words >>> reverse_letters('The cat in the hat') 'ehT tac ni eht tah' >>> reverse_letters('The quick brown fox jumped over the lazy dog.') 'ehT kciuq nworb xof depmuj rev...
31.15
83
0.616372
def reverse_letters(input_str: str) -> str: return " ".join([word[::-1] for word in input_str.split()]) if __name__ == "__main__": import doctest doctest.testmod()
true
true
08f865fe999cae06933e2865e2f20f99b35252e3
2,476
py
Python
environments.py
jet-black/ppo-lstm-parallel
4ab5c92602cc9f4c83a24a15717357c56c4a4372
[ "MIT" ]
38
2018-08-15T19:38:47.000Z
2022-03-17T10:57:49.000Z
environments.py
JohnSun23/ppo-lstm-parallel
4ab5c92602cc9f4c83a24a15717357c56c4a4372
[ "MIT" ]
1
2019-11-14T07:45:58.000Z
2019-11-14T09:44:45.000Z
environments.py
JohnSun23/ppo-lstm-parallel
4ab5c92602cc9f4c83a24a15717357c56c4a4372
[ "MIT" ]
15
2018-08-17T10:00:47.000Z
2022-03-02T14:00:05.000Z
def parse_properties(file_name): lines = open(file_name).readlines() result = {} for l in lines: a, b = l.split("=") b = b.strip() if b == "True": result[a] = True elif b == "False": result[a] = False elif "." in b: result[a] = floa...
27.511111
72
0.59895
def parse_properties(file_name): lines = open(file_name).readlines() result = {} for l in lines: a, b = l.split("=") b = b.strip() if b == "True": result[a] = True elif b == "False": result[a] = False elif "." in b: result[a] = floa...
true
true
08f8660ae8ff7936867f52b1834c5cad05259e92
7,095
py
Python
Maze/maze_ia4.py
Shekcon/Intek
dabdfd03b3af7339d977df74dc2dd2a116960690
[ "Apache-2.0" ]
1
2018-10-21T13:30:12.000Z
2018-10-21T13:30:12.000Z
Maze/maze_ia4.py
Shekcon/Intek
dabdfd03b3af7339d977df74dc2dd2a116960690
[ "Apache-2.0" ]
null
null
null
Maze/maze_ia4.py
Shekcon/Intek
dabdfd03b3af7339d977df74dc2dd2a116960690
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from sys import stdin, stdout, stderr from random import choice from string import ascii_uppercase from collections import deque from parent import Track from time import sleep from os import system resources = [] maze = [] player = () path = deque() enemy = {} other_player = "" # track_maze =...
26.875
80
0.604228
from sys import stdin, stdout, stderr from random import choice from string import ascii_uppercase from collections import deque from parent import Track from time import sleep from os import system resources = [] maze = [] player = () path = deque() enemy = {} other_player = "" direction = { (-1, 0): "MOVE UP", ...
true
true
08f8667caf4920dbf3582c4273aa8f16104d9c41
1,456
py
Python
sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_data_path_py3.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_data_path_py3.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_data_path_py3.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
31.652174
76
0.565247
from msrest.serialization import Model class JobDataPath(Model): _validation = { 'job_id': {'readonly': True}, 'command': {'readonly': True}, 'paths': {'readonly': True}, } _attribute_map = { 'job_id': {'key': 'jobId', 'type': 'str'}, 'command': {'key': 'command'...
true
true
08f86698f6ed353e9db86ad0607a79c375b47f60
8,398
py
Python
MaxiNet/WorkerServer/tst_driver.py
bramamurthy/P4SwitchesInMaxiNet
b7c941690d46b110b12469a9fb9c23de8e6b965f
[ "MIT" ]
1
2018-05-09T16:57:03.000Z
2018-05-09T16:57:03.000Z
MaxiNet/WorkerServer/tst_driver.py
bramamurthy/P4SwitchesInMaxiNet
b7c941690d46b110b12469a9fb9c23de8e6b965f
[ "MIT" ]
null
null
null
MaxiNet/WorkerServer/tst_driver.py
bramamurthy/P4SwitchesInMaxiNet
b7c941690d46b110b12469a9fb9c23de8e6b965f
[ "MIT" ]
null
null
null
#!/usr/bin/python2 # # This is a sample program to emulate P4 Switches in Distributed environment # using Maxinet. The skeleton application program should be like this # import argparse import atexit import logging import os import signal import subprocess import sys import tempfile import time import Pyro4 impor...
30.649635
161
0.70362
import argparse import atexit import logging import os import signal import subprocess import sys import tempfile import time import Pyro4 import threading import traceback import json import mininet.term from mininet.topo import Topo from mininet.node import OVSSwitch from mininet.node import UserSwitch, OVSSwi...
false
true
08f866e791e1ecb50d107b70393a90d32436366b
17,431
py
Python
hackzurich_py/SIGBTools.py
ejoebstl/hackzurich16
81a3b302050a4a464e2191c1d0912f8038c26ed9
[ "MIT" ]
null
null
null
hackzurich_py/SIGBTools.py
ejoebstl/hackzurich16
81a3b302050a4a464e2191c1d0912f8038c26ed9
[ "MIT" ]
null
null
null
hackzurich_py/SIGBTools.py
ejoebstl/hackzurich16
81a3b302050a4a464e2191c1d0912f8038c26ed9
[ "MIT" ]
null
null
null
import cv2; import cv2 import numpy as np import pylab from pylab import * import matplotlib as mpl import math ''' This module contains sets of functions useful for basic image analysis and should be useful in the SIGB course. Written and Assembled (2012,2013) by Dan Witzner Hansen, IT University. ''' def getCircl...
35.573469
162
0.568872
import cv2; import cv2 import numpy as np import pylab from pylab import * import matplotlib as mpl import math ''' This module contains sets of functions useful for basic image analysis and should be useful in the SIGB course. Written and Assembled (2012,2013) by Dan Witzner Hansen, IT University. ''' def getCircl...
false
true
08f868bc9e446edbf659ceeef11463e7c533f88f
1,430
py
Python
setup.py
cjsteel/termtosvg
459d755d1cd241125b224b69446df265169a8dfb
[ "BSD-3-Clause" ]
9,302
2018-06-16T18:00:43.000Z
2022-03-30T17:55:07.000Z
setup.py
cjsteel/termtosvg
459d755d1cd241125b224b69446df265169a8dfb
[ "BSD-3-Clause" ]
115
2018-06-25T07:35:57.000Z
2020-06-16T09:42:35.000Z
setup.py
cjsteel/termtosvg
459d755d1cd241125b224b69446df265169a8dfb
[ "BSD-3-Clause" ]
500
2018-06-26T05:11:58.000Z
2022-03-22T15:10:16.000Z
#!/usr/bin/env python from setuptools import setup setup( name='termtosvg', version='1.1.0', license='BSD 3-clause license', author='Nicolas Bedos', author_email='nicolas.bedos@gmail.com', description='Record terminal sessions as SVG animations', long_description='A Linux terminal recorder...
28.039216
67
0.552448
from setuptools import setup setup( name='termtosvg', version='1.1.0', license='BSD 3-clause license', author='Nicolas Bedos', author_email='nicolas.bedos@gmail.com', description='Record terminal sessions as SVG animations', long_description='A Linux terminal recorder written in Python ' ...
true
true
08f869400c4478da86df99f9f161592fde6ea03a
488
py
Python
py-basics/src/lectures/lists/exercise1.py
AndrasTarlos/s4f
bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426
[ "CC0-1.0" ]
null
null
null
py-basics/src/lectures/lists/exercise1.py
AndrasTarlos/s4f
bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426
[ "CC0-1.0" ]
null
null
null
py-basics/src/lectures/lists/exercise1.py
AndrasTarlos/s4f
bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426
[ "CC0-1.0" ]
4
2021-12-13T15:52:00.000Z
2022-03-28T13:54:53.000Z
""" List Exercise 1 Implementieren Sie die Funktion list_from_range(), um damit eine Liste mit allen Elementen von 'min' bis und mit 'max' zu erstellen. Verwenden Sie List.append() und benutzen Sie die nachfolgenden Tests zur Kontrolle. """ def list_from_range(min, max): my_list = [] for element in range(min...
25.684211
111
0.67623
def list_from_range(min, max): my_list = [] for element in range(min, max + 1): my_list.append(element) return my_list print(list_from_range(-1, 4)) print(list_from_range(1, -4))
true
true
08f86aa13c713e860adb45c5dda242404516de49
8,089
py
Python
storm_control/hal4000/qtdesigner/progression_ui.py
shiwei23/STORM6
669067503ebd164b575ce529fcc4a9a3f576b3d7
[ "MIT" ]
47
2015-02-11T16:05:54.000Z
2022-03-26T14:13:12.000Z
storm_control/hal4000/qtdesigner/progression_ui.py
shiwei23/STORM6
669067503ebd164b575ce529fcc4a9a3f576b3d7
[ "MIT" ]
110
2015-01-30T03:53:41.000Z
2021-11-03T15:58:44.000Z
storm_control/hal4000/qtdesigner/progression_ui.py
shiwei23/STORM6
669067503ebd164b575ce529fcc4a9a3f576b3d7
[ "MIT" ]
61
2015-01-09T18:31:27.000Z
2021-12-21T13:07:51.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'progression.ui' # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjec...
56.566434
115
0.717888
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(325, 265) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0)...
true
true
08f86bcf7523228107f4539d78503a381b9f1c49
11,886
py
Python
docker/src/clawpack-5.3.1/geoclaw/examples/tsunami/bowl-radial/setplot.py
ian-r-rose/visualization
ed6d9fab95eb125e7340ab3fad3ed114ed3214af
[ "CC-BY-4.0" ]
11
2017-01-04T18:19:48.000Z
2021-02-21T01:46:33.000Z
docker/src/clawpack-5.3.1/geoclaw/examples/tsunami/bowl-radial/setplot.py
ian-r-rose/visualization
ed6d9fab95eb125e7340ab3fad3ed114ed3214af
[ "CC-BY-4.0" ]
8
2016-09-22T20:49:51.000Z
2019-09-06T23:28:13.000Z
docker/src/clawpack-5.3.1/geoclaw/examples/tsunami/bowl-radial/setplot.py
ian-r-rose/visualization
ed6d9fab95eb125e7340ab3fad3ed114ed3214af
[ "CC-BY-4.0" ]
13
2016-09-22T20:20:06.000Z
2020-07-13T14:48:32.000Z
""" Set up the plot figures, axes, and items to be done for each frame. This module is imported by the plotting routines and then the function setplot is called to set the plot parameters. """ try: from setplotfg import setplotfg except: print "Did not find setplotfg.py" setplotfg = None #-----...
34.552326
77
0.636631
""" Set up the plot figures, axes, and items to be done for each frame. This module is imported by the plotting routines and then the function setplot is called to set the plot parameters. """ try: from setplotfg import setplotfg except: print "Did not find setplotfg.py" setplotfg = None def se...
false
true
08f86be526b0c2003f2604588ce7ab0c6a8560c2
1,018
py
Python
kubernetes_asyncio/test/test_v1_component_status_list.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_v1_component_status_list.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_v1_component_status_list.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.14.7 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import kube...
25.45
124
0.739686
from __future__ import absolute_import import unittest import kubernetes_asyncio.client from kubernetes_asyncio.client.models.v1_component_status_list import V1ComponentStatusList from kubernetes_asyncio.client.rest import ApiException class TestV1ComponentStatusList(unittest.TestCase): def setUp(self): ...
true
true
08f86c6a211f847ea4c7dcf66bbb6554ff1f5ca1
562
py
Python
dictionaries.py
SpencerFr/astr-119-hw-2
0475b946bcf4bd0ab1f1b9ceaf389b8f04b75b86
[ "MIT" ]
null
null
null
dictionaries.py
SpencerFr/astr-119-hw-2
0475b946bcf4bd0ab1f1b9ceaf389b8f04b75b86
[ "MIT" ]
1
2020-10-11T21:54:07.000Z
2020-10-18T20:26:43.000Z
dictionaries.py
SpencerFr/astr-119-hw-2
0475b946bcf4bd0ab1f1b9ceaf389b8f04b75b86
[ "MIT" ]
null
null
null
#define a dictionary data structure #dictionaries have key:value pairs for the elements example_dict = { "class" : "ASTR 119", "prof" : "Brant", "awesomeness" : 10 } print("The type of example_dict is ", type(example_dict)) #will say dict #get a value via key course = example_dict["class"] prin...
23.416667
73
0.702847
example_dict = { "class" : "ASTR 119", "prof" : "Brant", "awesomeness" : 10 } print("The type of example_dict is ", type(example_dict)) course = example_dict["class"] print(course) example_dict["awesomeness"] *= 10 print(example_dict) for x in example_dict.keys(): print(x, example_dict[x]...
true
true
08f86c6fe20e2d647744e098728228e86e069a59
40
py
Python
ch2/import_example/just_a_module.py
macs1207/python-tutorial
566bfcc30fbd98ff3850614c7c5bd7a0a38487ad
[ "MIT" ]
null
null
null
ch2/import_example/just_a_module.py
macs1207/python-tutorial
566bfcc30fbd98ff3850614c7c5bd7a0a38487ad
[ "MIT" ]
null
null
null
ch2/import_example/just_a_module.py
macs1207/python-tutorial
566bfcc30fbd98ff3850614c7c5bd7a0a38487ad
[ "MIT" ]
3
2019-10-22T10:04:42.000Z
2019-10-26T14:55:44.000Z
def intro(): print("I am a module.")
20
27
0.575
def intro(): print("I am a module.")
true
true