max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 117 | max_stars_count int64 0 95.2k | id stringlengths 1 7 | content stringlengths 12 593k | input_ids listlengths 7 549k |
|---|---|---|---|---|---|
fairseq/tasks/audio_pretraining.py | yyeboah/fairseq | 11 | 194329 | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import os
import sys
import torch
... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29955,
29899,
6338,
29892,
13327,
29892,
9266,
29889,
13,
29937,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
910,
2752,
775,
338,
7794,
21144,
1090,
278,
19405,
1476,
... |
pykintone/account.py | hykw/pykintone | 0 | 1615577 | from datetime import datetime
import yaml
import pytz
class Account(object):
def __init__(self, domain,
login_id="", login_password="",
basic_id="", basic_password=""):
self.domain = domain
self.login_id = login_id
self.login_password = <PASSWORD>
... | [
1,
515,
12865,
1053,
12865,
13,
5215,
343,
8807,
13,
5215,
282,
3637,
29920,
13,
13,
13,
1990,
16535,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
5354,
29892,
13,
462,
6464,
29918,
333,
543,
613,
6464,
29918,... |
web_frameworks/resources/forms.py | Minkov/python-web-frameworks-2020-11 | 4 | 108577 | from django import forms
from resources.models import Pet
class PetForm(forms.ModelForm):
class Meta:
model = Pet
fields = '__all__'
| [
1,
515,
9557,
1053,
7190,
13,
13,
3166,
7788,
29889,
9794,
1053,
5879,
13,
13,
13,
1990,
5879,
2500,
29898,
9514,
29889,
3195,
2500,
1125,
13,
1678,
770,
20553,
29901,
13,
4706,
1904,
353,
5879,
13,
4706,
4235,
353,
525,
1649,
497,
... |
beginner/sum-of-all-numbers_ChingLingYeung.py | garvitsharma05/hacktoberithms | 16 | 36254 |
def sum_all(ls):
sum = 0
if(len(ls) != 2):
print("Invalid input")
else:
ls.sort()
start = ls[0]
end = ls[1]
if(start == end):
sum = 2 * start
else:
for i in range(start, end+1):
sum += i
ret... | [
1,
29871,
13,
1753,
2533,
29918,
497,
29898,
3137,
1125,
13,
1678,
2533,
353,
29871,
29900,
13,
13,
1678,
565,
29898,
2435,
29898,
3137,
29897,
2804,
29871,
29906,
1125,
13,
4706,
1596,
703,
13919,
1881,
1159,
13,
13,
1678,
1683,
29901,... |
src/hypertrace/agent/autoinstrumentation/sitecustomize.py | hypertrace/pythonagent | 4 | 101737 | <gh_stars>1-10
'''Enable instrumentationon all supported modules.''' # pylint: disable=R0401
import logging
from hypertrace.agent import Agent
from hypertrace.env_var_settings import get_env_value
# Initialize logger
logger = logging.getLogger(__name__) # pylint: disable=C0103
skip_modules = get_env_value('SKIP_MODU... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
12008,
20701,
11395,
362,
265,
599,
6969,
10585,
29889,
12008,
396,
282,
2904,
524,
29901,
11262,
29922,
29934,
29900,
29946,
29900,
29896,
13,
5215,
12183,
13,
3166,
... |
dash/admin.py | ravshansk/ajans | 0 | 163566 | from django.contrib import admin
from .models import Actor
# Register your models here.
@admin.register(Actor)
class ActorAdmin(admin.ModelAdmin):
pass
| [
1,
515,
9557,
29889,
21570,
1053,
4113,
13,
3166,
869,
9794,
1053,
319,
2801,
13,
13,
29937,
12577,
596,
4733,
1244,
29889,
13,
13,
29992,
6406,
29889,
9573,
29898,
29909,
2801,
29897,
13,
1990,
319,
2801,
12754,
29898,
6406,
29889,
319... |
writer1.py | mahongquan/ipy_rtf | 0 | 59369 | /// <summary>
/// RTF文档书写器
/// </summary>
/// <remarks>
/// 本书写器对生成RTF文档提供了基础的支持
/// 编制 袁永福 http://www.xdesigner.cn
/// </remarks>
public class RTFWriter : System.IDisposable
{
#region 测试代码 ******************************************************
[System.STAThread]
static void Main()
{
TestWrit... | [
1,
29871,
4363,
529,
7727,
29958,
13,
6658,
390,
8969,
30333,
233,
164,
166,
31900,
31479,
30943,
13,
6658,
1533,
7727,
29958,
13,
6658,
529,
1745,
17862,
29958,
13,
6658,
29871,
30346,
31900,
31479,
30943,
30783,
30486,
30494,
29934,
896... |
docs/examples/pyplot/tick-position.py | tdegeus/pyplot_ext | 0 | 1602765 | <reponame>tdegeus/pyplot_ext
import matplotlib.pyplot as plt
import numpy as np
plt.style.use(["goose", "goose-latex"])
n = 5
x = np.arange(n)
y = np.sin(np.linspace(-3, 3, n))
xlabels = ["Long ticklabel %i" % i for i in range(n)]
fig, ax = plt.subplots()
ax.plot(x, y, "o-")
ax.set_xticks(x)
labels = ax.set_xtick... | [
1,
529,
276,
1112,
420,
29958,
29873,
311,
479,
375,
29914,
2272,
5317,
29918,
1062,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
13,
572,
29873,
29889,
3293,
29889,
1509,
29898,
3366,
1484,
852,
613,
... |
Tests/Test_FetchUserStatuses.py | rohitgs28/FindMyEmployer | 0 | 103943 | <reponame>rohitgs28/FindMyEmployer
import unittest
import mock
from mock import MagicMock,patch
import os.path
import logging
import sys,os
from Test_Config import *
from MockData import Emailid,Password,statusData,Messages2
import sys
import sys, os
sys.path.append(os.path.abspath(os.path.join('..', 'extensions/')))
... | [
1,
529,
276,
1112,
420,
29958,
307,
27342,
3174,
29906,
29947,
29914,
12542,
3421,
10495,
2376,
261,
13,
13,
5215,
443,
27958,
13,
5215,
11187,
13,
3166,
11187,
1053,
26494,
18680,
29892,
5041,
13,
5215,
2897,
29889,
2084,
13,
5215,
121... |
MachineLearning/TP3/lrCostFunction.py | piwithy/ENSTA_MACHINE_LEARNING | 0 | 1603636 | <gh_stars>0
import numpy as np
from sigmoid import sigmoid
def lrCostFunction(theta, X, y, Lambda):
"""computes the cost of using
theta as the parameter for regularized logistic regression.
"""
# preambule
m, n = X.shape # 5,4
theta = theta.reshape((n, 1)) # (4,1)
# ===================... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
12655,
408,
7442,
13,
3166,
4365,
29885,
3398,
1053,
4365,
29885,
3398,
13,
13,
13,
1753,
301,
29878,
25733,
6678,
29898,
3416,
29892,
1060,
29892,
343,
29892,
365,
2269,
1125,
13... |
polling_stations/apps/data_collection/management/commands/import_tower_hamlets.py | mtravis/UK-Polling-Stations | 0 | 20332 | from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "E09000030"
addresses_name = "local.2018-05-03/Version 2/Democracy_Club__03May2018.tsv"
stations_name = "local.2018-05-03/Version 2/Democracy_Club__03May2018.t... | [
1,
515,
848,
29918,
10855,
29889,
21895,
29889,
26381,
1053,
7399,
29990,
2139,
29928,
331,
25804,
6821,
431,
29907,
4501,
24192,
9555,
13,
13,
13,
1990,
10516,
29898,
5160,
29990,
2139,
29928,
331,
25804,
6821,
431,
29907,
4501,
24192,
9... |
omega_miya/plugins/maybe/__init__.py | rinrini001/omega-miya | 120 | 150698 | import datetime
import random
from nonebot import CommandGroup, logger
from nonebot.plugin.export import export
from nonebot.typing import T_State
from nonebot.adapters.cqhttp.bot import Bot
from nonebot.adapters.cqhttp.event import GroupMessageEvent
from nonebot.adapters.cqhttp.permission import GROUP
from nonebot.ada... | [
1,
1053,
12865,
13,
5215,
4036,
13,
3166,
5642,
7451,
1053,
10516,
4782,
29892,
17927,
13,
3166,
5642,
7451,
29889,
8582,
29889,
15843,
1053,
5609,
13,
3166,
5642,
7451,
29889,
1017,
15702,
1053,
323,
29918,
2792,
13,
3166,
5642,
7451,
... |
hard-gists/7578539/snippet.py | jjhenkel/dockerizeme | 21 | 3630 | from pylab import *
from numpy import *
from numpy.linalg import solve
from scipy.integrate import odeint
from scipy.stats import norm, uniform, beta
from scipy.special import jacobi
a = 0.0
b = 3.0
theta=1.0
sigma=sqrt(theta/(2*(a+b+2)))
tscale = 0.05
invariant_distribution = poly1d( [-1 for x in range(int(a))], ... | [
1,
515,
282,
2904,
370,
1053,
334,
13,
3166,
12655,
1053,
334,
13,
3166,
12655,
29889,
29880,
979,
29887,
1053,
4505,
13,
3166,
4560,
2272,
29889,
14146,
403,
1053,
288,
311,
524,
13,
3166,
4560,
2272,
29889,
16202,
1053,
6056,
29892,
... |
src/omlt/neuralnet/__init__.py | jalving/OMLT | 115 | 165613 | <gh_stars>100-1000
r"""
We use the following notation to describe layer and activation functions:
.. math::
\begin{align*}
N &:= \text{Set of nodes (i.e. neurons in the neural network)}\\
M_i &:= \text{Number of inputs to node $i$}\\
\hat z_i &:= \text{pre-activation value on node $i$}\\
z_i &:= \... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
29878,
15945,
29908,
13,
4806,
671,
278,
1494,
12640,
304,
8453,
7546,
322,
26229,
3168,
29901,
13,
13,
636,
5844,
1057,
13,
13,
1678,
3... |
cminx/parser/aggregator.py | AutonomicPerfectionist/CMakeDoc | 0 | 155300 | import sys
from antlr4 import * #FIXME Remove unused imports
from enum import Enum
from collections import namedtuple
#Annoyingly, the Antl4 Python libraries use camelcase since it was originally Java, so we have convention inconsistencies here
from .CMakeParser import CMakeParser
from .CMakeListener import CMakeList... | [
1,
1053,
10876,
13,
13,
3166,
3677,
29212,
29946,
1053,
334,
396,
25634,
2303,
15154,
443,
3880,
24802,
13,
3166,
14115,
1053,
1174,
398,
13,
3166,
16250,
1053,
4257,
23583,
13,
13,
29937,
2744,
1217,
5414,
368,
29892,
278,
5459,
29880,... |
jsConsole/__init__.py | Animenosekai/jsConsole | 0 | 18483 | """
pyJsConsole wrapper.
© <NAME> - 2020
"""
from .internal.javascript import classes as JSClass
console = JSClass._Console()
document = JSClass._Document()
history = JSClass._History()
Math = JSClass._Math()
navigator = JSClass._Navigator()
screen = JSClass._Screen()
window = JSClass._Window()
browser = JSClass.Bro... | [
1,
9995,
13,
2272,
25498,
20008,
14476,
29889,
13,
13,
30211,
529,
5813,
29958,
448,
29871,
29906,
29900,
29906,
29900,
13,
15945,
29908,
13,
13,
3166,
869,
7564,
29889,
7729,
1053,
4413,
408,
7649,
2385,
13,
13,
11058,
353,
7649,
2385,... |
tools/generator/__init__.py | Dev00355/fundamental-tools-copy-from-sap | 0 | 37490 | # SPDX-FileCopyrightText: 2014 SAP SE <NAME> <<EMAIL>>
#
# SPDX-License-Identifier: Apache-2.0
# -*- coding: utf-8 -*-
from .business_objects import catalog, rfm_sets
VERSION = "0.2"
# T002, T002C
all_languages = {
# iso2
"ar": "AR - عربي",
"bg": "BG - Български",
"ca": "CA - Català",
"cs": "CS ... | [
1,
396,
10937,
29928,
29990,
29899,
2283,
11882,
1266,
1626,
29901,
29871,
29906,
29900,
29896,
29946,
317,
3301,
3725,
529,
5813,
29958,
3532,
26862,
6227,
6778,
13,
29937,
13,
29937,
10937,
29928,
29990,
29899,
29931,
293,
1947,
29899,
12... |
flask_ncov.py | ausk/ncov2020 | 2 | 149968 | <reponame>ausk/ncov2020<gh_stars>1-10
# 2020/02/15 by ausk
# 从百度疫情获取数据,并使用 flask 搭建后台。
"""
# 使用 Flask + ECharts 实现疫情展示。
1)从疫情网站抓取疫情数据,保存为离线数据;
2) 启动 flask 后台,可实时更新数据祸加载离线数据,然后以 json 格式返回查询数据;同时返回渲染的网页。
3) 编写 html 页面,前台(浏览器)通过 ajax 请求指定路由异步加载数据,绘制疫情地图和疫情趋势图。
"""
from flask import Flask, render_template, jsonify
from ba... | [
1,
529,
276,
1112,
420,
29958,
1485,
29895,
29914,
17608,
586,
29906,
29900,
29906,
29900,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
29871,
29906,
29900,
29906,
29900,
29914,
29900,
29906,
29914,
29896,
299... |
yibai-sms-python-sdk-1.0.0/yibai/api/Yibai.py | 100sms/yibai-python-sdk | 0 | 18731 | # encoding=utf8
import HttpUtils
class YibaiApiError(Exception):
def __init__(self, code, message):
super(YibaiApiError, self).__init__(message)
self.code = code
class YibaiClient(object):
def __init__(self, server_url, apikey):
self.serverUrl = server_url
self... | [
1,
396,
8025,
29922,
9420,
29947,
30004,
13,
30004,
13,
5215,
9056,
12177,
30004,
13,
30004,
13,
30004,
13,
1990,
612,
747,
1794,
11713,
2392,
29898,
2451,
1125,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
775,
29892,
2643,
11... |
Fortgeschrittenenpraktikum/Protokolle/V18_Germaniumdetektor/Python/unbekannt2.py | smjhnits/Praktikum | 2 | 158350 | import numpy as np
import matplotlib.pyplot as plt
import uncertainties
from scipy.signal import find_peaks
from scipy.optimize import curve_fit
import scipy.constants as sc
import scipy.integrate as integrate
from uncertainties import ufloat
from uncertainties import unumpy as unp
from uncertainties.unumpy import nomi... | [
1,
1053,
12655,
408,
7442,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
443,
6327,
2365,
583,
13,
3166,
4560,
2272,
29889,
25436,
1053,
1284,
29918,
412,
10327,
13,
3166,
4560,
2272,
29889,
20640,
675,
1053,
11672,
29918,
9... |
validator/proxy_validator/client.py | ezirmusitua/proxies | 0 | 57712 | # -*- coding: utf-8 -*-
import requests
from proxy_validator import config
Default_UA = config['CLIENT_UA']
Default_Timeout = config['CLIENT_TIMEOUT']
class Client(object):
def __init__(self, headers=None, proxies=None):
self.headers = headers if headers is not None else {}
self.headers['User-Age... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
7274,
13,
3166,
10166,
29918,
3084,
1061,
1053,
2295,
13,
13,
4592,
29918,
29965,
29909,
353,
2295,
1839,
27205,
3919,
29918,
29965,
29909,
2033,
1... |
__main__.py | miezebieze/scott-launcher | 1 | 1826 | from enum import Enum
from window import Window
D = Enum ('Directions','N NE E SE S SW W NW')
selector_map = {
D.NW: [0.5,0.5], D.N: [1.5,0], D.NE: [2.5,0.5],
D.W: [0,1.5], D.E: [3,1.5],
D.SW: [0.5,2.5], D.S: [1.5,3], D.SE: [2.5,2.5],
}
selector_size = 100
window_si... | [
1,
515,
14115,
1053,
1174,
398,
13,
3166,
3474,
1053,
18379,
13,
13,
29928,
353,
1174,
398,
6702,
29928,
533,
1953,
3788,
29940,
14693,
382,
3725,
317,
25289,
399,
405,
29956,
1495,
13,
13,
14357,
29918,
1958,
353,
426,
13,
4706,
360,... |
Libraries/Python/CommonEnvironment/v1.0/CommonEnvironment/TypeInfo/FundamentalTypes/Serialization/UnitTests/StringSerialization_UnitTest.py | davidbrownell/v3-Common_Environment | 0 | 161260 | # ----------------------------------------------------------------------
# |
# | StringSerialization_UnitTest.py
# |
# | <NAME> <<EMAIL>>
# | 2018-04-26 22:06:18
# |
# ----------------------------------------------------------------------
# |
# | Copyright <NAME> 2018-22.
# | Distributed under the Bo... | [
1,
396,
448,
2683,
2683,
2683,
2683,
23648,
30004,
13,
29937,
891,
30004,
13,
29937,
891,
29871,
1714,
9125,
2133,
29918,
8325,
3057,
29889,
2272,
30004,
13,
29937,
891,
30004,
13,
29937,
891,
29871,
529,
5813,
29958,
3532,
26862,
6227,
... |
Kivy2.py | mcvenkat/Python-Programs | 0 | 170428 | <filename>Kivy2.py<gh_stars>0
import kivy
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty
from kivy.uix.label import Label
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.popup import Popup
class Widgets(Widget):
def btn(self):
s... | [
1,
529,
9507,
29958,
29968,
440,
29891,
29906,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
413,
440,
29891,
30004,
13,
3166,
413,
440,
29891,
29889,
932,
1053,
2401,
30004,
13,
3166,
413,
440,
29891,
29889,
29884,... |
common.py | mroja/kuramoto | 1 | 117345 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import struct
import numpy as np
import subprocess
import matplotlib.pyplot as plt
from collections import namedtuple
# N - number of oscillators
# freq - oscillator frequency (N elements)
# phase - oscillator phases (N elements)
# k - coupling coeffici... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
2897,
13,
5215,
2281,
13,
5215,
12655,
408,
7442,
13,
5215,
1014,
5014,
13,
5215,
22889,
2... |
Arrays/Find_common_elements_in_three_sorted_arrays/solution.py | abhaydhiman/Pyalgo | 1 | 191603 | <reponame>abhaydhiman/Pyalgo
def my_func(arr1, arr2, arr3):
ln1 = len(arr1)
ln2 = len(arr2)
ln3 = len(arr3)
ptr1 = 0
ptr2 = 0
ptr3 = 0
while ptr1 < ln1 and ptr2 < ln2 and ptr3 < ln3:
if arr1[ptr1] < arr2[ptr2]:
if arr3[ptr3] < arr2[ptr2]:
arr1[ptr1] =... | [
1,
529,
276,
1112,
420,
29958,
370,
29882,
388,
12744,
25895,
29914,
29925,
4605,
1484,
13,
1753,
590,
29918,
9891,
29898,
2749,
29896,
29892,
3948,
29906,
29892,
3948,
29941,
1125,
13,
1678,
301,
29876,
29896,
353,
7431,
29898,
2749,
298... |
WhatsAppManifest/automator/android/__init__.py | riquedev/WhatsAppManifest | 15 | 32917 | """
Module responsible for all automation related to the device
"""
__author__ = '<NAME>'
__copyright__ = 'Copyright 2020, WhatsAppManifest'
from WhatsAppManifest.automator.android.phone import AndroidPhone
from WhatsAppManifest.automator.android.contacts import AndroidContacts
| [
1,
9995,
13,
7355,
14040,
363,
599,
3345,
362,
4475,
304,
278,
4742,
13,
15945,
29908,
13,
13,
1649,
8921,
1649,
353,
12801,
5813,
16299,
13,
1649,
8552,
1266,
1649,
353,
525,
11882,
1266,
29871,
29906,
29900,
29906,
29900,
29892,
806,
... |
option_c.py | wrosecrans/colormap | 231 | 4210 |
from matplotlib.colors import LinearSegmentedColormap
from numpy import nan, inf
# Used to reconstruct the colormap in viscm
parameters = {'xp': [-5.4895292543686764, 14.790571669586654, 82.5546687431056, 29.15531114139253, -4.1316769886951761, -13.002076438907238],
'yp': [-35.948168839230306, -42.27337... | [
1,
29871,
13,
3166,
22889,
29889,
27703,
1053,
22985,
17669,
358,
287,
1625,
555,
481,
13,
3166,
12655,
1053,
23432,
29892,
3041,
13,
13,
29937,
501,
8485,
304,
337,
11433,
278,
784,
555,
481,
297,
1998,
4912,
13,
16744,
353,
11117,
2... |
normal_forms/examples/normal_form/07.py | joepatmckenna/normal_forms | 0 | 35474 | <reponame>joepatmckenna/normal_forms
from normal_forms import normal_form
import sympy
# Murdock, Normal Forms and Unfoldings of Local Dynamical Systems, Example 4.5.24
def f(x, y, z):
f1 = 6 * x + x**2 + x * y + x * z + y**2 + y * z + z**2
f2 = 2 * y + x**2 + x * y + x * z + y**2 + y * z + z**2
f3 = 3 * ... | [
1,
529,
276,
1112,
420,
29958,
2212,
1022,
271,
29885,
8916,
1056,
29914,
8945,
29918,
9514,
13,
3166,
4226,
29918,
9514,
1053,
4226,
29918,
689,
13,
5215,
5016,
2272,
13,
13,
13,
29937,
7487,
29881,
1698,
29892,
21981,
3812,
29879,
322... |
lib/viscoelasticity.py | mforstenhaeusler/AFMviscoelastic | 2 | 55445 | <gh_stars>1-10
"""
Created on Wed Jun 10th 2020
@author: <NAME>
Description: This library contains core algorithms to analyse and fit viscoelstic models to different AFM data.
"""
import numpy as np
from lmfit import Parameters, minimize, report_fit
def G_storage(omega, Ge, G, tau):
"""
Description:
The... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
20399,
373,
15050,
8378,
29871,
29896,
29900,
386,
29871,
29906,
29900,
29906,
29900,
13,
13,
29992,
8921,
29901,
529,
5813,
29958,
13,
9868,
29901,
... |
application/utils/globals.py | topix-hackademy/social-listener | 12 | 164224 | <reponame>topix-hackademy/social-listener
configuration = None
def init():
global configuration
configuration = None
| [
1,
529,
276,
1112,
420,
29958,
3332,
861,
29899,
29882,
547,
1943,
1357,
29914,
24911,
29899,
25894,
13,
13305,
353,
6213,
13,
13,
13,
1753,
2069,
7295,
13,
1678,
5534,
5285,
13,
1678,
5285,
353,
6213,
13,
2
] |
AutoGraphModel.py | shiqitao/AutoGraph | 0 | 26332 | <filename>AutoGraphModel.py
import argparse
import os
import time
import torch
from filelock import FileLock
from ModelAPPNP import main_model_appnp
from ModelAPPNP2 import main_model_appnp as main_model_appnp_2
from ModelAPPNP3 import main_model_appnp as main_model_appnp_3
from ModelAPPNP4 import main_model_appnp as... | [
1,
529,
9507,
29958,
12300,
9527,
3195,
29889,
2272,
13,
5215,
1852,
5510,
13,
5215,
2897,
13,
5215,
931,
13,
13,
5215,
4842,
305,
13,
3166,
934,
908,
1053,
3497,
16542,
13,
13,
3166,
8125,
3301,
15695,
29925,
1053,
1667,
29918,
4299,... |
laaso/command.py | srrao-git/amlFilesystem-hydrator | 2 | 1607175 | #
# laaso/command.py
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#
'''
Implement the Command class which handles @command decorators.
'''
import functools
import inspect
import logging
import pprint
import sys
import laaso.output
from laaso.util import expand_item_pf... | [
1,
396,
13,
29937,
425,
17764,
29914,
6519,
29889,
2272,
13,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
7783,
15025,
29889,
2178,
10462,
21676,
29889,
13,
29937,
10413,
21144,
1090,
278,
341,
1806,
19245,
29889,
13,
29937,
13,
1200... |
2021/solutions/d8.py | phenom4n4n/advent-of-code-21 | 1 | 185938 | from typing import Dict, List, FrozenSet
from utils import run
len_to_num = {
2: 1,
4: 4,
3: 7,
7: 8,
}
Key = Dict[FrozenSet[str], int]
@run("\n")
def part1(data: List[str]) -> int:
total = 0
for line in data:
_, o = line.split(" | ", 2)
for n in o.split():
if len... | [
1,
515,
19229,
1053,
360,
919,
29892,
2391,
29892,
25022,
2256,
2697,
13,
13,
3166,
3667,
29879,
1053,
1065,
13,
13,
2435,
29918,
517,
29918,
1949,
353,
426,
13,
268,
29906,
29901,
29871,
29896,
29892,
13,
268,
29946,
29901,
29871,
2994... |
stubs.min/System/Windows/Interop_parts/HwndSourceParameters.py | ricardyn/ironpython-stubs | 1 | 154570 | class HwndSourceParameters(object):
"""
Contains the parameters that are used to create an System.Windows.Interop.HwndSource object using the System.Windows.Interop.HwndSource.#ctor(System.Windows.Interop.HwndSourceParameters) constructor.
HwndSourceParameters(name: str)
HwndSourceParameters(name: str,wid... | [
1,
770,
379,
29893,
299,
4435,
11507,
29898,
3318,
1125,
30004,
13,
9995,
30004,
13,
2866,
2708,
278,
4128,
393,
526,
1304,
304,
1653,
385,
2184,
29889,
7685,
29889,
4074,
459,
29889,
29950,
29893,
299,
4435,
1203,
773,
278,
2184,
29889... |
kinematics/Trajectory.py | lovelykite/COSRA | 0 | 88539 | import numpy as np
class Trajectory:
def __init__(self):
pass
@classmethod
def LSPB(cls, q0, qf, tf, tb, t_step=0.07):
q0 = np.array(q0)
qf = np.array(qf)
if np.allclose(q0, qf):
t = [0.0]
q_pos = [qf]
return q_pos, t
# Define c... | [
1,
1053,
12655,
408,
7442,
13,
13,
13,
1990,
3201,
622,
706,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1209,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
365,
5550,
29933,
29898,
25932,
29892,
3855,
29900,
29892,... |
src/kotify/fabric/__init__.py | kotify/kotify.fabric | 0 | 134663 | from ._core import Collection, local, task
__all__ = ["task", "Collection", "local"]
| [
1,
515,
869,
29918,
3221,
1053,
14348,
29892,
1887,
29892,
3414,
13,
13,
1649,
497,
1649,
353,
6796,
7662,
613,
376,
7196,
613,
376,
2997,
3108,
13,
2
] |
sdk/eventhub/azure-eventhubs/azure/eventhub/eventprocessor/utils.py | gautam714/azure-sdk-for-python | 0 | 19017 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | [
1,
396,
448,
2683,
2683,
2683,
2683,
2683,
1378,
5634,
13,
29937,
14187,
1266,
313,
29883,
29897,
7783,
15025,
29889,
2178,
10462,
21676,
29889,
13,
29937,
10413,
21144,
1090,
278,
341,
1806,
19245,
29889,
2823,
19245,
29889,
3945,
297,
2... |
cmdb/hosts/models.py | fox0014/cmdb | 0 | 94772 | <filename>cmdb/hosts/models.py
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired b... | [
1,
529,
9507,
29958,
4912,
2585,
29914,
23525,
29914,
9794,
29889,
2272,
13,
29937,
910,
338,
385,
4469,
29899,
13525,
15337,
1904,
3883,
29889,
13,
29937,
887,
29915,
645,
505,
304,
437,
278,
1494,
7522,
304,
5941,
445,
701,
29901,
13,... |
demo/Drain_openstack.py | hcgcarry/logparser | 1 | 113134 | #!/usr/bin/env python
import sys
import os
sys.path.append('../')
from logparser import Drain
from createSessonLog.createSessionLog import LogParser
from shutil import copyfile
from preprocess.preprocessLog import preprocess
type = sys.argv[1]
if len(sys.argv) < 2:
print("usage:python Drain_openstack.py {normal|ab... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
10876,
13,
5215,
2897,
13,
9675,
29889,
2084,
29889,
4397,
877,
6995,
1495,
13,
3166,
1480,
16680,
1053,
360,
6038,
13,
3166,
1653,
29903,
404,
265,
3403,
29889,
3258,
7317,
3403... |
stick_mouse_pos.py | sevenjames/fpie-scripts | 0 | 55621 | """
Script to control mouse cursor with gamepad stick.
Specifically: right stick x axis controls mouse x position.
Requires FreePIE: https://github.com/AndersMalmgren/FreePIE
2020-06-11 JAO
"""
if starting:
"""This block only runs once."""
import time
joy_id = 0 # gamepad device number
x_axis_mult = 0.... | [
1,
9995,
13,
4081,
304,
2761,
9495,
10677,
411,
3748,
8305,
12070,
29889,
13,
10299,
928,
635,
29901,
1492,
12070,
921,
9685,
11761,
9495,
921,
2602,
29889,
13,
1123,
339,
2658,
12362,
2227,
29923,
29901,
2045,
597,
3292,
29889,
510,
29... |
app/__init__.py | Jotasenpai/DigitalMediaStoreRESTfull | 0 | 1540 | import logging
import os
from flask import Flask
from flask_cors import CORS
from app.extensions import api
from app.extensions.database import db
from app.extensions.schema import ma
from app.views import albums, artists, hello, tracks
def create_app(config, **kwargs):
logging.basicConfig(level=logging.INFO)
... | [
1,
1053,
12183,
13,
5215,
2897,
13,
13,
3166,
29784,
1053,
2379,
1278,
13,
3166,
29784,
29918,
29883,
943,
1053,
315,
24125,
13,
13,
3166,
623,
29889,
24299,
1053,
7882,
13,
3166,
623,
29889,
24299,
29889,
9803,
1053,
4833,
13,
3166,
... |
src/phl_budget_data/utils.py | PhilaController/phl-budget-data | 1 | 133150 | <reponame>PhilaController/phl-budget-data
import inspect
from functools import wraps
import pandas as pd
from . import DATA_DIR
def determine_file_name(f, **kwargs):
"""Given a function, determine the matching file name."""
# The parts
name = f.__name__
tag = f.__module__.split(".")[-1]
# The ... | [
1,
529,
276,
1112,
420,
29958,
4819,
4233,
2956,
29914,
561,
29880,
29899,
15841,
657,
29899,
1272,
13,
5215,
16096,
13,
3166,
2090,
312,
8789,
1053,
11463,
567,
13,
13,
5215,
11701,
408,
10518,
13,
13,
3166,
869,
1053,
360,
8254,
299... |
Day2/python-exercises-02-answers/preparing_dataset/category_dataset_debug.py | klimpie94/Python-training | 0 | 35092 | import pandas as pd
import os
from pathlib import Path
import warnings
warnings.filterwarnings('ignore')
DATA_PATH = os.path.join(
os.fspath(Path(__file__).parents[1]),
"data")
IMDB_DATA_PATH = os.path.join(DATA_PATH, "imdb_category.csv")
EXPORT_PATH = os.path.join(DATA_PATH, "imdb_category_binary.csv")
ca... | [
1,
1053,
11701,
408,
10518,
13,
5215,
2897,
13,
3166,
2224,
1982,
1053,
10802,
13,
13,
5215,
18116,
13,
25442,
886,
29889,
4572,
25442,
886,
877,
17281,
1495,
13,
13,
13,
14573,
29918,
10145,
353,
2897,
29889,
2084,
29889,
7122,
29898,
... |
apigw/schema.py | theztd/flaskapp-prom | 2 | 185830 | import json
from os import path, getenv, uname
from requests import get
try:
import graphene
#from graphene_sqlalchemy import SQLAlchemyObjectType, SQLAlchemyConnectionField
except ImportError as err:
print("Install dependencies!!!")
print(err)
exit(22)
ENV = getenv("ENV", "devel")
VERSION = "unk... | [
1,
1053,
4390,
13,
3166,
2897,
1053,
2224,
29892,
679,
6272,
29892,
443,
420,
13,
3166,
7274,
1053,
679,
13,
13,
2202,
29901,
13,
1678,
1053,
3983,
1600,
13,
1678,
396,
3166,
3983,
1600,
29918,
2850,
284,
305,
6764,
1053,
3758,
2499,
... |
income_expense_tracker/authentication/views.py | gokul-sarath07/Nymblelabs-Expence-Tracker | 0 | 50805 | <reponame>gokul-sarath07/Nymblelabs-Expence-Tracker<filename>income_expense_tracker/authentication/views.py
from django.views import View
from django.contrib import messages
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.mod... | [
1,
529,
276,
1112,
420,
29958,
29887,
554,
352,
29899,
29879,
279,
493,
29900,
29955,
29914,
29940,
962,
569,
29880,
6897,
29899,
9544,
663,
29899,
5323,
4937,
29966,
9507,
29958,
262,
2763,
29918,
4548,
1947,
29918,
3018,
4937,
29914,
23... |
tests/test_core/test_graph_objs/test_instantiate_hierarchy.py | wwwidonja/changed_plotly | 0 | 6603 | from __future__ import absolute_import
from unittest import TestCase
import os
import importlib
import inspect
from plotly.basedatatypes import BasePlotlyType, BaseFigure
datatypes_root = "new_plotly/graph_objs"
datatype_modules = [
dirpath.replace("/", ".")
for dirpath, _, _ in os.walk(datatypes_root)
if... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
3166,
443,
27958,
1053,
4321,
8259,
13,
5215,
2897,
13,
5215,
1053,
1982,
13,
5215,
16096,
13,
13,
3166,
6492,
368,
29889,
6707,
271,
271,
7384,
1053,
7399,
20867,
368,
154... |
conway.py | cmr/piday-automata | 0 | 179804 | from world import World
from pygame import draw
class Cell(object):
def __init__(self, state):
self.state = state
@classmethod
def initial(cls):
return Cell(0)
def is_alive(self):
return self.state == 1
def render(self, x, y, width, surf):
col = (0,0,0)
... | [
1,
515,
3186,
1053,
2787,
13,
13,
3166,
22028,
1053,
4216,
13,
13,
1990,
19413,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2106,
1125,
13,
4706,
1583,
29889,
3859,
353,
2106,
13,
13,
1678,
732,
1990,
5696,
13,
... |
ext/ANTsPyNet/antspynet/utilities/mixture_density_utilities.py | tsmonteiro/fmri_proc | 2 | 16131 | <reponame>tsmonteiro/fmri_proc<gh_stars>1-10
import keras.backend as K
from keras.engine import Layer, InputSpec
from keras.layers import Concatenate
from keras import initializers
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
class MixtureDensityLayer(Layer):
"""
Layer for... | [
1,
529,
276,
1112,
420,
29958,
1372,
3712,
371,
3350,
29914,
24826,
374,
29918,
15439,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
13,
5215,
13023,
294,
29889,
27852,
408,
476,
13,
3166,
13023,
294,
29889,
10599... |
tests.py | hephzaron/EMG_ANN | 0 | 124462 | <reponame>hephzaron/EMG_ANN<gh_stars>0
import unittest
from tests.dataloader import DataloaderTestCase
scale_test_suite = unittest.TestSuite([
unittest.TestLoader().loadTestsFromTestCase(DataloaderTestCase)
])
def test_scale_suite():
result = unittest.TestResult()
runner = unittest.TextTestRunner()
... | [
1,
529,
276,
1112,
420,
29958,
354,
561,
29920,
5022,
29914,
12665,
29954,
29918,
2190,
29940,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
443,
27958,
13,
13,
3166,
6987,
29889,
29881,
2075,
29877,
1664,
1053,
360,
2075,
29877... |
tests/test.py | speer-kinjo/ro.py | 28 | 162599 | <gh_stars>10-100
"""
Tests ro.py functionality.
It is not possible to fully test ro.py as it relies on external conditions, so this test mostly checks parity and cannot
be fully relied upon. Certain methods have been intentionally left out.
"""
import os
import asyncio
from typing import Optional
from loguru impor... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
15945,
29908,
13,
13,
24376,
696,
29889,
2272,
9863,
29889,
13,
3112,
338,
451,
1950,
304,
8072,
1243,
696,
29889,
2272,
408,
372,
337,
3687,
373,
702... |
src/djanban/apps/repositories/migrations/0014_auto_20161006_0143.py | diegojromerolopez/djanban | 33 | 54561 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-10-05 23:43
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('boards', '0030_auto_20160925_1843'),
('repositories', '0013_auto_20160927_1935'),
]
o... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
3251,
630,
491,
15337,
29871,
29896,
29889,
29896,
29900,
373,
29871,
29906,
29900,
29896,
29953,
29899,
29896,
29900,
29899,
29900,
29945,
29871,
299... |
3.Pandas/4_plotting.py | utkrist-karky/Deep-Learning-Prerequisite | 1 | 78960 | <gh_stars>1-10
import pandas as pd
import os
import matplotlib.pyplot as plt
from pandas.plotting import scatter_matrix
def date_to_year(row):
return int(row['date'].split('-')[0])
# from data frame row get date that is split with - and take the 0th item
#Get the data frame and assign df to it
os.system("wg... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
11701,
408,
10518,
13,
5215,
2897,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
3166,
11701,
29889,
5317,
1259,
1053,
14801,
29918,
5344,
13,
13,
13,
1... |
07-Array-Oriented-Programming-with-NumPy/7-4-Array-from-List-of-Lists.py | rajevac/deitel-intro-to-python-exercises | 0 | 114366 | import numpy as np
arr_1 = [2, 3, 5, 7, 11]
arr_2 = [13, 17, 19, 23, 29]
arr_3 = np.array([arr_1, arr_2])
print(arr_3)
| [
1,
1053,
12655,
408,
7442,
13,
13,
2749,
29918,
29896,
353,
518,
29906,
29892,
29871,
29941,
29892,
29871,
29945,
29892,
29871,
29955,
29892,
29871,
29896,
29896,
29962,
13,
2749,
29918,
29906,
353,
518,
29896,
29941,
29892,
29871,
29896,
2... |
coding_test_with_python/greedy/t5.py | mrbartrns/swacademy_structure | 0 | 97401 | import sys
sys.stdin = open('../input.txt', 'r')
si = sys.stdin.readline
n, m = map(int, si().split())
arr = list(map(int, si().split()))
dp = [0] * 11
answer = 0
for i in range(n):
dp[arr[i]] += 1
for i in range(m):
n -= dp[i]
answer += dp[i] * n
print(answer)
| [
1,
1053,
10876,
13,
13,
9675,
29889,
4172,
262,
353,
1722,
877,
6995,
2080,
29889,
3945,
742,
525,
29878,
1495,
13,
1039,
353,
10876,
29889,
4172,
262,
29889,
949,
1220,
13,
13,
29876,
29892,
286,
353,
2910,
29898,
524,
29892,
1354,
2... |
0278_FirstBadVersion/python/test_solution.py | jeffvswanson/LeetCode | 0 | 155156 | <filename>0278_FirstBadVersion/python/test_solution.py<gh_stars>0
import pytest
import solution
@pytest.mark.parametrize("num_versions,bad_version", [(10, 1), (10, 8), (1, 1), (10, 10), (10, 5)])
def test_initial_pass(num_versions, bad_version):
got = solution.initial_pass(num_versions, bad_version)
assert g... | [
1,
529,
9507,
29958,
29900,
29906,
29955,
29947,
29918,
6730,
22050,
6594,
29914,
4691,
29914,
1688,
29918,
2929,
918,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
11451,
1688,
13,
13,
5215,
1650,
13,
13,
13,
29992... |
ed/ai/ml/kubeflow/examples/out.file_outputs.py | cn007b/stash | 0 | 1607995 | <gh_stars>0
import kfp
import kfp.dsl as dsl
from kubernetes import client
from kubernetes.client.models import V1EnvVar
@kfp.dsl.pipeline(name='check x', description='')
def check_x():
op1 = dsl.ContainerOp(
name='write log',
image='cn007b/alpine',
command=['sh', '-c'],
arguments=['echo ok > /tmp/x... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
413,
18091,
13,
5215,
413,
18091,
29889,
29881,
2536,
408,
270,
2536,
13,
3166,
413,
17547,
1053,
3132,
13,
3166,
413,
17547,
29889,
4645,
29889,
9794,
1053,
478,
29896,
21745,
90... |
channels/views/channels.py | mitodl/open-discussions | 12 | 139212 | """Views for REST APIs for channels"""
from django.shortcuts import get_object_or_404
from rest_framework.generics import ListCreateAPIView, RetrieveUpdateAPIView
from rest_framework.response import Response
from rest_framework.exceptions import PermissionDenied
from rest_framework import status
from channels.api impo... | [
1,
9995,
23825,
363,
16759,
23649,
363,
18196,
15945,
29908,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
13,
3166,
1791,
29918,
4468,
29889,
4738,
1199,
1053,
2391,
4391,
8787,
... |
mainapp/migrations/0007_auto_20190114_0854.py | tum0xa/geekbrains-django2-homework | 0 | 133698 | <filename>mainapp/migrations/0007_auto_20190114_0854.py
# Generated by Django 2.1 on 2019-01-14 03:54
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mainapp', '0006_productcategory_is_active'),
]
operations = [... | [
1,
529,
9507,
29958,
3396,
932,
29914,
26983,
800,
29914,
29900,
29900,
29900,
29955,
29918,
6921,
29918,
29906,
29900,
29896,
29929,
29900,
29896,
29896,
29946,
29918,
29900,
29947,
29945,
29946,
29889,
2272,
13,
29937,
3251,
630,
491,
15337... |
scicite/compute_features.py | allenai/scicite | 89 | 154984 | <filename>scicite/compute_features.py
""" Module for computing features """
import re
from collections import Counter, defaultdict
from typing import List, Optional, Tuple, Type
import functools
from spacy.tokens.token import Token as SpacyToken
import scicite.constants as constants
from scicite.constants import CITA... | [
1,
529,
9507,
29958,
1557,
293,
568,
29914,
26017,
29918,
22100,
29889,
2272,
13,
15945,
29908,
15591,
363,
20602,
5680,
9995,
13,
5215,
337,
13,
3166,
16250,
1053,
315,
5336,
29892,
2322,
8977,
13,
3166,
19229,
1053,
2391,
29892,
28379,
... |
IdleThing.py | drdread987/IdleThing | 0 | 75637 | <gh_stars>0
from Scenes.TitleScreen import TitleScene
import pygame
import Tools.Images
import datetime
def run_game(width, height, fps, starting_scene):
pygame.init()
screen = pygame.display.set_mode((width, height))
clock = pygame.time.Clock()
current_time = datetime.datetime.now()
time_passed =... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
2522,
25487,
29889,
7030,
11357,
1053,
18527,
23472,
13,
5215,
22028,
13,
5215,
27564,
29889,
20163,
13,
5215,
12865,
13,
13,
13,
1753,
1065,
29918,
11802,
29898,
2103,
29892,
3171,... |
python_project/mfresh_project/mfresh_api/mfresh_api/urls.py | 452366we/python_web | 0 | 178248 | <filename>python_project/mfresh_project/mfresh_api/mfresh_api/urls.py<gh_stars>0
"""mfresh_api URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import v... | [
1,
529,
9507,
29958,
4691,
29918,
4836,
29914,
29885,
29888,
3781,
29918,
4836,
29914,
29885,
29888,
3781,
29918,
2754,
29914,
29885,
29888,
3781,
29918,
2754,
29914,
26045,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945... |
analytics/notebooks/lib/run_definition.py | solace-iot-team/az-use-case-perf-tests | 5 | 63143 | # ---------------------------------------------------------------------------------------------
# MIT License
# Copyright (c) 2020, Solace Corporation, <NAME> (<EMAIL>)
# Copyright (c) 2020, Solace Corporation, <NAME> (<EMAIL>)
# ------------------------------------------------------------------------------------------... | [
1,
396,
448,
2683,
2683,
2683,
2683,
2683,
9072,
13,
29937,
341,
1806,
19245,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29900,
29892,
4956,
815,
15025,
29892,
529,
5813,
29958,
313,
29966,
26862,
6227,
12948,
... |
back/config.py | aninstein/sex_code_blog | 116 | 163414 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
http://www.pythondoc.com/flask/config.html#id6
"""
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = os.getenv('SECRET_KEY') or 'MPk2WlUArcLeeU_iohzT'
'''
# 旧版本
import random
import string
''.join(rando... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
1124,
597,
1636,
29889,
29886,
1541,
898,
542,
29889,
510,
29914,
1579,
1278,
29914,
... |
pytglib/api/types/rich_text_phone_number.py | iTeam-co/pytglib | 6 | 23650 | <filename>pytglib/api/types/rich_text_phone_number.py
from ..utils import Object
class RichTextPhoneNumber(Object):
"""
A rich text phone number
Attributes:
ID (:obj:`str`): ``RichTextPhoneNumber``
Args:
text (:class:`telegram.api.types.RichText`):
Text
phone_... | [
1,
529,
9507,
29958,
2272,
29873,
29887,
1982,
29914,
2754,
29914,
8768,
29914,
4018,
29918,
726,
29918,
6710,
29918,
4537,
29889,
2272,
13,
13,
13,
3166,
6317,
13239,
1053,
4669,
13,
13,
13,
1990,
4385,
1626,
9861,
4557,
29898,
2061,
1... |
bin/bin/music_parse.py | anthonynguyen/dotfiles | 0 | 188686 | #!/usr/bin/env python3
import subprocess
o = subprocess.check_output(["mpc", "-f", "%title%"]).decode()
if "[playing]" in o:
#p = o.split("\n")
#print("{} {}".format(u"\uf001", p[0]))
print(u"\uf001")
else:
print(u"\uf04c") | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
1014,
5014,
13,
13,
29877,
353,
1014,
5014,
29889,
3198,
29918,
4905,
29898,
3366,
1526,
29883,
613,
11663,
29888,
613,
11860,
3257,
29995,
3108,
467,
13808,
580,
13,
... |
split.py | HieuNT1998/BraTS-DMFNet | 0 | 165112 | # """
# The code will split the training set into k-fold for cross-validation
# """
# import os
# import numpy as np
# from sklearn.model_selection import StratifiedKFold
# root = './data/2018/MICCAI_BraTS_2018_Data_Training'
# valid_data_dir = './data/2018/MICCAI_BraTS_2018_Data_Validation'
# def wri... | [
1,
396,
9995,
30004,
13,
29937,
450,
775,
674,
6219,
278,
6694,
731,
964,
413,
29899,
8771,
363,
4891,
29899,
18157,
30004,
13,
29937,
9995,
30004,
13,
30004,
13,
29937,
1053,
2897,
30004,
13,
30004,
13,
29937,
1053,
12655,
408,
7442,
... |
day10/day10.py | KohlhaseJ/adventofcode2021 | 0 | 1610692 | legalPairs = {
'(': ')',
'[': ']',
'{': '}',
'<': '>'
}
illegalCharacterScores = {
')': 3,
']': 57,
'}': 1197,
'>': 25137
}
completedCharacterScores = {
')': 1,
']': 2,
'}': 3,
'>': 4
}
def isLegalPair(opensWith, closesWith):
return legalPairs.get(opensWith, 'invalid') == closesWith
def is... | [
1,
11706,
29925,
7121,
353,
426,
13,
29871,
525,
877,
29901,
25710,
742,
13,
29871,
525,
1839,
29901,
525,
29962,
742,
13,
29871,
22372,
2396,
525,
29913,
742,
13,
29871,
12801,
2396,
525,
16299,
13,
29913,
13,
13,
309,
12018,
20755,
... |
utilities/hdri_to_cubemap/hdri_to_cubemap.py | wezu/p3d_samples | 15 | 191294 | <filename>utilities/hdri_to_cubemap/hdri_to_cubemap.py
import os
from panda3d.core import *
loadPrcFileData("", "framebuffer-multisample 1")
loadPrcFileData("", "multisamples 8")
from direct.showbase import ShowBase
base=ShowBase.ShowBase()
render.setAntialias(AntialiasAttrib.MMultisample)
sky_box=loader.load_model('... | [
1,
529,
9507,
29958,
4422,
1907,
29914,
16440,
374,
29918,
517,
29918,
29883,
431,
331,
481,
29914,
16440,
374,
29918,
517,
29918,
29883,
431,
331,
481,
29889,
2272,
13,
5215,
2897,
13,
3166,
282,
5863,
29941,
29881,
29889,
3221,
1053,
... |
mac/pyobjc-framework-Quartz/Examples/Programming with Quartz/BasicDrawing/ColorAndGState.py | albertz/music-player | 132 | 54514 | import sys
from Quartz import *
import Utilities
import array
def doColorSpaceFillAndStroke(context):
theColorSpace = Utilities.getTheCalibratedRGBColorSpace()
opaqueRed = ( 0.663, 0.0, 0.031, 1.0 ) # red,green,blue,alpha
aBlue = ( 0.482, 0.62, 0.871, 1.0 ) # red,green,blue,alpha
# Set the fill ... | [
1,
1053,
10876,
13,
13,
3166,
24664,
29920,
1053,
334,
13,
13,
5215,
22310,
1907,
13,
5215,
1409,
13,
13,
1753,
437,
3306,
14936,
20876,
2855,
855,
10946,
29898,
4703,
1125,
13,
1678,
278,
3306,
14936,
353,
22310,
1907,
29889,
657,
15... |
apps/lectures/serializers.py | csilouanos/student-management-system | 0 | 15291 | <filename>apps/lectures/serializers.py
from rest_framework import serializers
from .models import Lecture
class LectureSerializer(serializers.ModelSerializer):
class Meta:
model = Lecture
fields = ('id', 'title', 'lecturer_name', 'date', 'duration',
'slides_url', 'is_required')... | [
1,
529,
9507,
29958,
13371,
29914,
781,
1973,
29914,
15550,
19427,
29889,
2272,
13,
3166,
1791,
29918,
4468,
1053,
7797,
19427,
13,
3166,
869,
9794,
1053,
365,
522,
545,
13,
13,
1990,
365,
522,
545,
17679,
29898,
15550,
19427,
29889,
31... |
LeetCode/LeetCode_Python-master/LeetCode_Python-master/Algorithm-Medium/template.py | Sycamore-City-passerby/ML | 0 | 109596 | """
Time Complexity = O(log(N))
Space Complexity = O(1)
Implement int sqrt(int x).
Compute and return the square root of x, where x is guaranteed to be a non-negative integer.
Since the return type is an integer, the decimal digits are truncated and only the integer part
of the result is return... | [
1,
9995,
13,
1678,
5974,
26596,
537,
353,
438,
29898,
1188,
29898,
29940,
876,
13,
1678,
14121,
26596,
537,
353,
438,
29898,
29896,
29897,
13,
13,
1678,
1954,
2037,
938,
18074,
2273,
29898,
524,
921,
467,
13,
1678,
11796,
29872,
322,
... |
lamson/utils.py | medecau/lamson | 0 | 99886 | """
Mostly utility functions Lamson uses internally that don't
really belong anywhere else in the modules. This module
is kind of a dumping ground, so if you find something that
can be improved feel free to work up a patch.
"""
from lamson import server, routing
import sys, os
import logging
import daemon
try:
f... | [
1,
9995,
13,
29924,
520,
368,
19725,
3168,
12718,
1100,
3913,
25106,
393,
1016,
29915,
29873,
13,
276,
635,
6852,
12214,
1683,
297,
278,
10585,
29889,
29871,
910,
3883,
13,
275,
2924,
310,
263,
16766,
292,
5962,
29892,
577,
565,
366,
... |
docs/startdocs.py | philippeitis/justpy | 1 | 156386 | <filename>docs/startdocs.py
import http.server
import socketserver
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORT), Handler) as httpd:
print(f"Serving docs at http://localhost:{PORT}")
httpd.serve_forever()
| [
1,
529,
9507,
29958,
2640,
29914,
2962,
2640,
29889,
2272,
13,
5215,
1732,
29889,
2974,
13,
5215,
9909,
2974,
13,
13,
13,
15082,
353,
29871,
29947,
29900,
29947,
29900,
13,
13,
4598,
353,
1732,
29889,
2974,
29889,
15427,
10493,
3089,
45... |
not_tf_opt/__init__.py | gergely-flamich/not-tf-opt | 0 | 37241 | from .variables import *
from .optimize import *
from .utils import *
| [
1,
515,
869,
20897,
1053,
334,
13,
3166,
869,
20640,
675,
1053,
334,
13,
3166,
869,
13239,
1053,
334,
13,
2
] |
old/pro/src/lofarSun/lofarJ2000xySun.py | peijin94/LOFAR-Sun-tools | 0 | 172868 |
"""
A script to convert between the J2000 and the sun.
"""
from sunpy.coordinates.sun import sky_position as sun_position
import sunpy.coordinates.sun as sun_coord
import numpy as np
def j2000xy(RA,DEC,t_sun):
[RA_sun, DEC_sun] = sun_position(t_sun,False)
rotate_angel = sun_coord.P(t_sun)
# shift the ce... | [
1,
29871,
13,
15945,
29908,
13,
29909,
2471,
304,
3588,
1546,
278,
435,
29906,
29900,
29900,
29900,
322,
278,
6575,
29889,
13,
15945,
29908,
13,
13,
3166,
6575,
2272,
29889,
1111,
24266,
29889,
11445,
1053,
14744,
29918,
3283,
408,
6575,
... |
python/ee/tests/imagecollection_test.py | jsta/earthengine-api | 1,909 | 144023 | #!/usr/bin/env python
"""Test for the ee.imagecollection module."""
from unittest import mock
import unittest
import ee
from ee import apitestcase
class ImageCollectionTestCase(apitestcase.ApiTestCase):
def testImageCollectionConstructors(self):
"""Verifies that constructors understand valid parameters."""... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
3057,
363,
278,
321,
29872,
29889,
3027,
10855,
3883,
1213,
15945,
13,
13,
13,
13,
3166,
443,
27958,
1053,
11187,
13,
13,
5215,
443,
27958,
13,
5215,
321,
29872,
13,
31... |
DEAP_GP.py | iskaj/GeneticProgrammingExpression | 1 | 65051 | <filename>DEAP_GP.py
from deap import base, creator, gp, tools, algorithms
import math, operator, numpy
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
# Because division is scary
def protectedDiv(left, right):
try:
return left / right
except ZeroDi... | [
1,
529,
9507,
29958,
2287,
3301,
29918,
19903,
29889,
2272,
13,
3166,
316,
481,
1053,
2967,
29892,
907,
1061,
29892,
330,
29886,
29892,
8492,
29892,
14009,
30004,
13,
5215,
5844,
29892,
5455,
29892,
12655,
30004,
13,
5215,
409,
370,
1398,... |
makahiki/apps/widgets/ask_admin/tests.py | justinslee/Wai-Not-Makahiki | 1 | 148025 | <filename>makahiki/apps/widgets/ask_admin/tests.py<gh_stars>1-10
"""
ask admin tests.
"""
from django.test import TransactionTestCase
from django.core.urlresolvers import reverse
from apps.utils import test_utils
class AskAdminFunctionalTests(TransactionTestCase):
"""AskAdmin test cases."""
def setUp(self):... | [
1,
529,
9507,
29958,
29885,
557,
801,
10058,
29914,
13371,
29914,
8030,
29879,
29914,
1278,
29918,
6406,
29914,
21150,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
1278,
4113,
6987,
2... |
wafhelpers/rtems_trace.py | fakecoinbase/ntpsecslashntpsec | 201 | 143010 | <reponame>fakecoinbase/ntpsecslashntpsec
from waflib.TaskGen import feature, after_method
@feature("rtems_trace")
@after_method('apply_link')
def rtems_trace(self):
if self.env.RTEMS_TEST_ENABLE:
self.link_task.env.LINK_CC = self.env.BIN_RTEMS_TLD \
+ self.env.RTEMS_TEST_FLAGS + ['--']
| [
1,
529,
276,
1112,
420,
29958,
29888,
1296,
1111,
262,
3188,
29914,
593,
27358,
2395,
29880,
1161,
593,
29886,
3471,
13,
3166,
281,
2142,
1982,
29889,
5398,
15462,
1053,
4682,
29892,
1156,
29918,
5696,
13,
13,
13,
29992,
14394,
703,
298... |
{{cookiecutter.project_slug}}/core/exceptions/__init__.py | teamhide/cookiecutter-sanic | 2 | 126113 | from sanic.exceptions import SanicException, add_status_code
class CustomException(SanicException):
def __init__(self, message: str, code: int):
super().__init__(message=message, status_code=code)
@add_status_code(401)
class ValidationErrorException(SanicException):
def __init__(self):
messa... | [
1,
515,
9753,
293,
29889,
11739,
29879,
1053,
3087,
293,
2451,
29892,
788,
29918,
4882,
29918,
401,
13,
13,
13,
1990,
8701,
2451,
29898,
22509,
293,
2451,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2643,
29901,
851,
29892,
775... |
tinynumpy/benchmark.py | Kramer84/tinynumpy | 168 | 54556 | <reponame>Kramer84/tinynumpy<filename>tinynumpy/benchmark.py
# -*- coding: utf-8 -*-
# Copyright (c) 2014, <NAME> and <NAME>
# tinynumpy is distributed under the terms of the MIT License.
""" Benchmarks for tinynumpy
Findings:
* A list of floats costs about 33 bytes per float
* A list if ints costs anout 41 bytes pe... | [
1,
529,
276,
1112,
420,
29958,
29968,
2572,
261,
29947,
29946,
29914,
29873,
262,
948,
398,
2272,
29966,
9507,
29958,
29873,
262,
948,
398,
2272,
29914,
1785,
16580,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
2... |
ragpicker/reporting/mysql.py | K4lium/Snakepit | 7 | 62951 | <gh_stars>1-10
# Copyright (C) 2013-2015 Ragpicker Developers.
# This file is part of Ragpicker Malware Crawler - http://code.google.com/p/malware-crawler/
from yapsy.IPlugin import IPlugin
from core.abstracts import Report
class MySQL(IPlugin, Report):
"""Stores data from long-run analysis in MySQL."""
def... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29941,
29899,
29906,
29900,
29896,
29945,
390,
351,
13908,
10682,
414,
29889,
13,
29937,
910,
934,
33... |
tools/training.py | aglgit/python-md | 0 | 158658 | <reponame>aglgit/python-md
import os
import numpy as np
import pandas as pd
from amp import Amp
from amp.utilities import TrainingConvergenceError
from amp.analysis import calculate_rmses
from amp.descriptor.cutoffs import Cosine, Polynomial
from amp.descriptor.gaussian import Gaussian, make_symmetry_functions
from amp... | [
1,
529,
276,
1112,
420,
29958,
351,
29880,
5559,
29914,
4691,
29899,
3487,
13,
5215,
2897,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
3166,
21332,
1053,
319,
1526,
13,
3166,
21332,
29889,
4422,
1907,
1053,
26101,
1168,... |
content/test/gpu/gpu_tests/path_util.py | google-ar/chromium | 777 | 196577 | # Copyright (c) 2015 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.
import os
import sys
def GetChromiumSrcDir():
return os.path.abspath(os.path.join(
os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, ... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29945,
450,
678,
456,
1974,
13189,
943,
29889,
2178,
10462,
21676,
29889,
13,
29937,
4803,
310,
445,
2752,
775,
338,
4095,
287,
491,
263,
350,
7230,
29899,
3293,
19405,
... |
conduit/fair/data/datamodules/tabular/law.py | predictive-analytics-lab/pal-bolts | 2 | 146871 | <reponame>predictive-analytics-lab/pal-bolts<filename>conduit/fair/data/datamodules/tabular/law.py
"""Law Admissions Dataset."""
from enum import Enum
import attr
import ethicml as em
from conduit.fair.data.datamodules.tabular.base import EthicMlDataModule
__all__ = ["LawDataModule", "LawSens"]
class LawSens(Enum)... | [
1,
529,
276,
1112,
420,
29958,
27711,
573,
29899,
7054,
22026,
29899,
8205,
29914,
7830,
29899,
2095,
1372,
29966,
9507,
29958,
535,
700,
277,
29914,
29888,
1466,
29914,
1272,
29914,
4130,
314,
397,
2540,
29914,
9456,
29914,
10653,
29889,
... |
var/spack/repos/builtin/packages/llvm-amdgpu/package.py | milljm/spack | 0 | 89539 | <reponame>milljm/spack
# 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 LlvmAmdgpu(CMakePackage):
"""Toolkit for the construction of highl... | [
1,
529,
276,
1112,
420,
29958,
19958,
21231,
29914,
1028,
547,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29941,
29899,
29906,
29900,
29906,
29900,
19520,
22469,
5514,
3086,
14223,
29892,
365,
12182,
322,
916,
13,
29937,
1706,
547,... |
cilp/utils.py | vakker/CILP | 2 | 116548 | <gh_stars>1-10
import collections
import hashlib
import itertools
import json
import re
import subprocess
import time
from functools import partial
from multiprocessing import Pool
from os import path as osp
import numpy as np
import pandas as pd
import torch
def save_params(log_dir, params):
params_id = get_dic... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
16250,
13,
5215,
6608,
1982,
13,
5215,
4256,
8504,
13,
5215,
4390,
13,
5215,
337,
13,
5215,
1014,
5014,
13,
5215,
931,
13,
3166,
2090,
312,
8789,
1053,
7687... |
Classes/Filex.py | Ramin-RX7/RX7-Lib | 6 | 57699 | <gh_stars>1-10
'''
Filex Module is Sub-Module of rx7 library.
It contains 2 classes:
1- files: Static method
2- File: create File object and use its methods.
(If you are using rx7 module, don't use this and directly use rx7.files and rx7.File)
(Usually I use first one when I need a file only one time in my code
a... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
12008,
13,
2283,
29916,
15591,
338,
3323,
29899,
7355,
310,
364,
29916,
29955,
3489,
29889,
13,
3112,
3743,
29871,
29906,
4413,
29901,
259,
13,
29896,
29899,
2066,
29... |
Algorithms/Searching & Sorting/Exponential Search/exponential_search.py | strangestroad/interview-techdev-guide | 320 | 161565 | '''
Implementation of exponential search
Time Complexity: O(logn)
Space Complexity: Depends on implementation of binary_search {O(logn): recursive, O(1):iterative}
Used for unbounded search, when the length of array is infinite or not known
'''
#iterative implementation of binary search
def binary_search(arr, s, e, x... | [
1,
14550,
13,
1888,
14607,
310,
25658,
2740,
13,
2481,
26596,
537,
29901,
438,
29898,
1188,
29876,
29897,
13,
14936,
26596,
537,
29901,
10034,
1975,
373,
5314,
310,
7581,
29918,
4478,
426,
29949,
29898,
1188,
29876,
1125,
16732,
29892,
43... |
utils/utils.py | miltonbd/mcs_2018_adversarial_attack | 14 | 94789 | <filename>utils/utils.py
from skimage.measure import compare_ssim
import numpy as np
def get_ssim(original_img,changed_img):
ssim = compare_ssim(np.array(original_img, dtype=np.float32),
np.array(changed_img, dtype=np.float32),
multichannel=True)
return ssim | [
1,
529,
9507,
29958,
13239,
29914,
13239,
29889,
2272,
13,
3166,
2071,
3027,
29889,
26658,
1053,
7252,
29918,
893,
326,
13,
5215,
12655,
408,
7442,
13,
13,
1753,
679,
29918,
893,
326,
29898,
13492,
29918,
2492,
29892,
15033,
29918,
2492,
... |
versus/models.py | amin-da71/Benbb96 | 0 | 108016 | <filename>versus/models.py
from autoslug import AutoSlugField
from django.db import models
from django.urls import reverse
from django.utils import timezone
from django.utils.functional import cached_property
from base.models import Profil
class Joueur(models.Model):
nom = models.CharField(max_length=100)
sl... | [
1,
529,
9507,
29958,
874,
375,
29914,
9794,
29889,
2272,
13,
3166,
1120,
359,
29880,
688,
1053,
11133,
16973,
688,
3073,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
26045,
1053,
11837,
13,
3166,
9557,
29889,
13239,
1... |
4. PruningEncodingandRescalingFeatures/9. hc2.py | michaelbwalker/Data-Cleaning-and-Exploration-with-Machine-Learning | 7 | 128316 | # import pandas, numpy, and matplotlib
import pandas as pd
from feature_engine.encoding import OneHotEncoder
from category_encoders.hashing import HashingEncoder
from sklearn.model_selection import train_test_split
pd.set_option('display.width', 200)
pd.set_option('display.max_columns', 20)
pd.set_option('display.max_r... | [
1,
396,
1053,
11701,
29892,
12655,
29892,
322,
22889,
13,
5215,
11701,
408,
10518,
13,
3166,
4682,
29918,
10599,
29889,
22331,
1053,
3118,
28917,
8566,
6119,
13,
3166,
7663,
29918,
3977,
397,
414,
29889,
8568,
292,
1053,
11874,
292,
8566,... |
pyzombie/handlers/HandlerInstance.py | lanhel/pyzombie | 0 | 117643 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#-------------------------------------------------------------------------------
"""pyzombie HTTP RESTful server handler returning the representation of an
executable."""
__author__ = ('<NAME>',)
__version__ = '1.0.1'
__copyright__ = """Copyright 2009 <NAME> (<EMAIL>)"""
__... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
18351,
29899,
29947,
448,
29930,
29899,
13,
29937,
2683,
2683,
2683,
2683,
9072,
5634,
13,
15945,
29908,
2272,
29920,
3424,
347,
7331,
16759,
1319,
... |
vuln/__init__.py | Maskhe/DongTai-engine | 16 | 38522 | default_app_config = 'vuln.apps.VulnConfig'
| [
1,
2322,
29918,
932,
29918,
2917,
353,
525,
29894,
352,
29876,
29889,
13371,
29889,
29963,
352,
29876,
3991,
29915,
13,
2
] |
src/models/sa_cnn1d.py | LogAnalysisTeam/methods4logfiles | 0 | 59259 | <filename>src/models/sa_cnn1d.py
from __future__ import annotations
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
import numpy as np
import sklearn
from tqdm import tqdm
from typing import List
import sys
from src.models.utils import time_decorator, get_encoder_size
from src.models.datase... | [
1,
529,
9507,
29958,
4351,
29914,
9794,
29914,
4977,
29918,
29883,
15755,
29896,
29881,
29889,
2272,
13,
3166,
4770,
29888,
9130,
1649,
1053,
25495,
13,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
3166,
... |
python-analysers/src/test/resources/org/jetbrains/research/lupa/pythonAnalysis/imports/analysis/psi/fromImportStatementsData/in_13_absolute_from_import.py | JetBrains-Research/Lupa | 16 | 91980 | from src.tasks.task1 import utils
| [
1,
515,
4765,
29889,
20673,
29889,
7662,
29896,
1053,
3667,
29879,
13,
2
] |
warhorn_api.py | jagerkin/warbot | 1 | 17642 | <gh_stars>1-10
# Copyright 2021 <NAME>
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
529,
5813,
29958,
13,
29937,
29871,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
... |
ramachandran/plot.py | leimao/Ramachandran | 2 | 174425 | from typing import List, Tuple, Optional
import os
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
from matplotlib import cm
import matplotlib.colors as mplcolors
from ramachandran.io import read_residue_torsion_collection_from_file
def get... | [
1,
515,
19229,
1053,
2391,
29892,
12603,
552,
29892,
28379,
13,
5215,
2897,
13,
5215,
12655,
408,
7442,
13,
5215,
22889,
13,
2922,
17357,
29889,
1509,
877,
29909,
1505,
1495,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
228... |
geocsv/coltypes.py | poliquin/geocsv-to-mysql | 0 | 1612453 | <reponame>poliquin/geocsv-to-mysql<gh_stars>0
import re
"""
Convert a GeoCSV column type to a suitable MySQL type.
"""
def parse_coltype(txt):
"""Parse a column specification into a type, subtype tuple."""
m = FIELD.match(txt)
if m is None:
raise TypeError('Invalid column type: {}'.format(txt))... | [
1,
529,
276,
1112,
420,
29958,
3733,
8105,
262,
29914,
479,
542,
4501,
29899,
517,
29899,
7938,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
13,
5215,
337,
13,
13,
15945,
29908,
13,
18455,
263,
1879,
29877,
29907,
7597,
1897,
1134,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.