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
1750970ec0c11776d71c7f6ddfc983ba82d173dd
20,546
py
Python
ml/ml_server.py
DavidThe4sian/marvin
1dddd8cdb8be55d3b553df1b2cf89e8b6b0538b6
[ "MIT" ]
4
2021-05-14T02:23:52.000Z
2021-12-28T10:33:18.000Z
ml/ml_server.py
DavidThe4sian/marvin
1dddd8cdb8be55d3b553df1b2cf89e8b6b0538b6
[ "MIT" ]
null
null
null
ml/ml_server.py
DavidThe4sian/marvin
1dddd8cdb8be55d3b553df1b2cf89e8b6b0538b6
[ "MIT" ]
3
2021-05-31T06:38:59.000Z
2021-09-29T02:44:22.000Z
# import flask related modules from flask import Flask, jsonify, request, render_template from flask_cors import CORS # basic imports import json import sys import os # Pytorch imports import torch from torchtext.data.utils import get_tokenizer from transformers import AutoTokenizer, AutoModelForSequenceClassificati...
43.995717
448
0.566874
2723c87b9dc8c1ef46ce057fd4ce532f510c0df3
4,695
py
Python
ecom/infer.py
haohao-hu/ecom-rakuten
0602a7f12dfb35c6455fdd42845cd7b08900c3ba
[ "MIT" ]
null
null
null
ecom/infer.py
haohao-hu/ecom-rakuten
0602a7f12dfb35c6455fdd42845cd7b08900c3ba
[ "MIT" ]
null
null
null
ecom/infer.py
haohao-hu/ecom-rakuten
0602a7f12dfb35c6455fdd42845cd7b08900c3ba
[ "MIT" ]
null
null
null
from . import bpv, data, scoring from .slimai import to_np from kerosene import torch_util import pandas as pd import fire import numpy as np import pathlib DATA_PATH=pathlib.Path('data') def infer(model, dl): probs = [] targs = [] model.eval() for x, y in dl: probs.append(to_np(model(torch_uti...
39.125
161
0.640469
ad60a44bb32ba91fb60ce5483bcf6f32637c679c
12,868
py
Python
David and Pooja/++Validating Linked Mods/Python-3.0/Lib/test/test_shutil.py
LinkedModernismProject/web_code
4cf6bf53d5c3249e52a75f0a3f57d106e31daf9e
[ "Apache-2.0" ]
1
2015-05-21T23:47:54.000Z
2015-05-21T23:47:54.000Z
front-end/testsuite-python-lib/Python-3.0/Lib/test/test_shutil.py
MalloyPower/parsing-python
b2bca5eed07ea2af7a2001cd4f63becdfb0570be
[ "MIT" ]
1
2015-10-29T20:51:31.000Z
2015-10-29T20:51:31.000Z
front-end/testsuite-python-lib/Python-3.0/Lib/test/test_shutil.py
MalloyPower/parsing-python
b2bca5eed07ea2af7a2001cd4f63becdfb0570be
[ "MIT" ]
1
2019-04-11T11:27:01.000Z
2019-04-11T11:27:01.000Z
# Copyright (C) 2003 Python Software Foundation import unittest import shutil import tempfile import sys import stat import os import os.path from test import support from test.support import TESTFN class TestShutil(unittest.TestCase): def test_rmtree_errors(self): # filename is guaranteed not to exist ...
36.765714
81
0.564423
e26b36c12b6369e85138458966b2f430caf6f64e
4,550
py
Python
digilog_n/Layer/IdentityLayer.py
DigiLog-N/DigiLog-N
43cc2324026b6f333bb2ae6a60faf3e3673a6220
[ "Apache-2.0" ]
null
null
null
digilog_n/Layer/IdentityLayer.py
DigiLog-N/DigiLog-N
43cc2324026b6f333bb2ae6a60faf3e3673a6220
[ "Apache-2.0" ]
null
null
null
digilog_n/Layer/IdentityLayer.py
DigiLog-N/DigiLog-N
43cc2324026b6f333bb2ae6a60faf3e3673a6220
[ "Apache-2.0" ]
null
null
null
############################################################################## # IdentityLayer.py # https://github.com/DigiLog-N/DigiLog-N # Copyright 2020 Canvass Labs, 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...
36.99187
122
0.573626
15f9716db47ef81125c7da2dbd51efde3edfd0c2
2,901
py
Python
homeassistant/components/acmeda/base.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
4
2016-06-22T12:00:41.000Z
2018-06-11T20:31:25.000Z
homeassistant/components/acmeda/base.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
78
2020-07-23T07:13:08.000Z
2022-03-31T06:02:04.000Z
homeassistant/components/acmeda/base.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
6
2019-07-06T00:43:13.000Z
2021-01-16T13:27:06.000Z
"""Base class for Acmeda Roller Blinds.""" import aiopulse from homeassistant.core import callback from homeassistant.helpers import entity from homeassistant.helpers.device_registry import async_get_registry as get_dev_reg from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helper...
32.965909
89
0.66322
3339a361155b4b17ce81fe4b772ff204d9421595
4,835
py
Python
splines/core/training_algorithms.py
ged1182/splines
04ee196f648186da1fb58f6b105b718fd1c81abf
[ "MIT" ]
2
2020-09-10T11:14:55.000Z
2021-06-09T11:05:00.000Z
splines/core/training_algorithms.py
ged1182/splines
04ee196f648186da1fb58f6b105b718fd1c81abf
[ "MIT" ]
null
null
null
splines/core/training_algorithms.py
ged1182/splines
04ee196f648186da1fb58f6b105b718fd1c81abf
[ "MIT" ]
1
2021-06-09T11:05:01.000Z
2021-06-09T11:05:01.000Z
import numpy as np from ..metrics import mse, mse_grad from .mv_splines import mv_b_spline_vector, mv_spline_grad from tqdm import trange from scipy.sparse import coo_matrix def fit_spline(x_train, y_train, x_val, y_val, regressor, optimizer, knot_init=None,...
41.324786
106
0.623785
b4bb6e1aa227c9fa05dae7fe551ff74dccf80242
4,944
py
Python
binary_classficiation/data_loader.py
princeton-vl/uniloss
76ca03726ae793d4de4041eeb4d565e44b9bc17a
[ "BSD-3-Clause" ]
8
2020-07-29T01:48:08.000Z
2020-09-10T01:01:50.000Z
binary_classficiation/data_loader.py
princeton-vl/uniloss
76ca03726ae793d4de4041eeb4d565e44b9bc17a
[ "BSD-3-Clause" ]
null
null
null
binary_classficiation/data_loader.py
princeton-vl/uniloss
76ca03726ae793d4de4041eeb4d565e44b9bc17a
[ "BSD-3-Clause" ]
null
null
null
""" Create train, valid, test iterators for CIFAR-10 [1]. Easily extended to MNIST, CIFAR-100 and Imagenet. [1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4 """ import torch import numpy as np from torchvision import datasets from torchvision import transforms from torch.utils.da...
32.103896
85
0.642597
9b7d1c75b05870d6a8ea410f2d4c2c85ae9ee5ac
1,373
py
Python
stocks/tests/models/test_stockDay.py
pchaos/wanggeService
839f7c6c52a685fcdc4b6a70cf8e9d6c8cc78255
[ "MIT" ]
11
2018-05-15T18:02:31.000Z
2020-05-07T03:57:33.000Z
stocks/tests/models/test_stockDay.py
pchaos/wanggeService
839f7c6c52a685fcdc4b6a70cf8e9d6c8cc78255
[ "MIT" ]
1
2018-05-16T11:27:32.000Z
2018-07-07T10:56:58.000Z
stocks/tests/models/test_stockDay.py
pchaos/wanggeService
839f7c6c52a685fcdc4b6a70cf8e9d6c8cc78255
[ "MIT" ]
13
2018-05-15T18:02:27.000Z
2022-03-23T06:18:29.000Z
# -*- coding: utf-8 -*- """ ------------------------------------------------- @File : test_stockDay.py Description : @Author : pchaos tradedate: 18-5-11 ------------------------------------------------- Change Activity: 18-5-11: @Contact : p19992003#gmail.com ----...
33.487805
145
0.586307
10f9f84e60352237bf76bba659db8da1a57c2588
867
py
Python
braindump/functions.py
atizo/braindump
5585284eb86d9f26c73941833ea5b810c65e618d
[ "MIT" ]
null
null
null
braindump/functions.py
atizo/braindump
5585284eb86d9f26c73941833ea5b810c65e618d
[ "MIT" ]
null
null
null
braindump/functions.py
atizo/braindump
5585284eb86d9f26c73941833ea5b810c65e618d
[ "MIT" ]
1
2019-03-20T21:05:00.000Z
2019-03-20T21:05:00.000Z
from django.shortcuts import _get_queryset from django.conf import settings def get_object_or_None(klass, *args, **kwargs): """ Uses get() to return an object or None if the object does not exist. klass may be a Model, Manager, or QuerySet object. All other passed arguments and keyword arguments are ...
26.272727
84
0.693195
dbc39852216913c5f594c07dbe7e9bfc44a74bb8
1,854
py
Python
pgbouncer/datadog_checks/pgbouncer/config_models/instance.py
tcpatterson/integrations-core
3692601de09f8db60f42612b0d623509415bbb53
[ "BSD-3-Clause" ]
null
null
null
pgbouncer/datadog_checks/pgbouncer/config_models/instance.py
tcpatterson/integrations-core
3692601de09f8db60f42612b0d623509415bbb53
[ "BSD-3-Clause" ]
null
null
null
pgbouncer/datadog_checks/pgbouncer/config_models/instance.py
tcpatterson/integrations-core
3692601de09f8db60f42612b0d623509415bbb53
[ "BSD-3-Clause" ]
null
null
null
# (C) Datadog, Inc. 2021-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) # This file is autogenerated. # To change this file you should edit assets/configuration/spec.yaml and then run the following commands: # ddev -x validate config -s <INTEGRATION_NAME> # ddev -x va...
31.423729
110
0.721683
aeeae57b8428ecf4d1806e6d617184d7bdc92bdc
6,757
py
Python
bindings/python/ensmallen_graph/datasets/string/actinomycesspph3.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/actinomycesspph3.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/actinomycesspph3.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Actinomyces sp. ph3. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021-02...
35.376963
223
0.705195
95852745366145a63971a1ed9b3cf20b99e3269d
2,459
py
Python
ranger/plugins/extract.py
MDBrodskiy/i3DotFiles
4727bf0414545a8482bf23017866743c46905975
[ "MIT" ]
1
2021-12-26T07:55:05.000Z
2021-12-26T07:55:05.000Z
ranger/plugins/extract.py
MDBrodskiy/i3DotFiles
4727bf0414545a8482bf23017866743c46905975
[ "MIT" ]
null
null
null
ranger/plugins/extract.py
MDBrodskiy/i3DotFiles
4727bf0414545a8482bf23017866743c46905975
[ "MIT" ]
null
null
null
import os from ranger.api.commands import * from ranger.core.loader import CommandLoader class extract(Command): def execute(self): """Extract copied files to current directory or directory specified in a command line """ cwd = self.fm.thisdir copied_files = cwd.get_selecti...
29.987805
105
0.569337
0cfc1a99ce55c9739bc85d3d5971e63ce7ffd25c
1,354
py
Python
tests/test_utils.py
github3py/github3py
37a4195a704db9c3e1d083ba6ddbda364e0affeb
[ "BSD-3-Clause" ]
2
2017-11-21T13:48:50.000Z
2018-09-05T12:42:42.000Z
tests/test_utils.py
github3py/github3py
37a4195a704db9c3e1d083ba6ddbda364e0affeb
[ "BSD-3-Clause" ]
1
2018-01-02T07:23:49.000Z
2018-01-02T07:23:49.000Z
tests/test_utils.py
github3py/github3py
37a4195a704db9c3e1d083ba6ddbda364e0affeb
[ "BSD-3-Clause" ]
3
2020-01-08T16:14:31.000Z
2021-10-31T21:35:54.000Z
from github3.utils import timestamp_parameter from tests.utils import BaseCase from datetime import datetime class TestTimestampParameter(BaseCase): def test_datetimes(self): timestamp = datetime(2010, 6, 1, 12, 15, 30) self.assertEqual('2010-06-01T12:15:30', timestamp_parameter(timestamp)) ...
33.02439
79
0.6226
6662fd4a75955a8345fbaed49c6991b6d74d300b
11,165
py
Python
Interface/MainWindow.py
Snackhole/NomenEXIF
b8a3689489678098ac94774e63fb4073fb57ae59
[ "MIT" ]
null
null
null
Interface/MainWindow.py
Snackhole/NomenEXIF
b8a3689489678098ac94774e63fb4073fb57ae59
[ "MIT" ]
5
2021-03-19T15:23:41.000Z
2022-03-14T02:22:14.000Z
Interface/MainWindow.py
Snackhole/NomenExif
86313d76f220df62018a84560c5e05a5297ae657
[ "MIT" ]
null
null
null
import math from Interface.StatusThread import StatusThread import os import threading from Core.ExifRenamer import ExifRenamer from PyQt5 import QtCore from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import (QApplication, QFileDialog, QFrame, QGridLayout, QLabel, QLineEdit, QListWidget, QListWidgetItem, QMainWindo...
42.452471
184
0.678997
d325f6e99b8f20093a9436c8b6f93ba386202edf
2,020
py
Python
app/controllers/tattooists_controllers/post_create.py
Poketnans/capstone-q3
38d550a54ff41387534241df85eb8aa8c9b6ba7e
[ "MIT" ]
null
null
null
app/controllers/tattooists_controllers/post_create.py
Poketnans/capstone-q3
38d550a54ff41387534241df85eb8aa8c9b6ba7e
[ "MIT" ]
4
2022-03-03T12:47:02.000Z
2022-03-08T18:10:34.000Z
app/controllers/tattooists_controllers/post_create.py
Poketnans/capstone-q3
38d550a54ff41387534241df85eb8aa8c9b6ba7e
[ "MIT" ]
1
2022-03-17T14:21:30.000Z
2022-03-17T14:21:30.000Z
from http import HTTPStatus from flask import current_app, jsonify from psycopg2.errors import UniqueViolation, ForeignKeyViolation from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import Session from app.models import Tattooist from app.services import get_files, get_orig_error_field, generate_image_def...
34.237288
80
0.673267
bec71f03d340b9b39f830d994fafa544fc7cc75c
6,991
py
Python
halp/layers/cross_entropy.py
vishalbelsare/halp
0da6e758aba779a5493069b99d4cc7bb5052082d
[ "Apache-2.0" ]
3
2019-01-03T20:59:04.000Z
2019-05-13T11:58:08.000Z
halp/layers/cross_entropy.py
vishalbelsare/halp
0da6e758aba779a5493069b99d4cc7bb5052082d
[ "Apache-2.0" ]
1
2019-05-14T09:20:13.000Z
2019-05-14T09:20:13.000Z
halp/layers/cross_entropy.py
vishalbelsare/halp
0da6e758aba779a5493069b99d4cc7bb5052082d
[ "Apache-2.0" ]
2
2019-01-03T20:59:07.000Z
2021-11-15T17:08:45.000Z
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as init from torch.nn.parameter import Parameter from torch.autograd import Function from torch.autograd import Variable import numpy as np from halp.utils.utils import void_cast_func, single_to_half_det, single_to_half_stoc from ha...
43.968553
106
0.669146
3a268abdaf3d46547244845942a0b09a633aa4f0
12,329
py
Python
directord/user.py
Directord/directord
d7aabefdab830471ba1f77543aefc934a4ead59e
[ "Apache-2.0" ]
10
2021-11-08T11:29:59.000Z
2022-01-11T16:29:23.000Z
directord/user.py
directord/directord
d7aabefdab830471ba1f77543aefc934a4ead59e
[ "Apache-2.0" ]
19
2021-10-29T21:22:18.000Z
2022-01-18T22:21:55.000Z
directord/user.py
directord/directord
d7aabefdab830471ba1f77543aefc934a4ead59e
[ "Apache-2.0" ]
2
2021-11-02T00:54:53.000Z
2022-01-10T10:31:33.000Z
# Copyright Peznauts <kevin@cloudnull.com>. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
34.729577
78
0.482683
ca4f7097e8647933e9f69528f5fbac236d7a2858
9,176
py
Python
security_scripts/rdk/scimma-s3-bucket-tagged/scimma-s3-bucket-tagged_test.py
loftwah/security-scripts
eb75b67499d3cb8d87eac114efdc9988a0f56511
[ "MIT" ]
1
2021-12-23T05:02:51.000Z
2021-12-23T05:02:51.000Z
security_scripts/rdk/scimma-s3-bucket-tagged/scimma-s3-bucket-tagged_test.py
loftwah/security-scripts
eb75b67499d3cb8d87eac114efdc9988a0f56511
[ "MIT" ]
null
null
null
security_scripts/rdk/scimma-s3-bucket-tagged/scimma-s3-bucket-tagged_test.py
loftwah/security-scripts
eb75b67499d3cb8d87eac114efdc9988a0f56511
[ "MIT" ]
1
2021-12-23T05:02:57.000Z
2021-12-23T05:02:57.000Z
import sys import unittest from unittest.mock import MagicMock from botocore.exceptions import ClientError #dlp import botocore ############## # Parameters # ############## # Define the default resource to report to Config Rules DEFAULT_RESOURCE_TYPE = 'AWS::::Account' ############# # Main Code # ############# CO...
44.328502
142
0.696055
01ad65f55393d8274b2683359824351fd2bc1a67
2,061
py
Python
external/fusesoc-ipyxact/print_businterfaces.py
koenenwmn/optimsoc
2cbb92af68c17484b0b65c5e837e71e51eaafebc
[ "MIT" ]
5
2019-12-31T19:16:10.000Z
2020-11-03T15:49:09.000Z
external/fusesoc-ipyxact/print_businterfaces.py
koenenwmn/optimsoc
2cbb92af68c17484b0b65c5e837e71e51eaafebc
[ "MIT" ]
null
null
null
external/fusesoc-ipyxact/print_businterfaces.py
koenenwmn/optimsoc
2cbb92af68c17484b0b65c5e837e71e51eaafebc
[ "MIT" ]
1
2019-12-31T19:16:13.000Z
2019-12-31T19:16:13.000Z
import sys from ipyxact.ipyxact import Component def get_businterfaces(busInterfaces): ifs = [] for busInterface in busInterfaces.busInterface: print('='*20) print('name : ' + busInterface.name) _vendor = busInterface.busType.vendor _library = busInterface.busType.library ...
38.886792
79
0.45706
affe40b10f23873c64162558f6247fd7035092b1
28
py
Python
backend/src/config.py
PTYin/SQLOJ
ed568791224b2d95390230ecd3fbba798a485da9
[ "MIT" ]
7
2021-07-05T18:44:31.000Z
2021-11-06T05:06:51.000Z
backend/src/config.py
PTYin/SQLOJ
ed568791224b2d95390230ecd3fbba798a485da9
[ "MIT" ]
2
2021-11-16T12:08:41.000Z
2021-12-10T08:42:35.000Z
backend/src/config.py
PTYin/sqloj
ed568791224b2d95390230ecd3fbba798a485da9
[ "MIT" ]
null
null
null
folder = "/var/lib/sqloj/"
9.333333
26
0.607143
ada7bd8a67dad8d045a4fd515ad371b4ea4a7136
45,192
py
Python
lib/galaxy/tools/actions/__init__.py
tdans1/Use-Galaxy
e9f05cb1b11db20a729ac73520f886ee619c6b90
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/tools/actions/__init__.py
tdans1/Use-Galaxy
e9f05cb1b11db20a729ac73520f886ee619c6b90
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/tools/actions/__init__.py
tdans1/Use-Galaxy
e9f05cb1b11db20a729ac73520f886ee619c6b90
[ "CC-BY-3.0" ]
null
null
null
import json import logging import re from json import dumps from six import string_types from galaxy import model from galaxy.exceptions import ObjectInvalid from galaxy.model import LibraryDatasetDatasetAssociation from galaxy.tools.parameters import update_param from galaxy.tools.parameters.basic import DataCollect...
52.245087
209
0.602695
67d290e3642256f1bb42854844ef3e6706394461
15,016
py
Python
dropboxhandler/dropboxhandler.py
qbicsoftware/dropboxhandler
2a774975f122b86a6310eb5ed8e6a64edb2191a9
[ "MIT" ]
null
null
null
dropboxhandler/dropboxhandler.py
qbicsoftware/dropboxhandler
2a774975f122b86a6310eb5ed8e6a64edb2191a9
[ "MIT" ]
4
2015-10-15T12:44:08.000Z
2021-07-19T11:10:34.000Z
dropboxhandler/dropboxhandler.py
qbicsoftware/dropboxhandler
2a774975f122b86a6310eb5ed8e6a64edb2191a9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf8 from __future__ import print_function import re import os import time import shutil import logging import glob import traceback import concurrent.futures from os.path import join as pjoin from . import fstools if not hasattr(__builtins__, 'FileExistsError'): FileExistsError ...
36.894349
101
0.618673
da51b899199823a8c195da3f3af19e52f9cfa38a
2,699
py
Python
emo_classifier/model.py
stdiff/emo-classifier
211731a44022408c750b611383216ce0578f2d41
[ "MIT" ]
null
null
null
emo_classifier/model.py
stdiff/emo-classifier
211731a44022408c750b611383216ce0578f2d41
[ "MIT" ]
null
null
null
emo_classifier/model.py
stdiff/emo-classifier
211731a44022408c750b611383216ce0578f2d41
[ "MIT" ]
null
null
null
from typing import BinaryIO from importlib import resources from abc import ABC, abstractmethod from pathlib import Path import numpy as np from emo_classifier import ARTIFACT_DIR from emo_classifier.api import Comment, Prediction from emo_classifier.emotion import load_emotions from emo_classifier.metrics import Thr...
31.383721
116
0.674694
aeb56c5d67b334c19bbc874ad3edf66d66f7f486
5,099
py
Python
selfdrive/car/volkswagen/carcontroller.py
GratefulJinx77/comma
f16e30a44ff5026f1aee502f44f525db2de31d5b
[ "MIT" ]
10
2021-10-09T15:32:24.000Z
2022-02-14T08:31:56.000Z
selfdrive/car/volkswagen/carcontroller.py
GratefulJinx77/comma
f16e30a44ff5026f1aee502f44f525db2de31d5b
[ "MIT" ]
51
2021-11-17T16:13:39.000Z
2022-03-22T00:14:00.000Z
selfdrive/car/volkswagen/carcontroller.py
GratefulJinx77/comma
f16e30a44ff5026f1aee502f44f525db2de31d5b
[ "MIT" ]
10
2021-11-29T20:45:56.000Z
2022-03-28T20:15:41.000Z
from cereal import car from selfdrive.car import apply_std_steer_torque_limits from selfdrive.car.volkswagen import volkswagencan from selfdrive.car.volkswagen.values import DBC_FILES, CANBUS, MQB_LDW_MESSAGES, BUTTON_STATES, CarControllerParams as P from opendbc.can.packer import CANPacker VisualAlert = car.CarContro...
43.211864
143
0.62424
8fb6d9451aaadfb58fceb7a6ffc1077d71ef97fc
153
py
Python
arc078_a.py
hythof/atc
12cb94ebe693e1f469ce0d982bc2924b586552cd
[ "CC0-1.0" ]
null
null
null
arc078_a.py
hythof/atc
12cb94ebe693e1f469ce0d982bc2924b586552cd
[ "CC0-1.0" ]
null
null
null
arc078_a.py
hythof/atc
12cb94ebe693e1f469ce0d982bc2924b586552cd
[ "CC0-1.0" ]
null
null
null
n,*a = [int(x) for x in open(0).read().split()] l=0 r=sum(a) ans=float('inf') for ai in a[:-1]: l+=ai r-=ai ans=min(ans,abs(l-r)) print(ans)
15.3
47
0.529412
201910ef9b04ab8c5a1c5383f35fecf28af4b9f8
14,524
py
Python
fastai/callback.py
shafiul/fastai
08d6de8a9a89a77569bfbccca278fc5522772100
[ "Apache-2.0" ]
2
2019-02-08T04:59:27.000Z
2020-05-15T21:17:23.000Z
fastai/callback.py
shafiul/fastai
08d6de8a9a89a77569bfbccca278fc5522772100
[ "Apache-2.0" ]
3
2021-05-20T19:59:09.000Z
2022-02-26T09:11:29.000Z
fastai/callback.py
shafiul/fastai
08d6de8a9a89a77569bfbccca278fc5522772100
[ "Apache-2.0" ]
1
2020-01-09T15:44:46.000Z
2020-01-09T15:44:46.000Z
"Callbacks provides extensibility to the `basic_train` loop. See `train` for examples of custom callbacks." from .basic_data import * from .torch_core import * __all__ = ['AverageMetric', 'Callback', 'CallbackHandler', 'OptimWrapper', 'SmoothenValue', 'Stepper', 'annealing_cos', 'CallbackList', 'annealing_e...
45.3875
135
0.648582
8120fbc1398acb0e443d2ce42899df6a7acc331b
60,463
py
Python
applied_python/applied_python/lib/python2.7/site-packages/ansible/utils/__init__.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
applied_python/applied_python/lib/python2.7/site-packages/ansible/utils/__init__.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
applied_python/applied_python/lib/python2.7/site-packages/ansible/utils/__init__.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
36.401565
314
0.627276
3a03e66c53df3cefb14f13a7a86879f51ec9446e
53,220
py
Python
awx/main/management/commands/inventory_import.py
cvick/awx
f7effd82dcacab5f0cedf3f7e5312f4ea7cada0f
[ "Apache-2.0" ]
null
null
null
awx/main/management/commands/inventory_import.py
cvick/awx
f7effd82dcacab5f0cedf3f7e5312f4ea7cada0f
[ "Apache-2.0" ]
null
null
null
awx/main/management/commands/inventory_import.py
cvick/awx
f7effd82dcacab5f0cedf3f7e5312f4ea7cada0f
[ "Apache-2.0" ]
1
2019-09-17T04:35:27.000Z
2019-09-17T04:35:27.000Z
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python import json import logging import os import re import subprocess import sys import time import traceback import shutil # Django from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.core.excepti...
49.878163
143
0.6059
05279591d25aba3a54e7f1100a692907e4d67be2
514
py
Python
djangorestautomatepm/restautomatepm/migrations/0017_auto_20200630_1738.py
sammydowds/django-rest-automate-pm
e3bd85f5c46ec72d564a2749785f058095bcd2e1
[ "MIT" ]
null
null
null
djangorestautomatepm/restautomatepm/migrations/0017_auto_20200630_1738.py
sammydowds/django-rest-automate-pm
e3bd85f5c46ec72d564a2749785f058095bcd2e1
[ "MIT" ]
7
2020-07-10T18:34:58.000Z
2021-09-22T19:24:37.000Z
djangorestautomatepm/restautomatepm/migrations/0017_auto_20200630_1738.py
sammydowds/django-rest-automate-pm
e3bd85f5c46ec72d564a2749785f058095bcd2e1
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-06-30 17:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('restautomatepm', '0016_projects_owner'), ] operations = [ migrations.RemoveField( model_name='projects', name='statu...
22.347826
68
0.577821
5b7ac8b2232587a234cda862c211d7d967184ad4
5,609
py
Python
raspa/analyze/raspa_output.py
kbsezginel/tutorials
ea9797f987b862d4dc6c7e2628c6eed0ca66e0e1
[ "MIT" ]
11
2017-12-07T20:30:50.000Z
2022-03-14T09:07:01.000Z
raspa/analyze/raspa_output.py
kbsezginel/tutorials
ea9797f987b862d4dc6c7e2628c6eed0ca66e0e1
[ "MIT" ]
null
null
null
raspa/analyze/raspa_output.py
kbsezginel/tutorials
ea9797f987b862d4dc6c7e2628c6eed0ca66e0e1
[ "MIT" ]
4
2018-09-09T02:34:56.000Z
2019-06-19T20:07:55.000Z
""" Read RASPA output file for gas adsorption simulations. - Can read mixture simulations - Can read unfinished simulation data (reads the last cycle) >>> python read-raspa-output.py Output/System_0/output_IRMOF-1_1.1.1_298.000000_1e+07.data """ import os import sys import glob def parse_output(data_file, verbose=F...
47.940171
112
0.548939
3a110ff95c653f9874905beb893c733e369b491c
1,833
py
Python
Python/unify.py
BuserLukas/Logic
cc0447554cfa75b213a10a2db37ce82c42afb91d
[ "MIT" ]
13
2019-10-03T13:25:02.000Z
2021-12-26T11:49:25.000Z
Python/unify.py
BuserLukas/Logic
cc0447554cfa75b213a10a2db37ce82c42afb91d
[ "MIT" ]
19
2015-01-14T15:36:24.000Z
2019-04-21T02:13:23.000Z
Python/unify.py
BuserLukas/Logic
cc0447554cfa75b213a10a2db37ce82c42afb91d
[ "MIT" ]
18
2019-10-03T16:05:46.000Z
2021-12-10T19:44:15.000Z
def apply(t, σ): "Apply the substitution σ to the term t." if isinstance(t, set): # t is a set of clauses return { apply(c, σ) for c in t } if isinstance(t, frozenset): # t is a clause return frozenset({ apply(l, σ) for l in t }) if isinstanc...
27.772727
76
0.434261
ff4798703d2043e02461905104b66270816100f1
385
py
Python
setup.py
levi-rs/cloc.me
56ac158e5085390177f261220dcf9dfba72871de
[ "MIT" ]
2
2018-12-08T22:13:49.000Z
2018-12-08T22:13:54.000Z
setup.py
levi-rs/cloc.me
56ac158e5085390177f261220dcf9dfba72871de
[ "MIT" ]
5
2018-10-08T20:33:10.000Z
2018-10-15T22:20:09.000Z
setup.py
levi-rs/cloc.me
56ac158e5085390177f261220dcf9dfba72871de
[ "MIT" ]
null
null
null
import os from setuptools import setup modules = ['clocme', ] setup( name="clocme", author='Levi Noecker', author_email='levi.noecker@gmail.com', url='https://github.com/levi-rs/cloc.me', description="Clocme controller", py_modules=modules, version='0.0.1', entry_points={ 'cons...
19.25
45
0.602597
2a3bbf38037b81b7d0b5163dd8069c0c5cdd48bb
446
py
Python
products/urls.py
Luka-pp/Milestone-Projet-4
98b2c842e702682cd9bce7deb8a7b385eb83484e
[ "BSD-Source-Code" ]
null
null
null
products/urls.py
Luka-pp/Milestone-Projet-4
98b2c842e702682cd9bce7deb8a7b385eb83484e
[ "BSD-Source-Code" ]
null
null
null
products/urls.py
Luka-pp/Milestone-Projet-4
98b2c842e702682cd9bce7deb8a7b385eb83484e
[ "BSD-Source-Code" ]
null
null
null
from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path('', views.all_products, name='products'), path('<int:product_id>/', views.product_detail, name='product_detail'), path('add/', views.add_product, name='add_product'), path('edit/<int:product_id>/', ...
31.857143
81
0.710762
593b64591d65a2937b629637a21cf92930a25286
359
py
Python
basic-programming/file-io/file-poitions.py
sinhdev/python-demo
77e97d01d853799aef9a71cd6b7892847f85727d
[ "MIT" ]
null
null
null
basic-programming/file-io/file-poitions.py
sinhdev/python-demo
77e97d01d853799aef9a71cd6b7892847f85727d
[ "MIT" ]
null
null
null
basic-programming/file-io/file-poitions.py
sinhdev/python-demo
77e97d01d853799aef9a71cd6b7892847f85727d
[ "MIT" ]
null
null
null
#!/usr/bin/python # Open a file fo = open("foo.txt", "r+") str = fo.read(10) print "Read String is : ", str # Check current position position = fo.tell() print "Current file position : ", position # Reposition pointer at the beginning once again position = fo.seek(0, 0); str = fo.read(10) print "Again read String is...
21.117647
48
0.679666
fea45255b7a22f584be1683a5180e9ed9adda258
16,817
py
Python
my_plugins/youcompleteme/third_party/ycmd/ycmd/tests/bindings/cpp_bindings_general_test.py
dragon7-fc/vimrc
d5968c222023bfdbd68b4f047f6e407e978cc82f
[ "MIT" ]
null
null
null
my_plugins/youcompleteme/third_party/ycmd/ycmd/tests/bindings/cpp_bindings_general_test.py
dragon7-fc/vimrc
d5968c222023bfdbd68b4f047f6e407e978cc82f
[ "MIT" ]
null
null
null
my_plugins/youcompleteme/third_party/ycmd/ycmd/tests/bindings/cpp_bindings_general_test.py
dragon7-fc/vimrc
d5968c222023bfdbd68b4f047f6e407e978cc82f
[ "MIT" ]
null
null
null
# Copyright (C) 2020 ycmd contributors # # This file is part of ycmd. # # ycmd 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 version. # # ycmd...
34.04251
80
0.516858
140f1f80370fdfb221a36c6db139889110b27520
444
py
Python
dkulib/parallelizer/__init__.py
Muennighoff/dss-plugin-dkulib
8d9a954841c23f163f1992822a2a8e4171695f73
[ "Apache-2.0" ]
null
null
null
dkulib/parallelizer/__init__.py
Muennighoff/dss-plugin-dkulib
8d9a954841c23f163f1992822a2a8e4171695f73
[ "Apache-2.0" ]
null
null
null
dkulib/parallelizer/__init__.py
Muennighoff/dss-plugin-dkulib
8d9a954841c23f163f1992822a2a8e4171695f73
[ "Apache-2.0" ]
null
null
null
######################################################## # ------------- dkulib.parallelizer: 0.1.0 ---------------- # For more information, see https://github.com/dataiku/dss-plugin-dkulib/tree/main/dkulib/parallelizer # Library version: 0.1.0 # Last update: 2021-07-16 # Author: Dataiku (Alex Combessie, Niklas ...
40.363636
103
0.506757
dda4f422b63ea7371681daa35fa0f4a7eb3da541
199
py
Python
atariari/testAtariAri.py
nguyendohoangkhoi/Deductive-Exploration
371502f00305d8f2e6c14b65eaa8686d2a5609e4
[ "MIT" ]
null
null
null
atariari/testAtariAri.py
nguyendohoangkhoi/Deductive-Exploration
371502f00305d8f2e6c14b65eaa8686d2a5609e4
[ "MIT" ]
null
null
null
atariari/testAtariAri.py
nguyendohoangkhoi/Deductive-Exploration
371502f00305d8f2e6c14b65eaa8686d2a5609e4
[ "MIT" ]
null
null
null
import gym from atariari.benchmark.wrapper import AtariARIWrapper env = AtariARIWrapper(gym.make('MontezumaRevengeNoFrameskip-v4')) obs = env.reset() obs, reward, done, info = env.step(1) print(info)
33.166667
65
0.788945
ec38c37b7f9cecc1d89b5f4ff958f4f86af027d2
1,258
py
Python
ludwig/hyperopt/utils.py
carlogrisetti/ludwig
5c0887f14867e1577e0ddc3806c5cf7a781fb665
[ "Apache-2.0" ]
null
null
null
ludwig/hyperopt/utils.py
carlogrisetti/ludwig
5c0887f14867e1577e0ddc3806c5cf7a781fb665
[ "Apache-2.0" ]
null
null
null
ludwig/hyperopt/utils.py
carlogrisetti/ludwig
5c0887f14867e1577e0ddc3806c5cf7a781fb665
[ "Apache-2.0" ]
null
null
null
import json import logging import os from ludwig.constants import HYPEROPT, PARAMETERS, PREPROCESSING from ludwig.hyperopt.results import HyperoptResults from ludwig.utils.data_utils import save_json from ludwig.utils.print_utils import print_boxed logger = logging.getLogger(__name__) def print_hyperopt_results(hyp...
25.16
64
0.714626
2997df0b201fa0646b16d7c5c4b0e1cba72c1e64
2,247
py
Python
hdltools/vcd/generator.py
brunosmmm/hdltools
a98ca8c4d168740fa229c939a7b1f31ea73eec24
[ "MIT" ]
2
2020-02-28T13:02:39.000Z
2021-06-30T09:15:35.000Z
hdltools/vcd/generator.py
brunosmmm/hdltools
a98ca8c4d168740fa229c939a7b1f31ea73eec24
[ "MIT" ]
1
2020-03-22T17:32:45.000Z
2020-03-23T15:43:39.000Z
hdltools/vcd/generator.py
brunosmmm/hdltools
a98ca8c4d168740fa229c939a7b1f31ea73eec24
[ "MIT" ]
null
null
null
"""VCD Dump Generator.""" from ..abshdl.codegen import HDLCodeGenerator from datetime import datetime class VCDGenerator(HDLCodeGenerator): """Generate VCD dumps.""" def __init__(self, **kwargs): """Initialize.""" self.elements = [] def add_elements(self, *elements): """Add elem...
33.537313
78
0.542501
04c151d1e8d7548944ee3c06676375528dc3e66e
10,614
py
Python
nova/volume/cinder.py
bopopescu/nova_vmware_compute_driver
60d3936b68030647b9f11970c9e0d060fc286dd9
[ "Apache-2.0" ]
null
null
null
nova/volume/cinder.py
bopopescu/nova_vmware_compute_driver
60d3936b68030647b9f11970c9e0d060fc286dd9
[ "Apache-2.0" ]
null
null
null
nova/volume/cinder.py
bopopescu/nova_vmware_compute_driver
60d3936b68030647b9f11970c9e0d060fc286dd9
[ "Apache-2.0" ]
2
2019-07-08T22:12:35.000Z
2020-07-24T08:27:24.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
36.6
79
0.631619
6bba0b904c0751deb9d3e5a472fbe3d68b08b44b
1,257
py
Python
fluent_contents/plugins/text/migrations/0001_initial.py
jayvdb/django-fluent-contents
dc07f42d80116c1e42efcd0afae91b2843c2e95f
[ "Apache-2.0" ]
null
null
null
fluent_contents/plugins/text/migrations/0001_initial.py
jayvdb/django-fluent-contents
dc07f42d80116c1e42efcd0afae91b2843c2e95f
[ "Apache-2.0" ]
1
2020-07-08T19:10:10.000Z
2020-07-08T19:10:10.000Z
fluent_contents/plugins/text/migrations/0001_initial.py
jayvdb/django-fluent-contents
dc07f42d80116c1e42efcd0afae91b2843c2e95f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import fluent_contents.extensions.model_fields class Migration(migrations.Migration): dependencies = [("fluent_contents", "0001_initial")] operations = [ migrations.CreateModel( nam...
29.232558
76
0.460621
a7cacd4f75f19e0f313af288121334419e1cbbb2
771
py
Python
cpp/manual_wrappers/setup.py
BostonUniversitySeniorDesign/corner-camera
48bd550d14277c257ea9d96b446990629a783987
[ "MIT" ]
null
null
null
cpp/manual_wrappers/setup.py
BostonUniversitySeniorDesign/corner-camera
48bd550d14277c257ea9d96b446990629a783987
[ "MIT" ]
null
null
null
cpp/manual_wrappers/setup.py
BostonUniversitySeniorDesign/corner-camera
48bd550d14277c257ea9d96b446990629a783987
[ "MIT" ]
null
null
null
from distutils.core import setup, Extension #from setuptools import find_packages, setup, Extension def main(): the_module = Extension("nlos", include_dirs = ['/usr/local/include'], libraries = ['opencv_core', 'opencv_imgproc', 'opencv_highgui'], library_dirs = ['/usr/local/lib'], s...
36.714286
171
0.656291
0a84935d4eab7bae0503efad43a2259ee30bc6b4
1,088
py
Python
data/train/python/0a84935d4eab7bae0503efad43a2259ee30bc6b4routing.py
harshp8l/deep-learning-lang-detection
2a54293181c1c2b1a2b840ddee4d4d80177efb33
[ "MIT" ]
84
2017-10-25T15:49:21.000Z
2021-11-28T21:25:54.000Z
data/train/python/0a84935d4eab7bae0503efad43a2259ee30bc6b4routing.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
5
2018-03-29T11:50:46.000Z
2021-04-26T13:33:18.000Z
data/train/python/0a84935d4eab7bae0503efad43a2259ee30bc6b4routing.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
24
2017-11-22T08:31:00.000Z
2022-03-27T01:22:31.000Z
from webob.dec import wsgify import webob import routes.middleware from comments.controller import CommentController def comment_mappers(mapper): mapper.connect('/comment/{pin_id}/create', controller=CommentController(), action='create', conditions={'method'...
38.857143
58
0.54136
be740353e9a9b864625c8f20eefea92134c3ea12
554
py
Python
build/aruco_msgs/catkin_generated/pkg.develspace.context.pc.py
FProgrammerLIU/caster_man_ros
a75b503fad3a470f985072a2b3953e89074f3223
[ "MIT" ]
null
null
null
build/aruco_msgs/catkin_generated/pkg.develspace.context.pc.py
FProgrammerLIU/caster_man_ros
a75b503fad3a470f985072a2b3953e89074f3223
[ "MIT" ]
null
null
null
build/aruco_msgs/catkin_generated/pkg.develspace.context.pc.py
FProgrammerLIU/caster_man_ros
a75b503fad3a470f985072a2b3953e89074f3223
[ "MIT" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/caster/ros_ws/caster/devel/.private/aruco_msgs/include".split(';') if "/home/caster/ros_ws/caster/devel/.private/aruco_msgs/include" != "" else [] PROJECT_CATKIN_DEPENDS = "message_runtime;geomet...
61.555556
187
0.758123
a325f3b0c2c7b8abc17f44a42883688bd8c0c38b
9,710
py
Python
modules/database.py
Smarandii/cryptoBot-remaster-
a9fd71bd5037ca126b27490349bdfa9dc3648e08
[ "MIT" ]
7
2020-09-18T10:30:40.000Z
2021-03-25T11:17:23.000Z
modules/database.py
Smarandii/cryptoBot-remaster-
a9fd71bd5037ca126b27490349bdfa9dc3648e08
[ "MIT" ]
null
null
null
modules/database.py
Smarandii/cryptoBot-remaster-
a9fd71bd5037ca126b27490349bdfa9dc3648e08
[ "MIT" ]
null
null
null
import sqlite3 from sqlite3 import Error from modules.functions import get_user_from_db, get_request_from_db, request_time_is_done from modules.models import User, Request class DataBase: def __init__(self, db_file='database.db'): self.db_file = db_file self.create_connection() self.c = s...
41.853448
120
0.613697
d62854295242ad39fa794733c5972a6b92f8725c
2,588
py
Python
data/p4VQE/R4/benchmark/startQiskit_QC230.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startQiskit_QC230.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startQiskit_QC230.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=11 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ import networkx as nx from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collectio...
27.531915
118
0.634853
2127cf3651d05e010490cfcf691f554a7d4bd74d
1,789
py
Python
tests/test_non_interactive.py
david-poirier-csn/aws_azuread_login
350871b9f69a48e45cfc95980e17ef8121ac6ef7
[ "Apache-2.0" ]
1
2021-09-23T12:27:57.000Z
2021-09-23T12:27:57.000Z
tests/test_non_interactive.py
david-poirier/aws_azuread_login
350871b9f69a48e45cfc95980e17ef8121ac6ef7
[ "Apache-2.0" ]
null
null
null
tests/test_non_interactive.py
david-poirier/aws_azuread_login
350871b9f69a48e45cfc95980e17ef8121ac6ef7
[ "Apache-2.0" ]
1
2021-12-31T03:13:14.000Z
2021-12-31T03:13:14.000Z
import getpass import os import aws_azuread_login ENTRY_URL = os.environ['AWS_AZUREAD_ENTRY_URL'] USERNAME = input('Username: ') PASSWORD = getpass.getpass('Password: ') CODE = input('OTP: ') def test_auth(): roles = aws_azuread_login.authenticate( ENTRY_URL, username=USERNAME, ...
27.106061
61
0.551705
6298ef3d8428071cb5e4f3b82753bc3fed6df437
371
py
Python
tributary/streaming/base.py
ceball/tributary
5e30f90d1a5cc176c0f231f525d9dc5a81353925
[ "Apache-2.0" ]
null
null
null
tributary/streaming/base.py
ceball/tributary
5e30f90d1a5cc176c0f231f525d9dc5a81353925
[ "Apache-2.0" ]
null
null
null
tributary/streaming/base.py
ceball/tributary
5e30f90d1a5cc176c0f231f525d9dc5a81353925
[ "Apache-2.0" ]
null
null
null
class StreamingGraph(object): def __init__(self, output_node): self._node = output_node def graph(self): return self._node.graph() def graphviz(self): return self._node.graphviz() def dagre(self): return self._node.dagre() def run(self): from tributary.s...
19.526316
43
0.625337
8d07d1aa8ca28ec668bda39c9fbd6e26289fe303
421
py
Python
test/GameRunnerTest.py
avijit90/tic-tac-toe
737f74e828a6a59f26af1edc38e915b86c4a8e9d
[ "Apache-2.0" ]
null
null
null
test/GameRunnerTest.py
avijit90/tic-tac-toe
737f74e828a6a59f26af1edc38e915b86c4a8e9d
[ "Apache-2.0" ]
null
null
null
test/GameRunnerTest.py
avijit90/tic-tac-toe
737f74e828a6a59f26af1edc38e915b86c4a8e9d
[ "Apache-2.0" ]
null
null
null
import unittest from unittest.mock import patch from GameRunner import GameRunner class MyTestCase(unittest.TestCase): def setUp(self): with patch(GameRunner, "__init__", lambda a, b, c, d: None) as mock: self.game_runner = GameRunner(None, None, None, None) def test_something(self): ...
22.157895
76
0.695962
2e650a8e36b4abdf48ef5cacd016479e9005ed02
96
py
Python
src/strictest/fix/__init__.py
adamtheturtle/strictest
3413ba7c3018d841b46aa5de81e8486b2d92cd78
[ "MIT" ]
null
null
null
src/strictest/fix/__init__.py
adamtheturtle/strictest
3413ba7c3018d841b46aa5de81e8486b2d92cd78
[ "MIT" ]
24
2019-05-05T11:11:47.000Z
2020-10-19T09:38:36.000Z
src/strictest/fix/__init__.py
adamtheturtle/strictest
3413ba7c3018d841b46aa5de81e8486b2d92cd78
[ "MIT" ]
null
null
null
""" XXX """ import click @click.group(name='fix') def fix() -> None: """ XXX """
7.384615
24
0.458333
bfc7c2719093b4e090acd8ebe32b430dfa49d87f
1,038
py
Python
Advent_of_Code/2018/Day_02/day_02.1.py
Zubieta/CPP
fb4a3cbf2e4edcc590df15663cd28fb9ecab679c
[ "MIT" ]
8
2017-03-02T07:56:45.000Z
2021-08-07T20:20:19.000Z
Advent_of_Code/2018/Day_02/day_02.1.py
zubie7a/Algorithms
fb4a3cbf2e4edcc590df15663cd28fb9ecab679c
[ "MIT" ]
null
null
null
Advent_of_Code/2018/Day_02/day_02.1.py
zubie7a/Algorithms
fb4a3cbf2e4edcc590df15663cd28fb9ecab679c
[ "MIT" ]
1
2021-08-07T20:20:20.000Z
2021-08-07T20:20:20.000Z
# https://adventofcode.com/2018/day/2 from collections import Counter lines = [] # Any better way to read until EOF without any clear number of lines? try: while True: line = str(input()) # print(line) lines.append(line) except Exception: # print("EOF") None # The counts of words ...
23.590909
69
0.640655
f33933486ebf58e3754769849140b49277605c95
1,402
py
Python
hcipy/__init__.py
kian1377/hcipy
f398e82797b3adbc263e9a35d9389ba7b62342f2
[ "MIT" ]
55
2018-06-29T01:13:26.000Z
2022-03-13T09:18:06.000Z
hcipy/__init__.py
kian1377/hcipy
f398e82797b3adbc263e9a35d9389ba7b62342f2
[ "MIT" ]
121
2018-06-12T05:01:05.000Z
2022-02-10T20:11:13.000Z
hcipy/__init__.py
kian1377/hcipy
f398e82797b3adbc263e9a35d9389ba7b62342f2
[ "MIT" ]
21
2018-07-09T11:01:29.000Z
2022-03-15T02:47:24.000Z
# Import all submodules. from . import aperture from . import atmosphere from . import coronagraphy from . import field from . import fourier from . import interpolation from . import mode_basis from . import optics from . import plotting from . import propagation from . import util from . import wavefront_control from...
26.45283
50
0.805991
0edd5ff27df414375824ffe238c781bfd001163e
7,899
py
Python
backend/birdshare_33816/settings.py
crowdbotics-apps/birdshare-33816
84c3552779013b9748b9873c0189c58cc64b87fe
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/birdshare_33816/settings.py
crowdbotics-apps/birdshare-33816
84c3552779013b9748b9873c0189c58cc64b87fe
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/birdshare_33816/settings.py
crowdbotics-apps/birdshare-33816
84c3552779013b9748b9873c0189c58cc64b87fe
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" Django settings for birdshare_33816 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impo...
30.380769
112
0.736802
4b7176245f3cafb502fc0a52be9483bcb74d5926
1,722
py
Python
angr-doc/examples/defcon2016quals_baby-re_0/solve.py
Ruide/angr-dev
964dc80c758e25c698c2cbcc454ef5954c5fa0a0
[ "BSD-2-Clause" ]
null
null
null
angr-doc/examples/defcon2016quals_baby-re_0/solve.py
Ruide/angr-dev
964dc80c758e25c698c2cbcc454ef5954c5fa0a0
[ "BSD-2-Clause" ]
null
null
null
angr-doc/examples/defcon2016quals_baby-re_0/solve.py
Ruide/angr-dev
964dc80c758e25c698c2cbcc454ef5954c5fa0a0
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python2 """ Author: David Manouchehri <manouchehri@protonmail.com> DEFCON CTF Qualifier 2016 Challenge: baby-re Team: hack.carleton Write-up: http://hack.carleton.team/2016/05/21/defcon-ctf-qualifier-2016-baby-re/ Runtime: ~8 minutes (single threaded E5-2650L v3 @ 1.80GHz on DigitalOcean) DigitalOcean ...
39.136364
139
0.750871
43da1540f91575b74b14181882773281fe861bc0
7,184
py
Python
python/tink/streaming_aead/streaming_aead_key_templates_test.py
bfloch/tink
aac780590902f726a8e7d6c4e3aa1cd75f4b0ed5
[ "Apache-2.0" ]
null
null
null
python/tink/streaming_aead/streaming_aead_key_templates_test.py
bfloch/tink
aac780590902f726a8e7d6c4e3aa1cd75f4b0ed5
[ "Apache-2.0" ]
null
null
null
python/tink/streaming_aead/streaming_aead_key_templates_test.py
bfloch/tink
aac780590902f726a8e7d6c4e3aa1cd75f4b0ed5
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
45.757962
87
0.776169
51a29e6a2ee107d21346fdb9ed24fcac9a3ccc78
866
py
Python
tests/factories.py
GFlorio/pytimeset
147ca0f074ea9753cb35f05fef8fd80210f82fb5
[ "MIT" ]
null
null
null
tests/factories.py
GFlorio/pytimeset
147ca0f074ea9753cb35f05fef8fd80210f82fb5
[ "MIT" ]
1
2020-03-24T17:28:14.000Z
2020-03-24T17:28:14.000Z
tests/factories.py
GFlorio/pytimeset
147ca0f074ea9753cb35f05fef8fd80210f82fb5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from datetime import datetime from random import uniform, randrange from typing import List from timeset import TimeInterval, TimeSet def make_moments(number: int, start: datetime, end: datetime) -> List[datetime]: diff = end-start return sorted([ start+uniform(0, 1)*diff for ...
27.935484
94
0.666282
dd501a18f441ebed0269a9455606ff857d2a4b67
765
py
Python
project_root/project_root/urls.py
saharisrael31/marketing-service-api
1fb6c016c2bf65134bf43da5b245a78bbcdc5294
[ "bzip2-1.0.6" ]
null
null
null
project_root/project_root/urls.py
saharisrael31/marketing-service-api
1fb6c016c2bf65134bf43da5b245a78bbcdc5294
[ "bzip2-1.0.6" ]
null
null
null
project_root/project_root/urls.py
saharisrael31/marketing-service-api
1fb6c016c2bf65134bf43da5b245a78bbcdc5294
[ "bzip2-1.0.6" ]
null
null
null
"""project_root URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-...
33.26087
77
0.709804
141905a8eacb4e3403a80cfba36d7dc84ca90820
4,269
py
Python
src/modeling/cnn_lstm.py
ShotaroKataoka/work_detection_PLOSONE
b8016e0003e11f6eb01355f52804c790a26a7741
[ "MIT" ]
null
null
null
src/modeling/cnn_lstm.py
ShotaroKataoka/work_detection_PLOSONE
b8016e0003e11f6eb01355f52804c790a26a7741
[ "MIT" ]
null
null
null
src/modeling/cnn_lstm.py
ShotaroKataoka/work_detection_PLOSONE
b8016e0003e11f6eb01355f52804c790a26a7741
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np class Block(nn.Module): def __init__(self): super(Block, self).__init__() self.conv1 = nn.Conv2d(256, 256, 3, stride=1) self.conv2 = nn.Conv2d(256, 256, 3, stride=1) self.conv3 = nn.Conv2d(256, 256...
40.273585
145
0.560319
d40e6f0abd8e6758cb2bc1a63f5851c78a8e47bd
1,380
py
Python
geolucidate/constants.py
siaavenza/geolucidate
afafd38f43c1714c814d1676e70ec9b3fef2d4c3
[ "MIT" ]
null
null
null
geolucidate/constants.py
siaavenza/geolucidate
afafd38f43c1714c814d1676e70ec9b3fef2d4c3
[ "MIT" ]
null
null
null
geolucidate/constants.py
siaavenza/geolucidate
afafd38f43c1714c814d1676e70ec9b3fef2d4c3
[ "MIT" ]
1
2020-07-03T14:59:21.000Z
2020-07-03T14:59:21.000Z
import re """List of Minutes/Seconds Characters for normalization Was generated with unicodedata.name and unicodedata.char and searched for names that include "QUOTATION" and "PRIME" """ MINUTE_CHARACTERS = { # Quotations "LEFT SINGLE QUOTATION MARK": "‘", "RIGHT SINGLE QUOTATION MARK": "’", "HEAVY S...
33.658537
84
0.65942
a07c38ada5eb00ada778e7a6a89dc4872da34580
3,256
py
Python
docker/exporter/exporter.py
Kalakaarboyz1/osv
538dd770464c01bd459dc99940ded90a47677ed0
[ "Apache-2.0" ]
1
2021-07-21T03:58:50.000Z
2021-07-21T03:58:50.000Z
docker/exporter/exporter.py
Kalakaarboyz1/osv
538dd770464c01bd459dc99940ded90a47677ed0
[ "Apache-2.0" ]
null
null
null
docker/exporter/exporter.py
Kalakaarboyz1/osv
538dd770464c01bd459dc99940ded90a47677ed0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2021 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...
31.921569
74
0.713452
5fb7fa1dcbdaca23a09f4123bee698c4eafa12b6
11,140
py
Python
spider.py
ljw8947/renren-dumps
d83622b75fb9995a2fa847290201e91c65d2b9a6
[ "MIT" ]
null
null
null
spider.py
ljw8947/renren-dumps
d83622b75fb9995a2fa847290201e91c65d2b9a6
[ "MIT" ]
null
null
null
spider.py
ljw8947/renren-dumps
d83622b75fb9995a2fa847290201e91c65d2b9a6
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import datetime import html import json import os import pickle import random import re import lxml.html from typing import Callable, Dict, List, Union import html2text from requests import Session JSONType = Dict[str, Union[str, int]] SimpleCallback = Cal...
34.596273
138
0.549461
ce0df2753cef4ba008a57b44c40af48d9f72775a
741
py
Python
functions_legacy/VGpdf.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
6
2021-04-10T13:24:30.000Z
2022-03-26T08:20:42.000Z
functions_legacy/VGpdf.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
null
null
null
functions_legacy/VGpdf.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
6
2019-08-13T22:02:17.000Z
2022-02-09T17:49:12.000Z
from numpy import pi, abs, log, exp from scipy.special import gamma, kv def VGpdf(x,par,tau): # This function computes the Variance-Gamma pdf at horizon tau, evaluated # at points x # INPUTS # x :[vector] points at which the pdf is evaluated # par :[struct] parameters of the VG model the str...
26.464286
84
0.57085
502c179e1adb0ab9139def80e0bea1aca43fee56
4,619
py
Python
lib/train/BaseTrainer.py
McMasterAI/RadiologyandAI-MedicalZooPytorch
606a1654f08b8bae7c265608694d55fecc1001ed
[ "MIT" ]
995
2019-07-23T11:34:22.000Z
2022-03-30T21:10:52.000Z
lib/train/BaseTrainer.py
pyushkevich/MedicalZooPytorch
c6831d8ddebfbc1b33c04f8cec0d01c2ceb828f6
[ "MIT" ]
18
2020-04-27T03:38:22.000Z
2022-01-18T20:55:20.000Z
lib/train/BaseTrainer.py
pyushkevich/MedicalZooPytorch
c6831d8ddebfbc1b33c04f8cec0d01c2ceb828f6
[ "MIT" ]
209
2019-08-21T13:41:13.000Z
2022-03-30T08:01:52.000Z
import torch from abc import abstractmethod from numpy import inf from lib.visual3D_temp import TensorboardWriter class BaseTrainer: """ Base class for all trainers """ def __init__(self, model, criterion, metric_ftns, optimizer, config): self.config = config self.logger = config.get_l...
38.491667
115
0.573284
063abfe41d72719dadba934c3f77498135d0b9a7
301
py
Python
7_Sarven_Desert/303-Yakstraction/yakstraction.py
katitek/Code-Combat
fbda1ac0ae4a2e2cbfce21492a2caec8098f1bef
[ "MIT" ]
null
null
null
7_Sarven_Desert/303-Yakstraction/yakstraction.py
katitek/Code-Combat
fbda1ac0ae4a2e2cbfce21492a2caec8098f1bef
[ "MIT" ]
null
null
null
7_Sarven_Desert/303-Yakstraction/yakstraction.py
katitek/Code-Combat
fbda1ac0ae4a2e2cbfce21492a2caec8098f1bef
[ "MIT" ]
null
null
null
def flagFunc(flag): pos = flag.pos if hero.gold >= 25: hero.buildXY("decoy", pos.x, pos.y) hero.pickUpFlag(flag) while True: flag = hero.findFlag() if flag: flagFunc(flag) item = hero.findNearestItem() if item: hero.moveXY(item.pos.x, item.pos.y)
20.066667
43
0.58804
2cc7637ae7f20599c6ba5e6dd882b9d1f386fccb
3,648
py
Python
extract_weights.py
HaGeza/DeepLabV3PlusModified
5c46c167ce907e167b3b7ca51f4fabc66586f6d9
[ "MIT" ]
null
null
null
extract_weights.py
HaGeza/DeepLabV3PlusModified
5c46c167ce907e167b3b7ca51f4fabc66586f6d9
[ "MIT" ]
null
null
null
extract_weights.py
HaGeza/DeepLabV3PlusModified
5c46c167ce907e167b3b7ca51f4fabc66586f6d9
[ "MIT" ]
null
null
null
from __future__ import print_function import os import numpy as np import tensorflow as tf from tensorflow.keras.utils import get_file def get_xception_filename(key): """Rename tensor name to the corresponding Keras layer weight name. # Arguments key: tensor name in TF (determined by tf.variable_scop...
34.093458
106
0.705044
798c09d491aa93c3b0eeb772c3f3901f1e057770
4,537
py
Python
src/u_net.py
mori97/U-Net_MUSDB18
d452f0e6378c1d74e823dcb1e95d92307f4dea46
[ "MIT" ]
5
2020-02-06T05:44:08.000Z
2021-07-21T07:16:49.000Z
src/u_net.py
mori97/U-Net_MUSDB18
d452f0e6378c1d74e823dcb1e95d92307f4dea46
[ "MIT" ]
2
2021-06-21T11:09:30.000Z
2021-07-12T07:35:09.000Z
src/u_net.py
mori97/U-Net_MUSDB18
d452f0e6378c1d74e823dcb1e95d92307f4dea46
[ "MIT" ]
1
2021-06-05T03:13:12.000Z
2021-06-05T03:13:12.000Z
import torch import torch.nn.functional as F EPS = 1e-8 class UNet(torch.nn.Module): """An implementation of U-Net for music source separation. It has been proposed in "Singing Voice Separation with Deep U-Net Convolutional Networks". (https://ismir2017.smcnus.org/wp-content/uploads/2017/10/171_Paper...
39.798246
79
0.612519
d1ca8dbc9522b8107e6ae3860301404cbb0a65f7
2,426
py
Python
script.py
RocqJones/api
20edbd6ca4a200df233fbd40d0cf9f2b57cade30
[ "Apache-2.0" ]
null
null
null
script.py
RocqJones/api
20edbd6ca4a200df233fbd40d0cf9f2b57cade30
[ "Apache-2.0" ]
null
null
null
script.py
RocqJones/api
20edbd6ca4a200df233fbd40d0cf9f2b57cade30
[ "Apache-2.0" ]
null
null
null
import flask import sqlite3 from flask import request, jsonify """ - The product database has 3 tables FRUITS, CERIALS AND VEGETABLES - Our API allows users to filter by three fields: fruits, cerials, vegetables """ app = flask.Flask(__name__) app.config["DEBUG"] = True def dict_factory(cursor, row): d = {} ...
28.541176
110
0.679308
252e6783537b4a8a94fd4c159e0bd5b0eb89f23f
11,507
py
Python
utils/callbacks.py
bubbliiiing/mobilenet-yolov4-keras
bc52cda271fc1e2dbf4e313bf11daeee6afc215a
[ "MIT" ]
10
2022-01-20T12:11:13.000Z
2022-03-16T11:33:36.000Z
utils/callbacks.py
bubbliiiing/mobilenet-yolov4-keras
bc52cda271fc1e2dbf4e313bf11daeee6afc215a
[ "MIT" ]
1
2022-01-29T08:51:26.000Z
2022-01-29T08:51:26.000Z
utils/callbacks.py
bubbliiiing/mobilenet-yolov4-keras
bc52cda271fc1e2dbf4e313bf11daeee6afc215a
[ "MIT" ]
6
2021-12-31T08:38:55.000Z
2022-03-18T03:32:56.000Z
import os import math import keras import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt import scipy.signal import shutil import numpy as np from keras import backend as K from PIL import Image from tqdm import tqdm from .utils import cvtColor, preprocess_input, resize_image f...
42.618519
152
0.506474
2172bd88b1bf63d53e18dc63e445d756331a80c2
705
py
Python
src/d2/d2.py
nqryn/AoC-2019
d21ecafe8ecb34caa2a578bb691304193c9b03ac
[ "MIT" ]
null
null
null
src/d2/d2.py
nqryn/AoC-2019
d21ecafe8ecb34caa2a578bb691304193c9b03ac
[ "MIT" ]
null
null
null
src/d2/d2.py
nqryn/AoC-2019
d21ecafe8ecb34caa2a578bb691304193c9b03ac
[ "MIT" ]
null
null
null
def program_assist(intcode): i = 0 while True: opcode = intcode[i] if opcode == 99: return intcode[0] elif opcode == 1: intcode[intcode[i+3]] = intcode[intcode[i+1]] + intcode[intcode[i+2]] elif opcode == 2: intcode[intcode[i+3]] = intcode[intcode[i+1]] * intcode[intcode[i+2]] i += 4 def solve():...
24.310345
72
0.611348
d2db9df1f1096f10642401560cf08a16356638aa
40
py
Python
bulk_sched/__init__.py
PrynsTag/oneBarangay
6a8d56003d85b8385e91f5c5d81208619023c1ee
[ "Apache-2.0" ]
null
null
null
bulk_sched/__init__.py
PrynsTag/oneBarangay
6a8d56003d85b8385e91f5c5d81208619023c1ee
[ "Apache-2.0" ]
96
2021-08-28T12:37:02.000Z
2022-03-23T04:25:12.000Z
bulk_sched/__init__.py
PrynsTag/oneBarangay
6a8d56003d85b8385e91f5c5d81208619023c1ee
[ "Apache-2.0" ]
null
null
null
"""This is init file for bulk_sched."""
20
39
0.675
816efc1bc11aab9986f9847b7e8be859410992a9
1,262
py
Python
server/apps/comments/views.py
ojengwa/base
5b5529b307643f37fc34bdda412e2b90c3d444e1
[ "MIT" ]
9
2019-03-08T22:12:38.000Z
2022-02-28T10:10:58.000Z
server/apps/comments/views.py
ojengwa/base
5b5529b307643f37fc34bdda412e2b90c3d444e1
[ "MIT" ]
4
2020-06-05T18:49:03.000Z
2021-06-01T22:28:04.000Z
server/apps/comments/views.py
ojengwa/base
5b5529b307643f37fc34bdda412e2b90c3d444e1
[ "MIT" ]
2
2020-05-26T10:58:31.000Z
2020-12-12T11:45:16.000Z
from rest_framework.response import Response from rest_framework.viewsets import ModelViewSet from .models import Comment from .serializers import CommentSerializer class CommentViewSet(ModelViewSet): queryset = Comment.objects.all() serializer_class = CommentSerializer def create(self, request, *args,...
36.057143
79
0.681458
890e8e3d8efc1521d299dd8e55dcfc3ecb3dd29e
11,243
py
Python
py2neo/wiring.py
VitalyRomanov/py2neo
2d0683cf2ab8b77b0c5bbba4eade0003c68d5905
[ "Apache-2.0" ]
null
null
null
py2neo/wiring.py
VitalyRomanov/py2neo
2d0683cf2ab8b77b0c5bbba4eade0003c68d5905
[ "Apache-2.0" ]
null
null
null
py2neo/wiring.py
VitalyRomanov/py2neo
2d0683cf2ab8b77b0c5bbba4eade0003c68d5905
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2011-2021, Nigel Small # # 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 # # Unle...
31.492997
92
0.578315
eaced566b5736ace1dc2f4d8c81fef923af66a92
41,608
py
Python
scraper/views.py
ezequiellagos/uninews
7054feb63dfe42c4ad6fadf45c66e21ed183ae1b
[ "MIT" ]
2
2019-06-24T20:41:56.000Z
2020-11-07T01:10:05.000Z
scraper/views.py
ezequiellagos/uninews
7054feb63dfe42c4ad6fadf45c66e21ed183ae1b
[ "MIT" ]
9
2020-02-11T23:30:43.000Z
2022-03-12T00:58:40.000Z
scraper/views.py
ezequiellagos/uninews
7054feb63dfe42c4ad6fadf45c66e21ed183ae1b
[ "MIT" ]
null
null
null
from django.shortcuts import render from news.models import Universidad, Noticia from bs4 import BeautifulSoup from django.conf import settings import feedparser, unicodedata, urllib.request, time, re, datetime, time, threading import ssl import dateutil.parser import logging import unidecode result = [] # Create yo...
45.226087
266
0.593852
cdbfec758d4ad3a29e301f4ced8cac5b8d6dfa38
3,098
py
Python
rlpyt/samplers/parallel/worker.py
BorenTsai/rlpyt
58637fc3a1949b7dd39719a5bb8a055bfb33a845
[ "MIT" ]
null
null
null
rlpyt/samplers/parallel/worker.py
BorenTsai/rlpyt
58637fc3a1949b7dd39719a5bb8a055bfb33a845
[ "MIT" ]
null
null
null
rlpyt/samplers/parallel/worker.py
BorenTsai/rlpyt
58637fc3a1949b7dd39719a5bb8a055bfb33a845
[ "MIT" ]
null
null
null
import psutil import time import torch from rlpyt.utils.collections import AttrDict from rlpyt.utils.logging import logger from rlpyt.utils.seed import set_seed def initialize_worker(rank, seed=None, cpu=None, torch_threads=None): log_str = f"Sampler rank {rank} initialized" cpu = [cpu] if isinstance(cpu, i...
34.808989
94
0.633635
0754d7665c155cacd38aa8c369273ff94c19bf65
4,009
py
Python
vaultier/accounts/models.py
dz0ny/Vaultier
e23d86c7576f4785b4e369242d7b5f7125e4d8c6
[ "BSD-3-Clause" ]
30
2015-07-13T11:11:23.000Z
2021-01-25T14:21:18.000Z
vaultier/accounts/models.py
corpusops/vaultier
3baef4346add0b3bdff322257467f74b2a0c856c
[ "BSD-3-Clause" ]
null
null
null
vaultier/accounts/models.py
corpusops/vaultier
3baef4346add0b3bdff322257467f74b2a0c856c
[ "BSD-3-Clause" ]
31
2015-08-10T12:10:16.000Z
2020-09-18T09:43:28.000Z
from django.contrib.auth.models import AbstractBaseUser from django.db import models from django.db.models.deletion import CASCADE, PROTECT from django.db.models.signals import pre_save, post_save from accounts.business.fields import MemberStatusField from libs.changes.changes import ChangesMixin from libs.lowercasefie...
33.974576
79
0.697431
3d261d9db57579988fc127d7c4c99545c3c23aea
5,029
py
Python
utilities/python/crispr_convert/main.py
knightjdr/prohits-viz-containers
a696e8f2a3c9fca398aa2141f64c6b2003cff8d0
[ "MIT" ]
null
null
null
utilities/python/crispr_convert/main.py
knightjdr/prohits-viz-containers
a696e8f2a3c9fca398aa2141f64c6b2003cff8d0
[ "MIT" ]
null
null
null
utilities/python/crispr_convert/main.py
knightjdr/prohits-viz-containers
a696e8f2a3c9fca398aa2141f64c6b2003cff8d0
[ "MIT" ]
null
null
null
import argparse import os import pandas as pd ''' Usage: python3 main.py \ -f folder \ -t bagel output: [tool]-converted.txt ''' def convert(): options = parse_args() files = get_files(options.folder) df = pd.DataFrame() if options.tool == 'bagel': df = merge_and_add_conditions(files) if options.t...
33.085526
180
0.696958
0d0f92c6a33f123c48f5df67e85d8f1b6ce64cc9
6,162
py
Python
test/test_remote.py
netconstructor/home-assistant
ce1a5de6070c0350996136bb5ccf571995085b23
[ "MIT" ]
null
null
null
test/test_remote.py
netconstructor/home-assistant
ce1a5de6070c0350996136bb5ccf571995085b23
[ "MIT" ]
null
null
null
test/test_remote.py
netconstructor/home-assistant
ce1a5de6070c0350996136bb5ccf571995085b23
[ "MIT" ]
1
2020-11-13T10:06:21.000Z
2020-11-13T10:06:21.000Z
""" test.remote ~~~~~~~~~~~ Tests Home Assistant remote methods and classes. """ # pylint: disable=protected-access,too-many-public-methods import unittest import homeassistant as ha import homeassistant.remote as remote import homeassistant.components.http as http API_PASSWORD = "test1234" HTTP_BASE_URL = "http://...
30.50495
79
0.630964
b7694603e32ac00ae9781f39a799f7b51463802f
11,652
py
Python
gdscript-docs-maker/gdscript_docs_maker/modules/gdscript_objects.py
Gamemap/godot-console
21eb060a17af2ae32c5f2eda464d76517a1fb7ac
[ "MIT" ]
372
2020-04-29T07:43:46.000Z
2022-03-28T21:33:18.000Z
gdscript-docs-maker/gdscript_docs_maker/modules/gdscript_objects.py
Shockblast/godot-console
400fd0c496ecb9a03c3ab841019d45f017d29002
[ "MIT" ]
48
2020-05-13T10:23:26.000Z
2022-03-09T12:32:00.000Z
gdscript-docs-maker/gdscript_docs_maker/modules/gdscript_objects.py
Shockblast/godot-console
400fd0c496ecb9a03c3ab841019d45f017d29002
[ "MIT" ]
39
2020-05-27T19:21:26.000Z
2022-03-09T07:09:41.000Z
"""Converts the json representation of GDScript classes as dictionaries into objects """ import itertools import operator import re from dataclasses import dataclass from enum import Enum from typing import List, Tuple from .make_markdown import make_bold, make_code_inline, make_list, surround_with_html from .utils im...
29.876923
99
0.625901
c2cd672d6b8c993954f16b1675a7dda26fb79192
12,433
py
Python
tests/integration-tests/tests/update/test_update.py
agobeaux/aws-parallelcluster
ec337c6b8341f9b84616b6bbbe8687a0a5f71126
[ "Apache-2.0" ]
null
null
null
tests/integration-tests/tests/update/test_update.py
agobeaux/aws-parallelcluster
ec337c6b8341f9b84616b6bbbe8687a0a5f71126
[ "Apache-2.0" ]
null
null
null
tests/integration-tests/tests/update/test_update.py
agobeaux/aws-parallelcluster
ec337c6b8341f9b84616b6bbbe8687a0a5f71126
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "LICENSE.txt" file acc...
39.22082
120
0.754766
83afe6e665b52e607801668cf12a0796e6b163fc
2,298
py
Python
app/balltracking/pubnubpython/endpoints/presence/here_now.py
gdmgent-1718-wot/interactive-wall
af7ecff126b1ee9c85c270fe13d1338aa790c34b
[ "Apache-2.0" ]
146
2015-01-05T03:14:53.000Z
2022-03-16T16:51:52.000Z
app/balltracking/pubnubpython/endpoints/presence/here_now.py
gdmgent-1718-wot/interactive-wall
af7ecff126b1ee9c85c270fe13d1338aa790c34b
[ "Apache-2.0" ]
48
2015-01-15T15:27:41.000Z
2022-03-21T14:17:05.000Z
app/balltracking/pubnubpython/endpoints/presence/here_now.py
gdmgent-1718-wot/interactive-wall
af7ecff126b1ee9c85c270fe13d1338aa790c34b
[ "Apache-2.0" ]
128
2015-01-05T03:40:59.000Z
2022-03-02T20:50:58.000Z
from pubnub import utils from pubnub.endpoints.endpoint import Endpoint from pubnub.enums import HttpMethod, PNOperationType from pubnub.models.consumer.presence import PNHereNowResult class HereNow(Endpoint): HERE_NOW_PATH = "/v2/presence/sub-key/%s/channel/%s" HERE_NOW_GLOBAL_PATH = "/v2/presence/sub-key/%s...
29.461538
87
0.668407
753524ffeef07a1219c92ae145ac45d76013ea1e
4,423
py
Python
sparse_dot_mkl/sparse_dot.py
mynameisvinn/sparse_dot
493c0be532a6397e59d5079e8c1cd7cb4321eb1d
[ "MIT" ]
null
null
null
sparse_dot_mkl/sparse_dot.py
mynameisvinn/sparse_dot
493c0be532a6397e59d5079e8c1cd7cb4321eb1d
[ "MIT" ]
null
null
null
sparse_dot_mkl/sparse_dot.py
mynameisvinn/sparse_dot
493c0be532a6397e59d5079e8c1cd7cb4321eb1d
[ "MIT" ]
null
null
null
from sparse_dot_mkl._sparse_sparse import _sparse_dot_sparse as _sds from sparse_dot_mkl._sparse_dense import _sparse_dot_dense as _sdd from sparse_dot_mkl._dense_dense import _dense_dot_dense as _ddd from sparse_dot_mkl._sparse_vector import _sparse_dot_vector as _sdv from sparse_dot_mkl._sparse_qr_solver import spars...
44.676768
111
0.732534
b57bb01d564119ab3369ba4b364c1e0644dd4285
905
py
Python
daemon/clients/mixin.py
arijitdas123student/jina
54d916e362bde0391b0af0f12241d531b8453247
[ "Apache-2.0" ]
15,179
2020-04-28T10:23:56.000Z
2022-03-31T14:35:25.000Z
daemon/clients/mixin.py
manavshah123/jina
f18b04eb82d18a3c554e2892bbae4b95fc0cb13e
[ "Apache-2.0" ]
3,912
2020-04-28T13:01:29.000Z
2022-03-31T14:36:46.000Z
daemon/clients/mixin.py
manavshah123/jina
f18b04eb82d18a3c554e2892bbae4b95fc0cb13e
[ "Apache-2.0" ]
1,955
2020-04-28T10:50:49.000Z
2022-03-31T12:28:34.000Z
from functools import partialmethod from jina.helper import run_async class AsyncToSyncMixin: """Mixin to convert `async def`s to `def`""" def func(self, func_name, *args, **kwargs): """convert async method `func_name` to a normal method :param func_name: name of method in super :pa...
31.206897
69
0.647514
630774fd4884e4761a3ad8728804111146bc9870
1,909
py
Python
mogwai/plotting/precision_length.py
joshim5/mogwai
917fe5b2dea9c3adc3a3d1dfe41ae33c3ae86f55
[ "BSD-3-Clause" ]
24
2020-11-20T19:10:23.000Z
2022-03-13T13:26:56.000Z
mogwai/plotting/precision_length.py
joshim5/mogwai
917fe5b2dea9c3adc3a3d1dfe41ae33c3ae86f55
[ "BSD-3-Clause" ]
10
2020-10-21T21:42:14.000Z
2020-11-18T07:57:30.000Z
mogwai/plotting/precision_length.py
joshim5/mogwai
917fe5b2dea9c3adc3a3d1dfe41ae33c3ae86f55
[ "BSD-3-Clause" ]
7
2020-12-27T00:44:18.000Z
2021-11-07T05:16:49.000Z
import numpy as np import matplotlib.pyplot as plt import torch def plot_precision_vs_length( pred: torch.Tensor, meas: torch.Tensor, thresh: float = 1e-4, superdiag: int = 6, ): """Plot precision versus length for various length cutoffs. Analogous to a precision-recall curve. Args: ...
32.355932
97
0.654793
55e18af81efeee17bfd72edfaabecf8cd0a3292d
36,677
py
Python
trove/tests/unittests/guestagent/test_cassandra_manager.py
Tesora-Release/tesora-trove
042145a573ce08b5d7cb25e1491e391e777a20be
[ "Apache-2.0" ]
2
2016-08-27T01:59:08.000Z
2018-06-08T10:02:08.000Z
trove/tests/unittests/guestagent/test_cassandra_manager.py
Tesora-Release/tesora-trove
042145a573ce08b5d7cb25e1491e391e777a20be
[ "Apache-2.0" ]
null
null
null
trove/tests/unittests/guestagent/test_cassandra_manager.py
Tesora-Release/tesora-trove
042145a573ce08b5d7cb25e1491e391e777a20be
[ "Apache-2.0" ]
7
2016-04-06T19:03:03.000Z
2018-10-12T21:50:51.000Z
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
46.367889
79
0.608747
188668b8537e18c1475337ca8b44b327a776daf8
6,499
py
Python
applied_python/applied_python/lib/python2.7/site-packages/netmiko/juniper/juniper_ssh.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
applied_python/applied_python/lib/python2.7/site-packages/netmiko/juniper/juniper_ssh.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
applied_python/applied_python/lib/python2.7/site-packages/netmiko/juniper/juniper_ssh.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import re from netmiko.ssh_connection import BaseSSHConnection from netmiko.netmiko_globals import MAX_BUFFER import time class JuniperSSH(BaseSSHConnection): ''' Implement methods for interacting with Juniper Networks devices. Subclass of SSHConnection. Disables...
35.513661
98
0.595784
a70a4181b4620c9f81921b7889af2fda2d0a91ed
6,785
py
Python
src/core/testenv.py
adamatousek/hsExprTest
af38af5f9601b37ef830d65d32c15e0563495c0f
[ "BSD-2-Clause" ]
null
null
null
src/core/testenv.py
adamatousek/hsExprTest
af38af5f9601b37ef830d65d32c15e0563495c0f
[ "BSD-2-Clause" ]
null
null
null
src/core/testenv.py
adamatousek/hsExprTest
af38af5f9601b37ef830d65d32c15e0563495c0f
[ "BSD-2-Clause" ]
null
null
null
import tempfile import config import copy import os.path import aiofiles # type: ignore import posix1e # type: ignore import pwd import os import sys import asyncio import subprocess import contextlib import json from typing import Tuple, List, Optional import cgroup class PointEntry: def __init__(self, point...
38.551136
83
0.531909
8c53f1f34059d2351e8ee330de28ca6c6290d923
453
py
Python
plotly/validators/histogram2dcontour/marker/_colorsrc.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
2
2020-03-24T11:41:14.000Z
2021-01-14T07:59:43.000Z
plotly/validators/histogram2dcontour/marker/_colorsrc.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
plotly/validators/histogram2dcontour/marker/_colorsrc.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
4
2019-06-03T14:49:12.000Z
2022-01-06T01:05:12.000Z
import _plotly_utils.basevalidators class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='colorsrc', parent_name='histogram2dcontour.marker', **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=plo...
23.842105
67
0.604857
b19ff01779378100db41b4f84c713750cc497a92
5,624
py
Python
downstream/finetune/dataset/video_dataset.py
KuangHaofei/SeCo-Sequence-Contrastive-Learning
f7de4008011ae78ee02fef921d3d4620ab164d2b
[ "MIT" ]
null
null
null
downstream/finetune/dataset/video_dataset.py
KuangHaofei/SeCo-Sequence-Contrastive-Learning
f7de4008011ae78ee02fef921d3d4620ab164d2b
[ "MIT" ]
null
null
null
downstream/finetune/dataset/video_dataset.py
KuangHaofei/SeCo-Sequence-Contrastive-Learning
f7de4008011ae78ee02fef921d3d4620ab164d2b
[ "MIT" ]
null
null
null
import torch.utils.data import os import random import torch import lmdb import io from PIL import Image class VideoDataset(torch.utils.data.Dataset): def __init__(self, list_file, transform, root_path, clip_length=1, num_steps=1, num_segments=1, num_channels=3, format="LMDB"): super(Vide...
39.328671
117
0.621977
8f3fd35fee404e4606b1dc56654c317d04514e6c
2,432
py
Python
cogs/help.py
MothmanHasLowIQ/Fanfiction-Finder
b7bb06dc86429e91b77ec567f63d93abb68275cc
[ "MIT" ]
3
2021-06-26T09:37:00.000Z
2021-11-14T20:02:59.000Z
cogs/help.py
MothmanHasLowIQ/Fanfiction-Finder
b7bb06dc86429e91b77ec567f63d93abb68275cc
[ "MIT" ]
1
2022-03-22T17:16:04.000Z
2022-03-22T17:16:04.000Z
cogs/help.py
MothmanHasLowIQ/Fanfiction-Finder
b7bb06dc86429e91b77ec567f63d93abb68275cc
[ "MIT" ]
5
2021-06-04T09:14:21.000Z
2022-01-29T20:39:03.000Z
from discord.ext.commands import command, Cog import discord import re from utils.embed_pages import get_embed class Help(Cog): def __init__(self, client): self.client = client @command() async def help(self, ctx): try: embed_pg, page_limit = get_embed(0) message...
35.246377
177
0.520148
f434524c16dfc2999738c1ddfab8c21bd8c15b38
4,799
py
Python
.history/src/data/data_20191021130729.py
bkraft4257/kaggle_titanic
f29ea1773773109a867278c001dbd21a9f7b21dd
[ "MIT" ]
null
null
null
.history/src/data/data_20191021130729.py
bkraft4257/kaggle_titanic
f29ea1773773109a867278c001dbd21a9f7b21dd
[ "MIT" ]
null
null
null
.history/src/data/data_20191021130729.py
bkraft4257/kaggle_titanic
f29ea1773773109a867278c001dbd21a9f7b21dd
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from typing import Union from pathlib import Path from nameparser import HumanName class ExtractData: def __init__(self, filename: Union[str, Path], age_bins = None, drop_columns=None): # """Extract Training Data from file or Path # Arguments: # ...
29.807453
114
0.559492
4aa04c03c9e5d22d9b129b697f71b213d9fc37ac
48,880
py
Python
iot_api_client/api/things_v1_api.py
akash73/iot-client-py
5335dbaa816fb2d26097f0403d3d51796ebd9d99
[ "Apache-2.0" ]
13
2020-01-19T10:54:35.000Z
2022-02-27T22:43:21.000Z
iot_api_client/api/things_v1_api.py
akash73/iot-client-py
5335dbaa816fb2d26097f0403d3d51796ebd9d99
[ "Apache-2.0" ]
10
2019-11-26T04:39:32.000Z
2021-03-25T07:46:39.000Z
iot_api_client/api/things_v1_api.py
akash73/iot-client-py
5335dbaa816fb2d26097f0403d3d51796ebd9d99
[ "Apache-2.0" ]
10
2020-01-19T10:54:42.000Z
2021-12-09T05:46:20.000Z
# coding: utf-8 """ Iot API Collection of all public API endpoints. # noqa: E501 The version of the OpenAPI document: 2.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from...
45.93985
138
0.606976
01f8a7c691e96edb5d476d1cebc6eb27e149e7a4
1,834
py
Python
ivi/chroma/chroma62006p3008.py
elopezga/ErrorRate
4f2be815f1e88ea832c8e7f0ddd6f922a0b9cdc1
[ "MIT" ]
3
2016-04-28T10:08:12.000Z
2021-07-28T22:45:23.000Z
ivi/chroma/chroma62006p3008.py
elopezga/ErrorRate
4f2be815f1e88ea832c8e7f0ddd6f922a0b9cdc1
[ "MIT" ]
null
null
null
ivi/chroma/chroma62006p3008.py
elopezga/ErrorRate
4f2be815f1e88ea832c8e7f0ddd6f922a0b9cdc1
[ "MIT" ]
2
2017-07-22T09:13:41.000Z
2020-02-06T18:46:36.000Z
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2013-2014 Alex Forencich 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...
33.345455
77
0.672301
eb1eb4070d905dda3a4952fb04f7bb724bc3afce
514
py
Python
Data Science With Python/16-statistical-thinking-in-python-(part-2)/2-bootstrap-confidence=intervals/confidence-interval-on-the-rate-of-no-hitters.py
aimanahmedmoin1997/DataCamp
c6a6c4d59b83f14854bd76ed5c0c7f2dddd6de1d
[ "MIT" ]
3
2019-05-12T04:49:24.000Z
2020-05-06T00:40:28.000Z
Data Science With Python/16-statistical-thinking-in-python-(part-2)/2-bootstrap-confidence=intervals/confidence-interval-on-the-rate-of-no-hitters.py
aimanahmedmoin1997/DataCamp
c6a6c4d59b83f14854bd76ed5c0c7f2dddd6de1d
[ "MIT" ]
null
null
null
Data Science With Python/16-statistical-thinking-in-python-(part-2)/2-bootstrap-confidence=intervals/confidence-interval-on-the-rate-of-no-hitters.py
aimanahmedmoin1997/DataCamp
c6a6c4d59b83f14854bd76ed5c0c7f2dddd6de1d
[ "MIT" ]
7
2018-11-06T17:43:31.000Z
2020-11-07T21:08:16.000Z
# Draw bootstrap replicates of the mean no-hitter time (equal to tau): bs_replicates bs_replicates = draw_bs_reps(nohitter_times, np.mean, size=10000) # Compute the 95% confidence interval: conf_int conf_int = np.percentile(bs_replicates, [2.5, 97.5]) # Print the confidence interval print('95% confidence interval =',...
30.235294
84
0.737354
6d4c97fd2f8a537d9195a4fffa77d31cad62e60a
1,746
py
Python
booking/urls.py
studentisgss/booking
e0e28f42cf2a466688b4ea3787eb28dbc0980cac
[ "MIT" ]
7
2015-12-11T19:18:39.000Z
2020-10-30T12:50:19.000Z
booking/urls.py
studentisgss/booking
e0e28f42cf2a466688b4ea3787eb28dbc0980cac
[ "MIT" ]
119
2015-11-03T22:21:09.000Z
2021-03-17T21:36:49.000Z
booking/urls.py
studentisgss/booking
e0e28f42cf2a466688b4ea3787eb28dbc0980cac
[ "MIT" ]
null
null
null
"""booking URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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...
38.8
77
0.727377
5b003d1e411e43ca58a3bc271c3c3d159726fd5e
8,018
py
Python
tests/hazmat/primitives/test_ed25519.py
dvaerum/cryptography
63dfc57fca688d0f8d0515001f249c317d5e54dc
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
8
2015-01-29T19:16:40.000Z
2021-01-08T05:55:03.000Z
tests/hazmat/primitives/test_ed25519.py
dvaerum/cryptography
63dfc57fca688d0f8d0515001f249c317d5e54dc
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
12
2021-01-05T06:46:37.000Z
2022-03-30T19:06:26.000Z
tests/hazmat/primitives/test_ed25519.py
dvaerum/cryptography
63dfc57fca688d0f8d0515001f249c317d5e54dc
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
5
2015-11-06T01:47:01.000Z
2021-12-01T00:22:52.000Z
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import binascii import os import pytest from cryptography.exceptions im...
34.412017
79
0.628336
74ba319c5289d5da4465bc8f51045779605c2178
9,930
py
Python
Mac/Lib/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suite.py
SaadBazaz/ChinesePython
800955539dda912d4a1621bcf5a700aaaddc012f
[ "CNRI-Python-GPL-Compatible" ]
3
2022-01-30T20:08:24.000Z
2022-02-12T08:51:12.000Z
Mac/Lib/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suite.py
SaadBazaz/ChinesePython
800955539dda912d4a1621bcf5a700aaaddc012f
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Mac/Lib/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suite.py
SaadBazaz/ChinesePython
800955539dda912d4a1621bcf5a700aaaddc012f
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
"""Suite QuickDraw Graphics Suite: A set of basic classes for graphics Level 1, version 1 Generated from Macintosh HD:Systeemmap:Extensies:AppleScript AETE/AEUT resource version 1/0, language 0, script 0 """ import aetools import MacOS _code = 'qdrw' class QuickDraw_Graphics_Suite_Events: pass class arc(aetools...
24.458128
100
0.693958
43d87902fd4622536b4111b8bde9de7e9702dda8
2,806
py
Python
numba/core/options.py
ashrielbrian/numba
2558320dc4ae9d2ecea423f8ab24813d7461bb84
[ "BSD-2-Clause", "BSD-3-Clause" ]
10
2019-04-27T08:45:34.000Z
2021-06-21T22:08:54.000Z
numba/core/options.py
ashrielbrian/numba
2558320dc4ae9d2ecea423f8ab24813d7461bb84
[ "BSD-2-Clause", "BSD-3-Clause" ]
108
2020-08-17T22:38:26.000Z
2021-12-06T09:44:14.000Z
numba/core/options.py
ashrielbrian/numba
2558320dc4ae9d2ecea423f8ab24813d7461bb84
[ "BSD-2-Clause", "BSD-3-Clause" ]
10
2019-07-20T02:16:10.000Z
2021-06-22T06:56:23.000Z
""" Target Options """ import operator from numba.core import config, utils from numba.core.targetconfig import TargetConfig, Option class TargetOptions: """Target options maps user options from decorators to the ``numba.core.compiler.Flags`` used by lowering and target context. """ class Mapping: ...
26.980769
76
0.596579
87b67befbe06b91307c3cc00002585cd3b70e2a3
749
py
Python
my/src/Flask.py
qq57694878/pychonws
cfad3d94e251db35c0f3485bc7231cc9de999913
[ "Apache-2.0" ]
21
2020-02-04T03:18:09.000Z
2021-06-04T03:27:09.000Z
1-learn-python/app.py
forzhr/hydrus
1dfd88eb99bf738eb4446920631ae8a0fd869210
[ "MIT" ]
null
null
null
1-learn-python/app.py
forzhr/hydrus
1dfd88eb99bf738eb4446920631ae8a0fd869210
[ "MIT" ]
12
2019-11-05T03:37:06.000Z
2021-04-27T12:04:59.000Z
from flask import Flask from flask import request app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) def home(): return '<h1>Home</h1>' @app.route('/signin', methods=['GET']) def signin_form(): return '''<form action="/signin" method="post"> <p><input name="username"></p> ...
28.807692
82
0.58478
1e300130b17f65c250ecf4ffec444038f4e9ece7
4,814
py
Python
venv/lib/python3.6/site-packages/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2020 T-Systems Multimedia Solutions GmbH # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License...
28.654762
136
0.664936
84477b672fbe81d7c1293cb41259193d1e7c6170
9,099
py
Python
kaznet/apps/ona/tasks.py
onaio/kaznet-web
53da428d5e62e40c5d38d84c3f3ee06071dd779b
[ "Apache-2.0" ]
1
2019-10-03T12:18:15.000Z
2019-10-03T12:18:15.000Z
kaznet/apps/ona/tasks.py
onaio/kaznet-web
53da428d5e62e40c5d38d84c3f3ee06071dd779b
[ "Apache-2.0" ]
63
2018-10-31T12:57:36.000Z
2020-04-27T20:18:22.000Z
kaznet/apps/ona/tasks.py
onaio/kaznet-web
53da428d5e62e40c5d38d84c3f3ee06071dd779b
[ "Apache-2.0" ]
3
2019-08-05T09:10:03.000Z
2020-01-05T21:24:49.000Z
""" Celery tasks module for Ona app """ from datetime import timedelta from time import sleep from urllib.parse import urljoin from celery import task as celery_task from celery.utils.log import get_task_logger from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.urls im...
34.078652
79
0.711287