hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
78828049aba38b64bd6be75f136de208bad3519a
3,750
py
Python
src/TheLanguage/Grammars/v0_0_1/Statements/TypeAliasStatement.py
davidbrownell/DavidBrownell_TheLanguage
07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98
[ "BSL-1.0" ]
null
null
null
src/TheLanguage/Grammars/v0_0_1/Statements/TypeAliasStatement.py
davidbrownell/DavidBrownell_TheLanguage
07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98
[ "BSL-1.0" ]
null
null
null
src/TheLanguage/Grammars/v0_0_1/Statements/TypeAliasStatement.py
davidbrownell/DavidBrownell_TheLanguage
07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98
[ "BSL-1.0" ]
1
2021-06-18T18:58:57.000Z
2021-06-18T18:58:57.000Z
# ---------------------------------------------------------------------- # | # | TypeAliasStatement.py # | # | David Brownell <db@DavidBrownell.com> # | 2021-10-14 13:22:30 # | # ---------------------------------------------------------------------- # | # | Copyright David Brownell 2021 # | Distribut...
30.737705
82
0.436533
# ---------------------------------------------------------------------- # | # | TypeAliasStatement.py # | # | David Brownell <db@DavidBrownell.com> # | 2021-10-14 13:22:30 # | # ---------------------------------------------------------------------- # | # | Copyright David Brownell 2021 # | Distribut...
1,529
0
54
ca2f427df7f70436052f6a3dad6d5dd3ff36e62f
4,832
py
Python
Basics/E02_Elements/E20_UseBorders.py
freder/PageBotExamples
eb4ced53a673b9376e8357afa9ea0795b022b13c
[ "Ruby", "MIT" ]
5
2020-06-20T22:01:23.000Z
2021-08-06T04:39:50.000Z
Basics/E02_Elements/E20_UseBorders.py
freder/PageBotExamples
eb4ced53a673b9376e8357afa9ea0795b022b13c
[ "Ruby", "MIT" ]
5
2020-05-17T09:32:27.000Z
2021-03-15T19:45:52.000Z
Basics/E02_Elements/E20_UseBorders.py
freder/PageBotExamples
eb4ced53a673b9376e8357afa9ea0795b022b13c
[ "Ruby", "MIT" ]
2
2021-02-25T19:07:45.000Z
2022-01-09T21:14:06.000Z
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # # P A G E B O T E X A M P L E S # # www.pagebot.io # Licensed under MIT conditions # # ----------------------------------------------------------------------------- # # E20_U...
39.284553
108
0.614031
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # # P A G E B O T E X A M P L E S # # www.pagebot.io # Licensed under MIT conditions # # ----------------------------------------------------------------------------- # # E20_U...
0
0
0
87e1f1c93082000cf5ef0697c1149761ade4f004
127
py
Python
np/__init__.py
iyanmv/galois
a5e6386a684e3e0b47af608217002795dc25c702
[ "MIT" ]
65
2021-02-20T04:07:59.000Z
2022-03-13T10:14:58.000Z
np/__init__.py
iyanmv/galois
a5e6386a684e3e0b47af608217002795dc25c702
[ "MIT" ]
303
2021-02-22T19:36:25.000Z
2022-03-31T14:48:15.000Z
np/__init__.py
iyanmv/galois
a5e6386a684e3e0b47af608217002795dc25c702
[ "MIT" ]
9
2021-03-11T07:40:51.000Z
2022-03-06T20:13:17.000Z
from . import linalg from .advanced import * from .arithmetic import * from .functions import * from .linear_algebra import *
18.142857
29
0.76378
from . import linalg from .advanced import * from .arithmetic import * from .functions import * from .linear_algebra import *
0
0
0
429f28d16735e254ac0ce64ef367c5668302a233
1,104
py
Python
setup.py
Jaimedlrm/entropytriangle
46076aa6e9e06777df4dcf885cd951afdf1de168
[ "MIT" ]
2
2019-08-07T07:13:38.000Z
2019-08-07T07:13:41.000Z
setup.py
Jaimedlrm/entropytriangle
46076aa6e9e06777df4dcf885cd951afdf1de168
[ "MIT" ]
null
null
null
setup.py
Jaimedlrm/entropytriangle
46076aa6e9e06777df4dcf885cd951afdf1de168
[ "MIT" ]
1
2021-03-13T18:24:14.000Z
2021-03-13T18:24:14.000Z
from setuptools import setup,find_packages classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programmi...
29.837838
68
0.696558
from setuptools import setup,find_packages classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programmi...
0
0
0
56a1c891ca9f0be4f3c633acdb48c8f723bb7a30
20,138
py
Python
CPAC/pipeline/cpac_runner.py
danlurie/C-PAC
5ddc2d4fa71eb13728d6156f73cb6e7621dda69d
[ "BSD-3-Clause" ]
null
null
null
CPAC/pipeline/cpac_runner.py
danlurie/C-PAC
5ddc2d4fa71eb13728d6156f73cb6e7621dda69d
[ "BSD-3-Clause" ]
null
null
null
CPAC/pipeline/cpac_runner.py
danlurie/C-PAC
5ddc2d4fa71eb13728d6156f73cb6e7621dda69d
[ "BSD-3-Clause" ]
null
null
null
from multiprocessing import Process import os from CPAC.utils.utils import create_seeds_, create_group_log_template from CPAC.utils import Configuration import yaml import time from time import strftime
34.961806
376
0.5942
from multiprocessing import Process import os from CPAC.utils.utils import create_seeds_, create_group_log_template from CPAC.utils import Configuration import yaml import time from time import strftime def validate(config_obj): #check for path lengths working_dir = config_obj.workingDirectory ...
19,710
0
207
063699326fe17c0b5498a656ff0dc5e99dadd27d
841
py
Python
novice/03-03/kasus/app.py
blackjokie/praxis-academy
594d24fcf18cea4f76c9889030eba4aa3f834b7a
[ "MIT" ]
2
2019-08-11T16:58:04.000Z
2019-08-27T17:01:40.000Z
novice/03-03/kasus/app.py
blackjokie/praxis-academy
594d24fcf18cea4f76c9889030eba4aa3f834b7a
[ "MIT" ]
null
null
null
novice/03-03/kasus/app.py
blackjokie/praxis-academy
594d24fcf18cea4f76c9889030eba4aa3f834b7a
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request import pymysql as asu app = Flask(__name__) @app.route('/') if __name__ == '__main__': app.run(debug = True)
32.346154
154
0.62069
from flask import Flask, render_template, request import pymysql as asu app = Flask(__name__) @app.route('/') def list(): # Open database connection db = asu.connect("<hostname>","<username>","<password>","<db_name>") # prepare a cursor object using cursor() method cursor = db...
654
0
22
c5c6acefdfda2711c271d081ecd0efdbac1c3611
8,637
py
Python
lenspack/utils.py
sfarrens/lenspack
b7a8d6dfd8a1fd4d026a16c0f9f447964d3f0581
[ "MIT" ]
6
2019-11-06T15:51:52.000Z
2021-07-11T14:37:14.000Z
lenspack/utils.py
sfarrens/lenspack
b7a8d6dfd8a1fd4d026a16c0f9f447964d3f0581
[ "MIT" ]
1
2021-06-14T13:40:48.000Z
2021-06-14T13:40:48.000Z
lenspack/utils.py
sfarrens/lenspack
b7a8d6dfd8a1fd4d026a16c0f9f447964d3f0581
[ "MIT" ]
5
2019-11-14T15:32:46.000Z
2022-01-03T15:25:45.000Z
# -*- coding: utf-8 -*- """UTILS MODULE This module contains utility functions globally available to lenspack. """ import numpy as np from astropy.units.core import Unit from astropy.constants import G as G_newton from astropy.constants import c as c_light def round_up_to_odd(x): """Round up to the nearest od...
31.180505
79
0.555749
# -*- coding: utf-8 -*- """UTILS MODULE This module contains utility functions globally available to lenspack. """ import numpy as np from astropy.units.core import Unit from astropy.constants import G as G_newton from astropy.constants import c as c_light def round_up_to_odd(x): """Round up to the nearest od...
0
0
0
e02fae9ac7476c2c210c7b0dfbe9721cf2ee01de
4,450
py
Python
test/models/test_general.py
HansBug/pyspj
ed776cf7d2d1766ee4c2152221d1d3dbdd18d93a
[ "Apache-2.0" ]
null
null
null
test/models/test_general.py
HansBug/pyspj
ed776cf7d2d1766ee4c2152221d1d3dbdd18d93a
[ "Apache-2.0" ]
null
null
null
test/models/test_general.py
HansBug/pyspj
ed776cf7d2d1766ee4c2152221d1d3dbdd18d93a
[ "Apache-2.0" ]
null
null
null
import pytest from pyspj.models import load_result, SimpleSPJResult, ContinuitySPJResult, ResultType @pytest.mark.unittest
52.352941
114
0.644944
import pytest from pyspj.models import load_result, SimpleSPJResult, ContinuitySPJResult, ResultType @pytest.mark.unittest class TestModelsGeneral: def test_simple(self): result = SimpleSPJResult(True, '123', '12345') assert load_result(result) == result assert load_result(result.to_json(...
4,138
3
183
a4dfbe8bf3c713b2f61de253c0f1eb25783ea050
2,905
py
Python
rl_games/algos_torch/model_builder.py
yzqin/rl_games
6e09fec1e60d70c1dc1934ec65ed3265950a8c34
[ "MIT" ]
null
null
null
rl_games/algos_torch/model_builder.py
yzqin/rl_games
6e09fec1e60d70c1dc1934ec65ed3265950a8c34
[ "MIT" ]
null
null
null
rl_games/algos_torch/model_builder.py
yzqin/rl_games
6e09fec1e60d70c1dc1934ec65ed3265950a8c34
[ "MIT" ]
null
null
null
from rl_games.common import object_factory import rl_games.algos_torch from rl_games.algos_torch import network_builder, pn_network_builder from rl_games.algos_torch import models NETWORK_REGISTRY = {} MODEL_REGISTRY = {}
48.416667
118
0.687091
from rl_games.common import object_factory import rl_games.algos_torch from rl_games.algos_torch import network_builder, pn_network_builder from rl_games.algos_torch import models NETWORK_REGISTRY = {} MODEL_REGISTRY = {} def register_network(name, target_class): NETWORK_REGISTRY[name] = lambda **kwargs: target_c...
2,457
-2
225
0a0173adfbd6865ffe8cdcab826239cb84836335
3,408
py
Python
win/devkit/other/pymel/extras/completion/py/pymel/util/mathutils.py
leegoonz/Maya-devkit
b81fe799b58e854e4ef16435426d60446e975871
[ "ADSL" ]
10
2018-03-30T16:09:02.000Z
2021-12-07T07:29:19.000Z
win/devkit/other/pymel/extras/completion/py/pymel/util/mathutils.py
leegoonz/Maya-devkit
b81fe799b58e854e4ef16435426d60446e975871
[ "ADSL" ]
null
null
null
win/devkit/other/pymel/extras/completion/py/pymel/util/mathutils.py
leegoonz/Maya-devkit
b81fe799b58e854e4ef16435426d60446e975871
[ "ADSL" ]
9
2018-06-02T09:18:49.000Z
2021-12-20T09:24:35.000Z
import math from __builtin__ import round as _round def clamp(x=0.0, min=0.0, max=1.0): """ Clamps the value x between min and max :rtype: float """ pass def gamma(c, g): """ Gamma color correction of c with a single scalar gamma value g :rtype: float """ pass d...
21.167702
131
0.634977
import math from __builtin__ import round as _round def clamp(x=0.0, min=0.0, max=1.0): """ Clamps the value x between min and max :rtype: float """ pass def gamma(c, g): """ Gamma color correction of c with a single scalar gamma value g :rtype: float """ pass d...
0
0
0
17a103eeb3bd2216f66db043bd9af26af28e43b4
81
py
Python
app/reader.py
andreiavrammsd/newrelicpy
677f91024d1475dd90b5520e2c8f6f656b97cca1
[ "MIT" ]
1
2018-02-01T23:17:10.000Z
2018-02-01T23:17:10.000Z
app/reader.py
andreiavrammsd/py-newrelic
677f91024d1475dd90b5520e2c8f6f656b97cca1
[ "MIT" ]
null
null
null
app/reader.py
andreiavrammsd/py-newrelic
677f91024d1475dd90b5520e2c8f6f656b97cca1
[ "MIT" ]
null
null
null
import re
13.5
40
0.555556
import re def read(arg: str) -> list: return re.findall(r'([\d\.]+)', arg)
47
0
23
3a1d246ea8433f7464347db25ad117f762fbd461
2,238
py
Python
algorithms/dfs/optimal_account_balancing.py
kevinshenyang07/Data-Structure-and-Algo
36b02feea04b892f1256de090c4fcf7b6aa98873
[ "MIT" ]
null
null
null
algorithms/dfs/optimal_account_balancing.py
kevinshenyang07/Data-Structure-and-Algo
36b02feea04b892f1256de090c4fcf7b6aa98873
[ "MIT" ]
null
null
null
algorithms/dfs/optimal_account_balancing.py
kevinshenyang07/Data-Structure-and-Algo
36b02feea04b892f1256de090c4fcf7b6aa98873
[ "MIT" ]
null
null
null
# Optimal Account Balancing # given a list of transactions between a group of people, with each transaction # as a tuple (x, y, z), meaining person x send person y amount z of money # assume x != y and z > 0, id x and y might not be linear # return the minimum number of transactions required to settle the debt # Optima...
39.263158
79
0.550045
# Optimal Account Balancing # given a list of transactions between a group of people, with each transaction # as a tuple (x, y, z), meaining person x send person y amount z of money # assume x != y and z > 0, id x and y might not be linear # return the minimum number of transactions required to settle the debt # Optima...
712
880
22
dc770c3c12eb279da2f1f44d53d4f054d75e3568
1,664
py
Python
btemu/install.py
pedersen/nerfgun
136b2b1448eee3f6cc9e0cb88a31eb9cf321fe49
[ "MIT" ]
null
null
null
btemu/install.py
pedersen/nerfgun
136b2b1448eee3f6cc9e0cb88a31eb9cf321fe49
[ "MIT" ]
null
null
null
btemu/install.py
pedersen/nerfgun
136b2b1448eee3f6cc9e0cb88a31eb9cf321fe49
[ "MIT" ]
null
null
null
import logging import os import shutil from importlib.resources import read_text from subprocess import check_call import btemu.resources if __name__ == '__main__': main()
35.404255
113
0.623798
import logging import os import shutil from importlib.resources import read_text from subprocess import check_call import btemu.resources def write_resource(fname, resource_module, resource_name): logging.info(f'(Re)Creating {fname}') data = read_text(resource_module, resource_name) f = open(fname, 'w') ...
1,437
0
46
983480b5218ad736d2b4e7dba40780990a35cd85
22,652
py
Python
uliweb/contrib/jsonql/__init__.py
timgates42/uliweb
80c0459c5e5d257b665eb2e1d0b5f68ad55c42f1
[ "BSD-2-Clause" ]
202
2015-01-12T08:10:48.000Z
2021-11-08T09:04:32.000Z
uliweb/contrib/jsonql/__init__.py
timgates42/uliweb
80c0459c5e5d257b665eb2e1d0b5f68ad55c42f1
[ "BSD-2-Clause" ]
30
2015-01-01T09:07:17.000Z
2021-06-03T12:58:45.000Z
uliweb/contrib/jsonql/__init__.py
timgates42/uliweb
80c0459c5e5d257b665eb2e1d0b5f68ad55c42f1
[ "BSD-2-Clause" ]
58
2015-01-12T03:28:54.000Z
2022-01-14T01:58:08.000Z
#coding=utf8 from uliweb import settings from uliweb.utils.common import safe_str, import_attr from uliweb.utils.storage import Storage from uliweb.orm import do_, get_model from uliweb.utils.sorteddict import SortedDict from sqlalchemy import __version__ as sa_version, select, true, text, literal import logging DEBU...
33.360825
136
0.50181
#coding=utf8 from uliweb import settings from uliweb.utils.common import safe_str, import_attr from uliweb.utils.storage import Storage from uliweb.orm import do_, get_model from uliweb.utils.sorteddict import SortedDict from sqlalchemy import __version__ as sa_version, select, true, text, literal import logging DEBU...
12,993
8,540
323
c3a1eff16ee4d748fa6ad17642207484a4f9e3b0
8,317
py
Python
Bayesian-HM-DenseED/test_BayesianNN_UP.py
zabaras/bayesmultiscale
c2f7d36e8ff08a28e5da0809029143a9dd0e2777
[ "MIT" ]
null
null
null
Bayesian-HM-DenseED/test_BayesianNN_UP.py
zabaras/bayesmultiscale
c2f7d36e8ff08a28e5da0809029143a9dd0e2777
[ "MIT" ]
null
null
null
Bayesian-HM-DenseED/test_BayesianNN_UP.py
zabaras/bayesmultiscale
c2f7d36e8ff08a28e5da0809029143a9dd0e2777
[ "MIT" ]
1
2021-09-20T16:25:43.000Z
2021-09-20T16:25:43.000Z
""" Stein Variational Gradient Descent for Deep ConvNet on GPU. Current implementation is mainly using for-loops over model instances. """ import torch import numpy as np from time import time from args import args, device import h5py import os from models.model_det import DenseED from models.Bayesian_model_NN import ...
37.129464
165
0.625105
""" Stein Variational Gradient Descent for Deep ConvNet on GPU. Current implementation is mainly using for-loops over model instances. """ import torch import numpy as np from time import time from args import args, device import h5py import os from models.model_det import DenseED from models.Bayesian_model_NN import ...
3,659
0
68
9cd182a154ad67bc80a62c610648170da0218fab
47,302
py
Python
src/action_handlers/manage_bill_handler.py
ZAFW/whopaybot
a2d51de69223efc10ae09f0a70962b8397a5dd93
[ "MIT" ]
null
null
null
src/action_handlers/manage_bill_handler.py
ZAFW/whopaybot
a2d51de69223efc10ae09f0a70962b8397a5dd93
[ "MIT" ]
null
null
null
src/action_handlers/manage_bill_handler.py
ZAFW/whopaybot
a2d51de69223efc10ae09f0a70962b8397a5dd93
[ "MIT" ]
null
null
null
from action_handlers.action_handler import ActionHandler, Action from telegram.inlinekeyboardmarkup import InlineKeyboardMarkup from telegram.inlinekeyboardbutton import InlineKeyboardButton from telegram.ext import Filters from telegram.parsemode import ParseMode from telegram.error import BadRequest import constants ...
35.998478
239
0.586571
from action_handlers.action_handler import ActionHandler, Action from telegram.inlinekeyboardmarkup import InlineKeyboardMarkup from telegram.inlinekeyboardbutton import InlineKeyboardButton from telegram.ext import Filters from telegram.parsemode import ParseMode from telegram.error import BadRequest import constants ...
41,564
3,116
567
df422463a9f784dc2d6e065bfa91ba5deeaf0dbc
4,031
py
Python
tests/zoomus/components/webinar/test_register.py
karthikkommindala1995/zoomus
bf994aee5656c88a4f53e78fe8fb80c39fd737db
[ "Apache-2.0" ]
1
2019-11-05T06:02:20.000Z
2019-11-05T06:02:20.000Z
tests/zoomus/components/webinar/test_register.py
karthikkommindala1995/zoomus
bf994aee5656c88a4f53e78fe8fb80c39fd737db
[ "Apache-2.0" ]
null
null
null
tests/zoomus/components/webinar/test_register.py
karthikkommindala1995/zoomus
bf994aee5656c88a4f53e78fe8fb80c39fd737db
[ "Apache-2.0" ]
null
null
null
from datetime import datetime import unittest from mock import patch from zoomus import components def suite(): """Define all the tests of the module.""" suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(RegisterV1TestCase)) return suite if __name__ == '__main__': unittest.main()...
31.248062
83
0.574051
from datetime import datetime import unittest from mock import patch from zoomus import components def suite(): """Define all the tests of the module.""" suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(RegisterV1TestCase)) return suite class RegisterV1TestCase(unittest.TestCase): ...
3,015
649
46
cd5586552672028e366947fc3fccefd5d49c0394
10,942
py
Python
finctrl/__init__.py
aspyatkin/finctrl
df0b787065c7cff612a9bdfd0fed09880b73c571
[ "MIT" ]
null
null
null
finctrl/__init__.py
aspyatkin/finctrl
df0b787065c7cff612a9bdfd0fed09880b73c571
[ "MIT" ]
null
null
null
finctrl/__init__.py
aspyatkin/finctrl
df0b787065c7cff612a9bdfd0fed09880b73c571
[ "MIT" ]
null
null
null
from peewee import ( SqliteDatabase, Model, CharField, ForeignKeyField, DateField, DecimalField, DateTimeField, IntegerField, TextField ) import os import click from datetime import date, datetime, timedelta from decimal import Decimal from enum import IntEnum db = SqliteDatabase(o...
34.087227
200
0.677847
from peewee import ( SqliteDatabase, Model, CharField, ForeignKeyField, DateField, DecimalField, DateTimeField, IntegerField, TextField ) import os import click from datetime import date, datetime, timedelta from decimal import Decimal from enum import IntEnum db = SqliteDatabase(o...
6,773
778
490
46ade8070326db43ba877e4374ad5f10191c390f
2,429
py
Python
2021/2021-12-15.py
wac-/advent-of-code
19022fe5660b30125cd99054565b70edbf3a06a0
[ "BSD-3-Clause" ]
null
null
null
2021/2021-12-15.py
wac-/advent-of-code
19022fe5660b30125cd99054565b70edbf3a06a0
[ "BSD-3-Clause" ]
null
null
null
2021/2021-12-15.py
wac-/advent-of-code
19022fe5660b30125cd99054565b70edbf3a06a0
[ "BSD-3-Clause" ]
null
null
null
from queue import PriorityQueue Coordinate = tuple[int, int] map: list[list[int]] = [] PART_TWO = True # For each position, we store the lowest cost path to get there. lowest_cost: list[list[None | tuple[int, list[Coordinate]]]] = [] with open('2021-12-15.txt') as f: for line in (l.strip() for l in f): ...
32.386667
84
0.592425
from queue import PriorityQueue Coordinate = tuple[int, int] map: list[list[int]] = [] PART_TWO = True # For each position, we store the lowest cost path to get there. lowest_cost: list[list[None | tuple[int, list[Coordinate]]]] = [] with open('2021-12-15.txt') as f: for line in (l.strip() for l in f): ...
0
0
0
46b39cd3db3a390bf009f581a466407f58a570f1
6,446
py
Python
clusterlogs/training_corpus.py
micolocco/ClusterLog
d5cdf48288e943d77271f675958a535eb7dfe38d
[ "MIT" ]
1
2021-02-16T17:23:26.000Z
2021-02-16T17:23:26.000Z
clusterlogs/training_corpus.py
micolocco/ClusterLog
d5cdf48288e943d77271f675958a535eb7dfe38d
[ "MIT" ]
null
null
null
clusterlogs/training_corpus.py
micolocco/ClusterLog
d5cdf48288e943d77271f675958a535eb7dfe38d
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys import getopt from gensim.models import Word2Vec import pprint from time import time from pyonmttok import Tokenizer #from smart_open import open import json from pyspark.sql import DataFrame from pyspark.sql.types import StructType, StructField, StringType,ArrayType from pyspark.sql.functi...
36.625
175
0.607198
#!/usr/bin/python import sys import getopt from gensim.models import Word2Vec import pprint from time import time from pyonmttok import Tokenizer #from smart_open import open import json from pyspark.sql import DataFrame from pyspark.sql.types import StructType, StructField, StringType,ArrayType from pyspark.sql.functi...
3,737
1,369
182
16d7bc475bce333c6dadc5fa01d18582b63193f4
2,185
py
Python
Z - Tool Box/x2john/vmx2john.py
dfirpaul/Active-Directory-Exploitation-Cheat-Sheet-1
1dcf54522e9d20711ff1114550dc2893ed3e9ed0
[ "MIT" ]
1,290
2020-05-28T21:24:43.000Z
2022-03-31T16:38:43.000Z
Z - Tool Box/x2john/vmx2john.py
asim06/Active-Directory-Exploitation-Cheat-Sheet
708f57c83aa99d80df22f4e50f21479a709fb359
[ "MIT" ]
1
2020-07-03T21:14:52.000Z
2020-07-03T21:14:52.000Z
Z - Tool Box/x2john/vmx2john.py
asim06/Active-Directory-Exploitation-Cheat-Sheet
708f57c83aa99d80df22f4e50f21479a709fb359
[ "MIT" ]
280
2020-05-29T17:28:38.000Z
2022-03-31T13:54:15.000Z
#!/usr/bin/env python # This software is Copyright (c) 2019 - Dhiru Kholia, Copyright (c) 2018 - # axcheron, and it is hereby released under the MIT License. # # Key parts of this program are borrowed from the pyvmx-cracker project. # # See https://github.com/axcheron/pyvmx-cracker for details. import os import re im...
29.133333
96
0.62746
#!/usr/bin/env python # This software is Copyright (c) 2019 - Dhiru Kholia, Copyright (c) 2018 - # axcheron, and it is hereby released under the MIT License. # # Key parts of this program are borrowed from the pyvmx-cracker project. # # See https://github.com/axcheron/pyvmx-cracker for details. import os import re im...
1,442
0
23
49bd426fc80af0986b4a0f58db16c4dc8d4bd457
2,981
py
Python
pytorch_image_classification/optim/__init__.py
doulemint/pytorch_image_classification
3553295218b30775272027b8234bb8a2276af30f
[ "MIT" ]
1
2021-08-25T03:07:48.000Z
2021-08-25T03:07:48.000Z
pytorch_image_classification/optim/__init__.py
doulemint/pytorch_image_classification
3553295218b30775272027b8234bb8a2276af30f
[ "MIT" ]
null
null
null
pytorch_image_classification/optim/__init__.py
doulemint/pytorch_image_classification
3553295218b30775272027b8234bb8a2276af30f
[ "MIT" ]
null
null
null
import torch from .adabound import AdaBound, AdaBoundW from .lars import LARSOptimizer
41.402778
77
0.497149
import torch from .adabound import AdaBound, AdaBoundW from .lars import LARSOptimizer def get_param_list(config, model): if config.train.no_weight_decay_on_bn: param_list = [] for name, params in model.named_parameters(): if 'conv.weight' in name: param_list.append({ ...
2,845
0
46
48ffb26072679d98b02cf4a876329ab8e109cd27
10,551
py
Python
examples/ewallet_example.py
jlodonia/xendit-python
d1148f6d736fee17e22a1432d337a94538505595
[ "MIT" ]
10
2020-10-31T23:34:34.000Z
2022-03-08T19:08:55.000Z
examples/ewallet_example.py
jlodonia/xendit-python
d1148f6d736fee17e22a1432d337a94538505595
[ "MIT" ]
22
2020-07-30T14:25:07.000Z
2022-03-31T03:55:46.000Z
examples/ewallet_example.py
jlodonia/xendit-python
d1148f6d736fee17e22a1432d337a94538505595
[ "MIT" ]
11
2020-07-28T08:09:40.000Z
2022-03-18T00:14:02.000Z
from print_running_function import print_running_function import time # Hackish method to import from another directory # Useful while xendit-python isn't released yet to the public import importlib.machinery loader = importlib.machinery.SourceFileLoader("xendit", "../xendit/__init__.py") xendit = loader.load_module...
33.709265
88
0.598711
from print_running_function import print_running_function import time # Hackish method to import from another directory # Useful while xendit-python isn't released yet to the public import importlib.machinery loader = importlib.machinery.SourceFileLoader("xendit", "../xendit/__init__.py") xendit = loader.load_module...
9,224
756
230
912ab713f612a5d3afa5649cae094ada2ef4d441
664
py
Python
Django/e-commerce-website/store/urls.py
piaochung/blog
3fc518c6b681e070e46dffaf64fae1086423a5e6
[ "MIT" ]
null
null
null
Django/e-commerce-website/store/urls.py
piaochung/blog
3fc518c6b681e070e46dffaf64fae1086423a5e6
[ "MIT" ]
null
null
null
Django/e-commerce-website/store/urls.py
piaochung/blog
3fc518c6b681e070e46dffaf64fae1086423a5e6
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('category/<int:category_slug>/', views.store, name='products_by_category'), path('category/<int:category_slug>/<int:subcategory_slug>/', views.store, name='products_by_subcategory'), path('category/<int:category_slug>/<...
33.2
84
0.680723
from django.urls import path from . import views urlpatterns = [ path('category/<int:category_slug>/', views.store, name='products_by_category'), path('category/<int:category_slug>/<int:subcategory_slug>/', views.store, name='products_by_subcategory'), path('category/<int:category_slug>/<...
0
0
0
6ad9b47cec7a5fd0dfb6b60edcd5a979be228713
1,620
py
Python
project_automation/commands/typescript.py
Guigui14460/project-automation
98f9b73be2000b0ecb07b1cca758693c29032947
[ "Apache-2.0" ]
null
null
null
project_automation/commands/typescript.py
Guigui14460/project-automation
98f9b73be2000b0ecb07b1cca758693c29032947
[ "Apache-2.0" ]
2
2021-01-17T16:04:03.000Z
2021-08-13T13:00:49.000Z
project_automation/commands/typescript.py
Guigui14460/project-automation
98f9b73be2000b0ecb07b1cca758693c29032947
[ "Apache-2.0" ]
null
null
null
from typing import NoReturn from .command_program import CommandProgram from .utils import WindowsInstallationPackage, MacOSInstallationPackage, GNULinuxDistributionInstallationPackage class TypescriptCommand(CommandProgram): """ Command to verify if ``tsc`` command is recognized by the operating system. ...
40.5
135
0.680864
from typing import NoReturn from .command_program import CommandProgram from .utils import WindowsInstallationPackage, MacOSInstallationPackage, GNULinuxDistributionInstallationPackage class TypescriptCommand(CommandProgram): """ Command to verify if ``tsc`` command is recognized by the operating system. ...
0
0
0
d7db3bf9e380d300103425108f9bd77a08df6a4a
12,741
py
Python
fastNLP/modules/decoder/CRF.py
YanLiqi/fastNLP
a8c45796158a3b8dbc81e22412bd6e4e4b97539a
[ "Apache-2.0" ]
4
2019-01-19T13:58:10.000Z
2019-01-19T15:07:48.000Z
fastNLP/modules/decoder/CRF.py
YanLiqi/fastNLP
a8c45796158a3b8dbc81e22412bd6e4e4b97539a
[ "Apache-2.0" ]
null
null
null
fastNLP/modules/decoder/CRF.py
YanLiqi/fastNLP
a8c45796158a3b8dbc81e22412bd6e4e4b97539a
[ "Apache-2.0" ]
null
null
null
import torch from torch import nn from fastNLP.modules.utils import initial_parameter def allowed_transitions(id2label, encoding_type='bio'): """ :param dict id2label: key是label的indices,value是str类型的tag或tag-label。value可以是只有tag的, 比如"B", "M"; 也可以是 "B-NN", "M-NN", tag和label之间一定要用"-"隔开。一般可以通过Vocabulary...
42.188742
122
0.566204
import torch from torch import nn from fastNLP.modules.utils import initial_parameter def log_sum_exp(x, dim=-1): max_value, _ = x.max(dim=dim, keepdim=True) res = torch.log(torch.sum(torch.exp(x - max_value), dim=dim, keepdim=True)) + max_value return res.squeeze(dim) def seq_len_to_byte_mask(seq_lens...
2,025
0
125
c62ff6985348eba85720ddafd2a35829d859a862
7,472
py
Python
tests/benchmark.py
imartinezl/cpab
d18692528f5ae2028e2deaf38def1562e595660d
[ "MIT" ]
null
null
null
tests/benchmark.py
imartinezl/cpab
d18692528f5ae2028e2deaf38def1562e595660d
[ "MIT" ]
null
null
null
tests/benchmark.py
imartinezl/cpab
d18692528f5ae2028e2deaf38def1562e595660d
[ "MIT" ]
null
null
null
# %% import sys sys.path.insert(0, "..") import time import timeit import numpy as np import torch import matplotlib.pyplot as plt import cpab import torch.autograd.profiler as profiler import torch.utils.benchmark as benchmark # %% SETUP tess_size = 50 backend = "pytorch" # ["pytorch", "numpy"] device = "gpu" #...
26.590747
184
0.632227
# %% import sys sys.path.insert(0, "..") import time import timeit import numpy as np import torch import matplotlib.pyplot as plt import cpab import torch.autograd.profiler as profiler import torch.utils.benchmark as benchmark # %% SETUP tess_size = 50 backend = "pytorch" # ["pytorch", "numpy"] device = "gpu" #...
0
0
0
5f7fe7b5ac3f8175ed7329cfaae3957cb23f47d4
61,031
py
Python
home/osmc/DLP/dlp_lightcrafter-1.0.19/dlp_lightcrafter/dpp2607.py
bietiekay/TI_LightCrafter_DLP2000_OSMC_RaspberryPi
27f62f973f7d8c8cc3a49007599a7bf592d86289
[ "BSD-2-Clause" ]
3
2018-12-03T15:11:59.000Z
2021-07-17T16:25:16.000Z
home/osmc/DLP/dlp_lightcrafter-1.0.19/dlp_lightcrafter/dpp2607.py
bietiekay/TI_LightCrafter_DLP2000_OSMC_RaspberryPi
27f62f973f7d8c8cc3a49007599a7bf592d86289
[ "BSD-2-Clause" ]
1
2019-01-04T17:35:37.000Z
2019-01-04T17:35:37.000Z
home/osmc/DLP/dlp_lightcrafter-1.0.19/dlp_lightcrafter/dpp2607.py
bietiekay/TI_LightCrafter_DLP2000_OSMC_RaspberryPi
27f62f973f7d8c8cc3a49007599a7bf592d86289
[ "BSD-2-Clause" ]
1
2020-08-15T04:48:51.000Z
2020-08-15T04:48:51.000Z
# -*- coding: windows-1252 -*- # dpp2607.py # # sends commands to DPP2607 ASIC using I2C # # Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/ # # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # ...
30.964485
750
0.69527
# -*- coding: windows-1252 -*- # dpp2607.py # # sends commands to DPP2607 ASIC using I2C # # Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/ # # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # ...
313
0
23
bb36154f56427888e11879eca6ee7e98539750ca
5,089
py
Python
tests/test_cli.py
gercograndia/aws-iam-tester
555a868e8ccd44b81da18b94dbfaf2219d42eab5
[ "MIT" ]
15
2020-03-27T22:55:14.000Z
2022-02-12T04:22:41.000Z
tests/test_cli.py
gercograndia/aws-iam-tester
555a868e8ccd44b81da18b94dbfaf2219d42eab5
[ "MIT" ]
3
2020-07-31T19:41:33.000Z
2021-06-30T07:16:08.000Z
tests/test_cli.py
gercograndia/aws-iam-tester
555a868e8ccd44b81da18b94dbfaf2219d42eab5
[ "MIT" ]
6
2020-11-24T20:44:44.000Z
2021-06-03T02:56:23.000Z
""" Tests for the command module """ import os import subprocess import pytest import pathlib from pyassert import assert_that # from aws-iam-tester import cli script_path = pathlib.Path(__file__).parent.absolute() # Keep this method last to avoid disrupting other methods
35.340278
157
0.647671
""" Tests for the command module """ import os import subprocess import pytest import pathlib from pyassert import assert_that # from aws-iam-tester import cli script_path = pathlib.Path(__file__).parent.absolute() def run_command(command_list, do_assert=True, show_debug=False): process = subprocess.Popen( ...
4,422
0
390
bb2d7ee630e8e32809d8407270d93c95fb6f1e7b
7,645
py
Python
request-patch-review.py
hyunsik/incubator-tajo
fbc358c2030e78f6616b286cf0736afaa8a583f8
[ "BSD-3-Clause" ]
19
2015-01-22T14:46:11.000Z
2021-11-10T16:06:36.000Z
request-patch-review.py
gruter/tajo-cdh
7bd3efdc253fe7bffb42881065183e94a8a0a2ee
[ "BSD-3-Clause" ]
null
null
null
request-patch-review.py
gruter/tajo-cdh
7bd3efdc253fe7bffb42881065183e94a8a0a2ee
[ "BSD-3-Clause" ]
19
2015-01-11T20:04:49.000Z
2021-11-10T16:06:26.000Z
#!/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 # "L...
46.615854
393
0.708306
#!/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 # "L...
322
0
24
c15a73a25b6c01e22dddf80e2f1876a8c274118a
11,613
py
Python
babygraphics.py
kaiicheng/United-States-Population-Name-Dashboard
9019538fcb58c7e97a3dc67d3b27cb8ad180e448
[ "MIT" ]
null
null
null
babygraphics.py
kaiicheng/United-States-Population-Name-Dashboard
9019538fcb58c7e97a3dc67d3b27cb8ad180e448
[ "MIT" ]
null
null
null
babygraphics.py
kaiicheng/United-States-Population-Name-Dashboard
9019538fcb58c7e97a3dc67d3b27cb8ad180e448
[ "MIT" ]
null
null
null
""" SC101 Baby Names Project Adapted from Nick Parlante's Baby Names assignment by Jerry Liao. YOUR DESCRIPTION HERE """ import tkinter import babynames import babygraphicsgui as gui FILENAMES = [ 'data/full/baby-1900.txt', 'data/full/baby-1910.txt', 'data/full/baby-1920.txt', 'data/full/baby-1930.txt', ...
40.463415
145
0.563765
""" SC101 Baby Names Project Adapted from Nick Parlante's Baby Names assignment by Jerry Liao. YOUR DESCRIPTION HERE """ import tkinter import babynames import babygraphicsgui as gui FILENAMES = [ 'data/full/baby-1900.txt', 'data/full/baby-1910.txt', 'data/full/baby-1920.txt', 'data/full/baby-1930.txt', ...
534
0
22
a88035b4dc8f36658950702134aeccfd01bff7ba
301
py
Python
helpers.py
Silve1ra/casting-agency-api
075ac2d465972b84a95fbd3e0eb0823ec33a867c
[ "MIT" ]
null
null
null
helpers.py
Silve1ra/casting-agency-api
075ac2d465972b84a95fbd3e0eb0823ec33a867c
[ "MIT" ]
null
null
null
helpers.py
Silve1ra/casting-agency-api
075ac2d465972b84a95fbd3e0eb0823ec33a867c
[ "MIT" ]
null
null
null
ITEMS_PER_PAGE = 10
23.153846
52
0.684385
ITEMS_PER_PAGE = 10 def paginate_items(request, selection): page = request.args.get('page', 1, type=int) start = (page - 1) * ITEMS_PER_PAGE end = start + ITEMS_PER_PAGE items = [item.serialize() for item in selection] current_items = items[start:end] return current_items
257
0
23
55e865bd9941f60900fd8edb25559a00824f8688
557
py
Python
Path_finding_visualization using bfs/bfs.py
arymandeshwal/Path-Finding-Visualization
9f79eb2b9cc9cf2e1515582a1bc71f5b4a657437
[ "MIT" ]
1
2020-06-30T15:13:14.000Z
2020-06-30T15:13:14.000Z
Path_finding_visualization using bfs/bfs.py
arymandeshwal/Path-Finding-Visualization
9f79eb2b9cc9cf2e1515582a1bc71f5b4a657437
[ "MIT" ]
null
null
null
Path_finding_visualization using bfs/bfs.py
arymandeshwal/Path-Finding-Visualization
9f79eb2b9cc9cf2e1515582a1bc71f5b4a657437
[ "MIT" ]
null
null
null
import collections wall, goal = 1, 3 width_g, height_g = 28, 28
26.52381
107
0.479354
import collections wall, goal = 1, 3 width_g, height_g = 28, 28 def bfs_algo(grid,start): queue = collections.deque([[start]]) seen = set([start]) while queue: path = queue.popleft() x, y = path[-1] if grid[x][y] == goal: return path for x2, y2 in (...
457
0
25
7c708ec1bf56a9b05c8cb0427ab9fe67a29e9919
17,436
py
Python
public/Python27/Lib/distutils/command/sdist.py
NingrumFadillah/cekmutasi
1fccb6cafb874c2a80ece9b71d7c682fd44dbd48
[ "MIT" ]
1
2020-11-26T18:53:46.000Z
2020-11-26T18:53:46.000Z
public/Python27/Lib/distutils/command/sdist.py
NingrumFadillah/cekmutasi
1fccb6cafb874c2a80ece9b71d7c682fd44dbd48
[ "MIT" ]
null
null
null
public/Python27/Lib/distutils/command/sdist.py
NingrumFadillah/cekmutasi
1fccb6cafb874c2a80ece9b71d7c682fd44dbd48
[ "MIT" ]
3
2017-04-07T12:02:22.000Z
2020-03-23T12:11:55.000Z
"""distutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).""" __revision__ = "$Id: sdist.py 81261 2010-05-17 10:54:43Z tarek.ziade $" import os import string import sys from glob import glob from warnings import warn from distutils.core import Command from distutils import d...
38.832962
78
0.582014
"""distutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).""" __revision__ = "$Id: sdist.py 81261 2010-05-17 10:54:43Z tarek.ziade $" import os import string import sys from glob import glob from warnings import warn from distutils.core import Command from distutils import d...
2,115
14,132
23
5294b56b586f084d81b078c81b47f955787e0b01
136
py
Python
h5py/tests/types/__init__.py
qsnake/h5py
45e77c3798032de2f740414a9e014fbca8c0ac18
[ "BSD-3-Clause" ]
null
null
null
h5py/tests/types/__init__.py
qsnake/h5py
45e77c3798032de2f740414a9e014fbca8c0ac18
[ "BSD-3-Clause" ]
null
null
null
h5py/tests/types/__init__.py
qsnake/h5py
45e77c3798032de2f740414a9e014fbca8c0ac18
[ "BSD-3-Clause" ]
8
2018-07-05T22:16:08.000Z
2021-08-19T06:07:45.000Z
""" Type and data-conversion test package. Tests the following: 1) HDF5 to NumPy type mapping 2) Data conversion """
13.6
42
0.639706
""" Type and data-conversion test package. Tests the following: 1) HDF5 to NumPy type mapping 2) Data conversion """
0
0
0
7b4436910fc762d59fcccf6a3d6b95104887537f
123
py
Python
Code/Python2.7/10one-n.py
nicholasz2510/General
e2783cad4da7f9b50c952c2b91ef311d22b1d56f
[ "MIT" ]
1
2019-11-21T15:56:03.000Z
2019-11-21T15:56:03.000Z
Code/Python2.7/10one-n.py
nicholasz2510/General
e2783cad4da7f9b50c952c2b91ef311d22b1d56f
[ "MIT" ]
12
2019-11-21T21:00:57.000Z
2022-02-27T01:46:56.000Z
Code/Python2.7/10one-n.py
nicholasz2510/General
e2783cad4da7f9b50c952c2b91ef311d22b1d56f
[ "MIT" ]
1
2019-11-21T20:49:18.000Z
2019-11-21T20:49:18.000Z
n = int(raw_input("What would you like to use for n? ")) answer = 0 for x in range(1, n+1): answer += x print answer
15.375
56
0.626016
n = int(raw_input("What would you like to use for n? ")) answer = 0 for x in range(1, n+1): answer += x print answer
0
0
0
273ad74acb2645b250bf948830ca59ebaea78cb2
2,770
py
Python
picture.py
Jacksonlakehhs/Picture
6a9ceefe659c17034b9a0b8c9e984d1a38fc3dd1
[ "MIT" ]
null
null
null
picture.py
Jacksonlakehhs/Picture
6a9ceefe659c17034b9a0b8c9e984d1a38fc3dd1
[ "MIT" ]
null
null
null
picture.py
Jacksonlakehhs/Picture
6a9ceefe659c17034b9a0b8c9e984d1a38fc3dd1
[ "MIT" ]
null
null
null
""" picture.py Author: Jackson Lake Credit: HHS page Github Tutorial Assignment: Use the ggame library to "paint" a graphical picture of something (e.g. a house, a face or landscape). Use at least: 1. Three different Color objects. 2. Ten different Sprite objects. 3. One (or more) RectangleAsset objects. 4. One (or ...
28.556701
104
0.720939
""" picture.py Author: Jackson Lake Credit: HHS page Github Tutorial Assignment: Use the ggame library to "paint" a graphical picture of something (e.g. a house, a face or landscape). Use at least: 1. Three different Color objects. 2. Ten different Sprite objects. 3. One (or more) RectangleAsset objects. 4. One (or ...
0
0
0
ed66809bed2e3426e2ba9136f081886e839ddd02
928
py
Python
project/migrations/0012_auto_20190505_1442.py
abhishekm47/restaurant-django
56993f2269e27c9b932b5f172cdf4db1e95292aa
[ "MIT" ]
null
null
null
project/migrations/0012_auto_20190505_1442.py
abhishekm47/restaurant-django
56993f2269e27c9b932b5f172cdf4db1e95292aa
[ "MIT" ]
null
null
null
project/migrations/0012_auto_20190505_1442.py
abhishekm47/restaurant-django
56993f2269e27c9b932b5f172cdf4db1e95292aa
[ "MIT" ]
null
null
null
# Generated by Django 2.0 on 2019-05-05 09:12 import datetime from django.db import migrations, models
30.933333
141
0.59375
# Generated by Django 2.0 on 2019-05-05 09:12 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project', '0011_auto_20190425_1037'), ] operations = [ migrations.AlterField( model_name='menuitem', n...
0
800
23
918812d7ca13841d10ea04118a8e43bbf43c95de
391
py
Python
src/genie/libs/parser/iosxe/tests/ShowIpDhcpDatabase/cli/equal/golden1_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/iosxe/tests/ShowIpDhcpDatabase/cli/equal/golden1_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/iosxe/tests/ShowIpDhcpDatabase/cli/equal/golden1_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
expected_output = { "url": { "ftp://user:password@172.16.4.253/router-dhcp": { "read": "Dec 01 1997 12:01 AM", "written": "Never", "status": "Last read succeeded. Bindings have been loaded in RAM.", "delay_in_secs": 300, "timeout_in_secs": 300, ...
26.066667
79
0.475703
expected_output = { "url": { "ftp://user:password@172.16.4.253/router-dhcp": { "read": "Dec 01 1997 12:01 AM", "written": "Never", "status": "Last read succeeded. Bindings have been loaded in RAM.", "delay_in_secs": 300, "timeout_in_secs": 300, ...
0
0
0
042f2035facd42e8d86e6aafc24339ffb88e9749
3,656
py
Python
src/genie/libs/parser/iosxe/tests/ShowVlan/cli/equal/golden_output_vlan_2_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/iosxe/tests/ShowVlan/cli/equal/golden_output_vlan_2_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/iosxe/tests/ShowVlan/cli/equal/golden_output_vlan_2_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
expected_output = { "vlans": { "1": { "vlan_id": "1", "name": "default", "state": "active", "shutdown": False, "mtu": 1500, "said": 100001, "trans1": 0, "trans2": 0, "type": "enet", "inter...
32.936937
79
0.408643
expected_output = { "vlans": { "1": { "vlan_id": "1", "name": "default", "state": "active", "shutdown": False, "mtu": 1500, "said": 100001, "trans1": 0, "trans2": 0, "type": "enet", "inter...
0
0
0
3ca6332215ff1cc553d4ed9016eacd95b07d1418
646
py
Python
tests/test_reducers.py
jhnnsrs/xarray-multiscale
cb4e08bc21db9cfaae5aa096683c91d40acd79c0
[ "BSD-3-Clause" ]
null
null
null
tests/test_reducers.py
jhnnsrs/xarray-multiscale
cb4e08bc21db9cfaae5aa096683c91d40acd79c0
[ "BSD-3-Clause" ]
null
null
null
tests/test_reducers.py
jhnnsrs/xarray-multiscale
cb4e08bc21db9cfaae5aa096683c91d40acd79c0
[ "BSD-3-Clause" ]
null
null
null
from xarray_multiscale.reducers import windowed_mean, windowed_mode import numpy as np
32.3
67
0.650155
from xarray_multiscale.reducers import windowed_mean, windowed_mode import numpy as np def test_windowed_mode(): data = np.arange(16) % 3 + np.arange(16) % 2 answer = np.array([2, 0, 1, 2]) results = windowed_mode(data, (4,)) assert np.array_equal(results, answer) data = np.arange(16).reshape(4,4...
513
0
46
296a16133fba9a356c755d1fd44a8d92f0ae6e1f
8,210
py
Python
scraping.py
seeeturtle/forest-watcher
e63d05ba35b66c7d5de2e6edb4d1562c4513dfff
[ "MIT" ]
null
null
null
scraping.py
seeeturtle/forest-watcher
e63d05ba35b66c7d5de2e6edb4d1562c4513dfff
[ "MIT" ]
null
null
null
scraping.py
seeeturtle/forest-watcher
e63d05ba35b66c7d5de2e6edb4d1562c4513dfff
[ "MIT" ]
null
null
null
import functools import json import operator import os from collections import Counter, namedtuple from multiprocessing import Pool, cpu_count from pprint import pprint import requests import xlrd import xmltodict from tqdm import tqdm _alb_fields = [ "title", "link", "author", "pubDate", "descrip...
23.25779
158
0.568088
import functools import json import operator import os from collections import Counter, namedtuple from multiprocessing import Pool, cpu_count from pprint import pprint import requests import xlrd import xmltodict from tqdm import tqdm _alb_fields = [ "title", "link", "author", "pubDate", "descrip...
5,712
0
276
ec98f45f0212d5f968676401cc893d2382082466
1,122
py
Python
tests/test_parse_site.py
e7andy/simple-podcast-dl
b3353b981a6999a01abd6781c161a16d4d3dd898
[ "MIT" ]
48
2018-10-18T20:21:34.000Z
2021-10-06T02:30:37.000Z
tests/test_parse_site.py
e7andy/simple-podcast-dl
b3353b981a6999a01abd6781c161a16d4d3dd898
[ "MIT" ]
22
2018-10-05T20:21:21.000Z
2021-04-23T07:05:35.000Z
tests/test_parse_site.py
e7andy/simple-podcast-dl
b3353b981a6999a01abd6781c161a16d4d3dd898
[ "MIT" ]
2
2020-12-06T09:32:31.000Z
2021-04-23T06:57:59.000Z
from podcast_dl.site_parser import parse_site, InvalidSite import pytest @pytest.mark.parametrize( "site,name", ( ("http://talkpython.fm", "talkpython"), ("https://talkpython.fm", "talkpython"), ("http://pythonbytes.fm", "pythonbytes"), ("https://pythonbytes.fm", "pythonbytes")...
33
98
0.647059
from podcast_dl.site_parser import parse_site, InvalidSite import pytest @pytest.mark.parametrize( "site,name", ( ("http://talkpython.fm", "talkpython"), ("https://talkpython.fm", "talkpython"), ("http://pythonbytes.fm", "pythonbytes"), ("https://pythonbytes.fm", "pythonbytes")...
314
0
68
b9c712a7e566365d9ae6762ca6930fb2575830aa
2,755
py
Python
star_navi_backend/star_navi_backend/utils.py
Four-Velocity/star_navi_test
9765d23442b31ffbb2148c3ffab7c3b6b30214ae
[ "Unlicense" ]
null
null
null
star_navi_backend/star_navi_backend/utils.py
Four-Velocity/star_navi_test
9765d23442b31ffbb2148c3ffab7c3b6b30214ae
[ "Unlicense" ]
null
null
null
star_navi_backend/star_navi_backend/utils.py
Four-Velocity/star_navi_test
9765d23442b31ffbb2148c3ffab7c3b6b30214ae
[ "Unlicense" ]
null
null
null
import os from time import sleep import requests as r import yaml BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) def get_yaml(tp: str) -> dict: """ Convert YAML to python dict. Open dev_settings if exist. Other way open prod_settings. :param tp: category of settings which...
28.697917
87
0.62323
import os from time import sleep import requests as r import yaml BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) def get_yaml(tp: str) -> dict: """ Convert YAML to python dict. Open dev_settings if exist. Other way open prod_settings. :param tp: category of settings which...
398
0
26
e3a294384d04d671ba0596a94bb32835d7554db2
4,221
py
Python
fgclustering/forest_guided_clustering.py
HelmholtzAI-Consultants-Munich/forest_guided_clustering
3704047497d343417eee2a2f67dc3be201854b76
[ "MIT" ]
8
2021-11-04T11:44:18.000Z
2022-02-02T13:38:55.000Z
fgclustering/forest_guided_clustering.py
HelmholtzAI-Consultants-Munich/forest_guided_clustering
3704047497d343417eee2a2f67dc3be201854b76
[ "MIT" ]
4
2021-10-19T16:44:10.000Z
2021-11-08T14:33:35.000Z
fgclustering/forest_guided_clustering.py
HelmholtzAI-Consultants-Munich/forest_guided_clustering
3704047497d343417eee2a2f67dc3be201854b76
[ "MIT" ]
2
2021-09-13T08:26:59.000Z
2022-02-02T09:14:35.000Z
############################################ # imports ############################################ import fgclustering.utils as utils import fgclustering.optimizer as optimizer import fgclustering.plotting as plotting ############################################ # Forest-guided Clustering ###########################...
49.658824
144
0.697702
############################################ # imports ############################################ import fgclustering.utils as utils import fgclustering.optimizer as optimizer import fgclustering.plotting as plotting ############################################ # Forest-guided Clustering ###########################...
0
0
0
f4fd8478d10d669db73ec0483ef8530b8fdb54c7
851
py
Python
cdhweb/pages/context_processors.py
bwhicks/cdh-web
d6002dc1933a4d6e97f5459aafc9ab92cb1f8050
[ "Apache-2.0" ]
1
2017-11-21T16:02:33.000Z
2017-11-21T16:02:33.000Z
cdhweb/pages/context_processors.py
bwhicks/cdh-web
d6002dc1933a4d6e97f5459aafc9ab92cb1f8050
[ "Apache-2.0" ]
367
2017-08-14T16:05:41.000Z
2021-11-03T15:29:18.000Z
cdhweb/pages/context_processors.py
bwhicks/cdh-web
d6002dc1933a4d6e97f5459aafc9ab92cb1f8050
[ "Apache-2.0" ]
5
2017-09-08T21:08:49.000Z
2020-10-02T04:39:37.000Z
from cdhweb.pages.forms import SiteSearchForm from cdhweb.pages.models import PageIntro def page_intro(request): """Template context processor: if there is a PageIntro snippet for this page, add it to the context for display.""" # wagtail stores link url without leading and trailing slashes, # but req...
35.458333
76
0.723854
from cdhweb.pages.forms import SiteSearchForm from cdhweb.pages.models import PageIntro def page_intro(request): """Template context processor: if there is a PageIntro snippet for this page, add it to the context for display.""" # wagtail stores link url without leading and trailing slashes, # but req...
0
0
0
f20337c08370d886c3e94d9bb4e8f75308d8c4f7
399
py
Python
dangerfile.py
teastburn/danger-python
c943131b01558a6867218c7d91a4fa7a5ab3ec71
[ "MIT" ]
66
2020-01-23T15:31:34.000Z
2022-03-05T07:51:09.000Z
dangerfile.py
teastburn/danger-python
c943131b01558a6867218c7d91a4fa7a5ab3ec71
[ "MIT" ]
7
2020-01-23T16:37:03.000Z
2021-04-12T17:25:55.000Z
dangerfile.py
teastburn/danger-python
c943131b01558a6867218c7d91a4fa7a5ab3ec71
[ "MIT" ]
14
2020-01-23T15:17:39.000Z
2022-03-26T16:44:24.000Z
touched_files = danger.git.modified_files + danger.git.created_files has_source_changes = any(map(lambda f: f.startswith("danger_python"), touched_files)) has_changelog_entry = "CHANGELOG.md" in touched_files is_trivial = "#trivial" in danger.github.pr.title if has_source_changes and not has_changelog_entry and not is...
49.875
85
0.802005
touched_files = danger.git.modified_files + danger.git.created_files has_source_changes = any(map(lambda f: f.startswith("danger_python"), touched_files)) has_changelog_entry = "CHANGELOG.md" in touched_files is_trivial = "#trivial" in danger.github.pr.title if has_source_changes and not has_changelog_entry and not is...
0
0
0
83d5dcc0767d5e64221fcf3d14b33d0c2a0a7d9a
12,519
py
Python
vplexapi-7.0.0/vplexapi/models/engine.py
dell/python-vplex
02c5df5e7f9ed61a13a2838f21ca6467a25dd392
[ "Apache-2.0" ]
3
2020-12-01T11:22:13.000Z
2021-02-16T17:38:42.000Z
vplexapi-7.0.0/vplexapi/models/engine.py
dell/python-vplex
02c5df5e7f9ed61a13a2838f21ca6467a25dd392
[ "Apache-2.0" ]
null
null
null
vplexapi-7.0.0/vplexapi/models/engine.py
dell/python-vplex
02c5df5e7f9ed61a13a2838f21ca6467a25dd392
[ "Apache-2.0" ]
3
2021-01-01T21:07:55.000Z
2021-02-20T07:07:40.000Z
# coding: utf-8 """ VPlex REST API A definition for the next-gen VPlex API # noqa: E501 OpenAPI spec version: 0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class Engine(object): """NOTE: This class is auto gene...
27.57489
311
0.599728
# coding: utf-8 """ VPlex REST API A definition for the next-gen VPlex API # noqa: E501 OpenAPI spec version: 0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class Engine(object): """NOTE: This class is auto gene...
0
0
0
07299342f9f59edd736455fe5cf8f959f8772d0f
616
py
Python
python/dynamic-programming/count-number-of-ways-to-cover-a-distance.py
fossabot/a-grim-loth
a6c8d549289a39ec981c1e0d0c754bb2708dfff9
[ "MIT" ]
4
2021-06-26T17:18:47.000Z
2022-02-02T15:02:27.000Z
python/dynamic-programming/count-number-of-ways-to-cover-a-distance.py
fossabot/a-grim-loth
a6c8d549289a39ec981c1e0d0c754bb2708dfff9
[ "MIT" ]
8
2021-06-29T07:00:32.000Z
2021-12-01T11:26:22.000Z
python/dynamic-programming/count-number-of-ways-to-cover-a-distance.py
fossabot/a-grim-loth
a6c8d549289a39ec981c1e0d0c754bb2708dfff9
[ "MIT" ]
3
2021-07-14T14:42:08.000Z
2021-12-07T19:36:53.000Z
# A Dynamic Programming based on Python3 # program to count number of ways to # cover a distance with 1, 2 and 3 steps # driver program dist = 4 print(printCountDP(dist))
21.241379
61
0.594156
# A Dynamic Programming based on Python3 # program to count number of ways to # cover a distance with 1, 2 and 3 steps def printCountDP(dist): count = [0] * (dist + 1) # Initialize base values. There is # one way to cover 0 and 1 distances # and two ways to cover 2 distance count[0] = 1 if di...
419
0
23
f6a467785c54771ef85fa13b6cb39f8aa6f71d70
1,425
py
Python
app/bot/main.py
ignatiy/zvonar-api
f471d5691e59b4d0d94877a4649069f782fd14f8
[ "MIT" ]
3
2021-04-28T04:52:27.000Z
2021-08-30T10:10:10.000Z
app/bot/main.py
ignatiy/zvonar-api
f471d5691e59b4d0d94877a4649069f782fd14f8
[ "MIT" ]
null
null
null
app/bot/main.py
ignatiy/zvonar-api
f471d5691e59b4d0d94877a4649069f782fd14f8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import config import sys, traceback from datetime import datetime from telegram import Bot, Update, User, Message from telegram.ext import CommandHandler, Updater, MessageHandler, CallbackContext, Filters from telegram.utils.request import Request from telegram import Keyb...
29.6875
111
0.748772
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import config import sys, traceback from datetime import datetime from telegram import Bot, Update, User, Message from telegram.ext import CommandHandler, Updater, MessageHandler, CallbackContext, Filters from telegram.utils.request import Request from telegram import Keyb...
1,066
0
23
d9b6984afb12d9fb4c8ffcaf41467860bbfab712
13,677
py
Python
NACA-foil-body-fitted/blockmeshdict.py
kaijunhuang1994/blockMeshDict-Python
1d640551980df6c66af057aad78d142e0cbae95e
[ "MIT" ]
null
null
null
NACA-foil-body-fitted/blockmeshdict.py
kaijunhuang1994/blockMeshDict-Python
1d640551980df6c66af057aad78d142e0cbae95e
[ "MIT" ]
null
null
null
NACA-foil-body-fitted/blockmeshdict.py
kaijunhuang1994/blockMeshDict-Python
1d640551980df6c66af057aad78d142e0cbae95e
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import division, print_function import argparse import numpy as np from numpy import linspace, zeros, ones, sin, cos, arctan, pi import os def gen_blockmeshdict(foil="0012"): """ Write a `blockMeshDict` for a NACA foil at specified angle of attack. """ # Foil geom...
36.569519
141
0.455655
#!/usr/bin/env python from __future__ import division, print_function import argparse import numpy as np from numpy import linspace, zeros, ones, sin, cos, arctan, pi import os def gen_blockmeshdict(foil="0012"): """ Write a `blockMeshDict` for a NACA foil at specified angle of attack. """ # Foil geom...
0
0
0
d399b88a18aecdddd170a1ff0ae5152520149d95
470
py
Python
pandayoda/common/serializer.py
wguanicedew/panda-yoda
df0860363818a219dd5bc2bfcda2659e598bd6bd
[ "Apache-2.0" ]
null
null
null
pandayoda/common/serializer.py
wguanicedew/panda-yoda
df0860363818a219dd5bc2bfcda2659e598bd6bd
[ "Apache-2.0" ]
null
null
null
pandayoda/common/serializer.py
wguanicedew/panda-yoda
df0860363818a219dd5bc2bfcda2659e598bd6bd
[ "Apache-2.0" ]
null
null
null
import json,logging logger = logging.getLogger(__name__)
21.363636
67
0.659574
import json,logging logger = logging.getLogger(__name__) def serialize(msg,pretty_print=False): try: if pretty_print: return json.dumps(msg,indent=2,sort_keys=True) else: return json.dumps(msg) except: logger.exception('failed to serialize the message: %s',msg) raise d...
365
0
46
4f8befee59e57e0c07b138ebb1f32b92934c4723
980
py
Python
Hard/Median_Of_Two_Sorted_Arrays.py
dianjiaogit/LeetCode_Python_solution
390693c839d1be8802c21ea81062443b6d5ea36f
[ "MIT" ]
null
null
null
Hard/Median_Of_Two_Sorted_Arrays.py
dianjiaogit/LeetCode_Python_solution
390693c839d1be8802c21ea81062443b6d5ea36f
[ "MIT" ]
null
null
null
Hard/Median_Of_Two_Sorted_Arrays.py
dianjiaogit/LeetCode_Python_solution
390693c839d1be8802c21ea81062443b6d5ea36f
[ "MIT" ]
null
null
null
# There are two sorted arrays nums1 and nums2 of size m and n respectively. # Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). # Example 1: # nums1 = [1, 3] # nums2 = [2] # The median is 2.0 # Example 2: # nums1 = [1, 2] # nums2 = [3, 4] # The median is (2 + 3)/2 = 2...
24.5
99
0.523469
# There are two sorted arrays nums1 and nums2 of size m and n respectively. # Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). # Example 1: # nums1 = [1, 3] # nums2 = [2] # The median is 2.0 # Example 2: # nums1 = [1, 2] # nums2 = [3, 4] # The median is (2 + 3)/2 = 2...
256
347
54
cb3441198ad038e40a02ae3b24dbdfc064616efb
2,428
py
Python
src/judge.py
Gomango999/codebreaker
407c4ac7a69c8db52cc7d2a57034cdda243c9134
[ "MIT" ]
1
2021-12-11T01:43:27.000Z
2021-12-11T01:43:27.000Z
src/judge.py
Gomango999/codebreaker
407c4ac7a69c8db52cc7d2a57034cdda243c9134
[ "MIT" ]
null
null
null
src/judge.py
Gomango999/codebreaker
407c4ac7a69c8db52cc7d2a57034cdda243c9134
[ "MIT" ]
1
2021-12-15T07:04:29.000Z
2021-12-15T07:04:29.000Z
import execute import random import traceback # input sanity checker: prints 1 if valid # correct checker: prints 1 if valid # Returns score, status_message
36.238806
133
0.653213
import execute import random import traceback # input sanity checker: prints 1 if valid # correct checker: prints 1 if valid # Returns score, status_message async def run_judge(problem, user_input, user_output): box = execute.Box() sanity_exe = box.prepfile('sanity', problem.sanity_exe) try: resu...
2,247
0
22
062605923e1edf65555afdc8134ca5a4fdc006fb
1,432
py
Python
Comparisoner.py
1970938138/LevelUper
2cbe9d61bdd0bc6d37a5e1fe8d2d9601132135f9
[ "MIT" ]
1
2020-08-08T19:32:43.000Z
2020-08-08T19:32:43.000Z
Comparisoner.py
1970938138/LevelUper
2cbe9d61bdd0bc6d37a5e1fe8d2d9601132135f9
[ "MIT" ]
null
null
null
Comparisoner.py
1970938138/LevelUper
2cbe9d61bdd0bc6d37a5e1fe8d2d9601132135f9
[ "MIT" ]
null
null
null
#/usr/bin/python3/ #coding=utf-8 #================ 简介 =================== # 脚本: 伪·红石比较器 # 作者: 北方重工NK1 # 时间: 2017年12月10日 13:37:11 # 描述: 匹配元素_作业帮 #================ 简介 =================== import re Checking_Points1=r'<dt>考点:</dt>([\s\S]*?)</dd>' Checking_Poi...
29.833333
90
0.504888
#/usr/bin/python3/ #coding=utf-8 #================ 简介 =================== # 脚本: 伪·红石比较器 # 作者: 北方重工NK1 # 时间: 2017年12月10日 13:37:11 # 描述: 匹配元素_作业帮 #================ 简介 =================== import re Checking_Points1=r'<dt>考点:</dt>([\s\S]*?)</dd>' Checking_Poi...
1,127
0
23
49dacf4bde624efc469d0f8d61220b29c7647828
1,199
py
Python
001. Add Two Numbers/solution.py
corkiwang1122/LeetCode
39b1680b58173e6ec23a475605c3450ce8f78a81
[ "MIT" ]
3,690
2015-01-03T03:40:23.000Z
2022-03-31T08:10:19.000Z
001. Add Two Numbers/solution.py
Windfall94/LeetCode
1756256d7e619164076bbf358c8f7ca68cd8bd79
[ "MIT" ]
21
2015-01-25T16:39:43.000Z
2021-02-26T05:28:22.000Z
001. Add Two Numbers/solution.py
Windfall94/LeetCode
1756256d7e619164076bbf358c8f7ca68cd8bd79
[ "MIT" ]
1,290
2015-01-09T01:28:20.000Z
2022-03-28T12:20:39.000Z
#!python3 # Definition for singly-linked list. if __name__ == "__main__": l1 = ListNode(2) l1.next = ListNode(4) l1.next.next = ListNode(3) l2 = ListNode(5) l2.next = ListNode(6) l2.next.next = ListNode(4) lsum = ListNode(7) lsum.next = ListNode(0) lsum.next.next = ListNode(8) ...
21.8
68
0.506255
#!python3 # Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def addTwoNumbers(self, l1, l2): """ :type l1: ListNode :type l2: ListNode :rtype: ListNode """ head = ListNode(...
207
509
94
864473efccfc1e8c9a8b5879266e118d1d0fc8b1
1,165
py
Python
SAMBALoader/Transports/Transport.py
abcminiuser/sam-ba-loader
3154cb1cbc3c45d30438fafa8955a4c6e423c9d8
[ "MIT" ]
7
2016-03-21T18:31:17.000Z
2021-02-17T18:55:33.000Z
SAMBALoader/Transports/Transport.py
abcminiuser/sam-ba-loader
3154cb1cbc3c45d30438fafa8955a4c6e423c9d8
[ "MIT" ]
11
2016-03-20T20:33:58.000Z
2016-12-04T20:53:18.000Z
SAMBALoader/Transports/Transport.py
abcminiuser/sam-ba-loader
3154cb1cbc3c45d30438fafa8955a4c6e423c9d8
[ "MIT" ]
4
2016-03-21T18:31:31.000Z
2020-06-24T14:33:58.000Z
# # Open Source SAM-BA Programmer # Copyright (C) Dean Camera, 2016. # # dean [at] fourwalledcubicle [dot] com # www.fourwalledcubicle.com # # # Released under a MIT license, see LICENCE.txt. import abc import logging class TimeoutError(Exception): """Exception thrown when a read operation times...
20.803571
80
0.593133
# # Open Source SAM-BA Programmer # Copyright (C) Dean Camera, 2016. # # dean [at] fourwalledcubicle [dot] com # www.fourwalledcubicle.com # # # Released under a MIT license, see LICENCE.txt. import abc import logging class TimeoutError(Exception): """Exception thrown when a read operation times...
0
0
0
a4c463bce1cc1ff7b6828d441bb881f6bbe7c1d7
2,624
py
Python
drafts/rebuild_frame.py
BrunoSanchez/capsule_N1
a5ee3b74afc27de1a954ae2f9f96c278a4723226
[ "BSD-3-Clause" ]
12
2017-04-13T06:49:42.000Z
2019-11-19T09:27:43.000Z
drafts/rebuild_frame.py
BrunoSanchez/capsule_N1
a5ee3b74afc27de1a954ae2f9f96c278a4723226
[ "BSD-3-Clause" ]
56
2017-09-05T16:00:57.000Z
2020-11-20T18:02:58.000Z
drafts/rebuild_frame.py
BrunoSanchez/capsule_N1
a5ee3b74afc27de1a954ae2f9f96c278a4723226
[ "BSD-3-Clause" ]
5
2017-10-08T16:55:40.000Z
2020-09-22T14:04:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # rebuild_frame.py # # Copyright 2016 Bruno S <bruno@oac.unc.edu.ar> # # This file is part of ProperImage (https://github.com/toros-astro/ProperImage) # License: BSD-3-Clause # Full Text: https://github.com/toros-astro/ProperImage/blob/master/LICENSE.txt # import os im...
28.835165
84
0.676829
#!/usr/bin/env python # -*- coding: utf-8 -*- # # rebuild_frame.py # # Copyright 2016 Bruno S <bruno@oac.unc.edu.ar> # # This file is part of ProperImage (https://github.com/toros-astro/ProperImage) # License: BSD-3-Clause # Full Text: https://github.com/toros-astro/ProperImage/blob/master/LICENSE.txt # import os im...
0
0
0
8a8e45c6b2044b3b506b00abde61b8b723a2cc7e
1,035
py
Python
dataservices/migrations/0016_internetusage_country.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
2
2017-06-02T09:09:08.000Z
2021-01-18T10:26:53.000Z
dataservices/migrations/0016_internetusage_country.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
629
2016-10-10T09:35:52.000Z
2022-03-25T15:04:04.000Z
dataservices/migrations/0016_internetusage_country.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
5
2017-06-22T10:02:22.000Z
2022-03-14T17:55:21.000Z
# Generated by Django 2.2.13 on 2021-01-07 14:53 from django.db import migrations, models import django.db.models.deletion
29.571429
120
0.681159
# Generated by Django 2.2.13 on 2021-01-07 14:53 from django.db import migrations, models import django.db.models.deletion def update_countries(apps, schema_editor): # We can't import the Person model directly as it may be a newer # version than this migration expects. We use the historical version. IU =...
427
412
69
3dcd550d074b7ec61777a55b7db45c0eded56dde
4,060
py
Python
applications/ibm_notebook/ibm_notebook.py
iostackproject/zoe-applications
94a1cfee2a45afcf7375af1f01502717ede3f9d7
[ "Apache-2.0" ]
null
null
null
applications/ibm_notebook/ibm_notebook.py
iostackproject/zoe-applications
94a1cfee2a45afcf7375af1f01502717ede3f9d7
[ "Apache-2.0" ]
null
null
null
applications/ibm_notebook/ibm_notebook.py
iostackproject/zoe-applications
94a1cfee2a45afcf7375af1f01502717ede3f9d7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2016, Francesco Pace # # 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...
43.655914
128
0.678079
#!/usr/bin/env python # Copyright (c) 2016, Francesco Pace # # 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...
1,905
0
46
d265bb95061be140a2fbade4620ead7c273e06d0
6,600
py
Python
nornir_salt/plugins/processors/SaltEventProcessor.py
dmulyalin/nornir-salt
184002995515dddc802b578400370c2219e94957
[ "MIT" ]
5
2021-01-22T09:34:55.000Z
2021-12-22T08:12:34.000Z
nornir_salt/plugins/processors/SaltEventProcessor.py
dmulyalin/nornir-salt
184002995515dddc802b578400370c2219e94957
[ "MIT" ]
2
2022-01-27T14:46:40.000Z
2022-02-28T16:59:01.000Z
nornir_salt/plugins/processors/SaltEventProcessor.py
dmulyalin/nornir-salt
184002995515dddc802b578400370c2219e94957
[ "MIT" ]
1
2021-01-10T04:37:08.000Z
2021-01-10T04:37:08.000Z
""" SaltEventProcessor Plugin ######################### Processor plugin to emit events on task execution progress, used by Nornir Proxy Runner modules to track tasks flow. SaltEventProcessor does not work outside of SaltStack environment. SaltEventProcessor reference ============================ .. autofunction:: ...
35.869565
91
0.591212
""" SaltEventProcessor Plugin ######################### Processor plugin to emit events on task execution progress, used by Nornir Proxy Runner modules to track tasks flow. SaltEventProcessor does not work outside of SaltStack environment. SaltEventProcessor reference ============================ .. autofunction:: ...
4,155
0
189
3716bae826c7763b2b5a647b070f06460590a0f5
371
py
Python
umb/__about__.py
fadhiilrachman/ReverseUMB
19cab7e50471a8002354d91ebb9a97e3f51f1906
[ "MIT" ]
1
2019-02-19T11:15:31.000Z
2019-02-19T11:15:31.000Z
umb/__about__.py
fadhiilrachman/UMBPrivateAPI
19cab7e50471a8002354d91ebb9a97e3f51f1906
[ "MIT" ]
null
null
null
umb/__about__.py
fadhiilrachman/UMBPrivateAPI
19cab7e50471a8002354d91ebb9a97e3f51f1906
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals __copyright__ = 'Copyright 2018 by Fadhiil Rachman' __version__ = '1.0.1' __license__ = 'MIT' __author__ = 'Fadhiil Rachman' __author_email__ = 'fadhiilrachman@gmail.com' __url__ = 'https://github.com/fadhiilr...
28.538462
71
0.657682
# -*- coding: utf-8 -*- from __future__ import unicode_literals __copyright__ = 'Copyright 2018 by Fadhiil Rachman' __version__ = '1.0.1' __license__ = 'MIT' __author__ = 'Fadhiil Rachman' __author_email__ = 'fadhiilrachman@gmail.com' __url__ = 'https://github.com/fadhiilr...
0
0
0
3194320ee57bad0e6e337a87b5b963094566107d
2,517
py
Python
util/fuzz/dbcopy.py
umarcor/prjtrellis
9b3db7ba9a02e7d2f49c52ce062d5b22e320004c
[ "MIT" ]
93
2020-06-26T10:01:31.000Z
2022-03-30T03:01:23.000Z
util/fuzz/dbcopy.py
umarcor/prjtrellis
9b3db7ba9a02e7d2f49c52ce062d5b22e320004c
[ "MIT" ]
29
2020-06-26T10:12:03.000Z
2022-03-31T14:45:51.000Z
util/fuzz/dbcopy.py
umarcor/prjtrellis
9b3db7ba9a02e7d2f49c52ce062d5b22e320004c
[ "MIT" ]
20
2020-06-26T10:01:33.000Z
2022-03-18T22:36:39.000Z
import pytrellis """ Database copy utilities This is used where there are several tiles with different types but the same or similar bit databases - such as all the CIB tiles, some IO tiles, etc. """ def dbcopy(family, device, source, dest, copy_muxes=True, copy_words=True, copy_enums=True, copy_conns=True): ""...
32.269231
119
0.67064
import pytrellis """ Database copy utilities This is used where there are several tiles with different types but the same or similar bit databases - such as all the CIB tiles, some IO tiles, etc. """ def dbcopy(family, device, source, dest, copy_muxes=True, copy_words=True, copy_enums=True, copy_conns=True): ""...
827
0
46
284a914f4a42ea03047f7887872d097a591d2a0d
3,035
py
Python
plotsky.py
hagabbar/VItamin
c1ae6dfa27b8ab77193caacddd477fde0dece1c2
[ "MIT" ]
13
2019-06-26T01:51:54.000Z
2021-12-15T07:01:28.000Z
plotsky.py
hagabbar/VItamin
c1ae6dfa27b8ab77193caacddd477fde0dece1c2
[ "MIT" ]
12
2020-02-19T13:32:07.000Z
2022-03-12T00:00:52.000Z
plotsky.py
hagabbar/VItamin
c1ae6dfa27b8ab77193caacddd477fde0dece1c2
[ "MIT" ]
5
2019-10-23T01:23:56.000Z
2022-03-01T14:12:24.000Z
import numpy as np from ligo.skymap import kde import matplotlib matplotlib.use('Agg') from matplotlib.colors import to_rgb from matplotlib import pyplot as plt from mpl_toolkits.basemap import Basemap #matplotlib.rc('text', usetex=True)
39.934211
154
0.61944
import numpy as np from ligo.skymap import kde import matplotlib matplotlib.use('Agg') from matplotlib.colors import to_rgb from matplotlib import pyplot as plt from mpl_toolkits.basemap import Basemap #matplotlib.rc('text', usetex=True) def greedy(density): i,j = np.shape(density) idx = np.argsort(density.fla...
2,747
0
46
8c7e4cea5e9a1f974ea00d3262c69bbdf4f0e3cb
468
py
Python
Curso Udemy 2022/Curso_Luiz_Otavio/77_aula_count.py
Matheusfarmaceutico/Exercicios-Python
d1821bd9d11ea0707074c5fe11dead2e85476ebd
[ "MIT" ]
null
null
null
Curso Udemy 2022/Curso_Luiz_Otavio/77_aula_count.py
Matheusfarmaceutico/Exercicios-Python
d1821bd9d11ea0707074c5fe11dead2e85476ebd
[ "MIT" ]
null
null
null
Curso Udemy 2022/Curso_Luiz_Otavio/77_aula_count.py
Matheusfarmaceutico/Exercicios-Python
d1821bd9d11ea0707074c5fe11dead2e85476ebd
[ "MIT" ]
null
null
null
"""count - itertools""" # Apresentação do count from itertools import count # aceita número de ponto flutuante como step, mas n aceita um limite. contador = count(start=5, step=0.05) for v in contador: print(round(v, 2)) # arredonda em duas casas decimais if v > 10: break print(separador()) contador =...
26
69
0.668803
def separador(): return "-="*30 """count - itertools""" # Apresentação do count from itertools import count # aceita número de ponto flutuante como step, mas n aceita um limite. contador = count(start=5, step=0.05) for v in contador: print(round(v, 2)) # arredonda em duas casas decimais if v > 10: ...
14
0
22
15d1c16a4bd6e9bc254169bd4f69686b3112f911
6,671
py
Python
mongodb_consistent_backup/Sharding.py
cprato79/mongodb_consistent_backup
d780ad545b603d3a2f807e1813f1de407e81f1ba
[ "Apache-2.0" ]
1
2020-10-20T06:01:21.000Z
2020-10-20T06:01:21.000Z
mongodb_consistent_backup/Sharding.py
cprato79/mongodb_consistent_backup
d780ad545b603d3a2f807e1813f1de407e81f1ba
[ "Apache-2.0" ]
null
null
null
mongodb_consistent_backup/Sharding.py
cprato79/mongodb_consistent_backup
d780ad545b603d3a2f807e1813f1de407e81f1ba
[ "Apache-2.0" ]
1
2020-10-20T06:01:25.000Z
2020-10-20T06:01:25.000Z
import logging from time import sleep from mongodb_consistent_backup.Common import DB, MongoUri, validate_hostname from mongodb_consistent_backup.Errors import DBOperationError, Error, OperationError from mongodb_consistent_backup.Replication import Replset
41.69375
106
0.575326
import logging from time import sleep from mongodb_consistent_backup.Common import DB, MongoUri, validate_hostname from mongodb_consistent_backup.Errors import DBOperationError, Error, OperationError from mongodb_consistent_backup.Replication import Replset class Sharding: def __init__(self, config, timer, db):...
6,097
-6
319
87032d2863af5326c2d522426973813601f385f1
2,817
py
Python
turbo_palm_tree/utility/parse_subreddit_list.py
jtara1/turbo_palm_tree
96ebe40aa176f1bb4acd036be8581666aa47ca17
[ "Apache-2.0" ]
4
2016-10-16T21:39:47.000Z
2019-11-12T05:56:17.000Z
turbo_palm_tree/utility/parse_subreddit_list.py
jtara1/turbo_palm_tree
96ebe40aa176f1bb4acd036be8581666aa47ca17
[ "Apache-2.0" ]
17
2017-12-31T08:43:09.000Z
2018-06-12T19:24:40.000Z
turbo_palm_tree/utility/parse_subreddit_list.py
jtara1/turbo_palm_tree
96ebe40aa176f1bb4acd036be8581666aa47ca17
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Aug 30 15:26:13 2016 @author: jtara1 General syntax for subreddits.txt: : (colon character) denotes folder name subreddit url or word denotes subreddit For more examples see https://github.com/jtara1/RedditImageGrab/commit/8e4787ef9ac43ca694fc663be026f69a568bb622 Example o...
29.968085
111
0.648562
# -*- coding: utf-8 -*- """ Created on Tue Aug 30 15:26:13 2016 @author: jtara1 General syntax for subreddits.txt: : (colon character) denotes folder name subreddit url or word denotes subreddit For more examples see https://github.com/jtara1/RedditImageGrab/commit/8e4787ef9ac43ca694fc663be026f69a568bb622 Example o...
0
0
0
73788cb6f0857ad4d9db4996d005b5a40c26d508
2,609
py
Python
jmm/scripts/entry_point.py
zqmillet/japanese_media_manager
7f7c9ba9f48e67c5f68f80b6fe09675aded05858
[ "MIT" ]
null
null
null
jmm/scripts/entry_point.py
zqmillet/japanese_media_manager
7f7c9ba9f48e67c5f68f80b6fe09675aded05858
[ "MIT" ]
null
null
null
jmm/scripts/entry_point.py
zqmillet/japanese_media_manager
7f7c9ba9f48e67c5f68f80b6fe09675aded05858
[ "MIT" ]
null
null
null
from argparse import ArgumentParser from jmm.scripts.generate_configuration import generate_configuration from jmm.scripts.scrape import scrape from jmm.scripts.valid_configuration import valid_configuration from jmm.scripts.show_version import show_version from jmm.scripts import command as COMMAND if __name__ == '_...
33.448718
142
0.684553
from argparse import ArgumentParser from jmm.scripts.generate_configuration import generate_configuration from jmm.scripts.scrape import scrape from jmm.scripts.valid_configuration import valid_configuration from jmm.scripts.show_version import show_version from jmm.scripts import command as COMMAND def main() -> Non...
2,225
0
23
150ff69ccf3f48a574d3df803edbed10977201dd
3,168
py
Python
test/v4.1/06_rat_to_rel_test.py
gavinIRL/RHBot
1e22ae5ca7b67ebd6a72c23d9f46d5a8eb6e99cf
[ "MIT" ]
null
null
null
test/v4.1/06_rat_to_rel_test.py
gavinIRL/RHBot
1e22ae5ca7b67ebd6a72c23d9f46d5a8eb6e99cf
[ "MIT" ]
60
2021-03-29T14:29:49.000Z
2021-05-03T06:06:19.000Z
test/v4/06_rat_to_rel_test.py
gavinIRL/RHBot
1e22ae5ca7b67ebd6a72c23d9f46d5a8eb6e99cf
[ "MIT" ]
null
null
null
# This file is for testing and verifying the ratio-to-true calculation # It will be done in real-time rather than as part of test 5 # As it will be much quicker to debug for #54 import pyautogui import sys import time from windowcapture import WindowCapture import os print('Press Ctrl-C to quit.') if __name__ == "_...
39.111111
78
0.57197
# This file is for testing and verifying the ratio-to-true calculation # It will be done in real-time rather than as part of test 5 # As it will be much quicker to debug for #54 import pyautogui import sys import time from windowcapture import WindowCapture import os print('Press Ctrl-C to quit.') class ConvertTest(...
2,670
-1
131
f30c69b7f172c3e2a035ed0d520b8882438ecaf2
1,426
py
Python
python/pyclaw/evolve/rp/rp_advection.py
rypjones/D-Claw
6eed8cc5270bf53768e25fa20fa5259cb3c1532e
[ "BSD-3-Clause" ]
7
2016-11-13T03:11:51.000Z
2021-09-07T18:59:48.000Z
python/pyclaw/evolve/rp/rp_advection.py
rypjones/D-Claw
6eed8cc5270bf53768e25fa20fa5259cb3c1532e
[ "BSD-3-Clause" ]
11
2020-01-14T18:00:37.000Z
2022-03-29T14:25:24.000Z
python/pyclaw/evolve/rp/rp_advection.py
rypjones/D-Claw
6eed8cc5270bf53768e25fa20fa5259cb3c1532e
[ "BSD-3-Clause" ]
6
2020-01-14T17:15:42.000Z
2021-12-03T17:28:44.000Z
#!/usr/bin/env python # encoding: utf-8 r""" Simple advection Riemann solvers Basic advection Riemann solvers of the form (1d) .. math:: q_t + A q_x = 0. :Authors: Kyle T. Mandli (2008-2-20): Initial version """ # ============================================================================ # Copyrig...
25.017544
78
0.517532
#!/usr/bin/env python # encoding: utf-8 r""" Simple advection Riemann solvers Basic advection Riemann solvers of the form (1d) .. math:: q_t + A q_x = 0. :Authors: Kyle T. Mandli (2008-2-20): Initial version """ # ============================================================================ # Copyrig...
0
0
0
49ee7d7222697c5b890a55e3050851794cb913ba
410
py
Python
bezman_shop/accounts/migrations/0002_customer_phone.py
baiztheprogrammer/bezman
2be9415fa5a6c74ec4922dc5d898f8fb17927be5
[ "MIT" ]
null
null
null
bezman_shop/accounts/migrations/0002_customer_phone.py
baiztheprogrammer/bezman
2be9415fa5a6c74ec4922dc5d898f8fb17927be5
[ "MIT" ]
null
null
null
bezman_shop/accounts/migrations/0002_customer_phone.py
baiztheprogrammer/bezman
2be9415fa5a6c74ec4922dc5d898f8fb17927be5
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2020-12-02 06:26 from django.db import migrations, models
20.5
49
0.585366
# Generated by Django 3.1.3 on 2020-12-02 06:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0001_initial'), ] operations = [ migrations.AddField( model_name='customer', name='phone', f...
0
296
23
e40b6cb20eca84551c1c82862d4948b634c023ca
147
py
Python
citylocations/views.py
minaelee/django_cityloc_pkg_minaelee
24aac64007cfd64f5a464005986b5b2bb1c7d3c0
[ "MIT" ]
2
2022-01-19T02:33:11.000Z
2022-01-19T02:33:13.000Z
citylocations/views.py
minaelee/django_cityloc_pkg_minaelee
24aac64007cfd64f5a464005986b5b2bb1c7d3c0
[ "MIT" ]
null
null
null
citylocations/views.py
minaelee/django_cityloc_pkg_minaelee
24aac64007cfd64f5a464005986b5b2bb1c7d3c0
[ "MIT" ]
1
2022-03-04T12:47:45.000Z
2022-03-04T12:47:45.000Z
from django.shortcuts import render # Create your views here.
21
60
0.748299
from django.shortcuts import render # Create your views here. def loc_nyc(request): return render(request, 'citylocations/loc_nyc.html', {})
61
0
22
40b3d7567dcaf95a2cec3ebf7551fe018259b5fa
10,289
py
Python
aim_va/train.py
sisl/neat
42758d910f453686366eddfd1aed440e34c94828
[ "MIT" ]
183
2021-08-18T13:22:37.000Z
2022-03-31T08:40:48.000Z
aim_va/train.py
sisl/neat
42758d910f453686366eddfd1aed440e34c94828
[ "MIT" ]
10
2021-09-24T15:30:06.000Z
2022-03-25T11:19:23.000Z
aim_va/train.py
sisl/neat
42758d910f453686366eddfd1aed440e34c94828
[ "MIT" ]
21
2021-09-11T13:32:54.000Z
2022-03-23T16:55:53.000Z
import argparse import json import os import numpy as np import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader import torch.nn.functional as F torch.backends.cudnn.benchmark = True from model import MultiTaskImageNetwork from data import CARLA_Data from class_converter...
32.977564
151
0.712411
import argparse import json import os import numpy as np import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader import torch.nn.functional as F torch.backends.cudnn.benchmark = True from model import MultiTaskImageNetwork from data import CARLA_Data from class_converter...
5,188
0
96
b4efd4a90ea51089667b34a662653fecb46ca69a
4,575
py
Python
demo/2D/air_conditioning.py
Mopolino8/pylbm
b457ccdf1e7a1009807bd1136a276886f81a9e7d
[ "BSD-3-Clause" ]
null
null
null
demo/2D/air_conditioning.py
Mopolino8/pylbm
b457ccdf1e7a1009807bd1136a276886f81a9e7d
[ "BSD-3-Clause" ]
null
null
null
demo/2D/air_conditioning.py
Mopolino8/pylbm
b457ccdf1e7a1009807bd1136a276886f81a9e7d
[ "BSD-3-Clause" ]
1
2019-11-24T17:13:26.000Z
2019-11-24T17:13:26.000Z
import numpy as np import sympy as sp import mpi4py.MPI as mpi import pylbm X, Y, LA = sp.symbols('X, Y, LA') rho, qx, qy, T = sp.symbols('rho, qx, qy, T') def run(dx, Tf, generator="cython", sorder=None, withPlot=True): """ Parameters ---------- dx: double spatial step Tf: double ...
28.416149
137
0.459672
import numpy as np import sympy as sp import mpi4py.MPI as mpi import pylbm X, Y, LA = sp.symbols('X, Y, LA') rho, qx, qy, T = sp.symbols('rho, qx, qy, T') def init_T(x, y, T0): return T0 def bc(f, m, x, y, T0): m[qx] = 0. m[qy] = 0. m[T] = T0 def bc_in(f, m, x, y, T0, Tin, ymax, rhoo, uo): m[q...
591
0
123
6bef6489809c1f89d4a55a23a3a461aeb8d2b118
5,341
py
Python
timeeval_gui/pages/gutentag.py
HPI-Information-Systems/TimeEval-GUI
b6c857d8b5ce74660c6be5cdb1dfb9f509e0bd48
[ "MIT" ]
null
null
null
timeeval_gui/pages/gutentag.py
HPI-Information-Systems/TimeEval-GUI
b6c857d8b5ce74660c6be5cdb1dfb9f509e0bd48
[ "MIT" ]
null
null
null
timeeval_gui/pages/gutentag.py
HPI-Information-Systems/TimeEval-GUI
b6c857d8b5ce74660c6be5cdb1dfb9f509e0bd48
[ "MIT" ]
null
null
null
import warnings from typing import Tuple, Dict import streamlit as st from gutenTAG import GutenTAG from timeeval_gui.timeseries_config import TimeSeriesConfig from timeeval_gui.utils import get_base_oscillations, get_anomaly_types, get_anomaly_params, \ get_base_oscillation_parameters from .page import Page from...
39.562963
117
0.649691
import warnings from typing import Tuple, Dict import streamlit as st from gutenTAG import GutenTAG from timeeval_gui.timeseries_config import TimeSeriesConfig from timeeval_gui.utils import get_base_oscillations, get_anomaly_types, get_anomaly_params, \ get_base_oscillation_parameters from .page import Page from...
4,774
4
214
c7c34fe453581fe316f348a07f2451f2d0cde38b
338
py
Python
bsff/actors/migrations/0002_auto_20210517_0212.py
ErikSeguinte/BSFF_Django
a4dde02b2af233bbcf0c625c20a5f2814a8ca214
[ "MIT" ]
null
null
null
bsff/actors/migrations/0002_auto_20210517_0212.py
ErikSeguinte/BSFF_Django
a4dde02b2af233bbcf0c625c20a5f2814a8ca214
[ "MIT" ]
null
null
null
bsff/actors/migrations/0002_auto_20210517_0212.py
ErikSeguinte/BSFF_Django
a4dde02b2af233bbcf0c625c20a5f2814a8ca214
[ "MIT" ]
null
null
null
# Generated by Django 3.1.11 on 2021-05-17 02:12 from django.db import migrations
18.777778
48
0.579882
# Generated by Django 3.1.11 on 2021-05-17 02:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('actors', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='actor', options={'ordering': ['full_name']},...
0
231
23
005e22a20ac5fadd1b8f8ad254b24fcf4dcaa32e
2,301
py
Python
networktoolkit/arpspoof.py
mokytis/networktoolkit
22f2facbb948a30eb63c8cdb2797a98ad771cfde
[ "MIT" ]
1
2021-12-15T22:55:16.000Z
2021-12-15T22:55:16.000Z
networktoolkit/arpspoof.py
mokytis/networktoolkit
22f2facbb948a30eb63c8cdb2797a98ad771cfde
[ "MIT" ]
null
null
null
networktoolkit/arpspoof.py
mokytis/networktoolkit
22f2facbb948a30eb63c8cdb2797a98ad771cfde
[ "MIT" ]
1
2022-02-25T07:04:29.000Z
2022-02-25T07:04:29.000Z
import time import click import scapy.all as scapy from networktoolkit import networkscan def gen_arp_response(target_ip, spoof_ip): """Generates an ARP Response packet :param target_ip: ip address to send packet to :param spoof_ip: ip address to spoof :return: A scapy packet """ if scan_...
30.68
124
0.65189
import time import click import scapy.all as scapy from networktoolkit import networkscan def gen_arp_response(target_ip, spoof_ip): """Generates an ARP Response packet :param target_ip: ip address to send packet to :param spoof_ip: ip address to spoof :return: A scapy packet """ if scan_...
88
0
22
817067682d486b5c02eeb1fa01201094f32b22f1
1,832
py
Python
simpleTicket/siteEngine/entities_utils.py
abogeorge/simpleTicket
ca550f4e9817e13e5723ad2483baddc036e435f5
[ "MIT" ]
null
null
null
simpleTicket/siteEngine/entities_utils.py
abogeorge/simpleTicket
ca550f4e9817e13e5723ad2483baddc036e435f5
[ "MIT" ]
null
null
null
simpleTicket/siteEngine/entities_utils.py
abogeorge/simpleTicket
ca550f4e9817e13e5723ad2483baddc036e435f5
[ "MIT" ]
null
null
null
from .models import Ticket, UserProfile, Order, TicketType, OrderType # Retrieving user profile for the specified user # Retrieving tickets for the specificied user profile # Retrieving orders for the specified user profile # Retrieving the total number of subalterns for a specific user profile # Retrieving a list...
32.714286
75
0.720524
from .models import Ticket, UserProfile, Order, TicketType, OrderType # Retrieving user profile for the specified user def get_profile_for_user(user): try: user_profile = user.userprofile return user_profile except UserProfile.DoesNotExist: return None # Retrieving tickets for the spec...
1,119
0
176
da7ed9ea4c2133be2c1a9db446d0ee720683a339
961
py
Python
scheduler/migrations/0004_auto_20181108_1604.py
gijzelaerr/buis
9878919fe58f600634306da78ce3c5ddba8388c1
[ "Apache-2.0" ]
null
null
null
scheduler/migrations/0004_auto_20181108_1604.py
gijzelaerr/buis
9878919fe58f600634306da78ce3c5ddba8388c1
[ "Apache-2.0" ]
18
2018-09-28T15:42:15.000Z
2019-12-17T08:56:28.000Z
scheduler/migrations/0004_auto_20181108_1604.py
gijzelaerr/buis
9878919fe58f600634306da78ce3c5ddba8388c1
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.1 on 2018-11-08 16:04 from django.db import migrations, models import django.db.models.deletion
34.321429
148
0.631634
# Generated by Django 2.1.1 on 2018-11-08 16:04 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('scheduler', '0003_auto_20181108_1124'), ] operations = [ migrations.CreateModel( name='Workflow...
0
814
23
35bdd77688b7d457b6ece73ef67063f6a8a6f99b
5,467
py
Python
tests/transaction_test.py
rbbonfim/pagarme-python
a7079fbdd01bd855ea09f89847d6374b499be76b
[ "MIT" ]
79
2015-08-25T14:43:34.000Z
2021-12-01T18:16:54.000Z
tests/transaction_test.py
rbbonfim/pagarme-python
a7079fbdd01bd855ea09f89847d6374b499be76b
[ "MIT" ]
103
2015-09-15T15:24:14.000Z
2021-12-20T22:52:02.000Z
tests/transaction_test.py
rbbonfim/pagarme-python
a7079fbdd01bd855ea09f89847d6374b499be76b
[ "MIT" ]
53
2015-09-11T12:06:26.000Z
2022-02-23T02:59:57.000Z
from pagarme import transaction from tests.resources.dictionaries import transaction_dictionary import pytest import time
42.053846
122
0.788001
from pagarme import transaction from tests.resources.dictionaries import transaction_dictionary import pytest import time def test_calculate_installments_amount(): array_installments = transaction.calculate_installments_amount(transaction_dictionary.CALCULATE_INTALLMENTS_AMOUNT) assert array_installments['ins...
4,889
0
437
b7c4c865ea08866f15cac2e1cf22972cf9599e7a
794
py
Python
database.py
ngmhprogramming/Contact-Book
664a76087e8b35e1dfbb1f8fd33b1866c81849fb
[ "MIT" ]
4
2018-09-24T18:29:07.000Z
2019-03-04T13:58:19.000Z
database.py
ngmhprogramming/Contact-Book
664a76087e8b35e1dfbb1f8fd33b1866c81849fb
[ "MIT" ]
null
null
null
database.py
ngmhprogramming/Contact-Book
664a76087e8b35e1dfbb1f8fd33b1866c81849fb
[ "MIT" ]
null
null
null
#Database setup file #Useful when setting up for first time import sqlite3 conn = sqlite3.connect("/home/contactbook/website/storage.db") c = conn.cursor() #Create tables for users and books c.execute("DROP TABLE IF EXISTS users;") c.execute(""" CREATE TABLE IF NOT EXISTS users( id integer PRIMARY KE...
23.352941
64
0.680101
#Database setup file #Useful when setting up for first time import sqlite3 conn = sqlite3.connect("/home/contactbook/website/storage.db") c = conn.cursor() #Create tables for users and books c.execute("DROP TABLE IF EXISTS users;") c.execute(""" CREATE TABLE IF NOT EXISTS users( id integer PRIMARY KE...
0
0
0
140a2bed33d4c40bd9b60cc12d01904376b73824
1,665
py
Python
powergate/deals-POW-to-db.py
deplatformr/open-images
3726c9802bda1d7ecbbbd9920d5566daaecc9faa
[ "MIT" ]
2
2020-10-12T02:37:54.000Z
2020-10-14T15:16:49.000Z
powergate/deals-POW-to-db.py
deplatformr/open-images
3726c9802bda1d7ecbbbd9920d5566daaecc9faa
[ "MIT" ]
null
null
null
powergate/deals-POW-to-db.py
deplatformr/open-images
3726c9802bda1d7ecbbbd9920d5566daaecc9faa
[ "MIT" ]
null
null
null
import os import sqlite3 from datetime import datetime from pygate_grpc.client import PowerGateClient api = os.getenv('POWERGATE_API') token = os.getenv('POWERGATE_TOKEN') powergate = PowerGateClient(api, False) # get final storage deals info storage_deals = powergate.deals.storage_deal_records( include_pending=...
37.840909
305
0.678078
import os import sqlite3 from datetime import datetime from pygate_grpc.client import PowerGateClient api = os.getenv('POWERGATE_API') token = os.getenv('POWERGATE_TOKEN') powergate = PowerGateClient(api, False) # get final storage deals info storage_deals = powergate.deals.storage_deal_records( include_pending=...
0
0
0
8fd90e04dbe2c00d88ef581ceaa121652977d3e3
4,981
py
Python
sqlany_django/introspection.py
TheProjecter/sqlany-django
363be27eab819d879135422a78623b6ed487799a
[ "BSD-3-Clause" ]
null
null
null
sqlany_django/introspection.py
TheProjecter/sqlany-django
363be27eab819d879135422a78623b6ed487799a
[ "BSD-3-Clause" ]
null
null
null
sqlany_django/introspection.py
TheProjecter/sqlany-django
363be27eab819d879135422a78623b6ed487799a
[ "BSD-3-Clause" ]
null
null
null
from django.db.backends import BaseDatabaseIntrospection from sqlanydb import ProgrammingError, OperationalError import re import sqlanydb foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)")
47.894231
114
0.566754
from django.db.backends import BaseDatabaseIntrospection from sqlanydb import ProgrammingError, OperationalError import re import sqlanydb foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)") class DatabaseIntrospection(BaseDatabaseIntrospection): data...
0
4,703
23
6124b4133af3c7aa4d43412211a0b2674e595a90
635
py
Python
test/cross_check_sklearn.py
Anselmoo/python-neuralnetwork
0c2d1e457f065b7f1a505f8a8182b134d6a8d3a0
[ "MIT" ]
null
null
null
test/cross_check_sklearn.py
Anselmoo/python-neuralnetwork
0c2d1e457f065b7f1a505f8a8182b134d6a8d3a0
[ "MIT" ]
null
null
null
test/cross_check_sklearn.py
Anselmoo/python-neuralnetwork
0c2d1e457f065b7f1a505f8a8182b134d6a8d3a0
[ "MIT" ]
null
null
null
from sklearn.neural_network import MLPClassifier from sklearn.model_selection import cross_validate if __name__ == '__main__': sklearn_reference_XOR()
35.277778
82
0.63622
from sklearn.neural_network import MLPClassifier from sklearn.model_selection import cross_validate def sklearn_reference_XOR(): X = [[0., 0.], [0., 1.], [1., 0.], [1., 1.]] y = [0., 1., 1., 0. ] clf = MLPClassifier(solver='lbfgs', alpha=1e-5, hidden_layer_sizes=(2, ), random_state=4...
457
0
23
2d7d85f85898bc2dd76286805e3dc6b7cdaca0f7
632
py
Python
src/py/bundle.py
iTNTPiston/celer-compiler
af9c1175eab3ee44eecd78f54f4e38e6d6475045
[ "MIT" ]
null
null
null
src/py/bundle.py
iTNTPiston/celer-compiler
af9c1175eab3ee44eecd78f54f4e38e6d6475045
[ "MIT" ]
1
2022-03-07T20:17:50.000Z
2022-03-07T20:17:50.000Z
src/py/bundle.py
iTNTPiston/celer-compiler
af9c1175eab3ee44eecd78f54f4e38e6d6475045
[ "MIT" ]
null
null
null
# This is a standalone bundler. You can use this script by itself # The output is a minimized JSON, which can be distributed # Usage: py gbundle.py <inputPath> # Output: bundle.json # PY_INJECT __main__()
23.407407
66
0.65981
# This is a standalone bundler. You can use this script by itself # The output is a minimized JSON, which can be distributed # Usage: py gbundle.py <inputPath> # Output: bundle.json # PY_INJECT def __main__(): if len(sys.argv) < 2: print(f"Usage: {sys.argv[0]} <input> ") sys.exit(1) ...
334
0
75
33bbccef791bf6998e92aa9345e31ada5e955e49
397
py
Python
python_on_whales/components/volume/models.py
haruishi43/python-on-whales
e26c3e4367428588bad0b028c7258124a111c0c6
[ "MIT" ]
null
null
null
python_on_whales/components/volume/models.py
haruishi43/python-on-whales
e26c3e4367428588bad0b028c7258124a111c0c6
[ "MIT" ]
null
null
null
python_on_whales/components/volume/models.py
haruishi43/python-on-whales
e26c3e4367428588bad0b028c7258124a111c0c6
[ "MIT" ]
null
null
null
from datetime import datetime from pathlib import Path from typing import Any, Dict, Optional from python_on_whales.utils import DockerCamelModel
23.352941
51
0.740554
from datetime import datetime from pathlib import Path from typing import Any, Dict, Optional from python_on_whales.utils import DockerCamelModel class VolumeInspectResult(DockerCamelModel): name: str driver: str mountpoint: Path created_at: datetime status: Optional[Dict[str, Any]] labels: O...
0
226
23
dfba76ff816591f4dcdb97195c8669ae29966c72
569
py
Python
04_TreesAndGraphs/Graph/class_Node.py
Chipdelmal/DataStructures
426e30b91e8f27843be1d9385dc800e5d0dc8d3f
[ "MIT" ]
1
2019-07-11T22:31:15.000Z
2019-07-11T22:31:15.000Z
04_TreesAndGraphs/Graph/class_Node.py
Chipdelmal/DataStructures
426e30b91e8f27843be1d9385dc800e5d0dc8d3f
[ "MIT" ]
null
null
null
04_TreesAndGraphs/Graph/class_Node.py
Chipdelmal/DataStructures
426e30b91e8f27843be1d9385dc800e5d0dc8d3f
[ "MIT" ]
null
null
null
############################################################################## # Node Class ##############################################################################
21.884615
78
0.42355
############################################################################## # Node Class ############################################################################## class Node(object): def __init__(self, data, links=None): self.__data = data self.__links = links @property def data(s...
179
195
23
450f23a1a2007d7e44f1b7e317ae1cae7a8ed2e1
5,133
py
Python
gimmemotifs/config.py
kipkurui/gimmemotifs
51bd0c6700877f79179f08e5bab7de70fc2eab94
[ "MIT" ]
1
2019-07-14T08:28:25.000Z
2019-07-14T08:28:25.000Z
gimmemotifs/config.py
kipkurui/gimmemotifs
51bd0c6700877f79179f08e5bab7de70fc2eab94
[ "MIT" ]
null
null
null
gimmemotifs/config.py
kipkurui/gimmemotifs
51bd0c6700877f79179f08e5bab7de70fc2eab94
[ "MIT" ]
null
null
null
# Copyright (c) 2009-2013 Simon van Heeringen <s.vanheeringen@ncmls.ru.nl> # # This module is free software. You can redistribute it and/or modify it under # the terms of the MIT License, see the file COPYING included with this # distribution. """ Configuration for GimmeMotifs """ import ConfigParser import distutil...
32.08125
79
0.606078
# Copyright (c) 2009-2013 Simon van Heeringen <s.vanheeringen@ncmls.ru.nl> # # This module is free software. You can redistribute it and/or modify it under # the terms of the MIT License, see the file COPYING included with this # distribution. """ Configuration for GimmeMotifs """ import ConfigParser import distutil...
3,298
1,085
23
3daae4c1808fd8866972b8fbcba8e9f6495ccb2a
2,914
py
Python
MODULES/Persistence_RegistryRunKeys_SharpHide.py
evi1hack/viperpython
04bf8e31e21385edb58ea9d25296df062197df39
[ "BSD-3-Clause" ]
null
null
null
MODULES/Persistence_RegistryRunKeys_SharpHide.py
evi1hack/viperpython
04bf8e31e21385edb58ea9d25296df062197df39
[ "BSD-3-Clause" ]
null
null
null
MODULES/Persistence_RegistryRunKeys_SharpHide.py
evi1hack/viperpython
04bf8e31e21385edb58ea9d25296df062197df39
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # @File : SimpleRewMsfModule.py # @Date : 2019/1/11 # @Desc : from Lib.ModuleAPI import *
38.853333
107
0.578243
# -*- coding: utf-8 -*- # @File : SimpleRewMsfModule.py # @Date : 2019/1/11 # @Desc : from Lib.ModuleAPI import * class PostModule(PostMSFCSharpModule): NAME_ZH = "Windows注册表Run键值持久化(C#)" DESC_ZH = "模块通过调用SharpHide.exe写入隐藏的注册表键值,实现持久化.\n" \ "SharpHide.exe会将目标exe路径写入到注册表Run键值中.\n" NAME_E...
221
2,785
23
68dcb0dea54dfb7d43b1ba7318299abe0fbf09ba
12,135
py
Python
Inference.py
Charlottecuc/Glow_TTS
bb2bd6384cc4ee13e61496c5f380f06d434f168b
[ "MIT" ]
31
2020-07-29T08:02:52.000Z
2022-03-19T12:57:53.000Z
Inference.py
Charlottecuc/Glow_TTS
bb2bd6384cc4ee13e61496c5f380f06d434f168b
[ "MIT" ]
3
2020-11-02T20:14:26.000Z
2021-04-08T01:12:33.000Z
Inference.py
CODEJIN/Glow_TTS
bb2bd6384cc4ee13e61496c5f380f06d434f168b
[ "MIT" ]
9
2020-09-09T03:48:44.000Z
2022-03-24T13:15:21.000Z
import torch import numpy as np import logging, yaml, os, sys, argparse, time, math from tqdm import tqdm import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt from scipy.io import wavfile from random import sample from Modules import GlowTTS from Datasets import Text_to_Token, Token_Stack, Mel_Stack...
38.769968
248
0.602802
import torch import numpy as np import logging, yaml, os, sys, argparse, time, math from tqdm import tqdm import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt from scipy.io import wavfile from random import sample from Modules import GlowTTS from Datasets import Text_to_Token, Token_Stack, Mel_Stack...
9,658
192
175
75f57034047c546f47d90812c02bf87a3533167e
728
py
Python
corehq/sql_proxy_accessors/migrations/0035_livequery_sql.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/sql_proxy_accessors/migrations/0035_livequery_sql.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/sql_proxy_accessors/migrations/0035_livequery_sql.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
# Generated by Django 1.10.7 on 2017-07-03 21:23 from django.conf import settings from django.db import migrations from corehq.sql_db.operations import RawSQLMigration migrator = RawSQLMigration(('corehq', 'sql_proxy_accessors', 'sql_templates'), { 'PL_PROXY_CLUSTER_NAME': settings.PL_PROXY_CLUSTER_NAME })
26
80
0.696429
# Generated by Django 1.10.7 on 2017-07-03 21:23 from django.conf import settings from django.db import migrations from corehq.sql_db.operations import RawSQLMigration migrator = RawSQLMigration(('corehq', 'sql_proxy_accessors', 'sql_templates'), { 'PL_PROXY_CLUSTER_NAME': settings.PL_PROXY_CLUSTER_NAME }) cl...
0
388
23
df4317f0c3c77e1436e79549c46cfdffd452373a
5,772
py
Python
lib/services/vpc/ncloud_vpc/model/route_parameter.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
12
2018-11-20T04:30:49.000Z
2021-11-09T12:34:26.000Z
lib/services/vpc/ncloud_vpc/model/route_parameter.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
1
2019-01-24T15:56:15.000Z
2019-05-31T07:56:55.000Z
lib/services/vpc/ncloud_vpc/model/route_parameter.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
6
2018-06-29T03:45:50.000Z
2022-03-18T01:51:45.000Z
# coding: utf-8 """ vpc Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class RouteParameter(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ ...
29.151515
123
0.602044
# coding: utf-8 """ vpc Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class RouteParameter(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ ...
0
0
0
d25d20d59baab1a7b7b3a00000bbbf30e1321af4
406
py
Python
src/morpyengine/Systems/Render.py
Morgiver/morpyengine
c02cb575edfb4d4cec3e09cec5869c53ef9772ab
[ "MIT" ]
null
null
null
src/morpyengine/Systems/Render.py
Morgiver/morpyengine
c02cb575edfb4d4cec3e09cec5869c53ef9772ab
[ "MIT" ]
null
null
null
src/morpyengine/Systems/Render.py
Morgiver/morpyengine
c02cb575edfb4d4cec3e09cec5869c53ef9772ab
[ "MIT" ]
null
null
null
import sdl2 import sdl2.ext
23.882353
66
0.628079
import sdl2 import sdl2.ext def line(surface, x1, y1, x2, y2, color): color = sdl2.ext.Color(color[0], color[1], color[2], color[3]) sdl2.ext.line(surface, color, (x1, y1, x2, y2)) def rect(surface, x, y, w, h, color): color = sdl2.ext.Color(color[0], color[1], color[2], color[3]) sdl2.ext.fill(surf...
306
0
69
507fea8ae32e927570bfb219cf5df38fee51a960
801
py
Python
algo/binary_search.py
xta0/Python-Playground
513ebd2ad7f0a8c69f2f04b4f7524b31e76fa5bc
[ "MIT" ]
null
null
null
algo/binary_search.py
xta0/Python-Playground
513ebd2ad7f0a8c69f2f04b4f7524b31e76fa5bc
[ "MIT" ]
null
null
null
algo/binary_search.py
xta0/Python-Playground
513ebd2ad7f0a8c69f2f04b4f7524b31e76fa5bc
[ "MIT" ]
null
null
null
import random array = random.sample(range(1,100),10) print(array) array.sort() print(array) print(binary_search(array,array[3]) == 3) print(binary_search_recursive(array,array[3],0,9) == 3)
23.558824
58
0.58427
import random def binary_search(array, num): first = 0 last = len(array)-1 while first <= last: mid = int((first+last)/2) if array[mid] == num: return mid elif array[mid] > num: last = mid - 1 else: first = mid + 1 return -1 def...
563
0
46
6b4ac45c387dae4b8a7314dd745975b9f471d987
2,606
py
Python
Ball.py
andresnowak/Pong
6c655de33707d7b59387624739e32c000ede6de0
[ "MIT" ]
null
null
null
Ball.py
andresnowak/Pong
6c655de33707d7b59387624739e32c000ede6de0
[ "MIT" ]
null
null
null
Ball.py
andresnowak/Pong
6c655de33707d7b59387624739e32c000ede6de0
[ "MIT" ]
null
null
null
import pygame
29.280899
95
0.592863
import pygame class Ball: RADIUS = 20 HIDE = pygame.Color("black") # color to hide the ball with background SHOW = pygame.Color("white") # color tho show the ball def __init__(self, x, y, vx, vy, screen): self.x = x self.y = y self.vx = vx self.vy = vy self...
1,015
1,553
23
484cf743c24ab1fbee7284ccc093c584638eaedf
3,381
py
Python
standard-training/utils/figure_3_plotter.py
kaustubhsridhar/PoE-robustness
878bd94c64534afc4fdff04ada9e12aab6ed4b28
[ "MIT" ]
null
null
null
standard-training/utils/figure_3_plotter.py
kaustubhsridhar/PoE-robustness
878bd94c64534afc4fdff04ada9e12aab6ed4b28
[ "MIT" ]
null
null
null
standard-training/utils/figure_3_plotter.py
kaustubhsridhar/PoE-robustness
878bd94c64534afc4fdff04ada9e12aab6ed4b28
[ "MIT" ]
1
2022-03-10T05:28:58.000Z
2022-03-10T05:28:58.000Z
import numpy as np import matplotlib.pyplot as plt plt.style.use('seaborn') plt.rc('font', size=24) # controls default text sizes plt.rc('axes', titlesize=24) # fontsize of the axes title plt.rc('axes', labelsize=24) # fontsize of the x and y labels plt.rc('xtick', labelsize=24) # fontsize of the ti...
41.740741
97
0.598639
import numpy as np import matplotlib.pyplot as plt plt.style.use('seaborn') plt.rc('font', size=24) # controls default text sizes plt.rc('axes', titlesize=24) # fontsize of the axes title plt.rc('axes', labelsize=24) # fontsize of the x and y labels plt.rc('xtick', labelsize=24) # fontsize of the ti...
2,780
0
92
d2a704e29e850f8c185306db4f5217c7f428ffa9
8,393
py
Python
app.py
brand-fabian/ood-xdmod
0d232bed6905e66ccc270f8e96af6bc0c7fbc425
[ "MIT" ]
null
null
null
app.py
brand-fabian/ood-xdmod
0d232bed6905e66ccc270f8e96af6bc0c7fbc425
[ "MIT" ]
null
null
null
app.py
brand-fabian/ood-xdmod
0d232bed6905e66ccc270f8e96af6bc0c7fbc425
[ "MIT" ]
null
null
null
import requests import base64 import zlib import re from urllib.parse import quote, unquote import urllib3 from flask import Flask, redirect, request, Response from uuid import uuid4 from textwrap import wrap from lxml import etree urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) xdmod = Flask(__name...
35.264706
109
0.577028
import requests import base64 import zlib import re from urllib.parse import quote, unquote import urllib3 from flask import Flask, redirect, request, Response from uuid import uuid4 from textwrap import wrap from lxml import etree urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) xdmod = Flask(__name...
7,441
0
205
fe6b21eaf265ba3e318f32fa7935241ff691cad5
364
py
Python
source code samples/Network/client.py
NelsonBilber/python-overview
7438eddebaf33b534eb8a06da7769744e54052b1
[ "MIT" ]
null
null
null
source code samples/Network/client.py
NelsonBilber/python-overview
7438eddebaf33b534eb8a06da7769744e54052b1
[ "MIT" ]
null
null
null
source code samples/Network/client.py
NelsonBilber/python-overview
7438eddebaf33b534eb8a06da7769744e54052b1
[ "MIT" ]
null
null
null
# echo server - client # source code from here -> https://realpython.com/python-sockets/ import socket HOST = '127.0.0.1' PORT = 65432 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.connect((HOST, PORT)) s.sendall(b'Hello from client script') data = s.recv(1024) print ('Rece...
26
66
0.67033
# echo server - client # source code from here -> https://realpython.com/python-sockets/ import socket HOST = '127.0.0.1' PORT = 65432 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.connect((HOST, PORT)) s.sendall(b'Hello from client script') data = s.recv(1024) print ('Rece...
0
0
0
f04935366d11084ad6a2d168289b83338e9f447a
6,500
py
Python
scale/ingest/triggers/configuration/ingest_trigger_rule_1_0.py
stevevarner/scale
9623b261db4ddcf770f00df16afc91176142bb7c
[ "Apache-2.0" ]
null
null
null
scale/ingest/triggers/configuration/ingest_trigger_rule_1_0.py
stevevarner/scale
9623b261db4ddcf770f00df16afc91176142bb7c
[ "Apache-2.0" ]
null
null
null
scale/ingest/triggers/configuration/ingest_trigger_rule_1_0.py
stevevarner/scale
9623b261db4ddcf770f00df16afc91176142bb7c
[ "Apache-2.0" ]
null
null
null
"""Defines the configuration for an ingest trigger""" from __future__ import unicode_literals import logging from jsonschema import validate from jsonschema.exceptions import ValidationError from ingest.triggers.ingest_trigger_condition import IngestTriggerCondition from job.configuration.data.job_connection import ...
36.111111
124
0.638154
"""Defines the configuration for an ingest trigger""" from __future__ import unicode_literals import logging from jsonschema import validate from jsonschema.exceptions import ValidationError from ingest.triggers.ingest_trigger_condition import IngestTriggerCondition from job.configuration.data.job_connection import ...
0
0
0
b48d92b8f54660405f3f06cb6e06183b868aa1a4
5,481
py
Python
pikka_bird_collector/parsers/erlang.py
tiredpixel/pikka-bird-collector-py
5273b9f1ee89831a84044e863db480bbf4730552
[ "MIT" ]
2
2015-06-12T19:55:16.000Z
2019-04-05T22:33:05.000Z
pikka_bird_collector/parsers/erlang.py
tiredpixel/pikka-bird-collector-py
5273b9f1ee89831a84044e863db480bbf4730552
[ "MIT" ]
3
2015-06-06T20:56:03.000Z
2020-01-29T14:41:54.000Z
pikka_bird_collector/parsers/erlang.py
tiredpixel/pikka-bird-collector-py
5273b9f1ee89831a84044e863db480bbf4730552
[ "MIT" ]
null
null
null
import json import re from .base import Base class Erlang(Base): """ Parses simple Erlang data format, as output by RabbitMQ status. e.g. [{pid,296}, {running_applications, [{rabbitmq_management_visualiser,"RabbitMQ Visualiser","3.5.1"}]}] ...
28.252577
83
0.494253
import json import re from .base import Base class Erlang(Base): """ Parses simple Erlang data format, as output by RabbitMQ status. e.g. [{pid,296}, {running_applications, [{rabbitmq_management_visualiser,"RabbitMQ Visualiser","3.5.1"}]}] ...
3,704
0
336