max_stars_repo_path
stringlengths
4
286
max_stars_repo_name
stringlengths
5
119
max_stars_count
int64
0
191k
id
stringlengths
1
7
content
stringlengths
6
1.03M
content_cleaned
stringlengths
6
1.03M
language
stringclasses
111 values
language_score
float64
0.03
1
comments
stringlengths
0
556k
edu_score
float64
0.32
5.03
edu_int_score
int64
0
5
tests/functional_tests.py
jab/py-skiplist
23
6625551
<reponame>jab/py-skiplist import unittest import collections from py_skiplist.iterators import uniform from py_skiplist.skiplist import Skiplist class InterfaceTestCase(unittest.TestCase): def test_interface_methods_set(self): self.assertTrue(issubclass(Skiplist, collections.MutableMapping), ...
import unittest import collections from py_skiplist.iterators import uniform from py_skiplist.skiplist import Skiplist class InterfaceTestCase(unittest.TestCase): def test_interface_methods_set(self): self.assertTrue(issubclass(Skiplist, collections.MutableMapping), msg='Skiplist ...
none
1
2.833649
3
tests/core/commands/test_cmd_add.py
Starz0r/pytuber
8
6625552
from unittest import mock from pytuber import cli from pytuber.core.commands.cmd_add import ( create_playlist, parse_jspf, parse_m3u, parse_text, parse_xspf, ) from pytuber.core.models import PlaylistManager, PlaylistType, Provider from tests.utils import CommandTestCase, PlaylistFixture class Co...
from unittest import mock from pytuber import cli from pytuber.core.commands.cmd_add import ( create_playlist, parse_jspf, parse_m3u, parse_text, parse_xspf, ) from pytuber.core.models import PlaylistManager, PlaylistType, Provider from tests.utils import CommandTestCase, PlaylistFixture class Co...
en
0.432059
# a - b", <?xml version="1.0" encoding="UTF-8"?> <playlist version="1" xmlns="http://xspf.org/ns/0/"> <trackList> <track> <creator>Queen</creator> <title>Bohemian Rhapsody</title> </track> ...
2.606499
3
DjangoWebProject4/__init__.py
sonalnikam/P
0
6625553
<gh_stars>0 """ Package for DjangoWebProject4. """
""" Package for DjangoWebProject4. """
en
0.482155
Package for DjangoWebProject4.
1.028058
1
tests/test_boot.py
cu2/aldebaran
4
6625554
import unittest from unittest.mock import Mock, patch from utils import boot from utils import executable class TestBootImage(unittest.TestCase): def setUp(self): self.mock_mgr = Mock() self.mock_mgr.__enter__ = Mock() self.mock_mgr.__exit__ = Mock() def test_write_byte(self): ...
import unittest from unittest.mock import Mock, patch from utils import boot from utils import executable class TestBootImage(unittest.TestCase): def setUp(self): self.mock_mgr = Mock() self.mock_mgr.__enter__ = Mock() self.mock_mgr.__exit__ = Mock() def test_write_byte(self): ...
none
1
2.782064
3
tests/test_ssl.py
AvitalFineRedis/redis-py
0
6625555
import os import socket import ssl from urllib.parse import urlparse import pytest import redis from redis.exceptions import ConnectionError, RedisError from .conftest import skip_if_cryptography, skip_if_nocryptography @pytest.mark.ssl class TestSSL: """Tests for SSL connections This relies on the --redi...
import os import socket import ssl from urllib.parse import urlparse import pytest import redis from redis.exceptions import ConnectionError, RedisError from .conftest import skip_if_cryptography, skip_if_nocryptography @pytest.mark.ssl class TestSSL: """Tests for SSL connections This relies on the --redi...
en
0.820904
Tests for SSL connections This relies on the --redis-ssl-url purely for rebuilding the client and connecting to the appropriate port. # github actions package validation case # rediss://, url based # these certificates on the socket end return unauthorized # then the second call succeeds # just needs to not be...
2.466879
2
Tic_Tac_Toe.py
emiliebutez/Projet_TicTacToe
0
6625556
import math import random size = 4 def compterLignes(grille, symbole): """Compte le nombre de fois où le symbole est sur une ligne qui peut gagner""" maximum = 0 for ligne in grille: count = 0 for case in ligne : if case == symbole : count += 1 ...
import math import random size = 4 def compterLignes(grille, symbole): """Compte le nombre de fois où le symbole est sur une ligne qui peut gagner""" maximum = 0 for ligne in grille: count = 0 for case in ligne : if case == symbole : count += 1 ...
fr
0.980971
Compte le nombre de fois où le symbole est sur une ligne qui peut gagner Compte le nombre de fois où le symbole est sur une colonne qui peut gagner Compte le nombre de fois où le symbole est sur une diagonale qui peut gagner Compte le nombre de fois où le symbole est sur un carré qui peut gagner Appl...
3.426378
3
4.torch.nn/Containers1.py
TwT520Ly/Pytorch-Study
0
6625557
import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class Model1(nn.Module): def __init__(self): super(Model1, self).__init__() self.conv1 = nn.Conv2d(1, 20, 5) self.conv2 = nn.Conv2d(20, 20, 5) def forward(self, x): x = F.relu(self.conv1(x...
import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class Model1(nn.Module): def __init__(self): super(Model1, self).__init__() self.conv1 = nn.Conv2d(1, 20, 5) self.conv2 = nn.Conv2d(20, 20, 5) def forward(self, x): x = F.relu(self.conv1(x...
es
0.289815
# base on model1 and add the "conv3" # print(model3.children()) # model3.cpu() # model3.cuda(device=1) # model3.double() # model3.float() # model3.half() ## Dropout、BN # model3.eval() # model3.train()
2.972529
3
scripts/windb_symbols/apply_windbg_symbols.py
CrackerCat/idawilli
0
6625558
<reponame>CrackerCat/idawilli<filename>scripts/windb_symbols/apply_windbg_symbols.py from idaapi import * from idc import * # This script prompts for the path to a file # which contains a three column, whitespace-delimited list # # addr deref'd function # 00bca02c 77dd79c6 ADVAPI32!InitializeSecurityDe...
from idaapi import * from idc import * # This script prompts for the path to a file # which contains a three column, whitespace-delimited list # # addr deref'd function # 00bca02c 77dd79c6 ADVAPI32!InitializeSecurityDescriptor def SetName(ea, s): idaapi.set_name(ea, s) def is_32(): ...
en
0.482393
# This script prompts for the path to a file # which contains a three column, whitespace-delimited list # # addr deref'd function # 00bca02c 77dd79c6 ADVAPI32!InitializeSecurityDescriptor # -------------------------------------------------------------------------- STARTITEM <#Select an annotation file to o...
2.536058
3
test/converter/test_helper.py
ideascf/data-packer
2
6625559
<reponame>ideascf/data-packer # coding=utf-8 from data_packer import converter, err def test_TypeConverter(): cvt = converter.TypeConverter(int) assert cvt.convert('', '', '123') == 123 def test_StrConverter(): cvt = converter.StrConverter('utf-8') assert cvt.convert('', '', 123) == '123' assert...
# coding=utf-8 from data_packer import converter, err def test_TypeConverter(): cvt = converter.TypeConverter(int) assert cvt.convert('', '', '123') == 123 def test_StrConverter(): cvt = converter.StrConverter('utf-8') assert cvt.convert('', '', 123) == '123' assert cvt.convert('', '', u'你好') ==...
en
0.644078
# coding=utf-8
2.668716
3
pydlock/__main__.py
ErickShepherd/pydlock
0
6625560
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' A command line utility for the Pydlock package. Software: Pydlock Author: <NAME> E-mail: <EMAIL> GitHub: https://www.github.com/ErickShepherd/pydlock PyPI: https://pypi.org/project/pydlock/ Date created: 2020-04-30 Last modified: ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' A command line utility for the Pydlock package. Software: Pydlock Author: <NAME> E-mail: <EMAIL> GitHub: https://www.github.com/ErickShepherd/pydlock PyPI: https://pypi.org/project/pydlock/ Date created: 2020-04-30 Last modified: ...
en
0.796695
#!/usr/bin/env python3 # -*- coding: utf-8 -*- A command line utility for the Pydlock package. Software: Pydlock Author: <NAME> E-mail: <EMAIL> GitHub: https://www.github.com/ErickShepherd/pydlock PyPI: https://pypi.org/project/pydlock/ Date created: 2020-04-30 Last modified: 2020-0...
2.611624
3
tests/endpoints/test_share_invite_bank_response.py
PJUllrich/Universal-Bunq-API-Python-Wrapper
0
6625561
<filename>tests/endpoints/test_share_invite_bank_response.py<gh_stars>0 from apiwrapper.endpoints.share_invite_bank_response import \ ShareInviteBankResponse from tests.endpoints.test_endpoint import EndpointTest class ShareInviteBankResponseTest(EndpointTest): __base_endpoint_url = "/user/%d/share-invite-ban...
<filename>tests/endpoints/test_share_invite_bank_response.py<gh_stars>0 from apiwrapper.endpoints.share_invite_bank_response import \ ShareInviteBankResponse from tests.endpoints.test_endpoint import EndpointTest class ShareInviteBankResponseTest(EndpointTest): __base_endpoint_url = "/user/%d/share-invite-ban...
none
1
2.457897
2
back/index.py
mkgask/electron-python
0
6625562
<reponame>mkgask/electron-python<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import print_function import time from flask import Flask, render_template app = Flask(__name__) @app.route('/') def index(): next = u'次のページへ行くよー' return render_template('/index.html', message=next) @a...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import print_function import time from flask import Flask, render_template app = Flask(__name__) @app.route('/') def index(): next = u'次のページへ行くよー' return render_template('/index.html', message=next) @app.route('/sample/') def sample(): retur...
en
0.308914
#!/usr/bin/env python3 # -*- coding: utf-8 -*-
2.371044
2
venv/Lib/site-packages/pycparser/ast_transforms.py
asanka9/Quession-Discussion-App-Socket.Io-NLP
1,738
6625563
#------------------------------------------------------------------------------ # pycparser: ast_transforms.py # # Some utilities used by the parser to create a friendlier AST. # # <NAME> [https://eli.thegreenplace.net/] # License: BSD #------------------------------------------------------------------------------ fro...
#------------------------------------------------------------------------------ # pycparser: ast_transforms.py # # Some utilities used by the parser to create a friendlier AST. # # <NAME> [https://eli.thegreenplace.net/] # License: BSD #------------------------------------------------------------------------------ fro...
en
0.796435
#------------------------------------------------------------------------------ # pycparser: ast_transforms.py # # Some utilities used by the parser to create a friendlier AST. # # <NAME> [https://eli.thegreenplace.net/] # License: BSD #------------------------------------------------------------------------------ The ...
2.894763
3
day01_test.py
Elgolfin/adventofcode-2015-py
0
6625564
"""Day 01 unit tests""" import unittest from day01_lib import walk_through_floors class Day01TestCase(unittest.TestCase): """Tests for `day01.py`""" def test_(self): """Tests for the final floor""" floor, enter_basement_at = walk_through_floors("(()))") self.assertEqual(floor, -1) ...
"""Day 01 unit tests""" import unittest from day01_lib import walk_through_floors class Day01TestCase(unittest.TestCase): """Tests for `day01.py`""" def test_(self): """Tests for the final floor""" floor, enter_basement_at = walk_through_floors("(()))") self.assertEqual(floor, -1) ...
en
0.81494
Day 01 unit tests Tests for `day01.py` Tests for the final floor
3.386171
3
bots/steam/info.py
kosyachniy/dev
13
6625565
<gh_stars>10-100 from func.steam import * print(api.ISteamUser.ResolveVanityURL(vanityurl="valve", url_type=2)) client = SteamClient() client.cli_login() print("Logged on as: %s" % client.user.name) print("Community profile: %s" % client.steam_id.community_url) print("Last logon: %s" % client.user.last_logon) print...
from func.steam import * print(api.ISteamUser.ResolveVanityURL(vanityurl="valve", url_type=2)) client = SteamClient() client.cli_login() print("Logged on as: %s" % client.user.name) print("Community profile: %s" % client.steam_id.community_url) print("Last logon: %s" % client.user.last_logon) print("Last logoff: %s...
none
1
2.306624
2
security_monkey/watchers/vpc/dhcp.py
boladmin/security_monkey
4,258
6625566
# Copyright 2016 Bridgewater Associates # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
# Copyright 2016 Bridgewater Associates # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
en
0.737738
# Copyright 2016 Bridgewater Associates # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
1.738714
2
spark-src/recommendation.py
bemova/Who-To-Follow-Algorithm-for-Massive-Dataset-Mining
0
6625567
class Recommendation: """ Created by Arezou on 2017-02-12. This Class describe a recommendation, and a recommendation has a user_Id and a number of followed user by this user in common (common_user_count). """ def __init__(self, user_Id, common_user_count): """ :param user_Id: us...
class Recommendation: """ Created by Arezou on 2017-02-12. This Class describe a recommendation, and a recommendation has a user_Id and a number of followed user by this user in common (common_user_count). """ def __init__(self, user_Id, common_user_count): """ :param user_Id: us...
en
0.845462
Created by Arezou on 2017-02-12. This Class describe a recommendation, and a recommendation has a user_Id and a number of followed user by this user in common (common_user_count). :param user_Id: user id as a str :param common_user_count: is the number of followed users by this ...
3.5669
4
mesonbuild/cmake/traceparser.py
agrexgh/meson
0
6625568
<gh_stars>0 # Copyright 2019 The Meson development 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 o...
# Copyright 2019 The Meson development 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 ...
en
0.829856
# Copyright 2019 The Meson development 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 in ...
1.969269
2
vislice.py
IrinaMarijaPolak/Vislice
0
6625569
import bottle import model SKRIVNOST = 'psssst to je moja skrivnost' DATOTEKA_S_STANJEM = 'stanje.json' DATOTEKA_Z_BESEDAMI = 'besede.txt' vislice = model.Vislice(DATOTEKA_S_STANJEM, DATOTEKA_Z_BESEDAMI) @bottle.get('/') def index(): return bottle.template('index.tpl') @bottle.post('/nova_igra/') def nova_igra...
import bottle import model SKRIVNOST = 'psssst to je moja skrivnost' DATOTEKA_S_STANJEM = 'stanje.json' DATOTEKA_Z_BESEDAMI = 'besede.txt' vislice = model.Vislice(DATOTEKA_S_STANJEM, DATOTEKA_Z_BESEDAMI) @bottle.get('/') def index(): return bottle.template('index.tpl') @bottle.post('/nova_igra/') def nova_igra...
none
1
2.077425
2
Pregunta5.py
RodrigoES22/PC4
0
6625570
<gh_stars>0 #Escriba una expresión regular para cada caso: #todos los usuarios que sigan el siguente patron. User_mentions:9 #encuentre los numero de likes: likes: 5 #que permita encontrar el numero de retweets. number of retweets: 4 import re s = "Unfortunately one of those moments wasn't a giant squid monster. U...
#Escriba una expresión regular para cada caso: #todos los usuarios que sigan el siguente patron. User_mentions:9 #encuentre los numero de likes: likes: 5 #que permita encontrar el numero de retweets. number of retweets: 4 import re s = "Unfortunately one of those moments wasn't a giant squid monster. User_mentions...
es
0.845249
#Escriba una expresión regular para cada caso: #todos los usuarios que sigan el siguente patron. User_mentions:9 #encuentre los numero de likes: likes: 5 #que permita encontrar el numero de retweets. number of retweets: 4
3.816543
4
homeassistant/components/xiaomi_aqara/__init__.py
learn-home-automation/core
1
6625571
<reponame>learn-home-automation/core<filename>homeassistant/components/xiaomi_aqara/__init__.py """Support for Xiaomi Gateways.""" from datetime import timedelta import logging import voluptuous as vol from xiaomi_gateway import XiaomiGateway, XiaomiGatewayDiscovery from homeassistant import config_entries, core from...
"""Support for Xiaomi Gateways.""" from datetime import timedelta import logging import voluptuous as vol from xiaomi_gateway import XiaomiGateway, XiaomiGatewayDiscovery from homeassistant import config_entries, core from homeassistant.const import ( ATTR_BATTERY_LEVEL, ATTR_DEVICE_ID, ATTR_VOLTAGE, ...
en
0.800112
Support for Xiaomi Gateways. Set up the Xiaomi component. Service to play ringtone through Gateway. Service to stop playing ringtone on Gateway. Service to add a new sub-device within the next 30 seconds. Service to remove a sub-device from the gateway. Set up the xiaomi aqara components from a config entry. # Connect ...
1.767355
2
exercises/exercise_9_30_16.py
JSBCCA/pythoncode
0
6625572
<filename>exercises/exercise_9_30_16.py from random import randint, choice, shuffle password = '' rand = randint(4, 8) items = ["abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "0123456789", "!@#$%&*_+>:;\/<?"] shuffle(items) for string in items: password += choice(string) for i in range(rand): ...
<filename>exercises/exercise_9_30_16.py from random import randint, choice, shuffle password = '' rand = randint(4, 8) items = ["abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "0123456789", "!@#$%&*_+>:;\/<?"] shuffle(items) for string in items: password += choice(string) for i in range(rand): ...
ja
0.337682
#$%&*_+>:;\/<?"]
3.603919
4
python/Learn-Python-The-Hard-Way/hashmap.py
pepincho/playground
0
6625573
# exercise 39 def new(num_buckets = 256): """Initializes a Map with the given number of buckets.""" aMap = [] for i in range(0, num_buckets): aMap.append([]) return aMap def hash_key(aMap, key): """Given a key this will create a number and then convert to an index for the aMap's buckets.""" return hash(key) %...
# exercise 39 def new(num_buckets = 256): """Initializes a Map with the given number of buckets.""" aMap = [] for i in range(0, num_buckets): aMap.append([]) return aMap def hash_key(aMap, key): """Given a key this will create a number and then convert to an index for the aMap's buckets.""" return hash(key) %...
en
0.81344
# exercise 39 Initializes a Map with the given number of buckets. Given a key this will create a number and then convert to an index for the aMap's buckets. Given a key, find the bucket where it would go. Returns the index, key, and value of a slot found in a bucket. Returns -1, key, and default (None if not set) whe...
3.854462
4
ds_get/__init__.py
dekomote/ds_get
0
6625574
<reponame>dekomote/ds_get """Top-level package for DS PyGet.""" __author__ = """<NAME>""" __email__ = "<EMAIL>" __version__ = "0.1.0"
"""Top-level package for DS PyGet.""" __author__ = """<NAME>""" __email__ = "<EMAIL>" __version__ = "0.1.0"
en
0.573191
Top-level package for DS PyGet. <NAME>
1.020623
1
QtPyNetwork/server/QBalancedServer.py
desty2k/QtPyNetwork
0
6625575
from qtpy.QtCore import Slot, Signal, QObject, QThread, Qt from qtpy.QtNetwork import QTcpSocket import struct import logging from QtPyNetwork.server.BaseServer import QBaseServer __all__ = ["QBalancedServer"] class _SocketWorker(QObject): """_SocketWorker manages sockets and handles messages. Outgoing si...
from qtpy.QtCore import Slot, Signal, QObject, QThread, Qt from qtpy.QtNetwork import QTcpSocket import struct import logging from QtPyNetwork.server.BaseServer import QBaseServer __all__ = ["QBalancedServer"] class _SocketWorker(QObject): """_SocketWorker manages sockets and handles messages. Outgoing si...
en
0.773835
_SocketWorker manages sockets and handles messages. Outgoing signals: - disconnected (device_id: int): Client disconnected. - connected (device_id: int, ip: str, port: int): Client connected. - message (device_id: int, message: bytes): Message from client. - error (device_id: int, e...
2.554064
3
modules/trainer/updater/mmd.py
nobodykid/sinkhorngan-positive
0
6625576
from base import BaseUpdater class GAN(BaseUpdater): n_critic = 5 def update_parameters(self, idx, x, y): if self.get_counter('generator') < 25 or self.get_counter('generator') % 500 == 0: self.n_critic = 100 else: self.n_critic = 5 loss_generator = None ...
from base import BaseUpdater class GAN(BaseUpdater): n_critic = 5 def update_parameters(self, idx, x, y): if self.get_counter('generator') < 25 or self.get_counter('generator') % 500 == 0: self.n_critic = 100 else: self.n_critic = 5 loss_generator = None ...
en
0.272483
# Init noise # Set critic grad true # Set critic grad false
2.198056
2
tests/core/helpers.py
cd4761/ecc-py-evm
1
6625577
<filename>tests/core/helpers.py import sys from eth_utils.toolz import curry import pytest from eth_utils import ( decode_hex, ValidationError, ) from eth.chains.base import MiningChain from eth.vm.spoof import ( SpoofTransaction, ) greater_equal_python36 = pytest.mark.skipif( sys.version_info < ...
<filename>tests/core/helpers.py import sys from eth_utils.toolz import curry import pytest from eth_utils import ( decode_hex, ValidationError, ) from eth.chains.base import MiningChain from eth.vm.spoof import ( SpoofTransaction, ) greater_equal_python36 = pytest.mark.skipif( sys.version_info < ...
en
0.872475
Create and return a transaction sending amount from <from_> to <to>. The transaction will be signed with the given private key.
2.046947
2
core/api.py
uktrade/lite-internal-frontend
4
6625578
from django.http import JsonResponse from django.views.generic import TemplateView from queues.services import get_cases_search_data class Cases(TemplateView): def get(self, request, **kwargs): """ Endpoint to enable access to the API /cases/ endpoint """ hidden = request.GET.get(...
from django.http import JsonResponse from django.views.generic import TemplateView from queues.services import get_cases_search_data class Cases(TemplateView): def get(self, request, **kwargs): """ Endpoint to enable access to the API /cases/ endpoint """ hidden = request.GET.get(...
en
0.580956
Endpoint to enable access to the API /cases/ endpoint
2.150312
2
unknowntags/models.py
leonrenkema/makerspaceleiden-crm
5
6625579
<reponame>leonrenkema/makerspaceleiden-crm from django.conf import settings from django.db import models from django.db.models import Q from django.utils import timezone from members.models import Tag, clean_tag_string from acl.models import Entitlement, PermitType import datetime class Unknowntag(models.Model): ...
from django.conf import settings from django.db import models from django.db.models import Q from django.utils import timezone from members.models import Tag, clean_tag_string from acl.models import Entitlement, PermitType import datetime class Unknowntag(models.Model): tag = models.CharField(max_length=30) ...
none
1
2.19141
2
pandas/tests/series/indexing/test_numeric.py
emadshihab/pandas
1
6625580
import numpy as np import pytest from pandas import DataFrame, Index, Series import pandas._testing as tm def test_delitem(): # GH 5542 # should delete the item inplace s = Series(range(5)) del s[0] expected = Series(range(1, 5), index=range(1, 5)) tm.assert_series_equal(s, expected) de...
import numpy as np import pytest from pandas import DataFrame, Index, Series import pandas._testing as tm def test_delitem(): # GH 5542 # should delete the item inplace s = Series(range(5)) del s[0] expected = Series(range(1, 5), index=range(1, 5)) tm.assert_series_equal(s, expected) de...
en
0.652311
# GH 5542 # should delete the item inplace # empty # only 1 left, del, add, del # Index(dtype=object) # note labels are floats # not monotonic
2.452988
2
official/nlp/configs/encoders.py
bamdada/UdacityProj10FinaltfModels
2
6625581
<reponame>bamdada/UdacityProj10FinaltfModels # Lint as: python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://ww...
# Lint as: python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
en
0.787294
# Lint as: python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
2.010178
2
src/sentry/models/commitauthor.py
learninto/sentry
1
6625582
from __future__ import absolute_import, print_function from django.db import models from sentry.db.models import BoundedPositiveIntegerField, Model, sane_repr class CommitAuthor(Model): __core__ = False organization_id = BoundedPositiveIntegerField(db_index=True) name = models.CharField(max_length=128,...
from __future__ import absolute_import, print_function from django.db import models from sentry.db.models import BoundedPositiveIntegerField, Model, sane_repr class CommitAuthor(Model): __core__ = False organization_id = BoundedPositiveIntegerField(db_index=True) name = models.CharField(max_length=128,...
none
1
2.227211
2
pearwise/pearwise.py
omarchehab98/open.kattis.com-problems
1
6625583
<gh_stars>1-10 def parseBallot(line): p, ballot = line.split() return int(p), dict(zip(map(lambda x: ord(x) - ord('A'), ballot), list(range(len(ballot))))) n, m = map(int, input().split()) ballots = list(map(parseBallot, [input() for _ in range(m)])) graph = dict(zip(list(range(n)), [set() for _ in range(n)])) fo...
def parseBallot(line): p, ballot = line.split() return int(p), dict(zip(map(lambda x: ord(x) - ord('A'), ballot), list(range(len(ballot))))) n, m = map(int, input().split()) ballots = list(map(parseBallot, [input() for _ in range(m)])) graph = dict(zip(list(range(n)), [set() for _ in range(n)])) for v in range(n)...
none
1
3.280928
3
storytelling/storytelling/generate_story_from_img.py
Joyce-yanqiongzhang/proj2_storytelling
0
6625584
from numpy.core.fromnumeric import argmax from . import predict img_paths = ['/home/serena/Desktop/proj2_storytelling/storytelling/statics/uploaded_imgs/1609853089.6942558user1.png', '/home/serena/Desktop/proj2_storytelling/storytelling/statics/uploaded_imgs/1609853095.5605984user2.png', ...
from numpy.core.fromnumeric import argmax from . import predict img_paths = ['/home/serena/Desktop/proj2_storytelling/storytelling/statics/uploaded_imgs/1609853089.6942558user1.png', '/home/serena/Desktop/proj2_storytelling/storytelling/statics/uploaded_imgs/1609853095.5605984user2.png', ...
en
0.736942
# get attributes of the users' faces
2.540664
3
redhawk/common/parser.py
JordanMilne/Redhawk
0
6625585
""" Parser base class for the various langauge implementations. Various language implementations have to a) provide the GetTreeConverterClass() method for their language. b) provide the Parse Method for their language. """ from . import tree_converter as T class Parser: def GetTreeConverterClass(self): r...
""" Parser base class for the various langauge implementations. Various language implementations have to a) provide the GetTreeConverterClass() method for their language. b) provide the Parse Method for their language. """ from . import tree_converter as T class Parser: def GetTreeConverterClass(self): r...
en
0.772234
Parser base class for the various langauge implementations. Various language implementations have to a) provide the GetTreeConverterClass() method for their language. b) provide the Parse Method for their language. Parse filename. Convert language specific AST to the LAST Return the language agnostic abstract syn...
3.41055
3
locale/pot/api/examples/_autosummary/pyvista-examples-downloads-download_bird_texture-1.py
tkoyama010/pyvista-doc-translations
4
6625586
<filename>locale/pot/api/examples/_autosummary/pyvista-examples-downloads-download_bird_texture-1.py from pyvista import examples dataset = examples.download_bird_texture() # doctest:+SKIP
<filename>locale/pot/api/examples/_autosummary/pyvista-examples-downloads-download_bird_texture-1.py from pyvista import examples dataset = examples.download_bird_texture() # doctest:+SKIP
en
0.408635
# doctest:+SKIP
1.388181
1
python/hongong/ch07/07_1.py
gangserver/py_test
0
6625587
from tensorflow import keras import matplotlib.pyplot as plt from sklearn.linear_model import SGDClassifier from sklearn.model_selection import cross_validate import numpy as np from sklearn.model_selection import train_test_split (train_input, train_target), (test_input, test_target) =\ keras.datasets.fashion_mn...
from tensorflow import keras import matplotlib.pyplot as plt from sklearn.linear_model import SGDClassifier from sklearn.model_selection import cross_validate import numpy as np from sklearn.model_selection import train_test_split (train_input, train_target), (test_input, test_target) =\ keras.datasets.fashion_mn...
none
1
2.951869
3
sct_custom/spinalcordtoolbox/scripts/sct_straighten_spinalcord.py
nidebroux/lumbosacral_segmentation
1
6625588
<reponame>nidebroux/lumbosacral_segmentation # !/usr/bin/env python # # This program takes as input an anatomic image and the centerline or segmentation of its spinal cord (that you can get # using sct_get_centerline.py or sct_segmentation_propagation) and returns the anatomic image where the spinal # cord was straight...
# !/usr/bin/env python # # This program takes as input an anatomic image and the centerline or segmentation of its spinal cord (that you can get # using sct_get_centerline.py or sct_segmentation_propagation) and returns the anatomic image where the spinal # cord was straightened. # # -----------------------------------...
en
0.57699
# !/usr/bin/env python # # This program takes as input an anatomic image and the centerline or segmentation of its spinal cord (that you can get # using sct_get_centerline.py or sct_segmentation_propagation) and returns the anatomic image where the spinal # cord was straightened. # # -----------------------------------...
2.884613
3
calicoctl/calico_ctl/node.py
EdSchouten/calico-containers
0
6625589
<gh_stars>0 # Copyright (c) 2015-2016 Tigera, Inc. 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 ...
# Copyright (c) 2015-2016 Tigera, Inc. 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 applicabl...
en
0.780662
# Copyright (c) 2015-2016 Tigera, Inc. 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 applicabl...
1.500494
2
nuitka/nodes/NodeMakingHelpers.py
accnops/Nuitka
0
6625590
<gh_stars>0 # Copyright 2018, <NAME>, mailto:<EMAIL> # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance w...
# Copyright 2018, <NAME>, mailto:<EMAIL> # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
en
0.874062
# Copyright 2018, <NAME>, mailto:<EMAIL> # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
1.549071
2
code/tasks/HANNA/flags.py
weituo12321/PREVALENT_HANNA
0
6625591
import argparse def make_parser(): parser = argparse.ArgumentParser() # Meta parser.add_argument('-config_file', type=str, help='configuration file') parser.add_argument('-data_dir', type=str, default='hanna', help='data directory') parser.add_argument('-data_prefix', type=str, default=...
import argparse def make_parser(): parser = argparse.ArgumentParser() # Meta parser.add_argument('-config_file', type=str, help='configuration file') parser.add_argument('-data_dir', type=str, default='hanna', help='data directory') parser.add_argument('-data_prefix', type=str, default=...
en
0.582385
# Meta # Model # Training # Evaluation # Non-learning baselines # Perfect language interpretation baseline # Ask baseline # Ablation baseline # Single modality baseline # for dicencoder
2.594331
3
test.py
billzorn/msp-pymodel
0
6625592
<filename>test.py #!/usr/bin/env python3 import sys import os import random libdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'lib') sys.path.append(libdir) from msp_isa import isa import msp_itable as itab import msp_fr5969_model as model import msp_elftools as elftools scratch_start = 0x1c00 scra...
<filename>test.py #!/usr/bin/env python3 import sys import os import random libdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'lib') sys.path.append(libdir) from msp_isa import isa import msp_itable as itab import msp_fr5969_model as model import msp_elftools as elftools scratch_start = 0x1c00 scra...
en
0.68824
#!/usr/bin/env python3 #return random.randint(0, 65535) # put stuff into the register so that we hit this address # split address between register and immediate # set the register # # for debugging: show the intended addr # elif mode in {'ADDR'}: # return addr, mov_iaddr(0, addr) # need to do very special things fo...
1.996692
2
deepem/test/run.py
ZettaAI/DeepEM
0
6625593
import os import torch from deepem.test.forward import Forward from deepem.test.option import Options from deepem.test.utils import * def test(opt): # Model model = load_model(opt) # Forward scan forward = Forward(opt) if opt.gs_input: scanner = make_forward_scanner(opt) output...
import os import torch from deepem.test.forward import Forward from deepem.test.option import Options from deepem.test.utils import * def test(opt): # Model model = load_model(opt) # Forward scan forward = Forward(opt) if opt.gs_input: scanner = make_forward_scanner(opt) output...
en
0.704378
# Model # Forward scan # Options # GPU # Make directories. # Run inference.
2.189538
2
2_Fun_Python/Add_Notes.py
CyberThulhu22/Python-Projects
0
6625594
#!/usr/bin/env python3 -tt #-*- Coding: utf-8 -*- """ NAME: Add_Notes.py VERSION: 1.0 AUTHOR: <NAME> (CyberThulhu) STATUS: Building Initial code framework DESCRIPTION: Allows a User to Add Notes to a '.txt' Document TO-DO: USAGE: Add_Notes.py [-h] -o <output_file.txt> [-t] ...
#!/usr/bin/env python3 -tt #-*- Coding: utf-8 -*- """ NAME: Add_Notes.py VERSION: 1.0 AUTHOR: <NAME> (CyberThulhu) STATUS: Building Initial code framework DESCRIPTION: Allows a User to Add Notes to a '.txt' Document TO-DO: USAGE: Add_Notes.py [-h] -o <output_file.txt> [-t] ...
en
0.508412
#!/usr/bin/env python3 -tt #-*- Coding: utf-8 -*- NAME: Add_Notes.py VERSION: 1.0 AUTHOR: <NAME> (CyberThulhu) STATUS: Building Initial code framework DESCRIPTION: Allows a User to Add Notes to a '.txt' Document TO-DO: USAGE: Add_Notes.py [-h] -o <output_file.txt> [-t] COPYR...
3.490396
3
scripts/release/main.py
Naios/lvgl
593
6625595
<reponame>Naios/lvgl #!/usr/bin/env python import os.path from os import path from datetime import date import sys import com import release import dev import proj upstream_org_url = "https://github.com/lvgl/" workdir = "./release_tmp" proj_list = [ "lv_sim_eclipse_sdl", "lv_sim_emscripten"] def upstream(repo): ...
#!/usr/bin/env python import os.path from os import path from datetime import date import sys import com import release import dev import proj upstream_org_url = "https://github.com/lvgl/" workdir = "./release_tmp" proj_list = [ "lv_sim_eclipse_sdl", "lv_sim_emscripten"] def upstream(repo): return upstream_org_u...
en
0.267031
#!/usr/bin/env python # if(len(sys.argv) != 2): # print("Missing argument. Usage ./release.py bugfix | minor | major") # print("Use minor by deafult") # else: # dev_prepare = sys.argv[1] #cleanup()
2.227901
2
main_eval.py
ajbondmk/IntelligentNavigationOfTextBasedGames
1
6625596
<reponame>ajbondmk/IntelligentNavigationOfTextBasedGames from run_agents import dqn_agent_eval_zero_shot dqn_agent_eval_zero_shot("tmp", "tmp") # TODO: DELETE THIS FILE
from run_agents import dqn_agent_eval_zero_shot dqn_agent_eval_zero_shot("tmp", "tmp") # TODO: DELETE THIS FILE
en
0.219271
# TODO: DELETE THIS FILE
1.228854
1
scons/wii.py
marstau/shinsango
1
6625597
import os import utils from SCons.Environment import Environment from SCons.Script import Exit def wii(env): bin_path = "%s/bin" % os.environ['DEVKITPPC'] ogc_bin_path = "%s/libogc/bin" % os.environ['DEVKITPRO'] prefix = 'powerpc-eabi-' def setup(x): return '%s%s' % (prefix, x) env['CC'] = ...
import os import utils from SCons.Environment import Environment from SCons.Script import Exit def wii(env): bin_path = "%s/bin" % os.environ['DEVKITPPC'] ogc_bin_path = "%s/libogc/bin" % os.environ['DEVKITPRO'] prefix = 'powerpc-eabi-' def setup(x): return '%s%s' % (prefix, x) env['CC'] = ...
en
0.311406
# env.Append(CPPPATH = ['#src/wii']) # os.environ['PATH'] = "%s:%s:%s" % (bin_path, ogc_bin_path, os.environ['PATH'])
2.263215
2
asst2_hil00/factorials.py
hibalubbad/hiba.baddie
0
6625598
<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 18 15:49:04 2018 @author: misskeisha """ def factorial(n): a = 1 for i in range(n,0, -1): a = a *i return a for i in range(10): if i%2 != 0: print(factorial(i))
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 18 15:49:04 2018 @author: misskeisha """ def factorial(n): a = 1 for i in range(n,0, -1): a = a *i return a for i in range(10): if i%2 != 0: print(factorial(i))
en
0.581022
#!/usr/bin/env python3 # -*- coding: utf-8 -*- Created on Tue Sep 18 15:49:04 2018 @author: misskeisha
4.154957
4
tweetcatcher/catcher.py
Vanclief/tweet-catcher
5
6625599
<reponame>Vanclief/tweet-catcher import yaml from influxdb import InfluxDBClient from tweetcatcher.client import Client from tweepy import OAuthHandler class Catcher(object): def __init__(self): with open("config.yml", 'r') as config_file: config = yaml.load(config_file) self.db_clie...
import yaml from influxdb import InfluxDBClient from tweetcatcher.client import Client from tweepy import OAuthHandler class Catcher(object): def __init__(self): with open("config.yml", 'r') as config_file: config = yaml.load(config_file) self.db_client = self._create_db_client(confi...
en
0.388487
Init a new InfluxDB client Create a new Auth for Twitter # Get twitter api configuration Start Catching tweets
2.636281
3
Introduccion SNMP/5-AdministracionDeRendimiento/Parte1-LineaBase/getSNMP.py
NacxitCotuha/ASR-2022-4CM13
0
6625600
<reponame>NacxitCotuha/ASR-2022-4CM13<filename>Introduccion SNMP/5-AdministracionDeRendimiento/Parte1-LineaBase/getSNMP.py<gh_stars>0 from pysnmp.hlapi import * def consultarSNMP( comunidad: str, host: str, oid: str ): error_indication, error_status, error_index, var_binds = next( getCmd( Snmp...
SNMP/5-AdministracionDeRendimiento/Parte1-LineaBase/getSNMP.py<gh_stars>0 from pysnmp.hlapi import * def consultarSNMP( comunidad: str, host: str, oid: str ): error_indication, error_status, error_index, var_binds = next( getCmd( SnmpEngine(), CommunityData(comunidad), ...
none
1
2.35558
2
Dataprocess/Criteo/config.py
markWJJ/AutoInt
975
6625601
DATA_PATH = './Criteo/' SOURCE_DATA = './train_examples.txt'
DATA_PATH = './Criteo/' SOURCE_DATA = './train_examples.txt'
none
1
1.026984
1
src/txamqp/xmlutil.py
sbraz/txamqp
17
6625602
<gh_stars>10-100 # # 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 # "Licen...
# # 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...
en
0.865487
# # 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...
2.020196
2
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_slice_mgr_proxy_cfg.py
bopopescu/ACI
0
6625603
<reponame>bopopescu/ACI """ Cisco_IOS_XR_slice_mgr_proxy_cfg This module contains a collection of YANG definitions for Cisco IOS\-XR slice\-mgr\-proxy package configuration. This module contains definitions for the following management objects\: node\-path\: Node act path Copyright (c) 2013\-2017 by Cisco Systems...
""" Cisco_IOS_XR_slice_mgr_proxy_cfg This module contains a collection of YANG definitions for Cisco IOS\-XR slice\-mgr\-proxy package configuration. This module contains definitions for the following management objects\: node\-path\: Node act path Copyright (c) 2013\-2017 by Cisco Systems, Inc. All rights reserv...
en
0.369629
Cisco_IOS_XR_slice_mgr_proxy_cfg This module contains a collection of YANG definitions for Cisco IOS\-XR slice\-mgr\-proxy package configuration. This module contains definitions for the following management objects\: node\-path\: Node act path Copyright (c) 2013\-2017 by Cisco Systems, Inc. All rights reserved. ...
1.95117
2
LeetCode/0891_sum_subsequence_widths/subsequence_widths.py
NathanielBlairStahn/python-practice
0
6625604
<reponame>NathanielBlairStahn/python-practice """ From Leetcode (8/24/2018): 891. Sum of Subsequence Widths Given an array of integers A, consider all non-empty subsequences of A. For any sequence S, let the width of S be the difference between the maximum and minimum element of S. Return the sum of the widths of ...
""" From Leetcode (8/24/2018): 891. Sum of Subsequence Widths Given an array of integers A, consider all non-empty subsequences of A. For any sequence S, let the width of S be the difference between the maximum and minimum element of S. Return the sum of the widths of all subsequences of A. As the answer may be v...
en
0.840068
From Leetcode (8/24/2018): 891. Sum of Subsequence Widths Given an array of integers A, consider all non-empty subsequences of A. For any sequence S, let the width of S be the difference between the maximum and minimum element of S. Return the sum of the widths of all subsequences of A. As the answer may be very ...
3.765021
4
src/pentest/hooks/airodump.py
BastienFaure/jarvis
14
6625605
from pentest.command import JarvisCmd import sys __name__ = "airodump-ng" def main(): args_config = { "passthrough_args": ["-w", "-H"], "output_args": [ { "format": None, "arg": "-w" } ] } cmd = JarvisCmd(sys.argv) cmd.set_args_config(args_config) cmd.run()
from pentest.command import JarvisCmd import sys __name__ = "airodump-ng" def main(): args_config = { "passthrough_args": ["-w", "-H"], "output_args": [ { "format": None, "arg": "-w" } ] } cmd = JarvisCmd(sys.argv) cmd.set_args_config(args_config) cmd.run()
none
1
1.857779
2
test/test_converter.py
Apkawa/python-video-converter
0
6625606
<filename>test/test_converter.py #!/usr/bin/env python # modify the path so that parent directory is in it import sys sys.path.append('../') import random import string import shutil import unittest import os from os.path import join as pjoin from converter import ffmpeg, formats, avcodecs, Converter, ConverterErro...
<filename>test/test_converter.py #!/usr/bin/env python # modify the path so that parent directory is in it import sys sys.path.append('../') import random import string import shutil import unittest import os from os.path import join as pjoin from converter import ffmpeg, formats, avcodecs, Converter, ConverterErro...
en
0.729901
#!/usr/bin/env python # modify the path so that parent directory is in it Asserts converted test1.ogg (in path self.video_file_path) is converted correctly # test when ffmpeg is killed # modifiable object in closure # let ffmpeg to start # Convert should not change options dict
2.652674
3
exchangelib/services/common.py
tkurze/exchangelib
0
6625607
import abc import logging import traceback from itertools import chain from .. import errors from ..attachments import AttachmentId from ..credentials import IMPERSONATION, OAuth2Credentials from ..errors import EWSWarning, TransportError, SOAPError, ErrorTimeoutExpired, ErrorBatchProcessingStopped, \ ErrorQuotaEx...
import abc import logging import traceback from itertools import chain from .. import errors from ..attachments import AttachmentId from ..credentials import IMPERSONATION, OAuth2Credentials from ..errors import EWSWarning, TransportError, SOAPError, ErrorTimeoutExpired, ErrorBatchProcessingStopped, \ ErrorQuotaEx...
en
0.828608
# A default page size for all paging services. This is the number of items we request per page # A default chunk size for all services. This is the number of items we send in a single request Base class for all EWS services. # The name of the SOAP service # The name of the XML element wrapping the collection of returne...
1.474452
1
MISC/fmprep.py
varenius/oso
0
6625608
#!/usr/bin/env python3 import sys, os, glob import datetime, time import numpy as np import matplotlib.dates as mdates from subprocess import run, PIPE import socket def filltracks(of): of.write("$TRACKS;\n") of.write(" def OTT;\n") of.write(" track_frame_format = VDIF;\n") of.write(" enddef;\n") ...
#!/usr/bin/env python3 import sys, os, glob import datetime, time import numpy as np import matplotlib.dates as mdates from subprocess import run, PIPE import socket def filltracks(of): of.write("$TRACKS;\n") of.write(" def OTT;\n") of.write(" track_frame_format = VDIF;\n") of.write(" enddef;\n") ...
en
0.841928
#!/usr/bin/env python3 # negative, as fmout-gps is the "clock early" convention # Seconds # pos, as fmout-gps is the "clock early" convention # Seconds # Seconds # Filter outliers # Filtering should really be done first fitting once without filters, removing linear trend, then filter outliers. # But this works well eno...
2.236912
2
groomer.py
project-mynt/wallet-groomer
0
6625609
<filename>groomer.py<gh_stars>0 #!/usr/bin/python2 # simple cleanup script, 2012-12-25 <<EMAIL>> # 2018: updated by brianmct import sys import operator from decimal import * from bitcoinrpc.authproxy import AuthServiceProxy import argparse parser = argparse.ArgumentParser(description='This script generates transaction...
<filename>groomer.py<gh_stars>0 #!/usr/bin/python2 # simple cleanup script, 2012-12-25 <<EMAIL>> # 2018: updated by brianmct import sys import operator from decimal import * from bitcoinrpc.authproxy import AuthServiceProxy import argparse parser = argparse.ArgumentParser(description='This script generates transaction...
en
0.932851
#!/usr/bin/python2 # simple cleanup script, 2012-12-25 <<EMAIL>> # 2018: updated by brianmct # Loop until wallet is clean #Add up the number of small txouts and amounts assigned to each address. #which script has the largest number of well confirmed small but not dust outputs? #If the best we can do doesn't reduce the ...
2.476896
2
stacks_queques/flood_fill.py
sumitsk/leetcode
0
6625610
class Solution(object): def floodFill(self, image, sr, sc, newColor): """ :type image: List[List[int]] :type sr: int :type sc: int :type newColor: int :rtype: List[List[int]] """ org_color = image[sr][sc] num_rows, num_cols = len(image), len(im...
class Solution(object): def floodFill(self, image, sr, sc, newColor): """ :type image: List[List[int]] :type sr: int :type sc: int :type newColor: int :rtype: List[List[int]] """ org_color = image[sr][sc] num_rows, num_cols = len(image), len(im...
en
0.197573
:type image: List[List[int]] :type sr: int :type sc: int :type newColor: int :rtype: List[List[int]]
3.312695
3
kartothek/io/dask/_update.py
jonashaag/kartothek
0
6625611
<gh_stars>0 # -*- coding: utf-8 -*- from functools import partial from typing import List import numpy as np import pandas as pd from kartothek.io_components.metapartition import ( MetaPartition, parse_input_to_metapartition, ) from kartothek.io_components.utils import sort_values_categorical from ._utils ...
# -*- coding: utf-8 -*- from functools import partial from typing import List import numpy as np import pandas as pd from kartothek.io_components.metapartition import ( MetaPartition, parse_input_to_metapartition, ) from kartothek.io_components.utils import sort_values_categorical from ._utils import map_d...
en
0.841186
# -*- coding: utf-8 -*- Categorize each row of `df` based on the data in the columns `subset` into `num_buckets` values. This is based on `pandas.util.hash_pandas_object` # I don't have access to the group values # delete reference to enable release after partition_on; before index build
2.154409
2
py/lvmspec/io/spectra.py
sdss/lvmspec
0
6625612
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ lvmspec.io.spectra ===================== I/O routines for working with spectral grouping files. """ from __future__ import absolute_import, division, print_function import os import re import warnings import time import nump...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ lvmspec.io.spectra ===================== I/O routines for working with spectral grouping files. """ from __future__ import absolute_import, division, print_function import os import re import warnings import time import nump...
en
0.860513
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- lvmspec.io.spectra ===================== I/O routines for working with spectral grouping files. Write Spectra object to FITS file. This places the metadata into the header of the (empty) primary HDU. The first extension co...
2.229407
2
vendor/packages/translate-toolkit/translate/lang/test_identify.py
DESHRAJ/fjord
0
6625613
#!/usr/bin/env python # -*- coding: UTF-8 -*- from pytest import raises from translate.lang.identify import LanguageIdentifier from translate.storage.base import TranslationUnit TEXT = """ Ästhetik des "Erhabenen" herangezogen. kostete (hinzu kommen über 6 630 tote O3 steht für Ozon; es wird in der NO2 sind wese...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from pytest import raises from translate.lang.identify import LanguageIdentifier from translate.storage.base import TranslationUnit TEXT = """ Ästhetik des "Erhabenen" herangezogen. kostete (hinzu kommen über 6 630 tote O3 steht für Ozon; es wird in der NO2 sind wese...
de
0.995448
#!/usr/bin/env python # -*- coding: UTF-8 -*- Ästhetik des "Erhabenen" herangezogen. kostete (hinzu kommen über 6 630 tote O3 steht für Ozon; es wird in der NO2 sind wesentlich am "sauren Regen" Ethik hängt eng mit einer Dauerkrise der Serumwerk GmbH Dresden, Postfach ,Hundeschläger' für die Dezimierung der Momente ...
2.065322
2
par_gcp_phys_barebone.py
Suhaibinator/CarlaExperiments
0
6625614
#!/usr/bin/env python """ Barebone Simulation without camera or extraneous sensors. """ from __future__ import print_function # ============================================================================== # -- find carla module --------------------------------------------------------- # =========================...
#!/usr/bin/env python """ Barebone Simulation without camera or extraneous sensors. """ from __future__ import print_function # ============================================================================== # -- find carla module --------------------------------------------------------- # =========================...
en
0.263888
#!/usr/bin/env python Barebone Simulation without camera or extraneous sensors. # ============================================================================== # -- find carla module --------------------------------------------------------- # ============================================================================...
1.426127
1
src/fsmpy/base.py
MonashUAS/fsmpy
0
6625615
<filename>src/fsmpy/base.py import logging logger = "" ''' Base class for all FSM elements. Implements name and logging features that can be used on all FSM elements. ''' class Base(object): def __init__(self, typ, name): if typ == None or typ == "": raise Exception("no type set for class") self.__type = typ ...
<filename>src/fsmpy/base.py import logging logger = "" ''' Base class for all FSM elements. Implements name and logging features that can be used on all FSM elements. ''' class Base(object): def __init__(self, typ, name): if typ == None or typ == "": raise Exception("no type set for class") self.__type = typ ...
en
0.682678
Base class for all FSM elements. Implements name and logging features that can be used on all FSM elements. # Returns the name of the FSM element. ### ROS logging methods ### ### / ROS logging methods ###
2.454788
2
app/task/models.py
iasmini/task_manager
0
6625616
from django.db import models class Task(models.Model): name = models.CharField(max_length=255) finished = models.BooleanField(default=False) class Meta: ordering = ["name"] def __str__(self): return self.name
from django.db import models class Task(models.Model): name = models.CharField(max_length=255) finished = models.BooleanField(default=False) class Meta: ordering = ["name"] def __str__(self): return self.name
none
1
2.265201
2
dataset.py
biomed-AI/CoSMIG
3
6625617
import numpy as np import random from tqdm import tqdm import os, sys, pdb, math, time from copy import deepcopy import multiprocessing as mp import networkx as nx import argparse import scipy.io as sio import scipy.sparse as ssp import torch from torch_geometric.data import Data, Dataset, InMemoryDataset from sklear...
import numpy as np import random from tqdm import tqdm import os, sys, pdb, math, time from copy import deepcopy import multiprocessing as mp import networkx as nx import argparse import scipy.io as sio import scipy.sparse as ssp import torch from torch_geometric.data import Data, Dataset, InMemoryDataset from sklear...
en
0.756735
# nnz of the row # Extract enclosing subgraphs and save to disk # extract enclosing subgraphs # extract the h-hop enclosing subgraph around link 'ind' # remove link between target nodes # prepare pyg graph constructor input # r is 1, 2... (rating labels + 1) # transform r back to rating label # print(onehot_encoding(li...
2.156184
2
frictionless/row.py
loganbyers/frictionless-py
0
6625618
<gh_stars>0 # TODO: review this dependency from .plugins.json import JsonParser from itertools import zip_longest from collections import OrderedDict from decimal import Decimal from .helpers import cached_property from . import helpers from . import errors # TODO: rebase on list base class for permormance? # TODO: i...
# TODO: review this dependency from .plugins.json import JsonParser from itertools import zip_longest from collections import OrderedDict from decimal import Decimal from .helpers import cached_property from . import helpers from . import errors # TODO: rebase on list base class for permormance? # TODO: if not list -...
en
0.590688
# TODO: review this dependency # TODO: rebase on list base class for permormance? # TODO: if not list - drop OrderedDict? From Python3.7 order is guaranteed Row representation API | Usage -------- | -------- Public | `from frictionless import Table` This object is returned by `extract`, `table....
2.554759
3
datacoco_batch/__init__.py
equinoxfitness/datacoco-batch
3
6625619
from .batch import Batch
from .batch import Batch
none
1
1.058388
1
common/libs/UrlManager.py
Mrlhz/flask
0
6625620
class UrlManager(object): @staticmethod def build_url(path): return path @staticmethod def build_static_url(path): path = path + "?ver=" + "201808281000" return UrlManager.build_url(path)
class UrlManager(object): @staticmethod def build_url(path): return path @staticmethod def build_static_url(path): path = path + "?ver=" + "201808281000" return UrlManager.build_url(path)
none
1
2.266665
2
Tuplas, Listas, Dicio/ex88.py
viniTWL/Python-Projects
1
6625621
from random import sample from time import sleep lista = [] print('\033[0;34m-'*30) print(' \033[0;34mJOGOS DA MEGA SENA') print('\033[0;34m-\033[m'*30) j = int(input('Quantos jogos você deseja gerar? ')) print('SORTEANDO...') for i in range(0, j): ran = sorted(sample(range(1, 60), 6)) lista.append(ran[:]) ...
from random import sample from time import sleep lista = [] print('\033[0;34m-'*30) print(' \033[0;34mJOGOS DA MEGA SENA') print('\033[0;34m-\033[m'*30) j = int(input('Quantos jogos você deseja gerar? ')) print('SORTEANDO...') for i in range(0, j): ran = sorted(sample(range(1, 60), 6)) lista.append(ran[:]) ...
none
1
3.016613
3
original/v1/s005-modules/piskvorky1d/piskvorky.py
MartinaHytychova/pyladies.cz
69
6625622
<reponame>MartinaHytychova/pyladies.cz<filename>original/v1/s005-modules/piskvorky1d/piskvorky.py<gh_stars>10-100 def tah(pole, index, symbol): if pole[index] != '-': raise ValueError('Pole {} je obsazeno symbolem {}'.format(index, pole[index])) return pole[:index] + symbol + pole[index + 1:] def vyhod...
def tah(pole, index, symbol): if pole[index] != '-': raise ValueError('Pole {} je obsazeno symbolem {}'.format(index, pole[index])) return pole[:index] + symbol + pole[index + 1:] def vyhodnot(pole): if 'ooo' in pole: return 'o' if 'xxx' in pole: return 'x' if '-' not in pol...
none
1
3.667847
4
tarakania_rpg/rpg/items/consumables/__init__.py
MKokyn/discord-bot
0
6625623
from .consumable import Consumable from .food import Food from .potion import Potion __all__ = ("Consumable", "Food", "Potion")
from .consumable import Consumable from .food import Food from .potion import Potion __all__ = ("Consumable", "Food", "Potion")
none
1
1.550499
2
Tests/scripts/hook_validations/secrets.py
dimalz/content
0
6625624
import io import os import re import math import json import string from Tests.test_utils import run_command, print_error from Tests.scripts.constants import * # secrets settings # Entropy score is determined by shanon's entropy algorithm, most English words will score between 1.5 and 3.5 ENTROPY_THRESHOLD = 4.2 SKI...
import io import os import re import math import json import string from Tests.test_utils import run_command, print_error from Tests.scripts.constants import * # secrets settings # Entropy score is determined by shanon's entropy algorithm, most English words will score between 1.5 and 3.5 ENTROPY_THRESHOLD = 4.2 SKI...
en
0.835256
# secrets settings # Entropy score is determined by shanon's entropy algorithm, most English words will score between 1.5 and 3.5 # disable-secrets-detection-start # secrets # false positives # disable-secrets-detection-end Get all new/modified text files that need to be searched for secrets :param branch_name: cur...
1.985501
2
weather/views.py
Sanjin002/AGRO-kopija
0
6625625
from django.shortcuts import render import requests from datetime import datetime from django.http import JsonResponse # Create your views here. def home_weather(request): #ovdje spremamo url od meteobaze url = 'http://meteo.pointjupiter.co/' response = requests.get(url.format()).json() # ovdje ima...
from django.shortcuts import render import requests from datetime import datetime from django.http import JsonResponse # Create your views here. def home_weather(request): #ovdje spremamo url od meteobaze url = 'http://meteo.pointjupiter.co/' response = requests.get(url.format()).json() # ovdje ima...
bs
0.371582
# Create your views here. #ovdje spremamo url od meteobaze # ovdje imamo spremljenu sad cijelu listu objekata gradova
2.628685
3
expert.py
davtoh/RRTools
1
6625626
from __future__ import print_function from __future__ import absolute_import from builtins import input from past.builtins import basestring from builtins import object import os import cv2 import numpy as np from RRtoolbox.lib.arrayops import contours2mask, findContours from RRtoolbox.lib.cache import MemoizedDict...
from __future__ import print_function from __future__ import absolute_import from builtins import input from past.builtins import basestring from builtins import object import os import cv2 import numpy as np from RRtoolbox.lib.arrayops import contours2mask, findContours from RRtoolbox.lib.cache import MemoizedDict...
en
0.670855
# loads image with shape of coordinates # update loaded shape # init default dictionary to format # get old coordinates # init new coordinates #if not coor_list: # ensures there is coors inisite coor_list # coor_list = [[]] Class to generate images expert data (experimental) :param path: :param data: ...
2.21988
2
train.py
zouguojian/pollutant-prediction
0
6625627
# -- coding: utf-8 -- from __future__ import division from __future__ import print_function from spatial_temporal_model.hyparameter import parameter from spatial_temporal_model.encoder import cnn_lstm from model.decoder import Dcoderlstm from model.utils import construct_feed_dict from model.encoder import Encoderlstm...
# -- coding: utf-8 -- from __future__ import division from __future__ import print_function from spatial_temporal_model.hyparameter import parameter from spatial_temporal_model.encoder import cnn_lstm from model.decoder import Dcoderlstm from model.utils import construct_feed_dict from model.encoder import Encoderlstm...
en
0.516015
# -- coding: utf-8 -- Embeds a given tensor. Args: inputs: A `Tensor` with type `int32` or `int64` containing the ids to be looked up in `lookup table`. vocab_size: An int. Vocabulary size. num_units: An int. Number of embedding hidden units. zero_pad: A boolean. If True, all the va...
2.536348
3
dbutils/convert.py
libremente/service-app
2
6625628
import json import argparse """ This script is usefull to convert json exported with datagrip in json importable with insertMany Usage python3 convert.py file.name.json """ parser = argparse.ArgumentParser() parser.add_argument("fname") args = parser.parse_args() with open(args.fname, 'r', encoding='utf-8') as infi...
import json import argparse """ This script is usefull to convert json exported with datagrip in json importable with insertMany Usage python3 convert.py file.name.json """ parser = argparse.ArgumentParser() parser.add_argument("fname") args = parser.parse_args() with open(args.fname, 'r', encoding='utf-8') as infi...
en
0.576708
This script is usefull to convert json exported with datagrip in json importable with insertMany Usage python3 convert.py file.name.json
3.119334
3
src/sv-pipeline/03_variant_filtering/scripts/rewrite_SR_coords.py
shyamrav/gatk-sv
1
6625629
<gh_stars>1-10 #!/usr/bin/env python # -*- coding: utf-8 -*- # """ """ import argparse import sys import pysam import pandas as pd def rewrite_SR_coords(record, metrics, pval_cutoff, bg_cutoff): row = metrics.loc[record.id] if row.SR_sum_log_pval >= pval_cutoff and row.SR_sum_bg_frac >= bg_cutoff: ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # """ """ import argparse import sys import pysam import pandas as pd def rewrite_SR_coords(record, metrics, pval_cutoff, bg_cutoff): row = metrics.loc[record.id] if row.SR_sum_log_pval >= pval_cutoff and row.SR_sum_bg_frac >= bg_cutoff: record.pos = in...
en
0.430149
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Load metrics # Load cutoffs
2.325112
2
utils/metrics.py
IvoOVerhoeven/meta-learning-emotion-detection
3
6625630
<gh_stars>1-10 import torch import torch.nn import torch.nn.functional as F def logits_to_preds(logits): probs = F.softmax(logits, dim=-1) preds = torch.argmax(probs, dim=1) return preds def accuracy(preds, labels): return (preds == labels).float().mean() def confusion_matrix(preds, labels, n_classe...
import torch import torch.nn import torch.nn.functional as F def logits_to_preds(logits): probs = F.softmax(logits, dim=-1) preds = torch.argmax(probs, dim=1) return preds def accuracy(preds, labels): return (preds == labels).float().mean() def confusion_matrix(preds, labels, n_classes): conf_m...
none
1
2.489966
2
containers/ipython.py
colaboratory-team/backend-container
4
6625631
# Copyright 2017 Google Inc. 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 law or agre...
# Copyright 2017 Google Inc. 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 law or agre...
en
0.745327
# Copyright 2017 Google Inc. 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 law or agre...
2.120105
2
examples/singleobjective/CEC2013/diversity_de_cec2013.py
pedronarloch/jMetalPy_phD
0
6625632
import os import sys import pandas as pd import seaborn as sns import jmetal.analysis.plot as jPlot from jmetal.algorithm.singleobjective.differential_evolution import DifferentialEvolutionReset from jmetal.algorithm.singleobjective.simulated_annealing import SimulatedAnnealing from jmetal.operator import PolynomialM...
import os import sys import pandas as pd import seaborn as sns import jmetal.analysis.plot as jPlot from jmetal.algorithm.singleobjective.differential_evolution import DifferentialEvolutionReset from jmetal.algorithm.singleobjective.simulated_annealing import SimulatedAnnealing from jmetal.operator import PolynomialM...
en
0.478925
#file_path = '/home/pnarloch/workspace/resources/populations/CEC2013/function_' + str(p) + '/population_' \ # + str(i) + '.txt' # population_generator = ArchiveInjector(file_path=file_path, problem=problem) # algorithm.population_generator = population_generator # Random Trials Plotting Energies + Mean Plott...
1.964639
2
app/admin/__init__.py
wanguinjoka/personal-blog
0
6625633
from flask import Blueprint admin = Blueprint('admin',__name__) from . import views,forms
from flask import Blueprint admin = Blueprint('admin',__name__) from . import views,forms
none
1
1.351743
1
main/filesAndForms/migrations/0003_auto_20150322_1638.py
nynguyen/sprint_zero_demo
0
6625634
<filename>main/filesAndForms/migrations/0003_auto_20150322_1638.py<gh_stars>0 # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('filesAndF...
<filename>main/filesAndForms/migrations/0003_auto_20150322_1638.py<gh_stars>0 # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('filesAndF...
en
0.769321
# -*- coding: utf-8 -*-
1.607194
2
add-donations.py
vis4/parteispenden
2
6625635
#!/usr/bin/env python import mysql.connector import csv import sys new_donations_csv = csv.reader(open(sys.argv[1]), dialect='excel-tab') # expected format: Name, Typ, Strasse, Plz, Stadt, Partei, Betrag head = new_donations_csv.next() expected = 'name,typ,strasse,plz,stadt,partei,betrag,jahr'.split(',') cols = {} f...
#!/usr/bin/env python import mysql.connector import csv import sys new_donations_csv = csv.reader(open(sys.argv[1]), dialect='excel-tab') # expected format: Name, Typ, Strasse, Plz, Stadt, Partei, Betrag head = new_donations_csv.next() expected = 'name,typ,strasse,plz,stadt,partei,betrag,jahr'.split(',') cols = {} f...
en
0.40934
#!/usr/bin/env python # expected format: Name, Typ, Strasse, Plz, Stadt, Partei, Betrag # connect to mysql database # read known donor tokens
2.953382
3
tests/test_goal.py
axonepro/sdk-ooti
1
6625636
from factories.factories import ProjectFactory, TeamFactory import unittest # To read .env variables import os import sys from dotenv import load_dotenv PACKAGE_PARENT = '..' SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__)))) sys.path.append(os.path.normpath(os.pa...
from factories.factories import ProjectFactory, TeamFactory import unittest # To read .env variables import os import sys from dotenv import load_dotenv PACKAGE_PARENT = '..' SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__)))) sys.path.append(os.path.normpath(os.pa...
en
0.466166
# To read .env variables # noqa E402 # Loading environment variables (stored in .env file)
2.567573
3
openbadges/verifier/tasks/crypto.py
iankpconcentricsky/badgecheck
9
6625637
<gh_stars>1-10 from Crypto.PublicKey import RSA from jose import jwk, jws, exceptions as joseexceptions import json import six from ..actions.graph import patch_node from ..actions.tasks import add_task from ..actions.validation_report import set_validation_subject from ..exceptions import TaskPrerequisitesError from ...
from Crypto.PublicKey import RSA from jose import jwk, jws, exceptions as joseexceptions import json import six from ..actions.graph import patch_node from ..actions.tasks import add_task from ..actions.validation_report import set_validation_subject from ..exceptions import TaskPrerequisitesError from ..state import ...
none
1
1.873344
2
src/test/resources/loaderTestData/dependencygraph/pythonproject/module/package1/sub_package1/module1.py
jacksonpradolima/comfort
2
6625638
<reponame>jacksonpradolima/comfort<gh_stars>1-10 class Module1(object): pass
class Module1(object): pass
none
1
1.063144
1
test/conftest.py
grauwoelfchen/pyramid_secure_response
2
6625639
<reponame>grauwoelfchen/pyramid_secure_response import pytest @pytest.fixture(scope='function') def dummy_request(): # type: () -> Request from pyramid import testing url = 'http://example.org' settings = {} req = testing.DummyRequest( environ={}, locale_name='en', matched_ro...
import pytest @pytest.fixture(scope='function') def dummy_request(): # type: () -> Request from pyramid import testing url = 'http://example.org' settings = {} req = testing.DummyRequest( environ={}, locale_name='en', matched_route=None, settings=settings, ser...
en
0.546972
# type: () -> Request
2.133657
2
pcg_gazebo/generators/biomes/whittaker_biome.py
TForce1/pcg_gazebo
40
6625640
# Copyright (c) 2020 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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 # #...
# Copyright (c) 2020 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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 # #...
en
0.82842
# Copyright (c) 2020 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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 # #...
2.262902
2
modules/constants.py
lydell/userscript-proxy
1
6625641
<reponame>lydell/userscript-proxy<filename>modules/constants.py VERSION_PREFIX: str = "v" APP_NAME: str = "Userscript Proxy" VERSION: str = "0.11.0" ATTRIBUTE_UP_VERSION: str = "data-userscript-proxy-version" DEFAULT_PORT: int = 8080 DEFAULT_USERSCRIPTS_DIR: str = "userscripts" DEFAULT_QUERY_PARAM_TO_DISABLE: str = "no...
VERSION_PREFIX: str = "v" APP_NAME: str = "Userscript Proxy" VERSION: str = "0.11.0" ATTRIBUTE_UP_VERSION: str = "data-userscript-proxy-version" DEFAULT_PORT: int = 8080 DEFAULT_USERSCRIPTS_DIR: str = "userscripts" DEFAULT_QUERY_PARAM_TO_DISABLE: str = "nouserscripts"
none
1
1.246026
1
ckeditor/views.py
redwerk/django-ckeditor
0
6625642
from datetime import datetime import os from django.conf import settings from django.core.files.storage import default_storage from django.views.decorators.csrf import csrf_exempt from django.views import generic from django.http import HttpResponse from django.shortcuts import render_to_response from django.template ...
from datetime import datetime import os from django.conf import settings from django.core.files.storage import default_storage from django.views.decorators.csrf import csrf_exempt from django.views import generic from django.http import HttpResponse from django.shortcuts import render_to_response from django.template ...
en
0.865042
# If CKEDITOR_RESTRICT_BY_USER is True upload file to user specific path. # Generate date based path to put uploaded file. # Complete upload path (upload_path + date_path). Uploads a file and send back its URL to CKEditor. # Get the uploaded file from request. #Verify that file is a valid image <script type='text/javas...
2.287966
2
src/tests/test_engine.py
bieniekmateusz/forcebalance
0
6625643
from __future__ import absolute_import from builtins import zip from builtins import range import pytest from forcebalance.nifty import * from forcebalance.gmxio import GMX from forcebalance.tinkerio import TINKER from forcebalance.openmmio import OpenMM from collections import OrderedDict from .__init__ import ForceBa...
from __future__ import absolute_import from builtins import zip from builtins import range import pytest from forcebalance.nifty import * from forcebalance.gmxio import GMX from forcebalance.tinkerio import TINKER from forcebalance.openmmio import OpenMM from collections import OrderedDict from .__init__ import ForceBa...
en
0.785083
# Set SAVEDATA to True and run the tests in order to save data # to a file for future reference. This is easier to use for troubleshooting # vs. comparing multiple programs against each other, b/c we don't know # which one changed. Amber99SB unit test consisting of ten structures of ACE-ALA-NME interacting with ACE...
1.823166
2
setup.py
foxik/pybox2d
0
6625644
<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup script for pybox2d. For installation instructions, see INSTALL. Basic install steps: python setup.py build If that worked, then: python setup.py install """ import os import sys from glob import glob __author__='<NAME>' __license__='zlib' impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup script for pybox2d. For installation instructions, see INSTALL. Basic install steps: python setup.py build If that worked, then: python setup.py install """ import os import sys from glob import glob __author__='<NAME>' __license__='zlib' import setuptools...
en
0.781318
#!/usr/bin/env python # -*- coding: utf-8 -*- Setup script for pybox2d. For installation instructions, see INSTALL. Basic install steps: python setup.py build If that worked, then: python setup.py install # release version number # create the version string # setup some paths and names # the directory where the eg...
2.459792
2
blog/migrations/0007_auto_20200418_2041.py
AndriiOshtuk/MDN-DIY-mini-blog
0
6625645
# Generated by Django 3.0.3 on 2020-04-18 17:41 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0006_auto_20200418_2034'), ] operations = [ migrations.AlterField( model_name='post', name='...
# Generated by Django 3.0.3 on 2020-04-18 17:41 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0006_auto_20200418_2034'), ] operations = [ migrations.AlterField( model_name='post', name='...
en
0.805719
# Generated by Django 3.0.3 on 2020-04-18 17:41
1.637966
2
src/python/pants/task/scm_publish_mixin.py
revl/pants
1
6625646
<reponame>revl/pants<filename>src/python/pants/task/scm_publish_mixin.py # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import re import traceback from abc import abstractmethod from functools import total_ordering from pants.base.exc...
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import re import traceback from abc import abstractmethod from functools import total_ordering from pants.base.exceptions import TaskError from pants.scm.scm import Scm class Version: ...
en
0.841756
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). Attempts to parse the given string as Semver, then falls back to Namedver. Returns the string representation of this Version. A less restrictive versioning scheme that does not conflict wit...
2.186189
2
tests/forumsentry/test_errors.py
awalker125/forumsentry-sdk-for-python
2
6625647
<filename>tests/forumsentry/test_errors.py ''' Created on 8 Dec 2017 @author: walandre ''' import unittest from forumsentry.errors import SerializationError from forumsentry.errors import DeSerializationError from forumsentry.errors import BadVerbError from forumsentry.errors import ConfigError from forumsen...
<filename>tests/forumsentry/test_errors.py ''' Created on 8 Dec 2017 @author: walandre ''' import unittest from forumsentry.errors import SerializationError from forumsentry.errors import DeSerializationError from forumsentry.errors import BadVerbError from forumsentry.errors import ConfigError from forumsen...
en
0.541066
Created on 8 Dec 2017 @author: walandre #import sys;sys.argv = ['', 'Test.testErrors']
2.510822
3
tasks/views.py
bangalorebyte-cohort29-1911/SampleCRM
0
6625648
from datetime import datetime from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import PermissionDenied from django.db.models import Q from django.http import JsonRe...
from datetime import datetime from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import PermissionDenied from django.db.models import Q from django.http import JsonRe...
en
0.32116
# from accounts.models import Account # elif request.user.google.all(): # users = [] # accounts = Account.objects.filter(created_by=request.user).filter(status="open") # if Task.objects.filter(id=task_id).exists(): # task = Task.objects.select_related('account').prefetch_related( # 'assigned_to', 'c...
1.917634
2
tempest/api/identity/admin/v3/test_credentials.py
Hybrid-Cloud/hybrid-tempest
3
6625649
# Copyright 2013 OpenStack Foundation # 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 requ...
# Copyright 2013 OpenStack Foundation # 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 requ...
en
0.845807
# Copyright 2013 OpenStack Foundation # 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 requ...
1.894242
2
src/forms.py
Amazeryogo/CrispyDB
1
6625650
from flask_wtf import FlaskForm import wtforms class LoginForm(FlaskForm): username = wtforms.StringField('Username', validators=[wtforms.validators.DataRequired()]) password = wtforms.PasswordField('Password', validators=[wtforms.validators.DataRequired()]) submit = wtforms.SubmitField('Login') class N...
from flask_wtf import FlaskForm import wtforms class LoginForm(FlaskForm): username = wtforms.StringField('Username', validators=[wtforms.validators.DataRequired()]) password = wtforms.PasswordField('Password', validators=[wtforms.validators.DataRequired()]) submit = wtforms.SubmitField('Login') class N...
none
1
2.721728
3