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
d45bb94d2afc57e4e809762826d69fe0fa85e890
2,174
py
Python
build/android/gyp/util/md5_check.py
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
231
2015-01-08T09:04:44.000Z
2021-12-30T03:03:10.000Z
build/android/gyp/util/md5_check.py
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
8
2015-08-31T06:39:59.000Z
2021-12-04T14:53:28.000Z
build/android/gyp/util/md5_check.py
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
268
2015-01-21T05:53:28.000Z
2022-03-25T22:09:01.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import hashlib import os def CallAndRecordIfStale( function, record_path=None, input_paths=[], input_strings=[], force=False): """Calls function if t...
28.233766
79
0.695952
a968f0bbe5b3eaae4c460419c3751139ca4fa152
93
py
Python
exercices/utils.py
zazbone/PDE
65a79b2839b54b83692e443bf45716dc6a7737bf
[ "MIT" ]
null
null
null
exercices/utils.py
zazbone/PDE
65a79b2839b54b83692e443bf45716dc6a7737bf
[ "MIT" ]
null
null
null
exercices/utils.py
zazbone/PDE
65a79b2839b54b83692e443bf45716dc6a7737bf
[ "MIT" ]
null
null
null
from pathlib import Path EXP_PATH = Path(__file__).parent IMAGE_FOLDER = EXP_PATH / "image"
18.6
33
0.774194
c3b1018552c6d2c741622a24b3629ab6075b450e
649
py
Python
ps3_python/svd_proj_matrix.py
andrew-kulikov/intro-to-cv-ud810
031c0d36a2f6a5b33264e61bf648ec0bd80c8b49
[ "MIT" ]
1
2019-01-14T16:59:48.000Z
2019-01-14T16:59:48.000Z
ps3_python/svd_proj_matrix.py
andrew-kulikov/intro-to-cv-ud810
031c0d36a2f6a5b33264e61bf648ec0bd80c8b49
[ "MIT" ]
null
null
null
ps3_python/svd_proj_matrix.py
andrew-kulikov/intro-to-cv-ud810
031c0d36a2f6a5b33264e61bf648ec0bd80c8b49
[ "MIT" ]
null
null
null
import numpy as np def svd_proj_matrix(points_3d, points_2d): #n - amount of points n = points_3d.shape[0] A = np.zeros((2 * n, 12), dtype=np.float32) x = points_2d[:, 0] y = points_2d[:, 1] X = points_3d[:, 0] Y = points_3d[:, 1] Z = points_3d[:, 2] zeros = np.zeros(n, dtype=np.fl...
30.904762
106
0.520801
e30336979e0fe51889ca976aa2b5b0e418065c9f
440
py
Python
pythontutor-ru/01_inout_and_arithmetic_operations/04_electronic_watch.py
ornichola/learning-new
e567218d8887805e38b1361715d5e3bd51a6bcaf
[ "Unlicense" ]
2
2019-05-24T20:10:16.000Z
2020-07-11T06:06:43.000Z
pythontutor-ru/01_inout_and_arithmetic_operations/04_electronic_watch.py
ornichola/learning-new
e567218d8887805e38b1361715d5e3bd51a6bcaf
[ "Unlicense" ]
null
null
null
pythontutor-ru/01_inout_and_arithmetic_operations/04_electronic_watch.py
ornichola/learning-new
e567218d8887805e38b1361715d5e3bd51a6bcaf
[ "Unlicense" ]
21
2019-03-11T20:25:05.000Z
2022-02-28T13:53:10.000Z
''' http://pythontutor.ru/lessons/inout_and_arithmetic_operations/problems/electronic_watch/ Дано число n. С начала суток прошло n минут. Определите, сколько часов и минут будут показывать электронные часы в этот момент. Программа должна вывести два числа: количество часов (от 0 до 23) и количество минут (от 0 до 59). ...
44
127
0.759091
fdb64115fa95113b0386f1d6440d35b4a4e111ae
2,553
py
Python
influence-release-mod/influence/awa_mlp.py
chihkuanyeh/Representer_Point_Selection
c559b32a768f54352e6efe6c246c70e1361b7c2e
[ "MIT" ]
63
2019-02-26T20:15:58.000Z
2022-03-24T15:59:02.000Z
influence-release-mod/influence/awa_mlp.py
chihkuanyeh/Representer_Point_Selection
c559b32a768f54352e6efe6c246c70e1361b7c2e
[ "MIT" ]
4
2019-04-25T18:30:58.000Z
2021-09-09T22:05:42.000Z
influence-release-mod/influence/awa_mlp.py
chihkuanyeh/Representer_Point_Selection
c559b32a768f54352e6efe6c246c70e1361b7c2e
[ "MIT" ]
17
2019-04-15T06:39:32.000Z
2021-05-20T03:25:30.000Z
""" Model for AWA experiments using Resnet features """ from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import abc import sys import numpy as np import pandas as pd from sklearn import linear_model, preprocessing, c...
32.316456
114
0.637681
d4a98305ccd54f5946414a461d26acc43a58773e
533
py
Python
model_learn/people/migrations/0001_initial.py
knowMandM/django
2aaf8bb2b4eabc3389427f5bbe17cd9b69829ca1
[ "MIT" ]
1
2019-04-12T12:57:38.000Z
2019-04-12T12:57:38.000Z
model_learn/people/migrations/0001_initial.py
knowMandM/django
2aaf8bb2b4eabc3389427f5bbe17cd9b69829ca1
[ "MIT" ]
null
null
null
model_learn/people/migrations/0001_initial.py
knowMandM/django
2aaf8bb2b4eabc3389427f5bbe17cd9b69829ca1
[ "MIT" ]
null
null
null
# Generated by Django 2.1.7 on 2019-03-09 00:57 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Person', fields=[ ('id', models.AutoField(a...
23.173913
114
0.560976
acf5f20833f54e8a644ae9cb61890aa58fd7668d
124
py
Python
exercicio24.py
monabrisa/-infosatc-lp-avaliativo-01
39d8b97162fa0102db1316b977e960bc07cd7299
[ "MIT" ]
null
null
null
exercicio24.py
monabrisa/-infosatc-lp-avaliativo-01
39d8b97162fa0102db1316b977e960bc07cd7299
[ "MIT" ]
null
null
null
exercicio24.py
monabrisa/-infosatc-lp-avaliativo-01
39d8b97162fa0102db1316b977e960bc07cd7299
[ "MIT" ]
null
null
null
metros = float(input("Digite um valor em m²: ")) acres = metros * 0.000247 print("{} m² são {} acres".format(metros, acres))
41.333333
49
0.669355
31423f49402a394ebc5f9b4029186c0425e10d21
1,673
py
Python
project/api/views/search.py
fael07/Blog-Django-with-CBV
269747b2e663a34b99acae6368db49c6ad37c2b8
[ "MIT" ]
null
null
null
project/api/views/search.py
fael07/Blog-Django-with-CBV
269747b2e663a34b99acae6368db49c6ad37c2b8
[ "MIT" ]
null
null
null
project/api/views/search.py
fael07/Blog-Django-with-CBV
269747b2e663a34b99acae6368db49c6ad37c2b8
[ "MIT" ]
null
null
null
from rest_framework.response import Response from rest_framework.views import APIView from rest_framework import status from django.core.cache import cache from Support.Code.actions.Support.utils.main import gets from django.views.decorators.cache import cache_page from django.utils.decorators import method_decorator...
35.595745
143
0.621638
b97ef3f3c9f5677b8322ccf137c7aefb24e25ca4
1,541
py
Python
products/src/table_update/main.py
DeepHiveMind/aws-serverless-ecommerce-platform
38429459293e4b07fcaf9ed823f4f009abaccf71
[ "MIT-0" ]
1
2020-07-18T08:35:45.000Z
2020-07-18T08:35:45.000Z
products/src/table_update/main.py
DeepHiveMind/aws-serverless-ecommerce-platform
38429459293e4b07fcaf9ed823f4f009abaccf71
[ "MIT-0" ]
null
null
null
products/src/table_update/main.py
DeepHiveMind/aws-serverless-ecommerce-platform
38429459293e4b07fcaf9ed823f4f009abaccf71
[ "MIT-0" ]
null
null
null
""" TableUpdateFunction """ import os from typing import List import boto3 from boto3.dynamodb.types import TypeDeserializer from aws_lambda_powertools.tracing import Tracer from aws_lambda_powertools.logging.logger import Logger from ecom.eventbridge import ddb_to_event # pylint: disable=import-error ENVIRONMENT =...
24.078125
90
0.693056
94881f4f8584cf14e07a7aa2ffa30b31f6e7d316
5,497
py
Python
pyserini/collection/_base.py
printfCalvin/pyserini
fc95f594721d511e1d6e763e8bd58476d759a63d
[ "Apache-2.0" ]
1
2022-02-21T05:14:06.000Z
2022-02-21T05:14:06.000Z
pyserini/collection/_base.py
printfCalvin/pyserini
fc95f594721d511e1d6e763e8bd58476d759a63d
[ "Apache-2.0" ]
null
null
null
pyserini/collection/_base.py
printfCalvin/pyserini
fc95f594721d511e1d6e763e8bd58476d759a63d
[ "Apache-2.0" ]
null
null
null
# # Pyserini: Python interface to the Anserini IR toolkit built on Lucene # # 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...
35.694805
113
0.68692
cf8a1451917b71e663912de8e99fe3b5782e4596
1,866
py
Python
dataflow/model/notebooks/Master_pipeline_runner.py
alphamatic/amp
5018137097159415c10eaa659a2e0de8c4e403d4
[ "BSD-3-Clause" ]
5
2021-08-10T23:16:44.000Z
2022-03-17T17:27:00.000Z
dataflow/model/notebooks/Master_pipeline_runner.py
alphamatic/amp
5018137097159415c10eaa659a2e0de8c4e403d4
[ "BSD-3-Clause" ]
330
2021-06-10T17:28:22.000Z
2022-03-31T00:55:48.000Z
dataflow/model/notebooks/Master_pipeline_runner.py
alphamatic/amp
5018137097159415c10eaa659a2e0de8c4e403d4
[ "BSD-3-Clause" ]
6
2021-06-10T17:20:32.000Z
2022-03-28T08:08:03.000Z
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # %% # %load_ext autoreload # %autoreload 2 import ...
21.952941
82
0.690247
79d8324d65d001b331de92c7722aa1fdb47fdfb7
339
py
Python
mol_shrink_ray/__init__.py
jeff231li/mol_shrink_ray
8eaf1182095052e99b0aa779aac5574b1fa3adba
[ "MIT" ]
null
null
null
mol_shrink_ray/__init__.py
jeff231li/mol_shrink_ray
8eaf1182095052e99b0aa779aac5574b1fa3adba
[ "MIT" ]
1
2021-09-17T18:19:01.000Z
2021-09-17T18:19:01.000Z
mol_shrink_ray/__init__.py
jeff231li/molecular_shrink_ray
8eaf1182095052e99b0aa779aac5574b1fa3adba
[ "MIT" ]
null
null
null
""" I Shrunk me Molecule! A module to shrink a molecule/ligand during MD simulations in OpenMM """ # Add imports here from .mol_shrink_ray import * # Handle versioneer from ._version import get_versions versions = get_versions() __version__ = versions['version'] __git_revision__ = versions['full-revisionid'] del get_...
22.6
68
0.781711
89b7a30e037fe451dd9627c679124548a2028ee0
3,005
py
Python
azure-mgmt-redis/azure/mgmt/redis/models/redis_update_parameters_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-redis/azure/mgmt/redis/models/redis_update_parameters_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-redis/azure/mgmt/redis/models/redis_update_parameters_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
50.932203
355
0.669884
1df7e947c124e8c636fa1dc9ec24312bbbbedcd3
2,967
py
Python
alx/topk.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-13T21:48:52.000Z
2022-03-13T21:48:52.000Z
alx/topk.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
alx/topk.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
35.321429
80
0.734749
a2b2890cf63271f0551d9e024ef4e015e258268c
640
py
Python
tests/test_pdf_example.py
simonthor/zfit-physics
b7702da4182812925bf53038de438f4d90168bc3
[ "BSD-3-Clause" ]
7
2019-03-31T17:04:36.000Z
2021-04-13T10:29:25.000Z
tests/test_pdf_example.py
simonthor/zfit-physics
b7702da4182812925bf53038de438f4d90168bc3
[ "BSD-3-Clause" ]
7
2019-05-23T09:59:05.000Z
2021-09-13T20:49:51.000Z
tests/test_pdf_example.py
simonthor/zfit-physics
b7702da4182812925bf53038de438f4d90168bc3
[ "BSD-3-Clause" ]
2
2020-02-06T03:23:38.000Z
2021-03-06T18:01:22.000Z
"""Example test for a pdf or function.""" import zfit from zfit.core.testing import tester import zfit_physics as zphys # specify globals here. Do NOT add any TensorFlow but just pure python param1_true = 0.3 param2_true = 1.2 def test_special_property1(): # test special properties here assert True # re...
22.857143
84
0.75
8e51ea28cbf72fc7e582baa9bad6eae9aaeb9706
1,429
py
Python
examples/custom-scripts/h264-videowriter-test.py
aviogit/depthai-python
ffeb646dff0819177b09f0dd8eb9720b154e7845
[ "MIT" ]
null
null
null
examples/custom-scripts/h264-videowriter-test.py
aviogit/depthai-python
ffeb646dff0819177b09f0dd8eb9720b154e7845
[ "MIT" ]
null
null
null
examples/custom-scripts/h264-videowriter-test.py
aviogit/depthai-python
ffeb646dff0819177b09f0dd8eb9720b154e7845
[ "MIT" ]
null
null
null
#!/usr/bin/env python import cv2 in_fn = '../video.h265' out_fn = 'video.mp4' in_cap = cv2.VideoCapture(in_fn) out_cap = cv2.VideoWriter(out_fn, cv2.VideoWriter.fourcc('A','V','C','1'), 30, (3840, 2160)) #out_cap = cv2.VideoWriter(out_fn, 0x21, 30, (3840, 2160)) while True: inret, inframe = in_cap.read() print(i...
24.220339
92
0.635409
c768c02418dcc25fec5cf52a15e0a57b4fbc8617
32
py
Python
sequential.py
vector8188/AlgorithmAnalysisPython
026ca8bf846a504c5eae1677680306b0462b49b9
[ "MIT" ]
1
2018-02-01T21:54:48.000Z
2018-02-01T21:54:48.000Z
sequential.py
vector8188/AlgorithmAnalysisPython
026ca8bf846a504c5eae1677680306b0462b49b9
[ "MIT" ]
null
null
null
sequential.py
vector8188/AlgorithmAnalysisPython
026ca8bf846a504c5eae1677680306b0462b49b9
[ "MIT" ]
null
null
null
def binary_search(alist,item):
16
30
0.78125
fc9e7624fa62bb4e6ada49d59212acd39c205d79
118,561
py
Python
src/sqlfluff/dialects/dialect_tsql.py
kiri1701/sqlfluff
93d109d87f327037efe6fa30f2f7eea8d44f7e91
[ "MIT" ]
null
null
null
src/sqlfluff/dialects/dialect_tsql.py
kiri1701/sqlfluff
93d109d87f327037efe6fa30f2f7eea8d44f7e91
[ "MIT" ]
null
null
null
src/sqlfluff/dialects/dialect_tsql.py
kiri1701/sqlfluff
93d109d87f327037efe6fa30f2f7eea8d44f7e91
[ "MIT" ]
null
null
null
"""The MSSQL T-SQL dialect. https://docs.microsoft.com/en-us/sql/t-sql/language-elements/language-elements-transact-sql """ from sqlfluff.core.parser import ( BaseSegment, Sequence, OneOf, Bracketed, Ref, Nothing, RegexLexer, CodeSegment, RegexParser, Delimited, Matchable, ...
30.160519
274
0.538575
45df4e9d0954a12b01eada2d9dc3e0901f80f073
3,942
py
Python
supports/pyload/src/pyload/plugins/downloaders/RockfileEu.py
LuckyNicky/pycrawler
4b3fe2f6e8e51f236d95a64a89a44199e4e97743
[ "Apache-2.0" ]
1
2020-04-02T17:03:39.000Z
2020-04-02T17:03:39.000Z
supports/pyload/src/pyload/plugins/downloaders/RockfileEu.py
LuckyNicky/pycrawler
4b3fe2f6e8e51f236d95a64a89a44199e4e97743
[ "Apache-2.0" ]
null
null
null
supports/pyload/src/pyload/plugins/downloaders/RockfileEu.py
LuckyNicky/pycrawler
4b3fe2f6e8e51f236d95a64a89a44199e4e97743
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import re import urllib.parse from ...core.network.http.exceptions import BadHeader from ..anticaptchas.ReCaptcha import ReCaptcha from ..base.simple_downloader import SimpleDownloader class RockfileEu(SimpleDownloader): __name__ = "RockfileEu" __type__ = "downloader" __version_...
31.536
134
0.545916
a2244a48b2ebbeba27e0636e49a779ba3ba46ff4
1,198
py
Python
api/app.py
georgetzianabos/jinja2online
03894669cf816ff7b49477ac9c167916cac925c0
[ "MIT" ]
null
null
null
api/app.py
georgetzianabos/jinja2online
03894669cf816ff7b49477ac9c167916cac925c0
[ "MIT" ]
10
2020-09-07T07:23:08.000Z
2022-03-02T05:32:10.000Z
api/app.py
georgetzianabos/jinja2online
03894669cf816ff7b49477ac9c167916cac925c0
[ "MIT" ]
null
null
null
import os from flask import ( Flask, request, jsonify, send_from_directory, Response ) from api import process import api.example app = Flask(__name__) app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 300 @app.route('/') def home(): return send_from_directory(os.path.abspath('static/'), 'index.html') @app....
19.322581
72
0.583472
29f39df0d3782632580d887c9df64cc20b9b6537
639
py
Python
2020/day_01.py
nyanthanya/Contoh-Program
924d79c34a92e77374228f1605a1d37b0fe37c70
[ "Unlicense" ]
105
2019-12-09T07:27:43.000Z
2022-01-28T16:34:37.000Z
2020/day_01.py
nyanthanya/Contoh-Program
924d79c34a92e77374228f1605a1d37b0fe37c70
[ "Unlicense" ]
1
2021-12-11T21:25:47.000Z
2021-12-12T21:21:35.000Z
2020/day_01.py
nyanthanya/Contoh-Program
924d79c34a92e77374228f1605a1d37b0fe37c70
[ "Unlicense" ]
9
2020-12-06T01:00:11.000Z
2021-12-14T00:48:43.000Z
import aoc_helper from itertools import combinations raw = aoc_helper.day(1) data = set(aoc_helper.extract_ints(raw)) def part_one(): for a in data: if (b := (2020 - a)) in data: return a * b def part_two(): # We know that at least two of the numbers must be less than half the target. ...
27.782609
88
0.643192
a7d72dd3f9e812fe8208427326463a6b41d0977b
4,097
py
Python
tools/micavis/analysis.py
mica-gossip/MiCA
bdd4848a7f52a6744d6e61647333b0a71a9ae338
[ "BSD-3-Clause" ]
5
2015-03-03T23:59:34.000Z
2021-03-20T11:39:33.000Z
tools/micavis/analysis.py
mica-gossip/MiCA
bdd4848a7f52a6744d6e61647333b0a71a9ae338
[ "BSD-3-Clause" ]
null
null
null
tools/micavis/analysis.py
mica-gossip/MiCA
bdd4848a7f52a6744d6e61647333b0a71a9ae338
[ "BSD-3-Clause" ]
null
null
null
from math import * import logs def deltas(sequence): sq = sorted(list(sequence)) it = iter(sq) prev = it.next() try: while True: x = it.next() yield x - prev prev = x except StopIteration: pass # returns a list of tuple-lists, where events have...
33.581967
169
0.592873
531f6060768e881be112dc678c3780bd90cd60cc
7,799
py
Python
las2.py
DiegoPandolfaDiaz/Lidar
16079dc5143b4bd7400becd335d0c5c06dc97d69
[ "Apache-2.0" ]
null
null
null
las2.py
DiegoPandolfaDiaz/Lidar
16079dc5143b4bd7400becd335d0c5c06dc97d69
[ "Apache-2.0" ]
null
null
null
las2.py
DiegoPandolfaDiaz/Lidar
16079dc5143b4bd7400becd335d0c5c06dc97d69
[ "Apache-2.0" ]
null
null
null
import liblas import sys import struct import numpy as np def main(): #coeficientes de la matriz de rotacion a = b = c = d = e = f = g = h = i = 0.0; matrix_rot = np.matrix( ((1,0,0),(0,1,0),(0,0,1)) ) gravity = np.matrix( ((0,0,0),(0,0,0),(9.8,0,0)) ) #posiciones x_next = 0.0 y_next = 0.0 z_next = 0.0 x = 0...
27.953405
100
0.585973
381b8d166f8c19a9965ed4f1126dcfc0e1efcd5b
31,188
py
Python
kge/model/kge_model.py
beyondacm/kge
6e1daac2541c821d1e4c28a93bcb38389222a255
[ "MIT" ]
null
null
null
kge/model/kge_model.py
beyondacm/kge
6e1daac2541c821d1e4c28a93bcb38389222a255
[ "MIT" ]
null
null
null
kge/model/kge_model.py
beyondacm/kge
6e1daac2541c821d1e4c28a93bcb38389222a255
[ "MIT" ]
null
null
null
import importlib import tempfile from collections import OrderedDict from torch import Tensor import torch.nn import numpy as np import os import kge from kge import Config, Configurable, Dataset from kge.misc import filename_in_module, init_from from kge.util import load_checkpoint from typing import Any, Dict, List...
39.428571
116
0.598531
1e7d3a6ebb22f1de76b0b00d30790557174fa349
14,897
py
Python
utils.py
yshanyes/Pytorch-ECG-Classifier-Cinc2020-Official
292fcf0758d526dad204cbec5935c864b7ee9444
[ "BSD-2-Clause" ]
7
2020-09-24T03:08:56.000Z
2022-01-12T12:51:19.000Z
utils.py
yshanyes/Pytorch-ECG-Classifier-Cinc2020-Official
292fcf0758d526dad204cbec5935c864b7ee9444
[ "BSD-2-Clause" ]
null
null
null
utils.py
yshanyes/Pytorch-ECG-Classifier-Cinc2020-Official
292fcf0758d526dad204cbec5935c864b7ee9444
[ "BSD-2-Clause" ]
4
2021-01-16T10:45:13.000Z
2021-06-22T07:03:53.000Z
# -*- coding: utf-8 -*- ''' @time: 2019/10/1 10:20 @ author: ys ''' import torch import numpy as np import time,os from sklearn.metrics import f1_score from torch import nn import torch.nn.functional as F from torch.autograd import Variable from config import config import pandas as pd weights_file = './evaluation/we...
34.483796
132
0.621467
7b82f025a3dbed0a80314acfd5e6ce79a2d6b8b9
1,857
py
Python
benchmark_cfpq/conftest.py
Pogozhelskaya/formal-languages-practice
71d28a8398ec3f8c8f74bde8164bea0d54956e13
[ "Apache-2.0" ]
null
null
null
benchmark_cfpq/conftest.py
Pogozhelskaya/formal-languages-practice
71d28a8398ec3f8c8f74bde8164bea0d54956e13
[ "Apache-2.0" ]
1
2020-11-26T10:35:22.000Z
2020-11-26T10:35:22.000Z
benchmark_cfpq/conftest.py
Pogozhelskaya/formal-languages-practice
71d28a8398ec3f8c8f74bde8164bea0d54956e13
[ "Apache-2.0" ]
null
null
null
import os import shutil from glob import glob from pathlib import Path import pytest from src.cfg_algorithms import hellings, mxm_cfpq, tensor_cfg_cfpq, tensor_rsa_cfpq cwd = './benchmark_cfpq' results_dir = cwd + '/results' data_for_cfpq_dir = cwd + '/myDataForCFPQ' if not os.path.exists(data_for_cfpq_dir): os...
28.569231
125
0.605816
4248f532341a2754b3a4e176de1c641630be2836
1,688
py
Python
src/brouwers/forum_tools/forms/widgets.py
modelbrouwers/modelbrouwers
e0ba4819bf726d6144c0a648fdd4731cdc098a52
[ "MIT" ]
6
2015-03-03T13:23:07.000Z
2021-12-19T18:12:41.000Z
src/brouwers/forum_tools/forms/widgets.py
modelbrouwers/modelbrouwers
e0ba4819bf726d6144c0a648fdd4731cdc098a52
[ "MIT" ]
95
2015-02-07T00:55:39.000Z
2022-02-08T20:22:05.000Z
src/brouwers/forum_tools/forms/widgets.py
modelbrouwers/modelbrouwers
e0ba4819bf726d6144c0a648fdd4731cdc098a52
[ "MIT" ]
2
2016-03-22T16:53:26.000Z
2019-02-09T22:46:04.000Z
from django import forms from django.conf import settings from django.contrib.sites.models import Site from django.forms.utils import flatatt from django.utils.encoding import force_text from django.utils.html import format_html, smart_urlquote from django.utils.http import urlencode from django.utils.translation impor...
33.76
74
0.583531
ab151f49f8c19ebdec5bf99c4e9359b3404661ad
10,795
py
Python
gtfspy/routing/profile_block_analyzer.py
Leo-Ryu/gtfspy
732abdf6bfb6427454ac4c0a676dc3f8fc838cf4
[ "MIT" ]
118
2017-03-14T11:17:54.000Z
2022-03-31T07:46:31.000Z
gtfspy/routing/profile_block_analyzer.py
Leo-Ryu/gtfspy
732abdf6bfb6427454ac4c0a676dc3f8fc838cf4
[ "MIT" ]
27
2017-05-02T12:39:36.000Z
2020-03-24T18:29:20.000Z
gtfspy/routing/profile_block_analyzer.py
Leo-Ryu/gtfspy
732abdf6bfb6427454ac4c0a676dc3f8fc838cf4
[ "MIT" ]
29
2017-08-21T15:22:41.000Z
2022-03-13T07:27:52.000Z
from collections import defaultdict import numpy from gtfspy.routing.profile_block import ProfileBlock class ProfileBlockAnalyzer: def __init__(self, profile_blocks, cutoff_distance=None, **kwargs): """ Parameters ---------- profile_blocks: list[gtfspy.routing.profile_block.Prof...
44.241803
112
0.612506
ab2d4b40fa4f5006947c014311ae509badd9c227
6,432
py
Python
monai/apps/deepedit/transforms.py
finalelement/MONAI
8e8e1b391fa649d1227087164dba208008d00bc4
[ "Apache-2.0" ]
null
null
null
monai/apps/deepedit/transforms.py
finalelement/MONAI
8e8e1b391fa649d1227087164dba208008d00bc4
[ "Apache-2.0" ]
null
null
null
monai/apps/deepedit/transforms.py
finalelement/MONAI
8e8e1b391fa649d1227087164dba208008d00bc4
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 - 2021 MONAI Consortium # 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 wri...
37.835294
128
0.650964
72aabd7ef33ba39ea61d865de066b8584528969e
756
py
Python
Code/py3/archived/1-50/15.py
ApocalypseMac/Leetcode
84c229eaf5a2e617ca00cabed04dd76d508d60b8
[ "MIT" ]
1
2020-12-03T13:00:38.000Z
2020-12-03T13:00:38.000Z
Code/py3/archived/1-50/15.py
ApocalypseMac/Leetcode
84c229eaf5a2e617ca00cabed04dd76d508d60b8
[ "MIT" ]
null
null
null
Code/py3/archived/1-50/15.py
ApocalypseMac/Leetcode
84c229eaf5a2e617ca00cabed04dd76d508d60b8
[ "MIT" ]
2
2020-07-27T14:39:45.000Z
2020-08-26T16:41:15.000Z
class Solution: def threeSum(self, nums: List[int]) -> List[List[int]]: # sort + two pointers nums.sort() result = set() for i in range(len(nums) - 2): if nums[i] > 0: break if i > 0 and nums[i] == nums[i - 1]: continue ...
34.363636
61
0.375661
f1b01a918a8a17a09d54b122335ce33b2323ff8d
15,230
py
Python
pixiedust.py
mjpieters/pixiedust
b7a58ddd29082daf9bfb7d42233df7174570a998
[ "MIT" ]
2
2018-09-29T09:27:01.000Z
2019-12-01T15:19:31.000Z
pixiedust.py
mjpieters/pixiedust
b7a58ddd29082daf9bfb7d42233df7174570a998
[ "MIT" ]
null
null
null
pixiedust.py
mjpieters/pixiedust
b7a58ddd29082daf9bfb7d42233df7174570a998
[ "MIT" ]
null
null
null
# Copyright 2018 Martijn Pieters, Zopatista Ltd. # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE.txt file for details. import collections import itertools import operator import re import sqlite3 import struct import sys from functools import partial from itert...
35.835294
88
0.582272
61dccf92429f207a3ebf63d60148170087b3e979
1,220
py
Python
tests/query_runner/test_utils.py
jodevsa/redash
021068688db82e3a7092b4bb202e37c652bd6f64
[ "BSD-2-Clause" ]
3
2019-06-16T14:46:05.000Z
2021-11-09T11:27:18.000Z
tests/query_runner/test_utils.py
jodevsa/redash
021068688db82e3a7092b4bb202e37c652bd6f64
[ "BSD-2-Clause" ]
187
2019-08-14T02:55:59.000Z
2022-03-22T17:55:17.000Z
tests/query_runner/test_utils.py
jodevsa/redash
021068688db82e3a7092b4bb202e37c652bd6f64
[ "BSD-2-Clause" ]
4
2019-07-01T06:15:44.000Z
2021-12-11T11:17:08.000Z
# -*- coding: utf-8 -*- from unittest import TestCase from redash.query_runner import TYPE_DATETIME, TYPE_FLOAT, TYPE_INTEGER, TYPE_BOOLEAN, TYPE_STRING from redash.query_runner.drill import guess_type class TestGuessType(TestCase): def test_handles_unicode(self): self.assertEqual(guess_type(u'Текст'), T...
36.969697
98
0.722131
a56c72b12bf4c3e652d1b15e5b9823230bc331b3
40
py
Python
facetools/test/common.py
bigsassy/django-facetools
aeedaea81ab0007ee8e96b2f81f1404dc8bddb3c
[ "MIT" ]
2
2018-01-24T20:41:27.000Z
2019-06-27T13:24:18.000Z
facetools/test/common.py
bigsassy/django-facetools
aeedaea81ab0007ee8e96b2f81f1404dc8bddb3c
[ "MIT" ]
null
null
null
facetools/test/common.py
bigsassy/django-facetools
aeedaea81ab0007ee8e96b2f81f1404dc8bddb3c
[ "MIT" ]
null
null
null
class TestUserNotLoaded(Exception): pass
40
40
0.875
7ce85d0064e5fd929b5380b2ff8a8318564770ab
4,159
py
Python
01-Lesson-Plans/15-Algorithmic-Trading/2/Activities/06-Evr_Async_Trading/Solved/jarvis-text.py
tatianegercina/FinTech
b40687aa362d78674e223eb15ecf14bc59f90b62
[ "ADSL" ]
1
2021-04-13T07:14:34.000Z
2021-04-13T07:14:34.000Z
01-Lesson-Plans/15-Algorithmic-Trading/2/Activities/06-Evr_Async_Trading/Solved/jarvis-text.py
tatianegercina/FinTech
b40687aa362d78674e223eb15ecf14bc59f90b62
[ "ADSL" ]
2
2021-06-02T03:14:19.000Z
2022-02-11T23:21:24.000Z
01-Lesson-Plans/15-Algorithmic-Trading/2/Activities/06-Evr_Async_Trading/Solved/jarvis-text.py
tatianegercina/FinTech
b40687aa362d78674e223eb15ecf14bc59f90b62
[ "ADSL" ]
1
2021-05-07T13:26:50.000Z
2021-05-07T13:26:50.000Z
import os import ccxt import asyncio import numpy as np import pandas as pd from dotenv import load_dotenv import matplotlib.pyplot as plt def initialize(cash=None): """Initialize the plot, data storage, and account balances.""" print("Initializing Account and DataFrame") # @TODO: Update to build the plo...
27.183007
109
0.642222
c81e07a734798d379dfd082b4cc75a3d06330183
7,214
py
Python
modified_gym/envs/registration.py
mk37972/SCAPE
01080e4159917546c76dd15ae5c74e092f4ae299
[ "MIT" ]
null
null
null
modified_gym/envs/registration.py
mk37972/SCAPE
01080e4159917546c76dd15ae5c74e092f4ae299
[ "MIT" ]
null
null
null
modified_gym/envs/registration.py
mk37972/SCAPE
01080e4159917546c76dd15ae5c74e092f4ae299
[ "MIT" ]
null
null
null
import re import importlib import warnings from modified_gym import error, logger # This format is true today, but it's *not* an official spec. # [username/](env-name)-v(version) env-name is group 1, version is group 2 # # 2016-10-31: We're experimentally expanding the environment ID format # to include an optiona...
39.637363
228
0.650125
8db68e709e65e27f3bd2cce05fc02bc6d1007d41
7,553
py
Python
views.py
alvienzo720/Dep_Nadine
b23688aa87ba3cfe138f9b243eed3f50a74e1486
[ "Apache-2.0" ]
null
null
null
views.py
alvienzo720/Dep_Nadine
b23688aa87ba3cfe138f9b243eed3f50a74e1486
[ "Apache-2.0" ]
null
null
null
views.py
alvienzo720/Dep_Nadine
b23688aa87ba3cfe138f9b243eed3f50a74e1486
[ "Apache-2.0" ]
null
null
null
import datetime import calendar import pprint import traceback import logging from django.conf import settings from django.contrib import messages from django.db.models import Q from django.http import HttpResponse, Http404, HttpResponseServerError, HttpResponseRedirect, HttpResponsePermanentRedirect from django.short...
46.337423
580
0.703561
7799e5abeb49b2cff1a184dfcdd36abef6e3de8e
2,451
py
Python
GamblersRuin.py
tobikuhlmann/monte-carlo-playground
796f6d23f7677f5bc525ea603b1aa8a48cfd1c3b
[ "MIT" ]
null
null
null
GamblersRuin.py
tobikuhlmann/monte-carlo-playground
796f6d23f7677f5bc525ea603b1aa8a48cfd1c3b
[ "MIT" ]
null
null
null
GamblersRuin.py
tobikuhlmann/monte-carlo-playground
796f6d23f7677f5bc525ea603b1aa8a48cfd1c3b
[ "MIT" ]
null
null
null
import numpy as np class GamblersRuin(object): """ Three fair coins tossed. Heads gets +1, tails -1, pay-offs are added and net pay-off added to equity. The 3 tosses are repeated 1000 times. Initial equity is 10 dollars p: probability that gambler is successful/ wins at each round. i: gambler's initial amount of ...
25.53125
102
0.711138
cd9477d3e2d4e3d11199f2b7bb3c9c5629a47b27
6,214
py
Python
logicmonitor_sdk/models/netflow_bandwidth.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
logicmonitor_sdk/models/netflow_bandwidth.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
logicmonitor_sdk/models/netflow_bandwidth.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ LogicMonitor REST API LogicMonitor is a SaaS-based performance monitoring platform that provides full visibility into complex, hybrid infrastructures, offering granular performance monitoring and actionable data and insights. logicmonitor_sdk enables you to manage your LogicMonitor account...
27.990991
304
0.592855
bc74cba949bab11cfaf7f9a4c878729a83ea14a9
1,121
py
Python
tests/integration/actions.py
jeffreymelvin-wf/aws-lambda-fsm-workflows
c96bc324be4e5fbd28c3a64d9d95bb8fc9b706e1
[ "Apache-2.0" ]
null
null
null
tests/integration/actions.py
jeffreymelvin-wf/aws-lambda-fsm-workflows
c96bc324be4e5fbd28c3a64d9d95bb8fc9b706e1
[ "Apache-2.0" ]
null
null
null
tests/integration/actions.py
jeffreymelvin-wf/aws-lambda-fsm-workflows
c96bc324be4e5fbd28c3a64d9d95bb8fc9b706e1
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2018 Workiva 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 agreed to in wri...
36.16129
74
0.695807
de1f68359217018510efbfbb7a55716131d0e8ed
20,878
py
Python
gamelib/cocos/actions/interval_actions.py
luciotorre/aiamsori
521f3e16868326889caae9f8703ed042aead8817
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
gamelib/cocos/actions/interval_actions.py
luciotorre/aiamsori
521f3e16868326889caae9f8703ed042aead8817
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
gamelib/cocos/actions/interval_actions.py
luciotorre/aiamsori
521f3e16868326889caae9f8703ed042aead8817
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, Lucio Torre # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follow...
28.718019
101
0.569691
19a28e3c99f742edbea91d52cb0519bbf2ab37d8
754
py
Python
qc3/formats/skp/skp_const.py
wtfo-guru/queconverter
fc3529e46d5af1d90840c52ed9f58fb3c255523b
[ "BSD-2-Clause" ]
null
null
null
qc3/formats/skp/skp_const.py
wtfo-guru/queconverter
fc3529e46d5af1d90840c52ed9f58fb3c255523b
[ "BSD-2-Clause" ]
null
null
null
qc3/formats/skp/skp_const.py
wtfo-guru/queconverter
fc3529e46d5af1d90840c52ed9f58fb3c255523b
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2012 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License # as published by the Free Software Foundation, either version 3 # of the License, or (at your option) any later v...
39.684211
75
0.733422
f94dc3ad5b7ee1dcac4981e1cfacda4617102236
3,610
py
Python
app/recipe/views.py
jvaras05/recipe-app-api
4641dc5472167624a1777f98948a7adbe6ae3e0b
[ "MIT" ]
null
null
null
app/recipe/views.py
jvaras05/recipe-app-api
4641dc5472167624a1777f98948a7adbe6ae3e0b
[ "MIT" ]
null
null
null
app/recipe/views.py
jvaras05/recipe-app-api
4641dc5472167624a1777f98948a7adbe6ae3e0b
[ "MIT" ]
null
null
null
from rest_framework.decorators import action from rest_framework.response import Response from rest_framework import viewsets, mixins, status from rest_framework.authentication import TokenAuthentication from rest_framework.permissions import IsAuthenticated from core.models import Tag, Ingredient, Recipe from recipe...
33.738318
74
0.665928
d178b044606cd38325456fc4293c4f95ee768d22
4,498
py
Python
venv/lib/python3.6/site-packages/celery/concurrency/base.py
kuldeep24680/recurring_payments
79e589c3d3f4fb1a0791725065e2c068750ef6b2
[ "MIT" ]
13
2018-03-28T23:07:01.000Z
2022-03-12T06:01:21.000Z
newenv/lib/python3.8/site-packages/celery/concurrency/base.py
palakshivlani-11/cryptorium
eebb78c061007519e527b3d18b8df6bc13679c46
[ "Apache-2.0" ]
11
2018-06-18T15:49:07.000Z
2021-11-25T01:45:33.000Z
newenv/lib/python3.8/site-packages/celery/concurrency/base.py
palakshivlani-11/cryptorium
eebb78c061007519e527b3d18b8df6bc13679c46
[ "Apache-2.0" ]
5
2018-03-28T23:07:05.000Z
2021-12-09T19:02:00.000Z
# -*- coding: utf-8 -*- """Base Execution Pool.""" from __future__ import absolute_import, unicode_literals import logging import os import sys from billiard.einfo import ExceptionInfo from billiard.exceptions import WorkerLostError from kombu.utils.encoding import safe_repr from celery.exceptions import WorkerShutd...
25.556818
74
0.616496
d4eaa05c745f19f3c738f06c02d6b9e88861e467
3,988
py
Python
platform.py
grahamjamesaddis/platform-teensy
68536c188e262c7fa9674fb25715e397334ce069
[ "Apache-2.0" ]
null
null
null
platform.py
grahamjamesaddis/platform-teensy
68536c188e262c7fa9674fb25715e397334ce069
[ "Apache-2.0" ]
null
null
null
platform.py
grahamjamesaddis/platform-teensy
68536c188e262c7fa9674fb25715e397334ce069
[ "Apache-2.0" ]
null
null
null
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
37.980952
74
0.575978
c215241d808bb5124545be69639f3a51d5700b13
3,962
py
Python
nuitka/tools/release/bump/__main__.py
zegervdv/Nuitka
ef1b62fecb634c51befede8da218c22f127836e9
[ "Apache-2.0" ]
1
2021-07-05T03:05:05.000Z
2021-07-05T03:05:05.000Z
nuitka/tools/release/bump/__main__.py
ztessler/Nuitka
04c9a5471b702a0e5f28398f2661c93b83ab0d1a
[ "Apache-2.0" ]
null
null
null
nuitka/tools/release/bump/__main__.py
ztessler/Nuitka
04c9a5471b702a0e5f28398f2661c93b83ab0d1a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file e...
30.476923
96
0.615851
69e5bc99522ebdc3fe9c6e29d6f69328f93626ec
66,888
py
Python
Lib/test/test_bytes.py
vic/pysano
bcfd0522711efaaacf68821b831674b0ff48b6a1
[ "PSF-2.0" ]
4
2016-04-02T00:01:50.000Z
2017-07-13T02:11:04.000Z
Lib/test/test_bytes.py
vic/pysano
bcfd0522711efaaacf68821b831674b0ff48b6a1
[ "PSF-2.0" ]
null
null
null
Lib/test/test_bytes.py
vic/pysano
bcfd0522711efaaacf68821b831674b0ff48b6a1
[ "PSF-2.0" ]
null
null
null
"""Unit tests for the bytes and bytearray types. XXX This is a mess. Common tests should be moved to buffer_tests.py, which itself ought to be unified with string_tests.py (and the latter should be modernized). """ import os import re import sys import copy import functools import pickle import tempfile import unitt...
38.933644
765
0.565423
336324e85fb6c3dca86a6ccef49f0a6aa307895f
349
py
Python
18/ex18.py
sdwebster/learn-python-the-hard-way-solutions
748a3b8dea69a2ff24e69fc6318b0be3da3fc00b
[ "MIT" ]
null
null
null
18/ex18.py
sdwebster/learn-python-the-hard-way-solutions
748a3b8dea69a2ff24e69fc6318b0be3da3fc00b
[ "MIT" ]
null
null
null
18/ex18.py
sdwebster/learn-python-the-hard-way-solutions
748a3b8dea69a2ff24e69fc6318b0be3da3fc00b
[ "MIT" ]
null
null
null
def print_two(*args): arg1, arg2 = args print "arg1: %r, arg2: %r" % (arg1, arg2) def print_two_again(arg1, arg2): print "arg1: %r, arg2: %r" % (arg1, arg2) def print_one(arg1): print "arg1: %r" % (arg1) def print_none(): print "I got nothing." print_two('Zed', 'Shaw') print_two_again('Zed', 'Shaw') prin...
18.368421
43
0.633238
d71aa1bc1e1d2d1ca1d6e4dc1195606236173fca
8,824
py
Python
kauffman/data/helpers/qwi_helpers.py
KAstev/downwardata
cf57c206e10a0668970b51e2e23110a0ca1af0df
[ "MIT" ]
null
null
null
kauffman/data/helpers/qwi_helpers.py
KAstev/downwardata
cf57c206e10a0668970b51e2e23110a0ca1af0df
[ "MIT" ]
null
null
null
kauffman/data/helpers/qwi_helpers.py
KAstev/downwardata
cf57c206e10a0668970b51e2e23110a0ca1af0df
[ "MIT" ]
null
null
null
import ssl ssl._create_default_https_context = ssl._create_unverified_context import os import time import requests import pandas as pd from itertools import product from kauffman import constants as c from webdriver_manager.chrome import ChromeDriverManager from selenium import webdriver from selenium.webdriver.comm...
37.232068
127
0.637126
72a137c77783b38cb077d0de32c4aa655ee2bb1f
437
py
Python
code/exampleStrats/grimEvery2.py
MissingAssignments/PrisonersDilemmaTournament
a62c5c6df51977eb361b67e7f630570996eb1661
[ "MIT" ]
null
null
null
code/exampleStrats/grimEvery2.py
MissingAssignments/PrisonersDilemmaTournament
a62c5c6df51977eb361b67e7f630570996eb1661
[ "MIT" ]
null
null
null
code/exampleStrats/grimEvery2.py
MissingAssignments/PrisonersDilemmaTournament
a62c5c6df51977eb361b67e7f630570996eb1661
[ "MIT" ]
null
null
null
def strategy(history, memory): wronged = False if not memory: memory = (False, 0) if memory[0] is not None and memory[0]: # Has memory that it was already wronged. wronged = True else: # Has not been wronged yet, historically. if history.shape[1] >= 1 and history[1,-1] == 0: # Just got wronged. wronged = ...
27.3125
82
0.647597
0f6244e366414b57a1c8f3e3369321ca5e33d618
21,424
py
Python
tensor2tensor/models/image_transformer.py
cshanbo/tensor2tensor
346a27b10fd5750e171f26290766e7f71c3bfcb5
[ "Apache-2.0" ]
5
2019-03-28T03:52:32.000Z
2021-02-24T07:09:26.000Z
tensor2tensor/models/image_transformer.py
cshanbo/tensor2tensor
346a27b10fd5750e171f26290766e7f71c3bfcb5
[ "Apache-2.0" ]
null
null
null
tensor2tensor/models/image_transformer.py
cshanbo/tensor2tensor
346a27b10fd5750e171f26290766e7f71c3bfcb5
[ "Apache-2.0" ]
2
2018-08-07T03:43:09.000Z
2019-12-09T06:41:40.000Z
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
31.139535
80
0.776326
77e69e1f10cb0322b8e7e7addde203b292596e77
2,134
py
Python
openpyxlzip/chart/legend.py
ankitJoshi03/openpyxlzip
f3b8aa2f80f9d8bc31ce5fcf05c822d88d2ff647
[ "MIT" ]
null
null
null
openpyxlzip/chart/legend.py
ankitJoshi03/openpyxlzip
f3b8aa2f80f9d8bc31ce5fcf05c822d88d2ff647
[ "MIT" ]
null
null
null
openpyxlzip/chart/legend.py
ankitJoshi03/openpyxlzip
f3b8aa2f80f9d8bc31ce5fcf05c822d88d2ff647
[ "MIT" ]
null
null
null
# Copyright (c) 2010-2020 openpyxlzip from openpyxlzip.descriptors.serialisable import Serialisable from openpyxlzip.descriptors import ( Typed, Integer, Alias, Sequence, ) from openpyxlzip.descriptors.excel import ExtensionList from openpyxlzip.descriptors.nested import ( NestedBool, NestedSet...
27.358974
95
0.617619
f79fb445df346c6f39cee6e1a1b5694aade732cb
12,197
py
Python
tcex/bin/spec_tool_readme_md.py
GShepherdTC/tcex
70b1199b8bb9e63f53e2ba792489267108c909cd
[ "Apache-2.0" ]
null
null
null
tcex/bin/spec_tool_readme_md.py
GShepherdTC/tcex
70b1199b8bb9e63f53e2ba792489267108c909cd
[ "Apache-2.0" ]
null
null
null
tcex/bin/spec_tool_readme_md.py
GShepherdTC/tcex
70b1199b8bb9e63f53e2ba792489267108c909cd
[ "Apache-2.0" ]
null
null
null
"""TcEx Generate Configurations CLI Command""" # standard library from typing import TYPE_CHECKING, List, Optional # first-party from tcex.app_config.permutation import Permutation from tcex.bin.bin_abc import BinABC if TYPE_CHECKING: # first-party from tcex.app_config import AppSpecYml from tcex.app_conf...
36.192878
100
0.596294
fc58a6de0e365aa0d3ca9c156207e8752576cf96
1,238
py
Python
analysis/comparing_factorization.py
michaelneuder/python_vs_cpp
dd55e36bcfba85751bf92698cc16933c1b9c9559
[ "MIT" ]
1
2017-08-07T23:35:11.000Z
2017-08-07T23:35:11.000Z
analysis/comparing_factorization.py
michaelneuder/python_vs_cpp
dd55e36bcfba85751bf92698cc16933c1b9c9559
[ "MIT" ]
null
null
null
analysis/comparing_factorization.py
michaelneuder/python_vs_cpp
dd55e36bcfba85751bf92698cc16933c1b9c9559
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import pandas as pd import numpy as np import matplotlib.pyplot as plt def main(): print('\ncomparing runtime of python and c++ with prime factorization\n') python_data = pd.io.parsers.read_csv('../python/non-graphical/data/decomp_data.csv', names=['number of input', 'runtime'], header=1...
39.935484
136
0.695477
7dcfafb6bc02db42a346622fc4131d08adaaecb9
1,331
py
Python
01_fyyur/starter_code/migrations/versions/de98cf310c55_.py
silasjimmy/Fyyur-Website
9c396bc6103a298627ed176f04dff2ac4f3b48c8
[ "MIT" ]
null
null
null
01_fyyur/starter_code/migrations/versions/de98cf310c55_.py
silasjimmy/Fyyur-Website
9c396bc6103a298627ed176f04dff2ac4f3b48c8
[ "MIT" ]
null
null
null
01_fyyur/starter_code/migrations/versions/de98cf310c55_.py
silasjimmy/Fyyur-Website
9c396bc6103a298627ed176f04dff2ac4f3b48c8
[ "MIT" ]
null
null
null
"""empty message Revision ID: de98cf310c55 Revises: ee2f941a9c76 Create Date: 2021-06-06 12:14:07.942211 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'de98cf310c55' down_revision = 'ee2f941a9c76' branch_labels = None depends_on = None def upgrade(): # ...
31.690476
75
0.687453
df48c30f7a6b6a22210d923bf8d6dd17789acd67
4,485
py
Python
main.py
edwinmillan/TrelloAttachmentCleanup
6c6246bcd485cc87c9a999c1954b733356f94038
[ "MIT" ]
null
null
null
main.py
edwinmillan/TrelloAttachmentCleanup
6c6246bcd485cc87c9a999c1954b733356f94038
[ "MIT" ]
null
null
null
main.py
edwinmillan/TrelloAttachmentCleanup
6c6246bcd485cc87c9a999c1954b733356f94038
[ "MIT" ]
null
null
null
import requests import re import json import configparser from trello import TrelloApi, Cards from typing import List, Optional, Iterable, NoReturn class TrelloCards(Cards): def __init__(self, apikey, token=None): super(TrelloCards, self).__init__(apikey, token) def update_attachment(self, card_id_or...
39.690265
109
0.64058
cb1333f60ee3f386a49d3fd49c6ed4f4f16f9f12
978
py
Python
assignment.py
sylvaingchassang/experiment-design
d8f7f9630579835bf9ca35ea5d182327a6ddaaab
[ "MIT" ]
2
2020-01-07T18:45:13.000Z
2020-01-17T04:14:44.000Z
assignment.py
sylvaingchassang/experiment-design
d8f7f9630579835bf9ca35ea5d182327a6ddaaab
[ "MIT" ]
2
2019-09-26T07:02:10.000Z
2019-09-26T11:19:15.000Z
assignment.py
sylvaingchassang/experiment-design
d8f7f9630579835bf9ca35ea5d182327a6ddaaab
[ "MIT" ]
1
2019-11-15T19:50:29.000Z
2019-11-15T19:50:29.000Z
import numpy as np from numbers import Number from random import shuffle, seed from functools import reduce from operator import add def clean_weights(weights): if isinstance(weights, Number): weights = [weights] if sum(weights) < 1: weights = [1 - sum(weights)] + weights return weights ...
27.942857
71
0.691207
ce16a6d757f26e56ae781c5a290a35a0956ff03d
8,650
py
Python
src/df_v1/scripts/train/train_setup.py
Kokoro-AI/heart-disease-prediction-tf2
b0b465254744b8ff6192d2254bd0cb6d83217ac0
[ "MIT" ]
2
2020-02-12T01:05:14.000Z
2020-07-11T13:29:48.000Z
src/df_v1/scripts/train/train_setup.py
Kokoro-AI/heart-disease-prediction-tf2
b0b465254744b8ff6192d2254bd0cb6d83217ac0
[ "MIT" ]
3
2020-02-10T23:57:42.000Z
2020-06-12T15:49:40.000Z
src/df_v1/scripts/train/train_setup.py
Kokoro-AI/heart-disease-prediction-tf2
b0b465254744b8ff6192d2254bd0cb6d83217ac0
[ "MIT" ]
null
null
null
""" Logic for model creation, training launching and actions needed to be accomplished during training (metrics monitor, model saving etc.) """ import os import time import json import numpy as np import tensorflow as tf from datetime import datetime from tensorflow.keras import Input, Model from src.datasets import l...
36.965812
134
0.672023
51ef63246c19b1b846d1f2f432aaac23fb6a750a
821
py
Python
Python/1. Python Basics/mit-6.00.1-python solutions/lec11.4-coordinate.py
okara83/Becoming-a-Data-Scientist
f09a15f7f239b96b77a2f080c403b2f3e95c9650
[ "MIT" ]
null
null
null
Python/1. Python Basics/mit-6.00.1-python solutions/lec11.4-coordinate.py
okara83/Becoming-a-Data-Scientist
f09a15f7f239b96b77a2f080c403b2f3e95c9650
[ "MIT" ]
null
null
null
Python/1. Python Basics/mit-6.00.1-python solutions/lec11.4-coordinate.py
okara83/Becoming-a-Data-Scientist
f09a15f7f239b96b77a2f080c403b2f3e95c9650
[ "MIT" ]
2
2022-02-09T15:41:33.000Z
2022-02-11T07:47:40.000Z
# lec11.4-coordinate.py # # Lecture 11 - Classes # Video 4 - Adding Methods to a Class # # edX MITx 6.00.1x # Introduction to Computer Science and Programming Using Python import math def sq(x): return x*x class Coordinate(object): def __init__(self, x, y): self.x = x self.y = y # defin...
24.147059
74
0.637028
69fb74ef52339ad4846fcb4a8841d2503d0480a4
10,193
py
Python
huaweicloud-sdk-gaussdb/huaweicloudsdkgaussdb/v3/model/mysql_slow_log_list.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-gaussdb/huaweicloudsdkgaussdb/v3/model/mysql_slow_log_list.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-gaussdb/huaweicloudsdkgaussdb/v3/model/mysql_slow_log_list.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class MysqlSlowLogList: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key i...
24.740291
202
0.56323
0f544fa217dbb47fd46f309a91d0058cdc68b075
11,681
py
Python
concourse/pipelines/gen_pipeline.py
liang0/gpdb
b786d63a3cb93eafd0464199c436adafc2e64501
[ "PostgreSQL", "Apache-2.0" ]
1
2022-03-07T02:51:44.000Z
2022-03-07T02:51:44.000Z
concourse/pipelines/gen_pipeline.py
liang0/gpdb
b786d63a3cb93eafd0464199c436adafc2e64501
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
concourse/pipelines/gen_pipeline.py
liang0/gpdb
b786d63a3cb93eafd0464199c436adafc2e64501
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # ---------------------------------------------------------------------- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF lic...
41.130282
149
0.601404
51d2b4ce4674836786addf12e054db4eb5363a7c
2,462
py
Python
models/CVAE.py
PeterJaq/optical_film_toolbox
0e2d2bfa5f1f93d405a2f25ee50e51771be777a5
[ "Apache-2.0" ]
4
2020-07-05T12:35:45.000Z
2022-03-17T18:43:04.000Z
models/CVAE.py
PeterJaq/optical_film_toolbox
0e2d2bfa5f1f93d405a2f25ee50e51771be777a5
[ "Apache-2.0" ]
null
null
null
models/CVAE.py
PeterJaq/optical_film_toolbox
0e2d2bfa5f1f93d405a2f25ee50e51771be777a5
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf class CVAE(tf.keras.Model): """Convolutional variational autoencoder.""" def __init__(self, latent_dim): super(CVAE, self).__init__() self.latent_dim = latent_dim self.encoder = tf.keras.Sequential( [ tf.keras.layers.InputLayer(input_shape=(28, 28, 1)), ...
32.394737
78
0.628351
e933abe906bbcbb59ad5ae882823135c3aec08d6
875
py
Python
frigate/models.py
czipis/frigate
0d3b99fafb9804b69913cf8a5490668a7077fedf
[ "MIT" ]
4,083
2019-02-27T04:07:28.000Z
2022-03-31T23:47:08.000Z
frigate/models.py
czipis/frigate
0d3b99fafb9804b69913cf8a5490668a7077fedf
[ "MIT" ]
1,817
2019-03-06T01:28:33.000Z
2022-03-31T22:04:56.000Z
frigate/models.py
czipis/frigate
0d3b99fafb9804b69913cf8a5490668a7077fedf
[ "MIT" ]
538
2019-02-27T04:07:35.000Z
2022-03-31T23:47:17.000Z
from numpy import unique from peewee import * from playhouse.sqlite_ext import * class Event(Model): id = CharField(null=False, primary_key=True, max_length=30) label = CharField(index=True, max_length=20) camera = CharField(index=True, max_length=20) start_time = DateTimeField() end_time = DateTi...
29.166667
63
0.705143
dad2a110f5c778ede1dee6032ea8f6d085f72b8b
21,753
py
Python
tf_pose/estimator.py
dengseng/odroid-xu4-pose-based-action-recognition
7458023f3663d52f4a0b97a9ad0488c6e6eadd43
[ "Apache-2.0" ]
39
2019-06-12T06:56:21.000Z
2022-03-29T11:07:59.000Z
tf_pose/estimator.py
dengseng/odroid-xu4-pose-based-action-recognition
7458023f3663d52f4a0b97a9ad0488c6e6eadd43
[ "Apache-2.0" ]
9
2020-09-25T22:32:02.000Z
2022-02-09T23:45:10.000Z
mysite/pose/estimator.py
jaykang-heo/poseAnalysis
34cfac4a889e2c973651c1c07740ea0908542d68
[ "MIT" ]
25
2020-01-11T22:25:36.000Z
2022-01-23T14:43:51.000Z
import logging import math import slidingwindow as sw import cv2 import numpy as np import tensorflow as tf import time from tf_pose import common from tf_pose.common import CocoPart from tf_pose.tensblur.smoother import Smoother try: from tf_pose.pafprocess import pafprocess except ModuleNotFoundError as e: ...
38.500885
142
0.565163
6d722b2e1dddefd9994430418bef0270389a906f
675
py
Python
lsql/judge/templatetags/random_tags.py
Dashito14/lsql
803abb14290aabfc2f33129f01aca87c6caac247
[ "MIT" ]
null
null
null
lsql/judge/templatetags/random_tags.py
Dashito14/lsql
803abb14290aabfc2f33129f01aca87c6caac247
[ "MIT" ]
null
null
null
lsql/judge/templatetags/random_tags.py
Dashito14/lsql
803abb14290aabfc2f33129f01aca87c6caac247
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright Enrique Martín <emartinm@ucm.es> 2021 Custom tags for generating random values to be used in templates. """ import random import string from django import template register = template.Library() # Symbols that can appear in a random ID __ALPHABET = string.ascii_lowercase + stri...
24.107143
96
0.711111
583e7b641751e9dc7d60a5d138e7e2ff4ca3fd85
3,302
py
Python
milvus/client/utils.py
ireneontheway5/pymilvus
b812449a98602b4370b3b3430bdeb18b24035e53
[ "Apache-2.0" ]
null
null
null
milvus/client/utils.py
ireneontheway5/pymilvus
b812449a98602b4370b3b3430bdeb18b24035e53
[ "Apache-2.0" ]
null
null
null
milvus/client/utils.py
ireneontheway5/pymilvus
b812449a98602b4370b3b3430bdeb18b24035e53
[ "Apache-2.0" ]
null
null
null
from urllib.parse import urlparse from ..settings import DefaultConfig as config from .grpc_client.grpc_gen import milvus_pb2 from .grpc_client.grpc_gen.milvus_pb2 import QueryResult as Grpc_Result from ..client.grpc_client.grpc_results import QueryResult from ..client.exceptions import ParamError def set_uri(uri):...
31.75
80
0.621744
8baa91a46d98c9b9e7cf858c0442475ec0fc002f
4,141
py
Python
utils/sampling.py
qq519043202/pde-surrogate
d59ca48a2bd7e1bcb375e11b56def36e163db948
[ "MIT" ]
62
2019-05-26T12:58:17.000Z
2022-03-19T07:07:19.000Z
utils/sampling.py
qq519043202/pde-surrogate
d59ca48a2bd7e1bcb375e11b56def36e163db948
[ "MIT" ]
1
2020-08-26T00:45:27.000Z
2020-08-26T01:11:18.000Z
utils/sampling.py
qq519043202/pde-surrogate
d59ca48a2bd7e1bcb375e11b56def36e163db948
[ "MIT" ]
34
2019-05-28T09:10:39.000Z
2022-03-04T03:04:38.000Z
""" Sampling in spatial domain collocation points boundary points For sure, lots of people will work on how to use different sampling grid to train fully-connected networks. """ import numpy as np import torch from .lhs import lhs class SampleSpatial2d(object): """Uniform grid (y, x) h - height, or y ...
34.508333
90
0.635354
c09340d940c1b2099ebf876e08da5d17f39d70de
1,710
py
Python
creational/abstract_factory.py
usera2tt/design-patterns-written-in-python
04f642ef543b1887bd7247eb5ef307a0357c9a88
[ "MIT" ]
null
null
null
creational/abstract_factory.py
usera2tt/design-patterns-written-in-python
04f642ef543b1887bd7247eb5ef307a0357c9a88
[ "MIT" ]
null
null
null
creational/abstract_factory.py
usera2tt/design-patterns-written-in-python
04f642ef543b1887bd7247eb5ef307a0357c9a88
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod class Element(ABC): """ Concrete class """ def __init__(self, style: str, tag: str = ''): self.style = style self.tag = tag @abstractmethod def render(self, content: str) -> str: raise NotImplementedError class RawElement(Element): de...
21.111111
89
0.635673
3278035ebedafd63a9ce813cb496d1e959871544
259
py
Python
server/api/items.py
samgjones/Find-It-Android
4d26ee328beb52a91783b6bc3eb5d1bc4f696ad7
[ "Apache-2.0" ]
3
2016-12-30T23:29:53.000Z
2016-12-31T03:21:07.000Z
server/api/items.py
samgjones/Find-It-Android
4d26ee328beb52a91783b6bc3eb5d1bc4f696ad7
[ "Apache-2.0" ]
7
2021-02-10T02:25:09.000Z
2022-03-02T14:54:34.000Z
server/api/items.py
samgjones/Find-It-Android
4d26ee328beb52a91783b6bc3eb5d1bc4f696ad7
[ "Apache-2.0" ]
1
2020-12-14T07:19:08.000Z
2020-12-14T07:19:08.000Z
# Define here the models for your scraped items # # See documentation in: # https://docs.scrapy.org/en/latest/topics/items.html import scrapy class ApiItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass
19.923077
53
0.710425
dea3268cdda9b324386c463cf2ce71f5a7495e06
3,093
py
Python
example/settings.py
underscorenygren/slick
c0c38c7b02f41f482b01f145b0348ecbb82952a9
[ "MIT" ]
1
2021-01-27T18:24:55.000Z
2021-01-27T18:24:55.000Z
example/settings.py
underscorenygren/slick
c0c38c7b02f41f482b01f145b0348ecbb82952a9
[ "MIT" ]
null
null
null
example/settings.py
underscorenygren/slick
c0c38c7b02f41f482b01f145b0348ecbb82952a9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Scrapy settings for example project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/top...
33.989011
103
0.774006
6d611fbd1b9102517802467cd78e0286f7e02197
2,877
py
Python
demos/Dockers/demo_complete/ml_processor/ml_multiple_params.py
CogNet-5GPPP/CogNet_services
a08674b52dc238ecbe494ac36fc36614300e8632
[ "Apache-2.0" ]
1
2021-01-10T18:14:48.000Z
2021-01-10T18:14:48.000Z
demos/Dockers/demo_complete/ml_processor/ml_multiple_params.py
CogNet-5GPPP/CogNet_services
a08674b52dc238ecbe494ac36fc36614300e8632
[ "Apache-2.0" ]
null
null
null
demos/Dockers/demo_complete/ml_processor/ml_multiple_params.py
CogNet-5GPPP/CogNet_services
a08674b52dc238ecbe494ac36fc36614300e8632
[ "Apache-2.0" ]
4
2018-03-08T12:29:38.000Z
2021-01-26T08:35:37.000Z
from kafka import KafkaConsumer from kafka import KafkaProducer from kafka.errors import KafkaError import json import random import string import time # Read newpolicy.json with open('policy.json') as json_data: json_policy = json.load(json_data) #Read topicName and conditionName from policy topicName=json_polic...
36.417722
145
0.616962
b4dc8b69d71531194f66022349f3885cadb17190
2,713
py
Python
connect_to_sql.py
Himan10/MusicTerminal
5c48b4db50033baa5c13277364cbc2fa29fd8dbf
[ "MIT" ]
1
2021-07-26T22:33:23.000Z
2021-07-26T22:33:23.000Z
connect_to_sql.py
Himan10/MusicTerminal
5c48b4db50033baa5c13277364cbc2fa29fd8dbf
[ "MIT" ]
null
null
null
connect_to_sql.py
Himan10/MusicTerminal
5c48b4db50033baa5c13277364cbc2fa29fd8dbf
[ "MIT" ]
1
2022-01-04T10:55:41.000Z
2022-01-04T10:55:41.000Z
import os import sys import sqlite3 class SongDatabase: def __enter__(self): return self def __exit__(self, type, value, traceback): self.conn.close() return isinstance(value, TypeError) def __init__(self, dbname: str): self.dbname = dbname+'.db' if not dbname.endswith('....
33.493827
109
0.530041
5ef2ffa79f5a4c238d300e43efae7f9f5a637a70
2,489
py
Python
modules/extrec/pyrecon_nmap.py
OSSSP/pyrecon
8a73fdfcafe59a7e7aa63a0a6839f40931067200
[ "MIT" ]
2
2019-01-21T14:58:21.000Z
2021-03-15T07:41:13.000Z
modules/extrec/pyrecon_nmap.py
sandwichi/pyrecon
6c02cc357e67e49409c1138c888c4ec5a33aafa2
[ "MIT" ]
6
2021-01-20T07:23:25.000Z
2021-06-25T15:41:46.000Z
modules/extrec/pyrecon_nmap.py
OSSSP/pyrecon
8a73fdfcafe59a7e7aa63a0a6839f40931067200
[ "MIT" ]
2
2019-01-21T14:33:13.000Z
2020-12-05T20:46:57.000Z
#!/usr/bin/bash import os import subprocess from modules.lib.colors import colors def pyrecon_nmap(nmap_directory, output_directory): target_subnet_file = os.path.join(output_directory, 'subnets.txt') nmap_input = os.path.join(output_directory, 'external_recon/portscan/open_ports.txt') nmap_output = os.path.join(nm...
50.795918
137
0.719566
dfc9573a946b4a07770f6d9e0d2aca1f62e00385
2,954
py
Python
cnn.py
danielvarga/vat_tf
0b40b256922b7996558504a5d2c3556b5f9fff15
[ "MIT" ]
261
2017-04-14T21:17:03.000Z
2022-03-18T17:32:19.000Z
cnn.py
danielvarga/vat_tf
0b40b256922b7996558504a5d2c3556b5f9fff15
[ "MIT" ]
17
2017-05-03T08:44:24.000Z
2019-12-14T19:30:40.000Z
cnn.py
danielvarga/vat_tf
0b40b256922b7996558504a5d2c3556b5f9fff15
[ "MIT" ]
98
2017-04-15T06:36:08.000Z
2022-02-07T13:56:14.000Z
import tensorflow as tf import numpy import sys, os import layers as L FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_float('keep_prob_hidden', 0.5, "dropout rate") tf.app.flags.DEFINE_float('lrelu_a', 0.1, "lrelu slope") tf.app.flags.DEFINE_boolean('top_bn', False, "") def logit(x, is_training=True, update_batch_st...
56.807692
119
0.698037
13cdc3f7e3fc470276f67792bc3b7305517ec727
469
py
Python
deal/linter/_template.py
m4ta1l/deal
2a8e9bf412b8635b00a2b798dd8802375814a1c8
[ "MIT" ]
1
2020-09-05T13:54:16.000Z
2020-09-05T13:54:16.000Z
deal/linter/_template.py
m4ta1l/deal
2a8e9bf412b8635b00a2b798dd8802375814a1c8
[ "MIT" ]
7
2020-09-05T13:54:28.000Z
2020-11-27T05:59:19.000Z
deal/linter/_template.py
Smirenost/deal
2a8e9bf412b8635b00a2b798dd8802375814a1c8
[ "MIT" ]
null
null
null
# This file is excluded from coverage. # project from deal import ContractError from deal._decorators.base import Base # will be filled from the linter contract = ... func = ... base = Base(validator=contract) # type: ignore if func is not Ellipsis: base.function = func try: base.validate(*args, **kwargs)...
19.541667
64
0.680171
cc3eb07c43cf4ac4554df122ce306a3bf57c2782
5,490
py
Python
baselines/acktr/acktr_cont.py
speedcell4/baselines
c4be964fad7d015d1aa2f76a946c7c8c1025ce61
[ "MIT" ]
null
null
null
baselines/acktr/acktr_cont.py
speedcell4/baselines
c4be964fad7d015d1aa2f76a946c7c8c1025ce61
[ "MIT" ]
null
null
null
baselines/acktr/acktr_cont.py
speedcell4/baselines
c4be964fad7d015d1aa2f76a946c7c8c1025ce61
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf from baselines import logger import baselines.common as common from baselines.common import tf_util as U from baselines.acktr import kfac from baselines.common.filters import ZFilter def pathlength(path): return path["reward"].shape[0] # Loss function that we'll differe...
37.60274
115
0.608561
183b323da24cbc13d8659212c3b5bf2eaf92fb94
276
py
Python
tests/artificial/transf_Integration/trend_ConstantTrend/cycle_5/ar_12/test_artificial_1024_Integration_ConstantTrend_5_12_0.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/artificial/transf_Integration/trend_ConstantTrend/cycle_5/ar_12/test_artificial_1024_Integration_ConstantTrend_5_12_0.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/artificial/transf_Integration/trend_ConstantTrend/cycle_5/ar_12/test_artificial_1024_Integration_ConstantTrend_5_12_0.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 5, transform = "Integration", sigma = 0.0, exog_count = 0, ar_order = 12);
39.428571
171
0.73913
a359660a606987086ece20e70d145d2a3b41b1ce
14,085
py
Python
daily.py
antoniomdk/daily-celtiberian
8ab61a9535a5543cc1c7f947e474a7eb4bd8e030
[ "MIT" ]
4
2019-10-14T18:03:40.000Z
2022-03-17T11:34:11.000Z
daily.py
antoniomdk/daily-celtiberian
8ab61a9535a5543cc1c7f947e474a7eb4bd8e030
[ "MIT" ]
1
2019-10-16T16:24:44.000Z
2019-10-16T16:24:44.000Z
daily.py
antoniomdk/daily-celtiberian
8ab61a9535a5543cc1c7f947e474a7eb4bd8e030
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import re import pickle import glob import os.path import subprocess import json import arrow import click from functools import cmp_to_key from itertools import groupby from halo import Halo from dateutil import parser from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.trans...
33.858173
98
0.67547
5781ba02c2627186d61095a8b6f004985a7e66a3
24,110
py
Python
cromwell_tools/cromwell_api.py
kgalens/cromwell-tools
23c756a6c25c67ad4ccfacc6f8cf459bcacdac5f
[ "BSD-3-Clause" ]
null
null
null
cromwell_tools/cromwell_api.py
kgalens/cromwell-tools
23c756a6c25c67ad4ccfacc6f8cf459bcacdac5f
[ "BSD-3-Clause" ]
null
null
null
cromwell_tools/cromwell_api.py
kgalens/cromwell-tools
23c756a6c25c67ad4ccfacc6f8cf459bcacdac5f
[ "BSD-3-Clause" ]
null
null
null
""" TODO: add some module docs TODO: once switched to support only Py3.7+, replace all 'cls' type annotations with the actual Types, rather than using the strings. This in Py3.6(-) is limited by the lack of Postponed Evaluation of Annotations, see: https://www.python.org/dev/peps/pep-0563/ """ import time import io i...
39.076175
119
0.610411
d85aa32c5da616f76675b356404a20a68d559f68
1,416
py
Python
xlsxwriter/test/comparison/test_chart_display_units12.py
Aeon1/XlsxWriter
6871b6c3fe6c294632054ea91f23d9e27068bcc1
[ "BSD-2-Clause-FreeBSD" ]
2
2019-07-25T06:08:09.000Z
2019-11-01T02:33:56.000Z
xlsxwriter/test/comparison/test_chart_display_units12.py
Aeon1/XlsxWriter
6871b6c3fe6c294632054ea91f23d9e27068bcc1
[ "BSD-2-Clause-FreeBSD" ]
13
2019-07-14T00:29:05.000Z
2019-11-26T06:16:46.000Z
xlsxwriter/test/comparison/test_chart_display_units12.py
Aeon1/XlsxWriter
6871b6c3fe6c294632054ea91f23d9e27068bcc1
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
26.222222
79
0.573446
bdbff41a1d33d9265c3ea1ee9f74e373d15d432a
2,388
py
Python
pycipher/util.py
onlykood/pycipher
8f1d7cf3cba4e12171e27d9ce723ad890194de19
[ "MIT" ]
196
2015-01-16T19:09:19.000Z
2022-03-13T16:19:21.000Z
pycipher/util.py
rafaelmessias/pycipher
787eb947a173138869ddd388b5331559e5cd3a5a
[ "MIT" ]
9
2015-10-09T18:07:32.000Z
2021-12-22T12:04:00.000Z
pycipher/util.py
rafaelmessias/pycipher
787eb947a173138869ddd388b5331559e5cd3a5a
[ "MIT" ]
76
2015-02-08T23:17:43.000Z
2021-12-27T04:15:30.000Z
''' some statistics routines for cryptanalysis ''' import math import re def ic(ctext): ''' takes ciphertext, calculates index of coincidence.''' counts = ngram_count(ctext,N=1) icval = 0 for k in counts.keys(): icval += counts[k]*(counts[k]-1) icval /= (len(ctext)*(len(ctext)-1)) retur...
33.633803
99
0.617253
a2a2a79aa05439ecfc1beee53fa27da2eb4a1669
1,121
py
Python
third_party/dashboard/tag_solution.py
nya3jp/icfpc2021
4ed656aa0ecfc697e48430cbb0dca2c6adfc46c9
[ "Apache-2.0" ]
null
null
null
third_party/dashboard/tag_solution.py
nya3jp/icfpc2021
4ed656aa0ecfc697e48430cbb0dca2c6adfc46c9
[ "Apache-2.0" ]
null
null
null
third_party/dashboard/tag_solution.py
nya3jp/icfpc2021
4ed656aa0ecfc697e48430cbb0dca2c6adfc46c9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # Copyright 2021 Team Special Weekend # 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 # # Un...
33.969697
97
0.717217
e2f8f924e9a9254d3d55a4292db5f4fbe4ae42b2
3,057
py
Python
demo.py
hassiweb/mitemp
50eaed19d5fda9d6d642a4e009d54291299ea3c8
[ "MIT" ]
null
null
null
demo.py
hassiweb/mitemp
50eaed19d5fda9d6d642a4e009d54291299ea3c8
[ "MIT" ]
null
null
null
demo.py
hassiweb/mitemp
50eaed19d5fda9d6d642a4e009d54291299ea3c8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Demo file showing how to use the mitemp library.""" import argparse import re import logging import sys from btlewrap import available_backends, BluepyBackend, GatttoolBackend, PygattBackend from mitemp_bt.mitemp_bt_poller import MiTempBtPoller, \ MI_TEMPERATURE, MI_HUMIDITY, MI_BATTERY ...
31.515464
108
0.67648
fe6b01ced4e1704dc945733c200b98ff77e2dac3
2,095
py
Python
homeassistant/components/tapsaff/binary_sensor.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
3
2020-01-21T18:09:09.000Z
2022-01-17T08:06:03.000Z
homeassistant/components/tapsaff/binary_sensor.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
39
2016-12-16T12:40:34.000Z
2017-02-13T17:53:42.000Z
homeassistant/components/tapsaff/binary_sensor.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
6
2020-04-10T06:21:11.000Z
2021-07-01T08:53:38.000Z
"""Support for Taps Affs.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice from homeassistant.const import CONF_NAME import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name_...
25.864198
86
0.67494
442e0a02745c4a2e7cb61804dbf5c38f4e3854cc
5,189
py
Python
tests/unit/test_prestoclient.py
leniartek/trino-admin
05104a0b35bbc4aeca9469b2fc63a21c814a7855
[ "Apache-2.0" ]
19
2019-06-12T13:33:18.000Z
2020-12-18T09:09:22.000Z
tests/unit/test_prestoclient.py
leniartek/trino-admin
05104a0b35bbc4aeca9469b2fc63a21c814a7855
[ "Apache-2.0" ]
19
2019-05-16T13:09:25.000Z
2020-12-04T18:01:39.000Z
tests/unit/test_prestoclient.py
leniartek/trino-admin
05104a0b35bbc4aeca9469b2fc63a21c814a7855
[ "Apache-2.0" ]
15
2019-03-07T16:37:06.000Z
2020-11-12T12:07:46.000Z
# -*- coding: utf-8 -*- # # 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 ...
45.517544
112
0.678358
02d67f60f3f43e9d0dce58e18bd362265a3be382
6,389
py
Python
hanse_ros/hanse_pipefollowing/src/hanse_pipefollowing/cfg/PipeFollowingConfig.py
iti-luebeck/HANSE2012
fd2348823a6a51baf87cd493529f085fb22d65a7
[ "BSD-3-Clause" ]
null
null
null
hanse_ros/hanse_pipefollowing/src/hanse_pipefollowing/cfg/PipeFollowingConfig.py
iti-luebeck/HANSE2012
fd2348823a6a51baf87cd493529f085fb22d65a7
[ "BSD-3-Clause" ]
null
null
null
hanse_ros/hanse_pipefollowing/src/hanse_pipefollowing/cfg/PipeFollowingConfig.py
iti-luebeck/HANSE2012
fd2348823a6a51baf87cd493529f085fb22d65a7
[ "BSD-3-Clause" ]
null
null
null
## ********************************************************* ## ## File autogenerated for the hanse_pipefollowing package ## by the dynamic_reconfigure package. ## Please do not edit. ## ## ********************************************************/ ##********************************************************** ## Soft...
89.985915
3,716
0.659728
ebdea2d94a228905ec9017496cf4c250fa11de4b
28,915
py
Python
eventlet/support/greendns.py
miguelgrinberg/eventlet
f1b63abd6db186c978077499f9670600da599d1a
[ "MIT" ]
1
2018-10-13T15:57:29.000Z
2018-10-13T15:57:29.000Z
eventlet/support/greendns.py
miguelgrinberg/eventlet
f1b63abd6db186c978077499f9670600da599d1a
[ "MIT" ]
null
null
null
eventlet/support/greendns.py
miguelgrinberg/eventlet
f1b63abd6db186c978077499f9670600da599d1a
[ "MIT" ]
1
2019-12-21T10:21:53.000Z
2019-12-21T10:21:53.000Z
'''greendns - non-blocking DNS support for Eventlet ''' # Portions of this code taken from the gogreen project: # http://github.com/slideinc/gogreen # # Copyright (c) 2005-2010 Slide, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
35.96393
101
0.615874
4506ae5029fd61a2a471f0b709d56c8ffe28d3c3
409
py
Python
scripts/download_pin.py
CMUAbstract/POPT-HPCA21
53b5021846690d0f3445428c6380e877ecf7a10e
[ "MIT" ]
8
2021-04-22T19:50:42.000Z
2022-03-16T02:52:16.000Z
scripts/download_pin.py
CMUAbstract/POPT-HPCA21
53b5021846690d0f3445428c6380e877ecf7a10e
[ "MIT" ]
2
2021-07-18T06:07:34.000Z
2022-02-22T09:46:38.000Z
scripts/download_pin.py
CMUAbstract/POPT-HPCA21
53b5021846690d0f3445428c6380e877ecf7a10e
[ "MIT" ]
5
2021-03-01T13:11:44.000Z
2022-02-28T00:06:18.000Z
import os, subprocess subprocess.call('wget http://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-gcc.4.4.7-linux.tar.gz', shell=True) subprocess.call('tar -xvzf pin-2.14-71313-gcc.4.4.7-linux.tar.gz', shell=True) subprocess.call('rm -rf ../pin-2.14; mv pin-2.14-71313-gcc.4.4.7-linux ../pin-2.14...
51.125
135
0.723716
22542236dbf3730f4eb00041731f9328167ca8b1
9,194
py
Python
answer_selection/xnet_plus/hyperparam_grid_search.py
shashiongithub/Document-Modeling-with-External-Information
8db8dc4ab2d9a49af6523742ce9580aa22e12c8e
[ "BSD-2-Clause" ]
null
null
null
answer_selection/xnet_plus/hyperparam_grid_search.py
shashiongithub/Document-Modeling-with-External-Information
8db8dc4ab2d9a49af6523742ce9580aa22e12c8e
[ "BSD-2-Clause" ]
null
null
null
answer_selection/xnet_plus/hyperparam_grid_search.py
shashiongithub/Document-Modeling-with-External-Information
8db8dc4ab2d9a49af6523742ce9580aa22e12c8e
[ "BSD-2-Clause" ]
null
null
null
#################################### # Author: Ronald Cardenas # Date: July 2017 # Project: Document Modeling with External Attention for Sentence Extraction #################################### from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys sy...
40.681416
151
0.654992
9943c6c73edbfc8684845122f6fcc7831819ca02
245
py
Python
deepmux/errors.py
Deep-Mux/deepmux-cli
ff147259ffb1b0bef613f9b15e4e029fb859d797
[ "MIT" ]
4
2020-11-23T18:56:25.000Z
2021-03-19T23:38:24.000Z
deepmux/errors.py
Deep-Mux/deepmux-cli
ff147259ffb1b0bef613f9b15e4e029fb859d797
[ "MIT" ]
null
null
null
deepmux/errors.py
Deep-Mux/deepmux-cli
ff147259ffb1b0bef613f9b15e4e029fb859d797
[ "MIT" ]
null
null
null
class DeepmuxCLIError(Exception): ... class UnknownException(DeepmuxCLIError): ... class LoginRequired(DeepmuxCLIError): ... class NameConflict(DeepmuxCLIError): # 409 ... class NotFound(DeepmuxCLIError): # 404 ...
12.894737
43
0.669388
796dd11a57c9a76e7966ae02bad8e4373ed92d1e
720
py
Python
Exercicios Python/ex084.py
ClaudioSiqueira/Exercicios-Python
128387769b34b7d42aee5c1effda16de21216e10
[ "MIT" ]
null
null
null
Exercicios Python/ex084.py
ClaudioSiqueira/Exercicios-Python
128387769b34b7d42aee5c1effda16de21216e10
[ "MIT" ]
null
null
null
Exercicios Python/ex084.py
ClaudioSiqueira/Exercicios-Python
128387769b34b7d42aee5c1effda16de21216e10
[ "MIT" ]
null
null
null
cont = 0 maior = menor = 0 maior_nome = [] menor_nome = [] while True: name = input('Nome: ') weight = float(input('Peso : ')) if cont == 0: menor = maior = weight elif cont >= 1: if weight > maior: maior = weight maior_nome.append(name) if weight < menor...
24.827586
69
0.552778
f356aded41431a94e363764e421250274c1ed053
8,465
py
Python
inventory/views.py
shoaibsaikat/Django-Office-Management
952aa44c2d3c2f99e91c2ed1aada17ee15fc9eb0
[ "Apache-2.0" ]
null
null
null
inventory/views.py
shoaibsaikat/Django-Office-Management
952aa44c2d3c2f99e91c2ed1aada17ee15fc9eb0
[ "Apache-2.0" ]
null
null
null
inventory/views.py
shoaibsaikat/Django-Office-Management
952aa44c2d3c2f99e91c2ed1aada17ee15fc9eb0
[ "Apache-2.0" ]
null
null
null
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin from django.contrib.auth.decorators import login_required, user_passes_test from django.contrib import messages from django.http import HttpResponse, JsonResponse from django.urls import reverse_lazy from django.views.generic import ListView...
41.495098
125
0.733373
96c5a2dd53872d328bedd7c098ba65cf9739ccbb
22,677
py
Python
nipype/interfaces/fsl/tests/test_preprocess.py
lighthall-lab/nipype-legacy
6c23846aa50c2ce34653f9517d95f02b071dc52d
[ "Apache-2.0" ]
2
2019-01-25T18:20:51.000Z
2019-07-30T20:51:51.000Z
nipype/interfaces/fsl/tests/test_preprocess.py
lighthall-lab/nipype-legacy
6c23846aa50c2ce34653f9517d95f02b071dc52d
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/fsl/tests/test_preprocess.py
lighthall-lab/nipype-legacy
6c23846aa50c2ce34653f9517d95f02b071dc52d
[ "Apache-2.0" ]
2
2018-01-25T19:48:17.000Z
2019-01-25T18:20:52.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from builtins import str # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: from builtins import open, open import os import tempfile from copy import deepcopy import pytest from nipype.utils...
38.566327
132
0.544737
0645dd865c562e2caa3eb4f21891f7dba10b4a57
23,070
py
Python
cupyx/jit/_compile.py
viantirreau/cupy
cafe9af0e974ff88fc6aa43bf106e343a60fb983
[ "MIT" ]
1
2021-06-03T16:51:02.000Z
2021-06-03T16:51:02.000Z
cupyx/jit/_compile.py
viantirreau/cupy
cafe9af0e974ff88fc6aa43bf106e343a60fb983
[ "MIT" ]
null
null
null
cupyx/jit/_compile.py
viantirreau/cupy
cafe9af0e974ff88fc6aa43bf106e343a60fb983
[ "MIT" ]
null
null
null
import ast import collections import inspect import numbers import re import sys import warnings import numpy from cupyx.jit._codeblock import CodeBlock from cupy.core import _kernel from cupyx.jit import _types from cupyx.jit import _typerules _typeclasses = (bool, numpy.bool_, numbers.Number) Result = collection...
37.512195
79
0.604768
fecf46082ead19df64643f2afc87c22ab20bd816
3,069
py
Python
tests/resonances/data/test_astdys.py
apetrov/resonances
50be33536965e6a78371282a2d1803c53f11d112
[ "MIT" ]
4
2015-11-04T11:23:00.000Z
2021-08-04T20:27:42.000Z
tests/resonances/data/test_astdys.py
apetrov/resonances
50be33536965e6a78371282a2d1803c53f11d112
[ "MIT" ]
1
2021-08-04T20:57:22.000Z
2021-08-07T09:17:14.000Z
tests/resonances/data/test_astdys.py
apetrov/resonances
50be33536965e6a78371282a2d1803c53f11d112
[ "MIT" ]
1
2021-08-04T20:49:16.000Z
2021-08-04T20:49:16.000Z
import resonances from resonances.data.astdys import astdys import pytest import numpy as np import pandas as pd from pathlib import Path import shutil @pytest.fixture(autouse=True) def run_around_tests(): resonances.config.set('catalog', 'cache/tests/small.csv') resonances.config.set('astdys.catalog', 'tests...
33
79
0.661127
32cf1b041a4829f5e6884901881939c9c13f0d21
1,677
py
Python
code/style_gan/StyleGAN_PyTorch/torchvision_sunner/transforms/base.py
YuTao0310/deepLearning
cc56ad418881d78d7c42b2fe66aa9542d5df78b2
[ "MIT" ]
89
2019-12-16T09:19:08.000Z
2022-02-27T16:52:07.000Z
code/style_gan/StyleGAN_PyTorch/torchvision_sunner/transforms/base.py
YuTao0310/deepLearning
cc56ad418881d78d7c42b2fe66aa9542d5df78b2
[ "MIT" ]
6
2019-12-19T11:20:25.000Z
2021-06-09T03:13:41.000Z
code/style_gan/StyleGAN_PyTorch/torchvision_sunner/transforms/base.py
YuTao0310/deepLearning
cc56ad418881d78d7c42b2fe66aa9542d5df78b2
[ "MIT" ]
15
2019-11-20T10:54:13.000Z
2021-03-31T05:38:40.000Z
import numpy as np import torch """ This class define the parent class of operation Author: SunnerLi """ class OP(): """ The parent class of each operation The goal of this class is to adapting with different input format """ def work(self, tensor): """ The vir...
34.22449
88
0.582588
0d775f25f23bb9e57f5ef06970e3c34b8b04255d
53,412
py
Python
custom/icds_reports/tests/agg_tests/test_fact_sheet_report.py
roboton/commcare-hq
3ccbe59508d98dd1963ca87cf249dd2df8af8ecc
[ "BSD-3-Clause" ]
null
null
null
custom/icds_reports/tests/agg_tests/test_fact_sheet_report.py
roboton/commcare-hq
3ccbe59508d98dd1963ca87cf249dd2df8af8ecc
[ "BSD-3-Clause" ]
1
2021-06-02T04:45:16.000Z
2021-06-02T04:45:16.000Z
custom/icds_reports/tests/agg_tests/test_fact_sheet_report.py
roboton/commcare-hq
3ccbe59508d98dd1963ca87cf249dd2df8af8ecc
[ "BSD-3-Clause" ]
null
null
null
from datetime import datetime from django.test.testcases import TestCase from custom.icds_reports.const import AADHAR_SEEDED_BENEFICIARIES from custom.icds_reports.views import FactSheetsReport from custom.icds_reports.utils import get_location_level class TestFactSheetReportMaternalAndChildNutritionICDS(TestCase): ...
39.01534
112
0.444432
fb7d6d23c5f0e2f0d9d55dbef7906f2e368fa462
646
py
Python
example/zygosity2-missing.py
argriffing/hmmus
c91696735eed420bbf13b3cb177d3a652efaff69
[ "MIT" ]
9
2015-02-05T15:58:29.000Z
2017-11-18T09:25:34.000Z
example/zygosity2-missing.py
argriffing/hmmus
c91696735eed420bbf13b3cb177d3a652efaff69
[ "MIT" ]
null
null
null
example/zygosity2-missing.py
argriffing/hmmus
c91696735eed420bbf13b3cb177d3a652efaff69
[ "MIT" ]
null
null
null
""" Analyze a fasta file with missing data using two-state HMM. """ import numpy as np from hmmus import hmm from hmmus import zygohelper # state 0: homozygous and missing # state 1: heterozygous # emission 0: ACGT # emission 1: MRWSYK # missing data: N g_letter_to_emission = { 'A':0, 'C':0, 'G':0, 'T':0, ...
19.575758
76
0.602167
40abf7b9e3d615115f4cb7c3065305f48dd4fabb
7,034
py
Python
speedy/test_recall.py
microsoft/SpeedyRec
1186120f8c5ee8c904676bb2f19892d064c984e6
[ "MIT" ]
23
2021-03-29T03:08:27.000Z
2022-01-19T06:41:19.000Z
speedy/test_recall.py
microsoft/SpeedyRec
1186120f8c5ee8c904676bb2f19892d064c984e6
[ "MIT" ]
3
2021-11-29T04:03:38.000Z
2022-01-19T08:57:54.000Z
speedy/test_recall.py
microsoft/SpeedyRec
1186120f8c5ee8c904676bb2f19892d064c984e6
[ "MIT" ]
2
2021-04-13T07:26:32.000Z
2021-09-13T12:16:50.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import math import numpy as np import hnswlib import random import os import torch import logging from tqdm import tqdm from .test_auc import load_model from .infer_news_vecs import pad_to_fix_len def get_day_item(data_dir, date, news_index, pad...
37.216931
118
0.627666
07dcefeed9d77fa9495e8deb7ef69b2fc49c8532
251
py
Python
my_blog_project/views.py
nitinkumar388/Django-Blog-Web-Project
6c3d09b342645701063b1e66523e77f62bed9db3
[ "MIT" ]
null
null
null
my_blog_project/views.py
nitinkumar388/Django-Blog-Web-Project
6c3d09b342645701063b1e66523e77f62bed9db3
[ "MIT" ]
null
null
null
my_blog_project/views.py
nitinkumar388/Django-Blog-Web-Project
6c3d09b342645701063b1e66523e77f62bed9db3
[ "MIT" ]
null
null
null
from django.http.response import HttpResponse from django.http import HttpResponse from django.shortcuts import HttpResponseRedirect from django.urls import reverse def index(request): return HttpResponseRedirect(reverse('App_Blog:blog_list'))
25.1
62
0.832669
85ebea1745148762b4efe2dd26f7aa7622043393
823
py
Python
tests/test_partfile.py
jseppanen/disco
23ef8badfc7c539672e8834875d9908974b646dc
[ "BSD-3-Clause" ]
2
2016-05-09T17:03:08.000Z
2016-07-19T11:27:54.000Z
tests/test_partfile.py
jseppanen/disco
23ef8badfc7c539672e8834875d9908974b646dc
[ "BSD-3-Clause" ]
null
null
null
tests/test_partfile.py
jseppanen/disco
23ef8badfc7c539672e8834875d9908974b646dc
[ "BSD-3-Clause" ]
null
null
null
from disco.test import DiscoJobTestFixture, DiscoTestCase from collections import defaultdict class PartitionFileTestCase(DiscoJobTestFixture, DiscoTestCase): inputs = ['%s:%s' % i for x in xrange(10) for i in zip([x] * 10, range(x, x + 10))] def getdata(self, path): return '%s\n' % path...
27.433333
64
0.616039