hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
346b106a0fa0d57f553ecf7c90cd73039ab05ddf
20,184
py
Python
pajbot/models/action.py
tolekk/pajbot
c239f0c966141dfd39db46e081fff4f3a3a82ef0
[ "MIT" ]
null
null
null
pajbot/models/action.py
tolekk/pajbot
c239f0c966141dfd39db46e081fff4f3a3a82ef0
[ "MIT" ]
null
null
null
pajbot/models/action.py
tolekk/pajbot
c239f0c966141dfd39db46e081fff4f3a3a82ef0
[ "MIT" ]
null
null
null
import collections import json import logging import sys import irc import regex as re import requests from pajbot.constants import VERSION from pajbot.managers.schedule import ScheduleManager log = logging.getLogger(__name__) class ActionParser: bot = None @staticmethod def parse(raw_data=None, data=...
32.2944
148
0.589625
a480f8fb01cb7a38a16da71055fcfb6db019f94f
865
py
Python
tests/test_windows_warning.py
RenskeW/cwltool
8ef515037de411abd2f84b569ad4d4a4f7a2c7a0
[ "Apache-2.0" ]
289
2015-10-07T16:27:32.000Z
2022-03-25T23:32:36.000Z
tests/test_windows_warning.py
RenskeW/cwltool
8ef515037de411abd2f84b569ad4d4a4f7a2c7a0
[ "Apache-2.0" ]
1,436
2015-10-09T13:31:46.000Z
2022-03-31T13:36:45.000Z
tests/test_windows_warning.py
RenskeW/cwltool
8ef515037de411abd2f84b569ad4d4a4f7a2c7a0
[ "Apache-2.0" ]
230
2015-10-11T17:33:32.000Z
2022-03-25T22:55:43.000Z
"""Test user experience running on MS Windows.""" import os import pytest from cwltool import main # Can't be just "import cwltool ; … cwltool.main.windows_check()" # needs a direct import to avoid path traversal after os.name is set to "nt" def test_windows_warning(monkeypatch: pytest.MonkeyPatch) -> None: "...
37.608696
80
0.695954
35676994df332ae98b4ecb08fc76231b614f1610
9,592
py
Python
train/optimization_adafactor.py
ksjae/gpt2-ml
240bfc8e4f113425dc454f2ff47d963e0558f876
[ "Apache-2.0" ]
null
null
null
train/optimization_adafactor.py
ksjae/gpt2-ml
240bfc8e4f113425dc454f2ff47d963e0558f876
[ "Apache-2.0" ]
null
null
null
train/optimization_adafactor.py
ksjae/gpt2-ml
240bfc8e4f113425dc454f2ff47d963e0558f876
[ "Apache-2.0" ]
null
null
null
# Original work Copyright 2018 The Google AI Language Team Authors. # Modified work Copyright 2019 Rowan Zellers # # 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/...
40.817021
110
0.630942
b3e3f75b60ed84d314078b594ae6d9379f5018a1
3,088
py
Python
src/MainHandler.py
trapwired/EmailYoutubeDownload
1eddea127877df708bdee52ccda3c00fef1eec58
[ "MIT" ]
2
2021-07-04T22:12:06.000Z
2021-08-10T14:12:29.000Z
src/MainHandler.py
trapwired/EmailYoutubeDownload
1eddea127877df708bdee52ccda3c00fef1eec58
[ "MIT" ]
null
null
null
src/MainHandler.py
trapwired/EmailYoutubeDownload
1eddea127877df708bdee52ccda3c00fef1eec58
[ "MIT" ]
null
null
null
import json import os import shutil import sys import time sys.path.insert(0, '../src') from EmailHandler import EmailHandler from DownloadHandler import DownloadHandler EMAIL_MAX_SIZE = 25 # maximum send size in MegaBytes MAX_VIDEO_LENGTH = 10 # maximum length of videos to download in minutes MAX_RETRY = 10 ...
37.204819
124
0.551166
8432ceae5440aeca80c25fc3db4955fda8f6156b
934
py
Python
src/03_Code_Structure/05_Your_Challenge_-_Problem/challenge-problem.py
MilovanTomasevic/Clean-Code
f1ac9280026e2c21dd8b68e746675ed2c92b52e3
[ "MIT" ]
null
null
null
src/03_Code_Structure/05_Your_Challenge_-_Problem/challenge-problem.py
MilovanTomasevic/Clean-Code
f1ac9280026e2c21dd8b68e746675ed2c92b52e3
[ "MIT" ]
null
null
null
src/03_Code_Structure/05_Your_Challenge_-_Problem/challenge-problem.py
MilovanTomasevic/Clean-Code
f1ac9280026e2c21dd8b68e746675ed2c92b52e3
[ "MIT" ]
null
null
null
# (c) Maximilian Schwarzmüller / Academind GmbH # ********* # Imports # ********* from os import path, makedirs from pathlib import Path # ********* # Main # ********* # A class which allows us to create DiskStorage instances class DiskStorage: def __init__(self, directory_name): self.storage_directory ...
24.578947
63
0.663812
224d5bf7b7cc5c11987aad2bd89f2ecbcaa8a98e
2,926
py
Python
homeassistant/components/hunterdouglas_powerview/scene.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
4
2021-07-11T09:11:00.000Z
2022-02-27T14:43:50.000Z
homeassistant/components/hunterdouglas_powerview/scene.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
277
2021-10-04T06:39:33.000Z
2021-12-28T22:04:17.000Z
homeassistant/components/hunterdouglas_powerview/scene.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
3
2021-11-14T13:29:33.000Z
2021-12-27T17:05:22.000Z
"""Support for Powerview scenes from a Powerview hub.""" from __future__ import annotations from typing import Any from aiopvapi.resources.scene import Scene as PvScene import voluptuous as vol from homeassistant.components.scene import Scene from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from h...
29.857143
84
0.71121
fe81d61064af77258b00088ce0a26965d4ec2aa8
1,665
py
Python
e3nn/non_linearities/gated_block_parity.py
zizai/e3nn
3efa8d7e110d23410d0e8c5975eaa552da1c2e0b
[ "MIT" ]
null
null
null
e3nn/non_linearities/gated_block_parity.py
zizai/e3nn
3efa8d7e110d23410d0e8c5975eaa552da1c2e0b
[ "MIT" ]
null
null
null
e3nn/non_linearities/gated_block_parity.py
zizai/e3nn
3efa8d7e110d23410d0e8c5975eaa552da1c2e0b
[ "MIT" ]
null
null
null
# pylint: disable=invalid-name, arguments-differ, missing-docstring, line-too-long, no-member, unbalanced-tuple-unpacking import torch from e3nn import rs from e3nn.non_linearities.activation import Activation from e3nn.tensor_product import ElementwiseTensorProduct def split_features(features, *Rss, dim=-1): in...
34.6875
122
0.685285
3b7ca1ef217f3baac6d6789c7b8620d2042e9192
474
py
Python
guppe/atividades/secao_8/ex047.py
WesleyLucas97/cursos_python
b2cbd393e8fed6e36b84253f7934766f2b4f1de8
[ "MIT" ]
null
null
null
guppe/atividades/secao_8/ex047.py
WesleyLucas97/cursos_python
b2cbd393e8fed6e36b84253f7934766f2b4f1de8
[ "MIT" ]
null
null
null
guppe/atividades/secao_8/ex047.py
WesleyLucas97/cursos_python
b2cbd393e8fed6e36b84253f7934766f2b4f1de8
[ "MIT" ]
null
null
null
""" Faça uma funcao que receba uma matriz 4x4 e retorne quantos valores maiores que 10 ela possui. """ from random import randint def conta_(x: list): cont = 0 for a in range(4): for b in range(4): if x[a][b] >= 10: cont += 1 return cont matriz = [[0, 0, 0, 0], [0, 0,...
19.75
94
0.542194
f9761aa3c099a7e07485f1fc3ab4743e86ca3105
12,990
py
Python
openslides/motions/config_variables.py
flowluap/OpenSlides
e0069f734adacd5a42183915230f17fc52336f22
[ "MIT" ]
null
null
null
openslides/motions/config_variables.py
flowluap/OpenSlides
e0069f734adacd5a42183915230f17fc52336f22
[ "MIT" ]
null
null
null
openslides/motions/config_variables.py
flowluap/OpenSlides
e0069f734adacd5a42183915230f17fc52336f22
[ "MIT" ]
null
null
null
from django.core.validators import MinValueValidator from openslides.core.config import ConfigVariable from openslides.motions.models import MotionPoll from .models import Workflow def get_workflow_choices(): """ Returns a list of all workflows to be used as choices for the config variable 'motions_work...
29.191011
136
0.601848
afa760d06cb2bb5571d314fc466ffe4cdf32d4b7
383
py
Python
simuvex/procedures/libc___so___6/getchar.py
praetorian-inc/simuvex
7984bc4432a1c2126e6f2eb963c935e9f6a98da5
[ "BSD-2-Clause" ]
8
2016-01-19T03:13:32.000Z
2020-11-03T09:30:05.000Z
simuvex/procedures/libc___so___6/getchar.py
praetorian-inc/simuvex
7984bc4432a1c2126e6f2eb963c935e9f6a98da5
[ "BSD-2-Clause" ]
null
null
null
simuvex/procedures/libc___so___6/getchar.py
praetorian-inc/simuvex
7984bc4432a1c2126e6f2eb963c935e9f6a98da5
[ "BSD-2-Clause" ]
3
2017-04-24T00:22:30.000Z
2020-11-03T09:30:06.000Z
import simuvex from simuvex.s_type import SimTypeInt ###################################### # getchar ###################################### class getchar(simuvex.SimProcedure): def run(self): self.return_type = SimTypeInt(32, True) data = self.inline_call( simuvex.SimProcedures['lib...
23.9375
80
0.530026
27e00df54fa1c05af576386431d1a8903b6e4014
7,189
py
Python
models/vgg.py
MarioMZhang/HAP-tryout
9a423f35b50766533a0d2cab8069316ccb21954b
[ "MIT" ]
24
2021-02-04T09:51:46.000Z
2022-03-04T13:01:24.000Z
models/vgg.py
ICML2021Submission1958/Hessian-Aware-Pruning-and-Optimal-Neural-Implant
34310e93b314f38a8d262f0b1fdb033d16d7087f
[ "MIT" ]
3
2021-07-26T07:18:00.000Z
2022-01-07T12:17:11.000Z
models/vgg.py
ICML2021Submission1958/Hessian-Aware-Pruning-and-Optimal-Neural-Implant
34310e93b314f38a8d262f0b1fdb033d16d7087f
[ "MIT" ]
2
2021-10-10T20:51:10.000Z
2021-11-16T03:40:32.000Z
import math import torch import torch.nn as nn from utils.common_utils import try_contiguous from utils.prune_utils import register_bottleneck_layer, update_QQ_dict from utils.prune_utils import LinearLayerRotation, ConvLayerRotation # from layers.bottleneck_layers import LinearBottleneck, Conv2dBottleneck from models...
35.413793
116
0.548199
f74586a9a2e957cdc6a027edd7f741dc21f08c31
95
py
Python
helli5/contextprocessor.py
TheMn/internet-engineering-project
e41536552feff6f806ba099922df95e89da5bd31
[ "Apache-2.0" ]
7
2019-10-19T12:58:11.000Z
2020-11-05T07:02:17.000Z
helli5/contextprocessor.py
TheMn/internet-engineering-project
e41536552feff6f806ba099922df95e89da5bd31
[ "Apache-2.0" ]
35
2019-12-06T16:31:07.000Z
2022-03-12T00:56:35.000Z
helli5/contextprocessor.py
TheMn/internet-engineering-project
e41536552feff6f806ba099922df95e89da5bd31
[ "Apache-2.0" ]
1
2019-10-18T19:07:04.000Z
2019-10-18T19:07:04.000Z
from datetime import datetime def time_now(request): return {'time_now': datetime.now()}
15.833333
39
0.726316
e396d79e336bf66fbab6a5177060929d522bb474
2,005
py
Python
src/greyd/config.py
canberk/greyd
b3ce055ba856277d5efd5e2bbb9b59ff8d3b3c58
[ "MIT" ]
2
2019-02-18T16:31:14.000Z
2019-03-05T18:24:39.000Z
src/greyd/config.py
canberk/greyd
b3ce055ba856277d5efd5e2bbb9b59ff8d3b3c58
[ "MIT" ]
null
null
null
src/greyd/config.py
canberk/greyd
b3ce055ba856277d5efd5e2bbb9b59ff8d3b3c58
[ "MIT" ]
1
2019-02-20T21:42:20.000Z
2019-02-20T21:42:20.000Z
# -*- coding: utf-8 -*- """Set up environment configure.""" import os import rsa # pylint: disable=invalid-name def use_rsa_key(keys_path): """Check if already have keypair do nothing else create new one.""" if not check_pem_files(keys_path): generate_rsa_keypair(keys_path) def check_pem_files(key...
31.328125
101
0.711721
d5e3a84b8990ddb290b84c9757a702050b3e2f1a
24,673
py
Python
Packs/FeedFireEye/Integrations/FeedFireEye/FeedFireEye.py
Gil-nuriel/content
b5237605d24ad915566f96c2cac392b1a93be80a
[ "MIT" ]
1
2021-04-20T07:10:06.000Z
2021-04-20T07:10:06.000Z
Packs/FeedFireEye/Integrations/FeedFireEye/FeedFireEye.py
Gil-nuriel/content
b5237605d24ad915566f96c2cac392b1a93be80a
[ "MIT" ]
null
null
null
Packs/FeedFireEye/Integrations/FeedFireEye/FeedFireEye.py
Gil-nuriel/content
b5237605d24ad915566f96c2cac392b1a93be80a
[ "MIT" ]
null
null
null
from typing import Tuple, List, Dict, Any, Optional import urllib3 from requests.auth import HTTPBasicAuth from CommonServerPython import * # disable insecure warnings urllib3.disable_warnings() INTEGRATION_NAME = 'FireEye Feed' API_URL = 'https://api.intelligence.fireeye.com' FE_CONFIDENCE_TO_REPUTATION = { C...
38.672414
120
0.608357
c14d36ad2a0b4bd957ec8322e890bc060698bb26
1,504
py
Python
webinar_registration/models.py
ChameleonCloud/portal
92a06fb926dc36e997b94fb8dcd22b7e0d24d3ee
[ "Apache-2.0" ]
3
2015-08-04T20:53:41.000Z
2020-02-14T22:58:20.000Z
webinar_registration/models.py
ChameleonCloud/portal
92a06fb926dc36e997b94fb8dcd22b7e0d24d3ee
[ "Apache-2.0" ]
103
2015-01-15T14:21:00.000Z
2022-03-31T19:14:20.000Z
webinar_registration/models.py
ChameleonCloud/portal
92a06fb926dc36e997b94fb8dcd22b7e0d24d3ee
[ "Apache-2.0" ]
4
2016-02-22T16:48:20.000Z
2021-01-08T17:13:21.000Z
from django.conf import settings from django.db import models #from datetime import datetime from django.utils import timezone import pytz class Webinar(models.Model): name = models.CharField(max_length=255) description = models.TextField() registration_open = models.DateTimeField() registration_closed...
30.693878
102
0.729388
d0b79a7f70b273f801bc047591b90f1d74944f88
4,175
py
Python
applications/trilinos_application/test_examples/cantilever3d.gid/cantilever_aztec.py
jiaqiwang969/Kratos-test
ed082abc163e7b627f110a1ae1da465f52f48348
[ "BSD-4-Clause" ]
null
null
null
applications/trilinos_application/test_examples/cantilever3d.gid/cantilever_aztec.py
jiaqiwang969/Kratos-test
ed082abc163e7b627f110a1ae1da465f52f48348
[ "BSD-4-Clause" ]
null
null
null
applications/trilinos_application/test_examples/cantilever3d.gid/cantilever_aztec.py
jiaqiwang969/Kratos-test
ed082abc163e7b627f110a1ae1da465f52f48348
[ "BSD-4-Clause" ]
null
null
null
#importing MPI ... for this boost 1.35 or superior is needed import mpi print "i am ",mpi.rank , " of ",mpi.size ################################################################## ################################################################## #setting the domain size for the problem to be solved domain_size = 3 #...
32.617188
94
0.72024
22de59363933d4e479f7f14dc5971255a24a2142
856
py
Python
scripts/dags/oci_simple_example.py
oracle-quickstart/oci-airflow
ca244f05a6abdd33f98041b4f5b20098faf5f215
[ "UPL-1.0" ]
14
2020-06-09T13:15:01.000Z
2021-12-03T03:13:08.000Z
oci-provider/dags/oci_simple_example.py
RahulMR42/oke-airflow
5796ca95d9cfca6a8072107bf33de4df8fb35f77
[ "UPL-1.0" ]
2
2021-03-31T19:13:03.000Z
2022-03-15T20:33:33.000Z
oci-provider/dags/oci_simple_example.py
RahulMR42/oke-airflow
5796ca95d9cfca6a8072107bf33de4df8fb35f77
[ "UPL-1.0" ]
5
2021-08-29T20:36:26.000Z
2022-03-17T08:27:46.000Z
from datetime import datetime from airflow import DAG from hooks.oci_base import OCIBaseHook from hooks.oci_object_storage import OCIObjectStorageHook from operators.oci_object_storage import MakeBucket default_args = {'owner': 'airflow', 'start_date': datetime(2020, 5, 26), 'email': ['...
30.571429
134
0.690421
28ae38af8465c735b4221138b931dc4a859ecacb
402
py
Python
main/migrations/0006_endofday_currdate.py
Harsh-Sanklecha/stockanalysis
f5c6a454863ff72e0bac5e29035033cbf1bb3a06
[ "MIT" ]
null
null
null
main/migrations/0006_endofday_currdate.py
Harsh-Sanklecha/stockanalysis
f5c6a454863ff72e0bac5e29035033cbf1bb3a06
[ "MIT" ]
null
null
null
main/migrations/0006_endofday_currdate.py
Harsh-Sanklecha/stockanalysis
f5c6a454863ff72e0bac5e29035033cbf1bb3a06
[ "MIT" ]
2
2021-01-08T12:32:59.000Z
2021-02-14T11:41:51.000Z
# Generated by Django 3.1.2 on 2020-12-12 14:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0005_remove_endofday_currdate'), ] operations = [ migrations.AddField( model_name='endofday', name='currDate...
21.157895
61
0.606965
a7642afd45ee21340c7d0ec7a330f2e6441b01a0
4,773
py
Python
envs/__init__.py
zhihanyang2022/hiro_pytorch
74761e81f257207c2aa86312e8806eaef45658c4
[ "Linux-OpenIB" ]
33
2020-01-15T02:50:02.000Z
2021-12-16T02:40:49.000Z
envs/__init__.py
zhihanyang2022/hiro_pytorch
74761e81f257207c2aa86312e8806eaef45658c4
[ "Linux-OpenIB" ]
6
2020-07-07T13:15:04.000Z
2022-01-03T13:22:02.000Z
envs/__init__.py
zhihanyang2022/hiro_pytorch
74761e81f257207c2aa86312e8806eaef45658c4
[ "Linux-OpenIB" ]
11
2020-08-17T10:19:15.000Z
2022-02-13T10:10:37.000Z
"""Random policy on an environment.""" import numpy as np import argparse import envs.create_maze_env def get_goal_sample_fn(env_name, evaluate): if env_name == 'AntMaze': # NOTE: When evaluating (i.e. the metrics shown in the paper, # we use the commented out goal sampling function. The unco...
31.82
94
0.598994
eb195f20b6165daae7aaf8df04a2898da55779f4
1,714
py
Python
metacells/check_avx2.py
tanaylab/metacells
ecd957b306bd6af2fcfd56efb246ce15b0d8238a
[ "MIT" ]
16
2021-06-19T03:03:06.000Z
2022-03-21T20:47:15.000Z
metacells/check_avx2.py
tanaylab/metacells
ecd957b306bd6af2fcfd56efb246ce15b0d8238a
[ "MIT" ]
23
2021-03-17T09:38:04.000Z
2022-03-02T11:04:56.000Z
metacells/check_avx2.py
tanaylab/metacells
ecd957b306bd6af2fcfd56efb246ce15b0d8238a
[ "MIT" ]
1
2021-12-02T21:28:11.000Z
2021-12-02T21:28:11.000Z
''' Check for AVX2 -------------- This is only imported on X86_64 machines if we compiled the C++ extension to use AVX2 (when creating the pre-compiled wheels). If this is run on a non-AVX2 machine, it generates a human-readable error instead of generating an opaque segmentation fault. ''' import os from warnings imp...
40.809524
100
0.680863
1937e3e26348ee1ef8bd110fed853491e907a729
1,297
py
Python
scripts/naiveBayesBowDemo.py
always-newbie161/pyprobml
eb70c84f9618d68235ef9ba7da147c009b2e4a80
[ "MIT" ]
2
2021-04-10T18:12:19.000Z
2021-05-11T12:07:40.000Z
scripts/naiveBayesBowDemo.py
always-newbie161/pyprobml
eb70c84f9618d68235ef9ba7da147c009b2e4a80
[ "MIT" ]
1
2021-04-19T12:25:26.000Z
2021-04-19T12:25:26.000Z
scripts/naiveBayesBowDemo.py
always-newbie161/pyprobml
eb70c84f9618d68235ef9ba7da147c009b2e4a80
[ "MIT" ]
1
2021-06-21T01:18:07.000Z
2021-06-21T01:18:07.000Z
# authors: ashishpapanai, animesh-007 import scipy import scipy.io as sio import numpy as np from sklearn.metrics import zero_one_loss from sklearn.naive_bayes import MultinomialNB,ComplementNB,CategoricalNB,BernoulliNB,GaussianNB import matplotlib.pyplot as plt import os if os.path.isdir('scripts'): os.chdir('sc...
29.477273
95
0.720894
2e9b9390d68497aa634cfaa60edf04843c05711b
288
py
Python
fplib/functor.py
ppedemon/fplib
61c221e967e924b3fd0a3014e80b331574d45f0c
[ "MIT" ]
null
null
null
fplib/functor.py
ppedemon/fplib
61c221e967e924b3fd0a3014e80b331574d45f0c
[ "MIT" ]
null
null
null
fplib/functor.py
ppedemon/fplib
61c221e967e924b3fd0a3014e80b331574d45f0c
[ "MIT" ]
null
null
null
class Functor: def __rrshift__(self, f): return self.fmap(f) @classmethod def unit(cls, x): raise NotImplementedError('unit not defined') def fmap(self, f): raise NotImplementedError('fmap not defined') def unit(cls, x): return cls.unit(x)
19.2
53
0.628472
021c6f372132ca94f8a21a2357df1e5dda4de6ba
9,931
py
Python
spiral/core/foundation.py
acdaniells/spiral
d78344007969d7c991216901b4a9d3ad7d768587
[ "BSD-3-Clause" ]
null
null
null
spiral/core/foundation.py
acdaniells/spiral
d78344007969d7c991216901b4a9d3ad7d768587
[ "BSD-3-Clause" ]
1
2020-04-01T18:39:48.000Z
2020-04-01T18:39:48.000Z
spiral/core/foundation.py
acdaniells/spiral
d78344007969d7c991216901b4a9d3ad7d768587
[ "BSD-3-Clause" ]
1
2020-04-01T18:36:44.000Z
2020-04-01T18:36:44.000Z
""" Spiral core foundation module. """ import logging import os import sys from importlib import reload as reload_module from spiral.core import extension, ml, plot from spiral.ext.ext_argparse import ArgparseController as Controller from cement.core import ( arg, cache, config, controller, log,...
31.526984
85
0.609204
22e76c125b742bb80a73897a373372f4c1ef8d04
655
py
Python
torch/optimization/combine_optimization.py
jihuacao/Putil
b753fc94bea4cbda00f483681c55f0e9f54adef2
[ "Apache-2.0" ]
1
2018-12-09T06:09:29.000Z
2018-12-09T06:09:29.000Z
torch/optimization/combine_optimization.py
jihuacao/Putil
b753fc94bea4cbda00f483681c55f0e9f54adef2
[ "Apache-2.0" ]
null
null
null
torch/optimization/combine_optimization.py
jihuacao/Putil
b753fc94bea4cbda00f483681c55f0e9f54adef2
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 #from torch.optim import Optimizer import torch class CombineOptimization: def __init__(self, **optimizations): self._optimizations = optimizations pass def step(self, closure=None): for index, (k, v) in enumerate(self._optimizations.items()): v.step() ...
26.2
68
0.574046
4a23f60ae4d4981c154f86980c84b697fda1cf57
9,515
py
Python
infdist/simulator/experiment/legacy/trial.py
zeroos/infdist
5fca2c42bbe5ea650866a26568d1eaf240b2b47e
[ "MIT" ]
null
null
null
infdist/simulator/experiment/legacy/trial.py
zeroos/infdist
5fca2c42bbe5ea650866a26568d1eaf240b2b47e
[ "MIT" ]
null
null
null
infdist/simulator/experiment/legacy/trial.py
zeroos/infdist
5fca2c42bbe5ea650866a26568d1eaf240b2b47e
[ "MIT" ]
null
null
null
from copy import deepcopy from optimization.agent import ( # NOQA EstimatingAgent, FixedRatioAgent, FullCommAgent, FullKnowledgeAgent, GreedyConstrainedAgent, ) from simulator.network import NS3Network from simulator import simulator from optimization import missions, simplesim from optimization....
31.611296
79
0.575617
6b2705d22a8cfd39b0e10b8d480a7025bf549140
16,237
py
Python
MCCGPIndividual.py
TM6501/cgp
2ddec84b13c53228602a5bfa5ae4f9a0943609bc
[ "MIT" ]
1
2020-05-23T04:41:31.000Z
2020-05-23T04:41:31.000Z
MCCGPIndividual.py
TM6501/cgp
2ddec84b13c53228602a5bfa5ae4f9a0943609bc
[ "MIT" ]
null
null
null
MCCGPIndividual.py
TM6501/cgp
2ddec84b13c53228602a5bfa5ae4f9a0943609bc
[ "MIT" ]
null
null
null
import random import copy import inspect import itertools import math import AbstractCGPIndividual class MCCGPIndividual(AbstractCGPIndividual.AbstractCGPIndividual): """This class represents a Multi-Chromosomal Individual. MCCGP individuals will maintain a separate genotype for every output and can mutate u...
40.899244
104
0.594506
721765d9ced30e0992833eeda36fd246236ebc40
6,031
py
Python
lib/saltlint/__init__.py
myii/salt-lint
efeaaff8343e26376dc06b6090b14808a87f95f2
[ "MIT" ]
null
null
null
lib/saltlint/__init__.py
myii/salt-lint
efeaaff8343e26376dc06b6090b14808a87f95f2
[ "MIT" ]
null
null
null
lib/saltlint/__init__.py
myii/salt-lint
efeaaff8343e26376dc06b6090b14808a87f95f2
[ "MIT" ]
null
null
null
# Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # Modified work Copyright (c) 2019 Roald Nefs from __future__ import print_function from collections import defaultdict import os import re import sys import six import saltlint.utils import codecs default_rulesdir = os.path.join(os.path.dirname(saltlint.ut...
31.087629
82
0.580501
5d00e9e1c199a09476261517643b88289892a39a
2,630
py
Python
14-semparsing/ucca/ucca/visualization.py
ariasjose/nn4nlp-code
7327ea3e93161afbc8c008e287b646daa802be4d
[ "Apache-2.0" ]
null
null
null
14-semparsing/ucca/ucca/visualization.py
ariasjose/nn4nlp-code
7327ea3e93161afbc8c008e287b646daa802be4d
[ "Apache-2.0" ]
null
null
null
14-semparsing/ucca/ucca/visualization.py
ariasjose/nn4nlp-code
7327ea3e93161afbc8c008e287b646daa802be4d
[ "Apache-2.0" ]
null
null
null
import operator import warnings from collections import defaultdict import matplotlib.cbook import networkx as nx from ucca import layer0, layer1 from ucca.layer1 import Linkage warnings.filterwarnings("ignore", category=matplotlib.cbook.mplDeprecation) warnings.filterwarnings("ignore", category=UserWarni...
46.140351
117
0.590494
fd68467355379e1343b1759f080e43910d7e7172
11,181
py
Python
m2cgen/interpreters/interpreter.py
jasonkena/m2cgen
f831d4248fd9e3f47d1fc41fecc9fa94e056406d
[ "MIT" ]
1
2021-01-25T09:55:29.000Z
2021-01-25T09:55:29.000Z
m2cgen/interpreters/interpreter.py
jasonkena/m2cgen
f831d4248fd9e3f47d1fc41fecc9fa94e056406d
[ "MIT" ]
null
null
null
m2cgen/interpreters/interpreter.py
jasonkena/m2cgen
f831d4248fd9e3f47d1fc41fecc9fa94e056406d
[ "MIT" ]
null
null
null
from m2cgen import ast from m2cgen.assemblers import fallback_expressions from m2cgen.interpreters.utils import CachedResult, _get_handler_name class BaseInterpreter: """ Base class of AST interpreter. Provides single public method .interpret() which takes instance of AST expression and recursively applie...
38.688581
79
0.679367
f4c7e9642949261642955dcb0eacbe80614fb44a
12,219
py
Python
eval_sample_generation.py
NingMiao/mfcvae
6c6b83bd05fdc618db3976da5faf54838af7e334
[ "MIT" ]
20
2021-06-10T00:26:26.000Z
2022-03-30T01:28:01.000Z
eval_sample_generation.py
NingMiao/mfcvae
6c6b83bd05fdc618db3976da5faf54838af7e334
[ "MIT" ]
1
2022-03-03T16:40:30.000Z
2022-03-04T14:49:46.000Z
eval_sample_generation.py
NingMiao/mfcvae
6c6b83bd05fdc618db3976da5faf54838af7e334
[ "MIT" ]
8
2021-06-13T08:53:33.000Z
2022-03-14T06:22:00.000Z
import numpy as np import torch import torch.distributions as D import matplotlib.pyplot as plt from torchvision.utils import make_grid from torch.autograd import Variable import os import argparse from datasets import Fast_MNIST, Fast_SVHN, Fast_3DShapes from load_model import load_model_from_save_dict from plotting...
51.556962
192
0.651854
1fe528402bf459a1d01aec196625e7915bc4c1df
641
py
Python
Day7.py
BWeesy/advent-of-code-2021
7e46de303ac9bcdaafcbc7de30d3bd4e059450c0
[ "Unlicense" ]
null
null
null
Day7.py
BWeesy/advent-of-code-2021
7e46de303ac9bcdaafcbc7de30d3bd4e059450c0
[ "Unlicense" ]
null
null
null
Day7.py
BWeesy/advent-of-code-2021
7e46de303ac9bcdaafcbc7de30d3bd4e059450c0
[ "Unlicense" ]
null
null
null
import fileHandler as fh def getFuelCost(location, rendevous): numberOfSteps = abs(location - rendevous) return numberOfSteps * (numberOfSteps + 1) / 2 def main(): subLocations = fh.getMappedCommaSeparatedFirstLine('input/day7', int) minTotalCost = sum(subLocations) * sum(subLocations) for rendevous in rang...
35.611111
88
0.736349
e751fddc37c6375e74fb8d1fdfb8298dd956e487
1,427
py
Python
config.py
DM2-ND/CoEvoGNN
748d3a54f6e625890c9f9cb65db62f1dc3e20952
[ "MIT" ]
1
2021-04-22T13:43:32.000Z
2021-04-22T13:43:32.000Z
config.py
DM2-ND/CoEvoGNN
748d3a54f6e625890c9f9cb65db62f1dc3e20952
[ "MIT" ]
null
null
null
config.py
DM2-ND/CoEvoGNN
748d3a54f6e625890c9f9cb65db62f1dc3e20952
[ "MIT" ]
null
null
null
""" Global configurations """ import os emb_dir = os.path.join('.', 'emb') def con_dataset(d_name): if d_name == '2k': """ Co-author temporal networks 2k """ nodes_f = os.path.join('data', 'node2author.n2k.csv') temporalgraphs_f = os.path.join('data', 'temporalgraph.n2k.csv') ve...
36.589744
107
0.658725
df92bd141852c4c4aab4c0040fe13350a11a5561
49,011
py
Python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/aio/operations/_blob_containers_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/aio/operations/_blob_containers_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/aio/operations/_blob_containers_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
48.913174
455
0.689743
25778f38b960b1f4970cb926d28b1b9c1ffb02dd
5,306
py
Python
predict.py
wengmingao/yolox-facemask
bad9d1151fd801cc939a49832a30bc07142d45e1
[ "Apache-2.0" ]
null
null
null
predict.py
wengmingao/yolox-facemask
bad9d1151fd801cc939a49832a30bc07142d45e1
[ "Apache-2.0" ]
null
null
null
predict.py
wengmingao/yolox-facemask
bad9d1151fd801cc939a49832a30bc07142d45e1
[ "Apache-2.0" ]
null
null
null
#-----------------------------------------------------------------------# # predict.py将单张图片预测、摄像头检测、FPS测试和目录遍历检测等功能 # 整合到了一个py文件中,通过指定mode进行模式的修改。 #-----------------------------------------------------------------------# import time import cv2 import numpy as np from PIL import Image from yolo import YOLO if __n...
42.111111
125
0.491519
cb6ee87804801e74d602c76140b5efb5e52ae54e
11,689
py
Python
neutron/plugins/ryu/ryu_neutron_plugin.py
ksshanam/neutron-vrrp
f9fb7f9b41adc0de401cc118a4d97026d3abb6e0
[ "Apache-2.0" ]
null
null
null
neutron/plugins/ryu/ryu_neutron_plugin.py
ksshanam/neutron-vrrp
f9fb7f9b41adc0de401cc118a4d97026d3abb6e0
[ "Apache-2.0" ]
null
null
null
neutron/plugins/ryu/ryu_neutron_plugin.py
ksshanam/neutron-vrrp
f9fb7f9b41adc0de401cc118a4d97026d3abb6e0
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 Isaku Yamahata <yamahata at private email ne jp> # <yamahata at valinux co jp> # 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 ...
42.974265
78
0.646847
a64435095a3e11aec5d41248ddb8076e5b876baf
367
py
Python
ruleta_app/migrations/0002_alter_round_fecha.py
Franco1605/ruleta-app
93ac27039b5a502aa03683ec2991aefda65bbf41
[ "MIT" ]
null
null
null
ruleta_app/migrations/0002_alter_round_fecha.py
Franco1605/ruleta-app
93ac27039b5a502aa03683ec2991aefda65bbf41
[ "MIT" ]
null
null
null
ruleta_app/migrations/0002_alter_round_fecha.py
Franco1605/ruleta-app
93ac27039b5a502aa03683ec2991aefda65bbf41
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2021-11-21 04:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ruleta_app', '0001_initial'), ] operations = [ migrations.AlterField( model_name='round', name='fecha', ...
19.315789
47
0.580381
e5f7a58c76e9583e4981b9dc644beb9712b5354f
1,252
py
Python
manilaclient/v1/contrib/list_extensions.py
Murray-LIANG/python-manilaclient
e3652b9c1c36c825d07dce741802930ad0ec1a12
[ "CNRI-Python", "Apache-1.1" ]
null
null
null
manilaclient/v1/contrib/list_extensions.py
Murray-LIANG/python-manilaclient
e3652b9c1c36c825d07dce741802930ad0ec1a12
[ "CNRI-Python", "Apache-1.1" ]
null
null
null
manilaclient/v1/contrib/list_extensions.py
Murray-LIANG/python-manilaclient
e3652b9c1c36c825d07dce741802930ad0ec1a12
[ "CNRI-Python", "Apache-1.1" ]
null
null
null
# Copyright 2013 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...
33.837838
78
0.73722
37b246fbbf6f2b8aa286b7c9935d8865cd4d9bcd
1,874
py
Python
pydiscordbio/models/user.py
awersli99/pydiscordbio
adbe6853594f1ee700043f9520dfd9a893fa44f0
[ "MIT" ]
7
2020-08-29T15:56:24.000Z
2021-02-21T22:30:37.000Z
pydiscordbio/models/user.py
awersli99/pydiscordbio
adbe6853594f1ee700043f9520dfd9a893fa44f0
[ "MIT" ]
null
null
null
pydiscordbio/models/user.py
awersli99/pydiscordbio
adbe6853594f1ee700043f9520dfd9a893fa44f0
[ "MIT" ]
null
null
null
from datetime import datetime import dateutil.parser from typing import Optional GENDER = { 0: "Male", 1: "Female" } def from_datetime(x: str) -> Optional[datetime]: """Returns a parsed datetime object.""" try: return dateutil.parser.parse(x) except ValueError: return None class...
28.830769
73
0.593917
58ddccc226cee1a0915ab31e3cfff1c5815c70b1
253
py
Python
Python3/0347-Top-K-Frequent-Elements/soln-1.py
wyaadarsh/LeetCode-Solutions
3719f5cb059eefd66b83eb8ae990652f4b7fd124
[ "MIT" ]
5
2020-07-24T17:48:59.000Z
2020-12-21T05:56:00.000Z
Python3/0347-Top-K-Frequent-Elements/soln-1.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
null
null
null
Python3/0347-Top-K-Frequent-Elements/soln-1.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
2
2020-07-24T17:49:01.000Z
2020-08-31T19:57:35.000Z
class Solution: def topKFrequent(self, nums, k): """ :type nums: List[int] :type k: int :rtype: List[int] """ counts = collections.Counter(nums) return heapq.nlargest(k, counts, key=counts.get)
28.111111
56
0.545455
8561aa27d25ae11242c3f136bb5101a785606dc8
54
py
Python
src/Stele/processing/processing_hsg/__init__.py
SherwinGroup/Stele
9bb7da0b406a801975e21c9f7ce05d369ae661e5
[ "MIT" ]
null
null
null
src/Stele/processing/processing_hsg/__init__.py
SherwinGroup/Stele
9bb7da0b406a801975e21c9f7ce05d369ae661e5
[ "MIT" ]
null
null
null
src/Stele/processing/processing_hsg/__init__.py
SherwinGroup/Stele
9bb7da0b406a801975e21c9f7ce05d369ae661e5
[ "MIT" ]
null
null
null
__author__ = 'Sphinx' from . import helper_functions
13.5
30
0.777778
6d24ed469f3ab5d151cc76ac7ba1ce734e7256f4
23,705
py
Python
deepspeed/runtime/pipe/module.py
ConnollyLeon/DeepSpeed
2d84d1c185ef0345eaf43a7240d61b33eda43497
[ "MIT" ]
2
2021-07-01T15:00:50.000Z
2022-03-27T15:35:49.000Z
deepspeed/runtime/pipe/module.py
ConnollyLeon/DeepSpeed
2d84d1c185ef0345eaf43a7240d61b33eda43497
[ "MIT" ]
2
2020-05-28T01:37:24.000Z
2022-02-26T06:51:48.000Z
deepspeed/runtime/pipe/module.py
ConnollyLeon/DeepSpeed
2d84d1c185ef0345eaf43a7240d61b33eda43497
[ "MIT" ]
1
2021-01-23T16:07:54.000Z
2021-01-23T16:07:54.000Z
import os import enum import re as regex from collections import defaultdict from functools import partial import torch import torch.nn as nn import torch.distributed as dist from deepspeed.utils import logger from .. import utils as ds_utils from ..activation_checkpointing import checkpointing from .topology impor...
41.154514
167
0.571989
20c2930c5056f8a60868e0e954c5a69ae6bdfc80
3,583
py
Python
python/seldon/cli/zk_utils.py
gigliovale/seldon-server
64f04bc8c47bdc53d4f1e58f454b9aa82d957b9a
[ "Apache-2.0" ]
null
null
null
python/seldon/cli/zk_utils.py
gigliovale/seldon-server
64f04bc8c47bdc53d4f1e58f454b9aa82d957b9a
[ "Apache-2.0" ]
null
null
null
python/seldon/cli/zk_utils.py
gigliovale/seldon-server
64f04bc8c47bdc53d4f1e58f454b9aa82d957b9a
[ "Apache-2.0" ]
1
2018-08-07T14:40:53.000Z
2018-08-07T14:40:53.000Z
import json from os import walk import os import sys import errno def mkdir_p(path): try: os.makedirs(path) except OSError as exc: # Python >2.5 if exc.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def is_json_data(data): if (data != None) and (len(d...
34.451923
141
0.650293
7e6f2612dfebd53dd0a64c00606594f22a8b14ad
1,900
py
Python
tacker/tests/unit/test_hacking.py
K-OpenNet/OPNFV-Alarm
453d5dc0e01999fd23cf6b62671468f11c0dd2e2
[ "Apache-2.0" ]
3
2016-03-01T12:26:07.000Z
2016-08-03T06:24:59.000Z
tacker/tests/unit/test_hacking.py
K-OpenNet/OPNFV-Alarm
453d5dc0e01999fd23cf6b62671468f11c0dd2e2
[ "Apache-2.0" ]
24
2015-10-21T19:09:02.000Z
2021-08-02T11:27:26.000Z
tacker/tests/unit/test_hacking.py
K-OpenNet/OPNFV-Alarm
453d5dc0e01999fd23cf6b62671468f11c0dd2e2
[ "Apache-2.0" ]
12
2016-02-16T15:01:46.000Z
2017-03-13T10:01:16.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
43.181818
78
0.566842
1173141c6f08f3b6eab66438331ee4f49f329d03
3,529
py
Python
lwganrt/holo/data_struct.py
darkAlert/impersonator-rt
8a2b879cf60f2094944a0104592d460fee3bda6a
[ "MIT" ]
6
2020-04-17T08:47:58.000Z
2021-07-02T10:58:52.000Z
lwganrt/holo/data_struct.py
darkAlert/impersonator-rt
8a2b879cf60f2094944a0104592d460fee3bda6a
[ "MIT" ]
null
null
null
lwganrt/holo/data_struct.py
darkAlert/impersonator-rt
8a2b879cf60f2094944a0104592d460fee3bda6a
[ "MIT" ]
1
2020-05-24T23:46:54.000Z
2020-05-24T23:46:54.000Z
import os class DSNode(): def __init__(self, nodes, idx_start, idx_stop, leaf=False): # self.nodes = nodes self._idx_start = idx_start self._idx_stop = idx_stop self._leaf = leaf @property def idx_start(self): return self._idx_start @property def idx_stop(self): return self._idx_stop @property de...
22.335443
85
0.677529
9e273fcd8092bba96961c330fb011ea4507d2212
23,923
py
Python
SuperSonic/utils/engine/config_search.py
HuantWang/SUPERSONIC
bea7090e8bc4a54ed52495dd910ef946c88bec67
[ "CC-BY-4.0" ]
78
2022-02-02T00:23:02.000Z
2022-03-15T11:44:02.000Z
SuperSonic/utils/engine/config_search.py
HuantWang/SUPERSONIC
bea7090e8bc4a54ed52495dd910ef946c88bec67
[ "CC-BY-4.0" ]
null
null
null
SuperSonic/utils/engine/config_search.py
HuantWang/SUPERSONIC
bea7090e8bc4a54ed52495dd910ef946c88bec67
[ "CC-BY-4.0" ]
3
2022-01-30T05:10:14.000Z
2022-03-04T21:18:44.000Z
from ray.tune.schedulers import ASHAScheduler, MedianStoppingRule, PopulationBasedTraining from ray.tune import CLIReporter import ray from ray.rllib.models.catalog import ModelCatalog from ray import tune import subprocess import third_party.contrib.alpha_zero.models.custom_torch_models from ray.rllib import _register...
41.317789
143
0.583413
88c172d7a08545446f6b16cb49d29f6a5c999084
1,268
py
Python
apps/jobsub/setup.py
civascu/hue
82f2de44789ff5a981ed725175bae7944832d1e9
[ "Apache-2.0" ]
null
null
null
apps/jobsub/setup.py
civascu/hue
82f2de44789ff5a981ed725175bae7944832d1e9
[ "Apache-2.0" ]
null
null
null
apps/jobsub/setup.py
civascu/hue
82f2de44789ff5a981ed725175bae7944832d1e9
[ "Apache-2.0" ]
null
null
null
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
42.266667
90
0.700315
f164abe52975ad29749e06e1ebc4d49e947af51b
42,702
py
Python
homeassistant/components/mqtt/light/schema_basic.py
mag1024/core
f3a89de71f6fa693016a41397b051bd48c86f841
[ "Apache-2.0" ]
null
null
null
homeassistant/components/mqtt/light/schema_basic.py
mag1024/core
f3a89de71f6fa693016a41397b051bd48c86f841
[ "Apache-2.0" ]
null
null
null
homeassistant/components/mqtt/light/schema_basic.py
mag1024/core
f3a89de71f6fa693016a41397b051bd48c86f841
[ "Apache-2.0" ]
null
null
null
"""Support for MQTT lights.""" import logging import voluptuous as vol from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_MODE, ATTR_COLOR_TEMP, ATTR_EFFECT, ATTR_EFFECT_LIST, ATTR_HS_COLOR, ATTR_MAX_MIREDS, ATTR_MIN_MIREDS, ATTR_RGB_COLOR, ATTR_RGBW_COLOR...
38.99726
88
0.642171
82b65ecfcea1ac640d719ab52e4b930e160afadd
855
py
Python
interfaces/python/tests/conftest.py
iotile/baBLE-linux
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
13
2018-07-04T16:35:37.000Z
2021-03-03T10:41:07.000Z
interfaces/python/tests/conftest.py
iotile/baBLE
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
11
2018-06-01T20:32:32.000Z
2019-01-21T17:03:47.000Z
interfaces/python/tests/conftest.py
iotile/baBLE-linux
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
null
null
null
# Pytest configuration file: will be run before tests to define fixtures import pytest import subprocess import uuid from tests.mocks.mock_subprocess import MockSubprocess @pytest.fixture(scope='function') def bridge_subprocess(monkeypatch): """ Mock the subprocess.Popen() function to run a class representing th...
28.5
102
0.740351
ca9bfab914fde2d498e2ebb051ad7c1b281e433f
3,409
py
Python
fizzsite/fizzsite/settings.py
hurhurhurt/Fizzle
53d780d501966f4a4010b0e395bd9f87bf67a489
[ "MIT" ]
null
null
null
fizzsite/fizzsite/settings.py
hurhurhurt/Fizzle
53d780d501966f4a4010b0e395bd9f87bf67a489
[ "MIT" ]
null
null
null
fizzsite/fizzsite/settings.py
hurhurhurt/Fizzle
53d780d501966f4a4010b0e395bd9f87bf67a489
[ "MIT" ]
null
null
null
""" Django settings for fizzsite project. Generated by 'django-admin startproject' using Django 3.0.3. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os ...
25.825758
91
0.699032
73a8097729953b5856d2317bc0969261ecc7c3c4
488
py
Python
backend/projectx/users/migrations/0006_user_anonymous.py
mmcardle/projectx
058935273834c683de8db8bb2d720b1ddcd433e8
[ "MIT" ]
4
2021-04-22T08:55:13.000Z
2022-03-23T12:58:43.000Z
backend/projectx/users/migrations/0006_user_anonymous.py
mmcardle/projectx
058935273834c683de8db8bb2d720b1ddcd433e8
[ "MIT" ]
3
2021-05-12T11:05:58.000Z
2021-09-12T16:40:31.000Z
backend/projectx/users/migrations/0006_user_anonymous.py
mmcardle/projectx
058935273834c683de8db8bb2d720b1ddcd433e8
[ "MIT" ]
1
2021-04-18T08:33:02.000Z
2021-04-18T08:33:02.000Z
# Generated by Django 3.2.7 on 2021-11-09 22:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("users", "0005_alter_user_id"), ] operations = [ migrations.AddField( model_name="user", name="anonymous", ...
23.238095
106
0.588115
378b5cbe013b7e8d7287b94974b44c782b853d22
7,975
py
Python
detect/sort/sort.py
bdkiran/openObserver
2c9b71f2e7fa021887d7fa760920dea06e67ba72
[ "MIT" ]
null
null
null
detect/sort/sort.py
bdkiran/openObserver
2c9b71f2e7fa021887d7fa760920dea06e67ba72
[ "MIT" ]
null
null
null
detect/sort/sort.py
bdkiran/openObserver
2c9b71f2e7fa021887d7fa760920dea06e67ba72
[ "MIT" ]
null
null
null
""" SORT: A Simple, Online and Realtime Tracker Copyright (C) 2016-2020 Alex Bewley alex@bewley.ai This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, ...
33.792373
141
0.633981
3a421696c12248fe7fb454763c8cbf1bb29e2b65
15,814
py
Python
avalanche/benchmarks/utils/data_loader.py
TomVeniat/avalanche
6e89f9945cf40c14471406a4cf4830a8d95c5705
[ "MIT" ]
810
2018-10-08T15:49:05.000Z
2022-03-31T15:28:09.000Z
avalanche/benchmarks/utils/data_loader.py
TomVeniat/avalanche
6e89f9945cf40c14471406a4cf4830a8d95c5705
[ "MIT" ]
477
2021-03-01T17:50:51.000Z
2022-03-31T14:51:23.000Z
avalanche/benchmarks/utils/data_loader.py
TomVeniat/avalanche
6e89f9945cf40c14471406a4cf4830a8d95c5705
[ "MIT" ]
147
2018-10-08T15:49:18.000Z
2022-03-31T04:08:45.000Z
################################################################################ # Copyright (c) 2021 ContinualAI. # # Copyrights licensed under the MIT License. # # See the accompanying LICENSE file for terms. ...
42.283422
80
0.601303
ecacb892c48f4112d6eabf6856474712378bf6b7
8,800
py
Python
env/lib/python3.7/site-packages/docusign_admin/models/new_user_response.py
davidgacc/docusign
e63167101656d0066d481844576ce687ea80eb91
[ "MIT" ]
null
null
null
env/lib/python3.7/site-packages/docusign_admin/models/new_user_response.py
davidgacc/docusign
e63167101656d0066d481844576ce687ea80eb91
[ "MIT" ]
null
null
null
env/lib/python3.7/site-packages/docusign_admin/models/new_user_response.py
davidgacc/docusign
e63167101656d0066d481844576ce687ea80eb91
[ "MIT" ]
null
null
null
# coding: utf-8 """ DocuSign Admin API An API for an organization administrator to manage organizations, accounts and users # noqa: E501 OpenAPI spec version: v2 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa...
27.160494
182
0.58875
8ad7f8531a41e71c4af98b93764a1ec45dfe2915
4,853
py
Python
core/general.py
yaakiyu/rt-bot
f68bca95c516e08c31ecc846524dcea4c8ba1503
[ "BSD-4-Clause" ]
null
null
null
core/general.py
yaakiyu/rt-bot
f68bca95c516e08c31ecc846524dcea4c8ba1503
[ "BSD-4-Clause" ]
null
null
null
core/general.py
yaakiyu/rt-bot
f68bca95c516e08c31ecc846524dcea4c8ba1503
[ "BSD-4-Clause" ]
null
null
null
# RT - General from __future__ import annotations from typing import TYPE_CHECKING, TypeVar, Optional, Any from discord.ext import commands from discord.ext.fslash import is_fslash import discord from rtlib.common.utils import make_error_message, code_block, text_format from .utils import get_fsparent, gettext fro...
33.239726
176
0.636101
39d25398c127a2e46f91b8f38662ad1f1c94e25f
3,592
py
Python
api/tests/integration/slack/test_slack_environment_viewset.py
mevinbabuc/flagsmith
751bd6cb4a34bd2f80af5a9c547559da9c2fa010
[ "BSD-3-Clause" ]
1,259
2021-06-10T11:24:09.000Z
2022-03-31T10:30:44.000Z
api/tests/integration/slack/test_slack_environment_viewset.py
mevinbabuc/flagsmith
751bd6cb4a34bd2f80af5a9c547559da9c2fa010
[ "BSD-3-Clause" ]
392
2021-06-10T11:12:29.000Z
2022-03-31T10:13:53.000Z
api/tests/integration/slack/test_slack_environment_viewset.py
mevinbabuc/flagsmith
751bd6cb4a34bd2f80af5a9c547559da9c2fa010
[ "BSD-3-Clause" ]
58
2021-06-11T03:18:07.000Z
2022-03-31T14:39:10.000Z
import json from django.urls import reverse from rest_framework import status def test_posting_env_config_return_400_when_slack_project_config_does_not_exist( admin_client, environment, environment_api_key ): # Given url = reverse( "api-v1:environments:integrations-slack-list", args=[envi...
28.967742
81
0.703786
9853480e0035f1d8213c5f3fc6625e5497ce16e6
180
py
Python
mongo_folder/1.mongo.py
relax-space/python-learning
22987e20a4b0a741e1c5ed8603a952a0fc8dd4bd
[ "Apache-2.0" ]
null
null
null
mongo_folder/1.mongo.py
relax-space/python-learning
22987e20a4b0a741e1c5ed8603a952a0fc8dd4bd
[ "Apache-2.0" ]
null
null
null
mongo_folder/1.mongo.py
relax-space/python-learning
22987e20a4b0a741e1c5ed8603a952a0fc8dd4bd
[ "Apache-2.0" ]
null
null
null
""" python.exe .\mongo_folder\1.mongo.py """ import pymongo myclient = pymongo.MongoClient('mongodb://localhost:27017/') dblist = myclient.list_database_names() print(dblist)
16.363636
60
0.738889
8924e30450682cfa4df8e1c864e2c6ff41b4777c
842
py
Python
hackerrank/queues-and-stacks/queue_with_two_stacks.py
peoplenarthax/code-challenges
557a9d309d9a1602b5a0410a758d6342ec42c445
[ "MIT" ]
null
null
null
hackerrank/queues-and-stacks/queue_with_two_stacks.py
peoplenarthax/code-challenges
557a9d309d9a1602b5a0410a758d6342ec42c445
[ "MIT" ]
null
null
null
hackerrank/queues-and-stacks/queue_with_two_stacks.py
peoplenarthax/code-challenges
557a9d309d9a1602b5a0410a758d6342ec42c445
[ "MIT" ]
null
null
null
class MyQueue(object): def __init__(self): self.inbox = [] self.outbox = [] def __refill_outbox__(self): for i in range(len(self.inbox)): self.outbox.append(self.inbox.pop()) def peek(self): if len(self.outbox) == 0: self.__refill_outbox__() ...
24.057143
52
0.510689
0d141e9da67f23721799a9686a643581cf38f9cd
1,765
py
Python
mwparserfromhell/nodes/comment.py
hperala/kontuwikibot
f409e6fb45adf4e553dc326d9fb3c0d29eda6373
[ "MIT" ]
2
2019-03-14T09:30:13.000Z
2021-01-07T16:59:27.000Z
mwparserfromhell/nodes/comment.py
hperala/kontuwikibot
f409e6fb45adf4e553dc326d9fb3c0d29eda6373
[ "MIT" ]
null
null
null
mwparserfromhell/nodes/comment.py
hperala/kontuwikibot
f409e6fb45adf4e553dc326d9fb3c0d29eda6373
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2016 Ben Kurtovic <ben.kurtovic@gmail.com> # # 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 ...
36.770833
79
0.712181
c60a6503122c77858d678a23a8c8105071dc5433
56,404
py
Python
pymatgen/io/abinitio/pseudos.py
NadezhdaBzhilyanskaya/pymatgen
fae11a8142d457a649fa84ff9781eb2b39334bdc
[ "MIT" ]
1
2022-02-28T04:24:46.000Z
2022-02-28T04:24:46.000Z
pymatgen/io/abinitio/pseudos.py
NadezhdaBzhilyanskaya/pymatgen
fae11a8142d457a649fa84ff9781eb2b39334bdc
[ "MIT" ]
null
null
null
pymatgen/io/abinitio/pseudos.py
NadezhdaBzhilyanskaya/pymatgen
fae11a8142d457a649fa84ff9781eb2b39334bdc
[ "MIT" ]
null
null
null
""" This module provides objects describing the basic parameters of the pseudopotentials used in Abinit, and a parser to instantiate pseudopotential objects.. """ from __future__ import division, print_function import sys import os import abc import collections import json import warnings import numpy as np from pym...
32.88863
113
0.541806
cc7322687d6018880116c480548346284f3eed55
279
py
Python
optic_store/optic_store/doctype/optical_store_hr_settings_salary_component/optical_store_hr_settings_salary_component.py
iptelephony/optic_store
9c5e6e2f7170d18ecac8dd53133a62a3250cd834
[ "MIT" ]
14
2019-05-14T09:33:58.000Z
2022-03-19T14:43:36.000Z
optic_store/optic_store/doctype/optical_store_hr_settings_salary_component/optical_store_hr_settings_salary_component.py
iptelephony/optic_store
9c5e6e2f7170d18ecac8dd53133a62a3250cd834
[ "MIT" ]
18
2019-03-22T19:51:22.000Z
2020-08-04T13:57:27.000Z
optic_store/optic_store/doctype/optical_store_hr_settings_salary_component/optical_store_hr_settings_salary_component.py
iptelephony/optic_store
9c5e6e2f7170d18ecac8dd53133a62a3250cd834
[ "MIT" ]
25
2019-05-15T08:31:17.000Z
2022-02-25T07:21:18.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, 9T9IT and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class OpticalStoreHRSettingsSalaryComponent(Document): pass
25.363636
54
0.799283
9f41bdda690f5e5f880e2c54515d8fac05de1606
4,114
py
Python
example/views.py
jouve/django-oauth-toolkit-example
44e8958a7e962ef3450a5562240c59e66db05bc4
[ "BSD-2-Clause" ]
18
2015-03-31T08:08:16.000Z
2021-07-17T02:01:17.000Z
example/views.py
jouve/django-oauth-toolkit-example
44e8958a7e962ef3450a5562240c59e66db05bc4
[ "BSD-2-Clause" ]
1
2017-11-04T01:06:54.000Z
2017-11-04T01:06:54.000Z
example/views.py
jouve/django-oauth-toolkit-example
44e8958a7e962ef3450a5562240c59e66db05bc4
[ "BSD-2-Clause" ]
12
2015-03-31T05:32:39.000Z
2021-07-17T02:01:28.000Z
from django.http import HttpResponse from django.core.urlresolvers import reverse from django.views.generic import FormView, TemplateView, View from oauth2_provider.compat import urlencode from oauth2_provider.views.generic import ProtectedResourceView from .forms import ConsumerForm, ConsumerExchangeForm, AccessToke...
35.162393
106
0.64317
5735cb7582c2890d61de88a602a720535f6e7a89
57,914
py
Python
thorsky/thorskyclasses3.py
onekiloparsec/thorsky
0c5d4440b0332b5aea75596943cfb1af30fe0956
[ "BSD-2-Clause" ]
18
2019-07-29T20:09:34.000Z
2021-06-25T18:57:19.000Z
thorsky/thorskyclasses3.py
onekiloparsec/thorsky
0c5d4440b0332b5aea75596943cfb1af30fe0956
[ "BSD-2-Clause" ]
4
2019-07-30T04:05:49.000Z
2020-07-12T11:06:31.000Z
thorsky/thorskyclasses3.py
onekiloparsec/thorsky
0c5d4440b0332b5aea75596943cfb1af30fe0956
[ "BSD-2-Clause" ]
1
2020-07-05T02:55:53.000Z
2020-07-05T02:55:53.000Z
#!/usr/bin/env python """thorskyclasses.py -- classes used for observational circumstances. """ import numpy as np import astropy.units as u from astropy.coordinates import SkyCoord, Angle, EarthLocation, CartesianRepresentation from astropy.coordinates import FK5, PrecessedGeocentric from astropy.coordinates imp...
42.615158
122
0.603498
990984ccc9482a76ec298237810a4864e32a7a79
4,257
py
Python
src/pytorch/torchdata.py
jeetsagar/turbojet
9b17edde0a7e01d0fa320261fbc2734ce53577d2
[ "MIT" ]
null
null
null
src/pytorch/torchdata.py
jeetsagar/turbojet
9b17edde0a7e01d0fa320261fbc2734ce53577d2
[ "MIT" ]
null
null
null
src/pytorch/torchdata.py
jeetsagar/turbojet
9b17edde0a7e01d0fa320261fbc2734ce53577d2
[ "MIT" ]
2
2021-05-20T05:47:59.000Z
2021-08-24T07:44:37.000Z
#!python3 """preparing the dataset for pytorch""" import h5py import torch import bisect import numpy as np from explore import print_keys from torch.utils.data import Dataset, DataLoader def normalize_data(x): x_max = np.max(x, axis=0) x_min = np.min(x, axis=0) x_denom = (x_max - x_min) x_denom[x...
29.978873
117
0.603946
b97280843ac0fe835c564113a953f45d49f68877
628
py
Python
manage.py
AviH0/coursist
3db05e8a168be33d2f03b9e082ee4779d80be7c7
[ "MIT" ]
6
2020-06-26T12:09:10.000Z
2021-12-18T11:44:55.000Z
manage.py
AviH0/coursist
3db05e8a168be33d2f03b9e082ee4779d80be7c7
[ "MIT" ]
89
2020-06-02T11:42:57.000Z
2021-06-10T19:09:09.000Z
manage.py
AviH0/coursist
3db05e8a168be33d2f03b9e082ee4779d80be7c7
[ "MIT" ]
14
2020-06-26T12:08:34.000Z
2021-04-20T10:59:45.000Z
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Coursist.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise Impor...
28.545455
73
0.683121
b9cd7e2eb25c0a155806d20ff6255c2d5830bc05
1,915
py
Python
run_expts/06a2_tucodec.py
scheng1992/Data_Assimilation
b4d43895229205ee2cd16b15ee20beccb33b71d6
[ "MIT" ]
1
2021-11-25T12:46:48.000Z
2021-11-25T12:46:48.000Z
run_expts/06a2_tucodec.py
bugsuse/Data_Assimilation
2965ccf78951df11f8686282cd6814bae18afde5
[ "MIT" ]
null
null
null
run_expts/06a2_tucodec.py
bugsuse/Data_Assimilation
2965ccf78951df11f8686282cd6814bae18afde5
[ "MIT" ]
2
2021-03-02T13:29:34.000Z
2022-03-12T11:01:08.000Z
""" After success of first experiment (particularly with vanilla blocks) I want to investigate the effect of 1) Increasing the number of channels to [96, 128] 2) Increasing the amount of augmentation (as overfitting was a problem) i.e. I have removed the FieldJitter(0, 0) augmentation NOTE: 128 failed with...
24.87013
90
0.608877
4bab2938eae96ffaf14d1b9aaeeaacc3860e9f1f
12,779
py
Python
jornadas/views.py
marthalilianamd/SIVORE
7f0d6c2c79aa909e6cecbf5f562ebe64f40a560d
[ "Apache-2.0" ]
1
2016-02-11T05:01:49.000Z
2016-02-11T05:01:49.000Z
jornadas/views.py
marthalilianamd/SIVORE
7f0d6c2c79aa909e6cecbf5f562ebe64f40a560d
[ "Apache-2.0" ]
89
2016-01-29T00:04:48.000Z
2016-07-05T15:52:30.000Z
jornadas/views.py
Jorgesolis1989/SIVORE
7f0d6c2c79aa909e6cecbf5f562ebe64f40a560d
[ "Apache-2.0" ]
2
2016-02-08T15:16:12.000Z
2016-05-14T02:33:06.000Z
from django.contrib.auth.decorators import permission_required from django.shortcuts import render_to_response, render, redirect from jornadas.forms import FormularioRegistroJornada, FormularioEditarJornada from planchas.models import Plancha from candidatos.models import Candidato from corporaciones.models import Co...
46.981618
193
0.631818
fc26f27ae39373971d43c803000d13051fd7bdec
984
py
Python
Python3/0695-Max-Area-of-Island/soln-1.py
wyaadarsh/LeetCode-Solutions
3719f5cb059eefd66b83eb8ae990652f4b7fd124
[ "MIT" ]
5
2020-07-24T17:48:59.000Z
2020-12-21T05:56:00.000Z
Python3/0695-Max-Area-of-Island/soln-1.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
null
null
null
Python3/0695-Max-Area-of-Island/soln-1.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
2
2020-07-24T17:49:01.000Z
2020-08-31T19:57:35.000Z
class Solution: def maxAreaOfIsland(self, grid): """ :type grid: List[List[int]] :rtype: int """ if not grid or not grid[0]: return 0 def dfs(r, c): m, n = len(grid), len(grid[0]) stack = [(r, c)] grid[r][c] = 0 ...
31.741935
81
0.356707
7b0bd118fe332b41c113ce6ca994d83e9581d615
6,955
py
Python
lib/airflow/tests/contrib/jobs/test_scheduler_client.py
ideax-business/ai-flow
0a7797a093beddf827f68cad7a11e0babf1b5059
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
lib/airflow/tests/contrib/jobs/test_scheduler_client.py
ideax-business/ai-flow
0a7797a093beddf827f68cad7a11e0babf1b5059
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
lib/airflow/tests/contrib/jobs/test_scheduler_client.py
ideax-business/ai-flow
0a7797a093beddf827f68cad7a11e0babf1b5059
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
# 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"); you may not u...
45.162338
111
0.627606
c0e9d38c3ca514b85f6e8c40422e60096bd2227a
2,312
py
Python
dit/pid/tests/test_idep.py
volpatto/dit
a8b0ffd72e0829c4b239419e85b9e0cfd20085dd
[ "BSD-3-Clause" ]
1
2021-03-15T08:51:42.000Z
2021-03-15T08:51:42.000Z
dit/pid/tests/test_idep.py
volpatto/dit
a8b0ffd72e0829c4b239419e85b9e0cfd20085dd
[ "BSD-3-Clause" ]
null
null
null
dit/pid/tests/test_idep.py
volpatto/dit
a8b0ffd72e0829c4b239419e85b9e0cfd20085dd
[ "BSD-3-Clause" ]
null
null
null
""" Tests for dit.pid.idep. """ import pytest from dit.pid.ibroja import PID_BROJA from dit.pid.idep import PID_dep, PID_RA from dit.pid.distributions import bivariates, trivariates def test_pid_dep1(): """ Test idep on a generic distribution. """ d = bivariates['reduced or'] pid = PID_dep(d, ((...
28.54321
77
0.556661
6389ac77c43ecd4a95a843d1a40f83b191749021
4,385
py
Python
ops/nl/nonlocal_block.py
ancientmooner/CCNet
c914913ad523ec854f78c28f22044af204d4fbe6
[ "MIT" ]
null
null
null
ops/nl/nonlocal_block.py
ancientmooner/CCNet
c914913ad523ec854f78c28f22044af204d4fbe6
[ "MIT" ]
null
null
null
ops/nl/nonlocal_block.py
ancientmooner/CCNet
c914913ad523ec854f78c28f22044af204d4fbe6
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F from libs import InPlaceABN, InPlaceABNSync from torch import nn from torch.nn import init import math class _NonLocalNd(nn.Module): def __init__(self, dim, inplanes, planes, downsample, use_gn, lr_mult, use_out): assert dim in [1, 2, 3], "dim {} is not support...
35.362903
153
0.566249
2bfd16b927d06d3900aa5c9d7c16ab9a7ec24963
5,142
py
Python
qa/rpc-tests/cfund-vote.py
oleksiilihai/Bitcoin-Oil
0c40c096fae0437adf8033e37a8a4f8e489551cb
[ "MIT" ]
null
null
null
qa/rpc-tests/cfund-vote.py
oleksiilihai/Bitcoin-Oil
0c40c096fae0437adf8033e37a8a4f8e489551cb
[ "MIT" ]
null
null
null
qa/rpc-tests/cfund-vote.py
oleksiilihai/Bitcoin-Oil
0c40c096fae0437adf8033e37a8a4f8e489551cb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoinoil Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinOilTestFramework from test_framework.cfund_util import * ...
44.713043
141
0.666472
23d2b844f1168ced1452fc210177de9c78d9d949
2,010
py
Python
src/models.py
Salah-Zair/openctt-assistant
490c224456cf6e22f8e336d5e1eeeac93ff7ce59
[ "MIT" ]
null
null
null
src/models.py
Salah-Zair/openctt-assistant
490c224456cf6e22f8e336d5e1eeeac93ff7ce59
[ "MIT" ]
null
null
null
src/models.py
Salah-Zair/openctt-assistant
490c224456cf6e22f8e336d5e1eeeac93ff7ce59
[ "MIT" ]
null
null
null
from datetime import datetime class Teacher: def __init__(self): self.teacher_id: int self.name: str self.last_name: str self.title: str self.edu_rank: str self.ext_id: int class Room: def __init__(self): self.room_id: int self.name: str ...
19.705882
40
0.58806
c504f35fef8cabbf9fc91db1c8e7c1d067b619e7
885
py
Python
tests/test_modify_contact.py
elpinkypie/python_training
110b84fa108894a703f07734b4b5e77f038a54ec
[ "Apache-2.0" ]
null
null
null
tests/test_modify_contact.py
elpinkypie/python_training
110b84fa108894a703f07734b4b5e77f038a54ec
[ "Apache-2.0" ]
null
null
null
tests/test_modify_contact.py
elpinkypie/python_training
110b84fa108894a703f07734b4b5e77f038a54ec
[ "Apache-2.0" ]
null
null
null
from git.model.contact import ContactFormAttributes from random import randrange def test_modify_contact(fixt): if fixt.contact.count_contacts() == 0: fixt.contact.create(ContactFormAttributes(firstname="firstname", lastname="lastname")) old_contacts = fixt.contact.get_contact_list() # random cho...
42.142857
115
0.700565
6367d643d791a7ae23dfa0bb59986c3a07f5e4a3
3,707
py
Python
tests/test_execution_mode.py
ShellAddicted/pex
f1060b784fc9c4337a514ed21357ea9e8c2e4f41
[ "Apache-2.0" ]
2,160
2015-01-06T17:57:39.000Z
2022-03-30T19:59:01.000Z
tests/test_execution_mode.py
sthagen/pex
9bd4c178c93556faad3c8a1e75989c9288d09416
[ "Apache-2.0" ]
1,242
2015-01-22T14:56:46.000Z
2022-03-31T18:02:38.000Z
tests/test_execution_mode.py
Satertek/pex
64de1c4cf031118ef446ac98a8c164c91c23bb9b
[ "Apache-2.0" ]
248
2015-01-15T13:34:50.000Z
2022-03-26T01:24:18.000Z
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import import os.path import subprocess import sys from subprocess import CalledProcessError import pytest from pex.layout import Layout from pex.testing...
30.891667
93
0.643108
f098c89e089c920c13e89a2802b30dc5cac833b5
235
py
Python
guitarfan/scrapy/settings.py
timgates42/GuitarFan
1a6d6bcc7708cbb214648e7f5657728f6c27c48a
[ "MIT" ]
48
2015-02-02T02:25:07.000Z
2022-03-11T12:39:39.000Z
guitarfan/scrapy/settings.py
timgates42/GuitarFan
1a6d6bcc7708cbb214648e7f5657728f6c27c48a
[ "MIT" ]
2
2015-09-13T14:00:41.000Z
2021-08-04T16:28:25.000Z
guitarfan/scrapy/settings.py
timgates42/GuitarFan
1a6d6bcc7708cbb214648e7f5657728f6c27c48a
[ "MIT" ]
16
2015-01-09T08:15:13.000Z
2020-06-20T11:07:49.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- SPIDER_MODULES = ['guitarfan.spiders'] NEWSPIDER_MODULE = 'guitarfan.spiders' DEFAULT_ITEM_CLASS = 'guitarfan.items.Artist' # ITEM_PIPELINES = ['guitarfan.pipelines.FilterWordsPipeline']
26.111111
62
0.748936
8e3e1d5776999705797e2d801b590ebb2070b20c
3,459
py
Python
test/test_api_v2___ula_api.py
Fates-List/fateslist.py-autogen
0643434d9d0e71f781f99b2703a2ef52f49d8875
[ "MIT" ]
null
null
null
test/test_api_v2___ula_api.py
Fates-List/fateslist.py-autogen
0643434d9d0e71f781f99b2703a2ef52f49d8875
[ "MIT" ]
null
null
null
test/test_api_v2___ula_api.py
Fates-List/fateslist.py-autogen
0643434d9d0e71f781f99b2703a2ef52f49d8875
[ "MIT" ]
null
null
null
# coding: utf-8 """ Fates List Current API: v2 beta 3 Default API: v2 API Docs: https://apidocs.fateslist.xyz Enum Reference: https://apidocs.fateslist.xyz/structures/enums.autogen # noqa: E501 OpenAPI spec version: 0.3.0 Generated by: h...
27.672
225
0.681989
a7c2bc4f5d4b4c072bfdec49461054deba30fe90
1,160
py
Python
euctr/crawl/base/config.py
jeekim/euctr-tracker-code
5a041bcd188ec089cfadf3e97b64013408177033
[ "MIT" ]
3
2018-09-11T11:35:48.000Z
2020-09-10T10:39:23.000Z
euctr/crawl/base/config.py
jeekim/euctr-tracker-code
5a041bcd188ec089cfadf3e97b64013408177033
[ "MIT" ]
61
2018-08-06T14:03:16.000Z
2022-03-17T12:30:42.000Z
euctr/crawl/base/config.py
jeekim/euctr-tracker-code
5a041bcd188ec089cfadf3e97b64013408177033
[ "MIT" ]
4
2018-09-11T11:35:53.000Z
2020-12-18T14:21:15.000Z
# -*- coding: utf-8 -*- import os import logging import logging.config # Environment EUCTR_DEBUG = os.environ.get('EUCTR_DEBUG', 'development') if EUCTR_DEBUG == "yes": ENV = 'testing' elif EUCTR_DEBUG == "no": ENV = 'production' else: assert False, "yes or no for debug" WAREHOUSE_URL = os.environ['EUCTR_...
26.363636
75
0.697414
73b1642a53228e3ec7f1652d046d497330ab2fa8
2,605
py
Python
coordinateparser.py
vkuhlmann/minecraft-proximity
34d2b867da308d7b8e4b2e4ea47ae82a0a88b84b
[ "MIT" ]
null
null
null
coordinateparser.py
vkuhlmann/minecraft-proximity
34d2b867da308d7b8e4b2e4ea47ae82a0a88b84b
[ "MIT" ]
null
null
null
coordinateparser.py
vkuhlmann/minecraft-proximity
34d2b867da308d7b8e4b2e4ea47ae82a0a88b84b
[ "MIT" ]
null
null
null
from PIL import Image, ImageGrab import positioner import fontdecoder import re import logging import threading import time # Dependency of coordinatereader.py WHITE_COLOR = (252, 252, 252) GRAY_COLOR = (221, 221, 221) class CoordinateParser: def __init__(self, snippeter): self.snippeter = snippeter ...
28.944444
63
0.443762
30430ccd15fa515065e837890a8d8ca934172400
16,168
py
Python
sdks/python/apache_beam/transforms/window_test.py
dexterchan/beam
01e500c2dd0d699aea0434154b69fd59d824700f
[ "Apache-2.0" ]
2
2019-12-14T04:24:33.000Z
2020-02-21T07:17:40.000Z
sdks/python/apache_beam/transforms/window_test.py
dexterchan/beam
01e500c2dd0d699aea0434154b69fd59d824700f
[ "Apache-2.0" ]
6
2020-09-26T00:28:18.000Z
2022-02-10T01:07:25.000Z
sdks/python/apache_beam/transforms/window_test.py
dexterchan/beam
01e500c2dd0d699aea0434154b69fd59d824700f
[ "Apache-2.0" ]
1
2020-02-09T02:51:50.000Z
2020-02-09T02:51:50.000Z
# # 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"); you may not us...
43.114667
80
0.614485
1ec49dde5e99f895705294ef7166f8b72de0e292
1,556
py
Python
heisenbridge/appservice.py
pstn/heisenbridge
c01bb90315cb0fba8a439e40bbe076445e0b62b8
[ "MIT" ]
null
null
null
heisenbridge/appservice.py
pstn/heisenbridge
c01bb90315cb0fba8a439e40bbe076445e0b62b8
[ "MIT" ]
null
null
null
heisenbridge/appservice.py
pstn/heisenbridge
c01bb90315cb0fba8a439e40bbe076445e0b62b8
[ "MIT" ]
null
null
null
from abc import ABC from abc import abstractmethod from typing import List from heisenbridge.matrix import Matrix from heisenbridge.matrix import MatrixNotFound class Room: pass class AppService(ABC): api: Matrix user_id: str server_name: str config: dict async def load(self): try:...
26.372881
89
0.517352
c7f9df6f4ed5a889546007ca78f5afbc30b7a9f2
4,361
py
Python
app/app/settings/base.py
trevore23/tvr-23-gke
e16e9f0e8f734fee0b6a3a245de4ff9bab278b98
[ "MIT" ]
null
null
null
app/app/settings/base.py
trevore23/tvr-23-gke
e16e9f0e8f734fee0b6a3a245de4ff9bab278b98
[ "MIT" ]
null
null
null
app/app/settings/base.py
trevore23/tvr-23-gke
e16e9f0e8f734fee0b6a3a245de4ff9bab278b98
[ "MIT" ]
null
null
null
""" Django settings for app project. Generated by 'django-admin startproject' using Django 2.2.1. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ # Build paths in...
25.958333
95
0.69961
7ed381e98fff28b3470088aed08c429eb5b66f41
194
py
Python
project/utils/mocks.py
iiii4966/django-test
b194bbedf86cb6e279558ab1647f3681f150a994
[ "BSD-3-Clause" ]
null
null
null
project/utils/mocks.py
iiii4966/django-test
b194bbedf86cb6e279558ab1647f3681f150a994
[ "BSD-3-Clause" ]
null
null
null
project/utils/mocks.py
iiii4966/django-test
b194bbedf86cb6e279558ab1647f3681f150a994
[ "BSD-3-Clause" ]
null
null
null
from django.http import HttpRequest class MockRequest(HttpRequest): def __init__(self, *args, **kwargs): super(MockRequest, self).__init__() self.META = kwargs.get('META')
24.25
43
0.680412
6c1d48fa504809b1ac0eca8c2aa205c352d7d4fd
8,035
py
Python
examples/workloads/wrapper/wrapper/wrapper_main.py
Rajpratik71/workload-collocation-agent
6cf7bdab97ff61d85c21c3effecea632a225c668
[ "Apache-2.0" ]
40
2019-05-16T16:42:33.000Z
2021-11-18T06:33:03.000Z
examples/workloads/wrapper/wrapper/wrapper_main.py
Rajpratik71/workload-collocation-agent
6cf7bdab97ff61d85c21c3effecea632a225c668
[ "Apache-2.0" ]
72
2019-05-09T02:30:25.000Z
2020-11-17T09:24:44.000Z
examples/workloads/wrapper/wrapper/wrapper_main.py
Rajpratik71/workload-collocation-agent
6cf7bdab97ff61d85c21c3effecea632a225c668
[ "Apache-2.0" ]
26
2019-05-20T09:13:38.000Z
2021-12-15T17:57:21.000Z
# Copyright (c) 2018 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 applicable law or agreed to in...
34.484979
99
0.619291
a0b15620180359fd9b42143ed2ec9e15860efe31
7,381
py
Python
dolphin/state_manager.py
Peachball/gym-dolphin
dedccd742079fa45cf0c5a8ca6e3a79d1529e324
[ "MIT" ]
60
2017-02-22T15:04:13.000Z
2021-08-14T19:15:30.000Z
dolphin/state_manager.py
Peachball/gym-dolphin
dedccd742079fa45cf0c5a8ca6e3a79d1529e324
[ "MIT" ]
1
2018-02-20T10:30:26.000Z
2018-02-20T10:30:26.000Z
dolphin/state_manager.py
Peachball/gym-dolphin
dedccd742079fa45cf0c5a8ca6e3a79d1529e324
[ "MIT" ]
15
2017-02-23T05:12:52.000Z
2020-12-21T22:47:29.000Z
import struct import attr from . import ssbm, fields def generic_wrapper(value, wrapper, default): if wrapper is not None: try: value = wrapper(value) except ValueError: value = default return value intStruct = struct.Struct('>i') byte_mask = 0xFF short_mask = 0xFFFF i...
34.981043
122
0.686086
59a2a619406a60773e3713eac6495c7d6bc4ce55
20,517
py
Python
ProgettoLube/WebInspector/venv/Lib/site-packages/skimage/morphology/extrema.py
Lube-Project/ProgettoLube
cbf33971e2c2e865783ec1a2302625539186a338
[ "MIT" ]
2
2022-03-19T09:45:18.000Z
2022-03-19T15:26:24.000Z
ProgettoLube/WebInspector/venv/Lib/site-packages/skimage/morphology/extrema.py
Lube-Project/ProgettoLube
cbf33971e2c2e865783ec1a2302625539186a338
[ "MIT" ]
7
2021-06-08T21:46:24.000Z
2022-03-12T00:35:31.000Z
ProgettoLube/WebInspector/venv/Lib/site-packages/skimage/morphology/extrema.py
Lube-Project/ProgettoLube
cbf33971e2c2e865783ec1a2302625539186a338
[ "MIT" ]
null
null
null
"""extrema.py - local minima and maxima This module provides functions to find local maxima and minima of an image. Here, local maxima (minima) are defined as connected sets of pixels with equal gray level which is strictly greater (smaller) than the gray level of all pixels in direct neighborhood of the connected set...
38.206704
79
0.63016
779d73aa539551bc4900c328c3c726df75c5ef72
6,259
py
Python
src/config.py
AlbertSuarez/3d-net
6b1be62e224030e8c1d9d4695b114a64e8948b02
[ "MIT" ]
1
2020-11-30T06:44:30.000Z
2020-11-30T06:44:30.000Z
src/config.py
AlbertSuarez/3d-net
6b1be62e224030e8c1d9d4695b114a64e8948b02
[ "MIT" ]
null
null
null
src/config.py
AlbertSuarez/3d-net
6b1be62e224030e8c1d9d4695b114a64e8948b02
[ "MIT" ]
null
null
null
import os THINGIVERSE_FLASK_PORT = 8080 THINGIVERSE_FLASK_WAIT_PRE = 3 THINGIVERSE_FLASK_WAIT_POST = 300 THINGIVERSE_FLASK_WAIT_ENABLE = False THINGIVERSE_FLASK_ENDPOINT = '/download' THINGIVERSE_API_NUMBER_PAGES = 1000 THINGIVERSE_API_PER_PAGE = 500 THINGIVERSE_API_CONCURRENCY = 10 THINGIVERSE_API_CONCURRENCY_DOWNLO...
59.609524
89
0.70155
ca4b595c1629e771acabdfff364656768cc081f3
7,323
py
Python
lib/python/treadmill/cli/ssh.py
ms-petrugarstea/treadmill
4c813baf8831918744b5af020938c8a51ed15c72
[ "Apache-2.0" ]
1
2019-04-14T20:17:07.000Z
2019-04-14T20:17:07.000Z
lib/python/treadmill/cli/ssh.py
crazyrex/treadmill
75be287a808a4cbdacab67b3f62a3cb3eb1eab67
[ "Apache-2.0" ]
null
null
null
lib/python/treadmill/cli/ssh.py
crazyrex/treadmill
75be287a808a4cbdacab67b3f62a3cb3eb1eab67
[ "Apache-2.0" ]
null
null
null
"""Trace treadmill application events. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import os import socket import subprocess import sys import click import gevent from gevent import queue as g...
30.135802
79
0.592107
9ed3db48a9e81fcf7596c34d54d0d0a658820341
152
py
Python
hackerrank/warmup/01-SolveMeFirst.py
MrSquanchee/ProblemSolving
309160f6a2fb43ae7673210b01957ffca9247d0d
[ "MIT" ]
39
2020-09-27T05:32:05.000Z
2022-01-08T18:04:05.000Z
hackerrank/warmup/01-SolveMeFirst.py
MrSquanchee/ProblemSolving
309160f6a2fb43ae7673210b01957ffca9247d0d
[ "MIT" ]
5
2020-10-02T13:33:00.000Z
2021-03-01T14:06:08.000Z
hackerrank/warmup/01-SolveMeFirst.py
MrSquanchee/ProblemSolving
309160f6a2fb43ae7673210b01957ffca9247d0d
[ "MIT" ]
8
2021-01-31T10:31:12.000Z
2022-03-13T09:15:55.000Z
def solveMeFirst(a,b): # Hint: Type return a+b below return a+b num1 = int(input()) num2 = int(input()) res = solveMeFirst(num1,num2) print(res)
15.2
30
0.664474
40367478e6ecb717f451987758bce4df07736be3
4,076
py
Python
alipay/aop/api/request/AlipayOpenAppDeveloperCheckdevelopervalidQueryRequest.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/request/AlipayOpenAppDeveloperCheckdevelopervalidQueryRequest.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/request/AlipayOpenAppDeveloperCheckdevelopervalidQueryRequest.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.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayOpenAppDeveloperCheckdevelopervalidQueryModel import AlipayOpenAppDeveloperCheckdevelopervalidQueryModel class AlipayOpenAppDe...
28.110345
148
0.653582
62e38d442a378acac4af22c599c5559181ba15b0
3,221
py
Python
Comparison.py
franreysaycon/BORKOV
238cf69d1e81bb522aacfc3bff48e63ff2a26f0a
[ "MIT" ]
1
2019-09-17T06:51:38.000Z
2019-09-17T06:51:38.000Z
Comparison.py
franreysaycon/BORKOV
238cf69d1e81bb522aacfc3bff48e63ff2a26f0a
[ "MIT" ]
null
null
null
Comparison.py
franreysaycon/BORKOV
238cf69d1e81bb522aacfc3bff48e63ff2a26f0a
[ "MIT" ]
null
null
null
from __future__ import division import os import shutil import numpy as np import matplotlib.image as mpimg import matplotlib.pyplot as plt import SimpleITK as sitk from tkFileDialog import askdirectory from tkFileDialog import askopenfilename from matplotlib import colors from Tkinter import Tk ### start...
26.841667
75
0.656628
4d1e17543772bf19d11e758410148cc5e5f17ca9
799
py
Python
test_autofit/database/query/internal/test_functionality.py
vishalbelsare/PyAutoFit
04b927419fa95c302e0eebab632fc7ebcdc3f06b
[ "MIT" ]
null
null
null
test_autofit/database/query/internal/test_functionality.py
vishalbelsare/PyAutoFit
04b927419fa95c302e0eebab632fc7ebcdc3f06b
[ "MIT" ]
null
null
null
test_autofit/database/query/internal/test_functionality.py
vishalbelsare/PyAutoFit
04b927419fa95c302e0eebab632fc7ebcdc3f06b
[ "MIT" ]
null
null
null
import pytest from autofit.database import query as q def test_trivial(): assert (q.Q("a") & q.Q("a")).query == q.Q("a").query def test_second(): assert (q.Q("a") & q.Q("a", q.Q("b"))).query == (q.Q("a", q.Q("b"))).query def test_and_commutativity(): a_and_b = q.And(q.Q("a"), q.Q("b")) combined =...
19.487805
78
0.550688
282bfdfe9601ca570e28bf74d992b0512979f5a9
3,422
py
Python
lib_youtube_cd_burner/cd.py
jfuruness/lib_youtube_cd_burner
30e0d19243a49a762f51cc58dddb691dea78fad0
[ "BSD-3-Clause" ]
null
null
null
lib_youtube_cd_burner/cd.py
jfuruness/lib_youtube_cd_burner
30e0d19243a49a762f51cc58dddb691dea78fad0
[ "BSD-3-Clause" ]
null
null
null
lib_youtube_cd_burner/cd.py
jfuruness/lib_youtube_cd_burner
30e0d19243a49a762f51cc58dddb691dea78fad0
[ "BSD-3-Clause" ]
null
null
null
import subprocess import time import fcntl import os from contextlib import contextmanager from .disk_values_enum import DiskValues from .song_holder import SongHolder class CDFullError(Exception): pass class CD(SongHolder): """CD class that adds songs and burns cds""" def __init__(self, max_seconds): ...
31.394495
70
0.536821
6f70d91e2178389cf1cbba8aef9c6856c6e63081
642
py
Python
backend/ipproject/core/permissions/resources.py
FedotenkoM/ipsproject
f02ce8acd560b3e10e5357f0605e923396aaafa0
[ "MIT" ]
1
2021-07-28T22:16:53.000Z
2021-07-28T22:16:53.000Z
backend/ipproject/core/permissions/resources.py
FedotenkoM/ipsproject
f02ce8acd560b3e10e5357f0605e923396aaafa0
[ "MIT" ]
11
2021-05-14T12:34:18.000Z
2021-08-22T14:52:01.000Z
backend/ipproject/core/permissions/resources.py
FedotenkoM/ipsproject
f02ce8acd560b3e10e5357f0605e923396aaafa0
[ "MIT" ]
null
null
null
from starlette.responses import JSONResponse from ..utils import jwt_required from ..models import PermissionModel @jwt_required async def get_apps(request, user): sub = PermissionModel.alias() apps = await PermissionModel.outerjoin( sub, PermissionModel.id == sub.id ).select().where( Per...
24.692308
64
0.658879
dac5830b39ee5d68abbfe25be05adb74b482be71
2,375
py
Python
examples/model_fitting/plot_function_fit.py
maahn/meteo_si
821bf0e428f2d8793d30253cb41d71b7c621afef
[ "MIT" ]
null
null
null
examples/model_fitting/plot_function_fit.py
maahn/meteo_si
821bf0e428f2d8793d30253cb41d71b7c621afef
[ "MIT" ]
null
null
null
examples/model_fitting/plot_function_fit.py
maahn/meteo_si
821bf0e428f2d8793d30253cb41d71b7c621afef
[ "MIT" ]
null
null
null
""" ================================ Fitting a function with meteo_si ================================ Meteo SI contains a number of tools for fitting functions to data. This example shows us how to load data into python, fit a function to our datapoints with meteo_si, and then plot the result. This example is meant ...
31.25
79
0.626947
969403cac71be069946988ff305f6e5fa91e1b2c
5,639
py
Python
docs/conf.py
Sanjay-B/Pyblox-Docs
0ba8ec9515b799074b98d2abfd763abf4b23dd1a
[ "MIT" ]
null
null
null
docs/conf.py
Sanjay-B/Pyblox-Docs
0ba8ec9515b799074b98d2abfd763abf4b23dd1a
[ "MIT" ]
2
2018-02-01T10:56:25.000Z
2019-06-06T11:04:12.000Z
docs/conf.py
Sanjay-B/Pyblox-Docs
0ba8ec9515b799074b98d2abfd763abf4b23dd1a
[ "MIT" ]
1
2018-03-11T16:59:24.000Z
2018-03-11T16:59:24.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # pybloxdocs documentation build configuration file, created by # sphinx-quickstart on Sun Jul 16 10:17:27 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present ...
30.814208
80
0.659691
347afad0a6c92156f6b77ca2111749bd0171223d
1,795
py
Python
src/invdx.py
djamriska/project_light
69632023fee0f3164df5fef4dd204fd8f7ee7d34
[ "MIT" ]
null
null
null
src/invdx.py
djamriska/project_light
69632023fee0f3164df5fef4dd204fd8f7ee7d34
[ "MIT" ]
null
null
null
src/invdx.py
djamriska/project_light
69632023fee0f3164df5fef4dd204fd8f7ee7d34
[ "MIT" ]
null
null
null
#invdx.py # An inverted index __author__ = 'Nick Hirakawa' class InvertedIndex: def __init__(self): self.index = dict() def __contains__(self, item): return item in self.index def __getitem__(self, item): return self.index[item] def add(self, word, docid): if word in self.index: if docid in self.in...
21.369048
73
0.68078
8d20b6699a9e5d8891a10bdeb52e7332a15664c3
2,133
py
Python
checks/resolution/plot_resolution.py
ReynLieu/tf-pwa
f354b5036bc8c37ffba95849de5ec3367934eef8
[ "MIT" ]
4
2021-05-10T15:17:24.000Z
2021-08-16T07:40:06.000Z
checks/resolution/plot_resolution.py
ReynLieu/tf-pwa
f354b5036bc8c37ffba95849de5ec3367934eef8
[ "MIT" ]
45
2020-10-24T08:26:19.000Z
2022-03-20T06:14:58.000Z
checks/resolution/plot_resolution.py
ReynLieu/tf-pwa
f354b5036bc8c37ffba95849de5ec3367934eef8
[ "MIT" ]
8
2020-10-24T06:41:06.000Z
2022-01-03T01:29:49.000Z
import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from tf_pwa.config_loader import ConfigLoader from tf_pwa.data import data_index, data_split from tf_pwa.histogram import Hist1D def sum_resolution(amps, weights, size=1): amps = tf.reshape(amps * weights, (-1, size)) amps = tf.reduce...
28.44
67
0.652602
1a9ab6b6f68386d61327db7dc4bc2efb30f9a927
5,541
py
Python
rpython/translator/translator.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
null
null
null
rpython/translator/translator.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
null
null
null
rpython/translator/translator.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
null
null
null
"""PyPy Translator Frontend The Translator is a glue class putting together the various pieces of the translation-related code. It can be used for interactive testing of the translator; see pypy/bin/translatorshell.py. """ import sys import types from rpython.translator import simplify from rpython.flowspace.model i...
37.187919
88
0.642844
3660b861f9cec4e958e149883f21a01c033e9355
459
py
Python
Mundo 3 Estruturas Compostas/ex083.py
costa53/curso_em_video_python3
4f859641324f8b35be56d807f40457d7dddc451f
[ "MIT" ]
1
2022-02-17T16:23:52.000Z
2022-02-17T16:23:52.000Z
Mundo 3 Estruturas Compostas/ex083.py
costa53/curso_em_video_python3
4f859641324f8b35be56d807f40457d7dddc451f
[ "MIT" ]
null
null
null
Mundo 3 Estruturas Compostas/ex083.py
costa53/curso_em_video_python3
4f859641324f8b35be56d807f40457d7dddc451f
[ "MIT" ]
null
null
null
# DESAFIO 083 # Crie um programa onde o usuário digite uma expressão qualquer que use parênteses. Seu aplicativo # deverá analisar se a expressão passada está com os parênteses abertos e fechados na ordem correta. exp = list(str(input('Digite uma expressão: '))) cont = 0 for c in exp: if c == "(": cont += ...
28.6875
100
0.660131
88442930916a328776fdf1d4f234c1b41220a067
1,864
py
Python
GPyOpt/acquisitions/EI.py
zhenwendai/GPyOpt
fd96875e7ec0cb0f78014d96813ece400648827d
[ "BSD-3-Clause" ]
850
2015-05-31T21:12:41.000Z
2022-03-24T17:25:37.000Z
GPyOpt/acquisitions/EI.py
lakshaykc/GPyOpt
097ba66e81c7e22b5bf9fdbe64fd135753bc4a67
[ "BSD-3-Clause" ]
340
2015-09-10T14:08:06.000Z
2022-03-28T20:35:26.000Z
GPyOpt/acquisitions/EI.py
lakshaykc/GPyOpt
097ba66e81c7e22b5bf9fdbe64fd135753bc4a67
[ "BSD-3-Clause" ]
299
2015-07-30T13:18:37.000Z
2022-03-22T21:27:31.000Z
# Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from .base import AcquisitionBase from ..util.general import get_quantiles class AcquisitionEI(AcquisitionBase): """ Expected improvement acquisition function :param model: GPyOpt class of model :para...
35.846154
107
0.67221