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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f76128ae606cdffdd1b63eae17d5fe73952db8a8 | 6,268 | py | Python | configs/common/O3_ARM_v7a.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | configs/common/O3_ARM_v7a.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | configs/common/O3_ARM_v7a.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list ... | 31.817259 | 72 | 0.669592 |
f76132741c9272b8cd781e2cb8a147a4cfe95d6d | 7,465 | py | Python | libnamebench/base_ui.py | claudioandre-br/namebench | 5bb5df4b4996be6a0947810b800177481f4e7299 | [
"Apache-2.0"
] | 5 | 2015-08-19T13:22:38.000Z | 2022-02-07T00:22:44.000Z | libnamebench/base_ui.py | claudioandre/namebench | 5bb5df4b4996be6a0947810b800177481f4e7299 | [
"Apache-2.0"
] | null | null | null | libnamebench/base_ui.py | claudioandre/namebench | 5bb5df4b4996be6a0947810b800177481f4e7299 | [
"Apache-2.0"
] | 2 | 2021-02-09T15:15:47.000Z | 2021-08-28T08:53:52.000Z | # Copyright 2009 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 35.379147 | 95 | 0.685332 |
f76150c07dc958addebcb1092fa4038e7c90bea3 | 2,327 | py | Python | day_13/day_13.py | furgerf/advent-of-code-2019 | f2c6ad9d401c91a7b04bb699d233a7d6ec9da2ac | [
"Apache-2.0"
] | null | null | null | day_13/day_13.py | furgerf/advent-of-code-2019 | f2c6ad9d401c91a7b04bb699d233a7d6ec9da2ac | [
"Apache-2.0"
] | null | null | null | day_13/day_13.py | furgerf/advent-of-code-2019 | f2c6ad9d401c91a7b04bb699d233a7d6ec9da2ac | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from enum import Enum, unique
import numpy as np
from day import Day
from intcode import Intcode
class Day13(Day):
@unique
class TileType(Enum):
NOTHING = 0
WALL = 1
BLOCK = 2
PADDLE = 3
BALL = 4
class GameMap:
def __init__(self):
... | 23.505051 | 78 | 0.646755 |
f7615205021bd871e363727e5c65fe55ee3068f6 | 3,668 | py | Python | tools/cardiff/compare_sets.py | lebauce/edeploy | a0fe832817a3a39575df50405044c7c4c5b515a5 | [
"Apache-2.0"
] | null | null | null | tools/cardiff/compare_sets.py | lebauce/edeploy | a0fe832817a3a39575df50405044c7c4c5b515a5 | [
"Apache-2.0"
] | null | null | null | tools/cardiff/compare_sets.py | lebauce/edeploy | a0fe832817a3a39575df50405044c7c4c5b515a5 | [
"Apache-2.0"
] | null | null | null | import collections
import pprint
import os
import glob
class Machine:
def __init__(self, name, value):
self.name = name
self.value = value
def compare(sets):
machines = []
for current_set in sets:
my_string = repr(sets[current_set])
machines.append(Machine(current_set, my... | 33.345455 | 76 | 0.5747 |
f76155671d609034cee340b00cb426fe45133ba1 | 933 | py | Python | src/visions/application/summaries/series/numerical_summary.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | src/visions/application/summaries/series/numerical_summary.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | src/visions/application/summaries/series/numerical_summary.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
def numerical_summary(series: pd.Series) -> dict:
"""
Args:
series: series to summarize
Returns:
"""
aggregates = [
"mean",
"std",
"var",
"max",
"min",
"median",
"kurt",
"skew",
... | 23.923077 | 83 | 0.565916 |
f76172322cd3ea9dd933528d7073a7f7a6c43c8d | 1,545 | py | Python | venv/Lib/site-packages/PygameLord/Loads.py | apoorv-x12/SpaceInvadersClassicGame-Myfirst-game | 5a4ac187c19a7decfb900b392c3fb897f6613a2c | [
"MIT"
] | null | null | null | venv/Lib/site-packages/PygameLord/Loads.py | apoorv-x12/SpaceInvadersClassicGame-Myfirst-game | 5a4ac187c19a7decfb900b392c3fb897f6613a2c | [
"MIT"
] | null | null | null | venv/Lib/site-packages/PygameLord/Loads.py | apoorv-x12/SpaceInvadersClassicGame-Myfirst-game | 5a4ac187c19a7decfb900b392c3fb897f6613a2c | [
"MIT"
] | null | null | null | #LordLynx
#Part of PygameLord
import pygame,os
from pygame.locals import*
pygame.init()
#Loading Objects
'''
Parse_Locations(file)
file: Your text file, use a .txt
# Like in Python will be ingored thusly follow this example
#Coment
./File/File
./File/Other File
...
'''
def Parse_Locations(file):
file = open(file,... | 27.105263 | 122 | 0.629126 |
f76177e937d55fa02fc80c6deb06b1ca63da6a42 | 3,414 | py | Python | dali/utils/misc.py | JonathanRaiman/dali-cython-stub | e258469aeb1d4cb3e4cdf5c07e8948f461a038f1 | [
"MIT"
] | 7 | 2016-06-20T17:50:06.000Z | 2019-12-13T17:27:46.000Z | dali/utils/misc.py | JonathanRaiman/dali-cython | e258469aeb1d4cb3e4cdf5c07e8948f461a038f1 | [
"MIT"
] | 6 | 2015-08-04T07:25:38.000Z | 2015-08-13T22:06:22.000Z | dali/utils/misc.py | JonathanRaiman/dali-cython | e258469aeb1d4cb3e4cdf5c07e8948f461a038f1 | [
"MIT"
] | 2 | 2016-07-04T21:38:14.000Z | 2016-08-31T02:53:19.000Z | import dill as pickle
import inspect
import numpy as np
import types
from os import makedirs, listdir
from os.path import join, exists
import dali.core as D
class RunningAverage(object):
def __init__(self, alpha=0.95):
self.alpha = alpha
self.value = None
def update(self, measurement):
... | 30.482143 | 134 | 0.630053 |
f7617bd0075ee83bab13c654c4221f855bd00ec1 | 2,560 | py | Python | homeassistant/components/weather/demo.py | mbs-technologie/home-assistant | 71fc446425cbb1c0d4670c261ce8ea3bfd83a73d | [
"MIT"
] | 13 | 2017-02-01T13:25:34.000Z | 2022-01-26T01:30:39.000Z | homeassistant/components/weather/demo.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 9 | 2017-07-26T18:05:32.000Z | 2021-12-05T14:16:34.000Z | homeassistant/components/weather/demo.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 21 | 2017-07-26T17:09:40.000Z | 2022-03-27T22:37:22.000Z | """
Demo platform that offers fake meteorological data.
For more details about this platform, please refer to the documentation
https://home-assistant.io/components/demo/
"""
from homeassistant.components.weather import WeatherEntity
from homeassistant.const import (TEMP_CELSIUS, TEMP_FAHRENHEIT)
CONDITION_CLASSES = ... | 26.947368 | 79 | 0.615234 |
f76180ed5d4a6ad1dc2a760fed07faea11ca2ac1 | 82 | py | Python | describe/describe/core/__init__.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | 2 | 2018-10-10T09:32:34.000Z | 2019-03-28T08:42:31.000Z | describe/describe/core/__init__.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | describe/describe/core/__init__.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | from describe.core.system import System
from describe.core.lattice import Lattice
| 27.333333 | 41 | 0.853659 |
f761b3a8b89d1160652e80d381a79bfac007cf06 | 160 | py | Python | bw2temporalis/tests/__init__.py | brightway-lca/temporalis | 00a49931b6f93f11d1889b5e09c4a0820079114d | [
"BSD-3-Clause"
] | null | null | null | bw2temporalis/tests/__init__.py | brightway-lca/temporalis | 00a49931b6f93f11d1889b5e09c4a0820079114d | [
"BSD-3-Clause"
] | 1 | 2020-10-08T18:27:29.000Z | 2020-10-08T18:27:29.000Z | bw2temporalis/tests/__init__.py | brightway-lca/temporalis | 00a49931b6f93f11d1889b5e09c4a0820079114d | [
"BSD-3-Clause"
] | null | null | null | from .dlca import DynamicLCATestCase
from .ia import DynamicIATestCase
from .td import TemporalDistributionTestCase
from .climate import ClimateMetricsTestCase
| 32 | 44 | 0.875 |
f761d48f366b3d81c7fd4edbb34fab5c9e225946 | 652 | py | Python | trac/wiki/__init__.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/wiki/__init__.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/wiki/__init__.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2020 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://trac.edgewall.org/wiki/TracLicense.
#
# This software cons... | 34.315789 | 67 | 0.76227 |
f761e2fdccea1b338af9d65fb45fe255f71d8844 | 1,464 | py | Python | dish/interpreter.py | dullbananas/dish | 01f1439bc38861c0890412becccc9135c05e621b | [
"MIT"
] | 13 | 2019-11-25T00:52:58.000Z | 2021-01-04T14:43:12.000Z | dish/interpreter.py | dullbananas/dish | 01f1439bc38861c0890412becccc9135c05e621b | [
"MIT"
] | null | null | null | dish/interpreter.py | dullbananas/dish | 01f1439bc38861c0890412becccc9135c05e621b | [
"MIT"
] | 1 | 2020-01-23T19:59:22.000Z | 2020-01-23T19:59:22.000Z | import os
import time
import click
from . import procs
class Interpreter:
def __init__(self, ctx, verbose):
self.ctx = ctx
self.verbose = verbose
self.lines = []
self.in_comment = False
def feed(self, line):
if len(self.lines) > 0:
# End of multi-line comment
if self.lines[0].startswith('#==') and... | 21.529412 | 63 | 0.646858 |
f7622a0e8cb54686307717dfc205c3ba03a27138 | 2,193 | py | Python | urbandict-search/app.py | madhukar01/examples | 7f4a2ee3394a2483bb9c848a674abd93c0f34443 | [
"Apache-2.0"
] | null | null | null | urbandict-search/app.py | madhukar01/examples | 7f4a2ee3394a2483bb9c848a674abd93c0f34443 | [
"Apache-2.0"
] | null | null | null | urbandict-search/app.py | madhukar01/examples | 7f4a2ee3394a2483bb9c848a674abd93c0f34443 | [
"Apache-2.0"
] | null | null | null | __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import click
import os
import string
import random
from jina.flow import Flow
RANDOM_SEED = 10 # 5
os.environ['PARALLEL'] = str(2)
os.environ['SHARDS'] = str(2)
def get_random_ws(workspace_path, length=8):
ra... | 31.782609 | 104 | 0.599635 |
f7622bdbd148128a912a21d30fc2a0f97001fcb8 | 10,710 | py | Python | utils/helpful_util.py | drcastillo/hicss2020 | 0a812257215c75054d8b891e23c933d6a8327c0d | [
"Apache-2.0"
] | null | null | null | utils/helpful_util.py | drcastillo/hicss2020 | 0a812257215c75054d8b891e23c933d6a8327c0d | [
"Apache-2.0"
] | null | null | null | utils/helpful_util.py | drcastillo/hicss2020 | 0a812257215c75054d8b891e23c933d6a8327c0d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Reference:
#from __future__ import print_function
#from utils.heaton_utils import *
import numpy as np
import warnings
import os
import pandas as pd
import matplotlib.pyplot as plt
import sys
import glob
#pip install counter
from collections import Counter
import pic... | 32.259036 | 129 | 0.610458 |
f7629707b41706bf06514ffdec0a9c54a845d59c | 1,424 | py | Python | test/lmp/model/_lstm_1997/test_pred.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/model/_lstm_1997/test_pred.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/model/_lstm_1997/test_pred.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | """Test prediction.
Test target:
- :py:meth:`lmp.model._lstm_1997.LSTM1997.pred`.
"""
import torch
from lmp.model._lstm_1997 import LSTM1997
def test_prediction_result(lstm_1997: LSTM1997, batch_cur_tkids: torch.Tensor) -> None:
"""Return float tensor with correct shape and range."""
lstm_1997 = lstm_1997.eval... | 33.904762 | 114 | 0.728933 |
f762c093c822c644f705f207047d58f9e6b8ee1d | 581 | py | Python | geminipy/helpers.py | Vanclief/gemini-python | 8472e32b3db436d4a9ef5c1b9ea376109f23845c | [
"MIT"
] | null | null | null | geminipy/helpers.py | Vanclief/gemini-python | 8472e32b3db436d4a9ef5c1b9ea376109f23845c | [
"MIT"
] | null | null | null | geminipy/helpers.py | Vanclief/gemini-python | 8472e32b3db436d4a9ef5c1b9ea376109f23845c | [
"MIT"
] | null | null | null | def dict_to_float(d):
"""
Converts all strings to floats from a dict
"""
if type(d) is dict:
for key, value in d.items():
if type(value) is str:
try:
d[key] = float(value)
except ValueError:
d[key] = str(value)
... | 19.366667 | 53 | 0.483649 |
f762d0915302a8196bbaa04f02cba379793292f9 | 2,994 | py | Python | docs/source/conf.py | YiweiLi4/tensorbay-python-sdk | 20fc8b37bad01c2d201a87b1436f1d4ff77d76df | [
"MIT"
] | null | null | null | docs/source/conf.py | YiweiLi4/tensorbay-python-sdk | 20fc8b37bad01c2d201a87b1436f1d4ff77d76df | [
"MIT"
] | null | null | null | docs/source/conf.py | YiweiLi4/tensorbay-python-sdk | 20fc8b37bad01c2d201a87b1436f1d4ff77d76df | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2021 Graviti. Licensed under MIT License.
#
# pylint: disable=missing-module-docstring,invalid-name
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path... | 38.384615 | 95 | 0.698397 |
f762d1f6c845fe6bfbbb15839b0a302b49b9a2ce | 7,737 | py | Python | webapp/proto.py | dssg/babies-public | 0a03e95992bfd7b7b4c2f11b8a5e2c3961f193c6 | [
"MIT"
] | 5 | 2018-09-13T02:26:23.000Z | 2019-10-21T12:38:16.000Z | webapp/proto.py | dssg/babies-public | 0a03e95992bfd7b7b4c2f11b8a5e2c3961f193c6 | [
"MIT"
] | null | null | null | webapp/proto.py | dssg/babies-public | 0a03e95992bfd7b7b4c2f11b8a5e2c3961f193c6 | [
"MIT"
] | 3 | 2015-10-14T19:51:42.000Z | 2022-03-29T07:12:39.000Z | import pandas as pd
import numpy as np
import psycopg2
from sqlalchemy import create_engine
import json
import sys
from sklearn.externals import joblib
import os
def run_all():
# connect to postgres
params = json.load(open('/home/ipan/passwords/psql_psycopg2.password', 'r'))
try:
conn = psycopg2... | 44.211429 | 124 | 0.503425 |
f762d362f077648d6092ca421c6a397f0f3871dd | 1,268 | py | Python | data/spm/generate_corpus.py | tarohi24/docsim | 4879bcc889c32470a27094eb183c2ce15ae2f1fb | [
"MIT"
] | 1 | 2020-04-29T13:52:29.000Z | 2020-04-29T13:52:29.000Z | data/spm/generate_corpus.py | tarohi24/docsim | 4879bcc889c32470a27094eb183c2ce15ae2f1fb | [
"MIT"
] | 136 | 2019-09-19T03:36:21.000Z | 2019-11-28T08:50:45.000Z | data/spm/generate_corpus.py | tarohi24/docsim | 4879bcc889c32470a27094eb183c2ce15ae2f1fb | [
"MIT"
] | null | null | null | """
Generate corpus for the specific category
"""
import argparse
from pathlib import Path
from typing import List
from tqdm import tqdm
from docsim.elas.search import EsResult, EsSearcher
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('dataset',
ty... | 28.177778 | 82 | 0.584385 |
f762ed8a51b6c1cbaedd599fc4e4202645413910 | 30 | py | Python | doll/__init__.py | badge/doll | 36d99d9dd8ab6ff2e155e8daa8dad28619e46ef7 | [
"Apache-2.0"
] | 2 | 2016-12-17T23:10:50.000Z | 2020-04-29T23:03:31.000Z | doll/__init__.py | badge/doll | 36d99d9dd8ab6ff2e155e8daa8dad28619e46ef7 | [
"Apache-2.0"
] | 3 | 2015-08-30T16:11:50.000Z | 2015-09-01T19:59:50.000Z | doll/__init__.py | badge/doll | 36d99d9dd8ab6ff2e155e8daa8dad28619e46ef7 | [
"Apache-2.0"
] | null | null | null | __author__ = 'Matthew Badger'
| 15 | 29 | 0.766667 |
f763059eb7944793f5098af41af78aa79fa2ad52 | 20,125 | py | Python | pandaharvester/harvesterfifo/mysql_fifo.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | null | null | null | pandaharvester/harvesterfifo/mysql_fifo.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | null | null | null | pandaharvester/harvesterfifo/mysql_fifo.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | null | null | null | import time
import functools
import warnings
from pandaharvester.harvestercore import core_utils
from pandaharvester.harvestercore.plugin_base import PluginBase
from pandaharvester.harvesterconfig import harvester_config
warnings.simplefilter("ignore")
class MysqlFifo(PluginBase):
# constructor
def __init__... | 37.546642 | 129 | 0.523627 |
f7631ddc2a3d34dcf72feb3fd51cf1d99205e959 | 4,540 | py | Python | ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 5 | 2018-06-03T05:19:40.000Z | 2021-04-16T17:10:49.000Z | ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | null | null | null | ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 6 | 2019-05-07T13:24:39.000Z | 2021-02-15T14:12:37.000Z | #!/usr/bin/env python
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | 45.858586 | 194 | 0.571366 |
f76328d8935b4c347cc2d77471aadde54c8947dd | 16,711 | py | Python | db_factory/manager.py | ankit-shrivastava/db-factory | 75ff83e94a5bdbc324f95c5b5ff82a28fb489486 | [
"MIT"
] | 1 | 2021-01-04T13:39:55.000Z | 2021-01-04T13:39:55.000Z | database_factory/manager.py | shrivastava-v-ankit/db-factory | d83de125cf392969036a5da9581db3b38e5fa047 | [
"MIT"
] | null | null | null | database_factory/manager.py | shrivastava-v-ankit/db-factory | d83de125cf392969036a5da9581db3b38e5fa047 | [
"MIT"
] | 1 | 2021-03-16T03:04:13.000Z | 2021-03-16T03:04:13.000Z | #!/usr/bin/env python
"""
File holds the module of Migration database manager and decide to connect with
multiple databases using the configuration parameters.
URI of database handled automatically for multiple databases using SQLAlchemy
"""
import os
import logging
import traceback
from urllib.parse import quote_plu... | 41.673317 | 124 | 0.510323 |
f763489073221a0058c43b650f77849bca2574e7 | 167 | py | Python | Scripts/django-admin.py | Nicozstory/Try-Django-1.11 | 5f81571d3342d1991494f9aac425fb79b64fd425 | [
"bzip2-1.0.6"
] | null | null | null | Scripts/django-admin.py | Nicozstory/Try-Django-1.11 | 5f81571d3342d1991494f9aac425fb79b64fd425 | [
"bzip2-1.0.6"
] | null | null | null | Scripts/django-admin.py | Nicozstory/Try-Django-1.11 | 5f81571d3342d1991494f9aac425fb79b64fd425 | [
"bzip2-1.0.6"
] | null | null | null | #!c:\users\alexa\myvirtualenv2\foodtasker\scripts\python.exe
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 27.833333 | 60 | 0.796407 |
f7635c0d098d13616e07a22c1baa45da48b78323 | 557 | py | Python | tests/test_constants.py | yveso/tyfbaf | f1b6bf33d275f20fad71a2d20b92665f88755361 | [
"MIT"
] | null | null | null | tests/test_constants.py | yveso/tyfbaf | f1b6bf33d275f20fad71a2d20b92665f88755361 | [
"MIT"
] | null | null | null | tests/test_constants.py | yveso/tyfbaf | f1b6bf33d275f20fad71a2d20b92665f88755361 | [
"MIT"
] | null | null | null | import pytest
from tyfbaf import constants
@pytest.fixture
def ugly_hack():
"""Ugly hack to disable autouse fixture in conftest.py..."""
constants.SERVER_NAME = ""
def test_server_name_default(ugly_hack):
assert constants.SERVER_NAME == ""
def test_port_default():
assert constants.PORT == 6405
... | 19.206897 | 64 | 0.698384 |
f7639c6229b8d29dfd2141ec52ff0c64883adbe2 | 2,502 | py | Python | venv/Lib/site-packages/pybtex/markup/__init__.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 2 | 2021-02-16T16:17:07.000Z | 2021-11-08T20:27:13.000Z | venv/Lib/site-packages/pybtex/markup/__init__.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/pybtex/markup/__init__.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 4 | 2020-11-14T17:05:36.000Z | 2020-11-16T18:44:54.000Z | from __future__ import unicode_literals
# Copyright (c) 2006-2019 Andrey Golovigin
#
# 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 r... | 39.09375 | 73 | 0.648681 |
f763b50d56b531bc659599c89d467e89b5cc9948 | 712 | py | Python | examples/basic/robot.py | benjiboy50fonz/robotpy-ctre-draft | 36810d1ca8f02b774f361df3c514d8d8bba00159 | [
"Apache-2.0"
] | null | null | null | examples/basic/robot.py | benjiboy50fonz/robotpy-ctre-draft | 36810d1ca8f02b774f361df3c514d8d8bba00159 | [
"Apache-2.0"
] | null | null | null | examples/basic/robot.py | benjiboy50fonz/robotpy-ctre-draft | 36810d1ca8f02b774f361df3c514d8d8bba00159 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import wpilib
import ctre
class MyRobot(wpilib.IterativeRobot):
"""
This is a short sample program demonstrating how to use the basic throttle
mode of the TalonSRX
"""
def robotInit(self):
self.motor = ctre.WPI_TalonSRX(1) # Initialize the TalonSRX on device 1.
... | 24.551724 | 81 | 0.65309 |
f763d016061f2f08e13ed4e9dfad257490becc39 | 27,721 | py | Python | src/grammar_learner/pqa_table.py | vsbogd/language-learning | 601e7bc7f97a0b6c1f713f8108fc6e81d492e921 | [
"MIT"
] | 21 | 2018-01-30T08:18:20.000Z | 2020-02-18T08:15:53.000Z | src/grammar_learner/pqa_table.py | vsbogd/language-learning | 601e7bc7f97a0b6c1f713f8108fc6e81d492e921 | [
"MIT"
] | 3 | 2018-02-09T18:22:45.000Z | 2018-07-10T10:31:25.000Z | src/grammar_learner/pqa_table.py | vsbogd/language-learning | 601e7bc7f97a0b6c1f713f8108fc6e81d492e921 | [
"MIT"
] | 10 | 2018-01-30T10:31:43.000Z | 2021-01-26T07:54:24.000Z | # language-learning/src/grammar_learner/pqa_table.py # 190410
# Test Grammar Learner to fill in ULL Project Plan Parses spreadshit
import logging
# TODO: refactor 81217 wide_rows (archived) and ppln.py (make independent)
import os, sys, time
from ..common import handle_path_string
from ..grammar_te... | 41.312966 | 202 | 0.509 |
f763f76e7edc38e0cd469c0deb781726caef6e8f | 454 | py | Python | code/partition.py | Koomook/nsmc | 64fb83769072be3822f663383d0855dd66c92855 | [
"CC0-1.0"
] | 460 | 2015-08-29T07:16:07.000Z | 2022-03-23T07:46:58.000Z | code/partition.py | Koomook/nsmc | 64fb83769072be3822f663383d0855dd66c92855 | [
"CC0-1.0"
] | 1 | 2020-06-02T07:51:28.000Z | 2020-06-04T00:11:17.000Z | code/partition.py | Koomook/nsmc | 64fb83769072be3822f663383d0855dd66c92855 | [
"CC0-1.0"
] | 219 | 2015-12-05T05:56:05.000Z | 2022-03-31T01:59:05.000Z | #! /usr/bin/python
# -*- coding: utf-8 -*-
import numpy as np; np.random.seed(1234)
import pandas as pd
ntrain = 150000
data = pd.read_csv('../ratings.txt', sep='\t', quoting=3)
data = pd.DataFrame(np.random.permutation(data))
trn, tst = data[:ntrain], data[ntrain:]
header = 'id document label'.split()
trn.to_csv(... | 26.705882 | 72 | 0.678414 |
f7640da42683b6fa666e2e9f252b2a4f6a180d3f | 6,727 | py | Python | appengine/predator/analysis/linear/changelist_features/touch_crashed_directory.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/predator/analysis/linear/changelist_features/touch_crashed_directory.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/predator/analysis/linear/changelist_features/touch_crashed_directory.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 collections import defaultdict
from collections import namedtuple
import logging
import math
import os
import re
from analysis import crash_util
from a... | 34.854922 | 80 | 0.694217 |
f76416fa28190a8fac9f20f2af2054ed53c030b5 | 9,081 | py | Python | rlkit/torch/sac/diayn/diayn_cont.py | vincentlui/unsupervised-goal-conditioned-rl | 4f2e6938e072cb52f8ee779a939fe7bf6a980d45 | [
"MIT"
] | null | null | null | rlkit/torch/sac/diayn/diayn_cont.py | vincentlui/unsupervised-goal-conditioned-rl | 4f2e6938e072cb52f8ee779a939fe7bf6a980d45 | [
"MIT"
] | null | null | null | rlkit/torch/sac/diayn/diayn_cont.py | vincentlui/unsupervised-goal-conditioned-rl | 4f2e6938e072cb52f8ee779a939fe7bf6a980d45 | [
"MIT"
] | null | null | null | from collections import OrderedDict
import math
import numpy as np
import torch
import torch.optim as optim
from torch import nn as nn
import torch.nn.functional as F
import rlkit.torch.pytorch_util as ptu
from rlkit.core.eval_util import create_stats_ordered_dict
from rlkit.torch.torch_rl_algorithm import TorchTrain... | 33.263736 | 127 | 0.580333 |
f7645d81ab83023bce9da381899330cae5ae4612 | 181 | py | Python | oscar/lib/python2.7/site-packages/prompt_toolkit/contrib/telnet/log.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/prompt_toolkit/contrib/telnet/log.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/prompt_toolkit/contrib/telnet/log.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """
Python logger for the telnet server.
"""
from __future__ import unicode_literals
import logging
logger = logging.getLogger(__package__)
__all__ = (
'logger',
)
| 15.083333 | 40 | 0.690608 |
f764a6f35b550ac9e35a32cc1440776340ba04c6 | 821 | py | Python | 290_Word-Pattern.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | 3 | 2018-07-05T05:51:10.000Z | 2019-05-04T08:35:44.000Z | 290_Word-Pattern.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | null | null | null | 290_Word-Pattern.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | null | null | null | class Solution:
def wordPattern(self, pattern, str):
"""
:type pattern: str
:type str: str
:rtype: bool
"""
str_ = str.split(" ")
dic_s = {}
dic_p = {}
res_s = []
res_p = []
for i in range(len(str_)):
if str... | 23.457143 | 43 | 0.387333 |
f764aae8e67e90ee4cb876783de81c6a1f58d94c | 1,380 | py | Python | artemis/general/dict_ops.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 235 | 2016-08-26T14:18:51.000Z | 2022-03-13T10:54:39.000Z | artemis/general/dict_ops.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 112 | 2016-04-30T11:48:38.000Z | 2021-01-12T20:17:32.000Z | artemis/general/dict_ops.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 31 | 2016-11-05T19:09:19.000Z | 2021-09-13T07:35:40.000Z | import itertools
__author__ = 'peter'
def cross_dict_dicts(*dicts):
"""
Combine two or more dictionaries of dictionaries by turning every pairwise combination of their keys, and creating a
new dict whose keys are tuples (containing these key-combinations) and whose values are the the combined dictioniona... | 31.363636 | 138 | 0.577536 |
f764cc55c43f1f4429e5b5bf497f054dc2273fcf | 2,632 | py | Python | neutronclient/tests/unit/qos/test_cli20_qos.py | teresa-ho/stx-python-neutronclient | 35ea6c2c96cbf98755a82cb7c19138648552b778 | [
"Apache-2.0"
] | null | null | null | neutronclient/tests/unit/qos/test_cli20_qos.py | teresa-ho/stx-python-neutronclient | 35ea6c2c96cbf98755a82cb7c19138648552b778 | [
"Apache-2.0"
] | null | null | null | neutronclient/tests/unit/qos/test_cli20_qos.py | teresa-ho/stx-python-neutronclient | 35ea6c2c96cbf98755a82cb7c19138648552b778 | [
"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... | 36.555556 | 79 | 0.612082 |
f764f00877f84bee882c151809ee233ec22e5b2c | 733 | py | Python | tests/pipe_proc_tests/ls.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 150 | 2015-01-16T12:24:13.000Z | 2022-03-03T18:01:18.000Z | tests/pipe_proc_tests/ls.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 129 | 2015-01-13T04:58:56.000Z | 2022-03-02T13:39:16.000Z | tests/pipe_proc_tests/ls.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 88 | 2015-02-16T20:04:12.000Z | 2022-03-10T06:50:30.000Z | #! /usr/bin/env python
""" Create files for ls unit test """
import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p
d, a = pipe.read("time_complex.fid")
d, a = p.ls(d, a, ls=2.0, sw=True)
pipe.write("ls1.glue", d, a, overwrite=True)
d, a = pipe.read("time_complex.fid")
d, a = p.ls(d, a, ls=-3.0, sw... | 27.148148 | 44 | 0.637108 |
f7650d45f390ffef6b5fa0464cca2ab180839eed | 645 | py | Python | examples/twitter.py | JNRowe-retired/Dolt | ffa670fe10c62a9fc788112c893aa8fc007168c9 | [
"BSD-3-Clause"
] | 8 | 2015-11-05T15:42:26.000Z | 2021-08-17T09:18:27.000Z | examples/twitter.py | JNRowe-retired/Dolt | ffa670fe10c62a9fc788112c893aa8fc007168c9 | [
"BSD-3-Clause"
] | null | null | null | examples/twitter.py | JNRowe-retired/Dolt | ffa670fe10c62a9fc788112c893aa8fc007168c9 | [
"BSD-3-Clause"
] | 1 | 2021-03-12T18:51:23.000Z | 2021-03-12T18:51:23.000Z | import getpass
import os, sys
sys.path[0:0] = os.path.join(os.path.dirname(__file__), "..")
from dolt.apis import Twitter
from httplib2 import Http
if __name__ == "__main__":
http = Http()
username = raw_input("Twitter Username: ")
password = getpass.getpass("Twitter Password: ")
http.add_credentials(... | 29.318182 | 61 | 0.669767 |
f765184b8d5764151f3abee34b4975d8e8c7e1f8 | 3,132 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/_additional_properties_client.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/_additional_properties_client.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/_additional_properties_client.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.112676 | 99 | 0.685824 |
f7653ca90434318d84692534b39ad971d0f07119 | 74 | py | Python | common/determined_common/schemas/expconf/__init__.py | hexieshenghuo/determined | 1e0948d89373ac26e3134c94591114c0951090d6 | [
"Apache-2.0"
] | 1 | 2021-03-29T04:25:27.000Z | 2021-03-29T04:25:27.000Z | common/determined_common/schemas/expconf/__init__.py | hexieshenghuo/determined | 1e0948d89373ac26e3134c94591114c0951090d6 | [
"Apache-2.0"
] | null | null | null | common/determined_common/schemas/expconf/__init__.py | hexieshenghuo/determined | 1e0948d89373ac26e3134c94591114c0951090d6 | [
"Apache-2.0"
] | null | null | null | from determined_common.schemas.expconf._validate import validation_errors
| 37 | 73 | 0.905405 |
f76567315cfa48659bfeab08e5336aff94a255bb | 6,183 | py | Python | asposewordscloud/models/requests/delete_comment_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/delete_comment_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/delete_comment_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="delete_comment_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
... | 47.198473 | 255 | 0.658095 |
f76583369b0f86dce82f8c0f174f5aeff290b93d | 54,023 | py | Python | SCRAPE/Lib/site-packages/twisted/python/filepath.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/python/filepath.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/python/filepath.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # -*- test-case-name: twisted.test.test_paths -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Object-oriented filesystem path representation.
"""
import base64
import errno
import os
import sys
from os import listdir, stat, utime
from os.path import (
abspath,
basename,
di... | 33.554658 | 88 | 0.602817 |
f76598553aa8a1a407308bcda49fec0a737f721f | 5,950 | py | Python | infra/libs/git.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | infra/libs/git.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | infra/libs/git.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 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.
"""Utility for dealing with Git repositories."""
import logging
import os
import shutil
import stat
import subprocess
import sys
import tempfile
import time... | 30.670103 | 79 | 0.647731 |
f765cb2582b2b3cdee9ee2c1f4e944150a035732 | 7,684 | py | Python | src/ggrc_basic_permissions/models.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc_basic_permissions/models.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc_basic_permissions/models.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
import json
from logging import getLogger
from sqlalchemy.orm import backref
from ggrc import db
from ggrc.models import all_models
from ggrc.builder import simple_property
from ggrc.models.context import ... | 31.109312 | 79 | 0.716944 |
f765efe131e3a624b4e3ef959aa66a729d678342 | 7,139 | py | Python | tests/parse/test_parse_coordinates.py | bjhall/scout | ea772cf8d233223e0ec5271f61b95d3afcf719ad | [
"BSD-3-Clause"
] | null | null | null | tests/parse/test_parse_coordinates.py | bjhall/scout | ea772cf8d233223e0ec5271f61b95d3afcf719ad | [
"BSD-3-Clause"
] | null | null | null | tests/parse/test_parse_coordinates.py | bjhall/scout | ea772cf8d233223e0ec5271f61b95d3afcf719ad | [
"BSD-3-Clause"
] | null | null | null | from scout.parse.variant.coordinates import (
get_cytoband_coordinates,
get_sub_category,
get_length,
get_end,
parse_coordinates,
)
class CyvcfVariant(object):
"""Mock a cyvcf variant
Default is to return a variant with three individuals high genotype
quality.
"""
def __... | 23.639073 | 86 | 0.639305 |
f765fceb9d53ca36913754339081f2c433f71c9c | 7,152 | py | Python | chapter07/03_WindyGridWorld_nStepSARSA_OffPolicy.py | cemkaraoguz/reinforcement-learning-an-introduction-second-edition | 735bfa6b66ffb52b7cf03966164e7bc1755942de | [
"MIT"
] | 1 | 2022-03-01T11:48:55.000Z | 2022-03-01T11:48:55.000Z | chapter07/03_WindyGridWorld_nStepSARSA_OffPolicy.py | cemkaraoguz/reinforcement-learning-an-introduction-second-edition | 735bfa6b66ffb52b7cf03966164e7bc1755942de | [
"MIT"
] | null | null | null | chapter07/03_WindyGridWorld_nStepSARSA_OffPolicy.py | cemkaraoguz/reinforcement-learning-an-introduction-second-edition | 735bfa6b66ffb52b7cf03966164e7bc1755942de | [
"MIT"
] | null | null | null | '''
03_WindyGridWorld_nStepSARSA_OffPolicy.py : n-step off-policy SARSA applied to Windy Grid World problem (Example 6.5)
Cem Karaoguz, 2020
MIT License
'''
import numpy as np
import pylab as pl
from IRL.environments.Gridworlds import StochasticGridWorld
from IRL.agents.TemporalDifferenceLearning import nStepOffPoli... | 38.869565 | 152 | 0.699385 |
f76605f51fbae6ba9f9c4784486d333023f4e4a1 | 2,314 | py | Python | propertyreader.py | vijay8451/quicksystem | 515823ff88991daab1ec36958b252ce448c1ec76 | [
"MIT"
] | 3 | 2019-06-25T09:04:19.000Z | 2019-10-01T13:02:29.000Z | propertyreader.py | vijay8451/quicksystem | 515823ff88991daab1ec36958b252ce448c1ec76 | [
"MIT"
] | 2 | 2021-03-31T19:00:02.000Z | 2021-12-13T19:58:31.000Z | propertyreader.py | vijay8451/quicksystem | 515823ff88991daab1ec36958b252ce448c1ec76 | [
"MIT"
] | null | null | null | import configparser
config = configparser.ConfigParser()
config.read('quicksystem.properties')
class Properties(object):
"""quicksystem properties reader """
def __init__(self):
self.randomSystem = RandomSystem()
self.beaker = Beaker()
self.jenkinsInstaller = JenkinsInstaller()
... | 32.138889 | 94 | 0.651685 |
f7669e82da83ab072eb08ec76af342e2b055796e | 2,300 | py | Python | Model/code/training_restaurant_features.py | teomotun/Restaurant-Plug | 1ecaab7bb60706ec0eca96c2f3efb31276c536e7 | [
"Apache-2.0"
] | null | null | null | Model/code/training_restaurant_features.py | teomotun/Restaurant-Plug | 1ecaab7bb60706ec0eca96c2f3efb31276c536e7 | [
"Apache-2.0"
] | null | null | null | Model/code/training_restaurant_features.py | teomotun/Restaurant-Plug | 1ecaab7bb60706ec0eca96c2f3efb31276c536e7 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import h5py
# Paths
DATA_HOME = "/content/drive/My Drive/Yelp-Restaurant-Classification/Model/data/"
FEATURES_HOME = '/content/drive/My Drive/Yelp-Restaurant-Classification/Model/features/'
# Get photo->business mapping from the file provided
train_photo_to_biz_ids = pd.read_csv(DATA_HOME + 'train... | 43.396226 | 120 | 0.762609 |
f766a09a5537452dacf391bc964b17564c12384c | 4,137 | py | Python | easy_gold/image_utils.py | nakayama-r/Probspace-kiva-3rd | 1fe41aa10b4dd2ec992096228a03b85b61a28a2f | [
"MIT"
] | null | null | null | easy_gold/image_utils.py | nakayama-r/Probspace-kiva-3rd | 1fe41aa10b4dd2ec992096228a03b85b61a28a2f | [
"MIT"
] | null | null | null | easy_gold/image_utils.py | nakayama-r/Probspace-kiva-3rd | 1fe41aa10b4dd2ec992096228a03b85b61a28a2f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Jul 10 02:41:05 2021
@author: r00526841
"""
from utils import *
from PIL import Image
#import imagehash
import cv2
def getImageStatistics(df, ppath_to_dir, ppath_to_label_dir=None):
for index, row in df.iterrows():
ppath_to_image = ppath_to_dir / row["image_nam... | 30.873134 | 94 | 0.570462 |
f766aff2deae1462ac8ec3e9543d23839c4adfde | 2,811 | py | Python | tofu/data/_generic_check.py | WinstonLHS/tofu | c95b2eb6aedcf4bac5676752b9635b78f31af6ca | [
"MIT"
] | 56 | 2017-07-09T10:29:45.000Z | 2022-03-31T02:44:50.000Z | tofu/data/_generic_check.py | WinstonLHS/tofu | c95b2eb6aedcf4bac5676752b9635b78f31af6ca | [
"MIT"
] | 522 | 2017-07-02T21:06:07.000Z | 2022-03-02T08:07:57.000Z | tofu/data/_generic_check.py | Didou09/tofu | 4a4e1f058bab8e7556ed9d518f90807cec605476 | [
"MIT"
] | 9 | 2017-07-02T20:38:53.000Z | 2021-12-04T00:12:30.000Z | # -*- coding: utf-8 -*-
# common
import matplotlib.pyplot as plt
_LALLOWED_AXESTYPES = [
'cross', 'hor',
'matrix',
'timetrace',
'profile1d',
'image',
'misc'
]
# #############################################################################
# #################################################... | 23.621849 | 79 | 0.37958 |
f766bf62eca60e16c5e19bed5d688451495b4bb4 | 1,255 | py | Python | tests/commands/test_help.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 415 | 2016-06-10T00:46:55.000Z | 2021-10-16T00:56:06.000Z | tests/commands/test_help.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 25 | 2016-06-11T13:48:59.000Z | 2021-01-05T11:19:30.000Z | tests/commands/test_help.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 109 | 2016-06-11T05:17:05.000Z | 2021-12-22T11:02:22.000Z | """Help command unit tests """
import importlib
import pytest
import two1.cli
@pytest.mark.unit
def test_help_text_format():
"""Confirm each command's help ends with a period and is <45 chars.
This test uses metaprogramming to generate the list of functions
of the form two1.commands.buy.buy, asserting ... | 35.857143 | 73 | 0.679681 |
f766c69ee14e81bb14eb3b54c3f7baf35788211b | 6,495 | py | Python | src/pipelines/weather/weather_pipeline.py | harrisonzhu508/data | a3b95ced4abad6653d20f67f3f285abeeb0c2b25 | [
"Apache-2.0"
] | null | null | null | src/pipelines/weather/weather_pipeline.py | harrisonzhu508/data | a3b95ced4abad6653d20f67f3f285abeeb0c2b25 | [
"Apache-2.0"
] | null | null | null | src/pipelines/weather/weather_pipeline.py | harrisonzhu508/data | a3b95ced4abad6653d20f67f3f285abeeb0c2b25 | [
"Apache-2.0"
] | null | null | null | import re
import sys
import math
from random import shuffle
from functools import partial
from typing import Any, Dict, List, Tuple
from multiprocessing import cpu_count
from multiprocessing.pool import ThreadPool as Pool
import numpy
from tqdm.contrib import concurrent
from pandas import DataFrame, Series, Int64Dtype... | 37.327586 | 100 | 0.627098 |
f766dc02c99c74fafe61b68c1e65cd0777853322 | 2,045 | py | Python | amatino/internal/entity_update_arguments.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 2 | 2018-07-20T20:00:33.000Z | 2020-10-08T15:49:06.000Z | amatino/internal/entity_update_arguments.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 1 | 2020-05-21T02:49:29.000Z | 2020-05-21T02:49:29.000Z | amatino/internal/entity_update_arguments.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 3 | 2018-09-03T09:31:31.000Z | 2020-05-21T05:30:00.000Z | """
Amatino API Python Bindings
Entity Update Arguments
Author: hugh@amatino.io
"""
from amatino.internal.encodable import Encodable
from amatino.internal.entity_create_arguments import NewEntityArguments
from amatino.internal.constrained_string import ConstrainedString
from typing import Optional
class EntityUpdateA... | 28.013699 | 78 | 0.632274 |
f766e0e63f77f6d33944033364b887b207981671 | 64 | py | Python | outlookdisablespamfilter/__init__.py | jan-janssen/outlook-disable-spam-filter | 264f5fb650408abbfa5736f33ae098aefc0e7fac | [
"BSD-3-Clause"
] | null | null | null | outlookdisablespamfilter/__init__.py | jan-janssen/outlook-disable-spam-filter | 264f5fb650408abbfa5736f33ae098aefc0e7fac | [
"BSD-3-Clause"
] | null | null | null | outlookdisablespamfilter/__init__.py | jan-janssen/outlook-disable-spam-filter | 264f5fb650408abbfa5736f33ae098aefc0e7fac | [
"BSD-3-Clause"
] | null | null | null | from outlookdisablespamfilter.shared import transfer_spam_emails | 64 | 64 | 0.9375 |
f766f0faf3cd4875039cd35c9dc82786fee31c98 | 449 | py | Python | build/j2n6s300_ikfast/catkin_generated/pkg.develspace.context.pc.py | FProgrammerLIU/caster_man_ros | a75b503fad3a470f985072a2b3953e89074f3223 | [
"MIT"
] | null | null | null | build/j2n6s300_ikfast/catkin_generated/pkg.develspace.context.pc.py | FProgrammerLIU/caster_man_ros | a75b503fad3a470f985072a2b3953e89074f3223 | [
"MIT"
] | null | null | null | build/j2n6s300_ikfast/catkin_generated/pkg.develspace.context.pc.py | FProgrammerLIU/caster_man_ros | a75b503fad3a470f985072a2b3953e89074f3223 | [
"MIT"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "moveit_core;pluginlib;roscpp;tf_conversions".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NA... | 49.888889 | 88 | 0.739421 |
f7671e91db5aaea8ae21a0a7e49fe16822ac3587 | 3,132 | py | Python | scripts/run_sentence_indexer.py | MetaphorExtractionTools/metaphor-search | ca0ba6cda8d83eb9274eb2b9d7977df4a5374b18 | [
"MIT"
] | 2 | 2018-05-25T01:47:50.000Z | 2021-11-26T19:03:07.000Z | scripts/run_sentence_indexer.py | MetaphorExtractionTools/metaphor-search | ca0ba6cda8d83eb9274eb2b9d7977df4a5374b18 | [
"MIT"
] | null | null | null | scripts/run_sentence_indexer.py | MetaphorExtractionTools/metaphor-search | ca0ba6cda8d83eb9274eb2b9d7977df4a5374b18 | [
"MIT"
] | 1 | 2020-02-06T16:04:07.000Z | 2020-02-06T16:04:07.000Z | #!/usr/bin/env python
# coding: utf-8
# Author: Vladimir M. Zaytsev <zaytsev@usc.edu>
import os
import numpy
import shutil
import logging
import argparse
from sear.index import InvertedIndex # The index itself.
from sear.utils import IndexingPipeline # Utility which will control indexing p... | 27 | 111 | 0.707854 |
f767299211252b3099abb79bfe1a89b16ca79677 | 1,713 | py | Python | gradescrape/login.py | guineawheek/gradescrape | 88245c2a26decc499db2e8c5b75229b67fb6696b | [
"BSD-2-Clause"
] | null | null | null | gradescrape/login.py | guineawheek/gradescrape | 88245c2a26decc499db2e8c5b75229b67fb6696b | [
"BSD-2-Clause"
] | null | null | null | gradescrape/login.py | guineawheek/gradescrape | 88245c2a26decc499db2e8c5b75229b67fb6696b | [
"BSD-2-Clause"
] | null | null | null | # requires: selenium, geckodriver
# Somewhat deprecated. Only use if desparate.
import json
__all__ = ["interactive_school_login"]
def interactive_school_login(school="berkeley"):
"""
Uses Selenium to interactively grab tokens from an interactive saml login.
Returns the cookies obtained.
You can sa... | 30.589286 | 135 | 0.664915 |
f76781418ef1e423ed98b97890791ef7aca02b31 | 8,015 | py | Python | wienerschnitzelgemeinschaft/src/shai/fastai/other_ensemble_scripts/enstw41.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/shai/fastai/other_ensemble_scripts/enstw41.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/shai/fastai/other_ensemble_scripts/enstw41.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | # individual nan corrected
# Final nan matches highest probable label (optional)
import pandas as pd
import numpy as np
from tqdm import tqdm
import matplotlib.pyplot as plt
SAMPLE = '../input/sample_submission.csv'
label_names = {
0: "Nucleoplasm",
1: "Nuclear membrane",
2: "Nucleoli",
... | 41.102564 | 120 | 0.483968 |
f767ae544f325588028db406518572d93b2dae39 | 244 | py | Python | nevergrad/functions/powersystems/__init__.py | kwonhur/nevergrad | 7821ff2ddf46ed7ece61529449f770d32179433c | [
"MIT"
] | 3,217 | 2018-12-20T05:41:46.000Z | 2022-03-31T10:22:54.000Z | nevergrad/functions/powersystems/__init__.py | kwonhur/nevergrad | 7821ff2ddf46ed7ece61529449f770d32179433c | [
"MIT"
] | 590 | 2018-12-20T21:03:38.000Z | 2022-03-31T04:38:45.000Z | nevergrad/functions/powersystems/__init__.py | kwonhur/nevergrad | 7821ff2ddf46ed7ece61529449f770d32179433c | [
"MIT"
] | 333 | 2018-12-20T08:38:03.000Z | 2022-03-28T06:23:53.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .core import PowerSystem as PowerSystem
| 34.857143 | 71 | 0.77459 |
f767b5a02834bc43fda4cafc3ce2038fc3321d25 | 830 | py | Python | lambda_function.py | Moesif/moesif-aws-lambda-python | b588bc819568e08eec2f8eb9d2bd6a1e15f945a5 | [
"Apache-2.0"
] | 1 | 2021-01-21T10:38:33.000Z | 2021-01-21T10:38:33.000Z | lambda_function.py | Moesif/moesif-aws-lambda-python | b588bc819568e08eec2f8eb9d2bd6a1e15f945a5 | [
"Apache-2.0"
] | 2 | 2019-12-21T01:14:19.000Z | 2020-02-20T02:03:23.000Z | lambda_function.py | Moesif/moesif-aws-lambda-python | b588bc819568e08eec2f8eb9d2bd6a1e15f945a5 | [
"Apache-2.0"
] | 1 | 2021-01-21T10:38:35.000Z | 2021-01-21T10:38:35.000Z | from moesif_aws_lambda.middleware import *
import os
import requests
import json
moesif_options = {
'LOG_BODY': True,
'DEBUG': True,
}
@MoesifLogger(moesif_options)
def lambda_handler(event, context):
# Outgoing API call to third parties like Github / Stripe or to your own dependencies
start_capture_... | 27.666667 | 102 | 0.580723 |
f767b7366fdf2c2f742dc6da7890800845ed5799 | 471 | py | Python | tests/validators/test_interface.py | funkypenguin/connaisseur | 37d85332e519454a017b02ecb1cd77913f51f70a | [
"Apache-2.0"
] | 281 | 2020-08-07T16:21:07.000Z | 2022-03-31T11:08:42.000Z | tests/validators/test_interface.py | funkypenguin/connaisseur | 37d85332e519454a017b02ecb1cd77913f51f70a | [
"Apache-2.0"
] | 445 | 2020-09-02T10:41:18.000Z | 2022-03-31T10:19:29.000Z | tests/validators/test_interface.py | funkypenguin/connaisseur | 37d85332e519454a017b02ecb1cd77913f51f70a | [
"Apache-2.0"
] | 38 | 2020-10-28T08:05:04.000Z | 2022-03-09T02:06:40.000Z | import pytest
import connaisseur.validators.interface as vi
def test_init():
assert vi.ValidatorInterface("")
@pytest.mark.asyncio
async def test_validate():
with pytest.raises(NotImplementedError):
assert await vi.ValidatorInterface("").validate(None)
def test_healthy():
with pytest.raises(No... | 21.409091 | 61 | 0.728238 |
f767d5332f355479a0656200357eba773a7d3227 | 2,553 | py | Python | tests/test_engine/test_projection/test_projection_slice.py | gitter-badger/MontyDB | 849d03dc2cfed35739481e9acb1ff0bd8095c91b | [
"BSD-3-Clause"
] | null | null | null | tests/test_engine/test_projection/test_projection_slice.py | gitter-badger/MontyDB | 849d03dc2cfed35739481e9acb1ff0bd8095c91b | [
"BSD-3-Clause"
] | null | null | null | tests/test_engine/test_projection/test_projection_slice.py | gitter-badger/MontyDB | 849d03dc2cfed35739481e9acb1ff0bd8095c91b | [
"BSD-3-Clause"
] | null | null | null |
def test_projection_slice_1(monty_proj, mongo_proj):
docs = [
{"a": [{"b": 1}, {"b": 3}, {"b": 0}, {"b": 8}]}
]
spec = {"a.b": {"$gt": 2}}
proj = {"a.b": {"$slice": 2}}
monty_c = monty_proj(docs, spec, proj)
mongo_c = mongo_proj(docs, spec, proj)
assert mongo_c.count() == 1
a... | 24.786408 | 55 | 0.527223 |
f7681adf5c3a92dc85f321c2470189af8a01603a | 1,105 | py | Python | demo/test.py | tkerola/matrix_calculus | 21c4f262b501337996453280d75d06a47a9fd135 | [
"MIT"
] | 1 | 2019-04-18T03:48:08.000Z | 2019-04-18T03:48:08.000Z | demo/test.py | tkerola/matrix_calculus | 21c4f262b501337996453280d75d06a47a9fd135 | [
"MIT"
] | null | null | null | demo/test.py | tkerola/matrix_calculus | 21c4f262b501337996453280d75d06a47a9fd135 | [
"MIT"
] | null | null | null |
from matrix_calculus import *
from matrix_calculus.matrix_massage import massage2canonical
from matrix_calculus.show_latex import show_latex
def main():
A = Variable("A")
B = Variable("B")
C = Variable("C")
D = Variable("D")
Y = Variable("Y")
X = Variable("X")
expr = Tr(A*X*B)
wrt = ... | 21.25 | 60 | 0.60905 |
f7683fd845e86f68f741962cd7eba1909b6d17c6 | 4,561 | py | Python | yardstick/benchmark/scenarios/availability/attacker/attacker_baremetal.py | rbbratta/yardstick | 7d1ffcd8eb41e9e4a09ed469b00ae4cbf2715529 | [
"Apache-2.0"
] | null | null | null | yardstick/benchmark/scenarios/availability/attacker/attacker_baremetal.py | rbbratta/yardstick | 7d1ffcd8eb41e9e4a09ed469b00ae4cbf2715529 | [
"Apache-2.0"
] | null | null | null | yardstick/benchmark/scenarios/availability/attacker/attacker_baremetal.py | rbbratta/yardstick | 7d1ffcd8eb41e9e4a09ed469b00ae4cbf2715529 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright (c) 2015 Huawei Technologies Co.,Ltd. and others
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, ... | 34.55303 | 78 | 0.578601 |
f7684320cbacbbc0509f0ffb9327527104eb6e74 | 5,381 | py | Python | backend/src/baserow/contrib/database/api/rows/serializers.py | ericderace/baserow | 7b35e81f75166d914d07ef4ad0c30c625b6bb396 | [
"MIT"
] | null | null | null | backend/src/baserow/contrib/database/api/rows/serializers.py | ericderace/baserow | 7b35e81f75166d914d07ef4ad0c30c625b6bb396 | [
"MIT"
] | 6 | 2021-04-08T22:03:06.000Z | 2022-01-13T03:38:17.000Z | backend/src/baserow/contrib/database/api/rows/serializers.py | ericderace/baserow | 7b35e81f75166d914d07ef4ad0c30c625b6bb396 | [
"MIT"
] | null | null | null | import logging
from rest_framework import serializers
from baserow.api.utils import get_serializer_class
from baserow.api.serializers import get_example_pagination_serializer_class
from baserow.core.utils import model_default_values, dict_to_object
from baserow.contrib.database.fields.registries import field_type_reg... | 39.566176 | 87 | 0.688162 |
f7686beb9cf80d0dc4ae040c107009ad91602ab7 | 534 | py | Python | sanity/management/commands/update_index.py | TIBHannover/arxiv_preserver | aefdacaa9d1c4c13b51e1812e6218c0025ab0a11 | [
"MIT"
] | null | null | null | sanity/management/commands/update_index.py | TIBHannover/arxiv_preserver | aefdacaa9d1c4c13b51e1812e6218c0025ab0a11 | [
"MIT"
] | null | null | null | sanity/management/commands/update_index.py | TIBHannover/arxiv_preserver | aefdacaa9d1c4c13b51e1812e6218c0025ab0a11 | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand, CommandError
import sanity.models as models
import re
import time
import datetime
import os
from django.db.models import Max
class Command(BaseCommand):
help = "Closes the specified poll for voting"
def add_arguments(self, parser):
pass
def h... | 22.25 | 89 | 0.692884 |
f768f53ed3d818d4f87f83c7c8808f40808edebc | 2,296 | py | Python | test/lmp/script/gen_txt/test_parse_args.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/script/gen_txt/test_parse_args.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/script/gen_txt/test_parse_args.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | """Test parsing arguments.
Test target:
- :py:meth:`lmp.script.gen_txt.parse_args`.
"""
import lmp.infer
import lmp.script.gen_txt
from lmp.infer import Top1Infer, TopKInfer, TopPInfer
def test_top_1_parse_results(ckpt: int, exp_name: str, max_seq_len: int, seed: int) -> None:
"""Must correctly parse all argument... | 23.916667 | 92 | 0.616289 |
f768f579d3e2279e1691f6fe0d0a4fc720a5ba60 | 50,104 | py | Python | stage/test_cdh_stages.py | streamsets/datacollector-tests-external | 6f255b5e7496deeef333b57a5e9df4911ba3ef00 | [
"Apache-2.0"
] | 1 | 2020-04-14T03:01:51.000Z | 2020-04-14T03:01:51.000Z | stage/test_cdh_stages.py | streamsets/test | 1ead70179ee92a4acd9cfaa33c56a5a9e233bf3d | [
"Apache-2.0"
] | null | null | null | stage/test_cdh_stages.py | streamsets/test | 1ead70179ee92a4acd9cfaa33c56a5a9e233bf3d | [
"Apache-2.0"
] | 1 | 2019-09-14T08:28:36.000Z | 2019-09-14T08:28:36.000Z | # Copyright 2017 StreamSets Inc.
#
# 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 writi... | 53.245484 | 124 | 0.584644 |
f768fbd890aa858308d2d0a97bcac43e5ac6f865 | 593 | py | Python | workalendar/europe/luxembourg.py | vanadium23/workalendar | 4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7 | [
"MIT"
] | null | null | null | workalendar/europe/luxembourg.py | vanadium23/workalendar | 4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7 | [
"MIT"
] | null | null | null | workalendar/europe/luxembourg.py | vanadium23/workalendar | 4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from workalendar.core import WesternCalendar, ChristianMixin
from workalendar.registry import iso_register
@iso_register('LU')
class Luxembourg(WesternCalendar, ChristianMixin):
name = 'Luxembourg'
include_easter_monday = True
include_ascens... | 26.954545 | 60 | 0.725126 |
f7692d603bd9297bc2e47fabac253b03fa341830 | 418 | py | Python | src/kill_nodes.py | srikanteswartalluri/container-orchestrator | 3cd07989e28ece0038cb0b7c6bbdc83c1c0ba7a9 | [
"Apache-2.0"
] | null | null | null | src/kill_nodes.py | srikanteswartalluri/container-orchestrator | 3cd07989e28ece0038cb0b7c6bbdc83c1c0ba7a9 | [
"Apache-2.0"
] | null | null | null | src/kill_nodes.py | srikanteswartalluri/container-orchestrator | 3cd07989e28ece0038cb0b7c6bbdc83c1c0ba7a9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
from log_utils import logger
from cli_utils import CLIUtils
from constants import *
(out, err) = CLIUtils.run(LIST_NODES_CMD)
logger.debug('list of containers: {}'.format(out))
lines = out.strip().split("\n")
for i in range(1, len(lines)):
container_id = lines[i].split()[0]
(out, err) = CLIU... | 24.588235 | 65 | 0.705742 |
f76946044e36c57a8f33127e2b7dffb2b1b1feb9 | 6,791 | py | Python | recipes/windnoise/model/CRN.py | wangwei2009/speechbrain | ebbac4561a9c9101786e0ab0b1105017eb655fc8 | [
"Apache-2.0"
] | null | null | null | recipes/windnoise/model/CRN.py | wangwei2009/speechbrain | ebbac4561a9c9101786e0ab0b1105017eb655fc8 | [
"Apache-2.0"
] | null | null | null | recipes/windnoise/model/CRN.py | wangwei2009/speechbrain | ebbac4561a9c9101786e0ab0b1105017eb655fc8 | [
"Apache-2.0"
] | null | null | null | """
single channel speech enhancement for wind noise reduction.
refer to
"A Convolutional Recurrent Neural Network for Real-Time Speech Enhancement" .
Authors
* Wang Wei 2021
"""
import torch
import torch.nn as nn
class CNN_Block(torch.nn.Module):
def __init__(self,
in_channels,
out_channels... | 31.009132 | 130 | 0.581799 |
f7698d5b9fc03824409bc00b255d8a1eadcba365 | 62,024 | py | Python | cla-backend/cla/routes.py | CareyLF/easycla | f251867abb012f98acb7451bdf21b1bc64ffe77e | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 1 | 2019-09-26T10:34:01.000Z | 2019-09-26T10:34:01.000Z | cla-backend/cla/routes.py | CareyLF/easycla | f251867abb012f98acb7451bdf21b1bc64ffe77e | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | cla-backend/cla/routes.py | CareyLF/easycla | f251867abb012f98acb7451bdf21b1bc64ffe77e | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | # Copyright The Linux Foundation and each contributor to CommunityBridge.
# SPDX-License-Identifier: MIT
"""
The entry point for the CLA service. Lays out all routes and controller functions.
"""
import hug
from falcon import HTTP_401
from hug.middleware import LogMiddleware
import cla
import cla.auth
import cla.con... | 38.357452 | 133 | 0.643412 |
f769f45a2f46f64a9eda8925d21c7b6218e1e3c8 | 2,240 | py | Python | backend/schedule_worker/utils/przystanki.py | evemorgen/GdzieJestMojTramwajProject | 65a090ae4222053a2a0a1b145df5196f3658065c | [
"MIT"
] | null | null | null | backend/schedule_worker/utils/przystanki.py | evemorgen/GdzieJestMojTramwajProject | 65a090ae4222053a2a0a1b145df5196f3658065c | [
"MIT"
] | null | null | null | backend/schedule_worker/utils/przystanki.py | evemorgen/GdzieJestMojTramwajProject | 65a090ae4222053a2a0a1b145df5196f3658065c | [
"MIT"
] | null | null | null | import logging
import os
import json
import networkx as nx
from utils import Singleton
class Przystanki(metaclass=Singleton):
def __init__(self, path=None):
if path is None:
self.path = os.environ['TRAM_ROOT'] + "/data/przystanki_0_159.json"
else:
self.path = path
... | 34.461538 | 108 | 0.578571 |
f769f8f1a9d12106fd0291e9a5a6b9bc646e223b | 116,388 | py | Python | salt/state.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/state.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/state.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
The module used to execute states in salt. A state is unlike a module
execution in that instead of just executing a command it ensure that a
certain state is present on the system.
The data sent to the state calls is as follows:
{ 'state': '<state module name>',
'fun': '<state fun... | 42.154292 | 132 | 0.417921 |
f76a07fdb0dedcf997f75c661986255b0247ac1a | 11,197 | py | Python | tests/parsers/test_notebook_parsers.py | s-weigand/flake8-nb | 39c6cf6158cc231c420ff783a550b09ee5f7e4c7 | [
"Apache-2.0"
] | 23 | 2019-12-05T06:02:43.000Z | 2022-03-11T18:17:19.000Z | tests/parsers/test_notebook_parsers.py | s-weigand/flake8-nb | 39c6cf6158cc231c420ff783a550b09ee5f7e4c7 | [
"Apache-2.0"
] | 191 | 2019-10-04T06:22:14.000Z | 2022-03-29T04:02:28.000Z | tests/parsers/test_notebook_parsers.py | s-weigand/flake8-nb | 39c6cf6158cc231c420ff783a550b09ee5f7e4c7 | [
"Apache-2.0"
] | 6 | 2020-06-13T13:35:15.000Z | 2021-11-28T19:50:12.000Z | import os
import warnings
from typing import Dict
from typing import List
from typing import Tuple
from typing import Union
import pytest
from flake8_nb.parsers import CellId
from flake8_nb.parsers.notebook_parsers import InputLineMapping
from flake8_nb.parsers.notebook_parsers import InvalidNotebookWarning
from flak... | 37.199336 | 97 | 0.652228 |
f76a1909a8fc1b3f7b47133da7f4566bc7fa5200 | 3,782 | py | Python | zynq/tkinter_kws.py | Roxbili/kws-demo | 7e0674f1407572fc8f148293b23fa20a5164bc5e | [
"Apache-2.0"
] | null | null | null | zynq/tkinter_kws.py | Roxbili/kws-demo | 7e0674f1407572fc8f148293b23fa20a5164bc5e | [
"Apache-2.0"
] | null | null | null | zynq/tkinter_kws.py | Roxbili/kws-demo | 7e0674f1407572fc8f148293b23fa20a5164bc5e | [
"Apache-2.0"
] | null | null | null | #-*- encoding: utf-8 -*-
import time
import argparse
import numpy as np
import tkinter as tk
from tkinter.ttk import Label
from kws_ps_pl import BRAM, PSPLTalk, InputDataToBram
from multiprocessing import Process
class timeRecorder(object):
def __init__(self):
self.total_time = 0.
self.counter = 0
... | 30.015873 | 82 | 0.556584 |
f76a62a3c29de99b7ca31590c4643dc8281f10ff | 8,892 | py | Python | billiard/util.py | ask/billiard | bb9c1c43528b2a969c99aa5c57129daf2e1ce646 | [
"BSD-3-Clause"
] | 1 | 2022-02-18T05:39:48.000Z | 2022-02-18T05:39:48.000Z | billiard/util.py | ask/billiard | bb9c1c43528b2a969c99aa5c57129daf2e1ce646 | [
"BSD-3-Clause"
] | null | null | null | billiard/util.py | ask/billiard | bb9c1c43528b2a969c99aa5c57129daf2e1ce646 | [
"BSD-3-Clause"
] | null | null | null | #
# Module providing various facilities to other parts of the package
#
# billiard/util.py
#
# Copyright (c) 2006-2008, R Oudkerk --- see COPYING.txt
#
from __future__ import absolute_import
import errno
import functools
import itertools
import weakref
import atexit
import shutil
import tempfile
import threading ... | 26.464286 | 79 | 0.617746 |
f76a67b29770d4e00e2de5d225c6d7afc0f949cc | 9,140 | py | Python | src/nti/zodb/activitylog.py | NextThought/nti.zodb | 2eb56b6a617fe83c738bfc4651b31d080856e3fc | [
"Apache-2.0"
] | null | null | null | src/nti/zodb/activitylog.py | NextThought/nti.zodb | 2eb56b6a617fe83c738bfc4651b31d080856e3fc | [
"Apache-2.0"
] | 10 | 2017-06-08T12:24:31.000Z | 2021-04-01T16:52:38.000Z | src/nti/zodb/activitylog.py | NextThought/nti.zodb | 2eb56b6a617fe83c738bfc4651b31d080856e3fc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Logging of database connection activity. Activate this with ZCML::
<include package="nti.zodb" file="configure_activitylog.zcml" />
Originally based on code from the unreleased zc.zodbactivitylog.
"""
from __future__ import print_function, absolute_import, divis... | 34.621212 | 96 | 0.66291 |
f76a6b22f829cd36368947588d4a7db54da8b5ef | 2,691 | py | Python | Emulator/library.py | samedamci/7seg-Emulator | 6115d817395d88d6490065893748e55883faf401 | [
"0BSD"
] | null | null | null | Emulator/library.py | samedamci/7seg-Emulator | 6115d817395d88d6490065893748e55883faf401 | [
"0BSD"
] | null | null | null | Emulator/library.py | samedamci/7seg-Emulator | 6115d817395d88d6490065893748e55883faf401 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
"""
Implementation of ZeroSeg library methods with corresponding
behaviour but displayed on emulator display.
"""
from Emulator.characters import CHARS, UNDEFINED
import time
METHOD = []
class Screen:
"""
Representation of `screen` object from ZeroSeg library.
"""
def __init_... | 25.628571 | 82 | 0.540691 |
f76a9e25e65c28dd22fe201da585414be6c849b9 | 1,828 | py | Python | tests/agent/test_polynomial_model.py | iryzhkov/stock-trading-backend | 7161026b7b4deb78a934b66550c85a27c6b32933 | [
"MIT"
] | 1 | 2021-01-27T18:24:02.000Z | 2021-01-27T18:24:02.000Z | tests/agent/test_polynomial_model.py | iryzhkov/stock-trading-backend | 7161026b7b4deb78a934b66550c85a27c6b32933 | [
"MIT"
] | null | null | null | tests/agent/test_polynomial_model.py | iryzhkov/stock-trading-backend | 7161026b7b4deb78a934b66550c85a27c6b32933 | [
"MIT"
] | null | null | null | """Unit tests for PolynomialModel class
"""
import os
import unittest
import pandas as pd
from stock_trading_backend.agent import PolynomialModel
class TestPolynomialModel(unittest.TestCase):
"""Unit tests for PolynomialModel class.
"""
def test_initializes(self):
"""Checks if model initializes ... | 35.153846 | 96 | 0.615427 |
f76aa1d9621e88225dce18778f5a2cd7f4fce0cc | 10,077 | py | Python | obsolete/reports/pipeline_capseq/trackers/macs_shared_intervals.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 11 | 2018-09-07T11:33:23.000Z | 2022-01-07T12:16:11.000Z | obsolete/reports/pipeline_capseq/trackers/macs_shared_intervals.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 102 | 2018-03-22T15:35:26.000Z | 2022-03-23T17:46:16.000Z | obsolete/reports/pipeline_capseq/trackers/macs_shared_intervals.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 7 | 2018-06-11T15:01:41.000Z | 2020-03-31T09:29:33.000Z | import os
import sys
import re
import types
import itertools
import matplotlib.pyplot as plt
import numpy
import scipy.stats
import numpy.ma
import Stats
import Histogram
from cgatReport.Tracker import *
from cpgReport import *
##########################################################################
class SharedI... | 37.741573 | 126 | 0.51682 |
f76addef04364b01d3fa2c09b3aa617c717d940d | 1,827 | py | Python | unittests/test_ui_helpers.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 10 | 2016-12-16T00:05:58.000Z | 2018-10-30T17:48:25.000Z | unittests/test_ui_helpers.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 40 | 2017-01-04T23:07:05.000Z | 2018-04-16T19:52:02.000Z | unittests/test_ui_helpers.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 23 | 2016-12-30T05:03:53.000Z | 2020-04-01T08:40:24.000Z | # coding=utf-8
# Copyright (c) 2011 - 2017, Intel Corporation.
#
# 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 applic... | 33.218182 | 98 | 0.746579 |
f76ae73e89dce3c5941fed39652c2ad93ec2e096 | 6,054 | py | Python | simplebgc/command_names.py | maiermic/robot-cameraman | afe441cf1677322062da77aa782a08f10440fcc7 | [
"MIT"
] | 7 | 2019-11-17T13:18:07.000Z | 2022-03-13T04:14:15.000Z | simplebgc/command_names.py | maiermic/robot-cameraman | afe441cf1677322062da77aa782a08f10440fcc7 | [
"MIT"
] | 14 | 2021-02-03T16:21:21.000Z | 2022-03-11T23:57:48.000Z | simplebgc/command_names.py | maiermic/robot-cameraman | afe441cf1677322062da77aa782a08f10440fcc7 | [
"MIT"
] | 2 | 2021-04-21T21:22:49.000Z | 2021-05-28T17:39:13.000Z | from typing import Optional
from simplebgc.command_ids import *
INCOMING_COMMAND_NAMES = {
CMD_BOARD_INFO: 'CMD_BOARD_INFO',
CMD_BOARD_INFO_3: 'CMD_BOARD_INFO_3',
CMD_READ_PARAMS_3: 'CMD_READ_PARAMS_3',
CMD_READ_PARAMS_EXT: 'CMD_READ_PARAMS_EXT',
CMD_READ_PARAMS_EXT2: 'CMD_READ_PARAMS_EXT2',
C... | 41.183673 | 71 | 0.780806 |
f76ae7a1a52374b4e4c42f47fcd617945cfefdec | 4,385 | py | Python | src/mbed_tools/cli/build.py | ladislas/mbed-tools | 2ab99a15a38704574cd1e379ad4e09dd994db49c | [
"Apache-2.0"
] | null | null | null | src/mbed_tools/cli/build.py | ladislas/mbed-tools | 2ab99a15a38704574cd1e379ad4e09dd994db49c | [
"Apache-2.0"
] | null | null | null | src/mbed_tools/cli/build.py | ladislas/mbed-tools | 2ab99a15a38704574cd1e379ad4e09dd994db49c | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2020 Arm Mbed. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
"""Command to build/compile an Mbed project using CMake."""
import os
import pathlib
import shutil
import click
from mbed_tools.build import build_project, generate_build_system, generate_config, flash_binary
from mbed_tools... | 38.130435 | 120 | 0.693273 |
f76af01402c84679e4cd7f2bf52f632e7cb9898c | 2,870 | py | Python | contrib/avro/tests/python/pants_test/contrib/avro/tasks/test_avro_gen.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | contrib/avro/tests/python/pants_test/contrib/avro/tasks/test_avro_gen.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | contrib/avro/tests/python/pants_test/contrib/avro/tasks/test_avro_gen.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from textwrap import dedent
from pants.build_graph.build_file_aliases import BuildFileAl... | 32.613636 | 107 | 0.690592 |
f76b03664b94f1df49f1b8557993ecf73c280f01 | 254 | py | Python | pyror/utils.py | sckott/pyror | e50f71cf668110844ecd74e5451cd88c2298fd3c | [
"MIT"
] | 2 | 2021-12-15T16:15:07.000Z | 2021-12-24T18:09:05.000Z | pyror/utils.py | sckott/pyror | e50f71cf668110844ecd74e5451cd88c2298fd3c | [
"MIT"
] | null | null | null | pyror/utils.py | sckott/pyror | e50f71cf668110844ecd74e5451cd88c2298fd3c | [
"MIT"
] | null | null | null | def parse_ids(d):
vars = ["id", "name", "links"]
z = {v: d[v] for v in vars}
z["grid_id"] = d["external_ids"]["GRID"]["preferred"]
z["link"] = None
if len(z["links"]):
z["link"] = z["links"][0]
z.pop("links")
return z
| 25.4 | 57 | 0.488189 |
f76b46803457256da0f70e1dafb45e853c8d7f42 | 3,785 | py | Python | More/E02_Flat/E12_TextSize.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-06-20T22:01:23.000Z | 2021-08-06T04:39:50.000Z | More/E02_Flat/E12_TextSize.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-05-17T09:32:27.000Z | 2021-03-15T19:45:52.000Z | More/E02_Flat/E12_TextSize.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 2 | 2021-02-25T19:07:45.000Z | 2022-01-09T21:14:06.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2017 Thom Janssen <https://github.com/thomgb>
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# Supporting Flat, xxyxyz.org/flat
# -----------------------------------------------------------------------------
#
# E... | 35.046296 | 86 | 0.721532 |
f76b7ea404c80b2efbd4605d73fff2789e56b96d | 6,440 | py | Python | tests/release_test.py | shouldsee/cathpy | 5f7fa1322434b2d254f0158c5840f029b12dbafe | [
"MIT"
] | 7 | 2019-04-15T19:18:44.000Z | 2022-02-07T20:43:45.000Z | tests/release_test.py | shouldsee/cathpy | 5f7fa1322434b2d254f0158c5840f029b12dbafe | [
"MIT"
] | 14 | 2019-04-24T11:47:38.000Z | 2021-06-09T08:43:14.000Z | tests/release_test.py | shouldsee/cathpy | 5f7fa1322434b2d254f0158c5840f029b12dbafe | [
"MIT"
] | 4 | 2019-04-15T16:32:12.000Z | 2021-03-05T02:54:51.000Z | import difflib
import filecmp
import logging
from random import shuffle
import os
import tempfile
from cathpy.core.release import (
CathDomainList, CathNamesList, CathDomall,
CathDomainListEntry, CathDomallEntry, )
from . import testutils
LOG = logging.getLogger(__name__)
def cmp_file_contents(f1, f2, rstr... | 35.777778 | 114 | 0.612112 |
f76b874b3d8d6f4615dcff0240b5324571cbdb34 | 2,421 | py | Python | nova/api/openstack/compute/image_size.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2016-04-28T16:20:38.000Z | 2021-04-25T11:19:03.000Z | nova/api/openstack/compute/image_size.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/image_size.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2020-04-08T20:24:45.000Z | 2020-10-05T19:02:13.000Z | # Copyright 2013 Rackspace Hosting
# 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 require... | 35.086957 | 78 | 0.664188 |
f76b876bb98483bf9ebfa2dd86b540870ca32ae4 | 2,970 | py | Python | ngsutils/fastq/tile.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 57 | 2015-03-09T01:26:45.000Z | 2022-02-22T07:26:01.000Z | ngsutils/fastq/tile.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 33 | 2015-02-03T23:24:46.000Z | 2022-03-16T20:08:10.000Z | ngsutils/fastq/tile.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 33 | 2015-01-18T16:47:47.000Z | 2022-02-22T07:28:09.000Z | #!/usr/bin/env python
## category General
## desc Splits long FASTQ reads into smaller (tiled) chunks
'''
For each read in a FASTQ file, split it into smaller (overlapping) chunks.
Fragments are defined by their length and offset. For example, if the length
is 35 and the offset is 10, sub-reads will be 1->35, 11->45, 2... | 25.826087 | 108 | 0.556229 |
f76b8872041317052b828349b8676f8291d948a9 | 717 | py | Python | Examples/ultrassonic_thread_HC_SR04.py | BosonsHiggs/arduPython | 77114f70f5338109be1a440f8b35f833dc6bba1a | [
"MIT"
] | null | null | null | Examples/ultrassonic_thread_HC_SR04.py | BosonsHiggs/arduPython | 77114f70f5338109be1a440f8b35f833dc6bba1a | [
"MIT"
] | null | null | null | Examples/ultrassonic_thread_HC_SR04.py | BosonsHiggs/arduPython | 77114f70f5338109be1a440f8b35f833dc6bba1a | [
"MIT"
] | 1 | 2022-01-05T00:01:46.000Z | 2022-01-05T00:01:46.000Z | from threading import Thread
from pyfirmata import Arduino, pyfirmata, util
from pyfirmata.util import ping_time_to_distance
import time
### Start of pin configuration
board = Arduino() # or Arduino(port) define board
print("Communication successfully started!")
it = util.Iterator(board)
it.start()
sonarEcho = board... | 22.40625 | 70 | 0.736402 |
f76bd294fae0619751a2773d8ea522cec7ed752e | 2,748 | py | Python | archive/nexus-api-v2/Database/AGILE/Models/__init__.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/Database/AGILE/Models/__init__.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/Database/AGILE/Models/__init__.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | 1 | 2022-01-03T05:33:15.000Z | 2022-01-03T05:33:15.000Z | #!/usr/bin/env python3
# -*- Coding: UTF-8 -*- #
# -*- System: Linux -*- #
# -*- Usage: *.py -*- #
# Owner: Jacob B. Sanders
# Source: code.cloud-technology.io
# License: BSD 2-Clause License
"""
...
"""
# =============================================================================
# Standard Library
# ===... | 26.171429 | 79 | 0.456332 |
f76bdb60235f8b7b014972c2244610c34c36244d | 1,309 | py | Python | documentstore_migracao/utils/extract_isis.py | joffilyfe/document-store-migracao | b5125b7aedec56f0e8787900bdfd124aaf65e3e3 | [
"BSD-2-Clause"
] | null | null | null | documentstore_migracao/utils/extract_isis.py | joffilyfe/document-store-migracao | b5125b7aedec56f0e8787900bdfd124aaf65e3e3 | [
"BSD-2-Clause"
] | 14 | 2019-03-13T12:19:12.000Z | 2019-03-19T17:37:08.000Z | documentstore_migracao/utils/extract_isis.py | joffilyfe/document-store-migracao | b5125b7aedec56f0e8787900bdfd124aaf65e3e3 | [
"BSD-2-Clause"
] | 3 | 2019-03-12T18:55:55.000Z | 2019-03-20T18:38:02.000Z | import os
import logging
import shlex
import subprocess
from documentstore_migracao import config, exceptions
logger = logging.getLogger(__name__)
ISIS2JSON_PATH = "%s/documentstore_migracao/utils/isis2json/isis2json.py" % (
config.BASE_PATH
)
def create_output_dir(path):
output_dir = "/".join(path.split("... | 27.270833 | 82 | 0.652406 |
f76be302e883e9c77a2704e4f6e350157aa438a9 | 471 | py | Python | app/core/migrations/0003_user_date_of_birth.py | neomodular/recipe-app-api | 43ffa6258f08e3685f3921d1314fdd90a946bb40 | [
"MIT"
] | null | null | null | app/core/migrations/0003_user_date_of_birth.py | neomodular/recipe-app-api | 43ffa6258f08e3685f3921d1314fdd90a946bb40 | [
"MIT"
] | null | null | null | app/core/migrations/0003_user_date_of_birth.py | neomodular/recipe-app-api | 43ffa6258f08e3685f3921d1314fdd90a946bb40 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-05-03 03:55
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('core', '0002_user_last_name'),
]
operations = [
migrations.AddField(
model_name='user',
... | 22.428571 | 74 | 0.624204 |
f76c4398c22868754722b1040e9359ef9fbd49e9 | 1,871 | py | Python | hs_core/tests/api/rest/test_custom_scimeta.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_core/tests/api/rest/test_custom_scimeta.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_core/tests/api/rest/test_custom_scimeta.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | from rest_framework import status
from hs_core.hydroshare import resource
from .base import HSRESTTestCase
class TestCustomScimetaEndpoint(HSRESTTestCase):
def setUp(self):
super(TestCustomScimetaEndpoint, self).setUp()
self.rtype = 'GenericResource'
self.title = 'My Test resource'
... | 35.980769 | 90 | 0.644041 |
f76c471ca99f9342435ae01def537f7c480334fb | 188 | py | Python | tests/apps/foobwp/config/settings.py | blazelibs/blazeweb | b120a6a2e38c8b53da2b73443ff242e2d1438053 | [
"BSD-3-Clause"
] | null | null | null | tests/apps/foobwp/config/settings.py | blazelibs/blazeweb | b120a6a2e38c8b53da2b73443ff242e2d1438053 | [
"BSD-3-Clause"
] | 6 | 2016-11-01T18:42:34.000Z | 2020-11-16T16:52:14.000Z | tests/apps/foobwp/config/settings.py | blazelibs/blazeweb | b120a6a2e38c8b53da2b73443ff242e2d1438053 | [
"BSD-3-Clause"
] | 1 | 2020-01-22T18:20:46.000Z | 2020-01-22T18:20:46.000Z | from blazeweb.config import ComponentSettings
class Settings(ComponentSettings):
def init(self):
self.add_route('/foo', 'foo:UserUpdate')
self.for_me.fooattr = True
| 20.888889 | 48 | 0.702128 |
f76c6346cd739fa7d37cea8c8351b042a6ff0db9 | 1,080 | py | Python | setup.py | heslegrave/connectedcars-python | 29dca7bb33d549dbb4803688032ae3a13b932eba | [
"MIT"
] | 1 | 2021-04-02T17:25:20.000Z | 2021-04-02T17:25:20.000Z | setup.py | heslegrave/connectedcars-python | 29dca7bb33d549dbb4803688032ae3a13b932eba | [
"MIT"
] | null | null | null | setup.py | heslegrave/connectedcars-python | 29dca7bb33d549dbb4803688032ae3a13b932eba | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup
with open('README.md', 'r') as file:
long_description = file.read()
with open('requirements.txt') as file:
install_requires = [line.rstrip('\r\n') for line in file]
setup(
name = 'connectedcars',
packages = ['connectedcars'],
version = '0.1.3',
licen... | 36 | 170 | 0.700926 |
f76c84d38b7a4d9df48ec05bbb14f378e145ce58 | 7,785 | py | Python | tools/redfish-schema/generate_from_schema.py | jenningsloy318/gofish | 3dd54eaf633b27b447e1e13e7409a8e16037f788 | [
"Apache-2.0"
] | null | null | null | tools/redfish-schema/generate_from_schema.py | jenningsloy318/gofish | 3dd54eaf633b27b447e1e13e7409a8e16037f788 | [
"Apache-2.0"
] | null | null | null | tools/redfish-schema/generate_from_schema.py | jenningsloy318/gofish | 3dd54eaf633b27b447e1e13e7409a8e16037f788 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# 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 wr... | 31.26506 | 108 | 0.569814 |
f76cbcb22efe4781bbabfef60fd776d57df55325 | 22,670 | py | Python | src/sage/geometry/hyperplane_arrangement/hyperplane.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 3 | 2016-06-19T14:48:31.000Z | 2022-01-28T08:46:01.000Z | src/sage/geometry/hyperplane_arrangement/hyperplane.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/geometry/hyperplane_arrangement/hyperplane.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | 7 | 2021-11-08T10:01:59.000Z | 2022-03-03T11:25:52.000Z | r"""
Hyperplanes
.. NOTE::
If you want to learn about Sage's hyperplane arrangements then you
should start with
:mod:`sage.geometry.hyperplane_arrangement.arrangement`. This
module is used to represent the individual hyperplanes, but you
should never construct the classes from this module directly... | 29.711664 | 98 | 0.539524 |
f76ce20b3e76bca848bc6d42832f90afd289683a | 1,450 | py | Python | plugins/aea-cli-ipfs/aea_cli_ipfs/exceptions.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | plugins/aea-cli-ipfs/aea_cli_ipfs/exceptions.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | plugins/aea-cli-ipfs/aea_cli_ipfs/exceptions.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2021-2022 Valory AG
# Copyright 2018-2020 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.... | 29.591837 | 80 | 0.644828 |
f76d0c53f680dc5c347158dd74800d5247414e98 | 12,308 | py | Python | cgi-bin/hy/models.py | kloimhardt/bb-web | 043493450c73620bc277cb0f93e08b897d45fbf5 | [
"MIT"
] | 67 | 2020-09-09T14:48:53.000Z | 2022-03-17T02:00:24.000Z | cgi-bin/hy/models.py | kloimhardt/bb-web | 043493450c73620bc277cb0f93e08b897d45fbf5 | [
"MIT"
] | 1 | 2020-09-29T07:19:48.000Z | 2020-09-29T13:39:53.000Z | cgi-bin/hy/models.py | kloimhardt/bb-web | 043493450c73620bc277cb0f93e08b897d45fbf5 | [
"MIT"
] | null | null | null | # Copyright 2021 the authors.
# This file is part of Hy, which is free software licensed under the Expat
# license. See the LICENSE.
from __future__ import unicode_literals
from contextlib import contextmanager
from math import isnan, isinf
from hy import _initialize_env_var
from hy.errors import HyWrapperError
from f... | 28.757009 | 119 | 0.59766 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.