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
21184f3a15f5f7f79e8a5672d06f4b6dbda07c9f
308
py
Python
tests/test_mantle/mothball/arith/add4.py
splhack/loam
10b08bd622b7cfd63eabaec4729f6238e4521b30
[ "MIT" ]
14
2017-10-08T09:16:10.000Z
2021-11-27T19:12:24.000Z
tests/test_mantle/mothball/arith/add4.py
splhack/loam
10b08bd622b7cfd63eabaec4729f6238e4521b30
[ "MIT" ]
7
2018-04-12T21:33:49.000Z
2018-08-21T22:14:20.000Z
tests/test_mantle/mothball/arith/add4.py
splhack/loam
10b08bd622b7cfd63eabaec4729f6238e4521b30
[ "MIT" ]
3
2018-07-24T04:55:02.000Z
2019-12-30T08:12:39.000Z
import sys from magma import * from mantle import * from loam.shields.megawing import MegaWing megawing = MegaWing() megawing.Switch.on(8) megawing.LED.on(4) main = megawing.main() A = main.SWITCH[0:4] B = main.SWITCH[4:8] C = main.LED add = Add(4) add(A,B) wire(add.O, C) compile(sys.argv[1], main)
12.833333
42
0.694805
2118575dff401c054a2ce20d932302f97a12af46
2,115
py
Python
classTemplates/populateTemplate.py
GingerNinja2962/wtc-lms-GUI
e65f5aa64919649690059da37f7bd608b823ca6a
[ "Apache-2.0" ]
2
2021-04-08T11:08:12.000Z
2021-05-20T11:02:26.000Z
classTemplates/populateTemplate.py
GingerNinja2962/wtc-lms-GUI
e65f5aa64919649690059da37f7bd608b823ca6a
[ "Apache-2.0" ]
null
null
null
classTemplates/populateTemplate.py
GingerNinja2962/wtc-lms-GUI
e65f5aa64919649690059da37f7bd608b823ca6a
[ "Apache-2.0" ]
1
2021-04-08T11:08:15.000Z
2021-04-08T11:08:15.000Z
import PySimpleGUI as sg from custom_inherit import DocInheritMeta from os import path, mkdir from sys import argv class basePopulateDataClass(metaclass=DocInheritMeta(style="numpy_with_merge", include_special_methods=True)): """ A base class to inherit if making a population class. Attributes -----...
31.102941
78
0.594799
21185b5499abbf1cafc355b7aab4079f527700a3
2,701
py
Python
src/backend/app/utils/strutils.py
douglasdaly/web-app-skeleton
af7580822b18e714d7c0b54f6fdcd11bf57f16e0
[ "MIT" ]
1
2021-07-20T14:20:10.000Z
2021-07-20T14:20:10.000Z
src/backend/app/utils/strutils.py
douglasdaly/web-app-skeleton
af7580822b18e714d7c0b54f6fdcd11bf57f16e0
[ "MIT" ]
4
2021-03-31T20:03:55.000Z
2022-02-27T09:19:29.000Z
src/backend/app/utils/strutils.py
douglasdaly/web-app-skeleton
af7580822b18e714d7c0b54f6fdcd11bf57f16e0
[ "MIT" ]
1
2021-05-02T09:27:16.000Z
2021-05-02T09:27:16.000Z
# -*- coding: utf-8 -*- """ String utilities. """ import re def camel_to_snake(s: str) -> str: """Converts the given CamelCase name to snake_case. Parameters ---------- s : str The text to convert. Returns ------- str The converted text. Notes ----- Originall...
21.95935
79
0.590522
21187cf91345aa44daec8b0b14e1a633107ece99
2,079
py
Python
tests/test_inset_orf.py
JackCurragh/RDG
b37cc7a0e284e77af8facbeaf551d3b02e7df4a7
[ "MIT" ]
1
2022-02-03T11:19:28.000Z
2022-02-03T11:19:28.000Z
tests/test_inset_orf.py
JackCurragh/RDG
b37cc7a0e284e77af8facbeaf551d3b02e7df4a7
[ "MIT" ]
null
null
null
tests/test_inset_orf.py
JackCurragh/RDG
b37cc7a0e284e77af8facbeaf551d3b02e7df4a7
[ "MIT" ]
null
null
null
from RDG import RDG, Node, Edge def test_inserting_orfs_edges(): g = RDG() g = RDG.load_example(g) node_key = g.get_new_node_key() start_codon_position = 15 stop_codon_position = 25 start_node = Node(key=node_key, node_type="start_codon", coordinates=start_codon_position, edges_in=[], edges_ou...
34.081967
148
0.69216
211887e990964acd9a353d2fb03bdffc3cca9b85
4,825
py
Python
src/cops_and_robots/map_tools/occupancy_layer.py
COHRINT/cops_and_robots
1df99caa1e38bde1b5ce2d04389bc232a68938d6
[ "Apache-2.0" ]
3
2016-01-19T17:54:51.000Z
2019-10-21T12:09:03.000Z
src/cops_and_robots/map_tools/occupancy_layer.py
COHRINT/cops_and_robots
1df99caa1e38bde1b5ce2d04389bc232a68938d6
[ "Apache-2.0" ]
null
null
null
src/cops_and_robots/map_tools/occupancy_layer.py
COHRINT/cops_and_robots
1df99caa1e38bde1b5ce2d04389bc232a68938d6
[ "Apache-2.0" ]
5
2015-02-19T02:53:24.000Z
2019-03-05T20:29:12.000Z
#!/usr/bin/env python """Provides a gridded sense of which map regions are empty or not. An occupancy grid takes the map boundaries, creates a grid (with arbitrary cell size) and gives each cell a value: 0 for unoccupied cells, 1 for occupied cells, and None for cells that have not yet been explored. Note ---- Th...
31.331169
78
0.581969
2118a488762cbc884d4677c573e52f58b233240c
170
py
Python
indra_db_lite/construction/__init__.py
steppi/indra_db_lite
094d927570717d278624713072fa2c9acef5d884
[ "BSD-2-Clause" ]
null
null
null
indra_db_lite/construction/__init__.py
steppi/indra_db_lite
094d927570717d278624713072fa2c9acef5d884
[ "BSD-2-Clause" ]
null
null
null
indra_db_lite/construction/__init__.py
steppi/indra_db_lite
094d927570717d278624713072fa2c9acef5d884
[ "BSD-2-Clause" ]
1
2021-11-17T20:15:35.000Z
2021-11-17T20:15:35.000Z
from .util import ( get_postgres_tables, get_sqlite_tables, get_row_count_postgres, get_row_count_sqlite, import_csv_into_sqlite, query_to_csv, )
18.888889
27
0.741176
2118c914fad2d2437f02a9c33f63635f3b15a144
241
py
Python
LP/overload__bool__.py
spencerpomme/coconuts-on-fire
407d61b3583c472707a4e7b077a9a3ab12743996
[ "Apache-2.0" ]
1
2015-04-23T11:43:26.000Z
2015-04-23T11:43:26.000Z
LP/overload__bool__.py
spencerpomme/coconuts-on-fire
407d61b3583c472707a4e7b077a9a3ab12743996
[ "Apache-2.0" ]
null
null
null
LP/overload__bool__.py
spencerpomme/coconuts-on-fire
407d61b3583c472707a4e7b077a9a3ab12743996
[ "Apache-2.0" ]
null
null
null
class Truth: ''' The __bool__ method is prefered over __len__ in python. ''' def __bool__(self): return True def __len__(self): return 0 if __name__ == "__main__": X = Truth() if X: print("Yes!");
20.083333
59
0.568465
2118ccf5fff62a4c5113efdbd16e19e72348a33d
4,059
py
Python
nexus-ingest/nexus-xd-python-modules/tests/hd5splitter.py
dataplumber/nexus
f25a89e85eba098da9c6db1ff3d408dae8a6b310
[ "Apache-2.0" ]
23
2016-08-09T22:45:14.000Z
2020-02-17T08:18:29.000Z
nexus-ingest/nexus-xd-python-modules/tests/hd5splitter.py
lewismc/incubator-sdap-nexus
ff98fa346303431542b8391cc2a1bf7561d1bd03
[ "Apache-2.0" ]
6
2017-04-27T21:22:17.000Z
2021-06-01T21:45:52.000Z
nexus-ingest/nexus-xd-python-modules/tests/hd5splitter.py
dataplumber/nexus
f25a89e85eba098da9c6db1ff3d408dae8a6b310
[ "Apache-2.0" ]
5
2016-08-31T13:47:29.000Z
2017-11-14T21:45:22.000Z
""" Copyright (c) 2016 Jet Propulsion Laboratory, California Institute of Technology. All rights reserved """ def hd5_copy(source, dest): for key in source.keys(): source.copy('/' + key, dest['/'], name=key) print key if str(key) == 'time': dest[key + '_c'] = dest[key][0:4] ...
32.733871
134
0.612959
2119135b96609e1a460a6dbb208b23528c6a0d30
983
py
Python
train.py
txAnnie/ZP-DNLG
16660ff917d50b534f940491133fe7d137e483bf
[ "MIT" ]
1
2022-01-26T10:50:22.000Z
2022-01-26T10:50:22.000Z
train.py
txAnnie/ZP-DNLG
16660ff917d50b534f940491133fe7d137e483bf
[ "MIT" ]
null
null
null
train.py
txAnnie/ZP-DNLG
16660ff917d50b534f940491133fe7d137e483bf
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Main training workflow """ from __future__ import division import argparse import onmt.opts as opts from onmt.train_multi import main as multi_main from onmt.train_single import main as single_main def main(opt): if opt.rnn_type == "SRU" and not opt.gpuid: raise AssertionEr...
23.404762
78
0.689725
21193ce92d2f94c3e3857a96434156ecd061426b
79
py
Python
tests/test_gpt.py
Scartography/OpenSarToolkit
53c19e1c6c21260e73518eb9106ce7305539a83d
[ "MIT" ]
null
null
null
tests/test_gpt.py
Scartography/OpenSarToolkit
53c19e1c6c21260e73518eb9106ce7305539a83d
[ "MIT" ]
null
null
null
tests/test_gpt.py
Scartography/OpenSarToolkit
53c19e1c6c21260e73518eb9106ce7305539a83d
[ "MIT" ]
null
null
null
from ost.helpers.utils import gpt_path def test_gpt(): assert gpt_path()
13.166667
38
0.734177
211972aed529239d19e00cea2a8f376483e8af42
1,113
py
Python
aoc-2021/day-13/day_13.py
bsamseth/advent-of-code-2018
bdd3969e61fac3f1543c20983260aa9fda912e99
[ "MIT" ]
1
2021-01-03T17:09:13.000Z
2021-01-03T17:09:13.000Z
aoc-2021/day-13/day_13.py
bsamseth/advent-of-code-2018
bdd3969e61fac3f1543c20983260aa9fda912e99
[ "MIT" ]
3
2021-06-01T23:09:26.000Z
2022-03-12T01:08:40.000Z
aoc-2021/day-13/day_13.py
bsamseth/advent-of-code
65d40548057a86b6fda37aec8e7d5d473d627124
[ "MIT" ]
null
null
null
import re import numpy as np import pytesseract from aocd import data, submit from PIL import Image points = np.array([(int(y), int(x)) for x, y in re.findall(r"(\d+),(\d+)", data)]) folds = [(x, int(y)) for x, y in re.findall(r"(x|y)=(\d+)", data)] maxy, maxx = points.max(axis=0) grid = np.zeros((maxy + 1, maxx + 1...
25.883721
82
0.55885
2119742a5030992463dd95b42ea28b55c460b6bf
127
py
Python
cgatpipelines/tools/pipeline_docs/pipeline_rnaseqdiffexpression/trackers/IsoformReport.py
kevinrue/cgat-flow
02b5a1867253c2f6fd6b4f3763e0299115378913
[ "MIT" ]
49
2015-04-13T16:49:25.000Z
2022-03-29T10:29:14.000Z
cgatpipelines/tools/pipeline_docs/pipeline_rnaseqdiffexpression/trackers/IsoformReport.py
kevinrue/cgat-flow
02b5a1867253c2f6fd6b4f3763e0299115378913
[ "MIT" ]
252
2015-04-08T13:23:34.000Z
2019-03-18T21:51:29.000Z
cgatpipelines/tools/pipeline_docs/pipeline_rnaseqdiffexpression/trackers/IsoformReport.py
kevinrue/cgat-flow
02b5a1867253c2f6fd6b4f3763e0299115378913
[ "MIT" ]
22
2015-05-21T00:37:52.000Z
2019-09-25T05:04:27.000Z
from CGATReport.Tracker import TrackerSQL class IsoformTracker(TrackerSQL): """Base class for trackers in this report"""
21.166667
48
0.771654
211994e28f3cc7b4a985ffaa5915828741d2a599
948
py
Python
src/web/handler/WebSocketHandler.py
Denon/redis-monitor
db78e2c7c13e636c4071ae3df23ac43d7288e36f
[ "MIT" ]
2
2016-07-29T03:53:51.000Z
2017-01-03T06:23:27.000Z
src/web/handler/WebSocketHandler.py
Denon/redis-monitor
db78e2c7c13e636c4071ae3df23ac43d7288e36f
[ "MIT" ]
null
null
null
src/web/handler/WebSocketHandler.py
Denon/redis-monitor
db78e2c7c13e636c4071ae3df23ac43d7288e36f
[ "MIT" ]
null
null
null
import aiohttp import json from aiohttp.web import Application, Response, MsgType, WebSocketResponse class RedisHanlder(object): def __init__(self, queue): self.queue = queue async def get(self, request): resp = WebSocketResponse() await resp.prepare(request) print('Someone j...
27.882353
73
0.574895
211997054aaf0866d312a5c2044e07261b0e3f95
6,388
py
Python
Tools/CygwinDownloader/cygwin-downloader.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
6
2021-07-05T16:09:39.000Z
2022-03-06T22:44:42.000Z
Tools/CygwinDownloader/cygwin-downloader.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
7
2022-03-15T13:25:39.000Z
2022-03-15T13:25:44.000Z
Tools/CygwinDownloader/cygwin-downloader.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import os, random, sys, time, urllib # # Options # dry_run = len(sys.argv) > 1 and "--dry-run" in set(sys.argv[1:]) quiet = len(sys.argv) > 1 and "--quiet" in set(sys.argv[1:]) # # Functions and constants # def download_progress_hook(block_count, block_si...
38.02381
161
0.545867
2119b927d7cb7e307a483fce94124f36f4e4d05f
7,233
py
Python
macrocomplex_builder.py
gpalou4/macrocomplex_builder
0c3850858d5aa166b4edbb29839431e888a862a1
[ "MIT" ]
1
2019-04-03T20:23:45.000Z
2019-04-03T20:23:45.000Z
macrocomplex_builder.py
gpalou4/macrocomplex_builder
0c3850858d5aa166b4edbb29839431e888a862a1
[ "MIT" ]
null
null
null
macrocomplex_builder.py
gpalou4/macrocomplex_builder
0c3850858d5aa166b4edbb29839431e888a862a1
[ "MIT" ]
2
2021-03-13T17:58:30.000Z
2021-04-15T13:50:37.000Z
import Bio.PDB import sys import string import os import argparse import timeit import logging import re from macrocomplex_functions import * # alias chimera="~/.local/UCSF-Chimera64-1.13.1/bin/chimera" start = timeit.default_timer() parser = argparse.ArgumentParser(description = "This program is able...
53.183824
246
0.711461
2119b9922a9607dccfad0c4d06e9389b2c63fa47
11,881
py
Python
adpkd_segmentation/utils/losses.py
Florassss/adpkd-segmentation-pytorch
ce06bcf9a5028836255d5845fd9017d6828d6bf7
[ "MIT" ]
5
2021-07-09T16:10:56.000Z
2022-03-23T10:22:16.000Z
adpkd_segmentation/utils/losses.py
Florassss/adpkd-segmentation-pytorch
ce06bcf9a5028836255d5845fd9017d6828d6bf7
[ "MIT" ]
3
2021-06-23T02:47:42.000Z
2022-02-04T22:43:27.000Z
adpkd_segmentation/utils/losses.py
Florassss/adpkd-segmentation-pytorch
ce06bcf9a5028836255d5845fd9017d6828d6bf7
[ "MIT" ]
2
2021-06-05T22:19:29.000Z
2022-03-13T20:50:13.000Z
"""Loss utilities and definitions""" # %% import torch import torch.nn as nn import torch.nn.functional as F from adpkd_segmentation.data.data_utils import ( KIDNEY_PIXELS, STUDY_TKV, VOXEL_VOLUME, ) # %% def binarize_thresholds(pred, thresholds=[0.5]): """ Args: pred: model pred tensor ...
31.183727
79
0.616699
2119d56fb52b6b455c8057314e0b13dbd3fed101
2,103
py
Python
reo/migrations/0113_auto_20210430_1833.py
NREL/REopt_API
fbc70f3b0cdeec9ee220266d6b3b0c5d64f257a6
[ "BSD-3-Clause" ]
7
2022-01-29T12:10:10.000Z
2022-03-28T13:45:20.000Z
reo/migrations/0113_auto_20210430_1833.py
NREL/reopt_api
fbc70f3b0cdeec9ee220266d6b3b0c5d64f257a6
[ "BSD-3-Clause" ]
12
2022-02-01T18:23:18.000Z
2022-03-31T17:22:17.000Z
reo/migrations/0113_auto_20210430_1833.py
NREL/REopt_API
fbc70f3b0cdeec9ee220266d6b3b0c5d64f257a6
[ "BSD-3-Clause" ]
3
2022-02-08T19:44:40.000Z
2022-03-12T11:05:36.000Z
# Generated by Django 3.1.7 on 2021-04-30 18:33 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('reo', '0112_auto_20210427_2116'), ] operations = [ migrations.RenameField( model_name='financialmodel', old_name='total_dist...
31.863636
65
0.611032
2119d5f2323a5b6a641aa9d257a0fcc75638ceca
21,224
py
Python
rosetta/text/vw_helpers.py
rafacarrascosa/rosetta
d5a964756b4f51e1032df40ee24f18398e3193b7
[ "BSD-3-Clause" ]
1
2015-01-21T06:00:46.000Z
2015-01-21T06:00:46.000Z
rosetta/text/vw_helpers.py
rafacarrascosa/rosetta
d5a964756b4f51e1032df40ee24f18398e3193b7
[ "BSD-3-Clause" ]
null
null
null
rosetta/text/vw_helpers.py
rafacarrascosa/rosetta
d5a964756b4f51e1032df40ee24f18398e3193b7
[ "BSD-3-Clause" ]
null
null
null
""" Wrappers to help with Vowpal Wabbit (VW). """ import sys from collections import Counter import pandas as pd import numpy as np from scipy.special import gammaln, digamma, psi # gamma function utils from . import text_processors from ..common import smart_open, TokenError from ..common_math import series_to_fram...
35.255814
95
0.60441
211a15da9b4c339672b9ab09790d51a237f49fc1
3,351
py
Python
temboardagent/plugins/monitoring/inventory.py
tilkow/temboard-agent
b8bf296454db68a85996f49fb6c684d57efa028a
[ "PostgreSQL" ]
null
null
null
temboardagent/plugins/monitoring/inventory.py
tilkow/temboard-agent
b8bf296454db68a85996f49fb6c684d57efa028a
[ "PostgreSQL" ]
null
null
null
temboardagent/plugins/monitoring/inventory.py
tilkow/temboard-agent
b8bf296454db68a85996f49fb6c684d57efa028a
[ "PostgreSQL" ]
null
null
null
""" The inventory contains support functions to discover the features of the host (ex: OS, CPU info, MemInfo) Currently, only Linux is supported. """ import os import logging import pwd from ...postgres import Postgres from ...inventory import ( SysInfo, PgInfo, ) def host_info(hostname_cfg): """Gather...
32.852941
78
0.59236
211a18608c241ea212b1a5e91cf418668fc9880e
1,001
py
Python
src/oscar/apps/dashboard/users/tables.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
src/oscar/apps/dashboard/users/tables.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
src/oscar/apps/dashboard/users/tables.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
from django_tables2 import A, Column, LinkColumn, TemplateColumn from oscar.core.loading import get_class DashboardTable = get_class('dashboard.tables', 'DashboardTable') class UserTable(DashboardTable): check = TemplateColumn( template_name='dashboard/users/user_row_checkbox.html', ve...
35.75
66
0.666334
211a2368843cc1f331be4d49b19dcbe11ed024df
10,313
py
Python
packages/pdf/src/RPA/PDF/keywords/finder.py
pavelee/rpaframework
30bf09eb7a3bb3b22f596690791013e0ff2f7b73
[ "Apache-2.0" ]
1
2021-09-12T15:19:14.000Z
2021-09-12T15:19:14.000Z
packages/pdf/src/RPA/PDF/keywords/finder.py
pavelee/rpaframework
30bf09eb7a3bb3b22f596690791013e0ff2f7b73
[ "Apache-2.0" ]
null
null
null
packages/pdf/src/RPA/PDF/keywords/finder.py
pavelee/rpaframework
30bf09eb7a3bb3b22f596690791013e0ff2f7b73
[ "Apache-2.0" ]
null
null
null
import math import re from typing import ( List, Union, ) from RPA.PDF.keywords import ( LibraryContext, keyword, ) from RPA.PDF.keywords.model import TextBox class TargetObject: """Container for Target text box""" boxid: int bbox: tuple text: str class FinderKeywords(LibraryConte...
33.702614
87
0.543683
211a578c4df3fcf1dd0ac6a289be11439271380e
8,090
py
Python
airiam/Reporter.py
metahertz/AirIAM
212f84e1b1a51c7a614384f91b220e7f2a57a079
[ "Apache-2.0" ]
1
2020-08-07T18:55:42.000Z
2020-08-07T18:55:42.000Z
airiam/Reporter.py
rckasa/AirIAM
5a99dc25354c1bc6525dbaf25a3afcd472f71b2f
[ "Apache-2.0" ]
null
null
null
airiam/Reporter.py
rckasa/AirIAM
5a99dc25354c1bc6525dbaf25a3afcd472f71b2f
[ "Apache-2.0" ]
null
null
null
import time from enum import Enum from colorama import init from termcolor import colored from airiam.banner import banner from airiam.models import RuntimeReport from airiam.version import version init(autoreset=True) class OutputFormat(Enum): cli = 'CLI' class Reporter: @staticmethod def report_unu...
51.528662
154
0.614833
211a6143c883b1cc8ebab011be78898b07d03ab6
5,849
py
Python
Python/data_loader.py
JTBridge/ME-COVID19
b453455eab94797e1f405dd20d219ddfbd4064d2
[ "Apache-2.0" ]
null
null
null
Python/data_loader.py
JTBridge/ME-COVID19
b453455eab94797e1f405dd20d219ddfbd4064d2
[ "Apache-2.0" ]
null
null
null
Python/data_loader.py
JTBridge/ME-COVID19
b453455eab94797e1f405dd20d219ddfbd4064d2
[ "Apache-2.0" ]
null
null
null
''' Data loader. Please cite: Development and External Validation of a Mixed-Effects Deep Learning Model to Diagnose COVID-19 from CT Imaging Joshua Bridge, Yanda Meng, Wenyue Zhu, Thomas Fitzmaurice, Caroline McCann, Cliff Addison, Manhui Wang, Cristin Merritt, Stu Franks, Maria Mackey, Steve Messenger, Renrong Sun...
34.815476
111
0.566935
211a691b5d7ba8b2a515cda970deee1870c86efe
26,715
py
Python
Lib/site-packages/wx-3.0-msw/wx/tools/XRCed/plugins/core.py
jickieduan/python27
c752b552396bbed68d8555080d475718cea2edd0
[ "bzip2-1.0.6" ]
5
2019-03-11T14:30:31.000Z
2021-12-04T14:11:54.000Z
Lib/site-packages/wx-3.0-msw/wx/tools/XRCed/plugins/core.py
jickieduan/python27
c752b552396bbed68d8555080d475718cea2edd0
[ "bzip2-1.0.6" ]
1
2018-07-28T20:07:04.000Z
2018-07-30T18:28:34.000Z
Lib/site-packages/wx-3.0-msw/wx/tools/XRCed/plugins/core.py
jickieduan/python27
c752b552396bbed68d8555080d475718cea2edd0
[ "bzip2-1.0.6" ]
2
2019-12-02T01:39:10.000Z
2021-02-13T22:41:00.000Z
# Name: core.py # Purpose: Core components # Author: Roman Rolinsky <rolinsky@femagsoft.com> # Created: 31.05.2007 # RCS-ID: $Id: core.py 71860 2012-06-25 15:46:16Z ROL $ import wx from wx.tools.XRCed import component, images, attribute, params, view from wx.tools.XRCed.globals import TRA...
43.939145
119
0.656785
211a73e985a0bb2467631b91fc334ea6043ac743
6,873
py
Python
data/level/level1051.py
levelupai/match3-level-similarity
cc9b28b8741b41bea1273c8bc9b4d265d79a1dca
[ "Apache-2.0" ]
null
null
null
data/level/level1051.py
levelupai/match3-level-similarity
cc9b28b8741b41bea1273c8bc9b4d265d79a1dca
[ "Apache-2.0" ]
6
2020-07-04T02:53:08.000Z
2022-03-11T23:53:14.000Z
data/level/level1051.py
levelupai/match3-level-similarity
cc9b28b8741b41bea1273c8bc9b4d265d79a1dca
[ "Apache-2.0" ]
3
2019-12-31T11:42:59.000Z
2021-03-28T20:06:13.000Z
data = { 'level_index': 1051, 'move_count': 25, 'board_info': { (0, 0): { 'prev': (-1, 0), 'next': (1, 0), 'fall_point': (-1, 0), 'base': (2, 1) }, (0, 1): { 'prev': (-1, 0), 'next': (1, 0), 'fall_poi...
22.608553
34
0.191474
211a85e88b3642ac9d0245cea3f6a708fa0e4739
5,795
py
Python
post-process/PythonScripts/diag_VOICE_XVx.py
gyselax/gyselalibxx
5f9b4b1e20050f87e2a9f05d510bedf0f9a15b34
[ "MIT" ]
3
2022-02-28T08:47:07.000Z
2022-03-01T10:29:08.000Z
post-process/PythonScripts/diag_VOICE_XVx.py
gyselax/gyselalibxx
5f9b4b1e20050f87e2a9f05d510bedf0f9a15b34
[ "MIT" ]
null
null
null
post-process/PythonScripts/diag_VOICE_XVx.py
gyselax/gyselalibxx
5f9b4b1e20050f87e2a9f05d510bedf0f9a15b34
[ "MIT" ]
null
null
null
# SPDX-License-Identifier: MIT """ File for analysing VOICEXX results Usage : python ../post-process/PythonScripts/diag_VOICE_XVx.py python ../post-process/PythonScripts/diag_VOICE_XVx.py --dir . --save python ../post-process/PythonScripts/diag_VOICE_XVx.py --dir . --no-save """ import sys from argparse import...
38.633333
98
0.59327
211a8da557b74541d2a3c5ffa0fecb9d527704c5
8,727
py
Python
tutorials/tutorial_satellitetrack.py
aravindm711/MSS
128687ec036d445656a70ff4b82c3cb7586715e4
[ "Apache-2.0" ]
33
2020-12-04T04:29:28.000Z
2022-03-05T17:11:49.000Z
tutorials/tutorial_satellitetrack.py
aravindm711/MSS
128687ec036d445656a70ff4b82c3cb7586715e4
[ "Apache-2.0" ]
614
2020-12-06T16:54:44.000Z
2022-03-31T07:41:02.000Z
tutorials/tutorial_satellitetrack.py
aravindm711/MSS
128687ec036d445656a70ff4b82c3cb7586715e4
[ "Apache-2.0" ]
51
2020-12-04T15:10:46.000Z
2022-03-20T02:02:11.000Z
""" mss.tutorials.tutorial_satellitetrack ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This python script generates an automatic demonstration of how to work with remote sensing tool in topview. This file is part of mss. :copyright: Copyright 2021 Hrithik Kumar Verma :copyright: Copyright 2021 by the...
33.694981
111
0.603873
211afad1c78fbed4da495e3f56d6ffea175e6fe6
1,005
py
Python
apps/publications/admin.py
remocrevo/celus
682b13168eb475d7f970502113e756e40a899877
[ "MIT" ]
null
null
null
apps/publications/admin.py
remocrevo/celus
682b13168eb475d7f970502113e756e40a899877
[ "MIT" ]
null
null
null
apps/publications/admin.py
remocrevo/celus
682b13168eb475d7f970502113e756e40a899877
[ "MIT" ]
null
null
null
from django.contrib import admin from modeltranslation.admin import TranslationAdmin from . import models @admin.register(models.Platform) class PlatformAdmin(TranslationAdmin): list_display = ['short_name', 'name', 'provider', 'url'] ordering = ['short_name'] search_fields = ['short_name', 'name', 'pro...
28.714286
84
0.722388
211b168b1c08c0f05cde1192c123e43d5c979ce0
2,704
py
Python
tests/models/validators/v2_1_2/jsd_709769624bf988d5.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
tests/models/validators/v2_1_2/jsd_709769624bf988d5.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
tests/models/validators/v2_1_2/jsd_709769624bf988d5.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """DNA Center Create Wireless Profile data model. Copyright (c) 2019-2020 Cisco and/or its affiliates. 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,...
32.578313
78
0.598373
211b392287bd720f22203ca75c999e1154dd76c6
330
py
Python
top/__init__.py
0phoff/topcraft
d1dde9e151e0a5693c4a2231c5b11170d9664817
[ "MIT" ]
null
null
null
top/__init__.py
0phoff/topcraft
d1dde9e151e0a5693c4a2231c5b11170d9664817
[ "MIT" ]
null
null
null
top/__init__.py
0phoff/topcraft
d1dde9e151e0a5693c4a2231c5b11170d9664817
[ "MIT" ]
null
null
null
# Expose to root from ._gc import * del _gc from ._log import * del _log from ._memory import * del _memory from ._profile import * del _profile from ._time import * del _time # Export submodule from . import _meta as meta # Miniver stuff # https://github.com/jbweston/miniver from ._version import __version__ del...
13.75
37
0.751515
211b6e67add070e54a9dfca07cf7484fb30bc805
5,367
py
Python
codes/projects/screened_poisson_linear_2d/utils_project/plot_and_save_metrics.py
hwangoh/uq-vae
382548e6f6dd7f9d72feff0e0752beec871db348
[ "MIT" ]
2
2021-07-28T16:47:18.000Z
2021-08-03T00:53:58.000Z
codes/projects/test_discrete_parameter/utils_project/plot_and_save_metrics.py
HwanGoh/uq-vae
24a3d26987e2ec807d57601b14c68b22f3652a18
[ "MIT" ]
null
null
null
codes/projects/test_discrete_parameter/utils_project/plot_and_save_metrics.py
HwanGoh/uq-vae
24a3d26987e2ec807d57601b14c68b22f3652a18
[ "MIT" ]
2
2021-09-29T08:31:46.000Z
2021-11-07T10:26:45.000Z
""" Created on Sun Nov 17 11:47:02 2019 @author: hwan """ import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.ioff() # Turn interactive plotting off ############################################################################### # Plot Metrics ...
38.891304
86
0.6376
211b8678e2fd542d8e0fc004df891d27d3974d9e
25,424
py
Python
Amplo/AutoML/Documenter.py
Amplo-GmbH/AutoML
eb6cc83b6e4a3ddc7c3553e9c41d236e8b48c606
[ "MIT" ]
5
2022-01-07T13:34:37.000Z
2022-03-17T06:40:28.000Z
Amplo/AutoML/Documenter.py
Amplo-GmbH/AutoML
eb6cc83b6e4a3ddc7c3553e9c41d236e8b48c606
[ "MIT" ]
5
2022-03-22T13:42:22.000Z
2022-03-31T16:20:44.000Z
Amplo/AutoML/Documenter.py
Amplo-GmbH/AutoML
eb6cc83b6e4a3ddc7c3553e9c41d236e8b48c606
[ "MIT" ]
1
2021-12-17T22:41:11.000Z
2021-12-17T22:41:11.000Z
import os import copy import math import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn import metrics from sklearn.metrics import auc from sklearn.metrics import plot_roc_curve from sklearn.model_selection import KFold from sklearn.model_selection import StratifiedKFold from sklearn.ensem...
44.839506
322
0.56899
211bad231054dc753e78b0d72eca9a20cfbfd2b7
8,590
py
Python
knowledge/models.py
mariusionescu/django-knowledge
8ffe8cc02e3144deb488dcf1f111afea0c14fec8
[ "ISC" ]
null
null
null
knowledge/models.py
mariusionescu/django-knowledge
8ffe8cc02e3144deb488dcf1f111afea0c14fec8
[ "ISC" ]
null
null
null
knowledge/models.py
mariusionescu/django-knowledge
8ffe8cc02e3144deb488dcf1f111afea0c14fec8
[ "ISC" ]
null
null
null
import django from django.urls import reverse from django.conf import settings as django_settings from django.db import models from django.utils.translation import ugettext_lazy as _ from knowledge import settings from knowledge.managers import QuestionManager, ResponseManager from knowledge.signals import knowledge_p...
28.922559
120
0.589523
211bec66ef3eb53b084ed69160202d7c096ae36a
1,704
py
Python
simulations_folder/simulation_analysis_scripts/read_config.py
SIGKDD2021ANON/PaperCodeBandits
bf1c3a6cf2de2dc81228bedb97c5aa3657cebebd
[ "Apache-2.0" ]
null
null
null
simulations_folder/simulation_analysis_scripts/read_config.py
SIGKDD2021ANON/PaperCodeBandits
bf1c3a6cf2de2dc81228bedb97c5aa3657cebebd
[ "Apache-2.0" ]
null
null
null
simulations_folder/simulation_analysis_scripts/read_config.py
SIGKDD2021ANON/PaperCodeBandits
bf1c3a6cf2de2dc81228bedb97c5aa3657cebebd
[ "Apache-2.0" ]
null
null
null
''' Created on Aug 2, 2018 @author: rafferty ''' import json MAX_WEIGHT_HEADER = "max_weight" SAVE_MODIFIED_ACTIONS_FILE_HEADER = "save_modified_actions_file" MATCH_NUM_SAMPLES_HEADER = "match_num_samples" SMOOTHING_ADDER_HEADER = "smoothing_adder" NUM_EXPECTATION_SAMPLES_HEADER = "num_expectation_samples" NUM_PERMUT...
33.411765
64
0.732981
211bf643a2fd8b7675d88a2121b105b67918b9d8
1,749
py
Python
setup.py
HubBucket-Team/tibanna
ef90a0217243071791d50e35fbdfe67ceef5a219
[ "MIT" ]
1
2019-05-01T03:44:01.000Z
2019-05-01T03:44:01.000Z
setup.py
VonRosenchild/tibanna
ef90a0217243071791d50e35fbdfe67ceef5a219
[ "MIT" ]
null
null
null
setup.py
VonRosenchild/tibanna
ef90a0217243071791d50e35fbdfe67ceef5a219
[ "MIT" ]
1
2019-05-01T03:44:02.000Z
2019-05-01T03:44:02.000Z
import os from setuptools import setup # variables used in buildout here = os.path.abspath(os.path.dirname(__file__)) try: README = open(os.path.join(here, 'README.md')).read() except: pass # don't know why this fails with tox # for the time being, use the UNICORN (non-4DN) requirements when # installing via...
34.294118
78
0.682676
211c09b4cc318f35d93db1858cbd8403ed6f7202
1,254
py
Python
server/routes/protein.py
chejennifer/website
b7589f1fa288e0e4e12cd97a6bbbcb9f3fd3d833
[ "Apache-2.0" ]
11
2020-07-18T17:04:26.000Z
2022-03-23T08:44:09.000Z
server/routes/protein.py
chejennifer/website
b7589f1fa288e0e4e12cd97a6bbbcb9f3fd3d833
[ "Apache-2.0" ]
747
2020-06-22T16:56:45.000Z
2022-03-31T19:04:55.000Z
server/routes/protein.py
chejennifer/website
b7589f1fa288e0e4e12cd97a6bbbcb9f3fd3d833
[ "Apache-2.0" ]
33
2019-09-25T21:26:12.000Z
2022-03-23T08:27:33.000Z
# Copyright 2021 Google LLC # # 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, ...
30.585366
80
0.724083
211c683a6465796762be688870938a62b37299c2
4,215
py
Python
Cogs/DJRoles.py
Dids/CorpBot.py
a9d81f49183334e3a11c0e41fae7a16ed9c2aded
[ "MIT" ]
null
null
null
Cogs/DJRoles.py
Dids/CorpBot.py
a9d81f49183334e3a11c0e41fae7a16ed9c2aded
[ "MIT" ]
null
null
null
Cogs/DJRoles.py
Dids/CorpBot.py
a9d81f49183334e3a11c0e41fae7a16ed9c2aded
[ "MIT" ]
null
null
null
import asyncio, discord from operator import itemgetter from discord.ext import commands from Cogs import Utils, DisplayName def setup(bot): # Add the bot and deps settings = bot.get_cog("Settings") bot.add_cog(DJRoles(bot, settings)) class DJRoles(commands.Cog): # Init with the bot reference, ...
41.323529
160
0.672598
211c723938f7f93171dcb90a32d4bde94ebcf520
4,909
py
Python
cifar10/resnet.py
git-disl/HQ-Ensemble
c588f2979476e50efd429c9d9d5bb2f854b9ad41
[ "Apache-2.0" ]
1
2022-03-13T17:43:55.000Z
2022-03-13T17:43:55.000Z
cifar10/resnet.py
git-disl/HQ-Ensemble
c588f2979476e50efd429c9d9d5bb2f854b9ad41
[ "Apache-2.0" ]
null
null
null
cifar10/resnet.py
git-disl/HQ-Ensemble
c588f2979476e50efd429c9d9d5bb2f854b9ad41
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import torch.nn as nn import math __all__ = ['resnet'] def conv3x3(in_planes, out_planes, stride=1): "3x3 convolution with padding" return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False) class BasicBlock(nn.M...
30.68125
116
0.568751
211c7ab57521eb24268d084bb767af8617cd05dd
5,677
py
Python
rafComputing/ML/snippets/MLdriver_more_graphs_prediction.py
raresraf/rafMetrics
21eb5e8210364bf70eee746d71c45f3e353dcb10
[ "MIT" ]
15
2019-11-03T18:01:27.000Z
2021-05-05T20:54:57.000Z
rafComputing/ML/snippets/MLdriver_more_graphs_prediction.py
raresraf/rafMetrics
21eb5e8210364bf70eee746d71c45f3e353dcb10
[ "MIT" ]
392
2019-11-09T21:28:01.000Z
2022-03-31T13:04:45.000Z
rafComputing/ML/snippets/MLdriver_more_graphs_prediction.py
raresraf/rafMetrics
21eb5e8210364bf70eee746d71c45f3e353dcb10
[ "MIT" ]
1
2021-03-11T18:35:16.000Z
2021-03-11T18:35:16.000Z
import matplotlib.pyplot as plt import sys from sklearn.metrics import mean_squared_error, r2_score from rafComputing.ML.CustomSettings.settings import ( MAX_ITER, ALPHA, MAX_ITER_LinearRegressionTraining, ALPHA_LinearRegressionTraining, AUTO_DRIVER_DEFAULT_OUTPUT_NAME, ) from rafComputing.ML.Regre...
35.26087
357
0.688568
211c9c3c2228d64aa6f2ee599f91ff819bc718b1
1,188
py
Python
clients/client/python/test/test_project.py
sproutfi/sdk
5340b37d7b3e8f3c1b8f4c0c16ede05488498620
[ "Apache-2.0" ]
null
null
null
clients/client/python/test/test_project.py
sproutfi/sdk
5340b37d7b3e8f3c1b8f4c0c16ede05488498620
[ "Apache-2.0" ]
null
null
null
clients/client/python/test/test_project.py
sproutfi/sdk
5340b37d7b3e8f3c1b8f4c0c16ede05488498620
[ "Apache-2.0" ]
null
null
null
""" Ory APIs Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501 The version of the OpenAPI document: v0.0.1-alpha.71 Contact: support@ory.sh Generated by: htt...
27.627907
194
0.73569
211cf149ab007dbba0bd9878b736161626fd8ecb
3,232
py
Python
Project 2/catalog_database.py
Cristianasp/full_stack_web_developer
db366e3aa7b76ce214a6600e2ab170aeb863b4de
[ "MIT" ]
null
null
null
Project 2/catalog_database.py
Cristianasp/full_stack_web_developer
db366e3aa7b76ce214a6600e2ab170aeb863b4de
[ "MIT" ]
null
null
null
Project 2/catalog_database.py
Cristianasp/full_stack_web_developer
db366e3aa7b76ce214a6600e2ab170aeb863b4de
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' Udacity Nanodegree FullStack Web developer Project Item Catalog Author: Cristiana Parada Database creation and related classes ''' ############################################################################### from sqlalchemy import Column, ForeignKey, Integer, String, DateTim...
34.382979
80
0.539913
211cfd20f460a08c601436b1ba6074d5c9f44ef2
11,654
py
Python
src/test/tests/databases/ProteinDataBank.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/test/tests/databases/ProteinDataBank.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/test/tests/databases/ProteinDataBank.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: ProteinDataBank.py # # Tests: mesh - 3D points # plots - Molecule # # Programmer: Brad Whitlock # Date: Tue Mar 28 15:46:53 PST 2006 # # Modifications: # Jeremy Mer...
31.928767
103
0.671014
211cfdc382e80d9406e504b43885855dc3457cba
6,145
py
Python
scripts/scrub-allura-data.py
shalithasuranga/allura
4f7fba13415954d07f602a051ec697329dd3706b
[ "Apache-2.0" ]
1
2017-07-31T23:13:58.000Z
2017-07-31T23:13:58.000Z
scripts/scrub-allura-data.py
DalavanCloud/allura
a25329caed9e6d136a1004c33372e0632a16e352
[ "Apache-2.0" ]
null
null
null
scripts/scrub-allura-data.py
DalavanCloud/allura
a25329caed9e6d136a1004c33372e0632a16e352
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (t...
39.140127
116
0.575102
211d3cdf12f85387ed4c792d4f56591806792ce8
5,160
py
Python
asposewordscloud/models/requests/get_custom_xml_part_online_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
14
2018-07-15T17:01:52.000Z
2018-11-29T06:15:33.000Z
asposewordscloud/models/requests/get_custom_xml_part_online_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
1
2018-09-28T12:59:34.000Z
2019-10-08T08:42:59.000Z
asposewordscloud/models/requests/get_custom_xml_part_online_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
2
2020-12-21T07:59:17.000Z
2022-02-16T21:41:25.000Z
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="get_custom_xml_part_online_request.py"> # Copyright (c) 2021 Aspose.Words for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtai...
46.071429
167
0.66376
211db21373b3900bde076e4354561f9d7120968e
9,637
py
Python
markdown/extensions/codehilite.py
msabramo/Python-Markdown
4cac4ff6095c7b7c0b319f16afb7df349ea93ac8
[ "BSD-3-Clause" ]
null
null
null
markdown/extensions/codehilite.py
msabramo/Python-Markdown
4cac4ff6095c7b7c0b319f16afb7df349ea93ac8
[ "BSD-3-Clause" ]
null
null
null
markdown/extensions/codehilite.py
msabramo/Python-Markdown
4cac4ff6095c7b7c0b319f16afb7df349ea93ac8
[ "BSD-3-Clause" ]
null
null
null
""" CodeHilite Extension for Python-Markdown ======================================== Adds code/syntax highlighting to standard Python-Markdown code blocks. See <https://pythonhosted.org/Markdown/extensions/code_hilite.html> for documentation. Original code Copyright 2006-2008 [Waylan Limberg](http://achinghead.com/...
36.503788
79
0.537823
211dbded7ec74b17aefafaa9fc7cd47a5110ed1d
3,109
py
Python
Tools/scons/scons-local/SCons/Variables/BoolVariable.py
Syeberman/nohtyP
59d7214a5a5474a03c54f45d79ad4fd037989a79
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Tools/scons/scons-local/SCons/Variables/BoolVariable.py
Syeberman/nohtyP
59d7214a5a5474a03c54f45d79ad4fd037989a79
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Tools/scons/scons-local/SCons/Variables/BoolVariable.py
Syeberman/nohtyP
59d7214a5a5474a03c54f45d79ad4fd037989a79
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
"""engine.SCons.Variables.BoolVariable This file defines the option type for SCons implementing true/false values. Usage example:: opts = Variables() opts.Add(BoolVariable('embedded', 'build for an embedded system', 0)) ... if env['embedded'] == 1: ... """ # # Copyright (c) 2001 - ...
34.544444
85
0.679961
211dc694fb4a5fad117d9852d63066677bb60e31
25,609
py
Python
pred.py
vzg100/ProtienFolding
ca9588ac3ce822608474b983ce1d395417ad9f40
[ "MIT" ]
2
2017-07-16T14:47:29.000Z
2018-02-18T03:56:43.000Z
pred.py
vzg100/ProtienFolding
ca9588ac3ce822608474b983ce1d395417ad9f40
[ "MIT" ]
null
null
null
pred.py
vzg100/ProtienFolding
ca9588ac3ce822608474b983ce1d395417ad9f40
[ "MIT" ]
null
null
null
def warn(*args, **kwargs): #Mutes Sklearn warnings pass from sklearn.ensemble import RandomForestClassifier import pandas as pd from Bio.SeqUtils.ProtParam import ProteinAnalysis import random from random import randint import numpy as np from sklearn.neural_network import MLPClassifier from sklearn import svm from...
40.329134
175
0.571284
211dcd6348fc98789a249a436f76564cace49e6d
49,586
py
Python
characters.py
rick3rt/escp2-client
ba41e904f106e4e327cd475b9a9a0fd53d9cee80
[ "MIT" ]
5
2019-07-31T02:08:42.000Z
2021-04-29T14:48:40.000Z
characters.py
rick3rt/escp2-client
ba41e904f106e4e327cd475b9a9a0fd53d9cee80
[ "MIT" ]
null
null
null
characters.py
rick3rt/escp2-client
ba41e904f106e4e327cd475b9a9a0fd53d9cee80
[ "MIT" ]
2
2019-08-25T04:08:43.000Z
2019-10-08T18:49:16.000Z
## ==== IMPORT SCRIPTS ==== import binascii from hex_functions import * from esc_functions import * def createPs(x,r=b'\x00', size=1): dy = 0 dx = (dy+1)*(1/120) hor = 5760 list1 = createnozzlelistsp(29,[1,2,3,4,5]) list2 = createnozzlelistsp(29,[1,3]) list3 = createnozzlelistsp(29,[1,2,3]) m =...
82.505824
279
0.379139
211dd77f31570874f0383b8448698ffd732d0f73
4,788
py
Python
sunpy/util/tests/test_config.py
johan12345/sunpy
56e1ab0c2c992f99e0fe3e6bff468b731a51228c
[ "BSD-2-Clause" ]
2
2020-01-03T16:39:28.000Z
2020-04-24T15:12:08.000Z
sunpy/util/tests/test_config.py
johan12345/sunpy
56e1ab0c2c992f99e0fe3e6bff468b731a51228c
[ "BSD-2-Clause" ]
1
2020-05-11T13:38:56.000Z
2020-05-11T13:38:56.000Z
sunpy/util/tests/test_config.py
johan12345/sunpy
56e1ab0c2c992f99e0fe3e6bff468b731a51228c
[ "BSD-2-Clause" ]
null
null
null
import io import os from pathlib import Path from contextlib import redirect_stdout import pytest import sunpy from sunpy import config from sunpy.util import SunpyUserWarning from sunpy.util.config import ( CONFIG_DIR, _find_config_files, _get_user_configdir, _is_writable_dir, copy_default_config...
32.794521
93
0.724937
211de1e9fd381988e1c045f3d0f83ec1838387d4
13,695
py
Python
colossalai/nn/layer/parallel_2d/_vit.py
rahulgupta9202/ColossalAI
993088d45eaa032e39cf5959df2a506f0663bc2e
[ "Apache-2.0" ]
1
2021-11-02T14:00:27.000Z
2021-11-02T14:00:27.000Z
colossalai/nn/layer/parallel_2d/_vit.py
rahulgupta9202/ColossalAI
993088d45eaa032e39cf5959df2a506f0663bc2e
[ "Apache-2.0" ]
null
null
null
colossalai/nn/layer/parallel_2d/_vit.py
rahulgupta9202/ColossalAI
993088d45eaa032e39cf5959df2a506f0663bc2e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- import math import torch from torch import nn as nn, Tensor, distributed as dist from colossalai.context import seed, ParallelMode from colossalai.core import global_context as gpc from colossalai.nn.layer._common_utils import divide, ACT2FN from colossalai.nn.layer.pa...
34.936224
102
0.638992
211e2073827a8b7729ddcf98299654f055424e6b
14,043
py
Python
kusanagi/utils/probls.py
tsetimmy/kusanagi
868b301b6064af7d21f0f716aa4390e402f2e2ec
[ "MIT" ]
22
2018-08-04T04:51:27.000Z
2021-11-03T14:22:16.000Z
kusanagi/utils/probls.py
tsetimmy/kusanagi
868b301b6064af7d21f0f716aa4390e402f2e2ec
[ "MIT" ]
1
2021-11-16T12:41:14.000Z
2021-11-16T12:41:14.000Z
kusanagi/utils/probls.py
tsetimmy/kusanagi
868b301b6064af7d21f0f716aa4390e402f2e2ec
[ "MIT" ]
7
2018-08-04T04:51:29.000Z
2021-07-17T07:26:04.000Z
import numpy as np import theano from kusanagi import utils from scipy.stats import mvn from scipy.special import erf from matplotlib import pyplot as plt class cubic_spline_gp(object): ''' Implements the cubic spline GP from the Mahsereci and Hennig NIPS 2015 paper Based on their MATLAB implementation ...
36.193299
139
0.581998
211e73c669e467389e5cce829ee8f57ab3b405fc
2,628
py
Python
src/geoBiosampleMinimiser.py
ENCODE-DCC/geo-submission
84f4adabd786b3e3ffadb4dfab5af7866100d32d
[ "MIT" ]
1
2021-03-13T11:32:32.000Z
2021-03-13T11:32:32.000Z
src/geoBiosampleMinimiser.py
ENCODE-DCC/geo-submission
84f4adabd786b3e3ffadb4dfab5af7866100d32d
[ "MIT" ]
null
null
null
src/geoBiosampleMinimiser.py
ENCODE-DCC/geo-submission
84f4adabd786b3e3ffadb4dfab5af7866100d32d
[ "MIT" ]
3
2016-04-08T20:25:48.000Z
2020-10-28T20:25:03.000Z
import requests, json, sys, geoMinimisationCommon HEADERS = {'accept': 'application/json'} def getKeyPair(path_to_key_pair_file, server_name): keysf = open(path_to_key_pair_file, 'r') keys_json_string = keysf.read() keysf.close() keys = json.loads(keys_json_string) key_dict = keys[server_name] ...
30.206897
88
0.770548
211e968b7d549af079a6fb84c28ce98a867c7703
3,942
py
Python
alipay/aop/api/request/AlipayEcoSignflowsCreateRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/request/AlipayEcoSignflowsCreateRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/request/AlipayEcoSignflowsCreateRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayEcoSignflowsCreateModel import AlipayEcoSignflowsCreateModel class AlipayEcoSignflowsCreateRequest(object): def __init__(...
27.186207
148
0.642314
211eb2f81d4d183bd587451cc7b802053cee76c3
10,532
py
Python
MetaheuristicOptimization/Assignment2/NQueensHC/HillClimbing.py
bhattacharjee/ml-assignments
631492b1f1aa1ace5365abfa7fec9c187e99d28a
[ "MIT" ]
null
null
null
MetaheuristicOptimization/Assignment2/NQueensHC/HillClimbing.py
bhattacharjee/ml-assignments
631492b1f1aa1ace5365abfa7fec9c187e99d28a
[ "MIT" ]
null
null
null
MetaheuristicOptimization/Assignment2/NQueensHC/HillClimbing.py
bhattacharjee/ml-assignments
631492b1f1aa1ace5365abfa7fec9c187e99d28a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import random from Queens import * import matplotlib.pyplot as plt import sys import time import argparse studentNum = 195734 random.seed(studentNum) g_random_seed_counter = 5 class HillClimbing: def __init__(self, _size, _maxIterations, _maxRestarts): self.bCost = 0 ...
47.872727
188
0.607007
211ebd6a0d9745203bbdd878380a9d0ecd219b1d
2,470
py
Python
2019/Python/Day_2/intcode_computer.py
airstandley/AdventofCode
86b7e289d67ba3ea31a78f4a4005253098f47254
[ "MIT" ]
null
null
null
2019/Python/Day_2/intcode_computer.py
airstandley/AdventofCode
86b7e289d67ba3ea31a78f4a4005253098f47254
[ "MIT" ]
null
null
null
2019/Python/Day_2/intcode_computer.py
airstandley/AdventofCode
86b7e289d67ba3ea31a78f4a4005253098f47254
[ "MIT" ]
null
null
null
import os import copy def get_program(filepath): # Load the comma separated intcode program from a file into memory (a list). with open(filepath) as f: incode = [int(v) for v in f.readline().split(",")] return incode class IntCodeComputer: @staticmethod def restore_state(program, noun, v...
32.077922
83
0.608907
211ed268322c8672f99a2345ff0f4df7ab5de7ad
14,548
py
Python
dvc/state.py
drorata/dvc
b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0
[ "Apache-2.0" ]
null
null
null
dvc/state.py
drorata/dvc
b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0
[ "Apache-2.0" ]
null
null
null
dvc/state.py
drorata/dvc
b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0
[ "Apache-2.0" ]
null
null
null
"""Manages state database used for checksum caching.""" from __future__ import unicode_literals import os import sqlite3 import logging from dvc.config import Config from dvc.utils import remove, current_timestamp, relpath, to_chunks from dvc.exceptions import DvcException from dvc.utils.fs import get_mtime_and_size...
31.353448
79
0.570181
211ee0ab198e59a4ac471567802c5be81244044c
5,294
py
Python
code/tests/unit/api/test_authorization.py
CiscoSecurity/tr-05-serverless-sumo-logic-log-management
f17a88b8ea19353b5666464389d97081e344cfd8
[ "MIT" ]
null
null
null
code/tests/unit/api/test_authorization.py
CiscoSecurity/tr-05-serverless-sumo-logic-log-management
f17a88b8ea19353b5666464389d97081e344cfd8
[ "MIT" ]
null
null
null
code/tests/unit/api/test_authorization.py
CiscoSecurity/tr-05-serverless-sumo-logic-log-management
f17a88b8ea19353b5666464389d97081e344cfd8
[ "MIT" ]
null
null
null
from unittest.mock import patch from http import HTTPStatus from pytest import fixture from requests.exceptions import InvalidURL, ConnectionError from tests.unit.api.utils import get_headers from tests.unit.payloads_for_tests import ( EXPECTED_RESPONSE_OF_JWKS_ENDPOINT, RESPONSE_OF_JWKS_ENDPOINT_WITH_WRONG_K...
29.411111
76
0.726105
211ee170b4e4ad77dd35086805f68df2168ee628
865
py
Python
ci/upload_package.py
coding-kitties/flask-swagger-generator
e3fa56f97e57f4d95231e5a0ef8c0bdeb54e7ae3
[ "MIT" ]
2
2021-09-02T09:54:58.000Z
2022-02-10T01:23:20.000Z
ci/upload_package.py
coding-kitties/flask-swagger-generator
e3fa56f97e57f4d95231e5a0ef8c0bdeb54e7ae3
[ "MIT" ]
3
2020-12-28T18:57:37.000Z
2021-07-25T11:14:32.000Z
ci/upload_package.py
coding-kitties/flask-swagger-generator
e3fa56f97e57f4d95231e5a0ef8c0bdeb54e7ae3
[ "MIT" ]
2
2021-09-02T09:55:04.000Z
2021-09-29T12:19:17.000Z
import os import shutil from yolk.pypi import CheeseShop PACKAGE_NAME = 'flask-swagger-generator' def get_latest_version_number(package_name): pkg, all_versions = CheeseShop().query_versions_pypi(package_name) if len(all_versions): return all_versions[0] return None if __name__ == "__main__": ...
26.212121
76
0.686705
211f02f116bfda37bb011e74d87c2ac730079583
2,048
py
Python
mi/dataset/driver/flort_dj/cspp/flort_dj_cspp_telemetered_driver.py
rmanoni/mi-dataset
c1012a0cd8f2ea075e008cdd1ab291ed54f44d43
[ "BSD-2-Clause" ]
null
null
null
mi/dataset/driver/flort_dj/cspp/flort_dj_cspp_telemetered_driver.py
rmanoni/mi-dataset
c1012a0cd8f2ea075e008cdd1ab291ed54f44d43
[ "BSD-2-Clause" ]
null
null
null
mi/dataset/driver/flort_dj/cspp/flort_dj_cspp_telemetered_driver.py
rmanoni/mi-dataset
c1012a0cd8f2ea075e008cdd1ab291ed54f44d43
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python """ @package mi.dataset.driver @file mi/dataset/driver/flort_dj/cspp/flort_dj_cspp_telemetered_driver.py @author Jeff Roy @brief Driver for the flort_dj_cspp instrument Release notes: Initial Release """ from mi.dataset.dataset_parser import DataSetDriverConfigKeys from mi.dataset.dataset_driv...
30.567164
101
0.745117
211f10dcc00a47baaf36527b7aa00df888c9c4c9
2,602
py
Python
defoe/nzpp/article.py
kallewesterling/defoe
d72af2f748fd4363a4718c93bb0b0284b8cb1f3e
[ "MIT" ]
2
2022-02-14T12:10:54.000Z
2022-02-14T12:35:44.000Z
defoe/nzpp/article.py
kallewesterling/defoe
d72af2f748fd4363a4718c93bb0b0284b8cb1f3e
[ "MIT" ]
17
2022-02-09T21:46:14.000Z
2022-02-25T14:55:09.000Z
defoe/nzpp/article.py
kallewesterling/defoe
d72af2f748fd4363a4718c93bb0b0284b8cb1f3e
[ "MIT" ]
1
2022-02-14T13:19:08.000Z
2022-02-14T13:19:08.000Z
""" Object model representation of an article in a New Zealand Papers Past newspaper represented as an XML document. """ from datetime import datetime class Article(object): """ Object model representation of an article in a New Zealand Papers Past newspaper represented as an XML document. """ d...
31.731707
75
0.623367
211f12b75342f89a7458bc020ed16adbbe20f042
40
py
Python
some_script.py
godontop/python-work
ea22e0df8b0b17605f5a434e556a388d1f75aa47
[ "MIT" ]
null
null
null
some_script.py
godontop/python-work
ea22e0df8b0b17605f5a434e556a388d1f75aa47
[ "MIT" ]
null
null
null
some_script.py
godontop/python-work
ea22e0df8b0b17605f5a434e556a388d1f75aa47
[ "MIT" ]
null
null
null
import sololearn sololearn.function()
8
20
0.8
211f16d0da815841f60717886371108c5b1b3abe
1,824
py
Python
osm/data_streams/active_learner/strategy/pool_based/variable_uncertainity.py
cjneetha/osm
cc391fbfee8c89a1f15257ea36e6bbc85bbea938
[ "MIT" ]
1
2018-06-12T09:11:34.000Z
2018-06-12T09:11:34.000Z
osm/data_streams/active_learner/strategy/pool_based/variable_uncertainity.py
cjneetha/osm
cc391fbfee8c89a1f15257ea36e6bbc85bbea938
[ "MIT" ]
null
null
null
osm/data_streams/active_learner/strategy/pool_based/variable_uncertainity.py
cjneetha/osm
cc391fbfee8c89a1f15257ea36e6bbc85bbea938
[ "MIT" ]
2
2018-10-22T12:32:02.000Z
2018-12-28T11:43:03.000Z
from osm.data_streams.active_learner.strategy.abstract_strategy import AbstractActiveLearningStrategy class VariableUncertainty(AbstractActiveLearningStrategy): def __init__(self, budget, oracle, target_col_name, measure='entropy', debug=True, step=0.01) -> None: """ Implements the fixed uncertain...
37.22449
106
0.656798
211f349668ad0c8a1f9db98ebb3037661061c0f9
10,935
py
Python
rfml/nbutils/plot.py
AlexeyReshetnyak/rfml
99ae3af822a037eb2757d6efadd25eb35a50c2b2
[ "BSD-3-Clause" ]
61
2019-11-19T03:53:54.000Z
2022-03-26T15:57:47.000Z
rfml/nbutils/plot.py
AlexeyReshetnyak/rfml
99ae3af822a037eb2757d6efadd25eb35a50c2b2
[ "BSD-3-Clause" ]
2
2020-12-08T10:07:21.000Z
2021-02-24T00:29:15.000Z
rfml/nbutils/plot.py
AlexeyReshetnyak/rfml
99ae3af822a037eb2757d6efadd25eb35a50c2b2
[ "BSD-3-Clause" ]
30
2019-12-03T13:43:22.000Z
2022-03-26T15:57:59.000Z
"""Plotting helpers to simplify the code flow of Jupyter notebooks. """ __author__ = "Bryse Flowers <brysef@vt.edu>" # External Includes from matplotlib.colors import Colormap from matplotlib.figure import Figure import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from typing i...
35.160772
93
0.587654
211f4801891b2322768cc5859c8dd27cd8869311
2,902
py
Python
angrmanagement/ui/dialogs/set_comment.py
mephi42/angr-management
be2ae29279f75b8c057fbad5af0d80d468852059
[ "BSD-2-Clause" ]
null
null
null
angrmanagement/ui/dialogs/set_comment.py
mephi42/angr-management
be2ae29279f75b8c057fbad5af0d80d468852059
[ "BSD-2-Clause" ]
null
null
null
angrmanagement/ui/dialogs/set_comment.py
mephi42/angr-management
be2ae29279f75b8c057fbad5af0d80d468852059
[ "BSD-2-Clause" ]
1
2022-02-04T06:12:32.000Z
2022-02-04T06:12:32.000Z
from PySide2.QtWidgets import QDialog, QVBoxLayout, QHBoxLayout, QLabel, QPushButton, QPlainTextEdit, QApplication from PySide2.QtCore import Qt class QCommentTextBox(QPlainTextEdit): def __init__(self, textchanged_callback=None, textconfirmed_callback=None, parent=None): super(QCommentTextBox, self).__in...
32.244444
114
0.684011
212001dadc03fda6d056e08d0cfc5bcf32d2d3dc
6,886
py
Python
mecano_navigation/src/A_star_class.py
carlitomm/mecano
fbcbc786d0c9f279e57503d9f26bc88c756e4d69
[ "MIT" ]
null
null
null
mecano_navigation/src/A_star_class.py
carlitomm/mecano
fbcbc786d0c9f279e57503d9f26bc88c756e4d69
[ "MIT" ]
null
null
null
mecano_navigation/src/A_star_class.py
carlitomm/mecano
fbcbc786d0c9f279e57503d9f26bc88c756e4d69
[ "MIT" ]
null
null
null
import rospy from std_msgs.msg import String from geometry_msgs.msg import Twist from nav_msgs.msg import OccupancyGrid import matplotlib.pyplot as plt import math import time class AStarPlanner: def __init__(self, ox, oy, reso, rr, show_animation): """ Initialize grid map for a star planning ...
32.328638
99
0.505664
21200c86123763b54c3be3f47f6df1ba733ae190
17,270
py
Python
src/opera/test/pge/test_base_pge.py
nasa/opera-sds-pge
8cb2142038e64042115f0f920ebbfdbd9171efb9
[ "Apache-2.0" ]
1
2022-02-16T23:24:31.000Z
2022-02-16T23:24:31.000Z
src/opera/test/pge/test_base_pge.py
nasa/opera-sds-pge
8cb2142038e64042115f0f920ebbfdbd9171efb9
[ "Apache-2.0" ]
53
2021-11-03T16:42:44.000Z
2022-03-30T20:28:57.000Z
src/opera/test/pge/test_base_pge.py
nasa/opera-sds-pge
8cb2142038e64042115f0f920ebbfdbd9171efb9
[ "Apache-2.0" ]
3
2021-12-04T20:51:16.000Z
2022-02-16T23:25:33.000Z
#!/usr/bin/env python3 """ ================= test_base_pge.py ================= Unit tests for the pge/base_pge.py module. """ import json import os import re import tempfile import unittest from io import StringIO from os.path import abspath, join from pathlib import Path from unittest.mock import patch from pkg_re...
40.350467
114
0.668848
212022a2f5b13791e3664a0bb39f2503b7f5296c
5,911
py
Python
train.py
sunkaikai/Covolution_over_Dependency_Tree_EMNLP2019
b364976cf5dd51d5cef7c2c3a447b6a59638f20f
[ "MIT" ]
13
2020-10-14T12:07:46.000Z
2022-03-04T02:57:14.000Z
train.py
sunkaikai/Covolution_over_Dependency_Tree_EMNLP2019
b364976cf5dd51d5cef7c2c3a447b6a59638f20f
[ "MIT" ]
null
null
null
train.py
sunkaikai/Covolution_over_Dependency_Tree_EMNLP2019
b364976cf5dd51d5cef7c2c3a447b6a59638f20f
[ "MIT" ]
2
2021-01-04T03:29:55.000Z
2021-04-14T10:02:33.000Z
import os import torch import random import argparse import pickle import numpy as np from utils import helper from shutil import copyfile from sklearn import metrics from loader import DataLoader from trainer import GCNTrainer parser = argparse.ArgumentParser() parser.add_argument('--dataset', type=str, default='Rest...
43.463235
135
0.695821
2120533f58087832e37fb88808abcc41a10f19d9
2,541
py
Python
think_python/assignment_9.py
bobrokerson/challenge
2ea8f9a1a5cd06ccb594feaad768a164fcbd6de4
[ "MIT" ]
null
null
null
think_python/assignment_9.py
bobrokerson/challenge
2ea8f9a1a5cd06ccb594feaad768a164fcbd6de4
[ "MIT" ]
null
null
null
think_python/assignment_9.py
bobrokerson/challenge
2ea8f9a1a5cd06ccb594feaad768a164fcbd6de4
[ "MIT" ]
null
null
null
# Write a program that reads words.txt and prints only the words with more than 20 # characters (not counting whitespace) fin = open('words.txt') for line in fin: word = line.strip() if len(word) > 20: print(word[0:20]) # Exercise 9.2. In 1939 Ernest Vincent Wright published a 50,000 word ...
28.233333
104
0.634396
21205e89fc63fdcbe6a7f20af90ea6e08f1b23a0
4,199
py
Python
mmgen/datasets/unpaired_image_dataset.py
StevenJokess/mmgeneration
e517edd8085efa6a1e221fab74719f88c3360f0d
[ "Apache-2.0" ]
null
null
null
mmgen/datasets/unpaired_image_dataset.py
StevenJokess/mmgeneration
e517edd8085efa6a1e221fab74719f88c3360f0d
[ "Apache-2.0" ]
null
null
null
mmgen/datasets/unpaired_image_dataset.py
StevenJokess/mmgeneration
e517edd8085efa6a1e221fab74719f88c3360f0d
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp from pathlib import Path import numpy as np from mmcv import scandir from torch.utils.data import Dataset from .builder import DATASETS from .pipelines import Compose IMG_EXTENSIONS = ('.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', ...
33.325397
78
0.61205
21205ee09ac2e639dfcdbe81731f952d47d89a31
4,289
py
Python
sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_validate_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-01-24T08:54:57.000Z
2022-01-24T08:54:57.000Z
sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_validate_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_validate_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
43.765306
133
0.702028
212073011a1b1a60fad0b85e7a25832c92377791
13,536
py
Python
salt/modules/rabbitmq.py
skrobul/salt
ef7fb71082cce7a9783e00b9c65062fefae09263
[ "Apache-2.0" ]
1
2018-02-03T17:30:56.000Z
2018-02-03T17:30:56.000Z
salt/modules/rabbitmq.py
skrobul/salt
ef7fb71082cce7a9783e00b9c65062fefae09263
[ "Apache-2.0" ]
null
null
null
salt/modules/rabbitmq.py
skrobul/salt
ef7fb71082cce7a9783e00b9c65062fefae09263
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Module to provide RabbitMQ compatibility to Salt. Todo: A lot, need to add cluster support, logging, and minion configuration data. ''' # Import salt libs import salt.utils from salt.utils import decorators # Import python libs import logging import random import string log = logging.getL...
22.673367
83
0.595228
212073db962d517a0497d41f1a66798fa00aeae6
21,894
py
Python
curtsies/window.py
toolforger/curtsies
7f86c07d95aa22b004db9acf8f787e1abf49b581
[ "MIT" ]
null
null
null
curtsies/window.py
toolforger/curtsies
7f86c07d95aa22b004db9acf8f787e1abf49b581
[ "MIT" ]
null
null
null
curtsies/window.py
toolforger/curtsies
7f86c07d95aa22b004db9acf8f787e1abf49b581
[ "MIT" ]
null
null
null
# All windows write only unicode to the terminal - # that's what blessings does, so we match it. from typing import ( Optional, Text, IO, Dict, Generic, TypeVar, Type, Tuple, Callable, Any, ByteString, cast, TextIO, Union, List, ) from types import Traceback...
37.554031
105
0.582854
2120820e38879597853fcb7e8c92587babc2f3ac
4,595
py
Python
sktime/transformations/panel/truncation.py
FedericoGarza/sktime
b21cdd81453abd34c72b42d4b2273b49d29eba30
[ "BSD-3-Clause" ]
null
null
null
sktime/transformations/panel/truncation.py
FedericoGarza/sktime
b21cdd81453abd34c72b42d4b2273b49d29eba30
[ "BSD-3-Clause" ]
null
null
null
sktime/transformations/panel/truncation.py
FedericoGarza/sktime
b21cdd81453abd34c72b42d4b2273b49d29eba30
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Truncation transformer - truncate unequal length panels to lower/upper bounds.""" import numpy as np import pandas as pd from sktime.transformations.base import BaseTransformer __all__ = ["TruncationTransformer"] __author__ = ["abostrom"] class TruncationTransformer(BaseTransformer): ...
34.037037
88
0.607835
21208a6fef42f90cbd86d695b475a6c2282acf0f
451
py
Python
pmaf/internal/_extensions/_cpython/_pmafc_extension/setup.py
mmtechslv/PhyloMAF
bab43dd4a4d2812951b1fdf4f1abb83edb79ea88
[ "BSD-3-Clause" ]
1
2021-07-02T06:24:17.000Z
2021-07-02T06:24:17.000Z
pmaf/internal/_extensions/_cpython/_pmafc_extension/setup.py
mmtechslv/PhyloMAF
bab43dd4a4d2812951b1fdf4f1abb83edb79ea88
[ "BSD-3-Clause" ]
1
2021-06-28T12:02:46.000Z
2021-06-28T12:02:46.000Z
pmaf/internal/_extensions/_cpython/_pmafc_extension/setup.py
mmtechslv/PhyloMAF
bab43dd4a4d2812951b1fdf4f1abb83edb79ea88
[ "BSD-3-Clause" ]
null
null
null
from distutils.core import setup, Extension from Cython.Build import cythonize ext_type = Extension("PMAFCEXT", sources=["./_source/c_parser.c", "./_source/c_hmerizer.c"]) setup(name="PMAFCEXT", description="Python interface for PhyloMAF C Extension.", au...
30.066667
63
0.640798
2120a41b7b4a67a758f7eaa4924fdfb4504517df
286
py
Python
included_dependencies/html2text/compat.py
davidferguson/FanFicUpload
dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2
[ "Apache-2.0" ]
1
2019-06-13T11:20:33.000Z
2019-06-13T11:20:33.000Z
included_dependencies/html2text/compat.py
davidferguson/FanFicUpload
dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2
[ "Apache-2.0" ]
null
null
null
included_dependencies/html2text/compat.py
davidferguson/FanFicUpload
dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2
[ "Apache-2.0" ]
null
null
null
import sys if sys.version_info[0] == 2: import htmlentitydefs import urlparse import HTMLParser import urllib else: import urllib.parse as urlparse import html.entities as htmlentitydefs import html.parser as HTMLParser import urllib.request as urllib
20.428571
42
0.734266
2120a43efe2068d007639f70f7e6e2bd72a6efcd
10,404
py
Python
recipes/recipe_modules/support_3pp/tests/full.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
recipes/recipe_modules/support_3pp/tests/full.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
recipes/recipe_modules/support_3pp/tests/full.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2018 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. from recipe_engine.recipe_api import Property DEPS = [ 'recipe_engine/buildbucket', 'recipe_engine/cipd', 'recipe_engine/file', 'recipe_engine/path'...
26.745501
79
0.557958
2120c29677c48347bd294ebf7bb3216492a3e5e8
6,578
py
Python
var/spack/repos/builtin/packages/ruby/package.py
BenWibking/spack
49b3b43a4a9375210b578635d9240875a5f3106b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
348
2015-12-30T04:05:54.000Z
2022-02-21T10:57:53.000Z
var/spack/repos/builtin/packages/ruby/package.py
BenWibking/spack
49b3b43a4a9375210b578635d9240875a5f3106b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
3,994
2015-12-09T09:43:00.000Z
2017-11-04T02:46:39.000Z
var/spack/repos/builtin/packages/ruby/package.py
flatironinstitute/spack
71a7b1b5fadbe16bcdb36fb679aa828cd7d83b02
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
359
2015-12-16T18:25:55.000Z
2017-11-02T14:51:13.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import re class Ruby(AutotoolsPackage): """A dynamic, open source programming language with a focus on simplicit...
44.147651
136
0.620705
2120d2368cf785688d5ed23d9866ecc0a68e9467
2,354
py
Python
TasksSolution/CodeFormatter(Java)/src/tokenizer/java_tokens.py
Pilipets/Metaprogramming
7659393bc504562b0f74c5a8cb5f4ffd39771e2f
[ "MIT" ]
null
null
null
TasksSolution/CodeFormatter(Java)/src/tokenizer/java_tokens.py
Pilipets/Metaprogramming
7659393bc504562b0f74c5a8cb5f4ffd39771e2f
[ "MIT" ]
2
2020-11-29T16:24:46.000Z
2020-12-14T19:11:02.000Z
TasksSolution/CodeFormatter(Java)/src/tokenizer/java_tokens.py
Pilipets/Metaprogramming
7659393bc504562b0f74c5a8cb5f4ffd39771e2f
[ "MIT" ]
null
null
null
from collections import namedtuple Position = namedtuple('Position', ['line', 'column']) class JavaToken(): def __init__(self, value, position=None): self.value, self.position = value, position def __str__(self): if not self.position: return '%s "%s"' % (self.__class__._...
35.134328
97
0.46559
2120e379b26c8bd4684de507595e989c910e8990
1,820
py
Python
annotation/qualification/update_qualification_test.py
vered1986/Chirps
f59dc487970d2dc0bf9a671b5df0aef6501cc892
[ "Apache-2.0" ]
42
2017-06-15T13:01:32.000Z
2021-09-13T05:45:51.000Z
annotation/qualification/update_qualification_test.py
suhasagg/Chirps
f59dc487970d2dc0bf9a671b5df0aef6501cc892
[ "Apache-2.0" ]
1
2020-01-22T18:51:36.000Z
2020-03-17T03:05:51.000Z
annotation/qualification/update_qualification_test.py
suhasagg/Chirps
f59dc487970d2dc0bf9a671b5df0aef6501cc892
[ "Apache-2.0" ]
4
2017-08-17T08:18:07.000Z
2020-10-01T00:12:10.000Z
import boto.mturk.connection as mt import boto.mturk.question as mt_q def main(): # Connect to MTurk ACCESS_ID ='[ACCESS_KEY]' SECRET_KEY = '[SECRET_KEY]' # HOST = 'mechanicalturk.sandbox.amazonaws.com' HOST = 'mechanicalturk.amazonaws.com' connection = mt.MTurkConnection(aws_access_key_id=A...
35
129
0.65989
21211421a5773d737d3d4d94d65ab0899b4048b9
1,377
py
Python
alipay/aop/api/domain/MakePriceExtParams.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/MakePriceExtParams.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/MakePriceExtParams.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class MakePriceExtParams(object): def __init__(self): self._ext_feature = None self._ext_info = None @property def ext_feature(self): return self._ext_feature @ext...
24.589286
73
0.586057
2121438040351cfe32f9ca5efe178a39beb8465d
3,035
py
Python
p3_collab-compet/p3_collaboration_and_competition_submission/agent.py
hogansung/deep-reinforcement-learning
5170ca42bdfdb16cc5c2b86c61bee304015a6254
[ "MIT" ]
null
null
null
p3_collab-compet/p3_collaboration_and_competition_submission/agent.py
hogansung/deep-reinforcement-learning
5170ca42bdfdb16cc5c2b86c61bee304015a6254
[ "MIT" ]
null
null
null
p3_collab-compet/p3_collaboration_and_competition_submission/agent.py
hogansung/deep-reinforcement-learning
5170ca42bdfdb16cc5c2b86c61bee304015a6254
[ "MIT" ]
null
null
null
import random import numpy as np import torch from torch import optim, nn from model import Actor, Critic from ounoise import OUNoise LR_ACTOR = 1e-4 LR_CRITIC = 1e-3 WEIGHT_DECAY = 0.0 class Agent: """An agent that interacts with the environment""" def __init__( self, num_agents: int, ...
30.656566
112
0.604942
2121446b3fde005fd228f7804fda24fb08695744
1,628
py
Python
tests/test_dataloader.py
chris4540/DT2119-Final-Project
a9e665d2fcc91442bcd80171fe557b09fcd71d00
[ "MIT" ]
1
2020-08-19T17:29:53.000Z
2020-08-19T17:29:53.000Z
tests/test_dataloader.py
chris4540/DT2119-Final-Project
a9e665d2fcc91442bcd80171fe557b09fcd71d00
[ "MIT" ]
null
null
null
tests/test_dataloader.py
chris4540/DT2119-Final-Project
a9e665d2fcc91442bcd80171fe557b09fcd71d00
[ "MIT" ]
null
null
null
from utils.dataloader import pad_seqs_to_batch from utils.dataloader import TIMITDataset from torch.utils.data import DataLoader from torch.nn.utils.rnn import pad_packed_sequence if __name__ == "__main__": # make data set print("==============================================") dataset = TIMITDataset(root=...
50.875
105
0.668305
212145b8f19bc79fc1a701c5730734819418557b
32
py
Python
btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/Odyssey/OdysseyWorldGestures/odyssey_world_gestures.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/Odyssey/OdysseyWorldGestures/odyssey_world_gestures.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/Odyssey/OdysseyWorldGestures/odyssey_world_gestures.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
class OdysseyWorldGestures: pass
32
32
0.90625
21214e496b215b907009673fbaa87a9013819c61
632
py
Python
client/verta/verta/_swagger/_public/modeldb/model/ModeldbLogProjectCodeVersionResponse.py
CaptEmulation/modeldb
78b10aca553e386554f9740db63466b1cf013a1a
[ "Apache-2.0" ]
835
2017-02-08T20:14:24.000Z
2020-03-12T17:37:49.000Z
client/verta/verta/_swagger/_public/modeldb/model/ModeldbLogProjectCodeVersionResponse.py
CaptEmulation/modeldb
78b10aca553e386554f9740db63466b1cf013a1a
[ "Apache-2.0" ]
651
2019-04-18T12:55:07.000Z
2022-03-31T23:45:09.000Z
client/verta/verta/_swagger/_public/modeldb/model/ModeldbLogProjectCodeVersionResponse.py
CaptEmulation/modeldb
78b10aca553e386554f9740db63466b1cf013a1a
[ "Apache-2.0" ]
170
2017-02-13T14:49:22.000Z
2020-02-19T17:59:12.000Z
# THIS FILE IS AUTO-GENERATED. DO NOT EDIT from verta._swagger.base_type import BaseType class ModeldbLogProjectCodeVersionResponse(BaseType): def __init__(self, project=None): required = { "project": False, } self.project = project for k, v in required.items(): if self[k] is None and v:...
25.28
62
0.688291
2121705339d1c81dcbdf980145b9e3d13ecbd7f2
2,880
py
Python
py_search/utils.py
ctonic/py_search
4635616e174dadba049c6a68799df7ea92d78c4c
[ "MIT" ]
4
2019-02-04T14:20:40.000Z
2021-02-08T21:25:03.000Z
py_search/utils.py
ctonic/py_search
4635616e174dadba049c6a68799df7ea92d78c4c
[ "MIT" ]
6
2016-07-10T20:01:20.000Z
2018-02-25T15:06:14.000Z
py_search/utils.py
ctonic/py_search
4635616e174dadba049c6a68799df7ea92d78c4c
[ "MIT" ]
3
2018-06-23T13:31:42.000Z
2021-06-17T11:23:02.000Z
""" Utilities for the py_search library. """ from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import from __future__ import division from tabulate import tabulate from random import uniform from functools import wraps from functools import partial import tim...
32.359551
79
0.577083
21217fdca14eabaa425903d5370731eb94fdeec6
10,449
py
Python
tensorflow/python/keras/models.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
71
2017-05-25T16:02:15.000Z
2021-06-09T16:08:08.000Z
tensorflow/python/keras/models.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
133
2017-04-26T16:49:49.000Z
2019-10-15T11:39:26.000Z
tensorflow/python/keras/models.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...
39.579545
80
0.67394
21218da5db58d5378a942749179a93ffeb4bf72c
16,389
py
Python
tests/test_api_encryption.py
Mastercard/client-encryption-python
d65a71ce2b9c81942a8334a24d9dbaa723a1d08e
[ "MIT" ]
16
2019-02-21T15:08:59.000Z
2021-10-03T13:04:28.000Z
tests/test_api_encryption.py
Mastercard/client-encryption-python
d65a71ce2b9c81942a8334a24d9dbaa723a1d08e
[ "MIT" ]
6
2019-06-10T12:10:54.000Z
2022-02-07T16:36:52.000Z
tests/test_api_encryption.py
Mastercard/client-encryption-python
d65a71ce2b9c81942a8334a24d9dbaa723a1d08e
[ "MIT" ]
6
2019-12-20T20:20:28.000Z
2022-02-10T05:33:23.000Z
import unittest from unittest.mock import patch, Mock import json from tests.utils.api_encryption_test_utils import MockApiClient, MockService, MockRestApiClient from tests import get_config_for_test, TEST_CONFIG import client_encryption.api_encryption as to_test class ApiEncryptionTest(unittest.TestCase): def s...
44.90137
380
0.678382
212194dd5f5c62f6f10f198af13604b01d051b48
1,645
py
Python
cubelang/stdlib/__init__.py
poletaevvlad/CubeLang
06f34e7204f4656589eb33c4afe660383704861f
[ "MIT" ]
1
2019-12-04T04:02:11.000Z
2019-12-04T04:02:11.000Z
cubelang/stdlib/__init__.py
poletaevvlad/CubeLang
06f34e7204f4656589eb33c4afe660383704861f
[ "MIT" ]
null
null
null
cubelang/stdlib/__init__.py
poletaevvlad/CubeLang
06f34e7204f4656589eb33c4afe660383704861f
[ "MIT" ]
null
null
null
from typing import Dict, Any, List, Callable from ..compiler.types import Type, Function, Bool from ..compiler.stack import Stack from ..execution.rt_function import RuntimeFunction class Library: def __init__(self): self.global_values: Dict[str, Type] = dict() self.exec_globals: Dict[str, Any] =...
33.571429
100
0.655927
2121b37b2041bc175fc7459f0524518ecb7aa20a
1,604
py
Python
mwe_discov_eval/measures/syntactic_fixedness.py
nicolaCirillo/mwe_discov_eval
36f544a802f68d7e274627d57a65531ff23c4c5e
[ "MIT" ]
null
null
null
mwe_discov_eval/measures/syntactic_fixedness.py
nicolaCirillo/mwe_discov_eval
36f544a802f68d7e274627d57a65531ff23c4c5e
[ "MIT" ]
null
null
null
mwe_discov_eval/measures/syntactic_fixedness.py
nicolaCirillo/mwe_discov_eval
36f544a802f68d7e274627d57a65531ff23c4c5e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Jan 9 11:18:59 2021 @author: nicol """ from collections import defaultdict import numpy as np from mwe_discov_eval import messages from .utils import MeasureCalculator, DatabaseManager class SynEntCalc(MeasureCalculator): def __init__(self): super().__init__(...
31.45098
70
0.601621
2121b9437f9330a849b27aa197a9b9f2ef251ddb
6,001
py
Python
terrascript/google/d.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/google/d.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/google/d.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/google/d.py # Automatically generated by tools/makecode.py () import warnings warnings.warn( "using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2 ) import terrascript class google_active_folder(terrascript.Data): pass class google_app_engine_default_service_account(ter...
16.396175
79
0.799367
21221516bb8877cb1d2212dd616b3b645a3a2d1d
259
py
Python
tasks.py
lsaffre/picsel
49a9667a554c2a4f5658545db21f3e81781db4c8
[ "BSD-2-Clause" ]
null
null
null
tasks.py
lsaffre/picsel
49a9667a554c2a4f5658545db21f3e81781db4c8
[ "BSD-2-Clause" ]
null
null
null
tasks.py
lsaffre/picsel
49a9667a554c2a4f5658545db21f3e81781db4c8
[ "BSD-2-Clause" ]
null
null
null
from atelier.invlib import setup_from_tasks ns = setup_from_tasks( globals(), # "picsel", blogref_url="http://luc.lino-framework.org", revision_control_system='git', # tolerate_sphinx_warnings=True, cleanable_files=['docs/api/picsel.*'])
28.777778
48
0.718147
21221f321f39516f8cf04202c2be1e458cc7520d
1,913
py
Python
aim/sdk/artifacts/metric_group.py
jamesj-jiao/aim
452380368f76ff441b2ff3a51029f4ad43a9d902
[ "MIT" ]
null
null
null
aim/sdk/artifacts/metric_group.py
jamesj-jiao/aim
452380368f76ff441b2ff3a51029f4ad43a9d902
[ "MIT" ]
null
null
null
aim/sdk/artifacts/metric_group.py
jamesj-jiao/aim
452380368f76ff441b2ff3a51029f4ad43a9d902
[ "MIT" ]
null
null
null
import json from abc import ABCMeta from typing import Any from aim.engine.utils import is_pytorch_optim from aim.sdk.artifacts.artifact import Artifact from aim.sdk.artifacts.record import Record class MetricGroup(Artifact): cat = ('metric_groups',) def __init__(self, name: str, value: Any, labels: list = ...
28.132353
72
0.56874
21222acad90d038ee04854cd60e3946016de94c8
1,385
py
Python
tests/test_platform_credentials.py
jain-aayush1123/here-location-services-python
11ad5ef8273b4f243c43bc00ebd470f725b980bc
[ "Apache-2.0" ]
16
2021-02-15T13:49:29.000Z
2022-03-29T10:34:43.000Z
tests/test_platform_credentials.py
jain-aayush1123/here-location-services-python
11ad5ef8273b4f243c43bc00ebd470f725b980bc
[ "Apache-2.0" ]
8
2021-02-27T18:40:46.000Z
2021-10-03T15:49:27.000Z
tests/test_platform_credentials.py
jain-aayush1123/here-location-services-python
11ad5ef8273b4f243c43bc00ebd470f725b980bc
[ "Apache-2.0" ]
11
2021-02-16T04:58:08.000Z
2022-02-21T20:51:55.000Z
# Copyright (C) 2019-2021 HERE Europe B.V. # SPDX-License-Identifier: Apache-2.0 """This module will test platform credentials.""" import tempfile from pathlib import Path import pytest from here_location_services.exceptions import ConfigException from here_location_services.platform.credentials import PlatformCrede...
40.735294
94
0.756679
212261957d362ca39f059dff11975be3ca206f53
314
py
Python
python_system/files/open_write_flush_close.py
SeanSyue/PythonReferences
103b2d6934a33e56a5d8fbb14d95282f572b3af7
[ "MIT" ]
null
null
null
python_system/files/open_write_flush_close.py
SeanSyue/PythonReferences
103b2d6934a33e56a5d8fbb14d95282f572b3af7
[ "MIT" ]
null
null
null
python_system/files/open_write_flush_close.py
SeanSyue/PythonReferences
103b2d6934a33e56a5d8fbb14d95282f572b3af7
[ "MIT" ]
null
null
null
conf_writer = open('Output.txt', mode='a', encoding='utf-8') conf_writer.write("something to write") conf_writer.flush() conf_writer.close() # -- Alternative expression: -- with open('Output.txt', mode='a', encoding='utf-8') as conf_writer: print("something to write", file=conf_writer, flush=True)
31.4
68
0.694268
21227e2e12b888b95ac2910842452a5da97ea6c6
414
py
Python
molpy/tests/test_util.py
dominiquesydow/molpy
a0a7b4fde5127a228a50397af9f705f38a28b873
[ "MIT" ]
null
null
null
molpy/tests/test_util.py
dominiquesydow/molpy
a0a7b4fde5127a228a50397af9f705f38a28b873
[ "MIT" ]
9
2020-02-12T10:57:27.000Z
2020-02-13T13:39:45.000Z
molpy/tests/test_util.py
dominiquesydow/molpy
a0a7b4fde5127a228a50397af9f705f38a28b873
[ "MIT" ]
null
null
null
import pytest import molpy @pytest.mark.parametrize("point1, point2, bench", [([0, 1], [0, 0], 1), ([0, 2], [0, 0], 2), ([2.236, 2.236], [0, 0], 3.162181)]) def test_distance(point1, point2, bench): assert molpy.util.distance(point1, point2) == pytest.approx(be...
25.875
92
0.55314
212289f6af7a91428377b25a3045eb3f0fa84aba
2,152
py
Python
sysinv/sysinv/sysinv/sysinv/helm/panko.py
starlingx-staging/stx-config
ccbf0392d1941e7cad6673f6351bd905a5a5d419
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/helm/panko.py
starlingx-staging/stx-config
ccbf0392d1941e7cad6673f6351bd905a5a5d419
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/helm/panko.py
starlingx-staging/stx-config
ccbf0392d1941e7cad6673f6351bd905a5a5d419
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2018 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # from sysinv.common import exception from sysinv.openstack.common import log as logging from sysinv.helm import common from sysinv.helm import openstack LOG = logging.getLogger(__name__) class PankoHelm(openstack.OpenstackBaseH...
29.888889
72
0.552045
21229e3cd9b986cca2d83a823d79a777045ef64e
1,710
py
Python
loggingBase.py
ninadkan/motionDetectStream
25447ef53266dc53bc2fce66452e29ae6de0bc9d
[ "MIT" ]
null
null
null
loggingBase.py
ninadkan/motionDetectStream
25447ef53266dc53bc2fce66452e29ae6de0bc9d
[ "MIT" ]
null
null
null
loggingBase.py
ninadkan/motionDetectStream
25447ef53266dc53bc2fce66452e29ae6de0bc9d
[ "MIT" ]
null
null
null
import logging import sys globalHandler = None globalLoggingLevel = logging.INFO def getGlobalHandler(): global globalHandler if (globalHandler == None): globalHandler = logging.StreamHandler(stream=sys.stdout) globalHandler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(...
26.307692
109
0.679532
2122bfc4ace98641f201aa8d179ad3e3b553c4c2
4,961
py
Python
test/integration/ggrc/services/test_query/test_archived.py
farcry4998/ggrc-core
c469039dabb55033c1b379850feb19e8dda2e2a1
[ "ECL-2.0", "Apache-2.0" ]
1
2019-01-04T10:55:14.000Z
2019-01-04T10:55:14.000Z
test/integration/ggrc/services/test_query/test_archived.py
farcry4998/ggrc-core
c469039dabb55033c1b379850feb19e8dda2e2a1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
test/integration/ggrc/services/test_query/test_archived.py
farcry4998/ggrc-core
c469039dabb55033c1b379850feb19e8dda2e2a1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (C) 2018 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for /query api endpoint.""" import ddt from ggrc.models import all_models from integration.ggrc import TestCase from integration.ggrc.api_helper import Api from integration.ggrc.models import fac...
36.748148
78
0.679903
21230a1f69aedfd77c05c1533c77c1b1102d651b
2,557
py
Python
asks/utils.py
Fuyukai/asks
261b4a710df8f599a0e07da39d30bed25db0db64
[ "MIT" ]
null
null
null
asks/utils.py
Fuyukai/asks
261b4a710df8f599a0e07da39d30bed25db0db64
[ "MIT" ]
null
null
null
asks/utils.py
Fuyukai/asks
261b4a710df8f599a0e07da39d30bed25db0db64
[ "MIT" ]
null
null
null
__all__ = ['get_netloc_port', 'requote_uri', 'timeout_manager'] import anyio from functools import wraps from urllib.parse import quote from .errors import RequestTimeout async def timeout_manager(timeout, coro, *args): try: async with anyio.fail_after(timeout): return await coro(*args) ...
29.390805
78
0.599922
212326f8a67a746dc527e246f98d82e0fa7f3512
3,398
py
Python
fabfile/flat.py
nprapps/commencement
3f8642225d1910807e6419e95fafd5e0f21fbbac
[ "MIT" ]
1
2015-01-16T14:14:48.000Z
2015-01-16T14:14:48.000Z
fabfile/flat.py
nprapps/commencement
3f8642225d1910807e6419e95fafd5e0f21fbbac
[ "MIT" ]
19
2015-06-22T18:54:54.000Z
2015-07-02T17:13:56.000Z
fabfile/flat.py
nprapps/commencement
3f8642225d1910807e6419e95fafd5e0f21fbbac
[ "MIT" ]
2
2015-07-03T22:36:58.000Z
2021-02-23T10:32:07.000Z
#!/usr/bin/env python import copy from cStringIO import StringIO from fnmatch import fnmatch import gzip import hashlib import mimetypes import os import boto from boto.s3.key import Key import app_config import utils GZIP_FILE_TYPES = ['.html', '.js', '.json', '.css', '.xml'] class FakeTime: def time(self): ...
25.938931
93
0.585933