hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9dbded985b27cf9bd1bae65fff1f6bc608d3c595 | 98 | py | Python | 1 - Beginner/1155.py | andrematte/uri-submissions | 796e7fee56650d9e882880318d6e7734038be2dc | [
"MIT"
] | 1 | 2020-09-09T12:48:09.000Z | 2020-09-09T12:48:09.000Z | 1 - Beginner/1155.py | andrematte/uri-submissions | 796e7fee56650d9e882880318d6e7734038be2dc | [
"MIT"
] | null | null | null | 1 - Beginner/1155.py | andrematte/uri-submissions | 796e7fee56650d9e882880318d6e7734038be2dc | [
"MIT"
] | null | null | null | # URI Online Judge 1155
S = 0
for i in range(1,101):
S += 1/i
print('{:.2f}'.format(S)) | 12.25 | 25 | 0.530612 |
41b5e124be3a3fba9be2cc187c010c3a3a87d5a9 | 2,672 | py | Python | Hackerrank/Dijkstra/Dijkstra.py | rahil-1407/Data-Structure-and-Algorithms | ea3eb9849aeb2716ef5812a0b5621a28120b1880 | [
"MIT"
] | 51 | 2021-01-14T04:05:55.000Z | 2022-01-25T11:25:37.000Z | Hackerrank/Dijkstra/Dijkstra.py | rahil-1407/Data-Structure-and-Algorithms | ea3eb9849aeb2716ef5812a0b5621a28120b1880 | [
"MIT"
] | 638 | 2020-12-27T18:49:53.000Z | 2021-11-21T05:22:52.000Z | Hackerrank/Dijkstra/Dijkstra.py | rahil-1407/Data-Structure-and-Algorithms | ea3eb9849aeb2716ef5812a0b5621a28120b1880 | [
"MIT"
] | 124 | 2021-01-30T06:40:20.000Z | 2021-11-21T15:14:40.000Z | # Program to find the shortest path using Dijktra's algorithm
#this is implemented using queue
import sys
import queue
class Vertex:
def __init__(self):
self.edges = {}
def get_edges(self):
return self.edges
def add_edge(self, value, distance):
if value not in self.edges or dist... | 25.941748 | 107 | 0.609281 |
6a6b0e402a5efe8f4d0555c8ea4d2c3d48342465 | 44 | py | Python | tests/__init__.py | other-juju/track-viz | 5276324b5ee231b54cf575216c9cabacd590f30f | [
"MIT"
] | 2 | 2021-12-10T11:58:22.000Z | 2021-12-15T09:06:08.000Z | tests/__init__.py | other-juju/track-viz | 5276324b5ee231b54cf575216c9cabacd590f30f | [
"MIT"
] | 32 | 2021-12-08T13:39:54.000Z | 2022-03-08T03:22:41.000Z | tests/__init__.py | other-juju/track-viz | 5276324b5ee231b54cf575216c9cabacd590f30f | [
"MIT"
] | 7 | 2021-12-14T21:08:41.000Z | 2022-01-23T12:19:33.000Z | """Test suite for the track_viz package."""
| 22 | 43 | 0.704545 |
93442eba39e0430e0bbd67a783e4b1f9410732f8 | 172 | py | Python | mmseg/utils/__init__.py | albert-yue/TMANet | e19b25a318d1569ba58ccf47e03ae80385aef40b | [
"Apache-2.0"
] | null | null | null | mmseg/utils/__init__.py | albert-yue/TMANet | e19b25a318d1569ba58ccf47e03ae80385aef40b | [
"Apache-2.0"
] | null | null | null | mmseg/utils/__init__.py | albert-yue/TMANet | e19b25a318d1569ba58ccf47e03ae80385aef40b | [
"Apache-2.0"
] | null | null | null | from .collect_env import collect_env
from .logger import get_root_logger
from .dist_utils import get_dist_env
__all__ = ['get_root_logger', 'collect_env', 'get_dist_env']
| 28.666667 | 60 | 0.813953 |
f7da5eed14d93faeb0a1a396b348f553343883e2 | 4,508 | py | Python | week5-machine_learning/scripts/run_tune_example.py | Kaminyou/110-1-NTU-DBME5028 | 5aaef62cb5a3be4cbba28c2d252964a614183132 | [
"MIT"
] | 6 | 2021-10-06T03:13:59.000Z | 2021-11-07T12:59:37.000Z | week5-machine_learning/scripts/run_tune_example.py | Kaminyou/110-1-NTU-DBME5028 | 5aaef62cb5a3be4cbba28c2d252964a614183132 | [
"MIT"
] | null | null | null | week5-machine_learning/scripts/run_tune_example.py | Kaminyou/110-1-NTU-DBME5028 | 5aaef62cb5a3be4cbba28c2d252964a614183132 | [
"MIT"
] | null | null | null | """
python ./scripts/run_tune_example.py
# To see results
from ray.tune import Analysis
analysis = Analysis(PATH_TO_EXP_DIR)
df = analysis.trial_dataframes
"""
import sys
import os
import numpy as np
from random import shuffle
from collections import deque
from dataclasses import dataclass, asdict
import torch
impor... | 31.524476 | 91 | 0.623114 |
842747376cf920869ce057e6252604f973257173 | 358 | py | Python | cogs/help.py | cat-central/bonbons | 47fd1aa6ba16b0e705d2bfc716db60707def1d37 | [
"MIT"
] | 3 | 2022-02-21T11:48:22.000Z | 2022-03-29T04:59:59.000Z | cogs/help.py | cat-central/bonbons | 47fd1aa6ba16b0e705d2bfc716db60707def1d37 | [
"MIT"
] | 1 | 2022-02-27T16:57:58.000Z | 2022-02-27T16:57:58.000Z | cogs/help.py | sifte/bonbons | ca2f367b445b0374aabbc17cb17be1b020879a3a | [
"MIT"
] | null | null | null | from discord.ext.commands import Cog
from helpers.bot import Bonbons
from helpers.help.help import CustomHelpCommand
class Help(Cog):
def __init__(self, bot: Bonbons) -> None:
self.bot = bot
self.bot.help_command = CustomHelpCommand()
async def setup(bot: Bonbons) -> None:
print("Loaded: He... | 22.375 | 51 | 0.701117 |
cca5ad1db73624d5f51e7a1b02622662e51e4897 | 1,320 | py | Python | examples/sorting/cluster_auto.py | espenhgn/SpikeSort | 68dbc2180609e0e7430453229ab1f3a2b2d59bdc | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | examples/sorting/cluster_auto.py | espenhgn/SpikeSort | 68dbc2180609e0e7430453229ab1f3a2b2d59bdc | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | examples/sorting/cluster_auto.py | espenhgn/SpikeSort | 68dbc2180609e0e7430453229ab1f3a2b2d59bdc | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | #!/usr/bin/env python
#coding=utf-8
"""
Based on raw recordings detect spikes, calculate features and do automatic
clustering with gaussian mixture models.
"""
import numpy as np
import os, sys
import spike_sort as sort
from spike_sort.io.filters import PyTablesFilter, BakerlabFilter
import spike_sort.ui.manual_sor... | 26.4 | 77 | 0.668939 |
a63a23e0faefbb82bca7a77f3b7c85a8b25ecfb2 | 265 | py | Python | src/cogs/Cog.py | akabinds/pincer-bot-template | aed9a708b4c96deb030b23e327d64474cc92dcea | [
"MIT"
] | 2 | 2022-01-06T02:25:19.000Z | 2022-01-06T02:28:05.000Z | src/cogs/Cog.py | akabinds/pincer-bot-template | aed9a708b4c96deb030b23e327d64474cc92dcea | [
"MIT"
] | null | null | null | src/cogs/Cog.py | akabinds/pincer-bot-template | aed9a708b4c96deb030b23e327d64474cc92dcea | [
"MIT"
] | null | null | null | from pincer import Client, command
class Cog:
def __init__(self, client: Client) -> None:
self.client = client
@command(guild="YOUR_TESTING_GUILD_ID", name='ping', description='Pong!')
async def ping(self):
return "pong"
setup = Cog | 20.384615 | 77 | 0.656604 |
12719b688cbedfc184310183141155e6ea88f7aa | 1,490 | py | Python | Aula 38/Back/Dao/dao_sgds.py | ohanamirella/TrabalhosPython | 453a97848654b0391d0d717bf102f6c466f79b3d | [
"MIT"
] | 1 | 2020-03-09T13:38:55.000Z | 2020-03-09T13:38:55.000Z | Aula 38/Back/Dao/dao_sgds.py | ohanamirella/TrabalhosPython | 453a97848654b0391d0d717bf102f6c466f79b3d | [
"MIT"
] | null | null | null | Aula 38/Back/Dao/dao_sgds.py | ohanamirella/TrabalhosPython | 453a97848654b0391d0d717bf102f6c466f79b3d | [
"MIT"
] | null | null | null | import MySQLdb
from Model.sgbds_model import SgbdsModel
class SgbdsDao:
conexao = MySQLdb.connect(host='mysql.padawans.dev', database='padawans', user='padawans', passwd='vm2019')
cursor = conexao.cursor()
def insert(self, sgbds:SgbdsModel):
inserir = f"""
INSERT INTO tb_sgbds (
... | 27.592593 | 111 | 0.512081 |
ea2bfdd39cf8fd80d4e2883fb02ed24e16b01ba4 | 2,987 | py | Python | app/recipe/tests/test_ingredients_api.py | tsatsujnr139/recipe-app-api | 08b26254de48277518a204328ae1bf753049354b | [
"MIT"
] | null | null | null | app/recipe/tests/test_ingredients_api.py | tsatsujnr139/recipe-app-api | 08b26254de48277518a204328ae1bf753049354b | [
"MIT"
] | null | null | null | app/recipe/tests/test_ingredients_api.py | tsatsujnr139/recipe-app-api | 08b26254de48277518a204328ae1bf753049354b | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Ingredient
from recipe.serializers import IngredientSerializer
INGREDIENTS_URL = reverse('recipe:ingredi... | 33.561798 | 79 | 0.670238 |
095086de424b94ef436edd3bd0fcf917cc36dcf7 | 71,882 | py | Python | wrappers/python/indy/anoncreds.py | evernym/indy-sdk | 714d449353518f929d9787d3156af785e2a42ccb | [
"Apache-2.0"
] | 5 | 2018-04-09T12:26:28.000Z | 2019-06-12T01:45:30.000Z | wrappers/python/indy/anoncreds.py | evernym/indy-sdk | 714d449353518f929d9787d3156af785e2a42ccb | [
"Apache-2.0"
] | 9 | 2019-01-22T22:31:54.000Z | 2019-04-11T21:45:09.000Z | wrappers/python/indy/anoncreds.py | evernym/indy-sdk | 714d449353518f929d9787d3156af785e2a42ccb | [
"Apache-2.0"
] | 19 | 2018-04-25T16:08:43.000Z | 2022-01-11T10:18:38.000Z | from .libindy import do_call, create_cb
from typing import Optional
from ctypes import *
import logging
async def issuer_create_schema(issuer_did: str,
name: str,
version: str,
attrs: str) -> (str, str):
"""
Create ... | 47.793883 | 176 | 0.613978 |
642721c1b07336bb142e6ecb3f0041755603ebf3 | 14,633 | py | Python | mypy/test/testcheck.py | Zac-HD/mypy | d5b66a8411036d300e8477be6d1bd40bd28ada28 | [
"PSF-2.0"
] | null | null | null | mypy/test/testcheck.py | Zac-HD/mypy | d5b66a8411036d300e8477be6d1bd40bd28ada28 | [
"PSF-2.0"
] | 1 | 2021-05-07T15:53:17.000Z | 2021-05-07T18:43:12.000Z | mypy/test/testcheck.py | Zac-HD/mypy | d5b66a8411036d300e8477be6d1bd40bd28ada28 | [
"PSF-2.0"
] | null | null | null | """Type checker test cases"""
import os
import re
import sys
from typing import Dict, List, Set, Tuple
from mypy import build
from mypy.build import Graph
from mypy.modulefinder import BuildSource, SearchPaths, FindModuleCache
from mypy.test.config import test_temp_dir, test_data_prefix
from mypy.test.data import (
... | 41.571023 | 98 | 0.607668 |
2ee1d06ebb42414858bd38780c187452087e6612 | 2,778 | py | Python | airflow/plugins/operators/code_analyzer/utils/tests/test_evaluation.py | teiresias-personal-data-discovery/teiresias-system | 50e9d08d6924480f120d2d4f9fbebdc6035a5c5b | [
"MIT"
] | 2 | 2021-09-06T17:32:48.000Z | 2022-02-24T19:58:41.000Z | airflow/plugins/operators/code_analyzer/utils/tests/test_evaluation.py | teiresias-personal-data-discovery/teiresias-system | 50e9d08d6924480f120d2d4f9fbebdc6035a5c5b | [
"MIT"
] | null | null | null | airflow/plugins/operators/code_analyzer/utils/tests/test_evaluation.py | teiresias-personal-data-discovery/teiresias-system | 50e9d08d6924480f120d2d4f9fbebdc6035a5c5b | [
"MIT"
] | null | null | null | import pytest
from operators.code_analyzer.utils.analysis.evaluation import get_common_storage_environment, evaluate_traces, join_facts
from operators.code_analyzer.utils.tests.mocks.intermediate_results import resolved
@pytest.mark.parametrize("storage, tool, env, environment_occurrance", [
('postgres', 'docker'... | 35.615385 | 121 | 0.560115 |
cee6ea35cd28dd1783f2502385c2f5b3d0c09ff4 | 4,368 | py | Python | ros2doctor/ros2doctor/api/platform.py | LoyVanBeek/ros2cli | 93e717c042a06d21e267a89a7de7780335acb323 | [
"Apache-2.0"
] | null | null | null | ros2doctor/ros2doctor/api/platform.py | LoyVanBeek/ros2cli | 93e717c042a06d21e267a89a7de7780335acb323 | [
"Apache-2.0"
] | null | null | null | ros2doctor/ros2doctor/api/platform.py | LoyVanBeek/ros2cli | 93e717c042a06d21e267a89a7de7780335acb323 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 37.333333 | 95 | 0.684066 |
1dd1bd97ce77b0acbe5c07fb4da3c59dc6079fe9 | 10,244 | py | Python | data/external/repositories_2to3/267667/kaggle-heart-master/configurations/j6_4ch_128mm_specialist.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/267667/kaggle-heart-master/configurations/j6_4ch_128mm_specialist.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/267667/kaggle-heart-master/configurations/j6_4ch_128mm_specialist.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | """Single slice vgg with normalised scale.
"""
import functools
import lasagne as nn
import numpy as np
import theano
import theano.tensor as T
import data_loader
import deep_learning_layers
import image_transform
import layers
import preprocess
import postprocess
import objectives
import theano_print... | 46.352941 | 176 | 0.707341 |
b34c95bbc0de9b7f54878b51c96c51a1c6ad963b | 3,141 | py | Python | src/allconv.py | mayuanyang/doggy | dea7a0033a721636d423c7b7ed7344c88bf4fd6e | [
"MIT"
] | 3 | 2017-11-19T04:56:51.000Z | 2017-12-21T01:28:42.000Z | src/allconv.py | mayuanyang/doggy | dea7a0033a721636d423c7b7ed7344c88bf4fd6e | [
"MIT"
] | null | null | null | src/allconv.py | mayuanyang/doggy | dea7a0033a721636d423c7b7ed7344c88bf4fd6e | [
"MIT"
] | 1 | 2017-12-10T00:40:40.000Z | 2017-12-10T00:40:40.000Z | from __future__ import print_function
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from keras.layers import (
Input,
Activation,
Dense,
Flatten,
Dropout
)
from keras.layers.convolutional import (
Conv2D,
MaxPooling2D,
AveragePooling2D
)
fro... | 29.083333 | 88 | 0.708055 |
e0d2b3b28bbee54bf1d47fbee06a818a885aa140 | 3,370 | py | Python | nexinfosys/restful_service/mod_wsgi/monitor.py | MAGIC-nexus/nis-backend | dd425925321134f66884f60b202a59b38b7786a0 | [
"BSD-3-Clause"
] | 6 | 2019-05-31T23:02:30.000Z | 2022-01-07T22:56:50.000Z | nexinfosys/restful_service/mod_wsgi/monitor.py | ENVIRO-Module/nis-backend | fd86cf30f79f53cdccddd2a5479507d32f914d4e | [
"BSD-3-Clause"
] | 2 | 2021-12-03T18:22:42.000Z | 2021-12-13T19:57:15.000Z | nexinfosys/restful_service/mod_wsgi/monitor.py | ENVIRO-Module/nis-backend | fd86cf30f79f53cdccddd2a5479507d32f914d4e | [
"BSD-3-Clause"
] | 3 | 2019-04-05T16:45:09.000Z | 2021-03-17T12:05:44.000Z | """
Monitor changes in files from the project, published into an Apache2, using "mod_wsgi"
When a change is detected, the application is reloaded automatically, without requiring touching "nis_docker.wsgi" file
From:
http://blog.dscpl.com.au/2008/12/using-modwsgi-when-developing-django.html
https://code.google.c... | 25.725191 | 119 | 0.623145 |
a05166e5980c1ca5f2e10df37d8f8396bdb3eaea | 13,888 | py | Python | blazeface/utils/augment.py | ishaghodgaonkar/PyTorch_BlazeFace | e3898b763057b213c144ef3fb09ddd4e6eb10445 | [
"Apache-2.0"
] | null | null | null | blazeface/utils/augment.py | ishaghodgaonkar/PyTorch_BlazeFace | e3898b763057b213c144ef3fb09ddd4e6eb10445 | [
"Apache-2.0"
] | null | null | null | blazeface/utils/augment.py | ishaghodgaonkar/PyTorch_BlazeFace | e3898b763057b213c144ef3fb09ddd4e6eb10445 | [
"Apache-2.0"
] | null | null | null | import torch
from torchvision import transforms
import cv2
import numpy as np
import types
from numpy import random
def intersect(box_a, box_b):
max_xy = np.minimum(box_a[:, 2:], box_b[2:])
min_xy = np.maximum(box_a[:, :2], box_b[:2])
inter = np.clip((max_xy - min_xy), a_min=0, a_max=np.inf)
... | 32.988124 | 92 | 0.534202 |
eadce5479405a6eb0781abc49dc1078d556cc7f9 | 4,650 | py | Python | Model/predictor_dl_model/predictor_dl_model/trainer/client_rest_tf.py | helenyu18/blue-marlin | 668985fad1993a682808e271610c1cf2cec6a6f5 | [
"Apache-2.0"
] | null | null | null | Model/predictor_dl_model/predictor_dl_model/trainer/client_rest_tf.py | helenyu18/blue-marlin | 668985fad1993a682808e271610c1cf2cec6a6f5 | [
"Apache-2.0"
] | null | null | null | Model/predictor_dl_model/predictor_dl_model/trainer/client_rest_tf.py | helenyu18/blue-marlin | 668985fad1993a682808e271610c1cf2cec6a6f5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, Futurewei Technologies
#
# 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, V... | 41.517857 | 192 | 0.654839 |
a5f2b83127acf907520597bf9fcb335514cfbf17 | 3,378 | py | Python | sdk/python/pulumi_azure_nextgen/datashare/list_share_synchronizations.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/datashare/list_share_synchronizations.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/datashare/list_share_synchronizations.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from ... | 36.322581 | 152 | 0.660746 |
56c3ef02300406784cde28ee665565c3f54f7075 | 2,542 | py | Python | setup.py | pallomabritoGN/gn-api-sdk-python | c9da015207d91abb0a3c0d7b6bcbb146a7e5b849 | [
"MIT"
] | null | null | null | setup.py | pallomabritoGN/gn-api-sdk-python | c9da015207d91abb0a3c0d7b6bcbb146a7e5b849 | [
"MIT"
] | null | null | null | setup.py | pallomabritoGN/gn-api-sdk-python | c9da015207d91abb0a3c0d7b6bcbb146a7e5b849 | [
"MIT"
] | null | null | null | # Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
... | 30.261905 | 92 | 0.656176 |
b69359771c76a537373c4a89925f71150e394ec6 | 70 | py | Python | tests/data/__init__.py | chryssa-zrv/UA_COMET | 527e7c86bd0a0d8ff90efda58e820108a5666b92 | [
"Apache-2.0"
] | null | null | null | tests/data/__init__.py | chryssa-zrv/UA_COMET | 527e7c86bd0a0d8ff90efda58e820108a5666b92 | [
"Apache-2.0"
] | null | null | null | tests/data/__init__.py | chryssa-zrv/UA_COMET | 527e7c86bd0a0d8ff90efda58e820108a5666b92 | [
"Apache-2.0"
] | null | null | null | import os
DATA_PATH = os.path.dirname(os.path.abspath(__file__))+"/"
| 17.5 | 58 | 0.728571 |
d1106da7bb331ebae5a66d6d7d7da2666b528b63 | 1,698 | py | Python | benchmark/experimental_vocab.py | guyang3532/text | e2fc987ff6a002018040cffac5e0d61c3d0b06c6 | [
"BSD-3-Clause"
] | null | null | null | benchmark/experimental_vocab.py | guyang3532/text | e2fc987ff6a002018040cffac5e0d61c3d0b06c6 | [
"BSD-3-Clause"
] | null | null | null | benchmark/experimental_vocab.py | guyang3532/text | e2fc987ff6a002018040cffac5e0d61c3d0b06c6 | [
"BSD-3-Clause"
] | null | null | null | from collections import (Counter, OrderedDict)
import time
import torch
from torchtext.experimental.datasets import AG_NEWS
from torchtext.experimental.vocab import Vocab as VocabExperimental
from torchtext.vocab import Vocab
def benchmark_experimental_vocab():
def _run_benchmark_lookup(tokens, vocab):
t... | 30.321429 | 85 | 0.706125 |
109650a7ccde98c3db4a46f0e4299db624498068 | 2,713 | py | Python | minetext/clustering/distance.py | CaioMelo8/android-comments-miner | d564cc3f44bd4423e8d2621e30650d0d21436624 | [
"MIT"
] | null | null | null | minetext/clustering/distance.py | CaioMelo8/android-comments-miner | d564cc3f44bd4423e8d2621e30650d0d21436624 | [
"MIT"
] | null | null | null | minetext/clustering/distance.py | CaioMelo8/android-comments-miner | d564cc3f44bd4423e8d2621e30650d0d21436624 | [
"MIT"
] | null | null | null | from datetime import datetime
from math import sqrt, exp
import numpy as np
class LevenshteinCalculator(object):
def calculate(self, source, target):
if len(source) < len(target):
return self.calculate(target, source)
if len(target) == 0:
return len(source)
source... | 30.483146 | 100 | 0.597125 |
c776157e549a4f20884b74a074de4f709a0d38e4 | 4,211 | py | Python | configs/railway/ssd_0422_all_merged.py | huminghe/mmdetection | 37a3e5d1891a177f9cd16f3ed53195f2d8c2ef70 | [
"Apache-2.0"
] | null | null | null | configs/railway/ssd_0422_all_merged.py | huminghe/mmdetection | 37a3e5d1891a177f9cd16f3ed53195f2d8c2ef70 | [
"Apache-2.0"
] | null | null | null | configs/railway/ssd_0422_all_merged.py | huminghe/mmdetection | 37a3e5d1891a177f9cd16f3ed53195f2d8c2ef70 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/datasets/coco_detection.py',
'../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py'
]
# model settings
input_size = 300
model = dict(
type='SingleStageDetector',
backbone=dict(
type='SSDVGG',
input_size=input_size,
depth=16,
with_last_p... | 32.392308 | 172 | 0.594396 |
8395082c87447aaa793ec71b99484128d713d9c1 | 1,595 | py | Python | tests/test_scene_parser/test_dvd.py | seedzero/Caper | 9aad10e22d7c94fd67fb164f37764c9eb5f9c75b | [
"Apache-2.0"
] | null | null | null | tests/test_scene_parser/test_dvd.py | seedzero/Caper | 9aad10e22d7c94fd67fb164f37764c9eb5f9c75b | [
"Apache-2.0"
] | null | null | null | tests/test_scene_parser/test_dvd.py | seedzero/Caper | 9aad10e22d7c94fd67fb164f37764c9eb5f9c75b | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Dean Gardiner <gardiner91@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 a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 25.31746 | 74 | 0.65768 |
b90be8f5d757d7321ea104fbebe8df80c5e73a6a | 795 | py | Python | xlsxwriter/test/comparison/test_image16.py | timgates42/XlsxWriter | 129044ed821de67895b4562c6b71f90eba5be6b4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_image16.py | timgates42/XlsxWriter | 129044ed821de67895b4562c6b71f90eba5be6b4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_image16.py | timgates42/XlsxWriter | 129044ed821de67895b4562c6b71f90eba5be6b4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 23.382353 | 79 | 0.613836 |
ba4065a71acc2724153f63a37efa0aa257c4af42 | 2,035 | py | Python | python/example/render_hex_mesh.py | brokencuph/diff_pd | 2c30ecfa39762c5fc78dea9c7a226000e9fc5c15 | [
"MIT"
] | 4 | 2022-02-10T02:28:42.000Z | 2022-02-10T07:28:35.000Z | python/example/render_hex_mesh.py | srl-ethz/diffPD_sim2real | e491668995a163b8ff7542d99f0b4e0c0f4ed2df | [
"MIT"
] | null | null | null | python/example/render_hex_mesh.py | srl-ethz/diffPD_sim2real | e491668995a163b8ff7542d99f0b4e0c0f4ed2df | [
"MIT"
] | 2 | 2022-03-11T20:13:24.000Z | 2022-03-12T03:38:46.000Z | import sys
sys.path.append('../')
import os
from pathlib import Path
import numpy as np
from PIL import Image
from contextlib import contextmanager, redirect_stderr, redirect_stdout
from py_diff_pd.common.common import create_folder, ndarray
from py_diff_pd.common.common import print_info, print_ok, print_error
from ... | 37 | 124 | 0.713022 |
e4747d08e076bb3a14c0def8cd07c725a2d6f051 | 2,172 | py | Python | embedding-calculator/srcext/insightface/src/data/dir2lst_ytf.py | drawdy/CompreFace | 143b7955536f406a622248fad2d2108dfb5dd4f6 | [
"Apache-2.0"
] | null | null | null | embedding-calculator/srcext/insightface/src/data/dir2lst_ytf.py | drawdy/CompreFace | 143b7955536f406a622248fad2d2108dfb5dd4f6 | [
"Apache-2.0"
] | null | null | null | embedding-calculator/srcext/insightface/src/data/dir2lst_ytf.py | drawdy/CompreFace | 143b7955536f406a622248fad2d2108dfb5dd4f6 | [
"Apache-2.0"
] | null | null | null | # Version: 2020.02.21
#
# MIT License
#
# Copyright (c) 2018 Jiankang Deng and Jia Guo
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitatio... | 37.448276 | 81 | 0.699355 |
9a4b84f720a0fadebfc07b67c7cad4d084768d6b | 2,237 | py | Python | src/rezgui/dialogs/BrowsePackageDialog.py | alexey-pelykh/rez | ad12105d89d658e4d2ea9249e537b3de90391f0e | [
"Apache-2.0"
] | null | null | null | src/rezgui/dialogs/BrowsePackageDialog.py | alexey-pelykh/rez | ad12105d89d658e4d2ea9249e537b3de90391f0e | [
"Apache-2.0"
] | null | null | null | src/rezgui/dialogs/BrowsePackageDialog.py | alexey-pelykh/rez | ad12105d89d658e4d2ea9249e537b3de90391f0e | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Rez Project
from Qt import QtWidgets
from rezgui.util import create_pane
from rezgui.mixins.StoreSizeMixin import StoreSizeMixin
from rezgui.widgets.BrowsePackageWidget import BrowsePackageWidget
from rezgui.objects.App import app
class BrowsePac... | 34.953125 | 77 | 0.671882 |
757b0d5537634c2c0e26dbd2c08a382f4c43fda7 | 8,205 | py | Python | Lib/test/test_urllibnet.py | jimmyyu2004/jython | 5b4dc2d54d01a6fda8c55d07b2608167e7a40769 | [
"CNRI-Jython"
] | 332 | 2015-08-22T12:43:56.000Z | 2022-03-17T01:05:43.000Z | Lib/test/test_urllibnet.py | Pandinosaurus/jython3 | def4f8ec47cb7a9c799ea4c745f12badf92c5769 | [
"CNRI-Jython"
] | 36 | 2015-05-30T08:39:19.000Z | 2022-03-04T20:42:33.000Z | Lib/test/test_urllibnet.py | Pandinosaurus/jython3 | def4f8ec47cb7a9c799ea4c745f12badf92c5769 | [
"CNRI-Jython"
] | 74 | 2015-05-29T17:18:53.000Z | 2022-01-15T14:06:44.000Z | #!/usr/bin/env python
import unittest
from test import support
import socket
import urllib.request, urllib.parse, urllib.error
import sys
import os
import time
mimetools = support.import_module("mimetools", deprecated=True)
def _open_with_retry(func, host, *args, **kwargs):
# Connecting to remote hosts is flak... | 37.295455 | 85 | 0.5961 |
3911ab48338ce149950f4ef95a156f1540c3e514 | 3,325 | py | Python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_configuration.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_configuration.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_configuration.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 ... | 46.830986 | 132 | 0.686316 |
199744d0636d1f1180268da32663f1a92da92ab2 | 210 | py | Python | steps/pytorch/architectures/utils.py | dineshsonachalam/data-science-bowl-2018 | d791c007cc5bfe313df0f05d2c3970cd316a4ba2 | [
"MIT"
] | 11 | 2018-05-10T08:56:05.000Z | 2018-06-23T05:00:36.000Z | steps/pytorch/architectures/utils.py | dineshsonachalam/data-science-bowl-2018 | d791c007cc5bfe313df0f05d2c3970cd316a4ba2 | [
"MIT"
] | 29 | 2018-05-05T10:56:44.000Z | 2018-06-17T17:14:30.000Z | steps/pytorch/architectures/utils.py | dineshsonachalam/data-science-bowl-2018 | d791c007cc5bfe313df0f05d2c3970cd316a4ba2 | [
"MIT"
] | 8 | 2018-04-16T07:15:25.000Z | 2019-06-25T12:42:53.000Z | import torch.nn as nn
class Reshape(nn.Module):
def __init__(self, *shape):
super(Reshape, self).__init__()
self.shape = shape
def forward(self, x):
return x.view(*self.shape)
| 21 | 39 | 0.619048 |
4ae3739692731e7e7fb097b37540fc955acb86bf | 6,378 | py | Python | EvernoteTest.py | Lee-Kevin/EvernoteApp | 9a57c38787f41c37295b6ec753d528cbda1eb7a9 | [
"MIT"
] | null | null | null | EvernoteTest.py | Lee-Kevin/EvernoteApp | 9a57c38787f41c37295b6ec753d528cbda1eb7a9 | [
"MIT"
] | null | null | null | EvernoteTest.py | Lee-Kevin/EvernoteApp | 9a57c38787f41c37295b6ec753d528cbda1eb7a9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
from evernote.api.client import EvernoteClient
from HTMLParser import HTMLParser
import talkey
from weather import weatherReport
import threading
import time
logging.basicConfig(level='INFO')
# define a global threading lock
Global_Lock = threading.Lock()
... | 30.084906 | 192 | 0.581373 |
a4c28b6344c59c341beabc1d04f64d66c3041052 | 1,346 | py | Python | examples/py/fetch-ohlcv-cex.py | diwenshi61/ccxt | ebdda10e7c4ed8841d572f3bfe198b5f0e949cf6 | [
"MIT"
] | 24,910 | 2017-10-27T21:41:59.000Z | 2022-03-31T23:08:57.000Z | examples/py/fetch-ohlcv-cex.py | diwenshi61/ccxt | ebdda10e7c4ed8841d572f3bfe198b5f0e949cf6 | [
"MIT"
] | 8,201 | 2017-10-28T10:19:28.000Z | 2022-03-31T23:49:37.000Z | examples/py/fetch-ohlcv-cex.py | diwenshi61/ccxt | ebdda10e7c4ed8841d572f3bfe198b5f0e949cf6 | [
"MIT"
] | 6,632 | 2017-10-28T02:53:24.000Z | 2022-03-31T23:20:14.000Z | # -*- coding: utf-8 -*-
import os
import sys
import asciichart
# -----------------------------------------------------------------------------
this_folder = os.path.dirname(os.path.abspath(__file__))
root_folder = os.path.dirname(os.path.dirname(this_folder))
sys.path.append(root_folder + '/python')
sys.path.append(... | 27.469388 | 90 | 0.541605 |
42965654392082e5f7efb172f922d2728802340e | 7,611 | py | Python | service/common/pip_installer.py | lcrh/falken | 7545431c7bfa34a9b45c2243cae40dbb58adefaa | [
"Apache-2.0"
] | 213 | 2021-06-11T01:15:16.000Z | 2022-02-25T16:18:57.000Z | service/common/pip_installer.py | lcrh/falken | 7545431c7bfa34a9b45c2243cae40dbb58adefaa | [
"Apache-2.0"
] | 32 | 2021-06-17T17:58:54.000Z | 2022-02-02T05:58:10.000Z | service/common/pip_installer.py | lcrh/falken | 7545431c7bfa34a9b45c2243cae40dbb58adefaa | [
"Apache-2.0"
] | 28 | 2021-06-17T17:34:21.000Z | 2022-03-24T14:05:20.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.126829 | 80 | 0.74169 |
00517c65c660395f56e52f44b6a78e74d0cbc830 | 57,820 | py | Python | release/scripts/startup/bl_ui/properties_constraint.py | linluofeng/upbge | 50bc9bc923a41411461d662c0fddd58d1f0b3ab3 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/startup/bl_ui/properties_constraint.py | linluofeng/upbge | 50bc9bc923a41411461d662c0fddd58d1f0b3ab3 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/startup/bl_ui/properties_constraint.py | linluofeng/upbge | 50bc9bc923a41411461d662c0fddd58d1f0b3ab3 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 32.392157 | 102 | 0.651678 |
88da40c3dd02cc2ead22517d3c3ca0e9d417e000 | 4,497 | py | Python | mmdet/models/losses/solo_dice_loss.py | ruiningTang/mmdetection | 100b0b5e0edddc45af0812b9f1474493c61671ef | [
"Apache-2.0"
] | null | null | null | mmdet/models/losses/solo_dice_loss.py | ruiningTang/mmdetection | 100b0b5e0edddc45af0812b9f1474493c61671ef | [
"Apache-2.0"
] | null | null | null | mmdet/models/losses/solo_dice_loss.py | ruiningTang/mmdetection | 100b0b5e0edddc45af0812b9f1474493c61671ef | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
from ..builder import LOSSES
from .utils import weight_reduce_loss
def dice_loss(pred,
target,
weight=None,
eps=1e-3,
reduction='mean',
avg_factor=None... | 37.789916 | 79 | 0.557038 |
ccbff00ca4b91b81de365b93c7664e1c77371147 | 407 | py | Python | communeapp/settings/prod.py | jeff-eng/Commune | 647674c7817068271e18b61276cbcdc58d8e0996 | [
"MIT"
] | 1 | 2022-03-21T13:46:33.000Z | 2022-03-21T13:46:33.000Z | communeapp/settings/prod.py | jeff-eng/Commune | 647674c7817068271e18b61276cbcdc58d8e0996 | [
"MIT"
] | 1 | 2022-03-31T00:38:09.000Z | 2022-03-31T00:38:09.000Z | communeapp/settings/prod.py | jeff-eng/Commune | 647674c7817068271e18b61276cbcdc58d8e0996 | [
"MIT"
] | null | null | null | from .base import *
from decouple import config
SECRET_KEY = config('SECRET_KEY')
DEBUG = False
ALLOWED_HOSTS = [config('ALLOWED_HOSTS')]
# SMTP Configuration
EMAIL_BACKEND = config('EMAIL_BACKEND')
EMAIL_HOST = config('EMAIL_HOST')
EMAIL_PORT = config('EMAIL_PORT')
EMAIL_USE_TLS = config('EMAIL_USE_TLS')
EMAIL_HO... | 25.4375 | 51 | 0.783784 |
a29994e9cfdb143cd97bbc50e3efa04757a2aadd | 8,358 | py | Python | core/plugintools.py | aserdean/hotsos | a0f17a7ee2f08a4da0a269d478dec7ebb8f12493 | [
"Apache-2.0"
] | null | null | null | core/plugintools.py | aserdean/hotsos | a0f17a7ee2f08a4da0a269d478dec7ebb8f12493 | [
"Apache-2.0"
] | null | null | null | core/plugintools.py | aserdean/hotsos | a0f17a7ee2f08a4da0a269d478dec7ebb8f12493 | [
"Apache-2.0"
] | null | null | null | import os
import importlib
import yaml
from core import constants
from core.log import log
class HOTSOSDumper(yaml.Dumper):
def increase_indent(self, flow=False, indentless=False):
return super().increase_indent(flow, False)
def represent_dict_preserve_order(self, data):
return self.represen... | 31.779468 | 79 | 0.57083 |
81c78359cad44b8801c7aab1070a9e6c648d5a82 | 2,084 | py | Python | grazyna_rpg/world_manager.py | firemark/grazyna-rpg | d4174f5ea8e20677d19d5daae4b208b88ccc1ed6 | [
"MIT"
] | 1 | 2015-07-07T23:11:03.000Z | 2015-07-07T23:11:03.000Z | grazyna_rpg/world_manager.py | firemark/grazyna-rpg | d4174f5ea8e20677d19d5daae4b208b88ccc1ed6 | [
"MIT"
] | null | null | null | grazyna_rpg/world_manager.py | firemark/grazyna-rpg | d4174f5ea8e20677d19d5daae4b208b88ccc1ed6 | [
"MIT"
] | null | null | null | from .monster import Monster
from .level import Level
from .enums import DirectionEnum, LevelType
from .abstract.map import AbstractMap
class PathNotFound(Exception):
pass
class WorldManager(object):
DIRECTIONS_TO_CONNECTIONS = {
DirectionEnum.east: (1, 0),
DirectionEnum.west: (-1, 0),
... | 31.104478 | 76 | 0.577735 |
15e67c870e5cd84e131b9fb7077305cbea69fcb7 | 3,717 | py | Python | frappe-bench/env/lib/python2.7/site-packages/num2words/lang_HE.py | ibrahmm22/library-management | b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/num2words/lang_HE.py | ibrahmm22/library-management | b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/num2words/lang_HE.py | ibrahmm22/library-management | b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software... | 22.803681 | 71 | 0.538337 |
423d05255006b623490e489e84312922780e691d | 3,573 | py | Python | snuba/migrations/snuba_migrations/events/0002_events_onpremise_compatibility.py | fpacifici/snuba | cf732b71383c948f9387fbe64e9404ca71f8e9c5 | [
"Apache-2.0"
] | null | null | null | snuba/migrations/snuba_migrations/events/0002_events_onpremise_compatibility.py | fpacifici/snuba | cf732b71383c948f9387fbe64e9404ca71f8e9c5 | [
"Apache-2.0"
] | null | null | null | snuba/migrations/snuba_migrations/events/0002_events_onpremise_compatibility.py | fpacifici/snuba | cf732b71383c948f9387fbe64e9404ca71f8e9c5 | [
"Apache-2.0"
] | null | null | null | from typing import Sequence
from snuba.clickhouse.columns import Array, Column, DateTime, Nested, String, UInt
from snuba.clusters.storage_sets import StorageSetKey
from snuba.migrations import migration, operations
from snuba.migrations.columns import MigrationModifiers as Modifiers
class Migration(migration.MultiS... | 39.263736 | 91 | 0.584663 |
e0c55859fbc0b02b4fe0ab73651df4a5d1e42d82 | 825 | py | Python | xfel/libtbx_refresh.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | xfel/libtbx_refresh.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | xfel/libtbx_refresh.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | 115 | 2016-11-15T08:17:28.000Z | 2022-02-09T15:30:14.000Z | from __future__ import absolute_import, division, print_function
import libtbx.load_env, os
cxi_user = libtbx.env.find_in_repositories(
relative_path="cxi_user",
test=os.path.isdir)
if cxi_user is None or not os.path.exists(cxi_user):
print(" Creating cxi_user directory")
sources_root =... | 35.869565 | 87 | 0.710303 |
82fb345adc800d4db3c56668ea63f197d6e8201a | 1,119 | py | Python | Validation/SiTrackerPhase2V/python/Phase2TrackerValidationFirstStep_cff.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Validation/SiTrackerPhase2V/python/Phase2TrackerValidationFirstStep_cff.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Validation/SiTrackerPhase2V/python/Phase2TrackerValidationFirstStep_cff.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from Validation.SiTrackerPhase2V.Phase2TrackerValidateDigi_cff import *
from Validation.SiTrackerPhase2V.Phase2ITValidateRecHit_cff import *
from Validation.SiTrackerPhase2V.Phase2ITValidateTrackingRecHit_cff import *
from Validation.SiTrackerPhase2V.Phase2ITValidateCluster_cff ... | 55.95 | 126 | 0.672922 |
63fa2230d3d261353ff1f24782c8ad593b303171 | 10,489 | py | Python | src/utils/data_augmentation.py | Sridhar53/Facial-Expression-Recognition-with-Convolution-Neural-Network | e48a60f2e4166ae999772fe82d24023a20f23ca3 | [
"MIT"
] | null | null | null | src/utils/data_augmentation.py | Sridhar53/Facial-Expression-Recognition-with-Convolution-Neural-Network | e48a60f2e4166ae999772fe82d24023a20f23ca3 | [
"MIT"
] | null | null | null | src/utils/data_augmentation.py | Sridhar53/Facial-Expression-Recognition-with-Convolution-Neural-Network | e48a60f2e4166ae999772fe82d24023a20f23ca3 | [
"MIT"
] | 1 | 2018-07-24T02:12:00.000Z | 2018-07-24T02:12:00.000Z | import numpy as np
from random import shuffle
from .preprocessor import preprocess_input
from .preprocessor import _imread as imread
from .preprocessor import _imresize as imresize
from .preprocessor import to_categorical
import scipy.ndimage as ndi
import cv2
class ImageGenerator(object):
""" Image gene... | 45.017167 | 81 | 0.558395 |
b99be21ef10553651cda3e804b6d2fd6574295cc | 9,981 | py | Python | Hardware/Networks/NiN/nin.py | gkrish19/SIAM | 1e530d4c070054045fc2e8e7fe4ce82a54755132 | [
"MIT"
] | 4 | 2021-02-02T06:50:43.000Z | 2022-01-29T12:25:32.000Z | Hardware/Networks/NiN/nin.py | gkrish19/SIAM | 1e530d4c070054045fc2e8e7fe4ce82a54755132 | [
"MIT"
] | null | null | null | Hardware/Networks/NiN/nin.py | gkrish19/SIAM | 1e530d4c070054045fc2e8e7fe4ce82a54755132 | [
"MIT"
] | 2 | 2021-07-07T19:58:40.000Z | 2022-01-27T22:51:20.000Z | # ===================================================================== #
# File name: Network_in_Network.py
# Author: BIGBALLON
# Date update: 07/28/2017
# Python Version: 3.5.2
# Tensorflow Version: 1.2.1
# Description:
# Implement Network in Network(only use tensorflow... | 34.65625 | 210 | 0.653542 |
af28f6b1c2a9cbdf0bce47c5ce829e74d86b7608 | 3,086 | py | Python | src/test_pi/test_classifier.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | null | null | null | src/test_pi/test_classifier.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | null | null | null | src/test_pi/test_classifier.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | 2 | 2020-02-05T05:19:18.000Z | 2020-02-05T15:04:32.000Z | import unittest
import soundfile as sf
import os
from classifier import classifier
import json
import glob
import re
class TestClassifier(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.cm = classifier.ClassifierModule("../savedfiles", "../model/", False)
def testWrongPath... | 34.288889 | 137 | 0.627997 |
1c02b0e7db7330dd50573d212dc9b26fc20c3bb1 | 5,593 | py | Python | infer.py | LauJames/QuestionMatching | 380e32ad4d884ecbf314fbb69b009f34a1f8f6a9 | [
"Apache-2.0"
] | 4 | 2019-02-22T00:30:44.000Z | 2021-03-29T09:15:18.000Z | infer.py | LauJames/QuestionMatching | 380e32ad4d884ecbf314fbb69b009f34a1f8f6a9 | [
"Apache-2.0"
] | null | null | null | infer.py | LauJames/QuestionMatching | 380e32ad4d884ecbf314fbb69b009f34a1f8f6a9 | [
"Apache-2.0"
] | 4 | 2019-03-03T06:39:41.000Z | 2019-10-09T09:00:49.000Z | #! /user/bin/evn python
# -*- coding:utf8 -*-
"""
@Author : Lau James
@Contact : LauJames2017@whu.edu.cn
@Project : MVLSTM
@File : infer.py
@Time : 18-11-27 下午9:52
@Software : PyCharm
@Copyright: "Copyright (c) 2018 Lau James. All Rights Reserved"
"""
import os
import sys
import time
import datetime
imp... | 35.852564 | 100 | 0.626855 |
d05ae1ae87b5fa4506c6410cdba6c8868679a953 | 1,023 | py | Python | frontends/python/tests/analysis/lambda.py | aardwolf-sfl/aardwolf | 33bfe3e0649a73aec7efa0fa80bff8077b550bd0 | [
"MIT"
] | 2 | 2020-08-15T08:55:39.000Z | 2020-11-09T17:31:16.000Z | frontends/python/tests/analysis/lambda.py | aardwolf-sfl/aardwolf | 33bfe3e0649a73aec7efa0fa80bff8077b550bd0 | [
"MIT"
] | null | null | null | frontends/python/tests/analysis/lambda.py | aardwolf-sfl/aardwolf | 33bfe3e0649a73aec7efa0fa80bff8077b550bd0 | [
"MIT"
] | null | null | null | # AARD: function: foo
# AARD: #1:1 -> #1:2 :: defs: %1 / uses: [@1 4:9-4:10] { arg }
def foo(a):
# AARD: #1:2 -> #1:3 :: defs: %2 / uses: [@1 6:5-6:27]
test = lambda x: x > a
# AARD: #1:3 -> #1:4 :: defs: %3 / uses: [@1 8:5-8:51]
value = lambda n, m: (lambda x: n * x + m * x)
# AARD: #1:... | 37.888889 | 72 | 0.44477 |
cb8c28bb9fd6a04a43b840f315d6dbfed7227e0f | 442 | py | Python | module/loading.py | indmind/Jomblo-Story | cbe69be1d9f0d8e592dcf84e3f3764d1eae22b3c | [
"MIT"
] | null | null | null | module/loading.py | indmind/Jomblo-Story | cbe69be1d9f0d8e592dcf84e3f3764d1eae22b3c | [
"MIT"
] | 1 | 2017-08-07T12:12:18.000Z | 2017-08-08T04:45:41.000Z | module/loading.py | indmind/Jomblo-Story | cbe69be1d9f0d8e592dcf84e3f3764d1eae22b3c | [
"MIT"
] | null | null | null | import time
import sys
def createDots(length, delay):
for i in range(length):
print('.', end='')
sys.stdout.flush()
time.sleep(delay)
def createHash(length, delay):
for i in range(length):
print('#', end='')
sys.stdout.flush()
time.sleep(delay)
def createVrDots... | 19.217391 | 32 | 0.570136 |
a09cf2e9fa4169aad6427b601bbb04bade0314a6 | 8,208 | py | Python | scripts/tilestache-compose.py | shoeberto/TileStache | 4526076e9326512a0542adaae86a946e08df8547 | [
"BSD-3-Clause"
] | 414 | 2015-01-05T19:29:22.000Z | 2022-03-26T03:39:42.000Z | scripts/tilestache-compose.py | shoeberto/TileStache | 4526076e9326512a0542adaae86a946e08df8547 | [
"BSD-3-Clause"
] | 134 | 2015-01-15T08:25:55.000Z | 2021-09-02T16:06:00.000Z | scripts/tilestache-compose.py | shoeberto/TileStache | 4526076e9326512a0542adaae86a946e08df8547 | [
"BSD-3-Clause"
] | 176 | 2015-01-09T14:43:25.000Z | 2022-03-04T16:53:27.000Z | #!/usr/bin/env python
from __future__ import print_function
from sys import stderr, path
from tempfile import mkstemp
from os import close, write, unlink
from optparse import OptionParser
from os.path import abspath
try:
from _thread import allocate_lock
except ImportError:
from thread import allocate_lock
i... | 36.48 | 182 | 0.633163 |
a98340e346bcf639a11a6b9f8c69de55343f1a64 | 5,882 | py | Python | deps/lib/python3.5/site-packages/Crypto/Cipher/CAST.py | jfarmer08/hassio | 792a6071a97bb33857c14c9937946233c620035c | [
"MIT"
] | 1 | 2018-10-30T07:19:27.000Z | 2018-10-30T07:19:27.000Z | deps/lib/python3.5/site-packages/Crypto/Cipher/CAST.py | jfarmer08/hassio | 792a6071a97bb33857c14c9937946233c620035c | [
"MIT"
] | 1 | 2018-04-04T12:13:40.000Z | 2018-05-03T07:57:52.000Z | deps/lib/python3.5/site-packages/Crypto/Cipher/CAST.py | jfarmer08/hassio | 792a6071a97bb33857c14c9937946233c620035c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Cipher/CAST.py : CAST
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is granted a worldwide, perpetual, royalty-free,
#... | 36.7625 | 85 | 0.585515 |
97c0e97eb8f6bd8fd578cad33b0f6d33801de8f1 | 541 | py | Python | regexlib/2021-5-15/python_re2_test_file/regexlib_3226.py | yetingli/ReDoS-Benchmarks | f5b5094d835649e957bf3fec6b8bd4f6efdb35fc | [
"MIT"
] | 1 | 2022-01-24T14:43:23.000Z | 2022-01-24T14:43:23.000Z | regexlib/python_re2_test_file/regexlib_3226.py | yetingli/ReDoS-Benchmarks | f5b5094d835649e957bf3fec6b8bd4f6efdb35fc | [
"MIT"
] | null | null | null | regexlib/python_re2_test_file/regexlib_3226.py | yetingli/ReDoS-Benchmarks | f5b5094d835649e957bf3fec6b8bd4f6efdb35fc | [
"MIT"
] | null | null | null | # 3226
# ^([1-9]{1}[0-9]{0,7})+((,[1-9]{1}[0-9]{0,7}){0,1})+$
# EXPONENT
# nums:5
# EXPONENT AttackString:""+"1"*32+"!1 __EOA(iii)"
import re2 as re
from time import perf_counter
regex = """^([1-9]{1}[0-9]{0,7})+((,[1-9]{1}[0-9]{0,7}){0,1})+$"""
REGEX = re.compile(regex)
for i in range(0, 150000):
ATTACK = "" + "... | 28.473684 | 66 | 0.547135 |
8f0603c87814b5f190fa1e688846aadb6a1a7ae5 | 568 | py | Python | kryptobot/ta/pyti_volume_oscillator.py | eristoddle/Kryptobot | d0c3050a1c924125810946530670c19b2de72d3f | [
"Apache-2.0"
] | 24 | 2018-05-29T13:44:36.000Z | 2022-03-12T20:41:45.000Z | kryptobot/ta/pyti_volume_oscillator.py | eristoddle/Kryptobot | d0c3050a1c924125810946530670c19b2de72d3f | [
"Apache-2.0"
] | 23 | 2018-07-08T02:31:18.000Z | 2020-06-02T04:07:49.000Z | kryptobot/ta/pyti_volume_oscillator.py | eristoddle/Kryptobot | d0c3050a1c924125810946530670c19b2de72d3f | [
"Apache-2.0"
] | 14 | 2018-08-10T15:44:27.000Z | 2021-06-14T07:14:52.000Z | from .generic_indicator import GenericIndicator
from pyti.volume_oscillator import volume_oscillator as indicator
# params: period
# https://github.com/kylejusticemagnuson/pyti/blob/master/pyti/average_true_range.py
class PytiVolumeOscillator(GenericIndicator):
def __init__(self, market, interval, periods, param... | 37.866667 | 84 | 0.75 |
639faa18a307fe61c3e1afbad4ba856d51c7336b | 6,349 | py | Python | Simple Text classifiers/Text Classification on Yelp dataset/Y_classifier-Parallel str.py | tejasurya/Text_Classification_using_Neural_Networks | d4852780e6c86843aee768d306d19428c8cb9c7f | [
"MIT"
] | 1 | 2020-04-30T16:15:42.000Z | 2020-04-30T16:15:42.000Z | Simple Text classifiers/Yelp dataset based basic DNN Classifiers/Y_classifier-Parallel str.py | tejasurya/Text_Classification_using_Neural_Networks | d4852780e6c86843aee768d306d19428c8cb9c7f | [
"MIT"
] | null | null | null | Simple Text classifiers/Yelp dataset based basic DNN Classifiers/Y_classifier-Parallel str.py | tejasurya/Text_Classification_using_Neural_Networks | d4852780e6c86843aee768d306d19428c8cb9c7f | [
"MIT"
] | null | null | null | from numpy import asarray
from numpy import zeros
import pandas as pd
import os
from keras.datasets import reuters
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence import pad_sequences
from keras import backend as K
from keras.utils.generic_utils import get_custom_objects
from keras.mod... | 26.676471 | 139 | 0.750669 |
05fb672ecb45eb00505d15bb6fdac468799f7e87 | 255 | py | Python | leetcode.com/python/268_Missing_Number.py | XSoyOscar/Algorithms | 6e1626d4b0f7804494f0a651698966ad6fd0fe18 | [
"MIT"
] | 80 | 2020-07-02T20:47:21.000Z | 2022-03-22T06:52:59.000Z | leetcode.com/python/268_Missing_Number.py | XSoyOscar/Algorithms | 6e1626d4b0f7804494f0a651698966ad6fd0fe18 | [
"MIT"
] | 1 | 2020-10-05T19:22:10.000Z | 2020-10-05T19:22:10.000Z | leetcode.com/python/268_Missing_Number.py | XSoyOscar/Algorithms | 6e1626d4b0f7804494f0a651698966ad6fd0fe18 | [
"MIT"
] | 73 | 2020-04-09T22:28:01.000Z | 2022-02-26T19:22:25.000Z | class Solution(object):
def missingNumber(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
missing = len(nums)
for i, num in enumerate(nums):
missing ^= i ^ num
return missing
| 21.25 | 38 | 0.494118 |
d89db994ccdf9f7495628258d0329a67880cd0bb | 78 | py | Python | akebono/__init__.py | OTA2000/akebono | 11f88f3605a66989ac5cf11cb6af7b93987bcf59 | [
"MIT"
] | 3 | 2018-09-28T01:35:41.000Z | 2020-06-22T07:09:14.000Z | akebono/__init__.py | OTA2000/akebono | 11f88f3605a66989ac5cf11cb6af7b93987bcf59 | [
"MIT"
] | 1 | 2020-01-06T08:15:10.000Z | 2020-01-06T08:15:10.000Z | akebono/__init__.py | OTA2000/akebono | 11f88f3605a66989ac5cf11cb6af7b93987bcf59 | [
"MIT"
] | 6 | 2018-08-10T03:04:28.000Z | 2020-02-03T02:28:08.000Z | """ this is akebono package, and modified normally."""
__version__ = "0.0.1"
| 19.5 | 54 | 0.679487 |
9454ee141966f35ac24a4f8ad6d588a8103e6441 | 5,291 | py | Python | scripts/emotion_module/objective/emocl/nn/modules.py | EnricaIMS/LostInBackTranslation | d6921e408197c60de6d4247f412ca1ae86f19b58 | [
"MIT"
] | 1 | 2021-04-23T08:54:24.000Z | 2021-04-23T08:54:24.000Z | scripts/emotion_module/objective/emocl/nn/modules.py | EnricaIMS/LostInBackTranslation | d6921e408197c60de6d4247f412ca1ae86f19b58 | [
"MIT"
] | null | null | null | scripts/emotion_module/objective/emocl/nn/modules.py | EnricaIMS/LostInBackTranslation | d6921e408197c60de6d4247f412ca1ae86f19b58 | [
"MIT"
] | null | null | null | from torch import nn, torch
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from objective.emocl.nn.regularization import GaussianNoise
class RNNEncoder(nn.Module):
def __init__(self, input_size, rnn_size, num_layers,
bidirectional, dropout):
"""
A simple... | 33.27673 | 79 | 0.578341 |
12615e52a77a509fe066397aecdd07e7aabd340f | 7,246 | py | Python | sdk/python/kfp/components/_data_passing.py | kamalmemon/pipelines | 7e68991a2a7bfa767f893facfe58190690ca89ed | [
"Apache-2.0"
] | 1 | 2020-10-13T13:28:42.000Z | 2020-10-13T13:28:42.000Z | sdk/python/kfp/components/_data_passing.py | kamalmemon/pipelines | 7e68991a2a7bfa767f893facfe58190690ca89ed | [
"Apache-2.0"
] | 4 | 2022-02-14T21:39:59.000Z | 2022-03-08T23:38:00.000Z | sdk/python/kfp/components/_data_passing.py | kamalmemon/pipelines | 7e68991a2a7bfa767f893facfe58190690ca89ed | [
"Apache-2.0"
] | 2 | 2019-10-15T03:06:15.000Z | 2019-10-15T03:10:39.000Z | # 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, ... | 37.739583 | 205 | 0.707839 |
dc592cbb4e72037820fc278d3c86b8c860691d67 | 2,827 | py | Python | src/HABApp/openhab/definitions/values.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 44 | 2018-12-13T08:46:44.000Z | 2022-03-07T03:23:21.000Z | src/HABApp/openhab/definitions/values.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 156 | 2019-03-02T20:53:31.000Z | 2022-03-23T13:13:58.000Z | src/HABApp/openhab/definitions/values.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 18 | 2019-03-08T07:13:21.000Z | 2022-03-22T19:52:31.000Z | import base64
import typing
from HABApp.core.events import ComplexEventValue
class OnOffValue(ComplexEventValue):
ON = 'ON'
OFF = 'OFF'
def __init__(self, value):
super().__init__(value)
assert value == OnOffValue.ON or value == OnOffValue.OFF, f'{value} ({type(value)})'
self.on ... | 26.175926 | 107 | 0.598868 |
963bbf8b04e804b11ab9fbb06973e73321ce11db | 17,242 | py | Python | gapic/generator/generator.py | googleapis/client-generator-python | db9ed9177e65aff07a0c1addf73c32da4dabcaf9 | [
"Apache-2.0"
] | null | null | null | gapic/generator/generator.py | googleapis/client-generator-python | db9ed9177e65aff07a0c1addf73c32da4dabcaf9 | [
"Apache-2.0"
] | null | null | null | gapic/generator/generator.py | googleapis/client-generator-python | db9ed9177e65aff07a0c1addf73c32da4dabcaf9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 41.347722 | 169 | 0.616808 |
97f0c3d0888b1d505ef119f4ae78b66cbe88e4b9 | 517 | py | Python | TEP/atcoder242/C.py | GuilhermeBraz/unb-workflow | 37d680a675a87cea2ff936badf94d757393870c3 | [
"MIT"
] | null | null | null | TEP/atcoder242/C.py | GuilhermeBraz/unb-workflow | 37d680a675a87cea2ff936badf94d757393870c3 | [
"MIT"
] | null | null | null | TEP/atcoder242/C.py | GuilhermeBraz/unb-workflow | 37d680a675a87cea2ff936badf94d757393870c3 | [
"MIT"
] | null | null | null | # Given an integer N, find the number of integers X that satisfy all of the following conditions, modulo 998244353.
'''X is an N-digit positive integer.
Let X1,X2,…,XN be the digits of X from top to bottom. They satisfy all of the following:
1≤Xi≤9 for all integers 1≤i≤N;
∣Xi−Xi+1∣≤1 for all integers 1≤i≤N−1.
''... | 12.609756 | 115 | 0.673114 |
409850ad6655d89b72301f089399f55de7ce808f | 19,378 | py | Python | melodic/lib/python2.7/dist-packages/gazebo_msgs/srv/_GetModelProperties.py | Dieptranivsr/Ros_Diep | d790e75e6f5da916701b11a2fdf3e03b6a47086b | [
"MIT"
] | null | null | null | melodic/lib/python2.7/dist-packages/gazebo_msgs/srv/_GetModelProperties.py | Dieptranivsr/Ros_Diep | d790e75e6f5da916701b11a2fdf3e03b6a47086b | [
"MIT"
] | 1 | 2021-07-08T10:26:06.000Z | 2021-07-08T10:31:11.000Z | melodic/lib/python2.7/dist-packages/gazebo_msgs/srv/_GetModelProperties.py | Dieptranivsr/Ros_Diep | d790e75e6f5da916701b11a2fdf3e03b6a47086b | [
"MIT"
] | null | null | null | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from gazebo_msgs/GetModelPropertiesRequest.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
class GetModelPropertiesRequest(genpy.Message):
_md5sum = "ea31... | 34.915315 | 156 | 0.608628 |
775b1cc06b36f045711f7dc5db91e96e8e944bc7 | 2,869 | py | Python | examples/plot_05_calculate_DNP_enhancements-i.py | DNPLab/DNPLab | 78999a4e8320b6476a5aa55d9884c49d74149edc | [
"MIT"
] | 4 | 2020-09-23T08:09:33.000Z | 2022-02-10T22:02:11.000Z | examples/plot_05_calculate_DNP_enhancements-i.py | DNPLab/DNPLab | 78999a4e8320b6476a5aa55d9884c49d74149edc | [
"MIT"
] | 126 | 2020-09-16T22:25:59.000Z | 2022-03-29T17:15:27.000Z | examples/plot_05_calculate_DNP_enhancements-i.py | DNPLab/DNPLab | 78999a4e8320b6476a5aa55d9884c49d74149edc | [
"MIT"
] | 5 | 2020-09-24T20:57:31.000Z | 2021-08-19T01:52:16.000Z | # %%
"""
.. _05-calculate-dnp-enhancements-i:
===================================
05 - Calculate DNP Enhancements (I)
===================================
This example demonstrates how to import DNP-NMR data from an hdf5 file, calculate the dnp enhancements and plot it. If you don't know how to create the workspace ye... | 52.163636 | 401 | 0.729174 |
3264c0c1430bfec9e4577cfaea8dc1926b25630d | 329 | py | Python | custom/icds_reports/migrations/0070_aww_name_in_agg_ccs_view.py | dannyroberts/commcare-hq | 4b0b8ecbe851e46307d3a0e635d6d5d6e31c3598 | [
"BSD-3-Clause"
] | null | null | null | custom/icds_reports/migrations/0070_aww_name_in_agg_ccs_view.py | dannyroberts/commcare-hq | 4b0b8ecbe851e46307d3a0e635d6d5d6e31c3598 | [
"BSD-3-Clause"
] | null | null | null | custom/icds_reports/migrations/0070_aww_name_in_agg_ccs_view.py | dannyroberts/commcare-hq | 4b0b8ecbe851e46307d3a0e635d6d5d6e31c3598 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-11 14:13
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('icds_reports', '0069_valid_visits'),
]
operations =... | 19.352941 | 49 | 0.696049 |
6652514cfe20c3c629ee2aa5ffa5662a657be752 | 911 | py | Python | librespot/core/ApResolver.py | JeffmeisterJ/librespot-python | 0e0e1db65aa40262bd13479b97f81ae8c29ae049 | [
"Apache-2.0"
] | 1 | 2021-12-15T22:44:46.000Z | 2021-12-15T22:44:46.000Z | librespot/core/ApResolver.py | JeffmeisterJ/librespot-python | 0e0e1db65aa40262bd13479b97f81ae8c29ae049 | [
"Apache-2.0"
] | 12 | 2021-10-06T02:18:44.000Z | 2022-02-07T02:16:47.000Z | librespot/core/ApResolver.py | JeffmeisterJ/librespot-python | 0e0e1db65aa40262bd13479b97f81ae8c29ae049 | [
"Apache-2.0"
] | null | null | null | import random
import requests
class ApResolver:
base_url = "http://apresolve.spotify.com/"
@staticmethod
def request(service_type: str):
response = requests.get("{}?type={}".format(ApResolver.base_url,
service_type))
return response.jso... | 26.794118 | 72 | 0.625686 |
e2d65d05940737de97567805b0a98f97c780edbc | 340 | py | Python | mindhome_alpha/erpnext/patches/v5_0/project_costing.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | mindhome_alpha/erpnext/patches/v5_0/project_costing.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | null | null | null | mindhome_alpha/erpnext/patches/v5_0/project_costing.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doctype("Project")
frappe.db.sql("update `tabProject` set expected_start_date = project_start_date, \
expected_end_date = completion_date, actual_end_date = act_completion_date, \
estimated_costing = project_value, gross_margin = ... | 42.5 | 83 | 0.817647 |
aa4de105e24cd4b14af02401e2969eb95c3c9664 | 8,870 | py | Python | infer_detectron2_tridentnet_process.py | Ikomia-dev/infer_detectron2_tridentnet | 7c167b12d6fcee9f5acc3dae57a4a05372ddff99 | [
"Apache-2.0"
] | 3 | 2021-02-16T08:36:43.000Z | 2021-02-17T08:11:57.000Z | infer_detectron2_tridentnet_process.py | Ikomia-dev/Detectron2_TridentNet | 7c167b12d6fcee9f5acc3dae57a4a05372ddff99 | [
"Apache-2.0"
] | null | null | null | infer_detectron2_tridentnet_process.py | Ikomia-dev/Detectron2_TridentNet | 7c167b12d6fcee9f5acc3dae57a4a05372ddff99 | [
"Apache-2.0"
] | null | null | null | from infer_detectron2_tridentnet import update_path
from ikomia import core, dataprocess
import copy
import os
import random
from detectron2.engine import DefaultPredictor
from detectron2.data import MetadataCatalog
from detectron2.config import get_cfg
from infer_detectron2_tridentnet.TridentNet_git.tridentnet import ... | 42.644231 | 178 | 0.608455 |
a03065bf397975ebb8fd54f2b817241f6c63d39d | 28,823 | py | Python | nova/tests/unit/network/test_api.py | bopopescu/nested_quota_final | 7c3454883de9f5368fa943924540eebe157a319d | [
"Apache-2.0"
] | 5 | 2017-06-23T07:37:39.000Z | 2020-10-21T07:07:50.000Z | nova/tests/unit/network/test_api.py | bopopescu/nested_quota_final | 7c3454883de9f5368fa943924540eebe157a319d | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/network/test_api.py | bopopescu/nested_quota_final | 7c3454883de9f5368fa943924540eebe157a319d | [
"Apache-2.0"
] | 4 | 2017-06-23T07:37:43.000Z | 2020-12-28T09:57:22.000Z | # Copyright 2012 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 47.328407 | 79 | 0.641016 |
2b2bb0c71a0556da039769c2d26d23492c4e3b03 | 566 | py | Python | shortner/views.py | omkumar01/Url-Shortner | e86ba3ed1bc5799ef0b38e567fb972209aa05e7c | [
"MIT"
] | null | null | null | shortner/views.py | omkumar01/Url-Shortner | e86ba3ed1bc5799ef0b38e567fb972209aa05e7c | [
"MIT"
] | null | null | null | shortner/views.py | omkumar01/Url-Shortner | e86ba3ed1bc5799ef0b38e567fb972209aa05e7c | [
"MIT"
] | 3 | 2021-11-28T05:10:36.000Z | 2021-11-28T05:11:17.000Z | from django.shortcuts import render, redirect
from django.http import HttpResponse
import uuid
from .models import InputUrl
# Create your views here.
def index(request):
return render(request, "index.html")
def create(request):
if request.method == "POST":
link = request.POST['link']
uid = s... | 23.583333 | 49 | 0.674912 |
87b30017b199ecbcbadbc20bd6c9da9f1304879f | 1,397 | py | Python | Courses/Udacity/CS101/Lesson_9_Problem_Set/04-Producing_a_WebCorpus/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2019-02-13T12:02:26.000Z | 2019-02-13T12:02:26.000Z | Courses/Udacity/CS101/Lesson_9_Problem_Set/04-Producing_a_WebCorpus/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2018-08-13T15:58:33.000Z | 2018-08-13T15:58:33.000Z | Courses/Udacity/CS101/Lesson_9_Problem_Set/04-Producing_a_WebCorpus/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 2 | 2017-08-10T20:01:29.000Z | 2021-07-01T08:39:13.000Z | ### Modify the crawler code to return a WebCorpus object.
### You will need to add an import and modify the crawl_web function.
### After your changes, the provided test code below should work.
### You should do your modifications to the crawler.py file
from crawler import crawl_web, compute_ranks
from search import... | 46.566667 | 107 | 0.730852 |
c1e6a4bffa2a1e0d2bfd14d4ef66b09028c450ea | 1,097 | py | Python | greeting/servidor.py | javalisson/Sockets | 90068c0b5a4b2f21ca789177c3c445c671732a86 | [
"MIT"
] | 2 | 2017-04-26T11:17:56.000Z | 2017-12-05T01:55:20.000Z | greeting/servidor.py | javalisson/Sockets | 90068c0b5a4b2f21ca789177c3c445c671732a86 | [
"MIT"
] | 2 | 2017-02-22T12:35:13.000Z | 2017-03-29T12:44:22.000Z | greeting/servidor.py | javalisson/Sockets | 90068c0b5a4b2f21ca789177c3c445c671732a86 | [
"MIT"
] | 24 | 2017-02-22T12:26:04.000Z | 2020-10-13T05:19:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# adaptado de https://wiki.python.org/moin/TcpCommunication
import socket
TCP_IP = '127.0.0.1'
TCP_PORT = 5005
BUFFER_SIZE = 20 # Normally 1024, but we want fast response
resposta = None
print ("[SERVIDOR] Iniciando")
print ("[SERVIDOR] Abrindo a porta " + str(TCP_PO... | 31.342857 | 97 | 0.675479 |
d231f43d7c614b5f512612e4f681b650f69190ce | 371 | py | Python | tests/libtest/test_pod_exec.py | phlogistonjohn/ocs-ci | 38223e18ca2e1db7a24cc9bdb76e38d2ba4e6f12 | [
"MIT"
] | null | null | null | tests/libtest/test_pod_exec.py | phlogistonjohn/ocs-ci | 38223e18ca2e1db7a24cc9bdb76e38d2ba4e6f12 | [
"MIT"
] | null | null | null | tests/libtest/test_pod_exec.py | phlogistonjohn/ocs-ci | 38223e18ca2e1db7a24cc9bdb76e38d2ba4e6f12 | [
"MIT"
] | 1 | 2020-07-28T07:32:09.000Z | 2020-07-28T07:32:09.000Z | import os
os.sys.path.append(os.path.dirname(os.getcwd()))
from ocs_ci.framework.testlib import libtest
from ocs_ci.ocs.resources import pod
@libtest
def test_main():
tools_pod = pod.get_ceph_tools_pod()
cmd = "ceph osd df"
out, err, ret = tools_pod.exec_ceph_cmd(ceph_cmd=cmd)
if out:
print(... | 19.526316 | 57 | 0.67655 |
4fb9731576c55f30fdb45e190ee2a3a79a2b52c6 | 11,452 | py | Python | jobs/transforms/skill_validation_test.py | sajalasati/oppia | b0c6ffb917663fb6482022d0f607377f7e1ee3d0 | [
"Apache-2.0"
] | 1 | 2021-08-30T06:53:15.000Z | 2021-08-30T06:53:15.000Z | jobs/transforms/skill_validation_test.py | abhyareddy/oppia | 4c07dd16e5503f6ee70f1774e9754b6db266aff4 | [
"Apache-2.0"
] | 11 | 2021-03-03T07:21:27.000Z | 2022-03-12T01:03:44.000Z | jobs/transforms/skill_validation_test.py | sajalasati/oppia | b0c6ffb917663fb6482022d0f607377f7e1ee3d0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2021 The Oppia 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 requi... | 35.565217 | 80 | 0.585313 |
b7e29b3ba028b36db32acc4729bb7ae9701891f2 | 315 | py | Python | Sqlite/dbmanager.py | Gambl3r08/ejercicios-Python | ddf13b40c611f892112ebbe7bc907f5765998ea0 | [
"MIT"
] | null | null | null | Sqlite/dbmanager.py | Gambl3r08/ejercicios-Python | ddf13b40c611f892112ebbe7bc907f5765998ea0 | [
"MIT"
] | null | null | null | Sqlite/dbmanager.py | Gambl3r08/ejercicios-Python | ddf13b40c611f892112ebbe7bc907f5765998ea0 | [
"MIT"
] | null | null | null | import sqlite3
def createDB(name: str):
try:
db = sqlite3.connect(name)
return db
except:
print("error al crear la base de datos: ", name)
def createCursor(db: sqlite3):
try:
cursor = db.cursor()
return cursor
except:
print("Error al crear cursor")
| 19.6875 | 56 | 0.584127 |
67e0b6df0ed7fc49ba0e561d404228b003fbd70e | 8,576 | py | Python | ballet/templating.py | HDI-Project/fhub_core | 9667a47fbd8b4caf2e92118dc5357f34aae2098b | [
"MIT"
] | 19 | 2021-04-06T18:56:39.000Z | 2022-03-15T00:23:00.000Z | ballet/templating.py | HDI-Project/ballet | 9667a47fbd8b4caf2e92118dc5357f34aae2098b | [
"MIT"
] | 52 | 2018-09-27T01:11:58.000Z | 2021-03-24T19:11:18.000Z | ballet/templating.py | HDI-Project/ballet | 9667a47fbd8b4caf2e92118dc5357f34aae2098b | [
"MIT"
] | 3 | 2019-12-07T17:55:34.000Z | 2021-02-02T17:58:39.000Z | import pathlib
import tempfile
from typing import List, Optional, Tuple
import funcy as fy
from cookiecutter.main import cookiecutter as _cookiecutter
from github import Github, GithubException
import ballet.util.git
from ballet.compat import PathLike
from ballet.exc import BalletError, ConfigurationError
from ballet... | 37.946903 | 146 | 0.684818 |
d95bcc0b165e225e7a53304a0a180fb1b4e9e179 | 1,239 | py | Python | appengine/findit/model/flake/analysis/triggering_sources.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/model/flake/analysis/triggering_sources.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/findit/model/flake/analysis/triggering_sources.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 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.
"""Sources for from where a flake analysis was triggered."""
# An analysis was triggered directly through Findit's UI.
FINDIT_UI = 1
# An analysis was trigg... | 35.4 | 77 | 0.749798 |
76f04580b076f2d0fd5869e105c3271108e7afa5 | 1,642 | py | Python | pytest-fixture-config/tests/unit/test_fixture_config.py | domdfcoding/pytest-plugins | 01fc12644db92e83ad7646a2d3c0b4f4ac1bd5a1 | [
"MIT"
] | null | null | null | pytest-fixture-config/tests/unit/test_fixture_config.py | domdfcoding/pytest-plugins | 01fc12644db92e83ad7646a2d3c0b4f4ac1bd5a1 | [
"MIT"
] | null | null | null | pytest-fixture-config/tests/unit/test_fixture_config.py | domdfcoding/pytest-plugins | 01fc12644db92e83ad7646a2d3c0b4f4ac1bd5a1 | [
"MIT"
] | null | null | null | import pytest
from six.moves import reload_module
# HACK: if the plugin is imported before the coverage plugin then all
# the top-level code will be omitted from coverage, so force it to be
# reloaded within this unit test under coverage
import pytest_fixture_config
reload_module(pytest_fixture_config)
from pytest_fi... | 24.147059 | 80 | 0.722899 |
3b6e2cd9de0263e4713cd42294b19f8b26ff5128 | 5,413 | py | Python | markovdwp/runtime/dwp.py | ivannz/MarkovDWP | f10ed7a331ddd9b7fc28c4cab3b05b2352a9ee2b | [
"MIT"
] | null | null | null | markovdwp/runtime/dwp.py | ivannz/MarkovDWP | f10ed7a331ddd9b7fc28c4cab3b05b2352a9ee2b | [
"MIT"
] | null | null | null | markovdwp/runtime/dwp.py | ivannz/MarkovDWP | f10ed7a331ddd9b7fc28c4cab3b05b2352a9ee2b | [
"MIT"
] | null | null | null | import os
import torch
from functools import partial
from collections.abc import Hashable
from torch.utils.data import DataLoader
from .base import BaseRuntime
from ..nn import named_penalties
from ..priors import ImplicitSlicePrior
from ..priors.implicit import ImplicitPrior
from ..source import KernelDataset
f... | 31.109195 | 78 | 0.617403 |
b53aac137d1e36f0422b533f3cd1cf01eb82c122 | 1,271 | py | Python | train_model.py | VarnithChordia/Multlingual_Punctuation_restoration | 17c026e8935b9fecae01d446a756926c7733fcd1 | [
"MIT"
] | 8 | 2020-07-24T05:50:54.000Z | 2022-02-17T00:16:07.000Z | train_model.py | VarnithChordia/Multlingual_Punctuation_restoration | 17c026e8935b9fecae01d446a756926c7733fcd1 | [
"MIT"
] | 4 | 2021-04-22T12:27:22.000Z | 2022-03-12T00:59:43.000Z | train_model.py | VarnithChordia/Multlingual_Punctuation_restoration | 17c026e8935b9fecae01d446a756926c7733fcd1 | [
"MIT"
] | null | null | null | import os
os.environ['CUDA_DEVICE_ORDER'] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = ""
import sys
import warnings
from modules.models.bert_models import BERTBiLSTMNCRFJoint
from modules.train.train import NerLearner
from modules.data import bert_data_new
warnings.filterwarnings("ignore")
sys.path.insert(0, "... | 28.244444 | 96 | 0.736428 |
6964c05194e91acb5b9a4c136134e18dd8b24c95 | 3,629 | py | Python | util/generateCoverage.py | enm10k/former2 | 0e116a910d3b4d591756817b5987358a81733e1b | [
"MIT"
] | null | null | null | util/generateCoverage.py | enm10k/former2 | 0e116a910d3b4d591756817b5987358a81733e1b | [
"MIT"
] | null | null | null | util/generateCoverage.py | enm10k/former2 | 0e116a910d3b4d591756817b5987358a81733e1b | [
"MIT"
] | null | null | null | import os
import json
import pprint
import math
import re
services = None
cfn_spec = None
tf_resources = []
cfn_types = []
cfn_occurances = []
tf_occurances = []
cfn_exceptions = {
'AWS::CloudFormation::CustomResource': 'N/A',
'AWS::CloudFormation::Macro': 'N/A',
'AWS::CloudFormation::Stack': 'N/A',
'... | 33.915888 | 101 | 0.625241 |
acab6dddff97749e9f5f617bfd3958ca98a7b61d | 42,306 | py | Python | UI/moxa.py | Subhadip-decode/ShittyBots | 0b3563053a280f451b1d20165b2a8b41169c1d0d | [
"BSD-3-Clause"
] | null | null | null | UI/moxa.py | Subhadip-decode/ShittyBots | 0b3563053a280f451b1d20165b2a8b41169c1d0d | [
"BSD-3-Clause"
] | null | null | null | UI/moxa.py | Subhadip-decode/ShittyBots | 0b3563053a280f451b1d20165b2a8b41169c1d0d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Moxa.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, ... | 54.518041 | 113 | 0.691439 |
4a9f5313ea768073ee4c311c37b3d5c21de706e9 | 1,444 | py | Python | tests/testcases/clear_shadow_unredirected.py | rbreaves/picom | 60eb00ce1b52aee46d343481d0530d5013ab850b | [
"MIT"
] | 2,267 | 2019-10-25T06:05:55.000Z | 2022-03-31T21:37:08.000Z | tests/testcases/clear_shadow_unredirected.py | rbreaves/picom | 60eb00ce1b52aee46d343481d0530d5013ab850b | [
"MIT"
] | 552 | 2019-10-24T11:52:53.000Z | 2022-03-30T18:29:42.000Z | tests/testcases/clear_shadow_unredirected.py | rbreaves/picom | 60eb00ce1b52aee46d343481d0530d5013ab850b | [
"MIT"
] | 460 | 2019-11-04T20:17:17.000Z | 2022-03-28T00:06:28.000Z | #!/usr/bin/env python
import xcffib.xproto as xproto
import xcffib
import time
from common import set_window_name
conn = xcffib.connect()
setup = conn.get_setup()
root = setup.roots[0].root
visual = setup.roots[0].root_visual
depth = setup.roots[0].root_depth
name = "_NET_WM_STATE"
name_atom = conn.core.InternAtom(F... | 27.245283 | 121 | 0.752078 |
bc029410ddede2a58edd1a63bfeb7ba1ddb45e6b | 772 | py | Python | src/surveys/migrations/0007_translate_interest.py | mrc-rius/computational_marketing_master_thesis | 347cf9ef64fcee36cf7068d0d214ef1c9de11cb5 | [
"MIT"
] | null | null | null | src/surveys/migrations/0007_translate_interest.py | mrc-rius/computational_marketing_master_thesis | 347cf9ef64fcee36cf7068d0d214ef1c9de11cb5 | [
"MIT"
] | null | null | null | src/surveys/migrations/0007_translate_interest.py | mrc-rius/computational_marketing_master_thesis | 347cf9ef64fcee36cf7068d0d214ef1c9de11cb5 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.5 on 2018-08-04 15:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('surveys', '0006_translate_hired_power'),
]
operations = [
migrations.CreateModel(
name='Translate_Interest',
fields=... | 32.166667 | 114 | 0.603627 |
4051600a137457a0b7b7a8676005c610fdc04a84 | 1,144 | py | Python | capture.py | igor2269/terminal-webcam | f692abe5c93d8d9506e39f636f2e6611b724f158 | [
"MIT"
] | 78 | 2015-01-01T05:05:14.000Z | 2021-02-12T23:14:20.000Z | capture.py | igor2269/terminal-webcam | f692abe5c93d8d9506e39f636f2e6611b724f158 | [
"MIT"
] | 3 | 2015-12-07T00:19:36.000Z | 2018-04-20T13:58:31.000Z | capture.py | igor2269/terminal-webcam | f692abe5c93d8d9506e39f636f2e6611b724f158 | [
"MIT"
] | 13 | 2015-01-08T04:11:34.000Z | 2021-02-25T14:25:12.000Z | import cv
import os
import sys
import math
import curses
import signal
def signal_handler(signal, frame):
print 'You pressed Ctrl + C!'
curses.endwin()
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
stdscr = curses.initscr()
palette = [' ', '.', '.', '/', 'c', '(', '@', '#', '8']
capture = cv.C... | 22 | 69 | 0.556818 |
7e7553f2192704bada2abf0651f239a2c2324dbb | 634 | py | Python | Lib/site-packages/celerid/infrastructure/pyd/generators/iterate.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | Lib/site-packages/celerid/infrastructure/pyd/generators/iterate.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | Lib/site-packages/celerid/infrastructure/pyd/generators/iterate.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | import sys
old_stdout = sys.stdout
sys.stdout = file('iterate.txt', 'w')
template = """\
} else static if (ARGS == %s) {
foreach (%s; t) {
temp = _make_pytuple(%s);
if (temp is null) StackContext.throwYield(new DPyYield(null));
StackContext.t... | 26.416667 | 79 | 0.511041 |
5c5b264af1bb836d714c3303a5702b4a6de1f303 | 7,381 | py | Python | mne/io/kit/coreg.py | rylaw/mne-python | aa526c8ed7049046734ca28493d99e841672b0eb | [
"BSD-3-Clause"
] | 1 | 2021-03-18T01:35:17.000Z | 2021-03-18T01:35:17.000Z | mne/io/kit/coreg.py | rylaw/mne-python | aa526c8ed7049046734ca28493d99e841672b0eb | [
"BSD-3-Clause"
] | 2 | 2020-09-18T00:09:20.000Z | 2020-11-10T17:47:10.000Z | mne/io/kit/coreg.py | rylaw/mne-python | aa526c8ed7049046734ca28493d99e841672b0eb | [
"BSD-3-Clause"
] | 1 | 2021-04-01T15:56:39.000Z | 2021-04-01T15:56:39.000Z | """Coordinate Point Extractor for KIT system."""
# Author: Teon Brooks <teon.brooks@gmail.com>
#
# License: BSD (3-clause)
from collections import OrderedDict
from os import SEEK_CUR, path as op
import pickle
import re
import numpy as np
from .constants import KIT, FIFF
from .._digitization import _make_dig_points
... | 34.652582 | 79 | 0.581629 |
84ea7e37388a636a6a7384719cd0993a180c42e0 | 19,906 | py | Python | push_new_pricing_to_statusdb.py | chuan-wang/standalone_scripts | 66d0ee24cb77d2430a488a11043136f1c56f8e2b | [
"MIT"
] | 3 | 2015-11-18T07:17:32.000Z | 2018-06-18T15:21:53.000Z | push_new_pricing_to_statusdb.py | chuan-wang/standalone_scripts | 66d0ee24cb77d2430a488a11043136f1c56f8e2b | [
"MIT"
] | 43 | 2015-01-15T14:09:54.000Z | 2022-03-30T04:49:18.000Z | push_new_pricing_to_statusdb.py | chuan-wang/standalone_scripts | 66d0ee24cb77d2430a488a11043136f1c56f8e2b | [
"MIT"
] | 22 | 2015-06-03T08:21:45.000Z | 2019-09-16T06:38:45.000Z | #!/usr/bin/env python
"""
Reads the cost_calculator excel sheet and puts all that information
into statusdb.
"""
import argparse
from openpyxl import load_workbook
import coloredlogs
import logging
import yaml
from couchdb import Server
import datetime
from collections import OrderedDict
import pprint
FIRST_ROW = {'co... | 38.428571 | 99 | 0.576861 |
93a0a3f5c554f0ef23e5348c19406280eaa22dbe | 4,133 | py | Python | tensorflow_bring_your_own_california_housing_local_training_and_batch_transform/tensorflow_bring_your_own_california_housing_local_training_and_batch_transform.py | aws-samples/amazon-sagemaker-local-mode | f470d7b543f7895094816c3f58b9981e044764d8 | [
"MIT-0"
] | 111 | 2020-11-10T18:09:34.000Z | 2022-03-28T12:55:37.000Z | tensorflow_bring_your_own_california_housing_local_training_and_batch_transform/tensorflow_bring_your_own_california_housing_local_training_and_batch_transform.py | aws-samples/amazon-sagemaker-local-mode | f470d7b543f7895094816c3f58b9981e044764d8 | [
"MIT-0"
] | 9 | 2020-11-18T10:43:29.000Z | 2022-03-08T08:42:52.000Z | tensorflow_bring_your_own_california_housing_local_training_and_batch_transform/tensorflow_bring_your_own_california_housing_local_training_and_batch_transform.py | aws-samples/amazon-sagemaker-local-mode | f470d7b543f7895094816c3f58b9981e044764d8 | [
"MIT-0"
] | 20 | 2020-11-10T09:13:15.000Z | 2022-03-02T14:20:42.000Z | # This is a sample Python program that trains a BYOC TensorFlow model, and then performs inference.
# This implementation will work on your local computer.
#
# Prerequisites:
# 1. Install required Python packages:
# pip install boto3 sagemaker pandas scikit-learn
# pip install 'sagemaker[local]'
# 2. Do... | 38.990566 | 120 | 0.646988 |
47a3c2e0e95006175cacd60fb6f18c129bfc15fb | 7,723 | py | Python | samples/python/tensorflow_object_detection_api/image_batcher.py | L-Net-1992/TensorRT | 34b664d404001bd724cb56b52a6e0e05e1fd97f2 | [
"Apache-2.0"
] | null | null | null | samples/python/tensorflow_object_detection_api/image_batcher.py | L-Net-1992/TensorRT | 34b664d404001bd724cb56b52a6e0e05e1fd97f2 | [
"Apache-2.0"
] | null | null | null | samples/python/tensorflow_object_detection_api/image_batcher.py | L-Net-1992/TensorRT | 34b664d404001bd724cb56b52a6e0e05e1fd97f2 | [
"Apache-2.0"
] | null | null | null | #
# SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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... | 44.641618 | 122 | 0.625793 |
7529855d393e5525459fe00af5b777073ea11714 | 7,645 | py | Python | client/tests/interconnect/network_test.py | beehive-lab/DFLOW | 9710e76bd957df3b9cd3cecad2967990ca1415f7 | [
"Apache-2.0"
] | 1 | 2021-04-17T00:48:35.000Z | 2021-04-17T00:48:35.000Z | client/tests/interconnect/network_test.py | beehive-lab/DFLOW | 9710e76bd957df3b9cd3cecad2967990ca1415f7 | [
"Apache-2.0"
] | null | null | null | client/tests/interconnect/network_test.py | beehive-lab/DFLOW | 9710e76bd957df3b9cd3cecad2967990ca1415f7 | [
"Apache-2.0"
] | null | null | null | import socket
import unittest
from unittest.mock import (
patch,
MagicMock,
call
)
from client.interconnect.network import NetworkLink
class NetworkLinkTestCase(unittest.TestCase):
"""
A suite of tests surrounding the NetworkLink class.
"""
def setUp(self) -> None:
self._test_hos... | 32.121849 | 79 | 0.615958 |
efbdd1ba6842d85e82149346e9b4559527a1aacd | 2,023 | py | Python | tensorflow/python/profiler/profiler.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/profiler/profiler.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/profiler/profiler.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.125 | 80 | 0.773604 |
b6ae07747fc7df309d15f33d337600f94a139bfe | 432 | py | Python | molo/core/migrations/0071_remove_old_image_hashes.py | Ishma59/molo | 4fd31df9266bc251e09e9339a132d3ccd4143c69 | [
"BSD-2-Clause"
] | 25 | 2015-09-26T13:45:30.000Z | 2018-09-13T14:12:20.000Z | molo/core/migrations/0071_remove_old_image_hashes.py | Ishma59/molo | 4fd31df9266bc251e09e9339a132d3ccd4143c69 | [
"BSD-2-Clause"
] | 510 | 2015-05-29T09:30:44.000Z | 2018-12-11T09:08:11.000Z | molo/core/migrations/0071_remove_old_image_hashes.py | Ishma59/molo | 4fd31df9266bc251e09e9339a132d3ccd4143c69 | [
"BSD-2-Clause"
] | 5 | 2020-03-26T19:30:13.000Z | 2020-09-04T16:35:59.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def delete_imageinfo(apps, schema_editor):
ImageInfo = apps.get_model('core.ImageInfo')
ImageInfo.objects.all().delete()
class Migration(migrations.Migration):
dependencies = [
('core', '00... | 20.571429 | 51 | 0.694444 |
64afdd8337e1499dcd12e439c8d3a5081a86d0aa | 10,323 | py | Python | 2- Programa/geopy-master/test/geocoders/base.py | federicopratto/Algoritmos-y-Programacion-1---TP-1 | d9c1071f16171ad563ec02eb4b1d5ea6f657b2ac | [
"MIT"
] | null | null | null | 2- Programa/geopy-master/test/geocoders/base.py | federicopratto/Algoritmos-y-Programacion-1---TP-1 | d9c1071f16171ad563ec02eb4b1d5ea6f657b2ac | [
"MIT"
] | null | null | null | 2- Programa/geopy-master/test/geocoders/base.py | federicopratto/Algoritmos-y-Programacion-1---TP-1 | d9c1071f16171ad563ec02eb4b1d5ea6f657b2ac | [
"MIT"
] | null | null | null |
import unittest
from mock import patch, sentinel
import warnings
import geopy.compat
import geopy.geocoders
from geopy.exc import GeocoderNotFound, GeocoderQueryError
from geopy.geocoders import GoogleV3, get_geocoder_for_service
from geopy.geocoders.base import Geocoder
from geopy.point import Point
class GetGeoco... | 38.662921 | 85 | 0.637024 |
c763bdc7784e04b7c321ea78189bbc35d1fb4175 | 9,337 | py | Python | fastai/tabular/data.py | feras-oughali/fastai | 4052f7adb441ab8a00eaa807b444a4e583b6bcc7 | [
"Apache-2.0"
] | 11 | 2019-08-06T11:44:24.000Z | 2022-03-12T20:04:56.000Z | fastai/tabular/data.py | feras-oughali/fastai | 4052f7adb441ab8a00eaa807b444a4e583b6bcc7 | [
"Apache-2.0"
] | 3 | 2021-05-20T11:24:31.000Z | 2022-02-26T06:04:21.000Z | fastai/tabular/data.py | feras-oughali/fastai | 4052f7adb441ab8a00eaa807b444a4e583b6bcc7 | [
"Apache-2.0"
] | 9 | 2018-11-03T10:56:17.000Z | 2020-10-19T20:44:33.000Z | "Data loading pipeline for structured data support. Loads from pandas DataFrame"
from ..torch_core import *
from .transform import *
from ..basic_data import *
from ..data_block import *
from ..basic_train import *
from .models import *
from pandas.api.types import is_numeric_dtype, is_categorical_dtype
__all__ = ['Ta... | 52.162011 | 134 | 0.630395 |
9c134f51f7254102c61f7fa66304b0fa2e45a7d4 | 533 | py | Python | marginTrading/tests/test_spam/test_usuarios.py | sambiase/pycrypto | 7e3fa9a846edd0ee95c9b1584385c38fa9ae3ee2 | [
"MIT"
] | 3 | 2021-07-30T14:54:27.000Z | 2022-01-19T19:57:12.000Z | marginTrading/tests/test_spam/test_usuarios.py | sambiase/pycrypto | 7e3fa9a846edd0ee95c9b1584385c38fa9ae3ee2 | [
"MIT"
] | 5 | 2021-07-20T22:41:41.000Z | 2021-09-07T19:47:18.000Z | marginTrading/tests/test_spam/test_usuarios.py | sambiase/pycrypto | 7e3fa9a846edd0ee95c9b1584385c38fa9ae3ee2 | [
"MIT"
] | null | null | null | from marginTrading.spam.modelos import Usuario
def test_salvar_usuario(sessao):
usuario = Usuario(nome='Andre',email='andreteste@gmail.com')
sessao.salvar(usuario)
assert isinstance(usuario.id,int) # certifica que o usuario possui um ID e que é instancia do tipo int
def test_listar_usuario(sessao):
... | 33.3125 | 108 | 0.722326 |
db142bbd67aaca22d0cac45dcc53ce53030942e5 | 4,659 | py | Python | tests/performance/compare_perfs.py | PrecisionMetrics/openjpeg | eb2ebe92f93970bf82ee3b69c32a6975900e91a0 | [
"BSD-2-Clause"
] | 823 | 2015-02-16T08:42:47.000Z | 2022-03-28T08:37:57.000Z | tests/performance/compare_perfs.py | PrecisionMetrics/openjpeg | eb2ebe92f93970bf82ee3b69c32a6975900e91a0 | [
"BSD-2-Clause"
] | 832 | 2015-06-15T07:57:22.000Z | 2022-03-31T12:41:46.000Z | tests/performance/compare_perfs.py | PrecisionMetrics/openjpeg | eb2ebe92f93970bf82ee3b69c32a6975900e91a0 | [
"BSD-2-Clause"
] | 522 | 2015-03-10T18:53:47.000Z | 2022-03-25T21:05:27.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, IntoPIX SA
# Contact: support@intopix.com
# Author: Even Rouault
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source cod... | 38.504132 | 78 | 0.672677 |
e9a9ffafc76c405d5cc240fff695782388d57a60 | 20,641 | py | Python | sdk/metricsadvisor/azure-ai-metricsadvisor/tests/base_testcase_aad.py | a-santamaria/azure-sdk-for-python | 9dec418ad621ac75f217e56e901f15b6624800b0 | [
"MIT"
] | null | null | null | sdk/metricsadvisor/azure-ai-metricsadvisor/tests/base_testcase_aad.py | a-santamaria/azure-sdk-for-python | 9dec418ad621ac75f217e56e901f15b6624800b0 | [
"MIT"
] | null | null | null | sdk/metricsadvisor/azure-ai-metricsadvisor/tests/base_testcase_aad.py | a-santamaria/azure-sdk-for-python | 9dec418ad621ac75f217e56e901f15b6624800b0 | [
"MIT"
] | null | null | null | # 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.
# ----------------------------------------------------------------------... | 44.677489 | 137 | 0.604283 |
e2eba7521e600ddada043006185707a7d1480f9c | 12,562 | bzl | Python | kotlin/kotlin.bzl | hsyed/rules_kotlin_old | 7abdd03cf63dcbc629033aac82de7681d27eebe0 | [
"Apache-2.0"
] | 9 | 2018-02-08T04:07:22.000Z | 2019-11-15T04:17:33.000Z | kotlin/kotlin.bzl | hsyed/rules_kotlin_old | 7abdd03cf63dcbc629033aac82de7681d27eebe0 | [
"Apache-2.0"
] | null | null | null | kotlin/kotlin.bzl | hsyed/rules_kotlin_old | 7abdd03cf63dcbc629033aac82de7681d27eebe0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Bazel 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 la... | 38.415902 | 221 | 0.619408 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.