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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ff5c2acabf4354e6add91b3bf60a640b2996ff03 | 2,009 | py | Python | tictactoe.py | Ghouljokes/tictactoeplus | 35fbc12d3c7aca477c08cf46f1b8184e38180b0d | [
"MIT"
] | null | null | null | tictactoe.py | Ghouljokes/tictactoeplus | 35fbc12d3c7aca477c08cf46f1b8184e38180b0d | [
"MIT"
] | null | null | null | tictactoe.py | Ghouljokes/tictactoeplus | 35fbc12d3c7aca477c08cf46f1b8184e38180b0d | [
"MIT"
] | null | null | null | """Tic Tac Toe game in python."""
from board import Board
from player import AiPlayer, HumanPlayer
def make_board() -> Board:
"""Create board from user input."""
x_dim, y_dim = "0", "0"
while not x_dim.isnumeric() or int(x_dim) < 3:
x_dim = input("Enter board width (must be three or greater)\n")
... | 27.520548 | 76 | 0.560976 |
ff5c2dc5cf806843a61c8510bf5fa3e378191673 | 256 | py | Python | vox/process_utils.py | drocco007/vox_linux | 9807bc3af8bc35f8f6634019ec4bc22b5e3b2e33 | [
"MIT"
] | 5 | 2015-03-25T11:56:10.000Z | 2018-02-03T21:11:27.000Z | vox/process_utils.py | drocco007/vox_linux | 9807bc3af8bc35f8f6634019ec4bc22b5e3b2e33 | [
"MIT"
] | null | null | null | vox/process_utils.py | drocco007/vox_linux | 9807bc3af8bc35f8f6634019ec4bc22b5e3b2e33 | [
"MIT"
] | null | null | null | from multiprocessing import Process
def spawn_daemon_process(fn, call_args=(), call_kw=None):
call_kw = call_kw or {}
process = Process(target=fn, args=call_args, kwargs=call_kw)
process.daemon = True
process.start()
return process
| 21.333333 | 64 | 0.714844 |
ff5c3c8ab9190b3ef8fa1f4209e2b27c1d9e8df0 | 1,625 | py | Python | tests/can_spammer_test.py | projectgus/python-canalystii | 7ef3a4a369a88976291ea91f93ef2b8c322855b9 | [
"BSD-3-Clause"
] | 3 | 2021-09-09T16:30:20.000Z | 2022-03-11T10:29:19.000Z | tests/can_spammer_test.py | projectgus/python-canalystii | 7ef3a4a369a88976291ea91f93ef2b8c322855b9 | [
"BSD-3-Clause"
] | null | null | null | tests/can_spammer_test.py | projectgus/python-canalystii | 7ef3a4a369a88976291ea91f93ef2b8c322855b9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import canalystii
import struct
import time
CHANNELS = (0, 1) # Which channels to test on?
TEST_SECS = 10 # How many seconds to sample for?
SLEEP_BETWEEN = 0.05 # How long to sleep between samples?
def main():
print("Connecting to Canalyst-II device...")
dev = canalystii.CanalystDevi... | 26.639344 | 113 | 0.580308 |
ff5c43654b870f36bdae0dc7428fc7a669e10911 | 392 | py | Python | terrascript/honeycombio/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/honeycombio/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/honeycombio/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/honeycombio/d.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class honeycombio_datasets(terrascript.Data):
pass
class honeycombio_query(terrascript.Data):
... | 17.818182 | 79 | 0.780612 |
ff5c4573f5da5cdc6d821f3a445aefe564b5c158 | 43,328 | py | Python | round01/30_11_dDQN_light_tweak22.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | null | null | null | round01/30_11_dDQN_light_tweak22.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | 1 | 2022-02-10T02:27:10.000Z | 2022-02-10T02:27:10.000Z | round01/30_11_dDQN_light_tweak22.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | null | null | null | ########################################
# Changes compared to 30_05_CNN_revived_dDQN_light.py
# 01.
# n_epsilon_decay = int(n_episodes*.6)
# as opposed to
# n_epsilon_decay = int(n_episodes*.805)
# Takes around 300_000 to get from epsilon=1 to epsilon=0.01
# 02. shorter
# n_episodes_buf_fill = 2_000
# as ... | 37.611111 | 271 | 0.579718 |
ff5c47bf51696db72a7bf9311b6f1d0e28032e46 | 3,608 | py | Python | ui/control_panel/buttons.py | FeldrinH/gerrymandering | 1396bfba3445cc7c41827b91db6e397fce659e26 | [
"MIT"
] | null | null | null | ui/control_panel/buttons.py | FeldrinH/gerrymandering | 1396bfba3445cc7c41827b91db6e397fce659e26 | [
"MIT"
] | null | null | null | ui/control_panel/buttons.py | FeldrinH/gerrymandering | 1396bfba3445cc7c41827b91db6e397fce659e26 | [
"MIT"
] | null | null | null | from ctypes import windll
from misc import rgb_to_hex
from ui.parameter_panel.misc import InvalidParameter
import tkinter as tk
class ButtonBase(tk.Button):
def __init__(self, control_panel, **kwargs):
self.root = control_panel.root
super().__init__(control_panel, **kwargs)
self.blue, sel... | 34.037736 | 100 | 0.651053 |
ff5c5bb095d81a8390fa5e790b0436bc3768799f | 1,647 | py | Python | toontown/town/TownBattleWaitPanel.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/town/TownBattleWaitPanel.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/town/TownBattleWaitPanel.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from pandac.PandaModules import *
from direct.fsm import StateData
from direct.gui.DirectGui import *
from pandac.PandaModules import *
from toontown.toonbase import TTLocalizer
class TownBattleWaitPanel(StateData.StateData):
def __init__(self, doneEvent):
StateData.StateData.__init__(self, doneEvent)
... | 40.170732 | 347 | 0.650273 |
ff5c5dfa03aff92a4aa6fba0cfafcf7c161b71be | 49,611 | py | Python | md_tools.py | sebi06/czi_demos | b3f7801f46de0138a8a1ac245e9c80787e0a3f17 | [
"MIT"
] | 3 | 2020-12-31T10:06:42.000Z | 2021-11-09T13:44:16.000Z | md_tools.py | sebi06/czi_demos | b3f7801f46de0138a8a1ac245e9c80787e0a3f17 | [
"MIT"
] | null | null | null | md_tools.py | sebi06/czi_demos | b3f7801f46de0138a8a1ac245e9c80787e0a3f17 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#################################################################
# File : md_tools.py
# Version : 0.0.2
# Author : czsrh
# Date : 10.12.2020
# Institution : Carl Zeiss Microscopy GmbH
#
# Copyright (c) 2020 Carl Zeiss AG, Germany. All Rights Reserved.
###################... | 38.045245 | 153 | 0.578843 |
ff5c63183d936333cb21a237f8aafe5d3d819852 | 966 | py | Python | tests/helpers.py | melvinkcx/graphql-utils | 43ced16ff1ed6b5e8de3978429b14c85dc87044f | [
"MIT"
] | 17 | 2020-01-31T13:34:07.000Z | 2022-03-19T21:06:03.000Z | tests/helpers.py | melvinkcx/graphql-utils | 43ced16ff1ed6b5e8de3978429b14c85dc87044f | [
"MIT"
] | 6 | 2020-02-19T00:11:33.000Z | 2020-05-24T01:53:08.000Z | tests/helpers.py | melvinkcx/graphql-utils | 43ced16ff1ed6b5e8de3978429b14c85dc87044f | [
"MIT"
] | 1 | 2020-03-08T05:53:57.000Z | 2020-03-08T05:53:57.000Z | from graphql import ExecutionResult
def assert_no_errors(result: ExecutionResult) -> None:
assert not result.errors, "Results should contain errors"
def assert_no_data(result: ExecutionResult) -> None:
assert not result.data, "Results shouldn't contain data"
def assert_has_data(result: ExecutionResult) ->... | 31.16129 | 90 | 0.745342 |
ff5c63b6b78f0ce31356d93fa5844fdace0706e4 | 22,176 | py | Python | glauconite/operators/convert_files/gypsum_dl/gypsum_dl/Start.py | Jacob-Spiegel/GlauconiteFilterer | 90cad22a74b648841bc0552bc859df412bf93bca | [
"Apache-2.0"
] | 1 | 2021-06-29T14:09:43.000Z | 2021-06-29T14:09:43.000Z | glauconite/operators/convert_files/gypsum_dl/gypsum_dl/Start.py | Jacob-Spiegel/GlauconiteFilterer | 90cad22a74b648841bc0552bc859df412bf93bca | [
"Apache-2.0"
] | null | null | null | glauconite/operators/convert_files/gypsum_dl/gypsum_dl/Start.py | Jacob-Spiegel/GlauconiteFilterer | 90cad22a74b648841bc0552bc859df412bf93bca | [
"Apache-2.0"
] | 1 | 2021-06-29T14:09:48.000Z | 2021-06-29T14:09:48.000Z | # Copyright 2018 Jacob D. Durrant
#
# 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 writ... | 36.837209 | 222 | 0.630862 |
ff5c75aeed6b46c579a1202827eae7ade2896783 | 599 | py | Python | venv/Lib/site-packages/PygameLord/ColorChanger.py | apoorv-x12/SpaceInvadersClassicGame-Myfirst-game | 5a4ac187c19a7decfb900b392c3fb897f6613a2c | [
"MIT"
] | null | null | null | venv/Lib/site-packages/PygameLord/ColorChanger.py | apoorv-x12/SpaceInvadersClassicGame-Myfirst-game | 5a4ac187c19a7decfb900b392c3fb897f6613a2c | [
"MIT"
] | null | null | null | venv/Lib/site-packages/PygameLord/ColorChanger.py | apoorv-x12/SpaceInvadersClassicGame-Myfirst-game | 5a4ac187c19a7decfb900b392c3fb897f6613a2c | [
"MIT"
] | null | null | null | #LordLynx
#Part of PygameLord
import pygame
from pygame.locals import*
pygame.init()
'''
Color manipulation. Gives you utter power over your images.
'''
'''
ChangeColor(image, color_to_change, color_change_into)
images: The image you wish to change
color_to_change: The color to change in RGB Value
color_to_change: Th... | 27.227273 | 64 | 0.781302 |
ff5c7746bf841c6fe800d2ba8896a2426c664109 | 4,602 | py | Python | converter/request.py | giefferre/convert | 4f6dc199d32a7c7d4f531fc70e15865bd448a020 | [
"MIT"
] | 1 | 2020-02-28T20:17:19.000Z | 2020-02-28T20:17:19.000Z | converter/request.py | giefferre/convert | 4f6dc199d32a7c7d4f531fc70e15865bd448a020 | [
"MIT"
] | null | null | null | converter/request.py | giefferre/convert | 4f6dc199d32a7c7d4f531fc70e15865bd448a020 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import datetime
class ConverterRequest(object):
"""
List of valid currencies from the official ISO website.
https://www.iso.org/iso-4217-currency-codes.html
This list has been considered static as the list doesn't change too often.
"""
VALID_CURRENCIES ... | 46.484848 | 115 | 0.524989 |
ff5c85309f4f83e86433a60baf0e3cc63805160f | 128 | py | Python | wishlist/admin.py | flaiming/simple-wishlist | d5a57af48f7e98b34e146e46a6f21b1ab7d65d10 | [
"MIT"
] | null | null | null | wishlist/admin.py | flaiming/simple-wishlist | d5a57af48f7e98b34e146e46a6f21b1ab7d65d10 | [
"MIT"
] | 16 | 2018-11-30T14:17:24.000Z | 2021-11-13T09:03:25.000Z | wishlist/admin.py | flaiming/simple-wishlist | d5a57af48f7e98b34e146e46a6f21b1ab7d65d10 | [
"MIT"
] | 1 | 2018-11-30T13:49:30.000Z | 2018-11-30T13:49:30.000Z | # -*- coding: utf-8 -*-
from django.contrib import admin
from wishlist.models import WishList
admin.site.register(WishList)
| 14.222222 | 36 | 0.742188 |
ff5ca12ef83aea1ef869a5dd189c1c2f97bef53b | 38,520 | bzl | Python | tf_models/research/syntaxnet/tensorflow/tensorflow/tensorflow.bzl | SC-SPRING/SPRING | 3648e0186099835d9043fcabd4267e31b2dbdf46 | [
"Apache-2.0"
] | 5 | 2021-01-11T01:51:57.000Z | 2021-12-11T17:19:08.000Z | tf_models/research/syntaxnet/tensorflow/tensorflow/tensorflow.bzl | SC-RRL/RRL | 3648e0186099835d9043fcabd4267e31b2dbdf46 | [
"Apache-2.0"
] | null | null | null | tf_models/research/syntaxnet/tensorflow/tensorflow/tensorflow.bzl | SC-RRL/RRL | 3648e0186099835d9043fcabd4267e31b2dbdf46 | [
"Apache-2.0"
] | 3 | 2020-07-02T13:46:32.000Z | 2021-01-11T01:52:01.000Z | # -*- Python -*-
# Given a source file, generate a test name.
# i.e. "common_runtime/direct_session_test.cc" becomes
# "common_runtime_direct_session_test"
def src_to_test_name(src):
return src.replace("/", "_").split(".")[0]
# Return the options to use for a C++ library or binary build.
# Uses the ":optmode... | 30.070258 | 94 | 0.571495 |
ff5cad545d663774a0d266f343ed0e58ba84e7d2 | 177 | py | Python | tests/test_linter/test_main.py | m4ta1l/deal | 2a8e9bf412b8635b00a2b798dd8802375814a1c8 | [
"MIT"
] | 2 | 2021-01-11T12:01:24.000Z | 2021-02-02T23:42:20.000Z | tests/test_linter/test_main.py | Zac-HD/deal | 2e170e9c200aa248edc3cf173b556d86f158eb9b | [
"MIT"
] | 7 | 2020-09-05T13:54:28.000Z | 2020-11-27T05:59:19.000Z | tests/test_linter/test_main.py | Zac-HD/deal | 2e170e9c200aa248edc3cf173b556d86f158eb9b | [
"MIT"
] | null | null | null | # built-in
import subprocess
import sys
def test_cli_calling():
result = subprocess.run([sys.executable, '-m', 'deal.linter', __file__])
assert result.returncode == 0
| 19.666667 | 76 | 0.706215 |
ff5cd119666e833b5d2d33b2c854211a346d4378 | 1,693 | py | Python | QUANTAXIS/QAUtil/QACfg.py | simplezhang57/QUANTAXIS | 0fab23ee3cc4048a30b5eed3c311a5c9cdce8110 | [
"MIT"
] | 2 | 2018-10-29T12:01:55.000Z | 2021-03-05T10:28:59.000Z | QUANTAXIS/QAUtil/QACfg.py | simplezhang57/QUANTAXIS | 0fab23ee3cc4048a30b5eed3c311a5c9cdce8110 | [
"MIT"
] | null | null | null | QUANTAXIS/QAUtil/QACfg.py | simplezhang57/QUANTAXIS | 0fab23ee3cc4048a30b5eed3c311a5c9cdce8110 | [
"MIT"
] | 1 | 2021-01-19T06:13:44.000Z | 2021-01-19T06:13:44.000Z | #coding :utf-8
#
# The MIT License (MIT)
#
# Copyright (c) 2016-2018 yutiansut/QUANTAXIS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation th... | 31.351852 | 80 | 0.722386 |
ff5d0a4c1a9bd619ef33fc3ba96a01d19813e882 | 4,148 | py | Python | src/Models/Binary_Classification/recordings_level/binary_classification.py | amitsou/Multimodal-User-Monitoring | 178049485b4afe5fbf9511e74e4c2f78bd89d426 | [
"MIT"
] | 2 | 2020-07-28T14:20:45.000Z | 2021-01-07T23:55:52.000Z | src/Models/Binary_Classification/recordings_level/binary_classification.py | amitsou/Multimodal-User-Monitoring | 178049485b4afe5fbf9511e74e4c2f78bd89d426 | [
"MIT"
] | 7 | 2020-06-30T13:00:10.000Z | 2021-01-09T00:47:22.000Z | src/Models/Binary_Classification/recordings_level/binary_classification.py | amitsou/Multimodal-User-Monitoring | 178049485b4afe5fbf9511e74e4c2f78bd89d426 | [
"MIT"
] | 1 | 2020-12-15T15:07:18.000Z | 2020-12-15T15:07:18.000Z | # -*- coding: utf-8 -*-
from imblearn.under_sampling import RandomUnderSampler
from sklearn.tree import DecisionTreeClassifier
from sklearn.neighbors import KNeighborsClassifier
from sklearn.naive_bayes import GaussianNB
from sklearn.svm import SVC
from sklearn.preprocessing import StandardScaler
from sklearn.metrics i... | 39.132075 | 134 | 0.730955 |
ff5d13196d921f6d1a71ed002cf4104d29b5bee4 | 11,543 | py | Python | tests/tagifai/test_data.py | sri-spirited/MLOps | 2c5235c587870666c9f1569f401875754719d840 | [
"MIT"
] | 1 | 2021-05-04T09:46:09.000Z | 2021-05-04T09:46:09.000Z | tests/tagifai/test_data.py | atulkr28/MLOps | c97f18e9c08d6966e1ab4459adc0cc59ec4da243 | [
"MIT"
] | null | null | null | tests/tagifai/test_data.py | atulkr28/MLOps | c97f18e9c08d6966e1ab4459adc0cc59ec4da243 | [
"MIT"
] | null | null | null | # tests/tagifai/test_data.py
# Test tagifai/data.py components.
import itertools
import tempfile
from collections import Counter
from pathlib import Path
import numpy as np
import pandas as pd
import pytest
from tagifai import config, data, utils
@pytest.fixture
def tags():
tags_list = utils.load_json_from_url... | 33.653061 | 100 | 0.578966 |
ff5d936f57518d4b5823c3a3ebd8590b270d8756 | 6,010 | py | Python | src_retrieval_hindi/speaker.py | AI-Swasthyam/fixMyPose | 37c668adcd54bca3f259f1bfee07588f77861bc1 | [
"MIT"
] | 7 | 2021-12-14T07:12:00.000Z | 2022-02-25T00:23:44.000Z | src_retrieval_hindi/speaker.py | AI-Swasthyam/fixMyPose | 37c668adcd54bca3f259f1bfee07588f77861bc1 | [
"MIT"
] | 2 | 2021-11-22T15:27:38.000Z | 2021-12-01T13:29:29.000Z | src_retrieval_hindi/speaker.py | hyounghk/FixMyPose | 1b31c7f9e25ade6ee929cbbdc56d50162a8c2218 | [
"MIT"
] | null | null | null | import torch
import json
import os
from torch.distributions import Categorical
import torch.nn as nn
import torch.nn.functional as F
from model import Encoder
from decoders import Decoder
from tensorboardX import SummaryWriter
from param import args
import numpy as np
from evaluate import LangEvaluator
import utils
fro... | 30.353535 | 105 | 0.5797 |
ff5dbb8ab5b8f9cfeb8d2cb2c612ad8cc94a4368 | 221 | py | Python | src/dependency.py | pauloup/phockup | ee8f62d0a449dd35cd635e3cc450d08687203b44 | [
"MIT"
] | null | null | null | src/dependency.py | pauloup/phockup | ee8f62d0a449dd35cd635e3cc450d08687203b44 | [
"MIT"
] | null | null | null | src/dependency.py | pauloup/phockup | ee8f62d0a449dd35cd635e3cc450d08687203b44 | [
"MIT"
] | 1 | 2017-10-05T02:47:43.000Z | 2017-10-05T02:47:43.000Z | import shutil
from src.printer import Printer
def check_dependencies():
if shutil.which('exiftool') is None:
Printer().error('Exiftool is not installed. Visit http://www.sno.phy.queensu.ca/~phil/exiftool/') | 27.625 | 105 | 0.723982 |
ff5de08c29dd523a0d740f4f3ccb55a28c9e9718 | 50 | py | Python | pvops/__init__.py | kanderso-nrel/pvOps | f50b4090adbb92067310804dc1c782b4c2f79397 | [
"BSD-3-Clause"
] | null | null | null | pvops/__init__.py | kanderso-nrel/pvOps | f50b4090adbb92067310804dc1c782b4c2f79397 | [
"BSD-3-Clause"
] | null | null | null | pvops/__init__.py | kanderso-nrel/pvOps | f50b4090adbb92067310804dc1c782b4c2f79397 | [
"BSD-3-Clause"
] | null | null | null | from pvops import text
from pvops import text2time | 25 | 27 | 0.86 |
ff5e6acf8a022aaaeff1b8239f1ae13dc6389e50 | 5,364 | py | Python | gaphor/tests/testcase.py | Xander982/gaphor | b5c55fa18b79b80d9c14ee0cb0ce8a9963e90f86 | [
"Apache-2.0"
] | null | null | null | gaphor/tests/testcase.py | Xander982/gaphor | b5c55fa18b79b80d9c14ee0cb0ce8a9963e90f86 | [
"Apache-2.0"
] | null | null | null | gaphor/tests/testcase.py | Xander982/gaphor | b5c55fa18b79b80d9c14ee0cb0ce8a9963e90f86 | [
"Apache-2.0"
] | null | null | null | """
Basic test case for Gaphor tests.
Everything is about services so the TestCase can define it's required
services and start off.
"""
import logging
import unittest
from io import StringIO
from typing import Type, TypeVar
from gaphas.aspect import ConnectionSink
from gaphas.aspect import Connector as ConnectorAspe... | 28.380952 | 87 | 0.618755 |
ff5ea6677a50f43b52d6eeae0bea1909639ede9f | 124 | py | Python | savu/plugins/driver/gpu_plugin_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/driver/gpu_plugin_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/driver/gpu_plugin_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | from savu.plugins.plugin_tools import PluginTools
class GpuPluginTools(PluginTools):
"""The driver for GPU plugins."""
| 24.8 | 49 | 0.774194 |
ff5eb6118edfceb36fa51dbbb775df741cedaa7d | 2,922 | py | Python | tap_list_providers/test/test_digitalpour_otbx_not_beer.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 18 | 2018-12-06T01:46:37.000Z | 2021-10-17T10:37:17.000Z | tap_list_providers/test/test_digitalpour_otbx_not_beer.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 194 | 2018-11-04T12:50:49.000Z | 2022-01-06T22:43:43.000Z | tap_list_providers/test/test_digitalpour_otbx_not_beer.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 7 | 2019-03-18T05:36:06.000Z | 2020-12-25T03:27:29.000Z | """Test the parsing of digitalpour data"""
import json
import os
from django.core.management import call_command
from django.test import TestCase
import responses
from beers.models import Beer, Manufacturer
from venues.test.factories import VenueFactory
from venues.models import Venue, VenueAPIConfiguration
from taps.... | 36.525 | 88 | 0.594114 |
ff5ee246b95ac318f260fa827b6bf05dff0a5a14 | 1,261 | py | Python | poni/rcontrol_all.py | saaros/poni | 1d2a9982f7e934137ce1ee675f0e1373314df7c7 | [
"Apache-2.0"
] | 6 | 2015-05-11T12:21:53.000Z | 2018-01-17T00:07:29.000Z | poni/rcontrol_all.py | saaros/poni | 1d2a9982f7e934137ce1ee675f0e1373314df7c7 | [
"Apache-2.0"
] | null | null | null | poni/rcontrol_all.py | saaros/poni | 1d2a9982f7e934137ce1ee675f0e1373314df7c7 | [
"Apache-2.0"
] | 2 | 2015-02-27T10:14:26.000Z | 2015-02-27T10:14:30.000Z | """
Node remote control switchboard
Copyright (c) 2010-2012 Mika Eloranta
See LICENSE for details.
"""
from . import rcontrol
from . import rcontrol_paramiko
#from . import rcontrol_openssh
from . import errors
METHODS = {
"ssh": rcontrol_paramiko.ParamikoRemoteControl,
"local": rcontrol.LocalControl,
"... | 23.351852 | 64 | 0.574941 |
ff5ee3441d353145b97b13620dc0dcbe124daaa0 | 2,631 | py | Python | hs_swat_modelinstance/serializers.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_swat_modelinstance/serializers.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_swat_modelinstance/serializers.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | from rest_framework import serializers
from hs_modelinstance.serializers import ModelInstanceMetaDataSerializer
from .models import ModelObjective, SimulationType, ModelMethod, ModelParameter, ModelInput, \
ModelObjectiveChoices, ModelParametersChoices, SWATModelInstanceMetaData
class ModelObjectiveChoicesMetaD... | 39.268657 | 98 | 0.764728 |
ff5f4344779be5850b133e4804d65b6f9ac95f75 | 10,966 | py | Python | tests/unit/replicator_tests.py | ssshah5/clone-python-cloudant | 1939f6ffe1b36fd87e94e984fe300e4e109d2171 | [
"Apache-2.0"
] | null | null | null | tests/unit/replicator_tests.py | ssshah5/clone-python-cloudant | 1939f6ffe1b36fd87e94e984fe300e4e109d2171 | [
"Apache-2.0"
] | null | null | null | tests/unit/replicator_tests.py | ssshah5/clone-python-cloudant | 1939f6ffe1b36fd87e94e984fe300e4e109d2171 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2015 IBM. 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 ... | 36.072368 | 84 | 0.606237 |
ff5f85402520bae79a63502467fa46edb6813816 | 1,490 | py | Python | ctic/2.1.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | 1 | 2020-02-25T10:32:27.000Z | 2020-02-25T10:32:27.000Z | ctic/2.1.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | ctic/2.1.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | """
2.1 - Write a code to remove duplicates from unsorted linked list
"""
# Definition of a ListNode
class ListNode():
def __init__(self, val):
self.val = val
self.next = None
def dedupe(head: ListNode) -> ListNode:
if not head:
return None
if not head.next:
return h... | 18.395062 | 69 | 0.547651 |
ff5f986a272c5219ad99e93752f36eb931d67eb0 | 6,942 | py | Python | dash_charts/gantt_chart.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | 16 | 2020-02-22T00:51:54.000Z | 2022-03-03T21:45:51.000Z | dash_charts/gantt_chart.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | 29 | 2020-06-29T22:14:00.000Z | 2022-03-22T02:10:00.000Z | dash_charts/gantt_chart.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | 1 | 2022-02-03T09:07:07.000Z | 2022-02-03T09:07:07.000Z | """Gantt Chart.
Note: does not support resources nor task dependencies; however those could be added by extending this base class.
# Removed Code
```py
# Just snippets of Python code that may be useful in the future
dates = sorted(set(filter(None, df_raw['start'].to_list() + df_raw['end'].to_list())))
self.axis_rang... | 36.536842 | 116 | 0.596802 |
ff5fba0344534342db294dca5f0399ddb5e8ec53 | 22,793 | py | Python | boa/core/recipe_output.py | dhirschfeld/boa | e29aca2c458c211627874a568de3d71545881f27 | [
"BSD-3-Clause"
] | null | null | null | boa/core/recipe_output.py | dhirschfeld/boa | e29aca2c458c211627874a568de3d71545881f27 | [
"BSD-3-Clause"
] | null | null | null | boa/core/recipe_output.py | dhirschfeld/boa | e29aca2c458c211627874a568de3d71545881f27 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2021, QuantStack
# SPDX-License-Identifier: BSD-3-Clause
from boa.core.solver import get_solver
import copy
import json
from pathlib import Path
import sys
import rich
from rich.table import Table
from rich.padding import Padding
from conda.base.context import context
from conda_build.config import g... | 37.988333 | 131 | 0.513623 |
ff5fbb4b7e5e3d6317e82eb8385e928994b8ecb2 | 3,355 | py | Python | gpg_forward/__init__.py | psliwka/gpg-forward | 665f1d3a024f786865f8465fbb5ad805fbfeddf2 | [
"MIT"
] | 2 | 2019-05-28T09:58:36.000Z | 2019-06-27T08:14:11.000Z | gpg_forward/__init__.py | psliwka/gpg-forward | 665f1d3a024f786865f8465fbb5ad805fbfeddf2 | [
"MIT"
] | null | null | null | gpg_forward/__init__.py | psliwka/gpg-forward | 665f1d3a024f786865f8465fbb5ad805fbfeddf2 | [
"MIT"
] | 1 | 2021-02-24T12:56:31.000Z | 2021-02-24T12:56:31.000Z | import argparse
import pkg_resources
import subprocess
__version__ = pkg_resources.get_distribution(__name__).version
def normalize_stdout(stdout):
"""Make subprocess output easier to consume
Decode bytes to str, strip unnecessary newlines produced by most commands.
:param stdout: return value of `sub... | 31.35514 | 79 | 0.692697 |
ff5fd01fffbefde346741c0928c840c8068d78a3 | 288 | py | Python | simplechinese/__init__.py | chenmingxiang110/SimpleChinese | 4562fd4bcb0e6922904715f5214f141e92db90e5 | [
"MIT"
] | 10 | 2020-07-09T13:10:20.000Z | 2021-08-03T01:54:15.000Z | simplechinese/__init__.py | chenmingxiang110/SimpleChinese | 4562fd4bcb0e6922904715f5214f141e92db90e5 | [
"MIT"
] | null | null | null | simplechinese/__init__.py | chenmingxiang110/SimpleChinese | 4562fd4bcb0e6922904715f5214f141e92db90e5 | [
"MIT"
] | 2 | 2020-07-10T02:18:23.000Z | 2020-07-10T02:19:21.000Z | from . import preprocessing
from .preprocessing import *
from . import representation
from .representation import *
from . import visualization
from .visualization import *
from . import nlp
from .nlp import *
from . import conversion
from .conversion import *
__version__ = "0.1.0"
| 16.941176 | 29 | 0.763889 |
ff5feea6c6828f5d3ee725b9c86641d7cfd75eff | 1,923 | py | Python | cmu_15-441/liso/cp1_checker.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | null | null | null | cmu_15-441/liso/cp1_checker.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | 1 | 2017-07-31T08:15:26.000Z | 2017-07-31T08:15:26.000Z | cmu_15-441/liso/cp1_checker.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | 1 | 2019-10-06T16:52:31.000Z | 2019-10-06T16:52:31.000Z | #!/usr/bin/python
from socket import *
import sys
import random
import os
import time
if len(sys.argv) < 7:
sys.stderr.write('Usage: %s <ip> <port> <#trials>\
<#writes and reads per trial>\
<max # bytes to write at a time> <#connections> \n' % (sys.argv[0]))
sys.exit(1)
serverHost = g... | 27.869565 | 105 | 0.641706 |
ff6017b8834d44e5ad6ceaf4b1ffeea7c1352efe | 4,763 | py | Python | yardstick/benchmark/scenarios/availability/result_checker/result_checker_general.py | rbbratta/yardstick | 7d1ffcd8eb41e9e4a09ed469b00ae4cbf2715529 | [
"Apache-2.0"
] | null | null | null | yardstick/benchmark/scenarios/availability/result_checker/result_checker_general.py | rbbratta/yardstick | 7d1ffcd8eb41e9e4a09ed469b00ae4cbf2715529 | [
"Apache-2.0"
] | null | null | null | yardstick/benchmark/scenarios/availability/result_checker/result_checker_general.py | rbbratta/yardstick | 7d1ffcd8eb41e9e4a09ed469b00ae4cbf2715529 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright (c) 2016 Juan Qiu and others
# juan_ qiu@tongji.edu.cn
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distributi... | 43.697248 | 78 | 0.600462 |
ff6049afdb2739d2c9a1ff62dc0b452c409ea49d | 2,577 | py | Python | src/multimodal/data/kitti/make_records.py | markrofail/multi-modal-deep-learning-for-vehicle-sensor-data-abstraction-and-attack-detection | 2f252c072f3091bb27506978dd90311f7f82f386 | [
"MIT"
] | null | null | null | src/multimodal/data/kitti/make_records.py | markrofail/multi-modal-deep-learning-for-vehicle-sensor-data-abstraction-and-attack-detection | 2f252c072f3091bb27506978dd90311f7f82f386 | [
"MIT"
] | 6 | 2020-09-25T22:41:00.000Z | 2021-06-08T21:50:37.000Z | src/multimodal/data/kitti/make_records.py | markrofail/multi-modal-deep-learning-for-vehicle-sensor-data-abstraction-and-attack-detection | 2f252c072f3091bb27506978dd90311f7f82f386 | [
"MIT"
] | null | null | null | import multiprocessing
import numpy as np
from joblib import Parallel, delayed
from tqdm import tqdm
from src.helpers import paths, tfrecord
from src.helpers.flags import AttackModes, Verbose
def _get_input_path(drive_date, drive_number, frame, attack):
if attack:
return paths.attack.processed_tensor(drive_da... | 33.907895 | 95 | 0.72371 |
ff6055c73825a782a377118f88a63b8ad6ea2657 | 599 | py | Python | errors.py | pelegm/qpyapp | d1f51f56e365ac61d94a61a28f06f8ce0f8d0b81 | [
"Unlicense"
] | null | null | null | errors.py | pelegm/qpyapp | d1f51f56e365ac61d94a61a28f06f8ce0f8d0b81 | [
"Unlicense"
] | null | null | null | errors.py | pelegm/qpyapp | d1f51f56e365ac61d94a61a28f06f8ce0f8d0b81 | [
"Unlicense"
] | null | null | null | """
.. errors.py
Error handlers for apps.
"""
## Framework
import qpyapp.base
import sys
import traceback
import pygments as pyg
import pygments.lexers as pyglex
import pygments.formatters as pygfrmt
pytb = pyglex.get_lexer_by_name('pytb')
term = pygfrmt.get_formatter_by_name('terminal256')
class ErrorPrinter(qpyap... | 22.185185 | 75 | 0.702838 |
ff6092fc260660b512e8123823c63e98a023af6d | 6,764 | py | Python | tensorflow/contrib/distributions/python/kernel_tests/mixture_same_family_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/distributions/python/kernel_tests/mixture_same_family_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/distributions/python/kernel_tests/mixture_same_family_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2017 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... | 45.093333 | 102 | 0.676227 |
ff60b9ff994d38cd82ffbe276fbce642812a648b | 897 | py | Python | src/utils/console_logger.py | manjotms10/google-trends-analytics | 718311ba92d880623eb85cf5c76423116faaade2 | [
"MIT"
] | 6 | 2020-03-04T13:33:37.000Z | 2021-06-25T12:08:21.000Z | src/utils/console_logger.py | manjotms10/google-trends-analytics | 718311ba92d880623eb85cf5c76423116faaade2 | [
"MIT"
] | 3 | 2021-03-31T19:31:51.000Z | 2021-12-13T20:26:19.000Z | src/utils/console_logger.py | manjotms10/google-trends-analytics | 718311ba92d880623eb85cf5c76423116faaade2 | [
"MIT"
] | null | null | null | import logging
'''
This file creates a logger that logs to the console. This is helpful in debugging the code. An example log line looks like the following -
2019-12-02 20:01:28,941 | [google_trends.py __init__:29] | [INFO] - Successfully connected session to Google Trends
It displays the time of logging, file... | 39 | 140 | 0.736901 |
ff60c23385f63d7f1fe5b9105dc9f9e25e3fa944 | 4,063 | py | Python | tests/onedrive/test_driveItem.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | tests/onedrive/test_driveItem.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | tests/onedrive/test_driveItem.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | import os
import uuid
from tests.graph_case import GraphTestCase
from office365.onedrive.drive import Drive
from office365.onedrive.driveItem import DriveItem
def create_list_drive(client):
list_info = {
"displayName": "Lib_" + uuid.uuid4().hex,
"list": {"template": "documentLibrary"}
}
... | 38.695238 | 107 | 0.700468 |
ff60c2d779e5ce618b81c966dec74153199a63cf | 8,724 | py | Python | tensorflow_asr/featurizers/methods/gammatone.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 608 | 2020-10-15T16:11:23.000Z | 2022-03-28T21:23:55.000Z | tensorflow_asr/featurizers/methods/gammatone.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 174 | 2020-10-15T16:14:27.000Z | 2022-03-28T11:48:56.000Z | tensorflow_asr/featurizers/methods/gammatone.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 191 | 2020-10-16T01:24:15.000Z | 2022-03-28T10:30:55.000Z | # Copyright 2020 Huy Le Nguyen (@usimarit) and Huy Phan (@pquochuy)
#
# 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 a... | 34.756972 | 110 | 0.644658 |
ff60d9b9356d721fc9efff61eba1cc9325ee707e | 34 | py | Python | tests/test_placeholder.py | BelminD/bobby | 8763fa9e12dd911dfe8e279bd33db65495ec067b | [
"MIT"
] | 1 | 2020-03-02T14:50:11.000Z | 2020-03-02T14:50:11.000Z | tests/test_placeholder.py | BelminD/bobby | 8763fa9e12dd911dfe8e279bd33db65495ec067b | [
"MIT"
] | null | null | null | tests/test_placeholder.py | BelminD/bobby | 8763fa9e12dd911dfe8e279bd33db65495ec067b | [
"MIT"
] | 1 | 2020-03-26T08:56:06.000Z | 2020-03-26T08:56:06.000Z |
def test_placeholder():
pass
| 8.5 | 23 | 0.676471 |
ff60dbfd902026bd5649718bd10ab9c193a8b52b | 537 | py | Python | contxt/services/health.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | null | null | null | contxt/services/health.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | null | null | null | contxt/services/health.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | null | null | null | from ..models.health import Health
from .api import ConfiguredLegacyApi
from ..utils.config import ContxtEnvironmentConfig
class HealthService(ConfiguredLegacyApi):
"""Health API client"""
def __init__(self, env_config: ContxtEnvironmentConfig, **kwargs) -> None:
super().__init__(env_config=env_confi... | 35.8 | 89 | 0.724395 |
ff60f54ed134f86dc863bb2917b403084fd6982e | 3,486 | py | Python | ImgOperator/Tool.py | keyofdeath/AugmentedReality | dfd30e17c9af5a4c392ae618d9f1f0fbf8a4e5b6 | [
"MIT"
] | null | null | null | ImgOperator/Tool.py | keyofdeath/AugmentedReality | dfd30e17c9af5a4c392ae618d9f1f0fbf8a4e5b6 | [
"MIT"
] | null | null | null | ImgOperator/Tool.py | keyofdeath/AugmentedReality | dfd30e17c9af5a4c392ae618d9f1f0fbf8a4e5b6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import cv2
import numpy as np
import glob
from ImgOperator.Filtration.Canny import ImgCanny
from copy import deepcopy
def take_pic(cam):
"""
:param cam:
:return:
"""
while True:
ret, frame = cam.read()
cv2.imshow("main", frame)
... | 31.405405 | 100 | 0.567986 |
ff61056eceee0551b2e5c90cd4ea6376bede5bf6 | 2,173 | py | Python | toontown/ai/DistributedBlackCatMgr.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/ai/DistributedBlackCatMgr.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/ai/DistributedBlackCatMgr.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedObject
from direct.interval.IntervalGlobal import *
from toontown.effects import DustCloud
def getDustCloudIval(toon):
dustCloud = DustCloud.DustCloud(fBillboard=0)
dustCloud.setBillboardAxis(2.0)
dustCloud.setZ(3)... | 40.240741 | 105 | 0.721583 |
ff611f5d8acab4b31da31236c94d7d36d2d8f359 | 3,534 | py | Python | var/spack/repos/builtin/packages/py-slepc4py/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 348 | 2015-12-30T04:05:54.000Z | 2022-02-21T10:57:53.000Z | var/spack/repos/builtin/packages/py-slepc4py/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3,994 | 2015-12-09T09:43:00.000Z | 2017-11-04T02:46:39.000Z | var/spack/repos/builtin/packages/py-slepc4py/package.py | flatironinstitute/spack | 71a7b1b5fadbe16bcdb36fb679aa828cd7d83b02 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 359 | 2015-12-16T18:25:55.000Z | 2017-11-02T14:51:13.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PySlepc4py(PythonPackage):
"""This package provides Python bindings for the SLEPc package.... | 51.970588 | 96 | 0.682796 |
ff612027a1b1d38871d2a37bbeeb9ecc18131763 | 25,179 | py | Python | device_manager/manager.py | zea2/DeviceManager | 5f224c7680692cd9329b5b1421b00a814e3c2bfe | [
"MIT"
] | null | null | null | device_manager/manager.py | zea2/DeviceManager | 5f224c7680692cd9329b5b1421b00a814e3c2bfe | [
"MIT"
] | 15 | 2020-03-06T13:53:56.000Z | 2020-04-01T09:14:34.000Z | device_manager/manager.py | zea2/DeviceManager | 5f224c7680692cd9329b5b1421b00a814e3c2bfe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The device manager can store devices and makes them accessible by the user.
The `DeviceManager`-class works like a dictionary that stores `Device`-objects by user-defined names
as dictionary-keys. But the device manager is slightly more intelligent than a ordinary dicti... | 48.608108 | 100 | 0.614321 |
ff61284bf3719f5b452b0e92c68f78c89dee14b9 | 484 | py | Python | Data_collection_processing/create_dataset_list.py | JustinRunyon/JustinRunyon | 0c3c88555459355a64e78579141af0836b674545 | [
"BSD-3-Clause"
] | 67 | 2015-11-12T17:52:49.000Z | 2021-04-08T16:07:38.000Z | Data_collection_processing/create_dataset_list.py | shijs1982/adage | 2575a60804218db7f91402b955371bb60e5b00d6 | [
"BSD-3-Clause"
] | 2 | 2016-01-12T21:25:17.000Z | 2016-05-17T14:03:06.000Z | Data_collection_processing/create_dataset_list.py | shijs1982/adage | 2575a60804218db7f91402b955371bb60e5b00d6 | [
"BSD-3-Clause"
] | 29 | 2015-12-16T14:34:07.000Z | 2022-02-16T21:04:31.000Z | '''
This script create a file that stores each dataset's name and the samples contained in the dataset.
'''
import os
pcl_folder = 'Data_collection_processing/data/pcls'
out_fh = open('Data_collection_processing/datasets_list.txt','w')
pcl_list = os.listdir(pcl_folder)
for file in pcl_list:
pcl_fh = open(os.path... | 32.266667 | 99 | 0.71281 |
ff6137a3a9cf09495df50108fbcd346a62795aad | 71,296 | py | Python | angr/calling_conventions.py | zjzh/angr | 654fc90a65748c926ee63279850b6aa9f4f8d292 | [
"BSD-2-Clause"
] | null | null | null | angr/calling_conventions.py | zjzh/angr | 654fc90a65748c926ee63279850b6aa9f4f8d292 | [
"BSD-2-Clause"
] | null | null | null | angr/calling_conventions.py | zjzh/angr | 654fc90a65748c926ee63279850b6aa9f4f8d292 | [
"BSD-2-Clause"
] | null | null | null | import logging
from typing import Union, Optional, List, Dict, Type
from collections import defaultdict
import claripy
import archinfo
from archinfo import RegisterName
from .sim_type import SimType, SimTypeChar, SimTypePointer, SimTypeFixedSizeArray, SimTypeArray, SimTypeString, \
SimTypeFunction, SimTypeFloat, ... | 38.895799 | 145 | 0.619249 |
ff6156faf4963f4d059e91a8921c6d74238dea17 | 552 | py | Python | 56_Merge-Intervals.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | 3 | 2018-07-05T05:51:10.000Z | 2019-05-04T08:35:44.000Z | 56_Merge-Intervals.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | null | null | null | 56_Merge-Intervals.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | null | null | null | # Definition for an interval.
# class Interval(object):
# def __init__(self, s=0, e=0):
# self.start = s
# self.end = e
class Solution(object):
def merge(self, intervals):
"""
:type intervals: List[Interval]
:rtype: List[Interval]
"""
ans = []
for... | 27.6 | 69 | 0.481884 |
ff618626edce9a7c6527c607ed610bddb591eba1 | 167 | py | Python | hs_app_timeseries/apps.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_app_timeseries/apps.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_app_timeseries/apps.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | from django.apps import AppConfig
class TimeSeriesAppConfig(AppConfig):
name = "hs_app_timeseries"
def ready(self):
from . import receivers # noqa
| 18.555556 | 39 | 0.706587 |
ff618db1dc80d1ea1279bdf56fecd6e8b64b49e9 | 1,388 | py | Python | parcels/tests.py | festlv/latvijas-pasta-toolis | 61d682e319fb70781869783593811b58881db96c | [
"MIT"
] | null | null | null | parcels/tests.py | festlv/latvijas-pasta-toolis | 61d682e319fb70781869783593811b58881db96c | [
"MIT"
] | null | null | null | parcels/tests.py | festlv/latvijas-pasta-toolis | 61d682e319fb70781869783593811b58881db96c | [
"MIT"
] | null | null | null | from django.test import TestCase
from parcels.utils import scrape_shipment_status
from parcels.models import Shipment
from django.contrib.auth.models import User
class ScraperTestCase(TestCase):
def _create_shipment(self, tracking_number):
(user, created) = User.objects.get_or_create(
usernam... | 31.545455 | 82 | 0.693084 |
ff61e1b76e0e0b79eed68a193c1ae75f09a6d65e | 1,950 | py | Python | indra_db_lite/download.py | steppi/indra_db_lite | 094d927570717d278624713072fa2c9acef5d884 | [
"BSD-2-Clause"
] | null | null | null | indra_db_lite/download.py | steppi/indra_db_lite | 094d927570717d278624713072fa2c9acef5d884 | [
"BSD-2-Clause"
] | null | null | null | indra_db_lite/download.py | steppi/indra_db_lite | 094d927570717d278624713072fa2c9acef5d884 | [
"BSD-2-Clause"
] | null | null | null | """Handles download (and upload) of local db from (and to) s3."""
import boto3
import logging
import os
import subprocess
import sys
from indra_db_lite import locations
logger = logging.getLogger(__file__)
def compress_local_db(sqlite_db_path: str, n_threads=1) -> None:
assert isinstance(n_threads, int)
t... | 29.104478 | 75 | 0.677436 |
ff61f5e3047d08f708e42b8fa01c29867e38b57c | 16,052 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_04_01/operations/_blob_services_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_04_01/operations/_blob_services_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_04_01/operations/_blob_services_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.220386 | 221 | 0.684338 |
ff61fc6449cbf60a6ba152a64d75434015d6ec28 | 1,141 | py | Python | continuacao.py | FelipeNarimatsu/FelipeNarimatsu.github.io | f963c1edac9a9fb595162234e098c9a9cb414913 | [
"MIT"
] | null | null | null | continuacao.py | FelipeNarimatsu/FelipeNarimatsu.github.io | f963c1edac9a9fb595162234e098c9a9cb414913 | [
"MIT"
] | null | null | null | continuacao.py | FelipeNarimatsu/FelipeNarimatsu.github.io | f963c1edac9a9fb595162234e098c9a9cb414913 | [
"MIT"
] | null | null | null | #Tipos de dados
a = None
#Verificar se a variável é None:
if a is None:
print("a não é nada")
b = list(i for i in range(5))
b = None
if not (b is None):
print(b)
lista = [1, 2, 3, 4, 5]
tupla = tuple() #tupla vazia ---> tupla é uma lista que não pode ter seus elementos alterados
tupla = [2, 3, 4, 5, 6]
pri... | 21.12963 | 125 | 0.602103 |
ff6222abd8c8f6c56d40c42f0d5e01cca6089a91 | 3,280 | py | Python | ale/create_potential.py | martinclason/Molecular-Dynamics-Project | 9fddfc5840980e987d72014b1e1f4ed0a031c9fe | [
"MIT"
] | null | null | null | ale/create_potential.py | martinclason/Molecular-Dynamics-Project | 9fddfc5840980e987d72014b1e1f4ed0a031c9fe | [
"MIT"
] | 100 | 2021-10-12T14:08:31.000Z | 2021-12-19T16:38:37.000Z | ale/create_potential.py | martinclason/Molecular-Dynamics-Project | 9fddfc5840980e987d72014b1e1f4ed0a031c9fe | [
"MIT"
] | 2 | 2021-10-12T14:00:11.000Z | 2021-11-03T09:20:42.000Z | from ase.calculators.kim.kim import KIM
from ase import units
from ale.errors import ConfigError
def built_in_LennardJones(options) :
"""Returns the built in Lennard-Jones potential. It will try to use ASAP if
user didn't specify not to.
To be able to create a good potential some values need to present in... | 36.853933 | 113 | 0.626829 |
ff624d13d93f30fb467c175a27740f70ab6c49bf | 11,595 | py | Python | ApiManager/utils/operation.py | wishchen/HttpRunnerManager | 1e72baa8a84ca70124af908ac683bf88b869d48a | [
"MIT"
] | null | null | null | ApiManager/utils/operation.py | wishchen/HttpRunnerManager | 1e72baa8a84ca70124af908ac683bf88b869d48a | [
"MIT"
] | null | null | null | ApiManager/utils/operation.py | wishchen/HttpRunnerManager | 1e72baa8a84ca70124af908ac683bf88b869d48a | [
"MIT"
] | null | null | null | import logging
from django.core.exceptions import ObjectDoesNotExist
from django.db import DataError
from ApiManager.models import ProjectInfo, ModuleInfo, TestCaseInfo, UserInfo, EnvInfo, TestReports
logger = logging.getLogger('HttpRunnerManager')
def add_register_data(**kwargs):
"""
用户注册信息逻辑判断及落地
:pa... | 32.119114 | 120 | 0.609314 |
ff62512eafa8470227f3b121ce4a450f581c8716 | 4,933 | py | Python | make_annotation.py | shawnau/DataScienceBowl2018 | 3c6f0f26dd86b71aad55fca52314e6432d0b3a82 | [
"MIT"
] | null | null | null | make_annotation.py | shawnau/DataScienceBowl2018 | 3c6f0f26dd86b71aad55fca52314e6432d0b3a82 | [
"MIT"
] | null | null | null | make_annotation.py | shawnau/DataScienceBowl2018 | 3c6f0f26dd86b71aad55fca52314e6432d0b3a82 | [
"MIT"
] | null | null | null | import os
import numpy as np
import cv2
from utility.file import read_list_from_file
from utility.draw import multi_mask_to_color_overlay, multi_mask_to_contour_overlay
from dataset.folder import SourceFolder, DataFolder
from configuration import Configuration
def run_make_test_annotation(cfg, norm=False):
ids =... | 43.654867 | 119 | 0.635516 |
ff62731d19f83ba505f068aab7a3de52a8c574ba | 5,155 | py | Python | resilient-lib/resilient_lib/components/resilient_common.py | shanyangqu/resilient-python-api | e9e50a60324b383daf2c8c0d14db020c2c92056d | [
"MIT"
] | null | null | null | resilient-lib/resilient_lib/components/resilient_common.py | shanyangqu/resilient-python-api | e9e50a60324b383daf2c8c0d14db020c2c92056d | [
"MIT"
] | null | null | null | resilient-lib/resilient_lib/components/resilient_common.py | shanyangqu/resilient-python-api | e9e50a60324b383daf2c8c0d14db020c2c92056d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# (c) Copyright IBM Corp. 2018. All Rights Reserved.
# pragma pylint: disable=unused-argument, no-self-use
import datetime
from bs4 import BeautifulSoup
from six import string_types
try:
from HTMLParser import HTMLParser as htmlparser
except:
from html.parser import HTMLParser as htmlpa... | 32.834395 | 125 | 0.676237 |
ff629980051ff787b198f2b38732230be78887aa | 6,559 | py | Python | misc/panostretch.py | lixuran/Room_Layout_Estimation_new | 8e73b66e1418675e5bb82f3780091c406fe721d8 | [
"MIT"
] | 1 | 2019-08-31T11:04:05.000Z | 2019-08-31T11:04:05.000Z | misc/panostretch.py | lixuran/Room_Layout_Estimation_new | 8e73b66e1418675e5bb82f3780091c406fe721d8 | [
"MIT"
] | 1 | 2021-04-13T07:47:33.000Z | 2021-04-13T07:47:33.000Z | misc/panostretch.py | lixuran/Room_Layout_Estimation_new | 8e73b66e1418675e5bb82f3780091c406fe721d8 | [
"MIT"
] | null | null | null | import functools
import numpy as np
from scipy.ndimage import map_coordinates
def uv_meshgrid(w, h):
uv = np.stack(np.meshgrid(range(w), range(h)), axis=-1)
uv = uv.astype(np.float64)
uv[..., 0] = ((uv[..., 0] + 0.5) / w - 0.5) * 2 * np.pi
uv[..., 1] = ((uv[..., 1] + 0.5) / h - 0.5) * np.pi
return... | 32.795 | 91 | 0.584083 |
ff629eb2a9b639c48b49ba05dc3a4930959653ab | 10,266 | py | Python | spatialpandas/geometry/point.py | isabella232/spatialpandas | 0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807 | [
"BSD-2-Clause"
] | null | null | null | spatialpandas/geometry/point.py | isabella232/spatialpandas | 0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807 | [
"BSD-2-Clause"
] | 1 | 2021-04-17T15:22:28.000Z | 2021-04-17T15:22:28.000Z | spatialpandas/geometry/point.py | isabella232/spatialpandas | 0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807 | [
"BSD-2-Clause"
] | 1 | 2021-04-17T15:22:00.000Z | 2021-04-17T15:22:00.000Z | import numpy as np
from pandas.core.dtypes.dtypes import register_extension_dtype
from spatialpandas.geometry._algorithms.intersection import segment_intersects_point, \
point_intersects_polygon
from spatialpandas.geometry.base import GeometryDtype
from spatialpandas.geometry.basefixed import GeometryFixed, Geomet... | 30.372781 | 88 | 0.58874 |
ff62c2bc379b284ff2573224c19b2fb375d1b535 | 12,826 | py | Python | urlexpander/core/api.py | cande1gut/urlExpander | 04da5668ece2bcd817c5ad6c646cffea1ed17c5b | [
"MIT"
] | null | null | null | urlexpander/core/api.py | cande1gut/urlExpander | 04da5668ece2bcd817c5ad6c646cffea1ed17c5b | [
"MIT"
] | null | null | null | urlexpander/core/api.py | cande1gut/urlExpander | 04da5668ece2bcd817c5ad6c646cffea1ed17c5b | [
"MIT"
] | null | null | null | """
This is the main module of the urlExpander package.
It houses functions to standardize urls, and extract domain names from links.
It also has the expand and multithread expand functions, which are the crux of this package.
"""
import os
import glob
import json
import itertools
import datetime
import concurrent.fut... | 40.08125 | 155 | 0.613597 |
ff62cf1e1fa408ab35ccf1e58f98efc4440fc9c6 | 1,399 | py | Python | src/bst/pygasus/resources/html.py | codeix/bst.pygasus.resources | 4b617f4d2b9b45db7926a7c1a96c9b766cf3267a | [
"ZPL-2.1"
] | null | null | null | src/bst/pygasus/resources/html.py | codeix/bst.pygasus.resources | 4b617f4d2b9b45db7926a7c1a96c9b766cf3267a | [
"ZPL-2.1"
] | null | null | null | src/bst/pygasus/resources/html.py | codeix/bst.pygasus.resources | 4b617f4d2b9b45db7926a7c1a96c9b766cf3267a | [
"ZPL-2.1"
] | null | null | null | import fanstatic
from genshi.core import Markup
from grokcore import component
from bst.pygasus.core.interfaces import IApplicationContext
from bst.pygasus.wsgi.interfaces import IRequest
from bst.pygasus.wsgi.interfaces import IRootDispatcher
from bst.pygasus.resources import loader
@component.implementer(IRootDis... | 31.088889 | 74 | 0.643317 |
ff62e36054858de96279ff97a6387904a44e41f8 | 8,966 | py | Python | TestSuite/Test_cdkkUtils_Physics.py | BrianDunneKK/cdkk | 31444b23b64be92d77ba82cbbdbc0b289bf39524 | [
"MIT"
] | null | null | null | TestSuite/Test_cdkkUtils_Physics.py | BrianDunneKK/cdkk | 31444b23b64be92d77ba82cbbdbc0b289bf39524 | [
"MIT"
] | null | null | null | TestSuite/Test_cdkkUtils_Physics.py | BrianDunneKK/cdkk | 31444b23b64be92d77ba82cbbdbc0b289bf39524 | [
"MIT"
] | null | null | null | import sys
sys.path.append("cdkk")
import cdkk
import pygame
# --------------------------------------------------
class Sprite_Ball(cdkk.Sprite_Shape):
def __init__(self, posx, posy, velx, vely, *limits):
super().__init__(name="Ball", rect=cdkk.cdkkRect(posx, posy, 50, 50),
styl... | 46.455959 | 130 | 0.581865 |
ff62e91e533674b617644cd8ba94fe7988382c29 | 630 | py | Python | src-python/lab-service/traffexam/kilda/traffexam/__init__.py | mfyuce/open-kilda | 44f0580c028b8b56aa59536e62003bc416f07180 | [
"Apache-2.0"
] | 70 | 2017-10-10T12:59:21.000Z | 2022-03-16T13:19:34.000Z | src-python/lab-service/traffexam/kilda/traffexam/__init__.py | NandanBharadwaj/open-kilda | 912239cb958a78cc6927103f0aced3ff02ba9624 | [
"Apache-2.0"
] | 2,433 | 2017-10-09T08:22:14.000Z | 2022-03-31T07:57:24.000Z | src-python/lab-service/traffexam/kilda/traffexam/__init__.py | NandanBharadwaj/open-kilda | 912239cb958a78cc6927103f0aced3ff02ba9624 | [
"Apache-2.0"
] | 65 | 2017-10-09T07:53:37.000Z | 2022-03-16T12:35:18.000Z | # Copyright 2017 Telstra Open Source
#
# 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 agre... | 37.058824 | 76 | 0.736508 |
ff631ce940cf7e92d5c3b3917609d4a0d802feca | 4,757 | py | Python | bonneville/_compat.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/_compat.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/_compat.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
Salt compatibility code
'''
# pylint: disable=W0611
# Import python libs
import sys
import types
try:
import cPickle as pickle
except ImportError:
import pickle
# True if we are running on Python 3.
PY3 = sys.version_info[0] == 3
if PY3:
MAX_SIZE = sys.maxsize
else:
MAX_S... | 28.147929 | 80 | 0.670801 |
ff632605d5b26e6a1f2860060d4f3132bcebdc9f | 404,459 | py | Python | nova/virt/libvirt/driver.py | mariusleu/nova | b19e37cbfddfce0839dbeeb0d556ed1ffae664ad | [
"Apache-2.0"
] | null | null | null | nova/virt/libvirt/driver.py | mariusleu/nova | b19e37cbfddfce0839dbeeb0d556ed1ffae664ad | [
"Apache-2.0"
] | null | null | null | nova/virt/libvirt/driver.py | mariusleu/nova | b19e37cbfddfce0839dbeeb0d556ed1ffae664ad | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright (c) 2011 Piston Cloud Computing, Inc
# Copyright (c) 2012 University Of Minho
# (c) Copyright 2013 Hewlett-Pa... | 45.799909 | 79 | 0.584403 |
ff6333877358747325210a49e465fce4ccf5de39 | 4,991 | py | Python | market/tests/test_functional.py | DatalogiForAlle/MarketSim | 7b501f585cea2d19ca5b3f927065003480954298 | [
"MIT"
] | null | null | null | market/tests/test_functional.py | DatalogiForAlle/MarketSim | 7b501f585cea2d19ca5b3f927065003480954298 | [
"MIT"
] | 104 | 2021-06-01T08:10:38.000Z | 2021-09-07T11:30:19.000Z | market/tests/test_functional.py | DatalogiForAlle/MarketSim | 7b501f585cea2d19ca5b3f927065003480954298 | [
"MIT"
] | 1 | 2022-02-24T14:04:03.000Z | 2022-02-24T14:04:03.000Z | """
To run all tests:
$ make test
To run all tests in this file:
$ make test_functional
To run only one or some tests:
docker-compose -f docker-compose.dev.yml run web pytest -k <substring of test function names to run>
"""
from ..models import Market, Trader, Trade
from django.urls import reverse
from .factories im... | 32.409091 | 110 | 0.680425 |
ff635d5d6e944eb237c27ba8559d6b16deada42b | 2,736 | py | Python | data_transform.py | ilias1111/messenger-history | 8e3632553827e2ff627f3e3924c752c2c62d7645 | [
"MIT"
] | 1 | 2020-03-24T10:56:41.000Z | 2020-03-24T10:56:41.000Z | data_transform.py | ilias1111/messenger-history | 8e3632553827e2ff627f3e3924c752c2c62d7645 | [
"MIT"
] | 5 | 2020-03-31T11:22:30.000Z | 2022-03-12T00:17:49.000Z | data_transform.py | ilias1111/messenger-history | 8e3632553827e2ff627f3e3924c752c2c62d7645 | [
"MIT"
] | null | null | null | import os
import glob
import json
import help_functions
import re
import pandas as pd
import data_manipulation
def name_exporter(folder_loc):
"""Gives us the name of the chat participant
Parameters
----------
file_loc : str
The file location of the json
Returns
-------
name
... | 25.570093 | 112 | 0.604898 |
ff63644c40fa24041112dcaccb6a899eb580d95a | 7,654 | py | Python | conekt/models/expression/specificity.py | legumeinfo/CoNekT | 709a4980cfa255cafd456b268e274db2b4b1f5fb | [
"MIT"
] | 14 | 2018-08-20T03:07:21.000Z | 2021-11-04T11:15:31.000Z | conekt/models/expression/specificity.py | mutwil/CoNekT | f4a4496a87d14b15bcf587975b31a2edc24c6bf7 | [
"MIT"
] | 9 | 2018-07-17T15:30:47.000Z | 2021-07-05T13:11:54.000Z | conekt/models/expression/specificity.py | mutwil/CoNekT | f4a4496a87d14b15bcf587975b31a2edc24c6bf7 | [
"MIT"
] | 3 | 2019-08-05T09:16:34.000Z | 2019-12-04T23:59:28.000Z | import json
from statistics import mean
from conekt import db, whooshee
from conekt.models.expression.profiles import ExpressionProfile
from utils.entropy import entropy_from_values
from utils.expression import expression_specificity
from utils.tau import tau
@whooshee.register_model('description')
class ExpressionS... | 43.988506 | 164 | 0.62255 |
ff636c68a2ef34b0fa6a7d5feccbe9c98401488a | 2,524 | py | Python | managers/TableManager.py | briangmaddox/QGISSOLR | e98e98f89265b7d0b6b8a760f6233c990ce368c3 | [
"MIT"
] | null | null | null | managers/TableManager.py | briangmaddox/QGISSOLR | e98e98f89265b7d0b6b8a760f6233c990ce368c3 | [
"MIT"
] | null | null | null | managers/TableManager.py | briangmaddox/QGISSOLR | e98e98f89265b7d0b6b8a760f6233c990ce368c3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TableManager.py holds the class TableManager that handles grabbing the SOLR tables on startup
"""
import requests
import configparser
import os
from qgis.core import QgsMessageLog
class TableManager(object):
"""
Class to abstract handling with Tables. Uses the SOLR api to get the... | 31.949367 | 120 | 0.47504 |
ff63b15e838417c55be3ce1052d8b87e7adfafd3 | 3,015 | py | Python | jumpscale/tools/nginx/nginxserver.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | jumpscale/tools/nginx/nginxserver.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | jumpscale/tools/nginx/nginxserver.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | import re
import shutil
from jumpscale.loader import j
from jumpscale.core.base import Base, fields
class NginxServer(Base):
server_name = fields.String(default="main")
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.config_path = j.sals.fs.join_paths(j.core.dirs.C... | 33.131868 | 110 | 0.586733 |
ff63b221132e0bfe24903e00b54e62cb00e2058e | 5,653 | py | Python | research/deeplab/datasets/build_tooth_data.py | chrisfilippis/models | df98ff0011a009694e72000b12c9ee4b21d7b659 | [
"Apache-2.0"
] | null | null | null | research/deeplab/datasets/build_tooth_data.py | chrisfilippis/models | df98ff0011a009694e72000b12c9ee4b21d7b659 | [
"Apache-2.0"
] | null | null | null | research/deeplab/datasets/build_tooth_data.py | chrisfilippis/models | df98ff0011a009694e72000b12c9ee4b21d7b659 | [
"Apache-2.0"
] | null | null | null | # Lint as: python2, python3
# 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
#
#... | 34.469512 | 86 | 0.692553 |
ff63d05821ad0e23aae68decaf9797dd65e41b4c | 3,120 | py | Python | tests/common/test_run/ascend/im2col_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_run/ascend/im2col_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_run/ascend/im2col_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019-2021 Huawei Technologies Co., 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 applicable law or agre... | 41.6 | 115 | 0.641987 |
ff640a06713bc25f98370cd7cfa87efd73f98e5a | 6,184 | py | Python | pyspeckit/spectrum/models/n2hp.py | migueldvb/pyspeckit | fa7d875da7c684c8f6aaa3ba206ef3ff2e196652 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | pyspeckit/spectrum/models/n2hp.py | migueldvb/pyspeckit | fa7d875da7c684c8f6aaa3ba206ef3ff2e196652 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | pyspeckit/spectrum/models/n2hp.py | migueldvb/pyspeckit | fa7d875da7c684c8f6aaa3ba206ef3ff2e196652 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | """
===========
N2H+ fitter
===========
Reference for line params:
Daniel, F., Dubernet, M.-L., Meuwly, M., Cernicharo, J., Pagani, L. 2005, MNRAS 363, 1083
http://www.strw.leidenuniv.nl/~moldata/N2H+.html
http://adsabs.harvard.edu/abs/2005MNRAS.363.1083D
Does not yet implement: http://adsabs.harvard.edu/abs/2010Ap... | 30.613861 | 137 | 0.651682 |
ff644691436ec7e304ea367ed97032809810eaf6 | 555 | py | Python | Exercicios do curso em video/pythonProject/pythonexercicios/ex092.py | HiCosta/Exercicios-de-Python | 1dabbe8764f6742aba1d62a9ea14705534aaf6f7 | [
"MIT"
] | null | null | null | Exercicios do curso em video/pythonProject/pythonexercicios/ex092.py | HiCosta/Exercicios-de-Python | 1dabbe8764f6742aba1d62a9ea14705534aaf6f7 | [
"MIT"
] | null | null | null | Exercicios do curso em video/pythonProject/pythonexercicios/ex092.py | HiCosta/Exercicios-de-Python | 1dabbe8764f6742aba1d62a9ea14705534aaf6f7 | [
"MIT"
] | null | null | null | from datetime import datetime
dados = dict()
dados['nome'] = str(input('Nome: '))
nasc = int(input('Ano de nascimento: '))
dados['idade'] = datetime.now().year - nasc
dados['ctps'] = int(input('Cateira de trabalho (0 se não possui): '))
if dados['ctps'] != 0:
dados['contratacao'] = int(input('Ano de contratação: ')... | 39.642857 | 97 | 0.616216 |
ff6456290d51e2183a914845c4ecf88270d5c949 | 50 | py | Python | esst/mission/__init__.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 4 | 2018-06-24T14:03:44.000Z | 2019-01-21T01:20:02.000Z | esst/mission/__init__.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 106 | 2018-06-24T13:59:52.000Z | 2019-11-26T09:05:14.000Z | esst/mission/__init__.py | theendsofinvention/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Manages available missions
"""
| 10 | 26 | 0.68 |
ff64a903ca47b235bca6019a6cd7c3557edef42a | 53,971 | py | Python | scipy/signal/windows.py | bewithaman/scipy | 9eea599120903c9f88fb16ba6b39af77cf7d70e5 | [
"BSD-3-Clause"
] | null | null | null | scipy/signal/windows.py | bewithaman/scipy | 9eea599120903c9f88fb16ba6b39af77cf7d70e5 | [
"BSD-3-Clause"
] | null | null | null | scipy/signal/windows.py | bewithaman/scipy | 9eea599120903c9f88fb16ba6b39af77cf7d70e5 | [
"BSD-3-Clause"
] | null | null | null | """The suite of window functions."""
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from scipy import special, linalg
from scipy.fftpack import fft
from scipy._lib.six import string_types
__all__ = ['boxcar', 'triang', 'parzen', 'bohman', 'blackman', 'nuttall',
... | 31.822524 | 81 | 0.578626 |
ff64aad28b4be828a7280d821c244ba3b11c6073 | 1,637 | py | Python | workflows/api/permissions.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | 4 | 2017-12-13T10:59:42.000Z | 2019-11-03T17:26:19.000Z | workflows/api/permissions.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | 21 | 2017-04-05T08:03:54.000Z | 2022-03-11T23:16:03.000Z | workflows/api/permissions.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | null | null | null | from rest_framework import permissions
from workflows.models import *
class IsAdminOrSelf(permissions.BasePermission):
def has_permission(self, request, view):
if request.user and request.user.is_authenticated():
# Don't allow adding widgets to workflows not owned by the user
if v... | 40.925 | 75 | 0.596823 |
ff64bb59b460b0cdf0f109dac57e797cdbbace77 | 10,038 | py | Python | physipy/quantity/dimension.py | mocquin/physipy | a44805dbf4e68544c987e07564dd4a8d50be8b4c | [
"MIT"
] | 5 | 2021-01-23T11:23:07.000Z | 2022-02-28T15:38:58.000Z | physipy/quantity/dimension.py | mocquin/physipy | a44805dbf4e68544c987e07564dd4a8d50be8b4c | [
"MIT"
] | null | null | null | physipy/quantity/dimension.py | mocquin/physipy | a44805dbf4e68544c987e07564dd4a8d50be8b4c | [
"MIT"
] | 2 | 2020-11-07T20:08:08.000Z | 2021-06-09T02:58:04.000Z | # !/usr/bin/env python
# -*- coding: utf-8 -*-
"""allows manipulating physical Dimension objects.
PROPOSITIONS:
* method to return a latex-formated str ?
* change the str/repr style to a table-view of the dimension content ?
* should sr be just a unit with dimension rad**2 ?
* add a full-named repr ? (ex: "length... | 38.45977 | 125 | 0.595138 |
ff64e480b7e295aaf32eb2ad2314d9a1e8a72ed9 | 254 | py | Python | active_directory/datadog_checks/active_directory/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | active_directory/datadog_checks/active_directory/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | active_directory/datadog_checks/active_directory/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:45:42.000Z | 2018-08-15T05:45:42.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .__about__ import __version__
from .active_directory import ActiveDirectoryCheck
__all__ = [
'__version__',
'ActiveDirectoryCheck'
]
| 23.090909 | 59 | 0.755906 |
ff6519a36e4298d202bcd21f2da943e08d313f13 | 8,656 | py | Python | sqlalchemy_serializer/serializer.py | sergyp/SQLAlchemy-serializer | fc3d76e1014ea35e763789dfe5cd26248c14be39 | [
"MIT"
] | 2 | 2019-08-01T12:15:10.000Z | 2019-08-01T12:15:13.000Z | sqlalchemy_serializer/serializer.py | sergyp/SQLAlchemy-serializer | fc3d76e1014ea35e763789dfe5cd26248c14be39 | [
"MIT"
] | null | null | null | sqlalchemy_serializer/serializer.py | sergyp/SQLAlchemy-serializer | fc3d76e1014ea35e763789dfe5cd26248c14be39 | [
"MIT"
] | null | null | null | from datetime import datetime, date, time
from decimal import Decimal
from enum import Enum
import logging
import inspect
from collections import Iterable
from types import MethodType
from sqlalchemy import inspect as sql_inspect
from .lib.utils import get_type
from .lib.timezones import to_local_time, format_dt
fro... | 32.298507 | 111 | 0.60201 |
ff653044cfadb8feda6dcdbb2c49f5c1ca6668ac | 1,468 | py | Python | algorithms/graphs/roads_and_libs/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | algorithms/graphs/roads_and_libs/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | algorithms/graphs/roads_and_libs/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | from typing import List
def roads_and_libraries(n: int, c_lib: int, c_road: int, cities: List[List[int]]) -> int:
"""
@param n: number of cities
@param c_lib: cost to build a library
@param c_road: cost to build a road
@param cities: 2D array denoting cities and their neighbours
@return: mini... | 30.583333 | 106 | 0.587875 |
ff65350f95423407b4fd3478eb77af9e90c4705f | 7,217 | py | Python | OpenModal/analysis/lsce.py | MonashSmartStructures/OpenModal | a76a258c420954eab4a8b4ef37b487616c9f6c62 | [
"CNRI-Python"
] | 85 | 2016-12-04T10:34:08.000Z | 2022-03-26T18:03:47.000Z | OpenModal/analysis/lsce.py | MonashSmartStructures/OpenModal | a76a258c420954eab4a8b4ef37b487616c9f6c62 | [
"CNRI-Python"
] | 55 | 2016-12-02T15:01:15.000Z | 2022-01-07T11:10:26.000Z | OpenModal/analysis/lsce.py | gusshmn/OpenModal | a76a258c420954eab4a8b4ef37b487616c9f6c62 | [
"CNRI-Python"
] | 51 | 2016-12-30T16:33:36.000Z | 2021-11-13T11:05:34.000Z |
# Copyright (C) 2014-2017 Matjaž Mršnik, Miha Pirnat, Janko Slavič, Blaž Starc (in alphabetic order)
#
# This file is part of OpenModal.
#
# OpenModal 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, version... | 39.437158 | 113 | 0.609949 |
ff6536c0eab6433d0e08cd92e7fc969e928ebebb | 1,479 | py | Python | scraper/games.py | kaushalpurohit/rango | 9d4612df0ddfc250fb499fc0c8acf6fcf910b2e9 | [
"MIT"
] | 19 | 2021-07-02T05:49:29.000Z | 2021-12-17T06:13:17.000Z | scraper/games.py | kaushalpurohit/rango | 9d4612df0ddfc250fb499fc0c8acf6fcf910b2e9 | [
"MIT"
] | null | null | null | scraper/games.py | kaushalpurohit/rango | 9d4612df0ddfc250fb499fc0c8acf6fcf910b2e9 | [
"MIT"
] | 3 | 2021-11-20T14:16:33.000Z | 2021-12-03T16:41:25.000Z | """fitgirlrepacks scraping functions."""
import requests
from bs4 import BeautifulSoup
headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4)\
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 \
Safari/537.36"}
def search_games(chatid, search, obj):
""... | 32.152174 | 76 | 0.627451 |
ff653aff92c11331c97444395ea15deab6615fb8 | 4,517 | py | Python | services/lambda-pr-status-labeler/pr_status_bot/test_mock.py | mseth10/incubator-mxnet-ci | 36a5050b9c7bd720a4aa87d225738400083d611d | [
"Apache-2.0"
] | 10 | 2019-08-19T17:12:52.000Z | 2021-11-07T21:25:32.000Z | services/lambda-pr-status-labeler/pr_status_bot/test_mock.py | mseth10/incubator-mxnet-ci | 36a5050b9c7bd720a4aa87d225738400083d611d | [
"Apache-2.0"
] | 16 | 2019-10-22T17:07:40.000Z | 2022-02-08T23:33:27.000Z | services/lambda-pr-status-labeler/pr_status_bot/test_mock.py | mseth10/incubator-mxnet-ci | 36a5050b9c7bd720a4aa87d225738400083d611d | [
"Apache-2.0"
] | 15 | 2019-08-25T18:44:54.000Z | 2021-11-07T21:25:25.000Z | #!/usr/bin/env python3
# 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
# "... | 38.939655 | 258 | 0.702679 |
ff65690c17173c30a45fbf2482d8e505782c03c6 | 5,708 | py | Python | tests/test_ext.py | wtsi-hgi/cwltool | 6d3e9f0b0f2c4fb78b76eb4270451f29515322f3 | [
"Apache-2.0"
] | 2 | 2017-07-06T13:25:23.000Z | 2017-07-06T13:26:15.000Z | tests/test_ext.py | igormusinov/cwl_parser_python3 | 5b2cd24496c424fbe0923d6b1f715076fab1ca4c | [
"Apache-2.0"
] | 1 | 2018-05-10T06:45:21.000Z | 2018-05-10T06:45:21.000Z | tests/test_ext.py | wtsi-hgi/cwltool | 6d3e9f0b0f2c4fb78b76eb4270451f29515322f3 | [
"Apache-2.0"
] | null | null | null | import os
import shutil
import tempfile
import unittest
import cwltool.expression as expr
import cwltool.factory
import cwltool.pathmapper
import cwltool.process
import cwltool.workflow
from cwltool.main import main
from .util import get_data
class TestListing(unittest.TestCase):
def test_missing_enable_ext(sel... | 39.638889 | 170 | 0.579537 |
ff6579df69b0d68415e0bc8c84a6abfe6c5c9829 | 863 | py | Python | recursion/double_power.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | recursion/double_power.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | recursion/double_power.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null |
# ipow can be negative or positive.
def pow(num, ipow):
if ipow == 0:
return float(1)
elif ipow > 0:
return (1 * num) * (pow(num, ipow - 1))
elif ipow < 0:
return round((1 / num) * pow(num, ipow + 1), 9)
# faster solution, with memoization
def _pow_mem(num, ipow, cache):
if ipo... | 25.382353 | 92 | 0.555041 |
ff6585cd25d2da5731cbc9c9fa111f5564dc53cd | 4,967 | py | Python | chrome/common/extensions/docs/server2/preview.py | leiferikb/bitpop-private | 4c967307d228e86f07f2576068a169e846c833ca | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5 | 2018-03-10T13:08:42.000Z | 2021-07-26T15:02:11.000Z | chrome/common/extensions/docs/server2/preview.py | sanyaade-mobiledev/chromium.src | d496dfeebb0f282468827654c2b3769b3378c087 | [
"BSD-3-Clause"
] | 1 | 2015-07-21T08:02:01.000Z | 2015-07-21T08:02:01.000Z | chrome/common/extensions/docs/server2/preview.py | jianglong0156/chromium.src | d496dfeebb0f282468827654c2b3769b3378c087 | [
"BSD-3-Clause"
] | 6 | 2016-11-14T10:13:35.000Z | 2021-01-23T15:29:53.000Z | #!/usr/bin/env python
# Copyright (c) 2012 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.
# This helps you preview the apps and extensions docs.
#
# ./preview.py --help
#
# There are two modes: server- and render- mode... | 33.113333 | 80 | 0.691766 |
ff65a80e7e3781aface5925dedc56b7781ffdc1d | 844 | py | Python | setup.py | ecarrara/raster2tiles | d7189cbfe5d14547b7a489153343a85556119036 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ecarrara/raster2tiles | d7189cbfe5d14547b7a489153343a85556119036 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ecarrara/raster2tiles | d7189cbfe5d14547b7a489153343a85556119036 | [
"BSD-3-Clause"
] | 1 | 2019-10-23T17:29:53.000Z | 2019-10-23T17:29:53.000Z | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from codecs import open
from os import path
__version__ = '0.0.3'
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f:
all_reqs = f.read().split('\n')
install_requires = [x.strip() ... | 25.575758 | 70 | 0.671801 |
ff65bb59697ef6d16eeff1ec3b27c9311efb554a | 7,664 | py | Python | bcbio/upload/__init__.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | 1 | 2015-04-08T17:43:39.000Z | 2015-04-08T17:43:39.000Z | bcbio/upload/__init__.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | null | null | null | bcbio/upload/__init__.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | null | null | null | """Handle extraction of final files from processing pipelines into storage.
"""
import datetime
import os
from bcbio import utils
from bcbio.upload import shared, filesystem, galaxy, s3
from bcbio.galaxy import nglims
_approaches = {"filesystem": filesystem,
"galaxy": galaxy,
"s3": s3}
... | 37.568627 | 91 | 0.558325 |
ff65c3157da1895d833bf1220ee2646c6bf980a4 | 1,665 | py | Python | keen/tests/scoped_key_tests.py | ferpection/KeenClient-Python | d54fb6dbea78769fe781169a58931786a4294d77 | [
"MIT"
] | 85 | 2015-01-06T14:04:34.000Z | 2021-11-22T19:10:50.000Z | keen/tests/scoped_key_tests.py | ferpection/KeenClient-Python | d54fb6dbea78769fe781169a58931786a4294d77 | [
"MIT"
] | 115 | 2015-01-11T19:11:42.000Z | 2021-05-12T07:36:00.000Z | keen/tests/scoped_key_tests.py | ferpection/KeenClient-Python | d54fb6dbea78769fe781169a58931786a4294d77 | [
"MIT"
] | 61 | 2015-01-13T23:37:40.000Z | 2021-09-18T21:08:23.000Z | from keen import scoped_keys
from keen.tests.base_test_case import BaseTestCase
class ScopedKeyTests(BaseTestCase):
api_key = "24077ACBCB198BAAA2110EDDB673282F8E34909FD823A15C55A6253A664BE368"
bad_api_key = "24077ACBCB198BAAA2110EDDB673282F8E34909FD823A15C55A6253A664BE369"
old_api_key = "ab428324dbdbcfe74... | 38.72093 | 84 | 0.699099 |
ff65c4a3d06259fd0c4339cd41a5bbea46edf650 | 4,213 | py | Python | sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/__init__.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 ... | 31.916667 | 94 | 0.758842 |
ff65dd8ecc3754b57749ed22f3c0d4f5a5a6fece | 17,989 | py | Python | tests/backend/localmongodb/test_queries.py | liviu-lesan/planetmint | 54cf8e45108947aa8282ddaaf127d08e06ce842e | [
"Apache-2.0"
] | null | null | null | tests/backend/localmongodb/test_queries.py | liviu-lesan/planetmint | 54cf8e45108947aa8282ddaaf127d08e06ce842e | [
"Apache-2.0"
] | null | null | null | tests/backend/localmongodb/test_queries.py | liviu-lesan/planetmint | 54cf8e45108947aa8282ddaaf127d08e06ce842e | [
"Apache-2.0"
] | null | null | null | # # Copyright © 2020 Interplanetary Database Association e.V.,
# # Planetmint and IPDB software contributors.
# # SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# # Code is Apache-2.0 and docs are CC-BY-4.0
# from copy import deepcopy
# import pytest
# import pymongo
# from planetmint.backend import Connection,... | 36.938398 | 105 | 0.588526 |
ff660219ed07df99a3766d4d032cdc64ec917cae | 20,261 | py | Python | api_server/api_server.py | aperauch/VMC-on-AWS-App-Portal | 6c073e0453fadf6888fa37ce4d859a9954cf3bf2 | [
"Apache-2.0"
] | null | null | null | api_server/api_server.py | aperauch/VMC-on-AWS-App-Portal | 6c073e0453fadf6888fa37ce4d859a9954cf3bf2 | [
"Apache-2.0"
] | null | null | null | api_server/api_server.py | aperauch/VMC-on-AWS-App-Portal | 6c073e0453fadf6888fa37ce4d859a9954cf3bf2 | [
"Apache-2.0"
] | null | null | null | import logging, sys, os, ldap, time, yaml
from ns1 import NS1, Config
from ns1.rest.errors import ResourceException, RateLimitException, AuthException
from flask import Flask, json, g, request, make_response, jsonify
from flask.logging import create_logger
from flask_cors import CORS, cross_origin
from flask_jwt import... | 40.603206 | 162 | 0.658704 |
ff66063b30d732ac6a65e1b7375d1cdf6fbb306a | 2,799 | py | Python | plotting_tools/latexify.py | MIT-SPARK/spark_vio_evaluation | 8f747065f8a76c5628d5402eba90fd79ee438e58 | [
"MIT"
] | 15 | 2020-02-20T09:12:36.000Z | 2022-03-31T23:52:00.000Z | plotting_tools/latexify.py | MIT-SPARK/spark_vio_evaluation | 8f747065f8a76c5628d5402eba90fd79ee438e58 | [
"MIT"
] | 17 | 2020-02-20T22:01:27.000Z | 2021-04-27T14:17:43.000Z | plotting_tools/latexify.py | ToniRV/spark_vio_evaluation | 9c6826e150f25c2696fe4013537982eca68310e5 | [
"MIT"
] | 6 | 2019-09-21T20:57:35.000Z | 2021-01-11T15:40:53.000Z | #!/usr/bin/env python
# EXAMPLE TAKEN FROM: https://nipunbatra.github.io/blog/2014/latexify.html
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import matplotlib
from math import sqrt
def latexify(fig_width=None, fig_height=None, columns=1):
"""Set up matplotlib's RC params for LaTeX plotti... | 34.9875 | 82 | 0.633798 |
ff665a3e86c6f7caa63b6317a652c52309c423fb | 1,974 | py | Python | bookworm/document/features.py | mush42/bookworm | a4bdd89363137a89a1bed1e9e072de4fb55576fd | [
"MIT"
] | 18 | 2019-07-19T22:12:15.000Z | 2020-08-26T17:45:19.000Z | bookworm/document/features.py | mush42/bookworm | a4bdd89363137a89a1bed1e9e072de4fb55576fd | [
"MIT"
] | 44 | 2019-07-15T10:17:00.000Z | 2020-07-26T11:22:53.000Z | bookworm/document/features.py | mush42/bookworm | a4bdd89363137a89a1bed1e9e072de4fb55576fd | [
"MIT"
] | 9 | 2019-09-03T13:13:31.000Z | 2020-08-25T13:55:27.000Z | # coding: utf-8
"""Provides the definition for different features related to documents."""
from enum import IntEnum, IntFlag, auto
class DocumentCapability(IntFlag):
"""Represents feature flags for a document."""
NULL_CAPABILITY = auto()
"""Placeholder for abstract classes."""
ASYNC_READ = auto()
... | 32.360656 | 76 | 0.687437 |
ff66808a64583d9bf678eff8a9c507a4109b59e9 | 18,550 | py | Python | alyeska/compose/__init__.py | Dynatrace/alyeska | a1e08e105e9c7ae7f10852363f2e5dca5db9be0c | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-09-11T11:24:19.000Z | 2019-10-01T15:25:04.000Z | alyeska/compose/__init__.py | Dynatrace/alyeska | a1e08e105e9c7ae7f10852363f2e5dca5db9be0c | [
"ECL-2.0",
"Apache-2.0"
] | 25 | 2019-09-11T12:12:12.000Z | 2019-10-10T10:38:22.000Z | alyeska/compose/__init__.py | Dynatrace/alyeska | a1e08e105e9c7ae7f10852363f2e5dca5db9be0c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
## ---------------------------------------------------------------------------
## Copyright 2019 Dynatrace 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
##
#... | 32.373473 | 88 | 0.555526 |
ff668c4a128bdc140f40dedee8e505bb064f4c00 | 3,851 | py | Python | dash_echarts/examples/hist_bar.py | Covarians/dash-echarts | 0d6cfc010ea7bb91a6e0d94764dc42241dbad136 | [
"Apache-2.0"
] | 28 | 2021-04-15T16:02:57.000Z | 2022-03-30T07:43:50.000Z | dash_echarts/examples/hist_bar.py | Covarians/dash-echarts | 0d6cfc010ea7bb91a6e0d94764dc42241dbad136 | [
"Apache-2.0"
] | 8 | 2021-06-23T19:49:18.000Z | 2022-03-02T16:04:42.000Z | dash_echarts/examples/hist_bar.py | Covarians/dash-echarts | 0d6cfc010ea7bb91a6e0d94764dc42241dbad136 | [
"Apache-2.0"
] | 8 | 2021-09-16T07:38:41.000Z | 2022-03-09T04:59:11.000Z | import dash_echarts
import dash, random
from dash.dependencies import Input, Output
import dash_html_components as html
import dash_core_components as dcc
from dash.exceptions import PreventUpdate
def gen_data():
return [[random.uniform(0,30), random.randint(0,300)] for i in range(32)]
def main():
'''
d... | 25.673333 | 77 | 0.348741 |
ff66ccd3438ac9df6b8451c21a4ea422fe59fe6a | 6,360 | py | Python | tests/algorithms/algorithm_settings.py | coryMosaicML/composer | 16622c9457874f4f3811287fe933b0ec58107fc7 | [
"Apache-2.0"
] | null | null | null | tests/algorithms/algorithm_settings.py | coryMosaicML/composer | 16622c9457874f4f3811287fe933b0ec58107fc7 | [
"Apache-2.0"
] | null | null | null | tests/algorithms/algorithm_settings.py | coryMosaicML/composer | 16622c9457874f4f3811287fe933b0ec58107fc7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 MosaicML Composer authors
# SPDX-License-Identifier: Apache-2.0
"""This file provides the canonical settings (dataset, model, algorithms, arguments)
for each algorithm to be tested. This can be used throughout the codebase for
functional tests, serialization tests, etc.
Each algorithm is keyed based ... | 32.121212 | 117 | 0.627673 |
ff66d1f8f4b9bfc4c34909c1624a0b4af1c71f09 | 1,813 | py | Python | attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/testcases/dynamic_loadings_test.py | Agriad/devops-course | 380aa43fa69efd71992933f013fb11a96ce16a74 | [
"MIT"
] | null | null | null | attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/testcases/dynamic_loadings_test.py | Agriad/devops-course | 380aa43fa69efd71992933f013fb11a96ce16a74 | [
"MIT"
] | 51 | 2021-04-08T11:39:59.000Z | 2021-05-07T12:01:27.000Z | attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/testcases/dynamic_loadings_test.py | Agriad/devops-course | 380aa43fa69efd71992933f013fb11a96ce16a74 | [
"MIT"
] | null | null | null | """
@author: Anuj Kumar
@email: cdac.anuj@gmail.com
@date: 17-May-18
"""
from pages.dynamic_loading_page import DynamicLoadingPage
from pages.welcome_page import WelcomePage
from utility.drivermanager import DriverManagerFirefox, DriverManagerChrome
from nose.plugins.attrib import attr
@attr(group=['kth'])
class Dyna... | 38.574468 | 75 | 0.766685 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.