hexsha
stringlengths
40
40
size
int64
2
1.05M
ext
stringclasses
9 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
193
max_stars_repo_name
stringlengths
6
109
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
36.6k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
193
max_issues_repo_name
stringlengths
6
109
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
29.8k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
193
max_forks_repo_name
stringlengths
6
109
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
11.2k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.05M
avg_line_length
float64
1
404k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
f7e0fb8d76e81e7e188f32855cfc6395de1176f3
633
py
Python
list_clusters.py
cedricbonhomme/k-means-clustering
f0cef80ea6bb92533fdc915bed0a5419d134850d
[ "MIT" ]
1
2021-12-28T00:39:04.000Z
2021-12-28T00:39:04.000Z
list_clusters.py
cedricbonhomme/k-means-clustering
f0cef80ea6bb92533fdc915bed0a5419d134850d
[ "MIT" ]
null
null
null
list_clusters.py
cedricbonhomme/k-means-clustering
f0cef80ea6bb92533fdc915bed0a5419d134850d
[ "MIT" ]
null
null
null
#! /usr/bin/python #-*- coding:utf-8 -* __author__ = "Cedric Bonhomme" __version__ = "$Revision: 0.1 $" __date__ = "$Date: 2015/08/31$" __revision__ = "$Date: 2015/08/31 $" __copyright__ = "" __license__ = "" import pickle import clusters def list_clusters(): with open("clusters", 'rb') as f: kclust = p...
22.607143
67
0.627172
f7e0fcc6069362d5684b1c23ecdefc02c277813e
9,927
py
Python
tensor2tensor/bin/t2t_attack.py
shankharaj29/tensor2tensor
b89ba51a6fa9e0c20009cfb57ee8de04f7138392
[ "Apache-2.0" ]
1
2019-02-16T10:39:45.000Z
2019-02-16T10:39:45.000Z
tensor2tensor/bin/t2t_attack.py
PedroLelis/tensor2tensor
5a867d031bd493eeb7d2776e1118d1594ff0a623
[ "Apache-2.0" ]
null
null
null
tensor2tensor/bin/t2t_attack.py
PedroLelis/tensor2tensor
5a867d031bd493eeb7d2776e1118d1594ff0a623
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
35.327402
97
0.741513
f7e101903174e6d237488c58c43cdebcc4f750ec
8,809
py
Python
qiskit/aqua/operators/list_ops/summed_op.py
tsura-crisaldo/qiskit-aqua
2b4a70bb24a9170c3735124536dce1d7ffe4ed67
[ "Apache-2.0" ]
null
null
null
qiskit/aqua/operators/list_ops/summed_op.py
tsura-crisaldo/qiskit-aqua
2b4a70bb24a9170c3735124536dce1d7ffe4ed67
[ "Apache-2.0" ]
null
null
null
qiskit/aqua/operators/list_ops/summed_op.py
tsura-crisaldo/qiskit-aqua
2b4a70bb24a9170c3735124536dce1d7ffe4ed67
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
39.68018
99
0.607447
f7e131d85578ad46caf98d829cdb1f53e2ff5984
903
py
Python
tests/test_pytest_aiomoto.py
dazza-codes/pytest-aiomoto
f922ae99e00fc89f0d51a677dab5bc9ec7255de4
[ "Apache-2.0" ]
1
2021-12-07T02:41:56.000Z
2021-12-07T02:41:56.000Z
tests/test_pytest_aiomoto.py
dazza-codes/pytest-aiomoto
f922ae99e00fc89f0d51a677dab5bc9ec7255de4
[ "Apache-2.0" ]
5
2021-12-28T04:20:40.000Z
2022-03-24T08:18:30.000Z
tests/test_pytest_aiomoto.py
dazza-codes/pytest-aiomoto
f922ae99e00fc89f0d51a677dab5bc9ec7255de4
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2021 Darren Weber # # 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 writ...
32.25
74
0.784053
f7e13e2b66d26e62d46b8787cb57509e7b6b7f98
12,679
py
Python
sacla/scripts/backups/old_scripts/sacla2_Chip_Manager1.py
beamline-i24/DiamondChips
02fb58a95ad2c1712c41b641eb5f197d688c54c3
[ "Apache-2.0" ]
null
null
null
sacla/scripts/backups/old_scripts/sacla2_Chip_Manager1.py
beamline-i24/DiamondChips
02fb58a95ad2c1712c41b641eb5f197d688c54c3
[ "Apache-2.0" ]
null
null
null
sacla/scripts/backups/old_scripts/sacla2_Chip_Manager1.py
beamline-i24/DiamondChips
02fb58a95ad2c1712c41b641eb5f197d688c54c3
[ "Apache-2.0" ]
null
null
null
import pv import os, re, sys import math, time, string from time import sleep from ca import caput, caget from sacla2_Chip_StartUp1 import get_xy from sacla2_Chip_StartUp1 import scrape_parameter_file ########################################### # OLD Chip_Manager from SACLA1 experiment # # This version last edite...
33.991957
109
0.550359
f7e17c3eee41f95c3d7566fa96b7f88a9e7bfea5
6,693
py
Python
appengine/experimental/crbadge/app.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
2
2021-04-13T21:22:18.000Z
2021-09-07T02:11:57.000Z
appengine/experimental/crbadge/app.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
21
2020-09-06T02:41:05.000Z
2022-03-02T04:40:01.000Z
appengine/experimental/crbadge/app.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import os import sys import webapp2 from webapp2_extras import jinja2 from google.appengine.ext import ndb from model import ...
29.879464
80
0.640371
f7e1a6141b34a4ca150f0fa410b5bd5fbba51a61
16,922
py
Python
lelof1py/socket_client.py
fabiofenoglio/lelo-f1-python-sdk
642c7e03b2a6632b0f7aa96b2b31130781a24930
[ "MIT" ]
13
2020-04-15T16:02:53.000Z
2022-01-20T03:43:00.000Z
lelof1py/socket_client.py
timorama82/lelo-f1-python-sdk
491136013588ce94c2e2f27e7335190b7d1040ae
[ "MIT" ]
3
2020-04-18T17:07:54.000Z
2021-09-15T14:10:25.000Z
lelof1py/socket_client.py
timorama82/lelo-f1-python-sdk
491136013588ce94c2e2f27e7335190b7d1040ae
[ "MIT" ]
2
2021-01-19T09:00:07.000Z
2021-07-21T10:27:49.000Z
import asyncio import time import logging import socket import json from .async_client import * class SocketClient(AsyncClient): ''' Asynchronous LELO F1 SDK SOCKET client. Configurable with standard logging. ''' SOCKET_ENCODING = 'utf8' def __init__(self, ip_address, port): ''' Instantiate the client. T...
26.903021
122
0.728342
f7e1a656366a3310681b7288c4cea0323c2c228b
4,898
py
Python
2019/day_12/solution.py
dandiez/AdventOfCode
99ebe6991964290ede87b144c8692c8f6b31030d
[ "MIT" ]
null
null
null
2019/day_12/solution.py
dandiez/AdventOfCode
99ebe6991964290ede87b144c8692c8f6b31030d
[ "MIT" ]
null
null
null
2019/day_12/solution.py
dandiez/AdventOfCode
99ebe6991964290ede87b144c8692c8f6b31030d
[ "MIT" ]
null
null
null
import itertools from math import lcm from typing import List from unittest import TestCase import numpy as np from parse import parse Vector3D = np.ndarray def read_input(filename="input"): with open(filename) as f: lines = [line.strip() for line in f.readlines() if line.strip()] inp = [tuple(parse...
29.329341
98
0.604737
f7e1b86609d567f323e564493287450a87f3c84c
3,366
py
Python
tests/test_memmap.py
GBillotey/Fractal-shades
99c690cb1114ab7edcbfd9836af585fed2b133e8
[ "MIT" ]
3
2021-03-06T18:32:51.000Z
2021-07-07T01:35:21.000Z
tests/test_memmap.py
GBillotey/Fractal-shades
99c690cb1114ab7edcbfd9836af585fed2b133e8
[ "MIT" ]
null
null
null
tests/test_memmap.py
GBillotey/Fractal-shades
99c690cb1114ab7edcbfd9836af585fed2b133e8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import unittest import concurrent.futures import contextlib import sys import uuid import numpy as np from numpy.lib.format import open_memmap import fractalshades.utils as fsutils import fractalshades.settings as fssettings from fractalshades.mprocessing import Multiprocess_filler ...
29.526316
77
0.612002
f7e2064f7de180aa9f8198832a41b980175b16b9
3,177
py
Python
keystone/tests/unit/default_fixtures.py
yanheven/keystone
417b8941095f40674575ed951b4a03ebcdc91fef
[ "Apache-2.0" ]
null
null
null
keystone/tests/unit/default_fixtures.py
yanheven/keystone
417b8941095f40674575ed951b4a03ebcdc91fef
[ "Apache-2.0" ]
null
null
null
keystone/tests/unit/default_fixtures.py
yanheven/keystone
417b8941095f40674575ed951b4a03ebcdc91fef
[ "Apache-2.0" ]
1
2020-07-02T09:12:28.000Z
2020-07-02T09:12:28.000Z
# Copyright 2012 OpenStack Foundation # # 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...
26.040984
78
0.512748
f7e21e5d21c8b78cb864aa48fea2809345f89cd6
1,068
py
Python
tests/icestick/ice40/ramb/ramb16.py
splhack/loam
10b08bd622b7cfd63eabaec4729f6238e4521b30
[ "MIT" ]
14
2017-10-08T09:16:10.000Z
2021-11-27T19:12:24.000Z
tests/icestick/ice40/ramb/ramb16.py
splhack/loam
10b08bd622b7cfd63eabaec4729f6238e4521b30
[ "MIT" ]
7
2018-04-12T21:33:49.000Z
2018-08-21T22:14:20.000Z
tests/icestick/ice40/ramb/ramb16.py
splhack/loam
10b08bd622b7cfd63eabaec4729f6238e4521b30
[ "MIT" ]
3
2018-07-24T04:55:02.000Z
2019-12-30T08:12:39.000Z
from magma import array, wire, compile, EndCircuit from loam.boards.icestick import IceStick from mantle.lattice.ice40.RAMB import RAMB icestick = IceStick() icestick.Clock.on() icestick.J1[0].rename('I0').input().on() icestick.J1[1].rename('I1').input().on() icestick.J1[2].rename('I2').input().on() icestick.J1[3].ren...
24.837209
64
0.641386
f7e2366651ff343397f3d3c08e3db461fc9cd715
10,757
py
Python
catalyst/contrib/scripts/find_thresholds.py
balakhonoff/catalyst
82d904aee97045efbaef3963e36c2ce5173ddac4
[ "Apache-2.0" ]
2
2021-02-22T12:15:41.000Z
2021-05-02T15:22:24.000Z
catalyst/contrib/scripts/find_thresholds.py
balakhonoff/catalyst
82d904aee97045efbaef3963e36c2ce5173ddac4
[ "Apache-2.0" ]
null
null
null
catalyst/contrib/scripts/find_thresholds.py
balakhonoff/catalyst
82d904aee97045efbaef3963e36c2ce5173ddac4
[ "Apache-2.0" ]
1
2018-12-21T15:56:21.000Z
2018-12-21T15:56:21.000Z
from typing import Any, Callable, Dict, List, Tuple import argparse from itertools import repeat import json from pathlib import Path from pprint import pprint import numpy as np import pandas as pd from scipy.special import expit from sklearn import metrics from sklearn.model_selection import RepeatedStratifiedKFold ...
29.151762
78
0.631775
f7e24d2ca84cad0278366b635df42f48e61c170d
642
py
Python
src/Utils/Convert.py
VinceBro/TeamNumberOne
12fc33ffa788ccbc9f6b0f8cccd4d8f878e5f376
[ "MIT" ]
1
2020-03-03T14:36:06.000Z
2020-03-03T14:36:06.000Z
src/Utils/Convert.py
VinceBro/TeamNumberOne
12fc33ffa788ccbc9f6b0f8cccd4d8f878e5f376
[ "MIT" ]
null
null
null
src/Utils/Convert.py
VinceBro/TeamNumberOne
12fc33ffa788ccbc9f6b0f8cccd4d8f878e5f376
[ "MIT" ]
null
null
null
def minutes(_min): return _min * 60 def secondes(_sec): return _sec def hsv_to_rgb(hue=0, saturation=1, value=1): _H = hue _S = saturation _V = value _C = _S * _V _X = _C * (1 - abs((_H/60) % 2 - 1)) _m = _V - _C if 0 <= _H < 60: _Rp, _Gp, _Bp = _C, _X, 0 elif 60 <...
20.0625
51
0.478193
f7e28b790ce4e85d9b31a094c085c6d9687a6bdf
5,900
py
Python
docs/conf.py
myles/django-basic-tumblelog
4967acd0c052a42c42312f41dd08ff3f6a5a846a
[ "Apache-2.0" ]
2
2016-05-08T10:05:07.000Z
2017-12-18T04:08:07.000Z
docs/conf.py
myles/django-basic-tumblelog
4967acd0c052a42c42312f41dd08ff3f6a5a846a
[ "Apache-2.0" ]
null
null
null
docs/conf.py
myles/django-basic-tumblelog
4967acd0c052a42c42312f41dd08ff3f6a5a846a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Django Basic Tumblelog documentation build configuration file, created by # sphinx-quickstart on Mon Mar 9 14:25:37 2009. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that...
32.417582
82
0.732542
f7e2b5cbee27bed01988c74c6ea3a371fa2baa92
517
py
Python
autoio-interfaces/mess_io/tests/test_read_lump.py
lpratalimaffei/autoio
57be6e4882af1841153c19e7353e2531e64ce47f
[ "Apache-2.0" ]
null
null
null
autoio-interfaces/mess_io/tests/test_read_lump.py
lpratalimaffei/autoio
57be6e4882af1841153c19e7353e2531e64ce47f
[ "Apache-2.0" ]
1
2022-02-15T19:35:14.000Z
2022-02-15T19:35:14.000Z
autoio-interfaces/mess_io/tests/test_read_lump.py
lpratalimaffei/autoio
57be6e4882af1841153c19e7353e2531e64ce47f
[ "Apache-2.0" ]
13
2020-06-24T05:21:11.000Z
2021-05-05T19:58:30.000Z
""" test mess_io.reader._lump """ import os from ioformat import read_text_file import mess_io.reader PATH = os.path.dirname(os.path.realpath(__file__)) AUX_STR = read_text_file(['data', 'out'], 'well_lump.aux', PATH) def test__(): """ test mess_io.reader._lump.merged_wells """ ref_well_merge_lst = ( ...
19.884615
64
0.632495
f7e2c906989731bb1c734e6833759bb3cb55eafe
235
py
Python
tests/UnrestrictedGrammar/conftest.py
vadyushkins/pctm
1bb9e8fafe335ace91ea060190570f78fad44c2a
[ "MIT" ]
1
2020-10-11T14:22:09.000Z
2020-10-11T14:22:09.000Z
tests/UnrestrictedGrammar/conftest.py
vadyushkins/pctm
1bb9e8fafe335ace91ea060190570f78fad44c2a
[ "MIT" ]
null
null
null
tests/UnrestrictedGrammar/conftest.py
vadyushkins/pctm
1bb9e8fafe335ace91ea060190570f78fad44c2a
[ "MIT" ]
1
2022-01-08T17:48:17.000Z
2022-01-08T17:48:17.000Z
import pytest params = [ { 'path': 'resources/primality_check_ug.txt' , 'word': 'a' * p } for p in range(14) ] @pytest.fixture(scope='session', params=params) def suite(request): return request.param
15.666667
50
0.6
f7e2e12a3065bbc6536919b5b43c439f8f6187b0
1,825
py
Python
example/restful/postwithdrawandcancel.py
xiaohuid/huobi_Python
ebc84b2fc560f77fd77457f36ff91906c43646e3
[ "Apache-2.0" ]
1
2020-12-28T07:04:45.000Z
2020-12-28T07:04:45.000Z
example/restful/postwithdrawandcancel.py
xiaohuid/huobi_Python
ebc84b2fc560f77fd77457f36ff91906c43646e3
[ "Apache-2.0" ]
null
null
null
example/restful/postwithdrawandcancel.py
xiaohuid/huobi_Python
ebc84b2fc560f77fd77457f36ff91906c43646e3
[ "Apache-2.0" ]
1
2022-03-27T10:36:04.000Z
2022-03-27T10:36:04.000Z
from huobi import RequestClient from huobi.constant.test import * from huobi.base.printobject import * from huobi.model import Account # case 1: TRX withdraw and cancel client = RequestClient(api_key=g_api_key, secret_key=g_secret_key) withdraw_id_new = client.post_create_withdraw(address="xxxx", ...
35.784314
89
0.667397
f7e3137914bd34a4780d64e2a613a5d156ea6530
679
py
Python
examples/lidDrivenCavity/Re1000/scripts/createDomainYaml.py
mesnardo/cuIBM
0b63f86c58e93e62f9dc720c08510cc88b10dd04
[ "MIT" ]
67
2015-01-25T18:33:39.000Z
2022-02-17T17:50:00.000Z
examples/lidDrivenCavity/Re1000/scripts/createDomainYaml.py
mesnardo/cuIBM
0b63f86c58e93e62f9dc720c08510cc88b10dd04
[ "MIT" ]
20
2015-01-25T05:29:30.000Z
2018-05-14T02:07:03.000Z
examples/lidDrivenCavity/Re1000/scripts/createDomainYaml.py
mesnardo/cuIBM
0b63f86c58e93e62f9dc720c08510cc88b10dd04
[ "MIT" ]
39
2015-01-22T16:32:11.000Z
2022-02-17T08:17:09.000Z
""" Creates a YAML file with info about the structured Cartesian mesh that will be parsed by cuIBM. """ from snake.cartesianMesh import CartesianStructuredMesh # info about the 2D structured Cartesian grid info = [{'direction': 'x', 'start': 0.0, 'subDomains': [{'end': 1.0, 'width':...
29.521739
78
0.569956
f7e322ff98d3da5b863207ac54b3970d97d5cb96
52
py
Python
slack_app/__init__.py
webscopeio/django-slack-app
65abb3717460c51a19c1238eb0572f25c47b2a42
[ "MIT" ]
3
2020-06-23T10:02:48.000Z
2020-10-28T11:59:28.000Z
slack_app/__init__.py
webscopeio/django-slack-integration
65abb3717460c51a19c1238eb0572f25c47b2a42
[ "MIT" ]
2
2020-02-17T11:42:03.000Z
2020-02-18T13:46:38.000Z
slack_app/__init__.py
webscopeio/django-slack-integration
65abb3717460c51a19c1238eb0572f25c47b2a42
[ "MIT" ]
4
2020-10-11T11:02:58.000Z
2022-03-14T08:23:42.000Z
default_app_config = 'slack_app.apps.SlackAppConfig'
52
52
0.865385
f7e334db9eb3327961fe98ba7deec29a431ea586
2,345
py
Python
bnw/web/api.py
hirthwork/bnw
fc015a45f6a4c9ebd05b604a45b778df434aa65c
[ "BSD-2-Clause" ]
null
null
null
bnw/web/api.py
hirthwork/bnw
fc015a45f6a4c9ebd05b604a45b778df434aa65c
[ "BSD-2-Clause" ]
null
null
null
bnw/web/api.py
hirthwork/bnw
fc015a45f6a4c9ebd05b604a45b778df434aa65c
[ "BSD-2-Clause" ]
null
null
null
import json import time from twisted.internet import defer from tornado.escape import utf8, _unicode from bnw.core.base import BnwResponse import bnw.core.bnw_objects as objs from bnw.web.base import BnwWebRequest, BnwWebHandler import api_handlers class ApiRequest(BnwWebRequest): def __init__(self, user=None): ...
38.442623
115
0.605117
f7e398ac687d884dc08bdf9f40407f9091fd2525
871
py
Python
atom/nucleus/python/test/test_page_question.py
AbhiGupta03/SDK
f3a61aae7a847f07f0c22a154ca88dc378e9d25e
[ "Apache-2.0" ]
null
null
null
atom/nucleus/python/test/test_page_question.py
AbhiGupta03/SDK
f3a61aae7a847f07f0c22a154ca88dc378e9d25e
[ "Apache-2.0" ]
null
null
null
atom/nucleus/python/test/test_page_question.py
AbhiGupta03/SDK
f3a61aae7a847f07f0c22a154ca88dc378e9d25e
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Hydrogen Nucleus API The Hydrogen Nucleus API # noqa: E501 OpenAPI spec version: 1.9.5 Contact: info@hydrogenplatform.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import nucleus_api from nu...
21.243902
79
0.698048
f7e39fe394d3295f9ba155a22c5dbfd4a85085cd
413
py
Python
qss/utils/__init__.py
ATLAS-Titan/allocation-modeling
b315aa7ac0cf613ed02c59188ff19e9738f36aca
[ "Apache-2.0" ]
null
null
null
qss/utils/__init__.py
ATLAS-Titan/allocation-modeling
b315aa7ac0cf613ed02c59188ff19e9738f36aca
[ "Apache-2.0" ]
null
null
null
qss/utils/__init__.py
ATLAS-Titan/allocation-modeling
b315aa7ac0cf613ed02c59188ff19e9738f36aca
[ "Apache-2.0" ]
null
null
null
# # Copyright European Organization for Nuclear Research (CERN) # National Research Centre "Kurchatov Institute" # Rutgers University # # 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 ...
29.5
66
0.714286
f7e3cf14c6fa6162dcaca99ddbc6da52dfff479b
25,540
py
Python
db/VoltDB2Table2Rec/lib/python/voltcli/runner.py
scdblab/BG
e678e7063a0c49af8a0a88d6e2838ce103ad69de
[ "BSD-2-Clause" ]
1
2020-04-09T20:47:03.000Z
2020-04-09T20:47:03.000Z
db/VoltDB2Table2Rec/lib/python/voltcli/runner.py
scdblab/BG
e678e7063a0c49af8a0a88d6e2838ce103ad69de
[ "BSD-2-Clause" ]
null
null
null
db/VoltDB2Table2Rec/lib/python/voltcli/runner.py
scdblab/BG
e678e7063a0c49af8a0a88d6e2838ce103ad69de
[ "BSD-2-Clause" ]
3
2018-08-29T17:58:01.000Z
2020-04-05T18:14:09.000Z
# This file is part of VoltDB. # Copyright (C) 2008-2013 VoltDB Inc. # # This file contains original code and/or modifications of original code. # Any modifications made by VoltDB Inc. are licensed under the following # terms and conditions: # # Permission is hereby granted, free of charge, to any person obtaining # a...
40.220472
96
0.577408
f7e3facaec804da617e39aff62c43b4e3780803c
434
py
Python
gorna/views/datatable.py
bukun/gorna
3db74e97e1e4f1b223686a6bb45fa231521cbc1b
[ "MIT" ]
null
null
null
gorna/views/datatable.py
bukun/gorna
3db74e97e1e4f1b223686a6bb45fa231521cbc1b
[ "MIT" ]
null
null
null
gorna/views/datatable.py
bukun/gorna
3db74e97e1e4f1b223686a6bb45fa231521cbc1b
[ "MIT" ]
null
null
null
from pyramid.view import view_config from .tools import load_excel @view_config(route_name='datable', renderer='../templates/datable.jinja2') def my_view(request): print('=' * 40) print(request.params) sig0 = request.matchdict['sig0'] sig1 = request.matchdict['sig1'] file_path = './meta_xlsx/{si...
21.7
74
0.691244
f7e41fb65d1e566bf655b17e9459fa227c4b4930
1,375
py
Python
savu/test/travis/plugin_tests/reconstruction_tests/ccpi_clgs_recon_test.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
null
null
null
savu/test/travis/plugin_tests/reconstruction_tests/ccpi_clgs_recon_test.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
null
null
null
savu/test/travis/plugin_tests/reconstruction_tests/ccpi_clgs_recon_test.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2014 Diamond Light Source Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
31.25
76
0.742545
f7e464e396dc4a7b5350555581b28024555d3b3e
244
py
Python
app/ml/objects/feature/enum.py
PSE-TECO-2020-TEAM1/e2e-ml_model-management
7f01a008648e25a29c639a5e16124b2e399eb821
[ "MIT" ]
1
2021-05-04T08:46:19.000Z
2021-05-04T08:46:19.000Z
app/ml/objects/feature/enum.py
PSE-TECO-2020-TEAM1/e2e-ml_model-management
7f01a008648e25a29c639a5e16124b2e399eb821
[ "MIT" ]
null
null
null
app/ml/objects/feature/enum.py
PSE-TECO-2020-TEAM1/e2e-ml_model-management
7f01a008648e25a29c639a5e16124b2e399eb821
[ "MIT" ]
1
2022-01-28T21:21:32.000Z
2022-01-28T21:21:32.000Z
from enum import Enum class Feature(str, Enum): MINIMUM = "MINIMUM" MAXIMUM = "MAXIMUM" VARIANCE = "VARIANCE" ABS_ENERGY = "ABS_ENERGY" MEAN = "MEAN" MEDIAN = "MEDIAN" SKEWNESS = "SKEWNESS" KURTOSIS = "KURTOSIS"
22.181818
29
0.627049
f7e468f8c061cc5c2d498b3db71f08e009b8cdaf
5,443
py
Python
libs/group/handlers/new_chat_members.py
PushDotGame/telegram-forward-bot
40a54aff1a8b10e79fa8a6f611e2371c79869340
[ "Apache-2.0" ]
1
2020-07-09T02:26:14.000Z
2020-07-09T02:26:14.000Z
libs/group/handlers/new_chat_members.py
PushDotGame/telegram-bots
40a54aff1a8b10e79fa8a6f611e2371c79869340
[ "Apache-2.0" ]
null
null
null
libs/group/handlers/new_chat_members.py
PushDotGame/telegram-bots
40a54aff1a8b10e79fa8a6f611e2371c79869340
[ "Apache-2.0" ]
null
null
null
import os import time import random import codecs import telegram from telegram.ext import (Dispatcher, MessageHandler, CommandHandler, Filters) from telegram.ext.dispatcher import run_async from libs.group.kvs import kvs from libs import functions as lf from libs import CacheORM as Cache from libs.group.send...
32.017647
106
0.610509
f7e499f50290eeb29585f618693ca13de091e14e
1,131
py
Python
autumn_ca/benchmark.py
goshdarngames/Autumn-CA
85bd1db5aa08882a01d6954e085b76e316ac5712
[ "MIT" ]
null
null
null
autumn_ca/benchmark.py
goshdarngames/Autumn-CA
85bd1db5aa08882a01d6954e085b76e316ac5712
[ "MIT" ]
null
null
null
autumn_ca/benchmark.py
goshdarngames/Autumn-CA
85bd1db5aa08882a01d6954e085b76e316ac5712
[ "MIT" ]
null
null
null
import numpy as np from lib.simulation import Simulation from lib.rule_function import conway_rule from Conway.lib.neighbourhood import moore_neighbourhood SIMULATION_SIZE = (100,100) NUMBER_OF_STEPS = 2 sim = Simulation( SIMULATION_SIZE, conway_rule) def time_numpy (): """ ...
23.081633
93
0.616269
f7e4a07c5b477512870230fe06c890c6d28a076c
4,055
py
Python
ml_enabler/utils/osm.py
hotosm/ml-enabler-cli
287d929fb0cf5be41100bdff41261ef99ded0ceb
[ "BSD-2-Clause" ]
5
2019-07-23T22:42:45.000Z
2020-02-28T09:57:33.000Z
ml_enabler/utils/osm.py
hotosm/ml-enabler-cli
287d929fb0cf5be41100bdff41261ef99ded0ceb
[ "BSD-2-Clause" ]
17
2019-06-06T17:56:10.000Z
2019-09-18T03:17:04.000Z
ml_enabler/utils/osm.py
hotosm/ml-enabler-cli
287d929fb0cf5be41100bdff41261ef99ded0ceb
[ "BSD-2-Clause" ]
1
2019-09-19T16:06:30.000Z
2019-09-19T16:06:30.000Z
from area import area from geopy.distance import great_circle import json import numpy as np import os import subprocess import tempfile def get_osm(aoi): # convert AOI to bounding box pass class OSMData(object): def __init__(self, aoi, overpass_url='https://lz4.overpass-api.de/api/interpreter'): ...
33.791667
99
0.523058
f7e4b514bb167739d71cbd7a52b717016bfca7e7
2,674
py
Python
nova/api/openstack/compute/console_auth_tokens.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
5
2016-04-28T16:20:38.000Z
2021-04-25T11:19:03.000Z
nova/api/openstack/compute/console_auth_tokens.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
5
2016-07-11T20:59:47.000Z
2020-07-28T09:56:35.000Z
nova/api/openstack/compute/console_auth_tokens.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
5
2020-04-08T20:24:45.000Z
2020-10-05T19:02:13.000Z
# Copyright 2013 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
35.653333
79
0.660434
f7e4d951d4fffdf0f2ced4d99d051f5c39e47aa9
1,140
py
Python
tests/smoke/test_mixed_precision.py
marsggbo/hyperbox
91dcd04ad30164bcb12209d818df18961fa3f347
[ "MIT" ]
1
2022-01-17T00:34:14.000Z
2022-01-17T00:34:14.000Z
tests/smoke/test_mixed_precision.py
marsggbo/hyperbox
91dcd04ad30164bcb12209d818df18961fa3f347
[ "MIT" ]
null
null
null
tests/smoke/test_mixed_precision.py
marsggbo/hyperbox
91dcd04ad30164bcb12209d818df18961fa3f347
[ "MIT" ]
null
null
null
from tests.helpers.run_command import run_command from tests.helpers.runif import RunIf @RunIf(amp_apex=True) def test_apex_01(): """Test mixed-precision level 01.""" command = [ "run.py", "trainer=default", "trainer.max_epochs=1", "trainer.gpus=1", "trainer...
23.75
50
0.564035
f7e4ec20835dcdbb9df1869a20b47ff67c1986db
4,037
py
Python
higra/hierarchy/random_hierarchy.py
deisemaia/Higra
82cb78b606a383f3961faa882457a9a987f802e0
[ "CECILL-B" ]
null
null
null
higra/hierarchy/random_hierarchy.py
deisemaia/Higra
82cb78b606a383f3961faa882457a9a987f802e0
[ "CECILL-B" ]
null
null
null
higra/hierarchy/random_hierarchy.py
deisemaia/Higra
82cb78b606a383f3961faa882457a9a987f802e0
[ "CECILL-B" ]
null
null
null
############################################################################ # Copyright ESIEE Paris (2018) # # # # Contributor(s) : Benjamin Perret # # ...
36.369369
111
0.561308
f7e51844cebe7c8e0d324be993b1a6038d3bf726
205
py
Python
dbsetup.py
saymoniphal/fswd-p4-item-catalog
b0f870f11395877308984bb464413989b183c94f
[ "Unlicense", "MIT" ]
null
null
null
dbsetup.py
saymoniphal/fswd-p4-item-catalog
b0f870f11395877308984bb464413989b183c94f
[ "Unlicense", "MIT" ]
null
null
null
dbsetup.py
saymoniphal/fswd-p4-item-catalog
b0f870f11395877308984bb464413989b183c94f
[ "Unlicense", "MIT" ]
null
null
null
#!/bin/bash/env python3 from sqlalchemy import create_engine import config import models if __name__ == '__main__': engine = create_engine(config.DB_URI) models.Base.metadata.create_all(engine)
18.636364
43
0.765854
f7e531ac7d4e19a6a46758ff866eb235b402e97f
2,418
py
Python
FileReader.py
notatallshaw/Grail-0.6
2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43
[ "CNRI-Jython" ]
22
2021-05-17T07:01:04.000Z
2021-10-31T09:03:29.000Z
FileReader.py
notatallshaw/Grail-0.6
2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43
[ "CNRI-Jython" ]
17
2021-05-17T04:39:49.000Z
2021-09-06T14:50:39.000Z
FileReader.py
notatallshaw/Grail-0.6
2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43
[ "CNRI-Jython" ]
6
2021-05-17T07:37:01.000Z
2022-01-09T10:26:24.000Z
"""File reader class -- read from a URL to a file in the background.""" from BaseReader import BaseReader class FileReader(BaseReader): """File reader class -- read from a URL to a file in the background. Derived classes are supposed to override handle_error() and handle_done() to specify what should ha...
28.447059
74
0.612903
f7e5375ce55516852227481713b8b6aea4ba02e3
27,012
py
Python
nemo/collections/asr/modules/conv_asr.py
JMichaelStringer/NeMo
b5b29a69ccb0ec3d8c9ace2f33872ee99858a559
[ "Apache-2.0" ]
1
2021-09-10T10:40:51.000Z
2021-09-10T10:40:51.000Z
nemo/collections/asr/modules/conv_asr.py
JMichaelStringer/NeMo
b5b29a69ccb0ec3d8c9ace2f33872ee99858a559
[ "Apache-2.0" ]
null
null
null
nemo/collections/asr/modules/conv_asr.py
JMichaelStringer/NeMo
b5b29a69ccb0ec3d8c9ace2f33872ee99858a559
[ "Apache-2.0" ]
1
2022-01-07T03:39:11.000Z
2022-01-07T03:39:11.000Z
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
33.849624
175
0.590108
f7e54c1f67eed44ee74433c9a3c257269068790b
751
py
Python
escape/escape/orchest/__init__.py
5GExchange/escape
eb35d460597a0386b18dd5b6a5f62a3f30eed5fa
[ "Apache-2.0" ]
10
2016-11-16T16:26:16.000Z
2021-04-26T17:20:28.000Z
escape/escape/orchest/__init__.py
5GExchange/escape
eb35d460597a0386b18dd5b6a5f62a3f30eed5fa
[ "Apache-2.0" ]
3
2017-04-20T11:29:17.000Z
2017-11-06T17:12:12.000Z
escape/escape/orchest/__init__.py
5GExchange/escape
eb35d460597a0386b18dd5b6a5f62a3f30eed5fa
[ "Apache-2.0" ]
10
2017-03-27T13:58:52.000Z
2020-06-24T22:42:51.000Z
# Copyright 2017 Janos Czentye # # 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, s...
35.761905
79
0.76964
f7e556bca874e9c7271578f309ea308184ef35b7
2,570
py
Python
tests/common/test_io.py
cswartzvi/conda
b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137
[ "BSD-3-Clause" ]
null
null
null
tests/common/test_io.py
cswartzvi/conda
b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137
[ "BSD-3-Clause" ]
3
2022-03-03T02:36:53.000Z
2022-03-03T02:42:50.000Z
tests/common/test_io.py
cswartzvi/conda
b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (C) 2012 Anaconda, Inc # SPDX-License-Identifier: BSD-3-Clause from __future__ import absolute_import, division, print_function, unicode_literals from conda.common.io import attach_stderr_handler, captured, CaptureTarget from io import StringIO from logging import DEBUG, NOTSET, WA...
29.883721
82
0.68716
f7e5732ab2dcdc5d6a49ed839d0a25fb7ee07bca
3,914
py
Python
salt/returners/elasticsearch_return.py
rfairburn/salt
7e44444e873e1cb1d2fe13e39b0edea3779a2b5e
[ "Apache-2.0" ]
2
2015-08-04T21:54:38.000Z
2019-04-25T21:47:08.000Z
salt/returners/elasticsearch_return.py
rfairburn/salt
7e44444e873e1cb1d2fe13e39b0edea3779a2b5e
[ "Apache-2.0" ]
1
2015-09-02T12:49:48.000Z
2015-09-02T19:22:58.000Z
salt/returners/elasticsearch_return.py
rfairburn/salt
7e44444e873e1cb1d2fe13e39b0edea3779a2b5e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Return data to an elasticsearch server for indexing. :maintainer: Jurnell Cockhren <jurnell.cockhren@sophicware.com>, Arnold Bechtoldt <mail@arnoldbechtoldt.com> :maturity: New :depends: `elasticsearch-py <http://elasticsearch-py.readthedocs.org/en/latest/>`_ :platform: a...
32.616667
149
0.687787
f7e594769f0ee20c9e0e95aab8a457deb2b26d6d
785
py
Python
unittest/pricer-unittest.py
AlexMout/OptionPricer
3c95a3758ab9a96027d40c8d7a23c3e4482ff221
[ "MIT" ]
1
2019-08-21T16:51:59.000Z
2019-08-21T16:51:59.000Z
unittest/pricer-unittest.py
AlexMout/OptionPricer
3c95a3758ab9a96027d40c8d7a23c3e4482ff221
[ "MIT" ]
null
null
null
unittest/pricer-unittest.py
AlexMout/OptionPricer
3c95a3758ab9a96027d40c8d7a23c3e4482ff221
[ "MIT" ]
null
null
null
import unittest from model import calculator class PricerTest(unittest.TestCase): """This python unit test file is intended to test calculator.py""" def setUp(self): """Method automatically called before each unit test""" self.params_1 = {"S":100,"K":100,"Vol":0.2,"R":0.05,"T":1} self....
34.130435
73
0.659873
f7e5ba332842988cdf3626a468565ddfc6669b98
1,300
py
Python
toontown/dna/DNAAnimBuilding.py
LittleNed/toontown-stride
1252a8f9a8816c1810106006d09c8bdfe6ad1e57
[ "Apache-2.0" ]
3
2020-01-02T08:43:36.000Z
2020-07-05T08:59:02.000Z
toontown/dna/DNAAnimBuilding.py
NoraTT/Historical-Commits-Project-Altis-Source
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
[ "Apache-2.0" ]
null
null
null
toontown/dna/DNAAnimBuilding.py
NoraTT/Historical-Commits-Project-Altis-Source
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
[ "Apache-2.0" ]
4
2019-06-20T23:45:23.000Z
2020-10-14T20:30:15.000Z
from toontown.dna import DNALandmarkBuilding from toontown.dna import DNAError from toontown.dna import DNAUtil class DNAAnimBuilding(DNALandmarkBuilding.DNALandmarkBuilding): __slots__ = ( 'animName') COMPONENT_CODE = 16 def __init__(self, name): DNALandmarkBuilding.DNALandmarkBu...
32.5
99
0.651538
f7e5f94a565544d6e706452af54d3e8f5738a22f
16,799
py
Python
topi/python/topi/cuda/ssd/multibox.py
mingwayzhang/tvm
3b287c4d4e6d83e6fd30db47ffa3d5481a332a63
[ "Apache-2.0" ]
48
2020-07-29T18:09:23.000Z
2021-10-09T01:53:33.000Z
topi/python/topi/cuda/ssd/multibox.py
mingwayzhang/tvm
3b287c4d4e6d83e6fd30db47ffa3d5481a332a63
[ "Apache-2.0" ]
9
2021-04-02T02:28:07.000Z
2022-03-26T18:23:59.000Z
topi/python/topi/cuda/ssd/multibox.py
mingwayzhang/tvm
3b287c4d4e6d83e6fd30db47ffa3d5481a332a63
[ "Apache-2.0" ]
42
2020-08-01T06:41:24.000Z
2022-01-20T10:33:08.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.895299
123
0.601107
f7e5f9726ca98a549c8b2feb60b4e54ea6967291
7,324
py
Python
test/likelihood_test.py
ChristianAdamcewicz/gwpopulation
2165eea0ce1f1fb2fdd3be261ed1ac2f82f86444
[ "MIT" ]
null
null
null
test/likelihood_test.py
ChristianAdamcewicz/gwpopulation
2165eea0ce1f1fb2fdd3be261ed1ac2f82f86444
[ "MIT" ]
null
null
null
test/likelihood_test.py
ChristianAdamcewicz/gwpopulation
2165eea0ce1f1fb2fdd3be261ed1ac2f82f86444
[ "MIT" ]
null
null
null
from __future__ import division import unittest import numpy as np import pandas as pd try: import cupy as xp except ImportError: xp = np from bilby.core.prior import PriorDict, Uniform from gwpopulation.hyperpe import HyperparameterLikelihood, RateLikelihood class Likelihoods(unittest.TestCase): def...
36.62
88
0.653605
f7e5fcdc341e750198e2a066695813c78bf2b0c9
1,011
py
Python
backend/subscription_history/migrations/0001_initial.py
suzanpradhan/slicedtv
0d78dae366cd50647d5c40ec921e97a7a03047b2
[ "BSD-3-Clause" ]
1
2020-11-22T11:10:31.000Z
2020-11-22T11:10:31.000Z
backend/subscription_history/migrations/0001_initial.py
suzanpradhan/slicedtv
0d78dae366cd50647d5c40ec921e97a7a03047b2
[ "BSD-3-Clause" ]
1
2020-12-08T05:25:54.000Z
2020-12-08T05:42:40.000Z
backend/subscription_history/migrations/0001_initial.py
suzanpradhan/slicedtv
0d78dae366cd50647d5c40ec921e97a7a03047b2
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 3.0.5 on 2020-12-13 11:19 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
33.7
118
0.628091
f7e5fdeefa402137db18195743b040266d3315d5
899
py
Python
tests/rdfsTests.py
ttm/percolate
cfdf5380c8d155424ab97bdab85edde8b6f0ec9f
[ "MIT" ]
1
2020-06-11T01:34:25.000Z
2020-06-11T01:34:25.000Z
tests/rdfsTests.py
ttm/percolate
cfdf5380c8d155424ab97bdab85edde8b6f0ec9f
[ "MIT" ]
null
null
null
tests/rdfsTests.py
ttm/percolate
cfdf5380c8d155424ab97bdab85edde8b6f0ec9f
[ "MIT" ]
null
null
null
import sys, os keys=tuple(sys.modules.keys()) for key in keys: if "percolation" in key: print(key) del sys.modules[key] import percolation as P, importlib importlib.reload(P.utils) importlib.reload(P.sparql) c=P.utils.check #remote_urls="http://200.144.255.210:8082/ds","http://200.144.255.210:8082/...
33.296296
115
0.664071
f7e61d56f22514df2ca033adde2a088e8453a984
79,105
py
Python
test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_multiple_responses_operations.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
null
null
null
test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_multiple_responses_operations.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
null
null
null
test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_multiple_responses_operations.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
1
2022-03-28T08:58:03.000Z
2022-03-28T08:58:03.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 ...
39.473553
167
0.673206
f7e638e5701484db83d77ea78f2b8ad15631739f
31,037
py
Python
modules/unit_tests/core/model/dynamic.py
nursix/DRKCM
09328289ff721c416494398aa751ff99906327cb
[ "MIT" ]
3
2022-01-26T08:07:54.000Z
2022-03-21T21:53:52.000Z
modules/unit_tests/core/model/dynamic.py
nursix/eden-asp
e49f46cb6488918f8d5a163dcd5a900cd686978c
[ "MIT" ]
null
null
null
modules/unit_tests/core/model/dynamic.py
nursix/eden-asp
e49f46cb6488918f8d5a163dcd5a900cd686978c
[ "MIT" ]
1
2017-10-03T13:03:47.000Z
2017-10-03T13:03:47.000Z
# Eden Unit Tests # # To run this script use: # python web2py.py -S eden -M -R applications/eden/modules/unit_tests/core/model/dynamic.py # import datetime import unittest from gluon import current, IS_EMPTY_OR, IS_FLOAT_IN_RANGE, IS_INT_IN_RANGE, IS_IN_SET, IS_NOT_EMPTY from gluon.languages import lazyT from gluon.st...
35.189342
99
0.519638
f7e63967285d74869440d33439e24dffe587863f
919
py
Python
datasets/landscapes/utils.py
bermanz/pytorch-CycleGAN-and-pix2pix
61f695d24ac0e05204100ba3807fc0d79b3a9940
[ "BSD-3-Clause" ]
1
2021-10-06T10:06:05.000Z
2021-10-06T10:06:05.000Z
datasets/landscapes/utils.py
bermanz/pytorch-CycleGAN-and-pix2pix
61f695d24ac0e05204100ba3807fc0d79b3a9940
[ "BSD-3-Clause" ]
null
null
null
datasets/landscapes/utils.py
bermanz/pytorch-CycleGAN-and-pix2pix
61f695d24ac0e05204100ba3807fc0d79b3a9940
[ "BSD-3-Clause" ]
null
null
null
import os from enum import Enum, auto import PIL from PIL import Image import numpy as np from torchvision import transforms import util.util as util import torch def getUniqeFileNames(path): """Return a list of files from the given path, where each item is unique""" # def cropBaseName(fname): # name_...
28.71875
79
0.673558
f7e63ec9ab2358f654c0853e128223258a6ca1b6
57
py
Python
annodize/test/test_nsp_fields.py
NowanIlfideme/annodize
d31f68b62f473990a43334ef50a0a176847b1f7a
[ "MIT" ]
null
null
null
annodize/test/test_nsp_fields.py
NowanIlfideme/annodize
d31f68b62f473990a43334ef50a0a176847b1f7a
[ "MIT" ]
null
null
null
annodize/test/test_nsp_fields.py
NowanIlfideme/annodize
d31f68b62f473990a43334ef50a0a176847b1f7a
[ "MIT" ]
null
null
null
"""Tests for NamespaceFields.""" # FIXME: Create tests!
14.25
32
0.684211
f7e6509cac30c687d7a130604e16b20f79b5c1c8
984
py
Python
print3/wsgi.py
geoadmin/service-print
05c80498cf98b8833f7a3ae7ec2cf14eff487b31
[ "BSD-3-Clause" ]
4
2016-08-02T08:05:34.000Z
2021-10-19T07:15:34.000Z
print3/wsgi.py
geoadmin/service-print
05c80498cf98b8833f7a3ae7ec2cf14eff487b31
[ "BSD-3-Clause" ]
56
2016-06-08T08:08:49.000Z
2021-07-28T08:00:14.000Z
print3/wsgi.py
geoadmin/service-print
05c80498cf98b8833f7a3ae7ec2cf14eff487b31
[ "BSD-3-Clause" ]
2
2016-04-06T23:08:40.000Z
2019-11-16T17:46:47.000Z
# -*- coding: utf-8 - import os import multiprocessing from gunicorn.app.base import BaseApplication from print3.main import app as application def number_of_workers(): return (multiprocessing.cpu_count() * 2) + 1 class StandaloneApplication(BaseApplication): def __init__(self, app, options=None): ...
26.594595
68
0.645325
f7e6565430fb2649dcb39abe511f2844c02678e4
39,120
py
Python
applications/admin/languages/ru.py
ngsimon/web2py
93297fed8a3a916b45d17f5c4d5d2b80aaf92788
[ "BSD-3-Clause" ]
1,573
2015-01-01T07:19:06.000Z
2022-03-30T09:06:06.000Z
applications/admin/languages/ru.py
ngsimon/web2py
93297fed8a3a916b45d17f5c4d5d2b80aaf92788
[ "BSD-3-Clause" ]
1,691
2015-01-03T11:03:23.000Z
2022-03-30T07:27:28.000Z
applications/admin/languages/ru.py
ngsimon/web2py
93297fed8a3a916b45d17f5c4d5d2b80aaf92788
[ "BSD-3-Clause" ]
895
2015-01-03T19:56:15.000Z
2022-03-18T18:30:57.000Z
# -*- coding: utf-8 -*- { '!langcode!': 'ru', '!langname!': 'Русский', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Update" ist ein optionaler Ausdruck wie "Feld1 = \'newvalue". JOIN Ergebnisse können nicht aktualisiert oder gelöscht werden', '"Us...
57.614138
823
0.71774
f7e669c0e2320755b331289d4f09b524c59b1874
4,055
py
Python
master/Impractical_Python_Projects-master/Impractical_Python_Projects-master/Chapter_16/benford.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
4
2018-09-07T15:35:24.000Z
2019-03-27T09:48:12.000Z
master/Impractical_Python_Projects-master/Impractical_Python_Projects-master/Chapter_16/benford.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
371
2020-03-04T21:51:56.000Z
2022-03-31T20:59:11.000Z
master/Impractical_Python_Projects-master/Impractical_Python_Projects-master/Chapter_16/benford.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
3
2019-06-18T19:57:17.000Z
2020-11-06T03:55:08.000Z
"""Check conformance of numerical data to Benford's Law.""" import sys import math from collections import defaultdict import matplotlib.pyplot as plt # Benford's Law percentages for leading digits 1-9 BENFORD = [30.1, 17.6, 12.5, 9.7, 7.9, 6.7, 5.8, 5.1, 4.6] def load_data(filename): """Open a text file & return...
36.863636
87
0.637978
f7e6744f6934064aaf12d40577361bdcb6809a34
4,721
py
Python
trefoil/netcdf/conversion.py
consbio/clover
f8da46fa67240cc3f1ef0460e3a249e57e5f7224
[ "BSD-3-Clause" ]
9
2016-03-11T03:38:06.000Z
2017-08-09T23:28:36.000Z
trefoil/netcdf/conversion.py
consbio/clover
f8da46fa67240cc3f1ef0460e3a249e57e5f7224
[ "BSD-3-Clause" ]
47
2015-05-05T19:34:57.000Z
2018-04-19T00:44:09.000Z
trefoil/netcdf/conversion.py
consbio/trefoil
f8da46fa67240cc3f1ef0460e3a249e57e5f7224
[ "BSD-3-Clause" ]
2
2018-05-29T09:39:13.000Z
2020-08-25T12:49:18.000Z
from netCDF4 import Dataset import os import time import rasterio import pyproj from six import string_types from trefoil.netcdf.crs import set_crs from trefoil.netcdf.variable import SpatialCoordinateVariables from trefoil.geometry.bbox import BBox from trefoil.netcdf.crs import get_crs from trefoil.util...
34.459854
112
0.650074
f7e678188726408440137d375f06a30a84720fa1
5,168
py
Python
rostran/core/template.py
aliyun/alibabacloud-ros-tool-transformer-
722ea64c1290c095906ab2426de47928a1775dd6
[ "Apache-2.0" ]
null
null
null
rostran/core/template.py
aliyun/alibabacloud-ros-tool-transformer-
722ea64c1290c095906ab2426de47928a1775dd6
[ "Apache-2.0" ]
null
null
null
rostran/core/template.py
aliyun/alibabacloud-ros-tool-transformer-
722ea64c1290c095906ab2426de47928a1775dd6
[ "Apache-2.0" ]
null
null
null
import json import logging from typing import Optional, Union from functools import partial import typer import yaml from .exceptions import InvalidRosTemplateFormatVersion from .format import FileFormat, TargetTemplateFormat from .parameters import Parameters from .resources import Resources from .outputs import Out...
32.917197
82
0.625
f7e68424e1afbf1135f00483ea2ddb6c0d7f0bae
3,877
py
Python
src/datamodules/musdb_datamodule.py
kuielab/mdx-net
bbd46dbf2ceb26c3fbfbe412b5159bce2366c9c0
[ "MIT" ]
45
2021-08-07T12:51:51.000Z
2022-03-24T21:17:43.000Z
src/datamodules/musdb_datamodule.py
kuielab/mdx-net
bbd46dbf2ceb26c3fbfbe412b5159bce2366c9c0
[ "MIT" ]
5
2021-08-11T02:08:12.000Z
2022-03-29T15:20:18.000Z
src/datamodules/musdb_datamodule.py
kuielab/mdx-net
bbd46dbf2ceb26c3fbfbe412b5159bce2366c9c0
[ "MIT" ]
13
2021-08-15T13:59:38.000Z
2022-02-22T23:42:32.000Z
import os from os.path import exists, join from pathlib import Path from typing import Optional, Tuple from pytorch_lightning import LightningDataModule from torch.utils.data import ConcatDataset, DataLoader, Dataset, random_split from src.datamodules.datasets.musdb import MusdbTrainDataset, MusdbValidDataset class...
35.568807
92
0.584988
f7e685e3ac1d8eab6808fe438508131b63220abc
385
py
Python
dipy/core/tests/test_ndindex.py
martcous/dipy
6bff5655f03db19bde5aa951ffb91987983a889b
[ "MIT" ]
8
2019-05-29T09:38:30.000Z
2021-01-20T03:36:59.000Z
dipy/core/tests/test_ndindex.py
martcous/dipy
6bff5655f03db19bde5aa951ffb91987983a889b
[ "MIT" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
dipy/core/tests/test_ndindex.py
martcous/dipy
6bff5655f03db19bde5aa951ffb91987983a889b
[ "MIT" ]
2
2018-07-24T21:20:54.000Z
2018-08-27T04:08:24.000Z
from dipy.core.ndindex import ndindex import numpy as np from numpy.testing import assert_array_equal def test_ndindex(): x = list(ndindex((1, 2, 3))) expected = [ix for ix, e in np.ndenumerate(np.zeros((1, 2, 3)))] assert_array_equal(x, expected) def test_ndindex_0d(): x = list(ndindex(np.array(1)...
22.647059
68
0.683117
f7e6b6179d5d4d0950e53da60ec8d9cb1972b0f6
7,613
py
Python
mozilla_schema_generator/generic_ping.py
fbertsch/mozilla-schema-creator
c932aac4b8c9d162916d42f7b6bf2f546c882bc0
[ "MIT" ]
null
null
null
mozilla_schema_generator/generic_ping.py
fbertsch/mozilla-schema-creator
c932aac4b8c9d162916d42f7b6bf2f546c882bc0
[ "MIT" ]
null
null
null
mozilla_schema_generator/generic_ping.py
fbertsch/mozilla-schema-creator
c932aac4b8c9d162916d42f7b6bf2f546c882bc0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime import json import logging import os import pathlib import re from json.decoder...
32.395745
97
0.598581
f7e6bdef24b7dfe94503ecd4b80a55a56f206570
5,120
py
Python
tests/integration/states/virtualenv.py
gotcha/salt
7b84c704777d3d2062911895dc3fdf93d40e9848
[ "Apache-2.0" ]
1
2015-10-06T22:25:22.000Z
2015-10-06T22:25:22.000Z
tests/integration/states/virtualenv.py
gotcha/salt
7b84c704777d3d2062911895dc3fdf93d40e9848
[ "Apache-2.0" ]
null
null
null
tests/integration/states/virtualenv.py
gotcha/salt
7b84c704777d3d2062911895dc3fdf93d40e9848
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' tests.integration.states.virtualenv ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` :copyright: © 2012 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. ''' # Import pyth...
36.571429
79
0.584766
f7e6d488bfb2e1a0dcf93f52bb38632b5a5d729d
4,143
py
Python
scripts/train_bernoulliae.py
act65/mri-reconstruction
2dcf30e10c37a482f1aab2524c5966d03eb72085
[ "MIT" ]
8
2018-12-30T10:33:44.000Z
2021-07-16T09:59:09.000Z
scripts/train_bernoulliae.py
gongjizhang/mri-reconstruction
2dcf30e10c37a482f1aab2524c5966d03eb72085
[ "MIT" ]
1
2018-06-01T03:51:35.000Z
2018-08-27T03:39:34.000Z
scripts/train_bernoulliae.py
gongjizhang/mri-reconstruction
2dcf30e10c37a482f1aab2524c5966d03eb72085
[ "MIT" ]
5
2018-12-30T10:33:45.000Z
2021-11-15T11:19:56.000Z
import tensorflow as tf import src.bernoulliae as bernoulliae import src.utils as utils import os import argparse def argumentparser(): parser = argparse.ArgumentParser(description='Train an SparseAE') parser.add_argument('--batch_size', type=int, default=50, help='Batch size...') ...
41.43
96
0.63022
f7e701a9e7fc983a8db743b79b3c408007f82241
2,865
py
Python
vision_transform_codes/tests/sparse_coding_2.py
spencerkent/vision-transform-codes
63258ce698e436ee3ce29def75c89337759fb98b
[ "BSD-3-Clause" ]
null
null
null
vision_transform_codes/tests/sparse_coding_2.py
spencerkent/vision-transform-codes
63258ce698e436ee3ce29def75c89337759fb98b
[ "BSD-3-Clause" ]
null
null
null
vision_transform_codes/tests/sparse_coding_2.py
spencerkent/vision-transform-codes
63258ce698e436ee3ce29def75c89337759fb98b
[ "BSD-3-Clause" ]
null
null
null
""" Test: Sparse coding, fully connected, fista, cheap qaudratic descent """ import _set_the_path import math import pickle import torch from training.sparse_coding import train_dictionary from utils.dataset_generation import OneOutputDset from utils import defaults RUN_IDENTIFIER = '_testing_sc_2' LOGS_STORED_HERE ...
37.207792
77
0.742408
f7e7024d1949c5235dc0390ee6cfc0bb35c848ec
2,178
py
Python
list-expansion/Python/vm/machine/registers.py
harrisi/on-being-better
81dc6d02de582e1d0dcf48d8d9f603bee9f2ef39
[ "CC0-1.0" ]
null
null
null
list-expansion/Python/vm/machine/registers.py
harrisi/on-being-better
81dc6d02de582e1d0dcf48d8d9f603bee9f2ef39
[ "CC0-1.0" ]
null
null
null
list-expansion/Python/vm/machine/registers.py
harrisi/on-being-better
81dc6d02de582e1d0dcf48d8d9f603bee9f2ef39
[ "CC0-1.0" ]
null
null
null
import sys from machine import util class Registers(dict): # This should be a "safe" set; registers can't have values out of # range (-128, 127), and can only be 0x1-0xF def __setitem__(self, key, item): if type(key) is list: key = util.getValFromBits(key) if type(key) != int: ...
27.923077
82
0.600551
f7e709391ec9e157cd3b34cd4dcd2918b92a4531
486
py
Python
routehome/wsgi.py
christinagee/Safe-Route-Home
6eb17ddd3c8f4893d9dcf1e08fc8374901a68d7c
[ "MIT" ]
1
2017-10-09T19:42:23.000Z
2017-10-09T19:42:23.000Z
routehome/wsgi.py
christinagee/Safe-Route-Home
6eb17ddd3c8f4893d9dcf1e08fc8374901a68d7c
[ "MIT" ]
null
null
null
routehome/wsgi.py
christinagee/Safe-Route-Home
6eb17ddd3c8f4893d9dcf1e08fc8374901a68d7c
[ "MIT" ]
2
2017-04-30T22:25:20.000Z
2021-03-04T19:51:14.000Z
""" WSGI config for RouteHome project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from whitenoise.django import Djan...
25.578947
78
0.804527
f7e71d73e11b9db09261f91d91d454412b1ba003
13,562
py
Python
python/PythonFCST/visu/_post_dakota_.py
jeremyjiezhou/Learn-PyTorch
7e4404609bacd2ec796f6ca3ea118e8e34ab4a22
[ "MIT" ]
24
2016-10-04T20:49:55.000Z
2022-03-12T19:07:10.000Z
python/PythonFCST/visu/_post_dakota_.py
jeremyjiezhou/Learn-PyTorch
7e4404609bacd2ec796f6ca3ea118e8e34ab4a22
[ "MIT" ]
3
2016-09-05T10:17:36.000Z
2016-12-11T18:23:06.000Z
python/PythonFCST/visu/_post_dakota_.py
jeremyjiezhou/Learn-PyTorch
7e4404609bacd2ec796f6ca3ea118e8e34ab4a22
[ "MIT" ]
9
2016-12-11T22:15:03.000Z
2020-11-21T13:51:05.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- # Author: FCST Development Team # License: TBD # Copyright (c) 2012, TBD """ This module conatins a simple parser for the Dakota tabular results files. Currrently only the cell voltage as input variable is supported. Simple plotting of the data is provided as well. Input:...
40.243323
107
0.580962
f7e71e67f969c901b4071f771ad4605fe70ab362
1,222
py
Python
examples/draw_gpx.py
lowtower/py-staticmaps
a5445cb9b3526039ceeca941164ba7cd1310caa3
[ "MIT" ]
null
null
null
examples/draw_gpx.py
lowtower/py-staticmaps
a5445cb9b3526039ceeca941164ba7cd1310caa3
[ "MIT" ]
null
null
null
examples/draw_gpx.py
lowtower/py-staticmaps
a5445cb9b3526039ceeca941164ba7cd1310caa3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # py-staticmaps # Copyright (c) 2020 Florian Pigorsch; see /LICENSE for licensing information import sys import gpxpy # type: ignore import staticmaps context = staticmaps.Context() context.set_tile_provider(staticmaps.tile_provider_ArcGISWorldImagery) with open(sys.argv[1], "r", encoding="u...
29.095238
90
0.735679
f7e7232c3709bcac172450603a9813a068cefa4b
1,096
py
Python
internships/CtCI/ch1/one_away.py
AmrMKayid/KayAlgo
df6e2b5b0f74174d5c0950520f0c47b04212dfaa
[ "MIT" ]
1
2019-02-11T13:29:32.000Z
2019-02-11T13:29:32.000Z
internships/CtCI/ch1/one_away.py
AmrMKayid/KayAlgo
df6e2b5b0f74174d5c0950520f0c47b04212dfaa
[ "MIT" ]
1
2019-02-11T15:26:36.000Z
2019-02-11T15:26:36.000Z
internships/CtCI/ch1/one_away.py
AmrMKayid/KayAlgo
df6e2b5b0f74174d5c0950520f0c47b04212dfaa
[ "MIT" ]
null
null
null
import unittest def one_away(str1, str2): count = 0 str1, str2 = (str1, str2) if (len(str1) > len(str2)) else (str2, str1) for c in str1: if c not in str2: count += 1 if count > 1: return False return True class Test(unittest.TestCase): '''Test Cases''' data = [('pale', 'ple', Tr...
30.444444
80
0.513686
f7e73607b855cdf3ee28ecb097c40afd334ce2f9
3,701
py
Python
brca_exchange_cooccurrence_analysis/extract_roh_regions_stats.py
glennhickey/CharlieSandbox
2949f8357433a6219abf192f899ab50e2c8edaba
[ "MIT" ]
null
null
null
brca_exchange_cooccurrence_analysis/extract_roh_regions_stats.py
glennhickey/CharlieSandbox
2949f8357433a6219abf192f899ab50e2c8edaba
[ "MIT" ]
null
null
null
brca_exchange_cooccurrence_analysis/extract_roh_regions_stats.py
glennhickey/CharlieSandbox
2949f8357433a6219abf192f899ab50e2c8edaba
[ "MIT" ]
1
2021-09-29T14:25:02.000Z
2021-09-29T14:25:02.000Z
import matplotlib matplotlib.use('Agg') import vcf, argparse, sys import numpy as np import pandas as pd import math from scipy.stats import chisquare from collections import defaultdict import matplotlib.pyplot import ast def parse_args(): """ Description: function 'parse_args' parses arguments from ...
36.284314
116
0.625236
f7e75193463ff4620de712052791ef596c62c71a
1,138
py
Python
storage/globalVariables.py
SuperSmay/Uno2
4cb9a000064a4ce117779c8de89be637d8e1d55d
[ "Apache-2.0" ]
1
2021-05-06T14:24:57.000Z
2021-05-06T14:24:57.000Z
storage/globalVariables.py
SuperSmay/Uno2
4cb9a000064a4ce117779c8de89be637d8e1d55d
[ "Apache-2.0" ]
1
2021-04-11T06:28:29.000Z
2021-04-18T02:24:36.000Z
storage/globalVariables.py
SuperSmay/Uno2
4cb9a000064a4ce117779c8de89be637d8e1d55d
[ "Apache-2.0" ]
null
null
null
import json import discord.ext reactionMessageIDs = { } openGames = { } openLobbies = { } playersInGame = { } playersInLobby = { } def channelInGame(channelID): if channelID in openGames.keys(): return True else: return False def channelHasLobby(channelID): if channelID in openLobbie...
20.321429
67
0.630053
f7e78071d8b15500ba607a5cd16aefcaf9d2abfe
26,828
py
Python
tensorflow/python/training/momentum_test.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
71
2017-05-25T16:02:15.000Z
2021-06-09T16:08:08.000Z
tensorflow/python/training/momentum_test.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
133
2017-04-26T16:49:49.000Z
2019-10-15T11:39:26.000Z
tensorflow/python/training/momentum_test.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
31
2018-09-11T02:17:17.000Z
2021-12-15T10:33:35.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
46.576389
80
0.617899
f7e78daf144ece47b73a387c31b8d565c44a10c1
2,147
py
Python
latent_tests/generate_latent_dataset.py
Loptt/pong-autoencoder
c5123bb2466f644f7513d807044e11a4a17aae22
[ "MIT" ]
null
null
null
latent_tests/generate_latent_dataset.py
Loptt/pong-autoencoder
c5123bb2466f644f7513d807044e11a4a17aae22
[ "MIT" ]
1
2021-03-19T03:06:46.000Z
2021-08-02T13:29:05.000Z
latent_tests/generate_latent_dataset.py
Loptt/pong-autoencoder
c5123bb2466f644f7513d807044e11a4a17aae22
[ "MIT" ]
null
null
null
import os os.add_dll_directory( "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.4\\bin") import tensorflow as tf from keras.preprocessing.image import load_img from keras.preprocessing.image import img_to_array from keras.models import load_model import matplotlib.pyplot as plt import pickle ...
35.783333
96
0.682813
f7e79a8e9e601f777ea5848280ad8ea0e97c1512
11,966
py
Python
train.py
tranduytrung/rgbd-classification
156d829200c4592867af5ade85e8642afbe8580e
[ "Apache-2.0" ]
null
null
null
train.py
tranduytrung/rgbd-classification
156d829200c4592867af5ade85e8642afbe8580e
[ "Apache-2.0" ]
null
null
null
train.py
tranduytrung/rgbd-classification
156d829200c4592867af5ade85e8642afbe8580e
[ "Apache-2.0" ]
1
2021-09-28T02:36:17.000Z
2021-09-28T02:36:17.000Z
import os, json, glob, copy, argparse, shutil import torch import torchvision import numpy as np import PIL.Image from datetime import datetime from config import get_train_config from models import DepthNet, RGBNet, RGBDNet import augmentation import loaders from tensorboardX import SummaryWriter from utils import loa...
40.020067
165
0.610145
f7e7a37c36e5cec47596a2691a97b8929e9d6783
11,254
py
Python
dev/merge_arrow_pr.py
DonaldFoss/ApacheArrow
4226adfbc6b3dff10b3fe7a6691b30bcc94140bd
[ "Apache-2.0" ]
1
2020-04-23T01:11:36.000Z
2020-04-23T01:11:36.000Z
dev/merge_arrow_pr.py
DonaldFoss/ApacheArrow
4226adfbc6b3dff10b3fe7a6691b30bcc94140bd
[ "Apache-2.0" ]
1
2021-12-09T23:06:13.000Z
2021-12-09T23:06:14.000Z
dev/merge_arrow_pr.py
DonaldFoss/ApacheArrow
4226adfbc6b3dff10b3fe7a6691b30bcc94140bd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Li...
33.89759
79
0.632753
f7e7edb9f58f21f3d2097ad6e8ca3b6523f29b23
8,373
py
Python
script/render_episode.py
T3p/baselines
5623c9160d1e86ebca3e673f142fe6b14a1db06c
[ "MIT" ]
2
2020-08-01T18:19:05.000Z
2021-06-30T06:37:23.000Z
script/render_episode.py
T3p/baselines
5623c9160d1e86ebca3e673f142fe6b14a1db06c
[ "MIT" ]
null
null
null
script/render_episode.py
T3p/baselines
5623c9160d1e86ebca3e673f142fe6b14a1db06c
[ "MIT" ]
5
2018-11-24T16:29:39.000Z
2021-12-10T03:07:07.000Z
#!/usr/bin/env python3 # noinspection PyUnresolvedReferences ''' This file is intended to be used to render an episode for a given policy and a given environment. ''' # Common imports import sys, re, os, time, logging from collections import defaultdict import pickle as pkl # Framework imports import gym impor...
37.547085
165
0.650066
f7e7f34f7dc9b938f908f0b77aa7c34772e3910a
704
py
Python
simulation/evaluator/simulation.py
nbelzer/msc-thesis
91d37305275c988140e32ce15486275e3b984fb5
[ "Apache-2.0" ]
null
null
null
simulation/evaluator/simulation.py
nbelzer/msc-thesis
91d37305275c988140e32ce15486275e3b984fb5
[ "Apache-2.0" ]
null
null
null
simulation/evaluator/simulation.py
nbelzer/msc-thesis
91d37305275c988140e32ce15486275e3b984fb5
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from dataclasses import field @dataclass class User: identifier: str connected_node_id: str node_history: list[str] = field(default_factory=list) def last_nodes(self, n: int=5): return reversed(self.node_history[-n:]) class SimulationContext: iteration: ...
24.275862
92
0.670455
f7e80b295a8b23d324ec47af9cd857823ef62f81
533
py
Python
pmaf/pipe/agents/miners/__init__.py
mmtechslv/PhyloMAF
bab43dd4a4d2812951b1fdf4f1abb83edb79ea88
[ "BSD-3-Clause" ]
1
2021-07-02T06:24:17.000Z
2021-07-02T06:24:17.000Z
pmaf/pipe/agents/miners/__init__.py
mmtechslv/PhyloMAF
bab43dd4a4d2812951b1fdf4f1abb83edb79ea88
[ "BSD-3-Clause" ]
1
2021-06-28T12:02:46.000Z
2021-06-28T12:02:46.000Z
pmaf/pipe/agents/miners/__init__.py
mmtechslv/PhyloMAF
bab43dd4a4d2812951b1fdf4f1abb83edb79ea88
[ "BSD-3-Clause" ]
null
null
null
r""" Data Miners (:mod:`pmaf.pipe.agents.miners`) ============================================= .. currentmodule:: pmaf.pipe.agents.miners This sub-package :mod:`~pmaf.pipe.agents.miners` contains single class :class:`~pmaf.pipe.agents.miners.Miner` that can be used to mine the data via mediators without implicitly ...
23.173913
77
0.649156
f7e822a7dc0d30806db37a0133072fe95e439504
3,764
py
Python
oscar/lib/python2.7/site-packages/haystack/manager.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/haystack/manager.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/haystack/manager.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from haystack.query import EmptySearchQuerySet, SearchQuerySet class SearchIndexManager(object): def __init__(self, using=None): super(SearchIndexManager, self).__init__() self.using = ...
34.851852
104
0.682519
f7e82402e86c2bf5d0d97e8f7e3ae36b4896b184
6,927
py
Python
tests/testsuite_basic/integration/test_upstream.py
samuzzal-choudhury/packit
9d2d735f14e12f1deda62604fdbfd9a7e5775257
[ "MIT" ]
null
null
null
tests/testsuite_basic/integration/test_upstream.py
samuzzal-choudhury/packit
9d2d735f14e12f1deda62604fdbfd9a7e5775257
[ "MIT" ]
null
null
null
tests/testsuite_basic/integration/test_upstream.py
samuzzal-choudhury/packit
9d2d735f14e12f1deda62604fdbfd9a7e5775257
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2018-2019 Red Hat, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, m...
29.351695
82
0.692652
f7e828fb0140c2b120bfd70248c45afd6f312a34
4,160
py
Python
sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2021_03_03_preview/aio/operations/_resource_provider_common_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2021_03_03_preview/aio/operations/_resource_provider_common_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2021_03_03_preview/aio/operations/_resource_provider_common_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
45.217391
133
0.715625
f7e8308a5ff17a0c9448402cfda1d355fa65cc97
7,294
py
Python
python/ray/rllib/test/test_external_env.py
cumttang/ray
eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c
[ "Apache-2.0" ]
2
2019-10-08T13:31:08.000Z
2019-10-22T18:34:52.000Z
python/ray/rllib/test/test_external_env.py
cumttang/ray
eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c
[ "Apache-2.0" ]
1
2018-12-26T01:09:50.000Z
2018-12-26T01:09:50.000Z
python/ray/rllib/test/test_external_env.py
cumttang/ray
eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c
[ "Apache-2.0" ]
6
2019-03-12T05:37:35.000Z
2020-03-09T12:25:17.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import gym import numpy as np import random import unittest import uuid import ray from ray.rllib.agents.dqn import DQNAgent from ray.rllib.agents.pg import PGAgent from ray.rllib.evaluation.policy_evaluator i...
36.288557
78
0.592542
f7e83c9e4bea2c04c96c17176fdd9a48ad21e4c4
2,283
py
Python
src/pykeen/models/multimodal/distmult_literal.py
Rodrigo-A-Pereira/pykeen
76c5acb707faa524b5951b0d1d85ab1afe806462
[ "MIT" ]
null
null
null
src/pykeen/models/multimodal/distmult_literal.py
Rodrigo-A-Pereira/pykeen
76c5acb707faa524b5951b0d1d85ab1afe806462
[ "MIT" ]
null
null
null
src/pykeen/models/multimodal/distmult_literal.py
Rodrigo-A-Pereira/pykeen
76c5acb707faa524b5951b0d1d85ab1afe806462
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Implementation of the DistMultLiteral model.""" from typing import Any, ClassVar, Mapping import torch.nn as nn from .base import LiteralModel from ...constants import DEFAULT_DROPOUT_HPO_RANGE, DEFAULT_EMBEDDING_HPO_EMBEDDING_DIM_RANGE from ...nn.combinations import DistMultCombination f...
32.15493
99
0.634253
f7e8461be47fce125354b0da8b744b2fd174b650
425
py
Python
external_libs/hessian_eigenthings/__init__.py
andrewliao11/stable-continual-learning
be4049c6f1c433e6d4593bf3113280dcbeb127b9
[ "MIT" ]
67
2020-04-27T21:33:42.000Z
2022-03-25T08:57:40.000Z
external_libs/hessian_eigenthings/__init__.py
zajaczajac/stable-continual-learning
d83ba51eb7a9c98b5e33a9f7b55501dd01a92047
[ "MIT" ]
14
2020-06-23T10:15:08.000Z
2022-02-10T01:42:49.000Z
external_libs/hessian_eigenthings/__init__.py
zajaczajac/stable-continual-learning
d83ba51eb7a9c98b5e33a9f7b55501dd01a92047
[ "MIT" ]
10
2020-06-15T08:50:46.000Z
2022-03-12T14:56:28.000Z
""" Top-level module for hessian eigenvec computation This library is cited in our paper. """ from .power_iter import power_iteration, deflated_power_iteration from .lanczos import lanczos from .hvp_operator import HVPOperator, compute_hessian_eigenthings __all__ = [ "power_iteration", "deflated_power_iteratio...
25
66
0.771765
f7e89855f46b99357de8be481c390f9349cfc692
102,080
py
Python
neuralprophet/forecaster.py
ssattari/neural_prophet
e121234d2f64d2b81f9c53f52b30d21a2cf1c6e0
[ "MIT" ]
null
null
null
neuralprophet/forecaster.py
ssattari/neural_prophet
e121234d2f64d2b81f9c53f52b30d21a2cf1c6e0
[ "MIT" ]
null
null
null
neuralprophet/forecaster.py
ssattari/neural_prophet
e121234d2f64d2b81f9c53f52b30d21a2cf1c6e0
[ "MIT" ]
null
null
null
import time from collections import OrderedDict import numpy as np import pandas as pd import torch from torch.utils.data import DataLoader import logging from tqdm import tqdm from neuralprophet import configure from neuralprophet import time_net from neuralprophet import time_dataset from neuralprophet import df_ut...
42.321725
241
0.578958
f7e8c44c1f1482b0d3cc9bbe44487997497039ba
218
py
Python
pycryptoki/cryptoki_helpers.py
nondejus/pycryptoki
5dbc9fe6b1d17b2bc52a3e91a01abcd0ddc2b0e3
[ "Apache-2.0" ]
24
2016-08-17T13:52:07.000Z
2019-12-26T17:16:39.000Z
pycryptoki/cryptoki_helpers.py
nondejus/pycryptoki
5dbc9fe6b1d17b2bc52a3e91a01abcd0ddc2b0e3
[ "Apache-2.0" ]
8
2020-08-06T15:19:46.000Z
2022-03-25T17:52:00.000Z
pycryptoki/cryptoki_helpers.py
nondejus/pycryptoki
5dbc9fe6b1d17b2bc52a3e91a01abcd0ddc2b0e3
[ "Apache-2.0" ]
12
2016-11-22T05:43:18.000Z
2020-02-12T17:45:05.000Z
""" Deprecated in pycryptoki 2.4 """ import warnings warnings.warn("Deprecated, use pycryptoki.cryptoki.helpers!", DeprecationWarning) # noinspection PyUnresolvedReferences from pycryptoki.cryptoki.helpers import *
19.818182
81
0.802752
f7e8c83da6caa366957105dbe25e1d68e576cc8e
466
py
Python
python_modules/libraries/dagster-airbyte/dagster_airbyte/__init__.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-airbyte/dagster_airbyte/__init__.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-airbyte/dagster_airbyte/__init__.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
1
2019-09-11T03:02:27.000Z
2019-09-11T03:02:27.000Z
from dagster.core.utils import check_dagster_package_version from .asset_defs import build_airbyte_assets from .ops import airbyte_sync_op from .resources import AirbyteResource, AirbyteState, airbyte_resource from .types import AirbyteOutput from .version import __version__ check_dagster_package_version("dagster-air...
25.888889
70
0.800429
f7e91957a1aff46672a88263fa9cb1e5a1030fdd
13,207
py
Python
kopf/structs/primitives.py
ankitdobhal/kopf
2765eda2a08e7e42195446cc23f02ba91603db53
[ "MIT" ]
null
null
null
kopf/structs/primitives.py
ankitdobhal/kopf
2765eda2a08e7e42195446cc23f02ba91603db53
[ "MIT" ]
null
null
null
kopf/structs/primitives.py
ankitdobhal/kopf
2765eda2a08e7e42195446cc23f02ba91603db53
[ "MIT" ]
null
null
null
""" Synchronisation primitives and helper functions. """ import asyncio import collections.abc import concurrent.futures import enum import threading import time from typing import Any, Collection, Iterable, Iterator, Optional, Set, Union from kopf.utilities import aiotasks Flag = Union[aiotasks.Future, asyncio.Event...
35.03183
98
0.664193
f7e97b461353a4cf3204d22f697d8e9ec5a7823b
2,587
py
Python
Skimage_numpy/source/Pillow-4.0.0.data/scripts/pilprint.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
1
2019-06-27T12:09:44.000Z
2019-06-27T12:09:44.000Z
Skimage_numpy/source/Pillow-4.0.0.data/scripts/pilprint.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
null
null
null
Skimage_numpy/source/Pillow-4.0.0.data/scripts/pilprint.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
null
null
null
#!python # # The Python Imaging Library. # $Id$ # # print image files to postscript printer # # History: # 0.1 1996-04-20 fl Created # 0.2 1996-10-04 fl Use draft mode when converting. # 0.3 2003-05-06 fl Fixed a typo or two. # from __future__ import print_function import getopt import os import sys import...
25.116505
68
0.566293
f7e98075baf3d5140450186a367eb22329ff4243
10,827
py
Python
language_model/train_1bw.py
XuezheMax/apollo
7adf28f6af4606e4730e161473b33a9916211c61
[ "Apache-2.0" ]
166
2020-09-27T06:34:56.000Z
2022-02-13T07:45:15.000Z
language_model/train_1bw.py
JustCoolPig/apollo
852991fd769f80689415abee8653c0a5eedbab40
[ "Apache-2.0" ]
9
2020-10-08T10:59:06.000Z
2022-01-27T06:32:19.000Z
language_model/train_1bw.py
JustCoolPig/apollo
852991fd769f80689415abee8653c0a5eedbab40
[ "Apache-2.0" ]
15
2020-10-11T10:19:35.000Z
2021-10-04T13:40:40.000Z
import os import sys current_path = os.path.dirname(os.path.realpath(__file__)) root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) sys.path.append(root_path) import argparse import random import pickle import math import json import numpy as np import torch from utils import clip_grad_norm_ from...
43.834008
139
0.644407
f7e98dc04bf686526f2c2660d7077041204dd805
1,131
py
Python
tests/data/expected/main/main_jsonschema_without_titles_use_title_as_name/output.py
adaamz/datamodel-code-generator
3b34573f35f8d420e4668a85047c757fd1da7754
[ "MIT" ]
891
2019-07-23T04:23:32.000Z
2022-03-31T13:36:33.000Z
tests/data/expected/main/main_jsonschema_without_titles_use_title_as_name/output.py
adaamz/datamodel-code-generator
3b34573f35f8d420e4668a85047c757fd1da7754
[ "MIT" ]
663
2019-07-23T09:50:26.000Z
2022-03-29T01:56:55.000Z
tests/data/expected/main/main_jsonschema_without_titles_use_title_as_name/output.py
adaamz/datamodel-code-generator
3b34573f35f8d420e4668a85047c757fd1da7754
[ "MIT" ]
108
2019-07-23T08:50:37.000Z
2022-03-09T10:50:22.000Z
# generated by datamodel-codegen: # filename: without_titles.json # timestamp: 2019-07-26T00:00:00+00:00 from __future__ import annotations from enum import Enum from typing import List, Optional, Union from pydantic import BaseModel class ProcessingStatus(Enum): COMPLETED = 'COMPLETED' PENDING = 'PEN...
21.339623
74
0.759505
f7e997c5757dff99df4376f4adb633fc2755a87e
53
py
Python
tests/projects/simple/script.py
Josh-Thompson/artifact_py
3e8bffefed3fcb28bbadca2f8cd0ad1414b9e243
[ "Apache-2.0", "MIT" ]
7
2019-07-22T15:22:32.000Z
2021-06-24T13:22:26.000Z
tests/projects/simple/script.py
Josh-Thompson/artifact_py
3e8bffefed3fcb28bbadca2f8cd0ad1414b9e243
[ "Apache-2.0", "MIT" ]
5
2019-07-27T02:09:40.000Z
2019-08-24T19:40:52.000Z
tests/projects/simple/script.py
Josh-Thompson/artifact_py
3e8bffefed3fcb28bbadca2f8cd0ad1414b9e243
[ "Apache-2.0", "MIT" ]
2
2019-07-30T13:39:31.000Z
2020-05-13T04:16:25.000Z
# This is a script and implements #SPC-simple.script
26.5
52
0.773585
f7e9a0d243dbde1a0a7a1def66b65ded3f8685af
15,511
py
Python
monai/networks/nets/resnet.py
albarqounilab/MONAI
bb0b307d68021a243011a58fd82a1d275f00a51a
[ "Apache-2.0" ]
1
2021-07-13T00:34:41.000Z
2021-07-13T00:34:41.000Z
monai/networks/nets/resnet.py
mac20211991/MONAI
d4d173362b71a9af6c5414db591994f799e4fd2c
[ "Apache-2.0" ]
null
null
null
monai/networks/nets/resnet.py
mac20211991/MONAI
d4d173362b71a9af6c5414db591994f799e4fd2c
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 - 2021 MONAI Consortium # 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...
39.070529
122
0.644188
f7e9b5407bbe09063b422f7fc901290434a00880
5,074
py
Python
benchmarks/units.py
WilliamJamieson/astropy-benchmarks
dcff9e1d8a584f7933743a91682806647a4c1e86
[ "BSD-3-Clause" ]
5
2018-01-30T01:26:07.000Z
2020-12-03T08:11:19.000Z
benchmarks/units.py
WilliamJamieson/astropy-benchmarks
dcff9e1d8a584f7933743a91682806647a4c1e86
[ "BSD-3-Clause" ]
72
2015-10-03T13:46:06.000Z
2021-11-19T16:42:03.000Z
benchmarks/units.py
WilliamJamieson/astropy-benchmarks
dcff9e1d8a584f7933743a91682806647a4c1e86
[ "BSD-3-Clause" ]
18
2015-05-25T17:01:26.000Z
2021-03-18T16:49:32.000Z
import copy import numpy as np from astropy import units as u # Unit tests def time_unit_compose(): u.Ry.compose() def time_unit_to(): u.m.to(u.pc) def time_unit_parse(): u.Unit('1e-07 kg m2 / s2') def time_simple_unit_parse(): u.Unit('1 d') def time_very_simple_unit_parse(): u.Unit('d')...
22.06087
78
0.636382
f7e9f3d9229fcf1a3095a01c90dcea6b3a49ca43
1,192
py
Python
myia/operations/prim_array_scan.py
strint/myia
3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a
[ "MIT" ]
222
2019-02-13T07:56:28.000Z
2022-03-28T07:07:54.000Z
myia/operations/prim_array_scan.py
strint/myia
3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a
[ "MIT" ]
107
2019-02-12T21:56:39.000Z
2022-03-12T01:08:03.000Z
myia/operations/prim_array_scan.py
strint/myia
3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a
[ "MIT" ]
27
2017-11-14T17:58:15.000Z
2019-01-14T01:36:09.000Z
"""Definitions for the primitive `array_scan`.""" import numpy as np from . import primitives as P def pyimpl_array_scan(fn, init, array, axis): """Implement `array_scan`.""" # This is inclusive scan because it's easier to implement # We will have to discuss what semantics we want later def f(ary): ...
24.326531
61
0.640101
f7e9f45c2fbec082d169c2f37ae993070c9c5ca3
2,068
py
Python
build_dataset.py
DSAdv/SpamClassificator
b9dfc2f42e66d0b97ef3fe072ecbe68b883d64d7
[ "Apache-2.0" ]
null
null
null
build_dataset.py
DSAdv/SpamClassificator
b9dfc2f42e66d0b97ef3fe072ecbe68b883d64d7
[ "Apache-2.0" ]
null
null
null
build_dataset.py
DSAdv/SpamClassificator
b9dfc2f42e66d0b97ef3fe072ecbe68b883d64d7
[ "Apache-2.0" ]
null
null
null
import sys import csv import pathlib def load_dataset(path_csv): """ Loads dataset into memory from csv file :param path_csv: str :return: object - [('text..', 'spam'), ('text...', 'ham'), ...] """ dataset = [] try: raw_data = pathlib \ .Path(path_csv) \ .read...
27.945946
79
0.615087
f7ea29d5db26fea75cdfe89a303246b0f75002aa
415
py
Python
appemail/celery.py
kevcal69/celery-email
896a0ae6c86bc8bbc61255c419afa965e30ab0bb
[ "MIT" ]
3
2019-06-19T12:33:23.000Z
2020-10-05T03:56:14.000Z
appemail/celery.py
kevcal69/celery-email
896a0ae6c86bc8bbc61255c419afa965e30ab0bb
[ "MIT" ]
7
2019-08-06T02:26:08.000Z
2021-06-10T21:36:14.000Z
appemail/celery.py
kevcal69/celery-email
896a0ae6c86bc8bbc61255c419afa965e30ab0bb
[ "MIT" ]
null
null
null
import os import django from celery import Celery from django.conf import settings os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'appemail.settings') django.setup() app = Celery('appemail') app.config_from_object('django.conf:settings', namespace='CELERY') app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)...
19.761905
68
0.773494
f7ea40557f9d28ca69a2a916f4643c9aa6508bf6
6,611
py
Python
app/views.py
dpanin/stamp-dashboard
8b6a2de5d18c6b609f036a3affc6a83213f6342f
[ "MIT" ]
1
2018-04-24T11:36:11.000Z
2018-04-24T11:36:11.000Z
app/views.py
dpanin/stamp-dashboard
8b6a2de5d18c6b609f036a3affc6a83213f6342f
[ "MIT" ]
null
null
null
app/views.py
dpanin/stamp-dashboard
8b6a2de5d18c6b609f036a3affc6a83213f6342f
[ "MIT" ]
null
null
null
from flask import flash, g, redirect, render_template, request, send_file, url_for from flask_login import current_user, login_required, login_user, logout_user from app import app, reds, db from .forms import LoginForm, SearchForm, RegisterForm from .models import Document, User @app.before_request def before_reque...
32.566502
101
0.608682
f7ea5d483a98c3a75e631e020f0a773d7556b5c7
3,696
py
Python
unit_tests/elasticsearch/test_roll_indexes.py
adrianmkng/watchmen
4be15ad64a5d54d4f546ca8c139fa41fd42dd6aa
[ "Apache-2.0" ]
190
2017-12-13T05:01:42.000Z
2021-11-15T23:35:54.000Z
unit_tests/elasticsearch/test_roll_indexes.py
adrianmkng/watchmen
4be15ad64a5d54d4f546ca8c139fa41fd42dd6aa
[ "Apache-2.0" ]
2
2018-08-31T04:53:03.000Z
2018-11-14T00:13:49.000Z
unit_tests/elasticsearch/test_roll_indexes.py
adrianmkng/watchmen
4be15ad64a5d54d4f546ca8c139fa41fd42dd6aa
[ "Apache-2.0" ]
22
2017-12-13T04:36:46.000Z
2021-07-29T07:37:41.000Z
# Copyright 2017 Insurance Australia Group Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
35.538462
113
0.463474
f7ea6add56313fe78bdcb4b228e65e06808908fa
385
py
Python
Python-Study/Study/Day2/string.py
Qiaozhi94/Python-Projects
aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4
[ "MIT" ]
null
null
null
Python-Study/Study/Day2/string.py
Qiaozhi94/Python-Projects
aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4
[ "MIT" ]
null
null
null
Python-Study/Study/Day2/string.py
Qiaozhi94/Python-Projects
aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4
[ "MIT" ]
null
null
null
name = "georgel" #print(name.title()) #name = "my name is {name} and i am {year} years old" #name = "my name is {name} and i come from {country}" #_name = name.format(name="georgel",country ="china") #print(_name.title()) ''' number = input("your number:") if number.isdigit(): number = int(number) prin...
14.259259
53
0.612987
f7ea6d218724501e10d2851d3af342ae949a2bf8
7,524
py
Python
src/mge.py
ErillLab/MGE_TF
31af2a203b9a1fde73d35a668b61f365af325257
[ "MIT" ]
null
null
null
src/mge.py
ErillLab/MGE_TF
31af2a203b9a1fde73d35a668b61f365af325257
[ "MIT" ]
null
null
null
src/mge.py
ErillLab/MGE_TF
31af2a203b9a1fde73d35a668b61f365af325257
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ """ import numpy as np import random import copy from Bio.Seq import Seq from genome import Genome import warnings class MGE(): def __init__(self, filepath, fileformat): self.original = Genome(filepath, fileformat) self.pseudogenomes ...
36.702439
106
0.585859
f7ea8063bf204d97800a6f8f1784ed6e05c15a7e
6,430
py
Python
deprecated_nets/net_focal2.py
danielmk/pyDentateeLife2020
b4a9f2beaa0c74dbc9583e2cf228856612596f8a
[ "MIT" ]
1
2022-02-24T20:39:46.000Z
2022-02-24T20:39:46.000Z
deprecated_nets/net_focal2.py
danielmk/pyDentateeLife2020
b4a9f2beaa0c74dbc9583e2cf228856612596f8a
[ "MIT" ]
null
null
null
deprecated_nets/net_focal2.py
danielmk/pyDentateeLife2020
b4a9f2beaa0c74dbc9583e2cf228856612596f8a
[ "MIT" ]
4
2020-02-18T09:25:20.000Z
2021-11-20T23:52:29.000Z
# -*- coding: utf-8 -*- """ This module implements the class StandardNetwork. StandardNetwork creates a ring network as defined in Santhakumar et al. 2005 with some changes as in Yim et al. 2015. See StandardNetwork docstring for details. Created on Tue Nov 28 13:01:38 2017 @author: DanielM """ from neuron import h, ...
45.928571
98
0.494712
f7ea84a8232ac027b7bafd508911ae0c9f1178db
8,882
py
Python
araucaria/xrdb/chem.py
marcoalsina/araucaria
78039106ae27d3fdef9265503c33f33992199d8e
[ "BSD-2-Clause" ]
8
2021-07-11T22:54:21.000Z
2022-02-16T20:22:25.000Z
araucaria/xrdb/chem.py
marcoalsina/araucaria
78039106ae27d3fdef9265503c33f33992199d8e
[ "BSD-2-Clause" ]
null
null
null
araucaria/xrdb/chem.py
marcoalsina/araucaria
78039106ae27d3fdef9265503c33f33992199d8e
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ The :mod:`~araucaria.xrdb.chem` module offers the following routines to access chemical data: .. list-table:: :widths: auto :header-rows: 1 * - Function - Description * - :func:`~araucaria.xrdb.chem.ztosym` - Returns atomic symbol. * - :func:`~ar...
23.435356
87
0.52871
f7ea85cd95be89254aeb2dcc5132e63a4ad3982e
11,177
py
Python
codes/block_definitions/block_arguments.py
jasonzutty/ezCGP
ee44425e4835f9d7ca5651bbea3340cf9466840a
[ "MIT" ]
5
2019-01-18T20:33:54.000Z
2021-08-24T17:02:07.000Z
codes/block_definitions/block_arguments.py
jasonzutty/ezCGP
ee44425e4835f9d7ca5651bbea3340cf9466840a
[ "MIT" ]
188
2019-01-22T21:56:42.000Z
2022-03-31T21:23:58.000Z
codes/block_definitions/block_arguments.py
jasonzutty/ezCGP
ee44425e4835f9d7ca5651bbea3340cf9466840a
[ "MIT" ]
3
2019-01-27T04:32:50.000Z
2021-04-20T17:28:42.000Z
''' root/code/block_definitions/block_arguments.py Overview: In the first ever iteration of creating a CGP framework, it was suggested by Dr. Greg Rohling to remove hyperparamters from the genome and keep them in their own space and perform basic GA on them instead; that way, all the primitives only deal with data man...
43.490272
647
0.698756
f7ea973af7c8a19b879e0923c877ec82f700e552
2,694
py
Python
venv/Lib/site-packages/pyrogram/raw/types/sticker_set_multi_covered.py
D1ne2021/jjhhhjj
a090da30983b3ef276dfe4cef2ded4526f36002a
[ "MIT" ]
2
2021-12-13T07:09:55.000Z
2022-01-12T12:15:20.000Z
venv/Lib/site-packages/pyrogram/raw/types/sticker_set_multi_covered.py
hoangkiet1906/Botcie_ver1
c133b915edde06dac690a7dc6ca160f6792fc4c8
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pyrogram/raw/types/sticker_set_multi_covered.py
hoangkiet1906/Botcie_ver1
c133b915edde06dac690a7dc6ca160f6792fc4c8
[ "MIT" ]
null
null
null
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2021 Dan <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free...
32.457831
103
0.625835