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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f70e8f1ee71b250ea1a1671298c70cbb6c8b9589
2,981
py
Python
rovers/fastdownward/experiments/issue717/v2.py
mehrdadzakershahrak/Online-Explanation-Generation
e41ad9b5a390abdaf271562a56105c191e33b74d
[ "MIT" ]
1
2021-09-09T13:03:02.000Z
2021-09-09T13:03:02.000Z
rovers/fastdownward/experiments/issue717/v2.py
mehrdadzakershahrak/Online-Explanation-Generation
e41ad9b5a390abdaf271562a56105c191e33b74d
[ "MIT" ]
null
null
null
rovers/fastdownward/experiments/issue717/v2.py
mehrdadzakershahrak/Online-Explanation-Generation
e41ad9b5a390abdaf271562a56105c191e33b74d
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- import os from lab.environments import LocalEnvironment, MaiaEnvironment from downward.reports.compare import ComparativeReport from common_setup import IssueConfig, IssueExperiment, is_test_run BENCHMARKS_DIR = os.environ["DOWNWARD_BENCHMARKS"] REVISIONS = ["issue717...
37.734177
89
0.696746
import os from lab.environments import LocalEnvironment, MaiaEnvironment from downward.reports.compare import ComparativeReport from common_setup import IssueConfig, IssueExperiment, is_test_run BENCHMARKS_DIR = os.environ["DOWNWARD_BENCHMARKS"] REVISIONS = ["issue717-v2"] CONFIGS = [ IssueConfig( "l...
true
true
f70e8f84b014e650bd66970655feeddf1ff280c7
13,220
py
Python
pyqmc/dmc.py
gcassella/pyqmc
f7a6e1f656c8eab7ebd72132ee980f77275e3876
[ "MIT" ]
null
null
null
pyqmc/dmc.py
gcassella/pyqmc
f7a6e1f656c8eab7ebd72132ee980f77275e3876
[ "MIT" ]
null
null
null
pyqmc/dmc.py
gcassella/pyqmc
f7a6e1f656c8eab7ebd72132ee980f77275e3876
[ "MIT" ]
null
null
null
import os #import numpy as np import pyqmc.mc as mc import sys import h5py import jax import jax.numpy as jnp import numpy as np from functools import partial def limdrift(g, tau, acyrus=0.25): """ Use Cyrus Umrigar's algorithm to limit the drift near nodes. Args: g: a [nconf,ndim] vector t...
31.327014
252
0.596747
import os import pyqmc.mc as mc import sys import h5py import jax import jax.numpy as jnp import numpy as np from functools import partial def limdrift(g, tau, acyrus=0.25): tot = jnp.linalg.norm(g, axis=1) * acyrus mask = tot > 1e-8 taueff = jnp.ones(tot.shape) * tau taueff = jnp.where( mask,...
true
true
f70e8f8ebf9d810a241e46766340eba377a1d983
2,203
py
Python
kata_solutions/programming_101/_5/seach_string.py
jrj92280/python-katas
74cbe1ca110006c99600ddba6e887f5675c76667
[ "Beerware" ]
2
2019-03-29T02:42:21.000Z
2019-08-06T15:01:19.000Z
kata_solutions/programming_101/_5/seach_string.py
jrj92280/python-katas
74cbe1ca110006c99600ddba6e887f5675c76667
[ "Beerware" ]
null
null
null
kata_solutions/programming_101/_5/seach_string.py
jrj92280/python-katas
74cbe1ca110006c99600ddba6e887f5675c76667
[ "Beerware" ]
1
2019-07-17T15:11:13.000Z
2019-07-17T15:11:13.000Z
# PRIMITIVE DATA TYPES # str - string # bool - boolean # int - integer # float # COMPLEX DATA TYPES # list # dict attendees = ['sara', 'alex', 'justin', 'ryan'] for attendee in attendees: # print(attendee) pass # print(attendees[0]) # key = value employees = { 'sara': 'csa', 'alex': 'it stupport t...
16.946154
57
0.63005
attendees = ['sara', 'alex', 'justin', 'ryan'] for attendee in attendees: pass employees = { 'sara': 'csa', 'alex': 'it stupport tech', 'justin': 'software ninja', 'ryan': 'numbers nerd', 'robot': str(1) } name ...
true
true
f70e910ed88c79aa27e0e316c3f8283ce1ca89cc
332
py
Python
VTK/vtk_7.1.1_x64_Release/lib/python2.7/site-packages/vtk/vtkIOParallelXML.py
jiaguobing/FastCAE
2348ab87e83fe5c704e4c998cf391229c25ac5d5
[ "BSD-3-Clause" ]
2
2020-02-21T01:04:35.000Z
2020-02-21T03:35:37.000Z
VTK/vtk_7.1.1_x64_Release/lib/python2.7/site-packages/vtk/vtkIOParallelXML.py
Sunqia/FastCAE
cbc023fe07b6e306ceefae8b8bd7c12bc1562acb
[ "BSD-3-Clause" ]
1
2020-03-06T04:49:42.000Z
2020-03-06T04:49:42.000Z
VTK/vtk_7.1.1_x64_Release/lib/python2.7/site-packages/vtk/vtkIOParallelXML.py
Sunqia/FastCAE
cbc023fe07b6e306ceefae8b8bd7c12bc1562acb
[ "BSD-3-Clause" ]
1
2021-11-21T13:03:26.000Z
2021-11-21T13:03:26.000Z
from __future__ import absolute_import try: # use relative import for installed modules from .vtkIOParallelXMLPython import * except ImportError: # during build and testing, the modules will be elsewhere, # e.g. in lib directory or Release/Debug config directories from vtkIOParallelXMLPytho...
33.2
64
0.746988
from __future__ import absolute_import try: from .vtkIOParallelXMLPython import * except ImportError: from vtkIOParallelXMLPython import *
true
true
f70e920f44195f22e9f47b7ea1e5c90c3fce06cf
6,854
py
Python
cement/cli/contrib/yaml/reader.py
tomekr/cement
fece8629c48bcd598fd61d8aa7457a5df4c4f831
[ "BSD-3-Clause" ]
5,421
2018-09-24T08:04:06.000Z
2022-03-31T20:02:37.000Z
cement/cli/contrib/yaml/reader.py
tomekr/cement
fece8629c48bcd598fd61d8aa7457a5df4c4f831
[ "BSD-3-Clause" ]
3,243
2017-02-07T15:30:01.000Z
2022-03-31T16:42:19.000Z
cement/cli/contrib/yaml/reader.py
tomekr/cement
fece8629c48bcd598fd61d8aa7457a5df4c4f831
[ "BSD-3-Clause" ]
429
2015-06-27T19:34:21.000Z
2022-03-23T11:02:51.000Z
# This module contains abstractions for the input stream. You don't have to # looks further, there are no pretty code. # # We define two classes here. # # Mark(source, line, column) # It's just a record and its only use is producing nice error messages. # Parser does not use it for any other purposes. # # Reader(so...
35.512953
86
0.556026
# looks further, there are no pretty code. # # We define two classes here. # # Mark(source, line, column) # It's just a record and its only use is producing nice error messages. __all__ = ['Reader', 'ReaderError'] from .error import YAMLError, Mark import codecs, re class ReaderError(YAMLError): de...
true
true
f70e9236da0f5a31f9d5918d8f43bff0313a10a6
8,037
py
Python
posthog/api/paths.py
almog27/posthog
705d12f78b73c680b3ebc125cbc5b46c53e24102
[ "MIT" ]
1
2020-07-02T12:25:41.000Z
2020-07-02T12:25:41.000Z
posthog/api/paths.py
almog27/posthog
705d12f78b73c680b3ebc125cbc5b46c53e24102
[ "MIT" ]
null
null
null
posthog/api/paths.py
almog27/posthog
705d12f78b73c680b3ebc125cbc5b46c53e24102
[ "MIT" ]
1
2020-06-24T07:59:41.000Z
2020-06-24T07:59:41.000Z
from rest_framework import viewsets, request from rest_framework.response import Response from rest_framework.decorators import action from posthog.models import Event, Filter from posthog.utils import request_to_date_query, dict_from_cursor_fetchall from django.db.models import OuterRef from django.db import connectio...
45.925714
295
0.616026
from rest_framework import viewsets, request from rest_framework.response import Response from rest_framework.decorators import action from posthog.models import Event, Filter from posthog.utils import request_to_date_query, dict_from_cursor_fetchall from django.db.models import OuterRef from django.db import connectio...
true
true
f70e9242f485b280107689f59ae366e11677da84
366
py
Python
maldi-learn/maldi_learn/preprocessing/__init__.py
sebastianbalzer/maldi_PIKE
032bfcf1cd9b482ff851d68faaa2cf967aaf62a8
[ "BSD-3-Clause" ]
4
2021-01-05T20:26:32.000Z
2022-02-18T16:31:01.000Z
maldi-learn/maldi_learn/preprocessing/__init__.py
sebastianbalzer/maldi_PIKE
032bfcf1cd9b482ff851d68faaa2cf967aaf62a8
[ "BSD-3-Clause" ]
null
null
null
maldi-learn/maldi_learn/preprocessing/__init__.py
sebastianbalzer/maldi_PIKE
032bfcf1cd9b482ff851d68faaa2cf967aaf62a8
[ "BSD-3-Clause" ]
3
2020-04-23T15:56:50.000Z
2021-07-15T00:43:35.000Z
"""Preprocessing of MALDI-TOF spectra.""" from .generic import SubsetPeaksTransformer from .normalization import TotalIonCurrentNormalizer from .normalization import ScaleNormalizer from .topological import TopologicalPeakFiltering __all__ = [ 'ScaleNormalizer', 'SubsetPeaksTransformer', 'TopologicalPeak...
24.4
52
0.800546
from .generic import SubsetPeaksTransformer from .normalization import TotalIonCurrentNormalizer from .normalization import ScaleNormalizer from .topological import TopologicalPeakFiltering __all__ = [ 'ScaleNormalizer', 'SubsetPeaksTransformer', 'TopologicalPeakFiltering', 'TotalIonCurrentNormalizer...
true
true
f70e92de59d7f2269db39f2876140d100f76b4fc
1,794
py
Python
aiida_quantumespresso/cli/calculations/q2r.py
lin-cp/aiida-quantumespresso
55f2bc8c137a69be24709a119bc285c700997907
[ "MIT" ]
null
null
null
aiida_quantumespresso/cli/calculations/q2r.py
lin-cp/aiida-quantumespresso
55f2bc8c137a69be24709a119bc285c700997907
[ "MIT" ]
null
null
null
aiida_quantumespresso/cli/calculations/q2r.py
lin-cp/aiida-quantumespresso
55f2bc8c137a69be24709a119bc285c700997907
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Command line scripts to launch a `Q2rCalculation` for testing and demonstration purposes.""" from aiida.cmdline.params import options as options_core from aiida.cmdline.params import types from aiida.cmdline.utils import decorators import click from . import cmd_launch from ..utils import la...
40.772727
117
0.756968
from aiida.cmdline.params import options as options_core from aiida.cmdline.params import types from aiida.cmdline.utils import decorators import click from . import cmd_launch from ..utils import launch, options @cmd_launch.command('q2r') @options_core.CODE(required=True, type=types.CodeParamType(entry_point='quan...
true
true
f70e93de17fb2ce6b4647d52aec3b4fba78bd341
13,265
py
Python
test_tracetools/test/test_pub_sub.py
Henrycious/ros2_tracing
d201ce4b4720ad71c922d5dfa30183631d6f3597
[ "Apache-2.0" ]
null
null
null
test_tracetools/test/test_pub_sub.py
Henrycious/ros2_tracing
d201ce4b4720ad71c922d5dfa30183631d6f3597
[ "Apache-2.0" ]
null
null
null
test_tracetools/test/test_pub_sub.py
Henrycious/ros2_tracing
d201ce4b4720ad71c922d5dfa30183631d6f3597
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Christophe Bedard # # 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 wri...
42.380192
98
0.684357
import unittest from launch.actions import SetEnvironmentVariable from tracetools_test.case import TraceTestCase from tracetools_trace.tools import tracepoints as tp class TestPubSub(TraceTestCase): def __init__(self, *args) -> None: super().__init__( *args, session...
true
true
f70e941ad501593c69646c1d51172a53cac84224
3,438
py
Python
IPython/utils/tests/test_jsonutil.py
flexlee/ipython
7528fbd76073c90262b9ac127de57c4c59b23a5c
[ "BSD-3-Clause-Clear" ]
1
2018-09-24T13:45:40.000Z
2018-09-24T13:45:40.000Z
IPython/utils/tests/test_jsonutil.py
andreasjansson/ipython
09b4311726f46945b936c699f7a6489d74d7397f
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/utils/tests/test_jsonutil.py
andreasjansson/ipython
09b4311726f46945b936c699f7a6489d74d7397f
[ "BSD-3-Clause-Clear" ]
1
2020-05-03T10:25:12.000Z
2020-05-03T10:25:12.000Z
"""Test suite for our JSON utilities. """ #----------------------------------------------------------------------------- # Copyright (C) 2010-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING.txt, distributed as part of this software. #-...
32.742857
78
0.506981
import json from base64 import decodestring import nose.tools as nt from IPython.testing import decorators as dec from ..jsonutil import json_clean, encode_images from ..py3compat import unicode_to_str, str_to_bytes def test(): pairs = [(1, None), (1.0, None), ...
true
true
f70e941e15a39ccab967128409f18a00fc06093a
2,673
py
Python
SpotifyDownloader/SpotifyWebAPI.py
Hugo4400/Spotify-Downloader
a128a401d39b16df397f56e07802bd6e65e1710e
[ "MIT" ]
9
2021-06-16T08:44:07.000Z
2022-02-11T17:19:05.000Z
SpotifyDownloader/SpotifyWebAPI.py
Hugo4400/Spotify-Downloader
a128a401d39b16df397f56e07802bd6e65e1710e
[ "MIT" ]
3
2021-06-16T08:21:18.000Z
2021-12-12T14:49:15.000Z
SpotifyDownloader/SpotifyWebAPI.py
Hugo4400/Spotify-Downloader
a128a401d39b16df397f56e07802bd6e65e1710e
[ "MIT" ]
2
2021-06-17T22:08:22.000Z
2021-07-08T21:45:47.000Z
import requests from urllib.parse import urlencode from urllib.request import urlopen from urllib.error import HTTPError import re import json from base64 import b64encode def get_playlists(spotify_url): with open('MY_SECRETS.json', 'r') as f: spotify_key = json.load(f)['SPOTIFY_KEY'] pl...
33
135
0.616162
import requests from urllib.parse import urlencode from urllib.request import urlopen from urllib.error import HTTPError import re import json from base64 import b64encode def get_playlists(spotify_url): with open('MY_SECRETS.json', 'r') as f: spotify_key = json.load(f)['SPOTIFY_KEY'] pl...
true
true
f70e94b149473aa9ed65477fe96bca78b862bbc6
5,033
py
Python
src/collective/solr/manager.py
adrianschulz/collective.solr
2d76fe01a02174d383fdc335d38ee52afa8bfa27
[ "ZPL-1.1" ]
null
null
null
src/collective/solr/manager.py
adrianschulz/collective.solr
2d76fe01a02174d383fdc335d38ee52afa8bfa27
[ "ZPL-1.1" ]
1
2020-05-20T06:02:00.000Z
2020-07-14T13:36:58.000Z
src/collective/solr/manager.py
adrianschulz/collective.solr
2d76fe01a02174d383fdc335d38ee52afa8bfa27
[ "ZPL-1.1" ]
null
null
null
# -*- coding: utf-8 -*- from collective.solr.interfaces import ISolrConnectionManager from collective.solr.interfaces import IZCMLSolrConnectionConfig from collective.solr.local import getLocal from collective.solr.local import setLocal from collective.solr.solr import SolrConnection from collective.solr.utils import g...
38.419847
85
0.642956
from collective.solr.interfaces import ISolrConnectionManager from collective.solr.interfaces import IZCMLSolrConnectionConfig from collective.solr.local import getLocal from collective.solr.local import setLocal from collective.solr.solr import SolrConnection from collective.solr.utils import getConfig from collectiv...
true
true
f70e95585af52e0b03e70818b18ac47fb4f46f63
26,001
py
Python
evaluation/macrobenchmark/workload/models/classification.py
DelphianCalamity/PrivateKube
14f575e77021ab7baca30f4061140ec83bdc96a7
[ "Apache-2.0" ]
9
2021-06-16T00:22:45.000Z
2021-11-25T07:19:11.000Z
evaluation/macrobenchmark/workload/models/classification.py
DelphianCalamity/PrivateKube
14f575e77021ab7baca30f4061140ec83bdc96a7
[ "Apache-2.0" ]
2
2021-11-14T10:42:43.000Z
2022-03-16T03:43:22.000Z
evaluation/macrobenchmark/workload/models/classification.py
DelphianCalamity/PrivateKube
14f575e77021ab7baca30f4061140ec83bdc96a7
[ "Apache-2.0" ]
3
2021-04-08T08:08:48.000Z
2021-12-24T01:42:20.000Z
import sys, os, shutil import h5py import time import io import random import tempfile from tqdm import tqdm from absl import app, flags, logging from ray.util.multiprocessing import Pool import gcsfs import numpy as np from pathlib import Path from sklearn.linear_model import LogisticRegression from sklearn.ensemble ...
32.379826
121
0.614323
import sys, os, shutil import h5py import time import io import random import tempfile from tqdm import tqdm from absl import app, flags, logging from ray.util.multiprocessing import Pool import gcsfs import numpy as np from pathlib import Path from sklearn.linear_model import LogisticRegression from sklearn.ensemble ...
true
true
f70e95956c365ef8a6f6d6a43deb9ae598d92d2e
8,683
py
Python
xonsh/xoreutils/uptime.py
halloleo/xonsh
3a34d9f2e347d5b4518d42a25a8b4080001ec748
[ "BSD-2-Clause-FreeBSD" ]
1
2020-10-30T15:13:54.000Z
2020-10-30T15:13:54.000Z
xonsh/xoreutils/uptime.py
halloleo/xonsh
3a34d9f2e347d5b4518d42a25a8b4080001ec748
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xonsh/xoreutils/uptime.py
halloleo/xonsh
3a34d9f2e347d5b4518d42a25a8b4080001ec748
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
""" Provides a cross-platform way to figure out the system uptime. Should work on damned near any operating system you can realistically expect to be asked to write Python code for. If this module is invoked as a stand-alone script, it will print the current uptime in a human-readable format, or display an error messa...
30.466667
83
0.625014
import os import sys import time import ctypes import struct import typing as tp import xonsh.platform as xp import xonsh.lazyimps as xlimps import xonsh.lazyasd as xl _BOOTTIME: tp.Optional[float] = None def _uptime_osx(): global _BOOTTIME bt = xlimps.macutils.sysctlbyname(b"kern.boottime", return_str=Fals...
true
true
f70e96217e805d497d912559b61045f8ea83f841
6,295
py
Python
xarray/core/nanops.py
LEGOS-CTOH/xarray
d543d09aaa7fdfc4f5f92edcd4e3c0af1207c95b
[ "Apache-2.0" ]
1
2021-02-12T02:15:33.000Z
2021-02-12T02:15:33.000Z
xarray/core/nanops.py
LEGOS-CTOH/xarray
d543d09aaa7fdfc4f5f92edcd4e3c0af1207c95b
[ "Apache-2.0" ]
null
null
null
xarray/core/nanops.py
LEGOS-CTOH/xarray
d543d09aaa7fdfc4f5f92edcd4e3c0af1207c95b
[ "Apache-2.0" ]
null
null
null
import numpy as np from . import dtypes, nputils, utils from .duck_array_ops import _dask_or_eager_func, count, fillna, isnull, where_method from .pycompat import dask_array_type try: import dask.array as dask_array except ImportError: dask_array = None def _replace_nan(a, val): """ replace nan in a...
33.306878
86
0.678793
import numpy as np from . import dtypes, nputils, utils from .duck_array_ops import _dask_or_eager_func, count, fillna, isnull, where_method from .pycompat import dask_array_type try: import dask.array as dask_array except ImportError: dask_array = None def _replace_nan(a, val): mask = isnull(a) ret...
true
true
f70e963b0297a39ae5a52c25d46cbe5293ab6756
911
py
Python
mover.py
ritiek/shapes-classifier
1dab7ce174bae2cd95d603ada5bfc9a59911c8e6
[ "MIT" ]
5
2018-09-17T18:27:21.000Z
2020-06-01T14:12:33.000Z
mover.py
ritiek/shapes-classifier
1dab7ce174bae2cd95d603ada5bfc9a59911c8e6
[ "MIT" ]
null
null
null
mover.py
ritiek/shapes-classifier
1dab7ce174bae2cd95d603ada5bfc9a59911c8e6
[ "MIT" ]
1
2020-08-11T02:43:19.000Z
2020-08-11T02:43:19.000Z
import random import os def move_all(data_type, shape): dirpath = os.path.join(data_type, shape) os.makedirs(dirpath, exist_ok=True) for filename in os.listdir(shape): if filename.endswith('.png'): os.rename(os.path.join(shape, filename), os.path.join(data_type, sh...
30.366667
63
0.646542
import random import os def move_all(data_type, shape): dirpath = os.path.join(data_type, shape) os.makedirs(dirpath, exist_ok=True) for filename in os.listdir(shape): if filename.endswith('.png'): os.rename(os.path.join(shape, filename), os.path.join(data_type, sh...
true
true
f70e96c8cec0e377e59eeeec0b0401e2ea4cd129
15,679
py
Python
main_verbq_working.py
thilinicooray/mac-network-pytorch
0e4bf3f7f301570b652490f697758361c866f3c1
[ "MIT" ]
null
null
null
main_verbq_working.py
thilinicooray/mac-network-pytorch
0e4bf3f7f301570b652490f697758361c866f3c1
[ "MIT" ]
null
null
null
main_verbq_working.py
thilinicooray/mac-network-pytorch
0e4bf3f7f301570b652490f697758361c866f3c1
[ "MIT" ]
null
null
null
import torch #from imsitu_encoder_verbq import imsitu_encoder from imsitu_encoder_roleqverbq_embdhz import imsitu_encoder from imsitu_loader import imsitu_loader_roleq_updated from imsitu_scorer_log import imsitu_scorer import json import model_verbq_working import os import utils import time import random #from torchv...
39.794416
177
0.586389
import torch from imsitu_encoder_roleqverbq_embdhz import imsitu_encoder from imsitu_loader import imsitu_loader_roleq_updated from imsitu_scorer_log import imsitu_scorer import json import model_verbq_working import os import utils import time import random def train(model, train_loader, dev_loader, traindev_load...
true
true
f70e97783eb7a110103eaab5ec9a5c9b120dce42
3,177
py
Python
tests/test_app.py
Divjyot/SentimentAnalysis
f2ad46a3ac18a2c048ffc6b838fa68a2bb8febed
[ "MIT" ]
null
null
null
tests/test_app.py
Divjyot/SentimentAnalysis
f2ad46a3ac18a2c048ffc6b838fa68a2bb8febed
[ "MIT" ]
null
null
null
tests/test_app.py
Divjyot/SentimentAnalysis
f2ad46a3ac18a2c048ffc6b838fa68a2bb8febed
[ "MIT" ]
null
null
null
import pytest from app import create_app @pytest.fixture def request_header_secret(): return "dev" @pytest.fixture def request_body_positive(): return {"query": "I am having a great day!"} @pytest.fixture def request_body_negative(): return {"query": "I am feeling sad today"} @pytest.fixture def htt...
28.881818
118
0.745672
import pytest from app import create_app @pytest.fixture def request_header_secret(): return "dev" @pytest.fixture def request_body_positive(): return {"query": "I am having a great day!"} @pytest.fixture def request_body_negative(): return {"query": "I am feeling sad today"} @pytest.fixture def htt...
true
true
f70e97c43309e5287f3d18538ed116d9df87ad0f
6,451
py
Python
virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/storage/purestorage/purefb_s3user.py
lakhlaifi/RedHat-Ansible
27c5077cced9d416081fcd5d69ea44bca0317fa4
[ "Apache-2.0" ]
1
2020-03-29T18:41:01.000Z
2020-03-29T18:41:01.000Z
ansible/ansible/modules/storage/purestorage/purefb_s3user.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
7
2020-09-07T17:27:56.000Z
2022-03-02T06:25:46.000Z
ansible/ansible/modules/storage/purestorage/purefb_s3user.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
1
2020-10-30T12:48:24.000Z
2020-10-30T12:48:24.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Simon Dodsley (simon@purestorage.com) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1',...
32.094527
133
0.656952
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: purefb_s3user version_added: '2.8' short_description: ...
true
true
f70e988f4dafef4a16d2ad7c3426c886babdf411
2,642
py
Python
internal/twirptest/service_pb2_twirp.py
DennisSSDev/twirp
c27eaf7ba72b359deaed686bc1e2a486214059ca
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
internal/twirptest/service_pb2_twirp.py
DennisSSDev/twirp
c27eaf7ba72b359deaed686bc1e2a486214059ca
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
internal/twirptest/service_pb2_twirp.py
DennisSSDev/twirp
c27eaf7ba72b359deaed686bc1e2a486214059ca
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Code generated by protoc-gen-twirp_python v7.1.0, DO NOT EDIT. # source: service.proto try: import httplib from urllib2 import Request, HTTPError, urlopen except ImportError: import http.client as httplib from urllib.request import Request, urlopen from urllib.error import HTTPError import json f...
31.082353
88
0.613929
try: import httplib from urllib2 import Request, HTTPError, urlopen except ImportError: import http.client as httplib from urllib.request import Request, urlopen from urllib.error import HTTPError import json from google.protobuf import symbol_database as _symbol_database import sys _sym_db = _s...
true
true
f70e98a26c7f36c76b2da78699df18fa1459660b
8,717
py
Python
dropbox/packing-your-dropbox/packurbox.py
ramsay/ramsay-snippets
d64e30a7d7b64eedab46150babb2bb675b3da8ff
[ "MIT" ]
null
null
null
dropbox/packing-your-dropbox/packurbox.py
ramsay/ramsay-snippets
d64e30a7d7b64eedab46150babb2bb675b3da8ff
[ "MIT" ]
null
null
null
dropbox/packing-your-dropbox/packurbox.py
ramsay/ramsay-snippets
d64e30a7d7b64eedab46150babb2bb675b3da8ff
[ "MIT" ]
null
null
null
#!/usr/bin/python """ Robert Ramsay <robert.alan.ramsay@gmail.com> Packing your Dropbox When you're working with petabytes of data, you have to store files wherever they can fit. All of us here at Dropbox are always searching for more ways to efficiently pack data into smaller and more manageable chunks. The fun begins...
31.356115
574
0.533326
import sys class DropBox: w = 0 h = 0 x = 0 y = 0 def __init__(self,vector=None, w=0, h=0): if vector: self.w, self.h = vector else: self.w = w self.h = h def rotate(self): t = self.w self.w = self.h self.h = t ...
true
true
f70e997410788ed72a9b2883d54249e487064f32
2,675
py
Python
libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/progressbar_magtag_simpletest.py
Yarik9008/SoftAcademic
118c9dc4620ca444c1557edd141a838820577202
[ "MIT" ]
5
2020-04-14T20:50:30.000Z
2021-10-19T18:49:46.000Z
libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/progressbar_magtag_simpletest.py
Yarik9008/SoftAcademic
118c9dc4620ca444c1557edd141a838820577202
[ "MIT" ]
25
2020-07-17T03:05:56.000Z
2022-01-06T16:00:51.000Z
libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/progressbar_magtag_simpletest.py
Yarik9008/SoftAcademic
118c9dc4620ca444c1557edd141a838820577202
[ "MIT" ]
10
2020-01-07T20:14:56.000Z
2021-11-14T20:34:43.000Z
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT """ Basic progressbar example script adapted for use on MagTag. """ import time import board import displayio import digitalio from adafruit_progressbar.progressbar import HorizontalProgressBar # use built in display (PyPort...
27.864583
98
0.741682
import time import board import displayio import digitalio from adafruit_progressbar.progressbar import HorizontalProgressBar display = board.DISPLAY time.sleep(display.time_to_refresh) up_btn = digitalio.DigitalInOut(board.BUTTON_B) up_btn.direction = digitalio.Direction.INPUT up_btn.pull = digitalio.Pull.UP ...
true
true
f70e99a6d83ec20f3d35576e5d254633a5aa413c
19,416
py
Python
ServidorPython/python32_web/Lib/site-packages/nbconvert/nbconvertapp.py
mak213k/Servidor_automatizado_python
4403ef8027a2f814220baacc95856cf5fbf01d21
[ "MIT" ]
4
2019-07-26T11:32:22.000Z
2019-09-11T05:34:59.000Z
ServidorPython/python32_web/Lib/site-packages/nbconvert/nbconvertapp.py
mak213k/Servidor_automatizado_python
4403ef8027a2f814220baacc95856cf5fbf01d21
[ "MIT" ]
1
2021-09-02T17:44:02.000Z
2021-09-02T17:44:02.000Z
ServidorPython/python32_web/Lib/site-packages/nbconvert/nbconvertapp.py
mak213k/Servidor_automatizado_python
4403ef8027a2f814220baacc95856cf5fbf01d21
[ "MIT" ]
2
2019-08-28T14:57:54.000Z
2019-11-26T16:18:30.000Z
#!/usr/bin/env python """NbConvert is a utility for conversion of .ipynb files. Command-line interface for the NbConvert conversion utility. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function import logging import sys import...
37.410405
113
0.613103
from __future__ import print_function import logging import sys import os import glob from jupyter_core.application import JupyterApp, base_aliases, base_flags from traitlets.config import catch_config_error, Configurable from traitlets import ( Unicode, List, Instance, DottedObjectName, Type, Bool, defa...
true
true
f70e9ab4127f82a7bc61abb5b1f4d8af7ef4fcd5
122
py
Python
contributed_traders/util.py
andrewsonin/abides_dev
e8a9c8450bbbe98597f31767362c86eb193597a0
[ "BSD-3-Clause" ]
null
null
null
contributed_traders/util.py
andrewsonin/abides_dev
e8a9c8450bbbe98597f31767362c86eb193597a0
[ "BSD-3-Clause" ]
null
null
null
contributed_traders/util.py
andrewsonin/abides_dev
e8a9c8450bbbe98597f31767362c86eb193597a0
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 from pathlib import Path def get_file(fname): return Path(__file__).resolve().parent / fname
17.428571
50
0.729508
from pathlib import Path def get_file(fname): return Path(__file__).resolve().parent / fname
true
true
f70e9b3086a20a853e14284409d0e7e61f4feaf3
326
py
Python
utils/bytes_utils.py
linyuan0213/qb-bot
be8a172d7d72a7e3878f89ba341c3b5f36e3d76c
[ "MIT" ]
3
2021-08-28T18:14:54.000Z
2022-01-19T18:22:59.000Z
utils/bytes_utils.py
linyuan0213/qb-bot
be8a172d7d72a7e3878f89ba341c3b5f36e3d76c
[ "MIT" ]
null
null
null
utils/bytes_utils.py
linyuan0213/qb-bot
be8a172d7d72a7e3878f89ba341c3b5f36e3d76c
[ "MIT" ]
1
2021-07-16T08:37:03.000Z
2021-07-16T08:37:03.000Z
def bytes_to_human(n): symbols = ('KB', 'MB', 'GB', 'TB', 'PB', 'EB') prefix = {} for i, s in enumerate(symbols): prefix[s] = 1 << (i + 1) * 10 for s in reversed(symbols): if n >= prefix[s]: value = float(n) / prefix[s] return '%.1f%s' % (value, s) return '%sB...
29.636364
50
0.46319
def bytes_to_human(n): symbols = ('KB', 'MB', 'GB', 'TB', 'PB', 'EB') prefix = {} for i, s in enumerate(symbols): prefix[s] = 1 << (i + 1) * 10 for s in reversed(symbols): if n >= prefix[s]: value = float(n) / prefix[s] return '%.1f%s' % (value, s) return '%sB...
true
true
f70e9b6e0d6c5f3a42f4bb7ff0f34b00d662bc27
1,338
py
Python
spartan/examples/ssvd/qr.py
GabrielWen/spartan
ce3bf7f2bb551d7f996a1884acef819b620cc854
[ "Apache-2.0" ]
156
2015-01-10T21:54:25.000Z
2021-10-17T14:13:57.000Z
spartan/examples/ssvd/qr.py
GabrielWen/spartan
ce3bf7f2bb551d7f996a1884acef819b620cc854
[ "Apache-2.0" ]
8
2015-01-05T16:34:18.000Z
2015-12-11T08:12:28.000Z
spartan/examples/ssvd/qr.py
GabrielWen/spartan
ce3bf7f2bb551d7f996a1884acef819b620cc854
[ "Apache-2.0" ]
24
2015-01-10T21:55:48.000Z
2021-04-14T08:09:34.000Z
import spartan from spartan import expr, core import numpy as np from sys import stderr def qr(Y): ''' Compute the thin qr factorization of a matrix. Factor the matrix Y as QR, where Q is orthonormal and R is upper-triangular. Parameters ---------- Y: Spartan array of shape (M, K). Notes ---------- ...
29.086957
75
0.675635
import spartan from spartan import expr, core import numpy as np from sys import stderr def qr(Y): YTY = expr.dot(expr.transpose(Y), Y).optimized().glom() # Do cholesky decomposition and get R. R = np.linalg.cholesky(YTY).T # Find the inverse of R inv_R = np.linalg.inv(R) # Q = Y * in...
true
true
f70e9bc29651fbb0c65ebc831bb2635b14150dfd
3,633
py
Python
servers/migrations/0012_auto__add_field_server_samba_base_folder.py
PolyLAN/azimut-gestion
0b076570d7ceeef8cfd9c8e65fd0495aa16d3c8a
[ "MIT" ]
null
null
null
servers/migrations/0012_auto__add_field_server_samba_base_folder.py
PolyLAN/azimut-gestion
0b076570d7ceeef8cfd9c8e65fd0495aa16d3c8a
[ "MIT" ]
null
null
null
servers/migrations/0012_auto__add_field_server_samba_base_folder.py
PolyLAN/azimut-gestion
0b076570d7ceeef8cfd9c8e65fd0495aa16d3c8a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Server.samba_base_folder' db.add_column(u'servers_server', 'samba_base_folder', ...
63.736842
186
0.57886
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column(u'servers_server', 'samba_base_folder', self.gf('django.db.models.fields.CharField')(default='...
true
true
f70e9c09777356b17130746cb212b29360ca2fcc
3,204
py
Python
storm/__init__.py
silky/storm
91fe53a5edb52d4784fbba134a614aae964ded81
[ "MIT" ]
1
2019-06-27T11:34:13.000Z
2019-06-27T11:34:13.000Z
storm/__init__.py
silky/storm
91fe53a5edb52d4784fbba134a614aae964ded81
[ "MIT" ]
null
null
null
storm/__init__.py
silky/storm
91fe53a5edb52d4784fbba134a614aae964ded81
[ "MIT" ]
null
null
null
# -*- coding: utf8 -*- from ssh_config import ConfigParser from exceptions import StormValueError from operator import itemgetter import getpass __version__ = '0.5.2' class Storm(object): def __init__(self, ssh_config_file=None): self.ssh_config = ConfigParser(ssh_config_file) self.ssh_config...
29.943925
118
0.594569
from ssh_config import ConfigParser from exceptions import StormValueError from operator import itemgetter import getpass __version__ = '0.5.2' class Storm(object): def __init__(self, ssh_config_file=None): self.ssh_config = ConfigParser(ssh_config_file) self.ssh_config.load() def add_e...
false
true
f70e9c0b8bac3d670748990df3ff0e02f0a7f8ad
15,619
py
Python
zerver/lib/cache.py
dehnert/zulip
f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5
[ "Apache-2.0" ]
null
null
null
zerver/lib/cache.py
dehnert/zulip
f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5
[ "Apache-2.0" ]
null
null
null
zerver/lib/cache.py
dehnert/zulip
f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function from functools import wraps from django.core.cache import cache as djcache from django.core.cache import caches from django.conf import settings from django.db.models import Q from django.core.cache.backends.base import BaseCache from typin...
39.541772
133
0.681414
from __future__ import absolute_import from __future__ import print_function from functools import wraps from django.core.cache import cache as djcache from django.core.cache import caches from django.conf import settings from django.db.models import Q from django.core.cache.backends.base import BaseCache from typin...
true
true
f70e9c0f85a4b70d03afc9fad7137e074aea7e36
1,674
py
Python
benchmarks_sphere/paper_jrn_parco_rexi_nonlinear/scalability_space_galewsky_cheyenne_intel/postprocessing.py
valentinaschueller/sweet
27e99c7a110c99deeadee70688c186d82b39ac90
[ "MIT" ]
6
2017-11-20T08:12:46.000Z
2021-03-11T15:32:36.000Z
benchmarks_sphere/paper_jrn_parco_rexi_nonlinear/scalability_space_galewsky_cheyenne_intel/postprocessing.py
valentinaschueller/sweet
27e99c7a110c99deeadee70688c186d82b39ac90
[ "MIT" ]
4
2018-02-02T21:46:33.000Z
2022-01-11T11:10:27.000Z
benchmarks_sphere/paper_jrn_parco_rexi_nonlinear/scalability_space_galewsky_cheyenne_intel/postprocessing.py
valentinaschueller/sweet
27e99c7a110c99deeadee70688c186d82b39ac90
[ "MIT" ]
12
2016-03-01T18:33:34.000Z
2022-02-08T22:20:31.000Z
#! /usr/bin/env python3 from SWEET import * from mule.postprocessing.JobsData import * from mule.postprocessing.JobsDataConsolidate import * from mule.plotting.Plotting import * sys.path.append('../') import pretty_plotting as pp sys.path.pop() # # Load data # j = JobsData('job_bench_*', verbosity=0) # # Create g...
18.6
67
0.737754
from SWEET import * from mule.postprocessing.JobsData import * from mule.postprocessing.JobsDataConsolidate import * from mule.plotting.Plotting import * sys.path.append('../') import pretty_plotting as pp sys.path.pop() j = JobsData('job_bench_*', verbosity=0) groups = ['runtime.timestepping_method'] c = ...
true
true
f70e9d0ca009d2d068924b1345df34f152420b7c
1,346
py
Python
setup.py
FaizChishtie/MrTopo
e6a674738d8b0a0c56edde2be0ae272ea9e62f1a
[ "MIT" ]
1
2021-01-26T11:01:32.000Z
2021-01-26T11:01:32.000Z
setup.py
FaizChishtie/MrTopo
e6a674738d8b0a0c56edde2be0ae272ea9e62f1a
[ "MIT" ]
null
null
null
setup.py
FaizChishtie/MrTopo
e6a674738d8b0a0c56edde2be0ae272ea9e62f1a
[ "MIT" ]
1
2020-12-23T22:01:09.000Z
2020-12-23T22:01:09.000Z
import setuptools import re with open("README.md", "r") as fh: long_description = fh.read() version = re.search( '^__version__\s*=\s*"(.*)"', open('mrtopo/__main__.py').read(), re.M ).group(1) setuptools.setup( name='mrtopo', version=version, packages=setuptools.find_packages(), u...
29.911111
66
0.61367
import setuptools import re with open("README.md", "r") as fh: long_description = fh.read() version = re.search( '^__version__\s*=\s*"(.*)"', open('mrtopo/__main__.py').read(), re.M ).group(1) setuptools.setup( name='mrtopo', version=version, packages=setuptools.find_packages(), u...
true
true
f70e9e8f3f4e25b72d078669cef22e5f17566484
1,495
py
Python
setup.py
ucamhal/jsonlogging
7606abb00c3cdc9536c8947d5ab1e210716e8d47
[ "BSD-2-Clause" ]
1
2017-03-19T12:06:58.000Z
2017-03-19T12:06:58.000Z
setup.py
ucamhal/jsonlogging
7606abb00c3cdc9536c8947d5ab1e210716e8d47
[ "BSD-2-Clause" ]
null
null
null
setup.py
ucamhal/jsonlogging
7606abb00c3cdc9536c8947d5ab1e210716e8d47
[ "BSD-2-Clause" ]
null
null
null
from setuptools import setup def get_version(filename): """ Parse the value of the __version__ var from a Python source file without running/importing the file. """ import re version_pattern = r"^ *__version__ *= *['\"](\d+\.\d+\.\d+)['\"] *$" match = re.search(version_pattern, open(filena...
33.977273
75
0.623411
from setuptools import setup def get_version(filename): import re version_pattern = r"^ *__version__ *= *['\"](\d+\.\d+\.\d+)['\"] *$" match = re.search(version_pattern, open(filename).read(), re.MULTILINE) assert match, ("No version found in file: {!r} matching pattern: {!r}" .for...
true
true
f70e9eba1ab08ba41a6d14813985705f6afe0f1e
94,216
py
Python
sympy/plotting/plot.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
sympy/plotting/plot.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
sympy/plotting/plot.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
"""Plotting module for SymPy. A plot is represented by the ``Plot`` class that contains a reference to the backend and a list of the data series to be plotted. The data series are instances of classes meant to simplify getting points and meshes from SymPy expressions. ``plot_backends`` is a dictionary with all th...
35.905488
128
0.565721
from collections.abc import Callable from sympy.core.basic import Basic from sympy.core.containers import Tuple from sympy.core.expr import Expr from sympy.core.function import arity, Function from sympy.core.symbol import (Dummy, Symbol) from sympy.core.sympify import sympify from sympy.external import ...
true
true
f70e9f82018e07c830743995d2a988adcd978449
53,574
py
Python
qutip/qip/circuit.py
lebinyu/qutip
19f172cbb1689f3295dd2561057543da342fb646
[ "BSD-3-Clause" ]
null
null
null
qutip/qip/circuit.py
lebinyu/qutip
19f172cbb1689f3295dd2561057543da342fb646
[ "BSD-3-Clause" ]
null
null
null
qutip/qip/circuit.py
lebinyu/qutip
19f172cbb1689f3295dd2561057543da342fb646
[ "BSD-3-Clause" ]
null
null
null
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
46.707934
79
0.434987
, 'ISWAP': r'{i}{\rm SWAP}', 'SQRTSWAP': r'\sqrt{\rm SWAP}', 'SQRTISWAP': r'\sqrt{{i}\rm SWAP}', 'FREDKIN': r'{\rm FREDKIN}', 'TOFFOLI': r'{\rm TOFFOLI}', 'GLOBALPHASE': r'{\rm Ph}', } def _gate_label(name, arg_label): if name in _gate_name_to_label: ...
true
true
f70ea0db8a6447a49d3bf80ab3739ca2d79b0877
5,469
py
Python
docs/source/conf.py
holavpv/osmnx
df1feb06f2c2be3c042f524428e3993f22560ee6
[ "MIT" ]
1
2020-07-09T22:11:52.000Z
2020-07-09T22:11:52.000Z
docs/source/conf.py
holavpv/osmnx
df1feb06f2c2be3c042f524428e3993f22560ee6
[ "MIT" ]
null
null
null
docs/source/conf.py
holavpv/osmnx
df1feb06f2c2be3c042f524428e3993f22560ee6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ OSMnx documentation build configuration file. Created by sphinx-quickstart on Sun Feb 4 13:53:34 2018. This file is execfile()d with the current directory set to its containing dir. Note that not all possible configuration values are present in this autogenerated fi...
29.403226
79
0.672518
import os import sys sys.path.insert(0, os.path.abspath("../..")) autodoc_mock_imports = [ "dateutil", "geopandas", "matplotlib", "matplotlib.cm", "matplotlib.colors", "matplotlib.pyplot", "networkx", "numpy", "pandas", "pyproj", "requests", "scipy", "scipy.spa...
true
true
f70ea0e76e8e27653ad98588d7b83e00bb2a047a
5,613
py
Python
tests/unit/test_config.py
nickatnight/praw
6ba5c92e5d5210338c0a2a2755a5e5e226a002fa
[ "BSD-2-Clause" ]
2,360
2015-01-03T18:27:44.000Z
2022-03-26T23:24:49.000Z
tests/unit/test_config.py
nickatnight/praw
6ba5c92e5d5210338c0a2a2755a5e5e226a002fa
[ "BSD-2-Clause" ]
1,187
2015-01-04T18:42:10.000Z
2022-03-28T13:46:33.000Z
tests/unit/test_config.py
nickatnight/praw
6ba5c92e5d5210338c0a2a2755a5e5e226a002fa
[ "BSD-2-Clause" ]
591
2015-01-04T17:33:34.000Z
2022-03-27T20:28:26.000Z
import os import sys from unittest import mock import pytest from praw.config import Config from praw.exceptions import ClientException class TestConfig: @staticmethod def _assert_config_read(environment, mock_config): mock_instance = mock_config.return_value Config.CONFIG = None # Force co...
37.42
79
0.618742
import os import sys from unittest import mock import pytest from praw.config import Config from praw.exceptions import ClientException class TestConfig: @staticmethod def _assert_config_read(environment, mock_config): mock_instance = mock_config.return_value Config.CONFIG = None p...
true
true
f70ea1c658fc200cff6ab95f636b343fc4f6d6b7
2,057
py
Python
Validation/Performance/scripts/cmsScimarkStop.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
13
2015-11-30T15:49:45.000Z
2022-02-08T16:11:30.000Z
Validation/Performance/scripts/cmsScimarkStop.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
640
2015-02-11T18:55:47.000Z
2022-03-31T14:12:23.000Z
Validation/Performance/scripts/cmsScimarkStop.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
51
2015-08-11T21:01:40.000Z
2022-03-30T07:31:34.000Z
#! /usr/bin/env python #Script to #1-check for cmsScimarkLaunch (infinite loop) scripts #2-kill them #3-report their results using cmsScimarkParser.py from __future__ import print_function import subprocess,os,sys def main(): #Use ps -ef to look for cmsScimarkLaunch processes ps_stdouterr=subprocess.Popen("ps...
45.711111
207
0.656782
from __future__ import print_function import subprocess,os,sys def main(): ps_stdouterr=subprocess.Popen("ps -efww|grep cmsScimarkLaunch|grep -v grep|grep -v 'sh -c'",shell=True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout if ps_stdouterr: ps_lines=ps_stdouterr.readlines() ...
true
true
f70ea28bcf4185dc675728f2549fd2e9447346be
77,417
py
Python
Graphing_Summaries.py
GrantRoss-Tenki/Malawi-CQC-CSC-OSU-Work
a720e0451579945ba10eafdafe2e0d59a86d5cfb
[ "MIT" ]
null
null
null
Graphing_Summaries.py
GrantRoss-Tenki/Malawi-CQC-CSC-OSU-Work
a720e0451579945ba10eafdafe2e0d59a86d5cfb
[ "MIT" ]
null
null
null
Graphing_Summaries.py
GrantRoss-Tenki/Malawi-CQC-CSC-OSU-Work
a720e0451579945ba10eafdafe2e0d59a86d5cfb
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import pandas as pd #from pylab import plot, show, xlim,figure,hold, ylim,legend, boxplot, setup, axes import seaborn as sns # Is this a personal or work computer # Are you graphing for hood or no hood Computer = 'personal' #or 'personal' or 'work' Hood_o...
50.965767
152
0.657504
import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns Computer = 'personal' Hood_or_no = 'no_hood' Household_removal = [1045] Household_removal_NO_Hood_fuel_day_adult = [1045] Household_removal_Hood_fuel_day_adult = [2020] Household_removal_NO_Hood_PM = [1...
true
true
f70ea318486da939ee5b7f2bf6eee6d6a675026f
7,269
py
Python
tests/metarl/torch/algos/test_torch_algo_utils.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
2
2020-03-15T14:35:15.000Z
2021-02-15T16:38:00.000Z
tests/metarl/torch/algos/test_torch_algo_utils.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
null
null
null
tests/metarl/torch/algos/test_torch_algo_utils.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
1
2020-02-24T03:04:23.000Z
2020-02-24T03:04:23.000Z
"""Test torch algo utility functions.""" import numpy as np import pytest import tensorflow as tf import torch import torch.nn.functional as F import metarl.tf.misc.tensor_utils as tf_utils import metarl.torch.algos._utils as torch_algo_utils from tests.fixtures import TfGraphTestCase def stack(d, arr): """Stack...
42.508772
79
0.526482
import numpy as np import pytest import tensorflow as tf import torch import torch.nn.functional as F import metarl.tf.misc.tensor_utils as tf_utils import metarl.torch.algos._utils as torch_algo_utils from tests.fixtures import TfGraphTestCase def stack(d, arr): return np.repeat(np.expand_dims(arr, axis=0), rep...
true
true
f70ea35f73bd2981d6bbb6766833e038e16308d4
23,711
py
Python
src/sage/schemes/plane_curves/projective_curve.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
null
null
null
src/sage/schemes/plane_curves/projective_curve.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
null
null
null
src/sage/schemes/plane_curves/projective_curve.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
1
2020-07-24T12:20:37.000Z
2020-07-24T12:20:37.000Z
""" Projective plane curves over a general ring AUTHORS: - William Stein (2005-11-13) - David Joyner (2005-11-13) - David Kohel (2006-01) - Moritz Minzlaff (2010-11) """ #***************************************************************************** # Copyright (C) 2005 William Stein <wstein@gmail.com> # # ...
32.17232
134
0.484374
from sage.interfaces.all import singular from sage.misc.all import add, sage_eval from sage.rings.all import degree_lowest_rational_function from sage.schemes.projective.projective_space import is_ProjectiveSpace from curve import Curve_generic_projective class ProjectiveSpaceCurve_generic(Curve_generic_p...
true
true
f70ea37895116b00771e48f3d3576aa318e30354
5,209
py
Python
HelloWorldOpenCV.py
jhbrito/HelloWorlds
7e2247ca7f312a516ce6a5054913d59e2f1de0f9
[ "MIT" ]
6
2020-02-14T15:18:14.000Z
2022-02-22T15:40:33.000Z
HelloWorldOpenCV.py
jhbrito/HelloWorlds
7e2247ca7f312a516ce6a5054913d59e2f1de0f9
[ "MIT" ]
null
null
null
HelloWorldOpenCV.py
jhbrito/HelloWorlds
7e2247ca7f312a516ce6a5054913d59e2f1de0f9
[ "MIT" ]
null
null
null
# Demo with a few examples of using OpenCV functions and UI # packages: opencv-python # uses lena: https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png import numpy as np import cv2 print("Hello World OpenCV") print("OpenCV Version:", cv2.__version__) image = np.ones((256, 256), dtype="uint8") i...
29.429379
119
0.710501
import numpy as np import cv2 print("Hello World OpenCV") print("OpenCV Version:", cv2.__version__) image = np.ones((256, 256), dtype="uint8") image = image * 127 image[0:128, 0:128] = 0 image[128:, 128:] = 255 cv2.imshow("Image", image) cv2.waitKey(0) import os.path if os.path.isfile('lena.png'): print("T...
true
true
f70ea378aaf48671277dab43c5ea3b4387cbb5a8
7,007
py
Python
vitrage/datasources/zabbix/driver.py
openstack/vitrage
95b33dbf39b040e23915882a2879c87aec239ca9
[ "Apache-2.0" ]
89
2015-09-30T21:42:17.000Z
2022-03-28T16:31:19.000Z
vitrage/datasources/zabbix/driver.py
openstack/vitrage
95b33dbf39b040e23915882a2879c87aec239ca9
[ "Apache-2.0" ]
4
2015-12-13T13:06:53.000Z
2016-01-03T19:51:28.000Z
vitrage/datasources/zabbix/driver.py
openstack/vitrage
95b33dbf39b040e23915882a2879c87aec239ca9
[ "Apache-2.0" ]
43
2015-11-04T15:54:27.000Z
2021-12-10T14:24:03.000Z
# Copyright 2016 - Nokia # # 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, sof...
35.75
78
0.657057
from collections import namedtuple from oslo_config import cfg from oslo_log import log from oslo_utils import importutils as utils from vitrage.common.constants import DatasourceAction from vitrage.common.constants import DatasourceOpts as DSOpts from vitrage.common.constants import DatasourcePropertie...
true
true
f70ea3d37cea2ad796cf374b9a4ab9e73fc5c35c
1,057
py
Python
migrations/versions/5c80010c853a_posts_table.py
ChanForPres/Social-Blogging-App
525c4588dfa50780a8b7c067111c101ade4e20f2
[ "MIT" ]
null
null
null
migrations/versions/5c80010c853a_posts_table.py
ChanForPres/Social-Blogging-App
525c4588dfa50780a8b7c067111c101ade4e20f2
[ "MIT" ]
null
null
null
migrations/versions/5c80010c853a_posts_table.py
ChanForPres/Social-Blogging-App
525c4588dfa50780a8b7c067111c101ade4e20f2
[ "MIT" ]
null
null
null
"""posts table Revision ID: 5c80010c853a Revises: 6ca7139bbbf2 Create Date: 2018-06-25 17:18:29.165993 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '5c80010c853a' down_revision = '6ca7139bbbf2' branch_labels = None depends_on = None def upgrade(): # ##...
27.815789
83
0.676443
from alembic import op import sqlalchemy as sa revision = '5c80010c853a' down_revision = '6ca7139bbbf2' branch_labels = None depends_on = None def upgrade(): ), nullable=True), sa.Column('user_id', sa.Integer(), nullable=True), sa.ForeignKeyConstraint(['user_id'], ['user.id'], ), sa.PrimaryKeyConst...
true
true
f70ea4478d7916ef0eca7ea387f9da960ada87f9
27
py
Python
src/euler_python_package/euler_python/medium/p255.py
wilsonify/euler
5214b776175e6d76a7c6d8915d0e062d189d9b79
[ "MIT" ]
null
null
null
src/euler_python_package/euler_python/medium/p255.py
wilsonify/euler
5214b776175e6d76a7c6d8915d0e062d189d9b79
[ "MIT" ]
null
null
null
src/euler_python_package/euler_python/medium/p255.py
wilsonify/euler
5214b776175e6d76a7c6d8915d0e062d189d9b79
[ "MIT" ]
null
null
null
def problem255(): pass
9
17
0.62963
def problem255(): pass
true
true
f70ea613433f02ed837e0b8f877dedbe1826238c
3,471
py
Python
factory-ai-vision/EdgeSolution/modules/WebModule/backend/configs/api_router.py
piyushka17/azure-intelligent-edge-patterns
0d088899afb0022daa2ac434226824dba2c997c1
[ "MIT" ]
null
null
null
factory-ai-vision/EdgeSolution/modules/WebModule/backend/configs/api_router.py
piyushka17/azure-intelligent-edge-patterns
0d088899afb0022daa2ac434226824dba2c997c1
[ "MIT" ]
null
null
null
factory-ai-vision/EdgeSolution/modules/WebModule/backend/configs/api_router.py
piyushka17/azure-intelligent-edge-patterns
0d088899afb0022daa2ac434226824dba2c997c1
[ "MIT" ]
null
null
null
"""API router """ from django.conf.urls import url from django.urls import path from rest_framework.routers import DefaultRouter from vision_on_edge.azure_app_insight.api import views as app_insight_views from vision_on_edge.azure_parts.api import views as azure_part_views from vision_on_edge.azure_settings.api impor...
47.547945
79
0.803803
from django.conf.urls import url from django.urls import path from rest_framework.routers import DefaultRouter from vision_on_edge.azure_app_insight.api import views as app_insight_views from vision_on_edge.azure_parts.api import views as azure_part_views from vision_on_edge.azure_settings.api import views as azure_s...
true
true
f70ea783739509cd8b2366a0314a6db0627abca1
6,569
py
Python
lib/sqlalchemy/orm/exc.py
petit87/sqlalchemy
67d674bd63ca36ac32b23f96e2b19e9dac6b0863
[ "MIT" ]
null
null
null
lib/sqlalchemy/orm/exc.py
petit87/sqlalchemy
67d674bd63ca36ac32b23f96e2b19e9dac6b0863
[ "MIT" ]
null
null
null
lib/sqlalchemy/orm/exc.py
petit87/sqlalchemy
67d674bd63ca36ac32b23f96e2b19e9dac6b0863
[ "MIT" ]
null
null
null
# orm/exc.py # Copyright (C) 2005-2022 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php """SQLAlchemy ORM exceptions.""" from __future__ import annotations from .. import exc...
31.581731
76
0.642716
from __future__ import annotations from .. import exc as sa_exc from .. import util from ..exc import MultipleResultsFound from ..exc import NoResultFound NO_STATE = (AttributeError, KeyError) class StaleDataError(sa_exc.SQLAlchemyError): ConcurrentModificationError = StaleDataError class FlushErro...
true
true
f70ea910deb64c851f94887e577c45916aab7cf2
12,652
py
Python
doc/conf.py
gitter-badger/SoCo
65977466057748ea522a6d8b7f2a649091485a07
[ "MIT" ]
1
2019-03-09T14:23:48.000Z
2019-03-09T14:23:48.000Z
doc/conf.py
gitter-badger/SoCo
65977466057748ea522a6d8b7f2a649091485a07
[ "MIT" ]
null
null
null
doc/conf.py
gitter-badger/SoCo
65977466057748ea522a6d8b7f2a649091485a07
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # soco documentation build configuration file, created by # sphinx-quickstart on Mon Sep 14 08:03:37 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autog...
31.788945
79
0.710639
import sys import os import shlex sys.path.insert(0, os.path.abspath('..')) import soco needs_sphinx = '1.3' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.extlinks', 'sphinx.ext.inheritance_diagram', 'sphinx.ext.intersphinx', 'sphinx.ext....
true
true
f70eaaf12a9fe00936523a8b54e0345d5ae2821e
768
py
Python
src/deployable/__main__.py
cpuabuse/py-deployment-automation
aea0c48ac4c5a81f2e027c984ab65f911ad29d0d
[ "0BSD" ]
1
2020-02-23T22:35:28.000Z
2020-02-23T22:35:28.000Z
src/deployable/__main__.py
cpuabuse/py-deployment-automation
aea0c48ac4c5a81f2e027c984ab65f911ad29d0d
[ "0BSD" ]
null
null
null
src/deployable/__main__.py
cpuabuse/py-deployment-automation
aea0c48ac4c5a81f2e027c984ab65f911ad29d0d
[ "0BSD" ]
null
null
null
#!/usr/bin/env python3 """ Main module for the deployable project. """ # Bootstrap to be able to perform absolute imports as standalone code if __name__ == "__main__": from absolute_import import absolute_import absolute_import(file=__file__, name=__name__, path=__path__) # Normal imports from argparse import Argu...
21.942857
109
0.763021
if __name__ == "__main__": from absolute_import import absolute_import absolute_import(file=__file__, name=__name__, path=__path__) from argparse import ArgumentParser, RawDescriptionHelpFormatter from deployable.defaults.args import description, epilog from typing import Any, Tuple def get_args() -> Tuple[An...
true
true
f70eab155736800811a7f28862b37c609211be8a
4,889
py
Python
src/cartpole.py
rish-16/gym-navmaze
cc21d730ec6ab1e96a4a1a8f602a5bbb951d2929
[ "MIT" ]
1
2021-06-10T13:40:09.000Z
2021-06-10T13:40:09.000Z
src/cartpole.py
rish-16/gym-navmaze
cc21d730ec6ab1e96a4a1a8f602a5bbb951d2929
[ "MIT" ]
null
null
null
src/cartpole.py
rish-16/gym-navmaze
cc21d730ec6ab1e96a4a1a8f602a5bbb951d2929
[ "MIT" ]
1
2021-06-10T13:40:11.000Z
2021-06-10T13:40:11.000Z
import numpy as np from collections import deque import pickle import torch from utils import collect_trajectories, random_sample from PPO import PPO import matplotlib.pyplot as plt from parallelEnv import * import gym env = gym.make("CartPole-v0") env.reset() env.seed(2) obs_dim = env.observation_space.shape[0] n_ac...
36.759398
171
0.606668
import numpy as np from collections import deque import pickle import torch from utils import collect_trajectories, random_sample from PPO import PPO import matplotlib.pyplot as plt from parallelEnv import * import gym env = gym.make("CartPole-v0") env.reset() env.seed(2) obs_dim = env.observation_space.shape[0] n_ac...
true
true
f70eab2e8fd598cbdc5417a99d3c40fb7b2434e9
643
py
Python
lofo/infer_defaults.py
williamberrios/lofo-importance
34967cf47dc1c2797d3a77f8926918ae91e4197a
[ "MIT" ]
1
2020-10-31T10:05:45.000Z
2020-10-31T10:05:45.000Z
lofo/infer_defaults.py
williamberrios/lofo-importance
34967cf47dc1c2797d3a77f8926918ae91e4197a
[ "MIT" ]
null
null
null
lofo/infer_defaults.py
williamberrios/lofo-importance
34967cf47dc1c2797d3a77f8926918ae91e4197a
[ "MIT" ]
null
null
null
import numpy as np from sklearn.preprocessing import LabelEncoder from lightgbm import LGBMClassifier, LGBMRegressor def infer_model(df, features, y, n_jobs): model_class = LGBMRegressor if len(np.unique(y)) == 2: y = LabelEncoder().fit_transform(y) model_class = LGBMClassifier categorica...
30.619048
83
0.720062
import numpy as np from sklearn.preprocessing import LabelEncoder from lightgbm import LGBMClassifier, LGBMRegressor def infer_model(df, features, y, n_jobs): model_class = LGBMRegressor if len(np.unique(y)) == 2: y = LabelEncoder().fit_transform(y) model_class = LGBMClassifier categorica...
true
true
f70eab61632b9f861e510d3c8482608efe5ebe97
449,278
py
Python
rnn_cell_impl.py
narutowang/indrnn
434e1200b5e742a0eac92bed661c69e97b8b8711
[ "Apache-2.0" ]
null
null
null
rnn_cell_impl.py
narutowang/indrnn
434e1200b5e742a0eac92bed661c69e97b8b8711
[ "Apache-2.0" ]
null
null
null
rnn_cell_impl.py
narutowang/indrnn
434e1200b5e742a0eac92bed661c69e97b8b8711
[ "Apache-2.0" ]
null
null
null
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://assets-cdn.github.com"> <link rel="dns-prefetch" href="https://avatars0.githubusercontent.com"> <link rel="dns-prefetch" href="https://avatars1.githubusercontent.com"> <link rel="dns-prefetch" href=...
67.591094
766
0.599302
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://assets-cdn.github.com"> <link rel="dns-prefetch" href="https://avatars0.githubusercontent.com"> <link rel="dns-prefetch" href="https://avatars1.githubusercontent.com"> <link rel="dns-prefetch" href=...
false
true
f70eab9a72dba0a78b746376f282d170ea2df7b0
5,527
py
Python
loader_2.py
wangyan9411/entity
8d5601b8061b580da5395c46a52440e85eeff934
[ "Apache-2.0" ]
null
null
null
loader_2.py
wangyan9411/entity
8d5601b8061b580da5395c46a52440e85eeff934
[ "Apache-2.0" ]
null
null
null
loader_2.py
wangyan9411/entity
8d5601b8061b580da5395c46a52440e85eeff934
[ "Apache-2.0" ]
null
null
null
import os import re import codecs from utils import create_dico, create_mapping, zero_digits from utils import iob2, iob_iobes def load_sentences(path, lower, zeros): """ Load sentences. A line must contain at least a word and its tag. Sentences are separated by empty lines. """ sentences = [] ...
31.947977
79
0.588746
import os import re import codecs from utils import create_dico, create_mapping, zero_digits from utils import iob2, iob_iobes def load_sentences(path, lower, zeros): """ Load sentences. A line must contain at least a word and its tag. Sentences are separated by empty lines. """ sentences = [] ...
false
true
f70eac78971c0c7d00f18c3d2c1b7bbe17c6918c
11,789
py
Python
napari/_vispy/overlays/axes.py
kolibril13/napari
b39647d94e587f0255b0d4cc3087855e160a8929
[ "BSD-3-Clause" ]
null
null
null
napari/_vispy/overlays/axes.py
kolibril13/napari
b39647d94e587f0255b0d4cc3087855e160a8929
[ "BSD-3-Clause" ]
null
null
null
napari/_vispy/overlays/axes.py
kolibril13/napari
b39647d94e587f0255b0d4cc3087855e160a8929
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from vispy.scene.visuals import Compound, Line, Mesh, Text from vispy.visuals.transforms import STTransform from ...layers.shapes._shapes_utils import triangulate_ellipse from ...utils.colormaps.standardize_color import transform_color from ...utils.theme import get_theme from ...utils.translations ...
34.270349
79
0.573925
import numpy as np from vispy.scene.visuals import Compound, Line, Mesh, Text from vispy.visuals.transforms import STTransform from ...layers.shapes._shapes_utils import triangulate_ellipse from ...utils.colormaps.standardize_color import transform_color from ...utils.theme import get_theme from ...utils.translations ...
true
true
f70eacd9831e30421747847c4c2092590d7cb3b4
4,179
py
Python
dataloader.py
PaperCodeReview/MoCo-TF
1ea01b2d005de3e030229f79a37135468fa1631e
[ "MIT" ]
22
2020-10-01T10:14:36.000Z
2022-02-02T12:20:42.000Z
dataloader.py
PaperCodeReview/MoCo-TF
1ea01b2d005de3e030229f79a37135468fa1631e
[ "MIT" ]
2
2021-06-25T06:06:50.000Z
2021-11-08T23:43:38.000Z
dataloader.py
PaperCodeReview/MoCo-TF
1ea01b2d005de3e030229f79a37135468fa1631e
[ "MIT" ]
4
2021-03-03T06:19:45.000Z
2021-05-20T08:07:50.000Z
import os import random import numpy as np import pandas as pd import tensorflow as tf from augment import Augment AUTO = tf.data.experimental.AUTOTUNE def set_dataset(task, data_path): trainset = pd.read_csv( os.path.join( data_path, 'imagenet_trainset.csv' )).value...
36.657895
92
0.569275
import os import random import numpy as np import pandas as pd import tensorflow as tf from augment import Augment AUTO = tf.data.experimental.AUTOTUNE def set_dataset(task, data_path): trainset = pd.read_csv( os.path.join( data_path, 'imagenet_trainset.csv' )).value...
true
true
f70eacda302b793da33c4fb5beb6b45c6cc933ec
1,315
py
Python
user_modeling.py
leeamen/k_means
dfa9cad22033c108e3988a99f4d58c685eb06921
[ "MIT" ]
null
null
null
user_modeling.py
leeamen/k_means
dfa9cad22033c108e3988a99f4d58c685eb06921
[ "MIT" ]
null
null
null
user_modeling.py
leeamen/k_means
dfa9cad22033c108e3988a99f4d58c685eb06921
[ "MIT" ]
null
null
null
#!/usr/bin/python #coding:utf-8 import numpy as np import logging import mylog import mykmeans as ml logger = logging.getLogger(__name__) logger.setLevel(logging.ERROR) def str2num(s): a = ['very_low', 'Low', 'Middle', 'High'] for i in range(0, len(a)): if a[i] == s: return float(i) if __name__ == '__mai...
28.586957
108
0.641825
import numpy as np import logging import mylog import mykmeans as ml logger = logging.getLogger(__name__) logger.setLevel(logging.ERROR) def str2num(s): a = ['very_low', 'Low', 'Middle', 'High'] for i in range(0, len(a)): if a[i] == s: return float(i) if __name__ == '__main__': filename = './data/dat...
true
true
f70eaf3e78788501749a3d605244c7e2c2fa2be1
448
py
Python
creme/linear_model/__init__.py
Raul9595/creme
39cec7ac27ccd40ff0a7bdd6bceaf7ce25c1a8da
[ "BSD-3-Clause" ]
1
2020-07-27T03:06:46.000Z
2020-07-27T03:06:46.000Z
creme/linear_model/__init__.py
2torus/creme
bcc5e2a0155663a1f0ba779c68f23456695bcb54
[ "BSD-3-Clause" ]
null
null
null
creme/linear_model/__init__.py
2torus/creme
bcc5e2a0155663a1f0ba779c68f23456695bcb54
[ "BSD-3-Clause" ]
null
null
null
""" Generalized linear models optimized with online gradient descent from :mod:`creme.optim`. """ from .fm import FMRegressor from .lin_reg import LinearRegression from .log_reg import LogisticRegression from .pa import PAClassifier from .pa import PARegressor from .softmax import SoftmaxRegression __all__ = [ 'F...
22.4
89
0.754464
from .fm import FMRegressor from .lin_reg import LinearRegression from .log_reg import LogisticRegression from .pa import PAClassifier from .pa import PARegressor from .softmax import SoftmaxRegression __all__ = [ 'FMRegressor', 'LinearRegression', 'LogisticRegression', 'PAClassifier', 'PARegresso...
true
true
f70eafdd54bf8b3c012d6d488772e18beb4c652b
8,654
py
Python
glue/plugins/export_d3po.py
bsipocz/glue
7b7e4879b4c746b2419a0eca2a17c2d07a3fded3
[ "BSD-3-Clause" ]
null
null
null
glue/plugins/export_d3po.py
bsipocz/glue
7b7e4879b4c746b2419a0eca2a17c2d07a3fded3
[ "BSD-3-Clause" ]
null
null
null
glue/plugins/export_d3po.py
bsipocz/glue
7b7e4879b4c746b2419a0eca2a17c2d07a3fded3
[ "BSD-3-Clause" ]
null
null
null
import json import os from astropy.table import Table, Column from ..config import exporters from ..qt.widgets import ScatterWidget, HistogramWidget from ..core import Subset def save_page(page, page_number, label, subset): """ Convert a tab of a glue session into a D3PO page :param page: Tuple of data vie...
28.846667
121
0.619829
import json import os from astropy.table import Table, Column from ..config import exporters from ..qt.widgets import ScatterWidget, HistogramWidget from ..core import Subset def save_page(page, page_number, label, subset): """ Convert a tab of a glue session into a D3PO page :param page: Tuple of data vie...
false
true
f70eb08931175461e6046102ac021119a7ea22c2
8,490
py
Python
docs/conf.py
daherman/dedupe
053d373aaed47201f720c5b6d1a568fc49742cc3
[ "MIT" ]
1
2020-06-26T18:03:34.000Z
2020-06-26T18:03:34.000Z
docs/conf.py
daherman/dedupe
053d373aaed47201f720c5b6d1a568fc49742cc3
[ "MIT" ]
null
null
null
docs/conf.py
daherman/dedupe
053d373aaed47201f720c5b6d1a568fc49742cc3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # dedupe documentation build configuration file, created by # sphinx-quickstart on Thu Apr 10 11:27:59 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
31.444444
95
0.715901
import sys import os extensions = [ 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'dedupe' copyright = u'2018, Forest Gregg, Derek Eder...
true
true
f70eb0922b08398271e740b375a058194fb88a63
10,033
py
Python
auth-api/src/auth_api/models/user.py
vysakh-menon-aot/sbc-auth
b5c18df3b7586cb7d9761f7fc0809cb2cbb3b096
[ "Apache-2.0" ]
null
null
null
auth-api/src/auth_api/models/user.py
vysakh-menon-aot/sbc-auth
b5c18df3b7586cb7d9761f7fc0809cb2cbb3b096
[ "Apache-2.0" ]
null
null
null
auth-api/src/auth_api/models/user.py
vysakh-menon-aot/sbc-auth
b5c18df3b7586cb7d9761f7fc0809cb2cbb3b096
[ "Apache-2.0" ]
null
null
null
# Copyright © 2019 Province of British Columbia # # 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 agr...
43.4329
118
0.653344
import datetime from flask import current_app from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, String, and_, or_ from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.orm import relationship from auth_api.utils.enums import AccessType, LoginSource, Status, UserStatus from...
true
true
f70eb14a7a606f28ca7a0378c580389cd746f583
213
py
Python
tests/test.py
JamesRunnalls/netcdf2geotiff
69ed4232998ce45bcb47035a077009ad0882f5ec
[ "MIT" ]
null
null
null
tests/test.py
JamesRunnalls/netcdf2geotiff
69ed4232998ce45bcb47035a077009ad0882f5ec
[ "MIT" ]
null
null
null
tests/test.py
JamesRunnalls/netcdf2geotiff
69ed4232998ce45bcb47035a077009ad0882f5ec
[ "MIT" ]
null
null
null
from netcdf2geotiff import rgb_geotiff, singleband_geotiff rgb_geotiff("test3.nc", "test3.tif", "RED", "GREEN", "BLUE", "lat", "lon") singleband_geotiff("test3.nc", "tests3.tif", "IDEPIX_SNOW_ICE", "lat", "lon")
42.6
77
0.713615
from netcdf2geotiff import rgb_geotiff, singleband_geotiff rgb_geotiff("test3.nc", "test3.tif", "RED", "GREEN", "BLUE", "lat", "lon") singleband_geotiff("test3.nc", "tests3.tif", "IDEPIX_SNOW_ICE", "lat", "lon")
true
true
f70eb1feadb7d4ea843f887e4935a9b29163f734
1,071
py
Python
python/src/aoc/year2015/day6.py
ocirne/adventofcode
ea9b5f1b48a04284521e85c96b420ed54adf55f0
[ "Unlicense" ]
1
2021-02-16T21:30:04.000Z
2021-02-16T21:30:04.000Z
python/src/aoc/year2015/day6.py
ocirne/adventofcode
ea9b5f1b48a04284521e85c96b420ed54adf55f0
[ "Unlicense" ]
null
null
null
python/src/aoc/year2015/day6.py
ocirne/adventofcode
ea9b5f1b48a04284521e85c96b420ed54adf55f0
[ "Unlicense" ]
null
null
null
from collections import defaultdict from aoc.util import load_input def turn(d, fun, sxy, exy): sx, sy = map(int, sxy.split(",")) ex, ey = map(int, exy.split(",")) for x in range(sx, ex + 1): for y in range(sy, ey + 1): d[(x, y)] = fun(d[(x, y)]) def run(data, toggle, turn_on, turn_...
26.121951
80
0.573296
from collections import defaultdict from aoc.util import load_input def turn(d, fun, sxy, exy): sx, sy = map(int, sxy.split(",")) ex, ey = map(int, exy.split(",")) for x in range(sx, ex + 1): for y in range(sy, ey + 1): d[(x, y)] = fun(d[(x, y)]) def run(data, toggle, turn_on, turn_...
true
true
f70eb2beb7c9126a39c5a492ce778317fcf5af57
73,671
py
Python
lexer_parser/domas_parser.py
franzbarron/proyecto-compis
29b3b9a588a92f5257bc3b1bb646734b7ace985b
[ "MIT" ]
null
null
null
lexer_parser/domas_parser.py
franzbarron/proyecto-compis
29b3b9a588a92f5257bc3b1bb646734b7ace985b
[ "MIT" ]
null
null
null
lexer_parser/domas_parser.py
franzbarron/proyecto-compis
29b3b9a588a92f5257bc3b1bb646734b7ace985b
[ "MIT" ]
null
null
null
from sly import Parser from sly.yacc import _decorator as _ from .domas_lexer import DomasLexer from .domas_quadruples import Quadruple from .domas_errors import * from . import domas_semantic_cube as sm import json # to debug only import os import copy os.system('color') class DomasParser(Parser): # Parser dir...
43.773619
213
0.565392
from sly import Parser from sly.yacc import _decorator as _ from .domas_lexer import DomasLexer from .domas_quadruples import Quadruple from .domas_errors import * from . import domas_semantic_cube as sm import json import os import copy os.system('color') class DomasParser(Parser): tokens = DomasLexer.to...
true
true
f70eb2c0d33d0d03e11a8847b577c694fe9dd459
1,322
py
Python
tracdap-runtime/python/test/tracdap_examples/test_chaining.py
martin-traverse/tracdap
2df2f08bee352f4f5188953efe5a33aa1ae51f2d
[ "Apache-2.0" ]
null
null
null
tracdap-runtime/python/test/tracdap_examples/test_chaining.py
martin-traverse/tracdap
2df2f08bee352f4f5188953efe5a33aa1ae51f2d
[ "Apache-2.0" ]
null
null
null
tracdap-runtime/python/test/tracdap_examples/test_chaining.py
martin-traverse/tracdap
2df2f08bee352f4f5188953efe5a33aa1ae51f2d
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Accenture Global Solutions Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
28.12766
75
0.706505
import unittest import pathlib import sys import tracdap.rt.launch as launch _ROOT_DIR = pathlib.Path(__file__).parent \ .joinpath("../../../..") \ .resolve() _EXAMPLES_DIR = _ROOT_DIR.joinpath("examples/models/python") class ChainingExample(unittest.TestCase): def test_chaining(self): ...
true
true
f70eb2d8117df4c61263da019a776ba2536c2d96
4,243
py
Python
day08/run.py
kung-foo/aoc2021
ce3111d50b7b3354331b8dc546b13c7fe8882ba9
[ "Apache-2.0" ]
null
null
null
day08/run.py
kung-foo/aoc2021
ce3111d50b7b3354331b8dc546b13c7fe8882ba9
[ "Apache-2.0" ]
null
null
null
day08/run.py
kung-foo/aoc2021
ce3111d50b7b3354331b8dc546b13c7fe8882ba9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os import sys import random import numpy as np src = open("input.txt", "r").readlines() example = """ be cfbegad cbdgef fgaecd cgeb fdcge agebfd fecdb fabcd edb | fdgacbe cefdb cefbgd gcbe edbfga begcd cbg gc gcadebf fbgde acbgfd abcde gfcbed gfec | fcgedb cgb dgebacf gc fgaebd cg bdaec...
26.51875
111
0.525572
import os import sys import random import numpy as np src = open("input.txt", "r").readlines() example = """ be cfbegad cbdgef fgaecd cgeb fdcge agebfd fecdb fabcd edb | fdgacbe cefdb cefbgd gcbe edbfga begcd cbg gc gcadebf fbgde acbgfd abcde gfcbed gfec | fcgedb cgb dgebacf gc fgaebd cg bdaec gdafb agbcfd gdcbef b...
true
true
f70eb2e3a9de09a2e1bdb89d0cfb67ccb56d4e41
7,146
py
Python
Tests/GUI/DMachineSetup/test_DMachineSetup.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
Tests/GUI/DMachineSetup/test_DMachineSetup.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
Tests/GUI/DMachineSetup/test_DMachineSetup.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @date Created on Thu May 18 14:35:34 2017 @copyright (C) 2015-2016 EOMYS ENGINEERING. @author: pierre_b """ from os.path import join, isfile from os import remove import sys from unittest import TestCase from ddt import ddt, data import mock # for unittest of raw_input from PyQt5 import Q...
39.480663
86
0.687378
from os.path import join, isfile from os import remove import sys from unittest import TestCase from ddt import ddt, data import mock from PyQt5 import QtWidgets from pyleecan.Classes.MachineSyRM import MachineSyRM from pyleecan.Classes.MachineIPMSM import MachineIPMSM from pyleecan.Classes.MachineDFIM import Mac...
true
true
f70eb2f3401ca84927cd6ad2318eeb8439e46c72
2,814
py
Python
core/queue/views.py
lottspot/prevention-point
e4d5eaa437c3e979e8585bdada4efd33e995e39e
[ "MIT" ]
35
2019-03-12T23:59:10.000Z
2021-04-05T15:07:38.000Z
core/queue/views.py
lottspot/prevention-point
e4d5eaa437c3e979e8585bdada4efd33e995e39e
[ "MIT" ]
365
2019-03-12T23:40:39.000Z
2022-02-10T11:07:26.000Z
core/queue/views.py
lottspot/prevention-point
e4d5eaa437c3e979e8585bdada4efd33e995e39e
[ "MIT" ]
20
2019-03-12T23:36:25.000Z
2021-12-30T00:05:42.000Z
import datetime from rest_framework import viewsets, status from rest_framework.response import Response from rest_framework.permissions import IsAuthenticated from core.permissions import DjangoModelPermissions from core.visits.serializer import PopulatedVisitSerializer from core.models import Visit, FrontDeskEvent,...
40.2
98
0.657783
import datetime from rest_framework import viewsets, status from rest_framework.response import Response from rest_framework.permissions import IsAuthenticated from core.permissions import DjangoModelPermissions from core.visits.serializer import PopulatedVisitSerializer from core.models import Visit, FrontDeskEvent,...
true
true
f70eb3a29c6a510eca3947f79787ed0abd7f6655
732
py
Python
day01_Sonar_Sweep/day01.py
anolivei/advent_of_code_2021
1eac988d37bf754bbee68fad2e927914351a5a2b
[ "MIT" ]
null
null
null
day01_Sonar_Sweep/day01.py
anolivei/advent_of_code_2021
1eac988d37bf754bbee68fad2e927914351a5a2b
[ "MIT" ]
null
null
null
day01_Sonar_Sweep/day01.py
anolivei/advent_of_code_2021
1eac988d37bf754bbee68fad2e927914351a5a2b
[ "MIT" ]
null
null
null
def open_input(): with open("input.txt") as fd: array = fd.read().splitlines() array = list(map(int, array)) return array def part_one(array): lenght = len(array) increased = 0 for i in range(0, lenght - 1): if array[i] < array[i + 1]: increased += 1 print("part...
22.875
57
0.543716
def open_input(): with open("input.txt") as fd: array = fd.read().splitlines() array = list(map(int, array)) return array def part_one(array): lenght = len(array) increased = 0 for i in range(0, lenght - 1): if array[i] < array[i + 1]: increased += 1 print("part...
true
true
f70eb3de404bce1c3ea4c27a5b70915529f3a386
6,153
py
Python
sdk/python/pulumi_azure_native/customproviders/v20180901preview/get_custom_resource_provider.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/customproviders/v20180901preview/get_custom_resource_provider.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/customproviders/v20180901preview/get_custom_resource_provider.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...
35.982456
174
0.653827
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetCustomResourceProviderResult', 'AwaitableGetCustomResourceProviderResult', 'get_custom_resource_provider', ] @pulumi...
true
true
f70eb40817dabb9bff5e70b4866289c7586fcf23
1,189
py
Python
plugins/action/gitlab_modwrap.py
sma-de/ansible-collections-gitlab
5da99b04722fc016d3e8589635fcbb3579dcfda2
[ "BSD-3-Clause" ]
null
null
null
plugins/action/gitlab_modwrap.py
sma-de/ansible-collections-gitlab
5da99b04722fc016d3e8589635fcbb3579dcfda2
[ "BSD-3-Clause" ]
null
null
null
plugins/action/gitlab_modwrap.py
sma-de/ansible-collections-gitlab
5da99b04722fc016d3e8589635fcbb3579dcfda2
[ "BSD-3-Clause" ]
null
null
null
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import collections ##from ansible.errors import AnsibleOptionsError, AnsibleModuleError##, AnsibleError ####from ansible.module_utils._text import to_native from ansible.module_utils.six import iteritems, string_types from ansi...
25.847826
96
0.699748
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import collections ionModule(GitlabBase): def __init__(self, *args, **kwargs): super(ActionModule, self).__init__(*args, **kwargs) self._supports_check_mode = False self._supports_async = False ...
true
true
f70eb5b9f0829e7189fca574a45e2c0d95713fd9
2,964
py
Python
python/tests/test_oberon.py
tmarkovski/okapi
1ce36d2a82bb0e409a5183cd116d3a9eb474fc9f
[ "Apache-2.0" ]
null
null
null
python/tests/test_oberon.py
tmarkovski/okapi
1ce36d2a82bb0e409a5183cd116d3a9eb474fc9f
[ "Apache-2.0" ]
null
null
null
python/tests/test_oberon.py
tmarkovski/okapi
1ce36d2a82bb0e409a5183cd116d3a9eb474fc9f
[ "Apache-2.0" ]
null
null
null
import unittest from okapi.proto.okapi.security.v1 import CreateOberonKeyRequest, CreateOberonTokenRequest, CreateOberonProofRequest, \ VerifyOberonProofRequest, UnBlindOberonTokenRequest, BlindOberonTokenRequest from okapi.wrapper import Oberon class KeyTests(unittest.TestCase): def test_oberon_demo(self): ...
48.590164
119
0.721997
import unittest from okapi.proto.okapi.security.v1 import CreateOberonKeyRequest, CreateOberonTokenRequest, CreateOberonProofRequest, \ VerifyOberonProofRequest, UnBlindOberonTokenRequest, BlindOberonTokenRequest from okapi.wrapper import Oberon class KeyTests(unittest.TestCase): def test_oberon_demo(self): ...
true
true
f70eb60e7035a3d1c3d3275fedadb650fd20fe9f
3,030
py
Python
searchmethods/modularGA.py
esnet/hps-rl
8426652e622394a955a44c42201e2204f6bfa0f2
[ "BSD-3-Clause-LBNL" ]
null
null
null
searchmethods/modularGA.py
esnet/hps-rl
8426652e622394a955a44c42201e2204f6bfa0f2
[ "BSD-3-Clause-LBNL" ]
null
null
null
searchmethods/modularGA.py
esnet/hps-rl
8426652e622394a955a44c42201e2204f6bfa0f2
[ "BSD-3-Clause-LBNL" ]
null
null
null
import numpy, random class Individual: def __init__(self,genome, llimits =[], ulimits=[], type=[], LEN = 1,fitness_func = None): if genome is None: self.genome = numpy.zeros(LEN,dtype=float) for gene in range(LEN): if type[gene] == "integer": ...
34.044944
133
0.59703
import numpy, random class Individual: def __init__(self,genome, llimits =[], ulimits=[], type=[], LEN = 1,fitness_func = None): if genome is None: self.genome = numpy.zeros(LEN,dtype=float) for gene in range(LEN): if type[gene] == "integer": ...
true
true
f70eb629524c29581304d4058b938e52261dca03
10,701
py
Python
kubernetes_asyncio/client/models/v1_topology_spread_constraint.py
lsst-sqre/kubernetes_asyncio
f028cc793e3a2c519be6a52a49fb77ff0b014c9b
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_topology_spread_constraint.py
lsst-sqre/kubernetes_asyncio
f028cc793e3a2c519be6a52a49fb77ff0b014c9b
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_topology_spread_constraint.py
lsst-sqre/kubernetes_asyncio
f028cc793e3a2c519be6a52a49fb77ff0b014c9b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.19.15 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six f...
51.447115
965
0.680404
import pprint import re import six from kubernetes_asyncio.client.configuration import Configuration class V1TopologySpreadConstraint(object): openapi_types = { 'label_selector': 'V1LabelSelector', 'max_skew': 'int', 'topology_key': 'str', 'when_unsatisfiable': 'str' }...
true
true
f70eb689c0446ccc43bdd2bc306542d157e6219f
589
py
Python
splango/urls.py
shimon/Splango
a89408b8b62d631763d42e049dd1b7d6ef72b02f
[ "MIT" ]
3
2016-06-02T10:18:57.000Z
2022-03-16T06:10:21.000Z
splango/urls.py
shimon/Splango
a89408b8b62d631763d42e049dd1b7d6ef72b02f
[ "MIT" ]
null
null
null
splango/urls.py
shimon/Splango
a89408b8b62d631763d42e049dd1b7d6ef72b02f
[ "MIT" ]
1
2022-03-16T06:10:33.000Z
2022-03-16T06:10:33.000Z
from django.conf.urls.defaults import * urlpatterns = patterns( 'splango.views', url(r'^confirm_human/$', 'confirm_human', name="splango-confirm-human"), url(r'^admin/$', 'experiments_overview', name="splango-admin"), url(r'^admin/exp/(?P<expname>[^/]+)/$', 'experiment_detail', name="splango-experimen...
39.266667
128
0.629881
from django.conf.urls.defaults import * urlpatterns = patterns( 'splango.views', url(r'^confirm_human/$', 'confirm_human', name="splango-confirm-human"), url(r'^admin/$', 'experiments_overview', name="splango-admin"), url(r'^admin/exp/(?P<expname>[^/]+)/$', 'experiment_detail', name="splango-experimen...
true
true
f70eb6f89adb3426524735b14874f388558e4b0c
5,289
py
Python
data_creation.py
Bruce-zxy/deep-study-lenet5
bba6531c9234c077107f79ff852f141cfed58229
[ "MIT" ]
null
null
null
data_creation.py
Bruce-zxy/deep-study-lenet5
bba6531c9234c077107f79ff852f141cfed58229
[ "MIT" ]
null
null
null
data_creation.py
Bruce-zxy/deep-study-lenet5
bba6531c9234c077107f79ff852f141cfed58229
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import random import numpy as np import pandas as pd import h5py import matplotlib.pyplot as plt from math import cos, sin, atan2, sqrt, pi, radians, degrees, ceil, isnan from skimage import io, transform BASE_DIR = os.path.dirname(os.path.abspath(__f...
31.861446
76
0.636226
import os import sys import random import numpy as np import pandas as pd import h5py import matplotlib.pyplot as plt from math import cos, sin, atan2, sqrt, pi, radians, degrees, ceil, isnan from skimage import io, transform BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) TRAIN_CSV_...
true
true
f70eb7f417149b9a8081bb318f4066b6168a6304
1,289
py
Python
362 Design Hit Counter.py
ChiFire/legend_LeetCode
93fe97fef7e929fdbdc25fbb53955d44e14ecff8
[ "MIT" ]
872
2015-06-15T12:02:41.000Z
2022-03-30T08:44:35.000Z
362 Design Hit Counter.py
ChiFire/legend_LeetCode
93fe97fef7e929fdbdc25fbb53955d44e14ecff8
[ "MIT" ]
8
2015-06-21T15:11:59.000Z
2022-02-01T11:22:34.000Z
362 Design Hit Counter.py
ChiFire/legend_LeetCode
93fe97fef7e929fdbdc25fbb53955d44e14ecff8
[ "MIT" ]
328
2015-06-28T03:10:35.000Z
2022-03-29T11:05:28.000Z
""" Premium Question """ from collections import deque __author__ = 'Daniel' class HitCounter(object): def __init__(self): """ Initialize your data structure here. calls are being made to the system in chronological order. It is possible that several hits arrive roughly at the sa...
26.854167
105
0.612878
from collections import deque __author__ = 'Daniel' class HitCounter(object): def __init__(self): self.q = deque() def hit(self, timestamp): self.pop(timestamp) self.q.append(timestamp) def getHits(self, timestamp): self.pop(timestamp) return len(self.q) def...
true
true
f70eb992a38c3e76ec1dd03ed607975174757fd1
5,136
py
Python
pyinfra/operations/yum.py
vamshi091211/pyinfra
6e14b039422e00ebc68110eabbc6a3a543c96279
[ "MIT" ]
1
2022-03-24T05:44:45.000Z
2022-03-24T05:44:45.000Z
pyinfra/operations/yum.py
marinakravchenko21/pyinfra
6e14b039422e00ebc68110eabbc6a3a543c96279
[ "MIT" ]
null
null
null
pyinfra/operations/yum.py
marinakravchenko21/pyinfra
6e14b039422e00ebc68110eabbc6a3a543c96279
[ "MIT" ]
1
2021-11-12T18:36:01.000Z
2021-11-12T18:36:01.000Z
''' Manage yum packages and repositories. Note that yum package names are case-sensitive. ''' from __future__ import unicode_literals from pyinfra.api import operation from . import files from .util.packaging import ensure_packages, ensure_rpm, ensure_yum_repo @operation def key(state, host, key): ''' Add ...
27.319149
85
0.626558
from __future__ import unicode_literals from pyinfra.api import operation from . import files from .util.packaging import ensure_packages, ensure_rpm, ensure_yum_repo @operation def key(state, host, key): yield 'rpm --import {0}'.format(key) @operation def repo( state, host, name, baseurl=None, pres...
true
true
f70eba1aa1744645a51c91f874da542a669aeca5
168
py
Python
setup.py
jovanzac/Server
90932560b61f378122355bb8df18309b245858d5
[ "MIT" ]
null
null
null
setup.py
jovanzac/Server
90932560b61f378122355bb8df18309b245858d5
[ "MIT" ]
null
null
null
setup.py
jovanzac/Server
90932560b61f378122355bb8df18309b245858d5
[ "MIT" ]
null
null
null
from cx_Freeze import setup, Executable setup(name = "Server" , version = "1.0" , description = "" , executables = [Executable("server.py")])
21
46
0.583333
from cx_Freeze import setup, Executable setup(name = "Server" , version = "1.0" , description = "" , executables = [Executable("server.py")])
true
true
f70eba2ea25aab68aa58ed217078ed6007e84dc0
23,807
py
Python
conans/client/build/cmake.py
sigiesec/conan
f966d516452380918437888811bc833c804dac39
[ "MIT" ]
null
null
null
conans/client/build/cmake.py
sigiesec/conan
f966d516452380918437888811bc833c804dac39
[ "MIT" ]
null
null
null
conans/client/build/cmake.py
sigiesec/conan
f966d516452380918437888811bc833c804dac39
[ "MIT" ]
null
null
null
import os import platform from collections import OrderedDict from itertools import chain from conans.client import defs_to_string, join_arguments from conans.client.build.cppstd_flags import cppstd_flag from conans.client.tools import cross_building from conans.client.tools.oss import get_cross_building_settings fro...
42.588551
119
0.604192
import os import platform from collections import OrderedDict from itertools import chain from conans.client import defs_to_string, join_arguments from conans.client.build.cppstd_flags import cppstd_flag from conans.client.tools import cross_building from conans.client.tools.oss import get_cross_building_settings fro...
true
true
f70eba7ac72db4241c482950c5d46e65d867d233
2,161
py
Python
apps/erms/api.py
remocrevo/celus
682b13168eb475d7f970502113e756e40a899877
[ "MIT" ]
7
2020-02-20T13:24:40.000Z
2022-01-28T19:36:04.000Z
apps/erms/api.py
remocrevo/celus
682b13168eb475d7f970502113e756e40a899877
[ "MIT" ]
15
2020-04-28T13:09:02.000Z
2021-11-03T15:21:24.000Z
apps/erms/api.py
remocrevo/celus
682b13168eb475d7f970502113e756e40a899877
[ "MIT" ]
4
2020-02-20T13:48:30.000Z
2021-03-19T00:33:34.000Z
import urllib.parse import requests class ERMSError(Exception): pass class ERMS(object): """ Possible queries: /object?id=eq.574 /object?id=in.(574,575) """ # endpoints EP_OBJECT = 'object' EP_IDENTITY = 'identity' EP_CONSORTIUM = 'consortium' EP_CONSORTIUM_MEMBER = ...
28.064935
72
0.61777
import urllib.parse import requests class ERMSError(Exception): pass class ERMS(object): EP_OBJECT = 'object' EP_IDENTITY = 'identity' EP_CONSORTIUM = 'consortium' EP_CONSORTIUM_MEMBER = 'consortium_member' EP_ACQUISITION = 'acquisition' EP_PROCUREMENT = 'procurement' EP_OFF...
true
true
f70ebad00452b2d47ad5070a859d615e6a790ba0
5,906
py
Python
dash/html/Code.py
sthagen/plotly-dash
4a9412efe5229809016eee9a5f1c50f882720c4c
[ "MIT" ]
null
null
null
dash/html/Code.py
sthagen/plotly-dash
4a9412efe5229809016eee9a5f1c50f882720c4c
[ "MIT" ]
null
null
null
dash/html/Code.py
sthagen/plotly-dash
4a9412efe5229809016eee9a5f1c50f882720c4c
[ "MIT" ]
null
null
null
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Code(Component): """A Code component. Code is a wrapper for the <code> HTML5 element. For detailed attribute info see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code ...
31.752688
84
0.596173
from dash.development.base_component import Component, _explicitize_args class Code(Component): _children_props = [] _base_nodes = ["children"] _namespace = "dash_html_components" _type = "Code" @_explicitize_args def __init__( self, children=None, id=Component.UNDE...
true
true
f70ebb69800c57b924e20d307a2ea6cd4f9f431c
11,439
py
Python
python/train_model.py
skinnider/low-data-generative-models
6e743b6d1ba3265f58fcbd33f2c60e633cf25999
[ "MIT" ]
10
2021-02-01T06:21:52.000Z
2022-03-02T23:59:30.000Z
python/train_model.py
skinnider/low-data-generative-models
6e743b6d1ba3265f58fcbd33f2c60e633cf25999
[ "MIT" ]
1
2021-09-21T02:38:07.000Z
2021-09-21T02:38:07.000Z
python/train_model.py
skinnider/low-data-generative-models
6e743b6d1ba3265f58fcbd33f2c60e633cf25999
[ "MIT" ]
5
2021-04-16T18:11:48.000Z
2021-12-08T07:21:09.000Z
""" Train a language model to generate SMILES. """ import argparse import os import numpy as np import pandas as pd import random import sys import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader from tqdm import tqdm # suppress Chem.MolFromSmiles error output from rdki...
39.309278
79
0.652417
import argparse import os import numpy as np import pandas as pd import random import sys import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader from tqdm import tqdm from rdkit import rdBase rdBase.DisableLog('rdApp.error') git_dir = os.path.expanduser("~/git/low-da...
true
true
f70ebc9c8b640280b26f6fd66deed90179dd2995
31,646
py
Python
pytype/analyze.py
Hirni-Meshram4/pytype
24b04237c15822b26f51c545646e4e5fff1ab709
[ "Apache-2.0" ]
null
null
null
pytype/analyze.py
Hirni-Meshram4/pytype
24b04237c15822b26f51c545646e4e5fff1ab709
[ "Apache-2.0" ]
null
null
null
pytype/analyze.py
Hirni-Meshram4/pytype
24b04237c15822b26f51c545646e4e5fff1ab709
[ "Apache-2.0" ]
null
null
null
"""Code for checking and inferring types.""" import collections import logging import re import subprocess from typing import Any, Dict, Union from pytype import abstract from pytype import abstract_utils from pytype import convert_structural from pytype import debug from pytype import function from pytype import met...
41.694335
80
0.684573
import collections import logging import re import subprocess from typing import Any, Dict, Union from pytype import abstract from pytype import abstract_utils from pytype import convert_structural from pytype import debug from pytype import function from pytype import metrics from pytype import special_builtins from...
true
true
f70ebcc7d351e260c5318ca161f5f74fcdefc39f
2,579
py
Python
item_44_pickle_copyreg.py
nickaigi/effective_python_tips
1a68b6eaed2e946b003c0cd0bdea03e79b8e8990
[ "Unlicense" ]
null
null
null
item_44_pickle_copyreg.py
nickaigi/effective_python_tips
1a68b6eaed2e946b003c0cd0bdea03e79b8e8990
[ "Unlicense" ]
null
null
null
item_44_pickle_copyreg.py
nickaigi/effective_python_tips
1a68b6eaed2e946b003c0cd0bdea03e79b8e8990
[ "Unlicense" ]
null
null
null
""" pickle can serialized python objects into a stream of bytes and deserialize bytes back into objects. Note: by design, pickle is unsafe! """ import pickle state_path = 'game_state.bin' class GameState(object): def __init__(self): self.level = 0 self.lives = 4 def save_game(state): ...
20.468254
73
0.632803
import pickle state_path = 'game_state.bin' class GameState(object): def __init__(self): self.level = 0 self.lives = 4 def save_game(state): with open(state_path, 'wb') as f: pickle.dump(state, f) def load_game(): state_after = {} with open(state_path, 'rb') as f: ...
true
true
f70ebd3a3a9e6e7198ad4ce295f8d246601bb1e8
5,826
py
Python
homeassistant/components/push/camera.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/push/camera.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/push/camera.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Camera platform that receives images through HTTP POST.""" from __future__ import annotations import asyncio from collections import deque from datetime import timedelta import logging import aiohttp import async_timeout import voluptuous as vol from homeassistant.components import webhook from homeassistant.comp...
30.825397
87
0.656368
from __future__ import annotations import asyncio from collections import deque from datetime import timedelta import logging import aiohttp import async_timeout import voluptuous as vol from homeassistant.components import webhook from homeassistant.components.camera import PLATFORM_SCHEMA, STATE_IDLE, Camera from ...
true
true
f70ebd9d986c52d7cd9e9a67cef2870a625bb652
3,080
py
Python
scripts/eval_bleu.py
nng555/fairseq
c9730a125825a85f33042e1b9fd1959b8ca829e5
[ "MIT" ]
2
2020-10-05T08:52:01.000Z
2021-03-03T15:26:35.000Z
scripts/eval_bleu.py
nng555/fairseq
c9730a125825a85f33042e1b9fd1959b8ca829e5
[ "MIT" ]
null
null
null
scripts/eval_bleu.py
nng555/fairseq
c9730a125825a85f33042e1b9fd1959b8ca829e5
[ "MIT" ]
null
null
null
import os import sys import subprocess import hydra from omegaconf import DictConfig from hydra import slurm_utils @hydra.main(config_path='/h/nng/conf/robust/config.yaml') def gen_neighborhood_labels(cfg: DictConfig): base_path = '/h/nng/data' model_data_path = os.path.join(base_path, cfg.data.task, cfg.eval...
40.526316
113
0.593831
import os import sys import subprocess import hydra from omegaconf import DictConfig from hydra import slurm_utils @hydra.main(config_path='/h/nng/conf/robust/config.yaml') def gen_neighborhood_labels(cfg: DictConfig): base_path = '/h/nng/data' model_data_path = os.path.join(base_path, cfg.data.task, cfg.eval...
true
true
f70ebea5539a99338b6dc9117844ec03bdd9efa1
79,789
py
Python
src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_01_01_preview/operations/_deployments_operations.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_01_01_preview/operations/_deployments_operations.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_01_01_preview/operations/_deployments_operations.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.443585
254
0.660492
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
f70ec1157e54153c23a33efa2de815ddfff14a48
4,440
py
Python
src/helper/trainer.py
rlaehgns5399/GoogLeNet-Inception-tf
eb9597634eec9a7b511e967ad8c7b2552563755f
[ "MIT" ]
3
2018-12-02T13:34:32.000Z
2019-03-18T03:23:37.000Z
src/helper/trainer.py
rlaehgns5399/GoogLeNet-Inception-tf
eb9597634eec9a7b511e967ad8c7b2552563755f
[ "MIT" ]
null
null
null
src/helper/trainer.py
rlaehgns5399/GoogLeNet-Inception-tf
eb9597634eec9a7b511e967ad8c7b2552563755f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: trainer.py # Author: Qian Ge <geqian1001@gmail.com> import os import numpy as np import tensorflow as tf def display(global_step, step, scaler_sum_list, name_list, collection, summary_val=None, ...
33.134328
80
0.547072
import os import numpy as np import tensorflow as tf def display(global_step, step, scaler_sum_list, name_list, collection, summary_val=None, summary_writer=None, ): print('[step: {}]'.format(global_step), end='') for val...
true
true
f70ec119a082e7c27fa7682d87edbb9dac979d7d
601
py
Python
ndg/__init__.py
philipkershaw/ndg_xacml
f24ccbb4d4c053c585b0369dfe5a5949d49f9715
[ "BSD-3-Clause" ]
null
null
null
ndg/__init__.py
philipkershaw/ndg_xacml
f24ccbb4d4c053c585b0369dfe5a5949d49f9715
[ "BSD-3-Clause" ]
null
null
null
ndg/__init__.py
philipkershaw/ndg_xacml
f24ccbb4d4c053c585b0369dfe5a5949d49f9715
[ "BSD-3-Clause" ]
null
null
null
"""NDG XACML ndg namespace package NERC DataGrid This is a setuptools namespace_package. DO NOT place any other code in this file! There is no guarantee that it will be installed with easy_install. See: http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages ... for details. """ __author__ = "P J K...
30.05
69
0.768719
__author__ = "P J Kershaw" __date__ = "19/02/10" __copyright__ = "(C) 2010 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __revision__ = '$Id$' __import__('pkg_resources').declare_namespace(__name__)
true
true
f70ec43dc91c15bd7888f7714dfbcacfc1d5d148
4,513
py
Python
fastai/torch_imports.py
CalebEverett/fastai-dl2
64d23592eddca6ca1f3647e73c319e97c8eb392b
[ "Apache-2.0" ]
4
2018-03-29T20:47:24.000Z
2019-05-06T12:31:11.000Z
fastai/torch_imports.py
CalebEverett/fastai-dl2
64d23592eddca6ca1f3647e73c319e97c8eb392b
[ "Apache-2.0" ]
null
null
null
fastai/torch_imports.py
CalebEverett/fastai-dl2
64d23592eddca6ca1f3647e73c319e97c8eb392b
[ "Apache-2.0" ]
null
null
null
import os import torch, torchvision, torchtext from torch import nn, cuda, backends, FloatTensor, LongTensor, optim import torch.nn.functional as F from torch.autograd import Variable from torch.utils.data import Dataset, TensorDataset from torch.nn.init import kaiming_uniform, kaiming_normal from torchvision.transform...
46.525773
122
0.739198
import os import torch, torchvision, torchtext from torch import nn, cuda, backends, FloatTensor, LongTensor, optim import torch.nn.functional as F from torch.autograd import Variable from torch.utils.data import Dataset, TensorDataset from torch.nn.init import kaiming_uniform, kaiming_normal from torchvision.transform...
true
true
f70ec5c93336e5b029a6279f82499cd519691765
6,514
py
Python
models/model.py
qq456cvb/CPPF
79366978854ae18b14c69ac850ea64b9dc286081
[ "MIT" ]
23
2022-03-06T12:01:00.000Z
2022-03-31T19:26:39.000Z
models/model.py
qq456cvb/CPPF
79366978854ae18b14c69ac850ea64b9dc286081
[ "MIT" ]
null
null
null
models/model.py
qq456cvb/CPPF
79366978854ae18b14c69ac850ea64b9dc286081
[ "MIT" ]
2
2022-03-23T07:14:13.000Z
2022-03-24T07:18:55.000Z
import torch import torch.nn as nn import torch.nn.functional as F from .sprin import GlobalInfoProp, SparseSO3Conv import numpy as np class ResLayer(torch.nn.Module): def __init__(self, dim_in, dim_out, bn=False) -> None: super().__init__() assert(bn is False) self.fc1 = torch.nn.Linear(d...
47.202899
202
0.57553
import torch import torch.nn as nn import torch.nn.functional as F from .sprin import GlobalInfoProp, SparseSO3Conv import numpy as np class ResLayer(torch.nn.Module): def __init__(self, dim_in, dim_out, bn=False) -> None: super().__init__() assert(bn is False) self.fc1 = torch.nn.Linear(d...
true
true
f70ec5d7df1d46b90aac95d7005cb457c693a297
4,095
py
Python
ea_sim/visualization_adv_tasks/convert_history_to_archive.py
lis-epfl/Tensoft-G21
7a83c5dabc12906c0a6bd1da0a28a131e9d5e144
[ "Apache-2.0" ]
1
2021-08-03T10:52:20.000Z
2021-08-03T10:52:20.000Z
ea_sim/visualization_adv_tasks/convert_history_to_archive.py
lis-epfl/Tensoft-G21
7a83c5dabc12906c0a6bd1da0a28a131e9d5e144
[ "Apache-2.0" ]
null
null
null
ea_sim/visualization_adv_tasks/convert_history_to_archive.py
lis-epfl/Tensoft-G21
7a83c5dabc12906c0a6bd1da0a28a131e9d5e144
[ "Apache-2.0" ]
1
2021-09-18T07:23:35.000Z
2021-09-18T07:23:35.000Z
import argparse import json import numpy as np import os import subprocess import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from params_conf import N_MODULES, MIN_NUM_MODULES, STIFF_TABLE from utils import parse_robot_string def convert_h_to_arch(h_file, morph_file, best_funct...
45.5
119
0.620757
import argparse import json import numpy as np import os import subprocess import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from params_conf import N_MODULES, MIN_NUM_MODULES, STIFF_TABLE from utils import parse_robot_string def convert_h_to_arch(h_file, morph_file, best_funct...
true
true
f70ec64b9e31daafd1fb2f1ca0a900fb5ba86171
3,473
py
Python
pyexcel_xls/xlsw.py
pyexcel/pyexcel-xls
995cfd273d5360947a528ff3a1ed3f9e52a429ad
[ "BSD-3-Clause" ]
40
2016-05-18T20:09:39.000Z
2022-02-09T06:39:41.000Z
pyexcel_xls/xlsw.py
wenxuefeng3930/pyexcel-xls
995cfd273d5360947a528ff3a1ed3f9e52a429ad
[ "BSD-3-Clause" ]
46
2016-02-01T22:12:31.000Z
2021-10-07T18:57:05.000Z
pyexcel_xls/xlsw.py
wenxuefeng3930/pyexcel-xls
995cfd273d5360947a528ff3a1ed3f9e52a429ad
[ "BSD-3-Clause" ]
24
2016-01-29T12:26:27.000Z
2021-10-31T15:37:15.000Z
""" pyexcel_xlsw ~~~~~~~~~~~~~~~~~~~ The lower level xls file format handler using xlwt :copyright: (c) 2016-2021 by Onni Software Ltd :license: New BSD License """ import datetime import xlrd from xlwt import XFStyle, Workbook from pyexcel_io import constants from pyexcel_io.plugin_api import IW...
31.008929
78
0.589692
import datetime import xlrd from xlwt import XFStyle, Workbook from pyexcel_io import constants from pyexcel_io.plugin_api import IWriter, ISheetWriter DEFAULT_DATE_FORMAT = "DD/MM/YY" DEFAULT_TIME_FORMAT = "HH:MM:SS" DEFAULT_LONGTIME_FORMAT = "[HH]:MM:SS" DEFAULT_DATETIME_FORMAT = "%s %s" % (DEFAULT_DATE_FORMAT, DEF...
true
true
f70ec7201f8c108b954356e237165ff9018c482b
3,781
py
Python
ethgreen/wallet/wallet_interested_store.py
ethgreen/ethgreen-blockchain
8f1a450897ab7a82326aea7e57e18ac2c03a9e83
[ "Apache-2.0" ]
11
2021-11-10T19:30:12.000Z
2022-02-09T04:30:29.000Z
ethgreen/wallet/wallet_interested_store.py
ethgreen/ethgreen-blockchain
8f1a450897ab7a82326aea7e57e18ac2c03a9e83
[ "Apache-2.0" ]
6
2021-11-16T17:11:03.000Z
2021-12-28T17:11:20.000Z
ethgreen/wallet/wallet_interested_store.py
ethgreen/ethgreen-blockchain
8f1a450897ab7a82326aea7e57e18ac2c03a9e83
[ "Apache-2.0" ]
3
2021-11-21T02:27:10.000Z
2022-03-15T08:34:47.000Z
from typing import List, Tuple, Optional import aiosqlite from ethgreen.types.blockchain_format.sized_bytes import bytes32 from ethgreen.util.db_wrapper import DBWrapper class WalletInterestedStore: """ Stores coin ids that we are interested in receiving """ db_connection: aiosqlite.Connection ...
37.81
115
0.649035
from typing import List, Tuple, Optional import aiosqlite from ethgreen.types.blockchain_format.sized_bytes import bytes32 from ethgreen.util.db_wrapper import DBWrapper class WalletInterestedStore: db_connection: aiosqlite.Connection db_wrapper: DBWrapper @classmethod async def create(cls, wrappe...
true
true
f70ec721475523ddf5e94b147c1e716254668fe7
574
py
Python
ui/maintenance_protocols/decompress.py
liyao001/BioQueue
2b2c9f023b988fd926a037eb4755f639632b2991
[ "Apache-2.0" ]
33
2017-03-12T16:26:45.000Z
2021-04-30T05:37:35.000Z
ui/maintenance_protocols/decompress.py
liyao001/BioQueue
2b2c9f023b988fd926a037eb4755f639632b2991
[ "Apache-2.0" ]
6
2017-04-21T08:44:47.000Z
2018-11-11T16:20:22.000Z
ui/maintenance_protocols/decompress.py
liyao001/BioQueue
2b2c9f023b988fd926a037eb4755f639632b2991
[ "Apache-2.0" ]
13
2017-03-12T16:26:56.000Z
2020-04-20T05:35:00.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 14/01/2018 01:04 AM # @Project : BioQueue # @Author : Li Yao # @File : gunzip.py def get_sub_protocol(db_obj, protocol_parent, step_order_start=1): steps = list() steps.append(db_obj(software='gunzip', parameter='{{InputFil...
31.888889
66
0.560976
def get_sub_protocol(db_obj, protocol_parent, step_order_start=1): steps = list() steps.append(db_obj(software='gunzip', parameter='{{InputFile}}', parent=protocol_parent, user_id=0, hash='541df26aff8e4d054a5...
true
true
f70ec72a7dd5c36e1338a62ba92bead14d1e8e76
846
py
Python
altair_transform/transform/joinaggregate.py
jakevdp/altair-transform
63094097e05891a8d12005b411ad8585b94e81fd
[ "MIT" ]
38
2019-03-23T20:12:06.000Z
2021-10-07T21:03:24.000Z
altair_transform/transform/joinaggregate.py
altair-viz/altair-transform
b65bf854de1e80f931e063d8fb2ec938773826fb
[ "MIT" ]
13
2019-07-19T03:33:07.000Z
2021-06-29T15:34:19.000Z
altair_transform/transform/joinaggregate.py
altair-viz/altair-transform
b65bf854de1e80f931e063d8fb2ec938773826fb
[ "MIT" ]
11
2019-07-19T02:48:35.000Z
2021-11-01T00:07:41.000Z
import altair as alt import pandas as pd from .visitor import visit from .aggregate import AGG_REPLACEMENTS @visit.register(alt.JoinAggregateTransform) def visit_joinaggregate( transform: alt.JoinAggregateTransform, df: pd.DataFrame ) -> pd.DataFrame: transform = transform.to_dict() groupby = transform.ge...
29.172414
61
0.631206
import altair as alt import pandas as pd from .visitor import visit from .aggregate import AGG_REPLACEMENTS @visit.register(alt.JoinAggregateTransform) def visit_joinaggregate( transform: alt.JoinAggregateTransform, df: pd.DataFrame ) -> pd.DataFrame: transform = transform.to_dict() groupby = transform.ge...
true
true
f70ec8116b154a5c5324c8498dcdda97090753ab
9,785
py
Python
habitat/tasks/nav/object_nav_task.py
Ram81/habitat-imitation-baselines
c6e11c8ebadbf1260e1bed58a5b8dfb7faf6a505
[ "MIT" ]
null
null
null
habitat/tasks/nav/object_nav_task.py
Ram81/habitat-imitation-baselines
c6e11c8ebadbf1260e1bed58a5b8dfb7faf6a505
[ "MIT" ]
null
null
null
habitat/tasks/nav/object_nav_task.py
Ram81/habitat-imitation-baselines
c6e11c8ebadbf1260e1bed58a5b8dfb7faf6a505
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os from typing import Any, List, Optional import attr from cv2 import log import numpy as np from gym import spaces from habitat.config...
33.62543
95
0.6465
import os from typing import Any, List, Optional import attr from cv2 import log import numpy as np from gym import spaces from habitat.config import Config from habitat.core.dataset import SceneState from habitat.core.logging import logger from habitat.core.registry import registry from habitat.core.simulator im...
true
true
f70ec8b62d9552a0f4c485bf78d176b374cc936b
8,312
py
Python
kubernetes_asyncio/client/models/v2beta1_metric_spec.py
tomplus/kubernetes-asyncio
11c3eb4d50ae822545572aa7b8c15f7153f65a1c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v2beta1_metric_spec.py
tomplus/kubernetes-asyncio
11c3eb4d50ae822545572aa7b8c15f7153f65a1c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v2beta1_metric_spec.py
tomplus/kubernetes-asyncio
11c3eb4d50ae822545572aa7b8c15f7153f65a1c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.23.6 Generated by: https://openapi-generator.tech """ try: from inspect import getfullargspec except Im...
31.366038
302
0.617661
try: from inspect import getfullargspec except ImportError: from inspect import getargspec as getfullargspec import pprint import re import six from kubernetes_asyncio.client.configuration import Configuration class V2beta1MetricSpec(object): openapi_types = { 'container_resource': 'V2beta...
true
true
f70ec900d5a3779330fc5069041b7d547061f02c
765
py
Python
backend/api/fields.py
NeutralDread/overworld
0f608f83c10b666f2ed2cbe519186cf425a5e354
[ "Apache-2.0" ]
null
null
null
backend/api/fields.py
NeutralDread/overworld
0f608f83c10b666f2ed2cbe519186cf425a5e354
[ "Apache-2.0" ]
null
null
null
backend/api/fields.py
NeutralDread/overworld
0f608f83c10b666f2ed2cbe519186cf425a5e354
[ "Apache-2.0" ]
null
null
null
_game_fields = [ 'cover.image_id', 'first_release_date', 'genres.name', 'involved_companies.developer', 'involved_companies.publisher', 'involved_companies.company.country', 'involved_companies.company.name', 'name', 'platforms.name', 'screenshots.image_id', 'slug', 'summ...
19.615385
44
0.648366
_game_fields = [ 'cover.image_id', 'first_release_date', 'genres.name', 'involved_companies.developer', 'involved_companies.publisher', 'involved_companies.company.country', 'involved_companies.company.name', 'name', 'platforms.name', 'screenshots.image_id', 'slug', 'summ...
true
true
f70ec9f26a955802a506cc9f3c9095b2b09eb7e3
2,934
py
Python
Ryu/topology.py
JoshuaYu-crash/C4EP2-2021
62e2e5a2fb396c598e7e8a265515c342fb78f63e
[ "MIT" ]
null
null
null
Ryu/topology.py
JoshuaYu-crash/C4EP2-2021
62e2e5a2fb396c598e7e8a265515c342fb78f63e
[ "MIT" ]
null
null
null
Ryu/topology.py
JoshuaYu-crash/C4EP2-2021
62e2e5a2fb396c598e7e8a265515c342fb78f63e
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request, jsonify from pyecharts import options as opts from pyecharts.charts import Graph import json import redis from flask_cors import * r = redis.Redis(host="127.0.0.1", port=6379) app = Flask(__name__) CORS(app, supports_credentials=True) @app.route("/dockermsg", method...
33.340909
114
0.576005
from flask import Flask, render_template, request, jsonify from pyecharts import options as opts from pyecharts.charts import Graph import json import redis from flask_cors import * r = redis.Redis(host="127.0.0.1", port=6379) app = Flask(__name__) CORS(app, supports_credentials=True) @app.route("/dockermsg", method...
true
true
f70eca4f5372f1f42a5b19b9379ac5026d17bfca
829
py
Python
app/core/migrations/0010_requestlogs.py
shravands/django-restapi-recipe
c21d01ab3b0d92d249e638a1b503ea54dd6d69bd
[ "MIT" ]
null
null
null
app/core/migrations/0010_requestlogs.py
shravands/django-restapi-recipe
c21d01ab3b0d92d249e638a1b503ea54dd6d69bd
[ "MIT" ]
null
null
null
app/core/migrations/0010_requestlogs.py
shravands/django-restapi-recipe
c21d01ab3b0d92d249e638a1b503ea54dd6d69bd
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-06-09 08:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0009_user_username'), ] operations = [ migrations.CreateModel( name='RequestLogs', fields=[ ...
33.16
114
0.589867
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0009_user_username'), ] operations = [ migrations.CreateModel( name='RequestLogs', fields=[ ('id', models.AutoField(auto_created=True, prim...
true
true