hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
ffad4729a0ab2ddd177f2677d26fcdeafd55e261
1,504
py
Python
python/8.py
dpetker/project-euler
d232367d5f21821871c53d6ecc43c8d6af801d2c
[ "MIT" ]
null
null
null
python/8.py
dpetker/project-euler
d232367d5f21821871c53d6ecc43c8d6af801d2c
[ "MIT" ]
null
null
null
python/8.py
dpetker/project-euler
d232367d5f21821871c53d6ecc43c8d6af801d2c
[ "MIT" ]
null
null
null
# Soultion for Project Euler Problem #8 - https://projecteuler.net/problem=8 # (c) 2017 dpetker TEST_VAL = '7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950...
71.619048
1,013
0.90359
# Soultion for Project Euler Problem #8 - https://projecteuler.net/problem=8 # (c) 2017 dpetker TEST_VAL = '7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950...
0
0
0
0
0
89
0
0
23
6eac3541878bf8483397909868c0b94d72499820
4,733
py
Python
electionguard_verify/utils.py
nickboucher/PyVerify
42f7aacaafc2455922e1c0b89d9a45e2b0e17915
[ "MIT" ]
1
2020-11-30T02:04:18.000Z
2020-11-30T02:04:18.000Z
electionguard_verify/utils.py
nickboucher/electionguard-verify
42f7aacaafc2455922e1c0b89d9a45e2b0e17915
[ "MIT" ]
null
null
null
electionguard_verify/utils.py
nickboucher/electionguard-verify
42f7aacaafc2455922e1c0b89d9a45e2b0e17915
[ "MIT" ]
null
null
null
""" utils.py Nicholas Boucher 2020 Utility functions for assisting in election verification calculations. """ from typing import TypeVar from logging import warning from electionguard.ballot import CiphertextAcceptedBallot, CiphertextBallotContest, CiphertextBallotSelection T: TypeVar = TypeVar('T') d...
37.267717
117
0.654764
""" utils.py Nicholas Boucher 2020 Utility functions for assisting in election verification calculations. """ from typing import TypeVar, Iterable from logging import info, warning from electionguard.group import ElementModP, int_to_p from electionguard.election import ElectionDescription, ContestDescript...
0
0
0
2,549
0
0
0
143
135
0c3e2c67bfe44f727a088c6f877154b8fbe9995e
8,453
py
Python
tordatahub/models/types.py
jasonz93/python-tordatahub
3a9a497d5a0bebf915d7e24049dd8b06099e3c04
[ "Apache-2.0" ]
null
null
null
tordatahub/models/types.py
jasonz93/python-tordatahub
3a9a497d5a0bebf915d7e24049dd8b06099e3c04
[ "Apache-2.0" ]
null
null
null
tordatahub/models/types.py
jasonz93/python-tordatahub
3a9a497d5a0bebf915d7e24049dd8b06099e3c04
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License...
28.176667
95
0.659293
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License...
0
51
0
5,174
0
1,345
0
-35
337
9716ba57dde39ce137fcb1254e0cd19d311a0194
17,674
py
Python
build/lib/mwahpy/mwah_handle_output.py
thomasdonlon/mwahpy
9bcba0a5f3042beeccf2a9d6ca98d63331e1bef6
[ "MIT" ]
3
2020-09-27T16:22:36.000Z
2022-03-23T22:00:55.000Z
build/lib/mwahpy/mwah_handle_output.py
thomasdonlon/mwahpy
9bcba0a5f3042beeccf2a9d6ca98d63331e1bef6
[ "MIT" ]
null
null
null
build/lib/mwahpy/mwah_handle_output.py
thomasdonlon/mwahpy
9bcba0a5f3042beeccf2a9d6ca98d63331e1bef6
[ "MIT" ]
1
2020-09-27T16:22:42.000Z
2020-09-27T16:22:42.000Z
#purpose: to take output from a MW@h .out file and produce workable data/plots to look at the resulting output in meaningful ways #this is still too hard-coded for my liking, but it'll have to do for now #i.e. if you want to add new attributes to the data class then you manually have to go through and fix the appending...
44.518892
266
0.581928
#purpose: to take output from a MW@h .out file and produce workable data/plots to look at the resulting output in meaningful ways #this is still too hard-coded for my liking, but it'll have to do for now #i.e. if you want to add new attributes to the data class then you manually have to go through and fix the appending...
0
0
0
12,273
0
3,600
0
13
245
e3ba67c416417347a7f1ba1c65b86a55a4f9dc51
180
py
Python
settings/production.py
kittenswolf/aid-bot
a4ad50339e8bf147a09652273ca2c456289ddbe4
[ "BSD-3-Clause" ]
1
2020-12-19T00:56:28.000Z
2020-12-19T00:56:28.000Z
settings/production.py
kittenswolf/aid-bot
a4ad50339e8bf147a09652273ca2c456289ddbe4
[ "BSD-3-Clause" ]
null
null
null
settings/production.py
kittenswolf/aid-bot
a4ad50339e8bf147a09652273ca2c456289ddbe4
[ "BSD-3-Clause" ]
2
2020-06-29T18:12:09.000Z
2021-04-11T19:47:40.000Z
# -*- coding: utf-8 -*- import logging logging_level = logging.DEBUG
11.25
29
0.55
# -*- coding: utf-8 -*- import logging logging_level = logging.DEBUG class bot: command_prefix = "p!" startup_cogs = [ "cogs.play", "cogs.logs" ]
0
0
0
84
0
0
0
0
23
baf797276a92fbd305a3c4fc7c578f4180394cd1
3,492
py
Python
mycroft/interfaces/speech/wake_word_engines/pocketsphinx_engine.py
MatthewScholefield/mycroft-light
95092ad3344ac95859952e94e280eb177e5c1c83
[ "Apache-2.0" ]
4
2018-03-30T01:27:04.000Z
2018-11-23T10:06:34.000Z
mycroft/interfaces/speech/wake_word_engines/pocketsphinx_engine.py
MatthewScholefield/mycroft-light
95092ad3344ac95859952e94e280eb177e5c1c83
[ "Apache-2.0" ]
3
2017-06-23T20:30:57.000Z
2017-09-12T18:00:09.000Z
mycroft/interfaces/speech/wake_word_engines/pocketsphinx_engine.py
MatthewScholefield/mycroft-light
95092ad3344ac95859952e94e280eb177e5c1c83
[ "Apache-2.0" ]
1
2017-06-27T18:35:37.000Z
2017-06-27T18:35:37.000Z
# Copyright (c) 2019 Mycroft AI, Inc. and Matthew Scholefield # # This file is part of Mycroft Light # (see https://github.com/MatthewScholefield/mycroft-light). # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for...
36.757895
100
0.687572
# Copyright (c) 2019 Mycroft AI, Inc. and Matthew Scholefield # # This file is part of Mycroft Light # (see https://github.com/MatthewScholefield/mycroft-light). # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for...
0
211
0
2,042
0
0
0
110
179
c6be566db161d80cfe06c759c8d713915e91c3f5
2,680
py
Python
app/home/__init__.py
andres-hurtado-lopez/lramprodvent
257533d4ec07dc9783bd706d6af7ec0ec22fd9c0
[ "MIT" ]
null
null
null
app/home/__init__.py
andres-hurtado-lopez/lramprodvent
257533d4ec07dc9783bd706d6af7ec0ec22fd9c0
[ "MIT" ]
null
null
null
app/home/__init__.py
andres-hurtado-lopez/lramprodvent
257533d4ec07dc9783bd706d6af7ec0ec22fd9c0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*-
36.712329
187
0.666045
#!/usr/bin/env python # -*- coding: utf-8 -*- from bottle import template, redirect import utils def GET(**params): return template('home_index.html') def ejemplos_bootstrap_grid_GET(**params): return template("ejemplos_bootstrap_grid.html") def ejemplos_bootstrap_fixed_GET(**params): return template("e...
0
0
0
0
0
2,329
0
7
298
51e4fed988ec3b764cbf12a2b577969e31033754
3,630
py
Python
leetcode_python/Bit_Manipulation/number-of-1-bits.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
18
2019-08-01T07:45:02.000Z
2022-03-31T18:05:44.000Z
leetcode_python/Bit_Manipulation/number-of-1-bits.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
null
null
null
leetcode_python/Bit_Manipulation/number-of-1-bits.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
15
2019-12-29T08:46:20.000Z
2022-03-08T14:14:05.000Z
""" 191. Number of 1 Bits (Hamming weight) Easy Share Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight). Note: Note that in some languages, such as Java, there is no unsigned integer type. In this case, the input will be given as a signed int...
28.359375
278
0.637741
""" 191. Number of 1 Bits (Hamming weight) Easy Share Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight). Note: Note that in some languages, such as Java, there is no unsigned integer type. In this case, the input will be given as a signed int...
0
0
0
1,260
0
0
0
0
132
0c5221c48bef1567e6b1d71ee6d2abedfba75e10
5,014
py
Python
lstm_count.py
krrish94/learn_tensorflow
b5725bfbd09911e7c7342ab76eea07e294d5573c
[ "MIT" ]
null
null
null
lstm_count.py
krrish94/learn_tensorflow
b5725bfbd09911e7c7342ab76eea07e294d5573c
[ "MIT" ]
null
null
null
lstm_count.py
krrish94/learn_tensorflow
b5725bfbd09911e7c7342ab76eea07e294d5573c
[ "MIT" ]
null
null
null
# LSTM to count the number of '1's in a binary string # Reference: https://becominghuman.ai/a-noobs-guide-to-implementing-rnn-lstm-using-tensorflow-1907a5bbb1fa import numpy as np import tensorflow as tf """ Parameters """ # Seed for all RNGs rng_seed = 12345 np.random.seed(rng_seed) tf.set_random_seed(rng_seed) ...
28.327684
106
0.719186
# LSTM to count the number of '1's in a binary string # Reference: https://becominghuman.ai/a-noobs-guide-to-implementing-rnn-lstm-using-tensorflow-1907a5bbb1fa import numpy as np from random import shuffle import tensorflow as tf """ Parameters """ # Seed for all RNGs rng_seed = 12345 np.random.seed(rng_seed) tf...
0
0
0
0
0
0
0
5
22
883d14b1461d66ac48c971c5108dbca8ed428a76
1,445
py
Python
python/167-TwoSumII.py
vermouth1992/Leetcode
0d7dda52b12f9e01d88fc279243742cd8b4bcfd1
[ "MIT" ]
null
null
null
python/167-TwoSumII.py
vermouth1992/Leetcode
0d7dda52b12f9e01d88fc279243742cd8b4bcfd1
[ "MIT" ]
null
null
null
python/167-TwoSumII.py
vermouth1992/Leetcode
0d7dda52b12f9e01d88fc279243742cd8b4bcfd1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than i...
32.840909
137
0.640138
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than i...
225
0
0
553
0
0
0
0
24
b4420d340795295b5c6df067aacad1f7856079ba
5,015
py
Python
tests/test_bitwrap.py
bannsec/pfp
32f2d34fdec1c70019fa83c7006d5e3be0f92fcd
[ "MIT" ]
1
2018-01-01T12:52:33.000Z
2018-01-01T12:52:33.000Z
tests/test_bitwrap.py
richinseattle/py010fuzz
32f2d34fdec1c70019fa83c7006d5e3be0f92fcd
[ "MIT" ]
null
null
null
tests/test_bitwrap.py
richinseattle/py010fuzz
32f2d34fdec1c70019fa83c7006d5e3be0f92fcd
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 import os import sys import unittest sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) import pfp import pfp.errors if __name__ == "__main__": unittest.main()
30.579268
96
0.624526
#!/usr/bin/env python # encoding: utf-8 import os import six import struct import sys import unittest sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) import pfp import pfp.errors from pfp.fields import * import pfp.utils from pfp.bitwrap import BitwrappedStream import utils class TestBitwrap(unit...
0
0
0
4,647
0
0
0
-11
156
22c5ffc18357605c1164abb92cfa365a095206d5
4,788
py
Python
CarParkArcGisApi/CarParkArcGisApi/env/Lib/site-packages/arcgis/mapping/_utils.py
moazzamwaheed2017/carparkapi
e52ae1b2aed47321ce9d22ba6cd0b85fa60a417a
[ "MIT" ]
null
null
null
CarParkArcGisApi/CarParkArcGisApi/env/Lib/site-packages/arcgis/mapping/_utils.py
moazzamwaheed2017/carparkapi
e52ae1b2aed47321ce9d22ba6cd0b85fa60a417a
[ "MIT" ]
9
2020-02-03T15:50:10.000Z
2022-03-02T07:11:34.000Z
CarParkArcGisApi/CarParkArcGisApi/env/Lib/site-packages/arcgis/mapping/_utils.py
moazzamwaheed2017/carparkapi
e52ae1b2aed47321ce9d22ba6cd0b85fa60a417a
[ "MIT" ]
null
null
null
import logging as _logging import arcgis _log = _logging.getLogger(__name__) _use_async = False def _get_list_value(index, array): """ helper operation to loop a list of values regardless of the index value Example: >>> a = [111,222,333] >>> list_loop(15, a) 111 """ if len(array) =...
38.926829
383
0.7099
import logging as _logging import arcgis _log = _logging.getLogger(__name__) _use_async = False def _get_list_value(index, array): """ helper operation to loop a list of values regardless of the index value Example: >>> a = [111,222,333] >>> list_loop(15, a) 111 """ if len(array) =...
0
0
0
0
0
0
0
20
26
4da290692a1a584cea7cacaa0f0a14b29df47e75
1,002
py
Python
scenario3-clustering/docker/clustering/fileService.py
vietzd/qc-cloud-challenges
b239840b9924393f5c5e5939cea291b80e8198c5
[ "Apache-2.0" ]
3
2020-10-16T07:46:17.000Z
2021-07-27T12:17:55.000Z
qhana/microservices/clustering/fileService.py
UST-QuAntiL/qhana
bf499d072dcc37f81efec1b8e17b7d5460db7a04
[ "Apache-2.0" ]
null
null
null
qhana/microservices/clustering/fileService.py
UST-QuAntiL/qhana
bf499d072dcc37f81efec1b8e17b7d5460db7a04
[ "Apache-2.0" ]
null
null
null
""" Author: Daniel Fink Email: daniel-fink@outlook.com """
27.081081
72
0.653693
""" Author: Daniel Fink Email: daniel-fink@outlook.com """ import os import aiohttp class FileService: """ A service class for all kind of file access like downloads, file deletion, folder deletion, ... """ @classmethod def delete_if_exist(cls, *file_paths): for file_path in file_pat...
0
669
0
225
0
0
0
-19
68
675143110b25e3987bef5bdf13fdd698811b50f5
1,251
py
Python
var/spack/repos/builtin/packages/r-exactextractr/package.py
varioustoxins/spack
cab0e4cb240f34891a6d753f3393e512f9a99e9a
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/r-exactextractr/package.py
varioustoxins/spack
cab0e4cb240f34891a6d753f3393e512f9a99e9a
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
6
2022-01-08T08:41:11.000Z
2022-03-14T19:28:07.000Z
var/spack/repos/builtin/packages/r-exactextractr/package.py
foeroyingur/spack
5300cbbb2e569190015c72d0970d25425ea38647
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT)
44.678571
95
0.723421
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RExactextractr(RPackage): """Fast Extraction from Raster Datasets using Polygons Prov...
0
0
0
1,009
0
0
0
-2
46
101787d79ae009404ae396cdca46beb13ebed6be
19,566
py
Python
myprojectenv/lib/python3.5/site-packages/ansible/modules/network/cloudengine/ce_snmp_traps.py
lancerenteria/doFlask
2d4e242469b108c6c8316ee18a540307497bfb53
[ "MIT" ]
null
null
null
myprojectenv/lib/python3.5/site-packages/ansible/modules/network/cloudengine/ce_snmp_traps.py
lancerenteria/doFlask
2d4e242469b108c6c8316ee18a540307497bfb53
[ "MIT" ]
null
null
null
myprojectenv/lib/python3.5/site-packages/ansible/modules/network/cloudengine/ce_snmp_traps.py
lancerenteria/doFlask
2d4e242469b108c6c8316ee18a540307497bfb53
[ "MIT" ]
null
null
null
#!/usr/bin/python # # This file is part of Ansible # # Ansible 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, or # (at your option) any later version. # # Ansible is distribut...
35.639344
104
0.533425
#!/usr/bin/python # # This file is part of Ansible # # Ansible 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, or # (at your option) any later version. # # Ansible is distribut...
0
0
0
13,725
0
0
0
70
46
e900cb25ac311208e0b435f3e7039d91abadad7f
7,435
py
Python
scripts/process-files.py
IBM/cpd-workshop-health-care
5c84be0a3557578aada7616023ae439d4033eb34
[ "Apache-2.0" ]
2
2020-11-11T08:32:27.000Z
2020-12-15T16:56:00.000Z
scripts/process-files.py
IBM/cpd-workshop-health-care
5c84be0a3557578aada7616023ae439d4033eb34
[ "Apache-2.0" ]
1
2020-12-08T22:36:25.000Z
2020-12-08T22:36:25.000Z
scripts/process-files.py
IBM/cpd-workshop-health-care
5c84be0a3557578aada7616023ae439d4033eb34
[ "Apache-2.0" ]
1
2021-05-13T06:26:45.000Z
2021-05-13T06:26:45.000Z
import sys import os import time import argparse BASE_DIR = "/Users/jrtorres/Documents/JRTDocs/Development/General_Projects/cpd-workshop-health-care/data/" OUTPUT_DIR = "/Users/jrtorres/tmp/" LOINC_CODES_NAMES = { "8302-2": "Height", "29463-7": "Weight", "6690-2": "Leukocytes", "789-8": "Erythrocy...
49.238411
160
0.689307
import csv import datetime import random import sys import os import time import argparse import pandas as pd import json from pyspark.sql import SparkSession from pyspark.sql.functions import col BASE_DIR = "/Users/jrtorres/Documents/JRTDocs/Development/General_Projects/cpd-workshop-health-care/data/" OUTPUT_DIR = "...
0
0
0
0
0
4,695
0
-6
224
f9cdc76f722ac504441daaa3a2cc12b337f137b8
584
py
Python
evap/evaluation/migrations/0066_rename_course_is_required_for_reward.py
felixrindt/EvaP
fe65fcc511cc942695ce1edbaab170894f0d37b1
[ "MIT" ]
29
2020-02-28T23:03:41.000Z
2022-02-19T09:29:36.000Z
evap/evaluation/migrations/0066_rename_course_is_required_for_reward.py
felixrindt/EvaP
fe65fcc511cc942695ce1edbaab170894f0d37b1
[ "MIT" ]
737
2015-01-02T17:43:25.000Z
2018-12-10T20:45:10.000Z
evap/evaluation/migrations/0066_rename_course_is_required_for_reward.py
felixrindt/EvaP
fe65fcc511cc942695ce1edbaab170894f0d37b1
[ "MIT" ]
83
2015-01-14T12:39:41.000Z
2018-10-29T16:36:43.000Z
# Generated by Django 2.0.5 on 2018-05-08 17:52
22.461538
79
0.597603
# Generated by Django 2.0.5 on 2018-05-08 17:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('evaluation', '0065_questionnaire_type'), ] operations = [ migrations.RenameField( model_name='course', old_name='is...
0
0
0
470
0
0
0
19
46
58c2741b98c4a786da6cb5614ef1568fb36b7ea4
3,474
py
Python
calculator.py
arpansarkar190794/Arpan_Sarkar
b36f66f0ed00668b005fae903ce463883a803fd5
[ "bzip2-1.0.6" ]
null
null
null
calculator.py
arpansarkar190794/Arpan_Sarkar
b36f66f0ed00668b005fae903ce463883a803fd5
[ "bzip2-1.0.6" ]
null
null
null
calculator.py
arpansarkar190794/Arpan_Sarkar
b36f66f0ed00668b005fae903ce463883a803fd5
[ "bzip2-1.0.6" ]
null
null
null
root = Tk() my_gui = Calculator(root) root.mainloop()
36.568421
127
0.578008
from tkinter import * class Calculator: def __init__(self, master): self.master = master master.title("Python Calculator") # create screen widget self.screen = Text(master, state='disabled', width=30, height=3, background="yellow", foreground="blue") # position...
0
0
0
3,363
0
0
0
0
48
860f452e421076522902caa2d22053f6e0ab955f
256
py
Python
tools/mo/openvino/tools/mo/mo.py
IndiraSalyahova/openvino
ff2df42339e15645dc89095d4cd8ff032b4da250
[ "Apache-2.0" ]
null
null
null
tools/mo/openvino/tools/mo/mo.py
IndiraSalyahova/openvino
ff2df42339e15645dc89095d4cd8ff032b4da250
[ "Apache-2.0" ]
null
null
null
tools/mo/openvino/tools/mo/mo.py
IndiraSalyahova/openvino
ff2df42339e15645dc89095d4cd8ff032b4da250
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 if __name__ == "__main__": from subprocess_main import subprocess_main # pylint: disable=no-name-in-module subprocess_main(framework=None)
25.6
84
0.75
#!/usr/bin/env python3 # Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 if __name__ == "__main__": from subprocess_main import subprocess_main # pylint: disable=no-name-in-module subprocess_main(framework=None)
0
0
0
0
0
0
0
0
0
d0a137dc28fc14372d955c6d37be2c48ed58ce87
1,269
py
Python
Day_25/inheritance.py
kiranrraj/100Days_Of_Coding
ab75d83be9be87fb7bc83a3f3b72a4638dab22a1
[ "MIT" ]
null
null
null
Day_25/inheritance.py
kiranrraj/100Days_Of_Coding
ab75d83be9be87fb7bc83a3f3b72a4638dab22a1
[ "MIT" ]
null
null
null
Day_25/inheritance.py
kiranrraj/100Days_Of_Coding
ab75d83be9be87fb7bc83a3f3b72a4638dab22a1
[ "MIT" ]
null
null
null
# Title : Inheritance # Author : Kiran Raj R. # Date : 08:11:2020 # triangle = Polygon(3) # # triangle.get_sides() # # triangle.print_sides() triangle1 = Triangle() triangle1.get_sides() triangle1.findArea()
28.840909
107
0.603625
# Title : Inheritance # Author : Kiran Raj R. # Date : 08:11:2020 import math class Polygon: "Create a simply polygon class, which takes number of sites and takes the maginute of each sides" def __init__(self, num_sides): self.num_sides = int(num_sides) self.mag_sides = [] def get_...
0
0
0
997
0
0
0
-10
69
63a5dda4dfc333b4824d2a196607eff046eabd58
2,685
py
Python
tools/request_sender.py
gusutabopb/pytrthree
6c036e6ba44793261dea6017091423af3624050c
[ "MIT" ]
2
2018-09-02T04:46:36.000Z
2020-11-28T18:28:35.000Z
tools/request_sender.py
gusutabopb/pytrthree
6c036e6ba44793261dea6017091423af3624050c
[ "MIT" ]
null
null
null
tools/request_sender.py
gusutabopb/pytrthree
6c036e6ba44793261dea6017091423af3624050c
[ "MIT" ]
1
2020-10-18T16:17:08.000Z
2020-10-18T16:17:08.000Z
#!/usr/bin/env python import argparse import datetime import pandas as pd import yaml from pytrthree import TRTH from pytrthree.utils import retry if __name__ == '__main__': parser = argparse.ArgumentParser(description='Tool to send a series of requests to TRTH.') parser.add_argument('--config', action='st...
47.105263
105
0.660708
#!/usr/bin/env python import argparse import datetime import pandas as pd import yaml from pytrthree import TRTH from pytrthree.utils import retry def make_request(daterange, criteria): request = api.factory.LargeRequestSpec(**template) short_dates = sorted([x.replace('-', '') for x in daterange.values()]) ...
0
0
0
0
0
666
0
0
46
0ddfbadbbe65167ee077658fdcdc1211bdb095b7
1,789
py
Python
Logistic_Regression/tests/test_logistic_regression.py
hectorLop/ML_algorithms
0c5181e460640efc7e81210cf132f3bbd9d73910
[ "MIT" ]
null
null
null
Logistic_Regression/tests/test_logistic_regression.py
hectorLop/ML_algorithms
0c5181e460640efc7e81210cf132f3bbd9d73910
[ "MIT" ]
null
null
null
Logistic_Regression/tests/test_logistic_regression.py
hectorLop/ML_algorithms
0c5181e460640efc7e81210cf132f3bbd9d73910
[ "MIT" ]
null
null
null
import numpy as np from Logistic_Regression.logistic_regression import LogisticRegression def test_logistic_regression(train_test_data_final): """ Tests the linear regression algorithm using the Normal Equation """ X_train, y_train = train_test_data_final X_train, y_train = X_train[:, 3:]...
30.844828
117
0.693684
import pytest import numpy as np from sklearn import datasets from Logistic_Regression.logistic_regression import LogisticRegression @pytest.fixture def train_test_data_final(): iris = datasets.load_iris() X = iris['data'] y = iris['target'] return X, y def test_logistic_regression(t...
0
124
0
0
0
769
0
-1
120
2664c817d15259cca23b6839c61cc8482c807f64
176
py
Python
blogposts/admin.py
prithaupadhyay/code-talk
1140e78d128c7cf7f7cf08039f3310bcd7cf0a52
[ "MIT" ]
null
null
null
blogposts/admin.py
prithaupadhyay/code-talk
1140e78d128c7cf7f7cf08039f3310bcd7cf0a52
[ "MIT" ]
null
null
null
blogposts/admin.py
prithaupadhyay/code-talk
1140e78d128c7cf7f7cf08039f3310bcd7cf0a52
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Question from .models import Answer # Register your models here admin.site.register(Question) admin.site.register(Answer)
22
32
0.818182
from django.contrib import admin from .models import Question from .models import Answer # Register your models here admin.site.register(Question) admin.site.register(Answer)
0
0
0
0
0
0
0
0
0
8c8f006b0635abe2b91d69c825cc97f2272505a5
1,605
py
Python
tests/test_util.py
ecohealthalliance/concept-tools
865a7ceb94ca8d927eb9a7ed53fcb6c1e1a68f53
[ "Apache-2.0" ]
null
null
null
tests/test_util.py
ecohealthalliance/concept-tools
865a7ceb94ca8d927eb9a7ed53fcb6c1e1a68f53
[ "Apache-2.0" ]
null
null
null
tests/test_util.py
ecohealthalliance/concept-tools
865a7ceb94ca8d927eb9a7ed53fcb6c1e1a68f53
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Test the utils""" import sys import unittest sys.path = ['./'] + sys.path if __name__ == '__main__': unittest.main()
25.078125
74
0.493458
#!/usr/bin/env python # -*- coding: utf-8 -*- """Test the utils""" import sys import os import unittest sys.path = ['./'] + sys.path from util import is_meta from util import get_canonical_id_from_url_segment from util import get_canonical_id_from_title class UtilTest(unittest.TestCase): def test_is_meta(sel...
4
0
0
1,273
0
0
0
43
112
11a300dc84861ec3cce363d43775cbd888385cd9
3,348
py
Python
docs/dev/Example4_gdal.py
vincentschut/isce2
1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c
[ "ECL-2.0", "Apache-2.0" ]
1,133
2022-01-07T21:24:57.000Z
2022-01-07T21:33:08.000Z
docs/dev/Example4_gdal.py
vincentschut/isce2
1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c
[ "ECL-2.0", "Apache-2.0" ]
276
2019-02-10T07:18:28.000Z
2022-03-31T21:45:55.000Z
docs/dev/Example4_gdal.py
vincentschut/isce2
1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c
[ "ECL-2.0", "Apache-2.0" ]
235
2019-02-10T05:00:53.000Z
2022-03-18T07:37:24.000Z
#!/usr/bin/env python3 import numpy as np import argparse from osgeo import gdal import isceobj def cmdLineParse(): ''' Parse command line. ''' parser = argparse.ArgumentParser(description='Convert GeoTiff to ISCE file') parser.add_argument('-i','--input', dest='infile', type=str, req...
29.368421
142
0.565114
#!/usr/bin/env python3 import numpy as np import argparse from osgeo import gdal import isce import isceobj import os def cmdLineParse(): ''' Parse command line. ''' parser = argparse.ArgumentParser(description='Convert GeoTiff to ISCE file') parser.add_argument('-i','--input', dest='infile', typ...
0
0
0
0
0
0
0
-22
44
6ba2273aee35bc6f9aba457d1b63e54dd5e5369f
3,300
py
Python
test.py
leJson/DRN
27d7cb3b40d5a760fd7bf9b14b390cbdb08d617b
[ "MIT" ]
1
2021-07-25T13:52:04.000Z
2021-07-25T13:52:04.000Z
test.py
leJson/DRN
27d7cb3b40d5a760fd7bf9b14b390cbdb08d617b
[ "MIT" ]
null
null
null
test.py
leJson/DRN
27d7cb3b40d5a760fd7bf9b14b390cbdb08d617b
[ "MIT" ]
null
null
null
if __name__ == '__main__': mse_cal() # read_pcd_pointclouds() # show_gd() # file_path = '/home/ljs/workspace/eccv/FirstTrainingData/out_4096/train/38.pcd' # read_pcd_pointclouds(file_path)
28.947368
84
0.646061
import json import numpy as np import open3d as o3d def json_load(filename): with open(filename, "r") as fr: vars = json.load(fr) # for k, v in vars.items(): # vars[k] = np.array(v) return vars def _show_gd(): path = '/home/ljs/workspace/eccv/FirstTrainingData/label/GroundTruth.json'...
0
0
0
0
0
2,894
0
-14
205
1406ecd917ed3d4abcb32d216404ddeddc169ba6
4,149
py
Python
global_sewage_signatures/MinHash.py
josl/global-sewage-signatures
f4d314616706f2ff7d437a258d16c7ce5df64bfd
[ "MIT" ]
null
null
null
global_sewage_signatures/MinHash.py
josl/global-sewage-signatures
f4d314616706f2ff7d437a258d16c7ce5df64bfd
[ "MIT" ]
null
null
null
global_sewage_signatures/MinHash.py
josl/global-sewage-signatures
f4d314616706f2ff7d437a258d16c7ce5df64bfd
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of global_sewage_signatures. # https://github.com/josl/Global_Sewage_Signatures # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2016, Jose L. Bellod Cisneros & Kosai Al-Nakked # <bellod.cisneros@gmail....
37.044643
77
0.626175
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of global_sewage_signatures. # https://github.com/josl/Global_Sewage_Signatures # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2016, Jose L. Bellod Cisneros & Kosai Al-Nakked # <bellod.cisneros@gmail....
0
0
0
3,564
0
0
0
1
113
2e1c3e6f0e44cfdaf234da9e9952911db70a62dc
10,021
py
Python
apps/sso/models.py
g10f/sso
ba6eb712add388c69d4880f5620a2e4ce42d3fee
[ "BSD-3-Clause" ]
3
2021-05-16T17:06:57.000Z
2021-05-28T17:14:05.000Z
apps/sso/models.py
g10f/sso
ba6eb712add388c69d4880f5620a2e4ce42d3fee
[ "BSD-3-Clause" ]
null
null
null
apps/sso/models.py
g10f/sso
ba6eb712add388c69d4880f5620a2e4ce42d3fee
[ "BSD-3-Clause" ]
null
null
null
import logging import re from django.core.validators import RegexValidator from django.utils.translation import gettext_lazy as _ logger = logging.getLogger(__name__) def ensure_single_primary(queryset): """ ensure that at most one item of the queryset is primary """ primary_items = queryset.fi...
35.285211
119
0.623491
import logging import os import re import uuid from io import BytesIO from mimetypes import guess_extension from os.path import splitext from PIL import Image from django.core.files.uploadedfile import InMemoryUploadedFile from django.core.validators import RegexValidator from django.db import models from django.db.mo...
0
0
0
2,376
0
4,632
0
174
563
9b44dec8def3ef6e4bf77338dedc2dbf168db1a2
1,829
py
Python
web/utility.py
dan0nchik/SAP-HANA-AutoML
68cde80bd7fbfc751fb56062af30aec9238f9fb3
[ "MIT" ]
59
2021-01-10T18:35:38.000Z
2022-02-28T16:49:06.000Z
web/utility.py
u1810291/SAP-HANA-AutoML
06200bd1f813916fc81eb1ccb0ed0b1275e22945
[ "MIT" ]
3
2021-02-01T19:33:39.000Z
2021-06-29T08:32:33.000Z
web/utility.py
u1810291/SAP-HANA-AutoML
06200bd1f813916fc81eb1ccb0ed0b1275e22945
[ "MIT" ]
10
2021-06-18T12:35:34.000Z
2021-12-28T18:48:36.000Z
import base64 # from https://discuss.streamlit.io/t/cannot-print-the-terminal-output-in-streamlit/6602/2 def get_table_download_link(df, file_name): """Generates a link allowing the data in a given panda dataframe to be downloaded in: dataframe, file name out: href string """ csv = df.to_csv(...
26.128571
95
0.651722
import base64 import sys from contextlib import contextmanager from io import StringIO from threading import current_thread from typing import Union import hana_ml.dataframe import pandas import streamlit as st from streamlit.report_thread import REPORT_CONTEXT_ATTR_NAME # from https://discuss.streamlit.io/t/cannot-...
0
634
0
0
0
298
0
60
290
fba1cc411163b25b7360c734749b5a68e6e1fd88
1,887
py
Python
ensembl_prodinf/db_utils.py
danstaines/ensembl-prodinf
65c51ac7f2dd4fe12b051f417ca252979916798b
[ "Apache-2.0" ]
null
null
null
ensembl_prodinf/db_utils.py
danstaines/ensembl-prodinf
65c51ac7f2dd4fe12b051f417ca252979916798b
[ "Apache-2.0" ]
null
null
null
ensembl_prodinf/db_utils.py
danstaines/ensembl-prodinf
65c51ac7f2dd4fe12b051f417ca252979916798b
[ "Apache-2.0" ]
null
null
null
# Utilities for interacting with databases import os from sqlalchemy import create_engine, text from ensembl_prodinf.server_utils import get_file_sizes from sqlalchemy.engine.url import make_url def list_databases(db_uri, query): """ List databases on a specified MySQL server Arguments: db_uri : UR...
37
98
0.696873
# Utilities for interacting with databases import os from urllib.parse import urlparse from sqlalchemy import create_engine, text from ensembl_prodinf.server_utils import get_file_sizes from sqlalchemy.engine.url import make_url def validate_mysql_url(db_uri): parsed_uri = urlparse(db_uri) if parsed_uri.schem...
0
0
0
0
0
367
0
12
45
8515fdec3b7e47b694ca09e5b731ef270e5707c5
2,642
py
Python
robot_explorers/gui/__main__.py
Nino-SEGALA/HuaweiChallenge
a628f5550063422b095300846bde5680a5e95414
[ "BSD-3-Clause" ]
null
null
null
robot_explorers/gui/__main__.py
Nino-SEGALA/HuaweiChallenge
a628f5550063422b095300846bde5680a5e95414
[ "BSD-3-Clause" ]
null
null
null
robot_explorers/gui/__main__.py
Nino-SEGALA/HuaweiChallenge
a628f5550063422b095300846bde5680a5e95414
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ''' Copyright (c) 2020 Huawei Technologies Sweden AB, All rights reserved. Authors: Karl Gfvert ''' import argparse from .gui import GUI parser = argparse.ArgumentParser(description='Run GUI') parser.add_argument('input_dir', metavar='input_dir', type=str, help='Path to saved ...
42.612903
128
0.746026
# -*- coding: utf-8 -*- ''' Copyright (c) 2020 Huawei Technologies Sweden AB, All rights reserved. Authors: Karl Gäfvert ''' import argparse from .gui import GUI parser = argparse.ArgumentParser(description='Run GUI') parser.add_argument('input_dir', metavar='input_dir', type=str, help='Path to saved...
4
0
0
0
0
0
0
0
0
d7a4e00fe1c08fb5478a7ee1767b733ba5867aef
3,113
py
Python
djmoney_rates/backends.py
Songtrust/django-money-rates
a2b9e7d31d1799751e7dfaf6cb5094256530e79e
[ "BSD-3-Clause" ]
null
null
null
djmoney_rates/backends.py
Songtrust/django-money-rates
a2b9e7d31d1799751e7dfaf6cb5094256530e79e
[ "BSD-3-Clause" ]
1
2022-02-01T18:28:43.000Z
2022-02-01T20:42:05.000Z
djmoney_rates/backends.py
Songtrust/django-money-rates
a2b9e7d31d1799751e7dfaf6cb5094256530e79e
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import logging logger = logging.getLogger(__name__)
31.765306
97
0.638612
from __future__ import unicode_literals import logging import json from django.core.exceptions import ImproperlyConfigured from urllib.request import urlopen from .exceptions import RateBackendError from .models import RateSource, Rate from .settings import money_rates_settings logger = logging.getLogger(__name__)...
0
0
0
2,744
0
0
0
92
180
3350009913018054be2ddf059f93dbc77731d306
10,721
py
Python
climlab/domain/field.py
nfeldl/climlab
2cabb49e2c3f54c1795f24338ef5ee44e49fc7e7
[ "BSD-3-Clause", "MIT" ]
160
2015-02-25T15:56:37.000Z
2022-03-14T23:51:23.000Z
climlab/domain/field.py
nfeldl/climlab
2cabb49e2c3f54c1795f24338ef5ee44e49fc7e7
[ "BSD-3-Clause", "MIT" ]
137
2015-12-18T17:39:31.000Z
2022-02-04T20:50:53.000Z
climlab/domain/field.py
nfeldl/climlab
2cabb49e2c3f54c1795f24338ef5ee44e49fc7e7
[ "BSD-3-Clause", "MIT" ]
54
2015-04-28T05:57:39.000Z
2022-02-17T08:15:11.000Z
# Trying a new data model for state variables and domains: # Create a new sub-class of numpy.ndarray # that has as an attribute the domain itself # Following a tutorial on subclassing ndarray here: # # http://docs.scipy.org/doc/numpy/user/basics.subclassing.html from __future__ import division import numpy as np ...
38.01773
86
0.566179
# Trying a new data model for state variables and domains: # Create a new sub-class of numpy.ndarray # that has as an attribute the domain itself # Following a tutorial on subclassing ndarray here: # # http://docs.scipy.org/doc/numpy/user/basics.subclassing.html from __future__ import division import numpy as np fr...
0
0
0
7,082
0
616
0
28
91
1c219888920e1a8bc93025db5532422bfc527d70
543
py
Python
splitData.py
csortu/drugMLPytorch
7ea6ef8c46dc3027a7ebd21836b7b12c23659db8
[ "MIT" ]
null
null
null
splitData.py
csortu/drugMLPytorch
7ea6ef8c46dc3027a7ebd21836b7b12c23659db8
[ "MIT" ]
null
null
null
splitData.py
csortu/drugMLPytorch
7ea6ef8c46dc3027a7ebd21836b7b12c23659db8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 13 13:32:14 2019 @author: ortutay """ import pandas as pd import numpy as np link = 'http://bit.ly/uforeports' ufo = pd.read_csv(link) # We split 60-20-20% tran-validation-test sets train, validate, test = np.split(ufo.sample(frac=1), ...
23.608696
88
0.598527
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 13 13:32:14 2019 @author: ortutay """ import pandas as pd import numpy as np link = 'http://bit.ly/uforeports' ufo = pd.read_csv(link) # We split 60-20-20% tran-validation-test sets train, validate, test = np.split(ufo.sample(frac=1), ...
0
0
0
0
0
0
0
0
0
db3dbbc1512ecbbd2e1ba563130b86c31b5d740a
3,867
py
Python
packages/fetchai/connections/p2p_stub/connection.py
devjsc/agents-aea
872f7b76cbcd33b6c809905c68681790bb93ff2f
[ "Apache-2.0" ]
null
null
null
packages/fetchai/connections/p2p_stub/connection.py
devjsc/agents-aea
872f7b76cbcd33b6c809905c68681790bb93ff2f
[ "Apache-2.0" ]
null
null
null
packages/fetchai/connections/p2p_stub/connection.py
devjsc/agents-aea
872f7b76cbcd33b6c809905c68681790bb93ff2f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
35.805556
107
0.639514
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
0
0
789
1,833
0
0
0
113
179
45f23f6efe4ea3f63029af086469c8e887e61725
276
py
Python
PythonDownload/pythonexercicios/ex035.py
GitGuii/PythonExs
afab77b311d23f7ed88d94e9ce927653cf648b29
[ "MIT" ]
1
2021-08-10T15:00:34.000Z
2021-08-10T15:00:34.000Z
PythonDownload/pythonexercicios/ex035.py
GitGuii/PythonExs
afab77b311d23f7ed88d94e9ce927653cf648b29
[ "MIT" ]
null
null
null
PythonDownload/pythonexercicios/ex035.py
GitGuii/PythonExs
afab77b311d23f7ed88d94e9ce927653cf648b29
[ "MIT" ]
null
null
null
n1 = float(input('Digite o primeiro numero')) n2 = float(input('Digite o segundo numero')) n3 = float(input('Digite o terceiro numero')) if n1 < (n2 + n3) and n2 < (n1 + n3) and n3 < (n2 + n1): print('Podem formar um triangulo') else: print('Nao formam um triangulo')
34.5
56
0.652174
n1 = float(input('Digite o primeiro numero')) n2 = float(input('Digite o segundo numero')) n3 = float(input('Digite o terceiro numero')) if n1 < (n2 + n3) and n2 < (n1 + n3) and n3 < (n2 + n1): print('Podem formar um triangulo') else: print('Nao formam um triangulo')
0
0
0
0
0
0
0
0
0
95475ab1680a0c52a5af6f1bf727e1a18b73e173
1,867
py
Python
eval_adynorm.py
bestasoff/adynorm
e43488db2b49b4025faa280404bc44f6103c326d
[ "MIT" ]
1
2021-11-10T07:49:13.000Z
2021-11-10T07:49:13.000Z
eval_adynorm.py
bestasoff/adynorm
e43488db2b49b4025faa280404bc44f6103c326d
[ "MIT" ]
null
null
null
eval_adynorm.py
bestasoff/adynorm
e43488db2b49b4025faa280404bc44f6103c326d
[ "MIT" ]
1
2021-11-10T16:09:36.000Z
2021-11-10T16:09:36.000Z
import logging logger = logging.getLogger(__name__) if __name__ == "__main__": main()
24.893333
105
0.680771
import argparse import logging from transformers import ( set_seed, ) from adynorm.eval_utils import ( evaluate ) from adynorm.adynorm import Adynorm, AdynormNet from adynorm.datasets import ConceptDataset, DictDataset logger = logging.getLogger(__name__) def parse_args(): parser = argparse.ArgumentPa...
0
0
0
0
0
1,511
0
102
158
8347d76b22e0fced38a256902b83cd52fdf4bc5f
786
py
Python
tests/product/cluster_types.py
leniartek/trino-admin
05104a0b35bbc4aeca9469b2fc63a21c814a7855
[ "Apache-2.0" ]
34
2016-01-08T21:02:13.000Z
2017-03-10T02:01:03.000Z
tests/product/cluster_types.py
starburstdata/presto-admin
1bb652debefe1e26e9105f8ffb08a8793790967a
[ "Apache-2.0" ]
19
2019-05-16T13:09:25.000Z
2020-12-04T18:01:39.000Z
tests/product/cluster_types.py
starburstdata/presto-admin
1bb652debefe1e26e9105f8ffb08a8793790967a
[ "Apache-2.0" ]
15
2019-03-07T16:37:06.000Z
2020-11-12T12:07:46.000Z
from tests.product.mode_installers import StandaloneModeInstaller from tests.product.prestoadmin_installer import PrestoadminInstaller from tests.product.topology_installer import TopologyInstaller from tests.product.standalone.presto_installer import StandalonePrestoInstaller STANDALONE_BARE_CLUSTER = 'bare' BARE_CL...
37.428571
79
0.71883
from tests.product.mode_installers import StandaloneModeInstaller from tests.product.prestoadmin_installer import PrestoadminInstaller from tests.product.topology_installer import TopologyInstaller from tests.product.standalone.presto_installer import StandalonePrestoInstaller STANDALONE_BARE_CLUSTER = 'bare' BARE_CL...
0
0
0
0
0
0
0
0
0
403675c7346f6a144ac3a6672c5e4b6d9556a72c
61,411
py
Python
scratchfiles/MQDscript.py
eugenewickett/logistigateanalysis
5174f40db5f79bfd12491850cef53edde825b71b
[ "MIT" ]
null
null
null
scratchfiles/MQDscript.py
eugenewickett/logistigateanalysis
5174f40db5f79bfd12491850cef53edde825b71b
[ "MIT" ]
null
null
null
scratchfiles/MQDscript.py
eugenewickett/logistigateanalysis
5174f40db5f79bfd12491850cef53edde825b71b
[ "MIT" ]
null
null
null
# Workaround for the 'methods' file not being able to locate the 'mcmcsamplers' folder for importing import sys import os SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__)))) sys.path.append(os.path.normpath(os.path.join(SCRIPT_DIR, '../logistigate', 'logistigate'))) s...
62.53666
140
0.650975
# Workaround for the 'methods' file not being able to locate the 'mcmcsamplers' folder for importing import sys import os SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__)))) sys.path.append(os.path.normpath(os.path.join(SCRIPT_DIR, '../logistigate', 'logistigate'))) s...
0
0
0
0
0
0
0
0
0
d14a481f2aa7e34b8789d4a5d6edd496c4c171c8
11,376
py
Python
src/old-verbio/features.py
jasondraether/verbio
0db543ebdee05e5cc24556d2239b7eaf215361a2
[ "MIT" ]
null
null
null
src/old-verbio/features.py
jasondraether/verbio
0db543ebdee05e5cc24556d2239b7eaf215361a2
[ "MIT" ]
null
null
null
src/old-verbio/features.py
jasondraether/verbio
0db543ebdee05e5cc24556d2239b7eaf215361a2
[ "MIT" ]
null
null
null
"""Feature extraction code for the VerBIO project """ import pandas as pd import numpy as np import opensmile import preprocessing import neurokit2 as nk import scipy import math def get_df_gradient(df, feature_keys): """Given a list of keys for a dataframe, takes the gradient of those features and adds it to a new ...
34.788991
199
0.727233
"""Feature extraction code for the VerBIO project """ import pandas as pd import numpy as np from scipy import stats import opensmile from scipy.io import wavfile import preprocessing import neurokit2 as nk import scipy import math def get_df_gradient(df, feature_keys): """Given a list of keys for a dataframe, takes...
0
0
0
0
0
0
0
9
44
185cabd14b5307ae851f8675295403e744d37ad0
12,203
py
Python
backend/tests/internal/data/cbcl_6_18_scores.py
mkokotovich/cbcl_scoring
86d8f636a980bce45fcf5fc7eccac5dffddfd3b8
[ "MIT" ]
null
null
null
backend/tests/internal/data/cbcl_6_18_scores.py
mkokotovich/cbcl_scoring
86d8f636a980bce45fcf5fc7eccac5dffddfd3b8
[ "MIT" ]
17
2019-12-26T16:45:10.000Z
2022-03-21T22:16:37.000Z
backend/tests/internal/data/cbcl_6_18_scores.py
mkokotovich/testscoring
bc176caf37a2980d85a722efa919f416c9758a0e
[ "MIT" ]
null
null
null
scores = {"scores": [{"group": "I", "score": 7.0}, {"group": "II", "score": 5.0}, {"group": "III", "score": 2.0}, {"group": "IV", "score": 8.0}, {"group": "V", "score": 9.0}, {"group": "VI", "score": 16.0}, {"group": "VII", "score": 5.0}, {"group": "VIII", "score": 11.0}, {"group": "other", "score": 10.0}, {"group": "a...
12,203
12,203
0.484061
scores = {"scores": [{"group": "I", "score": 7.0}, {"group": "II", "score": 5.0}, {"group": "III", "score": 2.0}, {"group": "IV", "score": 8.0}, {"group": "V", "score": 9.0}, {"group": "VI", "score": 16.0}, {"group": "VII", "score": 5.0}, {"group": "VIII", "score": 11.0}, {"group": "other", "score": 10.0}, {"group": "a...
0
0
0
0
0
0
0
0
0
c79dc8d37779a70e8545847151e617acfa37acba
9,267
py
Python
app/scripts/dxhomefinder/stk/coroutines.py
softbankrobotics-labs/pepper-proactive-mobility
a9f6132ee5afd9bb6583741d9d4c481bd9597c65
[ "BSD-3-Clause" ]
5
2020-01-16T22:50:31.000Z
2021-07-19T19:16:48.000Z
app/scripts/dxhomefinder/stk/coroutines.py
softbankrobotics-labs/pepper-proactive-mobility
a9f6132ee5afd9bb6583741d9d4c481bd9597c65
[ "BSD-3-Clause" ]
1
2021-06-18T17:45:55.000Z
2021-06-18T17:45:55.000Z
app/scripts/dxhomefinder/stk/coroutines.py
softbankrobotics-labs/pepper-proactive-mobility
a9f6132ee5afd9bb6583741d9d4c481bd9597c65
[ "BSD-3-Clause" ]
null
null
null
""" Helper for easily doing async tasks with coroutines. It's mostly syntactic sugar that removes the need for .then and .andThen. Simply: - make a generator function that yields futures (e.g. from qi.async) - add the decorator async_generator For example: @stk.coroutines.async_generator def run_test(self): y...
33.334532
89
0.629546
""" Helper for easily doing async tasks with coroutines. It's mostly syntactic sugar that removes the need for .then and .andThen. Simply: - make a generator function that yields futures (e.g. from qi.async) - add the decorator async_generator For example: @stk.coroutines.async_generator def run_test(self): y...
0
409
0
6,922
0
0
0
-32
280
f684d2fa6876886e9049ae01821730a76d6c747f
11,049
py
Python
server/controllers/rootcontroller.py
Shaalan31/LIWI
b4d615e0951b7c28c9258d0d7a8ff86c73c4ebe2
[ "MIT" ]
2
2019-10-16T07:37:46.000Z
2020-10-04T10:31:02.000Z
server/controllers/rootcontroller.py
Shaalan31/LIWI
b4d615e0951b7c28c9258d0d7a8ff86c73c4ebe2
[ "MIT" ]
3
2021-03-19T00:22:56.000Z
2022-01-13T01:12:35.000Z
server/controllers/rootcontroller.py
Shaalan31/LIWI
b4d615e0951b7c28c9258d0d7a8ff86c73c4ebe2
[ "MIT" ]
2
2019-06-04T10:58:39.000Z
2019-06-06T18:52:01.000Z
from flask import Flask from flask_socketio import SocketIO app = Flask(__name__) socket = SocketIO(app, async_mode='threading') writer_service = WriterService(socket) UPLOAD_FOLDER = os.path.join(os.path.dirname(__file__), '../../uploads/') dataset_path = os.path.join(os.path.dirname(__file__), '../../../All Test Ca...
35.07619
148
0.630736
import uuid from flask import Flask, request, jsonify, send_from_directory from flask_socketio import SocketIO from server.httpexceptions.exceptions import ExceptionHandler from server.services.writerservice import * from server.utils.writerencoder import * import time app = Flask(__name__) socket = SocketIO(app, asy...
0
10,047
0
0
0
0
0
100
364
8371355d0547c59f1233c5ac2c2cbfc5c23fb02f
5,484
py
Python
python/bridge/chips/gap_rev1.py
VivoSoC/pulp-debug-bridge
de23caa48c4c69d1f639a33d913089f926b71e70
[ "Apache-2.0" ]
null
null
null
python/bridge/chips/gap_rev1.py
VivoSoC/pulp-debug-bridge
de23caa48c4c69d1f639a33d913089f926b71e70
[ "Apache-2.0" ]
null
null
null
python/bridge/chips/gap_rev1.py
VivoSoC/pulp-debug-bridge
de23caa48c4c69d1f639a33d913089f926b71e70
[ "Apache-2.0" ]
null
null
null
# # Copyright (C) 2018 ETH Zurich and University of Bologna # # 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 applicabl...
33.851852
122
0.632932
# # Copyright (C) 2018 ETH Zurich and University of Bologna # # 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 applicabl...
0
0
0
4,556
0
0
0
10
68
85da6d6a1091ae5222952adc2d51828314426605
887
py
Python
test/test_executables.py
by-student-2017/skpar-0.2.4_Ubuntu18.04LTS
aa35a9dc1746d12ce91ec0c1ba88f2464ef35543
[ "MIT" ]
9
2017-09-15T14:35:28.000Z
2021-10-04T13:21:51.000Z
test/test_executables.py
by-student-2017/skpar-0.2.4_Ubuntu18.04LTS
aa35a9dc1746d12ce91ec0c1ba88f2464ef35543
[ "MIT" ]
null
null
null
test/test_executables.py
by-student-2017/skpar-0.2.4_Ubuntu18.04LTS
aa35a9dc1746d12ce91ec0c1ba88f2464ef35543
[ "MIT" ]
3
2018-11-06T10:15:14.000Z
2021-04-08T08:02:22.000Z
import unittest import logging logging.basicConfig(level=logging.DEBUG) logging.basicConfig(format='%(message)s') logger = logging.getLogger(__name__) if __name__ == '__main__': unittest.main()
28.612903
80
0.609921
import unittest import yaml import logging logging.basicConfig(level=logging.DEBUG) logging.basicConfig(format='%(message)s') logger = logging.getLogger(__name__) class ExecutablesTest(unittest.TestCase): """Check if we can get the map of executables""" def test_getexemap(self): """Can we construct ...
0
0
0
651
0
0
0
-10
45
78cf8f3577f10272dda42004ec090137bb082d35
733
py
Python
coding patterns/cyclic sort/duplicate_numbers.py
mkoryor/Python
837ec4c03130dc4cb919fb5f1eeb4d31206790e4
[ "Unlicense" ]
null
null
null
coding patterns/cyclic sort/duplicate_numbers.py
mkoryor/Python
837ec4c03130dc4cb919fb5f1eeb4d31206790e4
[ "Unlicense" ]
null
null
null
coding patterns/cyclic sort/duplicate_numbers.py
mkoryor/Python
837ec4c03130dc4cb919fb5f1eeb4d31206790e4
[ "Unlicense" ]
null
null
null
""" [E] We are given an unsorted array containing 'n' numbers taken from the range 1 to 'n'. The array has some numbers appearing twice, find all these duplicate numbers without using any extra space. Example 1: Input: [3, 4, 4, 5, 5] Output: [4, 5] """ # Time: O(n) Space: O(1) main()
19.810811
107
0.608458
""" [E] We are given an unsorted array containing 'n' numbers taken from the range 1 to 'n'. The array has some numbers appearing twice, find all these duplicate numbers without using any extra space. Example 1: Input: [3, 4, 4, 5, 5] Output: [4, 5] """ # Time: O(n) Space: O(1) def find_all_duplicates(nums): i...
0
0
0
0
0
393
0
0
45
75748216c6dbe303e57780eeeb96ed586dc84164
212
py
Python
myapp/urls.py
quinchoponcho/helloworld
89d019fe45520a49dc8b4b625e802a2030608554
[ "MIT" ]
null
null
null
myapp/urls.py
quinchoponcho/helloworld
89d019fe45520a49dc8b4b625e802a2030608554
[ "MIT" ]
5
2021-03-19T02:34:36.000Z
2021-09-22T18:56:49.000Z
myapp/urls.py
quinchoponcho/helloworld
89d019fe45520a49dc8b4b625e802a2030608554
[ "MIT" ]
null
null
null
from django.conf.urls import url from myapp import views urlpatterns = [ url(r'^$', views.dashBoard, name='dashboard'), #url(r'^myapp/', include('myapp.urls')), ]
17.666667
50
0.683962
from django.conf.urls import url from django.conf.urls import include from myapp import views urlpatterns = [ url(r'^$', views.dashBoard, name='dashboard'), #url(r'^myapp/', include('myapp.urls')), ]
0
0
0
0
0
0
0
15
22
0f453badacab02520c8d1fd266842e0f60f5ff75
2,214
py
Python
third_party/tflite-micro/tensorflow/lite/micro/examples/neural_net1/neural_net1.py
bala122/CFU-Playground
55e9aa33f13e6413c671f97b9f414bbbe5418550
[ "Apache-2.0" ]
null
null
null
third_party/tflite-micro/tensorflow/lite/micro/examples/neural_net1/neural_net1.py
bala122/CFU-Playground
55e9aa33f13e6413c671f97b9f414bbbe5418550
[ "Apache-2.0" ]
null
null
null
third_party/tflite-micro/tensorflow/lite/micro/examples/neural_net1/neural_net1.py
bala122/CFU-Playground
55e9aa33f13e6413c671f97b9f414bbbe5418550
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf import numpy as np import tensorflow_datasets as tfds (ds_train, ds_test), ds_info = tfds.load( 'mnist', split=['train', 'test'], shuffle_files=True, as_supervised=True, with_info=True, ) def normalize_img(image, label): """Normalize image""" return tf.cast(image, tf.floa...
28.384615
77
0.749322
import tensorflow as tf import numpy as np import tensorflow_datasets as tfds (ds_train, ds_test), ds_info = tfds.load( 'mnist', split=['train', 'test'], shuffle_files=True, as_supervised=True, with_info=True, ) def normalize_img(image, label): """Normalize image""" return tf.cast(image, tf.floa...
0
0
0
0
0
0
0
0
0
d9f2f20d45c541482fec86d710bf5f795fb2f806
2,192
py
Python
mezzanine_slides/models.py
nielsonsantana/gnmk-mezzanine-slides
f03392838042fb830b3c2e1c760386f59b59955b
[ "BSD-2-Clause" ]
null
null
null
mezzanine_slides/models.py
nielsonsantana/gnmk-mezzanine-slides
f03392838042fb830b3c2e1c760386f59b59955b
[ "BSD-2-Clause" ]
null
null
null
mezzanine_slides/models.py
nielsonsantana/gnmk-mezzanine-slides
f03392838042fb830b3c2e1c760386f59b59955b
[ "BSD-2-Clause" ]
null
null
null
#! -*- encoding: utf-8 -*- try: from urllib import unquote except ImportError: # assume python3
34.793651
88
0.646442
#! -*- encoding: utf-8 -*- try: from urllib import unquote except ImportError: # assume python3 from urllib.parse import unquote from string import punctuation from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.sites.models import Site from mezzanine.pag...
2
0
0
1,713
0
0
0
146
229
e0256be489697647435f5e0ed8f5df55792a1d86
1,419
py
Python
Lintcode/G_Practice/Tag_DFS/1288. Reconstruct Itinerary.py
ctc316/algorithm-python
ac4580d55e05e93e407c6156c9bb801808027d60
[ "MIT" ]
null
null
null
Lintcode/G_Practice/Tag_DFS/1288. Reconstruct Itinerary.py
ctc316/algorithm-python
ac4580d55e05e93e407c6156c9bb801808027d60
[ "MIT" ]
null
null
null
Lintcode/G_Practice/Tag_DFS/1288. Reconstruct Itinerary.py
ctc316/algorithm-python
ac4580d55e05e93e407c6156c9bb801808027d60
[ "MIT" ]
null
null
null
## memory limitation
22.887097
60
0.513037
class Solution: """ @param tickets: @return: nothing """ def findItinerary(self, tickets): targets = {} for a, b in reversed(sorted(tickets)): if a in targets: targets[a].append(b) else: targets[a] = [b] route ...
0
0
0
1,326
0
0
0
0
68
9d37a19bc1155bc32ed927f295a3cb94211d93de
169
py
Python
exercises/exc_01_04.py
throughput-ec/ec_workshops_py
08d68c27fd916c34eb3636f6d382d6f9bf8ea969
[ "MIT" ]
1
2022-02-18T23:37:47.000Z
2022-02-18T23:37:47.000Z
exercises/exc_01_04.py
LinkedEarth/ec_workshops_py
44b4f8ea890da31311a51541a7f7e01c30a5acd1
[ "MIT" ]
null
null
null
exercises/exc_01_04.py
LinkedEarth/ec_workshops_py
44b4f8ea890da31311a51541a7f7e01c30a5acd1
[ "MIT" ]
2
2022-02-18T23:34:12.000Z
2022-03-14T23:33:20.000Z
# Create the dictionary mydict = {'archiveType':'coral', 'Publication':{'author':'J. Doe','title':'The most important record'}} #print the keys mydict.keys()
18.777778
78
0.656805
# Create the dictionary mydict = {'archiveType':'coral', 'Publication':{'author':'J. Doe','title':'The most important record'}} #print the keys mydict.keys()
0
0
0
0
0
0
0
0
0
bca545b47efd7a4c7d67cacbb56d24360f10b452
1,080
py
Python
pyatv/support/packet.py
Jacobs4/pyatv
52956adf3b79198be52cc03649f3ddeee19f9e6c
[ "MIT" ]
532
2017-02-01T19:23:28.000Z
2022-03-29T09:57:39.000Z
pyatv/support/packet.py
Jacobs4/pyatv
52956adf3b79198be52cc03649f3ddeee19f9e6c
[ "MIT" ]
1,639
2017-02-01T19:22:04.000Z
2022-03-31T17:26:40.000Z
pyatv/support/packet.py
bdraco/pyatv
9541d21e6101c60866d832626be97bf962774cd5
[ "MIT" ]
102
2017-02-02T01:42:13.000Z
2022-02-26T08:49:34.000Z
"""Generic utility for encoding and decoding binary packets.""" from collections import namedtuple def defpacket(name: str, **kwargs): """Define a protocol packet.""" fmt: str = ">" + "".join(kwargs.values()) msg_type = namedtuple(name, kwargs.keys()) # type: ignore return _MessageType
30.857143
88
0.581481
"""Generic utility for encoding and decoding binary packets.""" from collections import namedtuple import struct def defpacket(name: str, **kwargs): """Define a protocol packet.""" fmt: str = ">" + "".join(kwargs.values()) msg_type = namedtuple(name, kwargs.keys()) # type: ignore class _MessageType:...
0
603
0
129
0
0
0
-8
49
dca6de27b3aa5a02b1fa5119d1cc0e8a557bea9a
5,724
py
Python
test/unit/test_terracoiny_things.py
walkjivefly/sentinel
b0b82b2974fd1d950285e1845a6fe311cf0fb9ea
[ "MIT" ]
1
2018-01-18T18:52:41.000Z
2018-01-18T18:52:41.000Z
test/unit/test_terracoiny_things.py
walkjivefly/sentinel
b0b82b2974fd1d950285e1845a6fe311cf0fb9ea
[ "MIT" ]
1
2017-12-09T15:11:47.000Z
2017-12-29T16:47:10.000Z
test/unit/test_terracoiny_things.py
walkjivefly/sentinel
b0b82b2974fd1d950285e1845a6fe311cf0fb9ea
[ "MIT" ]
8
2017-12-01T18:01:43.000Z
2018-12-31T13:39:34.000Z
import sys import os os.environ['SENTINEL_CONFIG'] = os.path.normpath(os.path.join(os.path.dirname(__file__), '../test_sentinel.conf')) sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '../../lib'))) # ========================================================================
40.595745
390
0.780573
import pytest import sys import os os.environ['SENTINEL_CONFIG'] = os.path.normpath(os.path.join(os.path.dirname(__file__), '../test_sentinel.conf')) sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '../../lib'))) @pytest.fixture def valid_terracoin_address(network='mainnet'): return 'mtHj...
0
1,888
0
0
0
3,209
0
-8
321
7cff0fa89fc182d0643e9031f6c34e57731cef17
12,742
py
Python
python/GafferSceneUI/ShaderTweaksUI.py
Tuftux/gaffer
5acaf7cbfadbae841dc06854121ca85dcc5c338c
[ "BSD-3-Clause" ]
1
2019-12-02T02:31:25.000Z
2019-12-02T02:31:25.000Z
python/GafferSceneUI/ShaderTweaksUI.py
Tuftux/gaffer
5acaf7cbfadbae841dc06854121ca85dcc5c338c
[ "BSD-3-Clause" ]
null
null
null
python/GafferSceneUI/ShaderTweaksUI.py
Tuftux/gaffer
5acaf7cbfadbae841dc06854121ca85dcc5c338c
[ "BSD-3-Clause" ]
null
null
null
########################################################################## # # Copyright (c) 2016, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
28.828054
115
0.667713
########################################################################## # # Copyright (c) 2016, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
0
0
0
3,741
0
4,078
0
-26
388
b1418d284e80e7cd51b88da272019b6cdd11dd83
711
py
Python
models/scene_export.py
freds72/hl3
44bbbf7715cf9e0b01a3de34436a69ee79d699db
[ "Apache-2.0" ]
3
2019-12-09T20:26:37.000Z
2021-07-07T15:08:52.000Z
models/scene_export.py
freds72/hl3
44bbbf7715cf9e0b01a3de34436a69ee79d699db
[ "Apache-2.0" ]
null
null
null
models/scene_export.py
freds72/hl3
44bbbf7715cf9e0b01a3de34436a69ee79d699db
[ "Apache-2.0" ]
2
2019-09-03T03:29:38.000Z
2020-09-14T03:40:29.000Z
import bpy import math scene = bpy.context.scene scene_data=[] all_objects = [ob for ob in scene.objects if ob.layers[0] and ob.type=='MESH'] for ob in all_objects: obdata = ob.data ob_name_tokens= ob.name.split('.') ob_data={ "model": ob.name if len(ob_name_tokens)==1 else ob_name_tokens[0], ...
30.913043
173
0.701828
import bpy import bmesh import argparse import sys import math from mathutils import Vector, Matrix scene = bpy.context.scene scene_data=[] all_objects = [ob for ob in scene.objects if ob.layers[0] and ob.type=='MESH'] for ob in all_objects: obdata = ob.data ob_name_tokens= ob.name.split('.') ob_data={ ...
0
0
0
0
0
0
0
-11
88
68c6d1b211ab543bdedf130ef99c5784855d0423
8,876
py
Python
text_processing.py
kudari00/LING131FinalProject
1b6d68a174097cd9491d4cdb492090f8431d2318
[ "MIT" ]
null
null
null
text_processing.py
kudari00/LING131FinalProject
1b6d68a174097cd9491d4cdb492090f8431d2318
[ "MIT" ]
null
null
null
text_processing.py
kudari00/LING131FinalProject
1b6d68a174097cd9491d4cdb492090f8431d2318
[ "MIT" ]
null
null
null
import numpy as np import random import nltk from Stemmer import Stemmer def dataPrepro(raw_text, y_enc): ''' preprocess data, and tokenize arg: raw_test: pandes array, each line contains a text y_enc: pandas array, each line is the label(1 for spam, 0 for ham) returns: data_tok...
34.138462
114
0.522082
import pandas as pd import numpy as np import random from sklearn.preprocessing import LabelEncoder import nltk from Stemmer import Stemmer def dataPrepro(raw_text, y_enc): ''' preprocess data, and tokenize arg: raw_test: pandes array, each line contains a text y_enc: pandas array, each lin...
2
0
0
0
0
1,488
0
23
175
47816cbbcf9b6c74f2358702c988d40cc9df0f3e
85
py
Python
mne_bids/report/__init__.py
Swastyy/mne-bids
87c7165b978cd064c5001d2737a74c2fe2ce1c01
[ "BSD-3-Clause" ]
null
null
null
mne_bids/report/__init__.py
Swastyy/mne-bids
87c7165b978cd064c5001d2737a74c2fe2ce1c01
[ "BSD-3-Clause" ]
null
null
null
mne_bids/report/__init__.py
Swastyy/mne-bids
87c7165b978cd064c5001d2737a74c2fe2ce1c01
[ "BSD-3-Clause" ]
1
2022-02-21T09:57:36.000Z
2022-02-21T09:57:36.000Z
"""Create a summary report of the BIDS dataset."""
21.25
50
0.752941
"""Create a summary report of the BIDS dataset.""" from ._report import make_report
0
0
0
0
0
0
0
11
23
7ab12ad246295aa2b2b634d866cb79033f5e89a4
9,017
py
Python
tests/compute_area_test.py
koritsky/pointconv
df0fd6ebf36011a6ef544fbc746327d49e09fda9
[ "MIT" ]
1
2022-01-14T03:49:42.000Z
2022-01-14T03:49:42.000Z
tests/compute_area_test.py
koritsky/pointconv
df0fd6ebf36011a6ef544fbc746327d49e09fda9
[ "MIT" ]
null
null
null
tests/compute_area_test.py
koritsky/pointconv
df0fd6ebf36011a6ef544fbc746327d49e09fda9
[ "MIT" ]
null
null
null
import unittest import math import numpy as np from functools import reduce def euler2mat(z=0, y=0, x=0): ''' Return matrix for rotations around z, y and x axes Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed ...
35.360784
99
0.584341
import unittest import math import numpy as np from functools import reduce from unittest.case import expectedFailure import nibabel def euler2mat(z=0, y=0, x=0): ''' Return matrix for rotations around z, y and x axes Uses the z, then y, then x convention above Parameters ---------- z : scalar ...
0
0
0
1,153
0
0
0
13
67
b2818f39265c4ccddafbd2a91b3f41ba311adca9
184
py
Python
autos/forms.py
CodeByLine/dj4e-tutorial
8cb592658a18777220eb297e63d42f2a7d53733c
[ "CC-BY-3.0" ]
null
null
null
autos/forms.py
CodeByLine/dj4e-tutorial
8cb592658a18777220eb297e63d42f2a7d53733c
[ "CC-BY-3.0" ]
3
2021-04-12T16:18:58.000Z
2021-06-10T20:40:08.000Z
autos/forms.py
CodeByLine/dj4e-tutorial
8cb592658a18777220eb297e63d42f2a7d53733c
[ "CC-BY-3.0" ]
null
null
null
# Create the form class.
16.727273
34
0.684783
from django.forms import ModelForm from autos.models import Make # Create the form class. class MakeForm(ModelForm): class Meta: model = Make fields = '__all__'
0
0
0
69
0
0
0
21
67
1999a513013877f63328295084923063e7609448
1,133
py
Python
tests/ut_RSSModel.py
crawfordsm/pyspectrograph
4237ba4b4fe08a69e1d6487924d959f089ecca46
[ "BSD-3-Clause" ]
18
2015-01-11T21:04:59.000Z
2021-08-06T18:30:47.000Z
tests/ut_RSSModel.py
crawfordsm/pyspectrograph
4237ba4b4fe08a69e1d6487924d959f089ecca46
[ "BSD-3-Clause" ]
14
2015-04-23T09:39:16.000Z
2017-12-03T12:49:05.000Z
tests/ut_RSSModel.py
crawfordsm/pyspectrograph
4237ba4b4fe08a69e1d6487924d959f089ecca46
[ "BSD-3-Clause" ]
5
2015-04-23T08:17:37.000Z
2019-06-22T13:36:47.000Z
import pylab as pl from PySpectrograph.Models import RSSModel from PySpectrograph.Spectra import Spectrum # create the spectrograph model rss = RSSModel.RSSModel(grating_name="PG0900", gratang=15.875, camang=31.76496, slit=1.50, xbin=2, ybin=2) # print out some basic statistics print(1e7 * r...
32.371429
106
0.718447
import pylab as pl from PySpectrograph.Models import RSSModel from PySpectrograph.Spectra import Spectrum # create the spectrograph model rss = RSSModel.RSSModel(grating_name="PG0900", gratang=15.875, camang=31.76496, slit=1.50, xbin=2, ybin=2) # print out some basic statistics print(1e7 * r...
0
0
0
0
0
0
0
0
0
b1cf6e62e796025a0db200addf50674a66b94745
71
py
Python
dolosse/hardware/xia/pixie16/__init__.py
Tobias2023/dolosse
7e56a84d7da2a3f0d6d409f1cb7ea5accb12cac5
[ "Apache-2.0" ]
9
2019-05-17T11:27:02.000Z
2020-12-18T15:37:48.000Z
dolosse/hardware/xia/pixie16/__init__.py
Tobias2023/dolosse
7e56a84d7da2a3f0d6d409f1cb7ea5accb12cac5
[ "Apache-2.0" ]
84
2019-04-08T10:10:37.000Z
2020-11-16T00:46:54.000Z
dolosse/hardware/xia/pixie16/__init__.py
Tobias2023/dolosse
7e56a84d7da2a3f0d6d409f1cb7ea5accb12cac5
[ "Apache-2.0" ]
5
2019-11-09T18:23:48.000Z
2020-05-08T12:24:55.000Z
""" Classes related to working with XIA's Pixie16 electronics line """
17.75
62
0.746479
""" Classes related to working with XIA's Pixie16 electronics line """
0
0
0
0
0
0
0
0
0
535661c27727160f3618660e5d2f29b253b44d2a
1,865
py
Python
ExampleGame/examplegame/japanese.py
glyph/imaginary
62299c8a0481bbee51444e688f45385a81cad328
[ "MIT" ]
25
2015-01-10T02:26:43.000Z
2021-08-20T09:40:46.000Z
ExampleGame/examplegame/japanese.py
DalavanCloud/imaginary
e84abc98d400cff5e262df2b34e725dde575af8e
[ "MIT" ]
65
2015-01-07T08:02:53.000Z
2022-02-06T02:15:09.000Z
ExampleGame/examplegame/japanese.py
DalavanCloud/imaginary
e84abc98d400cff5e262df2b34e725dde575af8e
[ "MIT" ]
7
2015-03-03T18:44:29.000Z
2021-07-28T02:54:10.000Z
""" Japanese language data. This module contains a dict named 'hiragana' which maps hiragana unicode characters to romaji pronunciations, as well as a 'romajiToHiragana' dict which maps romaji pronunciation to *lists* of hiragana characters. There are multiple hiragana characters with the same pronunciation, thus the ...
42.386364
72
0.534048
""" Japanese language data. This module contains a dict named 'hiragana' which maps hiragana unicode characters to romaji pronunciations, as well as a 'romajiToHiragana' dict which maps romaji pronunciation to *lists* of hiragana characters. There are multiple hiragana characters with the same pronunciation, thus the ...
0
0
0
0
0
0
0
0
0
439c78b9ba443d280780aed9883c9b182bd3596b
1,961
py
Python
betrayal/models.py
danpatrickoneill/bahoth-be
a46ef2c0bac873c32900784336f0664d43a9bf3f
[ "MIT" ]
null
null
null
betrayal/models.py
danpatrickoneill/bahoth-be
a46ef2c0bac873c32900784336f0664d43a9bf3f
[ "MIT" ]
4
2020-07-17T18:11:49.000Z
2021-06-04T22:52:30.000Z
betrayal/models.py
danpatrickoneill/bahoth-be
a46ef2c0bac873c32900784336f0664d43a9bf3f
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User from uuid import uuid4 # Does it make sense to have a Game model that could be saved as an instance with Chars linked to it? Good to research name = models.CharField(max_length=100) card = models.IntegerField(choices=CARD_CHOICES) effect = ...
35.017857
136
0.732789
from django.db import models from django.contrib.auth.models import User from uuid import uuid4 # Does it make sense to have a Game model that could be saved as an instance with Chars linked to it? Good to research class Character(models.Model): name = models.CharField(max_length=100) description = models.TextFiel...
0
0
0
1,137
0
0
0
0
114
be6b2f022901b01f3ab5c3b4fced43db992dd4dc
14,990
py
Python
examples/python/statespace_structural_harvey_jaeger.py
CCHiggins/statsmodels
300b6fba90c65c8e94b4f83e04f7ae1b0ceeac2e
[ "BSD-3-Clause" ]
6,931
2015-01-01T11:41:55.000Z
2022-03-31T17:03:24.000Z
examples/python/statespace_structural_harvey_jaeger.py
CCHiggins/statsmodels
300b6fba90c65c8e94b4f83e04f7ae1b0ceeac2e
[ "BSD-3-Clause" ]
6,137
2015-01-01T00:33:45.000Z
2022-03-31T22:53:17.000Z
examples/python/statespace_structural_harvey_jaeger.py
CCHiggins/statsmodels
300b6fba90c65c8e94b4f83e04f7ae1b0ceeac2e
[ "BSD-3-Clause" ]
2,608
2015-01-02T21:32:31.000Z
2022-03-31T07:38:30.000Z
#!/usr/bin/env python # coding: utf-8 # DO NOT EDIT # Autogenerated from the notebook statespace_structural_harvey_jaeger.ipynb. # Edit the notebook and then sync the output with this file. # # flake8: noqa # DO NOT EDIT # # Detrending, Stylized Facts and the Business Cycle # # In an influential article, Harvey and J...
36.207729
79
0.663175
#!/usr/bin/env python # coding: utf-8 # DO NOT EDIT # Autogenerated from the notebook statespace_structural_harvey_jaeger.ipynb. # Edit the notebook and then sync the output with this file. # # flake8: noqa # DO NOT EDIT # # Detrending, Stylized Facts and the Business Cycle # # In an influential article, Harvey and J...
45
0
0
0
0
0
0
31
45
fb50b92d8ad970ebb1b2a03e60cd8d784d47fc34
13,833
py
Python
engineer/plugins/core.py
tylerbutler/engineer
1fdcae512a828ea681be8c469f6863b974260614
[ "MIT" ]
6
2015-09-21T17:50:43.000Z
2021-04-13T07:27:39.000Z
engineer/plugins/core.py
tylerbutler/engineer
1fdcae512a828ea681be8c469f6863b974260614
[ "MIT" ]
40
2015-08-25T00:33:28.000Z
2020-09-22T17:54:52.000Z
engineer/plugins/core.py
tylerbutler/engineer
1fdcae512a828ea681be8c469f6863b974260614
[ "MIT" ]
5
2016-03-26T15:02:56.000Z
2017-03-16T00:06:10.000Z
# coding=utf-8 __author__ = 'Tyler Butler <tyler@tylerbutler.com>' # Adapted from Marty Alchin: http://martyalchin.com/2008/jan/10/simple-plugin-framework/ #noinspection PyUnresolvedReferences,PyUnusedLocal def load_plugins(): """Load all plugins.""" # Ensure the built-in plugins are loaded by importing t...
44.05414
120
0.683583
# coding=utf-8 import logging __author__ = 'Tyler Butler <tyler@tylerbutler.com>' # Adapted from Marty Alchin: http://martyalchin.com/2008/jan/10/simple-plugin-framework/ def find_plugins(entrypoint): try: import pkg_resources except ImportError: pkg_resources = None if pkg_resources is...
0
9,185
0
3,404
261
85
0
8
311
d843a9bfff16e3879512c66396513cbd209aeaee
1,488
py
Python
main.py
gaato/nkodice-discord
d693b0db37f1ca3480fd4de964434d9800b06a12
[ "Apache-2.0" ]
null
null
null
main.py
gaato/nkodice-discord
d693b0db37f1ca3480fd4de964434d9800b06a12
[ "Apache-2.0" ]
null
null
null
main.py
gaato/nkodice-discord
d693b0db37f1ca3480fd4de964434d9800b06a12
[ "Apache-2.0" ]
null
null
null
import discord from config import DISCORD_TOKEN client = discord.Client() client.run(DISCORD_TOKEN)
24.8
102
0.584005
import random import discord import asyncio from config import DISCORD_TOKEN client = discord.Client() @client.event async def on_ready(): print('It\'s activated') async def nkodice(message: discord.Message): rolls = random.choices(('う', 'ま', 'ち', 'ん', 'こ', 'お'), k=5) roles = [] if rolls.count(...
81
200
1,056
0
0
0
0
-15
113
2340b3e5ef8a55bff3aa10e3481dcf91615e104d
913
py
Python
lesson_fifth/models.py
erdyneevzt/courses_django
8b8baf58f30a4cbf91a46ce3709b87abed70d230
[ "MIT" ]
null
null
null
lesson_fifth/models.py
erdyneevzt/courses_django
8b8baf58f30a4cbf91a46ce3709b87abed70d230
[ "MIT" ]
null
null
null
lesson_fifth/models.py
erdyneevzt/courses_django
8b8baf58f30a4cbf91a46ce3709b87abed70d230
[ "MIT" ]
null
null
null
# Create your models here.
32.607143
128
0.694414
from django.db import models # Create your models here. class Author1(models.Model): CHOISES_FOR_CITY = ( ('Moscow',"Москва"), ('Saint-Petersburgh', "Санкт-Петербург"), ('Novgorod',"Новогород"), ('Tomsk', "Томск"), ) name = models.CharField(max_length=200,verbose_name="Им...
232
0
0
694
0
0
0
7
68
32bb733d5b3608f348a3b6a17e4a5a8ff90017dc
3,432
py
Python
tests/test_cmip5.py
csiro-dcfp/intake-esm
eaaed45636aa8f831bdef9396ba4eb162ea1ca65
[ "Apache-2.0" ]
null
null
null
tests/test_cmip5.py
csiro-dcfp/intake-esm
eaaed45636aa8f831bdef9396ba4eb162ea1ca65
[ "Apache-2.0" ]
null
null
null
tests/test_cmip5.py
csiro-dcfp/intake-esm
eaaed45636aa8f831bdef9396ba4eb162ea1ca65
[ "Apache-2.0" ]
null
null
null
import os here = os.path.abspath(os.path.dirname(__file__))
35.75
92
0.628205
import os import intake import pandas as pd import pytest import xarray as xr from intake_esm import config here = os.path.abspath(os.path.dirname(__file__)) def test_build_collection_file(): with config.set({'database-directory': './tests/test_collections'}): collection_input_definition = os.path.join...
0
980
0
0
0
2,147
0
-12
250
6821010700887ff1ebd588f7645ccb249b198f69
46,905
py
Python
venv/lib/python3.8/site-packages/azureml/data/tabular_dataset.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azureml/data/tabular_dataset.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azureml/data/tabular_dataset.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- """Contains functionality for representing data in a tabular format by parsing the provided file or list of files. For more informat...
54.540698
120
0.666965
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- """Contains functionality for representing data in a tabular format by parsing the provided file or list of files. For more informat...
0
37,831
0
7,180
0
117
0
894
305
3b96b87f169a53e2dc6907332c684b3e1522f75e
3,958
py
Python
importer.py
Popkornium18/telegram-losungen
51e81ac7feca0bcebbc63f6160d3adf96358973d
[ "MIT" ]
2
2021-07-20T20:10:20.000Z
2021-12-17T15:38:50.000Z
importer.py
Popkornium18/telegram-losungen
51e81ac7feca0bcebbc63f6160d3adf96358973d
[ "MIT" ]
10
2021-07-27T17:19:12.000Z
2022-03-31T15:23:05.000Z
importer.py
Popkornium18/telegram-losungen
51e81ac7feca0bcebbc63f6160d3adf96358973d
[ "MIT" ]
null
null
null
"""Functions for importing Losungen from the official download page""" from zipfile import ZipFile import datetime import os import requests import logging from sqlalchemy.orm import Session from losungen import SessionMaker from losungen.repositories import TagesLosungRepository LOSUNGEN_URL = "https://www.losungen.d...
31.664
81
0.650076
"""Functions for importing Losungen from the official download page""" from typing import List from zipfile import ZipFile import datetime import xml.etree.ElementTree as ET import os import re import requests import logging from sqlalchemy.orm import Session from losungen import SessionMaker from losungen.models impor...
0
0
0
0
0
1,049
0
21
111
3c1623a59de3e86e1eeaf18cc199ea8f5630d9e0
12,801
py
Python
src/chemftr/thc/utils/thc_objectives.py
ncrubin/chemftr
5cbbec7138d4c07f4b7facbe5052d0cbe00ecbda
[ "Apache-2.0" ]
null
null
null
src/chemftr/thc/utils/thc_objectives.py
ncrubin/chemftr
5cbbec7138d4c07f4b7facbe5052d0cbe00ecbda
[ "Apache-2.0" ]
null
null
null
src/chemftr/thc/utils/thc_objectives.py
ncrubin/chemftr
5cbbec7138d4c07f4b7facbe5052d0cbe00ecbda
[ "Apache-2.0" ]
null
null
null
import os # set mkl thread count for numpy einsum/tensordot calls # leave one CPU un used so we can still access this computer import scipy.optimize os.environ["MKL_NUM_THREADS"] = "{}".format(os.cpu_count() - 1) # os.environ["MKL_NUM_THREADS"] = "40" # "{}".format(os.cpu_count() - 1) import jax.numpy as jnp from ja...
43.989691
146
0.636435
import os # set mkl thread count for numpy einsum/tensordot calls # leave one CPU un used so we can still access this computer import scipy.optimize os.environ["MKL_NUM_THREADS"] = "{}".format(os.cpu_count() - 1) # os.environ["MKL_NUM_THREADS"] = "40" # "{}".format(os.cpu_count() - 1) import jax.numpy as jnp from ja...
0
0
0
0
0
0
0
18
92
ec3443d021e3dcecbf81a5eaadc6d0a5332c17eb
3,111
py
Python
glaive/glaive.py
peixian/Ultralisk
7de450ac5986212cf13fc5b861a34d35257a48f9
[ "MIT" ]
null
null
null
glaive/glaive.py
peixian/Ultralisk
7de450ac5986212cf13fc5b861a34d35257a48f9
[ "MIT" ]
null
null
null
glaive/glaive.py
peixian/Ultralisk
7de450ac5986212cf13fc5b861a34d35257a48f9
[ "MIT" ]
null
null
null
import sklearn.cross_validation as cv from sklearn import tree import pandas as pd import numpy as np import os.path import pprint import matplotlib.pyplot as plt import seaborn as sns import runExperiments from pybrain.datasets import SupervisedDataSet from pybrain.supervised.trainers import BackpropTrainer from pybr...
33.451613
87
0.728705
import sklearn.cross_validation as cv from sklearn import tree import pandas as pd import numpy as np import os.path import pprint import matplotlib.pyplot as plt import seaborn as sns import runExperiments from pybrain.datasets import SupervisedDataSet from pybrain.supervised.trainers import BackpropTrainer from pybr...
0
0
0
0
0
0
0
0
0
f70c77dce55c5afe74d3faf888bccf4b6e67116c
6,274
py
Python
A2C/utils.py
CommanderCero/RL_Algorithms
fd8172e0075247b682a1dca752306147fa2ed3ba
[ "Apache-2.0" ]
1
2021-10-06T14:45:41.000Z
2021-10-06T14:45:41.000Z
A2C/utils.py
CommanderCero/RL_Algorithms
fd8172e0075247b682a1dca752306147fa2ed3ba
[ "Apache-2.0" ]
null
null
null
A2C/utils.py
CommanderCero/RL_Algorithms
fd8172e0075247b682a1dca752306147fa2ed3ba
[ "Apache-2.0" ]
null
null
null
import scipy.signal as signal import torch.nn as nn def discounted_cumsum(rewards, reward_decay): """Taken from https://stackoverflow.com/questions/47970683/vectorize-a-numpy-discount-calculation""" return signal.lfilter([1], [1, -reward_decay], x=rewards[::-1])[::-1]
36.265896
104
0.603762
import scipy.signal as signal import torch import torch.nn as nn import numpy as np import models import gym import wandb def create_feedforward(sizes, activation=nn.ReLU): layers = [] for i in range(len(sizes) - 1): layers.append(nn.Linear(sizes[i], sizes[i+1])) if i < len(sizes) - 2: ...
0
0
0
4,384
0
1,371
0
-40
264
69621724e7bf731c95055584838600b07febc5a3
524
py
Python
busqueda_binaria.py
SebaB29/Python
8fe7b375e200d2a629e3ef83a2356002621267a6
[ "MIT" ]
null
null
null
busqueda_binaria.py
SebaB29/Python
8fe7b375e200d2a629e3ef83a2356002621267a6
[ "MIT" ]
null
null
null
busqueda_binaria.py
SebaB29/Python
8fe7b375e200d2a629e3ef83a2356002621267a6
[ "MIT" ]
null
null
null
lista = [1,2,3,4,5,6,7,89,9,8,5,5,2,1] print(busqueda_binaria(lista, 9))
32.75
67
0.664122
def _busqueda_binaria(lista, elemento, desde, hasta): if desde > hasta: return -1 medio = (hasta + desde) // 2 if lista[medio] == elemento: return medio if elemento < lista[medio]: return _busqueda_binaria(lista, elemento, desde, medio - 1) return _busqueda_binaria(lista, ele...
0
0
0
0
0
405
0
0
45
73c88ffa050bfb56ce4452497b71a7e5d65513ba
3,126
py
Python
24. Exam Prep/exam_10apr/tests/test_survivor.py
elenaborisova/Python-OOP
584882c08f84045b12322917f0716c7c7bd9befc
[ "MIT" ]
1
2021-03-27T16:56:30.000Z
2021-03-27T16:56:30.000Z
24. Exam Prep/exam_10apr/tests/test_survivor.py
elenaborisova/Python-OOP
584882c08f84045b12322917f0716c7c7bd9befc
[ "MIT" ]
null
null
null
24. Exam Prep/exam_10apr/tests/test_survivor.py
elenaborisova/Python-OOP
584882c08f84045b12322917f0716c7c7bd9befc
[ "MIT" ]
1
2021-03-15T14:50:39.000Z
2021-03-15T14:50:39.000Z
import unittest if __name__ == '__main__': unittest.main()
32.905263
87
0.710493
import unittest from exam_10apr.project.survivor import Survivor class SurvivorTests(unittest.TestCase): def test_survivorInit_whenNameIsValid_shouldAssignIt(self): survivor = Survivor('test', 23) self.assertEqual('test', survivor.name) def test_survivorInit_whenNameIsInvalid_shouldRaise(self...
0
0
0
2,988
0
0
0
27
45
86be5e7da58e9d936e27b9f8b0e218fff4eb3310
3,433
py
Python
tests/integration_tests/security/api_tests.py
delorenzosoftware/superset
5403f1ec163a52623f34f459d89f20e4e190371d
[ "Apache-2.0" ]
1
2022-02-18T10:21:55.000Z
2022-02-18T10:21:55.000Z
tests/integration_tests/security/api_tests.py
changeiot/superset
299b5dc64448d04abe6b35ee85fbd2b938c781bc
[ "Apache-2.0" ]
11
2021-12-06T10:46:10.000Z
2022-02-23T11:18:03.000Z
tests/integration_tests/security/api_tests.py
changeiot/superset
299b5dc64448d04abe6b35ee85fbd2b938c781bc
[ "Apache-2.0" ]
1
2022-03-09T02:57:17.000Z
2022-03-09T02:57:17.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 u...
34.676768
85
0.669968
# 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...
0
0
0
2,370
0
0
0
63
158
7d5c15e9d80b93ed503999c654aa06483ce59032
3,137
py
Python
src/day-8/main.py
tpssim/advent-of-code-2021
14f534d63b56d23a1641bdc252bc6be29e32e3e3
[ "MIT" ]
null
null
null
src/day-8/main.py
tpssim/advent-of-code-2021
14f534d63b56d23a1641bdc252bc6be29e32e3e3
[ "MIT" ]
null
null
null
src/day-8/main.py
tpssim/advent-of-code-2021
14f534d63b56d23a1641bdc252bc6be29e32e3e3
[ "MIT" ]
null
null
null
# Parse the input from the input file input_file = 'example_input.txt' inputs = [] outputs = [] with open(input_file) as input: for line in input.readlines(): split_line = line.split(' | ') # Sort every string alphabetically to make further analysis easier inputs.append([''.join(sorted(digit)) for digi...
35.247191
94
0.602486
# Parse the input from the input file input_file = 'example_input.txt' inputs = [] outputs = [] with open(input_file) as input: for line in input.readlines(): split_line = line.split(' | ') # Sort every string alphabetically to make further analysis easier inputs.append([''.join(sorted(digit)) for digi...
0
0
0
0
0
0
0
0
0
b0b95eedc79611355c612ba38534a5218d9a9835
4,351
py
Python
tests/test_nullmodels.py
sztal/pathcensus
0246b1450e5d7fa0421e283f980c367100fcdd6a
[ "MIT" ]
null
null
null
tests/test_nullmodels.py
sztal/pathcensus
0246b1450e5d7fa0421e283f980c367100fcdd6a
[ "MIT" ]
null
null
null
tests/test_nullmodels.py
sztal/pathcensus
0246b1450e5d7fa0421e283f980c367100fcdd6a
[ "MIT" ]
null
null
null
"""Unit tests for :mod:`pathcensus.nullmodels`.""" # pylint: disable=redefined-outer-name from itertools import product FAMILY = ("erdos_renyi", "geometric") SEEDS = (20, 40) _params = list(product(FAMILY, SEEDS)) _methods = ("newton", "fixed-point") _ubcm_params = list(product(["cm_exp", "cm"], _methods)) _uecm_par...
31.078571
74
0.643071
"""Unit tests for :mod:`pathcensus.nullmodels`.""" # pylint: disable=redefined-outer-name import random from itertools import product import pytest import numpy as np from pathcensus.nullmodels import UBCM, UECM from pathcensus.utils import rowsums, set_numba_seed from pathcensus.utils import relclose from tests.utils ...
0
891
0
2,676
0
0
0
121
291
9b37adbc6017848e838f3819b3a328f6adc4fde6
2,733
py
Python
rta/models/rolling_median.py
MatteoLacki/rta
93944d6fc934126e0bb4d076c8b4213cadbe49a1
[ "BSD-2-Clause" ]
1
2018-05-31T14:31:18.000Z
2018-05-31T14:31:18.000Z
rta/models/rolling_median.py
MatteoLacki/rta
93944d6fc934126e0bb4d076c8b4213cadbe49a1
[ "BSD-2-Clause" ]
null
null
null
rta/models/rolling_median.py
MatteoLacki/rta
93944d6fc934126e0bb4d076c8b4213cadbe49a1
[ "BSD-2-Clause" ]
null
null
null
try: import matplotlib.pyplot as plt except ModuleNotFoundError: plt = None #TODO: implement this.
28.46875
108
0.562386
try: import matplotlib.pyplot as plt except ModuleNotFoundError: plt = None import numpy as np from scipy.interpolate import interp1d from scipy.signal import medfilt from rta.models.interpolant import Interpolant from rta.models.spline import Spline from rta.array_operations.dedupy import dedup_np from rta.ma...
0
0
0
2,278
0
0
0
119
223
a61c2f0d8b9b2a3c40c353b6dd04cca283f1aa70
11,553
py
Python
map_objects/game_map.py
Nicocchi/rougelike
c8cc2ee4f3c1a12091a50a961de4b47c83e4e3b5
[ "MIT" ]
1
2020-01-21T11:30:09.000Z
2020-01-21T11:30:09.000Z
map_objects/game_map.py
Nicocchi/rougelike
c8cc2ee4f3c1a12091a50a961de4b47c83e4e3b5
[ "MIT" ]
4
2021-04-30T21:05:28.000Z
2022-03-12T00:13:13.000Z
map_objects/game_map.py
Nicocchi/rougelike
c8cc2ee4f3c1a12091a50a961de4b47c83e4e3b5
[ "MIT" ]
null
null
null
DEPTH = 10 MIN_SIZE = 5 FULL_ROOMS = False MAP_WIDTH = 63 MAP_HEIGHT = 40 bsp_rooms = []
46.963415
124
0.56903
import tcod as libtcodpy from random import randint from components.ai import BasicMonster from components.equipment import EquipmentSlots from components.equippable import Equippable from components.fighter import Fighter from components.item import Item from components.stairs import Stairs from entity import Entity...
0
0
0
10,823
0
0
0
283
355
099fdd831a65b2a78353d24b34be9c17c37cba63
1,551
py
Python
fairml/non_linear_expansion.py
ravish0007/fairml
bdfb707ff9554c1a789dc8de3926c1ef3cfb1fc8
[ "MIT" ]
330
2017-02-24T08:34:39.000Z
2022-02-24T15:41:19.000Z
fairml/non_linear_expansion.py
ravish0007/fairml
bdfb707ff9554c1a789dc8de3926c1ef3cfb1fc8
[ "MIT" ]
14
2017-02-02T00:54:16.000Z
2021-02-19T16:01:20.000Z
fairml/non_linear_expansion.py
ravish0007/fairml
bdfb707ff9554c1a789dc8de3926c1ef3cfb1fc8
[ "MIT" ]
70
2017-01-31T20:51:10.000Z
2022-02-17T07:38:52.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function
31.02
67
0.580916
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import pandas as pd from collections import defaultdict from random import randint import six def return_non_linear_transformation(v1, poly, log, square_root, ...
0
0
0
0
0
1,304
0
3
134
83ec1c231ff393b0586eb485267dbbf932d48ceb
776
py
Python
2018/05.py
bernikr/advent-of-code
331e5257b9f812776d0723c7cdec349770498d34
[ "MIT" ]
1
2020-12-06T13:07:55.000Z
2020-12-06T13:07:55.000Z
2018/05.py
bernikr/advent-of-code
331e5257b9f812776d0723c7cdec349770498d34
[ "MIT" ]
null
null
null
2018/05.py
bernikr/advent-of-code
331e5257b9f812776d0723c7cdec349770498d34
[ "MIT" ]
null
null
null
from aocd import get_data if __name__ == '__main__': data = get_data(day=5, year=2018) inp = data print(part1(inp)) print(part2(inp))
22.823529
99
0.490979
from aocd import get_data def react(p): diff = abs(ord('A')-ord('a')) poly = list(p) changed = True while changed: changed = False for i in range(0, len(poly)-1): if poly[i] != '-' and abs(ord(poly[i])-ord(poly[i+1])) == diff: poly[i] = '-' ...
0
0
0
0
0
552
0
0
69
581b5ad28dcb7302d27dd121bec6759029fd818e
621
py
Python
setup.py
aakashns/swiftai
7f18237d5b92ae9c016a595d01ef6ee207855b2f
[ "MIT" ]
null
null
null
setup.py
aakashns/swiftai
7f18237d5b92ae9c016a595d01ef6ee207855b2f
[ "MIT" ]
null
null
null
setup.py
aakashns/swiftai
7f18237d5b92ae9c016a595d01ef6ee207855b2f
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="swiftai", version="0.1", author="Aakash N S", author_email="opensource@swiftace.ai", description="Utilities and helper functions for Pytorch and FastAI deep learning libraries", long_description=lon...
29.571429
94
0.719807
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="swiftai", version="0.1", author="Aakash N S", author_email="opensource@swiftace.ai", description="Utilities and helper functions for Pytorch and FastAI deep learning libraries", long_description=lon...
0
0
0
0
0
0
0
0
0
94aed4e7eefe30a4863f63ee3ec88ba50525aa7a
6,927
py
Python
training/trainingdata.py
imdatsolak/bender
e20a5c7553d0db60440573b4fc3e907d6a8d5fad
[ "BSD-3-Clause" ]
null
null
null
training/trainingdata.py
imdatsolak/bender
e20a5c7553d0db60440573b4fc3e907d6a8d5fad
[ "BSD-3-Clause" ]
null
null
null
training/trainingdata.py
imdatsolak/bender
e20a5c7553d0db60440573b4fc3e907d6a8d5fad
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import sys reload(sys) sys.setdefaultencoding("utf-8") """ Training-Data-Structure: class TrainingDataConverter Copyright (c) 2019 Imdat Solak Written: 2017-04-12 00:00 CET, ISO """
48.78169
155
0.700592
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import sys reload(sys) sys.setdefaultencoding("utf-8") import os import logging import nltk.data from core import utils from core.progressbar import ProgressBar, Percentage, Bar, ETA, FormatLabel, AnimatedMarker import codecs from modules....
0
0
0
6,140
0
0
0
188
330
af9b3f69b1325129ae442f2d87c9a08513882bd7
2,014
py
Python
egs/sre21-av-a/v1.16k/local/estimate_lid_labels.py
hyperion-ml/hyperion
c4c9eee0acab1ba572843373245da12d00dfffaa
[ "Apache-2.0" ]
14
2021-12-19T04:24:15.000Z
2022-03-18T03:24:04.000Z
egs/sre21-av-a/v1.16k/local/estimate_lid_labels.py
hyperion-ml/hyperion
c4c9eee0acab1ba572843373245da12d00dfffaa
[ "Apache-2.0" ]
null
null
null
egs/sre21-av-a/v1.16k/local/estimate_lid_labels.py
hyperion-ml/hyperion
c4c9eee0acab1ba572843373245da12d00dfffaa
[ "Apache-2.0" ]
5
2021-12-14T20:41:27.000Z
2022-02-24T14:18:11.000Z
#!/usr/bin/env python """ Copyright 2018 Johns Hopkins University (Author: Jesus Villalba) Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """ import logging from jsonargparse import ArgumentParser, namespace_to_dict from hyperion.hyp_defs import config_logger if __name__ == "__main__": parser =...
29.188406
84
0.66435
#!/usr/bin/env python """ Copyright 2018 Johns Hopkins University (Author: Jesus Villalba) Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """ import os import logging from jsonargparse import ArgumentParser, namespace_to_dict import math import numpy as np from hyperion.hyp_defs import float_cpu, con...
0
0
0
0
0
797
0
39
135
39501971fe565c85d10ffb357bd2874912b66428
278
py
Python
backend/users/urls.py
alessondelmiro/github_monitor
27447da7ddd9a3da6241da112c494f4abff57928
[ "MIT" ]
null
null
null
backend/users/urls.py
alessondelmiro/github_monitor
27447da7ddd9a3da6241da112c494f4abff57928
[ "MIT" ]
1
2020-05-18T02:53:52.000Z
2020-05-18T02:53:52.000Z
backend/users/urls.py
alessondelmiro/github_monitor
27447da7ddd9a3da6241da112c494f4abff57928
[ "MIT" ]
null
null
null
from django.conf.urls import include from django.urls import path from rest_framework import routers from .viewsets import UserViewSet ROUTER = routers.DefaultRouter() ROUTER.register(r'', UserViewSet, basename='User') urlpatterns = ( path('', include(ROUTER.urls)), )
18.533333
50
0.758993
from django.conf.urls import include from django.urls import path from rest_framework import routers from .viewsets import UserViewSet ROUTER = routers.DefaultRouter() ROUTER.register(r'', UserViewSet, basename='User') urlpatterns = ( path('', include(ROUTER.urls)), )
0
0
0
0
0
0
0
0
0
5d9d1cf5f7ce68f79c998a02ff1931832057feb4
2,225
py
Python
run_tests.py
Songtrust/django-cache-machine
ddc144875ec7b3b6fb121c7384c4fe2c4f9fbcda
[ "BSD-3-Clause" ]
null
null
null
run_tests.py
Songtrust/django-cache-machine
ddc144875ec7b3b6fb121c7384c4fe2c4f9fbcda
[ "BSD-3-Clause" ]
null
null
null
run_tests.py
Songtrust/django-cache-machine
ddc144875ec7b3b6fb121c7384c4fe2c4f9fbcda
[ "BSD-3-Clause" ]
null
null
null
""" Creating standalone Django apps is a PITA because you're not in a project, so you don't have a settings.py file. I can never remember to define DJANGO_SETTINGS_MODULE, so I run these commands which get the right env automatically. """ import os NAME = os.path.basename(os.path.dirname(__file__)) ROOT = os.path.abs...
37.083333
91
0.625618
""" Creating standalone Django apps is a PITA because you're not in a project, so you don't have a settings.py file. I can never remember to define DJANGO_SETTINGS_MODULE, so I run these commands which get the right env automatically. """ import argparse import os import sys from subprocess import call, check_output ...
0
0
0
0
0
1,445
0
3
89
34079e62d9a0ac3312266f9963fef439c646fc32
557
py
Python
bhcrjyApp/app/index.py
caochong01/quick-reptiler
e605afce0c3558a1a01b2406dae88c8f3a0f8792
[ "Apache-2.0" ]
null
null
null
bhcrjyApp/app/index.py
caochong01/quick-reptiler
e605afce0c3558a1a01b2406dae88c8f3a0f8792
[ "Apache-2.0" ]
null
null
null
bhcrjyApp/app/index.py
caochong01/quick-reptiler
e605afce0c3558a1a01b2406dae88c8f3a0f8792
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from flask.blueprints import Blueprint bp = Blueprint('index', __name__, url_prefix='/')
25.318182
105
0.728905
# -*- coding: utf-8 -*- from bhcrjyApp.AppUtils.HttpMessageTool import HttpUtils from bhcrjyApp.app import loginCheck from flask.blueprints import Blueprint from flask import request, make_response from flask import render_template, redirect, abort, url_for bp = Blueprint('index', __name__, url_prefix='/') @bp.rout...
12
219
0
0
0
0
0
107
112
9f7f4b1ca5790f07a34806474fddf006ce47b3c8
1,365
py
Python
py3server/swagger_server/test/test_concepts_controller.py
lhannest/pythonBeaconServerStub
3fee2505f5f7afda9184277b5f6308ff05832e35
[ "MIT" ]
null
null
null
py3server/swagger_server/test/test_concepts_controller.py
lhannest/pythonBeaconServerStub
3fee2505f5f7afda9184277b5f6308ff05832e35
[ "MIT" ]
null
null
null
py3server/swagger_server/test/test_concepts_controller.py
lhannest/pythonBeaconServerStub
3fee2505f5f7afda9184277b5f6308ff05832e35
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import if __name__ == '__main__': import unittest unittest.main()
31.022727
102
0.597802
# coding: utf-8 from __future__ import absolute_import from swagger_server.models.inline_response2001 import InlineResponse2001 from swagger_server.models.inline_response2002 import InlineResponse2002 from . import BaseTestCase from six import BytesIO from flask import json class TestConceptsController(BaseTestCase...
0
0
0
995
0
0
0
110
134
afb45a1f6d669be9137bd116b381f8ffa90a7cd3
1,855
py
Python
tests/seahub/views/sysadmin/test_sys_virus_scan_records.py
saukrIppl/newsea
0fd5ab2ade9a8fb16b1e7b43ba13dac32eb39603
[ "Apache-2.0" ]
2
2017-06-21T09:46:55.000Z
2018-05-30T10:07:32.000Z
tests/seahub/views/sysadmin/test_sys_virus_scan_records.py
saukrIppl/newsea
0fd5ab2ade9a8fb16b1e7b43ba13dac32eb39603
[ "Apache-2.0" ]
null
null
null
tests/seahub/views/sysadmin/test_sys_virus_scan_records.py
saukrIppl/newsea
0fd5ab2ade9a8fb16b1e7b43ba13dac32eb39603
[ "Apache-2.0" ]
1
2020-10-01T04:11:41.000Z
2020-10-01T04:11:41.000Z
import os TRAVIS = 'TRAVIS' in os.environ
35
210
0.687332
import os from mock import patch import pytest from django.core.urlresolvers import reverse from seahub.test_utils import BaseTestCase TRAVIS = 'TRAVIS' in os.environ class VirusScanRecord(object): def __init__(self, repo_id): self.repo_id = repo_id class SysVirusScanRecordsTest(BaseTestCase): # ...
0
796
0
842
0
0
0
37
136
fc0bc2028b678416bdf0a92e7eb92733be71a5b3
1,043
py
Python
playground/localController.py
sysuroboclub/LineFollowCar
4ce8c85d0757190b98f782ec964bc8456efaf97f
[ "MIT" ]
4
2019-11-28T11:40:42.000Z
2019-12-04T11:38:42.000Z
playground/localController.py
sysuroboclub/LineFollowCar
4ce8c85d0757190b98f782ec964bc8456efaf97f
[ "MIT" ]
null
null
null
playground/localController.py
sysuroboclub/LineFollowCar
4ce8c85d0757190b98f782ec964bc8456efaf97f
[ "MIT" ]
null
null
null
from inputs import get_gamepad import serial ser=serial.Serial('COM4',115200) prevB=0 while True: events = get_gamepad() #X,Y [-32768,+32768] #Z,RZ(RT,LT) [0,255] local=ser.read_all() if len(local)>0: print(local.decode()) for event in events: # print(event.ev_type, e...
31.606061
56
0.495686
from inputs import get_gamepad import serial ser=serial.Serial('COM4',115200) prevB=0 while True: events = get_gamepad() #X,Y [-32768,+32768] #Z,RZ(RT,LT) [0,255] local=ser.read_all() if len(local)>0: print(local.decode()) for event in events: # print(event.ev_type, e...
0
0
0
0
0
0
0
0
0
9ee5b2331da5d82edf1810c3ea0de1c521383a2e
9,145
py
Python
gms-common/python/master-coi-data-client/util/flatfiles/fieldFormatter.py
SNL-GMS/GMS-PI7-OPEN
4c5f2a33a45566b12897bcdc129609c9e6b95442
[ "BSD-3-Clause" ]
5
2020-01-20T14:53:11.000Z
2021-11-30T23:01:08.000Z
gms-common/python/master-coi-data-client/util/flatfiles/fieldFormatter.py
SNL-GMS/GMS-PI7-OPEN
4c5f2a33a45566b12897bcdc129609c9e6b95442
[ "BSD-3-Clause" ]
7
2019-12-30T06:08:08.000Z
2022-03-02T06:38:09.000Z
gms-common/python/master-coi-data-client/util/flatfiles/fieldFormatter.py
SNL-GMS/GMS-PI7-OPEN
4c5f2a33a45566b12897bcdc129609c9e6b95442
[ "BSD-3-Clause" ]
1
2019-12-10T19:37:03.000Z
2019-12-10T19:37:03.000Z
# -*- coding: utf-8 -*- ''' helper methods for formatting CSS flatfiles All methods use ljust to left justify the field. The integer argument to ljust specifies that a field has a width of exactly that integer value: the field is padded with whitespace if the contents do not subsume the entire width. The slicing (t...
17.791829
106
0.721487
# -*- coding: utf-8 -*- import util.flatfiles.shared from util.conversions import * ''' helper methods for formatting CSS flatfiles All methods use ljust to left justify the field. The integer argument to ljust specifies that a field has a width of exactly that integer value: the field is padded with whitespace if t...
0
0
0
0
0
5,662
0
16
2,849
9e70df1d2d4dde6b061e90b058d2136c68d8f180
15,104
py
Python
blink/biencoder/eval_entity_discovery.py
parin1995/claim2fact
9f928a5789b3dc85cfa69395e0ba02b0b84276a8
[ "MIT" ]
8
2021-09-08T04:39:31.000Z
2022-02-10T06:28:36.000Z
blink/biencoder/eval_entity_discovery.py
parin1995/claim2fact
9f928a5789b3dc85cfa69395e0ba02b0b84276a8
[ "MIT" ]
null
null
null
blink/biencoder/eval_entity_discovery.py
parin1995/claim2fact
9f928a5789b3dc85cfa69395e0ba02b0b84276a8
[ "MIT" ]
2
2022-01-04T08:10:37.000Z
2022-01-28T00:07:19.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # Copyright (c) 2021 Dhruv Agarwal and authors of arboEL. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # import blink.candidate_ranking.utils as utils from blink.common....
44.952381
189
0.647577
# Copyright (c) Facebook, Inc. and its affiliates. # Copyright (c) 2021 Dhruv Agarwal and authors of arboEL. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # import os import json import math import time import torch from...
0
0
0
0
0
13,835
0
237
511
15a695620d5688781ce9dae02f1a6bc734c2c733
1,623
py
Python
cupid/camera.py
iinnovations/iicontrollibs
94af26a61405f1ad928d36e36602ebb859a2e44f
[ "Apache-2.0" ]
11
2015-06-22T21:38:15.000Z
2021-03-10T11:24:21.000Z
cupid/camera.py
iinnovations/iicontrollibs
94af26a61405f1ad928d36e36602ebb859a2e44f
[ "Apache-2.0" ]
null
null
null
cupid/camera.py
iinnovations/iicontrollibs
94af26a61405f1ad928d36e36602ebb859a2e44f
[ "Apache-2.0" ]
12
2015-03-05T00:19:40.000Z
2020-12-18T15:21:44.000Z
#!/usr/bin/python3 __author__ = "Colin Reese" __copyright__ = "Copyright 2016, Interface Innovations" __credits__ = ["Colin Reese"] __license__ = "Apache 2.0" __version__ = "1.0" __maintainer__ = "Colin Reese" __email__ = "support@interfaceinnovations.org" __status__ = "Development" if __name__ == "__main__": ta...
33.122449
181
0.674677
#!/usr/bin/python3 __author__ = "Colin Reese" __copyright__ = "Copyright 2016, Interface Innovations" __credits__ = ["Colin Reese"] __license__ = "Apache 2.0" __version__ = "1.0" __maintainer__ = "Colin Reese" __email__ = "support@interfaceinnovations.org" __status__ = "Development" def takesnap(path='/var/www/webca...
0
0
0
0
0
1,272
0
0
23
799cc6dc3e7ff67b281f390e045b4dee11a4e321
5,085
py
Python
Task2/IGNORE_miscellaneousScripts/getPredictions_weakDefenses_old.py
Jacob-L-Vincent/project-athena
d1d300e375941399f116cbaa4678a9ed7c6652db
[ "MIT" ]
1
2020-11-11T19:22:25.000Z
2020-11-11T19:22:25.000Z
Task2/IGNORE_miscellaneousScripts/getPredictions_weakDefenses_old.py
Jacob-L-Vincent/project-athena
d1d300e375941399f116cbaa4678a9ed7c6652db
[ "MIT" ]
null
null
null
Task2/IGNORE_miscellaneousScripts/getPredictions_weakDefenses_old.py
Jacob-L-Vincent/project-athena
d1d300e375941399f116cbaa4678a9ed7c6652db
[ "MIT" ]
null
null
null
######################################################### ## generate the ensemble predictions for task 2 ## ## created by Isaac Keohane isaackeohane95@gmail.com ## ######################################################### import os import sys module_path = os.path.abspath(os.path.join('../src')) if module_pa...
37.947761
108
0.632842
######################################################### ## generate the ensemble predictions for task 2 ## ## created by Isaac Keohane isaackeohane95@gmail.com ## ######################################################### import os import sys module_path = os.path.abspath(os.path.join('../src')) if module_pa...
0
0
0
0
0
0
0
15
22
c984f47ed4da7a82fac2d962c224423565a31436
1,569
py
Python
DetectCartype.py
mani-vegupatti/car_detection_in_video
4cf3b6aae6510e2cbfa5563898884f4ca73826b7
[ "MIT" ]
null
null
null
DetectCartype.py
mani-vegupatti/car_detection_in_video
4cf3b6aae6510e2cbfa5563898884f4ca73826b7
[ "MIT" ]
null
null
null
DetectCartype.py
mani-vegupatti/car_detection_in_video
4cf3b6aae6510e2cbfa5563898884f4ca73826b7
[ "MIT" ]
null
null
null
IMG_SIZE = 224 color = {}
34.866667
187
0.637349
import tensorflow as tf import keras from keras.preprocessing import image from keras.initializers import glorot_uniform import numpy as np import cv2 import os import csv IMG_SIZE = 224 color = {} class DetectCartype(): def __init__(self,model_json="./cartype_model_data/cartype_model_v01.json", weights_h5="./ca...
0
0
0
1,323
0
0
0
-4
199
302fb68444e03d57eea86305002642d21bb55592
16,964
py
Python
synarchive/connection.py
aimakerspace/synergos_archive
da68b745982658f50bd40ddc380c3dbc0dcb3b29
[ "Apache-2.0" ]
null
null
null
synarchive/connection.py
aimakerspace/synergos_archive
da68b745982658f50bd40ddc380c3dbc0dcb3b29
[ "Apache-2.0" ]
null
null
null
synarchive/connection.py
aimakerspace/synergos_archive
da68b745982658f50bd40ddc380c3dbc0dcb3b29
[ "Apache-2.0" ]
1
2022-01-21T01:05:46.000Z
2022-01-21T01:05:46.000Z
#!/usr/bin/env python #################### # Required Modules # #################### # Generic/Built-in # Libs # Custom ################## # Configurations # ################## ############################################# # Data Storage Class - CollaborationRecords # ############################################...
27.718954
85
0.551521
#!/usr/bin/env python #################### # Required Modules # #################### # Generic/Built-in import os from typing import Dict # Libs import jsonschema import tinydb # Custom from .base import TopicalRecords, AssociationRecords from .config import SCHEMAS as schemas ################## # Configurations #...
0
0
0
15,521
0
0
0
26
293
2892d60bd5cafa38797d03497b75f39a0699992b
1,368
py
Python
src/datasets/ConvertLabels.py
kspalm/mlsvm
808f5b81f2b19d32a1e472bd9b358f7a81e73736
[ "BSD-2-Clause" ]
25
2016-10-06T18:57:21.000Z
2022-02-09T20:43:59.000Z
src/datasets/ConvertLabels.py
kspalm/mlsvm
808f5b81f2b19d32a1e472bd9b358f7a81e73736
[ "BSD-2-Clause" ]
7
2017-08-22T18:45:19.000Z
2019-09-20T20:09:35.000Z
src/datasets/ConvertLabels.py
kspalm/mlsvm
808f5b81f2b19d32a1e472bd9b358f7a81e73736
[ "BSD-2-Clause" ]
14
2016-06-02T03:47:27.000Z
2022-03-23T01:36:12.000Z
""" Author: Ehsan Sadrfaridpour Date: Aug 24, 2018 Purpose: map other labels to -1 and 1 labels, make sure the number of 1 labels are smaller than the number of -1 labels for MLSVM framework Usage: define the preferred mapping in the label_map which is a dictionary. The key is the old/current label(s) in the file...
31.813953
94
0.682018
""" Author: Ehsan Sadrfaridpour Date: Aug 24, 2018 Purpose: map other labels to -1 and 1 labels, make sure the number of 1 labels are smaller than the number of -1 labels for MLSVM framework Usage: define the preferred mapping in the label_map which is a dictionary. The key is the old/current label(s) in the file...
0
0
0
0
0
0
0
0
0
7204828998647edf6ac323e972bb569a6bb9580d
11,218
py
Python
file_transformer.py
benkehoe/file-transformer
9c0d9be0048f4c02eb116f1c672cb5049b858106
[ "Apache-2.0" ]
null
null
null
file_transformer.py
benkehoe/file-transformer
9c0d9be0048f4c02eb116f1c672cb5049b858106
[ "Apache-2.0" ]
1
2018-02-08T19:04:07.000Z
2018-02-08T19:04:07.000Z
file_transformer.py
benkehoe/file-transformer
9c0d9be0048f4c02eb116f1c672cb5049b858106
[ "Apache-2.0" ]
null
null
null
""" Utility functions for creating Python scripts that expect to turn one file into another, or use stdin/stdout as part of a pipeline. Copyright 2018 Ben Kehoe 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...
36.660131
155
0.643876
""" Utility functions for creating Python scripts that expect to turn one file into another, or use stdin/stdout as part of a pipeline. Copyright 2018 Ben Kehoe 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...
0
97
0
4,977
0
1,375
0
-28
188
da1566932d6442875c94f95faaa598b3b1adcdab
5,015
py
Python
magicclass/widgets/pywidgets/dict.py
hanjinliu/magic-class
2a9d8af3d385ec3870ebcade9f2dbc03115bed22
[ "BSD-3-Clause" ]
15
2021-09-07T10:18:59.000Z
2022-03-23T14:55:45.000Z
magicclass/widgets/pywidgets/dict.py
hanjinliu/magic-class
2a9d8af3d385ec3870ebcade9f2dbc03115bed22
[ "BSD-3-Clause" ]
12
2021-09-10T08:54:43.000Z
2022-03-31T02:43:50.000Z
magicclass/widgets/pywidgets/dict.py
hanjinliu/magic-class
2a9d8af3d385ec3870ebcade9f2dbc03115bed22
[ "BSD-3-Clause" ]
1
2022-02-13T15:51:51.000Z
2022-02-13T15:51:51.000Z
from __future__ import annotations
32.993421
87
0.577069
from __future__ import annotations from typing import Any, Iterable, MutableMapping from qtpy.QtWidgets import QTableWidget, QTableWidgetItem from .object import BaseWidget, ContextMenuMixin, PyObjectBound class DictWidget(BaseWidget, MutableMapping): def __init__(self, value=None, **kwargs): super().__in...
0
584
0
4,098
0
0
0
105
194