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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
214546260386845778dffd67faecfd0a8712a051 | 1,170 | py | Python | tests/seed.py | JasonGiedymin/elk-butler | d83b7459ac57961151bf1f4f9754cd50065cba70 | [
"Apache-2.0"
] | null | null | null | tests/seed.py | JasonGiedymin/elk-butler | d83b7459ac57961151bf1f4f9754cd50065cba70 | [
"Apache-2.0"
] | null | null | null | tests/seed.py | JasonGiedymin/elk-butler | d83b7459ac57961151bf1f4f9754cd50065cba70 | [
"Apache-2.0"
] | null | null | null | #
# Integration Testing Tools
#
# DO NOT USE THE BUTLER LIBRARY USE, RAW CLIENT CODE HERE
#
from butler import clients
from datetime import datetime
TEST_INDEX = 'data-2016.04.01'
def load_data():
"""
Load test data for integration tests.
"""
doc_type = 'testdata'
doc = {
'author': 'T... | 18.870968 | 71 | 0.62735 |
21454e6fd6f8ef87d16d9c53037dd5783348edf6 | 11,667 | py | Python | bs4/builder/__init__.py | qbosen/leetcode_file_generator | 594d7bb1e5ac5cb3100ddbaecc3f8359c17dbbb8 | [
"MIT"
] | 1 | 2018-08-28T09:09:14.000Z | 2018-08-28T09:09:14.000Z | application/physical/otmr/scraper/lib/bs4/builder/__init__.py | cprior/finance-stuff | 6a9389456e1068e0e8fc6bd83c87b8144a6390bf | [
"MIT"
] | 2 | 2021-03-31T19:21:08.000Z | 2021-12-13T20:29:49.000Z | application/physical/otmr/scraper/lib/bs4/builder/__init__.py | cprior/finance-stuff | 6a9389456e1068e0e8fc6bd83c87b8144a6390bf | [
"MIT"
] | 1 | 2018-09-02T15:43:32.000Z | 2018-09-02T15:43:32.000Z | # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from collections import defaultdict
import itertools
import sys
from bs4.element import (
CharsetMetaAttributeValue,
ContentMetaAttributeValue,
HTMLAwareEntitySubstitution,
whitespace_re
)
__all__... | 34.931138 | 140 | 0.616954 |
214563a4ff48984130b21add883ccd5ac25a0a33 | 7,165 | py | Python | models/convlstm.py | brandontan99/D2HC-RMVSNet | c4615c2d7c212b9b247da6fc0e0e110344b1b0ce | [
"MIT"
] | 91 | 2020-08-14T15:43:48.000Z | 2022-03-24T11:07:40.000Z | models/convlstm.py | brandontan99/D2HC-RMVSNet | c4615c2d7c212b9b247da6fc0e0e110344b1b0ce | [
"MIT"
] | 15 | 2020-08-29T02:25:20.000Z | 2022-03-13T06:34:11.000Z | models/convlstm.py | brandontan99/D2HC-RMVSNet | c4615c2d7c212b9b247da6fc0e0e110344b1b0ce | [
"MIT"
] | 7 | 2020-11-02T12:47:49.000Z | 2021-07-27T07:13:27.000Z | import torch.nn as nn
from torch.autograd import Variable
import torch
from .module import *
class ConvLSTMCell(nn.Module):
def __init__(self, input_size, input_dim, hidden_dim, kernel_size, bias=True):
"""
Initialize ConvLSTM cell.
Parameters
----------
input_siz... | 37.317708 | 117 | 0.590509 |
21456915107b24e16bc1bf65d5423387abebf93e | 2,604 | py | Python | preprocessing/smri/recon_all/stats.py | GalBenZvi/BrainPrint | 8dda22f130f60bac66fe05f0f5163ee3680616f5 | [
"Apache-2.0"
] | null | null | null | preprocessing/smri/recon_all/stats.py | GalBenZvi/BrainPrint | 8dda22f130f60bac66fe05f0f5163ee3680616f5 | [
"Apache-2.0"
] | 1 | 2021-08-12T07:54:37.000Z | 2021-08-12T07:54:37.000Z | preprocessing/smri/recon_all/stats.py | GalBenZvi/BrainPrint | 8dda22f130f60bac66fe05f0f5163ee3680616f5 | [
"Apache-2.0"
] | 1 | 2021-08-08T11:56:19.000Z | 2021-08-08T11:56:19.000Z | """
Definition of the :class:`ReconAllStats` class.
"""
from pathlib import Path
from typing import Dict, List
import pandas as pd
COLUMNS_TO_INT: List[str] = [
"Number of Vertices",
"Surface Area",
"Gray Matter Volume",
"Folding Index",
]
HEMISPHERES: Dict[str, str] = {"Left": "lh", "Right": "rh"}
AT... | 30.27907 | 78 | 0.577573 |
2145b15a4a453aade1a80bc1cd88185b88b4b5cd | 4,153 | py | Python | tictactoe.py | Elshan777/TicTacToe | 80c21c30ba86edaceb77ee0523bacd5e8990ea8f | [
"MIT"
] | null | null | null | tictactoe.py | Elshan777/TicTacToe | 80c21c30ba86edaceb77ee0523bacd5e8990ea8f | [
"MIT"
] | null | null | null | tictactoe.py | Elshan777/TicTacToe | 80c21c30ba86edaceb77ee0523bacd5e8990ea8f | [
"MIT"
] | null | null | null | """
Tic Tac Toe Player
"""
import math
import copy
X = "X"
O = "O"
EMPTY = None
def initial_state():
"""
Returns starting state of the board.
"""
return [[EMPTY, EMPTY, EMPTY],
[EMPTY, EMPTY, EMPTY],
[EMPTY, EMPTY, EMPTY]]
def player(board):
"""
Returns player who h... | 23.731429 | 111 | 0.544185 |
21462894b205f67c8b7ceef4a527935cf92444f4 | 5,581 | py | Python | MachineLearning/TensorFlow/image-clssifier/nets/nets_factory.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | MachineLearning/TensorFlow/image-clssifier/nets/nets_factory.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | MachineLearning/TensorFlow/image-clssifier/nets/nets_factory.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | # coding:UTF-8
# 2019-1-6
# 训练模型选择入口
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools
import tensorflow as tf
from nets import alexnet
from nets import cifarnet
from nets import inception
from nets import lenet
from nets import mobilenet_v1... | 43.944882 | 78 | 0.648271 |
21464786c961a21c218edb4b0faed84ff0263553 | 16,442 | py | Python | python/osr/osr_basic_test.py | schwehr/gdal-autotest2 | e153b594162f6554280212d919e645b0f01bf7e6 | [
"Apache-2.0"
] | null | null | null | python/osr/osr_basic_test.py | schwehr/gdal-autotest2 | e153b594162f6554280212d919e645b0f01bf7e6 | [
"Apache-2.0"
] | 4 | 2017-01-25T18:11:31.000Z | 2017-04-04T20:51:45.000Z | python/osr/osr_basic_test.py | schwehr/gdal-autotest2 | e153b594162f6554280212d919e645b0f01bf7e6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2014 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 ... | 40.102439 | 79 | 0.614098 |
21468bca0ca2d8868748f5719bd56d4bf93b2d17 | 74,781 | py | Python | controllers/inv.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | 1 | 2018-01-06T12:58:32.000Z | 2018-01-06T12:58:32.000Z | controllers/inv.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | null | null | null | controllers/inv.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Inventory Management
A module to record inventories of items at a locations (sites),
including Warehouses, Offices, Shelters & Hospitals
"""
module = request.controller
resourcename = request.function
if not settings.has_module(module):
raise HTTP(404, body="Module disabl... | 44.249112 | 141 | 0.467097 |
2146d332cbf27e6f6c9775a0b34a9aa3b9f25eff | 8,217 | py | Python | toontown/estate/SpecialsPhoto.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/estate/SpecialsPhoto.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/estate/SpecialsPhoto.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 panda3d.core import *
from direct.interval.IntervalGlobal import *
from toontown.fishing import FishGlobals
import GardenGlobals
from direct.actor import Actor
import random
class DirectRegion(NodePath):
notify = DirectNotifyGlobal.directNotify.newCategory('D... | 37.35 | 88 | 0.603992 |
2146e5002865fa85cfb9d90a013868dccc847dc5 | 2,675 | py | Python | classical/main.py | psorus/gradeopt | 65b11fc3527904ec45b07ffa962fa4df63d2e41e | [
"MIT"
] | null | null | null | classical/main.py | psorus/gradeopt | 65b11fc3527904ec45b07ffa962fa4df63d2e41e | [
"MIT"
] | null | null | null | classical/main.py | psorus/gradeopt | 65b11fc3527904ec45b07ffa962fa4df63d2e41e | [
"MIT"
] | null | null | null | import os
import json
import numpy as np
from lister import *
def load(q,q0=""):
if len(str(q0))>0:q=q+" (="+str(q0)+")"
x=input(q+":\n")
if len(x)==0:x=str(q0)
return x
def loadlist(q,p):
print(q)
ret=[]
while True:
ac=[]
for zw in p:
ac.append(load(zw))
ret.append(ac)
cont=... | 21.747967 | 229 | 0.659813 |
21471805200eec430e6c1d1a01ce0fb5373f074e | 25,928 | py | Python | SphinxReport/DataTree.py | Tim-HU/sphinx-report | 3a0dc225e594c4b2083dff7a93b6d77054256416 | [
"BSD-2-Clause"
] | 1 | 2020-04-10T12:48:40.000Z | 2020-04-10T12:48:40.000Z | SphinxReport/DataTree.py | Tim-HU/sphinx-report | 3a0dc225e594c4b2083dff7a93b6d77054256416 | [
"BSD-2-Clause"
] | null | null | null | SphinxReport/DataTree.py | Tim-HU/sphinx-report | 3a0dc225e594c4b2083dff7a93b6d77054256416 | [
"BSD-2-Clause"
] | null | null | null | import collections, itertools
from logging import warn, log, debug, info
from collections import OrderedDict as odict
from SphinxReport import Utils
import pandas
def unique( iterables ):
s = set()
for x in iterables:
if x not in s:
yield x
s.add(x)
def path2str( path ):
'... | 31.931034 | 96 | 0.534249 |
214719ae95e5052d1ced99f3d2ecb7968f87b017 | 7,094 | py | Python | src/houdini_package_runner/config.py | captainhammy/houdini_package_runner | 40f8b60ebe32c64fd9b37328a9a5eefacd1c6ebd | [
"MIT"
] | 3 | 2022-02-06T23:31:17.000Z | 2022-02-07T11:10:03.000Z | src/houdini_package_runner/config.py | captainhammy/houdini_package_runner | 40f8b60ebe32c64fd9b37328a9a5eefacd1c6ebd | [
"MIT"
] | null | null | null | src/houdini_package_runner/config.py | captainhammy/houdini_package_runner | 40f8b60ebe32c64fd9b37328a9a5eefacd1c6ebd | [
"MIT"
] | null | null | null | """Functioned related to configuration of houdini_package_runner."""
# Future
from __future__ import annotations
# Standard Library
import abc
import importlib.resources
import os
import pathlib
from typing import TYPE_CHECKING, Dict, List, Tuple
# Third Party
import deepmerge
import toml
# Imports for type checkin... | 27.710938 | 88 | 0.532845 |
21472e536b68582fd184ecba8111a55934c25fc3 | 315 | py | Python | xpython/byteop/byteop32pypy.py | rocky/xpython | ce4ed4329cee2af0aab94254276f5a5687dd25f9 | [
"MIT"
] | 1 | 2020-04-28T13:18:13.000Z | 2020-04-28T13:18:13.000Z | xpython/byteop/byteop32pypy.py | rocky/xbyterun | fde8f8a31ffd3e3c4545d76b4b1edf4b7e0191d9 | [
"MIT"
] | null | null | null | xpython/byteop/byteop32pypy.py | rocky/xbyterun | fde8f8a31ffd3e3c4545d76b4b1edf4b7e0191d9 | [
"MIT"
] | null | null | null | """Bytecode Interpreter operations for PyPy 3.2
"""
from xpython.byteop.byteop32 import ByteOp32
from xpython.byteop.byteoppypy import ByteOpPyPy
class ByteOp32PyPy(ByteOp32, ByteOpPyPy):
def __init__(self, vm):
super(ByteOp32PyPy, self).__init__(vm)
self.version = "3.2.6 (x-python)\n[PyPy]"
| 28.636364 | 49 | 0.726984 |
21473496b2d001660111f1dedcaf7d557c6a17b3 | 516 | py | Python | test/l2_lazy/blackbox_test.py | AnotherKamila/sdn-loadbalancer | 34fa80d05d9751aaec42490a7e3883267ea6ebfc | [
"MIT"
] | 6 | 2019-04-28T15:27:09.000Z | 2021-05-24T10:43:44.000Z | test/l2_lazy/blackbox_test.py | AnotherKamila/sdn-loadbalancer | 34fa80d05d9751aaec42490a7e3883267ea6ebfc | [
"MIT"
] | null | null | null | test/l2_lazy/blackbox_test.py | AnotherKamila/sdn-loadbalancer | 34fa80d05d9751aaec42490a7e3883267ea6ebfc | [
"MIT"
] | 1 | 2019-11-12T07:34:50.000Z | 2019-11-12T07:34:50.000Z | from myutils.testhelpers import ping_all, netcat_all
# Arguments in pytest are magic:
# * if you declare an argument called p4run, it will take care of p4run for you
# (and you can use p4run.topo and some utility methods in the tests)
# * the argument controller will run the controller for each switch in the topolog... | 39.692308 | 83 | 0.763566 |
21474f33bf4cb31dd1828236bed641eee945b888 | 2,595 | py | Python | pipeline/run-alignment-filter.py | qfma/ohnologdc | ab1f59de13be10b3fd3503c14a0d97dd37bcf937 | [
"MIT"
] | null | null | null | pipeline/run-alignment-filter.py | qfma/ohnologdc | ab1f59de13be10b3fd3503c14a0d97dd37bcf937 | [
"MIT"
] | null | null | null | pipeline/run-alignment-filter.py | qfma/ohnologdc | ab1f59de13be10b3fd3503c14a0d97dd37bcf937 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
#
# run-tophat.py
#==============================================================================
import argparse
import sys
import pysam
import os
from utilities.runner import multiprocess
#========================================================================... | 30.529412 | 79 | 0.544123 |
21475eeccf9cca59969d90949ee233aaa5181342 | 1,082 | py | Python | system-tests/rotate-cube.py | DaAwesomeP/ARENA-py | 876a6b0c6800d7c2b1a592fd5f25529b9c140efc | [
"BSD-3-Clause"
] | 4 | 2021-01-22T23:49:52.000Z | 2022-03-04T06:01:18.000Z | system-tests/rotate-cube.py | DaAwesomeP/ARENA-py | 876a6b0c6800d7c2b1a592fd5f25529b9c140efc | [
"BSD-3-Clause"
] | 50 | 2020-08-14T22:24:36.000Z | 2022-03-18T20:41:12.000Z | system-tests/rotate-cube.py | DaAwesomeP/ARENA-py | 876a6b0c6800d7c2b1a592fd5f25529b9c140efc | [
"BSD-3-Clause"
] | 10 | 2019-10-28T20:15:18.000Z | 2021-06-29T18:02:06.000Z | # rotate-cube.py
#
# Rotates a color changing box. Tests making and updating Euler Rotation and Color Attributes.
from arena import *
import random
# start ARENA client
scene = Scene(host="arenaxr.org", scene="test")
box = Box(object_id="box", position=(0,4,-2), scale=Scale(2,2,2), rotation=(0,0,0), color=Color(0,0... | 25.761905 | 103 | 0.638632 |
2147627c6e4e7cb6f11f1abacfba8aee2865e0ba | 1,221 | py | Python | potion/notion_database.py | cardosofede/potion | 478d869c7745736d2d5691545366611b96795de4 | [
"MIT"
] | null | null | null | potion/notion_database.py | cardosofede/potion | 478d869c7745736d2d5691545366611b96795de4 | [
"MIT"
] | null | null | null | potion/notion_database.py | cardosofede/potion | 478d869c7745736d2d5691545366611b96795de4 | [
"MIT"
] | null | null | null | import pandas as pd
from glom import *
class NotionDatabase:
def __init__(self, response):
self._notion_response = response
self._df = self.transform_json_to_df()
@property
def df(self):
return self._df
def transform_json_to_df(self):
spec = {'properties': (T['propert... | 42.103448 | 106 | 0.364455 |
2147af99d0f18c2a3c5ba423ebbfe583edba432d | 2,788 | py | Python | st2common/tests/unit/test_keyvalue_lookup.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2020-11-21T10:11:25.000Z | 2020-11-21T10:11:25.000Z | st2common/tests/unit/test_keyvalue_lookup.py | FairwindsOps/st2 | 2b76ca740c4af0d6b2c1d1ba5534ce4133fd16fa | [
"Apache-2.0"
] | 1 | 2015-06-08T15:27:11.000Z | 2015-06-08T15:27:11.000Z | st2common/tests/unit/test_keyvalue_lookup.py | FairwindsOps/st2 | 2b76ca740c4af0d6b2c1d1ba5534ce4133fd16fa | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 46.466667 | 81 | 0.708752 |
2147b6587193dc87ea6b49832aae0de1056e5bef | 2,575 | py | Python | pandocmk/watch.py | sergiocorreia/pandocmk | dc441c36be8d3b46f1f92941013c06825519c1d8 | [
"MIT"
] | 9 | 2019-12-17T14:14:23.000Z | 2022-01-24T20:25:08.000Z | pandocmk/watch.py | sergiocorreia/pandocmk | dc441c36be8d3b46f1f92941013c06825519c1d8 | [
"MIT"
] | null | null | null | pandocmk/watch.py | sergiocorreia/pandocmk | dc441c36be8d3b46f1f92941013c06825519c1d8 | [
"MIT"
] | null | null | null | """
Code related to monitoring changes to input files
"""
# ---------------------------
# Imports
# ---------------------------
import time
import datetime
from pathlib import Path
from watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
from .core import build_output
class Markd... | 27.98913 | 173 | 0.619806 |
2147e0bb4047726ca66ba400837e5e80562ceea3 | 1,686 | py | Python | marqeta/response_models/offer_model.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 21 | 2019-04-12T09:02:17.000Z | 2022-02-18T11:39:06.000Z | marqeta/response_models/offer_model.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 1 | 2020-07-22T21:27:40.000Z | 2020-07-23T17:38:43.000Z | marqeta/response_models/offer_model.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 10 | 2019-05-08T14:20:37.000Z | 2021-09-20T18:09:26.000Z | from datetime import datetime, date
from marqeta.response_models import datetime_object
import json
import re
class OfferModel(object):
def __init__(self, json_response):
self.json_response = json_response
def __str__(self):
return json.dumps(self.json_response, default=self.json_serial)
... | 24.434783 | 83 | 0.676157 |
214842c925641c05def311c885f2c4d73359c47d | 5,357 | py | Python | cinder/tests/unit/api/openstack/test_api_version_request.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/api/openstack/test_api_version_request.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-25T13:04:01.000Z | 2019-08-17T13:15:24.000Z | cinder/tests/unit/api/openstack/test_api_version_request.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-17T13:32:50.000Z | 2018-11-08T08:39:39.000Z | # Copyright 2014 IBM Corp.
# Copyright 2015 Clinton Knight
# 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... | 35.243421 | 78 | 0.648871 |
21486dbe0ce9ab542976f7a14579bab97858573a | 6,133 | py | Python | blatann/gatt/__init__.py | dkkeller/blatann | 2b72df4812f68fb718ab96d16c82343ee35969a5 | [
"BSD-3-Clause"
] | null | null | null | blatann/gatt/__init__.py | dkkeller/blatann | 2b72df4812f68fb718ab96d16c82343ee35969a5 | [
"BSD-3-Clause"
] | null | null | null | blatann/gatt/__init__.py | dkkeller/blatann | 2b72df4812f68fb718ab96d16c82343ee35969a5 | [
"BSD-3-Clause"
] | null | null | null | import enum
import logging
import struct
from blatann.nrf.nrf_types.gatt import BLE_GATT_HANDLE_INVALID
from blatann.nrf import nrf_types
from blatann.gap.smp import SecurityLevel
logger = logging.getLogger(__name__)
"""
The default MTU size that's used when a connection is established
"""
MTU_SIZE_DEFA... | 32.278947 | 113 | 0.622697 |
21487d5c60482197db6bf7ff2350a9375f6792ec | 19,750 | py | Python | src/nsre/regexp.py | Xowap/nsre | ae2adc4eb49bf0c60ec9cba020f729ad74ed65c5 | [
"WTFPL"
] | 1 | 2020-05-31T18:57:23.000Z | 2020-05-31T18:57:23.000Z | src/nsre/regexp.py | Xowap/nsre | ae2adc4eb49bf0c60ec9cba020f729ad74ed65c5 | [
"WTFPL"
] | 5 | 2019-07-26T11:23:12.000Z | 2020-05-31T19:32:37.000Z | src/nsre/regexp.py | Xowap/nsre | ae2adc4eb49bf0c60ec9cba020f729ad74ed65c5 | [
"WTFPL"
] | 1 | 2020-06-03T06:37:51.000Z | 2020-06-03T06:37:51.000Z | from dataclasses import dataclass
from itertools import product
from types import MappingProxyType
from typing import Dict, Generic, Iterator, List, Mapping, Sequence, Text, Tuple
import networkx as nx
# noinspection PyProtectedMember
from .ast import (
Alternation,
AnyNumber,
Capture,
Concatenation,
... | 30.060883 | 88 | 0.611544 |
2148aa9b0eb595aa33dfb1ac510df5e8e6547d76 | 11,024 | py | Python | tests/integration/integration_test_case.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | tests/integration/integration_test_case.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | tests/integration/integration_test_case.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | import json
import os
import re
import unittest
import zlib
import fakeredis
from bs4 import BeautifulSoup
from itsdangerous import base64_decode
from mock import patch
from sdc.crypto.key_store import KeyStore
from app.keys import KEY_PURPOSE_AUTHENTICATION, KEY_PURPOSE_SUBMISSION
from app.setup import create_app
fr... | 32.809524 | 88 | 0.619467 |
2148ab5aef46d88efb807cdb4d307dac185bae79 | 1,190 | py | Python | setup.py | dec-heim/nempy | 10c304cd6c756ffb9d8038c45b6b8251584d7a0c | [
"BSD-3-Clause"
] | null | null | null | setup.py | dec-heim/nempy | 10c304cd6c756ffb9d8038c45b6b8251584d7a0c | [
"BSD-3-Clause"
] | null | null | null | setup.py | dec-heim/nempy | 10c304cd6c756ffb9d8038c45b6b8251584d7a0c | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="nempy",
version="1.1.3",
description="A flexible tool kit for modelling Australia's National Electricity Market dispatch procedure.",
packages=find_packages(),
long_descript... | 29.75 | 112 | 0.582353 |
2148c5dff461752e61da26ad0520afb30a3c23a6 | 4,137 | py | Python | tests/test_feed.py | mrcagney/gtfs_k | 746ef0d983e3f52cbc4b792728395513e7181ed5 | [
"MIT"
] | 47 | 2019-09-11T19:03:22.000Z | 2022-03-23T13:54:11.000Z | tests/test_feed.py | mrcagney/gtfs_k | 746ef0d983e3f52cbc4b792728395513e7181ed5 | [
"MIT"
] | 8 | 2019-11-01T09:13:50.000Z | 2022-03-22T22:19:47.000Z | tests/test_feed.py | mrcagney/gtfs_k | 746ef0d983e3f52cbc4b792728395513e7181ed5 | [
"MIT"
] | 17 | 2020-01-13T03:34:36.000Z | 2022-02-09T03:51:04.000Z | import pytest
from pathlib import Path
import pandas as pd
from pandas.testing import assert_frame_equal
import numpy as np
from .context import gtfs_kit, DATA_DIR
from gtfs_kit import *
def test_feed():
feed = Feed(agency=pd.DataFrame(), dist_units="km")
for key in cs.FEED_ATTRS:
val = getattr(feed... | 29.133803 | 128 | 0.601644 |
2148c715a216d677b3b9dc72750ea6134c58c93d | 3,847 | py | Python | conohadnsclient/v2/cli/reverse.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | conohadnsclient/v2/cli/reverse.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | conohadnsclient/v2/cli/reverse.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/lice... | 31.276423 | 79 | 0.695087 |
2148efe9a8b8e850432309ec2c820eeb0b12d858 | 832 | py | Python | src/BribeNet/bribery/temporal/oneMoveEvenBriber.py | RobMurray98/BribeNet | 09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc | [
"MIT"
] | null | null | null | src/BribeNet/bribery/temporal/oneMoveEvenBriber.py | RobMurray98/BribeNet | 09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc | [
"MIT"
] | null | null | null | src/BribeNet/bribery/temporal/oneMoveEvenBriber.py | RobMurray98/BribeNet | 09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc | [
"MIT"
] | null | null | null | import random
import numpy as np
from BribeNet.bribery.temporal.action.singleBriberyAction import SingleBriberyAction
from BribeNet.bribery.temporal.briber import TemporalBriber
class OneMoveEvenBriber(TemporalBriber):
def _next_action(self) -> SingleBriberyAction:
customers = self.get_graph().get_cust... | 36.173913 | 84 | 0.694712 |
21494d838166a1090305f37ea69e5e0a7f67b040 | 1,854 | py | Python | modelscript/test/drivers/classes/test_cls_useprinter.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 1 | 2019-02-22T14:27:06.000Z | 2019-02-22T14:27:06.000Z | modelscript/test/drivers/classes/test_cls_useprinter.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 4 | 2019-02-12T07:49:15.000Z | 2019-02-12T07:50:12.000Z | modelscript/test/drivers/classes/test_cls_useprinter.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | null | null | null | # coding=utf-8
from typing import Text
import logging
import re
from nose.plugins.attrib import attr
from modelscript.interfaces.environment import Environment
from modelscript.test.framework import TEST_CASES_DIRECTORY
from modelscript.tools.use.engine import (
USEEngine)
from modelscript.base.printers import Abs... | 28.090909 | 65 | 0.640777 |
21494e349113fe89bd02a94ae7c8105601413dcb | 2,697 | py | Python | tql/algo_dl/keras/models/bert_keras.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | tql/algo_dl/keras/models/bert_keras.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | tql/algo_dl/keras/models/bert_keras.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : tql-Python.
# @File : bert_keras
# @Time : 2019-06-21 14:43
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
# import pandas_utils as pd
# from sklearn.model_selection import trai... | 29.637363 | 87 | 0.605858 |
21495d91cc5e78602d73f4a01baae86133aad3c0 | 164 | py | Python | py/cidoc_crm_types/properties/p157i_provides_reference_space_for.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/properties/p157i_provides_reference_space_for.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/properties/p157i_provides_reference_space_for.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
@dataclass
class P157iProvidesReferenceSpaceFor:
URI = "http://erlangen-crm.org/current/P157i_provides_reference_space_for"
| 23.428571 | 78 | 0.829268 |
2149604d32830f27a6899d6357bf135a18503b77 | 1,735 | py | Python | test/language/parameterized_types/python/SubtypedBitfieldParamTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | 2 | 2019-02-06T17:50:24.000Z | 2019-11-20T16:51:34.000Z | test/language/parameterized_types/python/SubtypedBitfieldParamTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | 1 | 2019-11-25T16:25:51.000Z | 2019-11-25T18:09:39.000Z | test/language/parameterized_types/python/SubtypedBitfieldParamTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | null | null | null | import unittest
import zserio
from testutils import getZserioApi
class SubtypedBitfieldParamTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.api = getZserioApi(__file__, "parameterized_types.zs").subtyped_bitfield_param
def testWrite(self):
subtypedBitfieldParamHolder = self... | 45.657895 | 97 | 0.788473 |
2149f099a83949d29d0050930d90aa2bef7dc0ea | 193 | py | Python | tests/test_news_type.py | Hongbin-Chen/The-Guardian-COVID-API | b481790fc5d86b4ab08aa684dd658944448d6d83 | [
"MIT"
] | null | null | null | tests/test_news_type.py | Hongbin-Chen/The-Guardian-COVID-API | b481790fc5d86b4ab08aa684dd658944448d6d83 | [
"MIT"
] | 1 | 2020-12-18T14:15:13.000Z | 2020-12-27T02:04:18.000Z | tests/test_news_type.py | Hongbin-Chen/The-Guardian-COVID-API | b481790fc5d86b4ab08aa684dd658944448d6d83 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
def test_news_type():
example = ("video")
expected = results[results['type']=='video']
assert actual == expected
test_news_type()
| 14.846154 | 48 | 0.626943 |
214a4e39bd2a96b7425b38694b4e31ea4132b2e1 | 1,038 | py | Python | experiments/ashvin/icml2020/hand/awr/test1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/awr/test1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/awr/test1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from rlkit.demos.source.mdp_path_loader import MDPPathLoader
from rlkit.launchers.experiments.ashvin.awr_tf import experiment
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher impor... | 27.315789 | 74 | 0.703276 |
214a5915ed09ffde62342c78fd33dc751bdbd59c | 554 | py | Python | preprocess.py | KG16/Abstractive_Summarization | afb5887962b25c6eab846aa526fb300796e1b5bf | [
"MIT"
] | null | null | null | preprocess.py | KG16/Abstractive_Summarization | afb5887962b25c6eab846aa526fb300796e1b5bf | [
"MIT"
] | null | null | null | preprocess.py | KG16/Abstractive_Summarization | afb5887962b25c6eab846aa526fb300796e1b5bf | [
"MIT"
] | 1 | 2018-03-20T08:43:10.000Z | 2018-03-20T08:43:10.000Z | import os
def main():
path = "C:\\Users\\kriti\\Documents\\Project\\Abstractive_Summarization\\Dataset"
files = os.listdir(path)
for file in files:
f = open(path + "\\" + file, 'r')
lines_list = f.readlines()
f.close()
f = open(path + "\\" + file, 'w')
for line in ... | 23.083333 | 85 | 0.463899 |
214a95b0f7ae15fde5efc93521555e98968cf42d | 4,671 | py | Python | ckanext/cloudstorage/plugin/__init__.py | datopian/ckanext-cloudstorage | d679b7108b2e5c00507d5d57b8cb9488f4125672 | [
"MIT"
] | null | null | null | ckanext/cloudstorage/plugin/__init__.py | datopian/ckanext-cloudstorage | d679b7108b2e5c00507d5d57b8cb9488f4125672 | [
"MIT"
] | 2 | 2022-02-09T11:44:44.000Z | 2022-02-22T11:41:45.000Z | ckanext/cloudstorage/plugin/__init__.py | datopian/ckanext-cloudstorage | d679b7108b2e5c00507d5d57b8cb9488f4125672 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from ckan import plugins
import os.path
from ckanext.cloudstorage import storage
from ckanext.cloudstorage import helpers
import ckanext.cloudstorage.logic.action.multipart as m_action
import ckanext.cloudstorage.logic.auth.multipart as m_auth
from ckanext.cloudstorage impo... | 34.858209 | 76 | 0.657461 |
214ac356d697b070558ccb65778e0e4768f43375 | 7,537 | py | Python | sem/modules/gui.py | YoannDupont/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 22 | 2016-11-13T21:08:58.000Z | 2021-04-26T07:04:54.000Z | sem/modules/gui.py | Raphencoder/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 15 | 2016-11-15T10:21:07.000Z | 2021-11-08T10:08:05.000Z | sem/modules/gui.py | Raphencoder/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 8 | 2016-11-15T10:21:41.000Z | 2022-03-04T21:28:05.000Z | #-*- coding: utf-8 -*-
"""
file: gui.py
Description: performs a sequence of operations in a pipeline.
author: Yoann Dupont
MIT License
Copyright (c) 2018 Yoann Dupont
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), ... | 40.090426 | 177 | 0.680642 |
214ac361b36ca581d62a08fafd091e43e45e195a | 2,093 | py | Python | applications/tensorflow/cnns/training/inception_v1/create_labels_files.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/training/inception_v1/create_labels_files.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/training/inception_v1/create_labels_files.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | # -*-coding:utf-8-*-
"""
@Project: googlenet_classification
@File : create_labels_files.py
@Author : panjq
@E-mail : pan_jinquan@163.com
@Date : 2018-08-11 10:15:28
"""
import os
import os.path
def write_txt(content, filename, mode='w'):
"""保存txt数据
:param content:需要保存的数据,type->list
... | 28.671233 | 80 | 0.547539 |
214ac6188051aac8d011a0749a46ebd1701e6d3f | 1,355 | py | Python | src/devel/___blocks/___distance_block.py | jakub-vesely/hugo | 604e7824c39f6da43ede9064001292917c1ee4ae | [
"MIT"
] | null | null | null | src/devel/___blocks/___distance_block.py | jakub-vesely/hugo | 604e7824c39f6da43ede9064001292917c1ee4ae | [
"MIT"
] | null | null | null | src/devel/___blocks/___distance_block.py | jakub-vesely/hugo | 604e7824c39f6da43ede9064001292917c1ee4ae | [
"MIT"
] | null | null | null | # Copyright (c) 2022 Jakub Vesely
# This software is published under MIT license. Full text of the license is available at https://opensource.org/licenses/MIT
from ___blocks.___block_types import BlockTypes
from ___blocks.___extended_block_base import BlockWithOneExtension
from ___blocks.___block_base import PowerSa... | 41.060606 | 125 | 0.776384 |
214ae9c2c64f6b362cab1d316baa1b1e62fbc279 | 1,485 | py | Python | PyXAB/utils/plot.py | WilliamLwj/PyXAB | a95c713090fe875bc557bc7b0e11ab000a921407 | [
"MIT"
] | null | null | null | PyXAB/utils/plot.py | WilliamLwj/PyXAB | a95c713090fe875bc557bc7b0e11ab000a921407 | [
"MIT"
] | null | null | null | PyXAB/utils/plot.py | WilliamLwj/PyXAB | a95c713090fe875bc557bc7b0e11ab000a921407 | [
"MIT"
] | null | null | null |
import numpy.random as random
import matplotlib.pyplot as plt
import os
import pdb
import numpy as np
def plot_regret(regret_list, name='T-HOO'):
x = np.arange(regret_list.shape[0])
plt.plot(x, regret_list, linewidth=2, label=name, alpha=0.9)
plt.legend(loc='upper right', prop={'size': 14})
plt.sh... | 22.846154 | 91 | 0.635017 |
214aefdcff3ce57dcbcd3df4c44fefcdfb2c6680 | 118 | py | Python | pygamoo/__init__.py | amarszalek/pyGAMOO | 13c553fe4e6d889640c679225d95824ffa165fd3 | [
"Apache-2.0"
] | null | null | null | pygamoo/__init__.py | amarszalek/pyGAMOO | 13c553fe4e6d889640c679225d95824ffa165fd3 | [
"Apache-2.0"
] | null | null | null | pygamoo/__init__.py | amarszalek/pyGAMOO | 13c553fe4e6d889640c679225d95824ffa165fd3 | [
"Apache-2.0"
] | null | null | null | from .objective import Objective
from .player import Player
from .repairer import Repairer
from .agamoo import AGAMOO
| 23.6 | 32 | 0.830508 |
214b2c8fe5a09ae53c38691fa8aeac3bdde94600 | 4,538 | py | Python | train.py | hyun-jin-park/EAST | 43cb8d638310e8c338c0197887eccca82bee371f | [
"MIT"
] | null | null | null | train.py | hyun-jin-park/EAST | 43cb8d638310e8c338c0197887eccca82bee371f | [
"MIT"
] | null | null | null | train.py | hyun-jin-park/EAST | 43cb8d638310e8c338c0197887eccca82bee371f | [
"MIT"
] | null | null | null | import os
import time
import argparse
from tqdm import tqdm
import torch
from torch import nn
from torch.optim import lr_scheduler
from torch.utils import data
from torch.utils.tensorboard import SummaryWriter
from dataset import ICDARDataSet
from model import EAST
from loss import Loss
from evaluation import evaluat... | 44.490196 | 120 | 0.665712 |
214b53c4e75de9151f80c07c6f34fd522c25e470 | 413 | py | Python | 973.py | gdmanandamohon/leetcode | a691a4e37ee1fdad69c710e3710c5faf8b0a7d76 | [
"MIT"
] | null | null | null | 973.py | gdmanandamohon/leetcode | a691a4e37ee1fdad69c710e3710c5faf8b0a7d76 | [
"MIT"
] | null | null | null | 973.py | gdmanandamohon/leetcode | a691a4e37ee1fdad69c710e3710c5faf8b0a7d76 | [
"MIT"
] | null | null | null | '''
@author: l4zyc0d3r
People who are happy makes other happy. I am gonna finish it slowly but definitely.cdt
'''
class Solution:
def kClosest(self, P: List[List[int]], K: int) -> List[List[int]]:
mp = collections.defaultdict(list)
for x, y in P:
mp[x*x+y*y].append([x, y])
ans ... | 27.533333 | 86 | 0.552058 |
214b6ba02bdaa70f13929fb3a90a08b3ba55a8f6 | 1,820 | py | Python | mlrun/api/api/api.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | null | null | null | mlrun/api/api/api.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | null | null | null | mlrun/api/api/api.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | 1 | 2021-05-05T14:19:46.000Z | 2021-05-05T14:19:46.000Z | from fastapi import APIRouter, Depends
from mlrun.api.api import deps
from mlrun.api.api.endpoints import (
artifacts,
files,
functions,
healthz,
logs,
pipelines,
projects,
runs,
runtimes,
schedules,
submit,
tags,
workflows,
feature_sets,
)
api_router = APIRoute... | 28.4375 | 83 | 0.74011 |
214b8eeb65afd46e6789986900e98ad8b10420e8 | 1,456 | py | Python | src/jetson/ev3control/ev3control/test_m.py | ichalkiad/VW_challenge | 333222010ecf3d1ca4a0e181239f761c975453e9 | [
"Apache-2.0"
] | 1 | 2017-08-16T08:42:49.000Z | 2017-08-16T08:42:49.000Z | src/jetson/ev3control/ev3control/test_m.py | ichalkiad/VW_challenge | 333222010ecf3d1ca4a0e181239f761c975453e9 | [
"Apache-2.0"
] | 4 | 2017-08-09T23:01:30.000Z | 2017-08-24T16:44:13.000Z | src/jetson/ev3control/ev3control/test_m.py | yhalk/vw_challenge_ECR | c1ff50070d0f7367ccfbf473c69e90fd2be5e85e | [
"Apache-2.0"
] | null | null | null | import master
import time
class DummyDev:
def __init__(self):
self._channel = -1
self._cmd = -1
self._name = "test_obj"
self._port = -1
def print_hi(self,test=""):
print("Hello object: "+test)
def get_chn(self):
return self._channel
de... | 21.101449 | 86 | 0.576236 |
214ba38abdab0ba6166efc527e083069c8a281b9 | 244 | py | Python | benchmark_dashboard/deployments/panel.py | tcpcloud/horizon-rally-dashboard | f1fe7c6437bc04f1dfec66d1688f849239eb1dcf | [
"Apache-2.0"
] | 6 | 2015-09-10T07:18:05.000Z | 2017-09-07T05:27:15.000Z | benchmark_dashboard/deployments/panel.py | michaelkuty/horizon-benchmark-dashboard | f1fe7c6437bc04f1dfec66d1688f849239eb1dcf | [
"Apache-2.0"
] | 3 | 2016-08-14T07:49:26.000Z | 2017-04-25T08:07:04.000Z | benchmark_dashboard/deployments/panel.py | michaelkuty/horizon-benchmark-dashboard | f1fe7c6437bc04f1dfec66d1688f849239eb1dcf | [
"Apache-2.0"
] | null | null | null |
from django.utils.translation import ugettext_lazy as _
import horizon
from benchmark_dashboard import dashboard
class Deployments(horizon.Panel):
name = _("Deployments")
slug = 'deployments'
dashboard.Rally.register(Deployments)
| 17.428571 | 55 | 0.782787 |
214bcec8a0f9b2f606f22b2fc710723c5be3c679 | 5,560 | py | Python | py/src/experimental/ebc.py | bueler/stokes-implicit | e6f40798c9d441316d1b88a93b9103b8e6cb5e89 | [
"MIT"
] | 1 | 2020-12-11T12:18:03.000Z | 2020-12-11T12:18:03.000Z | py/src/experimental/ebc.py | bueler/stokes-implicit | e6f40798c9d441316d1b88a93b9103b8e6cb5e89 | [
"MIT"
] | null | null | null | py/src/experimental/ebc.py | bueler/stokes-implicit | e6f40798c9d441316d1b88a93b9103b8e6cb5e89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Usage help:
# ./ebc.py -h
# The six solver/bc versions:
# ./ebc.py # linear solver, weak dirichlet bc
# ./ebc.py -dirichletbc # linear solver, strong dirichlet bc
# ./ebc.py -tangential # linear solver, tangential ODE bc
# .... | 42.442748 | 165 | 0.632914 |
214bdd8b608d7024dc589059d070da49d163b5b8 | 1,458 | py | Python | components/exp-test-agent/src/flow_execution/concrete_test_flow.py | sfahad1414/AGENT | 84069edc96b6190bb03ffd5099cbc8966061a563 | [
"Apache-2.0"
] | 15 | 2020-05-06T16:17:56.000Z | 2022-03-30T12:25:16.000Z | components/exp-test-agent/src/flow_execution/concrete_test_flow.py | dionny/AGENT | 8a833406b590e23623fcc67db99f6f964d002396 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:17:16.000Z | 2022-02-10T06:35:58.000Z | components/exp-test-agent/src/flow_execution/concrete_test_flow.py | dionny/AGENT | 8a833406b590e23623fcc67db99f6f964d002396 | [
"Apache-2.0"
] | 7 | 2020-04-07T18:47:55.000Z | 2022-03-30T12:14:58.000Z | """Represents a concrete test flow."""
class ConcreteTestFlow:
"""Represents a concrete test flow."""
def __init__(self, path, abstract_state, flow, bound_actions):
""" Initializes the ConcreteTestFlow class.
:param path: The interactions that were taken that led to the abstract state from w... | 39.405405 | 113 | 0.653635 |
214c04f169ec19120577964ddca8d71802d53aba | 452 | py | Python | homepage/views/about.py | josht27/fomotrial | 40d18dd3fe4fc5e1093a6831447ec3f96f2c5a1a | [
"Apache-2.0"
] | null | null | null | homepage/views/about.py | josht27/fomotrial | 40d18dd3fe4fc5e1093a6831447ec3f96f2c5a1a | [
"Apache-2.0"
] | null | null | null | homepage/views/about.py | josht27/fomotrial | 40d18dd3fe4fc5e1093a6831447ec3f96f2c5a1a | [
"Apache-2.0"
] | null | null | null | from django.conf import settings
from django_mako_plus import view_function, jscontext
from datetime import datetime, timezone
@view_function
def process_request(request):
utc_time = datetime.utcnow()
context = {
# sent to index.html:
'utc_time': utc_time,
# sent to index.html... | 30.133333 | 54 | 0.676991 |
214c093becf1bb13ce9577897d20dd3c3c3d9cf9 | 47 | py | Python | tests/thermo/test_utils.py | GENESIS-EFRC/reaction-network | 1482ac1b6b550a5bc9961e9210e33c86c07f64cf | [
"BSD-3-Clause-LBNL"
] | 29 | 2020-08-04T07:07:04.000Z | 2022-02-22T22:09:20.000Z | tests/thermo/test_utils.py | GENESIS-EFRC/reaction-network | 1482ac1b6b550a5bc9961e9210e33c86c07f64cf | [
"BSD-3-Clause-LBNL"
] | 70 | 2021-02-22T07:01:40.000Z | 2022-03-31T20:11:56.000Z | tests/thermo/test_utils.py | GENESIS-EFRC/reaction-network | 1482ac1b6b550a5bc9961e9210e33c86c07f64cf | [
"BSD-3-Clause-LBNL"
] | 3 | 2021-04-20T09:29:39.000Z | 2022-02-02T17:43:52.000Z | """ Tests for thermo/utils.py"""
import pytest
| 15.666667 | 32 | 0.702128 |
214c65215b2b5589935be8ef1bf2ac1caeda0e56 | 23,503 | py | Python | examples/hugging_face_track.py | admariner/aim | 4c143ea40acf3531abfa69f66503428d73d9fedc | [
"Apache-2.0"
] | 2,195 | 2020-01-23T03:08:11.000Z | 2022-03-31T14:32:19.000Z | examples/hugging_face_track.py | admariner/aim | 4c143ea40acf3531abfa69f66503428d73d9fedc | [
"Apache-2.0"
] | 696 | 2020-02-08T21:55:45.000Z | 2022-03-31T16:52:22.000Z | examples/hugging_face_track.py | admariner/aim | 4c143ea40acf3531abfa69f66503428d73d9fedc | [
"Apache-2.0"
] | 150 | 2020-03-27T10:44:25.000Z | 2022-03-21T21:29:41.000Z | # From https://github.com/huggingface/transformers/blob/master/examples/text-classification/run_glue.py
#!/usr/bin/env python
# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complian... | 44.429112 | 119 | 0.66634 |
214c6dca4a7f2b4cd6242e1b7ca78be9eeffb851 | 10,364 | py | Python | tensorflow/contrib/distributions/python/ops/onehot_categorical.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/contrib/distributions/python/ops/onehot_categorical.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/contrib/distributions/python/ops/onehot_categorical.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.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... | 38.102941 | 80 | 0.695774 |
214c710860a0a7cad6780f48c5dc7454bcf1a4d8 | 6,624 | py | Python | TORCH/train_rlbench.py | Rxzh/DRL_MINES | bf46f049f3640e37884b04347f1a99e5de734c14 | [
"MIT"
] | null | null | null | TORCH/train_rlbench.py | Rxzh/DRL_MINES | bf46f049f3640e37884b04347f1a99e5de734c14 | [
"MIT"
] | null | null | null | TORCH/train_rlbench.py | Rxzh/DRL_MINES | bf46f049f3640e37884b04347f1a99e5de734c14 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import numpy as np
import argparse
from RLBenchEnv import SimulationEnvironment
from rlbench.tasks import ReachTarget
#Agents
from agents.pg import initialize_pg
from agents.ddpg import initialize_ddpg
from agents.dqn import initialize_dqn
from agents.td3 import initialize_td3
from a... | 29.180617 | 89 | 0.558273 |
214c7a8f9d0a4ecef44f8b9753afd27736a3a907 | 30,921 | py | Python | qosctrl/src/cinder/volume/drivers/provlvm.py | att/ioarbiter | 411e5dc2a22d5ff6a199dc9c9c6e493cc83149ee | [
"Apache-2.0"
] | 3 | 2016-06-06T23:57:21.000Z | 2017-12-02T20:51:49.000Z | qosctrl/src/cinder/volume/drivers/provlvm.py | att/ioarbiter | 411e5dc2a22d5ff6a199dc9c9c6e493cc83149ee | [
"Apache-2.0"
] | null | null | null | qosctrl/src/cinder/volume/drivers/provlvm.py | att/ioarbiter | 411e5dc2a22d5ff6a199dc9c9c6e493cc83149ee | [
"Apache-2.0"
] | 5 | 2017-01-31T02:08:54.000Z | 2019-11-01T17:55:36.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 40.954967 | 81 | 0.592025 |
214c8d9ec07f2d2fe4da3f8b437c4285620ec04c | 16,630 | py | Python | tests/test_categories.py | jbgriesner/idunn | e3c40f1d1bad4486357bd8bc0acc77825980a067 | [
"Apache-2.0"
] | null | null | null | tests/test_categories.py | jbgriesner/idunn | e3c40f1d1bad4486357bd8bc0acc77825980a067 | [
"Apache-2.0"
] | null | null | null | tests/test_categories.py | jbgriesner/idunn | e3c40f1d1bad4486357bd8bc0acc77825980a067 | [
"Apache-2.0"
] | null | null | null | from unittest.mock import ANY
from app import app
from apistar.test import TestClient
from freezegun import freeze_time
BBOX_PARIS="2.252876,48.819862,2.395707,48.891132"
INVALID_BBOX_PARIS_LEFT_PERM_RIGHT="2.395707,48.819862,2.252876,48.891132"
INVALID_BBOX_PARIS_MISSING="48.819862,2.252876,48.891132"
@freeze_time("... | 57.543253 | 1,108 | 0.505833 |
214c95709eeb9e4846823c0cb03f0266459a5add | 29,687 | py | Python | reverb/trajectory_writer.py | wookayin/reverb | c4255f10595d05b189f1e5c81f29c70ac600d41f | [
"Apache-2.0"
] | null | null | null | reverb/trajectory_writer.py | wookayin/reverb | c4255f10595d05b189f1e5c81f29c70ac600d41f | [
"Apache-2.0"
] | null | null | null | reverb/trajectory_writer.py | wookayin/reverb | c4255f10595d05b189f1e5c81f29c70ac600d41f | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 DeepMind Technologies Limited.
#
# 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 agr... | 40.611491 | 97 | 0.688079 |
214c9bfe15bec7afa4bdf11d01039d9004bc56d9 | 8,497 | py | Python | pycatia/system_interfaces/collection.py | Tian-Jionglu/pycatia | b315aeb3a74846f134ff6b67b3a6334b9d3905fa | [
"MIT"
] | 1 | 2020-04-27T13:59:10.000Z | 2020-04-27T13:59:10.000Z | pycatia/system_interfaces/collection.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | null | null | null | pycatia/system_interfaces/collection.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | null | null | null | #! usr/bin/python3.6
"""
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-10 10:58:07.270911
.. warning::
The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
They are there as a guide as to how the visual basic / catscript function... | 36.004237 | 108 | 0.544898 |
214ca28593ec6c9ebcae813c1613486c7f2d3d55 | 1,145 | py | Python | usgs/xsi.py | wperkins/usgs | 2a9270a64f1d794af56ebb511d0d86c3ed3f8991 | [
"0BSD"
] | 67 | 2016-11-11T06:09:20.000Z | 2022-03-08T10:56:35.000Z | usgs/xsi.py | wperkins/usgs | 2a9270a64f1d794af56ebb511d0d86c3ed3f8991 | [
"0BSD"
] | 28 | 2017-03-06T02:33:02.000Z | 2022-03-08T22:46:15.000Z | usgs/xsi.py | wperkins/usgs | 2a9270a64f1d794af56ebb511d0d86c3ed3f8991 | [
"0BSD"
] | 32 | 2017-03-22T02:04:37.000Z | 2022-03-31T04:09:15.000Z |
def _get_xsd_boolean(element):
return True if element.text.lower() == "true" else False
def _get_xsd_int(element):
return int(element.text)
def _get_xsd_double(element):
return float(element.text)
def _get_xsd_long(element):
return int(element.text)
def _get_xsd_string(element):
return... | 20.446429 | 79 | 0.678603 |
214cdac0211e21571e357894ffb3ce222366156b | 746 | py | Python | flags/data_utils/constants.py | Prasad9/Detect-Flags-SSD | c0d662bde99ed8df33d72bd06d61d5eb869d31a5 | [
"MIT"
] | 13 | 2017-11-08T07:09:13.000Z | 2022-03-28T07:09:47.000Z | flags/data_utils/constants.py | Prasad9/Detect-Flags-SSD | c0d662bde99ed8df33d72bd06d61d5eb869d31a5 | [
"MIT"
] | 3 | 2018-03-08T04:30:19.000Z | 2019-01-03T15:47:24.000Z | flags/data_utils/constants.py | Prasad9/Detect-Flags-SSD | c0d662bde99ed8df33d72bd06d61d5eb869d31a5 | [
"MIT"
] | 5 | 2018-01-15T15:26:44.000Z | 2021-08-18T08:02:51.000Z | XML_FOLDER = 'Annotations'
GENERATED_DATA = 'GeneratedData'
TRAIN_FOLDER = 'Train'
VAL_FOLDER = 'Val'
TEST_FOLDER = 'Test'
LABEL = 'Label'
# Dimensions of the raw flag height and width
FLAG_HEIGHT = 144
FLAG_WIDTH = 224
# There are 202599 images in my CelebA dataset. Give this value appropriately.
CELEBA_TOTAL_FILES ... | 32.434783 | 87 | 0.776139 |
214d100b80b940f838259378eb184c1e7036dff4 | 664 | py | Python | tags/migrations/0002_tag_creator.py | bllli/Django-China-API | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | [
"MIT"
] | 187 | 2018-03-08T11:18:11.000Z | 2021-12-26T13:29:02.000Z | tags/migrations/0002_tag_creator.py | bllli/Django-China-API | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | [
"MIT"
] | 67 | 2018-03-09T14:56:47.000Z | 2021-06-24T08:52:40.000Z | tags/migrations/0002_tag_creator.py | bllli/Django-China-API | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | [
"MIT"
] | 52 | 2018-03-08T11:18:12.000Z | 2021-08-02T16:07:04.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-04-24 12:35
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations... | 25.538462 | 130 | 0.671687 |
214d1a6323b578537a59a33a18fc91be3ffd8409 | 1,921 | py | Python | Apps/Engines/Nuke/NukeTools_1.01/Python/minorVersionUp.py | geoffroygivry/CyclopsVFX-Unity | 6ab9ab122b6c3e6200e90d49a0c2bf774e53d985 | [
"MIT"
] | 17 | 2017-06-27T04:14:42.000Z | 2022-03-07T03:37:44.000Z | Apps/Engines/Nuke/NukeTools_1.01/Python/minorVersionUp.py | geoffroygivry/Cyclops-VFX | 6ab9ab122b6c3e6200e90d49a0c2bf774e53d985 | [
"MIT"
] | 2 | 2017-06-14T04:17:51.000Z | 2018-08-23T20:12:44.000Z | Apps/Engines/Nuke/NukeTools_1.01/Python/minorVersionUp.py | geoffroygivry/CyclopsVFX-Unity | 6ab9ab122b6c3e6200e90d49a0c2bf774e53d985 | [
"MIT"
] | 2 | 2019-03-18T06:18:33.000Z | 2019-08-14T21:07:53.000Z | #The MIT License (MIT)
#
#Copyright (c) 2015 Geoffroy Givry
#
#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 the rights
#to use, copy, m... | 40.87234 | 102 | 0.683498 |
214d29f18b4ff9a89db37edd1e7dd67eacbb6eb7 | 366 | py | Python | intro-to-rnns/testTensor.py | oscarmore2/deep-learning-study | fdf3b1182b49f683f2cf7d2f85d3233b4af7ba10 | [
"MIT"
] | null | null | null | intro-to-rnns/testTensor.py | oscarmore2/deep-learning-study | fdf3b1182b49f683f2cf7d2f85d3233b4af7ba10 | [
"MIT"
] | null | null | null | intro-to-rnns/testTensor.py | oscarmore2/deep-learning-study | fdf3b1182b49f683f2cf7d2f85d3233b4af7ba10 | [
"MIT"
] | null | null | null | import tensorflow as tf
#Creates a graph.
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
#Creates a session with log_device_placement set to True.
sess = tf.Session(config=tf.ConfigProto(log_device_plac... | 36.6 | 71 | 0.655738 |
214d47b1daf8de0ea7893f4e8070cd1fad4d9469 | 1,342 | py | Python | tests/_tests_cv_classification_transforms/experiment.py | balakhonoff/catalyst | 82d904aee97045efbaef3963e36c2ce5173ddac4 | [
"Apache-2.0"
] | null | null | null | tests/_tests_cv_classification_transforms/experiment.py | balakhonoff/catalyst | 82d904aee97045efbaef3963e36c2ce5173ddac4 | [
"Apache-2.0"
] | null | null | null | tests/_tests_cv_classification_transforms/experiment.py | balakhonoff/catalyst | 82d904aee97045efbaef3963e36c2ce5173ddac4 | [
"Apache-2.0"
] | 1 | 2018-12-21T15:56:21.000Z | 2018-12-21T15:56:21.000Z | from typing import Tuple
from collections import OrderedDict
import torchvision
from catalyst.dl.experiment import ConfigExperiment
class MNIST(torchvision.datasets.MNIST):
"""`MNIST <http://yann.lecun.com/exdb/mnist/>`_ Dataset."""
def __getitem__(self, index: int) -> Tuple:
"""Fetches a sample fo... | 27.958333 | 76 | 0.593145 |
214d5cb3c064dc4b046d09959eaa1d770bcabc3d | 9,073 | py | Python | tensorflow/python/kernel_tests/cast_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/kernel_tests/cast_op_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/kernel_tests/cast_op_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2015 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... | 37.962343 | 101 | 0.66505 |
214d74e274d122401aa55a7e3cde184a18d8dd64 | 14,026 | py | Python | leetcode_python/Depth-First-Search/accounts-merge.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Depth-First-Search/accounts-merge.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Depth-First-Search/accounts-merge.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
721. Accounts Merge
Medium
Given a list of accounts where each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are emails representing emails of the account.
Now, we would like to merge these accounts. Two accounts definitely belong to the ... | 38.427397 | 373 | 0.563168 |
214d90fd36ebc3830a0e003ca5139759aeabdd51 | 8,512 | py | Python | NBA Project/venv/Lib/site-packages/plotly/graph_objs/contour/colorbar/title/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 1 | 2020-08-08T21:56:11.000Z | 2020-08-08T21:56:11.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/contour/colorbar/title/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 2 | 2021-03-31T19:54:17.000Z | 2021-06-02T02:33:56.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/contour/colorbar/title/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# color
# -----
@property
def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000'... | 37.333333 | 82 | 0.567904 |
214da9b3c589927299455489bcac9e62ceaa2665 | 682 | py | Python | conf/settings_development.py | casainurbania/exam3 | 25f814cd0cc4b839fb9a12039af04837b61961dd | [
"Apache-2.0"
] | null | null | null | conf/settings_development.py | casainurbania/exam3 | 25f814cd0cc4b839fb9a12039af04837b61961dd | [
"Apache-2.0"
] | null | null | null | conf/settings_development.py | casainurbania/exam3 | 25f814cd0cc4b839fb9a12039af04837b61961dd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
用于本地开发环境的全局配置
"""
from settings import APP_ID
# ===============================================================================
# 数据库设置, 本地开发数据库设置
# ===============================================================================
DATABASES = {
'default': {
'ENGINE': 'django.db.b... | 32.47619 | 81 | 0.329912 |
214dcf119731fced4693de5d78db82db30c59f51 | 203 | py | Python | app/api/admin.py | ingjavierpinilla/magentrack-test | 4b5ee34aafbe85c4f536ceafd5efdc9271a26008 | [
"MIT"
] | null | null | null | app/api/admin.py | ingjavierpinilla/magentrack-test | 4b5ee34aafbe85c4f536ceafd5efdc9271a26008 | [
"MIT"
] | null | null | null | app/api/admin.py | ingjavierpinilla/magentrack-test | 4b5ee34aafbe85c4f536ceafd5efdc9271a26008 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Dataset, Row
class DatasetAdmin(admin.ModelAdmin):
readonly_fields = ('id',)
admin.site.register(Dataset, DatasetAdmin)
admin.site.register(Row) | 25.375 | 42 | 0.783251 |
214dd5dbe1cc6da0c2e79dbae311be866d557a57 | 1,015 | py | Python | pystratis/api/voting/tests/test_requestmodels.py | madrazzl3/pystratis | 8b78552e753ae1d12f2afb39e9a322a270fbb7b3 | [
"MIT"
] | null | null | null | pystratis/api/voting/tests/test_requestmodels.py | madrazzl3/pystratis | 8b78552e753ae1d12f2afb39e9a322a270fbb7b3 | [
"MIT"
] | null | null | null | pystratis/api/voting/tests/test_requestmodels.py | madrazzl3/pystratis | 8b78552e753ae1d12f2afb39e9a322a270fbb7b3 | [
"MIT"
] | null | null | null | import json
from pystratis.api.voting.requestmodels import *
from pystratis.core import PubKey
def test_pollsrequest(generate_compressed_pubkey):
data = {
'voteType': VoteKey.AddFederationMember.value,
'pubKeyOfMemberBeingVotedOn': generate_compressed_pubkey
}
request_model = PollsRequest(... | 28.194444 | 82 | 0.719212 |
214e7ac9150a10274467a3d361eb257b025b0dd3 | 397 | py | Python | management/management/wsgi.py | pranavjandu/Attendance-Management-System | 76e87427a84cdd25ee544f13e98892492811aef9 | [
"MIT"
] | null | null | null | management/management/wsgi.py | pranavjandu/Attendance-Management-System | 76e87427a84cdd25ee544f13e98892492811aef9 | [
"MIT"
] | 6 | 2021-03-30T13:59:27.000Z | 2022-03-12T00:42:34.000Z | management/management/wsgi.py | pranavjandu/Facial-Attendance-System-Django | 76e87427a84cdd25ee544f13e98892492811aef9 | [
"MIT"
] | null | null | null | """
WSGI config for management 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/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
214ea714b32bb18d7d06d554a59c23e2f554eede | 16,251 | py | Python | keystoneclient/tests/v2_0/fakes.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/keystoneclient/tests/v2_0/fakes.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/keystoneclient/tests/v2_0/fakes.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2011 OpenStack Foundation
#
# 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-... | 32.764113 | 78 | 0.411729 |
214eaf77ca969756a76005a5c76fa1cc145171d0 | 2,494 | py | Python | api/order.py | rezahsnz/papi | b17e5fc3a0380549a9541ade246862a55c905eea | [
"MIT"
] | null | null | null | api/order.py | rezahsnz/papi | b17e5fc3a0380549a9541ade246862a55c905eea | [
"MIT"
] | null | null | null | api/order.py | rezahsnz/papi | b17e5fc3a0380549a9541ade246862a55c905eea | [
"MIT"
] | 1 | 2022-02-20T10:45:36.000Z | 2022-02-20T10:45:36.000Z | import pymongo
import math
import os
import sys
from datetime import datetime
from datetime import timedelta
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import utils
import meta
def openOrders(_maker: str = None, _asset_list: list = None,
_lower_tick: int = None, _upper_tick: int = N... | 31.974359 | 96 | 0.596632 |
214ebe8fcd73e74e072a14155288a8c9c41656b4 | 5,735 | py | Python | tools/python/odin_data/meta_writer/hdf5dataset.py | percival-detector/odin-data | 7a03f480d192cd3f47830103b7d6b51c2e60e449 | [
"Apache-2.0"
] | null | null | null | tools/python/odin_data/meta_writer/hdf5dataset.py | percival-detector/odin-data | 7a03f480d192cd3f47830103b7d6b51c2e60e449 | [
"Apache-2.0"
] | 20 | 2017-01-20T16:11:27.000Z | 2017-05-12T15:57:19.000Z | tools/python/odin_data/meta_writer/hdf5dataset.py | percival-detector/odin-data | 7a03f480d192cd3f47830103b7d6b51c2e60e449 | [
"Apache-2.0"
] | 3 | 2017-01-11T15:59:49.000Z | 2017-03-23T13:42:43.000Z | import logging
import numpy as np
class HDF5Dataset(object):
"""A wrapper of h5py.Dataset with a cache to reduce I/O"""
def __init__(self, name, dtype, fillvalue, rank=1, shape=None, cache=True):
"""
Args:
name(str): Name to pass to h5py.Dataset (and for log messages)
... | 29.715026 | 84 | 0.582912 |
214ec764d4ffd96c6db1a5675123b71d83fa5a08 | 6,164 | py | Python | assignment.py | rikygino/RT_first_assignment | cef6400797fd8724af9002c176ae97a36d7567cb | [
"MIT"
] | null | null | null | assignment.py | rikygino/RT_first_assignment | cef6400797fd8724af9002c176ae97a36d7567cb | [
"MIT"
] | null | null | null | assignment.py | rikygino/RT_first_assignment | cef6400797fd8724af9002c176ae97a36d7567cb | [
"MIT"
] | null | null | null | #
#
#
# Coded by Riky (Riccardo Gjini)
#
#
# The aim of the program is to help the robot to do not crush on the walls going count-clockwise,
# also it's going to pick every single silver token and put it behind itself while he is mapping
# a way of the route, trying to stay in parallel with the walls
#
#
#
#
from __f... | 32.613757 | 171 | 0.63303 |
214ec8f33c15eaf347588a26c3827a313fbca89c | 36,870 | py | Python | CNN/prediction.py | hthuwal/sign-language-character-recognition | af5675419f819557991037d2cc85acddc0ad3748 | [
"MIT"
] | 17 | 2018-01-07T05:55:03.000Z | 2021-08-04T07:31:22.000Z | CNN/prediction.py | seyinia/sign-language-character-recognition | af5675419f819557991037d2cc85acddc0ad3748 | [
"MIT"
] | 1 | 2019-05-22T01:15:39.000Z | 2019-05-22T05:10:35.000Z | CNN/prediction.py | seyinia/sign-language-character-recognition | af5675419f819557991037d2cc85acddc0ad3748 | [
"MIT"
] | 11 | 2018-01-07T05:55:09.000Z | 2022-01-18T09:38:39.000Z | import numpy as np
import os
import glob
import cv2
import pickle
import datetime
import pandas as pd
import time
from shutil import copy2
import warnings
warnings.filterwarnings("ignore")
from numpy.random import permutation
np.random.seed(2016)
from sklearn.cross_validation import train_test_split
from sklearn.cross_... | 154.915966 | 29,468 | 0.129807 |
214ee99de3ff25cce7620883d2c1d77e56d8757f | 3,312 | py | Python | salt/_modules/flayer.py | techhat/grabbr | c188468168b35b8cd9cd0a42022fb603129faf9e | [
"Apache-2.0"
] | null | null | null | salt/_modules/flayer.py | techhat/grabbr | c188468168b35b8cd9cd0a42022fb603129faf9e | [
"Apache-2.0"
] | null | null | null | salt/_modules/flayer.py | techhat/grabbr | c188468168b35b8cd9cd0a42022fb603129faf9e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Salt execution module for Web Flayer
'''
# python
import os
import json
# salt
from salt.exceptions import CommandExecutionError
from salt.ext import six
import salt.utils.http
def __virtual__():
'''
Only requires Salt
'''
return True
def _query(decode=False, id_=None, *... | 22.378378 | 87 | 0.58756 |
214ef82c763d987ce48be64e585eedf40b62c663 | 2,513 | py | Python | source/remediation_runbooks/scripts/EnableAutoScalingGroupELBHealthCheck_validate.py | j-erickson/aws-security-hub-automated-response-and-remediation | f1722c00817e1358a1d80272b67fc226f1105965 | [
"Apache-2.0"
] | 129 | 2020-08-11T18:18:50.000Z | 2021-10-04T20:00:35.000Z | source/remediation_runbooks/scripts/EnableAutoScalingGroupELBHealthCheck_validate.py | j-erickson/aws-security-hub-automated-response-and-remediation | f1722c00817e1358a1d80272b67fc226f1105965 | [
"Apache-2.0"
] | 39 | 2020-08-11T18:07:58.000Z | 2021-10-15T16:26:24.000Z | source/remediation_runbooks/scripts/EnableAutoScalingGroupELBHealthCheck_validate.py | j-erickson/aws-security-hub-automated-response-and-remediation | f1722c00817e1358a1d80272b67fc226f1105965 | [
"Apache-2.0"
] | 35 | 2020-08-15T04:57:27.000Z | 2021-09-21T06:23:17.000Z | #!/usr/bin/python
###############################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License Version 2.0 (the "License"). Y... | 42.59322 | 91 | 0.48269 |
214f192907bdef566c9522d48a3d066bbd32e9b4 | 1,384 | py | Python | src/core/urls.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | null | null | null | src/core/urls.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | 48 | 2017-04-21T17:35:23.000Z | 2020-08-29T04:19:35.000Z | src/core/urls.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | null | null | null | # coding: utf-8
"""Patrones de rutas generales."""
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from core.views import Index, EncuestasIndex
urlpatterns = [
path('accounts/', include('django.contrib.auth.urls'))... | 37.405405 | 67 | 0.669798 |
214f1e767cd469894ed3532c600add41c7d2b99c | 1,773 | py | Python | deque.py | dineshrajpurohit/ds_al | d664ff4ccc69b052d724f65e280287137c000f9e | [
"MIT"
] | null | null | null | deque.py | dineshrajpurohit/ds_al | d664ff4ccc69b052d724f65e280287137c000f9e | [
"MIT"
] | null | null | null | deque.py | dineshrajpurohit/ds_al | d664ff4ccc69b052d724f65e280287137c000f9e | [
"MIT"
] | null | null | null | """Excercise 1.3.33 Deque: a doublie ended queue which allows adding
and removing items from both end."""
from linked_list import Linked_List, Node
import random
class Deque(Linked_List):
"""Deque implementation using linked list."""
def __init__(self):
"""Initialize the linked list."""
... | 27.276923 | 71 | 0.629442 |
214f2f4f67f8a5a9465fa57538022a07796f842b | 2,425 | py | Python | tests/grab_defusedxml.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 2,266 | 2015-01-01T08:47:33.000Z | 2022-03-21T05:02:55.000Z | tests/grab_defusedxml.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 221 | 2015-01-13T01:55:57.000Z | 2022-02-25T23:23:35.000Z | tests/grab_defusedxml.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 315 | 2015-01-23T06:38:55.000Z | 2022-03-27T08:33:33.000Z | # coding: utf-8
"""
See details here: https://github.com/tiran/defusedxml/blob/master/README.md
"""
import os
from lxml.etree import parse
from six import BytesIO
from defusedxml import EntitiesForbidden
from tests.util import temp_dir, build_grab, exclude_grab_transport
from tests.util import BaseGrabTestCase
clas... | 39.112903 | 79 | 0.536907 |
214f594ffb24a4bf94b68312112a20b05dd77482 | 1,608 | py | Python | attitude/display/plot/cov_types/regressions.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | 8 | 2015-03-24T09:08:32.000Z | 2021-05-17T03:32:01.000Z | attitude/display/plot/cov_types/regressions.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | 3 | 2018-03-16T07:38:26.000Z | 2022-02-15T06:07:54.000Z | attitude/display/plot/cov_types/regressions.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | null | null | null | """
A temporary module for holding regression functions before merging
with the main regression functionality of the module
"""
import numpy as N
from ....geom import dot
def hyperbola(cov, axes, means, xvals, n=1,level=1):
cov1 = dot(axes.T,cov,axes)
# Plot hyperbola
a = N.sqrt(cov[0]) #hyp_axes[0]
b... | 27.724138 | 66 | 0.587687 |
214f75555b5811ad4650bd91c80a458cb99916a2 | 3,126 | py | Python | retrobiocat_web/app/biocatdb/routes/contributions/seq_tables.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 9 | 2020-12-01T16:33:02.000Z | 2022-01-19T20:02:42.000Z | retrobiocat_web/app/biocatdb/routes/contributions/seq_tables.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 4 | 2020-10-02T14:38:32.000Z | 2021-08-02T09:23:58.000Z | retrobiocat_web/app/biocatdb/routes/contributions/seq_tables.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 6 | 2021-01-14T07:48:36.000Z | 2022-03-20T17:34:27.000Z | from retrobiocat_web.app.biocatdb import bp
from flask import render_template, flash, redirect, url_for, request, jsonify
from flask_security import roles_required, current_user
from retrobiocat_web.mongo.models.user_models import User
from retrobiocat_web.mongo.models.biocatdb_models import EnzymeType, Sequence, Activ... | 52.1 | 106 | 0.685541 |
214fa6cbf133d87ed0ebb81aae0a225000f4cd26 | 7,581 | py | Python | doc/source/conf.py | sergey-serebryakov/mpipe | 5a1804cf64271931f0cd3e4fff3e2b38291212dd | [
"MIT"
] | 65 | 2015-01-21T00:07:17.000Z | 2022-02-15T09:21:19.000Z | doc/source/conf.py | sergey-serebryakov/mpipe | 5a1804cf64271931f0cd3e4fff3e2b38291212dd | [
"MIT"
] | 14 | 2015-01-22T19:44:44.000Z | 2021-05-18T06:21:26.000Z | doc/source/conf.py | sergey-serebryakov/mpipe | 5a1804cf64271931f0cd3e4fff3e2b38291212dd | [
"MIT"
] | 21 | 2015-01-22T07:05:00.000Z | 2022-03-08T08:56:24.000Z | # -*- coding: utf-8 -*-
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation r... | 31.719665 | 95 | 0.701754 |
214fab3c9cfa1647a4cfbc26662e9401821ea618 | 44,837 | py | Python | Tests/test_Seq_objs.py | mikepm35/biopython | 9f2d4d8d70ec7223df35fdc3d9c4a3c018756327 | [
"BSD-3-Clause"
] | null | null | null | Tests/test_Seq_objs.py | mikepm35/biopython | 9f2d4d8d70ec7223df35fdc3d9c4a3c018756327 | [
"BSD-3-Clause"
] | null | null | null | Tests/test_Seq_objs.py | mikepm35/biopython | 9f2d4d8d70ec7223df35fdc3d9c4a3c018756327 | [
"BSD-3-Clause"
] | 1 | 2019-03-14T18:59:30.000Z | 2019-03-14T18:59:30.000Z | # Copyright 2009 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Unittests for the Seq objects."""
from __future__ import print_function
import warnings
impor... | 47.749734 | 155 | 0.533109 |
214fbf9afccd11331591c938611e55e7348581a8 | 2,420 | py | Python | docker/build.py | rwalkerlewis/pylith_installer | a77c8f0830960d233657440cbc88696ec27dc5c7 | [
"MIT"
] | null | null | null | docker/build.py | rwalkerlewis/pylith_installer | a77c8f0830960d233657440cbc88696ec27dc5c7 | [
"MIT"
] | null | null | null | docker/build.py | rwalkerlewis/pylith_installer | a77c8f0830960d233657440cbc88696ec27dc5c7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University of Chicago
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://ge... | 26.888889 | 124 | 0.54876 |
214fda34f7f6f3e1c5635a2ff25d594ed5a4de85 | 7,599 | py | Python | html/frameset.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | html/frameset.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | html/frameset.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | """Support for Netscape's <FRAMESET> tag (and <FRAME> and <NOFRAMES>)."""
import string
from tkinter import *
def start_frameset(parser, attrs):
# Augment parser object
tags = parser.object_aware_tags
if 'frameset' not in tags:
tags.append('noframes')
rows = ""
cols = ""
for name, va... | 32.33617 | 79 | 0.527438 |
214fdd86e9250d6eacabf0dac2b5d97169d0ea2a | 815 | py | Python | fasm_utils/db_entry.py | antmicro/quicklogic-fasm-utils | 83c867e3269e1186b9bcd71767bb810c82b3905d | [
"Apache-2.0"
] | null | null | null | fasm_utils/db_entry.py | antmicro/quicklogic-fasm-utils | 83c867e3269e1186b9bcd71767bb810c82b3905d | [
"Apache-2.0"
] | 1 | 2021-06-25T15:38:43.000Z | 2021-06-25T15:38:43.000Z | fasm_utils/db_entry.py | antmicro/quicklogic-fasm-utils | 83c867e3269e1186b9bcd71767bb810c82b3905d | [
"Apache-2.0"
] | 1 | 2020-05-18T12:04:40.000Z | 2020-05-18T12:04:40.000Z | from . import segbits
class DbEntry(object):
'''Class representing single entry in FASM database.
'''
def __init__(self, signature: str, coords: list):
self.signature = signature
self.coords = coords
@classmethod
def from_dbline(cls, dbline: str) -> 'DbEntry':
'''Creates ... | 25.46875 | 61 | 0.53865 |
214fecc0ccafaba28907f5696a2ce805f13aee53 | 6,078 | py | Python | tests/unit/query_tests.py | ssshah5/clone-python-cloudant | 1939f6ffe1b36fd87e94e984fe300e4e109d2171 | [
"Apache-2.0"
] | null | null | null | tests/unit/query_tests.py | ssshah5/clone-python-cloudant | 1939f6ffe1b36fd87e94e984fe300e4e109d2171 | [
"Apache-2.0"
] | null | null | null | tests/unit/query_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 ... | 31.82199 | 79 | 0.568608 |
215002c2a151f422281720fbcf84269bde5a2ab4 | 8,659 | py | Python | dali/test/python/test_operator_external_source.py | ancientmooner/DALI | 355e8db8130cee0d20e9ae3d698f195278544995 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2020-05-09T03:07:07.000Z | 2021-06-15T14:48:04.000Z | dali/test/python/test_operator_external_source.py | ancientmooner/DALI | 355e8db8130cee0d20e9ae3d698f195278544995 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | dali/test/python/test_operator_external_source.py | ancientmooner/DALI | 355e8db8130cee0d20e9ae3d698f195278544995 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-04-26T14:59:51.000Z | 2020-04-26T14:59:51.000Z | from nvidia.dali.pipeline import Pipeline
import nvidia.dali.ops as ops
import nvidia.dali.fn as fn
import nvidia.dali.types as types
import nvidia.dali.backend as backend
import numpy as np
from nose.tools import assert_raises
from test_utils import check_output
import random
class TestIterator():
def __init__(se... | 31.373188 | 96 | 0.62386 |
2150052dc9ad21f0b701c03dd86cb7e73241c8fd | 17,571 | py | Python | common/dali/pipeline.py | MadhuAtBerkeley/w266_Project | e1d44b216e83b6327c1062a56108ff9d386703c0 | [
"Apache-2.0"
] | null | null | null | common/dali/pipeline.py | MadhuAtBerkeley/w266_Project | e1d44b216e83b6327c1062a56108ff9d386703c0 | [
"Apache-2.0"
] | null | null | null | common/dali/pipeline.py | MadhuAtBerkeley/w266_Project | e1d44b216e83b6327c1062a56108ff9d386703c0 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020, NVIDIA CORPORATION. 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 ... | 44.148241 | 120 | 0.615446 |
21501aad19405de3a4837ea1d430b25d0e197e6a | 1,691 | py | Python | src/chainfix/binary.py | pydefi/chainfix | 89a78833fd73ff4877d2a5fd8896cd60862c8e79 | [
"BSD-3-Clause"
] | null | null | null | src/chainfix/binary.py | pydefi/chainfix | 89a78833fd73ff4877d2a5fd8896cd60862c8e79 | [
"BSD-3-Clause"
] | null | null | null | src/chainfix/binary.py | pydefi/chainfix | 89a78833fd73ff4877d2a5fd8896cd60862c8e79 | [
"BSD-3-Clause"
] | 1 | 2022-01-25T12:53:36.000Z | 2022-01-25T12:53:36.000Z | from typing import Any
from chainfix.context import get_binary_context
from chainfix.fixed_point import _Fix
from chainfix.fixed_point import _Ufix
from chainfix.fixed_point import default_precision
from chainfix.fixed_point import default_wordlength
from chainfix.fixed_point import FromTypes
__all__ = ['Fixb', 'Ufix... | 30.745455 | 76 | 0.500296 |
215022e5d9e5d3cd5d6a96583b325b19a1719568 | 12,923 | py | Python | tensorflow/contrib/learn/python/learn/estimators/rnn_common.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/contrib/learn/python/learn/estimators/rnn_common.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/contrib/learn/python/learn/estimators/rnn_common.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.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... | 41.822006 | 93 | 0.720034 |
21502d7d57eaa39908091eb13d764abe6e16751b | 1,222 | py | Python | examples/mixing-layer/mixing-layer.py | xcompact3d/Py4Incompact3D | cbed209a441311082dd088db3cf28a14e89f4006 | [
"Apache-2.0"
] | 1 | 2021-03-05T17:26:57.000Z | 2021-03-05T17:26:57.000Z | examples/mixing-layer/mixing-layer.py | xcompact3d/Py4Incompact3D | cbed209a441311082dd088db3cf28a14e89f4006 | [
"Apache-2.0"
] | 1 | 2021-02-11T16:11:25.000Z | 2021-02-11T16:11:25.000Z | examples/mixing-layer/mixing-layer.py | xcompact3d/Py4Incompact3D | cbed209a441311082dd088db3cf28a14e89f4006 | [
"Apache-2.0"
] | 4 | 2020-12-07T13:27:37.000Z | 2021-03-26T08:00:00.000Z | """ mixing-layer.py
Reference data available from:
https://zenodo.org/record/2577851/files/mixing-layer.tar.xz?download=1
"""
import numpy as np
import matplotlib as mpl
# mpl.use('Agg')
import matplotlib.pyplot as plt
plt.rc("text", usetex=True)
plt.rc("font", family="serif")
plt.rc("font", size=11)
plt.rc("axes",... | 22.62963 | 82 | 0.660393 |
215032b6c5fe0ecdee4625a4d8c7502d74024f0f | 27,070 | py | Python | contrib/go/src/python/pants/contrib/go/subsystems/fetchers.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | contrib/go/src/python/pants/contrib/go/subsystems/fetchers.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | contrib/go/src/python/pants/contrib/go/subsystems/fetchers.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import importlib
imp... | 44.669967 | 103 | 0.680163 |
21503e9419f7cd7d44efcfb9cea5abe5bb360284 | 5,194 | py | Python | SciFiReaders/readers/SID/Nsid_reader.py | itsalexis962/SciFiReaders | 483b228d1f79aafac85cbadd4d0aea488b563902 | [
"MIT"
] | 8 | 2021-05-07T00:59:39.000Z | 2021-12-10T21:03:59.000Z | SciFiReaders/readers/SID/Nsid_reader.py | itsalexis962/SciFiReaders | 483b228d1f79aafac85cbadd4d0aea488b563902 | [
"MIT"
] | 31 | 2021-02-19T21:16:25.000Z | 2022-03-04T22:28:09.000Z | SciFiReaders/readers/SID/Nsid_reader.py | itsalexis962/SciFiReaders | 483b228d1f79aafac85cbadd4d0aea488b563902 | [
"MIT"
] | 6 | 2021-05-07T01:48:09.000Z | 2022-01-21T21:14:36.000Z | # -*- coding: utf-8 -*-
"""
Reader capable of reading one or all NSID datasets present in a given HDF5 file
Created on Fri May 22 16:29:25 2020
@author: Gerd Duscher, Suhas Somnath, Maxim Ziadtinov
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import... | 33.509677 | 81 | 0.596843 |
21505b219d9ff9c6f1d008df6dab036a69c0e67d | 44 | py | Python | tests/assets/successpackage/successpackage/two/gamma.py | SimonBiggs/layer_linter | 9eb518b74118e4a2d8079e2f32ecc12612ca9e86 | [
"BSD-3-Clause"
] | 63 | 2018-06-21T10:39:54.000Z | 2021-06-04T14:28:44.000Z | tests/assets/successpackage/successpackage/two/gamma.py | SimonBiggs/layer_linter | 9eb518b74118e4a2d8079e2f32ecc12612ca9e86 | [
"BSD-3-Clause"
] | 86 | 2018-06-20T13:30:30.000Z | 2019-06-04T12:47:28.000Z | tests/assets/successpackage/successpackage/two/gamma.py | SimonBiggs/layer_linter | 9eb518b74118e4a2d8079e2f32ecc12612ca9e86 | [
"BSD-3-Clause"
] | 4 | 2018-08-14T08:49:55.000Z | 2019-02-16T09:24:47.000Z | from .beta import foo
from .. import utils
| 14.666667 | 21 | 0.727273 |
21506a650f0852f23bc358a44805c8c7b074c270 | 7,882 | py | Python | messaging/api/tests.py | samersultan/treeio | 6299fbe7826800d576f7ab68b4c1996b7194540f | [
"MIT"
] | 2 | 2019-02-22T16:02:19.000Z | 2019-02-23T19:27:34.000Z | messaging/api/tests.py | dewmal/treeio | 6299fbe7826800d576f7ab68b4c1996b7194540f | [
"MIT"
] | null | null | null | messaging/api/tests.py | dewmal/treeio | 6299fbe7826800d576f7ab68b4c1996b7194540f | [
"MIT"
] | null | null | null | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
"""
Messaging: test api
"""
import simplejson as json
from django.test import TestCase
from django.test.client import Client
from django.core.urlresolvers import reverse
from django.contrib.auth.models impo... | 44.531073 | 145 | 0.637909 |
21508acaa280193cbfd3b45f3651647955a4b0f3 | 7,901 | py | Python | experiments/brandon/end2end_sac/pointmass_fixed_goal.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/brandon/end2end_sac/pointmass_fixed_goal.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/brandon/end2end_sac/pointmass_fixed_goal.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import gym
import numpy as np
import rlkit.misc.hyperparameter as hyp
import rlkit.torch.pytorch_util as ptu
from rlkit.data_management.env_replay_buffer import EnvReplayBuffer
from rlkit.launchers.launcher_util import run_experiment
from rlkit.samplers.data_collector import MdpPathCollector
from rlkit.samplers.data_c... | 30.624031 | 73 | 0.58461 |
2150906dcc60d62b05bd3dea7f67fd3ace6f89b2 | 46,295 | py | Python | spark/cs110_lab2_als_prediction.py | BenjaminLiuPenrose/Berkeley-CS-100 | 84fe1633ddaa808ccbf0b5c9f55762e6766c1d3e | [
"BSD-2-Clause"
] | null | null | null | spark/cs110_lab2_als_prediction.py | BenjaminLiuPenrose/Berkeley-CS-100 | 84fe1633ddaa808ccbf0b5c9f55762e6766c1d3e | [
"BSD-2-Clause"
] | null | null | null | spark/cs110_lab2_als_prediction.py | BenjaminLiuPenrose/Berkeley-CS-100 | 84fe1633ddaa808ccbf0b5c9f55762e6766c1d3e | [
"BSD-2-Clause"
] | null | null | null | # Databricks notebook source exported at Wed, 31 Aug 2016 17:43:08 UTC
# MAGIC %md
# MAGIC <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"> <img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png"/> </a> <br/> This work is license... | 53.15155 | 747 | 0.722583 |
215095f3e8aa7093fbe3d55253032f2bfa18adeb | 5,548 | py | Python | venv/lib/python3.8/site-packages/dateparser/data/numeral_translation_data/en.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | 1 | 2021-11-17T04:55:14.000Z | 2021-11-17T04:55:14.000Z | dateparser/data/numeral_translation_data/en.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | dateparser/data/numeral_translation_data/en.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
info = {
"%%2d-year": {
"0": "hundred;",
"(1, 9)": "oh-=%spellout-numbering=;",
"(10, 'inf')": "=%spellout-numbering=;"
},
"%%and": {
"(1, 99)": "' and =%spellout-cardinal-verbose=;",
"(100, 'inf')": "' =%spellout-cardinal-verbose=;"
},
... | 38.262069 | 107 | 0.453857 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.