hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c452c8a6569b75610cdf1914eeb687f42106575
196
py
Python
ferminet_ecp/integral/__init__.py
bytedance/FermiNet_with_ECP
f86874513541866db6b89559698e2078d4e37f7c
[ "Apache-2.0" ]
3
2022-01-11T03:31:00.000Z
2022-01-18T07:28:24.000Z
ferminet_ecp/integral/__init__.py
bytedance/FermiNet_with_ECP
f86874513541866db6b89559698e2078d4e37f7c
[ "Apache-2.0" ]
null
null
null
ferminet_ecp/integral/__init__.py
bytedance/FermiNet_with_ECP
f86874513541866db6b89559698e2078d4e37f7c
[ "Apache-2.0" ]
1
2022-01-05T17:39:53.000Z
2022-01-05T17:39:53.000Z
# Copyright (c) ByteDance, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree.
39.2
61
0.760204
true
true
1c452ced1d02e0be92216546022c19ebe1d5e3d7
5,219
py
Python
packages/python/plotly/plotly/graph_objs/scatterternary/unselected/_textfont.py
labaran1/plotly.py
7ec751e8fed4a570c11ea4bea2231806389d62eb
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/graph_objs/scatterternary/unselected/_textfont.py
labaran1/plotly.py
7ec751e8fed4a570c11ea4bea2231806389d62eb
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/graph_objs/scatterternary/unselected/_textfont.py
labaran1/plotly.py
7ec751e8fed4a570c11ea4bea2231806389d62eb
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatterternary.unselected" _path_str = "scatterternary.unselected.textfont" _valid_props =...
36.753521
82
0.564284
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): _parent_path_str = "scatterternary.unselected" _path_str = "scatterternary.unselected.textfont" _valid_props = {"color"} @property def ...
true
true
1c452d29c806e98640fff6394a519a69547d9461
21,953
py
Python
sdk/storage/azure-storage-queue/azure/storage/queue/_shared/utils.py
vchske/azure-sdk-for-python
6383ed3676b7355af7be394562b126209961ec13
[ "MIT" ]
null
null
null
sdk/storage/azure-storage-queue/azure/storage/queue/_shared/utils.py
vchske/azure-sdk-for-python
6383ed3676b7355af7be394562b126209961ec13
[ "MIT" ]
1
2019-06-04T18:12:16.000Z
2019-06-04T18:12:16.000Z
sdk/storage/azure-storage-queue/azure/storage/queue/_shared/utils.py
vchske/azure-sdk-for-python
6383ed3676b7355af7be394562b126209961ec13
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from typi...
36.166392
125
0.651802
from typing import ( Union, Optional, Any, Iterable, Dict, List, Type, Tuple, TYPE_CHECKING ) import base64 import hashlib import hmac import logging from os import fstat from io import (SEEK_END, SEEK_SET, UnsupportedOperation) try: from urllib.parse import quote, unquote, parse_qs except ImportError: ...
true
true
1c4530276fcdb695658f172383b6ef0f338a039e
47
py
Python
deepclaw/utils/success_label/__init__.py
Nokkxz/ME336-Yellow-Team-Project
5b6d65ecb134049ba3c5d27c37f521ada79a913f
[ "MIT" ]
5
2020-06-24T03:47:00.000Z
2021-10-13T03:35:38.000Z
deepclaw/utils/success_label/__init__.py
Nokkxz/ME336-Yellow-Team-Project
5b6d65ecb134049ba3c5d27c37f521ada79a913f
[ "MIT" ]
null
null
null
deepclaw/utils/success_label/__init__.py
Nokkxz/ME336-Yellow-Team-Project
5b6d65ecb134049ba3c5d27c37f521ada79a913f
[ "MIT" ]
3
2020-06-18T09:25:39.000Z
2021-04-18T03:51:08.000Z
__all__ = ['DetectForeground', 'success_label']
47
47
0.765957
__all__ = ['DetectForeground', 'success_label']
true
true
1c453071197a502639b6057e02299e32868cc15f
392
py
Python
generate-schema.py
akhmetzaki/amplitude-bigquery
9c637198aa85518d72acb1184f06279497de3189
[ "MIT" ]
null
null
null
generate-schema.py
akhmetzaki/amplitude-bigquery
9c637198aa85518d72acb1184f06279497de3189
[ "MIT" ]
null
null
null
generate-schema.py
akhmetzaki/amplitude-bigquery
9c637198aa85518d72acb1184f06279497de3189
[ "MIT" ]
null
null
null
import pandas as pd import json def parse_json(): with open('bigquery-schema-events.json', 'r') as f: events_df = pd.DataFrame(json.loads(f.read())) with open('bigquery-schema-events-properties.json') as f: prop_df = pd.DataFrame(json.loads(f.read())) events_df.to_csv('events.csv') p...
23.058824
61
0.660714
import pandas as pd import json def parse_json(): with open('bigquery-schema-events.json', 'r') as f: events_df = pd.DataFrame(json.loads(f.read())) with open('bigquery-schema-events-properties.json') as f: prop_df = pd.DataFrame(json.loads(f.read())) events_df.to_csv('events.csv') p...
true
true
1c4530e1085d4b99291f8b076baa1a404e14de62
1,161
py
Python
openpmd_updater/transforms/v2_0_0/Version.py
openPMD/openPMD-updater
1f334c99093b7175af990d57879ea24ff5b4cb01
[ "ISC" ]
1
2019-03-28T13:29:44.000Z
2019-03-28T13:29:44.000Z
openpmd_updater/transforms/v2_0_0/Version.py
openPMD/openPMD-updater
1f334c99093b7175af990d57879ea24ff5b4cb01
[ "ISC" ]
3
2018-11-06T15:51:42.000Z
2020-02-03T16:38:29.000Z
openpmd_updater/transforms/v2_0_0/Version.py
openPMD/openPMD-updater
1f334c99093b7175af990d57879ea24ff5b4cb01
[ "ISC" ]
2
2018-11-07T18:10:21.000Z
2020-01-22T03:29:02.000Z
""" This file is part of the openPMD-updater. Copyright 2018 openPMD contributors Authors: Axel Huebl License: ISC """ from openpmd_updater.transforms.ITransform import ITransform import numpy as np class Version(ITransform): """ Transforms the openPMD version. openPMD standard: 1.*.* -> 2.0.0 Rel...
26.386364
83
0.676141
from openpmd_updater.transforms.ITransform import ITransform import numpy as np class Version(ITransform): name = "version", "replace openPMD version identifier with new version" min_version = "1.0.0" to_version = "2.0.0" def __init__(self, backend): self.fb = backend def transform(s...
true
true
1c4530f68bcd141ac33d9dab2284d8d8685dbe9c
250
py
Python
nsd1903/devops/day01/mtprint4.py
MrWangwf/nsd2019
5e859b4b1926dc098d236be3720779c50d0a55fc
[ "Apache-2.0" ]
1
2019-09-19T04:53:22.000Z
2019-09-19T04:53:22.000Z
nsd1903/devops/day01/mtprint4.py
MrWangwf/nsd2019
5e859b4b1926dc098d236be3720779c50d0a55fc
[ "Apache-2.0" ]
null
null
null
nsd1903/devops/day01/mtprint4.py
MrWangwf/nsd2019
5e859b4b1926dc098d236be3720779c50d0a55fc
[ "Apache-2.0" ]
1
2021-12-28T04:26:02.000Z
2021-12-28T04:26:02.000Z
import threading class MyClass: def __call__(self, a, b, c): print('Hello', a, b, c) if __name__ == '__main__': for i in range(3): t = threading.Thread(target=MyClass(), args=(10, 20, 30)) t.start() # target(*args)
22.727273
65
0.572
import threading class MyClass: def __call__(self, a, b, c): print('Hello', a, b, c) if __name__ == '__main__': for i in range(3): t = threading.Thread(target=MyClass(), args=(10, 20, 30)) t.start()
true
true
1c4531039560c0133de2c7dd58e494b440bb52fe
3,438
py
Python
d2relay.py
seichter/d2relay
23e3e727b4de80e6e685964b7339ef0652d9ed8d
[ "MIT" ]
null
null
null
d2relay.py
seichter/d2relay
23e3e727b4de80e6e685964b7339ef0652d9ed8d
[ "MIT" ]
null
null
null
d2relay.py
seichter/d2relay
23e3e727b4de80e6e685964b7339ef0652d9ed8d
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ D2 is a minimal relay tool to output Leica DISTO D2 data to the console Copyrights (c) 2021 Hartmut Seichter Distributed under the terms of the MIT License """ import gatt import struct debug_mode = False keepalive_hack = True class DISTOManager(gatt.DeviceManager): def __init__(se...
33.705882
121
0.613729
import gatt import struct debug_mode = False keepalive_hack = True class DISTOManager(gatt.DeviceManager): def __init__(self, adapter_name): super().__init__(adapter_name) def run(self): super().run() def on_idle(self): pass class DISTO(gatt.Device): def connect_succeede...
true
true
1c4531cb438cfc0c8e48462c8037d07548cfe931
44,723
py
Python
nova/api/openstack/wsgi.py
nicholaskuechler/nova
ff412c3888b234eb123161cc4e6d0d0d69c0004e
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/wsgi.py
nicholaskuechler/nova
ff412c3888b234eb123161cc4e6d0d0d69c0004e
[ "Apache-2.0" ]
1
2021-03-21T11:39:52.000Z
2021-03-21T11:39:52.000Z
nova/api/openstack/wsgi.py
nicholaskuechler/nova
ff412c3888b234eb123161cc4e6d0d0d69c0004e
[ "Apache-2.0" ]
1
2021-03-21T11:37:33.000Z
2021-03-21T11:37:33.000Z
# Copyright 2013 IBM Corp. # Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LIC...
35.721246
79
0.612034
import functools import inspect import math import time from oslo_log import log as logging from oslo_serialization import jsonutils from oslo_utils import strutils import six import webob from nova.api.openstack import api_version_request as api_version from nova.api.openstack import versioned_method from nova impo...
true
true
1c4531d80c6d31acc1cfb7c059317df37a5ce0ad
896
py
Python
nally/core/layers/raw_packet.py
FreibergVlad/port-scanner
432dd9a07cb5118f3a0722fe4908434c76191b3b
[ "MIT" ]
null
null
null
nally/core/layers/raw_packet.py
FreibergVlad/port-scanner
432dd9a07cb5118f3a0722fe4908434c76191b3b
[ "MIT" ]
null
null
null
nally/core/layers/raw_packet.py
FreibergVlad/port-scanner
432dd9a07cb5118f3a0722fe4908434c76191b3b
[ "MIT" ]
null
null
null
from nally.core.layers.packet import Packet class RawPacket(Packet): """ Raw implementation of Packet interface. Actually, just a holder of raw bytes """ def __init__(self, raw_packet): super().__init__() self.__raw_packet = bytes(raw_packet) def to_bytes(self): retur...
24.888889
71
0.66183
from nally.core.layers.packet import Packet class RawPacket(Packet): def __init__(self, raw_packet): super().__init__() self.__raw_packet = bytes(raw_packet) def to_bytes(self): return self.__raw_packet @staticmethod def from_bytes(bytes_packet: bytes): return RawPac...
true
true
1c453226bdc6a0908183e8c5c8f5eb83db899edf
17,813
py
Python
ProjectFiles/bin/Release/2.80/scripts/addons/add_advanced_objects_panels/__init__.py
BlazesRus/Bforartists
126bdd9e47cc984fd97ba5299bfb92ec5278e754
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2019-07-08T15:51:14.000Z
2019-07-08T15:51:14.000Z
ProjectFiles/bin/Release/2.80/scripts/addons/add_advanced_objects_panels/__init__.py
BlazesRus/Bforartists
126bdd9e47cc984fd97ba5299bfb92ec5278e754
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
ProjectFiles/bin/Release/2.80/scripts/addons/add_advanced_objects_panels/__init__.py
BlazesRus/Bforartists
126bdd9e47cc984fd97ba5299bfb92ec5278e754
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
34.521318
102
0.547016
bl_info = { "name": "Add Advanced Object Panels", "author": "meta-androcto", "version": (1, 1, 5), "blender": (2, 7, 7), "description": "Individual Create Panel Activation List", "location": "Addons Preferences", "warning": "", "wiki_url": "https://wiki.blender.org/index.php/Extensions...
true
true
1c4533e70cb3d4cda0a63ef32b57e6f92afbb550
433
py
Python
setup_moleval.py
MorganCThomas/MolScore
b12b7b5539bb3211982fc7a1b5938c0f383a05c0
[ "MIT" ]
28
2020-12-11T22:10:16.000Z
2022-02-25T05:00:51.000Z
setup_moleval.py
MorganCThomas/MolScore
b12b7b5539bb3211982fc7a1b5938c0f383a05c0
[ "MIT" ]
3
2021-08-31T22:50:41.000Z
2021-11-04T15:41:01.000Z
setup_moleval.py
MorganCThomas/MolScore
b12b7b5539bb3211982fc7a1b5938c0f383a05c0
[ "MIT" ]
9
2021-03-03T12:10:10.000Z
2022-02-15T06:53:11.000Z
from setuptools import setup, find_packages setup( name='moleval', version='1.0', packages=['moleval'] + ['moleval.'+p for p in find_packages(where="moleval")], license='MIT', author='Morgan Thomas', author_email='morganthomas263@gmail.com', description='A evaluation framework for goal dire...
30.928571
82
0.69746
from setuptools import setup, find_packages setup( name='moleval', version='1.0', packages=['moleval'] + ['moleval.'+p for p in find_packages(where="moleval")], license='MIT', author='Morgan Thomas', author_email='morganthomas263@gmail.com', description='A evaluation framework for goal dire...
true
true
1c45356cce2b4f69b3bb2ad77abcc74a79c6c0af
272
py
Python
src/openbiolink/gui/tqdmbuf.py
jerryhluo/OpenBioLink
6fc073af978daec0b0db5938b73beed37f57f495
[ "MIT" ]
97
2019-11-26T09:53:18.000Z
2022-03-19T10:33:10.000Z
src/openbiolink/gui/tqdmbuf.py
jerryhluo/OpenBioLink
6fc073af978daec0b0db5938b73beed37f57f495
[ "MIT" ]
67
2019-12-09T21:01:52.000Z
2021-12-21T15:19:41.000Z
src/openbiolink/gui/tqdmbuf.py
jerryhluo/OpenBioLink
6fc073af978daec0b0db5938b73beed37f57f495
[ "MIT" ]
20
2020-01-13T23:02:25.000Z
2022-03-16T21:43:31.000Z
import io class TqdmBuffer(io.StringIO): foo = "" buf = "" def __init__(self): super(TqdmBuffer, self).__init__() def write(self, buf): TqdmBuffer.foo = buf.strip("\r\n\t ") def flush(self): TqdmBuffer.buf = TqdmBuffer.foo
17
45
0.580882
import io class TqdmBuffer(io.StringIO): foo = "" buf = "" def __init__(self): super(TqdmBuffer, self).__init__() def write(self, buf): TqdmBuffer.foo = buf.strip("\r\n\t ") def flush(self): TqdmBuffer.buf = TqdmBuffer.foo
true
true
1c453596a670a84db2e2af489075f7f2a241bdfa
154
py
Python
arc086_a.py
hythof/atc
12cb94ebe693e1f469ce0d982bc2924b586552cd
[ "CC0-1.0" ]
null
null
null
arc086_a.py
hythof/atc
12cb94ebe693e1f469ce0d982bc2924b586552cd
[ "CC0-1.0" ]
null
null
null
arc086_a.py
hythof/atc
12cb94ebe693e1f469ce0d982bc2924b586552cd
[ "CC0-1.0" ]
null
null
null
from collections import Counter N,K,*A = [int(x) for x in open(0).read().split()] c=Counter(A) s=c.most_common()[K:] ans=sum([n for _,n in s]) print(ans)
22
49
0.655844
from collections import Counter N,K,*A = [int(x) for x in open(0).read().split()] c=Counter(A) s=c.most_common()[K:] ans=sum([n for _,n in s]) print(ans)
true
true
1c4535bc026eff090d7af84d54154e33b7a62cfe
2,673
py
Python
rgd/geodata/api/download.py
Erotemic/ResonantGeoData
ff9aec9daf73353bcc95a9d30e98fcc5cdffc6e0
[ "Apache-2.0" ]
null
null
null
rgd/geodata/api/download.py
Erotemic/ResonantGeoData
ff9aec9daf73353bcc95a9d30e98fcc5cdffc6e0
[ "Apache-2.0" ]
null
null
null
rgd/geodata/api/download.py
Erotemic/ResonantGeoData
ff9aec9daf73353bcc95a9d30e98fcc5cdffc6e0
[ "Apache-2.0" ]
null
null
null
from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 # , render from drf_yasg.utils import swagger_auto_schema from rest_framework.decorators import api_view from rest_framework.response import Response from rgd.geodata import models from rgd.geodata.permissions import check_rea...
33
112
0.737748
from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from drf_yasg.utils import swagger_auto_schema from rest_framework.decorators import api_view from rest_framework.response import Response from rgd.geodata import models from rgd.geodata.permissions import check_read_perm @s...
true
true
1c45386d87d0096209f4bdb484bfc04696f23f4b
15,690
py
Python
python/ccxt/async_support/bit2c.py
FullStackHan/ccxt
1efa15e162e23bae91215aa5d1e5199ebb7fe39e
[ "MIT" ]
null
null
null
python/ccxt/async_support/bit2c.py
FullStackHan/ccxt
1efa15e162e23bae91215aa5d1e5199ebb7fe39e
[ "MIT" ]
null
null
null
python/ccxt/async_support/bit2c.py
FullStackHan/ccxt
1efa15e162e23bae91215aa5d1e5199ebb7fe39e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange # ----------------------------------------------------------------------------- try...
39.621212
137
0.476801
from ccxt.async_support.base.exchange import Exchange try: basestring except NameError: basestring = str import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import ArgumentsRequired class bit2c (Exchange): def describe(self): return self.deep_extend(super(bit2c, ...
true
true
1c4538cc2359718686d6db32146a5a2b4f7febf8
801
py
Python
apps/MixMaster/Units/specificEntropy.py
VishalKandala/Cantera-1.7
750786f9b845a56fc177a9f1d5a9c5bb6ebd87cc
[ "BSD-3-Clause" ]
null
null
null
apps/MixMaster/Units/specificEntropy.py
VishalKandala/Cantera-1.7
750786f9b845a56fc177a9f1d5a9c5bb6ebd87cc
[ "BSD-3-Clause" ]
null
null
null
apps/MixMaster/Units/specificEntropy.py
VishalKandala/Cantera-1.7
750786f9b845a56fc177a9f1d5a9c5bb6ebd87cc
[ "BSD-3-Clause" ]
null
null
null
#!/bin/env python # #-------------------------------------------------------------------------- # # $License$ # #-------------------------------------------------------------------------- # $Log: specificEntropy.py,v $ # Revision 1.1.1.1 2003/04/14 17:57:49 dggoodwin # Initial import. # # Revision 1.1 2...
22.25
76
0.515605
import SI, energy, mass units = ['J__kg_K', 'kJ__kg_K', 'cal__g_K'] J__kg_K = SI.joule/(SI.kilogram * SI.kelvin) kJ__kg_K = 1000.0*J__kg_K cal__g_K = energy.calorie/(mass.gram * SI.kelvin)
true
true
1c4538dde779970879db26d139380a7fc2409bbd
683
py
Python
architectures/arch_dsprite_burgess-g_kyle_d_vae.py
christopher-beckham/amr
1bd67b9b4fb2fcf07cc8faba3c863f5ad5d4c4c0
[ "BSD-3-Clause" ]
35
2019-08-27T08:59:53.000Z
2021-09-19T15:55:34.000Z
architectures/arch_dsprite_burgess-g_kyle_d_vae.py
christopher-beckham/amr
1bd67b9b4fb2fcf07cc8faba3c863f5ad5d4c4c0
[ "BSD-3-Clause" ]
4
2020-01-14T05:09:31.000Z
2020-05-25T20:39:55.000Z
architectures/arch_dsprite_burgess-g_kyle_d_vae.py
christopher-beckham/amr
1bd67b9b4fb2fcf07cc8faba3c863f5ad5d4c4c0
[ "BSD-3-Clause" ]
3
2019-12-24T01:29:49.000Z
2020-12-06T01:56:19.000Z
import torch from torch import nn import torch.nn.functional as F #from .shared import networks from .konny.model import BetaVAE_B from . import discriminators from functools import partial # TODO: add logging to this def get_network(n_channels, ndf, **kwargs): gen = BetaVAE_B(nc=n_channels, vae=True) disc_x =...
31.045455
62
0.541728
import torch from torch import nn import torch.nn.functional as F from .konny.model import BetaVAE_B from . import discriminators from functools import partial def get_network(n_channels, ndf, **kwargs): gen = BetaVAE_B(nc=n_channels, vae=True) disc_x = discriminators.Discriminator(nf=ndf, ...
true
true
1c4539377f1b84b2035abe30a51c80e4b68b7573
4,856
py
Python
.venv/lib/python2.7/site-packages/celery/backends/cache.py
MansoorHanif/FYP-web-app
918008d3b5eedaa904f3e720296afde9d73ac3f4
[ "BSD-3-Clause" ]
4
2018-10-19T04:36:20.000Z
2020-02-13T16:14:09.000Z
.venv/lib/python2.7/site-packages/celery/backends/cache.py
MansoorHanif/FYP-web-app
918008d3b5eedaa904f3e720296afde9d73ac3f4
[ "BSD-3-Clause" ]
3
2020-02-11T23:03:45.000Z
2021-06-10T18:05:11.000Z
oo/lib/python3.5/site-packages/celery/backends/cache.py
chunky2808/SPOJ-history-Django-App
490c58b1593cd3626f0ddc27fdd09c6e8d1c56e1
[ "MIT" ]
1
2019-10-26T04:20:52.000Z
2019-10-26T04:20:52.000Z
# -*- coding: utf-8 -*- """Memcached and in-memory cache result backend.""" from __future__ import absolute_import, unicode_literals import sys from kombu.utils.encoding import bytes_to_str, ensure_bytes from kombu.utils.objects import cached_property from celery.exceptions import ImproperlyConfigured from celery.utils...
29.975309
79
0.632208
from __future__ import absolute_import, unicode_literals import sys from kombu.utils.encoding import bytes_to_str, ensure_bytes from kombu.utils.objects import cached_property from celery.exceptions import ImproperlyConfigured from celery.utils.functional import LRUCache from .base import KeyValueStoreBackend __all__ ...
true
true
1c453bfaaf39c5377c870fdd45ad36ff26553b79
13,662
py
Python
Behavioral decoding/HPC code/Flint_HPC_BDP_S_test.py
Next-Generation-Neural-Interfaces/Hardware-efficient-MUA-compression
853c6e0f3d085812e88fd0572ac7c64a172255d7
[ "MIT" ]
null
null
null
Behavioral decoding/HPC code/Flint_HPC_BDP_S_test.py
Next-Generation-Neural-Interfaces/Hardware-efficient-MUA-compression
853c6e0f3d085812e88fd0572ac7c64a172255d7
[ "MIT" ]
null
null
null
Behavioral decoding/HPC code/Flint_HPC_BDP_S_test.py
Next-Generation-Neural-Interfaces/Hardware-efficient-MUA-compression
853c6e0f3d085812e88fd0572ac7c64a172255d7
[ "MIT" ]
1
2022-02-23T21:52:02.000Z
2022-02-23T21:52:02.000Z
""" Evaluating spike-based BMI decoding using Wiener filter Load Flint data from matlab. HPC version. """ # import packages import numpy as np from HPC_working_dir.functions.preprocess import input_shaping, split_index from HPC_working_dir.functions.decoders import WienerCascadeDecoder from HPC_working_dir.fu...
48.792857
155
0.480091
import numpy as np from HPC_working_dir.functions.preprocess import input_shaping, split_index from HPC_working_dir.functions.decoders import WienerCascadeDecoder from HPC_working_dir.functions.metrics import compute_rmse, compute_pearson import time as timer import pickle from scipy import io import copy ...
true
true
1c453de5d7c24725e9fd95307eec625076dae59e
9,931
py
Python
hchztests/tests/test_container_virtualssh.py
codedsk/hubcheck-hubzero-tests
89dd7164fed9161a5bf80e0a5635cec3da5be31d
[ "MIT" ]
1
2016-01-02T01:36:14.000Z
2016-01-02T01:36:14.000Z
hchztests/tests/test_container_virtualssh.py
codedsk/hubcheck-hubzero-tests
89dd7164fed9161a5bf80e0a5635cec3da5be31d
[ "MIT" ]
null
null
null
hchztests/tests/test_container_virtualssh.py
codedsk/hubcheck-hubzero-tests
89dd7164fed9161a5bf80e0a5635cec3da5be31d
[ "MIT" ]
null
null
null
import hubcheck import os import pytest import re import sys pytestmark = [ pytest.mark.container, pytest.mark.virtualssh, pytest.mark.reboot ] class TestToolSession(hubcheck.testcase.TestCase2): def setup_method(self,method): self.username,self.userpass = \ ...
32.243506
93
0.598631
import hubcheck import os import pytest import re import sys pytestmark = [ pytest.mark.container, pytest.mark.virtualssh, pytest.mark.reboot ] class TestToolSession(hubcheck.testcase.TestCase2): def setup_method(self,method): self.username,self.userpass = \ ...
true
true
1c453f426ef1cb4b8320f235713f540c29364267
14,600
py
Python
shade/tests/unit/test__utils.py
obourdon/shade
6d9a821d722d270bf9b04827a8a65bddbaa68266
[ "Apache-2.0" ]
null
null
null
shade/tests/unit/test__utils.py
obourdon/shade
6d9a821d722d270bf9b04827a8a65bddbaa68266
[ "Apache-2.0" ]
null
null
null
shade/tests/unit/test__utils.py
obourdon/shade
6d9a821d722d270bf9b04827a8a65bddbaa68266
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
38.32021
79
0.597603
import random import string import tempfile from uuid import uuid4 import mock import testtools from shade import _utils from shade import exc from shade.tests.unit import base RANGE_DATA = [ dict(id=1, key1=1, key2=5), dict(id=2, key1=1, key2=20), dict(id=3, key1=2, key2=10), dict(id=4, key1=2, k...
true
true
1c453fdbba1ac5b86f5831ece9560ce0e7000157
2,630
py
Python
pytext/utils/distributed.py
twild-fb/pytext
07cadc0d130dac30d71d9da70380f124b3f5ac59
[ "BSD-3-Clause" ]
2
2019-06-27T21:32:26.000Z
2019-10-16T06:20:25.000Z
pytext/utils/distributed.py
twild-fb/pytext
07cadc0d130dac30d71d9da70380f124b3f5ac59
[ "BSD-3-Clause" ]
null
null
null
pytext/utils/distributed.py
twild-fb/pytext
07cadc0d130dac30d71d9da70380f124b3f5ac59
[ "BSD-3-Clause" ]
1
2019-10-16T06:20:26.000Z
2019-10-16T06:20:26.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import torch import torch.distributed as dist_c10d def dist_init( distributed_rank: int, world_size: int, init_method: str, device_id: int, backend: str = "nccl", ): """ 1. After spawn process pe...
32.875
82
0.653232
import torch import torch.distributed as dist_c10d def dist_init( distributed_rank: int, world_size: int, init_method: str, device_id: int, backend: str = "nccl", ): if init_method and world_size > 1 and torch.cuda.is_available(): dist_c10d.init_process_group( backend=back...
true
true
1c4542bacaf77780be537b1e01682b77026b72b7
1,980
py
Python
twitter_bot.py
sankarsh98/Twitter-Bot
34e7503ef31c452ff596a60aba8bfbb7fecf08b6
[ "MIT" ]
7
2021-12-12T16:34:19.000Z
2022-02-14T12:07:56.000Z
twitter_bot.py
sankarsh98/Twitter-Bot
34e7503ef31c452ff596a60aba8bfbb7fecf08b6
[ "MIT" ]
1
2021-12-12T17:00:04.000Z
2021-12-12T17:00:04.000Z
twitter_bot.py
sankarsh98/Twitter-Bot
34e7503ef31c452ff596a60aba8bfbb7fecf08b6
[ "MIT" ]
1
2021-12-12T13:21:52.000Z
2021-12-12T13:21:52.000Z
import time from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.keys import Keys # path to chrome driver, download it from https://sites.google.com/a/chromium.org/chromedriver/downloads chrome_driver = "/Users/sanky/Downloads/chromedriver" clas...
31.935484
104
0.664646
import time from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.keys import Keys chrome_driver = "/Users/sanky/Downloads/chromedriver" class TwitterBot: def __init__(self,username,password,mobile): self.browser=webdriver.Chrome(chr...
true
true
1c45432e3476eee07bd3665a03b2d5e4c182b9bb
6,538
py
Python
selfdrive/manager/manager.py
cfranyota/openpilot
977a0d829f0c6e373ffc6c3876d2cff77a1a5df2
[ "MIT" ]
2
2022-01-07T09:00:14.000Z
2022-01-07T10:06:02.000Z
selfdrive/manager/manager.py
cfranyota/openpilot
977a0d829f0c6e373ffc6c3876d2cff77a1a5df2
[ "MIT" ]
null
null
null
selfdrive/manager/manager.py
cfranyota/openpilot
977a0d829f0c6e373ffc6c3876d2cff77a1a5df2
[ "MIT" ]
3
2021-12-18T18:58:35.000Z
2022-01-29T05:05:08.000Z
#!/usr/bin/env python3 import datetime import os import signal import subprocess import sys import traceback from typing import List, Tuple, Union import cereal.messaging as messaging import selfdrive.sentry as sentry from common.basedir import BASEDIR from common.params import Params, ParamKeyType from common.text_wi...
27.821277
102
0.701285
import datetime import os import signal import subprocess import sys import traceback from typing import List, Tuple, Union import cereal.messaging as messaging import selfdrive.sentry as sentry from common.basedir import BASEDIR from common.params import Params, ParamKeyType from common.text_window import TextWindow ...
true
true
1c45433433a647c579569bbb598afc58791b69df
402
py
Python
utils/convert.py
alanhuang122/skyless-utils
773f23c37a95d97a3346948997b19eccbed8cc24
[ "MIT" ]
2
2018-09-12T19:47:19.000Z
2019-11-07T07:46:10.000Z
utils/convert.py
alanhuang122/skyless-utils
773f23c37a95d97a3346948997b19eccbed8cc24
[ "MIT" ]
11
2018-08-29T01:49:29.000Z
2019-07-08T18:54:16.000Z
utils/convert.py
alanhuang122/skyless-utils
773f23c37a95d97a3346948997b19eccbed8cc24
[ "MIT" ]
null
null
null
import json with open('skyless.dat', 'w') as f: for name in ['areas', 'bargains', 'domiciles', 'events', 'exchanges', 'personae', 'prospects', 'qualities', 'settings', 'ports']: with open(f'{name}.txt') as g: data = json.loads(g.read()) for line in data: ...
44.666667
133
0.512438
import json with open('skyless.dat', 'w') as f: for name in ['areas', 'bargains', 'domiciles', 'events', 'exchanges', 'personae', 'prospects', 'qualities', 'settings', 'ports']: with open(f'{name}.txt') as g: data = json.loads(g.read()) for line in data: ...
true
true
1c45439138577fd473020f8d53be33fe6f9ba3bf
421
py
Python
src/config/config.py
burakkkara/SeniorProject
1f878a5c007c910f210c900911897ff34c498b12
[ "Apache-2.0" ]
2
2022-01-10T07:24:06.000Z
2022-01-10T16:19:18.000Z
src/config/config.py
burakkkara/SeniorProject
1f878a5c007c910f210c900911897ff34c498b12
[ "Apache-2.0" ]
null
null
null
src/config/config.py
burakkkara/SeniorProject
1f878a5c007c910f210c900911897ff34c498b12
[ "Apache-2.0" ]
null
null
null
# Primary connection info primary = { 'ip': '192.168.1.34', 'port': 8080 } # Secondary connection info secondary = { 'ip': '192.168.43.38', # 'ip': '192.168.43.3854', 'port': 8081 } # Test server info # Resides on AWS server = { 'ip': '3.134.95.115', 'port': 8080 } # Request info requeste...
14.517241
30
0.565321
primary = { 'ip': '192.168.1.34', 'port': 8080 } secondary = { 'ip': '192.168.43.38', 'port': 8081 } server = { 'ip': '3.134.95.115', 'port': 8080 } requested = { 'httpVersion': 'http://', 'httpPort': 80, 'httpsPort': 443 } use_anonymous = True
true
true
1c45441e2bef433e828fef7485bbc809e1defc92
1,097
py
Python
tests/nark/log_tests.py
shadowmint/python-nark
7919c544c8386a023f6a9d0ffbc50e1145604528
[ "Apache-2.0" ]
null
null
null
tests/nark/log_tests.py
shadowmint/python-nark
7919c544c8386a023f6a9d0ffbc50e1145604528
[ "Apache-2.0" ]
null
null
null
tests/nark/log_tests.py
shadowmint/python-nark
7919c544c8386a023f6a9d0ffbc50e1145604528
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Douglas Linder # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
28.868421
74
0.703737
import unittest import bootstrap import nark class LogTests(unittest.TestCase): def test_can_create_logger(self): a = nark.Assert() i = nark.Logging.get() a.not_null(i, "Unable to create log instance") def test_can_log_message(self): a = nark.Assert() i = nark.Logging.get() i.debug("Hel...
true
true
1c4544f61fe44587878d56854ec0f0a9d3c481cd
9,875
py
Python
src/server.py
HintikkaKimmo/rasa_nlu
cf71683351f86a9880793273c8ce877c411f9de1
[ "Apache-2.0" ]
2
2016-12-20T13:19:44.000Z
2017-01-16T10:44:35.000Z
src/server.py
HintikkaKimmo/rasa_nlu
cf71683351f86a9880793273c8ce877c411f9de1
[ "Apache-2.0" ]
null
null
null
src/server.py
HintikkaKimmo/rasa_nlu
cf71683351f86a9880793273c8ce877c411f9de1
[ "Apache-2.0" ]
1
2017-01-02T15:16:49.000Z
2017-01-02T15:16:49.000Z
import argparse import json import os import urllib.parse import multiprocessing import glob import warnings import logging from http.server import BaseHTTPRequestHandler, HTTPServer from rasa_nlu.train import do_train from rasa_nlu.config import RasaNLUConfig class RasaNLUServer(object): def __init__(self, confi...
39.342629
119
0.621165
import argparse import json import os import urllib.parse import multiprocessing import glob import warnings import logging from http.server import BaseHTTPRequestHandler, HTTPServer from rasa_nlu.train import do_train from rasa_nlu.config import RasaNLUConfig class RasaNLUServer(object): def __init__(self, confi...
true
true
1c4545eeb5ecae107979a9aeead1b4bcf5bbd9f8
1,011
py
Python
var/spack/repos/builtin/packages/r-lsei/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2020-10-15T01:08:42.000Z
2021-10-18T01:28:18.000Z
var/spack/repos/builtin/packages/r-lsei/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2019-07-30T10:12:28.000Z
2019-12-17T09:02:27.000Z
var/spack/repos/builtin/packages/r-lsei/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
5
2019-07-30T09:42:14.000Z
2021-01-25T05:39:20.000Z
# Copyright 2013-2019 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 RLsei(RPackage): """It contains functions that solve least squares linear regression ...
43.956522
95
0.736894
from spack import * class RLsei(RPackage): homepage = "https://cloud.r-project.org/package=lsei" url = "https://cloud.r-project.org/src/contrib/lsei_1.2-0.tar.gz" list_url = "https://cloud.r-project.org/src/contrib/Archive/lsei" version('1.2-0', sha256='4781ebd9ef93880260d5d5f23066580ac06061e9...
true
true
1c45462adfeb644306dbba088d37aea211810842
77,143
py
Python
if/python/hpdf.py
yabaud/libharu
d84867ebf9f3de6afd661d2cdaff102457fbc371
[ "Zlib" ]
1,118
2015-01-09T10:40:33.000Z
2022-03-28T08:19:56.000Z
if/python/hpdf.py
yabaud/libharu
d84867ebf9f3de6afd661d2cdaff102457fbc371
[ "Zlib" ]
148
2015-01-09T02:47:40.000Z
2022-03-31T21:10:14.000Z
if/python/hpdf.py
yabaud/libharu
d84867ebf9f3de6afd661d2cdaff102457fbc371
[ "Zlib" ]
394
2015-01-23T17:06:52.000Z
2022-03-25T03:50:06.000Z
## ## * << Haru Free PDF Library 2.0.8 >> -- hpdf.h ## * ## * URL http://libharu.org/ ## * ## * Copyright (c) 1999-2006 Takeshi Kanno ## * ## * Permission to use, copy, modify, distribute and sell this software ## * and its documentation for any purpose is hereby granted without fee, ## * provided that the abo...
36.664924
213
0.572962
import os import sys import types def setpath(): dllpath='%s/dll' %(os.path.dirname(os.path.realpath(__file__))) if 'PATH' in os.environ: if dllpath not in os.environ['PATH']: os.environ['PATH']='%s;%s' % (dllpath, os.environ['PATH']) else: os.environ['PATH']=dllpa...
true
true
1c45468befaec83596d4e2e0316330f6b9f1a238
1,638
py
Python
generator/generator_test.py
kwyckmans/nonogram
f4a28027a269a37c9f266a2f0f6db9920b549c05
[ "Unlicense" ]
null
null
null
generator/generator_test.py
kwyckmans/nonogram
f4a28027a269a37c9f266a2f0f6db9920b549c05
[ "Unlicense" ]
2
2022-01-13T03:53:51.000Z
2022-03-12T00:59:47.000Z
generator/generator_test.py
kwyckmans/nonogram
f4a28027a269a37c9f266a2f0f6db9920b549c05
[ "Unlicense" ]
null
null
null
import unittest from generator.generator import CellValue, generate_nonogram class GeneratorTest(unittest.TestCase): """Tests generation of nonograms by providing the generator with various pixel configurations. TODO: add a single end-to-end test with a very simple image. """ def test_generator_for...
37.227273
98
0.696581
import unittest from generator.generator import CellValue, generate_nonogram class GeneratorTest(unittest.TestCase): def test_generator_for_full_black_row(self): pixel_data = {0: [CellValue.BLACK, CellValue.BLACK]} nonogram = generate_nonogram(pixel_data=pixel_data) self.assertIsNotNone(...
true
true
1c45472ed521b60ea9b1462d18e54e9cdaece161
96,554
py
Python
python/ccxt/async_support/bybit.py
dougvanzee/ccxt
ed06a2d180e02d1006f33be6ba65407ecb0a831b
[ "MIT" ]
3
2021-06-29T16:27:19.000Z
2021-07-18T08:36:07.000Z
python/ccxt/async_support/bybit.py
Bytedex/ccxt
3863b5e1d6c77d719ac102b0243964c4946e7abb
[ "MIT" ]
null
null
null
python/ccxt/async_support/bybit.py
Bytedex/ccxt
3863b5e1d6c77d719ac102b0243964c4946e7abb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import Authenticatio...
44.128885
253
0.461514
from ccxt.async_support.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadRequest from ccxt.base.errors import Insufficie...
true
true
1c45498823d147eda5f301807dd3845f13b71b1d
5,632
py
Python
tests/python/relax/test_expr.py
psrivas2/relax
4329af78eb1dc4c4ff8a61d3bf39aa4034e9cb2a
[ "Apache-2.0" ]
90
2021-11-30T11:58:10.000Z
2022-03-31T02:24:04.000Z
tests/python/relax/test_expr.py
psrivas2/relax
4329af78eb1dc4c4ff8a61d3bf39aa4034e9cb2a
[ "Apache-2.0" ]
64
2021-11-22T23:58:23.000Z
2022-03-31T03:19:22.000Z
tests/python/relax/test_expr.py
psrivas2/relax
4329af78eb1dc4c4ff8a61d3bf39aa4034e9cb2a
[ "Apache-2.0" ]
27
2021-12-09T22:39:27.000Z
2022-03-24T23:21:48.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...
30.608696
64
0.636719
import pytest import tvm from tvm import tir from tvm import relax as rx import numpy as np def test_var() -> None: v0 = rx.Var("v0") assert v0.name_hint == "v0" assert v0.shape_ is None assert v0._checked_type_ is None shape_anno = [54, 96] type_anno = rx.DynTensorType(2, "float32") v1 = ...
true
true
1c454a4e8e42c6d6b32f7a64da00659348fb0aba
14,119
py
Python
cvat/apps/authentication/auth.py
adasdevops/ADAS_UPDATE_STABLE
306202b4e291b5876e3dd4fdd201c761e9d182f0
[ "Intel", "MIT" ]
null
null
null
cvat/apps/authentication/auth.py
adasdevops/ADAS_UPDATE_STABLE
306202b4e291b5876e3dd4fdd201c761e9d182f0
[ "Intel", "MIT" ]
null
null
null
cvat/apps/authentication/auth.py
adasdevops/ADAS_UPDATE_STABLE
306202b4e291b5876e3dd4fdd201c761e9d182f0
[ "Intel", "MIT" ]
1
2022-03-04T09:18:30.000Z
2022-03-04T09:18:30.000Z
# Copyright (C) 2018 Intel Corporation # # SPDX-License-Identifier: MIT from django.conf import settings from django.db.models import Q import rules from . import AUTH_ROLE from . import signature from rest_framework.permissions import BasePermission from django.core import signing from rest_framework import authentic...
39.54902
137
0.738154
from django.conf import settings from django.db.models import Q import rules from . import AUTH_ROLE from . import signature from rest_framework.permissions import BasePermission from django.core import signing from rest_framework import authentication, exceptions from rest_framework.authentication import TokenAuthent...
true
true
1c454b16a8c78878e2eced338b13aad8690829d4
3,793
py
Python
modelzoo/hnn.py
ml-jku/mc-lstm
8bbaece3ecb4187a76c6318d4c6e40c1dcc71303
[ "MIT" ]
18
2021-03-27T06:31:59.000Z
2022-02-24T09:48:57.000Z
modelzoo/hnn.py
ml-jku/mc-lstm
8bbaece3ecb4187a76c6318d4c6e40c1dcc71303
[ "MIT" ]
null
null
null
modelzoo/hnn.py
ml-jku/mc-lstm
8bbaece3ecb4187a76c6318d4c6e40c1dcc71303
[ "MIT" ]
7
2021-03-27T21:01:23.000Z
2021-09-21T14:27:59.000Z
import torch from torch import nn class HNN(nn.Module): '''Learn arbitrary vector fields that are sums of conservative and solenoidal fields''' def __init__(self, input_dim, differentiable_model, field_type='solenoidal', baseline=False, assume_canonical_coords=True): super(HNN, self)...
35.448598
108
0.613499
import torch from torch import nn class HNN(nn.Module): def __init__(self, input_dim, differentiable_model, field_type='solenoidal', baseline=False, assume_canonical_coords=True): super(HNN, self).__init__() self.baseline = baseline self.differentiable_model = differentia...
true
true
1c454b8c0ca00f4367578dddf2f1c44be75fbd3e
4,182
py
Python
share/seeds/generate-seeds.py
enixt/enixt
6bc063558ccb1a66e28d26bd6e2903c2d4346633
[ "MIT" ]
1
2019-01-15T18:37:03.000Z
2019-01-15T18:37:03.000Z
share/seeds/generate-seeds.py
enixt/enixt
6bc063558ccb1a66e28d26bd6e2903c2d4346633
[ "MIT" ]
null
null
null
share/seeds/generate-seeds.py
enixt/enixt
6bc063558ccb1a66e28d26bd6e2903c2d4346633
[ "MIT" ]
2
2018-03-10T19:32:49.000Z
2019-12-20T01:32:03.000Z
#!/usr/bin/python # Copyright (c) 2014 Wladmir J. van der Laan # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory ...
31.681818
98
0.587996
from __future__ import print_function, division from base64 import b32decode from binascii import a2b_hex import sys, os import re pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff]) pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43]) def name_to_ipv6(addr): if len(addr)>6 and addr.endswith('.oni...
true
true
1c454f649b1049f927a2a7419ab2e09e87c4ce45
3,531
py
Python
widgets.py/migrations/0001_initial.py
deejungx/goalza
c9ec93aad13228bccd9f185cfac6ff9e1fc1994a
[ "MIT" ]
1
2019-05-04T11:26:14.000Z
2019-05-04T11:26:14.000Z
widgets.py/migrations/0001_initial.py
deejungx/goalza
c9ec93aad13228bccd9f185cfac6ff9e1fc1994a
[ "MIT" ]
null
null
null
widgets.py/migrations/0001_initial.py
deejungx/goalza
c9ec93aad13228bccd9f185cfac6ff9e1fc1994a
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2019-05-02 11:46 import datetime from django.db import migrations, models import django.db.models.deletion import pages.models import pages.myFields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( ...
47.08
217
0.57859
import datetime from django.db import migrations, models import django.db.models.deletion import pages.models import pages.myFields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='FutsalCompany', ...
true
true
1c454f9b0ae3d0e44d374d4620851100121f28e8
70,561
py
Python
django/db/models/base.py
yswai/django
90c706e44fa1e640245ad4626f0e3ecb176acce2
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/db/models/base.py
yswai/django
90c706e44fa1e640245ad4626f0e3ecb176acce2
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/db/models/base.py
yswai/django
90c706e44fa1e640245ad4626f0e3ecb176acce2
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import copy import inspect import warnings from itertools import chain from django.apps import apps from django.conf import settings from django.core import checks from django.core.exceptions import ( NON_FIELD_ERRORS, FieldDoesNotExist, FieldError, MultipleObjectsReturned,...
41.752071
114
0.572639
from __future__ import unicode_literals import copy import inspect import warnings from itertools import chain from django.apps import apps from django.conf import settings from django.core import checks from django.core.exceptions import ( NON_FIELD_ERRORS, FieldDoesNotExist, FieldError, MultipleObjectsReturned,...
true
true
1c4552d4e09eadd115dbba54a37526988ca931f4
1,291
py
Python
examples/django/backend/urls.py
envoy/polarwind
bb9781c00abe2b6dfd96b24e8820c6ec50be3e24
[ "MIT" ]
15
2020-06-23T15:23:53.000Z
2022-01-12T21:28:06.000Z
examples/django/backend/urls.py
envoy/polarwind
bb9781c00abe2b6dfd96b24e8820c6ec50be3e24
[ "MIT" ]
221
2020-06-25T18:25:30.000Z
2022-03-24T13:06:20.000Z
examples/django/backend/urls.py
envoy/polarwind
bb9781c00abe2b6dfd96b24e8820c6ec50be3e24
[ "MIT" ]
null
null
null
"""backend URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
34.891892
86
0.703331
from django.contrib import admin from django.urls import path, re_path, include from django.conf import settings from cra_helper.views import proxy_cra_requests from . import views urlpatterns = [ path('', views.home_view, name='home'), path('auth', include('envoy_auth.urls')), path('admin/', admin.site....
true
true
1c45542f594a46b1b10eaa45a732b7fa7822eaba
11,884
py
Python
virtual_ta/data_conversions.py
ilankham/virtual-teaching-assistant
105dddee4284209d1deebbfa60793ba7d99c3748
[ "MIT" ]
2
2017-11-21T20:42:41.000Z
2018-03-05T01:18:30.000Z
virtual_ta/data_conversions.py
ilankham/virtual-teaching-assistant
105dddee4284209d1deebbfa60793ba7d99c3748
[ "MIT" ]
null
null
null
virtual_ta/data_conversions.py
ilankham/virtual-teaching-assistant
105dddee4284209d1deebbfa60793ba7d99c3748
[ "MIT" ]
null
null
null
"""Creates functions for converting between data formats""" from calendar import day_name from collections import OrderedDict from csv import DictReader from datetime import date, timedelta from io import BytesIO, FileIO, StringIO, TextIOWrapper from typing import BinaryIO, Dict, List, TextIO, Union from openpyxl imp...
38.089744
79
0.680326
from calendar import day_name from collections import OrderedDict from csv import DictReader from datetime import date, timedelta from io import BytesIO, FileIO, StringIO, TextIOWrapper from typing import BinaryIO, Dict, List, TextIO, Union from openpyxl import load_workbook from ruamel.yaml import YAML from ruamel.y...
true
true
1c45545157e97f9c4e1cc68b6cafb654b5d57282
439
py
Python
news/views.py
valch85/newssite
ef612a7bde4ff1d6e1e35f5cc4ec9407f031270e
[ "Apache-2.0" ]
null
null
null
news/views.py
valch85/newssite
ef612a7bde4ff1d6e1e35f5cc4ec9407f031270e
[ "Apache-2.0" ]
2
2020-02-12T00:16:37.000Z
2020-06-05T20:42:49.000Z
news/views.py
valch85/newssite
ef612a7bde4ff1d6e1e35f5cc4ec9407f031270e
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render, get_object_or_404 from .models import News # Create your views here. def index(request): latest_news_list = News.objects.order_by('-pub_date')[:10] context = {'latest_news_list': latest_news_list} return render(request, 'news/index.html', context) def detail(request, ...
27.4375
62
0.728929
from django.shortcuts import render, get_object_or_404 from .models import News def index(request): latest_news_list = News.objects.order_by('-pub_date')[:10] context = {'latest_news_list': latest_news_list} return render(request, 'news/index.html', context) def detail(request, news_id): new = get_ob...
true
true
1c4554791df5c97d5a6a036317b43076dea94512
9,639
py
Python
celery_manager/static_precompiler/compilers/base.py
churchlab/millstone
ddb5d003a5b8a7675e5a56bafd5c432d9642b473
[ "MIT" ]
45
2015-09-30T14:55:33.000Z
2021-06-28T02:33:30.000Z
celery_manager/static_precompiler/compilers/base.py
churchlab/millstone
ddb5d003a5b8a7675e5a56bafd5c432d9642b473
[ "MIT" ]
261
2015-06-03T20:41:56.000Z
2022-03-07T08:46:10.000Z
celery_manager/static_precompiler/compilers/base.py
churchlab/millstone
ddb5d003a5b8a7675e5a56bafd5c432d9642b473
[ "MIT" ]
22
2015-06-04T20:43:10.000Z
2022-02-27T08:27:34.000Z
# coding: utf-8 from django.conf import settings from django.contrib.staticfiles import finders from static_precompiler.models import Dependency from static_precompiler.settings import STATIC_ROOT, ROOT, OUTPUT_DIR from static_precompiler.utils import get_mtime import logging import os logger = logging.getLogger("sta...
32.674576
90
0.641768
from django.conf import settings from django.contrib.staticfiles import finders from static_precompiler.models import Dependency from static_precompiler.settings import STATIC_ROOT, ROOT, OUTPUT_DIR from static_precompiler.utils import get_mtime import logging import os logger = logging.getLogger("static_precompiler"...
true
true
1c4554d8d53932ad17004044f7fe096837dd57b5
6,209
py
Python
infra/bots/recipe_modules/core/api.py
henry-luo/skia
2f2187b66dca1761f590668d3cbdf07453df7b6f
[ "BSD-3-Clause" ]
null
null
null
infra/bots/recipe_modules/core/api.py
henry-luo/skia
2f2187b66dca1761f590668d3cbdf07453df7b6f
[ "BSD-3-Clause" ]
null
null
null
infra/bots/recipe_modules/core/api.py
henry-luo/skia
2f2187b66dca1761f590668d3cbdf07453df7b6f
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0201 import json import os import re import sys from recipe_engine import recipe_api from recipe_engine import config_types class Sk...
36.739645
80
0.639717
import json import os import re import sys from recipe_engine import recipe_api from recipe_engine import config_types class SkiaApi(recipe_api.RecipeApi): def setup(self): self.m.vars.setup() self.checkout_steps() if not self.m.path.exists(self.m.vars.tmp_dir): self.m.run.run_once...
true
true
1c4554eae75d1b7c7c6e5d32aeb944d8689b1f7b
345
py
Python
Payment/manage.py
silop4all/payment-api
c331af421cd882d0b82d291251d1ce1c7f1a7223
[ "Apache-2.0" ]
2
2018-02-27T20:51:15.000Z
2019-11-25T10:12:06.000Z
Payment/manage.py
silop4all/payment-api
c331af421cd882d0b82d291251d1ce1c7f1a7223
[ "Apache-2.0" ]
null
null
null
Payment/manage.py
silop4all/payment-api
c331af421cd882d0b82d291251d1ce1c7f1a7223
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ Command-line utility for administrative tasks. """ import os import sys if __name__ == "__main__": os.environ.setdefault( "DJANGO_SETTINGS_MODULE", "Payment.settings" ) from django.core.management import execute_from_command_line execute_from...
19.166667
65
0.675362
import os import sys if __name__ == "__main__": os.environ.setdefault( "DJANGO_SETTINGS_MODULE", "Payment.settings" ) from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
true
true
1c45550a7c5f0ce477cb38a1f1274ca4f984e780
1,326
py
Python
zerver/management/commands/sync_ldap_user_data.py
Supermanu/zulip
26f6d708c2e30cfe50d9d61031edb759e8117596
[ "Apache-2.0" ]
null
null
null
zerver/management/commands/sync_ldap_user_data.py
Supermanu/zulip
26f6d708c2e30cfe50d9d61031edb759e8117596
[ "Apache-2.0" ]
15
2020-06-05T18:44:15.000Z
2022-03-11T23:26:03.000Z
zerver/management/commands/sync_ldap_user_data.py
Supermanu/zulip
26f6d708c2e30cfe50d9d61031edb759e8117596
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from typing import Any from django.core.management.base import BaseCommand from django.db.utils import IntegrityError from django.conf import settings from zproject.backends import ZulipLDAPUserPopulator from zerver.models import UserProfile from zerver.lib.logging_util import ...
35.837838
93
0.692308
from __future__ import absolute_import from typing import Any from django.core.management.base import BaseCommand from django.db.utils import IntegrityError from django.conf import settings from zproject.backends import ZulipLDAPUserPopulator from zerver.models import UserProfile from zerver.lib.logging_util import ...
true
true
1c45559ff167fb23cf4728841148d6e890c7d890
2,190
py
Python
app.py
ODU-Internship/BedSore
c9927ce181eb48fc93a3d2adf2330cc0ec412182
[ "MIT" ]
null
null
null
app.py
ODU-Internship/BedSore
c9927ce181eb48fc93a3d2adf2330cc0ec412182
[ "MIT" ]
null
null
null
app.py
ODU-Internship/BedSore
c9927ce181eb48fc93a3d2adf2330cc0ec412182
[ "MIT" ]
null
null
null
import os import plotly.express as px import plotly.figure_factory as ff import dash import dash_core_components as dcc import dash_html_components as html import numpy as np import time external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_stylesheets=ext...
32.205882
79
0.607763
import os import plotly.express as px import plotly.figure_factory as ff import dash import dash_core_components as dcc import dash_html_components as html import numpy as np import time external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_stylesheets=ext...
true
true
1c4558ef8db3c87d9205525a1d0af1de3e5c9a0d
1,816
py
Python
digitaltmuseum/controllers/duplicates.py
danmichaelo/digimus-commons
32a44823dadbe0ae0160ff24fcbb7645d8304ff7
[ "Unlicense" ]
1
2020-08-10T15:12:50.000Z
2020-08-10T15:12:50.000Z
digitaltmuseum/controllers/duplicates.py
danmichaelo/digimus-commons
32a44823dadbe0ae0160ff24fcbb7645d8304ff7
[ "Unlicense" ]
null
null
null
digitaltmuseum/controllers/duplicates.py
danmichaelo/digimus-commons
32a44823dadbe0ae0160ff24fcbb7645d8304ff7
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 import sqlite3 import urllib.request, urllib.parse, urllib.error from flask import render_template from .controller import Controller class DuplicatesController(Controller): def __init__(self, app, c...
39.478261
132
0.543502
import sqlite3 import urllib.request, urllib.parse, urllib.error from flask import render_template from .controller import Controller class DuplicatesController(Controller): def __init__(self, app, config): Controller.__init__(self, app) self.config = config def get(self): db = self...
true
true
1c45595dbeb1ee754f37d0d735e5cb42d450fdc5
463
py
Python
python3/third_max.py
joshiaj7/CodingChallenges
f95dd79132f07c296e074d675819031912f6a943
[ "MIT" ]
1
2020-10-08T09:17:40.000Z
2020-10-08T09:17:40.000Z
python3/third_max.py
joshiaj7/CodingChallenges
f95dd79132f07c296e074d675819031912f6a943
[ "MIT" ]
null
null
null
python3/third_max.py
joshiaj7/CodingChallenges
f95dd79132f07c296e074d675819031912f6a943
[ "MIT" ]
null
null
null
""" Space : O(1) Time : O(n) """ class Solution: def thirdMax(self, nums: List[int]) -> int: a, b, c = -10**10, -10**10, -10**10 nums = list(set(nums)) n = len(nums) for i in nums: a = max(i, a) if n <= 2: return a for j in nums: ...
15.965517
47
0.360691
class Solution: def thirdMax(self, nums: List[int]) -> int: a, b, c = -10**10, -10**10, -10**10 nums = list(set(nums)) n = len(nums) for i in nums: a = max(i, a) if n <= 2: return a for j in nums: if j < a: b =...
true
true
1c4559619debbfab81b5667b6115f6d8185615c5
1,229
py
Python
benchmark/generate_libs/jamplus.py
chadaustin/ibb
ea1e25cc53a1ad7c302a12d95fc704c443924dff
[ "MIT" ]
4
2015-04-09T17:24:58.000Z
2019-07-02T12:05:56.000Z
benchmark/generate_libs/jamplus.py
chadaustin/ibb
ea1e25cc53a1ad7c302a12d95fc704c443924dff
[ "MIT" ]
null
null
null
benchmark/generate_libs/jamplus.py
chadaustin/ibb
ea1e25cc53a1ad7c302a12d95fc704c443924dff
[ "MIT" ]
1
2019-11-08T15:38:29.000Z
2019-11-08T15:38:29.000Z
#!/usr/bin/python import os.path import cppcodebase import random def CreateLibJamfile(lib_number, classes): os.chdir(cppcodebase.lib_name(lib_number)) handle = file("Jamfile.jam", "w") handle.write ("SubDir TOP lib_" + str(lib_number) + " ;\n\n") handle.write ("SubDirHdrs $(INCLUDES) ;\n\n") han...
29.261905
107
0.643613
import os.path import cppcodebase import random def CreateLibJamfile(lib_number, classes): os.chdir(cppcodebase.lib_name(lib_number)) handle = file("Jamfile.jam", "w") handle.write ("SubDir TOP lib_" + str(lib_number) + " ;\n\n") handle.write ("SubDirHdrs $(INCLUDES) ;\n\n") handle.write ("Librar...
true
true
1c4559ad4582ddb2d757dd3fc5e5fa4bd27dcdd3
5,260
py
Python
build/android/pylib/base_test_sharder.py
leiferikb/bitpop-private
4c967307d228e86f07f2576068a169e846c833ca
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2021-11-15T15:17:43.000Z
2021-11-15T15:17:43.000Z
build/android/pylib/base_test_sharder.py
leiferikb/bitpop-private
4c967307d228e86f07f2576068a169e846c833ca
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
build/android/pylib/base_test_sharder.py
leiferikb/bitpop-private
4c967307d228e86f07f2576068a169e846c833ca
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2019-02-21T16:13:42.000Z
2019-02-21T16:13:42.000Z
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import android_commands import logging import multiprocessing from android_commands import errors from forwarder import Forwarder from test_result impo...
34.834437
79
0.680989
import android_commands import logging import multiprocessing from android_commands import errors from forwarder import Forwarder from test_result import TestResults def _ShardedTestRunnable(test): log_format = '[' + test.device + '] # %(asctime)-15s: %(message)s' if logging.getLogger().handlers: logging.g...
true
true
1c455a3b6c64198e9f6c6b8b99f938134a554603
817
py
Python
mmelemental/models/forcefield/bonded/bonds/base.py
RlyehAD/mmelemental
5f0754356fd2c89e9119cf810f1972430dfa75dc
[ "BSD-3-Clause" ]
null
null
null
mmelemental/models/forcefield/bonded/bonds/base.py
RlyehAD/mmelemental
5f0754356fd2c89e9119cf810f1972430dfa75dc
[ "BSD-3-Clause" ]
null
null
null
mmelemental/models/forcefield/bonded/bonds/base.py
RlyehAD/mmelemental
5f0754356fd2c89e9119cf810f1972430dfa75dc
[ "BSD-3-Clause" ]
null
null
null
from pydantic import Field from mmelemental.models.forcefield.params import Params from typing import Optional, List, Tuple, Union from cmselemental.types import Array import os import pathlib __all__ = ["Bonds"] class Bonds(Params): lengths: Array[float] = Field( ..., description="Equilibrium bond lengt...
34.041667
119
0.684211
from pydantic import Field from mmelemental.models.forcefield.params import Params from typing import Optional, List, Tuple, Union from cmselemental.types import Array import os import pathlib __all__ = ["Bonds"] class Bonds(Params): lengths: Array[float] = Field( ..., description="Equilibrium bond lengt...
true
true
1c455aa0f8a6d073be57b1f48b7b42ece8de7bc8
22,104
py
Python
cirq/ops/three_qubit_gates.py
Hongbo-Miao/Cirq
d6c6f9b1ea282e79db4475e5327d0380e6558ba6
[ "Apache-2.0" ]
null
null
null
cirq/ops/three_qubit_gates.py
Hongbo-Miao/Cirq
d6c6f9b1ea282e79db4475e5327d0380e6558ba6
[ "Apache-2.0" ]
null
null
null
cirq/ops/three_qubit_gates.py
Hongbo-Miao/Cirq
d6c6f9b1ea282e79db4475e5327d0380e6558ba6
[ "Apache-2.0" ]
1
2020-12-24T07:13:40.000Z
2020-12-24T07:13:40.000Z
# Copyright 2018 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
34.864353
100
0.513346
from typing import AbstractSet, Any, List, Optional, Tuple, TYPE_CHECKING import numpy as np import sympy from cirq import linalg, protocols, value from cirq._compat import proper_repr from cirq._doc import document from cirq.ops import ( common_gates, controlled_gate, eigen_gate, gate_features, ...
true
true
1c455c21b416c77406ef8ef3f269649ffa99767d
657
py
Python
tests/while/test_while_class_in_body.py
sco1/pylox
b4820828306c20cee3f8533c2547fafb92c6c1bd
[ "MIT" ]
2
2021-12-18T01:52:50.000Z
2022-01-17T19:41:52.000Z
tests/while/test_while_class_in_body.py
sco1/pylox
b4820828306c20cee3f8533c2547fafb92c6c1bd
[ "MIT" ]
18
2021-11-30T04:05:53.000Z
2022-02-01T03:30:04.000Z
tests/while/test_while_class_in_body.py
sco1/pylox
b4820828306c20cee3f8533c2547fafb92c6c1bd
[ "MIT" ]
null
null
null
from textwrap import dedent import pytest from pylox.lox import Lox # Base cases from https://github.com/munificent/craftinginterpreters/blob/master/test/while/class_in_body.lox TEST_SRC = dedent( """\ // [line 2] Error at 'class': Expect expression. while (true) class Foo {} """ ) EXPECTED_STDOUTS ...
24.333333
109
0.727549
from textwrap import dedent import pytest from pylox.lox import Lox TEST_SRC = dedent( """\ // [line 2] Error at 'class': Expect expression. while (true) class Foo {} """ ) EXPECTED_STDOUTS = ["2:14: LoxParseError: Expected expression."] def test_class_in_body(capsys: pytest.CaptureFixture) -> Non...
true
true
1c455d557f5e17a71c8823251f3fd837386f7ace
2,004
py
Python
launch/mouse_with_lidar.launch.py
rt-net/raspimouse_ros2_examples
f16aef6c087a6e6325801b9f6a10b272b4d59c91
[ "Apache-2.0" ]
30
2020-05-08T12:13:03.000Z
2021-12-27T20:14:43.000Z
launch/mouse_with_lidar.launch.py
rt-net/raspimouse_ros2_examples
f16aef6c087a6e6325801b9f6a10b272b4d59c91
[ "Apache-2.0" ]
16
2020-05-28T02:35:24.000Z
2021-12-10T05:41:31.000Z
launch/mouse_with_lidar.launch.py
rt-net/raspimouse_ros2_examples
f16aef6c087a6e6325801b9f6a10b272b4d59c91
[ "Apache-2.0" ]
4
2020-10-02T23:50:02.000Z
2021-08-25T14:19:17.000Z
# Copyright 2020 RT Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
35.785714
75
0.72006
import os from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import DeclareLaunchArgument from launch.actions import IncludeLaunchDescription from launch.actions import OpaqueFunction from launch.launch_description_sources import PythonLaunchDe...
true
true
1c455e490ae1d668471a3db85f33281fb0cacecb
1,017
py
Python
CGPA_Claculator.py
DharaneeswaranR/CGPA-Calculator
ce8390288057ac8e1f79b2d76a233e63d6d7402c
[ "BSD-3-Clause" ]
1
2021-11-20T15:42:15.000Z
2021-11-20T15:42:15.000Z
CGPA_Claculator.py
DharaneeswaranR/CGPA-Calculator
ce8390288057ac8e1f79b2d76a233e63d6d7402c
[ "BSD-3-Clause" ]
null
null
null
CGPA_Claculator.py
DharaneeswaranR/CGPA-Calculator
ce8390288057ac8e1f79b2d76a233e63d6d7402c
[ "BSD-3-Clause" ]
null
null
null
def calculate_cgpa(grade_points, credits, num): mark_sum = list() for i in range(num): Mark_sum.append(grade_points[i] * credits[i]) cgpa = sum(mark_sum) / sum(credits) return cgpa if __name__ == '__main__': num = int(input("\nEnter number of subjects : ")) grade_points = list() ...
26.763158
82
0.547689
def calculate_cgpa(grade_points, credits, num): mark_sum = list() for i in range(num): Mark_sum.append(grade_points[i] * credits[i]) cgpa = sum(mark_sum) / sum(credits) return cgpa if __name__ == '__main__': num = int(input("\nEnter number of subjects : ")) grade_points = list() ...
true
true
1c455ea2754f11157926ef47242fd8393fbd2d15
9,560
py
Python
mlfromscratch/supervised_learning/regression.py
sourcepirate/ML-From-Scratch
c6839bf47c360d6fa48861302fd90ccd4a8c38db
[ "MIT" ]
null
null
null
mlfromscratch/supervised_learning/regression.py
sourcepirate/ML-From-Scratch
c6839bf47c360d6fa48861302fd90ccd4a8c38db
[ "MIT" ]
null
null
null
mlfromscratch/supervised_learning/regression.py
sourcepirate/ML-From-Scratch
c6839bf47c360d6fa48861302fd90ccd4a8c38db
[ "MIT" ]
2
2017-10-03T07:45:16.000Z
2018-12-21T01:31:21.000Z
from __future__ import print_function, division import numpy as np import math from mlfromscratch.utils import normalize, polynomial_features class Regression(object): """ Base regression model. Models the relationship between a scalar dependent variable y and the independent variables X. Parameters: ...
43.853211
114
0.688808
from __future__ import print_function, division import numpy as np import math from mlfromscratch.utils import normalize, polynomial_features class Regression(object): def __init__(self, reg_factor, n_iterations, learning_rate, gradient_descent): self.w = None self.n_iterations = n_iterations ...
true
true
1c455f55b99a0f9313f7b61d44989bbe51ff3591
72,468
py
Python
intersight/model/virtualization_vmware_datacenter_relationship.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/virtualization_vmware_datacenter_relationship.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/virtualization_vmware_datacenter_relationship.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
63.070496
1,678
0.659325
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def lazy_...
true
true
1c455fa5c65ef452e853463256b07757be1b7bac
41,048
py
Python
lib/matplotlib/lines.py
SoftwareDev/mat-plot-lib
abaf94859d5ef6e653a4d8a7ce2c59cea1724a57
[ "MIT", "BSD-3-Clause" ]
3
2015-02-25T21:51:26.000Z
2020-01-05T14:11:52.000Z
lib/matplotlib/lines.py
SoftwareDev/mat-plot-lib
abaf94859d5ef6e653a4d8a7ce2c59cea1724a57
[ "MIT", "BSD-3-Clause" ]
7
2015-05-08T19:36:25.000Z
2015-06-30T15:32:17.000Z
lib/matplotlib/lines.py
OceanWolf/matplotlib
a429c415bdb6e54ccfe004a48fdc034ea8e9d329
[ "MIT", "BSD-3-Clause" ]
6
2015-06-05T03:34:06.000Z
2022-01-25T09:07:10.000Z
""" This module contains all the 2D line class which can draw with a variety of line styles, markers and colors. """ # TODO: expose cap and join style attrs from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings import numpy as np from...
32.474684
79
0.568018
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings import numpy as np from numpy import ma from matplotlib import verbose from . import artist from .artist import Artist from .cbook import iterable, is_string_like, is_numlike, ls_m...
true
true
1c456142bbc95af7e87173cb0cb84afd5f28b013
929
py
Python
interprete/src/models/gpt/example.py
serjtroshin/PLBART
58e5de3041a2fc8b98e54648c6489fb3c23db9cb
[ "MIT" ]
null
null
null
interprete/src/models/gpt/example.py
serjtroshin/PLBART
58e5de3041a2fc8b98e54648c6489fb3c23db9cb
[ "MIT" ]
null
null
null
interprete/src/models/gpt/example.py
serjtroshin/PLBART
58e5de3041a2fc8b98e54648c6489fb3c23db9cb
[ "MIT" ]
null
null
null
# from transformers import pipeline # generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B') # generator("EleutherAI has", do_sample=True, min_length=50) # [{'generated_text': 'EleutherAI has made a commitment to create new software packages for each of its major clients and has'}] from transformers...
42.227273
128
0.779333
from transformers import GPT2Tokenizer, GPT2Model model_name = "microsoft/CodeGPT-small-java-adaptedGPT2" tokenizer = GPT2Tokenizer.from_pretrained(model_name) model = GPT2Model.from_pretrained(model_name) text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') print(model)...
true
true
1c456237e48e7b21db5e6e1bb2ccae546249bad4
7,590
py
Python
prov/constants.py
AndreiFrunze/wrangler
076a07de00fc966dcf18ca6b6a6e804be5245ed9
[ "Apache-2.0" ]
2
2017-09-07T04:33:18.000Z
2019-01-07T13:32:15.000Z
prov/constants.py
AndreiFrunze/wrangler
076a07de00fc966dcf18ca6b6a6e804be5245ed9
[ "Apache-2.0" ]
2
2016-10-06T13:07:05.000Z
2017-12-20T09:47:08.000Z
prov/constants.py
AndreiFrunze/wrangler
076a07de00fc966dcf18ca6b6a6e804be5245ed9
[ "Apache-2.0" ]
5
2016-09-01T08:38:20.000Z
2018-08-28T12:08:39.000Z
from __future__ import (absolute_import, division, print_function, unicode_literals) __author__ = 'Trung Dong Huynh' __email__ = 'trungdong@donggiang.com' import six # # PROV record constants - PROV-DM # Built-in namespaces from prov.identifier import Namespace XSD = Namespace('xsd', 'http...
33.584071
75
0.691304
from __future__ import (absolute_import, division, print_function, unicode_literals) __author__ = 'Trung Dong Huynh' __email__ = 'trungdong@donggiang.com' import six from prov.identifier import Namespace XSD = Namespace('xsd', 'http://www.w3.org/2001/XMLSchema#') PROV = Namespace('prov', 'h...
true
true
1c45639a0e721d5529cabef77a05e804e7bcec90
3,371
py
Python
application/app.py
StephenSpicer/airbnb_app
ea9b92dbd35d508d2f819255d026b299d63285a8
[ "MIT" ]
null
null
null
application/app.py
StephenSpicer/airbnb_app
ea9b92dbd35d508d2f819255d026b299d63285a8
[ "MIT" ]
null
null
null
application/app.py
StephenSpicer/airbnb_app
ea9b92dbd35d508d2f819255d026b299d63285a8
[ "MIT" ]
null
null
null
# Import Statements import pandas as pd from flask import Flask, render_template, request from joblib import load from .predict import get_prediction # Instantiate Application # def create_app(): # app = Flask(__name__) # @app.route('/') # def hello_heroku(): # return "hello heroku" # return a...
34.752577
114
0.589143
import pandas as pd from flask import Flask, render_template, request from joblib import load from .predict import get_prediction def create_app(): app = Flask(__name__) load_model = load('application/finalized_model.sav') @app.route('/') def form(): return render_template('form.ht...
true
true
1c456470d18841deab9b9d0f37410c49dd5f194b
8,894
py
Python
dragonfly/opt/multiobjective_optimiser.py
hase1128/dragonfly
4be7e4c539d3edccc4d243ab9f972b1ffb0d9a5c
[ "MIT" ]
null
null
null
dragonfly/opt/multiobjective_optimiser.py
hase1128/dragonfly
4be7e4c539d3edccc4d243ab9f972b1ffb0d9a5c
[ "MIT" ]
null
null
null
dragonfly/opt/multiobjective_optimiser.py
hase1128/dragonfly
4be7e4c539d3edccc4d243ab9f972b1ffb0d9a5c
[ "MIT" ]
null
null
null
""" Defines a class for Multi-objective Blackbox Optimisation. -- bparia@cs.cmu.edu -- kandasamy@cs.cmu.edu """ # NB: In this file, the acronym MOO/moo refers to multi-objective optimisation. --KK # pylint: disable=abstract-class-little-used # pylint: disable=invalid-name from __future__ import division from a...
40.798165
88
0.723746
from __future__ import division from argparse import Namespace import numpy as np from ..exd.exd_core import ExperimentDesigner, exd_core_args from ..exd.experiment_caller import MultiFunctionCaller, FunctionCaller from ..utils.general_utils import update_pareto_set multiobjective_opt_args = exd_core_args _NO_MF_...
true
true
1c4564ebef61049797c74cdf7ecdeb24f8731ca0
2,471
py
Python
tests/test_marmiton.py
squat-house/recipe-scrapers
72d2f69196f95210d2ea248f3b5cb446f94fd2b2
[ "MIT" ]
2
2020-07-28T15:12:10.000Z
2020-07-30T18:10:33.000Z
tests/test_marmiton.py
bfcarpio/recipe-scrapers
827ec444bc9d422a98c84c05cc4e4bcd3d084d51
[ "MIT" ]
1
2022-01-08T10:49:17.000Z
2022-01-08T10:49:30.000Z
tests/test_marmiton.py
AlexRogalskiy/recipe-scrapers
ff378b3ba4ae7ff4cbc113ca13991f887c1c70e7
[ "MIT" ]
1
2022-01-08T10:49:09.000Z
2022-01-08T10:49:09.000Z
from recipe_scrapers.marmiton import Marmiton from tests import ScraperTest class TestMarmitonScraper(ScraperTest): scraper_class = Marmiton def test_host(self): self.assertEqual("marmiton.org", self.harvester_class.host()) def test_canonical_url(self): self.assertEqual( "ht...
38.015385
114
0.607446
from recipe_scrapers.marmiton import Marmiton from tests import ScraperTest class TestMarmitonScraper(ScraperTest): scraper_class = Marmiton def test_host(self): self.assertEqual("marmiton.org", self.harvester_class.host()) def test_canonical_url(self): self.assertEqual( "ht...
true
true
1c4564ec45018750930b24c198003bce822d9fed
2,333
py
Python
script.py
jornix/Stavanger-school-learning-results
9974cac4ebb91ea51b0437f8b7750feac3049804
[ "MIT" ]
null
null
null
script.py
jornix/Stavanger-school-learning-results
9974cac4ebb91ea51b0437f8b7750feac3049804
[ "MIT" ]
null
null
null
script.py
jornix/Stavanger-school-learning-results
9974cac4ebb91ea51b0437f8b7750feac3049804
[ "MIT" ]
null
null
null
import pandas as pd from matplotlib import pyplot as plt import seaborn as sns # Read csv and store in dataframe df df = pd.read_csv("results.csv") df.drop(["index"], axis=1).reset_index(drop=True) # Separate fifth grade tests femte_trinn = df[ (df["statistikk"] == "Nasjonale prøver 5. trinn") & (pd.isna(df["ver...
29.910256
87
0.717531
import pandas as pd from matplotlib import pyplot as plt import seaborn as sns df = pd.read_csv("results.csv") df.drop(["index"], axis=1).reset_index(drop=True) femte_trinn = df[ (df["statistikk"] == "Nasjonale prøver 5. trinn") & (pd.isna(df["verdi"]) == False) ].reset_index(drop=True) femte_trinn_engelsk = fe...
true
true
1c4565b7ff36d1855854ec42200d3c17a32a5c55
1,561
py
Python
apps/wagtail/myblog/migrations/0002_auto_20210425_1951.py
aadrm/breakoutwagtail
cf4ce09153adf2b5e14f15ffbc82bda754d427b3
[ "MIT" ]
null
null
null
apps/wagtail/myblog/migrations/0002_auto_20210425_1951.py
aadrm/breakoutwagtail
cf4ce09153adf2b5e14f15ffbc82bda754d427b3
[ "MIT" ]
null
null
null
apps/wagtail/myblog/migrations/0002_auto_20210425_1951.py
aadrm/breakoutwagtail
cf4ce09153adf2b5e14f15ffbc82bda754d427b3
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2021-04-25 19:51 import apps.wagtail.streams.blocks from django.db import migrations import wagtail.core.blocks import wagtail.core.fields import wagtail.images.blocks class Migration(migrations.Migration): dependencies = [ ('myblog', '0001_initial'), ] operations...
55.75
511
0.695708
import apps.wagtail.streams.blocks from django.db import migrations import wagtail.core.blocks import wagtail.core.fields import wagtail.images.blocks class Migration(migrations.Migration): dependencies = [ ('myblog', '0001_initial'), ] operations = [ migrations.AddField( mo...
true
true
1c4565b95bce497665b69de99a26e49f66b582e5
416
py
Python
simple-backend/stave_backend/migrations/0002_document_ontology.py
mylibrar/stave
43145015253d0577dfc757419ad8b4fa06a04042
[ "Apache-2.0" ]
35
2020-01-29T04:21:10.000Z
2021-12-13T01:44:28.000Z
simple-backend/stave_backend/migrations/0002_document_ontology.py
mylibrar/stave
43145015253d0577dfc757419ad8b4fa06a04042
[ "Apache-2.0" ]
86
2020-04-17T16:36:13.000Z
2022-03-25T22:51:34.000Z
simple-backend/stave_backend/migrations/0002_document_ontology.py
mylibrar/stave
43145015253d0577dfc757419ad8b4fa06a04042
[ "Apache-2.0" ]
18
2020-02-04T17:40:02.000Z
2021-06-17T07:11:42.000Z
# Generated by Django 3.0.2 on 2020-01-13 18:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('stave_backend', '0001_initial'), ] operations = [ migrations.AddField( model_name='document', name='ontology', ...
20.8
47
0.586538
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('stave_backend', '0001_initial'), ] operations = [ migrations.AddField( model_name='document', name='ontology', field=models.TextField(default=''), ...
true
true
1c4565d7e382b201d1238aef00abd33b71ffbf9f
3,402
py
Python
src/tests/config_test.py
dixonwhitmire/lib-kafka
a29ec606278ad1ed8c5ada418e45593fe71dbaec
[ "Apache-2.0" ]
null
null
null
src/tests/config_test.py
dixonwhitmire/lib-kafka
a29ec606278ad1ed8c5ada418e45593fe71dbaec
[ "Apache-2.0" ]
6
2021-11-03T15:17:29.000Z
2021-11-05T14:10:56.000Z
src/tests/config_test.py
dixonwhitmire/lib-kafka
a29ec606278ad1ed8c5ada418e45593fe71dbaec
[ "Apache-2.0" ]
1
2021-11-01T12:21:11.000Z
2021-11-01T12:21:11.000Z
import os import pytest from pydantic import ValidationError from lib_kafka import config as configuration import importlib from tests import resources_directory @pytest.fixture(autouse=True) def reset(): reset_env_vars() def reset_env_vars(): for env_var in ("KAFKA_BROKER_CONFIG_FILE", "KAFKA_TOPIC_CONFIG_...
32.4
113
0.683422
import os import pytest from pydantic import ValidationError from lib_kafka import config as configuration import importlib from tests import resources_directory @pytest.fixture(autouse=True) def reset(): reset_env_vars() def reset_env_vars(): for env_var in ("KAFKA_BROKER_CONFIG_FILE", "KAFKA_TOPIC_CONFIG_...
true
true
1c4565e0dbfa4053de453a8497b1789732532024
1,386
py
Python
beorn_lib/version.py
PAntoine/beorn_lib
a5bb8859acfb136f33559b6ddbf3bb20f61bd310
[ "MIT" ]
null
null
null
beorn_lib/version.py
PAntoine/beorn_lib
a5bb8859acfb136f33559b6ddbf3bb20f61bd310
[ "MIT" ]
null
null
null
beorn_lib/version.py
PAntoine/beorn_lib
a5bb8859acfb136f33559b6ddbf3bb20f61bd310
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #--------------------------------------------------------------------------------- # # ,--. # | |-. ,---. ,---. ,--.--.,--,--, # | .-. '| .-. :| .-. || .--'| \ # | `-' |\ --.' '-' '| | ...
37.459459
82
0.328283
# `---' `----' `---' `--' `--''--' __author__ = "Peter Antoine" __copyright__ = "Copyright 2014-2021, Peter Antoine" __credits__ = ["Peter Antoine"] __license__ = "MIT" __version__ = "1.5.0" __maintainer__ = "Peter Antoine" __email__ = "github@peterantoine.me.uk" __url__ = "https://github...
true
true
1c456664268f1c7c8973969844fb625e7b99c69c
6,122
py
Python
dmwmclient/restclient.py
FernandoGarzon/dmwmclient
aa69978b430f6626864718ddfa21951f2bb41d06
[ "BSD-3-Clause" ]
1
2022-02-01T16:06:15.000Z
2022-02-01T16:06:15.000Z
dmwmclient/restclient.py
FernandoGarzon/dmwmclient
aa69978b430f6626864718ddfa21951f2bb41d06
[ "BSD-3-Clause" ]
3
2020-03-04T23:34:39.000Z
2020-04-03T22:19:44.000Z
dmwmclient/restclient.py
nsmith-/dmwmclient
726a9400f5270e0521dc9d2c1bffed3c0af410a2
[ "BSD-3-Clause" ]
4
2020-03-17T15:39:10.000Z
2021-06-10T22:51:11.000Z
import os import logging import json import httpx import asyncio from lxml import etree from . import __version__ logger = logging.getLogger(__name__) def locate_proxycert(): """Find a user proxy""" path = os.getenv("X509_USER_PROXY") if path is not None: return path path = "/tmp/x509up_u%d"...
37.329268
90
0.571219
import os import logging import json import httpx import asyncio from lxml import etree from . import __version__ logger = logging.getLogger(__name__) def locate_proxycert(): path = os.getenv("X509_USER_PROXY") if path is not None: return path path = "/tmp/x509up_u%d" % os.getuid() if os.pat...
true
true
1c4566b1e1aee1b8f0aa8bfb88df64b92879f477
7,636
py
Python
sdk/python/pulumi_azure_native/network/v20180301/get_profile.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20180301/get_profile.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20180301/get_profile.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
38.761421
225
0.667234
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetProfileResult', 'AwaitableGetProfileResult', 'get_profile', ] @pulumi.output_type class GetProfileResult: def __ini...
true
true
1c45678f9f69f1c3e03546028ce022e51687f2b5
48,532
py
Python
hytra/core/hypothesesgraph.py
m-novikov/hytra
0dc28deaa2571fa8bea63ca178f0e53cc1cd7508
[ "MIT" ]
null
null
null
hytra/core/hypothesesgraph.py
m-novikov/hytra
0dc28deaa2571fa8bea63ca178f0e53cc1cd7508
[ "MIT" ]
null
null
null
hytra/core/hypothesesgraph.py
m-novikov/hytra
0dc28deaa2571fa8bea63ca178f0e53cc1cd7508
[ "MIT" ]
null
null
null
import logging import copy import networkx as nx import numpy as np from sklearn.neighbors import KDTree import hytra.core.jsongraph from hytra.core.jsongraph import negLog, listify from hytra.util.progressbar import DefaultProgressVisitor logger = logging.getLogger(__name__) def getTraxelFeatureVector(traxel, feat...
43.643885
166
0.557879
import logging import copy import networkx as nx import numpy as np from sklearn.neighbors import KDTree import hytra.core.jsongraph from hytra.core.jsongraph import negLog, listify from hytra.util.progressbar import DefaultProgressVisitor logger = logging.getLogger(__name__) def getTraxelFeatureVector(traxel, feat...
true
true
1c4567adc8fd9e1e995c1211c7aa015c0a2da7ee
4,059
py
Python
blockchain_client.py
JB1984/TheBlock
0e0b00034424d7453651b5efc2ef71a13f3719c4
[ "MIT" ]
null
null
null
blockchain_client.py
JB1984/TheBlock
0e0b00034424d7453651b5efc2ef71a13f3719c4
[ "MIT" ]
6
2018-09-14T21:00:41.000Z
2018-09-27T11:05:52.000Z
blockchain_client.py
JB1984/TheBlock
0e0b00034424d7453651b5efc2ef71a13f3719c4
[ "MIT" ]
null
null
null
from collections import OrderedDict import binascii import base64 import json import Crypto import Crypto.Random from Crypto.Hash import SHA from Crypto.PublicKey import RSA from Crypto.Signature import PKCS1_v1_5 import requests from flask import Flask, jsonify, request, render_template class Tran...
29.845588
114
0.649914
from collections import OrderedDict import binascii import base64 import json import Crypto import Crypto.Random from Crypto.Hash import SHA from Crypto.PublicKey import RSA from Crypto.Signature import PKCS1_v1_5 import requests from flask import Flask, jsonify, request, render_template class Tran...
true
true
1c4567eaf684081be1c5f842fe292f61cc1719a8
1,370
py
Python
dataloader/dataloaders.py
misads/cv_template
9976ee0ada449a494d26f896c598610f233edc10
[ "MIT" ]
69
2020-09-01T11:23:48.000Z
2022-03-26T08:42:16.000Z
dataloader/dataloaders.py
misads/cv_template
9976ee0ada449a494d26f896c598610f233edc10
[ "MIT" ]
3
2021-02-16T09:22:09.000Z
2022-01-02T07:54:39.000Z
dataloader/dataloaders.py
misads/cv_template
9976ee0ada449a494d26f896c598610f233edc10
[ "MIT" ]
15
2020-07-07T06:37:33.000Z
2022-03-21T07:37:33.000Z
# encoding=utf-8 from dataloader.image_list import ListTrainValDataset, ListTestDataset from dataloader.transforms import get_transform from torch.utils.data import DataLoader from options import opt import pdb import os ################### TEST_DATASET_HAS_OPEN = False # 有没有开放测试集 ################### train_list = o...
35.128205
126
0.783212
from dataloader.image_list import ListTrainValDataset, ListTestDataset from dataloader.transforms import get_transform from torch.utils.data import DataLoader from options import opt import pdb import os TEST_DATASET_HAS_OPEN = False train_list = os.path.join('datasets', opt.dataset, 'train.txt') val_list = os.path...
true
true
1c45681e99e7576cdadf4d81110b8dbc5fa1dd25
4,730
py
Python
graph_objs/ohlc/_line.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
graph_objs/ohlc/_line.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
graph_objs/ohlc/_line.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "ohlc" _path_str = "ohlc.line" _valid_props = {"dash", "width"} # dash # ---- @pro...
31.324503
82
0.532981
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): _parent_path_str = "ohlc" _path_str = "ohlc.line" _valid_props = {"dash", "width"} @property def dash(self): return self["dash"] ...
true
true
1c45687ed1e1d1996e74a33c71010180e5f720d1
6,785
py
Python
Localization/particle_filter/particle_filter.py
MerdanBay/PythonRobotics
71de5d038f348d347d7b5dc00c914d523cd59f92
[ "MIT" ]
1
2021-12-02T01:45:01.000Z
2021-12-02T01:45:01.000Z
Localization/particle_filter/particle_filter.py
MerdanBay/PythonRobotics
71de5d038f348d347d7b5dc00c914d523cd59f92
[ "MIT" ]
null
null
null
Localization/particle_filter/particle_filter.py
MerdanBay/PythonRobotics
71de5d038f348d347d7b5dc00c914d523cd59f92
[ "MIT" ]
1
2022-01-14T11:11:24.000Z
2022-01-14T11:11:24.000Z
""" Particle Filter localization sample author: Atsushi Sakai (@Atsushi_twi) """ import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../utils/") import math import matplotlib.pyplot as plt import numpy as np from utils.angle import rot_mat_2d # Estimation parameter of PF Q = np.di...
25.700758
80
0.506853
import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../utils/") import math import matplotlib.pyplot as plt import numpy as np from utils.angle import rot_mat_2d Q = np.diag([0.2]) ** 2 R = np.diag([2.0, np.deg2rad(40.0)]) ** 2 Q_sim = np.diag([0.2]) ** 2 R_sim = np.diag([1.0, np....
true
true
1c45694042710f3d8d3724815e70347ae2585bff
1,850
py
Python
thedoctor/tests/test_integration.py
hhuuggoo/thedoctor
84c11377dc16ef8208480cd2745ce1ffc5614865
[ "BSD-2-Clause" ]
37
2015-02-24T21:59:04.000Z
2021-07-13T19:04:34.000Z
thedoctor/tests/test_integration.py
hhuuggoo/thedoctor
84c11377dc16ef8208480cd2745ce1ffc5614865
[ "BSD-2-Clause" ]
1
2015-03-23T20:23:41.000Z
2015-03-23T21:09:58.000Z
thedoctor/tests/test_integration.py
hhuuggoo/thedoctor
84c11377dc16ef8208480cd2745ce1ffc5614865
[ "BSD-2-Clause" ]
7
2015-03-17T17:18:27.000Z
2020-07-30T13:05:42.000Z
from .utils import raises from .. import ValidationError from .. import validate from ..validators import dict_validator, true def test_integration(): @validate(a=int, b=int) def func(a, b): return (a, b) assert func(1, 2) == (1, 2) assert raises(ValidationError, func, 1, 'a') @validate(a...
26.428571
76
0.584324
from .utils import raises from .. import ValidationError from .. import validate from ..validators import dict_validator, true def test_integration(): @validate(a=int, b=int) def func(a, b): return (a, b) assert func(1, 2) == (1, 2) assert raises(ValidationError, func, 1, 'a') @validate(a...
true
true
1c45697bb34e4558711a296700d158a28ef349c2
1,054
py
Python
onnxruntime/__init__.py
NonStatic2014/onnxruntime
bdfd46082a152e9605199b4f01664fc76f97a346
[ "MIT" ]
null
null
null
onnxruntime/__init__.py
NonStatic2014/onnxruntime
bdfd46082a152e9605199b4f01664fc76f97a346
[ "MIT" ]
10
2019-03-25T21:47:46.000Z
2019-04-30T02:33:05.000Z
onnxruntime/__init__.py
NonStatic2014/onnxruntime
bdfd46082a152e9605199b4f01664fc76f97a346
[ "MIT" ]
1
2019-04-09T16:15:51.000Z
2019-04-09T16:15:51.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -------------------------------------------------------------------------- """ ONNX Runtime enables high-performance evaluation of trained machine l...
47.909091
217
0.701139
__version__ = "0.5.0" __author__ = "Microsoft" from onnxruntime.capi._pybind_state import get_all_providers, get_available_providers, get_device, RunOptions, SessionOptions, set_default_logger_severity, NodeArg, ModelMetadata, GraphOptimizationLevel, ExecutionMode from onnxruntime.capi.session import InferenceSession ...
true
true
1c4569ce9ebd3c7cda1043c0df205b8a956f5f5e
3,842
py
Python
image_train.py
to0mi1/image-categorization-based-cifar10
96218f2f60faf424b26112559a170a05463113bb
[ "MIT" ]
1
2019-04-16T08:42:32.000Z
2019-04-16T08:42:32.000Z
image_train.py
to0mi1/image-categorization-based-cifar10
96218f2f60faf424b26112559a170a05463113bb
[ "MIT" ]
null
null
null
image_train.py
to0mi1/image-categorization-based-cifar10
96218f2f60faf424b26112559a170a05463113bb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ モデルを作成しトレーニングを行う """ import os from keras.models import Sequential from keras.layers import Conv2D, MaxPooling2D, Dense, Dropout, Activation, Flatten from keras.utils import plot_model from keras.preprocessing.image import ImageDataGenerator from keras.utils import plot_model from keras.pre...
30.736
107
0.656689
import os from keras.models import Sequential from keras.layers import Conv2D, MaxPooling2D, Dense, Dropout, Activation, Flatten from keras.utils import plot_model from keras.preprocessing.image import ImageDataGenerator from keras.utils import plot_model from keras.preprocessing import image from keras.callbacks impo...
true
true
1c456a5b82ba05659c5a11cb9ea95320d3f81903
2,818
py
Python
test/functional/rpc_getblockfilter.py
CallMeMisterOwl/bitcoin
9d2895157ec0ff6e356f40c5fe84d3007fc991c1
[ "MIT" ]
2
2020-08-16T16:27:01.000Z
2020-08-20T06:19:32.000Z
test/functional/rpc_getblockfilter.py
CallMeMisterOwl/bitcoin
9d2895157ec0ff6e356f40c5fe84d3007fc991c1
[ "MIT" ]
1
2022-01-08T14:38:57.000Z
2022-01-08T14:38:57.000Z
test/functional/rpc_getblockfilter.py
CallMeMisterOwl/bitcoin
9d2895157ec0ff6e356f40c5fe84d3007fc991c1
[ "MIT" ]
1
2022-02-19T19:33:46.000Z
2022-02-19T19:33:46.000Z
#!/usr/bin/env python3 # Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the getblockfilter RPC.""" from test_framework.test_framework import BitcoinTestFramework from te...
43.353846
112
0.688077
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, assert_is_hex_string, assert_raises_rpc_error, ) FILTER_TYPES = ["basic"] class GetBlockFilterTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True ...
true
true
1c456aa4cb7c1dda13e25217b75d8708106ea6d2
14,192
py
Python
sdk/python/pulumi_azure_nextgen/securityinsights/v20190101preview/get_incident.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/securityinsights/v20190101preview/get_incident.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/securityinsights/v20190101preview/get_incident.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
39.532033
483
0.666995
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetIncidentResult', 'AwaitableGetIncidentResult', 'get_incident', ] @pulumi.output_type class GetIncidentResult: def __...
true
true
1c456b4651c14bf62f1b981a4373ef3876f9cc4a
10,375
py
Python
python/tvm/relay/analysis.py
Checkmate50/tvm
0293f42232ac2506c9cf8914410282c54ee4c0ed
[ "Apache-2.0" ]
null
null
null
python/tvm/relay/analysis.py
Checkmate50/tvm
0293f42232ac2506c9cf8914410282c54ee4c0ed
[ "Apache-2.0" ]
null
null
null
python/tvm/relay/analysis.py
Checkmate50/tvm
0293f42232ac2506c9cf8914410282c54ee4c0ed
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
24.585308
95
0.64212
from . import _analysis from . import _make from .expr import Expr from .ty import Type from .module import Module from .feature import Feature def post_order_visit(expr, fvisit): return _analysis.post_order_visit(expr, fvisit) def well_formed(expr): return _analysis.well_formed(expr) def check_kind(t, mo...
true
true
1c456c74c2cf7a473b376d5f287a9bb1a2b9f3b9
5,363
py
Python
netbox/utilities/forms/widgets.py
letic/netbox
0930745e16330edf00da081150b079d5ed6ecc02
[ "Apache-2.0" ]
2
2021-07-08T03:58:12.000Z
2022-02-11T21:50:46.000Z
netbox/utilities/forms/widgets.py
letic/netbox
0930745e16330edf00da081150b079d5ed6ecc02
[ "Apache-2.0" ]
25
2019-09-17T19:40:50.000Z
2022-03-11T04:01:55.000Z
netbox/utilities/forms/widgets.py
letic/netbox
0930745e16330edf00da081150b079d5ed6ecc02
[ "Apache-2.0" ]
1
2022-02-11T21:50:58.000Z
2022-02-11T21:50:58.000Z
import json from django import forms from django.conf import settings from django.contrib.postgres.forms import SimpleArrayField from utilities.choices import ColorChoices from .utils import add_blank_choice, parse_numeric_range __all__ = ( 'APISelect', 'APISelectMultiple', 'BulkEditNullBooleanSelect', ...
28.078534
120
0.641618
import json from django import forms from django.conf import settings from django.contrib.postgres.forms import SimpleArrayField from utilities.choices import ColorChoices from .utils import add_blank_choice, parse_numeric_range __all__ = ( 'APISelect', 'APISelectMultiple', 'BulkEditNullBooleanSelect', ...
true
true
1c456cd394ed39fe157a450029b8b5c2dcc40bd1
598
py
Python
src/modax/training/.ipynb_checkpoints/utils-checkpoint.py
GJBoth/modax
c7e1c128d4dd48b776f8ec4fa724c2e4b6e13c82
[ "MIT" ]
2
2021-12-10T14:36:37.000Z
2022-02-10T11:47:03.000Z
src/modax/training/.ipynb_checkpoints/utils-checkpoint.py
GJBoth/modax
c7e1c128d4dd48b776f8ec4fa724c2e4b6e13c82
[ "MIT" ]
null
null
null
src/modax/training/.ipynb_checkpoints/utils-checkpoint.py
GJBoth/modax
c7e1c128d4dd48b776f8ec4fa724c2e4b6e13c82
[ "MIT" ]
2
2020-12-22T14:49:13.000Z
2021-04-09T08:52:08.000Z
from jax import jit, value_and_grad from functools import partial import jax.profiler def create_update(loss_fn, loss_fn_args): def step(opt, state, loss_fn, loss_fn_args): grad_fn = value_and_grad(loss_fn, argnums=0, has_aux=True) (loss, (updated_state, metrics, output)), grad = grad_fn( ...
35.176471
73
0.704013
from jax import jit, value_and_grad from functools import partial import jax.profiler def create_update(loss_fn, loss_fn_args): def step(opt, state, loss_fn, loss_fn_args): grad_fn = value_and_grad(loss_fn, argnums=0, has_aux=True) (loss, (updated_state, metrics, output)), grad = grad_fn( ...
true
true
1c456f4aeae0fd4829f9f0818a661eb6433b1c8e
399
py
Python
tests/multidl/downloaders/test_local_file_downloader.py
gazay/chiliad
771b3d0f7004f2a03094bad7bcc0103715a6c73f
[ "MIT" ]
16
2018-02-12T23:47:26.000Z
2021-07-23T12:43:05.000Z
tests/multidl/downloaders/test_local_file_downloader.py
gazay/chiliad
771b3d0f7004f2a03094bad7bcc0103715a6c73f
[ "MIT" ]
6
2017-10-14T15:36:52.000Z
2022-02-13T17:17:17.000Z
tests/multidl/downloaders/test_local_file_downloader.py
gazay/chiliad
771b3d0f7004f2a03094bad7bcc0103715a6c73f
[ "MIT" ]
6
2018-05-11T00:16:00.000Z
2021-05-03T02:02:55.000Z
# -*- coding: utf-8 -*- import pytest from multidl.downloaders.local_file_downloader import LocalFileDownloader @pytest.mark.parametrize('url, expected', [ ('file:///dir/file1.txt', 'file1.txt'), ('file:///file2.txt', 'file2.txt'), ]) def test_get_file_name(tmpdir, url, expected): downloader = LocalFile...
26.6
73
0.704261
import pytest from multidl.downloaders.local_file_downloader import LocalFileDownloader @pytest.mark.parametrize('url, expected', [ ('file:///dir/file1.txt', 'file1.txt'), ('file:///file2.txt', 'file2.txt'), ]) def test_get_file_name(tmpdir, url, expected): downloader = LocalFileDownloader(url, str(tmpd...
true
true
1c456f6f57902768c2181ef37ffa76b83cb79aad
2,283
py
Python
src/demo/worker_flags.py
Ravi-0809/question-generation
9065a3b47293b8a69a0548af1f6bedd4a4aa7f9c
[ "MIT" ]
212
2018-08-15T11:06:35.000Z
2021-11-21T10:21:55.000Z
src/demo/worker_flags.py
Ravi-0809/question-generation
9065a3b47293b8a69a0548af1f6bedd4a4aa7f9c
[ "MIT" ]
44
2018-10-15T12:50:31.000Z
2020-11-13T18:02:03.000Z
src/demo/worker_flags.py
Ravi-0809/question-generation
9065a3b47293b8a69a0548af1f6bedd4a4aa7f9c
[ "MIT" ]
51
2018-08-17T18:17:43.000Z
2021-03-04T06:14:52.000Z
class FlagsObject(object): pass FLAGS = FlagsObject() # config FLAGS.testing = False FLAGS.model_type = 'RL-S2S' FLAGS.restore = False FLAGS.restore_path = None FLAGS.policy_gradient = False FLAGS.glove_vocab = False FLAGS.embedding_loss = False FLAGS.latent_switch = False FLAGS.combine_vocab = False FLAGS.l...
19.852174
41
0.782742
class FlagsObject(object): pass FLAGS = FlagsObject() FLAGS.testing = False FLAGS.model_type = 'RL-S2S' FLAGS.restore = False FLAGS.restore_path = None FLAGS.policy_gradient = False FLAGS.glove_vocab = False FLAGS.embedding_loss = False FLAGS.latent_switch = False FLAGS.combine_vocab = False FLAGS.lr_schedul...
true
true
1c4572039e05249fc64e7f7a9e3e39836024d635
9,745
py
Python
theseus/geometry/so2.py
jeffin07/theseus
3498bbddf9cca740c2703d0c1aa3a78a7264cb15
[ "MIT" ]
236
2021-12-03T15:59:29.000Z
2022-03-30T23:18:33.000Z
theseus/geometry/so2.py
jeffin07/theseus
3498bbddf9cca740c2703d0c1aa3a78a7264cb15
[ "MIT" ]
85
2021-12-06T07:04:11.000Z
2022-03-31T20:29:26.000Z
theseus/geometry/so2.py
jeffin07/theseus
3498bbddf9cca740c2703d0c1aa3a78a7264cb15
[ "MIT" ]
12
2021-12-03T22:02:44.000Z
2022-03-20T14:58:27.000Z
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import List, Optional, Tuple, Union, cast import torch import theseus.constants from .lie_group import LieGroup from .point_t...
33.719723
88
0.548794
from typing import List, Optional, Tuple, Union, cast import torch import theseus.constants from .lie_group import LieGroup from .point_types import Point2 class SO2(LieGroup): def __init__( self, theta: Optional[torch.Tensor] = None, data: Optional[torch.Tensor] = None, name: ...
true
true
1c457240e1e5b43e46789912d1b54ae8e79edea8
1,095
py
Python
clients/python-blueplanet/generated/app/openapi_server/test/test_pal_park_area_controller.py
cliffano/pokeapi-clients
92af296c68c3e94afac52642ae22057faaf071ee
[ "MIT" ]
null
null
null
clients/python-blueplanet/generated/app/openapi_server/test/test_pal_park_area_controller.py
cliffano/pokeapi-clients
92af296c68c3e94afac52642ae22057faaf071ee
[ "MIT" ]
null
null
null
clients/python-blueplanet/generated/app/openapi_server/test/test_pal_park_area_controller.py
cliffano/pokeapi-clients
92af296c68c3e94afac52642ae22057faaf071ee
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import from flask import json from six import BytesIO from openapi_server.test import BaseTestCase class TestPalParkAreaController(BaseTestCase): """PalParkAreaController integration test stubs""" def test_pal_park_area_list(self): """Test case for p...
25.465116
77
0.584475
from __future__ import absolute_import from flask import json from six import BytesIO from openapi_server.test import BaseTestCase class TestPalParkAreaController(BaseTestCase): def test_pal_park_area_list(self): query_string = [('limit', 56), ('offset', 56)] response =...
true
true
1c45730c64130865dfab642c09670520f0db3188
5,508
py
Python
gammagl/layers/conv/hetero_wrapper.py
BUPT-GAMMA/GammaGL
2b9f32e1ac3533cb75a063243e8a2fa654466d18
[ "Apache-2.0" ]
null
null
null
gammagl/layers/conv/hetero_wrapper.py
BUPT-GAMMA/GammaGL
2b9f32e1ac3533cb75a063243e8a2fa654466d18
[ "Apache-2.0" ]
null
null
null
gammagl/layers/conv/hetero_wrapper.py
BUPT-GAMMA/GammaGL
2b9f32e1ac3533cb75a063243e8a2fa654466d18
[ "Apache-2.0" ]
null
null
null
import tensorlayerx as tlx import gammagl.mpops as mpops import warnings from collections import defaultdict from typing import Dict, Optional def group(xs, aggr): if len(xs) == 0: return None elif aggr is None: return tlx.stack(xs, axis=1) elif len(xs) == 1: return xs[0] else: ...
37.469388
79
0.564089
import tensorlayerx as tlx import gammagl.mpops as mpops import warnings from collections import defaultdict from typing import Dict, Optional def group(xs, aggr): if len(xs) == 0: return None elif aggr is None: return tlx.stack(xs, axis=1) elif len(xs) == 1: return xs[0] else: ...
true
true
1c45736df60cd6ec7b8c468f4bdacbfcf5d93fef
10,202
py
Python
9_export_fbx_bitbucket_stable/fbx_deformer.py
makehumancommunity/community-plugins-fbx
1f78be1723063cee0ae83232587431ab0f2e9894
[ "MIT" ]
1
2020-04-17T16:32:06.000Z
2020-04-17T16:32:06.000Z
9_export_fbx_bitbucket_stable/fbx_deformer.py
makehumancommunity/community-plugins-fbx
1f78be1723063cee0ae83232587431ab0f2e9894
[ "MIT" ]
null
null
null
9_export_fbx_bitbucket_stable/fbx_deformer.py
makehumancommunity/community-plugins-fbx
1f78be1723063cee0ae83232587431ab0f2e9894
[ "MIT" ]
5
2019-06-01T07:04:17.000Z
2022-02-21T14:14:51.000Z
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- """ **Project Name:** MakeHuman **Product Home Page:** http://www.makehuman.org/ **Code Home Page:** https://bitbucket.org/MakeHuman/makehuman/ **Authors:** Thomas Larsson, Jonas Hauquier **Copyright(c):** MakeHuman Team 2001-2017 **Licensing:** ...
29.917889
96
0.525387
import transformations as tm from .fbx_utils import * def getObjectCounts(meshes): nVertexGroups = 0 for mesh in meshes: if mesh.vertexWeights is None: continue for weights in mesh.vertexWeights.data: if weights: nVertexGroups += 1 nShapes = 0 ...
true
true
1c4573e4d03b690f34aa54ed5a53a2890c2dddaf
1,030
py
Python
src/data/425.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/425.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/425.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
import sys def main(): sys.setrecursionlimit(1000000) N, Q = [int(x) for x in input().split()] # 隣接リスト形式でグラフをつくる # 重み付きの場合は、[行き先, weight]をそれぞれの行に持たせれば良い。 graph = [[] for i in range(N)] for i in range(N - 1): a, b = [int(x) for x in input().split()] graph[a - 1].append(b - 1) ...
23.953488
64
0.551456
import sys def main(): sys.setrecursionlimit(1000000) N, Q = [int(x) for x in input().split()] graph = [[] for i in range(N)] for i in range(N - 1): a, b = [int(x) for x in input().split()] graph[a - 1].append(b - 1) graph[b - 1].append(a - 1) queries = [] fo...
true
true
1c4574061d4be29467fa53f9afe975e345de3bfa
3,268
py
Python
pyInstaller/dash/dash/resources.py
rianawillers/dash-lineplot
b72c3e4799d39bdc33bbcae2202fdefd6f4af00e
[ "MIT" ]
2
2021-09-17T14:23:28.000Z
2021-09-17T22:12:50.000Z
pyInstaller/dash/dash/resources.py
rianawillers/dash-lineplot
b72c3e4799d39bdc33bbcae2202fdefd6f4af00e
[ "MIT" ]
null
null
null
pyInstaller/dash/dash/resources.py
rianawillers/dash-lineplot
b72c3e4799d39bdc33bbcae2202fdefd6f4af00e
[ "MIT" ]
17
2019-11-21T14:11:29.000Z
2019-11-21T15:26:23.000Z
import json import warnings import os from .development.base_component import ComponentRegistry from . import exceptions class Resources: def __init__(self, resource_name): self._resources = [] self.resource_name = resource_name def append_resource(self, resource): self._resources.ap...
34.041667
75
0.604651
import json import warnings import os from .development.base_component import ComponentRegistry from . import exceptions class Resources: def __init__(self, resource_name): self._resources = [] self.resource_name = resource_name def append_resource(self, resource): self._resources.ap...
true
true
1c45743ca4e65273720ebd7ad9326b42e0788bfd
1,734
py
Python
mergesort.py
maurendeviia/pythoncharmers
b5775d0f51a6f2e5dc0365345e0436dea4c72c14
[ "MIT" ]
37
2020-10-01T15:20:12.000Z
2021-10-04T14:17:06.000Z
mergesort.py
maurendeviia/pythoncharmers
b5775d0f51a6f2e5dc0365345e0436dea4c72c14
[ "MIT" ]
27
2020-10-01T12:32:41.000Z
2021-10-04T11:05:34.000Z
mergesort.py
maurendeviia/pythoncharmers
b5775d0f51a6f2e5dc0365345e0436dea4c72c14
[ "MIT" ]
57
2020-10-01T11:24:26.000Z
2022-02-16T05:09:50.000Z
# Python program for implementation of MergeSort # Merges two subarrays of arr[]. # First subarray is arr[l..m] # Second subarray is arr[m+1..r] def merge(arr, l, m, r): n1 = m - l + 1 n2 = r- m # create temp arrays L = [0] * (n1) R = [0] * (n2) # Copy data to temp arrays L[] a...
23.12
52
0.474625
def merge(arr, l, m, r): n1 = m - l + 1 n2 = r- m L = [0] * (n1) R = [0] * (n2) for i in range(0 , n1): L[i] = arr[l + i] for j in range(0 , n2): R[j] = arr[m + 1 + j] i = 0 j = 0 k = l while i < n1 and j < n2 : ...
true
true
1c4574486b85926786807ba74806c14f69cb0642
716
py
Python
test/ie.py
napoler/Terry-toolkit
8b1a607fb6d27801b0441b67f7eb0962794a728a
[ "MIT" ]
null
null
null
test/ie.py
napoler/Terry-toolkit
8b1a607fb6d27801b0441b67f7eb0962794a728a
[ "MIT" ]
14
2019-11-15T14:28:22.000Z
2022-02-10T00:24:28.000Z
test/ie.py
napoler/Terry-toolkit
8b1a607fb6d27801b0441b67f7eb0962794a728a
[ "MIT" ]
1
2020-04-15T12:58:00.000Z
2020-04-15T12:58:00.000Z
#encoding=utf-8 from __future__ import unicode_literals import sys sys.path.append("../") import Terry_toolkit as tkit t= tkit.Text() text=""" 柯基犬是个十足的小狗子 """ # li = t.summary(text=text) # print(li) # li = t.get_keyphrases(text=text) # print(li) # li = t.sentence_segmentation(text=text) # print(li) # li = t.part...
16.272727
70
0.666201
from __future__ import unicode_literals import sys sys.path.append("../") import Terry_toolkit as tkit t= tkit.Text() text=""" 柯基犬是个十足的小狗子 """ ie=tkit.TripleIE(model_path='/mnt/data/dev/model/ltp/ltp_data_v3.4.0') s=ie.get(text) for item in s: if item==None: pass else: print(item[0],it...
true
true
1c45754bd696bde5b9f6046fcb305c9e2b18fb6e
8,617
py
Python
make_knockoffs.py
wfbradley/snpko
abc77349d702915519518eacdf919f06579413d0
[ "MIT" ]
null
null
null
make_knockoffs.py
wfbradley/snpko
abc77349d702915519518eacdf919f06579413d0
[ "MIT" ]
null
null
null
make_knockoffs.py
wfbradley/snpko
abc77349d702915519518eacdf919f06579413d0
[ "MIT" ]
null
null
null
#!/usr/bin/env python import pandas as pd import os import numpy as np import SNPknock.fastphase as fp from SNPknock import knockoffHMM from joblib import Parallel, delayed import utils_snpko as utils logger = utils.logger def make_knockoff(chromosome=None, grouped_by_chromosome=None, df_SNP=None, ...
40.455399
101
0.646049
import pandas as pd import os import numpy as np import SNPknock.fastphase as fp from SNPknock import knockoffHMM from joblib import Parallel, delayed import utils_snpko as utils logger = utils.logger def make_knockoff(chromosome=None, grouped_by_chromosome=None, df_SNP=None, df_geno_experiment=N...
true
true
1c45754f10176c7ca4335379fbf3a06ceffc08ee
13,895
py
Python
robots/login.py
sicekit/sicekit
30d6b665ed083893792579f6640c897e932b4ff0
[ "MIT" ]
11
2015-04-13T15:40:00.000Z
2021-11-09T14:55:25.000Z
robots/login.py
sicekit/sicekit
30d6b665ed083893792579f6640c897e932b4ff0
[ "MIT" ]
null
null
null
robots/login.py
sicekit/sicekit
30d6b665ed083893792579f6640c897e932b4ff0
[ "MIT" ]
4
2016-06-07T06:39:39.000Z
2019-05-11T09:34:20.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- """ Script to log the robot in to a wiki account. Suggestion is to make a special account to use for robot use only. Make sure this robot account is well known on your home wikipedia before using. Parameters: -all Try to log in on all sites where a username is d...
42.362805
310
0.580784
__version__='$Id: login.py 7034 2009-07-09 10:11:29Z alexsh $' import re import urllib2 import wikipedia, config botList = { 'wikipedia': { 'en': u'Wikipedia:Registered bots', # Disabled because they are now using a template system which # we can't check with our current code. ...
true
true
1c4576baa0e49856245c1d52cad14c426975599c
15,984
py
Python
tfx/orchestration/metadata_test.py
romiosarkar6991/tfx-romio
0703c1dd037c676e1d438c2e5ce831decfc9eed9
[ "Apache-2.0" ]
1
2019-10-10T06:06:12.000Z
2019-10-10T06:06:12.000Z
tfx/orchestration/metadata_test.py
romiosarkar6991/tfx-romio
0703c1dd037c676e1d438c2e5ce831decfc9eed9
[ "Apache-2.0" ]
null
null
null
tfx/orchestration/metadata_test.py
romiosarkar6991/tfx-romio
0703c1dd037c676e1d438c2e5ce831decfc9eed9
[ "Apache-2.0" ]
1
2019-10-06T03:39:58.000Z
2019-10-06T03:39:58.000Z
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
35.52
80
0.635385
from __future__ import absolute_import from __future__ import division from __future__ import print_function import mock import tensorflow as tf from ml_metadata.proto import metadata_store_pb2 from tfx import types from tfx.orchestration import data_types from tfx.orchestration import metadata from tfx.types import ...
true
true
1c4576f26d0bd1dafc5d7d1a3c7a8a3a5b06fec8
2,734
py
Python
unsupNFP/train.py
pfnet-research/hierarchical-molecular-learning
2c88a4737c9268e691e97d92bf2e9e2c7e2c1790
[ "MIT" ]
13
2018-06-20T11:16:27.000Z
2020-06-23T18:56:20.000Z
unsupNFP/train.py
pfnet-research/hierarchical-molecular-learning
2c88a4737c9268e691e97d92bf2e9e2c7e2c1790
[ "MIT" ]
null
null
null
unsupNFP/train.py
pfnet-research/hierarchical-molecular-learning
2c88a4737c9268e691e97d92bf2e9e2c7e2c1790
[ "MIT" ]
4
2019-09-14T23:53:44.000Z
2021-12-09T23:36:27.000Z
import argparse from chainer import optimizers from chainer import serializers import numpy as np import model import load_mutag import load_nci1 import classification n_epoch = 200 n_parts = 5 parser = argparse.ArgumentParser() parser.add_argument('dataset', type=str, choices=('mutag', 'ptc')) args = parser.parse...
29.717391
73
0.685077
import argparse from chainer import optimizers from chainer import serializers import numpy as np import model import load_mutag import load_nci1 import classification n_epoch = 200 n_parts = 5 parser = argparse.ArgumentParser() parser.add_argument('dataset', type=str, choices=('mutag', 'ptc')) args = parser.parse...
true
true
1c457730cf5448e958549f79c322f8bde85c2542
13,955
py
Python
stumpy/aamp_ostinato.py
alvii147/stumpy
6dacfcf35ce03255951d70e5dd2f8b3f4e20a27f
[ "BSD-3-Clause" ]
2
2022-01-25T22:38:56.000Z
2022-01-31T10:59:02.000Z
stumpy/aamp_ostinato.py
vishalbelsare/stumpy
5f192a0a41fbb44f144cc4b676d525f19aaeaa98
[ "BSD-3-Clause" ]
null
null
null
stumpy/aamp_ostinato.py
vishalbelsare/stumpy
5f192a0a41fbb44f144cc4b676d525f19aaeaa98
[ "BSD-3-Clause" ]
null
null
null
# STUMPY # Copyright 2019 TD Ameritrade. Released under the terms of the 3-Clause BSD license. # STUMPY is a trademark of TD Ameritrade IP Company, Inc. All rights reserved. import numpy as np from . import core, aamp, aamped def _aamp_across_series_nearest_neighbors( Ts, Ts_idx, subseq_idx, m, Ts_squared, Ts_s...
35.874036
88
0.668649
import numpy as np from . import core, aamp, aamped def _aamp_across_series_nearest_neighbors( Ts, Ts_idx, subseq_idx, m, Ts_squared, Ts_subseq_isfinite ): k = len(Ts) Q = Ts[Ts_idx][subseq_idx : subseq_idx + m] Q_squared = np.sum(Q * Q) nns_radii = np.zeros(k, dtype=np.float64) nns_subseq_i...
true
true
1c4577dd8ddebd2c787183b01c730deb2a42ac5d
1,252
py
Python
tests/unit_tests/data/inline_service_integration_test/requester_service.py
ZacharyATanenbaum/service_framework
b5dde4407998350d1b7ad09284110b986fd4e12a
[ "MIT" ]
1
2020-03-20T21:33:56.000Z
2020-03-20T21:33:56.000Z
tests/unit_tests/data/inline_service_integration_test/requester_service.py
ZacharyATanenbaum/service_framework
b5dde4407998350d1b7ad09284110b986fd4e12a
[ "MIT" ]
1
2020-03-22T03:48:45.000Z
2020-03-22T03:48:45.000Z
tests/unit_tests/data/inline_service_integration_test/requester_service.py
ZacharyATanenbaum/service_framework
b5dde4407998350d1b7ad09284110b986fd4e12a
[ "MIT" ]
null
null
null
""" File to house a requester service """ from service_framework.utils.logging_utils import get_logger LOG = get_logger() def setup_config(config): """ Make config arguments the proper type! """ LOG.info('Setting up config!') config['num_req_to_send'] = int(config.get('num_req_to_send', 2)) ...
22.357143
69
0.572684
from service_framework.utils.logging_utils import get_logger LOG = get_logger() def setup_config(config): LOG.info('Setting up config!') config['num_req_to_send'] = int(config.get('num_req_to_send', 2)) config['responses_recieved'] = [] return config def main(to_send, config): for num in range...
true
true