hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
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
209
max_issues_repo_name
stringlengths
5
121
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
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
6fa88c975fa4122caaba765c225a3e7192d0779c
22,902
py
Python
nova/virt/vmwareapi/volumeops.py
bopopescu/nova_audit
1cd2901802f82d39411adfa04cf2f432ff3bf280
[ "Apache-2.0" ]
1
2020-02-21T19:19:11.000Z
2020-02-21T19:19:11.000Z
nova/virt/vmwareapi/volumeops.py
bopopescu/nova_audit
1cd2901802f82d39411adfa04cf2f432ff3bf280
[ "Apache-2.0" ]
null
null
null
nova/virt/vmwareapi/volumeops.py
bopopescu/nova_audit
1cd2901802f82d39411adfa04cf2f432ff3bf280
[ "Apache-2.0" ]
1
2020-07-24T09:15:58.000Z
2020-07-24T09:15:58.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, 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 Lic...
48.521186
79
0.593835
917253d0db7c30b754787b8dc3d4cd89e8ef2c3a
915
py
Python
src/main/java/com/Da_Technomancer/essentials/python/WirelessRedstoneModelGenerator.py
hedgehog1029/Essentials
cdb1995c4d4a664f33f5b13d88a3d0ee603b49e9
[ "MIT" ]
12
2018-06-18T13:57:25.000Z
2021-10-03T20:47:51.000Z
src/main/java/com/Da_Technomancer/essentials/python/WirelessRedstoneModelGenerator.py
hedgehog1029/Essentials
cdb1995c4d4a664f33f5b13d88a3d0ee603b49e9
[ "MIT" ]
55
2018-05-18T23:10:10.000Z
2021-09-28T22:26:57.000Z
src/main/java/com/Da_Technomancer/essentials/python/WirelessRedstoneModelGenerator.py
hedgehog1029/Essentials
cdb1995c4d4a664f33f5b13d88a3d0ee603b49e9
[ "MIT" ]
12
2018-10-04T20:31:06.000Z
2021-08-25T00:24:01.000Z
# Makes all 32 redstone transmitter/receiver models # In other news, forge blockstate files still can't overwrite textures in MC1.14 colors = ["white", "orange", "magenta", "light_blue", "yellow", "lime", "pink", "gray", "silver", "cyan", "purple", "blue", "brown", "green", "red", "black"] modelPath = "../../../../.....
50.833333
157
0.643716
4558b59dd1f01f5ebf58024298910cc9a3fae836
26,329
py
Python
data_loader/dataset_IMT.py
luiseduve/kinemats
08c459315eb6ec64b819eb2fdf2b753241960504
[ "Apache-2.0" ]
null
null
null
data_loader/dataset_IMT.py
luiseduve/kinemats
08c459315eb6ec64b819eb2fdf2b753241960504
[ "Apache-2.0" ]
null
null
null
data_loader/dataset_IMT.py
luiseduve/kinemats
08c459315eb6ec64b819eb2fdf2b753241960504
[ "Apache-2.0" ]
null
null
null
import sys, os sys.path.append(os.path.join(os.path.dirname(__file__), "..")) # Import data manipulation libraries from io import BytesIO import tarfile from enum import Enum # Import scientific import numpy as np import pandas as pd import utils from quaternion_math import * # %% def is_subfolder(path, parent): ...
44.028428
173
0.583653
cacf09ef62d03ea873a1ab40af4bf7d60e9b43b3
1,325
py
Python
checkov/kubernetes/checks/ApiServerKubeletClientCertAndKey.py
kylelaker/checkov
6eada26030a87f397a6bf1831827b3dc6c5dad2d
[ "Apache-2.0" ]
5
2021-07-29T18:08:40.000Z
2022-03-21T04:39:32.000Z
checkov/kubernetes/checks/ApiServerKubeletClientCertAndKey.py
kylelaker/checkov
6eada26030a87f397a6bf1831827b3dc6c5dad2d
[ "Apache-2.0" ]
16
2021-03-09T07:38:38.000Z
2021-06-09T03:53:55.000Z
checkov/kubernetes/checks/ApiServerKubeletClientCertAndKey.py
kylelaker/checkov
6eada26030a87f397a6bf1831827b3dc6c5dad2d
[ "Apache-2.0" ]
2
2021-08-23T13:25:36.000Z
2021-11-05T21:44:52.000Z
from checkov.common.models.enums import CheckCategories, CheckResult from checkov.kubernetes.base_spec_check import BaseK8Check class ApiServerKubeletClientCertAndKey(BaseK8Check): def __init__(self): id = "CKV_K8S_72" name = "Ensure that the --kubelet-client-certificate and --kubelet-client-key ar...
45.689655
119
0.649057
2258904f1354795705bd1e325e075344cb00e673
786
py
Python
setup.py
PopeyedLocket/eosfactory
2f6afdb67b2d5e7653afd02c23eb5c33c6565bf8
[ "MIT" ]
1
2019-01-14T11:13:00.000Z
2019-01-14T11:13:00.000Z
setup.py
PopeyedLocket/eosfactory
2f6afdb67b2d5e7653afd02c23eb5c33c6565bf8
[ "MIT" ]
null
null
null
setup.py
PopeyedLocket/eosfactory
2f6afdb67b2d5e7653afd02c23eb5c33c6565bf8
[ "MIT" ]
null
null
null
from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup(name='eosfactory', version='2.4', description='Python-based EOS smart-contract development & testing framework', long_description=readme(), classifiers=[ 'Development Status :: 2....
30.230769
84
0.60687
95a07d9dbabdd929431e0b734373a360bd6fc216
278
py
Python
farm_ecomm/orders/urls.py
SumeetSanwal/Farmer-Ecomm
021e79e1129a23d12970538451407a52bfe7938d
[ "MIT" ]
null
null
null
farm_ecomm/orders/urls.py
SumeetSanwal/Farmer-Ecomm
021e79e1129a23d12970538451407a52bfe7938d
[ "MIT" ]
null
null
null
farm_ecomm/orders/urls.py
SumeetSanwal/Farmer-Ecomm
021e79e1129a23d12970538451407a52bfe7938d
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path,include from . import views app_name = 'orders' urlpatterns = [ path(r'', views.od, name='od'), path(r'/myorder', views.myorder, name='myorder'), path(r'/checkout', views.order_create, name='order_create'), ]
19.857143
61
0.71223
1dc46bb143dc2db4e27343b377d5cfc07542d579
224
py
Python
fedex/services/__init__.py
shivam1111/python-fedex
597a6c1afa233a62dd03667c515372227ae16431
[ "BSD-3-Clause" ]
null
null
null
fedex/services/__init__.py
shivam1111/python-fedex
597a6c1afa233a62dd03667c515372227ae16431
[ "BSD-3-Clause" ]
null
null
null
fedex/services/__init__.py
shivam1111/python-fedex
597a6c1afa233a62dd03667c515372227ae16431
[ "BSD-3-Clause" ]
null
null
null
""" This module contains the wrappers around Fedex Web Service requests which you will want to instantiate and use with a L{FedexConfig} object supplying your static details. Each module here corresponds to a Fedex WSDL. """
44.8
77
0.799107
98753c7fe3042d5e27e8c91e5d2700b8625cbac0
7,161
py
Python
weather_station/weather_data1.py
Andre-Williams22/SPD-2.31-Testing-and-Architecture
a28abb56c7b0c920144867f5aa138f70aae65260
[ "MIT" ]
null
null
null
weather_station/weather_data1.py
Andre-Williams22/SPD-2.31-Testing-and-Architecture
a28abb56c7b0c920144867f5aa138f70aae65260
[ "MIT" ]
null
null
null
weather_station/weather_data1.py
Andre-Williams22/SPD-2.31-Testing-and-Architecture
a28abb56c7b0c920144867f5aa138f70aae65260
[ "MIT" ]
null
null
null
class Subject: # Both of the following two methods take an # observer as an argument; that is, the observer # to be registered ore removed. def register_observer(observer): pass def remove_observer(observer): pass # This method is called to notify all observers # when the S...
32.55
95
0.615696
e509c8a04153ba4e0b487ff0952c867b9d8632ef
1,930
py
Python
backend/card_parser.py
HPI-Hackathon/cartets
7f01b037834dd9ae20ea0bd41966e0d07d9d8269
[ "MIT" ]
1
2021-09-05T10:42:36.000Z
2021-09-05T10:42:36.000Z
backend/card_parser.py
HPI-Hackathon/cartets
7f01b037834dd9ae20ea0bd41966e0d07d9d8269
[ "MIT" ]
null
null
null
backend/card_parser.py
HPI-Hackathon/cartets
7f01b037834dd9ae20ea0bd41966e0d07d9d8269
[ "MIT" ]
null
null
null
import urllib2 import json import random import re # \d+(?=\s?[pP][sS]) # ^[0-9\.]+ def main(long, lat, card_list): url = 'http://m.mobile.de/svc/s/?ll=' + str(long) + ',' + str(lat) + '&s=Car&psz=100&sb=doc' response = urllib2.urlopen(url) data = json.load(response)['items'] return generate_list(dat...
31.639344
111
0.48601
0c9dd81c665cd4a1d6e711f5ca4ffa2619c5c38a
1,535
py
Python
pulser-core/pulser/devices/_devices.py
lvignoli/Pulser
263149799d722023b2f7ab1fe653fbdebb2fe894
[ "Apache-2.0" ]
null
null
null
pulser-core/pulser/devices/_devices.py
lvignoli/Pulser
263149799d722023b2f7ab1fe653fbdebb2fe894
[ "Apache-2.0" ]
null
null
null
pulser-core/pulser/devices/_devices.py
lvignoli/Pulser
263149799d722023b2f7ab1fe653fbdebb2fe894
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Pulser Development Team # # 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 i...
29.519231
76
0.647557
537a6bb23e6298d940c553767538c2f4294a8169
663
py
Python
nftiesbackend/users/tests/test_urls.py
bwill210/nftiesbackend
a4f872791f7bfdfd89b361c128a0f79bed1a0d40
[ "MIT" ]
null
null
null
nftiesbackend/users/tests/test_urls.py
bwill210/nftiesbackend
a4f872791f7bfdfd89b361c128a0f79bed1a0d40
[ "MIT" ]
null
null
null
nftiesbackend/users/tests/test_urls.py
bwill210/nftiesbackend
a4f872791f7bfdfd89b361c128a0f79bed1a0d40
[ "MIT" ]
null
null
null
import pytest from django.urls import resolve, reverse from nftiesbackend.users.models import User pytestmark = pytest.mark.django_db def test_detail(user: User): assert ( reverse("users:detail", kwargs={"username": user.username}) == f"/users/{user.username}/" ) assert resolve(f"/users/...
26.52
74
0.678733
5991ca3c0755c1429188a4726d0862d18d6dc23a
221
py
Python
demucs/__init__.py
sparshpriyadarshi/demucs
7c7f65401db654d750df2b6f4d5b82a0101500b1
[ "MIT" ]
null
null
null
demucs/__init__.py
sparshpriyadarshi/demucs
7c7f65401db654d750df2b6f4d5b82a0101500b1
[ "MIT" ]
null
null
null
demucs/__init__.py
sparshpriyadarshi/demucs
7c7f65401db654d750df2b6f4d5b82a0101500b1
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. __version__ = "3.0.4a2"
27.625
61
0.742081
32e0aefbed1bd06146bc9f862f874b963cff3672
368
py
Python
Modelling/Regression/Non-negative Least Squares.py
fraunhofer-iais/IAIS-Python-Snippets
a3ee610d6270cda2c891688851696c34831ffa2b
[ "MIT" ]
null
null
null
Modelling/Regression/Non-negative Least Squares.py
fraunhofer-iais/IAIS-Python-Snippets
a3ee610d6270cda2c891688851696c34831ffa2b
[ "MIT" ]
null
null
null
Modelling/Regression/Non-negative Least Squares.py
fraunhofer-iais/IAIS-Python-Snippets
a3ee610d6270cda2c891688851696c34831ffa2b
[ "MIT" ]
null
null
null
# Model via non-negative Least Squares from scipy.optimize import nnls class NNLS(): def __init__(self): self.coef_ = None def get_params(self, deep=False, *args): return {} def fit(self, X, Y): self.coef_ = nnls(X,Y)[0] def predict(self, X): return self.coef_.dot(np.arr...
24.533333
44
0.619565
23ec94df49d3f40a5dc35256db94d9569315880b
381
py
Python
nsofetch/utils.py
FullFact/nso-stats-fetcher
7d279b7e885951ba69cd34c0e0a45e5ec8333549
[ "MIT" ]
null
null
null
nsofetch/utils.py
FullFact/nso-stats-fetcher
7d279b7e885951ba69cd34c0e0a45e5ec8333549
[ "MIT" ]
null
null
null
nsofetch/utils.py
FullFact/nso-stats-fetcher
7d279b7e885951ba69cd34c0e0a45e5ec8333549
[ "MIT" ]
null
null
null
import json import requests import filepaths def read_stats_metadata() -> dict: with open(filepaths.NSO_STATS_METADATA) as json_file: stats_metadata = json.load(json_file) return stats_metadata def download_file(url: str) -> str: r = requests.get(url) tmp_filepath = '/tmp/tmpfile' open(...
22.411765
57
0.716535
db4fb8a9d11c098561899556cfe44675e8fdc52d
1,593
py
Python
backend/unpp_api/apps/common/database_fields.py
unicef/un-partner-portal
73afa193a5f6d626928cae0025c72a17f0ef8f61
[ "Apache-2.0" ]
6
2017-11-21T10:00:44.000Z
2022-02-12T16:51:48.000Z
backend/unpp_api/apps/common/database_fields.py
unicef/un-partner-portal
73afa193a5f6d626928cae0025c72a17f0ef8f61
[ "Apache-2.0" ]
995
2017-07-31T02:08:36.000Z
2022-03-08T22:44:03.000Z
backend/unpp_api/apps/common/database_fields.py
unicef/un-partner-portal
73afa193a5f6d626928cae0025c72a17f0ef8f61
[ "Apache-2.0" ]
1
2021-07-21T10:45:15.000Z
2021-07-21T10:45:15.000Z
from __future__ import unicode_literals from django.contrib.postgres.fields import ArrayField from django.db.models import Field from django import forms from django.utils import six from django.utils.encoding import smart_text class FixedTextField(Field): description = "Text" def get_internal_type(self): ...
31.86
78
0.68236
d7a91f3577eac8814a7c7e91139e8782626b398b
4,503
py
Python
onnxruntime/python/tools/quantization/operators/matmul.py
dennyac/onnxruntime
d5175795d2b7f2db18b0390f394a49238f814668
[ "MIT" ]
18
2020-05-19T12:48:07.000Z
2021-04-28T06:41:57.000Z
onnxruntime/python/tools/quantization/operators/matmul.py
dennyac/onnxruntime
d5175795d2b7f2db18b0390f394a49238f814668
[ "MIT" ]
61
2021-05-31T05:15:41.000Z
2022-03-29T22:34:33.000Z
onnxruntime/python/tools/quantization/operators/matmul.py
dennyac/onnxruntime
d5175795d2b7f2db18b0390f394a49238f814668
[ "MIT" ]
9
2021-05-14T20:17:26.000Z
2022-03-20T11:44:29.000Z
import onnx from .base_operator import QuantOperatorBase from ..quant_utils import find_by_name, get_mul_node, QuantizedValue, QuantizedValueType from onnx import onnx_pb as onnx_proto ''' Used when quantize mode is QuantizationMode.IntegerOps. ''' class MatMulInteger(QuantOperatorBase): def __init__(self, on...
43.298077
116
0.668443
e2cbeae9bba00319f62ad95fe7e7ddbf26114db2
289
py
Python
components/item.py
loganstone/rogue
ffcdd6073178e4fe5ae4774ef9d98b185cf1cc9e
[ "MIT" ]
null
null
null
components/item.py
loganstone/rogue
ffcdd6073178e4fe5ae4774ef9d98b185cf1cc9e
[ "MIT" ]
null
null
null
components/item.py
loganstone/rogue
ffcdd6073178e4fe5ae4774ef9d98b185cf1cc9e
[ "MIT" ]
null
null
null
class Item: def __init__(self, use_function=None, targeting=False, targeting_message=None, **kwargs): self.use_function = use_function self.targeting = targeting self.targeting_message = targeting_message self.function_kwargs = kwargs
32.111111
68
0.67128
522abffa0b66ed2a9d35f1e94a46daded7ca6662
474
py
Python
phi/geom/__init__.py
marc-gav/PhiFlow
b6186fd1503d040997b52d49aa18cd875267c27e
[ "MIT" ]
556
2019-12-04T16:48:54.000Z
2022-03-31T16:31:59.000Z
phi/geom/__init__.py
marc-gav/PhiFlow
b6186fd1503d040997b52d49aa18cd875267c27e
[ "MIT" ]
26
2019-12-12T16:54:06.000Z
2022-03-14T19:44:36.000Z
phi/geom/__init__.py
marc-gav/PhiFlow
b6186fd1503d040997b52d49aa18cd875267c27e
[ "MIT" ]
93
2019-12-08T14:38:27.000Z
2022-03-29T16:38:37.000Z
""" Differentiable geometry package. Classes: * `Geometry` (base type) * `Box` * `Sphere` See the `phi.geom` module documentation at https://tum-pbs.github.io/PhiFlow/Geometry.html """ from ._geom import Geometry, Point, assert_same_rank from ._union import union from ._box import Box, GridCell, BaseBox from ._sphe...
22.571429
90
0.746835
220f0a56f2984db60e8a7022cda13412e96730ee
8,617
py
Python
mainpro_FER.py
LiangJunYu88/Facial-Expression-Recognition-darknet
95ff7a594cb7dfaf39bed5d963082b26513cead7
[ "MIT" ]
null
null
null
mainpro_FER.py
LiangJunYu88/Facial-Expression-Recognition-darknet
95ff7a594cb7dfaf39bed5d963082b26513cead7
[ "MIT" ]
null
null
null
mainpro_FER.py
LiangJunYu88/Facial-Expression-Recognition-darknet
95ff7a594cb7dfaf39bed5d963082b26513cead7
[ "MIT" ]
null
null
null
'''Train Fer2013 with PyTorch.''' # 10 crop for data enhancement from __future__ import print_function import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torch.backends.cudnn as cudnn import torchvision import transforms as transforms import numpy as np im...
38.297778
113
0.662876
a2063ccf5fa1fe4253b1e3dcfff2833ba89e0f58
1,778
py
Python
Wheat/wheat_nn.py
jdmccaffrey/keras-succinctly
cf8d75166181df908c15475d19989b90cd1e2c3e
[ "MIT" ]
2
2019-10-23T18:03:39.000Z
2020-04-14T22:00:49.000Z
Wheat/wheat_nn.py
jdmccaffrey/keras-succinctly
cf8d75166181df908c15475d19989b90cd1e2c3e
[ "MIT" ]
null
null
null
Wheat/wheat_nn.py
jdmccaffrey/keras-succinctly
cf8d75166181df908c15475d19989b90cd1e2c3e
[ "MIT" ]
3
2021-03-24T19:19:31.000Z
2021-12-17T18:39:22.000Z
# wheat_nn.py # Python 3.5.2, TensorFlow 2.1.5, Keras 1.7.0 import numpy as np import keras as K import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' def main(): # 0. get started print("\nWheat dataset using Keras/TensorFlow ") np.random.seed(1) # 1. load data print("Loading wheat data into memor...
35.56
101
0.673791
d9a1f8f1fe056cd4ae55568248fe5ac55363a694
7,474
py
Python
test/dlc_tests/sanity/test_telemetry.py
johnbensnyder/deep-learning-containers
5ecc625683887edd54c28431ac3cf6b95f30e84d
[ "Apache-2.0" ]
383
2020-05-19T18:09:10.000Z
2022-03-29T22:41:05.000Z
test/dlc_tests/sanity/test_telemetry.py
johnbensnyder/deep-learning-containers
5ecc625683887edd54c28431ac3cf6b95f30e84d
[ "Apache-2.0" ]
551
2020-05-27T17:25:50.000Z
2022-03-31T18:00:35.000Z
test/dlc_tests/sanity/test_telemetry.py
ZeroInfinite/deep-learning-containers
6eea9db5e06e2c61178532378ea3b2b9ed4f7a4d
[ "Apache-2.0" ]
263
2020-05-19T18:17:12.000Z
2022-03-29T22:41:10.000Z
import time import pytest from test import test_utils from test.test_utils import ec2 as ec2_utils from test.test_utils import ecs as ecs_utils @pytest.mark.usefixtures("sagemaker", "huggingface") @pytest.mark.model("N/A") @pytest.mark.processor("gpu") @pytest.mark.integration("telemetry") @pytest.mark.parametrize(...
49.496689
143
0.768799
21c14c966c6c66fbc70df2765581ae87fae998ef
1,695
py
Python
django_htcpcp_tea/decorators.py
blueschu/django-htcpcp-tea
5dd7451bd8c3e6755595aec2debe8fe5f8defc7c
[ "MIT" ]
4
2019-09-16T20:45:14.000Z
2022-03-24T08:42:34.000Z
django_htcpcp_tea/decorators.py
blueschu/django-htcpcp-tea
5dd7451bd8c3e6755595aec2debe8fe5f8defc7c
[ "MIT" ]
1
2020-10-08T09:26:22.000Z
2020-10-08T09:26:22.000Z
django_htcpcp_tea/decorators.py
blueschu/django-htcpcp-tea
5dd7451bd8c3e6755595aec2debe8fe5f8defc7c
[ "MIT" ]
null
null
null
# Copyright (c) 2019 Brian Schubert # # This file is distributed under the MIT License. If a copy of the # MIT License was not distributed with this file, you can obtain one # at https://opensource.org/licenses/MIT. from functools import wraps from django.http import Http404 from .settings import htcpcp_settings ...
28.25
85
0.683186
53e2cb0bcde15154db563286c5a1c7bf9b73a9cf
2,287
py
Python
MiDaS/run.py
FrostyStrats/3d-photo-inpainting
4ce2f14fb9e755b18b8914512a32ce70fbbfd375
[ "MIT" ]
50
2020-07-21T19:20:26.000Z
2022-03-14T12:54:33.000Z
MiDaS/run.py
FrostyStrats/3d-photo-inpainting
4ce2f14fb9e755b18b8914512a32ce70fbbfd375
[ "MIT" ]
null
null
null
MiDaS/run.py
FrostyStrats/3d-photo-inpainting
4ce2f14fb9e755b18b8914512a32ce70fbbfd375
[ "MIT" ]
15
2020-07-21T19:35:13.000Z
2020-11-09T15:11:48.000Z
"""Compute depth maps for images in the input folder. """ import os import glob import torch # from monodepth_net import MonoDepthNet # import utils import matplotlib.pyplot as plt import numpy as np import cv2 import imageio def run_depth(img_names, input_path, output_path, model_path, Net, utils, target_w=None): ...
27.890244
115
0.637079
47783c2aa48c5f4c6f264dfd1acc64d033e9dc0d
413
py
Python
backend/myClippingsLibrary/wsgi.py
MattiooFR/kindle-clipping-parser
b66464ab22a04fd54dae0d66ac817c0676693898
[ "MIT" ]
null
null
null
backend/myClippingsLibrary/wsgi.py
MattiooFR/kindle-clipping-parser
b66464ab22a04fd54dae0d66ac817c0676693898
[ "MIT" ]
null
null
null
backend/myClippingsLibrary/wsgi.py
MattiooFR/kindle-clipping-parser
b66464ab22a04fd54dae0d66ac817c0676693898
[ "MIT" ]
null
null
null
""" WSGI config for myClippingsLibrary project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('D...
24.294118
78
0.79661
f013aebc3a07e25d78447f88096462ae2a26abcb
142
py
Python
trovi/apps.py
ChameleonCloud/trovi
69ecb4ee164b45309ddc46e0e3a3847486eaeea7
[ "Apache-2.0" ]
null
null
null
trovi/apps.py
ChameleonCloud/trovi
69ecb4ee164b45309ddc46e0e3a3847486eaeea7
[ "Apache-2.0" ]
16
2021-10-29T19:17:17.000Z
2022-03-25T18:34:52.000Z
trovi/apps.py
ChameleonCloud/trovi
69ecb4ee164b45309ddc46e0e3a3847486eaeea7
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class TroviConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "trovi"
20.285714
56
0.753521
2e09fcd1cb59f26af265b2b7442c47f17ae13a90
621
py
Python
class.py
Aleksander-Protasevich/academy
70f5de3a72cb74785c2db058eadef806cd89270d
[ "Apache-2.0" ]
null
null
null
class.py
Aleksander-Protasevich/academy
70f5de3a72cb74785c2db058eadef806cd89270d
[ "Apache-2.0" ]
null
null
null
class.py
Aleksander-Protasevich/academy
70f5de3a72cb74785c2db058eadef806cd89270d
[ "Apache-2.0" ]
null
null
null
class Familly: legs = 2 def __init__(self, a = 'Protasevich', b = 'Minsk'): self.__surname = a self.city = b def descr(self, name): print(f'{name} {self.surname} lives in {self.city}') def job(self, prof): self.descr('Dima') print(f'{self.surname} is a {prof}') ...
20.7
60
0.600644
1786ce718f06a6c86006c84b9c0b0891660d5619
6,995
py
Python
airflow/providers/google/cloud/hooks/kms.py
daemon-demon/airflow
6f96e81f0123b30750fb68ec496246023bf63f35
[ "Apache-2.0" ]
1
2020-08-05T18:30:40.000Z
2020-08-05T18:30:40.000Z
airflow/providers/google/cloud/hooks/kms.py
daemon-demon/airflow
6f96e81f0123b30750fb68ec496246023bf63f35
[ "Apache-2.0" ]
20
2021-01-23T12:33:08.000Z
2021-12-07T22:30:37.000Z
airflow/providers/google/cloud/hooks/kms.py
daemon-demon/airflow
6f96e81f0123b30750fb68ec496246023bf63f35
[ "Apache-2.0" ]
1
2020-09-10T09:51:46.000Z
2020-09-10T09:51:46.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...
40.201149
105
0.661187
5f315b7619c44c492b047ca1f6231be427350104
15,412
py
Python
angr/analyses/decompiler/optimization_passes/div_simplifier.py
BA7JCM/angr
187a713c35759d998d93dfc5280630976d42d717
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/decompiler/optimization_passes/div_simplifier.py
BA7JCM/angr
187a713c35759d998d93dfc5280630976d42d717
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/decompiler/optimization_passes/div_simplifier.py
BA7JCM/angr
187a713c35759d998d93dfc5280630976d42d717
[ "BSD-2-Clause" ]
null
null
null
import logging import math from ailment import Expr from .engine_base import SimplifierAILEngine, SimplifierAILState from .optimization_pass import OptimizationPass, OptimizationPassStage _l = logging.getLogger(name=__name__) class DivSimplifierAILEngine(SimplifierAILEngine): """ An AIL pass for the div si...
49.716129
120
0.535427
3748bb75e8bf00c7ef6ac74aee0a6cd68356703e
131
py
Python
setup/apps/products/urls.py
asim3/django-template
2639eea9cea9a48e08163898ec25860908ad0cdf
[ "MIT" ]
null
null
null
setup/apps/products/urls.py
asim3/django-template
2639eea9cea9a48e08163898ec25860908ad0cdf
[ "MIT" ]
null
null
null
setup/apps/products/urls.py
asim3/django-template
2639eea9cea9a48e08163898ec25860908ad0cdf
[ "MIT" ]
1
2021-07-12T23:28:24.000Z
2021-07-12T23:28:24.000Z
from django.urls import path from .views import ProductsView urlpatterns = [ path('', ProductsView.as_view(), name="home"), ]
18.714286
50
0.709924
23a30388f5353b4af294540ec5b8c270e44485aa
165
py
Python
downloads/urls.py
neuromat/portal
78c1f8c9e20c46d283b693d54d009bd19bda90de
[ "CC-BY-4.0" ]
3
2017-12-14T12:09:28.000Z
2021-07-02T02:26:55.000Z
downloads/urls.py
neuromat/portal
78c1f8c9e20c46d283b693d54d009bd19bda90de
[ "CC-BY-4.0" ]
null
null
null
downloads/urls.py
neuromat/portal
78c1f8c9e20c46d283b693d54d009bd19bda90de
[ "CC-BY-4.0" ]
1
2018-06-13T19:55:33.000Z
2018-06-13T19:55:33.000Z
from django.conf.urls import url from . import views urlpatterns = [ url(r'(?P<experiment_id>[0-9]+)/$', views.download_view, name='download-view') ]
16.5
60
0.648485
d264f4c3f91dfcbb2627ec65b4715a0a7b95b91e
10,095
py
Python
tests/test_email_utils.py
thijstriemstra/aiosmtplib
39bab303bf15cc8e14aa0b7cffe800f1e7f83e58
[ "MIT" ]
null
null
null
tests/test_email_utils.py
thijstriemstra/aiosmtplib
39bab303bf15cc8e14aa0b7cffe800f1e7f83e58
[ "MIT" ]
null
null
null
tests/test_email_utils.py
thijstriemstra/aiosmtplib
39bab303bf15cc8e14aa0b7cffe800f1e7f83e58
[ "MIT" ]
null
null
null
""" Test message and address parsing/formatting functions. """ from email.header import Header from email.headerregistry import Address from email.message import EmailMessage, Message import pytest from hypothesis import example, given from hypothesis.strategies import emails from aiosmtplib.email import ( extrac...
31.157407
88
0.656563
bad844fcba8fa0200e26189731821eca12748a47
3,171
py
Python
tests/test_intersection.py
DMGREENHOUSE/tokamesh
f2b3d7fedaf998a8984fed30ee94233ac39ea327
[ "MIT" ]
3
2021-08-08T09:51:33.000Z
2021-09-09T07:57:24.000Z
tests/test_intersection.py
DMGREENHOUSE/tokamesh
f2b3d7fedaf998a8984fed30ee94233ac39ea327
[ "MIT" ]
2
2021-12-09T11:48:35.000Z
2022-01-12T18:22:59.000Z
tests/test_intersection.py
DMGREENHOUSE/tokamesh
f2b3d7fedaf998a8984fed30ee94233ac39ea327
[ "MIT" ]
2
2021-12-09T11:18:09.000Z
2022-03-15T12:00:16.000Z
from tokamesh.intersection import edge_rectangle_intersection import numpy as np import pytest @pytest.mark.parametrize( "R_edges, z_edges", [ ((0, 1), (2, 2)), # Top, horizontal ((0.5, 0.5), (2, 3)), # Top, vertical ((2, 3), (0.5, 0.5)), # Right, horizontal ((2, 2), (0, 1)...
29.915094
86
0.545254
2c7deb1027a941119c0c1335d827f0a1ecfa0b1e
695
py
Python
qingmi/utils/time.py
xiongxianzhu/qingmi
ae5a446abec3982ebf2c5dde8546ef72f9453137
[ "BSD-3-Clause" ]
20
2018-05-22T09:29:40.000Z
2020-12-11T04:53:15.000Z
qingmi/utils/time.py
xiongxianzhu/qingmi
ae5a446abec3982ebf2c5dde8546ef72f9453137
[ "BSD-3-Clause" ]
65
2019-03-07T02:43:06.000Z
2021-01-07T03:43:52.000Z
qingmi/utils/time.py
xiongxianzhu/qingmi
ae5a446abec3982ebf2c5dde8546ef72f9453137
[ "BSD-3-Clause" ]
6
2019-03-08T06:39:47.000Z
2021-07-01T11:02:56.000Z
# coding: utf-8 from datetime import datetime, date, timedelta def time2seconds(t): """ 时间转秒数 """ """ t是字符串类型, 如'16:24:41' """ h, m, s = t.strip().split(":") return int(h) * 3600 + int(m) * 60 + int(s) # return int(timedelta(hours=int(h),minutes=int(m), # seconds=int(s)).total_seconds()) de...
25.740741
81
0.539568
3d8382f86a9a4d5ea216bb8f7052a99f319a1d1f
944
py
Python
ADVANCED_MODULE/05_Functions_Advanced/EXERCISE/11_Math_Operations.py
sleepychild/SoftUni_SE
ae94488befb6de8b74ffdcb14ed6470739a67786
[ "MIT" ]
null
null
null
ADVANCED_MODULE/05_Functions_Advanced/EXERCISE/11_Math_Operations.py
sleepychild/SoftUni_SE
ae94488befb6de8b74ffdcb14ed6470739a67786
[ "MIT" ]
1
2022-01-15T10:33:56.000Z
2022-01-15T10:33:56.000Z
ADVANCED_MODULE/05_Functions_Advanced/EXERCISE/11_Math_Operations.py
sleepychild/SoftUni_SE
ae94488befb6de8b74ffdcb14ed6470739a67786
[ "MIT" ]
null
null
null
def math_operations(*args, **kwargs): float_list = list(args) while float_list: for k, v in kwargs.items(): try: kwargs[k] = { "a": lambda x, y: x + y, "s": lambda x, y: x - y, "d": lambda x, y: x / y, ...
32.551724
86
0.426907
835cef47e0fff4f09020e0c18b866f558a00285d
6,415
py
Python
PythonProjects/99-CapstoneProject-202020-DavidAndVIbha/project2_individual/run_this_on_LAPTOP.py
much2mutch/csse120-public
4f862a6deb7a5373fb5723fb2a23e4042e4d4157
[ "MIT" ]
null
null
null
PythonProjects/99-CapstoneProject-202020-DavidAndVIbha/project2_individual/run_this_on_LAPTOP.py
much2mutch/csse120-public
4f862a6deb7a5373fb5723fb2a23e4042e4d4157
[ "MIT" ]
null
null
null
PythonProjects/99-CapstoneProject-202020-DavidAndVIbha/project2_individual/run_this_on_LAPTOP.py
much2mutch/csse120-public
4f862a6deb7a5373fb5723fb2a23e4042e4d4157
[ "MIT" ]
null
null
null
""" Capstone Team Project. Code to run on a LAPTOP (NOT the robot). This code contains the one and only MAIN function for running on the laptop. This code: 1. Displays and runs the Graphical User Interface (GUI), and 2. Talks to the robot (by sending MQTT messages) through the GUI, and 3. Listens for message...
39.84472
80
0.575526
c264625e5e0fa79dd1cfc5eed313d4a2464b01aa
4,132
py
Python
chiebukuro.py
l-plantarum/chiebukuro
daaa74434e5fa25760d70349532884ade41f147b
[ "Apache-2.0" ]
null
null
null
chiebukuro.py
l-plantarum/chiebukuro
daaa74434e5fa25760d70349532884ade41f147b
[ "Apache-2.0" ]
3
2018-01-08T06:12:26.000Z
2018-01-21T05:51:30.000Z
chiebukuro.py
l-plantarum/chiebukuro
daaa74434e5fa25760d70349532884ade41f147b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # coding=utf-8 import time import urllib.request from bs4 import BeautifulSoup import sys from pymongo import MongoClient import re import datetime import json import syslog # 指定した記事を開き,取り消し済みならNoneを返す def urlopen(url): try: resp = urllib.request.urlopen(url) except urllib.error.HTTPError as e...
20.974619
90
0.644966
e420382355e8d4e6374233b7b462e692d0cfd03d
915
py
Python
mxfold2/utils/st2bpseq.py
proterabio/mxfold2
571ba83a9caa562f3fef4701648602469fde8ebe
[ "MIT" ]
null
null
null
mxfold2/utils/st2bpseq.py
proterabio/mxfold2
571ba83a9caa562f3fef4701648602469fde8ebe
[ "MIT" ]
null
null
null
mxfold2/utils/st2bpseq.py
proterabio/mxfold2
571ba83a9caa562f3fef4701648602469fde8ebe
[ "MIT" ]
null
null
null
import sys canonicals = {('a', 'u'), ('u', 'a'), ('c', 'g'), ('g', 'c'), ('g', 'u'), ('u', 'g')} def parse_paren(seq: str, stru: str, parens=["()"], allowed_pairs=None): seq = seq.lower() bp = [0] * (len(stru) + 1) st = [] for paren in parens: for i, c in enumerate(stru): if c == ...
27.727273
97
0.439344
307c694ea17bbe9fb1189fe5affdc38bd914dc9f
3,513
py
Python
appkernel/query.py
thingsplode/appkernel
1be8707f535e9f8ad78ef944f2631b15ce03e8f3
[ "Apache-2.0" ]
156
2018-05-08T23:46:54.000Z
2021-09-14T11:23:26.000Z
appkernel/query.py
thingsplode/appkernel
1be8707f535e9f8ad78ef944f2631b15ce03e8f3
[ "Apache-2.0" ]
5
2018-07-13T11:28:59.000Z
2019-04-11T19:30:22.000Z
appkernel/query.py
thingsplode/appkernel
1be8707f535e9f8ad78ef944f2631b15ce03e8f3
[ "Apache-2.0" ]
12
2018-07-12T15:07:28.000Z
2020-10-25T06:32:44.000Z
import inspect, re import types from flask import request import appkernel.service from .model import get_argument_spec class QueryProcessor(object): """ The query processor is used by the Service implementation. """ def __init__(self): # self.query_pattern = re.compile('^(\w+:[\[\],\<\>A-Z...
44.468354
147
0.594933
217199741c69648150fbd523fc6f07a21de56382
1,852
py
Python
backend/app.py
KakoozaJerry/sera
eee127ce8c73772f5f980e4f5e9b1887a790c465
[ "MIT" ]
null
null
null
backend/app.py
KakoozaJerry/sera
eee127ce8c73772f5f980e4f5e9b1887a790c465
[ "MIT" ]
2
2020-04-13T18:33:36.000Z
2021-05-11T10:26:06.000Z
backend/app.py
KakoozaJerry/sera
eee127ce8c73772f5f980e4f5e9b1887a790c465
[ "MIT" ]
null
null
null
from flask import Flask ,jsonify ,abort ,make_response ,request from flask_restful import Resource, Api #from ./estimator import * app = Flask(__name__) api = Api(app) class HelloWorld(Resource): def get(self): return {'hello': data} api.add_resource(HelloWorld, '/api/v1/on-covid-19') todos = {} class ...
25.027027
74
0.598812
661dd8f6353ec69693a37453e66b63cd729ae498
382
py
Python
python/itertools/maximize_it.py
avenet/hackerrank
e522030a023af4ff50d5fc64bd3eba30144e006c
[ "MIT" ]
null
null
null
python/itertools/maximize_it.py
avenet/hackerrank
e522030a023af4ff50d5fc64bd3eba30144e006c
[ "MIT" ]
null
null
null
python/itertools/maximize_it.py
avenet/hackerrank
e522030a023af4ff50d5fc64bd3eba30144e006c
[ "MIT" ]
null
null
null
from itertools import product k, m = map(int, input().split()) def compute_f(items): return sum(items) % m items_list = [] for i in range(k): items_list.append( [ int(x) ** 2 for x in input().split()[1:] ] ) print( max( map( ...
13.172414
34
0.45288
b599fd3155e845b1040c8ec9cfc525247c5ecd5a
6,362
py
Python
flexget/plugins/cli/check.py
tarzasai/Flexget
e5822874b2ee088b508390ff02c4eda9785596bc
[ "MIT" ]
1
2018-05-02T21:14:50.000Z
2018-05-02T21:14:50.000Z
flexget/plugins/cli/check.py
tarzasai/Flexget
e5822874b2ee088b508390ff02c4eda9785596bc
[ "MIT" ]
null
null
null
flexget/plugins/cli/check.py
tarzasai/Flexget
e5822874b2ee088b508390ff02c4eda9785596bc
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import codecs import logging import yaml from flexget import options from flexget.event import event from flexget.terminal import console log = logging.getLogger('check') @e...
38.792683
110
0.587551
ca0c35c26bb6588698b3b58afe30b928f91f3f01
18,332
py
Python
neutron_fwaas/extensions/firewall.py
mail2nsrajesh/neutron-fwaas
8d7cc87711c279789af70af4034b5f4f45dc41b0
[ "Apache-2.0" ]
null
null
null
neutron_fwaas/extensions/firewall.py
mail2nsrajesh/neutron-fwaas
8d7cc87711c279789af70af4034b5f4f45dc41b0
[ "Apache-2.0" ]
null
null
null
neutron_fwaas/extensions/firewall.py
mail2nsrajesh/neutron-fwaas
8d7cc87711c279789af70af4034b5f4f45dc41b0
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Big Switch Networks, 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...
36.373016
79
0.608062
8089fd489d6d963c6c3a62712b38a6235472c17e
417
py
Python
YesNoPopup.py
xavirambla/YesNoPopupForSikuli
9effab101c7a5329c304eec20380555bcdb4c4ab
[ "Apache-2.0" ]
null
null
null
YesNoPopup.py
xavirambla/YesNoPopupForSikuli
9effab101c7a5329c304eec20380555bcdb4c4ab
[ "Apache-2.0" ]
null
null
null
YesNoPopup.py
xavirambla/YesNoPopupForSikuli
9effab101c7a5329c304eec20380555bcdb4c4ab
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: UTF-8 -*- from javax.swing import JOptionPane; ## Función que crea un formulario SI/No para solicitar el dato al usuario. def YesNoPopup(msg="",title=""): result = JOptionPane.showConfirmDialog(None,msg,title,JOptionPane.YES_NO_OPTION); if result == JOptionPane.YES_OPTION : ...
32.076923
85
0.70024
8de6e78d083b07f3af49a0851f9693af5ccddbf2
323
py
Python
csv_to_html_code.py
APesch90/Web-Design-Challenge
4b122187da2835c43780457d1dde34bd8d9ce96d
[ "ADSL" ]
null
null
null
csv_to_html_code.py
APesch90/Web-Design-Challenge
4b122187da2835c43780457d1dde34bd8d9ce96d
[ "ADSL" ]
null
null
null
csv_to_html_code.py
APesch90/Web-Design-Challenge
4b122187da2835c43780457d1dde34bd8d9ce96d
[ "ADSL" ]
null
null
null
# Use pandas to convert csv to HTML table import pandas as pd import os # Get path where csv exists path = os.path.join('Resources', 'cities.csv') # Read csv file cities_df = pd.read_csv(path) # Save as html file table_html = cities_df.to_html('Resources/table.html', index=False, classes=['table', 'table-striped...
26.916667
103
0.727554
e0b4950755adbf2a481131edda2d7d1451556c72
448
py
Python
bnu/backup/2020summerRank4/cf_a_两只老虎.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
bnu/backup/2020summerRank4/cf_a_两只老虎.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
bnu/backup/2020summerRank4/cf_a_两只老虎.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # 2020暑期排位4A两只老虎 # https://codeforces.com/group/H9K9zY8tcT/contest/286003/problem/A # il = ['2-','4-','6-','7-','2','4','6','7','2+','4+','6+','7+'] n = int(input()) notes = input() nl = notes.split(' ') el = ['5--','1-','3-','5-','1','3','5','1+','3+','5+','1++','3++'] al = '' for n ...
21.333333
67
0.424107
f7a789b8d160631fbb7acc087eeba6ebe29e60a3
491
py
Python
example_8.py
mikolevy/webinar-function-examples
181ffee74654dbc52b8a86ff01f35ebabd388b3a
[ "MIT" ]
null
null
null
example_8.py
mikolevy/webinar-function-examples
181ffee74654dbc52b8a86ff01f35ebabd388b3a
[ "MIT" ]
null
null
null
example_8.py
mikolevy/webinar-function-examples
181ffee74654dbc52b8a86ff01f35ebabd388b3a
[ "MIT" ]
null
null
null
import functools def log_info(func): @functools.wraps(func) def wrapper(*args, **kwargs): print("Wywołuję funkcję...") result = func(*args, **kwargs) print("Już po wszystkim :)") return result return wrapper @log_info def calculate_sum(a, b): return a + b def run_...
15.83871
38
0.625255
dfd40377645d639b7680dea89c56fca860399b46
39,082
py
Python
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
null
null
null
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "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 ...
39.357503
296
0.637685
cdf18e1e507f0b782418eaca616c3a82a6b322dc
20,947
py
Python
venv/Lib/site-packages/flask_session/sessions.py
RobMilinski/Xero-Starter-Branched-Test
c82382e674b34c2336ee164f5a079d6becd1ed46
[ "MIT" ]
2
2021-11-14T05:09:20.000Z
2022-01-09T06:50:16.000Z
venv/lib/python3.8/site-packages/flask_session/sessions.py
alemux/flaskcms
2cc9660d6f65570e3c3732e1f2fb3a5faaba24c9
[ "MIT" ]
5
2021-05-07T10:31:27.000Z
2021-05-07T10:33:37.000Z
venv/lib/python3.8/site-packages/flask_session/sessions.py
alemux/flaskcms
2cc9660d6f65570e3c3732e1f2fb3a5faaba24c9
[ "MIT" ]
2
2021-11-14T05:09:32.000Z
2022-02-14T11:11:43.000Z
# -*- coding: utf-8 -*- """ flask_session.sessions ~~~~~~~~~~~~~~~~~~~~~~ Server-side Sessions and SessionInterfaces. :copyright: (c) 2014 by Shipeng Feng. :license: BSD, see LICENSE for more details. """ import sys import time from datetime import datetime from uuid import uuid4 try: import c...
37.206039
79
0.613214
02ee424382bb6fb1dc2f445cebeac7447b7e60a0
2,793
py
Python
loyalicos/simplified_http_client.py
loyalicos/python-sdk
a57911d2b912b8922277477b2263f07ccad3e93e
[ "MIT" ]
null
null
null
loyalicos/simplified_http_client.py
loyalicos/python-sdk
a57911d2b912b8922277477b2263f07ccad3e93e
[ "MIT" ]
null
null
null
loyalicos/simplified_http_client.py
loyalicos/python-sdk
a57911d2b912b8922277477b2263f07ccad3e93e
[ "MIT" ]
null
null
null
from typing import List import requests from .exceptions import * class Response(object): """ Holds the Response from API Calls """ def __init__(self, response, format="json"): """ :param response: The return value from an api call from a requests call :type res...
31.738636
128
0.581454
2a33af13390e2c99ee87badd85adfb4f78022477
1,897
py
Python
metrics/calibration.py
Jeanselme/SklearnTS
bf2f284bf4f2b3440b0418e89957c488b4eb35ca
[ "MIT" ]
null
null
null
metrics/calibration.py
Jeanselme/SklearnTS
bf2f284bf4f2b3440b0418e89957c488b4eb35ca
[ "MIT" ]
null
null
null
metrics/calibration.py
Jeanselme/SklearnTS
bf2f284bf4f2b3440b0418e89957c488b4eb35ca
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import brier_score_loss from sklearn.calibration import calibration_curve from utils.utils import flatten, selection def calibrationPlot(predictions, truth, classes = None, label = "Model", newFigure = None, n_bins = 5): """ Computes ...
48.641026
187
0.659462
4fe8c3b122568b4008475ec8f44a9a87aa783f22
741
py
Python
pgAdmin4/pgAdmin4/lib/python2.7/site-packages/pgadmin4/pgadmin/setup/db_upgrade.py
Anillab/One-Minute-Pitch
123f7b2010d3ae0f031066db1bcfe6eda7a41e84
[ "MIT" ]
4
2019-10-03T21:58:22.000Z
2021-02-12T13:33:32.000Z
pgAdmin4/pgAdmin4/lib/python2.7/site-packages/pgadmin4/pgadmin/setup/db_upgrade.py
Anillab/One-Minute-Pitch
123f7b2010d3ae0f031066db1bcfe6eda7a41e84
[ "MIT" ]
4
2020-01-22T13:45:12.000Z
2022-02-10T20:58:09.000Z
pgAdmin4/pgAdmin4/lib/python2.7/site-packages/pgadmin4/pgadmin/setup/db_upgrade.py
Anillab/One-Minute-Pitch
123f7b2010d3ae0f031066db1bcfe6eda7a41e84
[ "MIT" ]
1
2021-01-13T09:30:29.000Z
2021-01-13T09:30:29.000Z
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2018, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ########################################################################## import os import ...
28.5
76
0.523617
5d1d85f05f27e76c0bc9d159b03601b9776daf23
2,567
py
Python
ta/utils.py
ludydoo/ta
20caf3e255ac39d1307dc099db24c6f36ba5ca05
[ "MIT" ]
1
2022-02-06T17:31:08.000Z
2022-02-06T17:31:08.000Z
ta/utils.py
Faiz00762/ta
20caf3e255ac39d1307dc099db24c6f36ba5ca05
[ "MIT" ]
null
null
null
ta/utils.py
Faiz00762/ta
20caf3e255ac39d1307dc099db24c6f36ba5ca05
[ "MIT" ]
1
2022-02-07T18:40:23.000Z
2022-02-07T18:40:23.000Z
""" .. module:: utils :synopsis: Utils classes and functions. .. moduleauthor:: Dario Lopez Padial (Bukosabino) """ import math import numpy as np import pandas as pd class IndicatorMixin: """Util mixin indicator class""" _fillna = False def _check_fillna(self, series: pd.Series, value: int = 0) -...
31.691358
88
0.62875
5b99a64d582b7e580863fbedd94d686d198a7718
9,746
py
Python
nilearn/decoding/tests/test_graph_net.py
ctw/nilearn
932eee9c69cd8fbf40ee6af5cee77f8f93b25da3
[ "BSD-2-Clause" ]
1
2022-02-09T17:47:38.000Z
2022-02-09T17:47:38.000Z
nilearn/decoding/tests/test_graph_net.py
ctw/nilearn
932eee9c69cd8fbf40ee6af5cee77f8f93b25da3
[ "BSD-2-Clause" ]
4
2021-09-15T10:02:44.000Z
2021-09-30T12:36:43.000Z
nilearn/decoding/tests/test_graph_net.py
ctw/nilearn
932eee9c69cd8fbf40ee6af5cee77f8f93b25da3
[ "BSD-2-Clause" ]
1
2020-05-25T13:55:45.000Z
2020-05-25T13:55:45.000Z
import numpy as np import scipy as sp from numpy.testing import assert_almost_equal from scipy import linalg from sklearn.utils import check_random_state from nilearn.decoding.objective_functions import _gradient, _div from nilearn.decoding.space_net_solvers import ( _graph_net_data_function, _graph_net_adjoint...
39.45749
79
0.659347
bf0912e9f6165eea3234a2033a7aabfc0e46ac89
34,214
py
Python
napalm_yang/models/openconfig/components/component/transceiver/physical_channels/channel/state/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
64
2016-10-20T15:47:18.000Z
2021-11-11T11:57:32.000Z
napalm_yang/models/openconfig/components/component/transceiver/physical_channels/channel/state/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
126
2016-10-05T10:36:14.000Z
2019-05-15T08:43:23.000Z
napalm_yang/models/openconfig/components/component/transceiver/physical_channels/channel/state/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
63
2016-11-07T15:23:08.000Z
2021-09-22T14:41:16.000Z
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
42.344059
499
0.624423
8edcbdf4c4824892605f0b1cf5b397d3c25fbe8c
1,991
py
Python
scalyr_agent/third_party/pysnmp/proto/secmod/rfc3414/localkey.py
code-sauce/scalyr-agent-2
41023d5c1272186193dd02900782b150dda5f38e
[ "Apache-2.0" ]
67
2015-02-03T00:35:33.000Z
2022-03-23T10:14:26.000Z
scalyr_agent/third_party/pysnmp/proto/secmod/rfc3414/localkey.py
code-sauce/scalyr-agent-2
41023d5c1272186193dd02900782b150dda5f38e
[ "Apache-2.0" ]
578
2015-04-09T08:58:56.000Z
2022-03-30T12:13:21.000Z
scalyr_agent/third_party/pysnmp/proto/secmod/rfc3414/localkey.py
code-sauce/scalyr-agent-2
41023d5c1272186193dd02900782b150dda5f38e
[ "Apache-2.0" ]
58
2015-01-15T22:00:43.000Z
2022-02-18T15:48:31.000Z
# Convert plaintext passphrase into a localized key try: from hashlib import md5, sha1 except ImportError: import md5, sha md5 = md5.new sha1 = sha.new from pyasn1.type import univ # RFC3414: A.2.1 def hashPassphraseMD5(passphrase): passphrase = univ.OctetString(passphrase).asOctets() md = md5(...
30.630769
78
0.638875
ef84a970a57b27217279bd11ae9cce14beffb4e3
6,094
py
Python
tests/test_timeline.py
nryant/pyannote-core
274402c0a7ce33efd9e17551cb808ba0dc12249b
[ "MIT" ]
1
2020-05-02T08:43:59.000Z
2020-05-02T08:43:59.000Z
tests/test_timeline.py
snorkeldepth/pyannote-core
278338a515f6408ecfdd6cdf10e6b406ae25eff9
[ "MIT" ]
null
null
null
tests/test_timeline.py
snorkeldepth/pyannote-core
278338a515f6408ecfdd6cdf10e6b406ae25eff9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2016-2017 CNRS # 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 limita...
34.822857
96
0.593863
e9b450246bc98625b0b814c4d061e4796b4049fc
9,052
py
Python
pykrige/rk.py
olaurendin/PyKrige
11117c70bf161ebf87a0720a59443d58865fadc1
[ "BSD-3-Clause" ]
null
null
null
pykrige/rk.py
olaurendin/PyKrige
11117c70bf161ebf87a0720a59443d58865fadc1
[ "BSD-3-Clause" ]
null
null
null
pykrige/rk.py
olaurendin/PyKrige
11117c70bf161ebf87a0720a59443d58865fadc1
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 from pykrige.compat import validate_sklearn validate_sklearn() from pykrige.ok import OrdinaryKriging from pykrige.uk import UniversalKriging from pykrige.ok3d import OrdinaryKriging3D from pykrige.uk3d import UniversalKriging3D from sklearn.base import RegressorMixin, BaseEstimator from sklearn.svm imp...
32.561151
76
0.544079
05ba7e14edfd1db40235e95a8b9e9cb2a9643520
7,071
py
Python
pyzoo/zoo/util/utils.py
jiaxinying/analytics-zoo
c3669b1736088df911c84b38fde3e90a571f51b7
[ "Apache-2.0" ]
4
2018-06-19T05:38:30.000Z
2020-06-22T14:26:26.000Z
pyzoo/zoo/util/utils.py
jiaxinying/analytics-zoo
c3669b1736088df911c84b38fde3e90a571f51b7
[ "Apache-2.0" ]
5
2021-06-08T23:28:18.000Z
2022-02-10T05:31:27.000Z
pyzoo/zoo/util/utils.py
jiaxinying/analytics-zoo
c3669b1736088df911c84b38fde3e90a571f51b7
[ "Apache-2.0" ]
1
2018-09-05T02:16:10.000Z
2018-09-05T02:16:10.000Z
# # Copyright 2018 Analytics Zoo Authors. # # 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...
36.261538
96
0.663273
1d7dd0d13b8eba9be8873ac496b5a26c0920c724
142
py
Python
PPKomp 2021/Set B/05 Sequence Number (2B).py
jaredliw/ppkomp-python-solutions
ecb92f3de27100f37595ef31fd46eccd984b84f7
[ "MIT" ]
1
2021-04-09T13:58:03.000Z
2021-04-09T13:58:03.000Z
PPKomp 2021/Set C/05 Sequence Number (2C).py
jaredliw/ppkomp-python-solutions
ecb92f3de27100f37595ef31fd46eccd984b84f7
[ "MIT" ]
null
null
null
PPKomp 2021/Set C/05 Sequence Number (2C).py
jaredliw/ppkomp-python-solutions
ecb92f3de27100f37595ef31fd46eccd984b84f7
[ "MIT" ]
null
null
null
# Every two consecutive numbers add up to 1 sum_seq = int(input()) if sum_seq < 0: print((-sum_seq * 2) - 1) else: print(sum_seq * 2)
20.285714
43
0.633803
b3ed78700c3f6cd839b7f01e799a202af709389a
4,844
py
Python
tests/test_portd_ct_inter_vlan_interface.py
learnopx/ops-portd
99e01b963a27baf22b61b50f9bff5bc2c645ad41
[ "Apache-2.0" ]
null
null
null
tests/test_portd_ct_inter_vlan_interface.py
learnopx/ops-portd
99e01b963a27baf22b61b50f9bff5bc2c645ad41
[ "Apache-2.0" ]
1
2016-10-10T14:16:20.000Z
2016-11-08T09:50:53.000Z
tests/test_portd_ct_inter_vlan_interface.py
learnopx/ops-portd
99e01b963a27baf22b61b50f9bff5bc2c645ad41
[ "Apache-2.0" ]
1
2021-09-10T08:17:44.000Z
2021-09-10T08:17:44.000Z
#!/usr/bin/python # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # 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...
38.752
78
0.629851
f2b4cfc08f4c15c780e9da7a9968a31d15be1a05
7,121
py
Python
app/main/views.py
Lourine/BlogPost
1e6dea63260e7684db24abf94e6e724d7bfb60c6
[ "MIT" ]
null
null
null
app/main/views.py
Lourine/BlogPost
1e6dea63260e7684db24abf94e6e724d7bfb60c6
[ "MIT" ]
null
null
null
app/main/views.py
Lourine/BlogPost
1e6dea63260e7684db24abf94e6e724d7bfb60c6
[ "MIT" ]
null
null
null
from flask import render_template,redirect,url_for,abort,request,flash from app.main import main from app.models import User,Blog,Comment,Subscriber from .forms import UpdateProfile,CreateBlog from .. import db from app.requests import get_quotes from flask_login import login_required,current_user from ..email import m...
45.06962
1,344
0.548097
c5f013614ee30d62892a6c61fb8b1fa03ed55cdf
32,296
py
Python
src/oscar/apps/basket/abstract_models.py
iicc/django-oscar
67ebe6bc21c242e9b0750b9f306b2f46a2758199
[ "BSD-3-Clause" ]
2
2019-01-19T22:41:18.000Z
2019-01-21T05:47:23.000Z
src/oscar/apps/basket/abstract_models.py
iicc/django-oscar
67ebe6bc21c242e9b0750b9f306b2f46a2758199
[ "BSD-3-Clause" ]
9
2020-05-11T20:16:09.000Z
2021-11-02T15:44:43.000Z
src/oscar/apps/basket/abstract_models.py
iicc/django-oscar
67ebe6bc21c242e9b0750b9f306b2f46a2758199
[ "BSD-3-Clause" ]
null
null
null
import zlib from decimal import Decimal as D from django.conf import settings from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from django.db import models from django.db.models import Sum from django.utils.encoding import smart_text from django.utils.timezone import now from django.utils.transl...
34.320935
115
0.614008
079d139b781f0b20a953ee454e6863b05441687f
680
py
Python
village/clients/context.py
vasusingla/adversarial_poisons
a1d58d8e31bcb01da494f39ad2b0a707c09acbf4
[ "MIT" ]
21
2021-06-18T20:53:35.000Z
2022-03-28T14:33:01.000Z
village/clients/context.py
vasusingla/adversarial_poisons
a1d58d8e31bcb01da494f39ad2b0a707c09acbf4
[ "MIT" ]
2
2021-07-29T09:38:00.000Z
2022-03-24T23:07:26.000Z
village/clients/context.py
vasusingla/adversarial_poisons
a1d58d8e31bcb01da494f39ad2b0a707c09acbf4
[ "MIT" ]
6
2021-06-23T13:01:51.000Z
2022-03-10T06:55:03.000Z
"""Helper functions for context managing.""" import torch class GPUContext(): """GPU context for quick (code-wise) moves to and from GPU.""" def __init__(self, setup, model): """Init with setup info.""" self.setup = setup self.model = model.to(**self.setup) if torch.cuda.device...
29.565217
66
0.594118
e6882076ab27cbb43a920d377836635f33b2543c
2,279
py
Python
whirlpool_stats/services/tx0s_metrics.py
Samourai-Wallet/whirlpool_stats
63bc92103b594fe1f50cf3b5b82d08b49b34aded
[ "MIT" ]
11
2019-10-24T11:46:50.000Z
2020-08-08T04:46:33.000Z
whirlpool_stats/services/tx0s_metrics.py
Samourai-Wallet/whirlpool_stats
63bc92103b594fe1f50cf3b5b82d08b49b34aded
[ "MIT" ]
1
2019-11-22T17:24:11.000Z
2019-11-23T16:27:03.000Z
whirlpool_stats/services/tx0s_metrics.py
Samourai-Wallet/whirlpool_stats
63bc92103b594fe1f50cf3b5b82d08b49b34aded
[ "MIT" ]
6
2019-10-24T13:30:00.000Z
2021-02-18T22:17:19.000Z
''' Copyright (c) 2019 Katana Cryptographic Ltd. All Rights Reserved. A class computing a set of metrics for the Tx0s ''' from collections import defaultdict from whirlpool_stats.utils.date import get_datetime_of_day class Tx0sMetrics(object): def __init__(self, snapshot= None): ''' Constructor Parame...
33.028986
88
0.682756
1148e289c01b15457c5628d8168e6e41b366e933
1,222
py
Python
pyqtgraph/console/CmdInput.py
abbasegbeyemi/pyqtgraph
6aeafce477d1d7eebb9d2fe824d4c5573ef9ceed
[ "MIT" ]
69
2020-01-06T13:31:06.000Z
2022-03-29T11:23:14.000Z
pyqtgraph/console/CmdInput.py
abbasegbeyemi/pyqtgraph
6aeafce477d1d7eebb9d2fe824d4c5573ef9ceed
[ "MIT" ]
67
2019-11-30T14:45:05.000Z
2022-03-14T20:26:06.000Z
pyqtgraph/console/CmdInput.py
abbasegbeyemi/pyqtgraph
6aeafce477d1d7eebb9d2fe824d4c5573ef9ceed
[ "MIT" ]
13
2020-01-06T13:44:40.000Z
2022-03-29T11:23:17.000Z
from ..Qt import QtCore, QtGui from ..python2_3 import asUnicode class CmdInput(QtGui.QLineEdit): sigExecuteCmd = QtCore.Signal(object) def __init__(self, parent): QtGui.QLineEdit.__init__(self, parent) self.history = [""] self.ptr = 0 def keyPressEvent(self, ev): ...
29.804878
60
0.527823
069ba93793ef8b6c7bf0a8471f766a48250c7911
3,157
py
Python
src/collectors/etcdstat/etcdstat.py
devanshukoyalkar-rubrik/Diamond
c4c3f2e4723c2e4381b7bf5348cc3a25f321315d
[ "MIT" ]
null
null
null
src/collectors/etcdstat/etcdstat.py
devanshukoyalkar-rubrik/Diamond
c4c3f2e4723c2e4381b7bf5348cc3a25f321315d
[ "MIT" ]
null
null
null
src/collectors/etcdstat/etcdstat.py
devanshukoyalkar-rubrik/Diamond
c4c3f2e4723c2e4381b7bf5348cc3a25f321315d
[ "MIT" ]
null
null
null
# coding=utf-8 """ Collects metrics from an Etcd instance. #### Example Configuration ``` host = localhost port = 2379 ``` """ import diamond.collector import json import urllib.request, urllib.error, urllib.parse METRICS_KEYS = ['sendPkgRate', 'recvPkgRate', 'sendAppendReq...
28.7
79
0.540386
cf72cdba4abfeef0dbdf7339f50237072d740131
1,164
py
Python
server/handlers/updateUserHandler.py
zero-os/0-metadata
f316c55c7e041b5f37a6ab5791b28ed19bd46b1a
[ "Apache-2.0" ]
null
null
null
server/handlers/updateUserHandler.py
zero-os/0-metadata
f316c55c7e041b5f37a6ab5791b28ed19bd46b1a
[ "Apache-2.0" ]
18
2018-01-26T11:14:27.000Z
2018-02-16T16:15:42.000Z
server/handlers/updateUserHandler.py
zero-os/0-metadata
f316c55c7e041b5f37a6ab5791b28ed19bd46b1a
[ "Apache-2.0" ]
null
null
null
# THIS FILE IS SAFE TO EDIT. It will not be overwritten when rerunning go-raml. import json as JSON import os import jsonschema from jsonschema import Draft4Validator from flask import current_app, jsonify, request CLASS='user' dir_path = os.path.dirname(os.path.realpath(__file__)) json_schema = JSON.load(open(dir...
31.459459
88
0.7311
f55fdb475c9edb3f1a570cfbb44ad30e496033ab
4,128
py
Python
setup.py
djhoese/nbsite
6ce071341fb5f2499bcd449e354ae3dddd7e5159
[ "BSD-3-Clause" ]
null
null
null
setup.py
djhoese/nbsite
6ce071341fb5f2499bcd449e354ae3dddd7e5159
[ "BSD-3-Clause" ]
null
null
null
setup.py
djhoese/nbsite
6ce071341fb5f2499bcd449e354ae3dddd7e5159
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import glob from setuptools import setup, find_packages import pyct.build NAME = 'nbsite' DESCRIPTION = 'Build a tested, sphinx-based website from notebooks.' # duplicated from pyct.build.get_setup_version until pyct[build] >0.4.6 lands def get_setup_version(root, repon...
31.037594
227
0.588905
0886b3d9c3ef6c065c122543b8f58079613e1bb7
92
py
Python
parameters_8000.py
Rolandas1369/web2pyexamples
bc54591091dc155353ea260a02ea23051244fc01
[ "BSD-3-Clause" ]
null
null
null
parameters_8000.py
Rolandas1369/web2pyexamples
bc54591091dc155353ea260a02ea23051244fc01
[ "BSD-3-Clause" ]
null
null
null
parameters_8000.py
Rolandas1369/web2pyexamples
bc54591091dc155353ea260a02ea23051244fc01
[ "BSD-3-Clause" ]
null
null
null
password="pbkdf2(1000,20,sha512)$a90d1fc57c3ba746$2205350e89368d4f5b9212e883901cb2a2aa10b7"
46
91
0.891304
93d12188638687da6f080a624a5103a579ce6fbd
3,467
py
Python
tests/python/pants_test/goal/test_artifact_cache_stats.py
omerzach/pants
b0d584172a916f6f65cd7e8fecb2fc65323214eb
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/goal/test_artifact_cache_stats.py
omerzach/pants
b0d584172a916f6f65cd7e8fecb2fc65323214eb
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/goal/test_artifact_cache_stats.py
omerzach/pants
b0d584172a916f6f65cd7e8fecb2fc65323214eb
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os from builtins import open, str from contextlib import contextmanager import re...
38.955056
98
0.691953
36d0cdab6633215f798e04103913c0ec65681f4b
2,249
py
Python
models/mccnn.py
skamdar/gesture_recognition
87613dcf923e2c518e2d58853d6b6bb9a8296d17
[ "MIT" ]
null
null
null
models/mccnn.py
skamdar/gesture_recognition
87613dcf923e2c518e2d58853d6b6bb9a8296d17
[ "MIT" ]
null
null
null
models/mccnn.py
skamdar/gesture_recognition
87613dcf923e2c518e2d58853d6b6bb9a8296d17
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import math from functools import partial class myModel(nn.Module): def __init__(self, sample_size, sample_duration, num_classes=9): super(myModel, se...
25.850575
75
0.501112
d3cfa7a6d92796f347ea9a031a33d9a0a79a2340
439
py
Python
pinax/apps/tasks/tests/generate_testdata.py
peiwei/pinax
34f95b1df4318655fe9bd90dcda8fe824e0c4117
[ "MIT" ]
1
2019-02-12T04:45:09.000Z
2019-02-12T04:45:09.000Z
pinax/apps/tasks/tests/generate_testdata.py
alex/pinax
37e17ee2e2eb0e387d8809c12e55c20194a7118a
[ "MIT" ]
null
null
null
pinax/apps/tasks/tests/generate_testdata.py
alex/pinax
37e17ee2e2eb0e387d8809c12e55c20194a7118a
[ "MIT" ]
1
2019-02-12T04:45:40.000Z
2019-02-12T04:45:40.000Z
import random import uuid from django.contrib.auth.models import User from tasks.models import Task def generate_data(tickets, max_tags): myuser = User.objects.all()[0] for i in range(0, tickets): t = Task.objects.create(summary=str(uuid.uuid4()), creator=myuser) t.tags = " ".join(["test%s"...
27.4375
136
0.669704
b4c0fdebf999fd77b40b2d7c1e7d44c6fd05ee1e
6,375
py
Python
configs/sot/siamese_rpn/siamese_rpn_r50_1x_lasot.py
kevin3314/mmtracking
07484a386706caf264670d4998ef57b605002834
[ "Apache-2.0" ]
2,226
2021-01-04T11:13:01.000Z
2022-03-31T11:49:59.000Z
configs/sot/siamese_rpn/siamese_rpn_r50_1x_lasot.py
kevin3314/mmtracking
07484a386706caf264670d4998ef57b605002834
[ "Apache-2.0" ]
300
2021-01-04T11:36:59.000Z
2022-03-31T07:48:28.000Z
configs/sot/siamese_rpn/siamese_rpn_r50_1x_lasot.py
kevin3314/mmtracking
07484a386706caf264670d4998ef57b605002834
[ "Apache-2.0" ]
333
2021-01-04T11:35:12.000Z
2022-03-31T08:11:50.000Z
cudnn_benchmark = False deterministic = True seed = 1 find_unused_parameters = True crop_size = 511 exemplar_size = 127 search_size = 255 # model settings model = dict( type='SiamRPN', backbone=dict( type='SOTResNet', depth=50, out_indices=(1, 2, 3), frozen_stages=4, str...
30.797101
107
0.578039
fec1d7af1be8dd9f930ef4d96ff73301a1e36944
2,657
py
Python
tools/pebble_image_routines.py
xabbudm/time-tracker
d5799062861131c025d8500cedd34852e804a9a1
[ "Apache-2.0" ]
83
2015-04-11T03:45:52.000Z
2021-03-08T22:07:38.000Z
tools/pebble_image_routines.py
xabbudm/time-tracker
d5799062861131c025d8500cedd34852e804a9a1
[ "Apache-2.0" ]
7
2015-08-07T04:32:54.000Z
2016-08-17T20:37:09.000Z
tools/pebble_image_routines.py
xabbudm/time-tracker
d5799062861131c025d8500cedd34852e804a9a1
[ "Apache-2.0" ]
50
2015-04-11T04:19:45.000Z
2021-11-22T23:44:46.000Z
#!/usr/bin/env python # # Copyright (c) 2015 Pebble Technology # import math # This module contains common image and color routines used to convert images # for use with Pebble. # Create pebble 64 colors-table (r, g, b - 2 bits per channel) def pebble_get_64color_palette(): pebble_palette = [] for i in xrang...
32.802469
88
0.601054
b5e9f5766910ecc4eca1579f233ab4c4477ec338
1,559
py
Python
xlsxwriter/test/comparison/test_chart_axis48.py
Rippling/XlsxWriter-1
be8d1cb8f8b156cf87bbe5d591f1f5475804be44
[ "BSD-2-Clause" ]
null
null
null
xlsxwriter/test/comparison/test_chart_axis48.py
Rippling/XlsxWriter-1
be8d1cb8f8b156cf87bbe5d591f1f5475804be44
[ "BSD-2-Clause" ]
null
null
null
xlsxwriter/test/comparison/test_chart_axis48.py
Rippling/XlsxWriter-1
be8d1cb8f8b156cf87bbe5d591f1f5475804be44
[ "BSD-2-Clause" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # SPDX-License-Identifier: BSD-2-Clause # Copyright (c), 2013-2021, John McNamara, jmcnamara@cpan.org # from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompar...
26.87931
96
0.56254
444edd59ce8646d829b5ccdc60e702c50dd72d57
13,022
py
Python
telegram_.py
flofriday/filmresourcebot
7e78d7ceb5ce6042d25a70ece55300a63b235bbb
[ "MIT" ]
5
2019-12-08T23:04:47.000Z
2020-03-03T08:55:52.000Z
telegram_.py
flofriday/filmresourcebot
7e78d7ceb5ce6042d25a70ece55300a63b235bbb
[ "MIT" ]
1
2020-03-02T11:09:58.000Z
2020-03-02T11:09:58.000Z
telegram_.py
flofriday/filmresourcebot
7e78d7ceb5ce6042d25a70ece55300a63b235bbb
[ "MIT" ]
null
null
null
import os from textwrap import dedent import telegram from telegram import ChatAction from telegram.ext import ( CommandHandler, Filters, MessageHandler, Updater, CallbackQueryHandler, ) from telegram.utils import helpers import database import photos # Globals admin_user = None def send_text(u...
30.85782
79
0.640915
646fc5f8b530f9699044c0c262e8e4fbc610eff4
532
py
Python
nails_project/gallery/signals.py
borislavstoychev/nails_project
fd6efc82489f59ba2e16cddd26485843794453ec
[ "MIT" ]
null
null
null
nails_project/gallery/signals.py
borislavstoychev/nails_project
fd6efc82489f59ba2e16cddd26485843794453ec
[ "MIT" ]
null
null
null
nails_project/gallery/signals.py
borislavstoychev/nails_project
fd6efc82489f59ba2e16cddd26485843794453ec
[ "MIT" ]
null
null
null
from django.dispatch import receiver from django.db.models.signals import pre_delete from cloudinary import uploader from nails_project.gallery.models import Gallery @receiver(pre_delete, sender=Gallery) def delete_media_when_account_deleted(sender, instance, **kwargs): if instance.pk: try: ol...
31.294118
66
0.708647
c6cc4a87a77f048d7a4d4b1d2612c39e24f80963
3,109
py
Python
pixiedust/packageManager/package.py
jordangeorge/pixiedust
00e49f4e8ba44cc248685146d3ad7e2d04ac6cd4
[ "Apache-2.0" ]
null
null
null
pixiedust/packageManager/package.py
jordangeorge/pixiedust
00e49f4e8ba44cc248685146d3ad7e2d04ac6cd4
[ "Apache-2.0" ]
null
null
null
pixiedust/packageManager/package.py
jordangeorge/pixiedust
00e49f4e8ba44cc248685146d3ad7e2d04ac6cd4
[ "Apache-2.0" ]
null
null
null
# ------------------------------------------------------------------------------- # Copyright IBM Corp. 2017 # # 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/licens...
34.932584
108
0.580894
ecfb8423fbb7b6548f53a84ae2940191f8cbaa96
4,386
py
Python
imsim/ccd.py
g-braeunlich/imSim
c6f97ba39f05313570d15671f2b9eb9bd1de24bc
[ "BSD-3-Clause" ]
null
null
null
imsim/ccd.py
g-braeunlich/imSim
c6f97ba39f05313570d15671f2b9eb9bd1de24bc
[ "BSD-3-Clause" ]
null
null
null
imsim/ccd.py
g-braeunlich/imSim
c6f97ba39f05313570d15671f2b9eb9bd1de24bc
[ "BSD-3-Clause" ]
null
null
null
import os import galsim from galsim.config import OutputBuilder, RegisterOutputType from .cosmic_rays import CosmicRays from .meta_data import data_dir from .camera import get_camera class LSST_CCDBuilder(OutputBuilder): """This runs the overall generation of an LSST CCD file. Most of the defaults work fine. ...
39.513514
95
0.603739
e3a9f1c83fc52e14ce8734014906bd42fca73c2a
2,235
py
Python
main.py
merey99/Assignment-3-Python
0e894dd582d947b206579e3566af2f5998f9916c
[ "MIT" ]
null
null
null
main.py
merey99/Assignment-3-Python
0e894dd582d947b206579e3566af2f5998f9916c
[ "MIT" ]
null
null
null
main.py
merey99/Assignment-3-Python
0e894dd582d947b206579e3566af2f5998f9916c
[ "MIT" ]
null
null
null
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask import jsonify, request, make_response import jwt import datetime from functools import wraps app = Flask(__name__) app.config['SECRET_KEY'] = 'thisismysecretkey' app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://postgres:9666@localhost:543...
31.478873
123
0.66443
3c762cdf9207da2a84f41482e75013f125fd7662
7,164
py
Python
scripts/deployment/liquidity-mining/update-lm.py
jccf091/Sovryn-smart-contracts
d010f0c14fa87fd1097e1408bfa819df3e558233
[ "Apache-2.0" ]
108
2020-08-30T17:52:32.000Z
2022-02-26T00:00:15.000Z
scripts/deployment/liquidity-mining/update-lm.py
jccf091/Sovryn-smart-contracts
d010f0c14fa87fd1097e1408bfa819df3e558233
[ "Apache-2.0" ]
181
2020-08-24T09:28:53.000Z
2022-02-11T13:22:22.000Z
scripts/deployment/liquidity-mining/update-lm.py
jccf091/Sovryn-smart-contracts
d010f0c14fa87fd1097e1408bfa819df3e558233
[ "Apache-2.0" ]
36
2020-09-10T07:53:41.000Z
2022-03-26T00:35:30.000Z
''' This script serves the purpose of interacting with existing smart contracts on the testnet or mainnet. ''' from brownie import * from brownie.network.contract import InterfaceContainer import json import time; import copy def main(): #load the contracts and acct depending on the network loadConfig()...
42.390533
141
0.712172
a1d141202bff43dee04d24211443b67cce5b1cb2
3,237
py
Python
dalme_api/renderers.py
DALME/dalme
46f9a0011fdb75c5098b552104fc73b1062e16e9
[ "BSD-3-Clause" ]
6
2019-05-07T01:06:04.000Z
2021-02-19T20:45:09.000Z
dalme_api/renderers.py
DALME/dalme
46f9a0011fdb75c5098b552104fc73b1062e16e9
[ "BSD-3-Clause" ]
23
2018-09-14T18:01:42.000Z
2021-12-29T17:25:18.000Z
dalme_api/renderers.py
DALME/dalme
46f9a0011fdb75c5098b552104fc73b1062e16e9
[ "BSD-3-Clause" ]
1
2020-02-10T16:20:57.000Z
2020-02-10T16:20:57.000Z
import json from rest_framework import renderers from rest_framework.compat import INDENT_SEPARATORS, LONG_SEPARATORS, SHORT_SEPARATORS from dynamic_preferences.registries import global_preferences_registry class DBRenderer(renderers.BaseRenderer): media_type = 'application/json-dte' format = 'db' class Sel...
36.784091
133
0.632067
e72bb435b799fd9456751b5f0b0be41c6a9f0da1
3,196
py
Python
src/oca_github_bot/build_wheels.py
Tecnativa/oca-github-bot
ca2891200c381d10f2625360f1cf9467ad6f14d0
[ "MIT" ]
null
null
null
src/oca_github_bot/build_wheels.py
Tecnativa/oca-github-bot
ca2891200c381d10f2625360f1cf9467ad6f14d0
[ "MIT" ]
1
2020-03-31T21:15:24.000Z
2020-03-31T21:15:24.000Z
src/oca_github_bot/build_wheels.py
Tecnativa/oca-github-bot
ca2891200c381d10f2625360f1cf9467ad6f14d0
[ "MIT" ]
null
null
null
# Copyright (c) ACSONE SA/NV 2019 # Distributed under the MIT License (http://opensource.org/licenses/MIT). import logging import os import sys import tempfile from .manifest import addon_dirs_in, get_manifest, get_odoo_series_from_version from .process import check_call _logger = logging.getLogger(__name__) def _...
32.282828
83
0.651126
11e2f6620b3c320eeb93534e44e0512831c82ea5
25,235
py
Python
msticnb/nb/azsent/network/ip_summary.py
QPC-database/msticnb
cc391c9d72ed0ec4cce3bc412b0c4561dc09f5b2
[ "MIT" ]
1
2021-07-06T14:16:40.000Z
2021-07-06T14:16:40.000Z
msticnb/nb/azsent/network/ip_summary.py
QPC-database/msticnb
cc391c9d72ed0ec4cce3bc412b0c4561dc09f5b2
[ "MIT" ]
null
null
null
msticnb/nb/azsent/network/ip_summary.py
QPC-database/msticnb
cc391c9d72ed0ec4cce3bc412b0c4561dc09f5b2
[ "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. # -------------------------------------------------------------------------- """IP Addr...
36.414141
88
0.649534
cadab3d820f1c8354e3610fb1f64151b0ba56594
1,532
py
Python
tests/implicitron/test_build.py
JulianKnodt/pytorch3d
d28a50e70aae62355e6e52908d3172c5e9175ba8
[ "MIT", "BSD-3-Clause" ]
null
null
null
tests/implicitron/test_build.py
JulianKnodt/pytorch3d
d28a50e70aae62355e6e52908d3172c5e9175ba8
[ "MIT", "BSD-3-Clause" ]
null
null
null
tests/implicitron/test_build.py
JulianKnodt/pytorch3d
d28a50e70aae62355e6e52908d3172c5e9175ba8
[ "MIT", "BSD-3-Clause" ]
null
null
null
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import importlib import os import sys import unittest import unittest.mock if os.environ.get("FB_TEST", False...
36.47619
77
0.640339
c4a6f84b68d7048b618cd6110c1ccd0923143974
308
py
Python
tests/test_boolean_field.py
keaysma/wtforms-json
01c800aab697fa5d2165fb3c7b819e3eb0275de4
[ "BSD-3-Clause" ]
96
2015-01-12T16:24:42.000Z
2022-02-17T20:00:38.000Z
tests/test_boolean_field.py
keaysma/wtforms-json
01c800aab697fa5d2165fb3c7b819e3eb0275de4
[ "BSD-3-Clause" ]
20
2015-02-25T14:06:26.000Z
2022-03-15T03:47:52.000Z
tests/test_boolean_field.py
keaysma/wtforms-json
01c800aab697fa5d2165fb3c7b819e3eb0275de4
[ "BSD-3-Clause" ]
24
2015-01-14T02:53:17.000Z
2022-01-11T04:01:01.000Z
import pytest from wtforms import BooleanField, Form class TestBooleanField(object): @pytest.mark.parametrize('value', ('', 'false', False)) def test_falsy_value(self, value): class MyForm(Form): a = BooleanField() assert MyForm.from_json({'a': value}).a.data is False
25.666667
61
0.659091
1e4bc5062186efa2840c7b08f9c25625e6e4238a
3,871
py
Python
MCP23018.Test.py
FlippieCoetser/Python.MCP23018
06f8dba8fd9dbbdbd65a0383b8945dc44a28c9e3
[ "MIT" ]
1
2020-01-05T15:58:42.000Z
2020-01-05T15:58:42.000Z
MCP23018.Test.py
FlippieCoetser/Python.MCP23018
06f8dba8fd9dbbdbd65a0383b8945dc44a28c9e3
[ "MIT" ]
null
null
null
MCP23018.Test.py
FlippieCoetser/Python.MCP23018
06f8dba8fd9dbbdbd65a0383b8945dc44a28c9e3
[ "MIT" ]
null
null
null
# ensure all depdencies are installed and environment variables set. import os #cmd = 'pip install hidapi' #os.system(cmd) # Import all required dependecies import sys from MCP2221_1 import I2C, Pin import time time.sleep(1) # Import the MCP23018 Library and ENUMS from MCP23018 import MCP23018 , PORT, PIN, PARAMETER...
35.513761
68
0.753294
abde30fd2c966b2b1f6dcdcf986546b94c49e089
822
py
Python
xlsxwriter/test/format/test_initialisation.py
yxwlr995/-Python-Pandas-XlsxWriter
cd28c1b968795b67f3013c49a0e02ffda5898163
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/format/test_initialisation.py
yxwlr995/-Python-Pandas-XlsxWriter
cd28c1b968795b67f3013c49a0e02ffda5898163
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/format/test_initialisation.py
yxwlr995/-Python-Pandas-XlsxWriter
cd28c1b968795b67f3013c49a0e02ffda5898163
[ "BSD-2-Clause-FreeBSD" ]
1
2020-04-12T16:44:58.000Z
2020-04-12T16:44:58.000Z
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest from ..compatibility import StringIO from ...format import Format class TestInitialisation(unittest.TestCase): """ Test initia...
22.216216
79
0.576642
82bec5d7150a4d70359d4e1e055e457a48d32511
95
py
Python
api/tasks.py
abzcoding/flask-sample
427e14574d08341b8a54c596ee05564356cb06e0
[ "MIT" ]
2
2018-09-16T09:39:54.000Z
2021-01-03T13:46:21.000Z
api/tasks.py
abzcoding/flask-sample
427e14574d08341b8a54c596ee05564356cb06e0
[ "MIT" ]
2
2019-09-02T06:00:23.000Z
2019-09-02T06:00:36.000Z
api/tasks.py
abzcoding/flask-sample
427e14574d08341b8a54c596ee05564356cb06e0
[ "MIT" ]
null
null
null
from celery import Celery celery = Celery() @celery.task def sample(): return "something"
10.555556
25
0.715789
cad79ca9907008008db716d3eba6f66ecb251d6f
1,231
py
Python
year2017/day06/code.py
romainvigneres/advent_of_code
2ae38617706cb1041ab3950cdec3713176dc3633
[ "MIT" ]
null
null
null
year2017/day06/code.py
romainvigneres/advent_of_code
2ae38617706cb1041ab3950cdec3713176dc3633
[ "MIT" ]
null
null
null
year2017/day06/code.py
romainvigneres/advent_of_code
2ae38617706cb1041ab3950cdec3713176dc3633
[ "MIT" ]
null
null
null
from common import input_list_string def compute(bank_list): max_bank = max(bank_list) bank = bank_list.index(max_bank) bank_list[bank] = 0 for x in range(max_bank): bank_list[(bank + x + 1) % len(bank_list)] += 1 return bank_list def part_one(int_list): step = 0 states = [] ...
21.596491
55
0.567019
aa1037b216d5d8c5b328bc33bb1b86472d239c99
3,078
py
Python
ver/MoyuSystem/MS_BIOS/side_ui_file/help_an/help_main.py
ourcwj/MoyuSystem2.0
c367a820e789906493a656ec1e471b836496a1cd
[ "MIT" ]
null
null
null
ver/MoyuSystem/MS_BIOS/side_ui_file/help_an/help_main.py
ourcwj/MoyuSystem2.0
c367a820e789906493a656ec1e471b836496a1cd
[ "MIT" ]
null
null
null
ver/MoyuSystem/MS_BIOS/side_ui_file/help_an/help_main.py
ourcwj/MoyuSystem2.0
c367a820e789906493a656ec1e471b836496a1cd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'main.ui' ## ## Created by: Qt User Interface Compiler version 6.3.0 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ######################...
42.75
110
0.67154
1101374a89542fcc37ee5e895e7fdaf18e6929b5
6,245
py
Python
ltlf2dfa/parser/ltlf.py
francescofuggitti/LTLf2DFA
f2258c583ac01fab87082cc7c95246657d8e7105
[ "MIT" ]
1
2019-11-10T18:35:14.000Z
2019-11-10T18:35:14.000Z
ltlf2dfa/parser/ltlf.py
francescofuggitti/LTLf2DFA
f2258c583ac01fab87082cc7c95246657d8e7105
[ "MIT" ]
null
null
null
ltlf2dfa/parser/ltlf.py
francescofuggitti/LTLf2DFA
f2258c583ac01fab87082cc7c95246657d8e7105
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of ltlf2dfa. # # ltlf2dfa is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
25.912863
81
0.529384
9c52adbb4df2efb7ad95f75fad27de642013d31c
241
py
Python
All_Source_Code/SonarDetection/SonarDetection_1.py
APMonitor/pds
fa9a7ec920802de346dcdf7f5dd92d752142c16f
[ "MIT" ]
11
2021-01-21T09:46:29.000Z
2022-03-16T19:33:10.000Z
All_Source_Code/SonarDetection/SonarDetection_1.py
the-mahapurush/pds
7cb4087dd8e75cb1e9b2a4283966c798175f61f7
[ "MIT" ]
1
2022-03-16T19:47:09.000Z
2022-03-16T20:11:50.000Z
All_Source_Code/SonarDetection/SonarDetection_1.py
the-mahapurush/pds
7cb4087dd8e75cb1e9b2a4283966c798175f61f7
[ "MIT" ]
12
2021-02-08T21:11:11.000Z
2022-03-20T12:42:49.000Z
import pandas as pd url = 'http://apmonitor.com/pds/uploads/Main/sonar_detection.txt' data = pd.read_csv(url) # One-hot enocde 'Class' (1 is 'Metal', 0 is 'Rock') with list comprehension data.Class = [1 if x=='M' else 0 for x in data.Class]
40.166667
76
0.709544
08e247da04326c41d12c9508a9262898b8e03226
1,228
py
Python
regtests/go/array_of_objects.py
gython/Gython
52f49260f29582dc3274da77a9aaead142cfae32
[ "BSD-3-Clause" ]
65
2015-01-22T07:35:09.000Z
2022-03-13T15:51:57.000Z
regtests/go/array_of_objects.py
gython/Gython
52f49260f29582dc3274da77a9aaead142cfae32
[ "BSD-3-Clause" ]
null
null
null
regtests/go/array_of_objects.py
gython/Gython
52f49260f29582dc3274da77a9aaead142cfae32
[ "BSD-3-Clause" ]
14
2017-04-29T04:50:36.000Z
2022-02-06T11:40:30.000Z
'''array of objects''' class A: def foo(self) -> string: return 'xxxx' class B(A): def foo(self) -> string: return 'hello' class C(A): def foo(self) -> string: return 'world' def push( arr:[]int, x:int ): arr.append( x ) def push2( arr:[]*A, x:*A ): arr.append( x ) def my...
19.806452
88
0.501629
3d5d6083257cf70055c5cf6be9cbdb4873b66f97
14,321
py
Python
game_generator.py
I-QA-UCT/IQA
0c6eb67c9b16b129e3c0775e37518763a39f3ccf
[ "MIT" ]
null
null
null
game_generator.py
I-QA-UCT/IQA
0c6eb67c9b16b129e3c0775e37518763a39f3ccf
[ "MIT" ]
null
null
null
game_generator.py
I-QA-UCT/IQA
0c6eb67c9b16b129e3c0775e37518763a39f3ccf
[ "MIT" ]
null
null
null
import numpy as np import random import uuid import os import time import multiprocessing as mp from os.path import join as pjoin # Set of fake words with open("vocabularies/fake_words.txt") as f: FAKE_WORDS = f.read().lower().split("\n") FAKE_WORDS = set(FAKE_WORDS) # set of all entities/objects with open("voca...
40.569405
197
0.640318
d5377f81478334627c0a3512bb0d666ae7364280
1,056
py
Python
defender/models.py
kaozdl/django-defender
7064c9b012474d93043e318e5b1fd0966d3ebfe3
[ "Apache-2.0" ]
1
2020-03-03T08:55:43.000Z
2020-03-03T08:55:43.000Z
defender/models.py
kaozdl/django-defender
7064c9b012474d93043e318e5b1fd0966d3ebfe3
[ "Apache-2.0" ]
null
null
null
defender/models.py
kaozdl/django-defender
7064c9b012474d93043e318e5b1fd0966d3ebfe3
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import django from django.db import models if django.VERSION[0] < 3: from django.utils.encoding import python_2_unicode_compatible else: # noop stub def python_2_unicode_compatible(cls): return cls @python_2_unicode_compatible class AccessAttempt(models.Mod...
32
84
0.707386
399e0c226dcd4459e10759f921d7f9994424bec9
585
py
Python
day1.py
coocos/advent-of-code-2019
0278f924de77d951958d229ce523f4f55a4f8035
[ "MIT" ]
null
null
null
day1.py
coocos/advent-of-code-2019
0278f924de77d951958d229ce523f4f55a4f8035
[ "MIT" ]
null
null
null
day1.py
coocos/advent-of-code-2019
0278f924de77d951958d229ce523f4f55a4f8035
[ "MIT" ]
null
null
null
import os def fuel_required(mass: int) -> int: return mass // 3 - 2 def total_fuel_required(fuel: int) -> int: if fuel <= 0: return 0 needed_fuel = fuel_required(fuel) return fuel + total_fuel_required(needed_fuel) if __name__ == "__main__": with open(os.path.join("inputs", "day1.i...
20.892857
87
0.659829
980bd4ec36825c705eb36303c24bab49a9cd628f
1,972
py
Python
catalog/migrations/0003_auto_20190608_0101.py
chronoHex/django_lo_lib
73f7a8369c921aeab6d1f683f683b561a9954dbc
[ "MIT" ]
null
null
null
catalog/migrations/0003_auto_20190608_0101.py
chronoHex/django_lo_lib
73f7a8369c921aeab6d1f683f683b561a9954dbc
[ "MIT" ]
8
2019-12-04T23:35:43.000Z
2022-02-10T12:18:11.000Z
catalog/migrations/0003_auto_20190608_0101.py
chronoHex/django_lo_lib
73f7a8369c921aeab6d1f683f683b561a9954dbc
[ "MIT" ]
null
null
null
# Generated by Django 2.2.2 on 2019-06-08 08:01 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('catalog', '0002_auto_201...
37.207547
194
0.599899
47de3a8b2b187ac6fbdce0fb23a1078150c26ad8
396
py
Python
venv/Scripts/pip3-script.py
Val2021/pythonbirds
e9476667dfa1212b86db02cb821986bcc910f9cc
[ "MIT" ]
null
null
null
venv/Scripts/pip3-script.py
Val2021/pythonbirds
e9476667dfa1212b86db02cb821986bcc910f9cc
[ "MIT" ]
null
null
null
venv/Scripts/pip3-script.py
Val2021/pythonbirds
e9476667dfa1212b86db02cb821986bcc910f9cc
[ "MIT" ]
null
null
null
#!C:\Trader\pythonbirds\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3' __requires__ = 'pip==19.0.3' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit(...
30.461538
69
0.661616
cec671b46ac7d413058e4b42e02909ee737699e0
5,697
py
Python
tensorflow/examples/saved_model/integration_tests/use_mnist_cnn.py
jefby/tensorflow
2039437a8a0f31e35d474fb047dc907930fa6d56
[ "Apache-2.0" ]
4
2021-02-01T01:01:11.000Z
2021-07-21T15:22:20.000Z
tensorflow/examples/saved_model/integration_tests/use_mnist_cnn.py
sverneka/tensorflow
6a96e865fa9d199e8d9ae10ae110ef797ddd058e
[ "Apache-2.0" ]
null
null
null
tensorflow/examples/saved_model/integration_tests/use_mnist_cnn.py
sverneka/tensorflow
6a96e865fa9d199e8d9ae10ae110ef797ddd058e
[ "Apache-2.0" ]
1
2021-02-01T01:02:23.000Z
2021-02-01T01:02:23.000Z
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.020548
80
0.724241