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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
acff91a2f7da7eb04626db59fe8cc4795bfd3ba8 | 2,135 | bzl | Python | main/targets.bzl | FFFF01/v2ray-core | 18f6c420ad319b7c67514575bdafde2f23ea7e79 | [
"MIT"
] | 1 | 2021-09-26T14:20:35.000Z | 2021-09-26T14:20:35.000Z | main/targets.bzl | lokifist/v2ray-core | 4f7384c020994efc94977a865d0ff70e63dbc385 | [
"MIT"
] | 51 | 2020-07-31T05:12:22.000Z | 2022-03-22T15:02:21.000Z | main/targets.bzl | lokifist/v2ray-core | 4f7384c020994efc94977a865d0ff70e63dbc385 | [
"MIT"
] | 2 | 2019-11-21T08:48:40.000Z | 2020-07-05T06:53:15.000Z | load("//infra/bazel:build.bzl", "foreign_go_binary")
load("//infra/bazel:gpg.bzl", "gpg_sign")
def gen_targets(matrix):
pkg = "v2ray.com/core/main"
output = "v2ray"
for (os, arch) in matrix:
bin_name = "v2ray_" + os + "_" + arch
foreign_go_binary(
name = bin_name,
pkg = pkg,
output = o... | 21.565657 | 58 | 0.457143 |
acff91b63c8dac30f24bb1aa42a823a297ce65d8 | 1,151 | py | Python | docmaster/interpreter/listener.py | iuricuneo/docmaster | a82470c19d2a0c2e5d9cb5960500f9c7e46b5105 | [
"MIT"
] | null | null | null | docmaster/interpreter/listener.py | iuricuneo/docmaster | a82470c19d2a0c2e5d9cb5960500f9c7e46b5105 | [
"MIT"
] | 1 | 2019-04-22T11:35:08.000Z | 2019-04-22T11:35:08.000Z | docmaster/interpreter/listener.py | iuricuneo/docmaster | a82470c19d2a0c2e5d9cb5960500f9c7e46b5105 | [
"MIT"
] | null | null | null | """
Listener module.
Listener is a class responsible for receiving a full user command and
interpreting it however required..
It is a function and has a behaviour similar to the one of the speaker. To call,
use:
from listener import Listener
request = Listener.listen(command)
Options so far are:
v - verbose
f - forc... | 23.979167 | 83 | 0.679409 |
acff91d35f7f54fa2b094347945ee640d936d018 | 948 | py | Python | pychron/hardware/lakeshore/model331.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 31 | 2016-03-07T02:38:17.000Z | 2022-02-14T18:23:43.000Z | pychron/hardware/lakeshore/model331.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 1,626 | 2015-01-07T04:52:35.000Z | 2022-03-25T19:15:59.000Z | pychron/hardware/lakeshore/model331.py | UIllinoisHALPychron/pychron | f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc | [
"Apache-2.0"
] | 26 | 2015-05-23T00:10:06.000Z | 2022-03-07T16:51:57.000Z | # ===============================================================================
# Copyright 2019 ross
#
# 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/LICE... | 39.5 | 81 | 0.600211 |
acff92b1a390b5c858d19776dd0fad799c367c83 | 7,218 | py | Python | conans/test/generators/cmake_find_package_test.py | datalogics-kam/conan | 7bf230cd5f8ef68eb804908777ebaad75e951b16 | [
"MIT"
] | null | null | null | conans/test/generators/cmake_find_package_test.py | datalogics-kam/conan | 7bf230cd5f8ef68eb804908777ebaad75e951b16 | [
"MIT"
] | null | null | null | conans/test/generators/cmake_find_package_test.py | datalogics-kam/conan | 7bf230cd5f8ef68eb804908777ebaad75e951b16 | [
"MIT"
] | null | null | null | import unittest
from conans.test.utils.cpp_test_files import cpp_hello_conan_files
from conans.test.utils.tools import TestClient
from nose.plugins.attrib import attr
@attr('slow')
class CMakeFindPathGeneratorTest(unittest.TestCase):
def cmake_find_package_system_libs_test(self):
conanfile = """from cona... | 38.59893 | 100 | 0.694652 |
acff93c03cc44cbfc33fcc5f5503075ac49a146c | 946 | py | Python | pype/plugins/maya/create/create_camera.py | Yowza-Animation/pype | 0212fa8357e6ffd490230193e69e101aaf262587 | [
"MIT"
] | null | null | null | pype/plugins/maya/create/create_camera.py | Yowza-Animation/pype | 0212fa8357e6ffd490230193e69e101aaf262587 | [
"MIT"
] | null | null | null | pype/plugins/maya/create/create_camera.py | Yowza-Animation/pype | 0212fa8357e6ffd490230193e69e101aaf262587 | [
"MIT"
] | null | null | null | import avalon.maya
from pype.hosts.maya import lib
class CreateCamera(avalon.maya.Creator):
"""Single baked camera"""
name = "cameraMain"
label = "Camera"
family = "camera"
icon = "video-camera"
defaults = ['Main']
def __init__(self, *args, **kwargs):
super(CreateCamera, self).__... | 27.028571 | 73 | 0.639535 |
acff960e14d22271bf067c32cbf7f25faa035c85 | 78 | py | Python | tritam_automatic/__init__.py | kenysmile/test_facebook | 844a3ddd53abd319c0115de86909118a37106c67 | [
"Apache-2.0"
] | null | null | null | tritam_automatic/__init__.py | kenysmile/test_facebook | 844a3ddd53abd319c0115de86909118a37106c67 | [
"Apache-2.0"
] | null | null | null | tritam_automatic/__init__.py | kenysmile/test_facebook | 844a3ddd53abd319c0115de86909118a37106c67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from . import models
from . import config_auto_share
| 15.6 | 31 | 0.679487 |
acff96e70f35c6255f933f7382d135ad0e57f35a | 3,174 | py | Python | mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py | nightfuryyy/mmpose | 910d9e31dd9d46e3329be1b7567e6309d70ab64c | [
"Apache-2.0"
] | 1,775 | 2020-07-10T01:20:01.000Z | 2022-03-31T16:31:50.000Z | mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py | KHB1698/mmpose | 93c3a742c540dfb4ca515ad545cef705a07d90b4 | [
"Apache-2.0"
] | 1,021 | 2020-07-11T11:40:24.000Z | 2022-03-31T14:32:26.000Z | mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py | KHB1698/mmpose | 93c3a742c540dfb4ca515ad545cef705a07d90b4 | [
"Apache-2.0"
] | 477 | 2020-07-11T11:27:51.000Z | 2022-03-31T09:42:25.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import warnings
import json_tricks as json
from mmcv import Config
from xtcocotools.cocoeval import COCOeval
from mmpose.datasets.builder import DATASETS
from .bottom_up_coco import BottomUpCocoDataset
@DATASETS.register_module()
class BottomUpCrowdPoseDataset(BottomU... | 30.228571 | 79 | 0.574984 |
acff97a2269f42379fd0477e3dab40f54b601016 | 229 | py | Python | mindhome_alpha/erpnext/projects/doctype/timesheet/timesheet_dashboard.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | mindhome_alpha/erpnext/projects/doctype/timesheet/timesheet_dashboard.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | null | null | null | mindhome_alpha/erpnext/projects/doctype/timesheet/timesheet_dashboard.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'time_sheet',
'transactions': [
{
'label': _('References'),
'items': ['Sales Invoice', 'Salary Slip']
}
]
} | 17.615385 | 45 | 0.628821 |
acff9a86b3a2bce7095d5a1e33d8573a1a841809 | 1,070 | py | Python | server/realms/migrations/0007_auto_20220329_0639.py | synthetic-intelligence/zentral | 774104cea90b7f3d6f2aac655859c1b1f034f8dd | [
"Apache-2.0"
] | null | null | null | server/realms/migrations/0007_auto_20220329_0639.py | synthetic-intelligence/zentral | 774104cea90b7f3d6f2aac655859c1b1f034f8dd | [
"Apache-2.0"
] | null | null | null | server/realms/migrations/0007_auto_20220329_0639.py | synthetic-intelligence/zentral | 774104cea90b7f3d6f2aac655859c1b1f034f8dd | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.12 on 2022-03-29 06:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('realms', '0006_realmgroupmapping'),
]
operations = [
migrations.AlterField(
model_name='realm',
name='config',
... | 27.435897 | 65 | 0.571963 |
acff9a8d3056e0d939626ea632a21a9b10178cc5 | 14 | py | Python | requirements.py | nikhil-rupanawar/aws-practice | e3ef96b5394daee0706463fada05521f371e1b27 | [
"MIT"
] | null | null | null | requirements.py | nikhil-rupanawar/aws-practice | e3ef96b5394daee0706463fada05521f371e1b27 | [
"MIT"
] | null | null | null | requirements.py | nikhil-rupanawar/aws-practice | e3ef96b5394daee0706463fada05521f371e1b27 | [
"MIT"
] | null | null | null | awscli
boto3
| 4.666667 | 6 | 0.785714 |
acff9aba90bca82ceeddf81fdb83ba65d554c812 | 10,459 | py | Python | users/views.py | ananthan-123/react-django | 5305649f1d39e1f5b62eb17a4f40f67fe7cfd14b | [
"MIT"
] | null | null | null | users/views.py | ananthan-123/react-django | 5305649f1d39e1f5b62eb17a4f40f67fe7cfd14b | [
"MIT"
] | null | null | null | users/views.py | ananthan-123/react-django | 5305649f1d39e1f5b62eb17a4f40f67fe7cfd14b | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework import viewsets, generics, permissions
from rest_framework.response import Response
from knox.models import AuthToken
from django.contrib.auth.models import User
from django.contrib.auth.password_validation import password_validators_help_texts
import urllib.requ... | 31.598187 | 112 | 0.702075 |
acff9b7a16eba580e9359b6a656c6f82b9b447a6 | 830 | py | Python | Programas_Capitulo_05/Cap05_pagina_125.py | rojassergio/Aprendiendo-a-programar-en-Python-con-mi-computador | ee6fe3a7182033633a45c40e2bb8b912652bab9d | [
"MIT"
] | 17 | 2016-04-15T16:44:00.000Z | 2022-01-27T23:47:30.000Z | Programas_Capitulo_05/Cap05_pagina_125.py | rojassergio/Aprendiendo-a-programar-en-Python-con-mi-computador | ee6fe3a7182033633a45c40e2bb8b912652bab9d | [
"MIT"
] | null | null | null | Programas_Capitulo_05/Cap05_pagina_125.py | rojassergio/Aprendiendo-a-programar-en-Python-con-mi-computador | ee6fe3a7182033633a45c40e2bb8b912652bab9d | [
"MIT"
] | 10 | 2016-04-28T08:07:08.000Z | 2020-04-12T23:05:05.000Z | '''
@author: Sergio Rojas
@contact: rr.sergio@gmail.com
--------------------------
Contenido bajo
Atribución-NoComercial-CompartirIgual 3.0 Venezuela (CC BY-NC-SA 3.0 VE)
http://creativecommons.org/licenses/by-nc-sa/3.0/ve/
Creado en abril 21, 2016
'''
#In [1]:
x = [12.3, 4.82, 2.3, 6.7]; y = [45.6, 23.12, 7.21, 1... | 16.6 | 73 | 0.531325 |
acff9b9319750393f36034a5ae0ad672ab989b1e | 358 | py | Python | tools/unpacker/upx/bugs/unpacking-succeeded/test.py | xbabka01/retdec-regression-tests | 1ac40cca5165740364e6f7fb72b20820eac9bc7c | [
"MIT"
] | 8 | 2017-12-14T14:25:17.000Z | 2019-03-09T03:29:12.000Z | tools/unpacker/upx/bugs/unpacking-succeeded/test.py | xbabka01/retdec-regression-tests | 1ac40cca5165740364e6f7fb72b20820eac9bc7c | [
"MIT"
] | 10 | 2019-06-14T09:12:55.000Z | 2021-10-01T12:15:43.000Z | tools/unpacker/upx/bugs/unpacking-succeeded/test.py | xbabka01/retdec-regression-tests | 1ac40cca5165740364e6f7fb72b20820eac9bc7c | [
"MIT"
] | 8 | 2019-05-10T14:59:48.000Z | 2022-03-07T16:34:23.000Z | from regression_tests import *
class Test(Test):
settings=TestSettings(
tool='unpacker',
input=files_in_dir('inputs'),
run_fileinfo=True
)
def test_unpacker_succeeded_no_imports(self):
assert self.unpacker.succeeded
assert self.fileinfo.succeeded
assert "imp... | 25.571429 | 56 | 0.684358 |
acff9d727222b665d468abb2a30637673d54ce4a | 21,847 | py | Python | app/views.py | JanMrlth/fkkev | 407e4d8c809b4043da737315c3a9ebcfde31a61b | [
"Apache-2.0"
] | null | null | null | app/views.py | JanMrlth/fkkev | 407e4d8c809b4043da737315c3a9ebcfde31a61b | [
"Apache-2.0"
] | null | null | null | app/views.py | JanMrlth/fkkev | 407e4d8c809b4043da737315c3a9ebcfde31a61b | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import base64
import logging
import random
import string
import urllib
from Crypto.Cipher import AES
from functools import wraps
from logging import Formatter, FileHandler
from flask import render_template, request, redirect, url_for, flash, g
from flask_login import login_user, login_required, current_u... | 42.094412 | 248 | 0.648876 |
acff9eb0c0f1ae13e2c35f14aed744524982b3fc | 595 | py | Python | examples/inspect_vbr/inspect_vbr.py | williballenthin/python-ntfs | 080275e7e78285c68f5a0b5ca895b5123d754acc | [
"Apache-2.0"
] | 58 | 2015-03-05T18:22:46.000Z | 2022-02-18T02:26:34.000Z | examples/inspect_vbr/inspect_vbr.py | williballenthin/python-ntfs | 080275e7e78285c68f5a0b5ca895b5123d754acc | [
"Apache-2.0"
] | 5 | 2015-01-30T14:13:26.000Z | 2018-05-09T14:05:34.000Z | examples/inspect_vbr/inspect_vbr.py | williballenthin/python-ntfs | 080275e7e78285c68f5a0b5ca895b5123d754acc | [
"Apache-2.0"
] | 23 | 2015-03-10T17:24:16.000Z | 2022-01-24T15:01:34.000Z | """
Dump the NTFS VBR for a volume.
"""
import logging
from ntfs.volume import FlatVolume
from ntfs.BinaryParser import Mmap
from ntfs.filesystem import NTFSVBR
g_logger = logging.getLogger("ntfs.examples.inspect_vbr")
def main(image_filename, volume_offset):
logging.basicConfig(level=logging.DEBUG)
loggin... | 21.25 | 57 | 0.710924 |
acff9ebbc4247727c1a7d062f80be69506e78f82 | 3,760 | py | Python | examples/app.py | topless/invenio-rest | 8c05be26b48b2a7e90cb05298c9234e5dd7f4af1 | [
"MIT"
] | null | null | null | examples/app.py | topless/invenio-rest | 8c05be26b48b2a7e90cb05298c9234e5dd7f4af1 | [
"MIT"
] | null | null | null | examples/app.py | topless/invenio-rest | 8c05be26b48b2a7e90cb05298c9234e5dd7f4af1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Minimal Flask application example.
SPHINX-START
First install Invenio-REST, set... | 24.736842 | 76 | 0.668085 |
acff9f1249fc6c2941fbe203a4d45876fe95466a | 6,482 | py | Python | src/dusqlite/find.py | coecms/dusqlite | d7f30b4cb9bb3ed40def467fde13dddc03a334db | [
"Apache-2.0"
] | null | null | null | src/dusqlite/find.py | coecms/dusqlite | d7f30b4cb9bb3ed40def467fde13dddc03a334db | [
"Apache-2.0"
] | null | null | null | src/dusqlite/find.py | coecms/dusqlite | d7f30b4cb9bb3ed40def467fde13dddc03a334db | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2019 ARC Centre of Excellence for Climate Extremes
# author: Scott Wales <scott.wales@unimelb.edu.au>
#
# 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
#
# ... | 30.431925 | 104 | 0.582999 |
acffa0960198a9f4b56a5c3620cb7d466750fccd | 1,780 | py | Python | xclib/tests/21_ejabberd_test.py | scurrvy2020/xmpp-cloud-auth | 919e98ead79fe3c65716a485917d52b6d2c97358 | [
"MIT"
] | 62 | 2017-04-20T13:20:49.000Z | 2022-01-18T20:52:51.000Z | xclib/tests/21_ejabberd_test.py | scurrvy2020/xmpp-cloud-auth | 919e98ead79fe3c65716a485917d52b6d2c97358 | [
"MIT"
] | 85 | 2017-03-19T17:52:28.000Z | 2022-01-07T17:54:00.000Z | xclib/tests/21_ejabberd_test.py | scurrvy2020/xmpp-cloud-auth | 919e98ead79fe3c65716a485917d52b6d2c97358 | [
"MIT"
] | 22 | 2017-05-04T08:53:32.000Z | 2022-01-06T07:07:19.000Z | # Checks that ejabberd_io works as designed
import sys
import io
import unittest
from xclib.ejabberd_io import ejabberd_io
from xclib.tests.iostub import iostub
class TestEjabberd(unittest.TestCase, iostub):
def test_input(self):
self.stub_stdin(b'\000\015isuser:login:' +
b'\000\021auth:log:do... | 39.555556 | 70 | 0.688764 |
acffa281e03e8947e11cd40b36de07ec4e8a852d | 3,086 | py | Python | app/__init__.py | calcutec/netbard | 2c30979ad3ca1cee2f81c521942e8bffea6f81b2 | [
"BSD-3-Clause"
] | null | null | null | app/__init__.py | calcutec/netbard | 2c30979ad3ca1cee2f81c521942e8bffea6f81b2 | [
"BSD-3-Clause"
] | 6 | 2015-05-26T14:03:03.000Z | 2015-05-26T20:22:18.000Z | app/__init__.py | calcutec/netbard | 2c30979ad3ca1cee2f81c521942e8bffea6f81b2 | [
"BSD-3-Clause"
] | null | null | null | import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
from flask.ext.mail import Mail
from config import ADMINS, MAIL_SERVER, MAIL_PORT, MAIL_USERNAME, \
MAIL_PASSWORD, SQLALCHEMY_DATABASE_URI
from .momentjs import momentjs
from flask.json import JSON... | 34.674157 | 79 | 0.697343 |
acffa3ec1e85d42054bfceb341965390b8612316 | 2,542 | py | Python | scripts/artifacts/Cast.py | Krypterry/ALEAPP | 970b2e62742603336fe791b7c02e12e1f1e77375 | [
"MIT"
] | 187 | 2020-02-22T23:35:32.000Z | 2022-03-31T13:46:24.000Z | scripts/artifacts/Cast.py | Krypterry/ALEAPP | 970b2e62742603336fe791b7c02e12e1f1e77375 | [
"MIT"
] | 65 | 2020-02-25T18:22:47.000Z | 2022-03-27T21:41:21.000Z | scripts/artifacts/Cast.py | Krypterry/ALEAPP | 970b2e62742603336fe791b7c02e12e1f1e77375 | [
"MIT"
] | 47 | 2020-02-24T22:33:35.000Z | 2022-03-11T05:19:42.000Z | import sqlite3
import textwrap
from scripts.artifact_report import ArtifactHtmlReport
from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, open_sqlite_db_readonly
def get_Cast(files_found, report_folder, seeker, wrap_text):
file_found = str(files_found[0])
db = open_sqlite_db_readon... | 38.515152 | 369 | 0.669945 |
acffa528ff20c536db0bf2968883bb293989366e | 1,114 | py | Python | cutout/transformations.py | joaopaulomcc/cutout | 16b0c201c7074f05159483e09eb7df37a20369ce | [
"MIT"
] | null | null | null | cutout/transformations.py | joaopaulomcc/cutout | 16b0c201c7074f05159483e09eb7df37a20369ce | [
"MIT"
] | null | null | null | cutout/transformations.py | joaopaulomcc/cutout | 16b0c201c7074f05159483e09eb7df37a20369ce | [
"MIT"
] | null | null | null | import numpy as np
import cairo
def rotation_matrix(rotation_angle):
return np.array(
[
[np.cos(rotation_angle), -np.sin(rotation_angle), 0],
[np.sin(rotation_angle), np.cos(rotation_angle), 0],
[0, 0, 1],
]
)
def translation_matrix(x_t, y_t):
return... | 18.881356 | 73 | 0.545781 |
acffa55cd0a9252885cc2f861dd8b5c1fee5d12a | 12,488 | py | Python | tests/framework/session/conftest.py | hfwittmann/kedro | b0d4fcd8f19b49a7916d78fd09daeb6209a7b6c6 | [
"Apache-2.0"
] | 1 | 2021-11-25T12:33:13.000Z | 2021-11-25T12:33:13.000Z | tests/framework/session/conftest.py | hfwittmann/kedro | b0d4fcd8f19b49a7916d78fd09daeb6209a7b6c6 | [
"Apache-2.0"
] | null | null | null | tests/framework/session/conftest.py | hfwittmann/kedro | b0d4fcd8f19b49a7916d78fd09daeb6209a7b6c6 | [
"Apache-2.0"
] | null | null | null | import logging
from logging.handlers import QueueHandler, QueueListener
from multiprocessing import Queue
from pathlib import Path
from typing import Any, Dict, Iterable, List, Optional
import pandas as pd
import pytest
import toml
import yaml
from dynaconf.validator import Validator
from kedro import __version__ as ... | 28.253394 | 95 | 0.598975 |
acffa640c0078a14f385af77c9d2fd625a04d6b7 | 808 | py | Python | cogdl/wrappers/model_wrapper/graph_classification/graph_embedding_mw.py | THUDM/cogdl | 37359d559ae4f9f2c0c34d851abaa0a0950d120a | [
"MIT"
] | 1,072 | 2019-08-02T05:46:21.000Z | 2022-03-31T07:51:53.000Z | cogdl/wrappers/model_wrapper/graph_classification/graph_embedding_mw.py | THUDM/cogdl | 37359d559ae4f9f2c0c34d851abaa0a0950d120a | [
"MIT"
] | 96 | 2019-08-05T17:27:22.000Z | 2022-03-03T08:36:57.000Z | cogdl/wrappers/model_wrapper/graph_classification/graph_embedding_mw.py | THUDM/cogdl | 37359d559ae4f9f2c0c34d851abaa0a0950d120a | [
"MIT"
] | 299 | 2019-08-08T07:33:10.000Z | 2022-03-31T09:30:07.000Z | from torch.utils.data import DataLoader
from cogdl.data import MultiGraphDataset
from .. import register_model_wrapper, EmbeddingModelWrapper
from cogdl.wrappers.tools.wrapper_utils import evaluate_graph_embeddings_using_svm
@register_model_wrapper("graph_embedding_mw")
class GraphEmbeddingModelWrapper(EmbeddingMode... | 32.32 | 82 | 0.720297 |
acffa690ea391e8e18bb5d00cad3888d9c2ae7b6 | 213 | py | Python | Python/Django/new1/fees/urls.py | Vikash-8090-Yadav/AllProgramming_Basic | 76721256edcb91520d1b5132aa59ac37eebdf7c3 | [
"MIT"
] | 2 | 2022-01-04T12:04:51.000Z | 2022-01-04T18:52:26.000Z | Python/Django/new1/fees/urls.py | Vikash-8090-Yadav/AllProgramming_Basic | 76721256edcb91520d1b5132aa59ac37eebdf7c3 | [
"MIT"
] | null | null | null | Python/Django/new1/fees/urls.py | Vikash-8090-Yadav/AllProgramming_Basic | 76721256edcb91520d1b5132aa59ac37eebdf7c3 | [
"MIT"
] | null | null | null |
from django.urls import path , include
from .import views
urlpatterns = [
path('dg/',views.dgfess),
path('html/',views.cssfess),
path('css/',views.htmlfess),
path('python/',views.pythonfess),
]
| 17.75 | 38 | 0.652582 |
acffa70343d73eef22c57e9d19dd8c6713ca4b76 | 847 | py | Python | src/app.py | Data-is-life/apt-get-home | 77a212c19a90f201c70759fd9e99493657247ae7 | [
"Unlicense"
] | null | null | null | src/app.py | Data-is-life/apt-get-home | 77a212c19a90f201c70759fd9e99493657247ae7 | [
"Unlicense"
] | null | null | null | src/app.py | Data-is-life/apt-get-home | 77a212c19a90f201c70759fd9e99493657247ae7 | [
"Unlicense"
] | null | null | null | import random
from header_list import user_agent_list
from proxies_list import proxies_list_
from initial_scrapper_function import *
from parser_functions import *
from list_df_functions import *
from search_url_gen import *
from get_search_url import *
from get_results import *
ua = user_agent_list
proxies = proxies_l... | 24.911765 | 60 | 0.780401 |
acffa76b433e6c21250029e3d2e4f3f7fb4a40df | 5,397 | py | Python | vaccine_availability.py | MannyP31/VaccineAvailabilityNotifier | ec223d5b49a1ebffc5e141f84b219c0cec07fee0 | [
"MIT"
] | 19 | 2021-05-05T05:12:59.000Z | 2021-06-03T12:50:53.000Z | vaccine_availability.py | MannyP31/VaccineAvailabilityNotifier | ec223d5b49a1ebffc5e141f84b219c0cec07fee0 | [
"MIT"
] | null | null | null | vaccine_availability.py | MannyP31/VaccineAvailabilityNotifier | ec223d5b49a1ebffc5e141f84b219c0cec07fee0 | [
"MIT"
] | 8 | 2021-05-05T05:55:28.000Z | 2021-05-10T17:13:32.000Z | """
python vaccine_availability.py
"""
# standard imports
import requests
import datetime
import json
# import pandas as pd
import smtplib
def logger(line):
with open('log.txt', 'a+') as f:
f.write(line+"\n")
"""
To get the state code
for state_code in range(1,40):
# print("State code: ", state_cod... | 35.98 | 126 | 0.494163 |
acffa7d473d2149d9e33516b92903a7a1642cb62 | 17,699 | py | Python | lib/weighted_resblock.py | googleinterns/loop-project | 28acb1c815e0a65f51e809d278eea08ffb06483e | [
"Apache-2.0"
] | 3 | 2020-05-29T00:34:34.000Z | 2020-12-14T21:50:12.000Z | lib/weighted_resblock.py | googleinterns/loop-project | 28acb1c815e0a65f51e809d278eea08ffb06483e | [
"Apache-2.0"
] | 2 | 2020-07-21T00:57:15.000Z | 2020-09-04T22:09:33.000Z | lib/weighted_resblock.py | googleinterns/loop-project | 28acb1c815e0a65f51e809d278eea08ffb06483e | [
"Apache-2.0"
] | null | null | null | """ Weighted ResBlock for compositional networks.
"""
import tensorflow as tf
from tensorflow.python.keras import regularizers
from lib import weighted_layers_v2 as wl
class ResBlockTemplate():
"""Custom residual block template class.
Stores the templates of weighted expansion, depthwise convolution and
projec... | 40.781106 | 79 | 0.708232 |
acffa8737c55b7c8073b847769fe492512dc5cd1 | 118,407 | py | Python | stubs.min/System/Windows/Controls/__init___parts/UserControl.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/Windows/Controls/__init___parts/UserControl.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/Controls/__init___parts/UserControl.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class UserControl(ContentControl,IResource,IAnimatable,IInputElement,IFrameworkInputElement,ISupportInitialize,IHaveResources,IQueryAmbient,IAddChild):
"""
Provides a simple way to create a control.
UserControl()
"""
def AddChild(self,*args):
"""
AddChild(self: ContentControl,value: object)
Ad... | 65.599446 | 745 | 0.788197 |
acffaa09bdfc6eea19bf9afaf25d609d4fe906c2 | 160 | py | Python | WMIAdventure/backend/WMIAdventure_backend/IngameUsers/apps.py | Michael-Czekanski/WMIAdventure-1 | ea812b13de0cd6c47c541cbede2d016a7837b4b8 | [
"Apache-2.0"
] | null | null | null | WMIAdventure/backend/WMIAdventure_backend/IngameUsers/apps.py | Michael-Czekanski/WMIAdventure-1 | ea812b13de0cd6c47c541cbede2d016a7837b4b8 | [
"Apache-2.0"
] | null | null | null | WMIAdventure/backend/WMIAdventure_backend/IngameUsers/apps.py | Michael-Czekanski/WMIAdventure-1 | ea812b13de0cd6c47c541cbede2d016a7837b4b8 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class IngameusersConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'IngameUsers'
| 22.857143 | 57 | 0.74375 |
acffaa86ffb3bbe31312210a23d8e421d8ddda5f | 11,094 | py | Python | d2go/data/dataset_mappers/d2go_dataset_mapper.py | wenliangzhao2018/d2go | a9dce74e5caf4c2260371a1abb603e3d5f14d763 | [
"Apache-2.0"
] | null | null | null | d2go/data/dataset_mappers/d2go_dataset_mapper.py | wenliangzhao2018/d2go | a9dce74e5caf4c2260371a1abb603e3d5f14d763 | [
"Apache-2.0"
] | null | null | null | d2go/data/dataset_mappers/d2go_dataset_mapper.py | wenliangzhao2018/d2go | a9dce74e5caf4c2260371a1abb603e3d5f14d763 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import copy
import logging
from io import BytesIO
import numpy as np
import torch
from d2go.utils.helper import retryable
from detectron2.data import detection_utils as utils, transforms as T
from detectron2.data.transforms... | 36.98 | 87 | 0.582387 |
acffab1353105dd932971cc3f0906b37a4a87d31 | 4,289 | py | Python | blockchain_client/blockchain_client.py | glorin1/blockchain-python-tutorial | 61b31b353e3b8aa4673764538f5da00ab666cae2 | [
"MIT"
] | null | null | null | blockchain_client/blockchain_client.py | glorin1/blockchain-python-tutorial | 61b31b353e3b8aa4673764538f5da00ab666cae2 | [
"MIT"
] | null | null | null | blockchain_client/blockchain_client.py | glorin1/blockchain-python-tutorial | 61b31b353e3b8aa4673764538f5da00ab666cae2 | [
"MIT"
] | null | null | null | '''
title : blockchain_client.py
description : A blockchain client implemenation, with the following features
- Wallets generation using Public/Private key encryption (based on RSA algorithm)
- Generation of transactions with RSA encryption
author : ... | 32.740458 | 110 | 0.660993 |
acffac3efdbcd2ec27b0093267c1124bf983e270 | 999 | py | Python | onmt/tests/test_attention.py | philhchen/OpenNMT-evidential-softmax | 87709ce1cf7bda783aed4a64c096fa23282e7aa9 | [
"MIT"
] | null | null | null | onmt/tests/test_attention.py | philhchen/OpenNMT-evidential-softmax | 87709ce1cf7bda783aed4a64c096fa23282e7aa9 | [
"MIT"
] | null | null | null | onmt/tests/test_attention.py | philhchen/OpenNMT-evidential-softmax | 87709ce1cf7bda783aed4a64c096fa23282e7aa9 | [
"MIT"
] | null | null | null | """
Here come the tests for attention types and their compatibility
"""
import unittest
import torch
from torch.autograd import Variable
import onmt
class TestAttention(unittest.TestCase):
def test_masked_global_attention(self):
source_lengths = torch.IntTensor([7, 3, 5, 2])
# illegal_weights_ma... | 29.382353 | 82 | 0.623624 |
acfface5c3801bc40a95496828c58e88afc826b8 | 13,421 | py | Python | src/jenga/compile.py | aidnem/jenga-lang | c46ca79a85b9a5e19c621fa7cc68af5db8c10ddc | [
"MIT"
] | null | null | null | src/jenga/compile.py | aidnem/jenga-lang | c46ca79a85b9a5e19c621fa7cc68af5db8c10ddc | [
"MIT"
] | null | null | null | src/jenga/compile.py | aidnem/jenga-lang | c46ca79a85b9a5e19c621fa7cc68af5db8c10ddc | [
"MIT"
] | null | null | null | """Compiler for Jenga"""
import logging
import jenga
import jenga.util
from jenga.enums import OP
from jenga.types import Word
def compile(words: list[Word], fn: str):
"""Compile a Jenga program from tokens into an assembly file"""
assert len(OP) == 29, "Exhaustive handling of ops in compilation"
stac... | 34.237245 | 108 | 0.301542 |
acffae17a331586a853b109e5a0082d6277e331a | 34 | py | Python | catalogo/models/__init__.py | wisi3/eventos-serve | e0abbbd143107a15fbad06294de50853efd0adaa | [
"MIT"
] | null | null | null | catalogo/models/__init__.py | wisi3/eventos-serve | e0abbbd143107a15fbad06294de50853efd0adaa | [
"MIT"
] | 3 | 2020-02-11T23:14:05.000Z | 2021-06-10T18:31:18.000Z | catalogo/models/__init__.py | jhonnyperalta/trivago-serve | 50d8394200ae1e9a4b19b55fb6e23395832989aa | [
"MIT"
] | 3 | 2017-11-18T14:01:45.000Z | 2020-10-01T14:32:54.000Z | #from .categoria import Categoria
| 17 | 33 | 0.823529 |
acffaedc6bd243f046fbd365dd2a46decf93e7fb | 4,643 | py | Python | cart_venv/Lib/site-packages/tensorflow_core/core/framework/tensor_slice_pb2.py | juice1000/Synchronous-vs-Asynchronous-Learning-Tensorflow- | 654be60f7986ac9bb7ce1d080ddee377c3389f93 | [
"MIT"
] | 2 | 2019-08-04T20:28:14.000Z | 2019-10-27T23:26:42.000Z | cart_venv/Lib/site-packages/tensorflow_core/core/framework/tensor_slice_pb2.py | juice1000/Synchronous-vs-Asynchronous-Learning-Tensorflow- | 654be60f7986ac9bb7ce1d080ddee377c3389f93 | [
"MIT"
] | null | null | null | cart_venv/Lib/site-packages/tensorflow_core/core/framework/tensor_slice_pb2.py | juice1000/Synchronous-vs-Asynchronous-Learning-Tensorflow- | 654be60f7986ac9bb7ce1d080ddee377c3389f93 | [
"MIT"
] | 1 | 2020-11-04T03:16:29.000Z | 2020-11-04T03:16:29.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tensorflow/core/framework/tensor_slice.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _m... | 37.144 | 469 | 0.77213 |
acffaf1877690e11e80dcea35d09ec5c74b24bf7 | 1,075 | py | Python | google/cloud/security/common/data_access/sql_queries/load_data.py | joshiumang107/forseti-security | c088e677426ec60daae0e44a5d1acbb337386ddb | [
"Apache-2.0"
] | null | null | null | google/cloud/security/common/data_access/sql_queries/load_data.py | joshiumang107/forseti-security | c088e677426ec60daae0e44a5d1acbb337386ddb | [
"Apache-2.0"
] | null | null | null | google/cloud/security/common/data_access/sql_queries/load_data.py | joshiumang107/forseti-security | c088e677426ec60daae0e44a5d1acbb337386ddb | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Forseti Security 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 ap... | 30.714286 | 74 | 0.699535 |
acffb0ac98a952ee4506627c5cee0523ff3de1e0 | 6,172 | py | Python | homeassistant/components/growatt_server/sensor_types/tlx.py | tizzen33/core | 2a1884a1f7a07848b8b63afd29f59c81f1ffaf62 | [
"Apache-2.0"
] | 7 | 2019-08-15T13:36:58.000Z | 2020-03-18T10:46:29.000Z | homeassistant/components/growatt_server/sensor_types/tlx.py | tizzen33/core | 2a1884a1f7a07848b8b63afd29f59c81f1ffaf62 | [
"Apache-2.0"
] | 87 | 2020-07-15T13:43:35.000Z | 2022-03-23T07:43:10.000Z | homeassistant/components/growatt_server/sensor_types/tlx.py | marecabo/home-assistant | e33774a61e7fcc88aff752dfa4618dd26a746872 | [
"Apache-2.0"
] | 7 | 2018-10-04T10:12:45.000Z | 2021-12-29T20:55:40.000Z | """Growatt Sensor definitions for the TLX type."""
from __future__ import annotations
from homeassistant.components.sensor import (
STATE_CLASS_TOTAL,
STATE_CLASS_TOTAL_INCREASING,
)
from homeassistant.const import (
DEVICE_CLASS_CURRENT,
DEVICE_CLASS_ENERGY,
DEVICE_CLASS_POWER,
DEVICE_CLASS_TE... | 31.171717 | 69 | 0.675308 |
acffb17617fda26812f3755ca68246c66958ebec | 1,070 | py | Python | feedback/migrations/0001_initial.py | Aleccc/gtcrew | 7e6e7024afdbf48ee796cb1f9a86b913e6843dda | [
"MIT"
] | null | null | null | feedback/migrations/0001_initial.py | Aleccc/gtcrew | 7e6e7024afdbf48ee796cb1f9a86b913e6843dda | [
"MIT"
] | 21 | 2019-02-14T02:47:34.000Z | 2022-01-23T02:22:54.000Z | feedback/migrations/0001_initial.py | Aleccc/gtcrew | 7e6e7024afdbf48ee796cb1f9a86b913e6843dda | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-04-25 21:54
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 36.896552 | 159 | 0.631776 |
acffb1e8544f8cff7d976cf882437603ac45303d | 381 | py | Python | src/wee/wsgi.py | dipkakwani/wee_app | a0f15053ec64a49611d759eaae6d780d608bea46 | [
"MIT"
] | 2 | 2016-11-18T18:43:10.000Z | 2018-10-17T18:31:52.000Z | src/wee/wsgi.py | dipkakwani/wee_app | a0f15053ec64a49611d759eaae6d780d608bea46 | [
"MIT"
] | null | null | null | src/wee/wsgi.py | dipkakwani/wee_app | a0f15053ec64a49611d759eaae6d780d608bea46 | [
"MIT"
] | null | null | null | """
WSGI config for wee project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wee.settings")
from django.core.wsgi impo... | 25.4 | 78 | 0.784777 |
acffb349db22e23e9f53173b486e62ceaaa78d25 | 2,356 | py | Python | set_from_is_list.py | cedelis/docker-mailman | b4e3221a560a20adb20187a4e9d24e7ed58d2020 | [
"MIT"
] | null | null | null | set_from_is_list.py | cedelis/docker-mailman | b4e3221a560a20adb20187a4e9d24e7ed58d2020 | [
"MIT"
] | null | null | null | set_from_is_list.py | cedelis/docker-mailman | b4e3221a560a20adb20187a4e9d24e7ed58d2020 | [
"MIT"
] | null | null | null | #! /usr/bin/python
#
# Copyright (C) 2001-2018 by the Free Software Foundation, Inc.
#
# 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 ... | 25.333333 | 83 | 0.647708 |
acffb3df6a4228665a0585c99acada2ab2a78fc5 | 2,522 | py | Python | runtests.py | DummerDelfin/django-contact-form | ef7f7d2492b6bdf9bed6aae2fa5aadc3dd2f3d30 | [
"BSD-3-Clause"
] | null | null | null | runtests.py | DummerDelfin/django-contact-form | ef7f7d2492b6bdf9bed6aae2fa5aadc3dd2f3d30 | [
"BSD-3-Clause"
] | null | null | null | runtests.py | DummerDelfin/django-contact-form | ef7f7d2492b6bdf9bed6aae2fa5aadc3dd2f3d30 | [
"BSD-3-Clause"
] | null | null | null | """
A standalone test runner script, configuring the minimum settings
required for tests to execute.
Re-use at your own risk: many Django applications will require full
settings and/or templates in order to execute their tests.
"""
import os
import sys
# Make sure the app is (at least temporarily) on the import pa... | 30.385542 | 70 | 0.645123 |
acffb4cb18c771e228067f5ec87d67614dca096c | 629 | py | Python | backend/manage.py | crowdbotics-apps/thu-34308 | 0c102b713cee7f454ed0efb54bb531b0a017567d | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/thu-34308 | 0c102b713cee7f454ed0efb54bb531b0a017567d | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/thu-34308 | 0c102b713cee7f454ed0efb54bb531b0a017567d | [
"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', 'thu_34308.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Impo... | 28.590909 | 73 | 0.683625 |
acffb582799c3154c5fdf3aa4703266213ee00ef | 959 | py | Python | yatest/testpage.py | boluny/cray | b8c628df70a3dd488067bce393123e9686393b33 | [
"MIT"
] | 1 | 2017-10-13T06:58:25.000Z | 2017-10-13T06:58:25.000Z | yatest/testpage.py | boluny/cray | b8c628df70a3dd488067bce393123e9686393b33 | [
"MIT"
] | 3 | 2017-07-21T08:09:39.000Z | 2018-08-15T08:42:39.000Z | yatest/testpage.py | boluny/cray | b8c628df70a3dd488067bce393123e9686393b33 | [
"MIT"
] | null | null | null | import unittest
import os
from cray.craylib.page import Page
PAGE_DIR = os.path.join(os.path.dirname(__file__), "test_site", "_page")
def get_test_suites():
'''Return test cases as a suite in this module'''
suite = unittest.TestSuite()
suite.addTest(PageGenerateTestCase())
return suite
class PageGe... | 29.96875 | 79 | 0.625652 |
acffb5bec2889ac3924926294f60154cce32413d | 386 | py | Python | utils/logger.py | RapDoodle8080/mooli-milk-tea-management-system | 9b6e31664529ac70d180da2f219baf0eb902017b | [
"MIT"
] | 1 | 2021-05-29T09:40:42.000Z | 2021-05-29T09:40:42.000Z | utils/logger.py | RapDoodle/Mooli-Ordering-System | 9b6e31664529ac70d180da2f219baf0eb902017b | [
"MIT"
] | 1 | 2020-10-28T02:10:24.000Z | 2020-10-28T02:10:24.000Z | utils/logger.py | RapDoodle/Mooli-Ordering-System | 9b6e31664529ac70d180da2f219baf0eb902017b | [
"MIT"
] | 1 | 2021-05-29T09:40:41.000Z | 2021-05-29T09:40:41.000Z | # Unable to use python logger due to its incompatibility with flask at the moment
from datetime import datetime
def log_error(msg):
# The output will be as the following example:
# [2020-05-15 17:08:53.508167] Unable to connect
current_time = datetime.now()
with open('./log/error.log', 'a') as log:
... | 38.6 | 81 | 0.678756 |
acffb6acdac5675b29dd1ba5b5398d04a7ea2b37 | 2,237 | py | Python | examples/formula/simple_contrast.py | bpinsard/nipy | d49e8292adad6619e3dac710752131b567efe90e | [
"BSD-3-Clause"
] | 1 | 2019-03-23T07:41:30.000Z | 2019-03-23T07:41:30.000Z | examples/formula/simple_contrast.py | bpinsard/nipy | d49e8292adad6619e3dac710752131b567efe90e | [
"BSD-3-Clause"
] | null | null | null | examples/formula/simple_contrast.py | bpinsard/nipy | d49e8292adad6619e3dac710752131b567efe90e | [
"BSD-3-Clause"
] | 1 | 2020-08-19T17:26:43.000Z | 2020-08-19T17:26:43.000Z | #!/usr/bin/env python
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
""" A simple contrast for an FMRI HRF model """
from __future__ import print_function # Python 2/3 compatibility
import numpy as np
from nipy.algorithms.statistics.api import Formula... | 37.915254 | 79 | 0.680376 |
acffb6c9aeb69fefb2cb5a9d2b42333c6458d544 | 5,179 | py | Python | fcm.py | Mohammad-Robati/FuzzyCMeans | 398efa3c913b1cad211f2435764edbad3db62426 | [
"MIT"
] | null | null | null | fcm.py | Mohammad-Robati/FuzzyCMeans | 398efa3c913b1cad211f2435764edbad3db62426 | [
"MIT"
] | null | null | null | fcm.py | Mohammad-Robati/FuzzyCMeans | 398efa3c913b1cad211f2435764edbad3db62426 | [
"MIT"
] | null | null | null | from math import sqrt, pow, log, inf
from point import Point
from random import random
from copy import deepcopy
import numpy as np
import matplotlib.pyplot as plt
class FCM:
def __init__(self, points, m, minCluster, maxCluster):
self.points = points
self.centers = []
self.m = m
s... | 36.992857 | 125 | 0.555706 |
acffb717a792bf363fc23fb87cd9e30d0fe6f63c | 364 | py | Python | Python/network/inet.py | ebouaziz/miscripts | 9520d31adfd8cf63a06d519b0c308f07dd107b90 | [
"MIT"
] | null | null | null | Python/network/inet.py | ebouaziz/miscripts | 9520d31adfd8cf63a06d519b0c308f07dd107b90 | [
"MIT"
] | null | null | null | Python/network/inet.py | ebouaziz/miscripts | 9520d31adfd8cf63a06d519b0c308f07dd107b90 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2.7
# Experiment with netifaces module
from netifaces import interfaces, ifaddresses, AF_INET
for ifaceName in interfaces():
try:
addresses = [i['addr'] for i in ifaddresses(ifaceName)[AF_INET]]
print '%s: %s' % (ifaceName, ', '.join(addresses))
except KeyError, e:
... | 30.333333 | 72 | 0.664835 |
acffb8f862a9672ae107f6b6094fd82e15a0dae2 | 2,808 | py | Python | server/api/grid/split_task_apis.py | wildintellect/tasking-manager | 373fb231404628e6ae9a1838539b9c3cb23ad73c | [
"BSD-2-Clause"
] | 3 | 2018-04-24T08:12:31.000Z | 2020-09-02T18:11:21.000Z | server/api/grid/split_task_apis.py | wildintellect/tasking-manager | 373fb231404628e6ae9a1838539b9c3cb23ad73c | [
"BSD-2-Clause"
] | 28 | 2019-01-04T17:39:00.000Z | 2021-05-06T23:06:24.000Z | server/api/grid/split_task_apis.py | wildintellect/tasking-manager | 373fb231404628e6ae9a1838539b9c3cb23ad73c | [
"BSD-2-Clause"
] | 3 | 2020-02-29T20:46:09.000Z | 2020-11-20T19:44:04.000Z | from flask_restful import Resource, current_app, request
from schematics.exceptions import DataError
from server.models.dtos.grid_dto import SplitTaskDTO
from server.models.postgis.utils import NotFound
from server.services.grid.split_service import SplitService, SplitServiceError
from server.services.users.authentica... | 34.666667 | 89 | 0.565527 |
acffb92b8e8b04befe4b7b9b62e2de43e0f5979d | 781 | py | Python | config.py | Blankphrase/News-Highlight | efda2300b0c7e021bc88b19f06e76ea1b09f4717 | [
"MIT"
] | null | null | null | config.py | Blankphrase/News-Highlight | efda2300b0c7e021bc88b19f06e76ea1b09f4717 | [
"MIT"
] | null | null | null | config.py | Blankphrase/News-Highlight | efda2300b0c7e021bc88b19f06e76ea1b09f4717 | [
"MIT"
] | null | null | null | import os
class Config:
'''
General configuration parent class
'''
NEWS_SOURCE_BASE_URL = 'https://newsapi.org/v2/sources?category={}&language=en&apiKey={}'
NEWS_ARTICLE_API_BASE_URL = 'https://newsapi.org/v2/everything?sources={}&apiKey={}'
NEWS_API_KEY = os.environ.get('NEWS_API_KEY')
clas... | 21.694444 | 93 | 0.681178 |
acffb9c17058c6fee8039ee5b5330d8bb5f8db19 | 7,195 | py | Python | von_agent/demo_agents.py | nrempel/von_agent_test | da23056f8385b2b1751f5df21af87f23825db216 | [
"Apache-2.0"
] | null | null | null | von_agent/demo_agents.py | nrempel/von_agent_test | da23056f8385b2b1751f5df21af87f23825db216 | [
"Apache-2.0"
] | null | null | null | von_agent/demo_agents.py | nrempel/von_agent_test | da23056f8385b2b1751f5df21af87f23825db216 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2017 Government of Canada - Public Services and Procurement Canada - buyandsell.gc.ca
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
Unles... | 38.682796 | 116 | 0.64934 |
acffba07ebbf270f030d04de1d8ca73df1ac92a6 | 14,669 | py | Python | c7n/cli.py | ticketmaster/cloud-custodian | 0da3866f70f858895af228cc08706d0909a2a324 | [
"Apache-2.0"
] | null | null | null | c7n/cli.py | ticketmaster/cloud-custodian | 0da3866f70f858895af228cc08706d0909a2a324 | [
"Apache-2.0"
] | null | null | null | c7n/cli.py | ticketmaster/cloud-custodian | 0da3866f70f858895af228cc08706d0909a2a324 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 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... | 35.953431 | 92 | 0.645511 |
acffba0cb82baa2acdee4a471b09864424965c13 | 75 | py | Python | version.py | redhat-developer/moksha-monitor-exporter | be681023b8ac9a7ad87d4e3cd5a8fce087d63aa2 | [
"MIT"
] | null | null | null | version.py | redhat-developer/moksha-monitor-exporter | be681023b8ac9a7ad87d4e3cd5a8fce087d63aa2 | [
"MIT"
] | null | null | null | version.py | redhat-developer/moksha-monitor-exporter | be681023b8ac9a7ad87d4e3cd5a8fce087d63aa2 | [
"MIT"
] | null | null | null | _VERSION_ = '0.0.2'
if __name__ == '__main__':
print('v' + _VERSION_)
| 15 | 26 | 0.6 |
acffba1fff308eaa14d039a6531b921e7589727e | 203 | py | Python | models/__init__.py | ejmejm/GoHeuristics | 9336d661abd48aa31ff5c9ed50cc2fbbd4472ebe | [
"Apache-2.0"
] | 1 | 2017-07-18T22:24:30.000Z | 2017-07-18T22:24:30.000Z | models/__init__.py | ejmejm/GoHeuristics | 9336d661abd48aa31ff5c9ed50cc2fbbd4472ebe | [
"Apache-2.0"
] | null | null | null | models/__init__.py | ejmejm/GoHeuristics | 9336d661abd48aa31ff5c9ed50cc2fbbd4472ebe | [
"Apache-2.0"
] | null | null | null | from os.path import dirname, basename, isfile
import glob
modules = glob.glob(dirname(__file__)+"/*.py")
__all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]
| 40.6 | 94 | 0.704433 |
acffbd6d1bfd98b7fa71dda3d9b7bc95d0afb775 | 413 | py | Python | Python/flipping-an-image.py | se77enn/LeetCode-Solution | d29ef5358cae592b63952c3d293897a176fb75e1 | [
"MIT"
] | 1 | 2020-10-27T03:22:31.000Z | 2020-10-27T03:22:31.000Z | Python/flipping-an-image.py | se77enn/LeetCode-Solution | d29ef5358cae592b63952c3d293897a176fb75e1 | [
"MIT"
] | null | null | null | Python/flipping-an-image.py | se77enn/LeetCode-Solution | d29ef5358cae592b63952c3d293897a176fb75e1 | [
"MIT"
] | 1 | 2021-03-22T18:58:23.000Z | 2021-03-22T18:58:23.000Z | # Time: O(n^2)
# Space: O(1)
try:
xrange # Python 2
except NameError:
xrange = range # Python 3
class Solution(object):
def flipAndInvertImage(self, A):
"""
:type A: List[List[int]]
:rtype: List[List[int]]
"""
for row in A:
for i in xrange((le... | 20.65 | 57 | 0.469734 |
acffbe5e277a9e36d75f0230d3eee460accdd990 | 721 | py | Python | theano/gans/BGAN/old/DISC-MNIST/plot_control.py | dendisuhubdy/ccw1_trainstats | 0105bddd23366db6b55421e9b3bccd6da2f9aa51 | [
"MIT"
] | 4 | 2017-10-29T17:41:17.000Z | 2020-04-07T12:51:44.000Z | theano/gans/BGAN/old/DISC-MNIST/plot_control.py | dendisuhubdy/ccw1_trainstats | 0105bddd23366db6b55421e9b3bccd6da2f9aa51 | [
"MIT"
] | null | null | null | theano/gans/BGAN/old/DISC-MNIST/plot_control.py | dendisuhubdy/ccw1_trainstats | 0105bddd23366db6b55421e9b3bccd6da2f9aa51 | [
"MIT"
] | 4 | 2017-11-26T21:53:28.000Z | 2020-04-07T12:51:45.000Z | import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
from disc_mnist import train
def main():
plt.title("Boundary-seeking GAN")
plt.xlabel("Training batches")
plt.ylabel("Generator loss")
train(num_epochs=1, n_samples=20, initial_eta=1e-5, plot_colour="-b")
train(num_epochs=... | 30.041667 | 73 | 0.658807 |
acffbe86cca0b741cc7ab50eb5652401f519999b | 1,692 | py | Python | mak/libs/pyxx/cxx/grammar/expression/primary/lambda_expr/general.py | bugengine/BugEngine | 1b3831d494ee06b0bd74a8227c939dd774b91226 | [
"BSD-3-Clause"
] | 4 | 2015-05-13T16:28:36.000Z | 2017-05-24T15:34:14.000Z | mak/libs/pyxx/cxx/grammar/expression/primary/lambda_expr/general.py | bugengine/BugEngine | 1b3831d494ee06b0bd74a8227c939dd774b91226 | [
"BSD-3-Clause"
] | null | null | null | mak/libs/pyxx/cxx/grammar/expression/primary/lambda_expr/general.py | bugengine/BugEngine | 1b3831d494ee06b0bd74a8227c939dd774b91226 | [
"BSD-3-Clause"
] | 1 | 2017-03-21T08:28:07.000Z | 2017-03-21T08:28:07.000Z | """
lambda-expression:
lambda-introducer lambda-declarator compound-statement
lambda-introducer < template-parameter-list > requires-clause? lambda-declarator compound-statement
lambda-introducer:
[ lambda-capture? ]
lambda-declarator:
lambda-specifiers
( parameter-declaration-clause ) lambda-spec... | 29.684211 | 129 | 0.728132 |
acffbf8df22aa84f1b784d1e556c549105e3bf69 | 744 | py | Python | Vocoder_WaveRNN/vocoder_utils/text/symbols.py | madhavmk/QA_VoiceBot_Desktop_Application | 89128f1e75314d585b126c19e592d0e88061d5ea | [
"Apache-2.0"
] | 7 | 2019-11-21T12:42:16.000Z | 2021-08-28T08:22:30.000Z | Vocoder_WaveRNN/vocoder_utils/text/symbols.py | madhavmk/QA_VoiceBot_Desktop_Application | 89128f1e75314d585b126c19e592d0e88061d5ea | [
"Apache-2.0"
] | 1 | 2019-12-28T15:12:14.000Z | 2020-01-08T21:28:00.000Z | Vocoder_WaveRNN/vocoder_utils/text/symbols.py | madhavmk/QA_VoiceBot_Desktop_Application | 89128f1e75314d585b126c19e592d0e88061d5ea | [
"Apache-2.0"
] | 6 | 2019-09-03T05:10:24.000Z | 2021-07-08T03:27:11.000Z | """ from https://github.com/keithito/tacotron """
'''
Defines the set of symbols used in text input to the model.
The default is a set of ASCII characters that works well for English or text that has been run through Unidecode. For other data, you can modify _characters. See TRAINING_DATA.md for details. '''
from Voc... | 39.157895 | 195 | 0.74328 |
acffbf915123fef1f4d0327bfe7ee0179aa85c62 | 603 | py | Python | dotviewer/test/test_translator.py | kantai/passe-pypy-taint-tracking | b60a3663f8fe89892dc182c8497aab97e2e75d69 | [
"MIT"
] | 2 | 2016-07-06T23:30:20.000Z | 2017-05-30T15:59:31.000Z | dotviewer/test/test_translator.py | kantai/passe-pypy-taint-tracking | b60a3663f8fe89892dc182c8497aab97e2e75d69 | [
"MIT"
] | null | null | null | dotviewer/test/test_translator.py | kantai/passe-pypy-taint-tracking | b60a3663f8fe89892dc182c8497aab97e2e75d69 | [
"MIT"
] | 2 | 2020-07-09T08:14:22.000Z | 2021-01-15T18:01:25.000Z | """
Test the integration with PyPy.
"""
import py, sys
from dotviewer.conftest import option
def setup_module(mod):
if not option.pygame:
py.test.skip("--pygame not enabled")
try:
import pypy
except ImportError:
py.test.skip("cannot import pypy")
# ________________________________... | 21.535714 | 62 | 0.679934 |
acffc031e781cb8e49599eea11db5a4b80a35c9a | 2,110 | py | Python | tarnish-server/tornado-celery/setup.py | bbhunter/tarnish | 0a5ac30bf0e88f3caa433ba6edbf88b0c35078c0 | [
"MIT"
] | 464 | 2015-01-02T14:19:43.000Z | 2022-03-19T14:28:22.000Z | setup.py | andrey-bkstg/tornado-celery | 3a9c573ee803a187c5591b8481a23133f1f15327 | [
"BSD-3-Clause"
] | 27 | 2015-02-23T06:16:54.000Z | 2017-04-20T10:02:18.000Z | setup.py | andrey-bkstg/tornado-celery | 3a9c573ee803a187c5591b8481a23133f1f15327 | [
"BSD-3-Clause"
] | 134 | 2015-01-04T17:38:28.000Z | 2021-08-03T09:27:21.000Z | #!/usr/bin/env python
import os
import sys
import re
from setuptools import setup, find_packages
version = re.compile(r'VERSION\s*=\s*\((.*?)\)')
def get_package_version():
"returns package version without importing it"
base = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(base, "tce... | 28.513514 | 89 | 0.651185 |
acffc0c905436bac883676cb162684a1752b0d24 | 19,786 | py | Python | exps/algos/GDAS.py | yuezhixiong/AutoDL-Projects | 0d3c63bdbe2d648c2119ffe8d0491f8a07cf85cb | [
"MIT"
] | null | null | null | exps/algos/GDAS.py | yuezhixiong/AutoDL-Projects | 0d3c63bdbe2d648c2119ffe8d0491f8a07cf85cb | [
"MIT"
] | null | null | null | exps/algos/GDAS.py | yuezhixiong/AutoDL-Projects | 0d3c63bdbe2d648c2119ffe8d0491f8a07cf85cb | [
"MIT"
] | 1 | 2021-02-26T06:26:48.000Z | 2021-02-26T06:26:48.000Z | ##################################################
# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2020 #
###########################################################################
# Searching for A Robust Neural Architecture in Four GPU Hours, CVPR 2019 #
##################################################################... | 54.808864 | 194 | 0.66638 |
acffc187b0f6247290379df3813f9acfe3dab6f8 | 11,128 | py | Python | duckling/test/test_duckling.py | spenly/python-duckling | e40ecd13125779c1f774d624ab3b296b5d8c6035 | [
"Apache-2.0"
] | 129 | 2016-10-15T07:18:52.000Z | 2021-12-29T19:41:49.000Z | duckling/test/test_duckling.py | spenly/python-duckling | e40ecd13125779c1f774d624ab3b296b5d8c6035 | [
"Apache-2.0"
] | 45 | 2016-10-17T16:33:17.000Z | 2021-12-02T17:54:53.000Z | duckling/test/test_duckling.py | spenly/python-duckling | e40ecd13125779c1f774d624ab3b296b5d8c6035 | [
"Apache-2.0"
] | 29 | 2017-03-20T12:59:27.000Z | 2021-11-10T10:07:38.000Z | import pytest
import jpype
from datetime import datetime, timedelta
from dateutil import parser
from dateutil.tz import tzlocal
from duckling import Duckling, Dim, Language
@pytest.fixture
def test_input():
return '2pm'
@pytest.fixture
def test_time_input():
return 'Let\'s meet tomorrow'
@pytest.fixture
d... | 28.533333 | 112 | 0.717739 |
acffc231bd9d4b9a6886afb4cfcfdd88c9c494c1 | 603 | py | Python | main.py | we-wow/pf-work | e40a4c20833d83db34e6737cd2b885a903034934 | [
"MIT"
] | null | null | null | main.py | we-wow/pf-work | e40a4c20833d83db34e6737cd2b885a903034934 | [
"MIT"
] | null | null | null | main.py | we-wow/pf-work | e40a4c20833d83db34e6737cd2b885a903034934 | [
"MIT"
] | null | null | null | from tools import *
result, times, source = decoupling_method(brach_path='./data_network.txt', power_path='./data_power.txt')
short_circuit_bus = 4 # 短路点编号
sc_voltage, sc_current, info = accurate_short_circuit_param(result=result, source=source,
short_cir... | 54.818182 | 107 | 0.731343 |
acffc257f4aec5a1b5c2f37f9921487fb330d660 | 1,228 | py | Python | tests/pymcell4_positive/0185_model_deepcopy/model.py | mcellteam/mcell-tests | 34d2d967b75d56edbae999bf0090641850f4f4fe | [
"MIT"
] | 1 | 2021-08-13T20:40:54.000Z | 2021-08-13T20:40:54.000Z | tests/pymcell4_positive/0185_model_deepcopy/model.py | mcellteam/mcell_tests | 34d2d967b75d56edbae999bf0090641850f4f4fe | [
"MIT"
] | null | null | null | tests/pymcell4_positive/0185_model_deepcopy/model.py | mcellteam/mcell_tests | 34d2d967b75d56edbae999bf0090641850f4f4fe | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import os
import math
import copy
MCELL_PATH = os.environ.get('MCELL_PATH', '')
if MCELL_PATH:
sys.path.append(os.path.join(MCELL_PATH, 'lib'))
else:
print("Error: variable MCELL_PATH that is used to find the mcell library was not set.")
sys.exit(1)
import mcell as m
fr... | 21.172414 | 91 | 0.722313 |
acffc263b77d3574f920568bf53b4b144993f40b | 885 | py | Python | model/tensorflow_hub/examples/tfhub_text_classifier/textclassifier.py | sk-ip/dffml | 1ef5a169327d71baecd5eccae83ad4a9999ccad1 | [
"MIT"
] | null | null | null | model/tensorflow_hub/examples/tfhub_text_classifier/textclassifier.py | sk-ip/dffml | 1ef5a169327d71baecd5eccae83ad4a9999ccad1 | [
"MIT"
] | null | null | null | model/tensorflow_hub/examples/tfhub_text_classifier/textclassifier.py | sk-ip/dffml | 1ef5a169327d71baecd5eccae83ad4a9999ccad1 | [
"MIT"
] | null | null | null | from dffml import CSVSource, Features, Feature
from dffml.noasync import train, accuracy, predict
from dffml_model_tensorflow_hub.text_classifier import TextClassificationModel
from dffml_model_tensorflow_hub.text_classifier_accuracy import (
TextClassifierAccuracy,
)
model = TextClassificationModel(
features=... | 30.517241 | 78 | 0.750282 |
acffc2d2df7b10b36bc78806241e0a971d85881c | 1,956 | pyw | Python | MobileMouse/VINI_server.pyw | yugrocks/MobileMouse | f60515633a8e03551f2ae618e39c82f49617cc16 | [
"MIT"
] | 40 | 2017-04-11T09:33:39.000Z | 2021-12-29T03:21:55.000Z | MobileMouse/VINI_server.pyw | yugrocks/MobileMouse | f60515633a8e03551f2ae618e39c82f49617cc16 | [
"MIT"
] | 1 | 2019-12-02T05:25:40.000Z | 2019-12-02T05:25:40.000Z | MobileMouse/VINI_server.pyw | yugrocks/MobileMouse | f60515633a8e03551f2ae618e39c82f49617cc16 | [
"MIT"
] | 5 | 2017-07-22T16:48:35.000Z | 2020-11-16T10:49:16.000Z | __author__='Yugal'
from socket import SOL_SOCKET,SO_REUSEADDR,AF_INET,SOCK_STREAM,socket
from time import strftime,sleep
from threading import Thread
import os
class viniServer:
conn = None
s=None
def __init__(self):
self.s=socket(AF_INET,SOCK_STREAM)
self.s.setsockopt(SOL_SO... | 23.566265 | 70 | 0.496421 |
acffc34b0c1c793d59a365bd9eb8eca2f5fe33af | 5,866 | py | Python | CGAT/scripts/liftover.py | CGATOxford/cgat | 326aad4694bdfae8ddc194171bb5d73911243947 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 87 | 2015-01-01T03:48:19.000Z | 2021-11-23T16:23:24.000Z | CGAT/scripts/liftover.py | CGATOxford/cgat | 326aad4694bdfae8ddc194171bb5d73911243947 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 189 | 2015-01-06T15:53:11.000Z | 2019-05-31T13:19:45.000Z | CGAT/scripts/liftover.py | CGATOxford/cgat | 326aad4694bdfae8ddc194171bb5d73911243947 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 56 | 2015-01-13T02:18:50.000Z | 2022-01-05T10:00:59.000Z | '''
liftover.py - simple liftover script
======================================================
:Tags: Python
Purpose
-------
liftover coordinates using a liftover formatted file from the ucsc.
Usage
-----
Example::
python liftover.py --help
Type::
python liftover.py --help
for command line help.
Comman... | 26.663636 | 86 | 0.498125 |
acffc3640677c5c1b7b8f1759656c0fe0ae79365 | 4,712 | py | Python | tests/bootstrap_task_test.py | danieldiamond/dbt-sugar | 0645722cb52cf9eb685d65b556beb9b4c2d3cbcf | [
"Apache-2.0"
] | 94 | 2020-12-21T20:00:38.000Z | 2022-03-31T13:53:00.000Z | tests/bootstrap_task_test.py | danieldiamond/dbt-sugar | 0645722cb52cf9eb685d65b556beb9b4c2d3cbcf | [
"Apache-2.0"
] | 410 | 2020-12-19T09:25:59.000Z | 2022-03-23T04:20:40.000Z | tests/bootstrap_task_test.py | danieldiamond/dbt-sugar | 0645722cb52cf9eb685d65b556beb9b4c2d3cbcf | [
"Apache-2.0"
] | 16 | 2021-03-29T23:11:35.000Z | 2022-03-10T11:27:26.000Z | from collections import OrderedDict
from pathlib import Path
import pytest
FIXTURE_DIR = Path(__file__).resolve().parent
@pytest.mark.datafiles(FIXTURE_DIR)
def test_build_all_models_dict(datafiles):
from dbt_sugar.core.clients.dbt import DbtProfile
from dbt_sugar.core.config.config import DbtSugarConfig
... | 34.903704 | 95 | 0.523769 |
acffc3c4325c7c1e2ca199cc4221f5c4c74b9ede | 11,253 | py | Python | mltk/batch_agg.py | haowen-xu/ml-essentials | ca44186be37887461205227c32995f1485b4ff41 | [
"MIT"
] | 4 | 2019-08-06T03:23:14.000Z | 2019-11-08T10:58:54.000Z | mltk/batch_agg.py | haowen-xu/ml-essentials | ca44186be37887461205227c32995f1485b4ff41 | [
"MIT"
] | null | null | null | mltk/batch_agg.py | haowen-xu/ml-essentials | ca44186be37887461205227c32995f1485b4ff41 | [
"MIT"
] | 2 | 2019-12-03T08:09:05.000Z | 2020-10-15T06:50:20.000Z | import operator
from enum import Enum
from functools import reduce
from typing import *
import numpy as np
from .stage import StageType
from .utils import ALL, NOT_SET
__all__ = [
'BatchAggregationMode',
'BatchAggregator', 'BatchAggregatorDict',
]
class BatchAggregationMode(str, Enum):
CONCAT = 'CONCA... | 36.3 | 83 | 0.566071 |
acffc5a1abdedb2406bea684a208712892b1b205 | 1,934 | py | Python | animation_unitest.py | sillybun/pyctlib | d4c8b191fd270923ad73924760847f2bdbdd9116 | [
"MIT"
] | 3 | 2021-07-03T17:27:44.000Z | 2021-09-26T20:48:19.000Z | animation_unitest.py | sillybun/pyctlib | d4c8b191fd270923ad73924760847f2bdbdd9116 | [
"MIT"
] | null | null | null | animation_unitest.py | sillybun/pyctlib | d4c8b191fd270923ad73924760847f2bdbdd9116 | [
"MIT"
] | 1 | 2022-03-08T08:54:03.000Z | 2022-03-08T08:54:03.000Z | import sys
import os
from sys import getsizeof
sys.path.append(os.path.abspath("."))
import zytlib
import pathlib
import numpy as np
from zytlib import vector, IndexMapping, scope, vhelp
from zytlib.vector import chain_function
from zytlib.filemanager import path, get_relative_path, file
from zytlib import touch
from ... | 24.794872 | 81 | 0.711479 |
acffc65a0769530f0fab63689fceaf3fcbca5133 | 13,790 | py | Python | PythonVirtEnv/Lib/site-packages/plotly/validators/_scattermapbox.py | zuhorski/EPL_Project | 2d2417652879cfbe33c44c003ad77b7222590849 | [
"MIT"
] | 2 | 2021-07-18T11:39:56.000Z | 2021-11-06T17:13:05.000Z | venv/Lib/site-packages/plotly/validators/_scattermapbox.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | null | null | null | venv/Lib/site-packages/plotly/validators/_scattermapbox.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | null | null | null | import _plotly_utils.basevalidators
class ScattermapboxValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="scattermapbox", parent_name="", **kwargs):
super(ScattermapboxValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_nam... | 48.556338 | 78 | 0.54583 |
acffc65eb04a01dd578a1a7020c65a845dd6c593 | 12,726 | py | Python | SWIM-Executables/Windows/pyinstaller-2.0 for windows/PyInstaller/lib/macholib/MachO.py | alexsigaras/SWIM | 1a35df8acb26bdcb307a1b8f60e9feba68ed1715 | [
"MIT"
] | 47 | 2020-03-08T08:43:28.000Z | 2022-03-18T18:51:55.000Z | SWIM-Executables/Windows/pyinstaller-2.0 for windows/PyInstaller/lib/macholib/MachO.py | alexsigaras/SWIM | 1a35df8acb26bdcb307a1b8f60e9feba68ed1715 | [
"MIT"
] | null | null | null | SWIM-Executables/Windows/pyinstaller-2.0 for windows/PyInstaller/lib/macholib/MachO.py | alexsigaras/SWIM | 1a35df8acb26bdcb307a1b8f60e9feba68ed1715 | [
"MIT"
] | 16 | 2020-03-08T08:43:30.000Z | 2022-01-10T22:05:57.000Z | """
Utilities for reading and writing Mach-O headers
"""
from __future__ import print_function
import sys
import struct
from macholib.mach_o import *
from macholib.dyld import dyld_find, framework_info
from macholib.util import fileview
try:
from macholib.compat import bytes
except ImportError:
pass
try:
... | 35.154696 | 79 | 0.572057 |
acffc94af86a02a08259879f16a6964f096dc012 | 8,487 | py | Python | lte/gateway/python/magma/pipelined/rule_mappers.py | veshkemburu/magma | 44660c281cece41f2c3f8ef9b9d88d17d47ba312 | [
"BSD-3-Clause"
] | null | null | null | lte/gateway/python/magma/pipelined/rule_mappers.py | veshkemburu/magma | 44660c281cece41f2c3f8ef9b9d88d17d47ba312 | [
"BSD-3-Clause"
] | null | null | null | lte/gateway/python/magma/pipelined/rule_mappers.py | veshkemburu/magma | 44660c281cece41f2c3f8ef9b9d88d17d47ba312 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... | 35.215768 | 84 | 0.648875 |
acffc9a960a11ee590e2bb5f20ad0329c346a629 | 352 | py | Python | 401-500/401-410/406-queueReconstructionByHeight/queueReconstructionByHeight.py | xuychen/Leetcode | c8bf33af30569177c5276ffcd72a8d93ba4c402a | [
"MIT"
] | null | null | null | 401-500/401-410/406-queueReconstructionByHeight/queueReconstructionByHeight.py | xuychen/Leetcode | c8bf33af30569177c5276ffcd72a8d93ba4c402a | [
"MIT"
] | null | null | null | 401-500/401-410/406-queueReconstructionByHeight/queueReconstructionByHeight.py | xuychen/Leetcode | c8bf33af30569177c5276ffcd72a8d93ba4c402a | [
"MIT"
] | null | null | null | class Solution(object):
def reconstructQueue(self, people):
"""
:type people: List[List[int]]
:rtype: List[List[int]]
"""
sorted_people = sorted(people, key=lambda x: (-x[0], x[1]))
result = []
for person in sorted_people:
result.insert(person[1]... | 25.142857 | 67 | 0.542614 |
acffc9f0b0a57d1024d9539b0ee93b5c718deb8e | 1,066 | py | Python | scripts/sra_table_to_samples.py | stajichlab/PopGenomics_Afumigatus_Global | 12e4dfab5df016142fc9845c908525cd3ae3de36 | [
"MIT"
] | null | null | null | scripts/sra_table_to_samples.py | stajichlab/PopGenomics_Afumigatus_Global | 12e4dfab5df016142fc9845c908525cd3ae3de36 | [
"MIT"
] | null | null | null | scripts/sra_table_to_samples.py | stajichlab/PopGenomics_Afumigatus_Global | 12e4dfab5df016142fc9845c908525cd3ae3de36 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import csv,sys,re
outdir="SRA"
with open("lib/SRA_samples.csv","rt") as inp, open("samples.csv","rt") as existing, open("samples.csv.2","w",newline="",encoding="utf-8") as outf:
outcsv = csv.writer(outf,delimiter=",")
csvin = csv.reader(inp,delimiter=",")
sampin = csv.reader(existing,... | 32.30303 | 146 | 0.550657 |
acffca4d555683675dbbb3ce2196f01ad76d01e9 | 4,942 | py | Python | nuitka/codegen/templates/CodeTemplatesConstants.py | RESP3CT88/Nuitka | 0fcc25d9f00c4fc78c79a863c4b7987f573962e1 | [
"Apache-2.0"
] | null | null | null | nuitka/codegen/templates/CodeTemplatesConstants.py | RESP3CT88/Nuitka | 0fcc25d9f00c4fc78c79a863c4b7987f573962e1 | [
"Apache-2.0"
] | null | null | null | nuitka/codegen/templates/CodeTemplatesConstants.py | RESP3CT88/Nuitka | 0fcc25d9f00c4fc78c79a863c4b7987f573962e1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | 32.513158 | 117 | 0.694051 |
acffca8dc1bc939e9585c4cabc2a9c061e24d1f5 | 1,344 | py | Python | omaha_server/crash/tests/test_managers.py | dentalwings/omaha-server | 3d8e18c8f4aac4eb16445c0f3160ed1fc2fc8de5 | [
"Apache-2.0"
] | 2 | 2019-06-13T20:47:18.000Z | 2022-03-31T03:14:54.000Z | omaha_server/crash/tests/test_managers.py | dentalwings/omaha-server | 3d8e18c8f4aac4eb16445c0f3160ed1fc2fc8de5 | [
"Apache-2.0"
] | 1 | 2020-02-26T20:03:27.000Z | 2020-02-26T20:03:27.000Z | omaha_server/crash/tests/test_managers.py | dentalwings/omaha-server | 3d8e18c8f4aac4eb16445c0f3160ed1fc2fc8de5 | [
"Apache-2.0"
] | null | null | null | # coding: utf8
"""
This software is licensed under the Apache 2 license, quoted below.
Copyright 2014 Crystalnix 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/... | 32 | 93 | 0.751488 |
acffcb0326edecd277d5a5cbcdd43400e82907b5 | 997 | py | Python | cardinal_pythonlib/sql/__init__.py | RudolfCardinal/pythonlib | 4c583ad1aae3c1166a4e6f964df87eb6c02a73cb | [
"Apache-2.0"
] | 10 | 2015-09-30T02:46:48.000Z | 2021-07-23T05:03:38.000Z | cardinal_pythonlib/sql/__init__.py | RudolfCardinal/pythonlib | 4c583ad1aae3c1166a4e6f964df87eb6c02a73cb | [
"Apache-2.0"
] | 9 | 2019-07-04T11:10:31.000Z | 2021-09-23T21:11:42.000Z | cardinal_pythonlib/sql/__init__.py | RudolfCardinal/pythonlib | 4c583ad1aae3c1166a4e6f964df87eb6c02a73cb | [
"Apache-2.0"
] | 4 | 2017-07-17T15:17:44.000Z | 2021-07-23T05:03:41.000Z | #!/usr/bin/env python
# cardinal_pythonlib/sql/__init__.py
"""
===============================================================================
Original code copyright (C) 2009-2021 Rudolf Cardinal (rudolf@pobox.com).
This file is part of cardinal_pythonlib.
Licensed under the Apache License, Version 2.0... | 34.37931 | 79 | 0.620863 |
acffcb533d398c77a18c9fb1813a132fa2e06665 | 5,311 | py | Python | topi/python/topi/nn/pad.py | wix-playground/incubator-tvm | c9e2cc2c3daa8065257c76fce42d9c22e06ebb54 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | topi/python/topi/nn/pad.py | SunicYosen/tvm-rram | 99734d29b77ef88fe81b0fd0cb2b71db8dc2608e | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | topi/python/topi/nn/pad.py | SunicYosen/tvm-rram | 99734d29b77ef88fe81b0fd0cb2b71db8dc2608e | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # 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... | 36.376712 | 86 | 0.615703 |
acffcba1eec411a3d2965d2218e8595ee0cca912 | 116,857 | py | Python | build/releases/release-0.492/ob/lisp-core.py | farinacci/lispers.net | e1ed6e0f0a242b13ad629afb0fc1c7072b19b30c | [
"Apache-2.0"
] | 26 | 2019-02-01T19:12:21.000Z | 2022-03-25T04:40:38.000Z | build/releases/release-0.492/ob/lisp-core.py | farinacci/lispers.net | e1ed6e0f0a242b13ad629afb0fc1c7072b19b30c | [
"Apache-2.0"
] | 3 | 2019-10-29T17:49:19.000Z | 2022-03-20T21:21:31.000Z | build/releases/release-0.492/ob/lisp-core.py | farinacci/lispers.net | e1ed6e0f0a242b13ad629afb0fc1c7072b19b30c | [
"Apache-2.0"
] | 4 | 2019-02-02T16:50:48.000Z | 2020-10-29T03:10:58.000Z | # -----------------------------------------------------------------------------
#
# Copyright 2013-2019 lispers.net - Dino Farinacci <farinacci@gmail.com>
#
# 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... | 45.970496 | 149 | 0.631524 |
acffcc199b0ffec3a1827455e739363b9111eae0 | 13,083 | py | Python | openprocurement/auction/worker/auction.py | ProzorroUKR/openprocurement.auction.worker | 26fe9ff4084f634227df7984a8dd7347fc839665 | [
"Apache-2.0"
] | null | null | null | openprocurement/auction/worker/auction.py | ProzorroUKR/openprocurement.auction.worker | 26fe9ff4084f634227df7984a8dd7347fc839665 | [
"Apache-2.0"
] | 4 | 2018-09-26T12:06:14.000Z | 2019-10-31T07:58:44.000Z | openprocurement/auction/worker/auction.py | ProzorroUKR/openprocurement.auction.worker | 26fe9ff4084f634227df7984a8dd7347fc839665 | [
"Apache-2.0"
] | null | null | null | import logging
from copy import deepcopy
from urlparse import urljoin
from datetime import datetime
from couchdb import Database, Session
from gevent import sleep
from gevent.event import Event
from gevent.lock import BoundedSemaphore
from yaml import safe_dump as yaml_dump
from requests import Session as RequestsSe... | 41.012539 | 117 | 0.599633 |
acffcd9b42d667025f1fd81718da7ef4c3e1e15b | 15,237 | py | Python | mistral/tests/unit/engine/test_direct_workflow.py | rocky11030/mistral | fe18ebda9441b513bae9741b7b99db5556ccbbba | [
"Apache-2.0"
] | null | null | null | mistral/tests/unit/engine/test_direct_workflow.py | rocky11030/mistral | fe18ebda9441b513bae9741b7b99db5556ccbbba | [
"Apache-2.0"
] | null | null | null | mistral/tests/unit/engine/test_direct_workflow.py | rocky11030/mistral | fe18ebda9441b513bae9741b7b99db5556ccbbba | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 - Mirantis, Inc.
# Copyright 2015 - StackStorm, 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 re... | 26.968142 | 77 | 0.576557 |
acffcddf23bcdb5b1492e4bceca46516e6337018 | 715 | py | Python | LeetCode/0125_Valid_Palindrome.py | Achyut-sudo/PythonAlgorithms | 21fb6522510fde7a0877b19a8cedd4665938a4df | [
"MIT"
] | 144 | 2020-09-13T22:54:57.000Z | 2022-02-24T21:54:25.000Z | LeetCode/0125_Valid_Palindrome.py | Achyut-sudo/PythonAlgorithms | 21fb6522510fde7a0877b19a8cedd4665938a4df | [
"MIT"
] | 587 | 2020-05-06T18:55:07.000Z | 2021-09-20T13:14:53.000Z | LeetCode/0125_Valid_Palindrome.py | Achyut-sudo/PythonAlgorithms | 21fb6522510fde7a0877b19a8cedd4665938a4df | [
"MIT"
] | 523 | 2020-09-09T12:07:13.000Z | 2022-02-24T21:54:31.000Z | class Solution:
def isPalindrome(self, s: str) -> bool:
alphnum = ""
#Extract only alphanumeric characters from the given string
for i in s:
#Check whether the character is a lowercase letter or a number
if ord(i)>=ord('a') and ord(i)<=ord('z') or ord(i)>=ord("0") and ord(i)<=ord... | 39.722222 | 91 | 0.573427 |
acffce25096c6d50a184ee47375e322a7eea59e5 | 3,810 | py | Python | examples/self_supervised/datasets.py | sandutsar/catalyst | 55a3a557cb9276149cf2f70381878d87264e71c2 | [
"Apache-2.0"
] | 4 | 2019-12-14T07:27:09.000Z | 2021-03-23T14:34:37.000Z | examples/self_supervised/datasets.py | sandutsar/catalyst | 55a3a557cb9276149cf2f70381878d87264e71c2 | [
"Apache-2.0"
] | null | null | null | examples/self_supervised/datasets.py | sandutsar/catalyst | 55a3a557cb9276149cf2f70381878d87264e71c2 | [
"Apache-2.0"
] | null | null | null | from PIL import Image
import torchvision
from torchvision.datasets import CIFAR10, CIFAR100, STL10
datasets = {
"CIFAR-10": {
"dataset": CIFAR10,
"train_transform": torchvision.transforms.Compose(
[
torchvision.transforms.RandomApply(
[
... | 38.877551 | 95 | 0.476378 |
acffcef306f1e12cd8700b886ae4f4f62eb8e831 | 27,576 | py | Python | Games/hex/legacy/hex_search.py | morozig/muzero | 9798cf9ac2ab46cf6da81827607b8fa8dafbeae4 | [
"MIT"
] | null | null | null | Games/hex/legacy/hex_search.py | morozig/muzero | 9798cf9ac2ab46cf6da81827607b8fa8dafbeae4 | [
"MIT"
] | null | null | null | Games/hex/legacy/hex_search.py | morozig/muzero | 9798cf9ac2ab46cf6da81827607b8fa8dafbeae4 | [
"MIT"
] | null | null | null | """
This Python file defines the Classes for search engines that search for
moves for playing the game of hex. Currently Minimax by the
Negamax alpha-beta method is implemented along with Monte-Carlo Tree Search.
:version: FINAL
:date: 07-02-2020
:author: Joery de Vries
:edited by: Joery de Vries, Oliver Konig, Siyuan... | 47.219178 | 110 | 0.654917 |
acffcf3ab7906fb4a01c178c6dfe620790c5220f | 3,048 | py | Python | lib/node_modules/@stdlib/math/special/abs/benchmark/python/numpy/benchmark.ndarray_nd_singleton_dims_float64.py | mhmdaminraeisi/stdlib | 776f925d702132007f6f3ea02574999bb482a81d | [
"Apache-2.0"
] | 3,428 | 2016-07-14T13:48:46.000Z | 2022-03-31T22:32:13.000Z | lib/node_modules/@stdlib/math/special/abs/benchmark/python/numpy/benchmark.ndarray_nd_singleton_dims_float64.py | mhmdaminraeisi/stdlib | 776f925d702132007f6f3ea02574999bb482a81d | [
"Apache-2.0"
] | 435 | 2016-04-07T18:12:45.000Z | 2022-03-22T15:43:17.000Z | lib/node_modules/@stdlib/math/special/abs/benchmark/python/numpy/benchmark.ndarray_nd_singleton_dims_float64.py | sthagen/stdlib | 042b6215818db0e2a784e72c7e054167dcefcd2a | [
"BSL-1.0"
] | 188 | 2016-11-29T22:58:11.000Z | 2022-03-17T06:46:43.000Z | #!/usr/bin/env python
#
# @license Apache-2.0
#
# Copyright (c) 2021 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 24.190476 | 134 | 0.612533 |
acffcf53619e26669504e49deff51b0379e2f5fb | 2,311 | py | Python | supervisor/medusa/unix_user_handler.py | LexMachinaInc/supervisor | 65221682eb2590b2de504586f5736d55327e81d6 | [
"ZPL-2.1"
] | 365 | 2015-01-26T13:56:42.000Z | 2022-03-28T06:36:31.000Z | supervisor/medusa/unix_user_handler.py | LexMachinaInc/supervisor | 65221682eb2590b2de504586f5736d55327e81d6 | [
"ZPL-2.1"
] | 3 | 2015-12-29T07:44:24.000Z | 2021-03-18T06:13:07.000Z | supervisor/medusa/unix_user_handler.py | LexMachinaInc/supervisor | 65221682eb2590b2de504586f5736d55327e81d6 | [
"ZPL-2.1"
] | 135 | 2015-01-31T00:46:51.000Z | 2022-03-03T06:31:09.000Z | # -*- Mode: Python -*-
#
# Author: Sam Rushing <rushing@nightmare.com>
# Copyright 1996, 1997 by Sam Rushing
# All Rights Reserved.
#
RCS_ID = '$Id: unix_user_handler.py,v 1.4 2002/11/25 00:09:23 akuchling Exp $'
# support for `~user/public_html'.
import re... | 29.253165 | 92 | 0.555171 |
acffcf85618d88dcd14cebdbab945427d9360c49 | 1,274 | py | Python | python-{{cookiecutter.service_name}}client/{{cookiecutter.service_name}}client/v1/shell.py | shu-mutou/cookiecutter-python-os_serviceclient | 9439a988d639b03c745a077a8acf53a907818768 | [
"Apache-1.1"
] | null | null | null | python-{{cookiecutter.service_name}}client/{{cookiecutter.service_name}}client/v1/shell.py | shu-mutou/cookiecutter-python-os_serviceclient | 9439a988d639b03c745a077a8acf53a907818768 | [
"Apache-1.1"
] | null | null | null | python-{{cookiecutter.service_name}}client/{{cookiecutter.service_name}}client/v1/shell.py | shu-mutou/cookiecutter-python-os_serviceclient | 9439a988d639b03c745a077a8acf53a907818768 | [
"Apache-1.1"
] | 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
# d... | 39.8125 | 78 | 0.72135 |
acffd213125eacbbda5d0671ec33dcec06fc6982 | 14,583 | py | Python | neutron/api/rpc/handlers/dhcp_rpc.py | ljzjohnson/neutron | d78664321482c15981a09642985a540195e754e3 | [
"Apache-2.0"
] | 1 | 2018-07-04T07:59:31.000Z | 2018-07-04T07:59:31.000Z | neutron/api/rpc/handlers/dhcp_rpc.py | ljzjohnson/neutron | d78664321482c15981a09642985a540195e754e3 | [
"Apache-2.0"
] | null | null | null | neutron/api/rpc/handlers/dhcp_rpc.py | ljzjohnson/neutron | d78664321482c15981a09642985a540195e754e3 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2012 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 47.041935 | 79 | 0.614894 |
acffd2188bb840eaa79109d2f3efec7f8d54de4c | 806 | py | Python | meiduo_mall/apps/meiduo_admin/utils.py | zhengcongreal/meiduo_project | 5899a344859a0c1455e45ed4fb699d2ace08ba18 | [
"Apache-2.0"
] | null | null | null | meiduo_mall/apps/meiduo_admin/utils.py | zhengcongreal/meiduo_project | 5899a344859a0c1455e45ed4fb699d2ace08ba18 | [
"Apache-2.0"
] | 1 | 2020-11-29T13:33:12.000Z | 2020-11-29T13:33:12.000Z | meiduo_mall/apps/meiduo_admin/utils.py | zhengcongreal/meiduo_project | 5899a344859a0c1455e45ed4fb699d2ace08ba18 | [
"Apache-2.0"
] | null | null | null | from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
def jwt_response_payload_handler(token, user=None, request=None):
"""
自定义jwt认证成功返回数据
"""
return {
'token': token,
'id': user.id,
'username': user.username
}
# 自定义分页类
clas... | 26 | 65 | 0.629032 |
acffd29e88fdfd30ee9b47106c6cbbb80b6555dd | 2,530 | py | Python | gwcs/tags/geometry_models.py | jdavies-st/gwcs | 14a8c0b83603a4590a1fecb155467e6029fdc3e9 | [
"BSD-3-Clause"
] | 31 | 2015-04-21T21:40:38.000Z | 2022-03-30T20:03:08.000Z | gwcs/tags/geometry_models.py | jdavies-st/gwcs | 14a8c0b83603a4590a1fecb155467e6029fdc3e9 | [
"BSD-3-Clause"
] | 331 | 2015-01-23T17:57:55.000Z | 2022-03-11T22:54:43.000Z | gwcs/tags/geometry_models.py | jdavies-st/gwcs | 14a8c0b83603a4590a1fecb155467e6029fdc3e9 | [
"BSD-3-Clause"
] | 38 | 2015-01-13T21:22:54.000Z | 2021-09-01T01:52:19.000Z | """
ASDF tags for geometry related models.
"""
from asdf import yamlutil
from ..gwcs_types import GWCSTransformType
from .. geometry import (ToDirectionCosines, FromDirectionCosines,
SphericalToCartesian, CartesianToSpherical)
__all__ = ['DirectionCosinesType', 'SphericalCartesianType']
cla... | 36.142857 | 81 | 0.682609 |
acffd2c374da912fc80e45f92459f6bd75a25d9d | 12,243 | py | Python | testscripts/RDKB/component/RBUS/TS_RBUS_Property_GetName.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/RBUS/TS_RBUS_Property_GetName.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/RBUS/TS_RBUS_Property_GetName.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | ##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2020 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... | 47.824219 | 149 | 0.647064 |
acffd2e9b2e35eb3750e11ca27d9edee652b970b | 1,636 | py | Python | src/htsql/tweak/meta/command.py | sirex/htsql | 52275f6a584b412c109822d2ed2a5e69ac522cdf | [
"Apache-2.0"
] | 15 | 2020-02-11T11:24:34.000Z | 2022-03-03T20:46:34.000Z | src/htsql/tweak/meta/command.py | sirex/htsql | 52275f6a584b412c109822d2ed2a5e69ac522cdf | [
"Apache-2.0"
] | 1 | 2020-02-13T14:08:34.000Z | 2020-02-13T14:16:04.000Z | src/htsql/tweak/meta/command.py | sirex/htsql | 52275f6a584b412c109822d2ed2a5e69ac522cdf | [
"Apache-2.0"
] | 2 | 2020-02-13T14:10:06.000Z | 2021-02-25T04:36:05.000Z | #
# Copyright (c) 2006-2013, Prometheus Research, LLC
#
from ...core.context import context
from ...core.cache import once
from ...core.adapter import adapt, call
from ...core.error import Error
from ...core.cmd.command import Command
from ...core.cmd.act import Act, Action, RenderAction, act
from ...core.cmd.summon ... | 25.169231 | 76 | 0.656479 |
acffd31eda474e4fd0210dfc7d4c69c79ec3d610 | 4,477 | py | Python | pysswords/__main__.py | chtiprog/pysswords | 1afb8de12662094b79669c541aee2726cda0e9c8 | [
"MIT"
] | null | null | null | pysswords/__main__.py | chtiprog/pysswords | 1afb8de12662094b79669c541aee2726cda0e9c8 | [
"MIT"
] | null | null | null | pysswords/__main__.py | chtiprog/pysswords | 1afb8de12662094b79669c541aee2726cda0e9c8 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import argparse
import logging
import os
from pkg_resources import get_distribution
from .cli import CLI
from .db import (
CredentialExistsError,
CredentialNotFoundError,
DatabaseExistsError
)
from .utils import which
__project__ = 'pysswords'
__version__ = get_dis... | 37 | 79 | 0.616931 |
acffd333f163c3f294934544851b45fa5529d5a2 | 475 | py | Python | src/octopus/core/enums/rendernode.py | smaragden/OpenRenderManagement | cf3ab356f96969d7952b60417b48e941955e435c | [
"BSD-3-Clause"
] | 35 | 2015-02-23T23:13:13.000Z | 2021-01-03T05:56:39.000Z | src/octopus/core/enums/rendernode.py | smaragden/OpenRenderManagement | cf3ab356f96969d7952b60417b48e941955e435c | [
"BSD-3-Clause"
] | 15 | 2015-01-12T12:58:29.000Z | 2016-03-30T13:10:19.000Z | src/octopus/core/enums/rendernode.py | mikrosimage/OpenRenderManagement | 6f9237a86cb8e4b206313f9c22424c8002fd5e4d | [
"BSD-3-Clause"
] | 20 | 2015-03-18T06:57:13.000Z | 2020-07-01T15:09:36.000Z | RN_STATUS = (RN_UNKNOWN,
RN_BOOTING,
RN_PAUSED,
RN_IDLE,
RN_ASSIGNED,
RN_WORKING,
RN_FINISHING) = range(7)
RN_STATUS_NAMES = ('Unknown', 'Booting', 'Paused', 'Idle', 'Assigned', 'Working', 'Finishing')
RN_STATUS_SHORT_NAMES = ("U", "B", "P"... | 23.75 | 94 | 0.528421 |
acffd3bf45456880cbc36bd51890753b3ff69b4b | 508 | py | Python | src/user_data/models.py | Ahmedelmonady/ASURT_Backend_Django_Task | 83162ca774462176621fac638c41b537684527cc | [
"bzip2-1.0.6"
] | null | null | null | src/user_data/models.py | Ahmedelmonady/ASURT_Backend_Django_Task | 83162ca774462176621fac638c41b537684527cc | [
"bzip2-1.0.6"
] | null | null | null | src/user_data/models.py | Ahmedelmonady/ASURT_Backend_Django_Task | 83162ca774462176621fac638c41b537684527cc | [
"bzip2-1.0.6"
] | null | null | null | from django.db import models
# Create your models here.
class User(models.Model):
GENDER_CHOICES = (
('M', 'Male'),
('F', 'Female'),
)
Name = models.CharField(max_length=100, blank=False)
Email = models.EmailField(blank=False)
Phone = models.CharField(max_length=15, blank=False, null=True)
Age... | 31.75 | 75 | 0.706693 |
acffd433942cf5f8f7eb6417c6dffad6c62a5198 | 3,713 | py | Python | caffe2onnx/src/OPs/Conv.py | kumardesappan/caffe2onnx | b7e73feed3bbc5ddbdf25b87af93a2bae596055d | [
"BSD-3-Clause"
] | null | null | null | caffe2onnx/src/OPs/Conv.py | kumardesappan/caffe2onnx | b7e73feed3bbc5ddbdf25b87af93a2bae596055d | [
"BSD-3-Clause"
] | null | null | null | caffe2onnx/src/OPs/Conv.py | kumardesappan/caffe2onnx | b7e73feed3bbc5ddbdf25b87af93a2bae596055d | [
"BSD-3-Clause"
] | 1 | 2022-01-20T05:18:29.000Z | 2022-01-20T05:18:29.000Z | import numpy as np
import caffe2onnx.src.c2oObject as Node
##---------------------------------------------------Conv-------------------------------------------------------##
# Get hyperparameters
def getConvAttri(layer):
# Expansion coefficient dilations
dilations = [1, 1]
if layer.convolution_param.dilatio... | 45.839506 | 176 | 0.652572 |
acffd516d219eb7d61bb8ea15a948f1580939bb9 | 1,490 | py | Python | homeassistant/components/config/device_registry.py | phispi/home-assistant | dcf1e67d5d7536fcfdf336002a5107a4e9ac00c0 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/config/device_registry.py | phispi/home-assistant | dcf1e67d5d7536fcfdf336002a5107a4e9ac00c0 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/config/device_registry.py | phispi/home-assistant | dcf1e67d5d7536fcfdf336002a5107a4e9ac00c0 | [
"Apache-2.0"
] | null | null | null | """HTTP views to interact with the device registry."""
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.helpers.device_registry import async_get_registry
from homeassistant.components import websocket_api
DEPENDENCIES = ['websocket_api']
WS_TYPE_LIST = 'config/device_registry/list'... | 31.041667 | 68 | 0.667114 |
acffd532fa21753121e1df56e4dfd971424f3131 | 44,286 | py | Python | cvat/apps/dataset_manager/formats/cvat.py | ACHultman/cvat | 01eaf362aa7e03f5623e80cb12ad0b9a429ae588 | [
"Intel",
"MIT"
] | 4,197 | 2018-06-30T05:47:50.000Z | 2020-09-08T07:34:22.000Z | cvat/apps/dataset_manager/formats/cvat.py | ACHultman/cvat | 01eaf362aa7e03f5623e80cb12ad0b9a429ae588 | [
"Intel",
"MIT"
] | 1,653 | 2018-07-04T00:10:44.000Z | 2020-09-08T09:01:58.000Z | cvat/apps/dataset_manager/formats/cvat.py | ACHultman/cvat | 01eaf362aa7e03f5623e80cb12ad0b9a429ae588 | [
"Intel",
"MIT"
] | 1,253 | 2018-06-30T05:47:58.000Z | 2020-09-08T02:19:52.000Z | # Copyright (C) 2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
from io import BufferedWriter
import os
import os.path as osp
from glob import glob
from typing import Callable
import zipfile
from collections import OrderedDict
from tempfile import TemporaryDirectory
from defusedxml import ElementTree
from dat... | 40.077828 | 165 | 0.509552 |
acffd5d933b90f15df52b21e61c32fd7b09dddb4 | 2,033 | py | Python | backend/users/views.py | ryabant/foodgram | 2e6483eee9968fe64caf9502e6154a62e205edb6 | [
"BSD-2-Clause"
] | null | null | null | backend/users/views.py | ryabant/foodgram | 2e6483eee9968fe64caf9502e6154a62e205edb6 | [
"BSD-2-Clause"
] | null | null | null | backend/users/views.py | ryabant/foodgram | 2e6483eee9968fe64caf9502e6154a62e205edb6 | [
"BSD-2-Clause"
] | null | null | null | from djoser.views import UserViewSet
from django.contrib.auth import get_user_model
from rest_framework.decorators import action
from rest_framework.generics import get_object_or_404
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework import status
fro... | 41.489796 | 85 | 0.689621 |
acffd61616c0c5e49abe559f936ff96833e1c707 | 1,011 | py | Python | HW6/submission/code/main.py | ardaduz/math-cgv | bc89c0ce9beca9a9f02ca23bcf4a9116be187882 | [
"MIT"
] | null | null | null | HW6/submission/code/main.py | ardaduz/math-cgv | bc89c0ce9beca9a9f02ca23bcf4a9116be187882 | [
"MIT"
] | null | null | null | HW6/submission/code/main.py | ardaduz/math-cgv | bc89c0ce9beca9a9f02ca23bcf4a9116be187882 | [
"MIT"
] | 1 | 2021-02-14T10:41:17.000Z | 2021-02-14T10:41:17.000Z | from datetime import datetime
import glob
import numpy as np
import os
from PIL import Image
import skimage
import tensorflow as tf
from tensorflow import keras
from model import Model
from trainer import Trainer
from dataset import Dataset
from config import Config
def main():
train_data_path = '../dataset/t... | 24.071429 | 70 | 0.738872 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.