hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7778f12358a296504642441a617a3f0940976a0
16,807
py
Python
pygsti/modelpacks/legacy/std2Q_XY.py
colibri-coruscans/pyGSTi
da54f4abf668a28476030528f81afa46a1fbba33
[ "Apache-2.0" ]
73
2016-01-28T05:02:05.000Z
2022-03-30T07:46:33.000Z
pygsti/modelpacks/legacy/std2Q_XY.py
colibri-coruscans/pyGSTi
da54f4abf668a28476030528f81afa46a1fbba33
[ "Apache-2.0" ]
113
2016-02-25T15:32:18.000Z
2022-03-31T13:18:13.000Z
pygsti/modelpacks/legacy/std2Q_XY.py
colibri-coruscans/pyGSTi
da54f4abf668a28476030528f81afa46a1fbba33
[ "Apache-2.0" ]
41
2016-03-15T19:32:07.000Z
2022-02-16T10:22:05.000Z
#*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights # in this software. # Licensed...
42.875
117
0.333076
import sys as _sys from ...circuits import circuitconstruction as _strc from ...models import modelconstruction as _setc from .. import stdtarget as _stdtarget description = "I*X(pi/2), I*Y(pi/2), X(pi/2)*I, Y(pi/2)*I, and CPHASE gates" gates = ['Gix', 'Giy', 'Gxi', 'Gyi', 'Gcphase'] fiducials16 = _strc.to_circuit...
true
true
f77791ac2d7a7ecdd5f2bb17d93beef19cdeb6c3
3,226
py
Python
tests/test_user.py
tosintubi/bookie-map
4086c702ee9d2b624dd3bbc690f08bf0258ef8ec
[ "MIT" ]
null
null
null
tests/test_user.py
tosintubi/bookie-map
4086c702ee9d2b624dd3bbc690f08bf0258ef8ec
[ "MIT" ]
2
2022-01-15T13:29:48.000Z
2022-02-19T20:05:30.000Z
tests/test_user.py
tosintubi/bookie-map
4086c702ee9d2b624dd3bbc690f08bf0258ef8ec
[ "MIT" ]
null
null
null
import os import json from unittest import TestCase, mock from dotenv import load_dotenv from flask import jsonify from src import create_app from src.google import decode_token, login from src.constants.http_status_codes import HTTP_200_OK, HTTP_405_METHOD_NOT_ALLOWED,HTTP_400_BAD_REQUEST class TestUser(TestCase):...
33.257732
105
0.592684
import os import json from unittest import TestCase, mock from dotenv import load_dotenv from flask import jsonify from src import create_app from src.google import decode_token, login from src.constants.http_status_codes import HTTP_200_OK, HTTP_405_METHOD_NOT_ALLOWED,HTTP_400_BAD_REQUEST class TestUser(TestCase):...
true
true
f7779220984f6ba13de29b342417a4c304876233
3,560
py
Python
translation.py
akshaynagpal/helloworld-web
250fe99658ecc6082b1257396aa094a0d74ad77c
[ "MIT" ]
1
2022-03-14T16:47:08.000Z
2022-03-14T16:47:08.000Z
translation.py
akshaynagpal/helloworld-web
250fe99658ecc6082b1257396aa094a0d74ad77c
[ "MIT" ]
null
null
null
translation.py
akshaynagpal/helloworld-web
250fe99658ecc6082b1257396aa094a0d74ad77c
[ "MIT" ]
null
null
null
from google.cloud import translate, datastore import google.auth import json import pyrebase import json import logging FIREBASE_CONFIG = None with open('keys/firebase-secrets.json') as f: FIREBASE_CONFIG = json.load(f) class DataStore(object): def __init__(self, project_id): self.client = datastore.C...
30.689655
81
0.624719
from google.cloud import translate, datastore import google.auth import json import pyrebase import json import logging FIREBASE_CONFIG = None with open('keys/firebase-secrets.json') as f: FIREBASE_CONFIG = json.load(f) class DataStore(object): def __init__(self, project_id): self.client = datastore.C...
true
true
f77792c609b09726883e26b7f5f434d08b47c9d3
1,864
py
Python
setup.py
dimitern/xmlstarlet
f6304e1f1baff1867b0101501b3f73f09809ec0f
[ "MIT" ]
8
2019-10-31T11:48:08.000Z
2022-03-11T16:37:39.000Z
setup.py
dimitern/xmlstarlet
f6304e1f1baff1867b0101501b3f73f09809ec0f
[ "MIT" ]
16
2020-04-06T15:11:16.000Z
2022-03-28T07:23:35.000Z
setup.py
dimitern/xmlstarlet
f6304e1f1baff1867b0101501b3f73f09809ec0f
[ "MIT" ]
2
2020-10-12T13:47:43.000Z
2020-12-22T05:32:57.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" import sys from setuptools import find_packages, setup with open("README.rst") as readme_file: readme = readme_file.read() with open("HISTORY.rst") as history_file: history = history_file.read() requirements = ["cffi>=1.0.0"] setup_requ...
31.066667
76
0.655043
import sys from setuptools import find_packages, setup with open("README.rst") as readme_file: readme = readme_file.read() with open("HISTORY.rst") as history_file: history = history_file.read() requirements = ["cffi>=1.0.0"] setup_requirements = ["pytest-runner", "setuptools", "wheel", "cffi>=1.0.0"] if...
true
true
f77794b55b9294b74f296ce3e22717c31007b42c
31,281
py
Python
tests/unit/test_collector.py
Shivansh-007/pip
0c284520c6d068cb25ac89d9dbee0456c2eba23a
[ "MIT" ]
1
2022-03-06T13:06:33.000Z
2022-03-06T13:06:33.000Z
tests/unit/test_collector.py
Shivansh-007/pip
0c284520c6d068cb25ac89d9dbee0456c2eba23a
[ "MIT" ]
1
2022-03-07T01:14:16.000Z
2022-03-07T01:14:16.000Z
tests/unit/test_collector.py
Shivansh-007/pip
0c284520c6d068cb25ac89d9dbee0456c2eba23a
[ "MIT" ]
1
2021-09-27T11:14:58.000Z
2021-09-27T11:14:58.000Z
import itertools import logging import os.path import re import urllib.request import uuid from textwrap import dedent from typing import List, Optional, Tuple from unittest import mock import pytest from pip._vendor import html5lib, requests from pip._internal.exceptions import NetworkConnectionError from pip._inter...
33.419872
88
0.612896
import itertools import logging import os.path import re import urllib.request import uuid from textwrap import dedent from typing import List, Optional, Tuple from unittest import mock import pytest from pip._vendor import html5lib, requests from pip._internal.exceptions import NetworkConnectionError from pip._inter...
true
true
f77795a2c75cd674e179d455da64b704af6137a5
1,153
py
Python
setup.py
MisterWil/python-abode
4ffce2314ed7e2c5d48a2c2758fddaef440b05ad
[ "MIT" ]
48
2017-08-10T21:32:50.000Z
2021-08-15T05:09:58.000Z
setup.py
MisterWil/python-abode
4ffce2314ed7e2c5d48a2c2758fddaef440b05ad
[ "MIT" ]
81
2017-08-10T21:39:40.000Z
2022-01-16T18:43:08.000Z
setup.py
MisterWil/python-abode
4ffce2314ed7e2c5d48a2c2758fddaef440b05ad
[ "MIT" ]
28
2017-08-17T21:20:12.000Z
2022-01-16T12:22:07.000Z
#!/usr/bin/env python3 """AbodePy setup script.""" from setuptools import setup, find_packages from abodepy.helpers.constants import (__version__, PROJECT_PACKAGE_NAME, PROJECT_LICENSE, PROJECT_URL, PROJECT_EMAIL, PROJECT_DESCRIPTION, ...
30.342105
75
0.608846
from setuptools import setup, find_packages from abodepy.helpers.constants import (__version__, PROJECT_PACKAGE_NAME, PROJECT_LICENSE, PROJECT_URL, PROJECT_EMAIL, PROJECT_DESCRIPTION, PROJECT_CLASSIFIERS...
true
true
f777966aa055ae28ba9575545e6cf32f9cf89447
13,157
py
Python
imagenet_fast/main_test.py
snu-mllab/PuzzleMix
fcf2406ecc666e0ba2734dd587a229bc73abd2ab
[ "MIT" ]
126
2020-07-08T08:13:00.000Z
2022-03-23T08:49:34.000Z
imagenet/main_test.py
meehawk/PuzzleMix
18986c3cd745a18b281e45082704cfd497ad6a9b
[ "MIT" ]
5
2020-12-01T07:51:13.000Z
2022-03-24T15:38:13.000Z
imagenet/main_test.py
meehawk/PuzzleMix
18986c3cd745a18b281e45082704cfd497ad6a9b
[ "MIT" ]
13
2020-07-08T08:13:35.000Z
2022-03-10T09:24:17.000Z
# This module is adapted from https://github.com/mahyarnajibi/FreeAdversarialTraining/blob/master/main_free.py # Which in turn was adapted from https://github.com/pytorch/examples/blob/master/imagenet/main.py import init_paths import argparse import os import time import sys import torch import torch.nn as nn import to...
39.274627
126
0.629855
import init_paths import argparse import os import time import sys import torch import torch.nn as nn import torch.nn.functional as F import torch.backends.cudnn as cudnn import torch.optim import torchvision.transforms as transforms import torchvision.datasets as datasets from torch.autograd import Variable import mat...
true
true
f77796852606b1b9eb1e84bf74cf71374195829c
1,417
py
Python
python/library/test.py
Chetchita641/mlx90640-library
8ef14136d7e70b097ac1f97cdad074d3f502b73c
[ "Apache-2.0" ]
null
null
null
python/library/test.py
Chetchita641/mlx90640-library
8ef14136d7e70b097ac1f97cdad074d3f502b73c
[ "Apache-2.0" ]
null
null
null
python/library/test.py
Chetchita641/mlx90640-library
8ef14136d7e70b097ac1f97cdad074d3f502b73c
[ "Apache-2.0" ]
null
null
null
import sys import colorsys import time from PIL import Image sys.path.insert(0, "./build/lib.linux-armv7l-2.7") import MLX90640 as mlx left_img = Image.new( 'RGB', (24,32), "black") right_img = Image.new( 'RGB', (24,32), "black") def temp_to_col(val): hue = (180 - (val * 6)) / 360.0 return tuple([int(c*255) ...
22.854839
81
0.567396
import sys import colorsys import time from PIL import Image sys.path.insert(0, "./build/lib.linux-armv7l-2.7") import MLX90640 as mlx left_img = Image.new( 'RGB', (24,32), "black") right_img = Image.new( 'RGB', (24,32), "black") def temp_to_col(val): hue = (180 - (val * 6)) / 360.0 return tuple([int(c*255) ...
true
true
f77796d0a65e3b49dfc64463a30cfb82ae78585b
15,941
py
Python
datasets/transforms.py
anirudh-chakravarthy/PropTR
29448a0c73da6c9918d161228d92409d3d1315db
[ "Apache-2.0" ]
null
null
null
datasets/transforms.py
anirudh-chakravarthy/PropTR
29448a0c73da6c9918d161228d92409d3d1315db
[ "Apache-2.0" ]
null
null
null
datasets/transforms.py
anirudh-chakravarthy/PropTR
29448a0c73da6c9918d161228d92409d3d1315db
[ "Apache-2.0" ]
null
null
null
""" Transforms and data augmentation for sequence level images, bboxes and masks. Mostly copy-paste from https://github.com/Epiphqny/VisTR/blob/master/datasets/transforms.py """ import random import PIL import torch import torchvision.transforms as T import torchvision.transforms.functional as F from util.box_ops im...
35.112335
104
0.608996
import random import PIL import torch import torchvision.transforms as T import torchvision.transforms.functional as F from util.box_ops import box_xyxy_to_cxcywh, box_iou from util.misc import interpolate import numpy as np from numpy import random as rand from PIL import Image import cv2 import pdb def bbox_overla...
true
true
f77796d7f135e6bc5553ea2ae1f4bc1b95d50a50
3,445
py
Python
lisa/commands.py
srveniga/lisa
0b5bcf028ed4211d79ff90b9f915981c426baab4
[ "MIT" ]
null
null
null
lisa/commands.py
srveniga/lisa
0b5bcf028ed4211d79ff90b9f915981c426baab4
[ "MIT" ]
null
null
null
lisa/commands.py
srveniga/lisa
0b5bcf028ed4211d79ff90b9f915981c426baab4
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import asyncio import functools from argparse import Namespace from typing import Iterable, Optional, cast from lisa import messages, notifier, schema from lisa.parameter_parser.runbook import RunbookBuilder from lisa.runner import RootRunner fr...
32.809524
83
0.700435
import asyncio import functools from argparse import Namespace from typing import Iterable, Optional, cast from lisa import messages, notifier, schema from lisa.parameter_parser.runbook import RunbookBuilder from lisa.runner import RootRunner from lisa.testselector import select_testcases from lisa.testsuite import T...
true
true
f77797d87e7bda723868ae99ce7e5e984751956a
215,396
py
Python
h2o-py/h2o/frame.py
JannisBush/h2o-3
30aa2a86e6bfa1febb5f95f3cb43811337895f7f
[ "Apache-2.0" ]
null
null
null
h2o-py/h2o/frame.py
JannisBush/h2o-3
30aa2a86e6bfa1febb5f95f3cb43811337895f7f
[ "Apache-2.0" ]
null
null
null
h2o-py/h2o/frame.py
JannisBush/h2o-3
30aa2a86e6bfa1febb5f95f3cb43811337895f7f
[ "Apache-2.0" ]
1
2021-09-09T03:47:11.000Z
2021-09-09T03:47:11.000Z
# -*- encoding: utf-8 -*- """ H2O data frame. :copyright: (c) 2016 H2O.ai :license: Apache License Version 2.0 (see LICENSE for details) """ from __future__ import absolute_import, division, print_function, unicode_literals from h2o.utils.compatibility import * # NOQA import csv import datetime import functools fr...
41.17683
165
0.583186
from __future__ import absolute_import, division, print_function, unicode_literals from h2o.utils.compatibility import * import csv import datetime import functools from io import StringIO import os import sys import tempfile import traceback from types import FunctionType import warnings import h2o from h2o.base im...
true
true
f777984c23c510e4f8392b1cb4a56ba4296274bf
815
py
Python
catalog/migrations/0002_auto_20191228_1041.py
velidan/django_book_library
624f7cbcffef701a3b76d07934913aa7426c851c
[ "Apache-2.0" ]
null
null
null
catalog/migrations/0002_auto_20191228_1041.py
velidan/django_book_library
624f7cbcffef701a3b76d07934913aa7426c851c
[ "Apache-2.0" ]
null
null
null
catalog/migrations/0002_auto_20191228_1041.py
velidan/django_book_library
624f7cbcffef701a3b76d07934913aa7426c851c
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.1 on 2019-12-28 08:41 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('catalog', '0001_initial'), ] operations = [ migrations.CreateModel( name='Language', ...
30.185185
119
0.586503
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('catalog', '0001_initial'), ] operations = [ migrations.CreateModel( name='Language', fields=[ ('id', models.AutoFie...
true
true
f77799df76535d465dc7454afe73085344aad3a1
17,543
py
Python
flopy/seawat/swtvsc.py
ritchie46/flopy
8e7284dcb3aaf5c12293d442248c2c2d9959f835
[ "CC0-1.0", "BSD-3-Clause" ]
1
2019-11-03T15:06:10.000Z
2019-11-03T15:06:10.000Z
flopy/seawat/swtvsc.py
ritchie46/flopy
8e7284dcb3aaf5c12293d442248c2c2d9959f835
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
flopy/seawat/swtvsc.py
ritchie46/flopy
8e7284dcb3aaf5c12293d442248c2c2d9959f835
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
import sys import numpy as np from ..pakbase import Package from ..utils import Util3d, Transient3d class SeawatVsc(Package): """ SEAWAT Viscosity Package Class. Parameters ---------- model : model object The model object (of type :class:`flopy.seawat.swt.Seawat`) to which this pa...
36.932632
82
0.537251
import sys import numpy as np from ..pakbase import Package from ..utils import Util3d, Transient3d class SeawatVsc(Package): unitnumber = 38 def __init__(self, model, mt3dmuflg=-1, viscmin=0., viscmax=0., viscref=8.904e-4, nsmueos=0, mutempopt=2, mtmuspec=1, dmudc=1.923e-06...
true
true
f77799eca1d2f1b428da234ad48903ef237deffd
1,834
py
Python
core/cooggerapp/models/issue.py
bisguzar/coogger
ba8da2d4dcc7014d5e277ea8c400e312c4721e8f
[ "MIT" ]
null
null
null
core/cooggerapp/models/issue.py
bisguzar/coogger
ba8da2d4dcc7014d5e277ea8c400e312c4721e8f
[ "MIT" ]
null
null
null
core/cooggerapp/models/issue.py
bisguzar/coogger
ba8da2d4dcc7014d5e277ea8c400e312c4721e8f
[ "MIT" ]
1
2020-06-13T09:36:53.000Z
2020-06-13T09:36:53.000Z
from django.contrib.auth.models import User from django.db import models from django.urls import reverse from django.utils.text import slugify from django_md_editor.models import EditorMdField from core.cooggerapp.choices import ISSUE_CHOICES, make_choices from ...threaded_comment.models import AbstractThreadedCommen...
29.580645
85
0.62868
from django.contrib.auth.models import User from django.db import models from django.urls import reverse from django.utils.text import slugify from django_md_editor.models import EditorMdField from core.cooggerapp.choices import ISSUE_CHOICES, make_choices from ...threaded_comment.models import AbstractThreadedCommen...
true
true
f7779abdf655c0c314a2f152ce893c0e49a2b7bb
1,368
py
Python
pySpatialTools/utils/artificial_data/__init__.py
tgquintela/pySpatialTools
e028008f9750521bf7d311f7cd3323c88d621ea4
[ "MIT" ]
8
2015-07-21T05:15:16.000Z
2018-06-12T18:22:52.000Z
pySpatialTools/utils/artificial_data/__init__.py
tgquintela/pySpatialTools
e028008f9750521bf7d311f7cd3323c88d621ea4
[ "MIT" ]
6
2016-01-11T22:25:28.000Z
2016-01-28T16:17:46.000Z
pySpatialTools/utils/artificial_data/__init__.py
tgquintela/pySpatialTools
e028008f9750521bf7d311f7cd3323c88d621ea4
[ "MIT" ]
null
null
null
""" Artificial data =============== Module which groups artificial random data creation functions. """ import numpy as np ## Artificial random spatial locations from artificial_point_locations import random_space_points,\ random_transformed_space_points ## Artificial random spatial relations from artificial_sp...
36
79
0.849415
import numpy as np from artificial_point_locations import random_space_points,\ random_transformed_space_points from artificial_spatial_relations import randint_sparse_matrix,\ generate_randint_relations, generate_random_relations_cutoffs from artificial_data_membership import random_membership, list_member...
true
true
f7779af4e29b6c28381e11e3588671983665a769
6,248
py
Python
rnn.py
guptakhil12/show-tell
5003898894425e902bed10d4cf57207842ee3bcb
[ "MIT" ]
1
2019-12-16T03:51:26.000Z
2019-12-16T03:51:26.000Z
rnn.py
guptakhil12/show-tell
5003898894425e902bed10d4cf57207842ee3bcb
[ "MIT" ]
null
null
null
rnn.py
guptakhil12/show-tell
5003898894425e902bed10d4cf57207842ee3bcb
[ "MIT" ]
null
null
null
from cnn import ResNet import torchvision import torchvision.transforms as transforms import torch import torch.nn as nn class RNN(torch.nn.Module): def __init__(self, embed_dim, num_hidden_units, vocab_size, num_layers): ''' Args: embed_dim (int) : Embedding dimension between CNN a...
40.836601
121
0.649328
from cnn import ResNet import torchvision import torchvision.transforms as transforms import torch import torch.nn as nn class RNN(torch.nn.Module): def __init__(self, embed_dim, num_hidden_units, vocab_size, num_layers): super(RNN, self).__init__() self.embeddings = nn.Embedding(vocab_size, ...
true
true
f7779b65823596398f99a3ca93235ce1de7599aa
6,004
py
Python
face_in_image.py
suneric/face_detection
bf345a29690729eca912d830f3f5d690245de995
[ "MIT" ]
null
null
null
face_in_image.py
suneric/face_detection
bf345a29690729eca912d830f3f5d690245de995
[ "MIT" ]
null
null
null
face_in_image.py
suneric/face_detection
bf345a29690729eca912d830f3f5d690245de995
[ "MIT" ]
null
null
null
import face_recognition import cv2 import argparse import os import numpy as np import math def get_args(): parser = argparse.ArgumentParser() parser.add_argument('--input', type=str, default="img") parser.add_argument('--output', type=str, default=None) parser.add_argument('--source', type=str, defaul...
36.609756
109
0.583444
import face_recognition import cv2 import argparse import os import numpy as np import math def get_args(): parser = argparse.ArgumentParser() parser.add_argument('--input', type=str, default="img") parser.add_argument('--output', type=str, default=None) parser.add_argument('--source', type=str, defaul...
true
true
f7779cbc16e61711cb93446a45e789a53ebb0b2d
11,660
py
Python
xmantissa/test/test_webshell.py
jonathanj/mantissa
53e5502aba23ce99be78b27f923a276593033fe8
[ "MIT" ]
6
2016-02-17T15:04:53.000Z
2021-08-20T09:44:10.000Z
xmantissa/test/test_webshell.py
jonathanj/mantissa
53e5502aba23ce99be78b27f923a276593033fe8
[ "MIT" ]
62
2015-02-04T23:40:55.000Z
2021-02-18T19:56:02.000Z
xmantissa/test/test_webshell.py
jonathanj/mantissa
53e5502aba23ce99be78b27f923a276593033fe8
[ "MIT" ]
8
2015-11-15T17:26:42.000Z
2020-12-02T06:36:52.000Z
""" Tests for common functionality between L{IWebViewer} implementations. No runnable tests are currently defined here; the mixin defined here is imported from test_webapp (for the authenticated view) and test_publicweb (for the anonymous view). """ from axiom.userbase import LoginSystem from axiom.store import Stor...
38.104575
106
0.672899
from axiom.userbase import LoginSystem from axiom.store import Store from nevow.rend import Page, NotFound from nevow.page import deferflatten, Element from nevow.loaders import stan from nevow.athena import LivePage from nevow import tags from nevow.inevow import IRequest from nevow.context import WovenContext fro...
true
true
f7779d2604b7d9f60a94661c526dc161484877fe
31,073
py
Python
robosuite/environments/panda.py
ultrainren/robosuite
4a32bde5f8f6247733a2ca439318bedc5a83a941
[ "MIT" ]
null
null
null
robosuite/environments/panda.py
ultrainren/robosuite
4a32bde5f8f6247733a2ca439318bedc5a83a941
[ "MIT" ]
null
null
null
robosuite/environments/panda.py
ultrainren/robosuite
4a32bde5f8f6247733a2ca439318bedc5a83a941
[ "MIT" ]
null
null
null
from collections import OrderedDict import numpy as np import robosuite.utils.transform_utils as T from robosuite.environments import MujocoEnv from robosuite.models.grippers import gripper_factory from robosuite.models.robots import Panda from robosuite.controllers.arm_controller import * from collections import de...
39.036432
121
0.615711
from collections import OrderedDict import numpy as np import robosuite.utils.transform_utils as T from robosuite.environments import MujocoEnv from robosuite.models.grippers import gripper_factory from robosuite.models.robots import Panda from robosuite.controllers.arm_controller import * from collections import de...
true
true
f7779e30f9c1570761678990dd66d3394c1994e1
2,752
py
Python
easygo/keyCap.py
shinkansan/2019-UGRP-DPoom
eedee93b47e068f22bf420140d869a43f7551876
[ "Apache-2.0" ]
33
2020-07-16T06:31:38.000Z
2022-03-23T18:34:58.000Z
easygo/keyCap.py
shinkansan/2019-UGRP-DPoom
eedee93b47e068f22bf420140d869a43f7551876
[ "Apache-2.0" ]
5
2020-08-27T08:06:21.000Z
2022-02-23T12:34:09.000Z
easygo/keyCap.py
shinkansan/2019-UGRP-DPoom
eedee93b47e068f22bf420140d869a43f7551876
[ "Apache-2.0" ]
10
2020-08-05T15:05:58.000Z
2021-11-19T10:20:44.000Z
global isWindows isWindows = False try: from win32api import STD_INPUT_HANDLE from win32console import GetStdHandle, KEY_EVENT, ENABLE_ECHO_INPUT, ENABLE_LINE_INPUT, ENABLE_PROCESSED_INPUT isWindows = True except ImportError as e: import sys import select import termios class Key...
32
115
0.542515
global isWindows isWindows = False try: from win32api import STD_INPUT_HANDLE from win32console import GetStdHandle, KEY_EVENT, ENABLE_ECHO_INPUT, ENABLE_LINE_INPUT, ENABLE_PROCESSED_INPUT isWindows = True except ImportError as e: import sys import select import termios class Key...
false
true
f7779eca6583667730dc709e4c41e4b17d2155ee
20,952
py
Python
src/pyshark/capture/capture.py
PaleNeutron/pyshark
51c67c67889164c47bcd1cda7b9fb75588e0349b
[ "MIT" ]
1
2021-03-08T20:27:51.000Z
2021-03-08T20:27:51.000Z
src/pyshark/capture/capture.py
PaleNeutron/pyshark
51c67c67889164c47bcd1cda7b9fb75588e0349b
[ "MIT" ]
null
null
null
src/pyshark/capture/capture.py
PaleNeutron/pyshark
51c67c67889164c47bcd1cda7b9fb75588e0349b
[ "MIT" ]
null
null
null
import asyncio import os import threading import subprocess import concurrent.futures import sys import logging from distutils.version import LooseVersion from pyshark.tshark.tshark import get_process_path, get_tshark_display_filter_flag, \ tshark_supports_json, TSharkVersionException, get_tshark_version, tshark_s...
42.412955
120
0.620704
import asyncio import os import threading import subprocess import concurrent.futures import sys import logging from distutils.version import LooseVersion from pyshark.tshark.tshark import get_process_path, get_tshark_display_filter_flag, \ tshark_supports_json, TSharkVersionException, get_tshark_version, tshark_s...
true
true
f7779ed20a67678b08f7c033859b9e54a0fa3ddf
821
py
Python
sockeye/build_input_embeddings.py
msobrevillac/sockeye
6ed5e2dbe003673d03272987b79f73bdee86283d
[ "Apache-2.0" ]
null
null
null
sockeye/build_input_embeddings.py
msobrevillac/sockeye
6ed5e2dbe003673d03272987b79f73bdee86283d
[ "Apache-2.0" ]
null
null
null
sockeye/build_input_embeddings.py
msobrevillac/sockeye
6ed5e2dbe003673d03272987b79f73bdee86283d
[ "Apache-2.0" ]
null
null
null
import numpy as np import json src_embed_file = '/home/msobrevillac/Projects/phd/NLG/sockeye/pre-embeddings/embed-in-src.npy' src_vocab_file = '/home/msobrevillac/Projects/phd/NLG/sockeye/pre-embeddings/vocab-in-src.json' vocab = {} vectors = [] with open('/home/msobrevillac/Projects/phd/Resources/Embeddings/glove/g...
30.407407
101
0.657734
import numpy as np import json src_embed_file = '/home/msobrevillac/Projects/phd/NLG/sockeye/pre-embeddings/embed-in-src.npy' src_vocab_file = '/home/msobrevillac/Projects/phd/NLG/sockeye/pre-embeddings/vocab-in-src.json' vocab = {} vectors = [] with open('/home/msobrevillac/Projects/phd/Resources/Embeddings/glove/g...
true
true
f7779f058201045a89fccd679a0dbe9ced1c1c23
2,990
py
Python
app/github/webhook_model.py
serdalis/snyk-watcher
52e03c0cf6b93f0f0dab5c69bb88b6a014c5a927
[ "MIT" ]
18
2021-02-18T04:31:20.000Z
2022-03-26T02:22:47.000Z
app/github/webhook_model.py
serdalis/snyk-watcher
52e03c0cf6b93f0f0dab5c69bb88b6a014c5a927
[ "MIT" ]
1
2022-02-16T22:43:49.000Z
2022-02-16T22:43:49.000Z
app/github/webhook_model.py
serdalis/snyk-watcher
52e03c0cf6b93f0f0dab5c69bb88b6a014c5a927
[ "MIT" ]
6
2021-02-25T18:10:38.000Z
2022-02-16T22:52:41.000Z
from app.common.utils import get_by_path from app.common.constants import IMPLEMENTED_EVENTS from pydantic import BaseModel, ValidationError, root_validator # Nested pull_request object, describes pull_request that triggered webhook. class PullRequest(BaseModel): # Was pull request merged merged: bool = Fals...
30.510204
78
0.642809
from app.common.utils import get_by_path from app.common.constants import IMPLEMENTED_EVENTS from pydantic import BaseModel, ValidationError, root_validator class PullRequest(BaseModel): merged: bool = False class Repository(BaseModel): org: str name: str default_branch: str class...
true
true
f7779f1186a9449a8f969d660f02fa63ef54071e
7,159
py
Python
FER/em_network/train_3dCNNfusion_baseline_full_size.py
Zber5/OpenRadar
701cf166203c3f3e1ba4873cd132a7ccba4f0863
[ "Apache-2.0" ]
1
2021-07-09T18:40:24.000Z
2021-07-09T18:40:24.000Z
FER/em_network/train_3dCNNfusion_baseline_full_size.py
Zber5/OpenRadar
701cf166203c3f3e1ba4873cd132a7ccba4f0863
[ "Apache-2.0" ]
null
null
null
FER/em_network/train_3dCNNfusion_baseline_full_size.py
Zber5/OpenRadar
701cf166203c3f3e1ba4873cd132a7ccba4f0863
[ "Apache-2.0" ]
1
2021-11-13T05:33:50.000Z
2021-11-13T05:33:50.000Z
import torch import torch.nn as nn import numpy as np import random import time from utils import device, AverageMeter, dir_path, write_log, accuracy, save_checkpoint from models.c3d import C3DFusionBaselineFull from dataset import HeatmapDataset from torch.utils.data import DataLoader import os import pandas as pd fr...
34.253589
109
0.609722
import torch import torch.nn as nn import numpy as np import random import time from utils import device, AverageMeter, dir_path, write_log, accuracy, save_checkpoint from models.c3d import C3DFusionBaselineFull from dataset import HeatmapDataset from torch.utils.data import DataLoader import os import pandas as pd fr...
true
true
f7779f6fd58b69baaf711ae3bc5486ae46695b1c
59,430
py
Python
detection_tools/core/post_processing.py
nivosco/detection-tools
bfe461b668cdcd9bcfcfccbdad92342d6fb12fd1
[ "Apache-2.0" ]
null
null
null
detection_tools/core/post_processing.py
nivosco/detection-tools
bfe461b668cdcd9bcfcfccbdad92342d6fb12fd1
[ "Apache-2.0" ]
null
null
null
detection_tools/core/post_processing.py
nivosco/detection-tools
bfe461b668cdcd9bcfcfccbdad92342d6fb12fd1
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
47.620192
144
0.670638
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import numpy as np from six.moves import range from six.moves import zip import tensorflow.compat.v1 as tf from detection_tools.core import box_list from detection_tools.core import box_lis...
true
true
f777a05d592c31d79a004a0c3936fa6f99ce0c85
1,894
py
Python
lib/surface/compute/networks/peerings/delete.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
null
null
null
lib/surface/compute/networks/peerings/delete.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
11
2020-02-29T02:51:12.000Z
2022-03-30T23:20:08.000Z
lib/surface/compute/networks/peerings/delete.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
1
2020-07-24T18:47:35.000Z
2020-07-24T18:47:35.000Z
# -*- coding: utf-8 -*- # # Copyright 2016 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
34.436364
77
0.721225
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.api_lib.compute import base_classes from googlecloudsdk.calliope import base from googlecloudsdk.core import properties class Delete(base.DeleteCommand): @staticmethod def Args(par...
true
true
f777a104fe68ebeeaf43bbe096127790b3f5767a
266
py
Python
test_app.py
feljen/truiSMS
4cdb96ed7e4f3f34cf9611b29fbba24fb438731c
[ "MIT" ]
null
null
null
test_app.py
feljen/truiSMS
4cdb96ed7e4f3f34cf9611b29fbba24fb438731c
[ "MIT" ]
null
null
null
test_app.py
feljen/truiSMS
4cdb96ed7e4f3f34cf9611b29fbba24fb438731c
[ "MIT" ]
1
2019-04-15T02:42:44.000Z
2019-04-15T02:42:44.000Z
import unittest import app class TestSMS(unittest.TestCase): def test_sms(self): self.test_app = app.app.test_client() response = self.test_app.post('/sms', data={'From': '+15556667777'}) self.assertEquals(response.status, "200 OK")
20.461538
76
0.661654
import unittest import app class TestSMS(unittest.TestCase): def test_sms(self): self.test_app = app.app.test_client() response = self.test_app.post('/sms', data={'From': '+15556667777'}) self.assertEquals(response.status, "200 OK")
true
true
f777a10e76e956c0ea843995536e9a6a6e4537a7
1,654
py
Python
setup.py
simonasvaitkus/B.CfnCustomUserPoolAuthorizer
6532665d3b29031f86c19205cd58b0bcd9e4f827
[ "Apache-2.0" ]
null
null
null
setup.py
simonasvaitkus/B.CfnCustomUserPoolAuthorizer
6532665d3b29031f86c19205cd58b0bcd9e4f827
[ "Apache-2.0" ]
null
null
null
setup.py
simonasvaitkus/B.CfnCustomUserPoolAuthorizer
6532665d3b29031f86c19205cd58b0bcd9e4f827
[ "Apache-2.0" ]
1
2022-01-04T07:46:14.000Z
2022-01-04T07:46:14.000Z
from setuptools import setup, find_packages with open('README.md') as readme_file: README = readme_file.read() with open('HISTORY.md') as history_file: HISTORY = history_file.read() with open('VERSION') as file: VERSION = file.read() VERSION = ''.join(VERSION.split()) setup( name='b_cfn_custom_u...
31.807692
72
0.620314
from setuptools import setup, find_packages with open('README.md') as readme_file: README = readme_file.read() with open('HISTORY.md') as history_file: HISTORY = history_file.read() with open('VERSION') as file: VERSION = file.read() VERSION = ''.join(VERSION.split()) setup( name='b_cfn_custom_u...
true
true
f777a12d479e8ded8212b997d190e66e44e3574e
9,437
py
Python
tests/greentest.py
youen/gevent-websocket
708f27eab2027fee62c3a8e8dd15d62a7c163819
[ "BSD-3-Clause" ]
1
2016-01-14T00:36:32.000Z
2016-01-14T00:36:32.000Z
tests/greentest.py
youen/gevent-websocket
708f27eab2027fee62c3a8e8dd15d62a7c163819
[ "BSD-3-Clause" ]
null
null
null
tests/greentest.py
youen/gevent-websocket
708f27eab2027fee62c3a8e8dd15d62a7c163819
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2008-2009 AG Projects # Author: Denis Bilenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mo...
36.019084
108
0.609516
import sys import unittest import time import traceback import re import gevent disabled_marker = '-*-*-*-*-*- disabled -*-*-*-*-*-' def exit_disabled(): sys.exit(disabled_marker) def exit_unless_25(): if sys.version_info[:2] < (2, 5): exit_disabled() VERBOSE = sys.argv.count('-v') > 1 if '--debug...
false
true
f777a135c5f1b6eada78451e175cf6cebddb0fd6
780
py
Python
run_property_sorter.py
PaloAltoNetworks/autocombo
02876a776d8fe3fe5f1a3fbfd3516ec47b4c4801
[ "MIT" ]
2
2021-12-07T22:15:10.000Z
2022-01-07T01:47:36.000Z
run_property_sorter.py
PaloAltoNetworks/autocombo
02876a776d8fe3fe5f1a3fbfd3516ec47b4c4801
[ "MIT" ]
1
2021-11-01T04:03:44.000Z
2021-11-01T04:03:44.000Z
run_property_sorter.py
PaloAltoNetworks/autocombo
02876a776d8fe3fe5f1a3fbfd3516ec47b4c4801
[ "MIT" ]
1
2021-12-07T22:31:47.000Z
2021-12-07T22:31:47.000Z
""" @author: Min Du (midu@paloaltonetworks.com) Copyright (c) 2021 Palo Alto Networks """ import time import logging from utils import misc from utils import const from worker import combo_property_sorter if __name__ == '__main__': misc.init_logger(const.get_data_preparation_logs_filename()) logger = loggin...
27.857143
77
0.721795
import time import logging from utils import misc from utils import const from worker import combo_property_sorter if __name__ == '__main__': misc.init_logger(const.get_data_preparation_logs_filename()) logger = logging.getLogger(misc.get_logger_name(__name__)) logger.info('Property sorter start.') ...
true
true
f777a18035d351cd6841c6122ce794ba8d5f5d1c
1,661
py
Python
test_stop.py
tomcatling/jupyterhub_aws_spawner
b813f786e43b5840a5638aa4429be6be262232d4
[ "BSD-3-Clause" ]
null
null
null
test_stop.py
tomcatling/jupyterhub_aws_spawner
b813f786e43b5840a5638aa4429be6be262232d4
[ "BSD-3-Clause" ]
null
null
null
test_stop.py
tomcatling/jupyterhub_aws_spawner
b813f786e43b5840a5638aa4429be6be262232d4
[ "BSD-3-Clause" ]
1
2018-11-20T20:37:15.000Z
2018-11-20T20:37:15.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Used for testing the stop of an instance """ import os from types import SimpleNamespace # Set env to make debugging in interactive shell more comfortable os.environ['AWS_SPAWNER_TEST'] = '1' import spawner from models import Server from tornado import gen #%% Config...
27.229508
97
0.602047
import os from types import SimpleNamespace os.environ['AWS_SPAWNER_TEST'] = '1' import spawner from models import Server from tornado import gen class DummyUser(): def __init__(self, name,): self.name = name self.last_activity = '' self.server = SimpleNamespace(**{'ip' : '', ...
true
true
f777a195de6ac7081e4dedab05816b6e8f587968
584
py
Python
pymodbus/read_write.py
BugliL/FlaskPymodbusPlayground
8470402131870ed0a65603c904aaa5cd815949dc
[ "MIT" ]
null
null
null
pymodbus/read_write.py
BugliL/FlaskPymodbusPlayground
8470402131870ed0a65603c904aaa5cd815949dc
[ "MIT" ]
null
null
null
pymodbus/read_write.py
BugliL/FlaskPymodbusPlayground
8470402131870ed0a65603c904aaa5cd815949dc
[ "MIT" ]
null
null
null
from pymodbus.client.sync import ModbusTcpClient as ModbusClient from time import sleep mClientScrittura = ModbusClient(host='192.168.1.26', port=502) mClient = ModbusClient(host='192.168.1.26', port=503) mClient.connect() # Address known that expose data addr = 8195 reg = mClient.read_coils(addr - 1, 1, unit=1) Q3 ...
24.333333
64
0.700342
from pymodbus.client.sync import ModbusTcpClient as ModbusClient from time import sleep mClientScrittura = ModbusClient(host='192.168.1.26', port=502) mClient = ModbusClient(host='192.168.1.26', port=503) mClient.connect() addr = 8195 reg = mClient.read_coils(addr - 1, 1, unit=1) Q3 = reg.getBit(0) print("(Readed fi...
true
true
f777a2d64cda89d54eb1f61ac712b7e04004409d
58
py
Python
cornershop-catalog-integrations-api-tools/__init__.py
mohmoniem281/cornershop-catalog-integrations-api-tools
4d76faa9c30bd6b36ee30c5283a65a9f64d027bf
[ "MIT" ]
null
null
null
cornershop-catalog-integrations-api-tools/__init__.py
mohmoniem281/cornershop-catalog-integrations-api-tools
4d76faa9c30bd6b36ee30c5283a65a9f64d027bf
[ "MIT" ]
null
null
null
cornershop-catalog-integrations-api-tools/__init__.py
mohmoniem281/cornershop-catalog-integrations-api-tools
4d76faa9c30bd6b36ee30c5283a65a9f64d027bf
[ "MIT" ]
null
null
null
from cornershop-catalog-integrations-api-tools import sftp
58
58
0.87931
from cornershop-catalog-integrations-api-tools import sftp
false
true
f777a377c61431f1787b02330afe665413221e38
478
py
Python
experiments/curves/Recall/6:2/DrawRecall.py
lukeandshuo/sensiac_fast_rcnn_quebec
4b23dad3d0490b3e288bc538dd0f83512f595149
[ "MIT" ]
null
null
null
experiments/curves/Recall/6:2/DrawRecall.py
lukeandshuo/sensiac_fast_rcnn_quebec
4b23dad3d0490b3e288bc538dd0f83512f595149
[ "MIT" ]
null
null
null
experiments/curves/Recall/6:2/DrawRecall.py
lukeandshuo/sensiac_fast_rcnn_quebec
4b23dad3d0490b3e288bc538dd0f83512f595149
[ "MIT" ]
null
null
null
import cPickle import matplotlib.pyplot as plt import os import os.path as op base_path= os.path.split(os.path.abspath(__file__))[0] xlabel=[0.5,0.6,0.7,0.8,0.9] IR=[0.469,0.231,0.050,0.001,0.00] Visible =[0.919,0.692,0.371,0.108,0.005] plt.plot(xlabel,Visible,'r',label='Visible =0.3731') plt.plot(xlabel,IR,'b',label='...
28.117647
54
0.694561
import cPickle import matplotlib.pyplot as plt import os import os.path as op base_path= os.path.split(os.path.abspath(__file__))[0] xlabel=[0.5,0.6,0.7,0.8,0.9] IR=[0.469,0.231,0.050,0.001,0.00] Visible =[0.919,0.692,0.371,0.108,0.005] plt.plot(xlabel,Visible,'r',label='Visible =0.3731') plt.plot(xlabel,IR,'b',label='...
true
true
f777a3adbcede426a2093ba65ad18714dfbcd999
9,028
py
Python
firebot/modules/imagefun4.py
vikas04599/Fire-X
527d57c29785f36e1b07aa739f3ac7c969cc916c
[ "MIT" ]
20
2021-08-16T18:49:49.000Z
2022-02-23T08:35:57.000Z
firebot/modules/imagefun4.py
vikas04599/Fire-X
527d57c29785f36e1b07aa739f3ac7c969cc916c
[ "MIT" ]
null
null
null
firebot/modules/imagefun4.py
vikas04599/Fire-X
527d57c29785f36e1b07aa739f3ac7c969cc916c
[ "MIT" ]
93
2021-08-16T19:16:20.000Z
2022-03-31T02:02:06.000Z
import os import cv2 from PIL import Image from firebot import bot from ..utils import admin_cmd # Now Gifs nd Stickers also Support # OpenCV Basics path = "./dcobra/" if not os.path.isdir(path): os.makedirs(path) @bot.on(admin_cmd(pattern=r"pru")) async def scan(event): if not event.reply_to_msg_id: ...
34.857143
87
0.65751
import os import cv2 from PIL import Image from firebot import bot from ..utils import admin_cmd path = "./dcobra/" if not os.path.isdir(path): os.makedirs(path) @bot.on(admin_cmd(pattern=r"pru")) async def scan(event): if not event.reply_to_msg_id: await event.edit("Reply to any Image.") ...
true
true
f777a643027eeb72e1282b1f5900a4e046104987
10,885
py
Python
src/dispatch/incident/scheduled.py
snkilmartin/dispatch
db48c65d4b56734eb866016461e22923a4c8dea4
[ "Apache-2.0" ]
null
null
null
src/dispatch/incident/scheduled.py
snkilmartin/dispatch
db48c65d4b56734eb866016461e22923a4c8dea4
[ "Apache-2.0" ]
null
null
null
src/dispatch/incident/scheduled.py
snkilmartin/dispatch
db48c65d4b56734eb866016461e22923a4c8dea4
[ "Apache-2.0" ]
null
null
null
import logging from datetime import datetime from sqlalchemy import func from schedule import every from dispatch.config import ( INCIDENT_PLUGIN_CONVERSATION_SLUG, INCIDENT_DAILY_SUMMARY_ONCALL_SERVICE_ID, INCIDENT_NOTIFICATION_CONVERSATIONS, INCIDENT_PLUGIN_TICKET_SLUG, INCIDENT_PLUGIN_STORAGE_S...
37.534483
170
0.581259
import logging from datetime import datetime from sqlalchemy import func from schedule import every from dispatch.config import ( INCIDENT_PLUGIN_CONVERSATION_SLUG, INCIDENT_DAILY_SUMMARY_ONCALL_SERVICE_ID, INCIDENT_NOTIFICATION_CONVERSATIONS, INCIDENT_PLUGIN_TICKET_SLUG, INCIDENT_PLUGIN_STORAGE_S...
true
true
f777a6f169886154ab8a05266249ebb0766de70d
632
py
Python
tests/processors/test_pep257.py
vemel/handsdown
68bd0ca6b3ed738db888f18c7a0ccbc62c2d0e42
[ "MIT" ]
47
2019-10-18T13:59:20.000Z
2022-03-21T21:46:30.000Z
tests/processors/test_pep257.py
vemel/handsdown
68bd0ca6b3ed738db888f18c7a0ccbc62c2d0e42
[ "MIT" ]
15
2019-10-24T13:42:02.000Z
2022-03-22T19:25:49.000Z
tests/processors/test_pep257.py
vemel/handsdown
68bd0ca6b3ed738db888f18c7a0ccbc62c2d0e42
[ "MIT" ]
7
2019-11-22T12:24:57.000Z
2022-01-29T13:18:51.000Z
# pylint: disable=missing-docstring import unittest from pathlib import Path from handsdown.processors.pep257 import PEP257DocstringProcessor class TestLoader(unittest.TestCase): def test_init(self): pep257_docstring = ( Path(__file__).parent.parent / "static" / "pep257_docstring.txt" ...
31.6
76
0.669304
import unittest from pathlib import Path from handsdown.processors.pep257 import PEP257DocstringProcessor class TestLoader(unittest.TestCase): def test_init(self): pep257_docstring = ( Path(__file__).parent.parent / "static" / "pep257_docstring.txt" ).read_text() processor = P...
true
true
f777a6ff2f97f79bab29b15173e527d7cb3345f6
19,501
py
Python
Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/tensorflow/python/ops/random_ops.py
JustinACoder/H22-GR3-UnrealAI
361eb9ef1147f8a2991e5f98c4118cd823184adf
[ "MIT" ]
6
2022-02-04T18:12:24.000Z
2022-03-21T23:57:12.000Z
Lib/site-packages/tensorflow/python/ops/random_ops.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/tensorflow/python/ops/random_ops.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
1
2022-02-08T03:53:23.000Z
2022-02-08T03:53:23.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...
40.125514
81
0.664889
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.framework import random_seed from tensorflow.python.ops import arra...
true
true
f777a7867cd99c02b01aa770c4bf45847a4bc0eb
8,067
py
Python
models.py
Mishne-Lab/SOAP-Self-supervised-Online-Adversarial-Purification
09535124ef13e3f957d25b3a4e54af7f5f713a73
[ "MIT" ]
7
2021-03-26T02:46:46.000Z
2022-03-26T02:17:27.000Z
models.py
Mishne-Lab/SOAP-Self-supervised-Online-Adversarial-Purification
09535124ef13e3f957d25b3a4e54af7f5f713a73
[ "MIT" ]
1
2021-08-25T08:09:45.000Z
2021-08-25T08:09:45.000Z
models.py
Mishne-Lab/SOAP
09535124ef13e3f957d25b3a4e54af7f5f713a73
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torchvision.models as models import torchvision.transforms as transforms from resnet import * from wide_resnet import * import os def load_model(name, dataset, n_class=10, in_channel=3, save_dir=None, substitute=False): if name == 'fcnet': model = FCNet(n_class=n...
29.122744
123
0.588075
import torch import torch.nn as nn import torchvision.models as models import torchvision.transforms as transforms from resnet import * from wide_resnet import * import os def load_model(name, dataset, n_class=10, in_channel=3, save_dir=None, substitute=False): if name == 'fcnet': model = FCNet(n_class=n...
true
true
f777a851ed221daad2fdb948ad47f5e3e32cf6ad
487
py
Python
aws_cloudtrail_rules/aws_update_credentials.py
designing-penguin/panther-analysis
26034cea4504f43227f8d3789225f6ca7b35dfe0
[ "Apache-2.0" ]
null
null
null
aws_cloudtrail_rules/aws_update_credentials.py
designing-penguin/panther-analysis
26034cea4504f43227f8d3789225f6ca7b35dfe0
[ "Apache-2.0" ]
null
null
null
aws_cloudtrail_rules/aws_update_credentials.py
designing-penguin/panther-analysis
26034cea4504f43227f8d3789225f6ca7b35dfe0
[ "Apache-2.0" ]
null
null
null
UPDATE_EVENTS = { 'ChangePassword', 'CreateAccessKey', 'CreateLoginProfile', 'CreateUser' } def rule(event): return event.get( 'eventName') in UPDATE_EVENTS and not event.get('errorCode') def dedup(event): return event.get('userIdentity', {}).get('userName', '<UNKNOWN_USER>') def title(event):...
25.631579
75
0.673511
UPDATE_EVENTS = { 'ChangePassword', 'CreateAccessKey', 'CreateLoginProfile', 'CreateUser' } def rule(event): return event.get( 'eventName') in UPDATE_EVENTS and not event.get('errorCode') def dedup(event): return event.get('userIdentity', {}).get('userName', '<UNKNOWN_USER>') def title(event):...
true
true
f777a8be18462eb7e95cb5d19a8e69247826a8be
444
py
Python
affiliate_marketing/migrations/0011_brand_storefront_category.py
rowsheet/rowsheet
b9127796846ab02af302957dc1d275d0623c64ed
[ "FSFAP" ]
null
null
null
affiliate_marketing/migrations/0011_brand_storefront_category.py
rowsheet/rowsheet
b9127796846ab02af302957dc1d275d0623c64ed
[ "FSFAP" ]
null
null
null
affiliate_marketing/migrations/0011_brand_storefront_category.py
rowsheet/rowsheet
b9127796846ab02af302957dc1d275d0623c64ed
[ "FSFAP" ]
null
null
null
# Generated by Django 2.2.5 on 2019-11-04 18:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('affiliate_marketing', '0010_brand_vendor_code'), ] operations = [ migrations.AddField( model_name='brand', name='sto...
23.368421
87
0.630631
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('affiliate_marketing', '0010_brand_vendor_code'), ] operations = [ migrations.AddField( model_name='brand', name='storefront_category', field=models.Char...
true
true
f777a8f04d45fefe6f1d28f53f9bed7478cdcef2
199
py
Python
first_steps_in_coding_and_simple_operations_and_calculations/lab/yard_greening.py
PetkoAndreev/Python-basics
a376362548380ae50c7c707551cb821547f44402
[ "MIT" ]
null
null
null
first_steps_in_coding_and_simple_operations_and_calculations/lab/yard_greening.py
PetkoAndreev/Python-basics
a376362548380ae50c7c707551cb821547f44402
[ "MIT" ]
null
null
null
first_steps_in_coding_and_simple_operations_and_calculations/lab/yard_greening.py
PetkoAndreev/Python-basics
a376362548380ae50c7c707551cb821547f44402
[ "MIT" ]
null
null
null
square_meters = float(input()) price = square_meters*7.61 discount = 0.18*price final_price = price - discount print(f'The final price is: {final_price} lv.') print(f'The discont is: {discount} lv.')
33.166667
47
0.733668
square_meters = float(input()) price = square_meters*7.61 discount = 0.18*price final_price = price - discount print(f'The final price is: {final_price} lv.') print(f'The discont is: {discount} lv.')
true
true
f777a8f495e729c0b9d25a93e5ef67facbbea37e
1,176
py
Python
spotify_dl/scaffold.py
WilliamMajanja/spotify-dl
ffb1dd1dfa0216ec1bd818cf24079d8c19995751
[ "MIT" ]
1
2021-09-17T09:01:44.000Z
2021-09-17T09:01:44.000Z
spotify_dl/scaffold.py
WilliamMajanja/spotify-dl
ffb1dd1dfa0216ec1bd818cf24079d8c19995751
[ "MIT" ]
null
null
null
spotify_dl/scaffold.py
WilliamMajanja/spotify-dl
ffb1dd1dfa0216ec1bd818cf24079d8c19995751
[ "MIT" ]
null
null
null
import logging from os import getenv import sentry_sdk __all__ = ['log', 'check_for_tokens'] logging.basicConfig(level=logging.INFO, format='%(message)s') log = logging.getLogger('sdl') sentry_sdk.init("https://fc66a23d79634b9bba1690ea13e289f0@o321064.ingest.sentry.io/2383261") def check_for_to...
31.783784
92
0.67432
import logging from os import getenv import sentry_sdk __all__ = ['log', 'check_for_tokens'] logging.basicConfig(level=logging.INFO, format='%(message)s') log = logging.getLogger('sdl') sentry_sdk.init("https://fc66a23d79634b9bba1690ea13e289f0@o321064.ingest.sentry.io/2383261") def check_for_to...
true
true
f777a9aa4f604417517a3a04758e5175556b7ea4
1,788
py
Python
iqa_metrics/tmqi_matlab/tmqi_wrapper.py
ch-andrei/L-IQA
e0e097aec2be468f5288594de89fbe489e4afff3
[ "BSD-2-Clause" ]
7
2020-09-15T03:36:29.000Z
2022-01-25T16:05:42.000Z
iqa_metrics/tmqi_matlab/tmqi_wrapper.py
ch-andrei/L-IQA
e0e097aec2be468f5288594de89fbe489e4afff3
[ "BSD-2-Clause" ]
null
null
null
iqa_metrics/tmqi_matlab/tmqi_wrapper.py
ch-andrei/L-IQA
e0e097aec2be468f5288594de89fbe489e4afff3
[ "BSD-2-Clause" ]
null
null
null
from iqa_metrics.tmqi_matlab.TMQI import TMQI, TMQIr_m import matlab_py.matlab_wrapper as mw import os from utils.image_processing.color_spaces import rgb2lum # singleton instance to not reinitialize every time TMQI is called tmqi_instance = None def init_instance_tmqi(**kwargs): global tmqi_instance matl...
31.368421
109
0.662752
from iqa_metrics.tmqi_matlab.TMQI import TMQI, TMQIr_m import matlab_py.matlab_wrapper as mw import os from utils.image_processing.color_spaces import rgb2lum tmqi_instance = None def init_instance_tmqi(**kwargs): global tmqi_instance matlab_eng = mw.get_matlab_instance() use_original = kwargs.pop('u...
true
true
f777aa01e204c89d9f63eee902758e64699b1d4f
3,010
py
Python
overwatch/apis/indemnity_api.py
diogolundberg/deputy-overwatch
2f309a2b84c6e57f6ee88c00f06027f135aee795
[ "MIT" ]
2
2017-07-05T14:26:19.000Z
2022-03-13T12:29:22.000Z
overwatch/apis/indemnity_api.py
diogolundberg/deputy-overwatch
2f309a2b84c6e57f6ee88c00f06027f135aee795
[ "MIT" ]
1
2021-07-09T10:23:39.000Z
2021-07-09T10:23:39.000Z
overwatch/apis/indemnity_api.py
diogolundberg/deputy-overwatch
2f309a2b84c6e57f6ee88c00f06027f135aee795
[ "MIT" ]
null
null
null
from flask import Blueprint, jsonify, request from overwatch.models import Indemnity, Deputy from webargs import fields from webargs.flaskparser import use_args from sqlalchemy import desc, func, extract from decimal import Decimal from inflection import singularize blueprint = Blueprint('indemnity_api', __name__, ur...
30.1
108
0.671761
from flask import Blueprint, jsonify, request from overwatch.models import Indemnity, Deputy from webargs import fields from webargs.flaskparser import use_args from sqlalchemy import desc, func, extract from decimal import Decimal from inflection import singularize blueprint = Blueprint('indemnity_api', __name__, ur...
true
true
f777aaf608dac6fb778377acdd44f93d6d36f53c
6,736
py
Python
deepfrier/DeepCNN.py
SoliareofAstora/DeepFRI
25fc53f90b21946789f8404f05c688d6a25e9cc8
[ "BSD-3-Clause" ]
103
2020-04-25T06:46:03.000Z
2022-03-20T14:00:22.000Z
deepfrier/DeepCNN.py
kadinaj/DeepFRI
a7de5c4e3036109b5a5711ca97715d0ec340cd8d
[ "BSD-3-Clause" ]
15
2020-05-13T22:50:37.000Z
2022-03-21T20:51:19.000Z
deepfrier/DeepCNN.py
kadinaj/DeepFRI
a7de5c4e3036109b5a5711ca97715d0ec340cd8d
[ "BSD-3-Clause" ]
28
2020-04-25T06:46:05.000Z
2022-01-23T08:03:47.000Z
import glob import tensorflow as tf from .utils import get_batched_dataset from .layers import FuncPredictor import matplotlib.pyplot as plt plt.switch_backend('agg') class DeepCNN(object): """ Class containig the CNN model for predicting protein function. """ def __init__(self, output_dim, n_channels=26, n...
45.823129
139
0.585214
import glob import tensorflow as tf from .utils import get_batched_dataset from .layers import FuncPredictor import matplotlib.pyplot as plt plt.switch_backend('agg') class DeepCNN(object): def __init__(self, output_dim, n_channels=26, num_filters=[100], filter_lens=[3], lr=0.0002, drop=0.3, l2_reg=0.001, ...
true
true
f777ab6b065c632d6b2c90adfaa0e8433c8d7170
4,247
py
Python
sickbeard/lib/hachoir_core/log.py
Branlala/docker-sickbeardfr
3ac85092dc4cc8a4171fb3c83e9682162245e13e
[ "MIT" ]
null
null
null
sickbeard/lib/hachoir_core/log.py
Branlala/docker-sickbeardfr
3ac85092dc4cc8a4171fb3c83e9682162245e13e
[ "MIT" ]
null
null
null
sickbeard/lib/hachoir_core/log.py
Branlala/docker-sickbeardfr
3ac85092dc4cc8a4171fb3c83e9682162245e13e
[ "MIT" ]
null
null
null
import os, sys, time import lib.hachoir_core.config as config from lib.hachoir_core.i18n import _ class Log: LOG_INFO = 0 LOG_WARN = 1 LOG_ERROR = 2 level_name = { LOG_WARN: "[warn]", LOG_ERROR: "[err!]", LOG_INFO: "[info]" } def __init__(self): self.__buf...
29.289655
86
0.545562
import os, sys, time import lib.hachoir_core.config as config from lib.hachoir_core.i18n import _ class Log: LOG_INFO = 0 LOG_WARN = 1 LOG_ERROR = 2 level_name = { LOG_WARN: "[warn]", LOG_ERROR: "[err!]", LOG_INFO: "[info]" } def __init__(self): self.__buf...
false
true
f777ab6da0f304438dbf26b4b148e3bf2db80654
6,736
py
Python
common_net.py
arnabgho/infoGAN-pytorch
60f31010768f3e07010ac60845411a4a41fa1bba
[ "MIT" ]
null
null
null
common_net.py
arnabgho/infoGAN-pytorch
60f31010768f3e07010ac60845411a4a41fa1bba
[ "MIT" ]
null
null
null
common_net.py
arnabgho/infoGAN-pytorch
60f31010768f3e07010ac60845411a4a41fa1bba
[ "MIT" ]
null
null
null
import torch import torch.nn as nn def gaussian_weights_init(m): classname = m.__class__.__name__ if classname.find('Conv') != -1: m.weight.data.normal_(0.0, 0.02) elif classname.find('BatchNorm') != -1: m.weight.data.normal_(1.0, 0.02) m.bias.data.fill_(0) class BATCHResBlock(nn....
30.618182
83
0.609857
import torch import torch.nn as nn def gaussian_weights_init(m): classname = m.__class__.__name__ if classname.find('Conv') != -1: m.weight.data.normal_(0.0, 0.02) elif classname.find('BatchNorm') != -1: m.weight.data.normal_(1.0, 0.02) m.bias.data.fill_(0) class BATCHResBlock(nn....
true
true
f777ab7be1deb5d5f834ab89b0edfa5733bfbbe0
1,969
py
Python
tests/is_text_present.py
jsfehler/splinter
3131074686255569ba14a6d342f6ac9593529181
[ "BSD-3-Clause" ]
null
null
null
tests/is_text_present.py
jsfehler/splinter
3131074686255569ba14a6d342f6ac9593529181
[ "BSD-3-Clause" ]
47
2020-09-15T01:38:03.000Z
2022-03-31T08:20:54.000Z
tests/is_text_present.py
jsfehler/splinter
3131074686255569ba14a6d342f6ac9593529181
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2012 splinter authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from .fake_webapp import EXAMPLE_APP class IsTextPresentTest(object): def test_is_text_present(self): "should verify if tex...
43.755556
86
0.727273
from .fake_webapp import EXAMPLE_APP class IsTextPresentTest(object): def test_is_text_present(self): self.assertTrue(self.browser.is_text_present("Example Header")) def test_is_text_present_and_should_return_false(self): self.assertFalse(self.browser.is_text_present("Text that not exist")) ...
true
true
f777adb90eb9fcdf8e23d87d85856ef1aabddaf7
925
py
Python
rest-api/migrations/versions/ba29ca77dbc3_gpxfile_table.py
Toxe/gps-tracks
1118ff38995598920db3ea3b76be61dfc3f6a8e1
[ "MIT" ]
null
null
null
rest-api/migrations/versions/ba29ca77dbc3_gpxfile_table.py
Toxe/gps-tracks
1118ff38995598920db3ea3b76be61dfc3f6a8e1
[ "MIT" ]
null
null
null
rest-api/migrations/versions/ba29ca77dbc3_gpxfile_table.py
Toxe/gps-tracks
1118ff38995598920db3ea3b76be61dfc3f6a8e1
[ "MIT" ]
null
null
null
"""gpxfile table Revision ID: ba29ca77dbc3 Revises: 2dd5da4ccf72 Create Date: 2020-07-01 16:06:16.814147 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'ba29ca77dbc3' down_revision = '2dd5da4ccf72' branch_labels = None depends_on = None def upgrade(): # ...
25.694444
65
0.677838
from alembic import op import sqlalchemy as sa revision = 'ba29ca77dbc3' down_revision = '2dd5da4ccf72' branch_labels = None depends_on = None def upgrade(): op.create_table('gpxfile', sa.Column('id', sa.Integer(), nullable=False), sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('fi...
true
true
f777adcd94c303d16fe26e9fa5e158c21ad1e51d
1,219
py
Python
userbot/plugins/github.py
Blank-sama/X-tra-Telegram
549317bd99a6e4864114a9e6d3aea899984cf437
[ "Apache-2.0" ]
null
null
null
userbot/plugins/github.py
Blank-sama/X-tra-Telegram
549317bd99a6e4864114a9e6d3aea899984cf437
[ "Apache-2.0" ]
null
null
null
userbot/plugins/github.py
Blank-sama/X-tra-Telegram
549317bd99a6e4864114a9e6d3aea899984cf437
[ "Apache-2.0" ]
null
null
null
"""Get information about an user on GitHub Syntax: .github USERNAME""" from telethon import events import requests from Bonten.utils import admin_cmd @borg.on(admin_cmd("github (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) url = "https:/...
28.348837
98
0.549631
from telethon import events import requests from Bonten.utils import admin_cmd @borg.on(admin_cmd("github (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) url = "https://api.github.com/users/{}".format(input_str) r = requests.get(url) ...
true
true
f777aedad03e3d4463b7db6571c249b12b4c6087
4,703
py
Python
xnmt/xnmt_run_experiments.py
isl-mt/xnmt-isl
0f25c8f7f90cd5fa39de03302219a66d640a44f0
[ "Apache-2.0" ]
4
2020-07-20T08:53:32.000Z
2020-11-25T21:21:23.000Z
xnmt/xnmt_run_experiments.py
isl-mt/xnmt-isl
0f25c8f7f90cd5fa39de03302219a66d640a44f0
[ "Apache-2.0" ]
null
null
null
xnmt/xnmt_run_experiments.py
isl-mt/xnmt-isl
0f25c8f7f90cd5fa39de03302219a66d640a44f0
[ "Apache-2.0" ]
1
2020-09-04T07:19:10.000Z
2020-09-04T07:19:10.000Z
#!/usr/bin/env python3 """ Reads experiments descriptions in the passed configuration file and runs them sequentially, logging outputs """ import argparse import logging import os import random import sys import socket import datetime import faulthandler faulthandler.enable() import traceback import numpy as np from ...
37.927419
152
0.685095
import argparse import logging import os import random import sys import socket import datetime import faulthandler faulthandler.enable() import traceback import numpy as np from xnmt.settings import settings from xnmt import logger, file_logger from xnmt.tee import log_preamble from xnmt.param_collections import Pa...
true
true
f777af4813025f3f3906fe8d009d23f1bab172b6
933
py
Python
zfs_cluster_deployer/app_exceptions.py
AymenSegni/zfs-manager-api
7e715ce4d8c27da96ec56fe621bccd09b3ad88d5
[ "Apache-2.0" ]
2
2020-08-25T07:02:15.000Z
2021-03-10T03:02:08.000Z
zfs_cluster_deployer/app_exceptions.py
AymenSegni/zfs-manager-api
7e715ce4d8c27da96ec56fe621bccd09b3ad88d5
[ "Apache-2.0" ]
null
null
null
zfs_cluster_deployer/app_exceptions.py
AymenSegni/zfs-manager-api
7e715ce4d8c27da96ec56fe621bccd09b3ad88d5
[ "Apache-2.0" ]
1
2021-03-11T07:50:56.000Z
2021-03-11T07:50:56.000Z
from flask_restful import abort class HTTPExceptions(object): msg = "HTTP Error: %s" @classmethod def not_found(cls, message=msg % "Object does not exist"): abort(404, message=message) @classmethod def already_exists(cls, message=msg % "Object already exists"): abort(409, messag...
27.441176
74
0.674169
from flask_restful import abort class HTTPExceptions(object): msg = "HTTP Error: %s" @classmethod def not_found(cls, message=msg % "Object does not exist"): abort(404, message=message) @classmethod def already_exists(cls, message=msg % "Object already exists"): abort(409, messag...
true
true
f777b0c621ccc16d543343e70681c0bc2bf44183
189
py
Python
python/cuXfilter/assets/get_open_port.py
AjayThorve/cuxfilter
537ff67de80439a43e0bad7373558f5e25dcb112
[ "Apache-2.0" ]
2
2019-03-06T02:10:05.000Z
2020-05-06T06:33:02.000Z
python/cuXfilter/assets/get_open_port.py
AjayThorve/cuxfilter
537ff67de80439a43e0bad7373558f5e25dcb112
[ "Apache-2.0" ]
null
null
null
python/cuXfilter/assets/get_open_port.py
AjayThorve/cuxfilter
537ff67de80439a43e0bad7373558f5e25dcb112
[ "Apache-2.0" ]
null
null
null
import socket def get_open_port(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(("",0)) s.listen(1) port = s.getsockname()[1] s.close() return port
18.9
57
0.624339
import socket def get_open_port(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(("",0)) s.listen(1) port = s.getsockname()[1] s.close() return port
true
true
f777b214a886795da7a9a598b2126b72ef6fcb63
9,081
py
Python
library/get_ilo_ip.py
hgomez/ansible-ilorest-role
673dbd16df973d503f3a84ebab24c81270dd6b06
[ "Apache-2.0" ]
null
null
null
library/get_ilo_ip.py
hgomez/ansible-ilorest-role
673dbd16df973d503f3a84ebab24c81270dd6b06
[ "Apache-2.0" ]
null
null
null
library/get_ilo_ip.py
hgomez/ansible-ilorest-role
673dbd16df973d503f3a84ebab24c81270dd6b06
[ "Apache-2.0" ]
1
2019-05-29T17:08:30.000Z
2019-05-29T17:08:30.000Z
#!/usr/bin/python # Copyright 2016 Hewlett Packard Enterprise Development, LP. # # 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 # #...
37.524793
80
0.569871
DOCUMENTATION = ''' --- module: get_ilo_ip short_description: This module obtains the iLO IP address through local means ''' EXAMPLES = ''' - name: obtain iLO IP address become: yes get_ilo_ip: name: "Get iLO IP" enabled: True ''' import sys from redfish.rest.v1 import ServerDownOrUnreach...
false
true
f777b4423741b4d5ae3a6e1b6c40059f0b0929a1
586
py
Python
Python/BinarySearch.py
DeepanshuKapoor/DSA
ecf423aa0fe6ea40977ea138dff5634c3c4a25c8
[ "MIT" ]
null
null
null
Python/BinarySearch.py
DeepanshuKapoor/DSA
ecf423aa0fe6ea40977ea138dff5634c3c4a25c8
[ "MIT" ]
null
null
null
Python/BinarySearch.py
DeepanshuKapoor/DSA
ecf423aa0fe6ea40977ea138dff5634c3c4a25c8
[ "MIT" ]
null
null
null
# blanyal def binarySearch(inputList, item): lower = 0 upper = len(inputList) - 1 isFound = False while (lower <= upper and not isFound): mid = (lower + upper) // 2 if inputList[mid] == item: isFound = True elif item < inputList[mid]: upper = mid - 1 ...
25.478261
73
0.552901
def binarySearch(inputList, item): lower = 0 upper = len(inputList) - 1 isFound = False while (lower <= upper and not isFound): mid = (lower + upper) // 2 if inputList[mid] == item: isFound = True elif item < inputList[mid]: upper = mid - 1 else:...
true
true
f777b56886cf28b5fe463c4feff8b98d5022c1c5
5,881
py
Python
autofit/non_linear/samples/mcmc.py
rhayes777/PyAutoFit
ac0a424cf97103106b292e124911de43635fc15a
[ "MIT" ]
39
2019-01-24T10:45:23.000Z
2022-03-18T09:37:59.000Z
autofit/non_linear/samples/mcmc.py
rhayes777/PyAutoFit
ac0a424cf97103106b292e124911de43635fc15a
[ "MIT" ]
260
2018-11-27T12:56:33.000Z
2022-03-31T16:08:59.000Z
autofit/non_linear/samples/mcmc.py
rhayes777/PyAutoFit
ac0a424cf97103106b292e124911de43635fc15a
[ "MIT" ]
13
2018-11-30T16:49:05.000Z
2022-01-21T17:39:29.000Z
import math from typing import List, Optional import numpy as np from autofit.mapper.model_mapper import ModelMapper from autofit.non_linear.mcmc.auto_correlations import AutoCorrelationsSettings from autofit.non_linear.samples.pdf import PDFSamples from .samples import Samples from .sample import Sample, load_from_t...
33.414773
119
0.631015
import math from typing import List, Optional import numpy as np from autofit.mapper.model_mapper import ModelMapper from autofit.non_linear.mcmc.auto_correlations import AutoCorrelationsSettings from autofit.non_linear.samples.pdf import PDFSamples from .samples import Samples from .sample import Sample, load_from_t...
true
true
f777b62edae0a5593d941637c7972445a72f9043
28,399
py
Python
Packs/CrowdStrikeFalconStreamingV2/Integrations/CrowdStrikeFalconStreamingV2/CrowdStrikeFalconStreamingV2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CrowdStrikeFalconStreamingV2/Integrations/CrowdStrikeFalconStreamingV2/CrowdStrikeFalconStreamingV2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CrowdStrikeFalconStreamingV2/Integrations/CrowdStrikeFalconStreamingV2/CrowdStrikeFalconStreamingV2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * # noqa: E402 lgtm [py/polluting-import] from CommonServerUserPython import * # noqa: E402 lgtm [py/polluting-import] import requests import traceback from asyncio import create_task, sleep, run from contextlib import asynccontextmanager from aiohttp impo...
46.177236
123
0.592521
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import requests import traceback from asyncio import create_task, sleep, run from contextlib import asynccontextmanager from aiohttp import ClientSession, TCPConnector, ClientTimeout from typing import Dict, AsyncGene...
true
true
f777b6f1b269ad0840906ea9c2cdae0a2da710ed
3,580
py
Python
arkane/encorr/pbac.py
kblondal/RMG-Py
ee14e35321c1dc3cd1900c6d2ebb27931d1bb542
[ "MIT" ]
1
2020-03-17T13:16:51.000Z
2020-03-17T13:16:51.000Z
arkane/encorr/pbac.py
kblondal/RMG-Py
ee14e35321c1dc3cd1900c6d2ebb27931d1bb542
[ "MIT" ]
null
null
null
arkane/encorr/pbac.py
kblondal/RMG-Py
ee14e35321c1dc3cd1900c6d2ebb27931d1bb542
[ "MIT" ]
1
2018-10-03T19:36:40.000Z
2018-10-03T19:36:40.000Z
#!/usr/bin/env python3 ############################################################################### # # # RMG - Reaction Mechanism Generator # # ...
44.197531
111
0.513408
import logging import re import arkane.encorr.data as data from arkane.exceptions import BondAdditivityCorrectionError def get_bac(model_chemistry, bonds): try: params = data.pbac[model_chemistry] except KeyError: raise BondAdditivityCorrectionError( 'Missing Petersson-ty...
true
true
f777b73afcad0a2385782eb661e8c7f530ee2c50
1,469
py
Python
src/perception/filters/point_cloud_fusion/launch/vlp16_sim_lexus_pc_fusion.launch.py
jiangtaojiang/AutowareAuto
579bd5cec65859779d215c28c468b06de809749b
[ "Apache-2.0" ]
null
null
null
src/perception/filters/point_cloud_fusion/launch/vlp16_sim_lexus_pc_fusion.launch.py
jiangtaojiang/AutowareAuto
579bd5cec65859779d215c28c468b06de809749b
[ "Apache-2.0" ]
null
null
null
src/perception/filters/point_cloud_fusion/launch/vlp16_sim_lexus_pc_fusion.launch.py
jiangtaojiang/AutowareAuto
579bd5cec65859779d215c28c468b06de809749b
[ "Apache-2.0" ]
null
null
null
# Copyright 2020, The Autoware Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
35.829268
90
0.728387
import launch from launch_ros.actions import Node from ament_index_python import get_package_share_directory import os point_cloud_fusion_pkg_prefix = get_package_share_directory('point_cloud_fusion') point_cloud_fusion_param_file = os.path.join(point_cloud_fusion_pkg_prefix, ...
true
true
f777b75f8aa0340487f22a09e84ef6a7f641d68e
631
py
Python
backend/manage.py
crowdbotics-dev/daveotest-2
58dcb3ed6df9a107db07d1ea1804e387050303b1
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-dev/daveotest-2
58dcb3ed6df9a107db07d1ea1804e387050303b1
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-dev/daveotest-2
58dcb3ed6df9a107db07d1ea1804e387050303b1
[ "FTL", "AML", "RSA-MD" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'daveotest_2.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise Im...
28.681818
75
0.684628
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'daveotest_2.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f777b9471f95745b72b31e5a97ca613492dabfc5
10,572
py
Python
prot/utils.py
tgen/bisbee
d12ded4e4ee497e18a8b8e4929dac0e08de9f7f6
[ "MIT" ]
6
2021-04-09T06:28:54.000Z
2022-03-21T12:47:00.000Z
prot/utils.py
tgen/bisbee
d12ded4e4ee497e18a8b8e4929dac0e08de9f7f6
[ "MIT" ]
2
2021-03-12T22:13:33.000Z
2021-11-16T13:07:16.000Z
prot/utils.py
tgen/bisbee
d12ded4e4ee497e18a8b8e4929dac0e08de9f7f6
[ "MIT" ]
3
2020-11-03T20:52:12.000Z
2021-09-09T08:38:15.000Z
import pyensembl import Bio.SeqIO import Bio.Seq import pandas as pd import sys import re from Bio import pairwise2 def get_transcript_adj_exons(ensembl,gene_id,exon_coord): try: transcript_ids=ensembl.transcript_ids_of_gene_id(gene_id) except: print('Warning: ' + gene_id + ' not found') transcript_ids=[] t...
45.373391
188
0.754446
import pyensembl import Bio.SeqIO import Bio.Seq import pandas as pd import sys import re from Bio import pairwise2 def get_transcript_adj_exons(ensembl,gene_id,exon_coord): try: transcript_ids=ensembl.transcript_ids_of_gene_id(gene_id) except: print('Warning: ' + gene_id + ' not found') transcript_ids=[] t...
true
true
f777bc0c27c5d09ca9baf8df2eac242e2b9ca666
2,211
py
Python
ddtrace/internal/runtime/runtime_metrics.py
vijayperiasamy-eb/dd-trace-py
2b0d396fc7f76582e8ffedff48933245a77ebaf2
[ "BSD-3-Clause" ]
null
null
null
ddtrace/internal/runtime/runtime_metrics.py
vijayperiasamy-eb/dd-trace-py
2b0d396fc7f76582e8ffedff48933245a77ebaf2
[ "BSD-3-Clause" ]
null
null
null
ddtrace/internal/runtime/runtime_metrics.py
vijayperiasamy-eb/dd-trace-py
2b0d396fc7f76582e8ffedff48933245a77ebaf2
[ "BSD-3-Clause" ]
null
null
null
import itertools from ... import _worker from ..logger import get_logger from .constants import ( DEFAULT_RUNTIME_METRICS, DEFAULT_RUNTIME_TAGS, ) from .metric_collectors import ( GCRuntimeMetricCollector, PSUtilRuntimeMetricCollector, ) from .tag_collectors import ( PlatformTagCollector, Trac...
26.011765
79
0.656716
import itertools from ... import _worker from ..logger import get_logger from .constants import ( DEFAULT_RUNTIME_METRICS, DEFAULT_RUNTIME_TAGS, ) from .metric_collectors import ( GCRuntimeMetricCollector, PSUtilRuntimeMetricCollector, ) from .tag_collectors import ( PlatformTagCollector, Trac...
true
true
f777be1b222501b829353acbe597e14b0ef04ad8
1,629
py
Python
allauth/socialaccount/providers/amazon_cognito/views.py
lukeburden/django-allauth
ef0774318993c2f7757df6ca2b962bc0df1d5674
[ "MIT" ]
2
2020-01-26T15:09:48.000Z
2020-05-10T05:31:05.000Z
allauth/socialaccount/providers/amazon_cognito/views.py
CZZLEGEND/django-allauth
ef0774318993c2f7757df6ca2b962bc0df1d5674
[ "MIT" ]
11
2021-04-08T19:05:56.000Z
2022-03-12T00:10:25.000Z
allauth/socialaccount/providers/amazon_cognito/views.py
CZZLEGEND/django-allauth
ef0774318993c2f7757df6ca2b962bc0df1d5674
[ "MIT" ]
17
2020-03-03T08:42:17.000Z
2020-10-03T16:08:49.000Z
import requests from allauth.socialaccount import app_settings from allauth.socialaccount.providers.amazon_cognito.provider import ( AmazonCognitoProvider, ) from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) class AmazonCognitoOAuth2Adapt...
25.453125
69
0.694291
import requests from allauth.socialaccount import app_settings from allauth.socialaccount.providers.amazon_cognito.provider import ( AmazonCognitoProvider, ) from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) class AmazonCognitoOAuth2Adapt...
true
true
f777bf09f069c9f98c0c6ccc99d9090442d385a8
1,298
py
Python
code_v1.0.5/generate_differential_Accesson.py
Xinfeng-Yao/APEC
0596e2c8947fd9eb3b4cb5acee8d298ebbe8408a
[ "BSD-2-Clause" ]
24
2019-03-08T03:06:14.000Z
2021-12-13T06:38:59.000Z
code_v1.0.5/generate_differential_Accesson.py
Xinfeng-Yao/APEC
0596e2c8947fd9eb3b4cb5acee8d298ebbe8408a
[ "BSD-2-Clause" ]
1
2020-06-30T04:53:34.000Z
2020-07-14T01:25:32.000Z
code_v1.0.5/generate_differential_Accesson.py
Xinfeng-Yao/APEC
0596e2c8947fd9eb3b4cb5acee8d298ebbe8408a
[ "BSD-2-Clause" ]
6
2019-06-14T03:17:00.000Z
2021-12-18T05:49:48.000Z
#!/usr/bin/python import warnings warnings.filterwarnings("ignore") # import numpy import pandas from optparse import OptionParser from scipy import stats import os import sys from multiprocessing import Pool import subroutines # # opts = OptionParser() usage = "Enriched accessons of a cluster (batch) \nusage: %prog -s...
40.5625
141
0.731125
import warnings warnings.filterwarnings("ignore") import numpy import pandas from optparse import OptionParser from scipy import stats import os import sys from multiprocessing import Pool import subroutines opts = OptionParser() usage = "Enriched accessons of a cluster (batch) \nusage: %prog -s project --cfile cluster...
true
true
f777bf83ad4ec903edc333eef009da5766950c64
6,786
py
Python
mars/tests/integrated/base.py
smartguo/mars
5fdd6e2d520fcdc3b7441379e0abaf0e07c6212a
[ "Apache-2.0" ]
2
2019-03-29T04:11:10.000Z
2020-07-08T10:19:54.000Z
mars/tests/integrated/base.py
smartguo/mars
5fdd6e2d520fcdc3b7441379e0abaf0e07c6212a
[ "Apache-2.0" ]
null
null
null
mars/tests/integrated/base.py
smartguo/mars
5fdd6e2d520fcdc3b7441379e0abaf0e07c6212a
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
38.123596
99
0.529472
import logging import signal import subprocess import sys import time import unittest import requests import gevent from mars.actors import new_client from mars.scheduler import ResourceActor from mars.utils import get_next_port logger = logging.getLogger() class ProcessRequirementUnmetError(RuntimeError): pa...
true
true
f777bf91ca002b19c0982b764e518c9083a51793
1,104
py
Python
bigquery/samples/tests/test_browse_table_data.py
ryanyuan/google-cloud-python
db481bfdd6816d020d99df0d4caa307358ab1141
[ "Apache-2.0" ]
2
2021-11-26T07:08:43.000Z
2022-03-07T20:20:04.000Z
bigquery/samples/tests/test_browse_table_data.py
ryanyuan/google-cloud-python
db481bfdd6816d020d99df0d4caa307358ab1141
[ "Apache-2.0" ]
null
null
null
bigquery/samples/tests/test_browse_table_data.py
ryanyuan/google-cloud-python
db481bfdd6816d020d99df0d4caa307358ab1141
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
40.888889
83
0.765399
from .. import browse_table_data def test_browse_table_data(capsys, client, table_with_data_id): browse_table_data.browse_table_data(client, table_with_data_id) out, err = capsys.readouterr() assert "Downloaded 164656 rows from table {}".format(table_with_data_id) in out assert "Downloaded 10 rows ...
true
true
f777c32079d0f6b2c5f42f5245373af620cf0f77
6,620
py
Python
src/pymodaq_plugins_physical_measurements/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Keithley_Pico.py
CEMES-CNRS/pymodaq_plugins_physical_measurements
1259e239a0a80e0a6937060d47c7c30eb6cb6b4d
[ "CECILL-B" ]
null
null
null
src/pymodaq_plugins_physical_measurements/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Keithley_Pico.py
CEMES-CNRS/pymodaq_plugins_physical_measurements
1259e239a0a80e0a6937060d47c7c30eb6cb6b4d
[ "CECILL-B" ]
1
2021-07-15T16:16:16.000Z
2021-07-16T07:44:06.000Z
src/pymodaq_plugins_physical_measurements/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Keithley_Pico.py
CEMES-CNRS/pymodaq_plugins_physical_measurements
1259e239a0a80e0a6937060d47c7c30eb6cb6b4d
[ "CECILL-B" ]
2
2020-12-16T10:40:24.000Z
2021-06-30T08:46:30.000Z
from PyQt5.QtCore import pyqtSignal from easydict import EasyDict as edict from pymodaq.daq_utils.daq_utils import ThreadCommand, getLineInfo, DataFromPlugins from pymodaq.daq_viewer.utility_classes import DAQ_Viewer_base from collections import OrderedDict import numpy as np from enum import IntEnum from pymodaq.daq_v...
38.045977
156
0.539275
from PyQt5.QtCore import pyqtSignal from easydict import EasyDict as edict from pymodaq.daq_utils.daq_utils import ThreadCommand, getLineInfo, DataFromPlugins from pymodaq.daq_viewer.utility_classes import DAQ_Viewer_base from collections import OrderedDict import numpy as np from enum import IntEnum from pymodaq.daq_v...
true
true
f777c3db756954a04b2e725941e2ccaa9302d295
881
py
Python
test_package/conanfile.py
HerAmu/conan-qualisyssdk
7b131f44ecd94e8113d696739ebdd3b0b5f1f6f1
[ "MIT" ]
null
null
null
test_package/conanfile.py
HerAmu/conan-qualisyssdk
7b131f44ecd94e8113d696739ebdd3b0b5f1f6f1
[ "MIT" ]
null
null
null
test_package/conanfile.py
HerAmu/conan-qualisyssdk
7b131f44ecd94e8113d696739ebdd3b0b5f1f6f1
[ "MIT" ]
null
null
null
import os from conans import ConanFile, CMake, tools class FhSimTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake_paths", "cmake_find_package" def build(self): cmake = self._configure_cmake() cmake.configure() cmake.build() def impor...
25.911765
96
0.593644
import os from conans import ConanFile, CMake, tools class FhSimTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake_paths", "cmake_find_package" def build(self): cmake = self._configure_cmake() cmake.configure() cmake.build() def impor...
true
true
f777c499c2469e203bd3bfe48cc1591700aa2d50
1,380
py
Python
p037.py
yehnan/project_euler_python
9c8a50e992b71c1c313b08a16ea24298ce5cf020
[ "MIT" ]
1
2017-03-29T19:30:32.000Z
2017-03-29T19:30:32.000Z
p037.py
yehnan/project_euler_python
9c8a50e992b71c1c313b08a16ea24298ce5cf020
[ "MIT" ]
null
null
null
p037.py
yehnan/project_euler_python
9c8a50e992b71c1c313b08a16ea24298ce5cf020
[ "MIT" ]
1
2018-10-29T02:40:06.000Z
2018-10-29T02:40:06.000Z
# Problem 37: Truncatable primes # https://projecteuler.net/problem=37 def is_prime(n): if n < 2: return False if n == 2: return True if n % 2 == 0: return False for x in range(3, int(n ** 0.5) + 1, 2): if n % x == 0: return False return ...
20
78
0.489855
def is_prime(n): if n < 2: return False if n == 2: return True if n % 2 == 0: return False for x in range(3, int(n ** 0.5) + 1, 2): if n % x == 0: return False return True def is_truncatable_left(n): s = str(n) s_len = len(s) ...
true
true
f777c5bc0fd42418f4a92cb545dbcfc01bb28db1
9,657
py
Python
tests/unittests/test_completers.py
otms61/iredis
b4acd1b187f9a905ba484710f37656cb56b75962
[ "BSD-3-Clause" ]
null
null
null
tests/unittests/test_completers.py
otms61/iredis
b4acd1b187f9a905ba484710f37656cb56b75962
[ "BSD-3-Clause" ]
null
null
null
tests/unittests/test_completers.py
otms61/iredis
b4acd1b187f9a905ba484710f37656cb56b75962
[ "BSD-3-Clause" ]
null
null
null
from unittest.mock import MagicMock, patch import pendulum from prompt_toolkit.formatted_text import FormattedText from prompt_toolkit.completion import Completion from iredis.completers import MostRecentlyUsedFirstWordCompleter from iredis.completers import IRedisCompleter, TimestampCompleter, IntegerTypeCompleter ...
33.185567
146
0.605675
from unittest.mock import MagicMock, patch import pendulum from prompt_toolkit.formatted_text import FormattedText from prompt_toolkit.completion import Completion from iredis.completers import MostRecentlyUsedFirstWordCompleter from iredis.completers import IRedisCompleter, TimestampCompleter, IntegerTypeCompleter ...
true
true
f777c6662165b91d3a783213703130486a4b31b8
2,102
py
Python
profiles_api/models.py
WenBiming/Profiles-REST-API
eea82b10a49e8d53e317d931cec5786910b029a3
[ "MIT" ]
null
null
null
profiles_api/models.py
WenBiming/Profiles-REST-API
eea82b10a49e8d53e317d931cec5786910b029a3
[ "MIT" ]
null
null
null
profiles_api/models.py
WenBiming/Profiles-REST-API
eea82b10a49e8d53e317d931cec5786910b029a3
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.models import BaseUserManager from django.conf import settings class UserProfileManager(BaseUserManager): """Manager for user profiles""" def cr...
28.794521
64
0.681256
from django.db import models from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.models import BaseUserManager from django.conf import settings class UserProfileManager(BaseUserManager): def create_user(self, email, name, passwor...
true
true
f777c7537f1eec3b03c6d17c24e4c8501144f56c
35
py
Python
python/testData/completion/fStringLikeCompletionNotAvailableAfterEscapedOpeningBrace.py
alexey-anufriev/intellij-community
ffcd46f14e630acdefcc76e2bfc7c43d2449013a
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/completion/fStringLikeCompletionNotAvailableAfterEscapedOpeningBrace.py
alexey-anufriev/intellij-community
ffcd46f14e630acdefcc76e2bfc7c43d2449013a
[ "Apache-2.0" ]
1
2020-07-30T19:04:47.000Z
2020-07-30T19:04:47.000Z
python/testData/completion/fStringLikeCompletionNotAvailableAfterEscapedOpeningBrace.py
bradleesand/intellij-community
750ff9c10333c9c1278c00dbe8d88c877b1b9749
[ "Apache-2.0" ]
1
2020-10-15T05:56:42.000Z
2020-10-15T05:56:42.000Z
my_expr = 42 s = 'foo{{my_e<caret>'
17.5
22
0.628571
my_expr = 42 s = 'foo{{my_e<caret>'
true
true
f777c769474481b0918ca46569e073d8deefacb8
1,244
py
Python
mindsdb/api/mysql/mysql_proxy/classes/com_operators.py
yarenty/mindsdb
9164bca6f45fd0f5ec329babe973f286ffe59709
[ "MIT" ]
261
2018-09-28T02:32:17.000Z
2018-12-10T06:30:54.000Z
mindsdb/api/mysql/mysql_proxy/classes/com_operators.py
yarenty/mindsdb
9164bca6f45fd0f5ec329babe973f286ffe59709
[ "MIT" ]
27
2018-09-26T08:49:11.000Z
2018-12-10T14:42:52.000Z
mindsdb/api/mysql/mysql_proxy/classes/com_operators.py
yarenty/mindsdb
9164bca6f45fd0f5ec329babe973f286ffe59709
[ "MIT" ]
46
2018-10-06T10:11:18.000Z
2018-12-10T04:02:17.000Z
import re import operator def f_and(*args): for i in args: if not i: return False return True def f_or(*args): for i in args: if i: return True return False def f_like(s, p): p = '^{}$'.format(p.replace('%', '[\s\S]*')) return re.match(p, s) is not ...
17.771429
50
0.516881
import re import operator def f_and(*args): for i in args: if not i: return False return True def f_or(*args): for i in args: if i: return True return False def f_like(s, p): p = '^{}$'.format(p.replace('%', '[\s\S]*')) return re.match(p, s) is not ...
true
true
f777c7a79ffedd1c19ac7f0afeb35781a3d87c2f
6,733
py
Python
rdr_service/lib_fhir/fhirclient_1_0_6/models/group.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
39
2017-10-13T19:16:27.000Z
2021-09-24T16:58:21.000Z
fhirclient/models/group.py
NematiLab/Streaming-Sepsis-Prediction-System-for-Intensive-Care-Units
fb5ad260fb8d264d85aea9e6c895d1700eea4d11
[ "Apache-2.0" ]
312
2017-09-08T15:42:13.000Z
2022-03-23T18:21:40.000Z
rdr_service/lib_fhir/fhirclient_1_0_6/models/group.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
19
2017-09-15T13:58:00.000Z
2022-02-07T18:33:20.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/Group) on 2016-06-23. # 2016, SMART Health IT. from . import domainresource class Group(domainresource.DomainResource): """ Group of multiple entities. Represents a defined collect...
36.198925
132
0.60003
from . import domainresource class Group(domainresource.DomainResource): resource_name = "Group" def __init__(self, jsondict=None, strict=True): self.actual = None self.characteristic = None self.code = None self.identifier = None ...
true
true
f777c87ece5ae0ff870f72340f7bbbc1d1a0e4f9
2,285
py
Python
python3/koans/about_asserts.py
sandisomadayi/python_koans
50384b85616bb1b9c979d62de770bc1b36227b14
[ "MIT" ]
null
null
null
python3/koans/about_asserts.py
sandisomadayi/python_koans
50384b85616bb1b9c979d62de770bc1b36227b14
[ "MIT" ]
null
null
null
python3/koans/about_asserts.py
sandisomadayi/python_koans
50384b85616bb1b9c979d62de770bc1b36227b14
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutAsserts(Koan): def test_assert_truth(self): """ We shall contemplate truth by testing reality, via asserts. """ # Confused? This video should help: # # http://bit.ly/about_asserts...
28.924051
83
0.605252
from runner.koan import * class AboutAsserts(Koan): def test_assert_truth(self): self.assertTrue(True) def test_assert_with_message(self): self.assertTrue(True) def test_fill_in_values(self): self.assertEqual(2, 1 + 1) def test_assert_equality(self...
true
true
f777c923bb9bed6bbe7b988d05da60defbf83a6c
3,077
py
Python
projetodj/base/models.py
vitorcardmore/projetodj
578d1293b3e8973861e87b3f250dbc31014daf82
[ "MIT" ]
null
null
null
projetodj/base/models.py
vitorcardmore/projetodj
578d1293b3e8973861e87b3f250dbc31014daf82
[ "MIT" ]
1
2021-07-25T19:18:35.000Z
2021-07-25T19:22:47.000Z
projetodj/base/models.py
vitorcardmore/projetodj
578d1293b3e8973861e87b3f250dbc31014daf82
[ "MIT" ]
null
null
null
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager from django.contrib.auth.models import PermissionsMixin from django.core.mail import send_mail from django.db import models from django.utils import timezone from django.utils.translation import gettext_lazy as _ class UserManager(BaseUserMan...
33.813187
81
0.661358
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager from django.contrib.auth.models import PermissionsMixin from django.core.mail import send_mail from django.db import models from django.utils import timezone from django.utils.translation import gettext_lazy as _ class UserManager(BaseUserMan...
true
true
f777c946d75a378d4ec634b578eac6b4cdfec0e2
9,126
py
Python
torchreid/models/pcb.py
mangye16/deep-person-reid
42eaccea712c3ebcc5273085a3cfea400a4783b8
[ "MIT" ]
2
2021-05-05T09:17:46.000Z
2021-08-29T15:16:43.000Z
torchreid/models/pcb.py
mangye16/deep-person-reid
42eaccea712c3ebcc5273085a3cfea400a4783b8
[ "MIT" ]
null
null
null
torchreid/models/pcb.py
mangye16/deep-person-reid
42eaccea712c3ebcc5273085a3cfea400a4783b8
[ "MIT" ]
null
null
null
from __future__ import division, absolute_import import torch.utils.model_zoo as model_zoo from torch import nn from torch.nn import functional as F __all__ = ['pcb_p6', 'pcb_p4'] model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch.org/...
28.879747
86
0.563336
from __future__ import division, absolute_import import torch.utils.model_zoo as model_zoo from torch import nn from torch.nn import functional as F __all__ = ['pcb_p6', 'pcb_p4'] model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch.org/...
true
true
f777cb1c4c0ce0bfbd8857222ca30f53ba7d7184
582
py
Python
wsgi/static/wsgi/static/wsgi/static/wsgi/static/wsgi/static/wsgi/static/wsgi/static/ENV/bin/createfontdatachunk.py
telbohtimy/Vygit
2858a71a658368e86ef789114144ce68c06dd4c5
[ "Apache-2.0" ]
null
null
null
wsgi/static/wsgi/static/wsgi/static/wsgi/static/wsgi/static/wsgi/static/wsgi/static/ENV/bin/createfontdatachunk.py
telbohtimy/Vygit
2858a71a658368e86ef789114144ce68c06dd4c5
[ "Apache-2.0" ]
null
null
null
wsgi/static/wsgi/static/wsgi/static/wsgi/static/wsgi/static/wsgi/static/wsgi/static/ENV/bin/createfontdatachunk.py
telbohtimy/Vygit
2858a71a658368e86ef789114144ce68c06dd4c5
[ "Apache-2.0" ]
null
null
null
#!/home/tarek/Desktop/Vygit/ENV/bin/python3 from __future__ import print_function import base64 import os import sys if __name__ == "__main__": # create font data chunk for embedding font = "Tests/images/courB08" print(" f._load_pilfont_data(") print(" # %s" % os.path.basename(font)) pri...
30.631579
63
0.634021
from __future__ import print_function import base64 import os import sys if __name__ == "__main__": font = "Tests/images/courB08" print(" f._load_pilfont_data(") print(" # %s" % os.path.basename(font)) print(" BytesIO(base64.decodestring(b'''") base64.encode(open(font + ".pil...
true
true
f777cb6ea8bda0e00030b033dd83c37d843b5348
978
py
Python
LMSCNet/common/logger.py
hmax233/LMSCNet
51c123ec6e0b9602bc9998deaddf89e713a5b19e
[ "Apache-2.0" ]
38
2020-10-27T11:41:42.000Z
2022-03-04T08:44:27.000Z
LMSCNet/common/logger.py
hmax233/LMSCNet
51c123ec6e0b9602bc9998deaddf89e713a5b19e
[ "Apache-2.0" ]
3
2020-11-26T06:58:14.000Z
2022-02-21T10:53:16.000Z
LMSCNet/common/logger.py
hmax233/LMSCNet
51c123ec6e0b9602bc9998deaddf89e713a5b19e
[ "Apache-2.0" ]
6
2020-12-04T03:33:42.000Z
2022-03-04T09:29:20.000Z
import errno import os import logging def get_logger(path, filename): # Create the folder where the training information is to be saved if it doesn't exist if not os.path.exists(path): try: os.makedirs(path) except OSError as exc: # Guard against race condition if exc.errno != errno.EEXIST: ...
29.636364
87
0.723926
import errno import os import logging def get_logger(path, filename): if not os.path.exists(path): try: os.makedirs(path) except OSError as exc: # Guard against race condition if exc.errno != errno.EEXIST: raise # Create the logger logger = logging.getLogger() logger.setLevel(...
true
true
f777cbb841e09efdea550ac382d1356d2c985b9c
4,975
py
Python
miniature/thumbnails/base.py
olivier-m/miniature
5f50ad0336f8f17a0810f591a73fdadb006295ca
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
miniature/thumbnails/base.py
olivier-m/miniature
5f50ad0336f8f17a0810f591a73fdadb006295ca
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
miniature/thumbnails/base.py
olivier-m/miniature
5f50ad0336f8f17a0810f591a73fdadb006295ca
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of Miniature released under the FreeBSD license. # See the LICENSE for more information. from __future__ import (print_function, division, absolute_import, unicode_literals) import hashlib import os.path from django.core.cache import get_cache, cache as default_cache, Inv...
30.709877
97
0.611256
from __future__ import (print_function, division, absolute_import, unicode_literals) import hashlib import os.path from django.core.cache import get_cache, cache as default_cache, InvalidCacheBackendError from django.core.files.base import File, ContentFile from django.core.files.storage import get_storage_class, def...
true
true
f777cbf88a0a468b294ba06cd70ac0530f3787c0
8,176
py
Python
lib/datasets/data_loader.py
tianweiy/openseg.pytorch
e4159e0b2db86d22149c44f220c5f2e3070a3042
[ "MIT" ]
null
null
null
lib/datasets/data_loader.py
tianweiy/openseg.pytorch
e4159e0b2db86d22149c44f220c5f2e3070a3042
[ "MIT" ]
null
null
null
lib/datasets/data_loader.py
tianweiy/openseg.pytorch
e4159e0b2db86d22149c44f220c5f2e3070a3042
[ "MIT" ]
null
null
null
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ## Created by: Donny You, RainbowSecret, JingyiXie ## Microsoft Research ## yuyua@microsoft.com ## Copyright (c) 2019 ## ## This source code is licensed under the MIT-style license found in the ## LICENSE file in the root directory of this sour...
44.434783
105
0.564212
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch from torch.utils import data import lib.datasets.tools.transforms as trans import lib.datasets.tools.cv2_aug_transforms as cv2_aug_trans import lib.datasets.tools.pil_aug_transforms as pil_aug_tr...
true
true
f777cc161d46193911d17cf2a9251a13f33923ec
1,265
py
Python
packages/scap-security-guide/scap-security-guide/RHEL6/input/checks/templates/create_package_removed.py
csmith-tresys/clip
368cc539618b561b03850b4788cc728ce465c3f6
[ "Apache-2.0" ]
null
null
null
packages/scap-security-guide/scap-security-guide/RHEL6/input/checks/templates/create_package_removed.py
csmith-tresys/clip
368cc539618b561b03850b4788cc728ce465c3f6
[ "Apache-2.0" ]
null
null
null
packages/scap-security-guide/scap-security-guide/RHEL6/input/checks/templates/create_package_removed.py
csmith-tresys/clip
368cc539618b561b03850b4788cc728ce465c3f6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # create_package_removed.py # automatically generate checks for removed packages # # NOTE: The file 'template_package_removed' should be located in the same working directory as this script. The # template contains the following tags that *must* be replaced successfully in order for the checks to...
31.625
111
0.647431
import sys, csv, re def output_check(package_info): pkgname = package_info[0] if (pkgname): with open("./template_package_removed", 'r') as templatefile: filestring = templatefile.read() filestring = filestring.replace("PKGNAME", pkgname) with open("./output/packag...
true
true
f777cdf84d0a387bf4742ecb648bbac64fefb68c
3,282
py
Python
Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/spanish/parsers.py
AhmedLeithy/Recognizers-Text
f5426e38a09d3974fc0979b7803a4cd17258ea62
[ "MIT" ]
null
null
null
Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/spanish/parsers.py
AhmedLeithy/Recognizers-Text
f5426e38a09d3974fc0979b7803a4cd17258ea62
[ "MIT" ]
6
2021-12-20T17:13:35.000Z
2022-03-29T08:54:11.000Z
Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/spanish/parsers.py
AhmedLeithy/Recognizers-Text
f5426e38a09d3974fc0979b7803a4cd17258ea62
[ "MIT" ]
4
2022-01-12T17:46:13.000Z
2022-01-12T17:59:32.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from recognizers_text.culture import Culture from recognizers_text.extractor import Extractor from recognizers_text.parser import Parser from recognizers_number.culture import CultureInfo from recognizers_number.number.span...
48.264706
99
0.814747
from recognizers_text.culture import Culture from recognizers_text.extractor import Extractor from recognizers_text.parser import Parser from recognizers_number.culture import CultureInfo from recognizers_number.number.spanish.extractors import SpanishNumberExtractor, NumberMode from recognizers_number.number.parser_f...
true
true
f777ce8f0e3190ed48fd0efc5cbd704f917ecbae
2,610
py
Python
imcsdk/mometa/lsboot/LsbootDef.py
kgrozis/UCS-CIMC-Scripts
44069ee853299fe5aeed023e8c998ce2534b8d8b
[ "Apache-2.0" ]
null
null
null
imcsdk/mometa/lsboot/LsbootDef.py
kgrozis/UCS-CIMC-Scripts
44069ee853299fe5aeed023e8c998ce2534b8d8b
[ "Apache-2.0" ]
null
null
null
imcsdk/mometa/lsboot/LsbootDef.py
kgrozis/UCS-CIMC-Scripts
44069ee853299fe5aeed023e8c998ce2534b8d8b
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for LsbootDef ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import ImcVersion, MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class LsbootDefConsts(): PURPOSE_OPERATIONAL = "operational" PURPOSE_UTILITY = "utility" REBO...
47.454545
275
0.647893
from ...imcmo import ManagedObject from ...imccoremeta import ImcVersion, MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class LsbootDefConsts(): PURPOSE_OPERATIONAL = "operational" PURPOSE_UTILITY = "utility" REBOOT_ON_UPDATE_FALSE = "false" REBOOT_ON_UPDATE_NO = "no" REBOOT_ON_UPDATE...
true
true
f777cf5f6f7d37906e5aca513cef889992db2af6
2,498
py
Python
tests/test_power_domains.py
standanley/fault
7418103744e3ec5b5d142e0a152f08b7feef6a1e
[ "BSD-3-Clause" ]
null
null
null
tests/test_power_domains.py
standanley/fault
7418103744e3ec5b5d142e0a152f08b7feef6a1e
[ "BSD-3-Clause" ]
null
null
null
tests/test_power_domains.py
standanley/fault
7418103744e3ec5b5d142e0a152f08b7feef6a1e
[ "BSD-3-Clause" ]
null
null
null
import magma as m import mantle import fault from hwtypes import BitVector import pytest import shutil @pytest.mark.skipif(not shutil.which("irun"), reason="irun not available") def test_simple_alu_pd(): type_map = {"CLK": m.In(m.Clock)} circ = m.DefineFromVerilogFile("tests/verilog/simple_alu_pd.sv", ...
34.219178
77
0.640112
import magma as m import mantle import fault from hwtypes import BitVector import pytest import shutil @pytest.mark.skipif(not shutil.which("irun"), reason="irun not available") def test_simple_alu_pd(): type_map = {"CLK": m.In(m.Clock)} circ = m.DefineFromVerilogFile("tests/verilog/simple_alu_pd.sv", ...
true
true
f777d017f8f4b5d64f4dec19aa95f4f22333296b
25,935
py
Python
pkgs/sdk-pkg/src/genie/libs/sdk/triggers/unconfigconfig/mld/nxos/unconfigconfig.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
null
null
null
pkgs/sdk-pkg/src/genie/libs/sdk/triggers/unconfigconfig/mld/nxos/unconfigconfig.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
null
null
null
pkgs/sdk-pkg/src/genie/libs/sdk/triggers/unconfigconfig/mld/nxos/unconfigconfig.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
null
null
null
'''NXOS Implementation for Mld unconfigconfig triggers''' # python from functools import partial # ats from ats.utils.objects import Not, NotExists # Genie Libs from genie.libs.sdk.libs.utils.mapping import Mapping from genie.libs.sdk.triggers.unconfigconfig.unconfigconfig import TriggerUnconfigConfig from genie.lib...
59.212329
123
0.412531
from functools import partial from ats.utils.objects import Not, NotExists from genie.libs.sdk.libs.utils.mapping import Mapping from genie.libs.sdk.triggers.unconfigconfig.unconfigconfig import TriggerUnconfigConfig from genie.libs.sdk.libs.utils.triggeractions import configure_add_attributes, verify_ops_or_logic f...
true
true
f777d10cbe83a4febf6b558638d473e52be70912
2,000
py
Python
pygame_tests/demo_layered_dirty.py
VgTajdd/neuroevolver
248c96b25ad936e15cfffc7a4223926db83ad540
[ "MIT" ]
null
null
null
pygame_tests/demo_layered_dirty.py
VgTajdd/neuroevolver
248c96b25ad936e15cfffc7a4223926db83ad540
[ "MIT" ]
null
null
null
pygame_tests/demo_layered_dirty.py
VgTajdd/neuroevolver
248c96b25ad936e15cfffc7a4223926db83ad540
[ "MIT" ]
null
null
null
import pygame class Box(pygame.sprite.DirtySprite): def __init__(self, pos, layer): pygame.sprite.DirtySprite.__init__(self) #call DirtySprite intializer #self.image, self.rect = load_image('chimp.bmp', -1) # Create an image of the block, and fill it with a color. # This co...
32.258065
88
0.5865
import pygame class Box(pygame.sprite.DirtySprite): def __init__(self, pos, layer): pygame.sprite.DirtySprite.__init__(self) self.image = pygame.Surface([50, 50]) color = (255, 255, 255) if layer == 1: color = (255, 0, 0) elif layer == ...
true
true
f777d1a72cedc9cd425385f7aa97d27a24aa4b0e
2,963
py
Python
python/comfo/types.py
ti-mo/comfo
9d6e04ef0540d399243ba317f3a0a168498acd5c
[ "MIT" ]
3
2017-11-14T11:56:01.000Z
2020-10-24T12:19:10.000Z
python/comfo/types.py
ti-mo/comfo
9d6e04ef0540d399243ba317f3a0a168498acd5c
[ "MIT" ]
null
null
null
python/comfo/types.py
ti-mo/comfo
9d6e04ef0540d399243ba317f3a0a168498acd5c
[ "MIT" ]
null
null
null
""" Concrete types for converting from protobuf objects. Since the Python protobuf compiler outputs code that generates classes on the fly from a symbol database, we convert them as concrete types here to ensure the expected fields are present. """ from pprint import pformat class ComfoMessage: """Mixin for prot...
29.336634
67
0.661154
from pprint import pformat class ComfoMessage: def __repr__(self): return pformat(self.__dict__, sort_dicts=False) class BootInfo(ComfoMessage): def __init__(self, pb): self.MajorVersion = pb.MajorVersion self.MinorVersion = pb.MinorVersion self.BetaVersion = pb.BetaVersion...
true
true
f777d247496e4c382c76f86c54b43ac3ec435064
2,594
py
Python
sdk/python/pulumi_aws/wafregional/rule_group.py
lemonade-hq/pulumi-aws
9ee22c65c7bad42d38b16879ccd56526d856a01a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/wafregional/rule_group.py
lemonade-hq/pulumi-aws
9ee22c65c7bad42d38b16879ccd56526d856a01a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/wafregional/rule_group.py
lemonade-hq/pulumi-aws
9ee22c65c7bad42d38b16879ccd56526d856a01a
[ "ECL-2.0", "Apache-2.0" ]
1
2021-03-08T15:05:29.000Z
2021-03-08T15:05:29.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class RuleGroup(pulumi.CustomResource...
37.057143
134
0.669237
import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class RuleGroup(pulumi.CustomResource): activated_rules: pulumi.Output[list] metric_name: pulumi.Output[str] name: pulumi.Output[str] def __init__(__self__, resource_name, opts=None, activated_rules=None, ...
true
true
f777d29cb476cb62bfb9ee2a17225f5e12b2bbea
444
py
Python
forum/migrations/0012_forumtopic_link.py
opendream/asip
20583aca6393102d425401d55ea32ac6b78be048
[ "MIT" ]
null
null
null
forum/migrations/0012_forumtopic_link.py
opendream/asip
20583aca6393102d425401d55ea32ac6b78be048
[ "MIT" ]
8
2020-03-24T17:11:49.000Z
2022-01-13T01:18:11.000Z
forum/migrations/0012_forumtopic_link.py
opendream/asip
20583aca6393102d425401d55ea32ac6b78be048
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('forum', '0011_forumboard_css_class'), ] operations = [ migrations.AddField( model_name='forumtopic', ...
21.142857
57
0.601351
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('forum', '0011_forumboard_css_class'), ] operations = [ migrations.AddField( model_name='forumtopic', name='link', ...
true
true
f777d2f2dac0e41140cc863695ed3b1c8a86e3d9
5,465
py
Python
test_17.py
uberj/newfriends
cad330052b5bc089da82add9f03781dc0bcac5c2
[ "MIT" ]
null
null
null
test_17.py
uberj/newfriends
cad330052b5bc089da82add9f03781dc0bcac5c2
[ "MIT" ]
null
null
null
test_17.py
uberj/newfriends
cad330052b5bc089da82add9f03781dc0bcac5c2
[ "MIT" ]
null
null
null
import unittest from random import choice from binascii import a2b_base64 from crypto.cbc import CBCCipher from util.somecode import pad16_PKCS7, unpad16_PKCS7, rand_n_string, PaddingException FIXED_KEY = rand_n_string(16).encode() FIXED_IV = rand_n_string(16).encode() PSTRINGS = [ b"MDAwMDAwTm93IHRoYXQgdGhlIHBhcnR...
33.944099
116
0.754254
import unittest from random import choice from binascii import a2b_base64 from crypto.cbc import CBCCipher from util.somecode import pad16_PKCS7, unpad16_PKCS7, rand_n_string, PaddingException FIXED_KEY = rand_n_string(16).encode() FIXED_IV = rand_n_string(16).encode() PSTRINGS = [ b"MDAwMDAwTm93IHRoYXQgdGhlIHBhcnR...
true
true
f777d2f562f224205883f7c78a34c4a24587ad1b
2,127
py
Python
src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_client_factory.py
diberry/azure-cli
302999245cbb13b890b0a74f03443c577bd4bfae
[ "MIT" ]
1
2019-03-30T20:49:32.000Z
2019-03-30T20:49:32.000Z
src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_client_factory.py
diberry/azure-cli
302999245cbb13b890b0a74f03443c577bd4bfae
[ "MIT" ]
4
2018-08-08T20:01:17.000Z
2018-09-17T15:20:06.000Z
src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_client_factory.py
diberry/azure-cli
302999245cbb13b890b0a74f03443c577bd4bfae
[ "MIT" ]
1
2018-04-14T01:46:00.000Z
2018-04-14T01:46:00.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
34.868852
103
0.727315
from azure.cli.core.commands.client_factory import get_mgmt_service_client def get_arm_service_client(cli_ctx): from azure.mgmt.resource import ResourceManagementClient return get_mgmt_service_client(cli_ctx, ResourceManagementClient) def get_storage_service_client(cli_ctx): from azure.cli.core.profile...
true
true
f777d3ea8de0f122dcb2d15c387e0bcc7867a005
74,412
py
Python
salt/modules/win_task.py
johnskopis/salt
86adb6b0fe40230b8be4c74229e897a7a08f81a6
[ "Apache-2.0" ]
1
2015-01-18T15:04:16.000Z
2015-01-18T15:04:16.000Z
salt/modules/win_task.py
johnskopis/salt
86adb6b0fe40230b8be4c74229e897a7a08f81a6
[ "Apache-2.0" ]
null
null
null
salt/modules/win_task.py
johnskopis/salt
86adb6b0fe40230b8be4c74229e897a7a08f81a6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # https://msdn.microsoft.com/en-us/library/windows/desktop/aa383608(v=vs.85).aspx ''' Windows Task Scheduler Module .. versionadded:: 2016.3.0 A module for working with the Windows Task Scheduler. You can add and edit existing tasks. You can add and clear triggers and actions. You can list all ...
33.130899
182
0.634199
from __future__ import absolute_import, unicode_literals, print_function import logging import time from datetime import datetime import salt.utils.platform from salt.exceptions import ArgumentValueError, CommandExecutionError try: import pythoncom import win32com.client import win32api HAS_DEPENDENCI...
true
true
f777d41a947ea1459968eb7c3ea7a4299a0a2737
395
py
Python
py/misc.py
ashlinrichardson/bcstats_ohcs_craigslist
38135b0e80e3a2e1ae24b722a943d1c49fbf8f1f
[ "Apache-2.0" ]
2
2020-04-08T17:17:25.000Z
2021-09-11T12:54:16.000Z
py/misc.py
ashlinrichardson/bcstats_ohcs_craigslist
38135b0e80e3a2e1ae24b722a943d1c49fbf8f1f
[ "Apache-2.0" ]
19
2020-04-17T19:27:02.000Z
2022-02-04T20:59:28.000Z
py/misc.py
ashlinrichardson/bcstats_ohcs_craigslist
38135b0e80e3a2e1ae24b722a943d1c49fbf8f1f
[ "Apache-2.0" ]
2
2020-08-04T18:19:23.000Z
2021-10-13T17:25:53.000Z
import os; exists = os.path.exists import sys import csv import time args = sys.argv def err(msg): print("Error: " + str(msg)) sys.exit(1) def parfor(my_function, my_inputs): # evaluate function in parallel, and collect the results import multiprocessing as mp pool = mp.Pool(mp.cpu_co...
23.235294
61
0.668354
import os; exists = os.path.exists import sys import csv import time args = sys.argv def err(msg): print("Error: " + str(msg)) sys.exit(1) def parfor(my_function, my_inputs): import multiprocessing as mp pool = mp.Pool(mp.cpu_count()) result = pool.map(my_function, my_inputs) ...
true
true
f777d4a9eaabb1e982fa9560a3682ac2df0d08fb
1,178
py
Python
chapter-1/1-6/src/dp.py
yuetsin/beauty-of-programming
5fd66e0fe2a5cba72eaa814abc2304301d44bb37
[ "CC0-1.0" ]
null
null
null
chapter-1/1-6/src/dp.py
yuetsin/beauty-of-programming
5fd66e0fe2a5cba72eaa814abc2304301d44bb37
[ "CC0-1.0" ]
null
null
null
chapter-1/1-6/src/dp.py
yuetsin/beauty-of-programming
5fd66e0fe2a5cba72eaa814abc2304301d44bb37
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python import testcases class Solution: def __init__(self, volume: int, drinks: list): self.volume = volume self.drinks = drinks self.drink_count = len(self.drinks) self.opt = [[0] * (self.drink_count + 1) for _ in range(volume + 1)] def calculate(self) -> in...
28.731707
104
0.488115
import testcases class Solution: def __init__(self, volume: int, drinks: list): self.volume = volume self.drinks = drinks self.drink_count = len(self.drinks) self.opt = [[0] * (self.drink_count + 1) for _ in range(volume + 1)] def calculate(self) -> int: for j in r...
true
true
f777d62024ce6b8cb4e07f6b719c845c37045fc9
1,698
py
Python
ingestion/src/metadata/ingestion/source/mssql.py
mosiac1/OpenMetadata
21c14d257c6ae7ed2aad2a9ccff2c3a3f1594681
[ "Apache-2.0" ]
1
2022-01-06T11:12:01.000Z
2022-01-06T11:12:01.000Z
ingestion/src/metadata/ingestion/source/mssql.py
mosiac1/OpenMetadata
21c14d257c6ae7ed2aad2a9ccff2c3a3f1594681
[ "Apache-2.0" ]
6
2022-01-05T10:24:56.000Z
2022-01-06T09:57:07.000Z
ingestion/src/metadata/ingestion/source/mssql.py
mosiac1/OpenMetadata
21c14d257c6ae7ed2aad2a9ccff2c3a3f1594681
[ "Apache-2.0" ]
5
2022-01-05T11:48:39.000Z
2022-01-06T06:45:25.000Z
# Copyright 2021 Collate # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software...
37.733333
99
0.742638
from metadata.generated.schema.entity.services.connections.database.mssqlConnection import ( MssqlConnection, ) from metadata.generated.schema.entity.services.connections.metadata.openMetadataConnection import ( OpenMetadataConnection, ) from metadata.generated.schema.metadataIngestion.workflow import ( So...
true
true
f777d6616641eb288813fb8071e333fc52209c20
21,611
py
Python
osf/utils/migrations.py
tsukaeru/RDM-osf.io
2dc3e539322b6110e51772f8bd25ebdeb8e12d0e
[ "Apache-2.0" ]
null
null
null
osf/utils/migrations.py
tsukaeru/RDM-osf.io
2dc3e539322b6110e51772f8bd25ebdeb8e12d0e
[ "Apache-2.0" ]
null
null
null
osf/utils/migrations.py
tsukaeru/RDM-osf.io
2dc3e539322b6110e51772f8bd25ebdeb8e12d0e
[ "Apache-2.0" ]
null
null
null
from past.builtins import basestring import os import itertools import builtins import json import logging import warnings from math import ceil from contextlib import contextmanager from django.apps import apps from django.db import connection from django.db.migrations.operations.base import Operation from osf.model...
35.082792
153
0.640877
from past.builtins import basestring import os import itertools import builtins import json import logging import warnings from math import ceil from contextlib import contextmanager from django.apps import apps from django.db import connection from django.db.migrations.operations.base import Operation from osf.model...
true
true
f777d688bf42dee59479b13f26be57cf983cc9b2
135
py
Python
src/camps/admin.py
pwelzel/bornhack-website
af794e6a2fba06e09626259c7768feb30ff394be
[ "BSD-3-Clause" ]
null
null
null
src/camps/admin.py
pwelzel/bornhack-website
af794e6a2fba06e09626259c7768feb30ff394be
[ "BSD-3-Clause" ]
null
null
null
src/camps/admin.py
pwelzel/bornhack-website
af794e6a2fba06e09626259c7768feb30ff394be
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from . import models @admin.register(models.Camp) class CampModelAdmin(admin.ModelAdmin): pass
15
39
0.777778
from django.contrib import admin from . import models @admin.register(models.Camp) class CampModelAdmin(admin.ModelAdmin): pass
true
true
f777d7817f0cf9e8ae550a1c15ed9c51802692e7
8,691
py
Python
lib/main.py
togakushi/mjlog
2f785ccb92ca7db17abbee2f4a8777250ef03abc
[ "MIT" ]
3
2020-11-26T13:13:08.000Z
2020-12-18T08:22:28.000Z
lib/main.py
togakushi/mjlog
2f785ccb92ca7db17abbee2f4a8777250ef03abc
[ "MIT" ]
null
null
null
lib/main.py
togakushi/mjlog
2f785ccb92ca7db17abbee2f4a8777250ef03abc
[ "MIT" ]
1
2020-11-27T04:55:08.000Z
2020-11-27T04:55:08.000Z
#!/usr/bin/python3 import os import glob import gzip import xml.etree.ElementTree as ET from urllib.parse import unquote from . import common from . import table from . import analysis from . import fooro from . import end def logserach(dir): filelist = [] if os.path.isdir(dir): findpath = os.path.j...
34.216535
92
0.408123
import os import glob import gzip import xml.etree.ElementTree as ET from urllib.parse import unquote from . import common from . import table from . import analysis from . import fooro from . import end def logserach(dir): filelist = [] if os.path.isdir(dir): findpath = os.path.join(dir, '**', '*.m...
true
true