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
listener/normal/receiving/urls.py
andymckay/arecibo
6
6623251
from django.conf.urls.defaults import * urlpatterns = patterns('', url(r'^v/1/$', 'receiving.http.post', name="error-post"), )
from django.conf.urls.defaults import * urlpatterns = patterns('', url(r'^v/1/$', 'receiving.http.post', name="error-post"), )
none
1
1.336103
1
bot/migrations/0002_auto_20191118_0825.py
azimjohn/covid-19-self-diagnosis-test-bot
8
6623252
<gh_stars>1-10 # Generated by Django 2.2 on 2019-11-18 08:25 from django.db import migrations, models import django.db.models.deletion import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('bot', '0001_initial'), ] operations = [ migrations.RemoveField( ...
# Generated by Django 2.2 on 2019-11-18 08:25 from django.db import migrations, models import django.db.models.deletion import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('bot', '0001_initial'), ] operations = [ migrations.RemoveField( model_nam...
en
0.763234
# Generated by Django 2.2 on 2019-11-18 08:25
1.659079
2
nuplan/database/maps_db/gpkg_mapsdb.py
motional/nuplan-devkit
128
6623253
import fcntl import glob import json import logging import os import time import warnings from functools import lru_cache from typing import List, Sequence import fiona import geopandas as gpd import numpy as np import numpy.typing as npt import rasterio from nuplan.database.common.blob_store.creator import BlobStore...
import fcntl import glob import json import logging import os import time import warnings from functools import lru_cache from typing import List, Sequence import fiona import geopandas as gpd import numpy as np import numpy.typing as npt import rasterio from nuplan.database.common.blob_store.creator import BlobStore...
en
0.757979
# To silence NotGeoreferencedWarning # Available map locations # Dimensions of raster layers for each location # S3 download params. # Dummy layer to use for downloading the map package for the first time GPKGMapsDB Exception Class. Constructor. :param message: Exception message. GPKG MapsDB implementation. Con...
1.853296
2
playbook_init/__init__.py
rowancarr/ansible-playbook-init
0
6623254
__author__ = 'rc'
__author__ = 'rc'
none
1
1.04578
1
coderbyte/Longest Word.py
andraantariksa/code-exercise-answer
1
6623255
<filename>coderbyte/Longest Word.py import re def LongestWord(sen): d = {} str_l = re.sub(r"[^a-zA-Z0-9 ]", r"", sen).split() max_str = "" for i in str_l: if len(i) > len(max_str): max_str = i return max_str print LongestWord(raw_input())
<filename>coderbyte/Longest Word.py import re def LongestWord(sen): d = {} str_l = re.sub(r"[^a-zA-Z0-9 ]", r"", sen).split() max_str = "" for i in str_l: if len(i) > len(max_str): max_str = i return max_str print LongestWord(raw_input())
none
1
3.845679
4
tests/integration/python_await/multiple_outputs/__main__.py
sticha/pulumi
12,004
6623256
<reponame>sticha/pulumi<gh_stars>1000+ import asyncio import pulumi output = pulumi.Output.from_input(asyncio.sleep(3, "magic string")) output.apply(print) exported = pulumi.Output.from_input(asyncio.sleep(2, "foo")) pulumi.export("exported", exported) exported.apply(print) another = pulumi.Output.from_input(asyncio...
import asyncio import pulumi output = pulumi.Output.from_input(asyncio.sleep(3, "magic string")) output.apply(print) exported = pulumi.Output.from_input(asyncio.sleep(2, "foo")) pulumi.export("exported", exported) exported.apply(print) another = pulumi.Output.from_input(asyncio.sleep(5, "bar")) another.apply(print)
none
1
2.214173
2
farnsworth/pre_fill.py
naderm/farnsworth
0
6623257
<gh_stars>0 #!/usr/bin/env python from __future__ import absolute_import, print_function import logging import os import sys from django.conf import settings os.environ.setdefault("DJANGO_SETTINGS_MODULE", "farnsworth.settings") this_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) if this_dir n...
#!/usr/bin/env python from __future__ import absolute_import, print_function import logging import os import sys from django.conf import settings os.environ.setdefault("DJANGO_SETTINGS_MODULE", "farnsworth.settings") this_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) if this_dir not in sys.pa...
en
0.352612
#!/usr/bin/env python # Add Managers # Add Requests
2.132356
2
python/1579.A.py
arechesk/cf
0
6623258
n=int(input()) for i in range(n): s=input() if 0==sum([int(k=="B" or -1) for k in s]): print("YES") else: print("NO")
n=int(input()) for i in range(n): s=input() if 0==sum([int(k=="B" or -1) for k in s]): print("YES") else: print("NO")
none
1
3.662426
4
electrum/networks/abosom_mainnet.py
SOME-BODY84/electrum-1
4
6623259
from electrum.util import inv_dict, read_json, bfh from .abstract_network import AbstractNet from .stake_mixin import StakeMixin from ..bitcoin import hash_encode from ..exceptions import MissingHeader class AbosomMainnet(AbstractNet, StakeMixin): NAME = 'Abosom' NAME_LOWER = 'abosom' SHORT_CODE = 'ABOSOM...
from electrum.util import inv_dict, read_json, bfh from .abstract_network import AbstractNet from .stake_mixin import StakeMixin from ..bitcoin import hash_encode from ..exceptions import MissingHeader class AbosomMainnet(AbstractNet, StakeMixin): NAME = 'Abosom' NAME_LOWER = 'abosom' SHORT_CODE = 'ABOSOM...
en
0.834208
# CRW # Get the first block of this retarget period # new target # not any target can be represented in 32 bits:
1.900048
2
gpenkf/core/classic_gp.py
danilkuzin/GP-EnKF
12
6623260
<filename>gpenkf/core/classic_gp.py """ Classic GP """ import GPy import numpy as np from gpenkf.gp_util.squared_exponential import SquaredExponential class NormalGP: """ Classic GP model. Wrapper of GPy functions without inducing points :param parameters: The :class:`~gpenkf.core.parameters.parameters` ...
<filename>gpenkf/core/classic_gp.py """ Classic GP """ import GPy import numpy as np from gpenkf.gp_util.squared_exponential import SquaredExponential class NormalGP: """ Classic GP model. Wrapper of GPy functions without inducing points :param parameters: The :class:`~gpenkf.core.parameters.parameters` ...
en
0.608042
Classic GP Classic GP model. Wrapper of GPy functions without inducing points :param parameters: The :class:`~gpenkf.core.parameters.parameters` parameters :param x_sample: location of the points to predict :param f_true_sample: true value at sample points :return: NMSE between predicted and true v...
2.618545
3
nameko_couchbase.py
geoffjukes/nameko-couchbase
0
6623261
<reponame>geoffjukes/nameko-couchbase from urllib.parse import urlparse, urlencode from nameko.extensions import DependencyProvider from couchbase.cluster import Cluster from couchbase.cluster import PasswordAuthenticator COUCHBASE_KEY = 'COUCHBASE' class Couchbase(DependencyProvider): def __init__(self, bucke...
from urllib.parse import urlparse, urlencode from nameko.extensions import DependencyProvider from couchbase.cluster import Cluster from couchbase.cluster import PasswordAuthenticator COUCHBASE_KEY = 'COUCHBASE' class Couchbase(DependencyProvider): def __init__(self, bucket): self.cluster = None ...
none
1
2.173152
2
server/src/nmea.py
mikepfrank/COSMICi
0
6623262
#|****************************************************************************** #| #| FILE NAME: nmea.py [python module source file] #| #| DESCRIPTION: #| This file defines functions associated with processing #| of NMEA-formatted 'sentences' or message lines. #| #|vvvv...
#|****************************************************************************** #| #| FILE NAME: nmea.py [python module source file] #| #| DESCRIPTION: #| This file defines functions associated with processing #| of NMEA-formatted 'sentences' or message lines. #| #|vvvv...
en
0.862927
#|****************************************************************************** #| #| FILE NAME: nmea.py [python module source file] #| #| DESCRIPTION: #| This file defines functions associated with processing #| of NMEA-formatted 'sentences' or message lines. #| #|vvvv...
3.175312
3
Scripts/preprocess_and_tokenize.py
Jabalov/Arabic-Dialects-Identification
2
6623263
import pandas as pd import numpy as np from sklearn import preprocessing import nltk # nltk.download('all') from nltk.corpus import stopwords, wordnet from nltk.tokenize import word_tokenize from nltk.tokenize import RegexpTokenizer import regex as re class PreprocessTweets: def __init__ (self, text...
import pandas as pd import numpy as np from sklearn import preprocessing import nltk # nltk.download('all') from nltk.corpus import stopwords, wordnet from nltk.tokenize import word_tokenize from nltk.tokenize import RegexpTokenizer import regex as re class PreprocessTweets: def __init__ (self, text...
en
0.232098
# nltk.download('all') ّ | # Tashdid َ | # Fatha ً | # Tanwin Fath ُ | # Damma ٌ | # Tanwin Damm ِ | # Kasra ...
3.093982
3
unittests/test_creation_lib_cWDictFile_SHADicts.py
ddbox/glideinwms
0
6623264
<reponame>ddbox/glideinwms #!/usr/bin/env python3 # SPDX-FileCopyrightText: 2009 Fermi Research Alliance, LLC # SPDX-License-Identifier: Apache-2.0 """ Project: glideinWMS Description: unit test for SHA1DictFile and SummarySHA1DictFile classes in glideinwms/creation/lib/cWDictFile.py Author: <NAME> <E...
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2009 Fermi Research Alliance, LLC # SPDX-License-Identifier: Apache-2.0 """ Project: glideinWMS Description: unit test for SHA1DictFile and SummarySHA1DictFile classes in glideinwms/creation/lib/cWDictFile.py Author: <NAME> <EMAIL> """ import copy imp...
en
0.377445
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2009 Fermi Research Alliance, LLC # SPDX-License-Identifier: Apache-2.0 Project: glideinWMS Description: unit test for SHA1DictFile and SummarySHA1DictFile classes in glideinwms/creation/lib/cWDictFile.py Author: <NAME> <EMAIL>
2.270693
2
webservice/utils/check.py
iducn/Paddle-bot
0
6623265
import requests import re def checkPRCI(commit_url, sha, CHECK_CI): """ Check if PR's commit message can trigger CI. Args: commit_url(url): PR's commit url. sha(str): PR's commit code. (The only code provided by GitHub) CHECK_CI(str): PR's commit message checker. Returns: ...
import requests import re def checkPRCI(commit_url, sha, CHECK_CI): """ Check if PR's commit message can trigger CI. Args: commit_url(url): PR's commit url. sha(str): PR's commit code. (The only code provided by GitHub) CHECK_CI(str): PR's commit message checker. Returns: ...
en
0.408126
Check if PR's commit message can trigger CI. Args: commit_url(url): PR's commit url. sha(str): PR's commit code. (The only code provided by GitHub) CHECK_CI(str): PR's commit message checker. Returns: res: True or False Check if PR's description meet the standard of template ...
2.885983
3
utils.py
wuaalb/pytorch_template_audio
18
6623266
<reponame>wuaalb/pytorch_template_audio<filename>utils.py from pathlib import Path import warnings import torch from torch.optim.lr_scheduler import _LRScheduler import numpy as np # find checkpoint with latest creation time (meta data modification on unix) def find_latest_checkpoint(path, pattern='*.pt'): path =...
from pathlib import Path import warnings import torch from torch.optim.lr_scheduler import _LRScheduler import numpy as np # find checkpoint with latest creation time (meta data modification on unix) def find_latest_checkpoint(path, pattern='*.pt'): path = Path(path) fns = path.glob(pattern) fns = list(fn...
en
0.802657
# find checkpoint with latest creation time (meta data modification on unix) # raise if inconsistent # check step consistency # get data from components # save file # load file # XXX: issue with torch.load() not working with pathlib.Path # load data into components # check step consistency # load file # XXX: issue with...
2.092524
2
notebooks/final_recommendationdata_creation.py
TanveerSingh09/bhavitus-main
0
6623267
# -*- coding: utf-8 -*- """Final_recommendationdata_creation.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1jFSjmRyZAPq8YDYfO4vLnzoG9QUVQZdB # Creating final data for crop and fertilizer recommendation system """ import pandas as pd import mat...
# -*- coding: utf-8 -*- """Final_recommendationdata_creation.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1jFSjmRyZAPq8YDYfO4vLnzoG9QUVQZdB # Creating final data for crop and fertilizer recommendation system """ import pandas as pd import mat...
en
0.781328
# -*- coding: utf-8 -*- Final_recommendationdata_creation.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1jFSjmRyZAPq8YDYfO4vLnzoG9QUVQZdB # Creating final data for crop and fertilizer recommendation system #Add +/-3 for every NPK value #print(c...
2.652254
3
zwog/__init__.py
tare/zwog
2
6623268
<filename>zwog/__init__.py """zwog.""" from .utils import ZWOG __all__ = ['ZWOG', ] __author__ = '<NAME>' __version__ = '0.0.1' __license__ = 'BSD 3-Clause "New" or "Revised" License'
<filename>zwog/__init__.py """zwog.""" from .utils import ZWOG __all__ = ['ZWOG', ] __author__ = '<NAME>' __version__ = '0.0.1' __license__ = 'BSD 3-Clause "New" or "Revised" License'
none
1
1.089386
1
AoC/2020/05/pt2.py
N-l1/dmoj
0
6623269
<reponame>N-l1/dmoj<filename>AoC/2020/05/pt2.py # Find this puzzle at: # https://adventofcode.com/2020/day/5 with open('input.txt', 'r') as file: puzzle_input = file.read().splitlines() seat_ids = [] for line in puzzle_input: col, row = list(range(8)), list(range(128)) # Slices the existing row or column i...
# Find this puzzle at: # https://adventofcode.com/2020/day/5 with open('input.txt', 'r') as file: puzzle_input = file.read().splitlines() seat_ids = [] for line in puzzle_input: col, row = list(range(8)), list(range(128)) # Slices the existing row or column in half depending on character for character ...
en
0.753325
# Find this puzzle at: # https://adventofcode.com/2020/day/5 # Slices the existing row or column in half depending on character # Find the missing ID in the list of IDs
3.639366
4
freemiumSpotify/FileHandler.py
alkislardeniz/freemium-spotify
2
6623270
import pickle from pathlib import Path class FileHandler: @staticmethod def save_obj(obj, file_name): with open(file_name, 'wb') as f: pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL) @staticmethod def load_obj(file_name): with open(file_name, 'rb') as f: return pi...
import pickle from pathlib import Path class FileHandler: @staticmethod def save_obj(obj, file_name): with open(file_name, 'wb') as f: pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL) @staticmethod def load_obj(file_name): with open(file_name, 'rb') as f: return pi...
none
1
3.152429
3
engine.py
MattJTrueblood/Allies_RL_Prototype
1
6623271
import tcod import constants import core from view import renderer from view.frame import Frame from view.panel import Panel from controllers.game_panel_controller import GamePanelController def main(): key_event = tcod.Key() mouse_event = tcod.Mouse() #Build start menu start_frame = Frame("start fram...
import tcod import constants import core from view import renderer from view.frame import Frame from view.panel import Panel from controllers.game_panel_controller import GamePanelController def main(): key_event = tcod.Key() mouse_event = tcod.Mouse() #Build start menu start_frame = Frame("start fram...
en
0.405687
#Build start menu #Main Loop #Get input
2.440738
2
code/rosws/src/ros_demonstration/src/utility/config.py
Ohara124c41/PlanEx
0
6623272
#!/usr/bin/python # Configuration file to tweak parameters group_name = "Group_D" # namespaces for different system units lidar_driver_ns = '/lidar' motor_driver_ns = '/motor' imu_driver_ns = '/imu' mag_driver_ns = '/mag' movement_controller_ns = '/movement' # --- movement --- # once we are this distance in the vi...
#!/usr/bin/python # Configuration file to tweak parameters group_name = "Group_D" # namespaces for different system units lidar_driver_ns = '/lidar' motor_driver_ns = '/motor' imu_driver_ns = '/imu' mag_driver_ns = '/mag' movement_controller_ns = '/movement' # --- movement --- # once we are this distance in the vi...
en
0.857544
#!/usr/bin/python # Configuration file to tweak parameters # namespaces for different system units # --- movement --- # once we are this distance in the vicinity of the desired position (x,y,z), we declare us arrived at the position (but not pose) # [m] # once the difference of our actual and the desired orientation is...
2.414915
2
intro/try_and_exception.py
RobertoRosa7/python
0
6623273
<reponame>RobertoRosa7/python<filename>intro/try_and_exception.py<gh_stars>0 # -*- coding: utf-8 -*- # def dividePorDois(dois): # # usando try and execpt trata do error mas não interrompe a execução do script # try: # return 32 / dois # except ZeroDivisionError: # print('Error: you tried to divide by zer...
# -*- coding: utf-8 -*- # def dividePorDois(dois): # # usando try and execpt trata do error mas não interrompe a execução do script # try: # return 32 / dois # except ZeroDivisionError: # print('Error: you tried to divide by zero') # print(dividePorDois(2)) # print(dividePorDois(12)) # print(dividePorDo...
pt
0.428414
# -*- coding: utf-8 -*- # def dividePorDois(dois): # # usando try and execpt trata do error mas não interrompe a execução do script # try: # return 32 / dois # except ZeroDivisionError: # print('Error: you tried to divide by zero') # print(dividePorDois(2)) # print(dividePorDois(12)) # print(dividePorDois...
3.776446
4
gs/group/messages/add/smtp2gs/xverp.py
groupserver/gs.group.messages.add.smtp2gs
0
6623274
# -*- coding: utf-8 -*- '''XVERP handling.''' ############################################################################ # # Copyright © 2014, 2015 OnlineGroups.net and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the Z...
# -*- coding: utf-8 -*- '''XVERP handling.''' ############################################################################ # # Copyright © 2014, 2015 OnlineGroups.net and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the Z...
en
0.676678
# -*- coding: utf-8 -*- XVERP handling. ############################################################################ # # Copyright © 2014, 2015 OnlineGroups.net and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL sho...
2.11345
2
InvenTree/company/migrations/0004_company_url.py
morelale/Inventory-G52
1
6623275
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-24 08:01 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('company', '0003_auto_20180423_1117'), ] operations = [ migrations.AddField...
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-24 08:01 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('company', '0003_auto_20180423_1117'), ] operations = [ migrations.AddField...
en
0.758063
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-24 08:01
1.47785
1
prob.py
elkd/deriv
4
6623276
import asyncio async def check_stop(session, start_balance, stake): ''' Check wether to continue playing or not The rule for this function is that it shouldn't be run often Only when the Balance is approaching the stop loss/profit, Then this function should be called more often ''' bl = a...
import asyncio async def check_stop(session, start_balance, stake): ''' Check wether to continue playing or not The rule for this function is that it shouldn't be run often Only when the Balance is approaching the stop loss/profit, Then this function should be called more often ''' bl = a...
en
0.96736
Check wether to continue playing or not The rule for this function is that it shouldn't be run often Only when the Balance is approaching the stop loss/profit, Then this function should be called more often
2.797022
3
distributed/mondrian/evaluation.py
stegianna/mondrian
10
6623277
<reponame>stegianna/mondrian<filename>distributed/mondrian/evaluation.py # Copyright 2020 <NAME> (https://seclab.unibg.it) # # 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....
# Copyright 2020 <NAME> (https://seclab.unibg.it) # # 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 ...
en
0.820295
# Copyright 2020 <NAME> (https://seclab.unibg.it) # # 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 ...
2.161448
2
src/clims/legacy/integration.py
withrocks/commonlims
0
6623278
<filename>src/clims/legacy/integration.py<gh_stars>0 from __future__ import absolute_import, print_function import os import shutil import logging import importlib import pkgutil from driverfile import DriverFileIntegrationTests from clims.legacy.extensions import NoTestsFoundException logger = logging.getLogger(__na...
<filename>src/clims/legacy/integration.py<gh_stars>0 from __future__ import absolute_import, print_function import os import shutil import logging import importlib import pkgutil from driverfile import DriverFileIntegrationTests from clims.legacy.extensions import NoTestsFoundException logger = logging.getLogger(__na...
en
0.893147
# Creates an integration test config file based on convention # i.e. position and contents of the script classes themselves. # NOTE: For some reason, the root does not get added to the enumerated modules # noqa: B314 # noqa: B314 Runs the tests on the frozen tests. The idea is that this should run (at least) on every o...
1.99053
2
lab2/T5/main.py
bronemos/design-patterns
0
6623279
from copy import deepcopy from typing import Callable import datetime class Izvor: def next(self): raise NotImplementedError def attach_observer(self): raise NotImplementedError def detach_observer(self): raise NotImplementedError def update(self): raise NotImplement...
from copy import deepcopy from typing import Callable import datetime class Izvor: def next(self): raise NotImplementedError def attach_observer(self): raise NotImplementedError def detach_observer(self): raise NotImplementedError def update(self): raise NotImplement...
none
1
2.869272
3
basecrm/test/test_contacts_service.py
seedinvest/basecrm-python
19
6623280
<gh_stars>10-100 import unittest import munch import basecrm from basecrm.test.testutils import BaseTestCase class ContactsServiceTests(BaseTestCase): def test_service_property_exists(self): self.assertTrue(hasattr(self.client, 'contacts')) def test_method_list_exists(self): self.assertTrue(...
import unittest import munch import basecrm from basecrm.test.testutils import BaseTestCase class ContactsServiceTests(BaseTestCase): def test_service_property_exists(self): self.assertTrue(hasattr(self.client, 'contacts')) def test_method_list_exists(self): self.assertTrue(hasattr(self.clie...
none
1
2.440259
2
Code/Data_Cleaning/pipelines.py
gilnribeiro/Work-Project
1
6623281
<reponame>gilnribeiro/Work-Project from pathlib import Path, PureWindowsPath import pandas as pd from data_cleaning_functions import * def main(): main_folder = PureWindowsPath("c:\\Users\\gilnr\\OneDrive - NOVASBE\\Work Project\\Code") MAIN_FOLDER = Path(main_folder) DATA_FOLDER = MAIN_FOLDER / "Data" ...
from pathlib import Path, PureWindowsPath import pandas as pd from data_cleaning_functions import * def main(): main_folder = PureWindowsPath("c:\\Users\\gilnr\\OneDrive - NOVASBE\\Work Project\\Code") MAIN_FOLDER = Path(main_folder) DATA_FOLDER = MAIN_FOLDER / "Data" bons_empregos = pd.read_json(DAT...
en
0.32675
# Bons Empregos # Get only job offers in Portugal # pipe(applyFuncToColumn, function=cleanJobTitle, columns_list=['job_title']). # Career Jet # convert job location to list # pipe(applyFuncToColumn, function=cleanJobTitle, columns_list=['job_title']). # Carga de Trabalhos # pipe(applyFuncToColumn, function=cleanJobTitl...
2.516128
3
src/normality_indexes.py
gmum/MoW
0
6623282
<reponame>gmum/MoW<gh_stars>0 import tensorflow as tf import numpy as np from rec_errors import euclidean_norm_squared # CWAE def silverman_rule_of_thumb(N: int): return tf.pow(4/(3*N), 0.4) def cw(X): D = tf.cast(tf.shape(X)[1], tf.float32) N = tf.cast(tf.shape(X)[0], tf.float32) y = silverman_rule...
import tensorflow as tf import numpy as np from rec_errors import euclidean_norm_squared # CWAE def silverman_rule_of_thumb(N: int): return tf.pow(4/(3*N), 0.4) def cw(X): D = tf.cast(tf.shape(X)[1], tf.float32) N = tf.cast(tf.shape(X)[0], tf.float32) y = silverman_rule_of_thumb(N) K = 1/(2*D-3...
en
0.5171
# CWAE # WAE-MMD # SWAE
2.008613
2
python/logger.py
bdastur/utils
1
6623283
<gh_stars>1-10 #!/usr/bin/env python # -*- coding: utf-8 -*- ''' Logging utility. ''' import logging import common from ConfigParser import SafeConfigParser class LoggerConfig(object): ''' Class to handle logger config. ''' def __init__(self, logconfig): ''' Initialize Logger config....
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Logging utility. ''' import logging import common from ConfigParser import SafeConfigParser class LoggerConfig(object): ''' Class to handle logger config. ''' def __init__(self, logconfig): ''' Initialize Logger config. ''' ...
en
0.754949
#!/usr/bin/env python # -*- coding: utf-8 -*- Logging utility. Class to handle logger config. Initialize Logger config. Logger class. Initialize logger class. # Format. Return the logger # --- begin "pretty" # # pretty - A miniature library that provides a Python print and stdout # wrapper that makes colored terminal t...
2.489188
2
manage_single.py
cponecp/iHone
1
6623284
<filename>manage_single.py # coding:utf-8 from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_session import Session from flask_wtf import CSRFProtect import redis # 创建flask的应用对象 app = Flask(__name__) class Config(object): """配置信息""" SECRET_KEY = "<KEY>" # 数据库 SQLALCHEMY_DA...
<filename>manage_single.py # coding:utf-8 from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_session import Session from flask_wtf import CSRFProtect import redis # 创建flask的应用对象 app = Flask(__name__) class Config(object): """配置信息""" SECRET_KEY = "<KEY>" # 数据库 SQLALCHEMY_DA...
zh
0.823182
# coding:utf-8 # 创建flask的应用对象 配置信息 # 数据库 # redis # flask-session配置 # 对cookie中session_id进行隐藏处理 # session数据的有效期,单位秒 # 创建redis连接对象 # 利用flask-session,将session数据保存到redis中 # 为flask补充csrf防护
2.339221
2
library/calelib/migrations/0033_auto_20180620_2346.py
IAmDrozdov/task-tracker
0
6623285
<gh_stars>0 # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-20 20:46 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('calelib', '0032_customer_shared_tasks'), ] operations = [ migr...
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-20 20:46 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('calelib', '0032_customer_shared_tasks'), ] operations = [ migrations.Remov...
en
0.639901
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-20 20:46
1.46278
1
core/pages/video_player_page.py
artembashlak/share-youtube-to-mail
0
6623286
<filename>core/pages/video_player_page.py<gh_stars>0 from selenium.webdriver.common.by import By from core.pages.base_page import BasePage SHARE_BUTTON = (By.CSS_SELECTOR, "#menu-container .size-default:nth-child(3)") COPY_BUTTON = (By.CSS_SELECTOR, "#copy-button #text") class VideoPlayerPage(BasePage): def cli...
<filename>core/pages/video_player_page.py<gh_stars>0 from selenium.webdriver.common.by import By from core.pages.base_page import BasePage SHARE_BUTTON = (By.CSS_SELECTOR, "#menu-container .size-default:nth-child(3)") COPY_BUTTON = (By.CSS_SELECTOR, "#copy-button #text") class VideoPlayerPage(BasePage): def cli...
none
1
2.153937
2
tests/unit/auto_ml/test_modelling.py
Amplo-GmbH/AutoML
5
6623287
<filename>tests/unit/auto_ml/test_modelling.py import pytest import pandas as pd from sklearn.datasets import make_classification from sklearn.datasets import make_regression from Amplo.AutoML import Modeller from tests import rmtree @pytest.fixture(scope='class', params=['classification', 'regression']) def make_m...
<filename>tests/unit/auto_ml/test_modelling.py import pytest import pandas as pd from sklearn.datasets import make_classification from sklearn.datasets import make_regression from Amplo.AutoML import Modeller from tests import rmtree @pytest.fixture(scope='class', params=['classification', 'regression']) def make_m...
none
1
2.549843
3
python/test-integration/helper.py
mbloch1986/swagger-aem
39
6623288
<gh_stars>10-100 import swaggeraem import swaggeraem.configuration def init_client(): swaggeraem.configuration.username = 'admin' swaggeraem.configuration.password = '<PASSWORD>' return swaggeraem.ApiClient('http://localhost:4502')
import swaggeraem import swaggeraem.configuration def init_client(): swaggeraem.configuration.username = 'admin' swaggeraem.configuration.password = '<PASSWORD>' return swaggeraem.ApiClient('http://localhost:4502')
none
1
1.886841
2
KillSmartDoor.py
AdamCaviness/SmartDoor
0
6623289
<gh_stars>0 import os import sys import signal import MonitorSmartDoor def kill(): """ Gracefully stops all SmartDoor processes. """ process_count = 0 if MonitorSmartDoor.is_running(False): processes = MonitorSmartDoor.get_processes() for line in processes.splitlines(): p...
import os import sys import signal import MonitorSmartDoor def kill(): """ Gracefully stops all SmartDoor processes. """ process_count = 0 if MonitorSmartDoor.is_running(False): processes = MonitorSmartDoor.get_processes() for line in processes.splitlines(): process_count...
en
0.931539
Gracefully stops all SmartDoor processes. # Being executed as a script
2.938209
3
botnet/modules/lib/network.py
admdev8/botnet-2
69
6623290
<filename>botnet/modules/lib/network.py """ Contains network related utilities which can be used by the modules, for example to query various online APIs. """ import requests # User agent used while performing requests (429 status codes can be encountered # when using the default user agent) _uagent = 'Mozil...
<filename>botnet/modules/lib/network.py """ Contains network related utilities which can be used by the modules, for example to query various online APIs. """ import requests # User agent used while performing requests (429 status codes can be encountered # when using the default user agent) _uagent = 'Mozil...
en
0.73816
Contains network related utilities which can be used by the modules, for example to query various online APIs. # User agent used while performing requests (429 status codes can be encountered # when using the default user agent) Performs a request. Thin wrapper over requests.request. method: request method, de...
2.862164
3
objetto/_data/set.py
brunonicko/objetto
8
6623291
<reponame>brunonicko/objetto # -*- coding: utf-8 -*- """Set data structures.""" from typing import TYPE_CHECKING, TypeVar, cast try: import collections.abc as collections_abc except ImportError: import collections as collections_abc # type: ignore from six import with_metaclass from .._bases import final f...
# -*- coding: utf-8 -*- """Set data structures.""" from typing import TYPE_CHECKING, TypeVar, cast try: import collections.abc as collections_abc except ImportError: import collections as collections_abc # type: ignore from six import with_metaclass from .._bases import final from .._states import BaseStat...
en
0.41193
# -*- coding: utf-8 -*- Set data structures. # type: ignore # Any type. Metaclass for :class:`objetto.data.SetData`. Inherits from: - :class:`objetto.bases.BaseAuxiliaryDataMeta` - :class:`objetto.bases.BaseSetStructureMeta` Features: - Defines a base auxiliary type. # type: () -> Type[SetDa...
2.14699
2
bianca/config.py
bumper-app/bumper-bianca
0
6623292
<reponame>bumper-app/bumper-bianca """ file: config.py author: <NAME> <<EMAIL>> date: November 2013 description: Reads the config.json info into a varible """ import json #from StringIO import StringIO import os config = json.load(open('./bianca/config.json')) # Defining default repository path if not specified if co...
""" file: config.py author: <NAME> <<EMAIL>> date: November 2013 description: Reads the config.json info into a varible """ import json #from StringIO import StringIO import os config = json.load(open('./bianca/config.json')) # Defining default repository path if not specified if config['repo_location']['location'] a...
en
0.465587
file: config.py author: <NAME> <<EMAIL>> date: November 2013 description: Reads the config.json info into a varible #from StringIO import StringIO # Defining default repository path if not specified
2.464709
2
backend/migrations/versions/dd72f4edfb71_.py
sartography/star-drive
0
6623293
<gh_stars>0 """empty message Revision ID: dd<PASSWORD> Revises: <PASSWORD> Create Date: 2021-02-18 15:25:07.218891 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'dd<PASSWORD>' down_revision = '<PASSWORD>' branch_labels = None depends_on = None def upgrade()...
"""empty message Revision ID: dd<PASSWORD> Revises: <PASSWORD> Create Date: 2021-02-18 15:25:07.218891 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'dd<PASSWORD>' down_revision = '<PASSWORD>' branch_labels = None depends_on = None def upgrade(): # ### ...
en
0.444597
empty message Revision ID: dd<PASSWORD> Revises: <PASSWORD> Create Date: 2021-02-18 15:25:07.218891 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic comma...
1.841061
2
src/utils.py
kodaim1115/test
4
6623294
import math import os import shutil import sys import time import torch import torch.distributions as dist import torch.nn.functional as F # Classes class Constants(object): eta = 1e-6 eps =1e-8 log2 = math.log(2) log2pi = math.log(2 * math.pi) logceilc = 88 # largest cuda v s.t. exp(v) < inf ...
import math import os import shutil import sys import time import torch import torch.distributions as dist import torch.nn.functional as F # Classes class Constants(object): eta = 1e-6 eps =1e-8 log2 = math.log(2) log2pi = math.log(2 * math.pi) logceilc = 88 # largest cuda v s.t. exp(v) < inf ...
en
0.646944
# Classes # largest cuda v s.t. exp(v) < inf # smallest cuda v s.t. exp(v) > 0 # https://stackoverflow.com/questions/14906764/how-to-redirect-stdout-to-both-file-and-console-with-scripting # this flush method is needed for python 3 compatibility. # this handles the flush command by doing nothing. # you might want to sp...
2.526357
3
tof/tests/tests.py
pilikp/django-tof
22
6623295
<reponame>pilikp/django-tof # -*- coding: utf-8 -*- # @Author: MaxST # @Date: 2019-11-15 19:17:59 # @Last Modified by: MaxST # @Last Modified time: 2019-12-15 14:23:41 from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.admin.options import IS_POPUP_VAR from django....
# -*- coding: utf-8 -*- # @Author: MaxST # @Date: 2019-11-15 19:17:59 # @Last Modified by: MaxST # @Last Modified time: 2019-12-15 14:23:41 from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.admin.options import IS_POPUP_VAR from django.contrib.admin.sites import A...
en
0.544509
# -*- coding: utf-8 -*- # @Author: MaxST # @Date: 2019-11-15 19:17:59 # @Last Modified by: MaxST # @Last Modified time: 2019-12-15 14:23:41 # TranslatableFieldAdmin # WTF? # TranslationAdmin #
1.746256
2
Introducao-Python/ex055.py
reglabel/Estudos
0
6623296
<gh_stars>0 peso_maior = 0.0 peso_menor = 99999.0 for i in range(1, 6): peso = float(input("Qual é o seu peso (em kg)? ")) if peso > peso_maior: peso_maior = peso if peso < peso_menor: peso_menor = peso print(f"O maior peso foi {peso_maior}kg e o menor foi {peso_menor}kg.")
peso_maior = 0.0 peso_menor = 99999.0 for i in range(1, 6): peso = float(input("Qual é o seu peso (em kg)? ")) if peso > peso_maior: peso_maior = peso if peso < peso_menor: peso_menor = peso print(f"O maior peso foi {peso_maior}kg e o menor foi {peso_menor}kg.")
none
1
3.662879
4
Damerau–Levenshtein_distance__misprints__опечатки/use__pyxdameraulevenshtein/match_two_words.py
gil9red/SimplePyScripts
117
6623297
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' # pip install pyxDamerauLevenshtein # SOURCE: https://github.com/gfairchild/pyxDamerauLevenshtein def match_two_words(word_1, word_2): from pyxdameraulevenshtein import damerau_levenshtein_distance number = damerau_levenshtein_distance(...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' # pip install pyxDamerauLevenshtein # SOURCE: https://github.com/gfairchild/pyxDamerauLevenshtein def match_two_words(word_1, word_2): from pyxdameraulevenshtein import damerau_levenshtein_distance number = damerau_levenshtein_distance(...
ru
0.537976
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # pip install pyxDamerauLevenshtein # SOURCE: https://github.com/gfairchild/pyxDamerauLevenshtein # Считаем что разница в 2 символа и меньше еще нормальная # True # True # True # True # True # False
3.152475
3
negative_cache/util.py
ParikhKadam/google-research
2
6623298
<reponame>ParikhKadam/google-research # coding=utf-8 # Copyright 2021 The Google Research 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/LICEN...
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
en
0.852787
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
2.817252
3
20180728/Excel_01.py
bijitchakraborty12/MyProjects01
0
6623299
# this is how we write to a file import csv fields=['Name','Branch','Year','CGPA'] rows=[['Nikhil','COE','2','9.0'],['Aditya','IT','2','9.3']] filename='University_Records.csv' with open(filename,'w+', newline='')as fn: csvWriter=csv.writer(fn) csvWriter.writerow(fields) csvWriter.writerows(rows)
# this is how we write to a file import csv fields=['Name','Branch','Year','CGPA'] rows=[['Nikhil','COE','2','9.0'],['Aditya','IT','2','9.3']] filename='University_Records.csv' with open(filename,'w+', newline='')as fn: csvWriter=csv.writer(fn) csvWriter.writerow(fields) csvWriter.writerows(rows)
en
0.979443
# this is how we write to a file
3.647976
4
dae/dae/variant_annotation/tests/conftest.py
iossifovlab/gpf
0
6623300
import pytest from .mocks import ExonMock from .mocks import ReferenceGenomeMock from .mocks import AnnotatorMock @pytest.fixture(scope="session") def annotator(): return AnnotatorMock(ReferenceGenomeMock()) @pytest.fixture(scope="session") def exons(): return [ExonMock(60, 70, 0), ExonMock(80, 90, 1), Exo...
import pytest from .mocks import ExonMock from .mocks import ReferenceGenomeMock from .mocks import AnnotatorMock @pytest.fixture(scope="session") def annotator(): return AnnotatorMock(ReferenceGenomeMock()) @pytest.fixture(scope="session") def exons(): return [ExonMock(60, 70, 0), ExonMock(80, 90, 1), Exo...
none
1
2.232456
2
src/app.py
abhinavarora/BotServer
0
6623301
<filename>src/app.py import tornado.ioloop import tornado.web from tornado.web import RequestHandler import tornado.httpserver import os class MainHandler(RequestHandler): def get(self): self.write("Hello, World") class WebHookHandler(RequestHandler): def get(self): print "Chor" + str(self.g...
<filename>src/app.py import tornado.ioloop import tornado.web from tornado.web import RequestHandler import tornado.httpserver import os class MainHandler(RequestHandler): def get(self): self.write("Hello, World") class WebHookHandler(RequestHandler): def get(self): print "Chor" + str(self.g...
en
0.485869
http_server = tornado.httpserver.HTTPServer(app, ssl_options={ "certfile": "/etc/ssl/certs/apache-selfsigned.crt", "keyfile": "/etc/ssl/private/apache-selfsigned.key" }) http_server.listen(443) #app.listen(8888)
2.583603
3
python/src/hackerrank/2020/nested_logic_book_fines.py
ccampo133/coding-challenges
0
6623302
<reponame>ccampo133/coding-challenges # https://www.hackerrank.com/challenges/30-nested-logic/problem # Can use the date class for this, but it somewhat defeats the spirit of the problem. def calc_fine(d_ex: int, m_ex: int, y_ex: int, d_act: int, m_act: int, y_act: int) -> int: if y_act < y_ex: return 0 ...
# https://www.hackerrank.com/challenges/30-nested-logic/problem # Can use the date class for this, but it somewhat defeats the spirit of the problem. def calc_fine(d_ex: int, m_ex: int, y_ex: int, d_act: int, m_act: int, y_act: int) -> int: if y_act < y_ex: return 0 if y_act == y_ex: if m_act...
en
0.878845
# https://www.hackerrank.com/challenges/30-nested-logic/problem # Can use the date class for this, but it somewhat defeats the spirit of the problem. # d_act, m_act, y_act = 9, 6, 2015 # d_ex, m_ex, y_ex = 6, 6, 2015
3.213183
3
tinystomp_test.py
dw/tinystomp
2
6623303
# The MIT License (MIT) # # Copyright (c) 2016, <NAME> # # 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,...
# The MIT License (MIT) # # Copyright (c) 2016, <NAME> # # 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,...
en
0.781436
# The MIT License (MIT) # # Copyright (c) 2016, <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, m...
2.190526
2
procedural_world/perlin_noise_wrapper/perlin_noise_wrapper.py
mikhaildruzhinin/procedural-world
0
6623304
<gh_stars>0 from perlin_noise import PerlinNoise from procedural_world.config import ( PERLIN_NOISE_AMPLITUDE, PERLIN_NOISE_FREQUENCY, PERLIN_NOISE_OCTAVES, PERLIN_NOISE_SEED, ) class PerlinNoiseWrapper: def __init__(self): self.perlin_noise = PerlinNoise( octaves=PERLIN_NOISE...
from perlin_noise import PerlinNoise from procedural_world.config import ( PERLIN_NOISE_AMPLITUDE, PERLIN_NOISE_FREQUENCY, PERLIN_NOISE_OCTAVES, PERLIN_NOISE_SEED, ) class PerlinNoiseWrapper: def __init__(self): self.perlin_noise = PerlinNoise( octaves=PERLIN_NOISE_OCTAVES, ...
none
1
2.640416
3
2017/Q1.py
s-cork/BIO
0
6623305
<filename>2017/Q1.py<gh_stars>0 def decide_letter(pair): '''expects a pair of letters and decides which letter will go below the pair''' if len(set(pair)) == 1: return next(let for let in 'RGB' if let in pair) else: return next(let for let in 'RGB' if let not in pair) def Triangle(row): ...
<filename>2017/Q1.py<gh_stars>0 def decide_letter(pair): '''expects a pair of letters and decides which letter will go below the pair''' if len(set(pair)) == 1: return next(let for let in 'RGB' if let in pair) else: return next(let for let in 'RGB' if let not in pair) def Triangle(row): ...
en
0.853329
expects a pair of letters and decides which letter will go below the pair expects a str of length less than 10 consisting of uppercase Rs Gs and Bs returns the final line of the triangle
3.892538
4
migrations/postgres_versions/2021-03-01_0f8d24a830d0_rename_new_value_to_previous_value.py
debrief/pepys-import
4
6623306
"""Rename new_value to previous_value Revision ID: 0f8d24a830d0 Revises: <PASSWORD> Create Date: 2021-03-01 10:09:44.140941+00:00 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "0f8d24a830d0" down_revision = "80bc8b0d199b" branch_labels = None depends_on = None...
"""Rename new_value to previous_value Revision ID: 0f8d24a830d0 Revises: <PASSWORD> Create Date: 2021-03-01 10:09:44.140941+00:00 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "0f8d24a830d0" down_revision = "80bc8b0d199b" branch_labels = None depends_on = None...
en
0.523408
Rename new_value to previous_value Revision ID: 0f8d24a830d0 Revises: <PASSWORD> Create Date: 2021-03-01 10:09:44.140941+00:00 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ...
1.838952
2
migrations/versions/4cdcf068ef59_additional_indexing.py
hamhands/pittsburgh-purchasing-suite
22
6623307
"""additional indexing Revision ID: 4cdcf068ef59 Revises: 54373a7de<PASSWORD> Create Date: 2015-10-22 19:58:41.145656 """ # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '54373a<PASSWORD>' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by ...
"""additional indexing Revision ID: 4cdcf068ef59 Revises: 54373a7de<PASSWORD> Create Date: 2015-10-22 19:58:41.145656 """ # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '54373a<PASSWORD>' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by ...
en
0.552192
additional indexing Revision ID: 4cdcf068ef59 Revises: 54373a7de<PASSWORD> Create Date: 2015-10-22 19:58:41.145656 # revision identifiers, used by Alembic. ### commands auto generated by Alembic - please adjust! ### ### end Alembic commands ### ### commands auto generated by Alembic - please adjust! ### ### end Alembi...
1.171599
1
nistchempy/__init__.py
EPiCs-group/NistChemPy
0
6623308
# imports from .nistchempy import __version__, \ get_all_data, Compound, Spectrum, \ print_search_parameters, \ SearchParameters, Search # module functions __all__ = [ '__version__', 'get_all_data', 'Compound', 'Spectrum' 'print_se...
# imports from .nistchempy import __version__, \ get_all_data, Compound, Spectrum, \ print_search_parameters, \ SearchParameters, Search # module functions __all__ = [ '__version__', 'get_all_data', 'Compound', 'Spectrum' 'print_se...
en
0.123245
# imports # module functions
0.994247
1
userbot/modules/flicks.py
BeroyStwn/Flicks-Userbot
0
6623309
from time import sleep from userbot import ALIVE_NAME, CMD_HELP, WEATHER_DEFCITY from userbot import CMD_HANDLER as cmd from userbot.utils import flicks_cmd @flicks_cmd(pattern="intro") async def typewriter(typew): typew.pattern_match.group(1) await typew.edit(f"**Hai Perkenalkan Namaku {ALIVE_NAME}**") s...
from time import sleep from userbot import ALIVE_NAME, CMD_HELP, WEATHER_DEFCITY from userbot import CMD_HANDLER as cmd from userbot.utils import flicks_cmd @flicks_cmd(pattern="intro") async def typewriter(typew): typew.pattern_match.group(1) await typew.edit(f"**Hai Perkenalkan Namaku {ALIVE_NAME}**") s...
en
0.892973
# Create by myself @localheart # Create by myself @localheart # Create by myself @localheart # Create by myself @localheart
2.669872
3
setup.py
hallazzang/pknulms-py
0
6623310
<filename>setup.py import os from setuptools import setup def get_content(path): path = os.path.join(os.path.dirname(os.path.abspath(__file__)), path) with open(path) as f: return f.read() setup( name='pknulms', version='1.0.2', url='https://github.com/hallazzang/pknulms-py', license...
<filename>setup.py import os from setuptools import setup def get_content(path): path = os.path.join(os.path.dirname(os.path.abspath(__file__)), path) with open(path) as f: return f.read() setup( name='pknulms', version='1.0.2', url='https://github.com/hallazzang/pknulms-py', license...
none
1
1.670179
2
src/day10.py
Trattpingvin/advent-of-code-2018
0
6623311
import numpy as np def update_positions(v, steps = 1): v[:,0:2] += steps*v[:,2:4] def solve(vectors): """message should be readable when data is mostly aligned on y-axis. let's find the rate of change of alignment, and print the message when alignment is at its minimum (looks like 8 or 9 from problem description)...
import numpy as np def update_positions(v, steps = 1): v[:,0:2] += steps*v[:,2:4] def solve(vectors): """message should be readable when data is mostly aligned on y-axis. let's find the rate of change of alignment, and print the message when alignment is at its minimum (looks like 8 or 9 from problem description)...
en
0.921585
message should be readable when data is mostly aligned on y-axis. let's find the rate of change of alignment, and print the message when alignment is at its minimum (looks like 8 or 9 from problem description)
3.37214
3
webapp/decorators.py
NighttWatch/hetes
0
6623312
<filename>webapp/decorators.py from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.decorators import user_passes_test def partner_required(function=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url='loginApp'): ''' Decorator for views that checks that the logged in user is a pa...
<filename>webapp/decorators.py from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.decorators import user_passes_test def partner_required(function=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url='loginApp'): ''' Decorator for views that checks that the logged in user is a pa...
en
0.919173
Decorator for views that checks that the logged in user is a partner, redirects to the log-in page if necessary. Decorator for views that checks that the logged in user is a employee, redirects to the log-in page if necessary. Decorator for views that checks that the logged in user is a executive, redirects...
2.607162
3
21922/solution.py
bossm0n5t3r/BOJ
2
6623313
import sys def sol(): # sys.stdin = open("./21922/input.txt") input = sys.stdin.readline N, M = map(int, input().split()) visited = [[False] * M for _ in range(N)] air_conditioners = {} lab = [] for r in range(N): tmp = list(map(int, input().split())) lab.append(tmp) ...
import sys def sol(): # sys.stdin = open("./21922/input.txt") input = sys.stdin.readline N, M = map(int, input().split()) visited = [[False] * M for _ in range(N)] air_conditioners = {} lab = [] for r in range(N): tmp = list(map(int, input().split())) lab.append(tmp) ...
en
0.293173
# sys.stdin = open("./21922/input.txt")
2.817881
3
pfxbrick/scripts/pfxrestart.py
aholzel/pfx-brick-py
0
6623314
#! /usr/bin/env python3 """ pfxrestart - restarts the PFx Brick """ import argparse from pfxbrick import * def main(): parser = argparse.ArgumentParser( description="Restarts the PFx Brick", prefix_chars="-+", ) parser.add_argument( "-s", "--serialno", default=None...
#! /usr/bin/env python3 """ pfxrestart - restarts the PFx Brick """ import argparse from pfxbrick import * def main(): parser = argparse.ArgumentParser( description="Restarts the PFx Brick", prefix_chars="-+", ) parser.add_argument( "-s", "--serialno", default=None...
en
0.211881
#! /usr/bin/env python3 pfxrestart - restarts the PFx Brick
2.956023
3
placement/migrations/0003_auto_20201006_2339.py
SauravDharwadkar/erp_project
2
6623315
<gh_stars>1-10 # Generated by Django 3.0 on 2020-10-06 18:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('placement', '0002_auto_20201006_2251'), ] operations = [ migrations.AlterField( model_name='student', n...
# Generated by Django 3.0 on 2020-10-06 18:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('placement', '0002_auto_20201006_2251'), ] operations = [ migrations.AlterField( model_name='student', name='department...
en
0.848883
# Generated by Django 3.0 on 2020-10-06 18:09
1.893116
2
jiraannouncer/views/client.py
FuelRats/JIRAAnnouncer
0
6623316
import hmac import requests from pyramid.view import view_config from sys import hexversion from ..utils import send, devsay import logging log = logging.getLogger(__name__) @view_config(route_name='client', renderer="json") def client(request): """Handle Client arrival announcements.""" referer = request....
import hmac import requests from pyramid.view import view_config from sys import hexversion from ..utils import send, devsay import logging log = logging.getLogger(__name__) @view_config(route_name='client', renderer="json") def client(request): """Handle Client arrival announcements.""" referer = request....
en
0.834307
Handle Client arrival announcements. # Shit gonna get wild! # Client is using an iPhone/iPad that does not forward referrer.
2.247527
2
tweetbots/clevergirl_bot.py
plaidfluff/fluff_ebooks
0
6623317
<gh_stars>0 from twython import TwythonStreamer, Twython, TwythonError import logging import random import datetime import Queue import time import thread from collections import namedtuple QueueItem = namedtuple("QueueItem", "when text reply_id") class CleverGirlBot(TwythonStreamer): def __init__(self, site_con...
from twython import TwythonStreamer, Twython, TwythonError import logging import random import datetime import Queue import time import thread from collections import namedtuple QueueItem = namedtuple("QueueItem", "when text reply_id") class CleverGirlBot(TwythonStreamer): def __init__(self, site_config, bot_con...
en
0.510674
# self.post_queue.put(tweet)
2.510884
3
httputility.py
yuqian5/CMPUT404-assignment-web-client
0
6623318
from urllib.parse import quote_plus def parse_response(resp): header, body = resp.split("\r\n\r\n") parts = header.split("\r\n") result = {} # get code code = get_response_code(parts[0]) result["code"] = int(code[0]) result["code message"] = code[1] parts.pop(0) # get body r...
from urllib.parse import quote_plus def parse_response(resp): header, body = resp.split("\r\n\r\n") parts = header.split("\r\n") result = {} # get code code = get_response_code(parts[0]) result["code"] = int(code[0]) result["code message"] = code[1] parts.pop(0) # get body r...
en
0.576717
# get code # get body # parse the rest of the headers
3.0877
3
scripts/download_and_setup.py
frazer-lab/cardips-data-software
0
6623319
# This script downloads and installs necessary software and annotations. At some # points the script may stop and ask for user input, and you may have to stop # the script and restart at some points (this weirdness is due to the fun of # trying to compile and install software automatically). import os import cdpybio ...
# This script downloads and installs necessary software and annotations. At some # points the script may stop and ask for user input, and you may have to stop # the script and restart at some points (this weirdness is due to the fun of # trying to compile and install software automatically). import os import cdpybio ...
en
0.784562
# This script downloads and installs necessary software and annotations. At some # points the script may stop and ask for user input, and you may have to stop # the script and restart at some points (this weirdness is due to the fun of # trying to compile and install software automatically). # try: # import rpy2 # ...
2.110546
2
autoflow/scripts/cli/jump.py
sh-biswas/autoflow
7
6623320
import os import click import subprocess from sys import platform from autoflow.scripts.mactab import openTab from autoflow.env import projectsDir, slash @click.command() @click.argument('dir',type=click.STRING) def jump(dir): """ Jumps to your specified project directory DIR is the name of the project di...
import os import click import subprocess from sys import platform from autoflow.scripts.mactab import openTab from autoflow.env import projectsDir, slash @click.command() @click.argument('dir',type=click.STRING) def jump(dir): """ Jumps to your specified project directory DIR is the name of the project di...
en
0.69013
Jumps to your specified project directory DIR is the name of the project directory
2.739815
3
blog/admin.py
mamad-azimi-jozani/charity_django_blog
0
6623321
from django_summernote.admin import SummernoteModelAdmin from django.contrib import admin from .models import Post, Category # Register your models here. @admin.register(Post) class AdminPost(SummernoteModelAdmin): date_hierarchy = "published_date" # exclude = ['title', 'content'] list_display = ['title', '...
from django_summernote.admin import SummernoteModelAdmin from django.contrib import admin from .models import Post, Category # Register your models here. @admin.register(Post) class AdminPost(SummernoteModelAdmin): date_hierarchy = "published_date" # exclude = ['title', 'content'] list_display = ['title', '...
en
0.626947
# Register your models here. # exclude = ['title', 'content']
1.594372
2
a.py
anishmax/python_basics
0
6623322
<filename>a.py print("hello 1") print("hello 2")
<filename>a.py print("hello 1") print("hello 2")
none
1
1.461247
1
Chapter07/Unit Tests/testExercise7_02.py
nijinjose/The-Supervised-Learning-Workshop
19
6623323
<reponame>nijinjose/The-Supervised-Learning-Workshop<gh_stars>10-100 import unittest import pandas as pd import pickle from sklearn.metrics import (accuracy_score, confusion_matrix, precision_score, recall_score, f1_score) import os class TestingActivity7_02(unittest.TestCase): def se...
import unittest import pandas as pd import pickle from sklearn.metrics import (accuracy_score, confusion_matrix, precision_score, recall_score, f1_score) import os class TestingActivity7_02(unittest.TestCase): def setUp(self) -> None: ROOT_DIR = os.path.dirname(os.path.abspath...
none
1
2.720695
3
int_compute/int_compute.py
IratePirates/AoC2019
0
6623324
from copy import deepcopy def load_input(filename): input = [] with open(filename, 'r') as f: for l in f.readlines(): for tok in l.split(','): input.append(int(tok)) return input class int_computer(object): def __init__(self, input_inst, input_values=None, tag=""): self._prog = deepc...
from copy import deepcopy def load_input(filename): input = [] with open(filename, 'r') as f: for l in f.readlines(): for tok in l.split(','): input.append(int(tok)) return input class int_computer(object): def __init__(self, input_inst, input_values=None, tag=""): self._prog = deepc...
en
0.464086
# print("Computer {} - Is Stalled? {}".format(self.tag, self.stalled), # " Is Running? {}". format(self.running)) # end # load # _output # adjust the relative base # Jump-if-true # Jump-if-false # Add # Mult # less than # less than
3.335441
3
tests/test_tests.py
sii/siptrackd
0
6623325
<reponame>sii/siptrackd<filename>tests/test_tests.py from utils import BasicTestCase def raise_exception(a): raise Exception(a) class TestTests(BasicTestCase): def testAssert(self): self.assert_(1 in [1, 2, 3]) def testAssertEqual(self): self.assertEqual(True, True) def testAssertRa...
from utils import BasicTestCase def raise_exception(a): raise Exception(a) class TestTests(BasicTestCase): def testAssert(self): self.assert_(1 in [1, 2, 3]) def testAssertEqual(self): self.assertEqual(True, True) def testAssertRaises(self): self.assertRaises(Exception, rais...
none
1
2.948635
3
src/a_detect_pictogram/course_detect_pictogram.py
wenksi/pren-robo-cube-ipcv
0
6623326
<reponame>wenksi/pren-robo-cube-ipcv #!/bin/python3 import cv2 import pyttsx3 import logging import time from src.common.camera.camera import Camera path_to_cascades = "resources/cascades/pictogram/" paths = ['hammer.xml', 'sandwich.xml', 'rule.xml', 'paint.xml', 'pencil.xml'] # PATH OF THE CASCADE objectNames = ['ha...
#!/bin/python3 import cv2 import pyttsx3 import logging import time from src.common.camera.camera import Camera path_to_cascades = "resources/cascades/pictogram/" paths = ['hammer.xml', 'sandwich.xml', 'rule.xml', 'paint.xml', 'pencil.xml'] # PATH OF THE CASCADE objectNames = ['hammer', 'sandwich', 'rule', 'paint', '...
en
0.742054
#!/bin/python3 # PATH OF THE CASCADE # OBJECT NAMES TO DISPLAY # how many objects to count for recognition Class loads cascade files, analyzes the video stream and detects pictograms in front of the camera. # self.vs = cv2.VideoCapture(0) # self.vs.set(3, 640) # self.vs.set(4, 480) # LOAD THE CLASSIFIERS Used to detect...
2.816544
3
nlreg1d/plot.py
0todd0000/nlreg1d
1
6623327
<reponame>0todd0000/nlreg1d import numpy as np from matplotlib import pyplot as plt from matplotlib import patches import spm1d def axes2data(ax, points): ax.get_xlim() ax.get_ylim() t = ax.transAxes + ax.transData.inverted() return t.transform( points ) def data2axes(ax, points): ax.get_xlim() ax.get_yli...
import numpy as np from matplotlib import pyplot as plt from matplotlib import patches import spm1d def axes2data(ax, points): ax.get_xlim() ax.get_ylim() t = ax.transAxes + ax.transData.inverted() return t.transform( points ) def data2axes(ax, points): ax.get_xlim() ax.get_ylim() t = (ax.transAxes + ax.tran...
en
0.368282
# stats: # nperm0 = -1 if (permutations > t.nPermUnique) else permutations # nperm1 = -1 if (permutations > T2.nPermUnique) else permutations # nperm2 = -1 if (permutations > tr.nPermUnique) else permutations # nperm3 = -1 if (permutations > tw.nPermUnique) else permutations # create figure and axes...
2.55069
3
odoo-13.0/addons/mass_mailing_crm/models/mailing_mailing.py
VaibhavBhujade/Blockchain-ERP-interoperability
0
6623328
<reponame>VaibhavBhujade/Blockchain-ERP-interoperability # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models from odoo.osv import expression class MassMailing(models.Model): _name = 'mailing.mailing' _inherit = 'mailing.mail...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models from odoo.osv import expression class MassMailing(models.Model): _name = 'mailing.mailing' _inherit = 'mailing.mailing' crm_lead_activated = fields.Boolean('Use Leads'...
en
0.875733
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. We want all records that match the UTMs
1.939246
2
venv/lib/python3.9/site-packages/Geometry/constants.py
atharva21-stack/Python-Projects
0
6623329
''' ''' from sys import float_info epsilon = float_info.epsilon pi_half = 1.5707963267948966 two_pi = 6.283185307179586 del(float_info)
''' ''' from sys import float_info epsilon = float_info.epsilon pi_half = 1.5707963267948966 two_pi = 6.283185307179586 del(float_info)
none
1
1.807311
2
custom_components/youless/__init__.py
elsingaa/Home-Assistant-Config
1
6623330
<filename>custom_components/youless/__init__.py """Youless component."""
<filename>custom_components/youless/__init__.py """Youless component."""
en
0.486988
Youless component.
1.151303
1
examples/AR_model.py
liusf15/blackbox_selectinf
0
6623331
import torch import numpy as np from scipy.stats import f from scipy.stats import norm from blackbox_selectinf.usecase.AR_model import AR_model from importlib import reload import blackbox_selectinf.usecase.AR_model reload(blackbox_selectinf.usecase.AR_model) from blackbox_selectinf.learning.learning import (learn_sele...
import torch import numpy as np from scipy.stats import f from scipy.stats import norm from blackbox_selectinf.usecase.AR_model import AR_model from importlib import reload import blackbox_selectinf.usecase.AR_model reload(blackbox_selectinf.usecase.AR_model) from blackbox_selectinf.learning.learning import (learn_sele...
en
0.429811
# generate data # generate training data # generate more data # logs['pvalue_naive'] = pvalue_naive
1.871483
2
matrix/mm-data/fix-literals/gen.py
rebryant/Cloud-BDD
2
6623332
<reponame>rebryant/Cloud-BDD #!/usr/bin/python import subprocess program = "../../mm_generate.py" time = 7200 lcount = 336 lname = 'smirnov-family.lit' def fname(suffix, blevel): return "run-fix%d-b%d-%s.cmd" % (lcount, blevel, suffix) def cmd(singleton = True, blevel = 2): suffix = 'se' if singleton else ...
#!/usr/bin/python import subprocess program = "../../mm_generate.py" time = 7200 lcount = 336 lname = 'smirnov-family.lit' def fname(suffix, blevel): return "run-fix%d-b%d-%s.cmd" % (lcount, blevel, suffix) def cmd(singleton = True, blevel = 2): suffix = 'se' if singleton else 'nse' brange = '6' if ble...
ru
0.258958
#!/usr/bin/python
2.218639
2
ble-gatt-service/configure_ble.py
noelmcloughlin/iot-ble-gatt-server
2
6623333
#!/usr/bin/env python ################################## ## Install or Restart BLE ################################## import os, sys, shutil, getopt from subprocess import Popen, PIPE, call sys.path.append('../lib') import osutils as utils def device_libs(): call(['sudo', 'usermod', '-G', 'staff', 'pi']) uti...
#!/usr/bin/env python ################################## ## Install or Restart BLE ################################## import os, sys, shutil, getopt from subprocess import Popen, PIPE, call sys.path.append('../lib') import osutils as utils def device_libs(): call(['sudo', 'usermod', '-G', 'staff', 'pi']) uti...
de
0.38349
#!/usr/bin/env python ################################## ## Install or Restart BLE ################################## #call(['sudo', 'systemctl', 'restart', 'ble-led-gatt'])
2.155553
2
orion/core/operators/country_details_task.py
orion-search/orion-backend
19
6623334
<reponame>orion-search/orion-backend """ HomogeniseCountryNamesOperator: Homogenises country names from Google Places API and the World Bank. It uses a country mapping dictionary from `model_config.yaml`. CountryDetailsOperator: Fetches additional country details from the restcountries API. This includes things such ...
""" HomogeniseCountryNamesOperator: Homogenises country names from Google Places API and the World Bank. It uses a country mapping dictionary from `model_config.yaml`. CountryDetailsOperator: Fetches additional country details from the restcountries API. This includes things such as population, capital, region (conti...
en
0.734125
HomogeniseCountryNamesOperator: Homogenises country names from Google Places API and the World Bank. It uses a country mapping dictionary from `model_config.yaml`. CountryDetailsOperator: Fetches additional country details from the restcountries API. This includes things such as population, capital, region (continent...
2.586119
3
adb.py
yaoshiu/Ash-s-Arknights-Helper
0
6623335
<filename>adb.py import os import random __adb = os.path.abspath('platform-tools/adb.exe') __arknights = 'com.hypergryph.arknights/com.u8.sdk.U8UnityContext' __max0035, __max0036 = 0, 0 def devices() -> list[str]: """Returns a list of attached devices' serial numbers.""" connected = os.popen(__adb + ' devic...
<filename>adb.py import os import random __adb = os.path.abspath('platform-tools/adb.exe') __arknights = 'com.hypergryph.arknights/com.u8.sdk.U8UnityContext' __max0035, __max0036 = 0, 0 def devices() -> list[str]: """Returns a list of attached devices' serial numbers.""" connected = os.popen(__adb + ' devic...
en
0.744448
Returns a list of attached devices' serial numbers. Connect to a device. Args: * `method`: The method to connect. Avaliable method: * `-d`: Connect to the only device attached by USB. * `-e`: Connect to the only emulator. * `-s`: Connect to a specified device...
2.95377
3
Python/problem0222.py
1050669722/LeetCode-Answers
0
6623336
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def countNodes(self, root: TreeNode) -> int: def preorderTraversal(root): if not root: return [] ...
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def countNodes(self, root: TreeNode) -> int: def preorderTraversal(root): if not root: return [] ...
en
0.60307
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None
3.723857
4
convertcrypt/blueprints/restapi/__init__.py
alexandermarquesm/ConvertCrypt
0
6623337
from flask import Blueprint from flask_restful import Api from .resources import PricePairResource, ValidTokens bp = Blueprint('restapi', __name__, url_prefix="/api/v1") api = Api(bp) def init_app(app): api.add_resource(PricePairResource, '/<string:pair>/<int:amount>') api.add_resource(ValidTokens, '/token/...
from flask import Blueprint from flask_restful import Api from .resources import PricePairResource, ValidTokens bp = Blueprint('restapi', __name__, url_prefix="/api/v1") api = Api(bp) def init_app(app): api.add_resource(PricePairResource, '/<string:pair>/<int:amount>') api.add_resource(ValidTokens, '/token/...
none
1
2.50955
3
deprecated_code/workflows/mpi/test_op.py
ska-telescope/algorithm-reference-library
22
6623338
#!/usr/bin/env python from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD def fn_sum(buffer_a, buffer_b, t): tc = MPI._typecode(t) # map MPI datatype -> Python typecode array_a = np.frombuffer(buffer_a, dtype=tc) array_b = np.frombuffer(buffer_b, dtype=tc) array_b += array_a op_sum = MPI....
#!/usr/bin/env python from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD def fn_sum(buffer_a, buffer_b, t): tc = MPI._typecode(t) # map MPI datatype -> Python typecode array_a = np.frombuffer(buffer_a, dtype=tc) array_b = np.frombuffer(buffer_b, dtype=tc) array_b += array_a op_sum = MPI....
en
0.08775
#!/usr/bin/env python # map MPI datatype -> Python typecode #comm.Allreduce(data, result, op=op_sum)
2.442036
2
QssTools.py
x568059888/Gomoku
0
6623339
<filename>QssTools.py<gh_stars>0 def SetQss(file_path, obj): with open(file_path, 'r') as f: obj.setStyleSheet(f.read())
<filename>QssTools.py<gh_stars>0 def SetQss(file_path, obj): with open(file_path, 'r') as f: obj.setStyleSheet(f.read())
none
1
1.9872
2
python_basics/datatypes/escape_sequence.py
danielkpodo/python-zero-to-mastery
0
6623340
# escaping double strings greeting = "Hello what\"s is your name" print(greeting) # using newline ask = "How do you see yourself in ten years \n Mr narh what\"s your response" print(ask) # using tabs as a way to format strings question = "\t Who is your shepherd" print(question)
# escaping double strings greeting = "Hello what\"s is your name" print(greeting) # using newline ask = "How do you see yourself in ten years \n Mr narh what\"s your response" print(ask) # using tabs as a way to format strings question = "\t Who is your shepherd" print(question)
en
0.635422
# escaping double strings # using newline # using tabs as a way to format strings
3.744435
4
agape/load.py
harryscholes/agape
0
6623341
"""Classes and functions to load data. """ import os import pandas as pd from .base import Base __all__ = ["Genes", "Biogrid", "STRING"] data = os.environ["AGAPEDATA"] class Genes(Base): """Load S. pombe gene IDs. """ def __init__(self): super().__init__() df = pd.read_csv(os.path.join(...
"""Classes and functions to load data. """ import os import pandas as pd from .base import Base __all__ = ["Genes", "Biogrid", "STRING"] data = os.environ["AGAPEDATA"] class Genes(Base): """Load S. pombe gene IDs. """ def __init__(self): super().__init__() df = pd.read_csv(os.path.join(...
en
0.592225
Classes and functions to load data. Load S. pombe gene IDs. Get genes annotated with a viability phenotype. # Arguments phenotype: str (optional), {viable, inviable, condition-dependent} Load S. pombe BioGRID database. Call the class instance to filter the loaded interactions. # Arguments ...
3.20889
3
tests/layers.py
YusukeSuzuki/castanea2
0
6623342
import unittest import tensorflow as tf import castanea2.layers as layers class TestLayers(unittest.TestCase): def test_conv2d(self): x = tf.placeholder(tf.float32, shape=(32, 128, 128, 3)) y = layers.conv2d(x, 3, 32) def test_equalized_conv2d(self): x = tf.placeholder(tf.float32, shap...
import unittest import tensorflow as tf import castanea2.layers as layers class TestLayers(unittest.TestCase): def test_conv2d(self): x = tf.placeholder(tf.float32, shape=(32, 128, 128, 3)) y = layers.conv2d(x, 3, 32) def test_equalized_conv2d(self): x = tf.placeholder(tf.float32, shap...
none
1
2.747015
3
telegram/plugins/msg.py
AntonioND/led-bot
0
6623343
#!/usr/bin/env python3.7 # SPDX-License-Identifier: MIT # # Copyright (c) 2020, <NAME> <<EMAIL>> import telepot import user async def execute(bot, msg, chat_id, args, username): dest_name, msg = args.split(" ", 1) dest_id = user.get_id(dest_name) await bot.sendMessage(dest_id, username + ': ' + msg)
#!/usr/bin/env python3.7 # SPDX-License-Identifier: MIT # # Copyright (c) 2020, <NAME> <<EMAIL>> import telepot import user async def execute(bot, msg, chat_id, args, username): dest_name, msg = args.split(" ", 1) dest_id = user.get_id(dest_name) await bot.sendMessage(dest_id, username + ': ' + msg)
en
0.184149
#!/usr/bin/env python3.7 # SPDX-License-Identifier: MIT # # Copyright (c) 2020, <NAME> <<EMAIL>>
2.095721
2
yowsup/layers/auth/protocolentities/test_failure.py
zulu494/Anoa-Bot-
1
6623344
<reponame>zulu494/Anoa-Bot-<filename>yowsup/layers/auth/protocolentities/test_failure.py from yowsup.layers.auth.protocolentities.failure import FailureProtocolEntity from yowsup.structs import ProtocolTreeNode from yowsup.structs.protocolentity import ProtocolEntityTest import unittest class FailureProtocolEntityTes...
from yowsup.layers.auth.protocolentities.failure import FailureProtocolEntity from yowsup.structs import ProtocolTreeNode from yowsup.structs.protocolentity import ProtocolEntityTest import unittest class FailureProtocolEntityTest(ProtocolEntityTest, unittest.TestCase): def setUp(self): self.ProtocolEntit...
none
1
2.256976
2
tests/data/conftest.py
vasp-dev/py4vasp
27
6623345
<filename>tests/data/conftest.py # Copyright © VASP Software GmbH, # Licensed under the Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from contextlib import contextmanager from IPython.core.formatters import DisplayFormatter from unittest.mock import patch, MagicMock, PropertyMock from pathlib import ...
<filename>tests/data/conftest.py # Copyright © VASP Software GmbH, # Licensed under the Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from contextlib import contextmanager from IPython.core.formatters import DisplayFormatter from unittest.mock import patch, MagicMock, PropertyMock from pathlib import ...
en
0.5538
# Copyright © VASP Software GmbH, # Licensed under the Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
2.082255
2
deprecated/grid_supply.py
mdbartos/RIPS
1
6623346
<reponame>mdbartos/RIPS import pandas as pd import numpy as np import geopandas as gpd from shapely import geometry from scipy import spatial #### SPECIFY SHAPEFILES substations = '/home/akagi/Desktop/electricity_data/Substations.shp' s = gpd.read_file(substations) #STATIC generation = '/home/akagi/Desktop/electric...
import pandas as pd import numpy as np import geopandas as gpd from shapely import geometry from scipy import spatial #### SPECIFY SHAPEFILES substations = '/home/akagi/Desktop/electricity_data/Substations.shp' s = gpd.read_file(substations) #STATIC generation = '/home/akagi/Desktop/electricity_data/Generation.shp'...
en
0.149557
#### SPECIFY SHAPEFILES #STATIC # DYNAMIC #### FIND NEAREST NEIGHBORS
2.481088
2
docxxslt/package.py
backbohne/docx-xslt
6
6623347
<reponame>backbohne/docx-xslt<gh_stars>1-10 from zipfile import ZipFile class Package(object): """ZipFile wrapper to append/update/remove files from zip""" def __init__(self, filename=None): self.filename = filename self.content = {} def read(self, filename=None): filename = filen...
from zipfile import ZipFile class Package(object): """ZipFile wrapper to append/update/remove files from zip""" def __init__(self, filename=None): self.filename = filename self.content = {} def read(self, filename=None): filename = filename or self.filename with ZipFile(fi...
en
0.544446
ZipFile wrapper to append/update/remove files from zip
3.775686
4
caption_generation/part6.py
alexdseo/Falsified-Scientific-Literature-Generation
0
6623348
<filename>caption_generation/part6.py<gh_stars>0 import os for i in range(0,500): command='curl -X POST "localhost:8764/inception/v3/caption/image" --data-binary @generated_images/samples_16_' + str(i) + '.png >> out.out' os.system(command)
<filename>caption_generation/part6.py<gh_stars>0 import os for i in range(0,500): command='curl -X POST "localhost:8764/inception/v3/caption/image" --data-binary @generated_images/samples_16_' + str(i) + '.png >> out.out' os.system(command)
none
1
2.124006
2
src/modules/perception/node_camera.py
joeyzhu00/FusionAD
33
6623349
#!/usr/bin/env python """ Publishes raw video from OpenCV VideoCapture. Subscribes to: None Publishes to: /raw_USBcamera_images """ import cv2 import rospy import roslib import numpy as np from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError def main(): #Initialize node ...
#!/usr/bin/env python """ Publishes raw video from OpenCV VideoCapture. Subscribes to: None Publishes to: /raw_USBcamera_images """ import cv2 import rospy import roslib import numpy as np from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError def main(): #Initialize node ...
en
0.846919
#!/usr/bin/env python Publishes raw video from OpenCV VideoCapture. Subscribes to: None Publishes to: /raw_USBcamera_images #Initialize node #Create bridge object #Create publisher and to publish raw image data #initialize camera #If frame is empty, don't send anything (Stuff crashes)
2.892904
3
Bip44Coins.SOLANA.py
spletnik/bip_utils
0
6623350
<filename>Bip44Coins.SOLANA.py<gh_stars>0 #!/usr/bin/python import sys import binascii import base64 from bip_utils import ( Bip39WordsNum, Bip39MnemonicGenerator, Bip39SeedGenerator, Bip44Changes, Bip44Coins, Bip44 ) num_args = len(sys.argv) args = str(sys.argv) # print('Number of arguments:', num_args, 'argu...
<filename>Bip44Coins.SOLANA.py<gh_stars>0 #!/usr/bin/python import sys import binascii import base64 from bip_utils import ( Bip39WordsNum, Bip39MnemonicGenerator, Bip39SeedGenerator, Bip44Changes, Bip44Coins, Bip44 ) num_args = len(sys.argv) args = str(sys.argv) # print('Number of arguments:', num_args, 'argu...
en
0.374315
#!/usr/bin/python # print('Number of arguments:', num_args, 'arguments.' ) # print('Argument List:', args ) #print('Parameters are user_id, index') # print('Account ID: ', account_id) # print('Account Index: ', index) # Generate random mnemonic #mnemonic = Bip39MnemonicGenerator().FromWordsNumber(Bip39WordsNum.WORDS_NU...
2.256339
2