hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f708eee42ccb35a6cc075bb1efa20fbf89f53cc0
5,340
py
Python
server/extensions/json/__init__.py
ojengwa/zapcore
f9eace7dc8ab4bc8bc3bb9c212ba43395e0459c1
[ "MIT" ]
null
null
null
server/extensions/json/__init__.py
ojengwa/zapcore
f9eace7dc8ab4bc8bc3bb9c212ba43395e0459c1
[ "MIT" ]
3
2020-09-05T08:03:34.000Z
2021-05-07T20:03:30.000Z
server/extensions/json/__init__.py
ojengwa/zapcore
f9eace7dc8ab4bc8bc3bb9c212ba43395e0459c1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import import datetime import decimal import io import uuid from flask import current_app from flask import json as _json from flask import request from sqlalchemy import types import arrow text_type = str def _wrap_reader_for_text(fp, encoding): if is...
29.502762
79
0.626966
from __future__ import absolute_import import datetime import decimal import io import uuid from flask import current_app from flask import json as _json from flask import request from sqlalchemy import types import arrow text_type = str def _wrap_reader_for_text(fp, encoding): if isinstance(fp.read(0), by...
true
true
f708ef284ffde13b9c42794d15d4414bf0e90f92
5,765
py
Python
matchzoo/layers/matching_layer.py
songzy12/MatchZoo
a43dc3b1d43b3f2a1b43b11d3fc4009616507e23
[ "Apache-2.0" ]
null
null
null
matchzoo/layers/matching_layer.py
songzy12/MatchZoo
a43dc3b1d43b3f2a1b43b11d3fc4009616507e23
[ "Apache-2.0" ]
null
null
null
matchzoo/layers/matching_layer.py
songzy12/MatchZoo
a43dc3b1d43b3f2a1b43b11d3fc4009616507e23
[ "Apache-2.0" ]
null
null
null
"""An implementation of Matching Layer.""" import typing import tensorflow as tf from tensorflow.keras import layers class MatchingLayer(layers.Layer): """ Layer that computes a matching matrix between samples in two tensors. :param normalize: Whether to L2-normalize samples along the dot produc...
40.886525
78
0.542411
import typing import tensorflow as tf from tensorflow.keras import layers class MatchingLayer(layers.Layer): def __init__(self, normalize: bool = False, matching_type: str = 'dot', **kwargs): super().__init__(**kwargs) self._normalize = normalize self._validate_matching_...
true
true
f708ef89a08aef7d612c148ff2981aa853e4aef5
3,386
py
Python
test/noise.py
738844605/DualResidualNetworks
6d025e074d4c914fae86f51cd8b93569a2c05335
[ "MIT" ]
144
2019-04-08T02:22:00.000Z
2022-02-13T09:11:33.000Z
test/noise.py
738844605/DualResidualNetworks
6d025e074d4c914fae86f51cd8b93569a2c05335
[ "MIT" ]
14
2019-05-09T09:07:08.000Z
2020-07-20T15:45:41.000Z
test/noise.py
738844605/DualResidualNetworks
6d025e074d4c914fae86f51cd8b93569a2c05335
[ "MIT" ]
27
2019-07-19T03:09:20.000Z
2021-12-13T07:48:57.000Z
# python 2.7, pytorch 0.3.1 import os, sys sys.path.insert(1, '../') import torch import cv2 import shutil import torchvision import numpy as np import itertools import subprocess import random import matplotlib.pyplot as plt import torch.nn as nn import torch.optim as optim import torchvision.transforms as transform...
33.196078
94
0.66775
import os, sys sys.path.insert(1, '../') import torch import cv2 import shutil import torchvision import numpy as np import itertools import subprocess import random import matplotlib.pyplot as plt import torch.nn as nn import torch.optim as optim import torchvision.transforms as transforms import torch.nn.functiona...
true
true
f708f0c7bbe3d285c8aedcc6394fd2a3abb0e815
5,624
py
Python
main.py
sayabiws/simple-image-recommender
27162c544fc08b5774049039694f0fa7c7faac3f
[ "MIT" ]
null
null
null
main.py
sayabiws/simple-image-recommender
27162c544fc08b5774049039694f0fa7c7faac3f
[ "MIT" ]
null
null
null
main.py
sayabiws/simple-image-recommender
27162c544fc08b5774049039694f0fa7c7faac3f
[ "MIT" ]
null
null
null
# Simple image recommender # # required: # data/images: a folder containing your images dataset # data/users: can be empty, but the folder needs to exist (for now ?) # # optional: # data/tags.csv: a comma-separated list containing the names of your # images and the corresponding semicolon-separated tags # (eg. "37.pn...
29.914894
127
0.707681
from PIL import Image from sklearn.cluster import MiniBatchKMeans from operator import itemgetter import pandas from sklearn.ensemble import RandomForestClassifier import numpy as np import pandas as pd import json import math import os import json import csv def user_data_gathering(): name = input("Ple...
true
true
f708f23f4476ea85a0d78e7a4200c72925111a1e
3,509
py
Python
tensorflow/python/pywrap_tensorflow.py
Nickmeagan70/tensorflow
6bfedde8466daced9f40a0e11840f5ce274abc7d
[ "Apache-2.0" ]
7
2022-03-04T21:14:47.000Z
2022-03-22T23:07:39.000Z
tensorflow/python/pywrap_tensorflow.py
Nickmeagan70/tensorflow
6bfedde8466daced9f40a0e11840f5ce274abc7d
[ "Apache-2.0" ]
1
2022-03-08T18:28:46.000Z
2022-03-08T18:37:20.000Z
tensorflow/python/pywrap_tensorflow.py
Nickmeagan70/tensorflow
6bfedde8466daced9f40a0e11840f5ce274abc7d
[ "Apache-2.0" ]
1
2022-03-22T00:45:15.000Z
2022-03-22T00:45:15.000Z
# Copyright 2020 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...
40.333333
95
0.756341
import ctypes import sys import traceback from tensorflow.python.platform import self_check self_check.preload_check() try: from tensorflow.python import pywrap_dlopen_global_flags _use_dlopen_global_flags = True except ImportError: _use_dlopen_global_flags = False _can_set_rtld_lo...
true
true
f708f2f0b553930c894e78d06a8b5edf7efb032f
6,398
py
Python
src/scipp/plotting/tools.py
nvaytet/scipp
f14f56ed19cccb4162d55b1123df7225eeedb395
[ "BSD-3-Clause" ]
43
2019-04-08T14:13:11.000Z
2022-02-08T06:09:35.000Z
src/scipp/plotting/tools.py
nvaytet/scipp
f14f56ed19cccb4162d55b1123df7225eeedb395
[ "BSD-3-Clause" ]
1,342
2019-03-30T07:06:08.000Z
2022-03-28T13:12:47.000Z
src/scipp/plotting/tools.py
nvaytet/scipp
f14f56ed19cccb4162d55b1123df7225eeedb395
[ "BSD-3-Clause" ]
12
2019-06-13T08:56:12.000Z
2021-11-04T08:24:18.000Z
# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2021 Scipp contributors (https://github.com/scipp) # @author Neil Vaytet from .. import config from ..core import concatenate, values, dtype, units, nanmin, nanmax, histogram, \ full_like from ..core import Variable, DataArray from ..core import abs as ab...
31.058252
82
0.586902
from .. import config from ..core import concatenate, values, dtype, units, nanmin, nanmax, histogram, \ full_like from ..core import Variable, DataArray from ..core import abs as abs_ import numpy as np from copy import copy import io def get_line_param(name=None, index=None): param = getattr(config....
true
true
f708f31fda5291b510a4b006df811bd66c465bd9
85,439
bzl
Python
tensorflow/tensorflow.bzl
ShaunHeNJU/DeepRec-1
e280fb19de179f03dc05e1d8e3f4f7459796d96e
[ "Apache-2.0" ]
1
2021-12-24T06:04:16.000Z
2021-12-24T06:04:16.000Z
tensorflow/tensorflow.bzl
ShaunHeNJU/DeepRec-1
e280fb19de179f03dc05e1d8e3f4f7459796d96e
[ "Apache-2.0" ]
null
null
null
tensorflow/tensorflow.bzl
ShaunHeNJU/DeepRec-1
e280fb19de179f03dc05e1d8e3f4f7459796d96e
[ "Apache-2.0" ]
1
2022-02-28T08:28:25.000Z
2022-02-28T08:28:25.000Z
# -*- Python -*- # Return the options to use for a C++ library or binary build. # Uses the ":optmode" config_setting to pick the options. load( "//tensorflow/core/platform:default/build_config_root.bzl", "if_dynamic_kernels", "if_static", "tf_additional_grpc_deps_py", "tf_additional_xla_deps_py", ...
33.180194
310
0.588373
load( "//tensorflow/core/platform:default/build_config_root.bzl", "if_dynamic_kernels", "if_static", "tf_additional_grpc_deps_py", "tf_additional_xla_deps_py", "tf_cuda_tests_tags", "tf_exec_compatible_with", "tf_gpu_tests_tags", "tf_sycl_tests_tags", ) load( "@local_config_t...
true
true
f708f38157a3bbf5a76937de0696b8f45e77f048
5,275
py
Python
controllers/assessments.py
dgerod/cb4oru
b5fb3bd52193ab21b30b6917232a799ac41b6c32
[ "Apache-2.0" ]
1
2018-01-22T20:23:27.000Z
2018-01-22T20:23:27.000Z
controllers/assessments.py
dgerod/cb4oru
b5fb3bd52193ab21b30b6917232a799ac41b6c32
[ "Apache-2.0" ]
null
null
null
controllers/assessments.py
dgerod/cb4oru
b5fb3bd52193ab21b30b6917232a799ac41b6c32
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
36.631944
79
0.676209
__author__ = 'pgbovine@google.com (Philip Guo)' import datetime import json from models import models from models import utils from models.models import Student from models.models import StudentAnswersEntity from utils import BaseHandler from google.appengine.ext import db def store_score(student, ass...
true
true
f708f4f7a69c96ae81bce8dac525d2845164097e
1,608
py
Python
modules/party/forms.py
BurraAbhishek/VirtualElections_v2
db95f58d09ee5ed9755a3910aebcbfb48302b04e
[ "Apache-2.0" ]
1
2022-01-30T19:55:47.000Z
2022-01-30T19:55:47.000Z
modules/party/forms.py
BurraAbhishek/VirtualElections_v2
db95f58d09ee5ed9755a3910aebcbfb48302b04e
[ "Apache-2.0" ]
null
null
null
modules/party/forms.py
BurraAbhishek/VirtualElections_v2
db95f58d09ee5ed9755a3910aebcbfb48302b04e
[ "Apache-2.0" ]
null
null
null
from django import forms from django.forms.widgets import PasswordInput from modules.common.id_choicefield import IdentificationField class PartyForm(forms.Form): error_messages = { 'password_mismatch': ( 'The confirmation was different from that you chose.' ), } party_name =...
24.738462
73
0.643657
from django import forms from django.forms.widgets import PasswordInput from modules.common.id_choicefield import IdentificationField class PartyForm(forms.Form): error_messages = { 'password_mismatch': ( 'The confirmation was different from that you chose.' ), } party_name =...
true
true
f708f5aace0d5437314d23389d4db32b009a8935
8,265
py
Python
horizon/workflows/views.py
Hodorable/0602
3b1e4cb7458e4f456bfebc52fc2902205c36cc15
[ "Apache-2.0" ]
1
2019-09-11T11:56:19.000Z
2019-09-11T11:56:19.000Z
tools/dockerize/webportal/usr/lib/python2.7/site-packages/horizon/workflows/views.py
foruy/openflow-multiopenstack
74140b041ac25ed83898ff3998e8dcbed35572bb
[ "Apache-2.0" ]
null
null
null
tools/dockerize/webportal/usr/lib/python2.7/site-packages/horizon/workflows/views.py
foruy/openflow-multiopenstack
74140b041ac25ed83898ff3998e8dcbed35572bb
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
38.44186
79
0.632184
import copy import json from django import forms from django import http from django import shortcuts from django.views import generic import six from horizon import exceptions from horizon.forms import views as hz_views from horizon.forms.views import ADD_TO_FIELD_HEADER from horizon import messages...
true
true
f708f675d7c4e19130ddf6f100485d7b50c26946
711
py
Python
PygFW/Builtin/Events/EntityClickEvent.py
shauncameron/PygFW
970541d0c3fc6e1f306fe527d90834a620694804
[ "MIT" ]
null
null
null
PygFW/Builtin/Events/EntityClickEvent.py
shauncameron/PygFW
970541d0c3fc6e1f306fe527d90834a620694804
[ "MIT" ]
4
2021-04-15T00:12:14.000Z
2021-04-18T20:46:09.000Z
build/lib/PygFW/Builtin/Events/EntityClickEvent.py
shauncameron/PygFW
970541d0c3fc6e1f306fe527d90834a620694804
[ "MIT" ]
null
null
null
from PygFW import Event import pygame class EntityClickEvent(Event): def __init__(self, scene_surface): Event.__init__(self, scene_surface, pygame.MOUSEBUTTONDOWN) def executor(self, scene, event): for entity in scene.entities._list_: if entity.clickable: if en...
21.545455
67
0.651195
from PygFW import Event import pygame class EntityClickEvent(Event): def __init__(self, scene_surface): Event.__init__(self, scene_surface, pygame.MOUSEBUTTONDOWN) def executor(self, scene, event): for entity in scene.entities._list_: if entity.clickable: if en...
true
true
f708f82a32b1ca8094a66b729c31827022f652e8
1,690
py
Python
examples/wait_terminated.py
gridengine/drmaa2-python
36e84e8dc0079c9e3d772c1536f07ecb1e435684
[ "Apache-2.0" ]
10
2019-05-28T23:17:39.000Z
2022-01-14T08:52:54.000Z
examples/wait_terminated.py
iamh2o/drmaa2-python
36e84e8dc0079c9e3d772c1536f07ecb1e435684
[ "Apache-2.0" ]
5
2019-11-01T10:50:19.000Z
2021-12-13T11:56:19.000Z
examples/wait_terminated.py
iamh2o/drmaa2-python
36e84e8dc0079c9e3d772c1536f07ecb1e435684
[ "Apache-2.0" ]
2
2019-02-26T16:36:07.000Z
2019-10-29T02:02:06.000Z
#!/usr/bin/env python # ___INFO__MARK_BEGIN__ ####################################################################################### # Copyright 2008-2021 Univa Corporation (acquired and owned by Altair Engineering Inc.) # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file exc...
38.409091
87
0.623669
true
true
f708f85ee111c98d70db5adf69d738fcf803c184
1,991
py
Python
tensorflow/predict.py
alishameli/CS231n-Sample-Code-1
e47e593026c80530f7c387c4feca24f88c1618a2
[ "BSD-2-Clause" ]
null
null
null
tensorflow/predict.py
alishameli/CS231n-Sample-Code-1
e47e593026c80530f7c387c4feca24f88c1618a2
[ "BSD-2-Clause" ]
null
null
null
tensorflow/predict.py
alishameli/CS231n-Sample-Code-1
e47e593026c80530f7c387c4feca24f88c1618a2
[ "BSD-2-Clause" ]
null
null
null
import argparse import os import numpy as np import tensorflow as tf from matplotlib import pyplot as plt from PIL import Image import models def predict(model_data_path, image_path): # Default input size height = 228 width = 304 channels = 3 batch_size = 1 # Read image img = Image.o...
25.857143
82
0.616775
import argparse import os import numpy as np import tensorflow as tf from matplotlib import pyplot as plt from PIL import Image import models def predict(model_data_path, image_path): height = 228 width = 304 channels = 3 batch_size = 1 img = Image.open(image_path) img = img.re...
true
true
f708f8c29a2b935211377999a17a11f8c119f77c
168
py
Python
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingAverage_Seasonal_DayOfMonth_LSTM.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingAverage_Seasonal_DayOfMonth_LSTM.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingAverage_Seasonal_DayOfMonth_LSTM.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['MovingAverage'] , ['Seasonal_DayOfMonth'] , ['LSTM'] );
42
90
0.761905
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['MovingAverage'] , ['Seasonal_DayOfMonth'] , ['LSTM'] );
true
true
f708f8e5cdfa0014f95318bafc336ec46675c827
12,690
py
Python
src/hpc/autoscale/job/demandprinter.py
hmeiland/cyclecloud-scalelib
f246737ddea631c7378d716a51431857eb6b06b3
[ "MIT" ]
null
null
null
src/hpc/autoscale/job/demandprinter.py
hmeiland/cyclecloud-scalelib
f246737ddea631c7378d716a51431857eb6b06b3
[ "MIT" ]
null
null
null
src/hpc/autoscale/job/demandprinter.py
hmeiland/cyclecloud-scalelib
f246737ddea631c7378d716a51431857eb6b06b3
[ "MIT" ]
null
null
null
import inspect import io import json import logging as logginglib import sys from datetime import datetime from typing import Any, Callable, Dict, List, Optional, Set, TextIO, Tuple from typing_extensions import Literal from hpc.autoscale import hpclogging as logging from hpc.autoscale.codeanalysis import hpcwrapclas...
33.660477
104
0.545469
import inspect import io import json import logging as logginglib import sys from datetime import datetime from typing import Any, Callable, Dict, List, Optional, Set, TextIO, Tuple from typing_extensions import Literal from hpc.autoscale import hpclogging as logging from hpc.autoscale.codeanalysis import hpcwrapclas...
true
true
f708f90566cd4035c61dccabe262ed5ac91bc040
418
py
Python
setup.py
sluedtke/borg_hydro
ef856784191e21e98e7fe8dd906c0dd9f82fd4ff
[ "MIT" ]
null
null
null
setup.py
sluedtke/borg_hydro
ef856784191e21e98e7fe8dd906c0dd9f82fd4ff
[ "MIT" ]
null
null
null
setup.py
sluedtke/borg_hydro
ef856784191e21e98e7fe8dd906c0dd9f82fd4ff
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('LICENSE') as f: license = f.read() setup( name='borg_hydro', version='0.1.0', author='Stefan Lüdtke', url='https://git.gfz-potsdam.de:sluedtke/borg_hydro.git', packages=find_packages(), license=license, in...
20.9
61
0.655502
from setuptools import setup, find_packages with open('LICENSE') as f: license = f.read() setup( name='borg_hydro', version='0.1.0', author='Stefan Lüdtke', url='https://git.gfz-potsdam.de:sluedtke/borg_hydro.git', packages=find_packages(), license=license, include_package_data=True...
true
true
f708f90948cf6c550c9741e8d27b736df78d0e44
83,746
py
Python
evennia/objects/objects.py
zeitkunst/evennia
1f254b2542fbefe400c114b3d7029522cdcb37b7
[ "BSD-3-Clause" ]
null
null
null
evennia/objects/objects.py
zeitkunst/evennia
1f254b2542fbefe400c114b3d7029522cdcb37b7
[ "BSD-3-Clause" ]
null
null
null
evennia/objects/objects.py
zeitkunst/evennia
1f254b2542fbefe400c114b3d7029522cdcb37b7
[ "BSD-3-Clause" ]
null
null
null
""" This module defines the basic `DefaultObject` and its children `DefaultCharacter`, `DefaultAccount`, `DefaultRoom` and `DefaultExit`. These are the (default) starting points for all in-game visible entities. """ import time import inflect from builtins import object from future.utils import with_metaclass from col...
39.042424
117
0.5889
import time import inflect from builtins import object from future.utils import with_metaclass from collections import defaultdict from django.conf import settings from evennia.typeclasses.models import TypeclassBase from evennia.typeclasses.attributes import NickHandler from evennia.objects.manager import ObjectMana...
true
true
f708f96bbfaa16617380f5df256668d0302deda9
204
py
Python
pickeats/admin.py
PatrickKan/PickEats
9d82a5fc1dfd0d329bf16f7fc60f1c3e7e676d53
[ "MIT" ]
1
2020-05-03T04:28:57.000Z
2020-05-03T04:28:57.000Z
pickeats/admin.py
PatrickKan/PickEats
9d82a5fc1dfd0d329bf16f7fc60f1c3e7e676d53
[ "MIT" ]
null
null
null
pickeats/admin.py
PatrickKan/PickEats
9d82a5fc1dfd0d329bf16f7fc60f1c3e7e676d53
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Preference, Profile, Allergy, Goal admin.site.register(Preference) admin.site.register(Profile) admin.site.register(Allergy) admin.site.register(Goal)
29.142857
54
0.823529
from django.contrib import admin from .models import Preference, Profile, Allergy, Goal admin.site.register(Preference) admin.site.register(Profile) admin.site.register(Allergy) admin.site.register(Goal)
true
true
f708f9c9fe0eba5341025819686777bb36f2107c
1,440
py
Python
contents/serializers.py
omaralbeik/omaralbeik.com-api
03ce663fe2b3c52363520437d0f5b09cfcb121db
[ "MIT" ]
null
null
null
contents/serializers.py
omaralbeik/omaralbeik.com-api
03ce663fe2b3c52363520437d0f5b09cfcb121db
[ "MIT" ]
1
2018-04-05T13:44:13.000Z
2018-04-05T14:45:32.000Z
contents/serializers.py
omaralbeik/omaralbeik.com-api
03ce663fe2b3c52363520437d0f5b09cfcb121db
[ "MIT" ]
null
null
null
from rest_framework import serializers import markdown2 from .models import Content from omaralbeik import server_variables as sv class ContentSerializer(serializers.ModelSerializer): tags = serializers.SerializerMethodField() html_text = serializers.SerializerMethodField() website_url = serializers.Seria...
28.8
77
0.596528
from rest_framework import serializers import markdown2 from .models import Content from omaralbeik import server_variables as sv class ContentSerializer(serializers.ModelSerializer): tags = serializers.SerializerMethodField() html_text = serializers.SerializerMethodField() website_url = serializers.Seria...
true
true
f708fae5236a29c52f4f67d0421e7b9ff03707cb
3,962
py
Python
Scripts/GenCode_Explore_106.py
ShepherdCode/Soars2021
ab4f304eaa09e52d260152397a6c53d7a05457da
[ "MIT" ]
1
2021-08-16T14:49:04.000Z
2021-08-16T14:49:04.000Z
Scripts/GenCode_Explore_106.py
ShepherdCode/Soars2021
ab4f304eaa09e52d260152397a6c53d7a05457da
[ "MIT" ]
null
null
null
Scripts/GenCode_Explore_106.py
ShepherdCode/Soars2021
ab4f304eaa09e52d260152397a6c53d7a05457da
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # GenCode Explore # # Explore the human RNA sequences from GenCode. # # Assume user downloaded files from GenCode 38 [FTP](http://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_38/) # to a subdirectory called data. # # Move the GenCodeLoader class to its own python...
25.895425
122
0.702171
t time def show_time(): t = time.time() s = time.strftime('%Y-%m-%d %H:%M:%S %Z', time.localtime(t)) print(s) show_time() import numpy as np import pandas as pd import sys try: from google.colab import drive IN_COLAB = True print("On Google CoLab, mount cloud-local file, get our code f...
true
true
f708fb900227794707bf957d23d33551a3309da5
896
py
Python
python/mxnet/gluon/contrib/__init__.py
Vikas-kum/incubator-mxnet
ba02bf2fe2da423caa59ddb3fd5e433b90b730bf
[ "Apache-2.0" ]
64
2021-05-02T14:42:34.000Z
2021-05-06T01:35:03.000Z
python/mxnet/gluon/contrib/__init__.py
Vikas-kum/incubator-mxnet
ba02bf2fe2da423caa59ddb3fd5e433b90b730bf
[ "Apache-2.0" ]
187
2018-03-16T23:44:43.000Z
2021-12-14T21:19:54.000Z
python/mxnet/gluon/contrib/__init__.py
Vikas-kum/incubator-mxnet
ba02bf2fe2da423caa59ddb3fd5e433b90b730bf
[ "Apache-2.0" ]
51
2019-07-12T05:10:25.000Z
2021-07-28T16:19:06.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
34.461538
62
0.761161
from . import nn from . import rnn from . import data
true
true
f708fca358a07d2554ea49c3a9e960e30af22afa
4,693
py
Python
spektral/datasets/delaunay.py
dbusbridge/spektral
83eaa381a263d0a217692b6f1018388946e85c45
[ "MIT" ]
1
2020-06-25T03:29:30.000Z
2020-06-25T03:29:30.000Z
spektral/datasets/delaunay.py
kprzybylapara/pylint
a95807603c2bb96c80f34d326f663273c72ca3fc
[ "MIT" ]
null
null
null
spektral/datasets/delaunay.py
kprzybylapara/pylint
a95807603c2bb96c80f34d326f663273c72ca3fc
[ "MIT" ]
null
null
null
from __future__ import absolute_import import numpy as np from scipy.spatial import Delaunay from spektral.utils import label_to_one_hot, numpy_to_nx RETURN_TYPES = {'numpy', 'networkx'} MAX_K = 7 # Maximum number of nodes in a graph def generate_data(return_type='networkx', classes=0, n_samples_in_class=1000, ...
39.436975
86
0.644364
from __future__ import absolute_import import numpy as np from scipy.spatial import Delaunay from spektral.utils import label_to_one_hot, numpy_to_nx RETURN_TYPES = {'numpy', 'networkx'} MAX_K = 7 def generate_data(return_type='networkx', classes=0, n_samples_in_class=1000, n_nodes=7, support_l...
true
true
f708fe9ca7fe20dd9c734aeeb55a3dff1eb26bab
12,442
py
Python
.tox/scenario/lib/python2.7/site-packages/testrepository/ui/cli.py
bdrich/neutron-lbaas
b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd
[ "Apache-2.0" ]
null
null
null
.tox/scenario/lib/python2.7/site-packages/testrepository/ui/cli.py
bdrich/neutron-lbaas
b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd
[ "Apache-2.0" ]
null
null
null
.tox/scenario/lib/python2.7/site-packages/testrepository/ui/cli.py
bdrich/neutron-lbaas
b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd
[ "Apache-2.0" ]
1
2020-07-21T02:18:23.000Z
2020-07-21T02:18:23.000Z
# # Copyright (c) 2009 Testrepository Contributors # # Licensed under either the Apache License, Version 2.0 or the BSD 3-clause # license at the users choice. A copy of both licenses are available in the # project source as Apache-2.0 and BSD. You may not use this file except in # compliance with one of these two lice...
39.003135
80
0.578364
import io import os import signal import subunit import sys from extras import try_import v2_avail = try_import('subunit.ByteStreamToStreamResult') import testtools from testtools import ExtendedToStreamDecorator, StreamToExtendedDecorator from testtools.compat import unicode_output_stream, _u from tes...
true
true
f708ff0c051d3ee67c01661715510a72136a41d7
2,372
py
Python
TWLight/users/migrations/0076_auto_20210624_1015.py
aacaldwell/TWLight
68e6d0d81ddd52596025f15d2c9a75dcdf504734
[ "MIT" ]
67
2017-12-14T22:27:48.000Z
2022-03-13T18:21:31.000Z
TWLight/users/migrations/0076_auto_20210624_1015.py
aacaldwell/TWLight
68e6d0d81ddd52596025f15d2c9a75dcdf504734
[ "MIT" ]
433
2017-03-24T22:51:23.000Z
2022-03-31T19:36:22.000Z
TWLight/users/migrations/0076_auto_20210624_1015.py
Mahuton/TWLight
90b299d07b0479f21dc90e17b8d05f5a221b0de1
[ "MIT" ]
105
2017-06-23T03:53:41.000Z
2022-03-30T17:24:29.000Z
# Generated by Django 3.1.12 on 2021-06-24 10:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("users", "0075_auto_20210607_1312"), ] operations = [ migrations.AlterField( model_name="userprofile", name="lang", ...
33.408451
53
0.29511
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("users", "0075_auto_20210607_1312"), ] operations = [ migrations.AlterField( model_name="userprofile", name="lang", field=models.CharField( ...
true
true
f708ff486b81166cc40bc29b8b4461414fe460e6
5,443
py
Python
samples/snippets/conftest.py
LaudateCorpus1/python-bigquery-datatransfer
babbaf7c6d4bb0c7485eb077b90303d99b32da30
[ "Apache-2.0" ]
58
2020-03-05T16:06:45.000Z
2022-03-28T18:20:46.000Z
samples/snippets/conftest.py
LaudateCorpus1/python-bigquery-datatransfer
babbaf7c6d4bb0c7485eb077b90303d99b32da30
[ "Apache-2.0" ]
120
2020-02-05T09:56:10.000Z
2022-03-23T00:19:09.000Z
samples/snippets/conftest.py
LaudateCorpus1/python-bigquery-datatransfer
babbaf7c6d4bb0c7485eb077b90303d99b32da30
[ "Apache-2.0" ]
21
2020-02-05T23:11:23.000Z
2022-01-29T08:07:36.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
34.01875
88
0.756752
import datetime import os import random import uuid from google.api_core import client_options import google.api_core.exceptions import google.auth from google.cloud import bigquery from google.cloud import bigquery_datatransfer from google.cloud import pubsub_v1 import pytest RESOURCE_PREFIX = "python...
true
true
f708ff6f7bc2862d008b44cf3e33e780b4f3c6fa
6,442
py
Python
pypeit/scripts/flux_setup.py
finagle29/PypeIt
418d6d24d24054ad590d2f06c0b4688ea18f492e
[ "BSD-3-Clause" ]
null
null
null
pypeit/scripts/flux_setup.py
finagle29/PypeIt
418d6d24d24054ad590d2f06c0b4688ea18f492e
[ "BSD-3-Clause" ]
null
null
null
pypeit/scripts/flux_setup.py
finagle29/PypeIt
418d6d24d24054ad590d2f06c0b4688ea18f492e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import argparse import os,time import numpy as np from astropy.io import fits from astropy.table import Table from pypeit import msgs from pypeit.par.util import make_pypeit_file class SmartFormatter(argparse.HelpFormatter): def _split_lines(self, text, width): if text.startswith('R...
44.427586
127
0.586153
import argparse import os,time import numpy as np from astropy.io import fits from astropy.table import Table from pypeit import msgs from pypeit.par.util import make_pypeit_file class SmartFormatter(argparse.HelpFormatter): def _split_lines(self, text, width): if text.startswith('R|'): retu...
true
true
f70900170d8c9fcf57f9fec29511f5b14e33da5a
8,192
py
Python
doc/source/conf.py
bswartz/cinder
6cfecade9e2ee86bbb7d95c3c401c9e4c70f6a96
[ "Apache-2.0" ]
null
null
null
doc/source/conf.py
bswartz/cinder
6cfecade9e2ee86bbb7d95c3c401c9e4c70f6a96
[ "Apache-2.0" ]
null
null
null
doc/source/conf.py
bswartz/cinder
6cfecade9e2ee86bbb7d95c3c401c9e4c70f6a96
[ "Apache-2.0" ]
null
null
null
# cinder documentation build configuration file, created by # sphinx-quickstart on Sat May 1 15:17:47 2010. # # This file is execfile()d with the current directory set # to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values hav...
32.63745
81
0.708252
import os import subprocess import sys import warnings sys.path.insert(0, os.path.abspath('../../')) sys.path.insert(0, os.path.abspath('../')) sys.path.insert(0, os.path.abspath('./')) extensions = ['sphinx.ext.autodoc', 'ext.cinder_todo', 'sphinx.ext.coverage', ...
true
true
f70900c8f30868cb2768c4bd7aab9e34ca82c6c6
3,322
py
Python
Agrus/settings.py
GlugovGrGlib/CtrlStorageApp
0da23c2d5e6d565ffecaa75e1deb47a789a37ff1
[ "MIT" ]
null
null
null
Agrus/settings.py
GlugovGrGlib/CtrlStorageApp
0da23c2d5e6d565ffecaa75e1deb47a789a37ff1
[ "MIT" ]
null
null
null
Agrus/settings.py
GlugovGrGlib/CtrlStorageApp
0da23c2d5e6d565ffecaa75e1deb47a789a37ff1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Django settings for Agrus project. Generated by 'django-admin startproject' using Django 1.11.1. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/se...
25.166667
91
0.681818
from pytz import timezone import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'gz6=&2*879yuym!pf(d8kch*30ow*eh=ybb-f0qsg+%c4+$@3c' DEBUG = True ALLOWED_HOSTS = ['*'] # Application definition INSTALLED_APPS = [ 'Agrus', 'kurs', 'django.contrib.admin', ...
true
true
f70901151625154350ab62aebeb639896e2c320e
975
py
Python
awards/urls.py
yareyaska/awwards
e9ccae3ea2fd9b36a6d6d0c3933de121ef5bf5ed
[ "MIT" ]
null
null
null
awards/urls.py
yareyaska/awwards
e9ccae3ea2fd9b36a6d6d0c3933de121ef5bf5ed
[ "MIT" ]
5
2020-06-05T22:47:45.000Z
2021-09-08T01:16:30.000Z
awards/urls.py
yareyaska/awwards
e9ccae3ea2fd9b36a6d6d0c3933de121ef5bf5ed
[ "MIT" ]
null
null
null
"""awards URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
37.5
79
0.692308
from django.conf.urls import url,include from django.contrib import admin from django.contrib.auth import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^',include('award.urls')), url(r'^accounts/', include('registration.backends.simple.urls')), url(r'^logout/$', views.logout, {"next_pa...
true
true
f70901607d092422ea629b22f328383db82a6532
1,384
py
Python
library/aiohttp/__init__.py
RouganStriker/BDOBot
51fddfab4c06c8593d1d63543285fdf32b26c4f8
[ "MIT" ]
5
2019-06-10T10:42:22.000Z
2019-07-10T14:05:13.000Z
library/aiohttp/__init__.py
RouganStriker/BDOBot
51fddfab4c06c8593d1d63543285fdf32b26c4f8
[ "MIT" ]
3
2018-08-29T01:15:46.000Z
2018-08-29T15:12:38.000Z
library/aiohttp/__init__.py
RouganStriker/BDOBot
51fddfab4c06c8593d1d63543285fdf32b26c4f8
[ "MIT" ]
2
2018-08-30T14:36:20.000Z
2019-06-17T13:07:18.000Z
__version__ = '1.0.5' # Deprecated, keep it here for a while for backward compatibility. import multidict # noqa # This relies on each of the submodules having an __all__ variable. from multidict import * # noqa from . import hdrs # noqa from .protocol import * # noqa from .connector import * # noqa from .clien...
32.952381
79
0.657514
__version__ = '1.0.5' import multidict from multidict import * from . import hdrs from .protocol import * from .connector import * from .client import * from .client_reqrep import * from .errors import * from .helpers import * from .parsers import * from .streams import * from .multipart impo...
true
true
f7090240b3aff921b5983ce0da0f77c0d2b72c2b
311
py
Python
python/p153.py
forewing/lc
314468a1a3bb7d38eccf1f34b0d1b7da04a34784
[ "CC0-1.0" ]
null
null
null
python/p153.py
forewing/lc
314468a1a3bb7d38eccf1f34b0d1b7da04a34784
[ "CC0-1.0" ]
null
null
null
python/p153.py
forewing/lc
314468a1a3bb7d38eccf1f34b0d1b7da04a34784
[ "CC0-1.0" ]
null
null
null
class Solution: def findMin(self, nums: List[int]) -> int: l = 0 r = len(nums) - 1 while r - l > 3: m = (l + r) // 2 if nums[m] > nums[l] and nums[m] > nums[r]: l = m + 1 else: r = m return min(nums[l:r+1])
25.916667
55
0.366559
class Solution: def findMin(self, nums: List[int]) -> int: l = 0 r = len(nums) - 1 while r - l > 3: m = (l + r) // 2 if nums[m] > nums[l] and nums[m] > nums[r]: l = m + 1 else: r = m return min(nums[l:r+1])
true
true
f709056acf3cbbb016b307580078e37cb63de811
5,247
py
Python
lib/django-1.4/django/contrib/gis/admin/options.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
AppServer/lib/django-1.4/django/contrib/gis/admin/options.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
AppServer/lib/django-1.4/django/contrib/gis/admin/options.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
from django.contrib.admin import ModelAdmin from django.contrib.gis.admin.widgets import OpenLayersWidget from django.contrib.gis.gdal import OGRGeomType from django.contrib.gis.db import models class GeoModelAdmin(ModelAdmin): """ The administration options class for Geographic models. Map settings may be...
40.361538
117
0.593673
from django.contrib.admin import ModelAdmin from django.contrib.gis.admin.widgets import OpenLayersWidget from django.contrib.gis.gdal import OGRGeomType from django.contrib.gis.db import models class GeoModelAdmin(ModelAdmin): default_lon = 0 default_lat = 0 default_zoom = 4 display_wkt = Fa...
true
true
f709057a2d026d1629ccdc2f418c49b8caa8ddab
21,226
py
Python
sdk/python/pulumi_aws/imagebuilder/distribution_configuration.py
RafalSumislawski/pulumi-aws
7c8a335d327c173aa32c8b3d98816e760db329fa
[ "ECL-2.0", "Apache-2.0" ]
1
2021-11-10T16:33:40.000Z
2021-11-10T16:33:40.000Z
sdk/python/pulumi_aws/imagebuilder/distribution_configuration.py
RafalSumislawski/pulumi-aws
7c8a335d327c173aa32c8b3d98816e760db329fa
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/imagebuilder/distribution_configuration.py
RafalSumislawski/pulumi-aws
7c8a335d327c173aa32c8b3d98816e760db329fa
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# 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 warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
46.143478
284
0.664751
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * __all__ = ['DistributionConfigurationArgs', 'DistributionConfiguration'] @pulumi.input_type class DistributionConfiguratio...
true
true
f70906aedaf542b287443373bffe8401a5d3591e
882
py
Python
pyx12/map_override.py
arenius/pyx12
537493deaa0b8e18a3fa72eb1b3eeae9ef043b11
[ "BSD-3-Clause" ]
120
2015-01-30T07:17:26.000Z
2022-03-25T16:42:15.000Z
pyx12/map_override.py
arenius/pyx12
537493deaa0b8e18a3fa72eb1b3eeae9ef043b11
[ "BSD-3-Clause" ]
43
2015-02-12T18:42:26.000Z
2021-12-12T22:22:20.000Z
pyx12/map_override.py
arenius/pyx12
537493deaa0b8e18a3fa72eb1b3eeae9ef043b11
[ "BSD-3-Clause" ]
85
2015-02-12T16:44:28.000Z
2022-03-24T20:20:46.000Z
###################################################################### # Copyright # John Holland <john@zoner.org> # All rights reserved. # # This software is licensed as described in the file LICENSE.txt, which # you should have received as part of this distribution. # ##############################################...
25.941176
82
0.578231
true
true
f7090725fa81666eade7bf5f5d55c5e7ff18d8ce
3,586
bzl
Python
haskell/private/dependencies.bzl
joneshf/rules_haskell
77cf42c30a424f7e701c72c5feb31f49b5230351
[ "Apache-2.0" ]
null
null
null
haskell/private/dependencies.bzl
joneshf/rules_haskell
77cf42c30a424f7e701c72c5feb31f49b5230351
[ "Apache-2.0" ]
null
null
null
haskell/private/dependencies.bzl
joneshf/rules_haskell
77cf42c30a424f7e701c72c5feb31f49b5230351
[ "Apache-2.0" ]
null
null
null
load( "//haskell:providers.bzl", "HaskellInfo", "HaskellLibraryInfo", ) load(":private/set.bzl", "set") def gather_dep_info(ctx, deps): """Collapse dependencies into a single `HaskellInfo`. Args: ctx: Rule context. deps: deps attribute. Returns: HaskellInfo: Unified informat...
33.514019
103
0.617959
load( "//haskell:providers.bzl", "HaskellInfo", "HaskellLibraryInfo", ) load(":private/set.bzl", "set") def gather_dep_info(ctx, deps): package_databases = depset(transitive = [ dep[HaskellInfo].package_databases for dep in deps if HaskellInfo in dep ]) static_libraries...
true
true
f709097e17db2a904f99b4edcbc7bf034dbc3f63
2,118
py
Python
cvat/apps/engine/admin.py
netanelbarel/improvedCvat
ff2894d3b3757a5e080d3130d6875cfd14201bf5
[ "MIT" ]
null
null
null
cvat/apps/engine/admin.py
netanelbarel/improvedCvat
ff2894d3b3757a5e080d3130d6875cfd14201bf5
[ "MIT" ]
6
2020-03-25T11:49:12.000Z
2020-06-06T01:35:38.000Z
cvat/apps/engine/admin.py
netanelbarel/improvedCvat
ff2894d3b3757a5e080d3130d6875cfd14201bf5
[ "MIT" ]
1
2020-03-25T11:40:48.000Z
2020-03-25T11:40:48.000Z
# Copyright (C) 2018 Intel Corporation # # SPDX-License-Identifier: MIT from django.contrib import admin from .models import Task, Segment, Job, Label, AttributeSpec class JobInline(admin.TabularInline): model = Job can_delete = False # Don't show extra lines to add an object def has_ad...
27.506494
90
0.663362
from django.contrib import admin from .models import Task, Segment, Job, Label, AttributeSpec class JobInline(admin.TabularInline): model = Job can_delete = False def has_add_permission(self, request, object=None): return False class SegmentInline(admin.TabularInline): ...
true
true
f70909e149d95c858ea8bf08919cce01258289e8
24
py
Python
me/maurer/__init__.py
amaurer/alarmdecoder-implementation
9b090064fd23f20ec707a8d388dc910dd260621a
[ "Apache-2.0" ]
1
2018-03-08T04:25:31.000Z
2018-03-08T04:25:31.000Z
me/maurer/__init__.py
amaurer/alarmdecoder-implementation
9b090064fd23f20ec707a8d388dc910dd260621a
[ "Apache-2.0" ]
null
null
null
me/maurer/__init__.py
amaurer/alarmdecoder-implementation
9b090064fd23f20ec707a8d388dc910dd260621a
[ "Apache-2.0" ]
null
null
null
__all__ = ['ZoneMapper']
24
24
0.708333
__all__ = ['ZoneMapper']
true
true
f7090a9af584868b539a64c9c814074daf94e5d1
5,854
py
Python
python/dazl/model/core.py
DACH-NY/dazl-client
56c8b1be047415b2bcb35b6558de4a780a402458
[ "Apache-2.0" ]
null
null
null
python/dazl/model/core.py
DACH-NY/dazl-client
56c8b1be047415b2bcb35b6558de4a780a402458
[ "Apache-2.0" ]
null
null
null
python/dazl/model/core.py
DACH-NY/dazl-client
56c8b1be047415b2bcb35b6558de4a780a402458
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017-2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 """ This module has been relocated to ``dazl.client``, ``dazl.damlast``, ``dazl.protocols``, or ``dazl.query``. """ from typing import TYPE_CHECKING, TypeVar, Union import warnin...
33.261364
102
0.65972
from typing import TYPE_CHECKING, TypeVar, Union import warnings from ..client.errors import ConfigurationError, DazlPartyMissingError, UnknownTemplateWarning from ..client.state import ( ContractContextualData, ContractContextualDataCollection, ContractsHistoricalState, ContractsState, ) from ..dam...
true
true
f7090b2aa80fae95376267bfcca6f9bcf9a9ac8a
956
py
Python
hand_net/unet/unet_model.py
clearsky767/examples
d6c744061ba5ed56088af43edb171990c6942efd
[ "BSD-3-Clause" ]
null
null
null
hand_net/unet/unet_model.py
clearsky767/examples
d6c744061ba5ed56088af43edb171990c6942efd
[ "BSD-3-Clause" ]
null
null
null
hand_net/unet/unet_model.py
clearsky767/examples
d6c744061ba5ed56088af43edb171990c6942efd
[ "BSD-3-Clause" ]
null
null
null
# full assembly of the sub-parts to form the complete net import torch.nn.functional as F from .unet_parts import * class UNet(nn.Module): def __init__(self, n_channels, n_classes): super(UNet, self).__init__() self.inc = inconv(n_channels, 64) self.down1 = down(64, 128) self.down...
27.314286
57
0.535565
import torch.nn.functional as F from .unet_parts import * class UNet(nn.Module): def __init__(self, n_channels, n_classes): super(UNet, self).__init__() self.inc = inconv(n_channels, 64) self.down1 = down(64, 128) self.down2 = down(128, 256) self.down3 = down(256, 512) ...
true
true
f7090b86c5ae735d7f01c2e87f2bb1515113d44d
4,104
py
Python
adafruit_register/i2c_struct.py
jepler/Adafruit_CircuitPython_Register
9f86b5179936bcb81d9765de2fe25c140b42036f
[ "MIT" ]
1
2020-09-27T20:08:57.000Z
2020-09-27T20:08:57.000Z
adafruit_register/i2c_struct.py
jepler/Adafruit_CircuitPython_Register
9f86b5179936bcb81d9765de2fe25c140b42036f
[ "MIT" ]
null
null
null
adafruit_register/i2c_struct.py
jepler/Adafruit_CircuitPython_Register
9f86b5179936bcb81d9765de2fe25c140b42036f
[ "MIT" ]
null
null
null
# The MIT License (MIT) # # Copyright (c) 2016 Adafruit Industries # # 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, cop...
36.972973
84
0.711014
try: import struct except ImportError: import ustruct as struct __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Register.git" class Struct: def __init__(self, register_address, struct_format): self.format = struct_format ...
true
true
f7090cb598007accc88c9bed1656ea701bed8a44
2,682
py
Python
dbaas/physical/tests/test_commands.py
amintasvrp/database-as-a-service
8221df604f9252ddf877cd2216bdf1e3f76220ba
[ "BSD-3-Clause" ]
303
2015-01-08T10:35:54.000Z
2022-02-28T08:54:06.000Z
dbaas/physical/tests/test_commands.py
nouraellm/database-as-a-service
5e655c9347bea991b7218a01549f5e44f161d7be
[ "BSD-3-Clause" ]
124
2015-01-14T12:56:15.000Z
2022-03-22T20:45:11.000Z
dbaas/physical/tests/test_commands.py
nouraellm/database-as-a-service
5e655c9347bea991b7218a01549f5e44f161d7be
[ "BSD-3-Clause" ]
110
2015-01-02T11:59:48.000Z
2022-02-28T08:54:06.000Z
from unittest import TestCase from model_mommy import mommy from physical.commands import HostCommandOL6, HostCommandOL7 class CommandsBaseTestCase(object): OS_VERSION = '' HOST_COMMAND_CLASS = None EXPECTED_CMD_TMPL = '' def setUp(self): self.host = mommy.make( 'Host', ...
27.090909
72
0.58352
from unittest import TestCase from model_mommy import mommy from physical.commands import HostCommandOL6, HostCommandOL7 class CommandsBaseTestCase(object): OS_VERSION = '' HOST_COMMAND_CLASS = None EXPECTED_CMD_TMPL = '' def setUp(self): self.host = mommy.make( 'Host', ...
true
true
f7090d5e70f2d61e6c69b57be05d5e8ab3aee55e
3,566
py
Python
test/test_art_resize.py
atavakoulnia/beets
006d24c02e805bcabb4b99c7cf9945e3b109df15
[ "MIT" ]
1
2020-03-03T05:46:47.000Z
2020-03-03T05:46:47.000Z
test/test_art_resize.py
atavakoulnia/beets
006d24c02e805bcabb4b99c7cf9945e3b109df15
[ "MIT" ]
3
2020-07-12T01:22:23.000Z
2020-07-12T01:22:25.000Z
test/test_art_resize.py
atavakoulnia/beets
006d24c02e805bcabb4b99c7cf9945e3b109df15
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2020, David Swarbrick. # # 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 ...
32.126126
79
0.659563
from __future__ import division, absolute_import, print_function import unittest import os from test import _common from test.helper import TestHelper from beets.util import syspath from beets.util.artresizer import ( pil_resize, im_resize, get_im_version, get_pil_version, ) class A...
true
true
f7090d957aaa1b8c2a23b217a0554f11e14ef4db
6,740
py
Python
src/pacsanini/db/dcm2model.py
aachick/pacsanini
b54e4f222eede3c31b04373253e4de0b2c91217b
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
10
2021-07-05T16:59:03.000Z
2022-02-09T11:13:03.000Z
src/pacsanini/db/dcm2model.py
aachick/pacsanini
b54e4f222eede3c31b04373253e4de0b2c91217b
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
51
2021-07-05T08:29:35.000Z
2021-11-30T08:30:10.000Z
src/pacsanini/db/dcm2model.py
aachick/pacsanini
b54e4f222eede3c31b04373253e4de0b2c91217b
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
2
2021-07-06T06:35:37.000Z
2021-07-09T10:26:38.000Z
# Copyright (C) 2019-2020, Therapixel SA. # All rights reserved. # This file is subject to the terms and conditions described in the # LICENSE file distributed in this package. """The dcm2model module provides methods that can be used to convert pydicom.Dataset instances to sqlalchemy instances. """ from typing import ...
30.636364
86
0.586053
from typing import Tuple, Union from pydicom import Dataset, dcmread from pacsanini.convert import agestr2years, dcm2dict, str2datetime from pacsanini.db.models import Image, Patient, Series, Study, StudyFind from pacsanini.parse import DicomTagGroup def dcm2patient(dcm: Dataset, institution: str = None) -> Pat...
true
true
f7090e45c95d43db13aff7af0aef357d0ac5fadb
5,502
py
Python
interact/agents/ddpg/td3.py
rystrauss/interact
4fd8a5ffd2b712beb81bc43587745b29c715d754
[ "MIT" ]
1
2020-11-13T01:59:21.000Z
2020-11-13T01:59:21.000Z
interact/agents/ddpg/td3.py
rystrauss/interact
4fd8a5ffd2b712beb81bc43587745b29c715d754
[ "MIT" ]
2
2021-04-04T22:27:04.000Z
2021-05-21T17:35:32.000Z
interact/agents/ddpg/td3.py
rystrauss/interact
4fd8a5ffd2b712beb81bc43587745b29c715d754
[ "MIT" ]
null
null
null
from typing import Callable, Optional import gin import gym from interact.agents.ddpg.ddpg import DDPGAgent from interact.agents.utils import register @gin.configurable(name_or_fn="td3", denylist=["env_fn"]) @register("td3") class TD3Agent(DDPGAgent): """The Twin Delayed DDPG (TD3) algorithm. This algorith...
42.651163
87
0.65667
from typing import Callable, Optional import gin import gym from interact.agents.ddpg.ddpg import DDPGAgent from interact.agents.utils import register @gin.configurable(name_or_fn="td3", denylist=["env_fn"]) @register("td3") class TD3Agent(DDPGAgent): def __init__( self, env_fn: Callable[[], gy...
true
true
f7090e9c13d03314f33aa0f682190043f9d895fc
4,679
py
Python
Util/Latex_generator.py
LamannaLeonardo/OLAM
7a6611912ebb40d39a934dd454efec4cbb7913d3
[ "MIT" ]
null
null
null
Util/Latex_generator.py
LamannaLeonardo/OLAM
7a6611912ebb40d39a934dd454efec4cbb7913d3
[ "MIT" ]
null
null
null
Util/Latex_generator.py
LamannaLeonardo/OLAM
7a6611912ebb40d39a934dd454efec4cbb7913d3
[ "MIT" ]
null
null
null
# Copyright (c) 2022, Leonardo Lamanna # All rights reserved. # This source code is licensed under the MIT-style license found in the # LICENSE file in the root directory of this source tree. import pandas as pd import os pd.options.display.max_colwidth = 100 def generate_latex_table(data_file, labels, tab_name, ca...
40.686957
119
0.593075
import pandas as pd import os pd.options.display.max_colwidth = 100 def generate_latex_table(data_file, labels, tab_name, caption, header): with open(tab_name + ".tex", "w") as f: df = pd.read_excel(data_file, sheet_name="Summary") df_restricted = df[labels] f.write(df_restricted.to...
true
true
f70910191fa2fdbdb515d1ee6223d72a37845ca7
1,398
py
Python
tests/components_to_test/repeated_computed_layer.py
RichardoLuo/ColossalAI
797a9dc5a9e801d7499b8667c3ef039a38aa15ba
[ "Apache-2.0" ]
1,630
2021-10-30T01:00:27.000Z
2022-03-31T23:02:41.000Z
tests/components_to_test/repeated_computed_layer.py
RichardoLuo/ColossalAI
797a9dc5a9e801d7499b8667c3ef039a38aa15ba
[ "Apache-2.0" ]
166
2021-10-30T01:03:01.000Z
2022-03-31T14:19:07.000Z
tests/components_to_test/repeated_computed_layer.py
RichardoLuo/ColossalAI
797a9dc5a9e801d7499b8667c3ef039a38aa15ba
[ "Apache-2.0" ]
253
2021-10-30T06:10:29.000Z
2022-03-31T13:30:06.000Z
#!/usr/bin/env python import torch import torch.nn as nn from colossalai.nn import CheckpointModule from .utils.dummy_data_generator import DummyDataGenerator from .registry import non_distributed_component_funcs class NetWithRepeatedlyComputedLayers(CheckpointModule): """ This model is to test with layers w...
29.125
83
0.703147
import torch import torch.nn as nn from colossalai.nn import CheckpointModule from .utils.dummy_data_generator import DummyDataGenerator from .registry import non_distributed_component_funcs class NetWithRepeatedlyComputedLayers(CheckpointModule): def __init__(self, checkpoint=False) -> None: super()._...
true
true
f709111442b99e0d8ef6aa437399990e73061ef7
3,524
py
Python
stable_nalu/layer/hard_softmax_nac.py
wlm2019/Neural-Arithmetic-Units
f9de9d004bb2dc2ee28577cd1760d0a00c185836
[ "MIT" ]
147
2019-10-07T11:01:54.000Z
2021-11-16T02:51:18.000Z
stable_nalu/layer/hard_softmax_nac.py
wlm2019/Neural-Arithmetic-Units
f9de9d004bb2dc2ee28577cd1760d0a00c185836
[ "MIT" ]
1
2019-12-03T12:40:21.000Z
2019-12-03T12:40:21.000Z
stable_nalu/layer/hard_softmax_nac.py
wlm2019/Neural-Arithmetic-Units
f9de9d004bb2dc2ee28577cd1760d0a00c185836
[ "MIT" ]
19
2019-12-21T15:58:44.000Z
2021-09-03T08:32:38.000Z
import math import torch from ..abstract import ExtendedTorchModule from ..functional import sparsity_error from ._abstract_recurrent_cell import AbstractRecurrentCell class HardSoftmaxNACLayer(ExtendedTorchModule): """Implements the NAC (Neural Accumulator) Arguments: in_features: number of ingoing...
40.976744
93
0.65437
import math import torch from ..abstract import ExtendedTorchModule from ..functional import sparsity_error from ._abstract_recurrent_cell import AbstractRecurrentCell class HardSoftmaxNACLayer(ExtendedTorchModule): def __init__(self, in_features, out_features, **kwargs): super().__init__('nac', **kwarg...
true
true
f7091180d1e1b7bbe848c16021d65d8ff26b81ff
4,862
py
Python
venv/lib/python3.8/site-packages/vsts/task_agent/v4_1/models/task_agent.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/task_agent/v4_1/models/task_agent.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/task_agent/v4_1/models/task_agent.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------------------...
58.578313
341
0.651172
from .task_agent_reference import TaskAgentReference class TaskAgent(TaskAgentReference): _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'enabled': {'key': 'enabled', 'type': 'bool'}, 'id': {'key': 'id', 'type': 'int'}, 'name': {'key': ...
true
true
f70911869b080ad9966af907970ad157263cbb09
154,166
py
Python
src/azure-cli/azure/cli/command_modules/resource/custom.py
wanlwanl/azure-cli
3d89040f4f6e64784f66ed3ea9290530bd5c57b6
[ "MIT" ]
1
2020-08-10T23:50:16.000Z
2020-08-10T23:50:16.000Z
src/azure-cli/azure/cli/command_modules/resource/custom.py
wanlwanl/azure-cli
3d89040f4f6e64784f66ed3ea9290530bd5c57b6
[ "MIT" ]
2
2020-09-12T04:31:23.000Z
2020-09-14T06:31:04.000Z
src/azure-cli/azure/cli/command_modules/resource/custom.py
hackathon-cli-recommendation/azure-cli
b9df3c9cfd400627912e5751bb6dcd429670b2c7
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
50.184245
191
0.663564
from __future__ import print_function from collections import OrderedDict import codecs import json import os import platform import re import ssl import sys import uuid import base64 from six.moves.urllib.request import urlopen from six.moves.urllib.parse import urlparse from msrestazure.tools import is_...
true
true
f709121ec8d4532010013541f330e6a67735c286
251
py
Python
nginx_router/backend/synth_app/views.py
BennettDixon/book_query_app
b1afd6967c432520540c0427948808ff7b5d8556
[ "MIT" ]
2
2019-08-22T00:49:16.000Z
2022-01-21T21:27:53.000Z
nginx_router/backend/synth_app/views.py
BennettDixon/book_query_app
b1afd6967c432520540c0427948808ff7b5d8556
[ "MIT" ]
7
2020-09-06T23:47:51.000Z
2022-02-26T16:47:58.000Z
nginx_router/backend/synth_app/views.py
BennettDixon/book_query_app
b1afd6967c432520540c0427948808ff7b5d8556
[ "MIT" ]
null
null
null
from django.http import HttpResponse from django.shortcuts import render # Create your views here. def index(request): return HttpResponse('{"response": "Synth is running!"}') def test(request): return HttpResponse('ANOTHER RESPONSE YO')
19.307692
60
0.741036
from django.http import HttpResponse from django.shortcuts import render def index(request): return HttpResponse('{"response": "Synth is running!"}') def test(request): return HttpResponse('ANOTHER RESPONSE YO')
true
true
f7091272a083f663a8bf3500eec9312864fe379c
9,761
py
Python
pypy/module/_cffi_backend/test/test_re_python.py
ruby-compiler-survey/pypy
c76ed8d0979e13497786cf99eb427ef8f94ea816
[ "Apache-2.0", "OpenSSL" ]
1
2021-07-19T17:42:42.000Z
2021-07-19T17:42:42.000Z
pypy/module/_cffi_backend/test/test_re_python.py
CAS-Atlantic/pypy
0988788dd911ff0d5b1cfcf0657412810168d37e
[ "Apache-2.0", "OpenSSL" ]
null
null
null
pypy/module/_cffi_backend/test/test_re_python.py
CAS-Atlantic/pypy
0988788dd911ff0d5b1cfcf0657412810168d37e
[ "Apache-2.0", "OpenSSL" ]
null
null
null
import py import sys, shutil, os from rpython.tool.udir import udir from pypy.interpreter.gateway import interp2app from pypy.module._cffi_backend.newtype import _clean_cache if sys.platform == 'win32': WIN32 = True else: WIN32 = False class AppTestRecompilerPython: spaceconfig = dict(usemodules=['_cffi_b...
35.624088
87
0.595431
import py import sys, shutil, os from rpython.tool.udir import udir from pypy.interpreter.gateway import interp2app from pypy.module._cffi_backend.newtype import _clean_cache if sys.platform == 'win32': WIN32 = True else: WIN32 = False class AppTestRecompilerPython: spaceconfig = dict(usemodules=['_cffi_b...
true
true
f70913690bbeee6a5cd7e42289093722d0f892d5
3,080
py
Python
app/app/settings.py
gonzales-juan/recipe-app-api
6cf46737cd3b63e845ad3e5ade3c6e91ab156542
[ "MIT" ]
null
null
null
app/app/settings.py
gonzales-juan/recipe-app-api
6cf46737cd3b63e845ad3e5ade3c6e91ab156542
[ "MIT" ]
null
null
null
app/app/settings.py
gonzales-juan/recipe-app-api
6cf46737cd3b63e845ad3e5ade3c6e91ab156542
[ "MIT" ]
null
null
null
""" Django settings for app project. Generated by 'django-admin startproject' using Django 2.1.15. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os # Bu...
25.454545
91
0.694156
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'h26q@cw!pa#7*jjx$sda&0*c0&u&alf4^a)hwoh4j+6)j5y*&_' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f70913d332a19eeea3c8a155688731e9ab4da5b0
1,468
py
Python
tests/test_models/test_engine/test_file_storage.py
arvicrin/AirBnB_clone
b851c48fabb85e942f57f9afdeca043e104bb6d1
[ "MIT" ]
null
null
null
tests/test_models/test_engine/test_file_storage.py
arvicrin/AirBnB_clone
b851c48fabb85e942f57f9afdeca043e104bb6d1
[ "MIT" ]
null
null
null
tests/test_models/test_engine/test_file_storage.py
arvicrin/AirBnB_clone
b851c48fabb85e942f57f9afdeca043e104bb6d1
[ "MIT" ]
1
2020-02-27T18:42:46.000Z
2020-02-27T18:42:46.000Z
#!/usr/bin/python3 """ Defines a class TestFileStorage. """ from models.engine.file_storage import FileStorage import unittest import models import os class TestFileStorage(unittest.TestCase): """Represent a TestFileStorage.""" def setUp(self): """SetUp method""" self.file_storage = F...
27.698113
78
0.658719
from models.engine.file_storage import FileStorage import unittest import models import os class TestFileStorage(unittest.TestCase): def setUp(self): self.file_storage = FileStorage() def TearDown(self): del self.file_storage def test_docstring(self): self.assertIsNotNone...
true
true
f7091472584e11aa0109b97212c5ff1f162ae32a
15,488
py
Python
Nested_Adversarial_Networks/NAN_rework/modeleag.py
ZhaoJ9014/Multi-Human-Parsing-MHP-
a24eae67e9b4e730c75bcd8aec3e2ed06cb4b046
[ "MIT" ]
481
2019-01-28T07:37:42.000Z
2022-03-30T02:23:56.000Z
Nested_Adversarial_Networks/NAN_rework/modeleag.py
ZhaoJ9014/Multi-Human-Parsing-MHP-
a24eae67e9b4e730c75bcd8aec3e2ed06cb4b046
[ "MIT" ]
36
2019-02-06T15:14:27.000Z
2022-02-08T18:04:17.000Z
Nested_Adversarial_Networks/NAN_rework/modeleag.py
ZhaoJ9014/Multi-Human-Parsing-MHP-
a24eae67e9b4e730c75bcd8aec3e2ed06cb4b046
[ "MIT" ]
70
2019-01-29T05:42:06.000Z
2022-03-26T04:59:16.000Z
# Rework of model.py # https://github.com/ddddwee1/sul # This wrap-up is targeted for better touching low-level implementations import layers2 as L import tensorflow as tf config = tf.ConfigProto() config.gpu_options.allow_growth=True tf.enable_eager_execution(config=config) import numpy as np import os import ran...
28.057971
169
0.688985
import layers2 as L import tensorflow as tf config = tf.ConfigProto() config.gpu_options.allow_growth=True tf.enable_eager_execution(config=config) import numpy as np import os import random import time PARAM_RELU = 0 PARAM_LRELU = 1 PARAM_ELU = 2 PARAM_TANH = 3 PARAM_MFM = 4 PARAM_MFM_FC = 5 PARAM_SIGMOID = 6 ...
true
true
f70914ece766c06da0a91283d76e7f41f01c5ac6
7,440
py
Python
tests/platform_tests/link_flap/test_cont_link_flap.py
Megathrone/sonic-mgmt
e319c0ad94c4773aa342e3777c67455d7e5b9bad
[ "Apache-2.0" ]
1
2021-09-15T17:04:21.000Z
2021-09-15T17:04:21.000Z
tests/platform_tests/link_flap/test_cont_link_flap.py
Megathrone/sonic-mgmt
e319c0ad94c4773aa342e3777c67455d7e5b9bad
[ "Apache-2.0" ]
3
2021-10-06T19:48:49.000Z
2021-11-18T17:11:19.000Z
tests/platform_tests/link_flap/test_cont_link_flap.py
Megathrone/sonic-mgmt
e319c0ad94c4773aa342e3777c67455d7e5b9bad
[ "Apache-2.0" ]
null
null
null
""" Tests the continuous link flap in SONiC. Parameters: --orch_cpu_threshold <port> (int): Which port you want the test to send traffic to. Default is 3. """ import logging import time import pytest from tests.common.helpers.assertions import pytest_assert, pytest_require from tests.common import port_t...
52.765957
169
0.638844
import logging import time import pytest from tests.common.helpers.assertions import pytest_assert, pytest_require from tests.common import port_toggle from tests.platform_tests.link_flap.link_flap_utils import build_test_candidates, toggle_one_link, check_orch_cpu_utilization, check_bgp_routes, check_portchannel_sta...
true
true
f70915190ac3245bfa14a9456d71f24c01cebe8c
5,407
py
Python
news_crawler/spiders/sputnik.py
andreeaiana/german-news
39e879aca46dfb73b0a631de7c053daff451f63e
[ "MIT" ]
1
2021-12-07T16:27:02.000Z
2021-12-07T16:27:02.000Z
news_crawler/spiders/sputnik.py
andreeaiana/german-news
39e879aca46dfb73b0a631de7c053daff451f63e
[ "MIT" ]
null
null
null
news_crawler/spiders/sputnik.py
andreeaiana/german-news
39e879aca46dfb73b0a631de7c053daff451f63e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys from news_crawler.spiders import BaseSpider from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor from datetime import datetime sys.path.insert(0, os.path.join(os.getcwd(), "..",)) from news_crawler.items import NewsCrawlerItem from new...
43.256
214
0.585352
import os import sys from news_crawler.spiders import BaseSpider from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor from datetime import datetime sys.path.insert(0, os.path.join(os.getcwd(), "..",)) from news_crawler.items import NewsCrawlerItem from news_crawler.utils import r...
true
true
f709151bb9972f3f3a0ec505604bd40b159eeb29
435
py
Python
z2.py
12W300/Five
e5090153b207df71046df40d4054507d96d87207
[ "MIT" ]
null
null
null
z2.py
12W300/Five
e5090153b207df71046df40d4054507d96d87207
[ "MIT" ]
null
null
null
z2.py
12W300/Five
e5090153b207df71046df40d4054507d96d87207
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- if __name__ == "__main__": def midlgeom(a): if len(a) != 0: res = 0 for i in range(len(a)): res += 1/a[i] return len(a) / res else: return None raw = input('Введите последо...
22.894737
63
0.485057
if __name__ == "__main__": def midlgeom(a): if len(a) != 0: res = 0 for i in range(len(a)): res += 1/a[i] return len(a) / res else: return None raw = input('Введите последовательность чисел через пробел: ') mas = [int(...
true
true
f7091608c502de23441376a9faa4ef4af8177aea
1,816
py
Python
kluctl/utils/yaml_utils.py
codablock/kluctl
a7069bf22bfe78c5529fe403c3b3c877f026d3c3
[ "Apache-2.0" ]
26
2021-08-18T11:18:46.000Z
2022-03-16T09:28:43.000Z
kluctl/utils/yaml_utils.py
codablock/kluctl
a7069bf22bfe78c5529fe403c3b3c877f026d3c3
[ "Apache-2.0" ]
4
2021-09-07T09:55:29.000Z
2022-03-03T09:05:01.000Z
kluctl/utils/yaml_utils.py
codablock/kluctl
a7069bf22bfe78c5529fe403c3b3c877f026d3c3
[ "Apache-2.0" ]
4
2021-09-04T11:52:33.000Z
2022-03-16T09:18:20.000Z
import sys import yaml try: from yaml import CSafeLoader as SafeLoader, CSafeDumper as SafeDumper except ImportError: print("Failed to load fast LibYAML bindings. You should install them to speed up kluctl.", file=sys.stderr) from yaml import SafeLoader as SafeLoader, SafeDumper as SafeDumper def constr...
30.779661
111
0.696035
import sys import yaml try: from yaml import CSafeLoader as SafeLoader, CSafeDumper as SafeDumper except ImportError: print("Failed to load fast LibYAML bindings. You should install them to speed up kluctl.", file=sys.stderr) from yaml import SafeLoader as SafeLoader, SafeDumper as SafeDumper def constr...
true
true
f709168738885702dd8ab877116a8ff2a483280b
3,456
py
Python
examples/tutorials/plot.py
carocamargo/pygmt
6139c1735cff7f7d615d243145c21b1efef3f2c6
[ "BSD-3-Clause" ]
null
null
null
examples/tutorials/plot.py
carocamargo/pygmt
6139c1735cff7f7d615d243145c21b1efef3f2c6
[ "BSD-3-Clause" ]
null
null
null
examples/tutorials/plot.py
carocamargo/pygmt
6139c1735cff7f7d615d243145c21b1efef3f2c6
[ "BSD-3-Clause" ]
null
null
null
""" Plotting data points -------------------- GMT shines when it comes to plotting data on a map. We can use some sample data that is packaged with GMT to try this out. PyGMT provides access to these datasets through the :mod:`pygmt.datasets` package. If you don't have the data files already, they are automatically do...
36.765957
88
0.634838
import pygmt
true
true
f70919c541c332631ac6a45b18d36f9f9c301bf5
4,662
py
Python
epidose/back_end/ha_server.py
osnas/epidose
061d4aff6386d571b1940d2f18359eef99dc2ea5
[ "Apache-2.0" ]
40
2020-05-08T17:22:15.000Z
2020-06-18T13:21:25.000Z
epidose/back_end/ha_server.py
osnas/epidose
061d4aff6386d571b1940d2f18359eef99dc2ea5
[ "Apache-2.0" ]
50
2020-06-27T08:34:13.000Z
2021-04-20T10:18:25.000Z
epidose/back_end/ha_server.py
dspinellis/reference_implementation
416cc0305141746d9fe39e3e8698cb152bb3124f
[ "Apache-2.0" ]
10
2020-07-05T19:55:24.000Z
2021-02-04T14:55:46.000Z
#!/usr/bin/env python3 """ Health authority back end REST and static content server """ __copyright__ = """ Copyright 2020 Diomidis Spinellis 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 L...
27.104651
88
0.669884
__copyright__ = """ Copyright 2020 Diomidis Spinellis Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by a...
true
true
f7091a63c75da3469e8ce32bc0cd159841c0a7fd
16,728
py
Python
data/utils.py
cuis15/xorder
6dde5a18552ffa07f29100038464a38c49495527
[ "MIT" ]
null
null
null
data/utils.py
cuis15/xorder
6dde5a18552ffa07f29100038464a38c49495527
[ "MIT" ]
null
null
null
data/utils.py
cuis15/xorder
6dde5a18552ffa07f29100038464a38c49495527
[ "MIT" ]
null
null
null
import numpy as np from sklearn.metrics import roc_auc_score from numba import jit def array2str(tmp_array, sep = " "): str_list = ["{:.3f}".format(tmp_item) for tmp_item in tmp_array] return sep.join(str_list) def generate_sorted_groups(pred, y, a): a_idx = np.where(a == 0) b_idx = np.where(a == 1)...
32.735812
151
0.519727
import numpy as np from sklearn.metrics import roc_auc_score from numba import jit def array2str(tmp_array, sep = " "): str_list = ["{:.3f}".format(tmp_item) for tmp_item in tmp_array] return sep.join(str_list) def generate_sorted_groups(pred, y, a): a_idx = np.where(a == 0) b_idx = np.where(a == 1)...
true
true
f7091b492b1c1ff7f7cbbe859004f6d63c441970
1,459
py
Python
test/test_info_contact.py
spirit-87/python_training
f2e2389ba4e96139d666365abecf16a2db89cd6e
[ "Apache-2.0" ]
null
null
null
test/test_info_contact.py
spirit-87/python_training
f2e2389ba4e96139d666365abecf16a2db89cd6e
[ "Apache-2.0" ]
null
null
null
test/test_info_contact.py
spirit-87/python_training
f2e2389ba4e96139d666365abecf16a2db89cd6e
[ "Apache-2.0" ]
null
null
null
from model.contact import Contact from random import randrange def test_contacts_on_homepage(app, db): contacts_from_homepage = sorted(app.contact.get_contact_list(), key = Contact.id_or_max) contacts_from_db = sorted(db.get_contact_list(), key = Contact.id_or_max) assert len(contacts_from_homepage) == l...
56.115385
115
0.800548
from model.contact import Contact from random import randrange def test_contacts_on_homepage(app, db): contacts_from_homepage = sorted(app.contact.get_contact_list(), key = Contact.id_or_max) contacts_from_db = sorted(db.get_contact_list(), key = Contact.id_or_max) assert len(contacts_from_homepage) == l...
true
true
f7091b6372c395203c4bc05e0c18ff979fa41275
456
py
Python
remove_errors.py
martinetmayank/telegram-chats
ad79f3357d657415f57c83f219fc3ad7d57081eb
[ "Apache-2.0" ]
null
null
null
remove_errors.py
martinetmayank/telegram-chats
ad79f3357d657415f57c83f219fc3ad7d57081eb
[ "Apache-2.0" ]
1
2021-04-30T21:26:01.000Z
2021-04-30T21:26:01.000Z
remove_errors.py
martinetmayank/telegram-chats
ad79f3357d657415f57c83f219fc3ad7d57081eb
[ "Apache-2.0" ]
null
null
null
def correct_ini_file(config_file): with open(config_file, mode='r') as raw_open: raw_open.seek(0) temp_api_details = raw_open.readlines(0) # print(type(temp_api_details[0])) with open(config_file, mode='w') as rewrite_config: if temp_api_details[0] != '[TELEGRAM]\n': ...
32.571429
56
0.60307
def correct_ini_file(config_file): with open(config_file, mode='r') as raw_open: raw_open.seek(0) temp_api_details = raw_open.readlines(0) with open(config_file, mode='w') as rewrite_config: if temp_api_details[0] != '[TELEGRAM]\n': rewrite_config.write('[TEL...
true
true
f7091b68ebbfbd69780202759a09375d54581042
2,147
py
Python
tests/test_encoding.py
samv/unique
d5d8deb109d0b14ce072118432baf0bebc11826b
[ "MIT" ]
1
2015-04-02T20:27:25.000Z
2015-04-02T20:27:25.000Z
tests/test_encoding.py
samv/unique
d5d8deb109d0b14ce072118432baf0bebc11826b
[ "MIT" ]
null
null
null
tests/test_encoding.py
samv/unique
d5d8deb109d0b14ce072118432baf0bebc11826b
[ "MIT" ]
null
null
null
import json import unittest2 from normalize import from_json from normalize import JsonProperty from normalize import JsonRecord from normalize import Property from normalize import Record from normalize import to_json from unique.encoding import JSONRecordIO from testclasses import MultiLevelKeyValue from testclas...
28.25
81
0.63251
import json import unittest2 from normalize import from_json from normalize import JsonProperty from normalize import JsonRecord from normalize import Property from normalize import Record from normalize import to_json from unique.encoding import JSONRecordIO from testclasses import MultiLevelKeyValue from testclas...
true
true
f7091ba4774ace99be57da4a09c120ccf6dd67e9
22,801
py
Python
examples/sc2autosave.py
HADB/sc2reader
6bb984dbe85f46a6684680dd0e56c09d7188214b
[ "MIT" ]
117
2016-09-11T16:42:05.000Z
2022-03-27T22:07:34.000Z
examples/sc2autosave.py
Kaszanas/sc2reader
86bd9b70c3aef8319ce7c8c06cac8a4bdfe3fd23
[ "MIT" ]
120
2016-01-10T17:41:45.000Z
2022-03-28T04:46:16.000Z
examples/sc2autosave.py
Kaszanas/sc2reader
86bd9b70c3aef8319ce7c8c06cac8a4bdfe3fd23
[ "MIT" ]
58
2016-02-03T18:06:26.000Z
2021-09-07T03:08:50.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """sc2autosave is a utility for reorganizing and renaming Starcraft II files. Overview ============== sc2autosave provides a simple mechanism for renaming replay files as they are copied or moved from a source directory to a destination directory. In between runs the stat...
37.378689
101
0.630718
import argparse import cPickle import os import shutil import sys import time import sc2reader try: raw_input except NameError: raw_input = input def run(args): if args.reset: reset(args) state = setup(args) while True: for path in s...
true
true
f7091cc867b32d1268be2ef4dea0d3b3be89c573
20,500
py
Python
nevergrad/optimization/recastlib.py
mathuvu/nevergrad
8e116190a8a29c238e655d728fc4816f7b4e0415
[ "MIT" ]
null
null
null
nevergrad/optimization/recastlib.py
mathuvu/nevergrad
8e116190a8a29c238e655d728fc4816f7b4e0415
[ "MIT" ]
null
null
null
nevergrad/optimization/recastlib.py
mathuvu/nevergrad
8e116190a8a29c238e655d728fc4816f7b4e0415
[ "MIT" ]
null
null
null
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import functools import math import warnings import weakref import numpy as np from scipy import optimize as scipyoptimize import nevergrad...
40.354331
117
0.615073
import functools import math import warnings import weakref import numpy as np from scipy import optimize as scipyoptimize import nevergrad.common.typing as tp from nevergrad.parametrization import parameter as p from nevergrad.common import errors from . import base from .base import IntOrParameter from . import...
true
true
f7091dc148b356a0b6931bd347d661f76f85ade9
627
py
Python
Day16/program.py
CAG2Mark/Advent-Of-Code-Solutions
b744025b8c53dc7ea810a13dc818568520110b86
[ "MIT" ]
null
null
null
Day16/program.py
CAG2Mark/Advent-Of-Code-Solutions
b744025b8c53dc7ea810a13dc818568520110b86
[ "MIT" ]
null
null
null
Day16/program.py
CAG2Mark/Advent-Of-Code-Solutions
b744025b8c53dc7ea810a13dc818568520110b86
[ "MIT" ]
null
null
null
# valid ranges rules = [] while True: try: ln = input() if not ln.strip(): break rule = [x.split("-") for x in ln.split(": ")[1].split(" or ")] for r in rule: rules.append([int(x) for x in r]) except EOFError: break while True: ...
19
70
0.464115
rules = [] while True: try: ln = input() if not ln.strip(): break rule = [x.split("-") for x in ln.split(": ")[1].split(" or ")] for r in rule: rules.append([int(x) for x in r]) except EOFError: break while True: if not input()...
true
true
f7091e05767123ebd494b47f0357c05cee301864
2,616
py
Python
reports/report/visualizations/linplot.py
pplonski/automlbenchmark
f49ddfa2583643173296ed8ab45a8c14c62a6987
[ "MIT" ]
4
2021-04-26T12:03:59.000Z
2021-11-07T20:06:00.000Z
reports/report/visualizations/linplot.py
pplonski/automlbenchmark
f49ddfa2583643173296ed8ab45a8c14c62a6987
[ "MIT" ]
null
null
null
reports/report/visualizations/linplot.py
pplonski/automlbenchmark
f49ddfa2583643173296ed8ab45a8c14c62a6987
[ "MIT" ]
null
null
null
import matplotlib as mp import pandas as pd import seaborn as sb import report.config as config from ..util import create_file, sort_dataframe from .util import savefig, set_scales, set_labels, task_labels def draw_parallel_coord(df, class_column, x_labels=True, yscale='linear', ...
48.444444
110
0.569572
import matplotlib as mp import pandas as pd import seaborn as sb import report.config as config from ..util import create_file, sort_dataframe from .util import savefig, set_scales, set_labels, task_labels def draw_parallel_coord(df, class_column, x_labels=True, yscale='linear', ...
true
true
f7091f618378824f233afd61b0beecfbadd5f8c8
2,552
py
Python
lib/greet.py
yndajas/Twitch-YndaBot
41b3600f5336a073f42c1cc296609dbe88c8e510
[ "MIT" ]
null
null
null
lib/greet.py
yndajas/Twitch-YndaBot
41b3600f5336a073f42c1cc296609dbe88c8e510
[ "MIT" ]
null
null
null
lib/greet.py
yndajas/Twitch-YndaBot
41b3600f5336a073f42c1cc296609dbe88c8e510
[ "MIT" ]
null
null
null
async def greet(ctx): greetings = [ "Ahn nyong ha se yo", "Ahn-nyong-ha-se-yo", "Ahoj", "An-nyŏng-ha-se-yo", "As-salamu alaykum", "Assalamo aleikum", "Assalamualaikum", "Avuxeni", "Bonġu", "Bonjour", "Bună ziua", "Ciao",...
25.019608
83
0.460031
async def greet(ctx): greetings = [ "Ahn nyong ha se yo", "Ahn-nyong-ha-se-yo", "Ahoj", "An-nyŏng-ha-se-yo", "As-salamu alaykum", "Assalamo aleikum", "Assalamualaikum", "Avuxeni", "Bonġu", "Bonjour", "Bună ziua", "Ciao",...
true
true
f7091f945438d05214721e9df9b4991008b776a6
968
py
Python
services/core-api/app/api/now_applications/models/activity_summary/cut_lines_polarization_survey.py
bcgov/mds
6c427a66a5edb4196222607291adef8fd6677038
[ "Apache-2.0" ]
25
2018-07-09T19:04:37.000Z
2022-03-15T17:27:10.000Z
services/core-api/app/api/now_applications/models/activity_summary/cut_lines_polarization_survey.py
areyeslo/mds
e8c38e593e09b78e2a57009c0d003d6c4bfa32e6
[ "Apache-2.0" ]
983
2018-04-25T20:08:07.000Z
2022-03-31T21:45:20.000Z
services/core-api/app/api/now_applications/models/activity_summary/cut_lines_polarization_survey.py
areyeslo/mds
e8c38e593e09b78e2a57009c0d003d6c4bfa32e6
[ "Apache-2.0" ]
58
2018-05-15T22:35:50.000Z
2021-11-29T19:40:52.000Z
from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.schema import FetchedValue from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.ext.hybrid import hybrid_property from app.api.utils.models_mixins import Base from app.extensions import db from app.api.now_applications.models.act...
33.37931
102
0.785124
from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.schema import FetchedValue from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.ext.hybrid import hybrid_property from app.api.utils.models_mixins import Base from app.extensions import db from app.api.now_applications.models.act...
true
true
f709200bc42e18277171017bd58e82fdd5518401
144
py
Python
contacts/apps.py
phildini/logtacts
2cfc1d93a6ec7535b57a42b46b7d8c5c09a4729b
[ "MIT" ]
56
2016-02-22T16:12:53.000Z
2021-01-12T20:59:02.000Z
contacts/apps.py
phildini/logtacts
2cfc1d93a6ec7535b57a42b46b7d8c5c09a4729b
[ "MIT" ]
107
2016-01-04T00:49:37.000Z
2021-11-18T18:27:24.000Z
contacts/apps.py
phildini/logtacts
2cfc1d93a6ec7535b57a42b46b7d8c5c09a4729b
[ "MIT" ]
23
2016-01-04T00:54:09.000Z
2021-07-09T15:23:15.000Z
from django.apps import AppConfig class ContactConfig(AppConfig): name = 'contacts' def ready(self): import contacts.signals
16
33
0.701389
from django.apps import AppConfig class ContactConfig(AppConfig): name = 'contacts' def ready(self): import contacts.signals
true
true
f7092088390ccc9209ff2691ca6f9d0dba0c03d2
2,644
py
Python
scrapers/add_db_entry.py
ivanek/covid_19
e7d7652c65cbdf9a2b12ddacaa7f2415d11a5b87
[ "CC-BY-4.0" ]
1
2020-03-30T12:48:04.000Z
2020-03-30T12:48:04.000Z
scrapers/add_db_entry.py
prematzerosoft/covid_19
a642d7ce12830d4bace93dd14b850973cfeee6b0
[ "CC-BY-4.0" ]
null
null
null
scrapers/add_db_entry.py
prematzerosoft/covid_19
a642d7ce12830d4bace93dd14b850973cfeee6b0
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python3 import re import sys import sqlite3 import traceback import os __location__ = os.path.realpath( os.path.join( os.getcwd(), os.path.dirname(__file__) ) ) input_failures = 0 try: DATABASE_NAME = os.path.join(__location__, 'data.sqlite') conn = sqlite3.connect(DAT...
25.921569
77
0.421331
import re import sys import sqlite3 import traceback import os __location__ = os.path.realpath( os.path.join( os.getcwd(), os.path.dirname(__file__) ) ) input_failures = 0 try: DATABASE_NAME = os.path.join(__location__, 'data.sqlite') conn = sqlite3.connect(DATABASE_NAME) i = 0...
true
true
f70920a45d8b352e57cdd5c4ba4ed7a956b3f421
4,150
py
Python
pyesgf/util.py
ggarcias/esgf-pyclient-cmip6
9e7975d2e676ed2c4001edb4e25c9c20cc16b7af
[ "BSD-3-Clause" ]
17
2016-09-07T02:55:30.000Z
2022-03-10T15:34:53.000Z
pyesgf/util.py
ggarcias/esgf-pyclient-cmip6
9e7975d2e676ed2c4001edb4e25c9c20cc16b7af
[ "BSD-3-Clause" ]
61
2015-05-27T08:10:46.000Z
2022-03-17T12:36:45.000Z
pyesgf/util.py
ggarcias/esgf-pyclient-cmip6
9e7975d2e676ed2c4001edb4e25c9c20cc16b7af
[ "BSD-3-Clause" ]
22
2015-10-27T11:21:05.000Z
2022-01-12T08:26:16.000Z
""" Utility functions using the pyesgf package. """ import sys from urllib.parse import quote_plus def ats_url(base_url): """ Return the URL for the ESGF SAML AttributeService """ # Strip '/' from url as necessary base_url = base_url.rstrip('/') return '/'.join([base_url, ...
30.291971
78
0.576867
import sys from urllib.parse import quote_plus def ats_url(base_url): base_url = base_url.rstrip('/') return '/'.join([base_url, 'esgf-idp/saml/soap/secure/attributeService.htm']) def get_manifest(drs_id, version, connection): if isinstance(version, int): version = str...
true
true
f70920aa2ec17f63790605e4dc9745d131bf1ad5
27,868
py
Python
apps/addons/forms.py
Joergen/olympia
eb84203469adbb6584e50d7bb6f9de7f20980dac
[ "BSD-3-Clause" ]
null
null
null
apps/addons/forms.py
Joergen/olympia
eb84203469adbb6584e50d7bb6f9de7f20980dac
[ "BSD-3-Clause" ]
null
null
null
apps/addons/forms.py
Joergen/olympia
eb84203469adbb6584e50d7bb6f9de7f20980dac
[ "BSD-3-Clause" ]
null
null
null
from datetime import datetime from decimal import Decimal import os from django import forms from django.conf import settings from django.core.files.storage import default_storage as storage from django.forms.formsets import formset_factory import commonware.log import happyforms from quieter_formset.formset import B...
38.123119
79
0.611885
from datetime import datetime from decimal import Decimal import os from django import forms from django.conf import settings from django.core.files.storage import default_storage as storage from django.forms.formsets import formset_factory import commonware.log import happyforms from quieter_formset.formset import B...
true
true
f70921c6af89f557c4ad7ff0343c8dc6ea00a385
1,445
py
Python
pdata/dirstructure.py
semeniuta/pdata
5eb6ece8e2fb1856bc87ed76290240cd901f7654
[ "BSD-3-Clause" ]
null
null
null
pdata/dirstructure.py
semeniuta/pdata
5eb6ece8e2fb1856bc87ed76290240cd901f7654
[ "BSD-3-Clause" ]
null
null
null
pdata/dirstructure.py
semeniuta/pdata
5eb6ece8e2fb1856bc87ed76290240cd901f7654
[ "BSD-3-Clause" ]
null
null
null
import os from glob import glob import pandas as pd def get_list_of_full_child_dirs(d): """ For a directory d (full path), return a list of its subdirectories in a full path form. """ children = (os.path.join(d, child) for child in os.listdir(d)) dirs = filter(os.path.isdir, children) ...
24.491525
78
0.657439
import os from glob import glob import pandas as pd def get_list_of_full_child_dirs(d): children = (os.path.join(d, child) for child in os.listdir(d)) dirs = filter(os.path.isdir, children) return list(dirs) def split_full_path(full_path, base_dir): fname = os.path.basename(full_path) relati...
true
true
f709225799582acc8b4fb03957fc54ab2aaada80
631
py
Python
problems/31/problem_31.py
r1cc4rdo/daily_coding_problem
6ac85309fad2f64231ac7ab94aa4158e18bdec40
[ "Unlicense" ]
158
2018-01-25T06:33:30.000Z
2022-03-14T23:18:05.000Z
problems/31/problem_31.py
r1cc4rdo/daily_coding_problem
6ac85309fad2f64231ac7ab94aa4158e18bdec40
[ "Unlicense" ]
9
2018-07-04T00:31:57.000Z
2020-05-16T21:02:30.000Z
problems/31/problem_31.py
r1cc4rdo/daily_coding_problem
6ac85309fad2f64231ac7ab94aa4158e18bdec40
[ "Unlicense" ]
50
2018-06-22T16:48:44.000Z
2022-01-11T16:45:48.000Z
def coding_problem_31(s, t, debt=0): """ Given two strings, compute the edit distance between them. The edit distance between two strings refers to the minimum number of character insertions, deletions, and substitutions required to change one string to the other. Example: >>> coding_problem_31...
26.291667
110
0.635499
def coding_problem_31(s, t, debt=0): pass if __name__ == '__main__': import doctest doctest.testmod(verbose=True)
true
true
f709226fc4762f35761640ef37183013e4082969
1,221
py
Python
pytorch_ess/mean_elliptical_slice.py
wjmaddox/pytorch_ess
8e189666ce7381cf760666464384c634abbc4be2
[ "Apache-2.0" ]
1
2022-02-19T12:37:06.000Z
2022-02-19T12:37:06.000Z
pytorch_ess/mean_elliptical_slice.py
wjmaddox/pytorch_ess
8e189666ce7381cf760666464384c634abbc4be2
[ "Apache-2.0" ]
null
null
null
pytorch_ess/mean_elliptical_slice.py
wjmaddox/pytorch_ess
8e189666ce7381cf760666464384c634abbc4be2
[ "Apache-2.0" ]
null
null
null
import torch from .elliptical_slice import EllipticalSliceSampler class MeanEllipticalSliceSampler(EllipticalSliceSampler): def __init__(self, f_init, dist, lnpdf, nsamples, pdf_params=()): """ Implementation of elliptical slice sampling (Murray, Adams, & Mckay, 2010). f_init: initial val...
34.885714
130
0.684685
import torch from .elliptical_slice import EllipticalSliceSampler class MeanEllipticalSliceSampler(EllipticalSliceSampler): def __init__(self, f_init, dist, lnpdf, nsamples, pdf_params=()): mean_vector = dist.mean demeaned_lnpdf = lambda g: lnpdf(g + mean_vector, *pdf_params) demeaned_i...
true
true
f70922c43840ce448deb9296e93b5401d187395f
7,592
py
Python
src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/operations/_service_operations.py
Sneezry/azure-cli-extensions
bd186fe31c8fbd8c8b945fb749349e7f243be532
[ "MIT" ]
null
null
null
src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/operations/_service_operations.py
Sneezry/azure-cli-extensions
bd186fe31c8fbd8c8b945fb749349e7f243be532
[ "MIT" ]
null
null
null
src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/operations/_service_operations.py
Sneezry/azure-cli-extensions
bd186fe31c8fbd8c8b945fb749349e7f243be532
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
49.620915
214
0.683351
from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impo...
true
true
f709233cf0c713f895035d7036aa596c63d20754
1,139
py
Python
dog_recognition/models/vgg.py
helloholmes/dog_detection_gluoncv
eff91aa43633adcc1339a8d1f31ed667fdae846f
[ "Apache-2.0" ]
2
2018-08-11T13:55:41.000Z
2020-04-26T08:06:29.000Z
models/vgg.py
helloholmes/dog_detection_gluoncv
eff91aa43633adcc1339a8d1f31ed667fdae846f
[ "Apache-2.0" ]
null
null
null
models/vgg.py
helloholmes/dog_detection_gluoncv
eff91aa43633adcc1339a8d1f31ed667fdae846f
[ "Apache-2.0" ]
null
null
null
# coding:utf-8 ''' python 3.5 mxnet 1.3.0 gluoncv 0.3.0 visdom 0.1.7 gluonbook 0.6.9 auther: helloholmes ''' import mxnet as mx import numpy as np import os import time import pickle from mxnet import gluon from mxnet import init from mxnet import nd from mxnet import autograd from mxnet.gluon import nn class VGG16(nn...
24.234043
74
0.626866
import mxnet as mx import numpy as np import os import time import pickle from mxnet import gluon from mxnet import init from mxnet import nd from mxnet import autograd from mxnet.gluon import nn class VGG16(nn.HybridBlock): def __init__(self, num_classes=120, **kwargs): super(VGG16, self).__init__(*...
true
true
f709237a5a4a3e19ba965c764a9817e628ec93be
1,797
py
Python
python/lax_sod_data.py
kjetil-lye/lax_sod_shock_tube_machine_learning
a0e8600eba89737a03bdea3d82756a2a0ccf0259
[ "MIT" ]
null
null
null
python/lax_sod_data.py
kjetil-lye/lax_sod_shock_tube_machine_learning
a0e8600eba89737a03bdea3d82756a2a0ccf0259
[ "MIT" ]
null
null
null
python/lax_sod_data.py
kjetil-lye/lax_sod_shock_tube_machine_learning
a0e8600eba89737a03bdea3d82756a2a0ccf0259
[ "MIT" ]
null
null
null
import os import numpy as np def get_lax_sod_network(): return [12, 12, 10, 12, 10, 12, 10, 10, 12,1] def get_lax_sod_data_inner(): data_path = os.environ.get("LAX_SOD_REPO_PATH", "../lax_sod_tube") qmc_points = np.loadtxt(os.path.join(data_path, "parameters/parameters_sobol_X.txt")) forces = np...
23.337662
98
0.674457
import os import numpy as np def get_lax_sod_network(): return [12, 12, 10, 12, 10, 12, 10, 10, 12,1] def get_lax_sod_data_inner(): data_path = os.environ.get("LAX_SOD_REPO_PATH", "../lax_sod_tube") qmc_points = np.loadtxt(os.path.join(data_path, "parameters/parameters_sobol_X.txt")) forces = np...
true
true
f70923a1041886df98850f9ba4df0b8e849b83fe
1,795
py
Python
src/compiler/setuppaths.py
fnoeding/exoself
11dfceea12a9f6f8ed0018fd60e6de5f73b9fa35
[ "BSD-3-Clause" ]
4
2015-12-18T10:36:38.000Z
2021-03-19T04:54:03.000Z
src/compiler/setuppaths.py
fnoeding/exoself
11dfceea12a9f6f8ed0018fd60e6de5f73b9fa35
[ "BSD-3-Clause" ]
null
null
null
src/compiler/setuppaths.py
fnoeding/exoself
11dfceea12a9f6f8ed0018fd60e6de5f73b9fa35
[ "BSD-3-Clause" ]
null
null
null
# # The BSD License # # Copyright (c) 2008, Florian Noeding # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # li...
46.025641
94
0.773816
import sys import os sys.path.append(os.path.normpath(os.path.join(sys.path[0], '..', '..', '3rdparty', 'pylibs'))) sys.path.append(os.path.normpath(os.path.join(sys.path[0], 'grammar')))
true
true
f70923eab3da1bedc87560d855a3d722ac2685a4
9,918
py
Python
kiauto/misc.py
jaessy77/KiAuto
517af0808f38bcf57b8ab584e130d2aad3834376
[ "Apache-2.0" ]
null
null
null
kiauto/misc.py
jaessy77/KiAuto
517af0808f38bcf57b8ab584e130d2aad3834376
[ "Apache-2.0" ]
null
null
null
kiauto/misc.py
jaessy77/KiAuto
517af0808f38bcf57b8ab584e130d2aad3834376
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2020-2021 Salvador E. Tropea # Copyright (c) 2020-2021 Instituto Nacional de Tecnologïa Industrial # License: Apache 2.0 # Project: KiAuto (formerly kicad-automation-scripts) import os import re import json import configparser from contextlib import contextmanager from sys import...
40.153846
121
0.619076
import os import re import json import configparser from contextlib import contextmanager from sys import exit, path REC_W = 1366 REC_H = 960 NO_SCHEMATIC = 1 WRONG_ARGUMENTS = 2 EESCHEMA_CFG_PRESENT = 11 KICAD_CFG_PRESENT = 3 NO_PCB = 4 PCBNEW_CFG_PRESENT = 5 WRONG_LAYER_NAME = 6 WRONG_PCB_NAME = 7 WRONG_...
true
true
f70924607cd6bc830019782182dd67bf0f16ab46
246
py
Python
discord_bot/config.sample.py
treasure-hacks/treasure-hacks-ctf
9d07d0182bb096ed7161ba9d35299d60ade9cf5a
[ "MIT" ]
null
null
null
discord_bot/config.sample.py
treasure-hacks/treasure-hacks-ctf
9d07d0182bb096ed7161ba9d35299d60ade9cf5a
[ "MIT" ]
null
null
null
discord_bot/config.sample.py
treasure-hacks/treasure-hacks-ctf
9d07d0182bb096ed7161ba9d35299d60ade9cf5a
[ "MIT" ]
null
null
null
# Replace with DB URI; proto://user:pass@host/database DB_URI = "replace" # Replace with bot token TOKEN = "replace" # Replace with IDs of admin command users ADMIN_IDS = [] # Replace with voice channel for audio clue TARGET_VOICE_CHANNEL = 0
20.5
54
0.743902
DB_URI = "replace" TOKEN = "replace" ADMIN_IDS = [] TARGET_VOICE_CHANNEL = 0
true
true
f70924d202c078270870d9d0bb24cb8b377f14c1
2,413
py
Python
nicos_jcns/galaxi/devices/automation.py
ebadkamil/nicos
0355a970d627aae170c93292f08f95759c97f3b5
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_jcns/galaxi/devices/automation.py
ebadkamil/nicos
0355a970d627aae170c93292f08f95759c97f3b5
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
1
2021-08-18T10:55:42.000Z
2021-08-18T10:55:42.000Z
nicos_jcns/galaxi/devices/automation.py
ISISComputingGroup/nicos
94cb4d172815919481f8c6ee686f21ebb76f2068
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
36.014925
79
0.63075
from nicos.core.device import Readable from nicos.core.params import Attach, Param, listof from nicos.devices.tango import NamedDigitalOutput class DetectorDistance(Readable): attached_devices = { 'detectubes': Attach('Pilatus detector tubes', Readable, multiple=4) } par...
true
true
f709254330ef76af7db62a35d05bbcb48fbff96b
6,705
py
Python
py4syn/epics/LaudaClass.py
lnls-sol/py4syn-old
6653faa788b273c8a592ae7548f9027fd95cc62a
[ "0BSD" ]
12
2015-07-12T17:15:06.000Z
2018-04-28T06:51:15.000Z
py4syn/epics/LaudaClass.py
lnls-sol/py4syn-old
6653faa788b273c8a592ae7548f9027fd95cc62a
[ "0BSD" ]
29
2016-06-28T12:24:08.000Z
2018-10-22T15:59:43.000Z
py4syn/epics/LaudaClass.py
lnls-sol/py4syn-old
6653faa788b273c8a592ae7548f9027fd95cc62a
[ "0BSD" ]
10
2015-09-02T17:30:33.000Z
2018-01-18T18:52:32.000Z
"""Lauda temperature controller class Python class for Lauda temperature controllers :platform: Unix :synopsis: Python class for Lauda temperature controllers .. moduleauthor:: Henrique Dante de Almeida <henrique.almeida@lnls.br> """ from threading import Event from epics import Device, ca from py4syn.epics.IScan...
21.983607
90
0.509918
from threading import Event from epics import Device, ca from py4syn.epics.IScannable import IScannable from py4syn.epics.StandardDevice import StandardDevice from py4syn.utils.timer import Timer class Lauda(StandardDevice, IScannable): EPSILON = 0.1 def __init__(self, pvName, mnemonic): super().__...
true
true
f70925733799e0b5c6d890ecbb866e5f5a32c735
1,110
py
Python
demos/sparse_op/wfuncs/H0/donut.py
tbcole/majoranaJJ
dcf31f7786fa0a4874a940b7d8dcdd55f3921a46
[ "MIT" ]
null
null
null
demos/sparse_op/wfuncs/H0/donut.py
tbcole/majoranaJJ
dcf31f7786fa0a4874a940b7d8dcdd55f3921a46
[ "MIT" ]
2
2020-03-24T23:46:17.000Z
2020-04-19T20:29:08.000Z
demos/sparse_op/wfuncs/H0/donut.py
tbcole/majoranaJJ
dcf31f7786fa0a4874a940b7d8dcdd55f3921a46
[ "MIT" ]
3
2020-04-30T08:48:12.000Z
2022-01-26T12:15:15.000Z
import numpy as np import matplotlib.pyplot as plt import scipy.sparse.linalg as spLA import majoranaJJ.operators.sparse.qmsops as spop #sparse operators import majoranaJJ.lattice.nbrs as nb #neighbor arrays import majoranaJJ.lattice.shapes as shps #lattice shapes import majoranaJJ.modules.plots as plots #plotting fun...
30.833333
89
0.713514
import numpy as np import matplotlib.pyplot as plt import scipy.sparse.linalg as spLA import majoranaJJ.operators.sparse.qmsops as spop import majoranaJJ.lattice.nbrs as nb import majoranaJJ.lattice.shapes as shps import majoranaJJ.modules.plots as plots R = 50 r = 15 ax = 10 ay = 10 coor = shps.donut(R, r) NN...
true
true
f70925fd466531f7885b22db0a2494715d6a730b
1,181
py
Python
backend/app/api/auth.py
dasdachs/flask-blog
d484026c1057e991a89df54d3fec20b43a507d1b
[ "MIT" ]
null
null
null
backend/app/api/auth.py
dasdachs/flask-blog
d484026c1057e991a89df54d3fec20b43a507d1b
[ "MIT" ]
null
null
null
backend/app/api/auth.py
dasdachs/flask-blog
d484026c1057e991a89df54d3fec20b43a507d1b
[ "MIT" ]
1
2020-04-08T17:48:34.000Z
2020-04-08T17:48:34.000Z
#!/usr/bin/env python3.4 from flask import Blueprint, flash, redirect, render_template, request, url_for from flask.ext.login import login_user, logout_user, login_required from ..models import User from ..forms import LoginForm auth = Blueprint('auth', __name__) @auth.route('/login', methods=['GET', 'POST']) def...
31.078947
79
0.690093
from flask import Blueprint, flash, redirect, render_template, request, url_for from flask.ext.login import login_user, logout_user, login_required from ..models import User from ..forms import LoginForm auth = Blueprint('auth', __name__) @auth.route('/login', methods=['GET', 'POST']) def login(): form = Log...
true
true
f7092607e2f50e603d2cab1086ade69261c874d1
11,241
py
Python
outputFiles/statistics/archives/ourIA/closest.py/0.9/9/player1.py
dimtion/jml
dba4db760280cc5ed8c384e36e41d6c7a310fb4f
[ "MIT" ]
1
2015-10-07T19:18:55.000Z
2015-10-07T19:18:55.000Z
outputFiles/statistics/archives/ourIA/closest.py/0.9/9/player1.py
dimtion/jml
dba4db760280cc5ed8c384e36e41d6c7a310fb4f
[ "MIT" ]
1
2015-10-07T19:28:25.000Z
2015-10-08T19:01:47.000Z
outputFiles/statistics/archives/ourIA/closest.py/0.9/9/player1.py
dimtion/jml
dba4db760280cc5ed8c384e36e41d6c7a310fb4f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #################################################################################################################################################################################################################################### ############################################...
64.976879
228
0.357708
true
true
f7092662056ebef64208f6ab439e77a3dae4b1e8
1,412
py
Python
setup.py
masudurHimel/TestLibrary
911f2762ed11b8fd79a32c1a9ecc30331d111998
[ "MIT" ]
null
null
null
setup.py
masudurHimel/TestLibrary
911f2762ed11b8fd79a32c1a9ecc30331d111998
[ "MIT" ]
null
null
null
setup.py
masudurHimel/TestLibrary
911f2762ed11b8fd79a32c1a9ecc30331d111998
[ "MIT" ]
null
null
null
from distutils.core import setup setup( name='TestLibrary_MR', # How you named your package folder (MyLib) packages=['TestLibrary_MR'], # Chose the same as "name" version='0.2', # Start with a small number and increase it with every change you make license='MIT', # Chose a license from here: https:...
58.833333
123
0.689802
from distutils.core import setup setup( name='TestLibrary_MR', packages=['TestLibrary_MR'], version='0.2', license='MIT', description='Just a test module', author='Md. Masudur Rahman', author_email='masudurhimel@gmail.com', url='https://github.com/masudurHimel/TestLibrary_...
true
true
f70926f0ac93c387914718f3fd574704afb0fbea
5,832
py
Python
cogs/encoding.py
vierofernando/username601
b5309b91b9da49a2a5cee1596084d450b987c17a
[ "MIT" ]
48
2020-05-21T16:29:46.000Z
2021-12-30T00:09:45.000Z
cogs/encoding.py
vierofernando/username601
b5309b91b9da49a2a5cee1596084d450b987c17a
[ "MIT" ]
5
2020-08-28T02:06:45.000Z
2021-11-08T11:02:36.000Z
cogs/encoding.py
vierofernando/username601
b5309b91b9da49a2a5cee1596084d450b987c17a
[ "MIT" ]
24
2020-06-08T14:47:09.000Z
2021-09-28T18:46:13.000Z
import discord from discord.ext import commands from decorators import * from io import BytesIO from urllib.parse import quote from base64 import b64encode from json import loads class encoding(commands.Cog): def __init__(self): self.ciphers = loads(open("./assets/json/encode.json", "r").read()) pa...
35.560976
139
0.564986
import discord from discord.ext import commands from decorators import * from io import BytesIO from urllib.parse import quote from base64 import b64encode from json import loads class encoding(commands.Cog): def __init__(self): self.ciphers = loads(open("./assets/json/encode.json", "r").read()) pa...
true
true
f709278271159bcb09d59ef159f718217946794c
1,237
py
Python
py/scrapeJson.py
mpaulweeks/edh-obscurity
58b6d34775111f5c111424ee51b186943ecd478d
[ "MIT" ]
null
null
null
py/scrapeJson.py
mpaulweeks/edh-obscurity
58b6d34775111f5c111424ee51b186943ecd478d
[ "MIT" ]
null
null
null
py/scrapeJson.py
mpaulweeks/edh-obscurity
58b6d34775111f5c111424ee51b186943ecd478d
[ "MIT" ]
null
null
null
import json import requests EDHREC_BASE_URL = 'https://edhrec-json.s3.amazonaws.com/commanders/%s.json' COMMANDER_PAGE_SLUGS = frozenset([ 'w', 'u', 'b', 'r', 'g', 'colorless', 'wu', 'ub', 'br', 'rg', 'gw', 'wb', 'ur', 'bg', 'rw', 'gu', 'wub', ...
17.180556
75
0.547292
import json import requests EDHREC_BASE_URL = 'https://edhrec-json.s3.amazonaws.com/commanders/%s.json' COMMANDER_PAGE_SLUGS = frozenset([ 'w', 'u', 'b', 'r', 'g', 'colorless', 'wu', 'ub', 'br', 'rg', 'gw', 'wb', 'ur', 'bg', 'rw', 'gu', 'wub', ...
true
true
f70928592e8883c6be6fc9952f6de13f07725f2b
1,063
py
Python
Iterative Methods/gauss_jacobi.py
Hariharan-SV/Scientific-Computing
fccb065fe176f5fac6a463ec29f7e618dabd8099
[ "MIT" ]
null
null
null
Iterative Methods/gauss_jacobi.py
Hariharan-SV/Scientific-Computing
fccb065fe176f5fac6a463ec29f7e618dabd8099
[ "MIT" ]
null
null
null
Iterative Methods/gauss_jacobi.py
Hariharan-SV/Scientific-Computing
fccb065fe176f5fac6a463ec29f7e618dabd8099
[ "MIT" ]
null
null
null
import get_coefficients_as_list import check_diagonal_dominant # function that computes in gauss jacobi method def gauss_jacobi(no_of_unknowns): coefficient_list = get_coefficients_as_list.get_coefficients_as_list(no_of_unknowns) if check_diagonal_dominant.is_diagonally_dominant(coefficient_list): print("Compu...
42.52
86
0.71778
import get_coefficients_as_list import check_diagonal_dominant def gauss_jacobi(no_of_unknowns): coefficient_list = get_coefficients_as_list.get_coefficients_as_list(no_of_unknowns) if check_diagonal_dominant.is_diagonally_dominant(coefficient_list): print("Computing...") else: print("Matrix failed to b...
true
true
f7092877b036548f0ac6c9dcc5a5085434c79104
14,364
py
Python
cinder/volume/flows/manager/manage_existing_snapshot.py
ISCAS-VDI/cinder-base
9529102548beef074264aaef31fa8267db99df61
[ "Apache-2.0" ]
null
null
null
cinder/volume/flows/manager/manage_existing_snapshot.py
ISCAS-VDI/cinder-base
9529102548beef074264aaef31fa8267db99df61
[ "Apache-2.0" ]
null
null
null
cinder/volume/flows/manager/manage_existing_snapshot.py
ISCAS-VDI/cinder-base
9529102548beef074264aaef31fa8267db99df61
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 Huawei Technologies Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
41.755814
79
0.61675
from oslo_config import cfg from oslo_log import log as logging import taskflow.engines from taskflow.patterns import linear_flow from taskflow.types import failure as ft from cinder import exception from cinder import flow_utils from cinder.i18n import _, _LE, _LI from cinder import objects from cinder ...
true
true
f7092a6a9bede6870067db1af0ef8ca88e82b286
2,116
py
Python
setup.py
ZLLentz/pcdscalc
6279d3eb8bd62da0e5ac9d9f3b451519e5f13aea
[ "BSD-3-Clause-LBNL" ]
null
null
null
setup.py
ZLLentz/pcdscalc
6279d3eb8bd62da0e5ac9d9f3b451519e5f13aea
[ "BSD-3-Clause-LBNL" ]
null
null
null
setup.py
ZLLentz/pcdscalc
6279d3eb8bd62da0e5ac9d9f3b451519e5f13aea
[ "BSD-3-Clause-LBNL" ]
null
null
null
import sys from os import path from setuptools import find_packages, setup import versioneer min_version = (3, 6) if sys.version_info < min_version: error = """ pcdscalc does not support Python {0}.{1}. Python {2}.{3} and above is required. Check your Python version like so: python3 --version This may be due ...
28.594595
77
0.654537
import sys from os import path from setuptools import find_packages, setup import versioneer min_version = (3, 6) if sys.version_info < min_version: error = """ pcdscalc does not support Python {0}.{1}. Python {2}.{3} and above is required. Check your Python version like so: python3 --version This may be due ...
true
true
f7092b83133107e338da2d33a559c9985e7b4a42
2,967
py
Python
anchore_engine/db/db_accounts.py
ognjen-it/anchore-engine
02eb4b01b544c2ec8755326731d31ec2b1f265f6
[ "Apache-2.0" ]
1
2019-06-27T08:47:48.000Z
2019-06-27T08:47:48.000Z
anchore_engine/db/db_accounts.py
ognjen-it/anchore-engine
02eb4b01b544c2ec8755326731d31ec2b1f265f6
[ "Apache-2.0" ]
4
2020-11-07T00:16:02.000Z
2020-11-08T20:52:06.000Z
anchore_engine/db/db_accounts.py
mcburne/anchore-engine
de3c5bea6c0628fd611b027fc1d9e58b7e8d15a3
[ "Apache-2.0" ]
1
2019-11-23T03:39:28.000Z
2019-11-23T03:39:28.000Z
""" Interface to the accounts table. Data format is dicts, not objects. """ from anchore_engine.db import Account, AccountTypes, AccountStates from anchore_engine.db.entities.common import anchore_now class AccountNotFoundError(Exception): def __init__(self, account_name): super(AccountNotFoundError, self...
31.56383
175
0.713515
from anchore_engine.db import Account, AccountTypes, AccountStates from anchore_engine.db.entities.common import anchore_now class AccountNotFoundError(Exception): def __init__(self, account_name): super(AccountNotFoundError, self).__init__('User account not found. Name={}'.format(account_name)) s...
true
true
f7092c10da42e20fd36d0a193c9d2a7e83185c7d
22,395
py
Python
lib/utils/SegDataGenerator.py
Grusinator/BirdClassification
c78ca3dbf70c2509c79ca4641102a2d725084d2a
[ "MIT" ]
1
2018-04-16T19:01:48.000Z
2018-04-16T19:01:48.000Z
lib/utils/SegDataGenerator.py
Grusinator/BirdClassification
c78ca3dbf70c2509c79ca4641102a2d725084d2a
[ "MIT" ]
null
null
null
lib/utils/SegDataGenerator.py
Grusinator/BirdClassification
c78ca3dbf70c2509c79ca4641102a2d725084d2a
[ "MIT" ]
null
null
null
from keras.preprocessing.image import * from keras.applications.imagenet_utils import preprocess_input from keras import backend as K from PIL import Image import numpy as np import os #import cv2 def center_crop(x, center_crop_size, data_format, **kwargs): if data_format == 'channels_first': centerh, cen...
43.067308
160
0.552936
from keras.preprocessing.image import * from keras.applications.imagenet_utils import preprocess_input from keras import backend as K from PIL import Image import numpy as np import os def center_crop(x, center_crop_size, data_format, **kwargs): if data_format == 'channels_first': centerh, centerw = x.sh...
true
true
f7092e1255d38618f9c2c9eca5f281dfe7bcef56
2,904
py
Python
test/swig/Less.py
AyishaR/deepC
1dc9707ef5ca9000fc13c3da7f1129685a83b494
[ "Apache-2.0" ]
223
2020-04-15T20:34:33.000Z
2022-03-28T05:41:49.000Z
test/swig/Less.py
AyishaR/deepC
1dc9707ef5ca9000fc13c3da7f1129685a83b494
[ "Apache-2.0" ]
42
2019-07-29T15:57:12.000Z
2020-04-08T15:12:48.000Z
test/swig/Less.py
AyishaR/deepC
1dc9707ef5ca9000fc13c3da7f1129685a83b494
[ "Apache-2.0" ]
58
2019-07-22T11:46:19.000Z
2020-04-09T22:56:41.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
34.987952
87
0.632576
import common import deepC.dnnc as dc import numpy as np import unittest class LessTest(unittest.TestCase): def setUp(self): self.len = 24 self.np_a = np.random.randn(self.len).astype(np.float32) self.np_b = np.random.randn(self.len).astype(np.float32) self.dc_...
true
true
f7092eb8bb29cd5ee13ba9193e8f20b7d4714b28
442
py
Python
messier_objects/migrations/0003_auto_20200723_1441.py
DanielPDWalker/Astrophoto
9a7ee59deb291617baa3ab8724b8ce5970e6ea9f
[ "MIT" ]
null
null
null
messier_objects/migrations/0003_auto_20200723_1441.py
DanielPDWalker/Astrophoto
9a7ee59deb291617baa3ab8724b8ce5970e6ea9f
[ "MIT" ]
12
2020-07-26T06:20:22.000Z
2022-03-12T00:43:09.000Z
messier_objects/migrations/0003_auto_20200723_1441.py
DanielPDWalker/Astrophoto-API
9a7ee59deb291617baa3ab8724b8ce5970e6ea9f
[ "MIT" ]
null
null
null
# Generated by Django 2.2.9 on 2020-07-23 13:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('messier_objects', '0002_auto_20200723_1438'), ] operations = [ migrations.AlterField( model_name='messierobject', na...
23.263158
92
0.631222
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('messier_objects', '0002_auto_20200723_1438'), ] operations = [ migrations.AlterField( model_name='messierobject', name='photo', field=models.ImageField...
true
true
f7092f97f43d8f03ca9070fa7e458673b7957cf3
9,168
py
Python
src/config/api-server/vnc_cfg_api_server/tests/test_vnc_load_data.py
pawelzny/contrail-controller
4950d3144cb8c422264ddb2a926cf4fe9e40b14d
[ "Apache-2.0" ]
null
null
null
src/config/api-server/vnc_cfg_api_server/tests/test_vnc_load_data.py
pawelzny/contrail-controller
4950d3144cb8c422264ddb2a926cf4fe9e40b14d
[ "Apache-2.0" ]
null
null
null
src/config/api-server/vnc_cfg_api_server/tests/test_vnc_load_data.py
pawelzny/contrail-controller
4950d3144cb8c422264ddb2a926cf4fe9e40b14d
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2018 Juniper Networks, Inc. All rights reserved. # import sys import os import logging import json import test_case from vnc_api.exceptions import NoIdError, RefsExistError from vnc_api.gen.resource_client import * from vnc_api.gen.resource_xsd import * from vnc_api.utils import obj_type_to_vnc_class ...
36.672
121
0.571444
import sys import os import logging import json import test_case from vnc_api.exceptions import NoIdError, RefsExistError from vnc_api.gen.resource_client import * from vnc_api.gen.resource_xsd import * from vnc_api.utils import obj_type_to_vnc_class import shutil sys.path.append("../common/tests") from time import...
true
true
f7092fce6743940e729d3c18cfe5b7cc2120c659
14,174
py
Python
openapi_client/models/net_cdf_timeseries_rain.py
nens/threedi-api-client
43b0eb1bd47310b1783f87f6ad8bfbfe0fb4d90a
[ "BSD-3-Clause" ]
null
null
null
openapi_client/models/net_cdf_timeseries_rain.py
nens/threedi-api-client
43b0eb1bd47310b1783f87f6ad8bfbfe0fb4d90a
[ "BSD-3-Clause" ]
16
2021-05-31T09:52:04.000Z
2022-03-14T16:07:19.000Z
openapi_client/models/net_cdf_timeseries_rain.py
nens/threedi-api-client
43b0eb1bd47310b1783f87f6ad8bfbfe0fb4d90a
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 """ 3Di API 3Di simulation API (latest version: 3.0) Framework release: 1.0.16 3Di core release: 2.0.11 deployed on: 07:33AM (UTC) on September 04, 2020 # noqa: E501 The version of the OpenAPI document: 3.0 Contact: info@nelen-schuurmans.nl Generated by: https://openapi-gen...
31.851685
245
0.607239
import pprint import re import six from openapi_client.configuration import Configuration class NetCDFTimeseriesRain(object): openapi_types = { 'url': 'str', 'multiplier': 'float', 'simulation': 'str', 'offset': 'int', 'duration': 'int', 'timestamps': 'list...
true
true