hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c109d03c0f4235c065b15c76edb0093380715ac
1,160
py
Python
pre_commit_hooks/gradle_build.py
dzhemaptula-tomtom/pre-commit-gradle
b2be49e6f58b20fc2facdaff5d2b70f2c93410b9
[ "MIT" ]
null
null
null
pre_commit_hooks/gradle_build.py
dzhemaptula-tomtom/pre-commit-gradle
b2be49e6f58b20fc2facdaff5d2b70f2c93410b9
[ "MIT" ]
null
null
null
pre_commit_hooks/gradle_build.py
dzhemaptula-tomtom/pre-commit-gradle
b2be49e6f58b20fc2facdaff5d2b70f2c93410b9
[ "MIT" ]
null
null
null
from __future__ import print_function import argparse from typing import Optional from typing import Sequence from pre_commit_hooks.util import cmd_output, run_gradle_wrapper_task, run_gradle_task def main(argv=None): # type: (Optional[Sequence[str]]) -> int parser = argparse.ArgumentParser() parser.add_ar...
29.74359
101
0.682759
from __future__ import print_function import argparse from typing import Optional from typing import Sequence from pre_commit_hooks.util import cmd_output, run_gradle_wrapper_task, run_gradle_task def main(argv=None): parser = argparse.ArgumentParser() parser.add_argument( '-w', '--wrapper', action...
true
true
1c109d0787cae29fa3eea7e8c87df627f38f3111
6,036
py
Python
awacs/mobiletargeting.py
cloudtools/awacs
f66550a812073f4e3ebd545279a5a1e6856cf39d
[ "BSD-2-Clause" ]
358
2015-01-01T05:11:05.000Z
2022-03-20T14:11:39.000Z
awacs/mobiletargeting.py
cloudtools/awacs
f66550a812073f4e3ebd545279a5a1e6856cf39d
[ "BSD-2-Clause" ]
171
2015-01-17T00:32:48.000Z
2022-03-28T02:02:57.000Z
awacs/mobiletargeting.py
cloudtools/awacs
f66550a812073f4e3ebd545279a5a1e6856cf39d
[ "BSD-2-Clause" ]
100
2015-01-04T16:34:34.000Z
2022-02-21T06:17:17.000Z
# Copyright (c) 2012-2021, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from .aws import Action as BaseAction from .aws import BaseARN service_name = "Amazon Pinpoint" prefix = "mobiletargeting" class Action(BaseAction): def __init__(self, action: str = None) -> None: ...
43.73913
88
0.817429
from .aws import Action as BaseAction from .aws import BaseARN service_name = "Amazon Pinpoint" prefix = "mobiletargeting" class Action(BaseAction): def __init__(self, action: str = None) -> None: super().__init__(prefix, action) class ARN(BaseARN): def __init__(self, resource: str = "", region: s...
true
true
1c109e7199715ba8f1f60a95c0e465fbeb7f1b5c
8,475
py
Python
code/leap_data_extraction_code/leapDataExtraction.py
Amartya32/Leap_and_Motion_Capture
710aaf96068f50c84d6e9461460e2b304dbf5e24
[ "CC-BY-4.0" ]
2
2021-05-12T09:26:39.000Z
2022-01-20T16:54:00.000Z
code/leap_data_extraction_code/leapDataExtraction.py
Amartya32/Leap_and_Motion_Capture
710aaf96068f50c84d6e9461460e2b304dbf5e24
[ "CC-BY-4.0" ]
null
null
null
code/leap_data_extraction_code/leapDataExtraction.py
Amartya32/Leap_and_Motion_Capture
710aaf96068f50c84d6e9461460e2b304dbf5e24
[ "CC-BY-4.0" ]
null
null
null
################################################################################ # https://developer.leapmotion.com/sdk_agreement, or another agreement # # between Leap Motion and you, your company or other organization. # ###########################################################################...
39.602804
138
0.618525
import os, sys, thread, time, inspect, socket, threading sys.path.insert(1, '..\windows64') import Leap from argparse import ArgumentParser import numpy as np from sortFingersByName import * def sanitiseArray(string): cleanString = str() string = str(string) for e in string: if e != '(' and e !=...
true
true
1c109e9179383e1ea196be941969c299d0691bbc
32,470
py
Python
lib/rucio/rse/rsemanager.py
evanmassaro/rucio
bf9e2fbd36a8ed1ffc56bfcc612cd216fe395cd6
[ "Apache-2.0" ]
null
null
null
lib/rucio/rse/rsemanager.py
evanmassaro/rucio
bf9e2fbd36a8ed1ffc56bfcc612cd216fe395cd6
[ "Apache-2.0" ]
null
null
null
lib/rucio/rse/rsemanager.py
evanmassaro/rucio
bf9e2fbd36a8ed1ffc56bfcc612cd216fe395cd6
[ "Apache-2.0" ]
null
null
null
# Copyright 2012-2018 CERN for the benefit of the ATLAS collaboration. # # 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...
45.097222
217
0.59883
from __future__ import print_function import copy import os import random try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse from rucio.common import exception, utils, constants from rucio.common.constraints import STRING_TYPES from rucio.common.utils import make_valid_...
true
true
1c10a0120bc33ab280a69fef2ec808a83321f7e0
1,977
py
Python
dassl/data/datasets/da/mini_domainnet.py
weiliuxm/Dassl.pytorch
8084b66332623c7a2394ea1404f2d043ef415ebb
[ "MIT" ]
4
2021-05-16T12:33:43.000Z
2021-05-20T11:03:05.000Z
dassl/data/datasets/da/mini_domainnet.py
weiliuxm/Dassl.pytorch
8084b66332623c7a2394ea1404f2d043ef415ebb
[ "MIT" ]
null
null
null
dassl/data/datasets/da/mini_domainnet.py
weiliuxm/Dassl.pytorch
8084b66332623c7a2394ea1404f2d043ef415ebb
[ "MIT" ]
1
2021-03-28T08:26:39.000Z
2021-03-28T08:26:39.000Z
import os.path as osp from ..build import DATASET_REGISTRY from ..base_dataset import Datum, DatasetBase @DATASET_REGISTRY.register() class miniDomainNet(DatasetBase): """A subset of DomainNet. Reference: - Peng et al. Moment Matching for Multi-Source Domain Adaptation. ICCV 2019. - ...
34.086207
76
0.569044
import os.path as osp from ..build import DATASET_REGISTRY from ..base_dataset import Datum, DatasetBase @DATASET_REGISTRY.register() class miniDomainNet(DatasetBase): dataset_dir = 'domainnet' domains = ['clipart', 'painting', 'real', 'sketch'] def __init__(self, cfg): root = osp.abspath(osp.ex...
true
true
1c10a06df6f41d5b56f151f7ee86771140c23788
2,993
py
Python
consultas_proyecto/pacientes_app/models.py
gustavoatt/consultas
ec941181390c071e49f72631648d19e679b659be
[ "MIT" ]
null
null
null
consultas_proyecto/pacientes_app/models.py
gustavoatt/consultas
ec941181390c071e49f72631648d19e679b659be
[ "MIT" ]
1
2020-06-26T16:13:02.000Z
2020-06-26T16:13:02.000Z
consultas_proyecto/pacientes_app/models.py
gustavoatt/consultas
ec941181390c071e49f72631648d19e679b659be
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from datetime import datetime from dateutil import relativedelta from django.core import urlresolvers from django.core.exceptions import ValidationError from django.db import models from .validators import validate_older_date class Paciente(models.Model): """ Información básica necesaria de...
31.840426
80
0.602406
from datetime import datetime from dateutil import relativedelta from django.core import urlresolvers from django.core.exceptions import ValidationError from django.db import models from .validators import validate_older_date class Paciente(models.Model): ESTADOS = ( (u'01', u'Amazonas'), (u'02', u'Anzoá...
true
true
1c10a0b1992e5b5fd4b0a92ea2bd4079f8eace21
267
py
Python
configs/deepim/ycbvPbrSO/FlowNet512_1.5AugCosyAAEGray_AggressiveV2_Flat_ycbvPbr_SO/FlowNet512_1.5AugCosyAAEGray_AggressiveV2_Flat_Pbr_19_51LargeClamp_bop_test.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
33
2021-12-15T07:11:47.000Z
2022-03-29T08:58:32.000Z
configs/deepim/ycbvPbrSO/FlowNet512_1.5AugCosyAAEGray_AggressiveV2_Flat_ycbvPbr_SO/FlowNet512_1.5AugCosyAAEGray_AggressiveV2_Flat_Pbr_19_51LargeClamp_bop_test.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
3
2021-12-15T11:39:54.000Z
2022-03-29T07:24:23.000Z
configs/deepim/ycbvPbrSO/FlowNet512_1.5AugCosyAAEGray_AggressiveV2_Flat_ycbvPbr_SO/FlowNet512_1.5AugCosyAAEGray_AggressiveV2_Flat_Pbr_19_51LargeClamp_bop_test.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
null
null
null
_base_ = "./FlowNet512_1.5AugCosyAAEGray_AggressiveV2_Flat_Pbr_01_02MasterChefCan_bop_test.py" OUTPUT_DIR = "output/deepim/ycbvPbrSO/FlowNet512_1.5AugCosyAAEGray_AggressiveV2_Flat_ycbvPbr_SO/19_51LargeClamp" DATASETS = dict(TRAIN=("ycbv_051_large_clamp_train_pbr",))
66.75
112
0.876404
_base_ = "./FlowNet512_1.5AugCosyAAEGray_AggressiveV2_Flat_Pbr_01_02MasterChefCan_bop_test.py" OUTPUT_DIR = "output/deepim/ycbvPbrSO/FlowNet512_1.5AugCosyAAEGray_AggressiveV2_Flat_ycbvPbr_SO/19_51LargeClamp" DATASETS = dict(TRAIN=("ycbv_051_large_clamp_train_pbr",))
true
true
1c10a155f7a78b3cf10c543d702dda7f8847a03b
876
py
Python
src/testers/unittests/test_doc.py
werew/Triton
3f95e54f076308d6885071a21ae71eb2123771d2
[ "Apache-2.0" ]
15
2021-12-08T09:53:35.000Z
2022-03-07T10:13:37.000Z
src/testers/unittests/test_doc.py
igogo-x86/Triton
3225658a138f0beead593bf17103c0cf34500d68
[ "Apache-2.0" ]
null
null
null
src/testers/unittests/test_doc.py
igogo-x86/Triton
3225658a138f0beead593bf17103c0cf34500d68
[ "Apache-2.0" ]
3
2018-03-04T04:34:39.000Z
2019-08-27T16:10:15.000Z
#!/usr/bin/env python2 # coding: utf-8 """Tester for documentation.""" import unittest import doctest import os import glob SNIPPET_DIR = os.path.join(os.path.dirname(__file__), "..", "..", "libtriton", "bindings", "python", "objects") class TestDoc(unittest.TestCase): """Holder to run examples as tests.""" fo...
32.444444
111
0.694064
import unittest import doctest import os import glob SNIPPET_DIR = os.path.join(os.path.dirname(__file__), "..", "..", "libtriton", "bindings", "python", "objects") class TestDoc(unittest.TestCase): for i, example in enumerate(glob.iglob(os.path.join(SNIPPET_DIR, "*.cpp"))): def _test_snippet(self, example_na...
true
true
1c10a2bf9f43a3bb07858a879176716249e8835e
1,155
py
Python
2021/day11/day11.py
SvetlanaM/advent_of_code2021
993925031847f9dfcd2868d1be13dd4861538ccf
[ "WTFPL" ]
null
null
null
2021/day11/day11.py
SvetlanaM/advent_of_code2021
993925031847f9dfcd2868d1be13dd4861538ccf
[ "WTFPL" ]
null
null
null
2021/day11/day11.py
SvetlanaM/advent_of_code2021
993925031847f9dfcd2868d1be13dd4861538ccf
[ "WTFPL" ]
null
null
null
from itertools import product with open("2021/day11/input.txt", encoding='utf-8') as file: data = file.read().splitlines() data = [int(line) for line in data] input_array = [list(map(int,str(line))) for line in data] number_of_flash = 0 stacked_list = [] def update_number(x: int, y: int) -> None: if input_a...
29.615385
129
0.541126
from itertools import product with open("2021/day11/input.txt", encoding='utf-8') as file: data = file.read().splitlines() data = [int(line) for line in data] input_array = [list(map(int,str(line))) for line in data] number_of_flash = 0 stacked_list = [] def update_number(x: int, y: int) -> None: if input_a...
true
true
1c10a4956bb185c47b3f0595d00f444741c239e3
3,565
py
Python
frappe-bench/env/lib/python2.7/site-packages/github/Referrer.py
ibrahmm22/library-management
b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/github/Referrer.py
ibrahmm22/library-management
b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/github/Referrer.py
ibrahmm22/library-management
b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ############################ Copyrights and license ############################ # # # Copyright 2018 Justin Kufro <jkufro@andrew.cmu.edu> # # Copyright 2018 Ivan Minno <iminno@andrew.cmu.edu> ...
43.47561
82
0.476858
from __future__ import absolute_import import github.GithubObject class Referrer(github.GithubObject.NonCompletableGithubObject): def __repr__(self): return self.get__repr__( { "referrer": self._referrer.value, "count": self._count.value, "un...
true
true
1c10a4b56838ba9aca641b9bb7397b4bd5cd8b6d
27,415
py
Python
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/aio/operations/_open_shift_managed_clusters_operations.py
kazrael2119/azure-sdk-for-python
485dd7b1b5ac41c1a5b9991e402b4035b55f437a
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/aio/operations/_open_shift_managed_clusters_operations.py
kazrael2119/azure-sdk-for-python
485dd7b1b5ac41c1a5b9991e402b4035b55f437a
[ "MIT" ]
null
null
null
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_10_27_preview/aio/operations/_open_shift_managed_clusters_operations.py
kazrael2119/azure-sdk-for-python
485dd7b1b5ac41c1a5b9991e402b4035b55f437a
[ "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 may ...
46.703578
246
0.67981
import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error f...
true
true
1c10a537496f094084ab3d675688818ba8f22937
1,679
py
Python
lib/modules/management/sid_to_user.py
dascannibal/Empire
293f06437520f4747e82e4486938b1a9074d3d51
[ "BSD-3-Clause" ]
10
2016-01-26T19:58:49.000Z
2021-06-20T17:57:43.000Z
lib/modules/management/sid_to_user.py
dascannibal/Empire
293f06437520f4747e82e4486938b1a9074d3d51
[ "BSD-3-Clause" ]
null
null
null
lib/modules/management/sid_to_user.py
dascannibal/Empire
293f06437520f4747e82e4486938b1a9074d3d51
[ "BSD-3-Clause" ]
5
2017-10-17T08:16:13.000Z
2021-04-30T02:41:02.000Z
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'SID-to-User', 'Author': ['@harmj0y'], 'Description': ("Converts a specified domain sid to a user."), 'Background' : False, 'OutputEx...
28.457627
172
0.47707
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'SID-to-User', 'Author': ['@harmj0y'], 'Description': ("Converts a specified domain sid to a user."), 'Background' : False, 'OutputEx...
true
true
1c10a5c64c6c552e1898f6b8186ba3a609c9b9c1
3,603
py
Python
external/fv3fit/fv3fit/train.py
jacnugent/fv3net
84958651bdd17784fdab98f87ad0d65414c03368
[ "MIT" ]
5
2021-03-20T22:42:40.000Z
2021-06-30T18:39:36.000Z
external/fv3fit/fv3fit/train.py
jacnugent/fv3net
84958651bdd17784fdab98f87ad0d65414c03368
[ "MIT" ]
154
2021-03-17T19:44:29.000Z
2021-09-15T23:02:12.000Z
external/fv3fit/fv3fit/train.py
jacnugent/fv3net
84958651bdd17784fdab98f87ad0d65414c03368
[ "MIT" ]
1
2021-06-16T22:04:24.000Z
2021-06-16T22:04:24.000Z
import argparse import logging import os from typing import Sequence from fv3fit._shared.config import get_arg_updated_config_dict import yaml import dataclasses import fsspec import fv3fit.keras import fv3fit.sklearn import fv3fit import xarray as xr import loaders def get_parser(): parser = argparse.ArgumentPa...
31.605263
87
0.681099
import argparse import logging import os from typing import Sequence from fv3fit._shared.config import get_arg_updated_config_dict import yaml import dataclasses import fsspec import fv3fit.keras import fv3fit.sklearn import fv3fit import xarray as xr import loaders def get_parser(): parser = argparse.ArgumentPa...
true
true
1c10a61c300278bbc61ec26591502b41ab552bb6
4,831
py
Python
clickable/click/__init__.py
lalmeras/clickable
6182f8a106c202a9bb1e6d7142e2b5b4734c13f3
[ "BSD-3-Clause" ]
null
null
null
clickable/click/__init__.py
lalmeras/clickable
6182f8a106c202a9bb1e6d7142e2b5b4734c13f3
[ "BSD-3-Clause" ]
297
2017-09-29T23:51:42.000Z
2021-08-31T09:27:17.000Z
clickable/click/__init__.py
lalmeras/clickable
6182f8a106c202a9bb1e6d7142e2b5b4734c13f3
[ "BSD-3-Clause" ]
null
null
null
# -*- encoding: utf-8 -*- """main is the command entry point. It search a clickables.py file in current directory, then a no args callable from the file. This callable is determined from: * a callable key, built from script basename. * an optional mapping, extracted from `clickable.py` * an optional callable key to ...
32.422819
86
0.660112
import collections.abc import os import os.path import pprint import re import sys def _clickable_debug(): return os.environ.get("CLICKABLE_DEBUG", "").lower() in ("true", "1", "yes") def _find_callable_mapping(module): return getattr(module, 'CLICKABLE_MAPPING', None) or \ getattr(module, 'CLICK_...
true
true
1c10a6d749a14dec6610cd6247c18840c8fc31d3
24,813
py
Python
src/ngh2/_connection.py
standy66/ngh2
ab4e59d2594598a8cc203fbd2ce2837350c1fa5f
[ "Apache-2.0" ]
null
null
null
src/ngh2/_connection.py
standy66/ngh2
ab4e59d2594598a8cc203fbd2ce2837350c1fa5f
[ "Apache-2.0" ]
null
null
null
src/ngh2/_connection.py
standy66/ngh2
ab4e59d2594598a8cc203fbd2ce2837350c1fa5f
[ "Apache-2.0" ]
null
null
null
import collections import struct from typing import Iterable from ngh2._nghttp2 import ffi, lib import hpack import h2.config import h2.events import h2.settings import h2.errors import h2.exceptions import h2.connection class DataSource: __slots__ = ("data", "pos") def __init__(self, data, pos): se...
46.466292
154
0.66574
import collections import struct from typing import Iterable from ngh2._nghttp2 import ffi, lib import hpack import h2.config import h2.events import h2.settings import h2.errors import h2.exceptions import h2.connection class DataSource: __slots__ = ("data", "pos") def __init__(self, data, pos): se...
true
true
1c10a6f9d3456f9cc67ea41d6157257b83d9ffb7
10,186
py
Python
src/models/network.py
CrazyAlan/nextAI
e871b4078e9d591121f9093f2ba022e1c9115f7b
[ "MIT" ]
null
null
null
src/models/network.py
CrazyAlan/nextAI
e871b4078e9d591121f9093f2ba022e1c9115f7b
[ "MIT" ]
null
null
null
src/models/network.py
CrazyAlan/nextAI
e871b4078e9d591121f9093f2ba022e1c9115f7b
[ "MIT" ]
null
null
null
"""Functions for building the face recognition network. """ # 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, includ...
44.286957
166
0.617416
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.python.ops import array_ops from tensorflow.python.ops import control_flow_ops def conv(inpOp, nIn, nOut, kH, kW, dH, dW, padType, name, phase_train=True, use_batch_no...
true
true
1c10a70fd5039903618194dfbcfd7c0e6622cfe1
452
py
Python
college_project/exam/home/urls.py
a4aakash/OnlineExamSystem
d319e575fdfede4a9d49f6f366f18f1256d17c07
[ "MIT" ]
null
null
null
college_project/exam/home/urls.py
a4aakash/OnlineExamSystem
d319e575fdfede4a9d49f6f366f18f1256d17c07
[ "MIT" ]
null
null
null
college_project/exam/home/urls.py
a4aakash/OnlineExamSystem
d319e575fdfede4a9d49f6f366f18f1256d17c07
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path,include from home import views urlpatterns = [ path('',views.index,name="index"), path('login',views.loginUser,name="login"), path('logout',views.logoutUser,name="logout"), path('about',views.about,name="about"), path('contact',...
34.769231
53
0.676991
from django.contrib import admin from django.urls import path,include from home import views urlpatterns = [ path('',views.index,name="index"), path('login',views.loginUser,name="login"), path('logout',views.logoutUser,name="logout"), path('about',views.about,name="about"), path('contact',...
true
true
1c10a748f2bfd4486ca9251c86e00f1270213007
13,257
py
Python
backend/uclapi/common/decorators.py
balping/uclapi
57cb77a58a2f8fc5bb523b459fa074380f4d8dcc
[ "MIT" ]
null
null
null
backend/uclapi/common/decorators.py
balping/uclapi
57cb77a58a2f8fc5bb523b459fa074380f4d8dcc
[ "MIT" ]
null
null
null
backend/uclapi/common/decorators.py
balping/uclapi
57cb77a58a2f8fc5bb523b459fa074380f4d8dcc
[ "MIT" ]
null
null
null
import ciso8601 import datetime import pytz import re import redis from datetime import timezone from email.utils import format_datetime from functools import wraps from dashboard.models import App from oauth.models import OAuthToken from oauth.scoping import Scopes from .helpers import PrettyJsonResponse as JsonRe...
31.944578
78
0.568379
import ciso8601 import datetime import pytz import re import redis from datetime import timezone from email.utils import format_datetime from functools import wraps from dashboard.models import App from oauth.models import OAuthToken from oauth.scoping import Scopes from .helpers import PrettyJsonResponse as JsonRe...
true
true
1c10a9f28cb4e4b5427c4f6fb2d47e491456749f
2,539
py
Python
tensorflow_constrained_optimization/python/rates/predicate_test.py
RMKruse/tensorflow_constrained_optimization
e7c3c3deec305fb91193e7b063062e11b7398e5f
[ "Apache-2.0" ]
276
2019-01-24T19:49:49.000Z
2022-03-29T15:50:58.000Z
tensorflow_constrained_optimization/python/rates/predicate_test.py
RMKruse/tensorflow_constrained_optimization
e7c3c3deec305fb91193e7b063062e11b7398e5f
[ "Apache-2.0" ]
13
2019-04-29T00:25:36.000Z
2022-03-18T23:13:16.000Z
tensorflow_constrained_optimization/python/rates/predicate_test.py
RMKruse/tensorflow_constrained_optimization
e7c3c3deec305fb91193e7b063062e11b7398e5f
[ "Apache-2.0" ]
51
2019-01-26T00:45:01.000Z
2022-02-16T11:38:33.000Z
# Copyright 2018 The TensorFlow Constrained Optimization 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 # #...
34.780822
80
0.692005
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow_constrained_optimization.python import graph_and_eager_test_case from tensorflow_constrained_optimization.python.rates import defaults from tensorflow_constrained_optim...
true
true
1c10aac8873bdee180a0008272c26c47ccef0421
533
py
Python
tiltx/data_generator.py
marses/tiltx
99e25750f3db1c2fb54463a90753e032c572a8b2
[ "MIT" ]
1
2019-10-02T09:44:25.000Z
2019-10-02T09:44:25.000Z
tiltx/data_generator.py
marses/tiltx
99e25750f3db1c2fb54463a90753e032c572a8b2
[ "MIT" ]
null
null
null
tiltx/data_generator.py
marses/tiltx
99e25750f3db1c2fb54463a90753e032c572a8b2
[ "MIT" ]
null
null
null
import numpy class DataGenerator(object): """Generate data to work with the package.""" def __init__(self,): pass @staticmethod def example(i): """Recreate the values from Example i. The data is stored in data/data_i.txt for i in {1,...,6}. :returns: tuple(t, angle, a...
25.380952
65
0.54409
import numpy class DataGenerator(object): def __init__(self,): pass @staticmethod def example(i): with numpy.errstate(divide='ignore'): d = numpy.loadtxt("data/data_"+str(i)+".txt") return d[:,0], d[:,1], d[:,2]
true
true
1c10aad075df5e3b540584590e48088731a41b74
24,012
py
Python
repos/system_upgrade/el7toel8/actors/migratentp/libraries/ntp2chrony.py
berndfinger/leapp-repository
c3c2e304c61924f34024719310d486bc74b52ddf
[ "Apache-2.0" ]
21
2018-11-20T15:58:39.000Z
2022-03-15T19:57:24.000Z
repos/system_upgrade/el7toel8/actors/migratentp/libraries/ntp2chrony.py
berndfinger/leapp-repository
c3c2e304c61924f34024719310d486bc74b52ddf
[ "Apache-2.0" ]
732
2018-11-21T18:33:26.000Z
2022-03-31T16:16:24.000Z
repos/system_upgrade/el7toel8/actors/migratentp/libraries/ntp2chrony.py
berndfinger/leapp-repository
c3c2e304c61924f34024719310d486bc74b52ddf
[ "Apache-2.0" ]
85
2018-11-20T17:55:00.000Z
2022-03-29T09:40:31.000Z
#!/usr/bin/python # # Convert ntp configuration to chrony # # Copyright (C) 2018-2019 Miroslav Lichvar <mlichvar@redhat.com> # # 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 restric...
35.311765
117
0.538731
from __future__ import print_function import argparse import ipaddress import logging import os import re import subprocess import sys import six if six.PY2: from io import open reload(sys) sys.setdefaultencoding("utf-8") class NtpConfiguration(object): def __init__(self, root_dir, ntp_conf, ste...
true
true
1c10ab6dedce1d2058ab7efdc17c6c69462e9395
7,419
py
Python
ceilometer/tests/unit/objectstore/test_rgw.py
muralidharan10/ceilometer
70c30578b994694550bcd24dfc36c7f3be4946dc
[ "Apache-2.0" ]
1
2018-11-18T16:03:10.000Z
2018-11-18T16:03:10.000Z
ceilometer/tests/unit/objectstore/test_rgw.py
muralidharan10/ceilometer
70c30578b994694550bcd24dfc36c7f3be4946dc
[ "Apache-2.0" ]
null
null
null
ceilometer/tests/unit/objectstore/test_rgw.py
muralidharan10/ceilometer
70c30578b994694550bcd24dfc36c7f3be4946dc
[ "Apache-2.0" ]
2
2015-12-28T14:36:47.000Z
2018-11-18T16:03:11.000Z
#!/usr/bin/env python # # Copyright 2015 Reliance Jio Infocomm Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
40.320652
78
0.600485
import collections from keystoneauth1 import exceptions import mock from oslotest import base from oslotest import mockpatch import testscenarios.testcase from ceilometer.agent import manager from ceilometer.objectstore import rgw from ceilometer.objectstore.rgw_client import RGWAdminClient as rgw_client bucket_lis...
true
true
1c10ac2658f3c04e2ddd0fceadbfa9fdd4f17972
2,221
py
Python
mystery_graph_bot/graph_cruncher.py
dorellang/MysteryGraphBot
2473e9be900ec98198ff1f70f8bcf68ac608e48d
[ "MIT" ]
null
null
null
mystery_graph_bot/graph_cruncher.py
dorellang/MysteryGraphBot
2473e9be900ec98198ff1f70f8bcf68ac608e48d
[ "MIT" ]
5
2017-08-23T22:28:41.000Z
2021-06-01T22:04:01.000Z
mystery_graph_bot/graph_cruncher.py
dorellang/MysteryGraphBot
2473e9be900ec98198ff1f70f8bcf68ac608e48d
[ "MIT" ]
null
null
null
import time from igraph import Graph as IGraph, Vertex, Edge from .serializers import WrappedGraphSerializer logger = logging.getLogger('mystery_graph_bot') class GraphCruncher: def __init__(self): pass def __call__(self, wrapped_graph): return self.handle_wrapped_graph(wrapped_graph) ...
29.613333
77
0.588924
import time from igraph import Graph as IGraph, Vertex, Edge from .serializers import WrappedGraphSerializer logger = logging.getLogger('mystery_graph_bot') class GraphCruncher: def __init__(self): pass def __call__(self, wrapped_graph): return self.handle_wrapped_graph(wrapped_graph) ...
true
true
1c10acb7277a116f6c936c05af1e9c07c904c4d6
11,181
py
Python
concept_formation/owntrestle.py
anybass/HONto
4461bd067b169c10c72dc3d37aa8b848af3b2ad0
[ "MIT" ]
2
2021-11-18T08:29:17.000Z
2021-12-17T21:28:55.000Z
concept_formation/owntrestle.py
anybass/HONto
4461bd067b169c10c72dc3d37aa8b848af3b2ad0
[ "MIT" ]
null
null
null
concept_formation/owntrestle.py
anybass/HONto
4461bd067b169c10c72dc3d37aa8b848af3b2ad0
[ "MIT" ]
3
2018-11-17T17:47:14.000Z
2021-12-17T21:28:58.000Z
""" The Trestle module contains the :class:`TrestleTree` class, which extends Cobweb3 to support component and relational attributes. """ from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import from __future__ import division from concept_formation.owncobwe...
43.505837
79
0.632591
from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import from __future__ import division from concept_formation.owncobweb3 import Cobweb3Tree from concept_formation.owncobweb3 import Cobweb3Node from concept_formation.own_structure_mapper import StructureMap...
true
true
1c10acdb6028e2577a370eb5e4b7ca69ea7b8cd4
5,134
py
Python
sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/models/_hybrid_network_management_client_enums.py
JianpingChen/azure-sdk-for-python
3072fc8c0366287fbaea1b02493a50259c3248a2
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/models/_hybrid_network_management_client_enums.py
JianpingChen/azure-sdk-for-python
3072fc8c0366287fbaea1b02493a50259c3248a2
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/models/_hybrid_network_management_client_enums.py
JianpingChen/azure-sdk-for-python
3072fc8c0366287fbaea1b02493a50259c3248a2
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
29.848837
96
0.677834
from enum import Enum, EnumMeta from six import with_metaclass class _CaseInsensitiveEnumMeta(EnumMeta): def __getitem__(self, name): return super().__getitem__(name.upper()) def __getattr__(cls, name): try: return cls._member_map_[name.upper()] except KeyError: ...
true
true
1c10ad19d6bd7e18bec5375ea5bf2b827700ba71
136
py
Python
addons/crm_project/wizard/__init__.py
jjiege/odoo
fd5b8ad387c1881f349d125cbd56433f4d49398f
[ "MIT" ]
null
null
null
addons/crm_project/wizard/__init__.py
jjiege/odoo
fd5b8ad387c1881f349d125cbd56433f4d49398f
[ "MIT" ]
null
null
null
addons/crm_project/wizard/__init__.py
jjiege/odoo
fd5b8ad387c1881f349d125cbd56433f4d49398f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import crm_lead_convert2task
27.2
74
0.735294
from . import crm_lead_convert2task
true
true
1c10aed264d797b64253c4ebc88026563f91d87e
2,066
py
Python
src/main/python/buffbot/ui/generated/add_acl.py
dstufft/buffbot
80c26ee8ac6d91c1af2ea2565cbe7acad6ecc252
[ "Apache-2.0" ]
null
null
null
src/main/python/buffbot/ui/generated/add_acl.py
dstufft/buffbot
80c26ee8ac6d91c1af2ea2565cbe7acad6ecc252
[ "Apache-2.0" ]
null
null
null
src/main/python/buffbot/ui/generated/add_acl.py
dstufft/buffbot
80c26ee8ac6d91c1af2ea2565cbe7acad6ecc252
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'gui/AddACLEntry.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 QtCo...
43.041667
106
0.703775
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_AddACL(object): def setupUi(self, AddACL): AddACL.setObjectName("AddACL") AddACL.resize(400, 91) self.widget = QtWidgets.QWidget(AddACL) self.widget.setGeometry(QtCore.QRect(0, 10, 391, 72)) self.widget.setObjectName("w...
true
true
1c10af158381d3bf41fbdb21d408b7a2f5c450b9
2,336
py
Python
python/swap_header.py
daniestevez/gr-csp
0a10e4d2e5cf4a51256e5dc72aa42f8d3d54c232
[ "Unlicense" ]
19
2016-05-27T15:12:31.000Z
2021-04-19T09:42:35.000Z
python/swap_header.py
daniestevez/gr-csp
0a10e4d2e5cf4a51256e5dc72aa42f8d3d54c232
[ "Unlicense" ]
null
null
null
python/swap_header.py
daniestevez/gr-csp
0a10e4d2e5cf4a51256e5dc72aa42f8d3d54c232
[ "Unlicense" ]
5
2017-04-26T22:48:40.000Z
2022-02-19T23:49:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016 Daniel Estevez <daniel@destevez.net>. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compiled ...
36.5
90
0.704195
import numpy from gnuradio import gr import pmt import array class swap_header(gr.basic_block): """ docstring for block swap_header """ def __init__(self): gr.basic_block.__init__(self, name="swap_crc", in_sig=[], out_sig=[]) self.message_port_regi...
false
true
1c10af683acf332fd4b1c470b4dccc8737a84dd0
3,153
py
Python
rally/plugins/openstack/scenarios/glance/utils.py
DeanHwd/rally
d284aa0746c54f1c375470e76dd206d19877a7fd
[ "Apache-2.0" ]
null
null
null
rally/plugins/openstack/scenarios/glance/utils.py
DeanHwd/rally
d284aa0746c54f1c375470e76dd206d19877a7fd
[ "Apache-2.0" ]
null
null
null
rally/plugins/openstack/scenarios/glance/utils.py
DeanHwd/rally
d284aa0746c54f1c375470e76dd206d19877a7fd
[ "Apache-2.0" ]
null
null
null
# Copyright 2014: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
39.4125
78
0.668252
from rally.common import cfg from rally.common import logging from rally.plugins.openstack import scenario from rally.plugins.openstack.wrappers import glance as glance_wrapper from rally.task import atomic from rally.task import utils CONF = cfg.CONF LOG = logging.getLogger(__name__) class GlanceScenario(scenario...
true
true
1c10b071f08d878506d6b70e069e4d4bb88883b6
2,497
py
Python
recipes/Python/577574_PythInfinite_Rotations/recipe-577574.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/577574_PythInfinite_Rotations/recipe-577574.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/577574_PythInfinite_Rotations/recipe-577574.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
from itertools import * from collections import deque # First a naive approach. At each generation we pop the first element and append # it to the back. This is highly memmory deficient. def rotations(it): """ rotations([0,1,2]) --> [[0, 1, 2], [1, 2, 0], [2, 0, 1]] """ l = list(it) for i in range(len(l)):...
36.188406
84
0.603124
from itertools import * from collections import deque def rotations(it): l = list(it) for i in range(len(l)): yield iter(l) l = l[1:]+[l[0]] def rotations(it): l = deque(it) for i in range(len(l)): yield iter(l) l.rotate() def tails(it): while True: tail, i...
true
true
1c10b08457d8d182d4c9e7a8ac65fc3098ddf3c8
589
py
Python
Other/reuse session.py
DJHig/TM1py-samples
da4050380447472a02e2a107a2c5be79ac284d0a
[ "MIT" ]
1
2019-05-30T10:10:20.000Z
2019-05-30T10:10:20.000Z
Other/reuse session.py
DJHig/TM1py-samples
da4050380447472a02e2a107a2c5be79ac284d0a
[ "MIT" ]
null
null
null
Other/reuse session.py
DJHig/TM1py-samples
da4050380447472a02e2a107a2c5be79ac284d0a
[ "MIT" ]
1
2017-09-01T03:35:18.000Z
2017-09-01T03:35:18.000Z
""" Reuse session id to avoid (unreasonably slow) CAM Authentication """ from TM1py.Services import TM1Service import configparser config = configparser.ConfigParser() config.read('..\config.ini') # instantiate session tm1_a = TM1Service(**config['tm1srv01'], logging=True) # get session_id from tm1 connection ses...
21.814815
77
0.764007
from TM1py.Services import TM1Service import configparser config = configparser.ConfigParser() config.read('..\config.ini') tm1_a = TM1Service(**config['tm1srv01'], logging=True) session_id = tm1_a.connection.session_id tm1_b = TM1Service(**config['tm1srv01'], session_id=session_id, logging=True) print(tm1_b.se...
true
true
1c10b1c893bc45ed304a4fae3553aa1954693c68
10,798
py
Python
tweetfeels/tweetfeels.py
arambula1980/tweetfeels
10a2dd1233439bbe9be70aef9ea25c0ef0defb53
[ "BSD-3-Clause" ]
1
2019-09-09T05:02:23.000Z
2019-09-09T05:02:23.000Z
tweetfeels/tweetfeels.py
Pinperepette/tweetfeels
10a2dd1233439bbe9be70aef9ea25c0ef0defb53
[ "BSD-3-Clause" ]
null
null
null
tweetfeels/tweetfeels.py
Pinperepette/tweetfeels
10a2dd1233439bbe9be70aef9ea25c0ef0defb53
[ "BSD-3-Clause" ]
null
null
null
import time from datetime import datetime, timedelta from threading import Thread from collections import deque from nltk.sentiment.vader import SentimentIntensityAnalyzer import numpy as np from tweepy import (OAuthHandler, Stream) from tweetfeels import (TweetData, TweetLi...
34.170886
80
0.586405
import time from datetime import datetime, timedelta from threading import Thread from collections import deque from nltk.sentiment.vader import SentimentIntensityAnalyzer import numpy as np from tweepy import (OAuthHandler, Stream) from tweetfeels import (TweetData, TweetLi...
false
true
1c10b24566669d014313c2416eb980fb162bae82
432
py
Python
xos/synchronizers/new_base/steps/sync_object.py
pan2za/xos
c2a4da2ccaa12360b2718be303b247866aefdfe6
[ "Apache-2.0" ]
null
null
null
xos/synchronizers/new_base/steps/sync_object.py
pan2za/xos
c2a4da2ccaa12360b2718be303b247866aefdfe6
[ "Apache-2.0" ]
5
2020-06-05T17:47:15.000Z
2021-09-23T23:21:27.000Z
xos/synchronizers/new_base/steps/sync_object.py
pan2za/xos
c2a4da2ccaa12360b2718be303b247866aefdfe6
[ "Apache-2.0" ]
null
null
null
import os import base64 from collections import defaultdict from xos.config import Config from synchronizers.new_base.syncstep import * from xos.logger import observer_logger as logger import json class SyncObject(SyncStep): provides=[] # Caller fills this in requested_interval=0 observes=[] # Caller fills...
27
71
0.763889
import os import base64 from collections import defaultdict from xos.config import Config from synchronizers.new_base.syncstep import * from xos.logger import observer_logger as logger import json class SyncObject(SyncStep): provides=[] requested_interval=0 observes=[] def sync_record(self, r): ...
true
true
1c10b2556d800b4ff373c5160da5ccb5388f5909
1,957
py
Python
calm/dsl/api/handle.py
tonyjames/calm-dsl
e94a35e26a43a0081d6487a538675641fc1d3667
[ "Apache-2.0" ]
null
null
null
calm/dsl/api/handle.py
tonyjames/calm-dsl
e94a35e26a43a0081d6487a538675641fc1d3667
[ "Apache-2.0" ]
null
null
null
calm/dsl/api/handle.py
tonyjames/calm-dsl
e94a35e26a43a0081d6487a538675641fc1d3667
[ "Apache-2.0" ]
1
2020-02-13T02:56:58.000Z
2020-02-13T02:56:58.000Z
from calm.dsl.config import get_config from .connection import get_connection, update_connection, REQUEST, Connection from .blueprint import BlueprintAPI from .application import ApplicationAPI from .project import ProjectAPI from .setting import SettingAPI class ClientHandle: def __init__(self, connection): ...
26.445946
78
0.703117
from calm.dsl.config import get_config from .connection import get_connection, update_connection, REQUEST, Connection from .blueprint import BlueprintAPI from .application import ApplicationAPI from .project import ProjectAPI from .setting import SettingAPI class ClientHandle: def __init__(self, connection): ...
true
true
1c10b27002f74bc9e004f4369a88f240c5bebf97
183
py
Python
samples/LuceneInAction/SnowballTest.py
romanchyla/pylucene-trunk
990079ff0c76b972ce5ef2bac9b85334a0a1f27a
[ "Apache-2.0" ]
15
2015-05-21T09:28:01.000Z
2022-03-18T23:41:49.000Z
samples/LuceneInAction/SnowballTest.py
fnp/pylucene
fb16ac375de5479dec3919a5559cda02c899e387
[ "Apache-2.0" ]
1
2021-09-30T03:59:43.000Z
2021-09-30T03:59:43.000Z
samples/LuceneInAction/SnowballTest.py
romanchyla/pylucene-trunk
990079ff0c76b972ce5ef2bac9b85334a0a1f27a
[ "Apache-2.0" ]
13
2015-04-18T23:05:11.000Z
2021-11-29T21:23:26.000Z
import os, sys, unittest, lucene lucene.initVM() sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0]))) import lia.tools.SnowballTest unittest.main(lia.tools.SnowballTest)
20.333333
62
0.775956
import os, sys, unittest, lucene lucene.initVM() sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0]))) import lia.tools.SnowballTest unittest.main(lia.tools.SnowballTest)
true
true
1c10b3342fe6ae1d213c5834a2ca80dffc42f284
11,533
py
Python
liionpack/solver_utils.py
brosaplanella/liionpack
4c3f61b6f28e1419974c8572669d70fc173a6959
[ "MIT" ]
null
null
null
liionpack/solver_utils.py
brosaplanella/liionpack
4c3f61b6f28e1419974c8572669d70fc173a6959
[ "MIT" ]
null
null
null
liionpack/solver_utils.py
brosaplanella/liionpack
4c3f61b6f28e1419974c8572669d70fc173a6959
[ "MIT" ]
null
null
null
# # Solver utilities # import casadi import pybamm import numpy as np import time as ticker import liionpack as lp from tqdm import tqdm def _mapped_step(model, solutions, inputs_dict, integrator, variables, t_eval): """ Internal function to process the model for one timestep in a mapped way. Mapped vers...
34.948485
89
0.650828
import casadi import pybamm import numpy as np import time as ticker import liionpack as lp from tqdm import tqdm def _mapped_step(model, solutions, inputs_dict, integrator, variables, t_eval): len_rhs = model.concatenated_rhs.size N = len(solutions) if solutions[0] is None: x0 = casadi.h...
true
true
1c10b48251baab414123fad2dfdb12f21ea7f9eb
437
py
Python
test/encrypt_string.py
ayuzzh/simply-encrypt
7027b8c09129bf3be2125820b85749a4e37b08c6
[ "BSD-3-Clause" ]
null
null
null
test/encrypt_string.py
ayuzzh/simply-encrypt
7027b8c09129bf3be2125820b85749a4e37b08c6
[ "BSD-3-Clause" ]
null
null
null
test/encrypt_string.py
ayuzzh/simply-encrypt
7027b8c09129bf3be2125820b85749a4e37b08c6
[ "BSD-3-Clause" ]
null
null
null
import simplyencrypt as en keys = en.new_random_password(1024) line = "Let's encrypt this line" print("Unenceypted line: " + line) cipher_text = en.encrypt(keys, line) try: print("Encrypted line: " + str(cipher_text)) except: print("Encrypted: ", end=" ") for c in cipher_text: c = str(ord(c)) print(c, end=", "...
25.705882
70
0.700229
import simplyencrypt as en keys = en.new_random_password(1024) line = "Let's encrypt this line" print("Unenceypted line: " + line) cipher_text = en.encrypt(keys, line) try: print("Encrypted line: " + str(cipher_text)) except: print("Encrypted: ", end=" ") for c in cipher_text: c = str(ord(c)) print(c, end=", "...
true
true
1c10b4964ee18924e2a46ea16853d87733d814bb
5,389
py
Python
src/scion/service/test/test_scion_orbdata_load.py
scion-network/scion
9a778eeb3e4e690d1b1ebd19e5349314cbf7b0fc
[ "BSD-2-Clause" ]
null
null
null
src/scion/service/test/test_scion_orbdata_load.py
scion-network/scion
9a778eeb3e4e690d1b1ebd19e5349314cbf7b0fc
[ "BSD-2-Clause" ]
null
null
null
src/scion/service/test/test_scion_orbdata_load.py
scion-network/scion
9a778eeb3e4e690d1b1ebd19e5349314cbf7b0fc
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python __author__ = 'Michael Meisinger' from nose.plugins.attrib import attr import getpass import gevent import os import unittest from pyon.util.int_test import IonIntegrationTestCase from pyon.public import BadRequest, NotFound, IonObject, RT, PRED, OT, CFG, StreamSubscriber, log from ion.agent.co...
40.216418
110
0.686213
__author__ = 'Michael Meisinger' from nose.plugins.attrib import attr import getpass import gevent import os import unittest from pyon.util.int_test import IonIntegrationTestCase from pyon.public import BadRequest, NotFound, IonObject, RT, PRED, OT, CFG, StreamSubscriber, log from ion.agent.control import AgentCont...
true
true
1c10b4bf26a2503316d9f5335ce1a0cd9e336f6b
2,527
py
Python
tests/test_create_from_full_info.py
dskkato/superannotate-python-sdk
67eece2d7d06375ad2e502c2282e3b29c9b82631
[ "MIT" ]
null
null
null
tests/test_create_from_full_info.py
dskkato/superannotate-python-sdk
67eece2d7d06375ad2e502c2282e3b29c9b82631
[ "MIT" ]
null
null
null
tests/test_create_from_full_info.py
dskkato/superannotate-python-sdk
67eece2d7d06375ad2e502c2282e3b29c9b82631
[ "MIT" ]
null
null
null
import time import superannotate as sa from .test_assign_images import safe_create_project def test_create_from_full_info(): PROJECT_NAME1 = "test create from full info1" PROJECT_NAME2 = "test create from full info2" project = safe_create_project(PROJECT_NAME1,"test","Vector") sa.upload_images_fr...
29.729412
75
0.668381
import time import superannotate as sa from .test_assign_images import safe_create_project def test_create_from_full_info(): PROJECT_NAME1 = "test create from full info1" PROJECT_NAME2 = "test create from full info2" project = safe_create_project(PROJECT_NAME1,"test","Vector") sa.upload_images_fr...
true
true
1c10b4d76e8e6303901ff0fbfc8ac2895cc3830b
2,831
py
Python
bokehExer/scipyTest/sharpe.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
bokehExer/scipyTest/sharpe.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
bokehExer/scipyTest/sharpe.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
from scipy import ndimage as ndi import numpy as np import scipy from bokeh.io import curdoc from bokeh.plotting import figure, show from bokeh.models import ColumnDataSource from bokeh.models.widgets import Slider, TextInput from bokeh.layouts import row, widgetbox from bokeh.layouts import gridplot from bokeh.client ...
36.766234
79
0.627693
from scipy import ndimage as ndi import numpy as np import scipy from bokeh.io import curdoc from bokeh.plotting import figure, show from bokeh.models import ColumnDataSource from bokeh.models.widgets import Slider, TextInput from bokeh.layouts import row, widgetbox from bokeh.layouts import gridplot from bokeh.client ...
true
true
1c10b52852bf4a89bf0c03c8527c509d8b10e93b
1,630
py
Python
profiles_api/models.py
pritomzap/Profile-REST-API-Django-
f328b9538895a3ee41ca831a2497333dfbe564e8
[ "MIT" ]
null
null
null
profiles_api/models.py
pritomzap/Profile-REST-API-Django-
f328b9538895a3ee41ca831a2497333dfbe564e8
[ "MIT" ]
null
null
null
profiles_api/models.py
pritomzap/Profile-REST-API-Django-
f328b9538895a3ee41ca831a2497333dfbe564e8
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.models import BaseUserManager class UserProfileManager(BaseUserManager): """Manager for user profiles""" def create_user(self,email,name,password...
30.185185
64
0.681595
from django.db import models from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.models import BaseUserManager class UserProfileManager(BaseUserManager): def create_user(self,email,name,password=None): if not email: ...
true
true
1c10b5994fd1638d38ac31e70612ba54b4056047
2,583
py
Python
qbot_nodes_py/src/uvc_camera.py
samuk/ros2_qbot_1
1e674dd17ee5d375c99e0bd35648a8cec0b954d5
[ "Apache-2.0" ]
null
null
null
qbot_nodes_py/src/uvc_camera.py
samuk/ros2_qbot_1
1e674dd17ee5d375c99e0bd35648a8cec0b954d5
[ "Apache-2.0" ]
null
null
null
qbot_nodes_py/src/uvc_camera.py
samuk/ros2_qbot_1
1e674dd17ee5d375c99e0bd35648a8cec0b954d5
[ "Apache-2.0" ]
1
2019-12-18T21:39:45.000Z
2019-12-18T21:39:45.000Z
#!/usr/bin/python3 # # clone the repository :~/ros2_ws/src$ git clone ....... # from ros2 workspace folder :~/ros2_ws$ colcon build # source the setup.bash file :~/ros2_ws$ source .install/setup.bash # start the node :~/ros2_ws$ ros2 run qbot_nodes_py uvc_camera # import rclpy from rclpy.node imp...
30.388235
112
0.641502
import rclpy from rclpy.node import Node from std_msgs.msg import String import cv2 import argparse import time from qbot_nodes_cpp.srv import CameraCommand class UVCCamera(Node): def __init__(self, camera_idx, timer_period): super().__init__('uvc_camera') self.camera_command = 99 self...
true
true
1c10b76fdeb7788bd3c5e5b8d978743aef99d56b
1,749
py
Python
systest/localtests/minimal.py
ZenDevelopmentEcosystem/znake
ce7c5b3abca88200ac09b553dc64f8c0a3f4255f
[ "Apache-2.0" ]
1
2020-12-15T00:34:51.000Z
2020-12-15T00:34:51.000Z
systest/localtests/minimal.py
ZenDevelopmentEcosystem/znake
ce7c5b3abca88200ac09b553dc64f8c0a3f4255f
[ "Apache-2.0" ]
null
null
null
systest/localtests/minimal.py
ZenDevelopmentEcosystem/znake
ce7c5b3abca88200ac09b553dc64f8c0a3f4255f
[ "Apache-2.0" ]
2
2020-02-01T16:56:15.000Z
2020-12-10T21:55:23.000Z
from zaf.component.decorator import requires @requires(znake='ZnakeMinimal') def test_debtest(znake): znake('debtest') znake.workspace.assert_file_exists('build/dist/xenial/zenterio-zminimal_0.1.1+0+xenial_amd64.deb') znake.workspace.assert_file_exists('build/dist/bionic/zenterio-zminimal_0.1.1+0+bionic_a...
34.294118
105
0.771298
from zaf.component.decorator import requires @requires(znake='ZnakeMinimal') def test_debtest(znake): znake('debtest') znake.workspace.assert_file_exists('build/dist/xenial/zenterio-zminimal_0.1.1+0+xenial_amd64.deb') znake.workspace.assert_file_exists('build/dist/bionic/zenterio-zminimal_0.1.1+0+bionic_a...
true
true
1c10b7f83143925c6ea7ac48a3c76d6103a4f940
792
py
Python
wargame_admin/templatetags/wargame_admin_tags.py
radl97/wargame-web
4062b05717bacb5c1a2c178f3a8bd07af7a18b10
[ "MIT" ]
2
2020-10-06T17:07:32.000Z
2020-10-15T09:25:42.000Z
wargame_admin/templatetags/wargame_admin_tags.py
radl97/wargame-web
4062b05717bacb5c1a2c178f3a8bd07af7a18b10
[ "MIT" ]
67
2018-06-22T09:12:44.000Z
2022-03-11T23:34:39.000Z
wargame_admin/templatetags/wargame_admin_tags.py
radl97/wargame-web
4062b05717bacb5c1a2c178f3a8bd07af7a18b10
[ "MIT" ]
2
2020-10-05T21:13:48.000Z
2020-10-10T13:46:20.000Z
import os from django.template import Library from utils.challenge_import import MessageType register = Library() @register.simple_tag def submission_name(view, userchallenge): return view.get_userchallenge_text(userchallenge) @register.simple_tag def append_url(base_url, view, userchallenge): return bas...
24
81
0.744949
import os from django.template import Library from utils.challenge_import import MessageType register = Library() @register.simple_tag def submission_name(view, userchallenge): return view.get_userchallenge_text(userchallenge) @register.simple_tag def append_url(base_url, view, userchallenge): return bas...
true
true
1c10b82423bd91d93beafc2cb015210f1444f1a1
13,076
py
Python
thinc/tests/layers/test_tensorflow_wrapper.py
richardpaulhudson/thinc
a9b047121e1ddca30fd9fc6c78cb853084ea6e78
[ "MIT" ]
null
null
null
thinc/tests/layers/test_tensorflow_wrapper.py
richardpaulhudson/thinc
a9b047121e1ddca30fd9fc6c78cb853084ea6e78
[ "MIT" ]
null
null
null
thinc/tests/layers/test_tensorflow_wrapper.py
richardpaulhudson/thinc
a9b047121e1ddca30fd9fc6c78cb853084ea6e78
[ "MIT" ]
null
null
null
import numpy import pytest from thinc.api import Adam, ArgsKwargs, Linear, Model, TensorFlowWrapper from thinc.api import get_current_ops, keras_subclass, tensorflow2xp, xp2tensorflow from thinc.util import gpu_is_available, has_tensorflow, to_categorical from ..util import check_input_converters, make_tempdir @pyte...
32.366337
136
0.685607
import numpy import pytest from thinc.api import Adam, ArgsKwargs, Linear, Model, TensorFlowWrapper from thinc.api import get_current_ops, keras_subclass, tensorflow2xp, xp2tensorflow from thinc.util import gpu_is_available, has_tensorflow, to_categorical from ..util import check_input_converters, make_tempdir @pyte...
true
true
1c10b8d5ebc85a6d6888965984d00134dba467ef
14,097
py
Python
firebert_fve.py
FireBERT-author/FireBERT
c9e977e2863a51d179dc1072b468040e419c82ca
[ "MIT" ]
9
2020-08-11T11:00:43.000Z
2022-03-04T23:32:09.000Z
firebert_fve.py
FireBERT-author/FireBERT
c9e977e2863a51d179dc1072b468040e419c82ca
[ "MIT" ]
null
null
null
firebert_fve.py
FireBERT-author/FireBERT
c9e977e2863a51d179dc1072b468040e419c82ca
[ "MIT" ]
2
2021-03-01T07:49:51.000Z
2021-07-27T23:53:37.000Z
# coding=utf-8 # Copyright 2020 FireBERT authors. All rights reserved. # # Licensed under the MIT license # See https://github.com/FireBERT-author/FireBERT/blob/master/LICENSE for details # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS"...
38.307065
141
0.606228
import torch from torch import nn import numpy as np import argparse from switch import SWITCH from firebert_base import FireBERT_base class FireBERT_FVE(FireBERT_base): def __init__(self, load_from=None, processor=None, hparams=None): super(FireBERT_FVE, self).__init__(load_from=load_from, processor=p...
true
true
1c10ba6b4ae3b83b914ed416d365931472792573
909
py
Python
garage/contrib/alexbeloi/examples/trpois_cartpole.py
shadiakiki1986/garage
095bb5d25b32df1d44b47e99a78a9b01796941d9
[ "MIT" ]
3
2019-08-11T22:26:55.000Z
2020-11-28T10:23:50.000Z
garage/contrib/alexbeloi/examples/trpois_cartpole.py
shadiakiki1986/garage
095bb5d25b32df1d44b47e99a78a9b01796941d9
[ "MIT" ]
null
null
null
garage/contrib/alexbeloi/examples/trpois_cartpole.py
shadiakiki1986/garage
095bb5d25b32df1d44b47e99a78a9b01796941d9
[ "MIT" ]
2
2019-08-11T22:30:14.000Z
2021-03-25T02:57:50.000Z
""" Example using VPG with ISSampler, iterations alternate between live and importance sampled iterations. """ from garage.baselines import LinearFeatureBaseline from garage.contrib.alexbeloi.is_sampler import ISSampler from garage.envs import normalize from garage.envs.box2d import CartpoleEnv from garage.theano.algos...
24.567568
71
0.759076
from garage.baselines import LinearFeatureBaseline from garage.contrib.alexbeloi.is_sampler import ISSampler from garage.envs import normalize from garage.envs.box2d import CartpoleEnv from garage.theano.algos import TRPO from garage.theano.policies import GaussianMLPPolicy env = normalize(CartpoleEnv()) policy = Gau...
true
true
1c10bc58f2a744dce5f514f45525c2660534f054
1,483
py
Python
workingTimeManagerBase/workingTimeManager/views.py
Fischmax/workingTimeManager
d23204ea17496a85f9ee20c80b4421bdc8fc29d2
[ "MIT" ]
null
null
null
workingTimeManagerBase/workingTimeManager/views.py
Fischmax/workingTimeManager
d23204ea17496a85f9ee20c80b4421bdc8fc29d2
[ "MIT" ]
6
2019-01-04T13:06:31.000Z
2019-01-04T13:39:09.000Z
workingTimeManagerBase/workingTimeManager/views.py
Fischmax/workingTimeManager
d23204ea17496a85f9ee20c80b4421bdc8fc29d2
[ "MIT" ]
null
null
null
import time from MySQLdb import Date from django.http import HttpResponse from django.shortcuts import render from .models import Worktime def dashboard(request): times = [] times = Worktime.objects.order_by('-date') print(times) return render(request, 'workingTimeManager/dashboard.html', {'workin...
32.23913
111
0.689144
import time from MySQLdb import Date from django.http import HttpResponse from django.shortcuts import render from .models import Worktime def dashboard(request): times = [] times = Worktime.objects.order_by('-date') print(times) return render(request, 'workingTimeManager/dashboard.html', {'workin...
true
true
1c10bc9be1036ea979d7d63d6ec74db33ca2049f
5,373
py
Python
dnn/ddqn.py
takashi-matsushita/lab
894e5762f58046c68e665d7463db3d7359c15fda
[ "MIT" ]
null
null
null
dnn/ddqn.py
takashi-matsushita/lab
894e5762f58046c68e665d7463db3d7359c15fda
[ "MIT" ]
null
null
null
dnn/ddqn.py
takashi-matsushita/lab
894e5762f58046c68e665d7463db3d7359c15fda
[ "MIT" ]
null
null
null
import random import collections import numpy as np import keras from keras import layers from keras.models import Model from keras import backend as K from keras import optimizers import tensorflow as tf """ double-DQN """ class DDQN: def huber_loss(y_true, y_pred, delta=1.0): error = y_true - y_pred ...
26.59901
105
0.659036
import random import collections import numpy as np import keras from keras import layers from keras.models import Model from keras import backend as K from keras import optimizers import tensorflow as tf class DDQN: def huber_loss(y_true, y_pred, delta=1.0): error = y_true - y_pred condition = K.abs(e...
true
true
1c10bc9e05bab9c11192719d097e95b9ee2749c0
9,559
py
Python
lib/services/vpc/ncloud_vpc/model/subnet.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
12
2018-11-20T04:30:49.000Z
2021-11-09T12:34:26.000Z
lib/services/vpc/ncloud_vpc/model/subnet.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
1
2019-01-24T15:56:15.000Z
2019-05-31T07:56:55.000Z
lib/services/vpc/ncloud_vpc/model/subnet.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
6
2018-06-29T03:45:50.000Z
2022-03-18T01:51:45.000Z
# coding: utf-8 """ vpc Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from ncloud_vpc.model.common_code import CommonCode # noqa: F401,E501 class Subnet(object): """NOTE: This class is auto generated by the swagger code ge...
26.117486
207
0.570143
import pprint import re import six from ncloud_vpc.model.common_code import CommonCode class Subnet(object): swagger_types = { 'subnet_no': 'str', 'vpc_no': 'str', 'zone_code': 'str', 'subnet_name': 'str', 'subnet': 'str', 'subnet_status': 'CommonCode', ...
true
true
1c10bd8a6d8444d4ad56cb8eadd4d1bd27174dc4
5,474
py
Python
setup.py
PennyLaneAI/pennylane-lightning
772bf0e0a15103b46f651266212ce3178aaa9321
[ "Apache-2.0" ]
29
2020-08-12T15:05:27.000Z
2022-03-11T15:49:58.000Z
setup.py
PennyLaneAI/pennylane-lightning
772bf0e0a15103b46f651266212ce3178aaa9321
[ "Apache-2.0" ]
238
2020-08-12T15:04:28.000Z
2022-03-30T14:35:35.000Z
setup.py
PennyLaneAI/pennylane-lightning
772bf0e0a15103b46f651266212ce3178aaa9321
[ "Apache-2.0" ]
13
2020-10-14T14:59:29.000Z
2022-03-23T08:53:17.000Z
# Copyright 2020 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
35.089744
203
0.635367
import os import platform import setuptools import sys import subprocess import shutil from pathlib import Path from setuptools import setup, Extension, find_packages from setuptools.command.build_ext import build_ext from distutils.util import get_platform class CMakeExtension(Extension): def __init__(self, n...
true
true
1c10bdae2b16ecfbe59de46f5c1d3c7ce9ed9aea
115,103
py
Python
ryu/ofproto/ofproto_v1_0_parser.py
vinaykothiyal/ryu
32551989c649311854215df29860ccb272c105c0
[ "Apache-2.0" ]
9
2018-04-11T12:53:08.000Z
2021-12-14T01:41:22.000Z
ryu/ofproto/ofproto_v1_0_parser.py
vinaykothiyal/ryu
32551989c649311854215df29860ccb272c105c0
[ "Apache-2.0" ]
1
2019-05-20T13:23:28.000Z
2020-12-20T09:06:52.000Z
ryu/ofproto/ofproto_v1_0_parser.py
vinaykothiyal/ryu
32551989c649311854215df29860ccb272c105c0
[ "Apache-2.0" ]
2
2020-10-20T13:52:45.000Z
2021-06-26T02:21:58.000Z
# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011, 2012 Isaku Yamahata <yamahata at valinux co jp> # # 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 # ...
35.34019
79
0.565902
import struct import base64 import six import netaddr from ryu.ofproto.ofproto_parser import StringifyMixin, MsgBase from ryu.lib import addrconv from ryu.lib import ip from ryu.lib import mac from ryu.lib.packet import packet from ryu.lib.pack_utils import msg_pack_into from ryu.ofproto import nx_match from ryu.of...
true
true
1c10be5d48a9ad3583d9174c36a8ed7dd0e8439a
2,593
py
Python
broken_parsers/imperial.py
rajbot/vaccinebot
9b7c13eb248e92a248dbc0e3e9de6d4dc7a2c20a
[ "MIT" ]
2
2021-02-07T05:06:09.000Z
2021-03-02T18:23:07.000Z
broken_parsers/imperial.py
rajbot/vaccinebot
9b7c13eb248e92a248dbc0e3e9de6d4dc7a2c20a
[ "MIT" ]
null
null
null
broken_parsers/imperial.py
rajbot/vaccinebot
9b7c13eb248e92a248dbc0e3e9de6d4dc7a2c20a
[ "MIT" ]
null
null
null
# Parse vaccination site locations for Imperial County # Run manually: python3 -m location_parsers.imperial import re import urllib3 from bs4 import BeautifulSoup from . import header_dict from . import County, Location from . import debug_print, validate county = County( name="Imperial", url="http://www.ic...
31.621951
151
0.624759
import re import urllib3 from bs4 import BeautifulSoup from . import header_dict from . import County, Location from . import debug_print, validate county = County( name="Imperial", url="http://www.icphd.org/health-information-and-resources/healthy-facts/covid-19/covid-19-vaccine/vaccination-clinics/65-year...
true
true
1c10bed209282eda1f1b6b7379cdbecacf4ebe0a
298
py
Python
frontend/Akina/Akina/captcha.py
Yveh/Akina
2bf66c749f31905a62d1028dcaf4908981f0e090
[ "MIT" ]
null
null
null
frontend/Akina/Akina/captcha.py
Yveh/Akina
2bf66c749f31905a62d1028dcaf4908981f0e090
[ "MIT" ]
null
null
null
frontend/Akina/Akina/captcha.py
Yveh/Akina
2bf66c749f31905a62d1028dcaf4908981f0e090
[ "MIT" ]
null
null
null
import random def generate_captcha(): x = (random.randint(1, 5) * 2, random.randint(1, 5), random.randint(1, 5)) return (x, '$\\int_0^{{ {0} }} {1} x + {2} \\, dx$'.format(str(x[0]), str(x[1]), str(x[2]))) def get_captcha_ans(x): return float(x[0] * x[2] + 0.5 * x[0] * x[0] * x[1])
29.8
96
0.533557
import random def generate_captcha(): x = (random.randint(1, 5) * 2, random.randint(1, 5), random.randint(1, 5)) return (x, '$\\int_0^{{ {0} }} {1} x + {2} \\, dx$'.format(str(x[0]), str(x[1]), str(x[2]))) def get_captcha_ans(x): return float(x[0] * x[2] + 0.5 * x[0] * x[0] * x[1])
true
true
1c10c11b8092edbf78f30749549caf4c5fa87a02
1,891
py
Python
src/tools/perf/measurements/v8_detached_context_age_in_gc.py
bopopescu/MQUIC
703e944ec981366cfd2528943b1def2c72b7e49d
[ "MIT" ]
1
2018-01-02T15:42:08.000Z
2018-01-02T15:42:08.000Z
src/tools/perf/measurements/v8_detached_context_age_in_gc.py
bopopescu/MQUIC
703e944ec981366cfd2528943b1def2c72b7e49d
[ "MIT" ]
null
null
null
src/tools/perf/measurements/v8_detached_context_age_in_gc.py
bopopescu/MQUIC
703e944ec981366cfd2528943b1def2c72b7e49d
[ "MIT" ]
1
2020-07-25T02:05:49.000Z
2020-07-25T02:05:49.000Z
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json from telemetry.page import page_test from telemetry.value import histogram_util from telemetry.value import scalar from telemetry.value import s...
33.767857
74
0.74881
import json from telemetry.page import page_test from telemetry.value import histogram_util from telemetry.value import scalar from telemetry.value import skip _NAME = 'V8.DetachedContextAgeInGC' _UNITS = 'garbage_collections' _DISPLAY_NAME = 'V8_DetachedContextAgeInGC' _TYPE = histogram_util.RENDERER_HISTOGRAM _DES...
true
true
1c10c1230413ebfc44d0bd16292ec23416a32970
196
py
Python
flopy/version.py
geowat/flopy
b6b110a8807e18dca9b0b7491db0a72b36709098
[ "CC0-1.0", "BSD-3-Clause" ]
1
2021-02-23T20:47:29.000Z
2021-02-23T20:47:29.000Z
flopy/version.py
anguanping/flopy
4a9ea1a8f47467239f40c67b6f6823a424a845df
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
flopy/version.py
anguanping/flopy
4a9ea1a8f47467239f40c67b6f6823a424a845df
[ "CC0-1.0", "BSD-3-Clause" ]
2
2020-01-03T17:14:39.000Z
2020-03-04T14:21:27.000Z
# flopy version file automatically created using...make-release.py # created on...June 01, 2019 09:53:47 major = 3 minor = 2 micro = 13 __version__ = '{:d}.{:d}.{:d}'.format(major, minor, micro)
24.5
66
0.678571
major = 3 minor = 2 micro = 13 __version__ = '{:d}.{:d}.{:d}'.format(major, minor, micro)
true
true
1c10c1eac8bdaed3b0e078d7fb3289a0160589e0
6,021
py
Python
test/new_tests/test_query_execute_background.py
jensengrey/aerospike-client-python
2242408f789c2f1521a1434bb39678c5e4034982
[ "Apache-2.0" ]
null
null
null
test/new_tests/test_query_execute_background.py
jensengrey/aerospike-client-python
2242408f789c2f1521a1434bb39678c5e4034982
[ "Apache-2.0" ]
null
null
null
test/new_tests/test_query_execute_background.py
jensengrey/aerospike-client-python
2242408f789c2f1521a1434bb39678c5e4034982
[ "Apache-2.0" ]
1
2021-08-02T22:30:21.000Z
2021-08-02T22:30:21.000Z
# -*- coding: utf-8 -*- import pytest import time import aerospike from aerospike import exception, predexp, predicates TEST_NS = 'test' TEST_SET = 'background' TEST_UDF_MODULE = 'query_apply' TEST_UDF_FUNCTION = 'mark_as_applied' # Hack to get long to exist in Python 3 try: long except NameError: long = int ...
35.417647
101
0.659857
import pytest import time import aerospike from aerospike import exception, predexp, predicates TEST_NS = 'test' TEST_SET = 'background' TEST_UDF_MODULE = 'query_apply' TEST_UDF_FUNCTION = 'mark_as_applied' try: long except NameError: long = int def add_indexes_to_client(client): try: client.inde...
true
true
1c10c2b378fe69da657c3171c0cdd9329a49a3aa
4,037
py
Python
plume/svm.py
KEVINYZY/plume
ae7b688d0d7b5f3dd5eeb975a302e8a5524d4255
[ "MIT" ]
22
2018-03-06T18:01:22.000Z
2020-11-09T16:17:02.000Z
plume/svm.py
liuslnlp/plume
dbd523861bfb9abad8a52b1de28de85c0f128807
[ "MIT" ]
null
null
null
plume/svm.py
liuslnlp/plume
dbd523861bfb9abad8a52b1de28de85c0f128807
[ "MIT" ]
21
2017-08-12T10:24:17.000Z
2020-11-27T03:15:30.000Z
""" 利用数值优化算法实现的 SVM,在 toysvm.py 中有对应的 SMO 算法实现。 """ import numpy as np import math import scipy.optimize as opt from functools import partial from numba import jit class LinearSVC(object): def __init__(self, C: float = 1.0): """ :param C: float. Penalty parameters. """ self.C = C ...
28.034722
101
0.515234
import numpy as np import math import scipy.optimize as opt from functools import partial from numba import jit class LinearSVC(object): def __init__(self, C: float = 1.0): self.C = C self.sign = np.vectorize(lambda x: 1 if x >= 0 else -1) def cal_weight(self) -> np.array: return sel...
true
true
1c10c3aca159c54b7d1fd3487d3236257baf82cb
6,736
py
Python
openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/pg_recvlogical/Opengauss_Function_Tools_pg_recvlogical_Case0017.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/pg_recvlogical/Opengauss_Function_Tools_pg_recvlogical_Case0017.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/pg_recvlogical/Opengauss_Function_Tools_pg_recvlogical_Case0017.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
42.632911
84
0.556265
import unittest from testcase.utils.Common import Common from testcase.utils.CommonSH import CommonSH from testcase.utils.Constant import Constant from testcase.utils.Logger import Logger from yat.test import Node from yat.test import macro class Tools(unittest.TestCase): def setUp(self): self.log = Logg...
true
true
1c10c4481c52a558c66a0821dfb12617d87b862f
12,293
py
Python
egs/wsj/s5/utils/nnet/make_nnet_proto.py
zweiein/kaldi-distilled
e5b045552c4008e5a3b1dbfa02d4eb3ca62ef9f9
[ "Apache-2.0" ]
null
null
null
egs/wsj/s5/utils/nnet/make_nnet_proto.py
zweiein/kaldi-distilled
e5b045552c4008e5a3b1dbfa02d4eb3ca62ef9f9
[ "Apache-2.0" ]
null
null
null
egs/wsj/s5/utils/nnet/make_nnet_proto.py
zweiein/kaldi-distilled
e5b045552c4008e5a3b1dbfa02d4eb3ca62ef9f9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014 Brno University of Technology (author: Karel Vesely) # 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...
52.534188
179
0.679818
import math, random, sys from optparse import OptionParser usage="%prog [options] <feat-dim> <num-leaves> <num-hid-layers> <num-hid-neurons> >nnet-proto-file" parser = OptionParser(usage) parser.add_option('--no-proto-head', dest='with_proto_head', help='Do not put <NnetProto> head-tag in the ...
false
true
1c10c4a52c122d07d582d072ef8d1f3b56ae5eec
21,208
py
Python
hbruraldoctor/hbvirtual/lib/python3.7/site-packages/Crypto/Util/RFC1751.py
hallohubo/DjangoDocterAPI
2d86d17c718affa968c0b2d4f9590aa08d43716e
[ "Apache-2.0" ]
64
2020-07-22T06:24:18.000Z
2022-03-27T10:48:15.000Z
Crypto/Util/RFC1751.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
12
2021-10-18T00:37:47.000Z
2022-03-09T01:35:20.000Z
Crypto/Util/RFC1751.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
17
2020-09-14T02:46:41.000Z
2022-03-01T09:52:33.000Z
# rfc1751.py : Converts between 128-bit strings and a human-readable # sequence of words, as defined in RFC1751: "A Convention for # Human-Readable 128-bit Keys", by Daniel L. McDonald. # # Part of the Python Cryptography Toolkit # # Written by Andrew M. Kuchling and others # # =========================================...
57.945355
94
0.489627
# Human-Readable 128-bit Keys", by Daniel L. McDonald. __revision__ = "$Id$" import binascii from Crypto.Util.py3compat import * from functools import reduce binary={0:'0000', 1:'0001', 2:'0010', 3:'0011', 4:'0100', 5:'0101', 6:'0110', 7:'0111', 8:'1000', 9:'1001', 10:'1010', 11:'1011', 12:'1100', 1...
true
true
1c10c54ae9c3ed75f15ce1ce291c2b6167b7c74d
12,328
py
Python
core/tests/reader_view_load_test.py
meydman/oppia
2cd0a516c31f0b94d8d9091533ef86c0b32c5dab
[ "Apache-2.0" ]
null
null
null
core/tests/reader_view_load_test.py
meydman/oppia
2cd0a516c31f0b94d8d9091533ef86c0b32c5dab
[ "Apache-2.0" ]
null
null
null
core/tests/reader_view_load_test.py
meydman/oppia
2cd0a516c31f0b94d8d9091533ef86c0b32c5dab
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
34.149584
79
0.615672
"""Performance test for the Oppia reader view. Before running this script, exploration 0 should be loaded in the target server. Run this script from the Oppia root directory: python core/tests/reader_view_load_test.py --thread_count=5 --start_uid=1 \ https://my-oppia-instance.appspot.com """ __author__ = ...
false
true
1c10c5a4b8fb04d72d9178d292df2c365bc7d9c9
10,493
py
Python
modeling/gfunc/plot/plot_p4m.py
tiesanguaixia/gconv-pytorch-deeplab-xception
009fad814b13622fd2027330df2f00d9a31d0594
[ "MIT" ]
null
null
null
modeling/gfunc/plot/plot_p4m.py
tiesanguaixia/gconv-pytorch-deeplab-xception
009fad814b13622fd2027330df2f00d9a31d0594
[ "MIT" ]
null
null
null
modeling/gfunc/plot/plot_p4m.py
tiesanguaixia/gconv-pytorch-deeplab-xception
009fad814b13622fd2027330df2f00d9a31d0594
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.patches import FancyArrowPatch from gfunc.plot.plot_z2 import plot_z2 # Miniature plot: # plot_p4m(imf.reshape(2, 4, 7, 7), rlabels='cayley2', fontsize=10, # labelpad_factor_1= .2, labelpad_factor_2=.8, labelpad_fac...
35.934932
175
0.60669
import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.patches import FancyArrowPatch from gfunc.plot.plot_z2 import plot_z2 def plot_p4m(f, fignum=None, rlabels='cayley_mr', rcolor='red', mcolor='blue', rlinestyle='-', mlinestyle='-', fontsize=20, labelpad_facto...
true
true
1c10c61a87153a171dc9417c95d58eeab1841018
643
py
Python
configs/_base_/det_models/drrg_r50_fpn_unet.py
HolyCrap96/mmocr-1
c6c4acd39b1c56fec1b87530b2d241fe8af4ceed
[ "Apache-2.0" ]
null
null
null
configs/_base_/det_models/drrg_r50_fpn_unet.py
HolyCrap96/mmocr-1
c6c4acd39b1c56fec1b87530b2d241fe8af4ceed
[ "Apache-2.0" ]
null
null
null
configs/_base_/det_models/drrg_r50_fpn_unet.py
HolyCrap96/mmocr-1
c6c4acd39b1c56fec1b87530b2d241fe8af4ceed
[ "Apache-2.0" ]
null
null
null
model = dict( type='DRRG', backbone=dict( type='mmdet.ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=-1, norm_cfg=dict(type='BN', requires_grad=True), init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50'), ...
29.227273
78
0.572317
model = dict( type='DRRG', backbone=dict( type='mmdet.ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=-1, norm_cfg=dict(type='BN', requires_grad=True), init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50'), ...
true
true
1c10c7790c317a5682e027c328219046c24f8fcb
1,320
py
Python
code/ellip_fit.py
ApeMocker/CSM-for-fetal-HC-measurement
a354d2ebd46eee6a3df11bf3fd413a340432c5b4
[ "MIT" ]
null
null
null
code/ellip_fit.py
ApeMocker/CSM-for-fetal-HC-measurement
a354d2ebd46eee6a3df11bf3fd413a340432c5b4
[ "MIT" ]
null
null
null
code/ellip_fit.py
ApeMocker/CSM-for-fetal-HC-measurement
a354d2ebd46eee6a3df11bf3fd413a340432c5b4
[ "MIT" ]
null
null
null
""" This script is used for ellipse fitting from edge images. Requirement: postprocess.py has been executed so edge images exist. """ import pandas as pd import os import cv2 from modules import ellip_fit import numpy as np # Postprocess results folder edge_folder = '../results/predictions_edge/' # To sa...
27.5
80
0.643939
import pandas as pd import os import cv2 from modules import ellip_fit import numpy as np edge_folder = '../results/predictions_edge/' results = [] name = ['filename', 'center_x(pixel)', 'center_y(pixel)', 'semi_axes_a(pixel)', 'semi_axes_b(pixel)', 'HC(pixel)', 'angle(rad)'] save_ellip_para_file...
true
true
1c10c8842446836f3dc79d154fd34845b5ad449b
1,603
py
Python
mozillians/users/migrations/0028_auto_20171024_0457.py
divyamoncy/mozillians
d53d1d05d1f05b74f8533541e37083dcb89b29a8
[ "BSD-3-Clause" ]
202
2015-01-14T10:19:55.000Z
2021-12-11T06:04:16.000Z
mozillians/users/migrations/0028_auto_20171024_0457.py
divyamoncy/mozillians
d53d1d05d1f05b74f8533541e37083dcb89b29a8
[ "BSD-3-Clause" ]
2,924
2015-01-07T11:27:32.000Z
2021-01-19T14:05:17.000Z
mozillians/users/migrations/0028_auto_20171024_0457.py
divyamoncy/mozillians
d53d1d05d1f05b74f8533541e37083dcb89b29a8
[ "BSD-3-Clause" ]
270
2015-01-02T18:31:01.000Z
2021-02-17T20:57:44.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import mozillians.users.models class Migration(migrations.Migration): dependencies = [ ('users', '0027_auto_20171020_0416'), ] operations = [ migrations.AddField( model_n...
34.847826
126
0.5864
from __future__ import unicode_literals from django.db import migrations, models import mozillians.users.models class Migration(migrations.Migration): dependencies = [ ('users', '0027_auto_20171020_0416'), ] operations = [ migrations.AddField( model_name='idpprofile', ...
true
true
1c10ca63b4f71d160e89276b9e430af5e3b81430
4,120
py
Python
utils/matrix_sqrt.py
milesgray/CALAE
a2ab2f7d9ee17cc6c24ff6ac370b0373537079ac
[ "Apache-2.0" ]
null
null
null
utils/matrix_sqrt.py
milesgray/CALAE
a2ab2f7d9ee17cc6c24ff6ac370b0373537079ac
[ "Apache-2.0" ]
null
null
null
utils/matrix_sqrt.py
milesgray/CALAE
a2ab2f7d9ee17cc6c24ff6ac370b0373537079ac
[ "Apache-2.0" ]
null
null
null
import argparse import torch import numpy as np import time as tm from torch.autograd import Variable # Compute error def compute_error(A, sA): normA = torch.sqrt(torch.sum(torch.sum(A * A, dim=1),dim=1)) error = A - torch.bmm(sA, sA) error = torch.sqrt((error * error).sum(dim=1).sum(dim=1)) / normA re...
37.798165
102
0.595146
import argparse import torch import numpy as np import time as tm from torch.autograd import Variable def compute_error(A, sA): normA = torch.sqrt(torch.sum(torch.sum(A * A, dim=1),dim=1)) error = A - torch.bmm(sA, sA) error = torch.sqrt((error * error).sum(dim=1).sum(dim=1)) / normA return torch.mean(...
true
true
1c10ca7bb4187823d6952e6c5182a912483bdc7e
543
py
Python
add_user.py
andy3092/flexlmmon
4f1ac8eb801e0bddfa3db82d73c1550ee0397d71
[ "MIT" ]
6
2016-04-21T08:20:32.000Z
2020-12-04T03:35:45.000Z
add_user.py
andy3092/flexlmmon
4f1ac8eb801e0bddfa3db82d73c1550ee0397d71
[ "MIT" ]
null
null
null
add_user.py
andy3092/flexlmmon
4f1ac8eb801e0bddfa3db82d73c1550ee0397d71
[ "MIT" ]
2
2020-07-27T10:50:58.000Z
2020-11-19T10:19:42.000Z
#!/usr/bin/env python2 from getpass import getpass from flexlm_app import User, db user = User() user_name = raw_input('Enter a user name [admin]:') if user_name == '': user_name = 'admin' user.username = user_name password1 = getpass('Enter password:') password2 = getpass('Renter password:') while password1 !...
21.72
51
0.710866
from getpass import getpass from flexlm_app import User, db user = User() user_name = raw_input('Enter a user name [admin]:') if user_name == '': user_name = 'admin' user.username = user_name password1 = getpass('Enter password:') password2 = getpass('Renter password:') while password1 != password2: print(...
true
true
1c10cabc6fe788df9519122ece29c8e34a47f471
2,306
py
Python
build/lib/vltk/adapters/coco2014.py
eltoto1219/vltk
e84c0efe9062eb864604d96345f71483816340aa
[ "Apache-2.0" ]
null
null
null
build/lib/vltk/adapters/coco2014.py
eltoto1219/vltk
e84c0efe9062eb864604d96345f71483816340aa
[ "Apache-2.0" ]
null
null
null
build/lib/vltk/adapters/coco2014.py
eltoto1219/vltk
e84c0efe9062eb864604d96345f71483816340aa
[ "Apache-2.0" ]
null
null
null
from collections import defaultdict from vltk.features import Features from vltk import adapters import vltk.vars as vltk class Coco2014(adapters.VisnDataset): @staticmethod def schema(): return { vltk.box: Features.Box(), vltk.polygons: Features.Polygons(), vltk....
35.476923
87
0.53209
from collections import defaultdict from vltk.features import Features from vltk import adapters import vltk.vars as vltk class Coco2014(adapters.VisnDataset): @staticmethod def schema(): return { vltk.box: Features.Box(), vltk.polygons: Features.Polygons(), vltk....
true
true
1c10cb1fce2aed2476fa9ed4caee55aeba1b6179
204
py
Python
schedulesy/apps/ade_legacy/admin.py
unistra/schedulesy
bcd8c42281013f02ecd5c89fba9b622f20e47761
[ "Apache-2.0" ]
1
2020-07-24T19:17:56.000Z
2020-07-24T19:17:56.000Z
schedulesy/apps/ade_legacy/admin.py
unistra/schedulesy
bcd8c42281013f02ecd5c89fba9b622f20e47761
[ "Apache-2.0" ]
1
2020-07-09T10:23:28.000Z
2020-07-09T10:23:28.000Z
schedulesy/apps/ade_legacy/admin.py
unistra/schedulesy
bcd8c42281013f02ecd5c89fba9b622f20e47761
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin # # Register your models here. from schedulesy.apps.ade_legacy.models import Customization @admin.register(Customization) class LegacyAdmin(admin.ModelAdmin): pass
20.4
59
0.803922
from django.contrib import admin from schedulesy.apps.ade_legacy.models import Customization @admin.register(Customization) class LegacyAdmin(admin.ModelAdmin): pass
true
true
1c10cb9ba3236ec9de60a6a8fe37e1a6c9b9e2c1
260
py
Python
instagram/wsgi.py
Brayonski/Instagram-1
7135f99d869d1e15310c02e73ca540ff8cacef18
[ "MIT" ]
6
2018-10-17T18:09:28.000Z
2020-09-25T19:30:47.000Z
instagram/wsgi.py
Brayonski/Instagram-1
7135f99d869d1e15310c02e73ca540ff8cacef18
[ "MIT" ]
4
2020-06-05T18:27:55.000Z
2021-09-07T23:53:10.000Z
instagram/wsgi.py
Brayonski/Instagram-1
7135f99d869d1e15310c02e73ca540ff8cacef18
[ "MIT" ]
11
2018-06-21T07:03:55.000Z
2019-07-29T06:59:25.000Z
import os from django.core.wsgi import get_wsgi_application from whitenoise.django import DjangoWhiteNoise os.environ.setdefault("DJANGO_SETTINGS_MODULE", "instagram.settings") application = get_wsgi_application() application = DjangoWhiteNoise(application)
28.888889
69
0.85
import os from django.core.wsgi import get_wsgi_application from whitenoise.django import DjangoWhiteNoise os.environ.setdefault("DJANGO_SETTINGS_MODULE", "instagram.settings") application = get_wsgi_application() application = DjangoWhiteNoise(application)
true
true
1c10cbf17afd45a883767fc01cbea4c38cc223e6
202
py
Python
fairseq/custom_transformer/fnet.py
nqbinh17/memo_track
4f6a749a1cca4368ef41b4cf70be6acdaa267b47
[ "MIT" ]
null
null
null
fairseq/custom_transformer/fnet.py
nqbinh17/memo_track
4f6a749a1cca4368ef41b4cf70be6acdaa267b47
[ "MIT" ]
null
null
null
fairseq/custom_transformer/fnet.py
nqbinh17/memo_track
4f6a749a1cca4368ef41b4cf70be6acdaa267b47
[ "MIT" ]
null
null
null
import torch.nn as nn import torch class FNet(nn.Module): def __init__(self): super().__init__() def forward(self, x): x = torch.fft.fft(torch.fft.fft(x, dim=-1), dim=-2).real return x
20.2
60
0.648515
import torch.nn as nn import torch class FNet(nn.Module): def __init__(self): super().__init__() def forward(self, x): x = torch.fft.fft(torch.fft.fft(x, dim=-1), dim=-2).real return x
true
true
1c10cc038ce09040e805a98931daf912c42ac6df
13,056
py
Python
vendors/rez-2.23.1-py2.7/rez/status.py
ColinKennedy/tk-config-default2-respawn
855fb8033daa549b92615792442f19a7f9c4f55c
[ "Linux-OpenIB" ]
4
2019-01-11T03:41:28.000Z
2019-09-12T06:57:17.000Z
vendors/rez-2.23.1-py2.7/rez/status.py
ColinKennedy/tk-config-default2-respawn
855fb8033daa549b92615792442f19a7f9c4f55c
[ "Linux-OpenIB" ]
null
null
null
vendors/rez-2.23.1-py2.7/rez/status.py
ColinKennedy/tk-config-default2-respawn
855fb8033daa549b92615792442f19a7f9c4f55c
[ "Linux-OpenIB" ]
2
2019-01-10T05:00:18.000Z
2020-02-15T16:32:56.000Z
import sys import os import os.path from fnmatch import fnmatch from rez import __version__ from rez.utils.data_utils import cached_property from rez.resolved_context import ResolvedContext from rez.packages_ import iter_packages, Package from rez.suite import Suite from rez.wrapper import Wrapper from rez.utils.colori...
33.562982
90
0.54519
import sys import os import os.path from fnmatch import fnmatch from rez import __version__ from rez.utils.data_utils import cached_property from rez.resolved_context import ResolvedContext from rez.packages_ import iter_packages, Package from rez.suite import Suite from rez.wrapper import Wrapper from rez.utils.colori...
true
true
1c10cc138460f35cfd4a88ba36d29283cfe93253
12,518
py
Python
server/contrib/analyze.py
chrononyan/ok
1c83e419dd8d5ef64c1e03a7f8a218e65a9fb7cf
[ "Apache-2.0" ]
148
2018-07-03T02:08:30.000Z
2022-03-26T04:03:35.000Z
server/contrib/analyze.py
chrononyan/ok
1c83e419dd8d5ef64c1e03a7f8a218e65a9fb7cf
[ "Apache-2.0" ]
856
2015-01-10T04:27:20.000Z
2018-06-27T14:43:23.000Z
server/contrib/analyze.py
chrononyan/ok
1c83e419dd8d5ef64c1e03a7f8a218e65a9fb7cf
[ "Apache-2.0" ]
69
2015-01-26T08:06:55.000Z
2018-06-25T12:46:03.000Z
import datetime from flask import url_for import pygal import server.highlight as highlight from server.extensions import cache ### Common Functions ### def _get_unique_backups(backups): """ Given a list of backups, only include backups that have changed. Returns a list of (backup, lines_changed) tuples AN...
36.284058
98
0.621745
import datetime from flask import url_for import pygal import server.highlight as highlight from server.extensions import cache def _get_unique_backups(backups): filtered = [] id_map = {} index_map = {} # maps from all kept backups to its index index = 1 first_file_found = False for i in range(...
true
true
1c10cde7fed9987626548963efa3ff0ba465a8d4
3,342
py
Python
m2-modified/ims/common/agentless-system-crawler/crawler/containers.py
CCI-MOC/ABMI
955c12ae9d2dc7afe7323f6c25f2af120f5b281a
[ "Apache-2.0" ]
108
2015-07-21T10:40:36.000Z
2021-07-01T06:54:51.000Z
m2-modified/ims/common/agentless-system-crawler/crawler/containers.py
CCI-MOC/ABMI
955c12ae9d2dc7afe7323f6c25f2af120f5b281a
[ "Apache-2.0" ]
320
2015-07-21T01:33:20.000Z
2020-07-21T15:57:02.000Z
m2-modified/ims/common/agentless-system-crawler/crawler/containers.py
CCI-MOC/ABMI
955c12ae9d2dc7afe7323f6c25f2af120f5b281a
[ "Apache-2.0" ]
61
2015-07-20T18:26:37.000Z
2021-03-17T01:18:54.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- import logging import container from utils import misc from dockercontainer import get_docker_containers, poll_docker_containers logger = logging.getLogger('crawlutils') def list_all_containers(user_list='ALL', host_namespace='', ignore_raw_container...
36.326087
79
0.687911
import logging import container from utils import misc from dockercontainer import get_docker_containers, poll_docker_containers logger = logging.getLogger('crawlutils') def list_all_containers(user_list='ALL', host_namespace='', ignore_raw_containers=True): visited_ns = set() for ...
true
true
1c10ce01e69d64138cb61397a713dc2638bbe262
149
py
Python
paper_result/ITSD/bicon/test/test.py
Zyun-Y/BiconNets
f5ea85dc58550969b99a2ccccccd8133dda4358c
[ "MIT" ]
9
2021-03-02T05:16:03.000Z
2022-02-01T07:47:00.000Z
paper_result/ITSD/bicon/test/test.py
Zyun-Y/BiconNets
f5ea85dc58550969b99a2ccccccd8133dda4358c
[ "MIT" ]
null
null
null
paper_result/ITSD/bicon/test/test.py
Zyun-Y/BiconNets
f5ea85dc58550969b99a2ccccccd8133dda4358c
[ "MIT" ]
2
2021-08-10T07:30:01.000Z
2021-11-22T03:01:50.000Z
from src import * def train(): L = Loader('train') E = Eval(L) TR = Trainer(L, E) TR.train() if __name__ == '__main__': train()
14.9
26
0.536913
from src import * def train(): L = Loader('train') E = Eval(L) TR = Trainer(L, E) TR.train() if __name__ == '__main__': train()
true
true
1c10ce2173b4476de2fe230ce312f85504bc5384
9,655
py
Python
src/cls_models/commons.py
tattaka/ukiyoe
4a1024ddf30737e68923dcdd6a50580d912e076d
[ "MIT" ]
10
2020-01-14T07:59:13.000Z
2021-08-31T02:46:45.000Z
src/cls_models/commons.py
tattaka/ukiyoe
4a1024ddf30737e68923dcdd6a50580d912e076d
[ "MIT" ]
null
null
null
src/cls_models/commons.py
tattaka/ukiyoe
4a1024ddf30737e68923dcdd6a50580d912e076d
[ "MIT" ]
null
null
null
import numpy as np import torch from torch import nn import torch.nn.functional as F class Swish(nn.Module): def forward(self, x): return x * torch.sigmoid(x) class MishFunction(torch.autograd.Function): @staticmethod def forward(ctx, x): ctx.save_for_backward(x) return x * tor...
39.569672
142
0.578664
import numpy as np import torch from torch import nn import torch.nn.functional as F class Swish(nn.Module): def forward(self, x): return x * torch.sigmoid(x) class MishFunction(torch.autograd.Function): @staticmethod def forward(ctx, x): ctx.save_for_backward(x) return x * tor...
true
true
1c10ce60247554a61b0b5d48488c8c6ceac709b6
2,149
py
Python
start.py
gleenn/dfplayer
dd390a6f54b3bd8b2a3397fddd6caacfba01b29d
[ "MIT" ]
null
null
null
start.py
gleenn/dfplayer
dd390a6f54b3bd8b2a3397fddd6caacfba01b29d
[ "MIT" ]
null
null
null
start.py
gleenn/dfplayer
dd390a6f54b3bd8b2a3397fddd6caacfba01b29d
[ "MIT" ]
null
null
null
#!/usr/bin/python # # Start dfplayer. import argparse import os import shutil import subprocess import sys import time _PROJ_DIR = os.path.dirname(__file__) def main(): os.chdir(_PROJ_DIR) os.environ['LD_LIBRARY_PATH'] = '/lib:/usr/lib:/usr/local/lib' arg_parser = argparse.ArgumentParser(description='Star...
28.653333
76
0.68497
import argparse import os import shutil import subprocess import sys import time _PROJ_DIR = os.path.dirname(__file__) def main(): os.chdir(_PROJ_DIR) os.environ['LD_LIBRARY_PATH'] = '/lib:/usr/lib:/usr/local/lib' arg_parser = argparse.ArgumentParser(description='Start player') arg_parser.add_argument('...
false
true
1c10cf6913325724db5b240e54d34a3350b8c1b9
2,003
py
Python
setup.py
mastratton3/great_expectations
151970d776c942bfc23cdd90c7ed00b57a34559d
[ "Apache-2.0" ]
null
null
null
setup.py
mastratton3/great_expectations
151970d776c942bfc23cdd90c7ed00b57a34559d
[ "Apache-2.0" ]
null
null
null
setup.py
mastratton3/great_expectations
151970d776c942bfc23cdd90c7ed00b57a34559d
[ "Apache-2.0" ]
null
null
null
from setuptools import setup, find_packages # Parse requirements.txt with open('requirements.txt') as f: required = f.read().splitlines() try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (IOError, ImportError): long_description = 'Always know what to expect from your...
37.092593
152
0.644034
from setuptools import setup, find_packages with open('requirements.txt') as f: required = f.read().splitlines() try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (IOError, ImportError): long_description = 'Always know what to expect from your data. (See https://githu...
true
true
1c10cf749ac4dd76d3cafb0ffc0c2d5f088d1669
2,334
py
Python
DeliveryProblem/branch_and_bound.py
spitefulowl/itfdm
c6167ab6451fbdd583b808edcb0c63e785f0770a
[ "MIT" ]
null
null
null
DeliveryProblem/branch_and_bound.py
spitefulowl/itfdm
c6167ab6451fbdd583b808edcb0c63e785f0770a
[ "MIT" ]
null
null
null
DeliveryProblem/branch_and_bound.py
spitefulowl/itfdm
c6167ab6451fbdd583b808edcb0c63e785f0770a
[ "MIT" ]
null
null
null
from utils import get_descendants min_upper_bound = 9999999 min_upper_bound_item = None class BranchAndBound(): @staticmethod def _check_vertices(current_vertices, current_vertex, descendants, lower_bound, upper_bound): global min_upper_bound global min_upper_bound_item min_upper_bound...
40.947368
115
0.653385
from utils import get_descendants min_upper_bound = 9999999 min_upper_bound_item = None class BranchAndBound(): @staticmethod def _check_vertices(current_vertices, current_vertex, descendants, lower_bound, upper_bound): global min_upper_bound global min_upper_bound_item min_upper_bound...
true
true
1c10cf88830da4622a6aabe6b723d3a1d57d190f
4,604
py
Python
tests/resources/helper_functions.py
ilyabukalov/squid-py
3b9c323089351c20bf4a4e8be1e47031bd01d4ea
[ "Apache-2.0" ]
null
null
null
tests/resources/helper_functions.py
ilyabukalov/squid-py
3b9c323089351c20bf4a4e8be1e47031bd01d4ea
[ "Apache-2.0" ]
null
null
null
tests/resources/helper_functions.py
ilyabukalov/squid-py
3b9c323089351c20bf4a4e8be1e47031bd01d4ea
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Ocean Protocol Foundation # SPDX-License-Identifier: Apache-2.0 import json import os import pathlib import uuid import logging import logging.config import coloredlogs import yaml from ocean_keeper.utils import get_account from ocean_utils.ddo.ddo import DDO from squid_py.brizo.brizo_provider imp...
29.703226
94
0.706125
import json import os import pathlib import uuid import logging import logging.config import coloredlogs import yaml from ocean_keeper.utils import get_account from ocean_utils.ddo.ddo import DDO from squid_py.brizo.brizo_provider import BrizoProvider from squid_py.ocean.keeper import SquidKeeper as Keeper from squi...
true
true
1c10cf89b8291241bd18c0e95308b15721b1b58a
5,304
py
Python
pylearn2/datasets/stl10.py
harmdevries89/pylearn2
f0fc7ddc6fe8db0ff264c189980dca62529b8edb
[ "BSD-3-Clause" ]
3
2016-01-23T10:18:39.000Z
2019-02-28T06:22:45.000Z
pylearn2/datasets/stl10.py
kastnerkyle/pylearn2
f0fc7ddc6fe8db0ff264c189980dca62529b8edb
[ "BSD-3-Clause" ]
null
null
null
pylearn2/datasets/stl10.py
kastnerkyle/pylearn2
f0fc7ddc6fe8db0ff264c189980dca62529b8edb
[ "BSD-3-Clause" ]
null
null
null
""" .. todo:: WRITEME """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" import numpy as np from pylearn2.datasets import dense_design_matri...
31.951807
79
0.565611
__authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" import numpy as np from pylearn2.datasets import dense_design_matrix from pylearn2.utils.serial im...
true
true
1c10cfc22d2148d3302d85152df36f860a165eea
1,831
py
Python
Trabalho Final/src/user.py
Eduardodsb/Sistemas-Distribuidos
7c4ef3ef7cc10782319d9ff8703fcbe2e5098d35
[ "MIT" ]
null
null
null
Trabalho Final/src/user.py
Eduardodsb/Sistemas-Distribuidos
7c4ef3ef7cc10782319d9ff8703fcbe2e5098d35
[ "MIT" ]
null
null
null
Trabalho Final/src/user.py
Eduardodsb/Sistemas-Distribuidos
7c4ef3ef7cc10782319d9ff8703fcbe2e5098d35
[ "MIT" ]
null
null
null
class User: def __init__(self, userName, password, ownChannels = [], subscribedChannels = []): self._userName = userName self._password = password self._ownChannels = ownChannels self._subscribedChannels = subscribedChannels def __str__(s...
34.54717
183
0.645003
class User: def __init__(self, userName, password, ownChannels = [], subscribedChannels = []): self._userName = userName self._password = password self._ownChannels = ownChannels self._subscribedChannels = subscribedChannels def __str__(s...
true
true
1c10d001f78ff2dcca3cd5920fb0408d1b0ad32c
335
py
Python
practices/ch07_data_structures/#Chapter 7 practice problem.py
bbergeroff/python-for-absolute-beginners-course
a3c654c6064d7a0c4c5a5188c77e4c2e5b789710
[ "MIT" ]
null
null
null
practices/ch07_data_structures/#Chapter 7 practice problem.py
bbergeroff/python-for-absolute-beginners-course
a3c654c6064d7a0c4c5a5188c77e4c2e5b789710
[ "MIT" ]
null
null
null
practices/ch07_data_structures/#Chapter 7 practice problem.py
bbergeroff/python-for-absolute-beginners-course
a3c654c6064d7a0c4c5a5188c77e4c2e5b789710
[ "MIT" ]
null
null
null
#Chapter 7 practice problem d = { "Sam": 7, 'rolls': ['rock', 'paper', 'scissors'], 'done': True } print(d["Sam"]) # outputs 7 print(d['rolls']) # outputs ['rock', 'paper', 'scissors'] print(d.get('Sarah')) # outputs None print(d.get('Jeff', -1)) # outputs -1 print(d['done']) ...
25.769231
64
0.531343
d = { "Sam": 7, 'rolls': ['rock', 'paper', 'scissors'], 'done': True } print(d["Sam"]) print(d['rolls']) print(d.get('Sarah')) print(d.get('Jeff', -1)) print(d['done'])
true
true
1c10d06ab77f2329da2d891c392c99b6d0ac4d77
42,888
py
Python
lib/galaxy/datatypes/genetics.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/datatypes/genetics.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
6
2021-11-11T20:57:49.000Z
2021-12-10T15:30:33.000Z
lib/galaxy/datatypes/genetics.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
""" rgenetics datatypes Use at your peril Ross Lazarus for the rgenetics and galaxy projects genome graphs datatypes derived from Interval datatypes genome graphs datasets have a header row with appropriate columnames The first column is always the marker - eg columname = rs, first row= rs12345 if the rows are snps su...
34.448193
145
0.574823
import logging import os import re import sys from urllib.parse import quote_plus from markupsafe import escape from galaxy.datatypes import metadata from galaxy.datatypes.data import ( DatatypeValidation, Text, ) from galaxy.datatypes.metadata import MetadataElement from galaxy.datatypes.sniff import ( b...
true
true
1c10d0f4581b83acccb49b88f3e16bac62d1f957
502
py
Python
bintodec.py
jeppard/infotrainer
6ee7083cb7c32f920e34143e710a99bc083ac25d
[ "MIT" ]
null
null
null
bintodec.py
jeppard/infotrainer
6ee7083cb7c32f920e34143e710a99bc083ac25d
[ "MIT" ]
25
2018-02-16T09:51:17.000Z
2018-10-07T17:07:25.000Z
bintodec.py
jeppard/infotrainer
6ee7083cb7c32f920e34143e710a99bc083ac25d
[ "MIT" ]
30
2018-03-01T15:38:00.000Z
2018-03-20T08:52:56.000Z
import random def machebinaer(): s="" for i in range(random.randint(8,10)): s=s+str(random.randint(0,1)) return s def bintodec_calc(x): aus="" dec=0 for i in range(len(x)): if x[::-1][i]=="1": aus=aus+str(2**i)+" + " aus=aus[0:-3] aus=aus+" = "+ str(int(x, 2)...
22.818182
61
0.553785
import random def machebinaer(): s="" for i in range(random.randint(8,10)): s=s+str(random.randint(0,1)) return s def bintodec_calc(x): aus="" dec=0 for i in range(len(x)): if x[::-1][i]=="1": aus=aus+str(2**i)+" + " aus=aus[0:-3] aus=aus+" = "+ str(int(x, 2)...
true
true
1c10d17ce88e19f55d3e59ad9e15c1bfc1506e1f
1,865
py
Python
TeamIdea/ABAP_dev/Programming/task3a.py
stanislav-kudriavtsev/Test-Tasks
fc0c26eb7afc995b48897861554512a8412a6ef3
[ "CC0-1.0" ]
null
null
null
TeamIdea/ABAP_dev/Programming/task3a.py
stanislav-kudriavtsev/Test-Tasks
fc0c26eb7afc995b48897861554512a8412a6ef3
[ "CC0-1.0" ]
null
null
null
TeamIdea/ABAP_dev/Programming/task3a.py
stanislav-kudriavtsev/Test-Tasks
fc0c26eb7afc995b48897861554512a8412a6ef3
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Задача. Разработать программу, которая будет отправлять запрос к сервису прогноза погоды https://openweathermap.org/ с использованием бесплатного плана (Free, требует регистрации на сайте) и на основании полученных данных выводить следующую информацию: 1. Максим...
29.140625
73
0.689544
from datetime import datetime from json import dump from pyowm import OWM from pyowm.utils.config import get_config_from ANS_FILE = "./task3a_answer_{date}.json" if __name__ == "__main__": config = get_config_from("./task3a.json") owm = OWM(config["key"], config) reg = owm.city_id_registry() ...
true
true
1c10d18f55cd9be8e8a93f5a1652e53d713fc5ed
1,166
py
Python
src/productsapi/dataservice.py
AzureAdvocateBit/contosocrafts-fastapi-1
1473c3c1e0ca8be8235b3dc26b47a9db00a31c62
[ "MIT" ]
1
2022-03-02T11:06:27.000Z
2022-03-02T11:06:27.000Z
src/productsapi/dataservice.py
AzureAdvocateBit/contosocrafts-fastapi-1
1473c3c1e0ca8be8235b3dc26b47a9db00a31c62
[ "MIT" ]
null
null
null
src/productsapi/dataservice.py
AzureAdvocateBit/contosocrafts-fastapi-1
1473c3c1e0ca8be8235b3dc26b47a9db00a31c62
[ "MIT" ]
2
2020-11-13T17:37:57.000Z
2020-11-13T20:45:48.000Z
from typing import Optional from motor.motor_asyncio import AsyncIOMotorClient, AsyncIOMotorCollection import asyncio import os MAX_PAGE_RETURN = 20 mongo_connection_str = os.environ.get( 'MONGO_CONNECTION', 'mongodb://admin:admin@localhost:27017') _client: AsyncIOMotorClient = None _products_db = None _products...
26.5
78
0.738422
from typing import Optional from motor.motor_asyncio import AsyncIOMotorClient, AsyncIOMotorCollection import asyncio import os MAX_PAGE_RETURN = 20 mongo_connection_str = os.environ.get( 'MONGO_CONNECTION', 'mongodb://admin:admin@localhost:27017') _client: AsyncIOMotorClient = None _products_db = None _products...
true
true
1c10d28598c003326038d83910cb1a42009680a6
10,588
py
Python
python/ray/_private/runtime_env.py
ingambe/ray
6c3d21d1ab76ff5c22e997e8dc1c3e183131ed00
[ "Apache-2.0" ]
null
null
null
python/ray/_private/runtime_env.py
ingambe/ray
6c3d21d1ab76ff5c22e997e8dc1c3e183131ed00
[ "Apache-2.0" ]
3
2021-12-25T08:13:51.000Z
2022-03-12T08:10:28.000Z
python/ray/_private/runtime_env.py
ingambe/ray
6c3d21d1ab76ff5c22e997e8dc1c3e183131ed00
[ "Apache-2.0" ]
null
null
null
import hashlib import logging import inspect from filelock import FileLock from pathlib import Path from zipfile import ZipFile from ray.job_config import JobConfig from enum import Enum from ray.experimental import internal_kv from ray.core.generated.common_pb2 import RuntimeEnv from typing import List, Tuple from ty...
35.059603
79
0.670948
import hashlib import logging import inspect from filelock import FileLock from pathlib import Path from zipfile import ZipFile from ray.job_config import JobConfig from enum import Enum from ray.experimental import internal_kv from ray.core.generated.common_pb2 import RuntimeEnv from typing import List, Tuple from ty...
true
true
1c10d31bb52ef9f4bf78c1a771a73ec3e9bcef6e
5,282
py
Python
cirq-core/cirq/devices/noise_properties.py
augustehirth/Cirq
e616710a0fa243524a9f6d7bc0d35e6b952fe3d0
[ "Apache-2.0" ]
null
null
null
cirq-core/cirq/devices/noise_properties.py
augustehirth/Cirq
e616710a0fa243524a9f6d7bc0d35e6b952fe3d0
[ "Apache-2.0" ]
null
null
null
cirq-core/cirq/devices/noise_properties.py
augustehirth/Cirq
e616710a0fa243524a9f6d7bc0d35e6b952fe3d0
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
39.714286
97
0.669822
import abc from typing import Iterable, Sequence, TYPE_CHECKING, List from cirq import _compat, _import, ops, protocols, devices from cirq.devices.noise_utils import ( PHYSICAL_GATE_TAG, ) circuits = _import.LazyLoader("circuits", globals(), "cirq.circuits.circuit") if TYPE_CHECKING: import cirq class No...
true
true
1c10d35c411d435da71a5e2759d0ccb71b8a7c9b
259
py
Python
tests/legacy/test_mpi.py
EEmGuzman/orphics
f8f25f9db7c9104dba5cbeaac0b4924bf4f6920e
[ "BSD-2-Clause" ]
10
2018-01-12T16:12:11.000Z
2021-02-11T18:46:47.000Z
tests/legacy/test_mpi.py
EEmGuzman/orphics
f8f25f9db7c9104dba5cbeaac0b4924bf4f6920e
[ "BSD-2-Clause" ]
20
2016-11-17T20:20:53.000Z
2021-02-02T10:08:38.000Z
tests/legacy/test_mpi.py
EEmGuzman/orphics
f8f25f9db7c9104dba5cbeaac0b4924bf4f6920e
[ "BSD-2-Clause" ]
17
2017-04-28T23:28:16.000Z
2021-08-15T20:28:25.000Z
from orphics.tools.mpi import MPI import os # Get MPI comm comm = MPI.COMM_WORLD rank = comm.Get_rank() numcores = comm.Get_size() print(("rank ", rank , " says hello world")) if rank==0: print(('OMP_NUM_THREADS: ', os.environ['OMP_NUM_THREADS']))
19.923077
63
0.683398
from orphics.tools.mpi import MPI import os comm = MPI.COMM_WORLD rank = comm.Get_rank() numcores = comm.Get_size() print(("rank ", rank , " says hello world")) if rank==0: print(('OMP_NUM_THREADS: ', os.environ['OMP_NUM_THREADS']))
true
true
1c10d4746c0c9a48d50108eb0daccbcdab6539ee
4,698
py
Python
docs/samples/started/oldway/docs/conf.py
cecedille1/paver
ba025245a8742da5ca0e795388d9702e932fec04
[ "BSD-3-Clause" ]
270
2015-01-10T01:00:09.000Z
2022-03-13T21:05:27.000Z
docs/samples/started/oldway/docs/conf.py
cecedille1/paver
ba025245a8742da5ca0e795388d9702e932fec04
[ "BSD-3-Clause" ]
84
2015-02-10T18:45:25.000Z
2021-06-21T14:55:33.000Z
docs/samples/started/oldway/docs/conf.py
cecedille1/paver
ba025245a8742da5ca0e795388d9702e932fec04
[ "BSD-3-Clause" ]
37
2015-03-26T14:05:33.000Z
2022-03-22T12:32:19.000Z
# -*- coding: utf-8 -*- # # The Old Way documentation build configuration file, created by # sphinx-quickstart on Sun May 4 14:02:06 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pic...
31.32
87
0.727118
# that aren't pickleable (module imports are okay, they're removed automatically). # # All configuration values have a default value; values that are commented out # serve to show the default value. import sys, os # If your extensions are in another directory, add it here. If the directory # is relative to the docume...
true
true
1c10d49ecef511343505f683ebfc8f7419619265
4,277
py
Python
tg_bot/modules/reactions.py
shubhanshdj/AlexaRobot
8a94c1f81df10efa7e5208572154794a097117ea
[ "MIT" ]
1
2020-11-30T10:14:15.000Z
2020-11-30T10:14:15.000Z
tg_bot/modules/reactions.py
shubhanshdj/AlexaRobot
8a94c1f81df10efa7e5208572154794a097117ea
[ "MIT" ]
null
null
null
tg_bot/modules/reactions.py
shubhanshdj/AlexaRobot
8a94c1f81df10efa7e5208572154794a097117ea
[ "MIT" ]
2
2020-11-25T14:27:25.000Z
2020-11-25T15:24:21.000Z
import random from telegram import Bot, Update from telegram.ext import run_async from tg_bot import dispatcher from tg_bot.modules.disable import DisableAbleCommandHandler reactions = [ "( ͡° ͜ʖ ͡°)", "( . •́ _ʖ •̀ .)", "( ಠ ͜ʖ ಠ)", "( ͡ ͜ʖ ͡ )", "(ʘ ͜ʖ ʘ)", "ヾ(´〇`)ノ♪♪♪", "ヽ(o´∀`)ノ♪♬", ...
18.122881
60
0.216039
import random from telegram import Bot, Update from telegram.ext import run_async from tg_bot import dispatcher from tg_bot.modules.disable import DisableAbleCommandHandler reactions = [ "( ͡° ͜ʖ ͡°)", "( . •́ _ʖ •̀ .)", "( ಠ ͜ʖ ಠ)", "( ͡ ͜ʖ ͡ )", "(ʘ ͜ʖ ʘ)", "ヾ(´〇`)ノ♪♪♪", "ヽ(o´∀`)ノ♪♬", ...
true
true
1c10d580e12c0a0817e9391fd8321b519f305fca
13,830
py
Python
neko/modules/quotly.py
itzrexmodz/Carla-1
c775063a0ef0d144649ace6f428c37e6e8d2c092
[ "MIT" ]
4
2021-12-26T11:42:45.000Z
2021-12-27T05:18:17.000Z
neko/modules/quotly.py
itzrexmodz/Carla-1
c775063a0ef0d144649ace6f428c37e6e8d2c092
[ "MIT" ]
null
null
null
neko/modules/quotly.py
itzrexmodz/Carla-1
c775063a0ef0d144649ace6f428c37e6e8d2c092
[ "MIT" ]
7
2021-12-26T14:49:37.000Z
2022-01-31T09:32:07.000Z
import base64 from requests import post from telethon.tl.types import Channel, User from ..utils import Cbot colors = [ "red", "green", "yellow", "orange", "violet", "indigo", "lightgreen", "tomato", "coral", "darkred", "gold", "lime", "darkgreen", "skyblue", ...
36.490765
81
0.350615
import base64 from requests import post from telethon.tl.types import Channel, User from ..utils import Cbot colors = [ "red", "green", "yellow", "orange", "violet", "indigo", "lightgreen", "tomato", "coral", "darkred", "gold", "lime", "darkgreen", "skyblue", ...
true
true
1c10d62f40b87a8468ccdd3f500fc5ac68abc2af
476
py
Python
setup.py
VolodyaEsk/flask_accepts
4cd6a99c0758ac7da655112c5b4f197612f4f1e8
[ "BSD-3-Clause" ]
null
null
null
setup.py
VolodyaEsk/flask_accepts
4cd6a99c0758ac7da655112c5b4f197612f4f1e8
[ "BSD-3-Clause" ]
null
null
null
setup.py
VolodyaEsk/flask_accepts
4cd6a99c0758ac7da655112c5b4f197612f4f1e8
[ "BSD-3-Clause" ]
1
2021-01-04T03:14:23.000Z
2021-01-04T03:14:23.000Z
# Copyright Alan (AJ) Pryor, Jr. 2018 from setuptools import setup, find_packages setup( name="flask_accepts", author='Alan "AJ" Pryor, Jr.', author_email="apryor6@gmail.com", version="0.15.4", description="Easy, opinionated Flask input/output handling with Flask-RESTplus and Marshmallow"...
26.444444
101
0.636555
from setuptools import setup, find_packages setup( name="flask_accepts", author='Alan "AJ" Pryor, Jr.', author_email="apryor6@gmail.com", version="0.15.4", description="Easy, opinionated Flask input/output handling with Flask-RESTplus and Marshmallow", ext_modules=[], packages=fi...
true
true
1c10d6f3cff1e6b918712f08f98206148134bc14
379
py
Python
Informatics/Reinforcement Learning/Practical RL - HSE/week2_model_based/mdp_get_action_value.py
MarcosSalib/Cocktail_MOOC
46279c2ec642554537c639702ed8e540ea49afdf
[ "MIT" ]
null
null
null
Informatics/Reinforcement Learning/Practical RL - HSE/week2_model_based/mdp_get_action_value.py
MarcosSalib/Cocktail_MOOC
46279c2ec642554537c639702ed8e540ea49afdf
[ "MIT" ]
null
null
null
Informatics/Reinforcement Learning/Practical RL - HSE/week2_model_based/mdp_get_action_value.py
MarcosSalib/Cocktail_MOOC
46279c2ec642554537c639702ed8e540ea49afdf
[ "MIT" ]
null
null
null
def get_action_value(mdp, state_values, state, action, gamma): """ Computes Q(s,a) as in formula above """ q = 0 for state_ in mdp.get_next_states(state, action): prob = mdp.get_transition_prob(state, action, state_) reward = mdp.get_reward(state, action, state_) q += prob ...
31.583333
63
0.630607
def get_action_value(mdp, state_values, state, action, gamma): q = 0 for state_ in mdp.get_next_states(state, action): prob = mdp.get_transition_prob(state, action, state_) reward = mdp.get_reward(state, action, state_) q += prob * (reward + (gamma*state_values[state_])) ...
true
true
1c10d751de8b245fd29512aa90e1a366be4df4cf
4,818
py
Python
mani_skill_learn/utils/meta/registry.py
art-e-fact/ManiSkill-Learn
9742da932448a5234222cf94381ca0f861dc83fd
[ "Apache-2.0" ]
39
2021-07-29T05:59:20.000Z
2022-03-25T06:32:51.000Z
mani_skill_learn/utils/meta/registry.py
art-e-fact/ManiSkill-Learn
9742da932448a5234222cf94381ca0f861dc83fd
[ "Apache-2.0" ]
27
2021-08-04T03:37:03.000Z
2022-03-08T06:18:25.000Z
mani_skill_learn/utils/meta/registry.py
art-e-fact/ManiSkill-Learn
9742da932448a5234222cf94381ca0f861dc83fd
[ "Apache-2.0" ]
5
2021-08-24T14:21:06.000Z
2022-02-21T04:31:01.000Z
import inspect from ..data.type import is_str class Registry: """A registry to map strings to classes. Args: name (str): Registry name. """ def __init__(self, name): self._name = name self._module_dict = dict() def __len__(self): return len(self._module_dict) ...
36.225564
112
0.617476
import inspect from ..data.type import is_str class Registry: def __init__(self, name): self._name = name self._module_dict = dict() def __len__(self): return len(self._module_dict) def __contains__(self, key): return self.get(key) is not None def __repr__(self): ...
true
true
1c10d7a59ef6bff66c276c0d1f7c6e53f73ce440
1,039
py
Python
tests/components/devolo_home_network/__init__.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/devolo_home_network/__init__.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
tests/components/devolo_home_network/__init__.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for the devolo Home Network integration.""" import dataclasses from typing import Any from devolo_plc_api.device_api.deviceapi import DeviceApi from devolo_plc_api.plcnet_api.plcnetapi import PlcNetApi from homeassistant.components.devolo_home_network.const import DOMAIN from homeassistant.const import CONF...
30.558824
73
0.776708
import dataclasses from typing import Any from devolo_plc_api.device_api.deviceapi import DeviceApi from devolo_plc_api.plcnet_api.plcnetapi import PlcNetApi from homeassistant.components.devolo_home_network.const import DOMAIN from homeassistant.const import CONF_IP_ADDRESS from homeassistant.core import HomeAssist...
true
true
1c10d992eb85425df71376e15dd676bb1e05253a
17,195
py
Python
pyFAI/opencl/OCLFullSplit.py
tacaswell/pyFAI
fd63c7d9ba35e687ef5c4ec717c01bf46564572a
[ "MIT" ]
45
2016-07-16T19:43:47.000Z
2022-03-12T16:53:47.000Z
pyFAI/opencl/OCLFullSplit.py
tacaswell/pyFAI
fd63c7d9ba35e687ef5c4ec717c01bf46564572a
[ "MIT" ]
1,125
2016-06-09T07:47:57.000Z
2022-03-31T20:34:00.000Z
pyFAI/opencl/OCLFullSplit.py
tacaswell/pyFAI
fd63c7d9ba35e687ef5c4ec717c01bf46564572a
[ "MIT" ]
52
2016-06-09T07:30:46.000Z
2022-02-14T08:25:11.000Z
# -*- coding: utf-8 -*- # # Project: Azimuthal integration # https://github.com/silx-kit/pyFAI # # # Copyright (C) 2014-2018 European Synchrotron Radiation Facility, Grenoble, France # # Principal author: Jérôme Kieffer (Jerome.Kieffer@ESRF.eu) # Giannis Ashiotis # ...
47.239011
225
0.5697
__authors__ = ["Jérôme Kieffer", "Giannis Ashiotis"] __license__ = "MIT" __date__ = "20/01/2021" __copyright__ = "2014, ESRF, Grenoble" __contact__ = "jerome.kieffer@esrf.fr" import os import logging import threading import numpy from . import ocl, pyopencl from ..ext.splitBBoxLUT import HistoBBox1d if pyopencl: ...
true
true
1c10dd5386c2e9d3d91534931965735b13f240a1
3,801
py
Python
docs/source/conf.py
TRoboto/Maha
f229adbb1dcccb6bf8f84852723d24f97d511b24
[ "BSD-3-Clause" ]
152
2021-09-18T08:18:47.000Z
2022-03-14T13:23:17.000Z
docs/source/conf.py
TRoboto/Maha
f229adbb1dcccb6bf8f84852723d24f97d511b24
[ "BSD-3-Clause" ]
65
2021-09-20T06:00:41.000Z
2022-03-20T22:44:39.000Z
docs/source/conf.py
TRoboto/Maha
f229adbb1dcccb6bf8f84852723d24f97d511b24
[ "BSD-3-Clause" ]
10
2021-09-18T11:56:57.000Z
2021-11-20T09:05:16.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
31.413223
79
0.652986
import os import sys sys.path.insert(0, os.path.abspath("../..")) project = "Maha" copyright = "2021, Mohammad Al-Fetyani" author = "Mohammad Al-Fetyani" extensions = [ "sphinx.ext.autodoc", "sphinx_copybutton", "sphinx.ext.viewcode", "sphinx.ext.napoleon", "sphinx.ext.autosummary", "sp...
true
true