hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c4407450f29ef110bf3b72088dfff08feacca6b
5,291
py
Python
src/arg_utils.py
Nicolas-Reyland/python-polygon
2847bebc58d50219ae8fc7eb5cc14d6b8d1161ed
[ "MIT" ]
1
2021-09-03T08:17:11.000Z
2021-09-03T08:17:11.000Z
src/arg_utils.py
Nicolas-Reyland/python-polygon
2847bebc58d50219ae8fc7eb5cc14d6b8d1161ed
[ "MIT" ]
null
null
null
src/arg_utils.py
Nicolas-Reyland/python-polygon
2847bebc58d50219ae8fc7eb5cc14d6b8d1161ed
[ "MIT" ]
null
null
null
from __future__ import annotations from argparse import ArgumentParser import os ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) DEFAULT_ARGS_JSON_FILE_PATH = "default-args.json" class ArgumentError(Exception): """ Simple class, representing an commandline-argument error. """ pass def gen_a...
26.994898
89
0.567757
from __future__ import annotations from argparse import ArgumentParser import os ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) DEFAULT_ARGS_JSON_FILE_PATH = "default-args.json" class ArgumentError(Exception): pass def gen_arg_parser() -> ArgumentParser: parser = ArgumentParser( descriptio...
true
true
1c4407904b26ff7709bfbd7dfc2fb50b553a83f6
25,483
py
Python
tensorflow/python/autograph/operators/control_flow_test.py
fwtan/tensorflow
efa3fb28d94b7937edaafb5874c191ad0e2149ca
[ "Apache-2.0" ]
1
2020-05-14T03:53:01.000Z
2020-05-14T03:53:01.000Z
tensorflow/python/autograph/operators/control_flow_test.py
fwtan/tensorflow
efa3fb28d94b7937edaafb5874c191ad0e2149ca
[ "Apache-2.0" ]
2
2021-08-25T16:05:52.000Z
2022-02-10T01:51:12.000Z
tensorflow/python/autograph/operators/control_flow_test.py
taotesea/tensorflow
5e6479904941624cf7ce58ab3d236375c8012ef4
[ "Apache-2.0" ]
1
2020-08-07T12:49:50.000Z
2020-08-07T12:49:50.000Z
# Lint as: python3 # 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 ...
28.251663
81
0.608563
from __future__ import absolute_import from __future__ import division from __future__ import print_function import re import sys import numpy as np import six from tensorflow.python.autograph.operators import control_flow from tensorflow.python.autograph.operators import variables as variable_operators from tenso...
true
true
1c440820431ca1ad195527bd8221ac39c820de89
1,174
py
Python
pcdet/models/model_utils/layers.py
collector-m/H-23D_R-CNN
40c89c7a6910b738f7e4ed1d0dbb32b1ca99a016
[ "Apache-2.0" ]
49
2021-08-02T02:04:32.000Z
2022-03-31T03:24:23.000Z
pcdet/models/model_utils/layers.py
collector-m/H-23D_R-CNN
40c89c7a6910b738f7e4ed1d0dbb32b1ca99a016
[ "Apache-2.0" ]
5
2021-08-11T06:29:14.000Z
2022-01-23T02:59:29.000Z
pcdet/models/model_utils/layers.py
collector-m/H-23D_R-CNN
40c89c7a6910b738f7e4ed1d0dbb32b1ca99a016
[ "Apache-2.0" ]
3
2021-08-08T12:11:31.000Z
2021-11-30T15:07:32.000Z
import torch import torch.nn as nn class ConvBNReLU(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, eps=1e-3, momentum=0.01): super().__init__() self.block = nn.Sequential( nn.Conv2d(in_channels, out_channels, kernel_size, stride=stride, padding=kernel_size//2, bias=F...
32.611111
107
0.681431
import torch import torch.nn as nn class ConvBNReLU(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, eps=1e-3, momentum=0.01): super().__init__() self.block = nn.Sequential( nn.Conv2d(in_channels, out_channels, kernel_size, stride=stride, padding=kernel_size//2, bias=F...
true
true
1c440acc35d3ac6fc5cec55840701662ea24566a
2,257
py
Python
lib/GenomeImporter/GenomeImporterClient.py
ModelSEED/GenomeImporter
c7af3e37e194315efa59276eed026373b13af658
[ "MIT" ]
null
null
null
lib/GenomeImporter/GenomeImporterClient.py
ModelSEED/GenomeImporter
c7af3e37e194315efa59276eed026373b13af658
[ "MIT" ]
null
null
null
lib/GenomeImporter/GenomeImporterClient.py
ModelSEED/GenomeImporter
c7af3e37e194315efa59276eed026373b13af658
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################ # # Autogenerated by the KBase type compiler - # any changes made here will be overwritten # ############################################################ from __future__ import print_function # the following is a hack to get the basec...
41.796296
79
0.633584
from __future__ import print_function # package or not. This makes pep8 unhappy hence the annotations. try: # baseclient and this client are in a package from .baseclient import BaseClient as _BaseClient # @UnusedImport except: # no they aren't from baseclient import BaseClient as _BaseClient class...
true
true
1c440ae2da9545be2fbe11a7cf25b19d6daad111
2,515
py
Python
alttprbot_discord/util/embed_formatter.py
skyscooby/sahasrahbot
16fce824bd024f6357a8f260e2447ba477dcdac2
[ "MIT" ]
15
2019-10-15T21:35:59.000Z
2022-03-31T19:49:39.000Z
alttprbot_discord/util/embed_formatter.py
skyscooby/sahasrahbot
16fce824bd024f6357a8f260e2447ba477dcdac2
[ "MIT" ]
12
2019-10-06T01:33:13.000Z
2022-03-10T14:35:16.000Z
alttprbot_discord/util/embed_formatter.py
skyscooby/sahasrahbot
16fce824bd024f6357a8f260e2447ba477dcdac2
[ "MIT" ]
28
2019-11-25T23:49:56.000Z
2022-03-10T04:03:31.000Z
import discord def config(ctx, configdict): embed = discord.Embed( title="Server Configuration", description="List of configuration parameters for this server.", color=discord.Colour.teal()) for item in configdict: embed.add_field(name=item['parameter'], value=item['va...
37.537313
131
0.611531
import discord def config(ctx, configdict): embed = discord.Embed( title="Server Configuration", description="List of configuration parameters for this server.", color=discord.Colour.teal()) for item in configdict: embed.add_field(name=item['parameter'], value=item['va...
true
true
1c440b1e1de464dfdff22caf8ef6161d4e39e699
5,094
py
Python
tests/python/contrib/test_cmsisnn/test_pooling.py
jwfromm/relax
f120282007778706199243ee88b50697c2b9550c
[ "Apache-2.0" ]
2,084
2020-11-25T02:31:53.000Z
2022-03-31T11:33:47.000Z
tests/python/contrib/test_cmsisnn/test_pooling.py
jwfromm/relax
f120282007778706199243ee88b50697c2b9550c
[ "Apache-2.0" ]
3,022
2020-11-24T14:02:31.000Z
2022-03-31T23:55:31.000Z
tests/python/contrib/test_cmsisnn/test_pooling.py
jwfromm/relax
f120282007778706199243ee88b50697c2b9550c
[ "Apache-2.0" ]
977
2020-11-25T00:54:52.000Z
2022-03-31T12:47:08.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
29.275862
98
0.65371
import itertools import numpy as np import pytest import tvm from tvm import relay from tvm.relay.op.contrib import cmsisnn from tests.python.relay.aot.aot_test_utils import ( AOTTestModel, AOT_CORSTONE300_RUNNER, AOT_DEFAULT_RUNNER, generate_ref_data, compile_and_run, ) from utils import ( s...
true
true
1c440b708248398fce0129be28a565447b2b4b8c
8,025
py
Python
pyEX/tests/test_refdata.py
andrescevp/pyEX
4c8daa411b01133a292d341a78f6e1b80cc2be99
[ "Apache-2.0" ]
null
null
null
pyEX/tests/test_refdata.py
andrescevp/pyEX
4c8daa411b01133a292d341a78f6e1b80cc2be99
[ "Apache-2.0" ]
null
null
null
pyEX/tests/test_refdata.py
andrescevp/pyEX
4c8daa411b01133a292d341a78f6e1b80cc2be99
[ "Apache-2.0" ]
null
null
null
# for Coverage from mock import patch, MagicMock class TestAll: def setup(self): pass # setup() before each test method def teardown(self): pass # teardown() after each test method @classmethod def setup_class(cls): pass # setup_class() before any meth...
33.024691
70
0.594891
from mock import patch, MagicMock class TestAll: def setup(self): pass def teardown(self): pass @classmethod def setup_class(cls): pass @classmethod def teardown_class(cls): pass def test_symbols(self): from pyEX.r...
true
true
1c440b889b1465133c187d8b8d2d064e1d116e83
6,186
py
Python
pandas/tests/resample/test_timedelta.py
CJL89/pandas
6210077d32a9e9675526ea896e6d1f9189629d4a
[ "BSD-3-Clause" ]
603
2020-12-23T13:49:32.000Z
2022-03-31T23:38:03.000Z
pandas/tests/resample/test_timedelta.py
CJL89/pandas
6210077d32a9e9675526ea896e6d1f9189629d4a
[ "BSD-3-Clause" ]
387
2020-12-15T14:54:04.000Z
2022-03-31T07:00:21.000Z
pandas/tests/resample/test_timedelta.py
CJL89/pandas
6210077d32a9e9675526ea896e6d1f9189629d4a
[ "BSD-3-Clause" ]
35
2021-03-26T03:12:04.000Z
2022-03-23T10:15:10.000Z
from datetime import timedelta import numpy as np import pytest import pandas as pd from pandas import DataFrame, Series import pandas._testing as tm from pandas.core.indexes.timedeltas import timedelta_range def test_asfreq_bug(): df = DataFrame(data=[1, 3], index=[timedelta(), timedelta(minutes=3)]) resul...
33.080214
88
0.631911
from datetime import timedelta import numpy as np import pytest import pandas as pd from pandas import DataFrame, Series import pandas._testing as tm from pandas.core.indexes.timedeltas import timedelta_range def test_asfreq_bug(): df = DataFrame(data=[1, 3], index=[timedelta(), timedelta(minutes=3)]) resul...
true
true
1c440bf67138afa263b8887f4363d386e850994f
1,395
py
Python
azure-mgmt-compute/azure/mgmt/compute/models/storage_profile.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
azure-mgmt-compute/azure/mgmt/compute/models/storage_profile.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
azure-mgmt-compute/azure/mgmt/compute/models/storage_profile.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
36.710526
79
0.615771
from msrest.serialization import Model class StorageProfile(Model): _attribute_map = { 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, } def __init__...
true
true
1c440ead8b5d13c3647b3df37feee6ea8b6383e4
492
py
Python
weather-forecast-api/weather_forecast/tasks/receive_weather_forecast_failure.py
dalmarcogd/weather-forecast
f0987009c5691e46d9b8b6ba6f4408688ebec944
[ "Apache-2.0" ]
null
null
null
weather-forecast-api/weather_forecast/tasks/receive_weather_forecast_failure.py
dalmarcogd/weather-forecast
f0987009c5691e46d9b8b6ba6f4408688ebec944
[ "Apache-2.0" ]
null
null
null
weather-forecast-api/weather_forecast/tasks/receive_weather_forecast_failure.py
dalmarcogd/weather-forecast
f0987009c5691e46d9b8b6ba6f4408688ebec944
[ "Apache-2.0" ]
null
null
null
from typing import Dict from celery.task import Task from weather_forecast.database import queries from weather_forecast.database.models.weather_forecast import WeatherForecastStatus class ReceiveWeatherForecastFailureTask(Task): name = "receive-weather-forecast-failure" ignore_result = True def run(se...
28.941176
86
0.754065
from typing import Dict from celery.task import Task from weather_forecast.database import queries from weather_forecast.database.models.weather_forecast import WeatherForecastStatus class ReceiveWeatherForecastFailureTask(Task): name = "receive-weather-forecast-failure" ignore_result = True def run(se...
true
true
1c44110674bac1be1a91e7868849d9425da2b31e
27,746
py
Python
anchore_engine/utils.py
ballad86/anchore-engine
51f784dbb697586083bce023e2e6a708a25f1797
[ "Apache-2.0" ]
1,484
2017-09-11T19:08:42.000Z
2022-03-29T07:47:44.000Z
anchore_engine/utils.py
ballad86/anchore-engine
51f784dbb697586083bce023e2e6a708a25f1797
[ "Apache-2.0" ]
913
2017-09-27T20:37:53.000Z
2022-03-29T17:21:28.000Z
anchore_engine/utils.py
PhoenixRedflash/anchore-engine
4192eba02bb91cf0eebebe32e8134b27b06feefe
[ "Apache-2.0" ]
294
2017-09-12T16:54:03.000Z
2022-03-14T01:28:51.000Z
""" Generic utilities """ import decimal import os import platform import re import shlex import subprocess import threading import time import uuid from contextlib import contextmanager from operator import itemgetter from ijson import common as ijcommon from ijson.backends import python as ijpython from anchore_eng...
32.225319
161
0.558026
import decimal import os import platform import re import shlex import subprocess import threading import time import uuid from contextlib import contextmanager from operator import itemgetter from ijson import common as ijcommon from ijson.backends import python as ijpython from anchore_engine.subsys import logger ...
true
true
1c44111cc007cf80d7930ed6a4faa8477866dacd
12,036
py
Python
src/docker_code/docker_face_detect_v0.py
yuhaoluo/facenet
d3a3087f52ae1a17a77a1dadb81c53911be97b4b
[ "MIT" ]
null
null
null
src/docker_code/docker_face_detect_v0.py
yuhaoluo/facenet
d3a3087f52ae1a17a77a1dadb81c53911be97b4b
[ "MIT" ]
null
null
null
src/docker_code/docker_face_detect_v0.py
yuhaoluo/facenet
d3a3087f52ae1a17a77a1dadb81c53911be97b4b
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2016 David Sandberg # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, me...
36.695122
133
0.601196
from __future__ import absolute_import from __future__ import division from __future__ import print_function from scipy import misc import sys import os import argparse import tensorflow as tf import numpy as np import align.detect_face import time import imageio import requests import json os.environ['TF_CPP_MIN_LOG_...
true
true
1c4411906a6862cd76a4a9ab8fdaf4a537918ff5
62,520
py
Python
isi_sdk/api/fsa_results_api.py
robzim/isilon_sdk_python
3c2efcae7002f8ad25c0cfcb42a53b4d83e826d7
[ "MIT" ]
null
null
null
isi_sdk/api/fsa_results_api.py
robzim/isilon_sdk_python
3c2efcae7002f8ad25c0cfcb42a53b4d83e826d7
[ "MIT" ]
null
null
null
isi_sdk/api/fsa_results_api.py
robzim/isilon_sdk_python
3c2efcae7002f8ad25c0cfcb42a53b4d83e826d7
[ "MIT" ]
null
null
null
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 3 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and pyth...
50.056045
334
0.644962
from __future__ import absolute_import import re import six from isi_sdk_8_0.api_client import ApiClient class FsaResultsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def get_histogram_stat_by...
true
true
1c4412a8c09bdeeffe088f019f7889bfd861cd4d
1,918
py
Python
command/box.py
DrLarck/DragonBotZ
eab773d6e55f7f5f325828fe249800193120abaf
[ "MIT" ]
3
2020-05-01T07:38:38.000Z
2020-06-02T12:03:40.000Z
command/box.py
DrLarck/DragonBotZ
eab773d6e55f7f5f325828fe249800193120abaf
[ "MIT" ]
19
2020-11-01T22:15:57.000Z
2021-09-08T15:28:30.000Z
command/box.py
DrLarck/DragonBotZ
eab773d6e55f7f5f325828fe249800193120abaf
[ "MIT" ]
1
2021-03-05T04:51:21.000Z
2021-03-05T04:51:21.000Z
""" Box command -- Author : Drlarck Last update : 25/12/20 by DrLarck """ from discord.ext import commands # util from utility.command.checker import CommandChecker from utility.entity.player import Player from utility.global_tool import GlobalTool # tool from utility.command.tool.tool_box import ToolBox class ...
26.273973
80
0.661627
from discord.ext import commands from utility.command.checker import CommandChecker from utility.entity.player import Player from utility.global_tool import GlobalTool from utility.command.tool.tool_box import ToolBox class CommandBox(commands.Cog): def __init__(self, client): self.client = cl...
true
true
1c4412e0c4f9a993f9fd8586877ecb41b54a8605
2,297
py
Python
mlens/parallel/tests/test_a_learner_subset.py
mehrdad-shokri/mlens
6cbc11354b5f9500a33d9cefb700a1bba9d3199a
[ "MIT" ]
760
2017-03-13T10:11:45.000Z
2022-03-30T20:59:20.000Z
mlens/parallel/tests/test_a_learner_subset.py
rahulsaini/mlens
6cbc11354b5f9500a33d9cefb700a1bba9d3199a
[ "MIT" ]
115
2017-01-18T22:10:33.000Z
2022-03-17T12:42:34.000Z
mlens/parallel/tests/test_a_learner_subset.py
rahulsaini/mlens
6cbc11354b5f9500a33d9cefb700a1bba9d3199a
[ "MIT" ]
96
2017-03-13T10:12:48.000Z
2022-02-23T17:12:39.000Z
""""ML-ENSEMBLE Testing suite for Learner and Transformer """ from mlens.testing import Data, EstimatorContainer, get_learner, run_learner def test_fit(): """[Parallel | Learner | Subset | No Proba | No Prep] test fit""" args = get_learner('fit', 'subsemble', False, False) run_learner(*args) def test_p...
29.448718
76
0.65825
from mlens.testing import Data, EstimatorContainer, get_learner, run_learner def test_fit(): args = get_learner('fit', 'subsemble', False, False) run_learner(*args) def test_predict(): args = get_learner('predict', 'subsemble', False, False) run_learner(*args) def test_transform(): args = get_...
true
true
1c4413a8fd4db352cd8e11d757e9ebd5c2024042
3,019
py
Python
donations/management/commands/export_translations.py
diffractive/newstream
cf1a1f230e18d01c63b50ab9d360aa44ac5a486f
[ "MIT" ]
1
2020-05-03T12:33:42.000Z
2020-05-03T12:33:42.000Z
donations/management/commands/export_translations.py
diffractive/newstream
cf1a1f230e18d01c63b50ab9d360aa44ac5a486f
[ "MIT" ]
14
2020-07-06T20:05:57.000Z
2022-03-12T00:39:11.000Z
donations/management/commands/export_translations.py
diffractive/newstream
cf1a1f230e18d01c63b50ab9d360aa44ac5a486f
[ "MIT" ]
null
null
null
import csv import os import re from zipfile import ZipFile from django.core.management.base import BaseCommand from django.apps import apps from pages.models import HomePage class Command(BaseCommand): help = 'updates .po files, compiles all i18n fields into a csv file and zips them all into one zip file' de...
47.920635
138
0.561444
import csv import os import re from zipfile import ZipFile from django.core.management.base import BaseCommand from django.apps import apps from pages.models import HomePage class Command(BaseCommand): help = 'updates .po files, compiles all i18n fields into a csv file and zips them all into one zip file' de...
true
true
1c4414e04d2fcbc39108f6767504885c71b48ec0
1,927
py
Python
modules/AIWorker/backend/celery_interface.py
junxnone/aerial_wildlife_detection
0eebed2aaf926ceb212b6a2b7a75bb0a82b28a88
[ "MIT" ]
1
2021-04-26T22:50:52.000Z
2021-04-26T22:50:52.000Z
modules/AIWorker/backend/celery_interface.py
junxnone/aerial_wildlife_detection
0eebed2aaf926ceb212b6a2b7a75bb0a82b28a88
[ "MIT" ]
null
null
null
modules/AIWorker/backend/celery_interface.py
junxnone/aerial_wildlife_detection
0eebed2aaf926ceb212b6a2b7a75bb0a82b28a88
[ "MIT" ]
2
2021-04-15T17:26:40.000Z
2021-04-15T17:26:53.000Z
''' Wrapper for the Celery message broker concerning the AIWorker(s). 2019-20 Benjamin Kellenberger ''' import os from celery import current_app from kombu.common import Broadcast from constants.version import AIDE_VERSION from modules.AIWorker.app import AIWorker from util.configDef import Config # ini...
31.080645
128
0.705241
import os from celery import current_app from kombu.common import Broadcast from constants.version import AIDE_VERSION from modules.AIWorker.app import AIWorker from util.configDef import Config modules = os.environ['AIDE_MODULES'] passiveMode = (os.environ['PASSIVE_MODE']=='1' if 'PASSIVE_MODE' in os.environ else F...
true
true
1c44168c82761f7500b7377a312882fa34c63c3c
2,479
py
Python
scripts/empirical/generate_hcp_surrogates.py
netneurolab/markello_spatialnulls
06eb614af626791d55be0e1c8fc3694fa0771c67
[ "BSD-3-Clause" ]
8
2020-08-17T13:00:26.000Z
2022-01-09T05:37:44.000Z
scripts/empirical/generate_hcp_surrogates.py
netneurolab/markello_spatialnulls
06eb614af626791d55be0e1c8fc3694fa0771c67
[ "BSD-3-Clause" ]
1
2021-02-24T19:28:37.000Z
2021-02-24T19:28:37.000Z
scripts/empirical/generate_hcp_surrogates.py
netneurolab/markello_spatialnulls
06eb614af626791d55be0e1c8fc3694fa0771c67
[ "BSD-3-Clause" ]
3
2020-08-27T20:00:04.000Z
2021-01-30T01:55:53.000Z
# -*- coding: utf-8 -*- """ Creates surrogate maps for HCP myelin data using Burt 2018 + 2020 methods. In both cases, surrogate maps are stored as resampling arrays of the original maps and are saved to `data/derivatives/surrogates/<atlas>/<method>/hcp`. """ from pathlib import Path from joblib import Parallel, delay...
30.231707
79
0.657523
from pathlib import Path from joblib import Parallel, delayed from parspin import surrogates, utils as putils ROIDIR = Path('./data/raw/rois').resolve() HCPDIR = Path('./data/derivatives/hcp').resolve() DISTDIR = Path('./data/derivatives/geodesic').resolve() SURRDIR = Path('./data/derivatives/surrogates').resolve()...
true
true
1c4416da16e0e24c7acaf69acc78211ad072d992
3,296
py
Python
update_windows_mappings.py
jean/tzlocal
37b49de83103f81c5e3f414eacf265972b85f9af
[ "MIT" ]
null
null
null
update_windows_mappings.py
jean/tzlocal
37b49de83103f81c5e3f414eacf265972b85f9af
[ "MIT" ]
null
null
null
update_windows_mappings.py
jean/tzlocal
37b49de83103f81c5e3f414eacf265972b85f9af
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # This script generates the mapping between MS Windows timezone names and # tzdata/Olsen timezone names, by retrieving a file: # http://unicode.org/cldr/data/common/supplemental/supplementalData.xml # and parsing it, and from this generating the file windows_tz.py. # # It must be run with Python...
32.313725
105
0.664138
import ftplib import logging from io import BytesIO from pprint import pprint import tarfile from urllib.parse import urlparse from urllib.request import urlopen from xml.dom import minidom WIN_ZONES_URL = 'http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml' ZONEINFO_URL = 'ftp://ftp.iana.org/t...
true
true
1c44181b13c6e5605edca9644c493c62871b48d8
900
py
Python
todoism/apis/v1/errors.py
zhaofangfang1991/airsupport-
b2599091dae6105ad7a01444acb9ab53d273675e
[ "MIT" ]
null
null
null
todoism/apis/v1/errors.py
zhaofangfang1991/airsupport-
b2599091dae6105ad7a01444acb9ab53d273675e
[ "MIT" ]
null
null
null
todoism/apis/v1/errors.py
zhaofangfang1991/airsupport-
b2599091dae6105ad7a01444acb9ab53d273675e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from flask import jsonify from werkzeug.http import HTTP_STATUS_CODES from todoism.apis.v1 import api_v1 def api_abort(code, message=None, **kwargs): if message is None: message = HTTP_STATUS_CODES.get(code, '') response = jsonify(code=code, message=message, **kwargs) re...
24.324324
114
0.718889
from flask import jsonify from werkzeug.http import HTTP_STATUS_CODES from todoism.apis.v1 import api_v1 def api_abort(code, message=None, **kwargs): if message is None: message = HTTP_STATUS_CODES.get(code, '') response = jsonify(code=code, message=message, **kwargs) response.status_code = cod...
true
true
1c441909547247dc21e1764be21febe8946d6c2e
6,424
py
Python
global_directions/cog_predict.py
bfirsh/StyleCLIP
164fa8497ea91ea184c0488fcc5e3e14f709561a
[ "MIT" ]
null
null
null
global_directions/cog_predict.py
bfirsh/StyleCLIP
164fa8497ea91ea184c0488fcc5e3e14f709561a
[ "MIT" ]
null
null
null
global_directions/cog_predict.py
bfirsh/StyleCLIP
164fa8497ea91ea184c0488fcc5e3e14f709561a
[ "MIT" ]
null
null
null
import tempfile from pathlib import Path import os from argparse import Namespace import time import dlib import os import sys import numpy as np from PIL import Image import torch import torchvision.transforms as transforms import tensorflow as tf import numpy as np import torch import clip from PIL import Image impor...
32.444444
197
0.636986
import tempfile from pathlib import Path import os from argparse import Namespace import time import dlib import os import sys import numpy as np from PIL import Image import torch import torchvision.transforms as transforms import tensorflow as tf import numpy as np import torch import clip from PIL import Image impor...
true
true
1c4419cfc5241033119415ac6f09947cc75e8ab2
40,341
py
Python
superset/security/manager.py
GodelTech/superset
da170aa57e94053cf715f7b41b09901c813a149a
[ "Apache-2.0" ]
44
2021-04-14T10:53:36.000Z
2021-09-11T00:29:50.000Z
superset/security/manager.py
GodelTech/superset
da170aa57e94053cf715f7b41b09901c813a149a
[ "Apache-2.0" ]
60
2021-04-09T08:17:13.000Z
2022-03-04T07:41:38.000Z
superset/security/manager.py
GodelTech/superset
da170aa57e94053cf715f7b41b09901c813a149a
[ "Apache-2.0" ]
11
2021-06-09T08:30:57.000Z
2021-11-30T03:16:14.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.763298
88
0.620634
import logging import re from typing import Any, Callable, cast, List, Optional, Set, Tuple, TYPE_CHECKING, Union from flask import current_app, g from flask_appbuilder import Model from flask_appbuilder.security.sqla.manager import SecurityManager from flask_appbuilder.security.sqla.models import ( assoc_permissi...
true
true
1c441a02c742a3dfe6abbfd727f960c9fef4f1d5
552
py
Python
network/migrations/0007_auto_20181013_1141.py
pawangeek/PollsChain
6059796c671d3250f2cd8bb36171bf54013d176e
[ "MIT" ]
null
null
null
network/migrations/0007_auto_20181013_1141.py
pawangeek/PollsChain
6059796c671d3250f2cd8bb36171bf54013d176e
[ "MIT" ]
null
null
null
network/migrations/0007_auto_20181013_1141.py
pawangeek/PollsChain
6059796c671d3250f2cd8bb36171bf54013d176e
[ "MIT" ]
null
null
null
# Generated by Django 2.1 on 2018-10-13 11:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('network', '0006_transaction_transaction_id'), ] operations = [ migrations.RemoveField( model_name='block', name='trans...
23
62
0.586957
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('network', '0006_transaction_transaction_id'), ] operations = [ migrations.RemoveField( model_name='block', name='transaction', ), migrations.AddFiel...
true
true
1c441a48841857af47bd57c1c28d22667ebaeb0d
542
py
Python
A_mecanica_das_Classes_e_Instancias/09-Instance-Methods.py
nnsdtr/OOP-Python
3b739966c9b35c32a2bd934574f6421b1470eb23
[ "MIT" ]
null
null
null
A_mecanica_das_Classes_e_Instancias/09-Instance-Methods.py
nnsdtr/OOP-Python
3b739966c9b35c32a2bd934574f6421b1470eb23
[ "MIT" ]
null
null
null
A_mecanica_das_Classes_e_Instancias/09-Instance-Methods.py
nnsdtr/OOP-Python
3b739966c9b35c32a2bd934574f6421b1470eb23
[ "MIT" ]
null
null
null
# Exemplo 1: class Person(object): greeting = '\nHello there!' joe = Person() print(joe.greeting) print('\n') # Exemplo 2: # Método interno à classe utiliza self como 1º parâmetro, sempre. class Something(object): def call_this_method(self): print('Verificação de john == john.call_this_method() re...
20.846154
98
0.693727
class Person(object): greeting = '\nHello there!' joe = Person() print(joe.greeting) print('\n') class Something(object): def call_this_method(self): print('Verificação de john == john.call_this_method() resulta em:') return self john = Something() print(john == john.call_this_method())...
true
true
1c441b172e4ee117cc58cbc80d255338d7e0f552
2,835
py
Python
tests/test_queries.py
klen/aio-databases
395edcc810598e1639ccd9727aecb4d97cf04df9
[ "MIT" ]
6
2021-08-13T16:17:47.000Z
2022-02-04T01:22:02.000Z
tests/test_queries.py
klen/aio-databases
395edcc810598e1639ccd9727aecb4d97cf04df9
[ "MIT" ]
null
null
null
tests/test_queries.py
klen/aio-databases
395edcc810598e1639ccd9727aecb4d97cf04df9
[ "MIT" ]
null
null
null
import pytest from pypika import Parameter @pytest.fixture async def schema(pool, User, manager): UserManager = manager(User) await pool.execute(UserManager.create_table().if_not_exists()) yield await pool.execute(UserManager.drop_table().if_exists()) async def test_base(db): await db.execute("...
29.842105
88
0.631393
import pytest from pypika import Parameter @pytest.fixture async def schema(pool, User, manager): UserManager = manager(User) await pool.execute(UserManager.create_table().if_not_exists()) yield await pool.execute(UserManager.drop_table().if_exists()) async def test_base(db): await db.execute("...
true
true
1c441ba3d757d278aee135f301e462d85e7c43f4
2,447
py
Python
python/GafferAppleseedUI/AppleseedRenderUI.py
ddesmond/gaffer
4f25df88103b7893df75865ea919fb035f92bac0
[ "BSD-3-Clause" ]
561
2016-10-18T04:30:48.000Z
2022-03-30T06:52:04.000Z
python/GafferAppleseedUI/AppleseedRenderUI.py
ddesmond/gaffer
4f25df88103b7893df75865ea919fb035f92bac0
[ "BSD-3-Clause" ]
1,828
2016-10-14T19:01:46.000Z
2022-03-30T16:07:19.000Z
python/GafferAppleseedUI/AppleseedRenderUI.py
ddesmond/gaffer
4f25df88103b7893df75865ea919fb035f92bac0
[ "BSD-3-Clause" ]
120
2016-10-18T15:19:13.000Z
2021-12-20T16:28:23.000Z
########################################################################## # # Copyright (c) 2014, Esteban Tovagliari. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribution...
32.626667
77
0.688598
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, import IECore import Gaffer import GafferUI import GafferAppleseed Gaffer.Metadata.registerNode( GafferAppleseed.AppleseedRender, "description", """ Performs offline batch rendering using the appleseed renderer, or optionally generat...
true
true
1c441bb44de6f92ddbdce2bba4858f65eb61b169
3,559
py
Python
bindings/python/ensmallen/datasets/string/coriobacteriumglomerans.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/coriobacteriumglomerans.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/coriobacteriumglomerans.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Coriobacterium glomerans. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--prote...
32.953704
223
0.678561
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def CoriobacteriumGlomerans( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/st...
true
true
1c441bde02d7e435b5ed2bc275e134215dc9609b
54,472
py
Python
fmpy/gui/MainWindow.py
CSchulzeTLK/FMPy
fde192346c36eb69dbaca60a96e80cdc8ef37b89
[ "CC-BY-3.0", "CC-BY-4.0" ]
1
2021-03-17T14:24:08.000Z
2021-03-17T14:24:08.000Z
fmpy/gui/MainWindow.py
CSchulzeTLK/FMPy
fde192346c36eb69dbaca60a96e80cdc8ef37b89
[ "CC-BY-3.0", "CC-BY-4.0" ]
null
null
null
fmpy/gui/MainWindow.py
CSchulzeTLK/FMPy
fde192346c36eb69dbaca60a96e80cdc8ef37b89
[ "CC-BY-3.0", "CC-BY-4.0" ]
null
null
null
""" Entry point for the graphical user interface """ try: from . import compile_resources compile_resources() except Exception as e: print("Failed to compiled resources. %s" % e) import os import sys from PyQt5.QtCore import QCoreApplication, QDir, Qt, pyqtSignal, QUrl, QSettings, QPoint, QTim...
41.966102
272
0.62265
try: from . import compile_resources compile_resources() except Exception as e: print("Failed to compiled resources. %s" % e) import os import sys from PyQt5.QtCore import QCoreApplication, QDir, Qt, pyqtSignal, QUrl, QSettings, QPoint, QTimer, QStandardPaths, \ QPointF, QBuffer, QIODevice...
true
true
1c441c536b6f0ba2ae48a33a2e97137a6527f44f
17,494
py
Python
lib/python2.7/site-packages/matplotlib/tests/test_dates.py
wfehrnstrom/harmonize
e5661d24b2021739e8ac4bf1d3a530eda4e155b3
[ "MIT" ]
1
2017-12-05T15:35:47.000Z
2017-12-05T15:35:47.000Z
lib/python2.7/site-packages/matplotlib/tests/test_dates.py
wfehrnstrom/harmonize
e5661d24b2021739e8ac4bf1d3a530eda4e155b3
[ "MIT" ]
10
2017-07-13T00:24:03.000Z
2017-07-17T07:39:03.000Z
lib/python2.7/site-packages/matplotlib/tests/test_dates.py
wfehrnstrom/harmonize
e5661d24b2021739e8ac4bf1d3a530eda4e155b3
[ "MIT" ]
7
2017-08-01T04:02:07.000Z
2018-10-06T21:07:20.000Z
from __future__ import (absolute_import, division, print_function, unicode_literals) import six from six.moves import map import datetime import warnings import tempfile import dateutil import pytz try: # mock in python 3.3+ from unittest import mock except ImportError: import mo...
36.752101
89
0.613124
from __future__ import (absolute_import, division, print_function, unicode_literals) import six from six.moves import map import datetime import warnings import tempfile import dateutil import pytz try: from unittest import mock except ImportError: import mock from nose.tools imp...
true
true
1c441f687a15c8a847fbb5b8238c9fec5fcdeb16
728
py
Python
icekit/plugins/child_pages/migrations/0001_initial.py
ic-labs/django-icekit
c507ea5b1864303732c53ad7c5800571fca5fa94
[ "MIT" ]
52
2016-09-13T03:50:58.000Z
2022-02-23T16:25:08.000Z
icekit/plugins/child_pages/migrations/0001_initial.py
ic-labs/django-icekit
c507ea5b1864303732c53ad7c5800571fca5fa94
[ "MIT" ]
304
2016-08-11T14:17:30.000Z
2020-07-22T13:35:18.000Z
icekit/plugins/child_pages/migrations/0001_initial.py
ic-labs/django-icekit
c507ea5b1864303732c53ad7c5800571fca5fa94
[ "MIT" ]
12
2016-09-21T18:46:35.000Z
2021-02-15T19:37:50.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ] operations = [ migrations.CreateModel( name='ChildPageItem', fi...
28
164
0.593407
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ] operations = [ migrations.CreateModel( name='ChildPageItem', fields=[ (...
true
true
1c4421bf3400323db69447583130a58df30bd901
1,811
py
Python
src/embedding/auxiliary/factory.py
chengemily/Distributional-Signatures
7ef96f9cfc8aeb2fb54e117e3968e4390aaad819
[ "MIT" ]
243
2019-08-15T18:34:09.000Z
2022-03-31T11:51:00.000Z
src/embedding/auxiliary/factory.py
phymucs/460d60d2c25a118c67dcbfdd37f27d6c
cd7e4659fc9761a8af046e824853aa338b22f2f6
[ "MIT" ]
34
2019-10-22T08:11:28.000Z
2022-03-19T08:03:30.000Z
src/embedding/auxiliary/factory.py
phymucs/460d60d2c25a118c67dcbfdd37f27d6c
cd7e4659fc9761a8af046e824853aa338b22f2f6
[ "MIT" ]
54
2019-08-19T16:11:49.000Z
2022-03-31T05:36:01.000Z
import datetime import torch import torch.nn as nn import torch.nn.functional as F from embedding.auxiliary.pos import POS def get_embedding(args): ''' @return AUX module with aggregated embeddings or None if args.aux did not provide additional embeddings ''' print("{}, Building augmente...
27.861538
78
0.605191
import datetime import torch import torch.nn as nn import torch.nn.functional as F from embedding.auxiliary.pos import POS def get_embedding(args): print("{}, Building augmented embedding".format( datetime.datetime.now().strftime('%02y/%02m/%02d %H:%M:%S'))) aux = [] for ebd in args.auxiliary: ...
true
true
1c44232a092f5ad3d514e0826917e96a5a8c0b13
1,278
py
Python
leads/urls.py
tmbyers1102/djcrm
7a2830a3d1867a223a748b5cb9b771fcc45577e4
[ "MIT" ]
null
null
null
leads/urls.py
tmbyers1102/djcrm
7a2830a3d1867a223a748b5cb9b771fcc45577e4
[ "MIT" ]
null
null
null
leads/urls.py
tmbyers1102/djcrm
7a2830a3d1867a223a748b5cb9b771fcc45577e4
[ "MIT" ]
null
null
null
from django.urls import path from .views import ( LeadListView, LeadDetailView, LeadCreateView, LeadUpdateView, LeadDeleteView, AssignAgentView, CategoryListView, CategoryDetailView, LeadCategoryUpdateView, CategoryCreateView, CategoryUpdateView, CategoryDeleteView ) app_name = "leads" urlpatterns = [ ...
55.565217
94
0.717527
from django.urls import path from .views import ( LeadListView, LeadDetailView, LeadCreateView, LeadUpdateView, LeadDeleteView, AssignAgentView, CategoryListView, CategoryDetailView, LeadCategoryUpdateView, CategoryCreateView, CategoryUpdateView, CategoryDeleteView ) app_name = "leads" urlpatterns = [ ...
true
true
1c4423c0dbd6723411c958372c1c8fc474df25d0
819
py
Python
examples/loading_images.py
FPEPOSHI/PyBoof
00c67c0689be35019b65d5e5dc1a8a5a8e471d9d
[ "Apache-2.0" ]
1
2022-02-10T04:18:28.000Z
2022-02-10T04:18:28.000Z
examples/loading_images.py
yuantailing/PyBoof
a5a0ffba6adfeb8d97c099c2470995553466eeaa
[ "Apache-2.0" ]
null
null
null
examples/loading_images.py
yuantailing/PyBoof
a5a0ffba6adfeb8d97c099c2470995553466eeaa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import numpy as np import cv2 import pyboof as pb # Enable use of memory mapped files for MUCH faster conversion of images between java and python pb.init_memmap() image_path = '../data/example/outdoors01.jpg' # Can load an image using OpenCV then convert it into BoofCV ndarray_img = cv2.imr...
26.419355
96
0.73138
import numpy as np import cv2 import pyboof as pb pb.init_memmap() image_path = '../data/example/outdoors01.jpg' ndarray_img = cv2.imread(image_path, 0) boof_cv = pb.ndarray_to_boof(ndarray_img) boof_gray = pb.load_single_band(image_path, np.uint8) boof_color = pb.load_planar(image_path, np.uint8) # display the...
true
true
1c4423ccd33c81a933965b4db4ae0ecdcaf8a624
1,563
py
Python
app/urls.py
victoriadrake/django-starter
4fbb423edf79bf4e512a4a6c578072c539d00b9d
[ "MIT" ]
6
2021-08-25T12:06:29.000Z
2022-02-16T12:36:58.000Z
app/urls.py
victoriadrake/django-starter
4fbb423edf79bf4e512a4a6c578072c539d00b9d
[ "MIT" ]
null
null
null
app/urls.py
victoriadrake/django-starter
4fbb423edf79bf4e512a4a6c578072c539d00b9d
[ "MIT" ]
2
2021-08-28T07:50:16.000Z
2022-02-21T09:47:46.000Z
"""URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views ...
39.075
87
0.715291
import app.views as views from django.conf import settings from django.urls import re_path from django.views.static import serve from django.contrib import admin from django.urls import include, path urlpatterns = [path("admin/", admin.site.urls), path("", views.Welcome.as_view())] if settings.DEBUG: from django....
true
true
1c4423e641fedf13db70ea243a100a5ec19fb37b
711
py
Python
dodo.py
Thirty-OneR/Astr496_assignment03
e5c8c842906fa9d6c141fb92a0fc9e134810ec64
[ "BSD-3-Clause" ]
null
null
null
dodo.py
Thirty-OneR/Astr496_assignment03
e5c8c842906fa9d6c141fb92a0fc9e134810ec64
[ "BSD-3-Clause" ]
null
null
null
dodo.py
Thirty-OneR/Astr496_assignment03
e5c8c842906fa9d6c141fb92a0fc9e134810ec64
[ "BSD-3-Clause" ]
null
null
null
from doit.tools import run_once import h5py import numpy as np import matplotlib.pyplot as plt def task_generate_gaussian(): N = 32**3 seed = 0x4d3d3d3 fn = "gaussian.h5" def _generate(): np.random.seed(seed) pos = np.random.normal(loc = [0.5, 0.5, 0.5], scale = 0.2, size = (N, 3)) ...
33.857143
81
0.583685
from doit.tools import run_once import h5py import numpy as np import matplotlib.pyplot as plt def task_generate_gaussian(): N = 32**3 seed = 0x4d3d3d3 fn = "gaussian.h5" def _generate(): np.random.seed(seed) pos = np.random.normal(loc = [0.5, 0.5, 0.5], scale = 0.2, size = (N, 3)) ...
true
true
1c4423f3e839538adbe798b9a8ec37bc7802b9d8
4,881
py
Python
ciscoisesdk/models/validators/v3_1_0/jsd_df9ab8ff636353279d5c787585dcb6af.py
CiscoISE/ciscoisesdk
860b0fc7cc15d0c2a39c64608195a7ab3d5f4885
[ "MIT" ]
36
2021-05-18T16:24:19.000Z
2022-03-05T13:44:41.000Z
ciscoisesdk/models/validators/v3_0_0/jsd_df9ab8ff636353279d5c787585dcb6af.py
CiscoISE/ciscoisesdk
860b0fc7cc15d0c2a39c64608195a7ab3d5f4885
[ "MIT" ]
15
2021-06-08T19:03:37.000Z
2022-02-25T14:47:33.000Z
ciscoisesdk/models/validators/v3_1_0/jsd_df9ab8ff636353279d5c787585dcb6af.py
CiscoISE/ciscoisesdk
860b0fc7cc15d0c2a39c64608195a7ab3d5f4885
[ "MIT" ]
6
2021-06-10T09:32:01.000Z
2022-01-12T08:34:39.000Z
# -*- coding: utf-8 -*- """Identity Services Engine updateRadiusServerSequenceById data model. Copyright (c) 2021 Cisco and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software with...
31.694805
83
0.461995
from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import fastjsonschema import json from ciscoisesdk.exceptions import MalformedRequest from builtins import * class JSONSchemaValidatorDf9Ab8Ff636353279D5C787585Dcb6Af(object): def __init__(self): su...
true
true
1c44240d49c67657b76398b4c928871217f7814a
1,365
py
Python
blog/migrations/0001_initial.py
albertmil97/django_AlbertMIliano
9d1c1763e9061083d1cc1e389a77423cfd2e7daf
[ "MIT" ]
null
null
null
blog/migrations/0001_initial.py
albertmil97/django_AlbertMIliano
9d1c1763e9061083d1cc1e389a77423cfd2e7daf
[ "MIT" ]
null
null
null
blog/migrations/0001_initial.py
albertmil97/django_AlbertMIliano
9d1c1763e9061083d1cc1e389a77423cfd2e7daf
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-06-08 04:47 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
37.916667
146
0.606593
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
true
true
1c4424f6ccb062b4183b7bc73cbbf4c674e6bcfd
25,179
py
Python
hw/vendor/lowrisc_ibex/vendor/google_riscv-dv/pygen/pygen_src/isa/riscv_cov_instr.py
msfschaffner/opentitan-bak
de4cb1bb9e7b707a3ca2a6882d83af7ed2aa1ab8
[ "Apache-2.0" ]
1
2021-12-15T09:23:09.000Z
2021-12-15T09:23:09.000Z
hw/vendor/lowrisc_ibex/vendor/google_riscv-dv/pygen/pygen_src/isa/riscv_cov_instr.py
msfschaffner/opentitan-bak
de4cb1bb9e7b707a3ca2a6882d83af7ed2aa1ab8
[ "Apache-2.0" ]
3
2020-05-29T13:12:25.000Z
2020-06-19T13:07:23.000Z
hw/vendor/lowrisc_ibex/vendor/google_riscv-dv/pygen/pygen_src/isa/riscv_cov_instr.py
msfschaffner/opentitan-bak
de4cb1bb9e7b707a3ca2a6882d83af7ed2aa1ab8
[ "Apache-2.0" ]
1
2021-08-28T16:19:23.000Z
2021-08-28T16:19:23.000Z
"""Copyright 2020 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
42.604061
91
0.569959
import vsc import logging from importlib import import_module from enum import IntEnum, auto from pygen_src.riscv_instr_pkg import * from pygen_src.riscv_instr_gen_config import cfg rcs = import_module("pygen_src.target." + cfg.argv.target + ".riscv_core_setting") class operand_sign_e(IntEnum): POSITIVE = 0 ...
true
true
1c4425361079a914aa13fb002ab4d66acd3e4a30
104
py
Python
poetry/__main__.py
uda/poetry
30e3d7e33c20cbe2af8eda06e0db4888275caaa1
[ "MIT" ]
12,347
2019-12-12T07:07:32.000Z
2022-03-31T21:08:50.000Z
poetry/__main__.py
uda/poetry
30e3d7e33c20cbe2af8eda06e0db4888275caaa1
[ "MIT" ]
3,483
2019-12-11T20:20:20.000Z
2022-03-31T23:18:18.000Z
poetry/__main__.py
uda/poetry
30e3d7e33c20cbe2af8eda06e0db4888275caaa1
[ "MIT" ]
1,399
2019-12-12T12:27:46.000Z
2022-03-31T09:12:53.000Z
import sys if __name__ == "__main__": from .console.application import main sys.exit(main())
13
41
0.673077
import sys if __name__ == "__main__": from .console.application import main sys.exit(main())
true
true
1c44263ae8800ae610a0ea2b221f9c8a0ffd43f6
911
py
Python
handlers/InputHandler.py
sachio222/socketchat_v3
cd62b892842f6708055359fa2384269038f425dc
[ "MIT" ]
1
2020-11-30T03:54:35.000Z
2020-11-30T03:54:35.000Z
handlers/InputHandler.py
sachio222/socketchat_v3
cd62b892842f6708055359fa2384269038f425dc
[ "MIT" ]
null
null
null
handlers/InputHandler.py
sachio222/socketchat_v3
cd62b892842f6708055359fa2384269038f425dc
[ "MIT" ]
null
null
null
import socket from sys import prefix from chatutils import utils import config.filepaths as paths from handlers import EncryptionHandler, ClientMsgHandler prefixes = utils.JSONLoader(paths.prefix_path) def dispatch(sock: socket, msg: str) -> bytes: """Splits input data between commands and transmissions. Me...
30.366667
69
0.637761
import socket from sys import prefix from chatutils import utils import config.filepaths as paths from handlers import EncryptionHandler, ClientMsgHandler prefixes = utils.JSONLoader(paths.prefix_path) def dispatch(sock: socket, msg: str) -> bytes: if len(msg): if msg[0] == '/': msg = Client...
true
true
1c4427a91f89d5195c34bc012f9a3d3cfc65f9b3
3,355
py
Python
Octopus/app/__init__.py
zhnlk/octopus
4deb502eebc655ed512273a330b885d77bb8e32a
[ "MIT" ]
null
null
null
Octopus/app/__init__.py
zhnlk/octopus
4deb502eebc655ed512273a330b885d77bb8e32a
[ "MIT" ]
null
null
null
Octopus/app/__init__.py
zhnlk/octopus
4deb502eebc655ed512273a330b885d77bb8e32a
[ "MIT" ]
null
null
null
# Import flask and template operators import logging import traceback import apscheduler from apscheduler.schedulers.background import BackgroundScheduler from flask import Flask from flask import jsonify from flask_basicauth import BasicAuth from flask_restful import Api from flask_restful_swagger import swagger from...
25.807692
100
0.739493
import logging import traceback import apscheduler from apscheduler.schedulers.background import BackgroundScheduler from flask import Flask from flask import jsonify from flask_basicauth import BasicAuth from flask_restful import Api from flask_restful_swagger import swagger from flask_sqlalchemy import SQLAlchemy fr...
true
true
1c4427b25aca05f214bd3202fd7bba4c40a1e7a0
87,751
py
Python
typhon/plots/cm/_cmocean.py
tmieslinger/typhon
588539e5c4831ee18753d7ead5b2f2736e922bb1
[ "MIT" ]
53
2017-09-19T06:40:37.000Z
2022-03-21T07:59:30.000Z
typhon/plots/cm/_cmocean.py
tmieslinger/typhon
588539e5c4831ee18753d7ead5b2f2736e922bb1
[ "MIT" ]
96
2017-09-18T12:01:42.000Z
2021-12-17T13:54:45.000Z
typhon/plots/cm/_cmocean.py
tmieslinger/typhon
588539e5c4831ee18753d7ead5b2f2736e922bb1
[ "MIT" ]
32
2017-09-07T09:09:21.000Z
2021-10-01T03:54:23.000Z
# -*- coding: utf-8 -*- """ It is a subset of the cmocean package [0] provided by Kristen M. Thyng. The MIT License (MIT) Copyright (c) 2015 Kristen M. Thyng Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in t...
41.548769
78
0.645337
_density_data = [ [0.90220216, 0.94417980, 0.94380273], [0.89544454, 0.94095789, 0.94106488], [0.88868558, 0.93774038, 0.93840987], [0.88192751, 0.93452625, 0.93583728], [0.87517248, 0.93131455, 0.93334654], [0.86842255, 0.92810438, 0.93093690], [0.86167970, 0.92489490, 0.92860749], [0....
true
true
1c442889a1b7474a639e574b6d8ff896dff9adeb
7,809
py
Python
instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
stschenk/opentelemetry-python-contrib
28c1331e571d386baab74f5028e3268e4bfda4cd
[ "Apache-2.0", "BSD-3-Clause" ]
1
2020-03-17T05:37:21.000Z
2020-03-17T05:37:21.000Z
instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
stschenk/opentelemetry-python-contrib
28c1331e571d386baab74f5028e3268e4bfda4cd
[ "Apache-2.0", "BSD-3-Clause" ]
3
2019-08-26T13:06:36.000Z
2020-02-21T21:44:02.000Z
instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
stschenk/opentelemetry-python-contrib
28c1331e571d386baab74f5028e3268e4bfda4cd
[ "Apache-2.0", "BSD-3-Clause" ]
1
2020-10-22T20:13:37.000Z
2020-10-22T20:13:37.000Z
# Copyright The OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
37.363636
91
0.619029
import operator import typing import urllib from functools import wraps from typing import Tuple from asgiref.compatibility import guarantee_single_callable from opentelemetry import context, propagators, trace from opentelemetry.instrumentation.asgi.version import __version__ from opentelemetry.instrumentation.ut...
true
true
1c4429efcf1bf8e61716fe3bf3416c05614bb251
6,071
py
Python
tests/falcon_test.py
titaux12/falcon-apispec
2f680622ddfb2af57685903578f9d4dccba72a6b
[ "MIT" ]
null
null
null
tests/falcon_test.py
titaux12/falcon-apispec
2f680622ddfb2af57685903578f9d4dccba72a6b
[ "MIT" ]
null
null
null
tests/falcon_test.py
titaux12/falcon-apispec
2f680622ddfb2af57685903578f9d4dccba72a6b
[ "MIT" ]
1
2021-03-25T17:13:09.000Z
2021-03-25T17:13:09.000Z
import logging import falcon import pytest from apispec import APISpec from apispec.exceptions import APISpecError from falcon_apispec import FalconPlugin logging.basicConfig(level="DEBUG") @pytest.fixture() def spec_factory(): def _spec(app): return APISpec( title="Swagger Petstore", ...
30.661616
79
0.51919
import logging import falcon import pytest from apispec import APISpec from apispec.exceptions import APISpecError from falcon_apispec import FalconPlugin logging.basicConfig(level="DEBUG") @pytest.fixture() def spec_factory(): def _spec(app): return APISpec( title="Swagger Petstore", ...
true
true
1c442aa98df653b95bdf0ffef94696a49f90a158
22,175
py
Python
sdk/python/pulumi_azure_native/network/v20200501/express_route_port.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20200501/express_route_port.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20200501/express_route_port.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# 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, overload from ... import _utilities fro...
47.997835
3,108
0.670891
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['ExpressRoutePortArgs', 'ExpressRoutePort'] @pulumi.input_type class ExpressRoutePortArgs: ...
true
true
1c442ab2c8f5c84fc82c2d5fdb56f5553c96b1cb
14,164
py
Python
reversion/revisions.py
baffolobill/django-reversion
e0e12ce00f91043ba9c828dc47cbe0e57d3cbc36
[ "BSD-3-Clause" ]
null
null
null
reversion/revisions.py
baffolobill/django-reversion
e0e12ce00f91043ba9c828dc47cbe0e57d3cbc36
[ "BSD-3-Clause" ]
null
null
null
reversion/revisions.py
baffolobill/django-reversion
e0e12ce00f91043ba9c828dc47cbe0e57d3cbc36
[ "BSD-3-Clause" ]
null
null
null
from collections import namedtuple, defaultdict from contextlib import contextmanager from functools import wraps from threading import local from django.apps import apps from django.core import serializers from django.core.exceptions import ObjectDoesNotExist from django.db import models, transaction, router from djan...
30.724512
109
0.662666
from collections import namedtuple, defaultdict from contextlib import contextmanager from functools import wraps from threading import local from django.apps import apps from django.core import serializers from django.core.exceptions import ObjectDoesNotExist from django.db import models, transaction, router from djan...
true
true
1c442c4ca43be27ff4775ef2715d2c6c62226955
3,211
py
Python
rfxcom/protocol/lighting2.py
d0ugal-archive/python-rfxcom
2eb87f85e5f5a04d00f32f25e0f010edfefbde0d
[ "BSD-3-Clause" ]
3
2015-07-16T13:33:13.000Z
2017-09-17T13:11:42.000Z
rfxcom/protocol/lighting2.py
d0ugal/python-rfxcom
2eb87f85e5f5a04d00f32f25e0f010edfefbde0d
[ "BSD-3-Clause" ]
6
2015-07-20T21:50:36.000Z
2017-06-05T06:06:25.000Z
rfxcom/protocol/lighting2.py
d0ugal-archive/python-rfxcom
2eb87f85e5f5a04d00f32f25e0f010edfefbde0d
[ "BSD-3-Clause" ]
6
2015-07-21T07:47:25.000Z
2017-03-03T05:11:03.000Z
""" Lighting 5 ========== """ from rfxcom.protocol.base import BasePacketHandler from rfxcom.protocol.rfxpacketutils import RfxPacketUtils SUB_TYPE_COMMANDS = { 0x00: { 0x00: 'Off', 0x01: 'On', 0x02: 'Set level', 0x03: 'Group Off', 0x04: 'Group On', 0x05: 'Set Gro...
22.612676
78
0.50109
from rfxcom.protocol.base import BasePacketHandler from rfxcom.protocol.rfxpacketutils import RfxPacketUtils SUB_TYPE_COMMANDS = { 0x00: { 0x00: 'Off', 0x01: 'On', 0x02: 'Set level', 0x03: 'Group Off', 0x04: 'Group On', 0x05: 'Set Group Level', }, 0x01: { ...
true
true
1c442c763412ef5363e2973cbb581f3531ffb93c
32,879
py
Python
mmdet/datasets/pipelines/transforms.py
ktw361/Local-Mid-Propagation
0a99e82cccf8c35bc5f6989af2702203def4c7a4
[ "Apache-2.0" ]
10
2020-08-13T17:51:20.000Z
2021-05-23T08:31:50.000Z
mmdet/datasets/pipelines/transforms.py
ktw361/Local-Mid-Propagation
0a99e82cccf8c35bc5f6989af2702203def4c7a4
[ "Apache-2.0" ]
null
null
null
mmdet/datasets/pipelines/transforms.py
ktw361/Local-Mid-Propagation
0a99e82cccf8c35bc5f6989af2702203def4c7a4
[ "Apache-2.0" ]
2
2020-09-07T08:33:43.000Z
2020-12-22T12:28:26.000Z
import inspect import albumentations import mmcv import numpy as np from albumentations import Compose from imagecorruptions import corrupt from numpy import random from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps from ..registry import PIPELINES @PIPELINES.register_module class Resize(object): """...
36.370575
94
0.559962
import inspect import albumentations import mmcv import numpy as np from albumentations import Compose from imagecorruptions import corrupt from numpy import random from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps from ..registry import PIPELINES @PIPELINES.register_module class Resize(object): de...
true
true
1c442d2fada5240fc6d9343528a6ef23452beded
7,694
py
Python
nova/api/openstack/compute/contrib/baremetal_nodes.py
bopopescu/nova-39
36c7a819582b838b7bbab11d55ca3d991a587405
[ "Apache-2.0" ]
1
2021-04-08T10:13:03.000Z
2021-04-08T10:13:03.000Z
nova/api/openstack/compute/contrib/baremetal_nodes.py
bopopescu/nova-39
36c7a819582b838b7bbab11d55ca3d991a587405
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/contrib/baremetal_nodes.py
bopopescu/nova-39
36c7a819582b838b7bbab11d55ca3d991a587405
[ "Apache-2.0" ]
1
2020-07-24T09:39:47.000Z
2020-07-24T09:39:47.000Z
# Copyright (c) 2013 NTT DOCOMO, INC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
35.13242
78
0.610216
import webob from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import exception from nova.virt.baremetal import db authorize = extensions.extension_authorizer('compute', 'baremetal_nodes') node_fields = ['id', 'cpus', 'local_gb', 'memory_...
true
true
1c442e3d79417cf8362146c9eef72af711a9391e
1,130
py
Python
demo/example/wsgi.py
afahounko/django-plans
089c90486ead3b8ab69b8b119f33d5ef923ca08e
[ "MIT" ]
13
2016-01-19T15:45:32.000Z
2018-06-21T22:51:56.000Z
demo/example/wsgi.py
afahounko/django-plans
089c90486ead3b8ab69b8b119f33d5ef923ca08e
[ "MIT" ]
11
2015-12-01T20:01:06.000Z
2018-07-07T05:12:17.000Z
demo/example/wsgi.py
afahounko/django-plans
089c90486ead3b8ab69b8b119f33d5ef923ca08e
[ "MIT" ]
8
2015-11-17T02:12:36.000Z
2018-08-01T22:17:12.000Z
""" WSGI config for xmpl project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` set...
38.965517
79
0.806195
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xmpl.settings") # setting points here. from django.core.wsgi import get_wsgi_application application = get_wsgi_application() # Apply WSGI middleware here. # from helloworld.wsgi import HelloWorldApplication # application = HelloWorldApplication(application)...
true
true
1c442f847b28080303990953647216aee7c6607f
11,205
py
Python
python_src/adaptive_formation/gradient_interactive.py
tkortz/motion_planning_rt
08e914642b802f7217a8ad0f6153d41ccdce8c7d
[ "MIT" ]
null
null
null
python_src/adaptive_formation/gradient_interactive.py
tkortz/motion_planning_rt
08e914642b802f7217a8ad0f6153d41ccdce8c7d
[ "MIT" ]
null
null
null
python_src/adaptive_formation/gradient_interactive.py
tkortz/motion_planning_rt
08e914642b802f7217a8ad0f6153d41ccdce8c7d
[ "MIT" ]
null
null
null
# In order to launch execute: # python3 gradient_interactive.py import numpy as np from numpy.linalg import norm import matplotlib.pyplot as plt from matplotlib import collections from scipy.ndimage.morphology import distance_transform_edt as bwdist from math import * import random from impedance_modeles import * impo...
40.745455
139
0.619188
import numpy as np from numpy.linalg import norm import matplotlib.pyplot as plt from matplotlib import collections from scipy.ndimage.morphology import distance_transform_edt as bwdist from math import * import random from impedance_modeles import * import time from progress.bar import FillingCirclesBar from tasks i...
true
true
1c442f8e6a0dc8f5fe2a81b2f44f17d32075be5c
2,598
py
Python
openarticlegauge/plugins/hindawi.py
CottageLabs/OpenArticleGauge
58d29b4209a7b59041d61326ffe1cf03f98f3cff
[ "BSD-3-Clause" ]
1
2016-04-07T18:29:27.000Z
2016-04-07T18:29:27.000Z
openarticlegauge/plugins/hindawi.py
CottageLabs/OpenArticleGauge
58d29b4209a7b59041d61326ffe1cf03f98f3cff
[ "BSD-3-Clause" ]
11
2015-01-06T15:53:09.000Z
2022-03-01T01:46:14.000Z
openarticlegauge/plugins/hindawi.py
CottageLabs/OpenArticleGauge
58d29b4209a7b59041d61326ffe1cf03f98f3cff
[ "BSD-3-Clause" ]
null
null
null
""" This plugin handles Hindawi articles. Hindawi publish from a single domain and use a consistent format for licenses so this one should be relatively straightforward. """ from openarticlegauge import plugin class HindawiPlugin(plugin.Plugin): _short_name = __name__.split('.')[-1] __version__='0.1' # consid...
41.238095
302
0.635104
from openarticlegauge import plugin class HindawiPlugin(plugin.Plugin): _short_name = __name__.split('.')[-1] __version__='0.1' __desc__ = "Obtains licenses from articles published by Hindawi" _base_urls = ["www.hindawi.com"] _license_mappings = [ ...
true
true
1c443024fe6467b58121c2e7ba26b7dca51aeb4e
1,070
py
Python
algorithms/backtrack/subsets.py
nisaruj/algorithms
1e03cd259c2d7ada113eb99843dcada9f20adf54
[ "MIT" ]
6
2018-12-12T09:14:05.000Z
2019-04-29T22:07:28.000Z
algorithms/backtrack/subsets.py
nisaruj/algorithms
1e03cd259c2d7ada113eb99843dcada9f20adf54
[ "MIT" ]
null
null
null
algorithms/backtrack/subsets.py
nisaruj/algorithms
1e03cd259c2d7ada113eb99843dcada9f20adf54
[ "MIT" ]
7
2019-03-21T10:18:22.000Z
2021-09-22T07:34:10.000Z
""" Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. For example, If nums = [1,2,3], a solution is: [ [3], [1], [2], [1,2,3], [1,3], [2,3], [1,2], [] ] """ def subsets(nums): """ O(2**n) """ def backtrack...
17.833333
68
0.526168
def subsets(nums): def backtrack(res, nums, stack, pos): if pos == len(nums): res.append(list(stack)) else: stack.append(nums[pos]) backtrack(res, nums, stack, pos+1) stack.pop() backtrack(res, nums, stack, pos+1) ...
true
true
1c4430552bfe4f27d5a07dbbf8a7fb3bc4ff2e65
1,659
py
Python
tests/optimization/test_genetic_algorithm.py
iamchetry/DataChallenge-Fall2021
fa7748c9ea2f3c0f6bde8d0b094fc75463e28f33
[ "BSD-3-Clause" ]
108
2018-03-23T20:06:03.000Z
2022-01-06T19:32:46.000Z
tests/optimization/test_genetic_algorithm.py
hachmannlab/ChemML
42b152579872a57c834884596f700c76b9320280
[ "BSD-3-Clause" ]
18
2019-08-09T21:16:14.000Z
2022-02-14T21:52:06.000Z
tests/optimization/test_genetic_algorithm.py
hachmannlab/ChemML
42b152579872a57c834884596f700c76b9320280
[ "BSD-3-Clause" ]
28
2018-04-28T17:07:33.000Z
2022-02-28T07:22:56.000Z
import pytest from chemml.optimization import GeneticAlgorithm space = ({'alpha': {'uniform': [-20, 0], 'mutation': [0, 2]}}, {'neurons': {'int': [0,10]}}, {'act': {'choice':range(0,100,5)}}) def evaluate(individual): return sum(individual) def test_algorithms(...
30.163636
72
0.517782
import pytest from chemml.optimization import GeneticAlgorithm space = ({'alpha': {'uniform': [-20, 0], 'mutation': [0, 2]}}, {'neurons': {'int': [0,10]}}, {'act': {'choice':range(0,100,5)}}) def evaluate(individual): return sum(individual) def test_algorithms(...
true
true
1c44335e84dfb5cd043b5622e45e9e7089d0a86c
1,232
py
Python
2016/day_13.py
viddrobnic/adventofcode
8f06f4ad3ed6744d20d222b050a15b8ff0ff9c82
[ "MIT" ]
null
null
null
2016/day_13.py
viddrobnic/adventofcode
8f06f4ad3ed6744d20d222b050a15b8ff0ff9c82
[ "MIT" ]
null
null
null
2016/day_13.py
viddrobnic/adventofcode
8f06f4ad3ed6744d20d222b050a15b8ff0ff9c82
[ "MIT" ]
1
2020-12-01T16:49:12.000Z
2020-12-01T16:49:12.000Z
from queue import Queue seed = 1362 seen = set() def is_empty(x, y): n = x*x + 3*x + 2*x*y + y + y*y + seed return bin(n).count('1') % 2 == 0 def valid_moves(x, y): result = [] actions = [-1, 1] for action in actions: new_x = x + action if x > 0 and is_empty(new_x, y) and (new_x...
20.196721
67
0.564935
from queue import Queue seed = 1362 seen = set() def is_empty(x, y): n = x*x + 3*x + 2*x*y + y + y*y + seed return bin(n).count('1') % 2 == 0 def valid_moves(x, y): result = [] actions = [-1, 1] for action in actions: new_x = x + action if x > 0 and is_empty(new_x, y) and (new_x...
true
true
1c4433f0812e9b10a3f57fc23795522eae70a302
1,207
py
Python
tempest/services/volume/json/admin/volume_services_client.py
midokura/tempest
b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b
[ "Apache-2.0" ]
null
null
null
tempest/services/volume/json/admin/volume_services_client.py
midokura/tempest
b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b
[ "Apache-2.0" ]
null
null
null
tempest/services/volume/json/admin/volume_services_client.py
midokura/tempest
b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 NEC Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
32.621622
78
0.714996
import json import urllib from tempest.common import service_client class BaseVolumesServicesClientJSON(service_client.ServiceClient): def list_services(self, params=None): url = 'os-services' if params: url += '?%s' % urllib.urlencode(params) resp, body = self.get(url) ...
true
true
1c4434aaeea67d038888d9e299fd5181e631f135
137
py
Python
tests/test_placeholder.py
bveeramani/sysx
ca67995d4fafb5280d16ccb3825cdd6c2a7c7e48
[ "Apache-2.0" ]
null
null
null
tests/test_placeholder.py
bveeramani/sysx
ca67995d4fafb5280d16ccb3825cdd6c2a7c7e48
[ "Apache-2.0" ]
null
null
null
tests/test_placeholder.py
bveeramani/sysx
ca67995d4fafb5280d16ccb3825cdd6c2a7c7e48
[ "Apache-2.0" ]
null
null
null
"""A placeholder test to prevent pytest from erroring.""" def test_placeholder(): """Test that 1 + 1 = 2.""" assert 1 + 1 == 2
19.571429
57
0.59854
def test_placeholder(): assert 1 + 1 == 2
true
true
1c443523f65f5f8c973e9eb58b9cf057505dc784
630
py
Python
tests/unit/db/test_users.py
jaimecruz21/lifeloopweb
ba0ffe1ea94ba3323a4e9c66c9506a338cae3212
[ "MIT" ]
null
null
null
tests/unit/db/test_users.py
jaimecruz21/lifeloopweb
ba0ffe1ea94ba3323a4e9c66c9506a338cae3212
[ "MIT" ]
null
null
null
tests/unit/db/test_users.py
jaimecruz21/lifeloopweb
ba0ffe1ea94ba3323a4e9c66c9506a338cae3212
[ "MIT" ]
null
null
null
import pytest from lifeloopweb.db.models import User from lifeloopweb import exception import tests class TestUser(tests.TestBase): def test_get_email_from_full_name_and_email(self): full_name_and_email = "Jason Meridth (jason@meridth.io)" result = User.get_email_from_full_name_and_email( ...
33.157895
73
0.757143
import pytest from lifeloopweb.db.models import User from lifeloopweb import exception import tests class TestUser(tests.TestBase): def test_get_email_from_full_name_and_email(self): full_name_and_email = "Jason Meridth (jason@meridth.io)" result = User.get_email_from_full_name_and_email( ...
true
true
1c443672071b863adb6d9fc4151f01406c3f4e08
1,165
py
Python
funcstructs/prototypes/necklace_groups.py
caleblevy/endofunction-structures
084ddeab8d12307dd95b8727190c589a1bf659df
[ "MIT" ]
5
2015-05-06T05:08:26.000Z
2017-04-21T03:32:13.000Z
funcstructs/prototypes/necklace_groups.py
caleblevy/endofunction-structures
084ddeab8d12307dd95b8727190c589a1bf659df
[ "MIT" ]
null
null
null
funcstructs/prototypes/necklace_groups.py
caleblevy/endofunction-structures
084ddeab8d12307dd95b8727190c589a1bf659df
[ "MIT" ]
null
null
null
"""Caleb Levy, 2015.""" from funcstructs.structures import necklaces from funcstructs import combinat from . import polynomials, integer_partitions def count_by_period(beads): return necklaces.FixedContentNecklaces(beads).count_by_period() def period_combos(beads, reps): """All possible combinations of pe...
33.285714
78
0.744206
from funcstructs.structures import necklaces from funcstructs import combinat from . import polynomials, integer_partitions def count_by_period(beads): return necklaces.FixedContentNecklaces(beads).count_by_period() def period_combos(beads, reps): necklace_counts = count_by_period(beads) periods = [i ...
true
true
1c443772534ffc1c373c281238456b449eecb7ea
309
py
Python
samples/frontend/manage.py
liuyu81/datagator-contrib
813529e211f680732bd1dc9568f5b4f2bdcacdcc
[ "Apache-2.0" ]
2
2015-02-20T02:50:07.000Z
2017-05-02T19:26:42.000Z
samples/frontend/manage.py
liuyu81/datagator-contrib
813529e211f680732bd1dc9568f5b4f2bdcacdcc
[ "Apache-2.0" ]
null
null
null
samples/frontend/manage.py
liuyu81/datagator-contrib
813529e211f680732bd1dc9568f5b4f2bdcacdcc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DATAGATOR_DEVELOP", "1") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "datagator.wsgi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
25.75
78
0.763754
import os import sys if __name__ == "__main__": os.environ.setdefault("DATAGATOR_DEVELOP", "1") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "datagator.wsgi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
true
true
1c4437932e33a6e182efd278f5f9d445858bdcb6
1,021
py
Python
main.py
SamAlhabash/fast-api-with-mongodb
20f5b05f37fda088ffcd6479d79847234ffc1370
[ "MIT" ]
null
null
null
main.py
SamAlhabash/fast-api-with-mongodb
20f5b05f37fda088ffcd6479d79847234ffc1370
[ "MIT" ]
null
null
null
main.py
SamAlhabash/fast-api-with-mongodb
20f5b05f37fda088ffcd6479d79847234ffc1370
[ "MIT" ]
null
null
null
from fastapi import FastAPI from config.config import settings from starlette.middleware.cors import CORSMiddleware from api.api_v1.api import api_router from api.api_v1.services.database import connect_db, close_db import uvicorn app = FastAPI( title=settings.PROJECT_NAME, description=settings.PROJECT_DESC, ...
28.361111
68
0.688541
from fastapi import FastAPI from config.config import settings from starlette.middleware.cors import CORSMiddleware from api.api_v1.api import api_router from api.api_v1.services.database import connect_db, close_db import uvicorn app = FastAPI( title=settings.PROJECT_NAME, description=settings.PROJECT_DESC, ...
true
true
1c4437a501f34a54f0bce2a6c39e661634304ed4
415
py
Python
api/urls.py
GomaGoma676/ScrumTaskApi_Backend
f977f6fae514ee92f3f37b94c052d953b8dcc693
[ "MIT" ]
1
2020-11-03T10:17:48.000Z
2020-11-03T10:17:48.000Z
api/urls.py
GomaGoma676/ScrumTaskApi_Backend
f977f6fae514ee92f3f37b94c052d953b8dcc693
[ "MIT" ]
null
null
null
api/urls.py
GomaGoma676/ScrumTaskApi_Backend
f977f6fae514ee92f3f37b94c052d953b8dcc693
[ "MIT" ]
1
2021-03-20T15:24:42.000Z
2021-03-20T15:24:42.000Z
from django.urls import path from django.conf.urls import include from rest_framework import routers from .views import TaskViewSet, UserViewSet, SprintViewSet, TagViewSet router = routers.DefaultRouter() router.register('users', UserViewSet) router.register('tasks', TaskViewSet) router.register('sprints', SprintViewS...
27.666667
70
0.785542
from django.urls import path from django.conf.urls import include from rest_framework import routers from .views import TaskViewSet, UserViewSet, SprintViewSet, TagViewSet router = routers.DefaultRouter() router.register('users', UserViewSet) router.register('tasks', TaskViewSet) router.register('sprints', SprintViewS...
true
true
1c44380bc3440a460421d22b63007e3644b1af03
587
py
Python
python_script.py
benjiyo/computer_usage_statistics
e53cd5facdbec34062b092eabeb0121f1727e36f
[ "MIT" ]
1
2016-12-08T14:10:06.000Z
2016-12-08T14:10:06.000Z
python_script.py
benjiyo/computer_usage_statistics
e53cd5facdbec34062b092eabeb0121f1727e36f
[ "MIT" ]
null
null
null
python_script.py
benjiyo/computer_usage_statistics
e53cd5facdbec34062b092eabeb0121f1727e36f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Call this script with "hour" as argument # Use the file "bash_script" to call this script import sys hour = int(sys.argv[1]) with open('PATH_TO_REPOSITORY/histogram.txt', 'r') as myfile: data = myfile.read() newdata = data.splitlines() newdata[hour] = int(newdata[hour]) + 1 tmpstr =...
23.48
61
0.667802
import sys hour = int(sys.argv[1]) with open('PATH_TO_REPOSITORY/histogram.txt', 'r') as myfile: data = myfile.read() newdata = data.splitlines() newdata[hour] = int(newdata[hour]) + 1 tmpstr = str(newdata) tmpstr = tmpstr.replace("'","") tmpstr = tmpstr.replace(" ","") tmpstr = tmpstr.replace(",","\n") tm...
true
true
1c4438564c78ea33e922ec1b15a0905f72d7a386
3,669
py
Python
Tests/test_weakset_stdlib.py
pxl9588/ironpython3
3417b2d29f4116b8f44af31defb9a098686cd566
[ "Apache-2.0" ]
1
2019-06-27T13:04:33.000Z
2019-06-27T13:04:33.000Z
Tests/test_weakset_stdlib.py
pxl9588/ironpython3
3417b2d29f4116b8f44af31defb9a098686cd566
[ "Apache-2.0" ]
null
null
null
Tests/test_weakset_stdlib.py
pxl9588/ironpython3
3417b2d29f4116b8f44af31defb9a098686cd566
[ "Apache-2.0" ]
null
null
null
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. ## ## Run selected tests from test_weakset from StdLib ## import unittest import sys from iptest import run_te...
53.955882
101
0.746525
import unittest import sys from iptest import run_test import test.test_weakset def load_tests(loader, standard_tests, pattern): if sys.implementation.name == 'ironpython': suite = unittest.TestSuite() suite.addTest(test.test_weakset.TestWeakSet('test_add')) suite.addTest(test.test_weak...
true
true
1c44391f7131c3bfff778a039706cd9754d9e372
890
py
Python
examples/pybullet/examples/switchConstraintSolver.py
stolk/bullet3
41a0d72759a47ef2df986b0bfe56a03e22516123
[ "Zlib" ]
158
2016-11-17T19:37:51.000Z
2022-03-21T19:57:55.000Z
examples/pybullet/examples/switchConstraintSolver.py
stolk/bullet3
41a0d72759a47ef2df986b0bfe56a03e22516123
[ "Zlib" ]
94
2016-11-18T09:55:57.000Z
2021-01-14T08:50:40.000Z
examples/pybullet/examples/switchConstraintSolver.py
stolk/bullet3
41a0d72759a47ef2df986b0bfe56a03e22516123
[ "Zlib" ]
51
2017-05-24T10:20:25.000Z
2022-03-17T15:07:02.000Z
import pybullet as p import time p.connect(p.GUI) #p.setPhysicsEngineParameter(constraintSolverType=p.CONSTRAINT_SOLVER_LCP_PGS, globalCFM = 0.0001) p.setPhysicsEngineParameter(constraintSolverType=p.CONSTRAINT_SOLVER_LCP_DANTZIG, globalCFM=0.000001) #p.setPhysicsEngineParameter(constraintS...
28.709677
98
0.748315
import pybullet as p import time p.connect(p.GUI) p.setPhysicsEngineParameter(constraintSolverType=p.CONSTRAINT_SOLVER_LCP_DANTZIG, globalCFM=0.000001) p.loadURDF("plane.urdf") radius = 0.025 distance = 1.86 yaw = 135 pitch = -11 targetPos = [0, 0, 0] p.setPhysicsEngineParameter(solverRes...
true
true
1c4439485e85dc067e2ce19d19190057cd711a5a
13,225
py
Python
project/Python Code/implementations.py
parkjan4/HiggsBoson
1e31f9bd2c6cb03c6acc8caed573046bbc0d2c08
[ "MIT" ]
null
null
null
project/Python Code/implementations.py
parkjan4/HiggsBoson
1e31f9bd2c6cb03c6acc8caed573046bbc0d2c08
[ "MIT" ]
null
null
null
project/Python Code/implementations.py
parkjan4/HiggsBoson
1e31f9bd2c6cb03c6acc8caed573046bbc0d2c08
[ "MIT" ]
null
null
null
from proj1_helpers import * import numpy as np import random import matplotlib.pyplot as plt ######################### Loss Functions ######################### # Compute loss with Mean Squared Error def compute_loss(y, tx, w): e = y.reshape((len(y),1)) - tx.dot(w).reshape((len(y),1)) return 1/2*np.mean(e**2) ...
36.035422
136
0.61603
from proj1_helpers import * import numpy as np import random import matplotlib.pyplot as plt def compute_loss(y, tx, w): e = y.reshape((len(y),1)) - tx.dot(w).reshape((len(y),1)) return 1/2*np.mean(e**2) def compute_gradient(y, tx, w): e = y.reshape((len(y),1)) - tx.dot(w).reshape((len(y),1)) grad = ...
true
true
1c443992ade1ebf92009bd9acefe5a6589fee159
652
py
Python
Egzersiz/efecan/FonksiyonEgzersiz.py
ibrahimediz/ornekproje
c5ebeafc43a9c6d2aa639d0d95eedbce65991576
[ "Apache-2.0" ]
null
null
null
Egzersiz/efecan/FonksiyonEgzersiz.py
ibrahimediz/ornekproje
c5ebeafc43a9c6d2aa639d0d95eedbce65991576
[ "Apache-2.0" ]
null
null
null
Egzersiz/efecan/FonksiyonEgzersiz.py
ibrahimediz/ornekproje
c5ebeafc43a9c6d2aa639d0d95eedbce65991576
[ "Apache-2.0" ]
null
null
null
from string import ascii_lowercase,ascii_uppercase,punctuation,digits import random as rnd def passwordfunc (): pwd='' liste = [ascii_lowercase,ascii_uppercase,punctuation,digits] opt=input("uzunluk belirtmek ister misiniz? (yes or no)") if opt =='Yes': lent=input("Şifre uzunluğu ne kadar olsun...
29.636364
81
0.659509
from string import ascii_lowercase,ascii_uppercase,punctuation,digits import random as rnd def passwordfunc (): pwd='' liste = [ascii_lowercase,ascii_uppercase,punctuation,digits] opt=input("uzunluk belirtmek ister misiniz? (yes or no)") if opt =='Yes': lent=input("Şifre uzunluğu ne kadar olsun...
true
true
1c443a79ec656385843cf4a30bde8b1696a07a76
3,116
py
Python
setup.py
cigroup-ol/metaopt
6dfd5105d3c6eaf00f96670175cae16021069514
[ "BSD-3-Clause" ]
8
2015-02-02T21:42:23.000Z
2019-06-30T18:12:43.000Z
setup.py
cigroup-ol/metaopt
6dfd5105d3c6eaf00f96670175cae16021069514
[ "BSD-3-Clause" ]
4
2015-09-24T14:12:38.000Z
2021-12-08T22:42:52.000Z
setup.py
cigroup-ol/metaopt
6dfd5105d3c6eaf00f96670175cae16021069514
[ "BSD-3-Clause" ]
6
2015-02-27T12:35:33.000Z
2020-10-15T21:04:02.000Z
# -*- coding: utf-8 -*- """setup.py script for MetaOpt.""" from __future__ import division, print_function, with_statement import os import sys try: from setuptools import setup, find_packages except ImportError: import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages fro...
38
82
0.643774
from __future__ import division, print_function, with_statement import os import sys try: from setuptools import setup, find_packages except ImportError: import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages from pip.req import parse_requirements import metaopt def e...
true
true
1c443b008425d87a2b13f8d0a5cd54540e1eb168
4,058
py
Python
setup.py
jemilc/shap
ed284b6278813c5292d83dc2a22976a0fdedd4ec
[ "MIT" ]
1
2020-05-28T18:31:41.000Z
2020-05-28T18:31:41.000Z
setup.py
jemilc/shap
ed284b6278813c5292d83dc2a22976a0fdedd4ec
[ "MIT" ]
null
null
null
setup.py
jemilc/shap
ed284b6278813c5292d83dc2a22976a0fdedd4ec
[ "MIT" ]
2
2021-12-13T19:34:37.000Z
2021-12-13T23:45:36.000Z
from setuptools import setup, Extension from setuptools.command.build_ext import build_ext as _build_ext import os import re import codecs # to publish use: # > python setup.py sdist bdist_wheel upload # which depends on ~/.pypirc here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): with codecs.op...
38.283019
123
0.646624
from setuptools import setup, Extension from setuptools.command.build_ext import build_ext as _build_ext import os import re import codecs here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): with codecs.open(os.path.join(here, *parts), 'r') as fp: return fp.read() def find_version(*file_...
true
true
1c443bbd588fb502514c1dc2517c751f29430408
478
py
Python
server/functionsfake.py
Yavonix/011-Battlebot-App
143e1990548837d81c9fcbf805e5c727e2038850
[ "MIT" ]
1
2021-07-29T03:26:29.000Z
2021-07-29T03:26:29.000Z
server/functionsfake.py
Yavonix/011-Battlebot-App
143e1990548837d81c9fcbf805e5c727e2038850
[ "MIT" ]
null
null
null
server/functionsfake.py
Yavonix/011-Battlebot-App
143e1990548837d81c9fcbf805e5c727e2038850
[ "MIT" ]
null
null
null
# Dummy program for development def jointMode(ID): print("JointModeEvent") # Move a dynamixel that has been set up as a joint. def moveJoint(ID, position, speed): print("MoveJointEvent") # === WHEEL FUNCTIONS === # # Set up a dynamixel so that it behaves like wheel. def wheelMode(ID): pass ...
22.761905
51
0.656904
def jointMode(ID): print("JointModeEvent") def moveJoint(ID, position, speed): print("MoveJointEvent") def wheelMode(ID): pass def moveWheel(ID, speed): pass
true
true
1c443dbe02aa3601a4b584eb0b5bc976480a3a4d
4,034
py
Python
devine.py
noutcha/devine
3a7d6767f9032d1b988efa4104adb3a5eca97c39
[ "MIT" ]
null
null
null
devine.py
noutcha/devine
3a7d6767f9032d1b988efa4104adb3a5eca97c39
[ "MIT" ]
null
null
null
devine.py
noutcha/devine
3a7d6767f9032d1b988efa4104adb3a5eca97c39
[ "MIT" ]
null
null
null
""" Prémière version du jeu Deviner. On crée une fenêtre simple qui demande à l'utilisateur de deviner le nombre secret. Avec une possibilité de guide en indiquant si le nombre choisi est plus grand ou plus petit que le nombre secret source d'inspiration: https://pythonfaqfr.readthedocs.io/en/latest/prog_ev...
33.616667
143
0.683689
from random import randint import tkinter as tk #ici importation avec renommage, #from tkinter import * à éviter from tkinter.messagebox import * # On defini notre fonction de traitement def user_recup_choix(event): nbre_choisi = int(reponse.get()) # on recupère la reponse de l'user reponse.delete(0, t...
true
true
1c443dc6a22ecc7fee90d76acd68cbc1bacd1fb9
19,705
py
Python
includes/BOLTS/freecad/extrusions/profiles.py
codysandahl/3dprinting
98d588864e5ba5826c7ed16959aa7b1040a760b3
[ "MIT" ]
null
null
null
includes/BOLTS/freecad/extrusions/profiles.py
codysandahl/3dprinting
98d588864e5ba5826c7ed16959aa7b1040a760b3
[ "MIT" ]
null
null
null
includes/BOLTS/freecad/extrusions/profiles.py
codysandahl/3dprinting
98d588864e5ba5826c7ed16959aa7b1040a760b3
[ "MIT" ]
null
null
null
# ************************************************************************************** # * * # * BOLTS - Open Library of Technical Specifications * # * ...
29.279346
98
0.489267
import math import Part from FreeCAD import Vector from DraftGeomUtils import fillet as draft_fillet def vslot20x20( params, document ): name = params["name"] le = params["l"] symmetry = [ (0, 0, False, False, False, False), (0, 0, True, True, False, False), (0,...
true
true
1c4441ebc66c0b0b71ab468deeaecf28874f330c
6,448
py
Python
tools/repl_test.py
zoosky/deno
020898762fa081113608504ab5012b2b27c70668
[ "MIT" ]
3
2020-07-08T11:32:22.000Z
2020-07-10T11:34:25.000Z
tools/repl_test.py
zoosky/deno
020898762fa081113608504ab5012b2b27c70668
[ "MIT" ]
null
null
null
tools/repl_test.py
zoosky/deno
020898762fa081113608504ab5012b2b27c70668
[ "MIT" ]
null
null
null
# Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import os import shutil from subprocess import CalledProcessError, PIPE, Popen import sys import time from test_util import DenoTestCase, run_tests class TestRepl(DenoTestCase): def input(self, *lines, **kwargs): exit_ = kwargs.pop...
34.297872
78
0.559088
import os import shutil from subprocess import CalledProcessError, PIPE, Popen import sys import time from test_util import DenoTestCase, run_tests class TestRepl(DenoTestCase): def input(self, *lines, **kwargs): exit_ = kwargs.pop("exit", True) sleep_ = kwargs.pop("sleep", 0) env_ = kwar...
true
true
1c4441f790e3934fdb9d9e916372990dbd0cc4c5
1,505
py
Python
src/ToolBox/SOS/tests/t_cmd_bpmd_module_function_iloffset.py
elinor-fung/coreclr
c1801e85024add717f518feb6a9caed60d54500f
[ "MIT" ]
8
2020-01-15T11:09:15.000Z
2021-08-25T08:54:55.000Z
src/ToolBox/SOS/tests/t_cmd_bpmd_module_function_iloffset.py
elinor-fung/coreclr
c1801e85024add717f518feb6a9caed60d54500f
[ "MIT" ]
3
2018-01-03T00:57:25.000Z
2018-10-05T16:17:52.000Z
src/ToolBox/SOS/tests/t_cmd_bpmd_module_function_iloffset.py
elinor-fung/coreclr
c1801e85024add717f518feb6a9caed60d54500f
[ "MIT" ]
1
2020-11-17T14:55:53.000Z
2020-11-17T14:55:53.000Z
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. # See the LICENSE file in the project root for more information. import lldb import re import testutils as test # bpmd <module name> <managed function name> [<il offset>] def runSce...
31.354167
79
0.710299
import lldb import re import testutils as test def runScenario(assembly, debugger, target): process = target.GetProcess() res = lldb.SBCommandReturnObject() ci = debugger.GetCommandInterpreter() test.stop_in_main(debugger, assembly) ci.HandleCommand("bpmd " + assembly + " Test.Unlikely...
true
true
1c44426edb5f00a1194a178579284f2e8d2aa873
1,626
py
Python
scripts/iclr_2018/rl_size.py
alcinos/dps
5467db1216e9f9089376d2c71f524ced2382e4f6
[ "Apache-2.0" ]
null
null
null
scripts/iclr_2018/rl_size.py
alcinos/dps
5467db1216e9f9089376d2c71f524ced2382e4f6
[ "Apache-2.0" ]
null
null
null
scripts/iclr_2018/rl_size.py
alcinos/dps
5467db1216e9f9089376d2c71f524ced2382e4f6
[ "Apache-2.0" ]
null
null
null
import numpy as np import os import clify import argparse from config import rl_config as config config.update( image_shape_grid=(3, 3), reductions="sum", ) grid = [dict(n_train=1, do_train=False)] + [dict(n_train=x) for x in 2**np.arange(0, 18, 2)] parser = argparse.ArgumentParser() parser.add_argument("--...
26.225806
92
0.682657
import numpy as np import os import clify import argparse from config import rl_config as config config.update( image_shape_grid=(3, 3), reductions="sum", ) grid = [dict(n_train=1, do_train=False)] + [dict(n_train=x) for x in 2**np.arange(0, 18, 2)] parser = argparse.ArgumentParser() parser.add_argument("--...
true
true
1c444325429659bd2cf13dac06eb07c96a0b5de1
2,456
py
Python
pcdet/models/model_utils/model_nms_utils.py
collector-m/ST3D
720e04aa3dc4bb95ac336171b240b6c3130144e5
[ "Apache-2.0" ]
null
null
null
pcdet/models/model_utils/model_nms_utils.py
collector-m/ST3D
720e04aa3dc4bb95ac336171b240b6c3130144e5
[ "Apache-2.0" ]
null
null
null
pcdet/models/model_utils/model_nms_utils.py
collector-m/ST3D
720e04aa3dc4bb95ac336171b240b6c3130144e5
[ "Apache-2.0" ]
null
null
null
import torch from ...ops.iou3d_nms import iou3d_nms_utils def class_agnostic_nms(box_scores, box_preds, nms_config, score_thresh=None): src_box_scores = box_scores if score_thresh is not None: scores_mask = (box_scores >= score_thresh) box_scores = box_scores[scores_mask] box_preds = b...
37.212121
116
0.661645
import torch from ...ops.iou3d_nms import iou3d_nms_utils def class_agnostic_nms(box_scores, box_preds, nms_config, score_thresh=None): src_box_scores = box_scores if score_thresh is not None: scores_mask = (box_scores >= score_thresh) box_scores = box_scores[scores_mask] box_preds = b...
true
true
1c4445883af2eafcd549de66e969b087215c7666
2,335
py
Python
_matplotlibsettings.py
WillemWybo/Electrical_compartmentalization_in_neurons
1ff297be97412ff40042485479b78148fba11c27
[ "MIT" ]
null
null
null
_matplotlibsettings.py
WillemWybo/Electrical_compartmentalization_in_neurons
1ff297be97412ff40042485479b78148fba11c27
[ "MIT" ]
null
null
null
_matplotlibsettings.py
WillemWybo/Electrical_compartmentalization_in_neurons
1ff297be97412ff40042485479b78148fba11c27
[ "MIT" ]
null
null
null
import matplotlib # matplotlib.use("Agg") import matplotlib.pyplot as pl import matplotlib.animation as manimation from matplotlib.gridspec import GridSpec from matplotlib.patches import Rectangle from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib import rc, rcParams from mpl_toolkits.mplot3d impor...
31.133333
83
0.65182
import matplotlib import matplotlib.pyplot as pl import matplotlib.animation as manimation from matplotlib.gridspec import GridSpec from matplotlib.patches import Rectangle from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib import rc, rcParams from mpl_toolkits.mplot3d import Axes3D from matplotlib...
true
true
1c4445b06c65961d851d7965795b569e737f3f68
256
py
Python
image_resize.py
cristianoc20/Rebar_Detection
8a1cf22bc82c5998376cc034c9a7317401d5b2e3
[ "MIT" ]
58
2020-03-07T16:40:20.000Z
2022-03-31T08:57:05.000Z
image_resize.py
JackySnake/Rebar_Detection
8a1cf22bc82c5998376cc034c9a7317401d5b2e3
[ "MIT" ]
13
2020-03-08T11:00:58.000Z
2022-03-12T00:17:59.000Z
image_resize.py
JackySnake/Rebar_Detection
8a1cf22bc82c5998376cc034c9a7317401d5b2e3
[ "MIT" ]
17
2020-03-09T09:22:33.000Z
2022-02-23T09:20:18.000Z
import glob as gb #导入glob模块 import cv2 import os # 返回该路径下所有的 jpg 文件的路径 img_path = gb.glob("./data/test_dataset/*.jpg") for path in img_path: (filepath, tempfilename) = os.path.split(path) (filename, extension) = os.path.splitext(tempfilename)
23.272727
58
0.71875
import glob as gb import cv2 import os img_path = gb.glob("./data/test_dataset/*.jpg") for path in img_path: (filepath, tempfilename) = os.path.split(path) (filename, extension) = os.path.splitext(tempfilename)
true
true
1c44481706e54082a191a60d87d3f384cd42fec6
10,802
py
Python
vn/generator.py
Jemesson/nlp-conceptual-model
26ad7249be4ccb3863c0852738eaa8b6ddcf63f3
[ "MIT" ]
null
null
null
vn/generator.py
Jemesson/nlp-conceptual-model
26ad7249be4ccb3863c0852738eaa8b6ddcf63f3
[ "MIT" ]
null
null
null
vn/generator.py
Jemesson/nlp-conceptual-model
26ad7249be4ccb3863c0852738eaa8b6ddcf63f3
[ "MIT" ]
1
2021-11-02T03:41:17.000Z
2021-11-02T03:41:17.000Z
import os from lang.owlprefix import PREFIX_DICT from vn.utility import t, is_i, tab, is_comment, occurence_list, is_us from jinja2 import FileSystemLoader, Environment class Generator: def __init__(self, classes, relationships, onto=True, is_long=None): self.classes = classes self.relationships ...
33.339506
131
0.552861
import os from lang.owlprefix import PREFIX_DICT from vn.utility import t, is_i, tab, is_comment, occurence_list, is_us from jinja2 import FileSystemLoader, Environment class Generator: def __init__(self, classes, relationships, onto=True, is_long=None): self.classes = classes self.relationships ...
true
true
1c4449b854f1469faa313a012269b7964208ff55
1,128
py
Python
scrapy/utils/console.py
emschorsch/scrapy
acb7bad1ff4037b4a613ac94e2d3357bf92bdb8f
[ "BSD-3-Clause" ]
1
2015-04-01T20:02:08.000Z
2015-04-01T20:02:08.000Z
scrapy/utils/console.py
emschorsch/scrapy
acb7bad1ff4037b4a613ac94e2d3357bf92bdb8f
[ "BSD-3-Clause" ]
2
2021-12-13T20:51:32.000Z
2022-02-11T03:47:35.000Z
scrapy/utils/console.py
emschorsch/scrapy
acb7bad1ff4037b4a613ac94e2d3357bf92bdb8f
[ "BSD-3-Clause" ]
1
2017-11-09T20:33:59.000Z
2017-11-09T20:33:59.000Z
def start_python_console(namespace=None, noipython=False): """Start Python console binded to the given namespace. If IPython is available, an IPython console will be started instead, unless `noipython` is True. Also, tab completion will be used on Unix systems. """ if namespace is None: nam...
36.387097
78
0.585106
def start_python_console(namespace=None, noipython=False): if namespace is None: namespace = {} try: try: if noipython: raise ImportError import IPython try: IPython.embed(user_ns=namespace) except AttributeError: ...
true
true
1c4449dad8f315ea5b5f73b491c6a3fecb29e786
2,948
py
Python
datasets/generate_synthia_label_info.py
JDAI-CV/FADA
a1c6403963184a3427eda68cc94b03ff6143368a
[ "Apache-2.0" ]
120
2020-07-20T02:23:02.000Z
2022-03-31T02:21:31.000Z
datasets/generate_synthia_label_info.py
JDAI-CV/FADA
a1c6403963184a3427eda68cc94b03ff6143368a
[ "Apache-2.0" ]
27
2020-07-29T02:55:52.000Z
2022-03-12T08:03:42.000Z
datasets/generate_synthia_label_info.py
JDAI-CV/FADA
a1c6403963184a3427eda68cc94b03ff6143368a
[ "Apache-2.0" ]
25
2020-08-01T06:11:08.000Z
2022-02-19T07:26:57.000Z
import argparse import os import math import numpy as np import pickle from PIL import Image from tqdm import tqdm import imageio from multiprocessing import Pool parser = argparse.ArgumentParser(description="Generate label stat info") parser.add_argument("-d", "--datadir", default="", help="pa...
27.811321
108
0.578019
import argparse import os import math import numpy as np import pickle from PIL import Image from tqdm import tqdm import imageio from multiprocessing import Pool parser = argparse.ArgumentParser(description="Generate label stat info") parser.add_argument("-d", "--datadir", default="", help="pa...
true
true
1c444a39822bf470342e8467d1ba5fb4a3c7f873
1,765
py
Python
conversations/migrations/0001_initial.py
alstn2468/Django_Airbnb_Clone
eeb61e4a36320a0b269d96f47cc6755dbc4c40f8
[ "MIT" ]
5
2019-11-26T00:34:24.000Z
2021-01-04T06:04:48.000Z
conversations/migrations/0001_initial.py
alstn2468/Django_Airbnb_Clone
eeb61e4a36320a0b269d96f47cc6755dbc4c40f8
[ "MIT" ]
3
2021-06-09T19:05:40.000Z
2021-09-08T01:49:01.000Z
conversations/migrations/0001_initial.py
alstn2468/Django_Airbnb_Clone
eeb61e4a36320a0b269d96f47cc6755dbc4c40f8
[ "MIT" ]
6
2019-11-24T11:47:09.000Z
2021-08-16T20:21:35.000Z
# Generated by Django 2.2.5 on 2019-12-22 12:48 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="Conversation", fields=[ ...
30.431034
72
0.420397
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="Conversation", fields=[ ( "id", ...
true
true
1c444b23a8f36b78e2011034fb20d666cb5720f3
2,548
py
Python
perfil/models.py
KleuberJacob/Ecommerce-utilizando-Python-Django-e-Bootstrap4
acf2239d408f26eb223a1fe1c03046fcf62d6733
[ "MIT" ]
41
2019-08-20T06:55:51.000Z
2022-03-23T09:59:27.000Z
perfil/models.py
KleuberJacob/Ecommerce-utilizando-Python-Django-e-Bootstrap4
acf2239d408f26eb223a1fe1c03046fcf62d6733
[ "MIT" ]
8
2021-03-18T21:29:25.000Z
2022-01-13T01:32:24.000Z
perfil/models.py
KleuberJacob/Ecommerce-utilizando-Python-Django-e-Bootstrap4
acf2239d408f26eb223a1fe1c03046fcf62d6733
[ "MIT" ]
31
2020-03-12T00:01:48.000Z
2022-03-24T23:47:10.000Z
from django.db import models from django.contrib.auth.models import User from django.forms import ValidationError import re from utils.validacpf import valida_cpf class Perfil(models.Model): usuario = models.OneToOneField(User, on_delete=models.CASCADE, verbose_name='Usuário') ...
30.698795
79
0.522763
from django.db import models from django.contrib.auth.models import User from django.forms import ValidationError import re from utils.validacpf import valida_cpf class Perfil(models.Model): usuario = models.OneToOneField(User, on_delete=models.CASCADE, verbose_name='Usuário') ...
true
true
1c444b8125c72d4ac5a956840cbcad32199c8ff1
1,592
py
Python
Notes/apps/users/models.py
Mi-As/Lists-RestApi
eea238f9fc5fda4b992f33dd2c7a4725a74849bb
[ "MIT" ]
1
2020-10-31T20:15:21.000Z
2020-10-31T20:15:21.000Z
Notes/apps/users/models.py
Mi-As/Note-RestApi
eea238f9fc5fda4b992f33dd2c7a4725a74849bb
[ "MIT" ]
null
null
null
Notes/apps/users/models.py
Mi-As/Note-RestApi
eea238f9fc5fda4b992f33dd2c7a4725a74849bb
[ "MIT" ]
null
null
null
from werkzeug.security import check_password_hash, generate_password_hash import uuid from ... import db # import like this bc: https://stackoverflow.com/questions/43576422/sqlalchemy-flask-class-is-not-defined from ..notes import models as notes from ...authentication import models as authenticaton from . import ser...
31.84
105
0.748744
from werkzeug.security import check_password_hash, generate_password_hash import uuid from ... import db from ..notes import models as notes from ...authentication import models as authenticaton from . import services class User(db.Model): id = db.Column(db.Integer, primary_key=True) public_id = db.Column(db.Str...
true
true
1c444cea01536e9894e87342726ed2edcb74d0f2
6,369
py
Python
fitapp/south_migrations/0002_auto__add_timeseriesdatatype__add_unique_timeseriesdatatype_category_r.py
evansnj/django-fitbit-old2
87f4aa389ab9ea2f63fa41aa4d3bbb3f55cd78ac
[ "Apache-2.0" ]
null
null
null
fitapp/south_migrations/0002_auto__add_timeseriesdatatype__add_unique_timeseriesdatatype_category_r.py
evansnj/django-fitbit-old2
87f4aa389ab9ea2f63fa41aa4d3bbb3f55cd78ac
[ "Apache-2.0" ]
null
null
null
fitapp/south_migrations/0002_auto__add_timeseriesdatatype__add_unique_timeseriesdatatype_category_r.py
evansnj/django-fitbit-old2
87f4aa389ab9ea2f63fa41aa4d3bbb3f55cd78ac
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models # Safe User import for Django < 1.5 try: from django.contrib.auth import get_user_model except ImportError: from django.contrib.auth.models import User else: User = get_user_mo...
52.636364
182
0.594756
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: from django.contrib.auth.models import User else: User = get_user_model() user_orm_label = '%s.%s' % (User._meta.app_label, Use...
true
true
1c444d318a36178d6e5513e846e17f7a823e3ccb
931
py
Python
esphome/components/binary_sensor/homeassistant.py
pi4homez/esphome
697e9b0c28bb690719fa1d16ca8198ce5fd1d2be
[ "MIT" ]
5
2019-04-14T09:43:29.000Z
2021-07-17T06:36:44.000Z
esphome/components/binary_sensor/homeassistant.py
pi4homez/esphome
697e9b0c28bb690719fa1d16ca8198ce5fd1d2be
[ "MIT" ]
null
null
null
esphome/components/binary_sensor/homeassistant.py
pi4homez/esphome
697e9b0c28bb690719fa1d16ca8198ce5fd1d2be
[ "MIT" ]
4
2019-07-08T08:58:44.000Z
2021-12-18T21:56:22.000Z
import voluptuous as vol from esphome.components import binary_sensor import esphome.config_validation as cv from esphome.const import CONF_ENTITY_ID, CONF_ID, CONF_NAME from esphome.cpp_generator import Pvariable from esphome.cpp_types import App DEPENDENCIES = ['api'] HomeassistantBinarySensor = binary_sensor.bina...
34.481481
94
0.762621
import voluptuous as vol from esphome.components import binary_sensor import esphome.config_validation as cv from esphome.const import CONF_ENTITY_ID, CONF_ID, CONF_NAME from esphome.cpp_generator import Pvariable from esphome.cpp_types import App DEPENDENCIES = ['api'] HomeassistantBinarySensor = binary_sensor.bina...
true
true
1c444d5e1dda6613ae5959af1930b90d1660a982
4,000
py
Python
notebooks/parameter_tuning_ex_02.py
castorfou/scikit-learn-mooc
235748eff57409eb17d8355024579c6df44c0563
[ "CC-BY-4.0" ]
1
2021-05-25T07:29:44.000Z
2021-05-25T07:29:44.000Z
notebooks/parameter_tuning_ex_02.py
castorfou/scikit-learn-mooc
235748eff57409eb17d8355024579c6df44c0563
[ "CC-BY-4.0" ]
null
null
null
notebooks/parameter_tuning_ex_02.py
castorfou/scikit-learn-mooc
235748eff57409eb17d8355024579c6df44c0563
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # 📝 Exercise M3.01 # # The goal is to write an exhaustive search to find the best parameters # combination maximizing the model statistical performance. # # Here we use a small subset of the Adult Census dataset to make to code # fast to execute. Once your code works on the s...
30.30303
124
0.72
import pandas as pd from sklearn.model_selection import train_test_split adult_census = pd.read_csv("../datasets/adult-census.csv") target_name = "class" target = adult_census[target_name] data = adult_census.drop(columns=[target_name, "education-num"]) data_train, data_test, target_train, target_test = train_t...
true
true
1c444d99a421ed03ab656d5c6c2d5a7c3d4e9f61
1,979
py
Python
exercises/en/test_02_07a.py
UBC-MDS/exploratory-data-viz
83b704ce10d1ff5e10bfd4cdfa872ac52993fd54
[ "CC-BY-4.0" ]
null
null
null
exercises/en/test_02_07a.py
UBC-MDS/exploratory-data-viz
83b704ce10d1ff5e10bfd4cdfa872ac52993fd54
[ "CC-BY-4.0" ]
88
2020-12-04T06:56:51.000Z
2021-05-10T22:02:45.000Z
exercises/en/test_02_07a.py
UBC-MDS/exploratory-data-viz
83b704ce10d1ff5e10bfd4cdfa872ac52993fd54
[ "CC-BY-4.0" ]
4
2021-01-13T09:30:57.000Z
2021-08-03T20:49:31.000Z
def test(): # Here we can either check objects created in the solution code, or the # string value of the solution, available as __solution__. A helper for # printing formatted messages is available as __msg__. See the testTemplate # in the meta.json for details. # If an assertion fails, the message...
98.95
241
0.738757
def test(): assert not fuel_efficiency is None, "Your answer does not exist. Have you passed in the correct variable?" assert type(fuel_efficiency) == type(alt.Chart()), "Your answer is not an Altair Chart object. Check to make sure that you have assigned an alt.Chart object to fuel_efficie...
true
true
1c444da6a8b80e2466802ae61d8ef26911df5b78
3,644
py
Python
caffe2/python/operator_test/fc_operator_test.py
DavidKo3/mctorch
53ffe61763059677978b4592c8b2153b0c15428f
[ "BSD-3-Clause" ]
1
2019-07-21T02:13:22.000Z
2019-07-21T02:13:22.000Z
caffe2/python/operator_test/fc_operator_test.py
DavidKo3/mctorch
53ffe61763059677978b4592c8b2153b0c15428f
[ "BSD-3-Clause" ]
null
null
null
caffe2/python/operator_test/fc_operator_test.py
DavidKo3/mctorch
53ffe61763059677978b4592c8b2153b0c15428f
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.proto import caffe2_pb2 from caffe2.python import core from hypothesis import assume, given, settings, HealthCheck import caffe2.python.hypothesis_test_util a...
35.038462
83
0.570801
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.proto import caffe2_pb2 from caffe2.python import core from hypothesis import assume, given, settings, HealthCheck import caffe2.python.hypothesis_test_util a...
true
true
1c444db0233ca5c275f3a1c2a5a0e92f86e9e40a
6,119
py
Python
toolkitui.py
thebirdsbeak/morse_trainer
2cc5277de066703218bc2277532a7a9b985a5b92
[ "MIT" ]
null
null
null
toolkitui.py
thebirdsbeak/morse_trainer
2cc5277de066703218bc2277532a7a9b985a5b92
[ "MIT" ]
null
null
null
toolkitui.py
thebirdsbeak/morse_trainer
2cc5277de066703218bc2277532a7a9b985a5b92
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'toolkitui.ui' # # Created by: PyQt5 UI code generator 5.15.1 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, Qt...
71.151163
280
0.708776
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") ...
true
true
1c444de510c835bf1a3b57ad6b627da2b0e5f8d3
18,760
py
Python
tensorflow/python/ops/gradients_test.py
topsun888/tensorflow
bad7c50b9dc9789ad7dd0a62daca40b7269841ed
[ "Apache-2.0" ]
2
2017-10-14T09:13:27.000Z
2017-10-26T18:34:28.000Z
tensorflow/python/ops/gradients_test.py
kiliczsh/tensorflow
f49aca4532c155597c669cf2189f211cafbebf96
[ "Apache-2.0" ]
1
2021-04-12T03:51:59.000Z
2021-04-12T03:51:59.000Z
tensorflow/python/ops/gradients_test.py
kiliczsh/tensorflow
f49aca4532c155597c669cf2189f211cafbebf96
[ "Apache-2.0" ]
5
2018-02-27T00:34:23.000Z
2022-02-28T16:38:08.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.89899
81
0.646375
from __future__ import absolute_import from __future__ import division from __future__ import print_function import warnings import numpy as np import tensorflow as tf from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import function ...
true
true
1c444e381a5528baf355eff89d4e5396f0231430
42,894
py
Python
Lib/test/test_time.py
gdebirka/cpython
b18fd54f8c27e4b2aac222e75ac58aa85e5a7988
[ "0BSD" ]
1
2022-01-22T22:34:08.000Z
2022-01-22T22:34:08.000Z
Lib/test/test_time.py
gdebirka/cpython
b18fd54f8c27e4b2aac222e75ac58aa85e5a7988
[ "0BSD" ]
2
2022-02-06T01:15:13.000Z
2022-03-01T10:04:24.000Z
Lib/test/test_time.py
gdebirka/cpython
b18fd54f8c27e4b2aac222e75ac58aa85e5a7988
[ "0BSD" ]
2
2021-09-07T13:43:49.000Z
2021-12-19T08:34:56.000Z
from test import support from test.support import warnings_helper import decimal import enum import locale import math import platform import sys import sysconfig import time import threading import unittest try: import _testcapi except ImportError: _testcapi = None from test.support import skip_if_buggy_ucrt_...
37.892226
108
0.582739
from test import support from test.support import warnings_helper import decimal import enum import locale import math import platform import sys import sysconfig import time import threading import unittest try: import _testcapi except ImportError: _testcapi = None from test.support import skip_if_buggy_ucrt_...
true
true
1c444ef4cd29e04ad3311978e8ac577fb7bda338
629
py
Python
extras/makeDepPopulation.py
augustodn/COVID-19_Ar
4911b52cd979ab346eaf9e716883500d392bfb01
[ "MIT" ]
null
null
null
extras/makeDepPopulation.py
augustodn/COVID-19_Ar
4911b52cd979ab346eaf9e716883500d392bfb01
[ "MIT" ]
null
null
null
extras/makeDepPopulation.py
augustodn/COVID-19_Ar
4911b52cd979ab346eaf9e716883500d392bfb01
[ "MIT" ]
1
2020-09-29T11:58:12.000Z
2020-09-29T11:58:12.000Z
from openpyxl import load_workbook filename = 'poblacion_dpto.csv' csvFN = open(filename, 'w') wb = load_workbook('poblacion_dpto.xlsx') ws = wb['Sheet1'] csvFN.write('in1,nombre,pob_total\n') for row in ws.values: try: if 'AREA' in row[0]: indecCode = row[0][7:] name = row[1] ...
23.296296
66
0.585056
from openpyxl import load_workbook filename = 'poblacion_dpto.csv' csvFN = open(filename, 'w') wb = load_workbook('poblacion_dpto.xlsx') ws = wb['Sheet1'] csvFN.write('in1,nombre,pob_total\n') for row in ws.values: try: if 'AREA' in row[0]: indecCode = row[0][7:] name = row[1] ...
true
true
1c444fd9aef9620eaa7ffa85c445148e8fcc02e6
15,493
py
Python
scripts/.ipynb_checkpoints/gdal_functions-checkpoint.py
Thomas-Brd/3D_landslide_detection
95ec6fc4dd013ecc7c3c8cb22dbbbc8712467830
[ "CC-BY-3.0" ]
1
2022-02-15T09:56:34.000Z
2022-02-15T09:56:34.000Z
scripts/.ipynb_checkpoints/gdal_functions-checkpoint.py
Thomas-Brd/3D_landslide_detection
95ec6fc4dd013ecc7c3c8cb22dbbbc8712467830
[ "CC-BY-3.0" ]
null
null
null
scripts/.ipynb_checkpoints/gdal_functions-checkpoint.py
Thomas-Brd/3D_landslide_detection
95ec6fc4dd013ecc7c3c8cb22dbbbc8712467830
[ "CC-BY-3.0" ]
3
2020-09-17T13:22:07.000Z
2021-11-06T14:14:54.000Z
# coding: utf-8 # Thomas Bernard # fonctions utilisant gdal from osgeo import gdal import ogr, osr import numpy as np #import rasterio #from rasterio.plot import show import subprocess import os import matplotlib.pyplot as plt #import scripts.eros_function as eros def read_tif_file(path_to_file): ds = gdal.Ope...
46.525526
328
0.684825
from osgeo import gdal import ogr, osr import numpy as np import subprocess import os import matplotlib.pyplot as plt def read_tif_file(path_to_file): ds = gdal.Open(path_to_file) gt = ds.GetGeoTransform() proj = ds.GetProjection() band= ds.GetRasterBand(1) mask = band.GetNoDataValue() arra...
true
true
1c444fedb8ca59daf57a90006b988852221217fd
14,700
py
Python
third_party_package/RDKit_2015_03_1/rdkit/ML/Descriptors/CompoundDescriptors.py
Ivy286/cluster_basedfps
7fc216537f570436f008ea567c137d03ba2b6d81
[ "WTFPL" ]
9
2019-04-23T01:46:12.000Z
2021-08-16T07:07:12.000Z
third_party_package/RDKit_2015_03_1/rdkit/ML/Descriptors/CompoundDescriptors.py
Ivy286/cluster_basedfps
7fc216537f570436f008ea567c137d03ba2b6d81
[ "WTFPL" ]
null
null
null
third_party_package/RDKit_2015_03_1/rdkit/ML/Descriptors/CompoundDescriptors.py
Ivy286/cluster_basedfps
7fc216537f570436f008ea567c137d03ba2b6d81
[ "WTFPL" ]
5
2016-09-21T03:47:48.000Z
2019-07-30T22:17:35.000Z
# # Copyright (C) 2001,2002 greg Landrum and Rational Discovery LLC # """ descriptor calculator for compounds defined by a composition alone (only the composition is required) """ from __future__ import print_function from rdkit import RDConfig from rdkit.utils import chemutils import os from rdkit.Dbase.DbConnect...
30.625
96
0.644014
from __future__ import print_function from rdkit import RDConfig from rdkit.utils import chemutils import os from rdkit.Dbase.DbConnection import DbConnect from rdkit.ML.Descriptors import Parser,Descriptors from rdkit.six.moves import xrange countOptions = [('NVAL','total number of valence electrons'), ...
true
true
1c44505dd302e64a42b635bedc36746e9c6b4531
3,825
py
Python
dali/test/python/test_RN50_external_source_parallel_data.py
awolant/DALI
ace3e0bee44b7b10cdf7255ec02e143646c68ce1
[ "ECL-2.0", "Apache-2.0" ]
1
2019-05-31T14:00:58.000Z
2019-05-31T14:00:58.000Z
dali/test/python/test_RN50_external_source_parallel_data.py
Shruti-Raj-Vansh-Singh/DALI
e7df0b255c59a118843bfe3ecaf317d7ee1ed6bb
[ "ECL-2.0", "Apache-2.0" ]
2
2021-06-11T17:05:37.000Z
2021-06-23T03:45:04.000Z
dali/test/python/test_RN50_external_source_parallel_data.py
Shruti-Raj-Vansh-Singh/DALI
e7df0b255c59a118843bfe3ecaf317d7ee1ed6bb
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
36.778846
102
0.603399
from test_utils import AverageMeter import os import argparse import time import cv2 import numpy as np from nvidia.dali.plugin.base_iterator import LastBatchPolicy from test_RN50_external_source_parallel_utils import ( parse_test_arguments, external_source_parallel_pipeline, external_source_pipeline, file_r...
true
true
1c44516c6c2cb62d2ea46dd638986291034ed6e1
367
py
Python
payeezy_python/example/Dependancy/requests-master/requests/packages/urllib3/util/response.py
Dylfin/payeezy_direct_API
d0ec010dd265421ddc002e665221312178e2b0fe
[ "MIT" ]
76
2015-04-28T18:50:16.000Z
2022-03-21T18:52:44.000Z
payeezy_python/example/Dependancy/requests-master/requests/packages/urllib3/util/response.py
Dylfin/payeezy_direct_API
d0ec010dd265421ddc002e665221312178e2b0fe
[ "MIT" ]
17
2015-07-15T17:46:41.000Z
2022-03-01T19:14:48.000Z
payeezy_python/example/Dependancy/requests-master/requests/packages/urllib3/util/response.py
Dylfin/payeezy_direct_API
d0ec010dd265421ddc002e665221312178e2b0fe
[ "MIT" ]
149
2015-04-13T04:51:09.000Z
2021-07-06T14:16:20.000Z
def is_fp_closed(obj): """ Checks whether a given file-like object is closed. :param obj: The file-like object to check. """ if hasattr(obj, 'fp'): # Object is a container for another file-like object that gets released # on exhaustion (e.g. HTTPResponse) r...
26.214286
80
0.60218
def is_fp_closed(obj): if hasattr(obj, 'fp'): return obj.fp is None return obj.closed
true
true
1c4452faf589fe4cf63d1a0d78c548ac6bdf060e
11,373
py
Python
train_plain_bert_dot4_con.py
playing-code/fairseq2
ac97b18c0aecca9eb36146492a1e95e521cb345a
[ "MIT" ]
null
null
null
train_plain_bert_dot4_con.py
playing-code/fairseq2
ac97b18c0aecca9eb36146492a1e95e521cb345a
[ "MIT" ]
null
null
null
train_plain_bert_dot4_con.py
playing-code/fairseq2
ac97b18c0aecca9eb36146492a1e95e521cb345a
[ "MIT" ]
null
null
null
import json import pickle import numpy as np import random # from fairseq.data import Dictionary import sys import torch import argparse import os from model_plain_bert_dot4 import Plain_bert from fairseq.models.roberta import RobertaModel from utils_sample import NewsIterator from utils_sample import cal_metric impor...
32.401709
187
0.62578
import json import pickle import numpy as np import random import sys import torch import argparse import os from model_plain_bert_dot4 import Plain_bert from fairseq.models.roberta import RobertaModel from utils_sample import NewsIterator from utils_sample import cal_metric import utils_sample as utils import torch.n...
true
true
1c44534ae52d49a685a8b666effb3e998f3d5f6a
667
py
Python
survey_api/reports/serializers/__init__.py
OpenStackweb/openstack-survey-api
6ede5d0521d9055cff0adb939db2d11a216336f5
[ "Apache-2.0" ]
null
null
null
survey_api/reports/serializers/__init__.py
OpenStackweb/openstack-survey-api
6ede5d0521d9055cff0adb939db2d11a216336f5
[ "Apache-2.0" ]
3
2020-02-11T23:49:55.000Z
2021-06-10T21:13:14.000Z
survey_api/reports/serializers/__init__.py
OpenStackweb/openstack-survey-api
6ede5d0521d9055cff0adb939db2d11a216336f5
[ "Apache-2.0" ]
null
null
null
""" * Copyright 2019 OpenStack Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in ...
44.466667
75
0.772114
from .survey_serializer import SurveySerializer, SurveyTemplateSerializer
true
true
1c445417358840223a835234f4a381e0ad420f0e
1,217
py
Python
facebook_business/adobjects/serverside/http_service_interface.py
MyrikLD/facebook-python-business-sdk
a53c8ba0e8f7d0b41b385c60089f6ba00fa5c814
[ "CNRI-Python" ]
576
2018-05-01T19:09:32.000Z
2022-03-31T11:45:11.000Z
facebook_business/adobjects/serverside/http_service_interface.py
MyrikLD/facebook-python-business-sdk
a53c8ba0e8f7d0b41b385c60089f6ba00fa5c814
[ "CNRI-Python" ]
217
2018-05-03T07:31:59.000Z
2022-03-29T14:19:52.000Z
facebook_business/adobjects/serverside/http_service_interface.py
MyrikLD/facebook-python-business-sdk
a53c8ba0e8f7d0b41b385c60089f6ba00fa5c814
[ "CNRI-Python" ]
323
2018-05-01T20:32:26.000Z
2022-03-29T07:05:12.000Z
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
45.074074
76
0.775678
from abc import ABC, abstractmethod class HttpServiceInterface(ABC): @abstractmethod def execute(self, url, method, request_options, headers, params): pass
true
true