hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794365115aa04eb4c09cbffc450febfcb142bb99 | 343 | py | Python | src/AppiumLibrary/utils/__init__.py | ddavvID/robotframework-appiumlibrary | 9635645c3349624716ebddb3afc158b7219167cd | [
"Apache-2.0"
] | null | null | null | src/AppiumLibrary/utils/__init__.py | ddavvID/robotframework-appiumlibrary | 9635645c3349624716ebddb3afc158b7219167cd | [
"Apache-2.0"
] | null | null | null | src/AppiumLibrary/utils/__init__.py | ddavvID/robotframework-appiumlibrary | 9635645c3349624716ebddb3afc158b7219167cd | [
"Apache-2.0"
] | null | null | null | from .applicationcache import ApplicationCache
def escape_xpath_value(value):
value = unicode(value)
if '"' in value and '\'' in value:
parts_wo_apos = value.split('\'')
return "concat('%s')" % "', \"'\", '".join(parts_wo_apos)
if '\'' in value:
return "\"%s\"" % value
... | 31.181818 | 66 | 0.553936 |
7943655df1849f689805b87850caf20fa8429c35 | 712 | py | Python | dax/__init__.py | onealbao/LDax | b3f33c68185d970eb340bed49dfc18889b180645 | [
"MIT"
] | null | null | null | dax/__init__.py | onealbao/LDax | b3f33c68185d970eb340bed49dfc18889b180645 | [
"MIT"
] | 13 | 2020-06-11T20:56:24.000Z | 2022-03-12T00:37:02.000Z | dax/__init__.py | onealbao/LDax | b3f33c68185d970eb340bed49dfc18889b180645 | [
"MIT"
] | 1 | 2018-09-14T15:52:35.000Z | 2018-09-14T15:52:35.000Z | # -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
from __future__ import absolute_import
from . import bin
from . import dax_tools_utils
from . import log
from . import xnat_tools_utils
from . import XnatUtils
from .task import T... | 32.363636 | 73 | 0.79073 |
794365e35c56303005d5fe80bf841130b470ccfb | 5,568 | py | Python | pcdet/models/dense_heads/point_intra_part_head.py | Gltina/OpenPCDet | e32dc7f8f903a3f0e1c93effc68d74dbe16766e2 | [
"Apache-2.0"
] | 1,984 | 2020-07-01T05:13:02.000Z | 2022-03-31T20:34:00.000Z | pcdet/models/dense_heads/point_intra_part_head.py | Gltina/OpenPCDet | e32dc7f8f903a3f0e1c93effc68d74dbe16766e2 | [
"Apache-2.0"
] | 748 | 2020-07-01T07:04:58.000Z | 2022-03-31T07:38:51.000Z | pcdet/models/dense_heads/point_intra_part_head.py | Gltina/OpenPCDet | e32dc7f8f903a3f0e1c93effc68d74dbe16766e2 | [
"Apache-2.0"
] | 764 | 2020-07-01T12:19:13.000Z | 2022-03-31T11:19:17.000Z | import torch
from ...utils import box_coder_utils, box_utils
from .point_head_template import PointHeadTemplate
class PointIntraPartOffsetHead(PointHeadTemplate):
"""
Point-based head for predicting the intra-object part locations.
Reference Paper: https://arxiv.org/abs/1907.03670
From Points to Part... | 43.5 | 107 | 0.626976 |
794366031d29ab7a2d8b00c5d7a5dfb71d311ff0 | 3,436 | py | Python | HSTB/kluster/dms.py | giumas/kluster | 40abd266551a56b693132a7cb12471601f5a02b4 | [
"CC0-1.0"
] | 18 | 2020-11-01T19:59:33.000Z | 2022-03-31T22:46:48.000Z | HSTB/kluster/dms.py | giumas/kluster | 40abd266551a56b693132a7cb12471601f5a02b4 | [
"CC0-1.0"
] | 46 | 2020-10-23T13:55:24.000Z | 2022-03-31T15:58:26.000Z | HSTB/kluster/dms.py | giumas/kluster | 40abd266551a56b693132a7cb12471601f5a02b4 | [
"CC0-1.0"
] | 9 | 2021-03-18T22:28:26.000Z | 2022-02-23T21:48:09.000Z | import re
import numpy as np
def dms2dd(d: float, m: float, s: float):
"""
convert between deg-min-sec and decimal degrees
Parameters
----------
d
degrees
m
minutes
s
seconds
Returns
-------
float
decimal degrees
"""
sign = 1
try:
... | 24.197183 | 119 | 0.562573 |
7943677c73c476ae1a7ddf1ee604277dd5599bcb | 3,624 | py | Python | salt/utils/mako.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 2 | 2017-09-17T21:10:35.000Z | 2019-08-26T03:00:12.000Z | salt/utils/mako.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/utils/mako.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 3 | 2021-02-23T08:12:48.000Z | 2021-02-23T08:13:13.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
# Import python libs
import os
import urlparse
# Import third party libs
from mako.lookup import TemplateCollection, TemplateLookup
# Import salt libs
import salt.fileclient
class SaltMakoTemplateLookup(TemplateCollection):
"""
Look up Mako tem... | 37.75 | 99 | 0.549945 |
794367a83c37690f7bbe9302d7372524b47a0be3 | 425 | py | Python | WEEKS/CD_Sata-Structures/_MISC/misc-examples/lookup.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/misc-examples/lookup.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/misc-examples/lookup.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | import math
# Inverse Square Root is 1 over the square root of a number (1 / sqrt(n))
inv_sqrt = {}
def build_table(n):
for i in range(1, n):
global inv_sqrt
inv_sqrt[i] = 1 / math.sqrt(i)
print("Building Table")
build_table(1000000)
print("Done Building")
print(inv_sqrt[30000])
print(inv_... | 15.740741 | 73 | 0.687059 |
794367bc65a9cfd8eec7cf6db37397cb60266b87 | 19,263 | py | Python | lib/perf_uploader.py | hustwei/chromite | 10eb79abeb64e859362546214b7e039096ac9830 | [
"BSD-3-Clause"
] | null | null | null | lib/perf_uploader.py | hustwei/chromite | 10eb79abeb64e859362546214b7e039096ac9830 | [
"BSD-3-Clause"
] | null | null | null | lib/perf_uploader.py | hustwei/chromite | 10eb79abeb64e859362546214b7e039096ac9830 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Uploads performance data to the performance dashboard.
The performance dashboard is owned by Chrome team and is available here:
https://chromeperf.app... | 38.836694 | 84 | 0.712713 |
79436840c2a6914408d5ecd48e477349eb37de44 | 2,367 | py | Python | vaccine_allocation/constant_hazard.py | COVID-IWG/epimargin-studies | 7d4a78e2e6713c6a0aea2cd2440529153e9a635d | [
"MIT"
] | null | null | null | vaccine_allocation/constant_hazard.py | COVID-IWG/epimargin-studies | 7d4a78e2e6713c6a0aea2cd2440529153e9a635d | [
"MIT"
] | null | null | null | vaccine_allocation/constant_hazard.py | COVID-IWG/epimargin-studies | 7d4a78e2e6713c6a0aea2cd2440529153e9a635d | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from studies.vaccine_allocation.commons import *
from tqdm import tqdm
May15 = 30 # days since April 15
simulation_initial_conditions = pd.read_csv(data/f"all_india_coalesced_initial_conditions{simulation_start.strftime('%b%d')}.csv")\
.drop(columns = ["Unnamed: 0"])\
.se... | 42.267857 | 154 | 0.662442 |
7943684ce59aafc1a6b4a946adad0e0c94f0e850 | 9,274 | py | Python | Codes/2DCNN/Models/UNet3P.py | Sakib1263/1D-2D-Segmentation-AutoEncoder-TF2-KERAS | bdeeed8913686d5141a5178bddc0137cce3f7212 | [
"MIT"
] | 1 | 2022-03-10T13:36:49.000Z | 2022-03-10T13:36:49.000Z | Codes/2DCNN/Models/UNet3P.py | Sakib1263/1D-2D-Segmentation-AutoEncoder-TF2-KERAS | bdeeed8913686d5141a5178bddc0137cce3f7212 | [
"MIT"
] | null | null | null | Codes/2DCNN/Models/UNet3P.py | Sakib1263/1D-2D-Segmentation-AutoEncoder-TF2-KERAS | bdeeed8913686d5141a5178bddc0137cce3f7212 | [
"MIT"
] | 2 | 2022-02-13T12:08:56.000Z | 2022-03-10T13:36:49.000Z | # Import Necessary Libraries
import numpy as np
import tensorflow as tf
def Conv_Block(inputs, model_width, kernel, multiplier):
# 2D Convolutional Block
x = tf.keras.layers.Conv2D(model_width * multiplier, kernel, padding='same')(inputs)
x = tf.keras.layers.BatchNormalization()(x)
x = tf.keras.layers... | 47.804124 | 162 | 0.660017 |
794368ca201a13a7ea89add820a3ec46ea3c0524 | 15,350 | py | Python | play/play_bagging_on_main.py | GavrilovMike/EnsembleLearning | 6badedf2b6e9f2d3b01c11246c32916864ad3848 | [
"MIT"
] | null | null | null | play/play_bagging_on_main.py | GavrilovMike/EnsembleLearning | 6badedf2b6e9f2d3b01c11246c32916864ad3848 | [
"MIT"
] | null | null | null | play/play_bagging_on_main.py | GavrilovMike/EnsembleLearning | 6badedf2b6e9f2d3b01c11246c32916864ad3848 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
https://github.com/oxwhirl/smac
"""
from smac.env import StarCraft2Env
import numpy as np
# import sys
import random
import pickle
# from gym.spaces import Discrete, Box, Dict
# Вывод массива целиком
np.set_printoptions(threshold=np.inf)
# определяем может ли агент сделать заданнное де... | 36.634845 | 129 | 0.549902 |
79436959148f0e0285d36b4e93e303c4f50a26d2 | 123 | py | Python | Day2/Q7.py | nkem1010/python-challenge-solutions | 203cedc691094a83b110fc75764aac51dbbc1a03 | [
"MIT"
] | 1 | 2020-05-24T21:53:59.000Z | 2020-05-24T21:53:59.000Z | Day2/Q7.py | nkem1010/python-challenge-solutions | 203cedc691094a83b110fc75764aac51dbbc1a03 | [
"MIT"
] | null | null | null | Day2/Q7.py | nkem1010/python-challenge-solutions | 203cedc691094a83b110fc75764aac51dbbc1a03 | [
"MIT"
] | null | null | null | file = input('Input name of file')
extension = file.split('.')
print('The extension of the file is :' + extension[-1])
| 30.75 | 57 | 0.650407 |
79436a2db622eac37a8a711cc3b784358db3b345 | 372 | py | Python | backend/mainshop/email.py | mbranko/webshop | b7c2ebb8720922f5277fee98fe826e54760b29d2 | [
"MIT"
] | null | null | null | backend/mainshop/email.py | mbranko/webshop | b7c2ebb8720922f5277fee98fe826e54760b29d2 | [
"MIT"
] | 5 | 2021-03-19T01:53:49.000Z | 2022-03-02T08:11:51.000Z | backend/mainshop/email.py | mbranko/webshop | b7c2ebb8720922f5277fee98fe826e54760b29d2 | [
"MIT"
] | null | null | null | ACTIVATE_ACCOUNT_TITLE = "Webshop Account Activation"
ACTIVATE_ACCOUNT_TEXT = """
Dear %s %s,
In order to complete registration of your account at the Webshop
please follow this link:
https://badasswebshop.com/activate/%s/
If you have not requested a Webshop account at our website
https://badasswebshop.com please ig... | 21.882353 | 64 | 0.782258 |
79436a6e24f6c9af2d3c2ad83f6201dd4e19cc97 | 15,924 | py | Python | pyquil/simulation/_reference.py | stjordanis/pyquil | 36987ecb78d5dc85d299dd62395b7669a1cedd5a | [
"Apache-2.0"
] | 677 | 2017-01-09T23:20:22.000Z | 2018-11-26T10:57:49.000Z | pyquil/simulation/_reference.py | stjordanis/pyquil | 36987ecb78d5dc85d299dd62395b7669a1cedd5a | [
"Apache-2.0"
] | 574 | 2018-11-28T05:38:40.000Z | 2022-03-23T20:38:28.000Z | pyquil/simulation/_reference.py | stjordanis/pyquil | 36987ecb78d5dc85d299dd62395b7669a1cedd5a | [
"Apache-2.0"
] | 202 | 2018-11-30T06:36:28.000Z | 2022-03-29T15:38:18.000Z | ##############################################################################
# Copyright 2016-2019 Rigetti Computing
#
# 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... | 43.98895 | 119 | 0.646822 |
79436b03a99bfdbf3a6fe58a16d67e8863aefd1f | 3,403 | py | Python | pypureclient/flasharray/FA_2_10/models/directory_policy_export_post.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_10/models/directory_policy_export_post.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_10/models/directory_policy_export_post.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.10
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from ... | 30.383929 | 212 | 0.570673 |
79436b2aab1c38baca65b992127fe364691ab9c9 | 2,379 | py | Python | pipeline/helper_components.py | younesslanda/MLops-on-GCP | 430a453389fc23e19bd6f7585e08fdce511b8920 | [
"Apache-2.0"
] | 1 | 2022-03-17T04:58:05.000Z | 2022-03-17T04:58:05.000Z | pipeline/helper_components.py | younesslanda/MLops-on-GCP | 430a453389fc23e19bd6f7585e08fdce511b8920 | [
"Apache-2.0"
] | null | null | null | pipeline/helper_components.py | younesslanda/MLops-on-GCP | 430a453389fc23e19bd6f7585e08fdce511b8920 | [
"Apache-2.0"
] | null | null | null | """Helper components."""
from googleapiclient import discovery
from googleapiclient import errors
#import joblib
import pickle
import json
import pandas as pd
import subprocess
import sys
from sklearn.metrics import accuracy_score, recall_score
from typing import NamedTuple
def retrieve_best_run(project_id: st... | 29.37037 | 145 | 0.649853 |
79436b95bc43ee6466e0336fb33e37e57a42086a | 1,246 | py | Python | coffea/nanoaod/methods/__init__.py | dnoonan08/coffea | fb52a8a31245c6f4cf5bbd13ea51cdda5262dfa0 | [
"BSD-3-Clause"
] | null | null | null | coffea/nanoaod/methods/__init__.py | dnoonan08/coffea | fb52a8a31245c6f4cf5bbd13ea51cdda5262dfa0 | [
"BSD-3-Clause"
] | null | null | null | coffea/nanoaod/methods/__init__.py | dnoonan08/coffea | fb52a8a31245c6f4cf5bbd13ea51cdda5262dfa0 | [
"BSD-3-Clause"
] | 1 | 2019-06-14T15:24:26.000Z | 2019-06-14T15:24:26.000Z | from .common import METVector, LorentzVector, Candidate
from .leptons import Electron, Muon, Photon, Tau
from .jets import Jet, FatJet
from .generator import GenParticle, GenVisTau
collection_methods = {
'CaloMET': METVector,
'ChsMET': METVector,
'GenMET': METVector,
'MET': METVector,
'METFixEE201... | 23.074074 | 55 | 0.631621 |
79436bd7814ecf9e1c295937509df98d8fbb09eb | 673 | py | Python | autobahn/wamp/gen/wamp/proto/Principal.py | andriyor/autobahn-python | 4b6d825bb308d695f440be6ebe5e713af85bf143 | [
"MIT"
] | null | null | null | autobahn/wamp/gen/wamp/proto/Principal.py | andriyor/autobahn-python | 4b6d825bb308d695f440be6ebe5e713af85bf143 | [
"MIT"
] | 3 | 2019-07-10T12:37:53.000Z | 2021-12-07T14:14:56.000Z | autobahn/wamp/gen/wamp/proto/Principal.py | andriyor/autobahn-python | 4b6d825bb308d695f440be6ebe5e713af85bf143 | [
"MIT"
] | 4 | 2019-03-01T14:57:06.000Z | 2022-01-06T16:31:10.000Z | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: proto
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class Principal(object):
__slots__ = ['_tab']
@classmethod
def SizeOf(cls):
return 8
# Principal
def Init(self, buf,... | 24.925926 | 148 | 0.720654 |
79436c5601928c492585143de43f0536374ffca4 | 6,594 | py | Python | GPro/validations.py | 1989Ryan/GPro | 368ac6b349f83287cc683b4d50b77036cc9deafa | [
"MIT"
] | null | null | null | GPro/validations.py | 1989Ryan/GPro | 368ac6b349f83287cc683b4d50b77036cc9deafa | [
"MIT"
] | null | null | null | GPro/validations.py | 1989Ryan/GPro | 368ac6b349f83287cc683b4d50b77036cc9deafa | [
"MIT"
] | null | null | null | import numpy as np
def assert_array(x):
"""Throw a TypeError if X is not array-like."""
if not (isinstance(x, np.ndarray) or isinstance(x, list)):
raise TypeError('Only lists and numpy arrays are supported.')
def convert_array(x):
"""Convert a list to a numpy array."""
if isinstance(x, list)... | 31.701923 | 78 | 0.624507 |
79436d3789fd6d745dd0555280cc906dec6a9158 | 33,175 | py | Python | sdk/lusid/models/resource_list_of_value_type.py | fossabot/lusid-sdk-python-preview | 2c95d870489d93dee921593877256d3869c090e6 | [
"MIT"
] | null | null | null | sdk/lusid/models/resource_list_of_value_type.py | fossabot/lusid-sdk-python-preview | 2c95d870489d93dee921593877256d3869c090e6 | [
"MIT"
] | null | null | null | sdk/lusid/models/resource_list_of_value_type.py | fossabot/lusid-sdk-python-preview | 2c95d870489d93dee921593877256d3869c090e6 | [
"MIT"
] | 1 | 2020-10-29T08:35:32.000Z | 2020-10-29T08:35:32.000Z | # coding: utf-8
"""
LUSID API
# Introduction This page documents the [LUSID APIs](https://www.lusid.com/api/swagger), which allows authorised clients to query and update their data within the LUSID platform. SDKs to interact with the LUSID APIs are available in the following languages : * [C#](https://gith... | 182.28022 | 28,439 | 0.682773 |
79436d4f640ec16220716633ea1d0436609e6fe0 | 75 | py | Python | wxwork_auth_oauth/__init__.py | rainbow-studio-solution/wxwork | 344a0a8f8f0ac364101a1bb4a98c132588118839 | [
"MulanPSL-1.0"
] | 9 | 2021-01-02T15:42:21.000Z | 2021-08-13T08:09:16.000Z | wxwork_auth_oauth/__init__.py | rainbow-studio-solution/wxwork | 344a0a8f8f0ac364101a1bb4a98c132588118839 | [
"MulanPSL-1.0"
] | null | null | null | wxwork_auth_oauth/__init__.py | rainbow-studio-solution/wxwork | 344a0a8f8f0ac364101a1bb4a98c132588118839 | [
"MulanPSL-1.0"
] | 4 | 2021-01-11T04:57:07.000Z | 2021-05-21T06:01:55.000Z | # -*- coding: utf-8 -*-
from . import models
from . import controllers
| 9.375 | 25 | 0.626667 |
79436e4e5ba1681caa1cf71e2a9788db7e877c95 | 4,303 | py | Python | cyder/management/commands/lib/dhcpd_compare/parser.py | drkitty/cyder | 1babc443cc03aa51fa3c1015bcd22f0ea2e5f0f8 | [
"BSD-3-Clause"
] | 6 | 2015-04-16T23:18:22.000Z | 2020-08-25T22:50:13.000Z | cyder/management/commands/lib/dhcpd_compare/parser.py | drkitty/cyder | 1babc443cc03aa51fa3c1015bcd22f0ea2e5f0f8 | [
"BSD-3-Clause"
] | 267 | 2015-01-01T00:18:57.000Z | 2015-10-14T00:01:13.000Z | cyder/management/commands/lib/dhcpd_compare/parser.py | drkitty/cyder | 1babc443cc03aa51fa3c1015bcd22f0ea2e5f0f8 | [
"BSD-3-Clause"
] | 5 | 2015-03-23T00:57:09.000Z | 2019-09-09T22:42:37.000Z | from parsley import wrapGrammar
from ometa.grammar import OMeta
from ometa.runtime import OMetaBase
from constants import *
from dhcp_objects import (Host, Pool, Parameter, Option, Subnet, Group, Allow,
Deny, ClientClass)
from utils import prepare_arguments, is_mac, is_ip
import sys
from bisec... | 34.150794 | 86 | 0.585638 |
79436e5fe9692a0fba7726d128aa89f8245fb76b | 610 | py | Python | tests/nlp/encoders/test_label_encoder.py | ChristophAlt/pytorch-quasar | 7b957b1b4cba83677b415d752dcac6acf682f15b | [
"BSD-3-Clause"
] | 4 | 2018-10-02T20:20:26.000Z | 2019-07-26T12:57:26.000Z | tests/nlp/encoders/test_label_encoder.py | ChristophAlt/pytorch-quasar | 7b957b1b4cba83677b415d752dcac6acf682f15b | [
"BSD-3-Clause"
] | null | null | null | tests/nlp/encoders/test_label_encoder.py | ChristophAlt/pytorch-quasar | 7b957b1b4cba83677b415d752dcac6acf682f15b | [
"BSD-3-Clause"
] | null | null | null | from quasar.nlp.encoders import LabelEncoder
def test_label_encoder():
input_ = 'label_b'
sample = ['label_a', 'label_b']
encoder = LabelEncoder(sample)
output = encoder.encode(input_)
assert encoder.vocab_size == 2
assert len(output) == 1
assert encoder.decode(output) == input_
def tes... | 25.416667 | 46 | 0.67541 |
79436f2d2db70c9225f587c4836538dc75ce15b2 | 15,129 | py | Python | webapp/ENV/lib/python3.6/site-packages/dask/dataframe/io/hdf.py | linkehub/linkehub_api | b5579a6156d6ae01f0cbd8526c8ed8264b5deeb5 | [
"MIT"
] | null | null | null | webapp/ENV/lib/python3.6/site-packages/dask/dataframe/io/hdf.py | linkehub/linkehub_api | b5579a6156d6ae01f0cbd8526c8ed8264b5deeb5 | [
"MIT"
] | 1 | 2021-04-30T20:41:53.000Z | 2021-04-30T20:41:53.000Z | webapp/ENV/lib/python3.6/site-packages/dask/dataframe/io/hdf.py | linkehub/linkehub_api | b5579a6156d6ae01f0cbd8526c8ed8264b5deeb5 | [
"MIT"
] | 1 | 2018-07-06T03:48:08.000Z | 2018-07-06T03:48:08.000Z | from __future__ import absolute_import, division, print_function
from fnmatch import fnmatch
from glob import glob
import os
import uuid
from warnings import warn
import pandas as pd
from toolz import merge
from .io import _link
from ..core import DataFrame, new_dd_object
from ... import multiprocessing
from ...base... | 35.850711 | 95 | 0.603609 |
79436f4cb36dbb6d556879c6278c8c5c8da6d81b | 14,469 | py | Python | fomautomator.py | johnmgregoire/2013JCAPDataProcess | 4533e72b09084860b3753d8864c75ac3c6b66b1a | [
"BSD-3-Clause"
] | 1 | 2018-06-03T01:15:16.000Z | 2018-06-03T01:15:16.000Z | fomautomator.py | johnmgregoire/2013JCAPDataProcess | 4533e72b09084860b3753d8864c75ac3c6b66b1a | [
"BSD-3-Clause"
] | null | null | null | fomautomator.py | johnmgregoire/2013JCAPDataProcess | 4533e72b09084860b3753d8864c75ac3c6b66b1a | [
"BSD-3-Clause"
] | null | null | null | # Allison Schubauer and Daisy Hernandez
# Created: 6/26/2013
# Last Updated: 7/25/2013
# For JCAP
"""
runs functions to produce figures of merit automatically, and
replaces dictionaries of data produced by old versions with
updated data
"""
import sys, os
import argparse
import cPickle as pickle
from mul... | 47.130293 | 134 | 0.632939 |
79436f9f7cbc8886ea9ff50c62390ccdc2a56869 | 391 | py | Python | altcore/core/wsgi.py | artkra/altcore | de3e2f0520c55f0390e9964155818a78110bbdb1 | [
"MIT"
] | null | null | null | altcore/core/wsgi.py | artkra/altcore | de3e2f0520c55f0390e9964155818a78110bbdb1 | [
"MIT"
] | null | null | null | altcore/core/wsgi.py | artkra/altcore | de3e2f0520c55f0390e9964155818a78110bbdb1 | [
"MIT"
] | null | null | null | """
WSGI config for altcore project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTI... | 23 | 78 | 0.785166 |
794370347d544fb058ff684fcf7b44e8576cbfc2 | 98 | py | Python | broadcast-db/broadcastdb/common/models/__init__.py | faical-yannick-congo/broadcast-backend | bf16c047696c27bc53dd40fb8370b46f7cf9a4cb | [
"MIT"
] | null | null | null | broadcast-db/broadcastdb/common/models/__init__.py | faical-yannick-congo/broadcast-backend | bf16c047696c27bc53dd40fb8370b46f7cf9a4cb | [
"MIT"
] | null | null | null | broadcast-db/broadcastdb/common/models/__init__.py | faical-yannick-congo/broadcast-backend | bf16c047696c27bc53dd40fb8370b46f7cf9a4cb | [
"MIT"
] | null | null | null | """SMS Broadcast Service Mongoengine Database Models.
"""
from .broadcast_model import Broadcast
| 19.6 | 53 | 0.795918 |
7943714bdca40de97b70c9a58e851a3ff904c4bd | 6,742 | py | Python | qa/rpc-tests/test_framework/test_framework.py | zahidaliayub/protoncoin-PROTON | bf415b60cbec0e52e174878adf0c5344b860723e | [
"MIT"
] | 5 | 2018-04-06T15:38:50.000Z | 2018-05-18T09:29:13.000Z | qa/rpc-tests/test_framework/test_framework.py | zahidaliayub/protoncoin-PROTON | bf415b60cbec0e52e174878adf0c5344b860723e | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/test_framework.py | zahidaliayub/protoncoin-PROTON | bf415b60cbec0e52e174878adf0c5344b860723e | [
"MIT"
] | 18 | 2018-03-05T15:18:36.000Z | 2018-05-22T01:44:46.000Z | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Base class for RPC testing
# Add python-bitcoinrpc to module search path:
import os
import sys
import... | 34.050505 | 100 | 0.617324 |
794371eccc65a4086e60fe5da73d78c99db83b66 | 1,070 | py | Python | ch06/prepare_airplanes.py | wikibook/agile-data-science | 7769fc2d6c810e9f1a64e45d3684e9260d99d983 | [
"MIT"
] | 1 | 2020-02-13T05:45:13.000Z | 2020-02-13T05:45:13.000Z | ch06/prepare_airplanes.py | wikibook/agile-data-science | 7769fc2d6c810e9f1a64e45d3684e9260d99d983 | [
"MIT"
] | null | null | null | ch06/prepare_airplanes.py | wikibook/agile-data-science | 7769fc2d6c810e9f1a64e45d3684e9260d99d983 | [
"MIT"
] | null | null | null | # FAA N-Number 검색 레코드를 적재
faa_tail_number_inquiry = spark.read.json('data/faa_tail_number_inquiry.jsonl')
faa_tail_number_inquiry.show()
# 레코드 수 세기
faa_tail_number_inquiry.count()
# 고유한 꼬리 번호 적재
unique_tail_numbers = spark.read.json('data/tail_numbers.jsonl')
unique_tail_numbers.show()
# 꼬리 번호를 조회 레코드와 조인
tail_num_p... | 29.722222 | 79 | 0.808411 |
79437273867f2d753c5e37507a5a67577dd0f65f | 21,929 | py | Python | aries_cloudagent/messaging/decorators/attach_decorator.py | zanost/aries-cloudagent-python | 9541edfb957742e9db8082981c8397b45f8de987 | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/messaging/decorators/attach_decorator.py | zanost/aries-cloudagent-python | 9541edfb957742e9db8082981c8397b45f8de987 | [
"Apache-2.0"
] | 8 | 2021-07-27T01:13:56.000Z | 2022-03-15T01:12:40.000Z | aries_cloudagent/messaging/decorators/attach_decorator.py | zanost/aries-cloudagent-python | 9541edfb957742e9db8082981c8397b45f8de987 | [
"Apache-2.0"
] | 1 | 2022-02-02T17:05:27.000Z | 2022-02-02T17:05:27.000Z | """
A message decorator for attachments.
An attach decorator embeds content or specifies appended content.
"""
import json
import uuid
from typing import Any, Mapping, Sequence, Tuple, Union
from marshmallow import EXCLUDE, fields, pre_load
from ...wallet.base import BaseWallet
from ...wallet.util import (
b5... | 30.080933 | 88 | 0.582015 |
794372a1f4b0dcc41bcf0da611f5bc2ec9301973 | 8,125 | py | Python | tensorflow/contrib/nccl/python/ops/nccl_ops.py | zhangyujing/tensorflow | c7a04561fb8972fb64907acc5f10f3c6d4cef9f2 | [
"Apache-2.0"
] | 54 | 2018-05-29T19:52:44.000Z | 2021-11-30T10:41:12.000Z | tensorflow/contrib/nccl/python/ops/nccl_ops.py | hiflyin/tensorflow | 8e86dcd1c59bb3f1dc978fcb5398dd3f2f51d9ad | [
"Apache-2.0"
] | 20 | 2017-12-06T18:20:54.000Z | 2021-11-10T09:54:23.000Z | tensorflow/contrib/nccl/python/ops/nccl_ops.py | hiflyin/tensorflow | 8e86dcd1c59bb3f1dc978fcb5398dd3f2f51d9ad | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 29.871324 | 80 | 0.720123 |
79437319d9e87ccb06608cfd0c2654f6db2e39e2 | 457 | py | Python | plotly/validators/scatterpolargl/_customdatasrc.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/scatterpolargl/_customdatasrc.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/scatterpolargl/_customdatasrc.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name='customdatasrc',
parent_name='scatterpolargl',
**kwargs
):
super(CustomdatasrcValidator, self).__init__(
plotly_name... | 24.052632 | 72 | 0.610503 |
794377aa6e0f26e11e87e5959fe9b78f9811a5bb | 2,632 | py | Python | tests/test_charm.py | AlexsJones/charmed-sfs | 4d94c803a1811660d24aa95326d675bde56377c5 | [
"Apache-2.0"
] | null | null | null | tests/test_charm.py | AlexsJones/charmed-sfs | 4d94c803a1811660d24aa95326d675bde56377c5 | [
"Apache-2.0"
] | null | null | null | tests/test_charm.py | AlexsJones/charmed-sfs | 4d94c803a1811660d24aa95326d675bde56377c5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 jonesax
# See LICENSE file for licensing details.
#
# Learn more about testing at: https://juju.is/docs/sdk/testing
import unittest
from unittest.mock import Mock
from charm import SfsCharm
from ops.model import ActiveStatus
from ops.testing import Harness
class TestCharm(unittest.TestCase):
de... | 39.283582 | 89 | 0.649316 |
794378f4465298f29eb5f72120e249fcdcedbf34 | 734 | py | Python | src/rust/iced-x86-py/src/iced_x86/EncodingKind.py | clayne/iced | dcd3db725b1137fec4d2bda9b17587cead49bf4d | [
"MIT"
] | 1,018 | 2018-09-07T20:12:43.000Z | 2021-01-17T18:41:10.000Z | src/rust/iced-x86-py/src/iced_x86/EncodingKind.py | clayne/iced | dcd3db725b1137fec4d2bda9b17587cead49bf4d | [
"MIT"
] | 127 | 2018-09-07T19:33:48.000Z | 2021-01-17T22:20:33.000Z | src/rust/iced-x86-py/src/iced_x86/EncodingKind.py | clayne/iced | dcd3db725b1137fec4d2bda9b17587cead49bf4d | [
"MIT"
] | 146 | 2018-09-09T12:38:30.000Z | 2021-01-18T23:37:11.000Z | # SPDX-License-Identifier: MIT
# Copyright (C) 2018-present iced project and contributors
# ⚠️This file was generated by GENERATOR!🦹♂️
# pylint: disable=invalid-name
# pylint: disable=line-too-long
# pylint: disable=too-many-lines
"""
Instruction encoding
"""
import typing
if typing.TYPE_CHECKING:
from ._iced_x8... | 16.681818 | 58 | 0.702997 |
7943792e88a220c8a46d4c362f88faacf61c4cf9 | 9,375 | py | Python | eod/data/samplers/sampler.py | scott-mao/EOD | f10e64de86c0f356ebf5c7e923f4042eec4207b1 | [
"Apache-2.0"
] | 1 | 2022-01-12T01:51:39.000Z | 2022-01-12T01:51:39.000Z | eod/data/samplers/sampler.py | YZW-explorer/EOD | f10e64de86c0f356ebf5c7e923f4042eec4207b1 | [
"Apache-2.0"
] | null | null | null | eod/data/samplers/sampler.py | YZW-explorer/EOD | f10e64de86c0f356ebf5c7e923f4042eec4207b1 | [
"Apache-2.0"
] | null | null | null | # Standard Library
import math
from collections import defaultdict
# Import from third library
import numpy as np
import torch
from torch.utils.data.sampler import Sampler
from eod.utils.env.dist_helper import env, get_rank, get_world_size
from eod.utils.general.log_helper import default_logger as logger
from eod.uti... | 35.511364 | 115 | 0.620053 |
79437956e5607d5e0a159baa5ff8342e2b0ed99c | 2,283 | py | Python | server1/models/__init__.py | cchangr/Animal | f6701c9780dc06a3420bcec8664b3b89ed67174f | [
"MIT"
] | null | null | null | server1/models/__init__.py | cchangr/Animal | f6701c9780dc06a3420bcec8664b3b89ed67174f | [
"MIT"
] | null | null | null | server1/models/__init__.py | cchangr/Animal | f6701c9780dc06a3420bcec8664b3b89ed67174f | [
"MIT"
] | null | null | null | import json
from server1.utils import log
def save(data, path):
s = json.dumps(data, indent=2, ensure_ascii=False)
with open(path, 'w+', encoding='utf-8') as f:
log('save', path, s, data)
f.write(s)
def load(path):
with open(path, 'r', encoding='utf-8') as f:
s = f.read()
... | 24.815217 | 80 | 0.473062 |
794379e2c7b785601a571290b407dd50a94b8577 | 3,839 | py | Python | tools/c7n_azure/c7n_azure/resources/storage_container.py | al3pht/cloud-custodian | ce6613d1b716f336384c5e308eee300389e6bf50 | [
"Apache-2.0"
] | 2,415 | 2018-12-04T00:37:58.000Z | 2022-03-31T12:28:56.000Z | tools/c7n_azure/c7n_azure/resources/storage_container.py | al3pht/cloud-custodian | ce6613d1b716f336384c5e308eee300389e6bf50 | [
"Apache-2.0"
] | 3,272 | 2018-12-03T23:58:17.000Z | 2022-03-31T21:15:32.000Z | tools/c7n_azure/c7n_azure/resources/storage_container.py | al3pht/cloud-custodian | ce6613d1b716f336384c5e308eee300389e6bf50 | [
"Apache-2.0"
] | 773 | 2018-12-06T09:43:23.000Z | 2022-03-30T20:44:43.000Z | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from c7n_azure.provider import resources
from c7n_azure.query import ChildTypeInfo
from c7n_azure.actions.base import AzureBaseAction
from c7n_azure.resources.arm import ChildArmResourceManager
from c7n.filters.core import type_schema
from ... | 33.675439 | 90 | 0.620995 |
79437a49fed0591607b2c696668a5a25ac5bdf85 | 1,999 | py | Python | ugali/analysis/pipeline.py | mcnanna/ugali | 2572915b82af5b25e8762013e6d5baabdaa24b21 | [
"MIT"
] | 12 | 2016-10-26T20:45:33.000Z | 2021-11-24T04:07:43.000Z | ugali/analysis/pipeline.py | mcnanna/ugali | 2572915b82af5b25e8762013e6d5baabdaa24b21 | [
"MIT"
] | 64 | 2017-04-14T15:04:24.000Z | 2022-02-03T19:42:57.000Z | ugali/analysis/pipeline.py | kadrlica/ugali | dcf53594658a2b577f4da271783b43ed0a79fec9 | [
"MIT"
] | 12 | 2016-06-23T21:42:46.000Z | 2021-06-19T05:29:49.000Z | #!/usr/bin/env python
"""
Base functionality for pipeline scripts
"""
import ugali.utils.batch
from ugali.utils.parser import Parser
from ugali.utils.logger import logger
from ugali.utils.config import Config
class Pipeline(object):
"""
A pipeline script owns:
- A set of command line arguments
- A set... | 27.763889 | 69 | 0.624812 |
79437b40f20170296113ffbe7df62bc10bfd99e4 | 2,160 | py | Python | BOT.py | GoodDalek/BOTDiscord-Jogo-de-escolhas | 91199b4ae75f1953ebf1028a002bcc6dcec79b20 | [
"MIT"
] | null | null | null | BOT.py | GoodDalek/BOTDiscord-Jogo-de-escolhas | 91199b4ae75f1953ebf1028a002bcc6dcec79b20 | [
"MIT"
] | null | null | null | BOT.py | GoodDalek/BOTDiscord-Jogo-de-escolhas | 91199b4ae75f1953ebf1028a002bcc6dcec79b20 | [
"MIT"
] | null | null | null | ########################################################################################################################
# BOT DE ADVENTURE GAME PARA DISCORD COM DISCORD.PY #
###########################################################################... | 42.352941 | 122 | 0.556944 |
79437b528788810f0366e538c931dddf3b6380e8 | 5,186 | py | Python | build/X86_MESI_Two_Level/python/m5/internal/param_SrcClockDomain.py | hoho20000000/gem5-fy | b59f6feed22896d6752331652c4d8a41a4ca4435 | [
"BSD-3-Clause"
] | null | null | null | build/X86_MESI_Two_Level/python/m5/internal/param_SrcClockDomain.py | hoho20000000/gem5-fy | b59f6feed22896d6752331652c4d8a41a4ca4435 | [
"BSD-3-Clause"
] | 1 | 2020-08-20T05:53:30.000Z | 2020-08-20T05:53:30.000Z | build/X86_MESI_Two_Level/python/m5/internal/param_SrcClockDomain.py | hoho20000000/gem5-fy | b59f6feed22896d6752331652c4d8a41a4ca4435 | [
"BSD-3-Clause"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_im... | 37.309353 | 164 | 0.71828 |
79437bcd9b3988078b9b47ff92c7e7159dfb4f65 | 27,654 | py | Python | salt/modules/win_update.py | tschmittni/salt | ccfcd5ed1272576799797ec7f259b676fd130585 | [
"Apache-2.0"
] | 2 | 2018-11-08T02:59:24.000Z | 2021-01-04T00:30:50.000Z | salt/modules/win_update.py | The-Loeki/salt | 8ff8212cc1eacfe409eb9cc017b21250f28dd305 | [
"Apache-2.0"
] | 4 | 2020-09-04T10:19:34.000Z | 2020-11-09T12:55:59.000Z | salt/modules/win_update.py | The-Loeki/salt | 8ff8212cc1eacfe409eb9cc017b21250f28dd305 | [
"Apache-2.0"
] | 5 | 2017-06-16T23:48:13.000Z | 2021-04-08T17:43:48.000Z | # -*- coding: utf-8 -*-
'''
Module for running windows updates.
This module is being deprecated and will be removed in Salt Fluorine. Please use
the ``win_wua`` module instead.
:depends: - win32com
- win32con
- win32api
- pywintypes
.. versionadded:: 2014.7.0
Set windows updates to run by ... | 36.7251 | 155 | 0.618898 |
79437c420094127c5b84b9c82a8f30b8f1e0ccf1 | 337 | py | Python | invoice/migrations/0002_remove_invoice_due_days.py | kaviarasanmani/test123- | 3995a28826edca5d2694a44c5295af9031780396 | [
"MIT"
] | null | null | null | invoice/migrations/0002_remove_invoice_due_days.py | kaviarasanmani/test123- | 3995a28826edca5d2694a44c5295af9031780396 | [
"MIT"
] | null | null | null | invoice/migrations/0002_remove_invoice_due_days.py | kaviarasanmani/test123- | 3995a28826edca5d2694a44c5295af9031780396 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.1 on 2022-02-16 07:31
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('invoice', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='invoice',
name='due_days',
... | 18.722222 | 48 | 0.551929 |
79437c6dd27ce024cff688b9354d43357225f2b0 | 2,846 | py | Python | tests/test_units/test_templating.py | KinSai1975/Menira.py | ca275ce244ee4804444e1827ba60010a55acc07c | [
"BSD-3-Clause"
] | 118 | 2015-01-04T06:55:14.000Z | 2022-01-14T08:32:41.000Z | tests/test_units/test_templating.py | KinSai1975/Menira.py | ca275ce244ee4804444e1827ba60010a55acc07c | [
"BSD-3-Clause"
] | 21 | 2015-01-03T02:16:28.000Z | 2021-03-24T06:10:57.000Z | tests/test_units/test_templating.py | KinSai1975/Menira.py | ca275ce244ee4804444e1827ba60010a55acc07c | [
"BSD-3-Clause"
] | 53 | 2015-01-04T03:21:08.000Z | 2021-08-04T20:52:01.000Z | import os
import re
import sys
from beaker.cache import CacheManager
from beaker.middleware import SessionMiddleware, CacheMiddleware
from mako.lookup import TemplateLookup
from nose.tools import raises
from paste.fixture import TestApp
from paste.registry import RegistryManager
from paste.deploy.converters import asb... | 35.135802 | 142 | 0.71293 |
79437d1aac83d1a8f6ea1ecbe13078296f917e31 | 327 | py | Python | setup.py | mumrah/cloudcache | f11422c338070c9b212c82d83f46f8e501f8e8a7 | [
"MIT"
] | 1 | 2021-11-15T09:39:25.000Z | 2021-11-15T09:39:25.000Z | setup.py | mumrah/cloudcache | f11422c338070c9b212c82d83f46f8e501f8e8a7 | [
"MIT"
] | 4 | 2016-04-13T15:21:24.000Z | 2016-04-13T15:24:30.000Z | setup.py | mumrah/cloudcache | f11422c338070c9b212c82d83f46f8e501f8e8a7 | [
"MIT"
] | null | null | null | from setuptools import setup,find_packages
setup (
name = 'CloudCached',
version = '0.1',
install_requires = {'Boto':'boto>=1.8','Nose':'nose>=0.11'},
packages = find_packages(),
tests_require = {'Nose':'nose>=0.1'},
test_suite = "nose.collector",
author = 'David Arthur',
author_email = 'mumrah@gmail.c... | 25.153846 | 62 | 0.654434 |
79437d3f9400627008f93abce47ffda936af4563 | 7,284 | py | Python | grr/server/grr_response_server/timeseries.py | BA7JCM/grr | c6f3b19e73e1d76a195d3c9a63e894ace6ea2508 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/timeseries.py | BA7JCM/grr | c6f3b19e73e1d76a195d3c9a63e894ace6ea2508 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/timeseries.py | BA7JCM/grr | c6f3b19e73e1d76a195d3c9a63e894ace6ea2508 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Operations on a series of points, indexed by time.
"""
import copy
from grr_response_core.lib import rdfvalue
NORMALIZE_MODE_GAUGE = 1
NORMALIZE_MODE_COUNTER = 2
class Timeseries(object):
"""Timeseries contains a sequence of points, each with a timestamp."""
def __init__(self, initia... | 32.230088 | 80 | 0.66804 |
79437e01cb5e0766fa805972b4bb57c9f142d8db | 8,491 | py | Python | var/spack/repos/builtin/packages/vtk-m/package.py | BetsyMcPhail/spack | 42ed6e25e16099c866af90e6222f5283f25026ae | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-02-08T15:05:27.000Z | 2021-02-08T15:05:27.000Z | var/spack/repos/builtin/packages/vtk-m/package.py | gmt3141/spack | e05ac5c944e086ab558ad53ca929c29b1770a818 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/vtk-m/package.py | gmt3141/spack | e05ac5c944e086ab558ad53ca929c29b1770a818 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2020 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 *
import os
import sys
class VtkM(CMakePackage, CudaPackage):
"""VTK-m is a toolkit of scientific... | 44.689474 | 95 | 0.589919 |
79437fb438922eee8a35a3da4888482710ed2633 | 2,435 | py | Python | data/p4VQE/R4/benchmark/startQiskit_Class718.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_Class718.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_Class718.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=13
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | 27.359551 | 118 | 0.634908 |
7943814b3a25193766fc2d5ba6d81f51f2ef6298 | 203 | py | Python | venmo_client/model/__init__.py | sharadmv/venmo-client | 2b236053ab5f233645b0a64f5333a4e9723ebf30 | [
"MIT"
] | null | null | null | venmo_client/model/__init__.py | sharadmv/venmo-client | 2b236053ab5f233645b0a64f5333a4e9723ebf30 | [
"MIT"
] | null | null | null | venmo_client/model/__init__.py | sharadmv/venmo-client | 2b236053ab5f233645b0a64f5333a4e9723ebf30 | [
"MIT"
] | null | null | null | from venmo_client.model.transaction import Notification
from venmo_client.model.transaction import Transaction
from venmo_client.model.transaction import Payment
from venmo_client.model.user import User
| 40.6 | 55 | 0.881773 |
7943824d53294043734ffa67046f42136422c29f | 1,361 | py | Python | api/views/SaleItemViewSet.py | ghalonso94/wswallet | 8f1f13a0d646166adad45b3872c2db6558d48f38 | [
"MIT"
] | null | null | null | api/views/SaleItemViewSet.py | ghalonso94/wswallet | 8f1f13a0d646166adad45b3872c2db6558d48f38 | [
"MIT"
] | null | null | null | api/views/SaleItemViewSet.py | ghalonso94/wswallet | 8f1f13a0d646166adad45b3872c2db6558d48f38 | [
"MIT"
] | null | null | null | from rest_framework import viewsets
from rest_framework.generics import get_object_or_404
from rest_framework.response import Response
from core.models import SaleItem
from api.serializer import SaleItemSerializer
from rest_framework.authentication import BasicAuthentication
from rest_framework.permissions import IsAu... | 36.783784 | 87 | 0.728876 |
794382e928536c41b822332348976703fd1d2f36 | 14,017 | py | Python | tests/test_canonicalization.py | cthoyt/pybel | ed66f013a77f9cbc513892b0dad1025b8f68bb46 | [
"Apache-2.0"
] | null | null | null | tests/test_canonicalization.py | cthoyt/pybel | ed66f013a77f9cbc513892b0dad1025b8f68bb46 | [
"Apache-2.0"
] | 11 | 2017-12-28T08:03:14.000Z | 2019-01-15T02:13:58.000Z | tests/test_canonicalization.py | cthoyt/pybel | ed66f013a77f9cbc513892b0dad1025b8f68bb46 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests for canonicalization functions."""
import unittest
from typing import Iterable
from pybel import BELGraph
from pybel.canonicalize import _to_bel_lines_body, postpend_location
from pybel.constants import CITATION_TYPE_PUBMED, EXTRACELLULAR, INTRACELLULAR, MODIFIER
from pybel.dsl impor... | 35.0425 | 119 | 0.591567 |
794382f2adca5bfa500dfec904cf220384f3479c | 994 | py | Python | data_terbuka_id/items.py | seagatesoft/data-terbuka-id | 57e0531fa4a978483852ee1333cc5bf0b80637f7 | [
"MIT"
] | null | null | null | data_terbuka_id/items.py | seagatesoft/data-terbuka-id | 57e0531fa4a978483852ee1333cc5bf0b80637f7 | [
"MIT"
] | null | null | null | data_terbuka_id/items.py | seagatesoft/data-terbuka-id | 57e0531fa4a978483852ee1333cc5bf0b80637f7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
from scrapy import Field, Item
from scrapy.loader import ItemLoader
from scrapylib.processors import default_input_processor, default_output_processor
class MasjidIte... | 24.85 | 82 | 0.695171 |
7943830a68d11d1bab1e92768af6ca55088f447e | 19,254 | py | Python | quart_openapi/swagger.py | kowbot/quart-openapi | d259bd1f6dd8315ddd6f601e395ff08313921196 | [
"Apache-2.0"
] | null | null | null | quart_openapi/swagger.py | kowbot/quart-openapi | d259bd1f6dd8315ddd6f601e395ff08313921196 | [
"Apache-2.0"
] | null | null | null | quart_openapi/swagger.py | kowbot/quart-openapi | d259bd1f6dd8315ddd6f601e395ff08313921196 | [
"Apache-2.0"
] | null | null | null | """swagger.py
Provides the View class for generating the openapi.json file on the fly based on the Pint instance and decorators
"""
from collections import OrderedDict
from http import HTTPStatus
from itertools import chain
from typing import (Any, Callable, Dict, Generator, Iterable, List, Mapping,
... | 43.073826 | 113 | 0.595357 |
79438484e40112f9be328425cf71095e0f093eeb | 2,421 | py | Python | tests/test_vector3.py | crazymaik/ard-python | ef6dc62ae9853ac636be3a343aabf69082b74b8b | [
"MIT"
] | null | null | null | tests/test_vector3.py | crazymaik/ard-python | ef6dc62ae9853ac636be3a343aabf69082b74b8b | [
"MIT"
] | null | null | null | tests/test_vector3.py | crazymaik/ard-python | ef6dc62ae9853ac636be3a343aabf69082b74b8b | [
"MIT"
] | null | null | null | import context
import math
import pytest
from ard.vector3 import Vector3
class TestVector3:
def test_add_example(self):
u = Vector3(x=1, y=2, z=3)
v = Vector3(x=4, y=5, z=6)
actual = u.add(v)
assert actual.x == 5
assert actual.y == 7
assert actual.z == 9
def te... | 28.821429 | 63 | 0.539447 |
794384874d17809add381bd0ed1c52b5bf3f5f4c | 670 | py | Python | examples/example_3_inducible/setup_bmss.py | EngBioNUS/BMSS2 | 41163c61a4e0ef3c6430e5954d81a77832e49a9d | [
"Apache-2.0"
] | null | null | null | examples/example_3_inducible/setup_bmss.py | EngBioNUS/BMSS2 | 41163c61a4e0ef3c6430e5954d81a77832e49a9d | [
"Apache-2.0"
] | null | null | null | examples/example_3_inducible/setup_bmss.py | EngBioNUS/BMSS2 | 41163c61a4e0ef3c6430e5954d81a77832e49a9d | [
"Apache-2.0"
] | 4 | 2020-08-24T13:35:55.000Z | 2022-03-07T16:48:12.000Z |
'''
Adds base directory to path so BMSS can be imported. You can just use import BMSS
if you have successfully installed it using pip.
'''
import sys
from os import getcwd, listdir
from os.path import abspath, dirname, join
#Get base directory
__base_dir__ = dirname(dirname(dirname(__file__)))
try:
... | 23.103448 | 97 | 0.679104 |
79438b20506d0e78e13663f9417f24e5064adc78 | 2,170 | py | Python | agents/network/base_network.py | samuelfneumann/RLControl | 71430b1de2e4262483908932eb44579c2ec8216d | [
"Apache-2.0"
] | 9 | 2018-07-30T20:12:47.000Z | 2021-02-05T17:02:04.000Z | agents/network/base_network.py | samuelfneumann/RLControl | 71430b1de2e4262483908932eb44579c2ec8216d | [
"Apache-2.0"
] | 14 | 2020-01-28T22:38:58.000Z | 2022-02-10T00:11:21.000Z | agents/network/base_network.py | samuelfneumann/RLControl | 71430b1de2e4262483908932eb44579c2ec8216d | [
"Apache-2.0"
] | 3 | 2018-08-08T14:52:53.000Z | 2021-01-23T18:00:05.000Z | import tensorflow as tf
class BaseNetwork(object):
def __init__(self, sess, config, learning_rate):
"""
base network for actor and critic network.
Args:
sess: tf.Session()
config: Configuration object
learning_rate: learning rate for training (Could be a... | 31.911765 | 122 | 0.632719 |
79438c9b854902e87e38789dfcddc1cd111f4d6d | 272 | py | Python | notifications/tests/sample_notifications/admin.py | pandafy/django-notifications | 720c40576a9387a035a44aa800f423efd15c8038 | [
"BSD-3-Clause"
] | 1,354 | 2015-01-03T17:22:58.000Z | 2022-03-29T11:49:12.000Z | notifications/tests/sample_notifications/admin.py | pandafy/django-notifications | 720c40576a9387a035a44aa800f423efd15c8038 | [
"BSD-3-Clause"
] | 275 | 2015-01-19T21:32:51.000Z | 2022-03-30T10:07:14.000Z | notifications/tests/sample_notifications/admin.py | pandafy/django-notifications | 720c40576a9387a035a44aa800f423efd15c8038 | [
"BSD-3-Clause"
] | 385 | 2015-01-08T19:51:12.000Z | 2022-03-29T10:19:16.000Z | import swapper
from django.contrib import admin
from notifications.base.admin import AbstractNotificationAdmin
Notification = swapper.load_model('notifications', 'Notification')
@admin.register(Notification)
class NotificationAdmin(AbstractNotificationAdmin):
pass
| 24.727273 | 66 | 0.838235 |
79438d8404eedf800fd113aedf8ce572ec5e86fd | 613 | py | Python | data_cleaning/main.py | JuaniRios/4p-chess-prediction | f0fa49f16bade6089108d0b06bf2bbd1be8366f8 | [
"MIT"
] | null | null | null | data_cleaning/main.py | JuaniRios/4p-chess-prediction | f0fa49f16bade6089108d0b06bf2bbd1be8366f8 | [
"MIT"
] | null | null | null | data_cleaning/main.py | JuaniRios/4p-chess-prediction | f0fa49f16bade6089108d0b06bf2bbd1be8366f8 | [
"MIT"
] | null | null | null | from data_cleaning.filter_data import filter_data
from data_cleaning.data_manipulation import mk_move
from data_cleaning.to_hdf import to_hdf
def txt_to_h5(file_name):
"""
takes the name of a .txt file with games from chess.com, and converts it
to an hdf5 db.
"""
print("txt to h5. Step 1/3. \n Ple... | 32.263158 | 76 | 0.675367 |
79438ec4b0f18c2b90027c54e46052098b0b1220 | 1,170 | py | Python | sc/graphRegistry.py | Omegaice/smartcontainers | 0d2e75734dbf76c6aed73ee10b9590ed82c8f7e5 | [
"Apache-2.0"
] | 6 | 2016-04-26T20:22:31.000Z | 2021-05-03T23:38:11.000Z | sc/graphRegistry.py | Omegaice/smartcontainers | 0d2e75734dbf76c6aed73ee10b9590ed82c8f7e5 | [
"Apache-2.0"
] | 43 | 2016-03-10T15:03:01.000Z | 2016-06-06T15:28:27.000Z | sc/graphRegistry.py | Omegaice/smartcontainers | 0d2e75734dbf76c6aed73ee10b9590ed82c8f7e5 | [
"Apache-2.0"
] | 4 | 2016-03-02T17:18:26.000Z | 2016-03-18T14:13:11.000Z | # -*- coding: utf-8 -*-
"""RDFlib Graph Registry for SmartContainers.
This module provides a common interface to all RDFlib graphs created by all
vocabularies. New vocabularies should subclass baseVocabulary.
Since the registry has access to the SmartContainer global provenance graph
it also manages the named graph ob... | 43.333333 | 77 | 0.816239 |
7943903d9e45dd79dbdbdf01e333de7721d4c6ee | 14,197 | py | Python | affiliate/model/mysql_model.py | gods-view/AdclickIO | ccb73867e568aac5f40bd5890149626ce0be1897 | [
"BSD-2-Clause"
] | null | null | null | affiliate/model/mysql_model.py | gods-view/AdclickIO | ccb73867e568aac5f40bd5890149626ce0be1897 | [
"BSD-2-Clause"
] | null | null | null | affiliate/model/mysql_model.py | gods-view/AdclickIO | ccb73867e568aac5f40bd5890149626ce0be1897 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
from peewee import *
from affiliate.model.config import mysql, mysql_report
import time
db = MySQLDatabase(mysql['name'],
host=mysql['host'],
port=int(mysql['port']),
user=mysql['user'],
passwd=mysql['p... | 36.216837 | 87 | 0.683525 |
7943919783a547676eb4f8c2813e2b0de4121377 | 4,427 | py | Python | tests/tests_emg.py | vansjyo/NeuroKit | 238cd3d89467f7922c68a3a4c1f44806a8466922 | [
"MIT"
] | null | null | null | tests/tests_emg.py | vansjyo/NeuroKit | 238cd3d89467f7922c68a3a4c1f44806a8466922 | [
"MIT"
] | null | null | null | tests/tests_emg.py | vansjyo/NeuroKit | 238cd3d89467f7922c68a3a4c1f44806a8466922 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import neurokit2 as nk
import matplotlib.pyplot as plt
import scipy.stats
import biosppy
# =============================================================================
# EMG
# =============================================================================
def test_emg_simulate(... | 37.837607 | 135 | 0.615541 |
794391b7ea7953b97340b5e0fa229186988762cf | 1,586 | py | Python | test_scripts/functional_tests/wallet/open_wallet_test.py | hyperledger/indy-post-install-automation | a19cb3c66f0adea6bb4c1fc20e1509cc97bd3d5f | [
"Apache-2.0"
] | 2 | 2021-08-23T15:20:22.000Z | 2021-12-03T01:58:02.000Z | test_scripts/functional_tests/wallet/open_wallet_test.py | hyperledger-archives/indy-post-install-automation | a19cb3c66f0adea6bb4c1fc20e1509cc97bd3d5f | [
"Apache-2.0"
] | 1 | 2018-02-22T10:04:41.000Z | 2018-02-22T10:04:41.000Z | test_scripts/functional_tests/wallet/open_wallet_test.py | hyperledger/indy-post-install-automation | a19cb3c66f0adea6bb4c1fc20e1509cc97bd3d5f | [
"Apache-2.0"
] | 7 | 2018-01-03T20:45:48.000Z | 2019-08-12T11:02:31.000Z | """
Created on Dec 08, 2017
@author: khoi.ngo
Implementing test case open_wallet with valid value.
"""
from indy.error import IndyError
import pytest
from utilities import common
from utilities.result import Status
from utilities.test_scenario_base import TestScenarioBase
from utilities.utils import perform
from indy... | 36.045455 | 96 | 0.627995 |
794392091da644e03337eb56df872a6c97689b07 | 902 | py | Python | demos/biotool/oauth2client/contrib/django_util/site.py | Servir-Mekong/biotool | 80ef1b18e34db637bf11d2ab84782e6a1a2dddd0 | [
"Apache-2.0"
] | 1 | 2016-09-09T14:45:45.000Z | 2016-09-09T14:45:45.000Z | demos/biotool/oauth2client/contrib/django_util/site.py | Servir-Mekong/Eco-Dashboard | 80ef1b18e34db637bf11d2ab84782e6a1a2dddd0 | [
"Apache-2.0"
] | null | null | null | demos/biotool/oauth2client/contrib/django_util/site.py | Servir-Mekong/Eco-Dashboard | 80ef1b18e34db637bf11d2ab84782e6a1a2dddd0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 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 ... | 36.08 | 75 | 0.759424 |
794392491dc0b95ea313e760db2a0367077f052d | 3,661 | py | Python | cride/rides/migrations/0001_initial.py | danhergir/cride | b346138ec597e4f58feed8b1ca6826d214f08135 | [
"MIT"
] | null | null | null | cride/rides/migrations/0001_initial.py | danhergir/cride | b346138ec597e4f58feed8b1ca6826d214f08135 | [
"MIT"
] | null | null | null | cride/rides/migrations/0001_initial.py | danhergir/cride | b346138ec597e4f58feed8b1ca6826d214f08135 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.9 on 2021-06-13 17:27
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('circles', '0004_invitation'),
migrations.swappable_dependency(s... | 55.469697 | 207 | 0.62442 |
794393b01c036f0976522ce1ea21d17622e05a1e | 681 | py | Python | setup.py | hmlingesh/csv-to-html-table | 114d8c85a121b32604d321973f854614b5a9e8b5 | [
"MIT"
] | null | null | null | setup.py | hmlingesh/csv-to-html-table | 114d8c85a121b32604d321973f854614b5a9e8b5 | [
"MIT"
] | null | null | null | setup.py | hmlingesh/csv-to-html-table | 114d8c85a121b32604d321973f854614b5a9e8b5 | [
"MIT"
] | null | null | null | """
Hello World app for running Python apps on Bluemix
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with ... | 26.192308 | 69 | 0.732746 |
794393d1a7e8c7597428dd549930a830b3e2e2b8 | 386 | py | Python | events/migrations/0028_event_holiday.py | McCarthyCode/Market-to-Market-Chicago | 15d491f6f45c0899864ae9256f2808e46e0e140b | [
"MIT"
] | null | null | null | events/migrations/0028_event_holiday.py | McCarthyCode/Market-to-Market-Chicago | 15d491f6f45c0899864ae9256f2808e46e0e140b | [
"MIT"
] | 1 | 2020-06-09T11:15:17.000Z | 2020-06-09T11:15:17.000Z | events/migrations/0028_event_holiday.py | mattmc318/Market-to-Market-Chicago | 15d491f6f45c0899864ae9256f2808e46e0e140b | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-10-22 03:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0027_auto_20200512_1857'),
]
operations = [
migrations.AddField(
model_name='event',
name='holiday',
... | 20.315789 | 53 | 0.598446 |
794393fb589763a930fda72bea185e4c76b867ae | 2,020 | py | Python | code/python3/index_sorting.py | jaylett/xapian-docsprint | 2e8fdffecf71f7042c0abe49924ba48c11818b7e | [
"MIT"
] | 47 | 2015-01-20T15:38:41.000Z | 2022-02-15T21:03:50.000Z | code/python3/index_sorting.py | jaylett/xapian-docsprint | 2e8fdffecf71f7042c0abe49924ba48c11818b7e | [
"MIT"
] | 16 | 2015-06-09T16:12:50.000Z | 2020-02-05T06:40:18.000Z | code/python3/index_sorting.py | jaylett/xapian-docsprint | 2e8fdffecf71f7042c0abe49924ba48c11818b7e | [
"MIT"
] | 56 | 2015-01-20T15:38:44.000Z | 2022-03-03T18:13:39.000Z | #!/usr/bin/env python
import json
import sys
import xapian
from support import parse_csv_file
def index(datapath, dbpath):
# Create or open the database we're going to be writing to.
db = xapian.WritableDatabase(dbpath, xapian.DB_CREATE_OR_OPEN)
# Set up a TermGenerator that we'll use in indexing.
te... | 33.114754 | 69 | 0.654455 |
794394713869e26b0d0b88070f8f1a200e0683f3 | 2,794 | py | Python | examples/trader/stock_traders.py | ringwraith/zvt | ff5844ff7991132bbf38d464f29f461dba5efa14 | [
"MIT"
] | 1 | 2019-08-24T02:26:51.000Z | 2019-08-24T02:26:51.000Z | examples/trader/stock_traders.py | ringwraith/zvt | ff5844ff7991132bbf38d464f29f461dba5efa14 | [
"MIT"
] | null | null | null | examples/trader/stock_traders.py | ringwraith/zvt | ff5844ff7991132bbf38d464f29f461dba5efa14 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from zvt.domain.common import TradingLevel
from zvt.factors.technical_factor import CrossMaFactor, BullFactor
from zvt.selectors.selector import TargetSelector
from zvt.settings import SAMPLE_STOCK_CODES
from zvt.trader.impls import StockTrader
# make sure run init_data_sample.py to init the ... | 51.740741 | 114 | 0.719757 |
794395bff0077ab2aeee6e61c4575ee4acd4d76d | 12,575 | py | Python | .ipynb_checkpoints/augment-ignore-checkpoint.py | jkooy/darts_ignoring | 7ae7c769cffe81441af9e1a0e0b92552245ae1d1 | [
"MIT"
] | null | null | null | .ipynb_checkpoints/augment-ignore-checkpoint.py | jkooy/darts_ignoring | 7ae7c769cffe81441af9e1a0e0b92552245ae1d1 | [
"MIT"
] | null | null | null | .ipynb_checkpoints/augment-ignore-checkpoint.py | jkooy/darts_ignoring | 7ae7c769cffe81441af9e1a0e0b92552245ae1d1 | [
"MIT"
] | null | null | null | """ Training augmented model """
import os
import torch
import torch.nn as nn
import numpy as np
from tensorboardX import SummaryWriter
from config import AugmentConfig
import utils
from models.augment_cnn import AugmentCNN
import copy
config = AugmentConfig()
device = torch.device("cuda")
# tensorboard
writer = Su... | 38.455657 | 191 | 0.59833 |
79439689139bc78e7fafa036aa9680c5c06bf3ab | 3,646 | py | Python | src/zen/tests/gml.py | wangyiranamy/Testing | 2a729d1f73b6df69150807b965b8fedbb7661c04 | [
"BSD-3-Clause"
] | 41 | 2015-01-13T19:49:50.000Z | 2021-05-02T04:11:19.000Z | src/zen/tests/gml.py | wangyiranamy/Testing | 2a729d1f73b6df69150807b965b8fedbb7661c04 | [
"BSD-3-Clause"
] | 9 | 2015-01-28T10:46:27.000Z | 2022-03-12T06:32:39.000Z | src/zen/tests/gml.py | wangyiranamy/Testing | 2a729d1f73b6df69150807b965b8fedbb7661c04 | [
"BSD-3-Clause"
] | 19 | 2015-01-27T12:19:42.000Z | 2019-07-20T21:30:56.000Z | from zen import *
import unittest
import os
import os.path as path
import tempfile
class GMLReadTestCase(unittest.TestCase):
def test_read_directed_test1(self):
fname = path.join(path.dirname(__file__),'test1.gml')
G = gml.read(fname)
self.assertEqual(len(G),3)
self.assertEqual(G.size(),2)
self.assertE... | 24.469799 | 66 | 0.665661 |
794397b00537fc54e66f1719163df7e915b4f252 | 9,003 | py | Python | nuart/biclustering/bartmap.py | ACIL-Group/NuART-Py | 36011432f6da9b87452c25cb1911a742f353bc49 | [
"Apache-2.0"
] | 6 | 2018-12-09T21:03:06.000Z | 2021-09-06T09:28:53.000Z | nuart/biclustering/bartmap.py | ACIL-Group/NuART-Py | 36011432f6da9b87452c25cb1911a742f353bc49 | [
"Apache-2.0"
] | null | null | null | nuart/biclustering/bartmap.py | ACIL-Group/NuART-Py | 36011432f6da9b87452c25cb1911a742f353bc49 | [
"Apache-2.0"
] | 1 | 2019-12-14T07:25:31.000Z | 2019-12-14T07:25:31.000Z | """
Copyright 2019 Islam Elnabarawy
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 ... | 37.987342 | 114 | 0.634011 |
794397f22334c4db124c0decc963f5fbb527abf7 | 1,613 | py | Python | msdsl/expr/extras.py | sgherbst/msdsl | e38d5ecdb88b3574bda62f22a4f91ce3e4173d12 | [
"MIT"
] | 15 | 2019-05-14T10:12:23.000Z | 2022-03-29T15:29:52.000Z | msdsl/expr/extras.py | sgherbst/msdsl | e38d5ecdb88b3574bda62f22a4f91ce3e4173d12 | [
"MIT"
] | 19 | 2020-01-22T21:44:33.000Z | 2021-06-05T02:10:41.000Z | msdsl/expr/extras.py | sgherbst/msdsl | e38d5ecdb88b3574bda62f22a4f91ce3e4173d12 | [
"MIT"
] | 5 | 2019-10-21T09:53:17.000Z | 2021-08-10T17:32:20.000Z | from typing import Union, List
from numbers import Number, Integral
from msdsl.expr.expr import ModelExpr, concatenate, BitwiseAnd, array
def all_between(x: List[ModelExpr], lo: Union[Number, ModelExpr], hi: Union[Number, ModelExpr]) -> ModelExpr:
"""
Limit checking. Check if a list of ModelExpr objects ... | 40.325 | 122 | 0.655301 |
794398b0194e39c4b3b063f02919562b6cff5a96 | 373 | py | Python | workout_tracker/users/urls.py | ympaik87/workout_tracker | 9f78e0ef7664b53868f43ccda7256bcfa4105405 | [
"MIT"
] | null | null | null | workout_tracker/users/urls.py | ympaik87/workout_tracker | 9f78e0ef7664b53868f43ccda7256bcfa4105405 | [
"MIT"
] | null | null | null | workout_tracker/users/urls.py | ympaik87/workout_tracker | 9f78e0ef7664b53868f43ccda7256bcfa4105405 | [
"MIT"
] | null | null | null | from django.urls import path
from workout_tracker.users.views import (
user_redirect_view,
user_update_view,
user_detail_view,
)
app_name = "users"
urlpatterns = [
path("~redirect/", view=user_redirect_view, name="redirect"),
path("~update/", view=user_update_view, name="update"),
path("<str:u... | 24.866667 | 66 | 0.707775 |
79439959fab8f2b4fea936c7985f79c23293d51d | 4,109 | py | Python | uts/zscore.py | Yifei-Liu/uts | 64c137d59fcd0c7c016082018d67a56abac0b28e | [
"MIT"
] | null | null | null | uts/zscore.py | Yifei-Liu/uts | 64c137d59fcd0c7c016082018d67a56abac0b28e | [
"MIT"
] | null | null | null | uts/zscore.py | Yifei-Liu/uts | 64c137d59fcd0c7c016082018d67a56abac0b28e | [
"MIT"
] | null | null | null | # coding: utf-8
__author__ = 'Mário Antunes'
__version__ = '0.1'
__email__ = 'mariolpantunes@gmail.com'
__status__ = 'Development'
import math
import numpy as np
def weighted_avg_and_std(values: np.ndarray, weights: np.ndarray):
"""
Return the weighted average and standard deviation.
Args:
... | 28.143836 | 93 | 0.640058 |
79439ac28bbfb080bb21b110a889781f1a504560 | 5,304 | py | Python | datasets/pose/data_loader.py | kangcheol/torchcv | 561ef4e662fff1b9b47060bb08842408a205e689 | [
"Apache-2.0"
] | 106 | 2020-09-08T11:30:28.000Z | 2022-03-23T03:07:09.000Z | datasets/pose/data_loader.py | shanhedian2017/torchcv | 6414f5acb41c2f35f8e79e477a57eaba65591c66 | [
"Apache-2.0"
] | 5 | 2020-09-09T09:45:11.000Z | 2022-02-18T03:07:20.000Z | datasets/pose/data_loader.py | shanhedian2017/torchcv | 6414f5acb41c2f35f8e79e477a57eaba65591c66 | [
"Apache-2.0"
] | 10 | 2020-09-09T08:06:36.000Z | 2021-11-01T08:27:15.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: Donny You(youansheng@gmail.com)
# Class for the Pose Data Loader.
from torch.utils import data
from datasets.pose.loader.default_loader import DefaultLoader
from datasets.pose.loader.openpose_loader import OpenPoseLoader
import datasets.tools.pil_aug_transforms ... | 44.2 | 99 | 0.584842 |
79439ad0ff1608862ace1645a2820a56cf0c8fe0 | 288 | py | Python | profq_data/helpers/nodes/binary_tree_node.py | ProfessorQu/ProfQ-Data | 13edf73c90ea2545a9a373fabb78a764f247e575 | [
"MIT"
] | null | null | null | profq_data/helpers/nodes/binary_tree_node.py | ProfessorQu/ProfQ-Data | 13edf73c90ea2545a9a373fabb78a764f247e575 | [
"MIT"
] | null | null | null | profq_data/helpers/nodes/binary_tree_node.py | ProfessorQu/ProfQ-Data | 13edf73c90ea2545a9a373fabb78a764f247e575 | [
"MIT"
] | null | null | null | class Node:
"""A class for most data structures
"""
def __init__(self, data: int) -> None:
"""The init function
Args:
data (int): what data to put in the node
"""
self.data = data
self.left = None
self.right = None
| 22.153846 | 52 | 0.510417 |
79439b18c3912597cd972753b041dc6ba5f3ca7f | 3,134 | py | Python | rcsb/app/chem/convertTools.py | rcsb/py-rcsb_app_chem | c2a2465fa12ecb66dfcaf5fdc352d8b824bd21b4 | [
"Apache-2.0"
] | null | null | null | rcsb/app/chem/convertTools.py | rcsb/py-rcsb_app_chem | c2a2465fa12ecb66dfcaf5fdc352d8b824bd21b4 | [
"Apache-2.0"
] | 1 | 2021-08-10T14:52:12.000Z | 2021-08-10T15:08:43.000Z | rcsb/app/chem/convertTools.py | rcsb/py-rcsb_app_chem | c2a2465fa12ecb66dfcaf5fdc352d8b824bd21b4 | [
"Apache-2.0"
] | null | null | null | ##
# File: convertTools.py
# Date: 10-Decmber-2020 jdw
#
# Updates:
#
##
# pylint: skip-file
__docformat__ = "restructuredtext en"
__author__ = "John Westbrook"
__email__ = "john.westbrook@rcsb.org"
__license__ = "Apache 2.0"
import logging
from enum import Enum
# from typing import List
from fastapi import APIRout... | 35.213483 | 150 | 0.702936 |
79439b25270eae84af82de1bfab959e59655e80f | 25,586 | py | Python | lib/onigmo/onigmo.py | carrotop/fluent-bit | 7083a0edf480f09424f25c8e634e4996bf1e101b | [
"Apache-2.0"
] | 3,553 | 2015-01-29T21:43:36.000Z | 2022-03-31T08:41:59.000Z | lib/onigmo/onigmo.py | carrotop/fluent-bit | 7083a0edf480f09424f25c8e634e4996bf1e101b | [
"Apache-2.0"
] | 4,247 | 2015-05-20T15:59:38.000Z | 2022-03-31T23:19:12.000Z | lib/onigmo/onigmo.py | carrotop/fluent-bit | 7083a0edf480f09424f25c8e634e4996bf1e101b | [
"Apache-2.0"
] | 1,176 | 2015-05-20T08:31:11.000Z | 2022-03-31T22:40:08.000Z | # -*- coding: utf-8 -*-
"""Using Onigmo (Oniguruma-mod) regular expression library.
This is a low level wrapper for Onigmo regular expression DLL/shared object.
(This module does not support static link library.)
This provides almost same API as the original C API, so the API is not
object oriented.
Onigmo DLL (onig... | 40.742038 | 80 | 0.70222 |
79439cc92631b22d0a5023cbac9a9ec9ecb29493 | 9,505 | py | Python | sanic_ext/extensions/openapi/builders.py | ChihweiLHBird/sanic-ext | f0193a0cc89650a43c50fe543b43d1832307896f | [
"MIT"
] | null | null | null | sanic_ext/extensions/openapi/builders.py | ChihweiLHBird/sanic-ext | f0193a0cc89650a43c50fe543b43d1832307896f | [
"MIT"
] | null | null | null | sanic_ext/extensions/openapi/builders.py | ChihweiLHBird/sanic-ext | f0193a0cc89650a43c50fe543b43d1832307896f | [
"MIT"
] | null | null | null | """
Builders for the oas3 object types
These are completely internal, so can be refactored if desired without concern
for breaking user experience
"""
from collections import defaultdict
from typing import Optional
from ...utils.route import remove_nulls, remove_nulls_from_kwargs
from .autodoc import YamlStyleParamet... | 27.550725 | 78 | 0.582851 |
79439d4238f37334534f020b74192aeb0ee908e0 | 4,635 | py | Python | yaaz/src/optimisation.py | swasun/Yet-Another-AlphaZero | dc9fc185ecb1ba345be1c2b79bd0898c820d4d0c | [
"MIT"
] | 2 | 2019-03-13T18:00:21.000Z | 2020-06-16T03:30:40.000Z | yaaz/src/optimisation.py | swasun/Yet-Another-AlphaZero | dc9fc185ecb1ba345be1c2b79bd0898c820d4d0c | [
"MIT"
] | null | null | null | yaaz/src/optimisation.py | swasun/Yet-Another-AlphaZero | dc9fc185ecb1ba345be1c2b79bd0898c820d4d0c | [
"MIT"
] | null | null | null | #####################################################################################
# MIT License #
# #
# Copyright (C) 2019 Charly Lamothe ... | 50.380435 | 139 | 0.484574 |
79439d8a07e3e20e3a361afa525efba7ade7a0ae | 506 | py | Python | dotinstall/installer/util.py | TeeJayYang/dotinstall | d0ee99d264425fee7132623753717072e67a533b | [
"Apache-2.0",
"MIT"
] | 1 | 2019-09-04T02:52:51.000Z | 2019-09-04T02:52:51.000Z | dotinstall/installer/util.py | TeeJayYang/dotinstall | d0ee99d264425fee7132623753717072e67a533b | [
"Apache-2.0",
"MIT"
] | 3 | 2018-11-28T05:15:12.000Z | 2021-10-18T01:13:08.000Z | dotinstall/installer/util.py | TeeJayYang/dotinstall | d0ee99d264425fee7132623753717072e67a533b | [
"Apache-2.0",
"MIT"
] | 2 | 2017-10-30T23:14:36.000Z | 2018-11-27T03:46:24.000Z | from dotinstall.installer.apt_installer import AptInstaller
from dotinstall.installer.brew_installer import BrewInstaller
from dotinstall.installer.eopkg_installer import EopkgInstaller
from dotinstall.installer.pacman_installer import PacmanInstaller
installers = [AptInstaller(), BrewInstaller(), EopkgInstaller(), Pa... | 36.142857 | 83 | 0.798419 |
79439db88c6791357f555f69796702bfef10fd70 | 20,102 | py | Python | evolution.py | brianwgoldman/LengthBiasCGP | a81cf7215b2dd0a06412cae4626d37a943db6b85 | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2016-02-24T13:32:38.000Z | 2021-03-16T07:03:07.000Z | evolution.py | brianwgoldman/LengthBiasCGP | a81cf7215b2dd0a06412cae4626d37a943db6b85 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | evolution.py | brianwgoldman/LengthBiasCGP | a81cf7215b2dd0a06412cae4626d37a943db6b85 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | '''
Handles how to perform all of the actual evolution.
'''
import random
import sys
from copy import copy
from util import diff_count
from collections import defaultdict
class Individual(object):
'''
An individual object used to combine gene fitness with genomes, as
well methods for manipulating those ge... | 40.940937 | 79 | 0.593822 |
79439e40089d9b1cc00bb56d0d916cd55378fc77 | 2,644 | py | Python | url`s_and_templates/django101/settings.py | EmilianStoyanov/python-web | 60ddb1f0cc4c5bb1615317967c4da33c4171b27b | [
"MIT"
] | 3 | 2021-01-19T18:54:38.000Z | 2022-01-05T17:28:41.000Z | url`s_and_templates/django101/settings.py | EmilianStoyanov/python-web | 60ddb1f0cc4c5bb1615317967c4da33c4171b27b | [
"MIT"
] | null | null | null | url`s_and_templates/django101/settings.py | EmilianStoyanov/python-web | 60ddb1f0cc4c5bb1615317967c4da33c4171b27b | [
"MIT"
] | null | null | null | from os.path import join
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = 'yiamnr83kv$okon9j)d58t)(wr&_hb4f(yr#reec4$ae6s_t62'
DEBUG = True
ALLOWED_HOSTS = []
INSTALLED_APPS = [
'django.contrib.admin',
'... | 24.943396 | 91 | 0.677383 |
79439e72705d2c1de958b119ecc0dfe3284f8c29 | 5,791 | py | Python | tests/unit/wrappers/ensembles/test_ensembles.py | pavelg087/hcrystalball | 25f186dc72d4e273c6696a5c822f601d54bab734 | [
"MIT"
] | 1 | 2021-04-12T17:08:17.000Z | 2021-04-12T17:08:17.000Z | tests/unit/wrappers/ensembles/test_ensembles.py | pavelg087/hcrystalball | 25f186dc72d4e273c6696a5c822f601d54bab734 | [
"MIT"
] | null | null | null | tests/unit/wrappers/ensembles/test_ensembles.py | pavelg087/hcrystalball | 25f186dc72d4e273c6696a5c822f601d54bab734 | [
"MIT"
] | 1 | 2022-01-03T16:02:35.000Z | 2022-01-03T16:02:35.000Z | import pytest
import pandas as pd
import numpy as np
from sklearn.linear_model import LinearRegression
from sklearn.pipeline import Pipeline
from pandas.testing import assert_frame_equal
from hcrystalball.ensemble import StackingEnsemble, SimpleEnsemble
from hcrystalball.exceptions import DuplicatedModelNameError
@p... | 32.903409 | 99 | 0.625453 |
79439f10d84c1ca42f995d4097fb9362e7243099 | 25 | py | Python | data/studio21_generated/introductory/4215/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/4215/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/4215/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | def count_number(n, x):
| 12.5 | 23 | 0.68 |
79439f72a06999080c58c993e1f36a2f819d96a0 | 4,231 | py | Python | backtest/algos/trash/algo_ema_v1.py | block1o1/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | 4 | 2021-10-14T21:22:25.000Z | 2022-03-12T19:58:48.000Z | backtest/algos/trash/algo_ema_v1.py | inevolin/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | null | null | null | backtest/algos/trash/algo_ema_v1.py | inevolin/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | 1 | 2022-03-15T22:52:53.000Z | 2022-03-15T22:52:53.000Z |
import json
import sys
sys.dont_write_bytecode = True
import numpy as np
import datetime
import random
import math
import core
def run(debug):
base = "BTC"
#base = "ETH"
#base = "LTC"
quote = "USDT"
historymins = 60*24*30*1 #60*24*30*4
interval = 60
dtend = datetime.datetime.strptime('2... | 33.314961 | 111 | 0.491373 |
79439fd10a687de8f9739a63bb86e71c000f5a9b | 147 | py | Python | tests/expected/string_encoding.py | OctoPrint/codemods | 6c6cd4bd689582f906571951b0eb7729c4923b51 | [
"MIT"
] | 5 | 2020-10-06T12:02:23.000Z | 2021-04-26T00:31:55.000Z | tests/expected/string_encoding.py | OctoPrint/codemods | 6c6cd4bd689582f906571951b0eb7729c4923b51 | [
"MIT"
] | null | null | null | tests/expected/string_encoding.py | OctoPrint/codemods | 6c6cd4bd689582f906571951b0eb7729c4923b51 | [
"MIT"
] | 1 | 2020-10-10T17:18:39.000Z | 2020-10-10T17:18:39.000Z | temp_regex = rb"T:((\d*\.)\d+)"
temp_regex = rb"T:((\d*\.)\d+)"
"äöüß".encode()
"äöüß".encode()
b"Hello World"
b"Hello World"
b"Hello World"
| 10.5 | 31 | 0.564626 |
79439fd9b3c2f738920329a1f025d784fda4c140 | 12,711 | py | Python | coverage/results.py | nedbat/covcode | 59ce1f44c00b991c64efe8ecb0cf70c13dec5521 | [
"Apache-2.0"
] | null | null | null | coverage/results.py | nedbat/covcode | 59ce1f44c00b991c64efe8ecb0cf70c13dec5521 | [
"Apache-2.0"
] | null | null | null | coverage/results.py | nedbat/covcode | 59ce1f44c00b991c64efe8ecb0cf70c13dec5521 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""Results of coverage measurement."""
import collections
from coverage.debug import SimpleReprMixin
from coverage.exceptions import ConfigError
from coverage.mis... | 35.11326 | 92 | 0.61907 |
7943a0391aef87a77f55197b3b70173744eb560f | 448 | py | Python | ex033.py | Nawaus/Ex-curso-em-video | 3517248a0ecc3669608a8023075c166b007eaeec | [
"Unlicense"
] | 1 | 2021-11-27T01:39:58.000Z | 2021-11-27T01:39:58.000Z | ex033.py | Nawaus/Ex-curso-em-video | 3517248a0ecc3669608a8023075c166b007eaeec | [
"Unlicense"
] | null | null | null | ex033.py | Nawaus/Ex-curso-em-video | 3517248a0ecc3669608a8023075c166b007eaeec | [
"Unlicense"
] | null | null | null | #033
a = int(input('Primeiro valor: '))
b = int(input('Segundo valor: '))
c = int(input('Terceiro valor: '))
# Verificando o quem é menor
menor = a
if b < a and b < c:
menor = a
if c < a and c < b:
menor = c
# Verificando quem é maior
maior = a
if b > a and b > c:
maior = b
if c > a and c >... | 23.578947 | 53 | 0.578125 |
7943a0b6fcb8862938e558bdbbfe9bf903b36bec | 5,755 | py | Python | .github/scripts/deploy.py | rse-ops/proposals | a09790692c6b09dc7d1400b8f8dde49dd886cca8 | [
"MIT"
] | null | null | null | .github/scripts/deploy.py | rse-ops/proposals | a09790692c6b09dc7d1400b8f8dde49dd886cca8 | [
"MIT"
] | null | null | null | .github/scripts/deploy.py | rse-ops/proposals | a09790692c6b09dc7d1400b8f8dde49dd886cca8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# This script does the following.
# 1. Takes in a space separated list of changed files
# 2. For each changed file, adds a header (title) based on the filename
# 3. Sets output for the prepared files to move into the site
import argparse
import os
import json
import re
import sys
import tempfil... | 26.278539 | 97 | 0.631972 |
7943a0d84e5541c5310d3b230ae410809c8ec659 | 2,479 | py | Python | util/compute_bootstrap.py | AnneBeyer/tgen | f7d7d13a85b8fd35919097c7d11345ddb9775d26 | [
"Apache-2.0"
] | 222 | 2015-06-15T14:39:41.000Z | 2022-03-12T03:45:32.000Z | util/compute_bootstrap.py | AnneBeyer/tgen | f7d7d13a85b8fd35919097c7d11345ddb9775d26 | [
"Apache-2.0"
] | 40 | 2015-12-02T10:42:44.000Z | 2021-12-05T17:31:11.000Z | util/compute_bootstrap.py | AnneBeyer/tgen | f7d7d13a85b8fd35919097c7d11345ddb9775d26 | [
"Apache-2.0"
] | 72 | 2015-07-27T08:11:48.000Z | 2022-03-24T14:25:37.000Z | #!/usr/bin/env python
# -"- coding: utf-8 -"-
from argparse import ArgumentParser
import os
import re
from subprocess import call
from tgen.logf import log_info
MY_PATH = os.path.dirname(os.path.abspath(__file__))
def lcall(arg_str):
log_info(arg_str)
return call(arg_str, shell=True)
def get_confidence(m... | 34.915493 | 99 | 0.626059 |
7943a128bfb949a033d9c02de7e9e524c93c5a37 | 558 | py | Python | ogn_lib/constants.py | akolar/ogn-lib | 6b307cad9bf82316a69bb8c82ebfa734040e2689 | [
"MIT"
] | null | null | null | ogn_lib/constants.py | akolar/ogn-lib | 6b307cad9bf82316a69bb8c82ebfa734040e2689 | [
"MIT"
] | 17 | 2017-12-16T12:49:18.000Z | 2018-05-21T10:12:29.000Z | ogn_lib/constants.py | akolar/ogn-lib | 6b307cad9bf82316a69bb8c82ebfa734040e2689 | [
"MIT"
] | null | null | null | import enum
class AirplaneType(enum.Enum):
unknown = 0
glider = 1
tow_plane = 2
helicopter_rotorcraft = 3
parachute = 4
drop_plane = 5
hang_glider = 6
paraglider = 7
powered_aircraft = 8
jet_aircraft = 9
ufo = 10
baloon = 11
airship = 12
uav = 13
static_obje... | 16.411765 | 30 | 0.623656 |
7943a185bdfa57c7369d17cea134abbeca2ae127 | 502 | py | Python | longes_sequence/tests/test_4.py | NikolayLutakov/FMI-Python-Basics | 1712ae4aec8371f1144aa83d579d2151e1ea7eaa | [
"MIT"
] | null | null | null | longes_sequence/tests/test_4.py | NikolayLutakov/FMI-Python-Basics | 1712ae4aec8371f1144aa83d579d2151e1ea7eaa | [
"MIT"
] | null | null | null | longes_sequence/tests/test_4.py | NikolayLutakov/FMI-Python-Basics | 1712ae4aec8371f1144aa83d579d2151e1ea7eaa | [
"MIT"
] | null | null | null | from solution_logic import solution
rows = 0
cols = 0
test_matrix_4 = []
def fill_test_matrix_4():
for row in range(rows):
str_arr = input().split(' ')
line = [str(num) for num in str_arr]
test_matrix_4.append(line)
def create_test_4():
str_arr = input().split(' ')
dimensions =... | 17.928571 | 46 | 0.63745 |
7943a193cfe352ce2d878ea0ec30408da173f611 | 2,107 | py | Python | src/freemovr_engine/plot_utils.py | strawlab/flyvr | 335892cae740e53e82e07b526e1ba53fbd34b0ce | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3 | 2015-01-29T14:09:25.000Z | 2016-04-24T04:25:49.000Z | src/freemovr_engine/plot_utils.py | strawlab/flyvr | 335892cae740e53e82e07b526e1ba53fbd34b0ce | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | src/freemovr_engine/plot_utils.py | strawlab/flyvr | 335892cae740e53e82e07b526e1ba53fbd34b0ce | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from pymvg.plot_utils import plot_camera
def get_3d_verts(geom):
allw = []
res_u = 32
res_v = 5
for tc1 in np.linspace(0,1,res_v):
tc = np.vstack( (
np.linspace(0,1.,res_u),
tc1*np.ones( (res_u,) ),
... | 35.711864 | 93 | 0.456573 |
7943a1c5a5d0ce1cb84fd764615f9828b0d89135 | 1,050 | py | Python | boids/command.py | irinagrigorescu/bad_boids | 5508f1b246041c57df95af1f641b1c90c369befe | [
"MIT"
] | null | null | null | boids/command.py | irinagrigorescu/bad_boids | 5508f1b246041c57df95af1f641b1c90c369befe | [
"MIT"
] | null | null | null | boids/command.py | irinagrigorescu/bad_boids | 5508f1b246041c57df95af1f641b1c90c369befe | [
"MIT"
] | null | null | null | import sys
from argparse import ArgumentParser
from matplotlib import animation
from matplotlib import pyplot as plt
from flock import Flock
from animator import FlockAnimator
# Command line entry point
def process():
parser = ArgumentParser(description = \
"Simulate the motion of a flock of birds")
... | 25.609756 | 79 | 0.640952 |
7943a1fabc9a00f980fbaa46319c2d17ede4b6ff | 1,278 | py | Python | team_10/haiku.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | 1 | 2019-09-15T18:59:49.000Z | 2019-09-15T18:59:49.000Z | team_10/haiku.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | null | null | null | team_10/haiku.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | null | null | null | import wave
import os
import random
import sys
WORDS = {
1: [
'a',
'and',
'the',
'code',
'get',
'dance',
'will',
'fork',
'git',
'snake',
'plant',
'trees',
],
2: [
'python',
'dojo',
'danci... | 17.75 | 61 | 0.435837 |
7943a2a352a12510ccb18760d9656a6cd9e8f55b | 1,388 | py | Python | nagini/star.py | bmorris3/nagini | f020e5ec97b29274d6b4105c909efd64b86f0b85 | [
"BSD-3-Clause"
] | 1 | 2018-02-13T19:51:47.000Z | 2018-02-13T19:51:47.000Z | rms/star.py | bmorris3/rms | 4239e488f6fae9869782ffbac9f39747b58afdda | [
"MIT"
] | null | null | null | rms/star.py | bmorris3/rms | 4239e488f6fae9869782ffbac9f39747b58afdda | [
"MIT"
] | 1 | 2018-11-23T20:57:09.000Z | 2018-11-23T20:57:09.000Z | # Licensed under the MIT License - see LICENSE
from .planet import Planet
__all__ = ['Star']
class Star(object):
"""
An object for stellar parameters, to use as inputs for STSP.
"""
def __init__(self, planet=None, rotation_period=None, inc_stellar=None,
spot_contrast=0.7, u=[0.2, 0.... | 30.844444 | 79 | 0.592939 |
7943a424a3c3f3d5a9c8fab3ab65eaef86b9a686 | 29,070 | py | Python | tests/test_hooks/conan-center/test_conan-center.py | Minimonium/hooks | 92a4ade551dab17c497244f42dc51328cc7fee2e | [
"MIT"
] | null | null | null | tests/test_hooks/conan-center/test_conan-center.py | Minimonium/hooks | 92a4ade551dab17c497244f42dc51328cc7fee2e | [
"MIT"
] | null | null | null | tests/test_hooks/conan-center/test_conan-center.py | Minimonium/hooks | 92a4ade551dab17c497244f42dc51328cc7fee2e | [
"MIT"
] | null | null | null | import os
import platform
import textwrap
import pytest
from conans import tools
from conans.client.command import ERROR_INVALID_CONFIGURATION, SUCCESS
from conans.tools import Version
from conans import __version__ as conan_version
from tests.utils.test_cases.conan_client import ConanClientTestCase
class ConanCent... | 48.45 | 114 | 0.595356 |
7943a57efa6eee80c17abe87f852e0d90ab24f29 | 2,211 | py | Python | misc/process_boundary_flux.py | diamondjems016/galaxy_analysis | fa1367085a6b9870de2546daf3163aaa41129ea0 | [
"MIT"
] | 1 | 2021-01-15T15:33:05.000Z | 2021-01-15T15:33:05.000Z | misc/process_boundary_flux.py | diamondjems016/galaxy_analysis | fa1367085a6b9870de2546daf3163aaa41129ea0 | [
"MIT"
] | null | null | null | misc/process_boundary_flux.py | diamondjems016/galaxy_analysis | fa1367085a6b9870de2546daf3163aaa41129ea0 | [
"MIT"
] | 1 | 2020-11-29T00:15:25.000Z | 2020-11-29T00:15:25.000Z | """
process_boundary_flux
Author: A. Emerick
Notes: script and functions to process output
from domain boundary mass flux computation
"""
import numpy as np
import os
import subprocess
__all__ = ['process_boundary_flux']
def process_boundary_flux(data = None, filename = None, wdir = '.'):
... | 27.6375 | 82 | 0.632293 |
7943a6038687525beb95d2f8e78a37df30387a66 | 2,130 | py | Python | sarpy/utils/create_kmz.py | bombaci-vsc/sarpy | 3e31e9d7fca77612b60f2507f6f7068d1660a3e2 | [
"MIT"
] | 119 | 2018-07-12T22:08:17.000Z | 2022-03-24T12:11:39.000Z | sarpy/utils/create_kmz.py | bombaci-vsc/sarpy | 3e31e9d7fca77612b60f2507f6f7068d1660a3e2 | [
"MIT"
] | 72 | 2018-03-29T15:57:37.000Z | 2022-03-10T01:46:21.000Z | sarpy/utils/create_kmz.py | bombaci-vsc/sarpy | 3e31e9d7fca77612b60f2507f6f7068d1660a3e2 | [
"MIT"
] | 54 | 2018-03-27T19:57:20.000Z | 2022-03-09T20:53:11.000Z | """
Create kmz products based on SICD type reader.
For a basic help on the command-line, check
>>> python -m sarpy.utils.create_kmz --help
"""
import argparse
import logging
import os
from sarpy.io.complex.converter import open_complex
from sarpy.io.product.kmz_product_creation import create_kmz_view
__classifica... | 39.444444 | 117 | 0.679343 |
7943a77ef8e29d915df5662636770bb2a29a4282 | 6,034 | py | Python | netanalysis/ooni/ooni_client.py | dharmaxbum1/net-analysis | 94c9b7fc68be56c17cc1bf076681e4260ba4728b | [
"Apache-2.0"
] | 1 | 2019-12-23T05:07:41.000Z | 2019-12-23T05:07:41.000Z | netanalysis/ooni/ooni_client.py | dharmaxbum1/net-analysis | 94c9b7fc68be56c17cc1bf076681e4260ba4728b | [
"Apache-2.0"
] | null | null | null | netanalysis/ooni/ooni_client.py | dharmaxbum1/net-analysis | 94c9b7fc68be56c17cc1bf076681e4260ba4728b | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Jigsaw Operations LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 36.349398 | 103 | 0.673682 |
7943a7c9b028e696b387ff15afb5ee2a225928cc | 3,318 | py | Python | examples/undocumented/python/evaluation_cross_validation_mkl_weight_storage.py | mrkarna/shogun | dc4b41d8e3cdaecf39c59d2414d68b424a448da7 | [
"BSD-3-Clause"
] | null | null | null | examples/undocumented/python/evaluation_cross_validation_mkl_weight_storage.py | mrkarna/shogun | dc4b41d8e3cdaecf39c59d2414d68b424a448da7 | [
"BSD-3-Clause"
] | null | null | null | examples/undocumented/python/evaluation_cross_validation_mkl_weight_storage.py | mrkarna/shogun | dc4b41d8e3cdaecf39c59d2414d68b424a448da7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# This software is distributed under BSD 3-clause license (see LICENSE file).
#
# Authors: Heiko Strathmann
from numpy.random import randn
from numpy import *
# generate some overlapping training vectors
num_vectors=5
vec_distance=1
traindat=concatenate((randn(2,num_vectors)-vec_distance,
rand... | 37.704545 | 101 | 0.768837 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.