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
programmers/monthly_challenge/bit.py
mrbartrns/swacademy_structure
0
6630951
# 두개 이하로 다른 비트 def solution(numbers): answer = [] for number in numbers: if not (number & 1): answer.append(number + 1) else: idx = 1 while True: if not (number & (1 << idx)): number |= 1 << idx number ...
# 두개 이하로 다른 비트 def solution(numbers): answer = [] for number in numbers: if not (number & 1): answer.append(number + 1) else: idx = 1 while True: if not (number & (1 << idx)): number |= 1 << idx number ...
ko
1.00007
# 두개 이하로 다른 비트
3.436757
3
user/admin.py
simonprast/bestconnect-backend
0
6630952
<gh_stars>0 from django import forms from django.contrib import admin from django.contrib.auth.models import Group from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from .models import EmailAddress, EmailToken, EmailTokenSpamBlock, PhoneNumber, SystemMessage, User class UserCreationForm(forms.ModelFor...
from django import forms from django.contrib import admin from django.contrib.auth.models import Group from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from .models import EmailAddress, EmailToken, EmailTokenSpamBlock, PhoneNumber, SystemMessage, User class UserCreationForm(forms.ModelForm): """A...
en
0.750688
A form for creating new users. Includes all the required fields, plus a repeated password. # Check that the two password entries match # Save the provided password in hashed format # The custom form handling for creating a user # The fields to be used in displaying the User model. # These override the definitions o...
2.64994
3
alchemyst/ui/routes.py
alexdmoss/alchemyst
0
6630953
import yaml import requests from datetime import datetime from flask import render_template, request, Response, send_from_directory from alchemyst import app, cache from alchemyst.ui.note import note_view from alchemyst.api.routes import note, notes, notes_by_category from alchemyst.api.notes import note_from_dict, n...
import yaml import requests from datetime import datetime from flask import render_template, request, Response, send_from_directory from alchemyst import app, cache from alchemyst.ui.note import note_view from alchemyst.api.routes import note, notes, notes_by_category from alchemyst.api.notes import note_from_dict, n...
none
1
2.194965
2
ABC/146/b.py
fumiyanll23/AtCoder
0
6630954
<filename>ABC/146/b.py def rot_n(s, n): answer = '' for letter in s: answer += chr(ord('A') + (ord(letter)-ord('A')+n) % 26) return answer ### https://qiita.com/TodayInsane/items/94f495db5ba143a8d3e0 N = int(input()) S = str(input()) print(rot_n(S, N))
<filename>ABC/146/b.py def rot_n(s, n): answer = '' for letter in s: answer += chr(ord('A') + (ord(letter)-ord('A')+n) % 26) return answer ### https://qiita.com/TodayInsane/items/94f495db5ba143a8d3e0 N = int(input()) S = str(input()) print(rot_n(S, N))
en
0.565759
### https://qiita.com/TodayInsane/items/94f495db5ba143a8d3e0
3.3019
3
dev/src/load/__init__.py
iamjli/AnswerALS_QTL
0
6630955
#!/usr/bin/env python3 __all__ = ["aals", "data", "hg38"] # module-wide singletons for accessing data from src.load.aals_data import aals from src.load.external_data import data from src.load.genome_data import hg38
#!/usr/bin/env python3 __all__ = ["aals", "data", "hg38"] # module-wide singletons for accessing data from src.load.aals_data import aals from src.load.external_data import data from src.load.genome_data import hg38
en
0.275299
#!/usr/bin/env python3 # module-wide singletons for accessing data
1.195293
1
gnome/hsctrl2gnome.py
LarsVomMars/hsctrl2X
1
6630956
<gh_stars>1-10 #!/bin/env python from gi import require_version require_version('Gtk', '3.0') require_version('AppIndicator3', '0.1') require_version('Notify', '0.7') from subprocess import check_output, CalledProcessError from gi.repository import Gtk, GLib, AppIndicator3, Notify Notify.init("headset-charge-notify...
#!/bin/env python from gi import require_version require_version('Gtk', '3.0') require_version('AppIndicator3', '0.1') require_version('Notify', '0.7') from subprocess import check_output, CalledProcessError from gi.repository import Gtk, GLib, AppIndicator3, Notify Notify.init("headset-charge-notify") MAX_BATTERY...
ru
0.206726
#!/bin/env python
2.438191
2
scrape/scrape_history.py
MOOC-Learner-Project/MOOC-Learner-BigQuery-Data-Science-Analytics
0
6630957
<gh_stars>0 import pandas as pd import pickle from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import StaleElementReferenceException, NoSuchElementException, NoSuchWindowException, InvalidElementStateException...
import pandas as pd import pickle from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import StaleElementReferenceException, NoSuchElementException, NoSuchWindowException, InvalidElementStateException, Unexpected...
en
0.841441
#sys.argv[5] is 'reload', giving option to restart scraping from a later index # points to data dirs with csvs of usernames # url for unit pset # get problem tab webpage id and problem id # get button, modal, and form history webpage ids # get usernames # command line option to reload - start from particular index # ch...
2.440285
2
packages/conan/recipes/python/test_package/testpy.py
boberfly/aswf-docker
3
6630958
<filename>packages/conan/recipes/python/test_package/testpy.py import sys print(sys.version_info) print(sys.path)
<filename>packages/conan/recipes/python/test_package/testpy.py import sys print(sys.version_info) print(sys.path)
none
1
1.134171
1
python/raft/setup.py
kaatish/raft
0
6630959
# # Copyright (c) 2020-2022, NVIDIA CORPORATION. # # 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 ag...
# # Copyright (c) 2020-2022, NVIDIA CORPORATION. # # 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 ag...
en
0.497851
# # Copyright (c) 2020-2022, NVIDIA CORPORATION. # # 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 ag...
1.401652
1
translation.py
navaneethrkrishna007/Rex-TelegramOrgRoBot
0
6630960
<reponame>navaneethrkrishna007/Rex-TelegramOrgRoBot class Translation(object): START_TEXT = """Hi! Hai Iam a Simple My.telegram.org Bot. To Get API ID & API HASH Enter your Telegram Phone Number With Country Code. 🤖 𝙱𝚘𝚝 𝚄𝚙𝚍𝚊𝚝𝚎𝚜 : @Madez_Offical Click /Start To Restart The Progress""" AFTER_RECVD_C...
class Translation(object): START_TEXT = """Hi! Hai Iam a Simple My.telegram.org Bot. To Get API ID & API HASH Enter your Telegram Phone Number With Country Code. 🤖 𝙱𝚘𝚝 𝚄𝚙𝚍𝚊𝚝𝚎𝚜 : @Madez_Offical Click /Start To Restart The Progress""" AFTER_RECVD_CODE_TEXT = """I see! Now please send the Telegram co...
en
0.693052
Hi! Hai Iam a Simple My.telegram.org Bot. To Get API ID & API HASH Enter your Telegram Phone Number With Country Code. 🤖 𝙱𝚘𝚝 𝚄𝚙𝚍𝚊𝚝𝚎𝚜 : @Madez_Offical Click /Start To Restart The Progress I see! Now please send the Telegram code that you received from Telegram! This code is only used for the purpose of ge...
2.945044
3
migrations/versions/ccd22863e633_create_seft_instrument_table.py
ONSdigital/ras-collection-instrument
2
6630961
"""create seft instrument table Revision ID: <KEY> Revises: 72912058602c Create Date: 2018-02-20 13:22:14.773113 """ import sqlalchemy as sa from alembic import op from application.models import GUID # revision identifiers, used by Alembic. revision = "<KEY>" down_revision = "72912058602c" branch_labels = None depe...
"""create seft instrument table Revision ID: <KEY> Revises: 72912058602c Create Date: 2018-02-20 13:22:14.773113 """ import sqlalchemy as sa from alembic import op from application.models import GUID # revision identifiers, used by Alembic. revision = "<KEY>" down_revision = "72912058602c" branch_labels = None depe...
en
0.378338
create seft instrument table Revision ID: <KEY> Revises: 72912058602c Create Date: 2018-02-20 13:22:14.773113 # revision identifiers, used by Alembic.
1.543696
2
backend/pose_estimation_consumer_sync.py
j4qfrost/pose-estimation-stream
0
6630962
import subprocess, sys, time, os import json, numpy import cv2 from twitchstream.outputvideo import TwitchBufferedOutputStream from pose_estimation import PoseProcessor # import tensorflow as tf import torch import posenet FFMPEG= 'ffmpeg' FFPROBE = 'ffprobe' def get_stream_resolution(stream_name): metadata = {} ...
import subprocess, sys, time, os import json, numpy import cv2 from twitchstream.outputvideo import TwitchBufferedOutputStream from pose_estimation import PoseProcessor # import tensorflow as tf import torch import posenet FFMPEG= 'ffmpeg' FFPROBE = 'ffprobe' def get_stream_resolution(stream_name): metadata = {} ...
en
0.444499
# import tensorflow as tf # read 432*240*3 bytes (= 1 frame) # config = tf.ConfigProto() # config.intra_op_parallelism_threads = 4 # config.inter_op_parallelism_threads = 4 # with tf.Session(config=config) as sess: # model_cfg, model_outputs = posenet.load_model(3, sess) # frame = tf.placeholder(tf.uint8, shape=(heig...
2.253386
2
FeatureMapVisualizer/visualizer.py
lukysummer/FeatureVisualizer
1
6630963
<filename>FeatureMapVisualizer/visualizer.py import os import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as mcolors from collections import Counter import cv2 from PIL import Image, ImageFile import torch import torchvision import torch.nn.functional as F from torch import nn, optim from torc...
<filename>FeatureMapVisualizer/visualizer.py import os import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as mcolors from collections import Counter import cv2 from PIL import Image, ImageFile import torch import torchvision import torch.nn.functional as F from torch import nn, optim from torc...
en
0.656934
### Feature Map Visualization class: ### Contains various functions for visualization methods using convolutional feature maps || PARAMETERS || model : (PyTorch model) model_type : (str) must be "resnet" or "vgg" ec : (bool) True if using encoder...
2.480209
2
thonny/plugins/backend/birdseye_backend.py
rjalif199/thonny
2
6630964
import os from thonny.plugins.cpython.cpython_backend import ( get_backend, Executor, return_execution_result, prepare_hooks, ) def _cmd_Birdseye(cmd): backend = get_backend() backend.switch_env_to_script_mode(cmd) return backend._execute_file(cmd, BirdsEyeRunner) class BirdsEyeRunner(E...
import os from thonny.plugins.cpython.cpython_backend import ( get_backend, Executor, return_execution_result, prepare_hooks, ) def _cmd_Birdseye(cmd): backend = get_backend() backend.switch_env_to_script_mode(cmd) return backend._execute_file(cmd, BirdsEyeRunner) class BirdsEyeRunner(E...
en
0.94183
# ignore ast_postprocessors, because birdseye requires source # @UnresolvedImport # Following is a trick, which allows importing birdseye in the backends, # which doesn't have it installed (provided it is installed for frontend Python) # TODO: it would be good to do this here, but it's slow # import birdseye.bird # ne...
2.20893
2
backend/mythbusters/users/views/users_views.py
MayankJ99/MythBuster
0
6630965
from django.shortcuts import render from django.http import JsonResponse from rest_framework.response import Response from rest_framework.decorators import api_view, permission_classes from users.serializers import * from users.models import * # Create your views here. from rest_framework import status from django.cont...
from django.shortcuts import render from django.http import JsonResponse from rest_framework.response import Response from rest_framework.decorators import api_view, permission_classes from users.serializers import * from users.models import * # Create your views here. from rest_framework import status from django.cont...
en
0.697569
# Create your views here. #create a GET view to return all users from the User model in Django #create a GET view to return one particular user from the User model in Django using the pk #create a GET view called get_current_user_profile that will be a protected route to return the current user's profile #create a POST...
2.223803
2
togglcmder/toggl/decoders/time_entry_decoder.py
yatesjr/toggl-cmder
3
6630966
from json import JSONDecoder from togglcmder.toggl.builders.time_entry_builder import TimeEntryBuilder class TimeEntryDecoder(JSONDecoder): def __init__(self, *args: tuple, **kwargs: dict): JSONDecoder.__init__(self, object_hook=TimeEntryDecoder.object_hook, ...
from json import JSONDecoder from togglcmder.toggl.builders.time_entry_builder import TimeEntryBuilder class TimeEntryDecoder(JSONDecoder): def __init__(self, *args: tuple, **kwargs: dict): JSONDecoder.__init__(self, object_hook=TimeEntryDecoder.object_hook, ...
none
1
2.406256
2
pandas/core/algorithms.py
flexlee/pandas
0
6630967
<gh_stars>0 """ Generic data algorithms. This module is experimental at the moment and not intended for public consumption """ import numpy as np import pandas.core.common as com import pandas.lib as lib import pandas._algos as _algos def match(to_match, values, na_sentinel=-1): """ Compute locations of to_...
""" Generic data algorithms. This module is experimental at the moment and not intended for public consumption """ import numpy as np import pandas.core.common as com import pandas.lib as lib import pandas._algos as _algos def match(to_match, values, na_sentinel=-1): """ Compute locations of to_match into v...
en
0.497672
Generic data algorithms. This module is experimental at the moment and not intended for public consumption Compute locations of to_match into values Parameters ---------- to_match : array-like values to find positions of values : array-like Unique set of values na_sentinel : int, de...
2.931167
3
Solutions/p0017.py
JCMarcoG/project_euler
0
6630968
# Solution to Problem 0015 def solution(): #dictionary to store the values dic = {n:0 for n in range(0,1001)} #initial values manually dic[0] = 0 #'' dic[1] = 3 #'one' dic[2] = 3 #'two' dic[3] = 5 #'three' dic[4] = 4 #'four' dic[5] = 4 #'five' dic[6] = 3 #'six' dic...
# Solution to Problem 0015 def solution(): #dictionary to store the values dic = {n:0 for n in range(0,1001)} #initial values manually dic[0] = 0 #'' dic[1] = 3 #'one' dic[2] = 3 #'two' dic[3] = 5 #'three' dic[4] = 4 #'four' dic[5] = 4 #'five' dic[6] = 3 #'six' dic...
en
0.342679
# Solution to Problem 0015 #dictionary to store the values #initial values manually #'' #'one' #'two' #'three' #'four' #'five' #'six' #'seven' #'eight' #'nine' #'ten' #'eleven' #'twelve' #'thirteen' #'fourteen' #'fifteen' #'sixteen' #'seventeen' #'eighteen' #'nineteen' #'twenty' #'thirty' #'forty' #'fifty' #'sixty' #'s...
3.098328
3
pdia/responseReconstruction/parseBQResponses.py
yangjiang001/pdia-1
0
6630969
# coding: utf-8 # # Reconstructing 2017 SQ Responses # # ``` # <NAME> # 2017-07-14 # ``` # import sys import pandas as pd from pdia.responseReconstruction.extractBQChoice import parseBQChoice from pdia.responseReconstruction.extractBQMC import parseBQMC from pdia.responseReconstruction.extractBQNumeric import pa...
# coding: utf-8 # # Reconstructing 2017 SQ Responses # # ``` # <NAME> # 2017-07-14 # ``` # import sys import pandas as pd from pdia.responseReconstruction.extractBQChoice import parseBQChoice from pdia.responseReconstruction.extractBQMC import parseBQMC from pdia.responseReconstruction.extractBQNumeric import pa...
en
0.547753
# coding: utf-8 # # Reconstructing 2017 SQ Responses # # ``` # <NAME> # 2017-07-14 # ``` # Parse the SQ response data, extract the responses from the JSON data :param df: the input data frame :type df: Pandas data frame :param label: optional, name of the column indicating the item type, which determi...
2.83704
3
var/spack/repos/builtin/packages/r-sandwich/package.py
xiki-tempula/spack
9
6630970
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RSandwich(RPackage): """Model-robust standard error estimators for cross-sectional, time s...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RSandwich(RPackage): """Model-robust standard error estimators for cross-sectional, time s...
en
0.624971
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) Model-robust standard error estimators for cross-sectional, time series, and longitudinal data.
1.326958
1
app/bot/conversations/query.py
DramatikMan/mlhl-01-python-bot
0
6630971
<reponame>DramatikMan/mlhl-01-python-bot<gh_stars>0 import sqlite3 from collections.abc import Iterable from io import BytesIO import matplotlib.pyplot as plt import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split from telegram import ( Update, ...
import sqlite3 from collections.abc import Iterable from io import BytesIO import matplotlib.pyplot as plt import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split from telegram import ( Update, ReplyKeyboardMarkup, ForceReply, ReplyKeyb...
en
0.14806
SELECT count(price_doc) , avg(price_doc) FROM data {WHERE_SQL} SELECT * FROM data {WHERE_SQL} SELECT * FROM data {WHERE_SQL} # type: ignore SELECT {', '.join(params)}, pr...
1.993867
2
AStarSearch/student_code.py
jingr1/SelfDrivingCar
0
6630972
import math def dist_between(start,end): return math.sqrt(pow((start[0]-end[0]),2)+pow((start[1]-end[1]),2)) def get_best_f_score(input_set,scoredict): idx = input_set.pop() input_set.add(idx) best = idx bv = scoredict[idx] for idx in input_set: if scoredict[idx] < bv: bes...
import math def dist_between(start,end): return math.sqrt(pow((start[0]-end[0]),2)+pow((start[1]-end[1]),2)) def get_best_f_score(input_set,scoredict): idx = input_set.pop() input_set.add(idx) best = idx bv = scoredict[idx] for idx in input_set: if scoredict[idx] < bv: bes...
none
1
3.531246
4
release.py
SHSharkar/geolocationapi
0
6630973
<reponame>SHSharkar/geolocationapi import io import os import shutil import tarfile import requests GEOIP2_DB_URL = ( "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=iZmGL4IowR8JrRsv&suffix=tar.gz" ) r = requests.get(GEOIP2_DB_URL) tar = tarfile.open(mode="r:gz", fileobj=i...
import io import os import shutil import tarfile import requests GEOIP2_DB_URL = ( "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=iZmGL4IowR8JrRsv&suffix=tar.gz" ) r = requests.get(GEOIP2_DB_URL) tar = tarfile.open(mode="r:gz", fileobj=io.BytesIO(r.content)) for member in...
none
1
2.770785
3
xreshaper/datasets.py
NCAR/xarray-pyreshaper
0
6630974
<reponame>NCAR/xarray-pyreshaper #!/usr/bin/env python from __future__ import absolute_import, print_function import os import numpy as np import pandas as pd import xarray as xr def create_data_array(time, lat, lon, name): """Generate some random xarray dataarray""" data_array = xr.DataArray( np.ra...
#!/usr/bin/env python from __future__ import absolute_import, print_function import os import numpy as np import pandas as pd import xarray as xr def create_data_array(time, lat, lon, name): """Generate some random xarray dataarray""" data_array = xr.DataArray( np.random.randn(len([time]), len(lat),...
en
0.3797
#!/usr/bin/env python Generate some random xarray dataarray Create xarray 'time-slice' dataset and save it to disk # generate latitude and longitude values # Create some variables # Create some meta data variables. These variables are the same for all # time slices # Add some global attributes to our dataset
3.261089
3
commands/textchannelname.py
MehmetSalihK/AutoVoiceChannels
0
6630975
import discord import utils import functions as func from commands.base import Cmd help_text = [ [ ("Usage:", "<PREFIX><COMMAND> `NEW NAME`"), ("Description:", "Modifiez le nom des canaux de texte privés temporaires créés pour chaque conversation vocale si `textchannels` est activé." ...
import discord import utils import functions as func from commands.base import Cmd help_text = [ [ ("Usage:", "<PREFIX><COMMAND> `NEW NAME`"), ("Description:", "Modifiez le nom des canaux de texte privés temporaires créés pour chaque conversation vocale si `textchannels` est activé." ...
en
0.898794
# Can't have newlines in channel name.
2.588737
3
src/bxcommon/services/http_service.py
thabaptiser/bxcommon
0
6630976
<gh_stars>0 import json from ssl import SSLContext from typing import Optional, Dict, Any, Union, List import status from urllib3 import Retry, HTTPResponse from urllib3.exceptions import HTTPError, MaxRetryError from urllib3.poolmanager import PoolManager from urllib3.util import parse_url from bxcommon import const...
import json from ssl import SSLContext from typing import Optional, Dict, Any, Union, List import status from urllib3 import Retry, HTTPResponse from urllib3.exceptions import HTTPError, MaxRetryError from urllib3.poolmanager import PoolManager from urllib3.util import parse_url from bxcommon import constants from bx...
en
0.714865
# recursive types are not supported: https://github.com/python/typing/issues/182 # pylint: disable=global-statement # pylint: disable=global-statement # pylint: disable=broad-except
2.059291
2
sgtpy/gammamie_mixtures/ares.py
MatKie/SGTPy
12
6630977
<reponame>MatKie/SGTPy<gh_stars>10-100 from __future__ import division, print_function, absolute_import import numpy as np from .a1sB_monomer import a1sB_eval, da1sB_dxhi00_eval, d2a1sB_dxhi00_eval from .a1sB_monomer import d3a1sB_dxhi00_eval from .a1sB_monomer import da1sB_dx_eval, da1sB_dx_dxhi00_eval from .a1sB_mono...
from __future__ import division, print_function, absolute_import import numpy as np from .a1sB_monomer import a1sB_eval, da1sB_dxhi00_eval, d2a1sB_dxhi00_eval from .a1sB_monomer import d3a1sB_dxhi00_eval from .a1sB_monomer import da1sB_dx_eval, da1sB_dx_dxhi00_eval from .a1sB_monomer import da1sB_dx_dxhi00_dxxhi_eval f...
en
0.428406
# Eq. (14) Paper 2014 # Eq (22) Paper 2014 # monomer contribution calculation # lambdaskl = self.lambdaskl # zero order pertubation # first order pertubation # second order pertubation # third order pertubaton # chain contribution calculation # lambdasii = self.lambdasii # g hard sphere # gamma_c # g1sigma # g2sigma # ...
1.293054
1
panel/models/katex.py
vaishali-verma-19/panel
0
6630978
""" Defines a custom KaTeX bokeh model to render text using KaTeX. """ from bokeh.models import Markup class KaTeX(Markup): """ A bokeh model that renders text using KaTeX. """ __javascript__ = ["https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.js", "https://cdn.jsde...
""" Defines a custom KaTeX bokeh model to render text using KaTeX. """ from bokeh.models import Markup class KaTeX(Markup): """ A bokeh model that renders text using KaTeX. """ __javascript__ = ["https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.js", "https://cdn.jsde...
en
0.469744
Defines a custom KaTeX bokeh model to render text using KaTeX. A bokeh model that renders text using KaTeX.
2.703484
3
cmz/cms_news/migrations/0006_newstranslation_body.py
inmagik/cmz
1
6630979
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-09-23 20:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms_news', '0005_remove_newstranslation_body'), ] operations = [ migrations....
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-09-23 20:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms_news', '0005_remove_newstranslation_body'), ] operations = [ migrations....
en
0.800454
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-09-23 20:47
1.519499
2
cfn_pyplates/utils.py
JSainsburyPLC/cfn-pyplates
0
6630980
<reponame>JSainsburyPLC/cfn-pyplates # Copyright (c) 2013 ReThought Ltd # # 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...
# Copyright (c) 2013 ReThought Ltd # # 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, merge, publish, distr...
en
0.802119
# Copyright (c) 2013 ReThought Ltd # # 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, merge, publish, distr...
2.271383
2
tests/test_command_parser.py
lazToum/redis-py
0
6630981
<gh_stars>0 import pytest from redis.commands import CommandsParser from .conftest import skip_if_server_version_lt class TestCommandsParser: def test_init_commands(self, r): commands_parser = CommandsParser(r) assert commands_parser.commands is not None assert "get" in commands_parser.c...
import pytest from redis.commands import CommandsParser from .conftest import skip_if_server_version_lt class TestCommandsParser: def test_init_commands(self, r): commands_parser = CommandsParser(r) assert commands_parser.commands is not None assert "get" in commands_parser.commands ...
en
0.764123
# A bug in redis<7.0 causes this to fail: https://github.com/redis/redis/issues/9493
2.380957
2
tests/test_models/test_place.py
calypsobronte/AirBnB_clone
0
6630982
#!/usr/bin/python3 """Test State""" import unittest import pep8 from models.place import Place from models.user import User from models.city import City from models.amenity import Amenity class Testplace(unittest.TestCase): """ Test Place """ def test_pep8_conformance_place(self): """Test that we conf...
#!/usr/bin/python3 """Test State""" import unittest import pep8 from models.place import Place from models.user import User from models.city import City from models.amenity import Amenity class Testplace(unittest.TestCase): """ Test Place """ def test_pep8_conformance_place(self): """Test that we conf...
en
0.685444
#!/usr/bin/python3 Test State Test Place Test that we conform to PEP8. Test attributes of Class Place
3.318442
3
appengine/chrome_infra_packages/cipd/api.py
eunchong/infra
0
6630983
<filename>appengine/chrome_infra_packages/cipd/api.py # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Cloud Endpoints API for Package Repository service.""" import functools import logging import endp...
<filename>appengine/chrome_infra_packages/cipd/api.py # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Cloud Endpoints API for Package Repository service.""" import functools import logging import endp...
en
0.645697
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. Cloud Endpoints API for Package Repository service. # This is used by endpoints indirectly. ##################################################################...
1.958108
2
var/spack/repos/builtin/packages/tclap/package.py
HaochengLIU/spack
2
6630984
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Tclap(AutotoolsPackage): """Templatized C++ Command Line Parser""" homepage = "http:/...
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Tclap(AutotoolsPackage): """Templatized C++ Command Line Parser""" homepage = "http:/...
en
0.616952
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) Templatized C++ Command Line Parser
1.181775
1
backend/apps/events/migrations/0001_initial.py
dominikbullo/SportAgenda
0
6630985
<gh_stars>0 # Generated by Django 3.1.2 on 2020-10-27 20:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fie...
# Generated by Django 3.1.2 on 2020-10-27 20:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ...
en
0.768677
# Generated by Django 3.1.2 on 2020-10-27 20:14
2.063211
2
ontonotes5_to_json.py
geraltofrivia/ontonotes-5-parsing
0
6630986
from argparse import ArgumentParser import codecs import gc import json import os import random import traceback import tarfile from tempfile import NamedTemporaryFile from tqdm import tqdm from ontonotes5.utils import parse_file, parse_splitting, check_onf_name from ontonotes5.utils import get_language_by_filename f...
from argparse import ArgumentParser import codecs import gc import json import os import random import traceback import tarfile from tempfile import NamedTemporaryFile from tqdm import tqdm from ontonotes5.utils import parse_file, parse_splitting, check_onf_name from ontonotes5.utils import get_language_by_filename f...
en
0.450857
# onf_names = onf_names[:100] # random.shuffle(data_for_training) # random.shuffle(data_for_validation) # random.shuffle(data_for_testing)
2.198978
2
upwork/routers/workdays.py
upwork/python-upwork
150
6630987
# Licensed under the Upwork's API Terms of Use; # you may not use this file except in compliance with the Terms. # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or i...
# Licensed under the Upwork's API Terms of Use; # you may not use this file except in compliance with the Terms. # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or i...
en
0.810003
# Licensed under the Upwork's API Terms of Use; # you may not use this file except in compliance with the Terms. # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or i...
2.283705
2
fragmenstein/victor/_victor_validate.py
matteoferla/Fragmenstein
41
6630988
from rdkit import Chem from ._victor_base import _VictorBase from ..m_rmsd import mRSMD class _VictorValidate(_VictorBase): def validate(self, reference_mol: Chem.Mol): """ Get how well the results compare. Alternative, do a docking with victor.dock() (-> Chem.Mol) :param refere...
from rdkit import Chem from ._victor_base import _VictorBase from ..m_rmsd import mRSMD class _VictorValidate(_VictorBase): def validate(self, reference_mol: Chem.Mol): """ Get how well the results compare. Alternative, do a docking with victor.dock() (-> Chem.Mol) :param refere...
en
0.600657
Get how well the results compare. Alternative, do a docking with victor.dock() (-> Chem.Mol) :param reference_mol: Crystal structure mol :return: # compare with reference mol
2.105664
2
The_ultimate_cloud_ops-install_kubernetes_with_kops-automate_jobs_with_jenkins/3_Tools/create_ec2_server_instance.py
spinningops/SpinningOps_Courses
0
6630989
<gh_stars>0 import boto3 ec2 = boto3.resource('ec2', region_name='us-east-1') # create a new EC2 instance instances = ec2.create_instances( ImageId='ami-013f17f36f8b1fefb', MinCount=1, MaxCount=1, InstanceType='t2.micro', KeyName='SpinningOps_Key', SecurityGroupIds=[ '<KEY>', ...
import boto3 ec2 = boto3.resource('ec2', region_name='us-east-1') # create a new EC2 instance instances = ec2.create_instances( ImageId='ami-013f17f36f8b1fefb', MinCount=1, MaxCount=1, InstanceType='t2.micro', KeyName='SpinningOps_Key', SecurityGroupIds=[ '<KEY>', ], ...
en
0.251346
# create a new EC2 instance
2.242979
2
src/create_plot.py
thomasreolon/DeepfakeDetection
2
6630990
import os, pathlib from videoanalizer import VideoAnalizer os.chdir(pathlib.Path(__file__).parent.absolute()) vd = VideoAnalizer() ############ Plot videos in a graph ROOT_DIR = '../test_data/videos' SAVE_PATH= '../output' # where plots are saved folders_list=[ # each sublist will have a different c...
import os, pathlib from videoanalizer import VideoAnalizer os.chdir(pathlib.Path(__file__).parent.absolute()) vd = VideoAnalizer() ############ Plot videos in a graph ROOT_DIR = '../test_data/videos' SAVE_PATH= '../output' # where plots are saved folders_list=[ # each sublist will have a different c...
en
0.890336
############ Plot videos in a graph # where plots are saved # each sublist will have a different color in the plot # relative path from ROOT_DIR
2.250863
2
datascience/api/inspect.py
rlmwang/datascience-workspace
0
6630991
<gh_stars>0 import re from inspect import Parameter, signature from .typing import get_args, get_origin def inspect_inputs(func): """ Inspects the signature of a function and returns its input parameters as a dictionary. """ parameters = signature(func).parameters return { param.name...
import re from inspect import Parameter, signature from .typing import get_args, get_origin def inspect_inputs(func): """ Inspects the signature of a function and returns its input parameters as a dictionary. """ parameters = signature(func).parameters return { param.name: { ...
en
0.78954
Inspects the signature of a function and returns its input parameters as a dictionary. Inspects the signature of a function and returns its output parameters as a dictionary.
2.870885
3
Analysis/EstimateTRAPPIST1Radius/estRad.py
dflemin3/trappist
1
6630992
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Estimate the distribution of TRAPPIST-1's radius using our stellar mass posterior distributions and the Delrez et al. (2018) density constraint following the procedure outlined in Van Grootel et al. (2018). Script output: Radius [Rsun] = 0.120295 + 0.001951 - 0.001821...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Estimate the distribution of TRAPPIST-1's radius using our stellar mass posterior distributions and the Delrez et al. (2018) density constraint following the procedure outlined in Van Grootel et al. (2018). Script output: Radius [Rsun] = 0.120295 + 0.001951 - 0.001821...
en
0.703606
#!/usr/bin/env python # -*- coding: utf-8 -*- Estimate the distribution of TRAPPIST-1's radius using our stellar mass posterior distributions and the Delrez et al. (2018) density constraint following the procedure outlined in Van Grootel et al. (2018). Script output: Radius [Rsun] = 0.120295 + 0.001951 - 0.001821 @a...
2.664402
3
test/test_room.py
DataDog/camplight
1
6630993
# -*- coding: utf-8 -*- import os import sys camplight_root = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..') sys.path.insert(0, camplight_root) import pytest from httpretty import HTTPretty from camplight import Request, Campfire, Room, MessageType, Sound def campfire_url(path=''): return 'htt...
# -*- coding: utf-8 -*- import os import sys camplight_root = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..') sys.path.insert(0, camplight_root) import pytest from httpretty import HTTPretty from camplight import Request, Campfire, Room, MessageType, Sound def campfire_url(path=''): return 'htt...
en
0.242787
# -*- coding: utf-8 -*- {"room": {"name": "Danger", "topic": "No serious discussion"}} {"messages": [{"body": "Hello World", "type": "TextMessage"}]} {"messages": [{"body": "Hello World", "type": "TextMessage"}]} {"messages": [{"body": "Hello World", "type": "TextMessage"}]} {"uploads": [{"name": "file.png", "content_t...
2.173993
2
project_template/urls/api.py
armstrong/armstrong.templates.tutorial
0
6630994
""" Contains URL patterns for a basic API using `Tastypie`_. .. _tastypie: https://github.com/toastdriven/django-tastypie """ from django.conf.urls.defaults import patterns, include, url from apis.api import v1_api urlpatterns = patterns('', url(r'^api/', include(v1_api.urls)), )
""" Contains URL patterns for a basic API using `Tastypie`_. .. _tastypie: https://github.com/toastdriven/django-tastypie """ from django.conf.urls.defaults import patterns, include, url from apis.api import v1_api urlpatterns = patterns('', url(r'^api/', include(v1_api.urls)), )
en
0.369242
Contains URL patterns for a basic API using `Tastypie`_. .. _tastypie: https://github.com/toastdriven/django-tastypie
1.793145
2
src/python/director/visualization.py
edrumwri/director
0
6630995
import director.objectmodel as om import director.applogic as app from .shallowCopy import shallowCopy import director.vtkAll as vtk from director import filterUtils from director import transformUtils from director import callbacks from director import frameupdater from director.fieldcontainer import FieldContainer fr...
import director.objectmodel as om import director.applogic as app from .shallowCopy import shallowCopy import director.vtkAll as vtk from director import filterUtils from director import transformUtils from director import callbacks from director import frameupdater from director.fieldcontainer import FieldContainer fr...
en
0.610079
# 'intensity' : (400, 4000), #self.mapper.SetColorModeToMapScalars() #return self.getCoolToWarmColorMap(scalarRange) #defaultHeight = self._getHeightForWidth(defaultWidth) #self.addProperty('Height', defaultHeight, # attributes=om.PropertyAttributes(minimum=0, maximum=9999, singleStep=10)) # also set th...
1.816939
2
SubGNN/test.py
rmwu/SubGNN
107
6630996
import sys sys.path.insert(0, '..') # add config to path import config import train as tr import os import json import random import numpy as np import argparse class Namespace: def __init__(self, **kwargs): self.__dict__.update(kwargs) def parse_arguments(): parser = argparse.ArgumentParser(descripti...
import sys sys.path.insert(0, '..') # add config to path import config import train as tr import os import json import random import numpy as np import argparse class Namespace: def __init__(self, **kwargs): self.__dict__.update(kwargs) def parse_arguments(): parser = argparse.ArgumentParser(descripti...
en
0.879018
# add config to path ## Defaults #0 and True or 1 and False # dict to keep track of results # for each seed, train a new model # either use a random seed from 0 to 1000000 or use the default random seeds 0-9 #train the model from scratch #read in the model - NOTE that this doesn't differentiaate .ckpt files if multiple...
2.248046
2
flaskr/liff/models.py
kohei25/rakumeshi
2
6630997
<filename>flaskr/liff/models.py<gh_stars>1-10 # from ast import keyword # from flaskr import db # from flaskr.linebot.models import User # class UserFeature(db.Model): # id = db.Column(db.Integer, primary_key=True) # user_id = db.Column(db.ForeignKey(User.id), nullable=False) # sex = db.Column(db.Integer) ...
<filename>flaskr/liff/models.py<gh_stars>1-10 # from ast import keyword # from flaskr import db # from flaskr.linebot.models import User # class UserFeature(db.Model): # id = db.Column(db.Integer, primary_key=True) # user_id = db.Column(db.ForeignKey(User.id), nullable=False) # sex = db.Column(db.Integer) ...
en
0.350645
# from ast import keyword # from flaskr import db # from flaskr.linebot.models import User # class UserFeature(db.Model): # id = db.Column(db.Integer, primary_key=True) # user_id = db.Column(db.ForeignKey(User.id), nullable=False) # sex = db.Column(db.Integer) # age = db.Column(db.Integer) # genre =...
2.363223
2
django_config_gen/management/commands/print_settings.py
brillgen/django-config-gen
1
6630998
<reponame>brillgen/django-config-gen # -*- coding: utf-8 -*- #Copyright (C) 2010, 2011 <NAME> # #Licensed under a BSD 3-Clause License. See LICENSE file. from django.core.management.base import BaseCommand, CommandError from django.conf import settings from .. import patch_settings import json import copy import loggi...
# -*- coding: utf-8 -*- #Copyright (C) 2010, 2011 <NAME> # #Licensed under a BSD 3-Clause License. See LICENSE file. from django.core.management.base import BaseCommand, CommandError from django.conf import settings from .. import patch_settings import json import copy import logging logger = logging.getLogger(__nam...
en
0.831792
# -*- coding: utf-8 -*- #Copyright (C) 2010, 2011 <NAME> # #Licensed under a BSD 3-Clause License. See LICENSE file. #remove logging statements from output #if settings has something like "import django.conf.global_settings as DEFAULT_SETTINGS" #in it, then json encoding will throw and error. Copying makes #sure module...
2.155541
2
renku/service/config.py
almutlue/renku-python
0
6630999
# -*- coding: utf-8 -*- # # Copyright 2020 - Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compli...
# -*- coding: utf-8 -*- # # Copyright 2020 - Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compli...
en
0.76791
# -*- coding: utf-8 -*- # # Copyright 2020 - Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compli...
1.810425
2
pysagec/models.py
migonzalvar/pysagec
3
6631000
from urllib.parse import urlsplit, parse_qs from .base import Model, Nested, String def key_or_none(qs, key): iterable = qs.get(key, [None]) return iterable[0] class AuthInfo(Model): root_tag = 'mrw:AuthInfo' franchise_code = String('mrw:CodigoFranquicia') subscriber_code = String('mrw:CodigoA...
from urllib.parse import urlsplit, parse_qs from .base import Model, Nested, String def key_or_none(qs, key): iterable = qs.get(key, [None]) return iterable[0] class AuthInfo(Model): root_tag = 'mrw:AuthInfo' franchise_code = String('mrw:CodigoFranquicia') subscriber_code = String('mrw:CodigoA...
none
1
2.463649
2
scripts/models/k_fold_model.py
daniele21/DL_soccer_prediction_v2
0
6631001
<reponame>daniele21/DL_soccer_prediction_v2 from torch.utils.data import DataLoader import numpy as np import torch from tqdm import tqdm from copy import deepcopy from torch.multiprocessing import Process, set_start_method from scripts.constants.configs import HOME, AWAY from scripts.models.base import Base_Model fro...
from torch.utils.data import DataLoader import numpy as np import torch from tqdm import tqdm from copy import deepcopy from torch.multiprocessing import Process, set_start_method from scripts.constants.configs import HOME, AWAY from scripts.models.base import Base_Model from scripts.models.model_utils import get_devi...
en
0.411117
# REPRODUCIBILITY # Dataset size Inference with all models, in a dict Args: testloader: dataloader containing the test data field: type of match [HOME / AWAY] Returns: preds: dict{ KEY: model number VALUE: list of predictions} # logge...
2.113641
2
kaldi_recipes/local/make_train_dev_test_splits.py
skesiraju/indic-kws
0
6631002
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # author : <NAME> # e-mail : kesiraju[AT]fit[DOT]vutbr[DOT]cz # Date created : 03 Jun 2021 # Last modified : 03 Jun 2021 """ Get total duration on utterances. If input is utt2dur, the calculation is straightforward. If the input is wav.scp then will use sox command to ge...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # author : <NAME> # e-mail : kesiraju[AT]fit[DOT]vutbr[DOT]cz # Date created : 03 Jun 2021 # Last modified : 03 Jun 2021 """ Get total duration on utterances. If input is utt2dur, the calculation is straightforward. If the input is wav.scp then will use sox command to ge...
en
0.708219
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # author : <NAME> # e-mail : kesiraju[AT]fit[DOT]vutbr[DOT]cz # Date created : 03 Jun 2021 # Last modified : 03 Jun 2021 Get total duration on utterances. If input is utt2dur, the calculation is straightforward. If the input is wav.scp then will use sox command to get the ...
2.698177
3
algorithms/implementation/angry_professor.py
avenet/hackerrank
0
6631003
cases = int(input()) for cases in range(cases): n, k = map( int, input().split() ) arrivals = map(int, input().split()) early_comers = len([x for x in arrivals if x <= 0]) if early_comers >= k: print('NO') else: print('YES')
cases = int(input()) for cases in range(cases): n, k = map( int, input().split() ) arrivals = map(int, input().split()) early_comers = len([x for x in arrivals if x <= 0]) if early_comers >= k: print('NO') else: print('YES')
none
1
3.106714
3
Week 5 - 03.03.2021 DAA Lab/ActivitySelection_Day5.py
abhisheks008/Design-and-Analysis-Algorithm-Lab-4th-Semester
4
6631004
# Author : <NAME> # Q2. Activity Selection problem using Python 3 # Design analysis and Algorithm Problems # difficulty : medium # score : 10 def printMaxActivities(start , finish): n = len(start) z = 1 i = 0 for j in range(1,n): if start[j] >= finish[i]: z = z + 1 ...
# Author : <NAME> # Q2. Activity Selection problem using Python 3 # Design analysis and Algorithm Problems # difficulty : medium # score : 10 def printMaxActivities(start , finish): n = len(start) z = 1 i = 0 for j in range(1,n): if start[j] >= finish[i]: z = z + 1 ...
en
0.666973
# Author : <NAME> # Q2. Activity Selection problem using Python 3 # Design analysis and Algorithm Problems # difficulty : medium # score : 10 # Author : <NAME>
3.504249
4
lib/datasets/imagenet.py
j40903272/bottom-up-attention-py3
0
6631005
from __future__ import print_function # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- from future import standard_library stan...
from __future__ import print_function # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- from future import standard_library stan...
en
0.677775
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- #check for valid intersection between video and image classes # Default to roid...
2.031024
2
models/ernie.py
biubiubiiu/SpamClassification
0
6631006
<filename>models/ernie.py from torch import nn from pytorch_pretrained import BertModel class Ernie(nn.Module): def __init__(self, config): super(Ernie, self).__init__() self.ernie = BertModel.from_pretrained('pretrained/ernie') for param in self.ernie.parameters(): param.req...
<filename>models/ernie.py from torch import nn from pytorch_pretrained import BertModel class Ernie(nn.Module): def __init__(self, config): super(Ernie, self).__init__() self.ernie = BertModel.from_pretrained('pretrained/ernie') for param in self.ernie.parameters(): param.req...
none
1
2.674528
3
setup.py
LeoXing1996/GeNeVA
1
6631007
<reponame>LeoXing1996/GeNeVA # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from setuptools import setup from setuptools import find_packages setup( name='GeNeVA', version='1.0', url='http://github.com/Maluuba/GeNeVA', author='Microsoft Research', desc...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from setuptools import setup from setuptools import find_packages setup( name='GeNeVA', version='1.0', url='http://github.com/Maluuba/GeNeVA', author='Microsoft Research', description='Code to train and ev...
en
0.827842
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # packages=['geneva'],
0.936702
1
src/gtk/toga_gtk/widgets/numberinput.py
jrwdunham/toga
0
6631008
<gh_stars>0 from gi.repository import Gtk from toga.interface import NumberInput as NumberInputInterface from .base import WidgetMixin class NumberInput(WidgetMixin, NumberInputInterface): def __init__(self, id=None, style=None, min_value=0, max_value=100, step=1, **ex): super().__init_...
from gi.repository import Gtk from toga.interface import NumberInput as NumberInputInterface from .base import WidgetMixin class NumberInput(WidgetMixin, NumberInputInterface): def __init__(self, id=None, style=None, min_value=0, max_value=100, step=1, **ex): super().__init__(id=id, sty...
none
1
2.33493
2
voyager/resources/fireballresource.py
marwynnsomridhivej/voyager
1
6631009
import datetime from asyncio.events import AbstractEventLoop from typing import Generator, List, Union from ..exceptions import VoyagerException from .base import BaseResource __all__ = [ 'FireballResource', ] class FireballRecord(object): __slots__ = [ '_fc', '_date', '_lat', ...
import datetime from asyncio.events import AbstractEventLoop from typing import Generator, List, Union from ..exceptions import VoyagerException from .base import BaseResource __all__ = [ 'FireballResource', ] class FireballRecord(object): __slots__ = [ '_fc', '_date', '_lat', ...
none
1
2.066879
2
neps/minerador.py
matheusdomis/OBI
2
6631010
<gh_stars>1-10 nm = [int(x) for x in input().split()] v = [float(x) for x in input().split()] g = [float(x) for x in input().split()] lmax = [0,0] lmin = [float('inf'),0] for i in range(nm[0]): l = sum(g[:i+1]) * v[i] * nm[1] if l > lmax[0]: lmax[0] = l lmax[1] = i+1 if l < lmin[0]: lmin[0] = l lmin[1] = i+1...
nm = [int(x) for x in input().split()] v = [float(x) for x in input().split()] g = [float(x) for x in input().split()] lmax = [0,0] lmin = [float('inf'),0] for i in range(nm[0]): l = sum(g[:i+1]) * v[i] * nm[1] if l > lmax[0]: lmax[0] = l lmax[1] = i+1 if l < lmin[0]: lmin[0] = l lmin[1] = i+1 print("%d %.2f...
none
1
2.951248
3
tools/train_net.py
dylan-campbell/Motionformer
153
6631011
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """Train a video classification model.""" import numpy as np import pickle import pprint from timm.data import Mixup import torch from fvcore.nn.precise_bn import get_bn_modules, update_bn_stats from slowfast.config.defaul...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """Train a video classification model.""" import numpy as np import pickle import pprint from timm.data import Mixup import torch from fvcore.nn.precise_bn import get_bn_modules, update_bn_stats from slowfast.config.defaul...
en
0.779146
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. Train a video classification model. Perform the video training for one epoch. Args: train_loader (loader): video training loader. model (model): the video model to train. optimizer (optim): the opt...
2.282494
2
MyExtenstion.extension/Gaochao.tab/Gaochao.panel/Structure_Create.pulldown/Beam_From_CAD.pushbutton/script(bake).py
gaochaowyq/MyPyRevitExtentision
0
6631012
# -*- coding: utf-8 -*- __doc__="根据导入的CAD绘制结构梁" import sys import os from collections import namedtuple from Autodesk.Revit.DB.Architecture import Room import rpw from rpw import doc, uidoc, DB, UI, db, ui from rpw.ui.forms import FlexForm, Label, ComboBox, TextBox, TextBox,Separator, Button,SelectFromList import json...
# -*- coding: utf-8 -*- __doc__="根据导入的CAD绘制结构梁" import sys import os from collections import namedtuple from Autodesk.Revit.DB.Architecture import Room import rpw from rpw import doc, uidoc, DB, UI, db, ui from rpw.ui.forms import FlexForm, Label, ComboBox, TextBox, TextBox,Separator, Button,SelectFromList import json...
zh
0.124791
# -*- coding: utf-8 -*- #信息输入部分 # #print(abc) #for i in range(0,len(pt)-1): # lines.append(DB.Line.CreateBound(pt[i],pt[1+1])); #rtn=lines #print(crv.GetType())
2.040957
2
fortnitepy/errors.py
Jawschamp/fortnitepy
0
6631013
# -*- coding: utf-8 -*- """ MIT License Copyright (c) 2019 Terbau 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, modif...
# -*- coding: utf-8 -*- """ MIT License Copyright (c) 2019 Terbau 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, modif...
en
0.843
# -*- coding: utf-8 -*- MIT License Copyright (c) 2019 Terbau 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, me...
2.235627
2
highway_env/envs/merge_out_origin.py
jasonplato/High_SimulationPlatform
0
6631014
<reponame>jasonplato/High_SimulationPlatform from __future__ import division, print_function, absolute_import import numpy as np from highway_env import utils from highway_env.envs.abstract import AbstractEnv from highway_env.road.lane import LineType, StraightLane, SineLane, LanesConcatenation from highway_env.road.r...
from __future__ import division, print_function, absolute_import import numpy as np from highway_env import utils from highway_env.envs.abstract import AbstractEnv from highway_env.road.lane import LineType, StraightLane, SineLane, LanesConcatenation from highway_env.road.road import Road from highway_env.vehicle.cont...
en
0.733579
action_explain = ['left acc', 'left same', 'left dec', 'same acc', 'same same', 'same dec', 'right acc', 'right same', 'right dec'] MOBIL lane change model: Minimizing Overall Braking Induced by a Lane change The vehicle should change lane only if: - after changing it (and...
2.764081
3
Time.py
DefJia/Auto_Reservation_System_BE
15
6631015
<reponame>DefJia/Auto_Reservation_System_BE<filename>Time.py<gh_stars>10-100 import datetime import time import requests from configparser import ConfigParser import ast class Time: def __init__(self): self.cfg = ConfigParser() self.cfg.read('.config.ini', encoding='utf8') def wait_until(self...
import datetime import time import requests from configparser import ConfigParser import ast class Time: def __init__(self): self.cfg = ConfigParser() self.cfg.read('.config.ini', encoding='utf8') def wait_until(self, type): """ It needs to be clarified that the time is that o...
en
0.489695
It needs to be clarified that the time is that on remote server. :return: 0 -> time is up :param type: 0 -> pre_book, 1 -> pick :return: # 本地时间符合之后,开始验证服务器时间 # 本地时间不符合,则继续等待 :param time_type: 0 -> local time, 1 -> server time :param target_time: target time tuple -> (hour, minute) :param...
3.210605
3
tensorflow/python/kernel_tests/linalg_grad_test.py
devsangwoo/tensor
1
6631016
<reponame>devsangwoo/tensor <<<<<<< HEAD # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/L...
<<<<<<< HEAD # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
en
0.825381
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
2.028057
2
py_privatekonomi/core/db.py
nilsFK/py-privatekonomi
2
6631017
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import sqlalchemy from sqlalchemy import __version__ from sqlalchemy import create_engine import sqlalchemy.engine.url as url from py_privatekonomi.utilities...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import sqlalchemy from sqlalchemy import __version__ from sqlalchemy import create_engine import sqlalchemy.engine.url as url from py_privatekonomi.utilities...
en
0.688447
#!/usr/bin/env python # -*- coding: utf-8 -*- # SQLAlchemy won't accept 'utf-8'...
2.4143
2
vyper/parser/external_call.py
t4n6a1ka/vyper
0
6631018
from vyper import ast from vyper.exceptions import ( ConstancyViolationException, FunctionDeclarationException, StructureException, TypeMismatchException, VariableDeclarationException, ) from vyper.parser.lll_node import ( LLLnode, ) from vyper.parser.parser_utils import ( getpos, pack_a...
from vyper import ast from vyper.exceptions import ( ConstancyViolationException, FunctionDeclarationException, StructureException, TypeMismatchException, VariableDeclarationException, ) from vyper.parser.lll_node import ( LLLnode, ) from vyper.parser.parser_utils import ( getpos, pack_a...
it
0.364061
# noqa: E501 # noqa: E501
2.394392
2
Chapter14/Scripts/cartoframes_test.py
monocilindro/Mastering-Geospatial-Analysis-with-Python
64
6631019
<filename>Chapter14/Scripts/cartoframes_test.py import cartoframes APIKEY = "<KEY>" # `base_url`s are of the form `http://{username}.carto.com/` for most users cc = cartoframes.CartoContext(base_url='https://lokiintelligent.carto.com/', api_key=APIKEY) # read a table from your CARTO a...
<filename>Chapter14/Scripts/cartoframes_test.py import cartoframes APIKEY = "<KEY>" # `base_url`s are of the form `http://{username}.carto.com/` for most users cc = cartoframes.CartoContext(base_url='https://lokiintelligent.carto.com/', api_key=APIKEY) # read a table from your CARTO a...
en
0.768435
# `base_url`s are of the form `http://{username}.carto.com/` for most users # read a table from your CARTO account to a DataFrame
2.808148
3
Chapter08/rdd/rddtranform1.py
MichaelRW/Python-for-Geeks
31
6631020
#rddtransform1.py: rdd tranformation function #please ignore next 2 statements if running directly in PySpark shell import time from pyspark.sql import SparkSession spark = SparkSession.builder.master("local[*]")\ .appName("RDD Test app")\ .getOrCreate() rdd1 = spark.sparkContext.textFile('sample.txt') #prin...
#rddtransform1.py: rdd tranformation function #please ignore next 2 statements if running directly in PySpark shell import time from pyspark.sql import SparkSession spark = SparkSession.builder.master("local[*]")\ .appName("RDD Test app")\ .getOrCreate() rdd1 = spark.sparkContext.textFile('sample.txt') #prin...
en
0.234749
#rddtransform1.py: rdd tranformation function #please ignore next 2 statements if running directly in PySpark shell #print(rdd1.getNumPartitions())
2.713923
3
mayan/apps/document_states/tests/test_models.py
marumadang/mayan-edms
0
6631021
<gh_stars>0 from __future__ import unicode_literals from django.test import override_settings from common.tests import BaseTestCase from common.tests.mixins import UserMixin from documents.models import DocumentType from documents.tests import TEST_SMALL_DOCUMENT_PATH, TEST_DOCUMENT_TYPE_LABEL from document_indexing....
from __future__ import unicode_literals from django.test import override_settings from common.tests import BaseTestCase from common.tests.mixins import UserMixin from documents.models import DocumentType from documents.tests import TEST_SMALL_DOCUMENT_PATH, TEST_DOCUMENT_TYPE_LABEL from document_indexing.models impor...
en
0.358598
# Create empty index # Add our document type to the new index # Create simple index template
1.87433
2
wham.py
robeme/whampy
2
6631022
<gh_stars>1-10 """AUTHOR: efortin DATE: 16/05/2018 16:06 VERSION: 1.1 This is a Python3 executable script that performs the WHAM analysis of a set of umbrella sampling simulations, using various methods. """ # IMPORTS import os import re import sys import time import warnings import numpy as np import wham.simdata ...
"""AUTHOR: efortin DATE: 16/05/2018 16:06 VERSION: 1.1 This is a Python3 executable script that performs the WHAM analysis of a set of umbrella sampling simulations, using various methods. """ # IMPORTS import os import re import sys import time import warnings import numpy as np import wham.simdata as sim from wha...
en
0.748167
AUTHOR: efortin DATE: 16/05/2018 16:06 VERSION: 1.1 This is a Python3 executable script that performs the WHAM analysis of a set of umbrella sampling simulations, using various methods. # IMPORTS # DECLARATION OF GLOBAL VARIABLES # PROGRAM STARTUP (COMMAND LINE PARSING)
2.37208
2
Algorithm/Easy/1-500/100Remove Duplicates from Sorted Array.py
MartinYan623/Lint-Code
0
6631023
<gh_stars>0 class Solution: """ @param: nums: An ineger array @return: An integer """ def removeDuplicates(self, nums): # write your code here length = len(nums) nowlength = length for i in range(length - 1): while i < nowlength - 1 and nums[i] == nums[i ...
class Solution: """ @param: nums: An ineger array @return: An integer """ def removeDuplicates(self, nums): # write your code here length = len(nums) nowlength = length for i in range(length - 1): while i < nowlength - 1 and nums[i] == nums[i + 1]: ...
en
0.207302
@param: nums: An ineger array @return: An integer # write your code here
3.404665
3
dollar_lambda/args.py
ethanabrooks/pymonad
1
6631024
""" Defines the :py:class:`Args <dollar_lambda.args.Args>` dataclass and associated functions. """ from __future__ import annotations import dataclasses import typing from dataclasses import MISSING, Field, dataclass, fields from typing import Any, Callable, Iterator, Optional, Union, get_args from dollar_lambda.data...
""" Defines the :py:class:`Args <dollar_lambda.args.Args>` dataclass and associated functions. """ from __future__ import annotations import dataclasses import typing from dataclasses import MISSING, Field, dataclass, fields from typing import Any, Callable, Iterator, Optional, Union, get_args from dollar_lambda.data...
en
0.294345
Defines the :py:class:`Args <dollar_lambda.args.Args>` dataclass and associated functions. This is a thin wrapper around :external:py:func:`dataclasses.field`. Parameters ---------- help : str An optional help string for the argument. metadata : str Identical to the `metadata` argumen...
2.724111
3
deployment/custom_resources/custom-resource-py/lib/medialive.py
mlnrt/live-streaming-with-automated-multi-language-subtitling
0
6631025
<reponame>mlnrt/live-streaming-with-automated-multi-language-subtitling<filename>deployment/custom_resources/custom-resource-py/lib/medialive.py #!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################## # Copyright 2017 Amazon.com, Inc. or its affiliates. ...
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################## # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Amazon Software Lic...
en
0.725801
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################## # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Amazon Software Lic...
1.924643
2
pwnable.kr-write-up/random/random.py
IdanBanani/Pwnable.kr-CTF-Writeups
0
6631026
import os random_value = 0x6b8b4567 xor_result = 0xdeadbeef key = random_value ^ xor_result print "key is:", key os.system("echo '" + str(key) + "' | ./random")
import os random_value = 0x6b8b4567 xor_result = 0xdeadbeef key = random_value ^ xor_result print "key is:", key os.system("echo '" + str(key) + "' | ./random")
none
1
2.405367
2
tcfl/pos.py
d-scott-phillips/tcf
0
6631027
<gh_stars>0 #! /usr/bin/python2 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # # # FIXME: # # - command line method to discover installed capabiltiies; print # each's __doc__ """ This module provides tools to image devices with a Provisioning OS. The general operation mode for th...
#! /usr/bin/python2 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # # # FIXME: # # - command line method to discover installed capabiltiies; print # each's __doc__ """ This module provides tools to image devices with a Provisioning OS. The general operation mode for this is instru...
en
0.822179
#! /usr/bin/python2 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # # # FIXME: # # - command line method to discover installed capabiltiies; print # each's __doc__ This module provides tools to image devices with a Provisioning OS. The general operation mode for this is instructing...
2.40607
2
test.py
darshanajaint/scene-representation-networks
349
6631028
import configargparse import os, time, datetime import torch import numpy as np import dataio from torch.utils.data import DataLoader from srns import * import util p = configargparse.ArgumentParser() p.add('-c', '--config_filepath', required=False, is_config_file=True, help='Path to config file.') # Note: in contr...
import configargparse import os, time, datetime import torch import numpy as np import dataio from torch.utils.data import DataLoader from srns import * import util p = configargparse.ArgumentParser() p.add('-c', '--config_filepath', required=False, is_config_file=True, help='Path to config file.') # Note: in contr...
en
0.601734
# Note: in contrast to training, no multi-resolution! # Model options # directory structure: month_day/ # Save command-line parameters to log directory.
2.086247
2
baseforms.py
JezzaHehn/pyifs
0
6631029
<reponame>JezzaHehn/pyifs<filename>baseforms.py from colour import Color from math import sqrt class Transform(object): def __init__(self, rng): self.r, self.g, self.b = Color(hsl=(rng.random(), 1, 0.5)).rgb self.rng = rng def transform_colour(self, r, g, b): r = (self.r + r) / 2.0 ...
from colour import Color from math import sqrt class Transform(object): def __init__(self, rng): self.r, self.g, self.b = Color(hsl=(rng.random(), 1, 0.5)).rgb self.rng = rng def transform_colour(self, r, g, b): r = (self.r + r) / 2.0 g = (self.g + g) / 2.0 b = (self.b ...
en
0.808977
This applies a random Moebius transform and then its inverse. # apply pre-Moebius (az+b)/(cz+d) # apply inner transform # return post-Moebius (dz-b)/(-cz+a), which is inverse of pre-Moebius Since the spherical transform is its own inverse, it can simply be applied twice. # first spherical # inner transform # second sph...
3.483839
3
routes.py
BLM16/URL-Shortener
0
6631030
from flask import Blueprint, render_template, redirect, url_for, request from sqlalchemy.sql import text from sqlalchemy.exc import SQLAlchemyError import re from config import engine, db from models.url import URL routes = Blueprint("routes", __name__, static_folder = 'static', template_folder = 'templates') @route...
from flask import Blueprint, render_template, redirect, url_for, request from sqlalchemy.sql import text from sqlalchemy.exc import SQLAlchemyError import re from config import engine, db from models.url import URL routes = Blueprint("routes", __name__, static_folder = 'static', template_folder = 'templates') @route...
en
0.663466
# Get the url # Define valid url regex # http:// or https:// #domain... # ...or ip # optional port # Validate the url # Connect to the DB # See if there is already a key for the url # If there is a key display that link # Generate a new key # Insert the KVP into the database # Display the new link from the key # Connec...
2.624493
3
.circleci/scripts/wait_for_server.py
ybt195/determined
1,729
6631031
<filename>.circleci/scripts/wait_for_server.py<gh_stars>1000+ import argparse import socket import time def wait_for_server(host, port, timeout=5.0): for _ in range(100): try: with socket.create_connection((host, port), timeout=timeout): return except OSError: ...
<filename>.circleci/scripts/wait_for_server.py<gh_stars>1000+ import argparse import socket import time def wait_for_server(host, port, timeout=5.0): for _ in range(100): try: with socket.create_connection((host, port), timeout=timeout): return except OSError: ...
none
1
3.063749
3
LongestLines.py
TurtleShell/DigitImageClassifier
0
6631032
<reponame>TurtleShell/DigitImageClassifier #LongestLines """ This file creates a feature that tracks the longest dark line and the number of distinct lines in each major direction """ import math from DataFormatFunctions import * from TraversalHelperFunctions import * from HelperClasses import * def...
#LongestLines """ This file creates a feature that tracks the longest dark line and the number of distinct lines in each major direction """ import math from DataFormatFunctions import * from TraversalHelperFunctions import * from HelperClasses import * def getLineLenFromCoords(coords, sqMatrix, dir...
en
0.902498
#LongestLines This file creates a feature that tracks the longest dark line and the number of distinct lines in each major direction
3.044856
3
calculateStatistics.py
dahe-cvl/isvc2020_overscan_detection
0
6631033
import numpy as np import cv2 import csv from itertools import islice import os def readSamples(db_path, image_size): files = [] print(db_path) # r=root, d=directories, f = files for r, d, f in os.walk(db_path): for file in f: if '.png' in file: files.append(os.path...
import numpy as np import cv2 import csv from itertools import islice import os def readSamples(db_path, image_size): files = [] print(db_path) # r=root, d=directories, f = files for r, d, f in os.walk(db_path): for file in f: if '.png' in file: files.append(os.path...
en
0.338932
# r=root, d=directories, f = files # print(f) # read images # resize image # print(frame_resized.shape) # split image # calculate zero-centered frames # calculate standard deviation for each color channel #print("calculate mean image for each color channel ... ") #mean_r = np.mean(all_samples_r_np, axis=0); #mean_g = n...
2.551862
3
Exercises/ejercicio-36.py
shoriwe-upb/TallerEjercicios
0
6631034
<gh_stars>0 def main(): a = float(input("Number a: ")) b = float(input("Number b: ")) c = float(input("Number c: ")) if a + b > c: print("Es mayor") elif a + b < c: print("Es menor") if __name__ == '__main__': main()
def main(): a = float(input("Number a: ")) b = float(input("Number b: ")) c = float(input("Number c: ")) if a + b > c: print("Es mayor") elif a + b < c: print("Es menor") if __name__ == '__main__': main()
none
1
3.818494
4
speech.py
dlei/class-transcribe
0
6631035
<reponame>dlei/class-transcribe<filename>speech.py #!/usr/bin/python import sys import urllib2 import os import json import subprocess as sp # url = "https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&lang=en-US" url = 'https://www.google.com/speech-api/v2/recognize?xjerr=1&client=chromium&lang=en...
#!/usr/bin/python import sys import urllib2 import os import json import subprocess as sp # url = "https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&lang=en-US" url = 'https://www.google.com/speech-api/v2/recognize?xjerr=1&client=chromium&lang=en-US' fileName = str(sys.argv[1]) fileExtension = os...
en
0.444293
#!/usr/bin/python # url = "https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&lang=en-US"
2.98433
3
tests/lineage/test_lineage.py
ktmud/incubator-airflow
2
6631036
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
en
0.868302
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
1.912357
2
tools/maketestgds.py
gdmcbain/gdspy
239
6631037
###################################################################### # # # Copyright 2009 <NAME>. # # This file is part of gdspy, distributed under the terms of the # # Boost Software License - Version 1.0. See the accom...
###################################################################### # # # Copyright 2009 <NAME>. # # This file is part of gdspy, distributed under the terms of the # # Boost Software License - Version 1.0. See the accom...
de
0.338759
###################################################################### # # # Copyright 2009 <NAME>. # # This file is part of gdspy, distributed under the terms of the # # Boost Software License - Version 1.0. See the accom...
1.934171
2
ALDS1/12c.py
ToshikiShimizu/AOJ
0
6631038
<reponame>ToshikiShimizu/AOJ import heapq MAX = 10000 INFTY = 1<<20 WHITE = 0 GRAY = 1 BLACK = 2 def dijkstra(n, adj): PQ = [] color = [None for i in range(n)] d = [None for i in range(n)] for i in range(n): d[i] = INFTY color[i] = WHITE d[0] = 0 heapq.heappush(PQ,(0,0)) co...
import heapq MAX = 10000 INFTY = 1<<20 WHITE = 0 GRAY = 1 BLACK = 2 def dijkstra(n, adj): PQ = [] color = [None for i in range(n)] d = [None for i in range(n)] for i in range(n): d[i] = INFTY color[i] = WHITE d[0] = 0 heapq.heappush(PQ,(0,0)) color[0] = GRAY while(len(P...
none
1
3.303034
3
eveIntel/limboRun.py
Marclass/EveIntel
0
6631039
<reponame>Marclass/EveIntel #!/usr/bin/env python from limbo.limbo import main import argparse import sys def runSlack(token): parser = argparse.ArgumentParser(description="Run the limbo chatbot for Slack") parser.add_argument('--test', '-t', dest='test', action='store_true', required=False, help='Enter comman...
#!/usr/bin/env python from limbo.limbo import main import argparse import sys def runSlack(token): parser = argparse.ArgumentParser(description="Run the limbo chatbot for Slack") parser.add_argument('--test', '-t', dest='test', action='store_true', required=False, help='Enter command line mode to enter a limbo...
en
0.372037
#!/usr/bin/env python #if(token and token!=""): #e = sys.exc_info()[0]
2.634441
3
catalog.py
KtQiu/mini_sql_python
0
6631040
import six import sys import pickle import os class col(object): r''' class for col information @param: col_name: the name of the col attr: attribution, default is int Generally, we have 'int', 'char(n)' and 'float' is_unique: the data is unique or notz ''' def __init__(s...
import six import sys import pickle import os class col(object): r''' class for col information @param: col_name: the name of the col attr: attribution, default is int Generally, we have 'int', 'char(n)' and 'float' is_unique: the data is unique or notz ''' def __init__(s...
en
0.479712
class for col information @param: col_name: the name of the col attr: attribution, default is int Generally, we have 'int', 'char(n)' and 'float' is_unique: the data is unique or notz # self.data = (data == None ? list(): data) class for tabel information @param: table_name: the na...
3.662374
4
pms/student/migrations/0009_auto_20190406_0044.py
iammeliodas/pms_django
0
6631041
<gh_stars>0 # -*- coding: utf-8 -*- # Generated by Django 1.11 on 2019-04-05 19:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('student', '0008_auto_20190405_2356'), ] operations = [ migrations...
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2019-04-05 19:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('student', '0008_auto_20190405_2356'), ] operations = [ migrations.RemoveField...
en
0.712805
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2019-04-05 19:14
1.450859
1
etl/parsers/etw/Microsoft_Windows_Workplace_Join.py
IMULMUL/etl-parser
104
6631042
<filename>etl/parsers/etw/Microsoft_Windows_Workplace_Join.py # -*- coding: utf-8 -*- """ Microsoft-Windows-Workplace Join GUID : 76ab12d5-c986-4e60-9d7c-2a092b284cdd """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WSt...
<filename>etl/parsers/etw/Microsoft_Windows_Workplace_Join.py # -*- coding: utf-8 -*- """ Microsoft-Windows-Workplace Join GUID : 76ab12d5-c986-4e60-9d7c-2a092b284cdd """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WSt...
en
0.368476
# -*- coding: utf-8 -*- Microsoft-Windows-Workplace Join GUID : 76ab12d5-c986-4e60-9d7c-2a092b284cdd
2.129209
2
sharestats_item_editor/rexam_item_editor/misc.py
essb-mt-section/sharestats-item-editor
5
6631043
<reponame>essb-mt-section/sharestats-item-editor import os import tempfile import re def replace_list_element(lst, source_idx, target_idx): """replaces an element in a list""" if source_idx < len(lst) and target_idx<len( lst): tmp = lst.pop(source_idx) return lst[:target_idx] + [tmp] + lst...
import os import tempfile import re def replace_list_element(lst, source_idx, target_idx): """replaces an element in a list""" if source_idx < len(lst) and target_idx<len( lst): tmp = lst.pop(source_idx) return lst[:target_idx] + [tmp] + lst[target_idx:] else: return [] def su...
en
0.649643
replaces an element in a list :return the dict nested hierarchically indicated by nested_keys or None if key list is incorrect :param nested_keys list of keys or a single keys # creates and returns a temp folder String list that handles string search case insensitive removes element and returns it, raises excep...
3.475411
3
test/playground.py
dustfine/python-learn
0
6631044
import os print(os.cpu_count())
import os print(os.cpu_count())
none
1
1.58478
2
communication/__init__.py
AlexanderPollak/SKA-Compressor-COM
0
6631045
from connection import com from connection import sensor from connection import compressor from connection import error
from connection import com from connection import sensor from connection import compressor from connection import error
none
1
1.135531
1
isbp/producer1.py
5GZORRO/sla-breach-predictor
0
6631046
# -*- coding: utf-8 -*- """ Created on Thu Oct 14 13:09:20 2021 @author: dlaskaratos """ from kafka import KafkaProducer import json import pandas as pd import numpy as np from datetime import datetime import time producer = KafkaProducer(bootstrap_servers = '172.28.3.196:9092') data = { "data": { "even...
# -*- coding: utf-8 -*- """ Created on Thu Oct 14 13:09:20 2021 @author: dlaskaratos """ from kafka import KafkaProducer import json import pandas as pd import numpy as np from datetime import datetime import time producer = KafkaProducer(bootstrap_servers = '172.28.3.196:9092') data = { "data": { "even...
en
0.698464
# -*- coding: utf-8 -*- Created on Thu Oct 14 13:09:20 2021 @author: dlaskaratos
2.040303
2
tools/infer_mot.py
violetweir/PaddleDetection
23
6631047
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
en
0.823256
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
1.777511
2
setup.py
MD-Studio/MDStudio_pylie
1
6631048
# -*- coding: utf-8 -*- # package: pylie # file: setup.py # # Part of ‘pylie’, providing LIE data modelling routines # LIEStudio package. # # Copyright © 2016 <NAME>, VU University Amsterdam, the Netherlands # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compl...
# -*- coding: utf-8 -*- # package: pylie # file: setup.py # # Part of ‘pylie’, providing LIE data modelling routines # LIEStudio package. # # Copyright © 2016 <NAME>, VU University Amsterdam, the Netherlands # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compl...
en
0.775928
# -*- coding: utf-8 -*- # package: pylie # file: setup.py # # Part of ‘pylie’, providing LIE data modelling routines # LIEStudio package. # # Copyright © 2016 <NAME>, VU University Amsterdam, the Netherlands # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compli...
1.334004
1
01-logica-de-programacao-e-algoritmos/Aula 05/2 Parametros/ex05.py
rafaelbarretomg/Uninter
0
6631049
# contagem em uma linha so def contador(fim, inicio=0, passo=1): for i in range(inicio, fim, passo): print('{} ' .format(i), end='') print('\n') # Programa Principal contador(20, 10, 2) contador(12)
# contagem em uma linha so def contador(fim, inicio=0, passo=1): for i in range(inicio, fim, passo): print('{} ' .format(i), end='') print('\n') # Programa Principal contador(20, 10, 2) contador(12)
pt
0.998064
# contagem em uma linha so # Programa Principal
3.731656
4
flask_video_stream/db.py
andricampagnaro/documentacoes_e_testes
0
6631050
import socket TCP_IP = '127.0.0.1' TCP_PORT = 8000 BUFFER_SIZE = 1024 # Normally 1024, but we want fast response s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((TCP_IP, TCP_PORT)) s.listen(1) while True: conn, addr = s.accept() data = conn.recv(BUFFER_SIZE) print(f'Connection address: {add...
import socket TCP_IP = '127.0.0.1' TCP_PORT = 8000 BUFFER_SIZE = 1024 # Normally 1024, but we want fast response s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((TCP_IP, TCP_PORT)) s.listen(1) while True: conn, addr = s.accept() data = conn.recv(BUFFER_SIZE) print(f'Connection address: {add...
en
0.957284
# Normally 1024, but we want fast response
2.855491
3