hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7201f3e709cd60912d88e118c8edfe5cfcff4bb
136
py
Python
dora/tests/test_share.py
kingjr/dora
f70fab1620c6cad6fc094be15ab22994bd08dd01
[ "MIT" ]
null
null
null
dora/tests/test_share.py
kingjr/dora
f70fab1620c6cad6fc094be15ab22994bd08dd01
[ "MIT" ]
null
null
null
dora/tests/test_share.py
kingjr/dora
f70fab1620c6cad6fc094be15ab22994bd08dd01
[ "MIT" ]
null
null
null
from dora.share import dump, load def test_dump_load(): x = [1, 2, 4, {'youpi': 'test', 'b': 56.3}] assert load(dump(x)) == x
19.428571
47
0.566176
from dora.share import dump, load def test_dump_load(): x = [1, 2, 4, {'youpi': 'test', 'b': 56.3}] assert load(dump(x)) == x
true
true
f7201f51ef7235aa37e52cd053e5a1d6d1e724eb
4,346
py
Python
kale/utils/download.py
SheffieldAI/pykale
be7670941fb06835883c80477b26702d407017db
[ "MIT" ]
324
2020-11-05T19:07:11.000Z
2022-03-16T21:31:39.000Z
kale/utils/download.py
SheffieldAI/pykale
be7670941fb06835883c80477b26702d407017db
[ "MIT" ]
212
2020-10-31T15:18:59.000Z
2022-03-25T14:13:09.000Z
kale/utils/download.py
sz144/pykale
1f5cce57a50f7772520a482e8135a391eb0517f5
[ "MIT" ]
52
2020-10-28T15:43:48.000Z
2022-02-24T02:29:52.000Z
# =============================================================================== # Author: Xianyuan Liu, xianyuan.liu@outlook.com # Raivo Koot, rekoot1@sheffield.ac.uk # Haiping Lu, h.lu@sheffield.ac.uk or hplu@ieee.org # =============================================================================== ...
46.731183
135
0.654395
import logging import os from pathlib import Path from torch.hub import download_url_to_file from torchvision.datasets.utils import download_and_extract_archive, download_file_from_google_drive, extract_archive def download_file_by_url(url, output_directory, output_file_name, file_format=None): output_di...
true
true
f7202019c7b0f25327f421ee4dd02e608acbb151
581
py
Python
snooker/models/snooker_org/player.py
mgorsk1/snooker
97a3868bd47c3aa3f134d34ee65e8dab21b98227
[ "Apache-2.0" ]
1
2021-04-11T17:48:28.000Z
2021-04-11T17:48:28.000Z
snooker/models/snooker_org/player.py
mgorsk1/snooker
97a3868bd47c3aa3f134d34ee65e8dab21b98227
[ "Apache-2.0" ]
4
2021-04-11T17:26:23.000Z
2021-04-12T06:46:24.000Z
snooker/models/snooker_org/player.py
mgorsk1/snooker
97a3868bd47c3aa3f134d34ee65e8dab21b98227
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from dataclasses_json import dataclass_json from snooker.models import JsonModel @dataclass_json @dataclass class Player(JsonModel): ID: int Type: int FirstName: str MiddleName: str LastName: str TeamName: str TeamNumber: int TeamSeason: int Shor...
17.088235
43
0.678141
from dataclasses import dataclass from dataclasses_json import dataclass_json from snooker.models import JsonModel @dataclass_json @dataclass class Player(JsonModel): ID: int Type: int FirstName: str MiddleName: str LastName: str TeamName: str TeamNumber: int TeamSeason: int Shor...
true
true
f720207daf41b8ead3e5331a1b5737e05d14cbad
2,366
py
Python
tools/double_fully_connection_layer.py
shenyunhang/CSC
2902272a369d4eef1bb37474f0e1f98f6e2e6e2f
[ "MIT" ]
14
2018-07-08T14:36:08.000Z
2021-01-17T10:27:52.000Z
tools/double_fully_connection_layer.py
shenyunhang/CSC
2902272a369d4eef1bb37474f0e1f98f6e2e6e2f
[ "MIT" ]
null
null
null
tools/double_fully_connection_layer.py
shenyunhang/CSC
2902272a369d4eef1bb37474f0e1f98f6e2e6e2f
[ "MIT" ]
4
2019-07-02T02:54:56.000Z
2020-07-03T01:07:22.000Z
#!/usr/bin/env python #-*-coding:utf-8-*- ''' _ooOoo_ o8888888o 88" . "88 (| -_- |) O\ = /O ____/`---'\____ .' \\| |// `. / \\||| : |||// \ / _||||| -:- |||||- \ ...
32.410959
138
0.530431
''' _ooOoo_ o8888888o 88" . "88 (| -_- |) O\ = /O ____/`---'\____ .' \\| |// `. / \\||| : |||// \ / _||||| -:- |||||- \ | | \\\ - /// | | ...
false
true
f7202096a51dcc8e270109c64d1240dfd04ce0a3
2,783
py
Python
jr/plot/meg.py
kingjr/jr-tools
8a4c9c42a9e36e224279566945e798869904c4c8
[ "BSD-2-Clause" ]
11
2016-01-21T22:41:28.000Z
2018-10-07T12:55:18.000Z
jr/plot/meg.py
kingjr/jr-tools
8a4c9c42a9e36e224279566945e798869904c4c8
[ "BSD-2-Clause" ]
2
2016-12-12T14:25:47.000Z
2018-05-07T18:57:42.000Z
jr/plot/meg.py
kingjr/jr-tools
8a4c9c42a9e36e224279566945e798869904c4c8
[ "BSD-2-Clause" ]
17
2016-03-15T17:34:04.000Z
2020-03-15T00:31:14.000Z
import matplotlib.pyplot as plt import numpy as np from . import pretty_plot def plot_butterfly(evoked, ax=None, sig=None, color=None, ch_type=None): from mne import pick_types if ch_type is not None: picks = pick_types(evoked.info, ch_type) evoked = evoked.copy() evoked = evoked.pick_...
40.333333
75
0.565936
import matplotlib.pyplot as plt import numpy as np from . import pretty_plot def plot_butterfly(evoked, ax=None, sig=None, color=None, ch_type=None): from mne import pick_types if ch_type is not None: picks = pick_types(evoked.info, ch_type) evoked = evoked.copy() evoked = evoked.pick_...
true
true
f72020bbaf98f9d38b10dfa1e51aa9ccf67bf9f2
7,055
py
Python
phdhelper/suMMSary/suMMSary.py
jmsplank/phdhelper
c06dd06669b42dbe4c9e1a6eeec3d0ad3885d2eb
[ "MIT" ]
null
null
null
phdhelper/suMMSary/suMMSary.py
jmsplank/phdhelper
c06dd06669b42dbe4c9e1a6eeec3d0ad3885d2eb
[ "MIT" ]
null
null
null
phdhelper/suMMSary/suMMSary.py
jmsplank/phdhelper
c06dd06669b42dbe4c9e1a6eeec3d0ad3885d2eb
[ "MIT" ]
null
null
null
import numpy as np import pyspedas from phdhelper.helpers import title_print from phdhelper.helpers.CONSTANTS import c, k_B, m_e, m_i, mu_0, q from pytplot import data_quants import matplotlib.pyplot as plt from datetime import datetime as dt from cached_property import cached_property class EventHandler: FPI = N...
30.021277
86
0.569667
import numpy as np import pyspedas from phdhelper.helpers import title_print from phdhelper.helpers.CONSTANTS import c, k_B, m_e, m_i, mu_0, q from pytplot import data_quants import matplotlib.pyplot as plt from datetime import datetime as dt from cached_property import cached_property class EventHandler: FPI = N...
true
true
f7202111926ff8fda7156a7c3de15389c446a8d2
1,643
py
Python
models.py
Joshua-Barawa/MyHome
99b5a96f2d7f442afcccfbf042b10a94e0684ee3
[ "PostgreSQL", "Unlicense" ]
null
null
null
models.py
Joshua-Barawa/MyHome
99b5a96f2d7f442afcccfbf042b10a94e0684ee3
[ "PostgreSQL", "Unlicense" ]
null
null
null
models.py
Joshua-Barawa/MyHome
99b5a96f2d7f442afcccfbf042b10a94e0684ee3
[ "PostgreSQL", "Unlicense" ]
null
null
null
from run import db from flask_login import UserMixin class Post(db.Model): __tablename__ = "posts" id = db.Column(db.Integer, primary_key=True) image = db.Column(db.Text) location = db.Column(db.String(255)) title = db.Column(db.String(255)) description = db.Column(db.String) price = db.Co...
31.596154
81
0.664029
from run import db from flask_login import UserMixin class Post(db.Model): __tablename__ = "posts" id = db.Column(db.Integer, primary_key=True) image = db.Column(db.Text) location = db.Column(db.String(255)) title = db.Column(db.String(255)) description = db.Column(db.String) price = db.Co...
true
true
f720216f491ba23be45a34478f494e95df19d04f
1,046
py
Python
perceptron/perceptron.py
coderatwork7/AI-algorithms
63850ae051956d8ed363fa28e5dc51ad26e86198
[ "Apache-2.0" ]
10
2020-06-26T13:19:46.000Z
2021-02-05T09:26:49.000Z
perceptron/perceptron.py
somiljain7/AI-algorithms-
11e9c012cc2f5fb4493bc1ec6b14ddc9cf0fc2d4
[ "Apache-2.0" ]
4
2020-07-17T11:03:38.000Z
2020-10-17T05:23:17.000Z
perceptron/perceptron.py
somiljain7/AI-algorithms-
11e9c012cc2f5fb4493bc1ec6b14ddc9cf0fc2d4
[ "Apache-2.0" ]
9
2020-06-26T13:19:49.000Z
2021-01-02T18:59:30.000Z
import pandas as pd # TODO: Set weight1, weight2, and bias weight1 = 1.5 weight2 = 1.5 bias = -2.0 # DON'T CHANGE ANYTHING BELOW # Inputs and outputs test_inputs = [(0, 0), (0, 1), (1, 0), (1, 1)] correct_outputs = [False, False, False, True] outputs = [] # Generate and check output for test_input, correct_output i...
36.068966
133
0.698853
import pandas as pd weight1 = 1.5 weight2 = 1.5 bias = -2.0 # Inputs and outputs test_inputs = [(0, 0), (0, 1), (1, 0), (1, 1)] correct_outputs = [False, False, False, True] outputs = [] # Generate and check output for test_input, correct_output in zip(test_inputs, correct_outputs): linear_combination = weigh...
true
true
f72021be8eed22953bf2936035e521ed13862e22
4,547
py
Python
tests/runnable/proxy/proxy_simple_test_case.py
gift-surg/puma
58beae3459a0c8d96adfe9af323e26868428df4d
[ "Apache-2.0" ]
null
null
null
tests/runnable/proxy/proxy_simple_test_case.py
gift-surg/puma
58beae3459a0c8d96adfe9af323e26868428df4d
[ "Apache-2.0" ]
13
2020-05-04T14:14:58.000Z
2020-07-29T16:37:03.000Z
tests/runnable/proxy/proxy_simple_test_case.py
gift-surg/puma
58beae3459a0c8d96adfe9af323e26868428df4d
[ "Apache-2.0" ]
null
null
null
from typing import List from unittest import TestCase from puma.attribute import copied from puma.buffer import Publishable from puma.runnable import CommandDrivenRunnable from puma.runnable.decorator.run_in_child_scope import run_in_child_scope from puma.scope_id import get_current_scope_id from tests.runnable.proxy....
44.578431
143
0.744667
from typing import List from unittest import TestCase from puma.attribute import copied from puma.buffer import Publishable from puma.runnable import CommandDrivenRunnable from puma.runnable.decorator.run_in_child_scope import run_in_child_scope from puma.scope_id import get_current_scope_id from tests.runnable.proxy....
true
true
f72021c2f7bb1ce0bb2f560b50785e5b281d956f
1,492
py
Python
rdkit/VLib/Supply.py
docking-org/rdk
6eb710254f027b348a8e3089e6a92c3d40de0949
[ "PostgreSQL" ]
1
2019-01-23T06:02:24.000Z
2019-01-23T06:02:24.000Z
rdkit/VLib/Supply.py
Mike575/rdkit
373a89021e478f878c6011a201e3fb8f4a122093
[ "PostgreSQL" ]
null
null
null
rdkit/VLib/Supply.py
Mike575/rdkit
373a89021e478f878c6011a201e3fb8f4a122093
[ "PostgreSQL" ]
1
2022-03-30T03:22:10.000Z
2022-03-30T03:22:10.000Z
# $Id$ # # Copyright (C) 2003 Rational Discovery LLC # All Rights Reserved # from rdkit import six from rdkit.VLib.Node import VLibNode class SupplyNode(VLibNode): """ base class for nodes which supply things Assumptions: 1) no parents Usage Example: >>> supplier = SupplyNode(contents=[1,2,3]) ...
19.128205
76
0.618633
from rdkit import six from rdkit.VLib.Node import VLibNode class SupplyNode(VLibNode): def __init__(self, contents=None, **kwargs): VLibNode.__init__(self, **kwargs) if contents is not None: self._contents = contents else: self._contents = [] self._pos = 0 def reset(self): V...
true
true
f720232e9180d661ee8772c24e32166039323b47
1,192
py
Python
src/web/modules/entrance/migrations/0081_enrolledusersgroup.py
fossabot/SIStema
1427dda2082688a9482c117d0e24ad380fdc26a6
[ "MIT" ]
5
2018-03-08T17:22:27.000Z
2018-03-11T14:20:53.000Z
src/web/modules/entrance/migrations/0081_enrolledusersgroup.py
fossabot/SIStema
1427dda2082688a9482c117d0e24ad380fdc26a6
[ "MIT" ]
263
2018-03-08T18:05:12.000Z
2022-03-11T23:26:20.000Z
src/web/modules/entrance/migrations/0081_enrolledusersgroup.py
fossabot/SIStema
1427dda2082688a9482c117d0e24ad380fdc26a6
[ "MIT" ]
6
2018-03-12T19:48:19.000Z
2022-01-14T04:58:52.000Z
# Generated by Django 2.0.3 on 2018-05-20 18:52 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('groups', '0004_auto_20180312_2139'), ('schools', '0018_auto_20180407_1742'), ('entrance', '0080_auto_2018052...
39.733333
204
0.628356
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('groups', '0004_auto_20180312_2139'), ('schools', '0018_auto_20180407_1742'), ('entrance', '0080_auto_20180520_2114'), ] operations = [ mig...
true
true
f7202400abc5ff8124f922b02029da0f1f0056b4
5,477
py
Python
tests/endtoend/test_linux_consumption.py
Amithmh/azure-functions-python-worker
291a85279f92c88a5a05cddaaf70b2def81a45f2
[ "MIT" ]
277
2018-01-25T23:13:03.000Z
2022-02-22T06:12:04.000Z
tests/endtoend/test_linux_consumption.py
Amithmh/azure-functions-python-worker
291a85279f92c88a5a05cddaaf70b2def81a45f2
[ "MIT" ]
731
2018-01-18T18:54:38.000Z
2022-03-29T00:01:46.000Z
tests/endtoend/test_linux_consumption.py
YunchuWang/azure-functions-python-worker
1f23e038a506c6412e4efbf07eb471a6afab0c2a
[ "MIT" ]
109
2018-01-18T02:22:57.000Z
2022-02-15T18:59:54.000Z
from unittest import TestCase, skip import os import sys from requests import Request from azure_functions_worker.testutils_lc import ( LinuxConsumptionWebHostController ) @skip('Flaky test and needs stabilization') class TestLinuxConsumption(TestCase): """Test worker behaviors on specific scenarios. S...
38.570423
104
0.628994
from unittest import TestCase, skip import os import sys from requests import Request from azure_functions_worker.testutils_lc import ( LinuxConsumptionWebHostController ) @skip('Flaky test and needs stabilization') class TestLinuxConsumption(TestCase): @classmethod def setUpClass(cls): cls._py...
true
true
f7202503138d6110cfc58387559f90552ccc359f
3,224
py
Python
testflows/_core/contrib/pygments/lexers/special.py
testflows/TestFlows-Core
0aa17247dffd2f7199465031ab16cc4f12c9cfb0
[ "Apache-2.0" ]
3
2020-06-25T19:23:19.000Z
2021-10-20T19:29:56.000Z
testflows/_core/contrib/pygments/lexers/special.py
testflows/TestFlows-Core
0aa17247dffd2f7199465031ab16cc4f12c9cfb0
[ "Apache-2.0" ]
null
null
null
testflows/_core/contrib/pygments/lexers/special.py
testflows/TestFlows-Core
0aa17247dffd2f7199465031ab16cc4f12c9cfb0
[ "Apache-2.0" ]
1
2020-02-24T12:31:45.000Z
2020-02-24T12:31:45.000Z
# -*- coding: utf-8 -*- """ pygments.lexers.special ~~~~~~~~~~~~~~~~~~~~~~~ Special lexers. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from testflows._core.contrib.pygments.lexer import Lexer from testflows._core.contr...
30.704762
84
0.563275
import re from testflows._core.contrib.pygments.lexer import Lexer from testflows._core.contrib.pygments.token import Token, Error, Text from testflows._core.contrib.pygments.util import get_choice_opt, text_type, BytesIO __all__ = ['TextLexer', 'RawTokenLexer'] class TextLexer(Lexer): name = 'Text only' ...
true
true
f720257844a4e01f8b77214cce15f42a5d7c3254
2,958
py
Python
chemicals/exceptions.py
daar/chemicals
df3be046055055b99ae762e7a4b852a63134fc82
[ "MIT" ]
76
2020-08-29T07:47:11.000Z
2022-03-27T03:16:46.000Z
chemicals/exceptions.py
edafricano/chemicals
0e827ad43283d74a37cd002dc638f2a07c33bc1b
[ "MIT" ]
20
2020-08-31T04:44:53.000Z
2022-03-25T05:40:07.000Z
chemicals/exceptions.py
edafricano/chemicals
0e827ad43283d74a37cd002dc638f2a07c33bc1b
[ "MIT" ]
13
2020-09-01T04:57:01.000Z
2022-02-23T03:36:58.000Z
# -*- coding: utf-8 -*- """Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2020 Caleb Bell <Caleb.Andrew.Bell@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal ...
41.083333
81
0.742732
__all__ = ['TrivialSolutionError', 'PhaseCountReducedError', 'PhaseExistenceImpossible', 'UnderspecifiedError', 'OverspeficiedError'] class UnderspecifiedError(Exception): class OverspeficiedError(Exception): class TrivialSolutionError(Exception): def __init__(self, ...
true
true
f72026e5abe659fb49e585df6c351997a8a096ba
4,714
py
Python
kernel/graph_sage.py
muhanzhang/NestedGNN
a5adccf62d397ad7f83bc73be34eba3765df73fa
[ "MIT" ]
21
2021-11-05T00:42:30.000Z
2022-03-29T13:38:31.000Z
kernel/graph_sage.py
Ender-li/NestedGNN
a5adccf62d397ad7f83bc73be34eba3765df73fa
[ "MIT" ]
null
null
null
kernel/graph_sage.py
Ender-li/NestedGNN
a5adccf62d397ad7f83bc73be34eba3765df73fa
[ "MIT" ]
5
2021-11-05T00:42:32.000Z
2022-03-25T08:28:17.000Z
import torch import torch.nn.functional as F from torch.nn import Linear from torch_geometric.nn import SAGEConv, global_mean_pool class NestedGraphSAGE(torch.nn.Module): def __init__(self, dataset, num_layers, hidden, use_z=False, use_rd=False): super(NestedGraphSAGE, self).__init__() self.use_rd...
34.661765
79
0.604158
import torch import torch.nn.functional as F from torch.nn import Linear from torch_geometric.nn import SAGEConv, global_mean_pool class NestedGraphSAGE(torch.nn.Module): def __init__(self, dataset, num_layers, hidden, use_z=False, use_rd=False): super(NestedGraphSAGE, self).__init__() self.use_rd...
true
true
f72028feee490e4956e5e24af2343761f0b5aef8
485
py
Python
tests/numpy/asarray.py
Fryguy/py2rb
0d2fbc5a86b82707a1d83241a21af6b2cc22c0b8
[ "MIT" ]
124
2017-08-19T05:37:16.000Z
2022-03-08T18:24:18.000Z
tests/numpy/asarray.py
JeMaMokuma/py2rb
0d2fbc5a86b82707a1d83241a21af6b2cc22c0b8
[ "MIT" ]
15
2017-12-16T05:59:31.000Z
2022-02-08T02:51:17.000Z
tests/numpy/asarray.py
JeMaMokuma/py2rb
0d2fbc5a86b82707a1d83241a21af6b2cc22c0b8
[ "MIT" ]
18
2017-09-25T11:57:04.000Z
2022-02-19T17:33:48.000Z
import numpy as np def print_matrix(data): data_i = [] for i in list(data): data_j = [] for j in i: data_j.append(int("%d" % j)) data_i.append(data_j) print(data_i) def print_array(data): datas = [] for i in data: datas.append(float("%.3f" % i)) prin...
16.724138
40
0.536082
import numpy as np def print_matrix(data): data_i = [] for i in list(data): data_j = [] for j in i: data_j.append(int("%d" % j)) data_i.append(data_j) print(data_i) def print_array(data): datas = [] for i in data: datas.append(float("%.3f" % i)) prin...
true
true
f7202aa5da9abcf694e4ba95a5903c7130725bcc
604
py
Python
src/msequence.py
piraaa/VideoDigitalWatermarking
6439881dc88fb7257a3dd9856b185e5c667b89b4
[ "MIT" ]
38
2017-11-06T08:59:23.000Z
2022-02-21T01:42:50.000Z
src/msequence.py
qiuqiu888888/VideoDigitalWatermarking
6439881dc88fb7257a3dd9856b185e5c667b89b4
[ "MIT" ]
2
2018-10-01T15:56:37.000Z
2018-10-01T15:59:19.000Z
src/msequence.py
qiuqiu888888/VideoDigitalWatermarking
6439881dc88fb7257a3dd9856b185e5c667b89b4
[ "MIT" ]
9
2017-09-09T02:39:44.000Z
2021-10-19T08:56:57.000Z
# # msequence.py # Created by pira on 2017/07/28. # #coding: utf-8 u"""For M-Sequence.""" import numpy as np def generateM(N): u"""Create M-Sequence. @param N : length 2**N-1 @return m : M-Sequence """ p = pow(2, N) m = [0] * (p-1) for i in np.arange(1,p,2): f = p^i a = p #i = int() for j in np....
14.731707
41
0.490066
import numpy as np def generateM(N): p = pow(2, N) m = [0] * (p-1) for i in np.arange(1,p,2): f = p^i a = p for j in np.arange(N, p): if (a&p) == p: a ^= f if a == 1: break a <<= 1 if j == p-1: init = 1 lfsr = init & (p-1) f >>= 1 for k in np.arange(0, p-1): lfs...
true
true
f7202be0208820f01bdac492ac81ef39a38c8248
1,426
py
Python
manganelo/chapterdownload.py
nixonjoshua98/manganelo
4450d05a3cf0ef500565c4e263e06edf42f580b6
[ "MIT" ]
22
2020-03-17T16:01:27.000Z
2022-03-06T18:04:41.000Z
manganelo/chapterdownload.py
nixonjoshua98/manganelo
4450d05a3cf0ef500565c4e263e06edf42f580b6
[ "MIT" ]
9
2020-05-13T03:19:45.000Z
2022-03-13T23:05:32.000Z
manganelo/chapterdownload.py
nixonjoshua98/manganelo
4450d05a3cf0ef500565c4e263e06edf42f580b6
[ "MIT" ]
8
2021-02-10T17:21:34.000Z
2022-02-15T10:22:38.000Z
import os import tempfile from bs4 import BeautifulSoup from PIL import Image from reportlab.pdfgen import canvas from manganelo import utils, siterequests def download_chapter(url, path): path = utils.validate_path(path) r = siterequests.get(url) soup = BeautifulSoup(r.content, "html.parser") urls = _get_...
19.534247
88
0.706171
import os import tempfile from bs4 import BeautifulSoup from PIL import Image from reportlab.pdfgen import canvas from manganelo import utils, siterequests def download_chapter(url, path): path = utils.validate_path(path) r = siterequests.get(url) soup = BeautifulSoup(r.content, "html.parser") urls = _get_...
true
true
f7202cd5480a280b65ca98c820e6e6468a9b083f
71
py
Python
trial/config/test_cfg.py
ygtxr1997/mmsegmentation
9cd8c61ba1cd27fe743edc5f546d2710a3c81110
[ "Apache-2.0" ]
null
null
null
trial/config/test_cfg.py
ygtxr1997/mmsegmentation
9cd8c61ba1cd27fe743edc5f546d2710a3c81110
[ "Apache-2.0" ]
null
null
null
trial/config/test_cfg.py
ygtxr1997/mmsegmentation
9cd8c61ba1cd27fe743edc5f546d2710a3c81110
[ "Apache-2.0" ]
null
null
null
a = 1 b = dict(b1=[0, 1, 2], b2=None,) c = (1, 2) d = 'string'
14.2
22
0.394366
a = 1 b = dict(b1=[0, 1, 2], b2=None,) c = (1, 2) d = 'string'
true
true
f7202dae123914878302027d30e8bb56a37777a3
2,484
py
Python
docs/source/conf.py
deeghuge/ibm-spectrum-scale-csi
572a94a263aa9a850e8377eacfe3d25be8df12c8
[ "Apache-2.0" ]
null
null
null
docs/source/conf.py
deeghuge/ibm-spectrum-scale-csi
572a94a263aa9a850e8377eacfe3d25be8df12c8
[ "Apache-2.0" ]
null
null
null
docs/source/conf.py
deeghuge/ibm-spectrum-scale-csi
572a94a263aa9a850e8377eacfe3d25be8df12c8
[ "Apache-2.0" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
30.666667
79
0.669485
project = 'IBM Spectrum Scale CSI' copyright = '2019, IBM' author = 'John Dunham' master_doc = 'index' release = '1.0.1' extensions = [ ] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] import os on_rtd = os.environ.get('READTHEDOCS', Non...
true
true
f7202e4624fb1dd921db04fe9bd81a4baf484a71
4,378
py
Python
contrib/seeds/generate-seeds.py
vas191/LONGNETWORK-0.7d
4ed2d9ba26744c1404a7aeef3f75e0c19310aea2
[ "MIT" ]
6
2020-09-24T00:20:50.000Z
2021-08-05T06:48:51.000Z
contrib/seeds/generate-seeds.py
vas191/LONGNETWORK-0.7d
4ed2d9ba26744c1404a7aeef3f75e0c19310aea2
[ "MIT" ]
4
2020-07-17T17:05:25.000Z
2021-05-08T10:47:05.000Z
contrib/seeds/generate-seeds.py
vas191/LONGNETWORK-0.7d
4ed2d9ba26744c1404a7aeef3f75e0c19310aea2
[ "MIT" ]
4
2020-05-10T21:34:04.000Z
2021-06-04T06:51:01.000Z
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory tha...
31.496403
98
0.582458
from __future__ import print_function, division from base64 import b32decode from binascii import a2b_hex import sys, os import re pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff]) pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43]) def name_to_ipv6(addr): if len(addr)>6 and addr.endswith...
true
true
f7202e6fbf154aac2f8ed227635669a6c0396ba0
1,622
py
Python
2020-08-month-long-challenge/day02.py
jkbockstael/leetcode
8ef5c907fb153c37dc97f6524493ceca2044ea38
[ "Unlicense" ]
null
null
null
2020-08-month-long-challenge/day02.py
jkbockstael/leetcode
8ef5c907fb153c37dc97f6524493ceca2044ea38
[ "Unlicense" ]
null
null
null
2020-08-month-long-challenge/day02.py
jkbockstael/leetcode
8ef5c907fb153c37dc97f6524493ceca2044ea38
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 # Day 2: Design HashSet # # Design a HashSet without using any built-in hash table libraries. # # To be specific, your design should include these functions: # - add(value): Insert a value into the HashSet. # - contains(value) : Return whether the value exists in the HashSet or not. # - remove(...
30.037037
77
0.645499
class MyHashSet: def __init__(self, memory=16): self.values = [[] for _ in range(2**memory)] self.memory = memory def add(self, key: int) -> None: hashed = self.hash(key) if key not in self.values[hashed]: self.values[hashed].append(key) def rem...
true
true
f7202f4a73d2cb0fec38c026a6674123334607c1
1,014
py
Python
macropolo/environments/sheer_env.py
cfpb/macro-polo
7caf519b623df00a3f16a6119504db09c8983b7b
[ "CC0-1.0" ]
1
2015-07-11T17:52:24.000Z
2015-07-11T17:52:24.000Z
macropolo/environments/sheer_env.py
cfpb/macro-polo
7caf519b623df00a3f16a6119504db09c8983b7b
[ "CC0-1.0" ]
11
2015-03-10T15:40:42.000Z
2016-05-05T22:54:37.000Z
macropolo/environments/sheer_env.py
cfpb/macro-polo
7caf519b623df00a3f16a6119504db09c8983b7b
[ "CC0-1.0" ]
6
2015-03-09T13:39:12.000Z
2021-02-21T10:34:15.000Z
# -*- coding: utf-8 -*- import markdown from sheer.templates import date_formatter from .jinja2_env import Jinja2Environment class SheerEnvironment(Jinja2Environment): def setup_environment(self): """ Set up a Jinja2 environment that like the one created by Sheer. """ # Setup t...
34.965517
74
0.66568
import markdown from sheer.templates import date_formatter from .jinja2_env import Jinja2Environment class SheerEnvironment(Jinja2Environment): def setup_environment(self): super(SheerEnvironment, self).setup_environment() self.f...
true
true
f7202fba7f46a7622a91a03218bcc2c4f060a7c1
1,559
py
Python
samples/generated_samples/dialogflow_generated_dialogflow_v2_knowledge_bases_list_knowledge_bases_sync.py
rkdfc93/python-dialogflow
a59cff0298ef18674c0b4133ef0a6ab82e288920
[ "Apache-2.0" ]
171
2018-09-19T21:16:18.000Z
2020-12-07T17:41:10.000Z
samples/generated_samples/dialogflow_generated_dialogflow_v2_knowledge_bases_list_knowledge_bases_sync.py
rkdfc93/python-dialogflow
a59cff0298ef18674c0b4133ef0a6ab82e288920
[ "Apache-2.0" ]
150
2018-09-25T14:04:28.000Z
2020-12-09T21:45:43.000Z
samples/generated_samples/dialogflow_generated_dialogflow_v2_knowledge_bases_list_knowledge_bases_sync.py
rkdfc93/python-dialogflow
a59cff0298ef18674c0b4133ef0a6ab82e288920
[ "Apache-2.0" ]
75
2018-09-22T14:12:18.000Z
2020-12-08T07:12:12.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
33.170213
85
0.7678
from google.cloud import dialogflow_v2 def sample_list_knowledge_bases(): client = dialogflow_v2.KnowledgeBasesClient() request = dialogflow_v2.ListKnowledgeBasesRequest( parent="parent_value", ) page_result = client.list_knowledge_bases(request=reque...
true
true
f7203043a8bcf8301e573ee5c313e973c2484f62
5,458
py
Python
scripts/rewritepass.py
CEisenhofer/alive2
e7cfe7d8dcd8cfaafa1b0f7549e4e2dabee60b87
[ "MIT" ]
1
2022-02-09T22:10:09.000Z
2022-02-09T22:10:09.000Z
scripts/rewritepass.py
CEisenhofer/alive2
e7cfe7d8dcd8cfaafa1b0f7549e4e2dabee60b87
[ "MIT" ]
null
null
null
scripts/rewritepass.py
CEisenhofer/alive2
e7cfe7d8dcd8cfaafa1b0f7549e4e2dabee60b87
[ "MIT" ]
1
2022-02-23T18:33:44.000Z
2022-02-23T18:33:44.000Z
#!/usr/bin/python import os import re import sys if len(sys.argv) != 3 and len(sys.argv) != 4: print("Use: %s <PassRegistry.def path> <passes> [run-tests]" % sys.argv[0]) exit(1) passregpath = sys.argv[1] def skip_first_pass(s): count = 0 for i in range(len(s)): c = s[i] if c == '(': count += 1...
32.295858
133
0.593441
import os import re import sys if len(sys.argv) != 3 and len(sys.argv) != 4: print("Use: %s <PassRegistry.def path> <passes> [run-tests]" % sys.argv[0]) exit(1) passregpath = sys.argv[1] def skip_first_pass(s): count = 0 for i in range(len(s)): c = s[i] if c == '(': count += 1 elif c == ')...
true
true
f72031a89a64427da851b239767808dec0087b18
8,293
py
Python
ProgramsToRead/ExercisesLists/List004.py
ItanuRomero/PythonStudyPrograms
2b784b2af068b34e65ddf817ca8d99c1ca3a710e
[ "MIT" ]
null
null
null
ProgramsToRead/ExercisesLists/List004.py
ItanuRomero/PythonStudyPrograms
2b784b2af068b34e65ddf817ca8d99c1ca3a710e
[ "MIT" ]
null
null
null
ProgramsToRead/ExercisesLists/List004.py
ItanuRomero/PythonStudyPrograms
2b784b2af068b34e65ddf817ca8d99c1ca3a710e
[ "MIT" ]
null
null
null
# Lista 04 - Itanu Romero - 2o. semestre def questao01(): """ Elabore um programa que efetue a leitura de duas strings e informe o seu conteúdo, seguido de seu compri- mento. Indique também se as duas strings possuem o mesmo comprimento e se são iguais ou diferentes no conteúdo. """ dicionario ...
32.778656
115
0.615459
def questao01(): dicionario = {} for i in range(2): palavra = input('Digite uma palavra: ') dicionario[i] = [palavra, len(palavra)] print(dicionario) if dicionario[0][0] == dicionario[1][0]: print('Conteúdo iguais') if dicionario[0][1] == dicionario[1][1]: print('Co...
true
true
f72031f79a1842bf727ed4d56e27279ae150037a
99
py
Python
config.py
cballam/flask-nanoblog
b8e3034a8e647c90645ffdeb489e944c6d8042cd
[ "MIT" ]
null
null
null
config.py
cballam/flask-nanoblog
b8e3034a8e647c90645ffdeb489e944c6d8042cd
[ "MIT" ]
null
null
null
config.py
cballam/flask-nanoblog
b8e3034a8e647c90645ffdeb489e944c6d8042cd
[ "MIT" ]
null
null
null
import os SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.getcwd() + '/blog.db' SECRET_KEY = 'secret'
19.8
65
0.676768
import os SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.getcwd() + '/blog.db' SECRET_KEY = 'secret'
true
true
f720323103b02c71f2a9840e6439b99bbd9ea402
42,611
py
Python
nidmresults/objects/inference.py
mih/nidmresults
438f7cce6abc4a4379b629bd76f4d427891e033f
[ "MIT" ]
1
2018-12-04T16:53:45.000Z
2018-12-04T16:53:45.000Z
nidmresults/objects/inference.py
mih/nidmresults
438f7cce6abc4a4379b629bd76f4d427891e033f
[ "MIT" ]
2
2018-04-11T14:01:38.000Z
2019-05-29T15:14:49.000Z
nidmresults/objects/inference.py
cmaumet/nidmresults
438f7cce6abc4a4379b629bd76f4d427891e033f
[ "MIT" ]
null
null
null
""" Objects describing the Inference activity, its inputs and outputs as specified in NIDM-Results. Specification: http://nidm.nidash.org/specs/nidm-results.html @author: Camille Maumet <c.m.j.maumet@warwick.ac.uk> @copyright: University of Warwick 2013-2014 """ from nidmresults.objects.constants import * from nidmre...
34.308374
109
0.594518
from nidmresults.objects.constants import * from nidmresults.objects.generic import * import uuid from math import erf, sqrt import rdflib from prov.model import Literal from prov.constants import XSD_FLOAT from prov.model import Identifier class Inference(object): def __init__( self, inference, hei...
true
true
f72032afeb7c34403fb72e1e874710a4279d0978
1,500
py
Python
saleor/api/payment/serializers.py
glosoftgroup/KahawaHardware
893e94246583addf41c3bb0d58d2ce6bcd233c4f
[ "BSD-3-Clause" ]
null
null
null
saleor/api/payment/serializers.py
glosoftgroup/KahawaHardware
893e94246583addf41c3bb0d58d2ce6bcd233c4f
[ "BSD-3-Clause" ]
null
null
null
saleor/api/payment/serializers.py
glosoftgroup/KahawaHardware
893e94246583addf41c3bb0d58d2ce6bcd233c4f
[ "BSD-3-Clause" ]
null
null
null
# Payment rest api serializers from rest_framework import serializers from rest_framework.serializers import ( SerializerMethodField, IntegerField ) from ...sale.models import PaymentOption from ...payment.models import MpesaPayment class MpesaPaymentUpdateSeri...
27.272727
71
0.557333
from rest_framework import serializers from rest_framework.serializers import ( SerializerMethodField, IntegerField ) from ...sale.models import PaymentOption from ...payment.models import MpesaPayment class MpesaPaymentUpdateSerializer(serializers.ModelSerial...
true
true
f720333a7186cc4c3d83e8f61e9842d040ac10f8
18,296
py
Python
sdk/python/pulumi_azure_native/storagepool/v20210801/iscsi_target.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/storagepool/v20210801/iscsi_target.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/storagepool/v20210801/iscsi_target.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
44.086747
555
0.648885
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['IscsiTargetArgs', 'IscsiTarget'] @pulumi.input_type class IscsiTargetArgs: def __in...
true
true
f72033a5af1e9762b3334c21931344ddd76417f7
23,367
py
Python
perf/benchmark/runner/runner.py
clarketm/tools
90477465af903c71aa9c6ae97dadb77a8ca7b92a
[ "Apache-2.0" ]
1
2020-07-26T17:56:44.000Z
2020-07-26T17:56:44.000Z
perf/benchmark/runner/runner.py
clarketm/tools
90477465af903c71aa9c6ae97dadb77a8ca7b92a
[ "Apache-2.0" ]
7
2021-03-19T13:20:19.000Z
2022-03-31T13:57:13.000Z
perf/benchmark/runner/runner.py
clarketm/tools
90477465af903c71aa9c6ae97dadb77a8ca7b92a
[ "Apache-2.0" ]
null
null
null
# Copyright Istio Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
37.567524
203
0.61711
from __future__ import print_function import collections import os import json import socket import argparse import subprocess import shlex import uuid import sys import tempfile import time from subprocess import getoutput from urllib.parse import urlparse import yaml from fortio import METRICS_START_SK...
true
true
f72033c97746dc5228df50bb0ed00d7fbc48f4af
253
py
Python
testcase/test_sensor/__init__.py
yucheng6039/WebAuto
13fa954dd58407ee23e89be89f73cb97f5c11108
[ "Apache-2.0" ]
null
null
null
testcase/test_sensor/__init__.py
yucheng6039/WebAuto
13fa954dd58407ee23e89be89f73cb97f5c11108
[ "Apache-2.0" ]
null
null
null
testcase/test_sensor/__init__.py
yucheng6039/WebAuto
13fa954dd58407ee23e89be89f73cb97f5c11108
[ "Apache-2.0" ]
null
null
null
#------------------------------------------------------------------------------- # Name: __init__.py # Description: # Author: slm # Date: 2020/5/15 #-------------------------------------------------------------------------------
36.142857
80
0.177866
true
true
f72033fbb720adef0e08eca47c98eececd5d767e
917
py
Python
app/user/views.py
dulvinw/recipe-api
f132345987a5962134755e5425e88dde4c56d5fe
[ "Apache-2.0" ]
1
2021-07-08T05:15:38.000Z
2021-07-08T05:15:38.000Z
app/user/views.py
TMEU/recipe-api
f132345987a5962134755e5425e88dde4c56d5fe
[ "Apache-2.0" ]
null
null
null
app/user/views.py
TMEU/recipe-api
f132345987a5962134755e5425e88dde4c56d5fe
[ "Apache-2.0" ]
1
2021-07-08T05:15:42.000Z
2021-07-08T05:15:42.000Z
from rest_framework import generics, permissions, authentication from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIView): """Create a new user in the s...
32.75
67
0.78626
from rest_framework import generics, permissions, authentication from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIView): serializer_class = UserSerial...
true
true
f7203487179fb4f3e1634194e8c33312c4ba431f
918
py
Python
ffeatools/FFEA_initialise/FFEA_mapping_tools/__init__.py
zzalscv2/FFEA
da8a09dadb1b3978a3d230dc79d9b163d7889242
[ "Apache-2.0" ]
null
null
null
ffeatools/FFEA_initialise/FFEA_mapping_tools/__init__.py
zzalscv2/FFEA
da8a09dadb1b3978a3d230dc79d9b163d7889242
[ "Apache-2.0" ]
null
null
null
ffeatools/FFEA_initialise/FFEA_mapping_tools/__init__.py
zzalscv2/FFEA
da8a09dadb1b3978a3d230dc79d9b163d7889242
[ "Apache-2.0" ]
1
2021-04-03T16:08:21.000Z
2021-04-03T16:08:21.000Z
# # This file is part of the FFEA simulation package # # Copyright (c) by the Theory and Development FFEA teams, # as they appear in the README.md file. # # FFEA is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software ...
36.72
71
0.736383
import node_pdb_align
true
true
f7203581c7df8fcaaa578fd90ca2ab1f4f1e4fbd
636
py
Python
src/user_polls_2_app/migrations/0010_alter_pollsassignedtouser_user.py
JackCX777/user_polls_2
fa8fe9ad4c1fa36b4ea5bb402b3d485852a98d3b
[ "BSD-3-Clause" ]
null
null
null
src/user_polls_2_app/migrations/0010_alter_pollsassignedtouser_user.py
JackCX777/user_polls_2
fa8fe9ad4c1fa36b4ea5bb402b3d485852a98d3b
[ "BSD-3-Clause" ]
null
null
null
src/user_polls_2_app/migrations/0010_alter_pollsassignedtouser_user.py
JackCX777/user_polls_2
fa8fe9ad4c1fa36b4ea5bb402b3d485852a98d3b
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 3.2.7 on 2021-10-25 19:11 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('user_polls_2_app', '0009...
28.909091
147
0.691824
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('user_polls_2_app', '0009_auto_20211025_1754'), ] operations = ...
true
true
f72035a00b6e5a656103279e71459c9e9bf51ad5
5,434
py
Python
PythonAPI/docs/bp_doc_gen.py
hecspc/carla
714f8c4cbfbb46fa9ed163a27c94ede613948767
[ "MIT" ]
8
2019-11-27T18:43:09.000Z
2022-01-16T06:08:36.000Z
PythonAPI/docs/bp_doc_gen.py
tcwangjiawei/carla
714f8c4cbfbb46fa9ed163a27c94ede613948767
[ "MIT" ]
null
null
null
PythonAPI/docs/bp_doc_gen.py
tcwangjiawei/carla
714f8c4cbfbb46fa9ed163a27c94ede613948767
[ "MIT" ]
5
2020-05-12T20:03:10.000Z
2022-02-25T14:40:07.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. import glob import os import sys try: sys.path.a...
30.52809
115
0.572322
import glob import os import sys try: sys.path.append(glob.glob('../carla/dist/carla-*%d.%d-%s.egg' % ( sys.version_info.major, sys.version_info.minor, 'win-amd64' if os.name == 'nt' else 'linux-x86_64'))[0]) except IndexError: pass import carla COLOR_LIST = '#498efc' def j...
true
true
f7203750725cdfec5d228e1de7f7be516116fab2
1,038
py
Python
api/users/models/profiles.py
julianarchila/twitter-clone-api
9c2d77c9144dcb70cf982d9987c70bc7113b7f3e
[ "MIT" ]
null
null
null
api/users/models/profiles.py
julianarchila/twitter-clone-api
9c2d77c9144dcb70cf982d9987c70bc7113b7f3e
[ "MIT" ]
null
null
null
api/users/models/profiles.py
julianarchila/twitter-clone-api
9c2d77c9144dcb70cf982d9987c70bc7113b7f3e
[ "MIT" ]
null
null
null
"""Profile models. """ # Django from django.db import models # Utils from api.utils.models import TwModel class Profile(TwModel): """Profile model.""" user = models.OneToOneField("users.User", on_delete=models.CASCADE) picture = models.ImageField( "Profile picture", upload_to="users/pic...
27.315789
75
0.655106
from django.db import models from api.utils.models import TwModel class Profile(TwModel): user = models.OneToOneField("users.User", on_delete=models.CASCADE) picture = models.ImageField( "Profile picture", upload_to="users/pictures/", default="users/pictures/default.png", ...
true
true
f7203796bb012b3a172887a59a4d57229630ce4f
8,515
py
Python
hwtLib/avalon/mm.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
null
null
null
hwtLib/avalon/mm.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
null
null
null
hwtLib/avalon/mm.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
null
null
null
from hwt.hdl.constants import DIRECTION, READ, WRITE, NOP, READ_WRITE from hwt.interfaces.agents.handshaked import HandshakedAgent from hwt.interfaces.std import VectSignal, Signal from hwt.simulator.agentBase import SyncAgentBase from hwt.synthesizer.interface import Interface from hwt.synthesizer.param import Param f...
28.864407
104
0.603053
from hwt.hdl.constants import DIRECTION, READ, WRITE, NOP, READ_WRITE from hwt.interfaces.agents.handshaked import HandshakedAgent from hwt.interfaces.std import VectSignal, Signal from hwt.simulator.agentBase import SyncAgentBase from hwt.synthesizer.interface import Interface from hwt.synthesizer.param import Param f...
true
true
f7203965a2d54250a5e143f35c9a2614727c589c
4,095
py
Python
encoder/i3d/i3d_encoder.py
gnes-ai/hub
94cff9011ff6447ce1af51c5307813ab6fbbb156
[ "Apache-2.0" ]
36
2019-08-17T00:23:02.000Z
2021-08-18T12:12:59.000Z
encoder/i3d/i3d_encoder.py
gnes-ai/hub
94cff9011ff6447ce1af51c5307813ab6fbbb156
[ "Apache-2.0" ]
1
2019-10-24T05:09:45.000Z
2019-10-24T05:09:45.000Z
encoder/i3d/i3d_encoder.py
gnes-ai/hub
94cff9011ff6447ce1af51c5307813ab6fbbb156
[ "Apache-2.0" ]
11
2019-10-22T05:15:14.000Z
2020-04-25T16:04:01.000Z
# Tencent is pleased to support the open source community by making GNES available. # # Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a...
41.785714
105
0.572894
from typing import List import numpy as np from gnes.encoder.base import BaseVideoEncoder from gnes.helper import batching, get_first_available_gpu class I3dEncoder(BaseVideoEncoder): batch_size = 1 def __init__(self, model_dir: str, output_layer: str, num_c...
true
true
f7203ab4da825176e6d88094bad4c4f581a86fe3
95
py
Python
jungle/__init__.py
felixhorns/jungle
da50104dcdd2427fcaa5ed190f0bd7f2097e2e79
[ "MIT" ]
1
2022-03-01T14:50:14.000Z
2022-03-01T14:50:14.000Z
jungle/__init__.py
felixhorns/jungle
da50104dcdd2427fcaa5ed190f0bd7f2097e2e79
[ "MIT" ]
1
2020-03-27T00:19:23.000Z
2020-03-27T00:19:23.000Z
jungle/__init__.py
felixhorns/jungle
da50104dcdd2427fcaa5ed190f0bd7f2097e2e79
[ "MIT" ]
null
null
null
from .tree import * from .forest import * from .sfs import * from .size_matched_model import *
19
33
0.747368
from .tree import * from .forest import * from .sfs import * from .size_matched_model import *
true
true
f7203b87bf0c1b3f2aca6d05147b1c60aebb4053
5,005
py
Python
examples/mechanics/DirectProjection/n_cubes_directproj.py
vacary/siconos-tutorials
93c0158321077a313692ed52fed69ff3c256ae32
[ "Apache-2.0" ]
6
2017-01-12T23:09:28.000Z
2021-03-20T17:03:58.000Z
examples/mechanics/DirectProjection/n_cubes_directproj.py
vacary/siconos-tutorials
93c0158321077a313692ed52fed69ff3c256ae32
[ "Apache-2.0" ]
3
2019-01-14T13:44:51.000Z
2021-05-17T13:57:27.000Z
examples/mechanics/DirectProjection/n_cubes_directproj.py
vacary/siconos-tutorials
93c0158321077a313692ed52fed69ff3c256ae32
[ "Apache-2.0" ]
2
2019-10-22T13:30:39.000Z
2020-10-06T10:19:57.000Z
#!/usr/bin/env python # # Example of two cubes, one with a convex shape, one with a primitive # shape. # from siconos.mechanics.collision.tools import Contactor from siconos.io.mechanics_run import MechanicsHdf5Runner import siconos.numerics as sn import siconos.kernel as sk import random import siconos bullet_opt...
36.268116
79
0.564236
from siconos.mechanics.collision.tools import Contactor from siconos.io.mechanics_run import MechanicsHdf5Runner import siconos.numerics as sn import siconos.kernel as sk import random import siconos bullet_options = siconos.mechanics.collision.bullet.SiconosBulletOptions() bullet_options.worldScale = 1.0 bul...
true
true
f7203b8e88485ca582d2256b589f018535db2c31
223
py
Python
terminusdb_client/__init__.py
LogicalDash/terminusdb-client-python
7f13f77e60f891b1e6bd214ebf73ff7f75fcaff8
[ "Apache-2.0" ]
43
2020-06-12T23:44:17.000Z
2022-03-12T15:18:55.000Z
terminusdb_client/__init__.py
LogicalDash/terminusdb-client-python
7f13f77e60f891b1e6bd214ebf73ff7f75fcaff8
[ "Apache-2.0" ]
151
2020-06-12T20:23:05.000Z
2022-03-29T20:38:35.000Z
terminusdb_client/__init__.py
LogicalDash/terminusdb-client-python
7f13f77e60f891b1e6bd214ebf73ff7f75fcaff8
[ "Apache-2.0" ]
46
2020-06-16T20:51:21.000Z
2022-03-17T18:11:46.000Z
from .woqlclient import WOQLClient # noqa from .woqldataframe import woqlDataframe as WOQLDataFrame # noqa from .woqlquery import WOQLQuery # noqa from .woqlschema import * # noqa from .woqlview import WOQLView # noqa
37.166667
65
0.784753
from .woqlclient import WOQLClient from .woqldataframe import woqlDataframe as WOQLDataFrame from .woqlquery import WOQLQuery from .woqlschema import * from .woqlview import WOQLView
true
true
f7203bb1984344d6b1e7a819172c514ab77e38b9
44,751
py
Python
models/ deeplabv3_plus_xception.py
Mohammedaabdu/pytorch-segmentation
9fdf927d345146247f039042ee37612157e26582
[ "MIT" ]
2
2019-07-18T16:01:56.000Z
2019-07-27T18:57:44.000Z
models/ deeplabv3_plus_xception.py
Mohammedaabdu/pytorch-segmentation
9fdf927d345146247f039042ee37612157e26582
[ "MIT" ]
null
null
null
models/ deeplabv3_plus_xception.py
Mohammedaabdu/pytorch-segmentation
9fdf927d345146247f039042ee37612157e26582
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Apr 21 15:16:18 2021 @author: Administrator """ from base import BaseModel import torch import math import torch.nn as nn import torch.nn.functional as F from torchvision import models import torch.utils.model_zoo as model_zoo from utils.helpers import initiali...
42.701336
157
0.542714
from base import BaseModel import torch import math import torch.nn as nn import torch.nn.functional as F from torchvision import models import torch.utils.model_zoo as model_zoo from utils.helpers import initialize_weights,set_trainable from itertools import chain class ResNet(nn.Module): def __...
true
true
f7203c15114df58d6fe296e4cab56a7dfde9a7e6
7,137
py
Python
sdk/python/pulumi_azure_nextgen/resources/v20190601preview/template_spec_version.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/resources/v20190601preview/template_spec_version.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/resources/v20190601preview/template_spec_version.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
41.254335
153
0.644529
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['TemplateSpecVersion'] class TemplateSpecVersion(pulumi.CustomResource): def __init__(__self__, ...
true
true
f7203d919cb1af54eb41f79e9a0eb262ee2d9aab
45,179
py
Python
salt/modules/file.py
abh/salt
e8870573a2d3eca1a7794ce8340797fa487de04d
[ "Apache-2.0" ]
1
2017-09-09T11:21:13.000Z
2017-09-09T11:21:13.000Z
salt/modules/file.py
abh/salt
e8870573a2d3eca1a7794ce8340797fa487de04d
[ "Apache-2.0" ]
null
null
null
salt/modules/file.py
abh/salt
e8870573a2d3eca1a7794ce8340797fa487de04d
[ "Apache-2.0" ]
null
null
null
''' Manage information about files on the minion, set/read user, group, and mode data ''' # TODO: We should add the capability to do u+r type operations here # some time in the future # Import python libs from contextlib import nested # For < 2.7 compat import os import re import time import shutil import tempfile i...
31.093599
85
0.516811
''' Manage information about files on the minion, set/read user, group, and mode data ''' from contextlib import nested import os import re import time import shutil import tempfile import stat import sys import getpass import hashlib import difflib import fnmatch try: import grp import pwd except Import...
false
true
f7203e25547d18f2b19333cb3e9e2cb96aaaadfa
14,178
py
Python
env/lib/python3.6/site-packages/pipenv/vendor/pip9/_vendor/html5lib/serializer.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
2
2021-10-01T17:23:49.000Z
2021-10-01T17:26:19.000Z
env/lib/python3.6/site-packages/pipenv/vendor/pip9/_vendor/html5lib/serializer.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
1
2017-09-15T19:01:09.000Z
2017-09-15T23:42:43.000Z
env/lib/python3.6/site-packages/pipenv/vendor/pip9/_vendor/html5lib/serializer.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
2
2018-04-06T05:36:25.000Z
2018-12-30T22:58:58.000Z
from __future__ import absolute_import, division, unicode_literals from pip9._vendor.six import text_type import re from codecs import register_error, xmlcharrefreplace_errors from .constants import voidElements, booleanAttributes, spaceCharacters from .constants import rcdataElements, entities, xmlEntities from . i...
42.322388
116
0.554662
from __future__ import absolute_import, division, unicode_literals from pip9._vendor.six import text_type import re from codecs import register_error, xmlcharrefreplace_errors from .constants import voidElements, booleanAttributes, spaceCharacters from .constants import rcdataElements, entities, xmlEntities from . i...
true
true
f7203e5539f2d789837ec3db4336641fa5cb95f8
24,459
py
Python
pytorch_transformers/utils_glue.py
nguyenvo09/EACL2021
9d04d8954c1ded2110daac23117de11221f08cc6
[ "MIT" ]
27
2021-01-18T16:03:17.000Z
2022-03-05T22:38:34.000Z
pytorch_transformers/utils_glue.py
Jason98Xu/GET
6860c87425619954cacbf5a14ad20befd18ec818
[ "MIT" ]
null
null
null
pytorch_transformers/utils_glue.py
Jason98Xu/GET
6860c87425619954cacbf5a14ad20befd18ec818
[ "MIT" ]
2
2022-03-16T03:22:16.000Z
2022-03-27T03:12:14.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
36.343239
130
0.58874
from __future__ import absolute_import, division, print_function import csv import logging import os import sys from io import open from scipy.stats import pearsonr, spearmanr from sklearn.metrics import matthews_corrcoef, f1_score from .tokenization_utils import PreTrainedTokenizer logger = logging....
true
true
f7203f7c40d84ae4799af332cef766f88462c378
6,000
py
Python
modules/aim_server/files/handler.py
mshuler/infrastructure-puppet
bb054d08e89f9bf4b804a7a453f02ae722519d0a
[ "Apache-2.0" ]
1
2019-06-09T10:25:04.000Z
2019-06-09T10:25:04.000Z
modules/aim_server/files/handler.py
mshuler/infrastructure-puppet
bb054d08e89f9bf4b804a7a453f02ae722519d0a
[ "Apache-2.0" ]
1
2020-05-08T07:07:43.000Z
2020-05-08T07:07:43.000Z
modules/aim_server/files/handler.py
mshuler/infrastructure-puppet
bb054d08e89f9bf4b804a7a453f02ae722519d0a
[ "Apache-2.0" ]
1
2018-07-09T08:44:40.000Z
2018-07-09T08:44:40.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This is the main WSGI handler file for AIM. It compiles a list of valid URLs from the 'pages' library folder, and if a URL matches it runs the specific submodule's run() function. It also handles CGI parsing and exceptions in the applications. """ # Main imports imp...
34.090909
97
0.534
import cgi import re import sys import traceback import yaml import json import plugins.session import plugins.database import plugins.openapi urls = [] if __name__ != '__main__': import pages for page in pages.handlers: urls.append((r"^(/api/%s)(/.+)?$" % page, pages.handlers[page].run)) con...
true
true
f72040ff1201f3604a63a0df3a8ef880ea9ea363
5,366
py
Python
paasta_tools/mesos/mesos_file.py
sobolevn/paasta
8b87e0b13816c09b3d063b6d3271e6c7627fd264
[ "Apache-2.0" ]
1,711
2015-11-10T18:04:56.000Z
2022-03-23T08:53:16.000Z
paasta_tools/mesos/mesos_file.py
sobolevn/paasta
8b87e0b13816c09b3d063b6d3271e6c7627fd264
[ "Apache-2.0" ]
1,689
2015-11-10T17:59:04.000Z
2022-03-31T20:46:46.000Z
paasta_tools/mesos/mesos_file.py
sobolevn/paasta
8b87e0b13816c09b3d063b6d3271e6c7627fd264
[ "Apache-2.0" ]
267
2015-11-10T19:17:16.000Z
2022-02-08T20:59:52.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
31.564706
108
0.602124
import os from . import exceptions from paasta_tools.async_utils import async_ttl_cache class File: chunk_size = 1024 def __init__(self, host, task=None, path=None): self.host = host self.task = task self.path = path if self.task is None: self._ho...
true
true
f720411ef892790745b4b66daf03db60907dd920
1,203
py
Python
techk/apps/rest/views.py
felipesantander/fullstack-challenge
d2a6ff1e518199a34eb9d095275adb9cbd8a1cc2
[ "MIT" ]
null
null
null
techk/apps/rest/views.py
felipesantander/fullstack-challenge
d2a6ff1e518199a34eb9d095275adb9cbd8a1cc2
[ "MIT" ]
null
null
null
techk/apps/rest/views.py
felipesantander/fullstack-challenge
d2a6ff1e518199a34eb9d095275adb9cbd8a1cc2
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework import serializers, viewsets, generics from apps.scraper.models import Libros, Categorias from django.http import JsonResponse # Create your views here. class libros_serializer(serializers.HyperlinkedModelSerializer): class Meta: model = Libros ...
32.513514
76
0.736492
from django.shortcuts import render from rest_framework import serializers, viewsets, generics from apps.scraper.models import Libros, Categorias from django.http import JsonResponse class libros_serializer(serializers.HyperlinkedModelSerializer): class Meta: model = Libros fields = ['id', 'categ...
true
true
f7204141db43a3754031bc175c87876a2d7df3e5
34,936
py
Python
mmdet/models/dense_heads/reppoints_head.py
Dopamine0717/mmdetection
40a6fddae20978de98a335cbb45e227db782f72b
[ "Apache-2.0" ]
20,190
2018-09-10T01:11:53.000Z
2022-03-31T22:31:33.000Z
mmdet/models/dense_heads/reppoints_head.py
Joker-co/mmdet_pro
96abfd90cf0e38c5ce398795f949e9328eb85c1b
[ "Apache-2.0" ]
6,736
2018-09-17T09:45:51.000Z
2022-03-31T22:54:10.000Z
mmdet/models/dense_heads/reppoints_head.py
Joker-co/mmdet_pro
96abfd90cf0e38c5ce398795f949e9328eb85c1b
[ "Apache-2.0" ]
7,837
2018-09-11T02:58:23.000Z
2022-03-31T22:31:38.000Z
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch import torch.nn as nn from mmcv.cnn import ConvModule from mmcv.ops import DeformConv2d from mmdet.core import (build_assigner, build_sampler, images_to_levels, multi_apply, unmap) from mmdet.core.anchor.point_gener...
45.667974
101
0.570901
import numpy as np import torch import torch.nn as nn from mmcv.cnn import ConvModule from mmcv.ops import DeformConv2d from mmdet.core import (build_assigner, build_sampler, images_to_levels, multi_apply, unmap) from mmdet.core.anchor.point_generator import MlvlPointGenerator from mmdet.core....
true
true
f72041f40d309616756fd6cdeeec8f6b8869269e
1,839
py
Python
deeppavlov/__init__.py
techthiyanes/DeepPavlov
08555428388fed3c7b036c0a82a70a25efcabcff
[ "Apache-2.0" ]
5,893
2018-02-01T18:13:20.000Z
2022-03-31T19:22:21.000Z
deeppavlov/__init__.py
Aniket27100709/DeepPavlov
d73f45733d6b23347871aa293309730303b64450
[ "Apache-2.0" ]
749
2018-01-31T11:36:02.000Z
2022-03-30T07:24:22.000Z
deeppavlov/__init__.py
Aniket27100709/DeepPavlov
d73f45733d6b23347871aa293309730303b64450
[ "Apache-2.0" ]
1,155
2018-02-01T10:52:15.000Z
2022-03-29T02:12:15.000Z
# Copyright 2017 Neural Networks and Deep Learning lab, MIPT # # 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 applicab...
38.3125
107
0.780859
import sys from pathlib import Path from ._meta import __author__, __description__, __email__, __keywords__, __license__, __version__ from .configs import configs from .core.commands.infer import build_model from .core.commands.train import train_evaluate_model_from_config from .core.common.base import E...
true
true
f720423411e3b69f1160d587bd41dbe72cd1922f
66,041
py
Python
tests/system_tests_two_routers.py
overmeulen/qpid-dispatch
a56b28ccb1b552c5b2dc0872dcde1fa09c725cab
[ "Apache-2.0" ]
null
null
null
tests/system_tests_two_routers.py
overmeulen/qpid-dispatch
a56b28ccb1b552c5b2dc0872dcde1fa09c725cab
[ "Apache-2.0" ]
3
2019-09-30T03:11:04.000Z
2020-03-06T17:15:54.000Z
tests/system_tests_two_routers.py
irinabov/debian-qpid-dispatch
42fb2ffb65f8e8c8d616633c0b4308d6531a281d
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
37.565984
155
0.601687
from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from time import sleep import json, os import logging from threading import Timer from subprocess import PIPE, STDOUT from proton import Message, Timeo...
true
true
f720425769262bb20bd711e6f74901a646158501
45,642
py
Python
core/controllers/profile_test.py
mohitkh7/oppia
d322e6ed8f9d018cc95335544c4fac7290b89af0
[ "Apache-2.0" ]
null
null
null
core/controllers/profile_test.py
mohitkh7/oppia
d322e6ed8f9d018cc95335544c4fac7290b89af0
[ "Apache-2.0" ]
null
null
null
core/controllers/profile_test.py
mohitkh7/oppia
d322e6ed8f9d018cc95335544c4fac7290b89af0
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
41.796703
80
0.655208
from __future__ import absolute_import from __future__ import unicode_literals import datetime import re from constants import constants from core.domain import exp_domain from core.domain import exp_services from core.domain import rights_manager from core.domain import subscription_services from ...
true
true
f720429c5f9f58e91b08613e41ef82569fb3831b
20,741
py
Python
source/appModules/explorer.py
krzysz00/nvda
d34444242a529098499131165a3e60d5a05ac96f
[ "bzip2-1.0.6" ]
1
2016-07-10T00:23:14.000Z
2016-07-10T00:23:14.000Z
source/appModules/explorer.py
krzysz00/nvda
d34444242a529098499131165a3e60d5a05ac96f
[ "bzip2-1.0.6" ]
null
null
null
source/appModules/explorer.py
krzysz00/nvda
d34444242a529098499131165a3e60d5a05ac96f
[ "bzip2-1.0.6" ]
1
2017-08-04T09:00:01.000Z
2017-08-04T09:00:01.000Z
# -*- coding: UTF-8 -*- # A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2006-2021 NV Access Limited, Joseph Lee, Łukasz Golonka, Julien Cochuyt # This file is covered by the GNU General Public License. # See the file COPYING for more details. """App module for Windows Explorer (aka Windows shell and ...
38.768224
172
0.733282
from comtypes import COMError import time import appModuleHandler import controlTypes import winUser import winVersion import api import speech import eventHandler import mouseHandler from NVDAObjects.window import Window from NVDAObjects.IAccessible import IAccessible, List from NVDAObjects.UIA im...
true
true
f7204379766eb4e6ae9bd5b9297cae2841d80760
8,607
py
Python
gpxo/track.py
liquidpizza/gpxo
4f8eb43a4d6b879f51a7e688dfa80b4aa5558889
[ "BSD-3-Clause" ]
null
null
null
gpxo/track.py
liquidpizza/gpxo
4f8eb43a4d6b879f51a7e688dfa80b4aa5558889
[ "BSD-3-Clause" ]
null
null
null
gpxo/track.py
liquidpizza/gpxo
4f8eb43a4d6b879f51a7e688dfa80b4aa5558889
[ "BSD-3-Clause" ]
null
null
null
"""General tools for gpx data processing based on gpxpy.""" import numpy as np import pandas as pd import matplotlib.pyplot as plt import gpxpy from vincenty import vincenty import mplleaflet from .general import smooth, closest_pt # =============================== Misc. Config =============================== # s...
31.412409
88
0.562449
import numpy as np import pandas as pd import matplotlib.pyplot as plt import gpxpy from vincenty import vincenty import mplleaflet from .general import smooth, closest_pt shortnames = {'t': 'time', 's': 'duration (s)', 'd': 'distance (km)', 'v': 'velocity (km/h)', ...
true
true
f72043e942a5c4831999c099986dd8ca73cf871a
2,428
py
Python
share/qt/extract_strings_qt.py
VaderCoinProject/vadercoin
b513c794b014d40e5aad281dd1f54845c46d216c
[ "MIT" ]
null
null
null
share/qt/extract_strings_qt.py
VaderCoinProject/vadercoin
b513c794b014d40e5aad281dd1f54845c46d216c
[ "MIT" ]
null
null
null
share/qt/extract_strings_qt.py
VaderCoinProject/vadercoin
b513c794b014d40e5aad281dd1f54845c46d216c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2012-2019 The Vadercoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Extract _("...") strings for translation and convert to Qt stringdefs so that they can be picked up ...
28.232558
105
0.629736
from subprocess import Popen, PIPE import operator import os import sys OUT_CPP="qt/vadercoinstrings.cpp" EMPTY=['""'] def parse_po(text): messages = [] msgid = [] msgstr = [] in_msgid = False in_msgstr = False for line in text.split('\n'): line = line.rstrip('\r') if line...
true
true
f7204458a6279f21973b1959938c499ec950b89f
4,309
py
Python
losses.py
JayanthRR/ConCURL_NCE
5471b022a571ae61bd891783084512c3a227829b
[ "MIT" ]
3
2022-01-28T06:49:26.000Z
2022-03-06T09:25:00.000Z
losses.py
JayanthRR/ConCURL_NCE
5471b022a571ae61bd891783084512c3a227829b
[ "MIT" ]
null
null
null
losses.py
JayanthRR/ConCURL_NCE
5471b022a571ae61bd891783084512c3a227829b
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import time import sys softmax = nn.Softmax(dim=1).cuda() def distributed_sinkhorn(Q, nmb_iters): with torch.no_grad(): sum_Q = torch.sum(Q) # dist.all_reduce(sum_Q) Q /= sum_Q u = torch.zeros(Q.shape[0]).cuda(non_blocking=True) r = torc...
37.469565
168
0.647018
import torch import torch.nn as nn import time import sys softmax = nn.Softmax(dim=1).cuda() def distributed_sinkhorn(Q, nmb_iters): with torch.no_grad(): sum_Q = torch.sum(Q) Q /= sum_Q u = torch.zeros(Q.shape[0]).cuda(non_blocking=True) r = torch.ones(Q.shape[0]).cuda(...
true
true
f720449d5522724a0dea3ddf7fbe0086f2f89ea6
2,880
py
Python
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/account/wizard/pos_box.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
1
2019-12-19T01:53:13.000Z
2019-12-19T01:53:13.000Z
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/account/wizard/pos_box.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/account/wizard/pos_box.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
from odoo import models, fields, api, _ from odoo.exceptions import UserError class CashBox(models.TransientModel): _register = False name = fields.Char(string='Reason', required=True) # Attention, we don't set a domain, because there is a journal_type key # in the context of the action amount = ...
37.402597
121
0.631944
from odoo import models, fields, api, _ from odoo.exceptions import UserError class CashBox(models.TransientModel): _register = False name = fields.Char(string='Reason', required=True) # in the context of the action amount = fields.Float(string='Amount', digits=0, required=True) @api.multi ...
true
true
f720451ca2d68c90374718f176888a952e6989a6
311
py
Python
June21/ClassesandObjects/inheritance_101.py
pythonbykhaja/intesivepython
d3074f35bf36a04d4d1d9b4ff4631733d40b5817
[ "Apache-2.0" ]
2
2021-05-29T18:21:50.000Z
2021-07-24T13:03:30.000Z
June21/ClassesandObjects/inheritance_101.py
pythonbykhaja/intesivepython
d3074f35bf36a04d4d1d9b4ff4631733d40b5817
[ "Apache-2.0" ]
null
null
null
June21/ClassesandObjects/inheritance_101.py
pythonbykhaja/intesivepython
d3074f35bf36a04d4d1d9b4ff4631733d40b5817
[ "Apache-2.0" ]
2
2021-05-25T10:19:54.000Z
2021-09-21T12:20:48.000Z
class Mobile: def dial(self, number): print(f"dialing number {number}") def ring(self): print("ringing using built in tones.....") class SmartMobile(Mobile): def ring(self): """ overriding a Method """ print("ringing using custom ring tones .... ")
22.214286
54
0.562701
class Mobile: def dial(self, number): print(f"dialing number {number}") def ring(self): print("ringing using built in tones.....") class SmartMobile(Mobile): def ring(self): print("ringing using custom ring tones .... ")
true
true
f7204539107b908bdb3d32b7e595df242c5d27e6
3,162
py
Python
eventsourcing/infrastructure/timebucketedlog_reader.py
scbabacus/eventsourcing
8404c5b26719ed9d9d1d257ebba774879c7243c4
[ "BSD-3-Clause" ]
1
2020-02-10T08:12:31.000Z
2020-02-10T08:12:31.000Z
eventsourcing/infrastructure/timebucketedlog_reader.py
scbabacus/eventsourcing
8404c5b26719ed9d9d1d257ebba774879c7243c4
[ "BSD-3-Clause" ]
null
null
null
eventsourcing/infrastructure/timebucketedlog_reader.py
scbabacus/eventsourcing
8404c5b26719ed9d9d1d257ebba774879c7243c4
[ "BSD-3-Clause" ]
null
null
null
from time import time import six from six import with_metaclass from eventsourcing.domain.model.events import QualnameABCMeta from eventsourcing.domain.model.timebucketedlog import MessageLogged, Timebucketedlog, make_timebucket_id, \ next_bucket_starts, previous_bucket_starts from eventsourcing.infrastructure.ev...
37.2
113
0.619861
from time import time import six from six import with_metaclass from eventsourcing.domain.model.events import QualnameABCMeta from eventsourcing.domain.model.timebucketedlog import MessageLogged, Timebucketedlog, make_timebucket_id, \ next_bucket_starts, previous_bucket_starts from eventsourcing.infrastructure.ev...
true
true
f720456245ef9dd1a92e44572316f1220df27b85
18,816
py
Python
testing/python/approx.py
rosemichaele/pytest
1c0ab3c2a32f7932378a1c37106d082784cb4700
[ "MIT" ]
1
2021-08-16T07:45:51.000Z
2021-08-16T07:45:51.000Z
testing/python/approx.py
rosemichaele/pytest
1c0ab3c2a32f7932378a1c37106d082784cb4700
[ "MIT" ]
null
null
null
testing/python/approx.py
rosemichaele/pytest
1c0ab3c2a32f7932378a1c37106d082784cb4700
[ "MIT" ]
null
null
null
import operator from decimal import Decimal from fractions import Fraction from operator import eq from operator import ne import pytest from pytest import approx inf, nan = float("inf"), float("nan") @pytest.fixture def mocked_doctest_runner(monkeypatch): import doctest class MockedPdb: def __init...
36.115163
97
0.526626
import operator from decimal import Decimal from fractions import Fraction from operator import eq from operator import ne import pytest from pytest import approx inf, nan = float("inf"), float("nan") @pytest.fixture def mocked_doctest_runner(monkeypatch): import doctest class MockedPdb: def __init...
true
true
f72045666fb3ba1330df271ba4a9bc225bbc5cf0
458
py
Python
rising_sphinx_theme/__init__.py
PhoenixDL/rising_sphinx_theme
88c213524bdd87e2c4320f047eebbee04322da47
[ "MIT" ]
2
2020-05-03T09:22:06.000Z
2020-05-18T11:32:51.000Z
rising_sphinx_theme/__init__.py
PhoenixDL/rising_sphinx_theme
88c213524bdd87e2c4320f047eebbee04322da47
[ "MIT" ]
1
2021-09-02T10:40:00.000Z
2021-09-02T10:40:00.000Z
rising_sphinx_theme/__init__.py
PhoenixDL/rising_sphinx_theme
88c213524bdd87e2c4320f047eebbee04322da47
[ "MIT" ]
1
2020-06-19T09:26:47.000Z
2020-06-19T09:26:47.000Z
"""rising Sphinx theme. """ from os import path __version__ = '0.0.25' __version_full__ = __version__ def get_html_theme_path(): """Return list of HTML theme paths.""" cur_dir = path.abspath(path.dirname(path.dirname(__file__))) return cur_dir # See http://www.sphinx-doc.org/en/stable/theming.html#dist...
25.444444
96
0.735808
from os import path __version__ = '0.0.25' __version_full__ = __version__ def get_html_theme_path(): cur_dir = path.abspath(path.dirname(path.dirname(__file__))) return cur_dir ising_sphinx_theme', path.abspath(path.dirname(__file__)))
true
true
f72045bb170c2dd47739981943d2b653f09fbe60
54,959
py
Python
codegen/fletcher/columnreader.py
honorpeter/fletcher
9622293443b1ea70b1f3aa592098a64690600dd4
[ "Apache-2.0" ]
1
2021-03-05T08:24:57.000Z
2021-03-05T08:24:57.000Z
codegen/fletcher/columnreader.py
honorpeter/fletcher
9622293443b1ea70b1f3aa592098a64690600dd4
[ "Apache-2.0" ]
null
null
null
codegen/fletcher/columnreader.py
honorpeter/fletcher
9622293443b1ea70b1f3aa592098a64690600dd4
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Delft University of Technology # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
38.785462
119
0.575138
from itertools import zip_longest import random from .configurable import * from .fields import * from .streams import * from .lines import * from .testbench import * __all__ = ["ColumnReader", "BUS_ADDR_WIDTH", "INDEX_WIDTH", "CMD_TAG_WIDTH"] BUS_ADDR_WIDTH = Generic("BUS_ADDR_WIDTH") BUS_LEN_WIDTH ...
true
true
f72045c3f2c81d8d986759ab3a1d7b3e2137875b
2,936
py
Python
Whole Protein Prediction CNN/dataset.py
LucaAngioloni/ProteineSecondaryStructure-CNN
c85571bbcdf17b4a753dce6ed0e4346111ea43a0
[ "MIT" ]
96
2018-02-02T14:11:56.000Z
2021-12-25T21:23:55.000Z
Whole Protein Prediction CNN/dataset.py
LucaAngioloni/ProteineSecondaryStructure-CNN
c85571bbcdf17b4a753dce6ed0e4346111ea43a0
[ "MIT" ]
3
2021-05-11T12:10:04.000Z
2022-02-10T00:05:30.000Z
Whole Protein Prediction CNN/dataset.py
LucaAngioloni/ProteineSecondaryStructure-CNN
c85571bbcdf17b4a753dce6ed0e4346111ea43a0
[ "MIT" ]
33
2018-11-20T16:10:24.000Z
2021-12-25T21:23:59.000Z
# MIT License # # Copyright (c) 2017 Luca Angioloni # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merg...
34.952381
108
0.722071
import numpy as np dataset_path = "../dataset/cullpdb+profile_6133.npy" cb513_path = "../dataset/cb513+profile_split1.npy" sequence_len = 700 total_features = 57 amino_acid_residues = 21 num_classes = 8 def get_dataset(path=dataset_path): ds = np.load(path) ds = np.reshape(ds, (ds.sh...
true
true
f720461520565da530df980a2ea008f3eb571a8d
6,931
py
Python
project/celebrities_births.py
Yoon-D-G/celebrity_scraper
002fa7487408f05b896812d8fe6cde5cbb5d5edd
[ "MIT" ]
null
null
null
project/celebrities_births.py
Yoon-D-G/celebrity_scraper
002fa7487408f05b896812d8fe6cde5cbb5d5edd
[ "MIT" ]
null
null
null
project/celebrities_births.py
Yoon-D-G/celebrity_scraper
002fa7487408f05b896812d8fe6cde5cbb5d5edd
[ "MIT" ]
null
null
null
''' This script contains a class for representing the date. Additionally, the class Scraper get the HTML code of a Wikipedia page and extracts the name of celebrities that were born in a certain date ''' import re import requests from bs4 import BeautifulSoup from datetime import datetime class Date: ''' This...
30.134783
79
0.566873
import re import requests from bs4 import BeautifulSoup from datetime import datetime class Date: _day_of_month = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) _month_str = ('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', ...
true
true
f7204650310a54c5dad514d4271f2b18cd7ca4c9
43,074
py
Python
pruning/prune_resnet_tools.py
18463105800/ssd.pruning.pytorch
39592ee00e02f28742028a97592beec18d07258c
[ "MIT" ]
13
2019-11-15T16:18:55.000Z
2022-03-23T06:04:49.000Z
pruning/prune_resnet_tools.py
XUHUAKing/ssd.pruning.pytorch
39592ee00e02f28742028a97592beec18d07258c
[ "MIT" ]
null
null
null
pruning/prune_resnet_tools.py
XUHUAKing/ssd.pruning.pytorch
39592ee00e02f28742028a97592beec18d07258c
[ "MIT" ]
3
2019-11-27T07:27:38.000Z
2020-10-21T08:46:21.000Z
''' This file contains functions for pruning resnet-like model in layer level 1. prune_resconv_layer (resnet: conv layers) 2. prune_resnet_lconv_layer (resnet: lconv means identity layer) 3. prune_rbconv_by_indices (resnet: rbconv means right path's bottom layer) 4. prune_rbconv_by_number (resn...
43.953061
151
0.631402
import torch from torch.autograd import Variable from torchvision import models import cv2 cv2.setNumThreads(0) cv2.ocl.setUseOpenCL(False) import sys import numpy as np from models.resnet import BasicBlock, Bottleneck def replace_layers(model, i, indexes, layers): if i in indexes: # layers a...
true
true
f7204660bc2ad2aac0e43e529512a8b9923d1bed
122,038
py
Python
zerver/models.py
osamasarwar38/zulip
58b93c3e830249b1202b8f396b36a2660e1cb8f9
[ "Apache-2.0" ]
1
2020-06-22T18:00:20.000Z
2020-06-22T18:00:20.000Z
zerver/models.py
osamasarwar38/zulip
58b93c3e830249b1202b8f396b36a2660e1cb8f9
[ "Apache-2.0" ]
null
null
null
zerver/models.py
osamasarwar38/zulip
58b93c3e830249b1202b8f396b36a2660e1cb8f9
[ "Apache-2.0" ]
null
null
null
import datetime import re import sre_constants import time from collections import defaultdict from datetime import timedelta from typing import ( AbstractSet, Any, Callable, DefaultDict, Dict, Iterable, List, Optional, Sequence, Set, Tuple, TypeVar, Union, ) import ...
40.952349
119
0.702929
import datetime import re import sre_constants import time from collections import defaultdict from datetime import timedelta from typing import ( AbstractSet, Any, Callable, DefaultDict, Dict, Iterable, List, Optional, Sequence, Set, Tuple, TypeVar, Union, ) import ...
true
true
f720481df7aa14e67ee03df821bf5230d4975eab
2,378
py
Python
analysis/stats_runner.py
mglidden/git-analysis
818efe65ff37bd8aeff44912b57c2e6bcd6f2eea
[ "MIT" ]
1
2015-09-14T15:15:03.000Z
2015-09-14T15:15:03.000Z
analysis/stats_runner.py
mglidden/git-analysis
818efe65ff37bd8aeff44912b57c2e6bcd6f2eea
[ "MIT" ]
null
null
null
analysis/stats_runner.py
mglidden/git-analysis
818efe65ff37bd8aeff44912b57c2e6bcd6f2eea
[ "MIT" ]
null
null
null
import fix_paths from models.author import Author import basic_stats from models.commit import Commit import common from models.file_diff import FileDiff from models.hunk import Hunk from models.patch import Patch from collections import Counter, defaultdict import pylab import sqlalchemy session = common.Session() ...
38.983607
224
0.767452
import fix_paths from models.author import Author import basic_stats from models.commit import Commit import common from models.file_diff import FileDiff from models.hunk import Hunk from models.patch import Patch from collections import Counter, defaultdict import pylab import sqlalchemy session = common.Session() ...
false
true
f72048b0b98e8bc328e6ee0236c9c737d55cd314
19,936
py
Python
syndicate/core/build/deployment_processor.py
Dmytro-Skorniakov/aws-syndicate
81363334886c53969f1f0a0c0ac0168318204990
[ "Apache-2.0" ]
null
null
null
syndicate/core/build/deployment_processor.py
Dmytro-Skorniakov/aws-syndicate
81363334886c53969f1f0a0c0ac0168318204990
[ "Apache-2.0" ]
null
null
null
syndicate/core/build/deployment_processor.py
Dmytro-Skorniakov/aws-syndicate
81363334886c53969f1f0a0c0ac0168318204990
[ "Apache-2.0" ]
null
null
null
""" Copyright 2018 EPAM Systems, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
40.032129
79
0.610353
import concurrent import json from concurrent.futures import ALL_COMPLETED, ThreadPoolExecutor from datetime import date, datetime from functools import cmp_to_key from syndicate.commons.log_helper import get_logger from syndicate.core.build.bundle_processor import (create_deploy_output, ...
true
true
f7204924e00d695725bfe8a63d29154fabac6481
1,226
py
Python
app.py
abdu1aziz/10-Fast-Fingers
fa620cdf1f675b681048335f47686942373a6b57
[ "MIT" ]
null
null
null
app.py
abdu1aziz/10-Fast-Fingers
fa620cdf1f675b681048335f47686942373a6b57
[ "MIT" ]
null
null
null
app.py
abdu1aziz/10-Fast-Fingers
fa620cdf1f675b681048335f47686942373a6b57
[ "MIT" ]
null
null
null
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time # pip install selenium==2.53.6 """ if you wanna run it on your regular browser profile. profile = webdriver.FirefoxProfile('/home/{your_username}/.mozilla/firefox/{your_default_profile}') driver = webdriver.Fire...
24.52
100
0.613377
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time driver = webdriver.Chrome(executable_path=r'chromedriver.exe') def wait(no): time.sleep(no) def open_website(): driver.get('https://10fastfingers.com/typing-test/english') wait(5) def ru...
true
true
f7204d1a3af3765a90077f7c2d942f1a43b61546
29,621
py
Python
src/qt/qtwebkit/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py
viewdy/phantomjs
eddb0db1d253fd0c546060a4555554c8ee08c13c
[ "BSD-3-Clause" ]
1
2015-05-27T13:52:20.000Z
2015-05-27T13:52:20.000Z
src/qt/qtwebkit/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py
mrampersad/phantomjs
dca6f77a36699eb4e1c46f7600cca618f01b0ac3
[ "BSD-3-Clause" ]
null
null
null
src/qt/qtwebkit/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py
mrampersad/phantomjs
dca6f77a36699eb4e1c46f7600cca618f01b0ac3
[ "BSD-3-Clause" ]
1
2017-03-19T13:03:23.000Z
2017-03-19T13:03:23.000Z
# Copyright (c) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
31.016754
230
0.716181
frontend_domain_class = ( """ class $domainClassName { public: $domainClassName(InspectorFrontendChannel* inspectorFrontendChannel) : m_inspectorFrontendChannel(inspectorFrontendChannel) { } ${frontendDomainMethodDeclarations} void setInspectorFrontendChannel(Inspect...
true
true
f7204dbb790d27090a68c4f58eeffa3c3052f15c
3,609
py
Python
synthesis_wrapper.py
mdsol/Simulants
3c71702c301b2d4668adff1180d162a66172aeaa
[ "MIT" ]
null
null
null
synthesis_wrapper.py
mdsol/Simulants
3c71702c301b2d4668adff1180d162a66172aeaa
[ "MIT" ]
null
null
null
synthesis_wrapper.py
mdsol/Simulants
3c71702c301b2d4668adff1180d162a66172aeaa
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # Author: Mandis Beigi # Copyright (c) 2022 Medidata Solutions, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including wi...
44.555556
118
0.748961
import logging import k_anonymity import synthesis_lib import preprocessor_lib import utilities_lib def synthesize(df, config): logging.info('Performing k-anonymity to the data......................') logging.info('The data size before k-anonymity: {}'.format(df.shape)) ignore_c...
true
true
f7204dd2af16eafbaaa3d602acc5113528f0e93d
9,499
py
Python
tools/mininet/stratum.py
aweimeow/stratum
c59318e43ddc1572c04f3e7b0d2a4d0e0c243ae4
[ "Apache-2.0" ]
null
null
null
tools/mininet/stratum.py
aweimeow/stratum
c59318e43ddc1572c04f3e7b0d2a4d0e0c243ae4
[ "Apache-2.0" ]
null
null
null
tools/mininet/stratum.py
aweimeow/stratum
c59318e43ddc1572c04f3e7b0d2a4d0e0c243ae4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # # Copyright 2018-present Open Networking Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
31.875839
89
0.599432
''' This module contains a switch class for Mininet: StratumBmv2Switch Prerequisites ------------- 1. Docker- mininet+stratum_bmv2 image: $ cd stratum $ docker build -t <some tag> -f tools/mininet/Dockerfile . Usage ----- From withing the Docker container, you can run Mininet using the following: $ mn...
false
true
f7204f5abde1644d55dfd088cc146878f778bf9c
5,467
py
Python
btservice.py
shripal17/AUVController
077b47ffc3726aad4c715bee2711935675530cc7
[ "Apache-2.0" ]
null
null
null
btservice.py
shripal17/AUVController
077b47ffc3726aad4c715bee2711935675530cc7
[ "Apache-2.0" ]
null
null
null
btservice.py
shripal17/AUVController
077b47ffc3726aad4c715bee2711935675530cc7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import logging import logging.handlers import argparse import sys import os import time from bluetooth import * class LoggerHelper(object): def __init__(self, logger, level): self.logger = logger self.level = level def write(self, message): if message.rstrip() != "":...
30.887006
97
0.522773
import logging import logging.handlers import argparse import sys import os import time from bluetooth import * class LoggerHelper(object): def __init__(self, logger, level): self.logger = logger self.level = level def write(self, message): if message.rstrip() != "": self...
true
true
f7204f6d6a1bb0b49c21d7f8d2f69d975e0e8468
584
py
Python
src/sensing/gpsTest/test.py
NikLeberg/quadro2
ec2f37858a32b4bb88f7887fc52b683e067c0e1e
[ "MIT" ]
1
2021-02-13T20:12:57.000Z
2021-02-13T20:12:57.000Z
src/sensing/gpsTest/test.py
NikLeberg/quadro2
ec2f37858a32b4bb88f7887fc52b683e067c0e1e
[ "MIT" ]
null
null
null
src/sensing/gpsTest/test.py
NikLeberg/quadro2
ec2f37858a32b4bb88f7887fc52b683e067c0e1e
[ "MIT" ]
1
2021-03-05T19:04:03.000Z
2021-03-05T19:04:03.000Z
#!/usr/bin/python # -*- coding: utf-8 -* import sys import csv def main(): s = '' l = [] with open(str(sys.argv[1])) as csvfile: readCSV = csv.reader(csvfile, delimiter=',') for row in readCSV: c = row[1] if 'CR' in c: s = ''.join(l...
20.137931
53
0.356164
import sys import csv def main(): s = '' l = [] with open(str(sys.argv[1])) as csvfile: readCSV = csv.reader(csvfile, delimiter=',') for row in readCSV: c = row[1] if 'CR' in c: s = ''.join(l) l = [] el...
true
true
f7204f97b7c820606a1883b076c1563755aa5e97
971
py
Python
tests/test_items.py
JoshMcKinstry/Dork_Game_team_octosquad
56cf823ae2a7357d9c50f238da7c72d61fa2cb53
[ "MIT" ]
null
null
null
tests/test_items.py
JoshMcKinstry/Dork_Game_team_octosquad
56cf823ae2a7357d9c50f238da7c72d61fa2cb53
[ "MIT" ]
12
2019-06-26T16:36:13.000Z
2019-07-29T17:42:05.000Z
tests/test_items.py
JoshMcKinstry/team34
56cf823ae2a7357d9c50f238da7c72d61fa2cb53
[ "MIT" ]
3
2019-07-03T08:08:35.000Z
2019-07-14T16:00:46.000Z
""" A test for items """ from dork.items import Item def test_init_method(): """ Testing the constructor """ name = 'Donut' description = {'This is an old fasion donut'} properties = {'eatable'} item = Item(name, description, properties) assert item.name == name assert item.descrip...
24.275
55
0.654995
from dork.items import Item def test_init_method(): name = 'Donut' description = {'This is an old fasion donut'} properties = {'eatable'} item = Item(name, description, properties) assert item.name == name assert item.description == description assert item.properties == properties def te...
true
true
f72050f9533ad622e35f21606eba12c9e386ae67
3,953
py
Python
NAIP/filter_poly.py
pberezina/earthengine-py-notebooks
4cbe3c52bcc9ed3f1337bf097aa5799442991a5e
[ "MIT" ]
1
2020-03-20T19:39:34.000Z
2020-03-20T19:39:34.000Z
NAIP/filter_poly.py
pberezina/earthengine-py-notebooks
4cbe3c52bcc9ed3f1337bf097aa5799442991a5e
[ "MIT" ]
null
null
null
NAIP/filter_poly.py
pberezina/earthengine-py-notebooks
4cbe3c52bcc9ed3f1337bf097aa5799442991a5e
[ "MIT" ]
null
null
null
''' <table class="ee-notebook-buttons" align="left"> <td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/NAIP/filter_poly.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td> <td><a target="_blank" href="h...
34.077586
422
0.707058
import subprocess try: import geehydro except ImportError: print('geehydro package not installed. Installing ...') subprocess.check_call(["python", '-m', 'pip', 'install', 'geehydro']) import ee import folium import geehydro try: ee.Initialize() except Exception as e: ee.Authenticate...
true
true
f72051a61c28b0f296ebe1cb03fdacdcdbc270e1
1,664
py
Python
geocamUtil/models/UuidField.py
geocam/geocamUtilWeb
b64fc063c64b4b0baa140db4c126f2ff980756ab
[ "NASA-1.3" ]
4
2017-03-03T16:24:24.000Z
2018-06-24T05:50:40.000Z
geocamUtil/models/UuidField.py
geocam/geocamUtilWeb
b64fc063c64b4b0baa140db4c126f2ff980756ab
[ "NASA-1.3" ]
1
2021-09-29T17:17:30.000Z
2021-09-29T17:17:30.000Z
geocamUtil/models/UuidField.py
geocam/geocamUtilWeb
b64fc063c64b4b0baa140db4c126f2ff980756ab
[ "NASA-1.3" ]
1
2017-12-19T20:45:53.000Z
2017-12-19T20:45:53.000Z
# __BEGIN_LICENSE__ #Copyright (c) 2015, United States Government, as represented by the #Administrator of the National Aeronautics and Space Administration. #All rights reserved. # __END_LICENSE__ try: import uuid except ImportError: uuid = None from django.db import models if uuid: def makeUuid(): ...
28.689655
91
0.646034
try: import uuid except ImportError: uuid = None from django.db import models if uuid: def makeUuid(): return str(uuid.uuid4()) else: import random def makeUuid(): return '%04x-%02x-%02x-%02x-%06x' % (random.getrandbits(32), random.getrandbits(8), ...
true
true
f72051a8faae27e72e9e3e355265d217e689a1b4
82
py
Python
ABC099/B.py
shimomura314/AtcoderCodes
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
[ "MIT" ]
null
null
null
ABC099/B.py
shimomura314/AtcoderCodes
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
[ "MIT" ]
null
null
null
ABC099/B.py
shimomura314/AtcoderCodes
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
[ "MIT" ]
null
null
null
x,y = map(int,input().split()) a = 0 for i in range(y-x-1): a += i+1 print(a-x)
16.4
30
0.536585
x,y = map(int,input().split()) a = 0 for i in range(y-x-1): a += i+1 print(a-x)
true
true
f720522b36dfb68926f25b5e15f47500f2daffa4
342
py
Python
src/france/draft_2.py
ClementRolinat/covidtracker-data
7536b8899bc9bc0a6547288e86838233870dadaf
[ "MIT" ]
314
2020-03-16T20:31:50.000Z
2022-03-11T17:54:07.000Z
src/france/draft_2.py
ClementRolinat/covidtracker-data
7536b8899bc9bc0a6547288e86838233870dadaf
[ "MIT" ]
39
2020-03-30T16:27:03.000Z
2022-02-28T14:33:55.000Z
src/france/draft_2.py
ClementRolinat/covidtracker-data
7536b8899bc9bc0a6547288e86838233870dadaf
[ "MIT" ]
61
2020-04-30T18:27:33.000Z
2022-03-25T09:53:45.000Z
#!/usr/bin/env python # coding: utf-8 # In[29]: import math T = 10 RH = 50 AH_num = 6.112 * math.exp(17.67 * T / (T+243.5)) * RH * 2.1674 AH_den = 273.15 + T AH = AH_num / AH_den contenu_exp = (T-7.5)**2/196 + (RH-75)**2/625 + (AH-6)**2/2.89 IPTCC = 100 * math.exp(-0.5 * contenu_exp) IPTCC # In[9]: math.exp...
12.666667
63
0.570175
import math T = 10 RH = 50 AH_num = 6.112 * math.exp(17.67 * T / (T+243.5)) * RH * 2.1674 AH_den = 273.15 + T AH = AH_num / AH_den contenu_exp = (T-7.5)**2/196 + (RH-75)**2/625 + (AH-6)**2/2.89 IPTCC = 100 * math.exp(-0.5 * contenu_exp) IPTCC math.exp(-0.5 * contenu_exp)
true
true
f7205256fa9a8ca8c439c25f4c8effda40af5e58
1,930
py
Python
montage_pt.py
Yuxuan-PO/eddyshelf
3aad0ca24d0812fdab666a7a753f28096164db26
[ "MIT" ]
1
2021-04-19T01:04:39.000Z
2021-04-19T01:04:39.000Z
montage_pt.py
Yuxuan-PO/eddyshelf
3aad0ca24d0812fdab666a7a753f28096164db26
[ "MIT" ]
null
null
null
montage_pt.py
Yuxuan-PO/eddyshelf
3aad0ca24d0812fdab666a7a753f28096164db26
[ "MIT" ]
2
2017-10-05T03:52:55.000Z
2021-04-19T01:04:36.000Z
#!/usr/bin/python3 def make_montage(basedir, depths): """ makes a montage of passive tracer animation from runs.animate_pt run with different depths Arguments: basedir - basedir to which depths are appended i.e., runew-03-pt-z- depths - depths at which stuff has been outputted Retur...
26.805556
75
0.594819
def make_montage(basedir, depths): import subprocess import glob import os flist = glob.glob(basedir + str(depths[0]) + '/*.png') N = len(flist) print(depths) outdir = 'temp_pt' outfmt_av = './' + outdir + '/output_%06d.png' outfmt_mo = './' + outdir + '/output_{0:06d}.pn...
true
true
f7205265c35def010f24eb062003ac4efb295334
2,347
py
Python
orchestrator-bundle/orc8r-eventd-operator/tests/unit/test_charm.py
canonical/charmed-magma
43ac2782930518ee419ad3e9ab451df5ae3324f6
[ "Apache-2.0" ]
2
2021-12-10T16:32:23.000Z
2021-12-15T21:14:46.000Z
orchestrator-bundle/orc8r-eventd-operator/tests/unit/test_charm.py
canonical/charmed-magma
43ac2782930518ee419ad3e9ab451df5ae3324f6
[ "Apache-2.0" ]
2
2022-02-25T14:21:15.000Z
2022-03-08T23:56:45.000Z
orchestrator-bundle/orc8r-eventd-operator/tests/unit/test_charm.py
canonical/charmed-magma
43ac2782930518ee419ad3e9ab451df5ae3324f6
[ "Apache-2.0" ]
3
2021-12-10T16:23:33.000Z
2021-12-16T10:08:23.000Z
#!/usr/bin/env python3 # Copyright 2021 Canonical Ltd. # See LICENSE file for licensing details. import unittest from unittest.mock import call, patch from ops import testing from ops.model import BlockedStatus from charm import MagmaOrc8rEventdCharm testing.SIMULATE_CAN_CONNECT = True class Test(unittest.TestCas...
33.528571
96
0.691095
import unittest from unittest.mock import call, patch from ops import testing from ops.model import BlockedStatus from charm import MagmaOrc8rEventdCharm testing.SIMULATE_CAN_CONNECT = True class Test(unittest.TestCase): @patch( "charm.KubernetesServicePatch", lambda charm, ports, addition...
true
true
f7205449d69b43bd90ff1d11cf5ac09d1ed82d7f
393,252
py
Python
test/test_linalg.py
Mu-L/pytorch
b0bdf588ea575928a94264c30999385d5ff2bc32
[ "Intel" ]
1
2022-01-01T14:41:11.000Z
2022-01-01T14:41:11.000Z
test/test_linalg.py
Mu-L/pytorch
b0bdf588ea575928a94264c30999385d5ff2bc32
[ "Intel" ]
null
null
null
test/test_linalg.py
Mu-L/pytorch
b0bdf588ea575928a94264c30999385d5ff2bc32
[ "Intel" ]
null
null
null
# -*- coding: utf-8 -*- # Owner(s): ["module: linear algebra"] import torch import numpy as np import unittest import itertools import warnings import math from math import inf, nan, isnan import random from random import randrange from itertools import product from functools import reduce from torch.testing._intern...
47.980966
131
0.581955
import torch import numpy as np import unittest import itertools import warnings import math from math import inf, nan, isnan import random from random import randrange from itertools import product from functools import reduce from torch.testing._internal.common_utils import \ (TestCase, run_tests, TEST_SCIPY...
true
true
f7205474fe31fcf9ee4d542a8f985061f402912b
6,074
py
Python
c7n/actions/autotag.py
chris-angeli-rft/cloud-custodian
5ff331b114a591dbaf6d672e30ceefb7ae64a5dd
[ "Apache-2.0" ]
8
2021-05-18T02:22:03.000Z
2021-09-11T02:49:04.000Z
c7n/actions/autotag.py
chris-angeli-rft/cloud-custodian
5ff331b114a591dbaf6d672e30ceefb7ae64a5dd
[ "Apache-2.0" ]
1
2021-04-26T04:38:35.000Z
2021-04-26T04:38:35.000Z
c7n/actions/autotag.py
chris-angeli-rft/cloud-custodian
5ff331b114a591dbaf6d672e30ceefb7ae64a5dd
[ "Apache-2.0" ]
1
2021-11-10T02:28:47.000Z
2021-11-10T02:28:47.000Z
# Copyright 2017-2018 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
38.687898
109
0.602898
from .core import EventAction from c7n.exceptions import PolicyValidationError from c7n.manager import resources from c7n import utils class AutoTagUser(EventAction): schema_alias = True schema = utils.type_schema( 'auto-tag-user', required=['tag'], **{'user-type': { ...
true
true
f720548ea283334132cb0ded4dadf688758eebc3
2,786
py
Python
tests/integration/long/test_policies.py
clohfink/python-driver
30a0e27cd1b8999267c146f0a93adf962a50790b
[ "Apache-2.0" ]
1
2020-07-11T11:20:34.000Z
2020-07-11T11:20:34.000Z
tests/integration/long/test_policies.py
clohfink/python-driver
30a0e27cd1b8999267c146f0a93adf962a50790b
[ "Apache-2.0" ]
null
null
null
tests/integration/long/test_policies.py
clohfink/python-driver
30a0e27cd1b8999267c146f0a93adf962a50790b
[ "Apache-2.0" ]
1
2021-07-22T07:20:49.000Z
2021-07-22T07:20:49.000Z
# Copyright DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
39.239437
135
0.71285
try: import unittest2 as unittest except ImportError: import unittest from cassandra import ConsistencyLevel, Unavailable from cassandra.cluster import Cluster, ExecutionProfile, EXEC_PROFILE_DEFAULT from tests.integration import use_cluster, get_cluster, get_node def setup_module(): use...
true
true
f72055de22b933a14a11f041fdc68987d8fc5154
337
py
Python
plotarchive/src/unarchive.py
buswinka/plotarchive
5393b0140e11551a7c3bbb5c1094d1b5e0fce6bd
[ "MIT" ]
null
null
null
plotarchive/src/unarchive.py
buswinka/plotarchive
5393b0140e11551a7c3bbb5c1094d1b5e0fce6bd
[ "MIT" ]
null
null
null
plotarchive/src/unarchive.py
buswinka/plotarchive
5393b0140e11551a7c3bbb5c1094d1b5e0fce6bd
[ "MIT" ]
null
null
null
import dill from . import files def expand(filename, folder=None): data = dill.load(open(filename, 'rb')) file_dict = data['files'] plotter = data['func'] if 'args' in data: args = data['args'] plotter(**data['args']) if folder is not None: files.write_files_from_dict(fi...
19.823529
54
0.617211
import dill from . import files def expand(filename, folder=None): data = dill.load(open(filename, 'rb')) file_dict = data['files'] plotter = data['func'] if 'args' in data: args = data['args'] plotter(**data['args']) if folder is not None: files.write_files_from_dict(fi...
true
true
f72056e829f271ea00336ce08152308cdf5bbcfa
1,409
py
Python
setup.py
yuhonghong66/onnx-mxnet
17e8fa4f515e0bb5c2fd01ef733c13bd51f6ff95
[ "Apache-2.0" ]
118
2017-11-03T05:21:55.000Z
2020-03-24T14:57:21.000Z
setup.py
yuhonghong66/onnx-mxnet
17e8fa4f515e0bb5c2fd01ef733c13bd51f6ff95
[ "Apache-2.0" ]
43
2017-11-20T14:24:30.000Z
2019-01-10T06:47:18.000Z
setup.py
yuhonghong66/onnx-mxnet
17e8fa4f515e0bb5c2fd01ef733c13bd51f6ff95
[ "Apache-2.0" ]
32
2017-11-16T22:33:33.000Z
2021-03-15T17:09:09.000Z
# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # http://www.apache.org/licenses/LICENSE-2.0 # or in the "license" file...
36.128205
98
0.725337
from setuptools import setup, find_packages pkgs = find_packages() setup( name='onnx-mxnet', version='0.4.2', description='ONNX-MXNet Model converter', url='https://github.com/onnx/onnx-mxnet', keywords='ONNX MXNet model converter deep learning', packages=pkgs, install...
true
true
f7205702ffae189a8112330f7eb605fc4ca4cadc
3,047
py
Python
examples/minigrid/eval_maze.py
AIDefender/Tianshou-ReMPER
297ba383fc1e4e19cd52bd89df7d0d3148bd4e68
[ "MIT" ]
null
null
null
examples/minigrid/eval_maze.py
AIDefender/Tianshou-ReMPER
297ba383fc1e4e19cd52bd89df7d0d3148bd4e68
[ "MIT" ]
null
null
null
examples/minigrid/eval_maze.py
AIDefender/Tianshou-ReMPER
297ba383fc1e4e19cd52bd89df7d0d3148bd4e68
[ "MIT" ]
null
null
null
import seaborn as sns import matplotlib.pyplot as plt import pickle import argparse import numpy as np import os sns.set_context('paper', font_scale=1.5) parser = argparse.ArgumentParser() parser.add_argument("-n", type=int) parser.add_argument('--resume-path', type=str, default=None) parser.add_argument('--title', typ...
35.847059
132
0.640958
import seaborn as sns import matplotlib.pyplot as plt import pickle import argparse import numpy as np import os sns.set_context('paper', font_scale=1.5) parser = argparse.ArgumentParser() parser.add_argument("-n", type=int) parser.add_argument('--resume-path', type=str, default=None) parser.add_argument('--title', typ...
true
true
f7205781c0c4df8d2891d89d9d280b3ad59b22ec
699
py
Python
aiovault/v1/auth/backends/__init__.py
johnnoone/aiovault
03e1bfb6f0404dcf97ce87a98c539027c4e78a37
[ "BSD-3-Clause" ]
1
2022-01-31T22:37:57.000Z
2022-01-31T22:37:57.000Z
aiovault/v1/auth/backends/__init__.py
johnnoone/aiovault
03e1bfb6f0404dcf97ce87a98c539027c4e78a37
[ "BSD-3-Clause" ]
null
null
null
aiovault/v1/auth/backends/__init__.py
johnnoone/aiovault
03e1bfb6f0404dcf97ce87a98c539027c4e78a37
[ "BSD-3-Clause" ]
null
null
null
""" auth.backends ~~~~~~~~~~~~~ """ from .app_id import AppIDBackend from .cert import CertBackend from .github import GitHubBackend from .ldap import LDAPBackend from .userpass import UserPassBackend from stevedore import DriverManager __all__ = ['AppIDBackend', 'CertBackend', 'GitHubBackend', 'L...
21.84375
58
0.662375
from .app_id import AppIDBackend from .cert import CertBackend from .github import GitHubBackend from .ldap import LDAPBackend from .userpass import UserPassBackend from stevedore import DriverManager __all__ = ['AppIDBackend', 'CertBackend', 'GitHubBackend', 'LDAPBackend', 'UserPassBackend'] def load_ba...
true
true
f7205a8e46810cda3abbd608dafa0f62fae9673c
8,873
py
Python
doc/conf.py
duwhop/relate
568bf6868fbc980e78e74fa29f84d10be2f8c94d
[ "Unlicense" ]
null
null
null
doc/conf.py
duwhop/relate
568bf6868fbc980e78e74fa29f84d10be2f8c94d
[ "Unlicense" ]
null
null
null
doc/conf.py
duwhop/relate
568bf6868fbc980e78e74fa29f84d10be2f8c94d
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # # relate documentation build configuration file, created by # sphinx-quickstart on Thu Jun 26 18:41:17 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
31.242958
79
0.712949
import sys import os sys.path.insert(0, os.path.abspath('..')) os.environ["DJANGO_SETTINGS_MODULE"] = "relate.settings" import django django.setup() extensions = [ 'sphinx.ext.autodoc', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u...
true
true
f7205e2735b7f7103c0de347dfa88005e04f48db
7,513
py
Python
src/pretix/base/models/base.py
tcatm/pretix
a76f74b161e140f4445568b97cb26fc57247e0d2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/base/models/base.py
tcatm/pretix
a76f74b161e140f4445568b97cb26fc57247e0d2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/base/models/base.py
tcatm/pretix
a76f74b161e140f4445568b97cb26fc57247e0d2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import json import uuid from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models.constants import LOOKUP_SEP from django.db.models.signals import post_delete from django.dispatch import receiver from django.urls import reverse from django.utils.crypto import get_ran...
35.77619
131
0.626381
import json import uuid from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models.constants import LOOKUP_SEP from django.db.models.signals import post_delete from django.dispatch import receiver from django.urls import reverse from django.utils.crypto import get_ran...
true
true
f7205e512691d1a027eaa2ec064dc6f8fc60327d
690
py
Python
anova.py
Roninkoi/Scicodes
97eb4dc017ad4cd494b545aecaa9fdd7c501a9b7
[ "MIT" ]
null
null
null
anova.py
Roninkoi/Scicodes
97eb4dc017ad4cd494b545aecaa9fdd7c501a9b7
[ "MIT" ]
null
null
null
anova.py
Roninkoi/Scicodes
97eb4dc017ad4cd494b545aecaa9fdd7c501a9b7
[ "MIT" ]
null
null
null
import numpy as np from scipy.stats import f # Does analysis of variance for a number of sets x. # Each set in x is an array containing mean, variance # and number [mean, var, n]. def anova(x): mean = np.mean(x[:, 0]) # overall mean n = np.sum(x[:, 2]) # total N r = len(x) # number of sets ssb = 0. ...
27.6
57
0.550725
import numpy as np from scipy.stats import f def anova(x): mean = np.mean(x[:, 0]) n = np.sum(x[:, 2]) r = len(x) ssb = 0. for i in range(r): ssb += x[i, 2] * (x[i, 0] - mean)**2 ssw = 0. for i in range(r): ssw += (x[i, 2] - 1) * x[i, 1] fs = (ssb / (r - 1)) /...
true
true
f7205fc62dfb7c7257990f72c13066d2d9797429
6,440
py
Python
ir/text.py
goerz/incremental-reading
443cc85d1dac6a8200f63b24bd443fb052d222dc
[ "ISC" ]
1
2019-07-22T03:06:14.000Z
2019-07-22T03:06:14.000Z
ir/text.py
goerz/incremental-reading
443cc85d1dac6a8200f63b24bd443fb052d222dc
[ "ISC" ]
null
null
null
ir/text.py
goerz/incremental-reading
443cc85d1dac6a8200f63b24bd443fb052d222dc
[ "ISC" ]
null
null
null
# Copyright 2013 Tiago Barroso # Copyright 2013 Frank Kmiec # Copyright 2013-2016 Aleksej # Copyright 2017 Christian Weiß # Copyright 2018 Timothée Chauvin # Copyright 2017-2018 Joseph Lorimer <luoliyan@posteo.net> # # Permission to use, copy, modify, and distribute this software for any purpose # with or without fee i...
34.074074
79
0.590373
from collections import defaultdict from anki.notes import Note from aqt import mw from aqt.addcards import AddCards from aqt.editcurrent import EditCurrent from aqt.utils import getText, showInfo, showWarning, tooltip from .util import fixImages, getField, setField SCHEDULE_EXTRACT = 0 class Te...
true
true
f7205fdea93ebe4dd9b56a86d0855992a2a79f59
11,105
py
Python
python/lib/cgc_util.py
fermi-lat/calibGenCAL
9b207d7ba56031f5ecd7aab544e68a6dedc7d776
[ "BSD-3-Clause" ]
null
null
null
python/lib/cgc_util.py
fermi-lat/calibGenCAL
9b207d7ba56031f5ecd7aab544e68a6dedc7d776
[ "BSD-3-Clause" ]
null
null
null
python/lib/cgc_util.py
fermi-lat/calibGenCAL
9b207d7ba56031f5ecd7aab544e68a6dedc7d776
[ "BSD-3-Clause" ]
null
null
null
import sys """ collection of simple utilities shared throughout code """ __facility__ = "Offline" __abstract__ = "collection of utility code" __author__ = "Z.Fewtrell" __date__ = "$Date: 2008/04/30 16:53:41 $" __version__ = "$Revision: 1.3 $, $Author: fewtrell $" __release__ = "$Name: $" __credits__ ...
33.149254
136
0.513192
import sys """ collection of simple utilities shared throughout code """ __facility__ = "Offline" __abstract__ = "collection of utility code" __author__ = "Z.Fewtrell" __date__ = "$Date: 2008/04/30 16:53:41 $" __version__ = "$Revision: 1.3 $, $Author: fewtrell $" __release__ = "$Name: $" __credits__ ...
false
true
f720608eb7164c7da567f088dbf879d1825a9a14
18
py
Python
drivers/__init__.py
lucasmazz/ackermann-line-follower-robot
fe2914abdfe8bfb0867955b2e8a5fe787d30e0a9
[ "BSD-2-Clause" ]
1
2022-02-03T22:10:00.000Z
2022-02-03T22:10:00.000Z
drivers/__init__.py
lucasmazz/ackermann-line-follower-robot
fe2914abdfe8bfb0867955b2e8a5fe787d30e0a9
[ "BSD-2-Clause" ]
null
null
null
drivers/__init__.py
lucasmazz/ackermann-line-follower-robot
fe2914abdfe8bfb0867955b2e8a5fe787d30e0a9
[ "BSD-2-Clause" ]
1
2022-02-17T13:10:56.000Z
2022-02-17T13:10:56.000Z
from .car import *
18
18
0.722222
from .car import *
true
true
f720616eb7e8ff6c025fb8cda31659df286aedc8
1,043
py
Python
vasp/vaspForcesRunningAverage.py
roryvandervalk/computationalChemistryTools
9e718433f82e010d127f576bd2bf48af3953e8b1
[ "MIT" ]
null
null
null
vasp/vaspForcesRunningAverage.py
roryvandervalk/computationalChemistryTools
9e718433f82e010d127f576bd2bf48af3953e8b1
[ "MIT" ]
null
null
null
vasp/vaspForcesRunningAverage.py
roryvandervalk/computationalChemistryTools
9e718433f82e010d127f576bd2bf48af3953e8b1
[ "MIT" ]
null
null
null
#! /bin/python3 if __name__ == "__main__": # Collect data f = open('OUTCAR', 'r') forces = [] for l in f: if "FORCES:" in l: forces.append([float(x) for x in l.split()[-2:]]) f.close() # Early exit check to avoid errors from empty arrays if(len(forces) == 0): print("No 'FORCES:' entries fou...
28.972222
59
0.567593
if __name__ == "__main__": f = open('OUTCAR', 'r') forces = [] for l in f: if "FORCES:" in l: forces.append([float(x) for x in l.split()[-2:]]) f.close() if(len(forces) == 0): print("No 'FORCES:' entries found") else: print(forces[-1]) window = 5 ave = [] ...
true
true
f72062661e10fbf546f7901cb621778d0a733be7
178
py
Python
bg_helper/tools/__init__.py
kenjyco/bg-helper
a0760009864f0e677d29cd522e6c95350c75c2c7
[ "MIT" ]
null
null
null
bg_helper/tools/__init__.py
kenjyco/bg-helper
a0760009864f0e677d29cd522e6c95350c75c2c7
[ "MIT" ]
null
null
null
bg_helper/tools/__init__.py
kenjyco/bg-helper
a0760009864f0e677d29cd522e6c95350c75c2c7
[ "MIT" ]
null
null
null
from bg_helper.tools._docker import * from bg_helper.tools._git import * from bg_helper.tools._grep import * from bg_helper.tools._ps import * from bg_helper.tools._ssh import *
29.666667
37
0.803371
from bg_helper.tools._docker import * from bg_helper.tools._git import * from bg_helper.tools._grep import * from bg_helper.tools._ps import * from bg_helper.tools._ssh import *
true
true
f72062c7ad5e58574682ee8059b838a63b9a0352
5,296
py
Python
flask/app.py
vincentlaucsb/us_commutes_ii
e3f32d7baddbf7fec483b95bd2835d58befc3cad
[ "MIT" ]
1
2020-10-17T18:40:20.000Z
2020-10-17T18:40:20.000Z
flask/app.py
vincentlaucsb/us-commutes-2
e3f32d7baddbf7fec483b95bd2835d58befc3cad
[ "MIT" ]
null
null
null
flask/app.py
vincentlaucsb/us-commutes-2
e3f32d7baddbf7fec483b95bd2835d58befc3cad
[ "MIT" ]
null
null
null
from flask import Flask, jsonify from flask_cors import CORS, cross_origin from os import getenv import psycopg2 import pickle from secret import PG_PASSWORD class Queries(object): @staticmethod def query(sql: str): try: with open('cache-{}'.format(hash(sql)), mode='rb') as infile: ...
35.783784
132
0.565899
from flask import Flask, jsonify from flask_cors import CORS, cross_origin from os import getenv import psycopg2 import pickle from secret import PG_PASSWORD class Queries(object): @staticmethod def query(sql: str): try: with open('cache-{}'.format(hash(sql)), mode='rb') as infile: ...
true
true
f72062e75ab889b21768dc24ee456870d015edac
3,932
py
Python
flash/image/data.py
dudeperf3ct/lightning-flash
a855cd14cf1cd0301b4a2f82c0c95e4d8d986650
[ "Apache-2.0" ]
1
2022-03-09T22:40:05.000Z
2022-03-09T22:40:05.000Z
flash/image/data.py
dudeperf3ct/lightning-flash
a855cd14cf1cd0301b4a2f82c0c95e4d8d986650
[ "Apache-2.0" ]
null
null
null
flash/image/data.py
dudeperf3ct/lightning-flash
a855cd14cf1cd0301b4a2f82c0c95e4d8d986650
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
36.073394
101
0.689471
import base64 from io import BytesIO from pathlib import Path from typing import Any, Dict, List import numpy as np import torch import flash from flash.core.data.io.input import DataKeys, Input, ServeInput from flash.core.data.utilities.paths import filter_valid_files, has_file_allowed_extension, PATH_T...
true
true