hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ead389344eafaf2f1a0922b9fb64ad6a04a3cc0e | 3,150 | py | Python | timeflux/helpers/bdf.py | sylvchev/timeflux | 47026b593e2ac685f6494c940adef1ad7d124df1 | [
"MIT"
] | 1 | 2019-04-08T09:47:55.000Z | 2019-04-08T09:47:55.000Z | timeflux/helpers/bdf.py | sylvchev/timeflux | 47026b593e2ac685f6494c940adef1ad7d124df1 | [
"MIT"
] | null | null | null | timeflux/helpers/bdf.py | sylvchev/timeflux | 47026b593e2ac685f6494c940adef1ad7d124df1 | [
"MIT"
] | null | null | null | import os
import logging
import pandas as pd
try:
import pyedflib
except ModuleNotFoundError:
raise SystemExit(
"PyEDFlib is not installed. Optional dependencies can be installed with: 'pip install timeflux[opt]'."
)
logger = logging.getLogger()
def convert(
src, dst=None, pmax=300000, dimen... | 28.636364 | 110 | 0.575556 |
822e18676c973d5c9e1839f52d773d506d5ae4b3 | 3,340 | py | Python | demo/test_infer.py | p513817/tensorrt_pose_esimation | 3eebe57482f0b6bcbb007f4bb4df43df0872d943 | [
"MIT"
] | null | null | null | demo/test_infer.py | p513817/tensorrt_pose_esimation | 3eebe57482f0b6bcbb007f4bb4df43df0872d943 | [
"MIT"
] | null | null | null | demo/test_infer.py | p513817/tensorrt_pose_esimation | 3eebe57482f0b6bcbb007f4bb4df43df0872d943 | [
"MIT"
] | null | null | null | import json, os, argparse, sys, time, torch
from unittest import result
import torch2trt
import trt_pose.coco
import trt_pose.models
from torch2trt import TRTModule
import trt_pose.models
import cv2
import torchvision.transforms as transforms
import PIL.Image
from trt_pose.draw_objects import DrawObjects
from trt_pose.... | 42.278481 | 143 | 0.615269 |
56ebfdb83d25e92528837ea6274b25f0f1ee5185 | 508 | py | Python | mesh/experiments/test_indexer.py | gavin971/pyro2 | 55c6d98b9c5d9372badc703ad5deb4a9d2cb8b06 | [
"BSD-3-Clause"
] | 3 | 2017-05-24T14:16:49.000Z | 2019-01-02T19:21:07.000Z | mesh/experiments/test_indexer.py | gavin971/pyro2 | 55c6d98b9c5d9372badc703ad5deb4a9d2cb8b06 | [
"BSD-3-Clause"
] | null | null | null | mesh/experiments/test_indexer.py | gavin971/pyro2 | 55c6d98b9c5d9372badc703ad5deb4a9d2cb8b06 | [
"BSD-3-Clause"
] | null | null | null | # some simple tests of the ArrayIndexer
from __future__ import print_function
import mesh.patch as patch
import numpy as np
myg = patch.Grid2d(8, 8, ng=2)
a = myg.scratch_array()
print(id(a))
print(a.flags.owndata)
b = a.v()
print(id(b))
print(b.flags.owndata)
print(b.shape)
s = b.shape
b[:,:] = np.arange(s[0]*s[... | 11.288889 | 40 | 0.633858 |
15ad74815144176d725223f564f662b7b53caa14 | 9,025 | py | Python | Tutorial/examples_infoStore2.py | LARCmath/MyPyLARC | 4705d3da6aff56621bcfb037e8c534b12e092a55 | [
"Unlicense"
] | null | null | null | Tutorial/examples_infoStore2.py | LARCmath/MyPyLARC | 4705d3da6aff56621bcfb037e8c534b12e092a55 | [
"Unlicense"
] | null | null | null | Tutorial/examples_infoStore2.py | LARCmath/MyPyLARC | 4705d3da6aff56621bcfb037e8c534b12e092a55 | [
"Unlicense"
] | 1 | 2020-03-23T19:17:02.000Z | 2020-03-23T19:17:02.000Z | #!/usr/bin/env python3
##################################################################
# #
# Copyright (C) 2014, Institute for Defense Analyses #
# 4850 Mark Center Drive, Alexandria, VA; 703-845-2500 #
# This material may be ... | 48.262032 | 107 | 0.511579 |
5428901fc14e457638a3b166bb50c7040bfa39bb | 6,680 | py | Python | trainer_all.py | SungbinChoi/traffic4cast2019 | 68a1834013b6fc636d6fe33a4dd5920191ff6b8f | [
"Apache-2.0"
] | 6 | 2019-11-06T08:06:23.000Z | 2020-12-10T15:39:31.000Z | trainer_all.py | avelezd/traffic4cast2019 | 68a1834013b6fc636d6fe33a4dd5920191ff6b8f | [
"Apache-2.0"
] | null | null | null | trainer_all.py | avelezd/traffic4cast2019 | 68a1834013b6fc636d6fe33a4dd5920191ff6b8f | [
"Apache-2.0"
] | 6 | 2019-11-05T09:51:40.000Z | 2020-10-23T05:24:02.000Z | from random import shuffle
import datetime
import time
import queue
import threading
import logging
from PIL import Image
import itertools
import yaml
import re
import os
import glob
import shutil
import sys
import copy
import numpy as np
import tensorflow as tf
import tensorflow.contrib.layers as c_layers
from net_all... | 33.908629 | 125 | 0.592216 |
fad98341e4b7e1def531d3daad0f51b5bfdad5c9 | 2,269 | py | Python | custom_components/homeconnect/binary_sensor.py | holnburger/homeassistant-homeconnect | f54fb17a1487e6cff086b1d4fad9de57ed5f4476 | [
"MIT"
] | null | null | null | custom_components/homeconnect/binary_sensor.py | holnburger/homeassistant-homeconnect | f54fb17a1487e6cff086b1d4fad9de57ed5f4476 | [
"MIT"
] | null | null | null | custom_components/homeconnect/binary_sensor.py | holnburger/homeassistant-homeconnect | f54fb17a1487e6cff086b1d4fad9de57ed5f4476 | [
"MIT"
] | null | null | null | """
Provides a binary sensor for Home Connect
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.homeconnect/
"""
import logging
from homeassistant.components.binary_sensor import BinarySensorDevice
from .api import HomeConnectEntity
from .co... | 32.414286 | 83 | 0.646981 |
2f81b5a90fdd479c26b0210c3d0b746e47f11e71 | 1,572 | py | Python | horology/tformatter.py | mjmikulski/ttt | b918653cc42a41cd782d9e066b8d910cc54a5b06 | [
"MIT"
] | 56 | 2019-12-08T05:20:17.000Z | 2022-02-27T20:20:24.000Z | horology/tformatter.py | mjmikulski/ttt | b918653cc42a41cd782d9e066b8d910cc54a5b06 | [
"MIT"
] | 3 | 2019-12-13T20:09:02.000Z | 2020-02-20T16:21:13.000Z | horology/tformatter.py | mjmikulski/ttt | b918653cc42a41cd782d9e066b8d910cc54a5b06 | [
"MIT"
] | 3 | 2019-12-12T23:06:27.000Z | 2022-03-23T02:53:02.000Z | from collections import namedtuple
from math import inf
Unit = namedtuple('Unit', 'names scale limit')
UNITS = [
Unit(('ns',), 10 ** -9, 10 ** -6),
Unit(('us',), 10 ** -6, 10 ** -3),
Unit(('ms',), 10 ** -3, 1),
Unit(('s',), 1, 10 ** 3),
Unit(('min',), 60, 6 * 10 ** 4),
Unit(('h', 'hs', 'hours'... | 27.103448 | 77 | 0.534987 |
0c3ab83475c7223331089dda7ef1c59d4e533cc7 | 31,323 | py | Python | docker/batch-single/scripts/main.py | rogerbock/AIDA-Interchange-Format | f0a7fe4d7be36e211d502768aec8f8589e6dcf25 | [
"MIT"
] | null | null | null | docker/batch-single/scripts/main.py | rogerbock/AIDA-Interchange-Format | f0a7fe4d7be36e211d502768aec8f8589e6dcf25 | [
"MIT"
] | null | null | null | docker/batch-single/scripts/main.py | rogerbock/AIDA-Interchange-Format | f0a7fe4d7be36e211d502768aec8f8589e6dcf25 | [
"MIT"
] | null | null | null | import os
import logging
import boto3
import tarfile
import zipfile
import glob
import json
import shutil
import time
import subprocess
from pathlib import Path
from botocore.exceptions import ClientError
from subprocess import CalledProcessError
class Main:
# Initializer / Instance Attributes
def __init__(s... | 40.312741 | 136 | 0.619034 |
5f35d3f6665ca0b5c18e841c62da11892ca5976c | 665 | py | Python | analysis/combine_paper_outputs.py | opensafely/covid19-vaccine-coverage-tpp-emis | 79195309b06608baffb0d3eb57f7b99bfec17fcc | [
"MIT"
] | null | null | null | analysis/combine_paper_outputs.py | opensafely/covid19-vaccine-coverage-tpp-emis | 79195309b06608baffb0d3eb57f7b99bfec17fcc | [
"MIT"
] | null | null | null | analysis/combine_paper_outputs.py | opensafely/covid19-vaccine-coverage-tpp-emis | 79195309b06608baffb0d3eb57f7b99bfec17fcc | [
"MIT"
] | null | null | null | import glob
import os
import pandas as pd
from combine_cumsums import combine_cumsums
def run():
for emis_path in sorted(
glob.glob("released_outputs/emis/cumulative_coverage/*/*/*.csv")
):
print(emis_path)
tpp_path = emis_path.replace("/emis/", "/tpp/")
emis_df = pd.read_csv(... | 27.708333 | 72 | 0.667669 |
f3ccc99e088123fd024b8bfb56670aec83f8cc1a | 12,761 | py | Python | avmoo/app.py | feifeixiaogao/avmoo | 8fc5890182db3c94676d2539f01ee3c3bb601b45 | [
"MIT"
] | 1 | 2022-03-04T16:23:18.000Z | 2022-03-04T16:23:18.000Z | avmoo/app.py | feifeixiaogao/avmoo | 8fc5890182db3c94676d2539f01ee3c3bb601b45 | [
"MIT"
] | null | null | null | avmoo/app.py | feifeixiaogao/avmoo | 8fc5890182db3c94676d2539f01ee3c3bb601b45 | [
"MIT"
] | null | null | null | # coding: utf-8
from flask import Flask
from flask import redirect
from flask import url_for
from flask import g
from flask import request
from flask import send_from_directory
from flask import flash
from flask import Markup
from flask import render_template
from werkzeug import Request
import leancloud
import sqlite... | 34.396226 | 178 | 0.582713 |
0e98aedb2f583784dcefe619fdd4ec54918624ab | 6,598 | py | Python | pcf/particle/aws/cloudfront/cloudfront.py | c1chibipanda/Particle-Cloud-Framework | 1b3fb23edf6454c5db6b78b49751b266d4829529 | [
"Apache-2.0"
] | null | null | null | pcf/particle/aws/cloudfront/cloudfront.py | c1chibipanda/Particle-Cloud-Framework | 1b3fb23edf6454c5db6b78b49751b266d4829529 | [
"Apache-2.0"
] | null | null | null | pcf/particle/aws/cloudfront/cloudfront.py | c1chibipanda/Particle-Cloud-Framework | 1b3fb23edf6454c5db6b78b49751b266d4829529 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Capital One Services, 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 agreed to in... | 34.364583 | 116 | 0.611701 |
3ea90d4f294eb7e0cadcd7b2a4ff4a9358375c4e | 361 | py | Python | setup.py | umapulkurte/honda | 1c2ac3fb177e04bad7df8cdcbffcbd376591dc76 | [
"MIT"
] | null | null | null | setup.py | umapulkurte/honda | 1c2ac3fb177e04bad7df8cdcbffcbd376591dc76 | [
"MIT"
] | null | null | null | setup.py | umapulkurte/honda | 1c2ac3fb177e04bad7df8cdcbffcbd376591dc76 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
version = '0.0.1'
setup(
name='honda',
version=version,
description='App for Showroom',
author='Wayzon',
author_email='reddymeghraj@gmail.com',
packages=find_packages(),
zip_safe=False,
include_package_data=T... | 20.055556 | 43 | 0.67313 |
22a23c5fd3a1080690c73b07e63e275934d5e5f3 | 4,136 | py | Python | cogs/todo.py | jottew/Rodo | e3f075b995ec80668e95ef18e8b72ff43feb8398 | [
"MIT"
] | null | null | null | cogs/todo.py | jottew/Rodo | e3f075b995ec80668e95ef18e8b72ff43feb8398 | [
"MIT"
] | 1 | 2021-12-19T18:48:11.000Z | 2021-12-27T04:33:31.000Z | cogs/todo.py | jottew/Rodo | e3f075b995ec80668e95ef18e8b72ff43feb8398 | [
"MIT"
] | null | null | null | import asyncio
import defectio
import core
import re
from core.bot import Rodo
from defectio.ext import commands
from core.context import Context
class Todo(core.Cog):
def __init__(self, bot):
self.bot: Rodo = bot
self.amount_regex = re.compile(r"(\d+)-(\d+)")
self.time_str = "%d.%m.%y %H... | 34.181818 | 131 | 0.533124 |
745a6586e45ab46c8bc770365aabc1dc56af0c5b | 811 | py | Python | projects/vdk-control-cli/src/vdk/internal/control/job/sample_job/20_python_step.py | alod83/versatile-data-kit | 9ca672d3929eb3dc6fe5c677e8c8a75e2a0d2be8 | [
"Apache-2.0"
] | 100 | 2021-10-04T09:32:04.000Z | 2022-03-30T11:23:53.000Z | projects/vdk-control-cli/src/vdk/internal/control/job/sample_job/20_python_step.py | alod83/versatile-data-kit | 9ca672d3929eb3dc6fe5c677e8c8a75e2a0d2be8 | [
"Apache-2.0"
] | 208 | 2021-10-04T16:56:40.000Z | 2022-03-31T10:41:44.000Z | projects/vdk-control-cli/src/vdk/internal/control/job/sample_job/20_python_step.py | alod83/versatile-data-kit | 9ca672d3929eb3dc6fe5c677e8c8a75e2a0d2be8 | [
"Apache-2.0"
] | 14 | 2021-10-11T14:15:13.000Z | 2022-03-11T13:39:17.000Z | # Copyright 2021 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0
import logging
from vdk.api.job_input import IJobInput
log = logging.getLogger(__name__)
def run(job_input: IJobInput):
"""
Function named `run` is required in order for a python script to be recognized as a Data Job Python step and execute... | 30.037037 | 122 | 0.717633 |
0823c73ef029a7595880f417d577b2de86952d55 | 6,314 | py | Python | tests/test_04_dxf_high_level_structs/test_416b_recursive_decompose.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 515 | 2017-01-25T05:46:52.000Z | 2022-03-29T09:52:27.000Z | tests/test_04_dxf_high_level_structs/test_416b_recursive_decompose.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 417 | 2017-01-25T10:01:17.000Z | 2022-03-29T09:22:04.000Z | tests/test_04_dxf_high_level_structs/test_416b_recursive_decompose.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 149 | 2017-02-01T15:52:02.000Z | 2022-03-17T10:33:38.000Z | # Copyright (c) 2021, Manfred Moitzi
# License: MIT License
from typing import List
import pytest
import ezdxf
from ezdxf.disassemble import recursive_decompose
from ezdxf.entities import Point, Insert
@pytest.fixture(scope="module")
def doc():
d = ezdxf.new()
l0 = d.blocks.new("L0")
build_level_0(l0)
... | 32.214286 | 77 | 0.631612 |
bc38d445ac104da5afc10961952bceff9e9e404c | 938 | py | Python | dev/eamtools/setfl/test__setfl_pair_order.py | eragasa/pypospack | 21cdecaf3b05c87acc532d992be2c04d85bfbc22 | [
"MIT"
] | 4 | 2018-01-18T19:59:56.000Z | 2020-08-25T11:56:52.000Z | dev/eamtools/setfl/test__setfl_pair_order.py | eragasa/pypospack | 21cdecaf3b05c87acc532d992be2c04d85bfbc22 | [
"MIT"
] | 1 | 2018-04-22T23:02:13.000Z | 2018-04-22T23:02:13.000Z | dev/eamtools/setfl/test__setfl_pair_order.py | eragasa/pypospack | 21cdecaf3b05c87acc532d992be2c04d85bfbc22 | [
"MIT"
] | 1 | 2019-09-14T07:04:42.000Z | 2019-09-14T07:04:42.000Z | import pytest
from collections import OrderedDict
from setfl import get_setfl_pair_order
test_cases = OrderedDict()
test_cases['1sym'] = OrderedDict()
test_cases['1sym']['symbols'] = ['Ni']
test_cases['1sym']['expected_pairs'] = [['Ni', 'Ni']]
test_cases['2sym'] = OrderedDict()
test_cases['2sym']['symbols'] = ['Ni','... | 33.5 | 95 | 0.616205 |
1a425c1b65a0016debf41b4d9fd1b8bf58cba87c | 29,625 | py | Python | code/pyseg/diff_geom/curve.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 12 | 2020-01-08T01:33:02.000Z | 2022-03-16T00:25:34.000Z | code/pyseg/diff_geom/curve.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 8 | 2019-12-19T19:34:56.000Z | 2022-03-10T10:11:28.000Z | code/pyseg/diff_geom/curve.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 2 | 2022-03-30T13:12:22.000Z | 2022-03-30T18:12:10.000Z | """
Classes for curves
# Author: Antonio Martinez-Sanchez (Max Planck Institute for Biochemistry)
# Date: 29.02.2016
"""
__author__ = 'martinez'
import vtk
import math
import numpy as np
from pyseg.globals.utils import angle_2vec_3D, closest_points
###### Global variables
PI_2 = .5 * np.pi
MAX_PER_ANG = .25 * np.pi... | 37.217337 | 116 | 0.563747 |
ee3e4f9c94a3724716a8f43fc21d062bf771ba14 | 9,906 | py | Python | MHD/FEniCS/MHD/Stabilised/SaddlePointForm/Test/SplitMatrix/ScottTest/MatrixFree/MHDmulti.py | wathen/PhD | 35524f40028541a4d611d8c78574e4cf9ddc3278 | [
"MIT"
] | 3 | 2020-10-25T13:30:20.000Z | 2021-08-10T21:27:30.000Z | MHD/FEniCS/MHD/Stabilised/SaddlePointForm/Test/SplitMatrix/ScottTest/MatrixFree/MHDmulti.py | wathen/PhD | 35524f40028541a4d611d8c78574e4cf9ddc3278 | [
"MIT"
] | null | null | null | MHD/FEniCS/MHD/Stabilised/SaddlePointForm/Test/SplitMatrix/ScottTest/MatrixFree/MHDmulti.py | wathen/PhD | 35524f40028541a4d611d8c78574e4cf9ddc3278 | [
"MIT"
] | 3 | 2019-10-28T16:12:13.000Z | 2020-01-13T13:59:44.000Z | from dolfin import assemble, Function
import petsc4py
import sys
petsc4py.init(sys.argv)
from petsc4py import PETSc
import MatrixOperations as MO
import numpy as np
class Matrix(object):
def __init__(self):
pass
def create(self, mat):
pass
def destroy(self, mat):
pass
class P(Ma... | 24.765 | 198 | 0.529477 |
abbb1e306f43b0451a34060cec5a799adc67dbe2 | 5,449 | py | Python | tests/applicationinsights_tests/channel_tests/TestTelemetryChannel.py | mschreibjambit/python-appinsights | 13ab035add4678ee0db7d47446df9efed80313fb | [
"MIT"
] | 1 | 2020-01-30T13:58:30.000Z | 2020-01-30T13:58:30.000Z | tests/applicationinsights_tests/channel_tests/TestTelemetryChannel.py | mschreibjambit/python-appinsights | 13ab035add4678ee0db7d47446df9efed80313fb | [
"MIT"
] | null | null | null | tests/applicationinsights_tests/channel_tests/TestTelemetryChannel.py | mschreibjambit/python-appinsights | 13ab035add4678ee0db7d47446df9efed80313fb | [
"MIT"
] | 1 | 2020-01-30T07:18:19.000Z | 2020-01-30T07:18:19.000Z | from applicationinsights import channel
import unittest
import sys
import os
import os.path
rootDirectory = os.path.join(os.path.dirname(
os.path.realpath(__file__)), '..', '..', '..')
if rootDirectory not in sys.path:
sys.path.append(rootDirectory)
class TestTelemetryChannel(unittest.TestCase):
def test... | 40.969925 | 76 | 0.670031 |
dc828ee663ad6d80663a7f7de1e10d0b7e6d62b2 | 590 | py | Python | project/app/main.py | Speccy-Rom/summarization_service | 7d9342d3e2588aee4ef30a5fe133b436e7effe25 | [
"MIT"
] | null | null | null | project/app/main.py | Speccy-Rom/summarization_service | 7d9342d3e2588aee4ef30a5fe133b436e7effe25 | [
"MIT"
] | null | null | null | project/app/main.py | Speccy-Rom/summarization_service | 7d9342d3e2588aee4ef30a5fe133b436e7effe25 | [
"MIT"
] | null | null | null | import logging
from fastapi import FastAPI
from app.api import ping, summaries
from app.db import init_db
log = logging.getLogger("uvicorn")
def create_application() -> FastAPI:
application = FastAPI()
application.include_router(ping.router)
application.include_router(summaries.router, prefix="/summar... | 18.4375 | 89 | 0.723729 |
482332cda42fdbfb4f3a76d77024b30facb60083 | 3,813 | py | Python | knover/data/plato_reader.py | WorldEditors/Knover | e4664e8eabe598d8203a5ffc8445b79de2fc9191 | [
"Apache-2.0"
] | 1,373 | 2020-07-07T07:47:29.000Z | 2022-03-31T11:59:39.000Z | knover/data/plato_reader.py | WorldEditors/Knover | e4664e8eabe598d8203a5ffc8445b79de2fc9191 | [
"Apache-2.0"
] | 99 | 2020-07-07T09:24:50.000Z | 2022-03-30T04:58:09.000Z | knover/data/plato_reader.py | WorldEditors/Knover | e4664e8eabe598d8203a5ffc8445b79de2fc9191 | [
"Apache-2.0"
] | 102 | 2020-07-07T09:10:25.000Z | 2022-03-16T08:14:26.000Z | # Copyright (c) 2020 PaddlePaddle 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 app... | 41.901099 | 97 | 0.640441 |
c61933700716f8cd3002cf63506a0862fb2ccce7 | 12,378 | py | Python | cryptoapis/model/list_transactions_by_block_hash_ribsd2_script_sig.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 5 | 2021-05-17T04:45:03.000Z | 2022-03-23T12:51:46.000Z | cryptoapis/model/list_transactions_by_block_hash_ribsd2_script_sig.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | null | null | null | cryptoapis/model/list_transactions_by_block_hash_ribsd2_script_sig.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 2 | 2021-06-02T07:32:26.000Z | 2022-02-12T02:36:23.000Z | """
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei... | 45.010909 | 484 | 0.582808 |
35a83b92f94595657a32096aeba2b1f432e25fd0 | 64,174 | py | Python | include/ClientGUIDialogs.py | cravxx/hydrus | 6945ad7055518487bc0375ce962e1223dae3f543 | [
"WTFPL"
] | null | null | null | include/ClientGUIDialogs.py | cravxx/hydrus | 6945ad7055518487bc0375ce962e1223dae3f543 | [
"WTFPL"
] | null | null | null | include/ClientGUIDialogs.py | cravxx/hydrus | 6945ad7055518487bc0375ce962e1223dae3f543 | [
"WTFPL"
] | null | null | null | from . import HydrusConstants as HC
from . import ClientConstants as CC
from . import ClientData
from . import ClientDefaults
from . import ClientDownloading
from . import ClientDragDrop
from . import ClientExporting
from . import ClientCaches
from . import ClientFiles
from . import ClientGUIACDropdown
from . import Cl... | 32.427489 | 246 | 0.539408 |
68ba6a98fce1189b6743674ac0f811a484965f5a | 24,524 | py | Python | keras/mixed_precision/policy.py | ruancomelli/keras | e53ff1cab1b8b99b0dc41e082613dbc0081276bf | [
"Apache-2.0"
] | 37,222 | 2017-12-13T00:52:55.000Z | 2022-03-31T22:34:35.000Z | keras/mixed_precision/policy.py | amirsadafi/keras | f1e9c76675981ee6683f54a3ce569212d551d12d | [
"Apache-2.0"
] | 7,624 | 2017-12-13T01:03:40.000Z | 2022-03-31T23:57:24.000Z | keras/mixed_precision/policy.py | amirsadafi/keras | f1e9c76675981ee6683f54a3ce569212d551d12d | [
"Apache-2.0"
] | 14,914 | 2017-12-13T02:30:46.000Z | 2022-03-30T14:49:16.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... | 41.636672 | 80 | 0.711222 |
75aa184e5aad9f686db7abb78dfbbf6064172de6 | 550 | py | Python | helm/dagster/schema/schema/charts/dagster_user_deployments/values.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 4,606 | 2018-06-21T17:45:20.000Z | 2022-03-31T23:39:42.000Z | helm/dagster/schema/schema/charts/dagster_user_deployments/values.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 6,221 | 2018-06-12T04:36:01.000Z | 2022-03-31T21:43:05.000Z | helm/dagster/schema/schema/charts/dagster_user_deployments/values.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 619 | 2018-08-22T22:43:09.000Z | 2022-03-31T22:48:06.000Z | from typing import List
from pydantic import BaseModel, Field # pylint: disable=no-name-in-module
from ..dagster.subschema import Global, ServiceAccount
from ..utils import kubernetes
from .subschema.user_deployments import UserDeployment
class DagsterUserDeploymentsHelmValues(BaseModel):
__doc__ = "@" + "gene... | 28.947368 | 74 | 0.769091 |
d872471771090ca67e21a623adced38afad07536 | 30,384 | py | Python | electrumfair/gui/kivy/uix/dialogs/installwizard.py | faircoin/electrumfair | ce0cc7ac89df71d970d113493f524f206e84ed5d | [
"MIT"
] | 4 | 2017-01-13T00:08:14.000Z | 2019-04-21T02:51:33.000Z | electrumfair/gui/kivy/uix/dialogs/installwizard.py | faircoin/electrumfair | ce0cc7ac89df71d970d113493f524f206e84ed5d | [
"MIT"
] | 13 | 2017-02-20T16:24:37.000Z | 2021-04-21T08:29:34.000Z | electrumfair/gui/kivy/uix/dialogs/installwizard.py | faircoin/electrumfair | ce0cc7ac89df71d970d113493f524f206e84ed5d | [
"MIT"
] | 8 | 2017-01-14T14:45:56.000Z | 2020-01-21T13:30:39.000Z |
from functools import partial
import threading
import os
from kivy.app import App
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.properties import ObjectProperty, StringProperty, OptionProperty
from kivy.core.window import Window
from kivy.uix.button import Button
from kivy.utils import platform... | 28.964728 | 153 | 0.57448 |
bc5536dc0ccdfe73c0971a0027f818fd8f71b275 | 10,384 | py | Python | dask/dataframe/io/json.py | nordange/dask | 59d4f0fa03cb91d064a0f776e03a12abcfb2f840 | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/io/json.py | nordange/dask | 59d4f0fa03cb91d064a0f776e03a12abcfb2f840 | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/io/json.py | nordange/dask | 59d4f0fa03cb91d064a0f776e03a12abcfb2f840 | [
"BSD-3-Clause"
] | null | null | null | import io
import os
from itertools import zip_longest
import pandas as pd
from fsspec.core import open_files
from ...base import compute as dask_compute
from ...bytes import read_bytes
from ...core import flatten
from ...delayed import delayed
from ..utils import insert_meta_param_description, make_meta
from .io impo... | 32.45 | 85 | 0.611133 |
b1889be1463f897594fa34c1bb5bf65a0a466150 | 9,388 | py | Python | evaluate.py | WeyShi/PVAE | 101ac68c545318644ccc40bb28ea71399f420009 | [
"MIT"
] | null | null | null | evaluate.py | WeyShi/PVAE | 101ac68c545318644ccc40bb28ea71399f420009 | [
"MIT"
] | 12 | 2020-01-28T22:20:36.000Z | 2022-02-10T00:42:55.000Z | evaluate.py | WeyShi/PVAE | 101ac68c545318644ccc40bb28ea71399f420009 | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright 2018 The DisentanglementLib 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
#
# Un... | 44.91866 | 107 | 0.703984 |
9da4735eb452ddef8404de219f1ec000df13051e | 697 | py | Python | lrp/concatenation.py | likedan/keras_lrp | f2a464604e1d69d00c1feeaa7bbd752a9234bd49 | [
"BSD-3-Clause"
] | 6 | 2018-08-11T19:40:03.000Z | 2021-06-21T19:00:04.000Z | lrp/concatenation.py | likedan/keras_lrp | f2a464604e1d69d00c1feeaa7bbd752a9234bd49 | [
"BSD-3-Clause"
] | 1 | 2019-11-27T08:06:42.000Z | 2019-11-27T08:06:42.000Z | lrp/concatenation.py | likedan/keras_lrp | f2a464604e1d69d00c1feeaa7bbd752a9234bd49 | [
"BSD-3-Clause"
] | 2 | 2018-10-02T23:33:20.000Z | 2019-07-20T16:36:54.000Z | import numpy as np
# -------------------------------
# Flattening Layer
# -------------------------------
class Concatenation:
'''
Flattening layer.
'''
def __init__(self, layer):
self.concat_axis = layer.axis
self.last_index = 0
def lrp(self, R, X):
'''
Receives ... | 29.041667 | 128 | 0.563845 |
edb967bd434e221253fb9313ac53fe66284eaeb0 | 7,348 | py | Python | mplexporter/tests/test_basic.py | aflaxman/mplexporter | 153b84b379eb20513b21f3db71c3a77fc350e03f | [
"BSD-3-Clause"
] | null | null | null | mplexporter/tests/test_basic.py | aflaxman/mplexporter | 153b84b379eb20513b21f3db71c3a77fc350e03f | [
"BSD-3-Clause"
] | null | null | null | mplexporter/tests/test_basic.py | aflaxman/mplexporter | 153b84b379eb20513b21f3db71c3a77fc350e03f | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from numpy.testing import assert_warns
from ..exporter import Exporter
from ..renderers import FakeRenderer, FullFakeRenderer
from . import plt
def fake_renderer_output(fig, Renderer):
renderer = Renderer()
exporter = Exporter(renderer)
exporter.run(fig)
return renderer.output
de... | 33.099099 | 74 | 0.445563 |
34abad10e98d00e1655bd9818d478ab24a5725dc | 1,452 | py | Python | backend/server/common/decorators.py | TorrentofShame/Flask-React-Mongo-Boilerplate | 6f003e16094bbc212198eed19bacfde52c1af85f | [
"Unlicense"
] | null | null | null | backend/server/common/decorators.py | TorrentofShame/Flask-React-Mongo-Boilerplate | 6f003e16094bbc212198eed19bacfde52c1af85f | [
"Unlicense"
] | null | null | null | backend/server/common/decorators.py | TorrentofShame/Flask-React-Mongo-Boilerplate | 6f003e16094bbc212198eed19bacfde52c1af85f | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
server.common.decorators
~~~~~~~~~~~~~~~~~~~~~~~~
"""
from flask import request
from functools import wraps
from werkzeug.exceptions import Unauthorized, Forbidden
from server.models.user import User, UserRole
def authenticate_user(f):
if doc := getattr(f, "__doc__"):
... | 27.923077 | 74 | 0.600551 |
3594be0142b5b3e725c4f13e13ed048073e733c7 | 1,954 | py | Python | test_flipbot.py | wordaligned/flipbot | 43cf757b20890728706dacb59e0302f6232d3126 | [
"MIT"
] | null | null | null | test_flipbot.py | wordaligned/flipbot | 43cf757b20890728706dacb59e0302f6232d3126 | [
"MIT"
] | null | null | null | test_flipbot.py | wordaligned/flipbot | 43cf757b20890728706dacb59e0302f6232d3126 | [
"MIT"
] | null | null | null | ''' Flipbot tests '''
import flipbot
def test_markup_matcher():
match = flipbot.markup_re.match
assert match(':smiley:')
assert match(':+1:')
assert match(':fb-wow:')
assert match('<http://wordaligned.org>')
assert match('<http://wordaligned.org|wordaligned.org>')
assert match('<@USER>')
... | 29.164179 | 72 | 0.573183 |
c8608cba4ed6b2534bb87df8be82c6a786d5ad59 | 406 | py | Python | main/migrations/0002_auto_20161031_1223.py | jsmnbom/htxaarhuslan | 5244c4e65f4912c5d2e193f1ac355b3206d1c1b8 | [
"MIT"
] | 1 | 2019-09-06T10:28:40.000Z | 2019-09-06T10:28:40.000Z | main/migrations/0002_auto_20161031_1223.py | jsmnbom/htxaarhuslan | 5244c4e65f4912c5d2e193f1ac355b3206d1c1b8 | [
"MIT"
] | 2 | 2018-10-22T10:33:04.000Z | 2019-01-31T19:36:04.000Z | main/migrations/0002_auto_20161031_1223.py | jsmnbom/htxaarhuslan | 5244c4e65f4912c5d2e193f1ac355b3206d1c1b8 | [
"MIT"
] | 1 | 2019-09-06T10:28:41.000Z | 2019-09-06T10:28:41.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-31 11:23
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0001_initial'),
]
operations = [
migrations.RenameField(
model_... | 19.333333 | 48 | 0.583744 |
bb817e2d1d124e20c88ef4065eab824df4ed08a8 | 575 | py | Python | arpabets.py | Edresson/deepspeech-playground | 9af761b7729ae44d0f53b6d55a404a8ee497bf95 | [
"Apache-2.0"
] | null | null | null | arpabets.py | Edresson/deepspeech-playground | 9af761b7729ae44d0f53b6d55a404a8ee497bf95 | [
"Apache-2.0"
] | null | null | null | arpabets.py | Edresson/deepspeech-playground | 9af761b7729ae44d0f53b6d55a404a8ee497bf95 | [
"Apache-2.0"
] | null | null | null | from utils import for_tf_or_th
sphinx_40_phones = '''
AA
AE
AH
AO
AW
AY
B
CH
D
DH
EH
ER
EY
F
G
HH
IH
IY
JH
K
L
M
N
NG
OW
OY
P
R
S
SH
T
TH
UH
UW
V
W
Y
Z
ZH
IX
'''
# SIL was not exists MakeDict output but there was IX translated for '
# sphinx_40_phones = sphinx_40_phones[:-4] + 'IX'
phone_map, index_map = {}, {}
start... | 10.087719 | 70 | 0.702609 |
954a292a3498a6f1eb5ff7be4d14b6c13b6e3d68 | 1,985 | py | Python | contextmonkey/contextlayer/ContextManagerInstance.py | manojrege/contextmonkey | 9974889a726d7f60c6da0d6ccab97113ce635a14 | [
"BSD-3-Clause"
] | 4 | 2017-03-17T02:28:12.000Z | 2019-04-18T11:25:44.000Z | contextmonkey/contextlayer/ContextManagerInstance.py | manojrege/contextmonkey | 9974889a726d7f60c6da0d6ccab97113ce635a14 | [
"BSD-3-Clause"
] | null | null | null | contextmonkey/contextlayer/ContextManagerInstance.py | manojrege/contextmonkey | 9974889a726d7f60c6da0d6ccab97113ce635a14 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017, Technische Universität Berlin
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# - Redistributions of source code must retain t... | 47.261905 | 74 | 0.77733 |
ac0826dd46f1ed2e2f461a404adcfbb831b202ac | 628 | py | Python | django_discourse_connector/migrations/0002_auto_20190904_1646.py | KryptedGaming/django-discourse-connector | 3176e2400e2bef6db1867ef63394b4d66993efd7 | [
"MIT"
] | 1 | 2020-04-01T17:40:30.000Z | 2020-04-01T17:40:30.000Z | django_discourse_connector/migrations/0002_auto_20190904_1646.py | KryptedGaming/django-discourse-connector | 3176e2400e2bef6db1867ef63394b4d66993efd7 | [
"MIT"
] | null | null | null | django_discourse_connector/migrations/0002_auto_20190904_1646.py | KryptedGaming/django-discourse-connector | 3176e2400e2bef6db1867ef63394b4d66993efd7 | [
"MIT"
] | 1 | 2021-09-09T09:42:28.000Z | 2021-09-09T09:42:28.000Z | # Generated by Django 2.2.4 on 2019-09-04 16:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_discourse_connector', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='discourseclient',
na... | 25.12 | 69 | 0.601911 |
86352a680a3968024b678731fcfb2c4c7ff215d1 | 6,987 | py | Python | HW_Calibration.py | Abhi1588/PricingToolBox | 2c0bded1a6374c481113c972c819101df043d9f2 | [
"MIT"
] | null | null | null | HW_Calibration.py | Abhi1588/PricingToolBox | 2c0bded1a6374c481113c972c819101df043d9f2 | [
"MIT"
] | null | null | null | HW_Calibration.py | Abhi1588/PricingToolBox | 2c0bded1a6374c481113c972c819101df043d9f2 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import math
import seaborn as sns
import datetime as dt
from scipy.optimize import least_squares
class MarketCurves:
def __init__(self):
self.term_to_maturity = None
self.discount_factors = None
self.dates = None
self.ois_rate = None
## Th... | 37.767568 | 151 | 0.595678 |
c3a2e9e355b9fbaa3d205e3df47b35aaa3420ec9 | 1,932 | py | Python | python_modules/libraries/dagster-airflow/setup.py | withshubh/dagster | ff4a0db53e126f44097a337eecef54988cc718ef | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-airflow/setup.py | withshubh/dagster | ff4a0db53e126f44097a337eecef54988cc718ef | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-airflow/setup.py | withshubh/dagster | ff4a0db53e126f44097a337eecef54988cc718ef | [
"Apache-2.0"
] | null | null | null | from typing import Dict
from setuptools import find_packages, setup # type: ignore
def get_version() -> str:
version: Dict[str, str] = {}
with open("dagster_airflow/version.py") as fp:
exec(fp.read(), version) # pylint: disable=W0122
return version["__version__"]
if __name__ == "__main__":
... | 35.777778 | 98 | 0.558489 |
072d41eba34e1fef67128142ee1f9bee2e384b99 | 1,437 | py | Python | niyopolymers/accounts.py | venku31/niyopolymers | f150ee591d2ea10720d8e98c5f6abf7c6e2edb2d | [
"MIT"
] | null | null | null | niyopolymers/accounts.py | venku31/niyopolymers | f150ee591d2ea10720d8e98c5f6abf7c6e2edb2d | [
"MIT"
] | null | null | null | niyopolymers/accounts.py | venku31/niyopolymers | f150ee591d2ea10720d8e98c5f6abf7c6e2edb2d | [
"MIT"
] | null | null | null | import frappe
from frappe.utils import getdate, nowdate, cint, flt
import json
from datetime import date, timedelta, datetime
import time
from frappe.utils import formatdate
import ast
import itertools
@frappe.whitelist()
def set_approver_name(doc, method):
doc.approver_person = doc.modified_by
doc.approver_da... | 39.916667 | 134 | 0.64231 |
7631e13b609e1012758c9fe10e8cdac5be9480ef | 11,008 | py | Python | sdas/core/client/SDASClient.py | arcozelo/python4isttokoper | c17b0dc8c33ca37aaa3c4095a046aa4f22abae40 | [
"MIT"
] | null | null | null | sdas/core/client/SDASClient.py | arcozelo/python4isttokoper | c17b0dc8c33ca37aaa3c4095a046aa4f22abae40 | [
"MIT"
] | null | null | null | sdas/core/client/SDASClient.py | arcozelo/python4isttokoper | c17b0dc8c33ca37aaa3c4095a046aa4f22abae40 | [
"MIT"
] | null | null | null | """
SDAStime.py
Created on June 19, 2006, 14:00
<p>Title: SDAS</p>
<p>Description: Shared Data Access System</p>
<p>Copyright: (C) Copyright 2005-2006, by Centro de Fusao Nuclear
Project Info: http://baco.cfn.ist.utl.pt/sdas
http://www.cfn.ist.utl.pt
This library is free s... | 45.114754 | 140 | 0.661428 |
65c3195921e24194a981b0ab77302cdeefe93dd5 | 2,910 | py | Python | NiaPy/algorithms/basic/__init__.py | kivancguckiran/NiaPy | 06d3699c1466bfc54c4220a4aabe97cad50f75e4 | [
"MIT"
] | 2 | 2018-10-07T08:41:44.000Z | 2019-04-05T15:30:56.000Z | NiaPy/algorithms/basic/__init__.py | kivancguckiran/NiaPy | 06d3699c1466bfc54c4220a4aabe97cad50f75e4 | [
"MIT"
] | null | null | null | NiaPy/algorithms/basic/__init__.py | kivancguckiran/NiaPy | 06d3699c1466bfc54c4220a4aabe97cad50f75e4 | [
"MIT"
] | null | null | null | """Implementation of basic nature-inspired algorithms."""
# pylint: disable=line-too-long
from NiaPy.algorithms.basic.ba import BatAlgorithm
from NiaPy.algorithms.basic.fa import FireflyAlgorithm
from NiaPy.algorithms.basic.de import DifferentialEvolution, MultiStrategyDifferentialEvolution, DynNpDifferentialEvolution... | 44.769231 | 194 | 0.821306 |
fb705692b2182dd65d63851757cb8fb89c73f128 | 905 | py | Python | autotest/autotest/product/migrations/0001_initial.py | zhouxuerong/autotest | 8a3ecf9f532ecf676ccafc2f15b03001806aa0e5 | [
"MIT"
] | null | null | null | autotest/autotest/product/migrations/0001_initial.py | zhouxuerong/autotest | 8a3ecf9f532ecf676ccafc2f15b03001806aa0e5 | [
"MIT"
] | null | null | null | autotest/autotest/product/migrations/0001_initial.py | zhouxuerong/autotest | 8a3ecf9f532ecf676ccafc2f15b03001806aa0e5 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.3 on 2018-11-20 09:37
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Product',
fields=[
('id', models.AutoField(... | 31.206897 | 114 | 0.570166 |
d758f803989d92eb466b11f5a1a032636c9c206c | 298 | py | Python | deployment/wsgi.py | rmed/flask-modern-template | 9a0f9131dac505e94a6b22ac23f4b224fb8259a8 | [
"Unlicense"
] | null | null | null | deployment/wsgi.py | rmed/flask-modern-template | 9a0f9131dac505e94a6b22ac23f4b224fb8259a8 | [
"Unlicense"
] | null | null | null | deployment/wsgi.py | rmed/flask-modern-template | 9a0f9131dac505e94a6b22ac23f4b224fb8259a8 | [
"Unlicense"
] | null | null | null | #!/srv/myapp/venv/python
# Change above line to point to Python in virtual environment
import os
os.environ['APP_CONFIG'] = 'PATH_TO_CONFIG'
os.environ['FLASK_ENV'] = 'production'
# Change 'myapp' to package name
from myapp import init_app
app = init_app()
if __name__ == '__main__':
app.run()
| 21.285714 | 61 | 0.734899 |
b2592f7201826f2ce601118ae25890c77e32743e | 1,183 | py | Python | caldavclientlibrary/browser/commands/whoami.py | LaudateCorpus1/ccs-caldavclientlibrary | 5b1db7f3b49f03ba715f7286f71ddb9f54ddddac | [
"Apache-2.0"
] | 49 | 2016-08-22T17:34:34.000Z | 2021-11-08T09:47:45.000Z | caldavclientlibrary/browser/commands/whoami.py | DalavanCloud/ccs-caldavclientlibrary | ce8d554b8a0bcb13468f2dc87eef77da2302d6b3 | [
"Apache-2.0"
] | null | null | null | caldavclientlibrary/browser/commands/whoami.py | DalavanCloud/ccs-caldavclientlibrary | ce8d554b8a0bcb13468f2dc87eef77da2302d6b3 | [
"Apache-2.0"
] | 18 | 2017-01-21T22:28:04.000Z | 2022-03-26T11:57:30.000Z | ##
# Copyright (c) 2007-2016 Apple 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 by applicable l... | 29.575 | 74 | 0.698225 |
6a567a7529a9df269f1be5271641ab133701d994 | 18,995 | py | Python | doozerlib/assembly_inspector.py | vfreex/doozer | 8ad0a1234120cdc30890afbbdda1bc40e4a4fc76 | [
"Apache-2.0"
] | null | null | null | doozerlib/assembly_inspector.py | vfreex/doozer | 8ad0a1234120cdc30890afbbdda1bc40e4a4fc76 | [
"Apache-2.0"
] | null | null | null | doozerlib/assembly_inspector.py | vfreex/doozer | 8ad0a1234120cdc30890afbbdda1bc40e4a4fc76 | [
"Apache-2.0"
] | null | null | null | from typing import List, Dict, Optional
from koji import ClientSession
from kobo.rpmlib import parse_nvr
from doozerlib import rhcos, Runtime
from doozerlib import util
from doozerlib.image import BrewBuildImageInspector
from doozerlib.rpmcfg import RPMMetadata
from doozerlib.assembly import assembly_rhcos_config, As... | 61.07717 | 279 | 0.65512 |
4502e67cd1a67da5a6dbbbd1fff2246d5f38a297 | 4,161 | py | Python | dags/trends_places_to_sheets_via_query_dag.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | null | null | null | dags/trends_places_to_sheets_via_query_dag.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | 6 | 2021-03-19T12:00:18.000Z | 2022-02-10T09:43:42.000Z | dags/trends_places_to_sheets_via_query_dag.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | null | null | null | ###########################################################################
#
# Copyright 2019 Google 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
#
# https://www.apache.org... | 26.845161 | 90 | 0.489065 |
14bab217d4d0b37a96c71047185f8a1311c95520 | 4,697 | py | Python | weechat/.weechat/python/autoload/buffertape.py | scobiehague/dotfiles | b5819fb09be3d0b1ed43ef1a56d6f196609ec47b | [
"MIT"
] | 117 | 2015-02-14T14:35:49.000Z | 2022-03-02T01:46:23.000Z | weechat/.weechat/python/autoload/buffertape.py | scobiehague/dotfiles | b5819fb09be3d0b1ed43ef1a56d6f196609ec47b | [
"MIT"
] | 4 | 2019-03-28T23:51:42.000Z | 2022-02-23T08:45:25.000Z | weechat/.weechat/python/autoload/buffertape.py | scobiehague/dotfiles | b5819fb09be3d0b1ed43ef1a56d6f196609ec47b | [
"MIT"
] | 23 | 2015-11-28T01:49:27.000Z | 2021-12-13T16:17:54.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2015 by sdothum <sdothum@gmail.com>
#
# In lieu of message timestamps, issue buffer timestamp clock per hourly interval
#
# 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 Soft... | 43.091743 | 135 | 0.64786 |
032a289c6d37c7ed6fefcf1dc4835c59a600686a | 6,768 | py | Python | ZenUnitDevOpsPythonTests/BuildAndTestZenUnitAndMetalMockTests.py | NeilJustice/ZenUnit | 6ddbe157e4652ac76aa074a70f9f83e34ee779df | [
"MIT"
] | 2 | 2018-04-21T06:38:53.000Z | 2018-08-31T00:56:21.000Z | ZenUnitDevOpsPythonTests/BuildAndTestZenUnitAndMetalMockTests.py | NeilJustice/ZenUnitAndZenMock | bbcb4221d063fa04e4ef3a98143e0f123e3af8d5 | [
"MIT"
] | 1 | 2021-03-03T07:19:16.000Z | 2021-03-28T21:46:32.000Z | ZenUnitDevOpsPythonTests/BuildAndTestZenUnitAndMetalMockTests.py | NeilJustice/ZenUnitAndZenMock | bbcb4221d063fa04e4ef3a98143e0f123e3af8d5 | [
"MIT"
] | null | null | null | import os
import platform
import sys
import unittest
from unittest.mock import call, patch
import docopt # type: ignore
from ZenUnitDevOpsPython import CMake, BuildAndTestZenUnitAndMetalMock, Process, UnitTester
from ZenUnitDevOpsPythonTests import Random
testNames = [
'test_docstring__IsExpectedString',
't... | 61.527273 | 243 | 0.708333 |
6b900f96736db50e72a641f5ea78e4476c7868ba | 50,133 | py | Python | ogusa/SS.py | rickecon/TaxFuncIntegr | 715cc76e3305c00dd64d79521c504bb388c6d87d | [
"CC0-1.0"
] | null | null | null | ogusa/SS.py | rickecon/TaxFuncIntegr | 715cc76e3305c00dd64d79521c504bb388c6d87d | [
"CC0-1.0"
] | 1 | 2018-07-02T18:24:17.000Z | 2018-07-02T18:24:17.000Z | ogusa/SS.py | rickecon/TaxFuncIntegr | 715cc76e3305c00dd64d79521c504bb388c6d87d | [
"CC0-1.0"
] | 6 | 2016-09-18T01:39:54.000Z | 2020-09-02T12:54:55.000Z | from __future__ import print_function
'''
------------------------------------------------------------------------
Calculates steady state of OG-USA model with S age cohorts and J
ability types.
This py-file calls the following other file(s):
tax.py
household.py
firm.py
... | 42.057886 | 84 | 0.570642 |
f2a30443dcdb0da20a4d59a1d035832fe0477d18 | 319 | py | Python | meduzer/blog/postforms/postforms.py | Stanlyzoolo/meduzer | 8acbe57229cf108950afcd2b334e888eac633fae | [
"Apache-2.0"
] | null | null | null | meduzer/blog/postforms/postforms.py | Stanlyzoolo/meduzer | 8acbe57229cf108950afcd2b334e888eac633fae | [
"Apache-2.0"
] | null | null | null | meduzer/blog/postforms/postforms.py | Stanlyzoolo/meduzer | 8acbe57229cf108950afcd2b334e888eac633fae | [
"Apache-2.0"
] | null | null | null | from blog.forms import PostForm
from blog.models import Post
class SimplePostForm(PostForm):
class Meta(PostForm.Meta):
model = Post
fields = ["author", "title", "body", "bibliography"]
class FullPostForm(PostForm):
class Meta(PostForm.Meta):
model = Post
fields = "__all__"
| 21.266667 | 60 | 0.655172 |
fe3b1d0f5b2aab43a32af2362c0230ab9b0b6568 | 599 | py | Python | pymysql/tests/__init__.py | FredericoCoelhoNunes/PyMySQL | 4137b067a2f365b2f051744c55a839c2176b19de | [
"MIT"
] | 6,773 | 2015-01-03T16:01:30.000Z | 2022-03-31T09:59:46.000Z | pymysql/tests/__init__.py | FredericoCoelhoNunes/PyMySQL | 4137b067a2f365b2f051744c55a839c2176b19de | [
"MIT"
] | 630 | 2015-01-11T07:34:26.000Z | 2022-03-31T05:00:59.000Z | pymysql/tests/__init__.py | FredericoCoelhoNunes/PyMySQL | 4137b067a2f365b2f051744c55a839c2176b19de | [
"MIT"
] | 1,495 | 2015-01-03T01:07:12.000Z | 2022-03-29T08:58:02.000Z | # Sorted by alphabetical order
from pymysql.tests.test_DictCursor import *
from pymysql.tests.test_SSCursor import *
from pymysql.tests.test_basic import *
from pymysql.tests.test_connection import *
from pymysql.tests.test_converters import *
from pymysql.tests.test_cursor import *
from pymysql.tests.test_err import *... | 29.95 | 43 | 0.806344 |
a2a3f201c3aeac4b61aec842c29e56d9ffd839d0 | 1,432 | py | Python | historical_data_acquire.py | snaray12/luigi-demo | e9455d47cd6bd321f6f04ea5c59b7fc44f23014f | [
"Apache-2.0"
] | 1 | 2021-02-21T09:34:20.000Z | 2021-02-21T09:34:20.000Z | historical_data_acquire.py | snaray12/luigi-demo | e9455d47cd6bd321f6f04ea5c59b7fc44f23014f | [
"Apache-2.0"
] | null | null | null | historical_data_acquire.py | snaray12/luigi-demo | e9455d47cd6bd321f6f04ea5c59b7fc44f23014f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Nov 14 14:12:51 2020
@author: sundararaman
"""
import luigi
import os
import requests
#from bs4 import BeautifulSoup
#import util
#import csv
import time
DATA_DIR = 'data'
INPUT_FILE = "stklist.txt"
PREFIX_URL = ""
SUFFIX_URL = "?period1=820454400&period2=1605830400&interva... | 29.22449 | 134 | 0.621508 |
50d1c2012dd4f83e7e4df4bb17f65b371407868c | 20,157 | py | Python | test/rpc/test_base.py | jasonkriss/dbt | c26cf1977cab35232c4d670e7a73655b47272612 | [
"Apache-2.0"
] | null | null | null | test/rpc/test_base.py | jasonkriss/dbt | c26cf1977cab35232c4d670e7a73655b47272612 | [
"Apache-2.0"
] | null | null | null | test/rpc/test_base.py | jasonkriss/dbt | c26cf1977cab35232c4d670e7a73655b47272612 | [
"Apache-2.0"
] | null | null | null | # flake8: disable=redefined-outer-name
import time
import yaml
from .util import (
ProjectDefinition, rpc_server, Querier, built_schema, get_querier,
)
def test_rpc_basics(project_root, profiles_root, postgres_profile, unique_schema):
project = ProjectDefinition(
models={'my_model.sql': 'select 1 as i... | 33.82047 | 118 | 0.647666 |
525d27c09f305908b5d1e45f595e19fab447e936 | 995 | py | Python | kubernetes/test/test_apps_v1beta1_scale_spec.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_apps_v1beta1_scale_spec.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_apps_v1beta1_scale_spec.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... | 22.111111 | 105 | 0.718593 |
ae1b9ff4dd617fc57c7c64f928a47bd0f18f5c22 | 7,895 | py | Python | corehq/apps/userreports/reports/factory.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 1 | 2020-07-14T13:00:23.000Z | 2020-07-14T13:00:23.000Z | corehq/apps/userreports/reports/factory.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 94 | 2020-12-11T06:57:31.000Z | 2022-03-15T10:24:06.000Z | corehq/apps/userreports/reports/factory.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | null | null | null | import json
from django.conf import settings
from django.utils.translation import ugettext as _
from jsonobject.exceptions import BadValueError
from corehq.apps.userreports.const import AGGGREGATION_TYPE_ARRAY_AGG_LAST_VALUE
from corehq.apps.userreports.exceptions import BadSpecError
from corehq.apps.userreports.rep... | 37.956731 | 112 | 0.69259 |
cd08dac10e37642269ea43fa13c5d41aa53d6946 | 10,796 | py | Python | anndata/tests/base.py | lasersonlab/anndata | 9e958a573364451bc57fe4826aba67e653862802 | [
"BSD-3-Clause"
] | null | null | null | anndata/tests/base.py | lasersonlab/anndata | 9e958a573364451bc57fe4826aba67e653862802 | [
"BSD-3-Clause"
] | null | null | null | anndata/tests/base.py | lasersonlab/anndata | 9e958a573364451bc57fe4826aba67e653862802 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from numpy import ma
import pandas as pd
from scipy import sparse as sp
from anndata import AnnData
def test_creation():
AnnData(np.array([[1, 2], [3, 4]]))
AnnData(np.array([[1, 2], [3, 4]]), {}, {})
AnnData(ma.array([[1, 2], [3, 4]]), uns={'mask': [0, 1, 1, 0]})
AnnData(sp.eye(2)... | 34.713826 | 101 | 0.500926 |
ff8232644eee49428cb2e286bad15570d2ab854f | 34,780 | py | Python | neutron/api/v2/base.py | WeifanFu-bsn/neutron | 44be070a3e459d6b254cf46e0c878679aa30350f | [
"Apache-2.0"
] | null | null | null | neutron/api/v2/base.py | WeifanFu-bsn/neutron | 44be070a3e459d6b254cf46e0c878679aa30350f | [
"Apache-2.0"
] | null | null | null | neutron/api/v2/base.py | WeifanFu-bsn/neutron | 44be070a3e459d6b254cf46e0c878679aa30350f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2012 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | 45.703022 | 79 | 0.580219 |
386249ec77bb2a7a859cdffd10d7a18b00fb4ae4 | 15,686 | py | Python | tools/multi_gpu_train.py | DetectionTeamUCAS/RetinaNet_Tensorflow | bf05e25a11b420649f1c3f8bc58af66ba7bdf5c8 | [
"MIT"
] | 55 | 2019-05-23T02:42:48.000Z | 2021-11-22T08:18:46.000Z | tools/multi_gpu_train.py | DetectionTeamUCAS/RetinaNet_Tensorflow | bf05e25a11b420649f1c3f8bc58af66ba7bdf5c8 | [
"MIT"
] | 7 | 2019-06-05T11:29:14.000Z | 2020-12-12T11:44:49.000Z | tools/multi_gpu_train.py | DetectionTeamUCAS/RetinaNet_Tensorflow | bf05e25a11b420649f1c3f8bc58af66ba7bdf5c8 | [
"MIT"
] | 20 | 2019-06-01T01:17:14.000Z | 2021-04-29T15:08:02.000Z | # -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import tensorflow as tf
import tensorflow.contrib.slim as slim
import os, sys
import numpy as np
import time
sys.path.append("../")
from libs.configs import cfgs
from libs.networks impo... | 44.436261 | 135 | 0.540801 |
1ce6037b7abf4393c1a6cbbe6947dd1900dd00b9 | 3,824 | py | Python | Sequence Models/Trigger word detection/rnn_model.py | flavorfan/deep-learning-coursera | 6aa1274a450fcb7a57c04072fe3bcf416501bdc6 | [
"MIT"
] | null | null | null | Sequence Models/Trigger word detection/rnn_model.py | flavorfan/deep-learning-coursera | 6aa1274a450fcb7a57c04072fe3bcf416501bdc6 | [
"MIT"
] | null | null | null | Sequence Models/Trigger word detection/rnn_model.py | flavorfan/deep-learning-coursera | 6aa1274a450fcb7a57c04072fe3bcf416501bdc6 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import pyaudio
from keras.callbacks import ModelCheckpoint
from keras.callbacks import TensorBoard
from keras.models import Model, load_model, Sequential
from keras.layers import Dense, Activation, Dropout, Input, Masking, TimeDistribut... | 32.965517 | 98 | 0.652458 |
e9257f73df1837a96a6f645b7c07d82de8b2edbd | 14,318 | py | Python | rocket_builder.py | Rocketbase-AI/rockets-igor_retinanet | 1f68385e874e133fc95a2c247d9e5611b6951678 | [
"MIT"
] | null | null | null | rocket_builder.py | Rocketbase-AI/rockets-igor_retinanet | 1f68385e874e133fc95a2c247d9e5611b6951678 | [
"MIT"
] | null | null | null | rocket_builder.py | Rocketbase-AI/rockets-igor_retinanet | 1f68385e874e133fc95a2c247d9e5611b6951678 | [
"MIT"
] | null | null | null | import os
from .architecture import resnet50
import torch
import torch.nn as nn
from torchvision import transforms, utils
import types
from PIL import Image, ImageDraw
import numpy as np
import math
import json
from .architecture import ClassificationModel
def load_classes(path):
"""
Loads class labels at 'pa... | 36.712821 | 118 | 0.620617 |
2bfc0f55d89fff2a1a09239227e4810877ec81e9 | 3,996 | py | Python | openapi_core/schema/schemas/factories.py | ElucidataLtd/openapi-core | 2a8b9c9739bd22b4c68b4406a0a31066c9fede35 | [
"BSD-3-Clause"
] | null | null | null | openapi_core/schema/schemas/factories.py | ElucidataLtd/openapi-core | 2a8b9c9739bd22b4c68b4406a0a31066c9fede35 | [
"BSD-3-Clause"
] | null | null | null | openapi_core/schema/schemas/factories.py | ElucidataLtd/openapi-core | 2a8b9c9739bd22b4c68b4406a0a31066c9fede35 | [
"BSD-3-Clause"
] | null | null | null | """OpenAPI core schemas factories module"""
import logging
from openapi_core.compat import lru_cache
from openapi_core.schema.properties.generators import PropertiesGenerator
from openapi_core.schema.schemas.models import Schema
log = logging.getLogger(__name__)
class SchemaFactory(object):
def __init__(self, ... | 38.057143 | 104 | 0.654154 |
d2022a05e9fa05dd889b274ce748260a56f2c5b0 | 74 | py | Python | venv/lib/python3.8/site-packages/traittypes/__init__.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 27 | 2017-03-23T14:24:58.000Z | 2022-01-22T00:24:15.000Z | venv/lib/python3.8/site-packages/traittypes/__init__.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 26 | 2017-02-22T10:28:50.000Z | 2022-02-23T09:10:56.000Z | venv/lib/python3.8/site-packages/traittypes/__init__.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 20 | 2017-03-23T14:25:00.000Z | 2021-04-08T11:32:11.000Z | from .traittypes import *
from ._version import version_info, __version__
| 24.666667 | 47 | 0.824324 |
4a1354a955034544dd9d8f8e1edf0fc881262db7 | 3,204 | py | Python | day2/pytorch_dvc_cnn_simple_hvd.py | wikfeldt/intro-to-dl | 7fb1fb6c520941143000c5e1b46c48c95db17ed6 | [
"MIT"
] | 59 | 2018-04-27T04:34:41.000Z | 2022-03-16T02:43:50.000Z | day2/pytorch_dvc_cnn_simple_hvd.py | wikfeldt/intro-to-dl | 7fb1fb6c520941143000c5e1b46c48c95db17ed6 | [
"MIT"
] | 1 | 2020-10-10T05:04:00.000Z | 2020-10-12T08:19:38.000Z | day2/pytorch_dvc_cnn_simple_hvd.py | wikfeldt/intro-to-dl | 7fb1fb6c520941143000c5e1b46c48c95db17ed6 | [
"MIT"
] | 53 | 2017-04-14T09:35:04.000Z | 2022-02-28T19:19:36.000Z | # coding: utf-8
# Dogs-vs-cats classification with CNNs
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from datetime import datetime
import horovod.torch as hvd
from pytorch_dvc_cnn_hvd import get_train_loader, get_validation_loader, get_test_loader
from pytorch_dvc_cn... | 27.86087 | 89 | 0.627029 |
6fb277c4feb541e00e71cf47cbfcd2ef6709d657 | 5,554 | py | Python | tensorflow_io/python/ops/prometheus_dataset_ops.py | lgeiger/io | 90be860451a705e2fbe8cfdec3c30030112b5c69 | [
"Apache-2.0"
] | 558 | 2018-11-09T22:45:27.000Z | 2022-03-24T04:59:36.000Z | tensorflow_io/python/ops/prometheus_dataset_ops.py | lgeiger/io | 90be860451a705e2fbe8cfdec3c30030112b5c69 | [
"Apache-2.0"
] | 1,122 | 2018-12-09T03:30:40.000Z | 2022-03-31T16:22:15.000Z | tensorflow_io/python/ops/prometheus_dataset_ops.py | lgeiger/io | 90be860451a705e2fbe8cfdec3c30030112b5c69 | [
"Apache-2.0"
] | 319 | 2018-12-09T00:18:47.000Z | 2022-03-30T21:49:46.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.540146 | 87 | 0.569139 |
99bd27207d2dc9d1ef67a5382939fdc9447776f8 | 9,733 | py | Python | examples/semi_supervised_vae/vae_ssl_rws.py | ycguo028/zhusuan | 244536d93c55e486a3587e53229f0a7e1b19bef0 | [
"MIT"
] | 4 | 2017-05-23T20:18:41.000Z | 2020-03-03T15:00:53.000Z | examples/semi_supervised_vae/vae_ssl_rws.py | ycguo028/zhusuan | 244536d93c55e486a3587e53229f0a7e1b19bef0 | [
"MIT"
] | null | null | null | examples/semi_supervised_vae/vae_ssl_rws.py | ycguo028/zhusuan | 244536d93c55e486a3587e53229f0a7e1b19bef0 | [
"MIT"
] | 2 | 2018-11-27T02:43:22.000Z | 2019-11-23T18:27:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import os
import time
import tensorflow as tf
from tensorflow.contrib import layers
from six.moves import range
import numpy as np
import zhusuan as zs
from examp... | 42.502183 | 79 | 0.602178 |
27213708d0708d345e6e9fc9ed3e664f373f05e9 | 18,847 | py | Python | main.py | zhang-changwei/Font-Manager-Lite | cdfdab3e0abadd8aca1c52c8c4bff85733b820bc | [
"MIT"
] | null | null | null | main.py | zhang-changwei/Font-Manager-Lite | cdfdab3e0abadd8aca1c52c8c4bff85733b820bc | [
"MIT"
] | null | null | null | main.py | zhang-changwei/Font-Manager-Lite | cdfdab3e0abadd8aca1c52c8c4bff85733b820bc | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import ttk
from tkinter import filedialog
from tkinter import messagebox
import displaytag
import displaymenu
import displaynotebook
import displaytop
import myfont
import config
import re
import os
class App:
def __init__(self):
self.root = tk.Tk()
self.r... | 42.448198 | 141 | 0.608585 |
912682034c3e5c78d578a59fdb1ff8a828568ff5 | 24,546 | py | Python | source/main.py | LawtonAlyssa/ENGR4500_Research | 19dab5e41a4a4d5dbfa0babdd7b2d24d5efc86bd | [
"MIT"
] | null | null | null | source/main.py | LawtonAlyssa/ENGR4500_Research | 19dab5e41a4a4d5dbfa0babdd7b2d24d5efc86bd | [
"MIT"
] | null | null | null | source/main.py | LawtonAlyssa/ENGR4500_Research | 19dab5e41a4a4d5dbfa0babdd7b2d24d5efc86bd | [
"MIT"
] | null | null | null | from ctypes import sizeof
import traceback
from matplotlib.pyplot import axis
import pandas as pd
import numpy as np
from datetime import datetime
from time import sleep
from tqdm import tqdm
import random
import warnings
from sklearn.metrics import accuracy_score
from sklearn.metrics import mean_squared_error
from skl... | 48.605941 | 223 | 0.695999 |
781581103a4a96711dd69f2a2d6fb5a87ea13241 | 652 | py | Python | src/uefi/BaseTools/Source/Python/Ecc/MetaFileWorkspace/__init__.py | kkennett/oscore.dev | 59e786f12f9af969211c95a9d2863b1767528341 | [
"BSD-3-Clause"
] | 521 | 2019-03-29T15:44:08.000Z | 2022-03-22T09:46:19.000Z | src/uefi/BaseTools/Source/Python/Ecc/MetaFileWorkspace/__init__.py | kkennett/oscore.dev | 59e786f12f9af969211c95a9d2863b1767528341 | [
"BSD-3-Clause"
] | 30 | 2019-06-04T17:00:49.000Z | 2021-09-08T20:44:19.000Z | src/uefi/BaseTools/Source/Python/Ecc/MetaFileWorkspace/__init__.py | kkennett/oscore.dev | 59e786f12f9af969211c95a9d2863b1767528341 | [
"BSD-3-Clause"
] | 99 | 2019-03-29T16:04:13.000Z | 2022-03-28T16:59:34.000Z | ## @file
# Python 'Workspace' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under th... | 40.75 | 84 | 0.773006 |
aa3e3062f27b0c6d5893c51496810d7b5c51de8d | 1,083 | py | Python | examples/env_demo.py | d3sm0/microgridRLsimulator | 2721dd56430ff81a5ebd86fef6a94ed4acd1f26d | [
"BSD-2-Clause"
] | null | null | null | examples/env_demo.py | d3sm0/microgridRLsimulator | 2721dd56430ff81a5ebd86fef6a94ed4acd1f26d | [
"BSD-2-Clause"
] | null | null | null | examples/env_demo.py | d3sm0/microgridRLsimulator | 2721dd56430ff81a5ebd86fef6a94ed4acd1f26d | [
"BSD-2-Clause"
] | null | null | null | """
This demo shows how to create an interact with an environment.
"""
from microgridRLsimulator.gym_wrapper import MicrogridEnv
# Initialize environment
def main():
env_init = {
"start_date": "2016-01-01",
"end_date": "2016-01-31",
"case": "elespino"
}
params = {
"action... | 22.5625 | 62 | 0.570637 |
1800e032b9df19747537ba2dadb202c0a5dc1581 | 221 | py | Python | ex11.py | iXylph/Zedd | 2b93bb3293019d6d3c9e2a65f1a91e7702980797 | [
"bzip2-1.0.6"
] | null | null | null | ex11.py | iXylph/Zedd | 2b93bb3293019d6d3c9e2a65f1a91e7702980797 | [
"bzip2-1.0.6"
] | null | null | null | ex11.py | iXylph/Zedd | 2b93bb3293019d6d3c9e2a65f1a91e7702980797 | [
"bzip2-1.0.6"
] | null | null | null | print "How old are you?",
age = raw_input()
print "How tall are you?",
height = raw_input()
print "How much do you weight?",
weight = raw_input()
print "So you're %r old, %r tall and %r heavy." % (
age, height, weight) | 27.625 | 51 | 0.656109 |
a5e29c544889ffba581dbfed2b7c30fa54dc1487 | 191 | py | Python | wsgi/server.py | yunqingqing/blog | d2b12d5f5f48e7eac425e15059aab5c8bf02aceb | [
"Apache-2.0"
] | 1 | 2018-04-01T14:30:16.000Z | 2018-04-01T14:30:16.000Z | wsgi/server.py | yunqingqing/experiments | d2b12d5f5f48e7eac425e15059aab5c8bf02aceb | [
"Apache-2.0"
] | 1 | 2018-04-01T14:29:58.000Z | 2018-04-01T14:29:58.000Z | wsgi/server.py | yunqingqing/experiments | d2b12d5f5f48e7eac425e15059aab5c8bf02aceb | [
"Apache-2.0"
] | null | null | null | from wsgiref.simple_server import make_server
from my_app import app
from middleware import TestMiddleware
httpd = make_server('localhost', 8000, TestMiddleware(app))
httpd.serve_forever() | 23.875 | 59 | 0.827225 |
bc50bb94a11b4d794ed96158a1282e9f08076769 | 642 | py | Python | lesson02/xuegangqiang/sort.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | lesson02/xuegangqiang/sort.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | lesson02/xuegangqiang/sort.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Auth : xuegqcto@aliyun.com
# 冒泡排序
"""
索引取值,解包法赋值
"""
l1 = [1, 28, 9, 21, 12, 33, 22, 10]
for i in range(len(l1)-1):
if l1[i] > l1[i+1]:
l1[i], l1[i+1] = l1[i+1], l1[i]
print(l1)
"""
索引取值,两两比较,临时数值暂存值,A、B交换法
"""
l1 = [1, 28, 9, 21, 12, 33, 22, 10]
tmp = ... | 13.659574 | 47 | 0.461059 |
2aa1ec8d55928fad9c01a6e9f8e0454afcb03677 | 1,633 | py | Python | pyaz/webapp/config/snapshot/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/webapp/config/snapshot/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/webapp/config/snapshot/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | 1 | 2022-02-03T09:12:01.000Z | 2022-02-03T09:12:01.000Z | '''
Manage web app snapshots.
'''
from .... pyaz_utils import _call_az
def list(name, resource_group, slot=None):
'''
List the restorable snapshots for a web app.
Required Parameters:
- name -- name of the web app. If left unspecified, a name will be randomly generated. You can configure the default u... | 42.973684 | 163 | 0.714023 |
7157c7d7e231da6f11d609f13a03bc4004721edb | 1,471 | py | Python | Python/rle.py | familug/FAMILUG | ef8c11d92f4038d80f3f1a24cbab022c19791acf | [
"BSD-2-Clause"
] | 5 | 2015-10-13T04:13:04.000Z | 2020-12-23T13:47:43.000Z | Python/rle.py | familug/FAMILUG | ef8c11d92f4038d80f3f1a24cbab022c19791acf | [
"BSD-2-Clause"
] | null | null | null | Python/rle.py | familug/FAMILUG | ef8c11d92f4038d80f3f1a24cbab022c19791acf | [
"BSD-2-Clause"
] | 8 | 2015-07-20T15:37:38.000Z | 2021-04-14T07:18:10.000Z | # Run Length Encoding
# The manual version and other version using groupby
# See http://rosettacode.org/wiki/Run-length_encoding#Python for groupby
import itertools
def rle(string):
if string == '':
raise ValueError("string must not empty")
print("*Input: %s" % string)
prev_c = string[0]
pr... | 26.745455 | 99 | 0.551326 |
1aa7d9433a863487e321364efaa203417f3c7393 | 3,676 | py | Python | recipes/protobuf/3.9.x/conanfile.py | flexferrum/conan-center-index | 5d0fb36e1e0b757e6deebc330c34d07dc1a5a7a5 | [
"MIT"
] | null | null | null | recipes/protobuf/3.9.x/conanfile.py | flexferrum/conan-center-index | 5d0fb36e1e0b757e6deebc330c34d07dc1a5a7a5 | [
"MIT"
] | 4 | 2020-03-04T20:19:54.000Z | 2020-03-10T13:56:28.000Z | recipes/protobuf/3.9.x/conanfile.py | GavinNL/conan-center-index | 0ae829a362c1cc6a20d97e023ca0aafc805797c3 | [
"MIT"
] | null | null | null | import os
from conans import ConanFile, CMake, tools
from conans.errors import ConanInvalidConfiguration
from conans.tools import Version
class ProtobufConan(ConanFile):
name = "protobuf"
description = "Protocol Buffers - Google's data interchange format"
topics = ("conan", "protobuf", "protocol-buffers",... | 41.303371 | 120 | 0.655332 |
a23b7b5a2bf75eb796bf360dbec7153147350a30 | 1,154 | py | Python | app/ch10_using_sqlachemy/starter/pypi_org/bin/basic_insert.py | JanOetting/data-driven-web-apps-with-flask | b072e097d69688d8debf9a673052ed96dfbcff5a | [
"MIT"
] | null | null | null | app/ch10_using_sqlachemy/starter/pypi_org/bin/basic_insert.py | JanOetting/data-driven-web-apps-with-flask | b072e097d69688d8debf9a673052ed96dfbcff5a | [
"MIT"
] | null | null | null | app/ch10_using_sqlachemy/starter/pypi_org/bin/basic_insert.py | JanOetting/data-driven-web-apps-with-flask | b072e097d69688d8debf9a673052ed96dfbcff5a | [
"MIT"
] | null | null | null | import os
from pypi_org.data import db_session
from pypi_org.data.package import Package
from pypi_org.data.releases import Release
def insert_a_package():
p=Package()
p.id=input("Package ID/Name:").strip().lower()
p.summary=input("Summary: ").strip()
p.license=input("Licence").strip()
p.author_n... | 22.627451 | 50 | 0.635182 |
67b952a51b8ac47fa0447adcb68fc15da99c17a5 | 6,309 | py | Python | test/test_ftintitle.py | amishb/beets | 631e097d48e49bf805b7e85d78ca83dfefba23f2 | [
"MIT"
] | 1 | 2015-05-09T20:04:33.000Z | 2015-05-09T20:04:33.000Z | test/test_ftintitle.py | amishb/beets | 631e097d48e49bf805b7e85d78ca83dfefba23f2 | [
"MIT"
] | null | null | null | test/test_ftintitle.py | amishb/beets | 631e097d48e49bf805b7e85d78ca83dfefba23f2 | [
"MIT"
] | null | null | null | # This file is part of beets.
# Copyright 2015, Fabrice Laporte.
#
# 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,... | 36.680233 | 78 | 0.575527 |
27329eaa5730414c64c435f9abdce5c466981dbe | 631 | py | Python | manage.py | Phoenixrr2113/backend | 8c1ade1a897cd791e1a95954b3d3ea368cbadf72 | [
"MIT"
] | null | null | null | manage.py | Phoenixrr2113/backend | 8c1ade1a897cd791e1a95954b3d3ea368cbadf72 | [
"MIT"
] | 10 | 2019-08-02T03:14:30.000Z | 2022-02-10T07:56:01.000Z | manage.py | Phoenixrr2113/backend | 8c1ade1a897cd791e1a95954b3d3ea368cbadf72 | [
"MIT"
] | 1 | 2019-08-02T03:36:30.000Z | 2019-08-02T03:36:30.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dungeonMUD.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Imp... | 27.434783 | 74 | 0.683043 |
f3ecf7bea0d1abb188d8ad989c2e88972ef95e76 | 293,732 | py | Python | src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py | yareyes/azure-cli | 39a717bc5076758cc3a46961905207f62c0fd80a | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py | yareyes/azure-cli | 39a717bc5076758cc3a46961905207f62c0fd80a | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py | yareyes/azure-cli | 39a717bc5076758cc3a46961905207f62c0fd80a | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | 55.641599 | 321 | 0.612882 |
e11e57051e65c1ac31e38c8702e8e4685bb97417 | 60 | py | Python | ogr/constant.py | dhodovsk/ogr | 3406ae63b863b353d6f53091ee4873c8ea4d57ab | [
"MIT"
] | null | null | null | ogr/constant.py | dhodovsk/ogr | 3406ae63b863b353d6f53091ee4873c8ea4d57ab | [
"MIT"
] | 19 | 2020-03-10T08:06:43.000Z | 2020-03-30T13:08:56.000Z | ogr/constant.py | dhodovsk/ogr | 3406ae63b863b353d6f53091ee4873c8ea4d57ab | [
"MIT"
] | null | null | null | CLONE_TIMEOUT = 60
DEFAULT_RO_PREFIX_STRING = "READ ONLY: "
| 20 | 40 | 0.783333 |
7f64552210e7a830d5d2957cb2a60a3dfca30435 | 6,049 | py | Python | versions/1.1.3/blog/urls.py | mnp-fuf/django-bona-blog | ca9afd301345ece8074ccb696959feb6b8ca14b3 | [
"MIT"
] | 92 | 2020-07-08T05:24:53.000Z | 2022-03-16T05:53:47.000Z | versions/1.1.3/blog/urls.py | mnp-fuf/django-bona-blog | ca9afd301345ece8074ccb696959feb6b8ca14b3 | [
"MIT"
] | 9 | 2020-07-12T15:16:52.000Z | 2022-03-12T09:48:10.000Z | versions/1.1.3/blog/urls.py | mnp-fuf/django-bona-blog | ca9afd301345ece8074ccb696959feb6b8ca14b3 | [
"MIT"
] | 45 | 2020-07-10T09:20:45.000Z | 2022-03-19T18:53:18.000Z | # Core Django imports.
from django.urls import path
# Blog application imports.
from blog.views.blog.article_views import (
ArticleListView,
ArticleDetailView,
ArticleSearchListView,
TagArticlesListView,
)
from blog.views.blog.category_views import (
CategoryArticlesListView,
CategoriesListVie... | 21.15035 | 62 | 0.612002 |
4e4ab1e1c9fc2503a6713dd2624461bb58d8fd10 | 131 | py | Python | network/datadog_checks/network/__about__.py | Nordstrom/integrations-core | cae4e8a77f3539a091899b911fcd60db0c815bfb | [
"BSD-3-Clause"
] | null | null | null | network/datadog_checks/network/__about__.py | Nordstrom/integrations-core | cae4e8a77f3539a091899b911fcd60db0c815bfb | [
"BSD-3-Clause"
] | null | null | null | network/datadog_checks/network/__about__.py | Nordstrom/integrations-core | cae4e8a77f3539a091899b911fcd60db0c815bfb | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
__version__ = '1.11.5'
| 21.833333 | 59 | 0.709924 |
df55b5a216e6910f5d609d05872324e8432550b6 | 798 | py | Python | backend/tests/test_searchController.py | teruto725/kanji-visualization | 7a980546d32846ad0eb4883215b727936cdcb51f | [
"MIT"
] | 4 | 2022-01-07T06:00:36.000Z | 2022-01-07T07:58:04.000Z | backend/tests/test_searchController.py | teruto725/kanji-visualization | 7a980546d32846ad0eb4883215b727936cdcb51f | [
"MIT"
] | 66 | 2022-01-07T06:15:44.000Z | 2022-02-22T06:04:17.000Z | backend/tests/test_searchController.py | teruto725/kanji-visualization | 7a980546d32846ad0eb4883215b727936cdcb51f | [
"MIT"
] | 1 | 2022-01-24T12:49:09.000Z | 2022-01-24T12:49:09.000Z | from controller.SearchController import SearchController
def test_normal():
is_success, error_info = SearchController.check_input("山")
assert is_success
def test_invalid1():
is_success, error_info = SearchController.check_input("a")
assert not is_success
assert error_info == {"status_code": 400,... | 28.5 | 88 | 0.714286 |
739a2272cbe8504e7f0bf271e4c4e73ba4dca922 | 5,607 | py | Python | lib/jnpr/healthbot/swagger/models/devicegroup_schema_authentication_ssl.py | dmontagner/healthbot-py-client | 0952e0a9e7ed63c9fe84879f40407c3327735252 | [
"Apache-2.0"
] | null | null | null | lib/jnpr/healthbot/swagger/models/devicegroup_schema_authentication_ssl.py | dmontagner/healthbot-py-client | 0952e0a9e7ed63c9fe84879f40407c3327735252 | [
"Apache-2.0"
] | null | null | null | lib/jnpr/healthbot/swagger/models/devicegroup_schema_authentication_ssl.py | dmontagner/healthbot-py-client | 0952e0a9e7ed63c9fe84879f40407c3327735252 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Healthbot APIs
API interface for Healthbot application # noqa: E501
OpenAPI spec version: 1.0.0
Contact: healthbot-hackers@juniper.net
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class DevicegroupS... | 32.410405 | 115 | 0.631532 |
890cddc05af768e5bc35ca59882eae1c61a3fb87 | 1,552 | py | Python | django/authority/urls.py | cmu-lib/authority | 9b8d5f2f0b6b5ae50ca1de4f85fde5a3aa003167 | [
"MIT"
] | null | null | null | django/authority/urls.py | cmu-lib/authority | 9b8d5f2f0b6b5ae50ca1de4f85fde5a3aa003167 | [
"MIT"
] | null | null | null | django/authority/urls.py | cmu-lib/authority | 9b8d5f2f0b6b5ae50ca1de4f85fde5a3aa003167 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import include, path, re_path
from rest_framework import routers
import authority.views
import entity.views
router = routers.DefaultRouter()
urlpatterns = [
path("", authority.views.HomeView.as_view(), name="home"),
path("api/", include(router.urls)),
path... | 31.673469 | 112 | 0.640464 |
581af4df5bffd757a4ff6b0dcb3bd1a01d08d0cc | 1,949 | py | Python | tests/unit/modules/img_test.py | hazaelsan/salt | 11c69a565c59c9622d8d81efef0e038a156574f4 | [
"Apache-2.0"
] | 3 | 2016-09-03T06:26:42.000Z | 2019-06-30T13:04:53.000Z | tests/unit/modules/img_test.py | hulu/salt | b96b852aa15e32a95fceae8b4210a31f89a1100f | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/img_test.py | hulu/salt | b96b852aa15e32a95fceae8b4210a31f89a1100f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Rupesh Tare <rupesht@saltstack.com>`
'''
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOCK_REASON
)
# Import Salt Libs
from salt.modules import img
# Globals
img.__... | 29.089552 | 74 | 0.614161 |
02764d9b2784d8f7f6bfc096175d1d9d2fd471a6 | 36,491 | py | Python | postgres/tests/test_pg_integration.py | grosser/integrations-core | 4afe8e448fec0e152e0e2a8deb70b1efff7b2128 | [
"BSD-3-Clause"
] | null | null | null | postgres/tests/test_pg_integration.py | grosser/integrations-core | 4afe8e448fec0e152e0e2a8deb70b1efff7b2128 | [
"BSD-3-Clause"
] | null | null | null | postgres/tests/test_pg_integration.py | grosser/integrations-core | 4afe8e448fec0e152e0e2a8deb70b1efff7b2128 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2010-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import re
import socket
import time
from collections import Counter
from concurrent.futures.thread import ThreadPoolExecutor
import mock
import psycopg2
import pytest
from semver import VersionInfo
from six imp... | 40.909193 | 119 | 0.694747 |
b14d427799aa1332edd2e40e527d354802f25cb3 | 62 | py | Python | amep/models/qa/__init__.py | shunk031/attention-meets-perturbation | d40a5ca92ca5c85470a70edcbd968186bb50f9b0 | [
"MIT"
] | 4 | 2020-09-28T11:17:16.000Z | 2021-12-16T01:35:25.000Z | amep/models/qa/__init__.py | shunk031/attention-meets-perturbation | d40a5ca92ca5c85470a70edcbd968186bb50f9b0 | [
"MIT"
] | null | null | null | amep/models/qa/__init__.py | shunk031/attention-meets-perturbation | d40a5ca92ca5c85470a70edcbd968186bb50f9b0 | [
"MIT"
] | null | null | null | from .at_advt import * # NOQA
from .vanilla import * # NOQA
| 20.666667 | 30 | 0.677419 |
5cdd38089a26e0581caf01440356e6daed05d1f6 | 2,783 | py | Python | tests/tests/test_image_update_failures.py | TechNexion-customization/integration | 14227d03c3b2d416459ee6142c19e8ce9c41752d | [
"Apache-2.0"
] | null | null | null | tests/tests/test_image_update_failures.py | TechNexion-customization/integration | 14227d03c3b2d416459ee6142c19e8ce9c41752d | [
"Apache-2.0"
] | null | null | null | tests/tests/test_image_update_failures.py | TechNexion-customization/integration | 14227d03c3b2d416459ee6142c19e8ce9c41752d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright 2017 Northern.tech AS
#
# 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 a... | 44.174603 | 106 | 0.703557 |
fc87ac20f11ac5de746aeeb2958850211372e8e6 | 4,810 | py | Python | demos/interactive-classifier/server.py | KMarkert/earthengine-api | 761c088ca2a79860903f0af1ffea7d4165de88db | [
"Apache-2.0"
] | null | null | null | demos/interactive-classifier/server.py | KMarkert/earthengine-api | 761c088ca2a79860903f0af1ffea7d4165de88db | [
"Apache-2.0"
] | null | null | null | demos/interactive-classifier/server.py | KMarkert/earthengine-api | 761c088ca2a79860903f0af1ffea7d4165de88db | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""An example application that allows interactive classification training."""
import json
import os
import random
import config
import ee
import jinja2
import webapp2
jinja_environment = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.dirname(__file__)))
class MainPage(webapp2.... | 31.644737 | 78 | 0.63368 |
2b38952d2d419ec5b658c762d2668f724dc92a09 | 12,128 | py | Python | fluid/face_detection/reader.py | phlrain/models | 59adc0d6f38cd2351e16608d6c9d4e72dd5e7fea | [
"Apache-2.0"
] | 1 | 2018-11-23T10:29:49.000Z | 2018-11-23T10:29:49.000Z | fluid/face_detection/reader.py | phlrain/models | 59adc0d6f38cd2351e16608d6c9d4e72dd5e7fea | [
"Apache-2.0"
] | null | null | null | fluid/face_detection/reader.py | phlrain/models | 59adc0d6f38cd2351e16608d6c9d4e72dd5e7fea | [
"Apache-2.0"
] | 2 | 2018-06-14T13:59:36.000Z | 2018-11-14T12:34:47.000Z | # Copyright (c) 2016 PaddlePaddle 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 applic... | 35.358601 | 80 | 0.54939 |
06d99381ab7d2f7ef5d1b9c88a59155488ba1c46 | 10,984 | py | Python | great_expectations/rule_based_profiler/parameter_builder/regex_pattern_string_parameter_builder.py | serg-music/great_expectations | f164b922e6e69cfd2fb42cb779909ee2faa7e0a5 | [
"Apache-2.0"
] | null | null | null | great_expectations/rule_based_profiler/parameter_builder/regex_pattern_string_parameter_builder.py | serg-music/great_expectations | f164b922e6e69cfd2fb42cb779909ee2faa7e0a5 | [
"Apache-2.0"
] | null | null | null | great_expectations/rule_based_profiler/parameter_builder/regex_pattern_string_parameter_builder.py | serg-music/great_expectations | f164b922e6e69cfd2fb42cb779909ee2faa7e0a5 | [
"Apache-2.0"
] | null | null | null | import logging
from typing import Dict, Iterable, List, Optional, Set, Union
import great_expectations.exceptions as ge_exceptions
from great_expectations.rule_based_profiler.config import ParameterBuilderConfig
from great_expectations.rule_based_profiler.helpers.util import (
get_parameter_value_and_validate_retu... | 42.246154 | 225 | 0.661872 |
d31873fcedd8429ee74651e978e1a0a58af5c13b | 6,455 | py | Python | mt_dnn/matcher.py | mariamedp/mt-dnn | f444fe9109d5a9980c9d825a24576c8d873bdf33 | [
"MIT"
] | 1 | 2020-06-03T06:06:22.000Z | 2020-06-03T06:06:22.000Z | mt_dnn/matcher.py | mariamedp/mt-dnn | f444fe9109d5a9980c9d825a24576c8d873bdf33 | [
"MIT"
] | null | null | null | mt_dnn/matcher.py | mariamedp/mt-dnn | f444fe9109d5a9980c9d825a24576c8d873bdf33 | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright (c) Microsoft. All rights reserved.
import torch.nn as nn
from pytorch_pretrained_bert.modeling import BertConfig, BertLayerNorm, BertModel
from module.dropout_wrapper import DropoutWrapper
from module.san import SANClassifier, MaskLmHeader
from data_utils.task_def import EncoderModelType, T... | 46.438849 | 119 | 0.620449 |
83004a094a9fb11ee20c24e029934b5b940c5619 | 956 | py | Python | submission.py | ruanchaves/ufg-nlp-2021 | 842fecd0b1b3e6d4766337debc648dd4da96a6e8 | [
"MIT"
] | 1 | 2021-04-16T10:30:55.000Z | 2021-04-16T10:30:55.000Z | submission.py | ruanchaves/ufg-nlp-2021 | 842fecd0b1b3e6d4766337debc648dd4da96a6e8 | [
"MIT"
] | null | null | null | submission.py | ruanchaves/ufg-nlp-2021 | 842fecd0b1b3e6d4766337debc648dd4da96a6e8 | [
"MIT"
] | null | null | null | import argparse
import pandas as pd
import numpy as np
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument(
'--source',
type=str
)
parser.add_argument(
'--dataset',
type=str
)
parser.add_argument(
'--output',
type=str,
... | 18.037736 | 58 | 0.541841 |
1c3f056eef1798da8fcdf25ae23b87f8e864b8e9 | 2,616 | py | Python | src/scheduler/domain/operation/commands/SendSchedulerErrorMailCommand.py | jedicontributors/pythondataintegrator | 3e877b367ab9b20185476128ec053db41087879f | [
"MIT"
] | null | null | null | src/scheduler/domain/operation/commands/SendSchedulerErrorMailCommand.py | jedicontributors/pythondataintegrator | 3e877b367ab9b20185476128ec053db41087879f | [
"MIT"
] | null | null | null | src/scheduler/domain/operation/commands/SendSchedulerErrorMailCommand.py | jedicontributors/pythondataintegrator | 3e877b367ab9b20185476128ec053db41087879f | [
"MIT"
] | null | null | null | from injector import inject
from IocManager import IocManager
from infrastructor.configuration.ConfigService import ConfigService
from infrastructor.data.RepositoryProvider import RepositoryProvider
from infrastructor.delivery.EmailProvider import EmailProvider
from infrastructor.exceptions.OperationalException import... | 51.294118 | 116 | 0.713303 |
cd27678ee938409350a61bfaa29247e5325aad6a | 9,910 | py | Python | openstackclient/network/v2/address_scope.py | mydevice/python-openstackclient | 4891bb38208fdcd1a2ae60e47b056841e14fbdf7 | [
"Apache-2.0"
] | null | null | null | openstackclient/network/v2/address_scope.py | mydevice/python-openstackclient | 4891bb38208fdcd1a2ae60e47b056841e14fbdf7 | [
"Apache-2.0"
] | null | null | null | openstackclient/network/v2/address_scope.py | mydevice/python-openstackclient | 4891bb38208fdcd1a2ae60e47b056841e14fbdf7 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distrib... | 33.033333 | 79 | 0.602119 |
d2189f2712727579b6f13da8ed608695a5a4273a | 3,239 | py | Python | stack/settings.py | thebigyovadiaz/stackoverflow_scrapy | cff3c773a26aa328081ac6075a7d0e170886049b | [
"MIT"
] | 1 | 2019-04-11T20:43:31.000Z | 2019-04-11T20:43:31.000Z | stack/settings.py | thebigyovadiaz/stackoverflow_scrapy | cff3c773a26aa328081ac6075a7d0e170886049b | [
"MIT"
] | null | null | null | stack/settings.py | thebigyovadiaz/stackoverflow_scrapy | cff3c773a26aa328081ac6075a7d0e170886049b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for stack project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/topics/... | 32.069307 | 102 | 0.771226 |
3742c30ec1203d402235b0d176c1e4d6cd5f081c | 497 | py | Python | odoo-13.0/web_oca/web_ir_actions_act_window_message/__manifest__.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/web_oca/web_ir_actions_act_window_message/__manifest__.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/web_oca/web_ir_actions_act_window_message/__manifest__.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | # Copyright 2017 Therp BV, ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Client side message boxes",
"version": "13.0.1.0.0",
"author": "Therp BV, " "ACSONE SA/NV, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Hidden/Dependency",
... | 35.5 | 79 | 0.627767 |
88b28bfad9e0ba461826934e3c0c2edee3ad850b | 2,497 | py | Python | preprocess/image_transform.py | chenzeyuczy/DeepID2 | fb2f477732d74eb5a8aad67d1105bb9d6893dba0 | [
"MIT"
] | 20 | 2016-10-22T01:27:01.000Z | 2019-07-03T03:10:16.000Z | preprocess/image_transform.py | chenzeyuczy/DeepID2 | fb2f477732d74eb5a8aad67d1105bb9d6893dba0 | [
"MIT"
] | 2 | 2016-11-29T09:33:08.000Z | 2017-11-14T16:52:14.000Z | preprocess/image_transform.py | chenzeyuczy/DeepID2 | fb2f477732d74eb5a8aad67d1105bb9d6893dba0 | [
"MIT"
] | 9 | 2017-01-19T01:20:03.000Z | 2019-01-11T06:18:37.000Z | #! /usr/bin/env python
# -*- coding:utf-8 -*-
import os
from PIL import Image
def retrive_folder(root_path):
file_list = []
folders = os.listdir(root_path)
for folder in folders:
folder_path = root_path + '/' + folder
file_names = os.listdir(folder_path)
for file_name in file_names:
file_path = folder + '... | 28.05618 | 98 | 0.67481 |
8cc856c4d8b0132bdf6661736ed3998b14109cb9 | 63 | py | Python | nicos_mlz/mephisto/setups/startup.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/mephisto/setups/startup.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/mephisto/setups/startup.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'minimal NICOS startup setup'
group = 'lowlevel'
| 21 | 43 | 0.761905 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.