hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a023c7989fcec81b1dff14361d4088348f987e7 | 10,473 | py | Python | release/scripts/startup/bl_ui/properties_material_gpencil.py | PrototypeNM1/blender | 4e4c5afdd830678fd99416119345059e87ee3425 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/startup/bl_ui/properties_material_gpencil.py | PrototypeNM1/blender | 4e4c5afdd830678fd99416119345059e87ee3425 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/startup/bl_ui/properties_material_gpencil.py | PrototypeNM1/blender | 4e4c5afdd830678fd99416119345059e87ee3425 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 35.381757 | 119 | 0.639454 |
4a023dead2ccb832ec2579e4d7e726aba35d92cb | 2,580 | py | Python | docs/examples/add-to-your-application/python/app/data_filtering.py | lafrech/oso | f89ae9d95678b68697c6dbfc736ac14ee89b09b8 | [
"Apache-2.0"
] | null | null | null | docs/examples/add-to-your-application/python/app/data_filtering.py | lafrech/oso | f89ae9d95678b68697c6dbfc736ac14ee89b09b8 | [
"Apache-2.0"
] | null | null | null | docs/examples/add-to-your-application/python/app/data_filtering.py | lafrech/oso | f89ae9d95678b68697c6dbfc736ac14ee89b09b8 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from .routes import serialize, app
from . import models
from oso import Oso
from polar.data.adapter.sqlalchemy_adapter import SqlAlchemyAdapter
from sqlalchemy import Column, String, Boolean
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from ... | 26.597938 | 88 | 0.683333 |
4a023e4212dc4278ab34881fe728d3c70af72b9a | 35,204 | py | Python | mesonbuild/dependencies/misc.py | nostream/meson | d5a6ab31bfbcec9838805c598be75abb036aff87 | [
"Apache-2.0"
] | null | null | null | mesonbuild/dependencies/misc.py | nostream/meson | d5a6ab31bfbcec9838805c598be75abb036aff87 | [
"Apache-2.0"
] | null | null | null | mesonbuild/dependencies/misc.py | nostream/meson | d5a6ab31bfbcec9838805c598be75abb036aff87 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013-2017 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agre... | 39.422172 | 121 | 0.565049 |
4a023e72f4555f5a218ddf45262c30e7294f6672 | 14,267 | py | Python | plugins/modules/oci_opsi_database_configuration_facts.py | LaudateCorpus1/oci-ansible-collection | 2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_opsi_database_configuration_facts.py | LaudateCorpus1/oci-ansible-collection | 2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_opsi_database_configuration_facts.py | LaudateCorpus1/oci-ansible-collection | 2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2020, 2022 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 38.874659 | 159 | 0.626691 |
4a024028c1193698f2edf0c6b1279a0fd8b0f65c | 1,252 | py | Python | github_trending_bot/spiders/GithubTrendingRepo.py | Pavneet-Sing/github_trending_bot | 76eb2a98078509521ffac266e01b1997f475d045 | [
"MIT"
] | null | null | null | github_trending_bot/spiders/GithubTrendingRepo.py | Pavneet-Sing/github_trending_bot | 76eb2a98078509521ffac266e01b1997f475d045 | [
"MIT"
] | null | null | null | github_trending_bot/spiders/GithubTrendingRepo.py | Pavneet-Sing/github_trending_bot | 76eb2a98078509521ffac266e01b1997f475d045 | [
"MIT"
] | 2 | 2021-07-05T05:02:06.000Z | 2021-12-16T08:47:29.000Z | # -*- coding: utf-8 -*-
import scrapy
from scrapy.linkextractors.lxmlhtml import LxmlLinkExtractor
class GithubtrendingrepoSpider(scrapy.Spider):
name = 'GithubTrendingRepo'
allowed_domains = ['github.com/trending/']
start_urls = ['http://github.com/trending//']
def parse(self, response):
# prin... | 40.387097 | 177 | 0.652556 |
4a02403359f9362c8a53f41a51b7890857e59388 | 1,219 | py | Python | MainPalindrome.py | PBHotdog/palindromecheck | 2bc96a7383ca13d3a8c801cfad515f4ef4613383 | [
"BSD-2-Clause"
] | null | null | null | MainPalindrome.py | PBHotdog/palindromecheck | 2bc96a7383ca13d3a8c801cfad515f4ef4613383 | [
"BSD-2-Clause"
] | null | null | null | MainPalindrome.py | PBHotdog/palindromecheck | 2bc96a7383ca13d3a8c801cfad515f4ef4613383 | [
"BSD-2-Clause"
] | null | null | null | # Start of the top of the program, hello!
'''
check_palindrome checks to see if the word, inverted, is equal to the word regularly
[::-1] is using a slice to check the inverted word
'''
def check_palindrome(user_input):
if str(user_input) == str(user_input)[::-1]:
print("Congrats! (" + user_input + ") i... | 30.475 | 103 | 0.664479 |
4a02414efa3101b2e66b993df5178062ffbc827a | 540 | py | Python | podcasts/migrations/0005_auto_20180121_1541.py | GrumpyAny/podcasti.si | d446e9e91791886a16b5a33d8f8ec7b2b32ba6ed | [
"MIT"
] | 5 | 2018-01-22T07:12:15.000Z | 2020-12-05T06:06:32.000Z | podcasts/migrations/0005_auto_20180121_1541.py | GrumpyAny/podcasti.si | d446e9e91791886a16b5a33d8f8ec7b2b32ba6ed | [
"MIT"
] | 288 | 2018-01-22T09:22:27.000Z | 2022-03-30T09:13:39.000Z | podcasts/migrations/0005_auto_20180121_1541.py | GrumpyAny/podcasti.si | d446e9e91791886a16b5a33d8f8ec7b2b32ba6ed | [
"MIT"
] | 4 | 2018-01-22T08:34:20.000Z | 2021-01-06T11:07:30.000Z | # Generated by Django 2.0.1 on 2018-01-21 15:41
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('podcasts', '0004_stats'),
]
operations = [
migrations.RemoveField(
model_name='stats',
... | 22.5 | 79 | 0.594444 |
4a0241604c8b02f60fc79a957ec8495bc8c9618f | 1,154 | py | Python | examples/hansen2011.py | mholdg16/py-mdptools | ae986edc2097e97cb73331d66f0051ca9f5bd15c | [
"MIT"
] | 1 | 2021-12-15T13:22:48.000Z | 2021-12-15T13:22:48.000Z | examples/hansen2011.py | mholdg16/py-mdptools | ae986edc2097e97cb73331d66f0051ca9f5bd15c | [
"MIT"
] | 2 | 2021-11-09T23:43:48.000Z | 2021-11-13T20:41:12.000Z | examples/hansen2011.py | mholdg16/py-mdptools | ae986edc2097e97cb73331d66f0051ca9f5bd15c | [
"MIT"
] | null | null | null | from mdptools import MarkovDecisionProcess as MDP
from mdptools.set_methods import conflicting_transitions
from helpers import at_root, display_graph, display_dot
from mdptools.utils import highlight
# %%
m1 = MDP(
[
("a", "s0", {"s1": 0.2, "s2": 0.8}),
("b", "s0", {"s2": 0.7, "s3": 0.3}),
... | 23.08 | 72 | 0.516464 |
4a0241841244e33389f5f0af1aa071880cee0e2f | 412 | py | Python | venv/Scripts/pip-script.py | hardik0899/MyTextEditor | ab1b1816215cb3e7fc5ca517f4eaeaa38f8d3220 | [
"Apache-2.0"
] | 2 | 2019-04-07T08:03:00.000Z | 2021-04-09T18:30:32.000Z | venv/Scripts/pip-script.py | hardik0899/MyTextEditor | ab1b1816215cb3e7fc5ca517f4eaeaa38f8d3220 | [
"Apache-2.0"
] | 1 | 2020-07-01T16:29:03.000Z | 2020-07-01T16:29:03.000Z | venv/Scripts/pip-script.py | hardik0899/MyTextEditor | ab1b1816215cb3e7fc5ca517f4eaeaa38f8d3220 | [
"Apache-2.0"
] | null | null | null | #!C:\Users\Nanak\PycharmProjects\MyEditor\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[... | 31.692308 | 69 | 0.669903 |
4a024261d6d358d938507731019e6f7ded40f61f | 745 | py | Python | src/urls.py | rcaballero218/turtlenotes-project | 506971227ccfcaac7b6520e20ff8f50f1e9e08de | [
"Unlicense"
] | null | null | null | src/urls.py | rcaballero218/turtlenotes-project | 506971227ccfcaac7b6520e20ff8f50f1e9e08de | [
"Unlicense"
] | null | null | null | src/urls.py | rcaballero218/turtlenotes-project | 506971227ccfcaac7b6520e20ff8f50f1e9e08de | [
"Unlicense"
] | null | null | null | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
urlpatterns = [
url(r'^$', 'newsletter.views.home', name='home'),
url(r'^contact/$', 'newsletter.views.contact', name='contact'),
url(r'^about/$', 'src.views.about'... | 33.863636 | 79 | 0.716779 |
4a0242ad2800f367e79fcd9e66a2bfb07eabb6ae | 48,921 | py | Python | ScriptResearch/entoforms-read-only/addons/object_entoform.py | kellpossible/VoxelEditor | 5ce37e419b8b98f31d4c78ffcb14415256f475e9 | [
"MIT"
] | 3 | 2017-07-15T14:51:07.000Z | 2018-07-13T22:42:34.000Z | ScriptResearch/entoforms-read-only/addons/object_entoform.py | kellpossible/VoxelEditor | 5ce37e419b8b98f31d4c78ffcb14415256f475e9 | [
"MIT"
] | null | null | null | ScriptResearch/entoforms-read-only/addons/object_entoform.py | kellpossible/VoxelEditor | 5ce37e419b8b98f31d4c78ffcb14415256f475e9 | [
"MIT"
] | null | null | null | # Entoform.py Copyright (C) 2011, Dolf Veenvliet
#
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at ... | 29.452739 | 460 | 0.598128 |
4a0242f7830a95375ee89d99185a219d87ab4b01 | 615 | py | Python | OA/image/migrations/0001_initial.py | CircularWorld/AutoOffice | 052b95e094ed8790abb9bf22683006d8f3307ee4 | [
"Apache-2.0"
] | null | null | null | OA/image/migrations/0001_initial.py | CircularWorld/AutoOffice | 052b95e094ed8790abb9bf22683006d8f3307ee4 | [
"Apache-2.0"
] | null | null | null | OA/image/migrations/0001_initial.py | CircularWorld/AutoOffice | 052b95e094ed8790abb9bf22683006d8f3307ee4 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.12 on 2020-09-22 06:27
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Images',
fields=[
('id', models.AutoField(... | 25.625 | 114 | 0.569106 |
4a024335182116f840c27c8e518ebf7578e7577e | 465 | py | Python | authlib/jose/rfc7516/__init__.py | minddistrict/authlib | 7bfd5590cc365803633c56e784b43494589abff2 | [
"BSD-3-Clause"
] | 3,172 | 2017-11-11T05:54:14.000Z | 2022-03-31T23:59:59.000Z | authlib/jose/rfc7516/__init__.py | minddistrict/authlib | 7bfd5590cc365803633c56e784b43494589abff2 | [
"BSD-3-Clause"
] | 397 | 2017-11-11T02:49:06.000Z | 2022-03-31T21:02:37.000Z | authlib/jose/rfc7516/__init__.py | minddistrict/authlib | 7bfd5590cc365803633c56e784b43494589abff2 | [
"BSD-3-Clause"
] | 387 | 2017-11-18T08:59:56.000Z | 2022-03-15T18:37:37.000Z | """
authlib.jose.rfc7516
~~~~~~~~~~~~~~~~~~~~~
This module represents a direct implementation of
JSON Web Encryption (JWE).
https://tools.ietf.org/html/rfc7516
"""
from .jwe import JsonWebEncryption
from .models import JWEAlgorithm, JWEAlgorithmWithTagAwareKeyAgreement, JWEEncAlgorithm, JWEZipAlg... | 24.473684 | 104 | 0.72043 |
4a02435e80add7291637473c683a7b0282955d82 | 888 | py | Python | sandbox/extract-with-median-count.py | maarten1983/khmer | 417aaa57f0659685c01887a6910de1c08d0a73e5 | [
"BSD-3-Clause"
] | 1 | 2019-11-02T15:12:44.000Z | 2019-11-02T15:12:44.000Z | sandbox/extract-with-median-count.py | ibest/khmer | fbc307abd64363b329745709846d77444ce0c025 | [
"BSD-3-Clause"
] | null | null | null | sandbox/extract-with-median-count.py | ibest/khmer | fbc307abd64363b329745709846d77444ce0c025 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python2
import screed
import sys
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument('min_count', type=int)
parser.add_argument('max_count', type=int)
parser.add_argument('filenames', nargs='+')
args = parser.parse_args()
min_count = args.min_co... | 27.75 | 83 | 0.600225 |
4a02440f55e2f35bef4da0ecebfb1bb0748401dc | 12,684 | py | Python | fairseq/criterions/label_smoothed_cross_entropy.py | mcao610/off-policy-RL-for-text-gen | cbc6b2172f7bcf14adf97cdce4aa71cc2902a441 | [
"MIT"
] | null | null | null | fairseq/criterions/label_smoothed_cross_entropy.py | mcao610/off-policy-RL-for-text-gen | cbc6b2172f7bcf14adf97cdce4aa71cc2902a441 | [
"MIT"
] | null | null | null | fairseq/criterions/label_smoothed_cross_entropy.py | mcao610/off-policy-RL-for-text-gen | cbc6b2172f7bcf14adf97cdce4aa71cc2902a441 | [
"MIT"
] | null | null | null | # 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.
import math
import torch
from fairseq import metrics, utils
from fairseq.criterions import FairseqCriterion, register_criterion
def label_s... | 46.632353 | 127 | 0.554636 |
4a02446a019683903c53916a7ce7690861e27406 | 6,976 | py | Python | lib/matplotlib/tests/test_simplification.py | stefanv/matplotlib | 2c6c3695ef989ec86b7c43740462ef992685022f | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2016-08-09T14:14:42.000Z | 2016-08-09T14:14:42.000Z | lib/matplotlib/tests/test_simplification.py | stefanv/matplotlib | 2c6c3695ef989ec86b7c43740462ef992685022f | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/tests/test_simplification.py | stefanv/matplotlib | 2c6c3695ef989ec86b7c43740462ef992685022f | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | import numpy as np
import matplotlib
from matplotlib.testing.decorators import image_comparison, knownfailureif, cleanup
import matplotlib.pyplot as plt
from pylab import *
import numpy as np
from matplotlib import patches, path, transforms
from nose.tools import raises
import cStringIO
nan = np.nan
Path = path.Path... | 32 | 122 | 0.673308 |
4a0244a22d6a301d1db6de1d2e15b3f1f36be1d4 | 1,341 | py | Python | migrations/versions/27a721daab2e_renamed_email_to_login_in_user_table.py | pombredanne/vulncode-db | bffd1467df54d98e5271ec977330365d5879b60d | [
"Apache-2.0"
] | 592 | 2019-03-05T13:39:57.000Z | 2022-03-31T14:52:58.000Z | migrations/versions/27a721daab2e_renamed_email_to_login_in_user_table.py | pombredanne/vulncode-db | bffd1467df54d98e5271ec977330365d5879b60d | [
"Apache-2.0"
] | 91 | 2019-04-05T20:45:26.000Z | 2021-12-24T02:10:50.000Z | migrations/versions/27a721daab2e_renamed_email_to_login_in_user_table.py | pombredanne/vulncode-db | bffd1467df54d98e5271ec977330365d5879b60d | [
"Apache-2.0"
] | 84 | 2019-03-31T03:55:56.000Z | 2022-01-03T13:33:44.000Z | """renamed email to login in user table
Revision ID: 27a721daab2e
Revises: 9d370f33f1a0
Create Date: 2020-12-04 16:14:19.390278
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = "27a721daab2e"
down_revision = "9d370f33f1a0"
br... | 27.9375 | 90 | 0.651752 |
4a0246373b96f3200d7456d87614e2d9c271b45b | 583 | py | Python | profiles_api/views.py | paulofs321/profiles-rest-api | 24cf74ae97c56b8349048408876dfdddee417bc4 | [
"MIT"
] | null | null | null | profiles_api/views.py | paulofs321/profiles-rest-api | 24cf74ae97c56b8349048408876dfdddee417bc4 | [
"MIT"
] | null | null | null | profiles_api/views.py | paulofs321/profiles-rest-api | 24cf74ae97c56b8349048408876dfdddee417bc4 | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
class HelloApiView(APIView):
"""Test API View"""
def get(self, request, format=None):
"""Returns a list of APIView features"""
an_apiview = [
"Uses HTTP methods as function (get, post, patch, put... | 32.388889 | 76 | 0.634648 |
4a0246be39d7f4902006e7ac51644303e8f90fba | 13,298 | py | Python | ml3d/tf/pipelines/semantic_segmentation.py | amirshal/Open3D-ML | 5549444280ca02f3881cdf06f15c1ed06efb7389 | [
"MIT"
] | null | null | null | ml3d/tf/pipelines/semantic_segmentation.py | amirshal/Open3D-ML | 5549444280ca02f3881cdf06f15c1ed06efb7389 | [
"MIT"
] | null | null | null | ml3d/tf/pipelines/semantic_segmentation.py | amirshal/Open3D-ML | 5549444280ca02f3881cdf06f15c1ed06efb7389 | [
"MIT"
] | null | null | null | import numpy as np
import logging
import sys
import warnings
from tqdm import tqdm
from datetime import datetime
from os.path import exists, join, isfile, dirname, abspath
from pathlib import Path
import tensorflow as tf
from .base_pipeline import BasePipeline
from ..modules.losses import SemSegLoss
from ..modules.m... | 37.994286 | 80 | 0.530005 |
4a0246f73d7744cc380bcb74720e378a56a1d9d6 | 3,794 | py | Python | scripts/gv_record.py | DavidSlayback/gym-gridverse | b8916576a92489c030fb2c2060598c7f473f19f2 | [
"MIT"
] | 6 | 2020-10-15T14:45:11.000Z | 2021-02-20T12:11:32.000Z | scripts/gv_record.py | DavidSlayback/gym-gridverse | b8916576a92489c030fb2c2060598c7f473f19f2 | [
"MIT"
] | 5 | 2021-01-20T15:34:29.000Z | 2022-03-18T18:52:53.000Z | scripts/gv_record.py | DavidSlayback/gym-gridverse | b8916576a92489c030fb2c2060598c7f473f19f2 | [
"MIT"
] | 2 | 2021-01-11T18:48:49.000Z | 2021-01-26T15:45:38.000Z | #!/usr/bin/env python
from __future__ import annotations
import argparse
import itertools as itt
import sys
from typing import Tuple
import imageio
import numpy.random as rnd
from gym_gridverse.envs.inner_env import InnerEnv
from gym_gridverse.envs.yaml.factory import factory_env_from_yaml
from gym_gridverse.observa... | 27.492754 | 78 | 0.651292 |
4a024702fdea77636ffb295948dc88c5fa1aab32 | 27 | py | Python | doctorbot/fb_doctor_chatbot/__init__.py | zuxfoucault/DoctorBot_demo | 82e24078da4d2e6caba728b959812401109e014d | [
"MIT"
] | 1 | 2020-09-24T07:26:14.000Z | 2020-09-24T07:26:14.000Z | doctorbot/fb_doctor_chatbot/__init__.py | lintzuhsiang/Doctorbot | 6be98bbf380d14bb789d30a137ded3b51b3f31fd | [
"MIT"
] | null | null | null | doctorbot/fb_doctor_chatbot/__init__.py | lintzuhsiang/Doctorbot | 6be98bbf380d14bb789d30a137ded3b51b3f31fd | [
"MIT"
] | null | null | null | # from .views import Doctor | 27 | 27 | 0.777778 |
4a0247040ed819a7251a7fa9adc3b61848d3e704 | 9,531 | py | Python | sdk/python/pulumi_azure_native/kusto/v20200614/get_event_grid_data_connection.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/kusto/v20200614/get_event_grid_data_connection.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/kusto/v20200614/get_event_grid_data_connection.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 41.620087 | 282 | 0.673382 |
4a024790c2c28f3a23745cd643c6e7acd943483c | 459 | py | Python | test/test_kmer.py | vladsaveliev/sequana | f6ee7fa7fb47ec179ceedf24684ba861a244656d | [
"BSD-3-Clause"
] | 138 | 2016-07-13T06:24:45.000Z | 2022-03-28T13:12:03.000Z | test/test_kmer.py | vladsaveliev/sequana | f6ee7fa7fb47ec179ceedf24684ba861a244656d | [
"BSD-3-Clause"
] | 655 | 2016-03-10T17:33:40.000Z | 2022-03-30T16:10:45.000Z | test/test_kmer.py | vladsaveliev/sequana | f6ee7fa7fb47ec179ceedf24684ba861a244656d | [
"BSD-3-Clause"
] | 39 | 2016-11-04T11:40:58.000Z | 2022-03-15T08:12:29.000Z | from sequana.kmer import build_kmer, get_kmer
def test_build_kmer():
res = build_kmer(length=3, letters='GC')
assert len(res) == 8
assert 'CCG' in res
assert 'CCC' in res
assert 'CGC' in res
assert 'CGG' in res
assert 'GCC' in res
assert 'GCG' in res
assert 'GGC' in res
assert... | 20.863636 | 58 | 0.6122 |
4a024931a0297faac188611bfb81ef4c09bd8552 | 1,499 | py | Python | alipay/aop/api/domain/AlipayMarketingToolFengdieEditorQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayMarketingToolFengdieEditorQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayMarketingToolFengdieEditorQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
class AlipayMarketingToolFengdieEditorQueryModel(object):
def __init__(self):
self._activity_id = None
self._redirect_url = None
@property
def activity_id(self):
... | 26.767857 | 75 | 0.618412 |
4a024a5672ab0077d07c276976d32a9abd16c90f | 244 | py | Python | data_acquisition/cf_app_utils/auth/__init__.py | butla/PyDAS | 39df5abbe9563b58da7caaa191b89852fb122ab7 | [
"MIT"
] | 13 | 2016-06-29T13:35:05.000Z | 2021-05-25T09:47:31.000Z | data_acquisition/cf_app_utils/auth/__init__.py | butla/PyDAS | 39df5abbe9563b58da7caaa191b89852fb122ab7 | [
"MIT"
] | 1 | 2016-07-11T23:11:33.000Z | 2016-07-11T23:11:33.000Z | data_acquisition/cf_app_utils/auth/__init__.py | butla/PyDAS | 39df5abbe9563b58da7caaa191b89852fb122ab7 | [
"MIT"
] | 3 | 2017-10-17T15:54:25.000Z | 2022-03-24T01:11:37.000Z | """
Authorization utilities for microservices using JWT tokens.
"""
from .org_check import (UserOrgAccessChecker, NoOrgAccessError, PermissionServiceError,
USER_MANAGEMENT_PATH)
from .utils import get_uaa_key, UaaError
| 30.5 | 87 | 0.75 |
4a024b554d5ace777070ea8d76918b9fb2005d88 | 17,721 | py | Python | test/python/ibmq/test_ibmqjob_states.py | filemaster/qiskit-terra | 8672c407a5a0e34405315f82d5ad5847916e857e | [
"Apache-2.0"
] | null | null | null | test/python/ibmq/test_ibmqjob_states.py | filemaster/qiskit-terra | 8672c407a5a0e34405315f82d5ad5847916e857e | [
"Apache-2.0"
] | null | null | null | test/python/ibmq/test_ibmqjob_states.py | filemaster/qiskit-terra | 8672c407a5a0e34405315f82d5ad5847916e857e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=missing-docstring,broad-except
"""IBMQJob states test-suite."""
import unittest
import time
from context... | 31.758065 | 87 | 0.605045 |
4a024bbbc4c50f790f57c3fecebda41a1eeb1ec6 | 3,312 | py | Python | OAuthBrowser/wait.py | Saadmairaj/OAuthBrowser | 4de8ae83e8ad43f9c6333798d4046a0461a413fe | [
"MIT"
] | 2 | 2020-07-01T15:53:16.000Z | 2021-07-11T10:25:28.000Z | OAuthBrowser/wait.py | Saadmairaj/OAuthBrowser | 4de8ae83e8ad43f9c6333798d4046a0461a413fe | [
"MIT"
] | null | null | null | OAuthBrowser/wait.py | Saadmairaj/OAuthBrowser | 4de8ae83e8ad43f9c6333798d4046a0461a413fe | [
"MIT"
] | null | null | null | import time
import subprocess
from OAuthBrowser.util import threaded
from urllib.parse import urlparse, parse_qs
class Wait:
"""
Wait class for web brower.
"""
def __init__(self, browser, pause_time=0.7):
"""Waits until an event occurs.
Arguments:
browser {[type]} -- give... | 34.5 | 92 | 0.581824 |
4a024e49c4223cddffa4da5dd14580d206619204 | 654 | py | Python | exam_preparation/Lists.py | bozhikovstanislav/Python-Fundamentals | 072fd2c8bc962d20d4c526947349fdeae0bc94a5 | [
"MIT"
] | null | null | null | exam_preparation/Lists.py | bozhikovstanislav/Python-Fundamentals | 072fd2c8bc962d20d4c526947349fdeae0bc94a5 | [
"MIT"
] | null | null | null | exam_preparation/Lists.py | bozhikovstanislav/Python-Fundamentals | 072fd2c8bc962d20d4c526947349fdeae0bc94a5 | [
"MIT"
] | null | null | null | def inc_2(el):
if el % 2 == 0:
return el + 2
return el
def inc_3(el):
if not el % 2 == 0:
return el + 3
return el
data = input()
while not data == 'stop playing':
nums_list = list(map(int, data.split()))
if len(nums_list) == len(set(nums_list)):
nums_list = sorted(l... | 25.153846 | 72 | 0.571865 |
4a024ebbe619af9dafb3caad3f7cdf3399de5839 | 952 | py | Python | lib/galaxy/model/migrate/versions/0151_add_worker_process.py | yvanlebras/galaxy | 6b8489ca866825bcdf033523120a8b24ea6e6342 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/model/migrate/versions/0151_add_worker_process.py | yvanlebras/galaxy | 6b8489ca866825bcdf033523120a8b24ea6e6342 | [
"CC-BY-3.0"
] | 2 | 2017-05-18T16:12:55.000Z | 2022-03-08T12:08:43.000Z | lib/galaxy/model/migrate/versions/0151_add_worker_process.py | yvanlebras/galaxy | 6b8489ca866825bcdf033523120a8b24ea6e6342 | [
"CC-BY-3.0"
] | null | null | null | """
Add table for worker processes
"""
import logging
from sqlalchemy import (
Column,
DateTime,
Integer,
MetaData,
String,
Table,
UniqueConstraint,
)
from galaxy.model.migrate.versions.util import (
create_table,
drop_table,
)
from galaxy.model.orm.now import now
log = logging.g... | 18.666667 | 63 | 0.702731 |
4a024f01a2490ccdf81095b62de9c04f0efa803e | 25,562 | py | Python | scripts/old_scripts/STEP7_ESSAY_1_Descriptive_Statistics.py | nz44/phd_dissertation | cad5220db27e2e4230f2be2b63140a0e2fc877cc | [
"Apache-2.0"
] | null | null | null | scripts/old_scripts/STEP7_ESSAY_1_Descriptive_Statistics.py | nz44/phd_dissertation | cad5220db27e2e4230f2be2b63140a0e2fc877cc | [
"Apache-2.0"
] | null | null | null | scripts/old_scripts/STEP7_ESSAY_1_Descriptive_Statistics.py | nz44/phd_dissertation | cad5220db27e2e4230f2be2b63140a0e2fc877cc | [
"Apache-2.0"
] | null | null | null | ###########################################################################################################
# Generate Descriptive Stats Latex Tables
###########################################################################################################
var_latex_map = {
'const': 'Constant',
'score': 'Ratin... | 55.812227 | 230 | 0.514592 |
4a024f308ea8d0349f56675a715bd7b6c269ca59 | 1,629 | py | Python | tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py | BenRKarl/gapic-generator-python | e4f92bd988a5b955ede88a9a10163010aae825f1 | [
"Apache-2.0"
] | 86 | 2018-09-28T11:46:15.000Z | 2022-03-27T19:25:09.000Z | tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py | BenRKarl/gapic-generator-python | e4f92bd988a5b955ede88a9a10163010aae825f1 | [
"Apache-2.0"
] | 1,054 | 2018-04-19T18:35:05.000Z | 2022-03-30T14:12:38.000Z | tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py | BenRKarl/gapic-generator-python | e4f92bd988a5b955ede88a9a10163010aae825f1 | [
"Apache-2.0"
] | 47 | 2018-04-26T22:08:56.000Z | 2022-03-22T22:18:00.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 30.735849 | 85 | 0.744015 |
4a024f76a8afec5024fb2106e3967f9bd0e73229 | 3,694 | py | Python | tests/markup/test_tag_forcing.py | ReimarBauer/flatland | aeb081f5000a315e08dfed6f2bb9ad166e74f4b1 | [
"MIT"
] | 7 | 2018-10-29T21:17:26.000Z | 2020-03-12T21:32:26.000Z | tests/markup/test_tag_forcing.py | ReimarBauer/flatland | aeb081f5000a315e08dfed6f2bb9ad166e74f4b1 | [
"MIT"
] | 35 | 2018-10-29T21:37:30.000Z | 2021-05-13T07:57:52.000Z | tests/markup/test_tag_forcing.py | ReimarBauer/flatland | aeb081f5000a315e08dfed6f2bb9ad166e74f4b1 | [
"MIT"
] | 6 | 2018-10-29T21:38:40.000Z | 2020-05-25T08:51:13.000Z | from flatland import String
from tests.markup._util import desired_output
schema = String.named(u'element').using(default=u'val').from_defaults
### value
@desired_output(u'html', schema)
def value_bound():
"""<div value="val"></div>"""
@value_bound.genshi
def test_value_bound_genshi():
"""<div form:bind... | 18.47 | 69 | 0.673795 |
4a025194923fc605313b1b0db0a8366b2bea3740 | 5,514 | py | Python | contrib/seeds/makeseeds.py | coinwebfactory/aiascoin | c8741cad5264a2d4c0bbca7813c4f4ad390915ae | [
"MIT"
] | 1 | 2021-02-26T00:23:51.000Z | 2021-02-26T00:23:51.000Z | contrib/seeds/makeseeds.py | coinwebfactory/aiascoin | c8741cad5264a2d4c0bbca7813c4f4ad390915ae | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | coinwebfactory/aiascoin | c8741cad5264a2d4c0bbca7813c4f4ad390915ae | [
"MIT"
] | 4 | 2018-07-30T04:58:29.000Z | 2020-05-26T17:54:59.000Z | #!/usr/bin/env python3
# Copyright (c) 2013-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
NSEEDS=512
MAX_SEEDS_PER_ASN=2
MIN_BLOCKS = 615801
#... | 32.05814 | 186 | 0.566921 |
4a02532273734ab06cc6d3e0c68064319dffad7b | 15,119 | py | Python | nipype/external/cloghandler.py | demianw/nipype | 52d64c30d96ecd94f1833156e28dce32c4f05ebe | [
"BSD-3-Clause"
] | null | null | null | nipype/external/cloghandler.py | demianw/nipype | 52d64c30d96ecd94f1833156e28dce32c4f05ebe | [
"BSD-3-Clause"
] | 2 | 2017-10-05T21:08:38.000Z | 2018-10-09T23:01:23.000Z | nipype/external/cloghandler.py | effigies/nipype | 18fe222557cf3b9627e06b2a66fba589feaca581 | [
"Apache-2.0"
] | 1 | 2016-10-11T19:18:53.000Z | 2016-10-11T19:18:53.000Z | # Copyright 2008 Lowell Alleman
#
# 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 writin... | 45.131343 | 117 | 0.647265 |
4a0253873ad879e7bff11e8d0436c8011b6b20ea | 24 | py | Python | starphish/defaults.py | agraubert/starphish-api | 168406caad185702526c66f7359de182d3c2864b | [
"BSD-3-Clause"
] | null | null | null | starphish/defaults.py | agraubert/starphish-api | 168406caad185702526c66f7359de182d3c2864b | [
"BSD-3-Clause"
] | 1 | 2021-04-20T17:41:19.000Z | 2021-04-20T17:41:19.000Z | starphish/defaults.py | agraubert/starphish-api | 168406caad185702526c66f7359de182d3c2864b | [
"BSD-3-Clause"
] | null | null | null | MAX_CONTENT_LENGTH=4096
| 12 | 23 | 0.916667 |
4a0254cf9dfa41af18c36c0e66531b69bc4bc0a5 | 42,163 | py | Python | code/old_models/variational_inference_DP_topic_ngram_mix_indep_Poisson_distinct_final.py | tkc-morita/variational_inference_DP_mix_HDP_topic_ngram | 95d6c8ab2956501fc82b416bf423ee57fe77c73f | [
"MIT"
] | 4 | 2021-03-27T18:28:23.000Z | 2022-01-10T23:32:29.000Z | code/old_models/variational_inference_DP_topic_ngram_mix_indep_Poisson_distinct_final.py | stannam/variational_inference_DP_mix_HDP_topic_ngram | 95d6c8ab2956501fc82b416bf423ee57fe77c73f | [
"MIT"
] | null | null | null | code/old_models/variational_inference_DP_topic_ngram_mix_indep_Poisson_distinct_final.py | stannam/variational_inference_DP_mix_HDP_topic_ngram | 95d6c8ab2956501fc82b416bf423ee57fe77c73f | [
"MIT"
] | 1 | 2022-01-10T23:45:54.000Z | 2022-01-10T23:45:54.000Z | # coding: utf-8
import numpy as np
import scipy.special as sps
import scipy.misc as spm
import itertools,sys,datetime,os
from logging import getLogger,FileHandler,DEBUG,Formatter
import pandas as pd
# import warnings
logger = getLogger(__name__)
def update_log_handler(log_path):
current_handlers=logger.handlers[:... | 27.702365 | 140 | 0.606005 |
4a0255851d85800038e0c72823698ff66e3e39e3 | 3,520 | py | Python | src/module/nesteddicttools.py | kthewhispers/Nested-Dictionary-Tools-Python | 6d82061d6d736b1a822c0b408ae2f2e9b20b1ab1 | [
"MIT"
] | null | null | null | src/module/nesteddicttools.py | kthewhispers/Nested-Dictionary-Tools-Python | 6d82061d6d736b1a822c0b408ae2f2e9b20b1ab1 | [
"MIT"
] | null | null | null | src/module/nesteddicttools.py | kthewhispers/Nested-Dictionary-Tools-Python | 6d82061d6d736b1a822c0b408ae2f2e9b20b1ab1 | [
"MIT"
] | 1 | 2019-07-02T23:35:46.000Z | 2019-07-02T23:35:46.000Z | '''
MIT License
Copyright (c) 2019 Keith Cronin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... | 34.509804 | 92 | 0.65142 |
4a0255ef54e54ab43755cc7f21826d22eb05c172 | 4,142 | py | Python | src/simmer/tests/test_contrast.py | arjunsavel/SImMer | 71d9bf0bf329f597426ebcd71dd0cda731592ec6 | [
"MIT"
] | null | null | null | src/simmer/tests/test_contrast.py | arjunsavel/SImMer | 71d9bf0bf329f597426ebcd71dd0cda731592ec6 | [
"MIT"
] | 119 | 2020-03-17T20:32:13.000Z | 2022-03-28T17:02:19.000Z | src/simmer/tests/test_contrast.py | arjunsavel/SImMer | 71d9bf0bf329f597426ebcd71dd0cda731592ec6 | [
"MIT"
] | 2 | 2020-03-25T22:23:01.000Z | 2021-07-14T23:45:05.000Z | """
Module to compute contrast curves.
author: @holdengill
isort:skip_file
"""
import yaml
import numpy as np
import scipy as sp
from astropy.stats import SigmaClip
from astropy.stats import sigma_clipped_stats
from astropy.io import fits
import math
from numpy import random
import unittest
from photutils import dat... | 31.142857 | 77 | 0.612989 |
4a02567b5a45463c0d1adb2d8dca56fb23baa301 | 703 | py | Python | test_migrations/runners/unittest.py | swiatekm/django-test-migrations | 628f650d2c076ce8ad44222d1a6c674ded90a48a | [
"MIT"
] | null | null | null | test_migrations/runners/unittest.py | swiatekm/django-test-migrations | 628f650d2c076ce8ad44222d1a6c674ded90a48a | [
"MIT"
] | null | null | null | test_migrations/runners/unittest.py | swiatekm/django-test-migrations | 628f650d2c076ce8ad44222d1a6c674ded90a48a | [
"MIT"
] | null | null | null | from django.test import runner
from test_migrations import settings
class MigrationTestRunnerMixin:
def __init__(self, *args, tags=None, exclude_tags=None, **kwargs):
tags = tags or list()
if settings.MIGRATIONS_TEST_MARKER not in tags:
exclude_tags = set(exclude_tags or list())
... | 33.47619 | 79 | 0.731152 |
4a02572cc8be15835054bff2eb2e19e6382c5c87 | 9,824 | py | Python | generate.py | huez-dev/stylegan2-ada | ecea930ff4a5ad0a0c83f7097bca5680866f517d | [
"BSD-Source-Code"
] | null | null | null | generate.py | huez-dev/stylegan2-ada | ecea930ff4a5ad0a0c83f7097bca5680866f517d | [
"BSD-Source-Code"
] | null | null | null | generate.py | huez-dev/stylegan2-ada | ecea930ff4a5ad0a0c83f7097bca5680866f517d | [
"BSD-Source-Code"
] | null | null | null | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and rel... | 35.985348 | 120 | 0.579601 |
4a025937150593e5fc11350caf5ea66fb06cb50a | 557 | py | Python | env/Lib/site-packages/touch/__init__.py | KaceyHirth/Library-DBMS-System | 40b425ed5c7b46627b7c48724b2d20e7a64cf025 | [
"MIT"
] | 4 | 2022-02-06T00:54:58.000Z | 2022-02-25T12:44:43.000Z | env/Lib/site-packages/touch/__init__.py | KaceyHirth/Library-DBMS-System | 40b425ed5c7b46627b7c48724b2d20e7a64cf025 | [
"MIT"
] | null | null | null | env/Lib/site-packages/touch/__init__.py | KaceyHirth/Library-DBMS-System | 40b425ed5c7b46627b7c48724b2d20e7a64cf025 | [
"MIT"
] | 1 | 2022-02-08T13:43:20.000Z | 2022-02-08T13:43:20.000Z | __all__ = ['touch']
import os
import values
def _fullpath(path):
return os.path.abspath(os.path.expanduser(path))
def _mkdir(path):
if path.find("/") > 0 and not os.path.exists(os.path.dirname(path)):
os.makedirs(os.path.dirname(path))
def _utime(path):
try:
os.utime(path, None)
... | 17.967742 | 72 | 0.583483 |
4a02595bfeed7fe1a670c06335bdebabd8fb14c8 | 15,156 | py | Python | modelica_language/_parser.py | ijknabla/-ModelicaGrammarForPython | db316bd3d6eed984d519bf3160668c72b7fa353d | [
"MIT"
] | 1 | 2019-11-17T12:37:58.000Z | 2019-11-17T12:37:58.000Z | modelica_language/_parser.py | ijknabla/-ModelicaGrammarForPython | db316bd3d6eed984d519bf3160668c72b7fa353d | [
"MIT"
] | null | null | null | modelica_language/_parser.py | ijknabla/-ModelicaGrammarForPython | db316bd3d6eed984d519bf3160668c72b7fa353d | [
"MIT"
] | null | null | null | __all__ = ("Parser",)
from arpeggio import (
Combine,
CrossRef,
EndOfFile,
Not,
OneOrMore,
Optional,
OrderedChoice,
PTNodeVisitor,
ParseTreeNode,
Parser as ArpeggioParser,
ParserPython as ArpeggioPythonParser,
ParsingExpression,
RegExMatch,
Sequence,
StrMatch... | 28.650284 | 78 | 0.590591 |
4a02595cf4f0f270692b3506aced43cba0bac0de | 90 | py | Python | psy/settings/cat.py | cegfdb/IRT | 20fcde3b385bce1644fecab7cdc8bda5beacda03 | [
"MIT"
] | 169 | 2017-08-29T01:35:49.000Z | 2022-03-01T05:03:02.000Z | psy/settings/cat.py | a854367688/pypsy | f055fe1f4901b654d99d9a776152e8192e014f5f | [
"MIT"
] | 8 | 2017-12-05T05:20:35.000Z | 2021-10-03T05:40:45.000Z | psy/settings/cat.py | a854367688/pypsy | f055fe1f4901b654d99d9a776152e8192e014f5f | [
"MIT"
] | 67 | 2017-09-01T04:18:54.000Z | 2022-02-24T08:21:18.000Z | TRIPLETS_PERMUTATION = [[1, 1, 1], [1, 1, 0], [0, 1, 1], [0, 0, 1], [1, 0, 0], [0, 0, 0]]
| 45 | 89 | 0.422222 |
4a025a03f495be083d727741f9da1468d81aa7ac | 14,104 | py | Python | src/VarDACAE/train/trainer.py | scheng1992/Data_Assimilation | b4d43895229205ee2cd16b15ee20beccb33b71d6 | [
"MIT"
] | 1 | 2021-11-25T12:46:48.000Z | 2021-11-25T12:46:48.000Z | src/VarDACAE/train/trainer.py | bugsuse/Data_Assimilation | 2965ccf78951df11f8686282cd6814bae18afde5 | [
"MIT"
] | null | null | null | src/VarDACAE/train/trainer.py | bugsuse/Data_Assimilation | 2965ccf78951df11f8686282cd6814bae18afde5 | [
"MIT"
] | 2 | 2021-03-02T13:29:34.000Z | 2022-03-12T11:01:08.000Z | """Run training for AE"""
import torch
import torch.optim as optim
import numpy as np
import pandas as pd
import pickle
from VarDACAE import ML_utils
from VarDACAE.AEs import Jacobian
from VarDACAE.utils.expdir import init_expdir
from VarDACAE.VarDA.batch_DA import BatchDA
import time
import os
BATCH_MULT = 1
BATCH... | 35.888041 | 132 | 0.58962 |
4a025b8da8c46dcdf6517286541703165331faaa | 12,114 | py | Python | final_mulit_thread.py | h1542462994/4wd | b936e96b0b91fab261120394eedd61aa5e074820 | [
"MIT"
] | 1 | 2020-07-08T05:08:21.000Z | 2020-07-08T05:08:21.000Z | final_mulit_thread.py | h1542462994/4wd | b936e96b0b91fab261120394eedd61aa5e074820 | [
"MIT"
] | null | null | null | final_mulit_thread.py | h1542462994/4wd | b936e96b0b91fab261120394eedd61aa5e074820 | [
"MIT"
] | null | null | null | # -*- coding:UTF-8 -*-
import RPi.GPIO as GPIO
import time
from threading import Thread
class Const:
def __init__(self):
# 超声波引脚定义
self.EchoPin = 0
self.TrigPin = 1
# 小车电机引脚定义
self.IN1 = 20
self.IN2 = 21
self.IN3 = 19
self.IN4 = 26
self.ENA ... | 30.824427 | 92 | 0.560013 |
4a025bb27d33a73fb78047e7a08e1247d8f53558 | 742 | py | Python | packages/mbed-greentea/mbed_greentea/mbed_coverage_api.py | noralsydmp/mbed-os-tools | 5a14958aa49eb5764afba8e1dc3208cae2955cd7 | [
"Apache-2.0"
] | 29 | 2018-11-30T19:45:22.000Z | 2022-03-29T17:02:16.000Z | packages/mbed-greentea/mbed_greentea/mbed_coverage_api.py | noralsydmp/mbed-os-tools | 5a14958aa49eb5764afba8e1dc3208cae2955cd7 | [
"Apache-2.0"
] | 160 | 2018-11-30T21:55:52.000Z | 2022-01-18T10:58:09.000Z | packages/mbed-greentea/mbed_greentea/mbed_coverage_api.py | noralsydmp/mbed-os-tools | 5a14958aa49eb5764afba8e1dc3208cae2955cd7 | [
"Apache-2.0"
] | 73 | 2018-11-30T21:34:41.000Z | 2021-10-02T05:51:40.000Z | """
mbed SDK
Copyright (c) 2011-2016 ARM Limited
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 wr... | 30.916667 | 72 | 0.784367 |
4a025c007445fec590274df61db6a1a334fab314 | 2,176 | py | Python | mockito/__init__.py | kaste/mockito-python | 27e5587ac683262aa883bcb48130ed1a974df517 | [
"MIT"
] | 90 | 2016-04-24T08:10:54.000Z | 2022-03-18T18:04:29.000Z | mockito/__init__.py | kaste/mockito-python | 27e5587ac683262aa883bcb48130ed1a974df517 | [
"MIT"
] | 39 | 2016-05-19T16:16:07.000Z | 2021-12-10T16:57:39.000Z | mockito/__init__.py | kaste/mockito-python | 27e5587ac683262aa883bcb48130ed1a974df517 | [
"MIT"
] | 17 | 2016-05-19T10:29:46.000Z | 2022-03-14T15:53:29.000Z | # Copyright (c) 2008-2016 Szczepan Faber, Serhiy Oplakanets, Herr Kaste
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use... | 30.222222 | 79 | 0.726563 |
4a025c3b1802173ac8b631919f97ee44f47fe148 | 3,753 | py | Python | caffe2/contrib/aten/aten_test.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 60,067 | 2017-01-18T17:21:31.000Z | 2022-03-31T21:37:45.000Z | caffe2/contrib/aten/aten_test.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 66,955 | 2017-01-18T17:21:38.000Z | 2022-03-31T23:56:11.000Z | caffe2/contrib/aten/aten_test.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 19,210 | 2017-01-18T17:45:04.000Z | 2022-03-31T23:51:56.000Z |
from caffe2.python import core, dyndep
from hypothesis import given
import caffe2.python.hypothesis_test_util as hu
import hypothesis.strategies as st
import numpy as np
class TestATen(hu.HypothesisTestCase):
@given(inputs=hu.tensors(n=2), **hu.gcs)
def test_add(self, inputs, gc, dc):
op = core... | 27.394161 | 132 | 0.526779 |
4a025c5e04402ff9c47954f12d3a5b74cdc1e254 | 437 | py | Python | shelephant/external.py | tdegeus/shelephant | 35727dce7ac88c1445d17642cd0af2da7714ac43 | [
"MIT"
] | null | null | null | shelephant/external.py | tdegeus/shelephant | 35727dce7ac88c1445d17642cd0af2da7714ac43 | [
"MIT"
] | 51 | 2020-11-12T15:02:03.000Z | 2022-03-25T14:26:03.000Z | shelephant/external.py | tdegeus/shelephant | 35727dce7ac88c1445d17642cd0af2da7714ac43 | [
"MIT"
] | null | null | null | import subprocess
def exec_cmd(cmd, verbose=False):
r"""
Run command, optionally verbose command and its output, and return output.
:type cmd: str
:param cmd: The command to run.
:type verbose: bool
:param verbose: Print command and its output.
"""
if verbose:
print(cmd)
... | 18.208333 | 78 | 0.636156 |
4a025c7d0428bd87bbd98c6de54b424adde1e13b | 44,160 | py | Python | Python/libraries/recognizers-date-time/recognizers_date_time/resources/spanish_date_time.py | inloco/Recognizers-Text | 9f4ac7cd4170fe39e48ccf52c028877e7c421e60 | [
"MIT"
] | null | null | null | Python/libraries/recognizers-date-time/recognizers_date_time/resources/spanish_date_time.py | inloco/Recognizers-Text | 9f4ac7cd4170fe39e48ccf52c028877e7c421e60 | [
"MIT"
] | null | null | null | Python/libraries/recognizers-date-time/recognizers_date_time/resources/spanish_date_time.py | inloco/Recognizers-Text | 9f4ac7cd4170fe39e48ccf52c028877e7c421e60 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# <auto-generated>
# This code was generated by a tool.
# Changes to this file may cause incorrect behavior and will be lost if
# the code is regenerated.
# </auto-generated>
#
# Copyright (c) Microsoft Corporation. All rights ... | 74.847458 | 443 | 0.503533 |
4a025cfee475a60f473590aa7ff73c52da637977 | 5,008 | py | Python | u96v2_sbc_dualcam/dualcam.py | AlbertaBeef/u96v2_dualcam_python_examples | a8aa3fa14a1828af441c20c15d33c644ab686610 | [
"Apache-2.0"
] | null | null | null | u96v2_sbc_dualcam/dualcam.py | AlbertaBeef/u96v2_dualcam_python_examples | a8aa3fa14a1828af441c20c15d33c644ab686610 | [
"Apache-2.0"
] | null | null | null | u96v2_sbc_dualcam/dualcam.py | AlbertaBeef/u96v2_dualcam_python_examples | a8aa3fa14a1828af441c20c15d33c644ab686610 | [
"Apache-2.0"
] | null | null | null | '''
Copyright 2021 Avnet 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 writing, software
dis... | 31.696203 | 137 | 0.670527 |
4a025d5a24611ce2ef2cb6021c97accb894602da | 151 | py | Python | backend/apps/core/routing.py | jaliste/mi_coop | 66be4328117c39026d85a3d6cc9b8635bde49077 | [
"MIT"
] | 54 | 2019-08-11T03:39:22.000Z | 2022-01-06T02:16:33.000Z | backend/apps/core/routing.py | jaliste/mi_coop | 66be4328117c39026d85a3d6cc9b8635bde49077 | [
"MIT"
] | 11 | 2020-02-12T01:17:38.000Z | 2021-05-10T06:22:22.000Z | backend/apps/core/routing.py | jaliste/mi_coop | 66be4328117c39026d85a3d6cc9b8635bde49077 | [
"MIT"
] | 20 | 2019-09-07T20:04:08.000Z | 2021-12-05T04:43:20.000Z | from django.conf.urls import url
from . import consumers
websocket_urlpatterns = [
url(r"^ws/ping-pong/$", consumers.CoreConsumer.as_asgi(),),
]
| 18.875 | 63 | 0.721854 |
4a025d5e7118ee20f136c8a31b4c183de11f1e7f | 8,884 | py | Python | official/vision/detection/utils/object_detection/matcher.py | bamdada/UdacityProj10FinaltfModels | 4701bfbc924539860f610fa4ceae484a7bf194c6 | [
"Apache-2.0"
] | 153 | 2020-10-25T13:58:04.000Z | 2022-03-07T06:01:54.000Z | official/vision/detection/utils/object_detection/matcher.py | akshayjaryal603/models | db39ef826193d0802f644ba30397242a7272676e | [
"Apache-2.0"
] | 11 | 2020-07-13T08:29:00.000Z | 2022-03-24T07:21:09.000Z | official/vision/detection/utils/object_detection/matcher.py | akshayjaryal603/models | db39ef826193d0802f644ba30397242a7272676e | [
"Apache-2.0"
] | 23 | 2020-10-25T14:44:47.000Z | 2021-03-31T02:12:13.000Z | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.409836 | 80 | 0.710716 |
4a025dab93d5f1129c91ae2dd773aed8cd992730 | 15,521 | py | Python | spanner_orm/tests/model_test.py | MetaOfX/python-spanner-orm | 59063eb6989b845d1658118a7a0282eede19d8bf | [
"Apache-2.0"
] | 37 | 2018-11-01T18:29:03.000Z | 2022-03-30T17:24:39.000Z | spanner_orm/tests/model_test.py | MetaOfX/python-spanner-orm | 59063eb6989b845d1658118a7a0282eede19d8bf | [
"Apache-2.0"
] | 48 | 2018-11-05T18:51:23.000Z | 2021-12-17T20:28:11.000Z | spanner_orm/tests/model_test.py | MetaOfX/python-spanner-orm | 59063eb6989b845d1658118a7a0282eede19d8bf | [
"Apache-2.0"
] | 19 | 2019-05-04T06:05:31.000Z | 2021-12-17T20:52:53.000Z | # python3
# Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 33.306867 | 84 | 0.660138 |
4a025dc45461c38f500daef9f5647d5ae724bf04 | 1,793 | py | Python | AcademicDealerBackend/users/migrations/0001_initial.py | Acciente717/AcademicDealerBackend | 8024725f88997fa430fa92e1caa28161ffbb06f6 | [
"MIT"
] | 5 | 2019-03-10T06:57:15.000Z | 2019-03-17T03:04:40.000Z | AcademicDealerBackend/users/migrations/0001_initial.py | Acciente717/AcademicDealerBackend | 8024725f88997fa430fa92e1caa28161ffbb06f6 | [
"MIT"
] | 11 | 2019-05-14T15:13:48.000Z | 2019-05-31T15:31:33.000Z | AcademicDealerBackend/users/migrations/0001_initial.py | Acciente717/AcademicDealerBackend | 8024725f88997fa430fa92e1caa28161ffbb06f6 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-05-26 13:34
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='UserAccount',
... | 41.697674 | 148 | 0.597323 |
4a025e5e9dba893a1962371b31eb4830466d96d6 | 5,452 | py | Python | docs/conf.py | mgorny/Flask-Migrate | dd389ba7a45b8a673c653346a15f8d08f4f2417f | [
"MIT"
] | 1,992 | 2015-01-03T03:24:50.000Z | 2022-03-27T15:28:30.000Z | docs/conf.py | mgorny/Flask-Migrate | dd389ba7a45b8a673c653346a15f8d08f4f2417f | [
"MIT"
] | 408 | 2015-01-12T09:44:02.000Z | 2022-03-25T15:06:03.000Z | docs/conf.py | mgorny/Flask-Migrate | dd389ba7a45b8a673c653346a15f8d08f4f2417f | [
"MIT"
] | 248 | 2015-01-06T20:02:25.000Z | 2022-03-11T03:03:47.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 29.15508 | 79 | 0.64912 |
4a02609fa2618b7dc798a12928168ade98495a93 | 581 | py | Python | cmd/read.py | onexi/threetiers-2022 | 07261cb00828ce45b801c19428acf4ef388e7162 | [
"MIT"
] | null | null | null | cmd/read.py | onexi/threetiers-2022 | 07261cb00828ce45b801c19428acf4ef388e7162 | [
"MIT"
] | null | null | null | cmd/read.py | onexi/threetiers-2022 | 07261cb00828ce45b801c19428acf4ef388e7162 | [
"MIT"
] | 11 | 2022-03-14T13:46:04.000Z | 2022-03-14T14:53:10.000Z | # To solve the driver problem
# uninstall the following
# -----------------------------------
# pip3 uninstall mysql-connector
# -----------------------------------
# Then install
# -----------------------------------
# pip3 install mysql-connector-python
# -----------------------------------
import mysql.connector
... | 25.26087 | 43 | 0.428571 |
4a0262350e4fa84a0cb8578806520540cfc9fbd8 | 4,009 | py | Python | rebrickable_color_to_bricklink.py | maczniak/brickstats | ac16a62242a374b15d46ccf4132db445dfa1fd76 | [
"MIT"
] | 1 | 2015-09-10T00:04:23.000Z | 2015-09-10T00:04:23.000Z | rebrickable_color_to_bricklink.py | maczniak/brickstats | ac16a62242a374b15d46ccf4132db445dfa1fd76 | [
"MIT"
] | null | null | null | rebrickable_color_to_bricklink.py | maczniak/brickstats | ac16a62242a374b15d46ccf4132db445dfa1fd76 | [
"MIT"
] | null | null | null | # color references:
# http://rebrickable.com/colors
# http://www.bricklink.com/catalogColors.asp
rebrickable_color_to_bricklink = {
# Solid Colors
15: (1, 'White'),
503: (49, 'Very Light Gray'),
151: (99, 'Very Light Bluish Gray'),
71: (86, 'Light Bluish Gray'),
7: (9, 'Light Gray'),
8: (10, 'Dark Gray'),
... | 27.458904 | 74 | 0.575954 |
4a02640060252f6410db47be68c57355772f2cbb | 24,828 | py | Python | api/base/filters.py | saradbowman/osf.io | 085a3cd581625101e954e6df39940b4c4bd0a5a3 | [
"Apache-2.0"
] | null | null | null | api/base/filters.py | saradbowman/osf.io | 085a3cd581625101e954e6df39940b4c4bd0a5a3 | [
"Apache-2.0"
] | null | null | null | api/base/filters.py | saradbowman/osf.io | 085a3cd581625101e954e6df39940b4c4bd0a5a3 | [
"Apache-2.0"
] | null | null | null | import datetime
import functools
import operator
import re
import pytz
from api.base import utils
from api.base.exceptions import (
InvalidFilterComparisonType,
InvalidFilterError, InvalidFilterFieldError,
InvalidFilterMatchType, InvalidFilterOperator,
InvalidFilterValue,
)
from api.base.serializers im... | 43.104167 | 128 | 0.596786 |
4a0264c0d77f22d3c389bdb9b353888bc49f4df7 | 22,279 | py | Python | dataworkspaces/utils/git_utils.py | data-workspaces/data-workspaces-core | 2fd457414a9481f78dbd689c92479fb3a6d838b0 | [
"Apache-2.0"
] | 6 | 2019-04-16T10:44:41.000Z | 2021-02-24T09:34:10.000Z | dataworkspaces/utils/git_utils.py | data-workspaces/data-workspaces-core | 2fd457414a9481f78dbd689c92479fb3a6d838b0 | [
"Apache-2.0"
] | 67 | 2019-03-08T13:32:31.000Z | 2022-03-09T15:15:41.000Z | dataworkspaces/utils/git_utils.py | data-workspaces/data-workspaces-core | 2fd457414a9481f78dbd689c92479fb3a6d838b0 | [
"Apache-2.0"
] | 2 | 2020-04-24T02:48:56.000Z | 2022-01-14T01:07:48.000Z | # Copyright 2018,2019 by MPI-SWS and Data-ken Research. Licensed under Apache 2.0. See LICENSE.txt.
"""
Utility functions related to interacting with git
"""
from os.path import isdir, join, dirname, exists
from subprocess import run, PIPE
import shutil
import re
import tempfile
import json
from typing import Any, List... | 37.131667 | 106 | 0.608151 |
4a026595f72b492182f3ae140ec5718087255a7f | 10,398 | py | Python | url2sql.py | renesugar/movenotes | e054a7599cb981d164b6593150896cdc51bcaa72 | [
"MIT"
] | 3 | 2020-09-02T10:05:40.000Z | 2022-03-26T04:19:59.000Z | url2sql.py | renesugar/movenotes | e054a7599cb981d164b6593150896cdc51bcaa72 | [
"MIT"
] | null | null | null | url2sql.py | renesugar/movenotes | e054a7599cb981d164b6593150896cdc51bcaa72 | [
"MIT"
] | 1 | 2021-07-14T07:19:57.000Z | 2021-07-14T07:19:57.000Z | import re
import os
import argparse
import sys
import errno
import optparse
import sqlite3
import uuid
import email
import email.utils
from email.message import EmailMessage
from email.parser import BytesParser, Parser
from email.policy import default
from bs4 import BeautifulSoup
from datetime import datetime, time... | 30.763314 | 201 | 0.682535 |
4a0268b1f2eda5d8a94961e044f815640a5d9dda | 1,862 | py | Python | Guess_the_number(Week 2).py | ditiansm2015/Python-Game_Projects | 07c172fc18e214cf78d5971691c470669357e55d | [
"Apache-2.0"
] | 1 | 2017-12-26T14:03:21.000Z | 2017-12-26T14:03:21.000Z | Guess_the_number(Week 2).py | ditiansm2015/Python-Game_Projects | 07c172fc18e214cf78d5971691c470669357e55d | [
"Apache-2.0"
] | null | null | null | Guess_the_number(Week 2).py | ditiansm2015/Python-Game_Projects | 07c172fc18e214cf78d5971691c470669357e55d | [
"Apache-2.0"
] | null | null | null | # input will come from buttons and an input field
# all output for the game will be printed in the console
import random
import simplegui
secret_number=0
counter=0
# helper function to start and restart the game
def new_game(): # initialize global variables used in your code here
global secret_num... | 23.871795 | 71 | 0.649839 |
4a026a36dd9bcc21ca0c5fdbbc37b73336667986 | 66 | py | Python | procgame/_version.py | Curbfeeler/PinbotFromES | e12734afa37c4c0accef762f39d42503392c8f5b | [
"MIT"
] | 17 | 2015-05-14T23:35:59.000Z | 2021-08-09T18:22:25.000Z | procgame/_version.py | horseyhorsey/SkeletonGameVisualPinball10 | 8ae19ce99d143c61f0bcb9e00259137e96a39b4b | [
"MIT"
] | 20 | 2016-06-09T16:42:52.000Z | 2019-08-08T15:27:55.000Z | procgame/_version.py | horseyhorsey/SkeletonGameVisualPinball10 | 8ae19ce99d143c61f0bcb9e00259137e96a39b4b | [
"MIT"
] | 6 | 2015-08-07T01:00:43.000Z | 2020-07-14T20:07:20.000Z | # Generated by: paver inc_version
__version_info__ = (1, 1, 2, 1)
| 22 | 33 | 0.712121 |
4a026a59ed498473e784b49c8acd6572e9d5f4dd | 3,203 | py | Python | pgoapi/protos/pogoprotos/enums/tutorial_state_pb2.py | linherest/pgoapi | e3bdce71b06c099663e9796c8df166883059edd9 | [
"MIT"
] | 14 | 2017-03-28T16:32:24.000Z | 2021-03-13T23:03:57.000Z | pgoapi/protos/pogoprotos/enums/tutorial_state_pb2.py | linherest/pgoapi | e3bdce71b06c099663e9796c8df166883059edd9 | [
"MIT"
] | 8 | 2017-03-01T07:56:09.000Z | 2017-08-15T07:37:12.000Z | pgoapi/protos/pogoprotos/enums/tutorial_state_pb2.py | linherest/pgoapi | e3bdce71b06c099663e9796c8df166883059edd9 | [
"MIT"
] | 15 | 2017-02-24T01:30:23.000Z | 2021-06-27T08:46:43.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/enums/tutorial_state.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.proto... | 32.683673 | 505 | 0.750859 |
4a026d144e86e4ae53488b4b7ddd3f4f8a62fb6a | 3,945 | py | Python | app/routes.py | vherolf/labelmaker | 67e885ab04172ec5670e78485fe86a9470db742d | [
"MIT"
] | null | null | null | app/routes.py | vherolf/labelmaker | 67e885ab04172ec5670e78485fe86a9470db742d | [
"MIT"
] | 1 | 2020-07-06T19:59:52.000Z | 2020-07-06T19:59:52.000Z | app/routes.py | vherolf/labelmaker | 67e885ab04172ec5670e78485fe86a9470db742d | [
"MIT"
] | null | null | null | from flask import render_template, flash, redirect, url_for
from app import app
from app.forms import LabelForm, TapeForm
import subprocess
@app.route('/')
@app.route('/index')
def index():
return render_template('index.html', title='Home')
@app.route('/label', methods=['GET', 'POST'])
def label():
form = La... | 40.670103 | 123 | 0.676299 |
4a026d1622d67c1b73a18ca07578946ac8d6fa27 | 22,121 | py | Python | bin/forms/staffForm.py | grinchios/college_project-commented | 3cc5ccd6c1b946b625e1dcc0689c9273f6ba2178 | [
"MIT"
] | null | null | null | bin/forms/staffForm.py | grinchios/college_project-commented | 3cc5ccd6c1b946b625e1dcc0689c9273f6ba2178 | [
"MIT"
] | null | null | null | bin/forms/staffForm.py | grinchios/college_project-commented | 3cc5ccd6c1b946b625e1dcc0689c9273f6ba2178 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
sys.path = ['..'] + sys.path
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import QThread
from PyQt5.QtWidgets import QMessageBox
import fileHandling
from validation import validate
from datetime import date
'''
S2
All customers details should be saved together (nam... | 39.501786 | 241 | 0.640297 |
4a026dcce05b88ca0acb70de36c78869db741aa1 | 10,428 | py | Python | product.py | prakashpp/nereid-catalog-variants | 51c195c2b492bd4b2d7f0b8de245392fe7e3df88 | [
"BSD-3-Clause"
] | null | null | null | product.py | prakashpp/nereid-catalog-variants | 51c195c2b492bd4b2d7f0b8de245392fe7e3df88 | [
"BSD-3-Clause"
] | null | null | null | product.py | prakashpp/nereid-catalog-variants | 51c195c2b492bd4b2d7f0b8de245392fe7e3df88 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from functools import partial
from trytond.model import ModelView, ModelSQL, fields, Unique
from trytond.pool import PoolMeta
from trytond.pyson import Eval
from trytond.transaction import Transaction
from nereid import url_for, current_website
from flask import json
from babel import numbers
... | 34.644518 | 79 | 0.56588 |
4a026eb1d46a148bb7c6e4aec6004138a2ac6dfa | 2,631 | py | Python | cbuild/util/cmake.py | mahiuchun/cports | 37315875922d65a6d4f612cdc17bc0d88856d6d0 | [
"BSD-2-Clause"
] | null | null | null | cbuild/util/cmake.py | mahiuchun/cports | 37315875922d65a6d4f612cdc17bc0d88856d6d0 | [
"BSD-2-Clause"
] | null | null | null | cbuild/util/cmake.py | mahiuchun/cports | 37315875922d65a6d4f612cdc17bc0d88856d6d0 | [
"BSD-2-Clause"
] | null | null | null | from cbuild.core import paths
def configure(
pkg, cmake_dir = None, build_dir = None, extra_args = [],
cross_build = None
):
if cmake_dir:
cdir = pkg.chroot_cwd / cmake_dir
else:
cdir = pkg.chroot_cwd
if not build_dir:
build_dir = pkg.make_dir
(pkg.cwd / build_dir).mkd... | 29.561798 | 72 | 0.643482 |
4a026fb90ee120f0fe8e613d83c89ba7dff84812 | 4,701 | py | Python | models/preresnet.py | Pexure/FixMatch-pytorch | 5b846fa44d434eeff97e4445da0577fa250c4963 | [
"MIT"
] | null | null | null | models/preresnet.py | Pexure/FixMatch-pytorch | 5b846fa44d434eeff97e4445da0577fa250c4963 | [
"MIT"
] | null | null | null | models/preresnet.py | Pexure/FixMatch-pytorch | 5b846fa44d434eeff97e4445da0577fa250c4963 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
def conv3x3(in_planes, out_planes, stride=1):
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False)
class PreActBlock(nn.Module):
'''Pre-activation version of the BasicBlock.'''
expansion = 1
d... | 35.345865 | 119 | 0.587535 |
4a02713c0e716642b00d65ed3ee655f95b74e968 | 14,337 | py | Python | src/sparseml/pytorch/utils/logger.py | kevinaer/sparseml | 067bb3e1e9ea35930eb7a105eac4864f9145678a | [
"Apache-2.0"
] | 2 | 2021-07-04T07:29:48.000Z | 2021-08-17T05:59:40.000Z | src/sparseml/pytorch/utils/logger.py | kevinaer/sparseml | 067bb3e1e9ea35930eb7a105eac4864f9145678a | [
"Apache-2.0"
] | null | null | null | src/sparseml/pytorch/utils/logger.py | kevinaer/sparseml | 067bb3e1e9ea35930eb7a105eac4864f9145678a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 33.264501 | 83 | 0.601032 |
4a0271c22ef938f483063fe61369f5d3f8bfafca | 13,861 | py | Python | defunct/age-defunct/age/train_n_test_male_model.py | amriduls/Gender-Age-Classification-CNN | 4e3e4f0e4e9ef373e7235b739f491afd062325d2 | [
"MIT"
] | 43 | 2017-05-18T08:50:57.000Z | 2022-03-29T07:40:24.000Z | defunct/age-defunct/age/train_n_test_male_model.py | amriduls/Gender-Age-Classification-CNN | 4e3e4f0e4e9ef373e7235b739f491afd062325d2 | [
"MIT"
] | 5 | 2017-08-07T17:08:43.000Z | 2020-03-08T10:07:06.000Z | defunct/age-defunct/age/train_n_test_male_model.py | amriduls/Gender-Age-Classification-CNN | 4e3e4f0e4e9ef373e7235b739f491afd062325d2 | [
"MIT"
] | 31 | 2016-12-22T08:17:20.000Z | 2021-06-20T19:32:05.000Z | import tensorflow as tf
import numpy as np
import sys
import pickle
import random
from sklearn.utils import shuffle
import matplotlib.pyplot as plt
from PIL import Image
from matplotlib import gridspec
from collections import Counter
train_mode = 'age'
def load_train_file(name):
with open(name + '.pkl', 'rb') as f:... | 31.218468 | 206 | 0.681985 |
4a027435ecf3af6487f16abe96dd5f791b830c08 | 3,166 | py | Python | {{cookiecutter.project_name}}/dodo_continue.py | carmelom/cookiecutter-xmds-gpe | b2aad5a6d448078e5d0442990ea96df3ea10e65c | [
"MIT"
] | null | null | null | {{cookiecutter.project_name}}/dodo_continue.py | carmelom/cookiecutter-xmds-gpe | b2aad5a6d448078e5d0442990ea96df3ea10e65c | [
"MIT"
] | null | null | null | {{cookiecutter.project_name}}/dodo_continue.py | carmelom/cookiecutter-xmds-gpe | b2aad5a6d448078e5d0442990ea96df3ea10e65c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Create: 01-2020 - Carmelo Mordini <carmelo> <carmelo.mordini@unitn.it>
"""Module docstring
"""
from pathlib import Path
from src import tasks
from doit import get_var
import numpy as np
import h5py
from ruamel import yaml
from copy import deepcopy
DOIT_CONFIG = {
... | 26.830508 | 106 | 0.554011 |
4a0274bc9245d99163cf8abf990e733bd3dc901d | 4,474 | py | Python | pymcuprog/serialupdi/readwrite.py | KrystianD-contribution/pymcuprog | a9411a8e4a5db8b54517c51da0bae96bf8385a65 | [
"MIT"
] | 28 | 2021-05-08T19:28:33.000Z | 2022-03-23T06:23:13.000Z | pymcuprog/serialupdi/readwrite.py | KrystianD-contribution/pymcuprog | a9411a8e4a5db8b54517c51da0bae96bf8385a65 | [
"MIT"
] | 20 | 2021-05-24T19:20:39.000Z | 2022-03-12T20:10:30.000Z | pymcuprog/serialupdi/readwrite.py | KrystianD-contribution/pymcuprog | a9411a8e4a5db8b54517c51da0bae96bf8385a65 | [
"MIT"
] | 11 | 2021-06-24T20:59:16.000Z | 2022-03-23T23:59:38.000Z | """
Read/write access provider for UPDI
"""
from logging import getLogger
from pymcuprog.pymcuprog_errors import PymcuprogError
from . import constants
class UpdiReadWrite(object):
"""
Provides various forms of reads and writes for UPDI applications
Makes us of the datalink provided
"""
def __ini... | 27.115152 | 73 | 0.584935 |
4a027560f8313c509107b8f641b713c28a37b406 | 518 | py | Python | python/MultipartFileUpload.py | partyyoung/mooncloud-fileupload-java-sdk | 0db0fc52bf8c008a321b579be36e691bae9a4e25 | [
"Apache-2.0"
] | null | null | null | python/MultipartFileUpload.py | partyyoung/mooncloud-fileupload-java-sdk | 0db0fc52bf8c008a321b579be36e691bae9a4e25 | [
"Apache-2.0"
] | null | null | null | python/MultipartFileUpload.py | partyyoung/mooncloud-fileupload-java-sdk | 0db0fc52bf8c008a321b579be36e691bae9a4e25 | [
"Apache-2.0"
] | null | null | null | import requests
# 演示用,一般随便搞个就可以,此地址会返回404,但不影响观看请求体
url = "http://127.0.0.1:8080/file/upload2path"
# 折中方案,参数按如下方式组织,也是模拟multipart/form-data的核心
files = {'file': ('MultipartFileUpload.java', open('src/main/java/net/mooncloud/fileupload/MultipartFileUpload.java', 'rb'), 'application/octet-stream'), 'path': (None, "/tmp/u... | 37 | 199 | 0.745174 |
4a02758cdc0231313c81ed97a775c294ca10bbe7 | 4,460 | py | Python | indicators/models/__init__.py | WPRDC/neighborhood-simulacrum | 46892dfdbc8bc3201e31fee4ee991c49b208753e | [
"MIT"
] | null | null | null | indicators/models/__init__.py | WPRDC/neighborhood-simulacrum | 46892dfdbc8bc3201e31fee4ee991c49b208753e | [
"MIT"
] | null | null | null | indicators/models/__init__.py | WPRDC/neighborhood-simulacrum | 46892dfdbc8bc3201e31fee4ee991c49b208753e | [
"MIT"
] | null | null | null | from django.db import models
from profiles.abstract_models import Described
from .source import Source, CensusSource, CKANSource, CKANGeomSource, CKANRegionalSource
from .time import TimeAxis, RelativeTimeAxis, StaticTimeAxis, StaticConsecutiveTimeAxis
from .variable import Variable, CensusVariable, CKANVariable, Cens... | 34.045802 | 111 | 0.669731 |
4a02777d2326105d0ac3d482dc946eb9bce13e77 | 28,850 | py | Python | superset/models/core.py | ds2g/superset | 0cfb321e7ebfb5c26092f6493df890fed7dbc787 | [
"Apache-2.0"
] | null | null | null | superset/models/core.py | ds2g/superset | 0cfb321e7ebfb5c26092f6493df890fed7dbc787 | [
"Apache-2.0"
] | null | null | null | superset/models/core.py | ds2g/superset | 0cfb321e7ebfb5c26092f6493df890fed7dbc787 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 35.705446 | 174 | 0.654523 |
4a02779bb071af9ef7c365c178574a6675c0e031 | 19,387 | py | Python | pycoind/protocol/format.py | TemplarJQ/pycoindAnnotationVersion | d33b4c455c4654e0fde35500d230437210d5325e | [
"MIT"
] | null | null | null | pycoind/protocol/format.py | TemplarJQ/pycoindAnnotationVersion | d33b4c455c4654e0fde35500d230437210d5325e | [
"MIT"
] | null | null | null | pycoind/protocol/format.py | TemplarJQ/pycoindAnnotationVersion | d33b4c455c4654e0fde35500d230437210d5325e | [
"MIT"
] | null | null | null | # The MIT License (MIT)
#
# Copyright (c) 2014 Richard Moore
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mod... | 27.695714 | 116 | 0.598803 |
4a0277d8203d3352a90dbb6cb0beac6b99cf85e5 | 598 | py | Python | Mission_to_Mars/app.py | cceni03/Web-Scraping-Challenge | 646da11477fbbfd9aa4a1c9900dd80d0b28199d5 | [
"ADSL"
] | null | null | null | Mission_to_Mars/app.py | cceni03/Web-Scraping-Challenge | 646da11477fbbfd9aa4a1c9900dd80d0b28199d5 | [
"ADSL"
] | null | null | null | Mission_to_Mars/app.py | cceni03/Web-Scraping-Challenge | 646da11477fbbfd9aa4a1c9900dd80d0b28199d5 | [
"ADSL"
] | null | null | null | from flask import Flask, render_template, redirect
from flask_pymongo import PyMongo
import scrape_mars
app = Flask(__name__)
# Create Connection Variable
mongo = PyMongo(app, uri="mongodb://localhost:27017/mars_app")
@app.route("/")
def index():
mars_dict = mongo.db.mars_dict.find_one()
return render_templa... | 24.916667 | 62 | 0.720736 |
4a0278914e11430cad7015bb090aaf823350d284 | 16,812 | py | Python | toontown/minigame/DropPlacer.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 99 | 2019-11-02T22:25:00.000Z | 2022-02-03T03:48:00.000Z | toontown/minigame/DropPlacer.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 42 | 2019-11-03T05:31:08.000Z | 2022-03-16T22:50:32.000Z | toontown/minigame/DropPlacer.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 57 | 2019-11-03T07:47:37.000Z | 2022-03-22T00:41:49.000Z | from direct.showbase.RandomNumGen import RandomNumGen
from . import CatchGameGlobals
from . import DropScheduler
from toontown.parties.PartyGlobals import CatchActivityDuration as PartyCatchDuration
class DropPlacer:
def __init__(self, game, numPlayers, dropTypes, startTime = None):
self.game = game
... | 15.552266 | 296 | 0.353616 |
4a027906c171767165b39bd29c637b396c765a47 | 217 | py | Python | helpingnetwork/organization/admin.py | neopentane/Techathon_19 | defaea24e55bdc4a26138a7a8c8813f5b12156f2 | [
"MIT"
] | null | null | null | helpingnetwork/organization/admin.py | neopentane/Techathon_19 | defaea24e55bdc4a26138a7a8c8813f5b12156f2 | [
"MIT"
] | 22 | 2020-02-12T00:01:41.000Z | 2022-03-11T23:44:42.000Z | helpingnetwork/organization/admin.py | neopentane/Techathon_19 | defaea24e55bdc4a26138a7a8c8813f5b12156f2 | [
"MIT"
] | 2 | 2019-04-03T18:01:54.000Z | 2019-04-04T03:57:55.000Z | from django.contrib import admin
from .models import Organization,OrganizationImages
admin.site.register(Organization)
#admin.site.register(Event)
#admin.site.register(Signup)
admin.site.register(OrganizationImages)
| 27.125 | 51 | 0.843318 |
4a0279a5efc8435ccfc41d688a41f9a7bca8d8ff | 632 | py | Python | backend/manage.py | mabdullahabid/test-app-1-1 | 9fe7689c8e6734db626dc8fd790cdb9397475ff2 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | mabdullahabid/test-app-1-1 | 9fe7689c8e6734db626dc8fd790cdb9397475ff2 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | mabdullahabid/test-app-1-1 | 9fe7689c8e6734db626dc8fd790cdb9397475ff2 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_app_1_1.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise I... | 28.727273 | 76 | 0.685127 |
4a027a0a3a4cecf3908949c11ba72ee8e3c01e29 | 8,629 | py | Python | preprocessing.py | tomjoju/Fast-AI-Disaster-Tweet-Classifier | 589aa763296a98fde6f9c9eb1cba7b0fecd330aa | [
"MIT"
] | 3 | 2020-07-17T14:55:15.000Z | 2020-07-26T03:03:27.000Z | preprocessing.py | blackonyyx/Fast-AI-Disaster-Tweet-Classifier | 589aa763296a98fde6f9c9eb1cba7b0fecd330aa | [
"MIT"
] | null | null | null | preprocessing.py | blackonyyx/Fast-AI-Disaster-Tweet-Classifier | 589aa763296a98fde6f9c9eb1cba7b0fecd330aa | [
"MIT"
] | 2 | 2020-07-30T14:24:54.000Z | 2020-08-18T05:04:51.000Z | """
preprocessing.py
Contains preprocessing methods to apply on the dataset.
Dependencies
!pip install numpy pandas pyspellchecker spacy nltk
!python -m spacy download en_core_web_sm
"""
import string
import numpy as np
import pandas as pd
import re
from spellchecker import SpellChecker
spell = SpellChecker()
imp... | 37.193966 | 320 | 0.618959 |
4a027a6658cf463a27ae6b51a4100b2f294871f3 | 7,668 | py | Python | source/assetmgr_hiero/utils/defaults.py | IngenuityEngine/ftrack-connect-foundry | a0d5ba788e3dc5c1536ebe9740bcf4393e3f5e1d | [
"MIT"
] | 1 | 2019-10-22T06:33:08.000Z | 2019-10-22T06:33:08.000Z | source/assetmgr_hiero/utils/defaults.py | IngenuityEngine/ftrack-connect-foundry | a0d5ba788e3dc5c1536ebe9740bcf4393e3f5e1d | [
"MIT"
] | null | null | null | source/assetmgr_hiero/utils/defaults.py | IngenuityEngine/ftrack-connect-foundry | a0d5ba788e3dc5c1536ebe9740bcf4393e3f5e1d | [
"MIT"
] | null | null | null | import hiero.core
import FnAssetAPI
from FnAssetAPI.core.decorators import debugStaticCall
from . import _utils
from . import entity as entityUtils
from . import tag as tagUtils
from .. import constants
kTrackItemTimingOptionsKey = "trackItemTimingsOptions"
def managerSpecificKey(key):
"""
Produces a manager... | 26.905263 | 87 | 0.704747 |
4a027ae024f24dca4a3cf947e1385a03e76d4b4f | 983 | py | Python | app/__init__.py | Mutembeijoe/personal_blog | bab1dcff6f9b2a24b96cef20a5c57baab7433f8e | [
"MIT"
] | null | null | null | app/__init__.py | Mutembeijoe/personal_blog | bab1dcff6f9b2a24b96cef20a5c57baab7433f8e | [
"MIT"
] | 3 | 2021-09-08T01:23:44.000Z | 2022-03-12T00:03:29.000Z | app/__init__.py | Mutembeijoe/personal_blog | bab1dcff6f9b2a24b96cef20a5c57baab7433f8e | [
"MIT"
] | null | null | null | from flask import Flask
from flask_bcrypt import Bcrypt
from flask_login import LoginManager
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from flask_mail import Mail
from app.config import config_options
db = SQLAlchemy()
bcrypt = Bcrypt()
migrate = Migrate()
mail = Mail()
login_manager = ... | 24.575 | 55 | 0.769074 |
4a027af22d16dec478a45af668250e4da83860c0 | 504 | py | Python | python_experiments/paper_figures_performance_study/run_all_py_scripts.py | CheYulin/AccTriCnt | fb62c9e821a453ed6027e85ec3b52d7ddc642a96 | [
"MIT"
] | 3 | 2019-07-28T14:35:00.000Z | 2019-07-30T12:35:39.000Z | python_experiments/paper_figures_performance_study/run_all_py_scripts.py | CheYulin/AccTriCnt | fb62c9e821a453ed6027e85ec3b52d7ddc642a96 | [
"MIT"
] | null | null | null | python_experiments/paper_figures_performance_study/run_all_py_scripts.py | CheYulin/AccTriCnt | fb62c9e821a453ed6027e85ec3b52d7ddc642a96 | [
"MIT"
] | 1 | 2020-01-02T19:04:05.000Z | 2020-01-02T19:04:05.000Z | import os
if __name__ == '__main__':
for file in ['draw_bitmap_range_filtering_optimization.py',
'draw_comparison_of_algorithms.py',
'draw_degree_skew_handling.py',
'draw_mcdram_opt.py',
'draw_multi_pass.py',
'draw_scalability_to_... | 36 | 63 | 0.563492 |
4a027bd5444be733fdaa5d06b10f3ac5224beeaa | 52,859 | py | Python | pde/grids/base.py | tefavidal/py-pde | 427be3f2f4b096775f46111cd5a5d05af50e94bc | [
"MIT"
] | null | null | null | pde/grids/base.py | tefavidal/py-pde | 427be3f2f4b096775f46111cd5a5d05af50e94bc | [
"MIT"
] | null | null | null | pde/grids/base.py | tefavidal/py-pde | 427be3f2f4b096775f46111cd5a5d05af50e94bc | [
"MIT"
] | null | null | null | """
Bases classes
.. codeauthor:: David Zwicker <david.zwicker@ds.mpg.de>
"""
from __future__ import annotations
import functools
import inspect
import itertools
import json
import logging
import warnings
from abc import ABCMeta, abstractmethod, abstractproperty
from typing import (
TYPE_CHECKING,
Any,
... | 39.125833 | 103 | 0.57572 |
4a027c4b638b0b50d68c4b230e7aff2e70182ee6 | 5,908 | py | Python | typed_python/ast_util.py | mjwoolf/nativepython | 3f469f6d3c8c0f03cb9f51eb2a851d68310c7f90 | [
"Apache-2.0"
] | 7 | 2018-08-07T15:41:54.000Z | 2019-02-19T12:47:57.000Z | typed_python/ast_util.py | mjwoolf/nativepython | 3f469f6d3c8c0f03cb9f51eb2a851d68310c7f90 | [
"Apache-2.0"
] | 38 | 2018-10-17T13:37:46.000Z | 2019-04-11T20:50:14.000Z | typed_python/ast_util.py | mjwoolf/nativepython | 3f469f6d3c8c0f03cb9f51eb2a851d68310c7f90 | [
"Apache-2.0"
] | 4 | 2019-02-11T17:44:55.000Z | 2019-03-20T07:38:18.000Z | # Copyright 2017 Braxton Mckee
#
# 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 t... | 28.403846 | 79 | 0.680095 |
4a027ce357c3a746bfccc84aa5a830523d0b0ff4 | 636 | py | Python | orchespy/devicetype/base.py | SX-Aurora/orchespy | 6b85a78831c8e3e05df7143101ca3418817fcbbd | [
"BSD-3-Clause"
] | null | null | null | orchespy/devicetype/base.py | SX-Aurora/orchespy | 6b85a78831c8e3e05df7143101ca3418817fcbbd | [
"BSD-3-Clause"
] | null | null | null | orchespy/devicetype/base.py | SX-Aurora/orchespy | 6b85a78831c8e3e05df7143101ca3418817fcbbd | [
"BSD-3-Clause"
] | null | null | null | from abc import ABC, abstractmethod
class Base(ABC):
@abstractmethod
def get_ndarray_on_host(self, ary):
pass
@abstractmethod
def get_ndarray_on_device(self, ary):
pass
@property
@abstractmethod
def numpy_class(self):
pass
@classmethod
@abstractmethod
... | 18.705882 | 55 | 0.654088 |
4a027d684854301c86a867f863c5f24b52a86038 | 236 | py | Python | clarifai/rest/__init__.py | jdehotin/clarifaipy | aaf1eb272bd21601e530bd07378d1190815bb0c1 | [
"Apache-2.0"
] | null | null | null | clarifai/rest/__init__.py | jdehotin/clarifaipy | aaf1eb272bd21601e530bd07378d1190815bb0c1 | [
"Apache-2.0"
] | null | null | null | clarifai/rest/__init__.py | jdehotin/clarifaipy | aaf1eb272bd21601e530bd07378d1190815bb0c1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from .client import ApiClient, ApiError, UserError, TokenError
from .client import ClarifaiApp
from .client import Model, Image, Concept
from .client import InputSearchTerm, OutputSearchTerm, SearchQueryBuilder
| 33.714286 | 73 | 0.792373 |
4a027e1ea60b707e7b1e604edc1b6846afc844db | 172,355 | py | Python | nova/tests/unit/virt/xenapi/test_xenapi.py | jeckxie/gxzw-nova | edbc620439cf3dfc959c6eb8355ab35adc8268d7 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/virt/xenapi/test_xenapi.py | jeckxie/gxzw-nova | edbc620439cf3dfc959c6eb8355ab35adc8268d7 | [
"Apache-2.0"
] | 11 | 2017-06-19T01:28:55.000Z | 2017-06-23T02:01:47.000Z | nova/tests/unit/virt/xenapi/test_xenapi.py | jeckxie/gxzw-nova | edbc620439cf3dfc959c6eb8355ab35adc8268d7 | [
"Apache-2.0"
] | 1 | 2020-07-22T22:06:24.000Z | 2020-07-22T22:06:24.000Z | # Copyright (c) 2010 Citrix Systems, 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 applicab... | 42.70441 | 79 | 0.59866 |
4a027ea0b72263bc588a83c4b35c61e5310a293f | 1,019 | py | Python | tests/structures/heap/binary_heap_test.py | TylerYep/workshop | 69b19afc81c1b84b7f60723077670fb789b55744 | [
"MIT"
] | 1 | 2021-06-14T01:20:09.000Z | 2021-06-14T01:20:09.000Z | tests/structures/heap/binary_heap_test.py | TylerYep/workshop | 69b19afc81c1b84b7f60723077670fb789b55744 | [
"MIT"
] | null | null | null | tests/structures/heap/binary_heap_test.py | TylerYep/workshop | 69b19afc81c1b84b7f60723077670fb789b55744 | [
"MIT"
] | null | null | null | from cs.structures import BinaryHeap
class TestBinaryHeap:
@staticmethod
def test_max_heap() -> None:
h = BinaryHeap[int]()
h.enqueue(34)
h.enqueue(31)
h.enqueue(37)
assert h.peek() == 37
assert h.pop() == 37
assert h.pop() == 34
assert h.pop() =... | 23.697674 | 66 | 0.496565 |
4a0280a167e5e3c14583f6289e09cac634edd1aa | 6,267 | py | Python | protofuzz/tests/test_gen.py | Spellchaser/protofuzz | 831bb0a75e124ba12104e6b4ee055d7580ba9ef3 | [
"MIT"
] | null | null | null | protofuzz/tests/test_gen.py | Spellchaser/protofuzz | 831bb0a75e124ba12104e6b4ee055d7580ba9ef3 | [
"MIT"
] | null | null | null | protofuzz/tests/test_gen.py | Spellchaser/protofuzz | 831bb0a75e124ba12104e6b4ee055d7580ba9ef3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from protofuzz import gen
import unittest
class TestGenerators(unittest.TestCase):
def test_name(self):
"""Test setting a name"""
name = 'A Name'
generator = gen.IterValueGenerator('name', [])
generator.set_name(name)
self.assertEqual(generator.na... | 33.875676 | 83 | 0.592788 |
4a0281b4f771b89fe2bcdd9b2f5059f86224bada | 1,698 | py | Python | pydis_site/apps/api/urls.py | Hotdogszbg/site | 8071847742f39258781105bb3cfe19fc8c8c967c | [
"MIT"
] | null | null | null | pydis_site/apps/api/urls.py | Hotdogszbg/site | 8071847742f39258781105bb3cfe19fc8c8c967c | [
"MIT"
] | 10 | 2021-03-19T12:46:42.000Z | 2022-03-12T00:52:11.000Z | pydis_site/apps/api/urls.py | wookie184/site | 923cbeae0079b4a542fffda19bf3bce3daf15205 | [
"MIT"
] | null | null | null | from django.urls import include, path
from rest_framework.routers import DefaultRouter
from .views import HealthcheckView, RulesView
from .viewsets import (
BotSettingViewSet, DeletedMessageViewSet,
DocumentationLinkViewSet, InfractionViewSet,
LogEntryViewSet, NominationViewSet,
OffTopicChannelNameView... | 23.260274 | 75 | 0.733804 |
4a02825cf3a85eb7c833d5f7ae8b5c012fc65b53 | 2,651 | py | Python | official/nlp/tasks/utils.py | hjkim-haga/TF-OD-API | 22ac477ff4dfb93fe7a32c94b5f0b1e74330902b | [
"Apache-2.0"
] | 1 | 2021-05-22T12:50:50.000Z | 2021-05-22T12:50:50.000Z | official/nlp/tasks/utils.py | DemonDamon/mask-detection-based-on-tf2odapi | 192ae544169c1230c21141c033800aa1bd94e9b6 | [
"MIT"
] | null | null | null | official/nlp/tasks/utils.py | DemonDamon/mask-detection-based-on-tf2odapi | 192ae544169c1230c21141c033800aa1bd94e9b6 | [
"MIT"
] | null | null | null | # Copyright 2021 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... | 34.428571 | 106 | 0.701622 |
4a02827a5d501fd8f388b5278ebb77819bc41dce | 25,498 | py | Python | pymc3/gp/cov.py | ExpectationMax/pymc3 | 7988d0bd023c8ba05a2d97bcbb563a67ed9ed82a | [
"Apache-2.0"
] | null | null | null | pymc3/gp/cov.py | ExpectationMax/pymc3 | 7988d0bd023c8ba05a2d97bcbb563a67ed9ed82a | [
"Apache-2.0"
] | null | null | null | pymc3/gp/cov.py | ExpectationMax/pymc3 | 7988d0bd023c8ba05a2d97bcbb563a67ed9ed82a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The PyMC Developers
#
# 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 ag... | 31.057247 | 116 | 0.577418 |
4a0282be2e7a880e598508d913997c3732f833be | 11,702 | py | Python | Blender 2.91/Data/FmdlSplitVertexEncoding.py | Hazuki-san/PES_Face_Hair_Modifier | e1daa4a6dfb6a9d7158582e6ca57c8fa3b23bdcc | [
"MIT"
] | 3 | 2020-12-23T14:43:03.000Z | 2022-02-06T03:38:48.000Z | Blender 2.91/Data/FmdlSplitVertexEncoding.py | Hazuki-san/PES_Face_Hair_Modifier | e1daa4a6dfb6a9d7158582e6ca57c8fa3b23bdcc | [
"MIT"
] | 2 | 2021-01-22T19:13:06.000Z | 2022-02-10T15:55:49.000Z | Blender 2.91/Data/FmdlSplitVertexEncoding.py | Hazuki-san/PES_Face_Hair_Modifier | e1daa4a6dfb6a9d7158582e6ca57c8fa3b23bdcc | [
"MIT"
] | 2 | 2021-01-14T13:51:43.000Z | 2021-03-28T16:52:01.000Z | from . import FmdlFile
#
# FMDL files store mesh geometry as vertices, and faces that are sequences of
# vertices.
#
# Blender, and many other mesh editors, support a richer notion of geometry,
# consisting of vertices, faces, and loops. A vertex is a combination of a
# position and position transformation behavior (i... | 39.268456 | 114 | 0.779696 |
4a0282d22aa92a1c45f2e403ece20801fd82d1cc | 344 | py | Python | 01_Language/01_Functions/python/date_offset_get.py | cliff363825/TwentyFour | 09df59bd5d275e66463e343647f46027397d1233 | [
"MIT"
] | 3 | 2020-06-28T07:42:51.000Z | 2021-01-15T10:32:11.000Z | 01_Language/01_Functions/python/date_offset_get.py | cliff363825/TwentyFour | 09df59bd5d275e66463e343647f46027397d1233 | [
"MIT"
] | 9 | 2021-03-10T22:45:40.000Z | 2022-02-27T06:53:20.000Z | 01_Language/01_Functions/python/date_offset_get.py | cliff363825/TwentyFour | 09df59bd5d275e66463e343647f46027397d1233 | [
"MIT"
] | 1 | 2021-01-15T10:51:24.000Z | 2021-01-15T10:51:24.000Z | # coding: utf-8
import pytz
import datetime
if __name__ == '__main__':
tz = pytz.timezone("America/New_York")
winter = datetime.datetime.strptime("2010-12-21", "%Y-%m-%d")
summer = datetime.datetime.strptime("2008-06-21", "%Y-%m-%d")
print(tz.utcoffset(winter).total_seconds())
print(tz.utcoffset(s... | 28.666667 | 65 | 0.677326 |
4a02845fa4b7814f64a526adb31c98ca979fa391 | 1,358 | py | Python | galleryViewer/urls.py | amirhossein-bayati/photo-gallery | 01c18bd139afd1e6fd496a1ebff547daec95b156 | [
"MIT"
] | 1 | 2021-10-10T07:09:44.000Z | 2021-10-10T07:09:44.000Z | galleryViewer/urls.py | amirhossein-bayati/photo-gallery | 01c18bd139afd1e6fd496a1ebff547daec95b156 | [
"MIT"
] | null | null | null | galleryViewer/urls.py | amirhossein-bayati/photo-gallery | 01c18bd139afd1e6fd496a1ebff547daec95b156 | [
"MIT"
] | null | null | null | """galleryViewer URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home'... | 33.95 | 103 | 0.705449 |
4a0284b1c4922386303716b34de187705e0290f3 | 14,425 | py | Python | vunit/sim_if/rivierapro.py | solsjo/vunit | 0e4dbbe3b59c93eecdef6cd7121ca300e21ee222 | [
"Artistic-2.0",
"Apache-2.0"
] | null | null | null | vunit/sim_if/rivierapro.py | solsjo/vunit | 0e4dbbe3b59c93eecdef6cd7121ca300e21ee222 | [
"Artistic-2.0",
"Apache-2.0"
] | null | null | null | vunit/sim_if/rivierapro.py | solsjo/vunit | 0e4dbbe3b59c93eecdef6cd7121ca300e21ee222 | [
"Artistic-2.0",
"Apache-2.0"
] | null | null | null | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2014-2021, Lars Asplund lars.anders.asplund@gmail.com
"""
Interface towards Aldec Riviera Pro
"""
fro... | 30.954936 | 109 | 0.599307 |
4a028532823c53aa6fb4e3b2a558267fff859ef1 | 8,339 | py | Python | ngrok/client.py | ngrok/ngrok-api-python | 951146e42586e0893d1c23d1b6bad20156c449f9 | [
"MIT"
] | 2 | 2021-11-24T19:55:35.000Z | 2022-03-26T05:32:35.000Z | ngrok/client.py | ngrok/ngrok-api-python | 951146e42586e0893d1c23d1b6bad20156c449f9 | [
"MIT"
] | 2 | 2021-09-10T16:17:01.000Z | 2021-12-07T00:15:01.000Z | ngrok/client.py | ngrok/ngrok-api-python | 951146e42586e0893d1c23d1b6bad20156c449f9 | [
"MIT"
] | 4 | 2021-07-19T06:41:05.000Z | 2022-03-14T22:48:55.000Z | from __future__ import annotations
import collections
import os
from .services import *
class Client(object):
def __init__(self, api_key: str, base_url: str = "https://api.ngrok.com"):
self.http_client = HTTPClient(api_key, base_url)
@property
def abuse_reports(self) -> AbuseReportsClient:
... | 44.356383 | 89 | 0.697925 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.