hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
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
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
9fbaff4567ad04259619efef5627469bdb5aa0ef
9,164
py
Python
src/sage/categories/finite_semigroups.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
5
2015-01-04T07:15:06.000Z
2022-03-04T15:15:18.000Z
src/sage/categories/finite_semigroups.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
null
null
null
src/sage/categories/finite_semigroups.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
10
2016-09-28T13:12:40.000Z
2022-02-12T09:28:34.000Z
r""" Finite semigroups """ #***************************************************************************** # Copyright (C) 2008 Teresa Gomez-Diaz (CNRS) <Teresa.Gomez-Diaz@univ-mlv.fr> # 2008-2009 Florent Hivert <florent.hivert at univ-rouen.fr> # 2008-2009 Nicolas M. Thiery <nthiery ...
37.557377
134
0.501091
57ebf72c91072e62f5c40aed2e6cea39904fc661
17,380
py
Python
0000_huri/dataobjtemplate/registertubes.py
wangyan-hlab/wrs
8f81cdd33a419d5b4ffe18d13cd4cbf9f258bc7c
[ "MIT" ]
null
null
null
0000_huri/dataobjtemplate/registertubes.py
wangyan-hlab/wrs
8f81cdd33a419d5b4ffe18d13cd4cbf9f258bc7c
[ "MIT" ]
null
null
null
0000_huri/dataobjtemplate/registertubes.py
wangyan-hlab/wrs
8f81cdd33a419d5b4ffe18d13cd4cbf9f258bc7c
[ "MIT" ]
null
null
null
import pickle import copy import utiltools.thirdparty.o3dhelper as o3dh import utiltools.robotmath as rm import utiltools.thirdparty.p3dhelper as p3dh class LocatorFixed(object): def __init__(self, directory=None): self.__directory = directory if directory is None: self.bgdepth = pick...
44.678663
127
0.556617
3fbbcd705d5a2173528b21a2aacb1b0fa78fd4e9
1,266
py
Python
extract_Faces_From_Video.py
jitendrasb24/Face-Detection-OpenCV
518aa4d5e2f31733ebe534d26d459b8987dcb3ec
[ "MIT" ]
1
2021-07-30T21:58:24.000Z
2021-07-30T21:58:24.000Z
extract_Faces_From_Video.py
jitendrasb24/Face-Recognitation-OpenCV
518aa4d5e2f31733ebe534d26d459b8987dcb3ec
[ "MIT" ]
null
null
null
extract_Faces_From_Video.py
jitendrasb24/Face-Recognitation-OpenCV
518aa4d5e2f31733ebe534d26d459b8987dcb3ec
[ "MIT" ]
1
2021-09-02T15:27:18.000Z
2021-09-02T15:27:18.000Z
# importing libraries import cv2 import random import os # Load the cascade face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') # To capture video from webcam. cap = cv2.VideoCapture(0) count = 1 while True: # Read the frame _, img = cap.read() # Convert to ...
23.886792
76
0.599526
634085ab0ea6d84af0ae5f741fd3e41ff6ba9b04
705
py
Python
meetenjoy/browser.py
vladlytvynenko/mj
0186440b52d7d9655a4d75d76faf67638de880a8
[ "MIT" ]
null
null
null
meetenjoy/browser.py
vladlytvynenko/mj
0186440b52d7d9655a4d75d76faf67638de880a8
[ "MIT" ]
null
null
null
meetenjoy/browser.py
vladlytvynenko/mj
0186440b52d7d9655a4d75d76faf67638de880a8
[ "MIT" ]
null
null
null
import os import subprocess import sys class Browser: def __init__(self, platform: str = None): platform = platform or sys.platform if platform == 'win32': method = self.windows elif platform == 'darwin': method = self.macos else: method = self....
22.03125
53
0.557447
b84f969be6b42e7dfa69806cec490a1fd6872501
2,112
py
Python
scripts/model_tweaking.py
MichaelVerdegaal/hotel-reviews-sentiment-analysis
a5a66efd09f16830f7d20cb48f6e062890d0a0f0
[ "MIT" ]
null
null
null
scripts/model_tweaking.py
MichaelVerdegaal/hotel-reviews-sentiment-analysis
a5a66efd09f16830f7d20cb48f6e062890d0a0f0
[ "MIT" ]
null
null
null
scripts/model_tweaking.py
MichaelVerdegaal/hotel-reviews-sentiment-analysis
a5a66efd09f16830f7d20cb48f6e062890d0a0f0
[ "MIT" ]
null
null
null
import os from config import ROOT_DIR from data.database import * from data.mlearning import * from sklearn.model_selection import GridSearchCV if __name__ == '__main__': """ This script can help you tweak your models by finding the right hyperparameters to use. This is done by the use of grid search, whi...
37.052632
115
0.687027
b1556573de2a692111b70ebc9efd40282c1f4e9a
393
py
Python
trips/repository/mongo_repo.py
daltemen/go-clean-arch-example
8230e9f4c63869e3d4c262f9482ae1669a4154f4
[ "MIT" ]
null
null
null
trips/repository/mongo_repo.py
daltemen/go-clean-arch-example
8230e9f4c63869e3d4c262f9482ae1669a4154f4
[ "MIT" ]
null
null
null
trips/repository/mongo_repo.py
daltemen/go-clean-arch-example
8230e9f4c63869e3d4c262f9482ae1669a4154f4
[ "MIT" ]
null
null
null
from trips.repository.base import DataSource class MongoDataSource(DataSource): def count(self) -> int: raise NotImplementedError def count_by_field(self, field: str, value: str) -> int: raise NotImplementedError def create(self, obj: dict) -> bool: raise NotImplementedError ...
23.117647
60
0.681934
4be0bbc35ba51954bb4b7f8f503bee7ef9127c63
617
py
Python
fit/testdata/gen-gauss.py
maloft/hep
21803fd4b855088fdffbe58f52e1d993299e124a
[ "BSD-3-Clause" ]
196
2017-02-07T11:15:00.000Z
2022-03-31T13:34:08.000Z
fit/testdata/gen-gauss.py
maloft/hep
21803fd4b855088fdffbe58f52e1d993299e124a
[ "BSD-3-Clause" ]
726
2017-03-10T13:36:02.000Z
2022-03-30T09:14:06.000Z
fit/testdata/gen-gauss.py
maloft/hep
21803fd4b855088fdffbe58f52e1d993299e124a
[ "BSD-3-Clause" ]
42
2017-03-02T07:03:10.000Z
2022-03-28T17:50:36.000Z
#!/usr/bin/env python2 import numpy as np gaussian = lambda x: 3*np.exp(-(30-x)**2/20.) n = 100 xdata = np.arange(n) ydata = gaussian(xdata) import matplotlib.pyplot as plt plt.plot(xdata, ydata, '.') with open("gauss-data.txt","w") as f: for i in range(n): f.write("%+e %+e\n" % (xdata[i], ydata[i])) ...
18.69697
61
0.589951
5e7168d97871673a2c7a616931930cb3a6af7bbc
806
py
Python
api/lineitem/migrations/0001_initial.py
nschhina/Shopify-Dev-Challenge-2019-Winter
d471297788031709883b1ff097503c2cd04595b0
[ "MIT" ]
1
2019-06-10T17:21:14.000Z
2019-06-10T17:21:14.000Z
api/lineitem/migrations/0001_initial.py
nschhina/Shopify-Dev-Challenge-2019-Winter
d471297788031709883b1ff097503c2cd04595b0
[ "MIT" ]
4
2020-02-11T23:13:30.000Z
2021-06-10T20:49:42.000Z
api/lineitem/migrations/0001_initial.py
nschhina/Shopify-Dev-Challenge-2019-Winter
d471297788031709883b1ff097503c2cd04595b0
[ "MIT" ]
1
2020-09-07T01:57:09.000Z
2020-09-07T01:57:09.000Z
# Generated by Django 2.1.1 on 2018-09-16 17:28 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('order', '0002_auto_20180916_1728'), ('product', '0002_auto_20180916_0058'), ] operation...
31
129
0.62531
d2f42127b9603563b62b6e50c6d35a5b6277a7f8
16,989
py
Python
thewalrus/quantum/means_and_variances.py
BastianZim/thewalrus
28cba83b457fc068861c542f0e86d8c9d198b60b
[ "Apache-2.0" ]
60
2019-08-13T18:28:00.000Z
2022-03-07T17:37:10.000Z
thewalrus/quantum/means_and_variances.py
BastianZim/thewalrus
28cba83b457fc068861c542f0e86d8c9d198b60b
[ "Apache-2.0" ]
280
2019-08-19T00:28:31.000Z
2022-03-28T19:25:12.000Z
thewalrus/quantum/means_and_variances.py
BastianZim/thewalrus
28cba83b457fc068861c542f0e86d8c9d198b60b
[ "Apache-2.0" ]
36
2019-09-18T18:23:28.000Z
2022-02-20T07:01:29.000Z
# Copyright 2019-2020 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
37.093886
123
0.630114
784d8354900c58df199333daed69d603ffa183b2
3,873
py
Python
adventofcode/day11.py
JimMadge/Advent-of-Code-2020
614c7277c25102715541b4505604f50c518d0607
[ "MIT" ]
null
null
null
adventofcode/day11.py
JimMadge/Advent-of-Code-2020
614c7277c25102715541b4505604f50c518d0607
[ "MIT" ]
null
null
null
adventofcode/day11.py
JimMadge/Advent-of-Code-2020
614c7277c25102715541b4505604f50c518d0607
[ "MIT" ]
null
null
null
from itertools import chain class Seat(object): def __init__(self, occupied=False): self.occupied = occupied self.neighbours = [] self.pending_flip = False def flip(self): self.occupied = not self.occupied self.pending_flip = False def occupied_neighbours(self): ...
23.191617
72
0.491092
28dc7e38827926d591b9002dd0ee1978108eda87
463
py
Python
venv/Scripts/easy_install-3.8-script.py
Rajeshkumar-dev-cloud/Web-Scraper
cd059e76e3a801f4d6d4b4c107cca0159d3a0dd1
[ "MIT" ]
null
null
null
venv/Scripts/easy_install-3.8-script.py
Rajeshkumar-dev-cloud/Web-Scraper
cd059e76e3a801f4d6d4b4c107cca0159d3a0dd1
[ "MIT" ]
3
2020-06-19T11:23:19.000Z
2021-04-30T21:15:30.000Z
venv/Scripts/easy_install-3.8-script.py
RajeshKumar-1998/Web-Scraper
cd059e76e3a801f4d6d4b4c107cca0159d3a0dd1
[ "MIT" ]
null
null
null
#!C:\Users\Rajesh\PycharmProjects\django_code\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install-3.8' __requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script...
35.615385
87
0.697624
d9eb4f441dc86de92c589b5ed54ab315f4cba9a0
9,860
py
Python
asv/commands/publish.py
isuruf/asv
ada45fa94e636fa16a303d80424a4c414175c8c1
[ "BSD-3-Clause" ]
null
null
null
asv/commands/publish.py
isuruf/asv
ada45fa94e636fa16a303d80424a4c414175c8c1
[ "BSD-3-Clause" ]
null
null
null
asv/commands/publish.py
isuruf/asv
ada45fa94e636fa16a303d80424a4c414175c8c1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import os import shutil import multiprocessing import six from . import Command from ..benchmarks import Benchmarks fro...
37.490494
94
0.557505
803301864b25b45a7e04b02341c98453b540b255
1,796
py
Python
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/filerep/mpp18816/test_mpp18816.py
lintzc/GPDB
b48c8b97da18f495c10065d0853db87960aebae2
[ "PostgreSQL", "Apache-2.0" ]
1
2017-09-15T06:09:56.000Z
2017-09-15T06:09:56.000Z
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/filerep/mpp18816/test_mpp18816.py
guofengrichard/gpdb
29bdd6ef38d8d9b9cb04ca31d44e279eb9f640d3
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/filerep/mpp18816/test_mpp18816.py
guofengrichard/gpdb
29bdd6ef38d8d9b9cb04ca31d44e279eb9f640d3
[ "PostgreSQL", "Apache-2.0" ]
1
2018-12-04T09:13:57.000Z
2018-12-04T09:13:57.000Z
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
32.654545
100
0.737194
9bb74043196fb29bef4c0b762fd0b3caa36de20e
24,704
py
Python
tests/test_pygrams.py
mitroulias77/pyGrams
dbbbc142f457e0e995b4f740272b276d38a39cb0
[ "MIT" ]
null
null
null
tests/test_pygrams.py
mitroulias77/pyGrams
dbbbc142f457e0e995b4f740272b276d38a39cb0
[ "MIT" ]
null
null
null
tests/test_pygrams.py
mitroulias77/pyGrams
dbbbc142f457e0e995b4f740272b276d38a39cb0
[ "MIT" ]
null
null
null
import os import unittest from unittest import mock from unittest.mock import Mock, MagicMock import numpy as np import pandas as pd import pygrams from scripts import FilePaths from scripts.text_processing import WordAnalyzer from scripts.utils.pygrams_exception import PygramsException class TestPyGrams(unittest.T...
45.918216
131
0.646373
e4c212656df7b71ac41a857d07e48bf0aa16ca51
6,770
py
Python
bindings/python/ensmallen_graph/datasets/string/bradyrhizobiumgenosp.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/bradyrhizobiumgenosp.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/bradyrhizobiumgenosp.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Bradyrhizobium genosp.. 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...
35.445026
223
0.706499
bd51da0b336a1c5d2e7436007f1d247fb0777903
2,202
py
Python
diplexer.py
afiskon/filtergen
710240199fc077cd6b990365e22d5c3f2266694f
[ "MIT" ]
12
2020-06-26T20:46:33.000Z
2021-12-21T20:54:47.000Z
diplexer.py
afiskon/filtergen
710240199fc077cd6b990365e22d5c3f2266694f
[ "MIT" ]
null
null
null
diplexer.py
afiskon/filtergen
710240199fc077cd6b990365e22d5c3f2266694f
[ "MIT" ]
1
2021-09-07T08:17:36.000Z
2021-09-07T08:17:36.000Z
#!/usr/bin/env python3 # vim: set ai et ts=4 sw=4: # Diplexer Generator v 0.1 # (c) Aleksander Alekseev 2020 # https://eax.me/ # The algorithm is based on Chapter 11 of The ARRL Handbook 2020 from math import pi import sys import argparse def scale(x): unit = "" if x < 1: x *= 1000 unit = "...
23.934783
77
0.449591
0f3488db77be30b212fd339ea747cee48589a4b2
6,806
py
Python
api/serializers.py
amcquistan/project-time-tracker-api-django
da8a4129964fa4e330939178f12f24097527e77d
[ "MIT" ]
null
null
null
api/serializers.py
amcquistan/project-time-tracker-api-django
da8a4129964fa4e330939178f12f24097527e77d
[ "MIT" ]
null
null
null
api/serializers.py
amcquistan/project-time-tracker-api-django
da8a4129964fa4e330939178f12f24097527e77d
[ "MIT" ]
1
2021-01-01T14:58:11.000Z
2021-01-01T14:58:11.000Z
from django.contrib.auth import get_user_model from django.contrib.auth.models import BaseUserManager from django.core.exceptions import ObjectDoesNotExist from django.core.mail import EmailMultiAlternatives from django.shortcuts import get_object_or_404 from rest_framework import serializers from core.models import ...
38.451977
125
0.690861
31b158f1e364e5710983e3c8fb5e67735e34b612
140
py
Python
.history/ClassFiles/ImagesInPython/Images_20210109170956.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/ImagesInPython/Images_20210109170956.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/ImagesInPython/Images_20210109170956.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
""" Working with Images in Python What is Pul? PIL stands for Python Imaging Library PIL """
17.5
50
0.492857
954af4868b37d6496b8c21d31064a1c0bbf4b1e0
1,911
py
Python
pykgr/cli.py
DylanEHolland/pykgr
e66442790a29b0fa0d1e4586abf442cd927c8015
[ "BSD-3-Clause" ]
null
null
null
pykgr/cli.py
DylanEHolland/pykgr
e66442790a29b0fa0d1e4586abf442cd927c8015
[ "BSD-3-Clause" ]
null
null
null
pykgr/cli.py
DylanEHolland/pykgr
e66442790a29b0fa0d1e4586abf442cd927c8015
[ "BSD-3-Clause" ]
null
null
null
from pykgr.subroutines import load_config, setup_paths from argparse import ArgumentParser from pykgr.environment import Environment, initialize from pykgr import config import os def arguments(): ap = ArgumentParser() ap.add_argument("--build-library", action="store_true") ap.add_argument("--build-t...
29.4
98
0.643119
1012055549556a474fe7c261722cc8eb74f4c864
42,414
py
Python
var/spack/repos/builtin/packages/trilinos/package.py
edwardsp/spack
f42c5f62373e4c4ea1f21ebab1c9f54e92d9a535
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/trilinos/package.py
edwardsp/spack
f42c5f62373e4c4ea1f21ebab1c9f54e92d9a535
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
6
2021-05-28T06:37:41.000Z
2021-11-23T16:12:16.000Z
var/spack/repos/builtin/packages/trilinos/package.py
rubendibattista/spack
91de23ce650ef4dd007b94f67c26e1e6901be354
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import sys from spack import * from spack.operating_systems.mac_os import macos_version from spack.pkg.builtin.k...
45.411135
105
0.602702
054060091470920841c314f959d45539bb3e75ba
8,850
py
Python
gp_bot/bot.py
NavirePlus/gp_bot
03c88e21fe0a295196ed18381a690093dcebdf33
[ "MIT" ]
null
null
null
gp_bot/bot.py
NavirePlus/gp_bot
03c88e21fe0a295196ed18381a690093dcebdf33
[ "MIT" ]
null
null
null
gp_bot/bot.py
NavirePlus/gp_bot
03c88e21fe0a295196ed18381a690093dcebdf33
[ "MIT" ]
null
null
null
"""ゴミピープルBotとしての処理定義.""" import logging import os import random import traceback from datetime import datetime, timedelta, timezone from logging import Logger from typing import Dict, List, Optional, cast import numpy as np import yaml from twitter import Api as TwitterAPI from twitter.models import Status try: ...
29.016393
113
0.58904
7f9563f713987c34083571709183f91182e62891
8,616
py
Python
envirocar/trajectories/track_similarity.py
annaformaniuk/envirocar-py
ef81b5e6f88a24c343fe957c00aa2b45722483a1
[ "MIT" ]
2
2020-07-10T11:25:16.000Z
2020-07-16T17:47:54.000Z
envirocar/trajectories/track_similarity.py
annaformaniuk/envirocar-py
ef81b5e6f88a24c343fe957c00aa2b45722483a1
[ "MIT" ]
null
null
null
envirocar/trajectories/track_similarity.py
annaformaniuk/envirocar-py
ef81b5e6f88a24c343fe957c00aa2b45722483a1
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import similaritymeasures from math import factorial import matplotlib.pyplot as plt from itertools import combinations from timeit import default_timer as timer def track_similarity(trajA, trajB, method): """ Compute similarity measures using the similaritymeasures package ...
36.978541
114
0.562906
b22307da8d22475445559c2ac57716d58a9aa219
1,047
py
Python
molsysmt/physchem/groups/aminoacid_composition.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
3
2020-06-02T03:55:52.000Z
2022-03-21T04:43:52.000Z
molsysmt/physchem/groups/aminoacid_composition.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
28
2020-06-24T00:55:53.000Z
2021-07-16T22:09:19.000Z
molsysmt/physchem/groups/aminoacid_composition.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
1
2021-06-17T18:55:25.000Z
2021-06-17T18:55:25.000Z
#Overall amino acid composition (%). #McCaldon P., Argos P. #Proteins: Structure, Function and Genetics 4:99-122(1988). mccaldon = { 'ALA': 8.300, 'ARG': 5.700, 'ASN': 4.400, 'ASP': 5.300, 'CYS': 1.700, 'GLN': 4.000, 'GLU': 6.200, 'GLY': 7.200, 'HIS': 2.200, 'ILE': 5.2...
18.696429
69
0.462273
affb3505ddb0262ff4aeb2d293e262004ccf21cc
1,522
py
Python
app/models/permission.py
hashemidesign/easy-flask
1e6f0e3162756fd451f59d4acb4cf8a3443ef477
[ "MIT" ]
null
null
null
app/models/permission.py
hashemidesign/easy-flask
1e6f0e3162756fd451f59d4acb4cf8a3443ef477
[ "MIT" ]
null
null
null
app/models/permission.py
hashemidesign/easy-flask
1e6f0e3162756fd451f59d4acb4cf8a3443ef477
[ "MIT" ]
null
null
null
from datetime import datetime from app import db from app.helpers.strings import slugify class Permission(db.Model): __tablename__ = 'permissions' id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String(255), nullable=False) slug = db.Column(db.String(255), nullable=False, unique=Tru...
27.178571
134
0.59724
47469e360c2f62b7c0c228f4e7f17b878e8e91de
4,575
py
Python
app/dog_names.py
felix-pohl/nano-datasci-dog-breed
08b088ac9b257cff192b3b7194202bf51a31e85f
[ "MIT" ]
null
null
null
app/dog_names.py
felix-pohl/nano-datasci-dog-breed
08b088ac9b257cff192b3b7194202bf51a31e85f
[ "MIT" ]
null
null
null
app/dog_names.py
felix-pohl/nano-datasci-dog-breed
08b088ac9b257cff192b3b7194202bf51a31e85f
[ "MIT" ]
null
null
null
dog_names = ['ages/train/001.Affenpinscher', 'ages/train/002.Afghan_hound', 'ages/train/003.Airedale_terrier', 'ages/train/004.Akita', 'ages/train/005.Alaskan_malamute', 'ages/train/006.American_eskimo_dog', 'ages/train/007.American_foxhound', 'ages/train/008.American_staffordshire_terrier', 'ages/train/009.American_wa...
1,525
2,294
0.792131
863f281d1f25d0212f3b18590b91ce5eb76870e3
5,043
py
Python
tests/cli/test_yatai_service.py
henrywu2019/BentoML
d3665f052374a1a419b2a3912b1986334fdae2ac
[ "Apache-2.0" ]
3,451
2019-04-02T01:47:42.000Z
2022-03-31T16:20:49.000Z
tests/cli/test_yatai_service.py
henrywu2019/BentoML
d3665f052374a1a419b2a3912b1986334fdae2ac
[ "Apache-2.0" ]
1,925
2019-04-03T00:19:05.000Z
2022-03-31T22:41:54.000Z
tests/cli/test_yatai_service.py
henrywu2019/BentoML
d3665f052374a1a419b2a3912b1986334fdae2ac
[ "Apache-2.0" ]
451
2019-04-02T01:53:41.000Z
2022-03-29T08:49:06.000Z
import mock import os from click.testing import CliRunner from bentoml.cli.bento_service import create_bento_service_cli from bentoml.cli.yatai_service import add_yatai_service_sub_command from bentoml.configuration import expand_env_var FILE_SYSTEM_REPOSITORY = expand_env_var(os.path.join("~", "bentoml", "repositor...
34.306122
84
0.637517
3ede05ba593d3c0ef7a9a6fe3b02829ae5a66f84
125
py
Python
news_spider/middlewares/__init__.py
zuoakang/news_spider
ba8144b94eaea46067545ea3c784199b2eb49d5f
[ "MIT" ]
null
null
null
news_spider/middlewares/__init__.py
zuoakang/news_spider
ba8144b94eaea46067545ea3c784199b2eb49d5f
[ "MIT" ]
null
null
null
news_spider/middlewares/__init__.py
zuoakang/news_spider
ba8144b94eaea46067545ea3c784199b2eb49d5f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2021/6/29 9:41 上午 # @Author : rickzuo # @File : __init__.py.py # @Software: PyCharm
20.833333
30
0.56
da26c1ea11f91ee4c845f3c656907544bdff400d
862
py
Python
src/amrpkg/scripts/pc_control.py
rafafigueroa/amrws
6ed9f6423fc0d45e267fa517107f80dab124b11b
[ "MIT" ]
null
null
null
src/amrpkg/scripts/pc_control.py
rafafigueroa/amrws
6ed9f6423fc0d45e267fa517107f80dab124b11b
[ "MIT" ]
null
null
null
src/amrpkg/scripts/pc_control.py
rafafigueroa/amrws
6ed9f6423fc0d45e267fa517107f80dab124b11b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import rospy from nav_msgs.msg import Odometry from geometry_msgs.msg import Twist from sensor_msgs.msg import LaserScan from sensor_msgs.msg import PointCloud2 import numpy as np def pc_callback(robot_pc): pc = robot_pc.data print pc if False: r = 1...
21.55
60
0.611369
b77ccb4af5fc62b55051886d14a0ea22dcaf53ca
5,340
py
Python
habitat/core/registry.py
oawiles/habitat-api
b6a08dac1b9e92e6ad0d66d75cf9cee0ee1ebaef
[ "MIT" ]
1
2020-03-04T12:28:31.000Z
2020-03-04T12:28:31.000Z
habitat/core/registry.py
oawiles/habitat-api
b6a08dac1b9e92e6ad0d66d75cf9cee0ee1ebaef
[ "MIT" ]
null
null
null
habitat/core/registry.py
oawiles/habitat-api
b6a08dac1b9e92e6ad0d66d75cf9cee0ee1ebaef
[ "MIT" ]
1
2019-06-10T14:44:40.000Z
2019-06-10T14:44:40.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. r"""Registry is central source of truth in Habitat. Taken from Pythia, it is inspired from Redux's concept of global sto...
28.253968
79
0.62191
3917b37c7045480a68689ca3d661ce3259b9697c
9,101
py
Python
tests/common/test_event.py
matkin-msft/jit_walinuxagent
ccd52807ab2c43548a4ef13d86ababeb7e3f8c1f
[ "Apache-2.0" ]
null
null
null
tests/common/test_event.py
matkin-msft/jit_walinuxagent
ccd52807ab2c43548a4ef13d86ababeb7e3f8c1f
[ "Apache-2.0" ]
null
null
null
tests/common/test_event.py
matkin-msft/jit_walinuxagent
ccd52807ab2c43548a4ef13d86ababeb7e3f8c1f
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Microsoft Corporation # # 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...
41.368182
99
0.681354
f4c66ace63ec649a4fc5c56087af43f1ab1dbdf4
720
py
Python
images/mediatry/src/mediatry/settings/test.py
elston/carcassmysql
f4a00361536387a6ed5f3fbb10c585971a593de7
[ "MIT" ]
null
null
null
images/mediatry/src/mediatry/settings/test.py
elston/carcassmysql
f4a00361536387a6ed5f3fbb10c585971a593de7
[ "MIT" ]
null
null
null
images/mediatry/src/mediatry/settings/test.py
elston/carcassmysql
f4a00361536387a6ed5f3fbb10c585971a593de7
[ "MIT" ]
null
null
null
import os from .base import * DEBUG = True ROOT_URLCONF = 'test.urls' # ... STATICFILES_DIRS = [ os.path.join(BASE_DIR,'static/'), ] # .... DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } LOGGING = { 'version': 1,...
16
57
0.506944
e4a0f78f7637d4f3a5cfd644d69f1cbe570d9d2f
2,463
py
Python
transformations/character_to_number/transformation.py
PabloAMC/NL-Augmenter
d0f86b4243c17748d5359b36687a515162f23183
[ "MIT" ]
null
null
null
transformations/character_to_number/transformation.py
PabloAMC/NL-Augmenter
d0f86b4243c17748d5359b36687a515162f23183
[ "MIT" ]
null
null
null
transformations/character_to_number/transformation.py
PabloAMC/NL-Augmenter
d0f86b4243c17748d5359b36687a515162f23183
[ "MIT" ]
null
null
null
from interfaces.SentenceOperation import SentenceOperation from tasks.TaskTypes import TaskType import random class CharacterToNumber(SentenceOperation): tasks = [TaskType.TEXT_CLASSIFICATION, TaskType.TEXT_TO_TEXT_GENERATION] languages = ["en", "es"] heavy = False def __init__(self, seed=0, max_outp...
43.982143
156
0.656922
3b86c70380a4d27b96615a96245da7a441b4aaae
7,329
py
Python
data_augmentor/TFRecorder.py
ZhiangChen/tornado_ML
d8bded61a6a234ca67e31776bc8576c6c18f5621
[ "MIT" ]
2
2018-12-09T20:08:51.000Z
2021-02-01T17:49:14.000Z
data_augmentor/TFRecorder.py
ZhiangChen/tornado_ML
d8bded61a6a234ca67e31776bc8576c6c18f5621
[ "MIT" ]
1
2019-11-15T06:15:03.000Z
2019-11-15T06:15:03.000Z
TFRecorder.py
DREAMS-lab/data_augmentor
f204ee3af805b17d9946d3d5c6e7ca62398f09e5
[ "MIT" ]
null
null
null
""" TFRecorder.py convert numpy ndarray to TFRecorder Zhiang Chen, Dec 2019 Harish Hanand Copyright (c) 2019 Distributed Robotic Exploration and Mapping Systems Laboratory, ASU """ import tensorflow as tf from io import BytesIO from PIL import Image import os import io import PIL import hashlib import numpy as np imp...
35.57767
101
0.622595
e72241ff30abc2f5e982a13216e3d808e0ef6e12
11,910
py
Python
ps1_argonaut/wad_sections/DPSX/Model3DData.py
OverSurge/PS1-BRender-Reverse
3253707d5382cb3df41d8704214b60582e0ea56b
[ "MIT" ]
51
2020-05-23T21:25:22.000Z
2021-04-25T07:52:48.000Z
ps1_argonaut/wad_sections/DPSX/Model3DData.py
OverSurge/PS1-BRender-Reverse
3253707d5382cb3df41d8704214b60582e0ea56b
[ "MIT" ]
1
2021-04-03T23:12:27.000Z
2021-04-03T23:12:27.000Z
ps1_argonaut/wad_sections/DPSX/Model3DData.py
OverSurge/PS1-BRender-Reverse
3253707d5382cb3df41d8704214b60582e0ea56b
[ "MIT" ]
null
null
null
from io import BufferedIOBase, SEEK_CUR, StringIO from typing import List, TextIO, Union, Iterable import numpy as np from ps1_argonaut.BaseDataClasses import BaseDataClass from ps1_argonaut.configuration import Configuration, G, wavefront_header from ps1_argonaut.errors_warnings import IncompatibleAnimationError, Ne...
55.138889
120
0.610411
9f5ad6b64600c224cda2b8ccf726583f9d94d13a
811
py
Python
chatterbot/logic/specific_response.py
deliri/ChatterBot
8d95c43371bf8b7b1a1c44f77827b239bf38dc4e
[ "BSD-3-Clause" ]
1
2019-05-30T13:45:02.000Z
2019-05-30T13:45:02.000Z
chatterbot/logic/specific_response.py
deliri/ChatterBot
8d95c43371bf8b7b1a1c44f77827b239bf38dc4e
[ "BSD-3-Clause" ]
null
null
null
chatterbot/logic/specific_response.py
deliri/ChatterBot
8d95c43371bf8b7b1a1c44f77827b239bf38dc4e
[ "BSD-3-Clause" ]
2
2017-05-30T02:18:30.000Z
2021-02-21T18:15:25.000Z
from __future__ import unicode_literals from .logic_adapter import LogicAdapter class SpecificResponseAdapter(LogicAdapter): """ Return a specific response to a specific input. """ def __init__(self, **kwargs): super(SpecificResponseAdapter, self).__init__(**kwargs) from chatterbot.co...
25.34375
63
0.67201
c6fb32a6159463ef54f70660c2f2b6f2209d4868
49
py
Python
electrumsv/tests/__init__.py
rt121212121/electrumsv
3412bbacd3fdacc30c5497586c675430c4f8f6cc
[ "MIT" ]
null
null
null
electrumsv/tests/__init__.py
rt121212121/electrumsv
3412bbacd3fdacc30c5497586c675430c4f8f6cc
[ "MIT" ]
6
2020-05-03T15:12:53.000Z
2021-06-02T00:45:35.000Z
electrumsv/tests/__init__.py
rt121212121/electrumsv
3412bbacd3fdacc30c5497586c675430c4f8f6cc
[ "MIT" ]
2
2019-04-11T14:21:33.000Z
2021-04-11T07:29:43.000Z
import logging logging.disable(logging.CRITICAL)
16.333333
33
0.857143
ffc018966c6b1a0e95354f6b3c3ebfe916878415
2,044
py
Python
demo/__init__.py
abfleishman/CameraTraps
eb509ac6a5305217266647b518d5383dc48f0b72
[ "MIT" ]
1
2019-12-29T11:16:59.000Z
2019-12-29T11:16:59.000Z
demo/__init__.py
bencevans/CameraTraps
7e86a3e48602510e412bcaccdc9259388e9863b5
[ "MIT" ]
null
null
null
demo/__init__.py
bencevans/CameraTraps
7e86a3e48602510e412bcaccdc9259388e9863b5
[ "MIT" ]
null
null
null
from flask import Flask from flask_assets import Environment from flask_dropzone import Dropzone from flask_uploads import UploadSet, configure_uploads, IMAGES, patch_request_class from flask_restful import Resource, Api from . import aadConfig as aad import os app = Flask(__name__) app.debug = True api = Api(app) ...
30.969697
93
0.735323
f290a5515bba2e4dcbd185f391081634d23379b8
394
py
Python
dataengnews/config/wsgi.py
zkan/dataengnews
77c214a10c74bfdffa4cea829a5e3511429fd186
[ "MIT" ]
2
2020-10-06T04:02:13.000Z
2020-10-12T03:05:32.000Z
dataengnews/config/wsgi.py
gatukgl/dataengnews
d9cf582d745dbaf7c00d81ec7f27294970fdc052
[ "MIT" ]
12
2020-10-06T04:06:28.000Z
2021-09-22T19:36:23.000Z
dataengnews/config/wsgi.py
gatukgl/dataengnews
d9cf582d745dbaf7c00d81ec7f27294970fdc052
[ "MIT" ]
7
2020-10-06T03:20:25.000Z
2020-10-12T07:58:46.000Z
""" WSGI config for dataengnews 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('DJANGO_S...
23.176471
78
0.786802
2c424804b1aa1606bb3ab8e336b625ccc51ad149
4,124
py
Python
sentimental analysis.py
sangam-coder/Web-based-Twitter-Sentimental-Analysis-Application
778981f8b3802e6f3896169ebc9317c0b2e62422
[ "MIT" ]
1
2021-07-09T06:28:53.000Z
2021-07-09T06:28:53.000Z
sentimental analysis.py
sangam-coder/Web-based-Twitter-Sentimental-Analysis-Application
778981f8b3802e6f3896169ebc9317c0b2e62422
[ "MIT" ]
null
null
null
sentimental analysis.py
sangam-coder/Web-based-Twitter-Sentimental-Analysis-Application
778981f8b3802e6f3896169ebc9317c0b2e62422
[ "MIT" ]
null
null
null
import pandas as pd import streamlit as st import tweepy from PIL import Image from textblob import TextBlob import plotly.express as px #Calculating Percentage def percentage(part, whole): temp = 100 * float(part) / float(whole) return format(temp, '.2f') # clean tweets def cleantwt(te...
29.457143
127
0.686227
5244b8becfeedc69b5f70323d6a1fa340622346b
1,036
py
Python
noodle/io.py
wilfredinni/mary
47df09a235ce05196ca8f91528694da69210e617
[ "MIT" ]
4
2020-12-07T13:56:33.000Z
2022-01-13T06:04:56.000Z
noodle/io.py
wilfredinni/mary
47df09a235ce05196ca8f91528694da69210e617
[ "MIT" ]
null
null
null
noodle/io.py
wilfredinni/mary
47df09a235ce05196ca8f91528694da69210e617
[ "MIT" ]
1
2020-12-07T13:56:36.000Z
2020-12-07T13:56:36.000Z
import sys from ._hue import blue, red, green, yellow from ._messages import ErrorMsg class Output: def __init__(self, text): self.output_to_console(text) def output_to_console(self, text): print(text) @staticmethod def warning(text): print(yellow(text)) @staticmethod ...
19.54717
56
0.586873
362dddd4caf67ee5bb55bb7a38f1a2e081c43600
17,486
py
Python
test/functional/test_framework/test_node.py
sam6132/litecoin
8ffcd17184d0e36904c855c83bf2eefbc2033082
[ "MIT" ]
null
null
null
test/functional/test_framework/test_node.py
sam6132/litecoin
8ffcd17184d0e36904c855c83bf2eefbc2033082
[ "MIT" ]
null
null
null
test/functional/test_framework/test_node.py
sam6132/litecoin
8ffcd17184d0e36904c855c83bf2eefbc2033082
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Class for shieldcoind node under test""" import contextlib import decimal import errno from enum impor...
42.236715
158
0.631763
c53664544a45c03c511a05a566b080a5e2217d63
1,625
py
Python
0x04/ClientModel.py
D3ISM3/Python-Asynchronous-Server-Client
539deaeb7098f518fe30c6b65e7d5f076760cc20
[ "MIT" ]
null
null
null
0x04/ClientModel.py
D3ISM3/Python-Asynchronous-Server-Client
539deaeb7098f518fe30c6b65e7d5f076760cc20
[ "MIT" ]
null
null
null
0x04/ClientModel.py
D3ISM3/Python-Asynchronous-Server-Client
539deaeb7098f518fe30c6b65e7d5f076760cc20
[ "MIT" ]
null
null
null
import asyncio class Client: def __init__(self, reader: asyncio.StreamReader, writer: asyncio.StreamWriter): ''' Parameters ---------- reader : asyncio.StreamReader StreamReader used for receiving incoming messages from client writer : asyncio.StreamWriter ...
27.542373
85
0.588308
2b44e033fc845905cf74740df7aa4cf9124e0a22
308
py
Python
egrid/users/apps.py
h4k1m13or/egrid
a74326f81f1957d67bc67f47b51f9d3cb5caf849
[ "MIT" ]
1
2021-12-16T22:41:06.000Z
2021-12-16T22:41:06.000Z
egrid/users/apps.py
h4k1m13or/egrid
a74326f81f1957d67bc67f47b51f9d3cb5caf849
[ "MIT" ]
null
null
null
egrid/users/apps.py
h4k1m13or/egrid
a74326f81f1957d67bc67f47b51f9d3cb5caf849
[ "MIT" ]
null
null
null
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class UsersConfig(AppConfig): name = "egrid.users" verbose_name = _("Users") def ready(self): try: import egrid.users.signals # noqa F401 except ImportError: pass
22
54
0.649351
50d7a6c0dc40fce4c9210d5f46a513abc029ebbd
221
py
Python
nomadgram/notifications/admin.py
yoojat/nomadgram
8e4562b50c4b4b09c9771a6c2b601b9b2cf7bd71
[ "MIT" ]
null
null
null
nomadgram/notifications/admin.py
yoojat/nomadgram
8e4562b50c4b4b09c9771a6c2b601b9b2cf7bd71
[ "MIT" ]
null
null
null
nomadgram/notifications/admin.py
yoojat/nomadgram
8e4562b50c4b4b09c9771a6c2b601b9b2cf7bd71
[ "MIT" ]
null
null
null
from django.contrib import admin from . import models @admin.register(models.Notification) class NotificationAdmin(admin.ModelAdmin): list_display=( 'creator', 'to', 'notification_type' )
20.090909
42
0.678733
3af1637e98f0ff1b0c37c281e4da40c73d200366
1,244
py
Python
dataservice/api/biospecimen_diagnosis/schemas.py
ConnorBarnhill/kf-api-dataservice
547df467a307788882469a25c947a14965a26336
[ "Apache-2.0" ]
6
2018-01-25T13:49:24.000Z
2020-03-07T16:25:09.000Z
dataservice/api/biospecimen_diagnosis/schemas.py
ConnorBarnhill/kf-api-dataservice
547df467a307788882469a25c947a14965a26336
[ "Apache-2.0" ]
369
2018-01-17T15:22:18.000Z
2022-03-10T19:14:56.000Z
dataservice/api/biospecimen_diagnosis/schemas.py
ConnorBarnhill/kf-api-dataservice
547df467a307788882469a25c947a14965a26336
[ "Apache-2.0" ]
3
2018-04-11T14:18:37.000Z
2018-10-31T19:09:48.000Z
from marshmallow_sqlalchemy import field_for from dataservice.api.biospecimen.models import BiospecimenDiagnosis from dataservice.api.common.schemas import BaseSchema from dataservice.extensions import ma class BiospecimenDiagnosisSchema(BaseSchema): biospecimen_id = field_for(BiospecimenDiagnosis, 'biospecimen...
40.129032
72
0.631029
503d1428dc33c9feb1a9280c8455f2e7a8b50670
411
py
Python
uri/ex1039.py
ralphribeiro/uri-projecteuler
7151d86e014aea9c56026cc88f50b4e940117dd8
[ "MIT" ]
null
null
null
uri/ex1039.py
ralphribeiro/uri-projecteuler
7151d86e014aea9c56026cc88f50b4e940117dd8
[ "MIT" ]
null
null
null
uri/ex1039.py
ralphribeiro/uri-projecteuler
7151d86e014aea9c56026cc88f50b4e940117dd8
[ "MIT" ]
null
null
null
def calcula_raio(arg: str): instancias = arg.split('\n') instancias.remove('') retorno = str() for i in instancias: n = [int(x) for x in i.split(' ')] r1, x1, y1, r2, x2, y2 = n d_1_2 = ((x2 - x1)**2 + (y2 - y1)**2)**(1/2) if r1 > d_1_2 and r1 > r2: re...
21.631579
52
0.454988
af4e9b62b0841be503acf32aeafb834fb5c76189
5,422
py
Python
tests/nn/test_batch_norm.py
lkhphuc/treex
e7e280c609f9a2e6143a70045fde7dddaa60e56a
[ "MIT" ]
null
null
null
tests/nn/test_batch_norm.py
lkhphuc/treex
e7e280c609f9a2e6143a70045fde7dddaa60e56a
[ "MIT" ]
null
null
null
tests/nn/test_batch_norm.py
lkhphuc/treex
e7e280c609f9a2e6143a70045fde7dddaa60e56a
[ "MIT" ]
null
null
null
import unittest import hypothesis as hp import jax import numpy as np from flax import linen from hypothesis import strategies as st import treex as tx INITS = ( tx.initializers.zeros, tx.initializers.ones, tx.initializers.normal(), tx.initializers.uniform(), ) class BatchNormTest(unittest.TestCase...
28.239583
82
0.562523
eb3dcbec137070a2138b82ca6f3de50c2d78978d
396
py
Python
service/smartNutrition/views/__init__.py
Smart-Nutrition/smart-nutrition
753df05b49aac8dca3ed557ec239140ff8c7f862
[ "Apache-2.0" ]
1
2017-12-13T18:42:57.000Z
2017-12-13T18:42:57.000Z
service/smartNutrition/views/__init__.py
Smart-Nutrition/smart-nutrition
753df05b49aac8dca3ed557ec239140ff8c7f862
[ "Apache-2.0" ]
10
2017-12-16T16:26:22.000Z
2018-09-10T02:31:47.000Z
service/smartNutrition/views/__init__.py
Smart-Nutrition/smart-nutrition
753df05b49aac8dca3ed557ec239140ff8c7f862
[ "Apache-2.0" ]
null
null
null
"""Views, one for each page.""" from smartNutrition.views.index import show_index from smartNutrition.views.login import show_login from smartNutrition.views.signup import show_signup from smartNutrition.views.users import show_users from smartNutrition.views.user import show_user from smartNutrition.views.signout impo...
44
59
0.861111
fc94624e493587d1820e095668d8a64f5febf411
338
py
Python
Part3/popitem_test.py
BaiMoHan/LearningPython_ING_202002
90d1152b66e8efa284b75b4b76fbf29d7d61e900
[ "MIT" ]
null
null
null
Part3/popitem_test.py
BaiMoHan/LearningPython_ING_202002
90d1152b66e8efa284b75b4b76fbf29d7d61e900
[ "MIT" ]
null
null
null
Part3/popitem_test.py
BaiMoHan/LearningPython_ING_202002
90d1152b66e8efa284b75b4b76fbf29d7d61e900
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/2/12 16:22 # @Author : Baimohan/PH # @Site : https://github.com/BaiMoHan # @File : popitem_test.py # @Software: PyCharm cars = {'BMW': 8.5, 'BENS': 8.3, 'AUDI': 7.9} print(cars) print(cars.popitem()) print(cars) print(cars.popitem()) k, v = cars.pop...
24.142857
45
0.609467
fc50736fd85514108a95d4d39dd76edac47c6e10
24,425
py
Python
tempest/tests/test_test.py
martbhell/tempest
00b8a6c2040c6ceacd71793781fc8abc1917dcec
[ "Apache-2.0" ]
null
null
null
tempest/tests/test_test.py
martbhell/tempest
00b8a6c2040c6ceacd71793781fc8abc1917dcec
[ "Apache-2.0" ]
1
2019-08-08T10:36:44.000Z
2019-08-09T05:58:23.000Z
tempest/tests/test_test.py
martbhell/tempest
00b8a6c2040c6ceacd71793781fc8abc1917dcec
[ "Apache-2.0" ]
5
2016-06-24T20:03:52.000Z
2020-02-05T10:14:54.000Z
# Copyright 2017 IBM Corp # 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 appl...
38.955343
79
0.642375
00247252cd668e7aac09b3ed7206d39f716560d2
3,824
py
Python
anchore_engine/services/policy_engine/api/models/feed_group_metadata.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
anchore_engine/services/policy_engine/api/models/feed_group_metadata.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
anchore_engine/services/policy_engine/api/models/feed_group_metadata.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from anchore_engine.services.policy_engine.api.models.base_model_ import Model from anchore_engine.services.policy_engine.api import util class FeedGroupMetadata(Mode...
26.741259
100
0.628138
fac2e413246c43485860aaa374244dc0aa7c74c5
4,206
py
Python
mailchimp_marketing_asyncio/models/update_information_about_a_specific_workflow_email.py
john-parton/mailchimp-asyncio
3865ca0867bec8f537dc1e3256aa3a160c00f8a2
[ "Apache-2.0" ]
null
null
null
mailchimp_marketing_asyncio/models/update_information_about_a_specific_workflow_email.py
john-parton/mailchimp-asyncio
3865ca0867bec8f537dc1e3256aa3a160c00f8a2
[ "Apache-2.0" ]
null
null
null
mailchimp_marketing_asyncio/models/update_information_about_a_specific_workflow_email.py
john-parton/mailchimp-asyncio
3865ca0867bec8f537dc1e3256aa3a160c00f8a2
[ "Apache-2.0" ]
1
2022-03-09T14:52:22.000Z
2022-03-09T14:52:22.000Z
# coding: utf-8 """ Mailchimp Marketing API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 3.0.74 Contact: apihelp@mailchimp.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import...
29.619718
119
0.605326
c9e7ac8cec68942f94454196ea029e86c1140e88
751
py
Python
python/desc/gen3_workflow/bash_apps.py
surhudm/gen3_workflow
270e99eb7690bf5873df54f7296b496e0529c5eb
[ "BSD-3-Clause" ]
null
null
null
python/desc/gen3_workflow/bash_apps.py
surhudm/gen3_workflow
270e99eb7690bf5873df54f7296b496e0529c5eb
[ "BSD-3-Clause" ]
null
null
null
python/desc/gen3_workflow/bash_apps.py
surhudm/gen3_workflow
270e99eb7690bf5873df54f7296b496e0529c5eb
[ "BSD-3-Clause" ]
null
null
null
import parsl __all__ = ['small_bash_app', 'medium_bash_app', 'large_bash_app', 'local_bash_app'] ignore_for_cache = ['stdout', 'stderr'] #, 'wrap', 'parsl_resource_specification'] small_bash_app = parsl.bash_app(executors=['batch-small'], cache=True, ignore_for_cache=ignore...
37.55
72
0.645806
68235fe6b04383fc3346c3143d0b45e933d5c102
2,450
py
Python
World/Object/Unit/Spell/SpellManager.py
sergio-ivanuzzo/idewave-core
31b2b2ec4ac222e02af57d8b2d7a3277e4a444ae
[ "Apache-2.0" ]
10
2019-06-29T19:24:52.000Z
2021-02-21T22:45:57.000Z
World/Object/Unit/Spell/SpellManager.py
sergio-ivanuzzo/wowcore
31b2b2ec4ac222e02af57d8b2d7a3277e4a444ae
[ "Apache-2.0" ]
4
2019-08-15T07:03:36.000Z
2021-06-02T13:01:25.000Z
World/Object/Unit/Spell/SpellManager.py
sergio-ivanuzzo/idewave-core
31b2b2ec4ac222e02af57d8b2d7a3277e4a444ae
[ "Apache-2.0" ]
8
2019-06-30T22:47:48.000Z
2021-02-20T19:21:30.000Z
from sqlalchemy import or_ from typing import List from DB.Connection.WorldConnection import WorldConnection from World.Object.Unit.Spell.model import SpellTemplate, DefaultSpell from World.Object.Unit.Player.model import Player, PlayerSpell class SpellManager(object): def __init__(self, **kwargs): self...
31.012658
106
0.647755
6f544e172e8d64d79edffc24b30e6888a9569f8f
1,945
bzl
Python
java_src/tink_java_deps_init.bzl
chanced/tink
9cc3a01ac0165b033ed51dc9d0812a98b4b6e305
[ "Apache-2.0" ]
null
null
null
java_src/tink_java_deps_init.bzl
chanced/tink
9cc3a01ac0165b033ed51dc9d0812a98b4b6e305
[ "Apache-2.0" ]
null
null
null
java_src/tink_java_deps_init.bzl
chanced/tink
9cc3a01ac0165b033ed51dc9d0812a98b4b6e305
[ "Apache-2.0" ]
1
2022-01-02T20:54:04.000Z
2022-01-02T20:54:04.000Z
""" Initialization of dependencies of Java Tink. """ load("@com_google_protobuf//:protobuf_deps.bzl", javalite_protobuf_deps = "protobuf_deps") load("@rules_jvm_external//:defs.bzl", "maven_install") load("@build_bazel_rules_android//android:rules.bzl", "android_sdk_repository") def tink_java_deps_init(): """ Ini...
38.9
90
0.594859
42f19a4079a7671f3bccb16dcbeff0b4db09a9be
13,022
py
Python
plugin.program.sgs.notifications/common.py
TheWardoctor/wardoctors-repo
893f646d9e27251ffc00ca5f918e4eb859a5c8f0
[ "Apache-2.0" ]
1
2019-03-05T09:37:15.000Z
2019-03-05T09:37:15.000Z
plugin.program.sgs.notifications/common.py
TheWardoctor/SG
8041fa25639d1dcce8d6c3dc69c49ec8c17fc4e2
[ "Apache-2.0" ]
null
null
null
plugin.program.sgs.notifications/common.py
TheWardoctor/SG
8041fa25639d1dcce8d6c3dc69c49ec8c17fc4e2
[ "Apache-2.0" ]
1
2021-11-05T22:16:08.000Z
2021-11-05T22:16:08.000Z
import os,sys,xbmc,xbmcplugin,xbmcaddon,xbmcgui,urllib,urllib2,re,time,datetime,string,StringIO,logging,random,array,htmllib,xbmcvfs #import common addon_id='plugin.program.sgs.notifications' ##Change this to the same as the addon.xml try: from addon.common.addon import Addon except: try: from t0mm0.common.ad...
47.352727
177
0.662417
7b03425f88a8c36adf04f48c1a4cd01a434e0641
60,437
py
Python
trac/ticket/query.py
trac-ja/trac-ja
8defc74c222e3dbe154dfb5eb34e8c1a1f663558
[ "BSD-3-Clause" ]
1
2017-08-03T07:04:40.000Z
2017-08-03T07:04:40.000Z
trac/ticket/query.py
trac-ja/trac-ja
8defc74c222e3dbe154dfb5eb34e8c1a1f663558
[ "BSD-3-Clause" ]
null
null
null
trac/ticket/query.py
trac-ja/trac-ja
8defc74c222e3dbe154dfb5eb34e8c1a1f663558
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2004-2009 Edgewall Software # Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de> # Copyright (C) 2005-2007 Christian Boos <cboos@edgewall.org> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part o...
41.795989
80
0.495624
d124ec005f886772683bebdc4d1c123879f1c257
730
py
Python
month01/all_code/day03/demo07.py
chaofan-zheng/tedu-python-demo
abe983ddc52690f4726cf42cc6390cba815026d8
[ "Apache-2.0" ]
4
2021-01-07T14:25:15.000Z
2021-02-01T10:36:10.000Z
month01/all_code/day03/demo07.py
chaofan-zheng/tedu-python-demo
abe983ddc52690f4726cf42cc6390cba815026d8
[ "Apache-2.0" ]
null
null
null
month01/all_code/day03/demo07.py
chaofan-zheng/tedu-python-demo
abe983ddc52690f4726cf42cc6390cba815026d8
[ "Apache-2.0" ]
null
null
null
""" if else if 语句 if 条件1: 满足条件1执行的代码 elif 条件2: 不满足条件1,但满足条件2执行的代码 else: 以上条件都不满足执行的代码 if 条件1: 满足条件1执行的代码 if 条件2: 满足条件2执行的代码 else: 不满足条件2执行的代码 调试: 定义: 让程序中断,逐...
17.380952
42
0.412329
2a59baf7f529636857006c97bd707e8fbc13b8e2
1,281
py
Python
test/test_utils/test_basic_transforms/test_normalized_obs.py
jackyoung96/SuperSuit
fcd9eb670cf42091e275f7b2dcafca866e7ed210
[ "MIT" ]
237
2020-05-29T04:21:08.000Z
2021-10-08T05:37:43.000Z
test/test_utils/test_basic_transforms/test_normalized_obs.py
jackyoung96/SuperSuit
fcd9eb670cf42091e275f7b2dcafca866e7ed210
[ "MIT" ]
58
2020-07-19T18:44:16.000Z
2021-10-13T03:26:29.000Z
test/test_utils/test_basic_transforms/test_normalized_obs.py
jackyoung96/SuperSuit
fcd9eb670cf42091e275f7b2dcafca866e7ed210
[ "MIT" ]
20
2020-05-29T04:21:11.000Z
2021-09-30T20:07:20.000Z
from supersuit.utils.basic_transforms.normalize_obs import ( check_param, change_obs_space, change_observation, ) from gym.spaces import Box import numpy as np import pytest high_val = np.array([1, 2, 4]) test_val = np.array([1, 1, 1]) test_obs_space = Box(low=np.zeros(3, dtype=np.float32), high=high_val.a...
32.025
105
0.690086
c2fe6524ce60b1f12ffa5638081fe189478d35da
5,766
py
Python
tf_nn_classification.py
mathxyz/stock2
1e07156dea37f987efbc03025693b9ca2acf3f96
[ "MIT" ]
92
2018-03-01T20:23:45.000Z
2022-01-02T02:42:03.000Z
tf_nn_classification.py
mathxyz/stock2
1e07156dea37f987efbc03025693b9ca2acf3f96
[ "MIT" ]
1
2019-09-20T03:24:57.000Z
2019-09-20T18:43:06.000Z
tf_nn_classification.py
mathxyz/stock2
1e07156dea37f987efbc03025693b9ca2acf3f96
[ "MIT" ]
64
2018-03-01T21:07:02.000Z
2022-02-04T19:59:19.000Z
import pandas as pd import numpy as np import tensorflow as tf from sklearn.preprocessing import StandardScaler from sklearn.model_selection import train_test_split def gini_tf(actual, pred): """a tensorflow version of normalized gini coefficient, uses in top k to calculate """ assert (len(actual) == len(pred)) ...
27.990291
83
0.722511
cde49f929734f2be5df0542a87c5d85d97ec11bc
3,025
py
Python
tests/test_polymorphic.py
gongul/drf-spectacular
67bf4dad7da16b914f7ea2bf09be9c662959ea82
[ "BSD-3-Clause" ]
null
null
null
tests/test_polymorphic.py
gongul/drf-spectacular
67bf4dad7da16b914f7ea2bf09be9c662959ea82
[ "BSD-3-Clause" ]
null
null
null
tests/test_polymorphic.py
gongul/drf-spectacular
67bf4dad7da16b914f7ea2bf09be9c662959ea82
[ "BSD-3-Clause" ]
null
null
null
from unittest import mock import pytest from django.db import models from rest_framework import serializers, viewsets from rest_framework.response import Response from drf_spectacular.openapi import AutoSchema from drf_spectacular.utils import OpenApiParameter, PolymorphicProxySerializer, extend_schema from tests imp...
32.526882
93
0.697521
738eea6979a94c81e28fe2e8363d55da9dd61472
52,702
py
Python
mtkclient/Library/hwcrypto_dxcc.py
P-Salik/mtkclient
ca702a4ec84da4ec607f1e6484ff605e79a69f46
[ "MIT" ]
null
null
null
mtkclient/Library/hwcrypto_dxcc.py
P-Salik/mtkclient
ca702a4ec84da4ec607f1e6484ff605e79a69f46
[ "MIT" ]
null
null
null
mtkclient/Library/hwcrypto_dxcc.py
P-Salik/mtkclient
ca702a4ec84da4ec607f1e6484ff605e79a69f46
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- # (c) B.Kerler 2018-2021 GPLv3 License # DXCC = Discretix CryptoCell import logging, os import hashlib from struct import pack from Crypto.Util.number import bytes_to_long from Crypto.Cipher import AES from Crypto.Util import Counter from mtkclient.Library.utils import LogBa...
37.27157
111
0.591894
b87a4e6fb413c62a4d79e732f7ac0f31f6b46cf1
1,969
py
Python
2clean_data/duke/clean-duke.py
briancroxall/borderwaters
59dc190e9f7f6241d0df14f4cea2c001a8fdfdbb
[ "Apache-2.0" ]
null
null
null
2clean_data/duke/clean-duke.py
briancroxall/borderwaters
59dc190e9f7f6241d0df14f4cea2c001a8fdfdbb
[ "Apache-2.0" ]
2
2021-03-23T18:13:00.000Z
2021-04-16T18:36:48.000Z
2clean_data/duke/clean-duke.py
briancroxall/borderwaters
59dc190e9f7f6241d0df14f4cea2c001a8fdfdbb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 20 16:46:37 2019 @author: briancroxall Script to clean the extracted text from the Duke corpus. Problems: Ligatures: ff fi fl Hyphenated words across page breaks the 'theor y' problem first-character / drop cap problem smart quotes...
28.955882
81
0.640934
fbe09f9c0b5db57f969b55359400729ac0f2e8fe
47,486
py
Python
mrjob/runner.py
mineshpateltc/mrjob
596e232247a5f793e3c1d01ad183893a62339b1e
[ "Apache-2.0" ]
null
null
null
mrjob/runner.py
mineshpateltc/mrjob
596e232247a5f793e3c1d01ad183893a62339b1e
[ "Apache-2.0" ]
null
null
null
mrjob/runner.py
mineshpateltc/mrjob
596e232247a5f793e3c1d01ad183893a62339b1e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2009-2013 Yelp and Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
37.717236
79
0.583919
0a4fecd90186fe704b8d45ed9a96f89e520218f8
3,339
py
Python
datalad/support/tests/test_locking.py
christinerogers/datalad
8b91f3767b45371e213aa7ade146a290a13c00f2
[ "MIT" ]
null
null
null
datalad/support/tests/test_locking.py
christinerogers/datalad
8b91f3767b45371e213aa7ade146a290a13c00f2
[ "MIT" ]
21
2015-03-12T11:48:18.000Z
2020-08-31T09:28:05.000Z
datalad/support/tests/test_locking.py
christinerogers/datalad
8b91f3767b45371e213aa7ade146a290a13c00f2
[ "MIT" ]
null
null
null
#emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- #ex: set sts=4 ts=4 sw=4 noet: """ LICENSE: MIT 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 ...
37.1
92
0.691524
fdb71d110adc4b98632e07da2fb5ade8dcce316e
364
py
Python
installations/urls.py
ehsanbarkhordar/PMM
85037e6d633e9b795076d44fd0befe5cc410cbb0
[ "Apache-2.0" ]
null
null
null
installations/urls.py
ehsanbarkhordar/PMM
85037e6d633e9b795076d44fd0befe5cc410cbb0
[ "Apache-2.0" ]
null
null
null
installations/urls.py
ehsanbarkhordar/PMM
85037e6d633e9b795076d44fd0befe5cc410cbb0
[ "Apache-2.0" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('device/new/', views.new_device, name='new_device'), path('device/<int:pk>/', views.detail_device, name='detail_device'), path('device/<int:code>/edit/', views.edit_device, name='edit_device'), # path('device/<int:code>/delete/', vi...
33.090909
83
0.692308
99cbf8ae533591971236ae05a459c2c66ecf9c1d
33
py
Python
application/seennt/views.py
Seennt/github
e09ae30f2b35a8dd54406d99174d957150379a4f
[ "MIT" ]
null
null
null
application/seennt/views.py
Seennt/github
e09ae30f2b35a8dd54406d99174d957150379a4f
[ "MIT" ]
null
null
null
application/seennt/views.py
Seennt/github
e09ae30f2b35a8dd54406d99174d957150379a4f
[ "MIT" ]
null
null
null
from django.views import generic
16.5
32
0.848485
7b75bfd075c4217d68ecc2109faaa559331aaa8f
2,422
py
Python
stroylux/main/graphql/core/types/filter_input.py
vladkoblynsky/shop
aaf027f4111605772624a868a0243b221b97c857
[ "BSD-3-Clause" ]
null
null
null
stroylux/main/graphql/core/types/filter_input.py
vladkoblynsky/shop
aaf027f4111605772624a868a0243b221b97c857
[ "BSD-3-Clause" ]
7
2020-09-19T16:24:46.000Z
2022-01-13T03:19:46.000Z
stroylux/main/graphql/core/types/filter_input.py
vladkoblynsky/shop
aaf027f4111605772624a868a0243b221b97c857
[ "BSD-3-Clause" ]
null
null
null
from graphene import InputField, InputObjectType from graphene.types.inputobjecttype import InputObjectTypeOptions from graphene.types.utils import yank_fields_from_attrs from graphene_django.filter.utils import get_filterset_class from .converter import convert_form_field class FilterInputObjectType(InputObjectType...
39.064516
85
0.675475
db98123a7336ef674033a6a8563b92e366781488
566
py
Python
94. Binary Tree Inorder Traversal/sol.py
Ashish1323/leetcodepractice
918151765d0fe6097fcd0d0fb6b1d0f022028390
[ "Apache-2.0" ]
2
2021-09-14T13:03:21.000Z
2022-01-15T11:45:42.000Z
94. Binary Tree Inorder Traversal/sol.py
Ashish1323/leetcodesolutions
918151765d0fe6097fcd0d0fb6b1d0f022028390
[ "Apache-2.0" ]
null
null
null
94. Binary Tree Inorder Traversal/sol.py
Ashish1323/leetcodesolutions
918151765d0fe6097fcd0d0fb6b1d0f022028390
[ "Apache-2.0" ]
null
null
null
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution(object): def inorderTraversal(self, root): arr = [] self.loda(root, arr) retu...
24.608696
55
0.528269
eaa0bebbce269c857df40dae359f73f213db6ca1
13,849
py
Python
troveclient/compat/client.py
stryng/python-troveclient
57bb542d9f439113a59e6c9752623bed01f377f3
[ "Apache-2.0" ]
1
2021-04-08T10:12:57.000Z
2021-04-08T10:12:57.000Z
troveclient/compat/client.py
stryng/python-troveclient
57bb542d9f439113a59e6c9752623bed01f377f3
[ "Apache-2.0" ]
null
null
null
troveclient/compat/client.py
stryng/python-troveclient
57bb542d9f439113a59e6c9752623bed01f377f3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
36.159269
79
0.60647
b8edeb14bae8d857d64ec43582510a2c3f73ea22
2,123
py
Python
app/storage.py
linkwithabhay/PAinPY
20a4b80f83b5cc69e4fa400e88f5a00a86b3e8e1
[ "MIT" ]
null
null
null
app/storage.py
linkwithabhay/PAinPY
20a4b80f83b5cc69e4fa400e88f5a00a86b3e8e1
[ "MIT" ]
null
null
null
app/storage.py
linkwithabhay/PAinPY
20a4b80f83b5cc69e4fa400e88f5a00a86b3e8e1
[ "MIT" ]
null
null
null
import json def getItem(at: str, keys: list = []): try: with open("app/assets/{}.json".format(at), "r") as f: data = json.loads(f.read()) if not keys: return dict(data) else: value = "" for key in keys: if key in data.keys(): value = data[key] if type(v...
25.27381
70
0.528026
38883fc82c606ef88bd44d6add56cffaa19d975d
3,054
py
Python
tests/backends/test_kwallet.py
ddstreet/keyring
bf97cd003361ff03e5958cecb923a806033852fd
[ "MIT" ]
null
null
null
tests/backends/test_kwallet.py
ddstreet/keyring
bf97cd003361ff03e5958cecb923a806033852fd
[ "MIT" ]
null
null
null
tests/backends/test_kwallet.py
ddstreet/keyring
bf97cd003361ff03e5958cecb923a806033852fd
[ "MIT" ]
null
null
null
import pytest from keyring.backends import kwallet from keyring.testing.backend import BackendBasicTests @pytest.mark.skipif(not kwallet.DBusKeyring.viable, reason="KWallet5 unavailable") class DBusKWalletTestCase(BackendBasicTests): # Remove '@' from service name as this is not supported in service names #...
35.511628
85
0.625737
7f9ef51bdba230be27a0809c1bbf606fd57bff0e
10,270
py
Python
jupyter_releaser/tests/test_functions.py
hbcarlos/jupyter_releaser
f5386b446164e6ad3a3f9f1d08462e18e0d3f4b3
[ "BSD-3-Clause" ]
null
null
null
jupyter_releaser/tests/test_functions.py
hbcarlos/jupyter_releaser
f5386b446164e6ad3a3f9f1d08462e18e0d3f4b3
[ "BSD-3-Clause" ]
null
null
null
jupyter_releaser/tests/test_functions.py
hbcarlos/jupyter_releaser
f5386b446164e6ad3a3f9f1d08462e18e0d3f4b3
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import json import os import shutil from pathlib import Path import toml from jupyter_releaser import changelog, npm, util from jupyter_releaser.tests import util as testutil from jupyter_releaser.util import run de...
31.795666
95
0.677507
5974c41a71ba3499c4db58da901690434702bf25
8,243
py
Python
Collections-a-installer/community-general-2.4.0/plugins/callback/slack.py
d-amien-b/simple-getwordpress
da90d515a0aa837b633d50db4d91d22b031c04a2
[ "MIT" ]
null
null
null
Collections-a-installer/community-general-2.4.0/plugins/callback/slack.py
d-amien-b/simple-getwordpress
da90d515a0aa837b633d50db4d91d22b031c04a2
[ "MIT" ]
null
null
null
Collections-a-installer/community-general-2.4.0/plugins/callback/slack.py
d-amien-b/simple-getwordpress
da90d515a0aa837b633d50db4d91d22b031c04a2
[ "MIT" ]
null
null
null
# (C) 2014-2015, Matt Martz <matt@sivel.net> # (C) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' author: Un...
32.710317
116
0.553925
1071fc3540fde23888e2beac09d4137bb017ff33
4,635
py
Python
starlette/endpoints.py
freundTech/starlette
ea1990415ebef516e17f2cb724a1c4384c479597
[ "BSD-3-Clause" ]
5
2022-01-20T22:59:04.000Z
2022-02-06T06:11:35.000Z
starlette/endpoints.py
freundTech/starlette
ea1990415ebef516e17f2cb724a1c4384c479597
[ "BSD-3-Clause" ]
1
2021-10-13T05:41:03.000Z
2021-10-13T05:41:03.000Z
starlette/endpoints.py
freundTech/starlette
ea1990415ebef516e17f2cb724a1c4384c479597
[ "BSD-3-Clause" ]
1
2020-10-16T23:20:50.000Z
2020-10-16T23:20:50.000Z
import asyncio import json import typing from starlette import status from starlette.concurrency import run_in_threadpool from starlette.exceptions import HTTPException from starlette.requests import Request from starlette.responses import PlainTextResponse, Response from starlette.types import Message, Receive, Scope...
39.279661
88
0.639698
63e8bcc1ac7f0260d9a66871d65f91e0cbbe7b81
8,942
py
Python
IMLearn/learners/gaussian_estimators.py
elrsgv/IML.HUJI
283840157a018c002d4f8f2acaf8affdcf1736fa
[ "MIT" ]
null
null
null
IMLearn/learners/gaussian_estimators.py
elrsgv/IML.HUJI
283840157a018c002d4f8f2acaf8affdcf1736fa
[ "MIT" ]
null
null
null
IMLearn/learners/gaussian_estimators.py
elrsgv/IML.HUJI
283840157a018c002d4f8f2acaf8affdcf1736fa
[ "MIT" ]
null
null
null
from __future__ import annotations import numpy as np from numpy.linalg import inv, det, slogdet # Implemented in Ex1 class UnivariateGaussian: """ Class for univariate Gaussian Distribution Estimator """ def __init__(self, biased_var: bool = False) -> UnivariateGaussian: """ Estimator...
34.525097
113
0.577276
bffce1552449e58af68e12706ac350974eca4875
1,033
py
Python
DecisionTreeClassifier/Classifier/model_3_people.py
bkommineni/Activity-Recognition-Using-Sensordata
94effff8295e5314ac097a777b01013e540c75de
[ "BSD-4-Clause-UC" ]
null
null
null
DecisionTreeClassifier/Classifier/model_3_people.py
bkommineni/Activity-Recognition-Using-Sensordata
94effff8295e5314ac097a777b01013e540c75de
[ "BSD-4-Clause-UC" ]
null
null
null
DecisionTreeClassifier/Classifier/model_3_people.py
bkommineni/Activity-Recognition-Using-Sensordata
94effff8295e5314ac097a777b01013e540c75de
[ "BSD-4-Clause-UC" ]
null
null
null
from pathlib import Path from sklearn import tree import pandas as pd from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier from sklearn.metrics import accuracy_score from sklearn.metrics import confusion_matrix from scipy import stats import numpy as np my_file = Path("/...
25.825
136
0.814134
49f6e13ea8c17c808fcc5738fb3a2fddce10a19d
25,558
py
Python
ethereum/fastvm.py
DelphiMarkets/pyethereum
90741d79007dbf206eb1fa8fd3e031ab66fa9fc4
[ "MIT" ]
2
2017-09-08T03:48:46.000Z
2021-06-16T02:33:23.000Z
ethereum/fastvm.py
DelphiMarkets/pyethereum
90741d79007dbf206eb1fa8fd3e031ab66fa9fc4
[ "MIT" ]
null
null
null
ethereum/fastvm.py
DelphiMarkets/pyethereum
90741d79007dbf206eb1fa8fd3e031ab66fa9fc4
[ "MIT" ]
1
2020-09-05T09:20:42.000Z
2020-09-05T09:20:42.000Z
import copy import ethereum.opcodes as opcodes # ####### dev hack flags ############### verify_stack_after_op = False # ###################################### import sys from ethereum import utils import copy from ethereum import opcodes import time from ethereum.slogging import get_logger from rlp.utils import as...
41.289176
113
0.508138
4603e7e7bee099ff58daefd2d63bbd7176e4664a
3,370
py
Python
lib/matplotlib/container.py
jbbrokaw/matplotlib
86ec1b6fc5628bfb2d09797c58d7eed0ca8c2427
[ "MIT", "BSD-3-Clause" ]
113
2015-08-16T22:38:56.000Z
2022-01-27T16:46:09.000Z
lib/matplotlib/container.py
yingkailiang/matplotlib
255a79b106c98c1904489afe6a754e4d943179d6
[ "MIT", "BSD-3-Clause" ]
7
2016-10-21T04:15:22.000Z
2020-02-15T04:06:19.000Z
lib/matplotlib/container.py
yingkailiang/matplotlib
255a79b106c98c1904489afe6a754e4d943179d6
[ "MIT", "BSD-3-Clause" ]
41
2015-08-16T22:38:28.000Z
2022-01-26T21:21:30.000Z
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import matplotlib.cbook as cbook class Container(tuple): """ Base class for containers. """ def __repr__(self): return "<Container object of %d artists>" % (len(self)) ...
25.923077
78
0.595846
82f0c7f9fe15d1f93f9031ea5b2efd4d342eb683
7,087
py
Python
django/helpdesk/fsm/models.py
Netromnik/python
630a9df63b1cade9af38de07bb9cd0c3b8694c93
[ "Apache-2.0" ]
null
null
null
django/helpdesk/fsm/models.py
Netromnik/python
630a9df63b1cade9af38de07bb9cd0c3b8694c93
[ "Apache-2.0" ]
null
null
null
django/helpdesk/fsm/models.py
Netromnik/python
630a9df63b1cade9af38de07bb9cd0c3b8694c93
[ "Apache-2.0" ]
null
null
null
from django.db import models from django_fsm import FSMField, transition from django.contrib.auth.models import Group from mptt.models import MPTTModel, TreeForeignKey from notifications.signals import notify from .manager.task import CustomManegerTaskStatistic from django.contrib.auth import get_user_model from .mana...
36.34359
136
0.631297
ad795f1cf53c38053840fbc59a01e1f9abd4a479
6,977
py
Python
research/lstm_object_detection/train.py
hjkim-haga/TF-OD-API
22ac477ff4dfb93fe7a32c94b5f0b1e74330902b
[ "Apache-2.0" ]
null
null
null
research/lstm_object_detection/train.py
hjkim-haga/TF-OD-API
22ac477ff4dfb93fe7a32c94b5f0b1e74330902b
[ "Apache-2.0" ]
null
null
null
research/lstm_object_detection/train.py
hjkim-haga/TF-OD-API
22ac477ff4dfb93fe7a32c94b5f0b1e74330902b
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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...
37.510753
81
0.675219
c704d7a0ea7795ab834e9b0bfdd44dac2aa4c255
5,665
py
Python
stellar_sdk/xdr/ledger_entry_data.py
MartinThoma/py-stellar-base
07ab28cde7a7040f2262b224f9af8a3416c0e5ab
[ "Apache-2.0" ]
1
2021-07-06T01:34:08.000Z
2021-07-06T01:34:08.000Z
stellar_sdk/xdr/ledger_entry_data.py
MartinThoma/py-stellar-base
07ab28cde7a7040f2262b224f9af8a3416c0e5ab
[ "Apache-2.0" ]
36
2021-08-23T17:31:52.000Z
2022-03-28T01:39:00.000Z
stellar_sdk/xdr/ledger_entry_data.py
MartinThoma/py-stellar-base
07ab28cde7a7040f2262b224f9af8a3416c0e5ab
[ "Apache-2.0" ]
1
2021-07-06T01:33:40.000Z
2021-07-06T01:33:40.000Z
# This is an automatically generated file. # DO NOT EDIT or your changes may be overwritten import base64 from xdrlib import Packer, Unpacker from .account_entry import AccountEntry from .claimable_balance_entry import ClaimableBalanceEntry from .data_entry import DataEntry from .ledger_entry_type import LedgerEntryTy...
36.548387
83
0.60053
9a129b601df40ff4df214bf709dcf1c690cd8c54
13,619
py
Python
appion/bin/pyace2.py
leschzinerlab/myami-3.2-freeHand
974b8a48245222de0d9cfb0f433533487ecce60d
[ "MIT" ]
null
null
null
appion/bin/pyace2.py
leschzinerlab/myami-3.2-freeHand
974b8a48245222de0d9cfb0f433533487ecce60d
[ "MIT" ]
null
null
null
appion/bin/pyace2.py
leschzinerlab/myami-3.2-freeHand
974b8a48245222de0d9cfb0f433533487ecce60d
[ "MIT" ]
1
2019-09-05T20:58:37.000Z
2019-09-05T20:58:37.000Z
#!/usr/bin/env python #pythonlib import os import re import sys import math import time import glob import numpy import shutil import subprocess #appion from appionlib import apFile from appionlib import apParam from appionlib import apImage from appionlib import apDisplay from appionlib import apDatabase from appionl...
37.414835
113
0.677363
415fba6e691d48790ef251188d2c5ea67b16d3ea
2,513
py
Python
.github/scripts/build_assets/util.py
brunaluisasilveira/devicon
9f4f5cdb393299a81125eb5127929ea7bfe42889
[ "MIT" ]
2
2021-09-17T09:11:14.000Z
2021-09-23T12:37:13.000Z
.github/scripts/build_assets/util.py
onezer00/devicon
9f4f5cdb393299a81125eb5127929ea7bfe42889
[ "MIT" ]
null
null
null
.github/scripts/build_assets/util.py
onezer00/devicon
9f4f5cdb393299a81125eb5127929ea7bfe42889
[ "MIT" ]
1
2021-07-29T13:32:01.000Z
2021-07-29T13:32:01.000Z
import os import re from typing import List import platform import sys import traceback def exit_with_err(err: Exception): """ Exit the current step and display the err. :param: err, the error/exception encountered. """ traceback.print_exc() sys.exit(1) def set_env_var(key: str, value: str, ...
38.661538
138
0.633506
05560d0345a4808ea6cc3b3ecc6b25ee5d91eecd
513
py
Python
Mundo 2/aula 13/desafio9.py
mandamg/Exercicios-de-Python-do-Curso-em-Video
3f818c11c3c10213bebc1dfb6a740adee468ea3a
[ "MIT" ]
null
null
null
Mundo 2/aula 13/desafio9.py
mandamg/Exercicios-de-Python-do-Curso-em-Video
3f818c11c3c10213bebc1dfb6a740adee468ea3a
[ "MIT" ]
null
null
null
Mundo 2/aula 13/desafio9.py
mandamg/Exercicios-de-Python-do-Curso-em-Video
3f818c11c3c10213bebc1dfb6a740adee468ea3a
[ "MIT" ]
null
null
null
from datetime import date d = date.today().year #peguei a data de hj tma = 0 #o total começa em 0 tme = 0 for c in range(1,8): #refaz as operaçoes dentro do laço 7 vzs n = int(input('digite o ano de nascimento:')) #recebe a data de nasc (deve ser int ) i = d - n #calculo da idade if i >= 18: tma += ...
39.461538
88
0.653021
53a37166c324161792701532867b3dbe9620cb00
43,817
py
Python
tests/unit/utils/test_sw.py
ntwrkguru/py-junos-eznc
db3886c21d51f59ac550c1b87a9d44bdc98ee963
[ "Apache-2.0", "BSD-3-Clause" ]
2
2016-02-23T09:49:46.000Z
2019-06-18T15:59:01.000Z
tests/unit/utils/test_sw.py
ntwrkguru/py-junos-eznc
db3886c21d51f59ac550c1b87a9d44bdc98ee963
[ "Apache-2.0", "BSD-3-Clause" ]
12
2017-11-09T09:49:03.000Z
2018-01-08T09:50:54.000Z
tests/unit/utils/test_sw.py
ntwrkguru/py-junos-eznc
db3886c21d51f59ac550c1b87a9d44bdc98ee963
[ "Apache-2.0", "BSD-3-Clause" ]
4
2015-05-13T11:05:42.000Z
2017-11-09T09:32:07.000Z
from __future__ import print_function import os import sys from six import StringIO try: import unittest2 as unittest except ImportError: import unittest from nose.plugins.attrib import attr from contextlib import contextmanager from jnpr.junos import Device from jnpr.junos.exception import RpcError, SwRollbac...
42.091258
133
0.63254
d062eec32b7070ba5a0650318e2ad9cbeb8ac742
2,524
py
Python
src/face_detection_model.py
bhadreshpsavani/Computer-Pointer-Controller
645d62377f7b70bb38ffb8cd5cb04e83ba48acd0
[ "MIT" ]
11
2020-06-22T09:21:23.000Z
2022-01-29T23:17:46.000Z
src/face_detection_model.py
bhadreshpsavani/EyeExerciseApp
fe99e63fbc2b9811fc053db49c078b82c50351cc
[ "MIT" ]
5
2020-08-03T16:53:59.000Z
2020-10-04T13:15:36.000Z
src/face_detection_model.py
bhadreshpsavani/Computer-Pointer-Controller
645d62377f7b70bb38ffb8cd5cb04e83ba48acd0
[ "MIT" ]
9
2020-06-22T14:20:16.000Z
2021-07-20T13:02:16.000Z
import numpy as np from model import Model class FaceDetectionModel(Model): """ This is a class for the operation of Face Detection Model """ def __init__(self, model_path, device='CPU', extensions=None, threshold=0.6): """ This will initiate Face Detection Model class object ...
41.377049
109
0.602219
693c1266a8be51ade67ce4e55adb1880359dbe77
2,512
py
Python
dlcli/api/agents.py
outlyerapp/dlcli
57458b7346a9b9c92cf99628f6c051589a9edb27
[ "Apache-2.0" ]
1
2017-12-06T11:07:48.000Z
2017-12-06T11:07:48.000Z
dlcli/api/agents.py
outlyerapp/dlcli
57458b7346a9b9c92cf99628f6c051589a9edb27
[ "Apache-2.0" ]
1
2020-02-22T20:29:15.000Z
2020-02-22T20:29:15.000Z
dlcli/api/agents.py
outlyerapp/dlcli
57458b7346a9b9c92cf99628f6c051589a9edb27
[ "Apache-2.0" ]
null
null
null
import logging import utils from wrapper import * logger = logging.getLogger(__name__) # noinspection PyUnusedLocal def get_agents(url='', org='', account='', key='', timeout=60, **kwargs): return get(utils.build_api_url(url, org, account, endpoint='agents'), hea...
42.576271
100
0.565685
af119b04d617c1dea7b77a42e8994a5bf35d74bd
47,928
py
Python
test/distributed/optim/test_zero_redundancy_optimizer.py
dllehr-amd/pytorch
9cef2033f3d13c14c06fdebc6bdce7b7e05edcb3
[ "Intel" ]
60,067
2017-01-18T17:21:31.000Z
2022-03-31T21:37:45.000Z
test/distributed/optim/test_zero_redundancy_optimizer.py
dllehr-amd/pytorch
9cef2033f3d13c14c06fdebc6bdce7b7e05edcb3
[ "Intel" ]
66,955
2017-01-18T17:21:38.000Z
2022-03-31T23:56:11.000Z
test/distributed/optim/test_zero_redundancy_optimizer.py
dllehr-amd/pytorch
9cef2033f3d13c14c06fdebc6bdce7b7e05edcb3
[ "Intel" ]
19,210
2017-01-18T17:45:04.000Z
2022-03-31T23:51:56.000Z
# Owner(s): ["oncall: distributed"] # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. # # This source code is licensed under the BSD license found in the # LICENSE file in the root directory of this source tree. import copy import itertools import os import sys from contextlib import suppress fr...
40.685908
126
0.595873
88d806b51f503f4f080925c7151bb492b7fd1b48
4,594
py
Python
tests/test_devopsUserTest.py
mitchdenny/azure-devops-cli-extension
3a01c5b5d0c58dfa07f4e7803e0e0bdf7b61d630
[ "MIT" ]
null
null
null
tests/test_devopsUserTest.py
mitchdenny/azure-devops-cli-extension
3a01c5b5d0c58dfa07f4e7803e0e0bdf7b61d630
[ "MIT" ]
null
null
null
tests/test_devopsUserTest.py
mitchdenny/azure-devops-cli-extension
3a01c5b5d0c58dfa07f4e7803e0e0bdf7b61d630
[ "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. # --------------------------------------------------------------------...
55.349398
165
0.620592
dfd3b9ef02b52202b57fe64f989d4bb9e5bb1c7a
157
py
Python
My_blog/blueprints/auth.py
SinTod/My_blog
024d9032b59d97678dea75acc73a31150e81c540
[ "MIT" ]
null
null
null
My_blog/blueprints/auth.py
SinTod/My_blog
024d9032b59d97678dea75acc73a31150e81c540
[ "MIT" ]
null
null
null
My_blog/blueprints/auth.py
SinTod/My_blog
024d9032b59d97678dea75acc73a31150e81c540
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- ''' * @Author: SinTod * @Date: 2018-10-15 17:29:20 * @Desc: ''' from flask import Blueprint auth_bp = Blueprint('auth', __name__)
15.7
37
0.611465
de2c78dd7724a2119e23594fe71d6e13c609179f
5,163
py
Python
venv/Lib/site-packages/nibabel/tests/test_quaternions.py
richung99/digitizePlots
6b408c820660a415a289726e3223e8f558d3e18b
[ "MIT" ]
1
2022-01-18T17:56:51.000Z
2022-01-18T17:56:51.000Z
venv/Lib/site-packages/nibabel/tests/test_quaternions.py
richung99/digitizePlots
6b408c820660a415a289726e3223e8f558d3e18b
[ "MIT" ]
null
null
null
venv/Lib/site-packages/nibabel/tests/test_quaternions.py
richung99/digitizePlots
6b408c820660a415a289726e3223e8f558d3e18b
[ "MIT" ]
null
null
null
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the NiBabel package for the # copyright and license terms. # ### ### ### #...
27.462766
78
0.597715
730d125075cd43de3e300d62ec83e41a0214aa2e
3,873
py
Python
architectures/layers/noise_operations.py
gvalvano/multiscale-adversarial-attention-gates
9bfc105f9e6a59e4a80d7ac65128f4fb8d38f511
[ "Apache-2.0" ]
29
2020-07-04T00:04:28.000Z
2022-03-18T01:49:34.000Z
architectures/layers/noise_operations.py
gvalvano/multiscale-adversarial-attention-gates
9bfc105f9e6a59e4a80d7ac65128f4fb8d38f511
[ "Apache-2.0" ]
2
2020-10-31T14:41:02.000Z
2021-11-21T18:16:19.000Z
architectures/layers/noise_operations.py
gvalvano/multiscale-adversarial-attention-gates
9bfc105f9e6a59e4a80d7ac65128f4fb8d38f511
[ "Apache-2.0" ]
7
2020-10-21T01:02:52.000Z
2021-11-14T16:52:18.000Z
# Copyright 2019 Gabriele Valvano # # 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...
42.097826
119
0.682933
9ad574ada9b43a47bb4b84de2c55c5fe80b2688a
36,521
py
Python
lib/spack/spack/test/compilers/basics.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
lib/spack/spack/test/compilers/basics.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
lib/spack/spack/test/compilers/basics.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """Test basic behavior of compilers in Spack""" import os import shutil import sys from copy import copy import pytest fro...
37.650515
82
0.620629
93e21c418fe02be71369f70549ee27ed75391d9e
225
py
Python
sortedm2m/compat.py
filipweidemann/django-sortedm2m
7202b9e07b955b291a9185cb66525a04f5e66a51
[ "BSD-3-Clause" ]
7
2019-06-10T09:48:18.000Z
2020-04-26T08:05:07.000Z
sortedm2m/compat.py
filipweidemann/django-sortedm2m
7202b9e07b955b291a9185cb66525a04f5e66a51
[ "BSD-3-Clause" ]
null
null
null
sortedm2m/compat.py
filipweidemann/django-sortedm2m
7202b9e07b955b291a9185cb66525a04f5e66a51
[ "BSD-3-Clause" ]
3
2019-06-21T09:02:42.000Z
2019-08-15T19:37:54.000Z
# -*- coding: utf-8 -*- def get_field(model, field_name): return model._meta.get_field(field_name) def get_apps_from_state(migration_state): return migration_state.apps def get_rel(f): return f.remote_field
16.071429
44
0.728889
1d8361279debc5ca2ca8c1b4a081bab5a0792c26
2,605
py
Python
flatland/node_subsystem/diagram_layout_specification.py
lelandstarr/flatland-model-diagram-editor
dfbd10d80542359c6951d7b039a5a4e3da2a0f50
[ "MIT" ]
10
2021-01-03T16:47:34.000Z
2022-03-30T18:47:07.000Z
flatland/node_subsystem/diagram_layout_specification.py
lelandstarr/flatland-model-diagram-editor
dfbd10d80542359c6951d7b039a5a4e3da2a0f50
[ "MIT" ]
91
2021-01-09T02:14:13.000Z
2022-02-24T10:24:10.000Z
flatland/node_subsystem/diagram_layout_specification.py
lelandstarr/flatland-model-diagram-editor
dfbd10d80542359c6951d7b039a5a4e3da2a0f50
[ "MIT" ]
1
2021-01-13T22:13:19.000Z
2021-01-13T22:13:19.000Z
""" diagram_layout_specification.py """ from flatland.database.flatlanddb import FlatlandDB as fdb from flatland.datatypes.geometry_types import Padding, Position, Alignment, HorizAlign, VertAlign from sqlalchemy import select # To convert db string values to our alignment enums # We can't just use enum values themse...
42.016129
118
0.697889
63dac13c605b4d04c99b2e70af44c48783535fa4
1,651
py
Python
solutions/python/find-pairs-summing-to-ten.py
lhayhurst/interview-with-python
8acf397cdd96cbf00334a567a837d6209507e41c
[ "MIT" ]
201
2016-08-29T23:02:43.000Z
2022-03-28T14:15:29.000Z
solutions/python/find-pairs-summing-to-ten.py
Akash1507/interview-with-python
b5ce31c8bdca754a76762d2734dcf494a302e487
[ "MIT" ]
5
2016-09-03T05:57:13.000Z
2018-03-10T06:09:30.000Z
solutions/python/find-pairs-summing-to-ten.py
Akash1507/interview-with-python
b5ce31c8bdca754a76762d2734dcf494a302e487
[ "MIT" ]
85
2016-09-01T14:39:13.000Z
2022-03-17T08:16:54.000Z
# pairs_sum_to_ten # find pairs in a list that sum to ten # author: Matt Box import unittest # 1. the easy way: quadratic time (O(n**2)) def pairs_sum_to_ten1(lst): pairs = [] lst.sort() for left in lst: # check against the numbers to the right of "left": for right in lst[(lst.index(left) +...
27.065574
66
0.515445
ac0003a17d093e4604cf94e5cb22944740966516
1,448
py
Python
blog/views.py
spereverde/djangogirls-leuven
1a63a40f5166b416753da7930282b32d9f641e37
[ "MIT" ]
null
null
null
blog/views.py
spereverde/djangogirls-leuven
1a63a40f5166b416753da7930282b32d9f641e37
[ "MIT" ]
null
null
null
blog/views.py
spereverde/djangogirls-leuven
1a63a40f5166b416753da7930282b32d9f641e37
[ "MIT" ]
null
null
null
from django.shortcuts import render, get_object_or_404, redirect from django.utils import timezone from django import template from .models import Post from .forms import PostForm def post_list(request): posts = Post.objects.filter(published_date__lte=timezone.now()).order_by('published_date') return render(request,...
35.317073
91
0.649862
b84ae95283d7130e9663b97734d9f2a39d5a3ebb
8,051
py
Python
tensorflow_datasets/image/smallnorb.py
facaiy/datasets
830a663e996b7b95c45acddd58ba6e6532599c0c
[ "Apache-2.0" ]
1
2019-07-23T22:05:16.000Z
2019-07-23T22:05:16.000Z
tensorflow_datasets/image/smallnorb.py
facaiy/datasets
830a663e996b7b95c45acddd58ba6e6532599c0c
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/image/smallnorb.py
facaiy/datasets
830a663e996b7b95c45acddd58ba6e6532599c0c
[ "Apache-2.0" ]
1
2019-04-29T11:44:16.000Z
2019-04-29T11:44:16.000Z
# coding=utf-8 # Copyright 2019 The TensorFlow Datasets 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 appl...
36.103139
370
0.663396
3415bf21181f9d6717c9ab7ccc9809d780db6c57
2,078
py
Python
pvfit/common/constants.py
markcampanelli/pvfit-m
6e2b9e0797b40de8eb587ec50102421cd2071b9e
[ "MIT" ]
3
2019-08-13T07:19:04.000Z
2019-08-16T22:44:49.000Z
pvfit/common/constants.py
markcampanelli/pvfit-m
6e2b9e0797b40de8eb587ec50102421cd2071b9e
[ "MIT" ]
10
2019-08-09T15:40:51.000Z
2019-09-06T06:06:20.000Z
pvfit/common/constants.py
markcampanelli/pvfit-m
6e2b9e0797b40de8eb587ec50102421cd2071b9e
[ "MIT" ]
2
2019-08-13T18:44:01.000Z
2019-08-14T13:42:32.000Z
import scipy.constants # Some useful physical constants (CODATA 2018: https://physics.nist.gov/cuu/Constants/). # elementary charge, 1.602176634e-19 C. q_C = scipy.constants.value('elementary charge') # Boltzmann constant, 1.380649e-23 J/K. k_B_J_per_K = scipy.constants.value('Boltzmann constant') # Boltzmann const...
32.984127
106
0.642926