repo_name stringlengths 7 111 | __id__ int64 16.6k 19,705B | blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 5 151 | content_id stringlengths 40 40 | detected_licenses list | license_type stringclasses 2
values | repo_url stringlengths 26 130 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 42 | visit_date timestamp[ns] | revision_date timestamp[ns] | committer_date timestamp[ns] | github_id int64 14.6k 687M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 12
values | gha_fork bool 2
classes | gha_event_created_at timestamp[ns] | gha_created_at timestamp[ns] | gha_updated_at timestamp[ns] | gha_pushed_at timestamp[ns] | gha_size int64 0 10.2M ⌀ | gha_stargazers_count int32 0 178k ⌀ | gha_forks_count int32 0 88.9k ⌀ | gha_open_issues_count int32 0 2.72k ⌀ | gha_language stringlengths 1 16 ⌀ | gha_archived bool 1
class | gha_disabled bool 1
class | content stringlengths 10 2.95M | src_encoding stringclasses 5
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 10 2.95M | extension stringclasses 19
values | num_repo_files int64 1 202k | filename stringlengths 4 112 | num_lang_files int64 1 202k | alphanum_fraction float64 0.26 0.89 | alpha_fraction float64 0.2 0.89 | hex_fraction float64 0 0.09 | num_lines int32 1 93.6k | avg_line_length float64 4.57 103 | max_line_length int64 7 931 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nenusoulgithub/LearnPython | 2,207,613,200,032 | e09a4a72198c3fe77673a352133e71112c43ac61 | 3459b443b52544615a0b99a6cefa8ff0b2498a58 | /尚学堂/并发编程/P3_01-进程池.py | 8f911ed4d60ff6a5fb01fdf3f8ececd8680c4bf5 | [] | no_license | https://github.com/nenusoulgithub/LearnPython | daac90af22b3575b2b29444eac423a6134a796d8 | 734cb81440d03088e12239c3ef8ecb525286f30f | refs/heads/main | 2023-02-01T08:34:47.038816 | 2020-12-05T00:19:49 | 2020-12-05T00:19:49 | 304,339,313 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # 进程池
import os
import time
from multiprocessing import Pool
def work(name):
for i in range(10):
print("进程{}:{}开始工作...".format(os.getpid(), name))
time.sleep(0.5)
if __name__ == '__main__':
pool = Pool(8)
for i in range(10):
pool.apply_async(work, args=("{}号员工".format(i + 1),))
... | UTF-8 | Python | false | false | 464 | py | 89 | P3_01-进程池.py | 80 | 0.569948 | 0.549223 | 0 | 21 | 17.428571 | 61 |
nobe0716/problem_solving | 326,417,530,191 | 32820f735b2ae234710648c3e024f40465f5fa6a | 03a2c1eb549a66cc0cff72857963eccb0a56031d | /codeforces/contests/1334/C. Circle of Monsters.py | 0b450a589400d671d2063cff1de6b0d29694f411 | [] | no_license | https://github.com/nobe0716/problem_solving | c56e24564dbe3a8b7093fb37cd60c9e0b25f8e59 | cd43dc1eddb49d6b5965419e36db708c300dadf5 | refs/heads/master | 2023-01-21T14:05:54.170065 | 2023-01-15T16:36:30 | 2023-01-15T16:36:30 | 80,906,041 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
from collections import namedtuple
AB = namedtuple('AB', ['a', 'b'])
t = int(sys.stdin.readline().strip())
def solve(n, abs):
rest_points = 0
min_rest_point = float('inf')
for i in range(n):
a, b = abs[i].a, abs[i - 1].b
if a > b:
rest_points += (a - b)
... | UTF-8 | Python | false | false | 757 | py | 902 | C. Circle of Monsters.py | 897 | 0.541612 | 0.53897 | 0 | 32 | 22.65625 | 61 |
jingwanha/algorithm-problems | 1,760,936,593,175 | 10b23f58d8d86109d7e6cd03e14427887a9f6b3c | 60822122f562f01615710bc51d04bccee1ca0ba0 | /programers/전화번호목록_lv2.py | f3d61a56f538916021214f0d7607b194e217be92 | [] | no_license | https://github.com/jingwanha/algorithm-problems | 4e5bb6b24cd3c5e2dbd8379f954cf0879629f0ad | eb0bbb3219498c8c2f8b0330caf8c838b83a5d0d | refs/heads/main | 2023-07-29T19:30:37.833087 | 2021-09-14T05:46:50 | 2021-09-14T05:46:50 | 340,888,090 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # https://programmers.co.kr/learn/courses/30/lessons/42577
def solution(phone_book):
answer = True
sorted_phone_book = sorted(phone_book)
for idx, number in enumerate(sorted_phone_book[:-1]):
next_number = sorted_phone_book[idx + 1]
if (len(number) <= len(next_number)) and (number == next... | UTF-8 | Python | false | false | 543 | py | 45 | 전화번호목록_lv2.py | 43 | 0.605893 | 0.550645 | 0 | 22 | 23.545455 | 87 |
jendrikjoe/UdacityCapstone | 16,200,616,646,355 | 4dbe6fbcfa8d94d449c94a53732a501a2a1a8ca5 | 8211bf7722255b52535babe670b672a4fa2e8be5 | /ros/src/trajectory_plotter/trajectory_plotter.py | aa486cf755547afb2698d221600764d1fedc0d59 | [] | no_license | https://github.com/jendrikjoe/UdacityCapstone | 66e3b9799b486613b8bb4b5ae05ac7a3db672e31 | 865ca0a9c28dbd6495fe4c58de09316dc1f5778c | refs/heads/master | 2021-01-16T20:02:46.856038 | 2017-12-31T05:00:34 | 2017-12-31T05:00:34 | 100,192,651 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
from geometry_msgs.msg import PoseStamped, Quaternion
from styx_msgs.msg import Lane, Waypoint
import rospy
from matplotlib import pyplot as plt
import math
import tf
import numpy as np
class TrajectoryPlotter(object):
def __init__(self):
rospy.init_node('waypoint_updater')
self.b... | UTF-8 | Python | false | false | 3,899 | py | 20 | trajectory_plotter.py | 13 | 0.59246 | 0.585022 | 0 | 123 | 30.699187 | 91 |
hllanosp/tetris | 11,467,562,708,183 | 7d919a5a981fa30a4b6a70f8d2bc25f539d4dd09 | 77eb21f102c0c4a7bfcb0b1375bcc3b4d5c19593 | /pieza.py | d045b038b326b07ca306803388a084943097065f | [] | no_license | https://github.com/hllanosp/tetris | dfcd8a5c1852c9cb123054c25d91f4a6ebda2297 | d07f88f7b3ba0e5c062d67311ecc7e10f4592d7f | refs/heads/master | 2021-01-13T02:14:33.078013 | 2016-04-29T02:11:46 | 2016-04-29T02:11:46 | 35,199,677 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2015 hllanos <hllanos@pcllanos>
import pygame
"""
clase que representa los sprites del juego
contiene las propiedades y el comportamiento de los sprites
propiedades:
image -- define la imagen del sprite
rect -- define el rectangulo y la posicion del sp... | UTF-8 | Python | false | false | 1,598 | py | 13 | pieza.py | 8 | 0.673342 | 0.65582 | 0 | 62 | 24.790323 | 69 |
nestyme/Subtitles-generator | 5,755,256,188,657 | 34a54be940cf01b769e2cc02948ff27e5f635b18 | 2068fc1553de03a088c08929f3bd8fb04482933f | /vk_transcript_bot.py | 3867c20072f98b0a3ed58dc451d55155fb6914b0 | [] | no_license | https://github.com/nestyme/Subtitles-generator | 8876f560e548ea019f1f584022e64496464d9b7d | 12eb6a2aa32be1bcc565cb7b4919cfd3955a4382 | refs/heads/master | 2023-07-20T05:42:38.924184 | 2022-02-01T21:35:25 | 2022-02-01T21:35:25 | 196,001,289 | 82 | 31 | null | false | 2023-07-06T21:20:18 | 2019-07-09T12:09:36 | 2023-05-16T02:25:53 | 2023-07-06T21:20:17 | 19 | 73 | 27 | 6 | Python | false | false | import requests
import subprocess
import vk_api
from vk_api import VkUpload
from vk_api.longpoll import VkLongPoll, VkEventType
from vk_api.utils import get_random_id
import os
vk_session = vk_api.VkApi(token='')
vk = vk_session.get_api()
longpoll = VkLongPoll(vk_session)
def main():
session = requests.Session()
... | UTF-8 | Python | false | false | 2,913 | py | 6 | vk_transcript_bot.py | 4 | 0.43323 | 0.418126 | 0 | 73 | 38.90411 | 106 |
JetBrains/intellij-community | 5,437,428,623,650 | f71e2dc42cc1fa9646e593e7573c6be5e116a1ac | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stubs/openpyxl/openpyxl/comments/shape_writer.pyi | db8b9133a869fd6d18b1bbf9ee8722509889dbde | [
"Apache-2.0",
"MIT"
] | permissive | https://github.com/JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | false | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | 2023-09-12T03:37:30 | 2023-09-12T06:46:46 | 4,523,919 | 15,754 | 4,972 | 237 | null | false | false | from typing import Any
vmlns: str
officens: str
excelns: str
class ShapeWriter:
vml: Any
vml_path: Any
comments: Any
def __init__(self, comments) -> None: ...
def add_comment_shapetype(self, root) -> None: ...
def add_comment_shape(self, root, idx, coord, height, width) -> None: ...
def wr... | UTF-8 | Python | false | false | 341 | pyi | 127,182 | shape_writer.pyi | 70,394 | 0.624633 | 0.624633 | 0 | 14 | 23.357143 | 77 |
ikim-quantum/optimization_sparse | 781,684,094,781 | 76b2c4fdb6f3b4d01a0e31c008399fa655a7f189 | 1b1a3d9eece9648f7b544966fe6c2d28334a6968 | /optimization.py | 1e66e790e48f70c8281cfafa1bbf9f2c40f76ab1 | [
"MIT"
] | permissive | https://github.com/ikim-quantum/optimization_sparse | c1f4da15da84806bb558752943b872a8d73df3a4 | 4cdb31ec0d39c3836572b10d5010010cd4c50b8c | refs/heads/master | 2020-03-29T17:31:22.482854 | 2018-11-27T19:00:21 | 2018-11-27T19:00:21 | 150,167,733 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
from qaoa import qaoa_maxcut_randsample, qaoa_maxcut
from sparse_reconstruction import reconstruct_from_signal
import matplotlib.pyplot as plt
def qaoa_maxcut_opt_single(
edges, angles, which, sample_size, sample_size_reduced, shots=1000, draw=False):
"""
Optimizes a single angle for... | UTF-8 | Python | false | false | 5,382 | py | 15 | optimization.py | 6 | 0.603865 | 0.592531 | 0 | 134 | 39.126866 | 99 |
wilsonrocks/civulator | 14,731,737,870,758 | b83e23aa89bea7a6ad080e865f1900c89073283a | 3cacea0f49608b821261c1ebdcf9d6903dbbbe13 | /civtool.py | 5223d59d889b24c96a27f1b8f1699a2bbbc9fe05 | [] | no_license | https://github.com/wilsonrocks/civulator | cfdb057f72f12fee3f636e088591d736e9904e19 | 59ee8da4a21e9bc8c170c6f4f8e62014f17fc27d | refs/heads/master | 2020-05-27T15:05:29.347233 | 2017-05-30T22:08:42 | 2017-05-30T22:08:42 | 82,561,916 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
# Change working directory so relative paths (and template lookup) work again
#os.chdir(os.path.dirname(__file__))
import re
import pprint
import bottle
ignorecomment = re.compile(r';.*')
unitdef = re.compile(r'\[unit_(?P<unitname>\w+)')
assignment = re.compile(r'(?P<name>\w+)\s*=\s*(?P<data>.*)... | UTF-8 | Python | false | false | 5,705 | py | 7 | civtool.py | 4 | 0.577388 | 0.571429 | 0 | 170 | 31.558824 | 172 |
tobyzhu/genesis-backend | 7,043,746,387,600 | 7766856ef385785441f3793e031e6e974990a958 | 88ebd9065d97419c0f817d1ff1472927d31fab51 | /common/connectsqlany.py | bbecde9aa4fb89182a5fc5b1da29eb383cecc912 | [] | no_license | https://github.com/tobyzhu/genesis-backend | a74948fbce8929881c985644880acf99bc8643cf | 620594dc677966e405e05ef502069f8dc40a6eff | refs/heads/master | 2023-08-17T07:52:46.043433 | 2023-08-15T13:49:41 | 2023-08-15T13:49:41 | 196,469,788 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
import sqlanydb
def connectdb(server):
if server == 'sqlany':
read = sqlanydb.connect(link="tcpip(host=localhost)",
ServerName='hdms',
uid='sa',
pwd='iHaVeFuN',
dbn='hdms')
... | UTF-8 | Python | false | false | 667 | py | 358 | connectsqlany.py | 355 | 0.491603 | 0.490076 | 0 | 35 | 17.714286 | 61 |
KongChan1988/51CTO-Treasure | 9,560,597,208,795 | 069762b0624b0b37048497027b9d91961a61c254 | 35cf6fc79b8d6c335add8e55e0f4dca6f2816d1d | /Python_Study/第二模块学习/Day03/常用模块/shutil_test.py | 0c826645e4d53646737de8b565d6f3e2c3393bab | [] | no_license | https://github.com/KongChan1988/51CTO-Treasure | 08b4ca412ad8a09d67c1ea79c7149f8573309ca4 | edb2e4bd11d39ac24cd240f3e815a88361867621 | refs/heads/master | 2021-07-04T15:57:56.164446 | 2019-07-24T15:28:36 | 2019-07-24T15:28:36 | 97,453,749 | 5 | 8 | null | false | 2019-10-30T22:05:12 | 2017-07-17T08:34:59 | 2019-07-24T15:28:53 | 2019-10-30T22:05:11 | 130,318 | 2 | 8 | 1 | Python | false | false | #-*- Coding:utf-8 -*-
# Author: D.Gray
'''
shutil.copyfilobj("f1","f2")----将f1文本内容复制给 "f2"
shutil.copyfile("本节笔记","笔记2") # shutil.copyfileobj()强化功能 自动打开文件并复制内容给另一个文件
shutil.copymode(src,dst)-----仅拷贝权限,内容、组、用户均不变
shutil.copystart(src,dst)------拷贝状态的所有信息,包括 modebits,atime,mtime...
shutil.copy(src,dst)-----
shutil.copytr... | UTF-8 | Python | false | false | 1,621 | py | 470 | shutil_test.py | 340 | 0.694421 | 0.670386 | 0 | 33 | 34.333333 | 91 |
garypaduana/ProjectEuler | 7,894,149,900,540 | 3689687c0e395c8aea15123500165e3b8d662b77 | 5a9c4c344d32c90df1ca00da5bad617f2800761f | /src/com/gp/projecteuler/problems/Problem091.py | 541fe966fbd4970f917aac3b1777b9a90abd9594 | [] | no_license | https://github.com/garypaduana/ProjectEuler | d353a2e23e2f6467884643cfd75ae33dd51afb48 | 906f98130be8ae2dca91717772e47c10b452d9f4 | refs/heads/master | 2021-01-19T19:32:40.150653 | 2017-05-17T06:38:10 | 2017-05-17T06:38:10 | 10,246,389 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
Project Euler Solutions
Copyright (C) 2012-2013, Gary Paduana, gary.paduana@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(a... | UTF-8 | Python | false | false | 1,832 | py | 129 | Problem091.py | 121 | 0.611354 | 0.569869 | 0 | 56 | 31.714286 | 73 |
imscs21/myuniv | 9,148,280,349,998 | 8fd37d365262804e5301391eac0dae2a96f172db | efaa0c361e7abacc9efb8e0991c0f8f98f185f9c | /1학기/programming/basic/파이썬/파이썬 과제/5/5_6.py | aa374cfaa62fbcb10befe1f8dfa367bc975530d0 | [
"Apache-2.0"
] | permissive | https://github.com/imscs21/myuniv | 71c0523dba940b98b09c6b7661971a9e60f2ba01 | 79e9002112ed0c1b4001fe13a8f6ee1e4761478c | refs/heads/master | 2020-04-12T02:30:39.679301 | 2016-12-25T11:58:47 | 2016-12-25T11:58:47 | 53,939,682 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def double(n):
return n * 2
def halve(n):
return n // 2
def fastmult(m,n):
if n > 0:
if n % 2 == 0:
return fastmult(double(m),halve(n))
else:
return m+fastmult(m,n-1)
else:
return 0
#그냥 재귀 | UTF-8 | Python | false | false | 271 | py | 190 | 5_6.py | 149 | 0.460076 | 0.43346 | 0 | 13 | 19.307692 | 47 |
abdulrahman-hassanin/kalman_filters | 3,693,671,907,988 | c3cc04b58ab0bc25197c4ad0f68aa9dd76514b7e | fd5e64dd846a5fdf61b2f3946e6103fda6d3726c | /EKF.py | 2719019e4a3f851c3674e86aaabdb9877cbca043 | [] | no_license | https://github.com/abdulrahman-hassanin/kalman_filters | d7a7cae9f37cb6601e726b751ae0915e2fa9c5ea | 256adba8e6e1b381801c9fef4495fbf20ee4661b | refs/heads/master | 2023-08-24T22:17:08.156690 | 2021-10-23T01:29:16 | 2021-10-23T01:29:16 | 418,191,985 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
import numpy as np
class ExtendedKalmanFilter(object):
"""
This class implements the Extended kalman filter quations.
arguments:
dim_x: integer
Dimension of the state vector.
dim_z: integer
Dimension of the measurement vector.
x : np.array(d... | UTF-8 | Python | false | false | 4,149 | py | 8 | EKF.py | 7 | 0.559171 | 0.557725 | 0 | 114 | 35.403509 | 110 |
yibo7/XsAirplane | 19,396,072,346,858 | 7d92f539071ea9c8b315c0fe2c3030cb62fb234e | b7a5d5e54705f60ab41ae38c899670e0359e45ce | /bullets/bullet_hero.py | 36b34f89ff9d59bccefb7fa6fb0d7b83e367ed5c | [
"MIT"
] | permissive | https://github.com/yibo7/XsAirplane | 0ea8aceffdcd991522d13fa18d14f2131c304435 | 817212bbd33ac04547c38a1b4c780f0bb0bcb506 | refs/heads/main | 2023-08-25T23:59:40.895482 | 2021-11-07T05:40:48 | 2021-11-07T05:40:48 | 425,265,127 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from SpriteBase import SpriteBase
"""
英雄机的子弹
"""
class BulletHero(SpriteBase):
def __init__(self, sp, screen, img_index, xspeed=0, yspeed=15):
"""
创建英雄机子弹
:param sp: 来自哪个英雄机
:param screen: 要将子弹绘制到哪个场景
:param img_index: 子弹的默认造型
:param xspeed: 子弹的横向速度
:param y... | UTF-8 | Python | false | false | 1,292 | py | 14 | bullet_hero.py | 12 | 0.542802 | 0.531128 | 0 | 39 | 25.358974 | 97 |
eaverdeja/beginning_python | 6,425,271,109,117 | 699327d021f1c8f95a1321347c809d2f9359091d | 31cdf1d457eec35ca9c6723953a8412079de9544 | /exercises/exercise_5.py | c8e3d3c6684903f3f017705f70ce86676a6b4ee7 | [] | no_license | https://github.com/eaverdeja/beginning_python | 53176ebf27a00d77692d85db37f2c015a43c66bc | d0976c8fc76dc4a1fa1bb05a8969ed02e231d151 | refs/heads/master | 2020-03-26T23:35:58.890602 | 2018-10-30T11:50:27 | 2018-10-30T11:50:27 | 145,554,567 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
import turtle
turtle = turtle.Turtle()
turtle.reset()
def irParaDireita(distancia):
turtle.up()
turtle.fd(distancia)
turtle.down()
def moverTurtle(turtle, x, y):
turtle.up()
turtle.goto(x, y)
turtle.down()
def desTrianRet(turtle, tamanhoCateto):
turtle.forward(tama... | UTF-8 | Python | false | false | 1,554 | py | 13 | exercise_5.py | 13 | 0.69414 | 0.64971 | 0 | 70 | 21.185714 | 67 |
shivam-raj/Focal-Loss-demo | 5,265,629,917,272 | 4b0733a9063704f477b38c73329733725a2bd7d3 | 08967f8e974708159684e9b8d500b7d2748cd5f8 | /data.py | 563d63631c3f0b63536bd459755a1d8f1469096c | [] | no_license | https://github.com/shivam-raj/Focal-Loss-demo | d5d2b85125b47f94491cd845ac7e8e17ec8908e1 | 7e4a26b91b9ed6a403e1b73c3033f254ca8f23c5 | refs/heads/master | 2022-03-03T06:11:08.655602 | 2019-10-31T12:57:00 | 2019-10-31T12:57:00 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import tensorflow as tf
import tensorflow_datasets as tfds
tfds.disable_progress_bar()
keras = tf.keras
def get_data(IMG_SIZE,name,classes):
wts=(8,1,1)
splits=tfds.Split.TRAIN.subsplit(weighted=wts)
(raw_train,raw_val,raw_te... | UTF-8 | Python | false | false | 848 | py | 5 | data.py | 4 | 0.709906 | 0.696934 | 0 | 22 | 37.590909 | 110 |
NathanaelNeria/Workshop4 | 14,963,666,101,109 | 588a5a876e6686518745577eee918ff59e2bdc9e | 783f4a5ab680d3573b37e6b9be3bb72943ea8228 | /ascii.py | 4873c52752acb5ae139fdf94e2908718d4db23aa | [] | no_license | https://github.com/NathanaelNeria/Workshop4 | fa58a0c1aceacacf07c6a6536b4ea354e67722fd | b7a417fcf012cb629718798628ed5f30f689f60e | refs/heads/master | 2021-01-01T03:45:17.111936 | 2016-06-10T14:24:48 | 2016-06-10T14:24:48 | 57,095,454 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def get_number(lower=10, upper=50):
user_input = input("Enter Enter a number {}-{}".format(lower, upper))
user_input2 = input("Enter Enter a number {}-{}".format(lower, upper))
while True:
if user_input.isdecimal() == True and user_input2.isdecimal() == True:
if int(user_input) >= lower ... | UTF-8 | Python | false | false | 876 | py | 2 | ascii.py | 2 | 0.545662 | 0.535388 | 0 | 18 | 47.444444 | 129 |
idin/silverware | 2,319,282,349,476 | b7b4393f24b9d3309e4e80f1c9e05f838571da0d | 9752669b19ad3893f080230bec33fb1ef3ae0a66 | /silverware/htmltext/is_bullet_point.py | 613deafedc54bd1609f73da2b066d7fdbe1acaea | [
"MIT"
] | permissive | https://github.com/idin/silverware | 085d535723eb9cd6684b95fbac63a04fec5d428a | 2c47931937f4b1d34e97a1dfa3e58255e57e3545 | refs/heads/master | 2021-07-04T11:54:36.766094 | 2020-10-26T00:26:33 | 2020-10-26T00:26:33 | 189,703,237 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def has_bullet(string):
if not isinstance(string, str):
return False
string = string.strip()
if len(string) < 2:
return False
# if it is of type:
# - bullet point
# a bullet point
# 1 bullet point
# split by space
split_by_space = string.split()
if len(split_by_space) > 1 and len(split_by_space[0]) ... | UTF-8 | Python | false | false | 1,155 | py | 33 | is_bullet_point.py | 31 | 0.677056 | 0.664935 | 0 | 59 | 18.576271 | 95 |
monisjaved/rucio | 3,049,426,815,139 | 7653a97e19cd18e12e7aee871f3df55102c49350 | 5271bf1f72c49ceb50a1bf3615b424d866cb7538 | /lib/rucio/vcsversion.py | 00f14851e09d83dbfe45b5f613be251a0c503dc5 | [
"Apache-2.0"
] | permissive | https://github.com/monisjaved/rucio | d0d6b50e14b5045fbdef84d84875b294be79b325 | b3e76f79dda668d55d648e22051d0efcd21ce07f | refs/heads/master | 2021-01-22T17:42:52.643231 | 2017-03-14T13:55:44 | 2017-03-14T13:55:44 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
This file is automatically generated by setup.py, So don't edit it. :)
'''
VERSION_INFO = {
'final': True,
'version': '1.2.5-1',
'branch_nick': '(detached',
'revision_id': '0b06384e2873c3b5930ff40858fb88e3d64ec2ac',
'revno': 3266
}
| UTF-8 | Python | false | false | 256 | py | 3 | vcsversion.py | 3 | 0.628906 | 0.496094 | 0 | 10 | 24.6 | 70 |
FuShengRuoXian/django-spms | 12,472,585,041,330 | 3aa4fc2999e98e182c3b76e72443ebc2327d08cd | cf5e767faabe7307a8e081b35fd9600d003f8665 | /src/tests/create_token.py | 1b6c8f3baaff668674b2cddb682d3e472173b334 | [
"BSD-3-Clause"
] | permissive | https://github.com/FuShengRuoXian/django-spms | bfd0ec8cc7ef957c8e6e308e1e9bf4259cf7c551 | 95ac193891f93da07c3a26feeaf846e6030f3466 | refs/heads/master | 2023-05-23T20:09:17.964349 | 2020-03-12T09:58:27 | 2020-03-12T09:58:27 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding=utf-8
from rest_framework_jwt.settings import api_settings
jwt_payload_handler = api_settings.JWT_PAYLOAD_HANDLER
jwt_encode_handler = api_settings.JWT_ENCODE_HANDLER
user = 'admin'
payload = jwt_payload_handler(user)
token = jwt_encode_handler(payload)
print(token)
| UTF-8 | Python | false | false | 296 | py | 109 | create_token.py | 75 | 0.736486 | 0.733108 | 0 | 13 | 20.615385 | 54 |
lukmy/toolbox | 16,097,537,430,109 | 3bb5e9322c3dd927b56a247fc9ba2c195b438c52 | 3b0f4b5686a79a7a369ff20f27957cfa5d8dc09c | /bin/git.py | 5c3a5bd49272ac1b405a52a6dcfdcaa65cf64a50 | [] | no_license | https://github.com/lukmy/toolbox | 5568c7e1d0a3516d9b9f040ac4baf7251eed5f41 | 820ef4ae913b41ece6e15f3230b89ef095348952 | refs/heads/master | 2021-07-05T08:32:11.031466 | 2017-09-28T04:40:44 | 2017-09-28T04:40:44 | 103,383,165 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from toolbox_utils import get_config, run_cmd, FireBase
class Config(object):
config = get_config().get('git', {})
feature_prefix = config.get('feature_branch_prefix', 'feature/')
feature_base = confi... | UTF-8 | Python | false | false | 1,029 | py | 6 | git.py | 6 | 0.641399 | 0.635569 | 0 | 39 | 25.384615 | 76 |
daid/Cura2 | 8,272,107,012,710 | 6d9cd684ae143b544bb89fc9b08c2b7deb8a4dda | d7b178ce6d6afd53e71e21221555c4b35fa4463e | /Cura/gui/openGLUtils.py | d07ef1870250bc0cf597515ac39bf389a4cc08e6 | [] | no_license | https://github.com/daid/Cura2 | 0badce5a5c6bdcb2fe46f6d4d8b963881492c30a | 312baa01920a929b5ca5dd0d753745b921225e52 | refs/heads/master | 2016-09-06T08:35:26.771679 | 2014-11-21T14:50:50 | 2014-11-21T14:50:50 | 18,211,474 | 2 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | import wx
import numpy
import os
import atexit
from OpenGL.GL import *
from OpenGL.GL import shaders
from ctypes import c_void_p
from Cura.preferences import getPreference
from Cura.resources import getResourcePath
from Cura.resources import getBitmap
legacyMode = getPreference('legacy_rendering', 'False'... | UTF-8 | Python | false | false | 11,795 | py | 88 | openGLUtils.py | 83 | 0.574735 | 0.564646 | 0 | 274 | 41.054745 | 205 |
dsparrow27/vortex | 19,000,935,333,234 | f4e16c04936e030848023e9a30e961e757d2e67f | b5d1c585c9c601588eb46b6d342a559feea967df | /src/ds/vortex/graphs/__init__.py | af6b94acbf0773337c459ce112d82a086e3bcbad | [
"MIT"
] | permissive | https://github.com/dsparrow27/vortex | f298467b6ab757ae724c70761580cc19394f8570 | c6624fd91d1a989322197e5ad81af94793d67794 | refs/heads/master | 2021-01-10T12:22:27.036624 | 2016-03-06T11:06:46 | 2016-03-06T11:06:46 | 48,081,530 | 1 | 0 | null | false | 2016-01-09T11:38:22 | 2015-12-16T02:15:31 | 2015-12-16T11:51:45 | 2016-01-09T11:38:22 | 103 | 0 | 0 | 0 | Python | null | null | {
"nodes":{},
"version":"1.0.0",
"name":"testGraph",
"edges":{},
"moduleName":"graph"
} | UTF-8 | Python | false | false | 107 | py | 39 | __init__.py | 37 | 0.448598 | 0.420561 | 0 | 7 | 14.428571 | 24 |
muditagr/twitter-feed-django | 833,223,664,416 | 53216fdbb5235fb680bce190e96bf6529bb4823f | a11b5d79e1308f4d4e12a4044a8c857370d492d5 | /users/serializers.py | 36a6e277754ddfe0bb1f7bc8edee64d64adb412f | [] | no_license | https://github.com/muditagr/twitter-feed-django | 504129f7e9588640179907eee2bc783ab00754c8 | 0a7d8e43d4b76ad9d9a83265249fc4e510510a82 | refs/heads/master | 2020-12-07T14:15:51.587511 | 2020-01-09T06:58:12 | 2020-01-09T06:58:12 | 232,735,861 | 0 | 0 | null | false | 2020-06-06T01:17:05 | 2020-01-09T06:11:58 | 2020-01-09T06:58:24 | 2020-06-06T01:17:03 | 40 | 0 | 0 | 2 | Python | false | false | from rest_framework import serializers
from . import models
class TweetOptionSerializer(serializers.ModelSerializer):
def __init__(self, *args, **kwargs):
kwargs['partial'] = True
super(TweetOptionSerializer, self).__init__(*args, **kwargs)
class Meta:
model = models.TweetOption... | UTF-8 | Python | false | false | 436 | py | 12 | serializers.py | 10 | 0.555046 | 0.555046 | 0 | 19 | 22 | 68 |
narloch/Graphs | 2,559,800,525,317 | 191bd2dfb9168761c022479ff2d16954c53ff8fc | d540849e98af0d29427870f9877b0accd111417a | /atividade2/kruskal.py | 4d5f4050d42206678447ddae7329530d89ea3c4d | [] | no_license | https://github.com/narloch/Graphs | 132241a8c012fa7d3996a7d18a6c4bfc1ab40633 | b6eab060136d86c3b83a0e09522d4042218dbe87 | refs/heads/main | 2023-04-01T11:29:17.525033 | 2021-04-11T21:54:08 | 2021-04-11T21:54:08 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from parser_arquivo import parser_arquivo
from grafo import Grafo
import math
import sys
with open("grafo.txt") as f:
arquivo_grafo = f.read().splitlines()
vertices, arestas, mapa_arestas = parser_arquivo(arquivo_grafo)
grafo = Grafo(vertices, arestas, mapa_arestas)
arvore = []
s = [[v] for v in range(grafo.qnt... | UTF-8 | Python | false | false | 903 | py | 8 | kruskal.py | 8 | 0.660754 | 0.644124 | 0 | 28 | 31.214286 | 84 |
Pjmcnally/algo | 17,549,236,383,757 | b4ed5f6f88d62b61cf3211fd8cb994549c64035f | 23bdedd37d1a3c8eb8a0dda040316b9870c2af10 | /strings/pins/pins_patrick.py | 3a8b2ff275c6ef15b56b585d5d31183442221f92 | [] | no_license | https://github.com/Pjmcnally/algo | 7dd315635ab8e9e92f274e42010854c9fb1babe3 | 63a59b2a14da1e5ecb225d1f2bd9779115ac2a82 | refs/heads/main | 2023-08-03T02:12:07.994820 | 2023-07-31T08:54:42 | 2023-07-31T08:54:42 | 111,017,401 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Authored by Patrick McNally
# Created on 09/25/15
# Requests a number from the user and returns a pronouncable string
# representing the number input.
def break_string(num):
"""Return a list of numbers broken into two digit pieces.
Take a number and iterates through it. Each two digit chuch of the
... | UTF-8 | Python | false | false | 2,764 | py | 79 | pins_patrick.py | 68 | 0.633502 | 0.607091 | 0 | 104 | 25.557692 | 76 |
protasovse/mlo | 14,181,982,013,708 | d319aee5127b82032a767b283524d85f61919ec1 | b17a3a61c0d86e8011fd39c9aabd5aa65c591998 | /project/apps/sxgeo/admin.py | 0dda61bd0dcdfb6ef89f79401a704cd769ca0229 | [] | no_license | https://github.com/protasovse/mlo | 9e8b78cd07b50521e98521ba3339fe40b0b4023a | b288dadab29dbd53e2180d4567f7ac745cf6852b | refs/heads/master | 2020-04-13T11:45:19.195875 | 2018-12-20T05:59:50 | 2018-12-20T05:59:50 | 163,182,777 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib import admin
from apps.sxgeo.models import Cities
# @admin.register(Cities)
# class CitiesAdmin(admin.ModelAdmin):
# search_fields = ['name_ru', 'name_en']
| UTF-8 | Python | false | false | 183 | py | 344 | admin.py | 240 | 0.726776 | 0.726776 | 0 | 8 | 21.875 | 44 |
thirumald/ansible-cisco-conf | 12,670,153,531,609 | 999504e593ac49d11e218912176d8928e043796b | c472d19a8e10c2671dcbccd4003be76040d591b1 | /vlans.py | 3a5c72cb1c5e65746d492c0aed8daafb38b11d7d | [] | no_license | https://github.com/thirumald/ansible-cisco-conf | 64f32bc5c222505ec1e19ddd4e7339f57aad86e2 | 5382355d195979392c20461a0454fb474d2798da | refs/heads/master | 2021-06-01T13:18:20.906291 | 2016-06-21T12:29:53 | 2016-06-21T12:29:53 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import argparse
import json
import csv
import sys
class Inventory(object):
def read_cli_args(self):
parser = argparse.ArgumentParser()
parser.add_argument('--list', action = 'store_true')
parser.add_argument('--host', action = 'store')
self.args = parser.pars... | UTF-8 | Python | false | false | 2,968 | py | 26 | vlans.py | 7 | 0.438679 | 0.422507 | 0 | 113 | 25.265487 | 70 |
spikems/qa | 1,073,741,864,852 | 2a1702af97261efabd523c6a383002ddb355416b | 583453132584363daeb80344fc60f2855991199e | /chatrobot/chatrobot/common/wcut/jieba/dict_norm.py | 9bf388b26e8699be8ed8044a28269715d725d9f0 | [] | no_license | https://github.com/spikems/qa | efcfc3f11f7af7b72fd497a3aa0d1b9eab6aec7f | db5a91083a55e4118b648d62fd0806eb33d1bba3 | refs/heads/master | 2020-03-20T08:46:41.135752 | 2018-06-14T06:57:24 | 2018-06-14T06:57:24 | 137,318,682 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #encoding:utf-8
import os,sys
cur_path = os.path.dirname(os.path.abspath(__file__))
jieba_path = '%s/../' % cur_path
sys.path.insert(0, jieba_path)
import jieba
from jieba.norm import norm_cut, norm_seg
from jieba.norm import load_industrydict
import datetime
import random
class CutWord:
def __init__(self, spec... | UTF-8 | Python | false | false | 2,356 | py | 38 | dict_norm.py | 34 | 0.564035 | 0.554386 | 0 | 76 | 28.763158 | 154 |
gavz/CTF-Writeups-1 | 19,275,813,236,610 | 1eaed0794b8a81b4cacaea89eb4b786ee2beaf81 | f0a229be0ccd235c5285d4fb8e96738492b1daa8 | /cyberschool/rev/3/3.py | 684715fe9f87ec720222e4bbb328a206aac33552 | [] | no_license | https://github.com/gavz/CTF-Writeups-1 | fe37e63b43712b5c5dce08c36c9fc942c172de51 | 829c35b38fe7c2ff2466bde49dec511577684d3d | refs/heads/master | 2022-12-23T02:51:34.143652 | 2020-09-20T17:41:07 | 2020-09-20T17:41:07 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | flag = list(map(lambda x: int(x, 16), '''94 78 DE C2 D0 FC AE 32 6B B3 3E 1E D0 5B 3B C6 F6 26 06 8A 3C 42 F4 07 11 76 56 E1 11 F1 50 B5 13 E4 96 C6 74 F8 D8 08 41 9F DF 35 00'''.split()))
_1 = lambda j: ((j * 0x6d) & 0xff) ^ 0xef
_2 = lambda j: ((j ^ 0xff) * 0x6b) & 0xff
dl = 0
out = ''
for i in range(len(flag) -... | UTF-8 | Python | false | false | 559 | py | 81 | 3.py | 11 | 0.466905 | 0.314848 | 0 | 18 | 30.111111 | 191 |
ob2410/Esercizi_SO | 884,763,288,796 | 4f7a5896b6e016d2a138fd648d1e26b1966d5744 | a6b1e93a33f507b97303552a2a6ae586c3a0dbd4 | /ProvaPratica/2014-09-25/es3.py | 3da13149a9f73d6e4f6acfa4cdf2ff738f91446c | [] | no_license | https://github.com/ob2410/Esercizi_SO | a83acc1be0195b9c3e55391ecc10d44e6162f83d | 27a4feb15b4f3725ad3d498300857ec5b7f22bcc | refs/heads/master | 2021-01-17T19:13:14.859501 | 2016-07-29T06:15:10 | 2016-07-29T06:15:10 | 64,322,649 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #Scrivere un programma python o uno scrip bash che faccia un backup storico di un file.
# backn file n
# deve mantenere n versioni del file specificato. n>2
# Esempio:
# backn miofile 10
# se esiste miofile.9 deve essere rinominato in miofile.10
# se esiste miofile 8 deve essere rinominato in miofile 9
# e cosi' via ... | UTF-8 | Python | false | false | 496 | py | 42 | es3.py | 9 | 0.768145 | 0.739919 | 0 | 10 | 48.6 | 98 |
LLT1/SelfNormalizingFlows | 12,695,923,375,353 | 91e31375927d7ebae5a97e1ea1fb4511fa8bc2af | c902925132bc97117945ea46e8241e111a6218b7 | /snf/experiments/toydensity.py | f2f2be9b39260902a9f51a34503b401f1e7b9562 | [
"MIT"
] | permissive | https://github.com/LLT1/SelfNormalizingFlows | 7b1b620289f1550ea4aad4bf0d08944d39c4ad97 | 3e5b606968275d5a16689e654d6ad10b6c064413 | refs/heads/master | 2023-01-09T19:20:21.688731 | 2020-11-17T09:26:33 | 2020-11-17T09:26:33 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import torch
from torch.utils.data import DataLoader
from torch import optim
from torch.optim.lr_scheduler import StepLR
from snf.datasets.toy_density_data import ToyDensity
from snf.layers.flowsequential import FlowSequential
from snf.layers.selfnorm import SelfNormFC
from snf.layers.activations import SmoothLeakyRel... | UTF-8 | Python | false | false | 2,144 | py | 3 | toydensity.py | 3 | 0.61847 | 0.605877 | 0 | 62 | 33.596774 | 72 |
ujjalgoswami/ordermanagementcustomdashboard | 16,166,256,910,113 | 4792bc01256d5f855dc40f677a4d7431c8069835 | 12f18662719d04d2404396b9059b60525528f557 | /findsportsordermanagement-master/stockupdatefiles/Liive.py | a91bda0484868626ec2fe12879ebdb8323702f3e | [] | no_license | https://github.com/ujjalgoswami/ordermanagementcustomdashboard | 0bf4a5770d1913b257a43858d778e630e671a342 | acd18510b0934601d30bd717ea4b3fbb61ecfb5c | refs/heads/master | 2021-02-04T10:04:27.380674 | 2020-02-28T01:37:35 | 2020-02-28T01:37:35 | 243,653,613 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import CONFIG_STOCKUPDATE as config_stockudpate
#!/usr/bin/env python
isProduction=config_stockudpate.isProduction
import numpy as np
import pandas as pd
from selenium import webdriver
import selenium.webdriver.support.ui as ui
from selenium.webdriver.common.keys import Keys
from selenium.commo... | UTF-8 | Python | false | false | 10,571 | py | 301 | Liive.py | 177 | 0.631255 | 0.6007 | 0 | 341 | 29.98827 | 199 |
varuntirthani/Movie-Recommendation-AIR | 2,310,692,432,314 | 05637e243d6c108cf7be577d5675accd1a369bf8 | 528210d0e4b7334e4ae371283062840a4c7fc5e0 | /search.py | 4951d1a1c368d5b95bf0cca7f9ccbf52cdfbba91 | [
"Apache-2.0"
] | permissive | https://github.com/varuntirthani/Movie-Recommendation-AIR | 1cb1c81d55f707a4877bccb383893e0558c5535c | bbc4d0fd119dd459d8bbea871aa793943f92161a | refs/heads/main | 2023-04-08T14:42:05.435242 | 2021-04-16T11:47:41 | 2021-04-16T11:47:41 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import json
import boolean
from nltk.stem import PorterStemmer
import string
letters = list(string.ascii_lowercase)
letters.append(list(string.ascii_uppercase))
stemmer=PorterStemmer()
class Conversion:
def __init__(self, capacity):
self.top = -1
self.capacity = capacity
self... | UTF-8 | Python | false | false | 6,259 | py | 8 | search.py | 4 | 0.473878 | 0.464611 | 0 | 236 | 25.5 | 148 |
Brady31027/leetcode | 11,879,879,555,400 | 33660d6f986e9e0f341994ad9deb6dd96ef6a3e3 | 46c8c0e435877f4564970198e8a177e9883103e9 | /260_Single_Number_III/single_number_iii.py | df10cab1445001c5f2f38837772255833a614b56 | [] | no_license | https://github.com/Brady31027/leetcode | 26f7c1f4e8bfad0dee4d819f91aa93a241223330 | d66be3a8f002875097754df6138c704e28b79810 | refs/heads/master | 2018-02-16T14:52:31.976844 | 2017-08-10T19:18:59 | 2017-08-10T19:18:59 | 63,519,661 | 4 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution(object):
def singleNumber(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
missingOne, missingTwo = None, None
nums.sort()
for num in nums:
if num == missingOne:
missingOne = None
continue
... | UTF-8 | Python | false | false | 701 | py | 267 | single_number_iii.py | 225 | 0.446505 | 0.446505 | 0 | 23 | 29.478261 | 51 |
gmrzone/simpleDjangoBlog | 412,316,867,500 | 43892597b9fc4742defcbcd6650b49a63ab13218 | 998ad79189683aca493d3dbf8898657573794c0d | /myblog/feed.py | 470370f496945fab9aa965d82d032ddcac5fdd40 | [] | no_license | https://github.com/gmrzone/simpleDjangoBlog | 2585cf08ef029cf4b177133978c391da73f6235c | 6b4d0b72e6a85b5e649f1af31ab84c7523db82e8 | refs/heads/master | 2023-05-01T15:07:59.304048 | 2021-05-20T14:22:51 | 2021-05-20T14:22:51 | 327,601,362 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from .models import Post
from django.contrib.syndication.views import Feed
from django.template.defaultfilters import truncatechars
from django.urls import reverse_lazy
class PostFeed(Feed):
title = "MyBlog Latest Feed"
link = ""
description = 'Latest Post From Our Blog'
def items(self):
retur... | UTF-8 | Python | false | false | 661 | py | 26 | feed.py | 14 | 0.700454 | 0.694402 | 0 | 21 | 30.52381 | 118 |
Rajeev2k11/blockchain | 11,338,713,690,223 | f75355be8bf340b48953e720a547b4ecba8bc3d1 | 17396c62b7789620f24385664cfb91e934df5f40 | /blockchain.py | 9e0acce65437096682fae143ec4ba39481048a91 | [] | no_license | https://github.com/Rajeev2k11/blockchain | 37106d8677e60f9eaacd2737ef576e04fa49d397 | 88222044ac21f066da76a34e29571ffaf81d14c7 | refs/heads/master | 2020-05-09T13:13:36.409632 | 2019-04-13T08:37:44 | 2019-04-13T08:37:44 | 181,143,240 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 12 20:45:16 2019
@author: rajeevranjan
"""
| UTF-8 | Python | false | false | 115 | py | 1 | blockchain.py | 1 | 0.617391 | 0.495652 | 0 | 7 | 15.285714 | 35 |
beatonma/snommoc | 9,792,525,449,343 | 900f02b1378c94e6442fae64c62586c93d3f4827 | 55647258df0565f19179ffb97ac217708d84ba4a | /repository/resolution/constituency.py | e6736f0d4ef2ce1251b5ce6944c3e7e401536609 | [] | no_license | https://github.com/beatonma/snommoc | 25de0e81af0d9940bdc3aa6420cb5764d50c6d11 | 0a9d37dcad112c5dd98609c1566e74176ae3d89d | refs/heads/main | 2022-03-11T07:53:33.038649 | 2022-03-05T17:03:56 | 2022-03-05T17:03:56 | 188,595,195 | 0 | 0 | null | false | 2022-02-18T17:54:30 | 2019-05-25T17:35:58 | 2021-11-30T14:35:17 | 2022-02-18T17:54:30 | 3,397 | 0 | 0 | 1 | Python | false | false | import logging
import re
from datetime import date as _date
from functools import reduce
from operator import __or__
from typing import List, Optional
from django.db.models import Q
from repository.models import (
Constituency,
ConstituencyAlsoKnownAs,
ConstituencyResult,
ContestedElection,
Unlink... | UTF-8 | Python | false | false | 5,249 | py | 354 | constituency.py | 340 | 0.622214 | 0.621642 | 0 | 178 | 28.488764 | 103 |
poldy/16k_muds | 15,255,723,841,983 | a2b38800180a67ec5761f60ef6d756b81f6bbdf0 | aaec250953a41feb95154f8c2bc9a5896c7a6e7e | /icecube@ihug.co.nz/sys/static.py | 3e002619ae5db5e787731ccd0afaf5a64797dece | [] | no_license | https://github.com/poldy/16k_muds | 2eee2053c23d2267cce961d6b94c9cd74f9ad05c | ecb1d4cf1d1b20fa4b1721c978681d3b1a1d5ff5 | refs/heads/master | 2021-05-28T18:36:45.824871 | 2013-05-26T15:19:25 | 2013-05-26T15:19:25 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Static data object
class static(Object):
singleton = 1
def __init__(S):
S.loadhook()
def loadhook(S):
# Heh.
pass
#S.badcmd = 'Unknown command.\n'
#S.whohdr = 'Users currently connected:\n'
#S.bye = 'Quitting. Goodbye!\n'
#S.user_fsm = {
# ... | UTF-8 | Python | false | false | 1,905 | py | 94 | static.py | 37 | 0.453018 | 0.448294 | 0 | 50 | 36.98 | 118 |
fabiano-araujo/game_news | 8,787,503,097,795 | 2f19b99234d9ced79570a892f555e1cbe2d8d165 | e02da9082018d65e02077decb1ec05b0a011f071 | /server/admin.py | f6eccb57f5666ad6ce8bd996c080764a29639909 | [] | no_license | https://github.com/fabiano-araujo/game_news | 0f85af1d9325f7fac46179059e21e4fa9965e9fa | 3b86341eb92e259ffefe4fc2921a7de9b401728f | refs/heads/master | 2021-01-09T20:42:30.871093 | 2016-06-30T03:13:00 | 2016-06-30T03:13:00 | 62,275,392 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib import admin
from server.models import *
# Register your models here.
class ArtigoAdmin(admin.ModelAdmin):
search_fields = ['titulo']
list_display = ['foto','titulo']
list_filter = ['titulo']
save_on_top = True
class PAdmin(admin.ModelAdmin):
search_fields = ['titulo']
list_display = ['f... | UTF-8 | Python | false | false | 453 | py | 7 | admin.py | 4 | 0.713024 | 0.713024 | 0 | 17 | 25.705882 | 40 |
albertskog/Wakeup-Light | 14,860,586,876,825 | 0162e9b07cc890725c964991f83acf78a8ff1dbc | 40a486c3c9dc52b3fda522009b0b32bf45f1e68c | /pi/set-rgb.py | 1312168e65988163b41d1b37cf3a37ccfa366bc3 | [] | no_license | https://github.com/albertskog/Wakeup-Light | 9ccbbd29347d4dbf75999391fb94719edf33a2d2 | 15c5dab1d8bcf047a12a74e33d267ccd536aedd0 | refs/heads/master | 2016-09-06T01:52:16.111184 | 2015-09-20T20:59:41 | 2015-09-20T20:59:41 | 26,997,222 | 0 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
import sys
import paho.mqtt.publish as mqtt
if len(sys.argv) == 1:
print "No argument given"
exit()
if len(sys.argv) == 2:
red = sys.argv[1]
green = sys.argv[1]
blue = sys.argv[1]
if len(sys.argv) >= 4:
red = sys.argv[1]
green = sys.argv[2]
blue = sys.argv[3]
command = '{{"red":{0}, "gre... | UTF-8 | Python | false | false | 445 | py | 11 | set-rgb.py | 7 | 0.626966 | 0.577528 | 0 | 25 | 16.8 | 75 |
easy-operation/BackstageSystem | 12,799,002,572,166 | 190dfc259c98353911d53d9e65af3b90cdc1eacd | d828ab8487d9f1552364f7fa6f04adfbfb1046f1 | /VMManagement/migrations/0005_auto_20180305_1700.py | 47b7263a105508d03a7ae6f9bb7d669024f7e9af | [] | no_license | https://github.com/easy-operation/BackstageSystem | ac9ec44570bfe964b609548e14eed31d113f5536 | 5762724224022a03410b22244142b9e0200f5d1c | refs/heads/master | 2021-01-25T13:05:35.181865 | 2018-03-09T09:29:05 | 2018-03-09T09:29:05 | 123,526,216 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.0.2 on 2018-03-05 09:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('VMManagement', '0004_auto_20180305_1519'),
]
operations = [
migrations.RenameField(
model_name='serverinfo',
old_nam... | UTF-8 | Python | false | false | 569 | py | 17 | 0005_auto_20180305_1700.py | 16 | 0.571178 | 0.513181 | 0 | 23 | 23.73913 | 73 |
gdcc/easyDataverse | 15,281,493,684,773 | 1e1c894103901ede1f75e275bdbba19d0ec07055 | 591ac2f03bb6a819f1086df00f925899a130f501 | /tests/conftest.py | 8bee1dc070c19aa576f993e723a5267b7b142166 | [
"MIT"
] | permissive | https://github.com/gdcc/easyDataverse | 8b35a4a854a4a8fa39e067cbf690a2aa4df5bd23 | efb15359e7f2a962d7fecd07d90e0ba62029c526 | refs/heads/main | 2023-09-01T05:09:05.121070 | 2023-04-20T17:01:55 | 2023-04-20T17:01:55 | 504,152,566 | 7 | 2 | MIT | false | 2023-04-27T20:50:11 | 2022-06-16T12:46:34 | 2023-04-20T17:42:23 | 2023-04-27T20:43:41 | 249 | 6 | 2 | 4 | Python | false | false | import pytest
from easyDataverse import Dataset
from easyDataverse.core.base import DataverseBase
from tests.fixtures.dataset.toydataset import ToyDataset, SomeEnum
from tests.fixtures.dataset.invalidclass import InvalidBlock, AnotherEnum
@pytest.fixture
def metadatablock():
"""Simple artificial metadatablock."... | UTF-8 | Python | false | false | 1,672 | py | 74 | conftest.py | 42 | 0.70933 | 0.70933 | 0 | 74 | 21.594595 | 93 |
SebTee/foobarGoogle | 4,286,377,365,971 | df2f017a132d520e889f1c2790d6c136045b1e38 | ef84aac2da1a83c55c7bcec26101c93b7f52cb3a | /escape-pods/solution.py | 196fb5f0431c8df676aa64b8860dc23107d2df2f | [] | no_license | https://github.com/SebTee/foobarGoogle | 4f63ede9d31193c5b88d7b320239f968102ac0e5 | 76ec09b7126663c2a9c522fac756700c87ae81f8 | refs/heads/main | 2023-04-03T20:43:29.334480 | 2021-04-09T09:16:37 | 2021-04-09T09:16:37 | 338,909,851 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def consolidate_sink_source(entrances, exits, path, max_corridor_size):
consolidated_source, consolidated_sink = [0] * (len(path) + 2), [0] * (len(path) + 2)
for entrance in entrances:
consolidated_source[entrance + 1] = max_corridor_size
flow_graph = []
for node_id in range(len(path)):
... | UTF-8 | Python | false | false | 3,498 | py | 10 | solution.py | 9 | 0.542882 | 0.518868 | 0 | 74 | 46.27027 | 120 |
azra-mind/be-azramind | 4,320,737,141,495 | d1d0119e7d5756f4cc5b267ce2016bada078543e | eb3e24297e01c7b4fb32a4213d493a45ba24ccf3 | /models/user.py | 554992732a090ca202853d1452db26ba034c65dd | [] | no_license | https://github.com/azra-mind/be-azramind | c586a59d20ee2ce0d3acd991d1ef734c0b81636a | 46986c24d77335764f0703a878f42db9edd14373 | refs/heads/master | 2021-07-11T10:25:30.237368 | 2020-02-20T06:15:37 | 2020-02-20T06:15:37 | 239,374,245 | 0 | 0 | null | false | 2021-03-20T02:58:15 | 2020-02-09T21:06:01 | 2020-05-07T20:07:17 | 2021-03-20T02:58:14 | 73 | 0 | 0 | 2 | Python | false | false | from db import db
import random
# each model will be an extension of db.Model class
class UserModel(db.Model):
# tell SQLAlchemy the tablename
__tablename__ = 'users'
# define the schema for the users table
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(80))
pas... | UTF-8 | Python | false | false | 1,414 | py | 6 | user.py | 5 | 0.649929 | 0.641443 | 0 | 47 | 29.085106 | 99 |
uroborus/synapse | 5,866,925,334,493 | 0c70b1987b98f7a3e1d7f5a7a6a4747a2455198f | c4cfe7b67a2980cd99b5a1315fc73f77f1f76f2f | /synapse/config/ratelimiting.py | f126782b8db13b772335f72d15e7ddd5f18115d9 | [
"Apache-2.0"
] | permissive | https://github.com/uroborus/synapse | a271a4cc9d69e34e8d7bfb985f5b171699e367d5 | 270825ab2a3e16bb8ffcdbcea058efd28a38e8e1 | refs/heads/master | 2021-01-17T17:12:55.371236 | 2014-09-19T10:41:49 | 2014-09-19T10:41:49 | 24,245,059 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Copyright 2014 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | UTF-8 | Python | false | false | 1,381 | py | 131 | ratelimiting.py | 103 | 0.687907 | 0.679218 | 0 | 35 | 38.457143 | 77 |
SS4G/ydy | 12,326,556,168,248 | 11c0163b5dcd7231f57bd537346204f6be49f274 | b232b26af08e8b9c84139a35e7ab42188a14309f | /ydy_web/apps.py | f353a6cb6036280beccf7510446db29e08d07191 | [] | no_license | https://github.com/SS4G/ydy | c6116d216b5eeafc450dc16625bad0a0bacc4f46 | 123a0a04fe8f43010aa4de8932915052cfb0132f | refs/heads/master | 2021-01-19T01:31:11.682393 | 2016-11-10T03:28:21 | 2016-11-10T03:28:21 | 72,983,878 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.apps import AppConfig
class YdyWebConfig(AppConfig):
name = 'ydy_web'
| UTF-8 | Python | false | false | 88 | py | 16 | apps.py | 5 | 0.738636 | 0.738636 | 0 | 5 | 16.6 | 33 |
immersinn/cia_library | 9,835,475,125,304 | d1c98a206a8d39c27dfc9409c598702566e8d70c | e6d72fb7c9bd1a15b325b018eac4e7d33ca12635 | /src/text_ocr.py | 5956389a0248cb11472c1f36feaab563f2517a24 | [
"MIT"
] | permissive | https://github.com/immersinn/cia_library | 59500de77c09d4b25005567d8b35c2c356bfe1b1 | 837e980df1bb0a8166b1616169c1751610e5e0bc | refs/heads/master | 2021-01-11T17:11:20.508019 | 2017-02-01T21:10:21 | 2017-02-01T21:10:21 | 79,736,509 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 22 17:02:14 2017
@author: immersinn
"""
import textract
def textFromPDF(pdf):
"""
"""
text = textract.process(pdf, method="tesseract", language="eng")
return(text) | UTF-8 | Python | false | false | 258 | py | 17 | text_ocr.py | 11 | 0.608527 | 0.554264 | 0 | 17 | 14.235294 | 68 |
alantop0720/PythonCommon | 2,439,541,441,762 | 635dd7b9e780a4718fc24cfc2b9522510faec843 | 04e94400e463e04bf23a671f451843ed800a60b5 | /pyside6-source/concurrent/bad_example_2.py | eff63fead8ac7e823ecd001bbd70946830c54756 | [] | no_license | https://github.com/alantop0720/PythonCommon | b72e7e4bd4986276611499cc5770e2b89dc6ac2e | 0e5da74f1d3af56d9ba7fb951d77ce60380b8c9a | refs/heads/master | 2023-04-15T12:57:40.725169 | 2023-04-09T13:31:30 | 2023-04-09T13:31:30 | 162,530,480 | 1 | 6 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import time
from PySide6.QtCore import QTimer
from PySide6.QtWidgets import (
QApplication,
QLabel,
QMainWindow,
QPushButton,
QVBoxLayout,
QWidget,
)
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.counter = 0
layout = QVBoxL... | UTF-8 | Python | false | false | 1,166 | py | 145 | bad_example_2.py | 132 | 0.602058 | 0.593482 | 0 | 57 | 19.45614 | 126 |
hajinhoe-backup/Tetris | 1,520,418,461,776 | a34a957d31a562bbd064a595df3cd0ac47c32f83 | 69099a7ed2f6ecb68dba54c305bfba4c2684b0ff | /play.py | 7882ccbc54d34b5f8eb36ee159a22055bf998f9b | [] | no_license | https://github.com/hajinhoe-backup/Tetris | a9f2328a00d1d9c34de0b75b8d20926101ab9188 | 66a1e183694ebe33a77cdec07227abd3075d1839 | refs/heads/master | 2022-02-26T01:50:10.853514 | 2017-06-14T08:12:57 | 2017-06-14T08:12:57 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pygame
import random
import copy
import time
# Define some colors
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
BLOCK_SIZE = 32
# Call this function so the Pygame library can initialize itself
pygame.mixer.pre_init(44100, -16, 2, 2048)
pygame.mixer.init()
pygame.init()
# C... | UTF-8 | Python | false | false | 18,983 | py | 2 | play.py | 1 | 0.44238 | 0.394268 | 0 | 503 | 35.487078 | 142 |
naivelamb/leetcode | 12,412,455,500,119 | aa5f8029a0e40e9d7d4067794310f24cb9ea7183 | 7426f3cde2c93d65ffa76c904ba477d26becef8d | /1021_RemoveOutermostParentheses.py | c6468c6338825ef8662dcb08d85bf7d82883f3d8 | [] | no_license | https://github.com/naivelamb/leetcode | 5e8ac58f606e0419a10d8fd9c1f532b4f9814017 | bae36601c3ce67f2b4a91d331a2d70dca8a1ee92 | refs/heads/master | 2021-07-23T20:38:06.265839 | 2021-07-12T16:14:21 | 2021-07-12T16:14:21 | 166,906,784 | 20 | 6 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
https://leetcode.com/problems/remove-outermost-parentheses/
Find segment, remove the most outer parentheses
Time complexity: O(n), n -> len(S)
"""
class Solution:
def removeOuterParentheses(self, S: str) -> str:
res = []
start, curr, balance = 0, 1, 1
while ... | UTF-8 | Python | false | false | 664 | py | 753 | 1021_RemoveOutermostParentheses.py | 752 | 0.49247 | 0.47741 | 0 | 26 | 24.576923 | 59 |
cokotracy/d4e-common-v13 | 13,640,816,171,932 | a6858663c04a899d2fb4f115810293cd1c4b0632 | 8be5f3b93581b378e88c21ac10f5556533decbaf | /d4e_project_chatter/__manifest__.py | 7a43fa534f9a34fcab3402a82fb099b481a11146 | [] | no_license | https://github.com/cokotracy/d4e-common-v13 | edb0cd1adb356d6a2ea1690cdbc9cc74c7be1aac | 2261cdfa3da1cdd7a713a48bee450689aafa89c8 | refs/heads/main | 2023-06-19T03:33:01.353148 | 2021-06-07T14:06:48 | 2021-06-07T14:06:48 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
{
"name": "D4E Project Chatter",
"summary": "Add a chatter to the project form view.",
"version": "13.0.1.0.0",
"category": "Project",
"website": "https://www.d4e.cool",
"license": "AGPL-3",
"application": True,
"installable": True,
"depends": ["base","projec... | UTF-8 | Python | false | false | 399 | py | 93 | __manifest__.py | 47 | 0.508772 | 0.483709 | 0 | 16 | 23.9375 | 57 |
shituniao/ftTexPac | 11,656,541,251,953 | b88041facd5b495a408801ebc6effc4d7fd16346 | f225204c26f600903bf5a7a7c8358d1a6c9b070d | /ftTexPac.py | 440531399f78744888f6891863e7b5034a1cd162 | [
"MIT"
] | permissive | https://github.com/shituniao/ftTexPac | 76a56df7cf29f97e16dbbf783835aff642d81212 | e8b52f6f7e73c96b602d8a8f577995e9be410c28 | refs/heads/master | 2021-01-21T07:39:09.281034 | 2014-12-03T09:09:04 | 2014-12-03T09:09:04 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
import sys, os, commands
import PIL.Image as Image
def goThrough(rootDir):
ans = []
root, dirs, files = os.walk(rootDir).next()
for f in files:
ans.append((os.path.join(root, f), f))
return ans
if len(sys.argv) != 2:
print 'usage: ftTexPac.py [PATH]'
exit(0)
path ... | UTF-8 | Python | false | false | 4,590 | py | 2 | ftTexPac.py | 1 | 0.505447 | 0.483878 | 0 | 200 | 21.95 | 85 |
webclinic017/django_bcoin | 18,107,582,139,072 | 01c341feb7b6f5ea0ca244c968535e074f01b531 | 3259378e5b155e0713254881b52579ef287e5742 | /welcome/migrations/0002_candle_quote_stock.py | 180a34040b4b455da360c321b40517f706ff525f | [] | no_license | https://github.com/webclinic017/django_bcoin | 88d3d7ccbe1c0161db24aa1531f302538ec2b5f9 | acc3cf77c443a9532f8dbf440dc37a5c5c042085 | refs/heads/master | 2023-08-11T19:57:13.936620 | 2021-09-15T16:27:54 | 2021-09-15T16:27:54 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.2 on 2021-05-23 18:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('welcome', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Candle',
fields=[
('id', mod... | UTF-8 | Python | false | false | 1,372 | py | 22,232 | 0002_candle_quote_stock.py | 47 | 0.517493 | 0.500729 | 0 | 40 | 33.3 | 117 |
Andrea-Perin/Information_theory_computation | 19,284,403,183,490 | 5616dcd19724749d38a4ec28346834c1f7170c6c | 4d8cda0bcea8b56309a1a235a8e8f85a63df9ad2 | /10week/AndreaPerin_CODE/comp.py | 74e3f7fab087144c99902f4c0a331e293dbc9a55 | [] | no_license | https://github.com/Andrea-Perin/Information_theory_computation | 04a57802a92187bf09d0d2e136112a022d5b7e5a | ac38c51b60d1a038aa46e27b9cb677b96427fece | refs/heads/master | 2020-08-13T02:32:59.446261 | 2020-01-22T22:10:46 | 2020-01-22T22:10:46 | 214,890,619 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 5 18:22:47 2020
@author: andrea
"""
import os
import subprocess as sub
# parameters for the simulations
N_LAMBDA = 100
MAX_LAMBDA = 3
# lists of params to be used
lmbd = [str(MAX_LAMBDA*(i/N_LAMBDA)) for i in range(0, N_LAMBDA+1)]
# names of ex... | UTF-8 | Python | false | false | 562 | py | 182 | comp.py | 26 | 0.635231 | 0.585409 | 0 | 27 | 19.518519 | 67 |
codss-ctrl/coding-test | 5,634,997,111,987 | 9b421e548cfecb7649e34a4caffa87d2e60cacd7 | d61e2d420342353855127f69ad20e09f4f049f31 | /Programmers/64064. 불량 사용자.py | 958d14df5e4bfca043528364540a0a2ee1ed2971 | [] | no_license | https://github.com/codss-ctrl/coding-test | 6d55bc35619ac114f2551b249258e6424b98de98 | f6497e2ded1804227c8970dc712c60bd58d1e127 | refs/heads/main | 2023-04-26T15:47:27.858277 | 2022-11-15T17:29:10 | 2022-11-15T17:29:10 | 368,121,238 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from itertools import permutations
import re
def solution(user_id, banned_id):
answer = []
banned_id = [re.sub('\*','.',b) for b in banned_id]
# ban = ' '.join(banned_id).replace('*','.')
for p in list(permutations(user_id,len(banned_id))):
tmp = []
for i in range(len(banned_id)):
... | UTF-8 | Python | false | false | 720 | py | 194 | 64064. 불량 사용자.py | 193 | 0.55 | 0.544444 | 0 | 21 | 33.333333 | 57 |
maybar/DomoControl | 19,542 | 79c8264b8619fb39c7701a54d9809fe77af88328 | b478bab737f99c0b590035af96d4a700dc21122b | /Src/ps_test.py | a079c67642b22e4c0bc615a292d19b14963a355b | [] | no_license | https://github.com/maybar/DomoControl | 0c3b70171afbce955f36f219dd65cfcdc5b4a14a | aff85e9bcae34299a5e0d836062208cf391992f5 | refs/heads/master | 2022-03-11T10:06:22.262476 | 2022-01-23T20:58:10 | 2022-01-23T20:58:10 | 124,775,258 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import psutil
import sys
sys.path.append('./utils')
pid = 0
list_pid = psutil.pids()
for pid in list_pid:
try:
p = psutil.Process(pid)
if "python3" in p.name():
print('*' * 30)
print("Nombre:", p.name())
print("PID:", pid)
print("EXE:", p.exe())
... | UTF-8 | Python | false | false | 520 | py | 28 | ps_test.py | 21 | 0.507692 | 0.5 | 0 | 21 | 23.761905 | 77 |
singhnitink/tcl_scripts | 19,009,525,273,938 | cebd02b408db1198e5ce827302e7cb54f75c2f55 | 684e9a2ac809352194d02e2aaf568961fd0de626 | /tcl_scripts/peptide_system/sscache/one.py | c7d8f3cbdaf9b4ed2a4b0ec2ab4f68777d8894e5 | [] | no_license | https://github.com/singhnitink/tcl_scripts | f3bb0029e7f387c9b047e921768f5f99a94b4e12 | e20a930874eb1c6414be895c999889c1406785fe | refs/heads/main | 2023-07-29T07:40:46.823197 | 2021-09-09T10:27:48 | 2021-09-09T10:27:48 | 385,572,041 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''This file will be used to calculate the secondary stucture content
... generated from the sscache script'''
import pandas as pd
import numpy as np
data=np.genfromtxt('SEC_ST_FILE_SSCACHE.dat',dtype=None,encoding=None,delimiter='')
file1=open('PER_FRAME.dat','w') #contains helixaverage of 5ns 250 frames
data=n... | UTF-8 | Python | false | false | 1,609 | py | 28 | one.py | 12 | 0.642014 | 0.608452 | 0 | 51 | 29.54902 | 83 |
dedekinds/Single-connected-region-orthogonal-mesh-generation | 8,091,718,416,075 | 336143069093d1f97d220bdfb617672e9606ad84 | d3462caf07c96637c230766ddc8bfe197333fc86 | /train_lightgbm.py | 63b251feb32d265963ba693be14000f04b5aaa11 | [
"MIT"
] | permissive | https://github.com/dedekinds/Single-connected-region-orthogonal-mesh-generation | 24e263872b4ac52e577f178e37e868f44a51f773 | 09431363c28273fd273c73a5b76664347d151a3a | refs/heads/master | 2018-10-22T09:50:51.377761 | 2018-10-12T06:57:13 | 2018-10-12T06:57:13 | 141,402,421 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 13 11:51:18 2018
@author: dedekinds
"""
# coding: utf-8
# pylint: disable = invalid-name, C0111
import lightgbm as lgb
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split, KFold, cross_val_score
from sklearn... | UTF-8 | Python | false | false | 7,538 | py | 5,423 | train_lightgbm.py | 12 | 0.542054 | 0.508358 | 0 | 295 | 24.555932 | 106 |
moreC/lcode | 14,791,867,386,282 | 2e38dedc6f79531cb575291d3bb544df4b61080a | 70bc2801f246ea0bcf565f9a0d7f4eacbdfd92ee | /net/examples/xception.py | c265dabd2259ce4954b3430023d3ff200a33e191 | [] | no_license | https://github.com/moreC/lcode | 0cda6143ab00477e62802e67fb92182bb23aec26 | 88744e5bb11cefd20df49dc547c2d0344be2e824 | refs/heads/master | 2018-09-28T02:16:25.205767 | 2018-08-29T02:56:51 | 2018-08-29T02:56:51 | 82,276,208 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import caffe
from caffe import layers as L
from caffe import params as P
def _conv(net, bottom, num_out, ks, stride, pad, group=1, depthwise=False):
layer = L.Convolution(net[bottom],
num_output = num_out,
kernel_size = ks,
stride = stride,
... | UTF-8 | Python | false | false | 3,342 | py | 60 | xception.py | 58 | 0.559844 | 0.529324 | 0 | 79 | 41.291139 | 106 |
collective/collective.webservice | 15,109,694,986,302 | c27776a908783697846f567dc673073afb51603b | 8adb811e18408aea9258db1696e46a3bc21e5847 | /src/collective/webservice/__init__.py | 7ed893b3f7f1e7bd5265ac503b9615fbf67e072d | [] | no_license | https://github.com/collective/collective.webservice | 2b39f2480b6538dfd350416be4f1689c157b2c8a | 269cc42aa34c01201de738bbcfcdd33c232aa078 | refs/heads/master | 2023-03-22T14:39:18.918801 | 2018-07-27T12:28:50 | 2018-07-27T12:28:50 | 5,853,122 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from AccessControl import allow_class
from AccessControl import allow_module
from AccessControl import ModuleSecurityInfo
from zope.i18nmessageid import MessageFactory
# Define a message factory for when this product is internationalised.
# This will be imported with the special name "_" in mo... | UTF-8 | Python | false | false | 2,660 | py | 17 | __init__.py | 10 | 0.619173 | 0.613158 | 0 | 107 | 23.859813 | 74 |
Eyadkht/photo-sharing-app | 4,209,067,996,968 | d4d1ef58847c9f2d7be1280d6083f69792aef42a | 2b21c9acf126c07bba1d22f8f43c4c48f134530c | /config/wsgi.py | c29490c9d37b0adbbb0def3a792205ec00569e6e | [] | no_license | https://github.com/Eyadkht/photo-sharing-app | cdfeaae8b01b1c558009d5477f132b4ace052a43 | 5c77b0700a5e862f2b98d734476590a72c882201 | refs/heads/master | 2023-02-21T16:30:40.304678 | 2021-01-21T18:30:37 | 2021-01-21T18:30:37 | 226,185,507 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
WSGI config for photo_sharing project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
if os.getenv('GAE_APPLICATION... | UTF-8 | Python | false | false | 794 | py | 40 | wsgi.py | 27 | 0.709068 | 0.698992 | 0 | 25 | 30.8 | 89 |
angelmacwan/Python | 1,408,749,322,910 | 5de037cbd0b06b77335b5a8de28291db7a274802 | 15b08827e446c80e22eb79ac638446fde564a369 | /sortingViz.py | 3965308d39984e818c639077d11d54025cd0caf8 | [] | no_license | https://github.com/angelmacwan/Python | 2d1c90d92a8898206596e593963041c5fd5af4a1 | d20be74e1e1b1d7300320499477b4974fb5b3734 | refs/heads/main | 2023-03-24T04:18:30.553535 | 2021-03-23T17:03:47 | 2021-03-23T17:03:47 | 326,181,992 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pygame
import random
n = 100
speed = 60
WIDTH, HEIGHT = 600, 300
WIN = pygame.display.set_mode((WIDTH, HEIGHT))
run = True
arr = []
for i in range(n):
arr.append([random.randint(0, HEIGHT), 0])
cur = -1
comparisions = 0
operations = 0
while run:
width = WIDTH/n
x = 0
... | UTF-8 | Python | false | false | 1,343 | py | 6 | sortingViz.py | 5 | 0.473567 | 0.413254 | 0 | 61 | 20.016393 | 74 |
Pravanakotha/python-git-project | 18,339,510,358,734 | 4267c27dcdb1be3f00ccb5efd10f67c7f3480eee | 728ea30cf74220606824985b6955ad1e039531e9 | /main.py | 6fa524660b80164b5de9090634a612e2e03c93a8 | [] | no_license | https://github.com/Pravanakotha/python-git-project | 659680a7e361beb2fe3544804c3cf17f99e4496b | 90d72660b2889274168a701395df447e5bced455 | refs/heads/main | 2023-08-23T10:39:20.123427 | 2021-11-08T11:06:31 | 2021-11-08T11:06:31 | 425,770,610 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | num = int(input("Enter number to check:"))
sum = 0
temp = num
while num>0:
rem = num%10
sum = sum * 10 +rem
num = num // 10
if temp==sum:
print("Palindrome")
else:
print("Not a palindrome") | UTF-8 | Python | false | false | 219 | py | 2 | main.py | 2 | 0.561644 | 0.525114 | 0 | 11 | 18.090909 | 42 |
AdamZhouSE/pythonHomework | 4,604,204,942,137 | cc5710785ce6a6c9e01f9c8c1d6b8aca345b1d4c | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2739/60825/244338.py | 19ce6838aaf89b62e9ee1379119483a96dea5af7 | [] | no_license | https://github.com/AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | res=[]
def printAns(currList, currSum, target, k):
if currSum==target and currList.size()==k:
res.append(currList)
return
elif currSum>target||currList.size()>k:
return
else:
for i in range(currList[len(currList)-1], 9):
t=currList[:]
t.append(i)
... | UTF-8 | Python | false | false | 442 | py | 45,079 | 244338.py | 43,489 | 0.565611 | 0.554299 | 0 | 21 | 20.095238 | 53 |
jay9989/DiscordBots | 5,274,219,886,026 | cb1e22a5f2023bf7442a1ade210e259260a9b2fa | 5a1b19c35ba6b6032336522ad72441d6a7f96d42 | /RollBot.py | 24d169c6e83b2b96c2de65fa5a0a3393cbebe8f5 | [] | no_license | https://github.com/jay9989/DiscordBots | 08de952f634aab72e1acd4697d3db01bf5d8667a | 030be4e6f2358e3c1ffe7135248f22828b3c46cc | refs/heads/master | 2022-07-20T00:13:01.752041 | 2020-05-21T02:48:48 | 2020-05-21T02:48:48 | 265,735,312 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random
import string
import os
import discord
from discord.ext import commands
client = commands.Bot(command_prefix='/')
global NAMES
NAMES = []
@client.event
async def on_ready():
print('RollBot is ready!')
global roll_channel
@client.command()
async def roll(ctx, max: int):
# Get the server ... | UTF-8 | Python | false | false | 2,851 | py | 2 | RollBot.py | 1 | 0.628551 | 0.621186 | 0 | 106 | 25.896226 | 139 |
fabyom/PageParser | 3,513,283,269,544 | d03849257c8ff63f7adf30e7e852d8da41da67cd | 68139c834a1370a68c33b7448c0127d59f0e6c57 | /Parser_OCR/AltoParser.py | b124c28134392bb1837a6b05532fe7344b712ff9 | [] | no_license | https://github.com/fabyom/PageParser | 35e78d29d7ac7e3459ac22da2f3e98ef76f875cf | 9d8189e71fd2ae3c1c2d70a88688f971a578a564 | refs/heads/master | 2022-04-27T21:30:31.574129 | 2020-04-19T22:13:11 | 2020-04-19T22:13:11 | 259,223,974 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), "..", ".."))
from lxml import etree
from Parser_WiTTFind.Parser_OCR.Alto import AltoDocument, AltoPage, AltoLine
def ns(tag):
"""
Add the ALTO namespace to the tag name.
"""
return '{http://www.loc.gov/standards/alto/ns-v2#}' + ta... | UTF-8 | Python | false | false | 2,172 | py | 14 | AltoParser.py | 14 | 0.601289 | 0.597145 | 0 | 66 | 31.909091 | 129 |
CenterForOpenScience/osf.io | 16,209,206,586,613 | fb306ab4c8aac5067b813e62cbe9336095cb6920 | 3c41443364da8b44c74dce08ef94a1acd1b66b3e | /addons/github/apps.py | d397c060ed50cbb039f12e3a07a33fbe2daf1134 | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer",
"AGPL-3.0-only",
"LGPL-2.0-or-later",
"LicenseRef-scancode-proprietary-license",
"MPL-1.1",
"CPAL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause",
"Apache-2.0"
] | permissive | https://github.com/CenterForOpenScience/osf.io | 71d9540be7989f7118a33e15bc4a6ce2d2492ac1 | a3e0a0b9ddda5dd75fc8248d58f3bcdeece0323e | refs/heads/develop | 2023-09-04T03:21:14.970917 | 2023-08-31T14:49:20 | 2023-08-31T14:49:20 | 10,199,599 | 683 | 390 | Apache-2.0 | false | 2023-09-14T17:07:52 | 2013-05-21T15:53:37 | 2023-09-02T22:35:24 | 2023-09-14T17:07:51 | 198,926 | 645 | 318 | 155 | Python | false | false | import logging
import os
from addons.base.apps import BaseAddonAppConfig
from addons.github.api import GitHubClient, ref_to_params
from addons.github.exceptions import NotFoundError, GitHubError
from addons.github.settings import MAX_UPLOAD_SIZE
from addons.github.utils import get_refs, check_permissions
from website.... | UTF-8 | Python | false | false | 4,508 | py | 2,129 | apps.py | 1,647 | 0.638642 | 0.637533 | 0 | 147 | 29.666667 | 108 |
misingnoglic/tumblr-snapr | 13,812,614,834,214 | 3277c38cc6a0d381ef54120e17c8b18e6eea504e | 82a86f0cf1eabe0252523ff960775cd307700b71 | /upload_test.py | 5d9c12985551ab810e6b29826ecdc01e471d8ba4 | [] | no_license | https://github.com/misingnoglic/tumblr-snapr | 4cf87a8d12e856c30f8175739a39bdd2fbc88d47 | 74d5fbb424f7c3287cbaef24a5731277eece1a1b | refs/heads/master | 2020-12-24T13:21:14.948128 | 2015-02-22T21:15:43 | 2015-02-22T21:15:43 | 30,952,589 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #from __future__ import unicode_literals
__author__ = 'arya'
from tumblpy import Tumblpy
from secrets import tumblr_oauth_key , tumblr_secret_key, tumblr_token, tumblr_token_secret
t = Tumblpy( tumblr_oauth_key, tumblr_secret_key, tumblr_token, tumblr_token_secret)
blog_url = t.post('user/info')
blog_url = blog_url... | UTF-8 | Python | false | false | 555 | py | 5 | upload_test.py | 3 | 0.704505 | 0.702703 | 0 | 16 | 33.75 | 123 |
danbi2990/python_practice | 8,246,337,253,213 | a24972b827e3fd8d7dcab11bbe6b2786c3cfe5f9 | e94363b6dc2d003f19f6c97a1bdc7e47f96aed53 | /tutorial_bodenseo/ch31_iterator_generator/act1_simple_generator.py | 9f6250e632ff74ded153839e4b811d9dd6cd0e94 | [] | no_license | https://github.com/danbi2990/python_practice | c4f74fbeb9002dbcbc2de65b48cacfb161cf7742 | 15ad87740d3aeb45e45886e2a20aeb64b62df1af | refs/heads/master | 2021-01-11T18:12:21.790000 | 2017-02-07T13:19:26 | 2017-02-07T13:19:26 | 79,514,548 | 0 | 1 | null | false | 2017-01-20T02:15:02 | 2017-01-20T01:51:12 | 2017-01-20T01:51:12 | 2017-01-20T02:15:02 | 0 | 0 | 0 | 0 | null | null | null | def city_generator():
yield("London")
yield("Hamburg")
yield("Konstanz")
yield("Amsterdam")
yield("Berlin")
yield("Zurich")
yield("Schaffhausen")
yield("Stuttgart")
city = city_generator()
print(next(city))
print(next(city))
print(next(city))
print(next(city))
print(next(city))
print(ne... | UTF-8 | Python | false | false | 366 | py | 51 | act1_simple_generator.py | 47 | 0.655738 | 0.655738 | 0 | 19 | 18.263158 | 25 |
dshayden/npetracker | 635,655,186,525 | 5793645ef145680d3482423c04049ebccbb67863 | fdb996c7268b84c09d7e38aa293a9641f29d8b54 | /NPETracker.py | f3aee07300ec0a39b5d56df92405b380d6fc4218 | [] | no_license | https://github.com/dshayden/npetracker | 740189ab5ad5f9ecc5f0c9304b5824662d8ad296 | 16ddce154c9df7b07c372075f80dd55fdbb20f00 | refs/heads/master | 2023-03-28T19:59:51.933346 | 2018-08-27T23:42:12 | 2018-08-27T23:42:12 | 346,836,062 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np, argparse
import mixtures
import functools
import du, du.stats
import matplotlib.pyplot as plt
import IPython as ip
def build_opts(nY, nX, K, **kwargs):
o = argparse.Namespace()
# Parameters
o.nY = nY
o.nX = nX
o.N = nY*nX
o.K = K
o.camK = kwargs.get('camK', None)
o.camKi = np.lina... | UTF-8 | Python | false | false | 11,822 | py | 15 | NPETracker.py | 14 | 0.595077 | 0.582812 | 0 | 390 | 29.312821 | 80 |
kanatatsu64/wordlist | 8,169,027,797,840 | 82de8522cf4d9d95f08a204b8e1e481fc022b0ae | f40a3a7aba33fe499f450a640563495bc29d2745 | /scripts/test-helper.py | 29cb07570dba21f3aefba1256d06425906f16e39 | [] | no_license | https://github.com/kanatatsu64/wordlist | d26c3ddc807adb632f368f3d72408cbdd6869b0a | bc54e87f3d888a9e9c7d5ee2540beae8547abd56 | refs/heads/master | 2023-02-03T22:39:16.892731 | 2020-12-13T17:28:18 | 2020-12-13T17:28:18 | 315,680,069 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
import unittest
import yaml
import re
from helper import validate, convert, getScripts, getAllScripts, notice
class TestValidate(unittest.TestCase):
def testValidate1(self):
yamlStr = '\n'.join([
"{",
" example: {",
" test: /^src//,",
... | UTF-8 | Python | false | false | 11,475 | py | 146 | test-helper.py | 16 | 0.424488 | 0.414815 | 0 | 423 | 26.12766 | 71 |
pelkmanslab/brainy | 16,054,587,763,893 | 9c2ff865f83dee6af0a2ff58afcbaf41dd78f61a | 35e70af99db6ad018a7f861d597a7d108ca9d149 | /src/brainy/log.py | 7ae6d181f1b400943de78ef79dc7a75ab5c9fc95 | [
"MIT"
] | permissive | https://github.com/pelkmanslab/brainy | 205cc350dcbece723b2f54b68f3d5fdf687f0869 | eb088be9585734c66be5d6ef0b7127a923f4066c | refs/heads/master | 2021-03-27T12:29:28.584197 | 2015-04-16T09:17:58 | 2015-04-16T09:17:58 | 23,793,124 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import logging
import atexit
from tree_output.houtput import HierarchicalOutput
from tree_output.log_handler import HierarchicalOutputHandler
LOGGING_OPTIONS = ('silent', 'console', 'json')
def make_console_handler(level):
console = logging.StreamHandler()
console.setLevel(level)
return console
def make... | UTF-8 | Python | false | false | 1,319 | py | 49 | log.py | 41 | 0.70887 | 0.706596 | 0 | 44 | 28.977273 | 74 |
SanjaySathiraju/Voting-system-smart-ID-Face-recognition- | 5,454,608,481,047 | 5daccfd97cd298bf0891234e64b4218966ba0e6d | f8d404fa718d4c25157721da802c3fe3ef7cf0fb | /Source code/feature_vec.py | 74e1d2e222488997820c907b256fa00a80ac092a | [] | no_license | https://github.com/SanjaySathiraju/Voting-system-smart-ID-Face-recognition- | 33b2fa72d0919952c9ff56e0e3831e350d785852 | 23552e180b3788d17629a3cb55e99a35439168e1 | refs/heads/main | 2023-04-13T20:18:28.490738 | 2021-04-15T08:30:26 | 2021-04-15T08:30:26 | 358,161,555 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from rectangulate import *
from numpy import zeros
from sys import argv
def engroup(fname):
'''
Generate the feature vector correspoonding to an iris
by using the rectangular iris image generated from
rectangulate.py;
From the normalized eye image obtained in the rectangle function
of rect... | UTF-8 | Python | false | false | 2,482 | py | 19 | feature_vec.py | 17 | 0.537873 | 0.521757 | 0 | 85 | 28.188235 | 70 |
lucasbiscaro/smmt_plugin | 13,288,628,823,295 | 8eb152b8cd97c490494d15de4e8cdf27d0089ba2 | a894b3d350e0f69dea5c36999d6b4a33286498f8 | /pluginbuilder/plugin_templates/toolbutton_with_dialog/plugin_template.py | 78d8cd523f74699b28a2ccef86a746ffc56f1dbb | [] | no_license | https://github.com/lucasbiscaro/smmt_plugin | acfa6dd31bcae4bd33f02037c1906faf3c2a1b5d | 6a93eea2f314820ed5ba17cc64bb1aff4514d528 | refs/heads/master | 2020-03-17T02:31:05.177143 | 2018-07-06T12:25:08 | 2018-07-06T12:25:08 | 133,193,283 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
/***************************************************************************
PluginTemplate
A QGIS plugin
plugin_template
-------------------
begin : 2015-03-17
git sha : $Format:%H$
... | UTF-8 | Python | false | false | 3,135 | py | 20 | plugin_template.py | 12 | 0.474322 | 0.469856 | 0 | 79 | 38.683544 | 79 |
btree1970/CountrySentiment | 9,268,539,472,665 | 7669028b5d424e5b769fb3e48320a30f5267b6b4 | b8146f9ca0ddfaea6e8de48a13b19623b088fd6f | /app.py | ce8c7e0c4677de489c1595cb35ef39e2f428e72e | [] | no_license | https://github.com/btree1970/CountrySentiment | f7e87fe9052e741c964e63185844baa03af903be | f8349653cebace67013d480446a46835179c68ae | refs/heads/master | 2022-12-16T07:32:28.537449 | 2020-01-04T00:55:14 | 2020-01-04T00:55:14 | 229,656,580 | 1 | 0 | null | false | 2022-12-11T18:32:00 | 2019-12-23T01:43:38 | 2020-07-22T13:33:20 | 2022-12-11T18:32:00 | 1,240 | 1 | 0 | 25 | Python | false | false | import tweepy
import json
import logging
import sys
import os
import re
from nlp import getSenimentScoreForTopic
from storageUtils import Storage
from dotenv import load_dotenv
load_dotenv()
_LOGGER = logging.getLogger(__name__)
_LOGGER.setLevel(logging.DEBUG)
consoleHandler = logging.StreamHandler(sys.stdout)
conso... | UTF-8 | Python | false | false | 4,349 | py | 16 | app.py | 7 | 0.534376 | 0.528627 | 0 | 134 | 31.425373 | 107 |
kegplant/Django_Intro_sessionWords | 2,645,699,883,046 | f359bbeabfe1487d061946a239161d09b2c48982 | 55a08a062e7bdc5971c0cb04ab280d39ac5fa68e | /apps/session_words/views.py | 36dab02bf5768d26b2d7d9cb6c4d9314aef7f9d3 | [] | no_license | https://github.com/kegplant/Django_Intro_sessionWords | a764092953b897bb00c2f3717343ecf252e3002d | a9c94c1bb68c58d7645c6cd7c3a5fd0a14addc1f | refs/heads/master | 2021-08-14T06:57:14.869869 | 2017-11-14T22:12:25 | 2017-11-14T22:12:25 | 110,751,014 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render, HttpResponse, redirect
from datetime import datetime
# the index function is called when root is visited
def index(request):
try:
request.session['words']
except:
request.session['words']=[]
context={
'words':request.session['words']
}
#r... | UTF-8 | Python | false | false | 1,111 | py | 2 | views.py | 1 | 0.586859 | 0.586859 | 0 | 40 | 26.8 | 66 |
marcjasz/tomograf | 14,559,939,155,290 | fb1bc459bbdd2d6daa990f33b01bd2e3ad3a0e14 | 3bf68ff28a146876f57df0c8ca35170194ab7ff7 | /scanner.py | 09337a6aada4e0951c7430707697989494774617 | [] | no_license | https://github.com/marcjasz/tomograf | 40ef6c6001acb06161d692e9495c62c4953ed615 | ee489ddfb156b5c2f3a7ec5f4996b1333bf6b843 | refs/heads/master | 2021-02-16T15:06:20.401062 | 2020-03-30T18:56:36 | 2020-03-30T18:57:12 | 245,018,768 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from skimage import util
import numpy as np
import math
import functools
def normalize(num, bot, top):
if num > top:
return 1
if num < bot:
return 0
return (num - bot)/(top - bot)
def normalize_photo(photo):
bot, top = np.percentile(photo, (44, 98))
print(bot, top)
res = ... | UTF-8 | Python | false | false | 5,597 | py | 4 | scanner.py | 3 | 0.578512 | 0.570428 | 0 | 146 | 37.123288 | 121 |
bloomfieldfong/Evaluador-de-Expresiones | 14,602,888,828,246 | 632d1b6f83dc0ba2b61f63a2ab8a7936ad561543 | 84ccb58e09dc81fe67b923aea749478bc4e67383 | /main.py | 15e6fcfd148f28aeda4aca87376689c305a87981 | [] | no_license | https://github.com/bloomfieldfong/Evaluador-de-Expresiones | 7f225b14941651278210ac3916e1c7889495ab7c | d92843ec90fff3e7574352a45a7d8b681b9fbc7f | refs/heads/master | 2021-01-06T18:31:18.039868 | 2020-04-05T20:19:49 | 2020-04-05T20:19:49 | 241,440,470 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from funciones import *
from operator import itemgetter
from graphviz import Digraph
import os
from thomson_grafic import *
from subconjuntos import *
from directo2 import *
##environment de mi graficadora
os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin'
x = True
while x:
menu = ... | UTF-8 | Python | false | false | 3,996 | py | 7 | main.py | 6 | 0.579079 | 0.571822 | 0 | 114 | 33.807018 | 176 |
ab3llini/Transformer-VQA | 7,739,531,087,483 | f885fbb6815c1e0c93975514f2a797c6babc47ca | c65674148db2fdefcd0a3a5441f72a9e692ff7c8 | /src/models/vggpt2v2/predict.py | 2cd6b24805ebf391b29e2240d1a0dae62271b635 | [
"MIT"
] | permissive | https://github.com/ab3llini/Transformer-VQA | 5fe68ab11f1e553e4cd2f9cc14cd1996df615dfb | 46c50fb2748b9d372044d00b901f0cde91946684 | refs/heads/master | 2022-04-28T16:55:31.353689 | 2022-03-15T10:13:37 | 2022-03-15T10:13:37 | 187,615,528 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import os
this_path = os.path.dirname(os.path.realpath(__file__))
root_path = os.path.abspath(os.path.join(this_path, os.pardir, os.pardir))
sys.path.append(root_path)
from torch.optim import Adam
from utilities.training.trainer import Trainer
from utilities.paths import resources_path
from datasets.light ... | UTF-8 | Python | false | false | 3,229 | py | 102 | predict.py | 57 | 0.602973 | 0.590895 | 0 | 91 | 34.483516 | 119 |
amrithajayadev/misc | 14,087,492,738,912 | c02c9aefd0c555e63561514cfb06ee8b93cee52c | dd5c06ab6f51a2ae2890eb604bb83f1d1a1ba8d3 | /recursion/permutation_case_change.py | f08b44f5134a41c6b2134c3490c02d94cb609a7c | [] | no_license | https://github.com/amrithajayadev/misc | 0c3995eb6f4748d803471fb3da693f23fa886ba5 | c316d85b639b53ebe9f6cd7c162a6f4287a431b4 | refs/heads/main | 2023-04-02T02:36:51.428221 | 2023-03-31T03:23:35 | 2023-03-31T03:23:35 | 304,224,989 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | inp = "a1B2"
diff = ord('a') - ord('A')
def generate(inp, i, out):
if i == len(inp):
print(out, end=" ")
return
generate(inp, i + 1, out + inp[i])
if ord('A') <= ord(inp[i]) < ord('a'):
case_change = chr(ord(inp[i]) + diff)
elif ord(inp[i]) >= ord('a'):
case_change = c... | UTF-8 | Python | false | false | 675 | py | 200 | permutation_case_change.py | 199 | 0.493333 | 0.478519 | 0 | 33 | 19.454545 | 46 |
gitter-badger/magma | 7,945,689,535,466 | bbb1c65f79d5aa21d90d93b769cb0991cf1b62f1 | 8247ccd2a32a353f12d8f067aeae6c4c085665e9 | /magma/fromverilog.py | b8729e9d466ee2f7bbeeaf618b8f9b80c3f0fe1f | [
"MIT"
] | permissive | https://github.com/gitter-badger/magma | 7ae0b511f24020d209923fdb8e448fc579ba59fa | c2f9eedffb9a921c9cefb0c742254e3adb522034 | refs/heads/master | 2020-08-14T05:53:03.005786 | 2019-10-14T17:18:03 | 2019-10-14T17:18:03 | 215,109,656 | 0 | 0 | NOASSERTION | true | 2019-10-14T17:50:49 | 2019-10-14T17:50:49 | 2019-10-14T17:18:06 | 2019-10-14T17:18:04 | 12,467 | 0 | 0 | 0 | null | false | false | from __future__ import absolute_import
from __future__ import print_function
from collections import namedtuple, OrderedDict
from mako.template import Template
from pyverilog.vparser.parser import VerilogParser, Node, Input, Output, ModuleDef, Ioport, Port, Decl
import pyverilog.vparser.parser as parser
from pyverilog... | UTF-8 | Python | false | false | 9,657 | py | 154 | fromverilog.py | 98 | 0.635498 | 0.635083 | 0 | 261 | 36 | 102 |
nygeog/osgeo | 14,826,227,117,707 | 61db22b0b586a8c4e175e3d20160544d511d2147 | 015e6357c995d45716de2aa6fb5676a76b1e4b9a | /shapely_fiona_intersect/intersect.py | 77056ce8d2ac9e00e9b88730a991eb2783bc4c86 | [] | no_license | https://github.com/nygeog/osgeo | 7603e6671fd3b691f0a3d36862d36fe3aa3ff8a0 | f3e2a3c3069f36957862fe62bb01cebd9d0245a3 | refs/heads/master | 2021-01-18T21:16:43.585187 | 2016-06-28T13:12:10 | 2016-06-28T13:12:10 | 27,847,521 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import fiona
from shapely.geometry import shape
from copy import deepcopy
with fiona.open("planning_neighborhoods.shp", "r") as n:
with fiona.open("Schools_Private_Pt.shp", "r") as s:
# create a schema for the attributes
outSchema = deepcopy(s.schema)
outSchema['properties'].update(n.sc... | UTF-8 | Python | false | false | 1,022 | py | 18 | intersect.py | 6 | 0.528376 | 0.528376 | 0 | 24 | 41.625 | 102 |
Graeberj/saidit | 137,438,974,152 | 7fe5827f58875ecd7d2ea3587e912a86e27ea235 | a9a074c24dc0300e769053755c5e1937e13cb2ac | /posts/models.py | 1f9d650f7ea7c26d05b0496b9257a2a62e29fcdd | [] | no_license | https://github.com/Graeberj/saidit | d86a7a7c6aaa0e592f6d06f295de948c909b1c19 | 7890d1fe76dde6ada7f6d251fafb40feb5000eac | refs/heads/main | 2023-08-31T08:20:10.786030 | 2021-10-20T03:53:54 | 2021-10-20T03:53:54 | 413,550,262 | 0 | 1 | null | false | 2021-10-19T22:08:54 | 2021-10-04T19:04:08 | 2021-10-19T20:06:52 | 2021-10-19T22:08:53 | 1,887 | 0 | 0 | 0 | HTML | false | false | from django.db import models
from saidituser.models import SaidItUser
from django.utils import timezone
from group.models import SubGroup
from django.contrib.auth.models import User
class Post(models.Model):
user = models.ForeignKey(SaidItUser, on_delete=models.CASCADE)
posted_in = models.ForeignKey(... | UTF-8 | Python | false | false | 900 | py | 36 | models.py | 20 | 0.693333 | 0.687778 | 0 | 23 | 36.869565 | 88 |
akbarmenglimuratov/django-qa | 15,049,565,454,012 | f60c7e1948a8dca9b73c735a9e971a84b86876de | 87497377bc615360f735dc7742fb911f786a66d2 | /accounts/migrations/0010_auto_20190301_1955.py | e4e645254aa916bcbf525c9203ecc140055284f6 | [] | no_license | https://github.com/akbarmenglimuratov/django-qa | dd035aeae335883acf82306e7cb2129c6c3aa8a5 | 994700ca2a3b7d446ff4bca7bdd6e0c0b70b3c36 | refs/heads/master | 2020-05-09T16:31:41.761382 | 2020-03-03T17:18:14 | 2020-03-03T17:18:14 | 181,272,934 | 0 | 0 | null | false | 2020-06-05T20:22:18 | 2019-04-14T07:12:26 | 2020-03-03T17:18:42 | 2020-06-05T20:22:16 | 4,075 | 0 | 0 | 3 | Python | false | false | # Generated by Django 2.1.5 on 2019-03-01 16:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0009_user_data_image'),
]
operations = [
migrations.AlterField(
model_name='user_data',
name='fav_questi... | UTF-8 | Python | false | false | 636 | py | 46 | 0010_auto_20190301_1955.py | 24 | 0.595912 | 0.566038 | 0 | 23 | 26.652174 | 107 |
xiaobogaga/littletalk | 16,956,530,897,227 | 796e544c3ff82f91dd24b7727b0d99839d848d35 | 443bd9a2e6085fb466d50b1ce44a8ad5e76be129 | /com/tomzhu/util/testDictJson.py | 452730c199e02a033d9a139d673eae20002e0c18 | [] | no_license | https://github.com/xiaobogaga/littletalk | b01a3679233aa8c34a2c7fb946a82acc18331ea0 | cce1c1ab048f43d8fa85e0e2f1b5e2a22acc0bf3 | refs/heads/master | 2018-02-08T03:59:32.286533 | 2017-07-08T02:57:33 | 2017-07-08T02:57:33 | 96,375,059 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import pickle
if __name__ == "__main__":
data = open("d://ques_voca_vec.bin" , "rb")
ques = pickle.load(data)
print(ques["我们"])
data.close()
| UTF-8 | Python | false | false | 185 | py | 13 | testDictJson.py | 12 | 0.552486 | 0.552486 | 0 | 9 | 19.111111 | 47 |
beevageeva/manchaNew | 2,336,462,248,328 | 1b64fa72b106bb6d19221c6f30bcad0c716b1ebb | 2526d7fb40388a663cd8d4d099b33ef11e47bc33 | /mancha_src/sample_tests/Acoustic_Wave3-2fl/create_equi-2fluids-equal.py | 051e7e94c2bd14f77c4dd1a5ddb45146792bcaf4 | [] | no_license | https://github.com/beevageeva/manchaNew | fbac3aba2aeda04f78ccd3f81521c24cfff4b166 | 74b42721bb64378556b017a12b74edab2f8bc1a6 | refs/heads/master | 2016-08-31T04:12:50.017968 | 2016-08-28T15:36:38 | 2016-08-28T15:36:38 | 50,166,684 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import h5py
from math import pi, sqrt
#make sure filename has h5 extension otherwise visit won't recognize it!
eqfilename = "eqmytestfile.h5"
pfilename = "pmytestfile.h5"
mx = 100
my = 100
mz = 100
rho0 = 1.0
pe0 = 2e-4
Te0 = 6000
mu0 = 1.0
mH = 1.66e-27 #kg
kB = 1.38e-23 #m2 kg s-2 K-1
Lx ... | UTF-8 | Python | false | false | 3,253 | py | 117 | create_equi-2fluids-equal.py | 41 | 0.632339 | 0.598524 | 0 | 103 | 30.563107 | 104 |
OppiHmiK/Python_Study | 19,404,662,273,012 | 0f9d1133bd0a6b803e1309bb1d1a9bbf282ffe00 | b2bc6bf4aa384382be95a3d7cc9d334ccce0ee42 | /Study_from_Windows/Vanilla/Pickle/pickle_1.py | d190c93272243da92d2bf9c544c4e3dab990bde6 | [] | no_license | https://github.com/OppiHmiK/Python_Study | 24de12a99956779abfe43ea10b9cec1c75273517 | 5e5784f332c7e152c879f3465cdd28f2e9f7d921 | refs/heads/master | 2021-09-11T09:06:19.104869 | 2021-09-02T00:12:49 | 2021-09-02T00:12:49 | 194,117,175 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding : utf-8 -*-
import pickle as pck
lis = ['a', 'b', 'c']
with open('test.txt', 'wb') as f:
pck.dump(lis, f)
| UTF-8 | Python | false | false | 136 | py | 190 | pickle_1.py | 119 | 0.470588 | 0.463235 | 0 | 7 | 16.857143 | 33 |
Bhagyarsh/mogambo | 16,990,890,646,603 | 718acd7dce0c270552e0c68a655724529eaa3ad3 | b2241942315a8e9ec96abdfc3572a889a91d2208 | /mogambo/SoftwareData/api/API_TEST/t.py | fd57b05ef2ff091be2075b4d2e04479b5b1eba2e | [] | no_license | https://github.com/Bhagyarsh/mogambo | c9bf1174aca31955accb109c0df7ee2292172743 | 7e00fcadd9c6111a9ac0ef429920ea4e4f018428 | refs/heads/master | 2023-01-14T07:29:55.808968 | 2019-02-03T05:36:15 | 2019-02-03T05:36:15 | 164,221,549 | 2 | 0 | null | false | 2023-01-04T20:56:59 | 2019-01-05T14:22:08 | 2019-10-19T11:14:32 | 2023-01-04T20:56:55 | 2,489 | 1 | 0 | 52 | Python | false | false | import base64
import json
img = json.dumps(base64.b64encode(open('inkscape.jpg', 'rb').read()))
print(img) | UTF-8 | Python | false | false | 106 | py | 45 | t.py | 32 | 0.735849 | 0.679245 | 0 | 4 | 25.75 | 69 |
caifi2/scikitLearn | 6,167,573,050,744 | 15a7c9c1ffb84be661c454fc34786065b706bb36 | e61a60542f4b1b1abca3c89db691a91c34f2c860 | /numpy_pandas/GridSearchCV_VS_RandomizedSearchCV.py | 258f5b28f5cb7c5a43dd6a28ce3e9409a5a54b5a | [] | no_license | https://github.com/caifi2/scikitLearn | 28cbe5081d1cc312f49a1403febebcb6978c8e7d | 71e1b95d1d509063bbeffe115ebc005299f42ee5 | refs/heads/master | 2018-09-19T10:35:39.541782 | 2017-06-13T07:40:13 | 2017-06-13T07:40:13 | 93,704,232 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from time import time
from scipy.stats import randint as sp_tandint
from sklearn.datasets import load_digits
from sklearn.model_selection import RandomizedSearchCV, GridSearchCV
from sklearn.ensemble import RandomForestClassifier
import numpy as np
#网格搜索 VS 随机搜索
#选取最优参数
def report(results, n_top = 3):
fo... | UTF-8 | Python | false | false | 2,255 | py | 40 | GridSearchCV_VS_RandomizedSearchCV.py | 35 | 0.63504 | 0.617191 | 0 | 61 | 32.901639 | 136 |
gouvina/aprendaut2019 | 4,930,622,484,282 | 0479b52e95ccc858140a6ca255397bd2d6fa5ad9 | a373cd328800dc333de480820ef94947e16d039e | /lab4/processing/parser.py | b094a4f8041d3f61680df0748a4979f652ca849f | [] | no_license | https://github.com/gouvina/aprendaut2019 | 3d0e2c42142a95c43a9f7748781f2db1991f9477 | 8db885586c3c3e1883925fe240ae7e6a89fa7110 | refs/heads/master | 2020-04-25T19:12:16.384053 | 2019-12-02T14:39:08 | 2019-12-02T14:39:08 | 173,011,479 | 1 | 0 | null | false | 2019-12-02T14:39:09 | 2019-02-28T00:21:45 | 2019-11-05T01:17:20 | 2019-12-02T14:39:08 | 70,944 | 2 | 0 | 0 | Jupyter Notebook | false | false | ### DEPENDENCIAS
### ------------------
import numpy as np
from utils.const import CandidateDivision
### METODOS PRINCIPALES
### -------------------
# Dada una lista de candidatos, devuelve sus respectivos partidos
# Se retorna una lista de tuplas (id, nombre, candidatos) para los partidos
# Y una lista de partidos... | UTF-8 | Python | false | false | 2,595 | py | 332 | parser.py | 64 | 0.617579 | 0.608327 | 0 | 78 | 32.269231 | 83 |
AK-1121/code_extraction | 816,043,787,626 | 3028d8bab52be76927f5403c3491a6eb5c25b105 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_27822.py | 7f88a597a5e680ef1da04f553dfeb58ec0d5bbbd | [] | no_license | https://github.com/AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # how to add element to json list - python
data["list"].append({'b':'2'})
| UTF-8 | Python | false | false | 74 | py | 29,367 | python_27822.py | 29,367 | 0.635135 | 0.621622 | 0 | 2 | 36 | 42 |
Marstaable/Repo_warsztaty | 14,130,442,415,321 | 9ad19132b042873b1a05052956009e39c8e4971e | f187ce976dbd2eaad83183f146bc6699e03561a3 | /week5/fabryka.py | 1472a609ba97c1e5006f9956b918762aa5cae394 | [] | no_license | https://github.com/Marstaable/Repo_warsztaty | e3e43b96ca2738b941e84f525653d01f6e8a5b46 | b2f973dcab85034e44d9719bfdd915016bbb678d | refs/heads/master | 2020-03-29T23:02:54.926387 | 2019-02-18T08:21:35 | 2019-02-18T08:21:35 | 150,453,671 | 0 | 0 | null | false | 2019-02-18T08:21:36 | 2018-09-26T16:04:35 | 2018-10-24T17:02:48 | 2019-02-18T08:21:36 | 1,604 | 0 | 0 | 0 | Python | false | null | from week5.samochod import Samochod
from week5.silnik import Silnik
# samochod ma miec silnik :P
silnik = Silnik(1.7,2000)
samochod1 = Samochod("czerwony","opel","astra",silnik)
# samochod2 = Samochod("zielony","VW","Najnowszy:P")
silnik = Silnik(5.4, 1000)
samochod2 = Samochod("zielony","VW","Najnowszy",silnik)
# s... | UTF-8 | Python | false | false | 827 | py | 74 | fabryka.py | 65 | 0.658182 | 0.604848 | 0 | 30 | 26.533333 | 71 |
Mistyhops/task_D16 | 13,280,038,910,025 | 26b42520ed6fdfc14b5c1984d715e29104c90f3d | f62ae2ec9c49366642397acca8d043baa8ce2e30 | /project/announcements/tasks.py | a8482e2ea1258e315a7183414752a6b7baace82f | [] | no_license | https://github.com/Mistyhops/task_D16 | 50a54e638222152e7b1de3feda96e42158636cbb | 68266bb6bf0ef5e3b458195bddd674497d220e35 | refs/heads/master | 2023-08-04T18:02:10.187911 | 2021-09-14T22:28:06 | 2021-09-14T22:28:06 | 405,493,060 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from celery import shared_task
from django.template.loader import render_to_string
from django.core.mail import get_connection, EmailMultiAlternatives
from django.conf import settings
from accounts.models import CustomUser
from .services import get_announcement_list_for_last_week_for_selected_user
@shared_task
def r... | UTF-8 | Python | false | false | 1,263 | py | 30 | tasks.py | 21 | 0.619161 | 0.619161 | 0 | 38 | 32.236842 | 121 |
mam288/bioinformatics-VI | 2,362,232,051,104 | c48abd814f28fcda66783c3e48af09846fca7f6c | 0a7665e696a0fe75e6243fc9624860b0d03cc675 | /wk5_05_viterbi_learning_HMM.py | bc61292780103345be870499fd81d1224c0ab4ff | [] | no_license | https://github.com/mam288/bioinformatics-VI | e4bcbd10a99869362811447c14c93f2ea6827cf8 | bda033a75522002feed7d34c3cc446172b22a3ae | refs/heads/master | 2021-01-21T05:15:20.243488 | 2017-03-02T21:21:24 | 2017-03-02T21:21:24 | 83,160,983 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
Solution to Implement Viterbi Learning
Finding Mutations in DNA and Proteins (Bioinformatics VI) on Coursera.org
Week 5,code challenge #5
https://stepik.org/lesson/Hidden-Markov-Models-Code-Challenges-(Week-2)-11632/step/10?course=Stepic-Interactive-Text-for-Week-5&unit=9009
'''
import networkx as nx
import numpy ... | UTF-8 | Python | false | false | 10,322 | py | 23 | wk5_05_viterbi_learning_HMM.py | 22 | 0.626199 | 0.616122 | 0 | 213 | 47.460094 | 189 |
taddes/python-blockchain | 8,220,567,441,588 | 0c0688fcca7bb9c4f61bcefc33946efeed048fd4 | 032aee36fd2611f3c56956afc12f1b4503b04180 | /files.py | d5668391ba3ab405b03aa48775f12e57510e9acb | [] | no_license | https://github.com/taddes/python-blockchain | 57ba1d057709bc545062dfbcd26f39dd9234e863 | beaf1a44b9e71d2815d133fb1d02caef0aac3e7c | refs/heads/master | 2020-04-24T07:09:53.094143 | 2019-06-28T17:40:55 | 2019-06-28T17:40:55 | 171,789,131 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
f = open('demo.txt', mode='r')
file_content = f.readlines()
for line in file_content:
# [:-1] removes newline character
print(line[:-1])
f.close()
# line = f.readline()
# while line:
# print(line)
# line = f.readline()
"""
with open('demo.txt', mode='w') as f:
f.write('Testing this')
| UTF-8 | Python | false | false | 304 | py | 21 | files.py | 10 | 0.598684 | 0.592105 | 0 | 18 | 15.833333 | 37 |
tazjel/python-ifcfg | 3,246,995,319,213 | 9b950f5250c002731bcf21e510a1b9cfa86e72e4 | 561bd114738466162b8ef5dc3dc10ba4715cd648 | /ifcfg/parser.py | 1c71815a50bc56b14f94719b016a395e62519f39 | [
"BSD-3-Clause"
] | permissive | https://github.com/tazjel/python-ifcfg | b79c316c876baa8c95e5df135ad4cdbf992315b4 | 009a27e8ad70e4aa85e48dd473296593a3c75330 | refs/heads/master | 2016-02-28T02:56:26.461085 | 2012-06-05T23:20:40 | 2012-06-05T23:20:40 | 6,483,091 | 3 | 3 | null | false | 2015-12-02T15:54:42 | 2012-11-01T01:03:11 | 2015-06-28T21:52:17 | 2012-06-06T20:08:33 | 171 | 3 | 8 | 2 | Python | null | null |
import re
import socket
from .meta import MetaMixin
from .tools import exec_cmd, hex2dotted, minimal_logger
Log = minimal_logger(__name__)
class IfcfgParser(MetaMixin):
class Meta:
ifconfig_cmd_args = ['ifconfig', '-a']
patterns = [
'(?P<device>^[a-zA-Z0-9]+): flags=(?P<flags>.*)... | UTF-8 | Python | false | false | 6,050 | py | 10 | parser.py | 7 | 0.472397 | 0.469091 | 0 | 172 | 34.168605 | 77 |
CARMIN-org/CARMIN-server | 18,614,388,273,853 | 948d09a2ce0f319eae03ae76a74aa6683b1dc763 | 087b6497d26f78c73f529d1b6f2ff877871fe766 | /server/test/fakedata/users.py | 18630f0eaf32e041ad2a18f58a22a6049789758a | [
"MIT"
] | permissive | https://github.com/CARMIN-org/CARMIN-server | 0b1efc305fb3957b1d700970d0a13ef53d2bb4ca | 49e56edf0c07e5f3dddc10bdc3e5d4d965e263d8 | refs/heads/master | 2021-04-03T01:52:39.846007 | 2018-05-01T13:22:07 | 2018-05-01T13:22:07 | 124,953,943 | 2 | 2 | MIT | false | 2018-05-01T01:32:09 | 2018-03-12T21:29:40 | 2018-04-23T18:19:03 | 2018-04-23T18:19:00 | 532 | 1 | 1 | 3 | Python | false | null | from server.database.models.user import User, Role
from werkzeug.security import generate_password_hash
def admin(encrypted=False):
return User(
username="admin",
password=generate_password_hash("admin") if encrypted else "admin",
role=Role.admin,
api_key="admin-api-key")
def sta... | UTF-8 | Python | false | false | 755 | py | 86 | users.py | 81 | 0.656954 | 0.651656 | 0 | 26 | 28.038462 | 75 |
sungguenja/bsgg | 10,883,447,159,310 | 92f6b662e11971dfc6fa771a0a0335d19739b262 | 1c67732a24042a991cc9f7e764d4640522391972 | /back/gamedata/migrations/0002_animal_respon_time.py | a9fdbb64c49d905f345deaacfe7c4350a59f0b66 | [] | no_license | https://github.com/sungguenja/bsgg | 1061ccc6f5f08ed9ad14d3a332af020ec7a5df22 | 447283378ac3bb8f489e2a4662bfb6513bc37be2 | refs/heads/master | 2023-04-01T14:15:05.491775 | 2021-04-06T09:46:25 | 2021-04-06T09:46:25 | 318,800,558 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.1.4 on 2020-12-22 13:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gamedata', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='animal',
name='respon_time',
... | UTF-8 | Python | false | false | 378 | py | 83 | 0002_animal_respon_time.py | 23 | 0.582011 | 0.529101 | 0 | 18 | 20 | 49 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.