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
circuit_element/draw_circuits.py
mcyrus10/vrfbImpedance
1
6621851
#!/Users/cyrus/miniconda3/bin/python3 from lcapy import Circuit cct = Circuit("z_a.sch") cct.draw('z_a.png') cct = Circuit("z_b.sch") cct.draw('z_b.png') cct = Circuit('randles_circuit.sch') cct.draw('z_randles.png') cct = Circuit('mhpe.sch') cct.draw('mhpe.png') cct = Circuit('symmetric_cell.sch') cct.draw('symmetric_...
#!/Users/cyrus/miniconda3/bin/python3 from lcapy import Circuit cct = Circuit("z_a.sch") cct.draw('z_a.png') cct = Circuit("z_b.sch") cct.draw('z_b.png') cct = Circuit('randles_circuit.sch') cct.draw('z_randles.png') cct = Circuit('mhpe.sch') cct.draw('mhpe.png') cct = Circuit('symmetric_cell.sch') cct.draw('symmetric_...
en
0.565457
#!/Users/cyrus/miniconda3/bin/python3
1.790662
2
calipso/plot/plot_backscattered.py
NASA-DEVELOP/vocal
18
6621852
<reponame>NASA-DEVELOP/vocal #!/opt/local/bin/python2.7 # # plot_uniform_alt_lidar.py # <NAME> # <NAME> # <NAME> # 8/11/2014 # from ccplot.hdf import HDF import ccplot.utils import matplotlib as mpl import numpy as np from plot.avg_lidar_data import avg_horz_data from plot.uniform_alt_2 import uniform_alt_2 from plo...
#!/opt/local/bin/python2.7 # # plot_uniform_alt_lidar.py # <NAME> # <NAME> # <NAME> # 8/11/2014 # from ccplot.hdf import HDF import ccplot.utils import matplotlib as mpl import numpy as np from plot.avg_lidar_data import avg_horz_data from plot.uniform_alt_2 import uniform_alt_2 from plot.regrid_lidar import regrid_...
en
0.802353
#!/opt/local/bin/python2.7 # # plot_uniform_alt_lidar.py # <NAME> # <NAME> # <NAME> # 8/11/2014 # # from gui.CALIPSO_Visualization_Tool import filename # noinspection PyUnresolvedReferences # averaging_width = 15 # Adjust the averaging with so its uniform per range # length of time determines how far the file can be vi...
2.468785
2
code/38.py
Nightwish-cn/my_leetcode
23
6621853
class Solution(object): def countAndSay(self, n): """ :type n: int :rtype: str """ pans = ["1"] for i in range(1, n): lst, cur, len1 = 0, 0, len(pans) cans = [] while cur < len1: while cur < len1 and pans[lst] == pan...
class Solution(object): def countAndSay(self, n): """ :type n: int :rtype: str """ pans = ["1"] for i in range(1, n): lst, cur, len1 = 0, 0, len(pans) cans = [] while cur < len1: while cur < len1 and pans[lst] == pan...
en
0.222187
:type n: int :rtype: str
3.244558
3
term4/AiSD/2.py
japanese-goblinn/labs
0
6621854
n = int(input()) nums = [int(i) for i in input().split(' ')] if n == 2: print(nums[0] * nums[1]) else: nums.sort() res1 = nums[0] * nums[1] res2 = nums[-1] * nums[-2] if res1 < res2: print(res2) else: print(res1)
n = int(input()) nums = [int(i) for i in input().split(' ')] if n == 2: print(nums[0] * nums[1]) else: nums.sort() res1 = nums[0] * nums[1] res2 = nums[-1] * nums[-2] if res1 < res2: print(res2) else: print(res1)
none
1
3.580042
4
testing/tshark_testing.py
mnmnc/campephilus
0
6621855
<gh_stars>0 import sys; import os sys.path.insert(0, os.path.abspath('..')) from modules.tshark import tshark import unittest class TsharkTestCase(unittest.TestCase): shark = tshark.Tshark("tshark", "input\\", "output\\") def test_tshark_exec_path___(self): test_input = "split_00000_20120316133000.pcap" test...
import sys; import os sys.path.insert(0, os.path.abspath('..')) from modules.tshark import tshark import unittest class TsharkTestCase(unittest.TestCase): shark = tshark.Tshark("tshark", "input\\", "output\\") def test_tshark_exec_path___(self): test_input = "split_00000_20120316133000.pcap" test_output = "t...
none
1
2.887526
3
nato.py
draproctor/python
0
6621856
<filename>nato.py nato = """A = Alpha B = Bravo C = Charlie D = Delta E = Echo F = Foxtrot G = Golf H = Hotel I = India J = Juliett K = Kilo L = Lima M = Mike N = November O = Oscar P = Papa Q = Quebec R = Romeo S = Sierra T = Tango U = Uniform V = Victor W = Whiskey X = Xray Y = Yankee Z = Zulu """ print(nato)
<filename>nato.py nato = """A = Alpha B = Bravo C = Charlie D = Delta E = Echo F = Foxtrot G = Golf H = Hotel I = India J = Juliett K = Kilo L = Lima M = Mike N = November O = Oscar P = Papa Q = Quebec R = Romeo S = Sierra T = Tango U = Uniform V = Victor W = Whiskey X = Xray Y = Yankee Z = Zulu """ print(nato)
en
0.767304
A = Alpha B = Bravo C = Charlie D = Delta E = Echo F = Foxtrot G = Golf H = Hotel I = India J = Juliett K = Kilo L = Lima M = Mike N = November O = Oscar P = Papa Q = Quebec R = Romeo S = Sierra T = Tango U = Uniform V = Victor W = Whiskey X = Xray Y = Yankee Z = Zulu
2.158391
2
readers/wikipedia.py
cstuartroe/plainclothes
0
6621857
<filename>readers/wikipedia.py from .reader import Reader from urllib import parse as up from bs4 import BeautifulSoup as bs import re articles = [] article_names = ['China','India','United States','Indonesia','Pakistan','Brazil','Nigeria','Bangladesh', 'Russia','Japan','Mexico','Philippines','Egypt','Ethi...
<filename>readers/wikipedia.py from .reader import Reader from urllib import parse as up from bs4 import BeautifulSoup as bs import re articles = [] article_names = ['China','India','United States','Indonesia','Pakistan','Brazil','Nigeria','Bangladesh', 'Russia','Japan','Mexico','Philippines','Egypt','Ethi...
en
0.125835
#body.find('div',{'id':'toc'}).decompose()
2.852741
3
simple-grpc-client/target/test-classes/OpenECOMP_ETE/testsuite/eteutils/eteutils/JSONUtils.py
orhantombul/AplicationManagerGrpcTest
0
6621858
import json from deepdiff import DeepDiff class JSONUtils: """JSONUtils is common resource for simple json helper keywords.""" def json_equals(self, left, right): """JSON Equals takes in two strings or json objects, converts them into json if needed and then compares them, returning if they are e...
import json from deepdiff import DeepDiff class JSONUtils: """JSONUtils is common resource for simple json helper keywords.""" def json_equals(self, left, right): """JSON Equals takes in two strings or json objects, converts them into json if needed and then compares them, returning if they are e...
en
0.910383
JSONUtils is common resource for simple json helper keywords. JSON Equals takes in two strings or json objects, converts them into json if needed and then compares them, returning if they are equal or not. Converts a list of dicts that contains a field that has a unique key into a dict of dicts Takes in an array and a ...
3.538588
4
sdk/python/tests/integration/feature_repos/universal/data_sources/postgres.py
vinted/feast
3
6621859
from typing import Dict, List, Optional import pandas as pd from feast.data_source import DataSource from feast.infra.offline_stores.contrib.postgres_offline_store.postgres import ( PostgreSQLOfflineStoreConfig, PostgreSQLSource, ) from feast.infra.utils.postgres.connection_utils import _get_conn, df_to_postg...
from typing import Dict, List, Optional import pandas as pd from feast.data_source import DataSource from feast.infra.offline_stores.contrib.postgres_offline_store.postgres import ( PostgreSQLOfflineStoreConfig, PostgreSQLSource, ) from feast.infra.utils.postgres.connection_utils import _get_conn, df_to_postg...
en
0.402242
# FIXME: ...
2.354353
2
oz/wizard.py
arruda/magic_it_up
0
6621860
# -*- coding: utf-8 -*- """ Do the image processing to find where player is steping """
# -*- coding: utf-8 -*- """ Do the image processing to find where player is steping """
en
0.939211
# -*- coding: utf-8 -*- Do the image processing to find where player is steping
1.014898
1
rain/simul/waitk_agent.py
qq1418381215/caat
14
6621861
from simuleval.agents import Agent,TextAgent, SpeechAgent from simuleval import READ_ACTION, WRITE_ACTION, DEFAULT_EOS from typing import List,Dict, Optional import numpy as np import math import torch from collections import deque from torch import Tensor import torch.nn as nn from fairseq import checkpoint_utils, opt...
from simuleval.agents import Agent,TextAgent, SpeechAgent from simuleval import READ_ACTION, WRITE_ACTION, DEFAULT_EOS from typing import List,Dict, Optional import numpy as np import math import torch from collections import deque from torch import Tensor import torch.nn as nn from fairseq import checkpoint_utils, opt...
en
0.327679
# if not is_end: # lprobs[:, self.eos] = ninf #lprobs: beam*vocab # decode each model # if not is_end: # lprobs[:, self.eos] = ninf #lprobs: beam*vocab #out_words, reserved= self.word_end.string(out_tokens, is_end) # if self.data_type == "speech": # self.searcher= SpeechSearcher(models, self.tgt_dict, eos= ...
2.252154
2
day15.2/main.py
lfscheidegger/adventofcode2018
1
6621862
<filename>day15.2/main.py #!/usr/bin/python """ """ from collections import defaultdict from collections import deque import multiprocessing import re import sys import time from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * from find_path import find_paths_to_in_range from number import N...
<filename>day15.2/main.py #!/usr/bin/python """ """ from collections import defaultdict from collections import deque import multiprocessing import re import sys import time from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * from find_path import find_paths_to_in_range from number import N...
en
0.794871
#!/usr/bin/python # print self._next_thing # print 'started round' # filter out dead people # print 'found active actor', self._active_actor.id # print 'found active actor', self._active_actor.id # print 'found active range' # print 'determined paths' # print 'selected next square' # an elf is dead. No bueno. # print '...
2.777306
3
bibpy/error.py
MisanthropicBit/bibpy
1
6621863
# -*- coding: utf-8 -*- """bibpy errors.""" class LexerException(Exception): """Raised on a lexer error.""" pass class ParseException(Exception): """Raised on errors in parsing.""" pass class RequiredFieldError(Exception): """Raised when an entry does not conform to a format's requirements....
# -*- coding: utf-8 -*- """bibpy errors.""" class LexerException(Exception): """Raised on a lexer error.""" pass class ParseException(Exception): """Raised on errors in parsing.""" pass class RequiredFieldError(Exception): """Raised when an entry does not conform to a format's requirements....
en
0.894367
# -*- coding: utf-8 -*- bibpy errors. Raised on a lexer error. Raised on errors in parsing. Raised when an entry does not conform to a format's requirements. Format a message for an entry's missing fields. The offending entry. Missing required fields. Missing fields where one of several fields are required.
2.965199
3
Python/Shop.py
Deego88/MPP_Assignment
0
6621864
<gh_stars>0 # Student:<NAME> # Student Number: G00387896 # Import libraries import os from dataclasses import dataclass, field from typing import List import csv #****** CREATE DATA CLASS******# # Create a data class for Product @dataclass class Product: name: str price: float = 0.0 # C...
# Student:<NAME> # Student Number: G00387896 # Import libraries import os from dataclasses import dataclass, field from typing import List import csv #****** CREATE DATA CLASS******# # Create a data class for Product @dataclass class Product: name: str price: float = 0.0 # Create a data...
en
0.841204
# Student:<NAME> # Student Number: G00387896 # Import libraries #****** CREATE DATA CLASS******# # Create a data class for Product # Create a data class for ProductStock # Create a data class for ProductQuantity (nested) # Create a data class for Shop (nested) # Create a data class for Customer #****** CREATE_SHOP ****...
3.936497
4
tests/test_dox_py.py
moi90/experitur
3
6621865
<filename>tests/test_dox_py.py import inspect import os import pytest from experitur.core.context import Context from experitur.dox import DOXError, load_dox @pytest.fixture(name="dox_py_fn") def fixture_dox_py_fn(tmp_path): fn = str(tmp_path / "dox.py") with open(fn, "w") as f: f.write( ...
<filename>tests/test_dox_py.py import inspect import os import pytest from experitur.core.context import Context from experitur.dox import DOXError, load_dox @pytest.fixture(name="dox_py_fn") def fixture_dox_py_fn(tmp_path): fn = str(tmp_path / "dox.py") with open(fn, "w") as f: f.write( ...
en
0.706676
from experitur import Experiment @Experiment( parameters={ "a1": [1], "a2": [2], "b": [1, 2], "a": ["{a_{b}}"], }) def baseline(trial): ...
2.262101
2
Lib/site-packages/django_core/forms/mixins/paging.py
fochoao/cpython
0
6621866
from __future__ import unicode_literals from django import forms class PagingFormMixin(forms.Form): """Form mixin that includes paging page number and page size.""" p = forms.IntegerField(label='Page', initial=1, required=False) ps = forms.IntegerField(label='Page Size', initial=25, required=False)
from __future__ import unicode_literals from django import forms class PagingFormMixin(forms.Form): """Form mixin that includes paging page number and page size.""" p = forms.IntegerField(label='Page', initial=1, required=False) ps = forms.IntegerField(label='Page Size', initial=25, required=False)
en
0.927054
Form mixin that includes paging page number and page size.
1.992901
2
3rd-iteration/tiles.py
Saccharine-Coal/pygame-pygame_ai-game
2
6621867
<reponame>Saccharine-Coal/pygame-pygame_ai-game from random import randint import pygame as pg import sprites import settings class Tile(sprites.GameObject): def __init__(self, xy: tuple, size: tuple, image: pg.Surface) -> None: self.image = pg.transform.scale(image, size) rect = pg.R...
from random import randint import pygame as pg import sprites import settings class Tile(sprites.GameObject): def __init__(self, xy: tuple, size: tuple, image: pg.Surface) -> None: self.image = pg.transform.scale(image, size) rect = pg.Rect(xy, size) super().__init__(rect) ...
en
0.481822
# random tile orientation
2.812017
3
hop/run.py
denismo/hopper
0
6621868
<reponame>denismo/hopper import os import click import logging from deploy import doDeploy logging.getLogger('pip').setLevel(logging.CRITICAL) @click.group() def cli(): pass @click.command(help="Deploy Hop package") def deploy(): doDeploy() if __name__ == '__main__': cli.add_command(deploy) cli()
import os import click import logging from deploy import doDeploy logging.getLogger('pip').setLevel(logging.CRITICAL) @click.group() def cli(): pass @click.command(help="Deploy Hop package") def deploy(): doDeploy() if __name__ == '__main__': cli.add_command(deploy) cli()
none
1
1.822442
2
src/uvm/comps/uvm_random_stimulus.py
rodrigomelo9/uvm-python
140
6621869
<reponame>rodrigomelo9/uvm-python<gh_stars>100-1000 #// #//------------------------------------------------------------------------------ #// Copyright 2007-2011 Mentor Graphics Corporation #// Copyright 2007-2010 Cadence Design Systems, Inc. #// Copyright 2010 Synopsys, Inc. #// All Rights Reserved Worldwide ...
#// #//------------------------------------------------------------------------------ #// Copyright 2007-2011 Mentor Graphics Corporation #// Copyright 2007-2010 Cadence Design Systems, Inc. #// Copyright 2010 Synopsys, Inc. #// All Rights Reserved Worldwide #// #// Licensed under the Apache License, Version...
en
0.549143
#// #//------------------------------------------------------------------------------ #// Copyright 2007-2011 Mentor Graphics Corporation #// Copyright 2007-2010 Cadence Design Systems, Inc. #// Copyright 2010 Synopsys, Inc. #// All Rights Reserved Worldwide #// #// Licensed under the Apache License, Version ...
1.256822
1
mrrecon/data/reader.py
sickkids-mri/mrrecon
0
6621870
<filename>mrrecon/data/reader.py import re import numpy as np import twixtools def read_twix(filename, keep_syncdata_and_acqend=True): """Wraps `twixtools.read_twix` with some fixes to the reader. This wrapper can be removed once they fix these things. """ scan_list = twixtools.read_twix(filename, ...
<filename>mrrecon/data/reader.py import re import numpy as np import twixtools def read_twix(filename, keep_syncdata_and_acqend=True): """Wraps `twixtools.read_twix` with some fixes to the reader. This wrapper can be removed once they fix these things. """ scan_list = twixtools.read_twix(filename, ...
en
0.785113
Wraps `twixtools.read_twix` with some fixes to the reader. This wrapper can be removed once they fix these things. # noqa # Fixes absence of newline # Parse other headers # Then it is the raidfile_hdr (not needed) Generates a dictionary from a portion of the header. Works for Config and Dicom. Handles raw dat...
2.648634
3
tests/unit/small_text/integrations/pytorch/models/test_kimcnn.py
chschroeder/small-text
218
6621871
<filename>tests/unit/small_text/integrations/pytorch/models/test_kimcnn.py<gh_stars>100-1000 import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNN except (ImportError, Py...
<filename>tests/unit/small_text/integrations/pytorch/models/test_kimcnn.py<gh_stars>100-1000 import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNN except (ImportError, Py...
en
0.046613
# Parameters # Modules # Parameters # Modules # Parameters # Modules
2.25998
2
scripts/se/stockholm_parse.py
PierreMesure/openaddresses
2,430
6621872
<reponame>PierreMesure/openaddresses #!/usr/bin/env python # -*- coding: utf-8 -*- import time import requests import os.path import lxml.html import codecs # API key can be obtained here: http://openstreetgs.stockholm.se/Home/Key # Choose "WGS84" as the coordinate system API_KEY = "" combined_filename = '' combin...
#!/usr/bin/env python # -*- coding: utf-8 -*- import time import requests import os.path import lxml.html import codecs # API key can be obtained here: http://openstreetgs.stockholm.se/Home/Key # Choose "WGS84" as the coordinate system API_KEY = "" combined_filename = '' combined_file = codecs.open(combined_filena...
en
0.814065
#!/usr/bin/env python # -*- coding: utf-8 -*- # API key can be obtained here: http://openstreetgs.stockholm.se/Home/Key # Choose "WGS84" as the coordinate system # This gets the list of all street in Stockholm # We query addresses for every street name and save them as csv lines
3.221178
3
new_credit/serializers.py
Alexandre1313/AppNewCredits
0
6621873
<filename>new_credit/serializers.py from rest_framework import serializers from .models import Usuario, Divida, Consulta class UsuarioSerializer(serializers.ModelSerializer): class Meta: model = Usuario fields = ( 'id', 'data_criacao', 'data_modificacao', ...
<filename>new_credit/serializers.py from rest_framework import serializers from .models import Usuario, Divida, Consulta class UsuarioSerializer(serializers.ModelSerializer): class Meta: model = Usuario fields = ( 'id', 'data_criacao', 'data_modificacao', ...
none
1
2.153047
2
itests/legacy/test_tasks.py
pabarros/asgard-api
3
6621874
<gh_stars>1-10 import json import unittest from http import HTTPStatus from responses import RequestsMock from asgard.models.account import AccountDB from asgard.models.user import UserDB from hollowman import api, cache from hollowman.app import application from hollowman.conf import DEFAULT_MESOS_ADDRESS from itest...
import json import unittest from http import HTTPStatus from responses import RequestsMock from asgard.models.account import AccountDB from asgard.models.user import UserDB from hollowman import api, cache from hollowman.app import application from hollowman.conf import DEFAULT_MESOS_ADDRESS from itests.util import (...
pt
0.962168
Se tentamos pegar os arquivos de uma task que não está mais rodando, temos que procurá-la no array `completed_tasks`. Se o mesos retornar que a task não existe, já retornamos 404 direto. Confirma que, quando o offset + length > ${HOLLOWMAN_TASK_FILEREAD_MAX_OFFSET} Por padrão esse offset máximo é de...
2.02423
2
setup.py
opencollective/CVTron
94
6621875
<gh_stars>10-100 from os import path from setuptools import find_packages, setup here = path.abspath(path.dirname(__file__)) install_requires = [ 'tensorflow', 'tensorlayer', 'tqdm', 'requests' ] setup( name='cvtron', version='0.0.2', description='Out-of-the-Box Computer Vision Library',...
from os import path from setuptools import find_packages, setup here = path.abspath(path.dirname(__file__)) install_requires = [ 'tensorflow', 'tensorlayer', 'tqdm', 'requests' ] setup( name='cvtron', version='0.0.2', description='Out-of-the-Box Computer Vision Library', url='https:/...
none
1
1.556221
2
setup.py
edcote/edaplayground-cli
1
6621876
<gh_stars>1-10 from setuptools import setup setup( name='edaplayground', version='1.0', description='Command line interface to edaplayground.com', author='<NAME>', author_email='<EMAIL>', packages=['edaplayground'], install_requires=['selenium', 'urllib3'], )
from setuptools import setup setup( name='edaplayground', version='1.0', description='Command line interface to edaplayground.com', author='<NAME>', author_email='<EMAIL>', packages=['edaplayground'], install_requires=['selenium', 'urllib3'], )
none
1
1.176912
1
notebooks/uci_datasets_download.py
mohamad-amin/falkon
130
6621877
import argparse import os import tempfile import h5py import numpy as np import pandas as pd import requests def download_protein(out_dir): protein_url = "https://archive.ics.uci.edu/ml/machine-learning-databases/00265/CASP.csv" with tempfile.TemporaryDirectory() as tmp_dir: protein_file = os.path.jo...
import argparse import os import tempfile import h5py import numpy as np import pandas as pd import requests def download_protein(out_dir): protein_url = "https://archive.ics.uci.edu/ml/machine-learning-databases/00265/CASP.csv" with tempfile.TemporaryDirectory() as tmp_dir: protein_file = os.path.jo...
en
0.869578
# heating load Data is impossible to find from reputable sources. Delve repository does not have 40k points (only 8192). Github repository with full data: https://github.com/trungngv/fgp
2.795775
3
src/fbsrankings/query/game_count_by_season.py
mikee385/fbsrankings
0
6621878
from uuid import UUID from dataclasses import dataclass from fbsrankings.common import Query @dataclass(frozen=True) class GameCountBySeasonResult: season_id: UUID count: int @dataclass(frozen=True) class GameCountBySeasonQuery(Query[GameCountBySeasonResult]): season_id: UUID
from uuid import UUID from dataclasses import dataclass from fbsrankings.common import Query @dataclass(frozen=True) class GameCountBySeasonResult: season_id: UUID count: int @dataclass(frozen=True) class GameCountBySeasonQuery(Query[GameCountBySeasonResult]): season_id: UUID
none
1
2.572942
3
dataframetl.py
BuyiCheng/QueryTranslator
0
6621879
import pandas as pd import re def getTableDict(s_list, table, join): # table_dict = {} tables = [table] for j in join: tables.append(j.split('join ')[1].split(' ')[0]) for t in tables: if len(join) == 0: s_list.append("df = pd.read_csv('{0}.csv')".format(t)) else: ...
import pandas as pd import re def getTableDict(s_list, table, join): # table_dict = {} tables = [table] for j in join: tables.append(j.split('join ')[1].split(' ')[0]) for t in tables: if len(join) == 0: s_list.append("df = pd.read_csv('{0}.csv')".format(t)) else: ...
en
0.285187
# table_dict = {} # repalce between and with *between* # df = df.groupby(group, sort=False) # attributes.append(h.split(':')[1].split(' ')[0]) # df = df.count().reset_index()[group] # df = df.agg(agg_dict) # df.columns = df.columns.droplevel(0) # df = df.sort_values(columns, ascending=ascendings) # if df.size < offset:...
3.131392
3
test.py
sillygod/django-as-pure-api-server
1
6621880
<gh_stars>1-10 # from pygelf import GelfTcpHandler, GelfUdpHandler, GelfTlsHandler, GelfHttpHandler # import logging # logging.basicConfig(level=logging.INFO) # logger = logging.getLogger() # logger.addHandler(GelfTcpHandler(host='127.0.0.1', port=9401)) # logger.addHandler(GelfTcpHandler(host='localhost', port=12201...
# from pygelf import GelfTcpHandler, GelfUdpHandler, GelfTlsHandler, GelfHttpHandler # import logging # logging.basicConfig(level=logging.INFO) # logger = logging.getLogger() # logger.addHandler(GelfTcpHandler(host='127.0.0.1', port=9401)) # logger.addHandler(GelfTcpHandler(host='localhost', port=12201)) # logger.in...
en
0.35704
# from pygelf import GelfTcpHandler, GelfUdpHandler, GelfTlsHandler, GelfHttpHandler # import logging # logging.basicConfig(level=logging.INFO) # logger = logging.getLogger() # logger.addHandler(GelfTcpHandler(host='127.0.0.1', port=9401)) # logger.addHandler(GelfTcpHandler(host='localhost', port=12201)) # logger.info(...
2.599282
3
setup.py
dugalh/simple_ortho
3
6621881
<filename>setup.py<gh_stars>1-10 from setuptools import setup, find_packages # To install local development version use: # pip install -e . setup( name='simple-ortho', version='0.1.0', description='Orthorectification with known camera model and DEM', author='<NAME>', author_email='<EMAIL>', ...
<filename>setup.py<gh_stars>1-10 from setuptools import setup, find_packages # To install local development version use: # pip install -e . setup( name='simple-ortho', version='0.1.0', description='Orthorectification with known camera model and DEM', author='<NAME>', author_email='<EMAIL>', ...
en
0.801126
# To install local development version use: # pip install -e . # 'opencv>=4.5', # pip does not see the conda installed opencv, so commented out for now
1.503371
2
Backend/endpoints/misc/elevatorInfo.py
LukasSchmid97/elevatorbot
0
6621882
<reponame>LukasSchmid97/elevatorbot<gh_stars>0 from fastapi import APIRouter, Depends from sqlalchemy.ext.asyncio import AsyncSession from Backend.crud import elevator_servers from Backend.dependencies import get_db_session from Shared.networkingSchemas import ElevatorGuildModel, ElevatorGuildsModel, EmptyResponseMode...
from fastapi import APIRouter, Depends from sqlalchemy.ext.asyncio import AsyncSession from Backend.crud import elevator_servers from Backend.dependencies import get_db_session from Shared.networkingSchemas import ElevatorGuildModel, ElevatorGuildsModel, EmptyResponseModel router = APIRouter( prefix="/elevator/di...
en
0.986132
# has test Get all discord servers Elevator is currently in # has test Add a discord server to the ones Elevator is currently in # has test Delete a discord server from the ones Elevator is currently in
2.483309
2
Exercícios/Ex.74.py
mattheuslima/Projetos-Curso_Python
0
6621883
<gh_stars>0 '''Exercício Python 074: Crie um programa que vai gerar cinco números aleatórios e colocar em uma tupla. Depois disso, mostre a listagem de números gerados e também indique o menor e o maior valor que estão na tupla.''' from random import randint print('-='*10) print('{:=^20}'.forma...
'''Exercício Python 074: Crie um programa que vai gerar cinco números aleatórios e colocar em uma tupla. Depois disso, mostre a listagem de números gerados e também indique o menor e o maior valor que estão na tupla.''' from random import randint print('-='*10) print('{:=^20}'.format('Desafio 7...
pt
0.971984
Exercício Python 074: Crie um programa que vai gerar cinco números aleatórios e colocar em uma tupla. Depois disso, mostre a listagem de números gerados e também indique o menor e o maior valor que estão na tupla. #print(f'\nA lista dos números é: ') #for c in range(0,len(lista)): # print(li...
4.166159
4
notebooks/box_conditions_evaluation.py
kumardeepak/document-structure
0
6621884
import pandas as pd from itertools import groupby def arrange_grouped_line_indices(line_connections, debug=False): lines = [list(i) for j, i in groupby(line_connections, lambda a: a[2])] if debug: print('arrange_grouped_line_indices: %s \n---------\n' % (str(lines))) arranged_line...
import pandas as pd from itertools import groupby def arrange_grouped_line_indices(line_connections, debug=False): lines = [list(i) for j, i in groupby(line_connections, lambda a: a[2])] if debug: print('arrange_grouped_line_indices: %s \n---------\n' % (str(lines))) arranged_line...
en
0.174909
# if abs(df.iloc[idx1]['text_left'] - df.iloc[idx2]['text_left']) < 0.3 *
3.177891
3
manoria_project/apps/manoria/managers.py
jtauber/team566
1
6621885
<filename>manoria_project/apps/manoria/managers.py from django.db import models class KindManager(models.Manager): def get_by_natural_key(self, slug): return self.get(slug=slug)
<filename>manoria_project/apps/manoria/managers.py from django.db import models class KindManager(models.Manager): def get_by_natural_key(self, slug): return self.get(slug=slug)
none
1
1.809064
2
pyscf/fci/test/test_direct_nosym.py
nmardirossian/pyscf
1
6621886
#!/usr/bin/env python import unittest from functools import reduce import numpy from pyscf import gto from pyscf import scf from pyscf import ao2mo from pyscf import fci from pyscf.fci import fci_slow nelec = (3,4) norb = 8 h1e = numpy.random.random((norb,norb)) h2e = numpy.random.random((norb,norb,norb,norb)) h2e = ...
#!/usr/bin/env python import unittest from functools import reduce import numpy from pyscf import gto from pyscf import scf from pyscf import ao2mo from pyscf import fci from pyscf.fci import fci_slow nelec = (3,4) norb = 8 h1e = numpy.random.random((norb,norb)) h2e = numpy.random.random((norb,norb,norb,norb)) h2e = ...
ru
0.26433
#!/usr/bin/env python
2.47025
2
formulae/power.py
dcl10/leccy-mod
0
6621887
from typing import Union def power_dc( current: Union[int, float], voltage: Union[int, float] ) -> Union[int, float]: """Calculate the electrical power of a DC circuit. Args: current (Union[int, float]): The current of the circuit, in Amperes (A). voltage (Union[int, float]): The voltage ...
from typing import Union def power_dc( current: Union[int, float], voltage: Union[int, float] ) -> Union[int, float]: """Calculate the electrical power of a DC circuit. Args: current (Union[int, float]): The current of the circuit, in Amperes (A). voltage (Union[int, float]): The voltage ...
en
0.691182
Calculate the electrical power of a DC circuit. Args: current (Union[int, float]): The current of the circuit, in Amperes (A). voltage (Union[int, float]): The voltage of the circuit, in volts (V). Returns: Union[int, float]: The electrical power of the circuit, in Watts (W). Calculate...
4.297646
4
Coding/Find-balanced-substrings.py
KerinPithawala/Interview-Questions
0
6621888
<reponame>KerinPithawala/Interview-Questions<filename>Coding/Find-balanced-substrings.py<gh_stars>0 from collections import Counter l=list(map(int,input().split(','))) n=len(l) out=[] for i in range(n): s=[] for j in range(i+1,n): if l[j]>l[i]: s.append(l[j]) if (len(s)==0): out....
from collections import Counter l=list(map(int,input().split(','))) n=len(l) out=[] for i in range(n): s=[] for j in range(i+1,n): if l[j]>l[i]: s.append(l[j]) if (len(s)==0): out.append(-1) else: c=dict(Counter(s)) l1=[] v=max(c.values()) for ...
none
1
3.104217
3
webapp/element43/apps/api/migrations/0004_auto_20160119_0824.py
Ososope/eve_online
0
6621889
<filename>webapp/element43/apps/api/migrations/0004_auto_20160119_0824.py # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api', '0003_system_check_fixes'), ] operations = [ ...
<filename>webapp/element43/apps/api/migrations/0004_auto_20160119_0824.py # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api', '0003_system_check_fixes'), ] operations = [ ...
en
0.769321
# -*- coding: utf-8 -*-
1.632391
2
scripts/image_downloader.py
RodolfoFerro/FacialRecognition
1
6621890
# =============================================================== # Author: <NAME> # Email: <EMAIL> # Twitter: @FerroRodolfo # # Script: Image downloader using ImageSoup. # # ABOUT COPYING OR USING PARTIAL INFORMATION: # This script was originally created by <NAME>. Any # explicit usage of this script or its contents i...
# =============================================================== # Author: <NAME> # Email: <EMAIL> # Twitter: @FerroRodolfo # # Script: Image downloader using ImageSoup. # # ABOUT COPYING OR USING PARTIAL INFORMATION: # This script was originally created by <NAME>. Any # explicit usage of this script or its contents i...
en
0.834195
# =============================================================== # Author: <NAME> # Email: <EMAIL> # Twitter: @FerroRodolfo # # Script: Image downloader using ImageSoup. # # ABOUT COPYING OR USING PARTIAL INFORMATION: # This script was originally created by <NAME>. Any # explicit usage of this script or its contents i...
2.966809
3
test/workbench_singleton.py
Ayub-Khan/workbench
61
6621891
''' Spin up Workbench Server (this is a singleton module)''' import multiprocessing import workbench.server.workbench_server as workbench_server print '\nStarting up the Workbench server...' process = multiprocessing.Process(target=workbench_server.run) process.start() def shutdown(): # Terminate the workbench s...
''' Spin up Workbench Server (this is a singleton module)''' import multiprocessing import workbench.server.workbench_server as workbench_server print '\nStarting up the Workbench server...' process = multiprocessing.Process(target=workbench_server.run) process.start() def shutdown(): # Terminate the workbench s...
en
0.60792
Spin up Workbench Server (this is a singleton module) # Terminate the workbench server process
2.721485
3
homeassistant/components/keba/lock.py
orcema/core
0
6621892
"""Support for KEBA charging station switch.""" from __future__ import annotations from typing import Any from homeassistant.components.lock import LockEntity from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.typing import Con...
"""Support for KEBA charging station switch.""" from __future__ import annotations from typing import Any from homeassistant.components.lock import LockEntity from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.typing import Con...
en
0.881802
Support for KEBA charging station switch. Set up the KEBA charging station platform. The entity class for KEBA charging stations switch. Initialize the KEBA switch. Lock wallbox. Unlock wallbox. Attempt to retrieve on off state from the switch. Schedule a state update. Add update callback after being added to hass.
2.207859
2
app/view.py
geonub/kakaobot_
0
6621893
<reponame>geonub/kakaobot_<filename>app/view.py<gh_stars>0 from app import app from flask import request, jsonify import traceback from .manager import APIHandler def processFail(): message = APIAdmin.process("fail").getMessage() viewLog("fail") return jsonify(message) @app.route("/keyboard", methods=["GE...
from app import app from flask import request, jsonify import traceback from .manager import APIHandler def processFail(): message = APIAdmin.process("fail").getMessage() viewLog("fail") return jsonify(message) @app.route("/keyboard", methods=["GET"]) def yellow_keyboard(): message, code = APIHandler....
none
1
2.303936
2
GUI/components/confidence_sliders.py
Kumaken/fyp-vehicle-counting-system
0
6621894
from GUI.strings.confidence_sliders import NMS_THRESHOLD_LABEL, YOLO_CONFIDENCE_THRESHOLD_LABEL from GUI.components.sliders import Sliders from PyQt5.QtWidgets import ( QVBoxLayout) class ConfidenceSliders: def __init__(self, parent=None): self.parent = parent self.layout = QVBoxLayout() ...
from GUI.strings.confidence_sliders import NMS_THRESHOLD_LABEL, YOLO_CONFIDENCE_THRESHOLD_LABEL from GUI.components.sliders import Sliders from PyQt5.QtWidgets import ( QVBoxLayout) class ConfidenceSliders: def __init__(self, parent=None): self.parent = parent self.layout = QVBoxLayout() ...
en
0.432706
# IMPORTANT: PASS SELF AS PARENT!
2.363008
2
broccoli/layer/base.py
naritotakizawa/broccoli
5
6621895
"""ゲームキャンバスにおける、レイヤーを扱うモジュールです。 ゲームキャンバス内のデータは、レイヤーという層に格納されます。 背景は背景レイヤーに、キャラクターや物体はオブジェクトレイヤー、アイテムはアイテムレイヤーという具合です。 それらのレイヤーを作成するためのクラスを提供しています。 """ import random from broccoli.conf import settings class BaseLayer: """全てのレイヤの基底クラス。""" def __init__(self): self.layer = None self.canvas = No...
"""ゲームキャンバスにおける、レイヤーを扱うモジュールです。 ゲームキャンバス内のデータは、レイヤーという層に格納されます。 背景は背景レイヤーに、キャラクターや物体はオブジェクトレイヤー、アイテムはアイテムレイヤーという具合です。 それらのレイヤーを作成するためのクラスを提供しています。 """ import random from broccoli.conf import settings class BaseLayer: """全てのレイヤの基底クラス。""" def __init__(self): self.layer = None self.canvas = No...
ja
1.000037
ゲームキャンバスにおける、レイヤーを扱うモジュールです。 ゲームキャンバス内のデータは、レイヤーという層に格納されます。 背景は背景レイヤーに、キャラクターや物体はオブジェクトレイヤー、アイテムはアイテムレイヤーという具合です。 それらのレイヤーを作成するためのクラスを提供しています。 全てのレイヤの基底クラス。 レイヤに、マテリアルを登録する。 レイヤ内のものを全て返す。 include_noneがTrueの場合、オブジェクトレイヤやアイテムレイヤで返されるNoneや空リストも含めて返します。 Falseの場合はそれらを省き、存在しているマテリアルだけ返します。 レイヤ内のマテリアルを検索する。...
2.929535
3
projects_api/apps.py
BerkeYazici/project-list-api
0
6621896
<reponame>BerkeYazici/project-list-api from django.apps import AppConfig class ProjectsApiConfig(AppConfig): name = 'projects_api'
from django.apps import AppConfig class ProjectsApiConfig(AppConfig): name = 'projects_api'
none
1
1.229379
1
user_activities/migrations/0005_auto_20200123_1507.py
chopdgd/django-user-activities
1
6621897
# Generated by Django 2.1.2 on 2020-01-23 21:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user_activities', '0004_auto_20191121_1151'), ] operations = [ migrations.AlterField( model_name='comment', name='te...
# Generated by Django 2.1.2 on 2020-01-23 21:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user_activities', '0004_auto_20191121_1151'), ] operations = [ migrations.AlterField( model_name='comment', name='te...
en
0.785256
# Generated by Django 2.1.2 on 2020-01-23 21:07
1.336731
1
deploy/utils/field_generation.py
xingao267/healthcare
0
6621898
<reponame>xingao267/healthcare """field_generation provides utilities to manage generated_fields.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from deploy.utils import utils # The tag name of generated_fields. GENERATED_FIELDS_NAME = 'generated_field...
"""field_generation provides utilities to manage generated_fields.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from deploy.utils import utils # The tag name of generated_fields. GENERATED_FIELDS_NAME = 'generated_fields' def update_generated_field...
en
0.824578
field_generation provides utilities to manage generated_fields. # The tag name of generated_fields. Get and update the generated_fields block of the input yaml. Write config file to output_yaml_path with new generated_fields.
2.001385
2
dataStructure/queue/deque.py
jinbooooom/coding-for-interview
8
6621899
# -*- coding:utf-8 -*- class Deque: def __init__(self): self.items = [] def addFront(self, item): # 首部添加元素 self.items.append(item) def addRear(self, item): # 尾部添加元素 self.items.insert(0, item) def removeFront(self): # 首部删除元素 return self.items.pop() def removeR...
# -*- coding:utf-8 -*- class Deque: def __init__(self): self.items = [] def addFront(self, item): # 首部添加元素 self.items.append(item) def addRear(self, item): # 尾部添加元素 self.items.insert(0, item) def removeFront(self): # 首部删除元素 return self.items.pop() def removeR...
zh
0.939705
# -*- coding:utf-8 -*- # 首部添加元素 # 尾部添加元素 # 首部删除元素 # 尾部删除元素
3.776242
4
weakpoint/config.py
onesuper/weakpoint
15
6621900
<reponame>onesuper/weakpoint import yaml from weakpoint.exceptions import ConfigException from weakpoint.fs import File class Config(dict): def __init__(self, string): super(Config, self).__init__() try: self.update(yaml.load(string)) except yaml.YAMLError: raise...
import yaml from weakpoint.exceptions import ConfigException from weakpoint.fs import File class Config(dict): def __init__(self, string): super(Config, self).__init__() try: self.update(yaml.load(string)) except yaml.YAMLError: raise ConfigException('YAML Error')...
none
1
2.658964
3
cardmarket_api/clients/product_client.py
SukiCZ/cardmarket_api
0
6621901
from .base import BaseClient class ProductClient(BaseClient): """ Manage product aggregates. """ def products_get( self, **kwargs ): """ No parameters """ return self._request( 'GET', 'products', **kwargs, ...
from .base import BaseClient class ProductClient(BaseClient): """ Manage product aggregates. """ def products_get( self, **kwargs ): """ No parameters """ return self._request( 'GET', 'products', **kwargs, ...
en
0.635002
Manage product aggregates. No parameters :id: An auto generated uuid used to identify the object. :name: pattern: ^[a-zA-Z0-9 ]+$, max_length=25, required :length: The length of the product in millimetres (mm), required :width: The width of the product in millimetres (mm), required :heig...
2.861051
3
jj/servers/__init__.py
TeoDV/jj
4
6621902
from ._server import Server __all__ = ("Server",)
from ._server import Server __all__ = ("Server",)
none
1
1.105828
1
src/main.py
lendradxx/telebot
1
6621903
<filename>src/main.py<gh_stars>1-10 from telebot import TeleBot, types from utils import core from components import handler if __name__ == "__main__": bot = TeleBot(core.getConfig("BOT", "TOKEN")) # Print Info Bot PREFIX = core.getConfig("BOT", "PREFIX") core.printHeaderLine("=") print(f"BOT NAME:...
<filename>src/main.py<gh_stars>1-10 from telebot import TeleBot, types from utils import core from components import handler if __name__ == "__main__": bot = TeleBot(core.getConfig("BOT", "TOKEN")) # Print Info Bot PREFIX = core.getConfig("BOT", "PREFIX") core.printHeaderLine("=") print(f"BOT NAME:...
en
0.064471
# Print Info Bot # Handling message
2.419917
2
src/wa_kat/templates/static/js/Lib/site-packages/rules_view.py
WebArchivCZ/WA-KAT
3
6621904
<filename>src/wa_kat/templates/static/js/Lib/site-packages/rules_view.py #! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: brython (http://brython.info) (like python3) # """ This module is used to set / get values from/to Rules section on the HTML page. """ # # Imports ============================...
<filename>src/wa_kat/templates/static/js/Lib/site-packages/rules_view.py #! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: brython (http://brython.info) (like python3) # """ This module is used to set / get values from/to Rules section on the HTML page. """ # # Imports ============================...
en
0.531171
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: brython (http://brython.info) (like python3) # This module is used to set / get values from/to Rules section on the HTML page. # # Imports ===================================================================== # Functions & classes =================...
2.670735
3
qwebirc/engines/staticengine.py
zuccon/qwebirc
155
6621905
<reponame>zuccon/qwebirc from twisted.web import resource, server, static, error import qwebirc.util as util import pprint from adminengine import AdminEngineAction try: from twisted.web.server import GzipEncoderFactory GZIP_ENCODER = GzipEncoderFactory() except ImportError: GZIP_ENCODER = None # TODO, cache gzi...
from twisted.web import resource, server, static, error import qwebirc.util as util import pprint from adminengine import AdminEngineAction try: from twisted.web.server import GzipEncoderFactory GZIP_ENCODER = GzipEncoderFactory() except ImportError: GZIP_ENCODER = None # TODO, cache gzip stuff cache = {} def cl...
en
0.325746
# TODO, cache gzip stuff # temporarily disabled -- seems to eat big pages # if GZIP_ENCODER: # request._encoder = GZIP_ENCODER.encoderForRequest(request) # HACK #"GZip cache": [ #("Contents: %s" % pprint.pformat(list(cache.keys())),)# AdminEngineAction("clear", d)) #],
2.137383
2
apps/compile_graph/compile_graph.py
nickspeal/bikesy-server
4
6621906
#!/usr/bin/env python from graphserver.compiler.compile_graph import main main()
#!/usr/bin/env python from graphserver.compiler.compile_graph import main main()
ru
0.26433
#!/usr/bin/env python
1.109334
1
convert_model_deploy.py
lshupingxl/crnn.pytorch
1
6621907
# -*- coding: utf-8 -*- # @Time : 18-9-21 上午11:42 # @Author : zhoujun import torch from models.crnn import CRNN def save(net, input, save_path): net.eval() traced_script_module = torch.jit.trace(net, input) traced_script_module.save(save_path) def load(model_path): return torch.jit.load(model_pat...
# -*- coding: utf-8 -*- # @Time : 18-9-21 上午11:42 # @Author : zhoujun import torch from models.crnn import CRNN def save(net, input, save_path): net.eval() traced_script_module = torch.jit.trace(net, input) traced_script_module.save(save_path) def load(model_path): return torch.jit.load(model_pat...
zh
0.318681
# -*- coding: utf-8 -*- # @Time : 18-9-21 上午11:42 # @Author : zhoujun
2.290905
2
libdmem-gdb.py
sdimitro/libdmem
0
6621908
<reponame>sdimitro/libdmem # # Copyright 2019 Delphix # # 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 ...
# # Copyright 2019 Delphix # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
en
0.847677
# # Copyright 2019 Delphix # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
2.313316
2
file.py
samkreter/fuzzy-decision-tree
5
6621909
class File: def __init__(self,name="results.csv"): self.name = name def writeA(self,val,op="a"): with open(self.name,op) as f: f.write(','.join(map(str,val)) + '\n')
class File: def __init__(self,name="results.csv"): self.name = name def writeA(self,val,op="a"): with open(self.name,op) as f: f.write(','.join(map(str,val)) + '\n')
none
1
3.254817
3
numpyPractice2.py
NikhilKanamarla/ML-Practice
0
6621910
import sys import numpy as np from PIL._util import * from scipy.misc import imread, imsave, imresize import matplotlib.pyplot as plt from scipy import misc from PIL import Image, ImageDraw if __name__ == '__main__': a = np.array([[1,2,3],[6,4,5]]) #start (inclusive), stop (exclusive), step size b = np.ar...
import sys import numpy as np from PIL._util import * from scipy.misc import imread, imsave, imresize import matplotlib.pyplot as plt from scipy import misc from PIL import Image, ImageDraw if __name__ == '__main__': a = np.array([[1,2,3],[6,4,5]]) #start (inclusive), stop (exclusive), step size b = np.ar...
en
0.427697
#start (inclusive), stop (exclusive), step size #all rows and certain columns #change the shape #condition, return if true, return if false #PIL #Numpy Scipy multi dimensional image processing # uses the Image module (PIL)
3.010262
3
rookie/mysite/migrations/0029_auto_20210615_1501.py
chen1932390299/drf-backend-platform
1
6621911
<gh_stars>1-10 # Generated by Django 3.2.2 on 2021-06-15 15:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mysite', '0028_scheduletrigger_schedule_args'), ] operations = [ migrations.AlterModelOptions( name='scheduletrig...
# Generated by Django 3.2.2 on 2021-06-15 15:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mysite', '0028_scheduletrigger_schedule_args'), ] operations = [ migrations.AlterModelOptions( name='scheduletrigger', ...
en
0.853398
# Generated by Django 3.2.2 on 2021-06-15 15:01
1.566287
2
logParser.py
Agastya-Asthana/LogReader
0
6621912
<reponame>Agastya-Asthana/LogReader def parseLogFile(filename): """Parses a log file and returns a dictionary of name to log data which itself is a dictionary containing timestamps, data and the header """ # Timestamp,isHeader(1 or 0),name,logginglevel,val1,val2,val3,... nameData = {} with ...
def parseLogFile(filename): """Parses a log file and returns a dictionary of name to log data which itself is a dictionary containing timestamps, data and the header """ # Timestamp,isHeader(1 or 0),name,logginglevel,val1,val2,val3,... nameData = {} with open(filename) as f: # For e...
en
0.804434
Parses a log file and returns a dictionary of name to log data which itself is a dictionary containing timestamps, data and the header # Timestamp,isHeader(1 or 0),name,logginglevel,val1,val2,val3,... # For every line in the file, determine if it is a header and handle appropriately # Ignore commented lines or lin...
3.324508
3
algorithms/string_matching/implicit_match.py
rn5l/rsc18
8
6621913
<reponame>rn5l/rsc18 ''' Created on 17.04.2018 @author: malte ''' import implicit from nltk import stem as stem, tokenize as tokenise from fuzzywuzzy import fuzz import numpy as np import pandas as pd from scipy import sparse class ImplicitStringMatch: def __init__(self, factors=32, neighbors=20, fuzzy=Tru...
''' Created on 17.04.2018 @author: malte ''' import implicit from nltk import stem as stem, tokenize as tokenise from fuzzywuzzy import fuzz import numpy as np import pandas as pd from scipy import sparse class ImplicitStringMatch: def __init__(self, factors=32, neighbors=20, fuzzy=True, use_count=False, n...
en
0.276159
Created on 17.04.2018 @author: malte #datat = test['actions'] #normalize playlist names #MF PART #row_ind = data.ItemIdx #col_ind = data.name_id #self.model = implicitu.bpr.BaysianPersonalizedRanking( factors=self.factors, iterations=self.epochs ) #self.tmp = sparse.csr_matrix( ( len(col_ind.unique()), len(row_ind.uni...
2.356865
2
data/umls/make_folds.py
issca/inferbeddings
33
6621914
<filename>data/umls/make_folds.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import argparse import logging import numpy as np from sklearn.cross_validation import KFold, train_test_split def read_triples(path): with open(path, 'rt') as f: lines = f.readlines() triples = [(...
<filename>data/umls/make_folds.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import argparse import logging import numpy as np from sklearn.cross_validation import KFold, train_test_split def read_triples(path): with open(path, 'rt') as f: lines = f.readlines() triples = [(...
en
0.308914
#!/usr/bin/env python3 # -*- coding: utf-8 -*-
2.363548
2
handshake.py
bocoup/wspy
8
6621915
<reponame>bocoup/wspy<gh_stars>1-10 import os import re import socket import time from base64 import b64encode from hashlib import sha1 from urlparse import urlparse from errors import HandshakeError from python_digest import build_authorization_request WS_GUID = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' WS_VERSION = '...
import os import re import socket import time from base64 import b64encode from hashlib import sha1 from urlparse import urlparse from errors import HandshakeError from python_digest import build_authorization_request WS_GUID = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' WS_VERSION = '13' MAX_REDIRECTS = 10 HDR_TIMEOUT =...
en
0.846249
# Request must be HTTP (at least 1.1) GET request, find the location # (without trailing slash) # Response must be HTTP (at least 1.1) with status 101 # Receive entire HTTP header # Send request Executes a handshake as the server end point of the socket. If the HTTP request headers sent by the client are invalid, a...
2.639421
3
photoplace/lib/PhotoPlace/UserInterface/commandUI.py
jriguera/photoplace
10
6621916
<filename>photoplace/lib/PhotoPlace/UserInterface/commandUI.py #!/usr/bin/env python # -*- coding: utf-8 -*- # # commandUI.py # # Copyright 2010-2015 <NAME> <<EMAIL>> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Yo...
<filename>photoplace/lib/PhotoPlace/UserInterface/commandUI.py #!/usr/bin/env python # -*- coding: utf-8 -*- # # commandUI.py # # Copyright 2010-2015 <NAME> <<EMAIL>> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Yo...
en
0.798396
#!/usr/bin/env python # -*- coding: utf-8 -*- # # commandUI.py # # Copyright 2010-2015 <NAME> <<EMAIL>> # # 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.apac...
2.25243
2
crawling/crwalingbasic.py
metacogpe/python
0
6621917
<gh_stars>0 import sys import io sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding = 'utf-8') sys.stderr = io.TextIOWrapper(sys.stderr.detach(), encoding = 'utf-8') import urllib.request r1 = urllib.request.Request('https://m.stock.naver.com/item/main.nhn#/stocks/005930/total') r2 = urllib.request.urlopen(r...
import sys import io sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding = 'utf-8') sys.stderr = io.TextIOWrapper(sys.stderr.detach(), encoding = 'utf-8') import urllib.request r1 = urllib.request.Request('https://m.stock.naver.com/item/main.nhn#/stocks/005930/total') r2 = urllib.request.urlopen(r1) r3 = r2.r...
en
0.309383
#/stocks/005930/total') #res = req.urlopen(url).read().decode('euc-kr')
2.553589
3
simple.py
DrAlbertCruz/PL-FC-Naive
0
6621918
<filename>simple.py # Simple example to determine entailment in propositional logic with forward chaining # Knowledge base is a list of propositional atomic sentences (identified by a string) KB = ["looks","swims","quacks"] # Rules are the other part of the KB that contain implications. Antecedents must be conjunctive...
<filename>simple.py # Simple example to determine entailment in propositional logic with forward chaining # Knowledge base is a list of propositional atomic sentences (identified by a string) KB = ["looks","swims","quacks"] # Rules are the other part of the KB that contain implications. Antecedents must be conjunctive...
en
0.907389
# Simple example to determine entailment in propositional logic with forward chaining # Knowledge base is a list of propositional atomic sentences (identified by a string) # Rules are the other part of the KB that contain implications. Antecedents must be conjunctive only, and the # consequent must be a single atomic s...
3.807431
4
Janus/python-base-unit_05/files/close.file.test.py
voodoopeople42/Vproject
0
6621919
# -*- coding: utf-8 -*- # close.file.test.py my_file = open("README.md", "r") print(f"Имя файла: {my_file.name}") # Python автоматически закрывает файл # если файловый объект к которому он привязан присваивается другому файлу. # Однако, хорошей практикой будет вручную закрывать файл командой close(). my_file = op...
# -*- coding: utf-8 -*- # close.file.test.py my_file = open("README.md", "r") print(f"Имя файла: {my_file.name}") # Python автоматически закрывает файл # если файловый объект к которому он привязан присваивается другому файлу. # Однако, хорошей практикой будет вручную закрывать файл командой close(). my_file = op...
ru
0.995734
# -*- coding: utf-8 -*- # close.file.test.py # Python автоматически закрывает файл # если файловый объект к которому он привязан присваивается другому файлу. # Однако, хорошей практикой будет вручную закрывать файл командой close().
3.197766
3
Python/Numbers/fibonacci_test.py
whzd/LearningProjects
0
6621920
<filename>Python/Numbers/fibonacci_test.py import unittest from fibonacci import fibonacci_sequence class TestFibonacci(unittest.TestCase): def test_fibonacci_sequence(self): # Test calculate the term number 2 of tha Fibonacci Sequence self.assertEqual(fibonacci_sequence(2), 1) # Test calc...
<filename>Python/Numbers/fibonacci_test.py import unittest from fibonacci import fibonacci_sequence class TestFibonacci(unittest.TestCase): def test_fibonacci_sequence(self): # Test calculate the term number 2 of tha Fibonacci Sequence self.assertEqual(fibonacci_sequence(2), 1) # Test calc...
en
0.645997
# Test calculate the term number 2 of tha Fibonacci Sequence # Test calculate the term number 15 of tha Fibonacci Sequence # Test calculate the term number 31 of tha Fibonacci Sequence # Test if value error is raised to n values off the limits # Test if type error is raised to invalid n type
4.053219
4
kissim/io/dataframe.py
AJK-dev/kissim
15
6621921
""" kissim.io.dataframe Defines a DataFrame-based pocket class. """ from opencadd.structure.pocket import Pocket from . import KlifsToKissimData class PocketDataFrame(Pocket): @classmethod def from_structure_klifs_id(cls, structure_klifs_id, klifs_session=None): """ Get DataFrame-based pock...
""" kissim.io.dataframe Defines a DataFrame-based pocket class. """ from opencadd.structure.pocket import Pocket from . import KlifsToKissimData class PocketDataFrame(Pocket): @classmethod def from_structure_klifs_id(cls, structure_klifs_id, klifs_session=None): """ Get DataFrame-based pock...
en
0.465088
kissim.io.dataframe Defines a DataFrame-based pocket class. Get DataFrame-based pocket object from a KLIFS structure ID. Parameters ---------- structure_id : int KLIFS structure ID. klifs_session : None or opencadd.databases.klifs.session.Session Local or remote...
2.599887
3
lattices/constraints.py
dit/lattices
1
6621922
""" Various conditions one might employ in defining a lattice. """ from itertools import combinations from operator import le import networkx as nx __all__ = [ 'is_antichain', 'is_cover', 'is_partition', 'is_connected', ] def is_antichain(set_of_sets, le=le): """ Determine whether `set_of_...
""" Various conditions one might employ in defining a lattice. """ from itertools import combinations from operator import le import networkx as nx __all__ = [ 'is_antichain', 'is_cover', 'is_partition', 'is_connected', ] def is_antichain(set_of_sets, le=le): """ Determine whether `set_of_...
en
0.74017
Various conditions one might employ in defining a lattice. Determine whether `set_of_sets` represents an antichain; that is, whether all pairs of sets within `set_of_sets` are incomperable according to `le`. Parameters ---------- set_of_sets : a (frozen)set of (frozen)sets The potential ant...
3.661336
4
chsystem/utility/db_utils.py
OB-UNISA/ch-system
0
6621923
<gh_stars>0 import time from replit import db import utils def get_all_key_values(): db_kv = {} for key in db.keys(): db_kv[key] = db[key] return db_kv def print_db(db_kv): for key, value in db_kv.items(): print(f'{key}: {value}') def get_all_bosses(): return {boss: timer for ...
import time from replit import db import utils def get_all_key_values(): db_kv = {} for key in db.keys(): db_kv[key] = db[key] return db_kv def print_db(db_kv): for key, value in db_kv.items(): print(f'{key}: {value}') def get_all_bosses(): return {boss: timer for (boss, timer...
none
1
2.746288
3
flimsy/query.py
spwilson2/flimsy
0
6621924
import terminal import log # TODO Refactor print logic out of this so the objects # created are separate from print logic. class QueryRunner(object): def __init__(self, test_schedule): self.schedule = test_schedule def tags(self): tags = set() for suite in self.schedule: ...
import terminal import log # TODO Refactor print logic out of this so the objects # created are separate from print logic. class QueryRunner(object): def __init__(self, test_schedule): self.schedule = test_schedule def tags(self): tags = set() for suite in self.schedule: ...
en
0.839075
# TODO Refactor print logic out of this so the objects # created are separate from print logic. #TODO In Gem5 override this with tag types (isa,variant,length)
2.461001
2
brainframe_qt/ui/dialogs/license_dialog/widgets/brainframe_license/aotu_login_form/aotu_login_form.py
aotuai/brainframe-qt
17
6621925
from PyQt5.QtCore import QObject, pyqtSignal from .aotu_login_form_ui import AotuLoginFormUI class AotuLoginForm(AotuLoginFormUI): oath_login_requested = pyqtSignal() def __init__(self, *, parent: QObject): super().__init__(parent=parent) self._init_signals() def _init_signals(self) ->...
from PyQt5.QtCore import QObject, pyqtSignal from .aotu_login_form_ui import AotuLoginFormUI class AotuLoginForm(AotuLoginFormUI): oath_login_requested = pyqtSignal() def __init__(self, *, parent: QObject): super().__init__(parent=parent) self._init_signals() def _init_signals(self) ->...
none
1
2.465677
2
setup.py
onhernandes/capybara
2
6621926
from distutils.core import setup setup( name="Capybara", version="1.0.0", author="<NAME>", author_email="<EMAIL>", scripts=["main.py"], license="LICENSE", description="Twitter bot for posting photos", long_description=open("README.md").read(), install_requires=[ "PyYAML == 3...
from distutils.core import setup setup( name="Capybara", version="1.0.0", author="<NAME>", author_email="<EMAIL>", scripts=["main.py"], license="LICENSE", description="Twitter bot for posting photos", long_description=open("README.md").read(), install_requires=[ "PyYAML == 3...
none
1
1.130361
1
python_scripts/unicorn02.py
mirontoli/tolle-rasp
2
6621927
import unicornhat as uh import time uh.set_layout(uh.PHAT) uh.brightness(0.5) def paint(r, g, b): for x in range(8): for y in range(4): uh.set_pixel(x,y,r,g, b) uh.show() while True: paint(0,255,0) time.sleep(10) paint(255,255,0) time.sleep(10) paint(255,0,0) time.sleep(10)
import unicornhat as uh import time uh.set_layout(uh.PHAT) uh.brightness(0.5) def paint(r, g, b): for x in range(8): for y in range(4): uh.set_pixel(x,y,r,g, b) uh.show() while True: paint(0,255,0) time.sleep(10) paint(255,255,0) time.sleep(10) paint(255,0,0) time.sleep(10)
none
1
2.817482
3
tests/integration/roots/test-settings/kaybee_plugins/settings_handlers.py
pauleveritt/kaybee
2
6621928
<reponame>pauleveritt/kaybee<filename>tests/integration/roots/test-settings/kaybee_plugins/settings_handlers.py<gh_stars>1-10 from sphinx.environment import BuildEnvironment from kaybee.app import kb @kb.dumper('demosettings') def dump_hello(kb_app: kb, sphinx_env: BuildEnvironment): settings = sphinx_env.app.co...
from sphinx.environment import BuildEnvironment from kaybee.app import kb @kb.dumper('demosettings') def dump_hello(kb_app: kb, sphinx_env: BuildEnvironment): settings = sphinx_env.app.config['kaybee_settings'] use_debug = settings.debugdumper.use_debug return dict( demosettings=dict(using_demo=u...
none
1
1.922214
2
binarysearch/Balanced-Brackets-Sequel.py
UserBlackBox/competitive-programming
0
6621929
# https://binarysearch.com/problems/Balanced-Brackets-Sequel class Solution: def solve(self, s): brackets = "" for i in range(len(s)): if s[i] in ['{','(','[']: brackets += s[i] if s[i] in ['}',')',']']: try: if s[i] == '}'...
# https://binarysearch.com/problems/Balanced-Brackets-Sequel class Solution: def solve(self, s): brackets = "" for i in range(len(s)): if s[i] in ['{','(','[']: brackets += s[i] if s[i] in ['}',')',']']: try: if s[i] == '}'...
en
0.708078
# https://binarysearch.com/problems/Balanced-Brackets-Sequel
3.80779
4
Preprocessing.py
sdhayalk/Invasive_Species_Monitoring
6
6621930
<filename>Preprocessing.py import os import cv2 def resize_all_images(directory, d1, d2): for current_dir in os.walk(directory): for current_file in current_dir[2]: current_path_with_file = directory + "/" + current_file img = cv2.imread(current_path_with_file) resized_...
<filename>Preprocessing.py import os import cv2 def resize_all_images(directory, d1, d2): for current_dir in os.walk(directory): for current_file in current_dir[2]: current_path_with_file = directory + "/" + current_file img = cv2.imread(current_path_with_file) resized_...
en
0.473009
# resize_all_images('G:/Sahil/MS in US/ASU/CRS Lab/InvasiveSpecies/train', 224, 224) # resize_all_images('G:/Sahil/MS in US/ASU/CRS Lab/InvasiveSpecies/test', 224, 224) # if not os.path.exists('G:/Sahil/MS in US/ASU/CRS Lab/InvasiveSpecies/test_90'): # os.makedirs('G:/Sahil/MS in US/ASU/CRS Lab/InvasiveSpecies/test...
2.935896
3
data_processing/pyscripts/process_dataset.py
yimengmin/wiki-cs-dataset
30
6621931
""" Subroutines to turn the graph dataset into vectorised form and output JSON metadata, specifying data splits and vectorising article text features. """ import numpy as np import json import random import sys import pickle import os import word_frequencies def label_set(nodes): """ Get the set of labels appl...
""" Subroutines to turn the graph dataset into vectorised form and output JSON metadata, specifying data splits and vectorising article text features. """ import numpy as np import json import random import sys import pickle import os import word_frequencies def label_set(nodes): """ Get the set of labels appl...
en
0.834403
Subroutines to turn the graph dataset into vectorised form and output JSON metadata, specifying data splits and vectorising article text features. Get the set of labels applied to at least one node. # Select set of words that appear at all in dataset
2.826252
3
fifa/player.py
ZhihaoXu/fifaweb
0
6621932
<reponame>ZhihaoXu/fifaweb from flask import ( Blueprint, flash, g, redirect, render_template, request, url_for, Response, request, jsonify,json ) from werkzeug.exceptions import abort from werkzeug.security import check_password_hash, generate_password_hash # from photo.auth import login_required from fifa.db imp...
from flask import ( Blueprint, flash, g, redirect, render_template, request, url_for, Response, request, jsonify,json ) from werkzeug.exceptions import abort from werkzeug.security import check_password_hash, generate_password_hash # from photo.auth import login_required from fifa.db import get_db bp = Blueprint(...
en
0.58413
# from photo.auth import login_required # @bp.route('/player/index', methods=('GET', 'POST')) # cursor.execute( # "SELECT pace_score,shooting_score,passing_score,dribbling_score,defending_score,physical_score,GK_score" # " FROM rating" # " WHERE ID = 231747" # ) # player = cursor.fetchone() # cursor.execute...
2.429289
2
info/app/Location.py
jaddoueik1/masonite-project
0
6621933
"""Location Model.""" from config.database import Model class Location(Model): """Location Model.""" __fillable__=['country','longitude','latitude','codes','country_code','continent_code']
"""Location Model.""" from config.database import Model class Location(Model): """Location Model.""" __fillable__=['country','longitude','latitude','codes','country_code','continent_code']
en
0.704334
Location Model. Location Model.
2.560551
3
misc/cardGame.py
caro-oviedo/Python-
0
6621934
NUM_CARDS = 52 def no_high(list_name): """ list_name is a list of strings representing cards. Return TRUE if there are no high cards in list_name, False otherwise. """ if "jack" in list_name: return False if "queen" in list_name: return False if "king" in list_name: ...
NUM_CARDS = 52 def no_high(list_name): """ list_name is a list of strings representing cards. Return TRUE if there are no high cards in list_name, False otherwise. """ if "jack" in list_name: return False if "queen" in list_name: return False if "king" in list_name: ...
en
0.859207
list_name is a list of strings representing cards. Return TRUE if there are no high cards in list_name, False otherwise.
3.862568
4
interviewbit/Programming/Binary Search/Count element occurence/solution.py
pablotrinidad/competitive-programming
0
6621935
<gh_stars>0 """InterviewBit. Programming > Binary Search > Cont Element Occurence. """ class Solution: """Solution.""" # @param A : tuple of integers # @param B : integer # @return an integer def findCount(self, A, B): """Return the number of occurrences of B in A.""" start = 0 ...
"""InterviewBit. Programming > Binary Search > Cont Element Occurence. """ class Solution: """Solution.""" # @param A : tuple of integers # @param B : integer # @return an integer def findCount(self, A, B): """Return the number of occurrences of B in A.""" start = 0 end =...
en
0.446482
InterviewBit. Programming > Binary Search > Cont Element Occurence. Solution. # @param A : tuple of integers # @param B : integer # @return an integer Return the number of occurrences of B in A. # NOQA
3.543952
4
pureblog/site/apps/views.py
Lucky4/pureblog
0
6621936
import datetime from django.shortcuts import render, get_object_or_404, HttpResponseRedirect from django.views.generic.list import ListView, MultipleObjectMixin from django.views.generic.detail import DetailView, SingleObjectMixin from .models import Article, Category, Tag class IndexView(ListView, MultipleObjectMi...
import datetime from django.shortcuts import render, get_object_or_404, HttpResponseRedirect from django.views.generic.list import ListView, MultipleObjectMixin from django.views.generic.detail import DetailView, SingleObjectMixin from .models import Article, Category, Tag class IndexView(ListView, MultipleObjectMi...
none
1
2.157533
2
genessa/networks/ratelaws.py
sbernasek/genessa
2
6621937
import numpy as np from tabulate import tabulate class RateLaws: """ Class provides tabulated summary of reaction kinetics. Attributes: node_key (dict) - maps state dimension (key) to unique node id (value) reactions (list) - list of reaction objects table (list of lists) - rat...
import numpy as np from tabulate import tabulate class RateLaws: """ Class provides tabulated summary of reaction kinetics. Attributes: node_key (dict) - maps state dimension (key) to unique node id (value) reactions (list) - list of reaction objects table (list of lists) - rat...
en
0.684647
Class provides tabulated summary of reaction kinetics. Attributes: node_key (dict) - maps state dimension (key) to unique node id (value) reactions (list) - list of reaction objects table (list of lists) - rate law table, row for each reaction Instantiate raw law table. Args: ...
3.197106
3
aws_secrets/cli/cli.py
lucasvieirasilva/aws-ssm-secrets-cli
4
6621938
<gh_stars>1-10 import click import yaml from aws_secrets import __name__ as module_name from aws_secrets.cli.decrypt import decrypt from aws_secrets.cli.deploy import deploy from aws_secrets.cli.encrypt import encrypt from aws_secrets.cli.set_parameter import set_parameter from aws_secrets.cli.set_secret import set_sec...
import click import yaml from aws_secrets import __name__ as module_name from aws_secrets.cli.decrypt import decrypt from aws_secrets.cli.deploy import deploy from aws_secrets.cli.encrypt import encrypt from aws_secrets.cli.set_parameter import set_parameter from aws_secrets.cli.set_secret import set_secret from aws_se...
en
0.191034
Root CLI Group `aws-secrets --help` Args: ctx (`click.Context`): click context object loglevel (`str`): log level
1.869416
2
ref/spatial_codec.py
cSDes1gn/spatial-codec
3
6621939
<gh_stars>1-10 """ Spatial Codec™ ============== Contributors: <NAME> Updated: 2020-07 Repoitory: https://github.com/cSDes1gn/spatial-codec README availble in repository root Version: 2.0 Dependancies ------------ >>> import argparse >>> import random >>> import time >>> import numpy as np >>> import plotly.graph_obje...
""" Spatial Codec™ ============== Contributors: <NAME> Updated: 2020-07 Repoitory: https://github.com/cSDes1gn/spatial-codec README availble in repository root Version: 2.0 Dependancies ------------ >>> import argparse >>> import random >>> import time >>> import numpy as np >>> import plotly.graph_objects as go >>> f...
en
0.718274
Spatial Codec™ ============== Contributors: <NAME> Updated: 2020-07 Repoitory: https://github.com/cSDes1gn/spatial-codec README availble in repository root Version: 2.0 Dependancies ------------ >>> import argparse >>> import random >>> import time >>> import numpy as np >>> import plotly.graph_objects as go >>> from ...
2.124584
2
Black-Box/code.py
bcspragu/Machine-Learning-Projects
0
6621940
<gh_stars>0 import itertools import operator import numpy as np from sklearn import cross_validation from sklearn import svm from sklearn import tree from sklearn import neighbors from sklearn import ensemble from sklearn.feature_selection import SelectKBest from sklearn.feature_selection import chi2 train = np.loa...
import itertools import operator import numpy as np from sklearn import cross_validation from sklearn import svm from sklearn import tree from sklearn import neighbors from sklearn import ensemble from sklearn.feature_selection import SelectKBest from sklearn.feature_selection import chi2 train = np.load('train.npy...
en
0.465054
# Remove the labels # Take the 400 best features # I use the following code to find good hyperparameter values #scores = cross_validation.cross_val_score( #clf, trimmed_data, target, cv=5) #print("Accuracy: %f (+/- %0.2f)" % (scores.mean(), scores.std() * 2))
2.906422
3
customerapi/apps.py
yorek/azure-sql-db-django
2
6621941
from django.apps import AppConfig class customerapiConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'customerapi'
from django.apps import AppConfig class customerapiConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'customerapi'
none
1
1.37278
1
tests/conftest.py
davesque/py-lll
1
6621942
import contextlib from pathlib import ( Path, ) import pytest from lll.parser import ( parse_s_exp, ) FIXTURES_PATH = Path(__file__).parent / 'fixtures' UNPARSEABLE_FIXTURES_PATH = FIXTURES_PATH / 'unparseable' FIXTURES = list(sorted(FIXTURES_PATH.glob('*.lisp'))) UNPARSEABLE_FIXTURES = list(sorted(UNPARSE...
import contextlib from pathlib import ( Path, ) import pytest from lll.parser import ( parse_s_exp, ) FIXTURES_PATH = Path(__file__).parent / 'fixtures' UNPARSEABLE_FIXTURES_PATH = FIXTURES_PATH / 'unparseable' FIXTURES = list(sorted(FIXTURES_PATH.glob('*.lisp'))) UNPARSEABLE_FIXTURES = list(sorted(UNPARSE...
none
1
2.258557
2
tarball_deploy/__init__.py
psliwka/tarball-deploy
1
6621943
<filename>tarball_deploy/__init__.py import pkg_resources __version__ = pkg_resources.get_distribution(__name__).version
<filename>tarball_deploy/__init__.py import pkg_resources __version__ = pkg_resources.get_distribution(__name__).version
none
1
1.325419
1
util/client/gui/logInGui.py
bcm27/Chat
0
6621944
import util.client.clientUtils as cUtils from tkinter import * from util.client.gui import gui import socket from sys import argv from util.sharedUtils import SERVER_PORT import time class LoginGUI: def __init__(self, client_socket): client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Cr...
import util.client.clientUtils as cUtils from tkinter import * from util.client.gui import gui import socket from sys import argv from util.sharedUtils import SERVER_PORT import time class LoginGUI: def __init__(self, client_socket): client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Cr...
en
0.873302
# Create a new socket # Connect to the socket # Clear label after 2 seconds # Start the main GUI and pass it the created socket # Start the main GUI and pass it the created socket
3.198212
3
contrib/py/jxl_library_patches/jxl_imageio.py
toricls/brunsli
700
6621945
# Copyright (c) Google LLC 2019 # # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. """Extends the 'imageio' to support basic reading of JPEG-XL recompressed JPEG. This registers a file format that will call an external co...
# Copyright (c) Google LLC 2019 # # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. """Extends the 'imageio' to support basic reading of JPEG-XL recompressed JPEG. This registers a file format that will call an external co...
en
0.839193
# Copyright (c) Google LLC 2019 # # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. Extends the 'imageio' to support basic reading of JPEG-XL recompressed JPEG. This registers a file format that will call an external conve...
2.490035
2
timeweb/timewebapp/migrations/0047_rename_ad_timewebmodel_assignment_date.py
snapsnap123/TimeWeb
1
6621946
<gh_stars>1-10 # Generated by Django 3.2.4 on 2021-06-26 20:53 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('timewebapp', '0046_rename_dif_assign_timewebmodel_blue_line_start'), ] operations = [ migrations.RenameField( model_name=...
# Generated by Django 3.2.4 on 2021-06-26 20:53 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('timewebapp', '0046_rename_dif_assign_timewebmodel_blue_line_start'), ] operations = [ migrations.RenameField( model_name='timewebmodel',...
en
0.8692
# Generated by Django 3.2.4 on 2021-06-26 20:53
1.616665
2
aspc/college/migrations/0001_initial.py
DDKZ/mainsite
8
6621947
<reponame>DDKZ/mainsite # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Building', fields=[ ('i...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Building', fields=[ ('id', models.AutoField(ver...
en
0.769321
# -*- coding: utf-8 -*-
1.75077
2
examples/docs_snippets/docs_snippets/concepts/solids_pipelines/pipelines.py
rpatil524/dagster
4,606
6621948
# pylint: disable=unused-argument from dagster import DependencyDefinition, GraphDefinition, job, op @op def my_op(): pass # start_pipeline_example_marker @op def return_one(context): return 1 @op def add_one(context, number: int): return number + 1 @job def one_plus_one(): add_one(return_one()...
# pylint: disable=unused-argument from dagster import DependencyDefinition, GraphDefinition, job, op @op def my_op(): pass # start_pipeline_example_marker @op def return_one(context): return 1 @op def add_one(context, number: int): return number + 1 @job def one_plus_one(): add_one(return_one()...
en
0.626763
# pylint: disable=unused-argument # start_pipeline_example_marker # end_pipeline_example_marker # start_multiple_usage_pipeline # end_multiple_usage_pipeline # start_alias_pipeline # end_alias_pipeline # start_tag_pipeline # end_tag_pipeline # start_pipeline_definition_marker # end_pipeline_definition_marker # start_ta...
2.094122
2
tools/store_convert.py
Totto16/auto-xdcc
4
6621949
<filename>tools/store_convert.py #!/usr/bin/env python3 import argparse import itertools import json import sys import urllib.parse as urlparse from copy import deepcopy def list_partition(pred, iterable): """Use a predicate to partition entries into false entries and true entries""" # list_partition(is_odd,...
<filename>tools/store_convert.py #!/usr/bin/env python3 import argparse import itertools import json import sys import urllib.parse as urlparse from copy import deepcopy def list_partition(pred, iterable): """Use a predicate to partition entries into false entries and true entries""" # list_partition(is_odd,...
en
0.437931
#!/usr/bin/env python3 Use a predicate to partition entries into false entries and true entries # list_partition(is_odd, range(10)) --> 0 2 4 6 8 and 1 3 5 7 9 # Make new deep copy to modify
2.56048
3
pyvisdk/do/host_nas_volume_spec.py
Infinidat/pyvisdk
0
6621950
<reponame>Infinidat/pyvisdk<filename>pyvisdk/do/host_nas_volume_spec.py<gh_stars>0 import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def HostNa...
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def HostNasVolumeSpec(vim, *args, **kwargs): '''Specification for creating NAS volume.When...
en
0.701206
######################################## # Automatically generated, do not edit. ######################################## Specification for creating NAS volume.When mounting a NAS volume on multiple hosts, the same remoteHost and remotePath values should be used on every host, otherwise it will be treated as di...
2.369328
2