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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33332e17fa096887dbdf3fc3767f3566ecc46f61 | 3,717 | py | Python | ngde-post-process.py | william-isley-3rd/Comp-Chem-Tools | e874510593504003a9631499516da637a5785828 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2017-04-05T20:50:55.000Z | 2020-06-07T23:52:27.000Z | ngde-post-process.py | william-isley-3rd/Comp-Chem-Tools | e874510593504003a9631499516da637a5785828 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | ngde-post-process.py | william-isley-3rd/Comp-Chem-Tools | e874510593504003a9631499516da637a5785828 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | #! /usr/bin/env python
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
__author__ = 'William Isley III'
############################################################################################
# #
# VER... | 43.729412 | 115 | 0.5152 |
33333da877508d8c84c9467051da0cb0a5ce8509 | 842 | py | Python | examples/deploy/train_lr.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | examples/deploy/train_lr.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | examples/deploy/train_lr.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 : demo
# @Time : 2019-08-15 16:32
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
# https://my.oschina.net/taogang/blog/2222908?from=timeline
# TODO: MLFLOW
... | 25.515152 | 70 | 0.623515 |
33334f5a29301e02edf0793ebbbffadc51b5c6cb | 679 | py | Python | run_tests.py | danielballan/datamuxer | 2df643508b8b6c92198c4b0d986b4b9b560385e0 | [
"BSD-3-Clause"
] | null | null | null | run_tests.py | danielballan/datamuxer | 2df643508b8b6c92198c4b0d986b4b9b560385e0 | [
"BSD-3-Clause"
] | null | null | null | run_tests.py | danielballan/datamuxer | 2df643508b8b6c92198c4b0d986b4b9b560385e0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# This file is closely based on tests.py from matplotlib
#
# This allows running the matplotlib tests from the command line: e.g.
#
# $ python tests.py -v -d
#
# The arguments are identical to the arguments accepted by nosetests.
#
# See https://nose.readthedocs.org/ for a detailed description o... | 24.25 | 70 | 0.708395 |
33336ec70d317242b15025a810511016dbfc7361 | 2,932 | py | Python | assignment2/scorer/tree.py | nouhadziri/Information-Retreival | 664f26307ede1810d253fbf0e00c499dd32998ab | [
"MIT"
] | 1 | 2022-03-24T12:09:14.000Z | 2022-03-24T12:09:14.000Z | ops/query/tree.py | nouhadziri/Information-Retreival | 664f26307ede1810d253fbf0e00c499dd32998ab | [
"MIT"
] | null | null | null | ops/query/tree.py | nouhadziri/Information-Retreival | 664f26307ede1810d253fbf0e00c499dd32998ab | [
"MIT"
] | null | null | null |
class BinaryTree:
def __init__(self, node_type='', node_value=''):
self.node_type = node_type
self.node_value = node_value
self.parent = None
self.right = None
self.left = None
def __str__(self):
if self.left is None and self.right is None:
return '%... | 25.495652 | 110 | 0.566849 |
33337dfca3867ce81c95062f7dfe723b4700b8c7 | 4,224 | py | Python | model/pspnet/cil.pspnet.R101_noDA/network.py | fywalter/TorchSeg | 729eb22d8c5d607466055552fd82e0819d5f29e2 | [
"MIT"
] | null | null | null | model/pspnet/cil.pspnet.R101_noDA/network.py | fywalter/TorchSeg | 729eb22d8c5d607466055552fd82e0819d5f29e2 | [
"MIT"
] | null | null | null | model/pspnet/cil.pspnet.R101_noDA/network.py | fywalter/TorchSeg | 729eb22d8c5d607466055552fd82e0819d5f29e2 | [
"MIT"
] | 2 | 2020-07-31T14:40:49.000Z | 2020-07-31T17:52:30.000Z | # encoding: utf-8
from functools import partial
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.functional as F
from config import config
from base_model import resnet101
from seg_opr.seg_oprs import ConvBnRelu
class PSPNet(nn.Module):
def __init__(self, out_planes, criter... | 36.413793 | 79 | 0.557765 |
33338633d087a3b2d94d23b8385820706f56beb0 | 1,642 | py | Python | section2 - Copy/src/data_prep/SlicesDataset.py | root-dh-94/Hippocampal-Volume-Quantification-in-Alzheimer-s-Progression | 6aba08ba44248af08efb5c19b5f95d3643a025f4 | [
"MIT"
] | null | null | null | section2 - Copy/src/data_prep/SlicesDataset.py | root-dh-94/Hippocampal-Volume-Quantification-in-Alzheimer-s-Progression | 6aba08ba44248af08efb5c19b5f95d3643a025f4 | [
"MIT"
] | null | null | null | section2 - Copy/src/data_prep/SlicesDataset.py | root-dh-94/Hippocampal-Volume-Quantification-in-Alzheimer-s-Progression | 6aba08ba44248af08efb5c19b5f95d3643a025f4 | [
"MIT"
] | null | null | null | """
Module for Pytorch dataset representations
"""
import torch
from torch.utils.data import Dataset
class SlicesDataset(Dataset):
"""
This class represents an indexable Torch dataset
which could be consumed by the PyTorch DataLoader class
"""
def __init__(self, data):
self.data = data
... | 28.310345 | 100 | 0.579172 |
33339a93480b4b09a346d277602049d9bec3316d | 1,167 | py | Python | modernize/old_division_utils.py | superjkl/python-modernize-division-warnings | 7095261ec661fbf33db59c87c501f0f84ecc4f4a | [
"BSD-3-Clause"
] | null | null | null | modernize/old_division_utils.py | superjkl/python-modernize-division-warnings | 7095261ec661fbf33db59c87c501f0f84ecc4f4a | [
"BSD-3-Clause"
] | null | null | null | modernize/old_division_utils.py | superjkl/python-modernize-division-warnings | 7095261ec661fbf33db59c87c501f0f84ecc4f4a | [
"BSD-3-Clause"
] | null | null | null | import numpy
import warnings
def is_integer(x):
t = type(x)
return issubclass(t, int) or issubclass(t, long) or (
numpy.issubdtype(x.dtype, numpy.integer) if issubclass(t, numpy.ndarray) else issubclass(t, numpy.integer))
def is_other_known(x):
t = type(x)
return is_integer(x) or issubclass(... | 27.139535 | 115 | 0.64353 |
3333c8508c2c630e3296494369c38da73808b9e6 | 9,612 | py | Python | taxman/audit.py | tomquirk/taxman | 51846a1921a0654f5049c6cc7d73ba5e8e6fe745 | [
"MIT"
] | null | null | null | taxman/audit.py | tomquirk/taxman | 51846a1921a0654f5049c6cc7d73ba5e8e6fe745 | [
"MIT"
] | null | null | null | taxman/audit.py | tomquirk/taxman | 51846a1921a0654f5049c6cc7d73ba5e8e6fe745 | [
"MIT"
] | null | null | null | """
=================
CSS Audit
Author: Tom Quirk
=================
"""
from bs4 import BeautifulSoup as Bs
import os
class Colour:
"""
Class for holding ANSI print colours
"""
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC... | 31.933555 | 137 | 0.509571 |
3333c980a59c24e23d93772ca6a9aa2b10f89505 | 2,453 | py | Python | dynamic_programming/416_partition_equal_subset_sum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | dynamic_programming/416_partition_equal_subset_sum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | dynamic_programming/416_partition_equal_subset_sum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | 2 | 2020-02-07T20:49:02.000Z | 2020-02-11T06:01:55.000Z | # subset
class Solution:
def canPartition(self, nums: List[int]) -> bool:
self.target = int(sum(nums) / 2)
self.subsets = []
def combo(nums, subset, i):
"""Check all possible combination of numbers recursively"""
self.subsets.append(subset)
... | 33.60274 | 79 | 0.46596 |
3333fe7130ac85110d95a7db2c475af6e939ab84 | 3,805 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_messaging/_executors/impl_eventlet.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/oslo_messaging/_executors/impl_eventlet.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_messaging/_executors/impl_eventlet.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Red Hat, Inc.
# Copyright 2013 New Dream Network, LLC (DreamHost)
#
# 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-... | 31.446281 | 78 | 0.636268 |
33340009bb2a2b807cf289b1ef59751540906a32 | 688 | py | Python | test/testcases.py | cmorterud/flask-eztest | 3d0827c64e09c7787ec00f62ef8a94bb153ae9a5 | [
"MIT"
] | 1 | 2018-06-22T04:56:14.000Z | 2018-06-22T04:56:14.000Z | test/testcases.py | cmorterud/flask-eztest | 3d0827c64e09c7787ec00f62ef8a94bb153ae9a5 | [
"MIT"
] | null | null | null | test/testcases.py | cmorterud/flask-eztest | 3d0827c64e09c7787ec00f62ef8a94bb153ae9a5 | [
"MIT"
] | 2 | 2018-08-30T08:56:17.000Z | 2019-05-08T15:20:26.000Z |
from flaskeztest.eztestcase import EZTestCase
class TestCase1(EZTestCase):
FIXTURE = 'oneuser'
def runTest(self):
self.navigate('/one')
self.assertTrue(self.page.has_current_path("/one"))
self.assertTrue(self.page.has_text('Bob'))
self.assert_field_exists('User', 'name')
... | 25.481481 | 59 | 0.65407 |
33340c614bccc740cf667dbd0561752ee6e04c8f | 2,553 | py | Python | robosat_pink/config.py | HugoPopo/robosat.pink | daa6a0cd6dff68103b9bcc78a8c9a15d8912c42d | [
"MIT"
] | null | null | null | robosat_pink/config.py | HugoPopo/robosat.pink | daa6a0cd6dff68103b9bcc78a8c9a15d8912c42d | [
"MIT"
] | null | null | null | robosat_pink/config.py | HugoPopo/robosat.pink | daa6a0cd6dff68103b9bcc78a8c9a15d8912c42d | [
"MIT"
] | null | null | null | """ Dictionary-based configuration with a TOML-based on-disk representation. Cf: https://github.com/toml-lang/toml """
import os
import sys
import toml
import robosat_pink.colors as colors
def load_config(path):
"""Loads a dictionary from configuration file."""
try:
config = toml.load(os.path.expan... | 31.134146 | 118 | 0.634939 |
33341c0cc48dfe5ac92f51a36b5e121007771a64 | 1,625 | py | Python | pyirf/irf/effective_area.py | nbiederbeck/pyirf | 87abc94fed4f078e185cf930f92198fd40f6f571 | [
"MIT"
] | null | null | null | pyirf/irf/effective_area.py | nbiederbeck/pyirf | 87abc94fed4f078e185cf930f92198fd40f6f571 | [
"MIT"
] | null | null | null | pyirf/irf/effective_area.py | nbiederbeck/pyirf | 87abc94fed4f078e185cf930f92198fd40f6f571 | [
"MIT"
] | null | null | null | import numpy as np
import astropy.units as u
from ..binning import create_histogram_table
__all__ = [
"effective_area",
"point_like_effective_area",
]
@u.quantity_input(area=u.m ** 2)
def effective_area(n_selected, n_simulated, area):
"""
Calculate effective area for histograms of selected and total... | 31.862745 | 85 | 0.722462 |
33341f7d30f4f5463e2877ad27c1e4109b3d6c3f | 4,289 | py | Python | pylib/net/util.py | xkmato/py77 | 9c44d8f8924f47a7331c29fd0287a4bb9416d316 | [
"MIT"
] | null | null | null | pylib/net/util.py | xkmato/py77 | 9c44d8f8924f47a7331c29fd0287a4bb9416d316 | [
"MIT"
] | null | null | null | pylib/net/util.py | xkmato/py77 | 9c44d8f8924f47a7331c29fd0287a4bb9416d316 | [
"MIT"
] | 2 | 2018-07-16T19:14:11.000Z | 2020-10-15T08:48:32.000Z | """
RPC util functions
"""
__copyright__ = '2013, Room 77, Inc.'
__author__ = 'Kyle Konrad'
# Python 2/3 compatibility
try:
from configparser import ConfigParser # Python 3
except ImportError:
from ConfigParser import ConfigParser # Python 2
from hashlib import md5
import json
import os
import requests
from func... | 27.850649 | 85 | 0.698298 |
33344ca2233bf30a27c93438b6910ad20d0ed930 | 25,505 | py | Python | src/sardana/pool/poolpseudomotor.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/pool/poolpseudomotor.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/pool/poolpseudomotor.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under th... | 40.808 | 143 | 0.583337 |
33345a430be4d5f56bee36039f6959d438eef018 | 1,462 | py | Python | setup.py | fmagin/remarkable-fs | e322a3d0b0672c9a67730bfe5e148dbb704964df | [
"MIT"
] | 67 | 2018-01-24T12:38:41.000Z | 2022-02-02T19:39:41.000Z | setup.py | fmagin/remarkable-fs | e322a3d0b0672c9a67730bfe5e148dbb704964df | [
"MIT"
] | 12 | 2018-01-21T16:20:25.000Z | 2022-03-31T20:46:49.000Z | setup.py | fmagin/remarkable-fs | e322a3d0b0672c9a67730bfe5e148dbb704964df | [
"MIT"
] | 11 | 2018-03-04T13:39:09.000Z | 2021-02-03T04:38:40.000Z | #!/usr/bin/env python
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), e... | 29.836735 | 72 | 0.635431 |
33346e4fb93d689e4272bc0f625547698b3e295d | 3,515 | py | Python | naive_nlg.py | jaimiles23/Alexa-Utils | bd3573ac8c78450cf936fe3bdb7981cde3e8a3b2 | [
"MIT"
] | 1 | 2020-08-14T04:01:23.000Z | 2020-08-14T04:01:23.000Z | naive_nlg.py | jaimiles23/Alexa-Utils | bd3573ac8c78450cf936fe3bdb7981cde3e8a3b2 | [
"MIT"
] | null | null | null | naive_nlg.py | jaimiles23/Alexa-Utils | bd3573ac8c78450cf936fe3bdb7981cde3e8a3b2 | [
"MIT"
] | null | null | null | """/**
* @author [Jai Miles]
* @email [jaimiles23@gmail.com]
* @create date 2020-05-06 15:10:52
* @modify date 2020-06-16 15:11:39
* @desc [
TODO:
- Consider is_instance(data, (tuple, list)) vs has_attr(__iter__)??
##########
# README.md Example.
##########
linear_nlg is a naive natural ... | 28.12 | 144 | 0.61138 |
333477dd4244b2ca71bc9b6c8038169b6b75bbb8 | 695 | py | Python | client/verta/verta/_swagger/_public/uac/model/UacRemoveTeamUser.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/uac/model/UacRemoveTeamUser.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/uac/model/UacRemoveTeamUser.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class UacRemoveTeamUser(BaseType):
def __init__(self, team_id=None, share_with=None):
required = {
"team_id": False,
"share_with": False,
}
self.team_id = team_id
self.share_with = share_with
for... | 23.166667 | 62 | 0.630216 |
33348a335cb36fc768f9dc848634cf11fbfe289f | 3,263 | py | Python | test/python/_random_qasm_generator.py | emmabostian/qiskit-sdk-py | 2feba1cba156ba85fc840630c62a793099f208d0 | [
"Apache-2.0"
] | 2 | 2020-11-17T18:49:44.000Z | 2021-02-16T11:01:41.000Z | test/python/_random_qasm_generator.py | emmabostian/qiskit-sdk-py | 2feba1cba156ba85fc840630c62a793099f208d0 | [
"Apache-2.0"
] | null | null | null | test/python/_random_qasm_generator.py | emmabostian/qiskit-sdk-py | 2feba1cba156ba85fc840630c62a793099f208d0 | [
"Apache-2.0"
] | null | null | null | import random
import string
try:
import qiskit
except ImportError as ierr:
sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
import qiskit
from qiskit import QuantumProgram
class RandomQasmGenerator():
"""
Generate random size circuits for profiling.
"""
def __init__(self, ... | 37.505747 | 81 | 0.553172 |
3334c2595a08cf36fe03f077ecd122915b1773c0 | 443 | py | Python | router_5tonic_vnfd/charms/ansible-charm-v2/reactive/ansible.py | beckrian/mano | a03088ab9a35fe4ab65a30587a6f0e0d72491434 | [
"Apache-2.0"
] | 1 | 2019-05-01T08:40:09.000Z | 2019-05-01T08:40:09.000Z | router_5tonic_vnfd/charms/ansible-charm-v2/reactive/ansible.py | beckrian/mano | a03088ab9a35fe4ab65a30587a6f0e0d72491434 | [
"Apache-2.0"
] | null | null | null | router_5tonic_vnfd/charms/ansible-charm-v2/reactive/ansible.py | beckrian/mano | a03088ab9a35fe4ab65a30587a6f0e0d72491434 | [
"Apache-2.0"
] | 5 | 2018-05-25T18:08:15.000Z | 2020-01-03T14:15:46.000Z | from charms.reactive import hook, set_state
from charms import ansible
from charmhelpers.core.hookenv import status_set
@hook('install', 'upgrade-charm')
def install_and_upgrade_ansible():
''' Install Ansible from archive '''
# TODO - support offline installation from resources
status_set('maintenance', '... | 31.642857 | 56 | 0.751693 |
3334c56dd90bbace75dc08d1430d20d4491b91e5 | 4,023 | py | Python | prepro_feats.py | mollnn/video-caption.pytorch | dc4bb5335a730bf3a66bc78241babfeea05b15e7 | [
"MIT"
] | 2 | 2021-11-20T01:19:36.000Z | 2021-12-03T01:48:08.000Z | prepro_feats.py | mollnn/video-caption.pytorch | dc4bb5335a730bf3a66bc78241babfeea05b15e7 | [
"MIT"
] | null | null | null | prepro_feats.py | mollnn/video-caption.pytorch | dc4bb5335a730bf3a66bc78241babfeea05b15e7 | [
"MIT"
] | null | null | null | import shutil
import subprocess
import glob
from tqdm import tqdm
import numpy as np
import os
import argparse
import torch
from torch import nn
import torch.nn.functional as F
import pretrainedmodels
from pretrainedmodels import utils
C, H, W = 3, 224, 224
def extract_frames(video, dst):
with open(os.devnull, ... | 37.25 | 91 | 0.58961 |
3334c5b67a4d2a3b00dcfd4d38c0aa6817da5551 | 1,894 | py | Python | web/blog/management/commands/import_from_tumblr.py | fatiherikli/fatiherikli.github.io | 3391128fdab11181c090e0bba418d9cf29c39f94 | [
"CC0-1.0"
] | 8 | 2018-05-20T09:32:10.000Z | 2021-02-01T17:43:19.000Z | web/blog/management/commands/import_from_tumblr.py | fatiherikli/fatiherikli.github.io | 3391128fdab11181c090e0bba418d9cf29c39f94 | [
"CC0-1.0"
] | 3 | 2018-05-21T22:18:53.000Z | 2019-06-07T16:48:46.000Z | web/blog/management/commands/import_from_tumblr.py | fatiherikli/fatiherikli.github.io | 3391128fdab11181c090e0bba418d9cf29c39f94 | [
"CC0-1.0"
] | 6 | 2018-05-22T14:26:42.000Z | 2019-01-30T20:14:18.000Z | import json
import requests
import _html2text
from dateutil import parser
from django.conf import settings
from django.core.management.base import BaseCommand
from blog.models import Post
class Command(BaseCommand):
"""
A command for importing posts from tumblr.
"""
def handle(self, *args, **kwargs):... | 25.594595 | 75 | 0.557022 |
333526bc92d772ded9fcea4368b93f338da70b6d | 691 | py | Python | Leet Code/30 Days of Code/week_04/jump_game.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | Leet Code/30 Days of Code/week_04/jump_game.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | Leet Code/30 Days of Code/week_04/jump_game.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | class Solution:
def canJump(self, nums: List[int]) -> bool:
if len(nums) == 1:
return True
elif nums[0] == 0:
return False
else:
can_reach = -1
for i in range(len(nums)):
can_reach = max(i + nums[i],can_reach)
if... | 23.033333 | 54 | 0.295224 |
33352729315e5a7bb775e2d4c2ad818881ef9941 | 433 | py | Python | deepmath/deephol/jup_predict/custom/__init__.py | aahadley/deepmath | ad4426323be64bacd4a6727f1e48f4e54ee1e259 | [
"Apache-2.0"
] | 8 | 2019-12-12T19:13:28.000Z | 2021-08-08T09:29:35.000Z | deepmath/deephol/jup_predict/custom/__init__.py | aahadley/deepmath | ad4426323be64bacd4a6727f1e48f4e54ee1e259 | [
"Apache-2.0"
] | null | null | null | deepmath/deephol/jup_predict/custom/__init__.py | aahadley/deepmath | ad4426323be64bacd4a6727f1e48f4e54ee1e259 | [
"Apache-2.0"
] | 2 | 2020-10-02T11:55:03.000Z | 2021-09-26T23:53:25.000Z |
try:
from .goal_emb import *
except ImportError:
pass
try:
from .st_emb import *
except ImportError:
pass
try:
from .st_enc import *
except ImportError:
pass
try:
from .st_search import *
except ImportError:
pass
try:
from .tac_sc import *
except ImportError:
pass
try:
... | 12.027778 | 28 | 0.660508 |
333527d1662952c92d8219cfcc003ed3ee3b873c | 981 | py | Python | fingerExercises/fingerExercises-02/02.4-finger.gcd-iter.py | sodaPhix/MITx-6.00.1x | 8629e227d250cf6c2d5ca56944668b5796ce78cf | [
"MIT"
] | 1 | 2019-10-06T22:58:39.000Z | 2019-10-06T22:58:39.000Z | fingerExercises/fingerExercises-02/02.4-finger.gcd-iter.py | sodaPhix/MITx-6.00.1x | 8629e227d250cf6c2d5ca56944668b5796ce78cf | [
"MIT"
] | null | null | null | fingerExercises/fingerExercises-02/02.4-finger.gcd-iter.py | sodaPhix/MITx-6.00.1x | 8629e227d250cf6c2d5ca56944668b5796ce78cf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 7 02:22:18 2019
@author: sodatab
MITx: 6.00.1x
"""
"""
02.4-Finger Greatest Common Divisor Iteration
----------------------------------------------
The greatest common divisor of two positive integers is the largest integer that divides each of t... | 22.813953 | 129 | 0.626911 |
33353d70789cb8b2286cdac0110042db4ee46a73 | 62 | py | Python | rotate_list_LL/tester.py | dhanraj-vedanth/Leetcode | b8b3283fc443b9ead769f8e3c720fc6c5d7633a6 | [
"MIT"
] | null | null | null | rotate_list_LL/tester.py | dhanraj-vedanth/Leetcode | b8b3283fc443b9ead769f8e3c720fc6c5d7633a6 | [
"MIT"
] | null | null | null | rotate_list_LL/tester.py | dhanraj-vedanth/Leetcode | b8b3283fc443b9ead769f8e3c720fc6c5d7633a6 | [
"MIT"
] | null | null | null | import re
x = 20000
while(x%10 ==0):
x = x//10
print(x) | 7.75 | 16 | 0.532258 |
333547b1ee2678f585a6bf4ea9612bc7478dfd79 | 2,541 | py | Python | checkout/migrations/0001_initial.py | PaulBowden673/Projects-MP-MP4 | a4a176457560e6d5087c823f86da0a88f2ad6537 | [
"W3C",
"PostgreSQL"
] | null | null | null | checkout/migrations/0001_initial.py | PaulBowden673/Projects-MP-MP4 | a4a176457560e6d5087c823f86da0a88f2ad6537 | [
"W3C",
"PostgreSQL"
] | null | null | null | checkout/migrations/0001_initial.py | PaulBowden673/Projects-MP-MP4 | a4a176457560e6d5087c823f86da0a88f2ad6537 | [
"W3C",
"PostgreSQL"
] | null | null | null | # Generated by Django 3.2 on 2022-02-02 12:54
from django.db import migrations, models
import django.db.models.deletion
import django_countries.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
('products', '0002_auto_20220130_1451'),
]
operations = [
mi... | 49.823529 | 137 | 0.612751 |
33356176036dcf645fc269a4a52386dc636cabd4 | 429 | py | Python | backend/salary_calculator/tests/test_urls.py | szypkiwonsz/Work-Hours | e125569b7f0ca0d154000fb76aa358486e3d6f4d | [
"MIT"
] | null | null | null | backend/salary_calculator/tests/test_urls.py | szypkiwonsz/Work-Hours | e125569b7f0ca0d154000fb76aa358486e3d6f4d | [
"MIT"
] | null | null | null | backend/salary_calculator/tests/test_urls.py | szypkiwonsz/Work-Hours | e125569b7f0ca0d154000fb76aa358486e3d6f4d | [
"MIT"
] | null | null | null | import pytest
from django.urls import resolve, reverse
from salary_calculator.views import SalaryView, PayoutView
@pytest.mark.salary_calculator_urls
class TestUrls:
def test_salary_url(self):
url = resolve(reverse('salary'))
assert url.func.view_class == SalaryView
def test_payout_url(self... | 25.235294 | 58 | 0.717949 |
333573c00de505464cf471bbbadb28c1cb8ea010 | 5,820 | py | Python | twisted/test/test_dirdbm.py | sxamit/twisted | 30f6966329c857c3631c60aeb420d84d7828e01e | [
"MIT",
"Unlicense"
] | 1 | 2017-08-07T14:52:02.000Z | 2017-08-07T14:52:02.000Z | Lib/site-packages/twisted/test/test_dirdbm.py | adzhou/Python27 | a7113b69d54a04cc780143241c2f1fe81939ad3a | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/twisted/test/test_dirdbm.py | adzhou/Python27 | a7113b69d54a04cc780143241c2f1fe81939ad3a | [
"bzip2-1.0.6"
] | 1 | 2018-11-07T12:52:07.000Z | 2018-11-07T12:52:07.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for dirdbm module.
"""
import os, shutil, glob
from twisted.trial import unittest
from twisted.persisted import dirdbm
class DirDbmTests(unittest.TestCase):
def setUp(self):
self.path = self.mktemp()
self.d... | 34.035088 | 119 | 0.574055 |
333574c52f1f79a48dc272e6f4a570ae16bff11a | 851 | py | Python | setup.py | monmanuela/reflective_listening | 7824f55b4eb6bc8ac1977c868a203c869a14e56a | [
"MIT"
] | 5 | 2021-05-20T07:09:04.000Z | 2022-01-10T07:26:25.000Z | setup.py | monmanuela/reflective_listening | 7824f55b4eb6bc8ac1977c868a203c869a14e56a | [
"MIT"
] | null | null | null | setup.py | monmanuela/reflective_listening | 7824f55b4eb6bc8ac1977c868a203c869a14e56a | [
"MIT"
] | 2 | 2021-05-20T07:09:19.000Z | 2022-01-13T15:36:03.000Z | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name='reflective_listening',
version='0.1.3',
description='Reflective listening statements via paraphrase generation',
long_description=long_description,
long_description_conte... | 27.451613 | 76 | 0.648649 |
33357dbace832c8d34a0597bb470178415f88144 | 4,336 | py | Python | savu/plugins/unregistered/dezinger_old/dezinger_deprecated.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/unregistered/dezinger_old/dezinger_deprecated.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/unregistered/dezinger_old/dezinger_deprecated.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | # Copyright 2014 Diamond Light Source Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 36.133333 | 107 | 0.642066 |
33357dc70f74c9a1730b0e4f0a9317a8a0d2968d | 2,164 | py | Python | mi/dataset/driver/ctdmo_ghqr/imodem/ctdmo_ghqr_imodem_recovered_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/driver/ctdmo_ghqr/imodem/ctdmo_ghqr_imodem_recovered_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/driver/ctdmo_ghqr/imodem/ctdmo_ghqr_imodem_recovered_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
@package mi.dataset.driver.ctdmo_ghqr.imodem
@file mi-dataset/mi/dataset/driver/ctdmo_ghqr/imodem/ctdmo_ghqr_imodem_recovered_driver.py
@author Mark Worden
@brief Driver for the ctdmo_ghqr_imodem instrument
Release notes:
Initial Release
"""
from mi.dataset.dataset_parser import DataSetDri... | 34.903226 | 103 | 0.731054 |
3335adcaea27fb9385746b37facee7cce191b68a | 5,848 | py | Python | explain.py | adbmd/explainx | bb8bd78bcb1b6fbf2de368e56de6300de98a413a | [
"MIT"
] | 1 | 2020-09-12T17:05:32.000Z | 2020-09-12T17:05:32.000Z | explain.py | adbmd/explainx | bb8bd78bcb1b6fbf2de368e56de6300de98a413a | [
"MIT"
] | null | null | null | explain.py | adbmd/explainx | bb8bd78bcb1b6fbf2de368e56de6300de98a413a | [
"MIT"
] | null | null | null | import os
import sys
from pathlib import Path
from sys import platform
import subprocess
path= Path(__file__).parent.absolute()
path_dataset= os.path.join(path, "datasets")
path= os.path.join(path, "lib")
sys.path.append(path)
from imports import *
from dashboard import *
from calculate_shap import *
"""
This class... | 29.535354 | 124 | 0.611149 |
3335bc7001d7324c940314ed0839269fe6624b2a | 40,507 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/operations/_virtual_network_gateways_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/operations/_virtual_network_gateways_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/operations/_virtual_network_gateways_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 48.980653 | 221 | 0.689905 |
3335bc780326f83ff487c0ce0be0819b5e8eea73 | 18,708 | py | Python | mi/dataset/parser/test/test_dpc.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/test/test_dpc.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/test/test_dpc.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | import glob
import os
from mock import Mock
from nose.plugins.attrib import attr
from mi.dataset.parser.dpc import DeepProfilerParticle, DeepProfilerParser
from mi.dataset.test.test_parser import ParserUnitTestCase
from mi.core.log import get_logger
log = get_logger()
__author__ = 'pcable'
TEST_DIR = os.path.dirname... | 73.944664 | 132 | 0.438422 |
3335c1e79a6ce36bc553daffdd9afc0cad50ca39 | 3,815 | py | Python | src/lp_detector.py | Haiduongcable/Project-1 | 81929e9d025215ba62ba8d8e69e032a84e57576f | [
"Apache-2.0"
] | null | null | null | src/lp_detector.py | Haiduongcable/Project-1 | 81929e9d025215ba62ba8d8e69e032a84e57576f | [
"Apache-2.0"
] | null | null | null | src/lp_detector.py | Haiduongcable/Project-1 | 81929e9d025215ba62ba8d8e69e032a84e57576f | [
"Apache-2.0"
] | null | null | null | import numpy as np
import os
from darknet import *
import cv2
import time
import glob
import imutils
import anyconfig
import munch
class LicensePlateDetector():
def __init__(self, config):
self.config = config
self.conf_threshold = 0.5
self.nms_threshold = 0.45
self.hier_threshold ... | 38.15 | 117 | 0.59633 |
3335dde4dd66a280fd26cb09277c5f7e8da7a37a | 2,037 | py | Python | 2021/day_14/solution.py | dandiez/AdventOfCode | 99ebe6991964290ede87b144c8692c8f6b31030d | [
"MIT"
] | null | null | null | 2021/day_14/solution.py | dandiez/AdventOfCode | 99ebe6991964290ede87b144c8692c8f6b31030d | [
"MIT"
] | null | null | null | 2021/day_14/solution.py | dandiez/AdventOfCode | 99ebe6991964290ede87b144c8692c8f6b31030d | [
"MIT"
] | null | null | null | from collections import defaultdict
from unittest import TestCase
def read_input(filename="input"):
with open(filename) as f:
lines = [line.strip() for line in f.readlines() if line.strip()]
template = lines[0]
rules = []
for line in lines[1:]:
a, b = line.split(" -> ")
a0, a1 ... | 25.4625 | 91 | 0.61512 |
3336249e26d5b8ff0273546f291bc3715735ce15 | 273 | py | Python | examples/one_dimentional.py | AP-Atul/wavelets | cff71e777759844b35f8e96f14930b2c71a215a1 | [
"MIT"
] | 5 | 2021-02-01T07:43:39.000Z | 2022-03-25T05:01:31.000Z | examples/one_dimentional.py | AP-Atul/wavelets | cff71e777759844b35f8e96f14930b2c71a215a1 | [
"MIT"
] | null | null | null | examples/one_dimentional.py | AP-Atul/wavelets | cff71e777759844b35f8e96f14930b2c71a215a1 | [
"MIT"
] | null | null | null | from wavelet import FastWaveletTransform
WAVELET_NAME = "db4"
t = FastWaveletTransform(WAVELET_NAME)
# original data
data = [1, 1, 1, 1, 1, 1, 1, 1]
print(data)
# decomposition --> reconstruction
coefficients = t.waveDec(data)
data = t.waveRec(coefficients)
print(data)
| 19.5 | 40 | 0.739927 |
33362743e8ca2df185f8b4425a8f82925987d87d | 7,142 | py | Python | cloudmonkey/config.py | disller/cloudstack-cloudmonkey | d2946df93ac361be23b194089bfd05a541c183b8 | [
"Apache-2.0"
] | 1 | 2015-02-06T04:17:25.000Z | 2015-02-06T04:17:25.000Z | cloudmonkey/config.py | disller/cloudstack-cloudmonkey | d2946df93ac361be23b194089bfd05a541c183b8 | [
"Apache-2.0"
] | null | null | null | cloudmonkey/config.py | disller/cloudstack-cloudmonkey | d2946df93ac361be23b194089bfd05a541c183b8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | 36.070707 | 78 | 0.636516 |
33363834e048d3eea66c009286cb3efec89348c4 | 9,938 | py | Python | cumulusci/robotframework/pageobjects/BasePageObjects.py | Julian88Tex/CumulusCI | 82d5fab71b61fbab53c1b5fc6001452fa3f97da8 | [
"BSD-3-Clause"
] | 1 | 2020-08-08T03:55:21.000Z | 2020-08-08T03:55:21.000Z | cumulusci/robotframework/pageobjects/BasePageObjects.py | Julian88Tex/CumulusCI | 82d5fab71b61fbab53c1b5fc6001452fa3f97da8 | [
"BSD-3-Clause"
] | null | null | null | cumulusci/robotframework/pageobjects/BasePageObjects.py | Julian88Tex/CumulusCI | 82d5fab71b61fbab53c1b5fc6001452fa3f97da8 | [
"BSD-3-Clause"
] | null | null | null | # Note: Unlike in traditional robot libraries, this docstring will end
# up in output from the libdoc task. For that to happen, it must be
# before the imports.
"""
The following page objects are automatically included when
importing the PageObject library. You should not directly import this
file.
"""
import re
fro... | 34.387543 | 100 | 0.650735 |
33364783d3d22a88ad2ee086e6b707381598e877 | 7,980 | py | Python | datasets/SOT/dataset.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | datasets/SOT/dataset.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | datasets/SOT/dataset.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | from datasets.base.storage_engine.memory_mapped import ListMemoryMapped
import numpy as np
from miscellanies.platform_style_path import join_path
from datasets.base.common.memory_mapped.dataset import LazyAttributesLoader, DummyAttributesLoader, MemoryMappedDataset
__all__ = ['SingleObjectTrackingDataset_MemoryMapped'... | 46.127168 | 146 | 0.715038 |
33364abcb362e13bebe37c5d9bb864034b5da96a | 902 | py | Python | LC/149.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | 2 | 2018-02-24T17:20:02.000Z | 2018-02-24T17:25:43.000Z | LC/149.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | LC/149.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | # Definition for a point.
# class Point(object):
# def __init__(self, a=0, b=0):
# self.x = a
# self.y = b
class Solution(object):
def maxPoints(self, points):
"""
:type points: List[Point]
:rtype: int
"""
res=0
for i in range(len(points)):
... | 32.214286 | 85 | 0.446785 |
333678daf0b96bda0739ae9957840462fbb874ba | 2,558 | py | Python | data_prep/organize.py | tanumkroken/speech-classifier | 9ef5a7778f5df5c9488690ea96b5b35cd4eef08d | [
"MIT"
] | null | null | null | data_prep/organize.py | tanumkroken/speech-classifier | 9ef5a7778f5df5c9488690ea96b5b35cd4eef08d | [
"MIT"
] | null | null | null | data_prep/organize.py | tanumkroken/speech-classifier | 9ef5a7778f5df5c9488690ea96b5b35cd4eef08d | [
"MIT"
] | null | null | null | '''Organize the LibriSpeech training data
We are using the train-clean-100 data set'''
import os
import sys
import re
from collections import defaultdict
import shutil
from pathlib import Path
import glob
AUDIO = '.flac'
TARGET_DIR = '../training_data/'
SOURCE_DIR = '../LibriSpeech/'
sys.path.insert(0, os.path.abs... | 34.567568 | 91 | 0.609461 |
3336a1aeca7c88b6ebc94ed5e338926b73f09a00 | 13,446 | py | Python | xiao_asgi/routing.py | jonathanstaniforth/xiao-asgi | 9a1c2b59d034a242574736a2a8130804bb799049 | [
"MIT"
] | null | null | null | xiao_asgi/routing.py | jonathanstaniforth/xiao-asgi | 9a1c2b59d034a242574736a2a8130804bb799049 | [
"MIT"
] | 17 | 2021-11-10T12:08:29.000Z | 2021-12-04T18:34:04.000Z | xiao_asgi/routing.py | jonathanstaniforth/xiao-asgi | 9a1c2b59d034a242574736a2a8130804bb799049 | [
"MIT"
] | null | null | null | """Routes and endpoints.
The available classes in this module can be used to construct routes for a
particular protocol and their endpoints.
Classes:
Route: abstract base class for building route classes for a protocol.
HttpRoute: a HTTP route and endpoints.
WebSocketRoute: a WebSocket route.
"""
import r... | 30.628702 | 79 | 0.608731 |
3336fe75ae095b9e309105e5d204ce87c1fbf314 | 2,895 | py | Python | eval_metric.py | xwhan/Extremely-Fine-Grained-Entity-Typing | d8660ccfa70b0bbeec9a200bf2336aa0d7aa7ab7 | [
"MIT"
] | 89 | 2019-03-06T22:42:59.000Z | 2021-09-29T03:34:27.000Z | eval_metric.py | CPF-NLPR/Extremely-Fine-Grained-Entity-Typing | d8660ccfa70b0bbeec9a200bf2336aa0d7aa7ab7 | [
"MIT"
] | 5 | 2019-03-12T16:11:46.000Z | 2020-09-11T08:21:31.000Z | eval_metric.py | CPF-NLPR/Extremely-Fine-Grained-Entity-Typing | d8660ccfa70b0bbeec9a200bf2336aa0d7aa7ab7 | [
"MIT"
] | 8 | 2019-03-08T15:05:29.000Z | 2021-07-09T15:30:05.000Z | import numpy as np
def f1(p, r):
if r == 0.:
return 0.
return 2 * p * r / float(p + r)
def strict(true_and_prediction):
num_entities = len(true_and_prediction)
correct_num = 0.
for true_labels, predicted_labels in true_and_prediction:
correct_num += set(true_labels) == set(predicted_labels)
precis... | 35.740741 | 102 | 0.72677 |
3337475e9aeb17b9c43972c81779f60d3773086f | 2,482 | py | Python | test/vanilla/version-tolerant/AcceptanceTests/test_custom_base_uri.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/AcceptanceTests/test_custom_base_uri.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/AcceptanceTests/test_custom_base_uri.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""),... | 42.793103 | 93 | 0.728848 |
3337542db28a8e991f536df79a06371428ee0dee | 2,901 | py | Python | test/unit/gen_libs/file_search.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | test/unit/gen_libs/file_search.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | test/unit/gen_libs/file_search.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Classification (U)
"""Program: file_search.py
Description: Unit testing of file_search in gen_libs.py.
Usage:
test/unit/gen_libs/file_search.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
import unitt... | 20.429577 | 78 | 0.631506 |
3337929cd5b19ebb14152a7a2c0a09b6dab3c5f7 | 1,826 | py | Python | Minesweeper/managers/BroomManager.py | BrettRegnier/Minesweeper | b05dfa86b4ab65797ab62e87ec39cadf2ed015ef | [
"MIT"
] | null | null | null | Minesweeper/managers/BroomManager.py | BrettRegnier/Minesweeper | b05dfa86b4ab65797ab62e87ec39cadf2ed015ef | [
"MIT"
] | null | null | null | Minesweeper/managers/BroomManager.py | BrettRegnier/Minesweeper | b05dfa86b4ab65797ab62e87ec39cadf2ed015ef | [
"MIT"
] | null | null | null | import collections
import numpy as np
class BroomManager:
def __init__(self, env, agent):
self._agent = agent
self._win = 0
self._lose = 0
self._win_loss = collections.deque(maxlen=100)
def TrainNoYield(self):
self._agent.TrainNoYield()
def Train(self):
... | 32.035088 | 72 | 0.555312 |
3337a84be3894e140390b482633c705499fc4a19 | 245 | py | Python | src/oop_examples/Learn/test_example.py | RowenWitt/lambdata_1 | 9acd03887786ecafa8e2129f8ca3a936fd442e3b | [
"MIT"
] | null | null | null | src/oop_examples/Learn/test_example.py | RowenWitt/lambdata_1 | 9acd03887786ecafa8e2129f8ca3a936fd442e3b | [
"MIT"
] | null | null | null | src/oop_examples/Learn/test_example.py | RowenWitt/lambdata_1 | 9acd03887786ecafa8e2129f8ca3a936fd442e3b | [
"MIT"
] | null | null | null | """Basic Unit testing for example.py"""
from random import randint
import pytest
from example import increment, COLORS
def test_increment():
"""Testing increment function"""
test_value = randint(100, 1000)
assert increment(3) == 4 | 22.272727 | 39 | 0.722449 |
3337cba546956712a8d949ff523364c1330e140a | 402 | py | Python | jaraco/windows/api/process.py | jaraco/jaraco.windows | e858172b4d5ee91233a8cc5319de99f17848f090 | [
"MIT"
] | 21 | 2016-01-31T00:58:59.000Z | 2021-05-06T22:30:56.000Z | jaraco/windows/api/process.py | jaraco/jaraco.windows | e858172b4d5ee91233a8cc5319de99f17848f090 | [
"MIT"
] | 14 | 2016-07-21T12:02:08.000Z | 2021-08-06T03:07:54.000Z | jaraco/windows/api/process.py | jaraco/jaraco.windows | e858172b4d5ee91233a8cc5319de99f17848f090 | [
"MIT"
] | 5 | 2016-06-14T04:57:04.000Z | 2021-05-06T22:30:57.000Z | import ctypes.wintypes
TOKEN_ALL_ACCESS = 0xF01FF
GetCurrentProcess = ctypes.windll.kernel32.GetCurrentProcess
GetCurrentProcess.restype = ctypes.wintypes.HANDLE
OpenProcessToken = ctypes.windll.advapi32.OpenProcessToken
OpenProcessToken.argtypes = (
ctypes.wintypes.HANDLE,
ctypes.wintypes.DWORD,
ctypes.P... | 28.714286 | 60 | 0.820896 |
3338013ec9c582d785be8e0dafc38df483526bc1 | 4,553 | py | Python | hivemind/dht/validation.py | Vsevolod-pl/hivemind | 0300cfd91adeb14d91d9659a98221628f9b775b9 | [
"MIT"
] | 11 | 2021-06-21T19:56:01.000Z | 2021-12-22T09:06:09.000Z | hivemind/dht/validation.py | Vsevolod-pl/hivemind | 0300cfd91adeb14d91d9659a98221628f9b775b9 | [
"MIT"
] | null | null | null | hivemind/dht/validation.py | Vsevolod-pl/hivemind | 0300cfd91adeb14d91d9659a98221628f9b775b9 | [
"MIT"
] | null | null | null | import dataclasses
from abc import ABC, abstractmethod
from typing import Iterable
@dataclasses.dataclass(init=True, repr=True, frozen=True)
class DHTRecord:
key: bytes
subkey: bytes
value: bytes
expiration_time: float
class RecordValidatorBase(ABC):
"""
Record validators are a generic mecha... | 37.01626 | 97 | 0.659565 |
333809f537fe423f3c5fa1b5e4632e8f80862a8f | 5,604 | py | Python | examples/contrib/webscanner_helper/mapping.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | examples/contrib/webscanner_helper/mapping.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | examples/contrib/webscanner_helper/mapping.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | import copy
import logging
from bs4 import BeautifulSoup
from mitmproxy.http import HTTPFlow
from examples.contrib.webscanner_helper.urldict import URLDict
NO_CONTENT = object()
class MappingAddonConfig:
HTML_PARSER = "html.parser"
class MappingAddon:
""" The mapping add-on can be used in combination wit... | 39.188811 | 119 | 0.604211 |
3338279efb641b9bac204940f69c270b0f22fcd9 | 3,488 | py | Python | datastruct/testsuite/test_base.py | hgrecco/datastruct | a567b6293b56952756d1432a54fd799dff20c74e | [
"BSD-3-Clause"
] | null | null | null | datastruct/testsuite/test_base.py | hgrecco/datastruct | a567b6293b56952756d1432a54fd799dff20c74e | [
"BSD-3-Clause"
] | null | null | null | datastruct/testsuite/test_base.py | hgrecco/datastruct | a567b6293b56952756d1432a54fd799dff20c74e | [
"BSD-3-Clause"
] | 2 | 2020-05-05T22:52:40.000Z | 2020-08-17T22:38:06.000Z | import typing
try:
from typing import Annotated
except ImportError:
from typing_extensions import Annotated
from datastruct import INVALID, DataStruct, KeyDefinedValue, exceptions, validators
class Example(DataStruct):
a: int
b: str
c: float
d: bool
class ExampleWithDefault(DataStruct):
... | 22.503226 | 83 | 0.605505 |
333845f7784801473add98aee3a431bbc2c6e3c9 | 499 | py | Python | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2orapids.py | My-Technical-Architect/h2o-3 | d383802fb7f9c3ec9c72b7869fe636059a333d88 | [
"Apache-2.0"
] | 1 | 2017-03-28T09:10:12.000Z | 2017-03-28T09:10:12.000Z | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2orapids.py | My-Technical-Architect/h2o-3 | d383802fb7f9c3ec9c72b7869fe636059a333d88 | [
"Apache-2.0"
] | null | null | null | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2orapids.py | My-Technical-Architect/h2o-3 | d383802fb7f9c3ec9c72b7869fe636059a333d88 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from builtins import str
import sys
sys.path.insert(1,"../../../")
from tests import pyunit_utils
import h2o
def h2orapids():
"""
Python API test: h2o.rapids(expr)
"""
try:
rapidTime = h2o.rapids("(getTimeZone)")["string"]
print(str(rapidTime))
... | 21.695652 | 60 | 0.663327 |
333854a5661ebf053da13953d1aff3ea9bf38bdc | 4,906 | py | Python | examples/SSD320.py | Tensor46/TensorMONK | 67617d3fdf8fde072ba9cab42de7d67c79b17494 | [
"MIT"
] | 29 | 2018-07-06T23:57:23.000Z | 2022-03-08T20:38:57.000Z | examples/SSD320.py | Johnson-yue/TensorMONK | 1785132b82c685c3b3fc05b00dec46b1fccfc948 | [
"MIT"
] | 3 | 2018-12-14T22:21:26.000Z | 2020-06-19T02:13:34.000Z | examples/SSD320.py | Johnson-yue/TensorMONK | 1785132b82c685c3b3fc05b00dec46b1fccfc948 | [
"MIT"
] | 8 | 2018-07-06T23:58:03.000Z | 2021-04-12T01:35:54.000Z | """ Training a Tiny-SSD320 / MobileNetV2SSD320 """
from __future__ import print_function, division
import argparse
import tensormonk
from tensormonk.essentials import BaseNetwork, BaseOptimizer, EasyTrainer
from tensormonk.utils import SSDUtils
# the configuration for SSD 320 - works for MobileNetV2SSD320 & TinySSD32... | 39.564516 | 78 | 0.569711 |
333865c9fbe441f6da718b638d43e6de667a49fa | 94,127 | py | Python | vplexapi-7.0.0/vplexapi/api/distributed_storage_api.py | dell/python-vplex | 02c5df5e7f9ed61a13a2838f21ca6467a25dd392 | [
"Apache-2.0"
] | 3 | 2020-12-01T11:22:13.000Z | 2021-02-16T17:38:42.000Z | vplexapi-7.0.0/vplexapi/api/distributed_storage_api.py | dell/python-vplex | 02c5df5e7f9ed61a13a2838f21ca6467a25dd392 | [
"Apache-2.0"
] | null | null | null | vplexapi-7.0.0/vplexapi/api/distributed_storage_api.py | dell/python-vplex | 02c5df5e7f9ed61a13a2838f21ca6467a25dd392 | [
"Apache-2.0"
] | 3 | 2021-01-01T21:07:55.000Z | 2021-02-20T07:07:40.000Z | # coding: utf-8
"""
VPlex REST API
A definition for the next-gen VPlex API # noqa: E501
OpenAPI spec version: 0.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library... | 47.03998 | 415 | 0.646212 |
333875924cef8b8a9bfb5eaa00070f46bea0f94b | 3,556 | py | Python | scripts/scripts_ipynb/mass_sig_relation.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | scripts/scripts_ipynb/mass_sig_relation.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 6 | 2020-02-17T13:44:43.000Z | 2020-06-25T15:35:05.000Z | scripts/scripts_ipynb/mass_sig_relation.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | import load
import numpy as np
import pickle
import matplotlib.pyplot as plt
read=True
class Meta():
pass
def radial_profile_cut(meta, xx, yy, mm, vx, vy, vz,
den_lim=1e6, den_lim2=5e6,
mag_lim=25, nbins=100, rmax=50, dr=0.5):
# 2D photometry. (if rotated toward... | 29.882353 | 91 | 0.584364 |
333891e249a8e976943e1d231674df84473ed95b | 1,464 | py | Python | thirdparty/nsiqcppstyle/rules/RULE_3_2_H_do_not_use_underbars_for_cpp_filename.py | cfsengineering/tigl | abfbb57b82dc6beac7cde212a4cd5e0aed866db8 | [
"Apache-2.0"
] | 171 | 2015-04-13T11:24:34.000Z | 2022-03-26T00:56:38.000Z | thirdparty/nsiqcppstyle/rules/RULE_3_2_H_do_not_use_underbars_for_cpp_filename.py | cfsengineering/tigl | abfbb57b82dc6beac7cde212a4cd5e0aed866db8 | [
"Apache-2.0"
] | 620 | 2015-01-20T08:34:36.000Z | 2022-03-30T11:05:33.000Z | thirdparty/nsiqcppstyle/rules/RULE_3_2_H_do_not_use_underbars_for_cpp_filename.py | cfsengineering/tigl | abfbb57b82dc6beac7cde212a4cd5e0aed866db8 | [
"Apache-2.0"
] | 56 | 2015-02-09T13:33:56.000Z | 2022-03-19T04:52:51.000Z | """
Do not use unberbars for cpp filename.
Only alphabets, numbers can be used for a cpp filename.
== Vilolation ==
/testdir/test_1.cpp <== Violation. - is used.
/testdir1/_test1.cpp <== Violation. _ is used
== Good ==
testdir/test.cpp
testdir1/test_1.c <== Don't care. it's c file.
"""
from nsiq... | 27.111111 | 91 | 0.574454 |
3338948106abc753eeae3d4c95b9e61dccb00277 | 4,580 | py | Python | tests/test_basic.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | 1 | 2020-08-09T19:45:14.000Z | 2020-08-09T19:45:14.000Z | tests/test_basic.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | null | null | null | tests/test_basic.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | null | null | null | import pytest
from quart import abort, jsonify, Quart, request, Response, ResponseReturnValue, websocket
from quart.testing import WebsocketResponse
@pytest.fixture
def app() -> Quart:
app = Quart(__name__)
@app.route('/')
def index() -> ResponseReturnValue:
return 'index'
@app.route('/json... | 32.48227 | 90 | 0.669214 |
3338a7ae46ef5ec7bcd07df88614ad85143d6d31 | 2,976 | py | Python | test/test_sides.py | poletaevvlad/CubeLang | 06f34e7204f4656589eb33c4afe660383704861f | [
"MIT"
] | 1 | 2019-12-04T04:02:11.000Z | 2019-12-04T04:02:11.000Z | test/test_sides.py | poletaevvlad/CubeLang | 06f34e7204f4656589eb33c4afe660383704861f | [
"MIT"
] | null | null | null | test/test_sides.py | poletaevvlad/CubeLang | 06f34e7204f4656589eb33c4afe660383704861f | [
"MIT"
] | null | null | null | from cubelang.sides import CubeSide, ICubeSide, CubeSideView, Component
from cubelang.orientation import Color
import pytest
def side_to_string(side: ICubeSide):
out = []
for i in range(side.rows):
for j in range(side.columns):
color = side.colors[i, j].name[0].upper()
out.app... | 31.659574 | 85 | 0.59711 |
3338aa88b2617151e5a7f2bdcff345257ff9bf00 | 4,179 | py | Python | gnnbench/models/appnp.py | cvignac/gnn_statistics | 2115b54397ed25412f1bc4d8c93e0acdab348e34 | [
"MIT"
] | 3 | 2020-04-03T07:23:35.000Z | 2021-05-26T06:25:28.000Z | gnnbench/models/appnp.py | cvignac/gnn_statistics | 2115b54397ed25412f1bc4d8c93e0acdab348e34 | [
"MIT"
] | 1 | 2022-02-09T23:36:48.000Z | 2022-02-09T23:36:48.000Z | gnnbench/models/appnp.py | cvignac/gnn_statistics | 2115b54397ed25412f1bc4d8c93e0acdab348e34 | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorflow.contrib.slim as slim
from sacred import Ingredient
import numpy as np
from gnnbench.data.preprocess import row_normalize, renormalize_adj
from gnnbench.models.base_model import GNNModel
from gnnbench.models.util import select_features
from gnnbench.util import dropout_supportin... | 43.53125 | 109 | 0.657574 |
3338d115c6b9c1de27c5785a8e5f87c8edfd6b84 | 9,045 | py | Python | storm_control/sc_hardware/andor/w1SpinDiskModule1Wheel.py | BoettigerLab/scopeTest | 50c6601c952adf1d63c7f27b1aba8890e789c280 | [
"MIT"
] | 1 | 2021-03-17T20:25:59.000Z | 2021-03-17T20:25:59.000Z | storm_control/sc_hardware/andor/w1SpinDiskModule1Wheel.py | BoettigerLab/scopeTest | 50c6601c952adf1d63c7f27b1aba8890e789c280 | [
"MIT"
] | null | null | null | storm_control/sc_hardware/andor/w1SpinDiskModule1Wheel.py | BoettigerLab/scopeTest | 50c6601c952adf1d63c7f27b1aba8890e789c280 | [
"MIT"
] | 1 | 2021-03-17T21:24:35.000Z | 2021-03-17T21:24:35.000Z | #!/usr/bin/env python
"""
HAL module to interface with the W1 Spinning Disk from Yokogawa/Andor.
Jeffrey Moffitt 5/16
Hazen 5/17
"""
import storm_control.hal4000.halLib.halMessage as halMessage
import storm_control.sc_hardware.baseClasses.hardwareModule as hardwareModule
import storm_control.sc_hardware.andor.w1Spin... | 42.665094 | 123 | 0.556772 |
3338ec9602b47575287fd75e31f3c84dc18c0276 | 6,861 | py | Python | rl_memory/erik/old_pg_cnn.py | eskalnes/RL_memory | bd1a5cc07a41be89ea9f8de9edc2a2b557dcedbb | [
"MIT"
] | null | null | null | rl_memory/erik/old_pg_cnn.py | eskalnes/RL_memory | bd1a5cc07a41be89ea9f8de9edc2a2b557dcedbb | [
"MIT"
] | null | null | null | rl_memory/erik/old_pg_cnn.py | eskalnes/RL_memory | bd1a5cc07a41be89ea9f8de9edc2a2b557dcedbb | [
"MIT"
] | 1 | 2021-08-01T17:32:45.000Z | 2021-08-01T17:32:45.000Z | import numpy as np
from rl_memory.erik.network_cnn import network
from rl_memory.models.a2c.tools import plot_episode_rewards
from rl_memory.custom_env.agents import Agent
from rl_memory.custom_env.environment import Env, Observation
from rl_memory.custom_env.representations import ImageTransforms
it = ImageTransfor... | 32.060748 | 117 | 0.652237 |
33390c65a4115f4cf73b4bcd0d8c4c2c5558d57a | 2,526 | py | Python | src/utils/frameworks_utils.py | AliOsm/Talzeeq | 66a1bb95689f9ba2dc4759bf71f5ef82cf983f64 | [
"MIT"
] | 4 | 2021-01-01T13:27:08.000Z | 2022-02-03T02:02:46.000Z | src/utils/frameworks_utils.py | AliOsm/Talzeeq | 66a1bb95689f9ba2dc4759bf71f5ef82cf983f64 | [
"MIT"
] | null | null | null | src/utils/frameworks_utils.py | AliOsm/Talzeeq | 66a1bb95689f9ba2dc4759bf71f5ef82cf983f64 | [
"MIT"
] | 1 | 2022-01-09T19:43:05.000Z | 2022-01-09T19:43:05.000Z | # Built-in imports.
import os
from typing import List
# First-party package imports.
from frameworks.layers_registry import layers_registry
from frameworks.layer_interface import LayerInterface
def get_frameworks_list() -> List[str]:
"""Returns list of the available frameworks.
Returns:
List of str... | 28.066667 | 113 | 0.722882 |
333955637b04b65969b2338180a709365e4e2e43 | 7,327 | py | Python | blesuite/utils/validators.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | null | null | null | blesuite/utils/validators.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | null | null | null | blesuite/utils/validators.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | null | null | null | import argparse
import re
from blesuite.pybt.gatt import InvalidUUIDException
"""
Validators for various BLESuite input parameters supplied by the user. The use of these validators is mostly limited
to import/export and CLI features.
"""
class InvalidBDADDRException(Exception):
def __init__(self, address):
... | 30.785714 | 131 | 0.636277 |
33398410073e7c5655cfe713ec438bad11c72e9d | 701 | py | Python | master/kismet-2018-08-BETA1/kismet-2018-08-BETA1/rest_examples/basic_kismet_device_list.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/kismet-2018-08-BETA1/kismet-2018-08-BETA1/rest_examples/basic_kismet_device_list.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/kismet-2018-08-BETA1/kismet-2018-08-BETA1/rest_examples/basic_kismet_device_list.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | #!/usr/bin/env python
"""
Basic use of the smart_device_list API in the KismetRest python library.
The callback function per_device(dev) is called for each device in the
returned list, significantly reducing memory load in high-device-count
environments.
"""
import sys
import KismetRest
import argparse
import time... | 20.028571 | 72 | 0.754636 |
3339849c62b7e0326219d87a36a7db5b060b3ae9 | 3,450 | py | Python | python/lsst/dia/pipe/forcedPhotCoaddDiaDriver.py | LSSTDESC/dia_pipe | 64121a09a05c67f9dcf93714f9cff2d9c911d12b | [
"BSD-3-Clause"
] | 2 | 2019-06-17T03:03:04.000Z | 2019-07-07T23:47:04.000Z | python/lsst/dia/pipe/forcedPhotCoaddDiaDriver.py | LSSTDESC/dia_pipe | 64121a09a05c67f9dcf93714f9cff2d9c911d12b | [
"BSD-3-Clause"
] | 20 | 2019-05-09T22:24:12.000Z | 2021-02-11T18:57:25.000Z | python/lsst/dia/pipe/forcedPhotCoaddDiaDriver.py | LSSTDESC/dia_pipe | 64121a09a05c67f9dcf93714f9cff2d9c911d12b | [
"BSD-3-Clause"
] | 2 | 2019-06-11T21:08:16.000Z | 2019-07-29T18:24:45.000Z | from lsst.pipe.base import ArgumentParser, TaskRunner
from lsst.pex.config import Config, ConfigurableField, Field
from lsst.pipe.drivers.utils import TractDataIdContainer
from lsst.ctrl.pool.parallel import BatchPoolTask
from lsst.ctrl.pool.pool import Pool
from .forcedPhotCoaddDia import ForcedPhotCoaddDiaTask
cla... | 39.204545 | 96 | 0.66029 |
3339a4910ccd84ffd99ac5462cab1d33a284d3ea | 14,035 | py | Python | sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_private_endpoint_connections_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_private_endpoint_connections_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_private_endpoint_connections_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.939799 | 232 | 0.691771 |
3339a4ddebeef7a3ed214509c4480dbdaed6292d | 2,341 | py | Python | experiments/ashvin/vae/fixed2/reacher2d/test_state_sparse3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/fixed2/reacher2d/test_state_sparse3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/fixed2/reacher2d/test_state_sparse3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from rlkit.envs.multitask.point2d import MultitaskImagePoint2DEnv
from rlkit.envs.multitask.pusher2d import FullPusher2DEnv
from rlkit.launchers.arglauncher import run_variants
import rlkit.misc.hyperparameter as hyp
from rlkit.torch.vae.vae_experiment import experiment
if __name__ == "__main__":
# noinspection P... | 31.635135 | 73 | 0.603161 |
3339d5dd30295049906253cb81b97119b39d549d | 715 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_DE.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_DE.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_DE.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. DE metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_DE = PhoneMetadata(id='DE', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='1\\d{2,5}', possible_length=(3, 6))... | 71.5 | 143 | 0.746853 |
333a09b4be287c10fe254cc4819654699625206d | 934 | py | Python | ward/util.py | jayeshathila/ward | 966c3a61dc663b06aebc7d28a9acb9909d4f5810 | [
"MIT"
] | null | null | null | ward/util.py | jayeshathila/ward | 966c3a61dc663b06aebc7d28a9acb9909d4f5810 | [
"MIT"
] | null | null | null | ward/util.py | jayeshathila/ward | 966c3a61dc663b06aebc7d28a9acb9909d4f5810 | [
"MIT"
] | null | null | null | import inspect
from pathlib import Path
from typing import Iterable, Any
def truncate(s: str, num_chars: int) -> str:
suffix = "..." if len(s) > num_chars else ""
return s[: num_chars - len(suffix)] + suffix
def find_project_root(paths: Iterable[Path]) -> Path:
if not paths:
return Path("/").res... | 27.470588 | 61 | 0.639186 |
333a378080e46e0f230d6d08423b084087eab5b2 | 150 | py | Python | sxs/PYPostNewtonian/Utilities/__init__.py | dongzesun/sxs | 74ac9576032ddc232ff48510ba20f0a9e7116861 | [
"MIT"
] | 18 | 2015-03-26T01:04:36.000Z | 2022-02-01T19:26:21.000Z | sxs/PYPostNewtonian/Utilities/__init__.py | dongzesun/sxs | 74ac9576032ddc232ff48510ba20f0a9e7116861 | [
"MIT"
] | 4 | 2015-01-08T23:46:29.000Z | 2017-09-20T19:13:51.000Z | sxs/PYPostNewtonian/Utilities/__init__.py | dongzesun/sxs | 74ac9576032ddc232ff48510ba20f0a9e7116861 | [
"MIT"
] | 3 | 2016-05-13T02:36:14.000Z | 2021-11-23T21:36:32.000Z | # This file is just an empty placeholder for ipython, so that we can
# import ipython notebooks from this directory as if they were python
# modules.
| 37.5 | 69 | 0.78 |
333a40579776290434ec672a1b168521aa7f208c | 214 | py | Python | extractor/main.py | MITMotorsports/MY17_OneDayDAQ | cbf0c22d17a133042e3a7a4ee7fb2a7b601bf74d | [
"MIT"
] | 2 | 2017-10-17T16:36:48.000Z | 2019-05-13T01:02:06.000Z | extractor/main.py | MITMotorsports/MY17_OneDayDAQ | cbf0c22d17a133042e3a7a4ee7fb2a7b601bf74d | [
"MIT"
] | null | null | null | extractor/main.py | MITMotorsports/MY17_OneDayDAQ | cbf0c22d17a133042e3a7a4ee7fb2a7b601bf74d | [
"MIT"
] | null | null | null | from CANSpec import CANSpec
from CANMessage import DAQMessage
from Log import Log
a = CANSpec('../fsae_can_spec.yml')
l = Log('./fakelog.log')
for msg in l:
print(msg.time, hex(msg.can_id), msg.interpret(a))
| 21.4 | 54 | 0.719626 |
333a4f706d2db33752d986296dcb9a952dff1ab7 | 6,312 | py | Python | tempest/api/volume/test_volumes_actions.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/api/volume/test_volumes_actions.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/api/volume/test_volumes_actions.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 42.938776 | 79 | 0.646229 |
333a7d090c38ef3fe308ce5515f1de7dec4e0d4d | 4,884 | py | Python | pycycle/elements/gearbox.py | swryan/pyCycleOld | fbab35b74d0e5487abe686ae0823ff52e75afb3b | [
"Apache-2.0"
] | null | null | null | pycycle/elements/gearbox.py | swryan/pyCycleOld | fbab35b74d0e5487abe686ae0823ff52e75afb3b | [
"Apache-2.0"
] | null | null | null | pycycle/elements/gearbox.py | swryan/pyCycleOld | fbab35b74d0e5487abe686ae0823ff52e75afb3b | [
"Apache-2.0"
] | null | null | null | import numpy as np
from six.moves import range
from openmdao.api import Group, ExplicitComponent, ImplicitComponent, BalanceComp
class Gearbox(ImplicitComponent):
"""Gearbox component based on N+3 model"""
def initialize(self):
self.options.declare('design', default=True,
... | 39.707317 | 117 | 0.597871 |
333a7dea4d15197e4f999113eaf7f8b729861cc9 | 4,092 | py | Python | openstackclient/compute/v2/hypervisor.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/compute/v2/hypervisor.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/compute/v2/hypervisor.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 OpenStack, 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 agree... | 36.212389 | 79 | 0.578446 |
333a9c5b732c7d06fa92d37cf7e7993d278f5fed | 6,894 | py | Python | asposewordscloud/models/requests/create_or_update_document_property_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/requests/create_or_update_document_property_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/requests/create_or_update_document_property_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="create_or_update_document_property_online_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to a... | 51.447761 | 255 | 0.679867 |
333aa534c8394c8997da29f90efb2f94565e1139 | 3,788 | py | Python | tsa/tasks/analyze.py | eghuro/dcat-dry | 8e669583b77814c6a7fe2b038c0011fd3619f125 | [
"MIT"
] | 1 | 2018-11-16T09:04:01.000Z | 2018-11-16T09:04:01.000Z | tsa/tasks/analyze.py | eghuro/nkod-ts | 8e669583b77814c6a7fe2b038c0011fd3619f125 | [
"MIT"
] | 4 | 2019-03-31T08:58:42.000Z | 2020-02-27T16:44:20.000Z | tsa/tasks/analyze.py | eghuro/dcat-dry | 8e669583b77814c6a7fe2b038c0011fd3619f125 | [
"MIT"
] | null | null | null | """Celery tasks for running analyses."""
import json
import logging
import rdflib
import redis
from celery import chord
from tsa.analyzer import AbstractAnalyzer
from tsa.celery import celery
from tsa.tasks.common import TrackableTask
from tsa.redis import data as data_key, analysis_endpoint, analysis_dataset,expirat... | 36.423077 | 124 | 0.690602 |
333b313a3a51e86e9e2932f3cca3d80a51881611 | 11,369 | py | Python | src/Uidoe.py | 2010019970909/design_of_experiments | 72030c2916f938637c86302b311eab25dd52cbe3 | [
"MIT"
] | null | null | null | src/Uidoe.py | 2010019970909/design_of_experiments | 72030c2916f938637c86302b311eab25dd52cbe3 | [
"MIT"
] | null | null | null | src/Uidoe.py | 2010019970909/design_of_experiments | 72030c2916f938637c86302b311eab25dd52cbe3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'doe.ui'
#
# Created by: PyQt5 UI code generator 5.13.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Design(object):
def setupUi(self, Design):
Design.setObjectNa... | 53.881517 | 114 | 0.725306 |
333b782510080383e3774f964e2dfa773f460c70 | 1,233 | py | Python | news/models.py | Xowap/Maiznet | bd564d4c93eb28dc87135e9d31dad9a921ea8cf6 | [
"WTFPL"
] | 1 | 2015-05-04T09:28:14.000Z | 2015-05-04T09:28:14.000Z | news/models.py | Xowap/Maiznet | bd564d4c93eb28dc87135e9d31dad9a921ea8cf6 | [
"WTFPL"
] | null | null | null | news/models.py | Xowap/Maiznet | bd564d4c93eb28dc87135e9d31dad9a921ea8cf6 | [
"WTFPL"
] | null | null | null | ########################################################################
# vim: fileencoding=utf-8 ts=8 noexpandtab :
#
# ~~~~ Maiznet.fr ~~~~
#
# -> new/models.py
#
#
# Copyright 2011 Grégoire Leroy <gregoire.leroy@retenodus.net>
#
# This file is distributed under the terms of the WTFPL. For more
# informations, see ... | 29.357143 | 75 | 0.646391 |
333b9892fee6699b3bc60a571880a33d2842aa85 | 1,934 | py | Python | test/test_commands_v2_api.py | pallavigopi/esper-client-py | f7e71d3f25a5d91f35628b414e8abe9e6849d316 | [
"Apache-2.0"
] | null | null | null | test/test_commands_v2_api.py | pallavigopi/esper-client-py | f7e71d3f25a5d91f35628b414e8abe9e6849d316 | [
"Apache-2.0"
] | null | null | null | test/test_commands_v2_api.py | pallavigopi/esper-client-py | f7e71d3f25a5d91f35628b414e8abe9e6849d316 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Esper APIs
OpenAPI spec version: 1.0.0
Contact: developer@esper.io
---------------------------------------------------------
Copyright 2019 Shoonya Enterprises Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Yo... | 23.301205 | 72 | 0.683557 |
333b9dc21d468a3b9eb70a609c88ed6f67b26096 | 985 | py | Python | sdks/python/test/test_LogFlowDateTimeProperty.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_LogFlowDateTimeProperty.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_LogFlowDateTimeProperty.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 24.625 | 105 | 0.736041 |
333bb9254f1c373c4861d347b5b5096d4f166406 | 2,424 | py | Python | autoio-interfaces/elstruct/writer/program_modules.py | lpratalimaffei/autoio | 57be6e4882af1841153c19e7353e2531e64ce47f | [
"Apache-2.0"
] | null | null | null | autoio-interfaces/elstruct/writer/program_modules.py | lpratalimaffei/autoio | 57be6e4882af1841153c19e7353e2531e64ce47f | [
"Apache-2.0"
] | 1 | 2022-02-15T19:35:14.000Z | 2022-02-15T19:35:14.000Z | autoio-interfaces/elstruct/writer/program_modules.py | lpratalimaffei/autoio | 57be6e4882af1841153c19e7353e2531e64ce47f | [
"Apache-2.0"
] | 13 | 2020-06-24T05:21:11.000Z | 2021-05-05T19:58:30.000Z | """ helpers for importing and managing program modules
"""
import importlib
from elstruct import par
from elstruct import pclass
# Functions to import and call the appropriate writer function
def call_module_function(prog, function, *args, **kwargs):
""" call the module implementation of a given function
... | 29.925926 | 73 | 0.669142 |
333bc1c78e0795dc21f99594afe37aa9d2b5ea2e | 1,168 | py | Python | backend/model/migrate/versions/41b6fb3ddef_.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 7 | 2018-05-20T08:56:08.000Z | 2022-03-11T15:50:54.000Z | backend/model/migrate/versions/41b6fb3ddef_.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 2 | 2021-06-08T21:12:51.000Z | 2022-01-13T01:25:27.000Z | backend/model/migrate/versions/41b6fb3ddef_.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 5 | 2016-10-09T14:52:09.000Z | 2020-12-25T01:04:35.000Z | """adds need_changing field to ServicePrice model
Revision ID: 41b6fb3ddef
Revises: 31e2d9544da
Create Date: 2015-11-19 22:59:02.557003
"""
# revision identifiers, used by Alembic.
revision = '41b6fb3ddef'
down_revision = '31e2d9544da'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy ... | 22.037736 | 91 | 0.69863 |
333bc2743e07c6b401a2c104c410ac7c6c86d143 | 519 | py | Python | event_representation_learning/test_main.py | ibugueno/Event-Camera-Applications | 16d62fc548e3abf8b994c0d50f8a1aa3dadc7095 | [
"MIT"
] | 1 | 2021-07-06T08:53:26.000Z | 2021-07-06T08:53:26.000Z | event_representation_learning/test_main.py | ibugueno/Event-Camera-Applications | 16d62fc548e3abf8b994c0d50f8a1aa3dadc7095 | [
"MIT"
] | null | null | null | event_representation_learning/test_main.py | ibugueno/Event-Camera-Applications | 16d62fc548e3abf8b994c0d50f8a1aa3dadc7095 | [
"MIT"
] | 1 | 2021-07-06T08:53:26.000Z | 2021-07-06T08:53:26.000Z | import argparse
from os.path import dirname
import torch
import torchvision
import os
import numpy as np
import tqdm
from utils.models import Classifier
from torch.utils.tensorboard import SummaryWriter
from utils.loader import Loader
from utils.loss import cross_entropy_loss_and_accuracy
from utils.dataset import NCa... | 22.565217 | 67 | 0.780347 |
333bca5d099d550609bc48ec655905d6e0668887 | 6,092 | py | Python | vwo/api/is_feature_enabled.py | wingify/vwo-python-sdk | 8b8e798a16c43012ca2c6c6c85dde66f4f3cb6a5 | [
"Apache-2.0"
] | 14 | 2019-08-06T06:57:46.000Z | 2022-01-05T13:27:50.000Z | vwo/api/is_feature_enabled.py | wingify/vwo-python-sdk | 8b8e798a16c43012ca2c6c6c85dde66f4f3cb6a5 | [
"Apache-2.0"
] | 3 | 2019-08-19T10:29:17.000Z | 2021-09-16T15:59:38.000Z | vwo/api/is_feature_enabled.py | wingify/vwo-python-sdk | 8b8e798a16c43012ca2c6c6c85dde66f4f3cb6a5 | [
"Apache-2.0"
] | 10 | 2019-08-08T12:38:50.000Z | 2021-09-14T11:35:00.000Z | # Copyright 2019-2021 Wingify Software Pvt. Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 38.802548 | 120 | 0.688608 |
333bcf8110c83aea51ba178fdb4939c1ba76b357 | 1,267 | py | Python | django_short_urls/wsgi.py | olivierlefloch/django-short-urls | 7d6c7f37e2678060d1b36cbb00cbeebb2278cbf2 | [
"MIT"
] | 1 | 2015-09-16T23:11:55.000Z | 2015-09-16T23:11:55.000Z | django_short_urls/wsgi.py | olivierlefloch/django-short-urls | 7d6c7f37e2678060d1b36cbb00cbeebb2278cbf2 | [
"MIT"
] | 34 | 2019-02-03T06:02:55.000Z | 2020-03-27T13:14:50.000Z | django_short_urls/wsgi.py | olivierlefloch/django-short-urls | 7d6c7f37e2678060d1b36cbb00cbeebb2278cbf2 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
WSGI config for django_short_urls project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via... | 35.194444 | 108 | 0.802684 |
333bd1b9b43853ae5feb9780ab7a18ccc1fcc8fc | 375 | py | Python | tests/linker_test.py | albi-c/mlogpp | 2f62922bbcb3e97e9fd861b453c0e7d9a7ce1d1b | [
"MIT"
] | null | null | null | tests/linker_test.py | albi-c/mlogpp | 2f62922bbcb3e97e9fd861b453c0e7d9a7ce1d1b | [
"MIT"
] | null | null | null | tests/linker_test.py | albi-c/mlogpp | 2f62922bbcb3e97e9fd861b453c0e7d9a7ce1d1b | [
"MIT"
] | null | null | null | import sys
import os
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(os.path.dirname(SCRIPT_DIR), "mlog++"))
from linker import Linker
def test_linker():
code = Linker.link(["""
wait 0.1""",
"""
print 10
printflush message1
jump 0 always _ _"""])
assert code == """\
wait... | 17.045455 | 68 | 0.690667 |
333c07fc09d92b0b8f1d42c351d03690a1db4b50 | 350 | py | Python | agogosml_cli/cli/cli.py | cicorias/agogosml | 60e0b52c2fc721bdd965aadaf8c1afd1ddb9b7d1 | [
"MIT"
] | 13 | 2018-12-07T21:02:20.000Z | 2019-02-22T14:36:31.000Z | agogosml_cli/cli/cli.py | cicorias/agogosml | 60e0b52c2fc721bdd965aadaf8c1afd1ddb9b7d1 | [
"MIT"
] | 43 | 2018-11-30T11:31:43.000Z | 2019-04-03T16:09:06.000Z | agogosml_cli/cli/cli.py | cicorias/agogosml | 60e0b52c2fc721bdd965aadaf8c1afd1ddb9b7d1 | [
"MIT"
] | 13 | 2018-11-29T00:31:29.000Z | 2019-02-22T18:50:28.000Z | """Console script for agogosml_cli."""
import sys
import click
import cli.generate as generate
import cli.init as init
@click.group()
def main() -> None:
"""CLI and scaffold generation tool for agogosml"""
main.add_command(init.init)
main.add_command(generate.generate)
if __name__ == "__main__":
sys.exi... | 16.666667 | 55 | 0.714286 |
333c479c3bbd9e611e1c4169603715e5989e5572 | 716 | py | Python | appengine/findit/pipelines/test/delay_pipeline_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/pipelines/test/delay_pipeline_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/findit/pipelines/test/delay_pipeline_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gae_libs import pipelines
from gae_libs.pipelines import pipeline_handlers
from pipelines.delay_pipeline import DelayPipeline
from waterfall.test import... | 32.545455 | 72 | 0.800279 |
333c5d778e2ccc644ac3975a2e92ee6528fda5e4 | 3,943 | py | Python | zhaquirks/sinope/thermostat.py | artmg/zha-device-handlers | 5b30b8b0ffb8ff2b23ea4ce8dcbf0fa556843c1c | [
"Apache-2.0"
] | null | null | null | zhaquirks/sinope/thermostat.py | artmg/zha-device-handlers | 5b30b8b0ffb8ff2b23ea4ce8dcbf0fa556843c1c | [
"Apache-2.0"
] | null | null | null | zhaquirks/sinope/thermostat.py | artmg/zha-device-handlers | 5b30b8b0ffb8ff2b23ea4ce8dcbf0fa556843c1c | [
"Apache-2.0"
] | null | null | null | """
This module handles quirks of the Sinopé Technologies thermostat
manufacturer specific cluster implements attributes to control displaying
of outdoor temperature, setting occupancy on/off and setting device time.
"""
import zigpy.types as t
from zigpy.quirks import CustomCluster, CustomDevice
from zigpy.zcl.clus... | 37.913462 | 79 | 0.598529 |
333c6798676e28101fcb483849920a2b20a919c7 | 8,750 | py | Python | mGui/examples/formExamples.py | theodox/mGui | d2cd8c48ae1d51c9587b0aaab5b1d296a0561625 | [
"MIT"
] | 105 | 2015-01-13T10:52:55.000Z | 2022-03-23T12:49:01.000Z | mGui/examples/formExamples.py | techartorg/mGui | d2cd8c48ae1d51c9587b0aaab5b1d296a0561625 | [
"MIT"
] | 84 | 2015-01-15T14:56:08.000Z | 2019-04-15T17:03:51.000Z | mGui/examples/formExamples.py | techartorg/mGui | d2cd8c48ae1d51c9587b0aaab5b1d296a0561625 | [
"MIT"
] | 22 | 2015-01-11T11:25:37.000Z | 2021-12-24T06:34:46.000Z | import maya.cmds as cmds
from mGui import gui, forms
"""
This example creates a window which shows many of the different types of form layouts in mGui.
"""
def create_sphere(*args, **kwargs):
print "create my sphere"
cmds.polySphere()
def create_cube(*args, **kwargs):
print "create my cube"
cmds.p... | 34.722222 | 202 | 0.6496 |
333c6ce5c81fc349d6422281a4f47dc355eaac6e | 11,363 | py | Python | usetablemodel.py | BlueQuartzSoftware/EasyBake | 3f218013938d8b979d1371871a70a4901987abd6 | [
"BSD-3-Clause"
] | null | null | null | usetablemodel.py | BlueQuartzSoftware/EasyBake | 3f218013938d8b979d1371871a70a4901987abd6 | [
"BSD-3-Clause"
] | 27 | 2021-04-06T18:17:18.000Z | 2021-06-23T14:03:56.000Z | usetablemodel.py | joeykleingers/EasyBake | 3f218013938d8b979d1371871a70a4901987abd6 | [
"BSD-3-Clause"
] | 1 | 2021-06-22T18:10:44.000Z | 2021-06-22T18:10:44.000Z | from PySide2.QtNetwork import QNetworkReply
from PySide2.QtCore import QAbstractTableModel, Qt, QModelIndex
from PySide2.QtGui import QIcon, QColor
from PySide2.QtWidgets import QApplication, QStyle
class TableModelU(QAbstractTableModel):
"""
Define all of the column indices and column names in addition to a... | 41.929889 | 119 | 0.627123 |
333c70b20aab28484d6e7fed9eae8e3a5d686d8f | 8,560 | py | Python | oscar/lib/python2.7/site-packages/PIL/ImageMorph.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/ImageMorph.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/ImageMorph.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # A binary morphology add-on for the Python Imaging Library
#
# History:
# 2014-06-04 Initial version.
#
# Copyright (c) 2014 Dov Grobgeld <dov.grobgeld@gmail.com>
from __future__ import print_function
from . import Image, _imagingmorph
import re
LUT_SIZE = 1 << 9
class LutBuilder(object):
""... | 34.103586 | 80 | 0.500117 |
333c955ee637cdf896383e1492a092f9ebc20a76 | 615 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/utils/excutils.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/oslo/utils/excutils.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/utils/excutils.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # 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... | 43.928571 | 78 | 0.728455 |
333ca0be0e38a439de8ff5600079105fbe4552d1 | 3,087 | py | Python | octopus/utils.py | quaintm/octopus | 95a732207ee5f43cd0065d8ea6c643cbf3df2d61 | [
"BSD-3-Clause"
] | null | null | null | octopus/utils.py | quaintm/octopus | 95a732207ee5f43cd0065d8ea6c643cbf3df2d61 | [
"BSD-3-Clause"
] | null | null | null | octopus/utils.py | quaintm/octopus | 95a732207ee5f43cd0065d8ea6c643cbf3df2d61 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Helper utilities and decorators."""
from flask import flash, abort
from functools import update_wrapper, wraps
from flask.ext.login import current_user
from octopus.extensions import db
from octopus.models import User, Task
from wtforms.validators import Optional, DataRequired
def flash_er... | 28.850467 | 75 | 0.646906 |
333ccf6da32bf05657d728d3cbfbd6cfbd793bf9 | 13,077 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_compute_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_compute_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_compute_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 68.109375 | 870 | 0.798578 |
333cef037136b7281bd9ce4d9d7c5d23e7fb2fef | 9,719 | py | Python | marble_match/utils/account.py | ConstObject/marble-match-manager | abb7354656685482cc7289e8f6c68483af615e33 | [
"MIT"
] | 1 | 2021-04-02T21:09:46.000Z | 2021-04-02T21:09:46.000Z | marble_match/utils/account.py | ConstObject/marble-match-manager | abb7354656685482cc7289e8f6c68483af615e33 | [
"MIT"
] | 7 | 2021-04-02T07:34:03.000Z | 2021-06-11T07:11:55.000Z | marble_match/utils/account.py | ConstObject/marble-match-manager | abb7354656685482cc7289e8f6c68483af615e33 | [
"MIT"
] | null | null | null | import sqlite3
import logging
from typing import Union
from dataclasses import dataclass
from datetime import datetime
import discord
from discord.ext import commands
import database.database_operation as database_operation
import database.database_setup as database_setup
import utils.discord_utils as du
import utils... | 36.675472 | 118 | 0.672806 |
333d20332df5b40416113f20627a151e6f977b9e | 11,867 | py | Python | tests/test_statistics.py | opendatacube/datacube-stats | 14054f8820ddf2b79691996af8ac7d41e200fe49 | [
"Apache-2.0"
] | 10 | 2018-11-25T13:31:10.000Z | 2021-04-13T13:08:45.000Z | tests/test_statistics.py | GeoscienceAustralia/datacube-stats | 14054f8820ddf2b79691996af8ac7d41e200fe49 | [
"Apache-2.0"
] | 67 | 2018-02-26T05:53:35.000Z | 2018-11-14T06:20:48.000Z | tests/test_statistics.py | opendatacube/datacube-stats | 14054f8820ddf2b79691996af8ac7d41e200fe49 | [
"Apache-2.0"
] | 4 | 2019-08-26T00:57:34.000Z | 2020-09-17T22:39:40.000Z | """
Tests for the custom statistics functions
"""
import string
from datetime import datetime
import hypothesis.strategies as st
import numpy as np
import pytest
import xarray as xr
from hypothesis import given, settings
import datacube_stats.statistics
from datacube.model import Measurement
from datacube.utils.geo... | 36.626543 | 113 | 0.66015 |
333d3f3afba16ee7e9c9d6a2a6f97d32f29d9932 | 3,225 | py | Python | cloudmesh/keys/util.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | cloudmesh/keys/util.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | 4 | 2021-06-08T20:20:08.000Z | 2022-03-11T23:30:22.000Z | cloudmesh/keys/util.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import base64
import hashlib
import struct
from cloudmesh_base.util import path_expand
def read_key(filename):
key = {}
key['filename'] = path_expand(filename)
key['string'] = open(filename, "r").read()
key['fingerprint'] = get_fingerprint(key['string'])
retur... | 30.424528 | 403 | 0.668837 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.