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
1c0902a5b67e49d1a6918a2739ac88fdbafb2304
21,461
py
Python
Common/pc_util.py
qapture/Dis-PU
539abcfb507af38fa6e7e881db9ab8193a1a8ab7
[ "Apache-2.0" ]
41
2021-03-04T02:40:51.000Z
2022-03-30T03:39:17.000Z
Common/pc_util.py
qapture/Dis-PU
539abcfb507af38fa6e7e881db9ab8193a1a8ab7
[ "Apache-2.0" ]
9
2021-03-22T09:23:37.000Z
2022-03-05T08:20:57.000Z
Common/pc_util.py
qapture/Dis-PU
539abcfb507af38fa6e7e881db9ab8193a1a8ab7
[ "Apache-2.0" ]
6
2021-05-15T03:19:48.000Z
2022-02-21T22:57:47.000Z
""" Utility functions for processing point clouds. Author: Charles R. Qi, Hao Su Date: November 2016 """ import os import sys from matplotlib import pyplot as plt from matplotlib import cm from mpl_toolkits.mplot3d import Axes3D from open3d import * import open3d from sklearn.neighbors import NearestNeighbors BASE_D...
36.251689
134
0.607241
import os import sys from matplotlib import pyplot as plt from matplotlib import cm from mpl_toolkits.mplot3d import Axes3D from open3d import * import open3d from sklearn.neighbors import NearestNeighbors BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) from Common.eulerangles import ...
true
true
1c0902ae30c32fba2b981935d5c4698006dfb342
6,780
py
Python
mars/deploy/oscar/tests/test_fault_injection.py
zebivy/mars
edefba4e9217d614056d7f575e3c2bf63cc8cbda
[ "Apache-2.0" ]
null
null
null
mars/deploy/oscar/tests/test_fault_injection.py
zebivy/mars
edefba4e9217d614056d7f575e3c2bf63cc8cbda
[ "Apache-2.0" ]
null
null
null
mars/deploy/oscar/tests/test_fault_injection.py
zebivy/mars
edefba4e9217d614056d7f575e3c2bf63cc8cbda
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
37.252747
108
0.678171
import os import pytest import numpy as np import mars.tensor as mt from mars.remote import spawn from mars.deploy.oscar.local import new_cluster from mars.deploy.oscar.session import get_default_async_session from mars.oscar.errors import ServerClosed from mars.services.tests.fault_injection_manager import ( Fau...
true
true
1c090353d4aec8df42a14608059801f384208294
3,567
py
Python
accera/python/accera/lang/Layout.py
microsoft/Accera
4ec583857853cfb318634aef9e671f73cedba662
[ "MIT" ]
19
2022-01-26T18:12:54.000Z
2022-03-25T10:37:21.000Z
accera/python/accera/lang/Layout.py
microsoft/Accera
4ec583857853cfb318634aef9e671f73cedba662
[ "MIT" ]
4
2022-01-28T00:31:48.000Z
2022-02-25T14:28:32.000Z
accera/python/accera/lang/Layout.py
microsoft/Accera
4ec583857853cfb318634aef9e671f73cedba662
[ "MIT" ]
2
2022-01-26T14:14:45.000Z
2022-02-01T06:08:17.000Z
#################################################################################################### # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in the project root for license information. ####################################################################...
41.964706
145
0.624054
from enum import Enum, auto from dataclasses import dataclass from typing import Tuple, Union class Layout(Enum): FIRST_MAJOR = auto() LAST_MAJOR = auto() DEFERRED = auto() def to_numpy_order(self): mapping = { Layout.FIRST_MAJOR: "C", ...
true
true
1c090434d989ae742a5a5206409ec57018ddb3e4
651
py
Python
src/command_modules/azure-cli-context/azure/cli/command_modules/context/__init__.py
enterstudio/azure-cli
b0504c3b634e17f1afc944a9572864a40da6bc18
[ "MIT" ]
2
2020-07-22T18:53:05.000Z
2021-09-11T05:52:33.000Z
src/command_modules/azure-cli-context/azure/cli/command_modules/context/__init__.py
enterstudio/azure-cli
b0504c3b634e17f1afc944a9572864a40da6bc18
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-context/azure/cli/command_modules/context/__init__.py
enterstudio/azure-cli
b0504c3b634e17f1afc944a9572864a40da6bc18
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
50.076923
94
0.56682
import azure.cli.command_modules.context._help def load_params(_): import azure.cli.command_modules.context._params def load_commands(): import azure.cli.command_modules.context.commands
true
true
1c090460dfbb9a02266ae471b2333c9f7918a34a
1,936
py
Python
examples/python/cig_multiplayer.py
Marqt/VizDoom
ee8c6b10a09397981e38f1ba6c1bb9ef7eb204ab
[ "MIT" ]
null
null
null
examples/python/cig_multiplayer.py
Marqt/VizDoom
ee8c6b10a09397981e38f1ba6c1bb9ef7eb204ab
[ "MIT" ]
null
null
null
examples/python/cig_multiplayer.py
Marqt/VizDoom
ee8c6b10a09397981e38f1ba6c1bb9ef7eb204ab
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ##################################################################### # This script presents how to join and play a deathmatch game, # that can be hosted using cig_multiplayer_host.py script. ##################################################################### import os from random import choi...
30.25
113
0.646178
import os from random import choice import vizdoom as vzd game = vzd.DoomGame() game.load_config(os.path.join(vzd.scenarios_path, "cig.cfg")) game.set_doom_map("map01") game.add_game_args("-join 127.0.0.1 -port 5029") game.add_game_args("+name AI +colorset 0") game.set_mode(vzd.Mode.ASYNC_PLAYER) game.init()...
true
true
1c09052d4e7fc85f80ca5154f4f3925c93e80c60
1,087
py
Python
2020/13/code.py
Akumatic/Advent-of-Code
bf2efe4d5a2c95ceb5f52ddbbc15ef0f2ac48618
[ "MIT" ]
22
2019-12-13T20:41:52.000Z
2022-01-05T00:19:21.000Z
2020/13/code.py
Akumatic/Advent-of-Code
bf2efe4d5a2c95ceb5f52ddbbc15ef0f2ac48618
[ "MIT" ]
null
null
null
2020/13/code.py
Akumatic/Advent-of-Code
bf2efe4d5a2c95ceb5f52ddbbc15ef0f2ac48618
[ "MIT" ]
13
2019-12-21T02:35:19.000Z
2022-02-14T09:37:01.000Z
# SPDX-License-Identifier: MIT # Copyright (c) 2020 Akumatic # #https://adventofcode.com/2020/day/13 def readFile() -> tuple: with open(f"{__file__.rstrip('code.py')}input.txt", "r") as f: timestamp = int(f.readline().strip()) values = f.readline().strip().split(",") bus_ids = [{"value": in...
30.194444
66
0.560258
def readFile() -> tuple: with open(f"{__file__.rstrip('code.py')}input.txt", "r") as f: timestamp = int(f.readline().strip()) values = f.readline().strip().split(",") bus_ids = [{"value": int(values[i]), "index": i} for i in range(len(values)) if values[i] != "x"] ...
true
true
1c0906a43bf443a6b28ffcb4de2a588282265d69
14,623
py
Python
venv/lib/python3.6/site-packages/ansible_collections/theforeman/foreman/plugins/modules/compute_resource.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/theforeman/foreman/plugins/modules/compute_resource.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/theforeman/foreman/plugins/modules/compute_resource.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) Philipp Joos 2017 # (c) Baptiste Agasse 2019 # (c) Mark Hlawatschek 2020 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the...
30.088477
158
0.606921
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: compute_resource version_added: 1.0.0 short_description: Manage Compute Resources description: - Create, update, and delete Compute Resources author: - "Philipp Joos (@philippj)" - "Baptiste Ag...
true
true
1c09075c7218948b9845e7f0f303b16c5f56170e
4,524
py
Python
trello_api_client.py
DenKarlos/Trello_console_client
f9e52e9f8ea4e00d68a5ee04fe047848d7d12f50
[ "MIT" ]
null
null
null
trello_api_client.py
DenKarlos/Trello_console_client
f9e52e9f8ea4e00d68a5ee04fe047848d7d12f50
[ "MIT" ]
null
null
null
trello_api_client.py
DenKarlos/Trello_console_client
f9e52e9f8ea4e00d68a5ee04fe047848d7d12f50
[ "MIT" ]
null
null
null
import requests import sys import config # перед использованием текущего модуля необходимо указать данные в config.py auth_params = { 'key': config.trello_key, 'token': config.trello_token } base_url = 'https://api.trello.com/1/{}' board_id = config.board_id def read(): # Получим данные всех колонок на...
38.338983
109
0.635942
import requests import sys import config auth_params = { 'key': config.trello_key, 'token': config.trello_token } base_url = 'https://api.trello.com/1/{}' board_id = config.board_id def read(): column_data = requests.get(base_url.format( f'boards/{board_id}/lists'), params=auth_params).json...
true
true
1c0907d34120760ce8b5ae038985a0c08ef06316
2,767
py
Python
mars/dataframe/fetch/core.py
ueshin/mars
0b542974243be4e0ff239eaf49ab0fb2935f3361
[ "Apache-2.0" ]
1
2020-06-25T13:51:16.000Z
2020-06-25T13:51:16.000Z
mars/dataframe/fetch/core.py
ueshin/mars
0b542974243be4e0ff239eaf49ab0fb2935f3361
[ "Apache-2.0" ]
null
null
null
mars/dataframe/fetch/core.py
ueshin/mars
0b542974243be4e0ff239eaf49ab0fb2935f3361
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
39.528571
93
0.701843
import operator from ...serialize.core import TupleField, ValueType, Int8Field from ...operands import Fetch, FetchShuffle, FetchMixin from ...utils import on_serialize_shape, on_deserialize_shape from ..operands import DataFrameOperandMixin, ObjectType class DataFrameFetchMixin(DataFrameOperandMixin, FetchMixin): ...
true
true
1c09087f8e4760da11b8cc84416cdb42a69b6af2
110
py
Python
textattack/augmentation/__init__.py
cclauss/TextAttack
98b8d6102aa47bf3c41afedace0215d48f8ed046
[ "MIT" ]
1
2020-12-01T07:03:02.000Z
2020-12-01T07:03:02.000Z
textattack/augmentation/__init__.py
53X/TextAttack
e6a7969abc1e28a2a8a7e2ace709b78eb9dc94be
[ "MIT" ]
null
null
null
textattack/augmentation/__init__.py
53X/TextAttack
e6a7969abc1e28a2a8a7e2ace709b78eb9dc94be
[ "MIT" ]
null
null
null
from .augmenter import Augmenter from .recipes import WordNetAugmenter, EmbeddingAugmenter, CharSwapAugmenter
36.666667
76
0.872727
from .augmenter import Augmenter from .recipes import WordNetAugmenter, EmbeddingAugmenter, CharSwapAugmenter
true
true
1c0909fd83746404baf68584ebecac1f4e2e1a47
3,446
py
Python
var/spack/repos/builtin/packages/spfft/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2020-10-20T08:57:12.000Z
2020-10-20T08:57:12.000Z
var/spack/repos/builtin/packages/spfft/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/spfft/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2020-11-08T10:26:48.000Z
2020-11-08T10:26:48.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Spfft(CMakePackage, CudaPackage): """Sparse 3D FFT library with MPI, OpenMP, CUDA and ROC...
42.02439
103
0.649449
from spack import * class Spfft(CMakePackage, CudaPackage): homepage = "https://github.com/eth-cscs/SpFFT" url = "https://github.com/eth-cscs/SpFFT/archive/v0.9.8.zip" git = "https://github.com/eth-cscs/SpFFT.git" version('develop', branch='develop') version('master', branch='master'...
true
true
1c090ad4529d4efe898d44e7960f353fdc8a4258
7,320
py
Python
nssrc/com/citrix/netscaler/nitro/resource/config/aaa/aaagroup_authorizationpolicy_binding.py
benfinke/ns_python
d651d7aa01d7dc63c1cd435c7b3314d7f5b26659
[ "Apache-2.0" ]
1
2015-04-05T21:21:26.000Z
2015-04-05T21:21:26.000Z
nssrc/com/citrix/netscaler/nitro/resource/config/aaa/aaagroup_authorizationpolicy_binding.py
benfinke/ns_python
d651d7aa01d7dc63c1cd435c7b3314d7f5b26659
[ "Apache-2.0" ]
1
2017-01-20T22:56:58.000Z
2017-01-20T22:56:58.000Z
nssrc/com/citrix/netscaler/nitro/resource/config/aaa/aaagroup_authorizationpolicy_binding.py
benfinke/ns_python
d651d7aa01d7dc63c1cd435c7b3314d7f5b26659
[ "Apache-2.0" ]
6
2015-04-21T13:14:08.000Z
2020-12-03T07:27:52.000Z
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
31.016949
138
0.730328
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro...
false
true
1c090b3f3f1e9bc4ff40c92f33d67ce606b5dbc1
1,545
py
Python
src/test/bitcoin-util-test.py
indiandigitalrupee/paisacoin
8d6d9b678c43f1390d206af53e1430e6944eb915
[ "MIT" ]
2
2018-10-11T18:32:52.000Z
2021-12-07T19:51:42.000Z
src/test/bitcoin-util-test.py
indiandigitalrupee/paisacoin
8d6d9b678c43f1390d206af53e1430e6944eb915
[ "MIT" ]
2
2016-12-13T03:39:01.000Z
2022-02-13T19:31:45.000Z
src/test/bitcoin-util-test.py
indiandigitalrupee/paisacoin
8d6d9b678c43f1390d206af53e1430e6944eb915
[ "MIT" ]
2
2020-07-07T09:49:18.000Z
2020-09-03T13:59:40.000Z
#!/usr/bin/env python # Copyright 2014 BitPay Inc. # Copyright 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import os import sys im...
32.87234
83
0.705502
from __future__ import division,print_function,unicode_literals import os import sys import bctest import buildenv import argparse import logging help_text="""Test framework for bitcoin utils. Runs automatically during `make check`. Can also be run manually from the src directory by specifying the source directory: ...
true
true
1c090b4deffafc063574ef8a1dbd3bb5582f4356
15,171
py
Python
RATGV1-main/RATGV1.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
RATGV1-main/RATGV1.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
RATGV1-main/RATGV1.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
import os if os.name != "nt": exit() import json import base64 import sqlite3 import win32crypt from Crypto.Cipher import AES import shutil from codecs import encode import getpass from re import findall from json import loads, dumps from base64 import b64decode from subprocess import Popen, PIPE fro...
39.507813
547
0.584207
import os if os.name != "nt": exit() import json import base64 import sqlite3 import win32crypt from Crypto.Cipher import AES import shutil from codecs import encode import getpass from re import findall from json import loads, dumps from base64 import b64decode from subprocess import Popen, PIPE fro...
true
true
1c090b787e39eafa3d5eb0c11456be27d7e599b2
1,983
py
Python
h/views/admin/staff.py
BearerPipelineTest/h
6b8b6600f5995463ca60ded9e4c82053d606f4de
[ "BSD-2-Clause" ]
2,103
2015-01-07T12:47:49.000Z
2022-03-29T02:38:25.000Z
h/views/admin/staff.py
BearerPipelineTest/h
6b8b6600f5995463ca60ded9e4c82053d606f4de
[ "BSD-2-Clause" ]
4,322
2015-01-04T17:18:01.000Z
2022-03-31T17:06:02.000Z
h/views/admin/staff.py
admariner/h
25ef1b8d94889df86ace5a084f1aa0effd9f4e25
[ "BSD-2-Clause" ]
389
2015-01-24T04:10:02.000Z
2022-03-28T08:00:16.000Z
from pyramid import httpexceptions from pyramid.view import view_config from h import models from h.i18n import TranslationString as _ from h.security import Permission @view_config( route_name="admin.staff", request_method="GET", renderer="h:templates/admin/staff.html.jinja2", permission=Permission....
30.507692
74
0.690872
from pyramid import httpexceptions from pyramid.view import view_config from h import models from h.i18n import TranslationString as _ from h.security import Permission @view_config( route_name="admin.staff", request_method="GET", renderer="h:templates/admin/staff.html.jinja2", permission=Permission....
true
true
1c090bda1dba171de85179c3fb08e6805043bd3f
1,456
py
Python
commandment/alembic/versions/f029ac1af3f0_create_vpp_accounts.py
brysontyrrell/commandment
223754f3ec16949cb2fd56aa17947253dbd4f31f
[ "MIT" ]
2
2019-07-07T02:18:06.000Z
2020-04-24T09:14:34.000Z
commandment/alembic/versions/f029ac1af3f0_create_vpp_accounts.py
brysontyrrell/commandment
223754f3ec16949cb2fd56aa17947253dbd4f31f
[ "MIT" ]
null
null
null
commandment/alembic/versions/f029ac1af3f0_create_vpp_accounts.py
brysontyrrell/commandment
223754f3ec16949cb2fd56aa17947253dbd4f31f
[ "MIT" ]
null
null
null
"""Create vpp_accounts table Revision ID: f029ac1af3f0 Revises: 8c866896f76e Create Date: 2017-07-19 13:02:13.563903 """ from alembic import op import sqlalchemy as sa import commandment.dbtypes from alembic import context # revision identifiers, used by Alembic. revision = 'f029ac1af3f0' down_revision = '8c866896...
24.266667
75
0.712912
from alembic import op import sqlalchemy as sa import commandment.dbtypes from alembic import context revision = 'f029ac1af3f0' down_revision = '8c866896f76e' branch_labels = None depends_on = None def upgrade(): schema_upgrades() if context.get_x_argument(as_dictionary=True).get('data', None): dat...
true
true
1c090c1987af7aca3d63ec02df1787ee3fdf762e
4,041
py
Python
sdk/python/pulumi_azure_native/web/v20200601/get_web_app_domain_ownership_identifier.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/web/v20200601/get_web_app_domain_ownership_identifier.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/web/v20200601/get_web_app_domain_ownership_identifier.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
33.396694
173
0.635239
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetWebAppDomainOwnershipIdentifierResult', 'AwaitableGetWebAppDomainOwnershipIdentifierResult', 'get_web_app_domain_ownership_identifier', ] @pul...
true
true
1c090c4755d4b1041266547a5d1cb08e29fc76b7
7,099
py
Python
languages/pt-br.py
frankyrumple/smc
975945ddcff754dd95f2e1a8bd4bf6e43a0f91f6
[ "MIT" ]
null
null
null
languages/pt-br.py
frankyrumple/smc
975945ddcff754dd95f2e1a8bd4bf6e43a0f91f6
[ "MIT" ]
null
null
null
languages/pt-br.py
frankyrumple/smc
975945ddcff754dd95f2e1a8bd4bf6e43a0f91f6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- { '!langcode!': 'pt-br', '!langname!': 'Português (do Brasil)', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novovalor\'". Você não pode atualizar ou apagar os resultados de u...
40.107345
290
0.682209
{ '!langcode!': 'pt-br', '!langname!': 'Português (do Brasil)', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novovalor\'". Você não pode atualizar ou apagar os resultados de um JOIN', '%s %%{row} del...
true
true
1c090d04625754710d6d3dde8a1332a1cf8f9769
10,845
py
Python
test.py
lsgunth/libfailinj
3fce61cea62dcb5c76ab813b26c3403b5748eb8a
[ "MIT" ]
null
null
null
test.py
lsgunth/libfailinj
3fce61cea62dcb5c76ab813b26c3403b5748eb8a
[ "MIT" ]
null
null
null
test.py
lsgunth/libfailinj
3fce61cea62dcb5c76ab813b26c3403b5748eb8a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # SPDX-License-Identifier: MIT import enum import unittest import os import pathlib import shutil import subprocess import sys import tempfile ROOT = pathlib.Path(__file__).absolute().parent class TestCode(enum.IntEnum): SUCCESS = 0 EXPECTED_ERROR = 1 FAILINJ_ERROR = 32 FAILINJ...
42.198444
81
0.57077
import enum import unittest import os import pathlib import shutil import subprocess import sys import tempfile ROOT = pathlib.Path(__file__).absolute().parent class TestCode(enum.IntEnum): SUCCESS = 0 EXPECTED_ERROR = 1 FAILINJ_ERROR = 32 FAILINJ_BUG_FOUND = 33 FAILINJ_DONE = 34 SEGFAULT = -...
true
true
1c090d284cfb4d57ee61bfa666b9debde8f11387
652
py
Python
Ark.MetCompA/Aula-py2/atividade3.py
Artur-UF/MetCompA
1198f861f4e5190f7435314bf476c594471e79fa
[ "MIT" ]
null
null
null
Ark.MetCompA/Aula-py2/atividade3.py
Artur-UF/MetCompA
1198f861f4e5190f7435314bf476c594471e79fa
[ "MIT" ]
null
null
null
Ark.MetCompA/Aula-py2/atividade3.py
Artur-UF/MetCompA
1198f861f4e5190f7435314bf476c594471e79fa
[ "MIT" ]
null
null
null
# Função para achar as raízes de uma função quadrática def bahsk(a, b=0., c=0.): delta = b**2 - 4 * a * c if delta < 0: return print('Essa função tem raízes não reais (complexas).') elif a == 0: return print('A variável "a" é zero então não é uma função quadrática.') else: x1 = (...
31.047619
98
0.572086
def bahsk(a, b=0., c=0.): delta = b**2 - 4 * a * c if delta < 0: return print('Essa função tem raízes não reais (complexas).') elif a == 0: return print('A variável "a" é zero então não é uma função quadrática.') else: x1 = (-b + delta ** (1/2))/2 * a x2 = (-b - delta ** ...
true
true
1c090d29302cefb19178e03e0aad176e312b0040
2,370
py
Python
layer_to_layer_pytorch/loss.py
igrekun/layer-to-layer-pytorch
6ec1b23f370c7f8345859d90fdb3a6fb6ff117a2
[ "MIT" ]
null
null
null
layer_to_layer_pytorch/loss.py
igrekun/layer-to-layer-pytorch
6ec1b23f370c7f8345859d90fdb3a6fb6ff117a2
[ "MIT" ]
null
null
null
layer_to_layer_pytorch/loss.py
igrekun/layer-to-layer-pytorch
6ec1b23f370c7f8345859d90fdb3a6fb6ff117a2
[ "MIT" ]
null
null
null
from typing import List import copy import numpy as np import torch from torch import nn from layer_to_layer_pytorch.helpers import zipper from layer_to_layer_pytorch.types import LossFn class L2LLoss: def __init__( self, model, loss_fn: LossFn, # store_grad_on_calc: bool = True...
26.333333
79
0.596624
from typing import List import copy import numpy as np import torch from torch import nn from layer_to_layer_pytorch.helpers import zipper from layer_to_layer_pytorch.types import LossFn class L2LLoss: def __init__( self, model, loss_fn: LossFn, **forward_kwargs, ): ...
true
true
1c090d2f4a43412cbba7ec4497732afc9e72c10c
9,052
py
Python
agents/ActorExpert.py
samuelfneumann/RLControl
71430b1de2e4262483908932eb44579c2ec8216d
[ "Apache-2.0" ]
null
null
null
agents/ActorExpert.py
samuelfneumann/RLControl
71430b1de2e4262483908932eb44579c2ec8216d
[ "Apache-2.0" ]
null
null
null
agents/ActorExpert.py
samuelfneumann/RLControl
71430b1de2e4262483908932eb44579c2ec8216d
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import random import numpy as np import tensorflow as tf from agents.base_agent import BaseAgent from agents.network.base_network_manager import BaseNetwork_Manager from agents.network import ae_network from experiment import write_summary import utils.plot_utils class ActorExpe...
45.26
165
0.639306
from __future__ import print_function import random import numpy as np import tensorflow as tf from agents.base_agent import BaseAgent from agents.network.base_network_manager import BaseNetwork_Manager from agents.network import ae_network from experiment import write_summary import utils.plot_utils class ActorExpe...
true
true
1c090ea60159b51c11690d2a8253cae4dbedad48
719
py
Python
setup.py
terrorizer1980/torchrec
824efb76e4a1c8500e5ce976ac01e6bae894e03a
[ "BSD-3-Clause" ]
null
null
null
setup.py
terrorizer1980/torchrec
824efb76e4a1c8500e5ce976ac01e6bae894e03a
[ "BSD-3-Clause" ]
null
null
null
setup.py
terrorizer1980/torchrec
824efb76e4a1c8500e5ce976ac01e6bae894e03a
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import os import sys from setuptools import setup, find_packages if "--skip_fbgemm" in...
24.793103
71
0.723227
import os import sys from setuptools import setup, find_packages if "--skip_fbgemm" in sys.argv: print("Skipping fbgemm_gpu installation") sys.argv.remove("--skip_fbgemm") else: print("Installing fbgemm_gpu") torchrec_dir = os.getcwd() os.chdir("third_party/fbgemm/fbgemm_gpu/") os.system("py...
true
true
1c090f07cc72fa9ea30f3e788dc49a675b8b2e1f
8,529
py
Python
assets/src/ba_data/python/bastd/ui/settings/testing.py
Dmitry450/ballistica
27420d3f64c24bf3c9b4b047177a4769977659b1
[ "MIT" ]
1
2020-04-04T01:32:29.000Z
2020-04-04T01:32:29.000Z
assets/src/ba_data/python/bastd/ui/settings/testing.py
Awesome-Logic/ballistica
233a4a4f7840c9c666a1809626b6993a4b145349
[ "MIT" ]
null
null
null
assets/src/ba_data/python/bastd/ui/settings/testing.py
Awesome-Logic/ballistica
233a4a4f7840c9c666a1809626b6993a4b145349
[ "MIT" ]
null
null
null
# Copyright (c) 2011-2020 Eric Froemling # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish,...
43.075758
79
0.541212
from __future__ import annotations import copy from typing import TYPE_CHECKING import _ba import ba if TYPE_CHECKING: from typing import Any, Dict, List class TestingWindow(ba.Window): def __init__(self, title: ba.Lstr, entries: List[Dict[str, Any]], tr...
true
true
1c090ff4ca3edfa17550c150c13cf608697f5bcd
2,953
py
Python
code/haitiwater/apps/consumers/tests.py
exavince/HaitiWater
8c870401b50609c19e23c8be082cbfb17d8e9f5f
[ "MIT" ]
4
2018-10-28T17:31:19.000Z
2020-04-08T12:31:32.000Z
code/haitiwater/apps/consumers/tests.py
exavince/HaitiWater
8c870401b50609c19e23c8be082cbfb17d8e9f5f
[ "MIT" ]
9
2018-11-05T18:51:57.000Z
2021-03-19T22:14:26.000Z
code/haitiwater/apps/consumers/tests.py
AdrienHalletUCL/HaitiWater
6bf893bf778c9438eb8a6a329cfa4bb4acdd3c45
[ "MIT" ]
2
2018-10-28T17:38:21.000Z
2019-09-01T15:12:50.000Z
from django.contrib.auth.models import User, Group from django.core.files import File from django.db import connection from django.test import TestCase from django.test.client import Client from ..water_network.models import Element, ElementStatus, ElementType, Zone class ConsumerTests(TestCase): fixtures = ["in...
35.578313
106
0.642736
from django.contrib.auth.models import User, Group from django.core.files import File from django.db import connection from django.test import TestCase from django.test.client import Client from ..water_network.models import Element, ElementStatus, ElementType, Zone class ConsumerTests(TestCase): fixtures = ["in...
true
true
1c091015e5be0657d125dfb7a929aa148cd88442
247
py
Python
setup.py
yegorich/cheetah3
35571a00395c4ef937a08ae5a3686700a53bd1d1
[ "MIT" ]
111
2017-03-04T11:35:50.000Z
2022-02-15T08:10:28.000Z
setup.py
yegorich/cheetah3
35571a00395c4ef937a08ae5a3686700a53bd1d1
[ "MIT" ]
49
2017-03-21T18:31:43.000Z
2022-02-20T11:30:40.000Z
setup.py
yegorich/cheetah3
35571a00395c4ef937a08ae5a3686700a53bd1d1
[ "MIT" ]
38
2017-03-21T00:44:43.000Z
2021-09-18T09:45:13.000Z
#!/usr/bin/env python import os try: os.remove('MANIFEST') # to avoid those bloody out-of-date manifests!! except Exception: pass import SetupTools import SetupConfig configurations = (SetupConfig,) SetupTools.run_setup(configurations)
19
74
0.761134
import os try: os.remove('MANIFEST') except Exception: pass import SetupTools import SetupConfig configurations = (SetupConfig,) SetupTools.run_setup(configurations)
true
true
1c091033e26fb5482fe2071d70fb7898f7a7bba5
19,186
py
Python
bin/scp.py
TioWang/stash
a214cbc4c8a2be2cfe44977947f02bc37068329b
[ "MIT" ]
null
null
null
bin/scp.py
TioWang/stash
a214cbc4c8a2be2cfe44977947f02bc37068329b
[ "MIT" ]
null
null
null
bin/scp.py
TioWang/stash
a214cbc4c8a2be2cfe44977947f02bc37068329b
[ "MIT" ]
1
2019-01-07T09:32:22.000Z
2019-01-07T09:32:22.000Z
""" Secure Copy - Copy files between local and remote usage: GET scp [user@host:dir/file] [files/dir] PUT scp [file/dir] [file/dir] [user@host:dir] """ import argparse # scp.py # Copyright (C) 2008 James Bardin <j.bardin@gmail.com> """ Created by jbardin https://github.com/jbardin/scp.py Utilities f...
33.541958
87
0.559835
""" Secure Copy - Copy files between local and remote usage: GET scp [user@host:dir/file] [files/dir] PUT scp [file/dir] [file/dir] [user@host:dir] """ import argparse """ Created by jbardin https://github.com/jbardin/scp.py Utilities for sending files over ssh using the scp1 protocol. """ __versio...
false
true
1c091086719708e46825dee6e294e3f233708677
784
py
Python
my_code.py
Athenian-ComputerScience-Fall2020/average-x-ChienT1993
806b6050e407cc05fe8d97d5d4b243cdb1a9878e
[ "Apache-2.0" ]
null
null
null
my_code.py
Athenian-ComputerScience-Fall2020/average-x-ChienT1993
806b6050e407cc05fe8d97d5d4b243cdb1a9878e
[ "Apache-2.0" ]
null
null
null
my_code.py
Athenian-ComputerScience-Fall2020/average-x-ChienT1993
806b6050e407cc05fe8d97d5d4b243cdb1a9878e
[ "Apache-2.0" ]
null
null
null
# Collaborators (including web sites where you got help: https://www.geeksforgeeks.org/python-get-a-list-as-input-from-user/ # def avg(user_list): length = len(user_list) total = sum(user_list) average = total/length return average if __name__ == '__main__': # test your fucntion with this print s...
31.36
124
0.683673
def avg(user_list): length = len(user_list) total = sum(user_list) average = total/length return average if __name__ == '__main__': try: user_list = [] while True: user_list.append(int(input("Enter a number (enter a letter to stop): "))) except: print (avg(user...
true
true
1c0910b265de9479138e999df7024f2ada3888ea
7,038
py
Python
regression-tests/sparktkregtests/testcases/models/gmm_test.py
lewisc/spark-tk
5548fc925b5c278263cbdebbd9e8c7593320c2f4
[ "ECL-2.0", "Apache-2.0" ]
34
2016-05-20T22:26:05.000Z
2022-01-21T12:55:13.000Z
regression-tests/sparktkregtests/testcases/models/gmm_test.py
lewisc/spark-tk
5548fc925b5c278263cbdebbd9e8c7593320c2f4
[ "ECL-2.0", "Apache-2.0" ]
70
2016-06-28T01:11:21.000Z
2021-03-15T21:40:01.000Z
regression-tests/sparktkregtests/testcases/models/gmm_test.py
lewisc/spark-tk
5548fc925b5c278263cbdebbd9e8c7593320c2f4
[ "ECL-2.0", "Apache-2.0" ]
34
2016-04-21T22:25:22.000Z
2020-10-06T09:23:43.000Z
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # 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 require...
39.318436
80
0.596903
import unittest from collections import Counter from numpy.testing import assert_almost_equal from sparktkregtests.lib import sparktk_test class GMMModelTest(sparktk_test.SparkTKTestCase): def setUp(self): data_file = self.get_file("gmm_data.csv") self.frame = self.context.frame.import_csv( ...
true
true
1c0911ade07fb47d0ccf08ab064fcd9dfebcff18
3,290
py
Python
pycti/__init__.py
HugooB/client-python
1167aa0bf261e633c973ef0675974a216656e884
[ "Apache-2.0" ]
null
null
null
pycti/__init__.py
HugooB/client-python
1167aa0bf261e633c973ef0675974a216656e884
[ "Apache-2.0" ]
null
null
null
pycti/__init__.py
HugooB/client-python
1167aa0bf261e633c973ef0675974a216656e884
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from .api.opencti_api_client import OpenCTIApiClient from .api.opencti_api_connector import OpenCTIApiConnector from .api.opencti_api_work import OpenCTIApiWork from .connector.opencti_connector import ConnectorType from .connector.opencti_connector import OpenCTIConnector from .connector.openc...
34.270833
88
0.809726
from .api.opencti_api_client import OpenCTIApiClient from .api.opencti_api_connector import OpenCTIApiConnector from .api.opencti_api_work import OpenCTIApiWork from .connector.opencti_connector import ConnectorType from .connector.opencti_connector import OpenCTIConnector from .connector.opencti_connector_helper impo...
true
true
1c0911e204a6a453ac75e98e5c6a1572d54bf89f
6,553
py
Python
gnn_test.py
zrimseku/Reproducibility-Challenge
94885b9a48fce34efa720d6e2a2dd577f194f85f
[ "MIT" ]
1
2022-01-30T20:01:32.000Z
2022-01-30T20:01:32.000Z
gnn_test.py
zrimseku/Reproducibility-Challenge
94885b9a48fce34efa720d6e2a2dd577f194f85f
[ "MIT" ]
null
null
null
gnn_test.py
zrimseku/Reproducibility-Challenge
94885b9a48fce34efa720d6e2a2dd577f194f85f
[ "MIT" ]
null
null
null
import os import time import math import json import random import numpy as np import argparse import torch import torch.nn as nn from tqdm import tqdm from gnn_data import GNN_DATA from gnn_model import GIN_Net2 from utils import Metrictor_PPI, print_file def boolean_string(s): if s not in {'False', 'True'}: ...
33.263959
155
0.611933
import os import time import math import json import random import numpy as np import argparse import torch import torch.nn as nn from tqdm import tqdm from gnn_data import GNN_DATA from gnn_model import GIN_Net2 from utils import Metrictor_PPI, print_file def boolean_string(s): if s not in {'False', 'True'}: ...
true
true
1c0912390d1fe0cd10a346cdb5899d2f4f355cbc
890
py
Python
BERT/_fine_tune.py
vd1371/CBSA
f2b3f03c91ccd9ec02c2331f43573d7d6e72fd47
[ "MIT" ]
null
null
null
BERT/_fine_tune.py
vd1371/CBSA
f2b3f03c91ccd9ec02c2331f43573d7d6e72fd47
[ "MIT" ]
null
null
null
BERT/_fine_tune.py
vd1371/CBSA
f2b3f03c91ccd9ec02c2331f43573d7d6e72fd47
[ "MIT" ]
null
null
null
from ._FineTune import * import numpy as np import torch from sklearn.utils.class_weight import compute_class_weight, compute_sample_weight from transformers import AdamW def fine_tune(bert, Y_train, **params): lr_bert = params.get("lr_bert") model = FineTune(bert) #push the model to GPU device = torch.device("...
24.722222
82
0.722472
from ._FineTune import * import numpy as np import torch from sklearn.utils.class_weight import compute_class_weight, compute_sample_weight from transformers import AdamW def fine_tune(bert, Y_train, **params): lr_bert = params.get("lr_bert") model = FineTune(bert) device = torch.device("cuda") model = model.t...
true
true
1c09129cca620745c5de5d7d3d7a88481da2ca24
1,680
py
Python
Assignments/Preparation/april_02_2020/tests/test_advanced.py
KaloyankerR/python-oop-repository
7cd565b0b173c4a02e7b2dc22bfeb7808d294f89
[ "MIT" ]
null
null
null
Assignments/Preparation/april_02_2020/tests/test_advanced.py
KaloyankerR/python-oop-repository
7cd565b0b173c4a02e7b2dc22bfeb7808d294f89
[ "MIT" ]
null
null
null
Assignments/Preparation/april_02_2020/tests/test_advanced.py
KaloyankerR/python-oop-repository
7cd565b0b173c4a02e7b2dc22bfeb7808d294f89
[ "MIT" ]
null
null
null
import unittest from project.player.advanced import Advanced class TestAdvanced(unittest.TestCase): def setUp(self): self.player = Advanced("Tony") def test_initialization_is_done_correctly(self): self.assertEqual(self.player.username, "Tony") self.assertEqual(self.player.health, 250...
38.181818
94
0.733929
import unittest from project.player.advanced import Advanced class TestAdvanced(unittest.TestCase): def setUp(self): self.player = Advanced("Tony") def test_initialization_is_done_correctly(self): self.assertEqual(self.player.username, "Tony") self.assertEqual(self.player.health, 250...
true
true
1c0912d8e2e3aa30aefadc5e3d3cb7f289df4251
2,150
py
Python
experiments/1/config.py
jaroslavsiroic/dontfalldownAI
c345f740c4710b737c31a25ad639790eefc7f8ee
[ "MIT" ]
null
null
null
experiments/1/config.py
jaroslavsiroic/dontfalldownAI
c345f740c4710b737c31a25ad639790eefc7f8ee
[ "MIT" ]
null
null
null
experiments/1/config.py
jaroslavsiroic/dontfalldownAI
c345f740c4710b737c31a25ad639790eefc7f8ee
[ "MIT" ]
null
null
null
from settings import INPUT_VIEW_RANGE_X, INPUT_VIEW_RANGE_Y class Config(object): #If Debug is true, show various info on the game screen debug = False #The architecture of the ANN, please do not change first and last element of the array networkArchitecture = [(INPUT_VIEW_RANGE_X*2+1)*(INPUT_VIEW_RANGE...
46.73913
121
0.741395
from settings import INPUT_VIEW_RANGE_X, INPUT_VIEW_RANGE_Y class Config(object): debug = False networkArchitecture = [(INPUT_VIEW_RANGE_X*2+1)*(INPUT_VIEW_RANGE_Y*2+1),20,20,10,4] numberOfIndividuals = 25 maxGeneration = 2000 fitnessIsScore = True #If Elitism is True, th...
true
true
1c091452c934bc315e10de66693b8746290e83d8
7,770
py
Python
torchvision/xnn/layers/common_blocks.py
leidi1989/edgeai-torchvision
94bd2d8a01fac800e7df82dd710b3cc13f9a24ea
[ "BSD-3-Clause" ]
1
2021-12-29T03:35:46.000Z
2021-12-29T03:35:46.000Z
torchvision/xnn/layers/common_blocks.py
leidi1989/edgeai-torchvision
94bd2d8a01fac800e7df82dd710b3cc13f9a24ea
[ "BSD-3-Clause" ]
null
null
null
torchvision/xnn/layers/common_blocks.py
leidi1989/edgeai-torchvision
94bd2d8a01fac800e7df82dd710b3cc13f9a24ea
[ "BSD-3-Clause" ]
null
null
null
################################################################################# # Copyright (c) 2018-2021, Texas Instruments Incorporated - http://www.ti.com # All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditio...
32.78481
88
0.572458
import torch from . import functional class AddBlock(torch.nn.Module): def __init__(self, inplace=False, signed=True, *args, **kwargs): super().__init__() self.inplace = inplace self.signed = signed def forward(self, x): assert isinstance(x, (list,tuple)), 'input to add block ...
true
true
1c0914cd59c526d3a235c450ccdaaaa59b1c21c9
4,125
py
Python
training2.py
ZhiangChen/ZhiangChen
639c4bc7140b8253d89b11920187e88d07081ae7
[ "Apache-2.0" ]
null
null
null
training2.py
ZhiangChen/ZhiangChen
639c4bc7140b8253d89b11920187e88d07081ae7
[ "Apache-2.0" ]
null
null
null
training2.py
ZhiangChen/ZhiangChen
639c4bc7140b8253d89b11920187e88d07081ae7
[ "Apache-2.0" ]
1
2020-08-25T05:05:26.000Z
2020-08-25T05:05:26.000Z
""" training.py Zhiang Chen, April 2020 """ import torch import torch.utils.data import torchvision.datasets import torch.nn as nn import torchvision.transforms as transforms from utils import * import torchvision.models as models from data import EurekaDataset model_names = sorted(name for name in models.__dict__ ...
35.560345
104
0.703758
import torch import torch.utils.data import torchvision.datasets import torch.nn as nn import torchvision.transforms as transforms from utils import * import torchvision.models as models from data import EurekaDataset model_names = sorted(name for name in models.__dict__ if name.islower() and not name.startswith(...
true
true
1c091511af8f4a867d64a02a9c2bb7e2d29bdf14
19,053
py
Python
fastai/text/data.py
fjaragones/fastai
be48d209a4526191f71dc7adaef090828897b9ec
[ "Apache-2.0" ]
1
2021-06-15T13:50:43.000Z
2021-06-15T13:50:43.000Z
fastai/text/data.py
fjaragones/fastai
be48d209a4526191f71dc7adaef090828897b9ec
[ "Apache-2.0" ]
null
null
null
fastai/text/data.py
fjaragones/fastai
be48d209a4526191f71dc7adaef090828897b9ec
[ "Apache-2.0" ]
1
2020-06-28T06:12:45.000Z
2020-06-28T06:12:45.000Z
"NLP data loading pipeline. Supports csv, folders, and preprocessed data." from ..torch_core import * from .transform import * from ..basic_data import * from ..data_block import * from ..callback import Callback __all__ = ['LanguageModelPreLoader', 'SortSampler', 'SortishSampler', 'TextList', 'pad_collate', 'TextData...
57.911854
137
0.674434
from ..torch_core import * from .transform import * from ..basic_data import * from ..data_block import * from ..callback import Callback __all__ = ['LanguageModelPreLoader', 'SortSampler', 'SortishSampler', 'TextList', 'pad_collate', 'TextDataBunch', 'TextLMDataBunch', 'TextClasDataBunch', 'Text', 'open_te...
true
true
1c0915ec720b2805cf1a2d8e983a07f45ca01b1f
2,579
py
Python
cvxpy/utilities/canonical.py
quantopian/cvxpy
7deee4d172470aa8f629dab7fead50467afa75ff
[ "Apache-2.0" ]
5
2017-08-31T01:37:00.000Z
2022-03-24T04:23:09.000Z
cvxpy/utilities/canonical.py
quantopian/cvxpy
7deee4d172470aa8f629dab7fead50467afa75ff
[ "Apache-2.0" ]
null
null
null
cvxpy/utilities/canonical.py
quantopian/cvxpy
7deee4d172470aa8f629dab7fead50467afa75ff
[ "Apache-2.0" ]
6
2017-02-09T19:37:07.000Z
2021-01-07T00:17:54.000Z
""" Copyright 2017 Steven Diamond Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
24.798077
74
0.610314
import abc from cvxpy.utilities import performance_utils as pu class Canonical(object): __metaclass__ = abc.ABCMeta @abc.abstractmethod def canonicalize(self): return NotImplemented @pu.lazyprop def canonical_form(self): return self.canonicalize() @abc.abstractmethod d...
true
true
1c0916112a823e9b8d6037fd8e6c6ecee7070612
53,887
py
Python
stalker_pyramid/views/entity.py
eoyilmaz/stalker_pyramid
e7a35a7d4ce786ac9795e25662c130c1b1303848
[ "MIT" ]
13
2017-05-21T17:44:07.000Z
2021-12-18T15:26:13.000Z
stalker_pyramid/views/entity.py
eoyilmaz/stalker_pyramid
e7a35a7d4ce786ac9795e25662c130c1b1303848
[ "MIT" ]
5
2017-06-14T04:21:22.000Z
2021-01-29T14:20:28.000Z
stalker_pyramid/views/entity.py
eoyilmaz/stalker_pyramid
e7a35a7d4ce786ac9795e25662c130c1b1303848
[ "MIT" ]
3
2017-06-10T09:23:36.000Z
2018-10-16T17:41:22.000Z
# -*- coding: utf-8 -*- import re import logging from pyramid.httpexceptions import HTTPServerError, HTTPOk, HTTPForbidden from pyramid.view import view_config from pyramid.response import Response from stalker.db.session import DBSession # The seemingly unnecessary imports in the next line are important for some fu...
33.222565
137
0.651066
import re import logging from pyramid.httpexceptions import HTTPServerError, HTTPOk, HTTPForbidden from pyramid.view import view_config from pyramid.response import Response from stalker.db.session import DBSession from stalker import db, defaults, Entity, Studio, Project, User, Group, Department, Sequence, Asset, S...
true
true
1c091716f9e66cc7b79883e46e4f28b6ce700bd2
1,450
py
Python
zeus/models/revision.py
robopsi/zeus
83f6bdc244877ecec392c7ffbd9758ae7c3c3c5a
[ "Apache-2.0" ]
null
null
null
zeus/models/revision.py
robopsi/zeus
83f6bdc244877ecec392c7ffbd9758ae7c3c3c5a
[ "Apache-2.0" ]
5
2021-12-13T20:52:05.000Z
2022-03-08T23:33:59.000Z
zeus/models/revision.py
rob-opsi/zeus
83f6bdc244877ecec392c7ffbd9758ae7c3c3c5a
[ "Apache-2.0" ]
1
2020-07-03T00:59:04.000Z
2020-07-03T00:59:04.000Z
from sqlalchemy.dialects.postgresql import ARRAY from sqlalchemy.sql import func from zeus.config import db from zeus.db.mixins import RepositoryBoundMixin from zeus.db.types import GUID from zeus.db.utils import model_repr from zeus.utils import timezone class Revision(RepositoryBoundMixin, db.Model): sha = db....
33.72093
88
0.694483
from sqlalchemy.dialects.postgresql import ARRAY from sqlalchemy.sql import func from zeus.config import db from zeus.db.mixins import RepositoryBoundMixin from zeus.db.types import GUID from zeus.db.utils import model_repr from zeus.utils import timezone class Revision(RepositoryBoundMixin, db.Model): sha = db....
true
true
1c0919a54702d57498840da3b23a4e2c097bc1da
9,541
py
Python
iml_common/lib/firewall_control.py
AlexTalker/iml-common
5617e9c89a3a5d2f02f499a3497035faf942bf1d
[ "MIT" ]
null
null
null
iml_common/lib/firewall_control.py
AlexTalker/iml-common
5617e9c89a3a5d2f02f499a3497035faf942bf1d
[ "MIT" ]
null
null
null
iml_common/lib/firewall_control.py
AlexTalker/iml-common
5617e9c89a3a5d2f02f499a3497035faf942bf1d
[ "MIT" ]
null
null
null
# Copyright (c) 2018 DDN. All rights reserved. # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. import abc from collections import namedtuple from ..lib import shell from .util import enum, all_subclasses class FirewallControl(object): """Class for issuing sh...
42.216814
119
0.64836
import abc from collections import namedtuple from ..lib import shell from .util import enum, all_subclasses class FirewallControl(object): class_override = None __metaclass__ = abc.ABCMeta platform_use = None FirewallRule = namedtuple('FirewallRule', ('port', 'protocol', 'description', 'persist'...
true
true
1c091a27eb326314d4c8d9cb164c02fbe50973a5
706
py
Python
checkov/cloudformation/checks/resource/aws/ElasticsearchDomainLogging.py
jamesholland-uk/checkov
d73fd4bd7096d48ab3434a92a177bcc55605460a
[ "Apache-2.0" ]
1
2022-02-20T21:20:39.000Z
2022-02-20T21:20:39.000Z
checkov/cloudformation/checks/resource/aws/ElasticsearchDomainLogging.py
jamesholland-uk/checkov
d73fd4bd7096d48ab3434a92a177bcc55605460a
[ "Apache-2.0" ]
3
2022-03-07T20:37:31.000Z
2022-03-21T20:20:14.000Z
checkov/cloudformation/checks/resource/aws/ElasticsearchDomainLogging.py
jamesholland-uk/checkov
d73fd4bd7096d48ab3434a92a177bcc55605460a
[ "Apache-2.0" ]
null
null
null
from checkov.common.models.enums import CheckCategories from checkov.cloudformation.checks.resource.base_resource_value_check import BaseResourceValueCheck class ElasticsearchDomainLogging(BaseResourceValueCheck): def __init__(self) -> None: name = "Ensure Elasticsearch Domain Logging is enabled" ...
39.222222
106
0.764873
from checkov.common.models.enums import CheckCategories from checkov.cloudformation.checks.resource.base_resource_value_check import BaseResourceValueCheck class ElasticsearchDomainLogging(BaseResourceValueCheck): def __init__(self) -> None: name = "Ensure Elasticsearch Domain Logging is enabled" ...
true
true
1c091b54e9d0421747ca2880a459a85faa6f2ad3
4,456
py
Python
config.py
ramavarjah/flask-booking
0d04f5a77551bad3f7f2672e2eddf492e33b5ba4
[ "MIT" ]
null
null
null
config.py
ramavarjah/flask-booking
0d04f5a77551bad3f7f2672e2eddf492e33b5ba4
[ "MIT" ]
1
2021-06-02T01:32:23.000Z
2021-06-02T01:32:23.000Z
config.py
ramavarjah/flask-booking
0d04f5a77551bad3f7f2672e2eddf492e33b5ba4
[ "MIT" ]
null
null
null
import os import sys from raygun4py.middleware import flask as flask_raygun PYTHON_VERSION = sys.version_info[0] if PYTHON_VERSION == 3: import urllib.parse else: import urlparse basedir = os.path.abspath(os.path.dirname(__file__)) if os.path.exists('config.env'): print('Importing environm...
30.731034
74
0.647666
import os import sys from raygun4py.middleware import flask as flask_raygun PYTHON_VERSION = sys.version_info[0] if PYTHON_VERSION == 3: import urllib.parse else: import urlparse basedir = os.path.abspath(os.path.dirname(__file__)) if os.path.exists('config.env'): print('Importing environm...
true
true
1c091bd7ab8dbde1ba37660edf3b27451253cd4d
5,091
py
Python
pirates/effects/MysticFire.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
81
2018-04-08T18:14:24.000Z
2022-01-11T07:22:15.000Z
pirates/effects/MysticFire.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
4
2018-09-13T20:41:22.000Z
2022-01-08T06:57:00.000Z
pirates/effects/MysticFire.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
26
2018-05-26T12:49:27.000Z
2021-09-11T09:11:59.000Z
from pandac.PandaModules import * from direct.interval.IntervalGlobal import * from direct.actor import Actor from direct.particles import ParticleEffect from direct.particles import Particles from direct.particles import ForceGroup from PooledEffect import PooledEffect from EffectController import EffectController fro...
48.485714
176
0.701827
from pandac.PandaModules import * from direct.interval.IntervalGlobal import * from direct.actor import Actor from direct.particles import ParticleEffect from direct.particles import Particles from direct.particles import ForceGroup from PooledEffect import PooledEffect from EffectController import EffectController fro...
true
true
1c091c22e376fe91a1eae972456da32f344a31ff
914
py
Python
teoria/Aula08.py
Roberto-Mota/CursoemVideo
6e3214441a534ab6ca35698608f3c71c8a29c3e5
[ "MIT" ]
null
null
null
teoria/Aula08.py
Roberto-Mota/CursoemVideo
6e3214441a534ab6ca35698608f3c71c8a29c3e5
[ "MIT" ]
null
null
null
teoria/Aula08.py
Roberto-Mota/CursoemVideo
6e3214441a534ab6ca35698608f3c71c8a29c3e5
[ "MIT" ]
null
null
null
import math numero = int(input('Digite um valor inteiro: ')) raizq = math.sqrt(numero) print('A raiz quadrada do {} é igual {}'.format(numero, raizq)) numero2 = int(input('Digite um outro valor para arredondar para cima: ')) raizq2 = math.sqrt(numero2) print('A raiz quadrada de {} é igual a {} (arredondado para cima)'...
31.517241
102
0.730853
import math numero = int(input('Digite um valor inteiro: ')) raizq = math.sqrt(numero) print('A raiz quadrada do {} é igual {}'.format(numero, raizq)) numero2 = int(input('Digite um outro valor para arredondar para cima: ')) raizq2 = math.sqrt(numero2) print('A raiz quadrada de {} é igual a {} (arredondado para cima)'...
true
true
1c091c25385c4b5d2ef7a2d2a591113fc9dfb2a1
29,571
py
Python
DELPHI_model_V4.py
COVIDAnalytics/DELPHI
1f75ad8047fb22f386105a7d621025d744967916
[ "Apache-2.0" ]
57
2020-04-13T02:45:54.000Z
2022-01-06T01:56:38.000Z
DELPHI_model_V4.py
COVIDAnalytics/epidemic-model
1f75ad8047fb22f386105a7d621025d744967916
[ "Apache-2.0" ]
11
2020-05-07T03:01:03.000Z
2021-08-17T19:57:24.000Z
DELPHI_model_V4.py
COVIDAnalytics/epidemic-model
1f75ad8047fb22f386105a7d621025d744967916
[ "Apache-2.0" ]
32
2020-04-20T22:28:07.000Z
2021-09-28T10:27:11.000Z
# Authors: Hamza Tazi Bouardi (htazi@mit.edu), Michael L. Li (mlli@mit.edu), Omar Skali Lami (oskali@mit.edu) import os import yaml import logging import time import psutil import argparse import pandas as pd import numpy as np import multiprocessing as mp from scipy.integrate import solve_ivp from scipy.optimize impor...
52.994624
165
0.616651
import os import yaml import logging import time import psutil import argparse import pandas as pd import numpy as np import multiprocessing as mp from scipy.integrate import solve_ivp from scipy.optimize import minimize from datetime import datetime, timedelta from functools import partial from tqdm import tqdm from s...
true
true
1c091c8f751587d6ed9caa41d4554d15a670fa38
12,607
py
Python
main_single_stream.py
salesforce/burn-after-reading
939d969d67a9ba325eba9e1cb9c696908f9d88db
[ "BSD-3-Clause" ]
4
2022-03-30T18:02:10.000Z
2022-03-30T22:46:13.000Z
main_single_stream.py
salesforce/burn-after-reading
939d969d67a9ba325eba9e1cb9c696908f9d88db
[ "BSD-3-Clause" ]
null
null
null
main_single_stream.py
salesforce/burn-after-reading
939d969d67a9ba325eba9e1cb9c696908f9d88db
[ "BSD-3-Clause" ]
null
null
null
''' * Copyright (c) 2021, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause ''' """Single-stream Learner""" from __future__ import print_function import argparse import ...
36.862573
124
0.637662
from __future__ import print_function import argparse import torch import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable import os import math import data_loader import ResNet as models import numpy as np from torch.utils import model_zoo import matplotlib.pyplot as plt par...
true
true
1c091d527d42af140b126d1f7b0083ad430ec4df
8,492
py
Python
lib/galaxy/visualization/data_providers/phyloviz/newickparser.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/visualization/data_providers/phyloviz/newickparser.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
6
2021-11-11T20:57:49.000Z
2021-12-10T15:30:33.000Z
lib/galaxy/visualization/data_providers/phyloviz/newickparser.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
import re from .baseparser import ( Base_Parser, PhyloTree, ) class Newick_Parser(Base_Parser): """For parsing trees stored in the newick format (.nhx) It is necessarily more complex because this parser is later extended by Nexus for parsing newick as well..""" def __init__(self): super(...
44.229167
149
0.55358
import re from .baseparser import ( Base_Parser, PhyloTree, ) class Newick_Parser(Base_Parser): def __init__(self): super().__init__() def parseFile(self, filePath): with open(filePath) as newickFile: newickString = newickFile.read() newickString = newickStri...
true
true
1c091de45649c08bf3b81f0690e35acbb0fdb707
291
py
Python
zhihuCrawl/zhihuCrawl/pipelines.py
MisterZhouZhou/pythonLearn
8933c7a6d444d3d86a173984e6cf4c08dbf84039
[ "Apache-2.0" ]
1
2019-07-09T09:59:39.000Z
2019-07-09T09:59:39.000Z
zhihuCrawl/zhihuCrawl/pipelines.py
MisterZhouZhou/pythonLearn
8933c7a6d444d3d86a173984e6cf4c08dbf84039
[ "Apache-2.0" ]
null
null
null
zhihuCrawl/zhihuCrawl/pipelines.py
MisterZhouZhou/pythonLearn
8933c7a6d444d3d86a173984e6cf4c08dbf84039
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html class ZhihucrawlPipeline(object): def process_item(self, item, spider): return item
24.25
65
0.714777
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html class ZhihucrawlPipeline(object): def process_item(self, item, spider): return item
true
true
1c091e5169f6efd5c55a6688579e5b16ae90cc8b
2,185
py
Python
src/smallboard.py
cbdm/tic-tac-ception
949479edcaaf70381238d5e2f280eb528d7e7ef4
[ "Apache-2.0" ]
null
null
null
src/smallboard.py
cbdm/tic-tac-ception
949479edcaaf70381238d5e2f280eb528d7e7ef4
[ "Apache-2.0" ]
7
2020-11-08T06:12:48.000Z
2021-12-04T01:53:33.000Z
src/smallboard.py
cbdm/tic-tac-ception
949479edcaaf70381238d5e2f280eb528d7e7ef4
[ "Apache-2.0" ]
null
null
null
"""smallboard.py Author: Caio Batista de Melo Date Created: 2020-11-06 Last Modified: 2020-11-07 Description: Implements a class to keep track of a basic tic-tac-toe game. """ from itertools import chain class SmallBoard(object): def __init__(self): self._board = [[None for _ in range(3)] for _ in range...
30.347222
84
0.569336
from itertools import chain class SmallBoard(object): def __init__(self): self._board = [[None for _ in range(3)] for _ in range(3)] self._winner = None def make_move(self, x, y, player): assert x < len(self._board) and y < len(self._board) assert player is not None a...
true
true
1c091ea7da8431ac73e6e91a06a5abb88ba3713d
287
py
Python
functions/getTags.py
mateusfg7/textAnalysis
3231597fb5534a7b3ae6ba0de0fb3583d7e12a0c
[ "MIT" ]
11
2019-09-16T19:47:33.000Z
2021-05-06T17:08:55.000Z
functions/getTags.py
mateusfg7/textAnalysis
3231597fb5534a7b3ae6ba0de0fb3583d7e12a0c
[ "MIT" ]
21
2019-09-14T18:59:07.000Z
2020-05-16T13:40:02.000Z
functions/getTags.py
mateusfg7/textAnalysis
3231597fb5534a7b3ae6ba0de0fb3583d7e12a0c
[ "MIT" ]
2
2020-04-28T19:50:30.000Z
2020-09-28T21:21:49.000Z
from typing import List, NoReturn def getTags(client: 'Client', text: str) -> NoReturn: from interface import texts print(texts.optionsTitle('tag')) algoritimo = client.algo('nlp/AutoTag/1.0.1') response: List[str] = algoritimo.pipe(text).result print(response)
22.076923
54
0.69338
from typing import List, NoReturn def getTags(client: 'Client', text: str) -> NoReturn: from interface import texts print(texts.optionsTitle('tag')) algoritimo = client.algo('nlp/AutoTag/1.0.1') response: List[str] = algoritimo.pipe(text).result print(response)
true
true
1c091ede26978d8461e5840e2d6577290167b3df
15,062
py
Python
tests/manage/pv_services/test_resource_deletion_during_pod_pvc_deletion.py
agarwal-mudit/ocs-ci
a27583a4aa6283850e1a5678e684701fd932ccda
[ "MIT" ]
null
null
null
tests/manage/pv_services/test_resource_deletion_during_pod_pvc_deletion.py
agarwal-mudit/ocs-ci
a27583a4aa6283850e1a5678e684701fd932ccda
[ "MIT" ]
null
null
null
tests/manage/pv_services/test_resource_deletion_during_pod_pvc_deletion.py
agarwal-mudit/ocs-ci
a27583a4aa6283850e1a5678e684701fd932ccda
[ "MIT" ]
1
2020-07-28T07:32:09.000Z
2020-07-28T07:32:09.000Z
import logging from concurrent.futures import ThreadPoolExecutor import pytest from functools import partial from ocs_ci.framework.testlib import ( ManageTest, tier4, tier4c, ignore_leftover_label ) from ocs_ci.framework import config from ocs_ci.ocs import constants from ocs_ci.ocs.resources.pvc import get_all_pv...
36.736585
86
0.586376
import logging from concurrent.futures import ThreadPoolExecutor import pytest from functools import partial from ocs_ci.framework.testlib import ( ManageTest, tier4, tier4c, ignore_leftover_label ) from ocs_ci.framework import config from ocs_ci.ocs import constants from ocs_ci.ocs.resources.pvc import get_all_pv...
true
true
1c091f78b7aa91422a3d2ee516a9ef58c9675a1d
5,723
py
Python
python/mesh/generic/tdmaCmdDict.py
MinesJA/meshNetwork
5ffada57c13049cb00c2996fe239cdff6edf6f17
[ "NASA-1.3" ]
133
2017-06-24T02:44:28.000Z
2022-03-25T05:17:00.000Z
python/mesh/generic/tdmaCmdDict.py
MinesJA/meshNetwork
5ffada57c13049cb00c2996fe239cdff6edf6f17
[ "NASA-1.3" ]
null
null
null
python/mesh/generic/tdmaCmdDict.py
MinesJA/meshNetwork
5ffada57c13049cb00c2996fe239cdff6edf6f17
[ "NASA-1.3" ]
33
2017-06-19T03:24:40.000Z
2022-02-03T20:13:12.000Z
from mesh.generic.cmds import TDMACmds from mesh.generic.commandType import CommandType from struct import pack from mesh.generic.nodeHeader import headers from mesh.generic.nodeConfig import configHashSize # Serialize methods def serialize_TDMACmds_MeshStatus(cmdData, timestamp): return pack(TDMACmdDict[TDMA...
61.537634
188
0.739472
from mesh.generic.cmds import TDMACmds from mesh.generic.commandType import CommandType from struct import pack from mesh.generic.nodeHeader import headers from mesh.generic.nodeConfig import configHashSize def serialize_TDMACmds_MeshStatus(cmdData, timestamp): return pack(TDMACmdDict[TDMACmds['MeshStatus']]....
true
true
1c09204604f1db319dca26a5d9f04713ae4f8730
709
py
Python
shaman/providers/tmdb.py
walidsa3d/shaman
1e1ae9f418e0cd9afcd7bbd38827c8913520974b
[ "MIT" ]
2
2015-07-15T21:21:52.000Z
2021-11-29T02:34:27.000Z
shaman/providers/tmdb.py
walidsa3d/movieinfo
1e1ae9f418e0cd9afcd7bbd38827c8913520974b
[ "MIT" ]
null
null
null
shaman/providers/tmdb.py
walidsa3d/movieinfo
1e1ae9f418e0cd9afcd7bbd38827c8913520974b
[ "MIT" ]
null
null
null
import tmdbsimple as tmd from models import Movie class tmdb(object): def __init__(self, apikey): self.apikey = apikey tmd.API_KEY = apikey def search(self, query): search = tmd.Search() results = [] search.movie(query=query) for s in search.results: ...
25.321429
80
0.565585
import tmdbsimple as tmd from models import Movie class tmdb(object): def __init__(self, apikey): self.apikey = apikey tmd.API_KEY = apikey def search(self, query): search = tmd.Search() results = [] search.movie(query=query) for s in search.results: ...
true
true
1c09205af3589307a2cf152ed9dffd6bd3f5e168
267
py
Python
torabot/frontend/admin/__init__.py
Answeror/torabot
b6260190ec1f0dc8bf3f7ba3512c0522668c59ed
[ "MIT" ]
42
2015-01-20T10:45:08.000Z
2021-04-17T05:10:27.000Z
torabot/frontend/admin/__init__.py
Answeror/torabot
b6260190ec1f0dc8bf3f7ba3512c0522668c59ed
[ "MIT" ]
4
2015-01-23T05:40:44.000Z
2016-12-19T03:52:20.000Z
torabot/frontend/admin/__init__.py
Answeror/torabot
b6260190ec1f0dc8bf3f7ba3512c0522668c59ed
[ "MIT" ]
8
2015-05-07T03:51:05.000Z
2019-03-20T05:40:47.000Z
from flask import Blueprint bp = Blueprint( 'admin', __name__, static_folder='static', template_folder='templates', static_url_path='/admin/static', url_prefix='/admin' ) from .main import * def make(app): app.register_blueprint(bp)
14.052632
36
0.670412
from flask import Blueprint bp = Blueprint( 'admin', __name__, static_folder='static', template_folder='templates', static_url_path='/admin/static', url_prefix='/admin' ) from .main import * def make(app): app.register_blueprint(bp)
true
true
1c09212af603570e7fc9322ad7eb072c49bbe3e6
3,521
py
Python
libs/copy_study.py
jakehemmerle/beiwe-backend
fd7765a348a0d497341cf084bb4da0c0805748bd
[ "BSD-3-Clause" ]
null
null
null
libs/copy_study.py
jakehemmerle/beiwe-backend
fd7765a348a0d497341cf084bb4da0c0805748bd
[ "BSD-3-Clause" ]
67
2020-05-22T20:34:52.000Z
2021-07-28T14:26:57.000Z
libs/copy_study.py
tx-covid19/beiwe-backend-serverless
b154110c8543e4317d3295c0e8225e9a97b1aad4
[ "BSD-3-Clause" ]
2
2020-04-03T23:24:56.000Z
2020-04-13T14:29:02.000Z
import json from os import path from flask import flash, request from database.study_models import Study, Survey def copy_existing_study_if_asked_to(new_study): if request.form.get('copy_existing_study', 'false') == 'true': old_study = Study.objects.get(pk=request.form.get('existing_study_id', None)) ...
44.0125
105
0.667708
import json from os import path from flask import flash, request from database.study_models import Study, Survey def copy_existing_study_if_asked_to(new_study): if request.form.get('copy_existing_study', 'false') == 'true': old_study = Study.objects.get(pk=request.form.get('existing_study_id', None)) ...
true
true
1c09213d4d61610137cd8e3f3a01f568d02a9923
1,477
py
Python
derrida/places/views.py
making-books-ren-today/test_eval_4_derrmar
615796efeb517cd12cfb1f8b67e0150f6aaaea66
[ "Apache-2.0" ]
11
2017-04-27T19:28:54.000Z
2021-02-10T23:44:39.000Z
derrida/places/views.py
making-books-ren-today/test_eval_4_derrmar
615796efeb517cd12cfb1f8b67e0150f6aaaea66
[ "Apache-2.0" ]
280
2017-03-02T14:23:18.000Z
2021-12-01T14:16:48.000Z
derrida/places/views.py
making-books-ren-today/test_eval_4_derrmar
615796efeb517cd12cfb1f8b67e0150f6aaaea66
[ "Apache-2.0" ]
null
null
null
from django.http import JsonResponse from dal import autocomplete from .geonames import GeoNamesAPI from .models import Place class PlaceAutocomplete(autocomplete.Select2QuerySetView): '''Basic place ajax autocomplete lookup, based on django-autocomplete-light. Currently restricted to staff only.''' #...
34.348837
72
0.626947
from django.http import JsonResponse from dal import autocomplete from .geonames import GeoNamesAPI from .models import Place class PlaceAutocomplete(autocomplete.Select2QuerySetView): def get_queryset(self): return Place.objects.filter(name__istartswith=self.q) class GeonamesLookup(autocomplete.Se...
true
true
1c0921eaffe83e8e4ca9a492523df841d68a64d4
11,500
py
Python
salt/pillar/s3.py
jbq/pkg-salt
b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3
[ "Apache-2.0" ]
1
2020-09-16T21:31:02.000Z
2020-09-16T21:31:02.000Z
salt/pillar/s3.py
jbq/pkg-salt
b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3
[ "Apache-2.0" ]
null
null
null
salt/pillar/s3.py
jbq/pkg-salt
b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Copy pillar data from a bucket in Amazon S3 The S3 pillar can be configured in the master config file with the following options .. code-block:: yaml ext_pillar: - s3: bucket: my.fancy.pillar.bucket keyid: KASKFJWAKJASJKDAJKSD key: ksladfDLKDALSFKSD...
30.831099
86
0.651391
from __future__ import absolute_import import logging import os import time import pickle from copy import deepcopy import salt.ext.six as six from salt.ext.six.moves import filter from salt.ext.six.moves.urllib.parse import quote as _quote from salt.pillar import Pillar import salt.utils import salt.utils.s3 as s3 ...
true
true
1c0922d07de669b2b656a66af31724e0d7d14582
18,316
py
Python
zvmsdk/returncode.py
IBMCaoBiao/python-zvm-sdk
655e701cf3f90c57b0969c1f9971541ab38cedc4
[ "Apache-2.0" ]
1
2017-08-17T06:31:33.000Z
2017-08-17T06:31:33.000Z
zvmsdk/returncode.py
SharpRazor/python-zvm-sdk
655e701cf3f90c57b0969c1f9971541ab38cedc4
[ "Apache-2.0" ]
1
2019-12-10T08:38:01.000Z
2019-12-10T08:38:01.000Z
zvmsdk/returncode.py
SharpRazor/python-zvm-sdk
655e701cf3f90c57b0969c1f9971541ab38cedc4
[ "Apache-2.0" ]
null
null
null
# Copyright 2017,2020 IBM Corp. # # 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 agr...
50.4573
79
0.496451
ModRCs = { 'smt': 1, 'guest': 10, 'network': 20, 'volume': 30, 'image': 40, 'monitor': 50, 'file': 60, 'sdkserver': 100, 'sdkwsgi': 120, 'zvmsdk': 400 } errors = { 'input': [{'overallRC': 100, 'modID': ModRCs['zvmsdk'], 'rc': 100}, ...
true
true
1c092360ea06552cfccb7c5bb7a102775eb2373b
12,082
py
Python
retriever/lib/engine_tools.py
piyushchauhan/retriever
c5197332603c8236ab3543eb0150ef0130240414
[ "MIT" ]
null
null
null
retriever/lib/engine_tools.py
piyushchauhan/retriever
c5197332603c8236ab3543eb0150ef0130240414
[ "MIT" ]
1
2019-03-11T04:34:06.000Z
2019-03-11T04:34:06.000Z
retriever/lib/engine_tools.py
piyushchauhan/retriever
c5197332603c8236ab3543eb0150ef0130240414
[ "MIT" ]
null
null
null
"""Data Retriever Tools This module contains miscellaneous classes and functions used in Retriever scripts. """ from __future__ import print_function from future import standard_library standard_library.install_aliases() import difflib import json import platform import shutil import subprocess import warnings fr...
34.52
99
0.608922
from __future__ import print_function from future import standard_library standard_library.install_aliases() import difflib import json import platform import shutil import subprocess import warnings from hashlib import md5 from io import StringIO as NewFile from retriever.lib.defaults import HOME_DIR from retriev...
true
true
1c0923b0e0593c1807a8e583d3bdb09cec3f3699
23,023
py
Python
indico/modules/events/registration/forms.py
errikos/indico
72b75d63a896e5defb8e9acf64fe147748c7ccce
[ "MIT" ]
null
null
null
indico/modules/events/registration/forms.py
errikos/indico
72b75d63a896e5defb8e9acf64fe147748c7ccce
[ "MIT" ]
null
null
null
indico/modules/events/registration/forms.py
errikos/indico
72b75d63a896e5defb8e9acf64fe147748c7ccce
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import time from operator import itemgetter import jsonschema from flask import request fro...
56.017032
120
0.619858
from datetime import time from operator import itemgetter import jsonschema from flask import request from wtforms.fields import BooleanField, FloatField, HiddenField, IntegerField, SelectField, StringField, TextAreaField from wtforms.fields.html5 import DecimalField, EmailField from wtforms.validators import DataReq...
true
true
1c092463f75a2c01bdafe7fc477d26c9163c1427
1,083
py
Python
djangoblog/feeds.py
n1celll/DjangoBlog
c7541202e53001d0baa887004b02a6f0a84a1aec
[ "MIT" ]
5,052
2016-11-06T15:51:59.000Z
2022-03-31T03:42:50.000Z
djangoblog/feeds.py
gold9527/DjangoBlog
6512ab7542c96364f593b9be221cdc74ecfa6a0d
[ "MIT" ]
497
2017-03-24T02:57:29.000Z
2022-03-31T03:21:16.000Z
djangoblog/feeds.py
gold9527/DjangoBlog
6512ab7542c96364f593b9be221cdc74ecfa6a0d
[ "MIT" ]
2,565
2016-11-06T15:56:33.000Z
2022-03-31T14:15:31.000Z
from datetime import datetime from django.contrib.auth import get_user_model from django.contrib.syndication.views import Feed from django.utils.feedgenerator import Rss201rev2Feed from djangoblog.utils import CommonMarkdown from blog.models import Article class DjangoBlogFeed(Feed): feed_type = Rss201rev2Feed ...
25.785714
85
0.697138
from datetime import datetime from django.contrib.auth import get_user_model from django.contrib.syndication.views import Feed from django.utils.feedgenerator import Rss201rev2Feed from djangoblog.utils import CommonMarkdown from blog.models import Article class DjangoBlogFeed(Feed): feed_type = Rss201rev2Feed ...
true
true
1c09248e9c75724bdee66e6a3f3ba8c72f8d945a
466
py
Python
src/python/backends/py/runtime/currylib/prelude/basic.py
andyjost/Sprite
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
[ "MIT" ]
1
2022-03-16T16:37:11.000Z
2022-03-16T16:37:11.000Z
src/python/backends/py/runtime/currylib/prelude/basic.py
andyjost/Sprite
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
[ "MIT" ]
null
null
null
src/python/backends/py/runtime/currylib/prelude/basic.py
andyjost/Sprite
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
[ "MIT" ]
null
null
null
from ......exceptions import EvaluationError __all__ = ['choice', 'error', 'failed', 'not_used'] def choice(rts, _0): yield rts.prelude._Choice yield next(rts.idfactory) yield _0.successors[0] yield _0.successors[1] def error(rts, msg): msg = str(rts.topython(msg)) raise EvaluationError(msg) def failed(...
22.190476
82
0.706009
from ......exceptions import EvaluationError __all__ = ['choice', 'error', 'failed', 'not_used'] def choice(rts, _0): yield rts.prelude._Choice yield next(rts.idfactory) yield _0.successors[0] yield _0.successors[1] def error(rts, msg): msg = str(rts.topython(msg)) raise EvaluationError(msg) def failed(...
true
true
1c0924b3c94b73df08a27f601dbd5e5a3762e288
1,221
py
Python
ampel/alert/reject/FullAlertRegister.py
AmpelProject/Ampel-alerts
ccf2b825e63899f856e91f64fd1a5174ce8704be
[ "BSD-3-Clause" ]
null
null
null
ampel/alert/reject/FullAlertRegister.py
AmpelProject/Ampel-alerts
ccf2b825e63899f856e91f64fd1a5174ce8704be
[ "BSD-3-Clause" ]
15
2020-11-05T13:09:19.000Z
2022-03-21T04:48:13.000Z
ampel/alert/reject/FullAlertRegister.py
AmpelProject/Ampel-alerts
ccf2b825e63899f856e91f64fd1a5174ce8704be
[ "BSD-3-Clause" ]
1
2022-03-10T14:11:25.000Z
2022-03-10T14:11:25.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # File : Ampel-alerts/ampel/alert/reject/FullAlertRegister.py # License : BSD-3-Clause # Author : vb <vbrinnel@physik.hu-berlin.de> # Date : 14.05.2020 # Last Modified Date: 26.05.2020 # Last Modified By : vb <vbrinnel@physik....
34.885714
84
0.692056
from time import time from struct import pack from typing import Optional, Tuple, Literal, Union, BinaryIO, List, ClassVar from ampel.alert.AmpelAlert import AmpelAlert from ampel.alert.reject.BaseAlertRegister import BaseAlertRegister class FullAlertRegister(BaseAlertRegister): __slots__: ClassVar[Tuple[str, ...]...
true
true
1c092562f45dc47b0aadce6b96849badd1063228
488
py
Python
7/main.py
pauvrepetit/leetcode
6ad093cf543addc4dfa52d72a8e3c0d05a23b771
[ "MIT" ]
null
null
null
7/main.py
pauvrepetit/leetcode
6ad093cf543addc4dfa52d72a8e3c0d05a23b771
[ "MIT" ]
null
null
null
7/main.py
pauvrepetit/leetcode
6ad093cf543addc4dfa52d72a8e3c0d05a23b771
[ "MIT" ]
null
null
null
class Solution: def reverse(self, x: int) -> int: if x <= 0: sign = 1 x = -x else: sign = 0 str_x = str(x) str_x = str_x[-1::-1] x_reverse = int(str_x) if sign == 1: x_reverse = -x_reverse if x_reverse < -2 ** 31...
23.238095
61
0.477459
class Solution: def reverse(self, x: int) -> int: if x <= 0: sign = 1 x = -x else: sign = 0 str_x = str(x) str_x = str_x[-1::-1] x_reverse = int(str_x) if sign == 1: x_reverse = -x_reverse if x_reverse < -2 ** 31...
true
true
1c09272c3452f85f5df896c51b7b39c0049e7071
522
py
Python
custom/icds_reports/migrations/0127_thr_report_view.py
kkrampa/commcare-hq
d64d7cad98b240325ad669ccc7effb07721b4d44
[ "BSD-3-Clause" ]
1
2020-05-05T13:10:01.000Z
2020-05-05T13:10:01.000Z
custom/icds_reports/migrations/0127_thr_report_view.py
kkrampa/commcare-hq
d64d7cad98b240325ad669ccc7effb07721b4d44
[ "BSD-3-Clause" ]
1
2019-12-09T14:00:14.000Z
2019-12-09T14:00:14.000Z
custom/icds_reports/migrations/0127_thr_report_view.py
MaciejChoromanski/commcare-hq
fd7f65362d56d73b75a2c20d2afeabbc70876867
[ "BSD-3-Clause" ]
5
2015-11-30T13:12:45.000Z
2019-07-01T19:27:07.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-06-24 from __future__ import absolute_import, unicode_literals from django.db import migrations from corehq.sql_db.operations import RawSQLMigration migrator = RawSQLMigration(('custom', 'icds_reports', 'migrations', 'sql_templates', 'database_views')) ...
24.857143
103
0.722222
from __future__ import absolute_import, unicode_literals from django.db import migrations from corehq.sql_db.operations import RawSQLMigration migrator = RawSQLMigration(('custom', 'icds_reports', 'migrations', 'sql_templates', 'database_views')) class Migration(migrations.Migration): dependencies = [ ...
true
true
1c092752c585b244db9f671e742fafbe128de9bf
874
py
Python
database.py
znmbrk/Ancient-Combat
71eca3af8e5ab6eaee6b3066ad6992e027266893
[ "MIT" ]
null
null
null
database.py
znmbrk/Ancient-Combat
71eca3af8e5ab6eaee6b3066ad6992e027266893
[ "MIT" ]
null
null
null
database.py
znmbrk/Ancient-Combat
71eca3af8e5ab6eaee6b3066ad6992e027266893
[ "MIT" ]
null
null
null
import sqlalchemy from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base engine = sqlalchemy.create_engine('sqlite:///database.db', echo=False) Session = sessionmaker(bind=engine) db = declarative_base() session = Session() create = True class Users(db): __table...
29.133333
85
0.716247
import sqlalchemy from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base engine = sqlalchemy.create_engine('sqlite:///database.db', echo=False) Session = sessionmaker(bind=engine) db = declarative_base() session = Session() create = True class Users(db): __table...
true
true
1c0928df1a0a0c46289acd7d7b8d60293b560245
718
py
Python
test/arch/test_arch.py
rakati/ppci-mirror
8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2
[ "BSD-2-Clause" ]
161
2020-05-31T03:29:42.000Z
2022-03-07T08:36:19.000Z
test/arch/test_arch.py
rakati/ppci-mirror
8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2
[ "BSD-2-Clause" ]
74
2020-05-26T18:05:48.000Z
2021-02-13T21:55:39.000Z
test/arch/test_arch.py
rakati/ppci-mirror
8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2
[ "BSD-2-Clause" ]
19
2020-05-27T19:22:11.000Z
2022-02-17T18:53:52.000Z
""" Test architecture related classes """ import unittest from ppci.arch.stack import Frame, FramePointerLocation class FrameTestCase(unittest.TestCase): """ Test the stack frame """ def test_fp_at_top_alignment(self): frame = Frame('test', fp_location=FramePointerLocation.TOP) location = fr...
28.72
70
0.692201
import unittest from ppci.arch.stack import Frame, FramePointerLocation class FrameTestCase(unittest.TestCase): def test_fp_at_top_alignment(self): frame = Frame('test', fp_location=FramePointerLocation.TOP) location = frame.alloc(5, 4) self.assertEqual(-8, location.offset) self....
true
true
1c09296a312355e93a8becb8ad6063e75ad95c8c
19,448
py
Python
azure/mgmt/network/v2015_06_15/operations/network_security_groups_operations.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
azure/mgmt/network/v2015_06_15/operations/network_security_groups_operations.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
azure/mgmt/network/v2015_06_15/operations/network_security_groups_operations.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
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 ...
46.085308
159
0.66449
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller from .. import models class NetworkSecurityGroupsOperations(object): def __init__(self, client, config, serializer, deserializer): ...
true
true
1c092aca6b3f853239d868cb6f39a2100f72b1a5
3,099
py
Python
test/functional/mining_getblocktemplate_longpoll.py
billetcoin/billetcoin
7dcd673ca4e836290a637ed2b86da9d821e33fdc
[ "MIT" ]
3
2020-07-02T16:09:55.000Z
2020-12-03T18:14:52.000Z
test/functional/mining_getblocktemplate_longpoll.py
billetcoin/billetcoin
7dcd673ca4e836290a637ed2b86da9d821e33fdc
[ "MIT" ]
1
2021-02-08T10:48:15.000Z
2021-02-08T10:48:15.000Z
test/functional/mining_getblocktemplate_longpoll.py
billetcoin/billetcoin
7dcd673ca4e836290a637ed2b86da9d821e33fdc
[ "MIT" ]
6
2020-06-23T20:57:35.000Z
2020-12-03T18:18:14.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test longpolling with getblocktemplate.""" from test_framework.test_framework import BilletcoinTestFra...
43.041667
112
0.682801
from test_framework.test_framework import BilletcoinTestFramework from test_framework.util import * import threading class LongpollThread(threading.Thread): def __init__(self, node): threading.Thread.__init__(self) templat = node.getblocktemplate() self.longpollid = templat['longp...
true
true
1c092aec47348bcab2889345cbc443fb000dabdb
11,786
py
Python
DaVE/dave/mprobo/reportgen.py
upscale-project/hslink_phy
741f78da673d2e633da05d292aa6645125ebae32
[ "BSD-3-Clause" ]
6
2019-07-16T19:40:46.000Z
2021-10-05T02:33:00.000Z
DaVE/dave/mprobo/reportgen.py
upscale-project/hslink_phy
741f78da673d2e633da05d292aa6645125ebae32
[ "BSD-3-Clause" ]
1
2019-06-06T02:15:54.000Z
2019-07-19T23:32:40.000Z
DaVE/dave/mprobo/reportgen.py
upscale-project/hslink_phy
741f78da673d2e633da05d292aa6645125ebae32
[ "BSD-3-Clause" ]
3
2020-06-20T19:19:50.000Z
2021-03-28T08:20:57.000Z
# Generate checking report in PDF import numpy as np import copy import operator from dave.common.misc import to_engr, add_column_list, get_absmax, get_letter_index import linearregression as lr import htmlamschk as ht from dave.common.davelogger import DaVELogger from environ import EnvTestcfgPort, EnvSimcfg, EnvPort...
40.641379
255
0.667657
import numpy as np import copy import operator from dave.common.misc import to_engr, add_column_list, get_absmax, get_letter_index import linearregression as lr import htmlamschk as ht from dave.common.davelogger import DaVELogger from environ import EnvTestcfgPort, EnvSimcfg, EnvPortName from dave.mprobo.checker impo...
true
true
1c092bb32cf0bd9f80eba359a71a7ce1fcb2dadc
34
py
Python
nelder_mead/__init__.py
omershalev/nelder_mead
638f75b6c071b55dfac09cadbf4f6fcbe8ce245e
[ "MIT" ]
1
2020-01-27T16:19:56.000Z
2020-01-27T16:19:56.000Z
nelder_mead/__init__.py
omershalev/nelder_mead
638f75b6c071b55dfac09cadbf4f6fcbe8ce245e
[ "MIT" ]
null
null
null
nelder_mead/__init__.py
omershalev/nelder_mead
638f75b6c071b55dfac09cadbf4f6fcbe8ce245e
[ "MIT" ]
1
2019-05-09T08:19:51.000Z
2019-05-09T08:19:51.000Z
from nelder_mead import NelderMead
34
34
0.911765
from nelder_mead import NelderMead
true
true
1c092c40930239f3d1ce9ca910a6dc6b1cc0e6b2
6,366
py
Python
homeassistant/components/netatmo/data_handler.py
mazzy89/core
416d91ba8565e77480f4d287e70d88ef1cf17b37
[ "Apache-2.0" ]
1
2022-01-29T23:22:42.000Z
2022-01-29T23:22:42.000Z
homeassistant/components/netatmo/data_handler.py
mazzy89/core
416d91ba8565e77480f4d287e70d88ef1cf17b37
[ "Apache-2.0" ]
2
2020-09-18T02:22:50.000Z
2020-10-15T06:46:34.000Z
homeassistant/components/netatmo/data_handler.py
mazzy89/core
416d91ba8565e77480f4d287e70d88ef1cf17b37
[ "Apache-2.0" ]
1
2020-11-18T21:04:18.000Z
2020-11-18T21:04:18.000Z
"""The Netatmo data handler.""" from __future__ import annotations import asyncio from collections import deque from datetime import timedelta from itertools import islice import logging from time import time import pyatmo from homeassistant.config_entries import ConfigEntry from homeassistant.core import CALLBACK_T...
32.814433
88
0.673421
from __future__ import annotations import asyncio from collections import deque from datetime import timedelta from itertools import islice import logging from time import time import pyatmo from homeassistant.config_entries import ConfigEntry from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback fro...
true
true
1c092d6681b8d4dc4261e9a6a3ce965d48e4ceb5
7,129
py
Python
spektral/datasets/tud.py
cgarciae/spektral
34d71510791091754b6b21a01b6b91fc3e92d84c
[ "MIT" ]
1
2020-03-18T20:30:10.000Z
2020-03-18T20:30:10.000Z
spektral/datasets/tud.py
cgarciae/spektral
34d71510791091754b6b21a01b6b91fc3e92d84c
[ "MIT" ]
null
null
null
spektral/datasets/tud.py
cgarciae/spektral
34d71510791091754b6b21a01b6b91fc3e92d84c
[ "MIT" ]
1
2020-09-18T19:54:31.000Z
2020-09-18T19:54:31.000Z
import os import shutil import zipfile import networkx as nx import numpy as np import pandas as pd import requests from sklearn.preprocessing import OneHotEncoder, StandardScaler from spektral.utils import nx_to_numpy DATASET_URL = 'https://ls11-www.cs.tu-dortmund.de/people/morris/graphkerneldatasets' DATASET_CLEAN...
33.313084
103
0.642867
import os import shutil import zipfile import networkx as nx import numpy as np import pandas as pd import requests from sklearn.preprocessing import OneHotEncoder, StandardScaler from spektral.utils import nx_to_numpy DATASET_URL = 'https://ls11-www.cs.tu-dortmund.de/people/morris/graphkerneldatasets' DATASET_CLEAN...
true
true
1c092e1a67d018dccdb2f40bc278f983b962f2af
1,087
py
Python
unittests/test_sports.py
Gerrit-van-Niekerk/span-test
a04527724333f64722ad3f52771544793ef38d4a
[ "MIT" ]
null
null
null
unittests/test_sports.py
Gerrit-van-Niekerk/span-test
a04527724333f64722ad3f52771544793ef38d4a
[ "MIT" ]
null
null
null
unittests/test_sports.py
Gerrit-van-Niekerk/span-test
a04527724333f64722ad3f52771544793ef38d4a
[ "MIT" ]
null
null
null
from unittest import TestCase from base_types import MatchCard, Team from sports import Soccer class TestSoccer(TestCase): def setUp(self) -> None: self.soccer = Soccer() def test_apply_scores(self): teams = {} match = MatchCard("t_home", 1, "t_guest", 3) self.soccer.apply_s...
26.512195
52
0.582337
from unittest import TestCase from base_types import MatchCard, Team from sports import Soccer class TestSoccer(TestCase): def setUp(self) -> None: self.soccer = Soccer() def test_apply_scores(self): teams = {} match = MatchCard("t_home", 1, "t_guest", 3) self.soccer.apply_s...
true
true
1c092e55cfa04f94cec1a03a3ea75f74df1daf7c
26,952
py
Python
objbrowser/objectbrowser.py
NicoRyberg/objbrowser
deb887fe4f16b82407bc747caafc48d6ed498045
[ "MIT" ]
1
2020-09-22T13:01:34.000Z
2020-09-22T13:01:34.000Z
objbrowser/objectbrowser.py
NicoRyberg/objbrowser
deb887fe4f16b82407bc747caafc48d6ed498045
[ "MIT" ]
null
null
null
objbrowser/objectbrowser.py
NicoRyberg/objbrowser
deb887fe4f16b82407bc747caafc48d6ed498045
[ "MIT" ]
null
null
null
""" Object browser GUI in Qt """ # TODO: # What to do when getmembers fails # call get_set descriptors (getters) in summary column. # ufuncs? # tool-tips # sphynx # qtpy from __future__ import absolute_import from __future__ import print_function import logging, traceback, hashlib, sys from objbrowser.qtpy import Q...
43.33119
120
0.640027
from __future__ import absolute_import from __future__ import print_function import logging, traceback, hashlib, sys from objbrowser.qtpy import QtCore, QtGui, QtWidgets from objbrowser.qtpy.QtCore import Slot from objbrowser.app import get_qapp, get_qsettings, start_qt_event_loop from objbrowser.version import PR...
true
true
1c092f7d7b8cc892d45c7bcea0cc69bd888c34b0
658
py
Python
src/_wl_globk_.py
softwarespartan/AGT
cdca4cdb81df2fd868ab4eb037e5ca68e266b27f
[ "MIT" ]
null
null
null
src/_wl_globk_.py
softwarespartan/AGT
cdca4cdb81df2fd868ab4eb037e5ca68e266b27f
[ "MIT" ]
null
null
null
src/_wl_globk_.py
softwarespartan/AGT
cdca4cdb81df2fd868ab4eb037e5ca68e266b27f
[ "MIT" ]
null
null
null
#!/usr/bin/python ''' Created on Mar 29, 2013 @author: abelbrown ''' import os, JobSpecification; class _wl_gamit_Exception(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) def main(): # get the input arguments without program name...
19.352941
57
0.642857
import os, JobSpecification; class _wl_gamit_Exception(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) def main(): args = os.sys.argv[1:]; spec = JobSpecification.JobSpecification('wl_globk'); job = sp...
true
true
1c092fd8ebb796e53ccc32b009c1b638e73b0e52
1,510
py
Python
popularity.py
f3ss1/WildHackPublic
7b7d85b116a60ff8143eb1a6e53afb1dbd30ceb7
[ "MIT" ]
1
2021-11-14T16:25:25.000Z
2021-11-14T16:25:25.000Z
popularity.py
f3ss1/WildHackPublic
7b7d85b116a60ff8143eb1a6e53afb1dbd30ceb7
[ "MIT" ]
null
null
null
popularity.py
f3ss1/WildHackPublic
7b7d85b116a60ff8143eb1a6e53afb1dbd30ceb7
[ "MIT" ]
1
2021-11-14T14:01:22.000Z
2021-11-14T14:01:22.000Z
import pickle from natasha import ( Doc, Segmenter, NewsEmbedding, NewsMorphTagger, MorphVocab ) from pandas import read_csv from navec import Navec from tqdm import tqdm PATH = 'navec_hudlit_v1_12B_500K_300d_100q.tar' # Name of file for Navec NAME = 'popularity' # Natasha Setup. segm = Segmen...
20.405405
73
0.658278
import pickle from natasha import ( Doc, Segmenter, NewsEmbedding, NewsMorphTagger, MorphVocab ) from pandas import read_csv from navec import Navec from tqdm import tqdm PATH = 'navec_hudlit_v1_12B_500K_300d_100q.tar' NAME = 'popularity' segm = Segmenter() _emb = NewsEmbedding() morph_tagger ...
true
true
1c093067c73300946078c0b8a9ce690f03c42a79
436
py
Python
src/log2mail/__init__.py
TheTimmoth/logdog
598f3a23064a76de3cbd5a4c3610c0e47c7270f2
[ "MIT" ]
null
null
null
src/log2mail/__init__.py
TheTimmoth/logdog
598f3a23064a76de3cbd5a4c3610c0e47c7270f2
[ "MIT" ]
null
null
null
src/log2mail/__init__.py
TheTimmoth/logdog
598f3a23064a76de3cbd5a4c3610c0e47c7270f2
[ "MIT" ]
null
null
null
"""Send an email Package name: log2mail Author: Tim Schlottmann Copyright (c) 2021 Tim Schlottmann License: `MIT`_ (Please look at license of surrounding project) This package contains `log2mail`, a module that sends an email. Functions: log2mail(str, str, str, str, str, str): sends an email .. _MIT: https:...
18.956522
63
0.722477
from .log2mail import log2mail __all__ = [ "log2mail", ]
true
true
1c093173bc8223460646e5c7a440a321f3957597
2,141
py
Python
dot_dna/primer.py
noatgnu/dotDNA
316aa159c914e39334d30d340fee1f067ce74e68
[ "MIT" ]
1
2021-02-09T08:51:18.000Z
2021-02-09T08:51:18.000Z
dot_dna/primer.py
noatgnu/dotDNA
316aa159c914e39334d30d340fee1f067ce74e68
[ "MIT" ]
null
null
null
dot_dna/primer.py
noatgnu/dotDNA
316aa159c914e39334d30d340fee1f067ce74e68
[ "MIT" ]
null
null
null
from xml.etree.ElementTree import Element class Primer: def __init__(self): self.strand = "0" self.start = 0 self.stop = 0 self.seq = "" self.temperature = 0 self.name = "" self.composition = {} self.length = 0 def from_element(self, element: Ele...
41.173077
201
0.555815
from xml.etree.ElementTree import Element class Primer: def __init__(self): self.strand = "0" self.start = 0 self.stop = 0 self.seq = "" self.temperature = 0 self.name = "" self.composition = {} self.length = 0 def from_element(self, element: Ele...
true
true
1c0931b105f7fe894baccb4c8f2f0e32f0856f82
9,885
py
Python
code/kos.py
chaluemwut/bigant
cc0ff5e8949a85dab4bda7c5a7a9b0368ce92981
[ "MIT" ]
null
null
null
code/kos.py
chaluemwut/bigant
cc0ff5e8949a85dab4bda7c5a7a9b0368ce92981
[ "MIT" ]
null
null
null
code/kos.py
chaluemwut/bigant
cc0ff5e8949a85dab4bda7c5a7a9b0368ce92981
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # test LDA import os import logging, gensim, bz2 ,numpy as np from gensim import corpora, models, similarities,utils import random,csv import timeit import time start_time = time.time() #nytimes 400 k week #pubmed 2000 k month #β = 0.01 #α =2/K #dictionary= corpora.ucicorpus...
36.476015
159
0.620132
import os import logging, gensim, bz2 ,numpy as np from gensim import corpora, models, similarities,utils import random,csv import timeit import time start_time = time.time() ant_count = 5 iterations = 7 PheromoneConstant = 1.0 DecayConstant = 0.2 Alpha = 1 Beta = 1 RANDOM = 1 CITY0 = 0 initializ...
false
true
1c09325a4e2d6d15dcbf70cab693fd03f26fb6e5
1,589
py
Python
NeuralNets/cnn.py
lucassid/nn
a53213a3670088772212f5108cd36c9e8e5fb7b7
[ "MIT" ]
2
2018-05-05T16:45:18.000Z
2018-06-08T13:40:53.000Z
NeuralNets/cnn.py
lucassid/nn
a53213a3670088772212f5108cd36c9e8e5fb7b7
[ "MIT" ]
1
2018-05-08T22:47:23.000Z
2018-05-08T23:17:44.000Z
NeuralNets/cnn.py
lucassid/nn
a53213a3670088772212f5108cd36c9e8e5fb7b7
[ "MIT" ]
null
null
null
import numpy from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense from keras.layers import Dropout from keras.layers import Flatten from keras.layers.convolutional import Conv2D from keras.layers.convolutional import MaxPooling2D from keras.utils import np_utils from keras...
33.808511
99
0.755192
import numpy from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense from keras.layers import Dropout from keras.layers import Flatten from keras.layers.convolutional import Conv2D from keras.layers.convolutional import MaxPooling2D from keras.utils import np_utils from keras...
true
true
1c0932866fadeadcd2c0b49303cbd5c82fc03a5e
101
py
Python
dimarray/convert/__init__.py
perrette/dimarray
b506a8cd05182f6af5578c4c0677b1accf2f2d07
[ "BSD-3-Clause" ]
11
2015-02-12T14:16:36.000Z
2019-04-09T18:03:22.000Z
dimarray/convert/__init__.py
perrette/dimarray
b506a8cd05182f6af5578c4c0677b1accf2f2d07
[ "BSD-3-Clause" ]
7
2015-05-04T22:30:11.000Z
2021-09-28T12:12:10.000Z
dimarray/convert/__init__.py
perrette/dimarray
b506a8cd05182f6af5578c4c0677b1accf2f2d07
[ "BSD-3-Clause" ]
null
null
null
""" This module handles conversions between various external data types such as iris and pandas """
25.25
72
0.772277
true
true
1c0932acab4bc41e785411107ec5ce5788e92730
1,206
py
Python
setup.py
mvwicky/wiki-graph
a88e2f37e7d5b5ba93bcca67544746d682936f41
[ "MIT" ]
null
null
null
setup.py
mvwicky/wiki-graph
a88e2f37e7d5b5ba93bcca67544746d682936f41
[ "MIT" ]
null
null
null
setup.py
mvwicky/wiki-graph
a88e2f37e7d5b5ba93bcca67544746d682936f41
[ "MIT" ]
null
null
null
from setuptools import setup # Package meta-data. NAME = 'wiki-graph' DESCRIPTION = 'Graph the connections formed by a single wikipedia page' URL = 'https://github.com/mvwicky/wiki-graph' EMAIL = 'mvanwickle@gmail.com' AUTHOR = 'Michael Van Wickle' VERSION = '0.1.2' # What packages are required for this module to be ...
25.125
76
0.643449
from setuptools import setup NAME = 'wiki-graph' DESCRIPTION = 'Graph the connections formed by a single wikipedia page' URL = 'https://github.com/mvwicky/wiki-graph' EMAIL = 'mvanwickle@gmail.com' AUTHOR = 'Michael Van Wickle' VERSION = '0.1.2' REQUIRED = [ 'attrs', 'bs4', 'click', 'colorama', 'p...
true
true
1c0933244cce9ea295cd61feaba7bfc35d2acbaf
826
py
Python
setup.py
geissdoerfer/polyprox
209d75318368c4df967581910c079ed1092c96bf
[ "MIT" ]
7
2019-08-06T08:00:53.000Z
2021-07-23T11:26:15.000Z
setup.py
geissdoerfer/polyprox
209d75318368c4df967581910c079ed1092c96bf
[ "MIT" ]
null
null
null
setup.py
geissdoerfer/polyprox
209d75318368c4df967581910c079ed1092c96bf
[ "MIT" ]
1
2019-08-06T08:05:32.000Z
2019-08-06T08:05:32.000Z
from setuptools import setup, Extension from setuptools.command.build_ext import build_ext as _build_ext class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_options(self) __builtins__.__NUMPY_SETUP__ = False import numpy self.include_dirs.append(numpy.get_...
29.5
64
0.707022
from setuptools import setup, Extension from setuptools.command.build_ext import build_ext as _build_ext class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_options(self) __builtins__.__NUMPY_SETUP__ = False import numpy self.include_dirs.append(numpy.get_...
true
true
1c093366f04d6aaad4c88a24475c81a720d31cbf
2,922
py
Python
pagarmeapisdk/models/create_three_d_secure_request.py
pagarme/pagarme-python-sdk
5a709ce54d46fc7326f73242700602c1c5a6bd26
[ "MIT" ]
null
null
null
pagarmeapisdk/models/create_three_d_secure_request.py
pagarme/pagarme-python-sdk
5a709ce54d46fc7326f73242700602c1c5a6bd26
[ "MIT" ]
null
null
null
pagarmeapisdk/models/create_three_d_secure_request.py
pagarme/pagarme-python-sdk
5a709ce54d46fc7326f73242700602c1c5a6bd26
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ pagarmeapisdk This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). """ class CreateThreeDSecureRequest(object): """Implementation of the 'CreateThreeDSecureRequest' model. Creates a 3D-S authentication payment Attributes: ...
31.76087
79
0.577002
class CreateThreeDSecureRequest(object): _names = { "mpi": 'mpi', "cavv": 'cavv', "eci": 'eci', "transaction_id": 'transaction_id', "success_url": 'success_url', "ds_transaction_id": 'ds_transaction_id', "version": 'version' } ...
true
true
1c09359a619d648090cc592a66c32a813ce30171
68
py
Python
worker/worker_tools/__init__.py
dpukhkaiev/BRISE2
647ad6d7cc5f91c188aa45e403d9c1a33a7fe947
[ "MIT" ]
4
2019-11-14T15:24:51.000Z
2020-05-22T08:15:58.000Z
worker/worker_tools/__init__.py
dpukhkaiev/BRISE2
647ad6d7cc5f91c188aa45e403d9c1a33a7fe947
[ "MIT" ]
1
2022-03-02T09:58:32.000Z
2022-03-02T09:58:32.000Z
worker/worker_tools/__init__.py
dpukhkaiev/BRISE2
647ad6d7cc5f91c188aa45e403d9c1a33a7fe947
[ "MIT" ]
5
2019-11-25T15:59:38.000Z
2021-11-02T11:49:41.000Z
__all__ = [ "reflective_worker_method_import", "splitter" ]
13.6
38
0.676471
__all__ = [ "reflective_worker_method_import", "splitter" ]
true
true
1c0935a805cfa1cd024f563dac4f0b02f4b5c795
60
py
Python
aa.py
ZiYin-ss/aa
0e7a3b710210b6cb6b29cac60d3f86afe6a470bc
[ "MIT" ]
null
null
null
aa.py
ZiYin-ss/aa
0e7a3b710210b6cb6b29cac60d3f86afe6a470bc
[ "MIT" ]
null
null
null
aa.py
ZiYin-ss/aa
0e7a3b710210b6cb6b29cac60d3f86afe6a470bc
[ "MIT" ]
null
null
null
print('hello world') print('我很帅') print('我不睡啊') print('你好')
12
20
0.65
print('hello world') print('我很帅') print('我不睡啊') print('你好')
true
true
1c093607494c526886d3939daeedf2a02881f5a5
8,890
py
Python
artifact_sdk/api/pkg/batch_update_package_permission_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
artifact_sdk/api/pkg/batch_update_package_permission_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
artifact_sdk/api/pkg/batch_update_package_permission_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: batch_update_package_permission.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message ...
43.15534
702
0.773453
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
1c09365122e0a951d16b453a4cb67034e7064d83
6,380
py
Python
sofia/corenlp_parse.py
spilioeve/WM-src
ba9265360bdac848b119ec11456b8f65bf2b1af8
[ "MIT" ]
2
2020-04-28T21:37:44.000Z
2020-05-05T14:28:11.000Z
sofia/corenlp_parse.py
spilioeve/WM-src
ba9265360bdac848b119ec11456b8f65bf2b1af8
[ "MIT" ]
1
2021-05-28T17:52:39.000Z
2021-05-28T20:56:13.000Z
sofia/corenlp_parse.py
spilioeve/WM-src
ba9265360bdac848b119ec11456b8f65bf2b1af8
[ "MIT" ]
3
2021-04-23T15:01:06.000Z
2021-07-30T22:41:50.000Z
verb_tags=["VB", "VBP", "VBD", "VBZ", "VBN", "VBG"] class DataExtractor: def __init__(self, annotations): self.annotations = annotations self.structuredData, self.sentences= self.structure_data() def structure_data(self): sentences=[] structured_data=[] data = self.an...
40.636943
128
0.507837
verb_tags=["VB", "VBP", "VBD", "VBZ", "VBN", "VBG"] class DataExtractor: def __init__(self, annotations): self.annotations = annotations self.structuredData, self.sentences= self.structure_data() def structure_data(self): sentences=[] structured_data=[] data = self.an...
true
true
1c093691937a3e037a06f45dfd087cc106864e6e
8,857
py
Python
cornac/models/cvaecf/recom_cvaecf.py
carmanzhang/cornac
215efd0ffa7b8ee1afe1ac6b5cc650ee6303ace3
[ "Apache-2.0" ]
597
2018-07-17T10:59:56.000Z
2022-03-31T07:59:36.000Z
cornac/models/cvaecf/recom_cvaecf.py
carmanzhang/cornac
215efd0ffa7b8ee1afe1ac6b5cc650ee6303ace3
[ "Apache-2.0" ]
137
2018-10-12T10:52:11.000Z
2022-03-04T15:26:49.000Z
cornac/models/cvaecf/recom_cvaecf.py
carmanzhang/cornac
215efd0ffa7b8ee1afe1ac6b5cc650ee6303ace3
[ "Apache-2.0" ]
112
2018-07-26T04:36:34.000Z
2022-03-31T02:29:34.000Z
# Copyright 2018 The Cornac 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 ...
35.286853
118
0.592187
import numpy as np from ..recommender import Recommender from ...exception import ScoreException class CVAECF(Recommender): def __init__( self, name="CVAECF", z_dim=20, h_dim=20, autoencoder_structure=[20], act_fn="tanh", likeli...
true
true
1c0936e76ed0e5b47f7bae48fb7646bbe5cbe6ce
6,114
py
Python
django_double_accounting/blackbook/views/accounts.py
bsiebens/django-double-accounting
b4c46bd0266bc93f4290d3c20beef99d3d65e3f3
[ "MIT" ]
null
null
null
django_double_accounting/blackbook/views/accounts.py
bsiebens/django-double-accounting
b4c46bd0266bc93f4290d3c20beef99d3d65e3f3
[ "MIT" ]
3
2021-12-07T21:19:33.000Z
2021-12-09T22:10:56.000Z
django_double_accounting/blackbook/views/accounts.py
bsiebens/django-double-accounting
b4c46bd0266bc93f4290d3c20beef99d3d65e3f3
[ "MIT" ]
null
null
null
from django.db.models import ProtectedError from django.shortcuts import render, get_object_or_404 from django.contrib.auth.decorators import login_required from django.urls import reverse from django.utils import timezone from django.db.models import Sum, Prefetch from django.db.models.functions import Coalesce from ...
47.765625
140
0.661106
from django.db.models import ProtectedError from django.shortcuts import render, get_object_or_404 from django.contrib.auth.decorators import login_required from django.urls import reverse from django.utils import timezone from django.db.models import Sum, Prefetch from django.db.models.functions import Coalesce from ...
true
true
1c0937d9f11c3ab2bc3ac83032d2edee86e7afac
4,189
py
Python
gram_matrix.py
AWNystrom/Kernels
8f6297dad159d36081ee1d2067dc57b8bde55189
[ "Apache-2.0" ]
null
null
null
gram_matrix.py
AWNystrom/Kernels
8f6297dad159d36081ee1d2067dc57b8bde55189
[ "Apache-2.0" ]
null
null
null
gram_matrix.py
AWNystrom/Kernels
8f6297dad159d36081ee1d2067dc57b8bde55189
[ "Apache-2.0" ]
null
null
null
from numpy import array, exp from numpy.random import choice from sklearn.base import TransformerMixin, BaseEstimator from code import interact from scipy.spatial.distance import euclidean def linear_kernel(a, b): return a.dot(b.T) def rbf(a, b, gamma=0.01): return exp(-gamma * euclidean(a, b)) def poly_kernel(...
35.5
116
0.607066
from numpy import array, exp from numpy.random import choice from sklearn.base import TransformerMixin, BaseEstimator from code import interact from scipy.spatial.distance import euclidean def linear_kernel(a, b): return a.dot(b.T) def rbf(a, b, gamma=0.01): return exp(-gamma * euclidean(a, b)) def poly_kernel(...
true
true
1c0938e061b48f15868c0fcb7b83ad792cfe6064
10,636
py
Python
myprojectenv/lib/python3.5/site-packages/ansible/modules/cloud/ovirt/ovirt_quotas.py
lancerenteria/doFlask
2d4e242469b108c6c8316ee18a540307497bfb53
[ "MIT" ]
null
null
null
myprojectenv/lib/python3.5/site-packages/ansible/modules/cloud/ovirt/ovirt_quotas.py
lancerenteria/doFlask
2d4e242469b108c6c8316ee18a540307497bfb53
[ "MIT" ]
null
null
null
myprojectenv/lib/python3.5/site-packages/ansible/modules/cloud/ovirt/ovirt_quotas.py
lancerenteria/doFlask
2d4e242469b108c6c8316ee18a540307497bfb53
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
35.335548
114
0.620628
ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: ovirt_quotas short_description: Module to manage datacenter quotas in oVirt/RHV version_added: "2.3" author: "Ondra Machacek (@machacekondra)" des...
true
true
1c093901b34ebd05deb2954b5f3849a004d000cf
15,687
py
Python
venv/lib/python2.7/site-packages/django/contrib/admindocs/views.py
tgsd96/gargnotes
4cb72b9b98f42287e13e80c4305c2446aac62bf5
[ "MIT" ]
2
2016-09-27T09:30:19.000Z
2016-10-17T01:47:43.000Z
venv/lib/python2.7/site-packages/django/contrib/admindocs/views.py
tgsd96/gargnotes
4cb72b9b98f42287e13e80c4305c2446aac62bf5
[ "MIT" ]
null
null
null
venv/lib/python2.7/site-packages/django/contrib/admindocs/views.py
tgsd96/gargnotes
4cb72b9b98f42287e13e80c4305c2446aac62bf5
[ "MIT" ]
1
2015-02-21T07:59:08.000Z
2015-02-21T07:59:08.000Z
from importlib import import_module import inspect import os import re import warnings from django import template from django.apps import apps from django.conf import settings from django.contrib import admin from django.contrib.admin.views.decorators import staff_member_required from django.db import models from dja...
39.315789
147
0.584369
from importlib import import_module import inspect import os import re import warnings from django import template from django.apps import apps from django.conf import settings from django.contrib import admin from django.contrib.admin.views.decorators import staff_member_required from django.db import models from dja...
true
true
1c09396679b2cdaa6f6ad462eb99b8ba6548208d
12,070
py
Python
code/python/SecuritizedDerivativesAPIforDigitalPortals/v2/fds/sdk/SecuritizedDerivativesAPIforDigitalPortals/model/securitized_derivative_notation_screener_value_ranges_get_data_validation_value_unit.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/SecuritizedDerivativesAPIforDigitalPortals/v2/fds/sdk/SecuritizedDerivativesAPIforDigitalPortals/model/securitized_derivative_notation_screener_value_ranges_get_data_validation_value_unit.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/SecuritizedDerivativesAPIforDigitalPortals/v2/fds/sdk/SecuritizedDerivativesAPIforDigitalPortals/model/securitized_derivative_notation_screener_value_ranges_get_data_validation_value_unit.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
""" Prime Developer Trial No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from fds.sdk.S...
46.068702
251
0.601326
import re import sys from fds.sdk.SecuritizedDerivativesAPIforDigitalPortals.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, ...
true
true
1c0939788306560c8aff69717246bace9d3167ab
3,250
py
Python
package/spack-nektar/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
1
2018-07-17T07:45:09.000Z
2018-07-17T07:45:09.000Z
package/spack-nektar/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
package/spack-nektar/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
############################################################################# # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647...
42.763158
96
0.653231
from spack import * class Nektar(CMakePackage): homepage = "https://www.nektar.info/" url = "https://gitlab.nektar.info/nektar/nektar/-/archive/v4.4.1/nektar-v4.4.1.tar.bz2" version('4.4.1', '1be7d061c3cafd9a0f1eb8d281d99b89') variant('mpi', default=True, description='Builds with mpi support')...
true
true
1c0939a3c2fa5a82cf3aabe45bbdc4ffd9da90e8
507
py
Python
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/ARB/conservative_depth.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
210
2016-04-09T14:26:00.000Z
2022-03-25T18:36:19.000Z
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/ARB/conservative_depth.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
72
2016-09-04T09:30:19.000Z
2022-03-27T17:06:53.000Z
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/ARB/conservative_depth.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
64
2016-04-09T14:26:49.000Z
2022-03-21T11:19:47.000Z
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _...
31.6875
119
0.794872
from OpenGL import platform as _p, arrays from OpenGL.raw.GL import _types as _cs from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _EXTENSION_NAME = 'GL_ARB_conservative_depth' def _f( function ): return _p.createFunction( function,_p.PLA...
true
true
1c093a3b0790dba44211dcc5071f66a18fe7df73
20,921
py
Python
A9/A9_20CS60R60/task2.py
rvravi77/Computing-Lab-2-CS69012
503e138ea7d69ddbe197e011a0b8ca60aa7c2425
[ "MIT" ]
1
2021-05-08T07:07:20.000Z
2021-05-08T07:07:20.000Z
A9/A9_20CS60R60/task2.py
rvravi77/Computing-Lab-2-CS69012
503e138ea7d69ddbe197e011a0b8ca60aa7c2425
[ "MIT" ]
null
null
null
A9/A9_20CS60R60/task2.py
rvravi77/Computing-Lab-2-CS69012
503e138ea7d69ddbe197e011a0b8ca60aa7c2425
[ "MIT" ]
1
2021-04-20T10:09:26.000Z
2021-04-20T10:09:26.000Z
# CS60012 A9 # task1 # Ravi Pratap Singh (20CS60R60) import urllib.request, urllib.error, urllib.parse import ply.lex as lex import ply.yacc as yacc import re import codecs import glob import os import unicodedata import sys #global variables to store required fields Movie_Name = [] Director = [] Writers = [] Producer...
33.743548
358
0.562832
import urllib.request, urllib.error, urllib.parse import ply.lex as lex import ply.yacc as yacc import re import codecs import glob import os import unicodedata import sys Movie_Name = [] Director = [] Writers = [] Producer = [] Original_Language = [] Cast_Character = [] Synopsys = [] Box_Office = [] Runtime = [] movi...
true
true
1c093ad78dd0bee44d81b0666276921ee41a73cd
435
py
Python
30-Day-Challange/Day-5/subarray_sum_equals_k.py
EashanKaushik/LeetCode
8ee2a61cefa42b332b6252fafff4a2772d25aa31
[ "Apache-2.0" ]
null
null
null
30-Day-Challange/Day-5/subarray_sum_equals_k.py
EashanKaushik/LeetCode
8ee2a61cefa42b332b6252fafff4a2772d25aa31
[ "Apache-2.0" ]
null
null
null
30-Day-Challange/Day-5/subarray_sum_equals_k.py
EashanKaushik/LeetCode
8ee2a61cefa42b332b6252fafff4a2772d25aa31
[ "Apache-2.0" ]
null
null
null
class Solution: def subarraySum(self, nums, k): sum_map = dict() sum_map[0] = 1 count = 0 curr_sum = 0 for num in nums: curr_sum += num if curr_sum - k in sum_map: count += sum_map[curr_sum - k] if curr_sum in sum_map: ...
21.75
46
0.462069
class Solution: def subarraySum(self, nums, k): sum_map = dict() sum_map[0] = 1 count = 0 curr_sum = 0 for num in nums: curr_sum += num if curr_sum - k in sum_map: count += sum_map[curr_sum - k] if curr_sum in sum_map: ...
true
true