hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f72333a6d2c63ba5422144f77ace3843512c1078
14,661
py
Python
cinder/volume/drivers/dell/dell_storagecenter_common.py
alexpilotti/cinder-ci-fixes
c0ed2ab8cc6b1197e426cd6c58c3b582624d1cfd
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/dell/dell_storagecenter_common.py
alexpilotti/cinder-ci-fixes
c0ed2ab8cc6b1197e426cd6c58c3b582624d1cfd
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/dell/dell_storagecenter_common.py
alexpilotti/cinder-ci-fixes
c0ed2ab8cc6b1197e426cd6c58c3b582624d1cfd
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Dell Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
41.769231
78
0.544506
from oslo_config import cfg from oslo_log import log as logging from oslo_utils import excutils from cinder import exception from cinder.i18n import _, _LE, _LW from cinder.volume.drivers.dell import dell_storagecenter_api from cinder.volume.drivers.san import san common_opts = [ cfg.IntOpt('dell_s...
true
true
f72333deff8a4bcf9a7c6709c2fa3551310f9ff5
12,891
py
Python
Py3DViewer/structures/Trimesh.py
hovey/py3DViewer
7ae1697aa4860430d0d94b854f8b1f2a4b2d895f
[ "MIT" ]
null
null
null
Py3DViewer/structures/Trimesh.py
hovey/py3DViewer
7ae1697aa4860430d0d94b854f8b1f2a4b2d895f
[ "MIT" ]
null
null
null
Py3DViewer/structures/Trimesh.py
hovey/py3DViewer
7ae1697aa4860430d0d94b854f8b1f2a4b2d895f
[ "MIT" ]
null
null
null
from .Abstractmesh import AbstractMesh import numpy as np from ..utils import IO, ObservableArray, deprecated, utilities from ..utils.load_operations import get_connectivity_info_surface as get_connectivity_info from ..utils.load_operations import compute_vertex_normals, compute_face_normals from ..utils.load_operatio...
33.483117
134
0.616321
from .Abstractmesh import AbstractMesh import numpy as np from ..utils import IO, ObservableArray, deprecated, utilities from ..utils.load_operations import get_connectivity_info_surface as get_connectivity_info from ..utils.load_operations import compute_vertex_normals, compute_face_normals from ..utils.load_operatio...
true
true
f723344f24fecf2c220f77795855aaec82f60dcc
27,851
py
Python
cerberus/client.py
towermagi/cerberus-python-client
ef38356822e722fcb6a6ed4a1b38a5b493e753ae
[ "Apache-2.0" ]
null
null
null
cerberus/client.py
towermagi/cerberus-python-client
ef38356822e722fcb6a6ed4a1b38a5b493e753ae
[ "Apache-2.0" ]
null
null
null
cerberus/client.py
towermagi/cerberus-python-client
ef38356822e722fcb6a6ed4a1b38a5b493e753ae
[ "Apache-2.0" ]
null
null
null
""" Copyright 2016-present Nike, Inc. Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, so...
41.818318
124
0.637787
from __future__ import print_function import requests from .aws_auth import AWSAuth from .user_auth import UserAuth from . import CerberusClientException, CLIENT_VERSION from .util import throw_if_bad_response, get_with_retry, post_with_retry, put_with_retry, delete_with_retry, head_with_retry import ast import jso...
true
true
f7233563446d2d7e1ced2469a7d923c062a2ff32
69,830
py
Python
Python-3.7.12/Lib/asyncio/base_events.py
TimS-ml/CPython-internals-Note
8dcf9e9db3a42926689ed426ec271bcae7db8178
[ "Xnet", "X11" ]
1,738
2017-09-21T10:59:12.000Z
2022-03-31T21:05:46.000Z
Python-3.7.12/Lib/asyncio/base_events.py
TimS-ml/CPython-internals-Note
8dcf9e9db3a42926689ed426ec271bcae7db8178
[ "Xnet", "X11" ]
427
2017-09-29T22:54:36.000Z
2022-02-15T19:26:50.000Z
Python-3.7.12/Lib/asyncio/base_events.py
TimS-ml/CPython-internals-Note
8dcf9e9db3a42926689ed426ec271bcae7db8178
[ "Xnet", "X11" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
"""Base implementation of event loop. The event loop can be broken up into a multiplexer (the part responsible for notifying us of I/O events) and the event loop proper, which wraps a multiplexer with functionality for scheduling callbacks, immediately or at a given time in the future. Whenever a public API takes a c...
38.537528
83
0.568609
import collections import collections.abc import concurrent.futures import heapq import itertools import logging import os import socket import subprocess import threading import time import traceback import sys import warnings import weakref try: import ssl except ImportError: ssl = None from . import con...
true
true
f7233710fba4a95cd8b296a5f05d5e35c418997d
1,867
py
Python
pytglib/api/functions/search_secret_messages.py
iTeam-co/pytglib
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
6
2019-10-30T08:57:27.000Z
2021-02-08T14:17:43.000Z
pytglib/api/functions/search_secret_messages.py
iTeam-co/python-telegram
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
1
2021-08-19T05:44:10.000Z
2021-08-19T07:14:56.000Z
pytglib/api/functions/search_secret_messages.py
iTeam-co/python-telegram
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
5
2019-12-04T05:30:39.000Z
2021-05-21T18:23:32.000Z
from ..utils import Object class SearchSecretMessages(Object): """ Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance the number of returned messages is chosen by the library Attributes: ID (:obj:`str`): ``SearchSecretMessages`` ...
38.102041
187
0.654526
from ..utils import Object class SearchSecretMessages(Object): ID = "searchSecretMessages" def __init__(self, chat_id, query, from_search_id, limit, filter, extra=None, **kwargs): self.extra = extra self.chat_id = chat_id self.query = query self.from_search_id = from_sea...
true
true
f72337d82a632098716ab7ff948e4fedf29d080d
310
py
Python
Desafios/exerc28.py
pedronb/Exercicios-Python
54db2ce48bbbba94a4ac25b32b3c1fd985347857
[ "MIT" ]
null
null
null
Desafios/exerc28.py
pedronb/Exercicios-Python
54db2ce48bbbba94a4ac25b32b3c1fd985347857
[ "MIT" ]
null
null
null
Desafios/exerc28.py
pedronb/Exercicios-Python
54db2ce48bbbba94a4ac25b32b3c1fd985347857
[ "MIT" ]
null
null
null
# Exercício Python 28: Desenvolva um programa que leia seis números inteiros e mostre a soma apenas daqueles que forem pares. Se o valor digitado for ímpar, desconsidere-o. soma = 0 for i in range(0,6): num = int(input('Insira um número inteiro: ')) if num % 2 == 0: soma += num print(soma)
28.181818
172
0.683871
soma = 0 for i in range(0,6): num = int(input('Insira um número inteiro: ')) if num % 2 == 0: soma += num print(soma)
true
true
f72338223fcd579b0d8eab318317428813bb0d97
2,216
py
Python
tests/common/test_run/sqrt_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
286
2020-06-23T06:40:44.000Z
2022-03-30T01:27:49.000Z
tests/common/test_run/sqrt_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
10
2020-07-31T03:26:59.000Z
2021-12-27T15:00:54.000Z
tests/common/test_run/sqrt_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
30
2020-07-17T01:04:14.000Z
2021-12-27T14:05:19.000Z
# Copyright 2019-2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
43.45098
105
0.704874
import akg import numpy as np from akg.utils import kernel_exec as utils from akg.ops.math import Sqrt from tests.common.tensorio import compare_tensor from tests.common.gen_random import random_gaussian from akg.utils.result_analysis import target_profiling from akg.utils.format_transform import to_tvm_nd...
true
true
f72338cabbb47dff386554f0d46e1799a3d64812
7,395
py
Python
official/nlp/optimization.py
zcdzcdzcd/models
a31b526a7617a152a138a865b5689bf5b59f655d
[ "Apache-2.0" ]
211
2019-10-21T14:58:43.000Z
2022-03-11T12:01:41.000Z
official/nlp/optimization.py
zcdzcdzcd/models
a31b526a7617a152a138a865b5689bf5b59f655d
[ "Apache-2.0" ]
18
2019-10-30T16:14:31.000Z
2022-02-09T23:31:56.000Z
official/nlp/optimization.py
zcdzcdzcd/models
a31b526a7617a152a138a865b5689bf5b59f655d
[ "Apache-2.0" ]
74
2019-10-25T13:57:51.000Z
2022-02-04T03:56:10.000Z
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.118557
80
0.692765
from __future__ import absolute_import from __future__ import division from __future__ import print_function import re import tensorflow as tf class WarmUp(tf.keras.optimizers.schedules.LearningRateSchedule): def __init__( self, initial_learning_rate, decay_schedule_fn, war...
true
true
f72338dbcf9c735ce7afecb1af39a35d7ce5035f
5,732
py
Python
KNN.py
ffcccc/MachineLearning
78bc9c5df08b14f5d70ad5d6774c74f85a585c7e
[ "Apache-2.0" ]
null
null
null
KNN.py
ffcccc/MachineLearning
78bc9c5df08b14f5d70ad5d6774c74f85a585c7e
[ "Apache-2.0" ]
null
null
null
KNN.py
ffcccc/MachineLearning
78bc9c5df08b14f5d70ad5d6774c74f85a585c7e
[ "Apache-2.0" ]
null
null
null
""" @Filename: KNN.py @Author: Danc1elion @Author: ffcccc @Create Date: 2019-04-29 @Update Date: 2019-05-03 @Description: Implement of KNN """ import numpy as np import operator as op import AClassifier import preProcess class KNNClassifier(AClassifier.aClassifier): def __init__(sel...
40.942857
118
0.63695
import numpy as np import operator as op import AClassifier import preProcess class KNNClassifier(AClassifier.aClassifier): def __init__(self, k, norm_type="Normalization"): self.k = k self.norm_type = "Normalization" self.x_train = None self.y_train = None in_label): ...
true
true
f723390bec450459c3d07d06d9a3faf905aa89d2
17,433
py
Python
src/SeleniumLibrary/keywords/formelement.py
chandapriya13/SeleniumLibrary
a82bb7c9511f6bac573eaaabb2b1dad0035d369e
[ "ECL-2.0", "Apache-2.0" ]
4
2017-12-18T02:21:48.000Z
2019-06-12T01:32:40.000Z
src/SeleniumLibrary/keywords/formelement.py
chandapriya13/SeleniumLibrary
a82bb7c9511f6bac573eaaabb2b1dad0035d369e
[ "ECL-2.0", "Apache-2.0" ]
5
2018-12-03T17:01:30.000Z
2019-03-30T16:09:01.000Z
src/SeleniumLibrary/keywords/formelement.py
chandapriya13/SeleniumLibrary
a82bb7c9511f6bac573eaaabb2b1dad0035d369e
[ "ECL-2.0", "Apache-2.0" ]
1
2018-01-23T16:11:55.000Z
2018-01-23T16:11:55.000Z
# Copyright 2008-2011 Nokia Networks # Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors # Copyright 2016- Robot Framework Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licens...
41.507143
197
0.634601
import os from SeleniumLibrary.base import LibraryComponent, keyword from SeleniumLibrary.errors import ElementNotFound from SeleniumLibrary.utils import is_noney, is_truthy class FormElementKeywords(LibraryComponent): @keyword def submit_form(self, locator=None): self.info("Submitti...
true
true
f723396434a2a3221ad85a3010ec7484b2d1378c
219
py
Python
Questoes/b1_q10_quadrado.py
viniciusm0raes/python
c4d4f1a08d1e4de105109e1f67fae9fcc20d7fce
[ "MIT" ]
null
null
null
Questoes/b1_q10_quadrado.py
viniciusm0raes/python
c4d4f1a08d1e4de105109e1f67fae9fcc20d7fce
[ "MIT" ]
null
null
null
Questoes/b1_q10_quadrado.py
viniciusm0raes/python
c4d4f1a08d1e4de105109e1f67fae9fcc20d7fce
[ "MIT" ]
null
null
null
import math lado = eval(input("Informe o lado do quadrado em cm: ")) area = math.pow(lado,2) perim = lado*4 print('A área do quadrado é igual a: ', area, 'cm') print('O perímetro do quadro é igual a: ', perim, 'cm')
21.9
56
0.6621
import math lado = eval(input("Informe o lado do quadrado em cm: ")) area = math.pow(lado,2) perim = lado*4 print('A área do quadrado é igual a: ', area, 'cm') print('O perímetro do quadro é igual a: ', perim, 'cm')
true
true
f7233ab2b8e1a5cfddc61416c5274d6fab1e8f41
1,213
py
Python
stackdio/ui/utils.py
hdmillerdr/stackdio
84be621705031d147e104369399b872d5093ef64
[ "Apache-2.0" ]
9
2015-12-18T22:44:55.000Z
2022-02-07T19:34:44.000Z
stackdio/ui/utils.py
hdmillerdr/stackdio
84be621705031d147e104369399b872d5093ef64
[ "Apache-2.0" ]
77
2015-01-12T17:49:38.000Z
2017-02-24T17:57:46.000Z
stackdio/ui/utils.py
hdmillerdr/stackdio
84be621705031d147e104369399b872d5093ef64
[ "Apache-2.0" ]
11
2015-01-23T15:50:19.000Z
2022-02-07T19:34:45.000Z
# -*- coding: utf-8 -*- # Copyright 2017, Digital Reasoning # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
32.783784
75
0.6892
from __future__ import unicode_literals from django.db.models import Model def get_object_list(user, model_cls, pk_field='id'): assert issubclass(model_cls, Model) model_name = model_cls._meta.model_name object_list = [] for obj in model_cls.objects.all(): if user.has_perm(...
true
true
f7233b3ab8ec3d79780576a9151a6f127bef71f2
1,083
py
Python
stubs.min/Autodesk/Revit/DB/__init___parts/GridSegmentDirection.py
ricardyn/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2021-02-02T13:39:16.000Z
2021-02-02T13:39:16.000Z
stubs.min/Autodesk/Revit/DB/__init___parts/GridSegmentDirection.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/Autodesk/Revit/DB/__init___parts/GridSegmentDirection.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class GridSegmentDirection(Enum,IComparable,IFormattable,IConvertible): """ Specify one of the four adjacent segments to a GridNode. See Autodesk.Revit.DB.DividedSurface. enum GridSegmentDirection,values: NegativeU (1),NegativeV (3),PositiveU (0),PositiveV (2) """ def __eq__(self,*args): """ x._...
28.5
215
0.676824
class GridSegmentDirection(Enum,IComparable,IFormattable,IConvertible): """ __format__(formattable: IFormattable,format: str) -> str """ def __ge__(self,*args): pass pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see ...
true
true
f7233bd5f0b8673116db69bc22d329089c672bd0
3,971
py
Python
python/wheedle/app.py
kpvdr/actions-artifact-poller
2660efb8195e1eddf8f22d694282027581da7df4
[ "Apache-2.0" ]
1
2020-10-20T15:26:13.000Z
2020-10-20T15:26:13.000Z
python/wheedle/app.py
kpvdr/actions-artifact-poller
2660efb8195e1eddf8f22d694282027581da7df4
[ "Apache-2.0" ]
3
2020-11-11T14:55:43.000Z
2021-01-06T17:19:16.000Z
python/wheedle/app.py
kpvdr/actions-artifact-poller
2660efb8195e1eddf8f22d694282027581da7df4
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
38.553398
99
0.634097
import logging as _logging import multiprocessing as _mp import fortworth as _fortworth import wheedle.artifact_poller as _apoller import wheedle.commit_poller as _cpoller import wheedle.configuration as _config import wheedle.errors as _errors class Application: def __init__(self, home, d...
true
true
f7233c75ff594cef6295b4e8cfce6d7da0477e0e
3,650
py
Python
src/application/blog/views.py
AriyaOk/study_python
dd2b24dc5a94d2cb100463f49739453d4e7b6203
[ "MIT" ]
null
null
null
src/application/blog/views.py
AriyaOk/study_python
dd2b24dc5a94d2cb100463f49739453d4e7b6203
[ "MIT" ]
10
2020-10-20T18:09:16.000Z
2021-09-22T19:45:32.000Z
src/application/blog/views.py
AriyaOk/study_python
dd2b24dc5a94d2cb100463f49739453d4e7b6203
[ "MIT" ]
null
null
null
from functools import wraps from typing import Dict from django import forms from django.db import transaction from django.db.models import F from django.http import HttpResponse from django.http import JsonResponse from django.urls import reverse_lazy from django.utils.decorators import method_decorator from django.v...
27.862595
69
0.607945
from functools import wraps from typing import Dict from django import forms from django.db import transaction from django.db.models import F from django.http import HttpResponse from django.http import JsonResponse from django.urls import reverse_lazy from django.utils.decorators import method_decorator from django.v...
true
true
f7233cc503bee7eeaf7e047cdce25d7b9557c9fd
2,161
py
Python
lib/galaxy/web/framework/middleware/static.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
6
2018-11-03T22:43:35.000Z
2022-02-15T17:51:33.000Z
lib/galaxy/web/framework/middleware/static.py
igorhollaender/OBSOLETE_sirv_dashboard
85aec60b80ef6f561d89398e3da5963d3d0f2aa4
[ "CC-BY-3.0" ]
3
2015-06-06T22:16:03.000Z
2015-11-12T00:22:45.000Z
lib/galaxy/web/framework/middleware/static.py
igorhollaender/OBSOLETE_sirv_dashboard
85aec60b80ef6f561d89398e3da5963d3d0f2aa4
[ "CC-BY-3.0" ]
10
2017-04-10T21:40:22.000Z
2022-02-21T16:50:10.000Z
import os from paste import request from paste import fileapp from paste.httpheaders import ETAG from paste.urlparser import StaticURLParser class CacheableStaticURLParser( StaticURLParser ): def __init__( self, directory, cache_seconds=None ): StaticURLParser.__init__( self, directory ) self.ca...
40.018519
81
0.631189
import os from paste import request from paste import fileapp from paste.httpheaders import ETAG from paste.urlparser import StaticURLParser class CacheableStaticURLParser( StaticURLParser ): def __init__( self, directory, cache_seconds=None ): StaticURLParser.__init__( self, directory ) self.ca...
true
true
f7233e71a07e7c61d68b43770ba8d7053f1b01e4
5,136
py
Python
neutron/agent/linux/ra.py
markmcclain/neutron
3108d2dece0501dbb661e2f5a4bb530a199f9fde
[ "Apache-2.0" ]
3
2016-08-07T01:25:54.000Z
2021-03-01T10:19:14.000Z
neutron/agent/linux/ra.py
cyysu/neutron_read
07d1a526d7d44ad0207d27e0ee04f1582541ab89
[ "Apache-2.0" ]
null
null
null
neutron/agent/linux/ra.py
cyysu/neutron_read
07d1a526d7d44ad0207d27e0ee04f1582541ab89
[ "Apache-2.0" ]
2
2016-09-10T13:21:10.000Z
2016-12-23T01:44:53.000Z
# Copyright 2014 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
34.938776
79
0.603388
import jinja2 import netaddr from oslo_config import cfg from oslo_log import log as logging import six from neutron.agent.linux import external_process from neutron.agent.linux import utils from neutron.common import constants RADVD_SERVICE_NAME = 'radvd' RADVD_SERVICE_CMD = 'radvd' LOG = logging.ge...
true
true
f7233eafe684defd5f01523f95aa2d62f3244d85
1,933
py
Python
appinit_backend/app/lib/system/info.py
app-init/backend
02bfc059aaa3ba34cb31c2c0cec92391f08826d9
[ "MIT" ]
1
2020-09-11T01:20:07.000Z
2020-09-11T01:20:07.000Z
appinit_backend/app/lib/system/info.py
app-init/backend
02bfc059aaa3ba34cb31c2c0cec92391f08826d9
[ "MIT" ]
null
null
null
appinit_backend/app/lib/system/info.py
app-init/backend
02bfc059aaa3ba34cb31c2c0cec92391f08826d9
[ "MIT" ]
null
null
null
from appinit_backend.lib.imports import * def call(**kwargs): modules = {} manager = Manager() settings = Settings() db = manager.db("appinit") cursor = db.apis.find() for i in cursor: if ".call" not in i['module'] and i['type'] == "module": del i['_id'] modules[i['module']]...
27.614286
74
0.527677
from appinit_backend.lib.imports import * def call(**kwargs): modules = {} manager = Manager() settings = Settings() db = manager.db("appinit") cursor = db.apis.find() for i in cursor: if ".call" not in i['module'] and i['type'] == "module": del i['_id'] modules[i['module']]...
true
true
f7233f20d09fe3032a416f972815fc2001641d45
1,666
py
Python
lib/util.py
Foxboron/tpm_futurepcr
1deebd6cb01854fbcce43a5702870e98e117d276
[ "MIT" ]
null
null
null
lib/util.py
Foxboron/tpm_futurepcr
1deebd6cb01854fbcce43a5702870e98e117d276
[ "MIT" ]
null
null
null
lib/util.py
Foxboron/tpm_futurepcr
1deebd6cb01854fbcce43a5702870e98e117d276
[ "MIT" ]
null
null
null
import hashlib import signify.fingerprinter import subprocess NUM_PCRS = 24 PCR_SIZE = hashlib.sha1().digest_size def to_hex(buf): import binascii return binascii.hexlify(buf).decode() def hexdump(buf): for i in range(0, len(buf), 16): row = buf[i:i+16] offs = "0x%08x:" % i hexs =...
31.433962
97
0.581032
import hashlib import signify.fingerprinter import subprocess NUM_PCRS = 24 PCR_SIZE = hashlib.sha1().digest_size def to_hex(buf): import binascii return binascii.hexlify(buf).decode() def hexdump(buf): for i in range(0, len(buf), 16): row = buf[i:i+16] offs = "0x%08x:" % i hexs =...
true
true
f7233f2e8d752d094729ad3663daedf3710a1f26
1,096
py
Python
deepspeed/autotuning/tuner/index_based_tuner.py
ganik/DeepSpeed
788e1c40e83beacfc4901e7daa1e097d2efb82bb
[ "MIT" ]
2
2021-03-17T12:00:32.000Z
2021-03-17T12:18:30.000Z
deepspeed/autotuning/tuner/index_based_tuner.py
ganik/DeepSpeed
788e1c40e83beacfc4901e7daa1e097d2efb82bb
[ "MIT" ]
30
2020-05-05T01:04:46.000Z
2022-03-18T18:12:10.000Z
deepspeed/autotuning/tuner/index_based_tuner.py
ganik/DeepSpeed
788e1c40e83beacfc4901e7daa1e097d2efb82bb
[ "MIT" ]
3
2021-07-19T14:05:01.000Z
2022-01-31T10:24:35.000Z
import random from deepspeed.utils import logger from .base_tuner import BaseTuner class RandomTuner(BaseTuner): """Explore the search space in random order""" def __init__(self, exps: list, resource_manager, metric): super().__init__(exps, resource_manager, metric) def next_batch(self, sample_...
30.444444
76
0.691606
import random from deepspeed.utils import logger from .base_tuner import BaseTuner class RandomTuner(BaseTuner): def __init__(self, exps: list, resource_manager, metric): super().__init__(exps, resource_manager, metric) def next_batch(self, sample_size=1): if sample_size > len(self.all_exps...
true
true
f7233f54be53aebd46001e1c935dd5fbe4d82ab8
687
py
Python
helpers/templates/tableau.py
kxdan/can-scrapers
a0641976ce59e710cec30f065276a4ddd804e9b3
[ "MIT" ]
7
2020-11-11T14:47:46.000Z
2021-12-28T02:21:41.000Z
helpers/templates/tableau.py
kxdan/can-scrapers
a0641976ce59e710cec30f065276a4ddd804e9b3
[ "MIT" ]
176
2020-11-13T00:32:44.000Z
2022-02-17T01:32:30.000Z
helpers/templates/tableau.py
kxdan/can-scrapers
a0641976ce59e710cec30f065276a4ddd804e9b3
[ "MIT" ]
13
2020-11-14T19:25:34.000Z
2021-04-04T22:32:07.000Z
import pandas as pd import us from can_tools.scrapers.base import CMU from can_tools.scrapers.official.base import TableauDashboard class {{ scraper.name }}(TableauDashboard): has_location = False source = "{{ scraper.source }}" source_name = "{{ scraper.source_name }}" state_fips = int(us.states.loo...
28.625
71
0.672489
import pandas as pd import us from can_tools.scrapers.base import CMU from can_tools.scrapers.official.base import TableauDashboard class {{ scraper.name }}(TableauDashboard): has_location = False source = "{{ scraper.source }}" source_name = "{{ scraper.source_name }}" state_fips = int(us.states.loo...
false
true
f723405bc13d056885407776297cf576268d77cf
1,714
py
Python
tests/callbacks/test_speed_monitor.py
jbloxham/composer
6dd0a0f297cafb404333d6280a5344bcb7f3bee6
[ "Apache-2.0" ]
null
null
null
tests/callbacks/test_speed_monitor.py
jbloxham/composer
6dd0a0f297cafb404333d6280a5344bcb7f3bee6
[ "Apache-2.0" ]
null
null
null
tests/callbacks/test_speed_monitor.py
jbloxham/composer
6dd0a0f297cafb404333d6280a5344bcb7f3bee6
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MosaicML. All Rights Reserved. import collections.abc from unittest.mock import MagicMock import pytest from composer.callbacks import SpeedMonitorHparams from composer.trainer import TrainerHparams @pytest.mark.timeout(60) @pytest.mark.run_long def test_speed_monitor(mosaic_trainer_hparams: Train...
38.088889
97
0.763127
import collections.abc from unittest.mock import MagicMock import pytest from composer.callbacks import SpeedMonitorHparams from composer.trainer import TrainerHparams @pytest.mark.timeout(60) @pytest.mark.run_long def test_speed_monitor(mosaic_trainer_hparams: TrainerHparams): speed_monitor_hparams = SpeedMo...
true
true
f723407cb697035f3ca80b669f150c10433bf6ae
23,022
py
Python
django_declarative_apis/machinery/__init__.py
demianbrecht/django-declarative-apis
5d8d5bbf1cdaedd9f823c1a359bc73fb99d6a9b7
[ "BSD-3-Clause" ]
null
null
null
django_declarative_apis/machinery/__init__.py
demianbrecht/django-declarative-apis
5d8d5bbf1cdaedd9f823c1a359bc73fb99d6a9b7
[ "BSD-3-Clause" ]
null
null
null
django_declarative_apis/machinery/__init__.py
demianbrecht/django-declarative-apis
5d8d5bbf1cdaedd9f823c1a359bc73fb99d6a9b7
[ "BSD-3-Clause" ]
null
null
null
# # Copyright (c) 2019, 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 # import abc import http.client import itertools import logging import sys import django from django...
34.671687
110
0.636391
import abc import http.client import itertools import logging import sys import django from django.conf import settings from django.db import models from django.http import HttpResponse from django_declarative_apis.machinery.filtering import apply_filters_to_object from django_declarative_apis.models import Bas...
true
true
f723407e65031fd351529c33894aad8210ea47d4
6,590
py
Python
custom_components/aws_rekognition.py
youqingkui/home-assistant-config
4973c5683f00efd0d3387d94aefd729352713dd3
[ "MIT" ]
null
null
null
custom_components/aws_rekognition.py
youqingkui/home-assistant-config
4973c5683f00efd0d3387d94aefd729352713dd3
[ "MIT" ]
null
null
null
custom_components/aws_rekognition.py
youqingkui/home-assistant-config
4973c5683f00efd0d3387d94aefd729352713dd3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2017/12/23 18:08 # @Author : youqingkui # @File : aws_rekognition.py # @Desc : import asyncio import json import logging import os import aiohttp from aiohttp.hdrs import CONTENT_TYPE import async_timeout import voluptuous as vol import homeassistant.h...
30.794393
124
0.624431
import asyncio import json import logging import os import aiohttp from aiohttp.hdrs import CONTENT_TYPE import async_timeout import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.loader import get_component import boto3 _LOGGER = logging.getLogger(__name__) DOMAI...
true
true
f7234398cdc1023b9eff0c5cac903bf989843930
122,502
py
Python
tensorflow/python/kernel_tests/conv_ops_test.py
EricLi404/tensorflow
23759800d89f7b5362c338d9a3fd72a6810c3e22
[ "Apache-2.0" ]
27
2019-01-02T09:36:57.000Z
2022-02-21T06:41:51.000Z
tensorflow/python/kernel_tests/conv_ops_test.py
EricLi404/tensorflow
23759800d89f7b5362c338d9a3fd72a6810c3e22
[ "Apache-2.0" ]
3
2019-01-23T11:01:22.000Z
2022-02-24T02:53:31.000Z
tensorflow/python/kernel_tests/conv_ops_test.py
EricLi404/tensorflow
23759800d89f7b5362c338d9a3fd72a6810c3e22
[ "Apache-2.0" ]
11
2019-03-02T12:42:23.000Z
2021-02-04T12:20:10.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.964997
115
0.588513
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import time import numpy as np from six.moves import xrange from tensorflow.core.protobuf import config_pb2 from tensorflow.core.protobuf import rewriter_config_pb2 from tensorflow....
true
true
f72343ede96ccf965e3565c07a8472b33c4cf857
4,086
py
Python
lib/command.py
autowitch/llama
cc18e1f646e6deae5a461b8a4f3a914463999b35
[ "MIT" ]
1
2018-12-21T22:03:30.000Z
2018-12-21T22:03:30.000Z
lib/command.py
autowitch/llama
cc18e1f646e6deae5a461b8a4f3a914463999b35
[ "MIT" ]
null
null
null
lib/command.py
autowitch/llama
cc18e1f646e6deae5a461b8a4f3a914463999b35
[ "MIT" ]
1
2021-05-16T07:11:41.000Z
2021-05-16T07:11:41.000Z
import re from lib.command_constants import CommandConstants from lib.errors import ParseError class Command(object): """This is primarily a data bucket that holds information about a specific command""" def __init__(self, line="", free_format=False, tight=False): super(Command, self).__ini...
37.145455
90
0.568282
import re from lib.command_constants import CommandConstants from lib.errors import ParseError class Command(object): def __init__(self, line="", free_format=False, tight=False): super(Command, self).__init__() self.free_format = free_format self.tight = tight self.smiley = '...
true
true
f72343f0b5bc545893d36b9a7b421656a7206a13
3,456
py
Python
src/python/findNbands.py
dmft-wien2k/dmft-wien2k-v2
83481be27e8a9ff14b9635d6cc1cd9d96f053487
[ "Apache-2.0" ]
5
2021-05-13T13:04:26.000Z
2022-01-18T10:08:09.000Z
src/python/findNbands.py
dmft-wien2k/dmft-wien2k-v2
83481be27e8a9ff14b9635d6cc1cd9d96f053487
[ "Apache-2.0" ]
2
2016-07-12T21:37:53.000Z
2016-07-12T21:42:01.000Z
src/python/findNbands.py
dmft-wien2k/dmft-wien2k
83481be27e8a9ff14b9635d6cc1cd9d96f053487
[ "Apache-2.0" ]
2
2016-07-22T15:46:56.000Z
2016-08-02T15:05:12.000Z
#!/usr/bin/env python # @Copyright 2007 Kristjan Haule from scipy import * def findNbands(Emin,Emax,enefiles,strfile): Ry2eV = 13.6056923 # Find 'nat' in the structure file fs = open(strfile,'r') fs.next() line = fs.next() lattic = line[:4] nat = int(line[4+23:4+23+3]) fs.close() pr...
32.914286
121
0.532407
from scipy import * def findNbands(Emin,Emax,enefiles,strfile): Ry2eV = 13.6056923 fs = open(strfile,'r') fs.next() line = fs.next() lattic = line[:4] nat = int(line[4+23:4+23+3]) fs.close() print 'Number of all atoms found in struct file', nat nemin=10000 nemax=0 for...
false
true
f723442118c4bb97e93ace12b12b7c779da0508f
2,580
py
Python
docs/conf.py
thijsmie/qiskit-quantum-knn
7fbecab3644306cd601a7562b8f76a29d0190700
[ "Apache-2.0" ]
9
2020-12-29T02:12:36.000Z
2021-11-15T17:26:48.000Z
docs/conf.py
thijsmie/qiskit-quantum-knn
7fbecab3644306cd601a7562b8f76a29d0190700
[ "Apache-2.0" ]
5
2020-11-09T11:25:37.000Z
2021-11-02T11:13:40.000Z
docs/conf.py
thijsmie/qiskit-quantum-knn
7fbecab3644306cd601a7562b8f76a29d0190700
[ "Apache-2.0" ]
9
2020-11-11T20:19:00.000Z
2022-02-06T16:17:34.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
33.947368
95
0.689147
import os import sys sys.path.insert(0, os.path.abspath('exts')) sys.path.append('.') from links import * project = 'qiskit-quantum-knn' copyright = '2020, Daniël Kok' author = 'Daniël Kok' release = 'v1.0.0' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.ex...
true
true
f72344764b087774bb46161e232b9792ee87baaa
891
py
Python
setup.py
paulnbrd/csgogsi
b0bfb422cd62f92c888c746a873c719bad45753c
[ "MIT" ]
null
null
null
setup.py
paulnbrd/csgogsi
b0bfb422cd62f92c888c746a873c719bad45753c
[ "MIT" ]
null
null
null
setup.py
paulnbrd/csgogsi
b0bfb422cd62f92c888c746a873c719bad45753c
[ "MIT" ]
null
null
null
import setuptools import csgogsi print("CSGOGSI Installation") with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="csgogsi", # Replace with your own username version=csgogsi.__version__, author=csgogsi.__author__, author_email="python-project@...
30.724138
84
0.687991
import setuptools import csgogsi print("CSGOGSI Installation") with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="csgogsi", version=csgogsi.__version__, author=csgogsi.__author__, author_email="python-project@paulinux.fr", description="C...
true
true
f72345e56a8064f220561bf4ec3d8ec66cad1198
2,486
py
Python
density_plot.py
vikranth22446/PyHessian
e8b1fbadb24349eef8f3a137ecfd27dfc6e3bb53
[ "MIT" ]
357
2019-12-13T01:59:00.000Z
2022-03-31T14:00:45.000Z
density_plot.py
vikranth22446/PyHessian
e8b1fbadb24349eef8f3a137ecfd27dfc6e3bb53
[ "MIT" ]
12
2020-02-15T13:08:02.000Z
2022-03-28T04:03:37.000Z
density_plot.py
vikranth22446/PyHessian
e8b1fbadb24349eef8f3a137ecfd27dfc6e3bb53
[ "MIT" ]
62
2019-12-13T18:45:07.000Z
2022-03-09T17:14:30.000Z
#* # @file Different utility functions # Copyright (c) Zhewei Yao, Amir Gholami # All rights reserved. # This file is part of PyHessian library. # # PyHessian 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, ei...
34.527778
77
0.672969
import math import numpy as np import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt def get_esd_plot(eigenvalues, weights): density, grids = density_generate(eigenvalues, weights) plt.semilogy(grids, density + 1.0e-7) plt.ylabel('Density (Log Scale)', fontsize=14, la...
true
true
f723473a1ae662d8cc65e47de582a5124c743744
4,677
py
Python
evals/gain/gain_fixm.py
nokia/integratedimputation
ca72bda54cb66e99d79ff0b174cf8f99ccb554ba
[ "BSD-3-Clause" ]
2
2022-01-13T13:05:38.000Z
2022-01-17T10:06:58.000Z
evals/gain/gain_fixm.py
nokia/integratedimputation
ca72bda54cb66e99d79ff0b174cf8f99ccb554ba
[ "BSD-3-Clause" ]
null
null
null
evals/gain/gain_fixm.py
nokia/integratedimputation
ca72bda54cb66e99d79ff0b174cf8f99ccb554ba
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # © 2021 Nokia # # Licensed under the BSD 3 Clause license # SPDX-License-Identifier: BSD-3-Clause # http://proceedings.mlr.press/v80/yoon18a/yoon18a.pdf import sys sys.path.append('../../common/') from defaults import * from gain_ import train from data_mobile import loadData, normD...
29.23125
103
0.50139
import sys sys.path.append('../../common/') from defaults import * from gain_ import train from data_mobile import loadData, normData, foldData from eval_ import EvalACC import utils sys.path.append('../../common/nets/') from net_ae import NetAEConvTrans from net_disc import NetDiscCon...
true
true
f7234792e3b85750700c694b7ac0f1dbcec41a95
7,651
py
Python
dash/html/Iframe.py
bkzhn/dash
2975e001cf017919929b0ebad1f1d1e14fa32f93
[ "MIT" ]
1
2019-11-15T08:55:28.000Z
2019-11-15T08:55:28.000Z
dash/html/Iframe.py
sthagen/dash
b3918ff798a51462687ff36e9e56c079c9f463cb
[ "MIT" ]
null
null
null
dash/html/Iframe.py
sthagen/dash
b3918ff798a51462687ff36e9e56c079c9f463cb
[ "MIT" ]
null
null
null
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Iframe(Component): """An Iframe component. Iframe is a wrapper for the <iframe> HTML5 element. For detailed attribute info see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/...
32.2827
84
0.592994
from dash.development.base_component import Component, _explicitize_args class Iframe(Component): @_explicitize_args def __init__( self, children=None, id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, key=Component...
true
true
f723488f958901e14198a0adaf402801d40d9fdf
689
py
Python
data3d/evaluation/suncg/__init__.py
picwoon/As_built_BIM
9e6b81e2fd8904f5afd013e21d2db45456c138d5
[ "MIT" ]
2
2020-03-05T06:39:03.000Z
2020-03-31T12:08:04.000Z
data3d/evaluation/suncg/__init__.py
picwoon/As_built_BIM
9e6b81e2fd8904f5afd013e21d2db45456c138d5
[ "MIT" ]
null
null
null
data3d/evaluation/suncg/__init__.py
picwoon/As_built_BIM
9e6b81e2fd8904f5afd013e21d2db45456c138d5
[ "MIT" ]
1
2021-09-24T13:17:40.000Z
2021-09-24T13:17:40.000Z
import logging from .suncg_eval import do_suncg_evaluation def suncg_evaluation(dataset, predictions, iou_thresh_eval, output_folder, box_only, epoch=None, is_train=None, eval_aug_thickness=None, **_): logger = logging.getLogger("maskrcnn_benchmark.inference") if box_only: logger.warning("evaluation ...
32.809524
142
0.721335
import logging from .suncg_eval import do_suncg_evaluation def suncg_evaluation(dataset, predictions, iou_thresh_eval, output_folder, box_only, epoch=None, is_train=None, eval_aug_thickness=None, **_): logger = logging.getLogger("maskrcnn_benchmark.inference") if box_only: logger.warning("evaluation ...
true
true
f723497ffcc44a33c06f6ecf4277d82e05b6ec37
2,743
py
Python
app/core/tests/test_models.py
tobiasaires/recipes-app-api
5b657adcd9b0da7121440fc53b9ada595933b445
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
tobiasaires/recipes-app-api
5b657adcd9b0da7121440fc53b9ada595933b445
[ "MIT" ]
4
2021-03-30T13:36:27.000Z
2021-09-22T19:14:31.000Z
app/core/tests/test_models.py
tobiasaires/recipes-app-api
5b657adcd9b0da7121440fc53b9ada595933b445
[ "MIT" ]
null
null
null
from unittest.mock import patch from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='test@londonappdev.com', password='testpass'): """Create a sample user""" return get_user_model().objects.create_user(email, password) class ModelTe...
30.820225
70
0.641633
from unittest.mock import patch from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='test@londonappdev.com', password='testpass'): return get_user_model().objects.create_user(email, password) class ModelTests(TestCase): def test_cr...
true
true
f7234a867bfcecf8d8305b26428de3c1533b7da4
1,235
py
Python
tests/test_cfplot.py
cedadev/quick-software-tests
e9098cdfae7b7768528d82d485f20c0ce1a7375d
[ "BSD-2-Clause" ]
1
2020-06-07T02:07:56.000Z
2020-06-07T02:07:56.000Z
tests/test_cfplot.py
cedadev/quick-software-tests
e9098cdfae7b7768528d82d485f20c0ce1a7375d
[ "BSD-2-Clause" ]
2
2021-02-09T17:08:21.000Z
2021-03-24T13:45:37.000Z
tests/test_cfplot.py
agstephens/quick-software-tests
e9098cdfae7b7768528d82d485f20c0ce1a7375d
[ "BSD-2-Clause" ]
null
null
null
import os import cf import matplotlib.pyplot as plt import cfplot as cfp pngs = ['tas.png', 'ggap1.png', 'ggap2.png'] cfp.setvars(file=pngs[0]) f=cf.read('testdata/tas_A1.nc')[0] cfp.con(f.subspace(time=15)) cfp.setvars(file=pngs[1]) f=cf.read('testdata/ggap.nc')[1] cfp.mapset(proj='npstere') cfp.con(f.subspace(pre...
25.729167
87
0.703644
import os import cf import matplotlib.pyplot as plt import cfplot as cfp pngs = ['tas.png', 'ggap1.png', 'ggap2.png'] cfp.setvars(file=pngs[0]) f=cf.read('testdata/tas_A1.nc')[0] cfp.con(f.subspace(time=15)) cfp.setvars(file=pngs[1]) f=cf.read('testdata/ggap.nc')[1] cfp.mapset(proj='npstere') cfp.con(f.subspace(pre...
true
true
f7234aa9d548c2f2faca025d1d296b4791c396fa
4,748
py
Python
src/petso/settings/base.py
triump0870/petso
b8252c4eef61a8762f7d6b77fadbf76d9f90b554
[ "MIT" ]
null
null
null
src/petso/settings/base.py
triump0870/petso
b8252c4eef61a8762f7d6b77fadbf76d9f90b554
[ "MIT" ]
null
null
null
src/petso/settings/base.py
triump0870/petso
b8252c4eef61a8762f7d6b77fadbf76d9f90b554
[ "MIT" ]
null
null
null
""" Django settings for petso project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from django.core.urlresolvers import reverse_lazy from os.path import dirname...
28.775758
81
0.715459
from django.core.urlresolvers import reverse_lazy from os.path import dirname, join, exists BASE_DIR = dirname(dirname(dirname(__file__))) STATICFILES_DIRS = [join(BASE_DIR, 'static')] MEDIA_ROOT = join(BASE_DIR, 'media') MEDIA_URL = "/media/" TEMPLATES = [ { 'BACKEND': 'django.template.backends.djang...
true
true
f7234adbc9c065098ba45b81f8e57e7b90b5b899
4,461
py
Python
matplotlib/line.py
aimimi2015/LDA_patent
e5df0b8e1b741c19352485b5b2dca560e1a961f1
[ "Apache-2.0" ]
2
2018-08-22T03:46:54.000Z
2020-02-08T10:20:26.000Z
matplotlib/line.py
aimimi2015/LDA_patent
e5df0b8e1b741c19352485b5b2dca560e1a961f1
[ "Apache-2.0" ]
null
null
null
matplotlib/line.py
aimimi2015/LDA_patent
e5df0b8e1b741c19352485b5b2dca560e1a961f1
[ "Apache-2.0" ]
1
2019-04-29T06:16:54.000Z
2019-04-29T06:16:54.000Z
# coding: utf-8 from __future__ import print_function from __future__ import print_function from __future__ import print_function import matplotlib.pyplot as plt import numpy as np import pickle import pprint import matplotlib.pyplot as plt import numpy as np import pymysql import pickle from sympy import * #x1 = np.a...
25.061798
165
0.576328
from __future__ import print_function from __future__ import print_function from __future__ import print_function import matplotlib.pyplot as plt import numpy as np import pickle import pprint import matplotlib.pyplot as plt import numpy as np import pymysql import pickle from sympy import * pkl_file = open('../...
true
true
f7234ae3e592912852a4bba4f2ff0826aa6d22b8
2,183
py
Python
setup.py
exemplarysoftware/thecut-forms
6c376a382862ebe05e843c1c4c934c98089b0ea2
[ "Apache-2.0" ]
null
null
null
setup.py
exemplarysoftware/thecut-forms
6c376a382862ebe05e843c1c4c934c98089b0ea2
[ "Apache-2.0" ]
null
null
null
setup.py
exemplarysoftware/thecut-forms
6c376a382862ebe05e843c1c4c934c98089b0ea2
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import codecs import io import os from thecut.forms import __version__ from setuptools import setup, find_packages import sys here = os.path.abspath(os.path.dirname(__file__)) def read(*filenames, **kwargs): encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('s...
30.746479
79
0.633532
from __future__ import print_function import codecs import io import os from thecut.forms import __version__ from setuptools import setup, find_packages import sys here = os.path.abspath(os.path.dirname(__file__)) def read(*filenames, **kwargs): encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('s...
true
true
f7234ba476f63fb75a3db59019e0e59af746bdf4
202
py
Python
build.py
AliceAndTheBuilders/es-tenso
7f0a24fbe4774919e849087d3bbbde6174928e1a
[ "MIT" ]
3
2017-03-17T09:40:42.000Z
2017-04-12T16:21:39.000Z
build.py
misleem/es-tenso
799a58f765efdf2a57348129c9a0a44879dc63bb
[ "MIT" ]
4
2017-03-06T19:17:13.000Z
2017-03-22T09:59:53.000Z
build.py
misleem/es-tenso
799a58f765efdf2a57348129c9a0a44879dc63bb
[ "MIT" ]
2
2017-05-10T12:50:12.000Z
2018-05-30T10:54:29.000Z
import zipapp from tenso.version import __version__ target_name = "dist/tenso-" + str(__version__) + ".pyz" print("Building: " + target_name) zipapp.create_archive(target=target_name, source="tenso")
25.25
57
0.762376
import zipapp from tenso.version import __version__ target_name = "dist/tenso-" + str(__version__) + ".pyz" print("Building: " + target_name) zipapp.create_archive(target=target_name, source="tenso")
true
true
f7234c0e2482adef9bfa3a12c21d0f016557b1f6
13,122
py
Python
lattice_boltzmann_method_python_jax.py
Ceyron/Lattice-Boltzmann-Method-JAX
f18e136e6e12fa575104053818c53b1689e50948
[ "MIT" ]
null
null
null
lattice_boltzmann_method_python_jax.py
Ceyron/Lattice-Boltzmann-Method-JAX
f18e136e6e12fa575104053818c53b1689e50948
[ "MIT" ]
null
null
null
lattice_boltzmann_method_python_jax.py
Ceyron/Lattice-Boltzmann-Method-JAX
f18e136e6e12fa575104053818c53b1689e50948
[ "MIT" ]
null
null
null
r""" Solves the incompressible Navier Stokes equations using the Lattice-Boltzmann Method¹. The scenario is the flow around a cylinder in 2D which yields a van Karman vortex street. periodic +-------------------------------------------------------------+ | ...
28.341253
113
0.561195
import jax import jax.numpy as jnp import matplotlib.pyplot as plt import cmasher as cmr from tqdm import tqdm N_ITERATIONS = 15_000 REYNOLDS_NUMBER = 80 N_POINTS_X = 300 N_POINTS_Y = 50 CYLINDER_CENTER_INDEX_X = N_POINTS_X // 5 CYLINDER_CENTER_INDEX_Y = N_POINTS_Y // 2 CYLINDER_RADIUS_INDICES = N_POINTS_Y // 9 MAX...
true
true
f7234c418b6f763bd052bb739df4ad8099e6768f
2,721
py
Python
samples/server/petstore/flaskConnexion/swagger_server/models/api_response.py
Cadcorp/swagger-codegen
23b64dd5e5266a7d0d7fb7a5c800d618c12696de
[ "Apache-2.0" ]
1
2020-09-06T18:36:28.000Z
2020-09-06T18:36:28.000Z
samples/server/petstore/flaskConnexion/swagger_server/models/api_response.py
Cadcorp/swagger-codegen
23b64dd5e5266a7d0d7fb7a5c800d618c12696de
[ "Apache-2.0" ]
1
2022-03-31T18:34:51.000Z
2022-03-31T18:34:51.000Z
samples/server/petstore/flaskConnexion/swagger_server/models/api_response.py
Cadcorp/swagger-codegen
23b64dd5e5266a7d0d7fb7a5c800d618c12696de
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from swagger_server.models.base_model_ import Model from swagger_server import util class ApiResponse(Model): """NOTE: This class is auto generated by the swagger...
23.66087
88
0.570379
from __future__ import absolute_import from datetime import date, datetime from typing import List, Dict from swagger_server.models.base_model_ import Model from swagger_server import util class ApiResponse(Model): def __init__(self, code: int=None, type: str=None, message: str=None): self.swagg...
true
true
f7234db37ba135caeb76fb9bc59c861d43cdb040
6,054
py
Python
robin_stocks/urls.py
jacov/robin_stocks
c7dba7f9680be7d518577fcfce2a3edecf5a13a1
[ "MIT" ]
null
null
null
robin_stocks/urls.py
jacov/robin_stocks
c7dba7f9680be7d518577fcfce2a3edecf5a13a1
[ "MIT" ]
null
null
null
robin_stocks/urls.py
jacov/robin_stocks
c7dba7f9680be7d518577fcfce2a3edecf5a13a1
[ "MIT" ]
null
null
null
"""Contains all the url endpoints for interacting with Robinhood API.""" from robin_stocks.helper import id_for_chain, id_for_stock # Login def login_url(): return('https://api.robinhood.com/oauth2/token/') def challenge_url(challenge_id): return('https://api.robinhood.com/challenge/{0}/respond/'.format(ch...
22.674157
96
0.693261
from robin_stocks.helper import id_for_chain, id_for_stock def login_url(): return('https://api.robinhood.com/oauth2/token/') def challenge_url(challenge_id): return('https://api.robinhood.com/challenge/{0}/respond/'.format(challenge_id)) def account_profile(): return('https://api.robinhood.com/ac...
true
true
f7234e411ec0118933284b5a74d1ea25b8cace95
15,644
py
Python
brian2/tests/test_cpp_standalone.py
brian-team/brian2numba
6958a9716bc87f04f8a40d0f6d7d4ed1140deb00
[ "BSD-2-Clause" ]
1
2019-03-31T09:02:08.000Z
2019-03-31T09:02:08.000Z
brian2/tests/test_cpp_standalone.py
brian-team/brian2numba
6958a9716bc87f04f8a40d0f6d7d4ed1140deb00
[ "BSD-2-Clause" ]
null
null
null
brian2/tests/test_cpp_standalone.py
brian-team/brian2numba
6958a9716bc87f04f8a40d0f6d7d4ed1140deb00
[ "BSD-2-Clause" ]
null
null
null
import tempfile from nose import with_setup, SkipTest from nose.plugins.attrib import attr from numpy.testing.utils import assert_allclose, assert_equal, assert_raises from brian2 import * from brian2.devices.device import reinit_devices, set_device, reset_device @attr('cpp_standalone', 'standalone-only') @with_setu...
35.234234
111
0.59077
import tempfile from nose import with_setup, SkipTest from nose.plugins.attrib import attr from numpy.testing.utils import assert_allclose, assert_equal, assert_raises from brian2 import * from brian2.devices.device import reinit_devices, set_device, reset_device @attr('cpp_standalone', 'standalone-only') @with_setu...
false
true
f7234e4d5b6767c9851cbf514a946c133a149a00
1,511
py
Python
monk/system_unit_tests/keras/test_block_squeezenet_fire.py
take2rohit/monk_v1
9c567bf2c8b571021b120d879ba9edf7751b9f92
[ "Apache-2.0" ]
542
2019-11-10T12:09:31.000Z
2022-03-28T11:39:07.000Z
monk/system_unit_tests/keras/test_block_squeezenet_fire.py
take2rohit/monk_v1
9c567bf2c8b571021b120d879ba9edf7751b9f92
[ "Apache-2.0" ]
117
2019-11-12T09:39:24.000Z
2022-03-12T00:20:41.000Z
monk/system_unit_tests/keras/test_block_squeezenet_fire.py
take2rohit/monk_v1
9c567bf2c8b571021b120d879ba9edf7751b9f92
[ "Apache-2.0" ]
246
2019-11-09T21:53:24.000Z
2022-03-29T00:57:07.000Z
import os import sys sys.path.append("../../../../monk_v1/"); sys.path.append("../../../monk/"); import psutil from keras_prototype import prototype from compare_prototype import compare from common import print_start from common import print_status import tensorflow as tf if(tf.__version__[0] == '2'): import ten...
29.627451
123
0.643283
import os import sys sys.path.append("../../../../monk_v1/"); sys.path.append("../../../monk/"); import psutil from keras_prototype import prototype from compare_prototype import compare from common import print_start from common import print_status import tensorflow as tf if(tf.__version__[0] == '2'): import ten...
true
true
f7234f9a4fd191667252060f448ed976d9a2af05
681
py
Python
src/config/ref/check_tlc_schemas.py
josh-lang/where-cycle
f5574040cbffa38f4ae78540712882cfdb32c036
[ "MIT" ]
21
2020-07-01T16:51:47.000Z
2020-08-06T06:21:29.000Z
src/config/ref/check_tlc_schemas.py
josh-lang/where-cycle
f5574040cbffa38f4ae78540712882cfdb32c036
[ "MIT" ]
2
2021-09-08T21:24:49.000Z
2022-03-01T23:10:39.000Z
src/config/ref/check_tlc_schemas.py
josh-lang/where-cycle
f5574040cbffa38f4ae78540712882cfdb32c036
[ "MIT" ]
2
2020-07-01T18:10:52.000Z
2020-07-01T20:06:35.000Z
import boto3 from pyspark.sql import SparkSession s3 = boto3.resource('s3') nyc_tlc = s3.Bucket('nyc-tlc') spark = SparkSession.builder \ .appName('check_tlc_schemas') \ .getOrCreate() for obj in nyc_tlc.objects.all(): key = obj.key if key.startswith('trip data/') and key.endswith('.csv'): p...
25.222222
61
0.580029
import boto3 from pyspark.sql import SparkSession s3 = boto3.resource('s3') nyc_tlc = s3.Bucket('nyc-tlc') spark = SparkSession.builder \ .appName('check_tlc_schemas') \ .getOrCreate() for obj in nyc_tlc.objects.all(): key = obj.key if key.startswith('trip data/') and key.endswith('.csv'): p...
true
true
f723514c3ad26915fdb8e82e0db180b70ebd784e
11,438
py
Python
eveil/template.py
pjfichet/eveil
dfe0c340ac09050768f0b13024ddfec5ef2015b1
[ "0BSD" ]
null
null
null
eveil/template.py
pjfichet/eveil
dfe0c340ac09050768f0b13024ddfec5ef2015b1
[ "0BSD" ]
null
null
null
eveil/template.py
pjfichet/eveil
dfe0c340ac09050768f0b13024ddfec5ef2015b1
[ "0BSD" ]
null
null
null
"""A simple Python template renderer, for a nano-subset of Django syntax.""" # Comes from http://aosabook.org/en/500L/a-template-engine.html # By Ned Batchelder (nedbatchelder.com) # Hosted on https://github.com/aosabook/500lines/tree/master/template-engine/code # Coincidentally named the same as http://code.activ...
37.257329
84
0.550883
import re class TemplateSyntaxError(ValueError): pass class CodeBuilder(object): def __init__(self, indent=0): self.code = [] self.indent_level = indent def __str__(self): return "".join(str(c) for c in self.code) def add_line(self, line): ...
true
true
f72351511f63b93866cb1821a8cb26e2db01b425
129
py
Python
arknights/__init__.py
djkcyl/arknights
63b72a4747ee6c59724d504a178c8685bf45ef67
[ "MIT" ]
5
2022-01-07T18:33:20.000Z
2022-02-15T14:55:48.000Z
arknights/__init__.py
djkcyl/arknights
63b72a4747ee6c59724d504a178c8685bf45ef67
[ "MIT" ]
null
null
null
arknights/__init__.py
djkcyl/arknights
63b72a4747ee6c59724d504a178c8685bf45ef67
[ "MIT" ]
1
2022-03-04T16:07:31.000Z
2022-03-04T16:07:31.000Z
from .ak import Arknights # noqa: F401 from .cgi import AkCall # noqa: F401 from .exception import PostException # noqa: F401
32.25
50
0.744186
from .ak import Arknights from .cgi import AkCall from .exception import PostException
true
true
f72351587dd352745ee8c22af559c72e61329e99
8,192
py
Python
klayout_dot_config/python/SiEPIC/setup.py
SiEPIC-Kits/SiEPIC-Tools
1f62c33021771a54507cf1d94bb3b2cc57419d8a
[ "MIT" ]
1
2021-04-08T02:23:44.000Z
2021-04-08T02:23:44.000Z
klayout_dot_config/python/SiEPIC/setup.py
SiEPIC-Kits/SiEPIC-Tools
1f62c33021771a54507cf1d94bb3b2cc57419d8a
[ "MIT" ]
null
null
null
klayout_dot_config/python/SiEPIC/setup.py
SiEPIC-Kits/SiEPIC-Tools
1f62c33021771a54507cf1d94bb3b2cc57419d8a
[ "MIT" ]
null
null
null
import pya def registerMenuItems(): import os from . import scripts, lumerical, install import SiEPIC.__init__ global ACTIONS count = 0 menu = pya.Application.instance().main_window().menu() path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "files", ...
43.115789
186
0.644775
import pya def registerMenuItems(): import os from . import scripts, lumerical, install import SiEPIC.__init__ global ACTIONS count = 0 menu = pya.Application.instance().main_window().menu() path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "files", ...
true
true
f72351ccd603f3f141ef47bf33cce0ab32b980df
8,829
py
Python
models/CFPNet/submodule.py
wangqingyu985/OpenStereo
91d605357d65281b99b0d8cf45e3f15f0543c9fa
[ "MIT" ]
3
2021-11-30T12:10:22.000Z
2022-03-30T07:02:33.000Z
models/CFPNet/submodule.py
wangqingyu985/OpenStereo
91d605357d65281b99b0d8cf45e3f15f0543c9fa
[ "MIT" ]
null
null
null
models/CFPNet/submodule.py
wangqingyu985/OpenStereo
91d605357d65281b99b0d8cf45e3f15f0543c9fa
[ "MIT" ]
null
null
null
from __future__ import print_function import torch import torch.nn as nn import torch.utils.data from torch.autograd import Variable import torch.nn.functional as F import numpy as np def convbn(in_planes, out_planes, kernel_size, stride, pad, dilation): return nn.Sequential(nn.Conv2d(in_planes, out_planes, kerne...
45.746114
172
0.557368
from __future__ import print_function import torch import torch.nn as nn import torch.utils.data from torch.autograd import Variable import torch.nn.functional as F import numpy as np def convbn(in_planes, out_planes, kernel_size, stride, pad, dilation): return nn.Sequential(nn.Conv2d(in_planes, out_planes, kerne...
true
true
f72351f070b50e290e8199d1fb8860afa7776925
37,857
py
Python
tests/unit/modules/test_state.py
yuanbaopapa/salt
c46490c18394799b5ea5d115c4500080cf41ef91
[ "Apache-2.0" ]
1
2021-08-14T13:48:38.000Z
2021-08-14T13:48:38.000Z
tests/unit/modules/test_state.py
yuanbaopapa/salt
c46490c18394799b5ea5d115c4500080cf41ef91
[ "Apache-2.0" ]
3
2015-03-31T14:44:05.000Z
2015-06-18T19:02:24.000Z
tests/unit/modules/test_state.py
yuanbaopapa/salt
c46490c18394799b5ea5d115c4500080cf41ef91
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Rahul Handay <rahulha@saltstack.com>` ''' # Import Python libs from __future__ import absolute_import import os # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.support.mock...
38.009036
110
0.425179
from __future__ import absolute_import import os from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.support.mock import ( MagicMock, patch, mock_open, NO_MOCK, NO_MOCK_REASON ) import salt.config import salt.loader import salt.uti...
true
true
f723520e4799d2f7b850bf3560c2a44ea951ed9f
1,141
py
Python
act/scio/plugins/threatactor_pattern.py
martineian/act-scio2
2f103581cf7e340a1f3f7ba58038ac256c025425
[ "0BSD" ]
null
null
null
act/scio/plugins/threatactor_pattern.py
martineian/act-scio2
2f103581cf7e340a1f3f7ba58038ac256c025425
[ "0BSD" ]
null
null
null
act/scio/plugins/threatactor_pattern.py
martineian/act-scio2
2f103581cf7e340a1f3f7ba58038ac256c025425
[ "0BSD" ]
null
null
null
import addict from act.scio.aliasregex import normalize from act.scio.vocabulary import Vocabulary from act.scio.plugin import BasePlugin, Result from typing import Text, List import configparser import os.path def normalize_ta(name: Text) -> Text: return normalize( name, capitalize=True, ...
28.525
97
0.66433
import addict from act.scio.aliasregex import normalize from act.scio.vocabulary import Vocabulary from act.scio.plugin import BasePlugin, Result from typing import Text, List import configparser import os.path def normalize_ta(name: Text) -> Text: return normalize( name, capitalize=True, ...
true
true
f72352bb629d63729cc732c1f349130e7d89a441
2,813
py
Python
tests/usecases/test_test_oed.py
fchauvel/oed
80bf38e3d2879aa403edbdb3cf91d51dde2e9edc
[ "MIT" ]
null
null
null
tests/usecases/test_test_oed.py
fchauvel/oed
80bf38e3d2879aa403edbdb3cf91d51dde2e9edc
[ "MIT" ]
null
null
null
tests/usecases/test_test_oed.py
fchauvel/oed
80bf38e3d2879aa403edbdb3cf91d51dde2e9edc
[ "MIT" ]
null
null
null
# # OeD - Open-ended Dependency Analyser # # Copyright (C) 2020 -- 2021 SINTEF Digital # All rights reserved. # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. # from oed import OeD from oed.laboratory import Laboratory from oed.engines.os impor...
30.576087
109
0.64593
from oed import OeD from oed.laboratory import Laboratory from oed.engines.os import OSPlatform from oed.engines.vcs import RepositoryFactory, Github from json import load as load_json_from from tests.usecases.stubs import PackagesStub from unittest import TestCase class FakeGithub(Github): def _...
true
true
f723539640b2e7f42a07839479e26f422c6bdce6
511
py
Python
tests/rules/test_java.py
frankhli843/thedarn
9e00f854c248156fba820f39b2834e8273583984
[ "MIT" ]
null
null
null
tests/rules/test_java.py
frankhli843/thedarn
9e00f854c248156fba820f39b2834e8273583984
[ "MIT" ]
null
null
null
tests/rules/test_java.py
frankhli843/thedarn
9e00f854c248156fba820f39b2834e8273583984
[ "MIT" ]
null
null
null
import pytest from thedarn.rules.java import match, get_new_command from thedarn.types import Command @pytest.mark.parametrize('command', [ Command('java foo.java', ''), Command('java bar.java', '')]) def test_match(command): assert match(command) @pytest.mark.parametrize('command, new_command', [ (...
28.388889
53
0.700587
import pytest from thedarn.rules.java import match, get_new_command from thedarn.types import Command @pytest.mark.parametrize('command', [ Command('java foo.java', ''), Command('java bar.java', '')]) def test_match(command): assert match(command) @pytest.mark.parametrize('command, new_command', [ (...
true
true
f72355e351b3bf3fb5c4715c734eb3925fc41ea8
753
py
Python
qencode/const.py
peergradeio/qencode-api-python-client
c46ababbb02b164005c0c7c90b189ed5e24659bb
[ "MIT" ]
9
2019-06-24T19:57:11.000Z
2020-12-21T22:25:23.000Z
qencode/const.py
peergradeio/qencode-api-python-client
c46ababbb02b164005c0c7c90b189ed5e24659bb
[ "MIT" ]
10
2020-07-06T22:34:14.000Z
2022-02-24T22:16:05.000Z
qencode/const.py
peergradeio/qencode-api-python-client
c46ababbb02b164005c0c7c90b189ed5e24659bb
[ "MIT" ]
5
2020-05-06T12:35:42.000Z
2020-11-12T08:50:32.000Z
REPEAT = 32 SLEEP_REGULAR = 10 SLEEP_ERROR = 60 COMPLETED_STATUS = ['completed', 'saved'] ERROR_OK = 0 ERROR_SERVER_INTERNAL = 1 ERROR_BAD_APP_ID = 2 ERROR_APP_ID_NOT_FOUND = 3 ERROR_BAD_TOKEN = 4 ERROR_TOKEN_NOT_FOUND = 5 ERROR_TARIFF_NOT_PAID = 6 ERROR_MASTER_NOT_FOUND = 7 ERROR_SYSTEM_BUSY = 8 ERROR_BAD_PAYLOAD = 9...
25.965517
85
0.774236
REPEAT = 32 SLEEP_REGULAR = 10 SLEEP_ERROR = 60 COMPLETED_STATUS = ['completed', 'saved'] ERROR_OK = 0 ERROR_SERVER_INTERNAL = 1 ERROR_BAD_APP_ID = 2 ERROR_APP_ID_NOT_FOUND = 3 ERROR_BAD_TOKEN = 4 ERROR_TOKEN_NOT_FOUND = 5 ERROR_TARIFF_NOT_PAID = 6 ERROR_MASTER_NOT_FOUND = 7 ERROR_SYSTEM_BUSY = 8 ERROR_BAD_PAYLOAD = 9...
true
true
f72355eeda4659e76ec7ec6a6e9be9c0433cbe74
1,829
py
Python
NewsFeed/migrations/0001_initial.py
1104028/StrativNewsFeed
4499cbb17141ca1aa19d3fd00071828ff9ab3d7a
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
NewsFeed/migrations/0001_initial.py
1104028/StrativNewsFeed
4499cbb17141ca1aa19d3fd00071828ff9ab3d7a
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
NewsFeed/migrations/0001_initial.py
1104028/StrativNewsFeed
4499cbb17141ca1aa19d3fd00071828ff9ab3d7a
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
# Generated by Django 3.2.9 on 2021-11-23 14:07 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
36.58
118
0.585019
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
f72357e45901d3bd648fdb6e6edab0bcae3bad14
13,930
py
Python
oadenv/lib/python2.7/site-packages/django/db/backends/sqlite3/schema.py
isabernardes/Archaeodatabase
86090e8f840d5d202c15906e614d683f8a12d3bc
[ "MIT" ]
7
2017-02-12T06:03:00.000Z
2020-12-31T11:57:35.000Z
oadenv/lib/python2.7/site-packages/django/db/backends/sqlite3/schema.py
isabernardes/Archaeodatabase
86090e8f840d5d202c15906e614d683f8a12d3bc
[ "MIT" ]
10
2017-07-13T00:24:03.000Z
2017-07-17T07:39:03.000Z
oadenv/lib/python2.7/site-packages/django/db/backends/sqlite3/schema.py
isabernardes/Archaeodatabase
86090e8f840d5d202c15906e614d683f8a12d3bc
[ "MIT" ]
7
2017-08-01T04:02:07.000Z
2018-10-06T21:07:20.000Z
import codecs import contextlib import copy from decimal import Decimal from django.apps.registry import Apps from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.utils import six class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_delete_table = "DROP TABLE %(table)s" sql_c...
44.935484
114
0.616009
import codecs import contextlib import copy from decimal import Decimal from django.apps.registry import Apps from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.utils import six class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_delete_table = "DROP TABLE %(table)s" sql_c...
true
true
f7235867e61a5294df71164c7d23ca05c60ae529
3,448
py
Python
SVGPs/functions.py
vincentadam87/SVGPs
0de1194bf0f24997148dfce0cd6fbffae16fb3bc
[ "Apache-2.0" ]
3
2017-09-28T21:02:58.000Z
2018-02-06T17:58:48.000Z
SVGPs/functions.py
vincentadam87/SVGPs
0de1194bf0f24997148dfce0cd6fbffae16fb3bc
[ "Apache-2.0" ]
null
null
null
SVGPs/functions.py
vincentadam87/SVGPs
0de1194bf0f24997148dfce0cd6fbffae16fb3bc
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 James Hensman, alexggmatthews # # 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 t...
35.916667
81
0.660673
import tensorflow as tf from settings import float_type from quadrature import hermgauss import numpy as np def eye(N): return tf.diag(tf.ones(tf.stack([N, ]), dtype=float_type)) def variational_expectations( Fmu, Fvar, phi, num_gauss_hermite_points=20): gh_x, gh_w = hermgauss(num_gauss_h...
true
true
f72359533daf16ad3957d382b5870b5ada9afd4f
3,181
py
Python
innova_aula/innova_aula/settings.py
ClaudioCaniullan/innova_aula
fa89c80d0c3dec00067d3ccc53656474524b4b77
[ "CC0-1.0" ]
null
null
null
innova_aula/innova_aula/settings.py
ClaudioCaniullan/innova_aula
fa89c80d0c3dec00067d3ccc53656474524b4b77
[ "CC0-1.0" ]
null
null
null
innova_aula/innova_aula/settings.py
ClaudioCaniullan/innova_aula
fa89c80d0c3dec00067d3ccc53656474524b4b77
[ "CC0-1.0" ]
null
null
null
""" Django settings for innova_aula project. Generated by 'django-admin startproject' using Django 2.2.19. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import ...
25.448
91
0.696636
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'h8v7g_j4o+j6p_7u8j8iagb)&4kl8x3=-^ebx*aad&ru^0%__r' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f723596d8116a6fa92775f0eada8876662613e44
322
py
Python
authy/migrations/0005_remove_profile_url.py
RoyRasugu/Mygallery2.0
009a38e2affd669fcbe2512aec86578e72ab63a3
[ "MIT" ]
null
null
null
authy/migrations/0005_remove_profile_url.py
RoyRasugu/Mygallery2.0
009a38e2affd669fcbe2512aec86578e72ab63a3
[ "MIT" ]
null
null
null
authy/migrations/0005_remove_profile_url.py
RoyRasugu/Mygallery2.0
009a38e2affd669fcbe2512aec86578e72ab63a3
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2021-10-20 11:59 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('authy', '0004_auto_20211020_1442'), ] operations = [ migrations.RemoveField( model_name='profile', name='url', ), ...
17.888889
45
0.586957
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('authy', '0004_auto_20211020_1442'), ] operations = [ migrations.RemoveField( model_name='profile', name='url', ), ]
true
true
f7235a39a18cdf6f243e086a5d560268e5e7c2db
75
py
Python
Codeup/test.py
lkc263/Algorithm_Study_Python
5b9a74ecf7e864c861df2280a1bf4b393b0fcbca
[ "MIT" ]
null
null
null
Codeup/test.py
lkc263/Algorithm_Study_Python
5b9a74ecf7e864c861df2280a1bf4b393b0fcbca
[ "MIT" ]
null
null
null
Codeup/test.py
lkc263/Algorithm_Study_Python
5b9a74ecf7e864c861df2280a1bf4b393b0fcbca
[ "MIT" ]
null
null
null
array = [[0 for col in range(11)] for row in range(10)] print(len(array))
18.75
55
0.653333
array = [[0 for col in range(11)] for row in range(10)] print(len(array))
true
true
f7235dff2f70aa306bec24c5d32adb94d9b98bd4
4,036
py
Python
magpy/lib/format_iono.py
geomagpy/magpy-git
3f6fdff5b9d1954516876907b6c46f7192b8f2ea
[ "BSD-3-Clause" ]
27
2016-02-29T21:46:40.000Z
2022-02-11T23:43:20.000Z
magpy/lib/format_iono.py
geomagpy/magpy-git
3f6fdff5b9d1954516876907b6c46f7192b8f2ea
[ "BSD-3-Clause" ]
105
2016-05-10T06:39:32.000Z
2022-03-30T13:10:39.000Z
magpy/lib/format_iono.py
geomagpy/magpy-git
3f6fdff5b9d1954516876907b6c46f7192b8f2ea
[ "BSD-3-Clause" ]
18
2016-09-13T06:57:48.000Z
2022-02-09T09:49:14.000Z
""" MagPy Input filter for IONOMETER data Written by Roman Leonhardt December 2015 - contains test and read function, no write function """ from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import from __future__ import division from io import open from magp...
37.027523
118
0.519822
from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import from __future__ import division from io import open from magpy.stream import * def isIONO(filename): try: temp = open(filename, 'rt').readline() except: return False try: ...
true
true
f7235eac6caeb862d193e06fce043ac5571e4468
28,932
py
Python
napari/components/add_layers_mixin.py
ttung/napari
fa97a05b763dacc71d4c47e6b4b2a97c208e3551
[ "BSD-3-Clause" ]
null
null
null
napari/components/add_layers_mixin.py
ttung/napari
fa97a05b763dacc71d4c47e6b4b2a97c208e3551
[ "BSD-3-Clause" ]
null
null
null
napari/components/add_layers_mixin.py
ttung/napari
fa97a05b763dacc71d4c47e6b4b2a97c208e3551
[ "BSD-3-Clause" ]
null
null
null
import itertools import numpy as np from .. import layers from ..utils import colormaps from ..utils.misc import ensure_iterable, is_iterable from ..utils import io class AddLayersMixin: """A mixin that adds add_* methods for adding layers to the ViewerModel. Each method corresponds to adding one or more la...
37.86911
91
0.572515
import itertools import numpy as np from .. import layers from ..utils import colormaps from ..utils.misc import ensure_iterable, is_iterable from ..utils import io class AddLayersMixin: def add_layer(self, layer): layer.events.select.connect(self._update_active_layer) layer.events.deselect.conn...
true
true
f7235fc664c9234fd731422b0aaf6fa17bccc2fc
5,410
py
Python
core/gma.py
askerlee/craft
921a47a4e81017e5baf49c2823958cf86a0c1fc2
[ "WTFPL" ]
2
2022-03-14T04:35:26.000Z
2022-03-25T12:33:47.000Z
core/gma.py
askerlee/craft
921a47a4e81017e5baf49c2823958cf86a0c1fc2
[ "WTFPL" ]
null
null
null
core/gma.py
askerlee/craft
921a47a4e81017e5baf49c2823958cf86a0c1fc2
[ "WTFPL" ]
null
null
null
import torch from torch import nn, einsum from einops import rearrange # max_pos_size = 160 class RelPosEmb(nn.Module): def __init__( self, max_pos_size, dim_head ): super().__init__() self.rel_height = nn.Embedding(2 * max_pos_size - 1, dim_head) sel...
35.827815
107
0.533272
import torch from torch import nn, einsum from einops import rearrange class RelPosEmb(nn.Module): def __init__( self, max_pos_size, dim_head ): super().__init__() self.rel_height = nn.Embedding(2 * max_pos_size - 1, dim_head) self.rel_width = nn.Em...
true
true
f72361b431087bf4ff87976c66774cf113aa3b6e
7,023
py
Python
data_analysis/during_day_data_analysis/EndOfDaySatisfactionDistribution.py
migbash/energy-intern-backend
41b9d2acf5e8d30c8d8d55b006c33b97267dc497
[ "MIT" ]
null
null
null
data_analysis/during_day_data_analysis/EndOfDaySatisfactionDistribution.py
migbash/energy-intern-backend
41b9d2acf5e8d30c8d8d55b006c33b97267dc497
[ "MIT" ]
null
null
null
data_analysis/during_day_data_analysis/EndOfDaySatisfactionDistribution.py
migbash/energy-intern-backend
41b9d2acf5e8d30c8d8d55b006c33b97267dc497
[ "MIT" ]
3
2019-09-11T04:14:15.000Z
2021-03-01T15:16:57.000Z
import ast import csv import inflect import os import plotly as py import sys from typing import Any, Dict, List """ Takes pre-prepared data from the SimulationVisualiserInitiator class and produces a series of violin plots comparing the satisfaction distributions of the different agent types at the end of a series o...
37.15873
117
0.576249
import ast import csv import inflect import os import plotly as py import sys from typing import Any, Dict, List folderName: str = sys.argv[1] tag: str = sys.argv[2] individualSatisfactions: str = sys.argv[3] totalDaysSimulated: int = int(sys.argv[4]) totalExchangesSimulated: int = int(sys.argv[5]) daysToVi...
true
true
f723642fef0f256789399085397280f69683b86e
8,895
py
Python
components/google-cloud/tests/container/experimental/gcp_launcher/test_batch_prediction_job_remote_runner.py
boarder7395/pipelines
ef2233291b84badef834d5ecccc8a0409462f7ab
[ "Apache-2.0" ]
null
null
null
components/google-cloud/tests/container/experimental/gcp_launcher/test_batch_prediction_job_remote_runner.py
boarder7395/pipelines
ef2233291b84badef834d5ecccc8a0409462f7ab
[ "Apache-2.0" ]
null
null
null
components/google-cloud/tests/container/experimental/gcp_launcher/test_batch_prediction_job_remote_runner.py
boarder7395/pipelines
ef2233291b84badef834d5ecccc8a0409462f7ab
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The Kubeflow 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 applicabl...
45.152284
115
0.793479
import json from logging import raiseExceptions import os import time import unittest from unittest import mock from google.cloud import aiplatform from google.cloud.aiplatform.compat.types import job_state as gca_job_state from google.protobuf import json_format from google_cloud_pipeline_components.pro...
true
true
f723644d5ba0725447dbdcb5d493e4a75f71dbeb
763
py
Python
davarocr/davarocr/davar_rcg/core/converter/builder.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
387
2021-01-02T07:50:15.000Z
2022-03-31T04:30:03.000Z
davarocr/davarocr/davar_rcg/core/converter/builder.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
70
2021-05-04T18:28:18.000Z
2022-03-31T14:14:52.000Z
davarocr/davarocr/davar_rcg/core/converter/builder.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
83
2021-01-05T08:28:26.000Z
2022-03-31T07:14:03.000Z
""" ################################################################################################## # Copyright Info : Copyright (c) Davar Lab @ Hikvision Research Institute. All rights reserved. # Filename : builder.py # Abstract : # Current Version: 1.0.0 # Date : 2020-05-31 ####...
26.310345
98
0.461337
from mmcv.utils import Registry, build_from_cfg CONVERTER = Registry('converter') def build_converter(cfg): assert 'type' in cfg and isinstance(cfg['type'], str) converter = build_from_cfg(cfg, CONVERTER) return converter
true
true
f72364784036bde554a49495f1294fef3facd59c
91
py
Python
gan2shape/__init__.py
PeterouZh/GAN2Shape
ea077e543a3fb824ce06385e8a837dcbae8e9aaa
[ "MIT" ]
421
2020-11-03T01:58:39.000Z
2022-03-26T15:09:21.000Z
gan2shape/__init__.py
karandeepdps/GAN2Shape
09882aed3526c8cee42c30beb5a67977e311bb08
[ "MIT" ]
41
2020-11-09T09:20:24.000Z
2022-03-27T10:15:38.000Z
gan2shape/__init__.py
karandeepdps/GAN2Shape
09882aed3526c8cee42c30beb5a67977e311bb08
[ "MIT" ]
73
2020-11-03T04:04:55.000Z
2022-03-24T03:41:38.000Z
from .utils import setup_runtime from .trainer import Trainer from .model import GAN2Shape
22.75
32
0.835165
from .utils import setup_runtime from .trainer import Trainer from .model import GAN2Shape
true
true
f723653996386d4bb9b6bb522231bb66a1d58853
246,891
py
Python
python/mxnet/ndarray/numpy/_op.py
ThomasGmeinder/incubator-mxnet
49292cef7c85dbe00abc3a6e79cb70644f753d6f
[ "Apache-2.0" ]
null
null
null
python/mxnet/ndarray/numpy/_op.py
ThomasGmeinder/incubator-mxnet
49292cef7c85dbe00abc3a6e79cb70644f753d6f
[ "Apache-2.0" ]
2
2021-12-10T01:52:29.000Z
2021-12-14T22:00:17.000Z
python/mxnet/ndarray/numpy/_op.py
Samuel-wei/incubator-mxnet
0f3c5da37bf1647e18fce26beb9f06f5d6183846
[ "BSL-1.0", "Apache-2.0" ]
null
null
null
# pylint: disable=C0302 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
33.558652
141
0.604846
import numpy as _np from ...base import numeric_types, integer_types from ...util import _sanity_check_params, set_module from ...util import wrap_np_unary_func, wrap_np_binary_func from ...context import current_context from . import _internal as _npi from ..ndarray import NDArray __all__ = ['shap...
true
true
f7236591419eeb6e4e4a15c30657c248c82b020e
340
py
Python
saga_requests/__init__.py
titans55/saga-requests
39c83a14ece3bace6235ca4ade47a462218b6846
[ "MIT" ]
null
null
null
saga_requests/__init__.py
titans55/saga-requests
39c83a14ece3bace6235ca4ade47a462218b6846
[ "MIT" ]
null
null
null
saga_requests/__init__.py
titans55/saga-requests
39c83a14ece3bace6235ca4ade47a462218b6846
[ "MIT" ]
null
null
null
__title__ = 'saga_requests' __description__ = 'Saga pattern implementation for sequential HTTP requests.' __author__ = 'Kutay Aslan' __author_email__ = 'kutay.aslan97@gmail.com' __license__ = 'MIT' __copyright__ = 'Copyright 2021 Kutay Aslan' from .saga_requests import SagaBuilder, SagaAction, SagaRequest, SagaRequest...
37.777778
95
0.811765
__title__ = 'saga_requests' __description__ = 'Saga pattern implementation for sequential HTTP requests.' __author__ = 'Kutay Aslan' __author_email__ = 'kutay.aslan97@gmail.com' __license__ = 'MIT' __copyright__ = 'Copyright 2021 Kutay Aslan' from .saga_requests import SagaBuilder, SagaAction, SagaRequest, SagaRequest...
true
true
f72365d1a8d8b966f5901dc54dc01c7786bf2df8
650
py
Python
msgboard/migrations/0001_initial.py
jeniaSakirko/beyond-tutorial
cd847d5af53bd385d0741941216b965d29019999
[ "MIT" ]
null
null
null
msgboard/migrations/0001_initial.py
jeniaSakirko/beyond-tutorial
cd847d5af53bd385d0741941216b965d29019999
[ "MIT" ]
null
null
null
msgboard/migrations/0001_initial.py
jeniaSakirko/beyond-tutorial
cd847d5af53bd385d0741941216b965d29019999
[ "MIT" ]
null
null
null
# Generated by Django 4.0.2 on 2022-02-06 14:36 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Message', fields=[ ...
26
117
0.586154
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Message', fields=[ ('id', models.BigAutoField(auto_created=Tr...
true
true
f72366d69928dd9d5365212ab55ce0ab33c99366
770
py
Python
students/K33402/Kondrashov_Egor/LR2/commerce/auctions/migrations/0002_listing.py
emina13/ITMO_ICT_WebDevelopment_2021-2022
498a6138e352e7e0ca40d1eb301bc29416158f51
[ "MIT" ]
7
2021-09-02T08:20:58.000Z
2022-01-12T11:48:07.000Z
students/K33402/Kondrashov_Egor/LR2/commerce/auctions/migrations/0002_listing.py
emina13/ITMO_ICT_WebDevelopment_2021-2022
498a6138e352e7e0ca40d1eb301bc29416158f51
[ "MIT" ]
76
2021-09-17T23:01:50.000Z
2022-03-18T16:42:03.000Z
students/K33402/Kondrashov_Egor/LR2/commerce/auctions/migrations/0002_listing.py
emina13/ITMO_ICT_WebDevelopment_2021-2022
498a6138e352e7e0ca40d1eb301bc29416158f51
[ "MIT" ]
60
2021-09-04T16:47:39.000Z
2022-03-21T04:41:27.000Z
# Generated by Django 3.0.6 on 2020-10-02 12:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auctions', '0001_initial'), ] operations = [ migrations.CreateModel( name='Listing', fields=[ ('id',...
30.8
114
0.571429
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auctions', '0001_initial'), ] operations = [ migrations.CreateModel( name='Listing', fields=[ ('id', models.AutoField(auto_created=True, primary_ke...
true
true
f723687904dbdb6f989fe5a914c859d639ace454
6,674
py
Python
app/api/v2/managers/base_api_manager.py
mihaid-b/caldera
90af73188a9865757c167efd31cbd87a8e6160b1
[ "Apache-2.0" ]
null
null
null
app/api/v2/managers/base_api_manager.py
mihaid-b/caldera
90af73188a9865757c167efd31cbd87a8e6160b1
[ "Apache-2.0" ]
2
2022-01-07T00:58:19.000Z
2022-01-07T00:58:20.000Z
app/api/v2/managers/base_api_manager.py
mihaid-b/caldera
90af73188a9865757c167efd31cbd87a8e6160b1
[ "Apache-2.0" ]
null
null
null
import logging import os import uuid import yaml from marshmallow.schema import SchemaMeta from typing import Any, List from base64 import b64encode, b64decode from app.utility.base_world import BaseWorld DEFAULT_LOGGER_NAME = 'rest_api_manager' class BaseApiManager(BaseWorld): def __init__(self, data_svc, fi...
42.509554
126
0.677705
import logging import os import uuid import yaml from marshmallow.schema import SchemaMeta from typing import Any, List from base64 import b64encode, b64decode from app.utility.base_world import BaseWorld DEFAULT_LOGGER_NAME = 'rest_api_manager' class BaseApiManager(BaseWorld): def __init__(self, data_svc, fi...
true
true
f72369f01567bc9d574542797ebf82f8d4500910
903
py
Python
kubernetes/test/test_auditregistration_api.py
iamneha/python
5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0
[ "Apache-2.0" ]
1
2019-02-17T15:28:39.000Z
2019-02-17T15:28:39.000Z
kubernetes/test/test_auditregistration_api.py
iamneha/python
5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_auditregistration_api.py
iamneha/python
5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
20.066667
105
0.708749
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.apis.auditregistration_api import AuditregistrationApi class TestAuditregistrationApi(unittest.TestCase): def setUp(self): self...
true
true
f7236a746c46b2c1dbd28b9ceab6f34dcfd7b14b
21,947
py
Python
nemo/core/optim/lr_scheduler.py
mcdavid109/NeMo
a7df3e0271ab6133f7fe057ec697f764c8637d54
[ "Apache-2.0" ]
null
null
null
nemo/core/optim/lr_scheduler.py
mcdavid109/NeMo
a7df3e0271ab6133f7fe057ec697f764c8637d54
[ "Apache-2.0" ]
null
null
null
nemo/core/optim/lr_scheduler.py
mcdavid109/NeMo
a7df3e0271ab6133f7fe057ec697f764c8637d54
[ "Apache-2.0" ]
1
2020-12-18T14:23:37.000Z
2020-12-18T14:23:37.000Z
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
37.839655
119
0.659179
import copy import dataclasses import math import warnings from functools import partial from typing import Any, Dict, Optional, Union import hydra import torch.optim as optim import torch.optim.lr_scheduler as pt_scheduler import torch.utils.data.dataloader as dataloader from omegaconf import DictConfig...
true
true
f7236ac434b8832bd43e170de2b4dd505d787f85
2,154
py
Python
moodevalyoutube.py
antverdovsky/Upside-Down
9fd8bb4b1b74f855cb2e7523eecb8bdc58f3e614
[ "MIT" ]
null
null
null
moodevalyoutube.py
antverdovsky/Upside-Down
9fd8bb4b1b74f855cb2e7523eecb8bdc58f3e614
[ "MIT" ]
null
null
null
moodevalyoutube.py
antverdovsky/Upside-Down
9fd8bb4b1b74f855cb2e7523eecb8bdc58f3e614
[ "MIT" ]
null
null
null
#!/usr/bin/python """ This code executes a search request for the specified search mood. It takes in a Youtube API key provided by the developer It randomizes the top results and returns a random URL based on what mood was called """ import argparse import logging import json import random from pprint import pprint ...
31.676471
78
0.662024
import argparse import logging import json import random from pprint import pprint from googleapiclient.discovery import build from googleapiclient.errors import HttpError DEVELOPER_KEY = 'AIzaSyCEGv-JQcjMIdpXYO9eIhAGWKLJn1XzXos' YOUTUBE_API_SERVICE_NAME = 'youtube' YOUTUBE_A...
true
true
f7236bf981d8e58994d8ce22e596355b1031db97
619
py
Python
examples/SubtractionQuiz.py
Ellis0817/Introduction-to-Programming-Using-Python
1882a2a846162d5ff56d4d56c3940b638ef408bd
[ "MIT" ]
null
null
null
examples/SubtractionQuiz.py
Ellis0817/Introduction-to-Programming-Using-Python
1882a2a846162d5ff56d4d56c3940b638ef408bd
[ "MIT" ]
4
2019-11-07T12:32:19.000Z
2020-07-19T14:04:44.000Z
examples/SubtractionQuiz.py
Ellis0817/Introduction-to-Programming-Using-Python
1882a2a846162d5ff56d4d56c3940b638ef408bd
[ "MIT" ]
5
2019-12-04T15:56:55.000Z
2022-01-14T06:19:18.000Z
import random # 1. Generate two random single-digit integers number1 = random.randint(0, 9) number2 = random.randint(0, 9) # 2. If number1 < number2, swap number1 with number2 if number1 < number2: number1, number2 = number2, number1 # Simultaneous assignment # 4. Prompt the student to answer "what is number1 - ...
30.95
65
0.670436
import random number1 = random.randint(0, 9) number2 = random.randint(0, 9) if number1 < number2: number1, number2 = number2, number1 answer = eval(input("What is " + str(number1) + " - " + str(number2) + "? ")) if number1 - number2 == answer: print("You are correct!") else: print("Your answer...
true
true
f7236c1d24ebc9967824ee1d78fb2ee142ab6125
819
py
Python
app/main/view.py
fauziwei/_flask_
a2e8ed2f459df289945fa7942b23e9e02da63bb8
[ "Apache-2.0" ]
null
null
null
app/main/view.py
fauziwei/_flask_
a2e8ed2f459df289945fa7942b23e9e02da63bb8
[ "Apache-2.0" ]
null
null
null
app/main/view.py
fauziwei/_flask_
a2e8ed2f459df289945fa7942b23e9e02da63bb8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 '''Fauzi, fauzi@soovii.com''' from flask import Blueprint, request from flask_restful import Api, reqparse from app.view import Resource from app.model import db # from app.main.model import Main from sqlalchemy.exc import SQLAlchemyError from log import logger mainBlueprint = Blueprint('main', __name...
20.475
43
0.726496
from flask import Blueprint, request from flask_restful import Api, reqparse from app.view import Resource from app.model import db from sqlalchemy.exc import SQLAlchemyError from log import logger mainBlueprint = Blueprint('main', __name__) api = Api(mainBlueprint) parser = reqparse.RequestParser() parser.add_arg...
true
true
f7236d2aab05f1b600372b63dd82fbd77d8921b1
2,531
py
Python
qBitrr/main.py
Treverr/Qbitrr
5d781b2180e1070663748e9948c7ba95d5594747
[ "MIT" ]
null
null
null
qBitrr/main.py
Treverr/Qbitrr
5d781b2180e1070663748e9948c7ba95d5594747
[ "MIT" ]
null
null
null
qBitrr/main.py
Treverr/Qbitrr
5d781b2180e1070663748e9948c7ba95d5594747
[ "MIT" ]
null
null
null
from typing import NoReturn import logbook import qbittorrentapi import requests from qbittorrentapi import APINames, login_required, response_text from .arss import ArrManager from .config import CONFIG from .logger import * logger = logbook.Logger("qBitManager") # QBitTorrent Config Values qBit_Host = CONFIG.get(...
28.122222
99
0.638483
from typing import NoReturn import logbook import qbittorrentapi import requests from qbittorrentapi import APINames, login_required, response_text from .arss import ArrManager from .config import CONFIG from .logger import * logger = logbook.Logger("qBitManager") qBit_Host = CONFIG.get("QBit", "Host", fallback="l...
true
true
f7236d3fcab67683773e445ba66effeb0a887648
7,422
py
Python
src/client.py
Shandilya21/oratio
53a77404df35a6b2b73c6a74a0e40d3f8747c408
[ "BSD-3-Clause" ]
null
null
null
src/client.py
Shandilya21/oratio
53a77404df35a6b2b73c6a74a0e40d3f8747c408
[ "BSD-3-Clause" ]
null
null
null
src/client.py
Shandilya21/oratio
53a77404df35a6b2b73c6a74a0e40d3f8747c408
[ "BSD-3-Clause" ]
null
null
null
import enum import json from target_voice import create_voice, gender_string import api.stt.util class Provider(enum.Enum): GCLOUD = 1 AWS = 2 AWS_DEEPL = 3 class Client: def __init__( self, upload_filename, stt_provider=Provider.GCLOUD, translate_provider=Provider.GC...
34.202765
92
0.597683
import enum import json from target_voice import create_voice, gender_string import api.stt.util class Provider(enum.Enum): GCLOUD = 1 AWS = 2 AWS_DEEPL = 3 class Client: def __init__( self, upload_filename, stt_provider=Provider.GCLOUD, translate_provider=Provider.GC...
true
true
f7236d5b15b17c1222fa056d925e9c65b7d75e62
2,881
py
Python
analyser/analysis/pen_calculation_deviation_box_plots.py
michigg/web-simultaneous-recording-tool
67db83f6e34d9cb726c69b4e448fed3604a43618
[ "MIT" ]
1
2022-03-30T09:45:25.000Z
2022-03-30T09:45:25.000Z
analyser/analysis/pen_calculation_deviation_box_plots.py
michigg/web-simultaneous-recording-tool
67db83f6e34d9cb726c69b4e448fed3604a43618
[ "MIT" ]
null
null
null
analyser/analysis/pen_calculation_deviation_box_plots.py
michigg/web-simultaneous-recording-tool
67db83f6e34d9cb726c69b4e448fed3604a43618
[ "MIT" ]
null
null
null
""" """ import sys import numpy as np import pandas as pd from scipy.signal import argrelextrema from analysis.frog_click_mean_calculation import calc_click_mean_quantil_based from utils import dataframe_index, audio_calcs from utils.data_exporter import Exporter from utils.data_loader import Loader import logging ...
30.326316
149
0.695245
import sys import numpy as np import pandas as pd from scipy.signal import argrelextrema from analysis.frog_click_mean_calculation import calc_click_mean_quantil_based from utils import dataframe_index, audio_calcs from utils.data_exporter import Exporter from utils.data_loader import Loader import logging from uti...
true
true
f7236dd43c0f9b521cc15880e1ba140ac3804e61
10,414
py
Python
mslib/msui/_tests/test_mscolab_admin_window.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
mslib/msui/_tests/test_mscolab_admin_window.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
mslib/msui/_tests/test_mscolab_admin_window.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ mslib.msui._tests.test_mscolab_project ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module is used to test mscolab-project related gui. This file is part of mss. :copyright: Copyright 2019 Shivashis Padhi :copyright: Copyright 2019-2020 by the mss team, see AUTHORS...
47.552511
102
0.70482
import sys import time from mslib.msui.mscolab import MSSMscolabWindow from mslib._tests.constants import MSCOLAB_URL_TEST from mslib.mscolab.conf import mscolab_settings from mslib.mscolab.server import APP, db, initialize_managers from PyQt5 import QtCore, QtTest, QtWidgets class Test_MscolabAdminWindow(object): ...
true
true
f7236f7de1a0f4da758da8b43c6cbb53ac940cb4
14,831
py
Python
spacy/cli/pretrain.py
Ali-Tahir/spaCy
9e210fa7fdb8e376655e7a7ab7debd3ffd718a63
[ "MIT" ]
null
null
null
spacy/cli/pretrain.py
Ali-Tahir/spaCy
9e210fa7fdb8e376655e7a7ab7debd3ffd718a63
[ "MIT" ]
null
null
null
spacy/cli/pretrain.py
Ali-Tahir/spaCy
9e210fa7fdb8e376655e7a7ab7debd3ffd718a63
[ "MIT" ]
null
null
null
# coding: utf8 from __future__ import print_function, unicode_literals import plac import random import numpy import time import re from collections import Counter from pathlib import Path from thinc.v2v import Affine, Maxout from thinc.misc import LayerNorm as LN from thinc.neural.util import prefer_gpu from wasabi i...
37.737913
119
0.617221
from __future__ import print_function, unicode_literals import plac import random import numpy import time import re from collections import Counter from pathlib import Path from thinc.v2v import Affine, Maxout from thinc.misc import LayerNorm as LN from thinc.neural.util import prefer_gpu from wasabi import Printer ...
true
true
f7236f96ecf229c2c3cc9f3243a298fecf810335
3,143
py
Python
venv/lib/python2.7/site-packages/ebcli/core/base.py
zwachtel11/fruitful-backend
45b8994917182e7b684b9e25944cc79c9494c9f3
[ "MIT" ]
4
2018-04-19T19:56:53.000Z
2021-06-28T19:53:41.000Z
venv/lib/python2.7/site-packages/ebcli/core/base.py
zwachtel11/fruitful-backend
45b8994917182e7b684b9e25944cc79c9494c9f3
[ "MIT" ]
1
2017-04-27T12:06:05.000Z
2017-04-27T12:06:05.000Z
venv/lib/python2.7/site-packages/ebcli/core/base.py
zwachtel11/fruitful-backend
45b8994917182e7b684b9e25944cc79c9494c9f3
[ "MIT" ]
4
2016-10-12T23:54:55.000Z
2020-07-25T23:28:25.000Z
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
31.43
82
0.535157
import textwrap import sys from cement.core import controller from ebcli import __version__ from ..resources.strings import strings, flag_text from ..core import io class EbBaseController(controller.CementBaseController): class Meta: label = 'base' description = strings['base.info'] ...
true
true
f7237035cf836f6dcb5fc1c148dcd2432f440406
2,212
py
Python
etsin_finder/auth/authentication_direct_proxy.py
CSCfi/etsin-finder
d21acf2459da6ce1f45b1d8e508e418e467852ab
[ "MIT" ]
1
2019-11-13T11:52:47.000Z
2019-11-13T11:52:47.000Z
etsin_finder/auth/authentication_direct_proxy.py
CSCfi/etsin-finder
d21acf2459da6ce1f45b1d8e508e418e467852ab
[ "MIT" ]
106
2017-10-25T14:41:07.000Z
2021-09-20T10:39:57.000Z
etsin_finder/auth/authentication_direct_proxy.py
CSCfi/etsin-finder
d21acf2459da6ce1f45b1d8e508e418e467852ab
[ "MIT" ]
6
2019-03-20T06:55:25.000Z
2020-02-03T11:26:19.000Z
# This file is part of the Etsin service # # Copyright 2017-2018 Ministry of Education and Culture, Finland # # :author: CSC - IT Center for Science Ltd., Espoo Finland <servicedesk@csc.fi> # :license: MIT """Direct authentication related functionalities""" from urllib.parse import urlparse from flask import session,...
28
158
0.698915
from urllib.parse import urlparse from flask import session, current_app from onelogin.saml2.auth import OneLogin_Saml2_Auth def get_saml_auth(flask_request, service): return OneLogin_Saml2_Auth(prepare_flask_request_for_saml(flask_request, service), custom_base_path=current_app.config.get(('SAML_PATH' + s...
true
true
f723714fb358806aa9a8ab80e838af445bd65bde
959
py
Python
simclr/model.py
k-stacke/ssl-pathology
d440ce11712a5c1b6631d698dc3cafe7c04e2786
[ "Apache-2.0" ]
2
2021-12-22T15:18:02.000Z
2022-03-10T11:46:38.000Z
simclr/model.py
k-stacke/ssl-pathology
d440ce11712a5c1b6631d698dc3cafe7c04e2786
[ "Apache-2.0" ]
null
null
null
simclr/model.py
k-stacke/ssl-pathology
d440ce11712a5c1b6631d698dc3cafe7c04e2786
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from torch.cuda import amp from torchvision.models import resnet50 class Identity(nn.Module): def __init__(self): super(Identity, self).__init__() def forward(self, x): return x class Model(nn.Module): def __init__(self, f...
29.96875
70
0.590198
import torch import torch.nn as nn import torch.nn.functional as F from torch.cuda import amp from torchvision.models import resnet50 class Identity(nn.Module): def __init__(self): super(Identity, self).__init__() def forward(self, x): return x class Model(nn.Module): def __init__(self, f...
true
true
f7237157da0e8ce2915b5be1a4e908166945d727
3,708
py
Python
boto/s3/__init__.py
adastreamer/boto
ce472cbbcffd06298fdd0c980d5bfcdcee875498
[ "MIT" ]
1
2019-07-29T02:53:51.000Z
2019-07-29T02:53:51.000Z
boto/s3/__init__.py
adastreamer/boto
ce472cbbcffd06298fdd0c980d5bfcdcee875498
[ "MIT" ]
1
2021-09-11T14:30:32.000Z
2021-09-11T14:30:32.000Z
boto/s3/__init__.py
adastreamer/boto
ce472cbbcffd06298fdd0c980d5bfcdcee875498
[ "MIT" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # 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 res...
42.136364
74
0.629989
from boto.regioninfo import RegionInfo class S3RegionInfo(RegionInfo): def connect(self, **kw_params): if self.connection_cls: return self.connection_cls(host=self.endpoint, **kw_params) def regions(): from .connection import S3Connection return [S3RegionInfo...
true
true
f72371642afbe55c7e8291b7b219c446c8a26353
4,069
py
Python
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/feo/feopolicy_binding.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/feo/feopolicy_binding.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/feo/feopolicy_binding.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2008-2016 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...
29.485507
119
0.718113
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_excepti...
true
true
f723716af0d7e1373054c1309717abfa1d2af972
5,495
py
Python
setup.py
Alesh/flake8
9320150e2566742c10659b1e3382fb83aadf9e5a
[ "MIT" ]
null
null
null
setup.py
Alesh/flake8
9320150e2566742c10659b1e3382fb83aadf9e5a
[ "MIT" ]
null
null
null
setup.py
Alesh/flake8
9320150e2566742c10659b1e3382fb83aadf9e5a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Packaging logic for Flake8.""" import functools import io import os import sys import setuptools sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src')) # noqa import flake8 # NOTE(sigmavirus24): When updating these requirements, update them in # setup.cfg as well. requires =...
36.390728
96
0.620928
import functools import io import os import sys import setuptools sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src')) import flake8 requires = [ 2.1.0, < 2.2.0", "pycodestyle >= 2.5.0, < 2.6.0", "mccabe >= 0.6.0, < 0.7.0", ] extras_require = { ":python_version<'3.4'": ['en...
true
true
f72371fab6acdaffc73d69c8446bc7446f1ef5eb
1,603
py
Python
old stuff/web_deface/notifs/twilio_sms.py
duongsky96/RiskAssessmentFramework
a675220461d074841f63c23ab013530e33eb6950
[ "MIT" ]
238
2018-12-20T07:48:43.000Z
2022-03-31T19:06:10.000Z
old stuff/web_deface/notifs/twilio_sms.py
duongsky96/RiskAssessmentFramework
a675220461d074841f63c23ab013530e33eb6950
[ "MIT" ]
62
2020-08-26T20:26:36.000Z
2020-08-26T20:28:47.000Z
old stuff/web_deface/notifs/twilio_sms.py
duongsky96/RiskAssessmentFramework
a675220461d074841f63c23ab013530e33eb6950
[ "MIT" ]
85
2018-12-19T12:45:31.000Z
2022-03-29T19:09:48.000Z
# -*- coding: utf-8 -*- u"""Twilio module. Author: Abhishek Sharma <abhishek_official@hotmail.com> , Jan 26 2019 Version: 1.1 """ from twilio.rest import Client class Twilio(): """Initilize the Twilio.""" def __init__(self, cred): """Init logger params. Args: ----- ...
21.958904
73
0.495321
from twilio.rest import Client class Twilio(): def __init__(self, cred): self.account_sid = cred['twilio_sid'] self.account_token = cred['twilio_token'] self.twilio_from = cred['twilio_from'] self.twilio_to = cred['twilio_to'] self.client = Client(self.account_sid, self....
true
true
f72372652df9b3e3b99085021eb6e8e17b451670
4,093
py
Python
browserHist2csv.py
maTWed/forensics
9f238263b10d6e67a0f3da2e2cdb531ad2b7b611
[ "MIT" ]
null
null
null
browserHist2csv.py
maTWed/forensics
9f238263b10d6e67a0f3da2e2cdb531ad2b7b611
[ "MIT" ]
null
null
null
browserHist2csv.py
maTWed/forensics
9f238263b10d6e67a0f3da2e2cdb531ad2b7b611
[ "MIT" ]
null
null
null
#!/usr/bin/python # Browsing History to csv # by:maTWed # updated: 4/5/2022 # Created for internal use do to all the browsing history investigation # Instructions: Copy Chrome & Firefox browsing DB to the directory of this script # Or use 'get_browsing_history.sh' to collect the history and place them in this script's ...
37.550459
131
0.576839
# TODO: Creat a function that connects to the smb share and copies the # browsing files to local machine then gathers the data. import os, time, datetime, operator, string, sqlite3, csv, argparse def firefox_history(): if not os.path.exists(fox_db): print("[-] Firefox DB not found!") e...
true
true
f723729324811ada91d71604306624d23a7791f7
129
py
Python
src/CursoEmvideo/ex005.py
kessiarodrigues/Python-Course
2e6097af4475d826c2b242d4699aec72301060f7
[ "MIT" ]
null
null
null
src/CursoEmvideo/ex005.py
kessiarodrigues/Python-Course
2e6097af4475d826c2b242d4699aec72301060f7
[ "MIT" ]
null
null
null
src/CursoEmvideo/ex005.py
kessiarodrigues/Python-Course
2e6097af4475d826c2b242d4699aec72301060f7
[ "MIT" ]
null
null
null
n = int(input('Digite um número: ')) n1 = n + 1 n2 = n - 1 print('O antecessor de {} é {} e o sucessor é {}'.format(n, n2, n1))
21.5
68
0.55814
n = int(input('Digite um número: ')) n1 = n + 1 n2 = n - 1 print('O antecessor de {} é {} e o sucessor é {}'.format(n, n2, n1))
true
true
f723736c92eaaee1e47d1c8e3f0f9f8004962057
5,581
py
Python
sym_api_client_python/auth/rsa_auth.py
3tilley/symphony-api-client-python
8a743c27bcb2bba3fb22493c5494a19c78961ff4
[ "MIT" ]
null
null
null
sym_api_client_python/auth/rsa_auth.py
3tilley/symphony-api-client-python
8a743c27bcb2bba3fb22493c5494a19c78961ff4
[ "MIT" ]
null
null
null
sym_api_client_python/auth/rsa_auth.py
3tilley/symphony-api-client-python
8a743c27bcb2bba3fb22493c5494a19c78961ff4
[ "MIT" ]
null
null
null
import json import requests import datetime import time import logging from .auth_endpoint_constants import auth_endpoint_constants from requests import Session from jose import jwt from ..clients.api_client import APIClient from ..exceptions.UnauthorizedException import UnauthorizedException from ..exceptions.MaxRetry...
38.756944
115
0.612614
import json import requests import datetime import time import logging from .auth_endpoint_constants import auth_endpoint_constants from requests import Session from jose import jwt from ..clients.api_client import APIClient from ..exceptions.UnauthorizedException import UnauthorizedException from ..exceptions.MaxRetry...
true
true
f7237489e702998835d1d11785ff1e504bcdfd13
4,104
py
Python
async_asgi_testclient/websocket.py
kleschenko/async-asgi-testclient
f3243ea332b0a91f3990676aa850fdf68676ae93
[ "MIT" ]
null
null
null
async_asgi_testclient/websocket.py
kleschenko/async-asgi-testclient
f3243ea332b0a91f3990676aa850fdf68676ae93
[ "MIT" ]
null
null
null
async_asgi_testclient/websocket.py
kleschenko/async-asgi-testclient
f3243ea332b0a91f3990676aa850fdf68676ae93
[ "MIT" ]
null
null
null
from async_asgi_testclient.utils import create_monitored_task from async_asgi_testclient.utils import flatten_headers from async_asgi_testclient.utils import make_test_headers_path_and_query_string from async_asgi_testclient.utils import Message from async_asgi_testclient.utils import receive from http.cookies import S...
31.328244
84
0.602827
from async_asgi_testclient.utils import create_monitored_task from async_asgi_testclient.utils import flatten_headers from async_asgi_testclient.utils import make_test_headers_path_and_query_string from async_asgi_testclient.utils import Message from async_asgi_testclient.utils import receive from http.cookies import S...
true
true
f7237499d6ef6b66f57eb9b6519906e628dd61dc
2,892
py
Python
Brain/Modules/help.py
AdityaTelange/Python-Telegram-Bot-SAMPLE-STRUCTURE-
cb166bd3bae5b27d404eecc272e2b41aa929738f
[ "MIT" ]
6
2020-09-06T16:24:02.000Z
2022-02-14T13:11:27.000Z
Brain/Modules/help.py
AdityaTelange/Python-Telegram-Bot-SAMPLE-STRUCTURE-
cb166bd3bae5b27d404eecc272e2b41aa929738f
[ "MIT" ]
null
null
null
Brain/Modules/help.py
AdityaTelange/Python-Telegram-Bot-SAMPLE-STRUCTURE-
cb166bd3bae5b27d404eecc272e2b41aa929738f
[ "MIT" ]
1
2019-07-01T23:40:35.000Z
2019-07-01T23:40:35.000Z
import re from telegram import ParseMode, InlineKeyboardMarkup, InlineKeyboardButton from telegram.chataction import ChatAction from telegram.error import BadRequest from telegram.ext.dispatcher import run_async from Brain import Utils from Brain.Modules.strings import logger, HELPER_SCRIPTS, HELP_STRINGS @run_asyn...
35.703704
119
0.63278
import re from telegram import ParseMode, InlineKeyboardMarkup, InlineKeyboardButton from telegram.chataction import ChatAction from telegram.error import BadRequest from telegram.ext.dispatcher import run_async from Brain import Utils from Brain.Modules.strings import logger, HELPER_SCRIPTS, HELP_STRINGS @run_asyn...
true
true
f72374ee2fd64cbf7283cb678c83b8d8d0188e8c
5,714
py
Python
iemlav/lib/firewall/firewall_monitor.py
GouravRDutta/IemLabsAV
8d397a3d59e067176269c5e84d73bf53951b7b3f
[ "MIT" ]
null
null
null
iemlav/lib/firewall/firewall_monitor.py
GouravRDutta/IemLabsAV
8d397a3d59e067176269c5e84d73bf53951b7b3f
[ "MIT" ]
null
null
null
iemlav/lib/firewall/firewall_monitor.py
GouravRDutta/IemLabsAV
8d397a3d59e067176269c5e84d73bf53951b7b3f
[ "MIT" ]
1
2021-07-02T12:29:10.000Z
2021-07-02T12:29:10.000Z
# -*- coding: utf-8 -*- import re import socket import psutil import time from iemlav import logger from iemlav.lib.firewall import utils class FirewallMonitor(object): """Class for FirewallMonitor.""" module_name = "FirewallMonitor" def __init__(self, interface=None, debug=False): """Initializ...
24.951965
91
0.476724
import re import socket import psutil import time from iemlav import logger from iemlav.lib.firewall import utils class FirewallMonitor(object): module_name = "FirewallMonitor" def __init__(self, interface=None, debug=False): self.logger = logger.IemlAVLogger( self.module_name, ...
true
true
f723750f99457e168389453ca5bf016fae7541b3
2,300
py
Python
setup.py
bottoy/requests_auth
f95ecd833d52341ebe0e2c974d133577ae124dd9
[ "MIT" ]
1
2020-04-02T02:29:56.000Z
2020-04-02T02:29:56.000Z
setup.py
bottoy/requests_auth
f95ecd833d52341ebe0e2c974d133577ae124dd9
[ "MIT" ]
null
null
null
setup.py
bottoy/requests_auth
f95ecd833d52341ebe0e2c974d133577ae124dd9
[ "MIT" ]
null
null
null
import os from setuptools import setup, find_packages this_dir = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_dir, "README.md"), "r") as f: long_description = f.read() # More information on properties: https://packaging.python.org/distributing setup( name="requests_auth", version...
34.328358
89
0.61
import os from setuptools import setup, find_packages this_dir = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_dir, "README.md"), "r") as f: long_description = f.read() setup( name="requests_auth", version=open("requests_auth/version.py").readlines()[-1].split()[-1].strip("\"'"),...
true
true
f723757147c0b88be1037f2756655a023f28d617
20,134
py
Python
examples/GetUserSPNs.py
grkoll/impacket
90a91045139659d83409af1771dcaf697c00de99
[ "Apache-1.1" ]
null
null
null
examples/GetUserSPNs.py
grkoll/impacket
90a91045139659d83409af1771dcaf697c00de99
[ "Apache-1.1" ]
null
null
null
examples/GetUserSPNs.py
grkoll/impacket
90a91045139659d83409af1771dcaf697c00de99
[ "Apache-1.1" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2016 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Author: # Alberto Solino (@agsolino) # # Description: # This module will try to fin...
46.932401
161
0.568243
# will encrypt the ticket with the account the SPN is running under, this could be used for an offline # bruteforcing attack of the SPNs account NTLM hash if we can gather valid TGS for those SPNs. # This is part of the kerberoast attack researched by Tim Medin (@timmedin) and detailed at # ...
false
true
f72376b693b2c15acbb9f4539d2913c118aebefc
617
py
Python
tests/codegen/ccode/scripts/arrays_pointers.py
dina-fouad/pyccel
f4d919e673b400442b9c7b81212b6fbef749c7b7
[ "MIT" ]
206
2018-06-28T00:28:47.000Z
2022-03-29T05:17:03.000Z
tests/codegen/ccode/scripts/arrays_pointers.py
dina-fouad/pyccel
f4d919e673b400442b9c7b81212b6fbef749c7b7
[ "MIT" ]
670
2018-07-23T11:02:24.000Z
2022-03-30T07:28:05.000Z
tests/codegen/ccode/scripts/arrays_pointers.py
dina-fouad/pyccel
f4d919e673b400442b9c7b81212b6fbef749c7b7
[ "MIT" ]
19
2019-09-19T06:01:00.000Z
2022-03-29T05:17:06.000Z
# pylint: disable=missing-function-docstring, missing-module-docstring/ #============================================================================== def allocatable_to_pointer(): from numpy import array a = array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) c = a #pylint:disable=unused-variable def pointer_to_po...
23.730769
79
0.531605
def allocatable_to_pointer(): from numpy import array a = array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) c = a def pointer_to_pointer(): from numpy import array a = array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) b = a c = b def reassign_pointers(): from numpy import array a = array([1, ...
true
true
f72376ccbed4c815899d44928f38fb797d9853a2
299
py
Python
posthog/migrations/0049_delete_funnelstep.py
Jujhar/posthog
d4df76250632f84b830b76b0ec48caaafbed568f
[ "MIT" ]
1
2020-07-02T12:25:41.000Z
2020-07-02T12:25:41.000Z
posthog/migrations/0049_delete_funnelstep.py
Jujhar/posthog
d4df76250632f84b830b76b0ec48caaafbed568f
[ "MIT" ]
1
2020-04-25T13:19:59.000Z
2020-04-25T13:20:17.000Z
posthog/migrations/0049_delete_funnelstep.py
Jujhar/posthog
d4df76250632f84b830b76b0ec48caaafbed568f
[ "MIT" ]
1
2020-06-24T07:59:41.000Z
2020-06-24T07:59:41.000Z
# Generated by Django 3.0.3 on 2020-04-21 10:08 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('posthog', '0048_auto_20200420_1051'), ] operations = [ migrations.DeleteModel( name='FunnelStep', ), ]
17.588235
47
0.608696
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('posthog', '0048_auto_20200420_1051'), ] operations = [ migrations.DeleteModel( name='FunnelStep', ), ]
true
true
f723770420dd7d271b2a220e8e34b5abf9201f58
4,622
py
Python
AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py
BreakerOfThings/o3de
f4c59f868c726470ec910623facd836047d059c3
[ "Apache-2.0", "MIT" ]
1
2022-03-28T08:06:58.000Z
2022-03-28T08:06:58.000Z
AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py
BreakerOfThings/o3de
f4c59f868c726470ec910623facd836047d059c3
[ "Apache-2.0", "MIT" ]
null
null
null
AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py
BreakerOfThings/o3de
f4c59f868c726470ec910623facd836047d059c3
[ "Apache-2.0", "MIT" ]
null
null
null
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ import pytest from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest...
52.522727
114
0.844656
import pytest from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite @pytest.mark.parametrize("launcher_platform", ['windows_editor']) @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(EditorTestSuite): class test_Landscap...
true
true