hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d57e20647da81b0ea97e3b6ddf0c1e7911b5db6d | 4,094 | py | Python | space.py | kourgeorge/life | 5162722e9bd53e5e84d704852139802bf99b46ce | [
"BSD-2-Clause"
] | 24 | 2018-12-04T13:35:54.000Z | 2022-02-28T05:52:38.000Z | space.py | kourgeorge/life | 5162722e9bd53e5e84d704852139802bf99b46ce | [
"BSD-2-Clause"
] | 5 | 2018-12-09T14:41:21.000Z | 2020-08-28T10:35:56.000Z | space.py | kourgeorge/life | 5162722e9bd53e5e84d704852139802bf99b46ce | [
"BSD-2-Clause"
] | 3 | 2020-04-18T03:29:19.000Z | 2020-08-20T15:03:35.000Z | __author__ = 'gkour'
from cell import Cell
import numpy as np
from itertools import chain
class Space:
def __init__(self, space_size):
self._space_size = space_size
self._grid = []
for i in range(space_size):
self._grid = [[Cell((i, j)) for j in range(self._space_s... | 37.907407 | 120 | 0.624328 |
65ff082c242a54d9d1ce0365fb35e00f6cca015c | 45,653 | py | Python | opengl/gl/raw/gl_4_3.py | SilentPenguin/OpenGL.py | dd16bf7ea2fa20a7ea489e711a5df20d604c34dc | [
"Apache-2.0"
] | 1 | 2016-11-09T06:11:24.000Z | 2016-11-09T06:11:24.000Z | opengl/gl/raw/gl_4_3.py | SilentPenguin/OpenGL.py | dd16bf7ea2fa20a7ea489e711a5df20d604c34dc | [
"Apache-2.0"
] | 3 | 2016-11-09T06:21:08.000Z | 2016-11-18T15:17:22.000Z | opengl/gl/raw/gl_4_3.py | SilentPenguin/OpenGL.py | dd16bf7ea2fa20a7ea489e711a5df20d604c34dc | [
"Apache-2.0"
] | null | null | null | #BEWARE: automatically generated code
#This code was generated by /generate/__main__.py
from opengl.gl.raw.bindings import *
NUM_SHADING_LANGUAGE_VERSIONS = 0x82E9
VERTEX_ATTRIB_ARRAY_LONG = 0x874E
COMPRESSED_RGB8_ETC2 = 0x9274
COMPRESSED_SRGB8_ETC2 = 0x9275
COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276
COMPRESSE... | 39.732811 | 151 | 0.7412 |
8a7d81f9fd3f30534398ff05abd7412a6f78b709 | 4,035 | py | Python | MarkReport/MarkReport.py | dedukun/MarkReport | 2d92c87a69db5868d14b7a59e815b9ee72d439f9 | [
"MIT"
] | null | null | null | MarkReport/MarkReport.py | dedukun/MarkReport | 2d92c87a69db5868d14b7a59e815b9ee72d439f9 | [
"MIT"
] | null | null | null | MarkReport/MarkReport.py | dedukun/MarkReport | 2d92c87a69db5868d14b7a59e815b9ee72d439f9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Command line flags
import os
import glob
import re
import pyinotify
import subprocess
from sys import stdout, stderr
from time import time, sleep
from tempfile import gettempdir
from distutils.dir_util import copy_tree
from shutil import copyfile
from weasyprint import HTML
import argparse
p... | 27.827586 | 105 | 0.662949 |
efca9e6f2e6b4e27221c8a6c5a0028b7a586d7e2 | 16,097 | py | Python | sdk/python/pulumi_aws/ec2/ami.py | johnktims/pulumi-aws | c838bc79043f5376c66fc66275a1e012edd3ab7d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/ec2/ami.py | johnktims/pulumi-aws | c838bc79043f5376c66fc66275a1e012edd3ab7d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/ec2/ami.py | johnktims/pulumi-aws | c838bc79043f5376c66fc66275a1e012edd3ab7d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Ami(pu... | 58.322464 | 357 | 0.68373 |
3dbf1841410630bd6fac85dc89f71eeb66d73349 | 11,039 | py | Python | lemur/tests/conf.py | dck25/lemur | 32dda00f9fb4b72091bb3f4e7be1d262ea5fd857 | [
"Apache-2.0"
] | 1,656 | 2015-09-20T03:12:28.000Z | 2022-03-29T18:00:54.000Z | lemur/tests/conf.py | dck25/lemur | 32dda00f9fb4b72091bb3f4e7be1d262ea5fd857 | [
"Apache-2.0"
] | 3,017 | 2015-09-18T23:15:24.000Z | 2022-03-30T22:40:02.000Z | lemur/tests/conf.py | hosseinsh/lemur | fbf50b365cb0f7a0e9cae31dec1b853b958c45bb | [
"Apache-2.0"
] | 401 | 2015-09-18T23:02:18.000Z | 2022-02-20T16:13:14.000Z | # This is just Python which means you can inherit and tweak settings
import base64
import os
import random
import string
_basedir = os.path.abspath(os.path.dirname(__file__))
# generate random secrets for unittest
def get_random_secret(length):
secret_key = ''.join(random.choice(string.ascii_uppercase) for x in... | 41.973384 | 110 | 0.875079 |
94ebc71450e564b8f4a69951afee87f0f3a93673 | 405 | py | Python | experiments/fdtd-2d/tmp_files/8010.py | LoopTilingBenchmark/benchmark | 52a3d2e70216552a498fd91de02a2fa9cb62122c | [
"BSD-2-Clause"
] | null | null | null | experiments/fdtd-2d/tmp_files/8010.py | LoopTilingBenchmark/benchmark | 52a3d2e70216552a498fd91de02a2fa9cb62122c | [
"BSD-2-Clause"
] | null | null | null | experiments/fdtd-2d/tmp_files/8010.py | LoopTilingBenchmark/benchmark | 52a3d2e70216552a498fd91de02a2fa9cb62122c | [
"BSD-2-Clause"
] | null | null | null | from chill import *
source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c')
destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/fdtd-2d/tmp_files/8010.c')
procedure('kernel_fdtd_2d')
loop(0)
known(' nx > 1 ')
known(' ny > 1 ')
ti... | 22.5 | 116 | 0.716049 |
f72d894c5dd643cc66f3cf18f2330569c6a1b5c9 | 6,672 | py | Python | bindings/python/ensmallen_graph/datasets/string/pantoearwandensis.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/pantoearwandensis.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/pantoearwandensis.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | """
This file offers the methods to automatically retrieve the graph Pantoea rwandensis.
The graph is automatically retrieved from the STRING repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Datetime: 2021-02-... | 34.931937 | 223 | 0.702938 |
f46add89112802971419bce983a111ed3621f685 | 1,297 | py | Python | test/cpython/test_xmllib.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:28:45.000Z | 2020-02-06T14:28:45.000Z | test/cpython/test_xmllib.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | test/cpython/test_xmllib.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:29:00.000Z | 2020-02-06T14:29:00.000Z | '''Test module to thest the xmllib module.
Sjoerd Mullender
'''
testdoc = """\
<?xml version="1.0" encoding="UTF-8" standalone='yes' ?>
<!-- comments aren't allowed before the <?xml?> tag,
but they are allowed before the <!DOCTYPE> tag -->
<?processing instructions are allowed in the same places as comments ?>... | 26.469388 | 71 | 0.643793 |
1849d6bbbc33afae0f34ffbeba3eb895383fbf85 | 1,040 | py | Python | web/judge/migrations/0004_auto_20160225_2110.py | jc-hiroto/esoe-oop-judge-github | 76e9ba90001d6d3eeee64e9209c50586c5aa766b | [
"MIT"
] | 1 | 2020-03-15T05:47:32.000Z | 2020-03-15T05:47:32.000Z | web/judge/migrations/0004_auto_20160225_2110.py | jc-hiroto/esoe-oop-judge-github | 76e9ba90001d6d3eeee64e9209c50586c5aa766b | [
"MIT"
] | 3 | 2020-03-15T06:17:12.000Z | 2021-06-10T22:39:28.000Z | web/judge/migrations/0004_auto_20160225_2110.py | jc-hiroto/esoe-oop-judge-github | 76e9ba90001d6d3eeee64e9209c50586c5aa766b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-25 21:10
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('judge', '0003_auto_20160223_2222'),
]
operations = [
migrations.AlterField(
... | 33.548387 | 306 | 0.584615 |
70e24749170e918510099ad864529e0ceda16cae | 8,194 | py | Python | vega/trainer/callbacks/metrics_evaluator.py | jie311/vega | 1bba6100ead802697e691403b951e6652a99ccae | [
"MIT"
] | null | null | null | vega/trainer/callbacks/metrics_evaluator.py | jie311/vega | 1bba6100ead802697e691403b951e6652a99ccae | [
"MIT"
] | null | null | null | vega/trainer/callbacks/metrics_evaluator.py | jie311/vega | 1bba6100ead802697e691403b951e6652a99ccae | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the ... | 45.270718 | 92 | 0.631316 |
de46ca6dd5ff959d02ea01656a89eb1105dd5065 | 2,193 | py | Python | pcbs/kicad_db/kicad_StepUp_tools/kicadStepUpMod/Init.py | Roboy/bldc_testbed | a52860d40627feb2c4b40d96fb973122e41c464f | [
"BSD-3-Clause"
] | 2 | 2019-11-27T03:54:12.000Z | 2020-07-19T09:02:06.000Z | pcbs/kicad_db/kicad_StepUp_tools/kicadStepUpMod/Init.py | Roboy/bldc_testbed | a52860d40627feb2c4b40d96fb973122e41c464f | [
"BSD-3-Clause"
] | null | null | null | pcbs/kicad_db/kicad_StepUp_tools/kicadStepUpMod/Init.py | Roboy/bldc_testbed | a52860d40627feb2c4b40d96fb973122e41c464f | [
"BSD-3-Clause"
] | 2 | 2020-09-30T13:40:09.000Z | 2020-10-14T21:35:23.000Z | # Idf init module
# (c) 2003 Juergen Riegel
#
# Gathering all the information to start FreeCAD
# This is the second one of three init scripts, the third one
# runs when the gui is up
#***************************************************************************
#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 ... | 57.710526 | 106 | 0.45098 |
480e0eeb14fec032c8baf838bf916ca87ca12ac0 | 1,082 | py | Python | setup.py | ohahlev/ahlev-django-location | 7d6060ab7b21509f53790f5863b596f2b95c286a | [
"BSD-3-Clause"
] | null | null | null | setup.py | ohahlev/ahlev-django-location | 7d6060ab7b21509f53790f5863b596f2b95c286a | [
"BSD-3-Clause"
] | null | null | null | setup.py | ohahlev/ahlev-django-location | 7d6060ab7b21509f53790f5863b596f2b95c286a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import location
setup(
name='ahlev-django-location',
version=location.__version__,
description='location app using django framework',
long_description='location app using django framework',
long_description_content_type='text/x-rst... | 32.787879 | 90 | 0.666359 |
74571d6bb03c639a683afd4b035d536ff41ec503 | 3,929 | py | Python | bitmovin_api_sdk/models/ad_analytics_greater_than_or_equal_filter.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 11 | 2019-07-03T10:41:16.000Z | 2022-02-25T21:48:06.000Z | bitmovin_api_sdk/models/ad_analytics_greater_than_or_equal_filter.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 8 | 2019-11-23T00:01:25.000Z | 2021-04-29T12:30:31.000Z | bitmovin_api_sdk/models/ad_analytics_greater_than_or_equal_filter.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 13 | 2020-01-02T14:58:18.000Z | 2022-03-26T12:10:30.000Z | # coding: utf-8
from enum import Enum
from six import string_types, iteritems
from bitmovin_api_sdk.common.poscheck import poscheck_model
from bitmovin_api_sdk.models.ad_analytics_abstract_filter import AdAnalyticsAbstractFilter
from bitmovin_api_sdk.models.ad_analytics_attribute import AdAnalyticsAttribute
import ppr... | 32.471074 | 164 | 0.62255 |
738d8af85050022696ea7bea03e265239930ec89 | 2,561 | py | Python | hprof/_special_cases.py | SonyMobile/py-hyprof | 932f559640da450c39966c35072464ce4b003d1a | [
"MIT"
] | 11 | 2020-04-09T05:58:20.000Z | 2022-02-27T16:59:19.000Z | hprof/_special_cases.py | SonyMobile/py-hyprof | 932f559640da450c39966c35072464ce4b003d1a | [
"MIT"
] | null | null | null | hprof/_special_cases.py | SonyMobile/py-hyprof | 932f559640da450c39966c35072464ce4b003d1a | [
"MIT"
] | 3 | 2020-04-15T07:10:16.000Z | 2021-12-09T08:47:32.000Z | # Copyright (C) 2020 Sony Mobile Communications Inc.
# Licensed under the LICENSE.
'''
This module contains code for handling some Java classes in specific ways, e.g.
making str() return the actual text of a java.lang.String.
'''
import codecs
def _jstr_to_str(self):
''' get the string contents of a java.lang.Strin... | 34.146667 | 103 | 0.705974 |
ce38b23f0def48d6b313dbf6dc93e8db0579e153 | 5,470 | py | Python | train_cnn.py | damaha/iasi-atmosphere | e54ef3f0ca57afdaff43a6c6915c7cabbd430ee4 | [
"MIT"
] | null | null | null | train_cnn.py | damaha/iasi-atmosphere | e54ef3f0ca57afdaff43a6c6915c7cabbd430ee4 | [
"MIT"
] | null | null | null | train_cnn.py | damaha/iasi-atmosphere | e54ef3f0ca57afdaff43a6c6915c7cabbd430ee4 | [
"MIT"
] | null | null | null | import json, os
import numpy as np
import pandas as pd
from data_load import get_datafiles
from generators import iasi_generator
from models import *
from keras.callbacks import ModelCheckpoint, TensorBoard, CSVLogger, ReduceLROnPlateau
from keras.utils import multi_gpu_model
from keras.models import model_from_json
... | 41.755725 | 145 | 0.568556 |
b443357f110ebd075f6ea689480bb84b32219729 | 3,733 | py | Python | utils/scripts/c64/C64Charset.py | xahmol/8bit-Unity | b4f3bee00e012ca1755afba550a5270dce0a1054 | [
"BSD-2-Clause"
] | 42 | 2018-12-12T01:00:59.000Z | 2022-03-27T07:32:29.000Z | utils/scripts/c64/C64Charset.py | xahmol/8bit-Unity | b4f3bee00e012ca1755afba550a5270dce0a1054 | [
"BSD-2-Clause"
] | 13 | 2020-11-06T13:50:45.000Z | 2022-01-25T07:17:37.000Z | utils/scripts/c64/C64Charset.py | xahmol/8bit-Unity | b4f3bee00e012ca1755afba550a5270dce0a1054 | [
"BSD-2-Clause"
] | 8 | 2020-11-14T04:30:26.000Z | 2021-01-16T17:55:19.000Z | """
* Copyright (c) 2018 Anthony Beaucamp.
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
* the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* in... | 35.552381 | 115 | 0.574873 |
5854eb450a0117586b28899963e92f6b24d51f1d | 7,956 | py | Python | app/grandchallenge/core/views.py | kant/grand-challenge.org | 608266ae3376448fc56c3bb4e34138ab81a45e2a | [
"Apache-2.0"
] | null | null | null | app/grandchallenge/core/views.py | kant/grand-challenge.org | 608266ae3376448fc56c3bb4e34138ab81a45e2a | [
"Apache-2.0"
] | null | null | null | app/grandchallenge/core/views.py | kant/grand-challenge.org | 608266ae3376448fc56c3bb4e34138ab81a45e2a | [
"Apache-2.0"
] | null | null | null | from django.conf import settings
from django.core.files.storage import DefaultStorage
from django.http import Http404
from django.shortcuts import render
from django.template import Template, TemplateSyntaxError, RequestContext
from django.utils._os import safe_join
from grandchallenge.challenges.models import Challen... | 34 | 138 | 0.620161 |
6658ed3ef1023a8e42b737c37eff5491771e23b9 | 1,081 | py | Python | Curso_Em_Video_Python/ex036.py | ThallesTorres/Curso_Em_Video_Python | 95ffbff5a03f11fee41df746604dfe435f385a3b | [
"MIT"
] | null | null | null | Curso_Em_Video_Python/ex036.py | ThallesTorres/Curso_Em_Video_Python | 95ffbff5a03f11fee41df746604dfe435f385a3b | [
"MIT"
] | null | null | null | Curso_Em_Video_Python/ex036.py | ThallesTorres/Curso_Em_Video_Python | 95ffbff5a03f11fee41df746604dfe435f385a3b | [
"MIT"
] | null | null | null | # Ex: 036 - Escreva um progrma para aprovar o empréstimo bancário para a compra
# de uma casa. O programa vai perguntar o valor da casa, o salário do comprador
# e em quantos anos ele vai pagar. Calcule o valor da prestação mensal, dabendo
# que eka não pode exceder 30% do salário ou então o empréstimo será negad... | 34.870968 | 104 | 0.580944 |
c3432f85181dd70d2d23e9283aa3fe38f031b3ac | 290 | py | Python | CS Practical/A21.py | adityaruplaha/adityaruplaha-school-projects | b19d06f356fafdbe4189bade59d4a4d1ffec567f | [
"MIT"
] | null | null | null | CS Practical/A21.py | adityaruplaha/adityaruplaha-school-projects | b19d06f356fafdbe4189bade59d4a4d1ffec567f | [
"MIT"
] | null | null | null | CS Practical/A21.py | adityaruplaha/adityaruplaha-school-projects | b19d06f356fafdbe4189bade59d4a4d1ffec567f | [
"MIT"
] | null | null | null | # Maximum of 3 no.s & sum of no equal no.s
print("Enter 3 no.s:")
a = float(input())
b = float(input())
c = float(input())
m = a
S = 0
L = [a, b, c]
for e in L:
if e > m:
m = e
if L.count(e) == 1:
S += e
print("Maximum:", m)
print("Sum of non-equal numbers:", S)
| 15.263158 | 42 | 0.506897 |
ea2dc0bab98cb4b1c1866b9525684e070969166c | 9,138 | py | Python | audio_to_midi/converter.py | surajpaib/audio-to-midi | a58c23b8b5b1083e9d993a1b666258d22c861986 | [
"MIT"
] | null | null | null | audio_to_midi/converter.py | surajpaib/audio-to-midi | a58c23b8b5b1083e9d993a1b666258d22c861986 | [
"MIT"
] | null | null | null | audio_to_midi/converter.py | surajpaib/audio-to-midi | a58c23b8b5b1083e9d993a1b666258d22c861986 | [
"MIT"
] | 1 | 2021-01-25T14:54:06.000Z | 2021-01-25T14:54:06.000Z | import cmath
import numpy
import math
from audio_to_midi import midi_writer, notes
class Converter(object):
"""
An object which takes in a list of audio samples and transforms
them into midi data which is written out to a .mid file.
"""
def __init__(
self,
samples=None,
... | 33.472527 | 88 | 0.513789 |
3a1c276ca55878250d87fff12000e5c1f3562b56 | 4,711 | py | Python | calc.py | dokalanyi/Pascal-Interpreter | 1719eadc289cac28a1bb742e5990f0bd2e8efce0 | [
"MIT"
] | null | null | null | calc.py | dokalanyi/Pascal-Interpreter | 1719eadc289cac28a1bb742e5990f0bd2e8efce0 | [
"MIT"
] | null | null | null | calc.py | dokalanyi/Pascal-Interpreter | 1719eadc289cac28a1bb742e5990f0bd2e8efce0 | [
"MIT"
] | null | null | null | # Token types
#
# EOF (end-of-file) token is used to indicate that
# there is no more input left for lexical analysis
INTEGER, PLUS, MINUS, MUL, DIV, EOF = 'INTEGER', 'PLUS', 'MINUS', 'MUL', 'DIV', 'EOF'
class Token(object):
def __init__(self, type, value):
# token type: INTEGER, PLUS, or EOF
self.type = type
#... | 28.041667 | 182 | 0.683082 |
939c36ccf6618151f365d70182964ee06d8ac61e | 729 | py | Python | recursive_optimizer/__init__.py | yick2232/google-research | 99021ebda945e232abdcc592f2cea1375b3c84f7 | [
"Apache-2.0"
] | 11 | 2020-01-29T07:25:04.000Z | 2022-03-05T16:01:21.000Z | recursive_optimizer/__init__.py | RubensZimbres/google-research | 562c7c6ef959cb3cb382b1b660ccc45e8f5289c4 | [
"Apache-2.0"
] | 13 | 2020-01-28T22:19:53.000Z | 2022-02-10T00:39:26.000Z | recursive_optimizer/__init__.py | RubensZimbres/google-research | 562c7c6ef959cb3cb382b1b660ccc45e8f5289c4 | [
"Apache-2.0"
] | 2 | 2019-12-07T19:01:03.000Z | 2020-03-19T16:53:04.000Z | # coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# 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 applicab... | 40.5 | 74 | 0.76406 |
ce518a4cbeb47b5c82d369ead45612b3497b8a6f | 855 | py | Python | riberry/app/backends/impl/pool/tasks/external_task_receiver.py | srafehi/riberry | 2ffa48945264177c6cef88512c1bc80ca4bf1d5e | [
"MIT"
] | 2 | 2019-12-09T10:24:36.000Z | 2019-12-09T10:26:56.000Z | riberry/app/backends/impl/pool/tasks/external_task_receiver.py | srafehi/riberry | 2ffa48945264177c6cef88512c1bc80ca4bf1d5e | [
"MIT"
] | 2 | 2018-06-11T11:34:28.000Z | 2018-08-22T12:00:19.000Z | riberry/app/backends/impl/pool/tasks/external_task_receiver.py | srafehi/riberry | 2ffa48945264177c6cef88512c1bc80ca4bf1d5e | [
"MIT"
] | null | null | null | from typing import List
import riberry
from riberry.app import current_context as ctx
from ..task_queue import TaskQueue
def ready_external_tasks() -> List[riberry.model.job.JobExecutionExternalTask]:
return riberry.model.conn.query(
riberry.model.job.JobExecutionExternalTask
).filter_by(
sta... | 31.666667 | 79 | 0.690058 |
ad6fff3a54b188437bd925df50e52c3fa72b81d0 | 1,837 | py | Python | projects/data_generation/synthetic_multi_view_facial_image_generation/algorithm/Rotate_and_Render/models/networks/sync_batchnorm/scatter_gather.py | ESOGU-SRLAB/opendr | f2eb5a6d7a070d3534d470987c3abc69eec53905 | [
"Apache-2.0"
] | 217 | 2020-04-10T16:39:36.000Z | 2022-03-30T15:39:04.000Z | projects/data_generation/synthetic_multi_view_facial_image_generation/algorithm/Rotate_and_Render/models/networks/sync_batchnorm/scatter_gather.py | ESOGU-SRLAB/opendr | f2eb5a6d7a070d3534d470987c3abc69eec53905 | [
"Apache-2.0"
] | 46 | 2021-12-16T13:23:04.000Z | 2022-03-30T11:36:29.000Z | projects/data_generation/synthetic_multi_view_facial_image_generation/algorithm/Rotate_and_Render/models/networks/sync_batchnorm/scatter_gather.py | ESOGU-SRLAB/opendr | f2eb5a6d7a070d3534d470987c3abc69eec53905 | [
"Apache-2.0"
] | 29 | 2021-12-16T09:26:13.000Z | 2022-03-29T15:19:18.000Z | import torch
from torch.nn.parallel._functions import Scatter
def scatter(inputs, target_gpus, dim=0, chunk_size=None):
r"""
Slices tensors into approximately equal chunks and
distributes them across given GPUs. Duplicates
references to objects that are not tensors.
"""
def scatter_map(obj):
... | 40.822222 | 78 | 0.666848 |
476b947c306085d748a829bf44be6a10610b06f6 | 938 | py | Python | examples/redis/cache.py | PeterPZhang/open-box | 987f91edf0f502d678459f7cc50070cae34accd9 | [
"MIT"
] | null | null | null | examples/redis/cache.py | PeterPZhang/open-box | 987f91edf0f502d678459f7cc50070cae34accd9 | [
"MIT"
] | null | null | null | examples/redis/cache.py | PeterPZhang/open-box | 987f91edf0f502d678459f7cc50070cae34accd9 | [
"MIT"
] | null | null | null | from open_box.redis import get_redis_client
from open_box.redis.cache import WrapperCache
startup_nodes = [
{'host': '<host1>', 'port': '<port1>'},
{'host': '<host2>', 'port': '<port2>'},
{'host': '<host3>', 'port': '<port3>'},
]
rc = get_redis_client(startup_nodes)
cache = WrapperCache(rc)
def cache_con... | 30.258065 | 75 | 0.615139 |
705e5e75732ca7e8ec91e23fa2351c83b1eb9234 | 19,885 | py | Python | tensorflow/python/keras/layers/dense_attention.py | bubblebooy/tensorflow | 585de3969452255a1f8cd6d295b87a2e2d8298e9 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/layers/dense_attention.py | bubblebooy/tensorflow | 585de3969452255a1f8cd6d295b87a2e2d8298e9 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/layers/dense_attention.py | bubblebooy/tensorflow | 585de3969452255a1f8cd6d295b87a2e2d8298e9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.454365 | 112 | 0.687956 |
15044c9ff40d8ee69d3e66a461c632f30038d67f | 42,592 | py | Python | nion/ui/DrawingContext.py | dhauge/nionui | 7b86b70f9a3048b071684bb841963e02b492fdac | [
"Apache-2.0"
] | null | null | null | nion/ui/DrawingContext.py | dhauge/nionui | 7b86b70f9a3048b071684bb841963e02b492fdac | [
"Apache-2.0"
] | null | null | null | nion/ui/DrawingContext.py | dhauge/nionui | 7b86b70f9a3048b071684bb841963e02b492fdac | [
"Apache-2.0"
] | null | null | null | """
DrawingContext module contains classes related to drawing context.
DrawingContexts are able to be handled directly by the UI system or
produce javascript or svg to do the drawing.
"""
# standard libraries
import base64
import collections
from contextlib import contextmanager
import copy
import io
impo... | 43.684103 | 230 | 0.551183 |
e47554772e4cd7fe02f1fc31e4e1459b249a801f | 5,134 | py | Python | build_tools/precommit_checker.py | gabbar538/phani538 | dff4c48ede8cc813596a9660784fea181b787ee0 | [
"BSD-3-Clause"
] | 5 | 2017-06-19T02:03:11.000Z | 2019-05-13T06:27:57.000Z | build_tools/precommit_checker.py | gabbar538/phani538 | dff4c48ede8cc813596a9660784fea181b787ee0 | [
"BSD-3-Clause"
] | 60 | 2016-03-19T16:01:27.000Z | 2016-06-23T16:26:10.000Z | build_tools/precommit_checker.py | gabbar538/phani538 | dff4c48ede8cc813596a9660784fea181b787ee0 | [
"BSD-3-Clause"
] | 5 | 2017-06-14T08:06:46.000Z | 2019-05-13T06:28:28.000Z | #!/usr/local/fbcode/gcc-4.8.1-glibc-2.17-fb/bin/python2.7
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import commands
import subprocess
import sys
import re
import os
import time
#
# Simple logger
... | 25.798995 | 78 | 0.52688 |
dcd4e49bc12865f676c32b8621a702c29c0cda1a | 6,579 | py | Python | Server/src/virtualenv/Lib/site-packages/pip/basecommand.py | ppyordanov/HCI_4_Future_Cities | 4dc7dc59acccf30357bde66524c2d64c29908de8 | [
"MIT"
] | null | null | null | Server/src/virtualenv/Lib/site-packages/pip/basecommand.py | ppyordanov/HCI_4_Future_Cities | 4dc7dc59acccf30357bde66524c2d64c29908de8 | [
"MIT"
] | null | null | null | Server/src/virtualenv/Lib/site-packages/pip/basecommand.py | ppyordanov/HCI_4_Future_Cities | 4dc7dc59acccf30357bde66524c2d64c29908de8 | [
"MIT"
] | null | null | null | """Base Command class, and related routines"""
import os
import sys
import tempfile
import traceback
import time
import optparse
from pip import cmdoptions
from pip.locations import running_under_virtualenv
from pip.log import logger
from pip.download import PipSession
from pip.exceptions import (BadCommand, Installa... | 32.569307 | 86 | 0.599483 |
13b62d4511f4cc83a8c14532cd3a71cb9b3d69a0 | 3,720 | py | Python | tfx/components/example_gen/custom_executors/avro_component_test.py | rtg0795/tfx | 63c31b719896eef645df3850d0e6b946e44cd059 | [
"Apache-2.0"
] | 1 | 2022-03-29T23:06:54.000Z | 2022-03-29T23:06:54.000Z | tfx/components/example_gen/custom_executors/avro_component_test.py | rtg0795/tfx | 63c31b719896eef645df3850d0e6b946e44cd059 | [
"Apache-2.0"
] | null | null | null | tfx/components/example_gen/custom_executors/avro_component_test.py | rtg0795/tfx | 63c31b719896eef645df3850d0e6b946e44cd059 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC. 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 a... | 37.2 | 80 | 0.755914 |
edda9bbdebf1499633c9f39e9c2f8d54767542a8 | 3,164 | py | Python | supergnova.py | YiliangTracyZhang/SUPERGNOVA | a7f40c23a3e1a0ed7fefd5bed9ac55b8414a9e0f | [
"MIT"
] | 15 | 2020-05-11T01:10:47.000Z | 2022-01-24T07:53:20.000Z | supergnova.py | YiliangTracyZhang/SUPERGNOVA | a7f40c23a3e1a0ed7fefd5bed9ac55b8414a9e0f | [
"MIT"
] | 6 | 2020-05-11T00:22:01.000Z | 2021-09-08T12:32:09.000Z | supergnova.py | YiliangTracyZhang/SUPERGNOVA | a7f40c23a3e1a0ed7fefd5bed9ac55b8414a9e0f | [
"MIT"
] | 1 | 2020-09-07T15:26:42.000Z | 2020-09-07T15:26:42.000Z | #!/usr/bin/env python
'''
Local genetic correlation estimation
SUPERGNOVA
Created on 2020-5-4
Happy birthday PKU!
@author: Yiliang
'''
import argparse, os.path, sys
from subprocess import call
import multiprocessing
import pandas as pd
import numpy as np
from prep import prep
from ldsc_thin import ldscore
from her... | 33.305263 | 141 | 0.724399 |
017c03371cdbd061e19d38b5bb000475f49a7cad | 21 | py | Python | aliyun-python-sdk-nas/aliyunsdknas/__init__.py | DataDog/aliyun-openapi-python-sdk | 5cbee29bce6416dd62f61f0c3786b1af6ea0d84f | [
"Apache-2.0"
] | 1 | 2021-07-27T13:23:27.000Z | 2021-07-27T13:23:27.000Z | norminette/version.py | N0ich/norminette | a19fe6b057591ef3faca469c62d3454242ce3d77 | [
"MIT"
] | null | null | null | norminette/version.py | N0ich/norminette | a19fe6b057591ef3faca469c62d3454242ce3d77 | [
"MIT"
] | 1 | 2021-02-23T11:27:54.000Z | 2021-02-23T11:27:54.000Z | __version__ = "3.1.2" | 21 | 21 | 0.666667 |
643380b5db062df9515193b5a0b4d2baa6f64478 | 10,223 | py | Python | auto_changelog/repository.py | stdtom/auto-changelog | 1e2d26671569555a3d03e70e897d6f12ad61a108 | [
"MIT"
] | null | null | null | auto_changelog/repository.py | stdtom/auto-changelog | 1e2d26671569555a3d03e70e897d6f12ad61a108 | [
"MIT"
] | 7 | 2020-10-03T21:03:51.000Z | 2020-10-20T18:34:49.000Z | auto_changelog/repository.py | stdtom/auto-changelog | 1e2d26671569555a3d03e70e897d6f12ad61a108 | [
"MIT"
] | null | null | null | import logging
import re
from datetime import date
from hashlib import sha256
from typing import Dict, List, Tuple, Any, Optional
from urllib.parse import urljoin
from git import Repo, Commit, TagReference
from auto_changelog.domain_model import RepositoryInterface, Changelog, default_tag_pattern
class GitRepositor... | 44.641921 | 120 | 0.618605 |
b3f29f81a1d42fbd0483bc103b184160732e777e | 4,195 | py | Python | evaluation_t5.py | nunziati/open-question-answering-newsqa | 85c6acf43163e6e0de8975b5047ddfa3b09f03d1 | [
"MIT"
] | 2 | 2022-03-15T17:48:25.000Z | 2022-03-15T17:48:54.000Z | evaluation_t5.py | nunziati/open-question-answering-newsqa | 85c6acf43163e6e0de8975b5047ddfa3b09f03d1 | [
"MIT"
] | null | null | null | evaluation_t5.py | nunziati/open-question-answering-newsqa | 85c6acf43163e6e0de8975b5047ddfa3b09f03d1 | [
"MIT"
] | null | null | null | from __future__ import print_function
from tqdm import tqdm
import torch
from datasets import load_dataset
from transformers import T5ForConditionalGeneration, T5Tokenizer
from torch.utils.data import DataLoader
import argparse
from MyDataset import Dataset
import MyDataset
import argparse
dataset_instruction = {
... | 37.455357 | 159 | 0.633135 |
8232b249ef72b53ec3ca5cc4fdc42ad6b50c9826 | 24,143 | py | Python | cocoeval.py | gcardosoy/detectron2 | a5e17ef84c1c511007670f886df631c074809726 | [
"Apache-2.0"
] | null | null | null | cocoeval.py | gcardosoy/detectron2 | a5e17ef84c1c511007670f886df631c074809726 | [
"Apache-2.0"
] | null | null | null | cocoeval.py | gcardosoy/detectron2 | a5e17ef84c1c511007670f886df631c074809726 | [
"Apache-2.0"
] | null | null | null | __author__ = 'tsungyi'
import numpy as np
import datetime
import time
from collections import defaultdict
from . import mask as maskUtils
import copy
class COCOeval:
# Interface for evaluating detection on the Microsoft COCO dataset.
#
# The usage for CocoEval is as follows:
# cocoGt=..., cocoDt=... ... | 45.127103 | 131 | 0.513896 |
0b29649b61db77da0b93b9ee22c9960e8637d3d4 | 135 | py | Python | eks_node_migrator.py | ahrizvi/eks-node-migrator | 2972c3011f81cda9c78dabb13ec6449ce70506ab | [
"Apache-2.0"
] | 1 | 2021-11-23T22:34:23.000Z | 2021-11-23T22:34:23.000Z | eks_node_migrator.py | ahrizvi/eks-node-migrator | 2972c3011f81cda9c78dabb13ec6449ce70506ab | [
"Apache-2.0"
] | null | null | null | eks_node_migrator.py | ahrizvi/eks-node-migrator | 2972c3011f81cda9c78dabb13ec6449ce70506ab | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
from eksmigrator.cli import main
if __name__ == "__main__":
main(sys.argv[1:])
# Test CI Build
| 15 | 32 | 0.696296 |
0d1b368a39f4ff83bd9d1e4ed657f07dce6389b1 | 3,123 | py | Python | pytar/pytar.py | douglas-archives/pytar | c53f801487cbf5e3eda02ccaf53d119b37f744a5 | [
"BSD-3-Clause"
] | null | null | null | pytar/pytar.py | douglas-archives/pytar | c53f801487cbf5e3eda02ccaf53d119b37f744a5 | [
"BSD-3-Clause"
] | 3 | 2018-01-13T21:04:13.000Z | 2018-01-13T21:04:13.000Z | pytar/pytar.py | douglas-archives/pytar | c53f801487cbf5e3eda02ccaf53d119b37f744a5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import sys
import tarfile
from datetime import datetime
PY3 = sys.version > '3'
def list_contents(tar_file):
"""
Listing contents from a tar file. This implementation is based on
Python core code, (tarfile.li... | 27.394737 | 79 | 0.557477 |
85b6ebf36cb629e3e337eacd878160a22f8a34fd | 992 | py | Python | decisions/csgo_decider.py | LavinaVRovine/hazard | e0408374dc0b76f8b9a0107f5f12cca2d4c033ef | [
"MIT"
] | 1 | 2020-10-05T14:19:35.000Z | 2020-10-05T14:19:35.000Z | decisions/csgo_decider.py | LavinaVRovine/hazard | e0408374dc0b76f8b9a0107f5f12cca2d4c033ef | [
"MIT"
] | null | null | null | decisions/csgo_decider.py | LavinaVRovine/hazard | e0408374dc0b76f8b9a0107f5f12cca2d4c033ef | [
"MIT"
] | null | null | null | from decisions.decider import Decider
from data.get_csgo_data import get_csgo_data
from helpers.custom_exceptions import TeamNotFound, NoMatchData
from data.csgo_data_creator import CSGOData
class CSGODecider(Decider):
def __init__(self, match_row, db_location, data_handler: CSGOData):
super().__init__(ma... | 34.206897 | 73 | 0.660282 |
455374c0e6052ce457b53773e38d5167a64582bb | 716 | py | Python | seqauto/migrations/0026_auto_20210524_1225.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 5 | 2021-01-14T03:34:42.000Z | 2022-03-07T15:34:18.000Z | seqauto/migrations/0026_auto_20210524_1225.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 551 | 2020-10-19T00:02:38.000Z | 2022-03-30T02:18:22.000Z | seqauto/migrations/0026_auto_20210524_1225.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | null | null | null | # Generated by Django 3.2.1 on 2021-05-24 02:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('seqauto', '0025_auto_20210429_1030'),
]
operations = [
migrations.AddField(
model_name='enrichmentkit',
name='sample... | 29.833333 | 185 | 0.597765 |
0d08c8a63b54cb7c2104f06446934c62508ccdeb | 386 | py | Python | 100DaysOfDays/Dia03/ex14.py | giselemanuel/programming-challenges | c7f37685989190b71ed7ec773f1dc407fd961cf1 | [
"MIT"
] | null | null | null | 100DaysOfDays/Dia03/ex14.py | giselemanuel/programming-challenges | c7f37685989190b71ed7ec773f1dc407fd961cf1 | [
"MIT"
] | null | null | null | 100DaysOfDays/Dia03/ex14.py | giselemanuel/programming-challenges | c7f37685989190b71ed7ec773f1dc407fd961cf1 | [
"MIT"
] | null | null | null | """
Exercício Python 14: Escreva um programa que converta uma temperatura digitando
em graus Celsius e converta para graus Fahrenheit.
"""
print("-" * 50)
print(f'{"Conversor de temperatura":^50}')
print("-" * 50)
temperatura_c = float(input("Insira a temperatura em ºC : "))
temperatura_f = (temperatura_c * (9/5)) + ... | 27.571429 | 79 | 0.722798 |
caf0fada7d3792bba3513627bf3b45d08f6c08ff | 4,170 | py | Python | loihi_network.py | russelljjarvis/brian2_loihi | bb94ab014aabefca0861613ba0343c13619668f3 | [
"MIT"
] | 6 | 2021-05-03T06:20:07.000Z | 2022-01-25T14:17:20.000Z | loihi_network.py | russelljjarvis/brian2_loihi | bb94ab014aabefca0861613ba0343c13619668f3 | [
"MIT"
] | 17 | 2021-04-28T08:54:23.000Z | 2021-12-08T19:30:46.000Z | loihi_network.py | russelljjarvis/brian2_loihi | bb94ab014aabefca0861613ba0343c13619668f3 | [
"MIT"
] | 5 | 2021-07-11T23:15:03.000Z | 2022-03-17T13:48:57.000Z | from brian2 import Network, ExplicitStateUpdater, StateUpdateMethod, defaultclock, ms
import warnings
class LoihiNetwork(Network):
"""
The LoihiNetwork extends the Network class from Brian2.
Note that it is important to use the LoihiNetwork class and not the magic network.
Methods
-------
__i... | 42.55102 | 117 | 0.647482 |
6d8136f7c7a113ce056948b917c046e58618c707 | 1,691 | py | Python | config/wsgi.py | naeunpark/nomadgram | 3b3f245fd627ae160ff9492806799ddf22cbdbca | [
"MIT"
] | null | null | null | config/wsgi.py | naeunpark/nomadgram | 3b3f245fd627ae160ff9492806799ddf22cbdbca | [
"MIT"
] | 5 | 2020-06-05T19:18:08.000Z | 2021-09-08T00:15:11.000Z | config/wsgi.py | naeunpark/nomadgram | 3b3f245fd627ae160ff9492806799ddf22cbdbca | [
"MIT"
] | null | null | null | """
WSGI config for NOMADGRAM 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 the ``WSGI_APPLICATION`... | 41.243902 | 79 | 0.797161 |
fb7f9b253725ebdd1121d2d9e9879925e74f7398 | 789 | py | Python | setup.py | kkristof200/swagger_scraper | 8d63b04b89383743da823a92b472fa5078264328 | [
"MIT"
] | null | null | null | setup.py | kkristof200/swagger_scraper | 8d63b04b89383743da823a92b472fa5078264328 | [
"MIT"
] | null | null | null | setup.py | kkristof200/swagger_scraper | 8d63b04b89383743da823a92b472fa5078264328 | [
"MIT"
] | null | null | null | import setuptools, os
readme_path = os.path.join(os.getcwd(), "README.md")
if os.path.exists(readme_path):
with open(readme_path, "r") as f:
long_description = f.read()
else:
long_description = 'swagger_scraper'
setuptools.setup(
name="swagger_scraper",
version="0.0.1",
author="Kristof",
... | 30.346154 | 57 | 0.675539 |
c98edb2dac482f9187081d0879f49a55a468c796 | 2,170 | py | Python | docs/demos/long_callback_examples/long_callback_celery_progress_bar.py | neumann-nico/dash-labs | 0bb9ef244919bf8882f97b183f0c7ab0f88762bb | [
"MIT"
] | 1 | 2021-09-01T12:53:15.000Z | 2021-09-01T12:53:15.000Z | docs/demos/long_callback_examples/long_callback_celery_progress_bar.py | neumann-nico/dash-labs | 0bb9ef244919bf8882f97b183f0c7ab0f88762bb | [
"MIT"
] | null | null | null | docs/demos/long_callback_examples/long_callback_celery_progress_bar.py | neumann-nico/dash-labs | 0bb9ef244919bf8882f97b183f0c7ab0f88762bb | [
"MIT"
] | null | null | null | import time
import dash
import dash_html_components as html
import dash_labs as dl
from dash_labs.plugins import DiskcacheCachingCallbackManager, CeleryCallbackManager
# ## Celery on RabbitMQ
# from celery import Celery
# celery_app = Celery(__name__, backend='rpc://', broker='pyamqp://')
# long_callback_manager = Cel... | 27.820513 | 85 | 0.624885 |
cd30e423b3ab441d827805104d7bea43b51e167a | 1,317 | py | Python | sdk/python/pulumi_azure_nextgen/digitaltwins/v20200301preview/__init__.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/digitaltwins/v20200301preview/__init__.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/digitaltwins/v20200301preview/__init__.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Export this package's modules as members:
from ._enums import *
from .digital_twin import *
from .digital_twins_endpoint import *
from .get_digital_t... | 34.657895 | 111 | 0.700835 |
597e4848ea3da5f71337ef3d6b9b31e263b7dc8d | 6,431 | py | Python | test/functional/rpc_bind.py | konjoinfinity/konjocoin | 3f638857a17fc844f6ee208aac9c7aefa179f0d5 | [
"MIT"
] | null | null | null | test/functional/rpc_bind.py | konjoinfinity/konjocoin | 3f638857a17fc844f6ee208aac9c7aefa179f0d5 | [
"MIT"
] | null | null | null | test/functional/rpc_bind.py | konjoinfinity/konjocoin | 3f638857a17fc844f6ee208aac9c7aefa179f0d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test running konjocoind with the -rpcbind and -rpcallowip options."""
import sys
from test_framework.... | 49.469231 | 172 | 0.633494 |
3dbdd1b2f561e1c2c1747342ecd61b8bc53e8f0d | 572 | py | Python | _Listas/inter_vetor.py | M3nin0/supreme-broccoli | 186c1ea3b839ba3139f9301660dec8fbd27a162e | [
"Apache-2.0"
] | null | null | null | _Listas/inter_vetor.py | M3nin0/supreme-broccoli | 186c1ea3b839ba3139f9301660dec8fbd27a162e | [
"Apache-2.0"
] | null | null | null | _Listas/inter_vetor.py | M3nin0/supreme-broccoli | 186c1ea3b839ba3139f9301660dec8fbd27a162e | [
"Apache-2.0"
] | null | null | null | # Gerando um vetor intermediario com elemento de dois outros vetores
vetorUM = []
vetorMED = []
vetorDOIS = []
ct = 1
while ct <= 10:
elm = int(input("Insira um valor do vetor 1: "))
vetorUM.append(elm)
vetorMED.append(elm)
elm = int(input("Insira um valor do vetor 2: "))
vetorDOIS.append(elm)
vetorMED.app... | 23.833333 | 98 | 0.713287 |
e329aae6856bb6329cece3dc2ca1f71bfb681f8b | 11,208 | py | Python | sktime/forecasting/tests/test_all_forecasters.py | ltoniazzi/sktime | 0ea07803115c1ec7463dde99f049b131d639f4a7 | [
"BSD-3-Clause"
] | 1 | 2021-11-02T18:56:12.000Z | 2021-11-02T18:56:12.000Z | sktime/forecasting/tests/test_all_forecasters.py | ltoniazzi/sktime | 0ea07803115c1ec7463dde99f049b131d639f4a7 | [
"BSD-3-Clause"
] | null | null | null | sktime/forecasting/tests/test_all_forecasters.py | ltoniazzi/sktime | 0ea07803115c1ec7463dde99f049b131d639f4a7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3 -u
# -*- coding: utf-8 -*-
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
# test API provided through BaseForecaster
__author__ = ["Markus Löning"]
__all__ = [
"test_raises_not_fitted_error",
"test_score",
"test_predict_time_index",
"test_update_predict_... | 36.38961 | 88 | 0.746074 |
13200bc2c7a8e7f91d588fd9142a94445ea1f9d9 | 3,353 | py | Python | ticTacToeGUI.py | yashovardhan99/Tic-Tac-Toe | 62797eb622827fac5b00a990401c8d5ddeb6a637 | [
"Apache-2.0"
] | 1 | 2018-04-27T09:30:51.000Z | 2018-04-27T09:30:51.000Z | ticTacToeGUI.py | yashovardhan99/Tic-Tac-Toe | 62797eb622827fac5b00a990401c8d5ddeb6a637 | [
"Apache-2.0"
] | null | null | null | ticTacToeGUI.py | yashovardhan99/Tic-Tac-Toe | 62797eb622827fac5b00a990401c8d5ddeb6a637 | [
"Apache-2.0"
] | null | null | null | from tkinter import *
import tkinter.messagebox
from ticTacToe import getAIMove,isWinner,isSpaceFree,makeMove
b = ['']*10
var = ['']*10
gameBoard = ['']*10
playerLetter='X' #Change later
AILetter = 'O'
playerColor='red'#Will be able to change later
AIColor='blue'
playerMove=False
startGameCheck = False
moves = 0
mast... | 27.710744 | 130 | 0.650164 |
a699ae1a93e1ae038d689ac23ff2015712a89146 | 9,984 | py | Python | src/Final-NeuralFBProphet/optim/bayesian.py | ds-wook/Final-NeuralFBProphet | 0cb44bfa0ca1ea49077e29bce4d34af2c6a4d618 | [
"Apache-2.0"
] | 16 | 2021-04-29T13:27:37.000Z | 2021-12-30T00:19:00.000Z | src/Final-NeuralFBProphet/optim/bayesian.py | ds-wook/Final-NeuralFBProphet | 0cb44bfa0ca1ea49077e29bce4d34af2c6a4d618 | [
"Apache-2.0"
] | null | null | null | src/Final-NeuralFBProphet/optim/bayesian.py | ds-wook/Final-NeuralFBProphet | 0cb44bfa0ca1ea49077e29bce4d34af2c6a4d618 | [
"Apache-2.0"
] | 3 | 2021-05-20T04:05:15.000Z | 2021-05-20T04:12:40.000Z | from typing import Callable
import joblib
import optuna
import pandas as pd
from fbprophet import Prophet
from optuna import Trial
from optuna.samplers import TPESampler
from sklearn.metrics import mean_squared_error
class BayesianOptimizer:
def __init__(self, objective_function: object):
self.objective_... | 36.977778 | 87 | 0.605869 |
9a1e3c63e76154b488ead642b72aca448ac44a5e | 8,624 | py | Python | qmcpack_reader.py | Paul-St-Young/solid_hydrogen | dd218cd431a283dc1a371a0af5696074d63b8c6c | [
"MIT"
] | 2 | 2020-08-13T23:32:03.000Z | 2021-03-28T01:14:06.000Z | qmcpack_reader.py | Paul-St-Young/solid_hydrogen | dd218cd431a283dc1a371a0af5696074d63b8c6c | [
"MIT"
] | null | null | null | qmcpack_reader.py | Paul-St-Young/solid_hydrogen | dd218cd431a283dc1a371a0af5696074d63b8c6c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import pandas as pd
def get_supertwists(qmc_out):
""" read supercell twists from QMCPACK output
Args:
qmc_out (str): QMCPACK output, must contain "Super twist #"
Return:
np.array: an array of twist vectors (ntwist, ndim)
"""
from qharv.reel import ascii_out
mm = asc... | 32.666667 | 147 | 0.64019 |
3a79321c3f9f4274a159e46b2adb15ca78439857 | 5,166 | py | Python | maskrcnn_benchmark/modeling/matcher.py | Sreehari-S/mask-rcnn-benchmark | b4434c39fccda80575276308da86b6e944540445 | [
"MIT"
] | null | null | null | maskrcnn_benchmark/modeling/matcher.py | Sreehari-S/mask-rcnn-benchmark | b4434c39fccda80575276308da86b6e944540445 | [
"MIT"
] | 1 | 2020-02-18T12:25:48.000Z | 2020-02-18T12:25:48.000Z | maskrcnn_benchmark/modeling/matcher.py | Sreehari-S/mask-rcnn-benchmark | b4434c39fccda80575276308da86b6e944540445 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import torch
class Matcher(object):
"""
This class assigns to each predicted "element" (e.g., a box) a ground-truth
element. Each predicted element will have exactly zero or one matches; each
ground-truth element may be assigned t... | 45.315789 | 88 | 0.634533 |
e1544f1fa22df9f7413b0ddbbdd89fb780379761 | 3,696 | py | Python | venv/lib/python3.8/site-packages/django/contrib/sites/models.py | Joshua-Barawa/My-Photos | adcaea48149c6b31e9559b045709d538d0b749bc | [
"PostgreSQL",
"Unlicense"
] | 16 | 2019-08-10T12:24:06.000Z | 2020-05-21T09:11:14.000Z | venv/lib/python3.8/site-packages/django/contrib/sites/models.py | Joshua-Barawa/My-Photos | adcaea48149c6b31e9559b045709d538d0b749bc | [
"PostgreSQL",
"Unlicense"
] | 12 | 2019-08-10T11:55:29.000Z | 2020-05-21T04:46:30.000Z | venv/lib/python3.8/site-packages/django/contrib/sites/models.py | Joshua-Barawa/My-Photos | adcaea48149c6b31e9559b045709d538d0b749bc | [
"PostgreSQL",
"Unlicense"
] | 4 | 2022-03-12T10:17:00.000Z | 2022-03-26T08:40:43.000Z | import string
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.db import models
from django.db.models.signals import pre_delete, pre_save
from django.http.request import split_domain_port
from django.utils.translation import gettext_lazy as _
SITE_CACHE = {}
def _simple_domain_na... | 30.295082 | 79 | 0.63934 |
5bfb71a41a82dce4ecfd0fe6c106a7c141b25e7d | 927 | py | Python | nomadgram/notifications/migrations/0002_auto_20190314_1205.py | SimJunSik/nomadgram | 958f16824268a3e5cbeb449f8142209d367d731c | [
"MIT"
] | null | null | null | nomadgram/notifications/migrations/0002_auto_20190314_1205.py | SimJunSik/nomadgram | 958f16824268a3e5cbeb449f8142209d367d731c | [
"MIT"
] | 5 | 2020-06-05T20:17:40.000Z | 2021-09-08T01:10:06.000Z | nomadgram/notifications/migrations/0002_auto_20190314_1205.py | SimJunSik/nomadgram | 958f16824268a3e5cbeb449f8142209d367d731c | [
"MIT"
] | null | null | null | # Generated by Django 2.0.13 on 2019-03-14 03:05
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('notifications', '0001_initial'),
]
operations = [
migrations.AddField(
... | 28.96875 | 123 | 0.621359 |
e0cbb66fff93925310894ca72883b9ce8076f2a8 | 3,455 | py | Python | mayan/apps/sources/widgets.py | Dave360-crypto/mayan-edms | 9cd37537461347f79ff0429e4b8b16fd2446798d | [
"Apache-2.0"
] | 3 | 2020-02-03T11:58:51.000Z | 2020-10-20T03:52:21.000Z | mayan/apps/sources/widgets.py | Dave360-crypto/mayan-edms | 9cd37537461347f79ff0429e4b8b16fd2446798d | [
"Apache-2.0"
] | null | null | null | mayan/apps/sources/widgets.py | Dave360-crypto/mayan-edms | 9cd37537461347f79ff0429e4b8b16fd2446798d | [
"Apache-2.0"
] | 2 | 2020-10-24T11:10:06.000Z | 2021-03-03T20:05:38.000Z | from django import forms
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils.encoding import force_unicode
from django.utils.html import strip_tags
from django.utils.http import urlencode
from django.utils.safestring import mark_safe
from django.utils.translation import ugett... | 40.647059 | 268 | 0.690883 |
4cd88cf135a6403e80af9e7ddad837dcac5fb245 | 9,248 | py | Python | sdk/python/pulumi_azure_native/web/v20200901/web_app_backup_configuration.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20200901/web_app_backup_configuration.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20200901/web_app_backup_configuration.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 48.166667 | 1,481 | 0.67074 |
ebf056812b0025810154ffeef59c87b2f8a28ead | 5,217 | py | Python | datahub/public_private_fund_members.py | Xingquan-Li/stock-1 | 0d8ff7ffd27e32cfcdd01d5ca217345b97ce950d | [
"BSD-3-Clause"
] | 1 | 2022-03-15T07:41:22.000Z | 2022-03-15T07:41:22.000Z | datahub/public_private_fund_members.py | Xingquan-Li/stock-1 | 0d8ff7ffd27e32cfcdd01d5ca217345b97ce950d | [
"BSD-3-Clause"
] | null | null | null | datahub/public_private_fund_members.py | Xingquan-Li/stock-1 | 0d8ff7ffd27e32cfcdd01d5ca217345b97ce950d | [
"BSD-3-Clause"
] | null | null | null | # 公募私募人员数据获取
import math
import sys
sys.path.append('..')
from configure.settings import DBSelector
from common.BaseService import BaseService
import requests
import warnings
import datetime
warnings.filterwarnings("ignore")
class FundMembers(BaseService):
def __init__(self, kind, date, first_use=False):
... | 32.811321 | 293 | 0.554533 |
a8140e97d075051e2c1f3cf4fe6cf3e427341d1c | 72 | py | Python | openml_tensorflow/config.py | prabhant/openml-tf | a3bc69c2aa404cb54bea1c492edb8a6941c1175b | [
"BSD-3-Clause"
] | null | null | null | openml_tensorflow/config.py | prabhant/openml-tf | a3bc69c2aa404cb54bea1c492edb8a6941c1175b | [
"BSD-3-Clause"
] | 12 | 2020-01-28T23:09:20.000Z | 2022-02-10T00:36:46.000Z | openml_tensorflow/config.py | prabhant/openml-tensorflow | a3bc69c2aa404cb54bea1c492edb8a6941c1175b | [
"BSD-3-Clause"
] | 3 | 2020-10-08T13:05:59.000Z | 2021-05-10T05:34:11.000Z | # Config file to define all hyperparameters
epoch = 10
batch_size = 32
| 14.4 | 43 | 0.763889 |
4ac29a581d8deb5f5596fddaebf794a7edf89e12 | 4,489 | py | Python | opsplugins/notification_subscription.py | OpenSwitchNOS/openswitch-ops-restd | baf2f631d53966b7084c7c99e88639d857a041c5 | [
"Apache-2.0"
] | null | null | null | opsplugins/notification_subscription.py | OpenSwitchNOS/openswitch-ops-restd | baf2f631d53966b7084c7c99e88639d857a041c5 | [
"Apache-2.0"
] | null | null | null | opsplugins/notification_subscription.py | OpenSwitchNOS/openswitch-ops-restd | baf2f631d53966b7084c7c99e88639d857a041c5 | [
"Apache-2.0"
] | 1 | 2021-09-10T08:17:24.000Z | 2021-09-10T08:17:24.000Z | # Copyright (C) 2016 Hewlett Packard Enterprise Development LP
#
# 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 appli... | 45.343434 | 78 | 0.625306 |
bea118fc1b4eff811557b7db735f8f76d25c1912 | 1,325 | py | Python | calvin/actorstore/systemactors/time/Timestamp.py | gabrielcercel/calvin-base | c0315f100643230d65aed1745e1c22df3e7a7c2c | [
"Apache-2.0"
] | 334 | 2015-06-04T15:14:28.000Z | 2022-02-09T11:14:17.000Z | calvin/actorstore/systemactors/time/Timestamp.py | gabrielcercel/calvin-base | c0315f100643230d65aed1745e1c22df3e7a7c2c | [
"Apache-2.0"
] | 89 | 2015-06-13T19:15:35.000Z | 2019-12-03T19:23:20.000Z | calvin/actorstore/systemactors/time/Timestamp.py | gabrielcercel/calvin-base | c0315f100643230d65aed1745e1c22df3e7a7c2c | [
"Apache-2.0"
] | 112 | 2015-06-06T19:16:54.000Z | 2020-10-19T01:27:55.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2017 Ericsson AB
#
# 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 ... | 24.090909 | 74 | 0.649811 |
7fd8ce19682ebd5a9e6868984b019f164e25a65f | 1,440 | py | Python | test/__init__.py | EmbeddedML-EDAGroup/PIT | 02897f6977b481d3072e9aa915aec0fe43faeb02 | [
"Apache-2.0"
] | 2 | 2021-12-18T21:04:29.000Z | 2022-01-04T14:14:27.000Z | test/__init__.py | EmbeddedML-EDAGroup/PIT | 02897f6977b481d3072e9aa915aec0fe43faeb02 | [
"Apache-2.0"
] | null | null | null | test/__init__.py | EmbeddedML-EDAGroup/PIT | 02897f6977b481d3072e9aa915aec0fe43faeb02 | [
"Apache-2.0"
] | null | null | null | #*----------------------------------------------------------------------------*
#* Copyright (C) 2021 Politecnico di Torino, Italy *
#* SPDX-License-Identifier: Apache-2.0 *
#* *
... | 75.789474 | 79 | 0.360417 |
cac243b4540637be3fe1c1839a3202227fe026c0 | 3,133 | py | Python | books_spider/books_spider/settings.py | behappycc/price-tracker | 3ef8c451dc45f2775d6dbde19bb179d78d5fea97 | [
"MIT"
] | null | null | null | books_spider/books_spider/settings.py | behappycc/price-tracker | 3ef8c451dc45f2775d6dbde19bb179d78d5fea97 | [
"MIT"
] | null | null | null | books_spider/books_spider/settings.py | behappycc/price-tracker | 3ef8c451dc45f2775d6dbde19bb179d78d5fea97 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for books_spider project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/... | 34.428571 | 102 | 0.778168 |
e9bc14f1e5ca9ff72e7653bb55aa3fc7c094bcfd | 16,060 | py | Python | rest-service/manager_rest/test/endpoints/test_blueprints.py | yeshess/cloudify-manager | 04dd199ce7df54355b87e9594f9db9fb1582924b | [
"Apache-2.0"
] | null | null | null | rest-service/manager_rest/test/endpoints/test_blueprints.py | yeshess/cloudify-manager | 04dd199ce7df54355b87e9594f9db9fb1582924b | [
"Apache-2.0"
] | null | null | null | rest-service/manager_rest/test/endpoints/test_blueprints.py | yeshess/cloudify-manager | 04dd199ce7df54355b87e9594f9db9fb1582924b | [
"Apache-2.0"
] | null | null | null | #########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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... | 41.932115 | 79 | 0.657472 |
f880b7fcfa1b367483b71686308d1f4aebb9ff40 | 1,154 | py | Python | quickstartproject/production.py | vmagelo/msdocs-python-django-webapp-quickstart | 10ea918c191ec040000e1558d30a89e0a7ad9b28 | [
"MIT"
] | 1 | 2022-03-21T13:34:34.000Z | 2022-03-21T13:34:34.000Z | quickstartproject/production.py | vmagelo/msdocs-python-django-webapp-quickstart | 10ea918c191ec040000e1558d30a89e0a7ad9b28 | [
"MIT"
] | 3 | 2022-03-07T23:40:42.000Z | 2022-03-08T22:38:37.000Z | quickstartproject/production.py | vmagelo/msdocs-python-django-webapp-quickstart | 10ea918c191ec040000e1558d30a89e0a7ad9b28 | [
"MIT"
] | 24 | 2022-01-18T22:15:19.000Z | 2022-03-29T21:20:52.000Z | from .settings import *
import os
# Configure the domain name using the environment variable
# that Azure automatically creates for us.
ALLOWED_HOSTS = [os.environ['WEBSITE_HOSTNAME']] if 'WEBSITE_HOSTNAME' in os.environ else []
# WhiteNoise configuration
MIDDLEWARE = [ ... | 50.173913 | 92 | 0.62825 |
2cdd66db1d2add1a41dbe9e77aa2807eeacd2af8 | 101 | py | Python | package_tool/demo/hello.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 13 | 2020-01-04T07:37:38.000Z | 2021-08-31T05:19:58.000Z | package_tool/demo/hello.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 3 | 2020-06-05T22:42:53.000Z | 2020-08-24T07:18:54.000Z | package_tool/demo/hello.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 9 | 2020-10-19T04:53:06.000Z | 2021-08-31T05:20:01.000Z | def hello():
f = open('testdd.txt', 'r')
content = f.read()
f.close()
print(content)
| 16.833333 | 31 | 0.524752 |
96bd973cfd337315c13c9609bb9f013d032de298 | 4,070 | py | Python | batracker/tests/localisation/test_spiesberger_wahlberg.py | thejasvibr/batracker | def2ae9a0f18df0b9b95d67a203d2afd8be0f2ce | [
"MIT"
] | null | null | null | batracker/tests/localisation/test_spiesberger_wahlberg.py | thejasvibr/batracker | def2ae9a0f18df0b9b95d67a203d2afd8be0f2ce | [
"MIT"
] | null | null | null | batracker/tests/localisation/test_spiesberger_wahlberg.py | thejasvibr/batracker | def2ae9a0f18df0b9b95d67a203d2afd8be0f2ce | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tests for Spiesberger & Wahlberg 2002
"""
import unittest
import numpy as np
np.random.seed(82319)
import scipy.spatial as spatial
from batracker.localisation import spiesberger_wahlberg_2002 as sw02
class SimpleTest(unittest.TestCase):
'''With tristar and one position
'''
... | 37.33945 | 98 | 0.59828 |
7aa5cc5bf947184c4d1da0e6e7c30f8e4ae94f6a | 482 | py | Python | trick_source/er7_utils/sims/SIM_ball_L1/RUN_test/long_er7_velocity_verlet.py | gilbertguoze/trick | f0537efb0fa3cb5c0c84e36b60f055c1d1c60d21 | [
"NASA-1.3"
] | null | null | null | trick_source/er7_utils/sims/SIM_ball_L1/RUN_test/long_er7_velocity_verlet.py | gilbertguoze/trick | f0537efb0fa3cb5c0c84e36b60f055c1d1c60d21 | [
"NASA-1.3"
] | null | null | null | trick_source/er7_utils/sims/SIM_ball_L1/RUN_test/long_er7_velocity_verlet.py | gilbertguoze/trick | f0537efb0fa3cb5c0c84e36b60f055c1d1c60d21 | [
"NASA-1.3"
] | null | null | null |
# This one of several ways to include files from the input file
# execfile("Modified_data/auto_test.dr")
# execfile("Modified_data/data_record.dr")
ball.state.input.print_off = 1
# Set the freeze frame rate
# trick.exec_set_freeze_frame(0.10)
# Configure integration
ball.trick_technique = trick.User_Defined
ball.er... | 25.368421 | 63 | 0.794606 |
37544c9ea99ab0b54570180f27d6e2583fa511ff | 372 | py | Python | Day-4/day-4-2-exercise/banker-roulette2.py | MihirMore/100daysofcode-Python | 947d91842639c04ee7d23cc82bf04053d3982a85 | [
"MIT"
] | 4 | 2021-04-09T20:01:22.000Z | 2022-03-18T20:49:58.000Z | Day-4/day-4-2-exercise/banker-roulette2.py | MihirMore/100daysofcode-Python | 947d91842639c04ee7d23cc82bf04053d3982a85 | [
"MIT"
] | null | null | null | Day-4/day-4-2-exercise/banker-roulette2.py | MihirMore/100daysofcode-Python | 947d91842639c04ee7d23cc82bf04053d3982a85 | [
"MIT"
] | null | null | null | # Split string method
names_string = input("Give me everybody's names, separated by a comma. ")
names = names_string.split(", ")
# 🚨 Don't change the code above 👆
#Write your code below this line 👇
import random
random_choice = random.randint(0, len(names)-1)
person_who_will_pay = names[random_choice]
print(f"{pe... | 24.8 | 73 | 0.741935 |
011895383120f527c9cb92ad4e4f2c565141b215 | 18,098 | py | Python | tests/test_transforms.py | IRDonch/datumaro | d029e67549b7359c887bd15039997bd8bbae7c0c | [
"MIT"
] | null | null | null | tests/test_transforms.py | IRDonch/datumaro | d029e67549b7359c887bd15039997bd8bbae7c0c | [
"MIT"
] | null | null | null | tests/test_transforms.py | IRDonch/datumaro | d029e67549b7359c887bd15039997bd8bbae7c0c | [
"MIT"
] | null | null | null | from unittest import TestCase
import logging as log
import numpy as np
from datumaro.components.annotation import (
AnnotationType, Bbox, Label, LabelCategories, Mask, MaskCategories, Points,
PointsCategories, Polygon, PolyLine,
)
from datumaro.components.extractor import DatasetItem
from datumaro.components.... | 36.635628 | 84 | 0.460382 |
115c383542c6f798ff71a9010e2c654939e70707 | 17,028 | py | Python | docs/autogen.py | braingineer/keras | 86dfaacb7296a4e3bb46f88ea08c24552c824ea1 | [
"MIT"
] | 2 | 2017-09-13T21:17:54.000Z | 2017-09-26T02:38:00.000Z | docs/autogen.py | braingineer/keras | 86dfaacb7296a4e3bb46f88ea08c24552c824ea1 | [
"MIT"
] | null | null | null | docs/autogen.py | braingineer/keras | 86dfaacb7296a4e3bb46f88ea08c24552c824ea1 | [
"MIT"
] | 1 | 2019-11-11T10:51:10.000Z | 2019-11-11T10:51:10.000Z | # -*- coding: utf-8 -*-
'''
General documentation architecture:
Home
Index
- Getting started
Getting started with the sequential model
Getting started with the functional api
Examples
FAQ
Installation guide
- Models
About Keras models
explain when one should use Sequential or function... | 32.93617 | 108 | 0.558551 |
fe1ca719f2ce402b30e53ab99808b6115e75b405 | 4,891 | py | Python | RNNG/scripts/evaluation.py | Psarpei/Recognition-of-logical-document-structures | 5ab3cc44f43409191b2b2903491f8e1ac4a34026 | [
"MIT"
] | 4 | 2020-12-13T20:19:51.000Z | 2021-09-05T01:44:26.000Z | RNNG/scripts/evaluation.py | Psarpei/Recognition-of-logical-document-structures | 5ab3cc44f43409191b2b2903491f8e1ac4a34026 | [
"MIT"
] | 1 | 2021-02-12T23:52:47.000Z | 2021-02-12T23:52:47.000Z | RNNG/scripts/evaluation.py | Psarpei/Recognition-of-logical-document-structures | 5ab3cc44f43409191b2b2903491f8e1ac4a34026 | [
"MIT"
] | null | null | null | from copy import deepcopy
file_ground_truth = open("C:/Users/pasca/Dropbox/PaktikumTextimaging/rnng-master/Thomas_Mann_Der_kleine_Herr_Friedemann_Ground_Truth.txt", "r") #Franz_Kafka_Auf_der_Galerie_Quelle_DigBib_Ground_Truth.txt","r") #Franz_Kafka_Das_Urteil_Ground_Truth.txt","r")
file_pred = open("C:/Users/pasca/Dro... | 33.5 | 256 | 0.521775 |
450de7417df3efd12c9ee751ce86f94607ba5932 | 3,058 | py | Python | LeetCode/279-perfect-squares.py | leaving-voider/LeetCode.cn-Record | 2922cbdab85556bc0625adc9e6ce44849232e4f4 | [
"MIT"
] | null | null | null | LeetCode/279-perfect-squares.py | leaving-voider/LeetCode.cn-Record | 2922cbdab85556bc0625adc9e6ce44849232e4f4 | [
"MIT"
] | null | null | null | LeetCode/279-perfect-squares.py | leaving-voider/LeetCode.cn-Record | 2922cbdab85556bc0625adc9e6ce44849232e4f4 | [
"MIT"
] | null | null | null | ###############################################################################################
# 同样用动规的思想去解,居然超时了没想到
###########
# 时间复杂度:O(n*sqrt(n)*total),total为总数/平方和
# 空间复杂度:O(n*sqrt(n)),动规数组开销
###############################################################################################
class Solution:
... | 35.976471 | 96 | 0.397973 |
816f021232314eb03f88bec3efda00487bb916c2 | 1,635 | py | Python | alipay/aop/api/response/AlipayFinanceFundFundnetvaluesBatchqueryResponse.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayFinanceFundFundnetvaluesBatchqueryResponse.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayFinanceFundFundnetvaluesBatchqueryResponse.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.NetValueVO import NetValueVO
class AlipayFinanceFundFundnetvaluesBatchqueryResponse(AlipayResponse):
def __init__(self):
super(AlipayFinanceFundFundnetva... | 30.849057 | 121 | 0.658716 |
225a9440ef4e863d0895ea7e69c825e3dda25ca1 | 33,512 | py | Python | client/verta/verta/repository/_commit.py | TMFRook/modeldb | 7096b8fd7e98dc97c3c87cf0ce0e3862ff042f6c | [
"Apache-2.0"
] | null | null | null | client/verta/verta/repository/_commit.py | TMFRook/modeldb | 7096b8fd7e98dc97c3c87cf0ce0e3862ff042f6c | [
"Apache-2.0"
] | null | null | null | client/verta/verta/repository/_commit.py | TMFRook/modeldb | 7096b8fd7e98dc97c3c87cf0ce0e3862ff042f6c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import collections
from datetime import datetime
import heapq
import time
import requests
from .._protos.public.modeldb.versioning import VersioningService_pb2 as _VersioningService
from ..external import six
from .._internal_utils import (
_artifa... | 35.995704 | 170 | 0.597577 |
ee3c7021cce70e4c1828a60d3c720bbe5f81820d | 2,609 | py | Python | var/spack/repos/builtin/packages/c-blosc2/package.py | padamson/spack | d3f67a48552691b4846ccc4a10f76740b154090c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-03-05T10:54:32.000Z | 2021-03-05T14:14:52.000Z | var/spack/repos/builtin/packages/c-blosc2/package.py | padamson/spack | d3f67a48552691b4846ccc4a10f76740b154090c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 16 | 2021-05-12T06:03:24.000Z | 2022-03-16T15:26:46.000Z | var/spack/repos/builtin/packages/c-blosc2/package.py | padamson/spack | d3f67a48552691b4846ccc4a10f76740b154090c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class CBlosc2(CMakePackage):
"""Next generation c-blosc with a new API, a new container and
... | 37.271429 | 95 | 0.604829 |
0060798351f2adc51d90410368cc8b3ab076963b | 1,036 | py | Python | problem_042.py | arboreus/project_euler | 796173e8e72fcbfc15bbb3def7a36349639fafcf | [
"MIT"
] | null | null | null | problem_042.py | arboreus/project_euler | 796173e8e72fcbfc15bbb3def7a36349639fafcf | [
"MIT"
] | null | null | null | problem_042.py | arboreus/project_euler | 796173e8e72fcbfc15bbb3def7a36349639fafcf | [
"MIT"
] | null | null | null | #42) Coded triangle numbers
#The nth term of the sequence of triangle numbers is given by, tn = (1/2)*n*(n+1); so the first ten triangle numbers are:
#1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...
#By converting each letter in a word to a number corresponding to its alphabetical position and adding these values we form a wo... | 51.8 | 285 | 0.686293 |
d5dc6e847822a644e2e049d7625a0c74a209cb56 | 45,530 | py | Python | python/paddle/fluid/tests/unittests/test_imperative_transformer_sorted_gradient.py | littletomatodonkey/Paddle | 3ec289a6a33c5392b914cc256736dcb00b2cecce | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_imperative_transformer_sorted_gradient.py | littletomatodonkey/Paddle | 3ec289a6a33c5392b914cc256736dcb00b2cecce | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_imperative_transformer_sorted_gradient.py | littletomatodonkey/Paddle | 3ec289a6a33c5392b914cc256736dcb00b2cecce | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 40.435169 | 137 | 0.594619 |
b30fcd8d7451e463fcd7b5db0d7ef6cb16f0786e | 2,198 | py | Python | tests/test_api.py | cclauss/personfinder | 62417192e79c9711d0c6c7cfc042f6d6b0dc2dc2 | [
"Apache-2.0"
] | 1 | 2021-11-18T20:09:09.000Z | 2021-11-18T20:09:09.000Z | tests/test_api.py | cclauss/personfinder | 62417192e79c9711d0c6c7cfc042f6d6b0dc2dc2 | [
"Apache-2.0"
] | 8 | 2021-03-11T01:06:03.000Z | 2022-02-27T10:46:12.000Z | tests/test_api.py | cclauss/personfinder | 62417192e79c9711d0c6c7cfc042f6d6b0dc2dc2 | [
"Apache-2.0"
] | 1 | 2022-01-05T07:06:43.000Z | 2022-01-05T07:06:43.000Z | #!/usr/bin/python2.7
# Copyright 2010 Google 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 ... | 31.855072 | 79 | 0.650591 |
d19660c7bb95fbbedcd40ac7bb2336b47b29560f | 9,057 | py | Python | vn.trader/ctaAlgo/strategyAtrRsi.py | Zollern233/vnpy | c813ec970b241c7761a7b020bf2b70c1010b508f | [
"MIT"
] | 2 | 2016-11-04T01:35:47.000Z | 2016-11-04T01:35:50.000Z | vn.trader/ctaAlgo/strategyAtrRsi.py | samson-huang/vnpy | c813ec970b241c7761a7b020bf2b70c1010b508f | [
"MIT"
] | null | null | null | vn.trader/ctaAlgo/strategyAtrRsi.py | samson-huang/vnpy | c813ec970b241c7761a7b020bf2b70c1010b508f | [
"MIT"
] | 1 | 2020-05-26T12:50:30.000Z | 2020-05-26T12:50:30.000Z | # encoding: UTF-8
"""
一个ATR-RSI指标结合的交易策略,适合用在股指的1分钟和5分钟线上。
注意事项:
1. 作者不对交易盈利做任何保证,策略代码仅供参考
2. 本策略需要用到talib,没有安装的用户请先参考www.vnpy.org上的教程安装
3. 将IF0000_1min.csv用ctaHistoryData.py导入MongoDB后,直接运行本文件即可回测策略
"""
from ctaBase import *
from ctaTemplate import CtaTemplate
import talib
import numpy as np
###################... | 31.3391 | 86 | 0.499503 |
5bbc27691ef60710be730a34518a081349fca24c | 6,412 | py | Python | satcfe/rede.py | base4sistemas/satcfe | 530c4cda3ba0ee0114c73d78cdfd47ba79427cbf | [
"Apache-2.0"
] | 38 | 2015-05-25T02:57:16.000Z | 2022-01-18T21:01:49.000Z | satcfe/rede.py | base4sistemas/satcfe | 530c4cda3ba0ee0114c73d78cdfd47ba79427cbf | [
"Apache-2.0"
] | 15 | 2015-08-19T13:30:46.000Z | 2022-01-19T22:34:17.000Z | satcfe/rede.py | base4sistemas/satcfe | 530c4cda3ba0ee0114c73d78cdfd47ba79427cbf | [
"Apache-2.0"
] | 13 | 2015-05-07T01:10:12.000Z | 2022-02-04T14:30:01.000Z | # -*- coding: utf-8 -*-
#
# satcfe/rede.py
#
# Copyright 2015 Base4 Sistemas Ltda ME
#
# 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
#
# Unl... | 39.097561 | 79 | 0.541953 |
d2c966ae8aeacec3a3bf1c4e605562c09d0d6f86 | 3,541 | py | Python | web-frameworks/django/djangoWebPush/djangoWebPush/settings.py | suroegin-learning/learn-python | be5bda86add0dcd6f2fd3db737bb7d0d3ec5f853 | [
"MIT"
] | null | null | null | web-frameworks/django/djangoWebPush/djangoWebPush/settings.py | suroegin-learning/learn-python | be5bda86add0dcd6f2fd3db737bb7d0d3ec5f853 | [
"MIT"
] | null | null | null | web-frameworks/django/djangoWebPush/djangoWebPush/settings.py | suroegin-learning/learn-python | be5bda86add0dcd6f2fd3db737bb7d0d3ec5f853 | [
"MIT"
] | null | null | null | """
Django settings for djangoWebPush project.
Generated by 'django-admin startproject' using Django 2.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import... | 26.22963 | 114 | 0.69839 |
d139b9f480cc324820e9654116833eac007452b5 | 38,095 | py | Python | nova/volume/cinder.py | gyliu513/nova | 14e974a5f77c72a9bb44c6801746abb2eda8e91d | [
"Apache-2.0"
] | 1 | 2019-11-07T03:11:37.000Z | 2019-11-07T03:11:37.000Z | nova/volume/cinder.py | gyliu513/nova | 14e974a5f77c72a9bb44c6801746abb2eda8e91d | [
"Apache-2.0"
] | 1 | 2021-03-31T19:35:21.000Z | 2021-03-31T19:35:21.000Z | nova/volume/cinder.py | Mattlk13/nova | 5b13eb59540aaf535a53920e783964d106de2620 | [
"Apache-2.0"
] | 1 | 2020-07-22T22:14:40.000Z | 2020-07-22T22:14:40.000Z | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | 41.725082 | 79 | 0.627379 |
244e0faaa1e59445a8baccb93512dc5be88873ac | 20,916 | py | Python | astropy/time/tests/test_methods.py | b1quint/astropy | a170a74739e4356c169429a42e554f9777b53f4d | [
"BSD-3-Clause"
] | 8 | 2019-04-27T01:19:45.000Z | 2020-09-21T03:31:01.000Z | astropy/time/tests/test_methods.py | b1quint/astropy | a170a74739e4356c169429a42e554f9777b53f4d | [
"BSD-3-Clause"
] | null | null | null | astropy/time/tests/test_methods.py | b1quint/astropy | a170a74739e4356c169429a42e554f9777b53f4d | [
"BSD-3-Clause"
] | 5 | 2019-04-27T01:19:47.000Z | 2020-09-20T15:15:19.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import itertools
import copy
import pytest
import numpy as np
from astropy.time import Time
@pytest.fixture(scope="module", params=[True, False])
def masked(request):
# Could not figure out a better way to parametrize the setup method
global u... | 48.082759 | 79 | 0.619143 |
565a590fde0f19a720809e9f9d74acd1017a1702 | 153 | py | Python | vectors2d/__init__.py | MitryP/vectors | 5ff73419c194a8228a4b03b83dcb2319685885e7 | [
"MIT"
] | 2 | 2021-01-21T21:23:18.000Z | 2021-01-24T14:34:11.000Z | vectors2d/__init__.py | MitryP/vectors | 5ff73419c194a8228a4b03b83dcb2319685885e7 | [
"MIT"
] | null | null | null | vectors2d/__init__.py | MitryP/vectors | 5ff73419c194a8228a4b03b83dcb2319685885e7 | [
"MIT"
] | null | null | null | from vectors2d.vectors2d import Vector2D, absolute_vector, sum_vectors, sub_vectors, mult_vector, scalar_mult_vectors, \
get_angle, vector_from_dots
| 51 | 120 | 0.836601 |
219dc969e7050db61674426166dbf32f37150d6c | 2,701 | py | Python | train.py | RajputJay41/Using-bert-and-pytorch-for-IMDB | 74100f7a9d1121c49d28e047c736da06fee48e5c | [
"MIT"
] | 2 | 2020-10-01T14:36:27.000Z | 2020-10-19T08:57:54.000Z | train.py | RajputJay41/Using-bert-and-pytorch-for-IMDB | 74100f7a9d1121c49d28e047c736da06fee48e5c | [
"MIT"
] | null | null | null | train.py | RajputJay41/Using-bert-and-pytorch-for-IMDB | 74100f7a9d1121c49d28e047c736da06fee48e5c | [
"MIT"
] | 1 | 2021-07-05T06:56:30.000Z | 2021-07-05T06:56:30.000Z | import config
import pandas as pd
from sklearn import model_selection
import dataset
import torch
from model import BERTBaseUncased
from transformers import AdamW
from transformers import get_linear_schedule_with_warmup
import engine
from sklearn import metrics
import numpy as np
import torch.nn as nn
def run():
... | 27.01 | 114 | 0.65124 |
0795099f6bad0a4a94eecf02a511058619d1f2db | 613 | py | Python | dj_twitter_clone_app/blog/urls.py | ivanprytula/dj_demo_app | 49ca506b22d3d99608e192b28787e185b39d3c24 | [
"MIT"
] | null | null | null | dj_twitter_clone_app/blog/urls.py | ivanprytula/dj_demo_app | 49ca506b22d3d99608e192b28787e185b39d3c24 | [
"MIT"
] | null | null | null | dj_twitter_clone_app/blog/urls.py | ivanprytula/dj_demo_app | 49ca506b22d3d99608e192b28787e185b39d3c24 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import (
BlogListView,
PostCreateView,
PostDetailView,
PostUpdateView,
PostDeleteView,
BlogCategory,
)
app_name = 'blog'
urlpatterns = [
path('', BlogListView.as_view(), name='blog_list'),
path('new/', PostCreateView.as_view(), name='post_new'),... | 29.190476 | 74 | 0.673736 |
6582135770973670789e3ad716e2d1136ee7c2a5 | 1,438 | py | Python | pages/__init__.py | djaodjin/djaodjin-pages | e225783b30f82c79fd947e584b1fb61df7dff423 | [
"BSD-2-Clause"
] | 11 | 2015-04-26T20:13:12.000Z | 2021-10-01T06:43:38.000Z | pages/__init__.py | djaodjin/djaodjin-pages | e225783b30f82c79fd947e584b1fb61df7dff423 | [
"BSD-2-Clause"
] | 32 | 2015-03-17T22:05:07.000Z | 2022-03-30T16:37:03.000Z | pages/__init__.py | djaodjin/djaodjin-pages | e225783b30f82c79fd947e584b1fb61df7dff423 | [
"BSD-2-Clause"
] | 10 | 2015-04-26T20:12:25.000Z | 2021-02-02T01:42:38.000Z | # Copyright (c) 2021, Djaodjin Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | 47.933333 | 78 | 0.778164 |
47f0ac4de0d8cda7a0b2d3010dc257ed50c86d62 | 1,425 | py | Python | filtering/Frequency_Filtering.py | NANOGravDataManagement/bridge | a03cf262767b210d1fbb62bb934f87cf411f1885 | [
"Apache-2.0"
] | null | null | null | filtering/Frequency_Filtering.py | NANOGravDataManagement/bridge | a03cf262767b210d1fbb62bb934f87cf411f1885 | [
"Apache-2.0"
] | null | null | null | filtering/Frequency_Filtering.py | NANOGravDataManagement/bridge | a03cf262767b210d1fbb62bb934f87cf411f1885 | [
"Apache-2.0"
] | null | null | null | # Frequency_Filtering.py
# A script that takes in a .tim file, frequency range, and an output directory
# as a result, it creates a new file with frequencies in the frequency range, stored in output directory
# sample input:
# python Frequency_Filtering.py /Users/fkeri/Desktop/B1855+09_NANOGrav_9yv0.tim 1300.0 1600.0 /... | 34.756098 | 134 | 0.687018 |
074124152a1b7afa6a29332bace989e302a0c03c | 298 | py | Python | forms.py | yichao-l/amr-eager-multilingual | 6d96445a23ff493ceedea02712fbcceffe08b879 | [
"BSD-2-Clause"
] | 15 | 2018-02-26T08:02:31.000Z | 2021-11-05T05:49:43.000Z | forms.py | yichao-l/amr-eager-multilingual | 6d96445a23ff493ceedea02712fbcceffe08b879 | [
"BSD-2-Clause"
] | 1 | 2021-01-06T09:27:40.000Z | 2021-01-06T12:45:08.000Z | forms.py | yichao-l/amr-eager-multilingual | 6d96445a23ff493ceedea02712fbcceffe08b879 | [
"BSD-2-Clause"
] | 7 | 2018-07-24T21:21:03.000Z | 2022-03-07T06:19:58.000Z | from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField
from wtforms.validators import DataRequired
class InputForm(FlaskForm):
#input_sent = StringField('input_sent', validators=[DataRequired()])
input_sent = TextAreaField('input_sent', validators=[DataRequired()])
| 42.571429 | 73 | 0.802013 |
7703cf9e0cb59214b34b7c7d8683840d2d78ea6e | 28,943 | py | Python | features/eolearn/features/interpolation.py | chorng/eo-learn | a1a3c6fa5568d398f5e43f5ad5aecdfeb05e8d3c | [
"MIT"
] | null | null | null | features/eolearn/features/interpolation.py | chorng/eo-learn | a1a3c6fa5568d398f5e43f5ad5aecdfeb05e8d3c | [
"MIT"
] | null | null | null | features/eolearn/features/interpolation.py | chorng/eo-learn | a1a3c6fa5568d398f5e43f5ad5aecdfeb05e8d3c | [
"MIT"
] | null | null | null | """
Module for interpolating, smoothing and re-sampling features in EOPatch
Credits:
Copyright (c) 2017-2022 Matej Aleksandrov, Matej Batič, Grega Milčinski, Domagoj Korais, Matic Lubej (Sinergise)
Copyright (c) 2017-2022 Žiga Lukšič, Devis Peressutti, Nejc Vesel, Jovan Višnjić, Anže Zupanc (Sinergise)
Copyright (c) 2... | 42.815089 | 120 | 0.675569 |
f1d12e90d1036a74c57f1b2fc14a287e73f72f3d | 304 | py | Python | bdd/entry_scenarios.py | nataliasviattseva/python_training | 04572706948c90bba9714cb082e7ee1e2fcb52f1 | [
"Apache-2.0"
] | null | null | null | bdd/entry_scenarios.py | nataliasviattseva/python_training | 04572706948c90bba9714cb082e7ee1e2fcb52f1 | [
"Apache-2.0"
] | null | null | null | bdd/entry_scenarios.py | nataliasviattseva/python_training | 04572706948c90bba9714cb082e7ee1e2fcb52f1 | [
"Apache-2.0"
] | null | null | null | from pytest_bdd import scenario
from .entry_steps import *
@scenario('entries.feature', 'Add new entry')
def test_add_new_entry():
pass
@scenario('entries.feature', 'Edit the entry')
def test_edit_entry():
pass
@scenario('entries.feature', 'Delete the entry')
def test_delete_entry():
pass | 21.714286 | 48 | 0.733553 |
49f6ec66b2f72a52234ec5421420dc35c4beb5aa | 5,383 | py | Python | quidel/delphi_quidel/run.py | qx-teo/covidcast-indicators | 6eabe62748a206b5e6d65f9e11c65ef1c76cdb0a | [
"MIT"
] | null | null | null | quidel/delphi_quidel/run.py | qx-teo/covidcast-indicators | 6eabe62748a206b5e6d65f9e11c65ef1c76cdb0a | [
"MIT"
] | 5 | 2021-08-18T17:33:13.000Z | 2021-08-19T15:09:22.000Z | quidel/delphi_quidel/run.py | qx-teo/covidcast-indicators | 6eabe62748a206b5e6d65f9e11c65ef1c76cdb0a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Functions to call when running the function.
This module should contain a function called `run_module`, that is executed
when the module is run with `python -m MODULE_NAME`.
"""
import time
from os.path import join
from typing import Dict, Any
import pandas as pd
from delphi_utils import (
... | 45.235294 | 99 | 0.634033 |
ec34ada8d083b66e5a2d3e2434f20cfd304f5fc7 | 10,999 | py | Python | kubernetes/client/models/v1_priority_class.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_priority_class.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_priority_class.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fr... | 37.927586 | 411 | 0.654878 |
7ff96a1ee6fed093503a23fbf6ba09f35240435e | 6,540 | py | Python | scripts-dev/build_debian_packages.py | buffless-matt/synapse | dda9b7fc4d2e6ca84a1a994a7ff1943b590e71df | [
"Apache-2.0"
] | null | null | null | scripts-dev/build_debian_packages.py | buffless-matt/synapse | dda9b7fc4d2e6ca84a1a994a7ff1943b590e71df | [
"Apache-2.0"
] | 1 | 2022-03-23T08:03:58.000Z | 2022-03-23T08:03:58.000Z | scripts-dev/build_debian_packages.py | buffless-matt/synapse | dda9b7fc4d2e6ca84a1a994a7ff1943b590e71df | [
"Apache-2.0"
] | 1 | 2022-03-31T09:03:27.000Z | 2022-03-31T09:03:27.000Z | #!/usr/bin/env python3
# Build the Debian packages using Docker images.
#
# This script builds the Docker images and then executes them sequentially, each
# one building a Debian package for the targeted operating system. It is
# designed to be a "single command" to produce all the images.
#
# By default, builds for a... | 30 | 99 | 0.562844 |
d3f9540a9f6278c870263b97438527bddb09fa9a | 10,483 | py | Python | case-design/a3c.py | transys-project/metis | 3a3cdf5ba852b543c2398762364bbfd663b4ebf2 | [
"MIT"
] | 50 | 2020-06-07T11:50:30.000Z | 2022-03-30T07:51:10.000Z | case-design/a3c.py | transys-project/Metis | 3a3cdf5ba852b543c2398762364bbfd663b4ebf2 | [
"MIT"
] | 2 | 2020-08-27T08:52:33.000Z | 2021-09-02T06:25:28.000Z | case-design/a3c.py | transys-project/Metis | 3a3cdf5ba852b543c2398762364bbfd663b4ebf2 | [
"MIT"
] | 16 | 2020-05-08T12:53:27.000Z | 2022-02-28T10:34:07.000Z | import numpy as np
import tensorflow as tf
import tflearn
GAMMA = 0.99
A_DIM = 6
ENTROPY_WEIGHT = 0.5
ENTROPY_EPS = 1e-6
S_INFO = 4
class ActorNetwork(object):
"""
Input to the network is the state, output is the distribution
of all actions.
"""
def __init__(self, sess, state_dim, action_dim, le... | 36.273356 | 109 | 0.627969 |
a18a69a94bb3b07f88de8062d373a3b2d27c4521 | 6,194 | py | Python | awx/main/tests/functional/test_rbac_team.py | bhyunki/awx | ce588a6af5a5c7f71a5b176ffe53eda5ebc3492c | [
"Apache-2.0"
] | 11,396 | 2017-09-07T04:56:02.000Z | 2022-03-31T13:56:17.000Z | awx/main/tests/functional/test_rbac_team.py | bhyunki/awx | ce588a6af5a5c7f71a5b176ffe53eda5ebc3492c | [
"Apache-2.0"
] | 11,046 | 2017-09-07T09:30:46.000Z | 2022-03-31T20:28:01.000Z | awx/main/tests/functional/test_rbac_team.py | bhyunki/awx | ce588a6af5a5c7f71a5b176ffe53eda5ebc3492c | [
"Apache-2.0"
] | 3,592 | 2017-09-07T04:14:31.000Z | 2022-03-31T23:53:09.000Z | import pytest
from unittest import mock
from awx.main.access import TeamAccess
from awx.main.models import Project, Organization, Team
@pytest.mark.django_db
def test_team_attach_unattach(team, user):
u = user('member', False)
access = TeamAccess(u)
team.member_role.members.add(u)
assert not access.... | 33.663043 | 96 | 0.746529 |
c858f0bba4b8e32a4ea7ee4d3b1fdb4401774b39 | 777 | py | Python | corpus/term_to_id_make.py | kwashio/filling_missing_path | b5ab85c9d1e42ee47857299df3fcd79b6127e1fe | [
"Apache-2.0"
] | null | null | null | corpus/term_to_id_make.py | kwashio/filling_missing_path | b5ab85c9d1e42ee47857299df3fcd79b6127e1fe | [
"Apache-2.0"
] | null | null | null | corpus/term_to_id_make.py | kwashio/filling_missing_path | b5ab85c9d1e42ee47857299df3fcd79b6127e1fe | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pickle
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('input_prefix', help='the Wikipedia dump file')
args = parser.parse_args()
alp = ['a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'o', 'p', 'q', 'r',
's', 't']
terms = se... | 24.28125 | 67 | 0.56242 |
92dfedc52e8def9094240023055dd249c3968435 | 5,364 | py | Python | sweet_cms/applications/eventy/utils.py | SunilPragroot/sweet | d048126007fd892cb8b6f80348920c8c5152a85c | [
"MIT"
] | 1 | 2021-04-16T14:25:36.000Z | 2021-04-16T14:25:36.000Z | sweet_cms/applications/eventy/utils.py | SunilPragroot/sweet | d048126007fd892cb8b6f80348920c8c5152a85c | [
"MIT"
] | 94 | 2020-12-31T06:37:49.000Z | 2022-03-10T14:07:47.000Z | sweet_cms/applications/eventy/utils.py | SunilPragroot/sweet | d048126007fd892cb8b6f80348920c8c5152a85c | [
"MIT"
] | null | null | null | import json
import os
import base64
import errno
import re
from sweet_cms.extensions import db
def ensure_dir_exists(dir_path):
if not os.path.exists(dir_path):
try:
os.makedirs(dir_path)
except OSError as exc: # Guard against race condition
if exc.errno != errno.EEXIST:
... | 36.739726 | 107 | 0.596943 |
b8a7c05039de9fdeed7bb8bbdd3674f0556eeffb | 3,046 | py | Python | tests/settings.py | dwoods/django-material | 3b159d3c42984f15bf8398fcb24fb83ebc8eeacb | [
"BSD-3-Clause"
] | null | null | null | tests/settings.py | dwoods/django-material | 3b159d3c42984f15bf8398fcb24fb83ebc8eeacb | [
"BSD-3-Clause"
] | null | null | null | tests/settings.py | dwoods/django-material | 3b159d3c42984f15bf8398fcb24fb83ebc8eeacb | [
"BSD-3-Clause"
] | null | null | null | import django
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'fn4_(9z4f8w+3!&(j2x88^c... | 23.796875 | 71 | 0.66021 |
26efa9fbf914e80a611ad7bb38bad037091f7baf | 2,496 | py | Python | src/commercetools/testing/discount_codes.py | BramKaashoek/commercetools-python-sdk | 4a4191d7816c921401b782d8ae37626cb32791a1 | [
"MIT"
] | null | null | null | src/commercetools/testing/discount_codes.py | BramKaashoek/commercetools-python-sdk | 4a4191d7816c921401b782d8ae37626cb32791a1 | [
"MIT"
] | null | null | null | src/commercetools/testing/discount_codes.py | BramKaashoek/commercetools-python-sdk | 4a4191d7816c921401b782d8ae37626cb32791a1 | [
"MIT"
] | null | null | null | import datetime
import typing
import uuid
from commercetools import schemas, types
from commercetools.testing import utils
from commercetools.testing.abstract import BaseModel, ServiceBackend
from commercetools.testing.utils import update_attribute
class DiscountCodesModel(BaseModel):
_resource_schema = schemas.... | 38.4 | 86 | 0.669071 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.