hexsha
stringlengths
40
40
size
int64
2
1.05M
ext
stringclasses
9 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
193
max_stars_repo_name
stringlengths
6
109
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
36.6k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
193
max_issues_repo_name
stringlengths
6
109
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
29.8k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
193
max_forks_repo_name
stringlengths
6
109
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
11.2k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.05M
avg_line_length
float64
1
404k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
1d7e7fa25337f83d649024f89a3741c738cb8f70
4,922
py
Python
salt/modules/darwin_sysctl.py
skrobul/salt
ef7fb71082cce7a9783e00b9c65062fefae09263
[ "Apache-2.0" ]
2
2017-09-17T21:10:35.000Z
2019-08-26T03:00:12.000Z
salt/modules/darwin_sysctl.py
skrobul/salt
ef7fb71082cce7a9783e00b9c65062fefae09263
[ "Apache-2.0" ]
null
null
null
salt/modules/darwin_sysctl.py
skrobul/salt
ef7fb71082cce7a9783e00b9c65062fefae09263
[ "Apache-2.0" ]
3
2021-02-23T08:12:48.000Z
2021-02-23T08:13:13.000Z
# -*- coding: utf-8 -*- ''' Module for viewing and modifying sysctl parameters ''' # Import python libs import os # Import salt libs import salt.utils from salt.exceptions import CommandExecutionError # Define the module's virtual name __virtualname__ = 'sysctl' def __virtual__(): ''' Only run on Darwin (O...
26.180851
80
0.538805
1d7ef24af67379f1a2bcbedc3e6d4526b6ba1903
1,543
py
Python
tests/graph/num_classes.py
bio-ontology-research-group/OntoML
4cdc17dc7ee26464db96c67838c3e77dba5318f9
[ "BSD-3-Clause" ]
null
null
null
tests/graph/num_classes.py
bio-ontology-research-group/OntoML
4cdc17dc7ee26464db96c67838c3e77dba5318f9
[ "BSD-3-Clause" ]
null
null
null
tests/graph/num_classes.py
bio-ontology-research-group/OntoML
4cdc17dc7ee26464db96c67838c3e77dba5318f9
[ "BSD-3-Clause" ]
null
null
null
import sys sys.path.append("../") from unittest import TestCase import os import requests from mowl.datasets.base import PathDataset from mowl.graph.taxonomy.model import TaxonomyParser from mowl.graph.edge import Edge from mowl.graph.util import prettyFormat from util import download onts = { "pizza.owl": "http...
28.574074
119
0.636423
1d7f0b5fee41c4c14f742d48555c2420fbc2de83
4,026
py
Python
vistrails/core/log/machine.py
MaritimeResearchInstituteNetherlands/VisTrails
9b42ca9b3550b599467b0c7dfa56f57bbd97a4f2
[ "BSD-3-Clause" ]
83
2015-01-05T14:50:50.000Z
2021-09-17T19:45:26.000Z
vistrails/core/log/machine.py
VizierDB/Vistrails
895f7204fbf56a9cdf3f46afae72969c2fc64a24
[ "BSD-3-Clause" ]
254
2015-01-02T20:39:19.000Z
2018-11-28T17:16:44.000Z
vistrails/core/log/machine.py
VizierDB/Vistrails
895f7204fbf56a9cdf3f46afae72969c2fc64a24
[ "BSD-3-Clause" ]
40
2015-04-17T16:46:36.000Z
2021-09-28T22:43:24.000Z
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
37.277778
79
0.64158
1d7f11359d06de7fbbc070861d39217d74d4d75b
486
py
Python
pantsuitUp/interviewMe/migrations/0020_feedback_input_text.py
PantsuitUp/Whack2017
9463b90b0a38a5ccc57062190cc692db7155b3a0
[ "Apache-2.0" ]
null
null
null
pantsuitUp/interviewMe/migrations/0020_feedback_input_text.py
PantsuitUp/Whack2017
9463b90b0a38a5ccc57062190cc692db7155b3a0
[ "Apache-2.0" ]
4
2020-06-05T17:52:33.000Z
2022-03-11T23:17:53.000Z
pantsuitUp/interviewMe/migrations/0020_feedback_input_text.py
PantsuitUp/Whack2017
9463b90b0a38a5ccc57062190cc692db7155b3a0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-11-11 22:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('interviewMe', '0019_remove_feedback_input_text'), ] operations = [ migratio...
23.142857
69
0.633745
1d7f1ab3c3e9c696ac5b1b7f25a0c436bb2c4678
702
py
Python
client/verta/verta/_swagger/_public/modeldb/model/ModeldbAddExperimentRunAttributesResponse.py
CaptEmulation/modeldb
78b10aca553e386554f9740db63466b1cf013a1a
[ "Apache-2.0" ]
835
2017-02-08T20:14:24.000Z
2020-03-12T17:37:49.000Z
client/verta/verta/_swagger/_public/modeldb/model/ModeldbAddExperimentRunAttributesResponse.py
CaptEmulation/modeldb
78b10aca553e386554f9740db63466b1cf013a1a
[ "Apache-2.0" ]
651
2019-04-18T12:55:07.000Z
2022-03-31T23:45:09.000Z
client/verta/verta/_swagger/_public/modeldb/model/ModeldbAddExperimentRunAttributesResponse.py
CaptEmulation/modeldb
78b10aca553e386554f9740db63466b1cf013a1a
[ "Apache-2.0" ]
170
2017-02-13T14:49:22.000Z
2020-02-19T17:59:12.000Z
# THIS FILE IS AUTO-GENERATED. DO NOT EDIT from verta._swagger.base_type import BaseType class ModeldbAddExperimentRunAttributesResponse(BaseType): def __init__(self, experiment_run=None): required = { "experiment_run": False, } self.experiment_run = experiment_run for k, v in required.items()...
28.08
63
0.719373
1d7f3f1af8d47f34ce719199df50ad64015369be
16,171
py
Python
api/python/t4/api.py
ajbouh/t4
07f5bd42b7dc403d946d05a830a26e605f4879be
[ "Apache-2.0" ]
null
null
null
api/python/t4/api.py
ajbouh/t4
07f5bd42b7dc403d946d05a830a26e605f4879be
[ "Apache-2.0" ]
null
null
null
api/python/t4/api.py
ajbouh/t4
07f5bd42b7dc403d946d05a830a26e605f4879be
[ "Apache-2.0" ]
null
null
null
import json import requests import re from aws_requests_auth.boto_utils import BotoAWSRequestsAuth from elasticsearch import Elasticsearch, RequestsHttpConnection from six.moves import urllib from urllib.parse import urlparse, unquote from .data_transfer import (copy_file, get_bytes, put_bytes, delete_object, list_ob...
35.776549
108
0.612578
1d7f6706a2c626e8c8dc782e3c27900e1c802f5b
1,608
py
Python
oscar/lib/python2.7/site-packages/IPython/core/magics/__init__.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/IPython/core/magics/__init__.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/IPython/core/magics/__init__.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
"""Implementation of all the magic functions built into IPython. """ #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, d...
38.285714
80
0.537313
1d7f86f0a9e1f1f8ed6bbb82868c71995aeb09a5
6,472
py
Python
datalad/distributed/create_sibling_gin.py
soichih/datalad
797dde3ab7497be170e2c4ea8824f33a4b38e5d8
[ "MIT" ]
null
null
null
datalad/distributed/create_sibling_gin.py
soichih/datalad
797dde3ab7497be170e2c4ea8824f33a4b38e5d8
[ "MIT" ]
null
null
null
datalad/distributed/create_sibling_gin.py
soichih/datalad
797dde3ab7497be170e2c4ea8824f33a4b38e5d8
[ "MIT" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 et: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ### ...
40.198758
88
0.579728
1d7f986de88d822b8983df41b026d2f53a4c4481
2,237
py
Python
plot_ssh.py
hellsgate1001/ssh_hack_plot
a5aa24370d006339ab2a15338d4f02bc2a6e3e5e
[ "MIT" ]
null
null
null
plot_ssh.py
hellsgate1001/ssh_hack_plot
a5aa24370d006339ab2a15338d4f02bc2a6e3e5e
[ "MIT" ]
null
null
null
plot_ssh.py
hellsgate1001/ssh_hack_plot
a5aa24370d006339ab2a15338d4f02bc2a6e3e5e
[ "MIT" ]
null
null
null
import argparse import json import re import requests import matplotlib import matplotlib.pyplot as plt import numpy as np from iptools.ipv4 import validate_ip from mpl_toolkits.basemap import Basemap # IPADDRESS_PATTERN = "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" # ...
31.957143
114
0.590523
1d7f98d9d8e0d05ffe48634cfa195574251d5dd4
7,567
py
Python
floris/simulation/wake_vortex/elliptic.py
tangsmall/floris
51e4e15c6a9b0c8f55bf01772111799803acf224
[ "Apache-2.0" ]
5
2020-06-16T11:58:10.000Z
2022-01-03T17:09:55.000Z
wiz/elliptic.py
ebranlard/wiz
6dfca8b2711b670229f5b2b3b3e0d7fe0bdea156
[ "MIT" ]
null
null
null
wiz/elliptic.py
ebranlard/wiz
6dfca8b2711b670229f5b2b3b3e0d7fe0bdea156
[ "MIT" ]
null
null
null
#--- Legacy python 2.7 from __future__ import division from __future__ import print_function # --- General import numpy as np import unittest from scipy.special import ellipk, ellipe def ellipticPiCarlson(n,m): """ Elliptic integral of the third kind using the method of Carlson PI(n,m)=int(1/((1-n*sin(...
34.085586
112
0.453416
1d7fa54901424817c059df95ee81b789d0caaed7
243,667
py
Python
nova/db/sqlalchemy/api.py
mariusleu/nova
b19e37cbfddfce0839dbeeb0d556ed1ffae664ad
[ "Apache-2.0" ]
null
null
null
nova/db/sqlalchemy/api.py
mariusleu/nova
b19e37cbfddfce0839dbeeb0d556ed1ffae664ad
[ "Apache-2.0" ]
null
null
null
nova/db/sqlalchemy/api.py
mariusleu/nova
b19e37cbfddfce0839dbeeb0d556ed1ffae664ad
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file...
35.702125
79
0.65221
1d7fab4fd116c3fbcbc5ce5eb6ac573ea2c7f83e
187
py
Python
SimInterface/__init__.py
HRClab/SimInterace
06dac51155f3e3d19445a558325f707e41fbfacd
[ "MIT" ]
2
2016-03-27T04:33:39.000Z
2020-02-24T01:14:43.000Z
SimInterface/__init__.py
HRClab/SimInterace
06dac51155f3e3d19445a558325f707e41fbfacd
[ "MIT" ]
null
null
null
SimInterface/__init__.py
HRClab/SimInterace
06dac51155f3e3d19445a558325f707e41fbfacd
[ "MIT" ]
null
null
null
from Variable import Signal from Variable import Parameter from System import StaticFunction from System import DifferentialEquation from System import System from System import Connect
23.375
39
0.86631
1d7faf271a74b4f841556836debae209c9b812c8
11,977
py
Python
tests/test_cifar_format.py
yasakova-anastasia/datumaro
7082fc4f50291d3b3c2022f069f76628e9fd07bb
[ "MIT" ]
null
null
null
tests/test_cifar_format.py
yasakova-anastasia/datumaro
7082fc4f50291d3b3c2022f069f76628e9fd07bb
[ "MIT" ]
1
2021-10-05T17:41:05.000Z
2021-10-05T17:41:05.000Z
tests/test_cifar_format.py
yasakova-anastasia/datumaro
7082fc4f50291d3b3c2022f069f76628e9fd07bb
[ "MIT" ]
null
null
null
from unittest import TestCase import os import os.path as osp import pickle # nosec - disable B403:import_pickle check import numpy as np from datumaro.components.annotation import Label from datumaro.components.dataset import Dataset from datumaro.components.environment import Environment from datumaro.components.e...
38.886364
80
0.585372
1d7fce29f60051aaa568c468292e2c59b7b04eb8
2,014
py
Python
pdfmajor/interpreter/commands/utils.py
asosnovsky/pdfmajor
7e24c64b5b4fdc84c12b2f78dcaab0e1aa07f4ad
[ "MIT" ]
23
2019-01-13T23:32:24.000Z
2021-07-08T04:29:15.000Z
pdfmajor/interpreter/commands/utils.py
asosnovsky/pdfmajor
7e24c64b5b4fdc84c12b2f78dcaab0e1aa07f4ad
[ "MIT" ]
3
2019-08-09T18:42:01.000Z
2019-12-13T15:43:24.000Z
pdfmajor/interpreter/commands/utils.py
asosnovsky/pdfmajor
7e24c64b5b4fdc84c12b2f78dcaab0e1aa07f4ad
[ "MIT" ]
2
2020-01-09T11:18:20.000Z
2020-03-24T06:02:30.000Z
from pdfmajor.parser.PDFParser import PDFStream from pdfmajor.parser.PDFStream import list_value, dict_value, resolve1 from pdfmajor.parser.PDFStream.PDFObjRef import PDFObjRef from pdfmajor.parser.PSStackParser import literal_name from pdfmajor.parser.constants import LITERAL_PDF, LITERAL_TEXT from .state import PDFC...
40.28
76
0.630089
1d800958995d13a58205406da330c8de0db7917e
1,586
py
Python
tests/k8s/test_list_objs.py
damc-dev/kopf
7c344fc682759bbf0647da60933021a75b3862d3
[ "MIT" ]
1
2019-10-22T19:11:15.000Z
2019-10-22T19:11:15.000Z
tests/k8s/test_list_objs.py
iahmad-khan/kopf
267e23b306124d9448f4d98c060af57bb1004038
[ "MIT" ]
null
null
null
tests/k8s/test_list_objs.py
iahmad-khan/kopf
267e23b306124d9448f4d98c060af57bb1004038
[ "MIT" ]
null
null
null
import pytest import requests from kopf.clients.fetching import list_objs_rv def test_when_successful_clustered(req_mock, resource): result = {'items': [{}, {}]} req_mock.get.return_value.json.return_value = result items, resource_version = list_objs_rv(resource=resource, namespace=None) assert item...
33.744681
97
0.725095
1d801032bc560985d5b918bd674739b3fdabd3dd
22,035
py
Python
msl/qt/equipment/message_based.py
rebeccahawke/msl-qt
753ea28aa385a39a33827de2c229e9944a3b1cf3
[ "MIT" ]
null
null
null
msl/qt/equipment/message_based.py
rebeccahawke/msl-qt
753ea28aa385a39a33827de2c229e9944a3b1cf3
[ "MIT" ]
null
null
null
msl/qt/equipment/message_based.py
rebeccahawke/msl-qt
753ea28aa385a39a33827de2c229e9944a3b1cf3
[ "MIT" ]
null
null
null
""" A :class:`~QtWidgets.QWidget` for :class:`~msl.equipment.connection_message_based.ConnectionMessageBased`. This widget allows for reading/writing messages from/to equipment. """ import time import traceback from msl.qt import QtWidgets, QtCore, QtGui, prompt from msl.qt.io import get_icon, get_drag_enter_paths fr...
44.425403
120
0.621602
1d8043b211932dba17cce11604e055d27c9ed642
4,549
py
Python
src/models/tiny_vgg_model.py
MohamedAli1995/Cifar-100-Classifier
924704a81ce13062825a88b90b80e8ac2ba45d63
[ "MIT" ]
2
2019-05-12T16:11:20.000Z
2020-04-10T22:39:57.000Z
src/models/tiny_vgg_model.py
MohamedAli1995/Cifar-100-Classifier
924704a81ce13062825a88b90b80e8ac2ba45d63
[ "MIT" ]
null
null
null
src/models/tiny_vgg_model.py
MohamedAli1995/Cifar-100-Classifier
924704a81ce13062825a88b90b80e8ac2ba45d63
[ "MIT" ]
null
null
null
from src.base.base_model import BaseModel import tensorflow as tf class TinyVGG(BaseModel): def __init__(self, config): super().__init__(config) self.is_training = None self.x = None self.y = None self.train_step = None self.saver = None self.hold_prob = No...
43.32381
129
0.660365
1d804557b9873e8370d1392b157f0ba41150c2ba
418
py
Python
generator/management/commands/generate_dialog.py
Matoking/Markovstuck
177fc714161752176d6d662eb908e5b3fb3bce11
[ "Unlicense" ]
3
2016-04-01T19:58:26.000Z
2016-08-14T23:21:53.000Z
generator/management/commands/generate_dialog.py
Matoking/Markovstuck
177fc714161752176d6d662eb908e5b3fb3bce11
[ "Unlicense" ]
8
2020-02-11T21:45:28.000Z
2021-06-09T17:18:48.000Z
generator/management/commands/generate_dialog.py
Matoking/Markovstuck
177fc714161752176d6d662eb908e5b3fb3bce11
[ "Unlicense" ]
null
null
null
from django.core.management.base import BaseCommand from generator.models import CharacterText class Command(BaseCommand): help = "Generate titles" def handle(self, *args, **options): character_text = CharacterText.objects.order_by("?").first() for i in range(0, 25): print("%s: %s...
32.153846
68
0.645933
1d804a4163a7b8810278901b3a029d2186de7d6f
113
py
Python
office365/sharepoint/search/query/queryAutoCompletionResults.py
wreiner/Office365-REST-Python-Client
476bbce4f5928a140b4f5d33475d0ac9b0783530
[ "MIT" ]
544
2016-08-04T17:10:16.000Z
2022-03-31T07:17:20.000Z
office365/sharepoint/search/query/queryAutoCompletionResults.py
wreiner/Office365-REST-Python-Client
476bbce4f5928a140b4f5d33475d0ac9b0783530
[ "MIT" ]
438
2016-10-11T12:24:22.000Z
2022-03-31T19:30:35.000Z
office365/sharepoint/search/query/queryAutoCompletionResults.py
wreiner/Office365-REST-Python-Client
476bbce4f5928a140b4f5d33475d0ac9b0783530
[ "MIT" ]
202
2016-08-22T19:29:40.000Z
2022-03-30T20:26:15.000Z
from office365.runtime.client_value import ClientValue class QueryAutoCompletionResults(ClientValue): pass
18.833333
54
0.840708
1d80713f3fdb5e95aab69f4f36778b6d59235e8d
4,713
py
Python
publication_backbone/utils/circular_buffer_in_cache.py
Excentrics/publication-backbone
65c9820308b09a6ae1086c265f8d49e36f3724b9
[ "BSD-3-Clause" ]
6
2016-05-19T14:59:51.000Z
2020-03-19T10:08:29.000Z
publication_backbone/utils/circular_buffer_in_cache.py
Excentrics/publication-backbone
65c9820308b09a6ae1086c265f8d49e36f3724b9
[ "BSD-3-Clause" ]
null
null
null
publication_backbone/utils/circular_buffer_in_cache.py
Excentrics/publication-backbone
65c9820308b09a6ae1086c265f8d49e36f3724b9
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'LEGION' from django.core.cache import cache #============================================================================== # Circular buffer #============================================================================== class RingBuffer(object): """Ring buffer""" BUFF...
34.911111
124
0.576278
1d80b577c24f93f8ea63e5031255932854226e12
414
py
Python
Courses/Udacity/CS101/Lesson_2_How_to_Repeat/19-More_Friends/supplied/studentMain.py
leparrav/Playground
dcb90a2dd2bc1867511cfe621eb21248a60e357f
[ "Unlicense" ]
1
2019-02-13T12:02:26.000Z
2019-02-13T12:02:26.000Z
Courses/Udacity/CS101/Lesson_2_How_to_Repeat/19-More_Friends/supplied/studentMain.py
leparrav/Playground
dcb90a2dd2bc1867511cfe621eb21248a60e357f
[ "Unlicense" ]
1
2018-08-13T15:58:33.000Z
2018-08-13T15:58:33.000Z
Courses/Udacity/CS101/Lesson_2_How_to_Repeat/19-More_Friends/supplied/studentMain.py
leparrav/Playground
dcb90a2dd2bc1867511cfe621eb21248a60e357f
[ "Unlicense" ]
2
2017-08-10T20:01:29.000Z
2021-07-01T08:39:13.000Z
# Define a procedure, is_friend, that takes # a string as its input, and returns a # Boolean indicating if the input string # is the name of a friend. Assume # I am friends with everyone whose name # starts with either 'D' or 'N', but no one # else. You do not need to check for # lower case 'd' or 'n' #print is_fr...
19.714286
43
0.683575
1d80c65f276181ac15d5a4e3d49f43a5ae33c78c
1,937
py
Python
src/clip_state_biomass_rasters.py
Ecotrust/embodied_carbon
ee461d79777ae5149ad21fa254a9aa492addf88e
[ "BSD-3-Clause" ]
null
null
null
src/clip_state_biomass_rasters.py
Ecotrust/embodied_carbon
ee461d79777ae5149ad21fa254a9aa492addf88e
[ "BSD-3-Clause" ]
null
null
null
src/clip_state_biomass_rasters.py
Ecotrust/embodied_carbon
ee461d79777ae5149ad21fa254a9aa492addf88e
[ "BSD-3-Clause" ]
null
null
null
"""Generates clipped and masked rasters for Oregon and Washington""" import subprocess import glob import os from functools import partial from multiprocessing import Pool ## BASIC SETTINGS FOR OUR RASTER PROCESSING TR = 30 # TARGET RESOLUTION BOUNDS = { # BOUNDING BOXES FOR OREGON AND WASHINGTON RASTERS 'ore...
30.265625
72
0.618998
1d80f92b8bdfde96e338bf566e6b8ffb4cda7869
8,817
py
Python
support/v8/tools/presubmit.py
hflw/Blackpyre-Engine
9cc22f002cb9a4f9c7995232ef92518c039be9ab
[ "AFL-3.0" ]
48
2015-01-09T20:39:35.000Z
2021-12-21T21:17:52.000Z
deps/v8/tools/presubmit.py
amdg/node
232b0922751311bafb83cf36e309ea4ff9041a4e
[ "MIT" ]
2
2016-02-05T10:27:37.000Z
2019-01-22T16:22:51.000Z
deps/v8/tools/presubmit.py
amdg/node
232b0922751311bafb83cf36e309ea4ff9041a4e
[ "MIT" ]
8
2015-01-12T17:14:36.000Z
2018-09-15T14:10:27.000Z
#!/usr/bin/env python # # Copyright 2008 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # noti...
28.813725
81
0.695815
1d80fa3227115254b51307dba0dacebc920306b4
655
py
Python
location_plotter.py
djgroen/flacs
1f8e18c2db0de60e1a5fdaf0e6f92b0f08739daf
[ "BSD-3-Clause" ]
1
2020-04-25T05:54:58.000Z
2020-04-25T05:54:58.000Z
location_plotter.py
djgroen/flacs
1f8e18c2db0de60e1a5fdaf0e6f92b0f08739daf
[ "BSD-3-Clause" ]
1
2020-04-25T08:47:49.000Z
2020-04-26T21:31:55.000Z
location_plotter.py
djgroen/flacs
1f8e18c2db0de60e1a5fdaf0e6f92b0f08739daf
[ "BSD-3-Clause" ]
null
null
null
import plotly.express as px import pandas as pd def plot_location(location, types='all', remove_houses=True): fname = 'covid_data/' + location + '_buildings.csv' df = pd.read_csv(fname, names=['type', 'lon', 'lat', 'area']) print(df) if types != 'all': df = df[df['type'] == types] if re...
23.392857
75
0.607634
1d816541a44bd44062d24c91a34b7cf278b5c39e
672
py
Python
e2e/scripts/info.py
deepchatterjeevns/streamlit
631d42877bd16bdec14ee124c936917b430f6ce4
[ "Apache-2.0" ]
4
2019-11-10T13:50:56.000Z
2020-01-07T21:02:29.000Z
e2e/scripts/info.py
IliaLarchenko/streamlit
9cdf4851148a43e4e0431d7633c5a5d729e5b1e3
[ "Apache-2.0" ]
4
2021-05-09T11:42:18.000Z
2022-02-27T10:59:36.000Z
e2e/scripts/info.py
IliaLarchenko/streamlit
9cdf4851148a43e4e0431d7633c5a5d729e5b1e3
[ "Apache-2.0" ]
1
2020-06-26T14:41:01.000Z
2020-06-26T14:41:01.000Z
# -*- coding: utf-8 -*- # Copyright 2018-2019 Streamlit Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
35.368421
74
0.75
1d8165dfeaf6305f86cf6f79a62f333d9a538973
4,751
py
Python
tests/implementations/BinaryNet/function_test.py
Enderdead/BinaryConnect_PyTorch
990e970b1fbd299ff88200db21a9cc3fe44706d3
[ "MIT" ]
75
2019-03-19T07:36:56.000Z
2021-12-23T02:34:59.000Z
tests/implementations/BinaryNet/function_test.py
Enderdead/BinaryConnect_PyTorch
990e970b1fbd299ff88200db21a9cc3fe44706d3
[ "MIT" ]
10
2019-03-19T21:16:56.000Z
2019-04-16T15:05:37.000Z
tests/implementations/BinaryNet/function_test.py
Enderdead/BinaryConnect_PyTorch
990e970b1fbd299ff88200db21a9cc3fe44706d3
[ "MIT" ]
9
2019-08-12T10:33:55.000Z
2021-07-23T02:10:06.000Z
from QuantTorch.functions import binary_connect from .BinaryNet_pytorch.models import binarized_modules from QuantTorch.functions.common import safeSign import torch from math import copysign def sign(x): return copysign(1, x) def test_with_ref_det(): x_1 = torch.Tensor([1,0.5,-0.33]) x_2 = torch.Tensor(...
36.829457
139
0.68975
1d81d040f5bd0ad72e3c00fc1faaa27d6714aae0
7,707
py
Python
vital/bindings/python/vital/types/feature.py
dstoup/kwiver
a3a36317b446baf0feb6274235ab1ac6b4329ead
[ "BSD-3-Clause" ]
1
2017-07-31T07:07:32.000Z
2017-07-31T07:07:32.000Z
vital/bindings/python/vital/types/feature.py
dstoup/kwiver
a3a36317b446baf0feb6274235ab1ac6b4329ead
[ "BSD-3-Clause" ]
3
2021-03-19T15:39:43.000Z
2021-09-08T02:47:15.000Z
vital/bindings/python/vital/types/feature.py
acidburn0zzz/kwiver
6e4205f1c46df04759c57c040f01cc804b27e00d
[ "BSD-3-Clause" ]
null
null
null
""" ckwg +31 Copyright 2016 by Kitware, 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: * Redistributions of source code must retain the above copyright notice, this list of conditions and the ...
31.457143
79
0.595043
1d81f429f0962252ff1629c00268156f66adedd1
807
py
Python
continuous_integration/show-python-packages-versions.py
johnbanq/modl
dcabb6b4793db57b858221a1c184741255b6396d
[ "BSD-2-Clause" ]
135
2016-05-04T01:52:44.000Z
2022-03-01T18:38:13.000Z
continuous_integration/show-python-packages-versions.py
johnbanq/modl
dcabb6b4793db57b858221a1c184741255b6396d
[ "BSD-2-Clause" ]
20
2016-06-03T12:53:27.000Z
2020-05-12T22:35:52.000Z
continuous_integration/show-python-packages-versions.py
johnbanq/modl
dcabb6b4793db57b858221a1c184741255b6396d
[ "BSD-2-Clause" ]
49
2016-05-09T02:48:04.000Z
2022-03-01T18:40:55.000Z
import sys DEPENDENCIES = ['numpy', 'scipy', 'sklearn', 'matplotlib', 'nibabel', 'nilearn'] def print_package_version(package_name, indent=' '): try: package = __import__(package_name) version = getattr(package, '__version__', None) package_file = getattr(package, '__file...
29.888889
70
0.635688
1d81f6a0a46df4bd1dc85241cb19ceccd6098106
1,750
py
Python
tests/app/questionnaire/test_routing_path.py
ons-eq-team/eq-questionnaire-runner
8d029097faa2b9d53d9621064243620db60c62c7
[ "MIT" ]
null
null
null
tests/app/questionnaire/test_routing_path.py
ons-eq-team/eq-questionnaire-runner
8d029097faa2b9d53d9621064243620db60c62c7
[ "MIT" ]
null
null
null
tests/app/questionnaire/test_routing_path.py
ons-eq-team/eq-questionnaire-runner
8d029097faa2b9d53d9621064243620db60c62c7
[ "MIT" ]
null
null
null
from unittest import TestCase from app.questionnaire.routing_path import RoutingPath class TestRouter(TestCase): def setUp(self): self.block_ids = ["block-a", "block-b", "block-c", "block-b", "block-c"] self.section_id = "section-1" self.list_item_id = "list_item_id" self.list_name...
34.313725
80
0.678857
1d82062a168eca78339226a032dcd624b861a592
13,244
py
Python
libical/libical-1.0/src/python/test.py
imx6uldev/depedency_tools
0748392a4e97ded2a770b6fbcab281dd3fda2db7
[ "MIT" ]
null
null
null
libical/libical-1.0/src/python/test.py
imx6uldev/depedency_tools
0748392a4e97ded2a770b6fbcab281dd3fda2db7
[ "MIT" ]
null
null
null
libical/libical-1.0/src/python/test.py
imx6uldev/depedency_tools
0748392a4e97ded2a770b6fbcab281dd3fda2db7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- Mode: python -*- #====================================================================== # FILE: test.py # CREATOR: eric # # DESCRIPTION: # # # $Id: test.py,v 1.24 2002-10-24 13:44:31 acampi Exp $ # $Locker: $ # # (C) COPYRIGHT 2001, Eric Busboom <eric@softwarestudio.org> # (C) COPYR...
21.818781
361
0.602537
1d821887b0bb5a03a67d41b6ea870a73326a91b2
10,767
py
Python
tools/update_ocp_versions.py
djzager/assisted-installer-deployment
0c1d54c3af84dab0f061ed49595311918ce0768e
[ "Apache-2.0" ]
null
null
null
tools/update_ocp_versions.py
djzager/assisted-installer-deployment
0c1d54c3af84dab0f061ed49595311918ce0768e
[ "Apache-2.0" ]
null
null
null
tools/update_ocp_versions.py
djzager/assisted-installer-deployment
0c1d54c3af84dab0f061ed49595311918ce0768e
[ "Apache-2.0" ]
null
null
null
import os import re import json import yaml import time import copy import logging import argparse import tempfile import functools import subprocess from bs4 import BeautifulSoup from distutils.version import LooseVersion import jira import github import gitlab import jenkins import requests import ruamel.yaml logg...
41.09542
164
0.740411
1d82404df2aa2998f7d01cb02999bbf923d711a7
3,332
py
Python
src/zeit/content/cp/blocks/block.py
ZeitOnline/zeit.content.cp
ee1dbc34e385e47a5c52eabbe01cdae2df09bd76
[ "BSD-3-Clause" ]
null
null
null
src/zeit/content/cp/blocks/block.py
ZeitOnline/zeit.content.cp
ee1dbc34e385e47a5c52eabbe01cdae2df09bd76
[ "BSD-3-Clause" ]
11
2015-04-16T14:15:08.000Z
2019-02-01T13:23:17.000Z
src/zeit/content/cp/blocks/block.py
ZeitOnline/zeit.content.cp
ee1dbc34e385e47a5c52eabbe01cdae2df09bd76
[ "BSD-3-Clause" ]
1
2015-12-03T14:58:26.000Z
2015-12-03T14:58:26.000Z
import copy import grokcore.component as grok import zeit.cms.content.property import zeit.content.cp.interfaces import zeit.edit.block import zeit.edit.interfaces import zope.component import zope.interface @zope.interface.implementer(zeit.content.cp.interfaces.ICenterPage) @zope.component.adapter(zeit.edit.interfac...
33.32
77
0.718487
1d82547ce91a04536998daa3b611c9aa5ff11131
10,464
py
Python
preprocessing.py
alifkurniawan/tesis
6330dba32f5dc12785e956875c94d83344d788a8
[ "MIT" ]
null
null
null
preprocessing.py
alifkurniawan/tesis
6330dba32f5dc12785e956875c94d83344d788a8
[ "MIT" ]
3
2022-01-13T03:13:37.000Z
2022-03-12T00:48:18.000Z
preprocessing.py
alifkurniawan/tesis
6330dba32f5dc12785e956875c94d83344d788a8
[ "MIT" ]
null
null
null
""" This file is part of the OpenProtein project. For license information, please see the LICENSE file in the root directory. """ import glob import os.path import os import platform import numpy as np import h5py import torch from util import calculate_dihedral_angles_over_minibatch, \ get_backbone_positions_fro...
43.966387
108
0.622802
1d8256c455c0f6899a634e168e3499fcb3f590ad
5,119
py
Python
frederic/cat_data_generator.py
zylamarek/frederic
69fee52e173803443aa4fe8b76a4b88882b1aac6
[ "MIT" ]
7
2019-11-05T19:21:36.000Z
2021-12-07T12:11:03.000Z
frederic/cat_data_generator.py
zylamarek/frederic
69fee52e173803443aa4fe8b76a4b88882b1aac6
[ "MIT" ]
6
2020-12-03T12:36:46.000Z
2022-03-12T00:03:26.000Z
frederic/cat_data_generator.py
zylamarek/frederic
69fee52e173803443aa4fe8b76a4b88882b1aac6
[ "MIT" ]
1
2021-12-02T19:38:41.000Z
2021-12-02T19:38:41.000Z
import numpy as np import keras from keras.applications import mobilenet_v2 import os import frederic.utils.general import frederic.utils.image import frederic.utils.sampling class CatDataGenerator(keras.utils.Sequence): def __init__(self, path, output_type, include_landmarks=False, batch_size=64, shuffle=True, ...
43.752137
118
0.617699
1d8276b91260abecd2697f31ae99d75f84ea8784
884
py
Python
highest_and_lowest/test_highest_and_lowest.py
guilhermegouw/codewars
8ad98bb661c9b47b9d9683df07cd9672ff80731c
[ "MIT" ]
null
null
null
highest_and_lowest/test_highest_and_lowest.py
guilhermegouw/codewars
8ad98bb661c9b47b9d9683df07cd9672ff80731c
[ "MIT" ]
null
null
null
highest_and_lowest/test_highest_and_lowest.py
guilhermegouw/codewars
8ad98bb661c9b47b9d9683df07cd9672ff80731c
[ "MIT" ]
null
null
null
from highest_and_lowest.highest_and_lowest import high_and_low def test_high_and_low_string_of_positives(): output = high_and_low("1 2 3 4 5") assert output == "5 1" def test_high_and_low_string_of_positives_and_negatives(): output = high_and_low("1 -2 3 -4 5") assert output == "5 -4" def test_hig...
30.482759
85
0.671946
1d82ba1485b90a6e712d0a3f2e9f67ac8275c62d
2,336
py
Python
tests/st/ops/ascend/vector/test_rsqrt_grad_001.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
286
2020-06-23T06:40:44.000Z
2022-03-30T01:27:49.000Z
tests/st/ops/ascend/vector/test_rsqrt_grad_001.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
10
2020-07-31T03:26:59.000Z
2021-12-27T15:00:54.000Z
tests/st/ops/ascend/vector/test_rsqrt_grad_001.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
30
2020-07-17T01:04:14.000Z
2021-12-27T14:05:19.000Z
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
32.444444
121
0.637842
1d82d9a0665ea1063de2b356ba20dc1774ca7ce1
1,753
py
Python
E 2015-2016/March 17/RCalc_Multiple_cond_conv.py
bnajafi/Python4ScientificComputing_Fundamentals
7c943404654d9c44920ea9a7fdee28bc99ad8d05
[ "MIT" ]
65
2017-01-19T08:03:38.000Z
2021-04-02T17:41:43.000Z
E 2015-2016/March 17/RCalc_Multiple_cond_conv.py
bnajafi/Python4ScientificComputing_Fundamentals
7c943404654d9c44920ea9a7fdee28bc99ad8d05
[ "MIT" ]
null
null
null
E 2015-2016/March 17/RCalc_Multiple_cond_conv.py
bnajafi/Python4ScientificComputing_Fundamentals
7c943404654d9c44920ea9a7fdee28bc99ad8d05
[ "MIT" ]
110
2017-01-19T08:04:14.000Z
2020-07-23T13:44:52.000Z
A_string=raw_input("Please enter the area of the wall (in m2): ") A=float(A_string) NumberOfResistances_string=raw_input("Please enter number of resistances: ") NumberOfResistances=float(NumberOfResistances_string) ResistanceNumber=1 R_tot=0 while ResistanceNumber<=NumberOfResistances: print("\n \n \n Resistance Nu...
50.085714
101
0.681118
1d82eca70ec4e4229abfdc87dc88657ac7b7c130
2,174
py
Python
src/vivarium_gates_iv_iron/constants/data_values.py
ihmeuw/vivarium_gates_iv_iron
2d22ef63101a49b8c825884537c6fc79d559ba09
[ "BSD-3-Clause" ]
null
null
null
src/vivarium_gates_iv_iron/constants/data_values.py
ihmeuw/vivarium_gates_iv_iron
2d22ef63101a49b8c825884537c6fc79d559ba09
[ "BSD-3-Clause" ]
1
2022-02-16T21:15:26.000Z
2022-02-16T21:15:26.000Z
src/vivarium_gates_iv_iron/constants/data_values.py
ihmeuw/vivarium_gates_iv_iron
2d22ef63101a49b8c825884537c6fc79d559ba09
[ "BSD-3-Clause" ]
null
null
null
import pandas as pd import numpy as np from typing import NamedTuple from vivarium_gates_iv_iron.constants import models TOTAL_POSTPARTUM_DAYS = 42 PREPOSTPARTUM_DURATION_DAYS = 7 POSTPARTUM_DURATION_DAYS = TOTAL_POSTPARTUM_DAYS - PREPOSTPARTUM_DURATION_DAYS PREPOSTPARTUM_DURATION_RATIO = PREPOSTPARTUM_DURATION_DAYS ...
43.48
110
0.681693
1d82eee4efae190cc2e61c24086fb7c95e2bd207
77,161
py
Python
examples/doc_vp_archived/modeling_bert.py
yumoxu/pytorch-transformers
4184e261873aa63c92607f073697fb68385f6739
[ "Apache-2.0" ]
null
null
null
examples/doc_vp_archived/modeling_bert.py
yumoxu/pytorch-transformers
4184e261873aa63c92607f073697fb68385f6739
[ "Apache-2.0" ]
null
null
null
examples/doc_vp_archived/modeling_bert.py
yumoxu/pytorch-transformers
4184e261873aa63c92607f073697fb68385f6739
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
54.338732
187
0.673164
1d8302836f13d5d74a2d933e223b9c1d7d007359
798
py
Python
components/page-analyzer/src/services/confusion_matrix.py
sfahad1414/AGENT
84069edc96b6190bb03ffd5099cbc8966061a563
[ "Apache-2.0" ]
15
2020-05-06T16:17:56.000Z
2022-03-30T12:25:16.000Z
components/page-analyzer/src/services/confusion_matrix.py
dionny/AGENT
8a833406b590e23623fcc67db99f6f964d002396
[ "Apache-2.0" ]
2
2021-08-25T16:17:16.000Z
2022-02-10T06:35:58.000Z
components/page-analyzer/src/services/confusion_matrix.py
dionny/AGENT
8a833406b590e23623fcc67db99f6f964d002396
[ "Apache-2.0" ]
7
2020-04-07T18:47:55.000Z
2022-03-30T12:14:58.000Z
"""Pretty-prints a confusion matrix.""" def print_cm(cm, labels): """ Pretty-prints a confusion matrix. :param cm: The confusion matrix. :param labels: A list of labels to map classification indices to human-readable labels. """ print("Confusion Matrix") column_width = max([len(x) for x in ...
27.517241
91
0.580201
1d8318427e13b68e0f97effa41f0d110a93feb60
2,327
py
Python
api/resources/main.py
phucty/mtab_dev
1334b65f77454b7188e1a80d42c5cbc123799edd
[ "MIT" ]
null
null
null
api/resources/main.py
phucty/mtab_dev
1334b65f77454b7188e1a80d42c5cbc123799edd
[ "MIT" ]
null
null
null
api/resources/main.py
phucty/mtab_dev
1334b65f77454b7188e1a80d42c5cbc123799edd
[ "MIT" ]
null
null
null
from datetime import timedelta from time import time from api import m_f from api.lookup.m_entity_bm25 import ESearch from api.resources.m_wikigraph import WikidataGraph from api.resources.m_item import MItem from api.resources.m_item_labels import MEntityLabels from api.resources.m_mapping_id import MappingID from ap...
28.378049
121
0.7052
1d8321f11221e6a6c4f1e8cc582dd10c9df3b754
1,356
py
Python
everbug/utils/queries.py
everhide/everbug
72da1372510a2116e45c23da934a40dca1f4dbd5
[ "MIT" ]
182
2018-06-15T07:07:11.000Z
2021-06-15T21:53:58.000Z
everbug/utils/queries.py
everhide/everbug
72da1372510a2116e45c23da934a40dca1f4dbd5
[ "MIT" ]
7
2018-06-15T07:03:58.000Z
2018-09-13T08:43:19.000Z
everbug/utils/queries.py
everhide/everbug
72da1372510a2116e45c23da934a40dca1f4dbd5
[ "MIT" ]
3
2018-06-15T20:44:51.000Z
2018-09-12T19:05:39.000Z
from django.db import connections from django.db.utils import OperationalError def wrap_queries(): """ Wraps queries with their explains For example: {alias: [list of queries with explains], ...} List of queries like: [{'time': ..., 'explain': ..., 'sql': ...}, ...] :return: (None or dict) """ ...
35.684211
74
0.605457
1d8322ce105adb14b251b05ae04aeb64a8db40e5
2,827
py
Python
totter/bin/combine_trials.py
zachdj/totter
7ac9fe0302e1a499a661b11b771df22dd7bf5aad
[ "MIT" ]
null
null
null
totter/bin/combine_trials.py
zachdj/totter
7ac9fe0302e1a499a661b11b771df22dd7bf5aad
[ "MIT" ]
8
2018-11-08T01:11:50.000Z
2018-11-27T03:30:19.000Z
totter/bin/combine_trials.py
zachdj/totter
7ac9fe0302e1a499a661b11b771df22dd7bf5aad
[ "MIT" ]
null
null
null
import pathlib import json import statistics import os import matplotlib.pyplot as plt from totter.evolution.Experiment import plot as plot_history def get_immediate_subdirectories(a_dir): return [name for name in os.listdir(a_dir) if os.path.isdir(os.path.join(a_dir, name))] def combine_trials(exp...
34.060241
85
0.654404
1d8328f3f7fc63d574f8b1f43b8301c5d1561d88
107,496
py
Python
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/_models_py3.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-01-24T08:54:57.000Z
2022-01-24T08:54:57.000Z
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/_models_py3.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/_models_py3.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
43.520648
290
0.682035
1d83376c741d37694e483fe9f949fed3756e18b4
8,033
py
Python
dragons/helpers/functions/functions.py
TeamDragons/Dragons-Userbot
e40584f4dc898b785523adea4519ffb412dc92c4
[ "MIT" ]
3
2021-08-11T08:33:39.000Z
2022-01-17T00:09:11.000Z
dragons/helpers/functions/functions.py
sophiashirashaki/Dragons-Userbot
2255c18428e488a267eaec1ec8c081fabcde167a
[ "MIT" ]
null
null
null
dragons/helpers/functions/functions.py
sophiashirashaki/Dragons-Userbot
2255c18428e488a267eaec1ec8c081fabcde167a
[ "MIT" ]
6
2021-08-14T08:20:41.000Z
2022-03-20T02:31:45.000Z
import os import zipfile from random import choice from textwrap import wrap from uuid import uuid4 import requests from ..utils.extdl import install_pip try: from imdb import IMDb except ModuleNotFoundError: install_pip("IMDbPY") from imdb import IMDb from PIL import Image, ImageColor, ImageDraw, Image...
28.587189
160
0.57575
1d8361ebe542e49b3ed0afb44bd4d6bc7c22e6b8
5,777
py
Python
tests/test_crossdock.py
jaegertracing/jaeger-client-python
a6c973158bf9b02cd7f5a966ccfd29ab86c44a5b
[ "Apache-2.0" ]
372
2017-10-31T21:51:26.000Z
2022-03-23T10:36:19.000Z
tests/test_crossdock.py
jaegertracing/jaeger-client-python
a6c973158bf9b02cd7f5a966ccfd29ab86c44a5b
[ "Apache-2.0" ]
276
2017-10-10T11:33:50.000Z
2022-03-24T16:36:16.000Z
tests/test_crossdock.py
jaegertracing/jaeger-client-python
a6c973158bf9b02cd7f5a966ccfd29ab86c44a5b
[ "Apache-2.0" ]
157
2017-10-09T07:16:41.000Z
2021-12-29T14:49:26.000Z
# Copyright (c) 2016-2018 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
31.917127
93
0.680976
1d837535968b9eee4e6d0a72b632c6fafae6558a
4,915
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_resource_skus_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2021-09-07T18:39:05.000Z
2021-09-07T18:39:05.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_resource_skus_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_resource_skus_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
43.883929
133
0.671007
1d8385bcc10c8b07c9c09f846d46472cecf36e42
6,726
py
Python
Interface.py
pingryiRT/DistributedNetwork
de0394faf8cd8348ef118868a8b4ba8e07900eeb
[ "Unlicense" ]
null
null
null
Interface.py
pingryiRT/DistributedNetwork
de0394faf8cd8348ef118868a8b4ba8e07900eeb
[ "Unlicense" ]
1
2017-10-30T02:34:10.000Z
2017-10-30T02:34:10.000Z
Interface.py
pingryiRT/DistributedNetwork
de0394faf8cd8348ef118868a8b4ba8e07900eeb
[ "Unlicense" ]
null
null
null
from P2PPlatform import Network from P2PPlatform import Peer import socket import subprocess class Interface(object): def __init__(self, tagDict, network = None): self.network = network self.tagDict = tagDict self.receivingCode = False def run(self): ######### ## TODO add in something to allow che...
29.116883
144
0.659084
1d83bf9b4a214c7027a6de969c50165e2221bd85
4,028
py
Python
alipay/aop/api/request/AlipayCommerceOperationIsvQrcodeUnbindRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/request/AlipayCommerceOperationIsvQrcodeUnbindRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/request/AlipayCommerceOperationIsvQrcodeUnbindRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayCommerceOperationIsvQrcodeUnbindModel import AlipayCommerceOperationIsvQrcodeUnbindModel class AlipayCommerceOperationIsvQrcod...
27.77931
148
0.649454
1d83ee8f24f6c837b16385f8b29e07029c7496d0
13,444
py
Python
sumoProject/SAC/model.py
szkLaszlo/RLHighWay
2ea752265bc89618e736089475cb4706ead8fe92
[ "MIT" ]
1
2021-08-29T09:12:29.000Z
2021-08-29T09:12:29.000Z
sumoProject/SAC/model.py
szkLaszlo/RLHighWay
2ea752265bc89618e736089475cb4706ead8fe92
[ "MIT" ]
null
null
null
sumoProject/SAC/model.py
szkLaszlo/RLHighWay
2ea752265bc89618e736089475cb4706ead8fe92
[ "MIT" ]
null
null
null
import platform import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions import Normal LOG_SIG_MAX = 2 LOG_SIG_MIN = -20 epsilon = 1e-6 # Initialize Policy weights def weights_init_(m): if isinstance(m, nn.Linear): torch.nn.init.xavier_uniform_(m.weight, gain=1) ...
40.251497
130
0.630542
1d83fae06c9a3efb82041c6fe97d66e04755c94f
3,271
py
Python
barry/precompute_mpi.py
minaskar/Barry
ee9417e6464c13a23cce6982ad8bf650f013c5b2
[ "MIT" ]
2
2019-12-05T11:17:35.000Z
2020-02-17T22:50:45.000Z
barry/precompute_mpi.py
minaskar/Barry
ee9417e6464c13a23cce6982ad8bf650f013c5b2
[ "MIT" ]
null
null
null
barry/precompute_mpi.py
minaskar/Barry
ee9417e6464c13a23cce6982ad8bf650f013c5b2
[ "MIT" ]
null
null
null
import sys import logging import argparse import numpy as np sys.path.append("..") from barry.models import Model from tests.utils import get_concrete if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG, format="[%(levelname)7s |%(funcName)15s] %(message)s") # Set up command line arguments ...
38.034884
150
0.636197
1d8400cfa4ce48cea5ad3bb21e2eaf9aae751c4a
9,077
py
Python
devops/restart_infrastructure.py
mserrano-dev/DevOps
dcd801160ce3d51c47794d67885057d7d715697c
[ "Apache-2.0" ]
null
null
null
devops/restart_infrastructure.py
mserrano-dev/DevOps
dcd801160ce3d51c47794d67885057d7d715697c
[ "Apache-2.0" ]
null
null
null
devops/restart_infrastructure.py
mserrano-dev/DevOps
dcd801160ce3d51c47794d67885057d7d715697c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import argparse from infrastructure import cloud_storage from infrastructure import dns_server from infrastructure import platform_aws as provider from infrastructure import settings as helper import json import os import re import sys from termcolor import colored from util import date from util impo...
43.430622
125
0.651647
1d841e5a72cd35498c590c9035921a293acd07f1
1,334
py
Python
m2-modified/ims/common/agentless-system-crawler/crawler/plugins/emitters/mtgraphite_emitter.py
CCI-MOC/ABMI
955c12ae9d2dc7afe7323f6c25f2af120f5b281a
[ "Apache-2.0" ]
108
2015-07-21T10:40:36.000Z
2021-07-01T06:54:51.000Z
m2-modified/ims/common/agentless-system-crawler/crawler/plugins/emitters/mtgraphite_emitter.py
CCI-MOC/ABMI
955c12ae9d2dc7afe7323f6c25f2af120f5b281a
[ "Apache-2.0" ]
320
2015-07-21T01:33:20.000Z
2020-07-21T15:57:02.000Z
m2-modified/ims/common/agentless-system-crawler/crawler/plugins/emitters/mtgraphite_emitter.py
CCI-MOC/ABMI
955c12ae9d2dc7afe7323f6c25f2af120f5b281a
[ "Apache-2.0" ]
61
2015-07-20T18:26:37.000Z
2021-03-17T01:18:54.000Z
import logging from iemit_plugin import IEmitter from utils.mtgraphite import MTGraphiteClient from formatters import write_in_graphite_format from utils.crawler_exceptions import EmitterUnsupportedFormat logger = logging.getLogger('crawlutils') class MtGraphiteEmitter(IEmitter): def get_emitter_protocol(self)...
30.318182
77
0.667166
1d842d39785e61bd0c7e580c7490c804ba86960e
2,167
py
Python
python/cuXfilter/charts/core/non_aggregate/core_scatter_geo.py
AjayThorve/cuxfilter
537ff67de80439a43e0bad7373558f5e25dcb112
[ "Apache-2.0" ]
2
2019-03-06T02:10:05.000Z
2020-05-06T06:33:02.000Z
python/cuXfilter/charts/core/non_aggregate/core_scatter_geo.py
AjayThorve/cuxfilter
537ff67de80439a43e0bad7373558f5e25dcb112
[ "Apache-2.0" ]
null
null
null
python/cuXfilter/charts/core/non_aggregate/core_scatter_geo.py
AjayThorve/cuxfilter
537ff67de80439a43e0bad7373558f5e25dcb112
[ "Apache-2.0" ]
null
null
null
from typing import Type, Dict, Tuple import numpy as np from .core_non_aggregate import BaseNonAggregate from ....layouts import chart_view class BaseScatterGeo(BaseNonAggregate): ''' No datatiles support in scatter plot charts If dataset size is greater than a few thousand points, scatter geos c...
33.859375
337
0.610983
1d842fc3bcfdd832ccb36ccc280a540b44353fc7
10,051
py
Python
ib_insync/objects.py
drathm/fork_ib_insync
e4c378b62b2627b752df994274341b45b4db70da
[ "BSD-2-Clause" ]
1
2018-08-05T01:51:46.000Z
2018-08-05T01:51:46.000Z
ib_insync/objects.py
jseparovic/ib_insync
fc85fb0181b358115fdae86ab16dceb9dc3590bd
[ "BSD-2-Clause" ]
null
null
null
ib_insync/objects.py
jseparovic/ib_insync
fc85fb0181b358115fdae86ab16dceb9dc3590bd
[ "BSD-2-Clause" ]
null
null
null
from collections import namedtuple import ibapi.scanner import ibapi.contract import ibapi.common import ibapi.order import ibapi.order_state import ibapi.softdollartier import ibapi.execution import ibapi.commission_report # order conditions are imported as-is from ibapi from ibapi.order_condition import (OrderCondi...
27.461749
79
0.684708
1d843b41b3e36cea7fb35b6d327bd0289daa5f7b
7,187
py
Python
tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-mysql-router-0/charm/hooks/relations/mysql-shared/requires.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
6
2021-10-01T19:46:14.000Z
2022-03-31T17:05:08.000Z
tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-mysql-router-0/charm/hooks/relations/mysql-shared/requires.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
111
2021-10-01T18:18:17.000Z
2022-03-29T12:23:20.000Z
tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-mysql-router-0/charm/hooks/relations/mysql-shared/requires.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
10
2021-09-29T14:47:54.000Z
2022-03-18T14:52:16.000Z
from charmhelpers.core import hookenv from charms.reactive import RelationBase from charms.reactive import hook from charms.reactive import scopes class MySQLSharedRequires(RelationBase): scope = scopes.GLOBAL # These remote data fields will be automatically mapped to accessors # with a basic documentati...
33.584112
79
0.572144
1d849367618836331f595de8722e20ddbca13264
12,047
py
Python
aiorq/connections.py
PY-GZKY/aiorq
23080b8098438d58ee3c736789452b8a55a7946e
[ "MIT" ]
6
2021-11-16T04:07:48.000Z
2022-03-18T09:15:09.000Z
aiorq/connections.py
PY-GZKY/aiorq
23080b8098438d58ee3c736789452b8a55a7946e
[ "MIT" ]
null
null
null
aiorq/connections.py
PY-GZKY/aiorq
23080b8098438d58ee3c736789452b8a55a7946e
[ "MIT" ]
null
null
null
import asyncio import functools import json import logging import ssl from dataclasses import dataclass from datetime import datetime, timedelta from operator import attrgetter from typing import Any, Callable, Generator, List, Optional, Tuple, Union, Dict from urllib.parse import urlparse from uuid import uuid4 from ...
35.328446
117
0.630198
1d84a49d1f44ac7eadd4abe1f9deec3ff93cadb1
846
py
Python
contenido/tests/HU024_test.py
slinan/badSmellsAnalisis
0a5f20ed9538181c1219a4c053b952ac5dcbc3a8
[ "MIT" ]
null
null
null
contenido/tests/HU024_test.py
slinan/badSmellsAnalisis
0a5f20ed9538181c1219a4c053b952ac5dcbc3a8
[ "MIT" ]
null
null
null
contenido/tests/HU024_test.py
slinan/badSmellsAnalisis
0a5f20ed9538181c1219a4c053b952ac5dcbc3a8
[ "MIT" ]
null
null
null
from django.test import TestCase from django.test import Client from contenido.models import Audio # Create your tests here. class SendNotificationLikeTest(TestCase): def setUp(self): # Every test needs access to the request factory. audio = Audio() audio.nom_audio = "song1" audi...
30.214286
63
0.648936
1d84b2309e7dac112d3a33d04ba463e93b5505ac
1,870
py
Python
plugins/lucky.py
ItzSjDude/PikaBotPlugins
6b468a43caefbea5b8f3cd2c1ca83790380e1f5b
[ "Apache-2.0" ]
1
2020-10-29T15:44:57.000Z
2020-10-29T15:44:57.000Z
plugins/lucky.py
ItzSjDude/PikaBotPlugins
6b468a43caefbea5b8f3cd2c1ca83790380e1f5b
[ "Apache-2.0" ]
null
null
null
plugins/lucky.py
ItzSjDude/PikaBotPlugins
6b468a43caefbea5b8f3cd2c1ca83790380e1f5b
[ "Apache-2.0" ]
4
2020-10-28T09:02:35.000Z
2020-12-27T22:45:57.000Z
# plugin by lejend @pureindialover """Emoji Available Commands: .lucky""" import asyncio from uniborg.util import ItzSjDude @ItzSjDude(outgoing=True, pattern="lucky") async def _(event): if event.fwd_from: return animation_interval = 0.5 animation_ttl = range(0, 17) # input_str = eve...
33.392857
92
0.489305
1d84ba238f9d5f690441e8ff82c454ccafe50a53
1,195
py
Python
sdk/python/kfp/v2/compiler_cli_tests/test_data/pipeline_with_concat_placeholder.py
Iuiu1234/pipelines
1e032f550ce23cd40bfb6827b995248537b07d08
[ "Apache-2.0" ]
2,860
2018-05-24T04:55:01.000Z
2022-03-31T13:49:56.000Z
sdk/python/kfp/v2/compiler_cli_tests/test_data/pipeline_with_concat_placeholder.py
Iuiu1234/pipelines
1e032f550ce23cd40bfb6827b995248537b07d08
[ "Apache-2.0" ]
7,331
2018-05-16T09:03:26.000Z
2022-03-31T23:22:04.000Z
sdk/python/kfp/v2/compiler_cli_tests/test_data/pipeline_with_concat_placeholder.py
Iuiu1234/pipelines
1e032f550ce23cd40bfb6827b995248537b07d08
[ "Apache-2.0" ]
1,359
2018-05-15T11:05:41.000Z
2022-03-31T09:42:09.000Z
# Copyright 2020 The Kubeflow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
32.297297
74
0.753975
1d84c29f8abd25040283c5b53ad202b4968a68bc
5,444
py
Python
app/__init__.py
Sjors/patron
a496097ad0821b677c8e710e8aceb587928be31c
[ "MIT" ]
null
null
null
app/__init__.py
Sjors/patron
a496097ad0821b677c8e710e8aceb587928be31c
[ "MIT" ]
null
null
null
app/__init__.py
Sjors/patron
a496097ad0821b677c8e710e8aceb587928be31c
[ "MIT" ]
null
null
null
from config import Config from configparser import ConfigParser from copy import deepcopy from datetime import datetime, timedelta from flask import Flask, redirect, url_for from flask_admin import Admin, AdminIndexView, expose from flask_apscheduler import APScheduler from flask_blogging_patron import BloggingEngine, ...
32.213018
79
0.686076
1d84c44030b64eeae88e083b8c6878c748362eac
1,013
py
Python
src/queries/host.py
alexr17/nlp-golden-globes
c0929b62e351a69c3a0319c00558b9c06fbcdb6a
[ "MIT" ]
1
2019-02-13T05:52:06.000Z
2019-02-13T05:52:06.000Z
src/queries/host.py
alexr17/nlp-golden-globes
c0929b62e351a69c3a0319c00558b9c06fbcdb6a
[ "MIT" ]
null
null
null
src/queries/host.py
alexr17/nlp-golden-globes
c0929b62e351a69c3a0319c00558b9c06fbcdb6a
[ "MIT" ]
1
2020-02-11T05:30:14.000Z
2020-02-11T05:30:14.000Z
import nltk from src.helpers.load import load_json from src.helpers.clean import valid_tkn, bigrams from src.helpers.find import find_host_names # golden globes stopwords gg_sw = ['golden', 'globes', 'goldenglobes', 'globe'] # host stopwords host_sw = ['next', 'year', 'host', 'hosts'] # host keywords host_kw = [] d...
28.942857
89
0.587364
1d84e5fe0c28fd59d8f3cd2622df6b1fa4419cc2
11,334
py
Python
metalibm_core/core/precisions.py
nibrunie/metalibm
776b044f5f323ef907a8724d9ce9a27a482f6cc5
[ "MIT" ]
2
2019-02-18T13:42:04.000Z
2021-03-12T18:54:53.000Z
metalibm_core/core/precisions.py
nibrunie/metalibm
776b044f5f323ef907a8724d9ce9a27a482f6cc5
[ "MIT" ]
null
null
null
metalibm_core/core/precisions.py
nibrunie/metalibm
776b044f5f323ef907a8724d9ce9a27a482f6cc5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################### # This file is part of metalibm (https://github.com/kalray/metalibm) ############################################################################### # MIT License # # Copyright (c) 2018 Kalray # # Permission is here...
45.88664
145
0.702135
1d84e90e48f39ec729194b04f27a7228325eac62
1,456
py
Python
examples/VideoThumbnailsEdge.py
pasha-r/facebook-python-ads-sdk
76feadd77baed839516b53297628e7a254c8c3c0
[ "CNRI-Python" ]
null
null
null
examples/VideoThumbnailsEdge.py
pasha-r/facebook-python-ads-sdk
76feadd77baed839516b53297628e7a254c8c3c0
[ "CNRI-Python" ]
null
null
null
examples/VideoThumbnailsEdge.py
pasha-r/facebook-python-ads-sdk
76feadd77baed839516b53297628e7a254c8c3c0
[ "CNRI-Python" ]
1
2018-09-24T14:04:48.000Z
2018-09-24T14:04:48.000Z
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
38.315789
76
0.783654
1d85007fb9ca180d78afd9326f4594e019f263b7
1,625
py
Python
d04/a2.py
nikosgraser/aoc-2020
f6b197eca161028f3e62cebc1b8e756898d545f5
[ "0BSD" ]
null
null
null
d04/a2.py
nikosgraser/aoc-2020
f6b197eca161028f3e62cebc1b8e756898d545f5
[ "0BSD" ]
null
null
null
d04/a2.py
nikosgraser/aoc-2020
f6b197eca161028f3e62cebc1b8e756898d545f5
[ "0BSD" ]
null
null
null
import re with open('input', 'r') as fd: lines = list(map(lambda x: x.strip(), fd.readlines())) + [''] REQUIRED_FIELDS = {'byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid'} def validate_required_fields(fields: dict) -> bool: if not set(fields.keys()) >= REQUIRED_FIELDS: return False byr, iyr, eyr,...
32.5
101
0.542154
1d8506510fede645b55585b9de0ec8ee7f3091fe
410
py
Python
src/oscar/apps/search/features.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
src/oscar/apps/search/features.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
5
2021-05-28T19:38:28.000Z
2022-03-12T00:45:39.000Z
src/oscar/apps/search/features.py
Jean1508/ya-madoa
1ffb1d11e15bf33e4c3a09698675a4357e887eaa
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings def is_solr_supported(): try: return 'Solr' in settings.HAYSTACK_CONNECTIONS['default']['ENGINE'] except (KeyError, AttributeError): return False def is_elasticsearch_supported(): try: return 'Elasticsearch' in settings.HAYSTACK_CONNEC...
25.625
85
0.673171
1d85081dbc86abbb36eef84e55f6dd436ff0c2e4
684
py
Python
setup.py
anubhavcodes/pytrello
4fbf4e9e70a6e65855c3555f282164a132b39094
[ "MIT" ]
null
null
null
setup.py
anubhavcodes/pytrello
4fbf4e9e70a6e65855c3555f282164a132b39094
[ "MIT" ]
7
2017-10-11T05:45:18.000Z
2018-08-26T18:53:34.000Z
setup.py
anubhavcodes/pytrello
4fbf4e9e70a6e65855c3555f282164a132b39094
[ "MIT" ]
1
2019-05-06T10:45:16.000Z
2019-05-06T10:45:16.000Z
from setuptools import setup, find_packages import pathlib HERE = pathlib.Path(__file__).parent README = (HERE / "README.md").read_text() setup( name="python_trello", version="0.0.4", description="A simple library for easily creating and updating Trello cards.", long_description=README, long_desc...
26.307692
82
0.694444
1d850c681865a7a4fb4c54b309e4e93ee5ff79e6
2,067
py
Python
pandas_ta/trend/qstick.py
MyBourse/pandas-ta
5998e92e39b71cd79a6e75d7c599492181af5f65
[ "MIT" ]
2
2021-03-30T01:23:14.000Z
2021-04-02T18:04:51.000Z
pandas_ta/trend/qstick.py
lukaszbinden/pandas-ta
98478f8bf049a4c8748d6f3c795f4f335ced05ca
[ "MIT" ]
null
null
null
pandas_ta/trend/qstick.py
lukaszbinden/pandas-ta
98478f8bf049a4c8748d6f3c795f4f335ced05ca
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from pandas_ta.overlap import dema, ema, hma, rma, sma from pandas_ta.utils import get_offset, non_zero_range, verify_series def qstick(open_, close, length=None, offset=None, **kwargs): """Indicator: Q Stick""" # Validate Arguments open_ = verify_series(open_) close = verify_s...
27.56
84
0.64925
1d8512d3ba0f35bc000e58936bd16d6cb08ae6bc
207
py
Python
esst/listener/__init__.py
etcher-be/esst
ac41cd0c07af8ca8532997f533756c529c9609a4
[ "MIT" ]
4
2018-06-24T14:03:44.000Z
2019-01-21T01:20:02.000Z
esst/listener/__init__.py
etcher-be/esst
ac41cd0c07af8ca8532997f533756c529c9609a4
[ "MIT" ]
106
2018-06-24T13:59:52.000Z
2019-11-26T09:05:14.000Z
esst/listener/__init__.py
theendsofinvention/esst
ac41cd0c07af8ca8532997f533756c529c9609a4
[ "MIT" ]
null
null
null
# coding=utf-8 """ Manages a UDP socket and does two things: 1. Retrieve incoming messages from DCS and update :py:class:`esst.core.status.status` 2. Sends command to the DCS application via the socket """
25.875
85
0.748792
1d8516229b46548d8b6159ef71c9eabf2faa636e
46
py
Python
jury/metrics/recall/__init__.py
Tiamat-Tech/jury
566ee2ec6b1a1a502f6e13b84f40274b51ef7d48
[ "MIT" ]
64
2021-07-16T08:37:45.000Z
2022-02-05T10:28:27.000Z
jury/metrics/recall/__init__.py
Tiamat-Tech/jury
566ee2ec6b1a1a502f6e13b84f40274b51ef7d48
[ "MIT" ]
46
2021-07-14T22:41:56.000Z
2022-03-21T07:51:52.000Z
jury/metrics/recall/__init__.py
Tiamat-Tech/jury
566ee2ec6b1a1a502f6e13b84f40274b51ef7d48
[ "MIT" ]
9
2021-07-15T21:19:06.000Z
2022-03-17T21:46:15.000Z
from jury.metrics.recall.recall import Recall
23
45
0.847826
1d853ed95e538a4d3f71c41d4b43e633e1bc40ab
24,658
py
Python
crab/metrics/pairwise.py
larsmans/crab
92947092aa64a72de960782f64d2f526693c0ad3
[ "BSD-3-Clause" ]
null
null
null
crab/metrics/pairwise.py
larsmans/crab
92947092aa64a72de960782f64d2f526693c0ad3
[ "BSD-3-Clause" ]
null
null
null
crab/metrics/pairwise.py
larsmans/crab
92947092aa64a72de960782f64d2f526693c0ad3
[ "BSD-3-Clause" ]
1
2019-12-02T03:20:43.000Z
2019-12-02T03:20:43.000Z
#-*- coding:utf-8 -*- """Utilities to evaluate pairwise distances or metrics between 2 sets of points. Distance metrics are a function d(a, b) such that d(a, b) < d(a, c) if objects a and b are considered "more similar" to objects a and c. Two objects exactly alike would have a distance of zero. One of the most popul...
32.877333
119
0.604712
1d8549476e9023b57d7aa38c21031a9afc9f9a59
9,850
py
Python
src/app.py
aysenurbilgin/tilt_api
24e3a31ed331d0ae5f98e4dcb3b0b4d0ab3220ae
[ "Apache-2.0" ]
1
2021-01-20T11:10:55.000Z
2021-01-20T11:10:55.000Z
src/app.py
aysenurbilgin/tilt_api
24e3a31ed331d0ae5f98e4dcb3b0b4d0ab3220ae
[ "Apache-2.0" ]
null
null
null
src/app.py
aysenurbilgin/tilt_api
24e3a31ed331d0ae5f98e4dcb3b0b4d0ab3220ae
[ "Apache-2.0" ]
null
null
null
import json from flask_cors import CORS from flask import ( Flask, request, jsonify, abort ) from src.common.database import Database from src.celery_tasks.tasks import run_exp, del_exp, vis_asp_sem_dist, vis_sem_track, vis_sentiment from src.models.configurations.configuration import Configuration imp...
38.326848
121
0.654112
1d854a7af2f342fe5b70afce9442867547e20bb5
10,731
py
Python
furnace/engine/dist_test.py
fywalter/TorchSeg
729eb22d8c5d607466055552fd82e0819d5f29e2
[ "MIT" ]
1,439
2019-01-23T08:40:57.000Z
2022-03-31T14:02:22.000Z
furnace/engine/dist_test.py
happog/TorchSeg
c5d370778349d9438ed8c854f267d3ba11ffd72f
[ "MIT" ]
112
2019-01-25T02:31:26.000Z
2021-09-23T08:42:37.000Z
furnace/engine/dist_test.py
happog/TorchSeg
c5d370778349d9438ed8c854f267d3ba11ffd72f
[ "MIT" ]
287
2019-01-23T10:39:37.000Z
2022-03-17T13:31:16.000Z
import os import os.path as osp import cv2 import numpy as np import time from tqdm import tqdm import torch import torch.nn.functional as F import torch.multiprocessing as mp from engine.logger import get_logger from utils.pyt_utils import load_model, link_file, ensure_dir from utils.img_utils import pad_image_to_sh...
37.652632
80
0.549623
1d85543085e517b6d38cd3cfb7382d56075772bf
3,234
py
Python
.leetcode/725.split-linked-list-in-parts.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
.leetcode/725.split-linked-list-in-parts.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
.leetcode/725.split-linked-list-in-parts.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
# @lc app=leetcode id=725 lang=python3 # # [725] Split Linked List in Parts # # https://leetcode.com/problems/split-linked-list-in-parts/description/ # # algorithms # Medium (53.87%) # Likes: 1484 # Dislikes: 176 # Total Accepted: 86K # Total Submissions: 153.3K # Testcase Example: '[1,2,3]\n5' # # Given the hea...
22.615385
78
0.572047
1d8564d66baae893f98b6ae0c5987e8ab86bae64
190
py
Python
githubcopy.py
bsoyka/passwd
dba6a9f67bb12f9c713a9a211ac7696ffe3e470f
[ "MIT" ]
1
2020-09-09T17:40:53.000Z
2020-09-09T17:40:53.000Z
githubcopy.py
echang97/passwd
5ea803095ee9d118a24100c19911e8d4a281cb16
[ "MIT" ]
19
2020-07-07T03:48:48.000Z
2021-08-30T08:34:34.000Z
githubcopy.py
bsoyka/passwd
dba6a9f67bb12f9c713a9a211ac7696ffe3e470f
[ "MIT" ]
4
2020-07-07T05:20:51.000Z
2021-09-01T10:20:04.000Z
from shutil import copytree, rmtree from pathlib import Path BUILT_HTML = Path(__file__).parent / "build/html" DOCS = Path(__file__).parent / "docs" rmtree(DOCS) copytree(BUILT_HTML, DOCS)
23.75
49
0.768421
1d8578d4b2a9cd157102da621e43135afd20805b
758
py
Python
domain-messages/domain_messages/test/__init__.py
simcesplatform/static-time-series-resource-forecaster
0f53915d7fe6da543f628487c8e643f2e9bb2652
[ "MIT" ]
null
null
null
domain-messages/domain_messages/test/__init__.py
simcesplatform/static-time-series-resource-forecaster
0f53915d7fe6da543f628487c8e643f2e9bb2652
[ "MIT" ]
null
null
null
domain-messages/domain_messages/test/__init__.py
simcesplatform/static-time-series-resource-forecaster
0f53915d7fe6da543f628487c8e643f2e9bb2652
[ "MIT" ]
null
null
null
# Copyright 2021 Tampere University and VTT Technical Research Centre of Finland # This software was developed as a part of the ProCemPlus project: https://www.senecc.fi/projects/procemplus # This source code is licensed under the MIT license. See LICENSE in the repository root directory. # Author(s): Amir Safdarian <a...
63.166667
108
0.680739
1d85802b420f8b9fa8f51ec307c53c2676fae440
547
py
Python
skimage/data/tests/test_data.py
jaberg/scikits-image
2ab3e2dfb341189ef2ff9370c6cf3d33ef6ec88d
[ "BSD-3-Clause" ]
2
2020-02-17T18:54:33.000Z
2021-09-28T15:18:23.000Z
skimage/data/tests/test_data.py
jaberg/scikits-image
2ab3e2dfb341189ef2ff9370c6cf3d33ef6ec88d
[ "BSD-3-Clause" ]
1
2020-03-30T12:31:55.000Z
2020-03-30T12:31:55.000Z
skimage/data/tests/test_data.py
emmanuelle/scikit-image
eccc41907135cf81b99c4be18a480a9bc705485d
[ "BSD-3-Clause" ]
1
2019-12-20T19:19:59.000Z
2019-12-20T19:19:59.000Z
import skimage.data as data from numpy.testing import assert_equal def test_lena(): """ Test that "Lena" image can be loaded. """ lena = data.lena() assert_equal(lena.shape, (512, 512, 3)) def test_camera(): """ Test that "camera" image can be loaded. """ cameraman = data.camera() assert_equ...
22.791667
55
0.676417
1d858e1cdf70167fd4b1f8e862e3a414db6bac26
2,311
py
Python
Infra_2022_update/Academicuser_pie.py
ScilifelabDataCentre/Annual-report-2021
6a5d9ca0320ee6cba39245e81e2bd61f1a6822e1
[ "MIT" ]
null
null
null
Infra_2022_update/Academicuser_pie.py
ScilifelabDataCentre/Annual-report-2021
6a5d9ca0320ee6cba39245e81e2bd61f1a6822e1
[ "MIT" ]
null
null
null
Infra_2022_update/Academicuser_pie.py
ScilifelabDataCentre/Annual-report-2021
6a5d9ca0320ee6cba39245e81e2bd61f1a6822e1
[ "MIT" ]
null
null
null
# Chart will generate global pie chart looking at unique acadmic users by university # Note: need to trim out data from xlsx file import pandas as pd import plotly.graph_objects as go import os from colour_science_2022 import ( SCILIFE_COLOURS, ) Acaduser_data = pd.read_excel( "data/Unique Academic Users per ...
26.563218
84
0.698832
1d85e38106dec788855ca37eed69aec296f5bfd7
19,552
py
Python
HW3/dbsys-hw3/update/dbsys-hw3/Storage/File.py
yliu120/dbsystem
d1b008f411929058a34a1dd2c44c9ee2cf899865
[ "Apache-2.0" ]
null
null
null
HW3/dbsys-hw3/update/dbsys-hw3/Storage/File.py
yliu120/dbsystem
d1b008f411929058a34a1dd2c44c9ee2cf899865
[ "Apache-2.0" ]
null
null
null
HW3/dbsys-hw3/update/dbsys-hw3/Storage/File.py
yliu120/dbsystem
d1b008f411929058a34a1dd2c44c9ee2cf899865
[ "Apache-2.0" ]
null
null
null
import io, math, os, os.path, pickle, struct from struct import Struct from Catalog.Identifiers import PageId, FileId, TupleId from Catalog.Schema import DBSchema from Storage.Page import PageHeader, Page from Storage.SlottedPage import SlottedPageHeader, SlottedPage class FileHeader: """ A file heade...
31.947712
109
0.661313
1d85edcb2f80c3b993370e9b3a9311a2ec93229c
98,677
py
Python
osf/models/node.py
sergiy-neurohub/osf.io
bd12fdd4efc2eb58c0a3c805c33aaeb8672f0293
[ "Apache-2.0" ]
null
null
null
osf/models/node.py
sergiy-neurohub/osf.io
bd12fdd4efc2eb58c0a3c805c33aaeb8672f0293
[ "Apache-2.0" ]
null
null
null
osf/models/node.py
sergiy-neurohub/osf.io
bd12fdd4efc2eb58c0a3c805c33aaeb8672f0293
[ "Apache-2.0" ]
null
null
null
from past.builtins import basestring import functools import itertools import logging import re from future.moves.urllib.parse import urljoin import warnings from rest_framework import status as http_status import bson from django.db.models import Q from dirtyfields import DirtyFieldsMixin from django.apps import apps...
38.788129
168
0.611247
1d8627f4cde6883bc0a3d9a143def9b20a125bc8
8,900
py
Python
demonet/train.py
zhiqwang/demonet
8370fc41d56d28939403b883f4b4014172895781
[ "Apache-2.0" ]
11
2020-08-28T09:29:42.000Z
2021-10-03T09:08:11.000Z
demonet/train.py
vanillapi/demonet
8370fc41d56d28939403b883f4b4014172895781
[ "Apache-2.0" ]
1
2020-05-01T14:57:57.000Z
2020-05-01T17:59:40.000Z
demonet/train.py
zhiqwang/demonet
8370fc41d56d28939403b883f4b4014172895781
[ "Apache-2.0" ]
3
2020-04-15T07:53:13.000Z
2020-05-18T18:51:31.000Z
r"""PyTorch Detection Training. To run in a multi-gpu environment, use the distributed launcher:: python -m torch.distributed.launch --nproc_per_node=$NGPU --use_env \ train.py ... --world-size $NGPU The default hyperparameters are tuned for training on 8 gpus and 2 images per gpu. --lr 0.02 --batch-...
42.180095
119
0.68191
1d863590470fec88d81e894911c7d862087e9460
4,833
py
Python
datatag/tagset.py
ericyd/inclusion-py
c891db8590dcf194b6e34c7055f9b19bb5a385ca
[ "MIT" ]
null
null
null
datatag/tagset.py
ericyd/inclusion-py
c891db8590dcf194b6e34c7055f9b19bb5a385ca
[ "MIT" ]
null
null
null
datatag/tagset.py
ericyd/inclusion-py
c891db8590dcf194b6e34c7055f9b19bb5a385ca
[ "MIT" ]
null
null
null
from functools import reduce from .exceptions import UndefinedTag, TagNotUnique, NonBooleanQueryValue, ArgumentNotCallable, DataNotIterable from .tag_definition import TagDefinition from .tagged_datum import TaggedDatum # TagSet is the primary public class in the Inclusion API. class TagSet(): """Define tags on a ...
46.028571
156
0.674736
1d8638fb7e8c8ad4b86c438f1ad83284986c8f96
5,237
py
Python
utilities.py
pwu01/ALADDIN-BiGAN-anomaly-detection
9843c89f0f11fba043f0cc08bb3d4026741c1025
[ "MIT" ]
3
2021-09-28T20:19:27.000Z
2022-01-07T04:03:12.000Z
utilities.py
pwu01/ALADDIN-BiGAN-anomaly-detection
9843c89f0f11fba043f0cc08bb3d4026741c1025
[ "MIT" ]
null
null
null
utilities.py
pwu01/ALADDIN-BiGAN-anomaly-detection
9843c89f0f11fba043f0cc08bb3d4026741c1025
[ "MIT" ]
2
2021-10-09T10:00:19.000Z
2021-11-27T14:06:34.000Z
import tensorflow as tf import pickle from copy import deepcopy import numpy as np import os def test_batch(batch, dis, gen, enc, d_size, f_size, kappa): x = batch z = enc(batch) x_gen = gen(z) # compute the L2 norm of the difference between the data and the generator output (reconstructed data) ...
33.356688
106
0.638915
1d8683197e9c94f5409245f1db078786b37d494a
854
py
Python
tests/test_exporter.py
frasy/site-map-parser
7648b50a1e15777cf82a6916ef5cbb149c5e99df
[ "MIT" ]
1
2021-02-11T10:03:42.000Z
2021-02-11T10:03:42.000Z
tests/test_exporter.py
frasy/site-map-parser
7648b50a1e15777cf82a6916ef5cbb149c5e99df
[ "MIT" ]
2
2020-02-24T11:52:51.000Z
2021-07-05T19:38:55.000Z
tests/test_exporter.py
frasy/site-map-parser
7648b50a1e15777cf82a6916ef5cbb149c5e99df
[ "MIT" ]
4
2020-02-10T14:49:41.000Z
2021-05-07T14:41:32.000Z
import pytest from sitemapparser.exporter import Exporter class TestExporter: def setup(self): self.test_data = ['foo', 'bar'] def test_abstract(self): # test that this is an abstract class overall with pytest.raises(TypeError): Exporter(self.test_data) assert 's...
30.5
64
0.669789
1d86b175aa93809fc299a1df09aa011475b381ec
589
py
Python
tron/Hub/Command/Encoders/RawCmdEncoder.py
sdss/tron
886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322
[ "BSD-3-Clause" ]
null
null
null
tron/Hub/Command/Encoders/RawCmdEncoder.py
sdss/tron
886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322
[ "BSD-3-Clause" ]
null
null
null
tron/Hub/Command/Encoders/RawCmdEncoder.py
sdss/tron
886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322
[ "BSD-3-Clause" ]
null
null
null
__all__ = ['RawCmdEncoder'] from tron import Misc from .CommandEncoder import CommandEncoder class RawCmdEncoder(CommandEncoder): """ Encode commands into a raw ASCII protocol: one without any MID, CID, etc. Options: EOL: specify the EOL string. Default is '\n' """ def __init__(self,...
21.814815
81
0.590832
1d86d7da2ae5bdcb4ab7d71e16d51572502495e0
3,592
py
Python
wolf.py
johnztoth/wolves
5d3e5c1f75a18f2d7ae644f91b61a42c0c10d3c1
[ "CC0-1.0" ]
null
null
null
wolf.py
johnztoth/wolves
5d3e5c1f75a18f2d7ae644f91b61a42c0c10d3c1
[ "CC0-1.0" ]
null
null
null
wolf.py
johnztoth/wolves
5d3e5c1f75a18f2d7ae644f91b61a42c0c10d3c1
[ "CC0-1.0" ]
null
null
null
""" Wolf In this model we have two types of agents; sheep and wolves. The grass (environment) has a uniform length to start with. The sheep randonly move by +/- 1 unit at a time. When they move they eat 1 unit of grass where they land. They are not sick and there is no sharing. As they eat the grass their store incre...
28.283465
73
0.670935
1d8723a6d7abeefdda6942bf3e602d9b0536d913
1,558
py
Python
oscar/lib/python2.7/site-packages/django/core/management/commands/sendtestemail.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/django/core/management/commands/sendtestemail.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/django/core/management/commands/sendtestemail.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
import socket from django.core.mail import mail_admins, mail_managers, send_mail from django.core.management.base import BaseCommand from django.utils import timezone class Command(BaseCommand): help = "Sends a test email to the email addresses specified as arguments." missing_args_message = "You mu...
38
112
0.616175
1d8723add6afe3d2b76cde2a9bfa8a2c15ad305c
16,678
py
Python
symm/basis.py
gmwang18/pyscf
fcd6877751661c8a9743c1c872a4a2b65f6dd7ac
[ "BSD-2-Clause" ]
null
null
null
symm/basis.py
gmwang18/pyscf
fcd6877751661c8a9743c1c872a4a2b65f6dd7ac
[ "BSD-2-Clause" ]
null
null
null
symm/basis.py
gmwang18/pyscf
fcd6877751661c8a9743c1c872a4a2b65f6dd7ac
[ "BSD-2-Clause" ]
null
null
null
# # Author: Qiming Sun <osirpt.sun@gmail.com> # ''' Generate symmetry adapted basis ''' from functools import reduce import numpy import pyscf.lib import pyscf.gto from pyscf.symm import geom from pyscf.symm import param OP_PARITY_ODD = { 'E' : (0, 0, 0), 'C2x': (0, 1, 1), 'C2y': (1, 0, 1), 'C2z': (...
36.414847
92
0.446816
1d874374a82927f640e5b26f5759d5c4de92a32d
21,172
py
Python
Lib/site-packages/wx-3.0-msw/wx/lib/buttons.py
jickieduan/python27
c752b552396bbed68d8555080d475718cea2edd0
[ "bzip2-1.0.6" ]
1
2021-02-13T22:40:50.000Z
2021-02-13T22:40:50.000Z
Lib/site-packages/wx-3.0-msw/wx/lib/buttons.py
jickieduan/python27
c752b552396bbed68d8555080d475718cea2edd0
[ "bzip2-1.0.6" ]
1
2018-07-28T20:07:04.000Z
2018-07-30T18:28:34.000Z
Lib/site-packages/wx-3.0-msw/wx/lib/buttons.py
jickieduan/python27
c752b552396bbed68d8555080d475718cea2edd0
[ "bzip2-1.0.6" ]
2
2019-12-02T01:39:10.000Z
2021-02-13T22:41:00.000Z
#---------------------------------------------------------------------- # Name: wx.lib.buttons # Purpose: Various kinds of generic buttons, (not native controls but # self-drawn.) # # Author: Robin Dunn # # Created: 9-Dec-1999 # RCS-ID: $Id$ # Copyright: (c) 1999 by Total Control...
32.176292
93
0.564141
1d8787abc54287b3c0adf423a1fae5dc072d3b29
128
py
Python
prediction_parameter.py
joLahann/dapnn
393ee55fe01c654de5fbc96589688ddc92e0dcda
[ "Apache-2.0" ]
null
null
null
prediction_parameter.py
joLahann/dapnn
393ee55fe01c654de5fbc96589688ddc92e0dcda
[ "Apache-2.0" ]
null
null
null
prediction_parameter.py
joLahann/dapnn
393ee55fe01c654de5fbc96589688ddc92e0dcda
[ "Apache-2.0" ]
null
null
null
from dapnn.hyper_parameter import * import fire import warnings warnings.filterwarnings("ignore") fire.Fire(hyper_param_eval)
16
35
0.828125
1d87ba896d5b57774a1ef8373ac5b6e085ace849
1,095
py
Python
setup.py
severin-lemaignan/pyrobots
d5dd3bd54375e85802de7225556ad519b8b4e89d
[ "0BSD" ]
11
2017-03-06T17:19:59.000Z
2021-11-04T07:45:33.000Z
setup.py
severin-lemaignan/pyrobots
d5dd3bd54375e85802de7225556ad519b8b4e89d
[ "0BSD" ]
2
2018-08-18T12:43:47.000Z
2019-04-23T13:03:26.000Z
setup.py
severin-lemaignan/pyrobots
d5dd3bd54375e85802de7225556ad519b8b4e89d
[ "0BSD" ]
3
2018-04-24T10:25:53.000Z
2021-08-25T04:34:35.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from distutils.core import setup #import __version__ exec(open('src/robots/__init__.py').read()) setup(name='pyRobots', version=__version__, license='ISC', description='A Python toolset for event-based, asynchronous programming of robot con...
34.21875
132
0.621918
1d87c74af6e3bc342a7bf0fbbca8f8115e40f2bb
3,714
py
Python
pycryptoki/object_attr_lookup.py
nondejus/pycryptoki
5dbc9fe6b1d17b2bc52a3e91a01abcd0ddc2b0e3
[ "Apache-2.0" ]
null
null
null
pycryptoki/object_attr_lookup.py
nondejus/pycryptoki
5dbc9fe6b1d17b2bc52a3e91a01abcd0ddc2b0e3
[ "Apache-2.0" ]
null
null
null
pycryptoki/object_attr_lookup.py
nondejus/pycryptoki
5dbc9fe6b1d17b2bc52a3e91a01abcd0ddc2b0e3
[ "Apache-2.0" ]
null
null
null
""" Functions for dealing with object attributes """ import logging from ctypes import byref, cast, c_void_p from .attributes import Attributes, c_struct_to_python, KEY_TRANSFORMS from .cryptoki import CK_OBJECT_HANDLE, C_FindObjectsInit, CK_ULONG, \ C_FindObjects, C_FindObjectsFinal, C_GetAttributeValue, C_SetAtt...
37.897959
100
0.732364
1d87cd9485234d3d0dae151f4d0cec3531e230ea
2,798
py
Python
spa/tasks.py
fergalmoran/dss.api
d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073
[ "BSD-2-Clause" ]
null
null
null
spa/tasks.py
fergalmoran/dss.api
d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073
[ "BSD-2-Clause" ]
null
null
null
spa/tasks.py
fergalmoran/dss.api
d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073
[ "BSD-2-Clause" ]
null
null
null
from celery.task import task import os import logging import json import requests from core.realtime import activity from core.utils import cdn from spa.models import Mix from spa.signals import waveform_generated_signal try: from django.contrib.gis.geoip import GeoIP except ImportError: pass from core.utils....
30.413043
105
0.681201
1d87d90e3a5339bf240b62d8c98250f6a65b35d2
6,212
py
Python
sharebears/post_processor_test.py
mgp/sharebears
aabb2c568707cea1107498a05d7f56bd772ef4fb
[ "Apache-2.0" ]
1
2015-01-17T20:02:14.000Z
2015-01-17T20:02:14.000Z
sharebears/post_processor_test.py
mgp/sharebears
aabb2c568707cea1107498a05d7f56bd772ef4fb
[ "Apache-2.0" ]
null
null
null
sharebears/post_processor_test.py
mgp/sharebears
aabb2c568707cea1107498a05d7f56bd772ef4fb
[ "Apache-2.0" ]
null
null
null
import unittest import urlparse import paragraph_item from post_processor import PostProcessor from renderable_item import RenderableItem from test_util import TestDecoder class PostProcessorTest(unittest.TestCase): def setUp(self): unittest.TestCase.setUp(self) self.decoder0 = TestDecoder("decoder0", "http...
41.691275
94
0.768191
1d87e971aac6d0bfca993f26219e92127e1ed1ad
33,683
py
Python
bilby/gw/utils.py
deepchatterjeeligo/bilby
6532c63d0d970ad33478ae0b1c28d4c570b74047
[ "MIT" ]
null
null
null
bilby/gw/utils.py
deepchatterjeeligo/bilby
6532c63d0d970ad33478ae0b1c28d4c570b74047
[ "MIT" ]
null
null
null
bilby/gw/utils.py
deepchatterjeeligo/bilby
6532c63d0d970ad33478ae0b1c28d4c570b74047
[ "MIT" ]
null
null
null
import json import os from functools import lru_cache from math import fmod import numpy as np from scipy.interpolate import interp1d from scipy.special import i0e from ..core.utils import (ra_dec_to_theta_phi, speed_of_light, logger, run_commandline, check_director...
32.893555
115
0.666508
1d87f40cd8a9b5fa1d89ad6e23c9541392a5e6fe
4,800
py
Python
src/utils/dataset_utils.py
bowang-lab/Transformer-GCN-QA
7b0a5f5a005ebaae75796c200035f7e6ce175971
[ "MIT" ]
11
2019-08-30T07:39:55.000Z
2022-03-24T09:29:35.000Z
src/utils/dataset_utils.py
berc-uoft/Transformer-GCN-QA
7b0a5f5a005ebaae75796c200035f7e6ce175971
[ "MIT" ]
27
2019-04-19T14:59:09.000Z
2019-06-18T15:51:51.000Z
src/utils/dataset_utils.py
bowang-lab/Transformer-GCN-QA
7b0a5f5a005ebaae75796c200035f7e6ce175971
[ "MIT" ]
1
2019-04-19T19:20:23.000Z
2019-04-19T19:20:23.000Z
import json import os from glob import glob import torch from torch.utils import data from ..dataset import Dataset # TODO (John): Rewrite this to use googledrivedownloader def load_wikihop(directory, masked=False): """Loads the Wiki- or MedHop dataset given at `directory`. Loads the Wiki- or MedHop datas...
39.344262
99
0.680833
1d883152e2c97fd45ad53fe799fdadacba5301cd
150,617
py
Python
Tests/test_integration/raw_data_comments.py
duncanbackr/jit_analytics
9c81ff294459ccda5f3d3ace40dd5f5b44cfa4d1
[ "MIT" ]
null
null
null
Tests/test_integration/raw_data_comments.py
duncanbackr/jit_analytics
9c81ff294459ccda5f3d3ace40dd5f5b44cfa4d1
[ "MIT" ]
null
null
null
Tests/test_integration/raw_data_comments.py
duncanbackr/jit_analytics
9c81ff294459ccda5f3d3ace40dd5f5b44cfa4d1
[ "MIT" ]
null
null
null
import datetime raw_data_comments = [(25925, None, 15213, 'this is one of my favourite songs', False, datetime.datetime(2015, 10, 24, 17, 53, 29), None, None, 'And So It Goes by Billy Joel | Matt Mulholland & Chris Bill Cover', 366, 1, 0, 0, None, 'kate ramsay', 'https://yt3.ggpht.com/a/AATXAJyK4xg31xlsnsA6SWZM_4XFBqK...
21,516.714286
112,125
0.723185
1d883af89b2e19a655bb2ee1c86225a6b8843da1
593
py
Python
src/__init__.py
CSIRO-enviro-informatics/cosmoz-rest-wrapper
ce4c61522b154f8ecfa64b7476b9539088fe04ee
[ "Apache-2.0" ]
null
null
null
src/__init__.py
CSIRO-enviro-informatics/cosmoz-rest-wrapper
ce4c61522b154f8ecfa64b7476b9539088fe04ee
[ "Apache-2.0" ]
null
null
null
src/__init__.py
CSIRO-enviro-informatics/cosmoz-rest-wrapper
ce4c61522b154f8ecfa64b7476b9539088fe04ee
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright 2019 CSIRO Land and Water Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
34.882353
72
0.768971
1d887df4ffce2c126821e14c58763130487c181a
1,620
py
Python
wimblepong/bad_ai.py
Sopitta/RL-Pong
8b389856d0492dac1d0fc5f4d5459809948fb14a
[ "MIT" ]
null
null
null
wimblepong/bad_ai.py
Sopitta/RL-Pong
8b389856d0492dac1d0fc5f4d5459809948fb14a
[ "MIT" ]
null
null
null
wimblepong/bad_ai.py
Sopitta/RL-Pong
8b389856d0492dac1d0fc5f4d5459809948fb14a
[ "MIT" ]
null
null
null
from wimblepong import Wimblepong import random class BadAi(object): def __init__(self, env, player_id=1): if type(env) is not Wimblepong: raise TypeError("I'm not a very smart AI. All I can play is Wimblepong.") self.env = env # Set the player id that determines on which side ...
32.4
85
0.580864
1d8883889c3f6a6b8900ded6da2a25e762b63e3f
16,332
py
Python
textdata_MCTEST.py
shalei120/OxCTE
0909a7d8f4fd8269de51eefe25732553e9fd4f59
[ "MIT" ]
1
2021-08-29T10:21:53.000Z
2021-08-29T10:21:53.000Z
textdata_MCTEST.py
shalei120/OxCTE
0909a7d8f4fd8269de51eefe25732553e9fd4f59
[ "MIT" ]
null
null
null
textdata_MCTEST.py
shalei120/OxCTE
0909a7d8f4fd8269de51eefe25732553e9fd4f59
[ "MIT" ]
null
null
null
import functools print = functools.partial(print, flush=True) import numpy as np import nltk # For tokenize from tqdm import tqdm # Progress bar import pickle # Saving the data import math # For float comparison import os # Checking file existance import random import string, copy from nltk.tokenize import word_to...
37.718245
223
0.545922