hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
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
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
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
3
248
max_forks_repo_name
stringlengths
5
125
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
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
273f5601e7028883ce023d07d960ba6fa3bb289d
1,716
py
Python
M-SPRING/heuristic/shortest_paths.py
CN-UPB/SPRING
1cb74919689e832987cb2c9b490eec7f09a64f52
[ "Apache-2.0" ]
3
2019-09-27T08:07:11.000Z
2021-11-19T11:27:39.000Z
M-SPRING/heuristic/shortest_paths.py
CN-UPB/SPRING
1cb74919689e832987cb2c9b490eec7f09a64f52
[ "Apache-2.0" ]
null
null
null
M-SPRING/heuristic/shortest_paths.py
CN-UPB/SPRING
1cb74919689e832987cb2c9b490eec7f09a64f52
[ "Apache-2.0" ]
null
null
null
import math # return the delay of the specified path (= list of nodes) def path_delay(links, path): delay = 0 # go along nodes of the path and increment delay for each traversed link for i in range(len(path) - 1): # skip connections on same node without a link (both inst at same node) if path[i] != pa...
36.510638
104
0.648601
0
0
0
0
0
0
0
0
651
0.379371
273f6a820dd8f3aeae5864ba60eb32fd5d0541ad
2,398
py
Python
testing/statistic.py
methk/RadixDLT-IoTSimulation
886ba589c8e7be08c95cf3636438c10e97e16752
[ "MIT" ]
null
null
null
testing/statistic.py
methk/RadixDLT-IoTSimulation
886ba589c8e7be08c95cf3636438c10e97e16752
[ "MIT" ]
3
2021-03-09T21:18:22.000Z
2021-09-02T01:05:44.000Z
testing/statistic.py
methk/RadixDLT-IoTSimulation
886ba589c8e7be08c95cf3636438c10e97e16752
[ "MIT" ]
1
2022-02-18T14:51:46.000Z
2022-02-18T14:51:46.000Z
import os import csv import numpy as np import scipy.stats import matplotlib.pyplot as plt plt.style.use('seaborn-whitegrid') def mean_confidence_interval(data, confidence=0.95): a = 1.0 * np.array(data) n = len(a) m, se = np.mean(a), scipy.stats.sem(a) h = se * scipy.stats.t.ppf((1 + confidence) / 2....
27.25
95
0.565888
0
0
0
0
0
0
0
0
166
0.069224
273feec7e2e1888ae2ab4fb11f3421c980ee0353
4,844
py
Python
skutil/preprocessing/tests/test_balance.py
tgsmith61591/pynorm
672e353a721036791e1e32250879c3276961e05a
[ "BSD-3-Clause" ]
38
2016-08-31T19:24:13.000Z
2021-06-28T17:10:20.000Z
skutil/preprocessing/tests/test_balance.py
tgsmith61591/pynorm
672e353a721036791e1e32250879c3276961e05a
[ "BSD-3-Clause" ]
42
2016-06-20T19:07:21.000Z
2017-10-29T20:53:11.000Z
skutil/preprocessing/tests/test_balance.py
tgsmith61591/pynorm
672e353a721036791e1e32250879c3276961e05a
[ "BSD-3-Clause" ]
17
2016-06-27T18:07:53.000Z
2019-04-09T12:33:59.000Z
from __future__ import print_function import pandas as pd import numpy as np from sklearn.datasets import load_iris from skutil.preprocessing import * from skutil.preprocessing.balance import _BaseBalancer from numpy.testing import assert_array_equal from skutil.testing import assert_fails import warnings # Def data f...
27.367232
93
0.635632
244
0.050372
0
0
0
0
0
0
597
0.123245
2740e363aa1f94977ef475388c48f61555bf5a1a
754
py
Python
hard-gists/5017218/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
21
2019-07-08T08:26:45.000Z
2022-01-24T23:53:25.000Z
hard-gists/5017218/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
5
2019-06-15T14:47:47.000Z
2022-02-26T05:02:56.000Z
hard-gists/5017218/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
17
2019-05-16T03:50:34.000Z
2021-01-14T14:35:12.000Z
#!/usr/bin/env python from Crypto.Cipher import AES from Crypto.Util.strxor import strxor from binascii import hexlify K = '0123456789abcdef' cipher = AES.new(K, AES.MODE_ECB) # Original Message M1 = K M2 = K Cm0 = cipher.encrypt('\0' * AES.block_size) Cm1 = cipher.encrypt(strxor(Cm0,M1)) Tm = Cm2 = cipher.encrypt(s...
25.133333
47
0.709549
0
0
0
0
0
0
0
0
199
0.263926
274247c350250c602de94ec641a4010f931234e4
3,540
py
Python
options/running_options.py
kwshh/ImageDeconvlution
561468463372a5727b553efa0330fc75901e29fc
[ "MIT" ]
25
2019-05-10T13:51:25.000Z
2021-10-13T01:35:43.000Z
options/running_options.py
kwshh/ImageDeconvlution
561468463372a5727b553efa0330fc75901e29fc
[ "MIT" ]
8
2019-05-10T13:51:07.000Z
2021-06-03T07:13:28.000Z
options/running_options.py
kwshh/ImageDeconvlution
561468463372a5727b553efa0330fc75901e29fc
[ "MIT" ]
7
2020-08-15T09:16:11.000Z
2021-07-06T21:54:20.000Z
import argparse def str2bool(v): if v.lower() in ('yes', 'true', 't', 'y', '1'): return True elif v.lower() in ('no', 'false', 'f', 'n', '0'): return False else: raise argparse.ArgumentTypeError('Boolean value expected.') class Options(): def __init__(self): """Reset t...
41.647059
110
0.487288
3,277
0.925706
0
0
0
0
0
0
924
0.261017
2743e4857e6a05d46ea22a4c0d0bcac87b1eae86
982
py
Python
python/scanr_doiresolver-0.10/scanr_doiresolver/main.py
dataesr/scanr-backend
39681be69b9a96b4a07b9410754c897cd5b65c24
[ "MIT" ]
null
null
null
python/scanr_doiresolver-0.10/scanr_doiresolver/main.py
dataesr/scanr-backend
39681be69b9a96b4a07b9410754c897cd5b65c24
[ "MIT" ]
null
null
null
python/scanr_doiresolver-0.10/scanr_doiresolver/main.py
dataesr/scanr-backend
39681be69b9a96b4a07b9410754c897cd5b65c24
[ "MIT" ]
null
null
null
import json from companies_plugin import extractor from companies_plugin.utils import add_logger from scanr_doiresolver import LIB_PATH from scanr_doiresolver.resolver import resolve_publications @add_logger class Extractor(extractor.Extractor): def extract(self, headers, properties, message): """ ...
30.6875
96
0.602851
518
0.527495
0
0
530
0.539715
0
0
242
0.246436
27453b9db08872e055996422f63acffb64350e41
361
py
Python
examples/03additionals/legacy_score.py
dotness/swagger-marshmallow-codegen
62938d780672d754431d50bde3eae04abefb64f1
[ "MIT" ]
null
null
null
examples/03additionals/legacy_score.py
dotness/swagger-marshmallow-codegen
62938d780672d754431d50bde3eae04abefb64f1
[ "MIT" ]
null
null
null
examples/03additionals/legacy_score.py
dotness/swagger-marshmallow-codegen
62938d780672d754431d50bde3eae04abefb64f1
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- # this is auto-generated by swagger-marshmallow-codegen from swagger_marshmallow_codegen.schema.legacy import ( AdditionalPropertiesSchema, LegacySchema ) from marshmallow import fields class Score(AdditionalPropertiesSchema): name = fields.String(required=True) class Meta: ...
24.066667
55
0.753463
141
0.390582
0
0
0
0
0
0
77
0.213296
2746d32e08d6ab65d2525605b064c6bb89db2db5
1,280
py
Python
tests/bigwig/test_create_bigwigs.py
BioinformaticsMaterials/epic
d601f2384784ea38f5de8c25156be4c8d9ef2fff
[ "MIT" ]
null
null
null
tests/bigwig/test_create_bigwigs.py
BioinformaticsMaterials/epic
d601f2384784ea38f5de8c25156be4c8d9ef2fff
[ "MIT" ]
null
null
null
tests/bigwig/test_create_bigwigs.py
BioinformaticsMaterials/epic
d601f2384784ea38f5de8c25156be4c8d9ef2fff
[ "MIT" ]
null
null
null
import pytest import pandas as pd import numpy as np from os import stat from io import StringIO from epic.bigwig.create_bigwigs import _create_bigwig from epic.config.genomes import create_genome_size_dict @pytest.fixture def input_data(): contents = u"""Chromosome Bin End examples/test.bed chr1 887600 887799 ...
21.333333
76
0.767969
0
0
0
0
1,062
0.829688
0
0
508
0.396875
27484ca2bc8228c9f67c0d19e4ae6ba4c2b57e35
555
py
Python
tests/solvers/__init__.py
neuyhwu/MIPLearn
c6b31a827d6c6e682d45171f21478162c0bc46d6
[ "BSD-3-Clause" ]
64
2020-02-27T01:24:40.000Z
2022-03-31T12:38:56.000Z
tests/solvers/__init__.py
neuyhwu/MIPLearn
c6b31a827d6c6e682d45171f21478162c0bc46d6
[ "BSD-3-Clause" ]
3
2020-04-07T14:43:31.000Z
2021-01-15T14:02:01.000Z
tests/solvers/__init__.py
zclab/MIPLearn
9bd64c885aa645d41c30fa0ec4e0eedfaf703dac
[ "BSD-3-Clause" ]
13
2020-03-30T16:41:38.000Z
2022-02-17T15:38:01.000Z
# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization # Copyright (C) 2020-2021, UChicago Argonne, LLC. All rights reserved. # Released under the modified BSD license. See COPYING.md for more details. from io import StringIO from miplearn.solvers import _RedirectOutput def test_redirec...
30.833333
82
0.731532
0
0
0
0
0
0
0
0
257
0.463063
27486b3592aa44c1f3081be500edb4d9d40e6414
1,717
py
Python
QuantumBlack Machine Learning Software Engineer 2019/Correlation.py
sivolko/codeforce
4b00c4c012780036e56d2f0e79adb2f5db7559df
[ "MIT" ]
3
2021-04-21T07:11:33.000Z
2022-01-09T00:05:55.000Z
InterviewChallenges/QuantumBlack Machine Learning Software Engineer 2019/Correlation.py
sweetpand/Algorithms
2e4dcf2d42de25531fae5b4ec0d96ce100043117
[ "MIT" ]
null
null
null
InterviewChallenges/QuantumBlack Machine Learning Software Engineer 2019/Correlation.py
sweetpand/Algorithms
2e4dcf2d42de25531fae5b4ec0d96ce100043117
[ "MIT" ]
null
null
null
import math def Correlation(scores): physics = [] maths = [] chemistry = [] for each_scores in scores: values = each_scores.split("\t") maths.append(int(values[0])) physics.append(int(values[1])) chemistry.append(int(values[2])) length = len(physics) value1 = ...
33.019231
115
0.638905
0
0
0
0
0
0
0
0
527
0.306931
27487403a3d7b9e65ea004d6b9bb66d14163ac93
2,617
py
Python
utest/test_iinekoko_db.py
MizunagiKB/IIneKoKo
495ae6dc2887bb8b41331fab1f21812368400cf2
[ "MIT" ]
null
null
null
utest/test_iinekoko_db.py
MizunagiKB/IIneKoKo
495ae6dc2887bb8b41331fab1f21812368400cf2
[ "MIT" ]
null
null
null
utest/test_iinekoko_db.py
MizunagiKB/IIneKoKo
495ae6dc2887bb8b41331fab1f21812368400cf2
[ "MIT" ]
null
null
null
import sys import unittest import configparser sys.path.append("./svc") class CIIneKoKo_DB(unittest.TestCase): def setUp(self): import iinekoko_db self.o_conf = configparser.ConfigParser() self.o_conf.read("./svc/config.ini") self.o_conn = iinekoko_db.CDatabase(self.o_conf) d...
29.077778
79
0.632404
2,531
0.967138
0
0
0
0
0
0
2,276
0.869698
2748a53e6b912bda05b5145d677d95d85ebd3529
987
py
Python
Champion.py
KhangOP/PaladinsAssistantBot
9b705dc688610ba52909f0b0e152d8684006c6a6
[ "MIT" ]
null
null
null
Champion.py
KhangOP/PaladinsAssistantBot
9b705dc688610ba52909f0b0e152d8684006c6a6
[ "MIT" ]
null
null
null
Champion.py
KhangOP/PaladinsAssistantBot
9b705dc688610ba52909f0b0e152d8684006c6a6
[ "MIT" ]
null
null
null
# Class to store champion names in one location class Champion: """Champions in Paladins""" DAMAGES = ["Cassie", "Kinessa", "Drogoz", "Bomb King", "Viktor", "Sha Lin", "Tyra", "Willo", "Lian", "Strix", "Vivian", "Dredge", "Imani", "Tiberius"] FLANKS = ["Skye", "Buck", "Evie", "Androxus", "Mae...
42.913043
116
0.566363
938
0.950355
0
0
0
0
0
0
432
0.43769
27491dfc485679f55f2ea50c1629c408b70c365b
2,292
py
Python
src/gpuz/data_helper.py
scalasm/gpuz-log-analysis
c9a6dd46bf8a12120c9d284411c5b1562b97fdfd
[ "Apache-2.0" ]
null
null
null
src/gpuz/data_helper.py
scalasm/gpuz-log-analysis
c9a6dd46bf8a12120c9d284411c5b1562b97fdfd
[ "Apache-2.0" ]
null
null
null
src/gpuz/data_helper.py
scalasm/gpuz-log-analysis
c9a6dd46bf8a12120c9d284411c5b1562b97fdfd
[ "Apache-2.0" ]
null
null
null
import logging from typing import Optional, List, Any import gpuz.utility as utility from pathlib import Path import os import pandas as pd from pandas.core.frame import DataFrame import numpy as np import matplotlib as mp logger: logging.Logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) class D...
32.742857
94
0.665794
1,783
0.777923
0
0
184
0.080279
0
0
338
0.147469
274a678ce7ef66ccf7cfb21453ee41a8617d1632
4,173
py
Python
m5-101/content/solutions/web-crawler/section1&2&3.py
PaulCCCCCCH/m5-101
81201b00cd81c1747ea0cd5f042a09eda02d6d1c
[ "MIT" ]
4
2021-03-25T13:15:38.000Z
2021-11-10T12:29:19.000Z
m5-101/content/solutions/web-crawler/section1&2&3.py
PaulCCCCCCH/m5-101
81201b00cd81c1747ea0cd5f042a09eda02d6d1c
[ "MIT" ]
null
null
null
m5-101/content/solutions/web-crawler/section1&2&3.py
PaulCCCCCCH/m5-101
81201b00cd81c1747ea0cd5f042a09eda02d6d1c
[ "MIT" ]
4
2021-03-25T13:18:10.000Z
2021-04-08T13:44:48.000Z
from posix import listdir import requests from bs4 import BeautifulSoup as bs import math import sys, getopt import re import os def re_cleaner(target: str, rep: str) -> str: return re.sub("[^0-9a-zA-Z]+", rep, target) # For Oxford ============================================================================== ...
32.601563
163
0.578481
0
0
0
0
0
0
0
0
3,176
0.737404
274f3dedfd8af9c5162a6375c14921ce4ca86095
6,319
py
Python
sandbox/andrew/run_trpo_strike.py
leopauly/Observation-Learning-Simulations
462c04a87c45aae51537b8ea5b44646afa31d3a5
[ "MIT" ]
49
2017-12-11T11:00:02.000Z
2022-03-30T05:19:31.000Z
sandbox/andrew/run_trpo_strike.py
leopauly/Observation-Learning-Simulations
462c04a87c45aae51537b8ea5b44646afa31d3a5
[ "MIT" ]
2
2018-01-01T17:39:56.000Z
2019-07-24T04:49:08.000Z
sandbox/andrew/run_trpo_strike.py
leopauly/Observation-Learning-Simulations
462c04a87c45aae51537b8ea5b44646afa31d3a5
[ "MIT" ]
12
2017-12-13T11:52:17.000Z
2020-12-03T00:53:29.000Z
import os from rllab.baselines.linear_feature_baseline import LinearFeatureBaseline # from rllab.envs.mujoco.gather.swimmer_gather_env import SwimmerGatherEnv os.environ["THEANO_FLAGS"] = "device=cpu" from rllab.envs.gym_env import GymEnv from rllab.envs.normalized_env import normalize from rllab.policies.gaussian_mlp...
37.613095
100
0.547238
0
0
0
0
0
0
0
0
1,336
0.211426
274fe43fa546672495660673160348de8f0a6c2e
17,257
py
Python
bpmfwfft/fft_sampling.py
jimtufts/bpmfwfft
091d2269b122f00b9dd8a01e34303e3e946f8ea0
[ "MIT" ]
null
null
null
bpmfwfft/fft_sampling.py
jimtufts/bpmfwfft
091d2269b122f00b9dd8a01e34303e3e946f8ea0
[ "MIT" ]
null
null
null
bpmfwfft/fft_sampling.py
jimtufts/bpmfwfft
091d2269b122f00b9dd8a01e34303e3e946f8ea0
[ "MIT" ]
null
null
null
""" This is to generate interaction energies and corresponding translational vectors, given a fixed receptor and an ensemble of ligand coordinates (including rotations and/or configurations) """ from __future__ import print_function import numpy as np import netCDF4 try: from bpmfwfft.grids import RecGrid fr...
42.296569
134
0.665121
15,119
0.876108
0
0
0
0
0
0
4,679
0.271136
27516da8559c76c6cbc57c679759132dc516e07e
6,241
py
Python
kotori/config.py
joshuaavalon/kotori
3e7e1cf7b2c1834aea9a9404e80a53f8282aba1b
[ "Apache-2.0" ]
null
null
null
kotori/config.py
joshuaavalon/kotori
3e7e1cf7b2c1834aea9a9404e80a53f8282aba1b
[ "Apache-2.0" ]
null
null
null
kotori/config.py
joshuaavalon/kotori
3e7e1cf7b2c1834aea9a9404e80a53f8282aba1b
[ "Apache-2.0" ]
null
null
null
import json import re from abc import ABC, abstractmethod from dataclasses import dataclass, field from os.path import splitext from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Type, Union from PIL import Image from ruamel.yaml import YAML from kotori.error import ConfigError __all__ = [...
30.296117
78
0.621054
5,667
0.908028
198
0.031726
4,286
0.686749
0
0
472
0.075629
27542459664ee95574391c6b162f6e4cf09c76b9
4,587
py
Python
parser_utils.py
fgypas/panoptes
d85bf83905fd0e546cce11e00d4daf4da2199fbf
[ "MIT" ]
1
2019-11-03T22:08:19.000Z
2019-11-03T22:08:19.000Z
parser_utils.py
fgypas/panoptes
d85bf83905fd0e546cce11e00d4daf4da2199fbf
[ "MIT" ]
27
2019-10-23T19:24:38.000Z
2022-02-10T19:40:24.000Z
parser_utils.py
fgypas/panoptes
d85bf83905fd0e546cce11e00d4daf4da2199fbf
[ "MIT" ]
null
null
null
import os import re from pprint import pprint from pandas.io.json import json_normalize import datetime import argparse import sys DATE = 'date' LEVEL = 'level' TYPE = 'type' CLASS = 'class' MESSAGE = 'message' def match_date(line): match_this = '' matched = re.match(r'\[\w\w\w\s\w\w\w \d\d \d\d:\d\d:\d\d\s\d...
30.177632
106
0.480706
0
0
553
0.120558
0
0
0
0
1,155
0.251799
2755a12d13ff285f1e00c9a95f222cd1d7e6e11b
71
py
Python
nimanifold/data/__init__.py
jcreinhold/nimanifold
21e6546d24304a7ccfdd6a56d7ec47b2527e1c15
[ "Apache-2.0" ]
null
null
null
nimanifold/data/__init__.py
jcreinhold/nimanifold
21e6546d24304a7ccfdd6a56d7ec47b2527e1c15
[ "Apache-2.0" ]
null
null
null
nimanifold/data/__init__.py
jcreinhold/nimanifold
21e6546d24304a7ccfdd6a56d7ec47b2527e1c15
[ "Apache-2.0" ]
null
null
null
from nimanifold.data.csv import * from nimanifold.data.sample import *
23.666667
36
0.802817
0
0
0
0
0
0
0
0
0
0
2756a87403668d7d8cbcd575aefad24bc180bbaa
452
py
Python
Simulations/Test.py
BoettigerLab/polychrom
b9d6b0e0f1a62def13ac28a32232c33628e43dae
[ "MIT" ]
null
null
null
Simulations/Test.py
BoettigerLab/polychrom
b9d6b0e0f1a62def13ac28a32232c33628e43dae
[ "MIT" ]
null
null
null
Simulations/Test.py
BoettigerLab/polychrom
b9d6b0e0f1a62def13ac28a32232c33628e43dae
[ "MIT" ]
null
null
null
import sys import os import numpy as np import ast import pandas as pd from LEBondUpdater import bondUpdater import polychrom from polychrom.starting_conformations import grow_cubic from polychrom.hdf5_format import HDF5Reporter, list_URIs, load_URI, load_hdf5_file from polychrom.simulation import Simulation from pol...
21.52381
83
0.85177
0
0
0
0
0
0
0
0
10
0.022124
27574dceb612771ac763cff0815e740d67568d21
373
py
Python
deca/gui/deca_interfaces.py
kk49/deca
8a03ea5d1b7ae0d787638f1797b6e2cb46de4bae
[ "MIT" ]
50
2019-06-05T04:01:04.000Z
2022-03-05T14:56:43.000Z
deca/gui/deca_interfaces.py
kk49/deca
8a03ea5d1b7ae0d787638f1797b6e2cb46de4bae
[ "MIT" ]
115
2019-03-27T13:34:00.000Z
2022-03-11T23:43:12.000Z
deca/gui/deca_interfaces.py
kk49/deca
8a03ea5d1b7ae0d787638f1797b6e2cb46de4bae
[ "MIT" ]
13
2020-01-25T01:15:49.000Z
2022-02-08T02:20:05.000Z
from PySide2.QtCore import Signal from PySide2.QtWidgets import QWidget from deca.db_view import VfsView class IVfsViewSrc(QWidget): signal_visible_changed = Signal(VfsView) signal_selection_changed = Signal(VfsView) def vfs_get(self): return None def vfs_view_get(self): return None ...
20.722222
46
0.723861
265
0.710456
0
0
0
0
0
0
0
0
2758815a9272e4ba22d391476a74de67b2fc6c02
7,746
py
Python
python/beached_probability.py
OceanParcels/BayesianAnalysis_SouthAtlantic
a808896ea9104931a6ad625531231525c6c12826
[ "MIT" ]
1
2022-01-12T08:24:14.000Z
2022-01-12T08:24:14.000Z
python/beached_probability.py
OceanParcels/BayesianAnalysis_SouthAtlantic
a808896ea9104931a6ad625531231525c6c12826
[ "MIT" ]
null
null
null
python/beached_probability.py
OceanParcels/BayesianAnalysis_SouthAtlantic
a808896ea9104931a6ad625531231525c6c12826
[ "MIT" ]
null
null
null
""" Computes the probability field of beached particles from Ocean Parcels simulations. Computes the posterior probability in the latitude of the beached particles. """ import numpy as np import xarray as xr import pandas as pd import os def time_averaging_coast(array, window=30): """It averages the counts_americ...
35.53211
79
0.572941
0
0
0
0
0
0
0
0
3,341
0.431319
2759eded27b5f65ad495b43a6846ccc30736fba9
2,985
py
Python
models/cam_decoder.py
BwCai/DCAA-UDA
359c2122060aebfbe4384c918768c261fe2dc9c7
[ "Apache-2.0" ]
2
2022-01-28T10:35:53.000Z
2022-03-09T14:38:59.000Z
models/cam_decoder.py
BwCai/DCAA-UDA
359c2122060aebfbe4384c918768c261fe2dc9c7
[ "Apache-2.0" ]
1
2022-03-07T10:48:11.000Z
2022-03-07T10:48:11.000Z
models/cam_decoder.py
BwCai/DCAA-UDA
359c2122060aebfbe4384c918768c261fe2dc9c7
[ "Apache-2.0" ]
null
null
null
import math import torch import torch.nn as nn import torch.nn.functional as F from models.sync_batchnorm.batchnorm import SynchronizedBatchNorm2d from models.aspp import build_aspp from models.decoder import build_decoder import pdb class AttentionDecoder(nn.Module): def __init__(self, num_classes, modal_num, bac...
37.78481
98
0.59665
2,601
0.871357
0
0
0
0
0
0
113
0.037856
275bb771b2d649e2d94b8d769d96499bc3dc8e16
2,505
py
Python
src/server/noize_reduction.py
kikuchiken-waseda/MRIVuewer
66cfe30d006b6491a093a9dfab5b538c5e49409e
[ "MIT" ]
null
null
null
src/server/noize_reduction.py
kikuchiken-waseda/MRIVuewer
66cfe30d006b6491a093a9dfab5b538c5e49409e
[ "MIT" ]
23
2020-02-11T19:13:24.000Z
2020-05-16T07:49:43.000Z
src/server/noize_reduction.py
kikuchiken-waseda/MRIVuewer
66cfe30d006b6491a093a9dfab5b538c5e49409e
[ "MIT" ]
null
null
null
import scipy as sp from pyssp.util import ( get_frame, add_signal, compute_avgpowerspectrum ) def writeWav(param, signal, filename): import wave with wave.open(filename, 'wb') as wf: wf.setparams(param) s = sp.int16(signal * 32767.0).tostring() wf.writeframes(s) def jointMap(sign...
30.54878
77
0.621158
0
0
0
0
0
0
0
0
102
0.040719
275bf3b0ea75846995ad189f786825044efb445e
4,940
py
Python
chord_rec/harmalysis/classes/scale.py
TianxueHu/ChordSymbolRec
d64a5be4f4914e6f682cb6d4079d7ba8a6fc2eac
[ "Unlicense", "MIT" ]
null
null
null
chord_rec/harmalysis/classes/scale.py
TianxueHu/ChordSymbolRec
d64a5be4f4914e6f682cb6d4079d7ba8a6fc2eac
[ "Unlicense", "MIT" ]
null
null
null
chord_rec/harmalysis/classes/scale.py
TianxueHu/ChordSymbolRec
d64a5be4f4914e6f682cb6d4079d7ba8a6fc2eac
[ "Unlicense", "MIT" ]
null
null
null
''' harmalysis - a language for harmonic analysis and roman numerals Copyright (C) 2020 Nestor Napoles Lopez 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 t...
35.285714
84
0.411943
4,088
0.82753
0
0
0
0
0
0
1,615
0.326923
275c01a7663aa8d447750578c192b3d7fd40d88b
1,335
py
Python
airq/api/crypto.py
dwightmulcahy/airq
82e97825f70852d7fab973e498ef71345e1ed422
[ "MIT" ]
6
2020-11-25T10:34:52.000Z
2022-02-18T22:22:12.000Z
airq/api/crypto.py
dwightmulcahy/airq
82e97825f70852d7fab973e498ef71345e1ed422
[ "MIT" ]
6
2021-10-15T06:49:14.000Z
2021-11-09T20:30:01.000Z
airq/api/crypto.py
dwightmulcahy/airq
82e97825f70852d7fab973e498ef71345e1ed422
[ "MIT" ]
2
2021-04-18T03:11:35.000Z
2022-01-01T23:02:51.000Z
import hashlib from Crypto.Cipher import AES class Crypto: SALT = "@uhooinc.com" def __init__(self, clientCode): self.key = hashlib.md5( clientCode.encode("utf-8") ).digest() # initialization key self.length = AES.block_size # Initialize the block size self.aes =...
32.560976
112
0.597753
1,287
0.964045
0
0
0
0
0
0
318
0.238202
275c77321e139727fd234a2be346f888681c1954
8,350
py
Python
idaes/apps/caprese/examples/cstr_rodrigo/nmpc_main.py
Robbybp/idaes-pse
8a41dbd05819f82806cf17a6e5f06aef79a775e3
[ "RSA-MD" ]
null
null
null
idaes/apps/caprese/examples/cstr_rodrigo/nmpc_main.py
Robbybp/idaes-pse
8a41dbd05819f82806cf17a6e5f06aef79a775e3
[ "RSA-MD" ]
2
2021-08-18T19:42:02.000Z
2021-10-22T04:44:31.000Z
idaes/apps/caprese/examples/cstr_rodrigo/nmpc_main.py
Robbybp/idaes-pse
8a41dbd05819f82806cf17a6e5f06aef79a775e3
[ "RSA-MD" ]
1
2021-03-17T20:31:17.000Z
2021-03-17T20:31:17.000Z
############################################################################## # Institute for the Design of Advanced Energy Systems Process Systems # Engineering Framework (IDAES PSE Framework) Copyright (c) 2018-2019, by the # software owners: The Regents of the University of California, through # Lawrence Berkeley N...
38.127854
82
0.623713
0
0
0
0
0
0
0
0
2,174
0.260359
275e2811cd73b93eae3878d64929106994338a2d
1,642
py
Python
apps/scheduler/migrations/0008_current_task.py
techlib/czechelib-stats
ca132e326af0924740a525710474870b1fb5fd37
[ "MIT" ]
1
2019-12-12T15:38:42.000Z
2019-12-12T15:38:42.000Z
apps/scheduler/migrations/0008_current_task.py
techlib/czechelib-stats
ca132e326af0924740a525710474870b1fb5fd37
[ "MIT" ]
null
null
null
apps/scheduler/migrations/0008_current_task.py
techlib/czechelib-stats
ca132e326af0924740a525710474870b1fb5fd37
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2020-11-23 15:06 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('scheduler', '0007_fetchintention_one_to_one_attempt'), ] operations = [ migrations.AddField( mo...
30.407407
85
0.54933
1,516
0.923264
0
0
0
0
0
0
362
0.220463
275e8507ce35dccac0615b8d962c545d75b3823a
2,555
py
Python
connect_four/transposition/sqlite_transposition_table_test.py
rpachauri/connect4
6caf6965afaaff6883193ac295c6ac5b1f4e9c4a
[ "MIT" ]
null
null
null
connect_four/transposition/sqlite_transposition_table_test.py
rpachauri/connect4
6caf6965afaaff6883193ac295c6ac5b1f4e9c4a
[ "MIT" ]
null
null
null
connect_four/transposition/sqlite_transposition_table_test.py
rpachauri/connect4
6caf6965afaaff6883193ac295c6ac5b1f4e9c4a
[ "MIT" ]
null
null
null
import unittest import gym import numpy as np from connect_four.hashing import TicTacToeHasher from connect_four.transposition.sqlite_transposition_table import SQLiteTranspositionTable class TestSQLiteTranspositionTable(unittest.TestCase): def setUp(self) -> None: self.env = gym.make('tic_tac_toe-v0') ...
30.416667
90
0.523288
2,315
0.906067
0
0
0
0
0
0
78
0.030528
275ea88f14a647fe3701cbe45b6f30ea2d89fba6
1,226
py
Python
test/unittests/study/mri/test_mc.py
szho42/banana
131804803e6293716e9d11cbb6f3ca244b2931f9
[ "Apache-2.0" ]
null
null
null
test/unittests/study/mri/test_mc.py
szho42/banana
131804803e6293716e9d11cbb6f3ca244b2931f9
[ "Apache-2.0" ]
null
null
null
test/unittests/study/mri/test_mc.py
szho42/banana
131804803e6293716e9d11cbb6f3ca244b2931f9
[ "Apache-2.0" ]
null
null
null
from nipype import config config.enable_debug_mode() from banana.testing import BaseTestCase as TestCase # @IgnorePep8 @Reimport # from banana.study.multimodal.test_motion_detection import ( # @IgnorePep8 @Reimport # MotionDetection, inputs) from banana.study.multimodal.mrpet import create_motion_correction_class...
32.263158
97
0.681892
754
0.615008
0
0
0
0
0
0
539
0.439641
275f0b6cee294c3156bfba77754c517b6dc76211
162
py
Python
dgbpy/__init__.py
maxprop/dgbpy
05d0900b0fb2cb612b298c8c78f0f84640a38c4e
[ "Apache-2.0" ]
7
2021-11-18T18:03:46.000Z
2022-02-09T06:55:50.000Z
dgbpy/__init__.py
maxprop/dgbpy
05d0900b0fb2cb612b298c8c78f0f84640a38c4e
[ "Apache-2.0" ]
null
null
null
dgbpy/__init__.py
maxprop/dgbpy
05d0900b0fb2cb612b298c8c78f0f84640a38c4e
[ "Apache-2.0" ]
1
2022-03-18T06:55:55.000Z
2022-03-18T06:55:55.000Z
# # (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt # AUTHOR : Bert # DATE : August 2018 # # Module init # __version__ = '1.0.0'
16.2
75
0.635802
0
0
0
0
0
0
0
0
139
0.858025
27616031c83ae4189c96219a4ca18b7e0e254aed
1,052
py
Python
tests/test_country_service.py
gothill/python-fedex
62dc8f554babd7066d6c6e7c478944f30fc2b75b
[ "BSD-3-Clause" ]
100
2016-01-22T23:46:10.000Z
2022-03-26T05:00:53.000Z
tests/test_country_service.py
gothill/python-fedex
62dc8f554babd7066d6c6e7c478944f30fc2b75b
[ "BSD-3-Clause" ]
77
2016-01-19T06:10:22.000Z
2022-03-26T06:04:14.000Z
tests/test_country_service.py
gothill/python-fedex
62dc8f554babd7066d6c6e7c478944f30fc2b75b
[ "BSD-3-Clause" ]
102
2016-02-08T23:28:45.000Z
2022-02-28T11:37:27.000Z
""" Test module for the Fedex CountryService WSDL. """ import unittest import logging import sys sys.path.insert(0, '..') from fedex.services.country_service import FedexValidatePostalRequest # Common global config object for testing. from tests.common import get_fedex_config CONFIG_OBJ = get_fedex_config() loggin...
25.658537
75
0.742395
447
0.424905
0
0
523
0.497148
0
0
251
0.238593
27621f7f93d71cdc400cae5017e3588d01c3c114
3,730
py
Python
setup_tools/getkucore.py
dougmassay/kindleunpack-calibre-plugin
906fc3820a9b1c179fc754ae5774ebe689a61419
[ "Unlicense", "MIT" ]
101
2015-03-24T10:29:15.000Z
2022-03-25T07:15:45.000Z
setup_tools/getkucore.py
dougmassay/kindleunpack-calibre-plugin
906fc3820a9b1c179fc754ae5774ebe689a61419
[ "Unlicense", "MIT" ]
3
2016-09-14T10:47:02.000Z
2018-01-09T13:32:29.000Z
setup_tools/getkucore.py
dougmassay/kindleunpack-calibre-plugin
906fc3820a9b1c179fc754ae5774ebe689a61419
[ "Unlicense", "MIT" ]
13
2015-09-28T07:05:18.000Z
2022-02-13T15:16:13.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab from __future__ import unicode_literals, division, absolute_import, print_function import os import sys import shutil import inspect import glob import zipfile import pythonpatch if sys.version_info >= (3,): import url...
36.930693
95
0.627346
0
0
0
0
0
0
0
0
821
0.220107
2764c5afd2309a3e37c20e039e1d0182465889f2
5,696
py
Python
pymoku/_oscilloscope_data.py
liquidinstruments/pymoku
a10c2516e5953722a5f5b52aec7944bec22492c2
[ "MIT" ]
11
2016-10-11T04:37:14.000Z
2021-09-10T02:34:03.000Z
pymoku/_oscilloscope_data.py
liquidinstruments/pymoku
a10c2516e5953722a5f5b52aec7944bec22492c2
[ "MIT" ]
8
2017-06-02T18:19:49.000Z
2020-09-07T06:15:53.000Z
pymoku/_oscilloscope_data.py
liquidinstruments/pymoku
a10c2516e5953722a5f5b52aec7944bec22492c2
[ "MIT" ]
11
2018-07-12T04:18:40.000Z
2022-03-04T10:10:48.000Z
import struct from pymoku import _frame_instrument _OSC_SCREEN_WIDTH = 1024 class VoltsData(_frame_instrument.InstrumentData): """ Object representing a frame of dual-channel data in units of Volts, and time in units of seconds. This is the native output format of the :any:`Oscilloscope` instrument....
35.6
78
0.596208
5,615
0.985779
0
0
0
0
0
0
2,298
0.403441
2764e8cf2af125cde1e1dea98f00be38d0e21369
6,205
py
Python
FlightRisingColiseum/Bot_FR.py
Eternal05/Flightrising-Coliseum-Bot
8f4895ff8a2d5533fe6a6546e09361738fd54910
[ "MIT" ]
1
2021-05-17T02:52:40.000Z
2021-05-17T02:52:40.000Z
FlightRisingColiseum/Bot_FR.py
Eternal05/Flightrising-Coliseum-Bot
8f4895ff8a2d5533fe6a6546e09361738fd54910
[ "MIT" ]
null
null
null
FlightRisingColiseum/Bot_FR.py
Eternal05/Flightrising-Coliseum-Bot
8f4895ff8a2d5533fe6a6546e09361738fd54910
[ "MIT" ]
null
null
null
import os from PIL import ImageGrab import time import win32api, win32con from PIL import ImageOps from numpy import * import pyautogui import random from ctypes import windll user32 = windll.user32 user32.SetProcessDPIAware() #some sort of DPS problem unrelated to project #this stops the images from be...
34.859551
134
0.604674
538
0.086704
0
0
0
0
0
0
2,516
0.405479
2764ee38e5ee492d56a5166db4a12d098e304e48
6,047
py
Python
models/layers.py
RemiDelaunay/DeepUSE
fea4220d53583fe3d4e63c870a62b04deb005eda
[ "MIT" ]
2
2021-08-19T07:40:35.000Z
2022-01-14T18:55:58.000Z
models/layers.py
RemiDelaunay/DeepUSE
fea4220d53583fe3d4e63c870a62b04deb005eda
[ "MIT" ]
null
null
null
models/layers.py
RemiDelaunay/DeepUSE
fea4220d53583fe3d4e63c870a62b04deb005eda
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class ConvLSTMCell(nn.Module): """ Generate a convolutional LSTM cell Adapted from "RVOS: End-to-End Recurrent Network for Video Object Segmentation" """ def __init__(self, input_size, hidden_size...
38.272152
123
0.64379
5,583
0.923268
0
0
0
0
0
0
355
0.058707
2765c7c3e9e989737c9e28cfcc8a7675bc22b1e5
907
py
Python
main.py
denissearenas/face_recognition_image
63f43ae188cc12ba443d2aeff84959eba95c9049
[ "MIT" ]
null
null
null
main.py
denissearenas/face_recognition_image
63f43ae188cc12ba443d2aeff84959eba95c9049
[ "MIT" ]
null
null
null
main.py
denissearenas/face_recognition_image
63f43ae188cc12ba443d2aeff84959eba95c9049
[ "MIT" ]
null
null
null
import logging from logging.config import fileConfig import os, os.path import imageRecognition #Test Folder TestFolder = 'WorkingFolder/TestImages/' # Create the Working folders working_folders = ['logs','.metadata','WorkingFolder','./Workingfolder/OutputImages'] [os.makedirs(folder) for folder in working_folders...
24.513514
114
0.680265
0
0
0
0
0
0
0
0
190
0.209482
2768921c04ac38d6998b1d53e7d2b264cb24e683
755
py
Python
Medio 3/ex056.py
Gustavsantos/python1
5520f2d2ee591157942008fdcd6bd42eb521f1a6
[ "MIT" ]
null
null
null
Medio 3/ex056.py
Gustavsantos/python1
5520f2d2ee591157942008fdcd6bd42eb521f1a6
[ "MIT" ]
null
null
null
Medio 3/ex056.py
Gustavsantos/python1
5520f2d2ee591157942008fdcd6bd42eb521f1a6
[ "MIT" ]
null
null
null
total = 0 media = 0 hmais = 0 no = '' contm = 0 from datetime import date atual = date.today().year for p in range(1,5): print('{}° Pessoa'.format(p)) nome = str(input('Nome: ')).strip().capitalize() ns = int(input('O ano em que nasceu: ')) sexo = str(input('Sexo: ')).strip().upper() idade = atual ...
26.964286
67
0.564238
0
0
0
0
0
0
0
0
182
0.240423
2768edd67418ad70fbc7628b2d0db9a2e7e067b6
9,575
py
Python
modules/cdp.py
experiencedft/defisaver-sim
1d1f05078efb634286df450b125677a1685a066e
[ "MIT" ]
13
2021-02-01T11:08:21.000Z
2022-01-13T05:29:11.000Z
modules/cdp.py
experiencedft/defisaver-sim
1d1f05078efb634286df450b125677a1685a066e
[ "MIT" ]
null
null
null
modules/cdp.py
experiencedft/defisaver-sim
1d1f05078efb634286df450b125677a1685a066e
[ "MIT" ]
5
2021-01-27T22:01:55.000Z
2022-02-20T22:14:16.000Z
''' The CDP module contains all the tools required to simulate a collateralized debt position, such as increasing or decreasing its leverage (boost and repay), closing the vault to calculate its lifetime profit, adding collateral or drawing more debt. The position is represented as an object whose methods provide a...
43.522727
129
0.593211
9,036
0.943708
0
0
0
0
0
0
5,402
0.564178
276b88f7bc15b02ea6b733a96f259241381fe73b
5,683
py
Python
clustertools/test/test_experiment.py
jm-begon/clustertools
264198d0ffbd60b883b7b6a2af79341425c7729b
[ "BSD-3-Clause" ]
7
2017-05-31T15:28:28.000Z
2021-03-25T12:36:48.000Z
clustertools/test/test_experiment.py
jm-begon/clustertools
264198d0ffbd60b883b7b6a2af79341425c7729b
[ "BSD-3-Clause" ]
42
2017-06-09T07:35:50.000Z
2019-08-29T15:23:29.000Z
clustertools/test/test_experiment.py
jm-begon/clustertools
264198d0ffbd60b883b7b6a2af79341425c7729b
[ "BSD-3-Clause" ]
3
2017-05-29T13:39:18.000Z
2019-06-24T09:43:01.000Z
# -*- coding: utf-8 -*- from functools import partial from nose.tools import assert_equal, assert_in, assert_less, assert_raises, \ with_setup, assert_true from nose.tools import assert_false from clustertools import ParameterSet, Result, Experiment from clustertools.state import RunningState, CompletedState, Abo...
36.664516
84
0.688193
0
0
0
0
4,217
0.742038
0
0
831
0.146226
276c363a6f57e3c85d7f037af185d706c5abdf10
1,657
py
Python
ed.py
zzx288/words
477516211cc43701ec4592a686f0bc06cbb9c141
[ "MIT" ]
null
null
null
ed.py
zzx288/words
477516211cc43701ec4592a686f0bc06cbb9c141
[ "MIT" ]
null
null
null
ed.py
zzx288/words
477516211cc43701ec4592a686f0bc06cbb9c141
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import codecs def find_words(words): split_words={} count_all = 0 unused_words = u" \t\r\n,。:;、“‘”【】『』|=+-——()*&……%¥#@!~·《》?/?<>,.;:'\"[]{}_)(^$!`" unused_english = u"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" for i in u...
29.589286
92
0.556427
0
0
0
0
0
0
0
0
432
0.253521
276d667a87fa4dfdeb86a4993f51124a0783875c
2,971
py
Python
acestream/ACEStream/Plugin/EngineWx.py
GrandPaRPi/p2ptv-pi
6f79c00f9055a3763ddfe1dc41e14d2cb533f4c3
[ "MIT" ]
null
null
null
acestream/ACEStream/Plugin/EngineWx.py
GrandPaRPi/p2ptv-pi
6f79c00f9055a3763ddfe1dc41e14d2cb533f4c3
[ "MIT" ]
null
null
null
acestream/ACEStream/Plugin/EngineWx.py
GrandPaRPi/p2ptv-pi
6f79c00f9055a3763ddfe1dc41e14d2cb533f4c3
[ "MIT" ]
2
2018-04-17T17:34:39.000Z
2020-07-26T03:43:33.000Z
#Embedded file name: ACEStream\Plugin\EngineWx.pyo import os import sys from traceback import print_exc try: import wxversion wxversion.select('2.8') except: pass try: import wx except: print 'wx is not installed' os._exit(1) import ACEStream from ACEStream.GlobalConfig import globalConfig fro...
31.946237
113
0.672164
1,031
0.347021
0
0
0
0
0
0
249
0.08381
276d90a94566353b66f7d294a0618d781bcf1b9c
899
py
Python
tcp_finite_state/client.py
aakashhemadri/python
16955810dd1ea491c9ff9c99ee02bd463ba97f0a
[ "MIT" ]
2
2021-01-20T14:08:26.000Z
2021-10-20T07:56:46.000Z
tcp_finite_state/client.py
aakashhemadri/python
16955810dd1ea491c9ff9c99ee02bd463ba97f0a
[ "MIT" ]
null
null
null
tcp_finite_state/client.py
aakashhemadri/python
16955810dd1ea491c9ff9c99ee02bd463ba97f0a
[ "MIT" ]
null
null
null
from tcp_statemachine import TCPStateMachine, Data import socket class Client: """ Client class """ def __init__(self, statemachine, data): self.ME = 'client' self.HOST = '127.0.0.1' self.PORT = 22085 self.ADDRESS = (self.HOST, self.PORT) self.client_socket = socket.socket() def run(sel...
22.475
69
0.697442
681
0.757508
0
0
0
0
0
0
53
0.058954
276e00dcc9820a61c4d4ebff8a3b8b4d2a199a5f
467
py
Python
HackerRank/MinimumSwaps2.py
kokuraxc/play-ground
48b5291f3cca117e0cd0a17bf9255ec4dc1a5cdd
[ "MIT" ]
null
null
null
HackerRank/MinimumSwaps2.py
kokuraxc/play-ground
48b5291f3cca117e0cd0a17bf9255ec4dc1a5cdd
[ "MIT" ]
null
null
null
HackerRank/MinimumSwaps2.py
kokuraxc/play-ground
48b5291f3cca117e0cd0a17bf9255ec4dc1a5cdd
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/minimum-swaps-2 # Complete the minimumSwaps function below. def minimumSwaps(arr): steps = 0 # for i, a in enumerate(arr): for i in range(len(arr)): while arr[i] != i+1: #arr = [a if x == i+1 else x for x in arr] #print(arr) ...
25.944444
55
0.51606
0
0
0
0
0
0
0
0
180
0.385439
277311deb8c817997aeecabf48fe1ce321691cbf
3,081
py
Python
source/conf.py
Kinovea/kinovea-docs
a2c4c9561bd4f8cc663efcaaed017c9c018b6b20
[ "CC0-1.0" ]
4
2020-11-17T18:09:42.000Z
2021-12-29T07:34:29.000Z
source/conf.py
Kinovea/kinovea-docs
a2c4c9561bd4f8cc663efcaaed017c9c018b6b20
[ "CC0-1.0" ]
4
2021-07-12T09:41:06.000Z
2021-11-01T19:22:05.000Z
source/conf.py
Kinovea/kinovea-docs
a2c4c9561bd4f8cc663efcaaed017c9c018b6b20
[ "CC0-1.0" ]
1
2021-07-12T05:17:47.000Z
2021-07-12T05:17:47.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
30.205882
91
0.683544
0
0
0
0
0
0
0
0
2,368
0.768582
277376eb0677ba7d0fb6770b5320ed63bd24de63
51
py
Python
0-hello-world/hello.py
zeyuri/computer-science-and-python-intro
178ff6647586fb2be716bb3c4796b03310731583
[ "MIT" ]
null
null
null
0-hello-world/hello.py
zeyuri/computer-science-and-python-intro
178ff6647586fb2be716bb3c4796b03310731583
[ "MIT" ]
null
null
null
0-hello-world/hello.py
zeyuri/computer-science-and-python-intro
178ff6647586fb2be716bb3c4796b03310731583
[ "MIT" ]
null
null
null
msg = "Hello World, i'm coming for you" print(msg)
17
39
0.686275
0
0
0
0
0
0
0
0
33
0.647059
2775121ab7502b6919cf78437931035cd8b7a2d9
158
py
Python
src/onegov/user/auth/clients/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/user/auth/clients/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/user/auth/clients/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.user.auth.clients.kerberos import KerberosClient from onegov.user.auth.clients.ldap import LDAPClient __all__ = ('KerberosClient', 'LDAPClient')
31.6
60
0.816456
0
0
0
0
0
0
0
0
28
0.177215
27756bad277e04032903ed08ddd795ce38d122b8
746
py
Python
img_utils/files/file.py
DewMaple/image_utils
a0ca6a1b088389f5a70df60623e629634d57065a
[ "MIT" ]
null
null
null
img_utils/files/file.py
DewMaple/image_utils
a0ca6a1b088389f5a70df60623e629634d57065a
[ "MIT" ]
null
null
null
img_utils/files/file.py
DewMaple/image_utils
a0ca6a1b088389f5a70df60623e629634d57065a
[ "MIT" ]
null
null
null
import glob import os def images_in_dir(images_dir, file_types=('*.png', '*.jpg', '*.jpeg', '*.gif')): """ :param images_dir: directory that contains target images :param file_types: image files extend :return: full image file path list """ file_names = [] for ext in file_types: fi...
23.3125
80
0.647453
0
0
0
0
0
0
0
0
354
0.474531
277599814e255a220a50444d8861eabc112abdd1
4,931
py
Python
financial_fundamentals/xbrl.py
Mahesh-Salunke/financial_fundamentals
421e7550e2c4b2cc9cc0ee8cb15ce2ad0d89234f
[ "Apache-2.0" ]
122
2015-01-28T17:57:08.000Z
2022-02-12T12:24:55.000Z
financial_fundamentals/xbrl.py
Mahesh-Salunke/financial_fundamentals
421e7550e2c4b2cc9cc0ee8cb15ce2ad0d89234f
[ "Apache-2.0" ]
1
2016-11-07T17:02:02.000Z
2016-11-09T20:51:50.000Z
financial_fundamentals/xbrl.py
Mahesh-Salunke/financial_fundamentals
421e7550e2c4b2cc9cc0ee8cb15ce2ad0d89234f
[ "Apache-2.0" ]
49
2015-01-01T03:12:27.000Z
2021-07-06T10:19:31.000Z
''' Created on Oct 8, 2013 @author: akittredge ''' import dateutil.parser import xmltodict from financial_fundamentals.exceptions import ValueNotInFilingDocument class XBRLMetricParams(object): '''Bundle the parameters sufficient to extract a metric from an xbrl document. ''' def __init__(self, poss...
34.482517
88
0.602515
4,749
0.963091
0
0
1,488
0.301764
0
0
536
0.1087
277624309012d3684e6506d164e645ba545c1547
6,235
py
Python
geospacelab/datahub/sources/wdc/dst/downloader.py
JouleCai/GeoSpaceLab
6cc498d3c32501e946931de596a840c73e83edb3
[ "BSD-3-Clause" ]
19
2021-08-07T08:49:22.000Z
2022-03-02T18:26:30.000Z
geospacelab/datahub/sources/wdc/dst/downloader.py
JouleCai/GeoSpaceLab
6cc498d3c32501e946931de596a840c73e83edb3
[ "BSD-3-Clause" ]
4
2021-11-09T05:53:42.000Z
2022-03-25T11:49:37.000Z
geospacelab/datahub/sources/wdc/dst/downloader.py
JouleCai/GeoSpaceLab
6cc498d3c32501e946931de596a840c73e83edb3
[ "BSD-3-Clause" ]
3
2021-11-07T11:41:20.000Z
2022-02-14T13:43:11.000Z
# Licensed under the BSD 3-Clause License # Copyright (C) 2021 GeospaceLab (geospacelab) # Author: Lei Cai, Space Physics and Astronomy, University of Oulu __author__ = "Lei Cai" __copyright__ = "Copyright 2021, GeospaceLab" __license__ = "BSD-3-Clause License" __email__ = "lei.cai@oulu.fi" __docformat__ = "reStructur...
38.018293
277
0.577225
5,112
0.819888
0
0
0
0
0
0
1,916
0.307298
277858124203940aedb7475ae3b0715e859459a7
914
py
Python
services/login_service.py
EderBevacqua/OPE_ADS_3C
af6e2a1757c82080dc5f6c1f7759f29f408341cc
[ "Apache-2.0" ]
null
null
null
services/login_service.py
EderBevacqua/OPE_ADS_3C
af6e2a1757c82080dc5f6c1f7759f29f408341cc
[ "Apache-2.0" ]
6
2020-06-14T21:50:25.000Z
2020-06-15T19:39:01.000Z
services/login_service.py
EderBevacqua/OPE_ADS_4C
af6e2a1757c82080dc5f6c1f7759f29f408341cc
[ "Apache-2.0" ]
null
null
null
from infra.usuario_dao import \ listar as dao_listar, \ consultar as dao_consultar, \ cadastrar as dao_cadastrar, \ alterar as dao_alterar, \ remover as dao_remover,\ loadUserEmail as dao_loadUserEmail,\ validarLogin as dao_validarLogin,\ validaMatriculaUsuario as dao_validaMatriculaUsua...
30.466667
58
0.789934
0
0
0
0
0
0
0
0
0
0
27797d81ccdfc4597762321be84ef3aaa9517905
421
py
Python
server/apps/org/permissions.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/org/permissions.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/org/permissions.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
from rest_framework import permissions class IsMemberOnly(permissions.BasePermission): """ Custom permission to only allow owners of an object to access (read/write) """ def has_permission(self, request, view): return request.user.is_authenticated def has_object_permission(self, request,...
32.384615
88
0.736342
380
0.902613
0
0
0
0
0
0
90
0.213777
277b82514a7515e164e8b41c060b3213bef8d2d0
473
py
Python
multi_domain/utils.py
newbieyd/multi-domain_NER
78443f79cebf7c2fe1058bc6ba2dc793d0907574
[ "Apache-2.0" ]
3
2020-10-26T02:23:57.000Z
2021-01-28T09:29:35.000Z
multi_domain/utils.py
newbieyd/multi-domain_NER
78443f79cebf7c2fe1058bc6ba2dc793d0907574
[ "Apache-2.0" ]
null
null
null
multi_domain/utils.py
newbieyd/multi-domain_NER
78443f79cebf7c2fe1058bc6ba2dc793d0907574
[ "Apache-2.0" ]
1
2021-01-28T09:29:39.000Z
2021-01-28T09:29:39.000Z
import random import torch import numpy as np # 设置随机种子,一旦固定种子,后面依次生成的随机数其实都是固定的 def set_seed(seed): random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) # 计算评价指标:准确率,召回率,F1值 def calculate(data): p = -1 r = -1 f1 = -1 if data[0] > 0: p = data[2] / data[0]...
19.708333
43
0.5074
0
0
0
0
0
0
0
0
149
0.262787
277c94d5ec87dc5540702d806c2c486ab6812053
769
py
Python
server/app/budget/migrations/0004_auto_20210521_1347.py
catvitalio/personal-budget
b4470115ebbfd185a8a781a2024787cbfe822639
[ "MIT" ]
null
null
null
server/app/budget/migrations/0004_auto_20210521_1347.py
catvitalio/personal-budget
b4470115ebbfd185a8a781a2024787cbfe822639
[ "MIT" ]
null
null
null
server/app/budget/migrations/0004_auto_20210521_1347.py
catvitalio/personal-budget
b4470115ebbfd185a8a781a2024787cbfe822639
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2021-05-21 06:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('budget', '0003_auto_20210521_1252'), ] operations = [ migrations.AlterField( model_name='expense', name='tags', ...
26.517241
78
0.579974
676
0.879064
0
0
0
0
0
0
182
0.236671
277c9b03dc3a5dfcdb9e0188ddbb3e71c27016ed
146
py
Python
recommendations_system/io_/__init__.py
mmikolajczak/recommendation_system_hetrec2011_movielens
3ae13e62605ffbf5517bc2079e086a400de48748
[ "MIT" ]
4
2019-12-04T08:42:21.000Z
2020-06-07T07:22:08.000Z
recommendations_system/io_/__init__.py
mmikolajczak/recommendation_system_hetrec2011_movielens
3ae13e62605ffbf5517bc2079e086a400de48748
[ "MIT" ]
null
null
null
recommendations_system/io_/__init__.py
mmikolajczak/recommendation_system_hetrec2011_movielens
3ae13e62605ffbf5517bc2079e086a400de48748
[ "MIT" ]
null
null
null
from ._load_hetrec import load_hetrec_to_df from ._df2ffm import DF2FFMConverter from ._utils import load_ffm, save_ffm, load_pickle, save_pickle
36.5
64
0.856164
0
0
0
0
0
0
0
0
0
0
277cde189ead3857304afdc2356fa310f621847b
7,689
py
Python
Stack_Exchange/py2_text.py
sadahanu/DataScience_SideProject
f476fe939d660099e3209b91bbd5cb883b37b2d3
[ "MIT" ]
null
null
null
Stack_Exchange/py2_text.py
sadahanu/DataScience_SideProject
f476fe939d660099e3209b91bbd5cb883b37b2d3
[ "MIT" ]
null
null
null
Stack_Exchange/py2_text.py
sadahanu/DataScience_SideProject
f476fe939d660099e3209b91bbd5cb883b37b2d3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Dec 13 23:10:40 2016 @author: zhouyu """ #%% import pandas as pd import numpy as np import os import re import nltk from nltk.corpus import stopwords from bs4 import BeautifulSoup os.chdir('/Users/zhouyu/Documents/Zhou_Yu/DS/kaggle_challenge/text processing') #%% step1: impor...
38.253731
110
0.694629
0
0
0
0
0
0
0
0
2,104
0.273638
277d5ee604563ea1b0d6b261faa48f33c379cba6
1,210
py
Python
tests/test_types.py
apparentlymart/python-stl
befec2266b4a6b201ecc3c4c42007a5c24e90566
[ "MIT" ]
9
2015-01-25T19:46:31.000Z
2018-07-04T03:32:46.000Z
tests/test_types.py
apparentlymart/python-stl
befec2266b4a6b201ecc3c4c42007a5c24e90566
[ "MIT" ]
10
2015-03-10T19:04:34.000Z
2018-11-03T04:46:57.000Z
tests/test_types.py
apparentlymart/python-stl
befec2266b4a6b201ecc3c4c42007a5c24e90566
[ "MIT" ]
15
2015-03-07T21:46:44.000Z
2021-12-02T20:03:21.000Z
import unittest from stl.types import * class TestTypes(unittest.TestCase): def test_facet_geometry(self): facet = Facet( (1, 0, 0), [ (0, 0, 0), (1, 0, 0), (0, 1, 0), ], ) self.assertEqual(facet.a, 1.0) ...
23.72549
61
0.333884
1,167
0.964463
0
0
0
0
0
0
6
0.004959
277d94d70e278173e780c161c144680891ccd6df
116
py
Python
server/domain/datasets/exceptions.py
multi-coop/catalogage-donnees
1d70401ff6c7b01ec051460a253cb105adf65911
[ "MIT" ]
null
null
null
server/domain/datasets/exceptions.py
multi-coop/catalogage-donnees
1d70401ff6c7b01ec051460a253cb105adf65911
[ "MIT" ]
14
2022-01-25T17:56:52.000Z
2022-01-28T17:47:59.000Z
server/domain/datasets/exceptions.py
multi-coop/catalogage-donnees
1d70401ff6c7b01ec051460a253cb105adf65911
[ "MIT" ]
null
null
null
from ..common.exceptions import DoesNotExist class DatasetDoesNotExist(DoesNotExist): entity_name = "Dataset"
19.333333
44
0.793103
68
0.586207
0
0
0
0
0
0
9
0.077586
277dc18fc44eab6c4ec0aeec52c4030e30b5d869
967
py
Python
pysimplegui/DemoPrograms/Demo_Design_Pattern_Multiple_Windows2.py
konsan1101/py-etc
bcca13119b0d2453866988404fd1c4976f55d4d5
[ "MIT" ]
null
null
null
pysimplegui/DemoPrograms/Demo_Design_Pattern_Multiple_Windows2.py
konsan1101/py-etc
bcca13119b0d2453866988404fd1c4976f55d4d5
[ "MIT" ]
2
2020-06-06T00:30:56.000Z
2021-06-10T22:30:37.000Z
pysimplegui/DemoPrograms/Demo_Design_Pattern_Multiple_Windows2.py
konsan1101/py-etc
bcca13119b0d2453866988404fd1c4976f55d4d5
[ "MIT" ]
null
null
null
import PySimpleGUI as sg """ PySimpleGUI The Complete Course Lesson 7 Multiple Independent Windows """ # Design pattern 2 - First window remains active layout = [[ sg.Text('Window 1'),], [sg.Input()], [sg.Text('', size=(20,1), key='-OUTPUT-')], [sg.Button('Launch 2'), sg.Butt...
24.794872
53
0.584281
0
0
0
0
0
0
0
0
243
0.251293
2780f36861b56fbdc559cec62df68437bb7c262c
6,277
py
Python
pexpo.py
joeyspacerocks/pexpo
1b668bd3d8b399570f938d0b5e9e9545db2ad059
[ "Apache-2.0" ]
1
2016-05-07T12:32:36.000Z
2016-05-07T12:32:36.000Z
pexpo.py
joeyspacerocks/pexpo
1b668bd3d8b399570f938d0b5e9e9545db2ad059
[ "Apache-2.0" ]
33
2020-07-02T10:24:56.000Z
2020-08-03T17:26:23.000Z
pexpo.py
joeyspacerocks/pexpo
1b668bd3d8b399570f938d0b5e9e9545db2ad059
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import os import sys import StringIO import argparse import json import zipfile from PIL import Image, ImageColor import xml.etree.cElementTree as ET # TODO: compose multiple layers def compose_image(indexes, archive): file = 'layer' + str(indexes[0]) + '.png' return Image.open(StringIO.StringIO(...
25.51626
124
0.608252
0
0
0
0
0
0
0
0
1,319
0.210132
27811ac83801b7707ced28bf3be304104b0b4fe0
212
py
Python
marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/onsets/admin.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/onsets/admin.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/onsets/admin.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from calls.onsets.models import Recording class RecordingAdmin(admin.ModelAdmin): list_display = ('audio', 'image', 'length') admin.site.register(Recording, RecordingAdmin)
26.5
47
0.783019
87
0.410377
0
0
0
0
0
0
22
0.103774
27822976fe232c6827409ee540cdeeef7ab6474f
505
py
Python
secrets_sample.py
barbudor/upy-door-sensor
ce34226203c0f08b7b10dcdcb6f6f4f2f8689754
[ "MIT" ]
5
2020-04-12T17:10:23.000Z
2021-09-24T19:56:01.000Z
secrets_sample.py
barbudor/upy-door-sensor
ce34226203c0f08b7b10dcdcb6f6f4f2f8689754
[ "MIT" ]
null
null
null
secrets_sample.py
barbudor/upy-door-sensor
ce34226203c0f08b7b10dcdcb6f6f4f2f8689754
[ "MIT" ]
null
null
null
""" Your secrets and configurations items you must rename this file secrets.py and customize as needed """ # Wifi settings SSID = "mywifi" PASSWD = "thesecretpassword" # Network - comment to use DHCP (but slighly slower) IPADDR = "192.168.0.100" MASK = "255.255.255.0" GW = "192.168.0.1" DNS = "1.1.1.1" # MQTT s...
25.25
64
0.683168
0
0
0
0
0
0
0
0
384
0.760396
27824e9b0a8bb25e5664e1e7337a726628d28d71
2,000
py
Python
src/d007/index.py
Yangfan2016/learn-python
84a375cda9d51349ae0a0faf1dc6444ac83ed948
[ "MIT" ]
null
null
null
src/d007/index.py
Yangfan2016/learn-python
84a375cda9d51349ae0a0faf1dc6444ac83ed948
[ "MIT" ]
null
null
null
src/d007/index.py
Yangfan2016/learn-python
84a375cda9d51349ae0a0faf1dc6444ac83ed948
[ "MIT" ]
null
null
null
# 练习1:在屏幕上显示跑马灯文字 from random import randint import os import time def marquee(): content = "我很开心。。。" while True: os.system("clear") print(content) time.sleep(.2) content = content[1:]+content[0] # marquee() # 练习2:设计一个函数产生指定长度的验证码,验证码由大小写字母和数字构成 def genrentae_code(l=4):...
15.151515
74
0.515
0
0
0
0
0
0
0
0
740
0.327144
27830a56e67664f45133b9939b59406608cd3555
147
py
Python
maintenance_mode/utils.py
fallen/django-maintenance-mode
826b18ca3c768ab5dbd3f665886106b0eb702de9
[ "MIT" ]
282
2015-06-08T22:57:44.000Z
2022-03-28T17:44:40.000Z
maintenance_mode/utils.py
fallen/django-maintenance-mode
826b18ca3c768ab5dbd3f665886106b0eb702de9
[ "MIT" ]
82
2015-08-24T09:27:07.000Z
2022-02-08T20:12:48.000Z
maintenance_mode/utils.py
fallen/django-maintenance-mode
826b18ca3c768ab5dbd3f665886106b0eb702de9
[ "MIT" ]
59
2015-06-16T13:06:10.000Z
2022-02-08T20:10:20.000Z
# -*- coding: utf-8 -*- def get_client_ip_address(request): """ Get the client IP Address. """ return request.META['REMOTE_ADDR']
18.375
38
0.612245
0
0
0
0
0
0
0
0
78
0.530612
27845720229d1cbede001bd8fe6879c12c7dc607
2,117
py
Python
dex/command/commands/DexUnreachable.py
TomWeaver18/dexter
d89b66ca6a0d1ba29a4c32f152773a34ce2881e8
[ "MIT" ]
null
null
null
dex/command/commands/DexUnreachable.py
TomWeaver18/dexter
d89b66ca6a0d1ba29a4c32f152773a34ce2881e8
[ "MIT" ]
null
null
null
dex/command/commands/DexUnreachable.py
TomWeaver18/dexter
d89b66ca6a0d1ba29a4c32f152773a34ce2881e8
[ "MIT" ]
null
null
null
# DExTer : Debugging Experience Tester # ~~~~~~ ~ ~~ ~ ~~ # # Copyright (c) 2019 by SN Systems Ltd., Sony Interactive Entertainment Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # ...
38.490909
79
0.691072
818
0.386396
0
0
67
0.031649
0
0
1,486
0.701937
2786bc277b70a50e0d89afd7f11a15c26b25b2fa
1,825
py
Python
tests/test_platform.py
rennerocha/bottery
a082cfa1c21f9aa32ea1526ea3004b581f9e0cd4
[ "MIT" ]
null
null
null
tests/test_platform.py
rennerocha/bottery
a082cfa1c21f9aa32ea1526ea3004b581f9e0cd4
[ "MIT" ]
null
null
null
tests/test_platform.py
rennerocha/bottery
a082cfa1c21f9aa32ea1526ea3004b581f9e0cd4
[ "MIT" ]
null
null
null
import inspect import pytest from bottery.platform import BaseEngine def test_baseengine_platform_name_not_implemented(): """Check if attributes from the public API raise NotImplementedError""" engine = BaseEngine() with pytest.raises(NotImplementedError): getattr(engine, 'platform') @pytest.m...
27.651515
88
0.706301
0
0
0
0
813
0.445479
658
0.360548
382
0.209315
27871567eec68506ebdf03b82d43a00ac9173647
26,071
py
Python
sarkas/potentials/core.py
lucianogsilvestri/sarkas
f4ab00014d09976561fbd4349b9d0610e47a61e1
[ "MIT" ]
null
null
null
sarkas/potentials/core.py
lucianogsilvestri/sarkas
f4ab00014d09976561fbd4349b9d0610e47a61e1
[ "MIT" ]
null
null
null
sarkas/potentials/core.py
lucianogsilvestri/sarkas
f4ab00014d09976561fbd4349b9d0610e47a61e1
[ "MIT" ]
null
null
null
""" Module handling the potential class. """ from copy import deepcopy from fmm3dpy import hfmm3d, lfmm3d from numpy import array, ndarray, pi, sqrt, tanh from warnings import warn from ..utilities.exceptions import AlgorithmWarning from ..utilities.fdints import fdm1h, invfd1h from .force_pm import force_optimized_gr...
36.260083
121
0.603199
25,593
0.981665
0
0
4,622
0.177285
0
0
8,907
0.341644
27877c156aab625b9201be4f2bcf3caf8ade21c6
328
py
Python
forest_lite/server/routers/api.py
uk-gov-mirror/MetOffice.forest-lite
9406b53f7e6a9651eb675e0ac2e5945421b25557
[ "BSD-3-Clause" ]
6
2020-08-05T16:12:57.000Z
2022-01-06T01:34:19.000Z
forest_lite/server/routers/api.py
uk-gov-mirror/MetOffice.forest-lite
9406b53f7e6a9651eb675e0ac2e5945421b25557
[ "BSD-3-Clause" ]
49
2020-08-14T13:58:32.000Z
2021-06-29T11:42:32.000Z
forest_lite/server/routers/api.py
uk-gov-mirror/MetOffice.forest-lite
9406b53f7e6a9651eb675e0ac2e5945421b25557
[ "BSD-3-Clause" ]
2
2020-12-03T09:24:13.000Z
2021-04-11T06:10:36.000Z
from fastapi import APIRouter router = APIRouter() @router.get("/api") async def api(): """Discoverable API by hitting root endpoint""" return { "links": { "datasets": "/datasets", "natural_earth_feature": "/natural_earth_feature", "viewport": "/viewport" ...
19.294118
62
0.564024
0
0
0
0
272
0.829268
252
0.768293
149
0.454268
278849dea2ba5567753d1997063d53e6a66da898
593
py
Python
tests/lupin/validators/test_match.py
Clustaar/lupin
9ef73642d84a99adb80abf5a922a9422ddae9254
[ "MIT" ]
22
2017-10-18T08:27:20.000Z
2022-03-25T18:53:43.000Z
tests/lupin/validators/test_match.py
Clustaar/lupin
9ef73642d84a99adb80abf5a922a9422ddae9254
[ "MIT" ]
5
2019-09-16T15:31:55.000Z
2022-02-10T08:29:14.000Z
tests/lupin/validators/test_match.py
Clustaar/lupin
9ef73642d84a99adb80abf5a922a9422ddae9254
[ "MIT" ]
null
null
null
import re import pytest from lupin.errors import InvalidMatch from lupin.validators import Match @pytest.fixture def validator(): regexp = re.compile("hello") return Match(regexp) class TestCall(object): def test_raise_error_if_does_not_match(self, validator): with pytest.raises(InvalidMatch) ...
22.807692
64
0.699831
398
0.671164
0
0
90
0.151771
0
0
19
0.03204
2788acf8b816fa004267a5988eb11b0290795f1e
289
py
Python
scripts/face_wall.py
Meeshbhoombah/burnt
c10113e7904c5d13c0feedc337681fb41f1006a7
[ "MIT" ]
null
null
null
scripts/face_wall.py
Meeshbhoombah/burnt
c10113e7904c5d13c0feedc337681fb41f1006a7
[ "MIT" ]
null
null
null
scripts/face_wall.py
Meeshbhoombah/burnt
c10113e7904c5d13c0feedc337681fb41f1006a7
[ "MIT" ]
null
null
null
#!/usr/bin/env python spacing = 0.1 # m lines = [] for c in range(0, 8): rs = [range(11), reversed(range(11))][c % 2] for r in rs: lines.append(' {"point": [%.2f, %.2f, %.2f]}' % (c*spacing, 0, (r)*spacing)) print '[\n' + ',\n'.join(lines) + '\n]'
24.083333
56
0.460208
0
0
0
0
0
0
0
0
72
0.249135
27893fac576198dea3db960f02abcae0e0707306
1,237
py
Python
201220/Q8958.py
JongGuk/BOJ
dd447d9f65481de19a3c0b4f8bb8b5f3d6277c15
[ "MIT" ]
null
null
null
201220/Q8958.py
JongGuk/BOJ
dd447d9f65481de19a3c0b4f8bb8b5f3d6277c15
[ "MIT" ]
null
null
null
201220/Q8958.py
JongGuk/BOJ
dd447d9f65481de19a3c0b4f8bb8b5f3d6277c15
[ "MIT" ]
null
null
null
'''There is an objective test result such as “OOXXOXXOOO”. An ‘O’ means a correct answer of a problem and an ‘X’ means a wrong answer. The score of each problem of this test is calculated by itself and its just previous consecutive ‘O’s only when the answer is correct. For example, the score of the 10th problem is 3 t...
49.48
114
0.720291
0
0
0
0
0
0
0
0
1,070
0.835285
278941aab99fac086f38eb414bccf8c30fd00617
328
py
Python
common/tasks.py
gaomugong/flask-demo
83bfb04634355565456cc16a5e98421338e3f562
[ "MIT" ]
12
2017-12-24T13:58:17.000Z
2021-04-06T16:21:00.000Z
common/tasks.py
gaomugong/flask-demo
83bfb04634355565456cc16a5e98421338e3f562
[ "MIT" ]
null
null
null
common/tasks.py
gaomugong/flask-demo
83bfb04634355565456cc16a5e98421338e3f562
[ "MIT" ]
1
2021-10-17T14:45:44.000Z
2021-10-17T14:45:44.000Z
# -*- coding: utf-8 -*- from app import celery, app @celery.task() def add_together(a, b): app.logger.info('hello world') return a + b # from common.extensions import celery # from flask import current_app # # # @celery.task() # def add_together(a, b): # current_app.logger.info('hello world') # retur...
18.222222
44
0.652439
0
0
0
0
90
0.27439
0
0
210
0.640244
2789b658170df8dfdb61f142d656fdcfa80baf19
11,411
py
Python
Code/3_linear_regression_on_pixels.py
jjatinggoyal/accessbility-indicators
7126d3bc33dc6dadbcf6d9000d6ef6d432f093c0
[ "MIT" ]
null
null
null
Code/3_linear_regression_on_pixels.py
jjatinggoyal/accessbility-indicators
7126d3bc33dc6dadbcf6d9000d6ef6d432f093c0
[ "MIT" ]
null
null
null
Code/3_linear_regression_on_pixels.py
jjatinggoyal/accessbility-indicators
7126d3bc33dc6dadbcf6d9000d6ef6d432f093c0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """3_Linear_regression_on_pixels.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1nhECM9OxwIw8BjEqsQcSUwojX2KYrh1I """ from google.colab import drive #to retrieve data from drive drive.mount('/content/drive/') cd 'driv...
52.344037
155
0.729997
0
0
0
0
0
0
0
0
8,238
0.721935
278a8dffe7af41773e706a3b3b7522cea3642494
127
py
Python
ccc/cfg.py
zkdev/cc-utils
042c6632ca6f61a484bc0a71f85957aeba7f7278
[ "BSD-3-Clause" ]
15
2018-04-18T13:25:30.000Z
2022-03-04T09:25:41.000Z
ccc/cfg.py
zkdev/cc-utils
042c6632ca6f61a484bc0a71f85957aeba7f7278
[ "BSD-3-Clause" ]
221
2018-04-12T06:29:43.000Z
2022-03-27T03:01:40.000Z
ccc/cfg.py
zkdev/cc-utils
042c6632ca6f61a484bc0a71f85957aeba7f7278
[ "BSD-3-Clause" ]
29
2018-04-11T14:42:23.000Z
2021-11-09T16:26:32.000Z
import functools import ci.util ctx = ci.util.ctx() @functools.lru_cache() def cfg_factory(): return ctx.cfg_factory()
11.545455
28
0.716535
0
0
0
0
70
0.551181
0
0
0
0
278e170fcb4a1f505f51883094b18a872922bd6e
2,459
py
Python
scripts/create_grids.py
edwardoughton/taddle
f76ca6067e6fca6b699675ab038c31c9444e0a79
[ "MIT" ]
9
2020-08-18T04:25:00.000Z
2022-03-18T16:42:33.000Z
scripts/create_grids.py
edwardoughton/arpu_predictor
f76ca6067e6fca6b699675ab038c31c9444e0a79
[ "MIT" ]
null
null
null
scripts/create_grids.py
edwardoughton/arpu_predictor
f76ca6067e6fca6b699675ab038c31c9444e0a79
[ "MIT" ]
4
2020-01-27T01:48:30.000Z
2021-12-01T16:48:17.000Z
""" Create 10km x 10km grid using the country shapefile. Written by Ed Oughton. Winter 2020 """ import argparse import os import configparser import geopandas as gpd from shapely.geometry import Polygon, mapping import pandas as pd import numpy as np import rasterio from rasterstats import zonal_stats BASE_DIR = '....
26.44086
94
0.699471
0
0
0
0
0
0
0
0
613
0.249288
27907e0aff23ef4fbe2d4a38e27570505c4caa34
366
py
Python
test/test_all.py
beremaran/spdown
59e5ea6996be51ad015f9da6758e2ce556b9fb94
[ "MIT" ]
2
2019-08-13T15:13:58.000Z
2019-10-04T09:09:24.000Z
test/test_all.py
beremaran/spdown
59e5ea6996be51ad015f9da6758e2ce556b9fb94
[ "MIT" ]
4
2021-02-08T20:23:42.000Z
2022-03-11T23:27:07.000Z
test/test_all.py
beremaran/spdown
59e5ea6996be51ad015f9da6758e2ce556b9fb94
[ "MIT" ]
null
null
null
#!/usr/bin/env python import unittest test_modules = [ 'test.test_config', 'test.test_secrets', 'test.test_spotify', 'test.test_youtube' ] if __name__ == "__main__": suite = unittest.TestSuite() for tm in test_modules: suite.addTest(unittest.defaultTestLoader.loadTestsFromName(tm)) ...
19.263158
71
0.691257
0
0
0
0
0
0
0
0
106
0.289617
2790d75b4b157f35c41640a672fd75216eb8137c
1,281
py
Python
tests/rec_util.py
pablohawz/tfg-Scan-Paint-clone
056cd50d9e4274620cf085a41ed9d326e16dd47b
[ "MIT" ]
null
null
null
tests/rec_util.py
pablohawz/tfg-Scan-Paint-clone
056cd50d9e4274620cf085a41ed9d326e16dd47b
[ "MIT" ]
null
null
null
tests/rec_util.py
pablohawz/tfg-Scan-Paint-clone
056cd50d9e4274620cf085a41ed9d326e16dd47b
[ "MIT" ]
null
null
null
import os import tempfile from time import time import numpy as np import sounddevice as sd from PySide2.QtWidgets import QApplication, QFileDialog from scipy.io.wavfile import write # Config t = 3 # s fs = 44100 def save(x, fs): # You have to create a QApp in order to use a # Widget (QFileDialg) app =...
20.66129
67
0.565964
0
0
0
0
0
0
0
0
258
0.201405
2792236e3960ae778ac604767d58c8cfaef78404
10,977
py
Python
test/comptests/TestHybridQuasiGaussian.py
sschlenkrich/HybridMonteCarlo
72f54aa4bcd742430462b27b72d70369c01f9ac4
[ "MIT" ]
3
2021-08-18T18:34:41.000Z
2021-12-24T07:05:19.000Z
test/comptests/TestHybridQuasiGaussian.py
sschlenkrich/HybridMonteCarlo
72f54aa4bcd742430462b27b72d70369c01f9ac4
[ "MIT" ]
null
null
null
test/comptests/TestHybridQuasiGaussian.py
sschlenkrich/HybridMonteCarlo
72f54aa4bcd742430462b27b72d70369c01f9ac4
[ "MIT" ]
3
2021-01-31T11:41:19.000Z
2022-03-25T19:51:20.000Z
#!/usr/bin/python import sys sys.path.append('./') import unittest import copy import numpy as np from hybmc.mathutils.Helpers import BlackImpliedVol, BlackVega from hybmc.termstructures.YieldCurve import YieldCurve from hybmc.models.AssetModel import AssetModel from hybmc.models.HybridModel import HybridModel from...
41.579545
125
0.484376
9,746
0.887856
0
0
0
0
0
0
1,376
0.125353
27939e55222086ece981ba3a6efa56f956601617
143
py
Python
model/__init__.py
Blind-Aid/sentiment-discovery
081c7c855e00864b52e97cac0b0e097cc86d9731
[ "BSD-3-Clause" ]
1,093
2017-12-05T20:35:45.000Z
2022-02-26T17:48:30.000Z
model/__init__.py
Blind-Aid/sentiment-discovery
081c7c855e00864b52e97cac0b0e097cc86d9731
[ "BSD-3-Clause" ]
67
2017-12-05T22:02:55.000Z
2021-05-25T09:06:41.000Z
model/__init__.py
Blind-Aid/sentiment-discovery
081c7c855e00864b52e97cac0b0e097cc86d9731
[ "BSD-3-Clause" ]
207
2017-12-05T20:59:45.000Z
2022-03-08T09:32:39.000Z
from .distributed import * from .model import * from .sentiment_classifier import * from .transformer import * from .transformer_utils import *
28.6
35
0.797203
0
0
0
0
0
0
0
0
0
0
2793c0f51d8fcdcbec81fb953d41e2dc42b499c2
2,927
py
Python
SIP/src/peer/peer.py
trishantpahwa/Session-Initiation-Protocol
5b770dbb9533fbe3a8ff31fc583576cc107e5ba8
[ "MIT" ]
3
2019-06-18T18:21:05.000Z
2021-07-15T06:28:25.000Z
SIP/src/peer/peer.py
trishantpahwa/Session-Initiation-Protocol
5b770dbb9533fbe3a8ff31fc583576cc107e5ba8
[ "MIT" ]
4
2019-01-30T11:31:13.000Z
2019-03-06T12:36:54.000Z
SIP/src/peer/peer.py
trishantpahwa/Session-Initiation-Protocol
5b770dbb9533fbe3a8ff31fc583576cc107e5ba8
[ "MIT" ]
1
2019-08-12T11:31:23.000Z
2019-08-12T11:31:23.000Z
import socket class peer: __db = None __s = socket __protocol = '' __port = 5060 __s_address = () __buff_size = 4096 def __init__(self, protocol='TCP', port=5060, buff_size=4096): self.__set_protocol(protocol) self.__set_port(port) self.__set_buff_size(buff_size)...
28.696078
75
0.60574
2,910
0.994192
0
0
0
0
0
0
98
0.033481
279582d504d9da0d858f00c0d357db9ba41aecb7
3,387
py
Python
champ_bringup/scripts/joint_calibrator_relay.py
lubitz99/champ
2e4c8606db9a365866726ea84e8107c14ee9446d
[ "BSD-3-Clause" ]
923
2020-04-06T15:09:24.000Z
2022-03-30T15:34:08.000Z
champ_bringup/scripts/joint_calibrator_relay.py
lubitz99/champ
2e4c8606db9a365866726ea84e8107c14ee9446d
[ "BSD-3-Clause" ]
73
2020-05-12T09:23:12.000Z
2022-03-28T06:22:16.000Z
champ_bringup/scripts/joint_calibrator_relay.py
lubitz99/champ
2e4c8606db9a365866726ea84e8107c14ee9446d
[ "BSD-3-Clause" ]
229
2020-04-26T06:32:28.000Z
2022-03-29T08:07:28.000Z
#!/usr/bin/env python ''' Copyright (c) 2019-2020, Juan Miguel Jimeno All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, thi...
45.16
110
0.749631
1,502
0.44346
0
0
0
0
0
0
1,755
0.518158
279641443118aebc70b220bf9dae1dc53a9d2fc4
3,909
py
Python
touchdown/aws/vpc/vpc.py
yaybu/touchdown
70ecda5191ce2d095bc074dcb23bfa1584464814
[ "Apache-2.0" ]
14
2015-01-05T18:18:04.000Z
2022-02-07T19:35:12.000Z
touchdown/aws/vpc/vpc.py
yaybu/touchdown
70ecda5191ce2d095bc074dcb23bfa1584464814
[ "Apache-2.0" ]
106
2015-01-06T00:17:13.000Z
2019-09-07T00:35:32.000Z
touchdown/aws/vpc/vpc.py
yaybu/touchdown
70ecda5191ce2d095bc074dcb23bfa1584464814
[ "Apache-2.0" ]
5
2015-01-30T10:18:24.000Z
2022-02-07T19:35:13.000Z
# Copyright 2014 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
32.575
84
0.660783
3,078
0.787414
1,357
0.347148
0
0
0
0
1,188
0.303914
2796c1a0814e47f59cba47b456a1373f8929dd6d
77
py
Python
backend_django/type/__init__.py
mehranagh20/Typonent
702ae3e018dcffb952c870b0a680f2475845b744
[ "MIT" ]
4
2017-03-24T19:14:29.000Z
2017-04-02T18:23:25.000Z
backend_django/type/__init__.py
mehranagh20/typing_site
702ae3e018dcffb952c870b0a680f2475845b744
[ "MIT" ]
4
2017-03-25T20:25:04.000Z
2017-03-31T17:18:23.000Z
backend_django/type/__init__.py
mehranagh20/typing_site
702ae3e018dcffb952c870b0a680f2475845b744
[ "MIT" ]
null
null
null
# from type.models import User, Requirement, Involvement, Competition, Text
25.666667
75
0.792208
0
0
0
0
0
0
0
0
75
0.974026
2797b6dfc818a3de2bc52aaf5906014401475627
793
py
Python
estructuras de control secuenciales/ejercicio10.py
svcuellar/algoritmos_programacion
0813ee6a2ccb605557a7920bf82440b7388b49e8
[ "MIT" ]
null
null
null
estructuras de control secuenciales/ejercicio10.py
svcuellar/algoritmos_programacion
0813ee6a2ccb605557a7920bf82440b7388b49e8
[ "MIT" ]
null
null
null
estructuras de control secuenciales/ejercicio10.py
svcuellar/algoritmos_programacion
0813ee6a2ccb605557a7920bf82440b7388b49e8
[ "MIT" ]
null
null
null
""" entradas cantidadchelinesaustriacos-->c-->float cantidaddragmasgriegos-->dg-->float cantidadpesetas-->p-->float salidas chelines_a_pesetas-->c_p-->float dragmas_a_francosfrancese-->dg_ff-->float pesetas_a_dolares-->p_d-->float pesetas_a_lirasitalianas-->p_li-->float """ #entradas c=float(input("Ingrese la cantida...
28.321429
78
0.726356
0
0
0
0
0
0
0
0
558
0.703657
27981338330ee315b120f4f29b8d0163c165b34b
4,453
py
Python
st_model.py
saras108/Sentiment_Analysis
7e4e84637161cd005ebbcd303f68417726b5f098
[ "MIT" ]
null
null
null
st_model.py
saras108/Sentiment_Analysis
7e4e84637161cd005ebbcd303f68417726b5f098
[ "MIT" ]
null
null
null
st_model.py
saras108/Sentiment_Analysis
7e4e84637161cd005ebbcd303f68417726b5f098
[ "MIT" ]
null
null
null
#importing necessary libraries import numpy as np import pandas as pd import string import streamlit as st header = st.container() dataset = st.container() fearure = st.container() model_training = st.container() def get_data(file_name): df = pd.read_csv(file_name , header = None) return df with header: ...
29.885906
302
0.688974
0
0
0
0
0
0
0
0
1,439
0.323153
279b274296a91748dfbdabae0134ce96287057e9
540
py
Python
config.py
sheepmen/SpiderManage
850d6357fd1117c16684dabb5d1e79de1854e61c
[ "MIT" ]
1
2018-06-13T00:38:53.000Z
2018-06-13T00:38:53.000Z
config.py
sheepmen/SpiderManage
850d6357fd1117c16684dabb5d1e79de1854e61c
[ "MIT" ]
null
null
null
config.py
sheepmen/SpiderManage
850d6357fd1117c16684dabb5d1e79de1854e61c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- SECRET_KEY = 'some secret key' TEMPLATES_AUTO_RELOAD = True PROJECT_NAME = 'SpiderManage' # Redis Config REDIS_HOST = '120.25.227.8' REDIS_PORT = 6379 REDIS_PASSWORD = 'xuxinredis' # SQLite # SQLALCHEMY_DATABASE_URI = 'sqlite:///C:/Users/sheep3/workplace/SpiderManage/data.d...
30
93
0.777778
0
0
0
0
0
0
0
0
321
0.594444
279b776bfdce89147881347913d489e839a74293
3,989
py
Python
PyPrometheus.py
RusDavies/PyPrometheus
8c0bb9489f42423942982829024d7359a374d7b1
[ "MIT" ]
null
null
null
PyPrometheus.py
RusDavies/PyPrometheus
8c0bb9489f42423942982829024d7359a374d7b1
[ "MIT" ]
null
null
null
PyPrometheus.py
RusDavies/PyPrometheus
8c0bb9489f42423942982829024d7359a374d7b1
[ "MIT" ]
null
null
null
from PyPrometheusQueryClient import PrometheusQueryClient import json from pathlib import Path from datetime import datetime class Prometheus: def __init__(self, url, metrics_config_file=None, cache_path=None, cache_ttl=3600, ssl_verify=True, starttime=None, endtime=None): self._metrics_config_file = met...
37.990476
134
0.613688
3,862
0.968162
0
0
0
0
0
0
1,028
0.257709
279d9301e8e9b967d31f0c36c000b8b79e8eab38
5,557
py
Python
tests/validate_schema_guide.py
dieghernan/citation-file-format
cfad34b82aa882d8169a0bcb6a21ad19cb4ff401
[ "CC-BY-4.0" ]
257
2017-12-18T14:09:32.000Z
2022-03-28T17:58:19.000Z
tests/validate_schema_guide.py
Seanpm2001-DIGITAL-Command-Language/citation-file-format
52647a247e9b1a5b04154934f39615b5ee8c4d65
[ "CC-BY-4.0" ]
307
2017-10-16T12:17:40.000Z
2022-03-18T11:18:49.000Z
tests/validate_schema_guide.py
Seanpm2001-DIGITAL-Command-Language/citation-file-format
52647a247e9b1a5b04154934f39615b5ee8c4d65
[ "CC-BY-4.0" ]
344
2018-09-19T03:00:26.000Z
2022-03-31T01:39:11.000Z
import pytest import os import json import jsonschema from ruamel.yaml import YAML def test(): def extract_snippets(): start = 0 end = len(markdown) while start < end: snippet_start = markdown.find("```yaml\n", start, end) if snippet_start == -1: br...
57.28866
171
0.479935
0
0
0
0
0
0
0
0
1,271
0.228721
279ec732b8ac9028c087cef84952b665f1b41600
188
py
Python
vkrpg/scripts/hello.py
Augmeneco/VKRPG
b071a490ae45a574a028af1eb831fff96782c06c
[ "Apache-2.0" ]
null
null
null
vkrpg/scripts/hello.py
Augmeneco/VKRPG
b071a490ae45a574a028af1eb831fff96782c06c
[ "Apache-2.0" ]
null
null
null
vkrpg/scripts/hello.py
Augmeneco/VKRPG
b071a490ae45a574a028af1eb831fff96782c06c
[ "Apache-2.0" ]
null
null
null
import vkrpg class MainContext(vkrpg.contexts.BaseContext): def on_message(self, msg): vkrpg.chat.send(msg['peer_id'], text='Привет, VKID#{}!'.format(msg['from_id']))
31.333333
87
0.659574
171
0.881443
0
0
0
0
0
0
42
0.216495
27a5750fd3834a5dd24fb63cbde3fd11a0fdfdd0
4,613
py
Python
flaskprediction/routes.py
killswitchh/flask-prediction-app
a8bdff96fa2dc05544991a705970d1550ac9a034
[ "MIT" ]
null
null
null
flaskprediction/routes.py
killswitchh/flask-prediction-app
a8bdff96fa2dc05544991a705970d1550ac9a034
[ "MIT" ]
1
2020-08-29T18:39:05.000Z
2020-08-30T09:43:47.000Z
flaskprediction/routes.py
killswitchh/flask-prediction-app
a8bdff96fa2dc05544991a705970d1550ac9a034
[ "MIT" ]
null
null
null
import secrets from flask import Flask , render_template , url_for , send_from_directory from flaskprediction import app from flaskprediction.utils.predict import Predictor from flaskprediction.forms import CarDetailsForm , TitanicDetailsForm , BostonDetailsForm , HeightDetailsForm, CatImageForm from PIL import Imag...
39.767241
182
0.681986
0
0
0
0
3,884
0.841968
0
0
746
0.161717
27a61a2b957091652c5a6b1dfcf40f524e7bd75a
14,349
py
Python
air/gather.py
krisbukovi/AutomatedIngestReport
87cc65c9028382a0860069d86b69b8517d93f59c
[ "MIT" ]
null
null
null
air/gather.py
krisbukovi/AutomatedIngestReport
87cc65c9028382a0860069d86b69b8517d93f59c
[ "MIT" ]
null
null
null
air/gather.py
krisbukovi/AutomatedIngestReport
87cc65c9028382a0860069d86b69b8517d93f59c
[ "MIT" ]
null
null
null
import requests import re from time import sleep from datetime import datetime import shutil import elasticsearch2 from elasticsearch_dsl import Search, Q from collections import OrderedDict from sqlalchemy import create_engine from subprocess import Popen, PIPE, STDOUT import shlex import glob import csv # from api...
45.122642
160
0.566451
13,933
0.971008
0
0
0
0
0
0
5,868
0.408948
27a686fae11eeb59ce17fe8f4cf6412be0900891
8,180
py
Python
python_aternos/atconf.py
DarkCat09/python-aternos
a75d729e938a181449f304e849762dd9bb0e51f3
[ "Apache-2.0" ]
11
2021-10-01T13:04:44.000Z
2022-03-31T19:19:48.000Z
python_aternos/atconf.py
DarkCat09/python-aternos
a75d729e938a181449f304e849762dd9bb0e51f3
[ "Apache-2.0" ]
7
2021-10-01T14:00:20.000Z
2022-03-21T12:29:24.000Z
python_aternos/atconf.py
DarkCat09/python-aternos
a75d729e938a181449f304e849762dd9bb0e51f3
[ "Apache-2.0" ]
4
2022-01-07T13:47:39.000Z
2022-02-22T21:51:28.000Z
import enum import re import lxml.html from typing import Any, Dict, List, Union, Optional from typing import TYPE_CHECKING if TYPE_CHECKING: from .atserver import AternosServer class ServerOpts(enum.Enum): """server.options file""" players = 'max-players' gm = 'gamemode' difficulty = 'difficult...
24.638554
82
0.667604
7,687
0.939731
0
0
0
0
0
0
4,142
0.506357
27a6c1cdc477a10a4c9b691137650bb8e9980229
11,859
py
Python
examples/cadre_dymos.py
johnjasa/CADRE
a4ffd61582b8474953fc309aa540838a14f29dcf
[ "Apache-2.0" ]
null
null
null
examples/cadre_dymos.py
johnjasa/CADRE
a4ffd61582b8474953fc309aa540838a14f29dcf
[ "Apache-2.0" ]
null
null
null
examples/cadre_dymos.py
johnjasa/CADRE
a4ffd61582b8474953fc309aa540838a14f29dcf
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import unittest import numpy as np from openmdao.api import Problem, Group, pyOptSparseDriver, DirectSolver, SqliteRecorder from dymos import Phase from dymos.utils.indexing import get_src_indices_by_row from dymos.phases.components import ControlInterpComp from CADRE.odes_dym...
42.812274
143
0.70436
0
0
0
0
0
0
0
0
5,328
0.449279
27a730a5c6d3019f232b6aef55d357908663ff70
959
py
Python
deso/Media.py
AdityaChaudhary0005/DeSo.py
5cb3c757fb21bad472da921c0148675c8957eb17
[ "MIT" ]
11
2021-11-12T18:20:22.000Z
2022-03-16T02:12:06.000Z
deso/Media.py
AdityaChaudhary0005/DeSo.py
5cb3c757fb21bad472da921c0148675c8957eb17
[ "MIT" ]
6
2021-11-25T04:30:44.000Z
2021-12-15T12:33:24.000Z
deso/Media.py
AdityaChaudhary0005/DeSo.py
5cb3c757fb21bad472da921c0148675c8957eb17
[ "MIT" ]
8
2021-11-19T19:14:50.000Z
2022-01-31T21:27:32.000Z
from deso.utils import getUserJWT import requests class Media: def __init__(self, publicKey=None, seedHex=None, nodeURL="https://node.deso.org/api/v0/"): self.SEED_HEX = seedHex self.PUBLIC_KEY = publicKey self.NODE_URL = nodeURL def uploadImage(self, fileList): #uploads imag...
31.966667
95
0.554745
906
0.944734
0
0
0
0
0
0
155
0.161627
27a8998af1db32b395a9af2dbb6c8a21bc35a70c
169
py
Python
workSpace/boot.py
khutson/macequilt
a4a090ddf296fcea763825fda4243bc84b4d5f0d
[ "MIT" ]
null
null
null
workSpace/boot.py
khutson/macequilt
a4a090ddf296fcea763825fda4243bc84b4d5f0d
[ "MIT" ]
null
null
null
workSpace/boot.py
khutson/macequilt
a4a090ddf296fcea763825fda4243bc84b4d5f0d
[ "MIT" ]
null
null
null
# This file is executed on every boot (including wake-boot from deepsleep) import esp esp.osdebug(None) import wifi wifi.connect(repl=False) import gc gc.collect()
13
74
0.763314
0
0
0
0
0
0
0
0
74
0.43787
27a8cc8eee02c003f65618c441f8c80b6ada0052
1,790
py
Python
s3-scan-tar/tests/test_models.py
omBratteng/mottak
b7d2e1d063b31c2ad89c66e5414297612f91ebe9
[ "Apache-2.0" ]
4
2021-03-05T15:39:24.000Z
2021-09-15T06:11:45.000Z
s3-scan-tar/tests/test_models.py
omBratteng/mottak
b7d2e1d063b31c2ad89c66e5414297612f91ebe9
[ "Apache-2.0" ]
631
2020-04-27T10:39:18.000Z
2022-03-31T14:51:38.000Z
s3-scan-tar/tests/test_models.py
omBratteng/mottak
b7d2e1d063b31c2ad89c66e5414297612f91ebe9
[ "Apache-2.0" ]
3
2020-02-20T15:48:03.000Z
2021-12-16T22:50:40.000Z
import pytest from app.models import AVScanResult @pytest.fixture def _scan_result() -> AVScanResult: clean = 10 virus = 0 skipped = 0 return AVScanResult(clean, virus, skipped) def test_avscanresult_init(_scan_result): result = AVScanResult(10, 0, 0) assert result == _scan_result def test...
29.833333
62
0.655307
0
0
0
0
143
0.079755
0
0
619
0.345231
27a97aed4e6639ade2261db847e3a6e16989a40c
1,424
py
Python
autoload/activate_this.py
BonaBeavis/vim-venom
a4ed892bd844de51c92e7b59dbc975db02c939b9
[ "Vim" ]
24
2020-04-26T11:50:40.000Z
2022-02-22T08:05:36.000Z
autoload/activate_this.py
BonaBeavis/vim-venom
a4ed892bd844de51c92e7b59dbc975db02c939b9
[ "Vim" ]
5
2021-01-26T12:41:12.000Z
2022-01-11T15:40:43.000Z
autoload/activate_this.py
BonaBeavis/vim-venom
a4ed892bd844de51c92e7b59dbc975db02c939b9
[ "Vim" ]
4
2020-05-02T21:45:36.000Z
2022-03-25T13:51:00.000Z
# -*- coding: utf-8 -*- """Activate virtualenv for current interpreter: Source: https://github.com/pypa/virtualenv Use exec(open(this_file).read(), {'__file__': this_file}). """ import os import site import sys try: abs_file = os.path.abspath(__file__) except NameError: raise AssertionError( "You must...
30.297872
78
0.714185
0
0
0
0
0
0
0
0
618
0.433989
27abc06bb50512111945d911b3687183e05cd80c
2,731
py
Python
tattrdb/models.py
gmjosack/tattrdb
88d46eb049d05a1f0531531c49c2209c2bbbf562
[ "MIT" ]
1
2018-11-24T02:33:15.000Z
2018-11-24T02:33:15.000Z
tattrdb/models.py
gmjosack/tattrdb
88d46eb049d05a1f0531531c49c2209c2bbbf562
[ "MIT" ]
null
null
null
tattrdb/models.py
gmjosack/tattrdb
88d46eb049d05a1f0531531c49c2209c2bbbf562
[ "MIT" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy import ( Table, Column, Integer, String, Text, Boolean, ForeignKey, Enum, DateTime ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, backref, sessionmaker Session = sessionmaker() Model = declarative_base() ...
28.154639
103
0.656902
1,949
0.713658
0
0
0
0
0
0
387
0.141706
27abe035638fda37c09ec1990dca44e2161d8667
30
py
Python
onepassword/__init__.py
jemmyw/1pass
8dbfa5e062ce08e26c5619dbdb2b27323e5b3dc9
[ "MIT" ]
1
2016-11-14T22:16:48.000Z
2016-11-14T22:16:48.000Z
onepassword/__init__.py
elliotchance/1pass
4bd45a52476c410c6e5b51f90fd46cbdd436807f
[ "MIT" ]
null
null
null
onepassword/__init__.py
elliotchance/1pass
4bd45a52476c410c6e5b51f90fd46cbdd436807f
[ "MIT" ]
null
null
null
from keychain import Keychain
15
29
0.866667
0
0
0
0
0
0
0
0
0
0
27ae7ed160d61ff6977fb0ea0dc61ee80279d33b
152,955
py
Python
modules/cockatoo/_knitnetwork.py
fstwn/Cockatoo
0c5f9c515053bfc31e62d20fddc4ae9bece09d88
[ "MIT" ]
9
2020-09-26T03:41:21.000Z
2021-11-29T06:52:35.000Z
modules/cockatoo/_knitnetwork.py
fstwn/Cockatoo
0c5f9c515053bfc31e62d20fddc4ae9bece09d88
[ "MIT" ]
9
2020-08-10T19:38:03.000Z
2022-02-24T08:41:32.000Z
modules/cockatoo/_knitnetwork.py
fstwn/Cockatoo
0c5f9c515053bfc31e62d20fddc4ae9bece09d88
[ "MIT" ]
3
2020-12-26T08:43:56.000Z
2021-10-17T19:37:52.000Z
# PYTHON STANDARD LIBRARY IMPORTS --------------------------------------------- from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import deque from collections import OrderedDict from math import radians from math import pi from operator import...
45.454681
79
0.495106
150,387
0.983211
0
0
4,247
0.027766
0
0
52,321
0.342068