hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1ac4e7cfcac748e1302600acdcb7e5ed8cc7f71b | 10,227 | py | Python | mmgen/models/architectures/singan/generator_discriminator.py | StevenJokess/mmgeneration | e517edd8085efa6a1e221fab74719f88c3360f0d | [
"Apache-2.0"
] | null | null | null | mmgen/models/architectures/singan/generator_discriminator.py | StevenJokess/mmgeneration | e517edd8085efa6a1e221fab74719f88c3360f0d | [
"Apache-2.0"
] | null | null | null | mmgen/models/architectures/singan/generator_discriminator.py | StevenJokess/mmgeneration | e517edd8085efa6a1e221fab74719f88c3360f0d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
from functools import partial
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.runner import load_state_dict
from mmcv.utils import print_log
from mmgen.models.builder import MODULES
from mmgen.utils import get_root_logger
... | 38.885932 | 79 | 0.579544 |
1ac529ec906acfc7ec6540b44fe5c4be20df4e2a | 2,424 | py | Python | test/test_cases/branch2d/generate_dijkstra.py | gmaher/vessel_tracking | 3fd31f0b999bcd570199efd0dc7478924a90704e | [
"MIT"
] | 1 | 2019-12-16T23:07:51.000Z | 2019-12-16T23:07:51.000Z | test/test_cases/branch2d/generate_dijkstra.py | gmaher/vessel_tracking | 3fd31f0b999bcd570199efd0dc7478924a90704e | [
"MIT"
] | null | null | null | test/test_cases/branch2d/generate_dijkstra.py | gmaher/vessel_tracking | 3fd31f0b999bcd570199efd0dc7478924a90704e | [
"MIT"
] | null | null | null | import numpy as np
import os
import sys
import SimpleITK as sitk
import matplotlib.pyplot as plt
sys.path.append(os.path.abspath('../../..'))
from vessel_tracking import util
def vessel_func(i,j,I):
if i ==0 or i == N-1 or j == 0 or j == N-1:
return I[i,j]
return np.mean(I[i-1:i+1,j-1:j+1])
def act... | 16.951049 | 52 | 0.507013 |
1ac5371e5cd1b4c89f8c9729314845bf69210f21 | 13,674 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_extension_images_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_extension_images_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_extension_images_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 39.520231 | 211 | 0.672517 |
1ac579eb3b82d8d258ac37f0ec9c06e2404e59e4 | 6,425 | py | Python | terraform_compliance/steps/given/i_have_name_section_configured.py | tom-butler/terraform-compliance | 810c8874a42b95bca2da748e92473ce569d9ca17 | [
"MIT"
] | null | null | null | terraform_compliance/steps/given/i_have_name_section_configured.py | tom-butler/terraform-compliance | 810c8874a42b95bca2da748e92473ce569d9ca17 | [
"MIT"
] | null | null | null | terraform_compliance/steps/given/i_have_name_section_configured.py | tom-butler/terraform-compliance | 810c8874a42b95bca2da748e92473ce569d9ca17 | [
"MIT"
] | 1 | 2020-07-01T23:31:26.000Z | 2020-07-01T23:31:26.000Z | # -*- coding: utf-8 -*-
from radish import world
from terraform_compliance.common.bdd_tags import look_for_bdd_tags
from terraform_compliance.common.helper import (
get_resource_address_list_from_stash,
find_root_by_key,
remove_mounted_resources,
transform_asg_style_tags,
convert_resource_type
)
fr... | 43.707483 | 135 | 0.663813 |
1ac57c8ef214d91b70d54c7b3a8554c587507ba4 | 2,024 | gyp | Python | third_party/custom_tabs_client/custom_tabs_client.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | third_party/custom_tabs_client/custom_tabs_client.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | third_party/custom_tabs_client/custom_tabs_client.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'custom_tabs_client_example_apk',
'type': 'none',
'variables': {
'java_in_dir': 'src/Appl... | 30.666667 | 88 | 0.574111 |
1ac58fa993a26dbaaad0c24dce5ef35ce5cdf4dd | 544 | py | Python | examples/jbnmr_examples/s10_covariance_processing/cov_plot.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 150 | 2015-01-16T12:24:13.000Z | 2022-03-03T18:01:18.000Z | examples/jbnmr_examples/s10_covariance_processing/cov_plot.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 129 | 2015-01-13T04:58:56.000Z | 2022-03-02T13:39:16.000Z | examples/jbnmr_examples/s10_covariance_processing/cov_plot.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 88 | 2015-02-16T20:04:12.000Z | 2022-03-10T06:50:30.000Z | import nmrglue as ng
import matplotlib.pyplot as plt
import numpy as np
# open the data
dic, data = ng.pipe.read("test.ft")
uc = ng.pipe.make_uc(dic, data, 1)
x0, x1 = uc.ppm_limits()
# compute the covariance
C = np.cov(data.T)
# plot the spectrum
fig = plt.figure()
ax = fig.add_subplot(111)
cl = [1e8 * 1.30 ** x fo... | 23.652174 | 70 | 0.689338 |
1ac598974a335d5ae83324b20a7d0c639ad9fc14 | 20 | py | Python | tradeking/version.py | garygause/tradeking-api | f57a09a3f76e8ecd66adf187df86de83ea2ca42b | [
"MIT"
] | null | null | null | tradeking/version.py | garygause/tradeking-api | f57a09a3f76e8ecd66adf187df86de83ea2ca42b | [
"MIT"
] | null | null | null | tradeking/version.py | garygause/tradeking-api | f57a09a3f76e8ecd66adf187df86de83ea2ca42b | [
"MIT"
] | 1 | 2018-02-21T21:43:50.000Z | 2018-02-21T21:43:50.000Z | __version__='0.222'
| 10 | 19 | 0.75 |
1ac5a8ab3836b92ed69d1b3e578ab23b456765c1 | 3,071 | py | Python | terrascript/vcd/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/vcd/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/vcd/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/vcd/d.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class vcd_catalog(terrascript.Data):
pass
class vcd_catalog_item(terrascript.Data):
pass
class vcd_... | 13.833333 | 79 | 0.760339 |
1ac5b51c217b64b2519e87f5de2e5fa109380aa7 | 1,259 | py | Python | autorop/call/system_binsh.py | Tanson/autorop | 0d2fc71cdcc9649a6006aee641a3808f884d7fc4 | [
"MIT"
] | null | null | null | autorop/call/system_binsh.py | Tanson/autorop | 0d2fc71cdcc9649a6006aee641a3808f884d7fc4 | [
"MIT"
] | null | null | null | autorop/call/system_binsh.py | Tanson/autorop | 0d2fc71cdcc9649a6006aee641a3808f884d7fc4 | [
"MIT"
] | null | null | null | from autorop import PwnState, arutil
from pwn import log, ROP, ELF
def system_binsh(state: PwnState) -> PwnState:
"""Call ``system("/bin/sh")`` via a rop chain.
Call ``system("/bin/sh")`` using a rop chain built from ``state.libc`` and
written by ``state.overwriter``.
Arguments:
state: The c... | 33.131579 | 83 | 0.611597 |
1ac5f14f126d48a40844cfe79a140ec4842ae1fb | 392 | py | Python | checkout/migrations/0006_auto_20200923_1047.py | jansgreen/django-locallibrary-tutorial | 9e3f5b694de3676dba66fc4df05435af339a44ab | [
"CC0-1.0"
] | null | null | null | checkout/migrations/0006_auto_20200923_1047.py | jansgreen/django-locallibrary-tutorial | 9e3f5b694de3676dba66fc4df05435af339a44ab | [
"CC0-1.0"
] | null | null | null | checkout/migrations/0006_auto_20200923_1047.py | jansgreen/django-locallibrary-tutorial | 9e3f5b694de3676dba66fc4df05435af339a44ab | [
"CC0-1.0"
] | null | null | null | # Generated by Django 3.0.7 on 2020-09-23 14:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('checkout', '0005_auto_20200917_0828'),
]
operations = [
migrations.AlterField(
model_name='order',
name='delivery_co... | 20.631579 | 49 | 0.604592 |
1ac60b27ba45257c0a699c6e800d74f26cd92fe9 | 3,949 | py | Python | test/sumo/test_modes/test_prepare/test_prepare.py | ratan-lab/sumo | 61fd9513ed486f255906ee800d2825a8d89ddfac | [
"MIT"
] | 7 | 2019-11-08T00:31:05.000Z | 2021-06-14T13:44:22.000Z | test/sumo/test_modes/test_prepare/test_prepare.py | ratan-lab/sumo | 61fd9513ed486f255906ee800d2825a8d89ddfac | [
"MIT"
] | 16 | 2019-09-16T21:38:43.000Z | 2021-06-04T16:09:31.000Z | test/sumo/test_modes/test_prepare/test_prepare.py | ratan-lab/sumo | 61fd9513ed486f255906ee800d2825a8d89ddfac | [
"MIT"
] | null | null | null | from sklearn.preprocessing import StandardScaler
from sumo.modes.prepare.prepare import SumoPrepare
from sumo.constants import PREPARE_DEFAULTS
from sumo.utils import load_npz
from pandas import DataFrame
import numpy as np
import os
import pytest
def _get_args(infiles: list, outfile: str):
args = PREPARE_DEFAULT... | 31.592 | 101 | 0.642948 |
1ac6445c1aef856cfe17ea2ef68ae66be5d3e95d | 1,553 | py | Python | app/resources/v1/indicadores/indicadores_nacionais.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2019-07-25T21:15:05.000Z | 2019-07-25T21:15:05.000Z | app/resources/v1/indicadores/indicadores_nacionais.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 44 | 2019-08-05T15:24:00.000Z | 2022-01-31T23:11:31.000Z | app/resources/v1/indicadores/indicadores_nacionais.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2021-05-11T07:49:51.000Z | 2021-05-11T07:49:51.000Z | ''' Controller para fornecer dados da CEE '''
from flask import request
from flask_restful_swagger_2 import swagger
from resources.base import BaseResource
class IndicadoresNacionaisResource(BaseResource):
''' Classe de múltiplos Indicadores Nacionais '''
CUSTOM_SWAGGER_PARAMS = [
{"name": "categorias"... | 45.676471 | 91 | 0.681262 |
1ac64953ea5327aaf513ad301fb7cac0b3bc3abc | 7,739 | py | Python | demo/config.py | lechat/multiconf | c41cbe9ab3fb768a7d4dbd7b9f5d983b1306bde3 | [
"BSD-3-Clause"
] | null | null | null | demo/config.py | lechat/multiconf | c41cbe9ab3fb768a7d4dbd7b9f5d983b1306bde3 | [
"BSD-3-Clause"
] | null | null | null | demo/config.py | lechat/multiconf | c41cbe9ab3fb768a7d4dbd7b9f5d983b1306bde3 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from framework import weblogic_config, admin_server, managed_server, managed_servers, datasource
from multiconf.envs import EnvFactory
# Define environments
# Use EnvFactory() to create e... | 56.904412 | 124 | 0.696472 |
1ac65d44b2db99ca278ca3f956e63b69e40ba425 | 12,546 | py | Python | projects/DensePose/apply_net.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | projects/DensePose/apply_net.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | projects/DensePose/apply_net.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
import argparse
import glob
import logging
import os
import pickle
import sys
from typing import Any, ClassVar, Dict, List
import torch
from detectron.config import CfgNode, get_cfg
from detectron.data.detection_utils import read_image
from det... | 35.340845 | 97 | 0.647218 |
1ac6607602f449cf21d93c57320236eb5eb36c32 | 4,982 | py | Python | traitements/ajout_tag_selon_id.py | chabe01/ajout_nvx_tags_osm | bfecab6e1e19438bcd61eef272c0fb06cef2872e | [
"CC0-1.0"
] | null | null | null | traitements/ajout_tag_selon_id.py | chabe01/ajout_nvx_tags_osm | bfecab6e1e19438bcd61eef272c0fb06cef2872e | [
"CC0-1.0"
] | null | null | null | traitements/ajout_tag_selon_id.py | chabe01/ajout_nvx_tags_osm | bfecab6e1e19438bcd61eef272c0fb06cef2872e | [
"CC0-1.0"
] | null | null | null | import xml.etree.ElementTree as ET
import csv
from traitements import traitements_xml as tx, traitement_fichiers as tf, traitements_annexes as ta
def maj_tags(fichier_osm, fichier_maj, fichier_sortie, sep_fichier_maj = ','):
"""
Maj à jour des tags en ajoutant de nouveaux à partir du fichier OSM.
Le fichie... | 34.597222 | 124 | 0.688679 |
1ac66f412ae80ff1c8a17e1be7d5bc42b06f85ba | 6,454 | py | Python | examples/backups.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 7 | 2020-02-28T09:03:09.000Z | 2022-03-28T15:52:23.000Z | examples/backups.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 47 | 2020-01-16T20:32:19.000Z | 2020-08-27T04:43:00.000Z | examples/backups.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 16 | 2020-01-10T14:15:17.000Z | 2021-04-06T13:31:01.000Z | ###
# (C) Copyright [2019-2020] Hewlett Packard Enterprise Development LP
#
# 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 ... | 32.761421 | 151 | 0.745429 |
1ac67bbd7df573f147d6594b78f8c6976e8e9d2f | 14,466 | py | Python | ironic_inspector/main.py | NaohiroTamura/ironic-inspector | 7b7fba72de46806ce84d6d4758a2343b52b0c96d | [
"Apache-2.0"
] | null | null | null | ironic_inspector/main.py | NaohiroTamura/ironic-inspector | 7b7fba72de46806ce84d6d4758a2343b52b0c96d | [
"Apache-2.0"
] | null | null | null | ironic_inspector/main.py | NaohiroTamura/ironic-inspector | 7b7fba72de46806ce84d6d4758a2343b52b0c96d | [
"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
# distributed under the... | 32.728507 | 79 | 0.611572 |
1ac6acfd61129d348823761ca596f1c4070ed6a3 | 8,287 | py | Python | docs/conf.py | VeryCB/flask-slack | ec7e08e6603f0d2d06cfbaff6699df02ee507077 | [
"BSD-3-Clause"
] | 73 | 2015-01-09T13:33:36.000Z | 2020-08-14T14:34:43.000Z | docs/conf.py | VeryCB/flask-slack | ec7e08e6603f0d2d06cfbaff6699df02ee507077 | [
"BSD-3-Clause"
] | 5 | 2015-10-10T05:10:56.000Z | 2016-07-29T06:39:45.000Z | docs/conf.py | VeryCB/flask-slack | ec7e08e6603f0d2d06cfbaff6699df02ee507077 | [
"BSD-3-Clause"
] | 10 | 2015-08-11T19:17:44.000Z | 2020-08-14T14:34:49.000Z | # -*- coding: utf-8 -*-
#
# flask_slack documentation build configuration file, created by
# sphinx-quickstart on Sun Oct 19 16:31:35 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#... | 31.271698 | 79 | 0.717509 |
1ac6b9a75d70cc7e9037a7c17254218fb601a425 | 2,180 | py | Python | bin/plot_characteristics.py | dmitry-kabanov/fickettmodel | 255b1e9cae1cfb7a6b914ad61a17288d52215cc4 | [
"MIT"
] | null | null | null | bin/plot_characteristics.py | dmitry-kabanov/fickettmodel | 255b1e9cae1cfb7a6b914ad61a17288d52215cc4 | [
"MIT"
] | null | null | null | bin/plot_characteristics.py | dmitry-kabanov/fickettmodel | 255b1e9cae1cfb7a6b914ad61a17288d52215cc4 | [
"MIT"
] | null | null | null | import numpy as np
import math
import matplotlib.pyplot as plt
from scipy.integrate import ode
from scipy.integrate import quad
def compute_u_for_given_lamda(lamda):
# As we compute steady solution we start at x = 0 and move to the right,
# that is, it's more convenient to consider detonation moving to the lef... | 24.772727 | 78 | 0.634404 |
1ac6bca91c4c4dc15a478092251ccb1cf00dc202 | 59,283 | py | Python | tests/components/manual_mqtt/test_alarm_control_panel.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | tests/components/manual_mqtt/test_alarm_control_panel.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | tests/components/manual_mqtt/test_alarm_control_panel.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """The tests for the manual_mqtt Alarm Control Panel component."""
from datetime import timedelta
import unittest
from unittest.mock import Mock, patch
from homeassistant.components import alarm_control_panel
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARME... | 34.031573 | 87 | 0.550461 |
1ac6e1b895e2dae30990b6b889396fd21ff4eb1d | 5,314 | py | Python | python/main.py | Telecommunication-Telemedia-Assessment/V-BMS360 | 0c974451cfb9e75e20de292dcdeae11104260b3a | [
"Unlicense",
"MIT"
] | 5 | 2018-07-28T17:01:52.000Z | 2021-04-19T16:32:58.000Z | python/main.py | Telecommunication-Telemedia-Assessment/V-BMS360 | 0c974451cfb9e75e20de292dcdeae11104260b3a | [
"Unlicense",
"MIT"
] | 2 | 2019-09-28T13:34:37.000Z | 2019-10-31T23:53:22.000Z | python/main.py | Telecommunication-Telemedia-Assessment/V-BMS360 | 0c974451cfb9e75e20de292dcdeae11104260b3a | [
"Unlicense",
"MIT"
] | null | null | null | import numpy as np
import sys
import cv2 as cv
import readFlo as fl
# Add two optical flow
# If flow1 is the motion between A and B, and flow2 is the motion between B and C, warpFlow(flow1, flow2) return the motion between A and C
def warpFlow(flow1, flow2):
yy = np.arange(flow1.shape[0])
yy = np.transpose(np.kron... | 33.2125 | 204 | 0.641513 |
1ac72234606bcb04938b3747249fe66f476a498c | 332 | py | Python | examples/start.py | kaypee90/zebrok | d3d855c8bac98c6e9ff92541f6aff4e0fe2b57f5 | [
"MIT"
] | 13 | 2021-02-11T10:26:02.000Z | 2021-09-08T23:39:44.000Z | examples/start.py | kaypee90/zebrok | d3d855c8bac98c6e9ff92541f6aff4e0fe2b57f5 | [
"MIT"
] | 11 | 2021-02-03T14:41:33.000Z | 2022-03-17T03:31:40.000Z | examples/start.py | kaypee90/zebrok | d3d855c8bac98c6e9ff92541f6aff4e0fe2b57f5 | [
"MIT"
] | 1 | 2021-02-13T02:05:43.000Z | 2021-02-13T02:05:43.000Z | """
Example startup file showing how zebrok worker can be configured
for an application
"""
import examples
from zebrok.worker import WorkerInitializer
from tasks import long_running_task_two
worker = WorkerInitializer(number_of_slaves=3, auto_discover=True)
worker.register_task(long_running_task_two)
work... | 25.538462 | 67 | 0.807229 |
1ac72b2a16d957577c4d876dae21177351a79ef9 | 4,206 | py | Python | basic/models/mobilenet.py | Zx55/pytorch-examples | fafbb3a2bcec8beeaf19628749abea47980db1bd | [
"MIT"
] | null | null | null | basic/models/mobilenet.py | Zx55/pytorch-examples | fafbb3a2bcec8beeaf19628749abea47980db1bd | [
"MIT"
] | null | null | null | basic/models/mobilenet.py | Zx55/pytorch-examples | fafbb3a2bcec8beeaf19628749abea47980db1bd | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
import torch.nn as nn
from .net import Net
def make_divisible(x, divisor=8, min_value=None):
"""
This function is taken from the original tf repo.
It ensures that all layers have a channel number that is divisible by 8.
It can be seen here:
https://github.com/tensorflow/m... | 31.155556 | 94 | 0.537565 |
1ac72b4478dfd90a53afc1f1552b3971c1123002 | 1,340 | py | Python | detorch/utils.py | goktug97/de-torch | 85195ca70a5f811ee75c91426a4c7b3cf0601f08 | [
"MIT"
] | 4 | 2021-05-13T15:42:47.000Z | 2021-05-14T10:49:42.000Z | detorch/utils.py | goktug97/de-torch | 85195ca70a5f811ee75c91426a4c7b3cf0601f08 | [
"MIT"
] | 1 | 2022-02-16T17:23:03.000Z | 2022-02-17T13:10:37.000Z | detorch/utils.py | goktug97/de-torch | 85195ca70a5f811ee75c91426a4c7b3cf0601f08 | [
"MIT"
] | 1 | 2021-12-23T18:28:12.000Z | 2021-12-23T18:28:12.000Z | import math
import numpy as np
from functools import wraps, lru_cache
def hook(func):
func.before_register = []
func.after_register = []
def add_hook(after=True):
def _add_hook(hook):
if after:
func.after_register.append(hook)
else:
func.befo... | 24.363636 | 76 | 0.632836 |
1ac7375821c508bcda96eca6533aa389fb24d3f9 | 3,602 | py | Python | temboardagent/scripts/runtask.py | tilkow/temboard-agent | b8bf296454db68a85996f49fb6c684d57efa028a | [
"PostgreSQL"
] | null | null | null | temboardagent/scripts/runtask.py | tilkow/temboard-agent | b8bf296454db68a85996f49fb6c684d57efa028a | [
"PostgreSQL"
] | null | null | null | temboardagent/scripts/runtask.py | tilkow/temboard-agent | b8bf296454db68a85996f49fb6c684d57efa028a | [
"PostgreSQL"
] | null | null | null | # This module provide an undocumented feature mainly for development purpose:
# execute a task foreground.
#
# Usage: python -m temboardagent.scripts.runtask [options] worker_name [arg
# ...]
#
# Note that our home-made background task implementation, we use a different
# semantic that state of the art background task ... | 30.268908 | 77 | 0.645475 |
1ac7436cfc9c20769a787ed0fe1aa43be5d8c1a5 | 7,473 | py | Python | chapter3/fannsdb/fannsdb/cosmic.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | 1 | 2015-12-22T00:53:18.000Z | 2015-12-22T00:53:18.000Z | chapter3/fannsdb/fannsdb/cosmic.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | chapter3/fannsdb/fannsdb/cosmic.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | import os
import argparse
import tarfile
import re
import json
import logging
from collections import defaultdict
from bgcore import tsv
from bgcore.re import ReContext
from fannsdb.utils import RatedProgress
__CB = {
"A" : "T",
"T" : "A",
"G" : "C",
"C" : "G"
}
def complementary_sequence(seq):
return "".join(... | 28.093985 | 146 | 0.62786 |
1ac771e27a01cbd91934c5a5847815a31aea10c5 | 1,677 | py | Python | signalscope/scripts/add_kuka_state.py | makariosc/dairlib_old | 52cf0f20480802e482fd282fcf235495e387755b | [
"BSD-3-Clause"
] | null | null | null | signalscope/scripts/add_kuka_state.py | makariosc/dairlib_old | 52cf0f20480802e482fd282fcf235495e387755b | [
"BSD-3-Clause"
] | null | null | null | signalscope/scripts/add_kuka_state.py | makariosc/dairlib_old | 52cf0f20480802e482fd282fcf235495e387755b | [
"BSD-3-Clause"
] | null | null | null |
'''
Here is a basic example to plot a signal from an lcm message.
In this example, the channel is POSE_BODY.
The X coordinate is the message timestamp in microseconds,
and the Y value is pos[0], or the first value of the pos array.
Note, msg is a pre-defined variable that you must use in order
for this to work. When ... | 27.491803 | 97 | 0.725701 |
1ac7c81812ad1e0485a79045dd22cff2b1cfb50c | 1,743 | py | Python | laserembeddings/embedding.py | chiragjn/laserembeddings | 37f2aaf723966f24fe0a8d473241725fba46f691 | [
"BSD-3-Clause"
] | null | null | null | laserembeddings/embedding.py | chiragjn/laserembeddings | 37f2aaf723966f24fe0a8d473241725fba46f691 | [
"BSD-3-Clause"
] | null | null | null | laserembeddings/embedding.py | chiragjn/laserembeddings | 37f2aaf723966f24fe0a8d473241725fba46f691 | [
"BSD-3-Clause"
] | null | null | null | from typing import Optional, List, Union, BinaryIO
import numpy as np
from .encoder import SentenceEncoder
__all__ = ['BPESentenceEmbedding']
class BPESentenceEmbedding:
"""
LASER embeddings computation from BPE-encoded sentences.
Args:
encoder (str or BinaryIO): the path to LASER's encoder Py... | 35.571429 | 115 | 0.633391 |
1ac7d1c8c1f0718f6083ed33067c9ae113613f2c | 7,487 | py | Python | source/mtga/models/card_set.py | Fanta-astic/python-mtga | 83525c1bcf5172e4c86e5923a43560c3bdc1233f | [
"MIT"
] | null | null | null | source/mtga/models/card_set.py | Fanta-astic/python-mtga | 83525c1bcf5172e4c86e5923a43560c3bdc1233f | [
"MIT"
] | null | null | null | source/mtga/models/card_set.py | Fanta-astic/python-mtga | 83525c1bcf5172e4c86e5923a43560c3bdc1233f | [
"MIT"
] | null | null | null | import logging
import re
from .card import GameCard, Card
class Set(object):
def __init__(self, set_name, cards=None):
self.set_name = set_name
self.mtga_ids = set()
self.cards_in_set = list()
if cards:
for card in cards:
self.add_card(card)
def a... | 35.316038 | 119 | 0.58822 |
1ac7d4fb76d5f939c0bce911553e19d56b972b71 | 28,482 | py | Python | lenstronomy/LensModel/Profiles/chameleon.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | lenstronomy/LensModel/Profiles/chameleon.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | lenstronomy/LensModel/Profiles/chameleon.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | from lenstronomy.LensModel.Profiles.nie import NIE
from lenstronomy.LensModel.Profiles.point_mass import PointMass
from lenstronomy.LensModel.Profiles.base_profile import LensProfileBase
import lenstronomy.Util.param_util as param_util
import numpy as np
from lenstronomy.Util.package_util import exporter
export, __all... | 46.463295 | 168 | 0.61674 |
1ac7e562a4e9875bf03d9d1c2448ec3ebd0ab318 | 4,087 | py | Python | applications/diario_obra/controllers/obra.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | applications/diario_obra/controllers/obra.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | applications/diario_obra/controllers/obra.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | def index():
pesquisa = db(Obra.id >= 1).select()
return locals()
@auth.requires_login()
def _novaObra():
usuario_logado = auth.user_id
tipo = db(db.auth_user.id == usuario_logado).select(db.auth_user.tipo)[0].tipo
funcionario = 3
adm = 1
if tipo == funcionario or tipo == adm:
form = SQLFORM(Obra, _class... | 25.07362 | 135 | 0.628823 |
1ac837f51c5dfa90da78a3638bf10c5652baba4c | 4,976 | py | Python | opentelemetry-api/src/opentelemetry/context/__init__.py | ThePumpingLemma/opentelemetry-python | 9ed98eb9320b9064e43c3b43ee7c4990eec3657a | [
"Apache-2.0"
] | null | null | null | opentelemetry-api/src/opentelemetry/context/__init__.py | ThePumpingLemma/opentelemetry-python | 9ed98eb9320b9064e43c3b43ee7c4990eec3657a | [
"Apache-2.0"
] | null | null | null | opentelemetry-api/src/opentelemetry/context/__init__.py | ThePumpingLemma/opentelemetry-python | 9ed98eb9320b9064e43c3b43ee7c4990eec3657a | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 34.082192 | 100 | 0.674437 |
1ac83c59766f9632fc6d0bd83bfa35a53f8aa389 | 12,463 | py | Python | otp/otpbase/OTPBase.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | otp/otpbase/OTPBase.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | otp/otpbase/OTPBase.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | import math
import re
import time
from otp.otpbase import OTPGlobals
from otp.otpbase import OTPRender
from direct.showbase.ShowBase import ShowBase
from otp.ai.MagicWordGlobal import *
from pandac.PandaModules import Camera, TPLow, VBase4, ColorWriteAttrib, Filename, getModelPath, NodePath, Vec4
import subprocess
impo... | 36.764012 | 125 | 0.622001 |
1ac85cbbcca28947e4672a412b2535fa233a60a3 | 3,041 | py | Python | mqtt.py | frankstolle/bt-mqtt-gateway | 18ee3e5657af4c303847ee963c979dac2ffbb8e5 | [
"MIT"
] | null | null | null | mqtt.py | frankstolle/bt-mqtt-gateway | 18ee3e5657af4c303847ee963c979dac2ffbb8e5 | [
"MIT"
] | null | null | null | mqtt.py | frankstolle/bt-mqtt-gateway | 18ee3e5657af4c303847ee963c979dac2ffbb8e5 | [
"MIT"
] | null | null | null | import paho.mqtt.client as mqtt
from logger import _LOGGER
LWT_ONLINE = 'online'
LWT_OFFLINE = 'offline'
class MqttClient:
def __init__(self, config):
self._config = config
self._mqttc = mqtt.Client(client_id=self.client_id,
clean_session=False,
u... | 26.675439 | 98 | 0.69418 |
1ac8788f062b7a49d51d9fb9fb1b0b7981a44c9b | 185 | py | Python | services/bellboy/apps.py | Bellboy-Capstone/Services | 36888d90fe7ba4b2afc2ea8ad4839a8e13c7f98b | [
"MIT"
] | null | null | null | services/bellboy/apps.py | Bellboy-Capstone/Services | 36888d90fe7ba4b2afc2ea8ad4839a8e13c7f98b | [
"MIT"
] | 5 | 2020-10-07T16:31:54.000Z | 2022-03-01T22:16:54.000Z | services/bellboy/apps.py | Bellboy-Capstone/Services | 36888d90fe7ba4b2afc2ea8ad4839a8e13c7f98b | [
"MIT"
] | 2 | 2020-10-04T23:57:00.000Z | 2020-10-10T03:14:18.000Z | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class BellboyConfig(AppConfig):
name = "services.bellboy"
verbose_name = _("Bellboy")
| 23.125 | 54 | 0.767568 |
1ac8ca12859d0a4a443f8e342444b3d2414fb7c5 | 654 | py | Python | venv/Scripts/rst2pseudoxml.py | StMay/Mahjong_Server | 66ecbaac0bddafffd439a02a3c422e2f207d4fb9 | [
"MIT"
] | null | null | null | venv/Scripts/rst2pseudoxml.py | StMay/Mahjong_Server | 66ecbaac0bddafffd439a02a3c422e2f207d4fb9 | [
"MIT"
] | null | null | null | venv/Scripts/rst2pseudoxml.py | StMay/Mahjong_Server | 66ecbaac0bddafffd439a02a3c422e2f207d4fb9 | [
"MIT"
] | null | null | null | #!C:\Users\Steve\PycharmProjects\Mahjong_Server\venv\Scripts\python.exe
# $Id: rst2pseudoxml.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing pseudo-XML.
"""
... | 27.25 | 73 | 0.749235 |
1ac8d9df84fee746ba39b88924b8e02989aa6bc4 | 943 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_BD.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_BD.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_BD.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. BD metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_BD = PhoneMetadata(id='BD', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[19]\\d{2,4}', possible_length=(3, ... | 85.727273 | 248 | 0.708378 |
1ac906a55e0ebe039bd2b764a69d37bfc1dd1814 | 2,396 | py | Python | har_chain.py | niall-twomey/har_datasets | 68f142ba613ce26f67cdd6b871117f4c24ea603f | [
"MIT"
] | 24 | 2018-12-12T08:54:52.000Z | 2021-12-07T08:45:13.000Z | har_chain.py | niall-twomey/har_datasets | 68f142ba613ce26f67cdd6b871117f4c24ea603f | [
"MIT"
] | 3 | 2019-07-18T20:14:41.000Z | 2022-03-12T01:03:28.000Z | har_chain.py | niall-twomey/har_datasets | 68f142ba613ce26f67cdd6b871117f4c24ea603f | [
"MIT"
] | 9 | 2018-12-12T16:18:39.000Z | 2022-03-30T16:25:47.000Z | import numpy as np
from har_basic import basic_har
from src.base import get_ancestral_metadata
from src.motifs.models import get_classifier
from src.utils.misc import randomised_order
def har_chain(
test_dataset="anguita2013",
fs_new=33,
win_len=3,
win_inc=1,
task_name="har",
data_partition="... | 35.761194 | 116 | 0.708681 |
1ac9092d509eafa1f400a1ff7943b83139320020 | 1,387 | py | Python | src/osducli/commands/entitlements/members/remove.py | equinor/osdu-cli | 579922556925ea7ad759a6230498378cf724b445 | [
"MIT"
] | 3 | 2021-08-19T05:59:39.000Z | 2021-11-10T08:02:58.000Z | src/osducli/commands/entitlements/members/remove.py | equinor/osdu-cli | 579922556925ea7ad759a6230498378cf724b445 | [
"MIT"
] | 2 | 2021-09-13T11:10:15.000Z | 2021-11-25T13:21:54.000Z | src/osducli/commands/entitlements/members/remove.py | equinor/osdu-cli | 579922556925ea7ad759a6230498378cf724b445 | [
"MIT"
] | null | null | null | # -----------------------------------------------------------------------------
# Copyright (c) Equinor ASA. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
"""Entitleme... | 33.02381 | 88 | 0.642394 |
1ac91275010e5c487b81f6292eb25e3dcba5f548 | 94 | py | Python | code/test_in.py | jf0021/SWC-SoftwareTesting | 53764b4f0c1b853a29d1746b20ba090afaf9a0cf | [
"CC-BY-4.0",
"MIT"
] | null | null | null | code/test_in.py | jf0021/SWC-SoftwareTesting | 53764b4f0c1b853a29d1746b20ba090afaf9a0cf | [
"CC-BY-4.0",
"MIT"
] | null | null | null | code/test_in.py | jf0021/SWC-SoftwareTesting | 53764b4f0c1b853a29d1746b20ba090afaf9a0cf | [
"CC-BY-4.0",
"MIT"
] | null | null | null | action="--mean"
if not action in ['--min', '--mean', '--max']:
print "T"
else:
print "F"
| 13.428571 | 46 | 0.521277 |
1ac9908e81ac06c3b3cd9e1cc4adc7471de05142 | 632 | py | Python | tests/test_board.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 19 | 2017-09-13T07:51:58.000Z | 2022-03-28T11:04:03.000Z | tests/test_board.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 147 | 2017-09-14T13:45:30.000Z | 2022-03-14T15:54:09.000Z | tests/test_board.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 5 | 2019-08-31T13:13:30.000Z | 2021-03-26T15:46:38.000Z | import pytest
from apps.core.models import Board
from tests.conftest import RequestSetting, TestCase
@pytest.mark.usefixtures('set_user_client')
class TestBoard(TestCase, RequestSetting):
def test_list(self):
Board.objects.create(ko_name='자유 게시판',
en_name='Free Board',
... | 33.263158 | 75 | 0.610759 |
1ac9986538f103194f4b203f35b9963720067ff2 | 3,724 | py | Python | plot_saliency.py | Cogito2012/DRIVE | dba7e72ae3d1a5c2841d39d8fc51af48dd161f9e | [
"MIT"
] | 10 | 2021-11-15T07:35:45.000Z | 2022-03-30T07:09:48.000Z | plot_saliency.py | Cogito2012/DRIVE | dba7e72ae3d1a5c2841d39d8fc51af48dd161f9e | [
"MIT"
] | null | null | null | plot_saliency.py | Cogito2012/DRIVE | dba7e72ae3d1a5c2841d39d8fc51af48dd161f9e | [
"MIT"
] | null | null | null | import os, cv2
import argparse
import numpy as np
import matplotlib.pyplot as plt
from src.saliency.mlnet import MLNet
import torch
from torchvision import transforms
from src.data_transform import ProcessImages, ProcessFixations
# from src.TorchFovea import TorchFovea
def minmax_norm(salmap):
"""Normalize the sa... | 40.043011 | 124 | 0.662191 |
1ac9aa56c0997a913852c143e3e5d062bf6eec0e | 1,262 | py | Python | src/efficient_det/utils/scale_model.py | zeynep68/object-detection-efficientdet | 4d4b194bf1641cbb705e7659b66539752986c218 | [
"Apache-2.0"
] | null | null | null | src/efficient_det/utils/scale_model.py | zeynep68/object-detection-efficientdet | 4d4b194bf1641cbb705e7659b66539752986c218 | [
"Apache-2.0"
] | null | null | null | src/efficient_det/utils/scale_model.py | zeynep68/object-detection-efficientdet | 4d4b194bf1641cbb705e7659b66539752986c218 | [
"Apache-2.0"
] | null | null | null | import math
def round_filters(width_coefficient, filters, depth_divisor=8.0):
""" Round number of filters based on width coefficient.
Args:
width_coefficient: Coefficient to scale network width.
filters: Number of filters for a given layer.
depth_divisor: Constant.
From tensorflo... | 30.780488 | 78 | 0.7187 |
1ac9e5b9eec665fcbfb7be1f061bf059cd93c483 | 3,587 | py | Python | cerver/threads/worker.py | ermiry-com/py-cerver | b2db27a7e41a2dd2511882290a2d0de4b7ee82db | [
"MIT"
] | 5 | 2021-03-25T20:33:55.000Z | 2021-12-21T05:03:23.000Z | cerver/threads/worker.py | ermiry-com/py-cerver | b2db27a7e41a2dd2511882290a2d0de4b7ee82db | [
"MIT"
] | 5 | 2021-03-31T05:54:07.000Z | 2021-07-01T01:21:39.000Z | cerver/threads/worker.py | ermiry-com/py-cerver | b2db27a7e41a2dd2511882290a2d0de4b7ee82db | [
"MIT"
] | 7 | 2021-03-25T20:33:58.000Z | 2021-12-29T05:28:56.000Z | from ctypes import CFUNCTYPE, c_void_p, py_object, c_int, c_uint, c_char_p
from ..lib import lib
from .threads import thread_mutex_new, thread_mutex_delete
from .threads import thread_mutex_lock, thread_mutex_unlock
WorkerState = c_int
WorkerMethod = CFUNCTYPE (None, py_object)
WorkerDataDelete = CFUNCTYPE (None, c... | 26.57037 | 74 | 0.80513 |
1ac9f60a71577e7ad31cb3a3e330bc4567fa6659 | 952 | py | Python | qnarre.old/feeds/prep/corenlp/proto.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre.old/feeds/prep/corenlp/proto.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre.old/feeds/prep/corenlp/proto.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null |
__all__ = ('generate',)
import contextlib as cl
from fabric.api import cd, run
from fabric.api import task, settings
from .base import Config
from .corenlp import CoreNLP
from .tboard import TBoard
class Protos(Config):
def extract(self):
c = CoreNLP(self.root)
c.sources
with cd(self.... | 20.695652 | 68 | 0.60084 |
1aca10f8294bf337c2380ca54d4849d1bb81e481 | 4,906 | py | Python | descriptor-packages/vnfd/videoServer_vnfd/charms/ansible-charm/reactive/sshproxy.py | beckrian/mano | a03088ab9a35fe4ab65a30587a6f0e0d72491434 | [
"Apache-2.0"
] | 2 | 2018-11-06T17:55:56.000Z | 2021-02-09T07:40:17.000Z | descriptor-packages/vnfd/videoServer_vnfd/charms/ansible-charm/reactive/sshproxy.py | beckrian/mano | a03088ab9a35fe4ab65a30587a6f0e0d72491434 | [
"Apache-2.0"
] | null | null | null | descriptor-packages/vnfd/videoServer_vnfd/charms/ansible-charm/reactive/sshproxy.py | beckrian/mano | a03088ab9a35fe4ab65a30587a6f0e0d72491434 | [
"Apache-2.0"
] | 5 | 2018-05-25T18:08:15.000Z | 2020-01-03T14:15:46.000Z | ##
# Copyright 2016 Canonical Ltd.
# 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... | 28.195402 | 79 | 0.622503 |
1aca1740ca1999e219585875421c85687e2f62d1 | 11,981 | py | Python | qnarre/prep/config/bart.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/config/bart.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/config/bart.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2022 Quantapix 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 applicable l... | 34.727536 | 96 | 0.523329 |
1aca1be53bb7d95a57b1621dc8a1b8948eed7e24 | 2,778 | py | Python | test/unit/test_edit_functions.py | secheaper/MyDollarBot | 7337e18d856ca4d97ea04a87c03bc2ff0cfacd4a | [
"MIT"
] | 1 | 2021-11-29T01:30:48.000Z | 2021-11-29T01:30:48.000Z | test/unit/test_edit_functions.py | secheaper/MyDollarBot | 7337e18d856ca4d97ea04a87c03bc2ff0cfacd4a | [
"MIT"
] | 48 | 2021-10-13T14:46:48.000Z | 2021-11-16T17:27:03.000Z | test/unit/test_edit_functions.py | secheaper/slashbot | 7337e18d856ca4d97ea04a87c03bc2ff0cfacd4a | [
"MIT"
] | 4 | 2021-11-02T00:33:20.000Z | 2021-11-23T17:19:33.000Z | import unittest
from BaseCase import BaseCase
from datetime import datetime, timedelta
class TestAddUserRecord(BaseCase):
"""
Tests the edit series of functions in bot.py
"""
def test_store_edit_transaction(self):
"""
After user enters existing transaction and data is parsed from ... | 42.090909 | 88 | 0.679266 |
1aca4d6032ff0b121715c375899211265b129991 | 205 | py | Python | by-session/ta-922/j3/a3.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | 2 | 2015-04-29T20:59:35.000Z | 2018-09-26T13:33:43.000Z | by-session/ta-922/j3/a3.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | null | null | null | by-session/ta-922/j3/a3.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | null | null | null | a = [1, 2, 3, 1, 5]
b = [1.0, 3.0, 7.0]
c = ['ali', 'amir', 'hassan']
d = [1, 'ali', 3.0]
print b[1] + b[2]
print b[a[3]]
print a
a[3] = 4
print a
a = [4, 5]
print a
a.append(5)
print a
| 12.058824 | 30 | 0.434146 |
1aca705bbdaf026a8097ec8d8f558d218289434a | 6,852 | py | Python | eth_enr/query_db.py | ethereum/eth-enr | 80bd08a3be09a6a1f6cc3145e44851e1e1bf71d9 | [
"MIT"
] | 4 | 2020-09-01T07:46:51.000Z | 2021-11-04T14:09:02.000Z | eth_enr/query_db.py | ethereum/eth-enr | 80bd08a3be09a6a1f6cc3145e44851e1e1bf71d9 | [
"MIT"
] | 9 | 2020-09-02T01:56:09.000Z | 2020-11-30T16:00:01.000Z | eth_enr/query_db.py | ethereum/eth-enr | 80bd08a3be09a6a1f6cc3145e44851e1e1bf71d9 | [
"MIT"
] | 6 | 2020-08-31T22:31:47.000Z | 2022-03-28T18:50:04.000Z | import logging
import sqlite3
from typing import Iterable, Optional
from eth_typing import NodeID
from eth_utils import to_tuple
from eth_enr.abc import (
ENRAPI,
ConstraintAPI,
IdentitySchemeRegistryAPI,
QueryableENRDatabaseAPI,
)
from eth_enr.constants import (
IP_V4_ADDRESS_ENR_KEY,
IP_V6_A... | 32.473934 | 99 | 0.654262 |
1aca7856d4eebd45596f9de8463a5843506d6aa7 | 60,988 | py | Python | tests/common/test_client.py | szero/python-engineio | 26877b6a1841709040cd098d9650bd20b4b9ec6c | [
"MIT"
] | null | null | null | tests/common/test_client.py | szero/python-engineio | 26877b6a1841709040cd098d9650bd20b4b9ec6c | [
"MIT"
] | null | null | null | tests/common/test_client.py | szero/python-engineio | 26877b6a1841709040cd098d9650bd20b4b9ec6c | [
"MIT"
] | null | null | null | import logging
import ssl
import time
import unittest
from unittest import mock
import pytest
import websocket
from engineio import client
from engineio import exceptions
from engineio import json
from engineio import packet
from engineio import payload
class TestClient(unittest.TestCase):
def test_is_asyncio_b... | 35.334878 | 79 | 0.570096 |
1aca7918a3f3709a735a7a7718c4fec9e2252ea9 | 27,304 | py | Python | misc/ipython/profile_default/ipython_config.py | AntoinePrv/dotfiles | 19b2eee2eeb1694e1883913bca7e7a97efea9ce4 | [
"MIT"
] | 1 | 2021-08-05T00:27:52.000Z | 2021-08-05T00:27:52.000Z | misc/ipython/profile_default/ipython_config.py | AntoinePrv/dotfiles | 19b2eee2eeb1694e1883913bca7e7a97efea9ce4 | [
"MIT"
] | null | null | null | misc/ipython/profile_default/ipython_config.py | AntoinePrv/dotfiles | 19b2eee2eeb1694e1883913bca7e7a97efea9ce4 | [
"MIT"
] | null | null | null | # Configuration file for ipython.
#------------------------------------------------------------------------------
# InteractiveShellApp(Configurable) configuration
#------------------------------------------------------------------------------
## A Mixin for applications that start InteractiveShell instances.
#
# ... | 38.729078 | 213 | 0.673711 |
1acaa07e3b33bb41129d9cb0c8c9a7007a3697b2 | 600 | py | Python | examples/find_function.py | dhruvmanila/pyinspect | ce90df243e5e5ee100f13de4329c111454b8c891 | [
"MIT"
] | 87 | 2020-09-30T10:18:26.000Z | 2022-03-10T08:56:04.000Z | examples/find_function.py | dhruvmanila/pyinspect | ce90df243e5e5ee100f13de4329c111454b8c891 | [
"MIT"
] | 16 | 2020-09-30T10:57:17.000Z | 2022-01-16T02:10:45.000Z | examples/find_function.py | dhruvmanila/pyinspect | ce90df243e5e5ee100f13de4329c111454b8c891 | [
"MIT"
] | 5 | 2020-11-20T07:39:26.000Z | 2022-01-13T04:54:51.000Z | """
This tutorial shows how to use pyinspect.search
to find a module's function given a search string.
"""
# import the module whose functions you're looking for
import matplotlib.pyplot as plt
# import matplotlib
# import pyinspect
import pyinspect as pi
# Find the functions you're looking for
pi.search(pl... | 22.222222 | 74 | 0.718333 |
1acaa8c1153a3b9bb299ba78526d2d3b51be4f66 | 593 | py | Python | topo/optimized/__init__.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | null | null | null | topo/optimized/__init__.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | null | null | null | topo/optimized/__init__.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | null | null | null | import os
(basepath, _) = os.path.split(os.path.abspath(__file__))
warn_for_each_unoptimized_component = False
try:
from distutils.core import run_setup
# Run the setup script in the sandbox, so that it doesn't complain about unknown args when launched through nose
run_setup(basepath + "/compile.py")
... | 34.882353 | 116 | 0.740304 |
1acaa9c2201f99729fd28b086035cef7fab79531 | 140 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/templates/check/{check_name}/datadog_checks/{check_name}/{check_name}.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/templates/check/{check_name}/datadog_checks/{check_name}/{check_name}.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/templates/check/{check_name}/datadog_checks/{check_name}/{check_name}.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | {license_header}from datadog_checks.checks import AgentCheck
class {check_class}(AgentCheck):
def check(self, instance):
pass
| 20 | 60 | 0.742857 |
1acab513cda93c467ad22c9aa10e5c89b207eb20 | 9,700 | py | Python | characterCrowdSrc/gui.py | campbellwmorgan/charactercrowd | 968f53ea23c347d57e7e45d46206ab4dc8fb39ca | [
"Apache-2.0"
] | 1 | 2016-08-04T11:49:12.000Z | 2016-08-04T11:49:12.000Z | characterCrowdSrc/gui.py | campbellwmorgan/charactercrowd | 968f53ea23c347d57e7e45d46206ab4dc8fb39ca | [
"Apache-2.0"
] | null | null | null | characterCrowdSrc/gui.py | campbellwmorgan/charactercrowd | 968f53ea23c347d57e7e45d46206ab4dc8fb39ca | [
"Apache-2.0"
] | null | null | null | import pymel.core as pm
from exceptions import *
def empty(*args):
print(args)
class Gui:
def __init__(
self,
setup=empty,
load=empty,
generate=empty,
duplicate=empty,
delete=empty,
editCurrent=empty,
saveCurrent=... | 33.564014 | 120 | 0.552371 |
1acb1171a609b406383a0209052b7e8259756807 | 2,792 | py | Python | venv/lib/python3.8/site-packages/dateparser/data/date_translation_data/bez.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | 1 | 2021-11-17T04:55:14.000Z | 2021-11-17T04:55:14.000Z | dateparser/data/date_translation_data/bez.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | dateparser/data/date_translation_data/bez.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
info = {
"name": "bez",
"date_order": "DMY",
"january": [
"pa mwedzi gwa hutala",
"hut"
],
"february": [
"pa mwedzi gwa wuvili",
"vil"
],
"march": [
"pa mwedzi gwa wudatu",
"dat"
],
"april": [
"pa mwedzi ... | 16.327485 | 38 | 0.302292 |
1acb266c454a1281a1e19ca199381cb18e546ac5 | 55 | py | Python | conekt/__init__.py | legumeinfo/CoNekT | 709a4980cfa255cafd456b268e274db2b4b1f5fb | [
"MIT"
] | 14 | 2018-08-20T03:07:21.000Z | 2021-11-04T11:15:31.000Z | conekt/__init__.py | mutwil/CoNekT | f4a4496a87d14b15bcf587975b31a2edc24c6bf7 | [
"MIT"
] | 9 | 2018-07-17T15:30:47.000Z | 2021-07-05T13:11:54.000Z | conekt/__init__.py | mutwil/CoNekT | f4a4496a87d14b15bcf587975b31a2edc24c6bf7 | [
"MIT"
] | 3 | 2019-08-05T09:16:34.000Z | 2019-12-04T23:59:28.000Z | from .app import create_app
from .extensions import *
| 13.75 | 27 | 0.781818 |
1acb267fadf9e437ab389133fd0e05b8beb224ea | 1,666 | py | Python | playground/create_primary_validator_updated.py | rajat4665/thenewboston-python | df842c793fe7bfd8731fd8746abf25747c9e569e | [
"MIT"
] | null | null | null | playground/create_primary_validator_updated.py | rajat4665/thenewboston-python | df842c793fe7bfd8731fd8746abf25747c9e569e | [
"MIT"
] | 3 | 2021-03-30T14:03:41.000Z | 2021-09-22T19:30:31.000Z | playground/create_primary_validator_updated.py | rajat4665/thenewboston-python | df842c793fe7bfd8731fd8746abf25747c9e569e | [
"MIT"
] | null | null | null | import os
from playground.config import SIGNED_REQUESTS_DIR, SIGNING_KEY_DIR
from thenewboston.accounts.key_files import read_signing_key_file
from thenewboston.utils.files import write_json
from thenewboston.utils.format import format_address
from thenewboston.utils.network import post
from thenewboston.utils.signed_... | 23.464789 | 85 | 0.684874 |
1acb582d6bdfc2c6b7a592c299f06ad64f45d51a | 524 | py | Python | mmdet3d/models/losses/__init__.py | wangguojun2018/CenterNet3d | 5ddee6be104a9a22ee80fdeddc6f2627e36966d2 | [
"Apache-2.0"
] | 91 | 2020-08-07T09:38:32.000Z | 2022-02-12T08:11:08.000Z | mmdet3d/models/losses/__init__.py | wangguojun2018/CenterNet3d | 5ddee6be104a9a22ee80fdeddc6f2627e36966d2 | [
"Apache-2.0"
] | 12 | 2020-08-17T08:57:41.000Z | 2021-12-08T09:25:12.000Z | mmdet3d/models/losses/__init__.py | wangguojun2018/CenterNet3d | 5ddee6be104a9a22ee80fdeddc6f2627e36966d2 | [
"Apache-2.0"
] | 14 | 2020-08-12T13:14:32.000Z | 2022-01-28T16:34:21.000Z | from mmdet.models.losses import FocalLoss, SmoothL1Loss, binary_cross_entropy,CrossEntropyLoss
from .axis_aligned_iou_loss import AxisAlignedIoULoss, axis_aligned_iou_loss
from .chamfer_distance import ChamferDistance, chamfer_distance
from .center_loss import ModifiedFocalLoss,GatherBalancedL1Loss,GatherBinResLoss,wei... | 52.4 | 126 | 0.853053 |
1acb95a3f38e5c8aa7563567e87ada4c98b2a3dc | 19,382 | py | Python | fairseq_cli/generate.py | MANGA-UOFA/NAUS | 8c0c0815a280d0661adf588302848c7f1ecc56da | [
"MIT"
] | null | null | null | fairseq_cli/generate.py | MANGA-UOFA/NAUS | 8c0c0815a280d0661adf588302848c7f1ecc56da | [
"MIT"
] | null | null | null | fairseq_cli/generate.py | MANGA-UOFA/NAUS | 8c0c0815a280d0661adf588302848c7f1ecc56da | [
"MIT"
] | null | null | null | #!/usr/bin/env python3 -u
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Translate pre-processed data with a trained model.
"""
import ast
import logging
import math
import os
import sy... | 41.150743 | 180 | 0.557063 |
1acb9d783669bb7b14178258292627c529969d7e | 101 | py | Python | abc/abc131/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/abc131/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/abc131/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | S = input()
if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
print("Bad")
else:
print("Good") | 20.2 | 48 | 0.445545 |
1acba3130b94dcc1b9132406fa34550fc9931bd1 | 4,595 | py | Python | nicos_virt_mlz/kws2/setups/collimation.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"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_virt_mlz/kws2/setups/collimation.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"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_virt_mlz/kws2/setups/collimation.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
description = 'collimation setup'
group = 'lowlevel'
display_order = 10
presets = configdata('config_collimation.COLLIMATION_PRESETS')
devices = dict(
collimation = device('nicos_mlz.kws1.devices.collimation.Collimation',
description = 'high-level collimation device',
mapp... | 32.132867 | 78 | 0.57062 |
1acbb182c3123cc1ce1dc49271ddeb533450bc9a | 1,305 | py | Python | 04_NEURAL_NETWORKS/cap_02_first_neurons/layer_of_neurons.py | san99tiago/ML_BASICS | ebd51827f7dd427c848b5c8e1d4bfd017d2fb56f | [
"MIT"
] | 2 | 2021-03-18T06:07:09.000Z | 2021-05-08T22:14:14.000Z | 04_NEURAL_NETWORKS/cap_02_first_neurons/layer_of_neurons.py | san99tiago/ML_BASICS | ebd51827f7dd427c848b5c8e1d4bfd017d2fb56f | [
"MIT"
] | null | null | null | 04_NEURAL_NETWORKS/cap_02_first_neurons/layer_of_neurons.py | san99tiago/ML_BASICS | ebd51827f7dd427c848b5c8e1d4bfd017d2fb56f | [
"MIT"
] | null | null | null | # CODE FOR A SINGLE LAYER OF NEURONS USING NUMPY LIBRARY
# SANTIAGO GARCIA ARANGO
import numpy as np
def simple_layer_of_neurons():
"""
simple_layer_of_neurons is a simple function to show a single layer of
neurons using NumPy library to simplify code and get more efficient results
"""
inputs = [... | 25.096154 | 79 | 0.586207 |
1acbb5abbf3d742a3a5fa931b82fbafb681f7911 | 4,024 | py | Python | iliasScraper/controller.py | MisterXY89/iliasScraper | f1b751ced37c9df2ab056f4e3f3eea5f02b72099 | [
"MIT"
] | 2 | 2021-04-24T14:52:43.000Z | 2021-04-25T09:10:47.000Z | iliasScraper/controller.py | MisterXY89/iliasScraper | f1b751ced37c9df2ab056f4e3f3eea5f02b72099 | [
"MIT"
] | 1 | 2021-01-04T23:19:25.000Z | 2021-03-29T15:13:17.000Z | iliasScraper/controller.py | MisterXY89/iliasScraper | f1b751ced37c9df2ab056f4e3f3eea5f02b72099 | [
"MIT"
] | 1 | 2021-06-23T23:17:38.000Z | 2021-06-23T23:17:38.000Z |
import os
import glob
from tqdm import tqdm
from colorama import Fore, Back, Style
from .config import PATH_DELIMITER
from .login_handler import LoginHandler
from .file_parser import FileParser
from .request_handler import RequestHandler
from .download_handler import DownloadHandler
class Controller:
"""
Th... | 38.32381 | 109 | 0.655318 |
1acbccf706ce45d4150feff88f4bcad6ac5c4c18 | 4,550 | py | Python | topo/base/sheetview.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | null | null | null | topo/base/sheetview.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | null | null | null | topo/base/sheetview.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | null | null | null | """
Topographica SheetView objects and its subclasses.
For use with the Topographica plotting and data analysis mechanisms.
A Sheet object has its internal data which remains hidden, but it will
create views of this data depending on the Sheet defaults or the
information requested. This way there can be multiple view... | 34.732824 | 95 | 0.652308 |
1acbd46ac0b9558e2f0ae14ea17e7990c8cab9aa | 1,629 | py | Python | src/strategy/drive_behind_ball.py | asmacdo/UntitledSideProject | 4980da9633eda02b71ff1dfab176b575e9873714 | [
"MIT"
] | null | null | null | src/strategy/drive_behind_ball.py | asmacdo/UntitledSideProject | 4980da9633eda02b71ff1dfab176b575e9873714 | [
"MIT"
] | null | null | null | src/strategy/drive_behind_ball.py | asmacdo/UntitledSideProject | 4980da9633eda02b71ff1dfab176b575e9873714 | [
"MIT"
] | null | null | null | import math
from target import Target
from util.vec import Line, Vec3
from strategy.base import Strategy
class DriveBehindBall(Strategy):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.checkpoints = []
def calculate_target(self):
if not self.checkpoints:... | 31.326923 | 76 | 0.636587 |
1acbe24effc91a0269f41b6ca52a7d10b2f87c28 | 6,440 | py | Python | tests/blocks/test_blocklib.py | modypy/modypy | 18f7bf8e56d30f4e085c89e61d258955e85fab58 | [
"BSD-2-Clause"
] | 1 | 2021-05-05T22:33:54.000Z | 2021-05-05T22:33:54.000Z | tests/blocks/test_blocklib.py | modypy/modypy | 18f7bf8e56d30f4e085c89e61d258955e85fab58 | [
"BSD-2-Clause"
] | 30 | 2021-05-12T14:13:35.000Z | 2022-01-27T21:28:10.000Z | tests/blocks/test_blocklib.py | modypy/modypy | 18f7bf8e56d30f4e085c89e61d258955e85fab58 | [
"BSD-2-Clause"
] | 1 | 2021-03-30T13:50:59.000Z | 2021-03-30T13:50:59.000Z | # pylint: disable=missing-module-docstring
import math
import numpy as np
import pytest
from modypy.blocks.aerodyn import Propeller, Thruster
from modypy.blocks.elmech import DCMotor
from modypy.blocks.linear import sum_signal
from modypy.blocks.rigid import DirectCosineToEuler, RigidBody6DOFFlatEarth
from modypy.bloc... | 32.857143 | 79 | 0.681056 |
1acbf30e51cc9e8285e3356e6dbf4ec6d0c181e9 | 4,064 | py | Python | alipay/aop/api/request/AlipayEbppInvoiceExpenserulesSceneruleModifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayEbppInvoiceExpenserulesSceneruleModifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayEbppInvoiceExpenserulesSceneruleModifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayEbppInvoiceExpenserulesSceneruleModifyModel import AlipayEbppInvoiceExpenserulesSceneruleModifyModel
class AlipayEbppInvoiceEx... | 28.027586 | 148 | 0.652559 |
1acc61715ffc54be01c7d0042eca440791de8dfb | 128 | py | Python | quickplot.py | djgroen/flacs | 1f8e18c2db0de60e1a5fdaf0e6f92b0f08739daf | [
"BSD-3-Clause"
] | 1 | 2020-04-25T05:54:58.000Z | 2020-04-25T05:54:58.000Z | quickplot.py | djgroen/flacs | 1f8e18c2db0de60e1a5fdaf0e6f92b0f08739daf | [
"BSD-3-Clause"
] | 1 | 2020-04-25T08:47:49.000Z | 2020-04-26T21:31:55.000Z | quickplot.py | djgroen/flacs | 1f8e18c2db0de60e1a5fdaf0e6f92b0f08739daf | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
pd.options.plotting.backend = "plotly"
import sys
df = pd.read_csv(sys.argv[1])
fig = df.plot()
fig.show()
| 16 | 38 | 0.710938 |
1acc6a8d56a91e2c1d5384aeec5f22de59d664de | 1,608 | py | Python | app/api_1_0/__init__.py | wuqundong520/ApiTestManage | ad6afcbb4876e4f9183ec9027009a8f027b41783 | [
"Apache-2.0"
] | 318 | 2018-07-06T08:47:52.000Z | 2022-03-29T08:50:29.000Z | app/api_1_0/__init__.py | wuqundong520/ApiTestManage | ad6afcbb4876e4f9183ec9027009a8f027b41783 | [
"Apache-2.0"
] | 6 | 2019-07-25T02:56:57.000Z | 2021-01-25T08:31:30.000Z | app/api_1_0/__init__.py | wuqundong520/ApiTestManage | ad6afcbb4876e4f9183ec9027009a8f027b41783 | [
"Apache-2.0"
] | 145 | 2018-07-06T14:00:15.000Z | 2022-02-23T07:20:18.000Z | from flask import Blueprint, current_app, request
from flask_login import current_user
from ..models import Logs, db
from ..util.custom_decorator import login_required
import copy
import json
api = Blueprint('api', __name__)
from . import api_msg_manage, module_manage, project_manage, report_manage, build_in_manage,... | 37.395349 | 137 | 0.678483 |
1acc78e4dc991ad4882819179bd5bc28764161ed | 59 | py | Python | olutils/storing/common.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | 1 | 2020-10-23T17:11:42.000Z | 2020-10-23T17:11:42.000Z | olutils/storing/common.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | 4 | 2019-05-09T12:53:33.000Z | 2020-12-03T13:49:26.000Z | olutils/storing/common.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | null | null | null | """Common objects within storing module"""
DFT_EOL = "\n"
| 14.75 | 42 | 0.677966 |
1accab75ce32b50ef882416e60bcc95369127068 | 4,166 | py | Python | whoville/cloudbreak/models/platform_access_configs_response.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | whoville/cloudbreak/models/platform_access_configs_response.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | whoville/cloudbreak/models/platform_access_configs_response.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Cloudbreak API
Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud... | 33.596774 | 984 | 0.62674 |
1accae26cfcd5215303f3ee12909ce817b7cf75f | 5,392 | py | Python | github/tests/test_views.py | h3nnn4n/git-o-matic-9k | d8241cc768591e0f41c02b2057d7b56697a4cc86 | [
"MIT"
] | null | null | null | github/tests/test_views.py | h3nnn4n/git-o-matic-9k | d8241cc768591e0f41c02b2057d7b56697a4cc86 | [
"MIT"
] | null | null | null | github/tests/test_views.py | h3nnn4n/git-o-matic-9k | d8241cc768591e0f41c02b2057d7b56697a4cc86 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.urls import reverse
from django.contrib.auth.models import User
from rest_framework.test import APIClient
import vcr
from github.tasks import add_or_update_repository
test_vcr = vcr.VCR(
serializer='yaml',
cassette_library_dir='github/tests/fixtures/vcr_cassettes... | 36.432432 | 103 | 0.664874 |
1accd6e7108cb4e9c1a5eb979615596eab1ac4ac | 1,309 | py | Python | txtfield_test.py | gauravssnl/Symbian-Python-Files | 59d5c5ad0ea5c7c4ac28b1e1ee6443ed2d354502 | [
"MIT"
] | 7 | 2018-05-28T11:55:07.000Z | 2022-03-26T16:45:00.000Z | txtfield_test.py | gauravssnl/Symbian-Python-Files | 59d5c5ad0ea5c7c4ac28b1e1ee6443ed2d354502 | [
"MIT"
] | null | null | null | txtfield_test.py | gauravssnl/Symbian-Python-Files | 59d5c5ad0ea5c7c4ac28b1e1ee6443ed2d354502 | [
"MIT"
] | 3 | 2019-04-23T19:28:12.000Z | 2020-03-27T10:38:02.000Z | # coding: utf-8
'''import appuifw, txtfield
appuifw.app.body.clear()
itimer=appuifw.e32.Ao_timer()
lock=appuifw.e32.Ao_lock()
itimer.after(15, lock.signal)
flag=1
list = [unicode(i) for i in range(10)]
def cb():
pass
def cb1():
print 1
global flag
if flag:
search.visible(1)
... | 19.833333 | 61 | 0.611154 |
1accf4935f9c57b1ad451102d8c1e8c83dbf7c16 | 6,531 | py | Python | telethon/network/authenticator.py | Rezlazy/Telethon | 239ee16bc3c6e393d3777414fc504cacd7d70642 | [
"MIT"
] | null | null | null | telethon/network/authenticator.py | Rezlazy/Telethon | 239ee16bc3c6e393d3777414fc504cacd7d70642 | [
"MIT"
] | null | null | null | telethon/network/authenticator.py | Rezlazy/Telethon | 239ee16bc3c6e393d3777414fc504cacd7d70642 | [
"MIT"
] | 1 | 2020-11-08T19:03:10.000Z | 2020-11-08T19:03:10.000Z | import os
import time
from hashlib import sha1
from ..tl.types import (
ResPQ, PQInnerData, ServerDHParamsFail, ServerDHParamsOk,
ServerDHInnerData, ClientDHInnerData, DhGenOk, DhGenRetry, DhGenFail
)
from .. import helpers as utils
from ..crypto import AES, AuthKey, Factorization
from ..crypto import rsa
from... | 32.819095 | 77 | 0.691318 |
1acd0dcb0315ad607b1775da1965f30c8d7c8111 | 1,660 | py | Python | tests/test_time_average_displacement.py | pzarabadip/thermof | 44c33e37aeadce31241a878135b1531757a2b1c4 | [
"MIT"
] | null | null | null | tests/test_time_average_displacement.py | pzarabadip/thermof | 44c33e37aeadce31241a878135b1531757a2b1c4 | [
"MIT"
] | 11 | 2017-08-15T22:11:32.000Z | 2017-08-22T23:32:17.000Z | tests/test_time_average_displacement.py | pzarabadip/thermof | 44c33e37aeadce31241a878135b1531757a2b1c4 | [
"MIT"
] | 1 | 2017-01-31T19:44:02.000Z | 2017-01-31T19:44:02.000Z | """
Tests time averaged displacement for trajectory.
"""
import numpy as np
from thermof.trajectory.tools import time_avg_displacement, time_avg_squared_displacement
def test_time_averaged_displacement_with_different_reference_frames():
""" Tests time averaged (mean) displacement for linear motion of a single par... | 51.875 | 126 | 0.711446 |
1acd1103044c5e7d5c379ee4af8f456799ae8580 | 2,087 | py | Python | processor/common/configure.py | MainakRepositor/WhatsApp-Analyzer | 2a3c0de61935501fc9ff888b6cb8dc34095e9dfa | [
"MIT"
] | 5 | 2021-12-10T11:44:59.000Z | 2022-02-02T16:03:31.000Z | processor/common/configure.py | MainakRepositor/WhatsApp-Analyzer | 2a3c0de61935501fc9ff888b6cb8dc34095e9dfa | [
"MIT"
] | 1 | 2021-12-15T06:14:17.000Z | 2021-12-20T02:46:45.000Z | processor/common/configure.py | MainakRepositor/WhatsApp-Analyzer | 2a3c0de61935501fc9ff888b6cb8dc34095e9dfa | [
"MIT"
] | 1 | 2022-01-26T11:13:33.000Z | 2022-01-26T11:13:33.000Z | """Hold Streamlit Configuration details for Application"""
# Banner Display on backend terminal
BANNER = """
Welcome to
\\ \\ / / | | |
\\ \\ /\\ / /| |__ __ _| |_ ___ __ _ _ __ _ __
\\ \\/ \\/ / | '_ \\ / _` | __/ __|/ _` | '_ \\| '_ \\
\\ /\\ / | | | | (_| ... | 30.691176 | 91 | 0.516531 |
1acd2bab06dfe7b75938a3678e9c7daeb7ea9e94 | 17,004 | py | Python | src/python/platforms/android/device.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | null | null | null | src/python/platforms/android/device.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | null | null | null | src/python/platforms/android/device.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 38.557823 | 92 | 0.748706 |
1acd2d2c2a9a7fe704098323c70a8a3ef587f2a5 | 10 | py | Python | tests/data/micro-targets/invalid-target.py | ichard26/blackperf | 1e4e36b8de4ba351a95f4948866620bada64cf53 | [
"MIT"
] | 3 | 2021-04-28T03:59:03.000Z | 2021-06-26T02:12:30.000Z | tests/data/micro-targets/invalid-target.py | ichard26/blackperf | 1e4e36b8de4ba351a95f4948866620bada64cf53 | [
"MIT"
] | 6 | 2021-06-14T22:46:31.000Z | 2021-08-14T22:46:25.000Z | tests/data/micro-targets/invalid-target.py | ichard26/blackperf | 1e4e36b8de4ba351a95f4948866620bada64cf53 | [
"MIT"
] | 2 | 2021-09-18T15:23:21.000Z | 2022-02-01T13:02:33.000Z | invalid =
| 5 | 9 | 0.7 |
1acd307b5a86f3cab0c9e1f6885a5c1c42d21d2a | 2,804 | py | Python | src/fit_plane.py | ArianeDucellier/timelags | 383c5702ad25405555d934c984ac8245722f8596 | [
"MIT"
] | 1 | 2022-01-18T00:29:23.000Z | 2022-01-18T00:29:23.000Z | src/fit_plane.py | ArianeDucellier/timelags | 383c5702ad25405555d934c984ac8245722f8596 | [
"MIT"
] | null | null | null | src/fit_plane.py | ArianeDucellier/timelags | 383c5702ad25405555d934c984ac8245722f8596 | [
"MIT"
] | null | null | null | """
Fit plane to tremor depths
"""
import numpy as np
import pandas as pd
import pickle
from sklearn import linear_model
from sklearn.metrics import r2_score, mean_squared_error
arrays = ['BH', 'BS', 'DR', 'GC', 'PA', 'TB']
#arrays = ['BH', 'BS', 'DR', 'PA', 'TB']
type_stack = 'PWS'
cc_stack = 'PWS'
threshold = 0.0... | 32.604651 | 113 | 0.604137 |
1acd339a2403093292f7c88715875b57e5bc44aa | 641 | py | Python | setup.py | UCSC-nanopore-cgl/toil-marginPhase | 57ca8cb1fdeccfd98861e545673f4f37c8ff6287 | [
"MIT"
] | null | null | null | setup.py | UCSC-nanopore-cgl/toil-marginPhase | 57ca8cb1fdeccfd98861e545673f4f37c8ff6287 | [
"MIT"
] | null | null | null | setup.py | UCSC-nanopore-cgl/toil-marginPhase | 57ca8cb1fdeccfd98861e545673f4f37c8ff6287 | [
"MIT"
] | null | null | null | from version import version, required_versions
from setuptools import find_packages, setup
kwargs = dict(
name='toil-marginphase',
version=version,
description="UCSC CGL MarginPhase Toil pipeiline",
author='UCSC Computational Genomics Lab',
author_email='cgl-toil@googlegroups.com',
url="https:... | 30.52381 | 94 | 0.706708 |
1acd34089b5a68f24e2ef3689bf71ca304afe7b6 | 1,574 | py | Python | tests/test_adapters.py | Ho011/pylowdb | 1922358aca6db3e529deb321ad4fc8435fd3eaef | [
"MIT"
] | 3 | 2021-12-30T08:43:33.000Z | 2022-01-26T20:59:09.000Z | tests/test_adapters.py | Ho011/pylowdb | 1922358aca6db3e529deb321ad4fc8435fd3eaef | [
"MIT"
] | null | null | null | tests/test_adapters.py | Ho011/pylowdb | 1922358aca6db3e529deb321ad4fc8435fd3eaef | [
"MIT"
] | null | null | null | import unittest
import os
from pylowdb import (
JSONFile,
Memory,
TextFile,
YAMLFile,
)
class JSONFileTestCase(unittest.TestCase):
def test_json_file(self):
data = {'a': 1}
filename = 'tempfile.temp'
file = JSONFile(filename)
self.assertIsNone(file.read())
... | 19.924051 | 52 | 0.591487 |
1acd346c5b22cb3d454415a6fd844631bf4f9e73 | 3,382 | py | Python | scalability/ssh.py | 3cL1p5e7/ic | 2b6011291d900454cedcf86ec41c8c1994fdf7d9 | [
"Apache-2.0"
] | 941 | 2021-05-10T08:14:14.000Z | 2022-03-31T11:40:24.000Z | scalability/ssh.py | 3cL1p5e7/ic | 2b6011291d900454cedcf86ec41c8c1994fdf7d9 | [
"Apache-2.0"
] | 3 | 2022-02-16T12:24:20.000Z | 2022-03-23T12:05:41.000Z | scalability/ssh.py | 3cL1p5e7/ic | 2b6011291d900454cedcf86ec41c8c1994fdf7d9 | [
"Apache-2.0"
] | 122 | 2021-05-10T08:21:23.000Z | 2022-03-25T20:34:12.000Z | import subprocess
from termcolor import colored
def scp_file(source, destination):
p = subprocess.Popen(
["scp", "-o", "UserKnownHostsFile=/dev/null", "-o", "StrictHostKeyChecking=No", "-q", source, destination]
)
return p
def run_ssh(machine, command, f_stdout=None, f_stderr=None):
"""Run ... | 28.183333 | 114 | 0.555884 |
1acd58d8e431326ff0570f323f7093d290fcb91c | 11,224 | py | Python | homeassistant/components/flux_led/light.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/flux_led/light.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/flux_led/light.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for Flux lights."""
import logging
import random
from flux_led import BulbScanner, WifiLedBulb
import voluptuous as vol
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
ATTR_EFFECT,
ATTR_HS_COLOR,
ATTR_WHITE_VALUE,
EFFECT_COLORLOOP,
EFFECT_RANDOM,
... | 29.930667 | 87 | 0.634711 |
1acd599617088b65acfbed52fa1c1996e8017224 | 17,708 | py | Python | main_ol.py | ZYAZP/python2 | 7dc3b62eff51e1decb4a408122e77630fdc1687d | [
"MIT"
] | 1,062 | 2015-11-18T01:04:33.000Z | 2022-03-29T07:13:30.000Z | main_ol.py | ArrowSides/onelinerizer | 7dc3b62eff51e1decb4a408122e77630fdc1687d | [
"MIT"
] | 26 | 2015-11-17T06:58:07.000Z | 2022-01-15T18:11:16.000Z | main_ol.py | ArrowSides/onelinerizer | 7dc3b62eff51e1decb4a408122e77630fdc1687d | [
"MIT"
] | 100 | 2015-11-17T09:01:22.000Z | 2021-09-12T13:58:28.000Z | (lambda __builtin__: (lambda __print, __y, __d: [[[[[[[[[[(lambda __after: (lambda __after: (lambda ___: __after(__d))(__print('Usage: python main.py inputfilename [outputfilename]')) if __d.len(__d.sys.argv)<=1 else [(lambda __after: [__after(__d) for __d.outfilename in [(__d.sys.argv[2])]][0] if __d.len(__d.sys.argv)... | 8,854 | 17,707 | 0.689462 |
1acd611023e5e92cbc9fc281e8eb730a3ac4e43b | 778 | py | Python | pangadfs/fitness.py | sansbacon/pangadfs | 0a93ea0872f4dbb57be159653d202e01dce7047c | [
"MIT"
] | 7 | 2020-10-22T08:33:31.000Z | 2021-12-28T05:07:31.000Z | pangadfs/fitness.py | sansbacon/pangadfs | 0a93ea0872f4dbb57be159653d202e01dce7047c | [
"MIT"
] | 12 | 2020-10-23T19:06:30.000Z | 2021-05-20T16:29:51.000Z | pangadfs/fitness.py | sansbacon/pangadfs | 0a93ea0872f4dbb57be159653d202e01dce7047c | [
"MIT"
] | null | null | null | # pangadfs/pangadfs/fitness.py
# -*- coding: utf-8 -*-
# Copyright (C) 2020 Eric Truett
# Licensed under the MIT License
import numpy as np
from pangadfs.base import FitnessBase
class FitnessDefault(FitnessBase):
def fitness(self,
*,
population: np.ndarray,
poi... | 24.3125 | 83 | 0.59383 |
1acd6beefaff0b5495b3ee447c6c9f01ed770357 | 2,473 | py | Python | tests/test_parser.py | pystitch/stitch | 09a16da2f2af2be6a960e2338de488c8de2c2271 | [
"MIT"
] | 468 | 2016-08-31T19:17:17.000Z | 2022-03-07T13:51:53.000Z | tests/test_parser.py | hschuett/stitch | 09a16da2f2af2be6a960e2338de488c8de2c2271 | [
"MIT"
] | 40 | 2016-08-29T20:34:47.000Z | 2020-09-21T03:25:49.000Z | tests/test_parser.py | TomAugspurger/stitch | 09a16da2f2af2be6a960e2338de488c8de2c2271 | [
"MIT"
] | 29 | 2016-08-31T19:44:19.000Z | 2019-05-16T14:37:44.000Z | import pytest
import stitch.parser as P
from stitch.parser import Token
class TestParser:
@pytest.mark.parametrize('options, expected', [
('```{python}', '```{.python}'),
('```{r, name}', '```{.r .name}'),
('```{r, echo=True}', '```{.r echo=True}'),
('```{r, name, echo=True, eval... | 31.705128 | 77 | 0.468257 |
1acd875e5c15b83fcf4e633b025b4c1390eaa62e | 6,255 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_sizes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_sizes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_sizes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 40.882353 | 135 | 0.661871 |
1acd9933acf304e36c513f0d5f607596accbb38c | 393 | py | Python | oscar/lib/python2.7/site-packages/django_redis/serializers/json.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django_redis/serializers/json.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django_redis/serializers/json.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
from django.utils.encoding import force_bytes, force_text
from .base import BaseSerializer
class JSONSerializer(BaseSerializer):
def dumps(self, value):
return force_bytes(json.dumps(value))
... | 21.833333 | 58 | 0.704835 |
1acda36ae7b4f99a1826063ee363c11efc713954 | 351 | py | Python | src/osducli/commands/list/__init__.py | equinor/osdu-cli | 579922556925ea7ad759a6230498378cf724b445 | [
"MIT"
] | 3 | 2021-08-19T05:59:39.000Z | 2021-11-10T08:02:58.000Z | src/osducli/commands/list/__init__.py | equinor/osdu-cli | 579922556925ea7ad759a6230498378cf724b445 | [
"MIT"
] | 2 | 2021-09-13T11:10:15.000Z | 2021-11-25T13:21:54.000Z | src/osducli/commands/list/__init__.py | equinor/osdu-cli | 579922556925ea7ad759a6230498378cf724b445 | [
"MIT"
] | null | null | null | # -----------------------------------------------------------------------------
# Copyright (c) Equinor ASA. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
"""List diff... | 43.875 | 79 | 0.410256 |
1acdc482b62c8f0bcefa14cb42b799e660e50cc3 | 7,400 | py | Python | machupX/__main__.py | benjaminmoulton/MachUpX | aac7df7899e1e969efbf2e457e7419ab111d7513 | [
"MIT"
] | null | null | null | machupX/__main__.py | benjaminmoulton/MachUpX | aac7df7899e1e969efbf2e457e7419ab111d7513 | [
"MIT"
] | null | null | null | machupX/__main__.py | benjaminmoulton/MachUpX | aac7df7899e1e969efbf2e457e7419ab111d7513 | [
"MIT"
] | null | null | null | """A wrapper to the Scene class that lets MachUpX behave like MachUp Pro.
Takes the input JSON as an argument and runs all analyses specified by
the "run" key."""
from .scene import Scene
import sys
import json
def _run_interactive_mode():
# Runs interactive mode, allowing the user to select which analyse... | 37.948718 | 105 | 0.460541 |
1acdd49165f63056f78507db7f557d68cbdbd2d4 | 4,288 | py | Python | samples/v2/cache_test.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1 | 2021-10-23T00:39:47.000Z | 2021-10-23T00:39:47.000Z | samples/v2/cache_test.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 13 | 2021-07-06T06:47:43.000Z | 2022-03-08T23:35:13.000Z | samples/v2/cache_test.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1 | 2021-08-22T15:51:17.000Z | 2021-08-22T15:51:17.000Z | # Copyright 2021 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 28.972973 | 80 | 0.546409 |
1acde3f1017ace2447149368a8f6c0698dc793ca | 5,659 | py | Python | bundle/deepracer_simulation_environment/lib/python2.7/dist-packages/mp4_saving/save_to_mp4.py | larsll/deepracer-simapp | 9251c32ff33d49955b63ccca4f38d01a0c721d4f | [
"MIT"
] | 1 | 2022-02-23T20:34:00.000Z | 2022-02-23T20:34:00.000Z | bundle/deepracer_simulation_environment/lib/python2.7/dist-packages/mp4_saving/save_to_mp4.py | Bandwidth/deepracer-simapp | 9bf0a5f9c55e37ecef8e72b1b6dc15ecb0370bc1 | [
"MIT"
] | null | null | null | bundle/deepracer_simulation_environment/lib/python2.7/dist-packages/mp4_saving/save_to_mp4.py | Bandwidth/deepracer-simapp | 9bf0a5f9c55e37ecef8e72b1b6dc15ecb0370bc1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
##############################################################
# #
# Copyright 2019 Amazon.com, Inc. or its affiliates. #
# All Rights Reserved. #
# ... | 50.981982 | 119 | 0.598162 |
1ace10b83e23878099776ddb6f420578ce386e8c | 583 | py | Python | plugins/holland.lib.mysql/holland/lib/mysql/__init__.py | Alibloke/holland | e630b511a95ed8e36205e8300e632018918223ff | [
"BSD-3-Clause"
] | null | null | null | plugins/holland.lib.mysql/holland/lib/mysql/__init__.py | Alibloke/holland | e630b511a95ed8e36205e8300e632018918223ff | [
"BSD-3-Clause"
] | null | null | null | plugins/holland.lib.mysql/holland/lib/mysql/__init__.py | Alibloke/holland | e630b511a95ed8e36205e8300e632018918223ff | [
"BSD-3-Clause"
] | null | null | null | """Init Module"""
from holland.lib.mysql.client.base import (
MySQLClient,
MySQLError,
ProgrammingError,
OperationalError,
connect,
AutoMySQLClient,
)
from holland.lib.mysql.schema.filter import (
IncludeFilter,
ExcludeFilter,
include_glob,
exclude_glob,
include_glob_qualifi... | 20.821429 | 89 | 0.73928 |
1ace114a4a2d342c58ed65ea3b64e8823b33b4a9 | 6,056 | py | Python | bnw/xmpp/iq_handlers.py | hirthwork/bnw | fc015a45f6a4c9ebd05b604a45b778df434aa65c | [
"BSD-2-Clause"
] | null | null | null | bnw/xmpp/iq_handlers.py | hirthwork/bnw | fc015a45f6a4c9ebd05b604a45b778df434aa65c | [
"BSD-2-Clause"
] | null | null | null | bnw/xmpp/iq_handlers.py | hirthwork/bnw | fc015a45f6a4c9ebd05b604a45b778df434aa65c | [
"BSD-2-Clause"
] | null | null | null | import base64
from cStringIO import StringIO
from twisted.words.xish import domish
from twisted.internet import defer, reactor
from twisted.internet.threads import deferToThread
from twisted.web.client import Agent
from twisted.web.http_headers import Headers
from twisted.web.iweb import IBodyProducer
from zope.interf... | 31.706806 | 89 | 0.615753 |
1ace1785873508a7df5e02a8c1bd0b012ec57985 | 3,271 | py | Python | datalad/local/tests/test_check_dates.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/local/tests/test_check_dates.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/local/tests/test_check_dates.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 et:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ### ... | 31.152381 | 87 | 0.61816 |
1ace37e8c02517a4e1603d30d7022b694141c5ab | 4,979 | py | Python | conv_is_all_you_need/src/SEResNext50_and_InceptionV3/models/SeResNext_and_Inception/torch_predict_v9_manyfold.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | conv_is_all_you_need/src/SEResNext50_and_InceptionV3/models/SeResNext_and_Inception/torch_predict_v9_manyfold.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | conv_is_all_you_need/src/SEResNext50_and_InceptionV3/models/SeResNext_and_Inception/torch_predict_v9_manyfold.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | # add oversampling
# new image format
import glob
import os
import warnings
warnings.filterwarnings("ignore")
import numpy as np
import torch
from torch.autograd import Variable
from tqdm import tqdm
import pandas as pd
from HPAdataset_01 import HPADataset
from torch import nn
from torch.optim.lr_s... | 34.576389 | 108 | 0.687086 |
1ace465b6c80b4a109f40d0dcc0f0dabb6643c08 | 389 | py | Python | User interface/scroll/scroll/asgi.py | fangyiyu/CS50_web_programming | 8d6f304772ae8bd8cd373f17545d507c6e55768e | [
"MIT"
] | 2 | 2021-04-05T15:29:08.000Z | 2022-03-08T11:07:21.000Z | Lecture 6 : User Interfaces/src6/scroll/scroll/asgi.py | Sumanth-Talluri/CS50-Web-Programming-with-Python-and-JavaScript | 8d5f83f4354f1f27138a2a9c40317d358f3b2f9a | [
"MIT"
] | null | null | null | Lecture 6 : User Interfaces/src6/scroll/scroll/asgi.py | Sumanth-Talluri/CS50-Web-Programming-with-Python-and-JavaScript | 8d5f83f4354f1f27138a2a9c40317d358f3b2f9a | [
"MIT"
] | null | null | null | """
ASGI config for scroll project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTIN... | 22.882353 | 78 | 0.784062 |
1ace4cb44c5ab0b2adf1068638347f1d41239e08 | 3,761 | py | Python | src/classifiers/frames_classifier.py | kevincong95/cs231n-emotiw | edf3e91cc585f6701c0d7946d4263da0025ad352 | [
"MIT"
] | 2 | 2020-11-25T15:16:51.000Z | 2021-03-26T23:52:11.000Z | src/classifiers/frames_classifier.py | fusical/emotiw | edf3e91cc585f6701c0d7946d4263da0025ad352 | [
"MIT"
] | 1 | 2020-05-27T02:00:04.000Z | 2020-05-27T02:00:04.000Z | src/classifiers/frames_classifier.py | fusical/emotiw | edf3e91cc585f6701c0d7946d4263da0025ad352 | [
"MIT"
] | 3 | 2020-11-25T15:17:08.000Z | 2021-12-17T09:41:50.000Z | import tensorflow as tf
from .utils import unzip_folder
from ..generators.frame_generator import FramesDataGenerator
class FramesClassifier:
"""
Classifies sentiment based on frames extracted from video clips
"""
def __init__(self, frames_folder, location_prefix="resnet", model_location=None, is_tes... | 46.432099 | 146 | 0.654879 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.