hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7f2bdf197780d5e0edf81d5cbaff586d2740365
33,473
py
Python
src/harness/testcases/WINNF_FT_S_QPR_testcase.py
NSF-Swift/Spectrum-Access-System
02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf
[ "Apache-2.0" ]
58
2015-07-22T14:16:52.000Z
2022-03-10T09:09:33.000Z
src/harness/testcases/WINNF_FT_S_QPR_testcase.py
NSF-Swift/Spectrum-Access-System
02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf
[ "Apache-2.0" ]
537
2015-07-30T16:28:20.000Z
2021-09-30T17:12:15.000Z
src/harness/testcases/WINNF_FT_S_QPR_testcase.py
NSF-Swift/Spectrum-Access-System
02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf
[ "Apache-2.0" ]
51
2015-06-30T00:25:15.000Z
2022-01-21T00:09:22.000Z
# Copyright 2018 SAS Project Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
38.518987
80
0.654528
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import logging import os import numpy as np import sas import sas_testcase from util import configurable_testcase, writeConfig, loadConfig, json_load from reference_models.antenna impo...
true
true
f7f2bdf597504d354544b3ac0fd6657b6201d703
12,099
py
Python
yadacoin/yadawebsockethandler.py
EggPool/yadacoin
4cdde8d4f71ecb947b30792a37c63836c7715126
[ "MIT" ]
null
null
null
yadacoin/yadawebsockethandler.py
EggPool/yadacoin
4cdde8d4f71ecb947b30792a37c63836c7715126
[ "MIT" ]
null
null
null
yadacoin/yadawebsockethandler.py
EggPool/yadacoin
4cdde8d4f71ecb947b30792a37c63836c7715126
[ "MIT" ]
null
null
null
""" Web socket handler for yadacoin """ import json from socketio import AsyncServer, AsyncNamespace from logging import getLogger from yadacoin.transaction import Transaction from yadacoin.config import get_config from yadacoin.blockchainutils import BU from yadacoin.poolnamespace import PoolNamespace from yadacoin....
44.977695
142
0.595173
import json from socketio import AsyncServer, AsyncNamespace from logging import getLogger from yadacoin.transaction import Transaction from yadacoin.config import get_config from yadacoin.blockchainutils import BU from yadacoin.poolnamespace import PoolNamespace from yadacoin.common import ts_to_utc from yadacoin.ch...
true
true
f7f2be64e358f263fd87f46a54ecb626e678738a
1,385
py
Python
examples/decorators/decorator_inprogress.py
JacobHenner/aioprometheus
d0528e832a1cdbc3503942b1b0c8925a43007500
[ "MIT" ]
104
2016-11-01T04:43:23.000Z
2022-03-09T18:15:05.000Z
examples/decorators/decorator_inprogress.py
JacobHenner/aioprometheus
d0528e832a1cdbc3503942b1b0c8925a43007500
[ "MIT" ]
35
2017-04-05T07:52:15.000Z
2022-03-13T02:29:50.000Z
examples/decorators/decorator_inprogress.py
JacobHenner/aioprometheus
d0528e832a1cdbc3503942b1b0c8925a43007500
[ "MIT" ]
18
2017-02-08T07:48:26.000Z
2022-03-01T01:16:29.000Z
#!/usr/bin/env python """ .. code-block:: python $ python decorator_inprogress.py The example script can be tested using ``curl``. .. code-block:: console $ curl :8000/metrics # HELP request_in_progress Number of requests in progress # TYPE request_in_progress gauge request_in_progress{route="/...
23.474576
85
0.703249
import asyncio import random from aioprometheus import Counter, Gauge, inprogress from aioprometheus.service import Service REQUESTS_IN_PROGRESS = Gauge("request_in_progress", "Number of requests in progress") REQUESTS = Counter("request_total", "Total number of requests") @inprogress(REQUESTS_IN_PROGRESS, {"rou...
true
true
f7f2be7d38c0141f177a2f16512cd8b4a33791d5
6,137
py
Python
examples/mnist/mnist_with_tensorboard.py
fdlm/ignite
6a2460e59055b3547b590a9ff7f72e07d1714164
[ "BSD-3-Clause" ]
null
null
null
examples/mnist/mnist_with_tensorboard.py
fdlm/ignite
6a2460e59055b3547b590a9ff7f72e07d1714164
[ "BSD-3-Clause" ]
null
null
null
examples/mnist/mnist_with_tensorboard.py
fdlm/ignite
6a2460e59055b3547b590a9ff7f72e07d1714164
[ "BSD-3-Clause" ]
null
null
null
""" MNIST example with training and validation monitoring using Tensorboard. Requirements: TensorboardX (https://github.com/lanpa/tensorboard-pytorch): `pip install tensorboardX` or PyTorch >= 1.2 which supports Tensorboard Tensorboard: `pip install tensorflow` (or just install tensorboard without the res...
37.882716
120
0.678182
from argparse import ArgumentParser import torch from torch.utils.data import DataLoader from torch import nn import torch.nn.functional as F from torch.optim import SGD from torchvision.datasets import MNIST from torchvision.transforms import Compose, ToTensor, Normalize try: from tensorboardX import SummaryWrit...
true
true
f7f2bf2f1faf536c9cd5fa82ff9de4e2939a2f1c
919
py
Python
chapter5/particle.py
yuishihara/probabilistic_robotics_implementations
91115260cb95697f89b1413d49dd45ebe3014a53
[ "MIT" ]
null
null
null
chapter5/particle.py
yuishihara/probabilistic_robotics_implementations
91115260cb95697f89b1413d49dd45ebe3014a53
[ "MIT" ]
null
null
null
chapter5/particle.py
yuishihara/probabilistic_robotics_implementations
91115260cb95697f89b1413d49dd45ebe3014a53
[ "MIT" ]
null
null
null
import math import sys sys.path.append("chapter3") sys.path.append("chapter4") from drawable import Drawable from robot import Robot class Particle(Drawable): def __init__(self, init_pose): self._pose = init_pose def draw(self, ax): xs = self._pose[0] ys = self._pose[1] vxs = ...
32.821429
93
0.660501
import math import sys sys.path.append("chapter3") sys.path.append("chapter4") from drawable import Drawable from robot import Robot class Particle(Drawable): def __init__(self, init_pose): self._pose = init_pose def draw(self, ax): xs = self._pose[0] ys = self._pose[1] vxs = ...
true
true
f7f2bfa442b99436ed5693407f4d929362b03da1
3,159
py
Python
app/enquiry/tests/test_partner_views.py
S3Infosoft/mvr-insights
ac73feff03c1592d5efd8e0b82f72dd4dbd3e921
[ "MIT" ]
null
null
null
app/enquiry/tests/test_partner_views.py
S3Infosoft/mvr-insights
ac73feff03c1592d5efd8e0b82f72dd4dbd3e921
[ "MIT" ]
20
2019-06-17T11:01:25.000Z
2020-05-09T06:13:17.000Z
app/enquiry/tests/test_partner_views.py
S3Infosoft/mvr-insights
ac73feff03c1592d5efd8e0b82f72dd4dbd3e921
[ "MIT" ]
1
2020-03-03T11:13:57.000Z
2020-03-03T11:13:57.000Z
from django.test import TestCase from django.urls import reverse from django.contrib.auth import get_user_model from ..models import Partner from ..forms import PartnerForm PARTNER_LIST_URL = reverse("enquiry:partner") def partner_detail_url(pk): return reverse("enquiry:partner_detail", args=[pk]) class Partn...
36.310345
79
0.614752
from django.test import TestCase from django.urls import reverse from django.contrib.auth import get_user_model from ..models import Partner from ..forms import PartnerForm PARTNER_LIST_URL = reverse("enquiry:partner") def partner_detail_url(pk): return reverse("enquiry:partner_detail", args=[pk]) class Partn...
true
true
f7f2c10b6a36ee699defaf33c0e36bde13e6636e
5,118
py
Python
src/cogs/Music.py
Allvaa/musicbot-py
ecab805135cf2d486331c4daa5903907cc6912ea
[ "MIT" ]
1
2020-12-31T11:45:06.000Z
2020-12-31T11:45:06.000Z
src/cogs/Music.py
Allvaa/musicbot-py
ecab805135cf2d486331c4daa5903907cc6912ea
[ "MIT" ]
null
null
null
src/cogs/Music.py
Allvaa/musicbot-py
ecab805135cf2d486331c4daa5903907cc6912ea
[ "MIT" ]
1
2020-12-31T11:45:13.000Z
2020-12-31T11:45:13.000Z
from discord.ext import commands from src.structures.client import MusicBot import wavelink import os import re class Music(commands.Cog, wavelink.WavelinkMixin): def __init__(self, bot: MusicBot) -> None: self.bot = bot @commands.Cog.listener() async def on_ready(self): self.bot.wavelink ...
43.372881
202
0.631497
from discord.ext import commands from src.structures.client import MusicBot import wavelink import os import re class Music(commands.Cog, wavelink.WavelinkMixin): def __init__(self, bot: MusicBot) -> None: self.bot = bot @commands.Cog.listener() async def on_ready(self): self.bot.wavelink ...
true
true
f7f2c1288ab6eb0e9ac1769873031876f4221920
12,109
py
Python
tests/test_smart_completion_multiple_schemata.py
Shasthojoy/vcli
1e8b34141a3223d157c661f70f8beb4649b4d37b
[ "BSD-3-Clause" ]
82
2015-09-11T18:05:57.000Z
2021-03-28T01:34:01.000Z
tests/test_smart_completion_multiple_schemata.py
Shasthojoy/vcli
1e8b34141a3223d157c661f70f8beb4649b4d37b
[ "BSD-3-Clause" ]
27
2015-08-27T06:15:21.000Z
2018-01-10T19:43:19.000Z
tests/test_smart_completion_multiple_schemata.py
Shasthojoy/vcli
1e8b34141a3223d157c661f70f8beb4649b4d37b
[ "BSD-3-Clause" ]
17
2015-10-03T19:58:32.000Z
2021-03-12T23:51:55.000Z
from __future__ import unicode_literals import pytest from prompt_toolkit.completion import Completion from prompt_toolkit.document import Document metadata = { 'tables': { 'public': { 'users': ['id', 'email', 'first_name', 'last_name'], 'orders': ['id', 'ordered_date', 'status'], ...
39.832237
97
0.670658
from __future__ import unicode_literals import pytest from prompt_toolkit.completion import Completion from prompt_toolkit.document import Document metadata = { 'tables': { 'public': { 'users': ['id', 'email', 'first_name', 'last_name'], 'orders': ['id', 'ordered_date', 'status'], ...
true
true
f7f2c1324c1dd34fb5881c9c11e462dfc4170157
3,359
py
Python
native_dpcpp/blackscholes/GPU/base_bs_erf.py
geexie/dpbench
7d41409ded3c816f35003bc5aea071852bceb892
[ "BSD-2-Clause" ]
8
2021-03-26T15:17:58.000Z
2022-01-21T21:56:19.000Z
native_dpcpp/blackscholes/GPU/base_bs_erf.py
geexie/dpbench
7d41409ded3c816f35003bc5aea071852bceb892
[ "BSD-2-Clause" ]
22
2021-03-30T21:20:57.000Z
2022-02-22T13:42:17.000Z
native_dpcpp/blackscholes/GPU/base_bs_erf.py
geexie/dpbench
7d41409ded3c816f35003bc5aea071852bceb892
[ "BSD-2-Clause" ]
7
2021-03-23T11:00:43.000Z
2022-02-02T12:28:55.000Z
# Copyright (C) 2017-2018 Intel Corporation # # SPDX-License-Identifier: MIT import os import run_utils as utils import numpy as np from dpbench_datagen.blackscholes import gen_data_to_file, gen_rand_data from dpbench_python.blackscholes.bs_python import black_scholes_python # make xrange available in python 3 try: ...
26.448819
87
0.622804
import os import run_utils as utils import numpy as np from dpbench_datagen.blackscholes import gen_data_to_file, gen_rand_data from dpbench_python.blackscholes.bs_python import black_scholes_python try: xrange except NameError: xrange = range def ip_data_to_file(nopt): gen_data_to_file(nopt) def ...
true
true
f7f2c2d80e038cda974b2bbb9b76aa71847ea3ff
3,929
py
Python
main.py
ChaosSmith/nhl_scrape
092ac9b54af87d8b389a546ff49ce6e6970b82d5
[ "MIT" ]
null
null
null
main.py
ChaosSmith/nhl_scrape
092ac9b54af87d8b389a546ff49ce6e6970b82d5
[ "MIT" ]
null
null
null
main.py
ChaosSmith/nhl_scrape
092ac9b54af87d8b389a546ff49ce6e6970b82d5
[ "MIT" ]
null
null
null
# import dependencies import requests import httplib2 from bs4 import BeautifulSoup, SoupStrainer import xlsxwriter def write_out_sheet(sheet_name, data, workbook): ''' Function takes a sheet name and writes the data set out to it. ''' sheet = workbook.add_worksheet(sheet_name) r, c = 0, 0 for row in data: ...
30.937008
121
0.611861
import requests import httplib2 from bs4 import BeautifulSoup, SoupStrainer import xlsxwriter def write_out_sheet(sheet_name, data, workbook): ''' Function takes a sheet name and writes the data set out to it. ''' sheet = workbook.add_worksheet(sheet_name) r, c = 0, 0 for row in data: for col in row: ...
false
true
f7f2c331c4890756e92d8398d438ee65b16dddd6
1,398
py
Python
MyMLFramework/tests.py
fyabc/MSRAPaperProject
2d7974acfe8065523d0c56da695807e94acd0b34
[ "MIT" ]
1
2016-08-17T10:04:30.000Z
2016-08-17T10:04:30.000Z
MyMLFramework/tests.py
fyabc/MSRAPaperProject
2d7974acfe8065523d0c56da695807e94acd0b34
[ "MIT" ]
null
null
null
MyMLFramework/tests.py
fyabc/MSRAPaperProject
2d7974acfe8065523d0c56da695807e94acd0b34
[ "MIT" ]
null
null
null
#! /usr/bin/python3 # -*- encoding: utf-8 -*- from __future__ import unicode_literals, print_function import numpy as np import theano.tensor as T from theano import shared, config from model import SimpleModel, Model from layers.layer import Dense from layers.activations import Activation __author__ = 'fyabc' fX ...
19.690141
97
0.585122
from __future__ import unicode_literals, print_function import numpy as np import theano.tensor as T from theano import shared, config from model import SimpleModel, Model from layers.layer import Dense from layers.activations import Activation __author__ = 'fyabc' fX = config.floatX def testSimpleModel(): ...
true
true
f7f2c3466535e8e6ac4b7670265f158eb643354f
4,313
py
Python
soskids_project/settings.py
cassjs/sos-kids
5afe9e384430fac659bead128d0e274f7b492576
[ "MIT" ]
1
2021-10-11T00:24:41.000Z
2021-10-11T00:24:41.000Z
soskids_project/settings.py
cassjs/sos-kids
5afe9e384430fac659bead128d0e274f7b492576
[ "MIT" ]
null
null
null
soskids_project/settings.py
cassjs/sos-kids
5afe9e384430fac659bead128d0e274f7b492576
[ "MIT" ]
null
null
null
""" Django settings for soskids_project project. Generated by 'django-admin startproject' using Django 3.2.7. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pa...
27.825806
141
0.716902
from pathlib import Path import os .parent S = ['localhost', '127.0.0.1'] # Application definition INSTALLED_APPS = [ 'whitenoise.runserver_nostatic', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', ...
true
true
f7f2c5745c99f33e1ba9349f20a1ec3d73ddab68
1,677
py
Python
volkscv/utils/parser/txt_parse.py
YuxinZou/volkscv
67ac83f0c0ac85bd6606053732b454db17c53de0
[ "Apache-2.0" ]
59
2020-07-09T03:22:51.000Z
2021-12-14T11:26:43.000Z
volkscv/utils/parser/txt_parse.py
YuxinZou/volkscv
67ac83f0c0ac85bd6606053732b454db17c53de0
[ "Apache-2.0" ]
1
2020-11-24T12:18:19.000Z
2020-11-25T03:12:57.000Z
volkscv/utils/parser/txt_parse.py
YuxinZou/volkscv
67ac83f0c0ac85bd6606053732b454db17c53de0
[ "Apache-2.0" ]
24
2020-08-05T03:13:37.000Z
2021-10-11T02:55:25.000Z
import os import numpy as np from .base import BaseParser from .utils import read_imglist class TXTParser(BaseParser): """Class of parser for classification TXT annotation file. xxx.png dog xxx.png cat xxxx.png dog Args: anno_path (str): Path of annotation file. cat...
32.25
77
0.597496
import os import numpy as np from .base import BaseParser from .utils import read_imglist class TXTParser(BaseParser): def __init__(self, categories=None, **kwargs): super(TXTParser, self).__init__(**kwargs) self.categories = categories assert self.img...
true
true
f7f2c729745a44a9b87e740964ef6417cac20c62
6,188
bzl
Python
third_party/repo.bzl
google/tensorstore
8df16a67553debaec098698ceaa5404eaf79634a
[ "BSD-2-Clause" ]
106
2020-04-02T20:00:18.000Z
2022-03-23T20:27:31.000Z
third_party/repo.bzl
0xgpapad/tensorstore
dfc2972e54588a7b745afea8b9322b57b26b657a
[ "BSD-2-Clause" ]
28
2020-04-12T02:04:47.000Z
2022-03-23T20:27:03.000Z
third_party/repo.bzl
0xgpapad/tensorstore
dfc2972e54588a7b745afea8b9322b57b26b657a
[ "BSD-2-Clause" ]
18
2020-04-08T06:41:30.000Z
2022-02-18T03:05:49.000Z
# Copyright 2020 The TensorStore Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
29.75
83
0.624758
load( "@bazel_tools//tools/build_defs/repo:utils.bzl", "patch", "update_attrs", "workspace_and_buildfile", ) load( "@com_google_tensorstore//third_party:python/python_configure.bzl", "get_numpy_include_rule", "get_python_bin", "python_env_vars", ) SYSTEM_LIBS_ENVVAR = "TE...
true
true
f7f2c78332ff84607a1ce026aa8b072a9c51f50d
5,984
py
Python
mi/dataset/parser/adcpt_acfgm_dcl_pd0.py
ronkyo/mi-dataset
5ee2d3a5b66c17500e5f7f1b3e4ba7a996a34c45
[ "BSD-2-Clause" ]
null
null
null
mi/dataset/parser/adcpt_acfgm_dcl_pd0.py
ronkyo/mi-dataset
5ee2d3a5b66c17500e5f7f1b3e4ba7a996a34c45
[ "BSD-2-Clause" ]
null
null
null
mi/dataset/parser/adcpt_acfgm_dcl_pd0.py
ronkyo/mi-dataset
5ee2d3a5b66c17500e5f7f1b3e4ba7a996a34c45
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python """ @package mi.dataset.parser.adcpt_acfgm_dcl_pd0 @file marine-integrations/mi/dataset/parser/adcpt_acfgm_dcl_pd0.py @author Jeff Roy @brief Particle and Parser classes for the adcpt_acfgm_dcl_pd0 drivers The particles are parsed by the common PD0 Parser and Abstract particle class in file adcp_...
39.629139
114
0.608623
import binascii import re import ntplib import mi.dataset.parser.adcp_pd0 as adcp_pd0 from mi.core.common import BaseEnum from mi.core.exceptions import RecoverableSampleException from mi.core.instrument.data_particle import DataParticleKey from mi.core.log import get_logger from mi.dataset.dataset_parser import Pa...
true
true
f7f2c858a40b6136eec70cab12910ffc5f45487e
1,024
py
Python
app/views/main.py
Kbman99/DDoS-Detector-Flask
7c816578ffe0653f59b157e054e6d2bceffb7e10
[ "MIT" ]
null
null
null
app/views/main.py
Kbman99/DDoS-Detector-Flask
7c816578ffe0653f59b157e054e6d2bceffb7e10
[ "MIT" ]
3
2021-06-08T19:36:52.000Z
2022-01-13T00:43:35.000Z
app/views/main.py
Kbman99/DDoS-Detector-Flask
7c816578ffe0653f59b157e054e6d2bceffb7e10
[ "MIT" ]
null
null
null
from flask import render_template from app import app, db, models import sys @app.route('/') @app.route('/index') def index(): return render_template('index.html', title='Home') @app.route('/contact') def contact(): return render_template('contact.html', title='Contact') @app.route('/faq') def faq(): ...
26.25641
94
0.634766
from flask import render_template from app import app, db, models import sys @app.route('/') @app.route('/index') def index(): return render_template('index.html', title='Home') @app.route('/contact') def contact(): return render_template('contact.html', title='Contact') @app.route('/faq') def faq(): ...
true
true
f7f2c89c8abe50aefb9f09ce1b84c84e60526c98
5,688
py
Python
configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512_udp.py
pallgeuer/mmpose
d3c17d5e6bdb9dbaca19f3bf53aa2802105355fd
[ "Apache-2.0" ]
1
2022-02-13T12:27:40.000Z
2022-02-13T12:27:40.000Z
configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512_udp.py
pallgeuer/mmpose
d3c17d5e6bdb9dbaca19f3bf53aa2802105355fd
[ "Apache-2.0" ]
null
null
null
configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512_udp.py
pallgeuer/mmpose
d3c17d5e6bdb9dbaca19f3bf53aa2802105355fd
[ "Apache-2.0" ]
null
null
null
_base_ = [ '../../../../_base_/default_runtime.py', '../../../../_base_/datasets/crowdpose.py' ] checkpoint_config = dict(interval=50) evaluation = dict(interval=50, metric='mAP', save_best='AP') optimizer = dict( type='Adam', lr=0.0015, ) optimizer_config = dict(grad_clip=None) # learning policy lr_co...
28.873096
75
0.568214
_base_ = [ '../../../../_base_/default_runtime.py', '../../../../_base_/datasets/crowdpose.py' ] checkpoint_config = dict(interval=50) evaluation = dict(interval=50, metric='mAP', save_best='AP') optimizer = dict( type='Adam', lr=0.0015, ) optimizer_config = dict(grad_clip=None) lr_config = dict( ...
true
true
f7f2c9a4d81ce4f9c86273a77218d700e90b8fa6
16,495
py
Python
GetTrainingData/Scraping/AvyCenterScraping/AvyCenterScraping/items.py
brendenpelkie/OpenAvalancheProject
0b35c850a5fa9376a639c6607762325cca598600
[ "MIT" ]
52
2018-03-06T22:58:35.000Z
2022-02-21T15:42:02.000Z
GetTrainingData/Scraping/AvyCenterScraping/AvyCenterScraping/items.py
bmiller1881/OpenAvalancheProject
b59529d907c7bbf1f13ae0c7f39b380ac50a09cb
[ "MIT" ]
28
2017-12-04T16:04:32.000Z
2022-02-28T20:51:28.000Z
GetTrainingData/Scraping/AvyCenterScraping/AvyCenterScraping/items.py
bmiller1881/OpenAvalancheProject
b59529d907c7bbf1f13ae0c7f39b380ac50a09cb
[ "MIT" ]
38
2018-03-07T06:04:07.000Z
2021-12-25T20:14:08.000Z
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://doc.scrapy.org/en/latest/topics/items.html import scrapy class AvyScrapingItem(scrapy.Item): image_paths = scrapy.Field() rose_url = scrapy.Field() image_urls = scrapy.Field() image_types = scr...
54.619205
69
0.80194
import scrapy class AvyScrapingItem(scrapy.Item): image_paths = scrapy.Field() rose_url = scrapy.Field() image_urls = scrapy.Field() image_types = scrapy.Field() Region = scrapy.Field() UnifiedRegion = scrapy.Field() PublishedDateTime = scrapy.Field() Day1Date = scrapy.Field() ...
true
true
f7f2ca07e41f6a75ea008fc65cc49e44fa927451
7,907
py
Python
src/qemu/src-pmp/scripts/qapi/introspect.py
pmp-tool/PMP
ef5e05fb4612bb622a9e1039f772c6234b87df7d
[ "MIT" ]
8
2020-09-06T12:49:00.000Z
2022-03-09T04:02:06.000Z
src/qemu/src-pmp/scripts/qapi/introspect.py
newthis/PMP
ef5e05fb4612bb622a9e1039f772c6234b87df7d
[ "MIT" ]
2
2019-07-11T08:02:44.000Z
2019-07-16T09:39:32.000Z
src/qemu/src-pmp/scripts/qapi/introspect.py
newthis/PMP
ef5e05fb4612bb622a9e1039f772c6234b87df7d
[ "MIT" ]
7
2020-09-08T15:14:34.000Z
2021-06-24T18:03:49.000Z
""" QAPI introspection generator Copyright (C) 2015-2018 Red Hat, Inc. Authors: Markus Armbruster <armbru@redhat.com> This work is licensed under the terms of the GNU GPL, version 2. See the COPYING file in the top-level directory. """ from qapi.common import * def to_qlit(obj, level=0, suppress_first_indent=Fal...
35.299107
79
0.563045
from qapi.common import * def to_qlit(obj, level=0, suppress_first_indent=False): def indent(level): return level * 4 * ' ' if isinstance(obj, tuple): ifobj, extra = obj ifcond = extra.get('if') comment = extra.get('comment') ret = '' if comment: ...
true
true
f7f2caee9ef4f10ac29bbdeb31bd85892b8f5854
1,447
py
Python
astrodbkit2/__init__.py
dr-rodriguez/AstrodbKit2
9ad0f403a575fcad5a5e9182c77fdad6485668c2
[ "BSD-3-Clause" ]
2
2020-06-30T19:16:59.000Z
2021-04-27T19:26:50.000Z
astrodbkit2/__init__.py
dr-rodriguez/AstrodbKit2
9ad0f403a575fcad5a5e9182c77fdad6485668c2
[ "BSD-3-Clause" ]
47
2020-06-18T00:10:51.000Z
2022-01-14T18:19:45.000Z
astrodbkit2/__init__.py
dr-rodriguez/AstrodbKit2
9ad0f403a575fcad5a5e9182c77fdad6485668c2
[ "BSD-3-Clause" ]
2
2020-10-07T17:02:20.000Z
2021-04-27T19:26:55.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- # from ._astropy_init import * # noqa # ---------------------------------------...
45.21875
113
0.659295
ll__ = ['__version__'] from .version import version as __version__ except ImportError: __version__ = '' REFERENCE_TABLES = ['Publications', 'Telescopes', 'Instruments', 'Modes', 'Filters', 'PhotometryFilters', 'Citations', 'References'] PRIMARY_TABLE = 'Sources' PRIMARY_TABLE_KE...
true
true
f7f2cb9da94880c0dec66a98227a041d2442c2b7
268
py
Python
flask_basics/app.py
MikelDietz/pythonweb
26b98c9d975c2c592cff419b2ca21e699e0049e2
[ "MIT" ]
null
null
null
flask_basics/app.py
MikelDietz/pythonweb
26b98c9d975c2c592cff419b2ca21e699e0049e2
[ "MIT" ]
null
null
null
flask_basics/app.py
MikelDietz/pythonweb
26b98c9d975c2c592cff419b2ca21e699e0049e2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from flask import Flask app = Flask(__name__) @app.route("/") # decorador def index(): return "Esto es una página Index" @app.route("/info") def info(): return "Info page" # Guard if __name__ == '__main__': app.run(debug=True)
15.764706
37
0.626866
from flask import Flask app = Flask(__name__) @app.route("/") def index(): return "Esto es una página Index" @app.route("/info") def info(): return "Info page" if __name__ == '__main__': app.run(debug=True)
true
true
f7f2cba03b088ec853893164c05dd8df01387dd0
5,573
py
Python
dataent/tests/ui/test_oauth20.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
null
null
null
dataent/tests/ui/test_oauth20.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
6
2020-03-24T17:15:56.000Z
2022-02-10T18:41:31.000Z
dataent/tests/ui/test_oauth20.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Dataent Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import unittest, dataent, requests, time from dataent.test_runner import make_test_records from dataent.utils.selenium_testdriver import TestDriver from six.moves.urllib.parse im...
32.401163
133
0.756505
from __future__ import unicode_literals import unittest, dataent, requests, time from dataent.test_runner import make_test_records from dataent.utils.selenium_testdriver import TestDriver from six.moves.urllib.parse import urlparse, parse_qs class TestOAuth20(unittest.TestCase): def setUp(self): self.driver = Te...
true
true
f7f2ccab942c1ac922f18e0cc872755126c0cd93
1,734
py
Python
pyaz/staticwebapp/functions/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/staticwebapp/functions/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/staticwebapp/functions/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
1
2022-02-03T09:12:01.000Z
2022-02-03T09:12:01.000Z
''' Link or unlink a prexisting functionapp with a static webapp. Also known as "Bring your own Functions." ''' from ... pyaz_utils import _call_az def link(function_resource_id, name, resource_group, force=None): ''' Link an Azure Function to a static webapp. Also known as "Bring your own Functions." Only one...
41.285714
195
0.719723
from ... pyaz_utils import _call_az def link(function_resource_id, name, resource_group, force=None): return _call_az("az staticwebapp functions link", locals()) def unlink(name, resource_group): return _call_az("az staticwebapp functions unlink", locals()) def show(name, resource_group): return _call_...
true
true
f7f2cd206e2f1760345a4f0ef0e69ea3b3ad5a4b
2,256
py
Python
msl/package_manager/cli_update.py
MSLNZ/msl-package-manager
19d3e8624d4408c37d48c195a440cd2714d4765d
[ "MIT" ]
3
2019-01-14T07:51:30.000Z
2022-02-16T22:32:42.000Z
msl/package_manager/cli_update.py
MSLNZ/msl-package-manager
19d3e8624d4408c37d48c195a440cd2714d4765d
[ "MIT" ]
8
2018-06-01T22:00:52.000Z
2021-10-18T00:59:00.000Z
msl/package_manager/cli_update.py
MSLNZ/msl-package-manager
19d3e8624d4408c37d48c195a440cd2714d4765d
[ "MIT" ]
null
null
null
""" Command line interface for the :ref:`update <update-cli>` command. """ from .update import update from .cli_argparse import ( add_argument_all, add_argument_branch, add_argument_package_names, add_argument_tag, add_argument_update_cache, add_argument_yes, add_argument_quiet, add_argu...
28.2
80
0.632092
from .update import update from .cli_argparse import ( add_argument_all, add_argument_branch, add_argument_package_names, add_argument_tag, add_argument_update_cache, add_argument_yes, add_argument_quiet, add_argument_disable_mslpm_version_check, add_argument_commit, ) DESCRIPTION =...
true
true
f7f2cd5ab93bfb8aa5581f917a7f77bca46a7387
679
py
Python
playground/Non_DAG_with_Energy_rllib/utils/episode.py
kangyifei/CloudSimPy
45912e7ea35086b67941624102e400cb22e549ab
[ "MIT" ]
null
null
null
playground/Non_DAG_with_Energy_rllib/utils/episode.py
kangyifei/CloudSimPy
45912e7ea35086b67941624102e400cb22e549ab
[ "MIT" ]
null
null
null
playground/Non_DAG_with_Energy_rllib/utils/episode.py
kangyifei/CloudSimPy
45912e7ea35086b67941624102e400cb22e549ab
[ "MIT" ]
null
null
null
import simpy from core.cluster import Cluster from core.scheduler import Scheduler from core.broker import Broker from core.simulation import Simulation class Episode(object): def __init__(self, machine_configs, task_configs, algorithm, event_file): self.env = simpy.Environment() cluster = Cluster...
30.863636
91
0.709867
import simpy from core.cluster import Cluster from core.scheduler import Scheduler from core.broker import Broker from core.simulation import Simulation class Episode(object): def __init__(self, machine_configs, task_configs, algorithm, event_file): self.env = simpy.Environment() cluster = Cluster...
true
true
f7f2ce3a716e94913a76ebb42ef0359defa4187a
3,641
py
Python
selfdrive/mapd/test/test_NodesData.py
mabdulhussin/openpilot
3988e14c95043c7f1d35bfe5edbd7701fa44f9bb
[ "MIT" ]
12
2021-09-16T04:24:11.000Z
2022-03-18T17:33:21.000Z
selfdrive/mapd/test/test_NodesData.py
mabdulhussin/openpilot
3988e14c95043c7f1d35bfe5edbd7701fa44f9bb
[ "MIT" ]
5
2021-11-14T21:31:07.000Z
2022-02-18T03:03:49.000Z
selfdrive/mapd/test/test_NodesData.py
mabdulhussin/openpilot
3988e14c95043c7f1d35bfe5edbd7701fa44f9bb
[ "MIT" ]
46
2021-09-06T14:51:58.000Z
2022-03-22T14:21:14.000Z
import unittest import numpy as np from numpy.testing import assert_array_almost_equal from selfdrive.mapd.lib.mock_data import MockRoad from selfdrive.mapd.lib.NodesData import vectors class TestNodesData(unittest.TestCase): def test_vectors(self): points = np.radians(MockRoad.road1_points_grad) expected =...
38.326316
51
0.614392
import unittest import numpy as np from numpy.testing import assert_array_almost_equal from selfdrive.mapd.lib.mock_data import MockRoad from selfdrive.mapd.lib.NodesData import vectors class TestNodesData(unittest.TestCase): def test_vectors(self): points = np.radians(MockRoad.road1_points_grad) expected =...
true
true
f7f2ce3c1f7d24082e657ee9aa51186d553fb90e
621
py
Python
akb48/member/uemura_ayako.py
moriyoshi/pyakb48
754666c428f27250d44419a498e61d32c0efa38e
[ "MIT" ]
1
2017-06-23T18:27:49.000Z
2017-06-23T18:27:49.000Z
akb48/member/uemura_ayako.py
moriyoshi/pyakb48
754666c428f27250d44419a498e61d32c0efa38e
[ "MIT" ]
null
null
null
akb48/member/uemura_ayako.py
moriyoshi/pyakb48
754666c428f27250d44419a498e61d32c0efa38e
[ "MIT" ]
null
null
null
# encoding: utf-8 import datetime __all__ = [ 'info', ] def info(): return { 'birthday': datetime.date(1986, 2, 7), 'class': 2, 'family_name_en': u'uemura', 'family_name_kana': u'うえむら', 'first_name_en': u'ayako', 'first_name_kana': u...
25.875
55
0.429952
import datetime __all__ = [ 'info', ] def info(): return { 'birthday': datetime.date(1986, 2, 7), 'class': 2, 'family_name_en': u'uemura', 'family_name_kana': u'うえむら', 'first_name_en': u'ayako', 'first_name_kana': u'あやこ', 'g...
true
true
f7f2cf3a1caafe680f739f43af2812680d8df2e2
2,434
py
Python
evaluation/clustering.py
yongzx/Semi-supervised-Deep-Embedded-Clustering-with-Anomaly-Detection-for-Semantic-Frame-Induction
7ead941bdf50093f1b8dd860cdeb5f04fb223165
[ "MIT" ]
2
2021-01-25T06:45:19.000Z
2021-09-25T14:24:09.000Z
evaluation/clustering.py
yongzx/Semi-supervised-Deep-Embedded-Clustering-with-Anomaly-Detection-for-Semantic-Frame-Induction
7ead941bdf50093f1b8dd860cdeb5f04fb223165
[ "MIT" ]
1
2021-09-12T13:13:57.000Z
2021-09-12T13:13:57.000Z
evaluation/clustering.py
yongzx/Semi-supervised-Deep-Embedded-Clustering-with-Anomaly-Detection-for-Semantic-Frame-Induction
7ead941bdf50093f1b8dd860cdeb5f04fb223165
[ "MIT" ]
2
2020-10-24T16:45:12.000Z
2021-12-31T17:20:07.000Z
# -*- coding: utf-8 -*- """ Created on Nov 04, 2019 @author: yongzhengxin """ import numpy as np from sklearn import metrics import bcubed def purity_score(y_true, y_pred, inv=False): """ :param y_true: true cluster ids :param y_pred: predicted cluster ids :param inv: boolean :return: purity (inv ...
35.794118
160
0.717749
import numpy as np from sklearn import metrics import bcubed def purity_score(y_true, y_pred, inv=False): contingency_matrix = metrics.cluster.contingency_matrix(y_true, y_pred) axis = 0 if not inv else 1 return np.sum(np.amax(contingency_matrix, axis=axis)) / np.sum(contingency_matrix) def ...
true
true
f7f2cfe48daa71f5e054a5315b0b8f110eee234f
92
py
Python
temp_tool.py
Bension/osroom
59148fbaf6068dd700a7f9dfb8e8a6882c2a5e67
[ "BSD-2-Clause" ]
579
2017-11-29T15:34:14.000Z
2022-03-28T13:23:53.000Z
temp_tool.py
Bension/osroom
59148fbaf6068dd700a7f9dfb8e8a6882c2a5e67
[ "BSD-2-Clause" ]
50
2017-07-26T16:44:01.000Z
2022-01-13T00:42:09.000Z
temp_tool.py
Bension/osroom
59148fbaf6068dd700a7f9dfb8e8a6882c2a5e67
[ "BSD-2-Clause" ]
238
2018-05-19T17:31:19.000Z
2022-01-09T08:19:04.000Z
#!/usr/bin/env python # -*-coding:utf-8-*- # @Time : 2020/03/18 22:11 # @Author : Allen Woo
18.4
26
0.597826
true
true
f7f2d3589abb1f699adc7534fbbe8a68cf3a9229
2,749
py
Python
scripts/sequences2graph.py
CGATOxford/Optic
2df92e953b5139ff4e5c383cb4383e6367cd47f1
[ "MIT" ]
null
null
null
scripts/sequences2graph.py
CGATOxford/Optic
2df92e953b5139ff4e5c383cb4383e6367cd47f1
[ "MIT" ]
null
null
null
scripts/sequences2graph.py
CGATOxford/Optic
2df92e953b5139ff4e5c383cb4383e6367cd47f1
[ "MIT" ]
1
2020-03-31T22:55:50.000Z
2020-03-31T22:55:50.000Z
''' sequences2graph.py - align sequences and put them into a graph ============================================================== :Author: Andreas Heger :Release: $Id$ :Date: |today| :Tags: Python Purpose ------- .. todo:: describe purpose of the script. Usage ----- Example:: python sequences2graph.py -...
23.29661
80
0.60422
''' sequences2graph.py - align sequences and put them into a graph ============================================================== :Author: Andreas Heger :Release: $Id$ :Date: |today| :Tags: Python Purpose ------- .. todo:: describe purpose of the script. Usage ----- Example:: python sequences2graph.py -...
false
true
f7f2d397ca6a8fdb502887ccca802d2ba62bf68f
399
py
Python
challenges/how-to-check-if-a-key-exists-in-a-dictionary/test_case_insensitive_lookup.py
TheRenegadeCoder/how-to-python-code
6a285f0578ab61b73cb2b9debe3cf503a5c49031
[ "MIT" ]
69
2020-01-28T04:21:21.000Z
2021-12-06T22:57:06.000Z
challenges/how-to-check-if-a-key-exists-in-a-dictionary/test_case_insensitive_lookup.py
TheRenegadeCoder/how-to-python-code
6a285f0578ab61b73cb2b9debe3cf503a5c49031
[ "MIT" ]
22
2020-01-31T07:45:51.000Z
2021-06-20T21:52:32.000Z
challenges/how-to-check-if-a-key-exists-in-a-dictionary/test_case_insensitive_lookup.py
TheRenegadeCoder/how-to-python-code
6a285f0578ab61b73cb2b9debe3cf503a5c49031
[ "MIT" ]
29
2020-01-31T07:05:31.000Z
2021-11-01T18:47:31.000Z
import case_insensitive_lookup from inspect import getmembers, isfunction def test_case_insensitive_lookup_capital(): dictionary = { "shrub": "a woody plant which is smaller than a tree and has several main stems arising at or near the ground." } for _, value in getmembers(case_insensitive_lookup,...
36.272727
119
0.739348
import case_insensitive_lookup from inspect import getmembers, isfunction def test_case_insensitive_lookup_capital(): dictionary = { "shrub": "a woody plant which is smaller than a tree and has several main stems arising at or near the ground." } for _, value in getmembers(case_insensitive_lookup,...
true
true
f7f2d39f6c59155980450ce750d3396400d19fd1
786
py
Python
nstschema/validate.py
nst-guide/table-schemas
08513003d4c3ae911f34e81cfd45f107159325a8
[ "MIT" ]
1
2019-12-05T00:11:07.000Z
2019-12-05T00:11:07.000Z
nstschema/validate.py
nst-guide/table-schemas
08513003d4c3ae911f34e81cfd45f107159325a8
[ "MIT" ]
13
2019-12-04T07:47:53.000Z
2021-09-02T03:24:37.000Z
nstschema/validate.py
nst-guide/table-schemas
08513003d4c3ae911f34e81cfd45f107159325a8
[ "MIT" ]
null
null
null
import json import jsonschema from pkg_resources import resource_filename schema_dir = resource_filename('nstschema', 'schemas') resolver = jsonschema.RefResolver('file://' + schema_dir + '/', None) def validate(instance, schema_name): """Validate JSON against schema Args: - instance (dict): JSON i...
27.103448
72
0.70229
import json import jsonschema from pkg_resources import resource_filename schema_dir = resource_filename('nstschema', 'schemas') resolver = jsonschema.RefResolver('file://' + schema_dir + '/', None) def validate(instance, schema_name): schema_path = get_schema_path(schema_name.lower()) with open(schema_path...
true
true
f7f2d40a02d4161844b66a234cbeb29b88f1c9c5
8,171
py
Python
tensorflow/contrib/lite/python/lite.py
Steward3103/Tensorflow
1039ff9ee8c8c7ed09f9bb106131a50285866dd4
[ "Apache-2.0" ]
8
2015-12-05T05:30:57.000Z
2016-11-08T13:07:40.000Z
tensorflow/contrib/lite/python/lite.py
Steward3103/Tensorflow
1039ff9ee8c8c7ed09f9bb106131a50285866dd4
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/lite/python/lite.py
Steward3103/Tensorflow
1039ff9ee8c8c7ed09f9bb106131a50285866dd4
[ "Apache-2.0" ]
4
2015-12-05T05:31:07.000Z
2016-08-19T06:29:50.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.004651
109
0.72023
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.lite.python import lite_constants as constants from tensorflow.contrib.lite.python.convert import tensor_name from tensorflow.contrib.lite.python.convert import toco_conver...
true
true
f7f2d4c36dbb1fb14227ba8d961ca96ce80f6cfc
4,778
py
Python
main/tools/certificates/management/commands/issue_certificate_single.py
csev/class2go
f9419ae16448d20fc882170f95cfd1c4dc3331ca
[ "Apache-2.0" ]
2
2015-10-31T23:12:52.000Z
2021-01-19T11:03:00.000Z
main/tools/certificates/management/commands/issue_certificate_single.py
Andymic/class2go
45a457e89790cb83942d24ada816357dc91b8fe4
[ "Apache-2.0" ]
null
null
null
main/tools/certificates/management/commands/issue_certificate_single.py
Andymic/class2go
45a457e89790cb83942d24ada816357dc91b8fe4
[ "Apache-2.0" ]
null
null
null
from optparse import make_option try: import xhtml2pdf as xhtml2pdfImportTest except ImportError, msg: xhtml2pdfImportTest = False from django.conf import settings from django.contrib.auth.models import User from django.core.mail import send_mail from django.core.management.base import BaseCommand, CommandErro...
50.294737
150
0.657388
from optparse import make_option try: import xhtml2pdf as xhtml2pdfImportTest except ImportError, msg: xhtml2pdfImportTest = False from django.conf import settings from django.contrib.auth.models import User from django.core.mail import send_mail from django.core.management.base import BaseCommand, CommandErro...
false
true
f7f2d5dc4cedfad2ff2f357e59a2ac2158a31eba
1,063
py
Python
articles/articles/web/migrations/0001_initial.py
Xamaneone/Django-Projects
4fac8659680a6448bb55bce008bfd0eac1ad1f6d
[ "MIT" ]
null
null
null
articles/articles/web/migrations/0001_initial.py
Xamaneone/Django-Projects
4fac8659680a6448bb55bce008bfd0eac1ad1f6d
[ "MIT" ]
null
null
null
articles/articles/web/migrations/0001_initial.py
Xamaneone/Django-Projects
4fac8659680a6448bb55bce008bfd0eac1ad1f6d
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-07-30 18:17 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Source', fields=[ ...
31.264706
117
0.560677
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Source', fields=[ ('id', models.BigAutoField(auto_created...
true
true
f7f2d61278618e3b6dbe8d8b86df56cbd7480a36
3,730
py
Python
world/magic/test_utils.py
dvoraen/arxcode
a89f2004fca10e0b1f1995c2420dd3ffbf08774b
[ "MIT" ]
42
2018-08-12T00:55:24.000Z
2021-12-24T15:16:08.000Z
world/magic/test_utils.py
dvoraen/arxcode
a89f2004fca10e0b1f1995c2420dd3ffbf08774b
[ "MIT" ]
312
2018-10-22T23:03:27.000Z
2022-02-06T13:02:58.000Z
world/magic/test_utils.py
dvoraen/arxcode
a89f2004fca10e0b1f1995c2420dd3ffbf08774b
[ "MIT" ]
42
2018-08-12T00:41:48.000Z
2022-01-27T14:03:16.000Z
from world.magic.models import * from server.utils.test_utils import ArxTest from evennia.utils import create from world.crafting.models import CraftingRecipe from world.traits.models import Trait _PENDING_MAGIC_NOTIFY = [] def override_roll_magic(self, difficulty): return 10 def override_notify_magic(text): ...
33.909091
112
0.659517
from world.magic.models import * from server.utils.test_utils import ArxTest from evennia.utils import create from world.crafting.models import CraftingRecipe from world.traits.models import Trait _PENDING_MAGIC_NOTIFY = [] def override_roll_magic(self, difficulty): return 10 def override_notify_magic(text): ...
true
true
f7f2d6fd5ca3874686aee1e7e008c3b77771a5d0
3,903
py
Python
volcengine_ml_platform/innerapi/base_client.py
volc-mlplatform/ml-platform-sdk-python
2d85e23c10a1f3c008da0f1a8ea59c277c750233
[ "MIT" ]
null
null
null
volcengine_ml_platform/innerapi/base_client.py
volc-mlplatform/ml-platform-sdk-python
2d85e23c10a1f3c008da0f1a8ea59c277c750233
[ "MIT" ]
null
null
null
volcengine_ml_platform/innerapi/base_client.py
volc-mlplatform/ml-platform-sdk-python
2d85e23c10a1f3c008da0f1a8ea59c277c750233
[ "MIT" ]
null
null
null
import json import logging import threading from typing import Dict from typing import Union import requests from volcengine.ApiInfo import ApiInfo import volcengine_ml_platform from volcengine_ml_platform import constant from volcengine_ml_platform.util import metric INNER_API_INFOS = {} BodyDict = Dict[str, Uni...
27.878571
91
0.571612
import json import logging import threading from typing import Dict from typing import Union import requests from volcengine.ApiInfo import ApiInfo import volcengine_ml_platform from volcengine_ml_platform import constant from volcengine_ml_platform.util import metric INNER_API_INFOS = {} BodyDict = Dict[str, Uni...
true
true
f7f2d7d1a0a85693c9875840438989e959d7caab
4,365
py
Python
contrib/devtools/logprint-scanner.py
estilodevida/npccoin
bbabcfdd65a1decb6502b890143487e35f94bede
[ "MIT" ]
3
2019-04-12T16:42:59.000Z
2019-07-29T19:53:57.000Z
contrib/devtools/logprint-scanner.py
estilodevida/npccoin
bbabcfdd65a1decb6502b890143487e35f94bede
[ "MIT" ]
2
2016-12-23T20:25:39.000Z
2019-06-30T19:13:15.000Z
contrib/devtools/logprint-scanner.py
estilodevida/npccoin
bbabcfdd65a1decb6502b890143487e35f94bede
[ "MIT" ]
2
2016-12-22T14:34:01.000Z
2019-06-29T11:29:24.000Z
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The NPCcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import os, sys from subprocess import check_output def countRelevantCommas(line): openParensPosStack = []...
42.378641
167
0.568385
import os, sys from subprocess import check_output def countRelevantCommas(line): openParensPosStack = [] openParensPos = 0 charCounter = 0 numRelevantCommas = 0 firstOpenParensIndex = line.find("(") for char in line: if char == '(': openParensPosStack.append(charCount...
true
true
f7f2d9237e91a48ff311b1de03f70b2e01dacde9
7,533
py
Python
mars/lib/groupby_wrapper.py
aporia-ai/aporia-mars
fbebef726f80282b151971849d0b2bc0246c9b58
[ "Apache-2.0" ]
1
2022-02-02T03:03:48.000Z
2022-02-02T03:03:48.000Z
mars/lib/groupby_wrapper.py
5hv5hvnk/mars
faf098a8113b402197a5bdccd175768bc353cb27
[ "Apache-2.0" ]
null
null
null
mars/lib/groupby_wrapper.py
5hv5hvnk/mars
faf098a8113b402197a5bdccd175768bc353cb27
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2021 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-2.0 # # Unless required by applicable law or a...
28.642586
88
0.563786
import sys from collections.abc import Iterable import cloudpickle import numpy as np from pandas.core.groupby import DataFrameGroupBy, SeriesGroupBy from ..utils import estimate_pandas_size, pd_release_version _HAS_SQUEEZE = pd_release_version < (1, 1, 0) class GroupByWrapper: def __init__( ...
true
true
f7f2d9aa38c57b2254cd71598c0c654f7222ac89
996
py
Python
touroute/touroute/urls.py
oscarlamasrios/toroute
5b00c0f606f438229e7857f25a23c4d51ff34293
[ "Apache-2.0" ]
null
null
null
touroute/touroute/urls.py
oscarlamasrios/toroute
5b00c0f606f438229e7857f25a23c4d51ff34293
[ "Apache-2.0" ]
null
null
null
touroute/touroute/urls.py
oscarlamasrios/toroute
5b00c0f606f438229e7857f25a23c4d51ff34293
[ "Apache-2.0" ]
null
null
null
"""touroute URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-b...
38.307692
79
0.7249
from django.conf.urls import url from django.contrib import admin from django.conf.urls import url,include from django.conf import settings from django.conf.urls.static import static urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'tours/', include('tourouteapp.urls')), ]
true
true
f7f2da31bf748569fde6fce1da382b9159d384b6
81
py
Python
testData/refactor/renamePythonFunctionKeywordArgument.py
alek-sun/pydantic-pycharm-plugin
6b07519aadf0ff8b8a644c1f9ede88e09c687c80
[ "Apache-2.0", "MIT" ]
238
2019-08-05T12:46:09.000Z
2022-03-25T08:53:25.000Z
testData/refactor/renamePythonFunctionKeywordArgument.py
alek-sun/pydantic-pycharm-plugin
6b07519aadf0ff8b8a644c1f9ede88e09c687c80
[ "Apache-2.0", "MIT" ]
415
2019-07-15T17:39:35.000Z
2022-03-31T01:18:38.000Z
testData/refactor/renamePythonFunctionKeywordArgument.py
collerek/pydantic-pycharm-plugin
7068ece42334cc9fbe927d779d199c86d5139888
[ "Apache-2.0", "MIT" ]
7
2019-08-09T01:03:16.000Z
2022-02-08T03:28:19.000Z
from pydantic import BaseModel def a(abc='abc'): pass a(a<caret>bc='abc')
10.125
30
0.654321
from pydantic import BaseModel def a(abc='abc'): pass a(a<caret>bc='abc')
false
true
f7f2da833d14707df1b54a2daf8f2eeff4d7ffa2
10,015
py
Python
sdk/python/pulumi_azure_nextgen/network/v20200801/virtual_network_tap.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/network/v20200801/virtual_network_tap.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/network/v20200801/virtual_network_tap.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
50.326633
1,427
0.690864
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['VirtualNetworkTap'] class VirtualNetworkTap(pulumi.CustomResource): def __init__(__...
true
true
f7f2da8f08e0b059ff87220f31a1d2931d5e5f02
199
py
Python
Unit 07 Lists and Functions/01 Lists and Functions/Using the entire list in a Function/16-Using strings in lists in functions.py
lpython2006e/python-samples
b94ba67ce0d7798ecf796dadae206aa75da58301
[ "MIT" ]
null
null
null
Unit 07 Lists and Functions/01 Lists and Functions/Using the entire list in a Function/16-Using strings in lists in functions.py
lpython2006e/python-samples
b94ba67ce0d7798ecf796dadae206aa75da58301
[ "MIT" ]
null
null
null
Unit 07 Lists and Functions/01 Lists and Functions/Using the entire list in a Function/16-Using strings in lists in functions.py
lpython2006e/python-samples
b94ba67ce0d7798ecf796dadae206aa75da58301
[ "MIT" ]
null
null
null
n = ["Michael", "Lieberman"] # Add your function here def join_strings(words): result = "" for i in range(len(words)): result += words[i] return result print(join_strings(n))
15.307692
31
0.61809
n = ["Michael", "Lieberman"] def join_strings(words): result = "" for i in range(len(words)): result += words[i] return result print(join_strings(n))
true
true
f7f2dc374b88d369e3b217524883bba81cdd73ea
433
py
Python
carpyncho1/carpyncho/middleware.py
carpyncho/yeolde_carpyncho
fba72ebf9d4a3e4e4ea18160310058c6812a0457
[ "BSD-3-Clause" ]
null
null
null
carpyncho1/carpyncho/middleware.py
carpyncho/yeolde_carpyncho
fba72ebf9d4a3e4e4ea18160310058c6812a0457
[ "BSD-3-Clause" ]
2
2020-06-05T19:37:26.000Z
2020-06-05T19:40:38.000Z
carpyncho1/carpyncho/middleware.py
carpyncho/yeolde_carpyncho
fba72ebf9d4a3e4e4ea18160310058c6812a0457
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.http import JsonResponse import six class CarpynchoErrorMiddleware(object): def process_exception(self, request, err): data = { "error_type": type(err).__name__, "msg": six.text_typ...
20.619048
46
0.60739
from __future__ import unicode_literals from django.http import JsonResponse import six class CarpynchoErrorMiddleware(object): def process_exception(self, request, err): data = { "error_type": type(err).__name__, "msg": six.text_type(err), "path": request.path, ...
true
true
f7f2dd33254bf154e372ce455da226d7cfbe9002
1,221
py
Python
rl_traders/models.py
jjakimoto/rl_traders.py
d5411c96d49ba6a54751d12cdd11974e5cc1a8aa
[ "MIT" ]
2
2018-10-07T14:16:32.000Z
2019-01-28T00:14:29.000Z
rl_traders/models.py
jjakimoto/rl_traders.py
d5411c96d49ba6a54751d12cdd11974e5cc1a8aa
[ "MIT" ]
null
null
null
rl_traders/models.py
jjakimoto/rl_traders.py
d5411c96d49ba6a54751d12cdd11974e5cc1a8aa
[ "MIT" ]
1
2019-11-05T00:51:20.000Z
2019-11-05T00:51:20.000Z
import torch import torch.nn as nn import torch.nn.functional as F from torch_utils.models import FeedForward class EIIEFeedForwarad(nn.Module): def __init__(self, model_params, cash_bias): super(EIIEFeedForwarad, self).__init__() self.lower_model = FeedForward(model_params['lower_params']) ...
38.15625
69
0.677314
import torch import torch.nn as nn import torch.nn.functional as F from torch_utils.models import FeedForward class EIIEFeedForwarad(nn.Module): def __init__(self, model_params, cash_bias): super(EIIEFeedForwarad, self).__init__() self.lower_model = FeedForward(model_params['lower_params']) ...
true
true
f7f2dfb6cf7e55972da961bd524b662398941fc0
2,936
py
Python
lib/surface/run/jobs/describe.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/run/jobs/describe.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/run/jobs/describe.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
33.363636
74
0.733992
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.run import connection_context from googlecloudsdk.command_lib.run import exceptions from googlecloudsdk.command_lib.run i...
true
true
f7f2dfdf55f1fde84f99c713b689479454f6e33f
46,209
py
Python
salt/modules/win_service.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
salt/modules/win_service.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
salt/modules/win_service.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Windows Service module. .. versionchanged:: 2016.11.0 - Rewritten to use PyWin32 """ # Import Python libs from __future__ import absolute_import, print_function, unicode_literals import fnmatch import logging import re import time import salt.utils.path # Import Salt libs import salt.ut...
30.90903
96
0.618819
""" Windows Service module. .. versionchanged:: 2016.11.0 - Rewritten to use PyWin32 """ from __future__ import absolute_import, print_function, unicode_literals import fnmatch import logging import re import time import salt.utils.path import salt.utils.platform import salt.utils.path from salt.exceptions impo...
false
true
f7f2e1452d5b223dfcb42e24541eb811a671312e
9,658
py
Python
src/drive_handler.py
arlessweschler/kodi-strm
ff807080a2c4086a788cba72daa3afae68e217e6
[ "MIT" ]
7
2021-08-29T03:03:11.000Z
2021-12-20T07:11:55.000Z
src/drive_handler.py
roshanconnor123/kodi-strm
60790ab59637e0c9bdd06c39198d3f54bc72a3d6
[ "MIT" ]
131
2021-06-12T11:17:23.000Z
2022-03-28T06:07:23.000Z
src/drive_handler.py
roshanconnor123/kodi-strm
60790ab59637e0c9bdd06c39198d3f54bc72a3d6
[ "MIT" ]
2
2020-11-08T13:45:51.000Z
2021-08-05T00:58:21.000Z
from collections import deque from os.path import exists as path_exists from os.path import join as join_path from pickle import dump as dump_pickle from pickle import load as load_pickle from typing import Any, Callable, Dict, List, Optional, Tuple import googleapiclient import googleapiclient.discovery as discovery ...
36.172285
88
0.566888
from collections import deque from os.path import exists as path_exists from os.path import join as join_path from pickle import dump as dump_pickle from pickle import load as load_pickle from typing import Any, Callable, Dict, List, Optional, Tuple import googleapiclient import googleapiclient.discovery as discovery ...
true
true
f7f2e242535bc61affc1fdefcb67cd127c3df201
1,011
py
Python
BoyleCohen2008/PythonSupport/Main_Version/input_vars.py
openworm/muscle_model
960097d6112779a6868721761e134779f1bb338a
[ "MIT" ]
31
2015-01-02T22:18:54.000Z
2021-09-03T10:08:35.000Z
BoyleCohen2008/PythonSupport/Main_Version/input_vars.py
openworm/muscle_model
960097d6112779a6868721761e134779f1bb338a
[ "MIT" ]
41
2015-01-02T21:55:42.000Z
2018-01-25T17:56:31.000Z
BoyleCohen2008/PythonSupport/Main_Version/input_vars.py
openworm/muscle_model
960097d6112779a6868721761e134779f1bb338a
[ "MIT" ]
23
2015-01-02T20:58:20.000Z
2021-11-21T14:57:03.000Z
#!/usr/bin/python # Data import, separated into its own module for reuse in other scripts. # Importing data f = open('../../MatlabSupport/Main_Version/data/input.csv') data = f.read().splitlines() f.close() # Model parameters Cmem = float(data[0]) gKS = float(data[1]) * Cmem gKF = float(data[2]) * Cmem gCa = float(...
24.658537
93
0.660732
f = open('../../MatlabSupport/Main_Version/data/input.csv') data = f.read().splitlines() f.close() Cmem = float(data[0]) gKS = float(data[1]) * Cmem gKF = float(data[2]) * Cmem gCa = float(data[3]) * Cmem gL = float(data[4]) * Cmem VKS = float(data[5]) VKF = float(data[6]) VCa = float(data[7]) VL = 10e-3; loat(...
true
true
f7f2e27721458fa338700c713fab554b7079ba6e
3,639
py
Python
pyhgvs/utils.py
anergictcell/hgvs
1a84e36619ccd33b45d2ff38dc06a23efd4cb698
[ "MIT" ]
1
2018-07-27T18:59:12.000Z
2018-07-27T18:59:12.000Z
pyhgvs/utils.py
anergictcell/hgvs
1a84e36619ccd33b45d2ff38dc06a23efd4cb698
[ "MIT" ]
null
null
null
pyhgvs/utils.py
anergictcell/hgvs
1a84e36619ccd33b45d2ff38dc06a23efd4cb698
[ "MIT" ]
1
2019-10-27T07:39:33.000Z
2019-10-27T07:39:33.000Z
""" Helper functions. """ from .models import Exon from .models import Position from .models import Transcript def read_refgene(infile): """ Iterate through a refGene file. GenePred extension format: http://genome.ucsc.edu/FAQ/FAQformat.html#GenePredExt Column definitions: 0. uint undocumen...
32.20354
79
0.556746
from .models import Exon from .models import Position from .models import Transcript def read_refgene(infile): for line in infile: if line.startswith('#'): continue row = line.rstrip('\n').split('\t') exon_starts = list(map(int, row[9].split(',')[:-1])) ...
true
true
f7f2e47a3884850540c33d09e0ed68db1fd75ac5
4,823
py
Python
python/pynn_utils.py
volr/myelin
aaae7ab6f6db85c60fd7940accbb834e0068752e
[ "BSD-3-Clause" ]
null
null
null
python/pynn_utils.py
volr/myelin
aaae7ab6f6db85c60fd7940accbb834e0068752e
[ "BSD-3-Clause" ]
null
null
null
python/pynn_utils.py
volr/myelin
aaae7ab6f6db85c60fd7940accbb834e0068752e
[ "BSD-3-Clause" ]
null
null
null
import pyNN import addict def clean_parameters(parameters): del parameters['type'] return parameters def create_edge(pynn, nodes, edge): """Create a pyNN edge. Args: nodes (addict.Dict): Graph nodes that have been created so far. edge (addict.Dict): pyNN edge to be created. Retur...
32.587838
106
0.653535
import pyNN import addict def clean_parameters(parameters): del parameters['type'] return parameters def create_edge(pynn, nodes, edge): if not isinstance(nodes[edge.output.id], pynn.Population): return None projection_type = edge.projection_type.kind connector = None projection = No...
true
true
f7f2e680f413f23c7ce4407035d0f106602b1bfd
4,788
py
Python
utils/data_loaders.py
tubamuzzaffar/RACT
6c0a44eb795c3b54a0d43e424cb80c400b306197
[ "Apache-2.0" ]
null
null
null
utils/data_loaders.py
tubamuzzaffar/RACT
6c0a44eb795c3b54a0d43e424cb80c400b306197
[ "Apache-2.0" ]
null
null
null
utils/data_loaders.py
tubamuzzaffar/RACT
6c0a44eb795c3b54a0d43e424cb80c400b306197
[ "Apache-2.0" ]
null
null
null
from scipy import sparse import pandas as pd import numpy as np import os import tensorflow as tf def load_train_data(csv_file, n_items): tp = pd.read_csv(csv_file) n_users = tp['uid'].max() + 1 rows, cols = tp['uid'], tp['sid'] data = sparse.csr_matrix((np.ones_like(rows), (rows, cols)), ...
36
103
0.681495
from scipy import sparse import pandas as pd import numpy as np import os import tensorflow as tf def load_train_data(csv_file, n_items): tp = pd.read_csv(csv_file) n_users = tp['uid'].max() + 1 rows, cols = tp['uid'], tp['sid'] data = sparse.csr_matrix((np.ones_like(rows), (rows, cols)), ...
true
true
f7f2e684a43c8984453ff2f59ed94f18a5706f40
257
py
Python
hooks/hook-Crypto-local.py
fakegit/DEXBot
44588f0cd7beb5f50508d966054d5f929818bf76
[ "MIT" ]
249
2018-01-11T09:08:30.000Z
2022-03-20T23:05:29.000Z
hooks/hook-Crypto.py
g3d/DEXBot
a2b1462d78d7154cb10871a7cec9a44c8d6664de
[ "MIT" ]
541
2018-01-10T12:56:08.000Z
2021-12-22T02:22:09.000Z
hooks/hook-Crypto.py
g3d/DEXBot
a2b1462d78d7154cb10871a7cec9a44c8d6664de
[ "MIT" ]
164
2018-01-22T07:01:56.000Z
2022-03-21T06:00:33.000Z
# Hook for pycryptodome extensions hiddenimports = [ 'Crypto.Cipher._chacha20', 'Crypto.Cipher._raw_aes', 'Crypto.Cipher._raw_ecb', 'Crypto.Cipher._raw_cbc', 'Crypto.Hash._SHA256', 'Crypto.Util._cpuid', 'Crypto.Util._strxor', ]
21.416667
34
0.673152
hiddenimports = [ 'Crypto.Cipher._chacha20', 'Crypto.Cipher._raw_aes', 'Crypto.Cipher._raw_ecb', 'Crypto.Cipher._raw_cbc', 'Crypto.Hash._SHA256', 'Crypto.Util._cpuid', 'Crypto.Util._strxor', ]
true
true
f7f2e6f04b3147499a9ac83401273f2279dc66b7
16,361
py
Python
python/gogame_board/chessboard.py
voicevon/gogame_bot
a1d91f4a1b2537d00b5cd5ed78d429a9c1aad3d1
[ "MIT" ]
null
null
null
python/gogame_board/chessboard.py
voicevon/gogame_bot
a1d91f4a1b2537d00b5cd5ed78d429a9c1aad3d1
[ "MIT" ]
null
null
null
python/gogame_board/chessboard.py
voicevon/gogame_bot
a1d91f4a1b2537d00b5cd5ed78d429a9c1aad3d1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys sys.path.append('/home/xm/gitrepo/gogame_bot/python') from app_global.color_print import CONST from app_global.gogame_config import app_config from chessboard_cell import ChessboardCell import logging class ChessboardLayout(): def __init__(self,name):...
37.353881
124
0.559807
import sys sys.path.append('/home/xm/gitrepo/gogame_bot/python') from app_global.color_print import CONST from app_global.gogame_config import app_config from chessboard_cell import ChessboardCell import logging class ChessboardLayout(): def __init__(self,name): self.name = name self._ROW...
true
true
f7f2e76ed1c613bb05637b811859300a61769b4a
43,948
py
Python
moler/device/textualdevice.py
nokia/moler
13cb3d1329a8904ac074f269b8c9ec1955e3ae30
[ "BSD-3-Clause" ]
57
2018-02-20T08:16:47.000Z
2022-03-28T10:36:57.000Z
moler/device/textualdevice.py
nokia/moler
13cb3d1329a8904ac074f269b8c9ec1955e3ae30
[ "BSD-3-Clause" ]
377
2018-07-19T11:56:27.000Z
2021-07-09T13:08:12.000Z
moler/device/textualdevice.py
nokia/moler
13cb3d1329a8904ac074f269b8c9ec1955e3ae30
[ "BSD-3-Clause" ]
24
2018-04-14T20:49:40.000Z
2022-03-29T10:44:26.000Z
# -*- coding: utf-8 -*- """ Moler's device has 2 main responsibilities: - be the factory that returns commands of that device - be the state machine that controls which commands may run in given state """ __author__ = 'Grzegorz Latuszek, Marcin Usielski, Michal Ernst' __copyright__ = 'Copyright (C) 2018-2021, Nokia' __...
42.585271
139
0.640188
__author__ = 'Grzegorz Latuszek, Marcin Usielski, Michal Ernst' __copyright__ = 'Copyright (C) 2018-2021, Nokia' __email__ = 'grzegorz.latuszek@nokia.com, marcin.usielski@nokia.com, michal.ernst@nokia.com' import abc import functools import importlib import inspect import logging import logging import pkgutil import ...
true
true
f7f2e8ab4b12db1eb3cb14f967c9d417c0033919
600
py
Python
handywedge-documents/developper-guide/japanesesupport.py
cstudioteam/csfw
0026ffcba329c0f1e82ea17b9619112d9068a279
[ "MIT" ]
2
2016-02-02T05:46:35.000Z
2016-08-31T13:05:08.000Z
handywedge-documents/developper-guide/japanesesupport.py
cstudioteam/csFrame
0026ffcba329c0f1e82ea17b9619112d9068a279
[ "MIT" ]
21
2020-03-05T01:04:47.000Z
2021-12-15T01:03:52.000Z
handywedge-documents/developper-guide/japanesesupport.py
cstudioteam/csFrame
0026ffcba329c0f1e82ea17b9619112d9068a279
[ "MIT" ]
1
2020-05-10T03:53:06.000Z
2020-05-10T03:53:06.000Z
def trunc_whitespace(app, doctree, docname): from docutils.nodes import Text, paragraph if not app.config.japanesesupport_trunc_whitespace: return for node in doctree.traverse(Text): if isinstance(node.parent, paragraph): newtext = node.astext() for c in "\n\r\t": ...
40
72
0.655
def trunc_whitespace(app, doctree, docname): from docutils.nodes import Text, paragraph if not app.config.japanesesupport_trunc_whitespace: return for node in doctree.traverse(Text): if isinstance(node.parent, paragraph): newtext = node.astext() for c in "\n\r\t": ...
true
true
f7f2e95eebe8855fa23130ed38a6309ade11c2a0
18,069
py
Python
sdk/python/pulumi_azure/servicefabric/mesh_secret_value.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/servicefabric/mesh_secret_value.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/servicefabric/mesh_secret_value.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
47.301047
227
0.666335
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['MeshSecretValueArgs', 'MeshSecretValue'] @pulumi.input_type class MeshSecretValueArgs: def __init__(__self__, *, service_fabric_mesh_s...
true
true
f7f2ea8ed8d0ce5361196c1880c6f23deaa08797
2,569
py
Python
src/containers/collections/elementary/dicts.py
yitistica/containers
c71a470e5e3844bd07950f197178a1ce308a6087
[ "MIT" ]
1
2021-07-17T05:49:03.000Z
2021-07-17T05:49:03.000Z
src/containers/collections/elementary/dicts.py
yitistica/containers
c71a470e5e3844bd07950f197178a1ce308a6087
[ "MIT" ]
null
null
null
src/containers/collections/elementary/dicts.py
yitistica/containers
c71a470e5e3844bd07950f197178a1ce308a6087
[ "MIT" ]
null
null
null
""" pop by condition; """ from containers.core.base import MutableMappingBase from containers.collections.elementary.sets import OrderedSet from containers.collections.elementary.views.common import MixedMapperView, StrView from containers.collections.elementary.views.mapping import OrderedItemsView from containers.col...
29.528736
104
0.693655
from containers.core.base import MutableMappingBase from containers.collections.elementary.sets import OrderedSet from containers.collections.elementary.views.common import MixedMapperView, StrView from containers.collections.elementary.views.mapping import OrderedItemsView from containers.collections.elementary.views....
true
true
f7f2ea8fe5bbd30baef91a61383109a0a94ac298
10,005
py
Python
sha.py
GavRobbs/PolyCollider
12de5d4e84b217d0c16846667bb881eb34aa1532
[ "MIT" ]
null
null
null
sha.py
GavRobbs/PolyCollider
12de5d4e84b217d0c16846667bb881eb34aa1532
[ "MIT" ]
null
null
null
sha.py
GavRobbs/PolyCollider
12de5d4e84b217d0c16846667bb881eb34aa1532
[ "MIT" ]
null
null
null
import epa import sat from utils.utilbase import * class SutherlandHodgemanAlgorithm: def __init__(self, polyA, polyB, normal, penetrationDepth): self.polygonA = polyA self.polygonB = polyB self.polyAPoints = polyA.getTransformedPoints()[0] self.polyBPoints = polyB.getTransformedPoi...
39.235294
136
0.622989
import epa import sat from utils.utilbase import * class SutherlandHodgemanAlgorithm: def __init__(self, polyA, polyB, normal, penetrationDepth): self.polygonA = polyA self.polygonB = polyB self.polyAPoints = polyA.getTransformedPoints()[0] self.polyBPoints = polyB.getTransformedPoi...
true
true
f7f2eabf49894705305e5ddaecf66c59a5a6e24b
813
py
Python
example/staticlib-demo/BUILD.py
adinosaur/configure
0c2bf44a8dff2312dc201da75d86798a8df07671
[ "MIT" ]
6
2021-05-25T03:18:45.000Z
2022-01-08T04:37:36.000Z
example/staticlib-demo/BUILD.py
adinosaur/configure
0c2bf44a8dff2312dc201da75d86798a8df07671
[ "MIT" ]
null
null
null
example/staticlib-demo/BUILD.py
adinosaur/configure
0c2bf44a8dff2312dc201da75d86798a8df07671
[ "MIT" ]
null
null
null
# -*- coding=utf-8 -*- from __main__ import StaticLibraryTarget import os class StaticLibraryDemo(StaticLibraryTarget): def __init__(self): super(StaticLibraryDemo, self).__init__() if os.name == 'posix': self.name = 'example/staticlib-demo/liby.a' self.cxxflags = ...
36.954545
69
0.484625
from __main__ import StaticLibraryTarget import os class StaticLibraryDemo(StaticLibraryTarget): def __init__(self): super(StaticLibraryDemo, self).__init__() if os.name == 'posix': self.name = 'example/staticlib-demo/liby.a' self.cxxflags = ['-g'] ...
true
true
f7f2eae71c091511ad2ebc5b46e2d38c6e239851
3,101
py
Python
enaml/qt/qt_application.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
11
2015-03-14T14:30:51.000Z
2022-03-15T13:01:44.000Z
enaml/qt/qt_application.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
3
2015-01-31T11:12:56.000Z
2022-03-14T00:53:25.000Z
enaml/qt/qt_application.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
4
2015-01-27T01:56:14.000Z
2021-02-23T07:21:20.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
29.817308
79
0.555627
from atom.api import Typed from enaml.application import Application, ProxyResolver from .QtCore import QThread from .QtGui import QApplication from .q_deferred_caller import deferredCall, timedCall from .qt_factories import QT_FACTORIES class QtApplication(Application): _qapp = Typed(QApplication)...
true
true
f7f2eb0e2e6909d58955a74f94d232ab7d6aa942
2,456
py
Python
threads/authenticatorThread.py
jacobzeransky/python-multiplayerserver
fb965ba911f808e1de0619347c5b689b7dd2681d
[ "MIT" ]
null
null
null
threads/authenticatorThread.py
jacobzeransky/python-multiplayerserver
fb965ba911f808e1de0619347c5b689b7dd2681d
[ "MIT" ]
null
null
null
threads/authenticatorThread.py
jacobzeransky/python-multiplayerserver
fb965ba911f808e1de0619347c5b689b7dd2681d
[ "MIT" ]
null
null
null
#Python import os, time import threading, queue import authenticatorModule # thread that handles authentication requests pulled from the authentication queue class authenticatorThread(threading.Thread): def __init__(self, auth_q, event_q): threading.Thread.__init__(self) self.authq = auth_q ...
40.933333
98
0.524837
import os, time import threading, queue import authenticatorModule class authenticatorThread(threading.Thread): def __init__(self, auth_q, event_q): threading.Thread.__init__(self) self.authq = auth_q self.events = event_q self.authm = authenticatorModule.authentic...
true
true
f7f2ebef6b8660e93b0038d757715935e43946fd
3,636
py
Python
src/ir_receiver/redis_boundary.py
mpsamurai/ir-receiver
10d325fdb47864a0fd24dbbed3e1bb03e9fcf453
[ "MIT" ]
1
2019-09-27T10:47:39.000Z
2019-09-27T10:47:39.000Z
src/ir_receiver/redis_boundary.py
mpsamurai/neochi-ir-receiver
10d325fdb47864a0fd24dbbed3e1bb03e9fcf453
[ "MIT" ]
1
2019-04-27T09:39:37.000Z
2019-04-28T07:31:41.000Z
src/ir_receiver/redis_boundary.py
mpsamurai/neochi-ir-receiver
10d325fdb47864a0fd24dbbed3e1bb03e9fcf453
[ "MIT" ]
1
2019-04-30T05:00:04.000Z
2019-04-30T05:00:04.000Z
import redis import logging from neochi.core.dataflow.data import ir_receiver as data from neochi.core.dataflow import data_types from neochi.core.dataflow.notifications import ir_receiver as notification logger = logging.getLogger(__name__) sh = logging.StreamHandler() logger.addHandler(sh) """ Redisとの通信を行うクラス Red...
31.344828
112
0.691419
import redis import logging from neochi.core.dataflow.data import ir_receiver as data from neochi.core.dataflow import data_types from neochi.core.dataflow.notifications import ir_receiver as notification logger = logging.getLogger(__name__) sh = logging.StreamHandler() logger.addHandler(sh) class RedisBoundary: ...
true
true
f7f2ebf185024a79aa4e776a1bbea8bb635f7bf1
3,475
py
Python
stable/ibm-spectrum-scale-csi-operator-bundle/operators/ibm-spectrum-scale-csi-operator/hacks/package_operator.py
yadaven/ibm-spectrum-scale-csi-operator
de78ca25da5bc63b38fcece2ee8e28c850725e2a
[ "Apache-2.0" ]
null
null
null
stable/ibm-spectrum-scale-csi-operator-bundle/operators/ibm-spectrum-scale-csi-operator/hacks/package_operator.py
yadaven/ibm-spectrum-scale-csi-operator
de78ca25da5bc63b38fcece2ee8e28c850725e2a
[ "Apache-2.0" ]
null
null
null
stable/ibm-spectrum-scale-csi-operator-bundle/operators/ibm-spectrum-scale-csi-operator/hacks/package_operator.py
yadaven/ibm-spectrum-scale-csi-operator
de78ca25da5bc63b38fcece2ee8e28c850725e2a
[ "Apache-2.0" ]
null
null
null
#!/bin/python import argparse import sys import os import yaml import zipfile from shutil import copyfile BASE_DIR="{0}/..".format(os.path.dirname(os.path.realpath(__file__))) OLM_CATALOG="{0}/deploy/olm-catalog".format(BASE_DIR) OPERATOR="{0}/ibm-spectrum-scale-csi-operator".format(OLM_CATALOG) #PACKAGE_FILE="ibm-sp...
29.201681
99
0.670504
import argparse import sys import os import yaml import zipfile from shutil import copyfile BASE_DIR="{0}/..".format(os.path.dirname(os.path.realpath(__file__))) OLM_CATALOG="{0}/deploy/olm-catalog".format(BASE_DIR) OPERATOR="{0}/ibm-spectrum-scale-csi-operator".format(OLM_CATALOG) PACKAGE_POSTFIX="package.yaml" ...
true
true
f7f2ec7ce3d30ccdca5cb8c4147c16152ea5f8a4
23,716
py
Python
trcopo_optim/trcopo.py
manish-pra/trcopo
df8730f07ef554970c7a0aa653cc42d4886948ec
[ "MIT" ]
5
2020-06-22T17:13:51.000Z
2021-11-02T14:19:58.000Z
trcopo_optim/trcopo.py
manish-pra/trcopo
df8730f07ef554970c7a0aa653cc42d4886948ec
[ "MIT" ]
null
null
null
trcopo_optim/trcopo.py
manish-pra/trcopo
df8730f07ef554970c7a0aa653cc42d4886948ec
[ "MIT" ]
1
2020-09-14T06:41:03.000Z
2020-09-14T06:41:03.000Z
import math import time import torch import torch.autograd as autograd from torch.distributions import Categorical from trcopo_optim.utils import zero_grad, conjugate_gradient, general_conjugate_gradient, conjugate_gradient_2trpo, conjugate_gradient_trpo import scipy.sparse.linalg as lin from scipy.sparse.linalg impo...
39.526667
155
0.55861
import math import time import torch import torch.autograd as autograd from torch.distributions import Categorical from trcopo_optim.utils import zero_grad, conjugate_gradient, general_conjugate_gradient, conjugate_gradient_2trpo, conjugate_gradient_trpo import scipy.sparse.linalg as lin from scipy.sparse.linalg impo...
true
true
f7f2ec7d59c742a78eebecebcf3328ab6075107f
2,053
py
Python
src/optimModels/utils/constantes.py
sousamd/optimModels
b11d26eb72f19da0b97abbd4fb6513de06a348ef
[ "Apache-2.0" ]
null
null
null
src/optimModels/utils/constantes.py
sousamd/optimModels
b11d26eb72f19da0b97abbd4fb6513de06a348ef
[ "Apache-2.0" ]
null
null
null
src/optimModels/utils/constantes.py
sousamd/optimModels
b11d26eb72f19da0b97abbd4fb6513de06a348ef
[ "Apache-2.0" ]
null
null
null
class optimType: REACTION_KO = 1 REACTION_UO = 2 GENE_KO = 3 GENE_UO = 4 MEDIUM = 5 MEDIUM_LEVELS = 6 MEDIUM_REACTION_KO = 7 MEDIUM_REACTION_UO = 8 COMPOSITION = 9 PROTEIN_KO = 10 PROTEIN_UO = 11 types = {1: "Reaction Knockouts", 2: "Reaction Under/Over expression", 3: "...
28.123288
109
0.588407
class optimType: REACTION_KO = 1 REACTION_UO = 2 GENE_KO = 3 GENE_UO = 4 MEDIUM = 5 MEDIUM_LEVELS = 6 MEDIUM_REACTION_KO = 7 MEDIUM_REACTION_UO = 8 COMPOSITION = 9 PROTEIN_KO = 10 PROTEIN_UO = 11 types = {1: "Reaction Knockouts", 2: "Reaction Under/Over expression", 3: "...
true
true
f7f2ec920c87c85d0e31e39de73b6cd64193c573
1,292
py
Python
src/plottoolbox/skill_metrics/index_agreement.py
timcera/plottoolbox
b5f4b634d366eb5ba244e2f1fd33a7ef0eba7298
[ "BSD-3-Clause" ]
5
2016-10-13T18:06:41.000Z
2021-06-29T19:47:36.000Z
src/tstoolbox/skill_metrics/index_agreement.py
timcera/tstoolbox
a32fa399d96082f01b7eedfd6c8893bdb881845c
[ "BSD-3-Clause" ]
21
2016-04-28T16:48:03.000Z
2021-12-16T18:07:07.000Z
src/plottoolbox/skill_metrics/index_agreement.py
timcera/plottoolbox
b5f4b634d366eb5ba244e2f1fd33a7ef0eba7298
[ "BSD-3-Clause" ]
3
2018-03-21T21:07:52.000Z
2021-01-22T20:07:49.000Z
# -*- coding: utf-8 -*- import numpy as np from . import utils def index_agreement(simulated, observed): """ Calculate the index of agreement. Calculates the index of agreement between two variables simulated and observed. The index_agreement is calculated using the formula: index_agreement...
26.367347
74
0.584365
import numpy as np from . import utils def index_agreement(simulated, observed): utils.check_arrays(simulated, observed) index_agreement = 1.0 - ( np.sum((observed - simulated) ** 2) / ( np.sum( ( np.abs(simulated - np.mean(observed)...
true
true
f7f2ede77476e4e46c192b4627b03f4a1959464b
2,482
py
Python
honeybot/plugins/downloaded/blackjack/poker_assets/deck.py
hailenwashere/honeybot
95a6cd54283db1dcd4b33b9d281a7f6e1056ec09
[ "MIT" ]
60
2019-06-04T13:57:38.000Z
2021-10-19T10:17:56.000Z
honeybot/plugins/downloaded/blackjack/poker_assets/deck.py
hailenwashere/honeybot
95a6cd54283db1dcd4b33b9d281a7f6e1056ec09
[ "MIT" ]
70
2019-06-04T13:59:53.000Z
2021-10-05T10:14:16.000Z
honeybot/plugins/downloaded/blackjack/poker_assets/deck.py
hailenwashere/honeybot
95a6cd54283db1dcd4b33b9d281a7f6e1056ec09
[ "MIT" ]
95
2019-06-04T15:13:42.000Z
2021-08-09T17:15:35.000Z
""" deck class """ # pylint: disable=E1601, W0612 import random import card class Deck(object): """ deck class """ colors = ["C", "D", "H", "S"] figures = ["2", "3", "4", "5", "6", "7", "8", "9", "T", "J", "Q", "K", "A"] i = 0 for color in colors: for figure in figures: l...
22.563636
79
0.504835
import random import card class Deck(object): colors = ["C", "D", "H", "S"] figures = ["2", "3", "4", "5", "6", "7", "8", "9", "T", "J", "Q", "K", "A"] i = 0 for color in colors: for figure in figures: locals()["card%s" % i] = card.Card(figure + color) i += 1 ...
true
true
f7f2ee86bc95ee90f06090e0c5603cf15f88cf87
1,544
py
Python
tests/did/test_did.py
dbluhm/aries-sdk-python
aa3298574bcb754b1212e0baa9d23c4b0ea7a241
[ "Apache-2.0" ]
2
2019-08-29T10:49:09.000Z
2019-09-24T13:54:50.000Z
tests/did/test_did.py
dbluhm/aries-sdk-python
aa3298574bcb754b1212e0baa9d23c4b0ea7a241
[ "Apache-2.0" ]
1
2019-09-24T09:11:21.000Z
2019-11-19T12:44:06.000Z
tests/did/test_did.py
dbluhm/aries-sdk-python
aa3298574bcb754b1212e0baa9d23c4b0ea7a241
[ "Apache-2.0" ]
7
2019-06-04T16:45:49.000Z
2019-09-29T01:44:13.000Z
import json import pytest from tests import async_mock from ariespython import did @pytest.mark.parametrize( 'mocked_method, method_to_test, before_dict, after_dict', [ ('indy.did.create_and_store_my_did', did.create_and_store_my_did, [], []), ('indy.did.create_key', did.create_key, [], []),...
33.565217
90
0.665155
import json import pytest from tests import async_mock from ariespython import did @pytest.mark.parametrize( 'mocked_method, method_to_test, before_dict, after_dict', [ ('indy.did.create_and_store_my_did', did.create_and_store_my_did, [], []), ('indy.did.create_key', did.create_key, [], []),...
true
true
f7f2ef6ecc4a224fe488ce72e84c2abac1756724
6,158
py
Python
tests/test_utils.py
dobraczka/pystow
d7d66bf87dc3eeb266f6020621649ca8b68be6a4
[ "MIT" ]
null
null
null
tests/test_utils.py
dobraczka/pystow
d7d66bf87dc3eeb266f6020621649ca8b68be6a4
[ "MIT" ]
null
null
null
tests/test_utils.py
dobraczka/pystow
d7d66bf87dc3eeb266f6020621649ca8b68be6a4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Tests for utilities.""" import hashlib import os import tempfile import unittest from pathlib import Path import numpy as np import pandas as pd from pystow.utils import ( HexDigestError, download, getenv_path, mkdir, mock_envvar, n, name_from_url, read_tar...
32.240838
85
0.57811
import hashlib import os import tempfile import unittest from pathlib import Path import numpy as np import pandas as pd from pystow.utils import ( HexDigestError, download, getenv_path, mkdir, mock_envvar, n, name_from_url, read_tarfile_csv, read_zip_np, read_zipfile_csv, ...
true
true
f7f2f02c36c75d2ce89f2528372ad490e00a5bcb
451
py
Python
titanicapi/api/views.py
chrisgschon/titanic-django
bf54db1d2e3d05af61c92acb2291bc24d03bb075
[ "MIT" ]
8
2019-05-11T01:17:52.000Z
2022-03-15T04:14:17.000Z
titanicapi/api/views.py
chrisgschon/titanic-django
bf54db1d2e3d05af61c92acb2291bc24d03bb075
[ "MIT" ]
null
null
null
titanicapi/api/views.py
chrisgschon/titanic-django
bf54db1d2e3d05af61c92acb2291bc24d03bb075
[ "MIT" ]
7
2019-11-04T11:53:03.000Z
2021-05-07T15:20:03.000Z
from django.shortcuts import render, get_object_or_404, redirect from rest_framework.views import APIView from rest_framework.response import Response import json from .functions import classify_passenger, load_model class get_classification(APIView): def post(self, request): model = load_model('./api/titanic_...
32.214286
64
0.78714
from django.shortcuts import render, get_object_or_404, redirect from rest_framework.views import APIView from rest_framework.response import Response import json from .functions import classify_passenger, load_model class get_classification(APIView): def post(self, request): model = load_model('./api/titanic_...
true
true
f7f2f18896a110ed5b33e2c06de0632206b4a482
12,970
py
Python
plynx/plugins/executors/dag.py
plynx-team/plynx
4b53ca3500c629f1c0201cc8f4910a1f2a276a32
[ "Apache-2.0" ]
100
2020-03-12T05:14:48.000Z
2022-03-30T09:26:53.000Z
plynx/plugins/executors/dag.py
plynx-team/plynx
4b53ca3500c629f1c0201cc8f4910a1f2a276a32
[ "Apache-2.0" ]
48
2020-03-12T00:54:51.000Z
2022-03-15T02:52:14.000Z
plynx/plugins/executors/dag.py
plynx-team/plynx
4b53ca3500c629f1c0201cc8f4910a1f2a276a32
[ "Apache-2.0" ]
24
2020-04-23T03:14:37.000Z
2022-03-27T12:10:49.000Z
import logging import time from collections import defaultdict from plynx.constants import ParameterTypes from plynx.db.node import Node, Parameter from plynx.db.validation_error import ValidationError from plynx.constants import NodeRunningStatus, ValidationTargetType, ValidationCode, SpecialNodeId, Collections from p...
40.404984
125
0.619044
import logging import time from collections import defaultdict from plynx.constants import ParameterTypes from plynx.db.node import Node, Parameter from plynx.db.validation_error import ValidationError from plynx.constants import NodeRunningStatus, ValidationTargetType, ValidationCode, SpecialNodeId, Collections from p...
true
true
f7f2f218daf5de3cc04ecc6f7d7ca5a68f9b3255
7,882
py
Python
Data.py
exchhattu/MolPro-pyTorch
8dfeb0be4b855741fbc66396a27d7ae0607e161d
[ "MIT" ]
null
null
null
Data.py
exchhattu/MolPro-pyTorch
8dfeb0be4b855741fbc66396a27d7ae0607e161d
[ "MIT" ]
null
null
null
Data.py
exchhattu/MolPro-pyTorch
8dfeb0be4b855741fbc66396a27d7ae0607e161d
[ "MIT" ]
null
null
null
''' Written by: Rojan Shrestha PhD Mon Nov 18 17:35:38 2019 ''' import sys, os, errno import numpy as np import flowio # pip install FlowIO class FCdata: def __init__(self, path_to_dir, path_to_label_data, path_to_marker): """ Params: st_path_to_file: st_path_to_label: st_path...
31.277778
96
0.610886
import sys, os, errno import numpy as np import flowio class FCdata: def __init__(self, path_to_dir, path_to_label_data, path_to_marker): self._ma_data = {} self._Xtrains = [] self._Xvalids = [] self._Xtest = [] self._Ytrains = [] self._Yvalids = [] self._Ytest ...
true
true
f7f2f21a45621522806bd4958316295271bcbb1c
10,650
py
Python
as5env/lib/python3.6/site-packages/spacy/training/initialize.py
RasmusVestiH/RV_cds_language2
dc548a00985d24affc0411cec2e471b4db2a95be
[ "MIT" ]
1
2021-04-11T18:38:20.000Z
2021-04-11T18:38:20.000Z
spacy/training/initialize.py
Findus23/spaCy
61472e7cb385c6ca578dce2f4301fb27666e058b
[ "BSD-3-Clause", "MIT" ]
null
null
null
spacy/training/initialize.py
Findus23/spaCy
61472e7cb385c6ca578dce2f4301fb27666e058b
[ "BSD-3-Clause", "MIT" ]
null
null
null
from typing import Union, Dict, Optional, Any, IO, TYPE_CHECKING from thinc.api import Config, fix_random_seed, set_gpu_allocator from thinc.api import ConfigValidationError from pathlib import Path import srsly import numpy import tarfile import gzip import zipfile import tqdm from .pretrain import get_tok2vec_ref fr...
40.188679
86
0.65277
from typing import Union, Dict, Optional, Any, IO, TYPE_CHECKING from thinc.api import Config, fix_random_seed, set_gpu_allocator from thinc.api import ConfigValidationError from pathlib import Path import srsly import numpy import tarfile import gzip import zipfile import tqdm from .pretrain import get_tok2vec_ref fr...
true
true
f7f2f2251dcd62647a1e1691024e97b13a67f17d
3,033
py
Python
test/test_identity.py
passbase/passbase-python
9d5b9cf21b38c2a50fe3755084ef8291d9e2d4d9
[ "MIT" ]
8
2020-09-09T14:30:46.000Z
2020-10-19T14:09:00.000Z
test/test_identity.py
passbase/passbase-python
9d5b9cf21b38c2a50fe3755084ef8291d9e2d4d9
[ "MIT" ]
null
null
null
test/test_identity.py
passbase/passbase-python
9d5b9cf21b38c2a50fe3755084ef8291d9e2d4d9
[ "MIT" ]
1
2021-04-23T21:05:19.000Z
2021-04-23T21:05:19.000Z
# coding: utf-8 """ Verification API # Introduction <span class=\"subtext\"> Welcome to the Passbase Verifications API docs. This documentation will help you understand our models and the Verification API with its endpoints. Based on this you can build your own system (i.e. verification) and hook it up to Pa...
75.825
2,289
0.702275
from __future__ import absolute_import import unittest import passbase from passbase.models.identity import Identity from passbase.rest import ApiException class TestIdentity(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testIdentity(self): ...
true
true
f7f2f2f1d2a0744f861ff58e1d3ddc2a57a7a3ca
29
py
Python
opy/development/tests/builtin_bug/b.py
nm17/Opy
d7f4ab2c97fc9e307b741dbd9689554266b6ccac
[ "Apache-2.0" ]
284
2016-10-16T20:07:52.000Z
2022-03-11T00:54:42.000Z
opy/development/tests/builtin_bug/b.py
urantialife/Opy
d7f4ab2c97fc9e307b741dbd9689554266b6ccac
[ "Apache-2.0" ]
32
2016-12-27T19:56:34.000Z
2021-12-02T18:47:10.000Z
opy/development/tests/builtin_bug/b.py
urantialife/Opy
d7f4ab2c97fc9e307b741dbd9689554266b6ccac
[ "Apache-2.0" ]
67
2016-10-19T02:38:23.000Z
2022-01-25T04:32:55.000Z
print ('b', type (builtins))
14.5
28
0.62069
print ('b', type (builtins))
true
true
f7f2f328b93559c0f4d7ebd83ec662c8ffe768a6
21,391
py
Python
src/controller/python/chip/ChipDeviceCtrl.py
hnnajh/connectedhomeip
249a6c65a820c711d23135d38eec0ab288d3f38f
[ "Apache-2.0" ]
null
null
null
src/controller/python/chip/ChipDeviceCtrl.py
hnnajh/connectedhomeip
249a6c65a820c711d23135d38eec0ab288d3f38f
[ "Apache-2.0" ]
null
null
null
src/controller/python/chip/ChipDeviceCtrl.py
hnnajh/connectedhomeip
249a6c65a820c711d23135d38eec0ab288d3f38f
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2020-2021 Project CHIP Authors # Copyright (c) 2019-2020 Google, LLC. # Copyright (c) 2013-2018 Nest Labs, 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 o...
40.590133
119
0.68253
from __future__ import absolute_import from __future__ import print_function import asyncio from ctypes import * from .ChipStack import * from .clusters.CHIPClusters import * from .interaction_model import delegate as im from .exceptions import * from .clusters import Command as ClusterCommand ...
true
true
f7f2f3580adee836b106ec9e706bd48c41d200c7
6,066
py
Python
Lib/asyncio/windows_utils.py
highfestiva/CPython
225a8b08e49cb5d0161860be97471790797d890f
[ "PSF-2.0" ]
36
2015-02-04T10:43:31.000Z
2022-03-30T13:01:12.000Z
Lib/asyncio/windows_utils.py
highfestiva/CPython
225a8b08e49cb5d0161860be97471790797d890f
[ "PSF-2.0" ]
9
2015-03-17T05:56:16.000Z
2021-11-17T09:31:50.000Z
Lib/asyncio/windows_utils.py
highfestiva/CPython
225a8b08e49cb5d0161860be97471790797d890f
[ "PSF-2.0" ]
22
2015-05-13T17:37:35.000Z
2022-01-25T06:24:42.000Z
""" Various Windows specific bits and pieces """ import sys if sys.platform != 'win32': # pragma: no cover raise ImportError('win32 only') import socket import itertools import msvcrt import os import subprocess import tempfile import _winapi __all__ = ['socketpair', 'pipe', 'Popen', 'PIPE', 'PipeHandle'] #...
29.163462
79
0.604517
import sys if sys.platform != 'win32': raise ImportError('win32 only') import socket import itertools import msvcrt import os import subprocess import tempfile import _winapi __all__ = ['socketpair', 'pipe', 'Popen', 'PIPE', 'PipeHandle'] BUFSIZE = 8192 PIPE = subprocess.PIPE STDOUT = subprocess.STDOUT ...
true
true
f7f2f47f2765a152b8cb0431724c83189b5b9a72
4,936
py
Python
ultron8/cli.py
bossjones/ultron8
45db73d32542a844570d44bc83defa935e15803f
[ "Apache-2.0", "MIT" ]
null
null
null
ultron8/cli.py
bossjones/ultron8
45db73d32542a844570d44bc83defa935e15803f
[ "Apache-2.0", "MIT" ]
43
2019-06-01T23:08:32.000Z
2022-02-07T22:24:53.000Z
ultron8/cli.py
bossjones/ultron8
45db73d32542a844570d44bc83defa935e15803f
[ "Apache-2.0", "MIT" ]
null
null
null
import os import sys from typing import Tuple # import pdb import click from ultron8.client import UltronAPI from ultron8.config import ConfigManager, do_set_flag from ultron8.config.manager import ConfigProxy, NullConfig from ultron8.core.files import load_json_file from ultron8.core.workspace import CliWorkspace, ...
33.808219
201
0.676661
import os import sys from typing import Tuple import click from ultron8.client import UltronAPI from ultron8.config import ConfigManager, do_set_flag from ultron8.config.manager import ConfigProxy, NullConfig from ultron8.core.files import load_json_file from ultron8.core.workspace import CliWorkspace, prep_default...
true
true
f7f2f60c8a7a82fe036ccf3f946ea3c8633ce4de
2,676
py
Python
documentstore_migracao/processing/conversion.py
jamilatta/document-store-migracao
dc0473fb3ccf8c6c5f8d599b353f8c9caf104f55
[ "BSD-2-Clause" ]
null
null
null
documentstore_migracao/processing/conversion.py
jamilatta/document-store-migracao
dc0473fb3ccf8c6c5f8d599b353f8c9caf104f55
[ "BSD-2-Clause" ]
null
null
null
documentstore_migracao/processing/conversion.py
jamilatta/document-store-migracao
dc0473fb3ccf8c6c5f8d599b353f8c9caf104f55
[ "BSD-2-Clause" ]
null
null
null
import os import logging from tqdm import tqdm from lxml import etree from typing import List from xylose.scielodocument import Journal, Issue from documentstore_migracao.utils import files, xml, string, xylose_converter from documentstore_migracao.export.sps_package import SPS_Package from documentstore_migracao impo...
30.409091
82
0.72272
import os import logging from tqdm import tqdm from lxml import etree from typing import List from xylose.scielodocument import Journal, Issue from documentstore_migracao.utils import files, xml, string, xylose_converter from documentstore_migracao.export.sps_package import SPS_Package from documentstore_migracao impo...
true
true
f7f2f685c33330c24dd855d8460fd98b821f17de
1,025
py
Python
Python 3/zaehlebuchstaben.py
gabrielwolf/5-python-kurse
cabc2b6706f6f384963c026749fd39eb042736c6
[ "MIT" ]
null
null
null
Python 3/zaehlebuchstaben.py
gabrielwolf/5-python-kurse
cabc2b6706f6f384963c026749fd39eb042736c6
[ "MIT" ]
null
null
null
Python 3/zaehlebuchstaben.py
gabrielwolf/5-python-kurse
cabc2b6706f6f384963c026749fd39eb042736c6
[ "MIT" ]
null
null
null
import string print('Häufigkeit von Buchstaben eines Textes.') fname = input('Welche Datei soll verwendet werden? ') #fname = 'mbox.txt' try: fhand = open(fname,'r+') except: print('Datei konnte nicht geöffnet werden:', fname) exit() file = fhand.read() file = file.lower() # nur Kleinbu...
24.404762
62
0.623415
import string print('Häufigkeit von Buchstaben eines Textes.') fname = input('Welche Datei soll verwendet werden? ') try: fhand = open(fname,'r+') except: print('Datei konnte nicht geöffnet werden:', fname) exit() file = fhand.read() file = file.lower() file = file.replace(' ', '') ...
true
true
f7f2f7502a9a526663bdac4e149560ca8770d052
318
py
Python
my_wsgi_server/config.py
fucangyu/myself-impls
9fd2730f9e0e12f95559d2f4e41c34b670441428
[ "MIT" ]
3
2019-01-04T12:54:16.000Z
2019-01-13T07:08:10.000Z
my_wsgi_server/config.py
fucangyu/myself-impls
9fd2730f9e0e12f95559d2f4e41c34b670441428
[ "MIT" ]
null
null
null
my_wsgi_server/config.py
fucangyu/myself-impls
9fd2730f9e0e12f95559d2f4e41c34b670441428
[ "MIT" ]
1
2019-08-27T18:29:53.000Z
2019-08-27T18:29:53.000Z
import socket SERVER_NAME = 'WSGIServer 0.1' SERVER_HOST = 'localhost' SERVER_PORT = 8888 SERVER_NAME = socket.getfqdn(SERVER_HOST) SERVER_TYPE = "coroutine" # "process" SERVER = 'coroutine_server.WSGIServerByCoroutine' # SERVER = 'process_server.WSGIServerByProcess' REQUEST_QUEUE_SIZE = 1024 URL_SCHEME = 'http'
22.714286
49
0.786164
import socket SERVER_NAME = 'WSGIServer 0.1' SERVER_HOST = 'localhost' SERVER_PORT = 8888 SERVER_NAME = socket.getfqdn(SERVER_HOST) SERVER_TYPE = "coroutine" SERVER = 'coroutine_server.WSGIServerByCoroutine' REQUEST_QUEUE_SIZE = 1024 URL_SCHEME = 'http'
true
true
f7f2f849c3855f890652be34facfb7cd8823a95f
3,392
py
Python
src/python/pants/backend/python/rules/importable_python_sources_test.py
pyranja/pants
f48b32a61e2d3f017a115fb0ce6cb044f53e36d6
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/python/rules/importable_python_sources_test.py
pyranja/pants
f48b32a61e2d3f017a115fb0ce6cb044f53e36d6
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/python/rules/importable_python_sources_test.py
pyranja/pants
f48b32a61e2d3f017a115fb0ce6cb044f53e36d6
[ "Apache-2.0" ]
2
2020-05-18T18:43:11.000Z
2020-05-19T02:47:47.000Z
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from typing import List, Type from pants.backend.python.rules.importable_python_sources import ImportablePythonSources from pants.backend.python.rules.importable_python_sources import ( ...
38.545455
97
0.65566
from typing import List, Type from pants.backend.python.rules.importable_python_sources import ImportablePythonSources from pants.backend.python.rules.importable_python_sources import ( rules as importable_python_sources_rules, ) from pants.backend.python.target_types import PythonSources from pants.core.target...
true
true
f7f2f8fa8b8445ff4cab07a8644d0f4f2493cfd4
3,259
py
Python
src/openfermion/measurements/vpe_estimators_test.py
Emieeel/OpenFermion
c19d9667c5970473893f9bc0183556c4cd354dd7
[ "Apache-2.0" ]
null
null
null
src/openfermion/measurements/vpe_estimators_test.py
Emieeel/OpenFermion
c19d9667c5970473893f9bc0183556c4cd354dd7
[ "Apache-2.0" ]
null
null
null
src/openfermion/measurements/vpe_estimators_test.py
Emieeel/OpenFermion
c19d9667c5970473893f9bc0183556c4cd354dd7
[ "Apache-2.0" ]
2
2020-11-13T04:40:47.000Z
2020-11-13T04:41:01.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribu...
31.95098
76
0.687941
import pytest import numpy import pandas import cirq from .vpe_estimators import ( PhaseFitEstimator, get_phase_function, ) rng = numpy.random.RandomState(seed=42) def test_requests_simulation_at_pi_for_pauli(): estimator = PhaseFitEstimator(evals=[-1, +1]) sim_points = estimator.get_sim...
true
true
f7f2f931e6eff78df40929024d724134b2cfc098
17,932
py
Python
xrftomo/widgets/reconstruction.py
FabricioSMarin/XRFtomo
f5c9f6411bea9a85082d943af873e83f81431e5a
[ "BSD-3-Clause" ]
null
null
null
xrftomo/widgets/reconstruction.py
FabricioSMarin/XRFtomo
f5c9f6411bea9a85082d943af873e83f81431e5a
[ "BSD-3-Clause" ]
null
null
null
xrftomo/widgets/reconstruction.py
FabricioSMarin/XRFtomo
f5c9f6411bea9a85082d943af873e83f81431e5a
[ "BSD-3-Clause" ]
null
null
null
# ######################################################################### # Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved. # # # # Software Name: XRFtomo # # ...
44.942356
130
0.615157
(self): element = self.ViewControl.combo1.currentIndex() self.updateElementSlot(element) self.elementChangedSig.emit(element) def updateElementSlot(self, element): self.ViewControl.combo1.setCurrentIndex(element) def call_reconMultiply(self): self.recon = self.actions.r...
true
true
f7f2f9f65d08aefb503c0cb988c34d4be67a5643
330
py
Python
Easy/rearrange_spaces_between_words.py
BrynjarGeir/LeetCode
dbd57e645c5398dec538b6466215b61491c8d1d9
[ "MIT" ]
null
null
null
Easy/rearrange_spaces_between_words.py
BrynjarGeir/LeetCode
dbd57e645c5398dec538b6466215b61491c8d1d9
[ "MIT" ]
null
null
null
Easy/rearrange_spaces_between_words.py
BrynjarGeir/LeetCode
dbd57e645c5398dec538b6466215b61491c8d1d9
[ "MIT" ]
null
null
null
class Solution: def reorderSpaces(self, text: str) -> str: wo = text.split() if len(wo) == 1: return wo[0] + ' '*text.count(' ') sp = text.count(' ') be = sp//(len(wo)-1) af = sp - (sp//(len(wo)-1))*(len(wo)-1) ans = ' '*be ans = ans.join(wo) + ' '*af ...
33
59
0.445455
class Solution: def reorderSpaces(self, text: str) -> str: wo = text.split() if len(wo) == 1: return wo[0] + ' '*text.count(' ') sp = text.count(' ') be = sp//(len(wo)-1) af = sp - (sp//(len(wo)-1))*(len(wo)-1) ans = ' '*be ans = ans.join(wo) + ' '*af ...
true
true
f7f2fa5a5335a5bd912a70f8600b05e930c83a54
209
py
Python
ImageNewsMatching/pke/unsupervised/__init__.py
zhlnhn/ImageNewsMatching
a9ebfc5f7669621cfc37510d6d9476a7b7a86eaa
[ "MIT" ]
null
null
null
ImageNewsMatching/pke/unsupervised/__init__.py
zhlnhn/ImageNewsMatching
a9ebfc5f7669621cfc37510d6d9476a7b7a86eaa
[ "MIT" ]
null
null
null
ImageNewsMatching/pke/unsupervised/__init__.py
zhlnhn/ImageNewsMatching
a9ebfc5f7669621cfc37510d6d9476a7b7a86eaa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Python Keyphrase Extraction toolkit: unsupervised models from __future__ import absolute_import from pke.unsupervised.statistical import * from pke.unsupervised.graph_based import *
29.857143
58
0.799043
from __future__ import absolute_import from pke.unsupervised.statistical import * from pke.unsupervised.graph_based import *
true
true
f7f2fabcf691143fb4f531066bde23758073563f
2,456
py
Python
src/create_es_df_to_csv.py
VasilisNtousis/Hilti_Project_Cyber_Aware
175f9343462175de5d0f24eacf285bd27f12b399
[ "MIT" ]
null
null
null
src/create_es_df_to_csv.py
VasilisNtousis/Hilti_Project_Cyber_Aware
175f9343462175de5d0f24eacf285bd27f12b399
[ "MIT" ]
null
null
null
src/create_es_df_to_csv.py
VasilisNtousis/Hilti_Project_Cyber_Aware
175f9343462175de5d0f24eacf285bd27f12b399
[ "MIT" ]
null
null
null
import pandas as pd def awareness_dataset(): sec_df = pd.read_excel('IT Security Awareness Global report.xlsx') sec_df = sec_df.drop(columns=['Username','FunctionalAreaName','CostCenterName', 'Time spent on test','Community name','Content name', ...
45.481481
114
0.610342
import pandas as pd def awareness_dataset(): sec_df = pd.read_excel('IT Security Awareness Global report.xlsx') sec_df = sec_df.drop(columns=['Username','FunctionalAreaName','CostCenterName', 'Time spent on test','Community name','Content name', ...
true
true
f7f2fac66cd9179cd38690ff2321013f0d3512b2
559
py
Python
web2py-appliances-master/KPax2/models/db_chats.py
wantsomechocolate/WantsomeBeanstalk
8c8a0a80490d04ea52661a3114fd3db8de65a01e
[ "BSD-3-Clause" ]
null
null
null
web2py-appliances-master/KPax2/models/db_chats.py
wantsomechocolate/WantsomeBeanstalk
8c8a0a80490d04ea52661a3114fd3db8de65a01e
[ "BSD-3-Clause" ]
null
null
null
web2py-appliances-master/KPax2/models/db_chats.py
wantsomechocolate/WantsomeBeanstalk
8c8a0a80490d04ea52661a3114fd3db8de65a01e
[ "BSD-3-Clause" ]
null
null
null
db.define_table('chat_line', Field('name'), Field('description','text',default=''), Field('created_on','datetime',default=timestamp), Field('owner',db.auth_user)) db.chat_line.name.requires=IS_NOT_EMPTY() db.chat_line.access_types=['none','read','read/chat'] db.chat_line.public_fields=['name','descript...
31.055556
53
0.70483
db.define_table('chat_line', Field('name'), Field('description','text',default=''), Field('created_on','datetime',default=timestamp), Field('owner',db.auth_user)) db.chat_line.name.requires=IS_NOT_EMPTY() db.chat_line.access_types=['none','read','read/chat'] db.chat_line.public_fields=['name','descript...
true
true
f7f2fcf27303f5bfad8417cb8a9f6111d3c81a60
2,368
py
Python
emails/models.py
Jordzman/explorer
d0b796014320761cd751429a9dc6ad48fe90ed96
[ "Apache-2.0" ]
2
2016-08-07T02:59:23.000Z
2016-08-21T23:48:03.000Z
emails/models.py
Trevorulliac/explorer
d2f836afd0b827041b1c75a8dd056fdb2beb2e1d
[ "Apache-2.0" ]
29
2020-05-01T08:05:16.000Z
2021-06-25T15:36:13.000Z
emails/models.py
Trevorulliac/explorer
d2f836afd0b827041b1c75a8dd056fdb2beb2e1d
[ "Apache-2.0" ]
1
2019-07-13T04:20:19.000Z
2019-07-13T04:20:19.000Z
from django.db import models from django.utils.timezone import now from jsonfield import JSONField from utils import get_user_agent, get_client_ip class SentEmail(models.Model): sent_at = models.DateTimeField(auto_now_add=True, db_index=True) from_email = models.EmailField(max_length=256, null=False, blan...
48.326531
101
0.744088
from django.db import models from django.utils.timezone import now from jsonfield import JSONField from utils import get_user_agent, get_client_ip class SentEmail(models.Model): sent_at = models.DateTimeField(auto_now_add=True, db_index=True) from_email = models.EmailField(max_length=256, null=False, blan...
true
true
f7f2fd78fbd6a60a0f8680428f2f01be9cd0ecca
1,429
py
Python
nnExplain/kerasUtils.py
xinpl/Polaris
2a9717980ab03393f7f5ba646bc58c8a3fbd1b9b
[ "MIT" ]
6
2018-12-19T08:36:21.000Z
2020-03-10T08:43:43.000Z
nnExplain/kerasUtils.py
xinpl/Polaris
2a9717980ab03393f7f5ba646bc58c8a3fbd1b9b
[ "MIT" ]
1
2021-11-17T00:47:11.000Z
2021-11-17T00:47:11.000Z
nnExplain/kerasUtils.py
xinpl/Polaris
2a9717980ab03393f7f5ba646bc58c8a3fbd1b9b
[ "MIT" ]
null
null
null
from .NNModel import Layer, LayerKind from .utils import verbose from keras.models import load_model from keras.layers import Dense, Activation, Dropout, InputLayer import tensorflow as tf def createModelFromKerasModel(m, input_length): X = tf.placeholder(tf.float32, shape=[None, input_length]) layers = m.lay...
37.605263
83
0.645206
from .NNModel import Layer, LayerKind from .utils import verbose from keras.models import load_model from keras.layers import Dense, Activation, Dropout, InputLayer import tensorflow as tf def createModelFromKerasModel(m, input_length): X = tf.placeholder(tf.float32, shape=[None, input_length]) layers = m.lay...
true
true
f7f2fe3b179c3390f607e784deb93df00d5d95bb
278
py
Python
front_end/aux/modify_version.py
zacheliason/CodeBuddy
18694771ccbb74e6966e08f1247aadda2d5d06f7
[ "MIT" ]
null
null
null
front_end/aux/modify_version.py
zacheliason/CodeBuddy
18694771ccbb74e6966e08f1247aadda2d5d06f7
[ "MIT" ]
11
2020-06-12T19:13:12.000Z
2021-08-28T23:47:57.000Z
front_end/aux/modify_version.py
zacheliason/CodeBuddy
18694771ccbb74e6966e08f1247aadda2d5d06f7
[ "MIT" ]
3
2020-05-12T16:54:16.000Z
2021-04-30T16:19:46.000Z
with open("/VERSION") as version_file: version = version_file.read() with open("/tmp/footer_version.html") as footer_file: footer = footer_file.read().replace("VERSION", version) with open("/tmp/footer_version.html", "w") as footer_file: footer_file.write(footer)
30.888889
59
0.723022
with open("/VERSION") as version_file: version = version_file.read() with open("/tmp/footer_version.html") as footer_file: footer = footer_file.read().replace("VERSION", version) with open("/tmp/footer_version.html", "w") as footer_file: footer_file.write(footer)
true
true
f7f2fe45432a05571b420d3feef7815bb6d1a4cc
5,542
py
Python
astroplant_peripheral_device_library/bme280.py
Liveshort/astroplant-peripheral-device-library
ba1622dd58bbb0acf32b0f3d39189034d25523b8
[ "BSD-2-Clause" ]
null
null
null
astroplant_peripheral_device_library/bme280.py
Liveshort/astroplant-peripheral-device-library
ba1622dd58bbb0acf32b0f3d39189034d25523b8
[ "BSD-2-Clause" ]
null
null
null
astroplant_peripheral_device_library/bme280.py
Liveshort/astroplant-peripheral-device-library
ba1622dd58bbb0acf32b0f3d39189034d25523b8
[ "BSD-2-Clause" ]
null
null
null
""" Based on BME280 implementation by Matt Hawkins https://bitbucket.org/MattHawkinsUK/rpispy-misc/raw/master/python/bme280.py """ import time from ctypes import c_short from ctypes import c_byte from ctypes import c_ubyte from . import i2c import asyncio from astroplant_kit.peripheral import * class BME280(Sensor):...
35.299363
183
0.601227
import time from ctypes import c_short from ctypes import c_byte from ctypes import c_ubyte from . import i2c import asyncio from astroplant_kit.peripheral import * class BME280(Sensor): def __init__(self, *args, i2c_address, **kwargs): super().__init__(*args, **kwargs) address = int(i2c_address...
true
true
f7f2ffc966201169ff756040b9911539f677be04
1,532
py
Python
offregister_node/utils.py
offscale/offregister-node
2fde6a53b326d6286297858f2018c28f753a2861
[ "Apache-2.0", "CC0-1.0", "MIT" ]
null
null
null
offregister_node/utils.py
offscale/offregister-node
2fde6a53b326d6286297858f2018c28f753a2861
[ "Apache-2.0", "CC0-1.0", "MIT" ]
null
null
null
offregister_node/utils.py
offscale/offregister-node
2fde6a53b326d6286297858f2018c28f753a2861
[ "Apache-2.0", "CC0-1.0", "MIT" ]
null
null
null
from functools import partial from fabric.context_managers import shell_env from fabric.contrib.files import exists from fabric.operations import _run_command from offregister_fab_utils.fs import cmd_avail def install_node(node_version="latest", *args, **kwargs): run_cmd = partial( _run_command, sudo=kwa...
34.818182
81
0.616841
from functools import partial from fabric.context_managers import shell_env from fabric.contrib.files import exists from fabric.operations import _run_command from offregister_fab_utils.fs import cmd_avail def install_node(node_version="latest", *args, **kwargs): run_cmd = partial( _run_command, sudo=kwa...
true
true
f7f2ffe77b7388348e4bffe07ce0261a1393a8ee
9,787
py
Python
tensorpack/tfutils/summary.py
ToWeRT1An/tensorpack
f343e65b3c92fdf92cda7a90e8d7fd9df622b1b1
[ "Apache-2.0" ]
1
2019-08-26T08:55:43.000Z
2019-08-26T08:55:43.000Z
tensorpack/tfutils/summary.py
ToWeRT1An/tensorpack
f343e65b3c92fdf92cda7a90e8d7fd9df622b1b1
[ "Apache-2.0" ]
7
2019-12-16T21:58:30.000Z
2022-02-10T00:17:01.000Z
tensorpack/tfutils/summary.py
T1anZhenYu/tensorpack
f343e65b3c92fdf92cda7a90e8d7fd9df622b1b1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # File: summary.py import re from contextlib import contextmanager import six from six.moves import range from tensorflow.python.training import moving_averages from ..compat import tfv1 as tf from ..utils import logger from ..utils.argtools import graph_memoized from ..utils.naming import MO...
34.829181
100
0.623378
import re from contextlib import contextmanager import six from six.moves import range from tensorflow.python.training import moving_averages from ..compat import tfv1 as tf from ..utils import logger from ..utils.argtools import graph_memoized from ..utils.naming import MOVING_SUMMARY_OPS_KEY from .scope_utils im...
true
true
f7f3009ad639995e1e81caf292f95be42457f263
734
py
Python
consoleproxy/setup.py
zstackio/zstack-utility
919d686d46c68836cbcad51ab0b8bf53bc88abda
[ "ECL-2.0", "Apache-2.0" ]
55
2017-02-10T07:55:21.000Z
2021-09-01T00:59:36.000Z
consoleproxy/setup.py
zstackio/zstack-utility
919d686d46c68836cbcad51ab0b8bf53bc88abda
[ "ECL-2.0", "Apache-2.0" ]
106
2017-02-13T09:58:27.000Z
2022-02-15T09:51:48.000Z
consoleproxy/setup.py
zstackio/zstack-utility
919d686d46c68836cbcad51ab0b8bf53bc88abda
[ "ECL-2.0", "Apache-2.0" ]
68
2017-02-13T11:02:01.000Z
2021-12-16T11:02:01.000Z
from setuptools import setup, find_packages import sys, os version = '4.0.0' setup(name='consoleproxy', version=version, description="zstack console proxy agent", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords...
27.185185
95
0.619891
from setuptools import setup, find_packages import sys, os version = '4.0.0' setup(name='consoleproxy', version=version, description="zstack console proxy agent", long_description="""\ """, classifiers=[], keywords='zstack console proxy', author='Frank Zhang', author_email='...
true
true
f7f301ff14524f4db75ed68de47fcade8505cddf
338
py
Python
ckan_cloud_operator/providers/cluster/constants.py
MuhammadIsmailShahzad/ckan-cloud-operator
35a4ca88c4908d81d1040a21fca8904e77c4cded
[ "MIT" ]
14
2019-11-18T12:01:03.000Z
2021-09-15T15:29:50.000Z
ckan_cloud_operator/providers/cluster/constants.py
MuhammadIsmailShahzad/ckan-cloud-operator
35a4ca88c4908d81d1040a21fca8904e77c4cded
[ "MIT" ]
52
2019-09-09T14:22:41.000Z
2021-09-29T08:29:24.000Z
ckan_cloud_operator/providers/cluster/constants.py
MuhammadIsmailShahzad/ckan-cloud-operator
35a4ca88c4908d81d1040a21fca8904e77c4cded
[ "MIT" ]
8
2019-10-05T12:46:25.000Z
2021-09-15T15:13:05.000Z
PROVIDER_SUBMODULE = 'cluster' # Kubernetes namespace used to store operator resources # this namespace should only keep objects created and managed by the operator OPERATOR_NAMESPACE = 'ckan-cloud' # Kubernetes configmap name in the operator namespace, used to store global operator configurations OPERATOR_CONFIGMAP ...
37.555556
99
0.819527
PROVIDER_SUBMODULE = 'cluster' OPERATOR_NAMESPACE = 'ckan-cloud' OPERATOR_CONFIGMAP = 'operator-conf'
true
true
f7f3025c71362108a3974d4d41de9436e48bf181
88
py
Python
Python/arethmaticHR.py
BiswajitDeb/My_all_programs
4717cfc0b3b1aeda75f8eec0b7ff643e8556d262
[ "Unlicense" ]
null
null
null
Python/arethmaticHR.py
BiswajitDeb/My_all_programs
4717cfc0b3b1aeda75f8eec0b7ff643e8556d262
[ "Unlicense" ]
null
null
null
Python/arethmaticHR.py
BiswajitDeb/My_all_programs
4717cfc0b3b1aeda75f8eec0b7ff643e8556d262
[ "Unlicense" ]
null
null
null
a=int(input()) b=int(input()) summ=a+b subs=a-b mult=a*b print(summ,subs,mult, sep='\n')
14.666667
31
0.647727
a=int(input()) b=int(input()) summ=a+b subs=a-b mult=a*b print(summ,subs,mult, sep='\n')
true
true
f7f3044757cda902e6969ce63f0ea01aa28d9dc5
1,365
py
Python
timesheet_utils/base.py
MR6996/timesheet-utils
f43aaf6c20b561841331d0d57c11150153ccc34f
[ "MIT" ]
null
null
null
timesheet_utils/base.py
MR6996/timesheet-utils
f43aaf6c20b561841331d0d57c11150153ccc34f
[ "MIT" ]
null
null
null
timesheet_utils/base.py
MR6996/timesheet-utils
f43aaf6c20b561841331d0d57c11150153ccc34f
[ "MIT" ]
null
null
null
from os import getenv import tenacity from flask import Flask from py_eureka_client import eureka_client def get_db_path(): return '{}+{}://{}:{}@{}:{}/{}'.format( getenv('DB_DIALECT'), getenv('DB_DRIVER'), getenv('DB_USERNAME'), getenv('DB_PASSWORD'), getenv('DB_HOST'), ...
23.135593
84
0.646154
from os import getenv import tenacity from flask import Flask from py_eureka_client import eureka_client def get_db_path(): return '{}+{}://{}:{}@{}:{}/{}'.format( getenv('DB_DIALECT'), getenv('DB_DRIVER'), getenv('DB_USERNAME'), getenv('DB_PASSWORD'), getenv('DB_HOST'), ...
true
true
f7f304537a81d30dc542d8259de0e34311f01860
6,504
py
Python
OneLib/ImageViewer/evaluate_detection.py
gaoyuanhezhihao/pyLib
ecc517d12c4125deafa7b7fe09c63afa3349aaac
[ "MIT" ]
null
null
null
OneLib/ImageViewer/evaluate_detection.py
gaoyuanhezhihao/pyLib
ecc517d12c4125deafa7b7fe09c63afa3349aaac
[ "MIT" ]
null
null
null
OneLib/ImageViewer/evaluate_detection.py
gaoyuanhezhihao/pyLib
ecc517d12c4125deafa7b7fe09c63afa3349aaac
[ "MIT" ]
null
null
null
import argparse import os from os.path import split,join,splitext import xml.etree.ElementTree as ET import re import numpy as np from shapely.geometry import Polygon from debug_tool import paint_polygons from matplotlib import pyplot as plt def parse_point(s): s.split(',') _, p1, p2, _ = re.split(',|\\(|\\)...
34.967742
118
0.604397
import argparse import os from os.path import split,join,splitext import xml.etree.ElementTree as ET import re import numpy as np from shapely.geometry import Polygon from debug_tool import paint_polygons from matplotlib import pyplot as plt def parse_point(s): s.split(',') _, p1, p2, _ = re.split(',|\\(|\\)...
true
true